Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JDK-8345785] Adapt JDK-8345687: Improve the implementation of SegmentFactories::allocateSegment #10267

Open
wants to merge 2 commits into
base: galahad
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion common.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

"COMMENT.jdks": "When adding or removing JDKs keep in sync with JDKs in ci/common.jsonnet",
"jdks": {
"galahad-jdk": {"name": "jpg-jdk", "version": "24", "build_id": "jdk-24+27-3513", "platformspecific": true, "extrabundles": ["static-libs"]},
"galahad-jdk": {"name": "jpg-jdk", "version": "24", "build_id": "2024-12-09-1307270.yudi.zheng.jdk", "platformspecific": true, "extrabundles": ["static-libs"]},

"oraclejdk17": {"name": "jpg-jdk", "version": "17.0.7", "build_id": "jdk-17.0.7+8", "platformspecific": true, "extrabundles": ["static-libs"]},
"labsjdk-ce-17": {"name": "labsjdk", "version": "ce-17.0.7+4-jvmci-23.1-b02", "platformspecific": true },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import com.oracle.svm.core.annotate.RecomputeFieldValue.Kind;
import com.oracle.svm.core.annotate.Substitute;
import com.oracle.svm.core.annotate.TargetClass;
import com.oracle.svm.core.annotate.TargetElement;
import com.oracle.svm.core.snippets.KnownIntrinsics;

import jdk.internal.misc.Unsafe;
Expand Down Expand Up @@ -68,7 +69,12 @@ public static ClassLoader latestUserDefinedLoader0() {
@Alias @InjectAccessors(DirectMemoryAccessors.class) //
private static long directMemory;
@Alias @InjectAccessors(PageAlignDirectMemoryAccessors.class) //
private static boolean pageAlignDirectMemory;
@TargetElement(onlyWith = JDKLatest.class) //
private static Boolean pageAlignDirectMemory;

@Alias @InjectAccessors(PageAlignDirectMemoryJDK21Accessors.class) //
@TargetElement(name = "pageAlignDirectMemory", onlyWith = JDK21OrEarlier.class) //
private static boolean pageAlignDirectMemoryJDK21;
}

final class DirectMemoryAccessors {
Expand Down Expand Up @@ -125,7 +131,7 @@ final class PageAlignDirectMemoryAccessors {
private static boolean initialized;
private static boolean pageAlignDirectMemory;

static boolean getPageAlignDirectMemory() {
static Boolean getPageAlignDirectMemory() {
if (!initialized) {
initialize();
}
Expand All @@ -140,3 +146,9 @@ private static void initialize() {
initialized = true;
}
}

final class PageAlignDirectMemoryJDK21Accessors {
static boolean getPageAlignDirectMemory() {
return PageAlignDirectMemoryAccessors.getPageAlignDirectMemory();
}
}
Loading