--- a/hotspot/src/share/vm/memory/gcLocker.hpp Fri Mar 28 14:15:03 2014 +0100
+++ b/hotspot/src/share/vm/memory/gcLocker.hpp Thu Feb 13 10:05:03 2014 +0100
@@ -54,8 +54,6 @@
// safepointing and decremented during the slow path of GC_locker
// unlocking.
static volatile jint _jni_lock_count; // number of jni active instances.
-
- static volatile jint _lock_count; // number of other active instances
static volatile bool _needs_gc; // heap is filling, we need a GC
// note: bool is typedef'd as jint
static volatile bool _doing_gc; // unlock_critical() is doing a GC
@@ -66,12 +64,6 @@
static volatile jint _debug_jni_lock_count;
#endif
- // Accessors
- static bool is_jni_active() {
- assert(_needs_gc, "only valid when _needs_gc is set");
- return _jni_lock_count > 0;
- }
-
// At a safepoint, visit all threads and count the number of active
// critical sections. This is used to ensure that all active
// critical sections are exited before a new one is started.
@@ -82,7 +74,7 @@
static bool is_active_internal() {
verify_critical_count();
- return _lock_count > 0 || _jni_lock_count > 0;
+ return _jni_lock_count > 0;
}
public:
@@ -132,10 +124,6 @@
// not a stable predicate.
static void stall_until_clear();
- // Non-structured GC locking: currently needed for JNI. Use with care!
- static void lock();
- static void unlock();
-
// The following two methods are used for JNI critical regions.
// If we find that we failed to perform a GC because the GC_locker
// was active, arrange for one as soon as possible by allowing