changeset 11819:1cb614d6d25b

Readjust branch probabilities of G1 Barriers
author Christos Kotselidis <christos.kotselidis@oracle.com>
date Fri, 27 Sep 2013 19:50:35 +0200
parents 4bae51f0c888
children aeeab846e98c
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/WriteBarrierSnippets.java
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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();