Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ public static void updateMaxJavaStackTraceDepth(EconomicMap<OptionKey<?>, Object
@Option(help = "Color build output ('always', 'never', or 'auto')", type = OptionType.User)//
public static final HostedOptionKey<String> Color = new HostedOptionKey<>("auto");

public static final boolean hasColorsEnabled(OptionValues values) {
public static boolean hasColorsEnabled(OptionValues values) {
if (Color.hasBeenSet(values)) {
String value = Color.getValue(values);
return switch (value) {
Expand Down Expand Up @@ -871,6 +871,10 @@ protected void onValueUpdate(EconomicMap<OptionKey<?>, Object> values, Integer o
maxJavaStackTraceDepth = newValue;
}
};

/** Use {@link SubstrateOptions#getPageSize()} instead. */
@Option(help = "The largest page size of machines that can run the image. The default of 0 automatically selects a typically suitable value.")//
protected static final HostedOptionKey<Integer> PageSize = new HostedOptionKey<>(0);
}

@Option(help = "Overwrites the available number of processors provided by the OS. Any value <= 0 means using the processor count from the OS.")//
Expand Down Expand Up @@ -934,14 +938,15 @@ public ReportingSupport(Path reportingPath) {
}
}

@Option(help = "Define PageSize of a machine that runs the image. The default = 0 (== same as host machine page size)")//
protected static final HostedOptionKey<Integer> PageSize = new HostedOptionKey<>(0);

@Fold
public static int getPageSize() {
int value = PageSize.getValue();
int value = ConcealedOptions.PageSize.getValue();
if (value == 0) {
return Unsafe.getUnsafe().pageSize();
/*
* Assume at least a 64k page size if none was specified. This maximizes compatibility
* because images can be executed as long as run-time page size <= build-time page size.
*/
return Math.max(64 * 1024, Unsafe.getUnsafe().pageSize());
}
assert value > 0 : value;
return value;
Expand Down