Skip to content

Commit 2b8e967

Browse files
author
David Simms
committedJun 24, 2021
8269279: [lworld] 8269231 causes build failures
Reviewed-by: shade
1 parent f2538f4 commit 2b8e967

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed
 

‎src/hotspot/share/oops/markWord.inline.hpp

+7-3
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,19 @@ inline bool markWord::must_be_preserved_for_promotion_failure(const oopDesc* obj
7070

7171
inline markWord markWord::prototype_for_klass(const Klass* klass) {
7272
markWord prototype_header = klass->prototype_header();
73+
#ifdef _LP64
7374
assert(prototype_header == prototype() ||
7475
(UseBiasedLocking && prototype_header.has_bias_pattern())
7576
|| prototype_header.is_inline_type()
76-
#ifdef _LP64
7777
|| prototype_header.is_flat_array()
7878
|| prototype_header.is_null_free_array()
79-
#endif
8079
, "corrupt prototype header");
81-
80+
#else
81+
assert(prototype_header == prototype() ||
82+
(UseBiasedLocking && prototype_header.has_bias_pattern())
83+
|| prototype_header.is_inline_type()
84+
, "corrupt prototype header");
85+
#endif
8286
return prototype_header;
8387
}
8488

‎src/hotspot/share/prims/unsafe.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,8 @@ static void assert_and_log_unsafe_value_access(oop p, jlong offset, InlineKlass*
298298
assert(fd.is_inlined(), "field not flat");
299299
} else {
300300
if (log_is_enabled(Trace, valuetypes)) {
301-
log_trace(valuetypes)("not a field in %s at offset " JLONG_FORMAT_X,
302-
p->klass()->external_name(), offset);
301+
log_trace(valuetypes)("not a field in %s at offset " UINT64_FORMAT_X,
302+
p->klass()->external_name(), (uint64_t)offset);
303303
}
304304
}
305305
} else if (k->is_flatArray_klass()) {
@@ -316,12 +316,12 @@ static void assert_and_log_unsafe_value_access(oop p, jlong offset, InlineKlass*
316316
FlatArrayKlass* vak = FlatArrayKlass::cast(k);
317317
int index = (offset - vak->array_header_in_bytes()) / vak->element_byte_size();
318318
address dest = (address)((flatArrayOop)p)->value_at_addr(index, vak->layout_helper());
319-
log_trace(valuetypes)("%s array type %s index %d element size %d offset " JLONG_FORMAT_X " at " INTPTR_FORMAT,
319+
log_trace(valuetypes)("%s array type %s index %d element size %d offset " UINT64_FORMAT_X " at " INTPTR_FORMAT,
320320
p->klass()->external_name(), vak->external_name(),
321-
index, vak->element_byte_size(), offset, p2i(dest));
321+
index, vak->element_byte_size(), (uint64_t)offset, p2i(dest));
322322
} else {
323-
log_trace(valuetypes)("%s field type %s at offset " JLONG_FORMAT_X,
324-
p->klass()->external_name(), vk->external_name(), offset);
323+
log_trace(valuetypes)("%s field type %s at offset " UINT64_FORMAT_X,
324+
p->klass()->external_name(), vk->external_name(), (uint64_t)offset);
325325
}
326326
}
327327
}

‎src/hotspot/share/utilities/globalDefinitions.hpp

-4
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ class oopDesc;
104104
// Format 64-bit quantities.
105105
#define INT64_FORMAT "%" PRId64
106106
#define UINT64_FORMAT "%" PRIu64
107-
#define INT64_FORMAT_X "%" PRIx64
108107
#define UINT64_FORMAT_X "%" PRIx64
109108
#define INT64_FORMAT_W(width) "%" #width PRId64
110109
#define UINT64_FORMAT_W(width) "%" #width PRIu64
@@ -119,9 +118,6 @@ class oopDesc;
119118
#ifndef JLONG_FORMAT_W
120119
#define JLONG_FORMAT_W(width) INT64_FORMAT_W(width)
121120
#endif
122-
#ifndef JLONG_FORMAT_X
123-
#define JLONG_FORMAT_X INT64_FORMAT_X
124-
#endif
125121
#ifndef JULONG_FORMAT
126122
#define JULONG_FORMAT UINT64_FORMAT
127123
#endif

0 commit comments

Comments
 (0)