Skip to content

Commit 0712b22

Browse files
committedNov 20, 2023
8320147: Remove DumpSharedSpaces
Reviewed-by: ccheung, matsaave
1 parent 6e86904 commit 0712b22

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+166
-101
lines changed
 

‎src/hotspot/cpu/ppc/templateTable_ppc_64.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
#include "precompiled.hpp"
2727
#include "asm/macroAssembler.inline.hpp"
28+
#include "cds/cdsConfig.hpp"
2829
#include "compiler/disassembler.hpp"
2930
#include "gc/shared/barrierSetAssembler.hpp"
3031
#include "gc/shared/tlab_globals.hpp"
@@ -3483,7 +3484,7 @@ void TemplateTable::invokevirtual(int byte_no) {
34833484
__ testbitdi(CCR0, R0, Rflags, ResolvedMethodEntry::is_vfinal_shift);
34843485
__ bfalse(CCR0, LnotFinal);
34853486

3486-
if (RewriteBytecodes && !UseSharedSpaces && !DumpSharedSpaces) {
3487+
if (RewriteBytecodes && !UseSharedSpaces && !CDSConfig::is_dumping_static_archive()) {
34873488
patch_bytecode(Bytecodes::_fast_invokevfinal, Rnew_bc, R12_scratch2);
34883489
}
34893490
invokevfinal_helper(Rcache, R11_scratch1, R12_scratch2, Rflags /* tmp */);

‎src/hotspot/share/cds/archiveBuilder.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ void ArchiveBuilder::gather_klasses_and_symbols() {
239239
#endif
240240
doit.finish();
241241

242-
if (DumpSharedSpaces) {
242+
if (CDSConfig::is_dumping_static_archive()) {
243243
// To ensure deterministic contents in the static archive, we need to ensure that
244244
// we iterate the MetaspaceObjs in a deterministic order. It doesn't matter where
245245
// the MetaspaceObjs are located originally, as they are copied sequentially into
@@ -339,7 +339,7 @@ address ArchiveBuilder::reserve_buffer() {
339339
// The bottom of the archive (that I am writing now) should be mapped at this address by default.
340340
address my_archive_requested_bottom;
341341

342-
if (DumpSharedSpaces) {
342+
if (CDSConfig::is_dumping_static_archive()) {
343343
my_archive_requested_bottom = _requested_static_archive_bottom;
344344
} else {
345345
_mapped_static_archive_bottom = (address)MetaspaceObj::shared_metaspace_base();
@@ -367,7 +367,7 @@ address ArchiveBuilder::reserve_buffer() {
367367
MetaspaceShared::unrecoverable_writing_error();
368368
}
369369

370-
if (DumpSharedSpaces) {
370+
if (CDSConfig::is_dumping_static_archive()) {
371371
// We don't want any valid object to be at the very bottom of the archive.
372372
// See ArchivePtrMarker::mark_pointer().
373373
rw_region()->allocate(16);
@@ -642,7 +642,7 @@ void ArchiveBuilder::make_shallow_copy(DumpRegion *dump_region, SourceObjInfo* s
642642
memcpy(dest, src, bytes);
643643

644644
// Update the hash of buffered sorted symbols for static dump so that the symbols have deterministic contents
645-
if (DumpSharedSpaces && (src_info->msotype() == MetaspaceObj::SymbolType)) {
645+
if (CDSConfig::is_dumping_static_archive() && (src_info->msotype() == MetaspaceObj::SymbolType)) {
646646
Symbol* buffered_symbol = (Symbol*)dest;
647647
assert(((Symbol*)src)->is_permanent(), "archived symbols must be permanent");
648648
buffered_symbol->update_identity_hash();
@@ -825,7 +825,7 @@ uintx ArchiveBuilder::any_to_offset(address p) const {
825825

826826
#if INCLUDE_CDS_JAVA_HEAP
827827
narrowKlass ArchiveBuilder::get_requested_narrow_klass(Klass* k) {
828-
assert(DumpSharedSpaces, "sanity");
828+
assert(CDSConfig::is_dumping_heap(), "sanity");
829829
k = get_buffered_klass(k);
830830
Klass* requested_k = to_requested(k);
831831
address narrow_klass_base = _requested_static_archive_bottom; // runtime encoding base == runtime mapping start
@@ -916,7 +916,7 @@ void ArchiveBuilder::relocate_to_requested() {
916916

917917
size_t my_archive_size = buffer_top() - buffer_bottom();
918918

919-
if (DumpSharedSpaces) {
919+
if (CDSConfig::is_dumping_static_archive()) {
920920
_requested_static_archive_top = _requested_static_archive_bottom + my_archive_size;
921921
RelocateBufferToRequested<true> patcher(this);
922922
patcher.doit();
@@ -1238,7 +1238,7 @@ class ArchiveBuilder::CDSMapLogger : AllStatic {
12381238
static void log(ArchiveBuilder* builder, FileMapInfo* mapinfo,
12391239
ArchiveHeapInfo* heap_info,
12401240
char* bitmap, size_t bitmap_size_in_bytes) {
1241-
log_info(cds, map)("%s CDS archive map for %s", DumpSharedSpaces ? "Static" : "Dynamic", mapinfo->full_path());
1241+
log_info(cds, map)("%s CDS archive map for %s", CDSConfig::is_dumping_static_archive() ? "Static" : "Dynamic", mapinfo->full_path());
12421242

12431243
address header = address(mapinfo->header());
12441244
address header_end = header + mapinfo->header()->header_size();

0 commit comments

Comments
 (0)