8308850: Change JVM options with small ranges that get -Wconversion warnings to 32 bits

Reviewed-by: dholmes, coleenp, dlong
This commit is contained in:
Afshin Zafari 2023-08-14 11:57:17 +00:00
parent 5bfb82e6fa
commit 823f5b930c
7 changed files with 22 additions and 22 deletions

View File

@ -1913,9 +1913,9 @@ void VM_Version::get_processor_features() {
}
}
if (AllocatePrefetchLines > 1) {
log->print_cr(" at distance %d, %d lines of %d bytes", (int) AllocatePrefetchDistance, (int) AllocatePrefetchLines, (int) AllocatePrefetchStepSize);
log->print_cr(" at distance %d, %d lines of %d bytes", AllocatePrefetchDistance, AllocatePrefetchLines, AllocatePrefetchStepSize);
} else {
log->print_cr(" at distance %d, one line of %d bytes", (int) AllocatePrefetchDistance, (int) AllocatePrefetchStepSize);
log->print_cr(" at distance %d, one line of %d bytes", AllocatePrefetchDistance, AllocatePrefetchStepSize);
}
}
@ -3169,7 +3169,7 @@ bool VM_Version::is_intel_tsc_synched_at_init() {
return false;
}
intx VM_Version::allocate_prefetch_distance(bool use_watermark_prefetch) {
int VM_Version::allocate_prefetch_distance(bool use_watermark_prefetch) {
// Hardware prefetching (distance/size in bytes):
// Pentium 3 - 64 / 32
// Pentium 4 - 256 / 128

View File

@ -750,7 +750,7 @@ public:
static bool supports_compare_and_exchange() { return true; }
static intx allocate_prefetch_distance(bool use_watermark_prefetch);
static int allocate_prefetch_distance(bool use_watermark_prefetch);
// SSE2 and later processors implement a 'pause' instruction
// that can be used for efficient implementation of

View File

@ -258,12 +258,12 @@ JVMCIObjectArray CompilerToVM::initialize_intrinsics(JVMCI_TRAPS) {
}
#define PREDEFINED_CONFIG_FLAGS(do_bool_flag, do_int_flag, do_intx_flag, do_uintx_flag) \
do_intx_flag(AllocateInstancePrefetchLines) \
do_intx_flag(AllocatePrefetchDistance) \
do_int_flag(AllocateInstancePrefetchLines) \
do_int_flag(AllocatePrefetchDistance) \
do_intx_flag(AllocatePrefetchInstr) \
do_intx_flag(AllocatePrefetchLines) \
do_intx_flag(AllocatePrefetchStepSize) \
do_intx_flag(AllocatePrefetchStyle) \
do_int_flag(AllocatePrefetchLines) \
do_int_flag(AllocatePrefetchStepSize) \
do_int_flag(AllocatePrefetchStyle) \
do_intx_flag(BciProfileWidth) \
do_bool_flag(BootstrapJVMCI) \
do_bool_flag(CITime) \

View File

@ -65,10 +65,10 @@ JVMFlag::Error ContendedPaddingWidthConstraintFunc(int value, bool verbose) {
}
}
JVMFlag::Error PerfDataSamplingIntervalFunc(intx value, bool verbose) {
JVMFlag::Error PerfDataSamplingIntervalFunc(int value, bool verbose) {
if ((value % PeriodicTask::interval_gran != 0)) {
JVMFlag::printError(verbose,
"PerfDataSamplingInterval (" INTX_FORMAT ") must be "
"PerfDataSamplingInterval (%d) must be "
"evenly divisible by PeriodicTask::interval_gran (%d)\n",
value, PeriodicTask::interval_gran);
return JVMFlag::VIOLATES_CONSTRAINT;

View File

@ -36,7 +36,7 @@
#define RUNTIME_CONSTRAINTS(f) \
f(int, ObjectAlignmentInBytesConstraintFunc) \
f(int, ContendedPaddingWidthConstraintFunc) \
f(intx, PerfDataSamplingIntervalFunc) \
f(int, PerfDataSamplingIntervalFunc) \
f(uintx, VMPageSizeConstraintFunc) \
f(size_t, NUMAInterleaveGranularityConstraintFunc)

View File

@ -443,7 +443,7 @@ const int ObjectAlignmentInBytes = 8;
product(bool, LogEvents, true, DIAGNOSTIC, \
"Enable the various ring buffer event logs") \
\
product(uintx, LogEventsBufferEntries, 20, DIAGNOSTIC, \
product(int, LogEventsBufferEntries, 20, DIAGNOSTIC, \
"Number of ring buffer event logs") \
range(1, NOT_LP64(1*K) LP64_ONLY(1*M)) \
\
@ -1101,7 +1101,7 @@ const int ObjectAlignmentInBytes = 8;
notproduct(bool, CollectIndexSetStatistics, false, \
"Collect information about IndexSets") \
\
develop(intx, FastAllocateSizeLimit, 128*K, \
develop(int, FastAllocateSizeLimit, 128*K, \
/* Note: This value is zero mod 1<<13 for a cheap sparc set. */ \
"Inline allocations larger than this in doublewords must go slow")\
\
@ -1234,28 +1234,28 @@ const int ObjectAlignmentInBytes = 8;
"When using recompilation, never interpret methods " \
"containing loops") \
\
product(intx, AllocatePrefetchStyle, 1, \
product(int, AllocatePrefetchStyle, 1, \
"0 = no prefetch, " \
"1 = generate prefetch instructions for each allocation, " \
"2 = use TLAB watermark to gate allocation prefetch, " \
"3 = generate one prefetch instruction per cache line") \
range(0, 3) \
\
product(intx, AllocatePrefetchDistance, -1, \
product(int, AllocatePrefetchDistance, -1, \
"Distance to prefetch ahead of allocation pointer. " \
"-1: use system-specific value (automatically determined") \
range(-1, 512) \
\
product(intx, AllocatePrefetchLines, 3, \
product(int, AllocatePrefetchLines, 3, \
"Number of lines to prefetch ahead of array allocation pointer") \
range(1, 64) \
\
product(intx, AllocateInstancePrefetchLines, 1, \
product(int, AllocateInstancePrefetchLines, 1, \
"Number of lines to prefetch ahead of instance allocation " \
"pointer") \
range(1, 64) \
\
product(intx, AllocatePrefetchStepSize, 16, \
product(int, AllocatePrefetchStepSize, 16, \
"Step size in bytes of sequential prefetch instructions") \
range(1, 512) \
constraint(AllocatePrefetchStepSizeConstraintFunc,AfterMemoryInit)\
@ -1308,7 +1308,7 @@ const int ObjectAlignmentInBytes = 8;
develop(intx, MallocCatchPtr, -1, \
"Hit breakpoint when mallocing/freeing this pointer") \
\
develop(intx, StackPrintLimit, 100, \
develop(int, StackPrintLimit, 100, \
"number of stack frames to print in VM-level stack dump") \
\
product(int, ErrorLogPrintCodeLimit, 3, DIAGNOSTIC, \
@ -1742,7 +1742,7 @@ const int ObjectAlignmentInBytes = 8;
"The string %p in the file name (if present) " \
"will be replaced by pid") \
\
product(intx, PerfDataSamplingInterval, 50, \
product(int, PerfDataSamplingInterval, 50, \
"Data sampling interval (in milliseconds)") \
range(PeriodicTask::min_interval, max_jint) \
constraint(PerfDataSamplingIntervalFunc, AfterErgo) \

View File

@ -450,7 +450,7 @@ void VMError::print_native_stack(outputStream* st, frame fr, Thread* t, bool pri
// see if it's a valid frame
if (fr.pc()) {
st->print_cr("Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)");
const int limit = max_frames == -1 ? StackPrintLimit : MIN2(max_frames, (int)StackPrintLimit);
const int limit = max_frames == -1 ? StackPrintLimit : MIN2(max_frames, StackPrintLimit);
int count = 0;
while (count++ < limit) {
fr.print_on_error(st, buf, buf_size);