changeset 14695:948a73c3e9ea

Merge
author neliasso
date Fri, 14 Mar 2014 09:26:27 +0100
parents ff056d90e349 (diff) 58cf34613a72 (current diff)
children d4dd5204c0aa
files src/share/vm/runtime/arguments.cpp
diffstat 8 files changed, 18 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/make/bsd/makefiles/gcc.make	Mon Mar 10 12:58:02 2014 +0100
+++ b/make/bsd/makefiles/gcc.make	Fri Mar 14 09:26:27 2014 +0100
@@ -260,7 +260,7 @@
   WARNINGS_ARE_ERRORS += -Wno-empty-body
 endif
 
-WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wformat=2 -Wno-error=format-nonliteral
+WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wformat=2
 
 ifeq ($(USE_CLANG),)
   # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
--- a/make/linux/makefiles/gcc.make	Mon Mar 10 12:58:02 2014 +0100
+++ b/make/linux/makefiles/gcc.make	Fri Mar 14 09:26:27 2014 +0100
@@ -215,7 +215,7 @@
   WARNINGS_ARE_ERRORS += -Wno-return-type -Wno-empty-body
 endif
 
-WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value -Wformat=2 -Wno-error=format-nonliteral
+WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value -Wformat=2
 
 ifeq ($(USE_CLANG),)
   # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
--- a/make/solaris/makefiles/gcc.make	Mon Mar 10 12:58:02 2014 +0100
+++ b/make/solaris/makefiles/gcc.make	Fri Mar 14 09:26:27 2014 +0100
@@ -118,7 +118,7 @@
 # Compiler warnings are treated as errors 
 WARNINGS_ARE_ERRORS = -Werror 
 # Enable these warnings. See 'info gcc' about details on these options
-WARNING_FLAGS = -Wpointer-arith -Wconversion -Wsign-compare -Wundef -Wformat=2 -Wno-error=format-nonliteral
+WARNING_FLAGS = -Wpointer-arith -Wconversion -Wsign-compare -Wundef -Wformat=2
 CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(WARNING_FLAGS)
 # Special cases 
 CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@))  
--- a/src/os/linux/vm/os_linux.cpp	Mon Mar 10 12:58:02 2014 +0100
+++ b/src/os/linux/vm/os_linux.cpp	Fri Mar 14 09:26:27 2014 +0100
@@ -5284,7 +5284,6 @@
 
 static jlong slow_thread_cpu_time(Thread *thread, bool user_sys_cpu_time) {
   static bool proc_task_unchecked = true;
-  static const char *proc_stat_path = "/proc/%d/stat";
   pid_t  tid = thread->osthread()->thread_id();
   char *s;
   char stat[2048];
@@ -5297,6 +5296,8 @@
   long ldummy;
   FILE *fp;
 
+  snprintf(proc_name, 64, "/proc/%d/stat", tid);
+
   // The /proc/<tid>/stat aggregates per-process usage on
   // new Linux kernels 2.6+ where NPTL is supported.
   // The /proc/self/task/<tid>/stat still has the per-thread usage.
@@ -5308,12 +5309,11 @@
     proc_task_unchecked = false;
     fp = fopen("/proc/self/task", "r");
     if (fp != NULL) {
-      proc_stat_path = "/proc/self/task/%d/stat";
+      snprintf(proc_name, 64, "/proc/self/task/%d/stat", tid);
       fclose(fp);
     }
   }
 
-  sprintf(proc_name, proc_stat_path, tid);
   fp = fopen(proc_name, "r");
   if ( fp == NULL ) return -1;
   statlen = fread(stat, 1, 2047, fp);
--- a/src/share/vm/compiler/compilerOracle.cpp	Mon Mar 10 12:58:02 2014 +0100
+++ b/src/share/vm/compiler/compilerOracle.cpp	Fri Mar 14 09:26:27 2014 +0100
@@ -374,25 +374,8 @@
         "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
 
 #define RANGE0 "[*" RANGEBASE "]"
-#define RANGEDOT "[*" RANGEBASE ".]"
 #define RANGESLASH "[*" RANGEBASE "/]"
 
