src/hotspot/share/jfr/leakprofiler/checkpoint/objectSampleWriter.cpp
changeset 58863 c16ac7a2eba4
parent 58132 caa25ab47aca
equal deleted inserted replaced
58861:2c3cc4b01880 58863:c16ac7a2eba4
   353   return 1;
   353   return 1;
   354 }
   354 }
   355 
   355 
   356 static traceid get_gc_root_description_info_id(const Edge& edge, traceid id) {
   356 static traceid get_gc_root_description_info_id(const Edge& edge, traceid id) {
   357   assert(edge.is_root(), "invariant");
   357   assert(edge.is_root(), "invariant");
   358   if (EdgeUtils::is_leak_edge(edge)) {
       
   359     return 0;
       
   360   }
       
   361 
       
   362   if (root_infos == NULL) {
   358   if (root_infos == NULL) {
   363     root_infos = new RootDescriptionInfo();
   359     root_infos = new RootDescriptionInfo();
   364   }
   360   }
   365   assert(root_infos != NULL, "invariant");
   361   assert(root_infos != NULL, "invariant");
   366   ObjectSampleRootDescriptionInfo* const oodi = new ObjectSampleRootDescriptionInfo();
   362   ObjectSampleRootDescriptionInfo* const oodi = new ObjectSampleRootDescriptionInfo();
   604 };
   600 };
   605 
   601 
   606 static void register_serializers() {
   602 static void register_serializers() {
   607   static bool is_registered = false;
   603   static bool is_registered = false;
   608   if (!is_registered) {
   604   if (!is_registered) {
   609     JfrSerializer::register_serializer(TYPE_OLDOBJECTROOTSYSTEM, false, true, new RootSystemType());
   605     JfrSerializer::register_serializer(TYPE_OLDOBJECTROOTSYSTEM, true, new RootSystemType());
   610     JfrSerializer::register_serializer(TYPE_OLDOBJECTROOTTYPE, false, true, new RootType());
   606     JfrSerializer::register_serializer(TYPE_OLDOBJECTROOTTYPE, true, new RootType());
   611     is_registered = true;
   607     is_registered = true;
   612   }
   608   }
   613 }
   609 }
   614 
   610 
   615 ObjectSampleWriter::ObjectSampleWriter(JfrCheckpointWriter& writer, EdgeStore* store) :
   611 ObjectSampleWriter::ObjectSampleWriter(JfrCheckpointWriter& writer, EdgeStore* store) :