RFR: 7894: Provide an alternative Java based flamegraph visualization [v18]

Brice Dutheil bdutheil at openjdk.org
Fri Jun 9 15:27:55 UTC 2023


On Fri, 9 Jun 2023 15:13:35 GMT, Alex Macdonald <aptmac at openjdk.org> wrote:

>> application/org.openjdk.jmc.flightrecorder.flamegraph/src/main/java/org/openjdk/jmc/flightrecorder/flamegraph/views/FlamegraphSwingView.java line 539:
>> 
>>> 537: 										&& method.getType().getPackage().getName().contains(searched))
>>> 538: 								|| method.getType().getPackage().getModule() != null
>>> 539: 										&& method.getType().getPackage().getModule().getName().contains(searched)
>> 
>> `java.lang.NullPointerException: Cannot invoke "String.contains(java.lang.CharSequence)" because the return value of "org.openjdk.jmc.common.IMCModule.getName()" is null
>> 	at org.openjdk.jmc.flightrecorder.flamegraph.views.FlamegraphSwingView.lambda$12(FlamegraphSwingView.java:543)`
>> 	
>> ![search](https://github.com/openjdk/jmc/assets/10425301/0ab33875-e191-453a-9a39-eb52eb3f72fb)
>
> Not quite sure why it's complaining here .. when I step through the code it correctly checks for the null and then moves on, but eventually throws an NPE on that line that checks for the module name.

That's really odd, could you share the JFR and the searched text

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

PR Review Comment: https://git.openjdk.org/jmc/pull/408#discussion_r1224451143


More information about the jmc-dev mailing list