Skip to content

Commit 77da446

Browse files
author
Datadog Syncup Service
committed
Merge branch 'upstream-master'
2 parents 7a3d464 + d589baf commit 77da446

File tree

24 files changed

+750
-198
lines changed

24 files changed

+750
-198
lines changed

make/Docs.gmk

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,13 @@ JAVA_WARNINGS_ARE_ERRORS ?= -Werror
107107
JAVADOC_OPTIONS := -use -keywords -notimestamp \
108108
-encoding ISO-8859-1 -docencoding UTF-8 -breakiterator \
109109
-splitIndex --system none -javafx --expand-requires transitive \
110-
--override-methods=summary \
111-
--no-external-specs-page
110+
--override-methods=summary
112111

113112
# The reference options must stay stable to allow for comparisons across the
114113
# development cycle.
115114
REFERENCE_OPTIONS := -XDignore.symbol.file=true -use -keywords -notimestamp \
116115
-encoding ISO-8859-1 -breakiterator -splitIndex --system none \
117-
-html5 -javafx --expand-requires transitive \
118-
--no-external-specs-page
116+
-html5 -javafx --expand-requires transitive
119117

120118
# Should we add DRAFT stamps to the generated javadoc?
121119
ifeq ($(VERSION_IS_GA), true)

make/conf/jib-profiles.js

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ var getJibProfilesCommon = function (input, data) {
241241
// List of the main profile names used for iteration
242242
common.main_profile_names = [
243243
"linux-x64", "linux-x86", "macosx-x64", "macosx-aarch64",
244-
"windows-x64", "windows-x86", "windows-aarch64",
244+
"windows-x64", "windows-aarch64",
245245
"linux-aarch64", "linux-arm32", "linux-ppc64le", "linux-s390x",
246246
"linux-riscv64"
247247
];
@@ -465,15 +465,6 @@ var getJibProfilesProfiles = function (input, common, data) {
465465
configure_args: concat(common.configure_args_64bit),
466466
},
467467

468-
"windows-x86": {
469-
target_os: "windows",
470-
target_cpu: "x86",
471-
build_cpu: "x64",
472-
dependencies: ["devkit", "gtest"],
473-
configure_args: concat(common.configure_args_32bit,
474-
"--enable-deprecated-ports"),
475-
},
476-
477468
"windows-aarch64": {
478469
target_os: "windows",
479470
target_cpu: "aarch64",
@@ -716,10 +707,6 @@ var getJibProfilesProfiles = function (input, common, data) {
716707
platform: "windows-x64",
717708
jdk_suffix: "zip",
718709
},
719-
"windows-x86": {
720-
platform: "windows-x86",
721-
jdk_suffix: "zip",
722-
},
723710
"windows-aarch64": {
724711
platform: "windows-aarch64",
725712
jdk_suffix: "zip",

src/hotspot/cpu/riscv/macroAssembler_riscv.cpp

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2461,45 +2461,9 @@ void MacroAssembler::load_long_misaligned(Register dst, Address src, Register tm
24612461
}
24622462
}
24632463

2464-
// reverse bytes in halfword in lower 16 bits and zero-extend
2465-
// Rd[15:0] = Rs[7:0] Rs[15:8] (zero-extend to 64 bits)
2466-
void MacroAssembler::revb_h_h_u(Register Rd, Register Rs, Register tmp) {
2467-
if (UseZbb) {
2468-
rev8(Rd, Rs);
2469-
srli(Rd, Rd, 48);
2470-
return;
2471-
}
2472-
assert_different_registers(Rs, tmp);
2473-
assert_different_registers(Rd, tmp);
2474-
srli(tmp, Rs, 8);
2475-
andi(tmp, tmp, 0xFF);
2476-
andi(Rd, Rs, 0xFF);
2477-
slli(Rd, Rd, 8);
2478-
orr(Rd, Rd, tmp);
2479-
}
2480-
2481-
// reverse bytes in halfwords in lower 32 bits and zero-extend
2482-
// Rd[31:0] = Rs[23:16] Rs[31:24] Rs[7:0] Rs[15:8] (zero-extend to 64 bits)
2483-
void MacroAssembler::revb_h_w_u(Register Rd, Register Rs, Register tmp1, Register tmp2) {
2484-
if (UseZbb) {
2485-
rev8(Rd, Rs);
2486-
rori(Rd, Rd, 32);
2487-
roriw(Rd, Rd, 16);
2488-
zero_extend(Rd, Rd, 32);
2489-
return;
2490-
}
2491-
assert_different_registers(Rs, tmp1, tmp2);
2492-
assert_different_registers(Rd, tmp1, tmp2);
2493-
srli(tmp2, Rs, 16);
2494-
revb_h_h_u(tmp2, tmp2, tmp1);
2495-
revb_h_h_u(Rd, Rs, tmp1);
2496-
slli(tmp2, tmp2, 16);
2497-
orr(Rd, Rd, tmp2);
2498-
}
2499-
25002464
// reverse bytes in lower word, sign-extend
25012465
// Rd[32:0] = Rs[7:0] Rs[15:8] Rs[23:16] Rs[31:24]
2502-
void MacroAssembler::revb_w(Register Rd, Register Rs, Register tmp1, Register tmp2) {
2466+
void MacroAssembler::revbw(Register Rd, Register Rs, Register tmp1, Register tmp2) {
25032467
if (UseZbb) {
25042468
rev8(Rd, Rs);
25052469
srai(Rd, Rd, 32);

src/hotspot/cpu/riscv/macroAssembler_riscv.hpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -912,11 +912,9 @@ class MacroAssembler: public Assembler {
912912
void andn(Register Rd, Register Rs1, Register Rs2);
913913
void orn(Register Rd, Register Rs1, Register Rs2);
914914

915-
// revb
916-
void revb_h_h_u(Register Rd, Register Rs, Register tmp = t0); // reverse bytes in halfword in lower 16 bits, zero-extend
917-
void revb_h_w_u(Register Rd, Register Rs, Register tmp1 = t0, Register tmp2 = t1); // reverse bytes in halfwords in lower 32 bits, zero-extend
918-
void revb_w(Register Rd, Register Rs, Register tmp1 = t0, Register tmp2= t1); // reverse bytes in lower word, sign-extend
919-
void revb(Register Rd, Register Rs, Register tmp1 = t0, Register tmp2 = t1); // reverse bytes in doubleword
915+
// reverse bytes
916+
void revbw(Register Rd, Register Rs, Register tmp1 = t0, Register tmp2= t1); // reverse bytes in lower word, sign-extend
917+
void revb(Register Rd, Register Rs, Register tmp1 = t0, Register tmp2 = t1); // reverse bytes in doubleword
920918

921919
void ror_imm(Register dst, Register src, uint32_t shift, Register tmp = t0);
922920
void rolw_imm(Register dst, Register src, uint32_t, Register tmp = t0);

src/hotspot/cpu/riscv/templateTable_riscv.cpp

Lines changed: 39 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -658,8 +658,12 @@ void TemplateTable::aload() {
658658
}
659659

660660
void TemplateTable::locals_index_wide(Register reg) {
661-
__ lhu(reg, at_bcp(2));
662-
__ revb_h_h_u(reg, reg); // reverse bytes in half-word and zero-extend
661+
assert_different_registers(reg, t1);
662+
// Convert the 16-bit value into native byte-ordering and zero-extend
663+
__ lbu(reg, at_bcp(2));
664+
__ lbu(t1, at_bcp(3));
665+
__ slli(reg, reg, 8);
666+
__ orr(reg, reg, t1);
663667
__ neg(reg, reg);
664668
}
665669

@@ -671,8 +675,12 @@ void TemplateTable::wide_iload() {
671675

672676
void TemplateTable::wide_lload() {
673677
transition(vtos, ltos);
674-
__ lhu(x11, at_bcp(2));
675-
__ revb_h_h_u(x11, x11); // reverse bytes in half-word and zero-extend
678+
// Convert the 16-bit value into native byte-ordering and zero-extend
679+
__ lbu(x11, at_bcp(2));
680+
__ lbu(t1, at_bcp(3));
681+
__ slli(x11, x11, 8);
682+
__ orr(x11, x11, t1);
683+
676684
__ slli(x11, x11, LogBytesPerWord);
677685
__ sub(x11, xlocals, x11);
678686
__ ld(x10, Address(x11, Interpreter::local_offset_in_bytes(1)));
@@ -686,8 +694,12 @@ void TemplateTable::wide_fload() {
686694

687695
void TemplateTable::wide_dload() {
688696
transition(vtos, dtos);
689-
__ lhu(x11, at_bcp(2));
690-
__ revb_h_h_u(x11, x11); // reverse bytes in half-word and zero-extend
697+
// Convert the 16-bit value into native byte-ordering and zero-extend
698+
__ lbu(x11, at_bcp(2));
699+
__ lbu(t1, at_bcp(3));
700+
__ slli(x11, x11, 8);
701+
__ orr(x11, x11, t1);
702+
691703
__ slli(x11, x11, LogBytesPerWord);
692704
__ sub(x11, xlocals, x11);
693705
__ fld(f10, Address(x11, Interpreter::local_offset_in_bytes(1)));
@@ -1471,12 +1483,14 @@ void TemplateTable::iinc() {
14711483

14721484
void TemplateTable::wide_iinc() {
14731485
transition(vtos, vtos);
1474-
__ lwu(x11, at_bcp(2)); // get constant and index
1475-
__ revb_h_w_u(x11, x11); // reverse bytes in half-word (32bit) and zero-extend
1476-
__ zero_extend(x12, x11, 16);
1477-
__ neg(x12, x12);
1478-
__ slli(x11, x11, 32);
1479-
__ srai(x11, x11, 48);
1486+
// get constant
1487+
// Convert the 16-bit value into native byte-ordering and sign-extend
1488+
__ lb(x11, at_bcp(4));
1489+
__ lbu(t1, at_bcp(5));
1490+
__ slli(x11, x11, 8);
1491+
__ orr(x11, x11, t1);
1492+
1493+
locals_index_wide(x12);
14801494
__ ld(x10, iaddress(x12, t0, _masm));
14811495
__ addw(x10, x10, x11);
14821496
__ sd(x10, iaddress(x12, t0, _masm));
@@ -1625,10 +1639,10 @@ void TemplateTable::branch(bool is_jsr, bool is_wide) {
16251639
__ lb(x12, at_bcp(1));
16261640
__ lbu(t1, at_bcp(2));
16271641
__ slli(x12, x12, 8);
1628-
__ add(x12, x12, t1);
1642+
__ orr(x12, x12, t1);
16291643
} else {
16301644
__ lwu(x12, at_bcp(1));
1631-
__ revb_w(x12, x12);
1645+
__ revbw(x12, x12);
16321646
}
16331647

16341648
// Handle all the JSR stuff here, then exit.
@@ -1893,8 +1907,8 @@ void TemplateTable::tableswitch() {
18931907
// load lo & hi
18941908
__ lwu(x12, Address(x11, BytesPerInt));
18951909
__ lwu(x13, Address(x11, 2 * BytesPerInt));
1896-
__ revb_w(x12, x12);
1897-
__ revb_w(x13, x13);
1910+
__ revbw(x12, x12);
1911+
__ revbw(x13, x13);
18981912
// check against lo & hi
18991913
__ blt(x10, x12, default_case);
19001914
__ bgt(x10, x13, default_case);
@@ -1905,7 +1919,7 @@ void TemplateTable::tableswitch() {
19051919
__ profile_switch_case(x10, x11, x12);
19061920
// continue execution
19071921
__ bind(continue_execution);
1908-
__ revb_w(x13, x13);
1922+
__ revbw(x13, x13);
19091923
__ add(xbcp, xbcp, x13);
19101924
__ load_unsigned_byte(t0, Address(xbcp));
19111925
__ dispatch_only(vtos, /*generate_poll*/true);
@@ -1925,7 +1939,7 @@ void TemplateTable::fast_linearswitch() {
19251939
transition(itos, vtos);
19261940
Label loop_entry, loop, found, continue_execution;
19271941
// bswap x10 so we can avoid bswapping the table entries
1928-
__ revb_w(x10, x10);
1942+
__ revbw(x10, x10);
19291943
// align xbcp
19301944
__ la(x9, at_bcp(BytesPerInt)); // btw: should be able to get rid of
19311945
// this instruction (change offsets
@@ -1936,7 +1950,7 @@ void TemplateTable::fast_linearswitch() {
19361950
// Convert the 32-bit npairs (number of pairs) into native byte-ordering
19371951
// We can use sign-extension here because npairs must be greater than or
19381952
// equal to 0 per JVM spec on 'lookupswitch' bytecode.
1939-
__ revb_w(x11, x11);
1953+
__ revbw(x11, x11);
19401954
__ j(loop_entry);
19411955
// table search
19421956
__ bind(loop);
@@ -1957,7 +1971,7 @@ void TemplateTable::fast_linearswitch() {
19571971
__ profile_switch_case(x11, x10, x9);
19581972
// continue execution
19591973
__ bind(continue_execution);
1960-
__ revb_w(x13, x13);
1974+
__ revbw(x13, x13);
19611975
__ add(xbcp, xbcp, x13);
19621976
__ lbu(t0, Address(xbcp, 0));
19631977
__ dispatch_only(vtos, /*generate_poll*/true);
@@ -2012,7 +2026,7 @@ void TemplateTable::fast_binaryswitch() {
20122026
// Convert the 32-bit npairs (number of pairs) into native byte-ordering
20132027
// We can use sign-extension here because npairs must be greater than or
20142028
// equal to 0 per JVM spec on 'lookupswitch' bytecode.
2015-
__ revb_w(j, j);
2029+
__ revbw(j, j);
20162030

20172031
// And start
20182032
Label entry;
@@ -2030,7 +2044,7 @@ void TemplateTable::fast_binaryswitch() {
20302044
// Convert array[h].match to native byte-ordering before compare
20312045
__ shadd(temp, h, array, temp, 3);
20322046
__ lwu(temp, Address(temp, 0));
2033-
__ revb_w(temp, temp);
2047+
__ revbw(temp, temp);
20342048

20352049
Label L_done, L_greater;
20362050
__ bge(key, temp, L_greater);
@@ -2053,14 +2067,14 @@ void TemplateTable::fast_binaryswitch() {
20532067
// Convert array[i].match to native byte-ordering before compare
20542068
__ shadd(temp, i, array, temp, 3);
20552069
__ lwu(temp, Address(temp, 0));
2056-
__ revb_w(temp, temp);
2070+
__ revbw(temp, temp);
20572071
__ bne(key, temp, default_case);
20582072

20592073
// entry found -> j = offset
20602074
__ shadd(temp, i, array, temp, 3);
20612075
__ lwu(j, Address(temp, BytesPerInt));
20622076
__ profile_switch_case(i, key, array);
2063-
__ revb_w(j, j);
2077+
__ revbw(j, j);
20642078

20652079
__ add(temp, xbcp, j);
20662080
__ load_unsigned_byte(t0, Address(temp, 0));
@@ -2073,7 +2087,7 @@ void TemplateTable::fast_binaryswitch() {
20732087
__ bind(default_case);
20742088
__ profile_switch_default(i);
20752089
__ lwu(j, Address(array, -2 * BytesPerInt));
2076-
__ revb_w(j, j);
2090+
__ revbw(j, j);
20772091

20782092
__ add(temp, xbcp, j);
20792093
__ load_unsigned_byte(t0, Address(temp, 0));

src/hotspot/share/gc/serial/tenuredGeneration.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,11 +378,14 @@ void TenuredGeneration::update_counters() {
378378

379379
bool TenuredGeneration::promotion_attempt_is_safe(size_t max_promotion_in_bytes) const {
380380
size_t available = _the_space->free() + _virtual_space.uncommitted_size();
381-
size_t av_promo = (size_t)_avg_promoted->padded_average();
382-
bool res = (available >= av_promo) || (available >= max_promotion_in_bytes);
381+
382+
size_t avg_promoted = (size_t)_avg_promoted->padded_average();
383+
size_t promotion_estimate = MIN2(avg_promoted, max_promotion_in_bytes);
384+
385+
bool res = (promotion_estimate <= available);
383386

384387
log_trace(gc)("Tenured: promo attempt is%s safe: available(" SIZE_FORMAT ") %s av_promo(" SIZE_FORMAT "), max_promo(" SIZE_FORMAT ")",
385-
res? "":" not", available, res? ">=":"<", av_promo, max_promotion_in_bytes);
388+
res? "":" not", available, res? ">=":"<", avg_promoted, max_promotion_in_bytes);
386389

387390
return res;
388391
}

src/hotspot/share/gc/shared/locationPrinter.inline.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
#include "gc/shared/locationPrinter.hpp"
2929

30+
#include "memory/resourceArea.inline.hpp"
3031
#include "oops/compressedOops.inline.hpp"
3132
#include "oops/oopsHierarchy.hpp"
3233

@@ -51,6 +52,7 @@ oop BlockLocationPrinter<CollectedHeapT>::base_oop_or_null(void* addr) {
5152

5253
template <typename CollectedHeapT>
5354
bool BlockLocationPrinter<CollectedHeapT>::print_location(outputStream* st, void* addr) {
55+
ResourceMark rm;
5456
// Check if addr points into Java heap.
5557
bool in_heap = CollectedHeapT::heap()->is_in(addr);
5658
if (in_heap) {

src/hotspot/share/jvmci/jvmciEnv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ JVMCIEnv::~JVMCIEnv() {
613613
if (_init_error_msg != nullptr) {
614614
// The memory allocated in libjvmci was not allocated with os::malloc
615615
// so must not be freed with os::free.
616-
ALLOW_C_FUNCTION(::free((void*) _init_error_msg));
616+
ALLOW_C_FUNCTION(::free, ::free((void*) _init_error_msg);)
617617
}
618618
if (_init_error != JNI_OK) {
619619
return;

src/java.base/share/classes/sun/launcher/LauncherHelper.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,15 @@ static void printXUsageMessage(boolean printToStderr) {
589589
}
590590
}
591591

592+
/**
593+
* Prints the short usage text to the desired output stream.
594+
*/
595+
static void printConciseUsageMessage(boolean printToStderr) {
596+
initOutput(printToStderr);
597+
ostream.println(getLocalizedMessage("java.launcher.opt.concise.header",
598+
File.pathSeparator));
599+
}
600+
592601
static void initOutput(boolean printToStderr) {
593602
ostream = (printToStderr) ? System.err : System.out;
594603
}

0 commit comments

Comments
 (0)