--- a/hotspot/src/share/vm/prims/jni.cpp Wed Nov 25 04:51:32 2015 +0000
+++ b/hotspot/src/share/vm/prims/jni.cpp Wed Nov 25 06:33:28 2015 +0000
@@ -261,19 +261,6 @@
Histogram* JNIHistogram;
static volatile jint JNIHistogram_lock = 0;
- class JNITraceWrapper : public StackObj {
- public:
- JNITraceWrapper(const char* format, ...) ATTRIBUTE_PRINTF(2, 3) {
- if (TraceJNICalls) {
- va_list ap;
- va_start(ap, format);
- tty->print("JNI ");
- tty->vprint_cr(format, ap);
- va_end(ap);
- }
- }
- };
-
class JNIHistogramElement : public HistogramElement {
public:
JNIHistogramElement(const char* name);
@@ -305,7 +292,7 @@
static JNIHistogramElement* e = new JNIHistogramElement(arg); \
/* There is a MT-race condition in VC++. So we need to make sure that that e has been initialized */ \
if (e != NULL) e->increment_count()
- #define JNIWrapper(arg) JNICountWrapper(arg); JNITraceWrapper(arg)
+ #define JNIWrapper(arg) JNICountWrapper(arg);
#else
#define JNIWrapper(arg)
#endif
@@ -3759,7 +3746,7 @@
void quicken_jni_functions() {
// Replace Get<Primitive>Field with fast versions
if (UseFastJNIAccessors && !JvmtiExport::can_post_field_access()
- && !VerifyJNIFields && !TraceJNICalls && !CountJNICalls && !CheckJNICalls
+ && !VerifyJNIFields && !CountJNICalls && !CheckJNICalls
#if defined(_WINDOWS) && defined(IA32) && defined(COMPILER2)
// windows x86 currently needs SEH wrapper and the gain of the fast
// versions currently isn't certain for server vm on uniprocessor.
--- a/hotspot/src/share/vm/prims/jvm.cpp Wed Nov 25 04:51:32 2015 +0000
+++ b/hotspot/src/share/vm/prims/jvm.cpp Wed Nov 25 06:33:28 2015 +0000
@@ -224,19 +224,6 @@
// Wrapper to trace JVM functions
#ifdef ASSERT
- class JVMTraceWrapper : public StackObj {
- public:
- JVMTraceWrapper(const char* format, ...) ATTRIBUTE_PRINTF(2, 3) {
- if (TraceJVMCalls) {
- va_list ap;
- va_start(ap, format);
- tty->print("JVM ");
- tty->vprint_cr(format, ap);
- va_end(ap);
- }
- }
- };
-
Histogram* JVMHistogram;
volatile jint JVMHistogram_lock = 0;
@@ -270,15 +257,9 @@
static JVMHistogramElement* e = new JVMHistogramElement(arg); \
if (e != NULL) e->increment_count(); // Due to bug in VC++, we need a NULL check here eventhough it should never happen!
- #define JVMWrapper(arg1) JVMCountWrapper(arg1); JVMTraceWrapper(arg1)
- #define JVMWrapper2(arg1, arg2) JVMCountWrapper(arg1); JVMTraceWrapper(arg1, arg2)
- #define JVMWrapper3(arg1, arg2, arg3) JVMCountWrapper(arg1); JVMTraceWrapper(arg1, arg2, arg3)
- #define JVMWrapper4(arg1, arg2, arg3, arg4) JVMCountWrapper(arg1); JVMTraceWrapper(arg1, arg2, arg3, arg4)
+ #define JVMWrapper(arg) JVMCountWrapper(arg);
#else
- #define JVMWrapper(arg1)
- #define JVMWrapper2(arg1, arg2)
- #define JVMWrapper3(arg1, arg2, arg3)
- #define JVMWrapper4(arg1, arg2, arg3, arg4)
+ #define JVMWrapper(arg)
#endif
@@ -761,7 +742,7 @@
// java.io.File ///////////////////////////////////////////////////////////////
JVM_LEAF(char*, JVM_NativePath(char* path))
- JVMWrapper2("JVM_NativePath (%s)", path);
+ JVMWrapper("JVM_NativePath");
return os::native_path(path);
JVM_END
@@ -838,7 +819,7 @@
// FindClassFromBootLoader is exported to the launcher for windows.
JVM_ENTRY(jclass, JVM_FindClassFromBootLoader(JNIEnv* env,
const char* name))
- JVMWrapper2("JVM_FindClassFromBootLoader %s", name);
+ JVMWrapper("JVM_FindClassFromBootLoader");
// Java libraries should ensure that name is never null...
if (name == NULL || (int)strlen(name) > Symbol::max_length()) {
@@ -863,7 +844,7 @@
JVM_ENTRY(jclass, JVM_FindClassFromCaller(JNIEnv* env, const char* name,
jboolean init, jobject loader,
jclass caller))
- JVMWrapper2("JVM_FindClassFromCaller %s throws ClassNotFoundException", name);
+ JVMWrapper("JVM_FindClassFromCaller throws ClassNotFoundException");
// Java libraries should ensure that name is never null...
if (name == NULL || (int)strlen(name) > Symbol::max_length()) {
// It's impossible to create this class; the name cannot fit
@@ -898,7 +879,7 @@
JVM_ENTRY(jclass, JVM_FindClassFromClass(JNIEnv *env, const char *name,
jboolean init, jclass from))
- JVMWrapper2("JVM_FindClassFromClass %s", name);
+ JVMWrapper("JVM_FindClassFromClass");
if (name == NULL || (int)strlen(name) > Symbol::max_length()) {
// It's impossible to create this class; the name cannot fit
// into the constant pool.
@@ -1005,14 +986,14 @@
JVM_ENTRY(jclass, JVM_DefineClass(JNIEnv *env, const char *name, jobject loader, const jbyte *buf, jsize len, jobject pd))
- JVMWrapper2("JVM_DefineClass %s", name);
+ JVMWrapper("JVM_DefineClass");
return jvm_define_class_common(env, name, loader, buf, len, pd, NULL, THREAD);
JVM_END
JVM_ENTRY(jclass, JVM_DefineClassWithSource(JNIEnv *env, const char *name, jobject loader, const jbyte *buf, jsize len, jobject pd, const char *source))
- JVMWrapper2("JVM_DefineClassWithSource %s", name);
+ JVMWrapper("JVM_DefineClassWithSource");
return jvm_define_class_common(env, name, loader, buf, len, pd, source, THREAD);
JVM_END
@@ -3439,7 +3420,7 @@
JVM_ENTRY_NO_ENV(void*, JVM_LoadLibrary(const char* name))
//%note jvm_ct
- JVMWrapper2("JVM_LoadLibrary (%s)", name);
+ JVMWrapper("JVM_LoadLibrary");
char ebuf[1024];
void *load_result;
{
@@ -3471,7 +3452,7 @@
JVM_LEAF(void*, JVM_FindLibraryEntry(void* handle, const char* name))
- JVMWrapper2("JVM_FindLibraryEntry (%s)", name);
+ JVMWrapper("JVM_FindLibraryEntry");
return os::dll_lookup(handle, name);
JVM_END
@@ -3479,7 +3460,7 @@
// JNI version ///////////////////////////////////////////////////////////////////////////////
JVM_LEAF(jboolean, JVM_IsSupportedJNIVersion(jint version))
- JVMWrapper2("JVM_IsSupportedJNIVersion (%d)", version);
+ JVMWrapper("JVM_IsSupportedJNIVersion");
return Threads::is_supported_jni_version_including_1_1(version);
JVM_END
--- a/hotspot/src/share/vm/runtime/globals.hpp Wed Nov 25 04:51:32 2015 +0000
+++ b/hotspot/src/share/vm/runtime/globals.hpp Wed Nov 25 06:33:28 2015 +0000
@@ -1426,18 +1426,9 @@
\
/* tracing */ \
\
- notproduct(bool, TraceRuntimeCalls, false, \
- "Trace run-time calls") \
- \
- develop(bool, TraceJNICalls, false, \
- "Trace JNI calls") \
- \
develop(bool, StressRewriter, false, \
"Stress linktime bytecode rewriting") \
\
- notproduct(bool, TraceJVMCalls, false, \
- "Trace JVM calls") \
- \
product(ccstr, TraceJVMTI, NULL, \
"Trace flags for JVMTI functions and events") \
\
--- a/hotspot/src/share/vm/runtime/interfaceSupport.cpp Wed Nov 25 04:51:32 2015 +0000
+++ b/hotspot/src/share/vm/runtime/interfaceSupport.cpp Wed Nov 25 06:33:28 2015 +0000
@@ -70,10 +70,6 @@
Atomic::dec(&RuntimeHistogram_lock);
}
-void InterfaceSupport::trace(const char* result_type, const char* header) {
- tty->print_cr("%6ld %s", _number_of_calls, header);
-}
-
void InterfaceSupport::gc_alot() {
Thread *thread = Thread::current();
if (!thread->is_Java_thread()) return; // Avoid concurrent calls
--- a/hotspot/src/share/vm/runtime/interfaceSupport.hpp Wed Nov 25 04:51:32 2015 +0000
+++ b/hotspot/src/share/vm/runtime/interfaceSupport.hpp Wed Nov 25 06:33:28 2015 +0000
@@ -74,9 +74,6 @@
static long _number_of_calls;
static long _fullgc_alot_invocation;
- // tracing
- static void trace(const char* result_type, const char* header);
-
// Helper methods used to implement +ScavengeALot and +FullGCALot
static void check_gc_alot() { if (ScavengeALot || FullGCALot) gc_alot(); }
static void gc_alot();
@@ -402,8 +399,6 @@
#define TRACE_CALL(result_type, header) \
InterfaceSupport::_number_of_calls++; \
- if (TraceRuntimeCalls) \
- InterfaceSupport::trace(#result_type, #header); \
if (CountRuntimeCalls) { \
static RuntimeHistogramElement* e = new RuntimeHistogramElement(#header); \
if (e != NULL) e->increment_count(); \
--- a/hotspot/src/share/vm/runtime/thread.cpp Wed Nov 25 04:51:32 2015 +0000
+++ b/hotspot/src/share/vm/runtime/thread.cpp Wed Nov 25 06:33:28 2015 +0000
@@ -4022,13 +4022,6 @@
// will be stopped at native=>Java/VM barriers. Note that we can't
// simply kill or suspend them, as it is inherently deadlock-prone.
-#ifndef PRODUCT
- // disable function tracing at JNI/JVM barriers
- TraceJNICalls = false;
- TraceJVMCalls = false;
- TraceRuntimeCalls = false;
-#endif
-
VM_Exit::set_vm_exited();
notify_vm_shutdown();
--- a/hotspot/test/runtime/CommandLine/VMOptionWarning.java Wed Nov 25 04:51:32 2015 +0000
+++ b/hotspot/test/runtime/CommandLine/VMOptionWarning.java Wed Nov 25 06:33:28 2015 +0000
@@ -47,12 +47,12 @@
output = new OutputAnalyzer(pb.start());
output.shouldContain("Error: VM option 'PrintInlining' is diagnostic and must be enabled via -XX:+UnlockDiagnosticVMOptions.");
- pb = ProcessTools.createJavaProcessBuilder("-XX:+TraceJNICalls", "-version");
+ pb = ProcessTools.createJavaProcessBuilder("-XX:+VerifyStack", "-version");
output = new OutputAnalyzer(pb.start());
- output.shouldContain("Error: VM option 'TraceJNICalls' is develop and is available only in debug version of VM.");
+ output.shouldContain("Error: VM option 'VerifyStack' is develop and is available only in debug version of VM.");
- pb = ProcessTools.createJavaProcessBuilder("-XX:+TraceJVMCalls", "-version");
+ pb = ProcessTools.createJavaProcessBuilder("-XX:+ExecuteInternalVMTests", "-version");
output = new OutputAnalyzer(pb.start());
- output.shouldContain("Error: VM option 'TraceJVMCalls' is notproduct and is available only in debug version of VM.");
+ output.shouldContain("Error: VM option 'ExecuteInternalVMTests' is notproduct and is available only in debug version of VM.");
}
}