RFR: 6787: Simplified stack trace tree model

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


On Wed, 11 Nov 2020 17:52:23 GMT, Alex Ciminian <github.com+348973+cimi 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).

Changes requested by hirt (Lead).

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.

application/org.openjdk.jmc.flightrecorder.flameview/src/main/java/org/openjdk/jmc/flightrecorder/flameview/FlameGraphJSONMarshaller.java line 2:

> 1: /*
> 2:  * Copyright (c) 2020, Datadog, Inc. All rights reserved.

Per OCA, Oracle copyrights will need to be in all files, and first. See other files.

application/tests/org.openjdk.jmc.flightrecorder.flameview.test/build.properties line 2:

> 1: #
> 2: #  Copyright (c) 2020, Datadog, Inc. All rights reserved.

Oracle copyright first.

application/tests/org.openjdk.jmc.flightrecorder.flameview.test/pom.xml line 3:

> 1: <?xml version="1.0" encoding="UTF-8"?>
> 2: <!--   
> 3:    Copyright (c) 2020 Datadog, Inc. All rights reserved.

Oracle copyright first.

core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/stacktrace/tree/AggregatableFrame.java line 1:

> 1: /*

This one is from my graph work. I think it is fine to commit it separately here though. I can take a separate pass in my general cleanup and make it a shared class.

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

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


More information about the jmc-dev mailing list