RFR(XXS): 8234433: TestUnloadEventClassCount fails with "assert(SafepointSynchronize::is_at_safepoint()) failed: invariant"
Per Liden
per.liden at oracle.com
Thu Nov 21 11:04:55 UTC 2019
Looks good to me! Thanks for fixing!
I manually ran the affected test with ZGC and it passes with your patch.
/Per
On 11/21/19 11:26 AM, Markus Gronlund wrote:
> Hi,
>
> Please help review this small change:
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8234433
> Webrev: http://cr.openjdk.java.net/~mgronlun/8234433/webrev/
> Diff:
>
> diff -r 7567ce83f3b5 -r f48ca1c7feda src/hotspot/share/jfr/jni/jfrGetAllEventClasses.cpp
> --- a/src/hotspot/share/jfr/jni/jfrGetAllEventClasses.cpp Thu Nov 21 13:50:11 2019 +0530
> +++ b/src/hotspot/share/jfr/jni/jfrGetAllEventClasses.cpp Thu Nov 21 11:13:34 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;
> }
>
> Thanks
> Markus
>
More information about the hotspot-jfr-dev
mailing list