Skip to content

Commit 335587e

Browse files
committed
Merge branch 'master' into jdk-8333446-systemd-slice-tests
2 parents 0e52e00 + 55a7cf1 commit 335587e

File tree

374 files changed

+8245
-4852
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

374 files changed

+8245
-4852
lines changed

.github/workflows/build-cross-compile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
- target-cpu: riscv64
8585
gnu-arch: riscv64
8686
debian-arch: riscv64
87-
debian-repository: https://httpredir.debian.org/debian/
87+
debian-repository: https://snapshot.debian.org/archive/debian/20240228T034848Z/
8888
debian-version: sid
8989
tolerate-sysroot-errors: true
9090

make/jdk/src/classes/build/tools/tzdb/TzdbZoneRulesProvider.java

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -364,33 +364,35 @@ int parseYear(String year, int defaultYear) {
364364
}
365365

366366
Month parseMonth(String mon) {
367-
switch (mon) {
368-
case "Jan": return Month.JANUARY;
369-
case "Feb": return Month.FEBRUARY;
370-
case "Mar": return Month.MARCH;
371-
case "Apr": return Month.APRIL;
372-
case "May": return Month.MAY;
373-
case "Jun": return Month.JUNE;
374-
case "Jul": return Month.JULY;
375-
case "Aug": return Month.AUGUST;
376-
case "Sep": return Month.SEPTEMBER;
377-
case "Oct": return Month.OCTOBER;
378-
case "Nov": return Month.NOVEMBER;
379-
case "Dec": return Month.DECEMBER;
380-
}
367+
int len = mon.length();
368+
369+
if (mon.regionMatches(true, 0, "January", 0, len)) return Month.JANUARY;
370+
if (mon.regionMatches(true, 0, "February", 0, len)) return Month.FEBRUARY;
371+
if (mon.regionMatches(true, 0, "March", 0, len)) return Month.MARCH;
372+
if (mon.regionMatches(true, 0, "April", 0, len)) return Month.APRIL;
373+
if (mon.regionMatches(true, 0, "May", 0, len)) return Month.MAY;
374+
if (mon.regionMatches(true, 0, "June", 0, len)) return Month.JUNE;
375+
if (mon.regionMatches(true, 0, "July", 0, len)) return Month.JULY;
376+
if (mon.regionMatches(true, 0, "August", 0, len)) return Month.AUGUST;
377+
if (mon.regionMatches(true, 0, "September", 0, len)) return Month.SEPTEMBER;
378+
if (mon.regionMatches(true, 0, "October", 0, len)) return Month.OCTOBER;
379+
if (mon.regionMatches(true, 0, "November", 0, len)) return Month.NOVEMBER;
380+
if (mon.regionMatches(true, 0, "December", 0, len)) return Month.DECEMBER;
381+
381382
throw new IllegalArgumentException("Unknown month: " + mon);
382383
}
383384

384385
DayOfWeek parseDayOfWeek(String dow) {
385-
switch (dow) {
386-
case "Mon": return DayOfWeek.MONDAY;
387-
case "Tue": return DayOfWeek.TUESDAY;
388-
case "Wed": return DayOfWeek.WEDNESDAY;
389-
case "Thu": return DayOfWeek.THURSDAY;
390-
case "Fri": return DayOfWeek.FRIDAY;
391-
case "Sat": return DayOfWeek.SATURDAY;
392-
case "Sun": return DayOfWeek.SUNDAY;
393-
}
386+
int len = dow.length();
387+
388+
if (dow.regionMatches(true, 0, "Monday", 0, len)) return DayOfWeek.MONDAY;
389+
if (dow.regionMatches(true, 0, "Tuesday", 0, len)) return DayOfWeek.TUESDAY;
390+
if (dow.regionMatches(true, 0, "Wednesday", 0, len)) return DayOfWeek.WEDNESDAY;
391+
if (dow.regionMatches(true, 0, "Thursday", 0, len)) return DayOfWeek.THURSDAY;
392+
if (dow.regionMatches(true, 0, "Friday", 0, len)) return DayOfWeek.FRIDAY;
393+
if (dow.regionMatches(true, 0, "Saturday", 0, len)) return DayOfWeek.SATURDAY;
394+
if (dow.regionMatches(true, 0, "Sunday", 0, len)) return DayOfWeek.SUNDAY;
395+
394396
throw new IllegalArgumentException("Unknown day-of-week: " + dow);
395397
}
396398

