8041980: (hotspot) sun/jvmstat/monitor/MonitoredVm/CR6672135.java failing on all platforms
Reviewed-by: mgronlun, kamg
--- a/hotspot/make/aix/makefiles/mapfile-vers-debug Fri Apr 25 10:08:04 2014 +0200
+++ b/hotspot/make/aix/makefiles/mapfile-vers-debug Mon Apr 28 09:27:47 2014 +0200
@@ -122,7 +122,7 @@
JVM_GetClassModifiers;
JVM_GetClassName;
JVM_GetClassNameUTF;
- JVM_GetClassSignature;
+ JVM_GetClassSignature;
JVM_GetClassSigners;
JVM_GetClassTypeAnnotations;
JVM_GetComponentType;
@@ -163,6 +163,7 @@
JVM_GetStackTraceElement;
JVM_GetSystemPackage;
JVM_GetSystemPackages;
+ JVM_GetTemporaryDirectory;
JVM_GetThreadStateNames;
JVM_GetThreadStateValues;
JVM_GetVersionInfo;
--- a/hotspot/make/aix/makefiles/mapfile-vers-product Fri Apr 25 10:08:04 2014 +0200
+++ b/hotspot/make/aix/makefiles/mapfile-vers-product Mon Apr 28 09:27:47 2014 +0200
@@ -161,6 +161,7 @@
JVM_GetStackTraceElement;
JVM_GetSystemPackage;
JVM_GetSystemPackages;
+ JVM_GetTemporaryDirectory;
JVM_GetThreadStateNames;
JVM_GetThreadStateValues;
JVM_GetVersionInfo;
--- a/hotspot/make/bsd/makefiles/mapfile-vers-darwin-debug Fri Apr 25 10:08:04 2014 +0200
+++ b/hotspot/make/bsd/makefiles/mapfile-vers-darwin-debug Mon Apr 28 09:27:47 2014 +0200
@@ -161,6 +161,7 @@
_JVM_GetStackTraceElement
_JVM_GetSystemPackage
_JVM_GetSystemPackages
+ _JVM_GetTemporaryDirectory
_JVM_GetThreadStateNames
_JVM_GetThreadStateValues
_JVM_GetVersionInfo
--- a/hotspot/make/bsd/makefiles/mapfile-vers-darwin-product Fri Apr 25 10:08:04 2014 +0200
+++ b/hotspot/make/bsd/makefiles/mapfile-vers-darwin-product Mon Apr 28 09:27:47 2014 +0200
@@ -161,6 +161,7 @@
_JVM_GetStackTraceElement
_JVM_GetSystemPackage
_JVM_GetSystemPackages
+ _JVM_GetTemporaryDirectory
_JVM_GetThreadStateNames
_JVM_GetThreadStateValues
_JVM_GetVersionInfo
--- a/hotspot/make/bsd/makefiles/mapfile-vers-debug Fri Apr 25 10:08:04 2014 +0200
+++ b/hotspot/make/bsd/makefiles/mapfile-vers-debug Mon Apr 28 09:27:47 2014 +0200
@@ -122,7 +122,7 @@
JVM_GetClassModifiers;
JVM_GetClassName;
JVM_GetClassNameUTF;
- JVM_GetClassSignature;
+ JVM_GetClassSignature;
JVM_GetClassSigners;
JVM_GetClassTypeAnnotations;
JVM_GetComponentType;
@@ -163,6 +163,7 @@
JVM_GetStackTraceElement;
JVM_GetSystemPackage;
JVM_GetSystemPackages;
+ JVM_GetTemporaryDirectory;
JVM_GetThreadStateNames;
JVM_GetThreadStateValues;
JVM_GetVersionInfo;
--- a/hotspot/make/bsd/makefiles/mapfile-vers-product Fri Apr 25 10:08:04 2014 +0200
+++ b/hotspot/make/bsd/makefiles/mapfile-vers-product Mon Apr 28 09:27:47 2014 +0200
@@ -163,6 +163,7 @@
JVM_GetStackTraceElement;
JVM_GetSystemPackage;
JVM_GetSystemPackages;
+ JVM_GetTemporaryDirectory;
JVM_GetThreadStateNames;
JVM_GetThreadStateValues;
JVM_GetVersionInfo;
--- a/hotspot/make/linux/makefiles/mapfile-vers-debug Fri Apr 25 10:08:04 2014 +0200
+++ b/hotspot/make/linux/makefiles/mapfile-vers-debug Mon Apr 28 09:27:47 2014 +0200
@@ -122,7 +122,7 @@
JVM_GetClassModifiers;
JVM_GetClassName;
JVM_GetClassNameUTF;
- JVM_GetClassSignature;
+ JVM_GetClassSignature;
JVM_GetClassSigners;
JVM_GetClassTypeAnnotations;
JVM_GetComponentType;
@@ -163,6 +163,7 @@
JVM_GetStackTraceElement;
JVM_GetSystemPackage;
JVM_GetSystemPackages;
+ JVM_GetTemporaryDirectory;
JVM_GetThreadStateNames;
JVM_GetThreadStateValues;
JVM_GetVersionInfo;
--- a/hotspot/make/linux/makefiles/mapfile-vers-product Fri Apr 25 10:08:04 2014 +0200
+++ b/hotspot/make/linux/makefiles/mapfile-vers-product Mon Apr 28 09:27:47 2014 +0200
@@ -163,6 +163,7 @@
JVM_GetStackTraceElement;
JVM_GetSystemPackage;
JVM_GetSystemPackages;
+ JVM_GetTemporaryDirectory;
JVM_GetThreadStateNames;
JVM_GetThreadStateValues;
JVM_GetVersionInfo;
--- a/hotspot/make/solaris/makefiles/mapfile-vers Fri Apr 25 10:08:04 2014 +0200
+++ b/hotspot/make/solaris/makefiles/mapfile-vers Mon Apr 28 09:27:47 2014 +0200
@@ -163,6 +163,7 @@
JVM_GetStackTraceElement;
JVM_GetSystemPackage;
JVM_GetSystemPackages;
+ JVM_GetTemporaryDirectory;
JVM_GetThreadStateNames;
JVM_GetThreadStateValues;
JVM_GetVersionInfo;
--- a/hotspot/src/share/vm/prims/jvm.cpp Fri Apr 25 10:08:04 2014 +0200
+++ b/hotspot/src/share/vm/prims/jvm.cpp Mon Apr 28 09:27:47 2014 +0200
@@ -386,6 +386,23 @@
JVM_END
+/*
+ * Return the temporary directory that the VM uses for the attach
+ * and perf data files.
+ *
+ * It is important that this directory is well-known and the
+ * same for all VM instances. It cannot be affected by configuration
+ * variables such as java.io.tmpdir.
+ */
+JVM_ENTRY(jstring, JVM_GetTemporaryDirectory(JNIEnv *env))
+ JVMWrapper("JVM_GetTemporaryDirectory");
+ HandleMark hm(THREAD);
+ const char* temp_dir = os::get_temp_directory();
+ Handle h = java_lang_String::create_from_platform_dependent_str(temp_dir, CHECK_NULL);
+ return (jstring) JNIHandles::make_local(env, h());
+JVM_END
+
+
// java.lang.Runtime /////////////////////////////////////////////////////////////////////////
extern volatile jint vm_created;
--- a/hotspot/src/share/vm/prims/jvm.h Fri Apr 25 10:08:04 2014 +0200
+++ b/hotspot/src/share/vm/prims/jvm.h Mon Apr 28 09:27:47 2014 +0200
@@ -1485,6 +1485,9 @@
JNIEXPORT jobject JNICALL
JVM_InitAgentProperties(JNIEnv *env, jobject agent_props);
+JNIEXPORT jstring JNICALL
+JVM_GetTemporaryDirectory(JNIEnv *env);
+
/* Generics reflection support.
*
* Returns information about the given class's EnclosingMethod