Closed
Description
Describe the feature
Just like CPU profile, allocation profile should have native frames visible by default.
However, we should avoid littering flame graphs with meaningless frames of the profiler itself along with JVM internal frames repeated in every single stack trace.
Use Case
Objects are not always allocated in Java code; sometimes they are allocated inside the JVM runtime. It will be useful to see such stacks on a flame graph.
Today, if we add cstack
option, allocation stack traces will include native frames, however, flame graph will become too noisy:
All these yellow frames on the above picture make no sense. We should only include native frames when they are really needed to distinguish JVM allocations from Java allocations:
Proposed Solution
- Enable native stack traces in allocation profiles by default.
- Remove all native frames belonging to the common allocation path in the JVM and to async-profiler itself.
- Do not show native stack traces for contended lock events.
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change