RFR: 6787: Simplified stack trace tree model

Marcus Hirt hirt at openjdk.java.net
Thu Nov 19 14:33:13 UTC 2020


On Thu, 19 Nov 2020 14:18:32 GMT, Marcus Hirt <hirt at openjdk.org> wrote:

>> This PR adds a new way to represent JFR data - we aggregate stacktraces into a tree structure which we then allow to be serialised to JSON so we can use it in the `FlameGraphView`.
>> 
>> The `Node` and `AggregatableFrame` classes were initially copied from the new graph representation then slightly modified. Once the two implementations are merged and stabilised we should consider unifying these models.
>> 
>> We've validated the output of the new JSON serialisation against the previous flame graph JSON implementation, before removing the legacy code. The intermediary commits have tests that check the output is identical for one of our test recording, using the various configuration options (with/without a target attribute, with thread root at top/bottom).
>
> application/org.openjdk.jmc.flightrecorder.flameview/src/main/java/org/openjdk/jmc/flightrecorder/flameview/FlameGraphJSONMarshaller.java line 1:
> 
>> 1: /*
> 
> Normally we use initial capital case and the rest lower case for both acronyms and initialisms. You may see exceptions in the code base, since (IIRC) we used to have a different ruler separating them, and also taking into account how long they were, but eventually I believe we settled on initial capital case, the rest lower to keep things simple.

This is true for methods as well - will not add this to all places.

-------------

PR: https://git.openjdk.java.net/jmc/pull/159


More information about the jmc-dev mailing list