src/hotspot/os/linux/os_linux.cpp
changeset 53870 92263386a883
parent 53568 230b84fa7e53
child 53886 e94ed0236046
--- a/src/hotspot/os/linux/os_linux.cpp	Thu Feb 21 05:06:41 2019 -0500
+++ b/src/hotspot/os/linux/os_linux.cpp	Thu Feb 21 21:02:39 2019 +0900
@@ -131,6 +131,7 @@
 
 enum CoredumpFilterBit {
   FILE_BACKED_PVT_BIT = 1 << 2,
+  FILE_BACKED_SHARED_BIT = 1 << 3,
   LARGEPAGES_BIT = 1 << 6,
   DAX_SHARED_BIT = 1 << 8
 };
@@ -1357,8 +1358,8 @@
 void os::abort(bool dump_core, void* siginfo, const void* context) {
   os::shutdown();
   if (dump_core) {
-#if INCLUDE_CDS
-    if (UseSharedSpaces && DumpPrivateMappingsInCore) {
+#ifndef ZERO
+    if (DumpPrivateMappingsInCore) {
       ClassLoader::close_jrt_image();
     }
 #endif
@@ -3432,8 +3433,6 @@
   return result;
 }
 
-// Set the coredump_filter bits to include largepages in core dump (bit 6)
-//
 // From the coredump_filter documentation:
 //
 // - (bit 0) anonymous private memory
@@ -5131,11 +5130,13 @@
     set_coredump_filter(DAX_SHARED_BIT);
   }
 
-#if INCLUDE_CDS
-  if (UseSharedSpaces && DumpPrivateMappingsInCore) {
+  if (DumpPrivateMappingsInCore) {
     set_coredump_filter(FILE_BACKED_PVT_BIT);
   }
-#endif
+
+  if (DumpSharedMappingsInCore) {
+    set_coredump_filter(FILE_BACKED_SHARED_BIT);
+  }
 
   return JNI_OK;
 }