# HG changeset patch # User Thomas Wuerthinger # Date 1432989076 -7200 # Node ID f2a6088ddebc66a1bc4384011bf430e79eda6ff8 # Parent d246f7b5916638abf089b5227e67f0520e618dd9 Reduce the number of foreign calls in monitorenter snippets. diff -r d246f7b59166 -r f2a6088ddebc graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/MonitorSnippets.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/MonitorSnippets.java Fri May 29 22:49:07 2015 -0700 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/MonitorSnippets.java Sat May 30 14:31:16 2015 +0200 @@ -190,8 +190,6 @@ // owns the bias and we need to revoke that bias. The revocation will occur // in the interpreter runtime. traceObject(trace, "+lock{stub:revoke}", object, true); - monitorenterStubC(MONITORENTER, object, lock); - return; } else { // At this point we know the epoch has expired, meaning that the // current bias owner, if any, is actually invalid. Under these @@ -210,9 +208,9 @@ // succeeded in biasing it toward itself and we need to revoke that // bias. The revocation will occur in the runtime in the slow case. traceObject(trace, "+lock{stub:epoch-expired}", object, true); - monitorenterStubC(MONITORENTER, object, lock); - return; } + monitorenterStubC(MONITORENTER, object, lock); + return; } else { // The prototype mark word doesn't have the bias bit set any // more, indicating that objects of this data type are not supposed