--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ObjectMonitor.java Wed Apr 24 15:37:55 2019 +0200
+++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ObjectMonitor.java Wed Apr 24 10:20:25 2019 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -50,7 +50,7 @@
ownerFieldOffset = f.getOffset();
f = type.getField("FreeNext");
FreeNextFieldOffset = f.getOffset();
- countField = type.getJIntField("_count");
+ contentionsField = type.getJIntField("_contentions");
waitersField = type.getJIntField("_waiters");
recursionsField = type.getCIntegerField("_recursions");
}
@@ -87,19 +87,14 @@
// FIXME
// void set_queue(void* owner);
- public int count() { return countField.getValue(addr); }
- // FIXME
- // void set_count(int count);
-
public long recursions() { return recursionsField.getValue(addr); }
public OopHandle object() {
return addr.getOopHandleAt(objectFieldOffset);
}
- // contentions is always equal to count
public int contentions() {
- return count();
+ return contentionsField.getValue(addr);
}
// FIXME
@@ -114,7 +109,7 @@
private static long objectFieldOffset;
private static long ownerFieldOffset;
private static long FreeNextFieldOffset;
- private static JIntField countField;
+ private static JIntField contentionsField;
private static JIntField waitersField;
private static CIntegerField recursionsField;
// FIXME: expose platform-dependent stuff