RFR (M): 8217778: StringTable cleanup miscalculates amount of dead objects

Kim Barrett kim.barrett at oracle.com
Tue Jan 29 04:02:14 UTC 2019


> On Jan 28, 2019, at 4:46 PM, coleen.phillimore at oracle.com wrote:
> 
> 
> Hi Thomas,  Can you forward the review thread for JDK-8213229?
> 
> I wonder if we could just trigger_unloading after any GC has run and ignore dead string counts.  Are they ever zero?

We’re trying to only trigger the ServiceThread’s StringTable cleanup when there
are enough nulled-out entries to make it worth the effort.  My guess would be that
interned strings rarely die young.  In which case that approach would probably
trigger the ServiceThread unnecessarily frequently.  Maybe instead avoid the
counting and unconditionally trigger after a (possibly concurrent) full collection?
That doesn’t do so well for the (possibly rare?) application that does frequently
intern and then drop strings though.  Or don’t trigger the ServiceThread more
often than some (perhaps configurable?  Ugh!  A new CLOption) frequency.

Also, I wonder if the SymbolTable has the same miscalculation.  The SymbolTable
code was somewhat cribbed from StringTable, after all.




More information about the hotspot-gc-dev mailing list