# HG changeset patch # User twisti # Date 1375226101 25200 # Node ID 19a7856e3ab9d59650ecc8bcf7c400868ae4d2e5 # Parent 4ea54634f03e69b41b8bafc7a8e92efced44f38a remove SafepointPollOffset diff -r 4ea54634f03e -r 19a7856e3ab9 graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64SafepointOp.java --- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64SafepointOp.java Tue Jul 30 13:03:28 2013 -0700 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64SafepointOp.java Tue Jul 30 16:15:01 2013 -0700 @@ -23,8 +23,6 @@ package com.oracle.graal.hotspot.amd64; import static com.oracle.graal.amd64.AMD64.*; -import static com.oracle.graal.phases.GraalOptions.*; -import sun.misc.*; import com.oracle.graal.api.code.*; import com.oracle.graal.api.meta.*; @@ -42,8 +40,6 @@ @Opcode("SAFEPOINT") public class AMD64SafepointOp extends AMD64LIRInstruction { - private static final Unsafe unsafe = Unsafe.getUnsafe(); - @State protected LIRFrameState state; @Temp({OperandFlag.REG}) private AllocatableValue temp; @@ -57,11 +53,10 @@ @Override public void emitCode(TargetMethodAssembler tasm, AMD64MacroAssembler asm) { - int pos = asm.codeBuffer.position(); - int offset = SafepointPollOffset.getValue() % unsafe.pageSize(); + final int pos = asm.codeBuffer.position(); RegisterValue scratch = (RegisterValue) temp; if (config.isPollingPageFar) { - asm.movq(scratch.getRegister(), config.safepointPollingAddress + offset); + asm.movq(scratch.getRegister(), config.safepointPollingAddress); tasm.recordMark(Marks.MARK_POLL_FAR); tasm.recordInfopoint(pos, state, InfopointReason.SAFEPOINT); asm.movq(scratch.getRegister(), new AMD64Address(scratch.getRegister())); @@ -70,7 +65,7 @@ tasm.recordInfopoint(pos, state, InfopointReason.SAFEPOINT); // The C++ code transforms the polling page offset into an RIP displacement // to the real address at that offset in the polling page. - asm.movq(scratch.getRegister(), new AMD64Address(rip, offset)); + asm.movq(scratch.getRegister(), new AMD64Address(rip, 0)); } } } diff -r 4ea54634f03e -r 19a7856e3ab9 graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCSafepointOp.java --- a/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCSafepointOp.java Tue Jul 30 13:03:28 2013 -0700 +++ b/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCSafepointOp.java Tue Jul 30 16:15:01 2013 -0700 @@ -24,8 +24,6 @@ import static com.oracle.graal.asm.sparc.SPARCMacroAssembler.*; import static com.oracle.graal.sparc.SPARC.*; -import static com.oracle.graal.phases.GraalOptions.*; -import sun.misc.*; import com.oracle.graal.api.code.*; import com.oracle.graal.api.meta.*; @@ -42,8 +40,6 @@ @Opcode("SAFEPOINT") public class SPARCSafepointOp extends SPARCLIRInstruction { - private static final Unsafe unsafe = Unsafe.getUnsafe(); - @State protected LIRFrameState state; @Temp({OperandFlag.REG}) private AllocatableValue temp; @@ -58,9 +54,8 @@ @Override public void emitCode(TargetMethodAssembler tasm, SPARCMacroAssembler masm) { final int pos = masm.codeBuffer.position(); - final int offset = SafepointPollOffset.getValue() % unsafe.pageSize(); Register scratch = ((RegisterValue) temp).getRegister(); - new Setx(config.safepointPollingAddress + offset, scratch).emit(masm); + new Setx(config.safepointPollingAddress, scratch).emit(masm); tasm.recordInfopoint(pos, state, InfopointReason.SAFEPOINT); new Ldx(new SPARCAddress(scratch, 0), g0).emit(masm); } diff -r 4ea54634f03e -r 19a7856e3ab9 graal/com.oracle.graal.phases/src/com/oracle/graal/phases/GraalOptions.java --- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/GraalOptions.java Tue Jul 30 13:03:28 2013 -0700 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/GraalOptions.java Tue Jul 30 16:15:01 2013 -0700 @@ -230,8 +230,6 @@ public static final OptionValue ResolveClassBeforeStaticInvoke = new OptionValue<>(false); @Option(help = "") public static final OptionValue CanOmitFrame = new OptionValue<>(true); - @Option(help = "") - public static final OptionValue SafepointPollOffset = new OptionValue<>(256); @Option(help = "") public static final OptionValue MemoryAwareScheduling = new OptionValue<>(true);