mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 09:34:38 +02:00
8243208: Clean up JVMFlag implementation
Reviewed-by: dholmes, coleenp, gziemski
This commit is contained in:
parent
976acddeb5
commit
5144190ea0
45 changed files with 1586 additions and 1364 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2020, 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
|
||||
|
@ -25,6 +25,7 @@
|
|||
#include "precompiled.hpp"
|
||||
#include "runtime/arguments.hpp"
|
||||
#include "runtime/flags/jvmFlag.hpp"
|
||||
#include "runtime/flags/jvmFlagLimit.hpp"
|
||||
#include "runtime/flags/jvmFlagConstraintsRuntime.hpp"
|
||||
#include "runtime/globals.hpp"
|
||||
#include "runtime/safepointMechanism.hpp"
|
||||
|
@ -131,3 +132,32 @@ JVMFlag::Error PerfDataSamplingIntervalFunc(intx value, bool verbose) {
|
|||
return JVMFlag::SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
JVMFlag::Error VMPageSizeConstraintFunc(uintx value, bool verbose) {
|
||||
uintx min = (uintx)os::vm_page_size();
|
||||
if (value < min) {
|
||||
JVMFlag::printError(verbose,
|
||||
"%s %s=" UINTX_FORMAT " is outside the allowed range [ " UINTX_FORMAT
|
||||
" ... " UINTX_FORMAT " ]\n",
|
||||
JVMFlagLimit::last_checked_flag()->_type,
|
||||
JVMFlagLimit::last_checked_flag()->_name,
|
||||
value, min, max_uintx);
|
||||
return JVMFlag::VIOLATES_CONSTRAINT;
|
||||
}
|
||||
|
||||
return JVMFlag::SUCCESS;
|
||||
}
|
||||
|
||||
JVMFlag::Error NUMAInterleaveGranularityConstraintFunc(size_t value, bool verbose) {
|
||||
size_t min = os::vm_allocation_granularity();
|
||||
size_t max = NOT_LP64(2*G) LP64_ONLY(8192*G);
|
||||
|
||||
if (value < min || value > max) {
|
||||
JVMFlag::printError(verbose,
|
||||
"size_t NUMAInterleaveGranularity=" UINTX_FORMAT " is outside the allowed range [ " UINTX_FORMAT
|
||||
" ... " UINTX_FORMAT " ]\n", value, min, max);
|
||||
return JVMFlag::VIOLATES_CONSTRAINT;
|
||||
}
|
||||
|
||||
return JVMFlag::SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue