src/hotspot/share/jfr/jni/jfrGetAllEventClasses.cpp
changeset 59244 6a897a8ef4af
parent 54847 59ea39bb2809
equal deleted inserted replaced
59243:fb1d9bf1be2b 59244:6a897a8ef4af
    31 #include "oops/instanceKlass.hpp"
    31 #include "oops/instanceKlass.hpp"
    32 #include "memory/allocation.inline.hpp"
    32 #include "memory/allocation.inline.hpp"
    33 #include "memory/resourceArea.hpp"
    33 #include "memory/resourceArea.hpp"
    34 #include "runtime/handles.inline.hpp"
    34 #include "runtime/handles.inline.hpp"
    35 #include "runtime/mutexLocker.hpp"
    35 #include "runtime/mutexLocker.hpp"
    36 #include "runtime/safepoint.hpp"
       
    37 #include "runtime/thread.inline.hpp"
    36 #include "runtime/thread.inline.hpp"
    38 #include "utilities/growableArray.hpp"
    37 #include "utilities/growableArray.hpp"
    39 #include "utilities/stack.inline.hpp"
    38 #include "utilities/stack.inline.hpp"
    40 
    39 
    41  // incremented during class unloading (safepoint) for each unloaded event class
    40  // incremented during class unloading for each unloaded event class
    42 static jlong unloaded_event_classes = 0;
    41 static jlong unloaded_event_classes = 0;
    43 
    42 
    44 jlong JfrEventClasses::unloaded_event_classes_count() {
    43 jlong JfrEventClasses::unloaded_event_classes_count() {
    45   return unloaded_event_classes;
    44   return unloaded_event_classes;
    46 }
    45 }
    47 
    46 
    48 void JfrEventClasses::increment_unloaded_event_class() {
    47 void JfrEventClasses::increment_unloaded_event_class() {
    49   // incremented during class unloading (safepoint) for each unloaded event class
    48   assert_locked_or_safepoint(ClassLoaderDataGraph_lock);
    50   assert(SafepointSynchronize::is_at_safepoint(), "invariant");
       
    51   ++unloaded_event_classes;
    49   ++unloaded_event_classes;
    52 }
    50 }
    53 
    51 
    54 static jobject empty_java_util_arraylist = NULL;
    52 static jobject empty_java_util_arraylist = NULL;
    55 
    53