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

Alex Macdonald aptmac at openjdk.org
Fri Jun 9 15:27:54 UTC 2023


On Fri, 9 Jun 2023 14:52:53 GMT, Alex Macdonald <aptmac at openjdk.org> wrote:

>> Brice Dutheil has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 39 commits:
>> 
>>  - chore: Adds search text field
>>  - Merge remote-tracking branch 'upstream/master' into flamegraph-swing
>>  - fix: Make spotless happy
>>  - feature: Replace existing flameview by the swing flamegraph
>>  - chore: Port attribute selection
>>    
>>    Refs: #365, JMC-6757
>>  - fix: copyright typo
>>  - fix: Make spotless happy
>>  - fix: Use tabs
>>  - fix: Saving flamegraph to JPG
>>  - Bump copright year to 2023
>>  - ... and 29 more: https://git.openjdk.org/jmc/compare/1163ef89...1d4475b3
>
> 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.

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

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


More information about the jmc-dev mailing list