--- a/src/hotspot/share/runtime/safepoint.cpp Tue Jul 02 14:02:32 2019 -0700
+++ b/src/hotspot/share/runtime/safepoint.cpp Tue Jul 02 18:24:47 2019 -0400
@@ -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 @@
}
}
+ 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);
}
};