File s390-size_t.patch of Package java-11-openjdk (Revision 96de37bac7c858c049821958dce7fdae)
Currently displaying revision 96de37bac7c858c049821958dce7fdae , Show latest
233
1
--- jdk10/src/share/vm/code/codeCache.cpp 2017-01-13 00:41:16.000000000 +0100
2
+++ jdk10/src/share/vm/code/codeCache.cpp 2017-01-25 10:28:19.880008325 +0100
3
4
add_heap(heap);
5
6
// Reserve Space
7
- size_t size_initial = MIN2(InitialCodeCacheSize, rs.size());
8
+ size_t size_initial = MIN2((size_t)InitialCodeCacheSize, rs.size());
9
size_initial = round_to(size_initial, os::vm_page_size());
10
if (!heap->reserve(rs, size_initial, CodeCacheSegmentSize)) {
11
vm_exit_during_initialization("Could not reserve enough space for code cache");
12
--- jdk10/src/share/vm/gc/cms/compactibleFreeListSpace.cpp 2017-01-13 00:41:16.000000000 +0100
13
+++ jdk10/src/share/vm/gc/cms/compactibleFreeListSpace.cpp 2017-01-25 10:28:19.880008325 +0100
14
15
//
16
size_t multiple = (size_t) (_num_blocks[word_sz]/(((double)CMSOldPLABToleranceFactor)*CMSOldPLABNumRefills*n_blks));
17
n_blks += CMSOldPLABReactivityFactor*multiple*n_blks;
18
- n_blks = MIN2(n_blks, CMSOldPLABMax);
19
+ n_blks = MIN2(n_blks, (size_t)CMSOldPLABMax);
20
}
21
assert(n_blks > 0, "Error");
22
_cfls->par_get_chunk_of_blocks(word_sz, n_blks, fl);
23
--- jdk10/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp 2017-01-13 00:41:16.000000000 +0100
24
+++ jdk10/src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp 2017-01-25 10:28:19.884008234 +0100
25
26
if (free_percentage < desired_free_percentage) {
27
size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage));
28
assert(desired_capacity >= capacity(), "invalid expansion size");
29
- size_t expand_bytes = MAX2(desired_capacity - capacity(), MinHeapDeltaBytes);
30
+ size_t expand_bytes = MAX2(desired_capacity - capacity(), (size_t)MinHeapDeltaBytes);
31
Log(gc) log;
32
if (log.is_trace()) {
33
size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage));
34
35
HeapWord* curAddr = _markBitMap.startWord();
36
while (curAddr < _markBitMap.endWord()) {
37
size_t remaining = pointer_delta(_markBitMap.endWord(), curAddr);
38
- MemRegion chunk(curAddr, MIN2(CMSBitMapYieldQuantum, remaining));
39
+ MemRegion chunk(curAddr, MIN2((size_t)CMSBitMapYieldQuantum, remaining));
40
_markBitMap.clear_large_range(chunk);
41
if (ConcurrentMarkSweepThread::should_yield() &&
42
!foregroundGCIsActive() &&
43
44
return;
45
}
46
// Double capacity if possible
47
- size_t new_capacity = MIN2(_capacity*2, MarkStackSizeMax);
48
+ size_t new_capacity = MIN2(_capacity*2, (size_t)MarkStackSizeMax);
49
// Do not give up existing stack until we have managed to
50
// get the double capacity that we desired.
51
ReservedSpace rs(ReservedSpace::allocation_align_size_up(
52
--- jdk10/src/share/vm/gc/cms/parNewGeneration.cpp 2017-01-13 00:41:16.000000000 +0100
53
+++ jdk10/src/share/vm/gc/cms/parNewGeneration.cpp 2017-01-25 10:28:19.884008234 +0100
54
55
const size_t num_overflow_elems = of_stack->size();
56
const size_t space_available = queue->max_elems() - queue->size();
57
const size_t num_take_elems = MIN3(space_available / 4,
58
- ParGCDesiredObjsFromOverflowList,
59
+ (size_t)ParGCDesiredObjsFromOverflowList,
60
num_overflow_elems);
61
// Transfer the most recent num_take_elems from the overflow
62
// stack to our work queue.
63
--- jdk10/src/share/vm/gc/g1/g1CollectedHeap.cpp 2017-01-13 00:41:16.000000000 +0100
64
+++ jdk10/src/share/vm/gc/g1/g1CollectedHeap.cpp 2017-01-25 10:28:19.884008234 +0100
65
66
67
_verifier->verify_region_sets_optional();
68
69
- size_t expand_bytes = MAX2(word_size * HeapWordSize, MinHeapDeltaBytes);
70
+ size_t expand_bytes = MAX2(word_size * HeapWordSize, (size_t)MinHeapDeltaBytes);
71
log_debug(gc, ergo, heap)("Attempt heap expansion (allocation request failed). Allocation request: " SIZE_FORMAT "B",
72
word_size * HeapWordSize);
73
74
--- jdk10/src/share/vm/gc/g1/g1ConcurrentMark.cpp 2017-01-13 00:41:16.000000000 +0100
75
+++ jdk10/src/share/vm/gc/g1/g1ConcurrentMark.cpp 2017-01-25 10:28:19.884008234 +0100
76
77
// of things to do) or totally (at the very end).
78
size_t target_size;
79
if (partially) {
80
- target_size = MIN2((size_t)_task_queue->max_elems()/3, GCDrainStackTargetSize);
81
+ target_size = MIN2((size_t)_task_queue->max_elems()/3, (size_t)GCDrainStackTargetSize);
82
} else {
83
target_size = 0;
84
}
85
--- jdk10/src/share/vm/gc/g1/g1ConcurrentMarkObjArrayProcessor.cpp 2017-01-13 00:41:16.000000000 +0100
86
+++ jdk10/src/share/vm/gc/g1/g1ConcurrentMarkObjArrayProcessor.cpp 2017-01-25 10:30:27.289082074 +0100
87
88
}
89
90
size_t G1CMObjArrayProcessor::process_array_slice(objArrayOop obj, HeapWord* start_from, size_t remaining) {
91
- size_t words_to_scan = MIN2(remaining, ObjArrayMarkingStride);
92
+ size_t words_to_scan = MIN2(remaining, (size_t)ObjArrayMarkingStride);
93
94
if (remaining > ObjArrayMarkingStride) {
95
push_array_slice(start_from + ObjArrayMarkingStride);
96
--- jdk10/src/share/vm/gc/g1/g1PageBasedVirtualSpace.hpp 2017-01-13 00:41:16.000000000 +0100
97
+++ jdk10/src/share/vm/gc/g1/g1PageBasedVirtualSpace.hpp 2017-01-25 10:28:19.884008234 +0100
98
99
void pretouch_internal(size_t start_page, size_t end_page);
100
101
// Returns the index of the page which contains the given address.
102
- uintptr_t addr_to_page_index(char* addr) const;
103
+ size_t addr_to_page_index(char* addr) const;
104
// Returns the address of the given page index.
105
char* page_start(size_t index) const;
106
107
--- jdk10/src/share/vm/gc/parallel/psCompactionManager.inline.hpp 2017-01-13 00:41:16.000000000 +0100
108
+++ jdk10/src/share/vm/gc/parallel/psCompactionManager.inline.hpp 2017-01-25 10:28:19.888008143 +0100
109
110
const size_t beg_index = size_t(index);
111
assert(beg_index < len || len == 0, "index too large");
112
113
- const size_t stride = MIN2(len - beg_index, ObjArrayMarkingStride);
114
+ const size_t stride = MIN2(len - beg_index, (size_t)ObjArrayMarkingStride);
115
const size_t end_index = beg_index + stride;
116
T* const base = (T*)obj->base();
117
T* const beg = base + beg_index;
118
--- jdk10/src/share/vm/gc/parallel/psParallelCompact.cpp 2017-01-13 00:41:16.000000000 +0100
119
+++ jdk10/src/share/vm/gc/parallel/psParallelCompact.cpp 2017-01-25 10:28:19.888008143 +0100
120
121
void PSParallelCompact::initialize_dead_wood_limiter()
122
{
123
const size_t max = 100;
124
- _dwl_mean = double(MIN2(ParallelOldDeadWoodLimiterMean, max)) / 100.0;
125
- _dwl_std_dev = double(MIN2(ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
126
+ _dwl_mean = double(MIN2((size_t)ParallelOldDeadWoodLimiterMean, max)) / 100.0;
127
+ _dwl_std_dev = double(MIN2((size_t)ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
128
_dwl_first_term = 1.0 / (sqrt(2.0 * M_PI) * _dwl_std_dev);
129
DEBUG_ONLY(_dwl_initialized = true;)
130
_dwl_adjustment = normal_distribution(1.0);
131
--- jdk10/src/share/vm/gc/shared/collectorPolicy.cpp 2017-01-13 00:41:16.000000000 +0100
132
+++ jdk10/src/share/vm/gc/shared/collectorPolicy.cpp 2017-01-25 10:28:19.888008143 +0100
133
134
// yield a size that is too small) and bound it by MaxNewSize above.
135
// Ergonomics plays here by previously calculating the desired
136
// NewSize and MaxNewSize.
137
- _max_young_size = MIN2(MAX2(_max_young_size, _initial_young_size), MaxNewSize);
138
+ _max_young_size = MIN2(MAX2(_max_young_size, _initial_young_size), (size_t)MaxNewSize);
139
}
140
141
// Given the maximum young size, determine the initial and
142
143
// NewSize as the floor, because if NewRatio is overly large, the resulting
144
// size can be too small.
145
_initial_young_size =
146
- MIN2(_max_young_size, MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), NewSize));
147
+ MIN2(_max_young_size, MAX2(scale_by_NewRatio_aligned(_initial_heap_byte_size), (size_t)NewSize));
148
}
149
}
150
151
--- jdk10/src/share/vm/gc/shared/plab.cpp 2017-01-13 00:41:16.000000000 +0100
152
+++ jdk10/src/share/vm/gc/shared/plab.cpp 2017-01-25 10:28:19.888008143 +0100
153
154
155
size_t PLAB::min_size() {
156
// Make sure that we return something that is larger than AlignmentReserve
157
- return align_object_size(MAX2(MinTLABSize / HeapWordSize, (uintx)oopDesc::header_size())) + AlignmentReserve;
158
+ return align_object_size(MAX2(MinTLABSize / HeapWordSize, (size_t)oopDesc::header_size())) + AlignmentReserve;
159
}
160
161
size_t PLAB::max_size() {
162
--- jdk10/src/share/vm/memory/metaspace.cpp 2017-01-13 00:41:16.000000000 +0100
163
+++ jdk10/src/share/vm/memory/metaspace.cpp 2017-01-25 10:28:19.888008143 +0100
164
165
166
void MetaspaceGC::post_initialize() {
167
// Reset the high-water mark once the VM initialization is done.
168
- _capacity_until_GC = MAX2(MetaspaceAux::committed_bytes(), MetaspaceSize);
169
+ _capacity_until_GC = MAX2(MetaspaceAux::committed_bytes(), (size_t)MetaspaceSize);
170
}
171
172
bool MetaspaceGC::can_expand(size_t word_size, bool is_class) {
173
174
(size_t)MIN2(min_tmp, double(max_uintx));
175
// Don't shrink less than the initial generation size
176
minimum_desired_capacity = MAX2(minimum_desired_capacity,
177
- MetaspaceSize);
178
+ (size_t)MetaspaceSize);
179
180
log_trace(gc, metaspace)("MetaspaceGC::compute_new_size: ");
181
log_trace(gc, metaspace)(" minimum_free_percentage: %6.2f maximum_used_percentage: %6.2f",
182
183
const double max_tmp = used_after_gc / minimum_used_percentage;
184
size_t maximum_desired_capacity = (size_t)MIN2(max_tmp, double(max_uintx));
185
maximum_desired_capacity = MAX2(maximum_desired_capacity,
186
- MetaspaceSize);
187
+ (size_t)MetaspaceSize);
188
log_trace(gc, metaspace)(" maximum_free_percentage: %6.2f minimum_used_percentage: %6.2f",
189
maximum_free_percentage, minimum_used_percentage);
190
log_trace(gc, metaspace)(" minimum_desired_capacity: %6.1fKB maximum_desired_capacity: %6.1fKB",
191
192
// on the medium chunk list. The next chunk will be small and progress
193
// from there. This size calculated by -version.
194
_first_class_chunk_word_size = MIN2((size_t)MediumChunk*6,
195
- (CompressedClassSpaceSize/BytesPerWord)*2);
196
+ (size_t)(CompressedClassSpaceSize/BytesPerWord)*2);
197
_first_class_chunk_word_size = align_word_size_up(_first_class_chunk_word_size);
198
// Arbitrarily set the initial virtual space to a multiple
199
// of the boot class loader size.
200
--- jdk10/src/share/vm/prims/whitebox.cpp 2017-01-13 00:41:16.000000000 +0100
201
+++ jdk10/src/share/vm/prims/whitebox.cpp 2017-01-25 10:28:19.888008143 +0100
202
203
WB_END
204
205
WB_ENTRY(jobject, WB_GetSizeTVMFlag(JNIEnv* env, jobject o, jstring name))
206
- uintx result;
207
+ size_t result;
208
if (GetVMFlag <size_t> (thread, env, name, &result, &CommandLineFlags::size_tAt)) {
209
ThreadToNativeFromVM ttnfv(thread); // can't be in VM when we call JNI
210
return longBox(thread, env, result);
211
--- jdk10/src/share/vm/runtime/arguments.cpp 2017-01-13 00:41:16.000000000 +0100
212
+++ jdk10/src/share/vm/runtime/arguments.cpp 2017-01-25 10:28:19.892008051 +0100
213
214
// Increase the code cache size - tiered compiles a lot more.
215
if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) {
216
FLAG_SET_ERGO(uintx, ReservedCodeCacheSize,
217
- MIN2(CODE_CACHE_DEFAULT_LIMIT, ReservedCodeCacheSize * 5));
218
+ MIN2(CODE_CACHE_DEFAULT_LIMIT, (size_t)(ReservedCodeCacheSize * 5)));
219
}
220
// Enable SegmentedCodeCache if TieredCompilation is enabled and ReservedCodeCacheSize >= 240M
221
if (FLAG_IS_DEFAULT(SegmentedCodeCache) && ReservedCodeCacheSize >= 240*M) {
222
--- jdk10/src/share/vm/runtime/arguments.hpp 2017-01-13 00:41:16.000000000 +0100
223
+++ jdk10/src/share/vm/runtime/arguments.hpp 2017-01-25 10:28:19.892008051 +0100
224
225
// Value of the conservative maximum heap alignment needed
226
static size_t _conservative_max_heap_alignment;
227
228
- static uintx _min_heap_size;
229
+ static size_t _min_heap_size;
230
231
// -Xrun arguments
232
static AgentLibraryList _libraryList;
233