RFR: 8351256: Improve printing of runtime call stub names in disassember output

Andrew Dinn adinn at openjdk.org
Wed Mar 5 22:21:22 UTC 2025


On Wed, 5 Mar 2025 19:50:10 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> Fixes printing of runtime stub call targets in disassembler listings.
>
> And one more in `nmethod.cpp` which fixes the issue in both, mainline and leyden.
> `RelocInfo::none` may point to the same address as following relocation info:
> 
>          @0x000000010ec23436: 0002
> relocInfo at 0x000000010ec23436 [type=0(none) addr=0x000000010ec234c8 offset=8]
>          @0x000000010ec23438: 3000
> relocInfo at 0x000000010ec23438 [type=6(runtime_call) addr=0x000000010ec234c8 offset=0] | [destination=0x000000010ec1f400] Blob::ExceptionBlob
> 
> 
> As result the real relocation info for this address is not printed: 
> 
> 
> [Exception Handler]
>   0x000000010ca8c1c8:   adrp            x8, #0x10ca85000    ;   {no_reloc}
> 
> 
> 
> The fix:
> 
> 
> @@ -3550,7 +3550,10 @@ const char* nmethod::reloc_string_for(u_char* begin, u_char* end) {
>    while (iter.next()) {
>      have_one = true;
>      switch (iter.type()) {
> -        case relocInfo::none:                  return "no_reloc";
> +        case relocInfo::none: {
> +          // Skip it and check next
> +          break;
> +        }
>          case relocInfo::oop_type: {
>            // Get a non-resizable resource-allocated stringStream.
>            // Our callees make use of (nested) ResourceMarks.
> 
> 
> After fix:
> 
> 
> [Exception Handler]
>   0x000000010ec234c8:   adrp            x8, #0x10ec1f000    ;   {runtime_call ExceptionBlob}

@vnkozlov I pushed the recommended fixes for both reloc info and nmethod.

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

PR Comment: https://git.openjdk.org/jdk/pull/23915#issuecomment-2702205803


More information about the hotspot-compiler-dev mailing list