< prev index next >

src/hotspot/share/classfile/compactHashtable.cpp

Print this page

*** 1,7 **** /* ! * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 29,38 **** --- 29,39 ---- #include "logging/logMessage.hpp" #include "memory/dynamicArchive.hpp" #include "memory/heapShared.inline.hpp" #include "memory/metadataFactory.hpp" #include "memory/metaspaceShared.hpp" + #include "runtime/globals.hpp" #include "runtime/vmThread.hpp" #include "utilities/numberSeq.hpp" #include <sys/stat.h> #if INCLUDE_CDS
*** 210,224 **** } void SimpleCompactHashtable::serialize_header(SerializeClosure* soc) { // NOTE: if you change this function, you MUST change the number 5 in // calculate_header_size() accordingly. - soc->do_ptr((void**)&_base_address); soc->do_u4(&_entry_count); soc->do_u4(&_bucket_count); soc->do_ptr((void**)&_buckets); soc->do_ptr((void**)&_entries); } #endif // INCLUDE_CDS #ifndef O_BINARY // if defined (Win32) use binary files. #define O_BINARY 0 // otherwise do nothing. --- 211,227 ---- } void SimpleCompactHashtable::serialize_header(SerializeClosure* soc) { // NOTE: if you change this function, you MUST change the number 5 in // calculate_header_size() accordingly. soc->do_u4(&_entry_count); soc->do_u4(&_bucket_count); soc->do_ptr((void**)&_buckets); soc->do_ptr((void**)&_entries); + if (soc->reading()) { + _base_address = (address)SharedBaseAddress; + } } #endif // INCLUDE_CDS #ifndef O_BINARY // if defined (Win32) use binary files. #define O_BINARY 0 // otherwise do nothing.
< prev index next >