src/hotspot/share/memory/filemap.cpp
changeset 48962 88ad6c676c87
parent 48794 ea0d0781c63c
child 49340 4e82736053ae
--- a/src/hotspot/share/memory/filemap.cpp	Wed Jan 10 22:48:27 2018 +0100
+++ b/src/hotspot/share/memory/filemap.cpp	Tue Feb 13 14:10:56 2018 +0100
@@ -410,14 +410,11 @@
 // Write the FileMapInfo information to the file.
 
 void FileMapInfo::open_for_write() {
- _full_path = Arguments::GetSharedArchivePath();
-  if (log_is_enabled(Info, cds)) {
-    ResourceMark rm;
-    LogMessage(cds) msg;
-    stringStream info_stream;
-    info_stream.print_cr("Dumping shared data to file: ");
-    info_stream.print_cr("   %s", _full_path);
-    msg.info("%s", info_stream.as_string());
+  _full_path = Arguments::GetSharedArchivePath();
+  LogMessage(cds) msg;
+  if (msg.is_info()) {
+    msg.info("Dumping shared data to file: ");
+    msg.info("   %s", _full_path);
   }
 
 #ifdef _WINDOWS  // On Windows, need WRITE permission to remove the file.