Compare commits

..

95 Commits

Author SHA1 Message Date
Tobias Hartmann
08b1fa4cb3 8359972: Problem list TestStaticCallStub until JDK-8359963 is fixed
Reviewed-by: mchevalier, chagedorn
2025-06-19 05:35:51 +00:00
Sergey Bylokhov
23e1e2ff4a 8359180: Apply java.io.Serial annotations in java.instrument
Reviewed-by: phh, sspitsyn
2025-06-18 22:54:05 +00:00
Andrey Turbanov
5a62e99523 8357686: Remove unnecessary Map.get from AWTAutoShutdown.unregisterPeer
Reviewed-by: serb, aivanov
2025-06-18 20:58:01 +00:00
Chris Plummer
982064e50c 8359167: Remove unused test/hotspot/jtreg/vmTestbase/nsk/share/jpda/BindServer.java
Reviewed-by: sspitsyn, lmesnik
2025-06-18 18:43:38 +00:00
Srinivas Vamsi Parasa
b52af182c4 8359386: Fix incorrect value for max_size of C2CodeStub when APX is used
Reviewed-by: thartmann, shade, jbhateja, sviswanathan
2025-06-18 18:30:06 +00:00
Kim Barrett
7bc0d82450 8359227: Code cache/heap size options should be size_t
Reviewed-by: mhaessig, tschatzl
2025-06-18 18:05:18 +00:00
Manukumar V S
b7fcd0b235 8359889: java/awt/MenuItem/SetLabelTest.java inadvertently triggers clicks on items pinned to the taskbar
Reviewed-by: aivanov, kizune
2025-06-18 16:41:31 +00:00
Erik Gahlin
984d7f9cdf 8359895: JFR: method-timing view doesn't work
Reviewed-by: mgronlun
2025-06-18 14:43:55 +00:00
Joel Sikström
42d3604a31 8359923: Const accessors for the Deferred class
Reviewed-by: jsjolen
2025-06-18 14:07:25 +00:00
Casper Norrbin
cf78925859 8358891: Remove the PerfDataSamplingIntervalFunc code
Reviewed-by: shade, jwilhelm
2025-06-18 13:58:45 +00:00
Mikhail Ablakatov
ba32b78bfa 8358329: AArch64: emit direct branches in static stubs for small code caches
Reviewed-by: aph, eastigeevich
2025-06-18 11:48:45 +00:00
Afshin Zafari
547ce03016 8337217: Port VirtualMemoryTracker to use VMATree
Reviewed-by: jsjolen, gziemski
2025-06-18 11:37:48 +00:00
He-Pin(kerr)
f07f5ce984 8359067: Fix typo in DelayScheduler.java
Reviewed-by: syan, dl, rriggs, vklang
2025-06-18 11:26:00 +00:00
Matthew Donovan
cabd7c1f7a 8356897: Update NSS library to 3.111
Reviewed-by: rhalade
2025-06-18 11:24:54 +00:00
Jaikiran Pai
57266064a7 8359709: java.net.HttpURLConnection sends unexpected "Host" request header in some cases after JDK-8344190
Reviewed-by: dfuchs, djelinski, michaelm, vyazici
2025-06-18 09:03:25 +00:00
Prasanta Sadhukhan
2b94b70ef5 8359428: Test 'javax/swing/JTabbedPane/bug4499556.java' failed because after selecting one of L&F items, the test case automatically failed when clicking on L&F Menu button again
Reviewed-by: abhiscxk
2025-06-18 05:08:06 +00:00
Prasanta Sadhukhan
1130c1bc33 6798061: The removal of System.out.println from KeyboardManager
Reviewed-by: prr
2025-06-18 02:56:48 +00:00
Jaikiran Pai
2f63d3aee5 7116990: (spec) Socket.connect(addr,timeout) not clear if IOException because of TCP timeout
Reviewed-by: alanb, dfuchs
2025-06-18 02:06:22 +00:00
William Kemper
382f870cd5 8357976: GenShen crash in swap_card_tables: Should be clean
Reviewed-by: kdnilsen, cslucas, ysr, xpeng
2025-06-17 21:15:25 +00:00
lawrence.andrews
8c760e78b9 8359418: Test "javax/swing/text/GlyphView/bug4188841.java" failed because the phrase of text pane does not match the instructions
Reviewed-by: honkar
2025-06-17 20:42:42 +00:00
Thomas Stuefe
afa52e4681 8210549: Runtime.exec: in closeDescriptors(), use FD_CLOEXEC instead of close()
Reviewed-by: rriggs
2025-06-17 20:23:20 +00:00
Serguei Spitsyn
164cae469c 8359733: UnProblemList serviceability/jvmti/vthread/SuspendWithInterruptLock
Reviewed-by: syan, dholmes, lmesnik
2025-06-17 19:22:14 +00:00
dermster
49a82d8806 8359449: [TEST] open/test/jdk/java/io/File/SymLinks.java Refactor extract method for Windows specific test
Reviewed-by: bpb
2025-06-17 18:21:40 +00:00
Vladimir Kozlov
96070212ad 8359646: C1 crash in AOTCodeAddressTable::add_C_string
Reviewed-by: adinn, iklam
2025-06-17 15:55:14 +00:00
Alexey Ivanov
53a83d15a1 8357799: Improve instructions for JFileChooser/HTMLFileName.java
Reviewed-by: honkar, tr, kizune
2025-06-17 14:09:11 +00:00
Christian Stein
21b72dea78 8357862: Java argument file is parsed unexpectedly with trailing comment
Co-authored-by: Stuart Marks <smarks@openjdk.org>
Reviewed-by: vromero
2025-06-17 14:01:06 +00:00
SendaoYan
51877f568b 8359207: Remove runtime/signal/TestSigusr2.java since it is always skipped
Reviewed-by: dcubed, dholmes
2025-06-17 13:50:01 +00:00
Anton Artemov
c1deb9eebf 8356556: AArch64: No need for acquire fence in safepoint poll in FFM
Reviewed-by: dholmes, pchilanomate
2025-06-17 13:46:13 +00:00
Albert Mingkun Yang
f62f1178aa 8359701: G1: Move heap expansion time tracking of G1CollectedHeap:expand to call site
Reviewed-by: tschatzl, iwalulya
2025-06-17 12:32:17 +00:00
David Briemann
a08208283b 8354650: [PPC64] Try to reduce register definitions
Reviewed-by: mdoerr, sroy
2025-06-17 10:01:36 +00:00
Jaikiran Pai
f7cd3fad24 8332623: Remove setTTL()/getTTL() methods from DatagramSocketImpl/MulticastSocket and MulticastSocket.send(DatagramPacket, byte)
Reviewed-by: dfuchs, alanb
2025-06-17 08:32:17 +00:00
Jatin Bhateja
ff75f763c0 8351645: C2: Assertion failures in Expand/CompressBits idealizations with TOP
Co-authored-by: Emanuel Peter <epeter@openjdk.org>
Reviewed-by: epeter, sviswanathan
2025-06-17 07:16:19 +00:00
SendaoYan
a16d23557b 8359402: Test CloseDescriptors.java should throw SkippedException when there is no lsof/sctp
Reviewed-by: vyazici, jpai
2025-06-17 05:38:59 +00:00
Volkan Yazici
e55ddabffa 8359223: HttpClient: Remove leftovers from the SecurityManager cleanup
Reviewed-by: dfuchs
2025-06-16 18:20:28 +00:00
Brian Burkhalter
9a1c1f2efb 8357847: (ch) AsynchronousFileChannel implementations should support FFM Buffers
Reviewed-by: alanb
2025-06-16 17:56:27 +00:00
Erik Gahlin
e57a214e2a 8359242: JFR: Missing help text for method trace and timing
Reviewed-by: mgronlun
2025-06-16 16:52:17 +00:00
Erik Gahlin
2f2acb2e3f 8359593: JFR: Instrumentation of java.lang.String corrupts recording
Reviewed-by: mgronlun
2025-06-16 16:10:59 +00:00
Stuart Marks
06d804a0f0 8338140: (str) Add notes to String.trim and String.isEmpty pointing to newer APIs
Reviewed-by: naoto, bpb
2025-06-16 15:56:08 +00:00
Vladimir Kozlov
6e390ef17c 8358690: Some initialization code asks for AOT cache status way too early
Reviewed-by: asmehra, adinn
2025-06-16 15:55:51 +00:00
Kevin Walls
9652ae9a8d 8347114: JMXServiceURL should require an explicit protocol
Reviewed-by: dfuchs, sspitsyn
2025-06-16 15:25:51 +00:00
Albert Mingkun Yang
59460ff700 8359664: G1: Remove default arg for pretouch_workers of G1CollectedHeap::expand
Reviewed-by: tschatzl
2025-06-16 15:20:48 +00:00
Hamlin Li
9d060574e5 8358892: RISC-V: jvm crash when running dacapo sunflow after JDK-8352504
8359045: RISC-V: construct test to verify invocation of C2_MacroAssembler::enc_cmove_cmp_fp => BoolTest::ge/gt

Co-authored-by: Fei Yang <fyang@openjdk.org>
Reviewed-by: fyang, fjiang
2025-06-16 10:20:25 +00:00
Erik Gahlin
fedd0a0ee3 8359248: JFR: Help text for-XX:StartFlightRecording:report-on-exit should explain option can be repeated
Reviewed-by: mgronlun
2025-06-16 09:09:55 +00:00
Suchismith Roy
79497ef7f5 8348574: Simplify c1/c2_globals inclusions
Reviewed-by: mhaessig, kbarrett
2025-06-16 08:30:41 +00:00
Kevin Walls
8416ca3104 8346982: Remove JMX javadoc duplication that was in place due to JDK-6369229
Reviewed-by: amenkov
2025-06-16 07:29:24 +00:00
Benoît Maillard
d8c3533a91 8357816: Add test from JDK-8350576
Co-authored-by: Tobias Hartmann <thartmann@openjdk.org>
Reviewed-by: syan, thartmann, epeter
2025-06-16 07:29:06 +00:00
Volkan Yazici
eacfcd86d3 8357995: Use "stdin.encoding" for reading System.in with InputStreamReader/Scanner [core]
Reviewed-by: naoto, cjplummer
2025-06-16 07:27:05 +00:00
Damon Fenacci
534a8605e5 8358129: compiler/startup/StartupOutput.java runs into out of memory on Windows after JDK-8347406
Reviewed-by: thartmann, epeter
2025-06-16 06:11:08 +00:00
Tejesh R
6fe9143bbb 8358532: JFileChooser in GTK L&F still displays HTML filename
Reviewed-by: aivanov, dnguyen, kizune
2025-06-16 05:27:52 +00:00
Anjian Wen
1a01839f8c 8359105: RISC-V: No need for acquire fence in safepoint poll during JNI calls
Reviewed-by: rehn, fyang, fjiang
2025-06-16 03:32:40 +00:00
Raffaello Giulietti
26848a7d6c 8358804: Improve the API Note of BigDecimal.valueOf(double)
Reviewed-by: bpb, darcy, iris
2025-06-14 08:15:12 +00:00
Archie Cobbs
0e725c6fb1 8354447: Missing test for retroactive @SuppressWarnings("dangling-doc-comments") behavior
Reviewed-by: darcy
2025-06-13 21:42:17 +00:00
Alex Menkov
b3f56086c9 8358094: Test vmTestbase/nsk/jvmti/AttachOnDemand/attach045/TestDescription.java still times out after JDK-8357282
Reviewed-by: sspitsyn, cjplummer, lmesnik
2025-06-13 17:15:41 +00:00
Andrew Dinn
ee35f6384f 8359373: Split stubgen initial blob into pre and post-universe blobs
Reviewed-by: kvn
2025-06-13 16:52:40 +00:00
Vladimir Kozlov
12a0dd03b8 8358738: AOT cache created without graal jit should not be used with graal jit
Reviewed-by: iklam, ccheung
2025-06-13 16:20:11 +00:00
Ioi Lam
366650a438 8355556: JVM crash because archived method handle intrinsics are not restored
Reviewed-by: adinn, vlivanov, shade
2025-06-13 16:11:49 +00:00
dermster
78b1360e7d 8359127: Amend java/nio/channels/DatagramChannel/PromiscuousIPv6.java to use @requires for OS platform selection
Reviewed-by: djelinski, dfuchs
2025-06-13 15:57:00 +00:00
Albert Mingkun Yang
417f8ecf07 8359224: G1: Incorrect size unit in logging of G1CollectedHeap::alloc_archive_region
Reviewed-by: tschatzl, shade
2025-06-13 13:40:43 +00:00
Daniel Fuchs
57cabc6d74 8359364: java/net/URL/EarlyOrDelayedParsing test fails intermittently
Reviewed-by: vyazici, syan, alanb
2025-06-13 13:15:47 +00:00
Manuel Hässig
b4c4496ef8 8354196: C2: reorder and capitalize phase definition
Reviewed-by: chagedorn, mchevalier
2025-06-13 13:02:27 +00:00
Sean Mullan
b5334fe237 8314180: Disable XPath in XML Signatures
Reviewed-by: weijun
2025-06-13 12:15:27 +00:00
Manuel Hässig
e8ef93ae9d 8357782: JVM JIT Causes Static Initialization Order Issue
Co-authored-by: Tobias Hartmann <thartmann@openjdk.org>
Reviewed-by: thartmann, dlong, dfenacci
2025-06-13 11:16:36 +00:00
Erik Gahlin
25b22c9b55 8358602: JFR: Annotations in jdk.jfr package should not use "not null" in specification
Reviewed-by: mgronlun
2025-06-13 10:47:26 +00:00
Prateek Nima
ead4529c92 8340182: Java HttpClient does not follow default retry limit of 3 retries
Reviewed-by: dfuchs
2025-06-13 10:32:50 +00:00
Volkan Yazici
3a1887269b 8359225: Remove unused test/jdk/javax/script/MyContext.java
Reviewed-by: sundar
2025-06-13 09:12:02 +00:00
Jatin Bhateja
e7f63ba310 8359327: Incorrect AVX3Threshold results into code buffer overflows on APX targets
Reviewed-by: sviswanathan
2025-06-13 09:01:09 +00:00
SendaoYan
a0fb35c837 8359272: Several vmTestbase/compact tests timed out on large memory machine
Reviewed-by: tschatzl, ayang
2025-06-13 08:46:12 +00:00
Albert Mingkun Yang
032ead1d90 8358483: G1: Remove G1HeapRegionManager::num_available_regions
Reviewed-by: tschatzl, sangheki
2025-06-13 08:03:33 +00:00
Doug Simon
a8b4284848 8359293: Make TestNoNULL extensible
Reviewed-by: kbarrett
2025-06-13 08:01:18 +00:00
Tobias Hartmann
ed39e17e34 8359200: Memory corruption in MStack::push
Reviewed-by: shade, kvn
2025-06-13 07:45:18 +00:00
Emanuel Peter
6749c62b9e 8358772: Template-Framework Library: Primitive Types
Reviewed-by: mhaessig, chagedorn
2025-06-13 06:55:48 +00:00
Alan Bateman
9aeacf2de5 8358958: (aio) AsynchronousByteChannel.read/write should throw IAE if buffer is thread-confined
Reviewed-by: jpai, bpb
2025-06-13 06:33:42 +00:00
Quan Anh Mai
991097b7bf 8315066: Add unsigned bounds and known bits to TypeInt/Long
Co-authored-by: Emanuel Peter <epeter@openjdk.org>
Reviewed-by: epeter, kvn, jbhateja
2025-06-13 01:05:44 +00:00
Kevin Walls
523a4efe1c 8358970: CounterMonitorMBean.getDerivedGaugeTimeStamp() JavaDoc incorrectly documents null
Reviewed-by: sspitsyn, lmesnik
2025-06-12 20:23:28 +00:00
Brian Burkhalter
0dd7c69b9e 8357286: (bf) Remove obsolete instanceof checks in CharBuffer.append
Reviewed-by: alanb
2025-06-12 20:21:50 +00:00
Kevin Walls
66535fe26d 8358701: Remove misleading javax.management.remote API doc wording about JMX spec, and historic link to JMXMP
Reviewed-by: alanb, sspitsyn
2025-06-12 20:06:19 +00:00
Koushik Thirupattur
db7af2b3c3 8349550: Improve SASL random usage
Reviewed-by: mullan
2025-06-12 19:31:15 +00:00
Naoto Sato
99829950f6 8358819: The first year is not displayed correctly in Japanese Calendar
Reviewed-by: jlu, joehw, iris
2025-06-12 18:04:14 +00:00
Volkan Yazici
0ef0986731 8359168: Revert stdin.encoding usage in test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach010/attach010Agent00.java
Reviewed-by: cjplummer
2025-06-12 17:12:04 +00:00
Volkan Yazici
610a18e7b3 8358688: HttpClient: Simplify file streaming in RequestPublishers.FilePublisher
Reviewed-by: dfuchs, jpai
2025-06-12 17:10:57 +00:00
jeremy
8d33ea7395 8354646: java.awt.TextField allows to identify the spaces in a password when double clicked at the starting and end of the text
Reviewed-by: aivanov, kizune, tr, psadhukhan
2025-06-12 16:11:35 +00:00
David Briemann
3c53057fa6 8359232: [PPC64] C2: Clean up ppc.ad: add instr sizes, remove comments
Reviewed-by: mdoerr
2025-06-12 15:27:44 +00:00
Roland Westrelin
1fcede053c 8358334: C2/Shenandoah: incorrect execution with Unsafe
Reviewed-by: wkemper, shade
2025-06-12 15:02:38 +00:00
Afshin Zafari
fae9c7a3f0 8351661: NMT: VMATree should support separate call-stacks for reserve and commit operations
Reviewed-by: gziemski, jsjolen
2025-06-12 14:46:39 +00:00
Emanuel Peter
dd68829017 8347273: C2: VerifyIterativeGVN for Ideal and Identity
Reviewed-by: chagedorn, mhaessig
2025-06-12 14:19:08 +00:00
Emanuel Peter
b85fe02be5 8358600: Template-Framework Library: Template for TestFramework test class
Reviewed-by: chagedorn, mhaessig
2025-06-12 14:12:14 +00:00
Radim Vansa
e18277b470 8352075: Perf regression accessing fields
Reviewed-by: coleenp, iklam, jsjolen
2025-06-12 12:29:15 +00:00
Rohitash Kumar
e5ce5c57c8 8357959: (bf) ByteBuffer.allocateDirect initialization can result in large TTSP spikes
Reviewed-by: shade, alanb
2025-06-12 12:23:42 +00:00
kabutz
91fdd72c97 8355726: LinkedBlockingDeque fixes and improvements
Reviewed-by: vklang, dl
2025-06-12 11:44:04 +00:00
Marc Chevalier
b6ec93b038 8359121: C2: Region added by vectorizedMismatch intrinsic can survive as a dead node after IGVN
Reviewed-by: thartmann, chagedorn
2025-06-12 11:40:31 +00:00
Anjian Wen
65e63b6ab4 8359218: RISC-V: Only enable CRC32 intrinsic when AvoidUnalignedAccess == false
Reviewed-by: fyang, fjiang
2025-06-12 10:44:47 +00:00
Johannes Bechberger
3f0fef2c9c 8359135: New test TestCPUTimeSampleThrottling fails intermittently
Reviewed-by: mdoerr
2025-06-12 08:54:21 +00:00
SendaoYan
3e0ef832cc 8359083: Test jdkCheckHtml.java should report SkippedException rather than report fails when miss tidy
Reviewed-by: hannesw
2025-06-12 08:18:00 +00:00
SendaoYan
7b7136b4ec 8359181: Error messages generated by configure --help after 8301197
Reviewed-by: erikj, ihse
2025-06-12 08:10:27 +00:00
SendaoYan
5886ef728f 8359182: Use @requires instead of SkippedException for MaxPath.java
Reviewed-by: bpb, bchristi
2025-06-12 07:51:29 +00:00
372 changed files with 12978 additions and 7544 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2012, 2025, 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
@@ -366,7 +366,7 @@ EOT
# Print additional help, e.g. a list of toolchains and JVM features.
# This must be done by the autoconf script.
( CONFIGURE_PRINT_ADDITIONAL_HELP=true . $generated_script PRINTF=printf )
( CONFIGURE_PRINT_ADDITIONAL_HELP=true . $generated_script PRINTF=printf ECHO=echo )
cat <<EOT

