Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion sdk/mx.sdk/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -1382,10 +1382,24 @@ class UniversalDetector {
"toolchain.cmake" : {
"source_type": "string",
"value": '''
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_C_COMPILER <path:MUSL_GCC_TOOLCHAIN>/x86_64-linux-musl-native/bin/gcc)
set(CMAKE_CXX_COMPILER <path:MUSL_GCC_TOOLCHAIN>/x86_64-linux-musl-native/bin/g++)
set(CMAKE_AR <path:MUSL_GCC_TOOLCHAIN>/x86_64-linux-musl-native/bin/ar)
'''
},
},
"dependencies": [
"MUSL_GCC_TOOLCHAIN",
],
},
"aarch64": {
"layout" : {
"toolchain.cmake" : {
"source_type": "string",
"value": '''
set(CMAKE_C_COMPILER <path:MUSL_GCC_TOOLCHAIN>/aarch64-linux-musl-native/bin/gcc)
set(CMAKE_CXX_COMPILER <path:MUSL_GCC_TOOLCHAIN>/aarch64-linux-musl-native/bin/g++)
set(CMAKE_AR <path:MUSL_GCC_TOOLCHAIN>/aarch64-linux-musl-native/bin/ar)
'''
},
},
Expand Down
1 change: 1 addition & 0 deletions substratevm/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ This changelog summarizes major changes to GraalVM Native Image.
* (GR-52844) Add `-Os`, a new optimization mode to configure the optimizer in a way to get the smallest code size.
* (GR-49770) Add support for glob patterns in resource-config files in addition to regexp. The Tracing agent now prints entries in the glob format.
* (GR-46386) Throw missing registration errors for JNI queries when the query was not included in the reachability metadata.
* (GR-51479) Implement cgroup support in native code. See the [README](src/com.oracle.svm.native.libcontainer/README.md) and the [PR description](https://github.com/oracle/graal/pull/8989).

## GraalVM for JDK 22 (Internal Version 24.0.0)
* (GR-48304) Red Hat added support for the JFR event ThreadAllocationStatistics.
Expand Down
2 changes: 1 addition & 1 deletion substratevm/ci/ci.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
local t(limit) = task_spec({timelimit: limit}),

// mx gate build config
local mxgate(tags) = os_arch_jdk_mixin + sg.mxgate(tags, suite="substratevm", suite_short="svm"),
local mxgate(tags) = os_arch_jdk_mixin + sg.mxgate(tags, suite="substratevm", suite_short="svm") + task_spec(common.deps.svm),

local eclipse = task_spec(common.deps.eclipse),
local jdt = task_spec(common.deps.jdt),
Expand Down
47 changes: 47 additions & 0 deletions substratevm/mx.substratevm/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -850,6 +850,52 @@
"jacoco" : "exclude",
},

"com.oracle.svm.native.libcontainer": {
"subDir": "src",
"native": "static_lib",
"multitarget": {
"libc": ["glibc", "musl", "default"],
},
"deliverable" : "svm_container",
"os_arch": {
"linux": {
"<others>": {
"cflags": ["-O2", "-fno-rtti", "-fno-exceptions", "-fvisibility=hidden", "-fPIC",
# defines
"-DNATIVE_IMAGE", "-DLINUX", "-DINCLUDE_SUFFIX_COMPILER=_gcc",
# uncomment to enable debugging
# Note: -O0 might run into linker error because it does not purge unused symbols,
# e.g., '__cxa_pure_virtual'. -O1 or higher avoids the problem.
# "-DASSERT", "-DPRINT_WARNINGS", "-g", "-O1", "-DLOG_LEVEL=6",
# include dirs
"-I<path:com.oracle.svm.native.libcontainer>/src/java.base/share/native/include",
"-I<path:com.oracle.svm.native.libcontainer>/src/java.base/unix/native/include",
"-I<path:com.oracle.svm.native.libcontainer>/src/hotspot",
"-I<path:com.oracle.svm.native.libcontainer>/src/hotspot/share",
"-I<path:com.oracle.svm.native.libcontainer>/src/hotspot/os/linux",
"-I<path:com.oracle.svm.native.libcontainer>/src/hotspot/os/posix",
"-I<path:com.oracle.svm.native.libcontainer>/src/hotspot/os/posix/include",
"-I<path:com.oracle.svm.native.libcontainer>/src/svm",
"-I<path:com.oracle.svm.native.libcontainer>/src/svm/share",
# HotSpot standard flags
# See https://github.com/openjdk/jdk/blob/master/make/autoconf/flags-cflags.m4
# C++ standard
"-std=c++14",
# Always enable optional macros
"-D__STDC_FORMAT_MACROS", "-D__STDC_LIMIT_MACROS", "-D__STDC_CONSTANT_MACROS",
],
"ldflags": ["-Wl,-z,noexecstack"],
},
},
"<others>": {
"<others>": {
"ignore": "only needed on linux",
},
},
},
"jacoco" : "exclude",
},

"svm-jvmfuncs-fallback-builder": {
"class" : "SubstrateJvmFuncsFallbacksBuilder",
},
Expand Down Expand Up @@ -1798,6 +1844,7 @@
"./": [
"dependency:com.oracle.svm.native.libchelper/*",
"dependency:com.oracle.svm.native.jvm.posix/*",
"dependency:com.oracle.svm.native.libcontainer/*",
],
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
import com.oracle.svm.core.heap.NoAllocationVerifier;
import com.oracle.svm.core.heap.ObjectHeader;
import com.oracle.svm.core.heap.ObjectVisitor;
import com.oracle.svm.core.heap.PhysicalMemory;
import com.oracle.svm.core.heap.ReferenceHandler;
import com.oracle.svm.core.heap.ReferenceHandlerThread;
import com.oracle.svm.core.heap.ReferenceInternals;
Expand Down Expand Up @@ -904,7 +903,6 @@ private long totalMemory() {

@Substitute
private long maxMemory() {
PhysicalMemory.size(); // ensure physical memory size is set correctly and not estimated
GCImpl.getPolicy().updateSizeParameters();
return GCImpl.getPolicy().getMaximumHeapSize().rawValue();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
*/
package com.oracle.svm.core.genscavenge;

import jdk.graal.compiler.api.replacements.Fold;
import jdk.graal.compiler.word.Word;
import org.graalvm.nativeimage.Platform;
import org.graalvm.nativeimage.Platforms;
import org.graalvm.word.UnsignedWord;
Expand All @@ -38,6 +36,9 @@
import com.oracle.svm.core.util.UserError;
import com.oracle.svm.core.util.VMError;

import jdk.graal.compiler.api.replacements.Fold;
import jdk.graal.compiler.word.Word;

/** Constants and variables for the size and layout of the heap and behavior of the collector. */
public final class HeapParameters {
@Platforms(Platform.HOSTED_ONLY.class)
Expand Down Expand Up @@ -87,6 +88,13 @@ public static int getMaxSurvivorSpaces() {
* Memory configuration
*/

/**
* Sets the {@link SubstrateGCOptions#MaxHeapSize} option value.
*
* Note that the value is used during VM initialization and stored in various places in the JDK
* in direct or derived form. These usages will <strong>not be updated!</strong> Thus, changing
* the maximum heap size at runtime is not recommended.
*/
public static void setMaximumHeapSize(UnsignedWord value) {
SubstrateGCOptions.MaxHeapSize.update(value.rawValue());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
import com.oracle.svm.core.util.VMError;

@AutomaticallyRegisteredImageSingleton(PhysicalMemorySupport.class)
class PhysicalMemorySupportImpl implements PhysicalMemorySupport {
class DarwinPhysicalMemorySupportImpl implements PhysicalMemorySupport {

@Override
public UnsignedWord size() {
Expand Down

This file was deleted.

This file was deleted.

Loading