RFR: 8369559: Identify owning method for MethodTrainingData and CompileTrainingData in AOT map output

María Arias de Reyna Domínguez duke at openjdk.org
Fri Oct 10 11:33:36 UTC 2025


Provides part of fixes for: https://bugs.openjdk.org/browse/JDK-8363440
Fixes: https://bugs.openjdk.org/browse/JDK-8369559

Right now, MethodTrainingData and CompileTrainingData do not show to what Method they belong to:


$ cat aot.map | grep MethodTrainingData
0x00000008019d54c0: @@ MethodTrainingData 96
0x00000008019dcec8: @@ MethodTrainingData 96
[...]

$ cat aot.map | grep CompileTrainingData
[...]
0x000000080079c8a0: @@ CompileTrainingData 80
0x00000008007a7660: @@ CompileTrainingData 80


Add the method name to those lines in the AOT map to add more context. Also, for CompileTrainingData, add the level of compilation.

The output should look like the following:


$ cat aot.map | grep CompileTrainingData
0x000000080079c8a0: @@ CompileTrainingData 80 3 int java.lang.Byte.hashCode()
0x00000008007a7660: @@ CompileTrainingData 80 3 java.lang.Object java.lang.ref.Reference.get()
0x00000008007a76b0: @@ CompileTrainingData 80 4 java.lang.Object java.lang.ref.Reference.get()
[...]

$ cat aot.map | grep MethodTrainingData
0x00000008007864c0: @@ MethodTrainingData 96 void java.lang.System.arraycopy(java.lang.Object, int, java.lang.Object, int, int)
0x00000008007884f0: @@ MethodTrainingData 96 boolean java.lang.Module.isNamed()
0x00000008007892f8: @@ MethodTrainingData 96 boolean java.lang.Module.implIsExportedOrOpen(java.lang.String, java.lang.Module, boolean)
[...]


Note the number before the method signature on CompileTrainingData that represents the level, important because there are two CompileTrainingData for the same method with different compilation levels.

Some elements have a nullpointer instead of a valid Method, and those will be represented without method signature (as they appear currently, with no changes).

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

Commit messages:
 - Identify owning method for MethodTrainingData and CompileTrainingData in AOT map output

Changes: https://git.openjdk.org/jdk/pull/27740/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27740&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8369559
  Stats: 32 lines in 2 files changed: 32 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/27740.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27740/head:pull/27740

PR: https://git.openjdk.org/jdk/pull/27740


More information about the hotspot-runtime-dev mailing list