< prev index next >

src/hotspot/share/runtime/safepoint.cpp

Print this page
@@ -46,10 +46,11 @@
  #include "memory/resourceArea.hpp"
  #include "memory/universe.hpp"
  #include "oops/oop.inline.hpp"
  #include "oops/symbol.hpp"
  #include "runtime/atomic.hpp"
+ #include "runtime/continuation.hpp"
  #include "runtime/deoptimization.hpp"
  #include "runtime/frame.inline.hpp"
  #include "runtime/handles.inline.hpp"
  #include "runtime/interfaceSupport.inline.hpp"
  #include "runtime/mutexLocker.hpp"

@@ -590,10 +591,18 @@
        // Don't bother reporting event or time for this very short operation.
        // To have any utility we'd also want to report whether needed.
        OopStorage::trigger_cleanup_if_needed();
      }
  
+     if (_subtasks.try_claim_task(SafepointSynchronize::SAFEPOINT_CLEANUP_KEEPALIVES)) {
+       const char* name = "cleaning keepalive jweak handles";
+       EventSafepointCleanupTask event;
+       TraceTime timer(name, TRACETIME_LOG(Info, safepoint, cleanup));
+ 
+       post_safepoint_cleanup_task_event(event, SafepointSynchronize::safepoint_id(), name);
+     }
+ 
      _subtasks.all_tasks_claimed();
    }
  };
  
  // Various cleaning tasks that should be done periodically at safepoints.
< prev index next >