8383163: Build without CDS broken after 8382170

Reviewed-by: kvn, jiefu
This commit is contained in:
Ioi Lam 2026-04-24 05:29:07 +00:00
parent 79fc68c552
commit a0caf2c7bf
2 changed files with 8 additions and 3 deletions

View File

@ -67,9 +67,11 @@ void FreeHeap(void* p) {
os::free(p);
}
#if INCLUDE_CDS
// These are used by the Serviceability Agent even if CDS is disabled
void* MetaspaceObj::_aot_metaspace_base = nullptr;
void* MetaspaceObj::_aot_metaspace_top = nullptr;
#if INCLUDE_CDS
volatile bool MetaspaceObj::_aot_metaspace_range_initialized = false;
void MetaspaceObj::set_aot_metaspace_range(void* base, void* top) {

View File

@ -260,6 +260,11 @@ class MetaspaceObj {
// void deallocate_contents(ClassLoaderData* loader_data);
friend class VMStructs;
// These are used by the Serviceability Agent even if CDS is disabled
static void* _aot_metaspace_base; // (inclusive) low address
static void* _aot_metaspace_top; // (exclusive) high address
public:
// Returns true if the pointer points to a valid MetaspaceObj. A valid
@ -277,8 +282,6 @@ private:
// two pointers to quickly determine if a MetaspaceObj is in the
// AOT cache.
// When AOT/CDS is not enabled, both pointers are set to null.
static void* _aot_metaspace_base; // (inclusive) low address
static void* _aot_metaspace_top; // (exclusive) high address
static volatile bool _aot_metaspace_range_initialized;
static bool aot_metaspace_range_initialized();