OpenJDK / jdk / jdk
changeset 57080:6a897a8ef4af
8234433: TestUnloadEventClassCount fails with "assert(SafepointSynchronize::is_at_safepoint()) failed: invariant"
Reviewed-by: pliden
author | mgronlun |
---|---|
date | Mon, 25 Nov 2019 11:08:30 +0100 |
parents | fb1d9bf1be2b |
children | de882051f7a5 |
files | src/hotspot/share/jfr/jni/jfrGetAllEventClasses.cpp |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/hotspot/share/jfr/jni/jfrGetAllEventClasses.cpp Fri Nov 22 10:29:12 2019 +0100 +++ b/src/hotspot/share/jfr/jni/jfrGetAllEventClasses.cpp Mon Nov 25 11:08:30 2019 +0100 @@ -33,12 +33,11 @@ #include "memory/resourceArea.hpp" #include "runtime/handles.inline.hpp" #include "runtime/mutexLocker.hpp" -#include "runtime/safepoint.hpp" #include "runtime/thread.inline.hpp" #include "utilities/growableArray.hpp" #include "utilities/stack.inline.hpp" - // incremented during class unloading (safepoint) for each unloaded event class + // incremented during class unloading for each unloaded event class static jlong unloaded_event_classes = 0; jlong JfrEventClasses::unloaded_event_classes_count() { @@ -46,8 +45,7 @@ } void JfrEventClasses::increment_unloaded_event_class() { - // incremented during class unloading (safepoint) for each unloaded event class - assert(SafepointSynchronize::is_at_safepoint(), "invariant"); + assert_locked_or_safepoint(ClassLoaderDataGraph_lock); ++unloaded_event_classes; }