< prev index next >

src/hotspot/share/prims/jvmtiTagMap.cpp

Print this page

        

@@ -53,11 +53,10 @@
 #include "runtime/thread.inline.hpp"
 #include "runtime/threadSMR.hpp"
 #include "runtime/vframe.hpp"
 #include "runtime/vmThread.hpp"
 #include "runtime/vm_operations.hpp"
-#include "services/serviceUtil.hpp"
 #include "utilities/macros.hpp"
 
 // JvmtiTagHashmapEntry
 //
 // Each entry encapsulates a reference to the tagged object

@@ -1322,13 +1321,10 @@
 // invoked for each object in the heap
 void IterateOverHeapObjectClosure::do_object(oop o) {
   // 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;
   }
   // prepare for the calllback

@@ -1405,13 +1401,10 @@
 // invoked for each object in the heap
 void IterateThroughHeapObjectClosure::do_object(oop obj) {
   // 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;
 
   // prepare for callback
   CallbackWrapper wrapper(tag_map(), obj);

@@ -1985,12 +1978,10 @@
 }
 
 
 // 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) {
     return check_for_visit(obj);
   }

@@ -2014,12 +2005,10 @@
                                                              jlong thread_tag,
                                                              jint depth,
                                                              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) {
     return check_for_visit(obj);
   }

@@ -2046,13 +2035,10 @@
 inline bool CallbackInvoker::invoke_basic_object_reference_callback(jvmtiObjectReferenceKind ref_kind,
                                                                     oop referrer,
                                                                     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
   // as the last call then we use the cached value.
   jlong referrer_tag;

@@ -2090,12 +2076,10 @@
 }
 
 // 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
   jvmtiHeapReferenceCallback cb = context->heap_reference_callback();
   if (cb == NULL) {

@@ -2146,12 +2130,10 @@
                                                                 int depth,
                                                                 jmethodID method,
                                                                 jlocation bci,
                                                                 jint slot,
                                                                 oop obj) {
-  assert(ServiceUtil::visible_oop(obj), "checking");
-
   AdvancedHeapWalkContext* context = advanced_context();
 
   // check that callback is provider
   jvmtiHeapReferenceCallback cb = context->heap_reference_callback();
   if (cb == NULL) {

@@ -2221,13 +2203,10 @@
                                                                        jint index)
 {
   // 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
   jvmtiHeapReferenceCallback cb = context->heap_reference_callback();
   if (cb == NULL) {

@@ -2277,11 +2256,10 @@
 
 // report a "simple root"
 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
     jvmtiHeapRootKind root_kind = toJvmtiHeapRootKind(kind);
     return invoke_basic_heap_root_callback(root_kind, obj);

@@ -2602,17 +2580,10 @@
       if (!o->is_instance() || !InstanceKlass::cast(o->klass())->is_mirror_instance_klass()) {
         kind = JVMTI_HEAP_REFERENCE_OTHER;
       }
     }
 
-    // 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);
 
   }
   virtual void do_oop(narrowOop* obj_p) { ShouldNotReachHere(); }

@@ -2649,14 +2620,10 @@
     // ignore null
     if (o == NULL) {
       return;
     }
 
-    if (!ServiceUtil::visible_oop(o)) {
-      return;
-    }
-
     // invoke the callback
     _continue = CallbackInvoker::report_jni_local_root(_thread_tag, _tid, _depth, _method, o);
   }
   virtual void do_oop(narrowOop* obj_p) { ShouldNotReachHere(); }
 };

@@ -2980,11 +2947,11 @@
     ClassFieldDescriptor* field = field_map->field_at(i);
     char type = field->field_type();
     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();
         if (!CallbackInvoker::report_field_reference(o, fld_o, slot)) {
           return false;
< prev index next >