8247319: Remove on-stack nmethod hotness counter sampling from safepoints

Reviewed-by: kvn, dholmes
This commit is contained in:
Erik Österlund 2020-06-23 11:59:13 +00:00
parent a10a9284c1
commit 2765410a28
5 changed files with 5 additions and 47 deletions

View file

@ -502,12 +502,10 @@ bool SafepointSynchronize::is_cleanup_needed() {
class ParallelSPCleanupThreadClosure : public ThreadClosure {
private:
CodeBlobClosure* _nmethod_cl;
DeflateMonitorCounters* _counters;
public:
ParallelSPCleanupThreadClosure(DeflateMonitorCounters* counters) :
_nmethod_cl(UseCodeAging ? NMethodSweeper::prepare_reset_hotness_counters() : NULL),
_counters(counters) {}
void do_thread(Thread* thread) {
@ -516,11 +514,6 @@ public:
// there is a special cleanup request, deflation is handled now.
// Otherwise, async deflation is requested via a flag.
ObjectSynchronizer::deflate_thread_local_monitors(thread, _counters);
if (_nmethod_cl != NULL && thread->is_Java_thread() &&
! thread->is_Code_cache_sweeper_thread()) {
JavaThread* jt = (JavaThread*) thread;
jt->nmethods_do(_nmethod_cl);
}
}
};