RFR: 7073: Exceptions in FlameGraph

Marcus Hirt hirt at openjdk.java.net
Tue Jan 5 09:30:53 UTC 2021


On Mon, 21 Dec 2020 17:22:56 GMT, Alex Ciminian <github.com+348973+cimi at openjdk.org> wrote:

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

Marked as reviewed by hirt (Lead).

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

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


More information about the jmc-dev mailing list