View File

@@ -542,10 +542,10 @@ class Bundle {
if (pattern != null) {
// Perform date-time format pattern conversion which is
// applicable to both SimpleDateFormat and j.t.f.DateTimeFormatter.
String transPattern = translateDateFormatLetters(calendarType, pattern, this::convertDateTimePatternLetter);
String transPattern = translateDateFormatLetters(calendarType, key, pattern, this::convertDateTimePatternLetter);
dateTimePatterns.add(i, transPattern);
// Additionally, perform SDF specific date-time format pattern conversion
sdfPatterns.add(i, translateDateFormatLetters(calendarType, transPattern, this::convertSDFLetter));
sdfPatterns.add(i, translateDateFormatLetters(calendarType, key, transPattern, this::convertSDFLetter));
} else {
dateTimePatterns.add(i, null);
sdfPatterns.add(i, null);
@@ -568,7 +568,7 @@ class Bundle {
}
}
private String translateDateFormatLetters(CalendarType calendarType, String cldrFormat, ConvertDateTimeLetters converter) {
private String translateDateFormatLetters(CalendarType calendarType, String patternKey, String cldrFormat, ConvertDateTimeLetters converter) {
String pattern = cldrFormat;
int length = pattern.length();
boolean inQuote = false;
@@ -587,7 +587,7 @@ class Bundle {
if (nextc == '\'') {
i++;
if (count != 0) {
converter.convert(calendarType, lastLetter, count, jrePattern);
converter.convert(calendarType, patternKey, lastLetter, count, jrePattern);
lastLetter = 0;
count = 0;
}
@@ -597,7 +597,7 @@ class Bundle {
}
if (!inQuote) {
if (count != 0) {
converter.convert(calendarType, lastLetter, count, jrePattern);
converter.convert(calendarType, patternKey, lastLetter, count, jrePattern);
lastLetter = 0;
count = 0;
}
@@ -614,7 +614,7 @@ class Bundle {
}
if (!(c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z')) {
if (count != 0) {
converter.convert(calendarType, lastLetter, count, jrePattern);
converter.convert(calendarType, patternKey, lastLetter, count, jrePattern);
lastLetter = 0;
count = 0;
}
@@ -627,7 +627,7 @@ class Bundle {
count++;
continue;
}
converter.convert(calendarType, lastLetter, count, jrePattern);
converter.convert(calendarType, patternKey, lastLetter, count, jrePattern);
lastLetter = c;
count = 1;
}
@@ -637,7 +637,7 @@ class Bundle {
}
if (count != 0) {
converter.convert(calendarType, lastLetter, count, jrePattern);
converter.convert(calendarType, patternKey, lastLetter, count, jrePattern);
}
if (cldrFormat.contentEquals(jrePattern)) {
return cldrFormat;
@@ -661,7 +661,7 @@ class Bundle {
* on the support given by the SimpleDateFormat and the j.t.f.DateTimeFormatter
* for date-time formatting.
*/
private void convertDateTimePatternLetter(CalendarType calendarType, char cldrLetter, int count, StringBuilder sb) {
private void convertDateTimePatternLetter(CalendarType calendarType, String patternKey, char cldrLetter, int count, StringBuilder sb) {
switch (cldrLetter) {
case 'u':
case 'U':
@@ -683,7 +683,7 @@ class Bundle {
* Perform a conversion of CLDR date-time format pattern letter which is
* specific to the SimpleDateFormat.
*/
private void convertSDFLetter(CalendarType calendarType, char cldrLetter, int count, StringBuilder sb) {
private void convertSDFLetter(CalendarType calendarType, String patternKey, char cldrLetter, int count, StringBuilder sb) {
switch (cldrLetter) {
case 'G':
if (calendarType != CalendarType.GREGORIAN) {
@@ -722,6 +722,17 @@ class Bundle {
appendN('z', count, sb);
break;
case 'y':
// If the style is FULL/LONG for a Japanese Calendar, make the
// count == 4 for Gan-nen
if (calendarType == CalendarType.JAPANESE &&
(patternKey.contains("full-") ||
patternKey.contains("long-"))) {
count = 4;
}
appendN(cldrLetter, count, sb);
break;
case 'Z':
if (count == 4 || count == 5) {
sb.append("XXX");
@@ -767,6 +778,7 @@ class Bundle {
.collect(Collectors.toMap(
e -> calendarPrefix + e.getKey(),
e -> translateDateFormatLetters(calendarType,
e.getKey(),
(String)e.getValue(),
this::convertDateTimePatternLetter)
))
@@ -775,7 +787,7 @@ class Bundle {
@FunctionalInterface
private interface ConvertDateTimeLetters {
void convert(CalendarType calendarType, char cldrLetter, int count, StringBuilder sb);
void convert(CalendarType calendarType, String patternKey, char cldrLetter, int count, StringBuilder sb);
}
/**

View File

@@ -62,7 +62,7 @@ BUILD_JDK_JTREG_LIBRARIES_JDK_LIBS_libGetXSpace := java.base:libjava
ifeq ($(call isTargetOs, windows), true)
BUILD_JDK_JTREG_EXCLUDE += libDirectIO.c libInheritedChannel.c \
libExplicitAttach.c libImplicitAttach.c \
exelauncher.c
exelauncher.c libFDLeaker.c exeFDLeakTester.c
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeNullCallerTest := $(LIBCXX)
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exerevokeall := advapi32.lib

View File

@@ -1888,7 +1888,7 @@ void MachEpilogNode::emit(C2_MacroAssembler *masm, PhaseRegAlloc *ra_) const {
code_stub = &stub->entry();
}
__ relocate(relocInfo::poll_return_type);
__ safepoint_poll(*code_stub, true /* at_return */, false /* acquire */, true /* in_nmethod */);
__ safepoint_poll(*code_stub, true /* at_return */, true /* in_nmethod */);
}
}

View File

@@ -483,7 +483,7 @@ void LIR_Assembler::return_op(LIR_Opr result, C1SafepointPollStub* code_stub) {
code_stub->set_safepoint_offset(__ offset());
__ relocate(relocInfo::poll_return_type);
__ safepoint_poll(*code_stub->entry(), true /* at_return */, false /* acquire */, true /* in_nmethod */);
__ safepoint_poll(*code_stub->entry(), true /* at_return */, true /* in_nmethod */);
__ ret(lr);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -43,15 +43,15 @@ define_pd_global(intx, CompileThreshold, 1500 );
define_pd_global(intx, OnStackReplacePercentage, 933 );
define_pd_global(intx, NewSizeThreadIncrease, 4*K );
define_pd_global(intx, InitialCodeCacheSize, 160*K);
define_pd_global(intx, ReservedCodeCacheSize, 32*M );
define_pd_global(intx, NonProfiledCodeHeapSize, 13*M );
define_pd_global(intx, ProfiledCodeHeapSize, 14*M );
define_pd_global(intx, NonNMethodCodeHeapSize, 5*M );
define_pd_global(size_t, InitialCodeCacheSize, 160*K);
define_pd_global(size_t, ReservedCodeCacheSize, 32*M );
define_pd_global(size_t, NonProfiledCodeHeapSize, 13*M );
define_pd_global(size_t, ProfiledCodeHeapSize, 14*M );
define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M );
define_pd_global(bool, ProfileInterpreter, false);
define_pd_global(intx, CodeCacheExpansionSize, 32*K );
define_pd_global(uintx, CodeCacheMinBlockLength, 1);
define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K);
define_pd_global(size_t, CodeCacheExpansionSize, 32*K );
define_pd_global(size_t, CodeCacheMinBlockLength, 1);
define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K);
define_pd_global(bool, NeverActAsServerClassMachine, true );
define_pd_global(uint64_t,MaxRAM, 1ULL*G);
define_pd_global(bool, CICompileOSR, true );

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -51,8 +51,8 @@ define_pd_global(intx, NewSizeThreadIncrease, ScaleForWordSize(4*K));
define_pd_global(intx, LoopUnrollLimit, 60);
define_pd_global(intx, LoopPercentProfileLimit, 10);
// InitialCodeCacheSize derived from specjbb2000 run.
define_pd_global(intx, InitialCodeCacheSize, 2496*K); // Integral multiple of CodeCacheExpansionSize
define_pd_global(intx, CodeCacheExpansionSize, 64*K);
define_pd_global(size_t, InitialCodeCacheSize, 2496*K); // Integral multiple of CodeCacheExpansionSize
define_pd_global(size_t, CodeCacheExpansionSize, 64*K);
// Ergonomics related flags
define_pd_global(uint64_t,MaxRAM, 128ULL*G);
@@ -69,12 +69,12 @@ define_pd_global(bool, SuperWordLoopUnrollAnalysis, true);
define_pd_global(uint, SuperWordStoreToLoadForwardingFailureDetection, 8);
define_pd_global(bool, IdealizeClearArrayNode, true);
define_pd_global(intx, ReservedCodeCacheSize, 48*M);
define_pd_global(intx, NonProfiledCodeHeapSize, 21*M);
define_pd_global(intx, ProfiledCodeHeapSize, 22*M);
define_pd_global(intx, NonNMethodCodeHeapSize, 5*M );
define_pd_global(uintx, CodeCacheMinBlockLength, 6);
define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K);
define_pd_global(size_t, ReservedCodeCacheSize, 48*M);
define_pd_global(size_t, NonProfiledCodeHeapSize, 21*M);
define_pd_global(size_t, ProfiledCodeHeapSize, 22*M);
define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M );
define_pd_global(size_t, CodeCacheMinBlockLength, 6);
define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K);
// Ergonomics related flags
define_pd_global(bool, NeverActAsServerClassMachine, false);

View File

@@ -90,13 +90,15 @@ void CompiledDirectCall::set_to_interpreted(const methodHandle& callee, address
= nativeMovConstReg_at(stub + NativeInstruction::instruction_size);
#ifdef ASSERT
NativeGeneralJump* jump = nativeGeneralJump_at(method_holder->next_instruction_address());
NativeJump* jump = MacroAssembler::codestub_branch_needs_far_jump()
? nativeGeneralJump_at(method_holder->next_instruction_address())
: nativeJump_at(method_holder->next_instruction_address());
verify_mt_safe(callee, entry, method_holder, jump);
#endif
// Update stub.
method_holder->set_data((intptr_t)callee());
NativeGeneralJump::insert_unconditional(method_holder->next_instruction_address(), entry);
MacroAssembler::pd_patch_instruction(method_holder->next_instruction_address(), entry);
ICache::invalidate_range(stub, to_interp_stub_size());
// Update jump to call.
set_destination_mt_safe(stub);

View File

@@ -289,7 +289,7 @@ void DowncallLinker::StubGenerator::generate() {
__ verify_sve_vector_length(tmp1);
__ safepoint_poll(L_safepoint_poll_slow_path, true /* at_return */, true /* acquire */, false /* in_nmethod */, tmp1);
__ safepoint_poll(L_safepoint_poll_slow_path, true /* at_return */, false /* in_nmethod */, tmp1);
__ ldrw(tmp1, Address(rthread, JavaThread::suspend_flags_offset()));
__ cbnzw(tmp1, L_safepoint_poll_slow_path);

View File

@@ -38,7 +38,7 @@ define_pd_global(bool, UncommonNullCast, true); // Uncommon-trap nulls
define_pd_global(bool, DelayCompilerStubsGeneration, COMPILER2_OR_JVMCI);
define_pd_global(uintx, CodeCacheSegmentSize, 64);
define_pd_global(size_t, CodeCacheSegmentSize, 64);
define_pd_global(intx, CodeEntryAlignment, 64);
define_pd_global(intx, OptoLoopAlignment, 16);

View File

@@ -603,7 +603,7 @@ void InterpreterMacroAssembler::remove_activation(TosState state,
// the stack, will call InterpreterRuntime::at_unwind.
Label slow_path;
Label fast_path;
safepoint_poll(slow_path, true /* at_return */, false /* acquire */, false /* in_nmethod */);
safepoint_poll(slow_path, true /* at_return */, false /* in_nmethod */);
br(Assembler::AL, fast_path);
bind(slow_path);
push(state);

View File

@@ -553,13 +553,8 @@ address MacroAssembler::target_addr_for_insn_or_null(address insn_addr, unsigned
return MacroAssembler::target_addr_for_insn(insn_addr, insn);
}
void MacroAssembler::safepoint_poll(Label& slow_path, bool at_return, bool acquire, bool in_nmethod, Register tmp) {
if (acquire) {
lea(tmp, Address(rthread, JavaThread::polling_word_offset()));
ldar(tmp, tmp);
} else {
ldr(tmp, Address(rthread, JavaThread::polling_word_offset()));
}
void MacroAssembler::safepoint_poll(Label& slow_path, bool at_return, bool in_nmethod, Register tmp) {
ldr(tmp, Address(rthread, JavaThread::polling_word_offset()));
if (at_return) {
// Note that when in_nmethod is set, the stack pointer is incremented before the poll. Therefore,
// we may safely use the sp instead to perform the stack watermark check.
@@ -989,11 +984,19 @@ void MacroAssembler::emit_static_call_stub() {
mov_metadata(rmethod, nullptr);
// Jump to the entry point of the c2i stub.
movptr(rscratch1, 0);
br(rscratch1);
if (codestub_branch_needs_far_jump()) {
movptr(rscratch1, 0);
br(rscratch1);
} else {
b(pc());
}
}
int MacroAssembler::static_call_stub_size() {
if (!codestub_branch_needs_far_jump()) {
// isb; movk; movz; movz; b
return 5 * NativeInstruction::instruction_size;
}
// isb; movk; movz; movz; movk; movz; movz; br
return 8 * NativeInstruction::instruction_size;
}

View File

@@ -120,7 +120,7 @@ class MacroAssembler: public Assembler {
virtual void check_and_handle_popframe(Register java_thread);
virtual void check_and_handle_earlyret(Register java_thread);
void safepoint_poll(Label& slow_path, bool at_return, bool acquire, bool in_nmethod, Register tmp = rscratch1);
void safepoint_poll(Label& slow_path, bool at_return, bool in_nmethod, Register tmp = rscratch1);
void rt_call(address dest, Register tmp = rscratch1);
// Load Effective Address

View File

@@ -386,18 +386,6 @@ void NativeJump::patch_verified_entry(address entry, address verified_entry, add
void NativeGeneralJump::verify() { }
void NativeGeneralJump::insert_unconditional(address code_pos, address entry) {
NativeGeneralJump* n_jump = (NativeGeneralJump*)code_pos;
CodeBuffer cb(code_pos, instruction_size);
MacroAssembler a(&cb);
a.movptr(rscratch1, (uintptr_t)entry);
a.br(rscratch1);
ICache::invalidate_range(code_pos, instruction_size);
}
// MT-safe patching of a long jump instruction.
void NativeGeneralJump::replace_mt_safe(address instr_addr, address code_buffer) {
ShouldNotCallThis();

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2108, Red Hat Inc. All rights reserved.
* Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2025, Red Hat Inc. 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
@@ -383,7 +383,6 @@ public:
address jump_destination() const;
void set_jump_destination(address dest);
static void insert_unconditional(address code_pos, address entry);
static void replace_mt_safe(address instr_addr, address code_buffer);
static void verify();
};

View File

@@ -1877,7 +1877,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
// Check for safepoint operation in progress and/or pending suspend requests.
{
// No need for acquire as Java threads always disarm themselves.
__ safepoint_poll(safepoint_in_progress, true /* at_return */, false /* acquire */, false /* in_nmethod */);
__ safepoint_poll(safepoint_in_progress, true /* at_return */, false /* in_nmethod */);
__ ldrw(rscratch1, Address(rthread, JavaThread::suspend_flags_offset()));
__ cbnzw(rscratch1, safepoint_in_progress);
__ bind(safepoint_in_progress_done);

View File

@@ -26,6 +26,13 @@
#ifndef CPU_AARCH64_STUBDECLARATIONS_HPP
#define CPU_AARCH64_STUBDECLARATIONS_HPP
#define STUBGEN_PREUNIVERSE_BLOBS_ARCH_DO(do_stub, \
do_arch_blob, \
do_arch_entry, \
do_arch_entry_init) \
do_arch_blob(preuniverse, 0) \
#define STUBGEN_INITIAL_BLOBS_ARCH_DO(do_stub, \
do_arch_blob, \
do_arch_entry, \

View File

@@ -11653,6 +11653,10 @@ class StubGenerator: public StubCodeGenerator {
};
// Initialization
void generate_preuniverse_stubs() {
// preuniverse stubs are not needed for aarch64
}
void generate_initial_stubs() {
// Generate initial stubs and initializes the entry points
@@ -11898,6 +11902,9 @@ class StubGenerator: public StubCodeGenerator {
public:
StubGenerator(CodeBuffer* code, StubGenBlobId blob_id) : StubCodeGenerator(code, blob_id) {
switch(blob_id) {
case preuniverse_id:
generate_preuniverse_stubs();
break;
case initial_id:
generate_initial_stubs();
break;

View File

@@ -1018,7 +1018,7 @@ address TemplateInterpreterGenerator::generate_CRC32_update_entry() {
Label slow_path;
// If we need a safepoint check, generate full interpreter entry.
__ safepoint_poll(slow_path, false /* at_return */, false /* acquire */, false /* in_nmethod */);
__ safepoint_poll(slow_path, false /* at_return */, false /* in_nmethod */);
// We don't generate local frame and don't align stack because
// we call stub code and there is no safepoint on this path.
@@ -1065,7 +1065,7 @@ address TemplateInterpreterGenerator::generate_CRC32_updateBytes_entry(AbstractI
Label slow_path;
// If we need a safepoint check, generate full interpreter entry.
__ safepoint_poll(slow_path, false /* at_return */, false /* acquire */, false /* in_nmethod */);
__ safepoint_poll(slow_path, false /* at_return */, false /* in_nmethod */);
// We don't generate local frame and don't align stack because
// we call stub code and there is no safepoint on this path.
@@ -1455,7 +1455,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
Label L, Continue;
// No need for acquire as Java threads always disarm themselves.
__ safepoint_poll(L, true /* at_return */, false /* acquire */, false /* in_nmethod */);
__ safepoint_poll(L, true /* at_return */, false /* in_nmethod */);
__ ldrw(rscratch2, Address(rthread, JavaThread::suspend_flags_offset()));
__ cbz(rscratch2, Continue);
__ bind(L);
@@ -1608,7 +1608,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
Label slow_path;
Label fast_path;
__ safepoint_poll(slow_path, true /* at_return */, false /* acquire */, false /* in_nmethod */);
__ safepoint_poll(slow_path, true /* at_return */, false /* in_nmethod */);
__ br(Assembler::AL, fast_path);
__ bind(slow_path);
__ push(dtos);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2025, 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
@@ -51,7 +51,7 @@ define_pd_global(size_t, ProfiledCodeHeapSize, 14*M );
define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M );
define_pd_global(bool, ProfileInterpreter, false);
define_pd_global(size_t, CodeCacheExpansionSize, 32*K );
define_pd_global(uintx, CodeCacheMinBlockLength, 1);
define_pd_global(size_t, CodeCacheMinBlockLength, 1);
define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K);
define_pd_global(bool, NeverActAsServerClassMachine, true);
define_pd_global(uint64_t, MaxRAM, 1ULL*G);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2025, 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
@@ -94,7 +94,7 @@ define_pd_global(size_t, CodeCacheExpansionSize, 32*K);
// Ergonomics related flags
define_pd_global(uint64_t, MaxRAM, 4ULL*G);
#endif
define_pd_global(uintx, CodeCacheMinBlockLength, 6);
define_pd_global(size_t, CodeCacheMinBlockLength, 6);
define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K);
define_pd_global(bool, TrapBasedRangeChecks, false); // Not needed

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2025, 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
@@ -36,9 +36,9 @@ define_pd_global(bool, TrapBasedNullChecks, false); // Not needed
define_pd_global(bool, DelayCompilerStubsGeneration, false); // No need - only few compiler's stubs
define_pd_global(uintx, CodeCacheSegmentSize, 64);
define_pd_global(intx, CodeEntryAlignment, 16);
define_pd_global(intx, OptoLoopAlignment, 16);
define_pd_global(size_t, CodeCacheSegmentSize, 64);
define_pd_global(intx, CodeEntryAlignment, 16);
define_pd_global(intx, OptoLoopAlignment, 16);
#define DEFAULT_STACK_YELLOW_PAGES (2)
#define DEFAULT_STACK_RED_PAGES (1)

View File

@@ -26,6 +26,13 @@
#ifndef CPU_ARM_STUBDECLARATIONS_HPP
#define CPU_ARM_STUBDECLARATIONS_HPP
#define STUBGEN_PREUNIVERSE_BLOBS_ARCH_DO(do_stub, \
do_arch_blob, \
do_arch_entry, \
do_arch_entry_init) \
do_arch_blob(preuniverse, 0) \
#define STUBGEN_INITIAL_BLOBS_ARCH_DO(do_stub, \
do_arch_blob, \
do_arch_entry, \

View File

@@ -3126,6 +3126,10 @@ class StubGenerator: public StubCodeGenerator {
//---------------------------------------------------------------------------
// Initialization
void generate_preuniverse_stubs() {
// preuniverse stubs are not needed for arm
}
void generate_initial_stubs() {
// Generates all stubs and initializes the entry points
@@ -3201,6 +3205,9 @@ class StubGenerator: public StubCodeGenerator {
public:
StubGenerator(CodeBuffer* code, StubGenBlobId blob_id) : StubCodeGenerator(code, blob_id) {
switch(blob_id) {
case preuniverse_id:
generate_preuniverse_stubs();
break;
case initial_id:
generate_initial_stubs();
break;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2019 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -44,17 +44,17 @@ define_pd_global(intx, CompileThreshold, 1000);
define_pd_global(intx, OnStackReplacePercentage, 1400);
define_pd_global(bool, ProfileInterpreter, false);
define_pd_global(uintx, ReservedCodeCacheSize, 32*M);
define_pd_global(uintx, NonProfiledCodeHeapSize, 13*M );
define_pd_global(uintx, ProfiledCodeHeapSize, 14*M );
define_pd_global(uintx, NonNMethodCodeHeapSize, 5*M );
define_pd_global(uintx, CodeCacheExpansionSize, 32*K);
define_pd_global(uintx, CodeCacheMinBlockLength, 1);
define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K);
define_pd_global(size_t, ReservedCodeCacheSize, 32*M);
define_pd_global(size_t, NonProfiledCodeHeapSize, 13*M );
define_pd_global(size_t, ProfiledCodeHeapSize, 14*M );
define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M );
define_pd_global(size_t, CodeCacheExpansionSize, 32*K);
define_pd_global(size_t, CodeCacheMinBlockLength, 1);
define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K);
define_pd_global(bool, NeverActAsServerClassMachine, true);
define_pd_global(size_t, NewSizeThreadIncrease, 16*K);
define_pd_global(uint64_t, MaxRAM, 1ULL*G);
define_pd_global(uintx, InitialCodeCacheSize, 160*K);
define_pd_global(size_t, InitialCodeCacheSize, 160*K);
#endif // !COMPILER2
define_pd_global(bool, UseTypeProfile, false);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2019 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -78,17 +78,17 @@ define_pd_global(uint, SuperWordStoreToLoadForwardingFailureDetection, 16);
define_pd_global(bool, OptoScheduling, false);
define_pd_global(bool, IdealizeClearArrayNode, true);
define_pd_global(uintx, InitialCodeCacheSize, 2048*K); // Integral multiple of CodeCacheExpansionSize
define_pd_global(uintx, ReservedCodeCacheSize, 48*M);
define_pd_global(uintx, NonProfiledCodeHeapSize, 21*M);
define_pd_global(uintx, ProfiledCodeHeapSize, 22*M);
define_pd_global(uintx, NonNMethodCodeHeapSize, 5*M );
define_pd_global(uintx, CodeCacheExpansionSize, 64*K);
define_pd_global(size_t, InitialCodeCacheSize, 2048*K); // Integral multiple of CodeCacheExpansionSize
define_pd_global(size_t, ReservedCodeCacheSize, 48*M);
define_pd_global(size_t, NonProfiledCodeHeapSize, 21*M);
define_pd_global(size_t, ProfiledCodeHeapSize, 22*M);
define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M );
define_pd_global(size_t, CodeCacheExpansionSize, 64*K);
// Ergonomics related flags
define_pd_global(uint64_t, MaxRAM, 128ULL*G);
define_pd_global(uintx, CodeCacheMinBlockLength, 6);
define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K);
define_pd_global(size_t, CodeCacheMinBlockLength, 6);
define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K);
define_pd_global(bool, TrapBasedRangeChecks, true);

View File

@@ -333,9 +333,9 @@ int SaveLiveRegisters::iterate_over_register_mask(IterationAction action, int of
}
} else if (vm_reg->is_ConditionRegister()) {
// NOP. Conditions registers are covered by save_LR_CR
} else if (vm_reg->is_VectorSRegister()) {
} else if (vm_reg->is_VectorRegister()) {
assert(SuperwordUseVSX, "or should not reach here");
VectorSRegister vs_reg = vm_reg->as_VectorSRegister();
VectorSRegister vs_reg = (vm_reg->as_VectorRegister()).to_vsr();
if (vs_reg->encoding() >= VSR32->encoding() && vs_reg->encoding() <= VSR51->encoding()) {
reg_save_index += (2 + (reg_save_index & 1)); // 2 slots + alignment if needed

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2024 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -59,10 +59,10 @@ define_pd_global(intx, StackReservedPages, DEFAULT_STACK_RESERVED_PAGES);
define_pd_global(bool, VMContinuations, true);
// Use large code-entry alignment.
define_pd_global(uintx, CodeCacheSegmentSize, 128);
define_pd_global(intx, CodeEntryAlignment, 64);
define_pd_global(intx, OptoLoopAlignment, 16);
define_pd_global(intx, InlineSmallCode, 1500);
define_pd_global(size_t, CodeCacheSegmentSize, 128);
define_pd_global(intx, CodeEntryAlignment, 64);
define_pd_global(intx, OptoLoopAlignment, 16);
define_pd_global(intx, InlineSmallCode, 1500);
// Flags for template interpreter.
define_pd_global(bool, RewriteBytecodes, true);

File diff suppressed because it is too large Load Diff

View File

@@ -321,6 +321,7 @@ class VectorRegister {
// accessors
constexpr int encoding() const { assert(is_valid(), "invalid register"); return _encoding; }
inline VMReg as_VMReg() const;
// testers
constexpr bool is_valid() const { return (0 <= _encoding && _encoding < number_of_registers); }
@@ -392,7 +393,6 @@ class VectorSRegister {
// accessors
constexpr int encoding() const { assert(is_valid(), "invalid register"); return _encoding; }
inline VMReg as_VMReg() const;
VectorSRegister successor() const { return VectorSRegister(encoding() + 1); }
// testers
@@ -484,8 +484,8 @@ class ConcreteRegisterImpl : public AbstractRegisterImpl {
enum {
max_gpr = Register::number_of_registers * 2,
max_fpr = max_gpr + FloatRegister::number_of_registers * 2,
max_vsr = max_fpr + VectorSRegister::number_of_registers * 4,
max_cnd = max_vsr + ConditionRegister::number_of_registers,
max_vr = max_fpr + VectorRegister::number_of_registers * 4,
max_cnd = max_vr + ConditionRegister::number_of_registers,
max_spr = max_cnd + SpecialRegister::number_of_registers,
// This number must be large enough to cover REG_COUNT (defined by c2) registers.
// There is no requirement that any ordering here matches any ordering c2 gives

View File

@@ -111,13 +111,13 @@ class RegisterSaver {
int_reg,
float_reg,
special_reg,
vs_reg
vec_reg
} RegisterType;
typedef enum {
reg_size = 8,
half_reg_size = reg_size / 2,
vs_reg_size = 16
vec_reg_size = 16
} RegisterConstants;
typedef struct {
@@ -137,8 +137,8 @@ class RegisterSaver {
#define RegisterSaver_LiveSpecialReg(regname) \
{ RegisterSaver::special_reg, regname->encoding(), regname->as_VMReg() }
#define RegisterSaver_LiveVSReg(regname) \
{ RegisterSaver::vs_reg, regname->encoding(), regname->as_VMReg() }
#define RegisterSaver_LiveVecReg(regname) \
{ RegisterSaver::vec_reg, regname->encoding(), regname->as_VMReg() }
static const RegisterSaver::LiveRegType RegisterSaver_LiveRegs[] = {
// Live registers which get spilled to the stack. Register
@@ -220,42 +220,42 @@ static const RegisterSaver::LiveRegType RegisterSaver_LiveRegs[] = {
RegisterSaver_LiveIntReg( R31 ) // must be the last register (see save/restore functions below)
};
static const RegisterSaver::LiveRegType RegisterSaver_LiveVSRegs[] = {
static const RegisterSaver::LiveRegType RegisterSaver_LiveVecRegs[] = {
//
// live vector scalar registers (optional, only these ones are used by C2):
// live vector registers (optional, only these ones are used by C2):
//
RegisterSaver_LiveVSReg( VSR32 ),
RegisterSaver_LiveVSReg( VSR33 ),
RegisterSaver_LiveVSReg( VSR34 ),
RegisterSaver_LiveVSReg( VSR35 ),
RegisterSaver_LiveVSReg( VSR36 ),
RegisterSaver_LiveVSReg( VSR37 ),
RegisterSaver_LiveVSReg( VSR38 ),
RegisterSaver_LiveVSReg( VSR39 ),
RegisterSaver_LiveVSReg( VSR40 ),
RegisterSaver_LiveVSReg( VSR41 ),
RegisterSaver_LiveVSReg( VSR42 ),
RegisterSaver_LiveVSReg( VSR43 ),
RegisterSaver_LiveVSReg( VSR44 ),
RegisterSaver_LiveVSReg( VSR45 ),
RegisterSaver_LiveVSReg( VSR46 ),
RegisterSaver_LiveVSReg( VSR47 ),
RegisterSaver_LiveVSReg( VSR48 ),
RegisterSaver_LiveVSReg( VSR49 ),
RegisterSaver_LiveVSReg( VSR50 ),
RegisterSaver_LiveVSReg( VSR51 ),
RegisterSaver_LiveVSReg( VSR52 ),
RegisterSaver_LiveVSReg( VSR53 ),
RegisterSaver_LiveVSReg( VSR54 ),
RegisterSaver_LiveVSReg( VSR55 ),
RegisterSaver_LiveVSReg( VSR56 ),
RegisterSaver_LiveVSReg( VSR57 ),
RegisterSaver_LiveVSReg( VSR58 ),
RegisterSaver_LiveVSReg( VSR59 ),
RegisterSaver_LiveVSReg( VSR60 ),
RegisterSaver_LiveVSReg( VSR61 ),
RegisterSaver_LiveVSReg( VSR62 ),
RegisterSaver_LiveVSReg( VSR63 )
RegisterSaver_LiveVecReg( VR0 ),
RegisterSaver_LiveVecReg( VR1 ),
RegisterSaver_LiveVecReg( VR2 ),
RegisterSaver_LiveVecReg( VR3 ),
RegisterSaver_LiveVecReg( VR4 ),
RegisterSaver_LiveVecReg( VR5 ),
RegisterSaver_LiveVecReg( VR6 ),
RegisterSaver_LiveVecReg( VR7 ),
RegisterSaver_LiveVecReg( VR8 ),
RegisterSaver_LiveVecReg( VR9 ),
RegisterSaver_LiveVecReg( VR10 ),
RegisterSaver_LiveVecReg( VR11 ),
RegisterSaver_LiveVecReg( VR12 ),
RegisterSaver_LiveVecReg( VR13 ),
RegisterSaver_LiveVecReg( VR14 ),
RegisterSaver_LiveVecReg( VR15 ),
RegisterSaver_LiveVecReg( VR16 ),
RegisterSaver_LiveVecReg( VR17 ),
RegisterSaver_LiveVecReg( VR18 ),
RegisterSaver_LiveVecReg( VR19 ),
RegisterSaver_LiveVecReg( VR20 ),
RegisterSaver_LiveVecReg( VR21 ),
RegisterSaver_LiveVecReg( VR22 ),
RegisterSaver_LiveVecReg( VR23 ),
RegisterSaver_LiveVecReg( VR24 ),
RegisterSaver_LiveVecReg( VR25 ),
RegisterSaver_LiveVecReg( VR26 ),
RegisterSaver_LiveVecReg( VR27 ),
RegisterSaver_LiveVecReg( VR28 ),
RegisterSaver_LiveVecReg( VR29 ),
RegisterSaver_LiveVecReg( VR30 ),
RegisterSaver_LiveVecReg( VR31 )
};
@@ -277,10 +277,10 @@ OopMap* RegisterSaver::push_frame_reg_args_and_save_live_registers(MacroAssemble
// calculate frame size
const int regstosave_num = sizeof(RegisterSaver_LiveRegs) /
sizeof(RegisterSaver::LiveRegType);
const int vsregstosave_num = save_vectors ? (sizeof(RegisterSaver_LiveVSRegs) /
const int vecregstosave_num = save_vectors ? (sizeof(RegisterSaver_LiveVecRegs) /
sizeof(RegisterSaver::LiveRegType))
: 0;
const int register_save_size = regstosave_num * reg_size + vsregstosave_num * vs_reg_size;
const int register_save_size = regstosave_num * reg_size + vecregstosave_num * vec_reg_size;
const int frame_size_in_bytes = align_up(register_save_size, frame::alignment_in_bytes)
+ frame::native_abi_reg_args_size;
@@ -298,8 +298,8 @@ OopMap* RegisterSaver::push_frame_reg_args_and_save_live_registers(MacroAssemble
// Save some registers in the last (non-vector) slots of the new frame so we
// can use them as scratch regs or to determine the return pc.
__ std(R31, frame_size_in_bytes - reg_size - vsregstosave_num * vs_reg_size, R1_SP);
__ std(R30, frame_size_in_bytes - 2*reg_size - vsregstosave_num * vs_reg_size, R1_SP);
__ std(R31, frame_size_in_bytes - reg_size - vecregstosave_num * vec_reg_size, R1_SP);
__ std(R30, frame_size_in_bytes - 2*reg_size - vecregstosave_num * vec_reg_size, R1_SP);
// save the flags
// Do the save_LR by hand and adjust the return pc if requested.
@@ -360,37 +360,37 @@ OopMap* RegisterSaver::push_frame_reg_args_and_save_live_registers(MacroAssemble
// the utilized instructions (PowerArchitecturePPC64).
assert(is_aligned(offset, StackAlignmentInBytes), "should be");
if (PowerArchitecturePPC64 >= 10) {
assert(is_even(vsregstosave_num), "expectation");
for (int i = 0; i < vsregstosave_num; i += 2) {
int reg_num = RegisterSaver_LiveVSRegs[i].reg_num;
assert(RegisterSaver_LiveVSRegs[i + 1].reg_num == reg_num + 1, "or use other instructions!");
assert(is_even(vecregstosave_num), "expectation");
for (int i = 0; i < vecregstosave_num; i += 2) {
int reg_num = RegisterSaver_LiveVecRegs[i].reg_num;
assert(RegisterSaver_LiveVecRegs[i + 1].reg_num == reg_num + 1, "or use other instructions!");
__ stxvp(as_VectorSRegister(reg_num), offset, R1_SP);
__ stxvp(as_VectorRegister(reg_num).to_vsr(), offset, R1_SP);
// Note: The contents were read in the same order (see loadV16_Power9 node in ppc.ad).
if (generate_oop_map) {
map->set_callee_saved(VMRegImpl::stack2reg(offset >> 2),
RegisterSaver_LiveVSRegs[i LITTLE_ENDIAN_ONLY(+1) ].vmreg);
map->set_callee_saved(VMRegImpl::stack2reg((offset + vs_reg_size) >> 2),
RegisterSaver_LiveVSRegs[i BIG_ENDIAN_ONLY(+1) ].vmreg);
RegisterSaver_LiveVecRegs[i LITTLE_ENDIAN_ONLY(+1) ].vmreg);
map->set_callee_saved(VMRegImpl::stack2reg((offset + vec_reg_size) >> 2),
RegisterSaver_LiveVecRegs[i BIG_ENDIAN_ONLY(+1) ].vmreg);
}
offset += (2 * vs_reg_size);
offset += (2 * vec_reg_size);
}
} else {
for (int i = 0; i < vsregstosave_num; i++) {
int reg_num = RegisterSaver_LiveVSRegs[i].reg_num;
for (int i = 0; i < vecregstosave_num; i++) {
int reg_num = RegisterSaver_LiveVecRegs[i].reg_num;
if (PowerArchitecturePPC64 >= 9) {
__ stxv(as_VectorSRegister(reg_num), offset, R1_SP);
__ stxv(as_VectorRegister(reg_num)->to_vsr(), offset, R1_SP);
} else {
__ li(R31, offset);
__ stxvd2x(as_VectorSRegister(reg_num), R31, R1_SP);
__ stxvd2x(as_VectorRegister(reg_num)->to_vsr(), R31, R1_SP);
}
// Note: The contents were read in the same order (see loadV16_Power8 / loadV16_Power9 node in ppc.ad).
if (generate_oop_map) {
VMReg vsr = RegisterSaver_LiveVSRegs[i].vmreg;
VMReg vsr = RegisterSaver_LiveVecRegs[i].vmreg;
map->set_callee_saved(VMRegImpl::stack2reg(offset >> 2), vsr);
}
offset += vs_reg_size;
offset += vec_reg_size;
}
}
@@ -411,10 +411,10 @@ void RegisterSaver::restore_live_registers_and_pop_frame(MacroAssembler* masm,
bool save_vectors) {
const int regstosave_num = sizeof(RegisterSaver_LiveRegs) /
sizeof(RegisterSaver::LiveRegType);
const int vsregstosave_num = save_vectors ? (sizeof(RegisterSaver_LiveVSRegs) /
const int vecregstosave_num = save_vectors ? (sizeof(RegisterSaver_LiveVecRegs) /
sizeof(RegisterSaver::LiveRegType))
: 0;
const int register_save_size = regstosave_num * reg_size + vsregstosave_num * vs_reg_size;
const int register_save_size = regstosave_num * reg_size + vecregstosave_num * vec_reg_size;
const int register_save_offset = frame_size_in_bytes - register_save_size;
@@ -456,26 +456,26 @@ void RegisterSaver::restore_live_registers_and_pop_frame(MacroAssembler* masm,
assert(is_aligned(offset, StackAlignmentInBytes), "should be");
if (PowerArchitecturePPC64 >= 10) {
for (int i = 0; i < vsregstosave_num; i += 2) {
int reg_num = RegisterSaver_LiveVSRegs[i].reg_num;
assert(RegisterSaver_LiveVSRegs[i + 1].reg_num == reg_num + 1, "or use other instructions!");
for (int i = 0; i < vecregstosave_num; i += 2) {
int reg_num = RegisterSaver_LiveVecRegs[i].reg_num;
assert(RegisterSaver_LiveVecRegs[i + 1].reg_num == reg_num + 1, "or use other instructions!");
__ lxvp(as_VectorSRegister(reg_num), offset, R1_SP);
__ lxvp(as_VectorRegister(reg_num).to_vsr(), offset, R1_SP);
offset += (2 * vs_reg_size);
offset += (2 * vec_reg_size);
}
} else {
for (int i = 0; i < vsregstosave_num; i++) {
int reg_num = RegisterSaver_LiveVSRegs[i].reg_num;
for (int i = 0; i < vecregstosave_num; i++) {
int reg_num = RegisterSaver_LiveVecRegs[i].reg_num;
if (PowerArchitecturePPC64 >= 9) {
__ lxv(as_VectorSRegister(reg_num), offset, R1_SP);
__ lxv(as_VectorRegister(reg_num).to_vsr(), offset, R1_SP);
} else {
__ li(R31, offset);
__ lxvd2x(as_VectorSRegister(reg_num), R31, R1_SP);
__ lxvd2x(as_VectorRegister(reg_num).to_vsr(), R31, R1_SP);
}
offset += vs_reg_size;
offset += vec_reg_size;
}
}
@@ -486,7 +486,7 @@ void RegisterSaver::restore_live_registers_and_pop_frame(MacroAssembler* masm,
__ mtlr(R31);
// restore scratch register's value
__ ld(R31, frame_size_in_bytes - reg_size - vsregstosave_num * vs_reg_size, R1_SP);
__ ld(R31, frame_size_in_bytes - reg_size - vecregstosave_num * vec_reg_size, R1_SP);
// pop the frame
__ addi(R1_SP, R1_SP, frame_size_in_bytes);

View File

@@ -26,6 +26,13 @@
#ifndef CPU_PPC_STUBDECLARATIONS_HPP
#define CPU_PPC_STUBDECLARATIONS_HPP
#define STUBGEN_PREUNIVERSE_BLOBS_ARCH_DO(do_stub, \
do_arch_blob, \
do_arch_entry, \
do_arch_entry_init) \
do_arch_blob(preuniverse, 0) \
#define STUBGEN_INITIAL_BLOBS_ARCH_DO(do_stub, \
do_arch_blob, \
do_arch_entry, \

View File

@@ -4938,6 +4938,10 @@ void generate_lookup_secondary_supers_table_stub() {
}
// Initialization
void generate_preuniverse_stubs() {
// preuniverse stubs are not needed for ppc
}
void generate_initial_stubs() {
// Generates all stubs and initializes the entry points
@@ -5067,6 +5071,9 @@ void generate_lookup_secondary_supers_table_stub() {
public:
StubGenerator(CodeBuffer* code, StubGenBlobId blob_id) : StubCodeGenerator(code, blob_id) {
switch(blob_id) {
case preuniverse_id:
generate_preuniverse_stubs();
break;
case initial_id:
generate_initial_stubs();
break;

View File

@@ -47,7 +47,7 @@ void VMRegImpl::set_regName() {
}
VectorSRegister vsreg = ::as_VectorSRegister(0);
for ( ; i < ConcreteRegisterImpl::max_vsr; ) {
for ( ; i < ConcreteRegisterImpl::max_vr; ) {
regName[i++] = vsreg->name();
regName[i++] = vsreg->name();
regName[i++] = vsreg->name();

View File

@@ -35,13 +35,13 @@ inline bool is_FloatRegister() {
value() < ConcreteRegisterImpl::max_fpr;
}
inline bool is_VectorSRegister() {
inline bool is_VectorRegister() {
return value() >= ConcreteRegisterImpl::max_fpr &&
value() < ConcreteRegisterImpl::max_vsr;
value() < ConcreteRegisterImpl::max_vr;
}
inline bool is_ConditionRegister() {
return value() >= ConcreteRegisterImpl::max_vsr &&
return value() >= ConcreteRegisterImpl::max_vr &&
value() < ConcreteRegisterImpl::max_cnd;
}
@@ -60,15 +60,15 @@ inline FloatRegister as_FloatRegister() {
return ::as_FloatRegister((value() - ConcreteRegisterImpl::max_gpr) >> 1);
}
inline VectorSRegister as_VectorSRegister() {
assert(is_VectorSRegister(), "must be");
return ::as_VectorSRegister((value() - ConcreteRegisterImpl::max_fpr) >> 2);
inline VectorRegister as_VectorRegister() {
assert(is_VectorRegister(), "must be");
return ::as_VectorRegister((value() - ConcreteRegisterImpl::max_fpr) >> 2);
}
inline bool is_concrete() {
assert(is_reg(), "must be");
if (is_Register() || is_FloatRegister()) return is_even(value());
if (is_VectorSRegister()) {
if (is_VectorRegister()) {
int base = value() - ConcreteRegisterImpl::max_fpr;
return (base & 3) == 0;
}

View File

@@ -40,13 +40,13 @@ inline VMReg FloatRegister::as_VMReg() const {
return VMRegImpl::as_VMReg((encoding() << 1) + ConcreteRegisterImpl::max_gpr);
}
inline VMReg VectorSRegister::as_VMReg() const {
inline VMReg VectorRegister::as_VMReg() const {
// Four halves, multiply by 4.
return VMRegImpl::as_VMReg((encoding() << 2) + ConcreteRegisterImpl::max_fpr);
}
inline VMReg ConditionRegister::as_VMReg() const {
return VMRegImpl::as_VMReg((encoding()) + ConcreteRegisterImpl::max_vsr);
return VMRegImpl::as_VMReg((encoding()) + ConcreteRegisterImpl::max_vr);
}
inline VMReg SpecialRegister::as_VMReg() const {

View File

@@ -401,7 +401,7 @@ void LIR_Assembler::return_op(LIR_Opr result, C1SafepointPollStub* code_stub) {
code_stub->set_safepoint_offset(__ offset());
__ relocate(relocInfo::poll_return_type);
__ safepoint_poll(*code_stub->entry(), true /* at_return */, false /* acquire */, true /* in_nmethod */);
__ safepoint_poll(*code_stub->entry(), true /* at_return */, true /* in_nmethod */);
__ ret();
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2022, Huawei Technologies Co., Ltd. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -43,15 +43,15 @@ define_pd_global(intx, CompileThreshold, 1500 );
define_pd_global(intx, OnStackReplacePercentage, 933 );
define_pd_global(intx, NewSizeThreadIncrease, 4*K );
define_pd_global(intx, InitialCodeCacheSize, 160*K);
define_pd_global(intx, ReservedCodeCacheSize, 32*M );
define_pd_global(intx, NonProfiledCodeHeapSize, 13*M );
define_pd_global(intx, ProfiledCodeHeapSize, 14*M );
define_pd_global(intx, NonNMethodCodeHeapSize, 5*M );
define_pd_global(size_t, InitialCodeCacheSize, 160*K);
define_pd_global(size_t, ReservedCodeCacheSize, 32*M );
define_pd_global(size_t, NonProfiledCodeHeapSize, 13*M );
define_pd_global(size_t, ProfiledCodeHeapSize, 14*M );
define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M );
define_pd_global(bool, ProfileInterpreter, false);
define_pd_global(intx, CodeCacheExpansionSize, 32*K );
define_pd_global(uintx, CodeCacheMinBlockLength, 1);
define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K);
define_pd_global(size_t, CodeCacheExpansionSize, 32*K );
define_pd_global(size_t, CodeCacheMinBlockLength, 1);
define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K);
define_pd_global(bool, NeverActAsServerClassMachine, true );
define_pd_global(uint64_t, MaxRAM, 1ULL*G);
define_pd_global(bool, CICompileOSR, true );

View File

@@ -2170,15 +2170,13 @@ void C2_MacroAssembler::enc_cmove_cmp_fp(int cmpFlag, FloatRegister op1, FloatRe
cmov_cmp_fp_le(op1, op2, dst, src, is_single);
break;
case BoolTest::ge:
assert(false, "Should go to BoolTest::le case");
ShouldNotReachHere();
cmov_cmp_fp_ge(op1, op2, dst, src, is_single);
break;
case BoolTest::lt:
cmov_cmp_fp_lt(op1, op2, dst, src, is_single);
break;
case BoolTest::gt:
assert(false, "Should go to BoolTest::lt case");
ShouldNotReachHere();
cmov_cmp_fp_gt(op1, op2, dst, src, is_single);
break;
default:
assert(false, "unsupported compare condition");

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2022, Huawei Technologies Co., Ltd. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -51,8 +51,8 @@ define_pd_global(intx, NewSizeThreadIncrease, ScaleForWordSize(4*K));
define_pd_global(intx, LoopUnrollLimit, 60);
define_pd_global(intx, LoopPercentProfileLimit, 10);
// InitialCodeCacheSize derived from specjbb2000 run.
define_pd_global(intx, InitialCodeCacheSize, 2496*K); // Integral multiple of CodeCacheExpansionSize
define_pd_global(intx, CodeCacheExpansionSize, 64*K);
define_pd_global(size_t, InitialCodeCacheSize, 2496*K); // Integral multiple of CodeCacheExpansionSize
define_pd_global(size_t, CodeCacheExpansionSize, 64*K);
// Ergonomics related flags
define_pd_global(uint64_t,MaxRAM, 128ULL*G);
@@ -69,12 +69,12 @@ define_pd_global(bool, SuperWordLoopUnrollAnalysis, true);
define_pd_global(uint, SuperWordStoreToLoadForwardingFailureDetection, 16);
define_pd_global(bool, IdealizeClearArrayNode, true);
define_pd_global(intx, ReservedCodeCacheSize, 48*M);
define_pd_global(intx, NonProfiledCodeHeapSize, 21*M);
define_pd_global(intx, ProfiledCodeHeapSize, 22*M);
define_pd_global(intx, NonNMethodCodeHeapSize, 5*M );
define_pd_global(uintx, CodeCacheMinBlockLength, 6);
define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K);
define_pd_global(size_t, ReservedCodeCacheSize, 48*M);
define_pd_global(size_t, NonProfiledCodeHeapSize, 21*M);
define_pd_global(size_t, ProfiledCodeHeapSize, 22*M);
define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M );
define_pd_global(size_t, CodeCacheMinBlockLength, 6);
define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K);
// Ergonomics related flags
define_pd_global(bool, NeverActAsServerClassMachine, false);

View File

@@ -287,7 +287,7 @@ void DowncallLinker::StubGenerator::generate() {
__ membar(MacroAssembler::AnyAny);
}
__ safepoint_poll(L_safepoint_poll_slow_path, true /* at_return */, true /* acquire */, false /* in_nmethod */);
__ safepoint_poll(L_safepoint_poll_slow_path, true /* at_return */, false /* in_nmethod */);
__ lwu(t0, Address(xthread, JavaThread::suspend_flags_offset()));
__ bnez(t0, L_safepoint_poll_slow_path);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2023, Huawei Technologies Co., Ltd. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -38,7 +38,7 @@ define_pd_global(bool, UncommonNullCast, true); // Uncommon-trap nulls
define_pd_global(bool, DelayCompilerStubsGeneration, COMPILER2_OR_JVMCI);
define_pd_global(uintx, CodeCacheSegmentSize, 64 COMPILER1_AND_COMPILER2_PRESENT(+64)); // Tiered compilation has large code-entry alignment.
define_pd_global(size_t, CodeCacheSegmentSize, 64 COMPILER1_AND_COMPILER2_PRESENT(+64)); // Tiered compilation has large code-entry alignment.
define_pd_global(intx, CodeEntryAlignment, 64);
define_pd_global(intx, OptoLoopAlignment, 16);

View File

@@ -645,7 +645,7 @@ void InterpreterMacroAssembler::remove_activation(TosState state,
// the stack, will call InterpreterRuntime::at_unwind.
Label slow_path;
Label fast_path;
safepoint_poll(slow_path, true /* at_return */, false /* acquire */, false /* in_nmethod */);
safepoint_poll(slow_path, true /* at_return */, false /* in_nmethod */);
j(fast_path);
bind(slow_path);

View File

@@ -1268,12 +1268,19 @@ void MacroAssembler::cmov_gtu(Register cmp1, Register cmp2, Register dst, Regist
}
// ----------- cmove, compare float -----------
//
// For CmpF/D + CMoveI/L, ordered ones are quite straight and simple,
// so, just list behaviour of unordered ones as follow.
//
// Set dst (CMoveI (Binary cop (CmpF/D op1 op2)) (Binary dst src))
// (If one or both inputs to the compare are NaN, then)
// 1. (op1 lt op2) => true => CMove: dst = src
// 2. (op1 le op2) => true => CMove: dst = src
// 3. (op1 gt op2) => false => CMove: dst = dst
// 4. (op1 ge op2) => false => CMove: dst = dst
// 5. (op1 eq op2) => false => CMove: dst = dst
// 6. (op1 ne op2) => true => CMove: dst = src
// Move src to dst only if cmp1 == cmp2,
// otherwise leave dst unchanged, including the case where one of them is NaN.
// Clarification:
// java code : cmp1 != cmp2 ? dst : src
// transformed to : CMove dst, (cmp1 eq cmp2), dst, src
void MacroAssembler::cmov_cmp_fp_eq(FloatRegister cmp1, FloatRegister cmp2, Register dst, Register src, bool is_single) {
if (UseZicond) {
if (is_single) {
@@ -1289,7 +1296,7 @@ void MacroAssembler::cmov_cmp_fp_eq(FloatRegister cmp1, FloatRegister cmp2, Regi
Label no_set;
if (is_single) {
// jump if cmp1 != cmp2, including the case of NaN
// not jump (i.e. move src to dst) if cmp1 == cmp2
// fallthrough (i.e. move src to dst) if cmp1 == cmp2
float_bne(cmp1, cmp2, no_set);
} else {
double_bne(cmp1, cmp2, no_set);
@@ -1298,11 +1305,6 @@ void MacroAssembler::cmov_cmp_fp_eq(FloatRegister cmp1, FloatRegister cmp2, Regi
bind(no_set);
}
// Keep dst unchanged only if cmp1 == cmp2,
// otherwise move src to dst, including the case where one of them is NaN.
// Clarification:
// java code : cmp1 == cmp2 ? dst : src
// transformed to : CMove dst, (cmp1 ne cmp2), dst, src
void MacroAssembler::cmov_cmp_fp_ne(FloatRegister cmp1, FloatRegister cmp2, Register dst, Register src, bool is_single) {
if (UseZicond) {
if (is_single) {
@@ -1318,7 +1320,7 @@ void MacroAssembler::cmov_cmp_fp_ne(FloatRegister cmp1, FloatRegister cmp2, Regi
Label no_set;
if (is_single) {
// jump if cmp1 == cmp2
// not jump (i.e. move src to dst) if cmp1 != cmp2, including the case of NaN
// fallthrough (i.e. move src to dst) if cmp1 != cmp2, including the case of NaN
float_beq(cmp1, cmp2, no_set);
} else {
double_beq(cmp1, cmp2, no_set);
@@ -1327,14 +1329,6 @@ void MacroAssembler::cmov_cmp_fp_ne(FloatRegister cmp1, FloatRegister cmp2, Regi
bind(no_set);
}
// When cmp1 <= cmp2 or any of them is NaN then dst = src, otherwise, dst = dst
// Clarification
// scenario 1:
// java code : cmp2 < cmp1 ? dst : src
// transformed to : CMove dst, (cmp1 le cmp2), dst, src
// scenario 2:
// java code : cmp1 > cmp2 ? dst : src
// transformed to : CMove dst, (cmp1 le cmp2), dst, src
void MacroAssembler::cmov_cmp_fp_le(FloatRegister cmp1, FloatRegister cmp2, Register dst, Register src, bool is_single) {
if (UseZicond) {
if (is_single) {
@@ -1350,7 +1344,7 @@ void MacroAssembler::cmov_cmp_fp_le(FloatRegister cmp1, FloatRegister cmp2, Regi
Label no_set;
if (is_single) {
// jump if cmp1 > cmp2
// not jump (i.e. move src to dst) if cmp1 <= cmp2 or either is NaN
// fallthrough (i.e. move src to dst) if cmp1 <= cmp2 or either is NaN
float_bgt(cmp1, cmp2, no_set);
} else {
double_bgt(cmp1, cmp2, no_set);
@@ -1359,14 +1353,30 @@ void MacroAssembler::cmov_cmp_fp_le(FloatRegister cmp1, FloatRegister cmp2, Regi
bind(no_set);
}
// When cmp1 < cmp2 or any of them is NaN then dst = src, otherwise, dst = dst
// Clarification
// scenario 1:
// java code : cmp2 <= cmp1 ? dst : src
// transformed to : CMove dst, (cmp1 lt cmp2), dst, src
// scenario 2:
// java code : cmp1 >= cmp2 ? dst : src
// transformed to : CMove dst, (cmp1 lt cmp2), dst, src
void MacroAssembler::cmov_cmp_fp_ge(FloatRegister cmp1, FloatRegister cmp2, Register dst, Register src, bool is_single) {
if (UseZicond) {
if (is_single) {
fle_s(t0, cmp2, cmp1);
} else {
fle_d(t0, cmp2, cmp1);
}
czero_nez(dst, dst, t0);
czero_eqz(t0 , src, t0);
orr(dst, dst, t0);
return;
}
Label no_set;
if (is_single) {
// jump if cmp1 < cmp2 or either is NaN
// fallthrough (i.e. move src to dst) if cmp1 >= cmp2
float_blt(cmp1, cmp2, no_set, false, true);
} else {
double_blt(cmp1, cmp2, no_set, false, true);
}
mv(dst, src);
bind(no_set);
}
void MacroAssembler::cmov_cmp_fp_lt(FloatRegister cmp1, FloatRegister cmp2, Register dst, Register src, bool is_single) {
if (UseZicond) {
if (is_single) {
@@ -1382,7 +1392,7 @@ void MacroAssembler::cmov_cmp_fp_lt(FloatRegister cmp1, FloatRegister cmp2, Regi
Label no_set;
if (is_single) {
// jump if cmp1 >= cmp2
// not jump (i.e. move src to dst) if cmp1 < cmp2 or either is NaN
// fallthrough (i.e. move src to dst) if cmp1 < cmp2 or either is NaN
float_bge(cmp1, cmp2, no_set);
} else {
double_bge(cmp1, cmp2, no_set);
@@ -1391,6 +1401,30 @@ void MacroAssembler::cmov_cmp_fp_lt(FloatRegister cmp1, FloatRegister cmp2, Regi
bind(no_set);
}
void MacroAssembler::cmov_cmp_fp_gt(FloatRegister cmp1, FloatRegister cmp2, Register dst, Register src, bool is_single) {
if (UseZicond) {
if (is_single) {
flt_s(t0, cmp2, cmp1);
} else {
flt_d(t0, cmp2, cmp1);
}
czero_nez(dst, dst, t0);
czero_eqz(t0 , src, t0);
orr(dst, dst, t0);
return;
}
Label no_set;
if (is_single) {
// jump if cmp1 <= cmp2 or either is NaN
// fallthrough (i.e. move src to dst) if cmp1 > cmp2
float_ble(cmp1, cmp2, no_set, false, true);
} else {
double_ble(cmp1, cmp2, no_set, false, true);
}
mv(dst, src);
bind(no_set);
}
// Float compare branch instructions
#define INSN(NAME, FLOATCMP, BRANCH) \
@@ -3739,11 +3773,8 @@ void MacroAssembler::check_klass_subtype(Register sub_klass,
bind(L_failure);
}
void MacroAssembler::safepoint_poll(Label& slow_path, bool at_return, bool acquire, bool in_nmethod, Register tmp_reg) {
void MacroAssembler::safepoint_poll(Label& slow_path, bool at_return, bool in_nmethod, Register tmp_reg) {
ld(tmp_reg, Address(xthread, JavaThread::polling_word_offset()));
if (acquire) {
membar(MacroAssembler::LoadLoad | MacroAssembler::LoadStore);
}
if (at_return) {
bgtu(in_nmethod ? sp : fp, tmp_reg, slow_path, /* is_far */ true);
} else {

View File

@@ -44,7 +44,7 @@ class MacroAssembler: public Assembler {
MacroAssembler(CodeBuffer* code) : Assembler(code) {}
void safepoint_poll(Label& slow_path, bool at_return, bool acquire, bool in_nmethod, Register tmp_reg = t0);
void safepoint_poll(Label& slow_path, bool at_return, bool in_nmethod, Register tmp_reg = t0);
// Alignment
int align(int modulus, int extra_offset = 0);
@@ -660,7 +660,9 @@ class MacroAssembler: public Assembler {
void cmov_cmp_fp_eq(FloatRegister cmp1, FloatRegister cmp2, Register dst, Register src, bool is_single);
void cmov_cmp_fp_ne(FloatRegister cmp1, FloatRegister cmp2, Register dst, Register src, bool is_single);
void cmov_cmp_fp_le(FloatRegister cmp1, FloatRegister cmp2, Register dst, Register src, bool is_single);
void cmov_cmp_fp_ge(FloatRegister cmp1, FloatRegister cmp2, Register dst, Register src, bool is_single);
void cmov_cmp_fp_lt(FloatRegister cmp1, FloatRegister cmp2, Register dst, Register src, bool is_single);
void cmov_cmp_fp_gt(FloatRegister cmp1, FloatRegister cmp2, Register dst, Register src, bool is_single);
public:
// We try to follow risc-v asm menomics.

View File

@@ -1493,7 +1493,7 @@ void MachEpilogNode::emit(C2_MacroAssembler *masm, PhaseRegAlloc *ra_) const {
code_stub = &stub->entry();
}
__ relocate(relocInfo::poll_return_type);
__ safepoint_poll(*code_stub, true /* at_return */, false /* acquire */, true /* in_nmethod */);
__ safepoint_poll(*code_stub, true /* at_return */, true /* in_nmethod */);
}
}

View File

@@ -1777,15 +1777,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
// check for safepoint operation in progress and/or pending suspend requests
{
// We need an acquire here to ensure that any subsequent load of the
// global SafepointSynchronize::_state flag is ordered after this load
// of the thread-local polling word. We don't want this poll to
// return false (i.e. not safepointing) and a later poll of the global
// SafepointSynchronize::_state spuriously to return true.
// This is to avoid a race when we're in a native->Java transition
// racing the code which wakes up from a safepoint.
__ safepoint_poll(safepoint_in_progress, true /* at_return */, true /* acquire */, false /* in_nmethod */);
__ safepoint_poll(safepoint_in_progress, true /* at_return */, false /* in_nmethod */);
__ lwu(t0, Address(xthread, JavaThread::suspend_flags_offset()));
__ bnez(t0, safepoint_in_progress);
__ bind(safepoint_in_progress_done);

View File

@@ -26,6 +26,13 @@
#ifndef CPU_RISCV_STUBDECLARATIONS_HPP
#define CPU_RISCV_STUBDECLARATIONS_HPP
#define STUBGEN_PREUNIVERSE_BLOBS_ARCH_DO(do_stub, \
do_arch_blob, \
do_arch_entry, \
do_arch_entry_init) \
do_arch_blob(preuniverse, 0) \
#define STUBGEN_INITIAL_BLOBS_ARCH_DO(do_stub, \
do_arch_blob, \
do_arch_entry, \

View File

@@ -6660,6 +6660,10 @@ static const int64_t right_3_bits = right_n_bits(3);
#undef __
// Initialization
void generate_preuniverse_stubs() {
// preuniverse stubs are not needed for riscv
}
void generate_initial_stubs() {
// Generate initial stubs and initializes the entry points
@@ -6815,6 +6819,9 @@ static const int64_t right_3_bits = right_n_bits(3);
public:
StubGenerator(CodeBuffer* code, StubGenBlobId blob_id) : StubCodeGenerator(code, blob_id) {
switch(blob_id) {
case preuniverse_id:
generate_preuniverse_stubs();
break;
case initial_id:
generate_initial_stubs();
break;

View File

@@ -1229,15 +1229,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
{
Label L, Continue;
// We need an acquire here to ensure that any subsequent load of the
// global SafepointSynchronize::_state flag is ordered after this load
// of the thread-local polling word. We don't want this poll to
// return false (i.e. not safepointing) and a later poll of the global
// SafepointSynchronize::_state spuriously to return true.
//
// This is to avoid a race when we're in a native->Java transition
// racing the code which wakes up from a safepoint.
__ safepoint_poll(L, true /* at_return */, true /* acquire */, false /* in_nmethod */);
__ safepoint_poll(L, true /* at_return */, false /* in_nmethod */);
__ lwu(t1, Address(xthread, JavaThread::suspend_flags_offset()));
__ beqz(t1, Continue);
__ bind(L);
@@ -1388,7 +1380,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
Label slow_path;
Label fast_path;
__ safepoint_poll(slow_path, true /* at_return */, false /* acquire */, false /* in_nmethod */);
__ safepoint_poll(slow_path, true /* at_return */, false /* in_nmethod */);
__ j(fast_path);
__ bind(slow_path);

View File

@@ -203,15 +203,15 @@ void VM_Version::common_initialize() {
}
}
// Misc Intrinsics could depend on RVV
// Misc Intrinsics that could depend on RVV.
if (UseZba || UseRVV) {
if (!AvoidUnalignedAccesses && (UseZba || UseRVV)) {
if (FLAG_IS_DEFAULT(UseCRC32Intrinsics)) {
FLAG_SET_DEFAULT(UseCRC32Intrinsics, true);
}
} else {
if (!FLAG_IS_DEFAULT(UseCRC32Intrinsics)) {
warning("CRC32 intrinsic requires Zba or RVV instructions (not available on this CPU)");
warning("CRC32 intrinsic are not available on this CPU.");
}
FLAG_SET_DEFAULT(UseCRC32Intrinsics, false);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2018 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -44,17 +44,17 @@ define_pd_global(intx, CompileThreshold, 1000);
define_pd_global(intx, OnStackReplacePercentage, 1400);
define_pd_global(bool, ProfileInterpreter, false);
define_pd_global(uintx, ReservedCodeCacheSize, 32*M);
define_pd_global(uintx, NonProfiledCodeHeapSize, 13*M);
define_pd_global(uintx, ProfiledCodeHeapSize, 14*M);
define_pd_global(uintx, NonNMethodCodeHeapSize, 5*M);
define_pd_global(uintx, CodeCacheExpansionSize, 32*K);
define_pd_global(uintx, CodeCacheMinBlockLength, 1);
define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K);
define_pd_global(size_t, ReservedCodeCacheSize, 32*M);
define_pd_global(size_t, NonProfiledCodeHeapSize, 13*M);
define_pd_global(size_t, ProfiledCodeHeapSize, 14*M);
define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M);
define_pd_global(size_t, CodeCacheExpansionSize, 32*K);
define_pd_global(size_t, CodeCacheMinBlockLength, 1);
define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K);
define_pd_global(bool, NeverActAsServerClassMachine, true);
define_pd_global(size_t, NewSizeThreadIncrease, 16*K);
define_pd_global(uint64_t, MaxRAM, 1ULL*G);
define_pd_global(uintx, InitialCodeCacheSize, 160*K);
define_pd_global(size_t, InitialCodeCacheSize, 160*K);
#endif // !COMPILER2
define_pd_global(bool, UseTypeProfile, false);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2018 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -67,17 +67,17 @@ define_pd_global(uint, SuperWordStoreToLoadForwardingFailureDetection, 16);
define_pd_global(bool, IdealizeClearArrayNode, false);
// InitialCodeCacheSize derived from specjbb2000 run.
define_pd_global(uintx, InitialCodeCacheSize, 2048*K); // Integral multiple of CodeCacheExpansionSize
define_pd_global(uintx, ReservedCodeCacheSize, 48*M);
define_pd_global(uintx, NonProfiledCodeHeapSize, 21*M);
define_pd_global(uintx, ProfiledCodeHeapSize, 22*M);
define_pd_global(uintx, NonNMethodCodeHeapSize, 5*M);
define_pd_global(uintx, CodeCacheExpansionSize, 64*K);
define_pd_global(size_t, InitialCodeCacheSize, 2048*K); // Integral multiple of CodeCacheExpansionSize
define_pd_global(size_t, ReservedCodeCacheSize, 48*M);
define_pd_global(size_t, NonProfiledCodeHeapSize, 21*M);
define_pd_global(size_t, ProfiledCodeHeapSize, 22*M);
define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M);
define_pd_global(size_t, CodeCacheExpansionSize, 64*K);
// Ergonomics related flags
define_pd_global(uint64_t, MaxRAM, 128ULL*G);
define_pd_global(uintx, CodeCacheMinBlockLength, 4);
define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K);
define_pd_global(size_t, CodeCacheMinBlockLength, 4);
define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K);
define_pd_global(bool, TrapBasedRangeChecks, false); // Not needed on z/Architecture.

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2018 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -38,7 +38,7 @@ define_pd_global(bool, UncommonNullCast, true); // Uncommon-trap nu
define_pd_global(bool, DelayCompilerStubsGeneration, COMPILER2_OR_JVMCI);
define_pd_global(uintx, CodeCacheSegmentSize, 256);
define_pd_global(size_t, CodeCacheSegmentSize, 256);
// This shall be at least 32 for proper branch target alignment.
// Ideally, this is 256 (cache line size). This keeps code end data
// on separate lines. But we reduced it to 64 since 256 increased

View File

@@ -26,6 +26,13 @@
#ifndef CPU_S390_STUBDECLARATIONS_HPP
#define CPU_S390_STUBDECLARATIONS_HPP
#define STUBGEN_PREUNIVERSE_BLOBS_ARCH_DO(do_stub, \
do_arch_blob, \
do_arch_entry, \
do_arch_entry_init) \
do_arch_blob(preuniverse, 0) \
#define STUBGEN_INITIAL_BLOBS_ARCH_DO(do_stub, \
do_arch_blob, \
do_arch_entry, \

View File

@@ -3283,6 +3283,10 @@ class StubGenerator: public StubCodeGenerator {
return start;
}
void generate_preuniverse_stubs() {
// preuniverse stubs are not needed for s390
}
void generate_initial_stubs() {
// Generates all stubs and initializes the entry points.
@@ -3418,6 +3422,9 @@ class StubGenerator: public StubCodeGenerator {
public:
StubGenerator(CodeBuffer* code, StubGenBlobId blob_id) : StubCodeGenerator(code, blob_id) {
switch(blob_id) {
case preuniverse_id:
generate_preuniverse_stubs();
break;
case initial_id:
generate_initial_stubs();
break;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2025, 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
@@ -42,15 +42,15 @@ define_pd_global(intx, CompileThreshold, 1500 );
define_pd_global(intx, OnStackReplacePercentage, 933 );
define_pd_global(size_t, NewSizeThreadIncrease, 4*K );
define_pd_global(uintx, InitialCodeCacheSize, 160*K);
define_pd_global(uintx, ReservedCodeCacheSize, 32*M );
define_pd_global(uintx, NonProfiledCodeHeapSize, 13*M );
define_pd_global(uintx, ProfiledCodeHeapSize, 14*M );
define_pd_global(uintx, NonNMethodCodeHeapSize, 5*M );
define_pd_global(size_t, InitialCodeCacheSize, 160*K);
define_pd_global(size_t, ReservedCodeCacheSize, 32*M );
define_pd_global(size_t, NonProfiledCodeHeapSize, 13*M );
define_pd_global(size_t, ProfiledCodeHeapSize, 14*M );
define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M );
define_pd_global(bool, ProfileInterpreter, false);
define_pd_global(uintx, CodeCacheExpansionSize, 32*K );
define_pd_global(uintx, CodeCacheMinBlockLength, 1 );
define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K);
define_pd_global(size_t, CodeCacheExpansionSize, 32*K );
define_pd_global(size_t, CodeCacheMinBlockLength, 1 );
define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K);
define_pd_global(bool, NeverActAsServerClassMachine, true );
define_pd_global(uint64_t, MaxRAM, 1ULL*G);
define_pd_global(bool, CICompileOSR, true );

View File

@@ -4655,6 +4655,7 @@ static void convertF2I_slowpath(C2_MacroAssembler& masm, C2GeneralStub<Register,
__ subptr(rsp, 8);
__ movdbl(Address(rsp), src);
__ call(RuntimeAddress(target));
// APX REX2 encoding for pop(dst) increases the stub size by 1 byte.
__ pop(dst);
__ jmp(stub.continuation());
#undef __
@@ -4687,7 +4688,9 @@ void C2_MacroAssembler::convertF2I(BasicType dst_bt, BasicType src_bt, Register
}
}
auto stub = C2CodeStub::make<Register, XMMRegister, address>(dst, src, slowpath_target, 23, convertF2I_slowpath);
// Using the APX extended general purpose registers increases the instruction encoding size by 1 byte.
int max_size = 23 + (UseAPX ? 1 : 0);
auto stub = C2CodeStub::make<Register, XMMRegister, address>(dst, src, slowpath_target, max_size, convertF2I_slowpath);
jcc(Assembler::equal, stub->entry());
bind(stub->continuation());
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2025, 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
@@ -50,8 +50,8 @@ define_pd_global(intx, InteriorEntryAlignment, 16);
define_pd_global(size_t, NewSizeThreadIncrease, ScaleForWordSize(4*K));
define_pd_global(intx, LoopUnrollLimit, 60);
// InitialCodeCacheSize derived from specjbb2000 run.
define_pd_global(uintx, InitialCodeCacheSize, 2496*K); // Integral multiple of CodeCacheExpansionSize
define_pd_global(uintx, CodeCacheExpansionSize, 64*K);
define_pd_global(size_t, InitialCodeCacheSize, 2496*K); // Integral multiple of CodeCacheExpansionSize
define_pd_global(size_t, CodeCacheExpansionSize, 64*K);
// Ergonomics related flags
define_pd_global(uint64_t, MaxRAM, 128ULL*G);
@@ -60,8 +60,8 @@ define_pd_global(intx, InteriorEntryAlignment, 4);
define_pd_global(size_t, NewSizeThreadIncrease, 4*K);
define_pd_global(intx, LoopUnrollLimit, 50); // Design center runs on 1.3.1
// InitialCodeCacheSize derived from specjbb2000 run.
define_pd_global(uintx, InitialCodeCacheSize, 2304*K); // Integral multiple of CodeCacheExpansionSize
define_pd_global(uintx, CodeCacheExpansionSize, 32*K);
define_pd_global(size_t, InitialCodeCacheSize, 2304*K); // Integral multiple of CodeCacheExpansionSize
define_pd_global(size_t, CodeCacheExpansionSize, 32*K);
// Ergonomics related flags
define_pd_global(uint64_t, MaxRAM, 4ULL*G);
@@ -79,12 +79,12 @@ define_pd_global(bool, SuperWordLoopUnrollAnalysis, true);
define_pd_global(uint, SuperWordStoreToLoadForwardingFailureDetection, 16);
define_pd_global(bool, IdealizeClearArrayNode, true);
define_pd_global(uintx, ReservedCodeCacheSize, 48*M);
define_pd_global(uintx, NonProfiledCodeHeapSize, 21*M);
define_pd_global(uintx, ProfiledCodeHeapSize, 22*M);
define_pd_global(uintx, NonNMethodCodeHeapSize, 5*M );
define_pd_global(uintx, CodeCacheMinBlockLength, 6);
define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K);
define_pd_global(size_t, ReservedCodeCacheSize, 48*M);
define_pd_global(size_t, NonProfiledCodeHeapSize, 21*M);
define_pd_global(size_t, ProfiledCodeHeapSize, 22*M);
define_pd_global(size_t, NonNMethodCodeHeapSize, 5*M );
define_pd_global(size_t, CodeCacheMinBlockLength, 6);
define_pd_global(size_t, CodeCacheMinimumUseSpace, 400*K);
define_pd_global(bool, TrapBasedRangeChecks, false); // Not needed on x86.

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2025, 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
@@ -37,7 +37,7 @@ define_pd_global(bool, UncommonNullCast, true); // Uncommon-trap nulls
define_pd_global(bool, DelayCompilerStubsGeneration, COMPILER2_OR_JVMCI);
define_pd_global(uintx, CodeCacheSegmentSize, 64 COMPILER1_AND_COMPILER2_PRESENT(+64)); // Tiered compilation has large code-entry alignment.
define_pd_global(size_t, CodeCacheSegmentSize, 64 COMPILER1_AND_COMPILER2_PRESENT(+64)); // Tiered compilation has large code-entry alignment.
// See 4827828 for this change. There is no globals_core_i486.hpp. I can't
// assign a different value for C2 without touching a number of files. Use
// #ifdef to minimize the change as it's late in Mantis. -- FIXME.

View File

@@ -26,6 +26,13 @@
#ifndef CPU_X86_STUBDECLARATIONS_HPP
#define CPU_X86_STUBDECLARATIONS_HPP
#define STUBGEN_PREUNIVERSE_BLOBS_ARCH_DO(do_stub, \
do_arch_blob, \
do_arch_entry, \
do_arch_entry_init) \
do_arch_blob(preuniverse, 500) \
#define STUBGEN_INITIAL_BLOBS_ARCH_DO(do_stub, \
do_arch_blob, \
do_arch_entry, \
@@ -239,7 +246,7 @@
do_arch_blob, \
do_arch_entry, \
do_arch_entry_init) \
do_arch_blob(final, 31000 \
do_arch_blob(final, 33000 \
WINDOWS_ONLY(+22000) ZGC_ONLY(+20000)) \
#endif // CPU_X86_STUBDECLARATIONS_HPP

View File

@@ -4049,6 +4049,11 @@ void StubGenerator::create_control_words() {
}
// Initialization
void StubGenerator::generate_preuniverse_stubs() {
// atomic calls
StubRoutines::_fence_entry = generate_orderaccess_fence();
}
void StubGenerator::generate_initial_stubs() {
// Generates all stubs and initializes the entry points
@@ -4074,9 +4079,6 @@ void StubGenerator::generate_initial_stubs() {
// is referenced by megamorphic call
StubRoutines::_catch_exception_entry = generate_catch_exception();
// atomic calls
StubRoutines::_fence_entry = generate_orderaccess_fence();
// platform dependent
StubRoutines::x86::_get_previous_sp_entry = generate_get_previous_sp();
@@ -4344,6 +4346,9 @@ void StubGenerator::generate_compiler_stubs() {
StubGenerator::StubGenerator(CodeBuffer* code, StubGenBlobId blob_id) : StubCodeGenerator(code, blob_id) {
switch(blob_id) {
case preuniverse_id:
generate_preuniverse_stubs();
break;
case initial_id:
generate_initial_stubs();
break;

View File

@@ -634,6 +634,7 @@ class StubGenerator: public StubCodeGenerator {
void create_control_words();
// Initialization
void generate_preuniverse_stubs();
void generate_initial_stubs();
void generate_continuation_stubs();
void generate_compiler_stubs();

View File

@@ -2111,7 +2111,7 @@ bool VM_Version::is_intel_cascade_lake() {
// has improved implementation of 64-byte load/stores and so the default
// threshold is set to 0 for these platforms.
int VM_Version::avx3_threshold() {
return (is_intel_family_core() &&
return (is_intel_server_family() &&
supports_serialize() &&
FLAG_IS_DEFAULT(AVX3Threshold)) ? 0 : AVX3Threshold;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -38,10 +38,10 @@ define_pd_global(bool, UncommonNullCast, true);
define_pd_global(bool, DelayCompilerStubsGeneration, false); // Don't have compiler's stubs
define_pd_global(uintx, CodeCacheSegmentSize, 64 COMPILER1_AND_COMPILER2_PRESENT(+64)); // Tiered compilation has large code-entry alignment.
define_pd_global(intx, CodeEntryAlignment, 32);
define_pd_global(intx, OptoLoopAlignment, 16);
define_pd_global(intx, InlineSmallCode, 1000);
define_pd_global(size_t, CodeCacheSegmentSize, 64 COMPILER1_AND_COMPILER2_PRESENT(+64)); // Tiered compilation has large code-entry alignment.
define_pd_global(intx, CodeEntryAlignment, 32);
define_pd_global(intx, OptoLoopAlignment, 16);
define_pd_global(intx, InlineSmallCode, 1000);
// not used, but must satisfy following constraints:
// 1.) <VALUE> must be in the allowed range for intx *and*

View File

@@ -26,6 +26,13 @@
#ifndef CPU_ZERO_STUBDECLARATIONS_HPP
#define CPU_ZERO_STUBDECLARATIONS_HPP
#define STUBGEN_PREUNIVERSE_BLOBS_ARCH_DO(do_stub, \
do_arch_blob, \
do_arch_entry, \
do_arch_entry_init) \
do_arch_blob(preuniverse, 0) \
#define STUBGEN_INITIAL_BLOBS_ARCH_DO(do_stub, \
do_arch_blob, \
do_arch_entry, \

View File

@@ -178,6 +178,10 @@ class StubGenerator: public StubCodeGenerator {
StubRoutines::_oop_arraycopy;
}
void generate_preuniverse_stubs() {
StubRoutines::_fence_entry = ShouldNotCallThisStub();
}
void generate_initial_stubs() {
// entry points that exist in all platforms Note: This is code
// that could be shared among different platforms - however the
@@ -194,7 +198,6 @@ class StubGenerator: public StubCodeGenerator {
StubRoutines::_atomic_cmpxchg_entry = ShouldNotCallThisStub();
StubRoutines::_atomic_cmpxchg_long_entry = ShouldNotCallThisStub();
StubRoutines::_atomic_add_entry = ShouldNotCallThisStub();
StubRoutines::_fence_entry = ShouldNotCallThisStub();
}
void generate_continuation_stubs() {
@@ -214,6 +217,9 @@ class StubGenerator: public StubCodeGenerator {
public:
StubGenerator(CodeBuffer* code, StubGenBlobId blob_id) : StubCodeGenerator(code, blob_id) {
switch(blob_id) {
case preuniverse_id:
generate_preuniverse_stubs();
break;
case initial_id:
generate_initial_stubs();
break;

View File

@@ -1,37 +0,0 @@
/*
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2015 SAP SE. 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#ifndef OS_AIX_C1_GLOBALS_AIX_HPP
#define OS_AIX_C1_GLOBALS_AIX_HPP
#include "utilities/globalDefinitions.hpp"
#include "utilities/macros.hpp"
//
// Sets the default values for operating system dependent flags used by the
// client compiler. (see c1_globals.hpp)
//
#endif // OS_AIX_C1_GLOBALS_AIX_HPP

View File

@@ -1,37 +0,0 @@
/*
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2013 SAP SE. 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#ifndef OS_AIX_C2_GLOBALS_AIX_HPP
#define OS_AIX_C2_GLOBALS_AIX_HPP
#include "utilities/globalDefinitions.hpp"
#include "utilities/macros.hpp"
//
// Sets the default values for operating system dependent flags used by the
// server compiler. (see c2_globals.hpp)
//
#endif // OS_AIX_C2_GLOBALS_AIX_HPP

View File

@@ -1,36 +0,0 @@
/*
* Copyright (c) 2000, 2019, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#ifndef OS_BSD_C1_GLOBALS_BSD_HPP
#define OS_BSD_C1_GLOBALS_BSD_HPP
#include "utilities/globalDefinitions.hpp"
#include "utilities/macros.hpp"
//
// Sets the default values for operating system dependent flags used by the
// client compiler. (see c1_globals.hpp)
//
#endif // OS_BSD_C1_GLOBALS_BSD_HPP

View File

@@ -1,36 +0,0 @@
/*
* Copyright (c) 2000, 2019, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#ifndef OS_BSD_C2_GLOBALS_BSD_HPP
#define OS_BSD_C2_GLOBALS_BSD_HPP
#include "utilities/globalDefinitions.hpp"
#include "utilities/macros.hpp"
//
// Sets the default values for operating system dependent flags used by the
// server compiler. (see c2_globals.hpp)
//
#endif // OS_BSD_C2_GLOBALS_BSD_HPP

View File

@@ -1,36 +0,0 @@
/*
* Copyright (c) 2000, 2019, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#ifndef OS_LINUX_C1_GLOBALS_LINUX_HPP
#define OS_LINUX_C1_GLOBALS_LINUX_HPP
#include "utilities/globalDefinitions.hpp"
#include "utilities/macros.hpp"
//
// Sets the default values for operating system dependent flags used by the
// client compiler. (see c1_globals.hpp)
//
#endif // OS_LINUX_C1_GLOBALS_LINUX_HPP

View File

@@ -1,36 +0,0 @@
/*
* Copyright (c) 2000, 2019, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#ifndef OS_LINUX_C2_GLOBALS_LINUX_HPP
#define OS_LINUX_C2_GLOBALS_LINUX_HPP
#include "utilities/globalDefinitions.hpp"
#include "utilities/macros.hpp"
//
// Sets the default values for operating system dependent flags used by the
// server compiler. (see c2_globals.hpp)
//
#endif // OS_LINUX_C2_GLOBALS_LINUX_HPP

View File

@@ -1,36 +0,0 @@
/*
* Copyright (c) 2000, 2019, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#ifndef OS_WINDOWS_C1_GLOBALS_WINDOWS_HPP
#define OS_WINDOWS_C1_GLOBALS_WINDOWS_HPP
#include "utilities/globalDefinitions.hpp"
#include "utilities/macros.hpp"
//
// Sets the default values for operating system dependent flags used by the
// client compiler. (see c1_globals.hpp)
//
#endif // OS_WINDOWS_C1_GLOBALS_WINDOWS_HPP

View File

@@ -1,36 +0,0 @@
/*
* Copyright (c) 2000, 2019, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#ifndef OS_WINDOWS_C2_GLOBALS_WINDOWS_HPP
#define OS_WINDOWS_C2_GLOBALS_WINDOWS_HPP
#include "utilities/globalDefinitions.hpp"
#include "utilities/macros.hpp"
//
// Sets the default values for operating system dependent flags used by the
// server compiler. (see c2_globals.hpp)
//
#endif // OS_WINDOWS_C2_GLOBALS_WINDOWS_HPP

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2025, 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
@@ -187,7 +187,13 @@ class ValueNumberingVisitor: public InstructionVisitor {
void do_Convert (Convert* x) { /* nothing to do */ }
void do_NullCheck (NullCheck* x) { /* nothing to do */ }
void do_TypeCast (TypeCast* x) { /* nothing to do */ }
void do_NewInstance (NewInstance* x) { /* nothing to do */ }
void do_NewInstance (NewInstance* x) {
ciInstanceKlass* c = x->klass();
if (c != nullptr && !c->is_initialized() &&
(!c->is_loaded() || c->has_class_initializer())) {
kill_memory();
}
}
void do_NewTypeArray (NewTypeArray* x) { /* nothing to do */ }
void do_NewObjectArray (NewObjectArray* x) { /* nothing to do */ }
void do_NewMultiArray (NewMultiArray* x) { /* nothing to do */ }

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2025, 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
@@ -25,9 +25,9 @@
#ifndef SHARE_C1_C1_GLOBALS_HPP
#define SHARE_C1_C1_GLOBALS_HPP
#include "c1/c1_globals_pd.hpp"
#include "runtime/globals_shared.hpp"
#include "utilities/macros.hpp"
#include CPU_HEADER(c1_globals)
//
// Declare all global flags used by the client compiler.
//

View File

@@ -30,6 +30,7 @@
#include "cds/heapShared.hpp"
#include "classfile/classLoaderDataShared.hpp"
#include "classfile/moduleEntry.hpp"
#include "code/aotCodeCache.hpp"
#include "include/jvm_io.h"
#include "logging/log.hpp"
#include "memory/universe.hpp"
@@ -705,24 +706,29 @@ bool CDSConfig::check_vm_args_consistency(bool patch_mod_javabase, bool mode_fla
}
void CDSConfig::setup_compiler_args() {
// AOT profiles are supported only in the JEP 483 workflow.
bool can_dump_profiles = AOTClassLinking && new_aot_flags_used();
// AOT profiles and AOT-compiled code are supported only in the JEP 483 workflow.
bool can_dump_profile_and_compiled_code = AOTClassLinking && new_aot_flags_used();
if (is_dumping_preimage_static_archive() && can_dump_profiles) {
if (is_dumping_preimage_static_archive() && can_dump_profile_and_compiled_code) {
// JEP 483 workflow -- training
FLAG_SET_ERGO_IF_DEFAULT(AOTRecordTraining, true);
FLAG_SET_ERGO(AOTReplayTraining, false);
} else if (is_dumping_final_static_archive() && can_dump_profiles) {
AOTCodeCache::disable_caching(); // No AOT code generation during training run
} else if (is_dumping_final_static_archive() && can_dump_profile_and_compiled_code) {
// JEP 483 workflow -- assembly
FLAG_SET_ERGO(AOTRecordTraining, false);
FLAG_SET_ERGO_IF_DEFAULT(AOTReplayTraining, true);
AOTCodeCache::enable_caching(); // Generate AOT code during assembly phase.
disable_dumping_aot_code(); // Don't dump AOT code until metadata and heap are dumped.
} else if (is_using_archive() && new_aot_flags_used()) {
// JEP 483 workflow -- production
FLAG_SET_ERGO(AOTRecordTraining, false);
FLAG_SET_ERGO_IF_DEFAULT(AOTReplayTraining, true);
AOTCodeCache::enable_caching();
} else {
FLAG_SET_ERGO(AOTReplayTraining, false);
FLAG_SET_ERGO(AOTRecordTraining, false);
AOTCodeCache::disable_caching();
}
}

View File

@@ -32,8 +32,8 @@
#include "cds/cds_globals.hpp"
#include "cds/cdsConfig.hpp"
#include "cds/dynamicArchive.hpp"
#include "cds/lambdaProxyClassDictionary.hpp"
#include "cds/lambdaFormInvokers.hpp"
#include "cds/lambdaProxyClassDictionary.hpp"
#include "cds/metaspaceShared.hpp"
#include "cds/regeneratedClasses.hpp"
#include "classfile/classLoader.hpp"

View File

@@ -44,6 +44,7 @@
#include "classfile/systemDictionaryShared.hpp"
#include "classfile/vmClasses.hpp"
#include "classfile/vmSymbols.hpp"
#include "compiler/compilerDefinitions.inline.hpp"
#include "jvm.h"
#include "logging/log.hpp"
#include "logging/logMessage.hpp"
@@ -232,6 +233,8 @@ void FileMapHeader::populate(FileMapInfo *info, size_t core_region_alignment,
} else {
_narrow_klass_pointer_bits = _narrow_klass_shift = -1;
}
// Which JIT compier is used
_compiler_type = (u1)CompilerConfig::compiler_type();
_type_profile_level = TypeProfileLevel;
_type_profile_args_limit = TypeProfileArgsLimit;
_type_profile_parms_limit = TypeProfileParmsLimit;
@@ -920,7 +923,7 @@ void FileMapInfo::write_region(int region, char* base, size_t size,
" crc 0x%08x",
region_name(region), region, size, p2i(requested_base), _file_offset, crc);
} else {
aot_log_info(aot)("Shared file region (%s) %d: %8zu"
aot_log_info(aot)("Shared file region (%s) %d: %8zu"
" bytes", region_name(region), region, size);
}
@@ -1935,6 +1938,23 @@ bool FileMapHeader::validate() {
CompactStrings ? "enabled" : "disabled");
return false;
}
bool jvmci_compiler_is_enabled = CompilerConfig::is_jvmci_compiler_enabled();
CompilerType compiler_type = CompilerConfig::compiler_type();
CompilerType archive_compiler_type = CompilerType(_compiler_type);
// JVMCI compiler does different type profiling settigns and generate
// different code. We can't use archive which was produced
// without it and reverse.
// Only allow mix when JIT compilation is disabled.
// Interpreter is used by default when dumping archive.
bool intepreter_is_used = (archive_compiler_type == CompilerType::compiler_none) ||
(compiler_type == CompilerType::compiler_none);
if (!intepreter_is_used &&
jvmci_compiler_is_enabled != (archive_compiler_type == CompilerType::compiler_jvmci)) {
MetaspaceShared::report_loading_error("The %s's JIT compiler setting (%s)"
" does not equal the current setting (%s).", file_type,
compilertype2name(archive_compiler_type), compilertype2name(compiler_type));
return false;
}
if (TrainingData::have_data()) {
if (_type_profile_level != TypeProfileLevel) {
MetaspaceShared::report_loading_error("The %s's TypeProfileLevel setting (%d)"

View File

@@ -147,6 +147,7 @@ private:
size_t _ro_ptrmap_start_pos; // The first bit in the ptrmap corresponds to this position in the ro region
// The following are parameters that affect MethodData layout.
u1 _compiler_type;
uint _type_profile_level;
int _type_profile_args_limit;
int _type_profile_parms_limit;

View File

@@ -2014,10 +2014,7 @@ void MetaspaceShared::initialize_shared_spaces() {
TrainingData::print_archived_training_data_on(tty);
if (AOTCodeCache::is_on_for_use()) {
tty->print_cr("\n\nAOT Code");
AOTCodeCache::print_on(tty);
}
AOTCodeCache::print_on(tty);
// collect shared symbols and strings
CountSharedSymbols cl;

View File

@@ -549,6 +549,11 @@ bool ciInstanceKlass::compute_has_trusted_loader() {
return java_lang_ClassLoader::is_trusted_loader(loader_oop);
}
bool ciInstanceKlass::has_class_initializer() {
VM_ENTRY_MARK;
return get_instanceKlass()->class_initializer() != nullptr;
}
// ------------------------------------------------------------------
// ciInstanceKlass::find_method
//

View File

@@ -231,6 +231,8 @@ public:
ciInstanceKlass* unique_concrete_subklass();
bool has_finalizable_subclass();
bool has_class_initializer();
bool contains_field_offset(int offset);
// Get the instance of java.lang.Class corresponding to

View File

@@ -3740,6 +3740,7 @@ void ClassFileParser::apply_parsed_class_metadata(
_cp->set_pool_holder(this_klass);
this_klass->set_constants(_cp);
this_klass->set_fieldinfo_stream(_fieldinfo_stream);
this_klass->set_fieldinfo_search_table(_fieldinfo_search_table);
this_klass->set_fields_status(_fields_status);
this_klass->set_methods(_methods);
this_klass->set_inner_classes(_inner_classes);
@@ -3749,6 +3750,8 @@ void ClassFileParser::apply_parsed_class_metadata(
this_klass->set_permitted_subclasses(_permitted_subclasses);
this_klass->set_record_components(_record_components);
DEBUG_ONLY(FieldInfoStream::validate_search_table(_cp, _fieldinfo_stream, _fieldinfo_search_table));
// Delay the setting of _local_interfaces and _transitive_interfaces until after
// initialize_supers() in fill_instance_klass(). It is because the _local_interfaces could
// be shared with _transitive_interfaces and _transitive_interfaces may be shared with
@@ -5056,6 +5059,7 @@ void ClassFileParser::fill_instance_klass(InstanceKlass* ik,
// note that is not safe to use the fields in the parser from this point on
assert(nullptr == _cp, "invariant");
assert(nullptr == _fieldinfo_stream, "invariant");
assert(nullptr == _fieldinfo_search_table, "invariant");
assert(nullptr == _fields_status, "invariant");
assert(nullptr == _methods, "invariant");
assert(nullptr == _inner_classes, "invariant");
@@ -5276,6 +5280,7 @@ ClassFileParser::ClassFileParser(ClassFileStream* stream,
_super_klass(),
_cp(nullptr),
_fieldinfo_stream(nullptr),
_fieldinfo_search_table(nullptr),
_fields_status(nullptr),
_methods(nullptr),
_inner_classes(nullptr),
@@ -5352,6 +5357,7 @@ void ClassFileParser::clear_class_metadata() {
// deallocated if classfile parsing returns an error.
_cp = nullptr;
_fieldinfo_stream = nullptr;
_fieldinfo_search_table = nullptr;
_fields_status = nullptr;
_methods = nullptr;
_inner_classes = nullptr;
@@ -5374,6 +5380,7 @@ ClassFileParser::~ClassFileParser() {
if (_fieldinfo_stream != nullptr) {
MetadataFactory::free_array<u1>(_loader_data, _fieldinfo_stream);
}
MetadataFactory::free_array<u1>(_loader_data, _fieldinfo_search_table);
if (_fields_status != nullptr) {
MetadataFactory::free_array<FieldStatus>(_loader_data, _fields_status);
@@ -5774,6 +5781,7 @@ void ClassFileParser::post_process_parsed_stream(const ClassFileStream* const st
_fieldinfo_stream =
FieldInfoStream::create_FieldInfoStream(_temp_field_info, _java_fields_count,
injected_fields_count, loader_data(), CHECK);
_fieldinfo_search_table = FieldInfoStream::create_search_table(_cp, _fieldinfo_stream, _loader_data, CHECK);
_fields_status =
MetadataFactory::new_array<FieldStatus>(_loader_data, _temp_field_info->length(),
FieldStatus(0), CHECK);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2025, 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
@@ -123,6 +123,7 @@ class ClassFileParser {
const InstanceKlass* _super_klass;
ConstantPool* _cp;
Array<u1>* _fieldinfo_stream;
Array<u1>* _fieldinfo_search_table;
Array<FieldStatus>* _fields_status;
Array<Method*>* _methods;
Array<u2>* _inner_classes;

View File

@@ -301,7 +301,7 @@ void FieldLayout::reconstruct_layout(const InstanceKlass* ik, bool& has_instance
BasicType last_type;
int last_offset = -1;
while (ik != nullptr) {
for (AllFieldStream fs(ik->fieldinfo_stream(), ik->constants()); !fs.done(); fs.next()) {
for (AllFieldStream fs(ik); !fs.done(); fs.next()) {
BasicType type = Signature::basic_type(fs.signature());
// distinction between static and non-static fields is missing
if (fs.access_flags().is_static()) continue;
@@ -461,7 +461,7 @@ void FieldLayout::print(outputStream* output, bool is_static, const InstanceKlas
bool found = false;
const InstanceKlass* ik = super;
while (!found && ik != nullptr) {
for (AllFieldStream fs(ik->fieldinfo_stream(), ik->constants()); !fs.done(); fs.next()) {
for (AllFieldStream fs(ik); !fs.done(); fs.next()) {
if (fs.offset() == b->offset()) {
output->print_cr(" @%d \"%s\" %s %d/%d %s",
b->offset(),

View File

@@ -967,6 +967,13 @@ void java_lang_Class::fixup_mirror(Klass* k, TRAPS) {
Array<u1>* new_fis = FieldInfoStream::create_FieldInfoStream(fields, java_fields, injected_fields, k->class_loader_data(), CHECK);
ik->set_fieldinfo_stream(new_fis);
MetadataFactory::free_array<u1>(k->class_loader_data(), old_stream);
Array<u1>* old_table = ik->fieldinfo_search_table();
Array<u1>* search_table = FieldInfoStream::create_search_table(ik->constants(), new_fis, k->class_loader_data(), CHECK);
ik->set_fieldinfo_search_table(search_table);
MetadataFactory::free_array<u1>(k->class_loader_data(), old_table);
DEBUG_ONLY(FieldInfoStream::validate_search_table(ik->constants(), new_fis, search_table));
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2023, 2025, 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
@@ -74,8 +74,7 @@ static void report_load_failure() {
vm_exit_during_initialization("Unable to use AOT Code Cache.", nullptr);
}
log_info(aot, codecache, init)("Unable to use AOT Code Cache.");
AOTAdapterCaching = false;
AOTStubCaching = false;
AOTCodeCache::disable_caching();
}
static void report_store_failure() {
@@ -84,10 +83,30 @@ static void report_store_failure() {
vm_abort(false);
}
log_info(aot, codecache, exit)("Unable to create AOT Code Cache.");
AOTAdapterCaching = false;
AOTStubCaching = false;
AOTCodeCache::disable_caching();
}
// The sequence of AOT code caching flags and parametters settings.
//
// 1. The initial AOT code caching flags setting is done
// during call to CDSConfig::check_vm_args_consistency().
//
// 2. The earliest AOT code state check done in compilationPolicy_init()
// where we set number of compiler threads for AOT assembly phase.
//
// 3. We determine presence of AOT code in AOT Cache in
// MetaspaceShared::open_static_archive() which is calles
// after compilationPolicy_init() but before codeCache_init().
//
// 4. AOTCodeCache::initialize() is called during universe_init()
// and does final AOT state and flags settings.
//
// 5. Finally AOTCodeCache::init2() is called after universe_init()
// when all GC settings are finalized.
// Next methods determine which action we do with AOT code depending
// on phase of AOT process: assembly or production.
bool AOTCodeCache::is_dumping_adapter() {
return AOTAdapterCaching && is_on_for_dump();
}
@@ -104,6 +123,23 @@ bool AOTCodeCache::is_using_stub() {
return AOTStubCaching && is_on_for_use();
}
// Next methods could be called regardless AOT code cache status.
// Initially they are called during flags parsing and finilized
// in AOTCodeCache::initialize().
void AOTCodeCache::enable_caching() {
FLAG_SET_ERGO_IF_DEFAULT(AOTStubCaching, true);
FLAG_SET_ERGO_IF_DEFAULT(AOTAdapterCaching, true);
}
void AOTCodeCache::disable_caching() {
FLAG_SET_ERGO(AOTStubCaching, false);
FLAG_SET_ERGO(AOTAdapterCaching, false);
}
bool AOTCodeCache::is_caching_enabled() {
return AOTStubCaching || AOTAdapterCaching;
}
static uint32_t encode_id(AOTCodeEntry::Kind kind, int id) {
assert(AOTCodeEntry::is_valid_entry_kind(kind), "invalid AOTCodeEntry kind %d", (int)kind);
// There can be a conflict of id between an Adapter and *Blob, but that should not cause any functional issue
@@ -125,19 +161,19 @@ uint AOTCodeCache::max_aot_code_size() {
return _max_aot_code_size;
}
// This method is called during universe_init()
// and does final AOT state and flags settings.
// It is called from MetaspaceShared::initialize_shared_spaces()
// which is called from universe_init().
// At this point all AOT class linking seetings are finilized
// and AOT cache is open so we can map AOT code region.
void AOTCodeCache::initialize() {
#if defined(ZERO) || !(defined(AMD64) || defined(AARCH64))
log_info(aot, codecache, init)("AOT Code Cache is not supported on this platform.");
AOTAdapterCaching = false;
AOTStubCaching = false;
disable_caching();
return;
#else
if (FLAG_IS_DEFAULT(AOTCache)) {
log_info(aot, codecache, init)("AOT Code Cache is not used: AOTCache is not specified.");
AOTAdapterCaching = false;
AOTStubCaching = false;
disable_caching();
return; // AOTCache must be specified to dump and use AOT code
}
@@ -158,18 +194,19 @@ void AOTCodeCache::initialize() {
bool is_dumping = false;
bool is_using = false;
if (CDSConfig::is_dumping_final_static_archive() && CDSConfig::is_dumping_aot_linked_classes()) {
FLAG_SET_ERGO_IF_DEFAULT(AOTAdapterCaching, true);
FLAG_SET_ERGO_IF_DEFAULT(AOTStubCaching, true);
is_dumping = true;
enable_caching();
is_dumping = is_caching_enabled();
} else if (CDSConfig::is_using_archive() && CDSConfig::is_using_aot_linked_classes()) {
FLAG_SET_ERGO_IF_DEFAULT(AOTAdapterCaching, true);
FLAG_SET_ERGO_IF_DEFAULT(AOTStubCaching, true);
is_using = true;
enable_caching();
is_using = is_caching_enabled();
} else {
log_info(aot, codecache, init)("AOT Code Cache is not used: AOT Class Linking is not used.");
disable_caching();
return; // nothing to do
}
if (!AOTAdapterCaching && !AOTStubCaching) {
if (!(is_dumping || is_using)) {
disable_caching();
return; // AOT code caching disabled on command line
}
_max_aot_code_size = AOTCodeMaxSize;
@@ -182,6 +219,7 @@ void AOTCodeCache::initialize() {
size_t aot_code_size = is_using ? AOTCacheAccess::get_aot_code_region_size() : 0;
if (is_using && aot_code_size == 0) {
log_info(aot, codecache, init)("AOT Code Cache is empty");
disable_caching();
return;
}
if (!open_cache(is_dumping, is_using)) {
@@ -201,10 +239,11 @@ void AOTCodeCache::initialize() {
static AOTCodeCache* opened_cache = nullptr; // Use this until we verify the cache
AOTCodeCache* AOTCodeCache::_cache = nullptr;
DEBUG_ONLY( bool AOTCodeCache::_passed_init2 = false; )
// This method is called after universe_init()
// when all GC settings are finalized.
// It is called after universe_init() when all GC settings are finalized.
void AOTCodeCache::init2() {
DEBUG_ONLY( _passed_init2 = true; )
if (opened_cache == nullptr) {
return;
}
@@ -220,7 +259,6 @@ void AOTCodeCache::init2() {
AOTCodeAddressTable* table = opened_cache->_table;
assert(table != nullptr, "should be initialized already");
table->init_extrs();
table->init_early_stubs();
// Now cache and address table are ready for AOT code generation
_cache = opened_cache;
@@ -312,6 +350,13 @@ AOTCodeCache::AOTCodeCache(bool is_dumping, bool is_using) :
_table = new AOTCodeAddressTable();
}
void AOTCodeCache::init_early_stubs_table() {
AOTCodeAddressTable* table = addr_table();
if (table != nullptr) {
table->init_early_stubs();
}
}
void AOTCodeCache::init_shared_blobs_table() {
AOTCodeAddressTable* table = addr_table();
if (table != nullptr) {
@@ -344,6 +389,7 @@ AOTCodeCache::~AOTCodeCache() {
_store_buffer = nullptr;
}
if (_table != nullptr) {
MutexLocker ml(AOTCodeCStrings_lock, Mutex::_no_safepoint_check_flag);
delete _table;
_table = nullptr;
}
@@ -774,6 +820,9 @@ bool AOTCodeCache::store_code_blob(CodeBlob& blob, AOTCodeEntry::Kind entry_kind
// we need to take a lock to prevent race between compiler threads generating AOT code
// and the main thread generating adapter
MutexLocker ml(Compile_lock);
if (!is_on()) {
return false; // AOT code cache was already dumped and closed.
}
if (!cache->align_write()) {
return false;
}
@@ -1485,6 +1534,7 @@ void AOTCodeCache::load_strings() {
int AOTCodeCache::store_strings() {
if (_C_strings_used > 0) {
MutexLocker ml(AOTCodeCStrings_lock, Mutex::_no_safepoint_check_flag);
uint offset = _write_position;
uint length = 0;
uint* lengths = (uint *)reserve_bytes(sizeof(uint) * _C_strings_used);
@@ -1510,15 +1560,17 @@ int AOTCodeCache::store_strings() {
const char* AOTCodeCache::add_C_string(const char* str) {
if (is_on_for_dump() && str != nullptr) {
return _cache->_table->add_C_string(str);
MutexLocker ml(AOTCodeCStrings_lock, Mutex::_no_safepoint_check_flag);
AOTCodeAddressTable* table = addr_table();
if (table != nullptr) {
return table->add_C_string(str);
}
}
return str;
}
const char* AOTCodeAddressTable::add_C_string(const char* str) {
if (_extrs_complete) {
LogStreamHandle(Trace, aot, codecache, stringtable) log; // ctor outside lock
MutexLocker ml(AOTCodeCStrings_lock, Mutex::_no_safepoint_check_flag);
// Check previous strings address
for (int i = 0; i < _C_strings_count; i++) {
if (_C_strings_in[i] == str) {
@@ -1535,9 +1587,7 @@ const char* AOTCodeAddressTable::add_C_string(const char* str) {
_C_strings_in[_C_strings_count] = str;
const char* dup = os::strdup(str);
_C_strings[_C_strings_count++] = dup;
if (log.is_enabled()) {
log.print_cr("add_C_string: [%d] " INTPTR_FORMAT " '%s'", _C_strings_count, p2i(dup), dup);
}
log_trace(aot, codecache, stringtable)("add_C_string: [%d] " INTPTR_FORMAT " '%s'", _C_strings_count, p2i(dup), dup);
return dup;
} else {
assert(false, "Number of C strings >= MAX_STR_COUNT");
@@ -1691,11 +1741,13 @@ int AOTCodeAddressTable::id_for_address(address addr, RelocIterator reloc, CodeB
return id;
}
// This is called after initialize() but before init2()
// and _cache is not set yet.
void AOTCodeCache::print_on(outputStream* st) {
AOTCodeCache* cache = open_for_use();
if (cache != nullptr) {
uint count = cache->_load_header->entries_count();
uint* search_entries = (uint*)cache->addr(cache->_load_header->entries_offset()); // [id, index]
if (opened_cache != nullptr && opened_cache->for_use()) {
st->print_cr("\nAOT Code Cache");
uint count = opened_cache->_load_header->entries_count();
uint* search_entries = (uint*)opened_cache->addr(opened_cache->_load_header->entries_offset()); // [id, index]
AOTCodeEntry* load_entries = (AOTCodeEntry*)(search_entries + 2 * count);
for (uint i = 0; i < count; i++) {
@@ -1705,12 +1757,10 @@ void AOTCodeCache::print_on(outputStream* st) {
uint entry_position = entry->offset();
uint name_offset = entry->name_offset() + entry_position;
const char* saved_name = cache->addr(name_offset);
const char* saved_name = opened_cache->addr(name_offset);
st->print_cr("%4u: entry_idx:%4u Kind:%u Id:%u size=%u '%s'",
i, index, entry->kind(), entry->id(), entry->size(), saved_name);
st->print_cr("%4u: %10s idx:%4u Id:%u size=%u '%s'",
i, aot_code_entry_kind_name[entry->kind()], index, entry->id(), entry->size(), saved_name);
}
} else {
st->print_cr("failed to map code cache");
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2023, 2025, 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
@@ -297,6 +297,7 @@ public:
void load_strings();
int store_strings();
static void init_early_stubs_table() NOT_CDS_RETURN;
static void init_shared_blobs_table() NOT_CDS_RETURN;
static void init_early_c1_table() NOT_CDS_RETURN;
@@ -346,7 +347,8 @@ public:
// Static access
private:
static AOTCodeCache* _cache;
static AOTCodeCache* _cache;
DEBUG_ONLY( static bool _passed_init2; )
static bool open_cache(bool is_dumping, bool is_using);
bool verify_config() {
@@ -356,19 +358,20 @@ private:
return true;
}
public:
static AOTCodeCache* cache() { return _cache; }
static AOTCodeCache* cache() { assert(_passed_init2, "Too early to ask"); return _cache; }
static void initialize() NOT_CDS_RETURN;
static void init2() NOT_CDS_RETURN;
static void close() NOT_CDS_RETURN;
static bool is_on() CDS_ONLY({ return _cache != nullptr && !_cache->closing(); }) NOT_CDS_RETURN_(false);
static bool is_on() CDS_ONLY({ return cache() != nullptr && !_cache->closing(); }) NOT_CDS_RETURN_(false);
static bool is_on_for_use() { return is_on() && _cache->for_use(); }
static bool is_on_for_dump() { return is_on() && _cache->for_dump(); }
static bool is_dumping_adapter() NOT_CDS_RETURN_(false);
static bool is_using_adapter() NOT_CDS_RETURN_(false);
static bool is_dumping_stub() NOT_CDS_RETURN_(false);
static bool is_dumping_adapter() NOT_CDS_RETURN_(false);
static bool is_using_stub() NOT_CDS_RETURN_(false);
static bool is_using_adapter() NOT_CDS_RETURN_(false);
static void enable_caching() NOT_CDS_RETURN;
static void disable_caching() NOT_CDS_RETURN;
static bool is_caching_enabled() NOT_CDS_RETURN_(false);
static const char* add_C_string(const char* str) NOT_CDS_RETURN_(str);

View File

@@ -433,7 +433,7 @@ void CodeCache::add_heap(ReservedSpace rs, const char* name, CodeBlobType code_b
add_heap(heap);
// Reserve Space
size_t size_initial = MIN2((size_t)InitialCodeCacheSize, rs.size());
size_t size_initial = MIN2(InitialCodeCacheSize, rs.size());
size_initial = align_up(size_initial, rs.page_size());
if (!heap->reserve(rs, size_initial, CodeCacheSegmentSize)) {
vm_exit_during_initialization(err_msg("Could not reserve enough space in %s (%zuK)",
@@ -1106,9 +1106,9 @@ size_t CodeCache::freelists_length() {
void icache_init();
void CodeCache::initialize() {
assert(CodeCacheSegmentSize >= (uintx)CodeEntryAlignment, "CodeCacheSegmentSize must be large enough to align entry points");
assert(CodeCacheSegmentSize >= (size_t)CodeEntryAlignment, "CodeCacheSegmentSize must be large enough to align entry points");
#ifdef COMPILER2
assert(CodeCacheSegmentSize >= (uintx)OptoLoopAlignment, "CodeCacheSegmentSize must be large enough to align inner loops");
assert(CodeCacheSegmentSize >= (size_t)OptoLoopAlignment, "CodeCacheSegmentSize must be large enough to align inner loops");
#endif
assert(CodeCacheSegmentSize >= sizeof(jdouble), "CodeCacheSegmentSize must be large enough to align constants");
// This was originally just a check of the alignment, causing failure, instead, round

View File

@@ -572,10 +572,10 @@ void CompilationPolicy::initialize() {
c2_size = C2Compiler::initial_code_buffer_size();
#endif
size_t buffer_size = c1_only ? c1_size : (c1_size/3 + 2*c2_size/3);
int max_count = (ReservedCodeCacheSize - (CodeCacheMinimumUseSpace DEBUG_ONLY(* 3))) / (int)buffer_size;
if (count > max_count) {
size_t max_count = (ReservedCodeCacheSize - (CodeCacheMinimumUseSpace DEBUG_ONLY(* 3))) / buffer_size;
if ((size_t)count > max_count) {
// Lower the compiler count such that all buffers fit into the code cache
count = MAX2(max_count, min_count);
count = MAX2((int)max_count, min_count);
}
FLAG_SET_ERGO(CICompilerCount, count);
}

View File

@@ -313,7 +313,7 @@ void CompilerConfig::set_compilation_policy_flags() {
// Increase the code cache size - tiered compiles a lot more.
if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) {
FLAG_SET_ERGO(ReservedCodeCacheSize,
MIN2(CODE_CACHE_DEFAULT_LIMIT, (size_t)ReservedCodeCacheSize * 5));
MIN2(CODE_CACHE_DEFAULT_LIMIT, ReservedCodeCacheSize * 5));
}
// Enable SegmentedCodeCache if tiered compilation is enabled, ReservedCodeCacheSize >= 240M
// and the code cache contains at least 8 pages (segmentation disables advantage of huge pages).
@@ -475,26 +475,26 @@ void CompilerConfig::set_jvmci_specific_flags() {
bool CompilerConfig::check_args_consistency(bool status) {
// Check lower bounds of the code cache
// Template Interpreter code is approximately 3X larger in debug builds.
uint min_code_cache_size = CodeCacheMinimumUseSpace DEBUG_ONLY(* 3);
size_t min_code_cache_size = CodeCacheMinimumUseSpace DEBUG_ONLY(* 3);
if (ReservedCodeCacheSize < InitialCodeCacheSize) {
jio_fprintf(defaultStream::error_stream(),
"Invalid ReservedCodeCacheSize: %dK. Must be at least InitialCodeCacheSize=%dK.\n",
"Invalid ReservedCodeCacheSize: %zuK. Must be at least InitialCodeCacheSize=%zuK.\n",
ReservedCodeCacheSize/K, InitialCodeCacheSize/K);
status = false;
} else if (ReservedCodeCacheSize < min_code_cache_size) {
jio_fprintf(defaultStream::error_stream(),
"Invalid ReservedCodeCacheSize=%dK. Must be at least %uK.\n", ReservedCodeCacheSize/K,
"Invalid ReservedCodeCacheSize=%zuK. Must be at least %zuK.\n", ReservedCodeCacheSize/K,
min_code_cache_size/K);
status = false;
} else if (ReservedCodeCacheSize > CODE_CACHE_SIZE_LIMIT) {
// Code cache size larger than CODE_CACHE_SIZE_LIMIT is not supported.
jio_fprintf(defaultStream::error_stream(),
"Invalid ReservedCodeCacheSize=%dM. Must be at most %uM.\n", ReservedCodeCacheSize/M,
"Invalid ReservedCodeCacheSize=%zuM. Must be at most %zuM.\n", ReservedCodeCacheSize/M,
CODE_CACHE_SIZE_LIMIT/M);
status = false;
} else if (NonNMethodCodeHeapSize < min_code_cache_size) {
jio_fprintf(defaultStream::error_stream(),
"Invalid NonNMethodCodeHeapSize=%dK. Must be at least %uK.\n", NonNMethodCodeHeapSize/K,
"Invalid NonNMethodCodeHeapSize=%zuK. Must be at least %zuK.\n", NonNMethodCodeHeapSize/K,
min_code_cache_size/K);
status = false;
}

View File

@@ -149,6 +149,8 @@ public:
inline static bool is_c2_or_jvmci_compiler_only();
inline static bool is_c2_or_jvmci_compiler_enabled();
inline static CompilerType compiler_type();
private:
static bool is_compilation_mode_selected();
static void set_compilation_policy_flags();

View File

@@ -131,4 +131,17 @@ inline bool CompilerConfig::is_c2_or_jvmci_compiler_enabled() {
return is_c2_enabled() || is_jvmci_compiler_enabled();
}
// Return type of most optimizing compiler which is used
inline CompilerType CompilerConfig::compiler_type() {
CompilerType compiler_type = CompilerType::compiler_none; // Interpreter only
if (CompilerConfig::is_c2_enabled()) {
compiler_type = CompilerType::compiler_c2;
} else if (CompilerConfig::is_jvmci_compiler_enabled()) {
compiler_type = CompilerType::compiler_jvmci;
} else if (CompilerConfig::is_c1_enabled()) {
compiler_type = CompilerType::compiler_c1;
}
return compiler_type;
}
#endif // SHARE_COMPILER_COMPILERDEFINITIONS_INLINE_HPP

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2025, 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
@@ -33,10 +33,10 @@
#include "runtime/globals_shared.hpp"
#ifdef COMPILER1
#include "c1/c1_globals_pd.hpp"
#include "c1/c1_globals.hpp"
#endif // COMPILER1
#ifdef COMPILER2
#include "opto/c2_globals_pd.hpp"
#include "opto/c2_globals.hpp"
#endif // COMPILER2
// JVMCI has no platform-specific global definitions
@@ -61,15 +61,15 @@ define_pd_global(intx, OnStackReplacePercentage, 0);
define_pd_global(size_t, NewSizeThreadIncrease, 4*K);
define_pd_global(bool, InlineClassNatives, true);
define_pd_global(bool, InlineUnsafeOps, true);
define_pd_global(uintx, InitialCodeCacheSize, 160*K);
define_pd_global(uintx, ReservedCodeCacheSize, 32*M);
define_pd_global(uintx, NonProfiledCodeHeapSize, 0);
define_pd_global(uintx, ProfiledCodeHeapSize, 0);
define_pd_global(uintx, NonNMethodCodeHeapSize, 32*M);
define_pd_global(size_t, InitialCodeCacheSize, 160*K);
define_pd_global(size_t, ReservedCodeCacheSize, 32*M);
define_pd_global(size_t, NonProfiledCodeHeapSize, 0);
define_pd_global(size_t, ProfiledCodeHeapSize, 0);
define_pd_global(size_t, NonNMethodCodeHeapSize, 32*M);
define_pd_global(uintx, CodeCacheExpansionSize, 32*K);
define_pd_global(uintx, CodeCacheMinBlockLength, 1);
define_pd_global(uintx, CodeCacheMinimumUseSpace, 200*K);
define_pd_global(size_t, CodeCacheExpansionSize, 32*K);
define_pd_global(size_t, CodeCacheMinBlockLength, 1);
define_pd_global(size_t, CodeCacheMinimumUseSpace, 200*K);
#ifndef ZERO
define_pd_global(bool, NeverActAsServerClassMachine, true);
define_pd_global(uint64_t,MaxRAM, 1ULL*G);

View File

@@ -347,6 +347,10 @@ HeapWord* G1CollectedHeap::humongous_obj_allocate(size_t word_size) {
_verifier->verify_region_sets_optional();
uint obj_regions = (uint) humongous_obj_size_in_regions(word_size);
if (obj_regions > num_available_regions()) {
// Can't satisfy this allocation; early-return.
return nullptr;
}
// Policy: First try to allocate a humongous object in the free list.
G1HeapRegion* humongous_start = _hrm.allocate_humongous(obj_regions);
@@ -495,7 +499,7 @@ HeapWord* G1CollectedHeap::alloc_archive_region(size_t word_size, HeapWord* pref
if (reserved.word_size() <= word_size) {
log_info(gc, heap)("Unable to allocate regions as archive heap is too large; size requested = %zu"
" bytes, heap = %zu bytes", word_size, reserved.word_size());
" bytes, heap = %zu bytes", word_size * HeapWordSize, reserved.byte_size());
return nullptr;
}
@@ -997,7 +1001,7 @@ HeapWord* G1CollectedHeap::expand_and_allocate(size_t word_size) {
return nullptr;
}
bool G1CollectedHeap::expand(size_t expand_bytes, WorkerThreads* pretouch_workers, double* expand_time_ms) {
bool G1CollectedHeap::expand(size_t expand_bytes, WorkerThreads* pretouch_workers) {
size_t aligned_expand_bytes = os::align_up_vm_page_size(expand_bytes);
aligned_expand_bytes = align_up(aligned_expand_bytes, G1HeapRegion::GrainBytes);
@@ -1009,15 +1013,10 @@ bool G1CollectedHeap::expand(size_t expand_bytes, WorkerThreads* pretouch_worker
return false;
}
double expand_heap_start_time_sec = os::elapsedTime();
uint regions_to_expand = (uint)(aligned_expand_bytes / G1HeapRegion::GrainBytes);
assert(regions_to_expand > 0, "Must expand by at least one region");
uint expanded_by = _hrm.expand_by(regions_to_expand, pretouch_workers);
if (expand_time_ms != nullptr) {
*expand_time_ms = (os::elapsedTime() - expand_heap_start_time_sec) * MILLIUNITS;
}
assert(expanded_by > 0, "must have failed during commit.");
size_t actual_expand_bytes = expanded_by * G1HeapRegion::GrainBytes;
@@ -2393,11 +2392,11 @@ void G1CollectedHeap::expand_heap_after_young_collection(){
if (expand_bytes > 0) {
// No need for an ergo logging here,
// expansion_amount() does this when it returns a value > 0.
double expand_ms = 0.0;
if (!expand(expand_bytes, _workers, &expand_ms)) {
// We failed to expand the heap. Cannot do anything about it.
Ticks expand_start = Ticks::now();
if (expand(expand_bytes, _workers)) {
double expand_ms = (Ticks::now() - expand_start).seconds() * MILLIUNITS;
phase_times()->record_expand_heap_time(expand_ms);
}
phase_times()->record_expand_heap_time(expand_ms);
}
}

View File

@@ -572,7 +572,7 @@ public:
// Returns true if the heap was expanded by the requested amount;
// false otherwise.
// (Rounds up to a G1HeapRegion boundary.)
bool expand(size_t expand_bytes, WorkerThreads* pretouch_workers = nullptr, double* expand_time_ms = nullptr);
bool expand(size_t expand_bytes, WorkerThreads* pretouch_workers);
bool expand_single_region(uint node_index);
// Returns the PLAB statistics for a given destination.
@@ -969,7 +969,7 @@ public:
// Returns true if an incremental GC should be upgrade to a full gc. This
// is done when there are no free regions and the heap can't be expanded.
bool should_upgrade_to_full_gc() const {
return num_inactive_regions() == 0 && num_free_regions() == 0;
return num_available_regions() == 0;
}
// The number of inactive regions.
@@ -988,13 +988,12 @@ public:
uint num_used_regions() const { return _hrm.num_used_regions(); }
// The number of regions that can be allocated into.
uint num_available_regions() const { return _hrm.num_available_regions(); }
uint num_available_regions() const { return num_free_regions() + num_inactive_regions(); }
MemoryUsage get_auxiliary_data_memory_usage() const {
return _hrm.get_auxiliary_data_memory_usage();
}
#ifdef ASSERT
bool is_on_master_free_list(G1HeapRegion* hr) {
return _hrm.is_free(hr);

View File

@@ -477,10 +477,6 @@ uint G1HeapRegionManager::find_contiguous_in_free_list(uint num_regions) {
}
uint G1HeapRegionManager::find_contiguous_allow_expand(uint num_regions) {
// Check if we can actually satisfy the allocation.
if (num_regions > num_available_regions()) {
return G1_NO_HRM_INDEX;
}
// Find any candidate.
return find_contiguous_in_range(0, max_num_regions(), num_regions);
}

View File

@@ -239,8 +239,6 @@ public:
// The number of regions reserved for the heap.
uint max_num_regions() const { return (uint)_regions.length(); }
uint num_available_regions() const { return num_free_regions() + num_inactive_regions(); }
MemoryUsage get_auxiliary_data_memory_usage() const;
MemRegion reserved() const { return MemRegion(heap_bottom(), heap_end()); }

Some files were not shown because too many files have changed in this diff Show More