RFR: 8301403: Eliminate memory allocations in JVMFlag::printFlags during signal handling [v11]
Gerard Ziemski
gziemski at openjdk.org
Tue Jul 30 15:13:35 UTC 2024
On Fri, 26 Jul 2024 14:50:47 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:
>> Allocating memory while handling an error should be avoided, however `JVMFlag::printFlags()` is used by crash log and it allocates memory to print flags sorted (using qsort).
>>
>> We avoid memory allocation by using BitMapView (using stack storage for array of indices) for markers in a simple O(n^2) algorithm that lets us print in alphabetical order. Performance was measured and it's not an issue.
>>
>> Running MACH5 tests...
>
> Gerard Ziemski has updated the pull request incrementally with one additional commit since the last revision:
>
> need 32 bit version of LogBytesPerWord too
Thank you David, Thomas and Johan for all your feedback!
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20202#issuecomment-2258589999
More information about the hotspot-runtime-dev
mailing list