RFR: 7885: Graphical rendering of dependency view fails due to heap memory drain [v2]

Virag Purnam vpurnam at openjdk.org
Fri Aug 4 15:26:43 UTC 2023


On Thu, 3 Aug 2023 11:04:41 GMT, Brice Dutheil <bdutheil at openjdk.org> wrote:

>> Virag Purnam has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   7885: Graphical rendering of dependency view fails due to heap memory drain
>
> core/org.openjdk.jmc.flightrecorder.serializers/src/main/java/org/openjdk/jmc/flightrecorder/serializers/json/IItemCollectionJsonSerializer.java line 62:
> 
>> 60: 	private final static Logger LOGGER = Logger.getLogger("org.openjdk.jmc.flightrecorder.json");
>> 61: 
>> 62: 	public synchronized static String toJsonString(IItemCollection items) {
> 
> I'm not sure putting `synchronized` on this method in core libraries is the right call. Every consumer of this method will now pay the price for a JMC issue.
> 
> I think it's better to fix the issue where the web based views use this methods.
> 
> ----
> 
> Also on the topic of synchronization I believe it's better to synchronize in the method body rather than the method.

Hi @bric3, I have done the changes accordingly. As method present in core library has been called from different views, I have created a util method. I have reverted the changes done in core library. Could you please review the changes?

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

PR Review Comment: https://git.openjdk.org/jmc/pull/511#discussion_r1284560931


More information about the jmc-dev mailing list