Mercurial > hg > graal-jvmci-8
changeset 11774:f6eb4866d558
G1 Barriers: don't use ANY_LOCATION
author | Bernhard Urban <bernhard.urban@jku.at> |
---|---|
date | Tue, 24 Sep 2013 16:08:07 +0200 |
parents | 4e2be0ab31a9 |
children | b04b94b71649 f3e5cbd1efae |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/WriteBarrierSnippets.java |
diffstat | 1 files changed, 12 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/WriteBarrierSnippets.java Tue Sep 24 14:11:38 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/WriteBarrierSnippets.java Tue Sep 24 16:08:07 2013 +0200 @@ -63,6 +63,8 @@ "Number of G1 effective Ref Field Read Barriers"); private static final LocationIdentity GC_CARD_LOCATION = new NamedLocationIdentity("GC-Card"); + private static final LocationIdentity GC_LOG_LOCATION = new NamedLocationIdentity("GC-Log"); + private static final LocationIdentity GC_INDEX_LOCATION = new NamedLocationIdentity("GC-Index"); @Snippet public static void serialWriteBarrier(Object object, Object location, @ConstantParameter boolean usePrecise, @ConstantParameter boolean alwaysNull) { @@ -161,8 +163,8 @@ Word nextIndex = indexValue.subtract(wordSize()); Word logAddress = bufferAddress.add(nextIndex); // Log the object to be marked as well as update the SATB's buffer next index. - logAddress.writeWord(0, previousOop); - indexAddress.writeWord(0, nextIndex); + logAddress.writeWord(0, previousOop, GC_LOG_LOCATION); + indexAddress.writeWord(0, nextIndex, GC_INDEX_LOCATION); } else { g1PreBarrierStub(G1WBPRECALL, previousOop.toObject()); } @@ -223,7 +225,7 @@ if (probability(LIKELY_PROBABILITY, cardByte != (byte) 0)) { g1EffectivePostWriteBarrierCounter.inc(); log(trace, "[%d] G1-Post Thread: %p Card: %p \n", gcCycle, thread.rawValue(), Word.unsigned(cardByte).rawValue()); - cardAddress.writeByte(0, (byte) 0); + cardAddress.writeByte(0, (byte) 0, GC_CARD_LOCATION); // If the thread local card queue is full, issue a native call which will // initialize a new one and add the card entry. if (probability(FREQUENT_PROBABILITY, indexValue.notEqual(0))) { @@ -231,8 +233,8 @@ Word logAddress = bufferAddress.add(nextIndex); // Log the object to be scanned as well as update // the card queue's next index. - logAddress.writeWord(0, cardAddress); - indexAddress.writeWord(0, nextIndex); + logAddress.writeWord(0, cardAddress, GC_LOG_LOCATION); + indexAddress.writeWord(0, nextIndex, GC_INDEX_LOCATION); } else { g1PostBarrierStub(G1WBPOSTCALL, cardAddress); } @@ -266,8 +268,8 @@ indexValue = indexValue - wordSize(); Word logAddress = bufferAddress.add(Word.unsigned(indexValue)); // Log the object to be marked as well as update the SATB's buffer next index. - logAddress.writeWord(0, oop); - indexAddress.writeWord(0, Word.unsigned(indexValue)); + logAddress.writeWord(0, oop, GC_LOG_LOCATION); + indexAddress.writeWord(0, Word.unsigned(indexValue), GC_INDEX_LOCATION); } else { g1PreBarrierStub(G1WBPRECALL, oop.toObject()); } @@ -300,7 +302,7 @@ byte cardByte = cardAddress.readByte(0); // If the card is already dirty, (hence already enqueued) skip the insertion. if (cardByte != (byte) 0) { - cardAddress.writeByte(0, (byte) 0); + cardAddress.writeByte(0, (byte) 0, GC_CARD_LOCATION); // If the thread local card queue is full, issue a native call which will // initialize a new one and add the card entry. if (indexValue != 0) { @@ -308,8 +310,8 @@ Word logAddress = bufferAddress.add(Word.unsigned(indexValue)); // Log the object to be scanned as well as update // the card queue's next index. - logAddress.writeWord(0, cardAddress); - indexAddress.writeWord(0, Word.unsigned(indexValue)); + logAddress.writeWord(0, cardAddress, GC_LOG_LOCATION); + indexAddress.writeWord(0, Word.unsigned(indexValue), GC_INDEX_LOCATION); } else { g1PostBarrierStub(G1WBPOSTCALL, cardAddress); }