changeset 6353:04c242e27ea3

8041980: (hotspot) sun/jvmstat/monitor/MonitoredVm/CR6672135.java failing on all platforms Reviewed-by: mgronlun, kamg
author sla
date Mon, 28 Apr 2014 09:27:47 +0200
parents bb74285415d4
children 292091fae50a
files make/aix/makefiles/mapfile-vers-debug make/aix/makefiles/mapfile-vers-product make/bsd/makefiles/mapfile-vers-darwin-debug make/bsd/makefiles/mapfile-vers-darwin-product 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 11 files changed, 32 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/make/aix/makefiles/mapfile-vers-debug	Fri Apr 25 10:08:04 2014 +0200
+++ b/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/make/aix/makefiles/mapfile-vers-product	Fri Apr 25 10:08:04 2014 +0200
+++ b/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/make/bsd/makefiles/mapfile-vers-darwin-debug	Fri Apr 25 10:08:04 2014 +0200
+++ b/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/make/bsd/makefiles/mapfile-vers-darwin-product	Fri Apr 25 10:08:04 2014 +0200
+++ b/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/make/bsd/makefiles/mapfile-vers-debug	Fri Apr 25 10:08:04 2014 +0200
+++ b/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/make/bsd/makefiles/mapfile-vers-product	Fri Apr 25 10:08:04 2014 +0200
+++ b/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/make/linux/makefiles/mapfile-vers-debug	Fri Apr 25 10:08:04 2014 +0200
+++ b/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/make/linux/makefiles/mapfile-vers-product	Fri Apr 25 10:08:04 2014 +0200
+++ b/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/make/solaris/makefiles/mapfile-vers	Fri Apr 25 10:08:04 2014 +0200
+++ b/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/src/share/vm/prims/jvm.cpp	Fri Apr 25 10:08:04 2014 +0200
+++ b/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/src/share/vm/prims/jvm.h	Fri Apr 25 10:08:04 2014 +0200
+++ b/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