Skip to content

Commit

Permalink
Merge tag 'jdk-24+15' into labsjdk/adopt-jdk-24+15-master
Browse files Browse the repository at this point in the history
Added tag jdk-24+15 for changeset 3c40afa
  • Loading branch information
OracleLabsAutomation committed Sep 12, 2024
2 parents de95fb7 + 3c40afa commit c06b7f2
Show file tree
Hide file tree
Showing 429 changed files with 9,267 additions and 6,646 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-cross-compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
- target-cpu: riscv64
gnu-arch: riscv64
debian-arch: riscv64
debian-repository: https://httpredir.debian.org/debian/
debian-repository: https://snapshot.debian.org/archive/debian/20240228T034848Z/
debian-version: sid
tolerate-sysroot-errors: true

Expand Down
35 changes: 17 additions & 18 deletions make/jdk/src/classes/build/tools/cldrconverter/CLDRConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -1372,6 +1372,7 @@ private static Map<Locale, String> coverageLevelsMap() throws Exception {
private static void generateTZDBShortNamesMap() throws IOException {
Files.walk(Path.of(tzDataDir), 1, FileVisitOption.FOLLOW_LINKS)
.filter(p -> p.toFile().isFile())
.filter(p -> p.getFileName().toString().matches("africa|antarctica|asia|australasia|backward|etcetera|europe|northamerica|southamerica"))
.forEach(p -> {
try {
String zone = null;
Expand All @@ -1394,43 +1395,41 @@ private static void generateTZDBShortNamesMap() throws IOException {
}
// remove comments in-line
line = line.replaceAll("[ \t]*#.*", "");

var tokens = line.split("[ \t]+", -1);
var token0len = tokens.length > 0 ? tokens[0].length() : 0;
// Zone line
if (line.startsWith("Zone")) {
if (token0len > 0 && tokens[0].regionMatches(true, 0, "Zone", 0, token0len)) {
if (zone != null) {
tzdbShortNamesMap.put(zone, format + NBSP + rule);
}
var zl = line.split("[ \t]+", -1);
zone = zl[1];
rule = zl[3];
format = flipIfNeeded(inVanguard, zl[4]);
zone = tokens[1];
rule = tokens[3];
format = flipIfNeeded(inVanguard, tokens[4]);
} else {
if (zone != null) {
if (line.startsWith("Rule") ||
line.startsWith("Link")) {
if (token0len > 0 &&
(tokens[0].regionMatches(true, 0, "Rule", 0, token0len) ||
tokens[0].regionMatches(true, 0, "Link", 0, token0len))) {
tzdbShortNamesMap.put(zone, format + NBSP + rule);
zone = null;
rule = null;
format = null;
} else {
var s = line.split("[ \t]+", -1);
rule = s[2];
format = flipIfNeeded(inVanguard, s[3]);
rule = tokens[2];
format = flipIfNeeded(inVanguard, tokens[3]);
}
}
}

// Rule line
if (line.startsWith("Rule")) {
var rl = line.split("[ \t]+", -1);
tzdbSubstLetters.put(rl[1] + NBSP + (rl[8].equals("0") ? STD : DST),
rl[9].replace(NO_SUBST, ""));
if (token0len > 0 && tokens[0].regionMatches(true, 0, "Rule", 0, token0len)) {
tzdbSubstLetters.put(tokens[1] + NBSP + (tokens[8].equals("0") ? STD : DST),
tokens[9].replace(NO_SUBST, ""));
}

// Link line
if (line.startsWith("Link")) {
var ll = line.split("[ \t]+", -1);
tzdbLinks.put(ll[2], ll[1]);
if (token0len > 0 && tokens[0].regionMatches(true, 0, "Link", 0, token0len)) {
tzdbLinks.put(tokens[2], tokens[1]);
}
}

Expand Down
70 changes: 37 additions & 33 deletions make/jdk/src/classes/build/tools/tzdb/TzdbZoneRulesProvider.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -164,7 +164,8 @@ private void load(List<Path> files) throws IOException {
}
continue;
}
if (line.startsWith("Zone")) { // parse Zone line
int token0len = tokens.length > 0 ? tokens[0].length() : line.length();
if (line.regionMatches(true, 0, "Zone", 0, token0len)) { // parse Zone line
String name = tokens[1];
if (excludedZones.contains(name)){
continue;
Expand All @@ -182,13 +183,13 @@ private void load(List<Path> files) throws IOException {
if (zLine.parse(tokens, 2)) {
openZone = null;
}
} else if (line.startsWith("Rule")) { // parse Rule line
} else if (line.regionMatches(true, 0, "Rule", 0, token0len)) { // parse Rule line
String name = tokens[1];
if (!rules.containsKey(name)) {
rules.put(name, new ArrayList<RuleLine>(10));
}
rules.get(name).add(new RuleLine().parse(tokens));
} else if (line.startsWith("Link")) { // parse link line
} else if (line.regionMatches(true, 0, "Link", 0, token0len)) { // parse link line
if (tokens.length >= 3) {
String realId = tokens[1];
String aliasId = tokens[2];
Expand Down Expand Up @@ -304,7 +305,7 @@ private void parse(String[] tokens, int off) {
month = parseMonth(tokens[off++]);
if (off < tokens.length) {
String dayRule = tokens[off++];
if (dayRule.startsWith("last")) {
if (dayRule.regionMatches(true, 0, "last", 0, 4)) {
dayOfMonth = -1;
dayOfWeek = parseDayOfWeek(dayRule.substring(4));
adjustForwards = false;
Expand Down Expand Up @@ -355,42 +356,45 @@ private void parse(String[] tokens, int off) {
}

int parseYear(String year, int defaultYear) {
switch (year.toLowerCase()) {
case "min": return 1900;
case "max": return Year.MAX_VALUE;
case "only": return defaultYear;
}
int len = year.length();

if (year.regionMatches(true, 0, "minimum", 0, len)) return 1900;
if (year.regionMatches(true, 0, "maximum", 0, len)) return Year.MAX_VALUE;
if (year.regionMatches(true, 0, "only", 0, len)) return defaultYear;

return Integer.parseInt(year);
}

Month parseMonth(String mon) {
switch (mon) {
case "Jan": return Month.JANUARY;
case "Feb": return Month.FEBRUARY;
case "Mar": return Month.MARCH;
case "Apr": return Month.APRIL;
case "May": return Month.MAY;
case "Jun": return Month.JUNE;
case "Jul": return Month.JULY;
case "Aug": return Month.AUGUST;
case "Sep": return Month.SEPTEMBER;
case "Oct": return Month.OCTOBER;
case "Nov": return Month.NOVEMBER;
case "Dec": return Month.DECEMBER;
}
int len = mon.length();

if (mon.regionMatches(true, 0, "January", 0, len)) return Month.JANUARY;
if (mon.regionMatches(true, 0, "February", 0, len)) return Month.FEBRUARY;
if (mon.regionMatches(true, 0, "March", 0, len)) return Month.MARCH;
if (mon.regionMatches(true, 0, "April", 0, len)) return Month.APRIL;
if (mon.regionMatches(true, 0, "May", 0, len)) return Month.MAY;
if (mon.regionMatches(true, 0, "June", 0, len)) return Month.JUNE;
if (mon.regionMatches(true, 0, "July", 0, len)) return Month.JULY;
if (mon.regionMatches(true, 0, "August", 0, len)) return Month.AUGUST;
if (mon.regionMatches(true, 0, "September", 0, len)) return Month.SEPTEMBER;
if (mon.regionMatches(true, 0, "October", 0, len)) return Month.OCTOBER;
if (mon.regionMatches(true, 0, "November", 0, len)) return Month.NOVEMBER;
if (mon.regionMatches(true, 0, "December", 0, len)) return Month.DECEMBER;

throw new IllegalArgumentException("Unknown month: " + mon);
}

DayOfWeek parseDayOfWeek(String dow) {
switch (dow) {
case "Mon": return DayOfWeek.MONDAY;
case "Tue": return DayOfWeek.TUESDAY;
case "Wed": return DayOfWeek.WEDNESDAY;
case "Thu": return DayOfWeek.THURSDAY;
case "Fri": return DayOfWeek.FRIDAY;
case "Sat": return DayOfWeek.SATURDAY;
case "Sun": return DayOfWeek.SUNDAY;
}
int len = dow.length();

if (dow.regionMatches(true, 0, "Monday", 0, len)) return DayOfWeek.MONDAY;
if (dow.regionMatches(true, 0, "Tuesday", 0, len)) return DayOfWeek.TUESDAY;
if (dow.regionMatches(true, 0, "Wednesday", 0, len)) return DayOfWeek.WEDNESDAY;
if (dow.regionMatches(true, 0, "Thursday", 0, len)) return DayOfWeek.THURSDAY;
if (dow.regionMatches(true, 0, "Friday", 0, len)) return DayOfWeek.FRIDAY;
if (dow.regionMatches(true, 0, "Saturday", 0, len)) return DayOfWeek.SATURDAY;
if (dow.regionMatches(true, 0, "Sunday", 0, len)) return DayOfWeek.SUNDAY;

throw new IllegalArgumentException("Unknown day-of-week: " + dow);
}

Expand Down
34 changes: 23 additions & 11 deletions src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2181,7 +2181,8 @@ void SharedRuntime::generate_deopt_blob() {
pad += 512; // Increase the buffer size when compiling for JVMCI
}
#endif
CodeBuffer buffer("deopt_blob", 2048+pad, 1024);
const char* name = SharedRuntime::stub_name(SharedStubId::deopt_id);
CodeBuffer buffer(name, 2048+pad, 1024);
MacroAssembler* masm = new MacroAssembler(&buffer);
int frame_size_in_words;
OopMap* map = nullptr;
Expand Down Expand Up @@ -2565,20 +2566,23 @@ uint SharedRuntime::out_preserve_stack_slots() {
// Generate a special Compile2Runtime blob that saves all registers,
// and setup oopmap.
//
SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, int poll_type) {
SafepointBlob* SharedRuntime::generate_handler_blob(SharedStubId id, address call_ptr) {
assert(is_polling_page_id(id), "expected a polling page stub id");

ResourceMark rm;
OopMapSet *oop_maps = new OopMapSet();
OopMap* map;

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

address start = __ pc();
address call_pc = nullptr;
int frame_size_in_words;
bool cause_return = (poll_type == POLL_AT_RETURN);
RegisterSaver reg_save(poll_type == POLL_AT_VECTOR_LOOP /* save_vectors */);
bool cause_return = (id == SharedStubId::polling_page_return_handler_id);
RegisterSaver reg_save(id == SharedStubId::polling_page_vectors_safepoint_handler_id /* save_vectors */);

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

// allocate space for the code
ResourceMark rm;

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

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

RuntimeStub* SharedRuntime::generate_throw_exception(const char* name, address runtime_entry) {
RuntimeStub* SharedRuntime::generate_throw_exception(SharedStubId id, address runtime_entry) {
assert(is_throw_id(id), "expected a throw stub id");

const char* name = SharedRuntime::stub_name(id);

// Information about frame layout at time of blocking runtime call.
// Note that we only have to preserve callee-saved registers since
// the compilers are responsible for supplying a continuation point
Expand Down Expand Up @@ -2896,7 +2906,8 @@ RuntimeStub* SharedRuntime::generate_jfr_write_checkpoint() {

int insts_size = 1024;
int locs_size = 64;
CodeBuffer code("jfr_write_checkpoint", insts_size, locs_size);
const char* name = SharedRuntime::stub_name(SharedStubId::jfr_write_checkpoint_id);
CodeBuffer code(name, insts_size, locs_size);
OopMapSet* oop_maps = new OopMapSet();
MacroAssembler* masm = new MacroAssembler(&code);

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

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

CodeBuffer code("jfr_return_lease", insts_size, locs_size);
const char* name = SharedRuntime::stub_name(SharedStubId::jfr_return_lease_id);
CodeBuffer code(name, insts_size, locs_size);
OopMapSet* oop_maps = new OopMapSet();
MacroAssembler* masm = new MacroAssembler(&code);

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

RuntimeStub* stub = // codeBlob framesize is in words (not VMRegImpl::slot_size)
RuntimeStub::new_runtime_stub("jfr_return_lease", &code, frame_complete,
RuntimeStub::new_runtime_stub(name, &code, frame_complete,
(framesize >> (LogBytesPerWord - LogBytesPerInt)),
oop_maps, false);
return stub;
Expand Down
31 changes: 21 additions & 10 deletions src/hotspot/cpu/arm/sharedRuntime_arm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1360,7 +1360,8 @@ uint SharedRuntime::out_preserve_stack_slots() {
//------------------------------generate_deopt_blob----------------------------
void SharedRuntime::generate_deopt_blob() {
ResourceMark rm;
CodeBuffer buffer("deopt_blob", 1024, 1024);
const char* name = SharedRuntime::stub_name(SharedStubId::deopt_id);
CodeBuffer buffer(name, 1024, 1024);
int frame_size_in_words;
OopMapSet* oop_maps;
int reexecute_offset;
Expand Down Expand Up @@ -1601,15 +1602,17 @@ void SharedRuntime::generate_deopt_blob() {
// setup oopmap, and calls safepoint code to stop the compiled code for
// a safepoint.
//
SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, int poll_type) {
SafepointBlob* SharedRuntime::generate_handler_blob(SharedStubId id, address call_ptr) {
assert(StubRoutines::forward_exception_entry() != nullptr, "must be generated before");
assert(is_polling_page_id(id), "expected a polling page stub id");

ResourceMark rm;
CodeBuffer buffer("handler_blob", 256, 256);
const char* name = SharedRuntime::stub_name(id);
CodeBuffer buffer(name, 256, 256);
int frame_size_words;
OopMapSet* oop_maps;

bool cause_return = (poll_type == POLL_AT_RETURN);
bool cause_return = (id == SharedStubId::polling_page_return_handler_id);

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

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

ResourceMark rm;
const char* name = SharedRuntime::stub_name(id);
CodeBuffer buffer(name, 1000, 512);
int frame_size_words;
OopMapSet *oop_maps;
Expand Down Expand Up @@ -1733,7 +1738,11 @@ RuntimeStub* SharedRuntime::generate_resolve_blob(address destination, const cha
// Continuation point for throwing of implicit exceptions that are not handled in
// the current activation. Fabricates an exception oop and initiates normal
// exception dispatching in this frame.
RuntimeStub* SharedRuntime::generate_throw_exception(const char* name, address runtime_entry) {
RuntimeStub* SharedRuntime::generate_throw_exception(SharedStubId id, address runtime_entry) {
assert(is_throw_id(id), "expected a throw stub id");

const char* name = SharedRuntime::stub_name(id);

int insts_size = 128;
int locs_size = 32;

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

CodeBuffer code("jfr_write_checkpoint", 512, 64);
const char* name = SharedRuntime::stub_name(SharedStubId::jfr_write_checkpoint_id);
CodeBuffer code(name, 512, 64);
MacroAssembler* masm = new MacroAssembler(&code);

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

RuntimeStub* stub =
RuntimeStub::new_runtime_stub(code.name(),
RuntimeStub::new_runtime_stub(name,
&code,
frame_complete,
(framesize >> (LogBytesPerWord - LogBytesPerInt)),
Expand All @@ -1836,7 +1846,8 @@ RuntimeStub* SharedRuntime::generate_jfr_return_lease() {
framesize // inclusive of return address
};

CodeBuffer code("jfr_return_lease", 512, 64);
const char* name = SharedRuntime::stub_name(SharedStubId::jfr_return_lease_id);
CodeBuffer code(name, 512, 64);
MacroAssembler* masm = new MacroAssembler(&code);

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

RuntimeStub* stub =
RuntimeStub::new_runtime_stub(code.name(),
RuntimeStub::new_runtime_stub(name,
&code,
frame_complete,
(framesize >> (LogBytesPerWord - LogBytesPerInt)),
Expand Down
Loading

0 comments on commit c06b7f2

Please sign in to comment.