RFR: 8329488: Move OopStorage code from safepoint cleanup and remove safepoint cleanup code

Coleen Phillimore coleenp at openjdk.org
Mon Apr 8 16:51:59 UTC 2024


On Sat, 6 Apr 2024 13:21:45 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> This patch gives the ServiceThread a periodic wakeup (same as GuaranteedSafepointInterval) to check if it needs to clean out OopStorage blocks, and move the triggering of this cleaning out of the safepoint cleanup tasks.  Since ICBuffer, StringTable and SymbolTable rehashing have moved, there's nothing that actually triggers the nop safepoint to do cleaning (except SafepointALot), so the OopStorage cleanup won't be triggered.
>> 
>> With moving all of these out of the safepoint cleanup tasks, we can remove the code that sets up multiple threads to do safepoint cleanup.  We can also remove the JFR events and logging that times safepoint cleanup, and a logging test.
>> 
>> Tested with tier1-4.
>
> src/hotspot/share/runtime/serviceThread.cpp line 130:
> 
>> 128:              ) == 0) {
>> 129:         // Wait until notified that there is some work to do or timer expires.
>> 130:         // OopStorage work needs to be done at periodic intervals.
> 
> Rather than calling out OopStorage here, maybe just say some cleanup requests don't notify the
> ServiceThread, instead relying on it to run periodically.  After this change we might want to audit
> other cleanup requests and decide if they actually need to notify the ServiceThread in order to get a
> more prompt response, or could just wait for the next periodic wakeup.

I reworded the comment.  Some might make sense on a periodic timer. Not sure about others.  The ones that trigger more are the StringTable and SymbolTable.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18375#discussion_r1556143620


More information about the hotspot-dev mailing list