src/hotspot/share/jfr/leakprofiler/chains/bfsClosure.cpp
changeset 57777 90ead0febf56
parent 55571 49102ba8cf14
child 57979 94481c2b9388
equal deleted inserted replaced
57774:21dccfac0ec5 57777:90ead0febf56
   129   }
   129   }
   130 
   130 
   131   if (!_mark_bits->is_marked(pointee)) {
   131   if (!_mark_bits->is_marked(pointee)) {
   132     _mark_bits->mark_obj(pointee);
   132     _mark_bits->mark_obj(pointee);
   133     // is the pointee a sample object?
   133     // is the pointee a sample object?
   134     if (NULL == pointee->mark()) {
   134     if (NULL == pointee->mark().to_pointer()) {
   135       add_chain(reference, pointee);
   135       add_chain(reference, pointee);
   136     }
   136     }
   137 
   137 
   138     // if we are processinig initial root set, don't add to queue
   138     // if we are processinig initial root set, don't add to queue
   139     if (_current_parent != NULL) {
   139     if (_current_parent != NULL) {
   146   }
   146   }
   147 }
   147 }
   148 
   148 
   149 void BFSClosure::add_chain(const oop* reference, const oop pointee) {
   149 void BFSClosure::add_chain(const oop* reference, const oop pointee) {
   150   assert(pointee != NULL, "invariant");
   150   assert(pointee != NULL, "invariant");
   151   assert(NULL == pointee->mark(), "invariant");
   151   assert(NULL == pointee->mark().to_pointer(), "invariant");
   152   Edge leak_edge(_current_parent, reference);
   152   Edge leak_edge(_current_parent, reference);
   153   _edge_store->put_chain(&leak_edge, _current_parent == NULL ? 1 : _current_frontier_level + 2);
   153   _edge_store->put_chain(&leak_edge, _current_parent == NULL ? 1 : _current_frontier_level + 2);
   154 }
   154 }
   155 
   155 
   156 void BFSClosure::dfs_fallback() {
   156 void BFSClosure::dfs_fallback() {