Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The async-profiler uses a technique called Dynamic Code Instrumentation (DCI) to trace the stack when using jit-optimized methods.

When a jit-optimized method is called, the async-profiler injects a small piece of code, called a probe, at the beginning and end of the method. This probe enables the profiler to record the start and stop times of the method call, and collect information about the call stack.

The probe code is executed with minimal overhead, so it does not affect the performance of the application being profiled. Once the profiling session is complete, the profiler gathers the collected data and generates a report that shows the amount of time spent in each method, and the call hierarchy.

Overall, the async-profiler's use of Dynamic Code Instrumentation allows it to effectively profile applications that use jit-optimized methods, providing developers with valuable insights into the performance of their code.