RFR: 8256256: UL should not use heap allocation for output string [v2]

Yumin Qi minqi at openjdk.java.net
Mon Nov 30 19:09:00 UTC 2020


On Wed, 18 Nov 2020 05:47:49 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> Yumin Qi has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Use malloc/free for large log message buffer
>
> Hi Yumin,
> 
> thanks. Sorry if this seems bikesheddy - I have a proposal about how to print in case of OOM, see below. Feel free to ignore it as you see fit, the patch is already good in its current form.
> 
> Cheers, Thomas

Ping @tstuefe @dholmes-ora:  Any suggestion for the last webrev? I checked for LogMessageBuffer, where it is used:
1) https://github.com/openjdk/jdk/blob/master/src/hotspot/share/classfile/compactHashtable.cpp#L171
2) https://github.com/openjdk/jdk/blob/master/src/hotspot/share/memory/dumpAllocStats.cpp#L71
3) https://github.com/openjdk/jdk/blob/master/src/hotspot/share/memory/filemap.cpp#L1199
4) https://github.com/openjdk/jdk/blob/master/src/hotspot/share/oops/instanceKlass.cpp#L3626
I may miss other places --- the log with files.
LogMessageBuffer's initial cap is 1024, which will grow if it is not enough (used for multiple lines for a complex output). I think we can leave this part as it is now.

Thanks.

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

PR: https://git.openjdk.java.net/jdk/pull/1246


More information about the hotspot-runtime-dev mailing list