--- a/src/hotspot/share/c1/c1_Runtime1.cpp Thu Oct 17 20:27:44 2019 +0100
+++ b/src/hotspot/share/c1/c1_Runtime1.cpp Thu Oct 17 20:53:35 2019 +0100
@@ -37,6 +37,7 @@
#include "code/pcDesc.hpp"
#include "code/scopeDesc.hpp"
#include "code/vtableStubs.hpp"
+#include "compiler/compilationPolicy.hpp"
#include "compiler/disassembler.hpp"
#include "gc/shared/barrierSet.hpp"
#include "gc/shared/c1/barrierSetC1.hpp"
@@ -55,7 +56,6 @@
#include "oops/oop.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/biasedLocking.hpp"
-#include "runtime/compilationPolicy.hpp"
#include "runtime/fieldDescriptor.inline.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/handles.inline.hpp"
@@ -294,6 +294,12 @@
if (entry == entry_for((StubID)id)) return name_for((StubID)id);
}
+ BarrierSetC1* bsc1 = BarrierSet::barrier_set()->barrier_set_c1();
+ const char* name = bsc1->rtcall_name_for_address(entry);
+ if (name != NULL) {
+ return name;
+ }
+
#define FUNCTION_CASE(a, f) \
if ((intptr_t)a == CAST_FROM_FN_PTR(intptr_t, f)) return #f
@@ -699,19 +705,11 @@
Atomic::inc(BiasedLocking::slow_path_entry_count_addr());
}
Handle h_obj(thread, obj);
- if (UseBiasedLocking) {
- // Retry fast entry if bias is revoked to avoid unnecessary inflation
- ObjectSynchronizer::fast_enter(h_obj, lock->lock(), true, CHECK);
- } else {
- if (UseFastLocking) {
- // When using fast locking, the compiled code has already tried the fast case
- assert(obj == lock->obj(), "must match");
- ObjectSynchronizer::slow_enter(h_obj, lock->lock(), THREAD);
- } else {
- lock->set_obj(obj);
- ObjectSynchronizer::fast_enter(h_obj, lock->lock(), false, THREAD);
- }
+ if (!UseFastLocking) {
+ lock->set_obj(obj);
}
+ assert(obj == lock->obj(), "must match");
+ ObjectSynchronizer::enter(h_obj, lock->lock(), THREAD);
JRT_END
@@ -724,12 +722,7 @@
oop obj = lock->obj();
assert(oopDesc::is_oop(obj), "must be NULL or an object");
- if (UseFastLocking) {
- // When using fast locking, the compiled code has already tried the fast case
- ObjectSynchronizer::slow_exit(obj, lock->lock(), THREAD);
- } else {
- ObjectSynchronizer::fast_exit(obj, lock->lock(), THREAD);
- }
+ ObjectSynchronizer::exit(obj, lock->lock(), THREAD);
JRT_END
// Cf. OptoRuntime::deoptimize_caller_frame