# HG changeset patch # User Christos Kotselidis # Date 1380304235 -7200 # Node ID 1cb614d6d25bf22e93ba4063170cae4ebb67e44d # Parent 4bae51f0c888e66d364f5f607ec20623fe88aa01 Readjust branch probabilities of G1 Barriers diff -r 4bae51f0c888 -r 1cb614d6d25b graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/WriteBarrierSnippets.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/WriteBarrierSnippets.java Fri Sep 27 12:36:29 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/WriteBarrierSnippets.java Fri Sep 27 19:50:35 2013 +0200 @@ -135,7 +135,7 @@ } g1AttemptedPreWriteBarrierCounter.inc(); // If the concurrent marker is enabled, the barrier is issued. - if (probability(NOT_LIKELY_PROBABILITY, markingValue != (byte) 0)) { + if (probability(NOT_FREQUENT_PROBABILITY, markingValue != (byte) 0)) { // If the previous value has to be loaded (before the write), the load is issued. // The load is always issued except the cases of CAS and referent field. if (probability(LIKELY_PROBABILITY, doLoad)) { @@ -209,7 +209,7 @@ Word cardAddress = cardBase.add(displacement); g1AttemptedPostWriteBarrierCounter.inc(); - if (probability(LIKELY_PROBABILITY, xorResult.notEqual(0))) { + if (probability(FREQUENT_PROBABILITY, xorResult.notEqual(0))) { g1EffectiveAfterXORPostWriteBarrierCounter.inc(); // If the written value is not null continue with the barrier addition. @@ -218,7 +218,7 @@ g1EffectiveAfterNullPostWriteBarrierCounter.inc(); // If the card is already dirty, (hence already enqueued) skip the insertion. - if (probability(LIKELY_PROBABILITY, cardByte != (byte) 0)) { + if (probability(NOT_FREQUENT_PROBABILITY, cardByte != (byte) 0)) { log(trace, "[%d] G1-Post Thread: %p Card: %p \n", gcCycle, thread.rawValue(), Word.unsigned(cardByte).rawValue()); cardAddress.writeByte(0, (byte) 0, GC_CARD_LOCATION); g1ExecutedPostWriteBarrierCounter.inc();