/* * Copyright (c) 2012, 2022, 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. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. *
*/
// Return true if given address is in the shared metaspace regions (i.e., excluding any // mapped heap regions.) staticbool is_in_shared_metaspace(constvoid* p) { return MetaspaceObj::is_shared((const MetaspaceObj*)p);
}
// JVM/TI RedefineClasses() support: // Remap the shared readonly space to shared readwrite, private if // sharing is enabled. Simply returns true if sharing is not enabled // or if the remapping has already been done by a prior call. staticbool remap_shared_readonly_as_readwrite() NOT_CDS_RETURN_(true); staticbool remapped_readwrite() {
CDS_ONLY(return _remapped_readwrite);
NOT_CDS(returnfalse);
}
#if INCLUDE_CDS // Alignment for the 2 core CDS regions (RW/RO) only. // (Heap region alignments are decided by GC). static size_t core_region_alignment(); staticvoid rewrite_nofast_bytecodes_and_calculate_fingerprints(Thread* thread, InstanceKlass* ik); // print loaded classes names to file. staticvoid dump_loaded_classes(constchar* file_name, TRAPS); #endif
// Allocate a block of memory from the temporary "symbol" region. staticchar* symbol_space_alloc(size_t num_bytes);
// This is the base address as specified by -XX:SharedBaseAddress during -Xshare:dump. // Both the base/top archives are written using this as their base address. // // During static dump: _requested_base_address == SharedBaseAddress. // // During dynamic dump: _requested_base_address is not always the same as SharedBaseAddress: // - SharedBaseAddress is used for *reading the base archive*. I.e., CompactHashtable uses // it to convert offsets to pointers to Symbols in the base archive. // The base archive may be mapped to an OS-selected address due to ASLR. E.g., // you may have SharedBaseAddress == 0x00ff123400000000. // - _requested_base_address is used for *writing the output archive*. It's usually // 0x800000000 (unless it was set by -XX:SharedBaseAddress during -Xshare:dump). staticchar* requested_base_address() { return _requested_base_address;
}
// Non-zero if the archive(s) need to be mapped a non-default location due to ASLR. static intx relocation_delta() { return _relocation_delta; }
staticbool use_windows_memory_mapping() { constbool is_windows = (NOT_WINDOWS(false) WINDOWS_ONLY(true)); //const bool is_windows = true; // enable this to allow testing the windows mmap semantics on Linux, etc. return is_windows;
}
// Can we skip some expensive operations related to modules? staticbool use_optimized_module_handling() { return NOT_CDS(false) CDS_ONLY(_use_optimized_module_handling); } staticvoid disable_optimized_module_handling() { _use_optimized_module_handling = false; }
// Can we use the full archived module graph? staticbool use_full_module_graph() NOT_CDS_RETURN_(false); staticvoid disable_full_module_graph() { _use_full_module_graph = false; }
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.