-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Labels
defined-and-prioritizedTickets that have fully defined the desired outcome & are prioritized to be developed.Tickets that have fully defined the desired outcome & are prioritized to be developed.enhancementNew feature or requestNew feature or requestruntime/java
Description
gProfiler collects profiles function-based, i.e, each frame represents a function.
An alternative is to aggregate line-in-function, so each frame is function:line. This creates a graph that is more fragmented, but carries more information (for example: function A calling function B twice will now have 2 separate callstacks for B under A, allowing you to differentiate).
Various profilers already support it (for example, py-spy does, as far as I'm aware). I want to start with support in Java (so async-profiler).
The feature requirements are:
- A flag in gProfiler enabling the behavior:
--line-numberssuffices. - This flag is passed into
ProfilerStateand used by Profiler classes supporting it. - In the case of
JavaProfiler, async-profiler alreadys supports line numbering, see code that extracts the BCI -> line numbers table here. It exists for JFR. As we're using the collapsed format, we can add this support to collapsed, like we added method modifers. - Syntax of the frame can be: add
:line_numberbetween the_[...]suffix to the frame name itself.
Note that line-of-function was added here: #821. This ticket is for line-in-function.
Metadata
Metadata
Assignees
Labels
defined-and-prioritizedTickets that have fully defined the desired outcome & are prioritized to be developed.Tickets that have fully defined the desired outcome & are prioritized to be developed.enhancementNew feature or requestNew feature or requestruntime/java