8154976: UseSharedSpaces error message is incomplete
authorccheung
Wed, 27 Apr 2016 11:40:43 -0700
changeset 38108 95c7e9d6747c
parent 38107 aee6db99b6c7
child 38109 6503703df058
child 38110 22bb1ed67962
8154976: UseSharedSpaces error message is incomplete Reviewed-by: cjplummer, jiangli, mseledtsov
hotspot/src/share/vm/memory/filemap.cpp
hotspot/test/runtime/CDSCompressedKPtrs/XShareAuto.java
--- a/hotspot/src/share/vm/memory/filemap.cpp	Wed Apr 27 16:02:32 2016 +0200
+++ b/hotspot/src/share/vm/memory/filemap.cpp	Wed Apr 27 11:40:43 2016 -0700
@@ -99,7 +99,8 @@
       fail(msg, ap);
     } else {
       if (PrintSharedSpaces) {
-        tty->print_cr("UseSharedSpaces: %s", msg);
+        tty->print("UseSharedSpaces: ");
+        tty->vprint_cr(msg, ap);
       }
     }
     UseSharedSpaces = false;
--- a/hotspot/test/runtime/CDSCompressedKPtrs/XShareAuto.java	Wed Apr 27 16:02:32 2016 +0200
+++ b/hotspot/test/runtime/CDSCompressedKPtrs/XShareAuto.java	Wed Apr 27 11:40:43 2016 -0700
@@ -67,6 +67,7 @@
             // if sharing failed due to ASLR or similar reasons,
             // check whether sharing was attempted at all (UseSharedSpaces)
             output.shouldContain("UseSharedSpaces:");
+            output.shouldNotContain("Unable to map %s");
         }
         output.shouldHaveExitValue(0);
     }