Skip to content

Commit 2a0aaff

Browse files
committed
[GR-76434] Improve DynamicCompilationThresholds default behavior
PullRequest: graalpython/4652
2 parents fb70c2f + 29b25a0 commit 2a0aaff

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

graalpython/com.oracle.graal.python.shell/src/com/oracle/graal/python/shell/GraalPythonMain.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,10 +1021,10 @@ private static void applyThroughputJitPreset(Map<String, String> polyglotOptions
10211021
}
10221022

10231023
private static void applyRaisedJitThresholds(Map<String, String> polyglotOptions) {
1024-
polyglotOptions.put("engine.FirstTierCompilationThreshold", "10000");
1025-
polyglotOptions.put("engine.LastTierCompilationThreshold", "100000");
1024+
polyglotOptions.put("engine.FirstTierCompilationThreshold", "2000");
1025+
polyglotOptions.put("engine.LastTierCompilationThreshold", "50000");
10261026
polyglotOptions.put("engine.OSRCompilationThreshold", "200704");
1027-
polyglotOptions.put("engine.SingleTierCompilationThreshold", "100000");
1027+
polyglotOptions.put("engine.SingleTierCompilationThreshold", "10000");
10281028
}
10291029

10301030
private static String toAbsolutePath(String executable) {

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/Python3Core.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,14 +1051,12 @@ private void initializePython3Core(TruffleString coreHome) {
10511051
}
10521052

10531053
private void initializeWindowsCoreFiles(TruffleString coreHome) {
1054-
if (PythonLanguage.getPythonOS() == PythonOS.PLATFORM_WIN32) {
1055-
assert !ImageInfo.inImageBuildtimeCode();
1056-
loadFile(toTruffleStringUncached("_nt"), coreHome);
1057-
loadFile(toTruffleStringUncached("_winapi"), toTruffleStringUncached("modules/_winapi"), coreHome);
1058-
loadFile(toTruffleStringUncached("_overlapped"), toTruffleStringUncached("modules/_overlapped"), coreHome);
1059-
loadFile(toTruffleStringUncached("winreg"), toTruffleStringUncached("modules/winreg"), coreHome);
1060-
loadFile(toTruffleStringUncached("_winreg"), toTruffleStringUncached("modules/_winreg"), coreHome);
1061-
}
1054+
assert !ImageInfo.inImageBuildtimeCode();
1055+
loadFile(toTruffleStringUncached("_nt"), coreHome);
1056+
loadFile(toTruffleStringUncached("_winapi"), toTruffleStringUncached("modules/_winapi"), coreHome);
1057+
loadFile(toTruffleStringUncached("_overlapped"), toTruffleStringUncached("modules/_overlapped"), coreHome);
1058+
loadFile(toTruffleStringUncached("winreg"), toTruffleStringUncached("modules/winreg"), coreHome);
1059+
loadFile(toTruffleStringUncached("_winreg"), toTruffleStringUncached("modules/_winreg"), coreHome);
10621060
}
10631061

10641062
/**
@@ -1069,7 +1067,9 @@ private void initializeWindowsCoreFiles(TruffleString coreHome) {
10691067
public final void postInitialize(Env env) {
10701068
if (!env.isPreInitialization()) {
10711069
initialized = false;
1072-
initializeWindowsCoreFiles(getContext().getCoreHomeOrFail());
1070+
if (PythonLanguage.getPythonOS() == PythonOS.PLATFORM_WIN32) {
1071+
initializeWindowsCoreFiles(getContext().getCoreHomeOrFail());
1072+
}
10731073

10741074
for (PythonBuiltins builtin : builtins) {
10751075
if (builtin.needsPostInitialize()) {

0 commit comments

Comments
 (0)