Skip to content

Commit 823f5b9

Browse files
author
Afshin Zafari
committed
8308850: Change JVM options with small ranges that get -Wconversion warnings to 32 bits
Reviewed-by: dholmes, coleenp, dlong
1 parent 5bfb82e commit 823f5b9

File tree

7 files changed

+22
-22
lines changed

7 files changed

+22
-22
lines changed

src/hotspot/cpu/x86/vm_version_x86.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1913,9 +1913,9 @@ void VM_Version::get_processor_features() {
19131913
}
19141914
}
19151915
if (AllocatePrefetchLines > 1) {
1916-
log->print_cr(" at distance %d, %d lines of %d bytes", (int) AllocatePrefetchDistance, (int) AllocatePrefetchLines, (int) AllocatePrefetchStepSize);
1916+
log->print_cr(" at distance %d, %d lines of %d bytes", AllocatePrefetchDistance, AllocatePrefetchLines, AllocatePrefetchStepSize);
19171917
} else {
1918-
log->print_cr(" at distance %d, one line of %d bytes", (int) AllocatePrefetchDistance, (int) AllocatePrefetchStepSize);
1918+
log->print_cr(" at distance %d, one line of %d bytes", AllocatePrefetchDistance, AllocatePrefetchStepSize);
19191919
}
19201920
}
19211921

@@ -3169,7 +3169,7 @@ bool VM_Version::is_intel_tsc_synched_at_init() {
31693169
return false;
31703170
}
31713171

