8189360: JvmtiExport::weak_oops_do is called for all JNIHandleBlock instances

Reviewed-by: pliden, kbarrett, sspitsyn
This commit is contained in:
Stefan Karlsson 2017-10-18 21:15:01 +02:00
parent 3fbc4aec64
commit 6e571871e6
2 changed files with 4 additions and 8 deletions

View File

@ -24,10 +24,13 @@
#include "precompiled.hpp"
#include "gc/shared/weakProcessor.hpp"
#include "prims/jvmtiExport.hpp"
#include "runtime/jniHandles.hpp"
void WeakProcessor::weak_oops_do(BoolObjectClosure* is_alive, OopClosure* keep_alive, VoidClosure* complete) {
JNIHandles::weak_oops_do(is_alive, keep_alive);
JvmtiExport::weak_oops_do(is_alive, keep_alive);
if (complete != NULL) {
complete->do_void();
}
@ -35,5 +38,5 @@ void WeakProcessor::weak_oops_do(BoolObjectClosure* is_alive, OopClosure* keep_a
void WeakProcessor::oops_do(OopClosure* closure) {
AlwaysTrueClosure always_true;
JNIHandles::weak_oops_do(&always_true, closure);
weak_oops_do(&always_true, closure, NULL);
}

View File

@ -27,7 +27,6 @@
#include "logging/log.hpp"
#include "memory/iterator.hpp"
#include "oops/oop.inline.hpp"
#include "prims/jvmtiExport.hpp"
#include "runtime/jniHandles.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/thread.inline.hpp"
@ -424,12 +423,6 @@ void JNIHandleBlock::weak_oops_do(BoolObjectClosure* is_alive,
break;
}
}
/*
* JVMTI data structures may also contain weak oops. The iteration of them
* is placed here so that we don't need to add it to each of the collectors.
*/
JvmtiExport::weak_oops_do(is_alive, f);
}