--- old/src/hotspot/share/prims/jvmtiTagMap.cpp 2018-03-20 11:59:01.631918323 -0700 +++ new/src/hotspot/share/prims/jvmtiTagMap.cpp 2018-03-20 11:59:01.518917990 -0700 @@ -55,7 +55,6 @@ #include "runtime/vframe.hpp" #include "runtime/vmThread.hpp" #include "runtime/vm_operations.hpp" -#include "services/serviceUtil.hpp" #include "utilities/macros.hpp" // JvmtiTagHashmapEntry @@ -1324,9 +1323,6 @@ // check if iteration has been halted if (is_iteration_aborted()) return; - // ignore any objects that aren't visible to profiler - if (!ServiceUtil::visible_oop(o)) return; - // instanceof check when filtering by klass if (klass() != NULL && !o->is_a(klass())) { return; @@ -1407,9 +1403,6 @@ // check if iteration has been halted if (is_iteration_aborted()) return; - // ignore any objects that aren't visible to profiler - if (!ServiceUtil::visible_oop(obj)) return; - // apply class filter if (is_filtered_by_klass_filter(obj, klass())) return; @@ -1987,8 +1980,6 @@ // invoke basic style heap root callback inline bool CallbackInvoker::invoke_basic_heap_root_callback(jvmtiHeapRootKind root_kind, oop obj) { - assert(ServiceUtil::visible_oop(obj), "checking"); - // if we heap roots should be reported jvmtiHeapRootCallback cb = basic_context()->heap_root_callback(); if (cb == NULL) { @@ -2016,8 +2007,6 @@ jmethodID method, int slot, oop obj) { - assert(ServiceUtil::visible_oop(obj), "checking"); - // if we stack refs should be reported jvmtiStackReferenceCallback cb = basic_context()->stack_ref_callback(); if (cb == NULL) { @@ -2048,9 +2037,6 @@ oop referree, jint index) { - assert(ServiceUtil::visible_oop(referrer), "checking"); - assert(ServiceUtil::visible_oop(referree), "checking"); - BasicHeapWalkContext* context = basic_context(); // callback requires the referrer's tag. If it's the same referrer @@ -2092,8 +2078,6 @@ // invoke advanced style heap root callback inline bool CallbackInvoker::invoke_advanced_heap_root_callback(jvmtiHeapReferenceKind ref_kind, oop obj) { - assert(ServiceUtil::visible_oop(obj), "checking"); - AdvancedHeapWalkContext* context = advanced_context(); // check that callback is provided @@ -2148,8 +2132,6 @@ jlocation bci, jint slot, oop obj) { - assert(ServiceUtil::visible_oop(obj), "checking"); - AdvancedHeapWalkContext* context = advanced_context(); // check that callback is provider @@ -2223,9 +2205,6 @@ // field index is only valid field in reference_info static jvmtiHeapReferenceInfo reference_info = { 0 }; - assert(ServiceUtil::visible_oop(referrer), "checking"); - assert(ServiceUtil::visible_oop(obj), "checking"); - AdvancedHeapWalkContext* context = advanced_context(); // check that callback is provider @@ -2279,7 +2258,6 @@ inline bool CallbackInvoker::report_simple_root(jvmtiHeapReferenceKind kind, oop obj) { assert(kind != JVMTI_HEAP_REFERENCE_STACK_LOCAL && kind != JVMTI_HEAP_REFERENCE_JNI_LOCAL, "not a simple root"); - assert(ServiceUtil::visible_oop(obj), "checking"); if (is_basic_heap_walk()) { // map to old style root kind @@ -2604,13 +2582,6 @@ } } - // some objects are ignored - in the case of simple - // roots it's mostly Symbol*s that we are skipping - // here. - if (!ServiceUtil::visible_oop(o)) { - return; - } - // invoke the callback _continue = CallbackInvoker::report_simple_root(kind, o); @@ -2651,10 +2622,6 @@ return; } - if (!ServiceUtil::visible_oop(o)) { - return; - } - // invoke the callback _continue = CallbackInvoker::report_jni_local_root(_thread_tag, _tid, _depth, _method, o); } @@ -2982,7 +2949,7 @@ if (!is_primitive_field_type(type)) { oop fld_o = o->obj_field(field->field_offset()); // ignore any objects that aren't visible to profiler - if (fld_o != NULL && ServiceUtil::visible_oop(fld_o)) { + if (fld_o != NULL) { assert(Universe::heap()->is_in_reserved(fld_o), "unsafe code should not " "have references to Klass* anymore"); int slot = field->field_index();