mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-04 18:55:22 +00:00
8354234: Remove friends for ObjectMonitor
Reviewed-by: aboldtch, dholmes
This commit is contained in:
parent
d4e194bc46
commit
36069f6efa
@ -148,9 +148,6 @@ class ObjectWaiter : public CHeapObj<mtThread> {
|
||||
#define OM_CACHE_LINE_SIZE DEFAULT_CACHE_LINE_SIZE
|
||||
|
||||
class ObjectMonitor : public CHeapObj<mtObjectMonitor> {
|
||||
friend class LightweightSynchronizer;
|
||||
friend class ObjectSynchronizer;
|
||||
friend class ObjectWaiter;
|
||||
friend class VMStructs;
|
||||
JVMCI_ONLY(friend class JVMCIVMStructs;)
|
||||
|
||||
@ -424,13 +421,12 @@ class ObjectMonitor : public CHeapObj<mtObjectMonitor> {
|
||||
bool short_fixed_spin(JavaThread* current, int spin_count, bool adapt);
|
||||
void exit_epilog(JavaThread* current, ObjectWaiter* Wakee);
|
||||
|
||||
public:
|
||||
// Deflation support
|
||||
bool deflate_monitor(Thread* current);
|
||||
private:
|
||||
void install_displaced_markword_in_object(const oop obj);
|
||||
|
||||
// JFR support
|
||||
public:
|
||||
static bool is_jfr_excluded(const Klass* monitor_klass);
|
||||
};
|
||||
|
||||
|
||||
@ -423,7 +423,8 @@ bool ObjectSynchronizer::quick_enter_legacy(oop obj, BasicLock* lock, JavaThread
|
||||
// Case: TLE inimical operations such as nested/recursive synchronization
|
||||
|
||||
if (m->has_owner(current)) {
|
||||
m->_recursions++;
|
||||
int recursions = m->recursions();
|
||||
m->set_recursions(++recursions);
|
||||
current->inc_held_monitor_count();
|
||||
return true;
|
||||
}
|
||||
@ -440,7 +441,7 @@ bool ObjectSynchronizer::quick_enter_legacy(oop obj, BasicLock* lock, JavaThread
|
||||
lock->set_displaced_header(markWord::unused_mark());
|
||||
|
||||
if (!m->has_owner() && m->try_set_owner(current)) {
|
||||
assert(m->_recursions == 0, "invariant");
|
||||
assert(m->recursions() == 0, "invariant");
|
||||
current->inc_held_monitor_count();
|
||||
return true;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user