< prev index next >

src/hotspot/share/jfr/leakprofiler/checkpoint/objectSampleCheckpoint.cpp

Print this page
@@ -82,14 +82,14 @@
      unloaded_thread_id_set = c_heap_allocate_array<traceid>();
    }
    JfrMutablePredicate<traceid, compare_traceid>::test(unloaded_thread_id_set, tid);
  }
  
- void ObjectSampleCheckpoint::on_thread_exit(JavaThread* jt) {
-   assert(jt != NULL, "invariant");
+ void ObjectSampleCheckpoint::on_thread_exit(traceid tid) {
+   assert(tid != 0, "invariant");
    if (LeakProfiler::is_running()) {
-     add_to_unloaded_thread_set(jt->jfr_thread_local()->thread_id());
+     add_to_unloaded_thread_set(tid);
    }
  }
  
  void ObjectSampleCheckpoint::clear() {
    assert(SafepointSynchronize::is_at_safepoint(), "invariant");

@@ -327,11 +327,11 @@
    }
  }
  
  static void write_thread_blob(const ObjectSample* sample, JfrCheckpointWriter& writer, bool reset) {
    assert(sample->has_thread(), "invariant");
-   if (has_thread_exited(sample->thread_id())) {
+   if (sample->is_virtual_thread() || has_thread_exited(sample->thread_id())) {
      write_blob(sample->thread(), writer, reset);
    }
  }
  
  static void write_stacktrace_blob(const ObjectSample* sample, JfrCheckpointWriter& writer, bool reset) {
< prev index next >