-
-// Accept several syntaxes for these patterns
-//  original syntax
-//   cmd  java.lang.String foo
-//  PrintCompilation syntax
-//   cmd  java.lang.String::foo
-//  VM syntax
-//   cmd  java/lang/String[. ]foo
-//
-
-static const char* patterns[] = {
-  "%*[ \t]%255" RANGEDOT    " "     "%255"  RANGE0 "%n",
-  "%*[ \t]%255" RANGEDOT   "::"     "%255"  RANGE0 "%n",
-  "%*[ \t]%255" RANGESLASH "%*[ .]" "%255"  RANGE0 "%n",
-};
-
 static MethodMatcher::Mode check_mode(char name[], const char*& error_msg) {
   int match = MethodMatcher::Exact;
   while (name[0] == '*') {
@@ -421,12 +404,10 @@
                       int* bytes_read, const char*& error_msg) {
   *bytes_read = 0;
   error_msg = NULL;
-  for (uint i = 0; i < ARRAY_SIZE(patterns); i++) {
-    if (2 == sscanf(line, patterns[i], class_name, method_name, bytes_read)) {
-      *c_mode = check_mode(class_name, error_msg);
-      *m_mode = check_mode(method_name, error_msg);
-      return *c_mode != MethodMatcher::Unknown && *m_mode != MethodMatcher::Unknown;
-    }
+  if (2 == sscanf(line, "%*[ \t]%255" RANGESLASH "%*[ ]" "%255"  RANGE0 "%n", class_name, method_name, bytes_read)) {
+    *c_mode = check_mode(class_name, error_msg);
+    *m_mode = check_mode(method_name, error_msg);
+    return *c_mode != MethodMatcher::Unknown && *m_mode != MethodMatcher::Unknown;
   }
   return false;
 }
--- a/src/share/vm/memory/filemap.cpp	Mon Mar 10 12:58:02 2014 +0100
+++ b/src/share/vm/memory/filemap.cpp	Fri Mar 14 09:26:27 2014 +0100
@@ -78,6 +78,10 @@
   va_start(ap, msg);
   if (RequireSharedSpaces) {
     fail(msg, ap);
+  } else {
+    if (PrintSharedSpaces) {
+      tty->print_cr("UseSharedSpaces: %s", msg);
+    }
   }
   va_end(ap);
   UseSharedSpaces = false;
--- a/src/share/vm/runtime/arguments.cpp	Mon Mar 10 12:58:02 2014 +0100
+++ b/src/share/vm/runtime/arguments.cpp	Fri Mar 14 09:26:27 2014 +0100
@@ -1699,7 +1699,8 @@
       // HeapBaseMinAddress can be greater than default but not less than.
       if (!FLAG_IS_DEFAULT(HeapBaseMinAddress)) {
         if (HeapBaseMinAddress < DefaultHeapBaseMinAddress) {
-          if (PrintMiscellaneous && Verbose) {  // matches compressed oops printing flags
+          // matches compressed oops printing flags
+          if (PrintCompressedOopsMode || (PrintMiscellaneous && Verbose)) {
             jio_fprintf(defaultStream::error_stream(),
                         "HeapBaseMinAddress must be at least " UINTX_FORMAT
                         " (" UINTX_FORMAT "G) which is greater than value given "
--- a/test/runtime/CompressedOops/CompressedClassPointers.java	Mon Mar 10 12:58:02 2014 +0100
+++ b/test/runtime/CompressedOops/CompressedClassPointers.java	Fri Mar 14 09:26:27 2014 +0100
@@ -83,8 +83,8 @@
     public static void heapBaseMinAddressTest() throws Exception {
         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
             "-XX:HeapBaseMinAddress=1m",
-            "-XX:+PrintMiscellaneous",
-            "-XX:+Verbose",
+            "-XX:+UnlockDiagnosticVMOptions",
+            "-XX:+PrintCompressedOopsMode",
             "-version");
         OutputAnalyzer output = new OutputAnalyzer(pb.start());
         output.shouldContain("HeapBaseMinAddress must be at least");