Skip to content

Commit c41293a

Browse files
committed
8334695: Fix build failure without zgc after JDK-8333300
Reviewed-by: dnsimon, chagedorn
1 parent 75bea28 commit c41293a

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

src/hotspot/cpu/x86/jvmciCodeInstaller_x86.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -220,6 +220,7 @@ bool CodeInstaller::pd_relocate(address pc, jint mark) {
220220
// see comment above for POLL_FAR
221221
_instructions->relocate(pc, relocInfo::poll_return_type, Assembler::imm_operand);
222222
return true;
223+
#if INCLUDE_ZGC
223224
case Z_BARRIER_RELOCATION_FORMAT_LOAD_GOOD_BEFORE_SHL:
224225
_instructions->relocate(pc, barrier_Relocation::spec(), ZBarrierRelocationFormatLoadGoodBeforeShl);
225226
return true;
@@ -241,6 +242,7 @@ bool CodeInstaller::pd_relocate(address pc, jint mark) {
241242
case Z_BARRIER_RELOCATION_FORMAT_STORE_GOOD_AFTER_MOV:
242243
_instructions->relocate(pc, barrier_Relocation::spec(), ZBarrierRelocationFormatStoreGoodAfterMov);
243244
return true;
245+
#endif
244246
default:
245247
return false;
246248
}

src/hotspot/share/jvmci/jvmciCompilerToVM.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -104,7 +104,9 @@ class CompilerToVM {
104104
static int sizeof_narrowKlass;
105105
static int sizeof_arrayOopDesc;
106106
static int sizeof_BasicLock;
107+
#if INCLUDE_ZGC
107108
static int sizeof_ZStoreBarrierEntry;
109+
#endif
108110

109111
static address dsin;
110112
static address dcos;

src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -123,7 +123,9 @@ int CompilerToVM::Data::sizeof_ConstantPool = sizeof(ConstantPool);
123123
int CompilerToVM::Data::sizeof_narrowKlass = sizeof(narrowKlass);
124124
int CompilerToVM::Data::sizeof_arrayOopDesc = sizeof(arrayOopDesc);
125125
int CompilerToVM::Data::sizeof_BasicLock = sizeof(BasicLock);
126+
#if INCLUDE_ZGC
126127
int CompilerToVM::Data::sizeof_ZStoreBarrierEntry = sizeof(ZStoreBarrierEntry);
128+
#endif
127129

128130
address CompilerToVM::Data::dsin;
129131
address CompilerToVM::Data::dcos;

src/hotspot/share/jvmci/vmStructs_jvmci.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
static_field(CompilerToVM::Data, sizeof_narrowKlass, int) \
122122
static_field(CompilerToVM::Data, sizeof_arrayOopDesc, int) \
123123
static_field(CompilerToVM::Data, sizeof_BasicLock, int) \
124-
static_field(CompilerToVM::Data, sizeof_ZStoreBarrierEntry, int) \
124+
ZGC_ONLY(static_field(CompilerToVM::Data, sizeof_ZStoreBarrierEntry, int)) \
125125
\
126126
static_field(CompilerToVM::Data, dsin, address) \
127127
static_field(CompilerToVM::Data, dcos, address) \

0 commit comments

Comments
 (0)