8226366: Excessive ServiceThread wakeups for OopStorage cleanup

Drive wakes via safepoint cleanups with interval minimums.

Reviewed-by: coleenp, tschatzl
This commit is contained in:
Kim Barrett 2019-07-02 18:24:47 -04:00
parent f99eec9c0d
commit ae6dee44ed
5 changed files with 117 additions and 84 deletions

View file

@ -35,6 +35,7 @@
#include "code/scopeDesc.hpp"
#include "gc/shared/collectedHeap.hpp"
#include "gc/shared/gcLocker.hpp"
#include "gc/shared/oopStorage.hpp"
#include "gc/shared/strongRootsScope.hpp"
#include "gc/shared/workgroup.hpp"
#include "interpreter/interpreter.hpp"
@ -643,6 +644,12 @@ public:
}
}
if (_subtasks.try_claim_task(SafepointSynchronize::SAFEPOINT_CLEANUP_REQUEST_OOPSTORAGE_CLEANUP)) {
// Don't bother reporting event or time for this very short operation.
// To have any utility we'd also want to report whether needed.
OopStorage::trigger_cleanup_if_needed();
}
_subtasks.all_tasks_completed(_num_workers);
}
};