mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-15 16:44:36 +02:00
8203030: Zero s390 31 bit size_t type conflicts in shared code
Cast to size_t or change to size_t foe compatibility with other archs. Reviewed-by: pliden, dholmes
This commit is contained in:
parent
43248585b4
commit
561ec75b9b
13 changed files with 17 additions and 17 deletions
|
@ -81,7 +81,7 @@ private:
|
|||
void check_concurrent_work();
|
||||
void trigger_concurrent_work();
|
||||
|
||||
static uintx item_added();
|
||||
static size_t item_added();
|
||||
static void item_removed();
|
||||
size_t add_items_to_clean(size_t ndead);
|
||||
|
||||
|
|
|
@ -409,7 +409,7 @@ void CodeCache::add_heap(ReservedSpace rs, const char* name, int code_blob_type)
|
|||
add_heap(heap);
|
||||
|
||||
// Reserve Space
|
||||
size_t size_initial = MIN2(InitialCodeCacheSize, rs.size());
|
||||
size_t size_initial = MIN2((size_t)InitialCodeCacheSize, rs.size());
|
||||
size_initial = align_up(size_initial, os::vm_page_size());
|
||||
if (!heap->reserve(rs, size_initial, CodeCacheSegmentSize)) {
|
||||
vm_exit_during_initialization(err_msg("Could not reserve enough space in %s (" SIZE_FORMAT "K)",
|
||||
|
|
|
@ -198,7 +198,7 @@ void CompilerConfig::set_tiered_flags() {
|
|||
// Increase the code cache size - tiered compiles a lot more.
|
||||
if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) {
|
||||
FLAG_SET_ERGO(uintx, ReservedCodeCacheSize,
|
||||
MIN2(CODE_CACHE_DEFAULT_LIMIT, ReservedCodeCacheSize * 5));
|
||||
MIN2(CODE_CACHE_DEFAULT_LIMIT, (size_t)ReservedCodeCacheSize * 5));
|
||||
}
|
||||
// Enable SegmentedCodeCache if TieredCompilation is enabled and ReservedCodeCacheSize >= 240M
|
||||
if (FLAG_IS_DEFAULT(SegmentedCodeCache) && ReservedCodeCacheSize >= 240*M) {
|
||||
|
|
|
@ -203,7 +203,7 @@ bool ParScanThreadState::take_from_overflow_stack() {
|
|||
const size_t num_overflow_elems = of_stack->size();
|
||||
const size_t space_available = queue->max_elems() - queue->size();
|
||||
const size_t num_take_elems = MIN3(space_available / 4,
|
||||
ParGCDesiredObjsFromOverflowList,
|
||||
(size_t)ParGCDesiredObjsFromOverflowList,
|
||||
num_overflow_elems);
|
||||
// Transfer the most recent num_take_elems from the overflow
|
||||
// stack to our work queue.
|
||||
|
|
|
@ -2350,7 +2350,7 @@ void G1CMTask::drain_local_queue(bool partially) {
|
|||
// of things to do) or totally (at the very end).
|
||||
size_t target_size;
|
||||
if (partially) {
|
||||
target_size = MIN2((size_t)_task_queue->max_elems()/3, GCDrainStackTargetSize);
|
||||
target_size = MIN2((size_t)_task_queue->max_elems()/3, (size_t)GCDrainStackTargetSize);
|
||||
} else {
|
||||
target_size = 0;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2018, 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
|
||||
|
@ -31,7 +31,7 @@ void G1CMObjArrayProcessor::push_array_slice(HeapWord* what) {
|
|||
}
|
||||
|
||||
size_t G1CMObjArrayProcessor::process_array_slice(objArrayOop obj, HeapWord* start_from, size_t remaining) {
|
||||
size_t words_to_scan = MIN2(remaining, ObjArrayMarkingStride);
|
||||
size_t words_to_scan = MIN2(remaining, (size_t)ObjArrayMarkingStride);
|
||||
|
||||
if (remaining > ObjArrayMarkingStride) {
|
||||
push_array_slice(start_from + ObjArrayMarkingStride);
|
||||
|
|
|
@ -91,7 +91,7 @@ class G1PageBasedVirtualSpace {
|
|||
void pretouch_internal(size_t start_page, size_t end_page);
|
||||
|
||||
// Returns the index of the page which contains the given address.
|
||||
uintptr_t addr_to_page_index(char* addr) const;
|
||||
size_t addr_to_page_index(char* addr) const;
|
||||
// Returns the address of the given page index.
|
||||
char* page_start(size_t index) const;
|
||||
|
||||
|
|
|
@ -52,12 +52,12 @@
|
|||
"Use maximum compaction in the Parallel Old garbage collector " \
|
||||
"for a system GC") \
|
||||
\
|
||||
product(uintx, ParallelOldDeadWoodLimiterMean, 50, \
|
||||
product(size_t, ParallelOldDeadWoodLimiterMean, 50, \
|
||||
"The mean used by the parallel compact dead wood " \
|
||||
"limiter (a number between 0-100)") \
|
||||
range(0, 100) \
|
||||
\
|
||||
product(uintx, ParallelOldDeadWoodLimiterStdDev, 80, \
|
||||
product(size_t, ParallelOldDeadWoodLimiterStdDev, 80, \
|
||||
"The standard deviation used by the parallel compact dead wood " \
|
||||
"limiter (a number between 0-100)") \
|
||||
range(0, 100) \
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010, 2018, 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
|
||||
|
@ -118,7 +118,7 @@ inline void oop_pc_follow_contents_specialized(objArrayOop obj, int index, ParCo
|
|||
const size_t beg_index = size_t(index);
|
||||
assert(beg_index < len || len == 0, "index too large");
|
||||
|
||||
const size_t stride = MIN2(len - beg_index, ObjArrayMarkingStride);
|
||||
const size_t stride = MIN2(len - beg_index, (size_t)ObjArrayMarkingStride);
|
||||
const size_t end_index = beg_index + stride;
|
||||
T* const base = (T*)obj->base_raw();
|
||||
T* const beg = base + beg_index;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2018, 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
|
||||
|
@ -32,7 +32,7 @@
|
|||
|
||||
size_t PLAB::min_size() {
|
||||
// Make sure that we return something that is larger than AlignmentReserve
|
||||
return align_object_size(MAX2(MinTLABSize / HeapWordSize, (uintx)oopDesc::header_size())) + AlignmentReserve;
|
||||
return align_object_size(MAX2(MinTLABSize / HeapWordSize, (size_t)oopDesc::header_size())) + AlignmentReserve;
|
||||
}
|
||||
|
||||
size_t PLAB::max_size() {
|
||||
|
|
|
@ -654,7 +654,7 @@ void StringDedupTable::print_statistics() {
|
|||
STRDEDUP_BYTES_PARAM(_table->_size * sizeof(StringDedupEntry*) + (_table->_entries + _entry_cache->size()) * sizeof(StringDedupEntry)));
|
||||
log.debug(" Size: " SIZE_FORMAT ", Min: " SIZE_FORMAT ", Max: " SIZE_FORMAT, _table->_size, _min_size, _max_size);
|
||||
log.debug(" Entries: " UINTX_FORMAT ", Load: " STRDEDUP_PERCENT_FORMAT_NS ", Cached: " UINTX_FORMAT ", Added: " UINTX_FORMAT ", Removed: " UINTX_FORMAT,
|
||||
_table->_entries, percent_of(_table->_entries, _table->_size), _entry_cache->size(), _entries_added, _entries_removed);
|
||||
_table->_entries, percent_of((size_t)_table->_entries, _table->_size), _entry_cache->size(), _entries_added, _entries_removed);
|
||||
log.debug(" Resize Count: " UINTX_FORMAT ", Shrink Threshold: " UINTX_FORMAT "(" STRDEDUP_PERCENT_FORMAT_NS "), Grow Threshold: " UINTX_FORMAT "(" STRDEDUP_PERCENT_FORMAT_NS ")",
|
||||
_resize_count, _table->_shrink_threshold, _shrink_load_factor * 100.0, _table->_grow_threshold, _grow_load_factor * 100.0);
|
||||
log.debug(" Rehash Count: " UINTX_FORMAT ", Rehash Threshold: " UINTX_FORMAT ", Hash Seed: 0x%x", _rehash_count, _rehash_threshold, _table->_hash_seed);
|
||||
|
|
|
@ -1116,7 +1116,7 @@ WB_ENTRY(jobject, WB_GetUint64VMFlag(JNIEnv* env, jobject o, jstring name))
|
|||
WB_END
|
||||
|
||||
WB_ENTRY(jobject, WB_GetSizeTVMFlag(JNIEnv* env, jobject o, jstring name))
|
||||
uintx result;
|
||||
size_t result;
|
||||
if (GetVMFlag <size_t> (thread, env, name, &result, &JVMFlag::size_tAt)) {
|
||||
ThreadToNativeFromVM ttnfv(thread); // can't be in VM when we call JNI
|
||||
return longBox(thread, env, result);
|
||||
|
|
|
@ -333,7 +333,7 @@ class Arguments : AllStatic {
|
|||
// Value of the conservative maximum heap alignment needed
|
||||
static size_t _conservative_max_heap_alignment;
|
||||
|
||||
static uintx _min_heap_size;
|
||||
static size_t _min_heap_size;
|
||||
|
||||
// -Xrun arguments
|
||||
static AgentLibraryList _libraryList;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue