changeset 5435:5d839e60d9f5

8041980: (hotspot) sun/jvmstat/monitor/MonitoredVm/CR6672135.java failing on all platforms Reviewed-by: sla, alanb
author aeriksso
date Thu, 09 Oct 2014 16:21:02 +0200
parents 34d960c55c6d
children 312b5f1dc31d
files make/bsd/makefiles/mapfile-vers-debug make/bsd/makefiles/mapfile-vers-product make/linux/makefiles/mapfile-vers-debug make/linux/makefiles/mapfile-vers-product make/solaris/makefiles/mapfile-vers src/share/vm/prims/jvm.cpp src/share/vm/prims/jvm.h
diffstat 7 files changed, 26 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/make/bsd/makefiles/mapfile-vers-debug	Thu Oct 09 09:45:40 2014 +0200
+++ b/make/bsd/makefiles/mapfile-vers-debug	Thu Oct 09 16:21:02 2014 +0200
@@ -157,6 +157,7 @@
                 _JVM_GetStackTraceElement
                 _JVM_GetSystemPackage
                 _JVM_GetSystemPackages
+                _JVM_GetTemporaryDirectory
                 _JVM_GetThreadStateNames
                 _JVM_GetThreadStateValues
                 _JVM_GetVersionInfo
--- a/make/bsd/makefiles/mapfile-vers-product	Thu Oct 09 09:45:40 2014 +0200
+++ b/make/bsd/makefiles/mapfile-vers-product	Thu Oct 09 16:21:02 2014 +0200
@@ -157,6 +157,7 @@
                 _JVM_GetStackTraceElement
                 _JVM_GetSystemPackage
                 _JVM_GetSystemPackages
+                _JVM_GetTemporaryDirectory
                 _JVM_GetThreadStateNames
                 _JVM_GetThreadStateValues
                 _JVM_GetVersionInfo
--- a/make/linux/makefiles/mapfile-vers-debug	Thu Oct 09 09:45:40 2014 +0200
+++ b/make/linux/makefiles/mapfile-vers-debug	Thu Oct 09 16:21:02 2014 +0200
@@ -122,7 +122,7 @@
                 JVM_GetClassModifiers;
                 JVM_GetClassName;
                 JVM_GetClassNameUTF;
-		JVM_GetClassSignature;
+                JVM_GetClassSignature;
                 JVM_GetClassSigners;
                 JVM_GetComponentType;
                 JVM_GetDeclaredClasses;
@@ -159,6 +159,7 @@
                 JVM_GetStackTraceElement;
                 JVM_GetSystemPackage;
                 JVM_GetSystemPackages;
+                JVM_GetTemporaryDirectory;
                 JVM_GetThreadStateNames;
                 JVM_GetThreadStateValues;
                 JVM_GetVersionInfo;
--- a/make/linux/makefiles/mapfile-vers-product	Thu Oct 09 09:45:40 2014 +0200
+++ b/make/linux/makefiles/mapfile-vers-product	Thu Oct 09 16:21:02 2014 +0200
@@ -159,6 +159,7 @@
                 JVM_GetStackTraceElement;
                 JVM_GetSystemPackage;
                 JVM_GetSystemPackages;
+                JVM_GetTemporaryDirectory;
                 JVM_GetThreadStateNames;
                 JVM_GetThreadStateValues;
                 JVM_GetVersionInfo;
--- a/make/solaris/makefiles/mapfile-vers	Thu Oct 09 09:45:40 2014 +0200
+++ b/make/solaris/makefiles/mapfile-vers	Thu Oct 09 16:21:02 2014 +0200
@@ -159,6 +159,7 @@
 		JVM_GetStackTraceElement;
 		JVM_GetSystemPackage;
 		JVM_GetSystemPackages;
+		JVM_GetTemporaryDirectory;
 		JVM_GetThreadStateNames;
 		JVM_GetThreadStateValues;
 		JVM_GetVersionInfo;
--- a/src/share/vm/prims/jvm.cpp	Thu Oct 09 09:45:40 2014 +0200
+++ b/src/share/vm/prims/jvm.cpp	Thu Oct 09 16:21:02 2014 +0200
@@ -388,6 +388,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/src/share/vm/prims/jvm.h	Thu Oct 09 09:45:40 2014 +0200
+++ b/src/share/vm/prims/jvm.h	Thu Oct 09 16:21:02 2014 +0200
@@ -1464,6 +1464,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