From adcfd257358fcd810f75d41bda7b916595e5dcdf Mon Sep 17 00:00:00 2001 From: Ioi Lam Date: Wed, 25 Jan 2023 20:04:50 +0000 Subject: [PATCH] 8301098: Remove dead code FileMapInfo::stop_sharing_and_unmap() Reviewed-by: coleenp, ccheung --- src/hotspot/share/cds/filemap.cpp | 23 ----------------------- src/hotspot/share/cds/filemap.hpp | 3 --- 2 files changed, 26 deletions(-) diff --git a/src/hotspot/share/cds/filemap.cpp b/src/hotspot/share/cds/filemap.cpp index 3c9bbc180e9..1a3fb8b949d 100644 --- a/src/hotspot/share/cds/filemap.cpp +++ b/src/hotspot/share/cds/filemap.cpp @@ -2755,29 +2755,6 @@ bool FileMapInfo::validate_header() { } } -// Unmap mapped regions of shared space. -void FileMapInfo::stop_sharing_and_unmap(const char* msg) { - MetaspaceShared::set_shared_metaspace_range(nullptr, nullptr, nullptr); - - FileMapInfo *map_info = FileMapInfo::current_info(); - if (map_info) { - map_info->fail_continue("%s", msg); - for (int i = 0; i < MetaspaceShared::num_non_heap_regions; i++) { - if (!HeapShared::is_heap_region(i)) { - map_info->unmap_region(i); - } - } - // Dealloc the archive heap regions only without unmapping. The regions are part - // of the java heap. Unmapping of the heap regions are managed by GC. - map_info->dealloc_heap_regions(open_heap_regions, - num_open_heap_regions); - map_info->dealloc_heap_regions(closed_heap_regions, - num_closed_heap_regions); - } else if (DumpSharedSpaces) { - fail_stop("%s", msg); - } -} - #if INCLUDE_JVMTI ClassPathEntry** FileMapInfo::_classpath_entries_for_jvmti = nullptr; diff --git a/src/hotspot/share/cds/filemap.hpp b/src/hotspot/share/cds/filemap.hpp index bfe2f4c10d3..43f04c6b2df 100644 --- a/src/hotspot/share/cds/filemap.hpp +++ b/src/hotspot/share/cds/filemap.hpp @@ -492,9 +492,6 @@ public: NOT_CDS(return false;) } - // Stop CDS sharing and unmap CDS regions. - static void stop_sharing_and_unmap(const char* msg); - static void allocate_shared_path_table(TRAPS); static void copy_shared_path_table(ClassLoaderData* loader_data, TRAPS); static void clone_shared_path_table(TRAPS);