RFR 8214449: Make alt_hash a regular immutable member of inner hash table

coleen.phillimore at oracle.com coleen.phillimore at oracle.com
Mon Dec 3 20:07:33 UTC 2018



On 12/1/18 12:28 PM, Gerard Ziemski wrote:
> Hi all,
>
> Please review this followup to JDK-8195100 (Use a low latency hashtable for SymbolTable)
>
> Here we make the “_alt_hash” an immutable and regular field (i.e. non static) of the inner hashtable, to avoid manipulating it from outside and possibly getting it wrong.

+class SymbolTableHash : public SymbolTableHashClass {
+
+private:
+ bool _alt_hash;
+
+public:
+ SymbolTableHash(size_t log2size, size_t log2size_limit, size_t 
grow_hint, bool alt_hash = false) :
+ ConcurrentHashTable(log2size, log2size_limit, grow_hint) { } ;
+ bool get_alt_hash() { return _alt_hash; } ;
+};


Can you rename _alt_hash member and get_alt_hash to _has_alt_hash and 
hash_alt_hash() respectively?

Also indent the ConcurrentHashTable constructor call here.

Otherwise it looks like a reasonable change.

thanks,
Coleen


>
> This issue affects both Symbol and String hashtable.
>
> Issue:   https://bugs.openjdk.java.net/browse/JDK-8214449
> Webrev:  http://cr.openjdk.java.net/~gziemski/8214449_rev1
> Testing: Mach5 hs_tier1,2,3,4,5
>
>
> Cheers



More information about the hotspot-runtime-dev mailing list