Skip to content

Commit b29c6e9

Browse files
committed
Audit Graal code for JDK-8351157: Clean up x86 GC barriers after 32-bit x86 removal
1 parent 0f5a2b6 commit b29c6e9

File tree

8 files changed

+34
-15
lines changed

8 files changed

+34
-15
lines changed

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/hotspot/amd64/z/AMD64HotSpotZBarrierSetLIRGenerator.java

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,10 @@ public ForeignCallsProvider getForeignCalls() {
101101
/**
102102
* Convert a normal oop into a colored pointer in a single register.
103103
*/
104-
@SyncPort(from = "https://github.com/openjdk/jdk/blob/4acafb809c66589fbbfee9c9a4ba7820f848f0e4/src/hotspot/cpu/x86/gc/z/z_x86_64.ad#L37-L42", sha1 = "344c51c07478c916bdaabb0c697a053e7a2f64dd")
104+
// @formatter:off
105+
@SyncPort(from = "https://github.com/openjdk/jdk/blob/4acafb809c66589fbbfee9c9a4ba7820f848f0e4/src/hotspot/cpu/x86/gc/z/z_x86_64.ad#L37-L42",
106+
sha1 = "344c51c07478c916bdaabb0c697a053e7a2f64dd")
107+
// @formatter:on
105108
public static void zColor(CompilationResultBuilder crb, AMD64MacroAssembler masm, Register ref) {
106109
crb.recordMark(HotSpotMarkId.Z_BARRIER_RELOCATION_FORMAT_LOAD_GOOD_BEFORE_SHL);
107110
masm.shlq(ref, UNPATCHED);
@@ -121,7 +124,10 @@ public static void zColor(CompilationResultBuilder crb, AMD64MacroAssembler masm
121124
/**
122125
* Convert a colored pointer into normal oop.
123126
*/
124-
@SyncPort(from = "https://github.com/openjdk/jdk/blob/4acafb809c66589fbbfee9c9a4ba7820f848f0e4/src/hotspot/cpu/x86/gc/z/z_x86_64.ad#L44-L47", sha1 = "5024a425db7a0d1504713ad9029a68da6089967f")
127+
// @formatter:off
128+
@SyncPort(from = "https://github.com/openjdk/jdk/blob/4acafb809c66589fbbfee9c9a4ba7820f848f0e4/src/hotspot/cpu/x86/gc/z/z_x86_64.ad#L44-L47",
129+
sha1 = "5024a425db7a0d1504713ad9029a68da6089967f")
130+
// @formatter:on
125131
public static void zUncolor(CompilationResultBuilder crb, AMD64MacroAssembler masm, Register ref) {
126132
crb.recordMark(HotSpotMarkId.Z_BARRIER_RELOCATION_FORMAT_LOAD_GOOD_BEFORE_SHL);
127133
masm.shrq(ref, UNPATCHED);
@@ -131,8 +137,12 @@ public static void zUncolor(CompilationResultBuilder crb, AMD64MacroAssembler ma
131137
* Emit the full store barrier with a fast path, and an out of line medium path with a final
132138
* slow path call to the runtime.
133139
*/
134-
@SyncPort(from = "https://github.com/openjdk/jdk/blob/250eb743c112fbcc45bf2b3ded1c644b19893577/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp#L303-L320", sha1 = "9a628c1771df79ae8b4cee89d2863fbd4a4964bc")
135-
@SyncPort(from = "https://github.com/openjdk/jdk/blob/250eb743c112fbcc45bf2b3ded1c644b19893577/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp#L373-L417", sha1 = "7688e7aeab5f1aa413690066355a17c18a4273fa")
140+
// @formatter:off
141+
@SyncPort(from = "https://github.com/openjdk/jdk/blob/7e69b98e0548803b85b04b518929c073f8ffaf8c/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp#L302-L319",
142+
sha1 = "9a628c1771df79ae8b4cee89d2863fbd4a4964bc")
143+
@SyncPort(from = "https://github.com/openjdk/jdk/blob/7e69b98e0548803b85b04b518929c073f8ffaf8c/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp#L372-L416",
144+
sha1 = "7688e7aeab5f1aa413690066355a17c18a4273fa")
145+
// @formatter:on
136146
public static void emitPreWriteBarrier(CompilationResultBuilder crb,
137147
AMD64MacroAssembler masm,
138148
LIRInstruction op,
@@ -208,7 +218,10 @@ public static void emitPreWriteBarrier(CompilationResultBuilder crb,
208218
/**
209219
* Try to perform any local store barrier fixups or dispatch to the slow path.
210220
*/
211-
@SyncPort(from = "https://github.com/openjdk/jdk/blob/250eb743c112fbcc45bf2b3ded1c644b19893577/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp#L453-L508", sha1 = "4b729acf92e6a297229b7f1e957601708c315f4f")
221+
// @formatter:off
222+
@SyncPort(from = "https://github.com/openjdk/jdk/blob/7e69b98e0548803b85b04b518929c073f8ffaf8c/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp#L452-L507",
223+
sha1 = "4b729acf92e6a297229b7f1e957601708c315f4f")
224+
// @formatter:on
212225
static void storeBarrierMedium(CompilationResultBuilder crb,
213226
AMD64MacroAssembler masm,
214227
AMD64Address address,
@@ -273,7 +286,10 @@ static void storeBarrierMedium(CompilationResultBuilder crb,
273286
/**
274287
* Add a value to the store buffer.
275288
*/
276-
@SyncPort(from = "https://github.com/openjdk/jdk/blob/250eb743c112fbcc45bf2b3ded1c644b19893577/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp#L419-L451", sha1 = "638b10c65bb14fa4b254efa4d5bbb1751fdbb6bf")
289+
// @formatter:off
290+
@SyncPort(from = "https://github.com/openjdk/jdk/blob/7e69b98e0548803b85b04b518929c073f8ffaf8c/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp#L418-L450",
291+
sha1 = "638b10c65bb14fa4b254efa4d5bbb1751fdbb6bf")
292+
// @formatter:on
277293
static void storeBarrierBufferAdd(AMD64MacroAssembler masm,
278294
AMD64Address address,
279295
Register tmp1,
@@ -311,7 +327,10 @@ static void storeBarrierBufferAdd(AMD64MacroAssembler masm,
311327
* done with a special stack-only calling convention that saves and restores all registers
312328
* around the call. This simplifies the code generation as no extra registers are required.
313329
*/
314-
@SyncPort(from = "https://github.com/openjdk/jdk/blob/98a93e115137a305aed6b7dbf1d4a7d5906fe77c/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp#L218-L301", sha1 = "16f5bff0a0f68ae40be8dd980b7728d7ee60cd2c")
330+
// @formatter:off
331+
@SyncPort(from = "https://github.com/openjdk/jdk/blob/73c8c755ea638c09147d28080646ee8887ee8283/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp#L218-L300",
332+
sha1 = "b115de722f09759f23e6778fda61d7701fc1cee7")
333+
// @formatter:on
315334
public static void emitLoadBarrier(CompilationResultBuilder crb,
316335
AMD64MacroAssembler masm,
317336
Register resultReg,

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/lir/amd64/AMD64BigIntegerMulAddOp.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@
5959
// @formatter:off
6060
@SyncPort(from = "https://github.com/openjdk/jdk/blob/de29ef3bf3a029f99f340de9f093cd20544217fd/src/hotspot/cpu/x86/stubGenerator_x86_64.cpp#L3378-L3431",
6161
sha1 = "fab3e655909df456c2fc5a065f98aa62aac0bc08")
62-
@SyncPort(from = "https://github.com/openjdk/jdk/blob/250eb743c112fbcc45bf2b3ded1c644b19893577/src/hotspot/cpu/x86/macroAssembler_x86.cpp#L7839-L7873",
62+
@SyncPort(from = "https://github.com/openjdk/jdk/blob/7e69b98e0548803b85b04b518929c073f8ffaf8c/src/hotspot/cpu/x86/macroAssembler_x86.cpp#L7837-L7871",
6363
sha1 = "e68b8c7bdb37d4bd1350c7e1219fdcb419d2618a")
64-
@SyncPort(from = "https://github.com/openjdk/jdk/blob/250eb743c112fbcc45bf2b3ded1c644b19893577/src/hotspot/cpu/x86/macroAssembler_x86.cpp#L8091-L8268",
64+
@SyncPort(from = "https://github.com/openjdk/jdk/blob/7e69b98e0548803b85b04b518929c073f8ffaf8c/src/hotspot/cpu/x86/macroAssembler_x86.cpp#L8089-L8266",
6565
sha1 = "d89ad721deb560178359f86e8c6c96ffc6530878")
6666
// @formatter:on
6767
public final class AMD64BigIntegerMulAddOp extends AMD64LIRInstruction {

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/lir/amd64/AMD64BigIntegerMultiplyToLenOp.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
// @formatter:off
5959
@SyncPort(from = "https://github.com/openjdk/jdk/blob/de29ef3bf3a029f99f340de9f093cd20544217fd/src/hotspot/cpu/x86/stubGenerator_x86_64.cpp#L3143-L3199",
6060
sha1 = "bb78557c95005fea278c78ad114bfdc8e256151a")
61-
@SyncPort(from = "https://github.com/openjdk/jdk/blob/250eb743c112fbcc45bf2b3ded1c644b19893577/src/hotspot/cpu/x86/macroAssembler_x86.cpp#L7095-L7552",
61+
@SyncPort(from = "https://github.com/openjdk/jdk/blob/7e69b98e0548803b85b04b518929c073f8ffaf8c/src/hotspot/cpu/x86/macroAssembler_x86.cpp#L7093-L7550",
6262
sha1 = "0763af542cf9f40a1c542e4834a67fc4b2c74e1c")
6363
// @formatter:on
6464
public final class AMD64BigIntegerMultiplyToLenOp extends AMD64LIRInstruction {

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/lir/amd64/AMD64BigIntegerSquareToLenOp.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
// @formatter:off
5858
@SyncPort(from = "https://github.com/openjdk/jdk/blob/de29ef3bf3a029f99f340de9f093cd20544217fd/src/hotspot/cpu/x86/stubGenerator_x86_64.cpp#L3254-L3299",
5959
sha1 = "b002fbc3aef7b27914cb3dbf66e27e94ffc2d8d9")
60-
@SyncPort(from = "https://github.com/openjdk/jdk/blob/250eb743c112fbcc45bf2b3ded1c644b19893577/src/hotspot/cpu/x86/macroAssembler_x86.cpp#L7776-L8089",
60+
@SyncPort(from = "https://github.com/openjdk/jdk/blob/7e69b98e0548803b85b04b518929c073f8ffaf8c/src/hotspot/cpu/x86/macroAssembler_x86.cpp#L7774-L8087",
6161
sha1 = "2e4ea1436904cbd5a933eb8c687296d9bbefe4f0")
6262
// @formatter:on
6363
public final class AMD64BigIntegerSquareToLenOp extends AMD64LIRInstruction {

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/lir/amd64/AMD64EncodeArrayOp.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
import jdk.vm.ci.meta.Value;
5555

5656
// @formatter:off
57-
@SyncPort(from = "https://github.com/openjdk/jdk/blob/250eb743c112fbcc45bf2b3ded1c644b19893577/src/hotspot/cpu/x86/macroAssembler_x86.cpp#L6934-L7092",
57+
@SyncPort(from = "https://github.com/openjdk/jdk/blob/7e69b98e0548803b85b04b518929c073f8ffaf8c/src/hotspot/cpu/x86/macroAssembler_x86.cpp#L6932-L7090",
5858
sha1 = "90e15d79705bc87ffbefbcaa4bdfa55123c12aba")
5959
// @formatter:on
6060
@Opcode("AMD64_ENCODE_ARRAY")

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/lir/amd64/AMD64RoundFloatToIntegerOp.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
* {@link Math#round} algorithm for details.
4747
*/
4848
// @formatter:off
49-
@SyncPort(from = "https://github.com/openjdk/jdk/blob/250eb743c112fbcc45bf2b3ded1c644b19893577/src/hotspot/cpu/x86/macroAssembler_x86.cpp#L10529-L10625",
49+
@SyncPort(from = "https://github.com/openjdk/jdk/blob/7e69b98e0548803b85b04b518929c073f8ffaf8c/src/hotspot/cpu/x86/macroAssembler_x86.cpp#L10527-L10623",
5050
sha1 = "9e13c7375bbb35809ad79ebd6a9cc19e66f57aa1")
5151
@SyncPort(from = "https://github.com/openjdk/jdk/blob/de29ef3bf3a029f99f340de9f093cd20544217fd/src/hotspot/cpu/x86/stubGenerator_x86_64.cpp#L596-L767",
5252
sha1 = "3b5a811373c3fc9555f9fac0253b5a3a3d094223")

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/lir/amd64/AMD64StringUTF16CompressOp.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
import jdk.vm.ci.meta.Value;
6060

6161
// @formatter:off
62-
@SyncPort(from = "https://github.com/openjdk/jdk/blob/250eb743c112fbcc45bf2b3ded1c644b19893577/src/hotspot/cpu/x86/macroAssembler_x86.cpp#L9348-L9556",
62+
@SyncPort(from = "https://github.com/openjdk/jdk/blob/7e69b98e0548803b85b04b518929c073f8ffaf8c/src/hotspot/cpu/x86/macroAssembler_x86.cpp#L9346-L9554",
6363
sha1 = "3e365037f473204b3f742ab364bd9ad514e72161")
6464
// @formatter:on
6565
@Opcode("AMD64_STRING_COMPRESS")

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/lir/amd64/AMD64VectorizedMismatchOp.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
* instructions where possible.
6262
*/
6363
// @formatter:off
64-
@SyncPort(from = "https://github.com/openjdk/jdk/blob/250eb743c112fbcc45bf2b3ded1c644b19893577/src/hotspot/cpu/x86/macroAssembler_x86.cpp#L7554-L7772",
64+
@SyncPort(from = "https://github.com/openjdk/jdk/blob/7e69b98e0548803b85b04b518929c073f8ffaf8c/src/hotspot/cpu/x86/macroAssembler_x86.cpp#L7552-L7770",
6565
sha1 = "72f9b7a60b75ecabf09fc10cb01a9504be97957a")
6666
// @formatter:on
6767
@Opcode("VECTORIZED_MISMATCH")

0 commit comments

Comments
 (0)