Integrated: 7073: Exceptions in FlameGraph
Alex Ciminian
github.com+348973+cimi at openjdk.java.net
Tue Jan 5 14:10:58 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.
This pull request has now been integrated.
Changeset: eeddd1e6
Author: Alex Ciminian <alexandru.ciminian at datadoghq.com>
Committer: Marcus Hirt <hirt at openjdk.org>
URL: https://git.openjdk.java.net/jmc/commit/eeddd1e6
Stats: 46 lines in 2 files changed: 12 ins; 17 del; 17 mod
7073: Exceptions in FlameGraph
Reviewed-by: hirt
-------------
PR: https://git.openjdk.java.net/jmc/pull/187
More information about the jmc-dev
mailing list