RFR: 8373114: Redundant MethodCounters in the preimage generated by training run [v2]
Ioi Lam
iklam at openjdk.org
Wed Dec 10 06:38:26 UTC 2025
On Tue, 9 Dec 2025 02:34:01 GMT, Ashutosh Mehra <asmehra at openjdk.org> wrote:
> Another approach I thought of was to add the filtering in `ArchiveBuilder::get_follow_mode` such that only the MethodCounters referenced by MTDs are stored in the AOTCache. It is possible to get the enclosing MetaspaceObj for the `MetaspaceClosure::Ref` passed to `get_follow_mode` but I couldn't find an easy way to get the type of the enclosing object, which makes it difficult to check if the MethodCounters being added came from Method or MTD.
Hi Ashutosh, I've created a patch for finding the type of the enclosing obj:
https://github.com/iklam/jdk/commit/cef9437484e119fde1b4eb07a809b33d83e35bdd
Could you try to see if that works for you?
Thanks
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28670#issuecomment-3635611525
More information about the hotspot-dev
mailing list