Add tracing for performance debugging.