RFR: 8334779: Test compiler/c1/CanonicalizeArrayLength.java is timing out
Vladimir Kozlov
kvn at openjdk.org
Tue Jun 25 14:59:16 UTC 2024
On Tue, 25 Jun 2024 03:20:42 GMT, Dean Long <dlong at openjdk.org> wrote:
> Where are these strings actually located? Do they need to be relocated if the CodeBuffer expands?
Thank you, @dean-long, for looking.
They are not located in CodeCache space, they are external. It is long path from `code_string(ss.as_string())` call but at the end a string is duplicated in C heap:
[codeBuffer.cpp#L1088](https://github.com/openjdk/jdk/blob/master/src/hotspot/share/asm/codeBuffer.cpp#L1088)
But structure which keep track of these strings is part of CodeBlob `CodeBlob:: _dbg_strings` which is not copied by `CodeBuffer::expand()`. `expand()` has similar code to `CodeBuffer::copy_code_to()` except coping `_dbg_strings` and `_asm_remarks`. So we do have the issue with expand - we may not free space allocated by strings and comments when expanded nmethod is deoptimized.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/19871#issuecomment-2189187710
More information about the hotspot-dev
mailing list