RFR: 7073: Exceptions in FlameGraph
Alex Ciminian
github.com+348973+cimi at openjdk.java.net
Mon Dec 21 17:26:58 UTC 2020
This PR fixes the error reported in the ticket:
Exception in thread "FlameGraphModelCalculation-1" java.lang.ClassCastException:
class org.openjdk.jmc.flightrecorder.internal.parser.v1.StructTypes$JfrThread cannot be cast
to class org.openjdk.jmc.common.IMCStackTrace
We remove the use of the deprecated `ItemToolkit.accessor` method and resolve the stacktrace accessor independently for every `IItemIterable`.
I saw that `accessor` was using `CachingAccessor` internally. I'm not sure if this change has any performance implications but I assume this is a better way to do it since the old way is deprecated.
The output in the ticket shows that the graph view has a similar problem:
Exception in thread "GraphModelCalculation-2" java.lang.ClassCastException:
class java.lang.String cannot be cast to class org.openjdk.jmc.common.IMCStackTrace
We do the same change in `StacktraceGraphModel` where we skip over iterables that don't have a stacktrace accessor.
-------------
Commit messages:
- Make StacktraceGraphModel accept IItemIterables with no stacktrace
- Make StacktraceTreeModel accept IItemIterables with no stacktrace
Changes: https://git.openjdk.java.net/jmc/pull/187/files
Webrev: https://webrevs.openjdk.java.net/?repo=jmc&pr=187&range=00
Issue: https://bugs.openjdk.java.net/browse/JMC-7073
Stats: 46 lines in 2 files changed: 12 ins; 17 del; 17 mod
Patch: https://git.openjdk.java.net/jmc/pull/187.diff
Fetch: git fetch https://git.openjdk.java.net/jmc pull/187/head:pull/187
PR: https://git.openjdk.java.net/jmc/pull/187
More information about the jmc-dev
mailing list