8228630: Remove always true parameter to NoSafepointVerifier

Also remove NoGCVerifier since NoSafepointVerifier covers GC checking when not already at a safepoint and is a stronger check.

Reviewed-by: kbarrett, dholmes
This commit is contained in:
Coleen Phillimore 2019-07-31 06:54:50 -04:00
parent 9ad5641ce5
commit ab9aab646b
11 changed files with 69 additions and 226 deletions

View file

@ -327,7 +327,7 @@ class ThreadInVMfromJavaNoAsyncException : public ThreadStateTransition {
}
};
// Debug class instantiated in JRT_ENTRY and ITR_ENTRY macro.
// Debug class instantiated in JRT_ENTRY macro.
// Can be used to verify properties on enter/exit of the VM.
#ifdef ASSERT
@ -340,45 +340,17 @@ class VMEntryWrapper {
class VMNativeEntryWrapper {
public:
VMNativeEntryWrapper() {
if (GCALotAtAllSafepoints) InterfaceSupport::check_gc_alot();
}
~VMNativeEntryWrapper() {
if (GCALotAtAllSafepoints) InterfaceSupport::check_gc_alot();
}
VMNativeEntryWrapper();
~VMNativeEntryWrapper();
};
#endif
// VM-internal runtime interface support
// Definitions for JRT (Java (Compiler/Shared) Runtime)
// JRT_LEAF currently can be called from either _thread_in_Java or
// _thread_in_native mode. In _thread_in_native, it is ok
// for another thread to trigger GC. The rest of the JRT_LEAF
// rules apply.
class JRTLeafVerifier : public NoSafepointVerifier {
static bool should_verify_GC();
public:
#ifdef ASSERT
JRTLeafVerifier();
~JRTLeafVerifier();
#else
JRTLeafVerifier() {}
~JRTLeafVerifier() {}
#endif
};
#ifdef ASSERT
class RuntimeHistogramElement : public HistogramElement {
public:
RuntimeHistogramElement(const char* name);
};
#endif // ASSERT
#ifdef ASSERT
#define TRACE_CALL(result_type, header) \
InterfaceSupport::_number_of_calls++; \
if (CountRuntimeCalls) { \
@ -388,7 +360,7 @@ class RuntimeHistogramElement : public HistogramElement {
#else
#define TRACE_CALL(result_type, header) \
/* do nothing */
#endif
#endif // ASSERT
// LEAF routines do not lock, GC or throw exceptions
@ -434,11 +406,24 @@ class RuntimeHistogramElement : public HistogramElement {
VM_ENTRY_BASE(result_type, header, thread) \
debug_only(VMEntryWrapper __vew;)
// JRT_LEAF currently can be called from either _thread_in_Java or
// _thread_in_native mode.
//
// JRT_LEAF rules:
// A JRT_LEAF method may not interfere with safepointing by
// 1) acquiring or blocking on a Mutex or JavaLock - checked
// 2) allocating heap memory - checked
// 3) executing a VM operation - checked
// 4) executing a system call (including malloc) that could block or grab a lock
// 5) invoking GC
// 6) reaching a safepoint
// 7) running too long
// Nor may any method it calls.
#define JRT_LEAF(result_type, header) \
result_type header { \
VM_LEAF_BASE(result_type, header) \
debug_only(JRTLeafVerifier __jlv;)
debug_only(NoSafepointVerifier __nsv;)
#define JRT_ENTRY_NO_ASYNC(result_type, header) \