3172-
intx VM_Version::allocate_prefetch_distance(bool use_watermark_prefetch) {
3172+
int VM_Version::allocate_prefetch_distance(bool use_watermark_prefetch) {
31733173
// Hardware prefetching (distance/size in bytes):
31743174
// Pentium 3 - 64 / 32
31753175
// Pentium 4 - 256 / 128

src/hotspot/cpu/x86/vm_version_x86.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ class VM_Version : public Abstract_VM_Version {
750750

751751
static bool supports_compare_and_exchange() { return true; }
752752

753-
static intx allocate_prefetch_distance(bool use_watermark_prefetch);
753+
static int allocate_prefetch_distance(bool use_watermark_prefetch);
754754

755755
// SSE2 and later processors implement a 'pause' instruction
756756
// that can be used for efficient implementation of

src/hotspot/share/jvmci/jvmciCompilerToVMInit.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -258,12 +258,12 @@ JVMCIObjectArray CompilerToVM::initialize_intrinsics(JVMCI_TRAPS) {
258258
}
259259

260260
#define PREDEFINED_CONFIG_FLAGS(do_bool_flag, do_int_flag, do_intx_flag, do_uintx_flag) \
261-
do_intx_flag(AllocateInstancePrefetchLines) \
262-
do_intx_flag(AllocatePrefetchDistance) \
261+
do_int_flag(AllocateInstancePrefetchLines) \
262+
do_int_flag(AllocatePrefetchDistance) \
263263
do_intx_flag(AllocatePrefetchInstr) \
264-
do_intx_flag(AllocatePrefetchLines) \
265-
do_intx_flag(AllocatePrefetchStepSize) \
266-
do_intx_flag(AllocatePrefetchStyle) \
264+
do_int_flag(AllocatePrefetchLines) \
265+
do_int_flag(AllocatePrefetchStepSize) \
266+
do_int_flag(AllocatePrefetchStyle) \
267267
do_intx_flag(BciProfileWidth) \
268268
do_bool_flag(BootstrapJVMCI) \
269269
do_bool_flag(CITime) \

src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ JVMFlag::Error ContendedPaddingWidthConstraintFunc(int value, bool verbose) {
6565
}
6666
}
6767

68-
JVMFlag::Error PerfDataSamplingIntervalFunc(intx value, bool verbose) {
68+
JVMFlag::Error PerfDataSamplingIntervalFunc(int value, bool verbose) {
6969
if ((value % PeriodicTask::interval_gran != 0)) {
7070
JVMFlag::printError(verbose,
71-
"PerfDataSamplingInterval (" INTX_FORMAT ") must be "
71+
"PerfDataSamplingInterval (%d) must be "
7272
"evenly divisible by PeriodicTask::interval_gran (%d)\n",
7373
value, PeriodicTask::interval_gran);
7474
return JVMFlag::VIOLATES_CONSTRAINT;

src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#define RUNTIME_CONSTRAINTS(f) \
3737
f(int, ObjectAlignmentInBytesConstraintFunc) \
3838
f(int, ContendedPaddingWidthConstraintFunc) \
39-
f(intx, PerfDataSamplingIntervalFunc) \
39+
f(int, PerfDataSamplingIntervalFunc) \
4040
f(uintx, VMPageSizeConstraintFunc) \
4141
f(size_t, NUMAInterleaveGranularityConstraintFunc)
4242

src/hotspot/share/runtime/globals.hpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ const int ObjectAlignmentInBytes = 8;
443443
product(bool, LogEvents, true, DIAGNOSTIC, \
444444
"Enable the various ring buffer event logs") \
445445
\
446-
product(uintx, LogEventsBufferEntries, 20, DIAGNOSTIC, \
446+
product(int, LogEventsBufferEntries, 20, DIAGNOSTIC, \
447447
"Number of ring buffer event logs") \
448448
range(1, NOT_LP64(1*K) LP64_ONLY(1*M)) \
449449
\
@@ -1101,7 +1101,7 @@ const int ObjectAlignmentInBytes = 8;
11011101
notproduct(bool, CollectIndexSetStatistics, false, \
11021102
"Collect information about IndexSets") \
11031103
\
1104-
develop(intx, FastAllocateSizeLimit, 128*K, \
1104+
develop(int, FastAllocateSizeLimit, 128*K, \
11051105
/* Note: This value is zero mod 1<<13 for a cheap sparc set. */ \
11061106
"Inline allocations larger than this in doublewords must go slow")\
11071107
\
@@ -1234,28 +1234,28 @@ const int ObjectAlignmentInBytes = 8;
12341234
"When using recompilation, never interpret methods " \
12351235
"containing loops") \
12361236
\
1237-
product(intx, AllocatePrefetchStyle, 1, \
1237+
product(int, AllocatePrefetchStyle, 1, \
12381238
"0 = no prefetch, " \
12391239
"1 = generate prefetch instructions for each allocation, " \
12401240
"2 = use TLAB watermark to gate allocation prefetch, " \
12411241
"3 = generate one prefetch instruction per cache line") \
12421242
range(0, 3) \
12431243
\
1244-
product(intx, AllocatePrefetchDistance, -1, \
1244+
product(int, AllocatePrefetchDistance, -1, \
12451245
"Distance to prefetch ahead of allocation pointer. " \
12461246
"-1: use system-specific value (automatically determined") \
12471247
range(-1, 512) \
12481248
\
1249-
product(intx, AllocatePrefetchLines, 3, \
1249+
product(int, AllocatePrefetchLines, 3, \
12501250
"Number of lines to prefetch ahead of array allocation pointer") \
12511251
range(1, 64) \
12521252
\
1253-
product(intx, AllocateInstancePrefetchLines, 1, \
1253+
product(int, AllocateInstancePrefetchLines, 1, \
12541254
"Number of lines to prefetch ahead of instance allocation " \
12551255
"pointer") \
12561256
range(1, 64) \
12571257
\
1258-
product(intx, AllocatePrefetchStepSize, 16, \
1258+
product(int, AllocatePrefetchStepSize, 16, \
12591259
"Step size in bytes of sequential prefetch instructions") \
12601260
range(1, 512) \
12611261
constraint(AllocatePrefetchStepSizeConstraintFunc,AfterMemoryInit)\
@@ -1308,7 +1308,7 @@ const int ObjectAlignmentInBytes = 8;
13081308
develop(intx, MallocCatchPtr, -1, \
13091309
"Hit breakpoint when mallocing/freeing this pointer") \
13101310
\
1311-
develop(intx, StackPrintLimit, 100, \
1311+
develop(int, StackPrintLimit, 100, \
13121312
"number of stack frames to print in VM-level stack dump") \
13131313
\
13141314
product(int, ErrorLogPrintCodeLimit, 3, DIAGNOSTIC, \
@@ -1742,7 +1742,7 @@ const int ObjectAlignmentInBytes = 8;
17421742
"The string %p in the file name (if present) " \
17431743
"will be replaced by pid") \
17441744
\
1745-
product(intx, PerfDataSamplingInterval, 50, \
1745+
product(int, PerfDataSamplingInterval, 50, \
17461746
"Data sampling interval (in milliseconds)") \
17471747
range(PeriodicTask::min_interval, max_jint) \
17481748
constraint(PerfDataSamplingIntervalFunc, AfterErgo) \

src/hotspot/share/utilities/vmError.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ void VMError::print_native_stack(outputStream* st, frame fr, Thread* t, bool pri
450450
// see if it's a valid frame
451451
if (fr.pc()) {
452452
st->print_cr("Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)");
453-
const int limit = max_frames == -1 ? StackPrintLimit : MIN2(max_frames, (int)StackPrintLimit);
453+
const int limit = max_frames == -1 ? StackPrintLimit : MIN2(max_frames, StackPrintLimit);
454454
int count = 0;
455455
while (count++ < limit) {
456456
fr.print_on_error(st, buf, buf_size);

0 commit comments

Comments
 (0)