8203274: 32-bit build failures after JDK-8199712 (Flight Recorder)
Reviewed-by: mgronlun
This commit is contained in:
parent
e5a8494286
commit
6bca38c321
@ -1232,7 +1232,7 @@ static u1* new_bytes_for_lazy_instrumentation(const InstanceKlass* ik,
|
||||
// This means the original constant pool contents are copied unmodified
|
||||
writer.bytes(orig_stream->buffer(), orig_access_flag_offset);
|
||||
assert(writer.is_valid(), "invariant");
|
||||
assert(writer.current_offset() == orig_access_flag_offset, "invariant"); // same positions
|
||||
assert(writer.current_offset() == (intptr_t)orig_access_flag_offset, "invariant"); // same positions
|
||||
// Our writer now sits just after the last original constant pool entry.
|
||||
// I.e. we are in a good position to append new constant pool entries
|
||||
// This array will contain the resolved indexes
|
||||
|
@ -55,7 +55,17 @@ void JfrStringPoolBuffer::set_string_pos(uint64_t value) {
|
||||
}
|
||||
|
||||
void JfrStringPoolBuffer::increment(uint64_t value) {
|
||||
#if !(defined(ARM) || defined(IA32))
|
||||
Atomic::add(value, &_string_count_pos);
|
||||
#else
|
||||
// TODO: This should be fixed in Atomic::add handling for 32-bit platforms,
|
||||
// see JDK-8203283. We workaround the absence of support right here.
|
||||
uint64_t cur, val;
|
||||
do {
|
||||
cur = Atomic::load(&_string_count_top);
|
||||
val = cur + value;
|
||||
} while (Atomic::cmpxchg(val, &_string_count_pos, cur) != cur);
|
||||
#endif
|
||||
}
|
||||
|
||||
void JfrStringPoolBuffer::set_string_top(uint64_t value) {
|
||||
|
@ -66,8 +66,8 @@ static void subtract(size_t dealloc_size) {
|
||||
const size_t total_deallocated = atomic_add_jlong(dealloc_size, &_deallocated_bytes);
|
||||
const size_t current_live_set = atomic_add_jlong(dealloc_size * -1, &_live_set_bytes);
|
||||
log_trace(jfr, system)("Deallocation: [" SIZE_FORMAT "] bytes", dealloc_size);
|
||||
log_trace(jfr, system)("Total dealloc [" JLONG_FORMAT "] bytes", total_deallocated);
|
||||
log_trace(jfr, system)("Liveset: [" JLONG_FORMAT "] bytes", current_live_set);
|
||||
log_trace(jfr, system)("Total dealloc [" SIZE_FORMAT "] bytes", total_deallocated);
|
||||
log_trace(jfr, system)("Liveset: [" SIZE_FORMAT "] bytes", current_live_set);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user