RFR: 8344445: MethodCounters don't need a vptr

Dean Long dlong at openjdk.org
Tue Nov 19 02:59:43 UTC 2024


On Mon, 18 Nov 2024 20:37:45 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

> This is a somewhat trivial change to make MethodCounters inherit from MetaspaceObj so that they don't have any virtual functions (and vptrs).  They're just a bunch of ints.
> 
> Tested with tier1-4.

Marked as reviewed by dlong (Reviewer).

src/hotspot/share/oops/methodCounters.hpp line 61:

> 59:   void deallocate_contents(ClassLoaderData* loader_data) {}
> 60: 
> 61:   void metaspace_pointers_do(MetaspaceClosure* it) { return; }

Does it change the behavior if we remove this along with
` it->push(&_method_counters);`
in Method::metaspace_pointers_do?

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

PR Review: https://git.openjdk.org/jdk/pull/22220#pullrequestreview-2444181429
PR Review Comment: https://git.openjdk.org/jdk/pull/22220#discussion_r1847569440


More information about the hotspot-dev mailing list