RFR: 6787: Simplified stack trace tree model

Alex Ciminian github.com+348973+cimi at openjdk.java.net
Thu Nov 19 12:46:13 UTC 2020


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).

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

Commit messages:
 - 6787: remove alphabetical sorting of nodes, use insertion order
 - 6787: add documentation, fix copyright notices
 - 6787: remove legacy flamegraph JSON marshalling
 - 6787: refactor and cleanup new flamegraph JSON marshaller
 - 6787: add custom display for truncated frames
 - 6787: remove null root hack from StacktraceTreeModel
 - 6787: use UNKNOWN_FRAME for truncated stacktraces
 - 6787: add threadRootAtTop option to StacktraceTreeModel
 - 6787: make StacktraceTreeModel JSON match existing flame graph
 - 6787: move stacktrace tree JSON marshalling to flameview module
 - ... and 2 more: https://git.openjdk.java.net/jmc/compare/5feaf25f...974a229c

Changes: https://git.openjdk.java.net/jmc/pull/159/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jmc&pr=159&range=00
  Issue: https://bugs.openjdk.java.net/browse/JMC-6787
  Stats: 1514 lines in 23 files changed: 1061 ins; 441 del; 12 mod
  Patch: https://git.openjdk.java.net/jmc/pull/159.diff
  Fetch: git fetch https://git.openjdk.java.net/jmc pull/159/head:pull/159

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


More information about the jmc-dev mailing list