src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2181,7 +2181,8 @@ void SharedRuntime::generate_deopt_blob() {
21812181
pad += 512; // Increase the buffer size when compiling for JVMCI
21822182
}
21832183
#endif
2184-
CodeBuffer buffer("deopt_blob", 2048+pad, 1024);
2184+
const char* name = SharedRuntime::stub_name(SharedStubId::deopt_id);
2185+
CodeBuffer buffer(name, 2048+pad, 1024);
21852186
MacroAssembler* masm = new MacroAssembler(&buffer);
21862187
int frame_size_in_words;
21872188
OopMap* map = nullptr;
@@ -2565,20 +2566,23 @@ uint SharedRuntime::out_preserve_stack_slots() {
25652566
// Generate a special Compile2Runtime blob that saves all registers,
25662567
// and setup oopmap.
25672568
//
2568-
SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, int poll_type) {
2569+
SafepointBlob* SharedRuntime::generate_handler_blob(SharedStubId id, address call_ptr) {
2570+
assert(is_polling_page_id(id), "expected a polling page stub id");
2571+
25692572
ResourceMark rm;
25702573
OopMapSet *oop_maps = new OopMapSet();
25712574
OopMap* map;
25722575

25732576
// Allocate space for the code. Setup code generation tools.
2574-
CodeBuffer buffer("handler_blob", 2048, 1024);
2577+
const char* name = SharedRuntime::stub_name(id);
2578+
CodeBuffer buffer(name, 2048, 1024);
25752579
MacroAssembler* masm = new MacroAssembler(&buffer);
25762580

25772581
address start = __ pc();
25782582
address call_pc = nullptr;
25792583
int frame_size_in_words;
2580-
bool cause_return = (poll_type == POLL_AT_RETURN);
2581-
RegisterSaver reg_save(poll_type == POLL_AT_VECTOR_LOOP /* save_vectors */);
2584+
bool cause_return = (id == SharedStubId::polling_page_return_handler_id);
2585+
RegisterSaver reg_save(id == SharedStubId::polling_page_vectors_safepoint_handler_id /* save_vectors */);
25822586

25832587
// When the signal occurred, the LR was either signed and stored on the stack (in which
25842588
// case it will be restored from the stack before being used) or unsigned and not stored
@@ -2690,12 +2694,14 @@ SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, int poll_t
26902694
// but since this is generic code we don't know what they are and the caller
26912695
// must do any gc of the args.
26922696
//
2693-
RuntimeStub* SharedRuntime::generate_resolve_blob(address destination, const char* name) {
2697+
RuntimeStub* SharedRuntime::generate_resolve_blob(SharedStubId id, address destination) {
26942698
assert (StubRoutines::forward_exception_entry() != nullptr, "must be generated before");
2699+
assert(is_resolve_id(id), "expected a resolve stub id");
26952700

26962701
// allocate space for the code
26972702
ResourceMark rm;
26982703

2704+
const char* name = SharedRuntime::stub_name(id);
26992705
CodeBuffer buffer(name, 1000, 512);
27002706
MacroAssembler* masm = new MacroAssembler(&buffer);
27012707

@@ -2787,7 +2793,11 @@ RuntimeStub* SharedRuntime::generate_resolve_blob(address destination, const cha
27872793
// otherwise assume that stack unwinding will be initiated, so
27882794
// caller saved registers were assumed volatile in the compiler.
27892795

2790-
RuntimeStub* SharedRuntime::generate_throw_exception(const char* name, address runtime_entry) {
2796+
RuntimeStub* SharedRuntime::generate_throw_exception(SharedStubId id, address runtime_entry) {
2797+
assert(is_throw_id(id), "expected a throw stub id");
2798+
2799+
const char* name = SharedRuntime::stub_name(id);
2800+
27912801
// Information about frame layout at time of blocking runtime call.
27922802
// Note that we only have to preserve callee-saved registers since
27932803
// the compilers are responsible for supplying a continuation point
@@ -2896,7 +2906,8 @@ RuntimeStub* SharedRuntime::generate_jfr_write_checkpoint() {
28962906

28972907
int insts_size = 1024;
28982908
int locs_size = 64;
2899-
CodeBuffer code("jfr_write_checkpoint", insts_size, locs_size);
2909+
const char* name = SharedRuntime::stub_name(SharedStubId::jfr_write_checkpoint_id);
2910+
CodeBuffer code(name, insts_size, locs_size);
29002911
OopMapSet* oop_maps = new OopMapSet();
29012912
MacroAssembler* masm = new MacroAssembler(&code);
29022913

@@ -2915,7 +2926,7 @@ RuntimeStub* SharedRuntime::generate_jfr_write_checkpoint() {
29152926
oop_maps->add_gc_map(the_pc - start, map);
29162927

29172928
RuntimeStub* stub = // codeBlob framesize is in words (not VMRegImpl::slot_size)
2918-
RuntimeStub::new_runtime_stub("jfr_write_checkpoint", &code, frame_complete,
2929+
RuntimeStub::new_runtime_stub(name, &code, frame_complete,
29192930
(framesize >> (LogBytesPerWord - LogBytesPerInt)),
29202931
oop_maps, false);
29212932
return stub;
@@ -2934,7 +2945,8 @@ RuntimeStub* SharedRuntime::generate_jfr_return_lease() {
29342945
int insts_size = 1024;
29352946
int locs_size = 64;
29362947

2937-
CodeBuffer code("jfr_return_lease", insts_size, locs_size);
2948+
const char* name = SharedRuntime::stub_name(SharedStubId::jfr_return_lease_id);
2949+
CodeBuffer code(name, insts_size, locs_size);
29382950
OopMapSet* oop_maps = new OopMapSet();
29392951
MacroAssembler* masm = new MacroAssembler(&code);
29402952

@@ -2953,7 +2965,7 @@ RuntimeStub* SharedRuntime::generate_jfr_return_lease() {
29532965
oop_maps->add_gc_map(the_pc - start, map);
29542966

29552967
RuntimeStub* stub = // codeBlob framesize is in words (not VMRegImpl::slot_size)
2956-
RuntimeStub::new_runtime_stub("jfr_return_lease", &code, frame_complete,
2968+
RuntimeStub::new_runtime_stub(name, &code, frame_complete,
29572969
(framesize >> (LogBytesPerWord - LogBytesPerInt)),
29582970
oop_maps, false);
29592971
return stub;

src/hotspot/cpu/arm/sharedRuntime_arm.cpp

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,7 +1360,8 @@ uint SharedRuntime::out_preserve_stack_slots() {
13601360
//------------------------------generate_deopt_blob----------------------------
13611361
void SharedRuntime::generate_deopt_blob() {
13621362
ResourceMark rm;
1363-
CodeBuffer buffer("deopt_blob", 1024, 1024);
1363+
const char* name = SharedRuntime::stub_name(SharedStubId::deopt_id);
1364+
CodeBuffer buffer(name, 1024, 1024);
13641365
int frame_size_in_words;
13651366
OopMapSet* oop_maps;
13661367
int reexecute_offset;
@@ -1601,15 +1602,17 @@ void SharedRuntime::generate_deopt_blob() {
16011602
// setup oopmap, and calls safepoint code to stop the compiled code for
16021603
// a safepoint.
16031604
//
1604-
SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, int poll_type) {
1605+
SafepointBlob* SharedRuntime::generate_handler_blob(SharedStubId id, address call_ptr) {
16051606
assert(StubRoutines::forward_exception_entry() != nullptr, "must be generated before");
1607+
assert(is_polling_page_id(id), "expected a polling page stub id");
16061608

16071609
ResourceMark rm;
1608-
CodeBuffer buffer("handler_blob", 256, 256);
1610+
const char* name = SharedRuntime::stub_name(id);
1611+
CodeBuffer buffer(name, 256, 256);
16091612
int frame_size_words;
16101613
OopMapSet* oop_maps;
16111614

1612-
bool cause_return = (poll_type == POLL_AT_RETURN);
1615+
bool cause_return = (id == SharedStubId::polling_page_return_handler_id);
16131616

16141617
MacroAssembler* masm = new MacroAssembler(&buffer);
16151618
address start = __ pc();
@@ -1671,10 +1674,12 @@ SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, int poll_t
16711674
return SafepointBlob::create(&buffer, oop_maps, frame_size_words);
16721675
}
16731676

1674-
RuntimeStub* SharedRuntime::generate_resolve_blob(address destination, const char* name) {
1677+
RuntimeStub* SharedRuntime::generate_resolve_blob(SharedStubId id, address destination) {
16751678
assert(StubRoutines::forward_exception_entry() != nullptr, "must be generated before");
1679+
assert(is_resolve_id(id), "expected a resolve stub id");
16761680

16771681
ResourceMark rm;
1682+
const char* name = SharedRuntime::stub_name(id);
16781683
CodeBuffer buffer(name, 1000, 512);
16791684
int frame_size_words;
16801685
OopMapSet *oop_maps;
@@ -1733,7 +1738,11 @@ RuntimeStub* SharedRuntime::generate_resolve_blob(address destination, const cha
17331738
// Continuation point for throwing of implicit exceptions that are not handled in
17341739
// the current activation. Fabricates an exception oop and initiates normal
17351740
// exception dispatching in this frame.
1736-
RuntimeStub* SharedRuntime::generate_throw_exception(const char* name, address runtime_entry) {
1741+
RuntimeStub* SharedRuntime::generate_throw_exception(SharedStubId id, address runtime_entry) {
1742+
assert(is_throw_id(id), "expected a throw stub id");
1743+
1744+
const char* name = SharedRuntime::stub_name(id);
1745+
17371746
int insts_size = 128;
17381747
int locs_size = 32;
17391748

@@ -1793,7 +1802,8 @@ RuntimeStub* SharedRuntime::generate_jfr_write_checkpoint() {
17931802
framesize // inclusive of return address
17941803
};
17951804

1796-
CodeBuffer code("jfr_write_checkpoint", 512, 64);
1805+
const char* name = SharedRuntime::stub_name(SharedStubId::jfr_write_checkpoint_id);
1806+
CodeBuffer code(name, 512, 64);
17971807
MacroAssembler* masm = new MacroAssembler(&code);
17981808

17991809
address start = __ pc();
@@ -1818,7 +1828,7 @@ RuntimeStub* SharedRuntime::generate_jfr_write_checkpoint() {
18181828
oop_maps->add_gc_map(frame_complete, map);
18191829

18201830
RuntimeStub* stub =
1821-
RuntimeStub::new_runtime_stub(code.name(),
1831+
RuntimeStub::new_runtime_stub(name,
18221832
&code,
18231833
frame_complete,
18241834
(framesize >> (LogBytesPerWord - LogBytesPerInt)),
@@ -1836,7 +1846,8 @@ RuntimeStub* SharedRuntime::generate_jfr_return_lease() {
18361846
framesize // inclusive of return address
18371847
};
18381848

1839-
CodeBuffer code("jfr_return_lease", 512, 64);
1849+
const char* name = SharedRuntime::stub_name(SharedStubId::jfr_return_lease_id);
1850+
CodeBuffer code(name, 512, 64);
18401851
MacroAssembler* masm = new MacroAssembler(&code);
18411852

18421853
address start = __ pc();
@@ -1858,7 +1869,7 @@ RuntimeStub* SharedRuntime::generate_jfr_return_lease() {
18581869
oop_maps->add_gc_map(frame_complete, map);
18591870

18601871
RuntimeStub* stub =
1861-
RuntimeStub::new_runtime_stub(code.name(),
1872+
RuntimeStub::new_runtime_stub(name,
18621873
&code,
18631874
frame_complete,
18641875
(framesize >> (LogBytesPerWord - LogBytesPerInt)),

src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1859,7 +1859,7 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
18591859
__ stw(R11_scratch1, simm16_offs, tmp);
18601860
}
18611861
#endif
1862-
__ call_c_with_frame_resize(copyfunc_addr, /*stub does not need resized frame*/ 0);
1862+
__ call_c(copyfunc_addr, relocInfo::runtime_call_type);
18631863

18641864
__ nand(tmp, R3_RET, R3_RET);
18651865
__ subf(length, tmp, length);
@@ -2057,7 +2057,7 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
20572057
int sco_offset = in_bytes(Klass::super_check_offset_offset());
20582058
__ lwz(chk_off, sco_offset, super_k);
20592059

2060-
__ call_c_with_frame_resize(copyfunc_addr, /*stub does not need resized frame*/ 0);
2060+
__ call_c(copyfunc_addr, relocInfo::runtime_call_type);
20612061

20622062
#ifndef PRODUCT
20632063
if (PrintC1Statistics) {
@@ -2181,7 +2181,7 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
21812181

21822182
// Arraycopy stubs takes a length in number of elements, so don't scale it.
21832183
__ mr(len, length);
2184-
__ call_c_with_frame_resize(entry, /*stub does not need resized frame*/ 0);
2184+
__ call_c(entry, relocInfo::runtime_call_type);
21852185

21862186
if (stub != nullptr) {
21872187
__ bind(*stub->continuation());
@@ -2862,7 +2862,7 @@ void LIR_Assembler::rt_call(LIR_Opr result, address dest,
28622862
return;
28632863
}
28642864

2865-
__ call_c_with_frame_resize(dest, /*no resizing*/ 0);
2865+
__ call_c(dest, relocInfo::runtime_call_type);
28662866
if (info != nullptr) {
28672867
add_call_info_here(info);
28682868
}

src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -404,14 +404,3 @@ void C1_MacroAssembler::null_check(Register r, Label* Lnull) {
404404
bc_far_optimized(Assembler::bcondCRbiIs1, bi0(CCR0, Assembler::equal), *Lnull);
405405
}
406406
}
407-
408-
address C1_MacroAssembler::call_c_with_frame_resize(address dest, int frame_resize) {
409-
if (frame_resize) { resize_frame(-frame_resize, R0); }
410-
#if defined(ABI_ELFv2)
411-
address return_pc = call_c(dest, relocInfo::runtime_call_type);
412-
#else
413-
address return_pc = call_c(CAST_FROM_FN_PTR(FunctionDescriptor*, dest), relocInfo::runtime_call_type);
414-
#endif
415-
if (frame_resize) { resize_frame(frame_resize, R0); }
416-
return return_pc;
417-
}

src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,5 @@
8989

9090
void null_check(Register r, Label *Lnull = nullptr);
9191

92-
address call_c_with_frame_resize(address dest, int frame_resize);
9392

9493
#endif // CPU_PPC_C1_MACROASSEMBLER_PPC_HPP

src/hotspot/cpu/ppc/c1_Runtime1_ppc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ int StubAssembler::call_RT(Register oop_result1, Register metadata_result,
6262
// ARG1 must hold thread address.
6363
mr(R3_ARG1, R16_thread);
6464

65-
address return_pc = call_c_with_frame_resize(entry_point, /*No resize, we have a C compatible frame.*/0);
65+
address return_pc = call_c(entry_point);
6666

6767
reset_last_Java_frame();
6868

src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,7 @@ void InterpreterMacroAssembler::check_and_handle_popframe(Register scratch_reg)
135135
// Call the Interpreter::remove_activation_preserving_args_entry()
136136
// func to get the address of the same-named entrypoint in the
137137
// generated interpreter code.
138-
#if defined(ABI_ELFv2)
139-
call_c(CAST_FROM_FN_PTR(address,
140-
Interpreter::remove_activation_preserving_args_entry),
141-
relocInfo::none);
142-
#else
143-
call_c(CAST_FROM_FN_PTR(FunctionDescriptor*,
144-
Interpreter::remove_activation_preserving_args_entry),
145-
relocInfo::none);
146-
#endif
138+
call_c(CAST_FROM_FN_PTR(address, Interpreter::remove_activation_preserving_args_entry));
147139

148140
// Jump to Interpreter::_remove_activation_preserving_args_entry.
149141
mtctr(R3_RET);

src/hotspot/cpu/ppc/macroAssembler_ppc.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,11 +1293,7 @@ void MacroAssembler::call_VM_base(Register oop_result,
12931293

12941294
// ARG1 must hold thread address.
12951295
mr(R3_ARG1, R16_thread);
1296-
#if defined(ABI_ELFv2)
12971296
address return_pc = call_c(entry_point, relocInfo::none);
1298-
#else
1299-
address return_pc = call_c((FunctionDescriptor*)entry_point, relocInfo::none);
1300-
#endif
13011297

13021298
reset_last_Java_frame();
13031299

@@ -1318,11 +1314,7 @@ void MacroAssembler::call_VM_base(Register oop_result,
13181314

13191315
void MacroAssembler::call_VM_leaf_base(address entry_point) {
13201316
BLOCK_COMMENT("call_VM_leaf {");
1321-
#if defined(ABI_ELFv2)
1322-
call_c(entry_point, relocInfo::none);
1323-
#else
1324-
call_c(CAST_FROM_FN_PTR(FunctionDescriptor*, entry_point), relocInfo::none);
1325-
#endif
1317+
call_c(entry_point);
13261318
BLOCK_COMMENT("} call_VM_leaf");
13271319
}
13281320

0 commit comments

Comments
 (0)