Skip to content

Commit d30b29a

Browse files
[GR-30291] Fix GIL related performance regression.
PullRequest: graalpython/1712
2 parents d9e495b + a3d5c32 commit d30b29a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/PythonContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ private static final class AtExitHook {
230230

231231
private static final Assumption singleNativeContext = Truffle.getRuntime().createAssumption("single native context assumption");
232232

233-
private ReentrantLock globalInterpreterLock = new ReentrantLock();
233+
private final ReentrantLock globalInterpreterLock = new ReentrantLock();
234234

235235
/** The thread-local state object. */
236236
private ThreadLocal<PThreadState> customThreadState;

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/object/PythonObjectFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
import com.oracle.graal.python.builtins.modules.PosixModuleBuiltins.PosixFileHandle;
4040
import com.oracle.graal.python.builtins.modules.bz2.BZ2Object;
4141
import com.oracle.graal.python.builtins.modules.io.PBuffered;
42-
import com.oracle.graal.python.builtins.modules.lzma.LZMAObject;
4342
import com.oracle.graal.python.builtins.modules.io.PFileIO;
43+
import com.oracle.graal.python.builtins.modules.lzma.LZMAObject;
4444
import com.oracle.graal.python.builtins.modules.zlib.ZLibCompObject;
4545
import com.oracle.graal.python.builtins.objects.array.PArray;
4646
import com.oracle.graal.python.builtins.objects.bytes.PByteArray;
@@ -223,7 +223,7 @@ public final Shape getShape(Object cls) {
223223
return executeGetShape(cls, true);
224224
}
225225

226-
public final synchronized <T> T trace(T allocatedObject) {
226+
public final <T> T trace(T allocatedObject) {
227227
executeTrace(allocatedObject, AllocationReporter.SIZE_UNKNOWN);
228228
return allocatedObject;
229229
}

0 commit comments

Comments
 (0)