RFR: 8260630: Templatize literal_size

Coleen Phillimore coleenp at openjdk.java.net
Fri Jan 29 14:05:43 UTC 2021


On Fri, 29 Jan 2021 08:44:51 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

> Please review a couple of small cleanups in Hashtable support.
> 
> (1) Replace some "default" overloads for literal_size with a template.  This
> makes it easier to add new Hashtable value types whose sizes aren't
> interesting for statistics printout.
> 
> (2) Trivial change to remove no longer used instantiation of Hashtable
> support for oop values.
> 
> Testing:
> mach5 tier1

Looks good!

src/hotspot/share/utilities/hashtable.cpp line 241:

> 239: }
> 240: 
> 241: #ifndef PRODUCT

I wrote that.  Thanks for fixing this!

src/hotspot/share/utilities/hashtable.cpp line 120:

> 118: }
> 119: 
> 120: static int literal_size(oop obj) {

Is literal_size(oop) still needed?

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

Marked as reviewed by coleenp (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/2310


More information about the hotspot-dev mailing list