RFR: 8369418: Identify owning class for KlassTrainingData in AOT map output
Ioi Lam
iklam at openjdk.org
Thu Oct 9 16:43:51 UTC 2025
On Thu, 9 Oct 2025 07:32:17 GMT, María Arias de Reyna Domínguez <duke at openjdk.org> wrote:
> Contains patches for: https://bugs.openjdk.org/browse/JDK-8363440
> Fixes: https://bugs.openjdk.org/browse/JDK-8369418
>
> Right now, the AOT Map displays the KlassTrainingData like this:
>
>
> 0x00000008002aa5e0: @@ KlassTrainingData 40
> 0x00000008002ac260: @@ KlassTrainingData 40
>
>
> which doesn't provide any context on what class is this training for.
>
> Modify the AOT Map Logger so we can link the class to its training data:
>
>
> 0x00000008007d5940: @@ KlassTrainingData 40 jdk.internal.loader.BuiltinClassLoader
> 0x0000000800815398: @@ KlassTrainingData 40 java.lang.invoke.DirectMethodHandle
> 0x00000008008791f0: @@ KlassTrainingData 40 java.util.HashSet
> 0x00000008008bd980: @@ KlassTrainingData 40 java.lang.module.ModuleDescriptor$Exports
> 0x00000008008db8e8: @@ KlassTrainingData 40 java.lang.invoke.InvokerBytecodeGenerator
src/hotspot/share/cds/aotMapLogger.hpp line 32:
> 30: #include "memory/allStatic.hpp"
> 31: #include "oops/oopsHierarchy.hpp"
> 32: #include "oops/trainingData.hpp"
I header files, if a type can be forward declared, we usually do not include the its header. In this case, we can use:
class KlassTrainingData;
instead.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27715#discussion_r2417353670
More information about the hotspot-runtime-dev
mailing list