From 489502d8fb476edde12df660880fa9336b9378d6 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Wed, 26 Apr 2023 18:42:47 +0200 Subject: [PATCH 1/5] Drop Solaris from `OS`. --- .../src/com.oracle.svm.core/src/com/oracle/svm/core/OS.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/OS.java b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/OS.java index 5afa60117b2b..1b6d5c27ea85 100644 --- a/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/OS.java +++ b/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/OS.java @@ -31,7 +31,6 @@ public enum OS { DARWIN("Darwin", false), LINUX("Linux", true), - SOLARIS("Solaris", true), WINDOWS("Windows", false); /** @@ -61,9 +60,6 @@ private static OS findCurrent() { if (name.equals("Linux")) { return LINUX; } - if (name.equals("SunOS")) { - return SOLARIS; - } if (name.equals("Mac OS X") || name.equals("Darwin")) { return DARWIN; } From 5060ec8f69fac2433a968a5d150779b6355cc08c Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Mon, 24 Apr 2023 16:25:31 +0200 Subject: [PATCH 2/5] Tweak GC settings of Native Image builder. Optimize for throughput and take available memory into account to reduce memory pressure. --- substratevm/CHANGELOG.md | 1 + .../src/com/oracle/svm/driver/MemoryUtil.java | 211 ++++++++++++++++++ .../com/oracle/svm/driver/NativeImage.java | 74 +----- 3 files changed, 219 insertions(+), 67 deletions(-) create mode 100644 substratevm/src/com.oracle.svm.driver/src/com/oracle/svm/driver/MemoryUtil.java diff --git a/substratevm/CHANGELOG.md b/substratevm/CHANGELOG.md index 57c1f42412f3..51dea37df7f6 100644 --- a/substratevm/CHANGELOG.md +++ b/substratevm/CHANGELOG.md @@ -4,6 +4,7 @@ This changelog summarizes major changes to GraalVM Native Image. ## Version 23.1.0 * (GR-35746) Lower the default aligned chunk size from 1 MB to 512 KB for the serial and epsilon GCs, reducing memory usage and image size in many cases. +* (GR-45673) Improve the memory footprint of the Native Image build process. The builder now takes available memory into account to reduce memory pressure when many other processes are running on the same machine. It also consumes less memory in many cases and is therefore also less likely to fail due to out-of-memory errors. At the same time, we have raised its memory limit from 14GB to 32GB. ## Version 23.0.0 * (GR-40187) Report invalid use of SVM specific classes on image class- or module-path as error. As a temporary workaround, `-H:+AllowDeprecatedBuilderClassesOnImageClasspath` allows turning the error into a warning. diff --git a/substratevm/src/com.oracle.svm.driver/src/com/oracle/svm/driver/MemoryUtil.java b/substratevm/src/com.oracle.svm.driver/src/com/oracle/svm/driver/MemoryUtil.java new file mode 100644 index 000000000000..3d37db0a7742 --- /dev/null +++ b/substratevm/src/com.oracle.svm.driver/src/com/oracle/svm/driver/MemoryUtil.java @@ -0,0 +1,211 @@ +/* + * Copyright (c) 2023, 2023, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package com.oracle.svm.driver; + +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.lang.management.ManagementFactory; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import com.oracle.svm.core.OS; +import com.oracle.svm.core.util.ExitStatus; +import com.oracle.svm.driver.NativeImage.NativeImageError; + +class MemoryUtil { + private static final long KiB_TO_BYTES = 1024; + private static final long MiB_TO_BYTES = 1024 * KiB_TO_BYTES; + + /* Builder needs at least 512MiB for building a helloworld in a reasonable amount of time. */ + private static final long MIN_HEAP_BYTES = 512 * MiB_TO_BYTES; + + /* + * Builder uses at most 32GB to avoid disabling compressed oops (UseCompressedOops). + * Deliberately use GB (not GiB) to stay well below 32GiB when relative maximum is calculated. + */ + private static final long MAX_HEAP_BYTES = 32_000_000_000L; + + /* Use 80% of total system memory in case available memory cannot be determined. */ + private static final double FALLBACK_MAX_RAM_PERCENTAGE = 80.0; + + public static List determineMemoryFlags() { + return List.of( + /* + * Use MaxRAMPercentage to allow users to overwrite max heap setting with + * -XX:MaxRAMPercentage or -Xmx, and freely adjust the min heap with + * -XX:InitialRAMPercentage or -Xms. + */ + "-XX:MaxRAMPercentage=" + determineReasonableMaxRAMPercentage(), + /* + * Optimize for throughput by increasing the goal of the total time for + * garbage collection from 1% to 5% (N=19). This also reduces peak RSS. + */ + "-XX:GCTimeRatio=19", // 1/(1+N) time for GC + /* + * Let builder exit on first OutOfMemoryError to provide for shorter + * feedback loops. + */ + "-XX:+ExitOnOutOfMemoryError"); + } + + /** + * Returns a percentage (0.0-100.0) to be used as a value for the -XX:MaxRAMPercentage flag of + * the builder process. Prefer available memory over total memory to reduce memory pressure on + * the host machine. + */ + private static double determineReasonableMaxRAMPercentage() { + var osBean = (com.sun.management.OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean(); + long totalMemorySize = osBean.getTotalMemorySize(); + long reasonableMaxMemorySize = -1; + reasonableMaxMemorySize = switch (OS.getCurrent()) { + case LINUX -> getAvailableMemorySizeLinux(); + case DARWIN -> getAvailableMemorySizeDarwin(); + case WINDOWS -> getAvailableMemorySizeWindows(); + }; + if (reasonableMaxMemorySize < 0 || reasonableMaxMemorySize > totalMemorySize) { + return FALLBACK_MAX_RAM_PERCENTAGE; + } + if (reasonableMaxMemorySize < MIN_HEAP_BYTES) { + throw new NativeImageError( + "There is not enough memory available on the system (got %sMiB, need at least %sMiB). Consider freeing up memory if builds are slow, for example, by closing applications that you do not need." + .formatted(reasonableMaxMemorySize / MiB_TO_BYTES, MIN_HEAP_BYTES / MiB_TO_BYTES), + null, ExitStatus.OUT_OF_MEMORY.getValue()); + } + reasonableMaxMemorySize = Math.min(reasonableMaxMemorySize, MAX_HEAP_BYTES); + return (double) reasonableMaxMemorySize / totalMemorySize * 100; + } + + /** + * Returns the total amount of available memory in bytes on Linux based on + * /proc/meminfo, otherwise -1. + * + * @see page_alloc.c#L5137 + */ + private static long getAvailableMemorySizeLinux() { + try { + String memAvailableLine = Files.readAllLines(Paths.get("/proc/meminfo")).stream().filter(l -> l.startsWith("MemAvailable")).findFirst().orElse(""); + Matcher m = Pattern.compile("^MemAvailable:\\s+(\\d+) kB").matcher(memAvailableLine); + if (m.matches()) { + return Long.parseLong(m.group(1)) * KiB_TO_BYTES; + } + } catch (Exception e) { + } + return -1; + } + + /** + * Returns the total amount of available memory in bytes on Darwin based on + * vm_stat, otherwise -1. + * + * @see vm_stat.c + */ + private static long getAvailableMemorySizeDarwin() { + try { + Process p = Runtime.getRuntime().exec(new String[]{"vm_stat"}); + try (BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()))) { + String line1 = reader.readLine(); + if (line1 == null) { + return -1; + } + Matcher m1 = Pattern.compile("^Mach Virtual Memory Statistics: \\(page size of (\\d+) bytes\\)").matcher(line1); + long pageSize = -1; + if (m1.matches()) { + pageSize = Long.parseLong(m1.group(1)); + } + if (pageSize <= 0) { + return -1; + } + String line2 = reader.readLine(); + Matcher m2 = Pattern.compile("^Pages free:\\s+(\\d+).").matcher(line2); + long freePages = -1; + if (m2.matches()) { + freePages = Long.parseLong(m2.group(1)); + } + if (freePages <= 0) { + return -1; + } + String line3 = reader.readLine(); + if (!line3.startsWith("Pages active")) { + return -1; + } + String line4 = reader.readLine(); + Matcher m4 = Pattern.compile("^Pages inactive:\\s+(\\d+).").matcher(line4); + long inactivePages = -1; + if (m4.matches()) { + inactivePages = Long.parseLong(m4.group(1)); + } + if (inactivePages <= 0) { + return -1; + } + assert freePages > 0 && inactivePages > 0 && pageSize > 0; + return (freePages + inactivePages) * pageSize; + } finally { + p.waitFor(); + } + } catch (Exception e) { + } + return -1; + } + + /** + * Returns the total amount of available memory in bytes on Windows based on wmic, + * otherwise -1. + * + * @see Win32_OperatingSystem + * class + */ + private static long getAvailableMemorySizeWindows() { + try { + Process p = Runtime.getRuntime().exec(new String[]{"cmd.exe", "/c", "wmic", "OS", "get", "FreePhysicalMemory"}); + try (BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()))) { + String line1 = reader.readLine(); + if (line1 == null || !line1.startsWith("FreePhysicalMemory")) { + return -1; + } + String line2 = reader.readLine(); + if (line2 == null) { + return -1; + } + String line3 = reader.readLine(); + if (line3 == null) { + return -1; + } + Matcher m = Pattern.compile("^(\\d+)\\s+").matcher(line3); + if (m.matches()) { + return Long.parseLong(m.group(1)) * KiB_TO_BYTES; + } + } + p.waitFor(); + } catch (Exception e) { + } + return -1; + } +} diff --git a/substratevm/src/com.oracle.svm.driver/src/com/oracle/svm/driver/NativeImage.java b/substratevm/src/com.oracle.svm.driver/src/com/oracle/svm/driver/NativeImage.java index dc820ab0d1d7..4d835ba3cd5b 100644 --- a/substratevm/src/com.oracle.svm.driver/src/com/oracle/svm/driver/NativeImage.java +++ b/substratevm/src/com.oracle.svm.driver/src/com/oracle/svm/driver/NativeImage.java @@ -29,8 +29,6 @@ import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; -import java.lang.management.ManagementFactory; -import java.lang.management.OperatingSystemMXBean; import java.lang.reflect.Method; import java.nio.charset.StandardCharsets; import java.nio.file.Files; @@ -58,7 +56,6 @@ import java.util.function.BiFunction; import java.util.function.Consumer; import java.util.function.Function; -import java.util.function.Supplier; import java.util.jar.Attributes; import java.util.jar.JarFile; import java.util.jar.Manifest; @@ -252,9 +249,6 @@ private static String oR(OptionKey option) { final String oHInspectServerContentPath = oH(PointstoOptions.InspectServerContentPath); final String oHDeadlockWatchdogInterval = oH(SubstrateOptions.DeadlockWatchdogInterval); - static final String oXmx = "-Xmx"; - static final String oXms = "-Xms"; - final Map imageBuilderEnvironment = new HashMap<>(); private final ArrayList imageBuilderArgs = new ArrayList<>(); private final LinkedHashSet imageBuilderModulePath = new LinkedHashSet<>(); @@ -808,14 +802,7 @@ static void ensureDirectoryExists(Path dir) { private void prepareImageBuildArgs() { addImageBuilderJavaArgs("-Xss10m"); - addImageBuilderJavaArgs(oXms + getXmsValue()); - String xmxVal = getXmxValue(1); - if (!"0".equals(xmxVal)) { - addImageBuilderJavaArgs(oXmx + xmxVal); - } - - /* Let builder exit on first OutOfMemoryError. */ - addImageBuilderJavaArgs("-XX:+ExitOnOutOfMemoryError"); + addImageBuilderJavaArgs(MemoryUtil.determineMemoryFlags()); /* Prevent JVM that runs the image builder to steal focus. */ addImageBuilderJavaArgs("-Djava.awt.headless=true"); @@ -863,27 +850,6 @@ protected static boolean replaceArg(Collection args, String argPrefix, S return elementsRemoved; } - private static T consolidateArgs(Collection args, String argPrefix, - Function fromSuffix, Function toSuffix, - Supplier init, BiFunction combiner) { - T consolidatedValue = null; - boolean needsConsolidate = false; - for (String arg : args) { - if (arg.startsWith(argPrefix)) { - if (consolidatedValue == null) { - consolidatedValue = init.get(); - } else { - needsConsolidate = true; - } - consolidatedValue = combiner.apply(consolidatedValue, fromSuffix.apply(arg.substring(argPrefix.length()))); - } - } - if (consolidatedValue != null && needsConsolidate) { - replaceArg(args, argPrefix, toSuffix.apply(consolidatedValue)); - } - return consolidatedValue; - } - private static LinkedHashSet collectListArgs(Collection args, String argPrefix, String delimiter) { LinkedHashSet allEntries = new LinkedHashSet<>(); for (String arg : args) { @@ -1052,14 +1018,7 @@ private int completeImageBuild() { } } } - /* Perform JavaArgs consolidation - take the maximum of -Xmx, minimum of -Xms */ - Long xmxValue = consolidateArgs(imageBuilderJavaArgs, oXmx, SubstrateOptionsParser::parseLong, String::valueOf, () -> 0L, Math::max); - Long xmsValue = consolidateArgs(imageBuilderJavaArgs, oXms, SubstrateOptionsParser::parseLong, String::valueOf, () -> SubstrateOptionsParser.parseLong(getXmsValue()), Math::max); - if (xmxValue != null) { - if (Long.compareUnsigned(xmsValue, xmxValue) > 0) { - replaceArg(imageBuilderJavaArgs, oXms, Long.toUnsignedString(xmxValue)); - } - } + addImageBuilderJavaArgs(customJavaArgs.toArray(new String[0])); /* Perform option consolidation of imageBuilderArgs */ @@ -2000,14 +1959,15 @@ void showMessagePart(String message) { } void showOutOfMemoryWarning() { + String xmxFlag = "-Xmx"; String lastMaxHeapValue = null; for (String arg : imageBuilderJavaArgs) { - if (arg.startsWith(oXmx)) { - lastMaxHeapValue = arg.substring(oXmx.length()); + if (arg.startsWith(xmxFlag)) { + lastMaxHeapValue = arg; } } - String maxHeapText = lastMaxHeapValue == null ? "" : " (The maximum heap size of the process was set to '" + lastMaxHeapValue + "'.)"; - String additionalAction = lastMaxHeapValue == null ? "" : " or increase the maximum heap size using the '" + oXmx + "' option"; + String maxHeapText = lastMaxHeapValue == null ? "" : " (The maximum heap size of the process was set with '" + lastMaxHeapValue + "'.)"; + String additionalAction = lastMaxHeapValue == null ? "" : " or increase the maximum heap size using the '" + xmxFlag + "' option"; showMessage("The Native Image build process ran out of memory.%s%nPlease make sure your build system has more memory available%s.", maxHeapText, additionalAction); } @@ -2088,26 +2048,6 @@ List getNativeImageArgs() { return Stream.concat(getDefaultNativeImageArgs().stream(), config.getBuildArgs().stream()).toList(); } - protected String getXmsValue() { - return "1g"; - } - - @SuppressWarnings("deprecation") // getTotalPhysicalMemorySize is deprecated after JDK 11 - private static long getPhysicalMemorySize() { - OperatingSystemMXBean osMXBean = ManagementFactory.getOperatingSystemMXBean(); - long totalPhysicalMemorySize = ((com.sun.management.OperatingSystemMXBean) osMXBean).getTotalPhysicalMemorySize(); - return totalPhysicalMemorySize; - } - - protected String getXmxValue(int maxInstances) { - Long memMax = Long.divideUnsigned(Long.divideUnsigned(getPhysicalMemorySize(), 10) * 8, maxInstances); - String maxXmx = "14g"; - if (Long.compareUnsigned(memMax, SubstrateOptionsParser.parseLong(maxXmx)) >= 0) { - return maxXmx; - } - return Long.toUnsignedString(memMax); - } - private static boolean isDumbTerm() { String term = System.getenv().getOrDefault("TERM", ""); return term.isEmpty() || term.equals("dumb") || term.equals("unknown"); From b5a89b1cf116f9197843f3e6bb3c0a0fcdba645a Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Mon, 24 Apr 2023 16:37:54 +0200 Subject: [PATCH 3/5] Extend Peak RSS documentation. --- docs/reference-manual/native-image/BuildOutput.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/reference-manual/native-image/BuildOutput.md b/docs/reference-manual/native-image/BuildOutput.md index 1350509e1461..9c161b95a902 100644 --- a/docs/reference-manual/native-image/BuildOutput.md +++ b/docs/reference-manual/native-image/BuildOutput.md @@ -257,7 +257,10 @@ Increase the amount of available memory to reduce the time to build the native b #### Peak RSS Peak [resident set size](https://en.wikipedia.org/wiki/Resident_set_size) as reported by the operating system. This value indicates the maximum amount of memory consumed by the build process. -If the [GC statistics](#glossary-garbage-collection) do not show any problems, the amount of available memory of the system can be reduced to a value closer to the peak RSS. +By default, the process will only use available memory, so memory that the operating system can make available without having to swap out memory used by other processes. +Therefore, consider freeing up memory if builds are slow, for example, by closing applications that you do not need. +Note that, by default, the build process will also not use more than 32GB if available. +If the [GC statistics](#glossary-garbage-collection) do not show any problems, the amount of total memory of the system can be reduced to a value closer to the peak RSS to lower operational costs. #### CPU load The CPU time used by the process divided by the total process time. From 880fec434f8fe48966e3ec079dbcacf4762b113a Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Tue, 25 Apr 2023 14:24:28 +0200 Subject: [PATCH 4/5] Drop max heap logic for polyglot builds. --- .../src/com/oracle/svm/driver/NativeImage.java | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/substratevm/src/com.oracle.svm.driver/src/com/oracle/svm/driver/NativeImage.java b/substratevm/src/com.oracle.svm.driver/src/com/oracle/svm/driver/NativeImage.java index 4d835ba3cd5b..7bfc189fcade 100644 --- a/substratevm/src/com.oracle.svm.driver/src/com/oracle/svm/driver/NativeImage.java +++ b/substratevm/src/com.oracle.svm.driver/src/com/oracle/svm/driver/NativeImage.java @@ -80,7 +80,6 @@ import com.oracle.svm.core.VM; import com.oracle.svm.core.option.BundleMember; import com.oracle.svm.core.option.OptionUtils; -import com.oracle.svm.core.option.SubstrateOptionsParser; import com.oracle.svm.core.util.ClasspathUtils; import com.oracle.svm.core.util.ExitStatus; import com.oracle.svm.core.util.VMError; @@ -275,7 +274,6 @@ private static String oR(OptionKey option) { private String printFlagsWithExtraHelpOptionQuery = null; final Registry optionRegistry; - private LinkedHashSet enabledLanguages; private final List excludedConfigs = new ArrayList<>(); private final LinkedHashSet addModules = new LinkedHashSet<>(); @@ -828,18 +826,6 @@ private void completeOptionArgs() { if (!enabledOptions.isEmpty()) { addPlainImageBuilderArg(oHFallbackThreshold + SubstrateOptions.NoFallback); } - - /* Determine if truffle is needed- any MacroOption of kind Language counts */ - enabledLanguages = optionRegistry.getEnabledOptions(OptionUtils.MacroOptionKind.Language); - - /* Provide more memory for image building if we have more than one language. */ - if (enabledLanguages.size() > 1) { - long baseMemRequirements = SubstrateOptionsParser.parseLong("4g"); - long memRequirements = baseMemRequirements + enabledLanguages.size() * SubstrateOptionsParser.parseLong("1g"); - /* Add mem-requirement for polyglot building - gets further consolidated (use max) */ - addImageBuilderJavaArgs(oXmx + memRequirements); - } - consolidateListArgs(imageBuilderJavaArgs, "-Dpolyglot.engine.PreinitializeContexts=", ",", Function.identity()); // legacy consolidateListArgs(imageBuilderJavaArgs, "-Dpolyglot.image-build-time.PreinitializeContexts=", ",", Function.identity()); } From 64dbd4f086f08d9becfa9a4dfa6f3d3d5fa627b8 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Wed, 26 Apr 2023 08:15:49 +0200 Subject: [PATCH 5/5] Drop `Xmx` flag from `native-image.properties`. --- sulong/mx.sulong/native-image.properties | 2 -- .../repo/19.3.0.0/r/jre/languages/R/native-image.properties | 3 +-- .../1.0.0.0/jre/languages/python/native-image.properties | 2 +- .../1.0.1.0/jre/languages/python/native-image.properties | 2 +- .../1.1.0.0/jre/languages/python/native-image.properties | 2 +- .../repo/r/1.0.1.0/jre/languages/R/native-image.properties | 3 +-- .../repo/r/1.1.0.0/jre/languages/R/native-image.properties | 3 +-- wasm/mx.wasm/native-image.properties | 2 -- 8 files changed, 6 insertions(+), 13 deletions(-) diff --git a/sulong/mx.sulong/native-image.properties b/sulong/mx.sulong/native-image.properties index 1048550c5fbf..ba9ba63cb417 100644 --- a/sulong/mx.sulong/native-image.properties +++ b/sulong/mx.sulong/native-image.properties @@ -3,8 +3,6 @@ Requires = language:nfi -JavaArgs = -Xmx3G - Args = -H:MaxRuntimeCompileMethods=10000 \ -H:+AddAllCharsets \ --initialize-at-build-time=com.oracle.truffle.llvm,org.antlr.v4.runtime diff --git a/vm/src/org.graalvm.component.installer.test/src/org/graalvm/component/installer/repo/19.3.0.0/r/jre/languages/R/native-image.properties b/vm/src/org.graalvm.component.installer.test/src/org/graalvm/component/installer/repo/19.3.0.0/r/jre/languages/R/native-image.properties index cd825365b6b0..0909c669d51c 100644 --- a/vm/src/org.graalvm.component.installer.test/src/org/graalvm/component/installer/repo/19.3.0.0/r/jre/languages/R/native-image.properties +++ b/vm/src/org.graalvm.component.installer.test/src/org/graalvm/component/installer/repo/19.3.0.0/r/jre/languages/R/native-image.properties @@ -14,8 +14,7 @@ JavaArgs = \ -Dfastr.internal.usenativeeventloop=false \ -Dfastr.internal.defaultdownloadmethod=wget \ -Dfastr.internal.ignorejvmargs=true \ - -Dfastr.use.remote.grid.awt.device=true \ - -Xmx6G + -Dfastr.use.remote.grid.awt.device=true LauncherClass = com.oracle.truffle.r.launcher.RMain LauncherClassPath = lib/graalvm/launcher-common.jar:languages/R/fastr-launcher.jar diff --git a/vm/src/org.graalvm.component.installer.test/src/org/graalvm/component/installer/repo/python/1.0.0.0/jre/languages/python/native-image.properties b/vm/src/org.graalvm.component.installer.test/src/org/graalvm/component/installer/repo/python/1.0.0.0/jre/languages/python/native-image.properties index f320cd166f59..ef2b56324711 100644 --- a/vm/src/org.graalvm.component.installer.test/src/org/graalvm/component/installer/repo/python/1.0.0.0/jre/languages/python/native-image.properties +++ b/vm/src/org.graalvm.component.installer.test/src/org/graalvm/component/installer/repo/python/1.0.0.0/jre/languages/python/native-image.properties @@ -8,7 +8,7 @@ Requires = tool:regex language:llvm LauncherClass = com.oracle.graal.python.shell.GraalPythonMain LauncherClassPath = lib/graalvm/launcher-common.jar:lib/graalvm/graalpython-launcher.jar -JavaArgs = -Xmx4G -Dpolyglot.image-build-time.PreinitializeContexts=python +JavaArgs = -Dpolyglot.image-build-time.PreinitializeContexts=python Args = -H:MaxRuntimeCompileMethods=7000 \ -H:SubstitutionResources=com/oracle/graal/python/aot/substitutions.json diff --git a/vm/src/org.graalvm.component.installer.test/src/org/graalvm/component/installer/repo/python/1.0.1.0/jre/languages/python/native-image.properties b/vm/src/org.graalvm.component.installer.test/src/org/graalvm/component/installer/repo/python/1.0.1.0/jre/languages/python/native-image.properties index f320cd166f59..ef2b56324711 100644 --- a/vm/src/org.graalvm.component.installer.test/src/org/graalvm/component/installer/repo/python/1.0.1.0/jre/languages/python/native-image.properties +++ b/vm/src/org.graalvm.component.installer.test/src/org/graalvm/component/installer/repo/python/1.0.1.0/jre/languages/python/native-image.properties @@ -8,7 +8,7 @@ Requires = tool:regex language:llvm LauncherClass = com.oracle.graal.python.shell.GraalPythonMain LauncherClassPath = lib/graalvm/launcher-common.jar:lib/graalvm/graalpython-launcher.jar -JavaArgs = -Xmx4G -Dpolyglot.image-build-time.PreinitializeContexts=python +JavaArgs = -Dpolyglot.image-build-time.PreinitializeContexts=python Args = -H:MaxRuntimeCompileMethods=7000 \ -H:SubstitutionResources=com/oracle/graal/python/aot/substitutions.json diff --git a/vm/src/org.graalvm.component.installer.test/src/org/graalvm/component/installer/repo/python/1.1.0.0/jre/languages/python/native-image.properties b/vm/src/org.graalvm.component.installer.test/src/org/graalvm/component/installer/repo/python/1.1.0.0/jre/languages/python/native-image.properties index f320cd166f59..ef2b56324711 100644 --- a/vm/src/org.graalvm.component.installer.test/src/org/graalvm/component/installer/repo/python/1.1.0.0/jre/languages/python/native-image.properties +++ b/vm/src/org.graalvm.component.installer.test/src/org/graalvm/component/installer/repo/python/1.1.0.0/jre/languages/python/native-image.properties @@ -8,7 +8,7 @@ Requires = tool:regex language:llvm LauncherClass = com.oracle.graal.python.shell.GraalPythonMain LauncherClassPath = lib/graalvm/launcher-common.jar:lib/graalvm/graalpython-launcher.jar -JavaArgs = -Xmx4G -Dpolyglot.image-build-time.PreinitializeContexts=python +JavaArgs = -Dpolyglot.image-build-time.PreinitializeContexts=python Args = -H:MaxRuntimeCompileMethods=7000 \ -H:SubstitutionResources=com/oracle/graal/python/aot/substitutions.json diff --git a/vm/src/org.graalvm.component.installer.test/src/org/graalvm/component/installer/repo/r/1.0.1.0/jre/languages/R/native-image.properties b/vm/src/org.graalvm.component.installer.test/src/org/graalvm/component/installer/repo/r/1.0.1.0/jre/languages/R/native-image.properties index cd825365b6b0..0909c669d51c 100644 --- a/vm/src/org.graalvm.component.installer.test/src/org/graalvm/component/installer/repo/r/1.0.1.0/jre/languages/R/native-image.properties +++ b/vm/src/org.graalvm.component.installer.test/src/org/graalvm/component/installer/repo/r/1.0.1.0/jre/languages/R/native-image.properties @@ -14,8 +14,7 @@ JavaArgs = \ -Dfastr.internal.usenativeeventloop=false \ -Dfastr.internal.defaultdownloadmethod=wget \ -Dfastr.internal.ignorejvmargs=true \ - -Dfastr.use.remote.grid.awt.device=true \ - -Xmx6G + -Dfastr.use.remote.grid.awt.device=true LauncherClass = com.oracle.truffle.r.launcher.RMain LauncherClassPath = lib/graalvm/launcher-common.jar:languages/R/fastr-launcher.jar diff --git a/vm/src/org.graalvm.component.installer.test/src/org/graalvm/component/installer/repo/r/1.1.0.0/jre/languages/R/native-image.properties b/vm/src/org.graalvm.component.installer.test/src/org/graalvm/component/installer/repo/r/1.1.0.0/jre/languages/R/native-image.properties index cd825365b6b0..0909c669d51c 100644 --- a/vm/src/org.graalvm.component.installer.test/src/org/graalvm/component/installer/repo/r/1.1.0.0/jre/languages/R/native-image.properties +++ b/vm/src/org.graalvm.component.installer.test/src/org/graalvm/component/installer/repo/r/1.1.0.0/jre/languages/R/native-image.properties @@ -14,8 +14,7 @@ JavaArgs = \ -Dfastr.internal.usenativeeventloop=false \ -Dfastr.internal.defaultdownloadmethod=wget \ -Dfastr.internal.ignorejvmargs=true \ - -Dfastr.use.remote.grid.awt.device=true \ - -Xmx6G + -Dfastr.use.remote.grid.awt.device=true LauncherClass = com.oracle.truffle.r.launcher.RMain LauncherClassPath = lib/graalvm/launcher-common.jar:languages/R/fastr-launcher.jar diff --git a/wasm/mx.wasm/native-image.properties b/wasm/mx.wasm/native-image.properties index 616dcb8d33a2..fe9e6b7ec71b 100644 --- a/wasm/mx.wasm/native-image.properties +++ b/wasm/mx.wasm/native-image.properties @@ -1,6 +1,4 @@ # This file contains native-image arguments needed to build graal-wasm -JavaArgs = -Xmx6G - Args = -H:MaxRuntimeCompileMethods=2000 \ --initialize-at-build-time=org.graalvm.wasm \ No newline at end of file