8265984: Concurrent GC: Some tests fail "assert(is_frame_safe(f)) fai… · openjdk/jdk@194bcec (original) (raw)
1
1
`/*
`
2
``
`-
- Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
`
``
2
`+
- Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
`
3
3
` * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
`
4
4
` *
`
5
5
` * This code is free software; you can redistribute it and/or modify it
`
29
29
`#include "gc/z/zNMethod.hpp"
`
30
30
`#include "gc/z/zThreadLocalData.hpp"
`
31
31
`#include "logging/log.hpp"
`
``
32
`+
#include "runtime/threadWXSetters.inline.hpp"
`
32
33
``
33
34
`bool ZBarrierSetNMethod::nmethod_entry_barrier(nmethod* nm) {
`
34
35
` ZLocker locker(ZNMethod::lock_for_nmethod(nm));
`
`@@ -40,6 +41,8 @@ bool ZBarrierSetNMethod::nmethod_entry_barrier(nmethod* nm) {
`
40
41
`return true;
`
41
42
` }
`
42
43
``
``
44
`+
MACOS_AARCH64_ONLY(ThreadWXEnable wx(WXWrite, Thread::current()));
`
``
45
+
43
46
`if (nm->is_unloading()) {
`
44
47
`// We don't need to take the lock when unlinking nmethods from
`
45
48
`// the Method, because it is only concurrently unlinked by
`