Compare commits

..

617 Commits

Author SHA1 Message Date
Dmitry Batrak
607dcb78a8 support setting mouse cursors 2022-11-18 14:22:21 +03:00
Maxim Kartashev
f9f5359629 Prevent deadlock when scrolling
SurfaceData need to be able to be locked twice during scrolling,
but the associated mutex wasn't recursive, which led to a deadlock.
2022-11-16 17:22:24 +03:00
Maxim Kartashev
6b19a747f7 Basic support for VolatileImage
The image is actually a non-volatile software implementation.
2022-11-15 11:52:49 +03:00
Maxim Kartashev
7d7d9f9bf5 Prevent race condition when destroying buffer manager
Also implemented AWT_LOCK() family of macros
2022-11-15 11:52:23 +03:00
Dmitry Batrak
66c28a3606 prevent crashes on concurrent access to AWT API 2022-11-14 19:12:31 +03:00
Maxim Kartashev
e2321b5594 Implemented getColorModel() and createAcceleratedImage()
This is enough to make J2Ddemo and StylePad work
2022-11-11 12:04:24 +03:00
Dmitry Batrak
5813b10e65 maximize/un-maximize improvements
* remove 'roundtrip' calls - they don't seem to be needed after recent changes to paint logic
* remove unneeded lock in WLFramePeer.setState - corresponding code doesn't query or modify any state
* always repaint client decorations on frame state change - it might not be accompanied by size change
* remember the size of frame before maximization, use it on de-maximization, if compositor doesn't propose a size itself
2022-11-09 16:18:28 +03:00
Maxim Kartashev
d121a93cb1 JBR-4918 More bugfixes in Wayland buffers management
Event-driven painting of client decorations.
Smooth window resize.
Transactional commits at AWT and Swing level
based on frame numbers.
2022-11-08 08:40:18 +03:00
Dmitry Batrak
f7638abee2 initialize memory allocated for WLFrame
just in case, to prevent potential usage of uninitialized fields in future
2022-11-02 12:41:08 +03:00
Dmitry Batrak
55b1310c24 support setting state to a window before making it visible, and right afterwards 2022-10-31 12:23:16 +03:00
Maxim Kartashev
bfe03f4bd1 Revert "JBR-4918 More bugfixes in Wayland buffers management"
This reverts commit 15a09a1564.
2022-10-28 13:20:27 +03:00
Maxim Kartashev
15a09a1564 JBR-4918 More bugfixes in Wayland buffers management
Event-driven painting of client decorations.
Smooth window resize.
Transactional commits at AWT and Swing level
based on frame numbers.
2022-10-28 11:28:57 +03:00
Dmitry Batrak
858380c36d fix assertion in WLKeyboardFocusManagerPeer 2022-10-21 18:34:02 +03:00
Dmitry Batrak
a81b44d79d client-side decorations, and some fixes for minimize/maximize window functionality 2022-10-21 16:46:36 +03:00
Dmitry Batrak
7f9aee3c7f make default component focused on frame activation 2022-10-21 12:05:01 +03:00
Maxim Kartashev
0478a24483 JBR-4918 Additional bugfixes in Wayland buffers management 2022-10-21 09:48:51 +03:00
Maxim Kartashev
c113772448 JBR-4865 Support xdg-shell functions
Implemented maximize/fullscreen together with the reverse functions.
2022-10-19 11:24:08 +03:00
Maxim Kartashev
757194800f JBR-4918 Implement support for window size change 2022-10-18 11:07:01 +03:00
Maxim Kartashev
b9c4ac35ec JBR-4865 Support xdg-shell functions 2022-10-18 11:06:57 +03:00
Dmitry Batrak
adf8d95f7b simplify Wayland events dispatching, fix known issues 2022-10-13 10:23:03 +03:00
Maxim Kartashev
b2986aef46 JBR-4621 Implemented key repeat 2022-10-12 14:23:09 +03:00
Maxim Kartashev
cea81933d9 JBR-4621 Input events support for Wayland
This includes basic mouse and keyboard support.
2022-10-12 14:23:09 +03:00
Maxim Kartashev
6779e2c59b Let WLToolkit work with DISPLAY unset 2022-10-12 14:23:06 +03:00
Alexey Ushakov
4b7c5f62a9 Improved sun.awt.wl.WLGraphicsEnvironment to support createCraphics() 2022-10-12 14:22:34 +03:00
Maxim Kartashev
df204bb882 Added libwakefield source code to the tree
It is not integrated into the build infrastructure both for simplicity
and to avoid otherwise unnecessary dependencies on weston, pixman, etc.

Also fixed copyrights in the recently added files, including the
auto-generated ones.
2022-10-12 14:22:34 +03:00
Maxim Kartashev
0d7fdcf415 Made it possible for Wayland tests to run in parallel
Also fixed a potential crash in getLocationOnScreen().
2022-10-12 14:22:34 +03:00
Maxim Kartashev
73c8c50262 Wayland test harness and sample test 2022-10-12 14:22:34 +03:00
Maxim Kartashev
16cacd0b55 AWT Robot to support Wayland natively
Requires the presence of the 'wakefield' protocol extension on the
server side; will throw UOE on use otherwise. Can be completely
disabled by undefining WAKEFIELD_ROBOT during compilation.

Provides the ability to re-position the surface to the given absolute
coordinates, query the surface's position, obtain RGB of a pixel at the
given absolute coordinates and take a screenshot of an area.
2022-10-12 14:22:34 +03:00
Nikita Gubarkov
19496fcef9 Suppress unused-result warning for libfontmanager 2022-10-12 14:22:34 +03:00
nikita.gubarkov
9cb4769361 Text rendering support
Extracted X11-related code from libfontmanager into libfontmanager_xawt
2022-10-12 14:22:33 +03:00
Maxim Kartashev
dc36d0afaf Reduced xdg_wm_base protocol version to 1 in order to run under Weston
This was done purely for convenience. The version can be bumped back up
at any time, but the change will require a more recent version
of Weston for testing.
2022-10-12 14:22:33 +03:00
Alexey Ushakov
20ca5a41f4 Added JFrame support 2022-10-12 14:22:33 +03:00
Alexey Ushakov
e864ea8469 Fixed child hw component position 2022-10-12 14:22:33 +03:00
Alexey Ushakov
b3e31866ec Implemented heavyweight button rendering 2022-10-12 14:22:33 +03:00
Alexey Ushakov
4cdce4b44a Moved native window management to WLComponentPeer 2022-10-12 14:22:33 +03:00
Alexey Ushakov
2187957e7e Added WLRepaintArea 2022-10-12 14:22:33 +03:00
Alexey Ushakov
14aa544c86 Refactored peers 2022-10-12 14:22:32 +03:00
Alexey Ushakov
de5214531a Added stubs for WLTK button peer 2022-10-12 14:22:32 +03:00
Alexey Ushakov
ea6f74d64f Added 2d surface support 2022-10-12 14:22:32 +03:00
Alexey Ushakov
56e174709b Added support for background color. Refactoring 2022-10-12 14:22:32 +03:00
Alexey Ushakov
c5103ff4a8 Make simple awt window visible 2022-10-12 14:22:32 +03:00
Dmitry Batrak
49c103709e window showing and event loop prototype 2022-10-12 14:22:32 +03:00
Dmitry Batrak
4b21d041d8 more stubbing for WLToolkit, add WLFramePeer 2022-10-12 14:22:31 +03:00
Dmitry Batrak
c1ee18adfb more stubbing for WLToolkit 2022-10-12 14:22:31 +03:00
Alexey Ushakov
693e16b0a1 Created stub version of WLToolkit
A wayland base toolkit with native part linked to wayland-client library
2022-10-12 14:22:28 +03:00
Kim Barrett
5ad126f446 8295012: Arena should not derive from CHeapObj<mtNone>
Reviewed-by: stefank, dholmes
2022-10-12 01:55:58 +00:00
Xiaohong Gong
ab8c1361bc 8292898: [vectorapi] Unify vector mask cast operation
Co-authored-by: Quan Anh Mai <qamai@openjdk.org>
Reviewed-by: jbhateja, eliu
2022-10-12 01:39:57 +00:00
Jatin Bhateja
2ceb80c60f 8288043: Optimize FP to word/sub-word integral type conversion on X86 AVX2 platforms
Reviewed-by: kvn, sviswanathan
2022-10-12 01:05:44 +00:00
Quan Anh Mai
703a6ef591 8283699: Improve the peephole mechanism of hotspot
Reviewed-by: kvn, dlong
2022-10-12 00:31:04 +00:00
Kim Barrett
94a9b048af 8295013: OopStorage should derive from CHeapObjBase
Reviewed-by: stefank, tschatzl
2022-10-11 23:17:31 +00:00
Pavel Rappo
3a980b972f 8295168: Remove superfluous period in @throws tag description
Reviewed-by: bpb, naoto, lancea, iris
2022-10-11 19:44:54 +00:00
Pavel Rappo
9bb932ce30 8295154: Documentation for RemoteExecutionControl.invoke(Method) inherits non-existent documentation
Reviewed-by: jjg
2022-10-11 19:35:18 +00:00
Martin Doerr
945950d863 8295069: [PPC64] Performance regression after JDK-8290025
Reviewed-by: rrich, lucy
2022-10-11 19:19:41 +00:00
Chris Plummer
d362e16924 8294689: The SA transported_core.html file needs quite a bit of work
Reviewed-by: kevinw, poonam, sspitsyn
2022-10-11 18:01:18 +00:00
Smita Kamath
07946aa49c 8289552: Make intrinsic conversions between bit representations of half precision values and floats
Reviewed-by: kvn, sviswanathan, jbhateja
2022-10-11 17:06:19 +00:00
Raffaello Giulietti
2586b1a3c1 8295155: Incorrect javadoc of java.base module
Reviewed-by: alanb, rriggs, bpb, iris, jvernee
2022-10-11 16:58:36 +00:00
Magnus Ihse Bursie
e1a77cfd5f 8295163: Remove old hsdis Makefile
Reviewed-by: shade, iris
2022-10-11 16:35:55 +00:00
Xue-Lei Andrew Fan
3c7ae1225f 8294821: Class load improvement for AES crypto engine
Reviewed-by: valeriep
2022-10-11 16:23:02 +00:00
Markus Karg
619cd825b5 8294702: BufferedInputStream uses undefined value range for markpos
Reviewed-by: alanb, bpb
2022-10-11 16:07:31 +00:00
Abhishek Kumar
9d0009e92b 6777156: GTK L&F: JFileChooser can jump beyond root directory in combobox and selection textarea.
Reviewed-by: jdv, tr, psadhukhan
2022-10-11 12:55:59 +00:00
Aleksey Shipilev
3ebe5ad2d7 8294751: Zero: Allow larger default heaps
Reviewed-by: iklam, rkennke
2022-10-11 12:30:58 +00:00
Tejesh R
33d0618813 6616245: NullPointerException when using JFileChooser with a custom FileView
Reviewed-by: aivanov
2022-10-11 11:11:49 +00:00
Erik Gahlin
fba763f825 8291519: jdk/jfr/api/event/TestShouldCommit.java failed with Unexpected value of shouldCommit()
Reviewed-by: mgronlun
2022-10-11 10:06:17 +00:00
Tongbao Zhang
6053bf0f6a 8293782: Shenandoah: some tests failed on lock rank check
Reviewed-by: mdoerr, shade
2022-10-11 10:04:30 +00:00
KIRIYAMA Takuya
4435d56d3f 8282395: URL.openConnection can throw IOOBE
Reviewed-by: dfuchs
2022-10-11 09:22:33 +00:00
Daniel Jeliński
fe70487d0b 8294958: java/net/httpclient/ConnectTimeout tests are slow
Reviewed-by: dfuchs, aefimov
2022-10-11 08:50:01 +00:00
Roberto Castañeda Lozano
97f1321cb4 8294356: IGV: scheduled graphs contain duplicated elements
Reviewed-by: chagedorn, thartmann
2022-10-11 07:13:00 +00:00
Matthias Baesken
5e05e421ed 8294901: remove pre-VS2017 checks in Windows related coding
Reviewed-by: dholmes, mdoerr, kbarrett
2022-10-11 07:11:59 +00:00
Andrey Turbanov
e775acf889 8293986: Incorrect double-checked locking in com.sun.beans.introspect.ClassInfo
Reviewed-by: serb
2022-10-11 05:59:16 +00:00
Eric Liu
9d116ec147 8294262: AArch64: compiler/vectorapi/TestReverseByteTransforms.java test failed on SVE machine
Reviewed-by: aph, njian
2022-10-11 01:37:20 +00:00
Ningsheng Jian
4b17d28a6d 8294261: AArch64: Use pReg instead of pRegGov when possible
Reviewed-by: ngasson, xgong
2022-10-11 01:06:28 +00:00
Sergey Bylokhov
891156a744 8295003: Do not mention applets in the "java.awt.color" package
Reviewed-by: aivanov, prr
2022-10-11 00:40:34 +00:00
Kim Barrett
e6c33e62b5 8295014: Remove unnecessary explicit casts to void* in CHeapObjBase
Reviewed-by: jsjolen, dholmes, stefank
2022-10-11 00:17:36 +00:00
Erik Gahlin
1bfcc2790a 8294931: JFR: Simplify SettingInfo
Reviewed-by: mgronlun
2022-10-10 17:56:34 +00:00
Pavel Rappo
eb90c4fc04 8294377: Prepare to stop auto-inheriting documentation for subclasses of exceptions whose documentation is inherited
Reviewed-by: jjg
2022-10-10 16:54:57 +00:00
Markus Grönlund
4df4a1f8e2 8287832: jdk/jfr/event/runtime/TestActiveSettingEvent.java failed with "Expected two batches of Active Setting events"
Reviewed-by: egahlin
2022-10-10 12:40:58 +00:00
Markus Grönlund
35d17a00ab 8293864: Kitchensink24HStress.java fails with SIGSEGV in JfrCheckpointManager::lease
Reviewed-by: egahlin
2022-10-10 12:39:10 +00:00
Aleksey Shipilev
c5f462e83b 8294956: GHA: qemu-debootstrap is deprecated, use the regular one
Reviewed-by: erikj
2022-10-10 12:19:46 +00:00
Prasanta Sadhukhan
269252aa3d 8295007: javax/swing/JRadioButton/4314194/bug4314194.java fails in mach5 for WIndowLookAndFeel
Reviewed-by: aivanov, tr
2022-10-10 11:51:21 +00:00
Jie Fu
6ed74ef654 8295005: compiler/loopopts/TestRemoveEmptyLoop.java fails with release VMs after JDK-8294839
Reviewed-by: chagedorn, epeter
2022-10-10 07:06:51 +00:00
Daniel Jeliński
8a148bc960 8294848: Unnecessary SSLCipher dispose implementations
Reviewed-by: xuelei, valeriep, wetmore
2022-10-10 07:02:27 +00:00
Markus Karg
8713dfa64e 8294541: java/io/BufferedInputStream/TransferTo.java fails with OOME
Reviewed-by: alanb
2022-10-09 13:55:27 +00:00
Xiaolin Zheng
542cc602a7 8294366: RISC-V: Partially mark out incompressible regions
Reviewed-by: fyang, yadongwang
2022-10-08 06:41:45 +00:00
Alex Menkov
495c043533 7124710: interleaved RedefineClasses() and RetransformClasses() calls may have a problem
Reviewed-by: sspitsyn, dcubed
2022-10-07 23:02:19 +00:00
Justin Lu
d39d8c856a 8170389: java.text.DigitList.getDouble() : Controversy between javadoc and code
Reviewed-by: naoto, lancea
2022-10-07 22:58:26 +00:00
Matias Saavedra Silva
3466e99934 8294691: dynamicArchive/RelativePath.java is running other test case
Reviewed-by: iklam, ccheung
2022-10-07 20:44:35 +00:00
Weijun Wang
823b53d895 8294987: Streamline DerOutputStream write
Reviewed-by: jnimeh, ascarpino
2022-10-07 20:34:08 +00:00
Chris Plummer
6a266c4de1 8292879: com/sun/jdi/ClassUnloadEventTest.java failed due to classes not unloading
Reviewed-by: dholmes, coleenp, sspitsyn
2022-10-07 19:11:19 +00:00
Aleksey Shipilev
fe7a4617fe 8294920: Missing SP value in Linux x86_32 thread context
Reviewed-by: cjplummer, sspitsyn
2022-10-07 18:23:16 +00:00
Brian Burkhalter
4cbac40de9 8294717: (bf) DirectByteBuffer constructor will leak if allocating Deallocator or Cleaner fails with OOME
Reviewed-by: alanb
2022-10-07 17:43:00 +00:00
Alex Menkov
c1166a304d 8289561: java/lang/instrument/NativeMethodPrefixAgent.java fails with "ERROR: Injection failure: java.lang.UnsupportedOperationException: Records requires ASM8"
Reviewed-by: lmesnik, cjplummer, sspitsyn
2022-10-07 17:13:30 +00:00
Aleksey Shipilev
a1747ef81a 8294941: GHA: Cut down cross-compilation sysroots
Reviewed-by: clanger, erikj
2022-10-07 17:11:07 +00:00
Darragh Clarke
67210abd04 8286394: Address possibly lossy conversions in jdk.naming.dns
Reviewed-by: rriggs, aefimov
2022-10-07 16:04:50 +00:00
Sacha Coppey
7a194d31a3 8290154: [JVMCI] partially implement JVMCI for RISC-V
Reviewed-by: ihse, dnsimon, yadongwang
2022-10-07 13:09:09 +00:00
Johan Sjölen
b38bed6d0e 8294308: Allow dynamically choosing the MEMFLAGS of a type without ResourceObj
Reviewed-by: coleenp, stefank, kbarrett
2022-10-07 11:06:57 +00:00
Albert Mingkun Yang
118d93b3dc 8294907: Remove unused NativeLookup::dll_load
Reviewed-by: dholmes
2022-10-07 08:55:12 +00:00
Alan Bateman
1fda8421b9 8291429: java/lang/Thread/virtual/ThreadAPI.java timed out on single core system
Reviewed-by: sspitsyn, cjplummer
2022-10-07 08:14:43 +00:00
Andrey Turbanov
2d25c0a31c 8292280: Unused field 'keyListener' in BasicRadioButtonUI
Reviewed-by: jdv, serb
2022-10-07 06:19:01 +00:00
Alan Bateman
0ad6803ac2 8293810: Remove granting of RuntimePermission("stopThread") from tests
Reviewed-by: dfuchs, mullan, mchung, chegar
2022-10-07 06:15:38 +00:00
Srikanth Adayapalam
cf84c8eaf2 8292975: javac produces code that crashes with LambdaConversionException
8269983: BootstrapMethodError with method reference and intersection type

Reviewed-by: dlsmith, vromero
2022-10-07 04:20:40 +00:00
Prasanta Sadhukhan
f3a44a4835 8075916: The regression-swing case failed as colored text is not shown on disabled checkbox and radio button with Nimbus LAF
Reviewed-by: tr, aivanov
2022-10-07 03:09:19 +00:00
Prasanta Sadhukhan
37bd4fbe30 6852577: Only for Nimbus LAF UIManager.get("PasswordField.echoChar") is null
Reviewed-by: tr, aivanov
2022-10-07 03:02:53 +00:00
Justin Lu
d4c9a88073 6560981: (cal) unused local variables in GregorianCalendar, etc.
Reviewed-by: naoto, bchristi, iris
2022-10-06 23:16:06 +00:00
Zhiqiang Zang
5dd851d872 8281453: New optimization: convert ~x into -1-x when ~x is used in an arithmetic expression
Reviewed-by: kvn
2022-10-06 22:15:20 +00:00
Mikael Vidstedt
85569e966c 8286037: Bump minimum boot jdk to JDK 19
Reviewed-by: ctornqvi, darcy, shade, erikj
2022-10-06 17:34:14 +00:00
Damon Nguyen
fef345b19f 8293672: Update freetype md file
Reviewed-by: prr
2022-10-06 16:07:47 +00:00
Martin Desruisseaux
5c030cccae 8290973: In AffineTransform, equals(Object) is inconsistent with hashCode()
Reviewed-by: prr
2022-10-06 16:03:36 +00:00
Matias Saavedra Silva
f888aa953c 8293061: Combine CDSOptions and AppCDSOptions test utility classes
Reviewed-by: dholmes, iklam, ccheung
2022-10-06 15:03:24 +00:00
Emanuel Peter
73f06468ae 8294839: Disable StressLongCountedLoop in compiler/loopopts/TestRemoveEmptyLoop.java
Reviewed-by: thartmann, chagedorn
2022-10-06 10:40:11 +00:00
Raffaello Giulietti
2ceebf681f 8294456: Fix misleading-indentation warnings in core JDK libraries
Reviewed-by: shade, rriggs, iris, darcy
2022-10-06 09:31:26 +00:00
Alan Bateman
ad7b7d40ce 8294697: java/lang/Thread/virtual/ThreadAPI.testGetStackTrace2 failed with non-empty stack trace
Reviewed-by: dfuchs, jpai
2022-10-06 07:59:43 +00:00
Aleksey Shipilev
e38ae8a651 8294759: Print actual lock/monitor ranking
Reviewed-by: coleenp, dholmes
2022-10-06 07:57:54 +00:00
Matthias Baesken
7012d4ba55 8294837: unify Windows 2019 version check in os_windows and java_props_md
Reviewed-by: alanb, rriggs
2022-10-06 07:12:07 +00:00
Jayathirth D V
8c15f77aba 8270915: GIFImageReader disregards ignoreMetadata flag which causes memory exhaustion
Reviewed-by: prr
2022-10-06 05:43:43 +00:00
Jayathirth D V
6029120a5f 8278086: [REDO] ImageIO.write() method will throw IndexOutOfBoundsException
Co-authored-by: Masanori Yano <myano@openjdk.org>
Reviewed-by: tr, prr
2022-10-06 05:23:38 +00:00
Fei Yang
8f5611593a 8294679: RISC-V: Misc crash dump improvements
Reviewed-by: fjiang, shade
2022-10-06 01:21:18 +00:00
Alexandre Iline
e986a97a96 8292330: Update JCov version to 3.0.13
Reviewed-by: erikj
2022-10-06 00:21:00 +00:00
Stuart Marks
d4142d8441 8290036: Define and specify Runtime shutdown sequence
Reviewed-by: dholmes, alanb
2022-10-05 23:43:02 +00:00
Joe Darcy
0ec18382b7 8294869: Correct failure of RemovedJDKInternals.java after JDK-8294618
Reviewed-by: alanb, azvegint
2022-10-05 19:27:20 +00:00
Justin Lu
87acfee3c3 8294397: Replace StringBuffer with StringBuilder within java.text
Reviewed-by: lancea, naoto, bchristi
2022-10-05 18:42:00 +00:00
Xue-Lei Andrew Fan
f2c57186a4 8294734: Redundant override in AES implementation
Reviewed-by: valeriep, wetmore
2022-10-05 17:25:58 +00:00
Joe Darcy
536c9a512e 8294618: Update openjdk.java.net => openjdk.org
Reviewed-by: mikael, iris, joehw, prr, ihse
2022-10-05 16:48:09 +00:00
Matthias Baesken
f531dae4a0 8294840: langtools OptionalDependencyTest.java use File.pathSeparator
Reviewed-by: alanb
2022-10-05 14:41:29 +00:00
Richard Reingruber
ee6c39175b 8289925: Shared code shouldn't reference the platform specific method frame::interpreter_frame_last_sp()
Reviewed-by: eosterlund, dlong
2022-10-05 14:10:02 +00:00
Robbin Ehn
bd90c4cfa6 8282900: runtime/stringtable/StringTableCleaningTest.java verify unavailable at this moment
Reviewed-by: coleenp, dholmes
2022-10-05 12:45:18 +00:00
Robbin Ehn
979efd4174 8289004: investigate if SharedRuntime::get_java_tid parameter should be a JavaThread*
Reviewed-by: dholmes, jsjolen
2022-10-05 12:44:20 +00:00
Erik Joelsson
b9eeec2b6b 8294310: compare.sh fails on macos after JDK-8293550
Reviewed-by: ihse
2022-10-05 12:42:05 +00:00
Erik Gahlin
13a5000d48 8294151: JFR: Unclear exception message when dumping stopped in memory recording
Reviewed-by: mgronlun
2022-10-05 11:49:53 +00:00
Jorn Vernee
8ebebbce32 8294368: Java incremental builds broken on Windows after JDK-8293116
Reviewed-by: erikj, djelinski, jlahoda
2022-10-05 10:26:53 +00:00
Roberto Castañeda Lozano
4bdd1c9148 8290964: C2 compilation fails with assert "non-reduction loop contains reduction nodes"
Reviewed-by: thartmann, chagedorn
2022-10-05 09:43:31 +00:00
Richard Reingruber
b4e74aeabf 8294514: Wrong initialization of nmethod::_consts_offset for native nmethods
Reviewed-by: kvn, dlong
2022-10-05 09:33:45 +00:00
Matthias Baesken
953ce8da2c 8293701: jdeps InverseDepsAnalyzer runs into NoSuchElementException: No value present
Reviewed-by: mchung
2022-10-05 07:34:42 +00:00
Matthias Baesken
be82cff625 8294748: Cleanup unneeded references to hg
Reviewed-by: erikj, clanger
2022-10-05 07:25:49 +00:00
Daniel Jeliński
43dbf5899b 8186765: Speed up test sun/net/www/protocol/https/HttpsClient/ProxyAuthTest.java
Reviewed-by: dfuchs, jpai
2022-10-05 06:47:19 +00:00
Magnus Ihse Bursie
755958e5ee 8294376: Minimize disabled warnings in java.base
Reviewed-by: erikj
2022-10-05 05:56:44 +00:00
Joe Darcy
1dafbe3f94 8294539: Augment discussion of equivalence relations on floating-point values
Reviewed-by: psandoz, smarks
2022-10-05 00:18:55 +00:00
SWinxy
b2e86a6209 8294255: Add link to DEFAULT_WAIT_TIME in javadoc for SunToolKit.realsSync
Reviewed-by: aivanov, prr
2022-10-04 19:16:14 +00:00
lawrence.andrews
b22a38dedb 8292309: Fix java/awt/PrintJob/ConstrainedPrintingTest/ConstrainedPrintingTest.java test
Reviewed-by: jdv
2022-10-04 18:02:43 +00:00
KIRIYAMA Takuya
121d4a5119 8293579: tools/jpackage/share/jdk/jpackage/tests/UnicodeArgsTest.java fails on Japanese Windows platform
Reviewed-by: asemenyuk, naoto, almatvee
2022-10-04 17:29:15 +00:00
Alisen Chung
1166a8abd2 8292214: Memory leak in getAllConfigs of awt_GraphicsEnv.c:386
Reviewed-by: azvegint, dnguyen
2022-10-04 15:22:18 +00:00
Erik Gahlin
3644e26cef 8294673: JFR: Add SecurityProviderService#threshold to TestActiveSettingEvent.java
Reviewed-by: mgronlun
2022-10-04 14:24:55 +00:00
Albert Mingkun Yang
085949a117 8294712: G1: Use index-base iteration for G1FlushHumongousCandidateRemSets
Reviewed-by: kbarrett, iwalulya
2022-10-04 13:58:51 +00:00
Erik Gahlin
b850f052d8 8294758: JFR: Docs build fails after changes to RecordedObject and Timespan
Reviewed-by: mgronlun, alanb
2022-10-04 13:14:27 +00:00
Leonid Mesnik
2dbedf0e93 8294406: Test runtime/handshake/HandshakeDirectTest.java failed: JVMTI_ERROR_WRONG_PHASE
Reviewed-by: dholmes, sspitsyn
2022-10-04 12:57:55 +00:00
Erik Gahlin
4d6668e7ee 8294242: JFR: jfr print doesn't handle infinite duration well
Reviewed-by: mgronlun
2022-10-04 11:45:53 +00:00
Raffaello Giulietti
5a9cd33632 8294509: The sign extension bug applies to 'public static int[] convertSeedBytesToInts(byte[] seed, int n, int z)' in RandomSupport
Reviewed-by: shade
2022-10-04 10:25:11 +00:00
Martin Doerr
f03934e270 8294578: [PPC64] C2: Missing is_oop information when using disjoint compressed oops mode
Reviewed-by: shade, lucy
2022-10-04 10:13:57 +00:00
Aleksey Shipilev
3b476a1758 8292847: Zero: Allow ergonomics to select the GC
Reviewed-by: tschatzl, stuefe
2022-10-04 09:11:17 +00:00
Roland Westrelin
16047e8308 8292780: misc tests failed "assert(false) failed: graph should be schedulable"
Reviewed-by: dlong, chagedorn, thartmann
2022-10-04 08:34:29 +00:00
Roland Westrelin
bf39b184ca 8288302: Shenandoah: SIGSEGV in vm maybe related to jit compiling xerces
Reviewed-by: shade, thartmann
2022-10-04 08:08:38 +00:00
Tobias Holenstein
f957ce9959 8294564: IGV: IllegalArgumentException for "Difference to current graph"
Reviewed-by: rcastanedalo, chagedorn
2022-10-04 07:29:29 +00:00
Ioi Lam
ae79af2ad6 8294740: Add cgroups keyword to TestDockerBasic.java
Reviewed-by: mseledtsov, dholmes
2022-10-04 03:21:10 +00:00
Serguei Spitsyn
07ed68efb2 8288907: serviceability/jvmti/vthread/SuspendResume1/SuspendResume1.java fails with -XX:TieredStopAtLevel=2,3
Reviewed-by: dholmes
2022-10-03 23:16:51 +00:00
Jonathan Gibbons
090cdfc7a2 8294726: Update URLs in minefield tests
Reviewed-by: darcy, iris
2022-10-03 20:20:53 +00:00
Emmanuel Bourg
ed40d88f29 8276849: Refresh the window icon on graphics configuration changes
Reviewed-by: prr, jdv
2022-10-03 18:42:01 +00:00
Raffaello Giulietti
081691adf4 8294593: Check the size of the target on invocations of BigInteger::isProbablePrime
Reviewed-by: darcy
2022-10-03 18:02:21 +00:00
Daniel Jeliński
a4f2078bd6 8294437: java/nio/channels/FileChannel tests slow on Windows
Reviewed-by: alanb, bpb
2022-10-03 17:42:56 +00:00
Igor Veresov
c6e3daa5fa 8242115: C2 SATB barriers are not safepoint-safe
Reviewed-by: kvn, vlivanov
2022-10-03 17:40:10 +00:00
Jonathan Gibbons
e137f9f2f0 8293877: Rewrite MineField test
Reviewed-by: vromero, martin, darcy, jlahoda
2022-10-03 17:08:37 +00:00
Doug Simon
4f44fd6308 8237467: jlink plugin to save the argument files as input to jlink in the output image
Reviewed-by: mchung
2022-10-03 16:24:43 +00:00
Andrey Turbanov
edfb18a724 8294695: Remove redundant deprecation suppression in ThreadGroup
Reviewed-by: alanb, jpai
2022-10-03 16:03:31 +00:00
stsypanov
46633e644a 8294698: Remove unused 'checkedExceptions' param from MethodAccessorGenerator.generateMethod()
Reviewed-by: redestad
2022-10-03 12:56:51 +00:00
Johan Sjölen
f2a32d996a 8293691: converting a defined BasicType value to a string should not crash the VM
Reviewed-by: shade, coleenp, dlong
2022-10-03 12:18:04 +00:00
Tobias Holenstein
ccc1d31696 8294529: IGV: Highlight the current graphs in the Outline
Reviewed-by: chagedorn
2022-10-03 11:36:05 +00:00
Albert Mingkun Yang
08a7ecf47e 8294671: Remove unused CardValues::last_card
Reviewed-by: tschatzl
2022-10-03 11:11:22 +00:00
Roberto Castañeda Lozano
5fe837a35e 8294236: [IR Framework] CPU preconditions are overriden by regular preconditions
Reviewed-by: chagedorn, pli, kvn
2022-10-03 07:40:53 +00:00
Jan Lahoda
8e9cfeb17c 8294431: jshell reports error on initialisation of static final field of anonymous class
Reviewed-by: sundar
2022-10-03 07:23:42 +00:00
Tobias Holenstein
6e8f0387d6 8294567: IGV: IllegalStateException in search
Reviewed-by: rcastanedalo, chagedorn, kvn
2022-10-03 07:14:16 +00:00
Erik Gahlin
bc668b994d 8293099: JFR: Typo in TestRemoteDump.java
Reviewed-by: mgronlun
2022-10-03 07:04:30 +00:00
Daniel Jeliński
03f25a9c69 8293562: blocked threads with KeepAliveCache.get
Reviewed-by: dfuchs, michaelm
2022-10-03 06:32:31 +00:00
Erik Gahlin
a69ee85308 8292336: JFR: Warn users if -XX:StartFlightRecording:disk=false is specified with maxage or maxsize
Reviewed-by: mgronlun
2022-10-03 06:13:39 +00:00
Doug Simon
b8b9b97a1a 8294676: [JVMCI] InstalledCode.deoptimize(false) should not touch address field
Reviewed-by: never
2022-10-01 11:20:46 +00:00
Jaikiran Pai
fd594302f7 8294610: java/net/vthread/HttpALot.java is slow on Linux
Reviewed-by: dfuchs, alanb
2022-10-01 09:17:53 +00:00
Vladimir Ivanov
c7ab1caafb 8294609: C2: Improve inlining of methods with unloaded signature classes
Reviewed-by: kvn, dlong
2022-09-30 23:30:45 +00:00
Andrey Turbanov
375f02fb21 8294608: Remove redundant unchecked suppression in FileDescriptor
Reviewed-by: alanb, bpb
2022-09-30 20:19:45 +00:00
Roger Riggs
d207da8a8c 8294533: Documentation mistake in Process::getErrorStream and getInputStream
Reviewed-by: iris
2022-09-30 19:10:55 +00:00
Dhamoder Nalla
da4e96d596 8276545: Fix handling of trap count overflow in Parse::Parse()
Reviewed-by: thartmann, kvn
2022-09-30 18:38:48 +00:00
Erik Gahlin
48674d4f36 8291428: JFR: 'jfr print' displays incorrect timestamps during DST
Reviewed-by: mgronlun
2022-09-30 17:34:52 +00:00
Justin Lu
3b1bc21727 8294307: ISO 4217 Amendment 173 Update
Reviewed-by: lancea, bpb, naoto
2022-09-30 17:10:49 +00:00
Alan Bateman
b8f9a915a2 8293940: Some tests for virtual threads take too long
Reviewed-by: dfuchs
2022-09-30 16:41:33 +00:00
Erik Gahlin
1d26c4b149 8291022: JFR: Reduce logging in ChunkHeader constructor
Reviewed-by: mgronlun
2022-09-30 16:30:45 +00:00
Claes Redestad
3efbd5f0fa 8294626: Improve URL protocol lower casing
Reviewed-by: dfuchs
2022-09-30 16:03:53 +00:00
Johan Sjölen
052a924985 8294293: Remove unused _width and _newlines field in outputStream
Reviewed-by: rehn, dholmes
2022-09-30 14:45:40 +00:00
Erik Gahlin
c2ce43cbb0 8291021: JFR: Only one finished state in ChunkHeader class
Reviewed-by: mgronlun
2022-09-30 13:10:56 +00:00
Yoshiki Sato
f01573368f 8294357: (tz) Update Timezone Data to 2022d
Reviewed-by: naoto, coffeys
2022-09-30 12:45:35 +00:00
Hannes Wallnöfer
64da8620e1 8287597: List all preview features on the javadoc PREVIEW page
Reviewed-by: jjg
2022-09-30 11:11:28 +00:00
Adam Sotona
b4e1e416da 8293000: Review running times of jshell regression tests
Reviewed-by: darcy
2022-09-30 08:57:50 +00:00
Severin Gehwolf
6d83482a6b 8293540: [Metrics] Incorrectly detected resource limits with additional cgroup fs mounts
Reviewed-by: iklam
2022-09-30 08:44:10 +00:00
Albert Mingkun Yang
6974978869 8294521: Parallel: Remove unused field in UpdateDensePrefixAndCompactionTask
Reviewed-by: kbarrett, tschatzl
2022-09-30 07:43:21 +00:00
Albert Mingkun Yang
81fda1b756 8294569: Remove CardTable::_last_valid_index
Reviewed-by: tschatzl, kbarrett
2022-09-30 07:42:27 +00:00
Dingli Zhang
7c60e6d2d6 8293770: RISC-V: Reuse runtime call trampolines
Co-authored-by: zifeihan <caogui@iscas.ac.cn>
Reviewed-by: fyang, shade
2022-09-30 07:31:57 +00:00
Daniel Jeliński
9dce8652f2 8294115: JNI local refs exceeds capacity warning in NetworkInterface::getAll
Reviewed-by: dfuchs
2022-09-30 06:00:37 +00:00
Viktor Klang
b030c7de32 8225235: Unused field defaultIndex in NetworkInterface
Reviewed-by: chegar, vtewari, dfuchs, jpai
2022-09-30 03:06:36 +00:00
Brian Burkhalter
a07975bf3e 8294519: (fs) java/nio/file/Files/CopyProcFile.java fails intermittenly due to unstable /proc/cpuinfo output
Reviewed-by: alanb, shade, lancea
2022-09-29 21:06:49 +00:00
Matias Saavedra Silva
88062eea67 8293969: breakup the long signature in SystemDictionaryShared::is_supported_invokedynamic
Reviewed-by: eastigeevich, coleenp
2022-09-29 20:16:30 +00:00
Aleksei Voitylov
aeef3ecdc4 8294198: Implement isFinite intrinsic for RISC-V
Reviewed-by: fyang, kvn
2022-09-29 18:51:38 +00:00
Chris Plummer
5f6ad926d7 8294547: HotSpotAgent.setupVM() should include "cause" exception when throwing DebuggerException
Reviewed-by: sspitsyn, coleenp
2022-09-29 18:31:10 +00:00
Chris Plummer
545ded1a82 8294548: Problem list SA core file tests on macosx-x64 due to JDK-8294316
Reviewed-by: sspitsyn
2022-09-29 18:30:20 +00:00
Alexander Zvegintsev
29c70f1ab7 8294595: Add javax/swing/plaf/aqua/CustomComboBoxFocusTest.java to problem list
Reviewed-by: rriggs
2022-09-29 16:32:47 +00:00
Patricio Chilano Mateo
5d48da4574 8294370: Fix allocation bug in java_lang_Thread::async_get_stack_trace()
Reviewed-by: dholmes, sspitsyn
2022-09-29 15:35:41 +00:00
Raffaello Giulietti
ce85cac947 8065554: MatchResult should provide values of named-capturing groups
Reviewed-by: smarks
2022-09-29 09:16:21 +00:00
Xiaolin Zheng
1decdcee71 8294492: RISC-V: Use li instead of patchable movptr at non-patchable callsites
Reviewed-by: fyang
2022-09-29 07:21:07 +00:00
Brian Burkhalter
8491fd5c12 8294551: Put java/io/BufferedInputStream/TransferTo.java on problem list
Reviewed-by: jpai
2022-09-29 00:35:14 +00:00
Dean Long
6f8f28e756 8294160: misc crash dump improvements
Reviewed-by: dholmes, vlivanov
2022-09-28 23:15:04 +00:00
Matias Saavedra Silva
8873192433 8293515: heapShared.cpp: rename JavaThread parameter to current
Reviewed-by: coleenp, ccheung
2022-09-28 21:27:05 +00:00
Chris Plummer
76f1865124 8293563: [macos-aarch64] SA core file tests failing with sun.jvm.hotspot.oops.UnknownOopException
Reviewed-by: sspitsyn, kevinw
2022-09-28 20:35:33 +00:00
Lance Andersen
9db95edd01 8215788: Clarify JarInputStream Manifest access
Reviewed-by: weijun, mullan, alanb
2022-09-28 19:22:19 +00:00
Andrey Turbanov
9309786dbf 8294472: Remove redundant rawtypes suppression in AbstractChronology
Reviewed-by: lancea, naoto
2022-09-28 18:44:01 +00:00
Chris Plummer
3b7fc80b18 8294411: SA should provide more useful info when it fails to start up due to "failed to workaround classshareing"
Reviewed-by: kevinw, sspitsyn
2022-09-28 17:17:12 +00:00
Matias Saavedra Silva
4fb424ba5f 8293961: Unused ClassPathZipEntry::contents_do
Reviewed-by: ccheung, dholmes
2022-09-28 15:59:49 +00:00
Markus Karg
7515b304ca 8279283: BufferedInputStream should override transferTo
Reviewed-by: bpb
2022-09-28 15:58:25 +00:00
Albert Mingkun Yang
7401fe040d 8292912: Make guard card in CardTable inaccessible
Reviewed-by: tschatzl, sjohanss
2022-09-28 15:57:08 +00:00
Aleksey Shipilev
70d8428ebb 8294520: Problemlist java/nio/file/Files/CopyProcFile.java
Reviewed-by: alanb
2022-09-28 14:33:12 +00:00
Tobias Holenstein
30e3bf9da0 8291805: IGV: Improve Zooming
Reviewed-by: rcastanedalo, lujaniuk, chagedorn
2022-09-28 14:31:22 +00:00
Alan Bateman
37f83b9b8e 8294375: test/jdk/java/nio/channels/vthread/BlockingChannelOps.java is slow
Reviewed-by: jpai
2022-09-28 13:10:43 +00:00
Albert Mingkun Yang
60616f243f 8294059: Serial: Refactor GenCollectedHeap::collect
Reviewed-by: sjohanss, tschatzl
2022-09-28 10:36:00 +00:00
Hao Sun
ea6167104e 8294359: Interpreter(AArch64) intrinsify Thread.currentThread()
Reviewed-by: aph, shade
2022-09-28 10:03:37 +00:00
Prasanta Sadhukhan
c42ef70a45 7148092: [macosx] When Alt+down arrow key is pressed, the combobox popup does not appear.
Reviewed-by: prr, serb
2022-09-28 08:50:58 +00:00
Albert Mingkun Yang
94e14da0ef 8294057: Parallel: Tighten ParallelCompactData::initialize_region_data
Reviewed-by: tschatzl, sjohanss
2022-09-28 08:27:35 +00:00
Roland Westrelin
1ea0d6b424 8292301: [REDO v2] C2 crash when allocating array of size too large
Reviewed-by: xliu, thartmann, kvn
2022-09-28 07:16:59 +00:00
KIRIYAMA Takuya
c13e0ef3f8 8292848: AWT_Mixing and TrayIcon tests fail on el8 with hard-coded isOel7
Reviewed-by: prr, serb
2022-09-28 07:00:38 +00:00
Serguei Spitsyn
79ccc791f2 8293613: need to properly handle and hide tmp VTMS transitions
Reviewed-by: cjplummer, lmesnik
2022-09-28 04:44:43 +00:00
Weijun Wang
5e1e449c11 8290920: sspi_bridge.dll not built if BUILD_CRYPTO is false
Reviewed-by: valeriep, erikj, ihse, wetmore
2022-09-28 01:27:57 +00:00
Fei Yang
d827fd830a 8294430: RISC-V: Small refactoring for movptr_with_offset
Reviewed-by: fjiang, yadongwang, shade
2022-09-28 00:22:16 +00:00
AJ Ferguson
9d76ac8a44 8292158: AES-CTR cipher state corruption with AVX-512
Reviewed-by: kvn, svkamath, sviswanathan
2022-09-28 00:12:23 +00:00
David Holmes
e5b65c40ea 8290482: Update JNI Specification of DestroyJavaVM for better alignment with JLS, JVMS, and Java SE API Specifications
Reviewed-by: rehn, coleenp
2022-09-27 23:57:32 +00:00
Leonid Mesnik
f8d9fa8873 8294483: Remove vmTestbase/nsk/jvmti/GetThreadState tests.
Reviewed-by: kvn, dholmes
2022-09-27 22:47:01 +00:00
Chris Plummer
6ad151d096 8293143: Workaround for JDK-8292217 when doing "step over" of bytecode with unresolved cp reference
Reviewed-by: sspitsyn, amenkov
2022-09-27 21:20:41 +00:00
Jonathan Gibbons
22b59b66d9 8294471: SpecTaglet is inconsistent with SpecTree for inline property
Reviewed-by: prappo
2022-09-27 21:18:12 +00:00
David Holmes
763d4bf074 8293592: Remove JVM_StopThread, stillborn, and related cleanup
Reviewed-by: alanb, sspitsyn, rehn, coleenp
2022-09-27 21:03:50 +00:00
Gerard Ziemski
739fdec7ea 8289162: runtime/NMT/ThreadedMallocTestType.java should print out memory allocations to help debug
Reviewed-by: hseigel, coleenp
2022-09-27 16:27:32 +00:00
KIRIYAMA Takuya
a11477ce25 8289797: tools/launcher/I18NArgTest.java fails on Japanese Windows environment
Reviewed-by: naoto
2022-09-27 16:03:33 +00:00
Naoto Sato
71511283ce 8294317: Insufficient build rules for tzdb.dat
Reviewed-by: joehw, erikj
2022-09-27 16:01:47 +00:00
Joshua Cao
fb4979c05b 8290401: Support dump all phases and print nodes in ascending order of index
Reviewed-by: chagedorn, xliu
2022-09-27 15:52:22 +00:00
Matias Saavedra Silva
112ca2b863 8293964: Unused check_for_duplicates parameter in ClassLoaderExt::process_jar_manifest
Reviewed-by: ccheung, dholmes
2022-09-27 15:39:31 +00:00
Darragh Clarke
99017b06bf 8293064: Remove unused NET_xxx functions
Reviewed-by: chegar, djelinski, aefimov, vtewari
2022-09-27 15:01:03 +00:00
Andrey Turbanov
3419363e89 8294361: Cleanup usages of StringBuffer in SQLOutputImpl
Reviewed-by: rriggs, lancea
2022-09-27 13:16:59 +00:00
Alan Bateman
1abf971b93 8249627: Degrade Thread.suspend and Thread.resume
Reviewed-by: cjplummer, sspitsyn, dholmes, jpai
2022-09-27 11:43:59 +00:00
Doug Lea
bc12e9553d 8292969: Bad Thread Utilization in ForkJoinPool
Reviewed-by: shade, alanb
2022-09-27 10:50:18 +00:00
Emanuel Peter
dd51f7e0b7 8293996: C2: fix and simplify IdealLoopTree::do_remove_empty_loop
Reviewed-by: roland, thartmann, chagedorn
2022-09-27 08:52:19 +00:00
Martin Doerr
14c6ac457d 8293998: [PPC64] JfrGetCallTrace: assert(_pc != nullptr) failed: must have PC
Reviewed-by: shade, lucy
2022-09-27 07:54:13 +00:00
Hao Sun
02ea338177 8293887: AArch64 build failure with GCC 12 due to maybe-uninitialized warning in libfdlibm k_rem_pio2.c
Reviewed-by: erikj, shade, ihse
2022-09-27 03:09:18 +00:00
Leonid Mesnik
49a7347ba5 8294408: Problemlist runtime/handshake/HandshakeSuspendExitTest.java
Reviewed-by: dholmes
2022-09-27 01:45:36 +00:00
Fei Gao
aa48705ddd 8289422: Fix and re-enable vector conditional move
Reviewed-by: thartmann, kvn
2022-09-27 01:24:17 +00:00
David Holmes
1ddc92fef5 8294404: [BACKOUT] JDK-8294142: make test should report only executed tests
Reviewed-by: jjg
2022-09-27 00:58:44 +00:00
Alexander Matveev
1e222bccd3 8293462: [macos] app image signature invalid when creating DMG or PKG from post processed signed image
Reviewed-by: asemenyuk
2022-09-26 22:48:25 +00:00
Justin Lu
43eff2b309 8272687: Replace StringBuffer with StringBuilder in RuleBasedCollator
Reviewed-by: lancea, naoto, bchristi, bpb
2022-09-26 22:31:51 +00:00
Jonathan Gibbons
b88ee1ee22 6251738: Want a top-level summary page that itemizes all spec documents referenced from javadocs (OEM spec)
Reviewed-by: hannesw
2022-09-26 21:28:39 +00:00
Alexandre Iline
aca4276e89 8294379: Missing comma after copyright year
Reviewed-by: kcr, azvegint, prr
2022-09-26 19:27:46 +00:00
Alexandre Iline
1f521a1204 8225012: sanity/client/SwingSet/src/ToolTipDemoTest.java fails on Windows
Reviewed-by: serb
2022-09-26 18:03:00 +00:00
Roger Riggs
5ae6bc23e8 8234262: Unmask SIGQUIT in a child process
Reviewed-by: bpb, dholmes, vtewari, stuefe, alanb
2022-09-26 15:55:22 +00:00
Raffaello Giulietti
968af74de4 8293567: AbstractSplittableWithBrineGenerator: salt has digits that duplicate the marker
Reviewed-by: jlaskey
2022-09-26 15:47:18 +00:00
Aleksey Shipilev
36b61c5d7e 8293872: Make runtime/Thread/ThreadCountLimit.java more robust
Reviewed-by: dholmes, adinn
2022-09-26 12:44:04 +00:00
Prasanta Sadhukhan
2be315877b 4797982: Setting negative size of JSplitPane divider leads to unexpected results.
Reviewed-by: azvegint, prr
2022-09-26 11:00:38 +00:00
Johan Sjölen
050eebf2e8 8294245: Make Compile::print_inlining_stream stack allocated
Reviewed-by: kvn, rehn
2022-09-26 10:50:43 +00:00
Aleksey Shipilev
91a23d775f 8294142: make test should report only on executed tests
Reviewed-by: ihse, djelinski, erikj
2022-09-26 08:30:45 +00:00
Jaikiran Pai
169a5d48af 8294193: Files.createDirectories throws FileAlreadyExistsException for a symbolic link whose target is an existing directory
Reviewed-by: alanb
2022-09-26 05:16:31 +00:00
Ashutosh Mehra
3675f4c2af 8293252: Shenandoah: ThreadMXBean synchronizer tests crash with aggressive heuristics
Reviewed-by: wkemper, rkennke, heidinga, phh
2022-09-23 18:52:49 +00:00
Leonid Mesnik
543851db92 8289607: Change hotspot/jtreg tests to not use Thread.suspend/resume
Reviewed-by: sspitsyn, cjplummer
2022-09-23 17:44:57 +00:00
Quan Anh Mai
e2f8251490 8293618: x86: Wrong code generation in class Assembler
Reviewed-by: kvn, thartmann
2022-09-23 17:12:48 +00:00
Aleksey Shipilev
6ecd08172b 8294270: make test passes awkward -status:-status:error,fail to jtreg
Reviewed-by: djelinski, erikj, ihse
2022-09-23 16:27:07 +00:00
Harshitha Onkar
eca9749da0 8288325: [windows] Actual and Preferred Size of AWT Non-resizable frame are different
Reviewed-by: kizune, aivanov, tr
2022-09-23 16:24:52 +00:00
Jie Fu
2e20e7ec0f 8294271: Remove use of ThreadDeath from make utilities
Reviewed-by: ihse, shade, alanb
2022-09-23 13:54:23 +00:00
Magnus Ihse Bursie
e45f3d5176 8294281: Allow warnings to be disabled on a per-file basis
Reviewed-by: erikj
2022-09-23 13:39:56 +00:00
Xiaolin Zheng
664e5b1d2e 8294187: RISC-V: Unify all relocations for the backend into AbstractAssembler::relocate()
Reviewed-by: fjiang, yadongwang, fyang
2022-09-23 13:15:44 +00:00
Fredrik Bredberg
acd75e0f1c 8294053: Unneeded local variable in handle_safefetch()
Reviewed-by: rehn, stuefe, shade
2022-09-23 12:34:06 +00:00
Aleksey Shipilev
0b56b82243 8293991: java/lang/Float/Binary16ConversionNaN.java fails on silent NaN conversions
Reviewed-by: darcy
2022-09-23 09:03:18 +00:00
Alan Bateman
acd5bcfc88 8289610: Degrade Thread.stop
Reviewed-by: rriggs, cjplummer, jpai, mchung, prr, mullan
2022-09-23 07:55:29 +00:00
Aleksey Shipilev
05c8cabdad 8293532: Use lighter jmod compression levels in build config
Reviewed-by: ihse
2022-09-23 07:38:13 +00:00
Roberto Castañeda Lozano
eec992c6b0 8292602: ZGC: C2 late barrier analysis uses invalid dominator information
Co-authored-by: Nils Eliasson <neliasso@openjdk.org>
Reviewed-by: kvn, thartmann
2022-09-23 07:25:07 +00:00
Jaikiran Pai
f6d78cda85 8293657: sun/management/jmxremote/bootstrap/RmiBootstrapTest.java#id1 failed with "SSLHandshakeException: Remote host terminated the handshake"
Reviewed-by: kevinw, dfuchs
2022-09-23 04:54:39 +00:00
Fei Gao
a4dc035a97 8290910: Wrong memory state is picked in SuperWord::co_locate_pack()
Reviewed-by: chagedorn, kvn
2022-09-23 01:26:21 +00:00
Fei Yang
f3ba332fdc 8294183: AArch64: Wrong macro check in SharedRuntime::generate_deopt_blob
Reviewed-by: dlong, shade
2022-09-23 01:09:51 +00:00
lawrence.andrews
df53fa752a 8292328: AccessibleActionsTest.java test instruction for show popup on JLabel did not specify shift key
Reviewed-by: serb, aivanov
2022-09-22 20:15:28 +00:00
Xin Liu
5285035ed9 8294075: gtest/AsyncLogGtest crashes with SEGV
Reviewed-by: dholmes, shade
2022-09-22 16:37:42 +00:00
Xin Liu
696287d6e8 8294037: Using alias template to unify hashtables in AsyncLogWriter
Reviewed-by: coleenp, simonis
2022-09-22 16:36:01 +00:00
Brian Burkhalter
48cc15602b 8293331: Refactor FileDispatcherImpl into operating system-specific components
Reviewed-by: alanb
2022-09-22 15:59:05 +00:00
Aleksey Shipilev
f751e6087d 8294197: Zero: JVM_handle_linux_signal should not assume deopt NOPs
Reviewed-by: coleenp
2022-09-22 14:51:12 +00:00
Aleksey Shipilev
4a6060ba2c 8294190: Incorrect check messages in SharedRuntime::generate_uncommon_trap_blob
Reviewed-by: thartmann, dlong
2022-09-22 14:49:55 +00:00
Jan Lahoda
0be2b2c2f1 8292756: java.lang.AssertionError at at jdk.compiler/com.sun.tools.javac.code.Scope$ScopeImpl.leave(Scope.java:386)
Reviewed-by: vromero
2022-09-22 14:33:07 +00:00
Sean Coffey
bc2af47e1e 8254711: Add java.security.Provider.getService JFR Event
Reviewed-by: mullan, valeriep, jpai
2022-09-22 13:53:15 +00:00
Stefan Karlsson
d781ab09f7 8294003: Don't handle si_addr == 0 && si_code == SI_KERNEL SIGSEGVs
Reviewed-by: dholmes, shade, dlong
2022-09-22 12:35:15 +00:00
Xiaolin Zheng
a216960d71 8294087: RISC-V: RVC: Fix a potential alignment issue and add more alignment assertions for the patchable calls/nops
Reviewed-by: shade, fjiang, fyang
2022-09-22 11:43:47 +00:00
Nick Gasson
3fa6778ab2 8292296: Use multiple threads to process ParallelGC deferred updates
Reviewed-by: tschatzl, ayang
2022-09-22 10:16:28 +00:00
Jaikiran Pai
800e68d690 8292044: HttpClient doesn't handle 102 or 103 properly
Reviewed-by: dfuchs, chegar, michaelm
2022-09-22 09:18:22 +00:00
Emanuel Peter
83abfa5d82 8255670: Improve C2's detection of modified nodes
Reviewed-by: kvn, thartmann, roland
2022-09-22 07:44:50 +00:00
Abhishek Kumar
5652030f16 8292376: A few Swing methods use inheritDoc on exceptions which are not inherited
Reviewed-by: prr, tr
2022-09-22 07:38:14 +00:00
Matthias Baesken
03f287d4ad 8293995: Problem list sun/tools/jstatd/TestJstatdRmiPort.java on all platforms because of 8293577
Reviewed-by: clanger
2022-09-22 07:20:51 +00:00
Xiaolin Zheng
d5bee4a0df 8294086: RISC-V: Cleanup InstructionMark usages in the backend
Reviewed-by: fjiang, fyang
2022-09-22 03:48:06 +00:00
Calvin Cheung
47f233acec 8292202: modules_do is called without Module_lock
Reviewed-by: iklam, coleenp
2022-09-22 03:37:23 +00:00
Feilong Jiang
742bc041ea 8294100: RISC-V: Move rt_call and xxx_move from SharedRuntime to MacroAssembler
Reviewed-by: shade, fyang
2022-09-22 00:58:31 +00:00
Claes Redestad
2283c3244f 8294149: JMH 1.34 and later requires jopt-simple 5.0.4
Reviewed-by: erikj
2022-09-21 22:17:50 +00:00
Adam Sotona
9f90eb0524 8294062: Improve parsing performance of j.l.c.MethodTypeDesc
Reviewed-by: psandoz
2022-09-21 18:02:37 +00:00
Thomas Stuefe
c6be2cd347 8293156: Dcmd VM.classloaders fails to print the full hierarchy
Reviewed-by: dholmes, cjplummer
2022-09-21 17:07:41 +00:00
Alexey Ivanov
711e2520ad 8294039: Remove "Classpath" exception from java/awt tests
Reviewed-by: dmarkov, iris
2022-09-21 17:01:39 +00:00
Alexey Ivanov
27b8e2f49e 8294038: Remove "Classpath" exception from javax/swing tests
Reviewed-by: dmarkov, iris
2022-09-21 17:00:40 +00:00
Brian Burkhalter
e1958971c9 8294068: Unconditional and eager load of nio library since JDK-8264744
Reviewed-by: alanb, redestad
2022-09-21 14:51:21 +00:00
Ashutosh Mehra
84d7ff64d8 8288129: Shenandoah: Skynet test crashed with iu + aggressive
Reviewed-by: eosterlund, rkennke
2022-09-21 14:28:02 +00:00
Jie Fu
07afa3f41e 8294110: compiler/uncommontrap/Decompile.java fails after JDK-8293798
Reviewed-by: shade, thartmann
2022-09-21 13:10:10 +00:00
Fei Yang
0746bcb68f 8294083: RISC-V: Minimal build failed with --disable-precompiled-headers
Reviewed-by: fjiang, yadongwang, shade
2022-09-21 12:57:09 +00:00
Jan Lahoda
95ec2eaca3 8293897: Synthetic final modifier is part of the AST for a try-with-resource resource
Reviewed-by: sundar
2022-09-21 12:29:40 +00:00
Thomas Stuefe
d14e96d970 8293493: Signal Handlers printout should show signal block state
Reviewed-by: dholmes, jsjolen
2022-09-21 12:06:57 +00:00
Matthias Baesken
da4fdfbbf4 8293659: Improve UnsatisfiedLinkError error message to include dlopen error details
Reviewed-by: mchung, lucy
2022-09-21 11:32:24 +00:00
Jan Lahoda
cd1cdcdb0d 8293116: Incremental JDK build could be sped up
Reviewed-by: erikj, vromero, ihse
2022-09-21 10:27:58 +00:00
Tobias Holenstein
e9401e67b3 8293364: IGV: Refactor Action in EditorTopComponent and fix minor bugs
Reviewed-by: rcastanedalo, chagedorn
2022-09-21 09:37:26 +00:00
John Neffenger
844a95b907 8292892: Javadoc index descriptions are not deterministic
Reviewed-by: jjg
2022-09-21 08:45:38 +00:00
Magnus Ihse Bursie
8d1dd6a6cf 8294076: Improve ant detection in idea.sh
Reviewed-by: erikj
2022-09-21 08:22:47 +00:00
Tobias Holenstein
4e7cb156c8 8293480: IGV: Update Bytecode and ControlFlow Component immediately when opening a new graph
Reviewed-by: rcastanedalo, chagedorn
2022-09-21 08:08:13 +00:00
Thomas Schatzl
8ecdaa6811 8294000: Filler array klass should be in jdk/vm/internal, not in java/vm/internal
Reviewed-by: shade, dholmes
2022-09-21 07:58:07 +00:00
Emanuel Peter
379f3094db 8287217: C2: PhaseCCP: remove not visited nodes, prevent type inconsistency
Reviewed-by: roland, chagedorn, thartmann
2022-09-21 07:22:28 +00:00
Emanuel Peter
12e3510f63 8293798: Fix test bugs due to incompatibility with -XX:+AlwaysIncrementalInline
Reviewed-by: kvn, thartmann, chagedorn
2022-09-21 07:21:27 +00:00
casparcwang
cb72f80925 8293978: Duplicate simple loop back-edge will crash the vm
Reviewed-by: roland, chagedorn
2022-09-21 06:24:19 +00:00
Aleksey Shipilev
cddd6def9f 8279941: sun/security/pkcs11/Signature/TestDSAKeyLength.java fails when NSS version detection fails
Reviewed-by: valeriep
2022-09-20 20:11:45 +00:00
Alex Menkov
21008cad46 8285383: vmTestbase/nsk/jvmti/scenarios/hotswap/HS204/hs204t001/hs204t001.java failed with "exit code: 96"
Reviewed-by: dcubed, lmesnik, sspitsyn
2022-09-20 18:18:39 +00:00
Damon Nguyen
3b438a68ea 8294067: [macOS] javax/swing/JComboBox/6559152/bug6559152.java Cannot select an item from popup with the ENTER key.
Reviewed-by: azvegint, psadhukhan
2022-09-20 18:15:13 +00:00
Ruprabhu25
caae53f4da 8289508: Improve test coverage for XPath Axes: ancestor, ancestor-or-self, preceding, and preceding-sibling
Reviewed-by: joehw
2022-09-20 17:35:26 +00:00
Julian Waters
cb5771dc2a 8294006: Avoid hardcoding object file suffixes in make
Reviewed-by: erikj, ihse
2022-09-20 17:23:49 +00:00
Paul Hohensee
5002eaa5cc 8293828: JFR: jfr/event/oldobject/TestClassLoaderLeak.java still fails when GC cycles are not happening
Reviewed-by: tschatzl
2022-09-20 17:12:51 +00:00
Naoto Sato
e3358e77f5 8294008: Grapheme implementation of setText() throws IndexOutOfBoundsException
Reviewed-by: joehw, smarks
2022-09-20 16:46:18 +00:00
Prasanta Sadhukhan
df8ec09f8d 8294046: Newly added test test/jdk/javax/swing/JTabbedPane/TestNPEStateChgListener.java fails in macos
Reviewed-by: azvegint, prr
2022-09-20 15:21:34 +00:00
Vladimir Kempik
09af637a9b 8294012: RISC-V: get/put_native_u8 missing the case when address&7 is 6
Reviewed-by: shade, fyang
2022-09-20 14:58:28 +00:00
Claes Redestad
584de68d78 8294058: Early use of lambda introduced in JDK-8285263 cause startup regressions in 20-b02
Reviewed-by: mullan
2022-09-20 14:50:33 +00:00
Julian Waters
bb422f5c14 8293595: tstrings::any() is missing an overload
Reviewed-by: asemenyuk, almatvee
2022-09-20 13:04:35 +00:00
Julian Waters
0f28cb06ab 8294014: Remove redundant UseCompiler conditions
Reviewed-by: kvn, thartmann
2022-09-20 12:22:18 +00:00
Yanhong Zhu
84ee1a291c 8293781: RISC-V: Clarify types of calls
Reviewed-by: fjiang, fyang, yadongwang
2022-09-20 12:12:35 +00:00
Robbin Ehn
1b496064bf 8293922: Extend barrier-less Java thread transitions to native transitions
Reviewed-by: mdoerr, pchilanomate, dcubed
2022-09-20 08:41:39 +00:00
Quan Anh Mai
a07902bcbe 8293976: Use unsigned integers in Assembler/CodeBuffer::emit_int*
Reviewed-by: kvn, jbhateja
2022-09-20 08:39:01 +00:00
Doug Simon
fe541f05cc 8293989: [JVMCI] re-use cleared oop handles
Reviewed-by: never
2022-09-20 07:55:22 +00:00
Adam Sotona
0fa7d9e8cd 8278863: Add method ClassDesc::ofInternalName
Reviewed-by: jvernee
2022-09-20 07:50:03 +00:00
Albert Mingkun Yang
4020ed53dd 8293210: G1: Remove redundant check in G1FreeHumongousRegionClosure
Reviewed-by: tschatzl, kbarrett
2022-09-19 18:05:28 +00:00
Doug Simon
8ff2c2639e 8293942: [JVMCI] data section entries must be 4-byte aligned on AArch64
Reviewed-by: never
2022-09-19 16:30:48 +00:00
Brian Burkhalter
6e23b43220 8293502: (fc) FileChannel::transfer methods fail to copy /proc files on Linux
Reviewed-by: alanb
2022-09-19 15:57:06 +00:00
Sean Coffey
1f9ff41312 8292297: Fix up loading of override java.security properties file
Reviewed-by: xuelei
2022-09-19 15:21:46 +00:00
Alexey Ivanov
64b96e5cf5 8293811: Provide a reason for PassFailJFrame.forceFail
Reviewed-by: honkar, jdv
2022-09-19 14:22:36 +00:00
Erik Joelsson
f91762f56e 8293965: Code signing warnings after JDK-8293550
Reviewed-by: mikael, ihse
2022-09-19 12:36:14 +00:00
Damon Nguyen
8082c24a0d 8054572: [macosx] JComboBox paints the border incorrectly
Reviewed-by: honkar, psadhukhan
2022-09-19 11:33:25 +00:00
Abhishek Kumar
b920d2999f 8271328: User is able to choose the color after disabling the color chooser.
Reviewed-by: psadhukhan, tr
2022-09-19 11:30:47 +00:00
Andrey Turbanov
5725a93c07 8293879: Remove unnecessary castings in jdk.hotspot.agent
Reviewed-by: lmesnik, cjplummer
2022-09-19 10:58:46 +00:00
Prasanta Sadhukhan
ab7f58a377 6286501: JTabbedPane throws NPE from its stateChanged listener in particular case
Reviewed-by: jdv
2022-09-19 10:25:21 +00:00
Christian Hagedorn
d41f69f9c0 8293849: PrintIdealPhase in compiler directives file is ignored when used with other compile commands
Reviewed-by: rcastanedalo, kvn
2022-09-19 10:16:21 +00:00
Christian Hagedorn
471e2f12b4 8292088: C2: assert(is_OuterStripMinedLoop()) failed: invalid node class: IfTrue
Reviewed-by: roland, kvn
2022-09-19 10:15:18 +00:00
Albert Mingkun Yang
a93cf92635 8293920: G1: Add index based heap region iteration
Reviewed-by: tschatzl, kbarrett
2022-09-19 09:52:10 +00:00
Matthias Baesken
36c9034ff1 8293808: mscapi destroyKeyContainer enhance KeyStoreException: Access is denied exception
Reviewed-by: weijun
2022-09-19 07:39:02 +00:00
Aleksey Shipilev
cbd0688b32 8293851: hs_err should print more stack in hex dump
Reviewed-by: adinn, stefank
2022-09-19 07:38:06 +00:00
Thomas Schatzl
04d7b7d574 8293503: gc/metaspace/TestMetaspacePerfCounters.java#Epsilon-64 failed assertGreaterThanOrEqual: expected MMM >= NNN
Reviewed-by: lkorinth, kbarrett
2022-09-19 07:34:14 +00:00
Thomas Schatzl
d77c464c38 8293891: gc/g1/mixedgc/TestOldGenCollectionUsage.java (still) assumes that GCs take 1ms minimum
Reviewed-by: ayang, kbarrett
2022-09-19 07:33:14 +00:00
Thomas Schatzl
d7c1a7635d 8293861: G1: Disable preventive GCs by default
Reviewed-by: ayang, kbarrett, mbeckwit
2022-09-19 07:29:01 +00:00
Aleksey Shipilev
43f7f47ae0 8293499: Provide jmod --compress option
Reviewed-by: alanb, mchung, jpai, redestad
2022-09-19 06:19:53 +00:00
Aleksey Shipilev
26e08cf3d0 8293844: C2: Verify Location::{oop,normal} types in PhaseOutput::FillLocArray
Reviewed-by: kvn, dlong
2022-09-19 06:18:55 +00:00
Aleksey Shipilev
357a2cc22a 8293937: x86: Drop LP64 conditions from clearly x86_32 code
Reviewed-by: kvn, stuefe
2022-09-19 06:17:24 +00:00
Thomas Stuefe
b1ed40a87a 8293466: libjsig should ignore non-modifying sigaction calls
Reviewed-by: manc, dholmes
2022-09-19 05:38:09 +00:00
Thomas Stuefe
b6ff8fa307 8292073: NMT: remove unused constructor parameter from MallocHeader
Reviewed-by: zgu
2022-09-18 12:44:53 +00:00
Kevin Walls
cfd44bb2cd 8293218: serviceability/tmtools/jstat/GcNewTest.java fails with "Error in the percent calculation"
8293564: serviceability/tmtools/jstat/GcTest01.java fails with "Error in the percent calculation"

Reviewed-by: sspitsyn, lmesnik, dcubed
2022-09-17 09:55:51 +00:00
Quan Anh Mai
01e7b88199 8290917: x86: Memory-operand arithmetic instructions have too low costs
Reviewed-by: kvn, sviswanathan, jbhateja
2022-09-16 20:07:59 +00:00
Johan Sjölen
4b8399b5f0 8293251: Use stringStream::base() instead of as_string() when applicable
Reviewed-by: rehn
2022-09-16 19:54:35 +00:00
Lance Andersen
a8f0f575ab 8278165: Clarify that ZipInputStream does not access the CEN fields for a ZipEntry
Reviewed-by: bpb, alanb
2022-09-16 18:52:25 +00:00
Vladimir Ivanov
746f5f589d 8293816: CI: ciBytecodeStream::get_klass() is not consistent
Reviewed-by: dlong, kvn
2022-09-16 17:57:03 +00:00
Joe Darcy
4b297c1c16 8293892: Add links to JVMS 19 and 20 from ClassFileFormatVersion enum constants
Reviewed-by: sundar, mchung
2022-09-16 16:53:20 +00:00
Leslie Zhai
dfb9c06633 8293535: jdk/javadoc/doclet/testJavaFX/TestJavaFxMode.java fail with jfx
Reviewed-by: jjg
2022-09-16 14:53:30 +00:00
Erik Joelsson
f42caefe2e 8293550: Optionally add get-task-allow entitlement to macos binaries
Reviewed-by: mikael, cjplummer, ihse
2022-09-16 12:33:32 +00:00
Feilong Jiang
5feca688df 8293840: RISC-V: Remove cbuf parameter from far_call/far_jump/trampoline_call
Reviewed-by: fyang
2022-09-16 11:40:31 +00:00
Jan Lahoda
39cd1635bf 8293578: Duplicate ldc generated by javac
Reviewed-by: mcimadamore
2022-09-16 11:37:45 +00:00
Aleksei Efimov
7765942aee 8290367: Update default value and extend the scope of com.sun.jndi.ldap.object.trustSerialData system property
Reviewed-by: dfuchs, jpai
2022-09-16 10:04:51 +00:00
Daniel Fuchs
11e7d53b23 8293819: sun/util/logging/PlatformLoggerTest.java failed with "RuntimeException: Retrieved backing PlatformLogger level null is not the expected CONFIG"
Reviewed-by: jpai
2022-09-16 09:12:28 +00:00
Prasanta Sadhukhan
141d5f5dee 8293767: AWT test TestSinhalaChar.java has old SCCS markings
Reviewed-by: iris
2022-09-16 07:58:00 +00:00
Xiaohong Gong
3beca2db07 8291600: [vectorapi] vector cast op check is not always needed for vector mask cast
Co-authored-by: Quan Anh Mai <qamai@openjdk.org>
Reviewed-by: jiefu, eliu, jbhateja
2022-09-16 01:26:11 +00:00
Man Cao
9a40b76ac5 8293842: IPv6-only systems throws UnsupportedOperationException for several socket/TCP options
Co-authored-by: Martin Buchholz <martin@openjdk.org>
Reviewed-by: djelinski, dfuchs
2022-09-15 22:06:18 +00:00
Kevin Walls
bb9aa4eae6 8293813: ProblemList com/sun/jdi/JdbLastErrorTest.java on windows-x64 in Xcomp mode
Reviewed-by: dcubed
2022-09-15 21:04:52 +00:00
Mark Powers
4cec141a90 8291509: Minor cleanup could be done in sun.security
Reviewed-by: weijun
2022-09-15 19:59:53 +00:00
Daniel D. Daugherty
6beeb8471c 8293875: ProblemList sun/management/jmxremote/bootstrap/RmiBootstrapTest.java#id1 on linux-x64
Reviewed-by: bpb
2022-09-15 19:38:52 +00:00
Xin Liu
bf79f99c0c 8292989: Avoid dynamic memory in AsyncLogWriter
Reviewed-by: jsjolen, stuefe
2022-09-15 18:32:21 +00:00
Leonid Mesnik
2028ec7412 8289608: Change com/sun/jdi tests to not use Thread.suspend/resume
Reviewed-by: cjplummer, sspitsyn, alanb, dcubed
2022-09-15 17:25:48 +00:00
Xue-Lei Andrew Fan
ecb456ae29 8293779: redundant checking in AESCrypt.makeSessionKey() method
Reviewed-by: djelinski, hchao, mullan
2022-09-15 15:06:27 +00:00
Coleen Phillimore
6fca9ae047 8288474: Move EventContinuationFreezeOld from try_freeze_fast to freeze_slow
Reviewed-by: rpressler, pchilanomate
2022-09-15 12:11:08 +00:00
Jan Lahoda
fbd8b42d70 8293591: Remove use of Thread.stop from jshell tests
Reviewed-by: alanb
2022-09-15 11:27:15 +00:00
Adam Sotona
aff5ff14b2 8244681: Add a warning for possibly lossy conversion in compound assignments
8293797: Release Note: Javac warns about type casts in compound assignments with possible lossy conversions

Reviewed-by: erikj, prr
2022-09-15 10:10:23 +00:00
Thomas Schatzl
15cb1fb788 8256265: G1: Improve parallelism in regions that failed evacuation
Co-authored-by: Hamlin Li <mli@openjdk.org>
Co-authored-by: Albert Mingkun Yang <ayang@openjdk.org>
Reviewed-by: sjohanss, ayang
2022-09-15 09:57:16 +00:00
Aleksei Voitylov
b31a03c60a 8293695: Implement isInfinite intrinsic for RISC-V
Reviewed-by: yadongwang, fyang, dsamersoff
2022-09-15 09:45:03 +00:00
casparcwang
8f3bbe950f 8293472: Incorrect container resource limit detection if manual cgroup fs mounts present
Reviewed-by: sgehwolf, iklam
2022-09-15 08:47:05 +00:00
Stanimir Stamenkov
1caba0f13c 8292948: JEditorPane ignores font-size styles in external linked css-file
Reviewed-by: psadhukhan
2022-09-15 08:16:28 +00:00
Hao Sun
eeb625e709 8290169: adlc: Improve child constraints for vector unary operations
Reviewed-by: eliu, xgong, sviswanathan
2022-09-15 01:38:10 +00:00
Zdenek Zambersky
2057070eb0 8293815: P11PSSSignature.engineUpdate should not print debug messages during normal operation
Reviewed-by: valeriep
2022-09-15 01:06:08 +00:00
Fei Yang
7376c55219 8293769: RISC-V: Add a second temporary register for BarrierSetAssembler::load_at
Reviewed-by: fjiang, shade
2022-09-14 23:50:35 +00:00
Joe Darcy
d191e47516 8293768: Add links to JLS 19 and 20 from SourceVersion enum constants
Reviewed-by: iris, jjg
2022-09-14 21:04:20 +00:00
Brian Burkhalter
a75ddb836b 8293122: (fs) Use file cloning in macOS version of Files::copy method
Reviewed-by: alanb
2022-09-14 20:13:19 +00:00
Thomas Stuefe
95c7c556a3 8293402: hs-err file printer should reattempt stack trace printing if it fails
Reviewed-by: chagedorn, dsamersoff
2022-09-14 16:49:06 +00:00
Pengfei Li
211fab8d36 8291669: [REDO] Fix array range check hoisting for some scaled loop iv
Reviewed-by: roland, thartmann
2022-09-14 14:20:39 +00:00
Matthias Baesken
7f3250d71c 8293787: Linux aarch64 build fails after 8292591
Reviewed-by: aph, shade
2022-09-14 10:29:12 +00:00
Jan Lahoda
2a3879180e 8292755: Non-default method in interface leads to a stack overflow in JShell
Reviewed-by: vromero
2022-09-14 08:51:03 +00:00
Jie Fu
8351b30e00 8293771: runtime/handshake/SystemMembarHandshakeTransitionTest.java fails if MEMBARRIER_CMD_QUERY is unsupported
Reviewed-by: rehn
2022-09-14 07:54:32 +00:00
Jie Fu
91f9c0d0cf 8293774: Improve TraceOptoParse to dump the bytecode name
Reviewed-by: chagedorn
2022-09-14 07:18:00 +00:00
Aggelos Biboudis
1169a15936 8291657: Javac assertion when compiling a method call with switch expression as argument
Reviewed-by: jlahoda
2022-09-14 06:48:01 +00:00
Aleksey Shipilev
2baf2516e1 8293654: Improve SharedRuntime handling of continuation helper out-arguments
Reviewed-by: dlong, kvn
2022-09-14 05:45:37 +00:00
Aleksey Shipilev
60f59a4a88 8293660: Fix frame::sender_for_compiled_frame frame size assert
Reviewed-by: dlong, kvn
2022-09-14 05:44:47 +00:00
Aleksey Shipilev
b3461c188a 8293680: PPC64BE build failure after JDK-8293344
Reviewed-by: mdoerr, stuefe
2022-09-14 05:37:34 +00:00
Andrey Turbanov
7e02039805 8293647: Avoid unnecessary boxing in jdk.hotspot.agent
Reviewed-by: cjplummer, sspitsyn
2022-09-13 17:53:33 +00:00
Evgeny Astigeevich
90390222bd 8287394: AArch64: Remove cbuf parameter from far_call/far_jump/trampoline_call
Reviewed-by: aph
2022-09-13 17:19:16 +00:00
Joe Darcy
1dc5039fed 8293626: AccessFlag::locations(ClassFileFormatVersion cffv) does not throw NPEx when parameter is null
8293627: AccessFlag::locations(ClassFileFormatVersion cffv) and locations() results are inconsistent

Reviewed-by: mchung
2022-09-13 16:51:01 +00:00
Emanuel Peter
6f2223faa1 8288180: C2: VectorPhase must ensure that SafePointNode memory input is a MergeMemNode
Reviewed-by: roland, thartmann
2022-09-13 13:14:05 +00:00
Axel Boldt-Christmas
725f41ffd4 8293351: Add second tmp register to aarch64 BarrierSetAssembler::load_at
Reviewed-by: aph, tschatzl, fyang
2022-09-13 11:21:47 +00:00
Thomas Schatzl
37234c856d 8291912: Introduce per-allocation target struct for members in G1PLABAllocator
Reviewed-by: iwalulya, sjohanss
2022-09-13 08:47:51 +00:00
Robbin Ehn
1e1db5debd 8292591: Experimentally add back barrier-less Java thread transitions
Reviewed-by: mdoerr, eosterlund, pchilanomate, dcubed
2022-09-13 08:31:45 +00:00
Kevin Walls
dfc16e047f 8292302: Windows GetLastError value overwritten by ThreadLocalStorage::thread
Reviewed-by: cjplummer, dholmes, dcubed
2022-09-13 07:34:55 +00:00
Jaikiran Pai
8bd79d3efd 8170305: URLConnection doesn't handle HTTP/1.1 1xx (informational) messages
Reviewed-by: dfuchs, michaelm
2022-09-13 05:08:05 +00:00
Tejesh R
9cd3e355d1 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click
Reviewed-by: jdv
2022-09-13 04:54:15 +00:00
Fei Gao
ec2629c052 8275275: AArch64: Fix performance regression after auto-vectorization on NEON
Reviewed-by: aph, xgong
2022-09-13 03:13:38 +00:00
Hao Sun
cbee0bc9ef 8292587: AArch64: Support SVE fabd instruction
Reviewed-by: njian, fgao, ngasson
2022-09-13 02:19:02 +00:00
Feilong Jiang
68645ebffb 8293566: RISC-V: Clean up push and pop registers
Reviewed-by: fyang, shade
2022-09-13 01:07:04 +00:00
Chris Plummer
526eb54fc3 8293669: SA: Remove unnecssary "InstanceStackChunkKlass: InstanceStackChunkKlass" output when scanning heap
Reviewed-by: sspitsyn
2022-09-12 23:56:45 +00:00
Ioi Lam
41ce658267 8292225: Rename ArchiveBuilder APIs related to source and buffered addresses
Reviewed-by: ccheung
2022-09-12 22:52:16 +00:00
Vladimir Ivanov
155b10ae86 8293329: x86: Improve handling of constants in AES/GHASH stubs
Reviewed-by: kvn
2022-09-12 22:51:27 +00:00
Serguei Spitsyn
d3f7e3b417 8293339: vm/jvmti/StopThread/stop001/stop00103 crashes with SIGSEGV in Continuation::is_continuation_mounted
Reviewed-by: cjplummer, lmesnik
2022-09-12 21:56:05 +00:00
Daniel Skantz
524af94937 8283627: Outdated comment in MachineDescriptionTwosComplement.isLP64
Reviewed-by: cjplummer, sspitsyn, lmesnik
2022-09-12 16:31:52 +00:00
lawrence.andrews
cea409cc28 8292738: JInternalFrame backgroundShadowBorder & foregroundShadowBorder line is longer in Mac Look and Feel
Reviewed-by: serb, aivanov
2022-09-12 15:50:25 +00:00
Sergey Tsypanov
9ef6c0925a 8287908: Use non-cloning reflection methods where acceptable
Reviewed-by: rriggs
2022-09-12 13:31:53 +00:00
Roger Riggs
0c61bf109f 8293282: LoadLibraryUnloadTest.java fails with "Too few cleared WeakReferences"
Reviewed-by: mchung, jpai
2022-09-12 13:26:15 +00:00
Bill Huang
91c9091d7e 8293343: sun/management/jmxremote/bootstrap/RmiSslNoKeyStoreTest.java failed with "Agent communication error: java.io.EOFException"
8293335: sun/management/jmxremote/bootstrap/RmiBootstrapTest.java#id1failed with "Agent communication error: java.io.EOFException"

Reviewed-by: kevinw, cjplummer
2022-09-12 13:07:34 +00:00
Prasanta Sadhukhan
4c77bd32a0 6529151: NullPointerException in swing.plaf.synth.SynthLookAndFeel$Handler
Reviewed-by: serb, dnguyen
2022-09-12 11:55:48 +00:00
Albert Mingkun Yang
d5aae0103a 8293544: G1: Add comment in G1BarrierSetC1::pre_barrier
Reviewed-by: kbarrett, sjohanss
2022-09-12 10:05:09 +00:00
Roland Westrelin
37df5f5625 8291599: Assertion in PhaseIdealLoop::skeleton_predicate_has_opaque after JDK-8289127
Reviewed-by: chagedorn, thartmann
2022-09-12 07:30:47 +00:00
Matthias Baesken
699c42962e 8292866: Java_sun_awt_shell_Win32ShellFolder2_getLinkLocation check MultiByteToWideChar return value for failures
Reviewed-by: mdoerr, stuefe
2022-09-12 06:41:48 +00:00
Alan Bateman
68da02c7b5 8292240: CarrierThread.blocking not reset when spare not activated
Reviewed-by: dfuchs
2022-09-10 06:15:48 +00:00
Vladimir Ivanov
005b49bb78 8293044: C1: Missing access check on non-accessible class
Reviewed-by: thartmann, dlong
2022-09-09 20:47:31 +00:00
Coleen Phillimore
91d00b3022 8288473: Remove unused frame::set_pc_preserve_deopt methods
Reviewed-by: rpressler, dcubed
2022-09-09 20:19:56 +00:00
Man Cao
45ff10cc68 8292695: SIGQUIT and jcmd attaching mechanism does not work with signal chaining library
Reviewed-by: xliu, stuefe
2022-09-09 19:12:08 +00:00
Dean Long
dbec22b84b 8293287: add ReplayReduce flag
Reviewed-by: kvn, thartmann
2022-09-09 18:45:43 +00:00
Naoto Sato
b8598b0297 8291660: Grapheme support in BreakIterator
Reviewed-by: smarks
2022-09-09 17:13:51 +00:00
Quan Anh Mai
a14c3a493a 8288933: Improve the implementation of Double/Float.isInfinite
Reviewed-by: redestad, darcy
2022-09-09 17:01:57 +00:00
Bhavana Kilambi
00befddd7c 8292675: Add identity transformation for removing redundant AndV/OrV nodes
Reviewed-by: thartmann, ngasson
2022-09-09 14:24:23 +00:00
Tobias Holenstein
7169ee5c73 8293477: IGV: Upgrade to Netbeans Platform 15
Reviewed-by: chagedorn, rcastanedalo
2022-09-09 13:09:15 +00:00
Roland Westrelin
3dd94f33b2 8292671: Hotspot Style Guide should allow covariant returns
Reviewed-by: jrose, kbarrett, stuefe, kvn, dholmes
2022-09-09 11:43:09 +00:00
Abhishek Kumar
9d6b0285f5 8234315: GTK LAF does not gray out disabled JMenu
Reviewed-by: serb, psadhukhan
2022-09-09 07:08:15 +00:00
Valerie Peng
812d805a48 6447816: Provider filtering (getProviders) is not working with OR'd conditions
Reviewed-by: weijun
2022-09-09 00:30:54 +00:00
Fei Yang
43e191d64b 8293524: RISC-V: Use macro-assembler functions as appropriate
Reviewed-by: shade, fjiang
2022-09-09 00:18:48 +00:00
Sangheon Kim
14eb5ad0dc 8291753: Add JFR event for GC CPU Time
Reviewed-by: tschatzl, ayang
2022-09-08 18:20:03 +00:00
Vladimir Ivanov
30d4145e2e 8293230: x86_64: Move AES and GHASH stub definitions into separate source files
Reviewed-by: thartmann
2022-09-08 16:50:47 +00:00
Daniel D. Daugherty
4c5501c31c 8293548: ProblemList sun/management/jmxremote/bootstrap/RmiBootstrapTest.java#id1 on linux-x64
Reviewed-by: ccheung, azvegint
2022-09-08 16:30:59 +00:00
Vicente Romero
46e6e41b9a 8293051: Further refactor javac after removal of -source/-target/--release 7
Reviewed-by: darcy, mcimadamore
2022-09-08 14:36:19 +00:00
Jan Lahoda
c0ee30a25a 8293348: A false cyclic inheritance error reported
Reviewed-by: vromero
2022-09-08 14:10:06 +00:00
Ashutosh Mehra
85ec1f8d02 8293492: ShenandoahControlThread missing from hs-err log and thread dump
Reviewed-by: zgu, shade
2022-09-08 14:02:41 +00:00
Stefan Karlsson
6bd2794175 8293304: Replace some usages of INTPTR_FORMAT with PTR_FORMAT
Reviewed-by: kbarrett, coleenp
2022-09-08 13:37:06 +00:00
Andrey Turbanov
98da03af50 8293432: Use diamond operator in java.management
Reviewed-by: rriggs, sspitsyn
2022-09-08 11:05:54 +00:00
Adam Sotona
ffc249ae21 8289613: Drop use of Thread.stop in jshell
Reviewed-by: jlahoda
2022-09-08 10:01:24 +00:00
John R Rose
8d3399bf5f 8292758: put support for UNSIGNED5 format into its own header file
Reviewed-by: dlong, coleenp
2022-09-08 07:36:53 +00:00
Jie Fu
6677227301 8293497: Build failure due to MaxVectorSize was not declared when C2 is disabled after JDK-8293254
Reviewed-by: dlong
2022-09-08 02:29:01 +00:00
Weijun Wang
986b834148 8293489: Accept CAs with BasicConstraints without pathLenConstraint
Reviewed-by: mullan
2022-09-08 01:35:22 +00:00
Fei Yang
fc5f97fe37 8293474: RISC-V: Unify the way of moving function pointer
Reviewed-by: yadongwang, fjiang, shade
2022-09-08 01:14:08 +00:00
Daniel D. Daugherty
2d13f53017 8293512: ProblemList serviceability/tmtools/jstat/GcNewTest.java in -Xcomp mode
8293516: ProblemList gc/cslocker/TestCSLocker.java in -Xcomp mode
8293517: ProblemList sun/management/jmxremote/bootstrap/RmiBootstrapTest.java#id1 on linux-x64
8293518: ProblemList sun/management/jmxremote/bootstrap/RmiSslNoKeyStoreTest.java

Reviewed-by: bpb
2022-09-07 23:08:54 +00:00
Ioi Lam
f84386cf6e 8293182: Improve testing of CDS archive heap
Reviewed-by: ccheung, coleenp
2022-09-07 23:02:35 +00:00
Chris Plummer
51de765867 8283010: serviceability/sa/ClhsdbThread.java failed with "'Base of Stack:' missing from stdout/stderr "
Reviewed-by: amenkov
2022-09-07 21:51:46 +00:00
Daniel D. Daugherty
8a489658ab 8293514: ProblemList gc/metaspace/TestMetaspacePerfCounters.java#Epsilon-64 on all platforms
Reviewed-by: kbarrett
2022-09-07 21:33:46 +00:00
Zdenek Zambersky
1e031e6a58 8293232: Fix race condition in pkcs11 SessionManager
Reviewed-by: valeriep
2022-09-07 20:50:41 +00:00
Daniel D. Daugherty
1080c4e4ae 8293508: ProblemList gc/metaspace/TestMetaspacePerfCounters.java#Epsilon-64
Reviewed-by: bpb
2022-09-07 20:49:06 +00:00
Chris Plummer
aff9a696cb 8283224: Remove THREAD_NOT_ALIVE from possible JDWP error codes
Reviewed-by: alanb, sspitsyn
2022-09-07 19:46:19 +00:00
Brian Burkhalter
76df73b390 8293456: runtime/os/TestTracePageSizes.java sub-tests fail with "AssertionError: No memory range found for address: NNNN"
Reviewed-by: alanb, lancea
2022-09-07 18:53:25 +00:00
Naoto Sato
32c7b6283d 8293146: Strict DateTimeFormatter fails to report an invalid week 53
Reviewed-by: rriggs
2022-09-07 18:33:37 +00:00
Daniel D. Daugherty
02dce24b59 8207166: jdk/jshell/JdiHangingLaunchExecutionControlTest.java - launch timeout
Reviewed-by: vromero
2022-09-07 18:30:16 +00:00
Daniel D. Daugherty
d36abbe8da 8293496: ProblemList runtime/os/TestTracePageSizes.java on linux-x64
Reviewed-by: alanb, azvegint
2022-09-07 15:26:02 +00:00
Christian Stein
1ee59adcfe 8289798: Update to use jtreg 7
Reviewed-by: ihse, jpai
2022-09-07 15:13:35 +00:00
Coleen Phillimore
5934669ca8 8292383: Create a SymbolHandle type to use for ResourceHashtable
Reviewed-by: iklam, hseigel
2022-09-07 14:50:58 +00:00
Evgeny Astigeevich
6ff4775b71 8285487: AArch64: Do not generate unneeded trampolines for runtime calls
Reviewed-by: xliu, aph
2022-09-07 14:39:48 +00:00
Prasanta Sadhukhan
d696104535 4850101: Setting mnemonic to VK_F4 underlines the letter S in a button.
Reviewed-by: prr
2022-09-07 12:34:38 +00:00
Stefan Karlsson
14fd1b6cdf 8292921: Rewrite object field printer
Reviewed-by: stuefe, coleenp
2022-09-07 12:08:20 +00:00
Serguei Spitsyn
4f9065d3d5 8293333: Broken links in JDI specification
Reviewed-by: alanb, cjplummer
2022-09-07 09:04:09 +00:00
Andrey Turbanov
2259e427a5 8293197: Avoid double racy reads from non-volatile fields in SharedSecrets
Reviewed-by: alanb
2022-09-07 06:11:56 +00:00
Daniel Jeliński
205f992e9e 8293326: jdk/sun/security/tools/jarsigner/compatibility/SignTwice.java slow on Windows
Reviewed-by: weijun, wetmore
2022-09-07 05:25:53 +00:00
Chris Plummer
710a143473 8293445: clhsdb "thread" command gives incorrect error message for bad threadID
Reviewed-by: dcubed
2022-09-06 22:26:29 +00:00
Vladimir Ivanov
57930f8e53 8293285: x86_64: Move libm stub implementations to StubGenerator
Reviewed-by: kvn
2022-09-06 22:18:03 +00:00
Vladimir Ivanov
5b4c415510 8293254: x86_64: Extract arraycopy stub implementations into a separate file
Reviewed-by: dlong, kvn
2022-09-06 22:16:37 +00:00
Vladimir Ivanov
fb6eb6f267 8293245: x86_64: Extract Adler32 stub implementation into stubGenerator_x86_64_adler.cpp
Reviewed-by: kvn, dlong
2022-09-06 22:15:39 +00:00
Brian Burkhalter
da596182a4 8264744: (fs) Use file cloning in Linux version of Files::copy method
Reviewed-by: alanb
2022-09-06 18:10:58 +00:00
Ludovic Henry
85d4b49151 8283929: GHA: Add RISC-V build config
Reviewed-by: ihse, shade
2022-09-06 16:24:04 +00:00
Yoshiki Sato
98d85e6f59 8292579: (tz) Update Timezone Data to 2022c
Reviewed-by: naoto, alanb
2022-09-06 16:05:51 +00:00
Doug Simon
7c96608d9a 8293403: JfrResolution::on_jvmci_resolution crashes when caller is null
Reviewed-by: never
2022-09-06 15:18:02 +00:00
Coleen Phillimore
c05015bc93 8291736: find_method_handle_intrinsic leaks Method*
Reviewed-by: hseigel, iklam, dholmes
2022-09-06 14:01:17 +00:00
Thomas Schatzl
b2067e63da 8291725: Leftover marks when VM shutdown aborts bitmap clearing make mixed gc fail
Reviewed-by: iwalulya, ayang
2022-09-06 13:41:37 +00:00
Albert Mingkun Yang
6a1e98cbf7 8293213: G1: Remove redundant assertion in G1RemSet::clean_card_before_refine
Reviewed-by: tschatzl, kbarrett
2022-09-06 11:21:00 +00:00
Abhishek Kumar
a92c1ff700 8287912: GTK L&F : Background of tree icons are red
Reviewed-by: psadhukhan, jdv
2022-09-06 10:55:06 +00:00
bobpengxie
272745b374 8293340: Remove unused _code in {Zero,Template}InterpreterGenerator
Reviewed-by: jiefu, shade
2022-09-06 09:39:17 +00:00
Jan Lahoda
26f2a978f6 8290561: Coalesce incubator-module warnings for single-file source-code programs
Reviewed-by: mcimadamore
2022-09-06 09:27:48 +00:00
Magnus Ihse Bursie
8e22f2bb40 8293361: GHA: dump config.log in case of configure failure
Reviewed-by: shade
2022-09-06 08:51:02 +00:00
Magnus Ihse Bursie
b17758a932 8247283: Enable the new conformant preprocessor option in Visual Studio
Reviewed-by: erikj, djelinski
2022-09-06 08:50:13 +00:00
Albert Mingkun Yang
1bed23a1af 8293353: [BACKOUT] G1: Remove redundant is-marking-active checks in C1 barrier
Reviewed-by: kbarrett, mdoerr, tschatzl
2022-09-06 08:43:34 +00:00
Jan Lahoda
4955835249 8282434: Leading combining diacritic character in string renders incorrectly
Reviewed-by: vromero
2022-09-06 08:42:45 +00:00
Andrey Turbanov
ef20ffe4d2 8293159: Use try-with-resources in X11FontManager.registerFontDir
Reviewed-by: prr
2022-09-05 19:58:18 +00:00
Hannes Wallnöfer
056ed48dda 8293180: JQuery UI license file not updated
Reviewed-by: jjg
2022-09-05 18:51:01 +00:00
Emanuel Peter
dbb2c4b6ac 8288897: Clean up node dump code
Reviewed-by: chagedorn, xliu
2022-09-05 14:27:00 +00:00
Albert Mingkun Yang
9833c025fd 8292946: GC lock/jni/jnilock001 test failed "assert(gch->gc_cause() == GCCause::_scavenge_alot || !gch->incremental_collection_failed()) failed: Twice in a row"
Reviewed-by: kbarrett, tschatzl
2022-09-05 13:35:36 +00:00
Aleksey Shipilev
d7536588b3 8293107: GHA: Bump to Ubuntu 22.04
Reviewed-by: ihse
2022-09-05 13:28:51 +00:00
Thomas Stuefe
d4e3e69505 8293344: JDK-8242181 broke stack printing for non-attached threads
Reviewed-by: chagedorn, mdoerr
2022-09-05 13:08:14 +00:00
Volker Simonis
2c61efe3de 8282648: Weaken the InflaterInputStream specification in order to allow faster Zip implementations
Reviewed-by: lancea, alanb, jpai, mr, darcy
2022-09-05 12:50:52 +00:00
Ludvig Janiuk
e31c537f05 8293224: Add link to openjdk.org/jtreg/ from doc/testing
Reviewed-by: erikj, iris, ihse
2022-09-05 12:17:19 +00:00
Prasanta Sadhukhan
955baa3c44 8267374: macOS: Option+Up/Down Arrow don't traverse to beginning/end of line in JTextArea
Reviewed-by: prr
2022-09-05 10:47:48 +00:00
Magnus Ihse Bursie
8df671c908 8293355: JDK-8293167 included bad copyright header
Reviewed-by: kbarrett
2022-09-05 10:17:58 +00:00
Fei Yang
5bed9f7675 8293290: RISC-V: Explicitly pass a third temp register to MacroAssembler::store_heap_oop
Reviewed-by: shade
2022-09-05 10:02:08 +00:00
Markus Grönlund
48b3ab02f9 8293167: Memory leak in JfrThreadSampler if stackdepth is larger than default (64)
Reviewed-by: jbachorik
2022-09-05 09:13:07 +00:00
Serguei Spitsyn
4067321ef4 8291586: Broken links in JVMTI specification
Reviewed-by: alanb
2022-09-05 08:51:25 +00:00
Axel Boldt-Christmas
32f4dc8403 8293295: Add type check asserts to java_lang_ref_Reference accessors
Reviewed-by: stefank, kbarrett, coleenp
2022-09-05 08:34:13 +00:00
Daniel Jeliński
e945619ddd 8293088: Fix compilation with the new Visual Studio preprocessor
Reviewed-by: ihse
2022-09-05 07:22:58 +00:00
Roberto Castañeda Lozano
730ced9a10 8292660: C2: blocks made unreachable by NeverBranch-to-Goto conversion are removed incorrectly
Reviewed-by: kvn, roland
2022-09-05 07:16:51 +00:00
Ichiroh Takiguchi
3464019d7e 8292899: CustomTzIDCheckDST.java testcase failed on AIX platform
Reviewed-by: naoto
2022-09-04 07:22:09 +00:00
Chris Plummer
e92b9e4030 8293325: Minor improvements to macos catch_mach_exception_raise() error handling
Reviewed-by: amenkov, dcubed, sspitsyn
2022-09-03 23:15:35 +00:00
Chris Plummer
767262e67c 8292201: serviceability/sa/ClhsdbThreadContext.java fails with "'Thread "Common-Cleaner"' missing from stdout/stderr"
Reviewed-by: amenkov, sspitsyn
2022-09-03 16:06:25 +00:00
Jaikiran Pai
a366e82aa1 7113208: Incorrect javadoc on java.net.DatagramPacket.setLength()
Reviewed-by: dfuchs
2022-09-03 05:48:20 +00:00
Ioi Lam
ac05bc8605 8293293: Move archive heap loading code out of heapShared.cpp
Reviewed-by: erikj, coleenp
2022-09-02 23:47:48 +00:00
Jie Fu
e1e67324c0 8293319: [C2 cleanup] Remove unused other_path arg in Parse::adjust_map_after_if
Reviewed-by: kvn
2022-09-02 22:40:53 +00:00
Dean Long
5757e2129e 8292385: assert(ctrl == kit.control()) failed: Control flow was added although the intrinsic bailed out
Reviewed-by: thartmann, jiefu, kvn
2022-09-02 19:25:08 +00:00
Bill Huang
3993a1f9ea 8292067: Convert test/sun/management/jmxremote/bootstrap shell tests to java version
Reviewed-by: lmesnik
2022-09-02 18:10:56 +00:00
Coleen Phillimore
83a34086bc 8293315: Add back logging for Placeholders
Reviewed-by: iklam
2022-09-02 17:51:49 +00:00
Joe Darcy
b6477fdb30 8293288: bootcycle build failure after JDK-8173605
Reviewed-by: erikj
2022-09-02 17:44:59 +00:00
Vladimir Ivanov
0c6094e796 8293188: x86_64: Introduce stubGenerator_x86_64.hpp
Reviewed-by: dholmes, kvn
2022-09-02 17:05:51 +00:00
Chris Plummer
2baeebbc02 8293006: sun/tools/jhsdb/JStackStressTest.java fails with "UnalignedAddressException: 8baadbabe"
Reviewed-by: dcubed, sspitsyn
2022-09-02 16:11:01 +00:00
Chris Plummer
da99e3e829 8289400: Improve com/sun/jdi/TestScaffold error reporting
Reviewed-by: amenkov, lmesnik
2022-09-02 16:08:17 +00:00
Roland Westrelin
77e21c57ce 8290529: C2: assert(BoolTest(btest).is_canonical()) failure
Reviewed-by: kvn, thartmann
2022-09-02 13:35:11 +00:00
Coleen Phillimore
fcc0cf9677 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable
Reviewed-by: dholmes, iklam
2022-09-02 13:07:45 +00:00
Axel Boldt-Christmas
6fc58b8324 8293207: Add assert to JVM_ReferenceRefersTo to clarify its API
Reviewed-by: stefank, kbarrett
2022-09-02 12:59:50 +00:00
Albert Mingkun Yang
ce06a3b689 8293023: Change CardTable::is_in_young signature
Reviewed-by: kbarrett, iwalulya
2022-09-02 11:02:22 +00:00
Albert Mingkun Yang
26cac088b4 8293209: Parallel: Remove unused variables in PSParallelCompact::invoke
Reviewed-by: kbarrett
2022-09-02 11:00:49 +00:00
Magnus Ihse Bursie
46523b817c 8293219: Microsoft toolchain selection picks 32-bit tools over 64-bit
Reviewed-by: erikj, shade
2022-09-02 09:35:02 +00:00
Xiaolin Zheng
bc5ffc8e47 8293100: RISC-V: Need to save and restore callee-saved FloatRegisters in StubGenerator::generate_call_stub
Reviewed-by: yadongwang, fjiang, shade, vkempik
2022-09-02 07:01:02 +00:00
Stefan Karlsson
98ce45ff74 8292981: Unify and restructure integer printing format specifiers
Reviewed-by: kbarrett, dholmes
2022-09-02 06:52:35 +00:00
Joe Darcy
3ac91b08cb 8293003: Review running time of Warn5 regression test
Reviewed-by: vromero
2022-09-02 02:53:59 +00:00
Hao Sun
e0168a0eb0 8288012: AArch64: unnecessary macro expansion in stubGenerator_aarch64
Reviewed-by: aph, njian
2022-09-02 02:43:07 +00:00
Serguei Spitsyn
99c3ab0177 8293010: JDI ObjectReference/referringObjects/referringObjects001 fails: assert(env->is_enabled(JVMTI_EVENT_OBJECT_FREE)) failed: checking
Reviewed-by: cjplummer, zgu, lmesnik
2022-09-02 01:59:32 +00:00
Jonathan Gibbons
0fb9469d93 8290126: Add a check in JavadocTester for "javadoc should not crash"
Reviewed-by: prappo
2022-09-01 22:41:27 +00:00
Brian Burkhalter
0a4d0cee9f 8293121: (fs) Refactor UnixFileSystem copying into generic Unix, Linux, and BSD implementations
Reviewed-by: alanb
2022-09-01 22:21:21 +00:00
Bill Huang
032be168b5 8292066: Convert TestInputArgument.sh and TestSystemLoadAvg.sh to java version
Reviewed-by: lmesnik, amenkov
2022-09-01 21:29:24 +00:00
Bill Huang
e393973761 8292990: Improve test coverage for XPath Axes: parent
Reviewed-by: joehw
2022-09-01 21:25:40 +00:00
Dean Long
fa68371bb8 8292584: assert(cb != __null) failed: must be with -XX:-Inline
Reviewed-by: kvn, rpressler
2022-09-01 20:19:37 +00:00
Ruprabhu25
04d8069bac 8230374: maxOutputSize, instead of javatest.maxOutputSize, should be used in TEST.properties
Reviewed-by: dholmes
2022-09-01 19:53:14 +00:00
Mahendra Chhipa
3d254d3c8e 8289510: Improve test coverage for XPath Axes: namespace
Reviewed-by: joehw
2022-09-01 17:42:32 +00:00
Joe Darcy
2d18dda3f2 8173605: Remove support for source and target 1.7 option in javac
Reviewed-by: vromero
2022-09-01 16:43:50 +00:00
Ludvig Janiuk
7c2f2994da 8293202: Document how to edit doc/testing, doc/building
Reviewed-by: erikj
2022-09-01 16:39:22 +00:00
Chris Plummer
07616de00c 8175382: clhsdb pmap should print the end addresses of the load modules
Reviewed-by: sspitsyn, ysuenaga
2022-09-01 16:35:41 +00:00
Aggelos Biboudis
9444a081cc 8290709: Incorrect dominance error for unconditional pattern vs. null
Reviewed-by: jlahoda
2022-09-01 16:09:03 +00:00
Naoto Sato
6a1b0b5649 8293154: TemporalQueries java doc error
Reviewed-by: rriggs, lancea
2022-09-01 15:46:45 +00:00
Aleksey Shipilev
5204528296 8293201: Library detection in runtime/ErrorHandling/TestDwarf.java fails on some systems
Reviewed-by: chagedorn
2022-09-01 14:13:51 +00:00
Roger Riggs
2d10d4f54e 8291651: CleanerTest.java fails with "Cleanable was cleaned"
Reviewed-by: jpai, dfuchs
2022-09-01 14:02:06 +00:00
Albert Mingkun Yang
bd674dc55e 8293163: G1: Rename G1HeapRegionAttr::is_humongous
Reviewed-by: kbarrett, sangheki
2022-09-01 10:50:45 +00:00
Albert Mingkun Yang
479795b4d1 8293164: Remove unimplemented Generation::print_heap_change
Reviewed-by: iwalulya
2022-09-01 10:49:52 +00:00
Aleksey Shipilev
6e6202c14d 8292407: Improve Weak CAS VarHandle/Unsafe tests resilience under spurious failures
Reviewed-by: yadongwang, fyang, vkempik, psandoz
2022-09-01 09:22:56 +00:00
Dingli Zhang
17283cfe4c 8293011: riscv: Duplicated stubs to interpreter for static calls
Reviewed-by: fyang
2022-09-01 01:06:45 +00:00
Magnus Ihse Bursie
6076128996 8292008: Transition the JDK to the common standard of C11
Reviewed-by: erikj
2022-08-31 22:17:26 +00:00
Jonathan Gibbons
6f297346dc 8293178: Remove obsolete properties from javadoc resource file
Reviewed-by: prappo
2022-08-31 22:11:20 +00:00
Magnus Ihse Bursie
dd5415309a 8293162: Drop support for VS2017
Reviewed-by: erikj, kbarrett
2022-08-31 22:07:30 +00:00
Ioi Lam
12317ef7d0 8293046: Move CDS command-line flags to cds_globals.hpp
Reviewed-by: dholmes, ccheung, coleenp
2022-08-31 19:58:36 +00:00
Aleksey Shipilev
372fc58e89 8293165: GHA: Provide necessary x86_32 packages for runtime/ErrorHandling/TestDwarf.java
Reviewed-by: ihse
2022-08-31 17:51:48 +00:00
Doug Simon
3c1bda4bc3 8293019: [JVMCI] change ratio of libgraal to C1 threads and use one isolate per libgraal thread
Reviewed-by: never, iveresov
2022-08-31 16:13:25 +00:00
Andrey Turbanov
0d51f63a2e 8293008: Replace uses of StringBuffer with StringBuilder in MergeCollation
Reviewed-by: rriggs, naoto, bpb
2022-08-31 13:56:50 +00:00
Eric Caspole
5d6779f709 8292681: Add JMH for ProtectionDomain
Reviewed-by: mullan
2022-08-31 13:24:34 +00:00
Fei Yang
38e6706315 8293050: RISC-V: Remove redundant non-null assertions about macro-assembler
Reviewed-by: fjiang, yadongwang, shade
2022-08-31 12:24:28 +00:00
Roland Westrelin
4c90e87a6f 8290781: Segfault at PhaseIdealLoop::clone_loop_handle_data_uses
Reviewed-by: chagedorn, thartmann
2022-08-31 09:23:41 +00:00
Axel Boldt-Christmas
9e3176bd09 8293035: Cleanup MacroAssembler::movoop code patching logic aarch64 riscv
Reviewed-by: eosterlund, fyang
2022-08-31 07:42:22 +00:00
Johan Sjölén
c42478b723 8293109: Remove unused methods in Compiler
Reviewed-by: roland, thartmann, kvn
2022-08-31 06:57:54 +00:00
Aleksey Shipilev
d2eed079c3 8293020: jmod should not be treated as "small" tool for large modules
Reviewed-by: erikj, ihse, alanb
2022-08-31 05:30:16 +00:00
Aleksey Shipilev
923c952bec 8293098: GHA: Harmonize GCC version handling for host and cross builds
Reviewed-by: ihse, clanger
2022-08-31 05:29:19 +00:00
Jatin Bhateja
38377d5eb7 8291649: multiple tests failing with -Xcomp after JDK-8290034
Co-authored-by: Kim Barrett <kbarrett@openjdk.org>
Co-authored-by: John R Rose <jrose@openjdk.org>
Reviewed-by: kbarrett, jrose
2022-08-31 05:02:56 +00:00
Feilong Jiang
2d7792c783 8293065: Zero build failure on AArch64 and RISCV64 after JDK-8293007
Reviewed-by: eosterlund, fyang, yadongwang, kvn
2022-08-31 00:56:27 +00:00
Chris Plummer
c3380c03b1 8292995: improve the SA page cache
Reviewed-by: kevinw, sspitsyn
2022-08-30 23:13:49 +00:00
Ioi Lam
1cf245d77c 8292590: Product JVM crashes with FLAG_SET_XXX on non-product Flag
Reviewed-by: dholmes, coleenp
2022-08-30 22:00:43 +00:00
Kevin Driver
6335150cea 6205692: (spec) javax.crypto.MacSpi.engineUpdate(ByteBuffer input): NPE should be specified
Reviewed-by: valeriep
2022-08-30 20:51:34 +00:00
Albert Mingkun Yang
622be797b9 8293090: Remove unused par_oop_since_save_marks_iterate_done
Reviewed-by: kbarrett
2022-08-30 19:37:36 +00:00
Albert Mingkun Yang
3d0ab2b1aa 8292858: G1: Remove redundant check in G1FlushHumongousCandidateRemSets
Reviewed-by: tschatzl, kbarrett
2022-08-30 19:36:41 +00:00
Vladimir Ivanov
6e248279cf 8292878: x86: Make scratch register usage explicit in assembler code
Reviewed-by: kvn, shade
2022-08-30 18:45:24 +00:00
Serguei Spitsyn
f5ebbf3225 8292657: Calling GetLocalXXX from virtual thread with thread parameter set to NULL returns carrier locals
Reviewed-by: cjplummer, alanb
2022-08-30 18:28:05 +00:00
Kevin Driver
550e5d7822 4958071: (spec) confusing exception list for javax.crypto.Cipher.init(...) for
Reviewed-by: valeriep, wetmore
2022-08-30 18:23:46 +00:00
Andrey Turbanov
d3d2e669b7 8293009: Remove unused field 'millisPerHour' in DateFormatSymbols
Reviewed-by: naoto, jpai
2022-08-30 17:31:21 +00:00
Vladimir Ivanov
f3ebb420b7 8293036: x86_64: Move Continuation-related stub methods to MacroAssembler
Reviewed-by: dlong, kvn
2022-08-30 17:08:18 +00:00
Aleksey Shipilev
1576f991fe 8288759: GCC 12 fails to compile signature.cpp due to -Wstringop-overread
Reviewed-by: dholmes, coleenp
2022-08-30 16:55:47 +00:00
Chris Plummer
f285cea9a6 8293037: Remove DebuggerBase.writeBytes() and related code from SA
Reviewed-by: amenkov, kevinw
2022-08-30 16:24:51 +00:00
Florian Weimer
343333abcf 8293004: (fs) FileChannel.transferXXX use of copy_file_range needs fallback handling for ENOSYS
Reviewed-by: stuefe, alanb, bpb
2022-08-30 15:23:35 +00:00
Andrey Turbanov
b3450e930e 8292850: Unused field 'expiredTimersKey' in javax.swing.TimerQueue
Reviewed-by: prr
2022-08-30 10:22:12 +00:00
Albert Mingkun Yang
6b7d4b1f74 8293028: Remove GenCollectedHeap::handle_failed_promotion
Reviewed-by: kbarrett
2022-08-30 09:51:06 +00:00
Feilong Jiang
21a736954f 8292575: riscv: Represent Registers as values
Reviewed-by: yzhu, yadongwang, fyang
2022-08-30 09:24:37 +00:00
Tejesh R
4a28f3798d 8291792: DefaultStyledDocument.setCharacterAttributes accepts negative length
Reviewed-by: psadhukhan, prr
2022-08-30 08:36:58 +00:00
Alexey Ushakov
f766d92755 8290344: Start/stop displaysync affects performance in metal rendering pipeline
Reviewed-by: aghaisas, jdv
2022-08-30 08:23:58 +00:00
Roland Westrelin
afa5d4ced3 8290451: Incorrect result when switching to C2 OSR compilation from C1
Reviewed-by: thartmann, kvn
2022-08-30 07:27:51 +00:00
Jaikiran Pai
bc6ac6f7af 8292968: java.net.ContentHandler's javadoc has a broken reference
Reviewed-by: dfuchs
2022-08-30 05:24:14 +00:00
Yadong Wang
e016363b54 8293007: riscv: failed to build after JDK-8290025
Reviewed-by: fyang, fjiang, shade
2022-08-30 01:17:41 +00:00
David Holmes
9424d6d487 8293012: ConstantPool::print_on can crash if _cache is NULL
Reviewed-by: shade, rehn
2022-08-30 00:58:26 +00:00
Ioi Lam
40b0ed5657 8292891: ifdef-out some CDS-only functions
Reviewed-by: coleenp, ccheung, dholmes
2022-08-29 23:20:21 +00:00
Dean Long
adb3d4f14a 8292694: x86_64 c2i/i2c adapters may use more stack space than necessary
Reviewed-by: kvn, thartmann
2022-08-29 19:38:48 +00:00
Tomas Zezula
30def49c72 8292769: [JVMCI] OutOfMemoryError thrown when attaching the libgraal isolate causes HotSpot to crash.
Reviewed-by: dnsimon, never
2022-08-29 15:46:50 +00:00
Pengfei Li
a88a9e344f 8291466: C2: assert(false) failed: infinite loop in PhaseIterGVN::transform_old with -XX:+StressIGVN
Reviewed-by: roland, chagedorn
2022-08-29 13:06:20 +00:00
Prasanta Sadhukhan
d5167a91a9 7189422: [macosx] Submenu's arrow have a wrong position
Reviewed-by: prr, dnguyen
2022-08-29 10:59:31 +00:00
Aleksey Shipilev
512fee1d1e 8292972: Initialize fields if CodeBlobIterator shortcuts without heaps
Reviewed-by: kvn, chagedorn
2022-08-29 07:47:50 +00:00
Aleksey Shipilev
a476ec5c81 8292983: ModuleReferenceImpl.computeHash should record algorithm for cache checks
Reviewed-by: alanb, mchung, jpai
2022-08-29 05:58:41 +00:00
Jaikiran Pai
99cab6a68e 8292911: Add a note about jtreg failure handlers in the testing doc
Reviewed-by: lancea, erikj, jjg
2022-08-29 02:25:37 +00:00
Bill Huang
f6b6360155 8289949: Improve test coverage for XPath: operators
Reviewed-by: joehw
2022-08-28 16:58:53 +00:00
Doug Simon
b0e0b87891 8292917: [JVMCI] Extend InstalledCode API to make an nmethod non entrant.
Reviewed-by: never
2022-08-27 08:21:58 +00:00
Daniel D. Daugherty
1500d3dfb2 8292994: ProblemList vmTestbase/gc/lock/jni/jnilock001/TestDescription.java
Reviewed-by: prr
2022-08-26 20:52:35 +00:00
Roger Riggs
4e457acda0 8291760: PipelineLeaksFD.java still fails: More or fewer pipes than expected
Reviewed-by: jpai, alanb
2022-08-26 19:06:29 +00:00
Mikhailo Seledtsov
774edeb521 8271615: vmTestbase/vm/jit/LongTransitions/ test fail due to locale mismatch
Reviewed-by: shade, lmesnik
2022-08-26 18:16:16 +00:00
Jonathan Dowland
9a0d1e7ce8 8292541: [Metrics] Reported memory limit may exceed physical machine memory
Reviewed-by: stuefe, sgehwolf
2022-08-26 16:22:14 +00:00
Brian Burkhalter
c74b6d4552 8292562: (fc) Use copy_file_range in FileChannel::transferTo on Linux
Reviewed-by: alanb
2022-08-26 16:12:58 +00:00
Stefan Karlsson
3844685be0 8292697: ZGC: Hangs when almost out of metaspace memory
Reviewed-by: eosterlund, coleenp
2022-08-26 13:44:28 +00:00
Tobias Holenstein
2b803493ba 8292669: IGV: Search not useable when in Overflow Toolbar
Co-authored-by: Christian Hagedorn <chagedorn@openjdk.org>
Co-authored-by: Tobias Holenstein <tholenstein@openjdk.org>
Reviewed-by: chagedorn, rcastanedalo
2022-08-26 13:37:14 +00:00
Stefan Karlsson
4732abf7f4 8292910: Remove root to oop cast in HeapDumper
Reviewed-by: eosterlund, coleenp
2022-08-26 12:34:10 +00:00
Jonathan Dowland
f694f8a767 8292083: Detected container memory limit may exceed physical machine memory
Reviewed-by: sgehwolf, stuefe
2022-08-26 12:25:16 +00:00
Axel Boldt-Christmas
f91943c19f 8292868: Explicitly pass a third temp register to MacroAssembler::store_heap_oop for aarch64
Reviewed-by: shade, eosterlund, tschatzl
2022-08-26 09:37:46 +00:00
Roland Westrelin
6354a57b5c 8290711: assert(false) failed: infinite loop in PhaseIterGVN::optimize
Reviewed-by: chagedorn, kvn
2022-08-26 07:57:40 +00:00
Chris Plummer
3e18773016 8292880: Improve debuggee logging for com/sun/jdi/ClassUnloadEventTest.java
Reviewed-by: amenkov, kevinw
2022-08-25 22:54:29 +00:00
Jie Fu
909e1edb18 8292919: Build failure due to UseJVMCICompiler was not declared when C2 is disabled after JDK-8292691
Reviewed-by: shade, kvn
2022-08-25 22:44:45 +00:00
Chris Plummer
55f5a83b88 8282410: Remove SA ProcDebugger support
Reviewed-by: kevinw, amenkov
2022-08-25 22:25:49 +00:00
Chris Plummer
d83faeaf9a 8292250: Create test for co-located JDI MethodEntry, Step, and Breakpoint events
Reviewed-by: amenkov, kevinw
2022-08-25 22:03:43 +00:00
Coleen Phillimore
e353b572a5 8292890: Remove PrintTouchedMethodsAtExit and LogTouchedMethods
Reviewed-by: iklam, hseigel
2022-08-25 21:12:35 +00:00
Julian Waters
95a33fe150 8292314: Cleanup legacy address handling
Reviewed-by: prr
2022-08-25 19:44:43 +00:00
Maxim Kartashev
5d799d80e6 8292304: [REDO] JDK-8289208 Test DrawRotatedStringUsingRotatedFont.java occasionally crashes on MacOS
Reviewed-by: prr
2022-08-25 19:43:44 +00:00
Coleen Phillimore
4f50316a1a 8292680: Convert Dictionary to ConcurrentHashTable
Reviewed-by: rehn, hseigel
2022-08-25 19:02:52 +00:00
Vladimir Ivanov
2fe0ce0148 8292203: AArch64: Represent Registers as values
Reviewed-by: kvn, aph
2022-08-25 16:50:18 +00:00
Aleksey Shipilev
251bff6bee 8292877: java/util/concurrent/atomic/Serial.java uses {Double,Long}Accumulator incorrectly
Reviewed-by: psandoz, martin, alanb
2022-08-25 16:47:58 +00:00
Aleksey Shipilev
f57d34242c 8292867: RISC-V: Simplify weak CAS return value handling
Reviewed-by: yadongwang, fyang
2022-08-25 16:24:53 +00:00
Calvin Cheung
88af204027 8292494: Ensure SystemDictionary::set_platform_loader and set_system_loader are called only once
Reviewed-by: iklam, dholmes
2022-08-25 16:10:37 +00:00
Matthias Baesken
8d3d4397cc 8292903: enhance round_up_power_of_2 assertion output
Reviewed-by: stefank, stuefe
2022-08-25 14:52:40 +00:00
Erik Österlund
054c23f484 8290025: Remove the Sweeper
Reviewed-by: stefank, kvn, iveresov, coleenp, vlivanov, mdoerr
2022-08-25 09:48:55 +00:00
Albert Mingkun Yang
dc7e2562f4 8290376: G1: Refactor G1MMUTracker::when_sec
Reviewed-by: tschatzl, iwalulya
2022-08-25 09:15:09 +00:00
Prasanta Sadhukhan
5a20bc44b1 8292715: Cleanup Problemlist
Reviewed-by: prr
2022-08-25 07:34:38 +00:00
2521 changed files with 86555 additions and 58150 deletions

View File

@@ -29,22 +29,22 @@ on:
workflow_call:
inputs:
gcc-major-version:
required: false
required: true
type: string
default: '10'
apt-gcc-version:
required: true
type: string
apt-gcc-cross-version:
required: true
type: string
extra-conf-options:
required: false
type: string
default: '10.3.0-1ubuntu1~20.04'
apt-gcc-cross-suffix:
required: false
type: string
default: 'cross1'
jobs:
build-cross-compile:
name: build
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
@@ -54,20 +54,35 @@ jobs:
- arm
- s390x
- ppc64le
- riscv64
include:
- target-cpu: aarch64
debian-arch: arm64
gnu-arch: aarch64
debian-arch: arm64
debian-repository: https://httpredir.debian.org/debian/
debian-version: bullseye
- target-cpu: arm
debian-arch: armhf
gnu-arch: arm
debian-arch: armhf
debian-repository: https://httpredir.debian.org/debian/
debian-version: bullseye
gnu-abi: eabihf
- target-cpu: s390x
debian-arch: s390x
gnu-arch: s390x
debian-arch: s390x
debian-repository: https://httpredir.debian.org/debian/
debian-version: bullseye
- target-cpu: ppc64le
debian-arch: ppc64el
gnu-arch: powerpc64le
debian-arch: ppc64el
debian-repository: https://httpredir.debian.org/debian/
debian-version: bullseye
- target-cpu: riscv64
gnu-arch: riscv64
debian-arch: riscv64
debian-repository: https://deb.debian.org/debian-ports
debian-keyring: /usr/share/keyrings/debian-ports-archive-keyring.gpg
debian-version: sid
steps:
- name: 'Checkout the JDK source'
@@ -95,9 +110,10 @@ jobs:
sudo apt-get install \
gcc-${{ inputs.gcc-major-version }}=${{ inputs.apt-gcc-version }} \
g++-${{ inputs.gcc-major-version }}=${{ inputs.apt-gcc-version }} \
gcc-${{ inputs.gcc-major-version }}-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}=${{ inputs.apt-gcc-version }}${{ inputs.apt-gcc-cross-suffix }} \
g++-${{ inputs.gcc-major-version }}-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}=${{ inputs.apt-gcc-version }}${{ inputs.apt-gcc-cross-suffix }} \
libxrandr-dev libxtst-dev libcups2-dev libasound2-dev
gcc-${{ inputs.gcc-major-version }}-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}=${{ inputs.apt-gcc-cross-version }} \
g++-${{ inputs.gcc-major-version }}-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}=${{ inputs.apt-gcc-cross-version }} \
libxrandr-dev libxtst-dev libcups2-dev libasound2-dev \
debian-ports-archive-keyring
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ inputs.gcc-major-version }} 100 --slave /usr/bin/g++ g++ /usr/bin/g++-${{ inputs.gcc-major-version }}
- name: 'Check cache for sysroot'
@@ -113,14 +129,15 @@ jobs:
- name: 'Create sysroot'
run: >
sudo qemu-debootstrap
sudo debootstrap
--arch=${{ matrix.debian-arch }}
--verbose
--include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng-dev
--resolve-deps
buster
$(test -n "${{ matrix.debian-keyring }}" && echo "--keyring=${{ matrix.debian-keyring }}")
${{ matrix.debian-version }}
sysroot
https://httpredir.debian.org/debian/
${{ matrix.debian-repository }}
if: steps.get-cached-sysroot.outputs.cache-hit != 'true'
- name: 'Prepare sysroot'
@@ -128,7 +145,9 @@ jobs:
# Prepare sysroot and remove unused files to minimize cache
sudo chroot sysroot symlinks -cr .
sudo chown ${USER} -R sysroot
rm -rf sysroot/{dev,proc,run,sys}
rm -rf sysroot/{dev,proc,run,sys,var}
rm -rf sysroot/usr/{sbin,bin,share}
rm -rf sysroot/usr/lib/{apt,udev,systemd}
if: steps.get-cached-sysroot.outputs.cache-hit != 'true'
- name: 'Configure'
@@ -143,8 +162,13 @@ jobs:
--openjdk-target=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}
--with-sysroot=sysroot
--with-build-jdk=${{ steps.buildjdk.outputs.jdk-path }}
CC=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-gcc-10
CXX=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-g++-10
--with-jmod-compress=zip-1
CC=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-gcc-${{ inputs.gcc-major-version }}
CXX=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-g++-${{ inputs.gcc-major-version }}
${{ inputs.extra-conf-options }} || (
echo "Dumping config.log:" &&
cat config.log &&
exit 1)
- name: 'Build'
id: build

View File

@@ -42,6 +42,13 @@ on:
required: false
type: string
default: '[ "debug", "release" ]'
gcc-major-version:
required: true
type: string
gcc-package-suffix:
required: false
type: string
default: ''
apt-gcc-version:
required: true
type: string
@@ -55,7 +62,7 @@ on:
jobs:
build-linux:
name: build
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
@@ -101,8 +108,8 @@ jobs:
fi
sudo apt-get update
sudo apt-get install --only-upgrade apt
sudo apt-get install gcc-${{ inputs.apt-gcc-version }} g++-${{ inputs.apt-gcc-version }} libxrandr-dev${{ steps.arch.outputs.suffix }} libxtst-dev${{ steps.arch.outputs.suffix }} libcups2-dev${{ steps.arch.outputs.suffix }} libasound2-dev${{ steps.arch.outputs.suffix }} ${{ inputs.apt-extra-packages }}
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
sudo apt-get install gcc-${{ inputs.gcc-major-version }}${{ inputs.gcc-package-suffix }}=${{ inputs.apt-gcc-version }} g++-${{ inputs.gcc-major-version }}${{ inputs.gcc-package-suffix }}=${{ inputs.apt-gcc-version }} libxrandr-dev${{ steps.arch.outputs.suffix }} libxtst-dev${{ steps.arch.outputs.suffix }} libcups2-dev${{ steps.arch.outputs.suffix }} libasound2-dev${{ steps.arch.outputs.suffix }} ${{ inputs.apt-extra-packages }}
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ inputs.gcc-major-version }} 100 --slave /usr/bin/g++ g++ /usr/bin/g++-${{ inputs.gcc-major-version }}
- name: 'Configure'
run: >
@@ -115,7 +122,11 @@ jobs:
--with-gtest=${{ steps.gtest.outputs.path }}
--enable-jtreg-failure-handler
--with-zlib=system
${{ inputs.extra-conf-options }}
--with-jmod-compress=zip-1
${{ inputs.extra-conf-options }} || (
echo "Dumping config.log:" &&
cat config.log &&
exit 1)
- name: 'Build'
id: build

View File

@@ -97,7 +97,11 @@ jobs:
--with-gtest=${{ steps.gtest.outputs.path }}
--enable-jtreg-failure-handler
--with-zlib=system
${{ inputs.extra-conf-options }}
--with-jmod-compress=zip-1
${{ inputs.extra-conf-options }} || (
echo "Dumping config.log:" &&
cat config.log &&
exit 1)
- name: 'Build'
id: build

View File

@@ -110,7 +110,11 @@ jobs:
--with-gtest=${{ steps.gtest.outputs.path }}
--enable-jtreg-failure-handler
--with-msvc-toolset-version=${{ inputs.msvc-toolset-version }}
${{ inputs.extra-conf-options }}
--with-jmod-compress=zip-1
${{ inputs.extra-conf-options }} || (
echo "Dumping config.log:" &&
cat config.log &&
exit 1)
env:
# We need a minimal PATH on Windows
# Set PATH to "", so just GITHUB_PATH is included

View File

@@ -49,7 +49,7 @@ jobs:
select:
name: 'Select platforms'
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
outputs:
linux-x64: ${{ steps.include.outputs.linux-x64 }}
linux-x86: ${{ steps.include.outputs.linux-x86 }}
@@ -123,7 +123,8 @@ jobs:
uses: ./.github/workflows/build-linux.yml
with:
platform: linux-x64
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
gcc-major-version: '10'
apt-gcc-version: '10.3.0-15ubuntu1'
# The linux-x64 jdk bundle is used as buildjdk for the cross-compile job
if: needs.select.outputs.linux-x64 == 'true' || needs.select.outputs.linux-cross-compile == 'true'
@@ -133,11 +134,13 @@ jobs:
uses: ./.github/workflows/build-linux.yml
with:
platform: linux-x86
apt-gcc-version: '10-multilib'
gcc-major-version: '10'
gcc-package-suffix: '-multilib'
apt-gcc-version: '10.3.0-15ubuntu1'
apt-architecture: 'i386'
# Some multilib libraries do not have proper inter-dependencies, so we have to
# install their dependencies manually.
apt-extra-packages: 'libfreetype6-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386'
apt-extra-packages: 'libfreetype6-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386 libc6-i386'
extra-conf-options: '--with-target-bits=32'
if: needs.select.outputs.linux-x86 == 'true'
@@ -149,7 +152,8 @@ jobs:
platform: linux-x64
make-target: 'hotspot'
debug-levels: '[ "debug" ]'
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
gcc-major-version: '10'
apt-gcc-version: '10.3.0-15ubuntu1'
extra-conf-options: '--disable-precompiled-headers'
if: needs.select.outputs.linux-x64-variants == 'true'
@@ -161,7 +165,8 @@ jobs:
platform: linux-x64
make-target: 'hotspot'
debug-levels: '[ "debug" ]'
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
gcc-major-version: '10'
apt-gcc-version: '10.3.0-15ubuntu1'
extra-conf-options: '--with-jvm-variants=zero --disable-precompiled-headers'
if: needs.select.outputs.linux-x64-variants == 'true'
@@ -173,7 +178,8 @@ jobs:
platform: linux-x64
make-target: 'hotspot'
debug-levels: '[ "debug" ]'
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
gcc-major-version: '10'
apt-gcc-version: '10.3.0-15ubuntu1'
extra-conf-options: '--with-jvm-variants=minimal --disable-precompiled-headers'
if: needs.select.outputs.linux-x64-variants == 'true'
@@ -186,7 +192,8 @@ jobs:
make-target: 'hotspot'
# Technically this is not the "debug" level, but we can't inject a new matrix state for just this job
debug-levels: '[ "debug" ]'
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
gcc-major-version: '10'
apt-gcc-version: '10.3.0-15ubuntu1'
extra-conf-options: '--with-debug-level=optimized --disable-precompiled-headers'
if: needs.select.outputs.linux-x64-variants == 'true'
@@ -196,6 +203,10 @@ jobs:
- select
- build-linux-x64
uses: ./.github/workflows/build-cross-compile.yml
with:
gcc-major-version: '10'
apt-gcc-version: '10.3.0-15ubuntu1'
apt-gcc-cross-version: '10.3.0-8ubuntu1cross1'
if: needs.select.outputs.linux-cross-compile == 'true'
build-macos-x64:
@@ -223,7 +234,7 @@ jobs:
uses: ./.github/workflows/build-windows.yml
with:
platform: windows-x64
msvc-toolset-version: '14.25'
msvc-toolset-version: '14.29'
msvc-toolset-architecture: 'x86.x64'
if: needs.select.outputs.windows-x64 == 'true'
@@ -251,7 +262,7 @@ jobs:
with:
platform: linux-x64
bootjdk-platform: linux-x64
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
test-linux-x86:
name: linux-x86
@@ -261,7 +272,7 @@ jobs:
with:
platform: linux-x86
bootjdk-platform: linux-x64
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
test-macos-x64:
name: macos-x64
@@ -286,7 +297,7 @@ jobs:
# Remove bundles so they are not misconstrued as binary distributions from the JDK project
remove-bundles:
name: 'Remove bundle artifacts'
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
if: always()
needs:
- build-linux-x64

View File

@@ -1,11 +1,64 @@
# Welcome to the JDK!
## Wakefield
This is a temporary section created to host information on the
[Wakefield](https://wiki.openjdk.java.net/display/wakefield) project.
### Building
There are two addition `configure` arguments:
```
--with-wayland specify prefix directory for the wayland package
(expecting the headers under PATH/include)
--with-wayland-include specify directory for the wayland include files
```
As usual, there should be no need to specify those explicitly unless you're doing
something tricky.
However, a variant of `libwayland-dev` needs to be installed on the build system.
### Running
Make sure your system is configured such that `libwayland` can find the socket to connect to;
usually this means that the environment variable `WAYLAND_DISPLAY` is set to something
sensible. Then add this argument to `java`
```
-Dawt.toolkit.name=WLToolkit
```
### Testing
Testing that involves `Robot` is done inside a [Weston](https://gitlab.freedesktop.org/wayland/weston/)
instance with a special module loaded called `libwakefield`
that provides the necessary functionality. The Wayland-specific tests are therefore executed with a dedicated test driver
`test/jdk/java/awt/wakefield/WakefieldTestDriver.java`. The driver also provides an easy
way to run the test in several configurations with a different size and even number
of "outputs" (monitors).
To run the Wayland-specific tests, perform these steps:
* Install Weston version 9 (earlier versions are known NOT to work).
* Obtain `libwakefield.so` either by building from source (available under
`src/java.desktop/share/native/libwakefield` and not integrated into the rest of the
build infrastructure; see `README.md` there)
or by fetching the latest pre-built `x64` binary
```
wget https://github.com/mkartashev/wakefield/raw/main/libwakefield.so
```
* Set `LIBWAKEFIELD` environment variable to the full path to `libwakefield.so`
```
export LIBWAKEFIELD=/tmp/wakefield-testing/libwakefield.so
```
* Run `jtreg` like so
```
jtreg -e:XDG_RUNTIME_DIR -e:LIBWAKEFIELD -testjdk:... test/jdk/java/awt/wakefield/
```
This was verified to work in `Ubuntu 21.10`.
This does NOT work in `Ubuntu 21.04` or `Fedora 34`.
## Generic Info (not Wakefield-specific)
For build instructions please see the
[online documentation](https://openjdk.java.net/groups/build/doc/building.html),
[online documentation](https://openjdk.org/groups/build/doc/building.html),
or either of these files:
- [doc/building.html](doc/building.html) (html version)
- [doc/building.md](doc/building.md) (markdown version)
See <https://openjdk.java.net/> for more information about
See <https://openjdk.org/> for more information about
the OpenJDK Community and the JDK.

View File

@@ -215,14 +215,28 @@ replace_template_dir "$IDEA_OUTPUT"
CLASSES=$IDEA_OUTPUT/classes
if [ "x$ANT_HOME" = "x" ] ; then
# try some common locations, before giving up
if [ -f "/usr/share/ant/lib/ant.jar" ] ; then
ANT_HOME="/usr/share/ant"
elif [ -f "/usr/local/Cellar/ant/1.9.4/libexec/lib/ant.jar" ] ; then
ANT_HOME="/usr/local/Cellar/ant/1.9.4/libexec"
else
echo "FATAL: cannot find ant. Try setting ANT_HOME." >&2; exit 1
fi
# try some common locations
if [ -f "/usr/share/ant/lib/ant.jar" ] ; then
ANT_HOME="/usr/share/ant"
else
try_ant=$(ls /opt/homebrew/Cellar/ant/*/libexec/lib/ant.jar 2> /dev/null | sort -r | head -n 1)
if [ "x$try_ant" != "x" ] ; then
ANT_HOME=$(cd $(dirname $try_ant)/.. && pwd)
else
try_ant=$(ls /usr/local/Cellar/ant/*/libexec/lib/ant.jar 2> /dev/null | sort -r | head -n 1)
if [ "x$try_ant" != "x" ] ; then
ANT_HOME=$(cd $(dirname $try_ant)/.. && pwd)
fi
fi
fi
else
if [ ! -f "$ANT_HOME/lib/ant.jar" ] ; then
echo "FATAL: ANT_HOME is incorrect. Try removing it and use autodetection, or fix the value" >&2; exit 1
fi
fi
if [ "x$ANT_HOME" = "x" ] ; then
echo "FATAL: cannot find ant. Try setting ANT_HOME." >&2; exit 1
fi
CP=$ANT_HOME/lib/ant.jar
rm -rf $CLASSES; mkdir $CLASSES
@@ -230,7 +244,7 @@ rm -rf $CLASSES; mkdir $CLASSES
# If we have a Windows boot JDK, we need a .exe suffix
if [ -e "$BOOT_JDK/bin/java.exe" ] ; then
JAVAC=javac.exe
else
else
JAVAC=javac
fi

View File

@@ -70,6 +70,9 @@
<li><a href="#make-control-variables">Make Control Variables</a></li>
</ul></li>
<li><a href="#running-tests">Running Tests</a></li>
<li><a href="#signing">Signing</a><ul>
<li><a href="#macos-1">macOS</a></li>
</ul></li>
<li><a href="#cross-compiling">Cross-compiling</a><ul>
<li><a href="#cross-compiling-the-easy-way-with-openjdk-devkits">Cross compiling the easy way with OpenJDK devkits</a></li>
<li><a href="#boot-jdk-and-build-jdk">Boot JDK and Build JDK</a></li>
@@ -112,13 +115,14 @@
<li><a href="#developing-the-build-system-itself">Developing the Build System Itself</a></li>
</ul></li>
<li><a href="#contributing-to-the-jdk">Contributing to the JDK</a></li>
<li><a href="#editing-this-document">Editing this document</a></li>
</ul>
</nav>
<h2 id="tldr-instructions-for-the-impatient">TL;DR (Instructions for the Impatient)</h2>
<p>If you are eager to try out building the JDK, these simple steps works most of the time. They assume that you have installed Git (and Cygwin if running on Windows) and cloned the top-level JDK repository that you want to build.</p>
<ol type="1">
<li><p><a href="#getting-the-source-code">Get the complete source code</a>:<br />
<code>git clone https://git.openjdk.java.net/jdk/</code></p></li>
<code>git clone https://git.openjdk.org/jdk/</code></p></li>
<li><p><a href="#running-configure">Run configure</a>:<br />
<code>bash configure</code></p>
<p>If <code>configure</code> fails due to missing dependencies (to either the <a href="#native-compiler-toolchain-requirements">toolchain</a>, <a href="#build-tools-requirements">build tools</a>, <a href="#external-library-requirements">external libraries</a> or the <a href="#boot-jdk-requirements">boot JDK</a>), most of the time it prints a suggestion on how to resolve the situation on your platform. Follow the instructions, and try running <code>bash configure</code> again.</p></li>
@@ -132,9 +136,9 @@
<p>If any of these steps failed, or if you want to know more about build requirements or build functionality, please continue reading this document.</p>
<h2 id="introduction">Introduction</h2>
<p>The JDK is a complex software project. Building it requires a certain amount of technical expertise, a fair number of dependencies on external software, and reasonably powerful hardware.</p>
<p>If you just want to use the JDK and not build it yourself, this document is not for you. See for instance <a href="http://openjdk.java.net/install">OpenJDK installation</a> for some methods of installing a prebuilt JDK.</p>
<p>If you just want to use the JDK and not build it yourself, this document is not for you. See for instance <a href="http://openjdk.org/install">OpenJDK installation</a> for some methods of installing a prebuilt JDK.</p>
<h2 id="getting-the-source-code">Getting the Source Code</h2>
<p>Make sure you are getting the correct version. As of JDK 10, the source is no longer split into separate repositories so you only need to clone one single repository. At the <a href="https://git.openjdk.java.net/">OpenJDK Git site</a> you can see a list of all available repositories. If you want to build an older version, e.g. JDK 11, it is recommended that you get the <code>jdk11u</code> repo, which contains incremental updates, instead of the <code>jdk11</code> repo, which was frozen at JDK 11 GA.</p>
<p>Make sure you are getting the correct version. As of JDK 10, the source is no longer split into separate repositories so you only need to clone one single repository. At the <a href="https://git.openjdk.org/">OpenJDK Git site</a> you can see a list of all available repositories. If you want to build an older version, e.g. JDK 11, it is recommended that you get the <code>jdk11u</code> repo, which contains incremental updates, instead of the <code>jdk11</code> repo, which was frozen at JDK 11 GA.</p>
<p>If you are new to Git, a good place to start is the book <a href="https://git-scm.com/book/en/v2">Pro Git</a>. The rest of this document assumes a working knowledge of Git.</p>
<h3 id="special-considerations">Special Considerations</h3>
<p>For a smooth building experience, it is recommended that you follow these rules on where and how to check out the source code.</p>
@@ -148,7 +152,7 @@
<li><p>Do not put the JDK clone in a path under your Cygwin home directory. This is especially important if your user name contains spaces and/or mixed upper and lower case letters.</p></li>
<li><p>You need to install a git client. You have two choices, Cygwin git or Git for Windows. Unfortunately there are pros and cons with each choice.</p>
<ul>
<li><p>The Cygwin <code>git</code> client has no line ending issues and understands Cygwin paths (which are used throughout the JDK build system). However, it does not currently work well with the Skara CLI tooling. Please see the <a href="https://wiki.openjdk.java.net/display/SKARA/Skara#Skara-Git">Skara wiki on Git clients</a> for up-to-date information about the Skara git client support.</p></li>
<li><p>The Cygwin <code>git</code> client has no line ending issues and understands Cygwin paths (which are used throughout the JDK build system). However, it does not currently work well with the Skara CLI tooling. Please see the <a href="https://wiki.openjdk.org/display/SKARA/Skara#Skara-Git">Skara wiki on Git clients</a> for up-to-date information about the Skara git client support.</p></li>
<li><p>The <a href="https://gitforwindows.org">Git for Windows</a> client has issues with line endings, and do not understand Cygwin paths. It does work well with the Skara CLI tooling, however. To alleviate the line ending problems, make sure you set <code>core.autocrlf</code> to <code>false</code> (this is asked during installation).</p></li>
</ul></li>
</ul>
@@ -194,7 +198,7 @@
</tbody>
</table>
<p>The double version numbers for Linux are due to the hybrid model used at Oracle, where header files and external libraries from an older version are used when building on a more modern version of the OS.</p>
<p>The Build Group has a wiki page with <a href="https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms">Supported Build Platforms</a>. From time to time, this is updated by contributors to list successes or failures of building on different platforms.</p>
<p>The Build Group has a wiki page with <a href="https://wiki.openjdk.org/display/Build/Supported+Build+Platforms">Supported Build Platforms</a>. From time to time, this is updated by contributors to list successes or failures of building on different platforms.</p>
<h3 id="windows">Windows</h3>
<p>Windows XP is not a supported platform, but all newer Windows should be able to build the JDK.</p>
<p>On Windows, it is important that you pay attention to the instructions in the <a href="#special-considerations">Special Considerations</a>.</p>
@@ -233,7 +237,7 @@
<p>For Alpine Linux, aside from basic tooling, install the GNU versions of some programs:</p>
<pre><code>sudo apk add build-base bash grep zip</code></pre>
<h3 id="aix">AIX</h3>
<p>Please consult the AIX section of the <a href="https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms">Supported Build Platforms</a> OpenJDK Build Wiki page for details about which versions of AIX are supported.</p>
<p>Please consult the AIX section of the <a href="https://wiki.openjdk.org/display/Build/Supported+Build+Platforms">Supported Build Platforms</a> OpenJDK Build Wiki page for details about which versions of AIX are supported.</p>
<h2 id="native-compiler-toolchain-requirements">Native Compiler (Toolchain) Requirements</h2>
<p>Large portions of the JDK consists of native code, that needs to be compiled to be able to run on the target platform. In theory, toolchain and operating system should be independent factors, but in practice there's more or less a one-to-one correlation between target operating system and toolchain.</p>
<table>
@@ -300,11 +304,11 @@
<p>It is advisable to keep an older version of Xcode for building the JDK when updating Xcode. This <a href="http://iosdevelopertips.com/xcode/install-multiple-versions-of-xcode.html">blog page</a> has good suggestions on managing multiple Xcode versions. To use a specific version of Xcode, use <code>xcode-select -s</code> before running <code>configure</code>, or use <code>--with-toolchain-path</code> to point to the version of Xcode to use, e.g. <code>configure --with-toolchain-path=/Applications/Xcode8.app/Contents/Developer/usr/bin</code></p>
<p>If you have recently (inadvertently) updated your OS and/or Xcode version, and the JDK can no longer be built, please see the section on <a href="#problems-with-the-build-environment">Problems with the Build Environment</a>, and <a href="#getting-help">Getting Help</a> to find out if there are any recent, non-merged patches available for this update.</p>
<h3 id="microsoft-visual-studio">Microsoft Visual Studio</h3>
<p>For aarch64 machines running Windows the minimum accepted version is Visual Studio 2019 (16.8 or higher). For all other platforms the minimum accepted version of Visual Studio is 2017. Older versions will not be accepted by <code>configure</code> and will not work. For all platforms the maximum accepted version of Visual Studio is 2022.</p>
<p>If you have multiple versions of Visual Studio installed, <code>configure</code> will by default pick the latest. You can request a specific version to be used by setting <code>--with-toolchain-version</code>, e.g. <code>--with-toolchain-version=2017</code>.</p>
<p>The minimum accepted version is Visual Studio 2019 version 16.8. (Note that this version is often presented as &quot;MSVC 14.28&quot;, and reported by cl.exe as 19.28.) Older versions will not be accepted by <code>configure</code> and will not work. The maximum accepted version of Visual Studio is 2022.</p>
<p>If you have multiple versions of Visual Studio installed, <code>configure</code> will by default pick the latest. You can request a specific version to be used by setting <code>--with-toolchain-version</code>, e.g. <code>--with-toolchain-version=2022</code>.</p>
<p>If you have Visual Studio installed but <code>configure</code> fails to detect it, it may be because of <a href="#spaces-in-path">spaces in path</a>.</p>
<h3 id="ibm-xl-cc">IBM XL C/C++</h3>
<p>Please consult the AIX section of the <a href="https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms">Supported Build Platforms</a> OpenJDK Build Wiki page for details about which versions of XLC are supported.</p>
<p>Please consult the AIX section of the <a href="https://wiki.openjdk.org/display/Build/Supported+Build+Platforms">Supported Build Platforms</a> OpenJDK Build Wiki page for details about which versions of XLC are supported.</p>
<h2 id="boot-jdk-requirements">Boot JDK Requirements</h2>
<p>Paradoxically, building the JDK requires a pre-existing JDK. This is called the &quot;boot JDK&quot;. The boot JDK does not, however, have to be a JDK built directly from the source code available in the OpenJDK Community. If you are porting the JDK to a new platform, chances are that there already exists another JDK for that platform that is usable as boot JDK.</p>
<p>The rule of thumb is that the boot JDK for building JDK major version <em>N</em> should be a JDK of major version <em>N-1</em>, so for building JDK 9 a JDK 8 would be suitable as boot JDK. However, the JDK should be able to &quot;build itself&quot;, so an up-to-date build of the current JDK source is an acceptable alternative. If you are following the <em>N-1</em> rule, make sure you've got the latest update version, since JDK 8 GA might not be able to build JDK 9 on all platforms.</p>
@@ -508,8 +512,8 @@
<li><code>SPEC_FILTER</code></li>
</ul>
<h2 id="running-tests">Running Tests</h2>
<p>Most of the JDK tests are using the <a href="http://openjdk.java.net/jtreg">JTReg</a> test framework. Make sure that your configuration knows where to find your installation of JTReg. If this is not picked up automatically, use the <code>--with-jtreg=&lt;path to jtreg home&gt;</code> option to point to the JTReg framework. Note that this option should point to the JTReg home, i.e. the top directory, containing <code>lib/jtreg.jar</code> etc.</p>
<p>The <a href="https://wiki.openjdk.java.net/display/Adoption">Adoption Group</a> provides recent builds of jtreg <a href="https://ci.adoptopenjdk.net/view/Dependencies/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/">here</a>. Download the latest <code>.tar.gz</code> file, unpack it, and point <code>--with-jtreg</code> to the <code>jtreg</code> directory that you just unpacked.</p>
<p>Most of the JDK tests are using the <a href="http://openjdk.org/jtreg">JTReg</a> test framework. Make sure that your configuration knows where to find your installation of JTReg. If this is not picked up automatically, use the <code>--with-jtreg=&lt;path to jtreg home&gt;</code> option to point to the JTReg framework. Note that this option should point to the JTReg home, i.e. the top directory, containing <code>lib/jtreg.jar</code> etc.</p>
<p>The <a href="https://wiki.openjdk.org/display/Adoption">Adoption Group</a> provides recent builds of jtreg <a href="https://ci.adoptopenjdk.net/view/Dependencies/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/">here</a>. Download the latest <code>.tar.gz</code> file, unpack it, and point <code>--with-jtreg</code> to the <code>jtreg</code> directory that you just unpacked.</p>
<p>Building of Hotspot Gtest suite requires the source code of Google Test framework. The top directory, which contains both <code>googletest</code> and <code>googlemock</code> directories, should be specified via <code>--with-gtest</code>. The supported version of Google Test is 1.8.1, whose source code can be obtained:</p>
<ul>
<li>by downloading and unpacking the source bundle from <a href="https://github.com/google/googletest/releases/tag/release-1.8.1">here</a></li>
@@ -518,6 +522,12 @@
<p>To execute the most basic tests (tier 1), use:</p>
<pre><code>make run-test-tier1</code></pre>
<p>For more details on how to run tests, please see <strong>Testing the JDK</strong> (<a href="testing.html">html</a>, <a href="testing.md">markdown</a>).</p>
<h2 id="signing">Signing</h2>
<h3 id="macos-1">macOS</h3>
<p>Modern versions of macOS require applications to be signed and notarizied before distribution. See Apple's documentation for more background on what this means and how it works. To help support this, the JDK build can be configured to automatically sign all native binaries, and the JDK bundle, with all the options needed for successful notarization, as well as all the entitlements required by the JDK. To enable <code>hardened</code> signing, use configure parameter <code>--with-macosx-codesign=hardened</code> and configure the signing identity you wish to use with <code>--with-macosx-codesign-identity=&lt;identity&gt;</code>. The identity refers to a signing identity from Apple that needs to be preinstalled on the build host.</p>
<p>When not signing for distribution with the hardened option, the JDK build will still attempt to perform <code>adhoc</code> signing to add the special entitlement <code>com.apple.security.get-task-allow</code> to each binary. This entitlement is required to be able to dump core files from a process. Note that adding this entitlement makes the build invalid for notarization, so it is only added when signing in <code>debug</code> mode. To explicitly enable this kind of adhoc signing, use configure parameter <code>--with-macosx-codesign=debug</code>. It will be enabled by default in most cases.</p>
<p>It's also possible to completely disable any explicit codesign operations done by the JDK build using the configure parameter <code>--without-macosx-codesign</code>. The exact behavior then depends on the architecture. For macOS on x64, it (at least at the time of this writing) results in completely unsigned binaries that should still work fine for development and debugging purposes. On aarch64, the Xcode linker will apply a default &quot;adhoc&quot; signing, without any entitlements. Such a build does not allow dumping core files.</p>
<p>The default mode &quot;auto&quot; will try for <code>hardened</code> signing if the debug level is <code>release</code> and either the default identity or the specified identity is valid. If hardened isn't possible, then <code>debug</code> signing is chosen if it works. If nothing works, the codesign build step is disabled.</p>
<h2 id="cross-compiling">Cross-compiling</h2>
<p>Cross-compiling means using one platform (the <em>build</em> platform) to generate output that can ran on another platform (the <em>target</em> platform).</p>
<p>The typical reason for cross-compiling is that the build is performed on a more powerful desktop computer, but the resulting binaries will be able to run on a different, typically low-performing system. Most of the complications that arise when building for embedded is due to this separation of <em>build</em> and <em>target</em> systems.</p>
@@ -886,7 +896,7 @@ spawn failed</code></pre>
<h4 id="spaces-in-path">Spaces in Path</h4>
<p>On Windows, when configuring, <code>fixpath.sh</code> may report that some directory names have spaces. Usually, it assumes those directories have <a href="https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/fsutil-8dot3name">short paths</a>. You can run <code>fsutil file setshortname</code> in <code>cmd</code> on certain directories, such as <code>Microsoft Visual Studio</code> or <code>Windows Kits</code>, to assign arbitrary short paths so <code>configure</code> can access them.</p>
<h3 id="getting-help">Getting Help</h3>
<p>If none of the suggestions in this document helps you, or if you find what you believe is a bug in the build system, please contact the Build Group by sending a mail to <a href="mailto:build-dev@openjdk.java.net">build-dev@openjdk.java.net</a>. Please include the relevant parts of the configure and/or build log.</p>
<p>If none of the suggestions in this document helps you, or if you find what you believe is a bug in the build system, please contact the Build Group by sending a mail to <a href="mailto:build-dev@openjdk.org">build-dev@openjdk.org</a>. Please include the relevant parts of the configure and/or build log.</p>
<p>If you need general help or advice about developing for the JDK, you can also contact the Adoption Group. See the section on <a href="#contributing-to-openjdk">Contributing to OpenJDK</a> for more information.</p>
<h2 id="reproducible-builds">Reproducible Builds</h2>
<p>Build reproducibility is the property of getting exactly the same bits out when building, every time, independent on who builds the product, or where. This is for many reasons a harder goal than it initially appears, but it is an important goal, for security reasons and others. Please see <a href="https://reproducible-builds.org">Reproducible Builds</a> for more information about the background and reasons for reproducible builds.</p>
@@ -1027,11 +1037,13 @@ test-support/</code></pre>
<pre><code>make COMPARE_BUILD=CONF=--enable-new-hotspot-feature:MAKE=hotspot</code></pre>
<p>See <code>make/InitSupport.gmk</code> for details on how to use <code>COMPARE_BUILD</code>.</p>
<p>To analyze build performance, run with <code>LOG=trace</code> and check <code>$BUILD/build-trace-time.log</code>. Use <code>JOBS=1</code> to avoid parallelism.</p>
<p>Please check that you adhere to the <a href="http://openjdk.java.net/groups/build/doc/code-conventions.html">Code Conventions for the Build System</a> before submitting patches.</p>
<p>Please check that you adhere to the <a href="http://openjdk.org/groups/build/doc/code-conventions.html">Code Conventions for the Build System</a> before submitting patches.</p>
<h2 id="contributing-to-the-jdk">Contributing to the JDK</h2>
<p>So, now you've built your JDK, and made your first patch, and want to contribute it back to the OpenJDK Community.</p>
<p>First of all: Thank you! We gladly welcome your contribution. However, please bear in mind that the JDK is a massive project, and we must ask you to follow our rules and guidelines to be able to accept your contribution.</p>
<p>The official place to start is the <a href="http://openjdk.java.net/contribute/">'How to contribute' page</a>. There is also an official (but somewhat outdated and skimpy on details) <a href="http://openjdk.java.net/guide/">Developer's Guide</a>.</p>
<p>If this seems overwhelming to you, the Adoption Group is there to help you! A good place to start is their <a href="https://wiki.openjdk.java.net/display/Adoption/New+Contributor">'New Contributor' page</a>, or start reading the comprehensive <a href="https://adoptopenjdk.gitbooks.io/adoptopenjdk-getting-started-kit/en/">Getting Started Kit</a>. The Adoption Group will also happily answer any questions you have about contributing. Contact them by <a href="http://mail.openjdk.java.net/mailman/listinfo/adoption-discuss">mail</a> or <a href="http://openjdk.java.net/irc/">IRC</a>.</p>
<p>The official place to start is the <a href="http://openjdk.org/contribute/">'How to contribute' page</a>. There is also an official (but somewhat outdated and skimpy on details) <a href="http://openjdk.org/guide/">Developer's Guide</a>.</p>
<p>If this seems overwhelming to you, the Adoption Group is there to help you! A good place to start is their <a href="https://wiki.openjdk.org/display/Adoption/New+Contributor">'New Contributor' page</a>, or start reading the comprehensive <a href="https://adoptopenjdk.gitbooks.io/adoptopenjdk-getting-started-kit/en/">Getting Started Kit</a>. The Adoption Group will also happily answer any questions you have about contributing. Contact them by <a href="http://mail.openjdk.org/mailman/listinfo/adoption-discuss">mail</a> or <a href="http://openjdk.org/irc/">IRC</a>.</p>
<h2 id="editing-this-document">Editing this document</h2>
<p>If you want to contribute changes to this document, edit <code>doc/building.md</code> and then run <code>make update-build-docs</code> to generate the same changes in <code>doc/building.html</code>.</p>
</body>
</html>

View File

@@ -7,7 +7,7 @@ the time. They assume that you have installed Git (and Cygwin if running
on Windows) and cloned the top-level JDK repository that you want to build.
1. [Get the complete source code](#getting-the-source-code): \
`git clone https://git.openjdk.java.net/jdk/`
`git clone https://git.openjdk.org/jdk/`
2. [Run configure](#running-configure): \
`bash configure`
@@ -40,14 +40,14 @@ reasonably powerful hardware.
If you just want to use the JDK and not build it yourself, this document is not
for you. See for instance [OpenJDK installation](
http://openjdk.java.net/install) for some methods of installing a prebuilt
http://openjdk.org/install) for some methods of installing a prebuilt
JDK.
## Getting the Source Code
Make sure you are getting the correct version. As of JDK 10, the source is no
longer split into separate repositories so you only need to clone one single
repository. At the [OpenJDK Git site](https://git.openjdk.java.net/) you
repository. At the [OpenJDK Git site](https://git.openjdk.org/) you
can see a list of all available repositories. If you want to build an older version,
e.g. JDK 11, it is recommended that you get the `jdk11u` repo, which contains
incremental updates, instead of the `jdk11` repo, which was frozen at JDK 11 GA.
@@ -96,7 +96,7 @@ on where and how to check out the source code.
Cygwin paths (which are used throughout the JDK build system).
However, it does not currently work well with the Skara CLI tooling.
Please see the [Skara wiki on Git clients](
https://wiki.openjdk.java.net/display/SKARA/Skara#Skara-Git) for
https://wiki.openjdk.org/display/SKARA/Skara#Skara-Git) for
up-to-date information about the Skara git client support.
* The [Git for Windows](https://gitforwindows.org) client has issues
@@ -173,7 +173,7 @@ used at Oracle, where header files and external libraries from an older version
are used when building on a more modern version of the OS.
The Build Group has a wiki page with [Supported Build Platforms](
https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms). From
https://wiki.openjdk.org/display/Build/Supported+Build+Platforms). From
time to time, this is updated by contributors to list successes or failures of
building on different platforms.
@@ -303,7 +303,7 @@ sudo apk add build-base bash grep zip
### AIX
Please consult the AIX section of the [Supported Build Platforms](
https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms) OpenJDK
https://wiki.openjdk.org/display/Build/Supported+Build+Platforms) OpenJDK
Build Wiki page for details about which versions of AIX are supported.
## Native Compiler (Toolchain) Requirements
@@ -382,14 +382,14 @@ available for this update.
### Microsoft Visual Studio
For aarch64 machines running Windows the minimum accepted version is Visual Studio 2019
(16.8 or higher). For all other platforms the minimum accepted version of
Visual Studio is 2017. Older versions will not be accepted by `configure` and will
not work. For all platforms the maximum accepted version of Visual Studio is 2022.
The minimum accepted version is Visual Studio 2019 version 16.8. (Note that this
version is often presented as "MSVC 14.28", and reported by cl.exe as 19.28.)
Older versions will not be accepted by `configure` and will not work. The
maximum accepted version of Visual Studio is 2022.
If you have multiple versions of Visual Studio installed, `configure` will by
default pick the latest. You can request a specific version to be used by
setting `--with-toolchain-version`, e.g. `--with-toolchain-version=2017`.
setting `--with-toolchain-version`, e.g. `--with-toolchain-version=2022`.
If you have Visual Studio installed but `configure` fails to detect it, it may
be because of [spaces in path](#spaces-in-path).
@@ -397,7 +397,7 @@ be because of [spaces in path](#spaces-in-path).
### IBM XL C/C++
Please consult the AIX section of the [Supported Build Platforms](
https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms) OpenJDK
https://wiki.openjdk.org/display/Build/Supported+Build+Platforms) OpenJDK
Build Wiki page for details about which versions of XLC are supported.
@@ -848,14 +848,14 @@ Suggestions for Advanced Users](#hints-and-suggestions-for-advanced-users) and
## Running Tests
Most of the JDK tests are using the [JTReg](http://openjdk.java.net/jtreg)
Most of the JDK tests are using the [JTReg](http://openjdk.org/jtreg)
test framework. Make sure that your configuration knows where to find your
installation of JTReg. If this is not picked up automatically, use the
`--with-jtreg=<path to jtreg home>` option to point to the JTReg framework.
Note that this option should point to the JTReg home, i.e. the top directory,
containing `lib/jtreg.jar` etc.
The [Adoption Group](https://wiki.openjdk.java.net/display/Adoption) provides
The [Adoption Group](https://wiki.openjdk.org/display/Adoption) provides
recent builds of jtreg [here](
https://ci.adoptopenjdk.net/view/Dependencies/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/).
Download the latest `.tar.gz` file, unpack it, and point `--with-jtreg` to the
@@ -877,6 +877,42 @@ make run-test-tier1
For more details on how to run tests, please see **Testing the JDK**
([html](testing.html), [markdown](testing.md)).
## Signing
### macOS
Modern versions of macOS require applications to be signed and notarizied before
distribution. See Apple's documentation for more background on what this means
and how it works. To help support this, the JDK build can be configured to
automatically sign all native binaries, and the JDK bundle, with all the options
needed for successful notarization, as well as all the entitlements required by
the JDK. To enable `hardened` signing, use configure parameter
`--with-macosx-codesign=hardened` and configure the signing identity you wish to
use with `--with-macosx-codesign-identity=<identity>`. The identity refers to a
signing identity from Apple that needs to be preinstalled on the build host.
When not signing for distribution with the hardened option, the JDK build will
still attempt to perform `adhoc` signing to add the special entitlement
`com.apple.security.get-task-allow` to each binary. This entitlement is required
to be able to dump core files from a process. Note that adding this entitlement
makes the build invalid for notarization, so it is only added when signing in
`debug` mode. To explicitly enable this kind of adhoc signing, use configure
parameter `--with-macosx-codesign=debug`. It will be enabled by default in most
cases.
It's also possible to completely disable any explicit codesign operations done
by the JDK build using the configure parameter `--without-macosx-codesign`.
The exact behavior then depends on the architecture. For macOS on x64, it (at
least at the time of this writing) results in completely unsigned binaries that
should still work fine for development and debugging purposes. On aarch64, the
Xcode linker will apply a default "adhoc" signing, without any entitlements.
Such a build does not allow dumping core files.
The default mode "auto" will try for `hardened` signing if the debug level is
`release` and either the default identity or the specified identity is valid.
If hardened isn't possible, then `debug` signing is chosen if it works. If
nothing works, the codesign build step is disabled.
## Cross-compiling
Cross-compiling means using one platform (the *build* platform) to generate
@@ -1512,7 +1548,7 @@ You can run `fsutil file setshortname` in `cmd` on certain directories, such as
If none of the suggestions in this document helps you, or if you find what you
believe is a bug in the build system, please contact the Build Group by sending
a mail to [build-dev@openjdk.java.net](mailto:build-dev@openjdk.java.net).
a mail to [build-dev@openjdk.org](mailto:build-dev@openjdk.org).
Please include the relevant parts of the configure and/or build log.
If you need general help or advice about developing for the JDK, you can also
@@ -1922,7 +1958,7 @@ To analyze build performance, run with `LOG=trace` and check `$BUILD/build-trace
Use `JOBS=1` to avoid parallelism.
Please check that you adhere to the [Code Conventions for the Build System](
http://openjdk.java.net/groups/build/doc/code-conventions.html) before
http://openjdk.org/groups/build/doc/code-conventions.html) before
submitting patches.
## Contributing to the JDK
@@ -1935,19 +1971,25 @@ However, please bear in mind that the JDK is a massive project, and we must ask
you to follow our rules and guidelines to be able to accept your contribution.
The official place to start is the ['How to contribute' page](
http://openjdk.java.net/contribute/). There is also an official (but somewhat
http://openjdk.org/contribute/). There is also an official (but somewhat
outdated and skimpy on details) [Developer's Guide](
http://openjdk.java.net/guide/).
http://openjdk.org/guide/).
If this seems overwhelming to you, the Adoption Group is there to help you! A
good place to start is their ['New Contributor' page](
https://wiki.openjdk.java.net/display/Adoption/New+Contributor), or start
https://wiki.openjdk.org/display/Adoption/New+Contributor), or start
reading the comprehensive [Getting Started Kit](
https://adoptopenjdk.gitbooks.io/adoptopenjdk-getting-started-kit/en/). The
Adoption Group will also happily answer any questions you have about
contributing. Contact them by [mail](
http://mail.openjdk.java.net/mailman/listinfo/adoption-discuss) or [IRC](
http://openjdk.java.net/irc/).
http://mail.openjdk.org/mailman/listinfo/adoption-discuss) or [IRC](
http://openjdk.org/irc/).
## Editing this document
If you want to contribute changes to this document, edit `doc/building.md` and
then run `make update-build-docs` to generate the same changes in
`doc/building.html`.
---
# Override styles from the base CSS file that are not ideal for this document.

View File

@@ -68,8 +68,8 @@
<h3 id="counterexamples-and-updates">Counterexamples and Updates</h3>
<p>Many of the guidelines mentioned here have (sometimes widespread) counterexamples in the HotSpot code base. Finding a counterexample is not sufficient justification for new code to follow the counterexample as a precedent, since readers of your code will rightfully expect your code to follow the greater bulk of precedents documented here.</p>
<p>Occasionally a guideline mentioned here may be just out of synch with the actual HotSpot code base. If you find that a guideline is consistently contradicted by a large number of counterexamples, please bring it up for discussion and possible change. The architectural rule, of course, is &quot;When in Rome do as the Romans&quot;. Sometimes in the suburbs of Rome the rules are a little different; these differences can be pointed out here.</p>
<p>Proposed changes should be discussed on the <a href="mailto:hotspot-dev@openjdk.java.net">HotSpot Developers</a> mailing list. Changes are likely to be cautious and incremental, since HotSpot coders have been using these guidelines for years.</p>
<p>Substantive changes are approved by <a href="https://www.rfc-editor.org/rfc/rfc7282.html">rough consensus</a> of the <a href="https://openjdk.java.net/census#hotspot">HotSpot Group</a> Members. The Group Lead determines whether consensus has been reached.</p>
<p>Proposed changes should be discussed on the <a href="mailto:hotspot-dev@openjdk.org">HotSpot Developers</a> mailing list. Changes are likely to be cautious and incremental, since HotSpot coders have been using these guidelines for years.</p>
<p>Substantive changes are approved by <a href="https://www.rfc-editor.org/rfc/rfc7282.html">rough consensus</a> of the <a href="https://openjdk.org/census#hotspot">HotSpot Group</a> Members. The Group Lead determines whether consensus has been reached.</p>
<p>Editorial changes (changes that only affect the description of HotSpot style, not its substance) do not require the full consensus gathering process. The normal HotSpot pull request process may be used for editorial changes, with the additional requirement that the requisite reviewers are also HotSpot Group Members.</p>
<h2 id="structure-and-formatting">Structure and Formatting</h2>
<h3 id="factoring-and-class-design">Factoring and Class Design</h3>
@@ -238,7 +238,7 @@ while ( test_foo(args...) ) { // No, excess spaces around control</code></pre></
<p>Some reasons for this include</p>
<ul>
<li><p>Exceptions. Perhaps the largest core issue with adopting the use of Standard Library facilities is exceptions. HotSpot does not use exceptions and, for platforms which allow doing so, builds with them turned off. Many Standard Library facilities implicitly or explicitly use exceptions.</p></li>
<li><p><code>assert</code>. An issue that is quickly encountered is the <code>assert</code> macro name collision (<a href="https://bugs.openjdk.java.net/browse/JDK-8007770">JDK-8007770</a>). Some mechanism for addressing this would be needed before much of the Standard Library could be used. (Not all Standard Library implementations use assert in header files, but some do.)</p></li>
<li><p><code>assert</code>. An issue that is quickly encountered is the <code>assert</code> macro name collision (<a href="https://bugs.openjdk.org/browse/JDK-8007770">JDK-8007770</a>). Some mechanism for addressing this would be needed before much of the Standard Library could be used. (Not all Standard Library implementations use assert in header files, but some do.)</p></li>
<li><p>Memory allocation. HotSpot requires explicit control over where allocations occur. The C++98/03 <code>std::allocator</code> class is too limited to support our usage. (Changes in more recent Standards may remove this limitation.)</p></li>
<li><p>Implementation vagaries. Bugs, or simply different implementation choices, can lead to different behaviors among the various Standard Libraries we need to deal with.</p></li>
<li><p>Inconsistent naming conventions. HotSpot and the C++ Standard use different naming conventions. The coexistence of those different conventions might appear jarring and reduce readability.</p></li>
@@ -272,7 +272,7 @@ while ( test_foo(args...) ) { // No, excess spaces around control</code></pre></
<p>Due to bugs in certain (very old) compilers, there is widespread use of enums and avoidance of in-class initialization of static integral constant members. Compilers having such bugs are no longer supported. Except where an enum is semantically appropriate, new code should use integral constants.</p>
<h3 id="thread_local">thread_local</h3>
<p>Avoid use of <code>thread_local</code> (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2659.htm">n2659</a>); and instead, use the HotSpot macro <code>THREAD_LOCAL</code>, for which the initializer must be a constant expression. When <code>thread_local</code> must be used, use the Hotspot macro <code>APPROVED_CPP_THREAD_LOCAL</code> to indicate that the use has been given appropriate consideration.</p>
<p>As was discussed in the review for <a href="https://mail.openjdk.java.net/pipermail/hotspot-dev/2019-September/039487.html">JDK-8230877</a>, <code>thread_local</code> allows dynamic initialization and destruction semantics. However, that support requires a run-time penalty for references to non-function-local <code>thread_local</code> variables defined in a different translation unit, even if they don't need dynamic initialization. Dynamic initialization and destruction of non-local <code>thread_local</code> variables also has the same ordering problems as for ordinary non-local variables. So we avoid use of <code>thread_local</code> in general, limiting its use to only those cases where dynamic initialization or destruction are essential. See <a href="https://bugs.openjdk.java.net/browse/JDK-8282469">JDK-8282469</a> for further discussion.</p>
<p>As was discussed in the review for <a href="https://mail.openjdk.org/pipermail/hotspot-dev/2019-September/039487.html">JDK-8230877</a>, <code>thread_local</code> allows dynamic initialization and destruction semantics. However, that support requires a run-time penalty for references to non-function-local <code>thread_local</code> variables defined in a different translation unit, even if they don't need dynamic initialization. Dynamic initialization and destruction of non-local <code>thread_local</code> variables also has the same ordering problems as for ordinary non-local variables. So we avoid use of <code>thread_local</code> in general, limiting its use to only those cases where dynamic initialization or destruction are essential. See <a href="https://bugs.openjdk.org/browse/JDK-8282469">JDK-8282469</a> for further discussion.</p>
<h3 id="nullptr">nullptr</h3>
<p>Prefer <code>nullptr</code> (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf">n2431</a>) to <code>NULL</code>. Don't use (constexpr or literal) 0 for pointers.</p>
<p>For historical reasons there are widespread uses of both <code>NULL</code> and of integer 0 as a pointer value.</p>
@@ -448,7 +448,6 @@ while ( test_foo(args...) ) { // No, excess spaces around control</code></pre></
<li><p><code>[[deprecated]]</code> attribute (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3760.html">n3760</a>) — Not relevant in HotSpot code.</p></li>
<li><p>Avoid most operator overloading, preferring named functions. When operator overloading is used, ensure the semantics conform to the normal expected behavior of the operation.</p></li>
<li><p>Avoid most implicit conversion constructors and (implicit or explicit) conversion operators. (Note that conversion to <code>bool</code> isn't needed in HotSpot code because of the &quot;no implicit boolean&quot; guideline.)</p></li>
<li><p>Avoid covariant return types.</p></li>
<li><p>Avoid <code>goto</code> statements.</p></li>
</ul>
<h3 id="undecided-features">Undecided Features</h3>

View File

@@ -55,13 +55,13 @@ suburbs of Rome the rules are a little different; these differences
can be pointed out here.
Proposed changes should be discussed on the
[HotSpot Developers](mailto:hotspot-dev@openjdk.java.net) mailing
[HotSpot Developers](mailto:hotspot-dev@openjdk.org) mailing
list. Changes are likely to be cautious and incremental, since HotSpot
coders have been using these guidelines for years.
Substantive changes are approved by
[rough consensus](https://www.rfc-editor.org/rfc/rfc7282.html) of
the [HotSpot Group](https://openjdk.java.net/census#hotspot) Members.
the [HotSpot Group](https://openjdk.org/census#hotspot) Members.
The Group Lead determines whether consensus has been reached.
Editorial changes (changes that only affect the description of HotSpot
@@ -550,7 +550,7 @@ turned off. Many Standard Library facilities implicitly or explicitly
use exceptions.
* `assert`. An issue that is quickly encountered is the `assert` macro name
collision ([JDK-8007770](https://bugs.openjdk.java.net/browse/JDK-8007770)).
collision ([JDK-8007770](https://bugs.openjdk.org/browse/JDK-8007770)).
Some mechanism for addressing this would be needed before much of the
Standard Library could be used. (Not all Standard Library implementations
use assert in header files, but some do.)
@@ -661,7 +661,7 @@ be a constant expression. When `thread_local` must be used, use the Hotspot macr
consideration.
As was discussed in the review for
[JDK-8230877](https://mail.openjdk.java.net/pipermail/hotspot-dev/2019-September/039487.html),
[JDK-8230877](https://mail.openjdk.org/pipermail/hotspot-dev/2019-September/039487.html),
`thread_local` allows dynamic initialization and destruction
semantics. However, that support requires a run-time penalty for
references to non-function-local `thread_local` variables defined in a
@@ -671,7 +671,7 @@ non-local `thread_local` variables also has the same ordering
problems as for ordinary non-local variables. So we avoid use of
`thread_local` in general, limiting its use to only those cases where dynamic
initialization or destruction are essential. See
[JDK-8282469](https://bugs.openjdk.java.net/browse/JDK-8282469)
[JDK-8282469](https://bugs.openjdk.org/browse/JDK-8282469)
for further discussion.
### nullptr
@@ -1120,8 +1120,6 @@ normal expected behavior of the operation.
conversion operators. (Note that conversion to `bool` isn't needed
in HotSpot code because of the "no implicit boolean" guideline.)
* Avoid covariant return types.
* Avoid `goto` statements.
### Undecided Features

View File

@@ -46,6 +46,7 @@
<li><a href="#pkcs11-tests">PKCS11 Tests</a></li>
<li><a href="#client-ui-tests">Client UI Tests</a></li>
</ul></li>
<li><a href="#editing-this-document">Editing this document</a></li>
</ul>
</nav>
<h2 id="using-make-test-the-run-test-framework">Using &quot;make test&quot; (the run-test framework)</h2>
@@ -64,6 +65,9 @@ $ make exploded-test TEST=tier2</code></pre>
<h3 id="configuration">Configuration</h3>
<p>To be able to run JTReg tests, <code>configure</code> needs to know where to find the JTReg test framework. If it is not picked up automatically by configure, use the <code>--with-jtreg=&lt;path to jtreg home&gt;</code> option to point to the JTReg framework. Note that this option should point to the JTReg home, i.e. the top directory, containing <code>lib/jtreg.jar</code> etc. (An alternative is to set the <code>JT_HOME</code> environment variable to point to the JTReg home before running <code>configure</code>.)</p>
<p>To be able to run microbenchmarks, <code>configure</code> needs to know where to find the JMH dependency. Use <code>--with-jmh=&lt;path to JMH jars&gt;</code> to point to a directory containing the core JMH and transitive dependencies. The recommended dependencies can be retrieved by running <code>sh make/devkit/createJMHBundle.sh</code>, after which <code>--with-jmh=build/jmh/jars</code> should work.</p>
<p>When tests fail or timeout, jtreg runs its failure handler to capture necessary data from the system where the test was run. This data can then be used to analyze the test failures. Collecting this data involves running various commands (which are listed in files residing in <code>test/failure_handler/src/share/conf</code>) and some of these commands use <code>sudo</code>. If the system's <code>sudoers</code> file isn't configured to allow running these commands, then it can result in password being prompted during the failure handler execution. Typically, when running locally, collecting this additional data isn't always necessary. To disable running the failure handler, use <code>--enable-jtreg-failure-handler=no</code> when running <code>configure</code>. If, however, you want to let the failure handler to run and don't want to be prompted for sudo password, then you can configure your <code>sudoers</code> file appropriately. Please read the necessary documentation of your operating system to see how to do that; here we only show one possible way of doing that - edit the <code>/etc/sudoers.d/sudoers</code> file to include the following line:</p>
<pre><code>johndoe ALL=(ALL) NOPASSWD: /sbin/dmesg</code></pre>
<p>This line configures <code>sudo</code> to <em>not</em> prompt for password for the <code>/sbin/dmesg</code> command (this is one of the commands that is listed in the files at <code>test/failure_handler/src/share/conf</code>), for the user <code>johndoe</code>. Here <code>johndoe</code> is the user account under which the jtreg tests are run. Replace the username with a relevant user account of your system.</p>
<h2 id="test-selection">Test selection</h2>
<p>All functionality is available using the <code>test</code> make target. In this use case, the test or tests to be executed is controlled using the <code>TEST</code> variable. To speed up subsequent test runs with no source code changes, <code>test-only</code> can be used instead, which do not depend on the source and test image build.</p>
<p>For some common top-level tests, direct make targets have been generated. This includes all JTReg test groups, the hotspot gtest, and custom tests (if present). This means that <code>make test-tier1</code> is equivalent to <code>make test TEST=&quot;tier1&quot;</code>, but the latter is more tab-completion friendly. For more complex test runs, the <code>test TEST=&quot;x&quot;</code> solution needs to be used.</p>
@@ -82,7 +86,7 @@ $ make exploded-test TEST=tier2</code></pre>
<li><p><code>tier4</code>: This test group includes every other test not covered by previous tiers. It includes, for example, <code>vmTestbase</code> suites for Hotspot, which run for many hours even on large machines. It also runs GUI tests, so the same <code>TEST_JOBS</code> and <code>JTREG_KEYWORDS</code> caveats apply.</p></li>
</ul>
<h3 id="jtreg">JTReg</h3>
<p>JTReg tests can be selected either by picking a JTReg test group, or a selection of files or directories containing JTReg tests.</p>
<p>JTReg tests can be selected either by picking a JTReg test group, or a selection of files or directories containing JTReg tests. Documentation can be found at <a href="https://openjdk.org/jtreg/">https://openjdk.org/jtreg/</a>, note especially the extensive <a href="https://openjdk.org/jtreg/faq.html">FAQ</a>.</p>
<p>JTReg test groups can be specified either without a test root, e.g. <code>:tier1</code> (or <code>tier1</code>, the initial colon is optional), or with, e.g. <code>hotspot:tier1</code>, <code>test/jdk:jdk_util</code> or <code>$(TOPDIR)/test/hotspot/jtreg:hotspot_all</code>. The test root can be specified either as an absolute path, or a path relative to the JDK top directory, or the <code>test</code> directory. For simplicity, the hotspot JTReg test root, which really is <code>hotspot/jtreg</code> can be abbreviated as just <code>hotspot</code>.</p>
<p>When specified without a test root, all matching groups from all test roots will be added. Otherwise, only the group from the specified test root will be added.</p>
<p>Individual JTReg tests or directories containing JTReg tests can also be specified, like <code>test/hotspot/jtreg/native_sanity/JniVersion.java</code> or <code>hotspot/jtreg/native_sanity</code>. Just like for test root selection, you can either specify an absolute path (which can even point to JTReg tests outside the source tree), or a path relative to either the JDK top directory or the <code>test</code> directory. <code>hotspot</code> can be used as an alias for <code>hotspot/jtreg</code> here as well.</p>
@@ -251,5 +255,7 @@ $ make test JTREG=&quot;VM_OPTIONS=-Duser.language=en -Duser.country=US&quot; TE
<h4 id="windows">Windows</h4>
<p>Type <code>gpedit</code> in the Search and then click Edit group policy; navigate to User Configuration -&gt; Administrative Templates -&gt; Windows Components -&gt; File Explorer; in the right-side pane look for &quot;Turn off Windows key hotkeys&quot; and double click on it; enable or disable hotkeys.</p>
<p>Note: restart is required to make the settings take effect.</p>
<h2 id="editing-this-document">Editing this document</h2>
<p>If you want to contribute changes to this document, edit <code>doc/testing.md</code> and then run <code>make update-build-docs</code> to generate the same changes in <code>doc/testing.html</code>.</p>
</body>
</html>

View File

@@ -43,6 +43,31 @@ containing the core JMH and transitive dependencies. The recommended
dependencies can be retrieved by running `sh make/devkit/createJMHBundle.sh`,
after which `--with-jmh=build/jmh/jars` should work.
When tests fail or timeout, jtreg runs its failure handler to capture necessary
data from the system where the test was run. This data can then be used to
analyze the test failures. Collecting this data involves running various commands
(which are listed in files residing in `test/failure_handler/src/share/conf`)
and some of these commands use `sudo`. If the system's `sudoers` file isn't
configured to allow running these commands, then it can result in password being
prompted during the failure handler execution. Typically, when running locally,
collecting this additional data isn't always necessary. To disable running the
failure handler, use `--enable-jtreg-failure-handler=no` when running `configure`.
If, however, you want to let the failure handler to run and don't want to be
prompted for sudo password, then you can configure your `sudoers` file
appropriately. Please read the necessary documentation of your operating system
to see how to do that; here we only show one possible way of doing that - edit
the `/etc/sudoers.d/sudoers` file to include the following line:
```
johndoe ALL=(ALL) NOPASSWD: /sbin/dmesg
```
This line configures `sudo` to _not_ prompt for password for the `/sbin/dmesg`
command (this is one of the commands that is listed in the files
at `test/failure_handler/src/share/conf`), for the user `johndoe`. Here `johndoe`
is the user account under which the jtreg tests are run. Replace the username
with a relevant user account of your system.
## Test selection
All functionality is available using the `test` make target. In this use case,
@@ -113,7 +138,9 @@ apply.
### JTReg
JTReg tests can be selected either by picking a JTReg test group, or a selection
of files or directories containing JTReg tests.
of files or directories containing JTReg tests. Documentation can be found at
[https://openjdk.org/jtreg/](https://openjdk.org/jtreg/), note especially the
extensive [FAQ](https://openjdk.org/jtreg/faq.html).
JTReg test groups can be specified either without a test root, e.g. `:tier1`
(or `tier1`, the initial colon is optional), or with, e.g. `hotspot:tier1`,
@@ -578,6 +605,12 @@ double click on it; enable or disable hotkeys.
Note: restart is required to make the settings take effect.
## Editing this document
If you want to contribute changes to this document, edit `doc/testing.md` and
then run `make update-build-docs` to generate the same changes in
`doc/testing.html`.
---
# Override some definitions in the global css file that are not optimal for
# this document.

View File

@@ -278,16 +278,7 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
$(SYMBOLS_EXCLUDE_PATTERN), \
$(ALL_JRE_FILES))
# On Macosx release builds, when there is a code signing certificate available,
# the final bundle layout can be signed.
SIGN_BUNDLE := false
ifeq ($(call isTargetOs, macosx)+$(DEBUG_LEVEL), true+release)
ifneq ($(CODESIGN), )
SIGN_BUNDLE := true
endif
endif
ifeq ($(SIGN_BUNDLE), true)
ifeq ($(MACOSX_CODESIGN_MODE), hardened)
# Macosx release build and code signing available.
################################################################################

View File

@@ -189,7 +189,7 @@ $(eval $(call SetupBuildDemo, Font2DTest, \
$(eval $(call SetupBuildDemo, J2Ddemo, \
DEMO_SUBDIR := jfc, \
MAIN_CLASS := java2d.J2Ddemo, \
DISABLED_WARNINGS := rawtypes deprecation unchecked cast, \
DISABLED_WARNINGS := rawtypes deprecation unchecked cast lossy-conversions, \
JAR_NAME := J2Ddemo, \
))

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2022, 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
@@ -48,6 +48,30 @@ $(BUILDTOOLS_OUTPUTDIR)/gensrc/%.interim/module-info.java: \
TARGETS += $(patsubst %, $(BUILDTOOLS_OUTPUTDIR)/gensrc/%/module-info.java, \
$(INTERIM_LANGTOOLS_MODULES))
################################################################################
# Generate interim versions of the ToolProvider.java files for the interim
# langtools modules, which will allow to load javac from the interim
# jdk.compiler.
INTERIM_TOOL_PROVIDER_PATTERN := \
$(foreach m, $(INTERIM_LANGTOOLS_BASE_MODULES), -e 's/"$m"/"$m.interim"/g')
$(BUILDTOOLS_OUTPUTDIR)/gensrc/java.compiler.interim/javax/tools/ToolProvider.java: \
$(TOPDIR)/src/java.compiler/share/classes/javax/tools/ToolProvider.java
$(call LogInfo, Generating ToolProvider.java for java.compiler.interim)
$(call MakeDir, $(@D))
$(SED) $(INTERIM_TOOL_PROVIDER_PATTERN) $< > $@
java.compiler.interim_EXTRA_FILES := \
$(BUILDTOOLS_OUTPUTDIR)/gensrc/java.compiler.interim/javax/tools/ToolProvider.java
TARGETS += $(BUILDTOOLS_OUTPUTDIR)/gensrc/java.compiler.interim/javax/tools/ToolProvider.java
################################################################################
# Use the up-to-date PreviewFeature.java and NoPreview.java from the current
# sources, instead of the versions from the boot JDK, as javac may be referring
# to constants from the up-to-date versions.
$(eval $(call SetupCopyFiles, COPY_PREVIEW_FEATURES, \
FILES := $(TOPDIR)/src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java \
$(TOPDIR)/src/java.base/share/classes/jdk/internal/javac/NoPreview.java, \
@@ -73,8 +97,10 @@ define SetupInterimModule
$(TOPDIR)/src/$1/share/classes, \
EXCLUDES := sun javax/tools/snippet-files, \
EXCLUDE_FILES := $(TOPDIR)/src/$1/share/classes/module-info.java \
$(TOPDIR)/src/$1/share/classes/javax/tools/ToolProvider.java \
Standard.java, \
EXTRA_FILES := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim/module-info.java, \
EXTRA_FILES := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim/module-info.java \
$($1.interim_EXTRA_FILES), \
COPY := .gif .png .xml .css .svg .js .js.template .txt javax.tools.JavaCompilerTool, \
BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules/$1.interim, \
DISABLED_WARNINGS := module options, \

View File

@@ -121,8 +121,8 @@ TARGETS += $($(MODULE))
# Since the other modules are declared in different invocations of this file,
# use the macro to find the correct target file to depend on.
# Only the javac compilation actually depends on other modules so limit
# dependency declaration to that by using the *_COMPILE_TARGET variable.
$($(MODULE)_COMPILE_TARGET): $(foreach d, $(call FindDepsForModule, $(MODULE)), \
# dependency declaration to that by using the *_MODFILELIST variable.
$($(MODULE)_MODFILELIST): $(foreach d, $(call FindDepsForModule, $(MODULE)), \
$(call SetupJavaCompilationApiTarget, $d, \
$(if $($d_BIN), $($d_BIN), $(JDK_OUTPUTDIR)/modules/$d)))

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2022, 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
@@ -77,6 +77,13 @@ $(eval $(call SetupJavaCompilation, COMPILE_DEPEND, \
INCLUDES := build/tools/depend, \
BIN := $(BUILDTOOLS_OUTPUTDIR)/depend, \
DISABLED_WARNINGS := options, \
JAVAC_FLAGS := \
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED, \
))
DEPEND_SERVICE_PROVIDER := $(BUILDTOOLS_OUTPUTDIR)/depend/META-INF/services/com.sun.source.util.Plugin

View File

@@ -226,6 +226,20 @@ else
JMOD_FLAGS += --exclude '**{_the.*,_*.marker*,*.diz,*.debuginfo,*.dSYM/**,*.dSYM}'
endif
# Unless we are creating a very large module, use the small tool JVM options
JMOD_SMALL_FLAGS :=
ifeq ($(findstring $(MODULE), java.base java.desktop jdk.localedata), )
JMOD_SMALL_FLAGS += $(JAVA_TOOL_FLAGS_SMALL)
endif
ifeq ($(INTERIM_JMOD), true)
# Interim JMODs are not shipped anywhere, so there is no reason
# to compress them at all.
JMOD_FLAGS += --compress zip-0
else
JMOD_FLAGS += --compress $(JMOD_COMPRESS)
endif
# Create jmods in the support dir and then move them into place to keep the
# module path in $(IMAGES_OUTPUTDIR)/jmods valid at all times.
$(eval $(call SetupExecute, create_$(JMOD_FILE), \
@@ -234,7 +248,7 @@ $(eval $(call SetupExecute, create_$(JMOD_FILE), \
OUTPUT_FILE := $(JMODS_DIR)/$(JMOD_FILE), \
SUPPORT_DIR := $(JMODS_SUPPORT_DIR), \
PRE_COMMAND := $(RM) $(JMODS_DIR)/$(JMOD_FILE) $(JMODS_SUPPORT_DIR)/$(JMOD_FILE), \
COMMAND := $(JMOD) create --module-version $(VERSION_SHORT) \
COMMAND := $(JMOD) $(JMOD_SMALL_FLAGS) create --module-version $(VERSION_SHORT) \
--target-platform '$(OPENJDK_MODULE_TARGET_PLATFORM)' \
--module-path $(JMODS_DIR) $(JMOD_FLAGS) \
--date $(SOURCE_DATE_ISO_8601) \

View File

@@ -69,8 +69,6 @@ JAVADOC_TAGS := \
-tag beaninfo:X \
-tag revised:X \
-tag since.unbundled:X \
-tag spec:X \
-tag specdefault:X \
-tag Note:X \
-tag ToDo:X \
-tag 'apiNote:a:API Note:' \
@@ -86,6 +84,7 @@ JAVADOC_TAGS := \
-tag since \
-tag serialData \
-tag factory \
-tag spec \
-tag see \
-taglet build.tools.taglet.ExtLink \
-taglet build.tools.taglet.Incubating \

View File

@@ -134,7 +134,7 @@ epilogue: check-bad-file-names
$(ECHO) '* The build README (doc/building.md) is a great source of information,'
$(ECHO) 'especially the chapter "Fixing Unexpected Build Failures". Check it out!'
$(ECHO)
$(ECHO) '* If you still need assistance please contact build-dev@openjdk.java.net.'
$(ECHO) '* If you still need assistance please contact build-dev@openjdk.org.'
$(ECHO)
TARGETS += epilogue

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2022, 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
@@ -48,6 +48,7 @@ JIMAGE_PKGS := \
$(eval $(call SetupJavaCompilation, BUILD_JRTFS, \
COMPILER := bootjdk, \
DISABLED_WARNINGS := options, \
TARGET_RELEASE := $(TARGET_RELEASE_JDK8), \
SRC := $(TOPDIR)/src/java.base/share/classes, \
EXCLUDE_FILES := module-info.java, \

View File

@@ -854,7 +854,7 @@ define SetupRunJtregTestBody
-dir:$$(JTREG_TOPDIR) \
-reportDir:$$($1_TEST_RESULTS_DIR) \
-workDir:$$($1_TEST_SUPPORT_DIR) \
-status:$$$${JTREG_STATUS} \
$$$${JTREG_STATUS} \
$$(JTREG_OPTIONS) \
$$(JTREG_FAILURE_HANDLER_OPTIONS) \
$$(JTREG_COV_OPTIONS) \
@@ -1185,13 +1185,11 @@ ifeq ($(TEST_OPTS_JCOV), true)
JCOV_SOURCE_DIFF := $(JCOV_OUTPUT_DIR)/source_diff
JCOV_DIFF_COVERAGE_REPORT := $(JCOV_OUTPUT_DIR)/diff_coverage_report
ifneq ($(and $(HG), $(wildcard $(TOPDIR)/.hg)), )
DIFF_COMMAND := $(HG) -R $(TOPDIR) diff -r $(TEST_OPTS_JCOV_DIFF_CHANGESET) > $(JCOV_SOURCE_DIFF)
else ifneq ($(and $(GIT), $(wildcard $(TOPDIR)/.git)), )
ifneq ($(and $(GIT), $(wildcard $(TOPDIR)/.git)), )
DIFF_COMMAND := $(GIT) -C $(TOPDIR) diff $(TEST_OPTS_JCOV_DIFF_CHANGESET) > $(JCOV_SOURCE_DIFF)
else
$(info Error: Must be either hg or git source tree for diff coverage.)
$(error Neither hg nor git source tree.)
$(info Error: Must be a git source tree for diff coverage.)
$(error No git source tree.)
endif
jcov-gen-diffcoverage: jcov-stop-grabber

View File

@@ -169,7 +169,6 @@ ZIPEXE := zip
UNZIP := unzip
EXPR := expr
FILE := file
HG := hg
ULIMIT := ulimit
ifeq ($(OPENJDK_BUILD_OS), windows)

View File

@@ -42,11 +42,7 @@ $(eval $(call IncludeCustomExtension, SourceRevision-pre.gmk))
STORED_SOURCE_REVISION := $(TOPDIR)/.src-rev
USE_SCM := false
ifneq ($(and $(HG), $(wildcard $(TOPDIR)/.hg)), )
USE_SCM := true
SCM_DIR := .hg
ID_COMMAND := $(PRINTF) "hg:%s" "$$($(HG) id -i)"
else ifneq ($(and $(GIT), $(wildcard $(TOPDIR)/.git)), )
ifneq ($(and $(GIT), $(wildcard $(TOPDIR)/.git)), )
USE_SCM := true
SCM_DIR := .git
ID_COMMAND := $(PRINTF) "git:%s%s\n" \
@@ -85,7 +81,7 @@ ifeq ($(USE_SCM), true)
REPO_REVISIONS += $$(SUPPORT_OUTPUTDIR)/src-rev/$$($1_FILENAME)
endef
# Setup rules for all repos. This makes sure all the "hg id" calls are made
# Setup rules for all repos. This makes sure all the "git log" calls are made
# in parallel.
$(foreach repo, $(call FindAllReposRel), \
$(eval $(call SetupGetRevisionForRepo, $(repo))) \

View File

@@ -453,7 +453,7 @@ AC_DEFUN_ONCE([BASIC_CHECK_SRC_PERMS],
# in the source tree when configure runs
file_to_test="$TOPDIR/Makefile"
if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
AC_MSG_ERROR([Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin.])
AC_MSG_ERROR([Bad file permissions on src files. This is usually caused by cloning the repositories with non cygwin tools in a directory not created in cygwin.])
fi
fi
])

View File

@@ -342,7 +342,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
UTIL_LOOKUP_PROGS(READELF, greadelf readelf)
UTIL_LOOKUP_PROGS(DOT, dot)
UTIL_LOOKUP_PROGS(HG, hg)
UTIL_LOOKUP_PROGS(STAT, stat)
UTIL_LOOKUP_PROGS(TIME, time)
UTIL_LOOKUP_PROGS(FLOCK, flock)
@@ -376,41 +375,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
UTIL_REQUIRE_PROGS(MIG, mig)
UTIL_REQUIRE_PROGS(XATTR, xattr)
UTIL_LOOKUP_PROGS(CODESIGN, codesign)
# Check for user provided code signing identity.
UTIL_ARG_WITH(NAME: macosx-codesign-identity, TYPE: string,
DEFAULT: openjdk_codesign, CHECK_VALUE: UTIL_CHECK_STRING_NON_EMPTY,
DESC: [specify the macosx code signing identity],
CHECKING_MSG: [for macosx code signing identity]
)
AC_SUBST(MACOSX_CODESIGN_IDENTITY)
if test "x$CODESIGN" != "x"; then
# Verify that the codesign certificate is present
AC_MSG_CHECKING([if codesign certificate is present])
$RM codesign-testfile
$TOUCH codesign-testfile
$CODESIGN -s "$MACOSX_CODESIGN_IDENTITY" codesign-testfile 2>&AS_MESSAGE_LOG_FD \
>&AS_MESSAGE_LOG_FD || CODESIGN=
$RM codesign-testfile
if test "x$CODESIGN" = x; then
AC_MSG_RESULT([no])
else
AC_MSG_RESULT([yes])
# Verify that the codesign has --option runtime
AC_MSG_CHECKING([if codesign has --option runtime])
$RM codesign-testfile
$TOUCH codesign-testfile
$CODESIGN --option runtime -s "$MACOSX_CODESIGN_IDENTITY" codesign-testfile \
2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD || CODESIGN=
$RM codesign-testfile
if test "x$CODESIGN" = x; then
AC_MSG_ERROR([codesign does not have --option runtime. macOS 10.13.6 and above is required.])
else
AC_MSG_RESULT([yes])
fi
fi
fi
UTIL_REQUIRE_PROGS(SETFILE, SetFile)
fi
if ! test "x$OPENJDK_TARGET_OS" = "xwindows"; then

View File

@@ -40,6 +40,7 @@ export AWK="@AWK@"
export BASH="@BASH@"
export CAT="@CAT@"
export CMP="@CMP@"
export CODESIGN="@CODESIGN@"
export CP="@CP@"
export CUT="@CUT@"
export DIFF="@DIFF@"

View File

@@ -31,7 +31,7 @@
AC_PREREQ([2.69])
AC_INIT(OpenJDK, openjdk, build-dev@openjdk.java.net,,http://openjdk.java.net)
AC_INIT(OpenJDK, openjdk, build-dev@openjdk.org,,https://openjdk.org)
AC_CONFIG_AUX_DIR([$TOPDIR/make/autoconf/build-aux])
m4_include([build-aux/pkg.m4])
@@ -133,6 +133,7 @@ BASIC_SETUP_DEFAULT_LOG
###############################################################################
# We need build & target for this.
JDKOPT_SETUP_JMOD_OPTIONS
JDKOPT_SETUP_JLINK_OPTIONS
JDKVER_SETUP_JDK_VERSION_NUMBERS
@@ -247,6 +248,7 @@ JDKOPT_EXCLUDE_TRANSLATIONS
JDKOPT_ENABLE_DISABLE_MANPAGES
JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE
JDKOPT_ENABLE_DISABLE_COMPATIBLE_CDS_ALIGNMENT
JDKOPT_SETUP_MACOSX_SIGNING
###############################################################################
#

View File

@@ -167,11 +167,7 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS],
CFLAGS_WARNINGS_ARE_ERRORS="-WX"
WARNINGS_ENABLE_ALL="-W3"
DISABLED_WARNINGS="4800"
if test "x$TOOLCHAIN_VERSION" = x2017; then
# VS2017 incorrectly triggers this warning for constexpr
DISABLED_WARNINGS="$DISABLED_WARNINGS 4307"
fi
DISABLED_WARNINGS="4800 5105"
;;
gcc)
@@ -534,25 +530,15 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
TOOLCHAIN_CFLAGS_JVM="-qtbtable=full -qtune=balanced \
-qalias=noansi -qstrict -qtls=default -qnortti -qnoeh -qignerrno -qstackprotect"
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
TOOLCHAIN_CFLAGS_JVM="-nologo -MD -Zc:strictStrings -MP"
TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:strictStrings -Zc:wchar_t-"
TOOLCHAIN_CFLAGS_JVM="-nologo -MD -Zc:preprocessor -Zc:strictStrings -MP"
TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:preprocessor -Zc:strictStrings -Zc:wchar_t-"
fi
# CFLAGS C language level for JDK sources (hotspot only uses C++)
# Ideally we would have a common level across all toolchains so that all sources
# are sure to conform to the same standard. Unfortunately neither our sources nor
# our toolchains are in a condition to support that. But what we loosely aim for is
# C99 level.
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang || test "x$TOOLCHAIN_TYPE" = xxlc; then
# Explicitly set C99. clang and xlclang support the same flag.
LANGSTD_CFLAGS="-std=c99"
LANGSTD_CFLAGS="-std=c11"
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
# MSVC doesn't support C99/C11 explicitly, unless you compile as C++:
# LANGSTD_CFLAGS="-TP"
# but that requires numerous changes to the sources files. So we are limited
# to C89/C90 plus whatever extensions Visual Studio has decided to implement.
# This is the lowest bar for shared code.
LANGSTD_CFLAGS=""
LANGSTD_CFLAGS="-std:c11"
fi
TOOLCHAIN_CFLAGS_JDK_CONLY="$LANGSTD_CFLAGS $TOOLCHAIN_CFLAGS_JDK_CONLY"

View File

@@ -472,6 +472,31 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_STATIC_BUILD],
AC_SUBST(STATIC_BUILD)
])
################################################################################
#
# jmod options.
#
AC_DEFUN_ONCE([JDKOPT_SETUP_JMOD_OPTIONS],
[
# Final JMODs are recompiled often during development, and java.base JMOD
# includes the JVM libraries. In release mode, prefer to compress JMODs fully.
# In debug mode, pay with a little extra space, but win a lot of CPU time back
# with the lightest (but still some) compression.
if test "x$DEBUG_LEVEL" = xrelease; then
DEFAULT_JMOD_COMPRESS="zip-6"
else
DEFAULT_JMOD_COMPRESS="zip-1"
fi
UTIL_ARG_WITH(NAME: jmod-compress, TYPE: literal,
VALID_VALUES: [zip-0 zip-1 zip-2 zip-3 zip-4 zip-5 zip-6 zip-7 zip-8 zip-9],
DEFAULT: $DEFAULT_JMOD_COMPRESS,
CHECKING_MSG: [for JMOD compression type],
DESC: [specify JMOD compression type (zip-[0-9])]
)
AC_SUBST(JMOD_COMPRESS)
])
################################################################################
#
# jlink options.
@@ -696,3 +721,105 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_REPRODUCIBLE_BUILD],
UTIL_DEPRECATED_ARG_ENABLE(reproducible-build)
])
################################################################################
#
# Setup signing on macOS. This can either be setup to sign with a real identity
# and enabling the hardened runtime, or it can simply add the debug entitlement
# com.apple.security.get-task-allow without actually signing any binaries. The
# latter is needed to be able to debug processes and dump core files on modern
# versions of macOS. It can also be skipped completely.
#
# Check if codesign will run with the given parameters
# $1: Parameters to run with
# $2: Checking message
# Sets CODESIGN_SUCCESS=true/false
AC_DEFUN([JDKOPT_CHECK_CODESIGN_PARAMS],
[
PARAMS="$1"
MESSAGE="$2"
CODESIGN_TESTFILE="$CONFIGURESUPPORT_OUTPUTDIR/codesign-testfile"
$RM "$CODESIGN_TESTFILE"
$TOUCH "$CODESIGN_TESTFILE"
CODESIGN_SUCCESS=false
$CODESIGN $PARAMS "$CODESIGN_TESTFILE" 2>&AS_MESSAGE_LOG_FD \
>&AS_MESSAGE_LOG_FD && CODESIGN_SUCCESS=true
$RM "$CODESIGN_TESTFILE"
AC_MSG_CHECKING([$MESSAGE])
if test "x$CODESIGN_SUCCESS" = "xtrue"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
])
AC_DEFUN([JDKOPT_CHECK_CODESIGN_HARDENED],
[
JDKOPT_CHECK_CODESIGN_PARAMS([-s "$MACOSX_CODESIGN_IDENTITY" --option runtime],
[if codesign with hardened runtime is possible])
])
AC_DEFUN([JDKOPT_CHECK_CODESIGN_DEBUG],
[
JDKOPT_CHECK_CODESIGN_PARAMS([-s -], [if debug mode codesign is possible])
])
AC_DEFUN([JDKOPT_SETUP_MACOSX_SIGNING],
[
ENABLE_CODESIGN=false
if test "x$OPENJDK_TARGET_OS" = "xmacosx" && test "x$CODESIGN" != "x"; then
UTIL_ARG_WITH(NAME: macosx-codesign, TYPE: literal, OPTIONAL: true,
VALID_VALUES: [hardened debug auto], DEFAULT: auto,
ENABLED_DEFAULT: true,
CHECKING_MSG: [for macosx code signing mode],
DESC: [set the macosx code signing mode (hardened, debug, auto)]
)
MACOSX_CODESIGN_MODE=disabled
if test "x$MACOSX_CODESIGN_ENABLED" = "xtrue"; then
# Check for user provided code signing identity.
UTIL_ARG_WITH(NAME: macosx-codesign-identity, TYPE: string,
DEFAULT: openjdk_codesign, CHECK_VALUE: UTIL_CHECK_STRING_NON_EMPTY,
DESC: [specify the macosx code signing identity],
CHECKING_MSG: [for macosx code signing identity]
)
AC_SUBST(MACOSX_CODESIGN_IDENTITY)
if test "x$MACOSX_CODESIGN" = "xauto"; then
# Only try to default to hardened signing on release builds
if test "x$DEBUG_LEVEL" = "xrelease"; then
JDKOPT_CHECK_CODESIGN_HARDENED
if test "x$CODESIGN_SUCCESS" = "xtrue"; then
MACOSX_CODESIGN_MODE=hardened
fi
fi
if test "x$MACOSX_CODESIGN_MODE" = "xdisabled"; then
JDKOPT_CHECK_CODESIGN_DEBUG
if test "x$CODESIGN_SUCCESS" = "xtrue"; then
MACOSX_CODESIGN_MODE=debug
fi
fi
AC_MSG_CHECKING([for macosx code signing mode])
AC_MSG_RESULT([$MACOSX_CODESIGN_MODE])
elif test "x$MACOSX_CODESIGN" = "xhardened"; then
JDKOPT_CHECK_CODESIGN_HARDENED
if test "x$CODESIGN_SUCCESS" = "xfalse"; then
AC_MSG_ERROR([Signing with hardened runtime is not possible])
fi
MACOSX_CODESIGN_MODE=hardened
elif test "x$MACOSX_CODESIGN" = "xdebug"; then
JDKOPT_CHECK_CODESIGN_DEBUG
if test "x$CODESIGN_SUCCESS" = "xfalse"; then
AC_MSG_ERROR([Signing in debug mode is not possible])
fi
MACOSX_CODESIGN_MODE=debug
else
AC_MSG_ERROR([unknown value for --with-macosx-codesign: $MACOSX_CODESIGN])
fi
fi
AC_SUBST(MACOSX_CODESIGN_IDENTITY)
AC_SUBST(MACOSX_CODESIGN_MODE)
fi
])

View File

@@ -275,6 +275,8 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_JVMCI],
AC_MSG_RESULT([yes])
elif test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then
AC_MSG_RESULT([yes])
elif test "x$OPENJDK_TARGET_CPU" = "xriscv64"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no, $OPENJDK_TARGET_CPU])
AVAILABLE=false

View File

@@ -28,7 +28,7 @@
################################################################################
# Minimum supported version
JTREG_MINIMUM_VERSION=6.1
JTREG_MINIMUM_VERSION=7
###############################################################################
#

View File

@@ -0,0 +1,94 @@
#
# Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2021, JetBrains s.r.o.. 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. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# 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.
#
################################################################################
# Setup wayland
################################################################################
AC_DEFUN_ONCE([LIB_SETUP_WAYLAND],
[
AC_ARG_WITH(wayland, [AS_HELP_STRING([--with-wayland],
[specify prefix directory for the wayland package
(expecting the headers under PATH/include)])])
AC_ARG_WITH(wayland-include, [AS_HELP_STRING([--with-wayland-include],
[specify directory for the wayland include files])])
if test "x$NEEDS_LIB_WAYLAND" = xfalse; then
if (test "x${with_wayland}" != x && test "x${with_wayland}" != xno) || \
(test "x${with_wayland_include}" != x && test "x${with_wayland_include}" != xno); then
AC_MSG_WARN([[wayland not used, so --with-wayland[-*] is ignored]])
fi
WAYLAND_CFLAGS=
WAYLAND_LIBS=
else
WAYLAND_FOUND=no
if test "x${with_wayland}" = xno || test "x${with_wayland_include}" = xno; then
AC_MSG_ERROR([It is not possible to disable the use of wayland. Remove the --without-wayland option.])
fi
if test "x${with_wayland}" != x; then
AC_MSG_CHECKING([for wayland headers])
if test -s "${with_wayland}/include/wayland-client.h" && test -s "${with_wayland}/include/wayland-cursor.h"; then
WAYLAND_CFLAGS="-I${with_wayland}/include"
WAYLAND_LIBS="-L${with_wayland}/lib -lwayland-client -lwayland-cursor"
WAYLAND_FOUND=yes
AC_MSG_RESULT([$WAYLAND_FOUND])
else
AC_MSG_ERROR([Can't find 'include/wayland-client.h' and 'include/wayland-cursor.h' under ${with_wayland} given with the --with-wayland option.])
fi
fi
if test "x${with_wayland_include}" != x; then
AC_MSG_CHECKING([for wayland headers])
if test -s "${with_wayland_include}/wayland-client.h" && test -s "${with_wayland_include}/wayland-cursor.h"; then
WAYLAND_CFLAGS="-I${with_wayland_include}"
WAYLAND_FOUND=yes
AC_MSG_RESULT([$WAYLAND_FOUND])
else
AC_MSG_ERROR([Can't find 'wayland-client.h' and 'wayland-cursor.h' under ${with_wayland_include} given with the --with-wayland-include option.])
fi
fi
if test "x$WAYLAND_FOUND" = xno; then
# Are the wayland headers installed in the default /usr/include location?
AC_CHECK_HEADERS([wayland-client.h wayland-cursor.h],
[ WAYLAND_FOUND=yes ],
[ WAYLAND_FOUND=no; break ]
)
if test "x$WAYLAND_FOUND" = xyes; then
WAYLAND_CFLAGS=
WAYLAND_LIBS="-lwayland-client -lwayland-cursor"
DEFAULT_WAYLAND=yes
fi
fi
if test "x$WAYLAND_FOUND" = xno; then
HELP_MSG_MISSING_DEPENDENCY([wayland])
AC_MSG_ERROR([Could not find wayland! $HELP_MSG ])
fi
fi
AC_SUBST(WAYLAND_CFLAGS)
AC_SUBST(WAYLAND_LIBS)
])

View File

@@ -33,6 +33,7 @@ m4_include([lib-freetype.m4])
m4_include([lib-hsdis.m4])
m4_include([lib-std.m4])
m4_include([lib-x11.m4])
m4_include([lib-wayland.m4])
m4_include([lib-tests.m4])
@@ -41,14 +42,20 @@ m4_include([lib-tests.m4])
################################################################################
AC_DEFUN_ONCE([LIB_DETERMINE_DEPENDENCIES],
[
# Check if X11 is needed
# Check if X11 and wayland is needed
if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
# No X11 support on windows or macosx
# No X11 and wayland support on windows or macosx
NEEDS_LIB_X11=false
NEEDS_LIB_WAYLAND=false
elif test "x$ENABLE_HEADLESS_ONLY" = xtrue; then
# No X11 support needed when building headless only
NEEDS_LIB_X11=false
NEEDS_LIB_WAYLAND=false
else
# All other instances need X11, even if building headless only, libawt still
# All other instances need X11 and wayland, even if building headless only, libawt still
# needs X11 headers.
NEEDS_LIB_X11=true
NEEDS_LIB_WAYLAND=true
fi
# Check if fontconfig is needed
@@ -105,6 +112,7 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
LIB_SETUP_LIBFFI
LIB_SETUP_MISC_LIBS
LIB_SETUP_X11
LIB_SETUP_WAYLAND
LIB_TESTS_SETUP_GTEST

View File

@@ -453,13 +453,15 @@ endif
# Necessary additional compiler flags to compile X11
X_CFLAGS:=@X_CFLAGS@
X_LIBS:=@X_LIBS@
WAYLAND_CFLAGS:=@WAYLAND_CFLAGS@
WAYLAND_LIBS:=@WAYLAND_LIBS@
# The lowest required version of macosx
MACOSX_VERSION_MIN=@MACOSX_VERSION_MIN@
# The highest allowed version of macosx
MACOSX_VERSION_MAX=@MACOSX_VERSION_MAX@
# The macosx code signing identity to use
# The macosx code signing configuration
MACOSX_CODESIGN_MODE:=@MACOSX_CODESIGN_MODE@
MACOSX_CODESIGN_IDENTITY=@MACOSX_CODESIGN_IDENTITY@
# Toolchain type: gcc, clang, xlc, microsoft...
@@ -664,7 +666,7 @@ JAVAC = $(JAVAC_CMD)
JAVADOC = $(JAVADOC_CMD)
JAR = $(JAR_CMD)
JLINK = $(JLINK_CMD)
JMOD = $(JMOD_CMD) $(JAVA_TOOL_FLAGS_SMALL)
JMOD = $(JMOD_CMD)
BUILD_JAVA_FLAGS := @BOOTCYCLE_JVM_ARGS_BIG@
BUILD_JAVA=@FIXPATH@ $(BUILD_JDK)/bin/java $(BUILD_JAVA_FLAGS)
@@ -701,6 +703,7 @@ JAVADOC_MAIN_CLASS = -m jdk.javadoc.interim/jdk.javadoc.internal.tool.Main
NEW_JAVAC = $(INTERIM_LANGTOOLS_ARGS) $(JAVAC_MAIN_CLASS)
NEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) $(JAVADOC_MAIN_CLASS)
JMOD_COMPRESS:=@JMOD_COMPRESS@
JLINK_KEEP_PACKAGED_MODULES:=@JLINK_KEEP_PACKAGED_MODULES@
RCFLAGS := @RCFLAGS@
@@ -767,7 +770,6 @@ READELF:=@READELF@
EXPR:=@EXPR@
FILE:=@FILE@
DOT:=@DOT@
HG:=@HG@
GIT:=@GIT@
OBJCOPY:=@OBJCOPY@
SETFILE:=@SETFILE@

View File

@@ -52,7 +52,7 @@ TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
# Minimum supported versions, empty means unspecified
TOOLCHAIN_MINIMUM_VERSION_clang="3.5"
TOOLCHAIN_MINIMUM_VERSION_gcc="6.0"
TOOLCHAIN_MINIMUM_VERSION_microsoft="19.10.0.0" # VS2017
TOOLCHAIN_MINIMUM_VERSION_microsoft="19.28.0.0" # VS2019 16.8, aka MSVC 14.28
TOOLCHAIN_MINIMUM_VERSION_xlc=""
# Minimum supported linker versions, empty means unspecified

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2022, 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,21 +25,7 @@
################################################################################
# The order of these defines the priority by which we try to find them.
VALID_VS_VERSIONS="2019 2017 2022"
VS_DESCRIPTION_2017="Microsoft Visual Studio 2017"
VS_VERSION_INTERNAL_2017=141
VS_MSVCR_2017=vcruntime140.dll
VS_MSVCP_2017=msvcp140.dll
VS_ENVVAR_2017="VS150COMNTOOLS"
VS_USE_UCRT_2017="true"
VS_VS_INSTALLDIR_2017="Microsoft Visual Studio/2017"
VS_EDITIONS_2017="BuildTools Community Professional Enterprise"
VS_SDK_INSTALLDIR_2017=
VS_VS_PLATFORM_NAME_2017="v141"
VS_SDK_PLATFORM_NAME_2017=
VS_SUPPORTED_2017=true
VS_TOOLSET_SUPPORTED_2017=true
VALID_VS_VERSIONS="2022 2019"
VS_DESCRIPTION_2019="Microsoft Visual Studio 2019"
VS_VERSION_INTERNAL_2019=142
@@ -84,7 +70,7 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
UTIL_FIXUP_PATH(VS_BASE, NOFAIL)
if test "x$VS_BASE" != x && test -d "$VS_BASE"; then
# In VS 2017 and VS 2019, the default installation is in a subdir named after the edition.
# In VS 2019, the default installation is in a subdir named after the edition.
# Find the first one present and use that.
if test "x$VS_EDITIONS" != x; then
for edition in $VS_EDITIONS; do
@@ -97,20 +83,18 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
AC_MSG_NOTICE([Found Visual Studio installation at $VS_BASE using $METHOD])
if test "x$TARGET_CPU" = xx86; then
VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
VCVARSFILES="vcvars32.bat vcvarsamd64_x86.bat"
elif test "x$TARGET_CPU" = xx86_64; then
VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
VCVARSFILES="vcvars64.bat vcvarsx86_amd64.bat"
elif test "x$TARGET_CPU" = xaarch64; then
# for host x86-64, target aarch64
# aarch64 requires Visual Studio 16.8 or higher
VCVARSFILES="vc/auxiliary/build/vcvarsamd64_arm64.bat \
vc/auxiliary/build/vcvarsx86_arm64.bat"
VCVARSFILES="vcvarsamd64_arm64.bat vcvarsx86_arm64.bat"
fi
for VCVARSFILE in $VCVARSFILES; do
if test -f "$VS_BASE/$VCVARSFILE"; then
VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
if test -f "$VS_BASE/vc/auxiliary/build/$VCVARSFILE"; then
VS_ENV_CMD="$VS_BASE/vc/auxiliary/build/$VCVARSFILE"
break
fi
done
@@ -172,11 +156,9 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT],
# build environment and assigns it to VS_ENV_CMD
AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
[
# VS2017 provides the option to install previous minor versions of the MSVC
# toolsets. It is not possible to directly download earlier minor versions of
# VS2017 and in order to build with a previous minor compiler toolset version,
# it is now possible to compile with earlier minor versions by passing
# -vcvars_ver=<toolset_version> argument to vcvarsall.bat.
# Since VS2017 MS provides the option to install previous minor versions of
# the toolset. In order to build with a previous minor compiler toolset
# version, pass -vcvars_ver=<toolset_version> argument to vcvarsall.bat.
AC_ARG_WITH(msvc-toolset-version, [AS_HELP_STRING([--with-msvc-toolset-version],
[specific MSVC toolset version to use, passed as -vcvars_ver argument to
pass to vcvarsall.bat (Windows only)])])
@@ -494,14 +476,9 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
if test "x$MSVC_DLL" = x; then
if test "x$VCINSTALLDIR" != x; then
if test "$VS_VERSION" -lt 2017; then
# Probe: Using well-known location from Visual Studio 12.0 and older
POSSIBLE_MSVC_DLL="$VCINSTALLDIR/redist/$vs_target_cpu/microsoft.vc${VS_VERSION_INTERNAL}.crt/$DLL_NAME"
else
# Probe: Using well-known location from VS 2017 and VS 2019
POSSIBLE_MSVC_DLL="`ls $VCToolsRedistDir/$vs_target_cpu/microsoft.vc${VS_VERSION_INTERNAL}.crt/$DLL_NAME 2> /dev/null`"
fi
# In case any of the above finds more than one file, loop over them.
# Probe: Using well-known location
POSSIBLE_MSVC_DLL="`ls $VCToolsRedistDir/$vs_target_cpu/microsoft.vc${VS_VERSION_INTERNAL}.crt/$DLL_NAME 2> /dev/null`"
# If the above finds more than one file, loop over them.
for possible_msvc_dll in $POSSIBLE_MSVC_DLL; do
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$possible_msvc_dll],
[well-known location in VCINSTALLDIR])

View File

@@ -402,8 +402,11 @@ define SetupJavaCompilationBody
$1_COMPILE_TARGET := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_batch
$1_FILELIST := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_batch.filelist
$1_MODFILELIST := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_batch.modfiles
$1_MODFILELIST_FIXED := $$($1_MODFILELIST).fixed
$1_API_TARGET := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_pubapi
$1_API_INTERNAL := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_internalapi
# Put headers in a temp dir to filter out those that actually
# changed before copying them to the real header dir.
@@ -437,6 +440,8 @@ define SetupJavaCompilationBody
$1_API_DIGEST_FLAGS := \
-classpath $$(BUILDTOOLS_OUTPUTDIR)/depend \
-Xplugin:"depend $$($1_API_TARGET)" \
"-XDinternalAPIPath=$$($1_API_INTERNAL)" \
"-XDLOG_LEVEL=$(LOG_LEVEL)" \
#
$1_EXTRA_DEPS := $$(BUILDTOOLS_OUTPUTDIR)/depend/_the.COMPILE_DEPEND_batch
@@ -447,16 +452,39 @@ define SetupJavaCompilationBody
# list of files.
$$($1_FILELIST): $$($1_SRCS) $$($1_VARDEPS_FILE)
$$(call MakeDir, $$(@D))
$$(call LogWarn, Compiling $$(words $$($1_SRCS)) files for $1)
$$(call LogWarn, Compiling up to $$(words $$($1_SRCS)) files for $1)
$$(eval $$(call ListPathsSafely, $1_SRCS, $$($1_FILELIST)))
# Create a $$($1_MODFILELIST) file with significant modified dependencies
# (either sources files or the other mark dependencies).
# It is then sent using a side-channel
# to the custom Depend plugin. The Depend plugin will check the provided list
# of modified files, and if none of the Java source files is changed in a way
# observable from outside of the file, and the list of modified files does
# not include a non-Java source file, it will only compile the modified files.
# Otherwise, all module's sources will be compiled. If a non-Java file is included,
# it will be considered to be a significant change, and all module source will
# be recompiled
$$($1_MODFILELIST): $$($1_SRCS) $$($1_DEPENDS) \
$$($1_VARDEPS_FILE) $$($1_EXTRA_DEPS) $$($1_JAVAC_SERVER_CONFIG)
$$(eval $1_MODFILES := $$?)
$$(eval $$(call ListPathsSafely, $1_MODFILES, $$($1_MODFILELIST)))
# Convert the paths in the MODFILELIST file to Windows-style paths
# on Windows. This is needed because javac operates on Windows-style paths
# when running on Windows. On other platforms this just copies the MODFILELIST file.
$$($1_MODFILELIST_FIXED): $$($1_MODFILELIST)
$$(call FixPathFile, $$($1_MODFILELIST), $$($1_MODFILELIST_FIXED))
# Do the actual compilation
$$($1_COMPILE_TARGET): $$($1_SRCS) $$($1_FILELIST) $$($1_DEPENDS) \
$$($1_VARDEPS_FILE) $$($1_EXTRA_DEPS) $$($1_JAVAC_SERVER_CONFIG)
$$($1_VARDEPS_FILE) $$($1_EXTRA_DEPS) $$($1_JAVAC_SERVER_CONFIG) \
$$($1_MODFILELIST_FIXED)
$$(call MakeDir, $$(@D))
$$(call ExecuteWithLog, $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$$($1_SAFE_NAME)_batch, \
$$($1_JAVAC_CMD) $$($1_FLAGS) \
$$($1_API_DIGEST_FLAGS) \
-XDmodifiedInputs=$$($1_MODFILELIST_FIXED) \
-d $$($1_BIN) $$($1_HEADERS_ARG) @$$($1_FILELIST)) && \
$(TOUCH) $$@

View File

@@ -127,14 +127,13 @@ endef
# the build was created from
SOURCE_REVISION_TRACKER := $(SUPPORT_OUTPUTDIR)/src-rev/source-revision-tracker
# Locate all hg repositories included in the forest, as absolute paths
# Locate all sourcecode repositories included in the forest, as absolute paths
FindAllReposAbs = \
$(strip $(sort $(dir $(filter-out $(TOPDIR)/build/%, $(wildcard \
$(addprefix $(TOPDIR)/, .hg */.hg */*/.hg */*/*/.hg */*/*/*/.hg) \
$(addprefix $(TOPDIR)/, .git */.git */*/.git */*/*/.git */*/*/*/.git) \
)))))
# Locate all hg repositories included in the forest, as relative paths
# Locate all sourcecode repositories included in the forest, as relative paths
FindAllReposRel = \
$(strip $(subst $(TOPDIR)/,.,$(patsubst $(TOPDIR)/%/, %, $(FindAllReposAbs))))
@@ -443,12 +442,23 @@ endif
# list.
# This is normally not needed since we use the FIXPATH prefix for command lines,
# but might be needed in certain circumstances.
#
# FixPathFile is the file version of FixPath. It instead takes a file with paths in $1
# and outputs the 'fixed' paths into the file in $2. If the file in $2 already exists
# it is overwritten.
# On non-Windows platforms this instead does a copy, so that $2 can still be used
# as a depenendency of a make rule, instead of having to conditionally depend on
# $1 instead, based on the target platform.
ifeq ($(call isTargetOs, windows), true)
FixPath = \
$(strip $(subst \,\\, $(shell $(FIXPATH_BASE) print $(patsubst $(FIXPATH), , $1))))
FixPathFile = \
$(shell $(FIXPATH_BASE) convert $1 $2)
else
FixPath = \
$1
FixPathFile = \
$(shell $(CP) $1 $2)
endif
################################################################################

View File

@@ -267,10 +267,15 @@ endif
# specialized file is found, returns the default file.
# $1 Executable to find entitlements file for.
ENTITLEMENTS_DIR := $(TOPDIR)/make/data/macosxsigning
DEFAULT_ENTITLEMENTS_FILE := $(ENTITLEMENTS_DIR)/default.plist
ifeq ($(MACOSX_CODESIGN_MODE), debug)
CODESIGN_PLIST_SUFFIX := -debug
else
CODESIGN_PLIST_SUFFIX :=
endif
DEFAULT_ENTITLEMENTS_FILE := $(ENTITLEMENTS_DIR)/default$(CODESIGN_PLIST_SUFFIX).plist
GetEntitlementsFile = \
$(foreach f, $(ENTITLEMENTS_DIR)/$(strip $(notdir $1)).plist, \
$(foreach f, $(ENTITLEMENTS_DIR)/$(strip $(notdir $1))$(CODESIGN_PLIST_SUFFIX).plist, \
$(if $(wildcard $f), $f, $(DEFAULT_ENTITLEMENTS_FILE)) \
)
@@ -338,10 +343,15 @@ define SetupCompileNativeFileBody
endif
endif
ifneq ($(DISABLE_WARNING_PREFIX), )
$1_WARNINGS_FLAGS := $$(addprefix $(DISABLE_WARNING_PREFIX), \
$$($$($1_BASE)_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)_$$($1_FILENAME)))
endif
$1_BASE_CFLAGS := $$($$($1_BASE)_CFLAGS) $$($$($1_BASE)_EXTRA_CFLAGS) \
$$($$($1_BASE)_SYSROOT_CFLAGS)
$$($$($1_BASE)_SYSROOT_CFLAGS) $$($1_WARNINGS_FLAGS)
$1_BASE_CXXFLAGS := $$($$($1_BASE)_CXXFLAGS) $$($$($1_BASE)_EXTRA_CXXFLAGS) \
$$($$($1_BASE)_SYSROOT_CFLAGS) $$($1_EXTRA_CXXFLAGS)
$$($$($1_BASE)_SYSROOT_CFLAGS) $$($1_EXTRA_CXXFLAGS) $$($1_WARNINGS_FLAGS)
$1_BASE_ASFLAGS := $$($$($1_BASE)_ASFLAGS) $$($$($1_BASE)_EXTRA_ASFLAGS)
ifneq ($$(filter %.c, $$($1_FILENAME)), )
@@ -802,7 +812,7 @@ define SetupNativeCompilationBody
ifeq ($(TOOLCHAIN_TYPE), microsoft)
$1_PCH_FILE := $$($1_OBJECT_DIR)/$1.pch
$1_GENERATED_PCH_SRC := $$($1_OBJECT_DIR)/$1_pch.cpp
$1_GENERATED_PCH_OBJ := $$($1_OBJECT_DIR)/$1_pch.obj
$1_GENERATED_PCH_OBJ := $$($1_OBJECT_DIR)/$1_pch$(OBJ_SUFFIX)
$$(eval $$(call SetupCompileNativeFile, $1_$$(notdir $$($1_GENERATED_PCH_SRC)), \
FILE := $$($1_GENERATED_PCH_SRC), \
@@ -909,15 +919,15 @@ define SetupNativeCompilationBody
# For some unknown reason, in this case CL actually outputs the show
# includes to stderr so need to redirect it to hide the output from the
# main log.
$$(call ExecuteWithLog, $$($1_RES_DEPS_FILE).obj, \
$$(call ExecuteWithLog, $$($1_RES_DEPS_FILE)$(OBJ_SUFFIX), \
$$($1_CC) $$(filter-out -l%, $$($1_RCFLAGS)) \
$$($1_SYSROOT_CFLAGS) -showIncludes -nologo -TC \
$(CC_OUT_OPTION)$$($1_RES_DEPS_FILE).obj -P -Fi$$($1_RES_DEPS_FILE).pp \
$(CC_OUT_OPTION)$$($1_RES_DEPS_FILE)$(OBJ_SUFFIX) -P -Fi$$($1_RES_DEPS_FILE).pp \
$$($1_VERSIONINFO_RESOURCE)) 2>&1 \
| $(TR) -d '\r' | $(GREP) -v -e "^Note: including file:" \
-e "^$$(notdir $$($1_VERSIONINFO_RESOURCE))$$$$" || test "$$$$?" = "1" ; \
$(ECHO) $$($1_RES): \\ > $$($1_RES_DEPS_FILE) ; \
$(SED) $(WINDOWS_SHOWINCLUDE_SED_PATTERN) $$($1_RES_DEPS_FILE).obj.log \
$(SED) $(WINDOWS_SHOWINCLUDE_SED_PATTERN) $$($1_RES_DEPS_FILE)$(OBJ_SUFFIX).log \
>> $$($1_RES_DEPS_FILE) ; \
$(ECHO) >> $$($1_RES_DEPS_FILE) ;\
$(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_RES_DEPS_FILE) \
@@ -1204,11 +1214,16 @@ define SetupNativeCompilationBody
$$($1_MT) -nologo -manifest $$($1_MANIFEST) -identity:"$$($1_NAME).exe, version=$$($1_MANIFEST_VERSION)" -outputresource:$$@;#1
endif
endif
# This only works if the openjdk_codesign identity is present on the system. Let
# silently fail otherwise.
ifneq ($(CODESIGN), )
# On macosx, optionally run codesign on every binary.
# Remove signature explicitly first to avoid warnings if the linker
# added a default adhoc signature.
ifeq ($(MACOSX_CODESIGN_MODE), hardened)
$(CODESIGN) --remove-signature $$@
$(CODESIGN) -f -s "$(MACOSX_CODESIGN_IDENTITY)" --timestamp --options runtime \
--entitlements $$(call GetEntitlementsFile, $$@) $$@
else ifeq ($(MACOSX_CODESIGN_MODE), debug)
$(CODESIGN) --remove-signature $$@
$(CODESIGN) -f -s - --entitlements $$(call GetEntitlementsFile, $$@) $$@
endif
endif

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2022, 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
@@ -29,7 +29,7 @@ PRODUCT_SUFFIX="Runtime Environment"
JDK_RC_PLATFORM_NAME=Platform
COMPANY_NAME=N/A
HOTSPOT_VM_DISTRO="OpenJDK"
VENDOR_URL=https://openjdk.java.net/
VENDOR_URL=https://openjdk.org/
VENDOR_URL_BUG=https://bugreport.java.com/bugreport/
VENDOR_URL_VM_BUG=https://bugreport.java.com/bugreport/crash.jsp

View File

@@ -26,16 +26,16 @@
# Versions and download locations for dependencies used by GitHub Actions (GHA)
GTEST_VERSION=1.8.1
JTREG_VERSION=6.1+2
JTREG_VERSION=7+1
LINUX_X64_BOOT_JDK_EXT=tar.gz
LINUX_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk18/43f95e8614114aeaa8e8a5fcf20a682d/36/GPL/openjdk-18_linux-x64_bin.tar.gz
LINUX_X64_BOOT_JDK_SHA256=0f60aef7b8504983d6e374fe94d09a7bedcf05ec559e812d801a33bd4ebd23d0
LINUX_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk19/877d6127e982470ba2a7faa31cc93d04/36/GPL/openjdk-19_linux-x64_bin.tar.gz
LINUX_X64_BOOT_JDK_SHA256=f47aba585cfc9ecff1ed8e023524e8309f4315ed8b80100b40c7dcc232c12f96
MACOS_X64_BOOT_JDK_EXT=tar.gz
MACOS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk18/43f95e8614114aeaa8e8a5fcf20a682d/36/GPL/openjdk-18_macos-x64_bin.tar.gz
MACOS_X64_BOOT_JDK_SHA256=527b61b4265caf45cdcbacfcf8fbcd0b4b280bede1eff32a5b252d855ff0534b
MACOS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk19/877d6127e982470ba2a7faa31cc93d04/36/GPL/openjdk-19_macos-x64_bin.tar.gz
MACOS_X64_BOOT_JDK_SHA256=bfd33f5b2590fd552ae2d9231340c6b4704a872f927dce1c52860b78c49a5a11
WINDOWS_X64_BOOT_JDK_EXT=zip
WINDOWS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk18/43f95e8614114aeaa8e8a5fcf20a682d/36/GPL/openjdk-18_windows-x64_bin.zip
WINDOWS_X64_BOOT_JDK_SHA256=a5b91d4c12752d44aa75df70ae3e2311287b3e60c288b07dade106376c688277
WINDOWS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk19/877d6127e982470ba2a7faa31cc93d04/36/GPL/openjdk-19_windows-x64_bin.zip
WINDOWS_X64_BOOT_JDK_SHA256=8fabcee7c4e8d3b53486777ecd27bb906d67d7c1efd1bf22a8290cf659afa487

View File

@@ -388,7 +388,7 @@ var getJibProfilesCommon = function (input, data) {
};
};
common.boot_jdk_version = "18";
common.boot_jdk_version = "19";
common.boot_jdk_build_number = "36";
common.boot_jdk_home = input.get("boot_jdk", "install_path") + "/jdk-"
+ common.boot_jdk_version
@@ -553,7 +553,7 @@ var getJibProfilesProfiles = function (input, common, data) {
"ANT_HOME": input.get("ant", "home_path")
}
};
[ "linux-x64", "macosx-x64", "windows-x64", "linux-aarch64"]
[ "linux-x64", "macosx-aarch64", "macosx-x64", "windows-x64", "linux-aarch64"]
.forEach(function (name) {
var maketestName = name + "-testmake";
profiles[maketestName] = concatObjects(profiles[name], testmakeBase);
@@ -1131,9 +1131,9 @@ var getJibProfilesDependencies = function (input, common) {
jtreg: {
server: "jpg",
product: "jtreg",
version: "6.1",
version: "7",
build_number: "1",
file: "bundles/jtreg-6.1+1.zip",
file: "bundles/jtreg-7+1.zip",
environment_name: "JT_HOME",
environment_path: input.get("jtreg", "home_path") + "/bin",
configure_args: "--with-jtreg=" + input.get("jtreg", "home_path"),
@@ -1142,12 +1142,12 @@ var getJibProfilesDependencies = function (input, common) {
jmh: {
organization: common.organization,
ext: "tar.gz",
revision: "1.34+1.0"
revision: "1.35+1.0"
},
jcov: {
organization: common.organization,
revision: "3.0-12-jdk-asm+1.0",
revision: "3.0-13-jdk-asm+1.0",
ext: "zip",
environment_name: "JCOV_HOME",
},

View File

@@ -37,6 +37,6 @@ DEFAULT_VERSION_DATE=2023-03-21
DEFAULT_VERSION_CLASSFILE_MAJOR=64 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
DEFAULT_VERSION_CLASSFILE_MINOR=0
DEFAULT_VERSION_DOCS_API_SINCE=11
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="18 19 20"
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="19 20"
DEFAULT_JDK_SOURCE_TARGET_VERSION=20
DEFAULT_PROMOTED_VERSION_PRE=ea

View File

@@ -194,7 +194,6 @@ JVM_RegisterLambdaProxyClassForArchiving
JVM_RegisterSignal
JVM_ReleaseUTF
JVM_ReportFinalizationComplete
JVM_ResumeThread
JVM_ExtentLocalCache
JVM_SetExtentLocalCache
JVM_SetArrayElement
@@ -205,9 +204,7 @@ JVM_SetStackWalkContinuation
JVM_SetThreadPriority
JVM_Sleep
JVM_StartThread
JVM_StopThread
JVM_SupportsCX8
JVM_SuspendThread
JVM_TotalMemory
JVM_UnloadLibrary
JVM_WaitForReferencePendingList
@@ -227,4 +224,5 @@ JVM_VirtualThreadMountBegin
JVM_VirtualThreadMountEnd
JVM_VirtualThreadUnmountBegin
JVM_VirtualThreadUnmountEnd
JVM_VirtualThreadHideFrames
#

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
<key>com.apple.security.cs.debugger</key>
<true/>
<key>com.apple.security.get-task-allow</key>
<true/>
</dict>
</plist>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
<key>com.apple.security.cs.debugger</key>
<true/>
<key>com.apple.security.device.audio-input</key>
<true/>
<key>com.apple.security.get-task-allow</key>
<true/>
</dict>
</plist>

View File

@@ -28,7 +28,7 @@
JMH_VERSION=1.35
COMMONS_MATH3_VERSION=3.2
JOPT_SIMPLE_VERSION=4.6
JOPT_SIMPLE_VERSION=5.0.4
BUNDLE_NAME=jmh-$JMH_VERSION.tar.gz

View File

@@ -120,12 +120,8 @@ endif
ifneq ($(call check-jvm-feature, cds), true)
JVM_CFLAGS_FEATURES += -DINCLUDE_CDS=0
JVM_EXCLUDE_FILES += \
cdsProtectionDomain.cpp \
classLoaderDataShared.cpp \
classLoaderExt.cpp \
dumpTimeSharedClassInfo.cpp \
lambdaProxyClassDictionary.cpp \
runTimeSharedClassInfo.cpp \
systemDictionaryShared.cpp
JVM_EXCLUDE_PATTERNS += cds/
endif

View File

@@ -53,7 +53,7 @@ endif
# platform dependent.
ifeq ($(call isTargetOs, linux), true)
DUMP_SYMBOLS_CMD := $(NM) --defined-only *.o
DUMP_SYMBOLS_CMD := $(NM) --defined-only *$(OBJ_SUFFIX)
ifneq ($(FILTER_SYMBOLS_PATTERN), )
FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)|
endif
@@ -67,7 +67,7 @@ ifeq ($(call isTargetOs, linux), true)
else ifeq ($(call isTargetOs, macosx), true)
# nm on macosx prints out "warning: nm: no name list" to stderr for
# files without symbols. Hide this, even at the expense of hiding real errors.
DUMP_SYMBOLS_CMD := $(NM) -Uj *.o 2> /dev/null
DUMP_SYMBOLS_CMD := $(NM) -Uj *$(OBJ_SUFFIX) 2> /dev/null
ifneq ($(FILTER_SYMBOLS_PATTERN), )
FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)|
endif
@@ -89,7 +89,7 @@ else ifeq ($(call isTargetOs, aix), true)
# which may be installed under /opt/freeware/bin. So better use an absolute path here!
# NM=/usr/bin/nm
DUMP_SYMBOLS_CMD := $(NM) -X64 -B -C *.o
DUMP_SYMBOLS_CMD := $(NM) -X64 -B -C *$(OBJ_SUFFIX)
FILTER_SYMBOLS_AWK_SCRIPT := \
'{ \
if (($$2="d" || $$2="D") && ($$3 ~ /^__vft/ || $$3 ~ /^gHotSpotVM/)) print $$3; \
@@ -98,7 +98,7 @@ else ifeq ($(call isTargetOs, aix), true)
}'
else ifeq ($(call isTargetOs, windows), true)
DUMP_SYMBOLS_CMD := $(DUMPBIN) -symbols *.obj
DUMP_SYMBOLS_CMD := $(DUMPBIN) -symbols *$(OBJ_SUFFIX)
# The following lines create a list of vftable symbols to be filtered out of
# the mapfile. Removing this line causes the linker to complain about too many

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2022, 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
@@ -24,6 +24,17 @@
*/
package build.tools.depend;
import com.sun.source.tree.ClassTree;
import com.sun.source.tree.CompilationUnitTree;
import com.sun.source.tree.IdentifierTree;
import com.sun.source.tree.ImportTree;
import com.sun.source.tree.LiteralTree;
import com.sun.source.tree.MemberReferenceTree;
import com.sun.source.tree.MemberSelectTree;
import com.sun.source.tree.MethodTree;
import com.sun.source.tree.ModifiersTree;
import com.sun.source.tree.Tree;
import com.sun.source.tree.VariableTree;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
@@ -86,8 +97,37 @@ import com.sun.source.util.TaskEvent;
import com.sun.source.util.TaskEvent.Kind;
import com.sun.source.util.TaskListener;
import com.sun.source.util.TreePath;
import com.sun.source.util.TreeScanner;
import com.sun.source.util.Trees;
import com.sun.tools.javac.api.BasicJavacTask;
import com.sun.tools.javac.code.Flags;
import com.sun.tools.javac.main.JavaCompiler;
import com.sun.tools.javac.tree.JCTree.JCCompilationUnit;
import com.sun.tools.javac.tree.JCTree.JCVariableDecl;
import com.sun.tools.javac.util.Context;
import com.sun.tools.javac.util.Context.Key;
import com.sun.tools.javac.util.ListBuffer;
import com.sun.tools.javac.util.Options;
import com.sun.tools.javac.util.StringUtils;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.IdentityHashMap;
import java.util.LinkedHashMap;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.stream.StreamSupport;
import javax.lang.model.element.ElementKind;
import javax.lang.model.element.Name;
import javax.tools.ForwardingJavaFileManager;
import javax.tools.JavaFileManager;
import javax.tools.StandardLocation;
import javax.tools.ToolProvider;
public class Depend implements Plugin {
@@ -98,6 +138,45 @@ public class Depend implements Plugin {
@Override
public void init(JavacTask jt, String... args) {
addExports();
AtomicBoolean noApiChange = new AtomicBoolean();
try {
Context context = ((BasicJavacTask) jt).getContext();
Options options = Options.instance(context);
String modifiedInputs = options.get("modifiedInputs");
if (modifiedInputs == null) {
throw new IllegalStateException("Expected modifiedInputs to be set using -XDmodifiedInputs=<list-of-files>");
}
String logLevel = options.get("LOG_LEVEL");
boolean debug = "trace".equals(logLevel) || "debug".equals(logLevel);
String internalAPIPath = options.get("internalAPIPath");
if (internalAPIPath == null) {
throw new IllegalStateException("Expected internalAPIPath to be set using -XDinternalAPIPath=<internal-API-path>");
}
Set<Path> modified = Files.readAllLines(Paths.get(modifiedInputs)).stream()
.map(Paths::get)
.collect(Collectors.toSet());
Path internalAPIDigestFile = Paths.get(internalAPIPath);
JavaCompiler compiler = JavaCompiler.instance(context);
Class<?> initialFileParserIntf = Class.forName("com.sun.tools.javac.main.JavaCompiler$InitialFileParserIntf");
Class<?> initialFileParser = Class.forName("com.sun.tools.javac.main.JavaCompiler$InitialFileParser");
Field initialParserKeyField = initialFileParser.getDeclaredField("initialParserKey");
@SuppressWarnings("unchecked")
Key<Object> key = (Key<Object>) initialParserKeyField.get(null);
Object initialParserInstance =
Proxy.newProxyInstance(Depend.class.getClassLoader(),
new Class<?>[] {initialFileParserIntf},
new FilteredInitialFileParser(compiler,
modified,
internalAPIDigestFile,
noApiChange,
debug));
context.<Object>put(key, initialParserInstance);
} catch (Exception ex) {
throw new IllegalStateException(ex);
}
jt.addTaskListener(new TaskListener() {
private final Map<ModuleElement, Set<PackageElement>> apiPackages = new HashMap<>();
private final MessageDigest apiHash;
@@ -134,7 +213,7 @@ public class Depend implements Plugin {
}
}
}
if (te.getKind() == Kind.COMPILATION) {
if (te.getKind() == Kind.COMPILATION && !noApiChange.get()) {
String previousSignature = null;
File digestFile = new File(args[0]);
try (InputStream in = new FileInputStream(digestFile)) {
@@ -156,6 +235,116 @@ public class Depend implements Plugin {
});
}
private void addExports() {
var systemCompiler = ToolProvider.getSystemJavaCompiler();
try (JavaFileManager jfm = systemCompiler.getStandardFileManager(null, null, null)) {
JavaFileManager fm = new ForwardingJavaFileManager<JavaFileManager>(jfm) {
@Override
public ClassLoader getClassLoader(JavaFileManager.Location location) {
if (location == StandardLocation.CLASS_PATH) {
return Depend.class.getClassLoader();
}
return super.getClassLoader(location);
}
};
((JavacTask) systemCompiler.getTask(null, fm, null,
List.of("-proc:only", "-XDaccessInternalAPI=true"),
List.of("java.lang.Object"), null))
.analyze();
} catch (IOException ex) {
throw new IllegalStateException(ex);
}
}
private com.sun.tools.javac.util.List<JCCompilationUnit> doFilteredParse(
JavaCompiler compiler, Iterable<JavaFileObject> fileObjects, Set<Path> modified,
Path internalAPIDigestFile, AtomicBoolean noApiChange,
boolean debug) {
Map<String, String> internalAPI = new LinkedHashMap<>();
if (Files.isReadable(internalAPIDigestFile)) {
try {
Files.readAllLines(internalAPIDigestFile, StandardCharsets.UTF_8)
.forEach(line -> {
String[] keyAndValue = line.split("=");
internalAPI.put(keyAndValue[0], keyAndValue[1]);
});
} catch (IOException ex) {
throw new IllegalStateException(ex);
}
}
Map<JavaFileObject, JCCompilationUnit> files2CUT = new IdentityHashMap<>();
boolean fullRecompile = modified.stream()
.map(Path::toString)
.anyMatch(f -> !StringUtils.toLowerCase(f).endsWith(".java"));
ListBuffer<JCCompilationUnit> result = new ListBuffer<>();
for (JavaFileObject jfo : fileObjects) {
if (modified.contains(Path.of(jfo.getName()))) {
JCCompilationUnit parsed = compiler.parse(jfo);
files2CUT.put(jfo, parsed);
String currentSignature = treeDigest(parsed);
if (!currentSignature.equals(internalAPI.get(jfo.getName()))) {
fullRecompile |= true;
internalAPI.put(jfo.getName(), currentSignature);
}
result.add(parsed);
}
}
if (fullRecompile) {
for (JavaFileObject jfo : fileObjects) {
if (!modified.contains(Path.of(jfo.getName()))) {
JCCompilationUnit parsed = files2CUT.get(jfo);
if (parsed == null) {
parsed = compiler.parse(jfo);
internalAPI.put(jfo.getName(), treeDigest(parsed));
}
result.add(parsed);
}
}
try (OutputStream out = Files.newOutputStream(internalAPIDigestFile)) {
String hashes = internalAPI.entrySet()
.stream()
.map(e -> e.getKey() + "=" + e.getValue())
.collect(Collectors.joining("\n"));
out.write(hashes.getBytes(StandardCharsets.UTF_8));
} catch (IOException ex) {
throw new IllegalStateException(ex);
}
} else {
noApiChange.set(true);
}
if (debug) {
long allJavaInputs = StreamSupport.stream(fileObjects.spliterator(), false).count();
String module = StreamSupport.stream(fileObjects.spliterator(), false)
.map(fo -> fo.toUri().toString())
.filter(path -> path.contains("/share/classes/"))
.map(path -> path.substring(0, path.indexOf("/share/classes/")))
.map(path -> path.substring(path.lastIndexOf("/") + 1))
.findAny()
.orElseGet(() -> "unknown");
String nonJavaModifiedFiles = modified.stream()
.map(Path::toString)
.filter(f -> !StringUtils.toLowerCase(f)
.endsWith(".java"))
.collect(Collectors.joining(", "));
System.err.println("compiling module: " + module +
", all Java inputs: " + allJavaInputs +
", modified files (Java or non-Java): " + modified.size() +
", full recompile: " + fullRecompile +
", non-Java modified files: " + nonJavaModifiedFiles);
}
return result.toList();
}
private String treeDigest(JCCompilationUnit cu) {
try {
TreeVisitor v = new TreeVisitor(MessageDigest.getInstance("MD5"));
v.scan(cu, null);
return Depend.this.toString(v.apiHash.digest());
} catch (NoSuchAlgorithmException ex) {
throw new IllegalStateException(ex);
}
}
private String toString(byte[] digest) {
return HexFormat.of().withUpperCase().formatHex(digest);
}
@@ -537,4 +726,192 @@ public class Depend implements Plugin {
}
}
private static final class TreeVisitor extends TreeScanner<Void, Void> {
private final Set<Name> seenIdentifiers = new HashSet<>();
private final MessageDigest apiHash;
private final Charset utf8;
public TreeVisitor(MessageDigest apiHash) {
this.apiHash = apiHash;
utf8 = Charset.forName("UTF-8");
}
private void update(CharSequence data) {
apiHash.update(data.toString().getBytes(utf8));
}
@Override
public Void scan(Tree tree, Void p) {
update("(");
if (tree != null) {
update(tree.getKind().name());
};
super.scan(tree, p);
update(")");
return null;
}
@Override
public Void visitCompilationUnit(CompilationUnitTree node, Void p) {
seenIdentifiers.clear();
scan(node.getPackage(), p);
scan(node.getTypeDecls(), p);
scan(((JCCompilationUnit) node).getModuleDecl(), p);
List<ImportTree> importantImports = new ArrayList<>();
for (ImportTree imp : node.getImports()) {
Tree t = imp.getQualifiedIdentifier();
if (t.getKind() == Tree.Kind.MEMBER_SELECT) {
Name member = ((MemberSelectTree) t).getIdentifier();
if (member.contentEquals("*") || seenIdentifiers.contains(member)) {
importantImports.add(imp);
}
} else {
//should not happen, possibly erroneous source?
importantImports.add(imp);
}
}
importantImports.sort((imp1, imp2) -> {
if (imp1.isStatic() ^ imp2.isStatic()) {
return imp1.isStatic() ? -1 : 1;
} else {
return imp1.getQualifiedIdentifier().toString().compareTo(imp2.getQualifiedIdentifier().toString());
}
});
scan(importantImports, p);
return null;
}
@Override
public Void visitIdentifier(IdentifierTree node, Void p) {
update(node.getName());
seenIdentifiers.add(node.getName());
return super.visitIdentifier(node, p);
}
@Override
public Void visitMemberSelect(MemberSelectTree node, Void p) {
update(node.getIdentifier());
return super.visitMemberSelect(node, p);
}
@Override
public Void visitMemberReference(MemberReferenceTree node, Void p) {
update(node.getName());
return super.visitMemberReference(node, p);
}
@Override
public Void scan(Iterable<? extends Tree> nodes, Void p) {
update("(");
super.scan(nodes, p);
update(")");
return null;
}
@Override
public Void visitClass(ClassTree node, Void p) {
update(node.getSimpleName());
scan(node.getModifiers(), p);
scan(node.getTypeParameters(), p);
scan(node.getExtendsClause(), p);
scan(node.getImplementsClause(), p);
scan(node.getMembers()
.stream()
.filter(this::importantMember)
.collect(Collectors.toList()),
p);
return null;
}
private boolean importantMember(Tree m) {
return switch (m.getKind()) {
case ANNOTATION_TYPE, CLASS, ENUM, INTERFACE, RECORD ->
!isPrivate(((ClassTree) m).getModifiers());
case METHOD ->
!isPrivate(((MethodTree) m).getModifiers());
case VARIABLE ->
!isPrivate(((VariableTree) m).getModifiers()) ||
isRecordComponent((VariableTree) m);
case BLOCK -> false;
default -> throw new IllegalStateException("Unexpected tree kind: " + m.getKind());
};
}
private boolean isPrivate(ModifiersTree mt) {
return mt.getFlags().contains(Modifier.PRIVATE);
}
private boolean isRecordComponent(VariableTree vt) {
return (((JCVariableDecl) vt).mods.flags & Flags.RECORD) != 0;
}
@Override
public Void visitVariable(VariableTree node, Void p) {
update(node.getName());
return super.visitVariable(node, p);
}
@Override
public Void visitMethod(MethodTree node, Void p) {
update(node.getName());
scan(node.getModifiers(), p);
scan(node.getReturnType(), p);
scan(node.getTypeParameters(), p);
scan(node.getParameters(), p);
scan(node.getReceiverParameter(), p);
scan(node.getThrows(), p);
scan(node.getDefaultValue(), p);
return null;
}
@Override
public Void visitLiteral(LiteralTree node, Void p) {
update(String.valueOf(node.getValue()));
return super.visitLiteral(node, p);
}
@Override
public Void visitModifiers(ModifiersTree node, Void p) {
update(node.getFlags().toString());
return super.visitModifiers(node, p);
}
}
private class FilteredInitialFileParser implements InvocationHandler {
private final JavaCompiler compiler;
private final Set<Path> modified;
private final Path internalAPIDigestFile;
private final AtomicBoolean noApiChange;
private final boolean debug;
public FilteredInitialFileParser(JavaCompiler compiler,
Set<Path> modified,
Path internalAPIDigestFile,
AtomicBoolean noApiChange,
boolean debug) {
this.compiler = compiler;
this.modified = modified;
this.internalAPIDigestFile = internalAPIDigestFile;
this.noApiChange = noApiChange;
this.debug = debug;
}
@Override
@SuppressWarnings("unchecked")
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
return switch (method.getName()) {
case "parse" -> doFilteredParse(compiler,
(Iterable<JavaFileObject>) args[0],
modified,
internalAPIDigestFile,
noApiChange,
debug);
default -> throw new UnsupportedOperationException();
};
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2022, 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
@@ -52,6 +52,8 @@ public class DependTest {
test.testModules();
test.testAnnotations();
test.testRecords();
test.testImports();
test.testModifiers();
}
public void testMethods() throws Exception {
@@ -145,7 +147,8 @@ public class DependTest {
"@SuppressWarnings(\"any\")\n" +
"public class Test {\n" +
"}",
false);
false,
true); //Tree hash does not tolerate undocumented annotations
doOrdinaryTest("package test;" +
"public class Test {\n" +
"}",
@@ -156,6 +159,83 @@ public class DependTest {
true);
}
public void testImports() throws Exception {
doOrdinaryTest("package test;" +
"public class Test {\n" +
"}",
"package test;" +
"import java.util.List;\n" +
"public class Test {\n" +
" private List l;\n" +
"}",
false);
doOrdinaryTest("package test;" +
"public class Test {\n" +
"}",
"package test;" +
"import java.util.List;\n" +
"public class Test {\n" +
" public List l;\n" +
"}",
true);
doOrdinaryTest("package test;" +
"public class Test {\n" +
"}",
"package test;" +
"import java.util.List;\n" +
"public class Test {\n" +
" List l;\n" +
"}",
false,
true);
doOrdinaryTest("package test;" +
"import java.util.*;\n" +
"public abstract class Test implements List {\n" +
"}\n" +
"class H {\n" +
" public interface List {}\n" +
"}",
"package test;" +
"import java.util.*;\n" +
"import test.H.List;\n" +
"public abstract class Test implements List {\n" +
"}\n" +
"class H {\n" +
" public interface List {}\n" +
"}",
true);
doOrdinaryTest("package test;" +
"public class Test {\n" +
"}",
"package test;" +
"import java.util.*;\n" +
"public class Test {\n" +
"}",
false,
true);
doOrdinaryTest("package test;" +
"import java.util.*;\n" +
"public class Test {\n" +
"}",
"package test;" +
"public class Test {\n" +
"}",
false,
true);
}
public void testModifiers() throws Exception {
doOrdinaryTest("package test;" +
"public class Test {\n" +
" String l;\n" +
"}",
"package test;" +
"public class Test {\n" +
" public String l;\n" +
"}",
true);
}
public void testModules() throws Exception {
doModuleTest("module m { }",
"module m { requires java.compiler; }",
@@ -199,11 +279,13 @@ public class DependTest {
doOrdinaryTest("package test; public record Test (int x, int y) { }",
"package test; public record Test (int x, int y) {" +
"public Test { } }", // compact ctr
false);
false,
true);
doOrdinaryTest("package test; public record Test (int x, int y) { }",
"package test; public record Test (int x, int y) {" +
"public Test (int x, int y) { this.x=x; this.y=y;} }", // canonical ctr
false);
false,
true);
doOrdinaryTest("package test; public record Test (int x, int y) { }",
"package test; public record Test (int y, int x) { }", // reverse
true);
@@ -227,6 +309,7 @@ public class DependTest {
private Path scratchServices;
private Path scratchClasses;
private Path apiHash;
private Path treeHash;
private void setupClass() throws IOException {
depend = Paths.get(Depend.class.getProtectionDomain().getCodeSource().getLocation().getPath());
@@ -244,34 +327,53 @@ public class DependTest {
Files.createDirectories(scratchClasses);
apiHash = scratch.resolve("api");
treeHash = scratch.resolve("tree");
}
private void doOrdinaryTest(String codeBefore, String codeAfter, boolean hashChangeExpected) throws Exception {
doOrdinaryTest(codeBefore, codeAfter, hashChangeExpected, hashChangeExpected);
}
private void doOrdinaryTest(String codeBefore, String codeAfter, boolean apiHashChangeExpected, boolean treeHashChangeExpected) throws Exception {
List<String> options =
Arrays.asList("-d", scratchClasses.toString(),
"-processorpath", depend.toString() + File.pathSeparator + scratchServices.toString(),
"-Xplugin:depend " + apiHash.toString());
"-Xplugin:depend " + apiHash.toString() + " " + treeHash.toString(),
"-XDmodifiedInputs=build-all");
List<TestJavaFileObject> beforeFiles =
Arrays.asList(new TestJavaFileObject("module-info", "module m { exports test; }"),
new TestJavaFileObject("test.Test", codeBefore));
compiler.getTask(null, null, null, options, null, beforeFiles).call();
byte[] originalHash = Files.readAllBytes(apiHash);
byte[] originalApiHash = Files.readAllBytes(apiHash);
byte[] originalTreeHash = Files.readAllBytes(treeHash);
List<TestJavaFileObject> afterFiles =
Arrays.asList(new TestJavaFileObject("module-info", "module m { exports test; }"),
new TestJavaFileObject("test.Test", codeAfter));
compiler.getTask(null, null, null, options, null, afterFiles).call();
byte[] newHash = Files.readAllBytes(apiHash);
byte[] newApiHash = Files.readAllBytes(apiHash);
byte[] newTreeHash = Files.readAllBytes(treeHash);
if (Arrays.equals(originalHash, newHash) ^ !hashChangeExpected) {
throw new AssertionError("Unexpected hash state.");
if (Arrays.equals(originalApiHash, newApiHash) ^ !apiHashChangeExpected) {
throw new AssertionError("Unexpected API hash state.");
}
if (Arrays.equals(originalTreeHash, newTreeHash) ^ !treeHashChangeExpected) {
throw new AssertionError("Unexpected Tree hash state, " +
"original: " + new String(originalTreeHash) +
", new: " + new String(newTreeHash));
}
}
private void doModuleTest(String codeBefore, String codeAfter, boolean hashChangeExpected) throws Exception {
doModuleTest(codeBefore, codeAfter, hashChangeExpected, hashChangeExpected);
}
private void doModuleTest(String codeBefore, String codeAfter, boolean apiHashChangeExpected, boolean treeHashChangeExpected) throws Exception {
List<String> options =
Arrays.asList("-d", scratchClasses.toString(),
"-processorpath", depend.toString() + File.pathSeparator + scratchServices.toString(),
"-Xplugin:depend " + apiHash.toString());
"-Xplugin:depend " + apiHash.toString() + " " + treeHash.toString(),
"-XDmodifiedInputs=build-all");
List<TestJavaFileObject> beforeFiles =
Arrays.asList(new TestJavaFileObject("module-info", codeBefore),
new TestJavaFileObject("test.Test1", "package test; public interface Test1 {}"),
@@ -279,7 +381,8 @@ public class DependTest {
new TestJavaFileObject("test.TestImpl1", "package test; public class TestImpl1 implements Test1, Test2 {}"),
new TestJavaFileObject("test.TestImpl2", "package test; public class TestImpl2 implements Test1, Test2 {}"));
compiler.getTask(null, null, null, options, null, beforeFiles).call();
byte[] originalHash = Files.readAllBytes(apiHash);
byte[] originalApiHash = Files.readAllBytes(apiHash);
byte[] originalTreeHash = Files.readAllBytes(treeHash);
List<TestJavaFileObject> afterFiles =
Arrays.asList(new TestJavaFileObject("module-info", codeAfter),
new TestJavaFileObject("test.Test1", "package test; public interface Test1 {}"),
@@ -287,10 +390,17 @@ public class DependTest {
new TestJavaFileObject("test.TestImpl1", "package test; public class TestImpl1 implements Test1, Test2 {}"),
new TestJavaFileObject("test.TestImpl2", "package test; public class TestImpl2 implements Test1, Test2 {}"));
compiler.getTask(null, null, null, options, null, afterFiles).call();
byte[] newHash = Files.readAllBytes(apiHash);
byte[] newApiHash = Files.readAllBytes(apiHash);
byte[] newTreeHash = Files.readAllBytes(treeHash);
if (Arrays.equals(originalHash, newHash) ^ !hashChangeExpected) {
throw new AssertionError("Unexpected hash state.");
if (Arrays.equals(originalApiHash, newApiHash) ^ !apiHashChangeExpected) {
throw new AssertionError("Unexpected API hash state.");
}
if (Arrays.equals(originalTreeHash, newTreeHash) ^ !treeHashChangeExpected) {
throw new AssertionError("Unexpected Tree hash state, " +
"original: " + new String(originalTreeHash) +
", new: " + new String(newTreeHash));
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2022, 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
@@ -919,8 +919,6 @@ class DTDParser implements DTDConstants {
} catch (Exception e) {
error("exception", e.getClass().getName(), e.getMessage());
e.printStackTrace();
} catch (ThreadDeath e) {
error("terminated");
}
return (nerrors > 0) ? null : dtd;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2022, 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,25 +94,20 @@ public class GenerateBreakIteratorData {
rules = (ResourceBundle) Class.forName(
localizedBundleName("sun.text.resources", "BreakIteratorRules")).getDeclaredConstructor().newInstance();
if (info.containsKey("CharacterData")) {
generateDataFile(info.getString("CharacterData"),
rules.getString("CharacterBreakRules"),
classNames[0]);
}
if (info.containsKey("WordData")) {
generateDataFile(info.getString("WordData"),
rules.getString("WordBreakRules"),
classNames[1]);
classNames[0]);
}
if (info.containsKey("LineData")) {
generateDataFile(info.getString("LineData"),
rules.getString("LineBreakRules"),
classNames[2]);
classNames[1]);
}
if (info.containsKey("SentenceData")) {
generateDataFile(info.getString("SentenceData"),
rules.getString("SentenceBreakRules"),
classNames[3]);
classNames[2]);
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2022, 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
@@ -56,7 +56,7 @@ public class Incubating implements Taglet {
}
private static final String MESSAGE =
"<BR><b><a href=\"http://openjdk.java.net/jeps/11\">Incubating Feature.</a>"
"<BR><b><a href=\"https://openjdk.org/jeps/11\">Incubating Feature.</a>"
+ " Will be removed in a future release.</b>";
@Override

View File

@@ -79,7 +79,7 @@ ifeq ($(call isTargetOs, macosx aix linux), true)
SRC := $(TOPDIR)/src/$(MODULE)/unix/native/jspawnhelper, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKEXE) -I$(TOPDIR)/src/$(MODULE)/unix/native/libjava, \
EXTRA_OBJECT_FILES := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava/childproc.o, \
EXTRA_OBJECT_FILES := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava/childproc$(OBJ_SUFFIX), \
LDFLAGS := $(LDFLAGS_JDKEXE), \
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \
))

View File

@@ -43,10 +43,13 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBNET, \
NAME := net, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB), \
DISABLED_WARNINGS_gcc := format-nonliteral unused-function, \
DISABLED_WARNINGS_clang := parentheses-equality constant-logical-operand \
format-nonliteral undef, \
DISABLED_WARNINGS_microsoft := 4244 4047 4133 4996, \
DISABLED_WARNINGS_gcc_net_util_md.c := format-nonliteral, \
DISABLED_WARNINGS_gcc_NetworkInterface.c := unused-function, \
DISABLED_WARNINGS_clang_net_util_md.c := format-nonliteral, \
DISABLED_WARNINGS_microsoft_InetAddress.c := 4244, \
DISABLED_WARNINGS_microsoft_NetworkInterface.c := 4133, \
DISABLED_WARNINGS_microsoft_NetworkInterface_winXP.c := 4133, \
DISABLED_WARNINGS_microsoft_ResolverConfigurationImpl.c := 4996, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_windows := -delayload:secur32.dll -delayload:iphlpapi.dll, \
@@ -70,8 +73,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBNIO, \
OPTIMIZATION := HIGH, \
WARNINGS_AS_ERRORS_xlc := false, \
CFLAGS := $(CFLAGS_JDKLIB), \
DISABLED_WARNINGS_gcc := undef, \
DISABLED_WARNINGS_clang := undef, \
EXTRA_HEADER_DIRS := \
libnio/ch \
libnio/fs \
@@ -101,8 +102,7 @@ ifeq ($(call isTargetOs, macosx), true)
NAME := osxsecurity, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB), \
DISABLED_WARNINGS_clang := deprecated-declarations \
missing-method-return-type, \
DISABLED_WARNINGS_clang_KeystoreImpl.m := deprecated-declarations, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
-L$(SUPPORT_OUTPUTDIR)/modules_libs/java.base \
$(call SET_SHARED_LIBRARY_ORIGIN), \
@@ -130,7 +130,6 @@ ifeq ($(call isTargetOsType, unix), true)
NAME := jsig, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBJSIG_CFLAGS), \
DISABLED_WARNINGS_gcc := undef, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_linux := $(LIBDL), \

View File

@@ -30,7 +30,7 @@ GENDATA_TZDB :=
#
TZDATA_DIR := $(MODULE_SRC)/share/data/tzdata
TZDATA_TZFILE := africa antarctica asia australasia europe northamerica southamerica backward etcetera gmt jdk11_backward
TZDATA_TZFILES := $(addprefix $(TZDATA_DIR)/,$(TZDATA_TZFILE))
TZDATA_TZFILES := $(wildcard $(TZDATA_DIR)/*)
GENDATA_TZDB_DAT := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE)/tzdb.dat

View File

@@ -24,12 +24,12 @@
#
#
# Rules to create $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/util/regex/EmojiData.java
# Rules to create $(SUPPORT_OUTPUTDIR)/gensrc/java.base/jdk/internal/util/regex/EmojiData.java
#
GENSRC_EMOJIDATA := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/util/regex/EmojiData.java
GENSRC_EMOJIDATA := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/jdk/internal/util/regex/EmojiData.java
EMOJIDATATEMP = $(MODULE_SRC)/share/classes/java/util/regex/EmojiData.java.template
EMOJIDATATEMP = $(MODULE_SRC)/share/classes/jdk/internal/util/regex/EmojiData.java.template
UNICODEDATA = $(MODULE_SRC)/share/data/unicodedata
$(GENSRC_EMOJIDATA): $(BUILD_TOOLS_JDK) $(EMOJIDATATEMP) $(UNICODEDATA)/emoji/emoji-data.txt

View File

@@ -48,9 +48,14 @@ $(eval $(call SetupNativeCompilation, BUILD_LIBFDLIBM, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \
CFLAGS_windows_debug := -DLOGGING, \
CFLAGS_aix := -qfloat=nomaf, \
DISABLED_WARNINGS_gcc := sign-compare misleading-indentation array-bounds, \
DISABLED_WARNINGS_clang := sign-compare misleading-indentation, \
DISABLED_WARNINGS_microsoft := 4146 4244 4018, \
DISABLED_WARNINGS_gcc := sign-compare, \
DISABLED_WARNINGS_gcc_k_rem_pio2.c := maybe-uninitialized, \
DISABLED_WARNINGS_clang := sign-compare, \
DISABLED_WARNINGS_microsoft := 4146, \
DISABLED_WARNINGS_microsoft_e_exp.c := 4244, \
DISABLED_WARNINGS_microsoft_s_ceil.c := 4018, \
DISABLED_WARNINGS_microsoft_s_expm1.c := 4244, \
DISABLED_WARNINGS_microsoft_s_floor.c := 4018, \
ARFLAGS := $(ARFLAGS), \
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \
))
@@ -93,7 +98,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJAVA, \
jdk_util.c_CFLAGS := $(VERSION_CFLAGS), \
EXTRA_HEADER_DIRS := libfdlibm, \
WARNINGS_AS_ERRORS_xlc := false, \
DISABLED_WARNINGS_gcc := unused-result unused-function, \
DISABLED_WARNINGS_gcc_ProcessImpl_md.c := unused-result, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_macosx := -L$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/, \
@@ -134,8 +139,8 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBZIP, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(LIBZ_CFLAGS), \
CFLAGS_unix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \
DISABLED_WARNINGS_gcc := unused-function implicit-fallthrough, \
DISABLED_WARNINGS_clang := format-nonliteral, \
DISABLED_WARNINGS_gcc_zip_util.c := unused-function, \
DISABLED_WARNINGS_clang_gzwrite.c := format-nonliteral, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_unix := -ljvm -ljava $(LIBZ_LIBS), \
@@ -205,8 +210,8 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJLI, \
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \
OPTIMIZATION := HIGH, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \
DISABLED_WARNINGS_gcc := unused-function implicit-fallthrough, \
DISABLED_WARNINGS_clang := sometimes-uninitialized format-nonliteral, \
DISABLED_WARNINGS_gcc := unused-function, \
DISABLED_WARNINGS_clang := format-nonliteral, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_unix := $(LIBZ_LIBS), \

View File

@@ -23,6 +23,7 @@
# questions.
#
DISABLED_WARNINGS_java += lossy-conversions
DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:java.*,javax.*'
COPY += .gif .png .wav .txt .xml .css .pf

View File

@@ -190,7 +190,7 @@ ifeq ($(call isTargetOs, windows macosx), false)
common/font \
#
LIBAWT_XAWT_EXCLUDES := medialib debug
LIBAWT_XAWT_EXCLUDES := medialib debug wl
LIBAWT_XAWT_EXTRA_HEADER_DIRS := \
$(LIBAWT_DEFAULT_HEADER_DIRS) \
@@ -262,6 +262,83 @@ endif
################################################################################
ifeq ($(call isTargetOs, windows macosx), false)
ifeq ($(ENABLE_HEADLESS_ONLY), false)
LIBAWT_WLAWT_EXTRA_SRC := \
common/awt \
common/java2d \
common/font \
#
LIBAWT_WLAWT_EXCLUDES := medialib debug opengl x11
LIBAWT_WLAWT_EXCLUDE_FILES := common/awt/X11Color.c common/awt/awt_Font.c
LIBAWT_WLAWT_EXTRA_HEADER_DIRS := \
$(LIBAWT_DEFAULT_HEADER_DIRS) \
libawt_wlawt/awt \
include \
common/awt/debug \
common/awt/systemscale \
common/font \
common/java2d/wl \
#
# Enable 'wakefield' extension for java.awt.Robot support
WAKEFIELD_ROBOT_CFLAGS=-DWAKEFIELD_ROBOT
LIBAWT_WLAWT_CFLAGS += -DWLAWT \
$(WAKEFIELD_ROBOT_CFLAGS) \
$(FONTCONFIG_CFLAGS) \
$(CUPS_CFLAGS)
LIBAWT_WLAWT_LIBS := $(LIBM) -lawt $(WAYLAND_LIBS) $(LIBDL) -ljava -ljvm -lrt
ifeq ($(call isTargetOs, linux), true)
LIBAWT_WLAWT_LIBS += -lpthread
endif
ifeq ($(TOOLCHAIN_TYPE), gcc)
# Turn off all warnings for the following files since they contain warnings
# that cannot be turned of individually.
# redefining a macro
BUILD_LIBAWT_WLAWT_awt_Font.c_CFLAGS := -w
# initializing a declared 'extern'
BUILD_LIBAWT_WLAWT_debug_mem.c_CFLAGS := -w
endif
$(eval $(call SetupJdkLibrary, BUILD_LIBAWT_WLAWT, \
NAME := awt_wlawt, \
EXCLUDE_FILES := $(LIBAWT_WLAWT_EXCLUDE_FILES), \
EXTRA_SRC := $(LIBAWT_WLAWT_EXTRA_SRC), \
EXTRA_HEADER_DIRS := $(LIBAWT_WLAWT_EXTRA_HEADER_DIRS), \
EXCLUDES := $(LIBAWT_WLAWT_EXCLUDES), \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_WLAWT_CFLAGS), \
WARNINGS_AS_ERRORS_xlc := false, \
DISABLED_WARNINGS_gcc := type-limits pointer-to-int-cast \
unused-result maybe-uninitialized format \
format-security int-to-pointer-cast parentheses \
implicit-fallthrough undef unused-function, \
DISABLED_WARNINGS_clang := parentheses format undef \
logical-op-parentheses format-nonliteral int-conversion, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN) \
-L$(INSTALL_LIBRARIES_HERE), \
LIBS := $(LIBAWT_WLAWT_LIBS), \
))
$(BUILD_LIBAWT_WLAWT): $(call FindLib, java.base, java)
$(BUILD_LIBAWT_WLAWT): $(BUILD_LIBAWT)
TARGETS += $(BUILD_LIBAWT_WLAWT)
endif
endif
################################################################################
# The fast floor code loses precision.
LCMS_CFLAGS=-DCMS_DONT_USE_FAST_FLOOR
@@ -492,13 +569,9 @@ ifneq ($(filter $(TOOLCHAIN_TYPE), gcc clang), )
endif
ifeq ($(call isTargetOs, windows), true)
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
X11TextRenderer.c
LIBFONTMANAGER_OPTIMIZATION := HIGHEST
else ifeq ($(call isTargetOs, macosx), true)
LIBFONTMANAGER_EXCLUDE_FILES += X11FontScaler.c \
X11TextRenderer.c \
fontpath.c \
LIBFONTMANAGER_EXCLUDE_FILES += fontpath.c \
lcdglyph.c
else
LIBFONTMANAGER_EXCLUDE_FILES += fontpath.c \
@@ -523,7 +596,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBFONTMANAGER, \
EXTRA_HEADER_DIRS := $(LIBFONTMANAGER_EXTRA_HEADER_DIRS), \
EXTRA_SRC := $(LIBFONTMANAGER_EXTRA_SRC), \
WARNINGS_AS_ERRORS_xlc := false, \
DISABLED_WARNINGS_gcc := $(HARFBUZZ_DISABLED_WARNINGS_gcc), \
DISABLED_WARNINGS_gcc := $(HARFBUZZ_DISABLED_WARNINGS_gcc) unused-result, \
DISABLED_WARNINGS_CXX_gcc := $(HARFBUZZ_DISABLED_WARNINGS_CXX_gcc), \
DISABLED_WARNINGS_clang := $(HARFBUZZ_DISABLED_WARNINGS_clang), \
DISABLED_WARNINGS_microsoft := $(HARFBUZZ_DISABLED_WARNINGS_microsoft), \
@@ -553,6 +626,51 @@ TARGETS += $(BUILD_LIBFONTMANAGER)
################################################################################
ifeq ($(call isTargetOs, windows macosx), false)
ifeq ($(ENABLE_HEADLESS_ONLY), false)
LIBFONTMANAGER_XAWT_EXCLUDE_FILES := $(LIBFONTMANAGER_EXCLUDE_FILES)
LIBFONTMANAGER_XAWT_CFLAGS := $(LIBFONTMANAGER_CFLAGS)
LIBFONTMANAGER_XAWT_OPTIMIZATION := $(LIBFONTMANAGER_OPTIMIZATION)
LIBFONTMANAGER_XAWT_EXTRA_HEADER_DIRS := $(LIBFONTMANAGER_EXTRA_HEADER_DIRS) \
libfontmanager
LIBFONTMANAGER_XAWT_EXTRA_SRC :=
$(eval $(call SetupJdkLibrary, BUILD_LIBFONTMANAGER_XAWT, \
NAME := fontmanager_xawt, \
EXCLUDE_FILES := $(LIBFONTMANAGER_XAWT_EXCLUDE_FILES) \
AccelGlyphCache.c, \
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFONTMANAGER_XAWT_CFLAGS), \
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBFONTMANAGER_XAWT_CFLAGS), \
OPTIMIZATION := $(LIBFONTMANAGER_XAWT_OPTIMIZATION), \
CFLAGS_windows = -DCC_NOEX, \
EXTRA_HEADER_DIRS := $(LIBFONTMANAGER_XAWT_EXTRA_HEADER_DIRS), \
EXTRA_SRC := $(LIBFONTMANAGER_XAWT_EXTRA_SRC), \
WARNINGS_AS_ERRORS_xlc := false, \
DISABLED_WARNINGS_gcc := $(HARFBUZZ_DISABLED_WARNINGS_gcc), \
DISABLED_WARNINGS_CXX_gcc := $(HARFBUZZ_DISABLED_WARNINGS_CXX_gcc), \
DISABLED_WARNINGS_clang := $(HARFBUZZ_DISABLED_WARNINGS_clang), \
DISABLED_WARNINGS_microsoft := $(HARFBUZZ_DISABLED_WARNINGS_microsoft), \
LDFLAGS := $(subst -Xlinker -z -Xlinker defs,, \
$(subst -Wl$(COMMA)-z$(COMMA)defs,,$(LDFLAGS_JDKLIB))) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
LDFLAGS_aix := -Wl$(COMMA)-berok, \
LIBS := $(BUILD_LIBFONTMANAGER_FONTLIB), \
LIBS_unix := -lfontmanager -lawt -ljava -ljvm $(LIBM) $(LIBCXX), \
))
$(BUILD_LIBFONTMANAGER_XAWT): $(BUILD_LIBFONTMANAGER)
$(BUILD_LIBFONTMANAGER_XAWT): $(BUILD_LIBAWT_XAWT)
TARGETS += $(BUILD_LIBFONTMANAGER_XAWT)
endif
endif
################################################################################
ifeq ($(call isTargetOs, windows), true)
LIBJAWT_CFLAGS := -EHsc -DUNICODE -D_UNICODE

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2022, 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
@@ -40,6 +40,19 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJ2GSS, \
TARGETS += $(BUILD_LIBJ2GSS)
ifeq ($(call isTargetOs, windows), true)
$(eval $(call SetupJdkLibrary, BUILD_LIBSSPI_BRIDGE, \
NAME := sspi_bridge, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(TOPDIR)/src/java.security.jgss/share/native/libj2gss, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN) \
))
TARGETS += $(BUILD_LIBSSPI_BRIDGE)
endif
################################################################################
ifneq ($(BUILD_CRYPTO), false)
@@ -57,17 +70,6 @@ ifneq ($(BUILD_CRYPTO), false)
))
TARGETS += $(BUILD_LIBW2K_LSA_AUTH)
$(eval $(call SetupJdkLibrary, BUILD_LIBSSPI_BRIDGE, \
NAME := sspi_bridge, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(TOPDIR)/src/java.security.jgss/share/native/libj2gss, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN) \
))
TARGETS += $(BUILD_LIBSSPI_BRIDGE)
endif
ifeq ($(call isTargetOs, macosx), true)

View File

@@ -23,6 +23,7 @@
# questions.
#
DISABLED_WARNINGS_java += lossy-conversions
DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:$(call CommaList, javax.xml.catalog javax.xml.datatype \
javax.xml.transform javax.xml.validation javax.xml.xpath)'

View File

@@ -42,6 +42,7 @@ if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
LDD_CMD="$OTOOL -L"
DIS_CMD="$OTOOL -v -V -t"
STAT_PRINT_SIZE="-f %z"
STRIP="$STRIP -no_code_signature_warning"
elif [ "$OPENJDK_TARGET_OS" = "windows" ]; then
FULLDUMP_CMD="$DUMPBIN -all"
LDD_CMD="$DUMPBIN -dependents"
@@ -674,14 +675,22 @@ compare_bin_file() {
ORIG_THIS_FILE="$THIS_FILE"
ORIG_OTHER_FILE="$OTHER_FILE"
if [ "$STRIP_ALL" = "true" ] || [[ "$STRIP_BEFORE_COMPARE" = *"$BIN_FILE"* ]]; then
if [ "$STRIP_ALL" = "true" ] || [[ "$STRIP_BEFORE_COMPARE" = *"$BIN_FILE"* ]] \
|| [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
THIS_STRIPPED_FILE=$FILE_WORK_DIR/this/$NAME
OTHER_STRIPPED_FILE=$FILE_WORK_DIR/other/$NAME
$MKDIR -p $FILE_WORK_DIR/this $FILE_WORK_DIR/other
$CP $THIS_FILE $THIS_STRIPPED_FILE
$CP $OTHER_FILE $OTHER_STRIPPED_FILE
$STRIP $THIS_STRIPPED_FILE
$STRIP $OTHER_STRIPPED_FILE
if [ "$STRIP_ALL" = "true" ] || [[ "$STRIP_BEFORE_COMPARE" = *"$BIN_FILE"* ]]; then
$STRIP $THIS_STRIPPED_FILE
$STRIP $OTHER_STRIPPED_FILE
fi
# On macosx, always remove any signature before comparing
if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
$CODESIGN --remove-signature $THIS_STRIPPED_FILE
$CODESIGN --remove-signature $OTHER_STRIPPED_FILE
fi
THIS_FILE="$THIS_STRIPPED_FILE"
OTHER_FILE="$OTHER_STRIPPED_FILE"
fi

View File

@@ -352,6 +352,21 @@ function convert_path() {
fi
}
# Treat $1 as name of a file containing paths. Convert those paths to Windows style,
# and output them to the file specified by $2.
# If the output file already exists, it is overwritten.
function convert_file() {
infile="$1"
outfile="$2"
if [[ -e $outfile ]] ; then
rm $outfile
fi
while read line; do
convert_path "$line"
echo "$result" >> $outfile
done < $infile
}
# Treat $1 as name of a file containing paths. Convert those paths to Windows style,
# in a new temporary file, and return a string "@<temp file>" pointing to that
# new file.
@@ -498,6 +513,8 @@ if [[ "$ACTION" == "import" ]] ; then
elif [[ "$ACTION" == "print" ]] ; then
print_command_line "$@"
echo "$result"
elif [[ "$ACTION" == "convert" ]] ; then
convert_file "$@"
elif [[ "$ACTION" == "exec" ]] ; then
exec_command_line "$@"
# Propagate exit code

View File

@@ -86,7 +86,7 @@ the methods in the CustomControlsContext interface.
Here are some resources for learning about and using the Java2D(TM)
OpenJDK group page: http://openjdk.java.net/groups/2d/
OpenJDK group page: https://openjdk.org/groups/2d/
Learning Java 2D: http://www.oracle.com/technetwork/articles/java/java2dpart1-137217.html

View File

@@ -460,6 +460,7 @@ alloc_class chunk1(
);
alloc_class chunk2 (
// Governing predicates for load/store and arithmetic
P0,
P1,
P2,
@@ -467,8 +468,8 @@ alloc_class chunk2 (
P4,
P5,
P6,
P7,
// Extra predicates
P8,
P9,
P10,
@@ -477,6 +478,9 @@ alloc_class chunk2 (
P13,
P14,
P15,
// Preserved for all-true predicate
P7,
);
alloc_class chunk3(RFLAGS);
@@ -1909,19 +1913,19 @@ static enum RC rc_class(OptoReg::Name reg) {
}
// we have 32 int registers * 2 halves
int slots_of_int_registers = RegisterImpl::max_slots_per_register * RegisterImpl::number_of_registers;
int slots_of_int_registers = Register::number_of_registers * Register::max_slots_per_register;
if (reg < slots_of_int_registers) {
return rc_int;
}
// we have 32 float register * 8 halves
int slots_of_float_registers = FloatRegisterImpl::max_slots_per_register * FloatRegisterImpl::number_of_registers;
int slots_of_float_registers = FloatRegister::number_of_registers * FloatRegister::max_slots_per_register;
if (reg < slots_of_int_registers + slots_of_float_registers) {
return rc_float;
}
int slots_of_predicate_registers = PRegisterImpl::max_slots_per_register * PRegisterImpl::number_of_registers;
int slots_of_predicate_registers = PRegister::number_of_registers * PRegister::max_slots_per_register;
if (reg < slots_of_int_registers + slots_of_float_registers + slots_of_predicate_registers) {
return rc_predicate;
}
@@ -3368,7 +3372,7 @@ encode %{
} else {
relocInfo::relocType rtype = $src->constant_reloc();
if (rtype == relocInfo::oop_type) {
__ movoop(dst_reg, (jobject)con, /*immediate*/true);
__ movoop(dst_reg, (jobject)con);
} else if (rtype == relocInfo::metadata_type) {
__ mov_metadata(dst_reg, (Metadata*)con);
} else {
@@ -3622,7 +3626,7 @@ encode %{
address call;
if (!_method) {
// A call to a runtime wrapper, e.g. new, new_typeArray_Java, uncommon_trap.
call = __ trampoline_call(Address(addr, relocInfo::runtime_call_type), &cbuf);
call = __ trampoline_call(Address(addr, relocInfo::runtime_call_type));
if (call == NULL) {
ciEnv::current()->record_failure("CodeCache is full");
return;
@@ -3631,7 +3635,7 @@ encode %{
int method_index = resolved_method_index(cbuf);
RelocationHolder rspec = _optimized_virtual ? opt_virtual_call_Relocation::spec(method_index)
: static_call_Relocation::spec(method_index);
call = __ trampoline_call(Address(addr, rspec), &cbuf);
call = __ trampoline_call(Address(addr, rspec));
if (call == NULL) {
ciEnv::current()->record_failure("CodeCache is full");
return;
@@ -3639,10 +3643,10 @@ encode %{
if (CodeBuffer::supports_shared_stubs() && _method->can_be_statically_bound()) {
// Calls of the same statically bound method can share
// a stub to the interpreter.
cbuf.shared_stub_to_interp_for(_method, cbuf.insts()->mark_off());
cbuf.shared_stub_to_interp_for(_method, call - cbuf.insts_begin());
} else {
// Emit stub for static call
address stub = CompiledStaticCall::emit_to_interp_stub(cbuf);
address stub = CompiledStaticCall::emit_to_interp_stub(cbuf, call);
if (stub == NULL) {
ciEnv::current()->record_failure("CodeCache is full");
return;
@@ -3650,7 +3654,6 @@ encode %{
}
}
_masm.clear_inst_mark();
__ post_call_nop();
// Only non uncommon_trap calls need to reinitialize ptrue.
@@ -3697,7 +3700,6 @@ encode %{
ciEnv::current()->record_failure("CodeCache is full");
return;
}
_masm.clear_inst_mark();
__ post_call_nop();
} else {
Label retaddr;
@@ -5540,6 +5542,7 @@ operand pRegGov()
%{
constraint(ALLOC_IN_RC(gov_pr));
match(RegVectMask);
match(pReg);
op_cost(0);
format %{ %}
interface(REG_INTER);

View File

@@ -127,11 +127,14 @@ source %{
const bool Matcher::match_rule_supported_superword(int opcode, int vlen, BasicType bt) {
if (UseSVE == 0) {
// ConvD2I and ConvL2F are not profitable to be vectorized on NEON, because no direct
// These operations are not profitable to be vectorized on NEON, because no direct
// NEON instructions support them. But the match rule support for them is profitable for
// Vector API intrinsics.
if ((opcode == Op_VectorCastD2X && bt == T_INT) ||
(opcode == Op_VectorCastL2X && bt == T_FLOAT)) {
(opcode == Op_VectorCastL2X && bt == T_FLOAT) ||
opcode == Op_AddReductionVD || opcode == Op_AddReductionVF ||
opcode == Op_MulReductionVD || opcode == Op_MulReductionVF ||
opcode == Op_MulVL) {
return false;
}
}
@@ -153,7 +156,6 @@ source %{
// Check whether specific Op is supported.
// Fail fast, otherwise fall through to common vector_size_supported() check.
switch (opcode) {
case Op_MulVL:
case Op_AndVMask:
case Op_OrVMask:
case Op_XorVMask:
@@ -1494,7 +1496,6 @@ instruct vand_notL_masked(vReg dst_src1, vReg src2, immL_M1 m1, pRegGov pg) %{
// vector abs
instruct vabsB(vReg dst, vReg src) %{
predicate(!n->as_Vector()->is_predicated_vector());
match(Set dst (AbsVB src));
format %{ "vabsB $dst, $src" %}
ins_encode %{
@@ -1510,7 +1511,6 @@ instruct vabsB(vReg dst, vReg src) %{
%}
instruct vabsS(vReg dst, vReg src) %{
predicate(!n->as_Vector()->is_predicated_vector());
match(Set dst (AbsVS src));
format %{ "vabsS $dst, $src" %}
ins_encode %{
@@ -1526,7 +1526,6 @@ instruct vabsS(vReg dst, vReg src) %{
%}
instruct vabsI(vReg dst, vReg src) %{
predicate(!n->as_Vector()->is_predicated_vector());
match(Set dst (AbsVI src));
format %{ "vabsI $dst, $src" %}
ins_encode %{
@@ -1542,7 +1541,6 @@ instruct vabsI(vReg dst, vReg src) %{
%}
instruct vabsL(vReg dst, vReg src) %{
predicate(!n->as_Vector()->is_predicated_vector());
match(Set dst (AbsVL src));
format %{ "vabsL $dst, $src" %}
ins_encode %{
@@ -1558,7 +1556,6 @@ instruct vabsL(vReg dst, vReg src) %{
%}
instruct vabsF(vReg dst, vReg src) %{
predicate(!n->as_Vector()->is_predicated_vector());
match(Set dst (AbsVF src));
format %{ "vabsF $dst, $src" %}
ins_encode %{
@@ -1574,7 +1571,6 @@ instruct vabsF(vReg dst, vReg src) %{
%}
instruct vabsD(vReg dst, vReg src) %{
predicate(!n->as_Vector()->is_predicated_vector());
match(Set dst (AbsVD src));
format %{ "vabsD $dst, $src" %}
ins_encode %{
@@ -1655,11 +1651,11 @@ instruct vabsD_masked(vReg dst_src, pRegGov pg) %{
// vector fabs diff
instruct vfabd(vReg dst, vReg src1, vReg src2) %{
predicate(Matcher::vector_length_in_bytes(n) <= 16);
instruct vfabd_neon(vReg dst, vReg src1, vReg src2) %{
predicate(VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)));
match(Set dst (AbsVF (SubVF src1 src2)));
match(Set dst (AbsVD (SubVD src1 src2)));
format %{ "vfabd $dst, $src1, $src2\t# vector <= 128 bits" %}
format %{ "vfabd_neon $dst, $src1, $src2" %}
ins_encode %{
__ fabd($dst$$FloatRegister, get_arrangement(this),
$src1$$FloatRegister, $src2$$FloatRegister);
@@ -1667,12 +1663,40 @@ instruct vfabd(vReg dst, vReg src1, vReg src2) %{
ins_pipe(pipe_slow);
%}
instruct vfabd_sve(vReg dst_src1, vReg src2) %{
predicate(!VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)));
match(Set dst_src1 (AbsVF (SubVF dst_src1 src2)));
match(Set dst_src1 (AbsVD (SubVD dst_src1 src2)));
format %{ "vfabd_sve $dst_src1, $dst_src1, $src2" %}
ins_encode %{
assert(UseSVE > 0, "must be sve");
BasicType bt = Matcher::vector_element_basic_type(this);
__ sve_fabd($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
ptrue, $src2$$FloatRegister);
%}
ins_pipe(pipe_slow);
%}
// vector fabs diff - predicated
instruct vfabd_masked(vReg dst_src1, vReg src2, pRegGov pg) %{
predicate(UseSVE > 0);
match(Set dst_src1 (AbsVF (SubVF (Binary dst_src1 src2) pg) pg));
match(Set dst_src1 (AbsVD (SubVD (Binary dst_src1 src2) pg) pg));
format %{ "vfabd_masked $dst_src1, $pg, $dst_src1, $src2" %}
ins_encode %{
BasicType bt = Matcher::vector_element_basic_type(this);
__ sve_fabd($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
$pg$$PRegister, $src2$$FloatRegister);
%}
ins_pipe(pipe_slow);
%}
// ------------------------------ Vector neg -----------------------------------
// vector neg
instruct vnegI(vReg dst, vReg src) %{
predicate(!n->as_Vector()->is_predicated_vector());
match(Set dst (NegVI src));
format %{ "vnegI $dst, $src" %}
ins_encode %{
@@ -1690,7 +1714,6 @@ instruct vnegI(vReg dst, vReg src) %{
%}
instruct vnegL(vReg dst, vReg src) %{
predicate(!n->as_Vector()->is_predicated_vector());
match(Set dst (NegVL src));
format %{ "vnegL $dst, $src" %}
ins_encode %{
@@ -1706,7 +1729,6 @@ instruct vnegL(vReg dst, vReg src) %{
%}
instruct vnegF(vReg dst, vReg src) %{
predicate(!n->as_Vector()->is_predicated_vector());
match(Set dst (NegVF src));
format %{ "vnegF $dst, $src" %}
ins_encode %{
@@ -1722,7 +1744,6 @@ instruct vnegF(vReg dst, vReg src) %{
%}
instruct vnegD(vReg dst, vReg src) %{
predicate(!n->as_Vector()->is_predicated_vector());
match(Set dst (NegVD src));
format %{ "vnegD $dst, $src" %}
ins_encode %{
@@ -1786,7 +1807,6 @@ instruct vnegD_masked(vReg dst_src, pRegGov pg) %{
// vector sqrt
instruct vsqrtF(vReg dst, vReg src) %{
predicate(!n->as_Vector()->is_predicated_vector());
match(Set dst (SqrtVF src));
format %{ "vsqrtF $dst, $src" %}
ins_encode %{
@@ -1802,7 +1822,6 @@ instruct vsqrtF(vReg dst, vReg src) %{
%}
instruct vsqrtD(vReg dst, vReg src) %{
predicate(!n->as_Vector()->is_predicated_vector());
match(Set dst (SqrtVD src));
format %{ "vsqrtD $dst, $src" %}
ins_encode %{
@@ -2022,13 +2041,11 @@ instruct vmla(vReg dst_src1, vReg src2, vReg src3) %{
match(Set dst_src1 (AddVB dst_src1 (MulVB src2 src3)));
match(Set dst_src1 (AddVS dst_src1 (MulVS src2 src3)));
match(Set dst_src1 (AddVI dst_src1 (MulVI src2 src3)));
match(Set dst_src1 (AddVL dst_src1 (MulVL src2 src3)));
format %{ "vmla $dst_src1, src2, src3" %}
format %{ "vmla $dst_src1, $src2, $src3" %}
ins_encode %{
BasicType bt = Matcher::vector_element_basic_type(this);
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
if (VM_Version::use_neon_for_vector(length_in_bytes) && bt != T_LONG) {
// NEON mlav does not accept T2D arrangement.
if (VM_Version::use_neon_for_vector(length_in_bytes)) {
__ mlav($dst_src1$$FloatRegister, get_arrangement(this),
$src2$$FloatRegister, $src3$$FloatRegister);
} else {
@@ -2040,13 +2057,25 @@ instruct vmla(vReg dst_src1, vReg src2, vReg src3) %{
ins_pipe(pipe_slow);
%}
instruct vmlaL(vReg dst_src1, vReg src2, vReg src3) %{
predicate(UseSVE > 0);
match(Set dst_src1 (AddVL dst_src1 (MulVL src2 src3)));
format %{ "vmlaL $dst_src1, $src2, $src3" %}
ins_encode %{
BasicType bt = Matcher::vector_element_basic_type(this);
__ sve_mla($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
ptrue, $src2$$FloatRegister, $src3$$FloatRegister);
%}
ins_pipe(pipe_slow);
%}
instruct vmla_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
predicate(UseSVE > 0);
match(Set dst_src1 (AddVB (Binary dst_src1 (MulVB src2 src3)) pg));
match(Set dst_src1 (AddVS (Binary dst_src1 (MulVS src2 src3)) pg));
match(Set dst_src1 (AddVI (Binary dst_src1 (MulVI src2 src3)) pg));
match(Set dst_src1 (AddVL (Binary dst_src1 (MulVL src2 src3)) pg));
format %{ "vmla_masked $dst_src1, $pg, src2, src3" %}
format %{ "vmla_masked $dst_src1, $pg, $src2, $src3" %}
ins_encode %{
BasicType bt = Matcher::vector_element_basic_type(this);
__ sve_mla($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
@@ -2101,13 +2130,11 @@ instruct vmls(vReg dst_src1, vReg src2, vReg src3) %{
match(Set dst_src1 (SubVB dst_src1 (MulVB src2 src3)));
match(Set dst_src1 (SubVS dst_src1 (MulVS src2 src3)));
match(Set dst_src1 (SubVI dst_src1 (MulVI src2 src3)));
match(Set dst_src1 (SubVL dst_src1 (MulVL src2 src3)));
format %{ "vmls $dst_src1, src2, src3" %}
format %{ "vmls $dst_src1, $src2, $src3" %}
ins_encode %{
BasicType bt = Matcher::vector_element_basic_type(this);
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
if (VM_Version::use_neon_for_vector(length_in_bytes) && bt != T_LONG) {
// NEON mlsv does not accept T2D arrangement.
if (VM_Version::use_neon_for_vector(length_in_bytes)) {
__ mlsv($dst_src1$$FloatRegister, get_arrangement(this),
$src2$$FloatRegister, $src3$$FloatRegister);
} else {
@@ -2119,13 +2146,25 @@ instruct vmls(vReg dst_src1, vReg src2, vReg src3) %{
ins_pipe(pipe_slow);
%}
instruct vmlsL(vReg dst_src1, vReg src2, vReg src3) %{
predicate(UseSVE > 0);
match(Set dst_src1 (SubVL dst_src1 (MulVL src2 src3)));
format %{ "vmlsL $dst_src1, $src2, $src3" %}
ins_encode %{
BasicType bt = Matcher::vector_element_basic_type(this);
__ sve_mls($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
ptrue, $src2$$FloatRegister, $src3$$FloatRegister);
%}
ins_pipe(pipe_slow);
%}
instruct vmls_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
predicate(UseSVE > 0);
match(Set dst_src1 (SubVB (Binary dst_src1 (MulVB src2 src3)) pg));
match(Set dst_src1 (SubVS (Binary dst_src1 (MulVS src2 src3)) pg));
match(Set dst_src1 (SubVI (Binary dst_src1 (MulVI src2 src3)) pg));
match(Set dst_src1 (SubVL (Binary dst_src1 (MulVL src2 src3)) pg));
format %{ "vmls_masked $dst_src1, $pg, src2, src3" %}
format %{ "vmls_masked $dst_src1, $pg, $src2, $src3" %}
ins_encode %{
BasicType bt = Matcher::vector_element_basic_type(this);
__ sve_mls($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
@@ -2137,9 +2176,8 @@ instruct vmls_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
// vector fmls
// dst_src1 = dst_src1 + -src2 * src3
// The NegVF/NegVD must not be predicated.
instruct vfmls1(vReg dst_src1, vReg src2, vReg src3) %{
predicate(UseFMA && !n->in(2)->in(1)->as_Vector()->is_predicated_vector());
predicate(UseFMA);
match(Set dst_src1 (FmaVF dst_src1 (Binary (NegVF src2) src3)));
match(Set dst_src1 (FmaVD dst_src1 (Binary (NegVD src2) src3)));
format %{ "vfmls1 $dst_src1, $src2, $src3" %}
@@ -2159,9 +2197,8 @@ instruct vfmls1(vReg dst_src1, vReg src2, vReg src3) %{
%}
// dst_src1 = dst_src1 + src2 * -src3
// The NegVF/NegVD must not be predicated.
instruct vfmls2(vReg dst_src1, vReg src2, vReg src3) %{
predicate(UseFMA && !n->in(2)->in(2)->as_Vector()->is_predicated_vector());
predicate(UseFMA);
match(Set dst_src1 (FmaVF dst_src1 (Binary src2 (NegVF src3))));
match(Set dst_src1 (FmaVD dst_src1 (Binary src2 (NegVD src3))));
format %{ "vfmls2 $dst_src1, $src2, $src3" %}
@@ -2183,10 +2220,8 @@ instruct vfmls2(vReg dst_src1, vReg src2, vReg src3) %{
// vector fmsb - predicated
// dst_src1 = dst_src1 * -src2 + src3
// The NegVF/NegVD must not be predicated.
instruct vfmsb_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
predicate(UseFMA && UseSVE > 0 &&
!n->in(1)->in(2)->as_Vector()->is_predicated_vector());
predicate(UseFMA && UseSVE > 0);
match(Set dst_src1 (FmaVF (Binary dst_src1 (NegVF src2)) (Binary src3 pg)));
match(Set dst_src1 (FmaVD (Binary dst_src1 (NegVD src2)) (Binary src3 pg)));
format %{ "vfmsb_masked $dst_src1, $pg, $src2, $src3" %}
@@ -2201,11 +2236,8 @@ instruct vfmsb_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
// vector fnmla (sve)
// dst_src1 = -dst_src1 + -src2 * src3
// The NegVF/NegVD must not be predicated.
instruct vfnmla1(vReg dst_src1, vReg src2, vReg src3) %{
predicate(UseFMA && UseSVE > 0 &&
!n->in(1)->as_Vector()->is_predicated_vector() &&
!n->in(2)->in(1)->as_Vector()->is_predicated_vector());
predicate(UseFMA && UseSVE > 0);
match(Set dst_src1 (FmaVF (NegVF dst_src1) (Binary (NegVF src2) src3)));
match(Set dst_src1 (FmaVD (NegVD dst_src1) (Binary (NegVD src2) src3)));
format %{ "vfnmla1 $dst_src1, $src2, $src3" %}
@@ -2218,11 +2250,8 @@ instruct vfnmla1(vReg dst_src1, vReg src2, vReg src3) %{
%}
// dst_src1 = -dst_src1 + src2 * -src3
// The NegVF/NegVD must not be predicated.
instruct vfnmla2(vReg dst_src1, vReg src2, vReg src3) %{
predicate(UseFMA && UseSVE > 0 &&
!n->in(1)->as_Vector()->is_predicated_vector() &&
!n->in(2)->in(2)->as_Vector()->is_predicated_vector());
predicate(UseFMA && UseSVE > 0);
match(Set dst_src1 (FmaVF (NegVF dst_src1) (Binary src2 (NegVF src3))));
match(Set dst_src1 (FmaVD (NegVD dst_src1) (Binary src2 (NegVD src3))));
format %{ "vfnmla2 $dst_src1, $src2, $src3" %}
@@ -2237,11 +2266,8 @@ instruct vfnmla2(vReg dst_src1, vReg src2, vReg src3) %{
// vector fnmad - predicated
// dst_src1 = -src3 + dst_src1 * -src2
// The NegVF/NegVD must not be predicated.
instruct vfnmad_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
predicate(UseFMA && UseSVE > 0 &&
!n->in(1)->in(2)->as_Vector()->is_predicated_vector() &&
!n->in(2)->in(1)->as_Vector()->is_predicated_vector());
predicate(UseFMA && UseSVE > 0);
match(Set dst_src1 (FmaVF (Binary dst_src1 (NegVF src2)) (Binary (NegVF src3) pg)));
match(Set dst_src1 (FmaVD (Binary dst_src1 (NegVD src2)) (Binary (NegVD src3) pg)));
format %{ "vfnmad_masked $dst_src1, $pg, $src2, $src3" %}
@@ -2256,10 +2282,8 @@ instruct vfnmad_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
// vector fnmls (sve)
// dst_src1 = -dst_src1 + src2 * src3
// The NegVF/NegVD must not be predicated.
instruct vfnmls(vReg dst_src1, vReg src2, vReg src3) %{
predicate(UseFMA && UseSVE > 0 &&
!n->in(1)->as_Vector()->is_predicated_vector());
predicate(UseFMA && UseSVE > 0);
match(Set dst_src1 (FmaVF (NegVF dst_src1) (Binary src2 src3)));
match(Set dst_src1 (FmaVD (NegVD dst_src1) (Binary src2 src3)));
format %{ "vfnmls $dst_src1, $src2, $src3" %}
@@ -2274,10 +2298,8 @@ instruct vfnmls(vReg dst_src1, vReg src2, vReg src3) %{
// vector fnmsb - predicated
// dst_src1 = -src3 + dst_src1 * src2
// The NegVF/NegVD must not be predicated.
instruct vfnmsb_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
predicate(UseFMA && UseSVE > 0 &&
!n->in(2)->in(1)->as_Vector()->is_predicated_vector());
predicate(UseFMA && UseSVE > 0);
match(Set dst_src1 (FmaVF (Binary dst_src1 src2) (Binary (NegVF src3) pg)));
match(Set dst_src1 (FmaVD (Binary dst_src1 src2) (Binary (NegVD src3) pg)));
format %{ "vfnmsb_masked $dst_src1, $pg, $src2, $src3" %}
@@ -4637,9 +4659,8 @@ instruct vloadmask_neon(vReg dst, vReg src) %{
ins_pipe(pipe_slow);
%}
instruct vloadmaskB_sve(pRegGov dst, vReg src, rFlagsReg cr) %{
predicate(UseSVE > 0 && !n->is_predicated_vector() &&
Matcher::vector_element_basic_type(n) == T_BYTE);
instruct vloadmaskB_sve(pReg dst, vReg src, rFlagsReg cr) %{
predicate(UseSVE > 0 && Matcher::vector_element_basic_type(n) == T_BYTE);
match(Set dst (VectorLoadMask src));
effect(KILL cr);
format %{ "vloadmaskB_sve $dst, $src\t# KILL cr" %}
@@ -4650,9 +4671,8 @@ instruct vloadmaskB_sve(pRegGov dst, vReg src, rFlagsReg cr) %{
ins_pipe(pipe_slow);
%}
instruct vloadmask_extend_sve(pRegGov dst, vReg src, vReg tmp, rFlagsReg cr) %{
predicate(UseSVE > 0 && !n->is_predicated_vector() &&
Matcher::vector_element_basic_type(n) != T_BYTE);
instruct vloadmask_extend_sve(pReg dst, vReg src, vReg tmp, rFlagsReg cr) %{
predicate(UseSVE > 0 && Matcher::vector_element_basic_type(n) != T_BYTE);
match(Set dst (VectorLoadMask src));
effect(TEMP tmp, KILL cr);
format %{ "vloadmask_extend_sve $dst, $src\t# KILL $tmp, cr" %}
@@ -4665,7 +4685,7 @@ instruct vloadmask_extend_sve(pRegGov dst, vReg src, vReg tmp, rFlagsReg cr) %{
ins_pipe(pipe_slow);
%}
instruct vloadmaskB_masked(pRegGov dst, vReg src, pRegGov pg, rFlagsReg cr) %{
instruct vloadmaskB_masked(pReg dst, vReg src, pRegGov pg, rFlagsReg cr) %{
predicate(UseSVE > 0 && Matcher::vector_element_basic_type(n) == T_BYTE);
match(Set dst (VectorLoadMask src pg));
effect(KILL cr);
@@ -4677,7 +4697,7 @@ instruct vloadmaskB_masked(pRegGov dst, vReg src, pRegGov pg, rFlagsReg cr) %{
ins_pipe(pipe_slow);
%}
instruct vloadmask_extend_masked(pRegGov dst, vReg src, pRegGov pg, vReg tmp, rFlagsReg cr) %{
instruct vloadmask_extend_masked(pReg dst, vReg src, pRegGov pg, vReg tmp, rFlagsReg cr) %{
predicate(UseSVE > 0 && Matcher::vector_element_basic_type(n) != T_BYTE);
match(Set dst (VectorLoadMask src pg));
effect(TEMP tmp, KILL cr);
@@ -4731,7 +4751,7 @@ instruct vstoremask_narrow_neon(vReg dst, vReg src, immI_gt_1 size) %{
// vector store mask - sve
instruct vstoremaskB_sve(vReg dst, pRegGov src, immI_1 size) %{
instruct vstoremaskB_sve(vReg dst, pReg src, immI_1 size) %{
predicate(UseSVE > 0);
match(Set dst (VectorStoreMask src size));
format %{ "vstoremaskB_sve $dst, $src" %}
@@ -4741,7 +4761,7 @@ instruct vstoremaskB_sve(vReg dst, pRegGov src, immI_1 size) %{
ins_pipe(pipe_slow);
%}
instruct vstoremask_narrow_sve(vReg dst, pRegGov src, immI_gt_1 size, vReg tmp) %{
instruct vstoremask_narrow_sve(vReg dst, pReg src, immI_gt_1 size, vReg tmp) %{
predicate(UseSVE > 0);
match(Set dst (VectorStoreMask src size));
effect(TEMP_DEF dst, TEMP tmp);
@@ -4758,8 +4778,8 @@ instruct vstoremask_narrow_sve(vReg dst, pRegGov src, immI_gt_1 size, vReg tmp)
// Combined rules for vector mask load when the vector element type is not T_BYTE
// VectorLoadMask+LoadVector, and the VectorLoadMask is unpredicated.
instruct vloadmask_loadV(pRegGov dst, indirect mem, vReg tmp, rFlagsReg cr) %{
predicate(UseSVE > 0 && !n->is_predicated_vector() &&
instruct vloadmask_loadV(pReg dst, indirect mem, vReg tmp, rFlagsReg cr) %{
predicate(UseSVE > 0 &&
type2aelembytes(Matcher::vector_element_basic_type(n)) > 1);
match(Set dst (VectorLoadMask (LoadVector mem)));
effect(TEMP tmp, KILL cr);
@@ -4780,7 +4800,7 @@ instruct vloadmask_loadV(pRegGov dst, indirect mem, vReg tmp, rFlagsReg cr) %{
%}
// VectorLoadMask+LoadVector, and the VectorLoadMask is predicated.
instruct vloadmask_loadV_masked(pRegGov dst, indirect mem, pRegGov pg,
instruct vloadmask_loadV_masked(pReg dst, indirect mem, pRegGov pg,
vReg tmp, rFlagsReg cr) %{
predicate(UseSVE > 0 &&
type2aelembytes(Matcher::vector_element_basic_type(n)) > 1);
@@ -4801,8 +4821,8 @@ instruct vloadmask_loadV_masked(pRegGov dst, indirect mem, pRegGov pg,
%}
// VectorLoadMask+LoadVectorMasked, and the VectorLoadMask is unpredicated.
instruct vloadmask_loadVMasked(pRegGov dst, vmemA mem, pRegGov pg, vReg tmp, rFlagsReg cr) %{
predicate(UseSVE > 0 && !n->is_predicated_vector() &&
instruct vloadmask_loadVMasked(pReg dst, vmemA mem, pRegGov pg, vReg tmp, rFlagsReg cr) %{
predicate(UseSVE > 0 &&
type2aelembytes(Matcher::vector_element_basic_type(n)) > 1);
match(Set dst (VectorLoadMask (LoadVectorMasked mem pg)));
effect(TEMP tmp, KILL cr);
@@ -4828,7 +4848,7 @@ instruct vloadmask_loadVMasked(pRegGov dst, vmemA mem, pRegGov pg, vReg tmp, rFl
%}
// VectorLoadMask+LoadVectorMasked, and the VectorLoadMask is predicated.
instruct vloadmask_loadVMasked_masked(pRegGov dst, vmemA mem, pRegGov pg1, pRegGov pg2,
instruct vloadmask_loadVMasked_masked(pReg dst, vmemA mem, pRegGov pg1, pRegGov pg2,
vReg tmp, rFlagsReg cr) %{
predicate(UseSVE > 0 &&
type2aelembytes(Matcher::vector_element_basic_type(n)) > 1);
@@ -4858,7 +4878,7 @@ instruct vloadmask_loadVMasked_masked(pRegGov dst, vmemA mem, pRegGov pg1, pRegG
// Combined rules for vector mask store when the vector element type is not T_BYTE
// StoreVector+VectorStoreMask, and the vector size of "src" is equal to the MaxVectorSize.
instruct storeV_vstoremask(indirect mem, pRegGov src, immI_gt_1 esize, vReg tmp) %{
instruct storeV_vstoremask(indirect mem, pReg src, immI_gt_1 esize, vReg tmp) %{
predicate(UseSVE > 0 &&
Matcher::vector_length_in_bytes(n->as_StoreVector()->in(MemNode::ValueIn)->in(1)) == MaxVectorSize);
match(Set mem (StoreVector mem (VectorStoreMask src esize)));
@@ -4879,7 +4899,7 @@ instruct storeV_vstoremask(indirect mem, pRegGov src, immI_gt_1 esize, vReg tmp)
%}
// StoreVector+VectorStoreMask, and the vector size of "src" is less than the MaxVectorSize.
instruct storeV_vstoremask_masked(indirect mem, pRegGov src, immI_gt_1 esize,
instruct storeV_vstoremask_masked(indirect mem, pReg src, immI_gt_1 esize,
vReg tmp, pRegGov pgtmp, rFlagsReg cr) %{
predicate(UseSVE > 0 &&
Matcher::vector_length_in_bytes(n->as_StoreVector()->in(MemNode::ValueIn)->in(1)) < MaxVectorSize);
@@ -4901,7 +4921,7 @@ instruct storeV_vstoremask_masked(indirect mem, pRegGov src, immI_gt_1 esize,
%}
// StoreVectorMasked+VectorStoreMask, and the vector size of "src" is equal to the MaxVectorSize.
instruct storeVMasked_vstoremask(vmemA mem, pRegGov src, pRegGov pg, immI_gt_1 esize, vReg tmp) %{
instruct storeVMasked_vstoremask(vmemA mem, pReg src, pRegGov pg, immI_gt_1 esize, vReg tmp) %{
predicate(UseSVE > 0 &&
Matcher::vector_length_in_bytes(n->as_StoreVector()->in(MemNode::ValueIn)->in(1)) == MaxVectorSize);
match(Set mem (StoreVectorMasked mem (Binary (VectorStoreMask src esize) pg)));
@@ -4927,7 +4947,7 @@ instruct storeVMasked_vstoremask(vmemA mem, pRegGov src, pRegGov pg, immI_gt_1 e
%}
// StoreVectorMasked+VectorStoreMask, and the vector size of "src" is less than the MaxVectorSize.
instruct storeVMasked_vstoremask_masked(vmemA mem, pRegGov src, pRegGov pg, immI_gt_1 esize,
instruct storeVMasked_vstoremask_masked(vmemA mem, pReg src, pRegGov pg, immI_gt_1 esize,
vReg tmp, pRegGov pgtmp, rFlagsReg cr) %{
predicate(UseSVE > 0 &&
Matcher::vector_length_in_bytes(n->as_StoreVector()->in(MemNode::ValueIn)->in(1)) < MaxVectorSize);
@@ -4957,7 +4977,7 @@ instruct storeVMasked_vstoremask_masked(vmemA mem, pRegGov src, pRegGov pg, immI
// vector mask logical ops: and/or/xor/and_not
instruct vmask_and(pRegGov pd, pRegGov pn, pRegGov pm) %{
instruct vmask_and(pReg pd, pReg pn, pReg pm) %{
predicate(UseSVE > 0);
match(Set pd (AndVMask pn pm));
format %{ "vmask_and $pd, $pn, $pm" %}
@@ -4967,7 +4987,7 @@ instruct vmask_and(pRegGov pd, pRegGov pn, pRegGov pm) %{
ins_pipe(pipe_slow);
%}
instruct vmask_or(pRegGov pd, pRegGov pn, pRegGov pm) %{
instruct vmask_or(pReg pd, pReg pn, pReg pm) %{
predicate(UseSVE > 0);
match(Set pd (OrVMask pn pm));
format %{ "vmask_or $pd, $pn, $pm" %}
@@ -4977,7 +4997,7 @@ instruct vmask_or(pRegGov pd, pRegGov pn, pRegGov pm) %{
ins_pipe(pipe_slow);
%}
instruct vmask_xor(pRegGov pd, pRegGov pn, pRegGov pm) %{
instruct vmask_xor(pReg pd, pReg pn, pReg pm) %{
predicate(UseSVE > 0);
match(Set pd (XorVMask pn pm));
format %{ "vmask_xor $pd, $pn, $pm" %}
@@ -4987,7 +5007,7 @@ instruct vmask_xor(pRegGov pd, pRegGov pn, pRegGov pm) %{
ins_pipe(pipe_slow);
%}
instruct vmask_and_notI(pRegGov pd, pRegGov pn, pRegGov pm, immI_M1 m1) %{
instruct vmask_and_notI(pReg pd, pReg pn, pReg pm, immI_M1 m1) %{
predicate(UseSVE > 0);
match(Set pd (AndVMask pn (XorVMask pm (MaskAll m1))));
format %{ "vmask_and_notI $pd, $pn, $pm" %}
@@ -4997,7 +5017,7 @@ instruct vmask_and_notI(pRegGov pd, pRegGov pn, pRegGov pm, immI_M1 m1) %{
ins_pipe(pipe_slow);
%}
instruct vmask_and_notL(pRegGov pd, pRegGov pn, pRegGov pm, immL_M1 m1) %{
instruct vmask_and_notL(pReg pd, pReg pn, pReg pm, immL_M1 m1) %{
predicate(UseSVE > 0);
match(Set pd (AndVMask pn (XorVMask pm (MaskAll m1))));
format %{ "vmask_and_notL $pd, $pn, $pm" %}
@@ -5025,7 +5045,7 @@ instruct vmaskcmp_neon(vReg dst, vReg src1, vReg src2, immI cond) %{
ins_pipe(pipe_slow);
%}
instruct vmaskcmp_sve(pRegGov dst, vReg src1, vReg src2, immI cond, rFlagsReg cr) %{
instruct vmaskcmp_sve(pReg dst, vReg src1, vReg src2, immI cond, rFlagsReg cr) %{
predicate(UseSVE > 0);
match(Set dst (VectorMaskCmp (Binary src1 src2) cond));
effect(KILL cr);
@@ -5040,7 +5060,7 @@ instruct vmaskcmp_sve(pRegGov dst, vReg src1, vReg src2, immI cond, rFlagsReg cr
ins_pipe(pipe_slow);
%}
instruct vmaskcmp_masked(pRegGov dst, vReg src1, vReg src2, immI cond,
instruct vmaskcmp_masked(pReg dst, vReg src1, vReg src2, immI cond,
pRegGov pg, rFlagsReg cr) %{
predicate(UseSVE > 0);
match(Set dst (VectorMaskCmp (Binary src1 src2) (Binary cond pg)));
@@ -5067,7 +5087,49 @@ instruct vmaskcast_same_esize_neon(vReg dst_src) %{
ins_pipe(pipe_class_empty);
%}
instruct vmaskcast_same_esize_sve(pRegGov dst_src) %{
instruct vmaskcast_extend_neon(vReg dst, vReg src) %{
predicate(UseSVE == 0 &&
Matcher::vector_length_in_bytes(n) > Matcher::vector_length_in_bytes(n->in(1)));
match(Set dst (VectorMaskCast src));
format %{ "vmaskcast_extend_neon $dst, $src" %}
ins_encode %{
BasicType dst_bt = Matcher::vector_element_basic_type(this);
if (is_floating_point_type(dst_bt)) {
dst_bt = (dst_bt == T_FLOAT) ? T_INT : T_LONG;
}
uint length_in_bytes_dst = Matcher::vector_length_in_bytes(this);
BasicType src_bt = Matcher::vector_element_basic_type(this, $src);
if (is_floating_point_type(src_bt)) {
src_bt = (src_bt == T_FLOAT) ? T_INT : T_LONG;
}
__ neon_vector_extend($dst$$FloatRegister, dst_bt, length_in_bytes_dst,
$src$$FloatRegister, src_bt);
%}
ins_pipe(pipe_slow);
%}
instruct vmaskcast_narrow_neon(vReg dst, vReg src) %{
predicate(UseSVE == 0 &&
Matcher::vector_length_in_bytes(n) < Matcher::vector_length_in_bytes(n->in(1)));
match(Set dst (VectorMaskCast src));
format %{ "vmaskcast_narrow_neon $dst, $src" %}
ins_encode %{
BasicType dst_bt = Matcher::vector_element_basic_type(this);
if (is_floating_point_type(dst_bt)) {
dst_bt = (dst_bt == T_FLOAT) ? T_INT : T_LONG;
}
BasicType src_bt = Matcher::vector_element_basic_type(this, $src);
if (is_floating_point_type(src_bt)) {
src_bt = (src_bt == T_FLOAT) ? T_INT : T_LONG;
}
uint length_in_bytes_src = Matcher::vector_length_in_bytes(this, $src);
__ neon_vector_narrow($dst$$FloatRegister, dst_bt,
$src$$FloatRegister, src_bt, length_in_bytes_src);
%}
ins_pipe(pipe_slow);
%}
instruct vmaskcast_same_esize_sve(pReg dst_src) %{
predicate(UseSVE > 0 &&
Matcher::vector_length_in_bytes(n) == Matcher::vector_length_in_bytes(n->in(1)));
match(Set dst_src (VectorMaskCast dst_src));
@@ -5077,11 +5139,11 @@ instruct vmaskcast_same_esize_sve(pRegGov dst_src) %{
ins_pipe(pipe_class_empty);
%}
instruct vmaskcast_extend(pRegGov dst, pReg src) %{
instruct vmaskcast_extend_sve(pReg dst, pReg src) %{
predicate(UseSVE > 0 &&
Matcher::vector_length_in_bytes(n) > Matcher::vector_length_in_bytes(n->in(1)));
match(Set dst (VectorMaskCast src));
format %{ "vmaskcast_extend $dst, $src" %}
format %{ "vmaskcast_extend_sve $dst, $src" %}
ins_encode %{
uint length_in_bytes_dst = Matcher::vector_length_in_bytes(this);
uint length_in_bytes_src = Matcher::vector_length_in_bytes(this, $src);
@@ -5094,11 +5156,11 @@ instruct vmaskcast_extend(pRegGov dst, pReg src) %{
ins_pipe(pipe_slow);
%}
instruct vmaskcast_narrow(pRegGov dst, pReg src) %{
instruct vmaskcast_narrow_sve(pReg dst, pReg src) %{
predicate(UseSVE > 0 &&
Matcher::vector_length_in_bytes(n) < Matcher::vector_length_in_bytes(n->in(1)));
match(Set dst (VectorMaskCast src));
format %{ "vmaskcast_narrow $dst, $src" %}
format %{ "vmaskcast_narrow_sve $dst, $src" %}
ins_encode %{
uint length_in_bytes_dst = Matcher::vector_length_in_bytes(this);
uint length_in_bytes_src = Matcher::vector_length_in_bytes(this, $src);
@@ -5113,7 +5175,7 @@ instruct vmaskcast_narrow(pRegGov dst, pReg src) %{
// vector mask reinterpret
instruct vmask_reinterpret_same_esize(pRegGov dst_src) %{
instruct vmask_reinterpret_same_esize(pReg dst_src) %{
predicate(UseSVE > 0 &&
Matcher::vector_length(n) == Matcher::vector_length(n->in(1)) &&
Matcher::vector_length_in_bytes(n) == Matcher::vector_length_in_bytes(n->in(1)));
@@ -5124,7 +5186,7 @@ instruct vmask_reinterpret_same_esize(pRegGov dst_src) %{
ins_pipe(pipe_class_empty);
%}
instruct vmask_reinterpret_diff_esize(pRegGov dst, pRegGov src, vReg tmp, rFlagsReg cr) %{
instruct vmask_reinterpret_diff_esize(pReg dst, pReg src, vReg tmp, rFlagsReg cr) %{
predicate(UseSVE > 0 &&
Matcher::vector_length(n) != Matcher::vector_length(n->in(1)) &&
Matcher::vector_length_in_bytes(n) == Matcher::vector_length_in_bytes(n->in(1)));
@@ -5256,7 +5318,7 @@ instruct vmask_firsttrue_8or16e(iRegINoSp dst, vReg src) %{
// them are set.
instruct vmask_firsttrue_sve(iRegINoSp dst, pReg src, pReg ptmp) %{
predicate(UseSVE > 0 && !n->is_predicated_vector());
predicate(UseSVE > 0);
match(Set dst (VectorMaskFirstTrue src));
effect(TEMP ptmp);
format %{ "vmask_firsttrue_sve $dst, $src\t# KILL $ptmp" %}
@@ -5270,7 +5332,7 @@ instruct vmask_firsttrue_sve(iRegINoSp dst, pReg src, pReg ptmp) %{
ins_pipe(pipe_slow);
%}
instruct vmask_firsttrue_masked(iRegINoSp dst, pReg src, pRegGov pg, pReg ptmp) %{
instruct vmask_firsttrue_masked(iRegINoSp dst, pReg src, pReg pg, pReg ptmp) %{
predicate(UseSVE > 0);
match(Set dst (VectorMaskFirstTrue src pg));
effect(TEMP ptmp);
@@ -5382,7 +5444,7 @@ instruct vmask_tolong_sve(iRegLNoSp dst, pReg src, vReg tmp1, vReg tmp2) %{
// fromlong
instruct vmask_fromlong(pRegGov dst, iRegL src, vReg tmp1, vReg tmp2) %{
instruct vmask_fromlong(pReg dst, iRegL src, vReg tmp1, vReg tmp2) %{
match(Set dst (VectorLongToMask src));
effect(TEMP tmp1, TEMP tmp2);
format %{ "vmask_fromlong $dst, $src\t# vector (sve2). KILL $tmp1, $tmp2" %}
@@ -5399,7 +5461,7 @@ instruct vmask_fromlong(pRegGov dst, iRegL src, vReg tmp1, vReg tmp2) %{
// maskAll
instruct vmaskAll_immI(pRegGov dst, immI src, rFlagsReg cr) %{
instruct vmaskAll_immI(pReg dst, immI src, rFlagsReg cr) %{
predicate(UseSVE > 0);
match(Set dst (MaskAll src));
effect(KILL cr);
@@ -5417,8 +5479,8 @@ instruct vmaskAll_immI(pRegGov dst, immI src, rFlagsReg cr) %{
ins_pipe(pipe_slow);
%}
instruct vmaskAllI(pRegGov dst, iRegIorL2I src, vReg tmp, rFlagsReg cr) %{
predicate(UseSVE > 0 && !n->is_predicated_vector());
instruct vmaskAllI(pReg dst, iRegIorL2I src, vReg tmp, rFlagsReg cr) %{
predicate(UseSVE > 0);
match(Set dst (MaskAll src));
effect(TEMP tmp, KILL cr);
format %{ "vmaskAllI $dst, $src\t# KILL $tmp, cr" %}
@@ -5433,7 +5495,7 @@ instruct vmaskAllI(pRegGov dst, iRegIorL2I src, vReg tmp, rFlagsReg cr) %{
ins_pipe(pipe_slow);
%}
instruct vmaskAllI_masked(pRegGov dst, iRegIorL2I src, pRegGov pg, vReg tmp, rFlagsReg cr) %{
instruct vmaskAllI_masked(pReg dst, iRegIorL2I src, pRegGov pg, vReg tmp, rFlagsReg cr) %{
predicate(UseSVE > 0);
match(Set dst (MaskAll src pg));
effect(TEMP tmp, KILL cr);
@@ -5448,7 +5510,7 @@ instruct vmaskAllI_masked(pRegGov dst, iRegIorL2I src, pRegGov pg, vReg tmp, rFl
ins_pipe(pipe_slow);
%}
instruct vmaskAll_immL(pRegGov dst, immL src, rFlagsReg cr) %{
instruct vmaskAll_immL(pReg dst, immL src, rFlagsReg cr) %{
predicate(UseSVE > 0);
match(Set dst (MaskAll src));
effect(KILL cr);
@@ -5466,8 +5528,8 @@ instruct vmaskAll_immL(pRegGov dst, immL src, rFlagsReg cr) %{
ins_pipe(pipe_slow);
%}
instruct vmaskAllL(pRegGov dst, iRegL src, vReg tmp, rFlagsReg cr) %{
predicate(UseSVE > 0 && !n->is_predicated_vector());
instruct vmaskAllL(pReg dst, iRegL src, vReg tmp, rFlagsReg cr) %{
predicate(UseSVE > 0);
match(Set dst (MaskAll src));
effect(TEMP tmp, KILL cr);
format %{ "vmaskAllL $dst, $src\t# KILL $tmp, cr" %}
@@ -5482,7 +5544,7 @@ instruct vmaskAllL(pRegGov dst, iRegL src, vReg tmp, rFlagsReg cr) %{
ins_pipe(pipe_slow);
%}
instruct vmaskAllL_masked(pRegGov dst, iRegL src, pRegGov pg, vReg tmp, rFlagsReg cr) %{
instruct vmaskAllL_masked(pReg dst, iRegL src, pRegGov pg, vReg tmp, rFlagsReg cr) %{
predicate(UseSVE > 0);
match(Set dst (MaskAll src pg));
effect(TEMP tmp, KILL cr);
@@ -5499,7 +5561,7 @@ instruct vmaskAllL_masked(pRegGov dst, iRegL src, pRegGov pg, vReg tmp, rFlagsRe
// vetcor mask generation
instruct vmask_gen_I(pRegGov pd, iRegIorL2I src, rFlagsReg cr) %{
instruct vmask_gen_I(pReg pd, iRegIorL2I src, rFlagsReg cr) %{
predicate(UseSVE > 0);
match(Set pd (VectorMaskGen (ConvI2L src)));
effect(KILL cr);
@@ -5511,7 +5573,7 @@ instruct vmask_gen_I(pRegGov pd, iRegIorL2I src, rFlagsReg cr) %{
ins_pipe(pipe_class_default);
%}
instruct vmask_gen_L(pRegGov pd, iRegL src, rFlagsReg cr) %{
instruct vmask_gen_L(pReg pd, iRegL src, rFlagsReg cr) %{
predicate(UseSVE > 0);
match(Set pd (VectorMaskGen src));
effect(KILL cr);
@@ -5523,7 +5585,7 @@ instruct vmask_gen_L(pRegGov pd, iRegL src, rFlagsReg cr) %{
ins_pipe(pipe_slow);
%}
instruct vmask_gen_imm(pRegGov pd, immL con, rFlagsReg cr) %{
instruct vmask_gen_imm(pReg pd, immL con, rFlagsReg cr) %{
predicate(UseSVE > 0);
match(Set pd (VectorMaskGen con));
effect(KILL cr);
@@ -5540,7 +5602,6 @@ instruct vmask_gen_imm(pRegGov pd, immL con, rFlagsReg cr) %{
// vector popcount - INT
instruct vpopcountI(vReg dst, vReg src) %{
predicate(!n->as_Vector()->is_predicated_vector());
match(Set dst (PopCountVI src));
format %{ "vpopcountI $dst, $src" %}
ins_encode %{
@@ -5578,8 +5639,7 @@ instruct vpopcountI(vReg dst, vReg src) %{
// vector popcount - LONG
instruct vpopcountL(vReg dst, vReg src) %{
predicate(Matcher::vector_element_basic_type(n) == T_LONG &&
!n->as_Vector()->is_predicated_vector());
predicate(Matcher::vector_element_basic_type(n) == T_LONG);
match(Set dst (PopCountVL src));
format %{ "vpopcountL $dst, $src" %}
ins_encode %{
@@ -5601,8 +5661,7 @@ instruct vpopcountL(vReg dst, vReg src) %{
// "vpopcountL" rule.
instruct vpopcountL_I(vReg dst, vReg src, vReg tmp) %{
predicate(Matcher::vector_element_basic_type(n) == T_INT &&
!n->as_Vector()->is_predicated_vector());
predicate(Matcher::vector_element_basic_type(n) == T_INT);
match(Set dst (PopCountVL src));
effect(TEMP_DEF dst, TEMP tmp);
format %{ "vpopcountL_I $dst, $src\t# KILL $tmp" %}
@@ -5674,6 +5733,48 @@ instruct vblend_sve(vReg dst, vReg src1, vReg src2, pReg pg) %{
ins_pipe(pipe_slow);
%}
// ------------------------- Vector conditional move --------------------------
instruct vcmove_neon(vReg dst, vReg src1, vReg src2, immI cond, cmpOp copnd) %{
predicate(UseSVE == 0 ||
(VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)) &&
n->in(1)->in(2)->get_int() != BoolTest::ne));
match(Set dst (CMoveVF (Binary copnd cond) (Binary src1 src2)));
match(Set dst (CMoveVD (Binary copnd cond) (Binary src1 src2)));
effect(TEMP_DEF dst);
format %{ "vcmove_neon.$copnd $dst, $src1, $src2\t# vector conditional move fp" %}
ins_encode %{
BasicType bt = Matcher::vector_element_basic_type(this);
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
assert(length_in_bytes == 8 || length_in_bytes == 16, "must be");
__ neon_compare($dst$$FloatRegister, bt, $src1$$FloatRegister,
$src2$$FloatRegister, (int)($cond$$constant),
/* isQ */ length_in_bytes == 16);
__ bsl($dst$$FloatRegister, length_in_bytes == 16 ? __ T16B : __ T8B,
$src2$$FloatRegister, $src1$$FloatRegister);
%}
ins_pipe(pipe_slow);
%}
instruct vcmove_sve(vReg dst, vReg src1, vReg src2, immI cond, cmpOp copnd, pRegGov pgtmp) %{
predicate(!VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)) ||
(UseSVE > 0 && n->in(1)->in(2)->get_int() == BoolTest::ne));
match(Set dst (CMoveVF (Binary copnd cond) (Binary src1 src2)));
match(Set dst (CMoveVD (Binary copnd cond) (Binary src1 src2)));
effect(TEMP pgtmp);
format %{ "vcmove_sve.$copnd $dst, $src1, $src2\t# vector conditional move fp. KILL $pgtmp" %}
ins_encode %{
assert(UseSVE > 0, "must be sve");
BasicType bt = Matcher::vector_element_basic_type(this);
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
__ sve_compare($pgtmp$$PRegister, bt, ptrue, $src1$$FloatRegister,
$src2$$FloatRegister, (int)($cond$$constant));
__ sve_sel($dst$$FloatRegister, __ elemType_to_regVariant(bt),
$pgtmp$$PRegister, $src2$$FloatRegister, $src1$$FloatRegister);
%}
ins_pipe(pipe_slow);
%}
// ------------------------------ Vector round ---------------------------------
// vector Math.round
@@ -5778,7 +5879,7 @@ instruct vtest_anytrue_neon(iRegINoSp dst, vReg src1, vReg src2, vReg tmp, rFlag
ins_pipe(pipe_slow);
%}
instruct vtest_anytrue_sve(iRegINoSp dst, pRegGov src1, pRegGov src2, rFlagsReg cr) %{
instruct vtest_anytrue_sve(iRegINoSp dst, pReg src1, pReg src2, rFlagsReg cr) %{
predicate(UseSVE > 0 &&
static_cast<const VectorTestNode*>(n)->get_predicate() == BoolTest::ne);
match(Set dst (VectorTest src1 src2));
@@ -5812,7 +5913,7 @@ instruct vtest_alltrue_neon(iRegINoSp dst, vReg src1, vReg src2, vReg tmp, rFlag
ins_pipe(pipe_slow);
%}
instruct vtest_alltrue_sve(iRegINoSp dst, pRegGov src1, pRegGov src2, pReg ptmp, rFlagsReg cr) %{
instruct vtest_alltrue_sve(iRegINoSp dst, pReg src1, pReg src2, pReg ptmp, rFlagsReg cr) %{
predicate(UseSVE > 0 &&
static_cast<const VectorTestNode*>(n)->get_predicate() == BoolTest::overflow);
match(Set dst (VectorTest src1 src2));
@@ -6053,7 +6154,6 @@ instruct scatter_storeD_masked(indirect mem, vReg src, vReg idx, pRegGov pg, vRe
// ------------------------------ CountLeadingZerosV ---------------------------
instruct vcountLeadingZeros(vReg dst, vReg src) %{
predicate(!n->as_Vector()->is_predicated_vector());
match(Set dst (CountLeadingZerosV src));
format %{ "vcountLeadingZeros $dst, $src" %}
ins_encode %{
@@ -6101,7 +6201,6 @@ instruct vcountLeadingZeros_masked(vReg dst_src, pRegGov pg) %{
// ------------------------------ CountTrailingZerosV --------------------------
instruct vcountTrailingZeros(vReg dst, vReg src) %{
predicate(!n->as_Vector()->is_predicated_vector());
match(Set dst (CountTrailingZerosV src));
format %{ "vcountTrailingZeros $dst, $src" %}
ins_encode %{
@@ -6163,7 +6262,6 @@ instruct vcountTrailingZeros_masked(vReg dst_src, pRegGov pg) %{
// ------------------------------ ReverseV -------------------------------------
instruct vreverse(vReg dst, vReg src) %{
predicate(!n->as_Vector()->is_predicated_vector());
match(Set dst (ReverseV src));
format %{ "vreverse $dst, $src" %}
ins_encode %{
@@ -6210,7 +6308,6 @@ instruct vreverse_masked(vReg dst_src, pRegGov pg) %{
// ------------------------------ ReverseBytesV --------------------------------
instruct vreverseBytes(vReg dst, vReg src) %{
predicate(!n->as_Vector()->is_predicated_vector());
match(Set dst (ReverseBytesV src));
format %{ "vreverseBytes $dst, $src" %}
ins_encode %{

View File

@@ -117,11 +117,14 @@ source %{
const bool Matcher::match_rule_supported_superword(int opcode, int vlen, BasicType bt) {
if (UseSVE == 0) {
// ConvD2I and ConvL2F are not profitable to be vectorized on NEON, because no direct
// These operations are not profitable to be vectorized on NEON, because no direct
// NEON instructions support them. But the match rule support for them is profitable for
// Vector API intrinsics.
if ((opcode == Op_VectorCastD2X && bt == T_INT) ||
(opcode == Op_VectorCastL2X && bt == T_FLOAT)) {
(opcode == Op_VectorCastL2X && bt == T_FLOAT) ||
opcode == Op_AddReductionVD || opcode == Op_AddReductionVF ||
opcode == Op_MulReductionVD || opcode == Op_MulReductionVF ||
opcode == Op_MulVL) {
return false;
}
}
@@ -143,7 +146,6 @@ source %{
// Check whether specific Op is supported.
// Fail fast, otherwise fall through to common vector_size_supported() check.
switch (opcode) {
case Op_MulVL:
case Op_AndVMask:
case Op_OrVMask:
case Op_XorVMask:
@@ -806,7 +808,6 @@ dnl UNARY_OP($1, $2, $3, $4, $5 )
dnl UNARY_OP(rule_name, op_name, insn_neon, insn_sve, size)
define(`UNARY_OP', `
instruct $1(vReg dst, vReg src) %{
predicate(!n->as_Vector()->is_predicated_vector());
match(Set dst ($2 src));
format %{ "$1 $dst, $src" %}
ins_encode %{
@@ -871,11 +872,11 @@ UNARY_OP_PREDICATE_WITH_SIZE(vabsD, AbsVD, sve_fabs, D)
// vector fabs diff
instruct vfabd(vReg dst, vReg src1, vReg src2) %{
predicate(Matcher::vector_length_in_bytes(n) <= 16);
instruct vfabd_neon(vReg dst, vReg src1, vReg src2) %{
predicate(VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)));
match(Set dst (AbsVF (SubVF src1 src2)));
match(Set dst (AbsVD (SubVD src1 src2)));
format %{ "vfabd $dst, $src1, $src2\t# vector <= 128 bits" %}
format %{ "vfabd_neon $dst, $src1, $src2" %}
ins_encode %{
__ fabd($dst$$FloatRegister, get_arrangement(this),
$src1$$FloatRegister, $src2$$FloatRegister);
@@ -883,12 +884,40 @@ instruct vfabd(vReg dst, vReg src1, vReg src2) %{
ins_pipe(pipe_slow);
%}
instruct vfabd_sve(vReg dst_src1, vReg src2) %{
predicate(!VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)));
match(Set dst_src1 (AbsVF (SubVF dst_src1 src2)));
match(Set dst_src1 (AbsVD (SubVD dst_src1 src2)));
format %{ "vfabd_sve $dst_src1, $dst_src1, $src2" %}
ins_encode %{
assert(UseSVE > 0, "must be sve");
BasicType bt = Matcher::vector_element_basic_type(this);
__ sve_fabd($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
ptrue, $src2$$FloatRegister);
%}
ins_pipe(pipe_slow);
%}
// vector fabs diff - predicated
instruct vfabd_masked(vReg dst_src1, vReg src2, pRegGov pg) %{
predicate(UseSVE > 0);
match(Set dst_src1 (AbsVF (SubVF (Binary dst_src1 src2) pg) pg));
match(Set dst_src1 (AbsVD (SubVD (Binary dst_src1 src2) pg) pg));
format %{ "vfabd_masked $dst_src1, $pg, $dst_src1, $src2" %}
ins_encode %{
BasicType bt = Matcher::vector_element_basic_type(this);
__ sve_fabd($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
$pg$$PRegister, $src2$$FloatRegister);
%}
ins_pipe(pipe_slow);
%}
// ------------------------------ Vector neg -----------------------------------
// vector neg
instruct vnegI(vReg dst, vReg src) %{
predicate(!n->as_Vector()->is_predicated_vector());
match(Set dst (NegVI src));
format %{ "vnegI $dst, $src" %}
ins_encode %{
@@ -1054,13 +1083,11 @@ instruct vmla(vReg dst_src1, vReg src2, vReg src3) %{
match(Set dst_src1 (AddVB dst_src1 (MulVB src2 src3)));
match(Set dst_src1 (AddVS dst_src1 (MulVS src2 src3)));
match(Set dst_src1 (AddVI dst_src1 (MulVI src2 src3)));
match(Set dst_src1 (AddVL dst_src1 (MulVL src2 src3)));
format %{ "vmla $dst_src1, src2, src3" %}
format %{ "vmla $dst_src1, $src2, $src3" %}
ins_encode %{
BasicType bt = Matcher::vector_element_basic_type(this);
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
if (VM_Version::use_neon_for_vector(length_in_bytes) && bt != T_LONG) {
// NEON mlav does not accept T2D arrangement.
if (VM_Version::use_neon_for_vector(length_in_bytes)) {
__ mlav($dst_src1$$FloatRegister, get_arrangement(this),
$src2$$FloatRegister, $src3$$FloatRegister);
} else {
@@ -1072,13 +1099,25 @@ instruct vmla(vReg dst_src1, vReg src2, vReg src3) %{
ins_pipe(pipe_slow);
%}
instruct vmlaL(vReg dst_src1, vReg src2, vReg src3) %{
predicate(UseSVE > 0);
match(Set dst_src1 (AddVL dst_src1 (MulVL src2 src3)));
format %{ "vmlaL $dst_src1, $src2, $src3" %}
ins_encode %{
BasicType bt = Matcher::vector_element_basic_type(this);
__ sve_mla($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
ptrue, $src2$$FloatRegister, $src3$$FloatRegister);
%}
ins_pipe(pipe_slow);
%}
instruct vmla_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
predicate(UseSVE > 0);
match(Set dst_src1 (AddVB (Binary dst_src1 (MulVB src2 src3)) pg));
match(Set dst_src1 (AddVS (Binary dst_src1 (MulVS src2 src3)) pg));
match(Set dst_src1 (AddVI (Binary dst_src1 (MulVI src2 src3)) pg));
match(Set dst_src1 (AddVL (Binary dst_src1 (MulVL src2 src3)) pg));
format %{ "vmla_masked $dst_src1, $pg, src2, src3" %}
format %{ "vmla_masked $dst_src1, $pg, $src2, $src3" %}
ins_encode %{
BasicType bt = Matcher::vector_element_basic_type(this);
__ sve_mla($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
@@ -1133,13 +1172,11 @@ instruct vmls(vReg dst_src1, vReg src2, vReg src3) %{
match(Set dst_src1 (SubVB dst_src1 (MulVB src2 src3)));
match(Set dst_src1 (SubVS dst_src1 (MulVS src2 src3)));
match(Set dst_src1 (SubVI dst_src1 (MulVI src2 src3)));
match(Set dst_src1 (SubVL dst_src1 (MulVL src2 src3)));
format %{ "vmls $dst_src1, src2, src3" %}
format %{ "vmls $dst_src1, $src2, $src3" %}
ins_encode %{
BasicType bt = Matcher::vector_element_basic_type(this);
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
if (VM_Version::use_neon_for_vector(length_in_bytes) && bt != T_LONG) {
// NEON mlsv does not accept T2D arrangement.
if (VM_Version::use_neon_for_vector(length_in_bytes)) {
__ mlsv($dst_src1$$FloatRegister, get_arrangement(this),
$src2$$FloatRegister, $src3$$FloatRegister);
} else {
@@ -1151,13 +1188,25 @@ instruct vmls(vReg dst_src1, vReg src2, vReg src3) %{
ins_pipe(pipe_slow);
%}
instruct vmlsL(vReg dst_src1, vReg src2, vReg src3) %{
predicate(UseSVE > 0);
match(Set dst_src1 (SubVL dst_src1 (MulVL src2 src3)));
format %{ "vmlsL $dst_src1, $src2, $src3" %}
ins_encode %{
BasicType bt = Matcher::vector_element_basic_type(this);
__ sve_mls($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
ptrue, $src2$$FloatRegister, $src3$$FloatRegister);
%}
ins_pipe(pipe_slow);
%}
instruct vmls_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
predicate(UseSVE > 0);
match(Set dst_src1 (SubVB (Binary dst_src1 (MulVB src2 src3)) pg));
match(Set dst_src1 (SubVS (Binary dst_src1 (MulVS src2 src3)) pg));
match(Set dst_src1 (SubVI (Binary dst_src1 (MulVI src2 src3)) pg));
match(Set dst_src1 (SubVL (Binary dst_src1 (MulVL src2 src3)) pg));
format %{ "vmls_masked $dst_src1, $pg, src2, src3" %}
format %{ "vmls_masked $dst_src1, $pg, $src2, $src3" %}
ins_encode %{
BasicType bt = Matcher::vector_element_basic_type(this);
__ sve_mls($dst_src1$$FloatRegister, __ elemType_to_regVariant(bt),
@@ -1169,9 +1218,8 @@ instruct vmls_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
// vector fmls
// dst_src1 = dst_src1 + -src2 * src3
// The NegVF/NegVD must not be predicated.
instruct vfmls1(vReg dst_src1, vReg src2, vReg src3) %{
predicate(UseFMA && !n->in(2)->in(1)->as_Vector()->is_predicated_vector());
predicate(UseFMA);
match(Set dst_src1 (FmaVF dst_src1 (Binary (NegVF src2) src3)));
match(Set dst_src1 (FmaVD dst_src1 (Binary (NegVD src2) src3)));
format %{ "vfmls1 $dst_src1, $src2, $src3" %}
@@ -1191,9 +1239,8 @@ instruct vfmls1(vReg dst_src1, vReg src2, vReg src3) %{
%}
// dst_src1 = dst_src1 + src2 * -src3
// The NegVF/NegVD must not be predicated.
instruct vfmls2(vReg dst_src1, vReg src2, vReg src3) %{
predicate(UseFMA && !n->in(2)->in(2)->as_Vector()->is_predicated_vector());
predicate(UseFMA);
match(Set dst_src1 (FmaVF dst_src1 (Binary src2 (NegVF src3))));
match(Set dst_src1 (FmaVD dst_src1 (Binary src2 (NegVD src3))));
format %{ "vfmls2 $dst_src1, $src2, $src3" %}
@@ -1215,10 +1262,8 @@ instruct vfmls2(vReg dst_src1, vReg src2, vReg src3) %{
// vector fmsb - predicated
// dst_src1 = dst_src1 * -src2 + src3
// The NegVF/NegVD must not be predicated.
instruct vfmsb_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
predicate(UseFMA && UseSVE > 0 &&
!n->in(1)->in(2)->as_Vector()->is_predicated_vector());
predicate(UseFMA && UseSVE > 0);
match(Set dst_src1 (FmaVF (Binary dst_src1 (NegVF src2)) (Binary src3 pg)));
match(Set dst_src1 (FmaVD (Binary dst_src1 (NegVD src2)) (Binary src3 pg)));
format %{ "vfmsb_masked $dst_src1, $pg, $src2, $src3" %}
@@ -1233,11 +1278,8 @@ instruct vfmsb_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
// vector fnmla (sve)
// dst_src1 = -dst_src1 + -src2 * src3
// The NegVF/NegVD must not be predicated.
instruct vfnmla1(vReg dst_src1, vReg src2, vReg src3) %{
predicate(UseFMA && UseSVE > 0 &&
!n->in(1)->as_Vector()->is_predicated_vector() &&
!n->in(2)->in(1)->as_Vector()->is_predicated_vector());
predicate(UseFMA && UseSVE > 0);
match(Set dst_src1 (FmaVF (NegVF dst_src1) (Binary (NegVF src2) src3)));
match(Set dst_src1 (FmaVD (NegVD dst_src1) (Binary (NegVD src2) src3)));
format %{ "vfnmla1 $dst_src1, $src2, $src3" %}
@@ -1250,11 +1292,8 @@ instruct vfnmla1(vReg dst_src1, vReg src2, vReg src3) %{
%}
// dst_src1 = -dst_src1 + src2 * -src3
// The NegVF/NegVD must not be predicated.
instruct vfnmla2(vReg dst_src1, vReg src2, vReg src3) %{
predicate(UseFMA && UseSVE > 0 &&
!n->in(1)->as_Vector()->is_predicated_vector() &&
!n->in(2)->in(2)->as_Vector()->is_predicated_vector());
predicate(UseFMA && UseSVE > 0);
match(Set dst_src1 (FmaVF (NegVF dst_src1) (Binary src2 (NegVF src3))));
match(Set dst_src1 (FmaVD (NegVD dst_src1) (Binary src2 (NegVD src3))));
format %{ "vfnmla2 $dst_src1, $src2, $src3" %}
@@ -1269,11 +1308,8 @@ instruct vfnmla2(vReg dst_src1, vReg src2, vReg src3) %{
// vector fnmad - predicated
// dst_src1 = -src3 + dst_src1 * -src2
// The NegVF/NegVD must not be predicated.
instruct vfnmad_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
predicate(UseFMA && UseSVE > 0 &&
!n->in(1)->in(2)->as_Vector()->is_predicated_vector() &&
!n->in(2)->in(1)->as_Vector()->is_predicated_vector());
predicate(UseFMA && UseSVE > 0);
match(Set dst_src1 (FmaVF (Binary dst_src1 (NegVF src2)) (Binary (NegVF src3) pg)));
match(Set dst_src1 (FmaVD (Binary dst_src1 (NegVD src2)) (Binary (NegVD src3) pg)));
format %{ "vfnmad_masked $dst_src1, $pg, $src2, $src3" %}
@@ -1288,10 +1324,8 @@ instruct vfnmad_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
// vector fnmls (sve)
// dst_src1 = -dst_src1 + src2 * src3
// The NegVF/NegVD must not be predicated.
instruct vfnmls(vReg dst_src1, vReg src2, vReg src3) %{
predicate(UseFMA && UseSVE > 0 &&
!n->in(1)->as_Vector()->is_predicated_vector());
predicate(UseFMA && UseSVE > 0);
match(Set dst_src1 (FmaVF (NegVF dst_src1) (Binary src2 src3)));
match(Set dst_src1 (FmaVD (NegVD dst_src1) (Binary src2 src3)));
format %{ "vfnmls $dst_src1, $src2, $src3" %}
@@ -1306,10 +1340,8 @@ instruct vfnmls(vReg dst_src1, vReg src2, vReg src3) %{
// vector fnmsb - predicated
// dst_src1 = -src3 + dst_src1 * src2
// The NegVF/NegVD must not be predicated.
instruct vfnmsb_masked(vReg dst_src1, vReg src2, vReg src3, pRegGov pg) %{
predicate(UseFMA && UseSVE > 0 &&
!n->in(2)->in(1)->as_Vector()->is_predicated_vector());
predicate(UseFMA && UseSVE > 0);
match(Set dst_src1 (FmaVF (Binary dst_src1 src2) (Binary (NegVF src3) pg)));
match(Set dst_src1 (FmaVD (Binary dst_src1 src2) (Binary (NegVD src3) pg)));
format %{ "vfnmsb_masked $dst_src1, $pg, $src2, $src3" %}
@@ -3061,9 +3093,8 @@ instruct vloadmask_neon(vReg dst, vReg src) %{
ins_pipe(pipe_slow);
%}
instruct vloadmaskB_sve(pRegGov dst, vReg src, rFlagsReg cr) %{
predicate(UseSVE > 0 && !n->is_predicated_vector() &&
Matcher::vector_element_basic_type(n) == T_BYTE);
instruct vloadmaskB_sve(pReg dst, vReg src, rFlagsReg cr) %{
predicate(UseSVE > 0 && Matcher::vector_element_basic_type(n) == T_BYTE);
match(Set dst (VectorLoadMask src));
effect(KILL cr);
format %{ "vloadmaskB_sve $dst, $src\t# KILL cr" %}
@@ -3074,9 +3105,8 @@ instruct vloadmaskB_sve(pRegGov dst, vReg src, rFlagsReg cr) %{
ins_pipe(pipe_slow);
%}
instruct vloadmask_extend_sve(pRegGov dst, vReg src, vReg tmp, rFlagsReg cr) %{
predicate(UseSVE > 0 && !n->is_predicated_vector() &&
Matcher::vector_element_basic_type(n) != T_BYTE);
instruct vloadmask_extend_sve(pReg dst, vReg src, vReg tmp, rFlagsReg cr) %{
predicate(UseSVE > 0 && Matcher::vector_element_basic_type(n) != T_BYTE);
match(Set dst (VectorLoadMask src));
effect(TEMP tmp, KILL cr);
format %{ "vloadmask_extend_sve $dst, $src\t# KILL $tmp, cr" %}
@@ -3089,7 +3119,7 @@ instruct vloadmask_extend_sve(pRegGov dst, vReg src, vReg tmp, rFlagsReg cr) %{
ins_pipe(pipe_slow);
%}
instruct vloadmaskB_masked(pRegGov dst, vReg src, pRegGov pg, rFlagsReg cr) %{
instruct vloadmaskB_masked(pReg dst, vReg src, pRegGov pg, rFlagsReg cr) %{
predicate(UseSVE > 0 && Matcher::vector_element_basic_type(n) == T_BYTE);
match(Set dst (VectorLoadMask src pg));
effect(KILL cr);
@@ -3101,7 +3131,7 @@ instruct vloadmaskB_masked(pRegGov dst, vReg src, pRegGov pg, rFlagsReg cr) %{
ins_pipe(pipe_slow);
%}
instruct vloadmask_extend_masked(pRegGov dst, vReg src, pRegGov pg, vReg tmp, rFlagsReg cr) %{
instruct vloadmask_extend_masked(pReg dst, vReg src, pRegGov pg, vReg tmp, rFlagsReg cr) %{
predicate(UseSVE > 0 && Matcher::vector_element_basic_type(n) != T_BYTE);
match(Set dst (VectorLoadMask src pg));
effect(TEMP tmp, KILL cr);
@@ -3155,7 +3185,7 @@ instruct vstoremask_narrow_neon(vReg dst, vReg src, immI_gt_1 size) %{
// vector store mask - sve
instruct vstoremaskB_sve(vReg dst, pRegGov src, immI_1 size) %{
instruct vstoremaskB_sve(vReg dst, pReg src, immI_1 size) %{
predicate(UseSVE > 0);
match(Set dst (VectorStoreMask src size));
format %{ "vstoremaskB_sve $dst, $src" %}
@@ -3165,7 +3195,7 @@ instruct vstoremaskB_sve(vReg dst, pRegGov src, immI_1 size) %{
ins_pipe(pipe_slow);
%}
instruct vstoremask_narrow_sve(vReg dst, pRegGov src, immI_gt_1 size, vReg tmp) %{
instruct vstoremask_narrow_sve(vReg dst, pReg src, immI_gt_1 size, vReg tmp) %{
predicate(UseSVE > 0);
match(Set dst (VectorStoreMask src size));
effect(TEMP_DEF dst, TEMP tmp);
@@ -3182,8 +3212,8 @@ instruct vstoremask_narrow_sve(vReg dst, pRegGov src, immI_gt_1 size, vReg tmp)
// Combined rules for vector mask load when the vector element type is not T_BYTE
// VectorLoadMask+LoadVector, and the VectorLoadMask is unpredicated.
instruct vloadmask_loadV(pRegGov dst, indirect mem, vReg tmp, rFlagsReg cr) %{
predicate(UseSVE > 0 && !n->is_predicated_vector() &&
instruct vloadmask_loadV(pReg dst, indirect mem, vReg tmp, rFlagsReg cr) %{
predicate(UseSVE > 0 &&
type2aelembytes(Matcher::vector_element_basic_type(n)) > 1);
match(Set dst (VectorLoadMask (LoadVector mem)));
effect(TEMP tmp, KILL cr);
@@ -3204,7 +3234,7 @@ instruct vloadmask_loadV(pRegGov dst, indirect mem, vReg tmp, rFlagsReg cr) %{
%}
// VectorLoadMask+LoadVector, and the VectorLoadMask is predicated.
instruct vloadmask_loadV_masked(pRegGov dst, indirect mem, pRegGov pg,
instruct vloadmask_loadV_masked(pReg dst, indirect mem, pRegGov pg,
vReg tmp, rFlagsReg cr) %{
predicate(UseSVE > 0 &&
type2aelembytes(Matcher::vector_element_basic_type(n)) > 1);
@@ -3225,8 +3255,8 @@ instruct vloadmask_loadV_masked(pRegGov dst, indirect mem, pRegGov pg,
%}
// VectorLoadMask+LoadVectorMasked, and the VectorLoadMask is unpredicated.
instruct vloadmask_loadVMasked(pRegGov dst, vmemA mem, pRegGov pg, vReg tmp, rFlagsReg cr) %{
predicate(UseSVE > 0 && !n->is_predicated_vector() &&
instruct vloadmask_loadVMasked(pReg dst, vmemA mem, pRegGov pg, vReg tmp, rFlagsReg cr) %{
predicate(UseSVE > 0 &&
type2aelembytes(Matcher::vector_element_basic_type(n)) > 1);
match(Set dst (VectorLoadMask (LoadVectorMasked mem pg)));
effect(TEMP tmp, KILL cr);
@@ -3252,7 +3282,7 @@ instruct vloadmask_loadVMasked(pRegGov dst, vmemA mem, pRegGov pg, vReg tmp, rFl
%}
// VectorLoadMask+LoadVectorMasked, and the VectorLoadMask is predicated.
instruct vloadmask_loadVMasked_masked(pRegGov dst, vmemA mem, pRegGov pg1, pRegGov pg2,
instruct vloadmask_loadVMasked_masked(pReg dst, vmemA mem, pRegGov pg1, pRegGov pg2,
vReg tmp, rFlagsReg cr) %{
predicate(UseSVE > 0 &&
type2aelembytes(Matcher::vector_element_basic_type(n)) > 1);
@@ -3282,7 +3312,7 @@ instruct vloadmask_loadVMasked_masked(pRegGov dst, vmemA mem, pRegGov pg1, pRegG
// Combined rules for vector mask store when the vector element type is not T_BYTE
// StoreVector+VectorStoreMask, and the vector size of "src" is equal to the MaxVectorSize.
instruct storeV_vstoremask(indirect mem, pRegGov src, immI_gt_1 esize, vReg tmp) %{
instruct storeV_vstoremask(indirect mem, pReg src, immI_gt_1 esize, vReg tmp) %{
predicate(UseSVE > 0 &&
Matcher::vector_length_in_bytes(n->as_StoreVector()->in(MemNode::ValueIn)->in(1)) == MaxVectorSize);
match(Set mem (StoreVector mem (VectorStoreMask src esize)));
@@ -3303,7 +3333,7 @@ instruct storeV_vstoremask(indirect mem, pRegGov src, immI_gt_1 esize, vReg tmp)
%}
// StoreVector+VectorStoreMask, and the vector size of "src" is less than the MaxVectorSize.
instruct storeV_vstoremask_masked(indirect mem, pRegGov src, immI_gt_1 esize,
instruct storeV_vstoremask_masked(indirect mem, pReg src, immI_gt_1 esize,
vReg tmp, pRegGov pgtmp, rFlagsReg cr) %{
predicate(UseSVE > 0 &&
Matcher::vector_length_in_bytes(n->as_StoreVector()->in(MemNode::ValueIn)->in(1)) < MaxVectorSize);
@@ -3325,7 +3355,7 @@ instruct storeV_vstoremask_masked(indirect mem, pRegGov src, immI_gt_1 esize,
%}
// StoreVectorMasked+VectorStoreMask, and the vector size of "src" is equal to the MaxVectorSize.
instruct storeVMasked_vstoremask(vmemA mem, pRegGov src, pRegGov pg, immI_gt_1 esize, vReg tmp) %{
instruct storeVMasked_vstoremask(vmemA mem, pReg src, pRegGov pg, immI_gt_1 esize, vReg tmp) %{
predicate(UseSVE > 0 &&
Matcher::vector_length_in_bytes(n->as_StoreVector()->in(MemNode::ValueIn)->in(1)) == MaxVectorSize);
match(Set mem (StoreVectorMasked mem (Binary (VectorStoreMask src esize) pg)));
@@ -3351,7 +3381,7 @@ instruct storeVMasked_vstoremask(vmemA mem, pRegGov src, pRegGov pg, immI_gt_1 e
%}
// StoreVectorMasked+VectorStoreMask, and the vector size of "src" is less than the MaxVectorSize.
instruct storeVMasked_vstoremask_masked(vmemA mem, pRegGov src, pRegGov pg, immI_gt_1 esize,
instruct storeVMasked_vstoremask_masked(vmemA mem, pReg src, pRegGov pg, immI_gt_1 esize,
vReg tmp, pRegGov pgtmp, rFlagsReg cr) %{
predicate(UseSVE > 0 &&
Matcher::vector_length_in_bytes(n->as_StoreVector()->in(MemNode::ValueIn)->in(1)) < MaxVectorSize);
@@ -3383,7 +3413,7 @@ dnl
dnl VMASK_BITWISE_OP($1, $2, $3 )
dnl VMASK_BITWISE_OP(type, op_name, insn)
define(`VMASK_BITWISE_OP', `
instruct vmask_$1(pRegGov pd, pRegGov pn, pRegGov pm) %{
instruct vmask_$1(pReg pd, pReg pn, pReg pm) %{
predicate(UseSVE > 0);
match(Set pd ($2 pn pm));
format %{ "vmask_$1 $pd, $pn, $pm" %}
@@ -3396,7 +3426,7 @@ dnl
dnl VMASK_AND_NOT($1 )
dnl VMASK_AND_NOT(type)
define(`VMASK_AND_NOT', `
instruct vmask_and_not$1(pRegGov pd, pRegGov pn, pRegGov pm, imm$1_M1 m1) %{
instruct vmask_and_not$1(pReg pd, pReg pn, pReg pm, imm$1_M1 m1) %{
predicate(UseSVE > 0);
match(Set pd (AndVMask pn (XorVMask pm (MaskAll m1))));
format %{ "vmask_and_not$1 $pd, $pn, $pm" %}
@@ -3431,7 +3461,7 @@ instruct vmaskcmp_neon(vReg dst, vReg src1, vReg src2, immI cond) %{
ins_pipe(pipe_slow);
%}
instruct vmaskcmp_sve(pRegGov dst, vReg src1, vReg src2, immI cond, rFlagsReg cr) %{
instruct vmaskcmp_sve(pReg dst, vReg src1, vReg src2, immI cond, rFlagsReg cr) %{
predicate(UseSVE > 0);
match(Set dst (VectorMaskCmp (Binary src1 src2) cond));
effect(KILL cr);
@@ -3446,7 +3476,7 @@ instruct vmaskcmp_sve(pRegGov dst, vReg src1, vReg src2, immI cond, rFlagsReg cr
ins_pipe(pipe_slow);
%}
instruct vmaskcmp_masked(pRegGov dst, vReg src1, vReg src2, immI cond,
instruct vmaskcmp_masked(pReg dst, vReg src1, vReg src2, immI cond,
pRegGov pg, rFlagsReg cr) %{
predicate(UseSVE > 0);
match(Set dst (VectorMaskCmp (Binary src1 src2) (Binary cond pg)));
@@ -3473,7 +3503,49 @@ instruct vmaskcast_same_esize_neon(vReg dst_src) %{
ins_pipe(pipe_class_empty);
%}
instruct vmaskcast_same_esize_sve(pRegGov dst_src) %{
instruct vmaskcast_extend_neon(vReg dst, vReg src) %{
predicate(UseSVE == 0 &&
Matcher::vector_length_in_bytes(n) > Matcher::vector_length_in_bytes(n->in(1)));
match(Set dst (VectorMaskCast src));
format %{ "vmaskcast_extend_neon $dst, $src" %}
ins_encode %{
BasicType dst_bt = Matcher::vector_element_basic_type(this);
if (is_floating_point_type(dst_bt)) {
dst_bt = (dst_bt == T_FLOAT) ? T_INT : T_LONG;
}
uint length_in_bytes_dst = Matcher::vector_length_in_bytes(this);
BasicType src_bt = Matcher::vector_element_basic_type(this, $src);
if (is_floating_point_type(src_bt)) {
src_bt = (src_bt == T_FLOAT) ? T_INT : T_LONG;
}
__ neon_vector_extend($dst$$FloatRegister, dst_bt, length_in_bytes_dst,
$src$$FloatRegister, src_bt);
%}
ins_pipe(pipe_slow);
%}
instruct vmaskcast_narrow_neon(vReg dst, vReg src) %{
predicate(UseSVE == 0 &&
Matcher::vector_length_in_bytes(n) < Matcher::vector_length_in_bytes(n->in(1)));
match(Set dst (VectorMaskCast src));
format %{ "vmaskcast_narrow_neon $dst, $src" %}
ins_encode %{
BasicType dst_bt = Matcher::vector_element_basic_type(this);
if (is_floating_point_type(dst_bt)) {
dst_bt = (dst_bt == T_FLOAT) ? T_INT : T_LONG;
}
BasicType src_bt = Matcher::vector_element_basic_type(this, $src);
if (is_floating_point_type(src_bt)) {
src_bt = (src_bt == T_FLOAT) ? T_INT : T_LONG;
}
uint length_in_bytes_src = Matcher::vector_length_in_bytes(this, $src);
__ neon_vector_narrow($dst$$FloatRegister, dst_bt,
$src$$FloatRegister, src_bt, length_in_bytes_src);
%}
ins_pipe(pipe_slow);
%}
instruct vmaskcast_same_esize_sve(pReg dst_src) %{
predicate(UseSVE > 0 &&
Matcher::vector_length_in_bytes(n) == Matcher::vector_length_in_bytes(n->in(1)));
match(Set dst_src (VectorMaskCast dst_src));
@@ -3483,11 +3555,11 @@ instruct vmaskcast_same_esize_sve(pRegGov dst_src) %{
ins_pipe(pipe_class_empty);
%}
instruct vmaskcast_extend(pRegGov dst, pReg src) %{
instruct vmaskcast_extend_sve(pReg dst, pReg src) %{
predicate(UseSVE > 0 &&
Matcher::vector_length_in_bytes(n) > Matcher::vector_length_in_bytes(n->in(1)));
match(Set dst (VectorMaskCast src));
format %{ "vmaskcast_extend $dst, $src" %}
format %{ "vmaskcast_extend_sve $dst, $src" %}
ins_encode %{
uint length_in_bytes_dst = Matcher::vector_length_in_bytes(this);
uint length_in_bytes_src = Matcher::vector_length_in_bytes(this, $src);
@@ -3500,11 +3572,11 @@ instruct vmaskcast_extend(pRegGov dst, pReg src) %{
ins_pipe(pipe_slow);
%}
instruct vmaskcast_narrow(pRegGov dst, pReg src) %{
instruct vmaskcast_narrow_sve(pReg dst, pReg src) %{
predicate(UseSVE > 0 &&
Matcher::vector_length_in_bytes(n) < Matcher::vector_length_in_bytes(n->in(1)));
match(Set dst (VectorMaskCast src));
format %{ "vmaskcast_narrow $dst, $src" %}
format %{ "vmaskcast_narrow_sve $dst, $src" %}
ins_encode %{
uint length_in_bytes_dst = Matcher::vector_length_in_bytes(this);
uint length_in_bytes_src = Matcher::vector_length_in_bytes(this, $src);
@@ -3519,7 +3591,7 @@ instruct vmaskcast_narrow(pRegGov dst, pReg src) %{
// vector mask reinterpret
instruct vmask_reinterpret_same_esize(pRegGov dst_src) %{
instruct vmask_reinterpret_same_esize(pReg dst_src) %{
predicate(UseSVE > 0 &&
Matcher::vector_length(n) == Matcher::vector_length(n->in(1)) &&
Matcher::vector_length_in_bytes(n) == Matcher::vector_length_in_bytes(n->in(1)));
@@ -3530,7 +3602,7 @@ instruct vmask_reinterpret_same_esize(pRegGov dst_src) %{
ins_pipe(pipe_class_empty);
%}
instruct vmask_reinterpret_diff_esize(pRegGov dst, pRegGov src, vReg tmp, rFlagsReg cr) %{
instruct vmask_reinterpret_diff_esize(pReg dst, pReg src, vReg tmp, rFlagsReg cr) %{
predicate(UseSVE > 0 &&
Matcher::vector_length(n) != Matcher::vector_length(n->in(1)) &&
Matcher::vector_length_in_bytes(n) == Matcher::vector_length_in_bytes(n->in(1)));
@@ -3662,7 +3734,7 @@ instruct vmask_firsttrue_8or16e(iRegINoSp dst, vReg src) %{
// them are set.
instruct vmask_firsttrue_sve(iRegINoSp dst, pReg src, pReg ptmp) %{
predicate(UseSVE > 0 && !n->is_predicated_vector());
predicate(UseSVE > 0);
match(Set dst (VectorMaskFirstTrue src));
effect(TEMP ptmp);
format %{ "vmask_firsttrue_sve $dst, $src\t# KILL $ptmp" %}
@@ -3676,7 +3748,7 @@ instruct vmask_firsttrue_sve(iRegINoSp dst, pReg src, pReg ptmp) %{
ins_pipe(pipe_slow);
%}
instruct vmask_firsttrue_masked(iRegINoSp dst, pReg src, pRegGov pg, pReg ptmp) %{
instruct vmask_firsttrue_masked(iRegINoSp dst, pReg src, pReg pg, pReg ptmp) %{
predicate(UseSVE > 0);
match(Set dst (VectorMaskFirstTrue src pg));
effect(TEMP ptmp);
@@ -3788,7 +3860,7 @@ instruct vmask_tolong_sve(iRegLNoSp dst, pReg src, vReg tmp1, vReg tmp2) %{
// fromlong
instruct vmask_fromlong(pRegGov dst, iRegL src, vReg tmp1, vReg tmp2) %{
instruct vmask_fromlong(pReg dst, iRegL src, vReg tmp1, vReg tmp2) %{
match(Set dst (VectorLongToMask src));
effect(TEMP tmp1, TEMP tmp2);
format %{ "vmask_fromlong $dst, $src\t# vector (sve2). KILL $tmp1, $tmp2" %}
@@ -3808,7 +3880,7 @@ dnl
dnl VMASKALL_IMM($1, $2 )
dnl VMASKALL_IMM(type, var_type)
define(`VMASKALL_IMM', `
instruct vmaskAll_imm$1(pRegGov dst, imm$1 src, rFlagsReg cr) %{
instruct vmaskAll_imm$1(pReg dst, imm$1 src, rFlagsReg cr) %{
predicate(UseSVE > 0);
match(Set dst (MaskAll src));
effect(KILL cr);
@@ -3829,8 +3901,8 @@ dnl
dnl VMASKALL($1, $2 )
dnl VMASKALL(type, arg_type)
define(`VMASKALL', `
instruct vmaskAll$1(pRegGov dst, $2 src, vReg tmp, rFlagsReg cr) %{
predicate(UseSVE > 0 && !n->is_predicated_vector());
instruct vmaskAll$1(pReg dst, $2 src, vReg tmp, rFlagsReg cr) %{
predicate(UseSVE > 0);
match(Set dst (MaskAll src));
effect(TEMP tmp, KILL cr);
format %{ "vmaskAll$1 $dst, $src\t# KILL $tmp, cr" %}
@@ -3848,7 +3920,7 @@ dnl
dnl VMASKALL_PREDICATE($1, $2 )
dnl VMASKALL_PREDICATE(type, arg_type)
define(`VMASKALL_PREDICATE', `
instruct vmaskAll$1_masked(pRegGov dst, $2 src, pRegGov pg, vReg tmp, rFlagsReg cr) %{
instruct vmaskAll$1_masked(pReg dst, $2 src, pRegGov pg, vReg tmp, rFlagsReg cr) %{
predicate(UseSVE > 0);
match(Set dst (MaskAll src pg));
effect(TEMP tmp, KILL cr);
@@ -3872,7 +3944,7 @@ VMASKALL_PREDICATE(L, iRegL)
// vetcor mask generation
instruct vmask_gen_I(pRegGov pd, iRegIorL2I src, rFlagsReg cr) %{
instruct vmask_gen_I(pReg pd, iRegIorL2I src, rFlagsReg cr) %{
predicate(UseSVE > 0);
match(Set pd (VectorMaskGen (ConvI2L src)));
effect(KILL cr);
@@ -3884,7 +3956,7 @@ instruct vmask_gen_I(pRegGov pd, iRegIorL2I src, rFlagsReg cr) %{
ins_pipe(pipe_class_default);
%}
instruct vmask_gen_L(pRegGov pd, iRegL src, rFlagsReg cr) %{
instruct vmask_gen_L(pReg pd, iRegL src, rFlagsReg cr) %{
predicate(UseSVE > 0);
match(Set pd (VectorMaskGen src));
effect(KILL cr);
@@ -3896,7 +3968,7 @@ instruct vmask_gen_L(pRegGov pd, iRegL src, rFlagsReg cr) %{
ins_pipe(pipe_slow);
%}
instruct vmask_gen_imm(pRegGov pd, immL con, rFlagsReg cr) %{
instruct vmask_gen_imm(pReg pd, immL con, rFlagsReg cr) %{
predicate(UseSVE > 0);
match(Set pd (VectorMaskGen con));
effect(KILL cr);
@@ -3913,7 +3985,6 @@ instruct vmask_gen_imm(pRegGov pd, immL con, rFlagsReg cr) %{
// vector popcount - INT
instruct vpopcountI(vReg dst, vReg src) %{
predicate(!n->as_Vector()->is_predicated_vector());
match(Set dst (PopCountVI src));
format %{ "vpopcountI $dst, $src" %}
ins_encode %{
@@ -3951,8 +4022,7 @@ instruct vpopcountI(vReg dst, vReg src) %{
// vector popcount - LONG
instruct vpopcountL(vReg dst, vReg src) %{
predicate(Matcher::vector_element_basic_type(n) == T_LONG &&
!n->as_Vector()->is_predicated_vector());
predicate(Matcher::vector_element_basic_type(n) == T_LONG);
match(Set dst (PopCountVL src));
format %{ "vpopcountL $dst, $src" %}
ins_encode %{
@@ -3974,8 +4044,7 @@ instruct vpopcountL(vReg dst, vReg src) %{
// "vpopcountL" rule.
instruct vpopcountL_I(vReg dst, vReg src, vReg tmp) %{
predicate(Matcher::vector_element_basic_type(n) == T_INT &&
!n->as_Vector()->is_predicated_vector());
predicate(Matcher::vector_element_basic_type(n) == T_INT);
match(Set dst (PopCountVL src));
effect(TEMP_DEF dst, TEMP tmp);
format %{ "vpopcountL_I $dst, $src\t# KILL $tmp" %}
@@ -4036,6 +4105,48 @@ instruct vblend_sve(vReg dst, vReg src1, vReg src2, pReg pg) %{
ins_pipe(pipe_slow);
%}
// ------------------------- Vector conditional move --------------------------
instruct vcmove_neon(vReg dst, vReg src1, vReg src2, immI cond, cmpOp copnd) %{
predicate(UseSVE == 0 ||
(VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)) &&
n->in(1)->in(2)->get_int() != BoolTest::ne));
match(Set dst (CMoveVF (Binary copnd cond) (Binary src1 src2)));
match(Set dst (CMoveVD (Binary copnd cond) (Binary src1 src2)));
effect(TEMP_DEF dst);
format %{ "vcmove_neon.$copnd $dst, $src1, $src2\t# vector conditional move fp" %}
ins_encode %{
BasicType bt = Matcher::vector_element_basic_type(this);
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
assert(length_in_bytes == 8 || length_in_bytes == 16, "must be");
__ neon_compare($dst$$FloatRegister, bt, $src1$$FloatRegister,
$src2$$FloatRegister, (int)($cond$$constant),
/* isQ */ length_in_bytes == 16);
__ bsl($dst$$FloatRegister, length_in_bytes == 16 ? __ T16B : __ T8B,
$src2$$FloatRegister, $src1$$FloatRegister);
%}
ins_pipe(pipe_slow);
%}
instruct vcmove_sve(vReg dst, vReg src1, vReg src2, immI cond, cmpOp copnd, pRegGov pgtmp) %{
predicate(!VM_Version::use_neon_for_vector(Matcher::vector_length_in_bytes(n)) ||
(UseSVE > 0 && n->in(1)->in(2)->get_int() == BoolTest::ne));
match(Set dst (CMoveVF (Binary copnd cond) (Binary src1 src2)));
match(Set dst (CMoveVD (Binary copnd cond) (Binary src1 src2)));
effect(TEMP pgtmp);
format %{ "vcmove_sve.$copnd $dst, $src1, $src2\t# vector conditional move fp. KILL $pgtmp" %}
ins_encode %{
assert(UseSVE > 0, "must be sve");
BasicType bt = Matcher::vector_element_basic_type(this);
uint length_in_bytes = Matcher::vector_length_in_bytes(this);
__ sve_compare($pgtmp$$PRegister, bt, ptrue, $src1$$FloatRegister,
$src2$$FloatRegister, (int)($cond$$constant));
__ sve_sel($dst$$FloatRegister, __ elemType_to_regVariant(bt),
$pgtmp$$PRegister, $src2$$FloatRegister, $src1$$FloatRegister);
%}
ins_pipe(pipe_slow);
%}
// ------------------------------ Vector round ---------------------------------
// vector Math.round
@@ -4140,7 +4251,7 @@ instruct vtest_anytrue_neon(iRegINoSp dst, vReg src1, vReg src2, vReg tmp, rFlag
ins_pipe(pipe_slow);
%}
instruct vtest_anytrue_sve(iRegINoSp dst, pRegGov src1, pRegGov src2, rFlagsReg cr) %{
instruct vtest_anytrue_sve(iRegINoSp dst, pReg src1, pReg src2, rFlagsReg cr) %{
predicate(UseSVE > 0 &&
static_cast<const VectorTestNode*>(n)->get_predicate() == BoolTest::ne);
match(Set dst (VectorTest src1 src2));
@@ -4174,7 +4285,7 @@ instruct vtest_alltrue_neon(iRegINoSp dst, vReg src1, vReg src2, vReg tmp, rFlag
ins_pipe(pipe_slow);
%}
instruct vtest_alltrue_sve(iRegINoSp dst, pRegGov src1, pRegGov src2, pReg ptmp, rFlagsReg cr) %{
instruct vtest_alltrue_sve(iRegINoSp dst, pReg src1, pReg src2, pReg ptmp, rFlagsReg cr) %{
predicate(UseSVE > 0 &&
static_cast<const VectorTestNode*>(n)->get_predicate() == BoolTest::overflow);
match(Set dst (VectorTest src1 src2));
@@ -4415,7 +4526,6 @@ instruct scatter_storeD_masked(indirect mem, vReg src, vReg idx, pRegGov pg, vRe
// ------------------------------ CountLeadingZerosV ---------------------------
instruct vcountLeadingZeros(vReg dst, vReg src) %{
predicate(!n->as_Vector()->is_predicated_vector());
match(Set dst (CountLeadingZerosV src));
format %{ "vcountLeadingZeros $dst, $src" %}
ins_encode %{
@@ -4452,7 +4562,6 @@ UNARY_OP_PREDICATE(vcountLeadingZeros, CountLeadingZerosV, sve_clz)
// ------------------------------ CountTrailingZerosV --------------------------
instruct vcountTrailingZeros(vReg dst, vReg src) %{
predicate(!n->as_Vector()->is_predicated_vector());
match(Set dst (CountTrailingZerosV src));
format %{ "vcountTrailingZeros $dst, $src" %}
ins_encode %{
@@ -4514,7 +4623,6 @@ instruct vcountTrailingZeros_masked(vReg dst_src, pRegGov pg) %{
// ------------------------------ ReverseV -------------------------------------
instruct vreverse(vReg dst, vReg src) %{
predicate(!n->as_Vector()->is_predicated_vector());
match(Set dst (ReverseV src));
format %{ "vreverse $dst, $src" %}
ins_encode %{
@@ -4550,7 +4658,6 @@ UNARY_OP_PREDICATE(vreverse, ReverseV, sve_rbit)
// ------------------------------ ReverseBytesV --------------------------------
instruct vreverseBytes(vReg dst, vReg src) %{
predicate(!n->as_Vector()->is_predicated_vector());
match(Set dst (ReverseBytesV src));
format %{ "vreverseBytes $dst, $src" %}
ins_encode %{

View File

@@ -62,23 +62,23 @@ class Argument {
};
};
REGISTER_DECLARATION(Register, c_rarg0, r0);
REGISTER_DECLARATION(Register, c_rarg1, r1);
REGISTER_DECLARATION(Register, c_rarg2, r2);
REGISTER_DECLARATION(Register, c_rarg3, r3);
REGISTER_DECLARATION(Register, c_rarg4, r4);
REGISTER_DECLARATION(Register, c_rarg5, r5);
REGISTER_DECLARATION(Register, c_rarg6, r6);
REGISTER_DECLARATION(Register, c_rarg7, r7);
constexpr Register c_rarg0 = r0;
constexpr Register c_rarg1 = r1;
constexpr Register c_rarg2 = r2;
constexpr Register c_rarg3 = r3;
constexpr Register c_rarg4 = r4;
constexpr Register c_rarg5 = r5;
constexpr Register c_rarg6 = r6;
constexpr Register c_rarg7 = r7;
REGISTER_DECLARATION(FloatRegister, c_farg0, v0);
REGISTER_DECLARATION(FloatRegister, c_farg1, v1);
REGISTER_DECLARATION(FloatRegister, c_farg2, v2);
REGISTER_DECLARATION(FloatRegister, c_farg3, v3);
REGISTER_DECLARATION(FloatRegister, c_farg4, v4);
REGISTER_DECLARATION(FloatRegister, c_farg5, v5);
REGISTER_DECLARATION(FloatRegister, c_farg6, v6);
REGISTER_DECLARATION(FloatRegister, c_farg7, v7);
constexpr FloatRegister c_farg0 = v0;
constexpr FloatRegister c_farg1 = v1;
constexpr FloatRegister c_farg2 = v2;
constexpr FloatRegister c_farg3 = v3;
constexpr FloatRegister c_farg4 = v4;
constexpr FloatRegister c_farg5 = v5;
constexpr FloatRegister c_farg6 = v6;
constexpr FloatRegister c_farg7 = v7;
// Symbolically name the register arguments used by the Java calling convention.
// We have control over the convention for java so we can do what we please.
@@ -96,25 +96,25 @@ REGISTER_DECLARATION(FloatRegister, c_farg7, v7);
// |--------------------------------------------------------------------|
REGISTER_DECLARATION(Register, j_rarg0, c_rarg1);
REGISTER_DECLARATION(Register, j_rarg1, c_rarg2);
REGISTER_DECLARATION(Register, j_rarg2, c_rarg3);
REGISTER_DECLARATION(Register, j_rarg3, c_rarg4);
REGISTER_DECLARATION(Register, j_rarg4, c_rarg5);
REGISTER_DECLARATION(Register, j_rarg5, c_rarg6);
REGISTER_DECLARATION(Register, j_rarg6, c_rarg7);
REGISTER_DECLARATION(Register, j_rarg7, c_rarg0);
constexpr Register j_rarg0 = c_rarg1;
constexpr Register j_rarg1 = c_rarg2;
constexpr Register j_rarg2 = c_rarg3;
constexpr Register j_rarg3 = c_rarg4;
constexpr Register j_rarg4 = c_rarg5;
constexpr Register j_rarg5 = c_rarg6;
constexpr Register j_rarg6 = c_rarg7;
constexpr Register j_rarg7 = c_rarg0;
// Java floating args are passed as per C
REGISTER_DECLARATION(FloatRegister, j_farg0, v0);
REGISTER_DECLARATION(FloatRegister, j_farg1, v1);
REGISTER_DECLARATION(FloatRegister, j_farg2, v2);
REGISTER_DECLARATION(FloatRegister, j_farg3, v3);
REGISTER_DECLARATION(FloatRegister, j_farg4, v4);
REGISTER_DECLARATION(FloatRegister, j_farg5, v5);
REGISTER_DECLARATION(FloatRegister, j_farg6, v6);
REGISTER_DECLARATION(FloatRegister, j_farg7, v7);
constexpr FloatRegister j_farg0 = v0;
constexpr FloatRegister j_farg1 = v1;
constexpr FloatRegister j_farg2 = v2;
constexpr FloatRegister j_farg3 = v3;
constexpr FloatRegister j_farg4 = v4;
constexpr FloatRegister j_farg5 = v5;
constexpr FloatRegister j_farg6 = v6;
constexpr FloatRegister j_farg7 = v7;
// registers used to hold VM data either temporarily within a method
// or across method calls
@@ -123,40 +123,28 @@ REGISTER_DECLARATION(FloatRegister, j_farg7, v7);
// r8 is used for indirect result location return
// we use it and r9 as scratch registers
REGISTER_DECLARATION(Register, rscratch1, r8);
REGISTER_DECLARATION(Register, rscratch2, r9);
constexpr Register rscratch1 = r8;
constexpr Register rscratch2 = r9;
// current method -- must be in a call-clobbered register
REGISTER_DECLARATION(Register, rmethod, r12);
constexpr Register rmethod = r12;
// non-volatile (callee-save) registers are r16-29
// of which the following are dedicated global state
// link register
REGISTER_DECLARATION(Register, lr, r30);
// frame pointer
REGISTER_DECLARATION(Register, rfp, r29);
// current thread
REGISTER_DECLARATION(Register, rthread, r28);
// base of heap
REGISTER_DECLARATION(Register, rheapbase, r27);
// constant pool cache
REGISTER_DECLARATION(Register, rcpool, r26);
// r25 is a callee-saved temp
// REGISTER_DECLARATION(Register, unused, r25);
// locals on stack
REGISTER_DECLARATION(Register, rlocals, r24);
// bytecode pointer
REGISTER_DECLARATION(Register, rbcp, r22);
// Dispatch table base
REGISTER_DECLARATION(Register, rdispatch, r21);
// Java expression stack pointer
REGISTER_DECLARATION(Register, esp, r20);
// Sender's SP while in interpreter
REGISTER_DECLARATION(Register, r19_sender_sp, r19);
constexpr Register lr = r30; // link register
constexpr Register rfp = r29; // frame pointer
constexpr Register rthread = r28; // current thread
constexpr Register rheapbase = r27; // base of heap
constexpr Register rcpool = r26; // constant pool cache
constexpr Register rlocals = r24; // locals on stack
constexpr Register rbcp = r22; // bytecode pointer
constexpr Register rdispatch = r21; // dispatch table base
constexpr Register esp = r20; // Java expression stack pointer
constexpr Register r19_sender_sp = r19; // sender's SP while in interpreter
// Preserved predicate register with all elements set TRUE.
REGISTER_DECLARATION(PRegister, ptrue, p7);
constexpr PRegister ptrue = p7;
#define assert_cond(ARG1) assert(ARG1, #ARG1)
@@ -277,29 +265,29 @@ public:
}
void rf(Register r, int lsb) {
f(r->encoding_nocheck(), lsb + 4, lsb);
f(r->raw_encoding(), lsb + 4, lsb);
}
// reg|ZR
void zrf(Register r, int lsb) {
f(r->encoding_nocheck() - (r == zr), lsb + 4, lsb);
f(r->raw_encoding() - (r == zr), lsb + 4, lsb);
}
// reg|SP
void srf(Register r, int lsb) {
f(r == sp ? 31 : r->encoding_nocheck(), lsb + 4, lsb);
f(r == sp ? 31 : r->raw_encoding(), lsb + 4, lsb);
}
void rf(FloatRegister r, int lsb) {
f(r->encoding_nocheck(), lsb + 4, lsb);
f(r->raw_encoding(), lsb + 4, lsb);
}
void prf(PRegister r, int lsb) {
f(r->encoding_nocheck(), lsb + 3, lsb);
f(r->raw_encoding(), lsb + 3, lsb);
}
void pgrf(PRegister r, int lsb) {
f(r->encoding_nocheck(), lsb + 2, lsb);
f(r->raw_encoding(), lsb + 2, lsb);
}
unsigned get(int msb = 31, int lsb = 0) {
@@ -329,7 +317,7 @@ class Post : public PrePost {
Register _idx;
bool _is_postreg;
public:
Post(Register reg, int o) : PrePost(reg, o) { _idx = NULL; _is_postreg = false; }
Post(Register reg, int o) : PrePost(reg, o) { _idx = noreg; _is_postreg = false; }
Post(Register reg, Register idx) : PrePost(reg, 0) { _idx = idx; _is_postreg = true; }
Register idx_reg() { return _idx; }
bool is_postreg() {return _is_postreg; }
@@ -627,8 +615,7 @@ class InternalAddress: public Address {
InternalAddress(address target) : Address(target, relocInfo::internal_word_type) {}
};
const int FPUStateSizeInWords = FloatRegisterImpl::number_of_registers *
FloatRegisterImpl::save_slots_per_register;
const int FPUStateSizeInWords = FloatRegister::number_of_registers * FloatRegister::save_slots_per_register;
typedef enum {
PLDL1KEEP = 0b00000, PLDL1STRM, PLDL2KEEP, PLDL2STRM, PLDL3KEEP, PLDL3STRM,
@@ -3155,6 +3142,7 @@ public:
sve_predicate_reg_insn(op1, op2, Zd_or_Zdn_or_Vd, T, Pg, Zn_or_Zm); \
}
INSN(sve_fabd, 0b01100101, 0b001000100); // floating-point absolute difference
INSN(sve_fabs, 0b00000100, 0b011100101);
INSN(sve_fadd, 0b01100101, 0b000000100);
INSN(sve_fadda, 0b01100101, 0b011000001); // add strictly-ordered reduction to scalar Vd

View File

@@ -308,7 +308,7 @@ void SimpleExceptionStub::emit_code(LIR_Assembler* ce) {
if (_obj->is_cpu_register()) {
__ mov(rscratch1, _obj->as_register());
}
__ far_call(RuntimeAddress(Runtime1::entry_for(_stub)), NULL, rscratch2);
__ far_call(RuntimeAddress(Runtime1::entry_for(_stub)), rscratch2);
ce->add_call_info_here(_info);
debug_only(__ should_not_reach_here());
}

View File

@@ -41,8 +41,8 @@ enum {
// registers
enum {
pd_nof_cpu_regs_frame_map = RegisterImpl::number_of_registers, // number of registers used during code emission
pd_nof_fpu_regs_frame_map = FloatRegisterImpl::number_of_registers, // number of registers used during code emission
pd_nof_cpu_regs_frame_map = Register::number_of_registers, // number of GP registers used during code emission
pd_nof_fpu_regs_frame_map = FloatRegister::number_of_registers, // number of FP registers used during code emission
pd_nof_caller_save_cpu_regs_frame_map = 19 - 2 /* rscratch1 and rscratch2 */ R18_RESERVED_ONLY(- 1), // number of registers killed by calls
pd_nof_caller_save_fpu_regs_frame_map = 32, // number of registers killed by calls

View File

@@ -331,7 +331,7 @@ void LIR_Assembler::jobject2reg(jobject o, Register reg) {
if (o == NULL) {
__ mov(reg, zr);
} else {
__ movoop(reg, o, /*immediate*/true);
__ movoop(reg, o);
}
}

View File

@@ -339,18 +339,6 @@ void LIRGenerator::do_MonitorExit(MonitorExit* x) {
monitor_exit(obj_temp, lock, syncTempOpr(), LIR_OprFact::illegalOpr, x->monitor_no());
}
void LIRGenerator::do_continuation_doYield(Intrinsic* x) {
BasicTypeList signature(0);
CallingConvention* cc = frame_map()->java_calling_convention(&signature, true);
const LIR_Opr result_reg = result_register_for(x->type());
address entry = StubRoutines::cont_doYield();
LIR_Opr result = rlock_result(x);
CodeEmitInfo* info = state_for(x, x->state());
__ call_runtime(entry, LIR_OprFact::illegalOpr, result_reg, cc->args(), info);
__ move(result_reg, result);
}
void LIRGenerator::do_NegateOp(NegateOp* x) {
LIRItem from(x->x(), this);

View File

@@ -31,6 +31,7 @@
#include "logging/logStream.hpp"
#include "memory/resourceArea.hpp"
#include "prims/downcallLinker.hpp"
#include "runtime/globals.hpp"
#include "runtime/stubCodeGenerator.hpp"
#define __ _masm->
@@ -247,8 +248,10 @@ void DowncallStubGenerator::generate() {
__ strw(tmp1, Address(rthread, JavaThread::thread_state_offset()));
// Force this write out before the read below
__ membar(Assembler::LoadLoad | Assembler::LoadStore |
Assembler::StoreLoad | Assembler::StoreStore);
if (!UseSystemMemoryBarrier) {
__ membar(Assembler::LoadLoad | Assembler::LoadStore |
Assembler::StoreLoad | Assembler::StoreStore);
}
__ verify_sve_vector_length(tmp1);

View File

@@ -188,16 +188,11 @@ bool frame::safe_for_sender(JavaThread *thread) {
}
// We must always be able to find a recognizable pc
CodeBlob* sender_blob = CodeCache::find_blob_unsafe(sender_pc);
CodeBlob* sender_blob = CodeCache::find_blob(sender_pc);
if (sender_pc == NULL || sender_blob == NULL) {
return false;
}
// Could be a zombie method
if (sender_blob->is_zombie() || sender_blob->is_unloaded()) {
return false;
}
// Could just be some random pointer within the codeBlob
if (!sender_blob->code_contains(sender_pc)) {
return false;

View File

@@ -165,10 +165,8 @@ inline frame::frame(intptr_t* sp, intptr_t* fp) {
DEBUG_ONLY(_frame_index = -1;)
// Here's a sticky one. This constructor can be called via AsyncGetCallTrace
// when last_Java_sp is non-null but the pc fetched is junk. If we are truly
// unlucky the junk value could be to a zombied method and we'll die on the
// find_blob call. This is also why we can have no asserts on the validity
// of the pc we find here. AsyncGetCallTrace -> pd_get_top_frame_for_signal_handler
// when last_Java_sp is non-null but the pc fetched is junk.
// AsyncGetCallTrace -> pd_get_top_frame_for_signal_handler
// -> pd_last_frame should use a specialized version of pd_last_frame which could
// call a specilaized frame constructor instead of this one.
// Then we could use the assert below. However this assert is of somewhat dubious
@@ -412,7 +410,7 @@ inline frame frame::sender_for_compiled_frame(RegisterMap* map) const {
// in C2 code but it will have been pushed onto the stack. so we
// have to find it relative to the unextended sp
assert(_cb->frame_size() >= 0, "must have non-zero frame size");
assert(_cb->frame_size() > 0, "must have non-zero frame size");
intptr_t* l_sender_sp = (!PreserveFramePointer || _sp_is_trusted) ? unextended_sp() + _cb->frame_size()
: sender_sp();
assert(!_sp_is_trusted || l_sender_sp == real_fp(), "");

View File

@@ -99,7 +99,8 @@ void G1BarrierSetAssembler::g1_write_barrier_pre(MacroAssembler* masm,
Register obj,
Register pre_val,
Register thread,
Register tmp,
Register tmp1,
Register tmp2,
bool tosca_live,
bool expand_call) {
// If expand_call is true then we expand the call_VM_leaf macro
@@ -111,8 +112,8 @@ void G1BarrierSetAssembler::g1_write_barrier_pre(MacroAssembler* masm,
Label done;
Label runtime;
assert_different_registers(obj, pre_val, tmp, rscratch1);
assert(pre_val != noreg && tmp != noreg, "expecting a register");
assert_different_registers(obj, pre_val, tmp1, tmp2);
assert(pre_val != noreg && tmp1 != noreg && tmp2 != noreg, "expecting a register");
Address in_progress(thread, in_bytes(G1ThreadLocalData::satb_mark_queue_active_offset()));
Address index(thread, in_bytes(G1ThreadLocalData::satb_mark_queue_index_offset()));
@@ -120,12 +121,12 @@ void G1BarrierSetAssembler::g1_write_barrier_pre(MacroAssembler* masm,
// Is marking active?
if (in_bytes(SATBMarkQueue::byte_width_of_active()) == 4) {
__ ldrw(tmp, in_progress);
__ ldrw(tmp1, in_progress);
} else {
assert(in_bytes(SATBMarkQueue::byte_width_of_active()) == 1, "Assumption");
__ ldrb(tmp, in_progress);
__ ldrb(tmp1, in_progress);
}
__ cbzw(tmp, done);
__ cbzw(tmp1, done);
// Do we need to load the previous value?
if (obj != noreg) {
@@ -139,17 +140,17 @@ void G1BarrierSetAssembler::g1_write_barrier_pre(MacroAssembler* masm,
// Is index == 0?
// (The index field is typed as size_t.)
__ ldr(tmp, index); // tmp := *index_adr
__ cbz(tmp, runtime); // tmp == 0?
__ ldr(tmp1, index); // tmp := *index_adr
__ cbz(tmp1, runtime); // tmp == 0?
// If yes, goto runtime
__ sub(tmp, tmp, wordSize); // tmp := tmp - wordSize
__ str(tmp, index); // *index_adr := tmp
__ ldr(rscratch1, buffer);
__ add(tmp, tmp, rscratch1); // tmp := tmp + *buffer_adr
__ sub(tmp1, tmp1, wordSize); // tmp := tmp - wordSize
__ str(tmp1, index); // *index_adr := tmp
__ ldr(tmp2, buffer);
__ add(tmp1, tmp1, tmp2); // tmp := tmp + *buffer_adr
// Record the previous value
__ str(pre_val, Address(tmp, 0));
__ str(pre_val, Address(tmp1, 0));
__ b(done);
__ bind(runtime);
@@ -185,12 +186,12 @@ void G1BarrierSetAssembler::g1_write_barrier_post(MacroAssembler* masm,
Register store_addr,
Register new_val,
Register thread,
Register tmp,
Register tmp1,
Register tmp2) {
assert(thread == rthread, "must be");
assert_different_registers(store_addr, new_val, thread, tmp, tmp2,
assert_different_registers(store_addr, new_val, thread, tmp1, tmp2,
rscratch1);
assert(store_addr != noreg && new_val != noreg && tmp != noreg
assert(store_addr != noreg && new_val != noreg && tmp1 != noreg
&& tmp2 != noreg, "expecting a register");
Address queue_index(thread, in_bytes(G1ThreadLocalData::dirty_card_queue_index_offset()));
@@ -205,9 +206,9 @@ void G1BarrierSetAssembler::g1_write_barrier_post(MacroAssembler* masm,
// Does store cross heap regions?
__ eor(tmp, store_addr, new_val);
__ lsr(tmp, tmp, HeapRegion::LogOfHRGrainBytes);
__ cbz(tmp, done);
__ eor(tmp1, store_addr, new_val);
__ lsr(tmp1, tmp1, HeapRegion::LogOfHRGrainBytes);
__ cbz(tmp1, done);
// crosses regions, storing NULL?
@@ -215,7 +216,7 @@ void G1BarrierSetAssembler::g1_write_barrier_post(MacroAssembler* masm,
// storing region crossing non-NULL, is card already dirty?
const Register card_addr = tmp;
const Register card_addr = tmp1;
__ lsr(card_addr, store_addr, CardTable::card_shift());
@@ -258,12 +259,12 @@ void G1BarrierSetAssembler::g1_write_barrier_post(MacroAssembler* masm,
}
void G1BarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
Register dst, Address src, Register tmp1, Register tmp_thread) {
Register dst, Address src, Register tmp1, Register tmp2) {
bool on_oop = is_reference_type(type);
bool on_weak = (decorators & ON_WEAK_OOP_REF) != 0;
bool on_phantom = (decorators & ON_PHANTOM_OOP_REF) != 0;
bool on_reference = on_weak || on_phantom;
ModRefBarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp_thread);
ModRefBarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp2);
if (on_oop && on_reference) {
// LR is live. It must be saved around calls.
__ enter(/*strip_ret_addr*/true); // barrier may call runtime
@@ -273,7 +274,8 @@ void G1BarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorator
noreg /* obj */,
dst /* pre_val */,
rthread /* thread */,
tmp1 /* tmp */,
tmp1 /* tmp1 */,
tmp2 /* tmp2 */,
true /* tosca_live */,
true /* expand_call */);
__ leave();
@@ -281,26 +283,27 @@ void G1BarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorator
}
void G1BarrierSetAssembler::oop_store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
Address dst, Register val, Register tmp1, Register tmp2) {
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3) {
// flatten object address if needed
if (dst.index() == noreg && dst.offset() == 0) {
if (dst.base() != r3) {
__ mov(r3, dst.base());
if (dst.base() != tmp3) {
__ mov(tmp3, dst.base());
}
} else {
__ lea(r3, dst);
__ lea(tmp3, dst);
}
g1_write_barrier_pre(masm,
r3 /* obj */,
tmp3 /* obj */,
tmp2 /* pre_val */,
rthread /* thread */,
tmp1 /* tmp */,
tmp1 /* tmp1 */,
rscratch2 /* tmp2 */,
val != noreg /* tosca_live */,
false /* expand_call */);
if (val == noreg) {
BarrierSetAssembler::store_at(masm, decorators, type, Address(r3, 0), noreg, noreg, noreg);
BarrierSetAssembler::store_at(masm, decorators, type, Address(tmp3, 0), noreg, noreg, noreg, noreg);
} else {
// G1 barrier needs uncompressed oop for region cross check.
Register new_val = val;
@@ -308,12 +311,12 @@ void G1BarrierSetAssembler::oop_store_at(MacroAssembler* masm, DecoratorSet deco
new_val = rscratch2;
__ mov(new_val, val);
}
BarrierSetAssembler::store_at(masm, decorators, type, Address(r3, 0), val, noreg, noreg);
BarrierSetAssembler::store_at(masm, decorators, type, Address(tmp3, 0), val, noreg, noreg, noreg);
g1_write_barrier_post(masm,
r3 /* store_adr */,
tmp3 /* store_adr */,
new_val /* new_val */,
rthread /* thread */,
tmp1 /* tmp */,
tmp1 /* tmp1 */,
tmp2 /* tmp2 */);
}
@@ -380,6 +383,15 @@ void G1BarrierSetAssembler::generate_c1_pre_barrier_runtime_stub(StubAssembler*
Label done;
Label runtime;
// Is marking still active?
if (in_bytes(SATBMarkQueue::byte_width_of_active()) == 4) {
__ ldrw(tmp, in_progress);
} else {
assert(in_bytes(SATBMarkQueue::byte_width_of_active()) == 1, "Assumption");
__ ldrb(tmp, in_progress);
}
__ cbzw(tmp, done);
// Can we store original value in the thread's buffer?
__ ldr(tmp, queue_index);
__ cbz(tmp, runtime);

View File

@@ -45,7 +45,8 @@ protected:
Register obj,
Register pre_val,
Register thread,
Register tmp,
Register tmp1,
Register tmp2,
bool tosca_live,
bool expand_call);
@@ -53,11 +54,11 @@ protected:
Register store_addr,
Register new_val,
Register thread,
Register tmp,
Register tmp1,
Register tmp2);
virtual void oop_store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
Address dst, Register val, Register tmp1, Register tmp2);
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3);
public:
#ifdef COMPILER1
@@ -69,7 +70,7 @@ public:
#endif
void load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
Register dst, Address src, Register tmp1, Register tmp_thread);
Register dst, Address src, Register tmp1, Register tmp2);
};
#endif // CPU_AARCH64_GC_G1_G1BARRIERSETASSEMBLER_AARCH64_HPP

View File

@@ -39,7 +39,7 @@
#define __ masm->
void BarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
Register dst, Address src, Register tmp1, Register tmp_thread) {
Register dst, Address src, Register tmp1, Register tmp2) {
// LR is live. It must be saved around calls.
@@ -80,7 +80,7 @@ void BarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorators,
}
void BarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
Address dst, Register val, Register tmp1, Register tmp2) {
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3) {
bool in_heap = (decorators & IN_HEAP) != 0;
bool in_native = (decorators & IN_NATIVE) != 0;
switch (type) {
@@ -285,13 +285,12 @@ void BarrierSetAssembler::c2i_entry_barrier(MacroAssembler* masm) {
__ cbnz(rscratch2, method_live);
// Is it a weak but alive CLD?
__ stp(r10, r11, Address(__ pre(sp, -2 * wordSize)));
__ push(RegSet::of(r10), sp);
__ ldr(r10, Address(rscratch1, ClassLoaderData::holder_offset()));
// Uses rscratch1 & rscratch2, so we must pass new temporaries.
__ resolve_weak_handle(r10, r11);
__ resolve_weak_handle(r10, rscratch1, rscratch2);
__ mov(rscratch1, r10);
__ ldp(r10, r11, Address(__ post(sp, 2 * wordSize)));
__ pop(RegSet::of(r10), sp);
__ cbnz(rscratch1, method_live);
__ bind(bad_call);

View File

@@ -49,9 +49,9 @@ public:
virtual void arraycopy_epilogue(MacroAssembler* masm, DecoratorSet decorators, bool is_oop,
Register start, Register end, Register tmp, RegSet saved_regs) {}
virtual void load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
Register dst, Address src, Register tmp1, Register tmp_thread);
Register dst, Address src, Register tmp1, Register tmp2);
virtual void store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
Address dst, Register val, Register tmp1, Register tmp2);
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3);
virtual void try_resolve_jobject_in_native(MacroAssembler* masm, Register jni_env,
Register obj, Register tmp, Label& slowpath);
@@ -72,6 +72,12 @@ public:
virtual void nmethod_entry_barrier(MacroAssembler* masm, Label* slow_path, Label* continuation, Label* guard);
virtual void c2i_entry_barrier(MacroAssembler* masm);
virtual bool supports_instruction_patching() {
NMethodPatchingType patching_type = nmethod_patching_type();
return patching_type == NMethodPatchingType::conc_instruction_and_data_patch ||
patching_type == NMethodPatchingType::stw_instruction_and_data_patch;
}
static address patching_epoch_addr();
static void clear_patching_epoch();
static void increment_patching_epoch();

View File

@@ -78,21 +78,21 @@ void CardTableBarrierSetAssembler::gen_write_ref_array_post_barrier(MacroAssembl
}
void CardTableBarrierSetAssembler::oop_store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
Address dst, Register val, Register tmp1, Register tmp2) {
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3) {
bool in_heap = (decorators & IN_HEAP) != 0;
bool is_array = (decorators & IS_ARRAY) != 0;
bool on_anonymous = (decorators & ON_UNKNOWN_OOP_REF) != 0;
bool precise = is_array || on_anonymous;
bool needs_post_barrier = val != noreg && in_heap;
BarrierSetAssembler::store_at(masm, decorators, type, dst, val, noreg, noreg);
BarrierSetAssembler::store_at(masm, decorators, type, dst, val, noreg, noreg, noreg);
if (needs_post_barrier) {
// flatten object address if needed
if (!precise || (dst.index() == noreg && dst.offset() == 0)) {
store_check(masm, dst.base(), dst);
} else {
__ lea(r3, dst);
store_check(masm, r3, dst);
__ lea(tmp3, dst);
store_check(masm, tmp3, dst);
}
}
}

View File

@@ -35,7 +35,7 @@ protected:
virtual void gen_write_ref_array_post_barrier(MacroAssembler* masm, DecoratorSet decorators,
Register start, Register count, Register tmp, RegSet saved_regs);
virtual void oop_store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
Address dst, Register val, Register tmp1, Register tmp2);
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3);
};

View File

@@ -45,10 +45,10 @@ void ModRefBarrierSetAssembler::arraycopy_epilogue(MacroAssembler* masm, Decorat
}
void ModRefBarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
Address dst, Register val, Register tmp1, Register tmp2) {
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3) {
if (is_reference_type(type)) {
oop_store_at(masm, decorators, type, dst, val, tmp1, tmp2);
oop_store_at(masm, decorators, type, dst, val, tmp1, tmp2, tmp3);
} else {
BarrierSetAssembler::store_at(masm, decorators, type, dst, val, tmp1, tmp2);
BarrierSetAssembler::store_at(masm, decorators, type, dst, val, tmp1, tmp2, tmp3);
}
}

View File

@@ -40,7 +40,7 @@ protected:
Register start, Register count, Register tmp, RegSet saved_regs) {}
virtual void oop_store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
Address dst, Register val, Register tmp1, Register tmp2) = 0;
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3) = 0;
public:
virtual void arraycopy_prologue(MacroAssembler* masm, DecoratorSet decorators, bool is_oop,
@@ -48,7 +48,7 @@ public:
virtual void arraycopy_epilogue(MacroAssembler* masm, DecoratorSet decorators, bool is_oop,
Register start, Register count, Register tmp, RegSet saved_regs);
virtual void store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
Address dst, Register val, Register tmp1, Register tmp2);
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3);
};
#endif // CPU_AARCH64_GC_SHARED_MODREFBARRIERSETASSEMBLER_AARCH64_HPP

View File

@@ -85,7 +85,7 @@ void ShenandoahBarrierSetAssembler::shenandoah_write_barrier_pre(MacroAssembler*
bool tosca_live,
bool expand_call) {
if (ShenandoahSATBBarrier) {
satb_write_barrier_pre(masm, obj, pre_val, thread, tmp, tosca_live, expand_call);
satb_write_barrier_pre(masm, obj, pre_val, thread, tmp, rscratch1, tosca_live, expand_call);
}
}
@@ -93,7 +93,8 @@ void ShenandoahBarrierSetAssembler::satb_write_barrier_pre(MacroAssembler* masm,
Register obj,
Register pre_val,
Register thread,
Register tmp,
Register tmp1,
Register tmp2,
bool tosca_live,
bool expand_call) {
// If expand_call is true then we expand the call_VM_leaf macro
@@ -105,8 +106,8 @@ void ShenandoahBarrierSetAssembler::satb_write_barrier_pre(MacroAssembler* masm,
Label done;
Label runtime;
assert_different_registers(obj, pre_val, tmp, rscratch1);
assert(pre_val != noreg && tmp != noreg, "expecting a register");
assert_different_registers(obj, pre_val, tmp1, tmp2);
assert(pre_val != noreg && tmp1 != noreg && tmp2 != noreg, "expecting a register");
Address in_progress(thread, in_bytes(ShenandoahThreadLocalData::satb_mark_queue_active_offset()));
Address index(thread, in_bytes(ShenandoahThreadLocalData::satb_mark_queue_index_offset()));
@@ -114,12 +115,12 @@ void ShenandoahBarrierSetAssembler::satb_write_barrier_pre(MacroAssembler* masm,
// Is marking active?
if (in_bytes(SATBMarkQueue::byte_width_of_active()) == 4) {
__ ldrw(tmp, in_progress);
__ ldrw(tmp1, in_progress);
} else {
assert(in_bytes(SATBMarkQueue::byte_width_of_active()) == 1, "Assumption");
__ ldrb(tmp, in_progress);
__ ldrb(tmp1, in_progress);
}
__ cbzw(tmp, done);
__ cbzw(tmp1, done);
// Do we need to load the previous value?
if (obj != noreg) {
@@ -133,17 +134,17 @@ void ShenandoahBarrierSetAssembler::satb_write_barrier_pre(MacroAssembler* masm,
// Is index == 0?
// (The index field is typed as size_t.)
__ ldr(tmp, index); // tmp := *index_adr
__ cbz(tmp, runtime); // tmp == 0?
__ ldr(tmp1, index); // tmp := *index_adr
__ cbz(tmp1, runtime); // tmp == 0?
// If yes, goto runtime
__ sub(tmp, tmp, wordSize); // tmp := tmp - wordSize
__ str(tmp, index); // *index_adr := tmp
__ ldr(rscratch1, buffer);
__ add(tmp, tmp, rscratch1); // tmp := tmp + *buffer_adr
__ sub(tmp1, tmp1, wordSize); // tmp := tmp - wordSize
__ str(tmp1, index); // *index_adr := tmp
__ ldr(tmp2, buffer);
__ add(tmp1, tmp1, tmp2); // tmp := tmp + *buffer_adr
// Record the previous value
__ str(pre_val, Address(tmp, 0));
__ str(pre_val, Address(tmp1, 0));
__ b(done);
__ bind(runtime);
@@ -307,7 +308,7 @@ void ShenandoahBarrierSetAssembler::load_reference_barrier(MacroAssembler* masm,
void ShenandoahBarrierSetAssembler::iu_barrier(MacroAssembler* masm, Register dst, Register tmp) {
if (ShenandoahIUBarrier) {
__ push_call_clobbered_registers();
satb_write_barrier_pre(masm, noreg, dst, rthread, tmp, true, false);
satb_write_barrier_pre(masm, noreg, dst, rthread, tmp, rscratch1, true, false);
__ pop_call_clobbered_registers();
}
}
@@ -328,10 +329,10 @@ void ShenandoahBarrierSetAssembler::iu_barrier(MacroAssembler* masm, Register ds
// dst: rscratch1 (might use rscratch1 as temporary output register to avoid clobbering src)
//
void ShenandoahBarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
Register dst, Address src, Register tmp1, Register tmp_thread) {
Register dst, Address src, Register tmp1, Register tmp2) {
// 1: non-reference load, no additional barrier is needed
if (!is_reference_type(type)) {
BarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp_thread);
BarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp2);
return;
}
@@ -345,7 +346,7 @@ void ShenandoahBarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet d
}
assert_different_registers(dst, src.base(), src.index());
BarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp_thread);
BarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp2);
load_reference_barrier(masm, dst, src, decorators);
@@ -354,7 +355,7 @@ void ShenandoahBarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet d
dst = result_dst;
}
} else {
BarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp_thread);
BarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp2);
}
// 3: apply keep-alive barrier if needed
@@ -365,7 +366,8 @@ void ShenandoahBarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet d
noreg /* obj */,
dst /* pre_val */,
rthread /* thread */,
tmp1 /* tmp */,
tmp1 /* tmp1 */,
tmp2 /* tmp2 */,
true /* tosca_live */,
true /* expand_call */);
__ pop_call_clobbered_registers();
@@ -374,24 +376,24 @@ void ShenandoahBarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet d
}
void ShenandoahBarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
Address dst, Register val, Register tmp1, Register tmp2) {
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3) {
bool on_oop = is_reference_type(type);
if (!on_oop) {
BarrierSetAssembler::store_at(masm, decorators, type, dst, val, tmp1, tmp2);
BarrierSetAssembler::store_at(masm, decorators, type, dst, val, tmp1, tmp2, tmp3);
return;
}
// flatten object address if needed
if (dst.index() == noreg && dst.offset() == 0) {
if (dst.base() != r3) {
__ mov(r3, dst.base());
if (dst.base() != tmp3) {
__ mov(tmp3, dst.base());
}
} else {
__ lea(r3, dst);
__ lea(tmp3, dst);
}
shenandoah_write_barrier_pre(masm,
r3 /* obj */,
tmp3 /* obj */,
tmp2 /* pre_val */,
rthread /* thread */,
tmp1 /* tmp */,
@@ -399,7 +401,7 @@ void ShenandoahBarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet
false /* expand_call */);
if (val == noreg) {
BarrierSetAssembler::store_at(masm, decorators, type, Address(r3, 0), noreg, noreg, noreg);
BarrierSetAssembler::store_at(masm, decorators, type, Address(tmp3, 0), noreg, noreg, noreg, noreg);
} else {
iu_barrier(masm, val, tmp1);
// G1 barrier needs uncompressed oop for region cross check.
@@ -408,7 +410,7 @@ void ShenandoahBarrierSetAssembler::store_at(MacroAssembler* masm, DecoratorSet
new_val = rscratch2;
__ mov(new_val, val);
}
BarrierSetAssembler::store_at(masm, decorators, type, Address(r3, 0), val, noreg, noreg);
BarrierSetAssembler::store_at(masm, decorators, type, Address(tmp3, 0), val, noreg, noreg, noreg);
}
}

View File

@@ -43,7 +43,8 @@ private:
Register obj,
Register pre_val,
Register thread,
Register tmp,
Register tmp1,
Register tmp2,
bool tosca_live,
bool expand_call);
void shenandoah_write_barrier_pre(MacroAssembler* masm,
@@ -74,9 +75,9 @@ public:
virtual void arraycopy_prologue(MacroAssembler* masm, DecoratorSet decorators, bool is_oop,
Register src, Register dst, Register count, RegSet saved_regs);
virtual void load_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
Register dst, Address src, Register tmp1, Register tmp_thread);
Register dst, Address src, Register tmp1, Register tmp2);
virtual void store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
Address dst, Register val, Register tmp1, Register tmp2);
Address dst, Register val, Register tmp1, Register tmp2, Register tmp3);
virtual void try_resolve_jobject_in_native(MacroAssembler* masm, Register jni_env,
Register obj, Register tmp, Label& slowpath);
void cmpxchg_oop(MacroAssembler* masm, Register addr, Register expected, Register new_val,

View File

@@ -108,7 +108,8 @@ void ZBarrierSetAssembler::store_at(MacroAssembler* masm,
Address dst,
Register val,
Register tmp1,
Register tmp2) {
Register tmp2,
Register tmp3) {
// Verify value
if (is_reference_type(type)) {
// Note that src could be noreg, which means we
@@ -116,7 +117,7 @@ void ZBarrierSetAssembler::store_at(MacroAssembler* masm,
if (val != noreg) {
Label done;
// tmp1 and tmp2 are often set to noreg.
// tmp1, tmp2 and tmp3 are often set to noreg.
RegSet savedRegs = RegSet::of(rscratch1);
__ push(savedRegs, sp);
@@ -131,7 +132,7 @@ void ZBarrierSetAssembler::store_at(MacroAssembler* masm,
}
// Store value
BarrierSetAssembler::store_at(masm, decorators, type, dst, val, tmp1, tmp2);
BarrierSetAssembler::store_at(masm, decorators, type, dst, val, tmp1, tmp2, noreg);
}
#endif // ASSERT

View File

@@ -59,7 +59,8 @@ public:
Address dst,
Register val,
Register tmp1,
Register tmp2);
Register tmp2,
Register tmp3);
#endif // ASSERT
virtual void arraycopy_prologue(MacroAssembler* masm,

View File

@@ -278,7 +278,7 @@ void InterpreterMacroAssembler::load_resolved_reference_at_index(
// load pointer for resolved_references[] objArray
ldr(result, Address(result, ConstantPool::cache_offset_in_bytes()));
ldr(result, Address(result, ConstantPoolCache::resolved_references_offset_in_bytes()));
resolve_oop_handle(result, tmp);
resolve_oop_handle(result, tmp, rscratch2);
// Add in the index
add(index, index, arrayOopDesc::base_offset_in_bytes(T_OBJECT) >> LogBytesPerHeapOop);
load_heap_oop(result, Address(result, index, Address::uxtw(LogBytesPerHeapOop)));

View File

@@ -175,11 +175,11 @@ void CodeInstaller::pd_relocate_poll(address pc, jint mark, JVMCI_TRAPS) {
// convert JVMCI register indices (as used in oop maps) to HotSpot registers
VMReg CodeInstaller::get_hotspot_reg(jint jvmci_reg, JVMCI_TRAPS) {
if (jvmci_reg < RegisterImpl::number_of_registers) {
if (jvmci_reg < Register::number_of_registers) {
return as_Register(jvmci_reg)->as_VMReg();
} else {
jint floatRegisterNumber = jvmci_reg - RegisterImpl::number_of_declared_registers;
if (floatRegisterNumber >= 0 && floatRegisterNumber < FloatRegisterImpl::number_of_registers) {
jint floatRegisterNumber = jvmci_reg - Register::number_of_declared_registers;
if (floatRegisterNumber >= 0 && floatRegisterNumber < FloatRegister::number_of_registers) {
return as_FloatRegister(floatRegisterNumber)->as_VMReg();
}
JVMCI_ERROR_NULL("invalid register number: %d", jvmci_reg);

View File

@@ -684,7 +684,7 @@ static inline bool target_needs_far_branch(address addr) {
return !CodeCache::is_non_nmethod(addr);
}
void MacroAssembler::far_call(Address entry, CodeBuffer *cbuf, Register tmp) {
void MacroAssembler::far_call(Address entry, Register tmp) {
assert(ReservedCodeCacheSize < 4*G, "branch out of range");
assert(CodeCache::find_blob(entry.target()) != NULL,
"destination of far call not found in code cache");
@@ -697,15 +697,13 @@ void MacroAssembler::far_call(Address entry, CodeBuffer *cbuf, Register tmp) {
// the code cache cannot exceed 2Gb (ADRP limit is 4GB).
adrp(tmp, entry, offset);
add(tmp, tmp, offset);
if (cbuf) cbuf->set_insts_mark();
blr(tmp);
} else {
if (cbuf) cbuf->set_insts_mark();
bl(entry);
}
}
int MacroAssembler::far_jump(Address entry, CodeBuffer *cbuf, Register tmp) {
int MacroAssembler::far_jump(Address entry, Register tmp) {
assert(ReservedCodeCacheSize < 4*G, "branch out of range");
assert(CodeCache::find_blob(entry.target()) != NULL,
"destination of far call not found in code cache");
@@ -719,10 +717,8 @@ int MacroAssembler::far_jump(Address entry, CodeBuffer *cbuf, Register tmp) {
// the code cache cannot exceed 2Gb (ADRP limit is 4GB).
adrp(tmp, entry, offset);
add(tmp, tmp, offset);
if (cbuf) cbuf->set_insts_mark();
br(tmp);
} else {
if (cbuf) cbuf->set_insts_mark();
b(entry);
}
return pc() - start;
@@ -849,9 +845,40 @@ void MacroAssembler::call_VM_helper(Register oop_result, address entry_point, in
call_VM_base(oop_result, noreg, noreg, entry_point, number_of_arguments, check_exceptions);
}
// Check the entry target is always reachable from any branch.
static bool is_always_within_branch_range(Address entry) {
const address target = entry.target();
if (!CodeCache::contains(target)) {
// We always use trampolines for callees outside CodeCache.
assert(entry.rspec().type() == relocInfo::runtime_call_type, "non-runtime call of an external target");
return false;
}
if (!MacroAssembler::far_branches()) {
return true;
}
if (entry.rspec().type() == relocInfo::runtime_call_type) {
// Runtime calls are calls of a non-compiled method (stubs, adapters).
// Non-compiled methods stay forever in CodeCache.
// We check whether the longest possible branch is within the branch range.
assert(CodeCache::find_blob(target) != NULL &&
!CodeCache::find_blob(target)->is_compiled(),
"runtime call of compiled method");
const address right_longest_branch_start = CodeCache::high_bound() - NativeInstruction::instruction_size;
const address left_longest_branch_start = CodeCache::low_bound();
const bool is_reachable = Assembler::reachable_from_branch_at(left_longest_branch_start, target) &&
Assembler::reachable_from_branch_at(right_longest_branch_start, target);
return is_reachable;
}
return false;
}
// Maybe emit a call via a trampoline. If the code cache is small
// trampolines won't be emitted.
address MacroAssembler::trampoline_call(Address entry, CodeBuffer* cbuf) {
address MacroAssembler::trampoline_call(Address entry) {
assert(entry.rspec().type() == relocInfo::runtime_call_type
|| entry.rspec().type() == relocInfo::opt_virtual_call_type
|| entry.rspec().type() == relocInfo::static_call_type
@@ -859,22 +886,7 @@ address MacroAssembler::trampoline_call(Address entry, CodeBuffer* cbuf) {
address target = entry.target();
// We might need a trampoline if branches are far.
bool need_trampoline = far_branches();
if (!need_trampoline && entry.rspec().type() == relocInfo::runtime_call_type && !CodeCache::contains(target)) {
// If it is a runtime call of an address outside small CodeCache,
// we need to check whether it is in range.
assert(target < CodeCache::low_bound() || target >= CodeCache::high_bound(), "target is inside CodeCache");
// Case 1: -------T-------L====CodeCache====H-------
// ^-------longest branch---|
// Case 2: -------L====CodeCache====H-------T-------
// |-------longest branch ---^
address longest_branch_start = (target < CodeCache::low_bound()) ? CodeCache::high_bound() - NativeInstruction::instruction_size
: CodeCache::low_bound();
need_trampoline = !reachable_from_branch_at(longest_branch_start, target);
}
if (need_trampoline) {
if (!is_always_within_branch_range(entry)) {
if (!in_scratch_emit_size()) {
// We don't want to emit a trampoline if C2 is generating dummy
// code during its branch shortening phase.
@@ -892,13 +904,12 @@ address MacroAssembler::trampoline_call(Address entry, CodeBuffer* cbuf) {
target = pc();
}
if (cbuf) cbuf->set_insts_mark();
address call_pc = pc();
relocate(entry.rspec());
bl(target);
// just need to return a non-null address
postcond(pc() != badAddress);
return pc();
return call_pc;
}
// Emit a trampoline stub for a call to a target which is too far away.
@@ -2198,7 +2209,7 @@ int MacroAssembler::push(unsigned int bitset, Register stack) {
regs[count++] = reg;
bitset >>= 1;
}
regs[count++] = zr->encoding_nocheck();
regs[count++] = zr->raw_encoding();
count &= ~1; // Only push an even number of regs
if (count) {
@@ -2228,7 +2239,7 @@ int MacroAssembler::pop(unsigned int bitset, Register stack) {
regs[count++] = reg;
bitset >>= 1;
}
regs[count++] = zr->encoding_nocheck();
regs[count++] = zr->raw_encoding();
count &= ~1;
for (int i = 2; i < count; i += 2) {
@@ -2383,9 +2394,9 @@ int MacroAssembler::push_p(unsigned int bitset, Register stack) {
return 0;
}
unsigned char regs[PRegisterImpl::number_of_saved_registers];
unsigned char regs[PRegister::number_of_registers];
int count = 0;
for (int reg = 0; reg < PRegisterImpl::number_of_saved_registers; reg++) {
for (int reg = 0; reg < PRegister::number_of_registers; reg++) {
if (1 & bitset)
regs[count++] = reg;
bitset >>= 1;
@@ -2420,9 +2431,9 @@ int MacroAssembler::pop_p(unsigned int bitset, Register stack) {
return 0;
}
unsigned char regs[PRegisterImpl::number_of_saved_registers];
unsigned char regs[PRegister::number_of_registers];
int count = 0;
for (int reg = 0; reg < PRegisterImpl::number_of_saved_registers; reg++) {
for (int reg = 0; reg < PRegister::number_of_registers; reg++) {
if (1 & bitset)
regs[count++] = reg;
bitset >>= 1;
@@ -2453,7 +2464,7 @@ void MacroAssembler::verify_heapbase(const char* msg) {
if (CheckCompressedOops) {
Label ok;
push(1 << rscratch1->encoding(), sp); // cmpptr trashes rscratch1
cmpptr(rheapbase, ExternalAddress((address)CompressedOops::ptrs_base_addr()));
cmpptr(rheapbase, ExternalAddress(CompressedOops::ptrs_base_addr()));
br(Assembler::EQ, ok);
stop(msg);
bind(ok);
@@ -2463,7 +2474,7 @@ void MacroAssembler::verify_heapbase(const char* msg) {
}
#endif
void MacroAssembler::resolve_jobject(Register value, Register thread, Register tmp) {
void MacroAssembler::resolve_jobject(Register value, Register tmp1, Register tmp2) {
Label done, not_weak;
cbz(value, done); // Use NULL as-is.
@@ -2472,13 +2483,13 @@ void MacroAssembler::resolve_jobject(Register value, Register thread, Register t
// Resolve jweak.
access_load_at(T_OBJECT, IN_NATIVE | ON_PHANTOM_OOP_REF, value,
Address(value, -JNIHandles::weak_tag_value), tmp, thread);
Address(value, -JNIHandles::weak_tag_value), tmp1, tmp2);
verify_oop(value);
b(done);
bind(not_weak);
// Resolve (untagged) jobject.
access_load_at(T_OBJECT, IN_NATIVE, value, Address(value, 0), tmp, thread);
access_load_at(T_OBJECT, IN_NATIVE, value, Address(value, 0), tmp1, tmp2);
verify_oop(value);
bind(done);
}
@@ -2587,7 +2598,7 @@ void MacroAssembler::reinit_heapbase()
if (Universe::is_fully_initialized()) {
mov(rheapbase, CompressedOops::ptrs_base());
} else {
lea(rheapbase, ExternalAddress((address)CompressedOops::ptrs_base_addr()));
lea(rheapbase, ExternalAddress(CompressedOops::ptrs_base_addr()));
ldr(rheapbase, Address(rheapbase));
}
}
@@ -2910,8 +2921,8 @@ void MacroAssembler::push_CPU_state(bool save_vectors, bool use_sve,
int sve_vector_size_in_bytes, int total_predicate_in_bytes) {
push(RegSet::range(r0, r29), sp); // integer registers except lr & sp
if (save_vectors && use_sve && sve_vector_size_in_bytes > 16) {
sub(sp, sp, sve_vector_size_in_bytes * FloatRegisterImpl::number_of_registers);
for (int i = 0; i < FloatRegisterImpl::number_of_registers; i++) {
sub(sp, sp, sve_vector_size_in_bytes * FloatRegister::number_of_registers);
for (int i = 0; i < FloatRegister::number_of_registers; i++) {
sve_str(as_FloatRegister(i), Address(sp, i));
}
} else {
@@ -2926,7 +2937,7 @@ void MacroAssembler::push_CPU_state(bool save_vectors, bool use_sve,
}
if (save_vectors && use_sve && total_predicate_in_bytes > 0) {
sub(sp, sp, total_predicate_in_bytes);
for (int i = 0; i < PRegisterImpl::number_of_saved_registers; i++) {
for (int i = 0; i < PRegister::number_of_registers; i++) {
sve_str(as_PRegister(i), Address(sp, i));
}
}
@@ -2935,16 +2946,16 @@ void MacroAssembler::push_CPU_state(bool save_vectors, bool use_sve,
void MacroAssembler::pop_CPU_state(bool restore_vectors, bool use_sve,
int sve_vector_size_in_bytes, int total_predicate_in_bytes) {
if (restore_vectors && use_sve && total_predicate_in_bytes > 0) {
for (int i = PRegisterImpl::number_of_saved_registers - 1; i >= 0; i--) {
for (int i = PRegister::number_of_registers - 1; i >= 0; i--) {
sve_ldr(as_PRegister(i), Address(sp, i));
}
add(sp, sp, total_predicate_in_bytes);
}
if (restore_vectors && use_sve && sve_vector_size_in_bytes > 16) {
for (int i = FloatRegisterImpl::number_of_registers - 1; i >= 0; i--) {
for (int i = FloatRegister::number_of_registers - 1; i >= 0; i--) {
sve_ldr(as_FloatRegister(i), Address(sp, i));
}
add(sp, sp, sve_vector_size_in_bytes * FloatRegisterImpl::number_of_registers);
add(sp, sp, sve_vector_size_in_bytes * FloatRegister::number_of_registers);
} else {
int step = (restore_vectors ? 8 : 4) * wordSize;
for (int i = 0; i <= 28; i += 4)
@@ -4040,34 +4051,33 @@ void MacroAssembler::load_klass(Register dst, Register src) {
}
// ((OopHandle)result).resolve();
void MacroAssembler::resolve_oop_handle(Register result, Register tmp) {
void MacroAssembler::resolve_oop_handle(Register result, Register tmp1, Register tmp2) {
// OopHandle::resolve is an indirection.
access_load_at(T_OBJECT, IN_NATIVE, result, Address(result, 0), tmp, noreg);
access_load_at(T_OBJECT, IN_NATIVE, result, Address(result, 0), tmp1, tmp2);
}
// ((WeakHandle)result).resolve();
void MacroAssembler::resolve_weak_handle(Register rresult, Register rtmp) {
assert_different_registers(rresult, rtmp);
void MacroAssembler::resolve_weak_handle(Register result, Register tmp1, Register tmp2) {
assert_different_registers(result, tmp1, tmp2);
Label resolved;
// A null weak handle resolves to null.
cbz(rresult, resolved);
cbz(result, resolved);
// Only 64 bit platforms support GCs that require a tmp register
// Only IN_HEAP loads require a thread_tmp register
// WeakHandle::resolve is an indirection like jweak.
access_load_at(T_OBJECT, IN_NATIVE | ON_PHANTOM_OOP_REF,
rresult, Address(rresult), rtmp, /*tmp_thread*/noreg);
result, Address(result), tmp1, tmp2);
bind(resolved);
}
void MacroAssembler::load_mirror(Register dst, Register method, Register tmp) {
void MacroAssembler::load_mirror(Register dst, Register method, Register tmp1, Register tmp2) {
const int mirror_offset = in_bytes(Klass::java_mirror_offset());
ldr(dst, Address(rmethod, Method::const_offset()));
ldr(dst, Address(dst, ConstMethod::constants_offset()));
ldr(dst, Address(dst, ConstantPool::pool_holder_offset_in_bytes()));
ldr(dst, Address(dst, mirror_offset));
resolve_oop_handle(dst, tmp);
resolve_oop_handle(dst, tmp1, tmp2);
}
void MacroAssembler::cmp_klass(Register oop, Register trial_klass, Register tmp) {
@@ -4389,48 +4399,48 @@ void MacroAssembler::set_narrow_klass(Register dst, Klass* k) {
void MacroAssembler::access_load_at(BasicType type, DecoratorSet decorators,
Register dst, Address src,
Register tmp1, Register thread_tmp) {
Register tmp1, Register tmp2) {
BarrierSetAssembler *bs = BarrierSet::barrier_set()->barrier_set_assembler();
decorators = AccessInternal::decorator_fixup(decorators);
bool as_raw = (decorators & AS_RAW) != 0;
if (as_raw) {
bs->BarrierSetAssembler::load_at(this, decorators, type, dst, src, tmp1, thread_tmp);
bs->BarrierSetAssembler::load_at(this, decorators, type, dst, src, tmp1, tmp2);
} else {
bs->load_at(this, decorators, type, dst, src, tmp1, thread_tmp);
bs->load_at(this, decorators, type, dst, src, tmp1, tmp2);
}
}
void MacroAssembler::access_store_at(BasicType type, DecoratorSet decorators,
Address dst, Register src,
Register tmp1, Register thread_tmp) {
Register tmp1, Register tmp2, Register tmp3) {
BarrierSetAssembler *bs = BarrierSet::barrier_set()->barrier_set_assembler();
decorators = AccessInternal::decorator_fixup(decorators);
bool as_raw = (decorators & AS_RAW) != 0;
if (as_raw) {
bs->BarrierSetAssembler::store_at(this, decorators, type, dst, src, tmp1, thread_tmp);
bs->BarrierSetAssembler::store_at(this, decorators, type, dst, src, tmp1, tmp2, tmp3);
} else {
bs->store_at(this, decorators, type, dst, src, tmp1, thread_tmp);
bs->store_at(this, decorators, type, dst, src, tmp1, tmp2, tmp3);
}
}
void MacroAssembler::load_heap_oop(Register dst, Address src, Register tmp1,
Register thread_tmp, DecoratorSet decorators) {
access_load_at(T_OBJECT, IN_HEAP | decorators, dst, src, tmp1, thread_tmp);
Register tmp2, DecoratorSet decorators) {
access_load_at(T_OBJECT, IN_HEAP | decorators, dst, src, tmp1, tmp2);
}
void MacroAssembler::load_heap_oop_not_null(Register dst, Address src, Register tmp1,
Register thread_tmp, DecoratorSet decorators) {
access_load_at(T_OBJECT, IN_HEAP | IS_NOT_NULL | decorators, dst, src, tmp1, thread_tmp);
Register tmp2, DecoratorSet decorators) {
access_load_at(T_OBJECT, IN_HEAP | IS_NOT_NULL | decorators, dst, src, tmp1, tmp2);
}
void MacroAssembler::store_heap_oop(Address dst, Register src, Register tmp1,
Register thread_tmp, DecoratorSet decorators) {
access_store_at(T_OBJECT, IN_HEAP | decorators, dst, src, tmp1, thread_tmp);
Register tmp2, Register tmp3, DecoratorSet decorators) {
access_store_at(T_OBJECT, IN_HEAP | decorators, dst, src, tmp1, tmp2, tmp3);
}
// Used for storing NULLs.
void MacroAssembler::store_heap_oop_null(Address dst) {
access_store_at(T_OBJECT, IN_HEAP, dst, noreg, noreg, noreg);
access_store_at(T_OBJECT, IN_HEAP, dst, noreg, noreg, noreg, noreg);
}
Address MacroAssembler::allocate_metadata_address(Metadata* obj) {
@@ -4440,11 +4450,8 @@ Address MacroAssembler::allocate_metadata_address(Metadata* obj) {
return Address((address)obj, rspec);
}
// Move an oop into a register. immediate is true if we want
// immediate instructions and nmethod entry barriers are not enabled.
// i.e. we are not going to patch this instruction while the code is being
// executed by another thread.
void MacroAssembler::movoop(Register dst, jobject obj, bool immediate) {
// Move an oop into a register.
void MacroAssembler::movoop(Register dst, jobject obj) {
int oop_index;
if (obj == NULL) {
oop_index = oop_recorder()->allocate_oop_index(obj);
@@ -4459,15 +4466,12 @@ void MacroAssembler::movoop(Register dst, jobject obj, bool immediate) {
}
RelocationHolder rspec = oop_Relocation::spec(oop_index);
// nmethod entry barrier necessitate using the constant pool. They have to be
// ordered with respected to oop accesses.
// Using immediate literals would necessitate ISBs.
BarrierSet* bs = BarrierSet::barrier_set();
if ((bs->barrier_set_nmethod() != NULL && bs->barrier_set_assembler()->nmethod_patching_type() == NMethodPatchingType::conc_data_patch) || !immediate) {
if (BarrierSet::barrier_set()->barrier_set_assembler()->supports_instruction_patching()) {
mov(dst, Address((address)obj, rspec));
} else {
address dummy = address(uintptr_t(pc()) & -wordSize); // A nearby aligned address
ldr_constant(dst, Address(dummy, rspec));
} else
mov(dst, Address((address)obj, rspec));
}
}

View File

@@ -830,7 +830,7 @@ public:
void store_check(Register obj); // store check for obj - register is destroyed afterwards
void store_check(Register obj, Address dst); // same as above, dst is exact store location (reg. is destroyed)
void resolve_jobject(Register value, Register thread, Register tmp);
void resolve_jobject(Register value, Register tmp1, Register tmp2);
// C 'boolean' to Java boolean: x == 0 ? 0 : 1
void c2bool(Register x);
@@ -843,23 +843,23 @@ public:
void store_klass(Register dst, Register src);
void cmp_klass(Register oop, Register trial_klass, Register tmp);
void resolve_weak_handle(Register result, Register tmp);
void resolve_oop_handle(Register result, Register tmp = r5);
void load_mirror(Register dst, Register method, Register tmp = r5);
void resolve_weak_handle(Register result, Register tmp1, Register tmp2);
void resolve_oop_handle(Register result, Register tmp1, Register tmp2);
void load_mirror(Register dst, Register method, Register tmp1, Register tmp2);
void access_load_at(BasicType type, DecoratorSet decorators, Register dst, Address src,
Register tmp1, Register tmp_thread);
Register tmp1, Register tmp2);
void access_store_at(BasicType type, DecoratorSet decorators, Address dst, Register src,
Register tmp1, Register tmp_thread);
Register tmp1, Register tmp2, Register tmp3);
void load_heap_oop(Register dst, Address src, Register tmp1 = noreg,
Register thread_tmp = noreg, DecoratorSet decorators = 0);
Register tmp2 = noreg, DecoratorSet decorators = 0);
void load_heap_oop_not_null(Register dst, Address src, Register tmp1 = noreg,
Register thread_tmp = noreg, DecoratorSet decorators = 0);
Register tmp2 = noreg, DecoratorSet decorators = 0);
void store_heap_oop(Address dst, Register src, Register tmp1 = noreg,
Register tmp_thread = noreg, DecoratorSet decorators = 0);
Register tmp2 = noreg, Register tmp3 = noreg, DecoratorSet decorators = 0);
// currently unimplemented
// Used for storing NULL. All other oop constants should be
@@ -1178,8 +1178,8 @@ public:
// - relocInfo::static_call_type
// - relocInfo::virtual_call_type
//
// Return: NULL if CodeCache is full.
address trampoline_call(Address entry, CodeBuffer* cbuf = NULL);
// Return: the call PC or NULL if CodeCache is full.
address trampoline_call(Address entry);
static bool far_branches() {
return ReservedCodeCacheSize > branch_range;
@@ -1201,8 +1201,8 @@ public:
// The tmp register is invalidated.
//
// Far_jump returns the amount of the emitted code.
void far_call(Address entry, CodeBuffer *cbuf = NULL, Register tmp = rscratch1);
int far_jump(Address entry, CodeBuffer *cbuf = NULL, Register tmp = rscratch1);
void far_call(Address entry, Register tmp = rscratch1);
int far_jump(Address entry, Register tmp = rscratch1);
static int far_codestub_branch_size() {
if (codestub_branch_needs_far_jump()) {
@@ -1223,7 +1223,7 @@ public:
Address allocate_metadata_address(Metadata* obj);
Address constant_oop_address(jobject obj);
void movoop(Register dst, jobject obj, bool immediate = false);
void movoop(Register dst, jobject obj);
// CRC32 code for java.util.zip.CRC32::updateBytes() intrinsic.
void kernel_crc32(Register crc, Register buf, Register len,

View File

@@ -231,27 +231,27 @@ public:
br(Assembler::EQ, _rounds_52);
}
break;
case 2: aes_round(_data, _subkeys + 0); break;
case 3: aes_round(_data, _subkeys + 1); break;
case 2: aes_round(_data, as_FloatRegister(_subkeys->encoding() + 0)); break;
case 3: aes_round(_data, as_FloatRegister(_subkeys->encoding() + 1)); break;
case 4:
if (_once) bind(_rounds_52);
break;
case 5: aes_round(_data, _subkeys + 2); break;
case 6: aes_round(_data, _subkeys + 3); break;
case 5: aes_round(_data, as_FloatRegister(_subkeys->encoding() + 2)); break;
case 6: aes_round(_data, as_FloatRegister(_subkeys->encoding() + 3)); break;
case 7:
if (_once) bind(_rounds_44);
break;
case 8: aes_round(_data, _subkeys + 4); break;
case 9: aes_round(_data, _subkeys + 5); break;
case 10: aes_round(_data, _subkeys + 6); break;
case 11: aes_round(_data, _subkeys + 7); break;
case 12: aes_round(_data, _subkeys + 8); break;
case 13: aes_round(_data, _subkeys + 9); break;
case 14: aes_round(_data, _subkeys + 10); break;
case 15: aes_round(_data, _subkeys + 11); break;
case 16: aes_round(_data, _subkeys + 12); break;
case 17: aese(_data, _subkeys + 13); break;
case 18: eor(_data, T16B, _data, _subkeys + 14); break;
case 8: aes_round(_data, as_FloatRegister(_subkeys->encoding() + 4)); break;
case 9: aes_round(_data, as_FloatRegister(_subkeys->encoding() + 5)); break;
case 10: aes_round(_data, as_FloatRegister(_subkeys->encoding() + 6)); break;
case 11: aes_round(_data, as_FloatRegister(_subkeys->encoding() + 7)); break;
case 12: aes_round(_data, as_FloatRegister(_subkeys->encoding() + 8)); break;
case 13: aes_round(_data, as_FloatRegister(_subkeys->encoding() + 9)); break;
case 14: aes_round(_data, as_FloatRegister(_subkeys->encoding() + 10)); break;
case 15: aes_round(_data, as_FloatRegister(_subkeys->encoding() + 11)); break;
case 16: aes_round(_data, as_FloatRegister(_subkeys->encoding() + 12)); break;
case 17: aese(_data, as_FloatRegister(_subkeys->encoding() + 13)); break;
case 18: eor(_data, T16B, _data, as_FloatRegister(_subkeys->encoding() + 14)); break;
case 19:
if (_to != noreg) {
st1(_data, T16B, _to);
@@ -264,7 +264,7 @@ public:
virtual KernelGenerator *next() {
return new AESKernelGenerator(this, _unrolls,
_from, _to, _keylen,
_data + 1, _subkeys, /*once*/false);
_data->successor(), _subkeys, /*once*/false);
}
virtual int length() { return 20; }
@@ -409,14 +409,14 @@ public:
}
}
virtual KernelGenerator *next() {
GHASHMultiplyGenerator *result = new GHASHMultiplyGenerator(*this);
result->_result_lo += register_stride;
result->_result_hi += register_stride;
result->_b += register_stride;
result->_tmp1 += register_stride;
result->_tmp2 += register_stride;
result->_tmp3 += register_stride;
virtual KernelGenerator* next() {
GHASHMultiplyGenerator* result = new GHASHMultiplyGenerator(*this);
result->_result_lo = as_FloatRegister(result->_result_lo->encoding() + register_stride);
result->_result_hi = as_FloatRegister(result->_result_hi->encoding() + register_stride);
result->_b = as_FloatRegister(result->_b ->encoding() + register_stride);
result->_tmp1 = as_FloatRegister(result->_tmp1 ->encoding() + register_stride);
result->_tmp2 = as_FloatRegister(result->_tmp2 ->encoding() + register_stride);
result->_tmp3 = as_FloatRegister(result->_tmp3 ->encoding() + register_stride);
return result;
}
@@ -477,17 +477,17 @@ public:
if (_data->is_valid() && _once) {
assert(length() >= unrolls(), "not enough room for inteleaved loads");
if (index < unrolls()) {
ld1((_data + index*register_stride), T16B, post(r2, 0x10));
ld1(as_FloatRegister(_data->encoding() + index*register_stride), T16B, post(r2, 0x10));
}
}
}
virtual KernelGenerator *next() {
GHASHReduceGenerator *result = new GHASHReduceGenerator(*this);
result->_result += register_stride;
result->_hi += register_stride;
result->_lo += register_stride;
result->_t1 += register_stride;
result->_result = as_FloatRegister(result->_result->encoding() + register_stride);
result->_hi = as_FloatRegister(result->_hi ->encoding() + register_stride);
result->_lo = as_FloatRegister(result->_lo ->encoding() + register_stride);
result->_t1 = as_FloatRegister(result->_t1 ->encoding() + register_stride);
result->_once = false;
return result;
}
@@ -582,7 +582,8 @@ void MacroAssembler::ghash_processBlocks_wide(address field_polynomial, Register
// v0 contains the initial state. Clear the others.
for (int i = 1; i < unrolls; i++) {
int ofs = register_stride * i;
eor(ofs+v0, T16B, ofs+v0, ofs+v0); // zero each state register
FloatRegister v0_ofs = as_FloatRegister(v0->encoding() + ofs);
eor(v0_ofs, T16B, v0_ofs, v0_ofs); // zero each state register
}
ext(a1_xor_a0, T16B, Hprime, Hprime, 0x08); // long-swap subkeyH into a1_xor_a0
@@ -590,7 +591,8 @@ void MacroAssembler::ghash_processBlocks_wide(address field_polynomial, Register
// Load #unrolls blocks of data
for (int ofs = 0; ofs < unrolls * register_stride; ofs += register_stride) {
ld1(v2+ofs, T16B, post(data, 0x10));
FloatRegister v2_ofs = as_FloatRegister(v2->encoding() + ofs);
ld1(v2_ofs, T16B, post(data, 0x10));
}
// Register assignments, replicated across 4 clones, v0 ... v23
@@ -623,8 +625,10 @@ void MacroAssembler::ghash_processBlocks_wide(address field_polynomial, Register
// Xor data into current state
for (int ofs = 0; ofs < unrolls * register_stride; ofs += register_stride) {
rbit((v2+ofs), T16B, (v2+ofs));
eor((v2+ofs), T16B, v0+ofs, (v2+ofs)); // bit-swapped data ^ bit-swapped state
FloatRegister v0_ofs = as_FloatRegister(v0->encoding() + ofs);
FloatRegister v2_ofs = as_FloatRegister(v2->encoding() + ofs);
rbit(v2_ofs, T16B, v2_ofs);
eor(v2_ofs, T16B, v0_ofs, v2_ofs); // bit-swapped data ^ bit-swapped state
}
// Generate fully-unrolled multiply-reduce in two stages.
@@ -651,24 +655,31 @@ void MacroAssembler::ghash_processBlocks_wide(address field_polynomial, Register
// First, we multiply/reduce each clone by the appropriate power of H.
for (int i = 0; i < unrolls; i++) {
int ofs = register_stride * i;
FloatRegister v0_ofs = as_FloatRegister(v0->encoding() + ofs);
FloatRegister v1_ofs = as_FloatRegister(v1->encoding() + ofs);
FloatRegister v2_ofs = as_FloatRegister(v2->encoding() + ofs);
FloatRegister v3_ofs = as_FloatRegister(v3->encoding() + ofs);
FloatRegister v4_ofs = as_FloatRegister(v4->encoding() + ofs);
FloatRegister v5_ofs = as_FloatRegister(v5->encoding() + ofs);
ldrq(Hprime, Address(subkeyH, 16 * (unrolls - i - 1)));
rbit(v2+ofs, T16B, v2+ofs);
eor(v2+ofs, T16B, ofs+v0, v2+ofs); // bit-swapped data ^ bit-swapped state
rbit(v2_ofs, T16B, v2_ofs);
eor(v2_ofs, T16B, v0_ofs, v2_ofs); // bit-swapped data ^ bit-swapped state
rev64(Hprime, T16B, Hprime);
rbit(Hprime, T16B, Hprime);
ext(a1_xor_a0, T16B, Hprime, Hprime, 0x08); // long-swap subkeyH into a1_xor_a0
eor(a1_xor_a0, T16B, a1_xor_a0, Hprime); // xor subkeyH into subkeyL (Karatsuba: (A1+A0))
ghash_modmul(/*result*/v0+ofs, /*result_lo*/v5+ofs, /*result_hi*/v4+ofs, /*b*/v2+ofs,
ghash_modmul(/*result*/v0_ofs, /*result_lo*/v5_ofs, /*result_hi*/v4_ofs, /*b*/v2_ofs,
Hprime, vzr, a1_xor_a0, p,
/*temps*/v1+ofs, v3+ofs, /* reuse b*/v2+ofs);
/*temps*/v1_ofs, v3_ofs, /* reuse b*/v2_ofs);
}
// Then we sum the results.
for (int i = 0; i < unrolls - 1; i++) {
int ofs = register_stride * i;
eor(v0, T16B, v0, v0 + register_stride + ofs);
for (int i = 1; i < unrolls; i++) {
FloatRegister v0_ofs = as_FloatRegister(v0->encoding() + register_stride * i);
eor(v0, T16B, v0, v0_ofs);
}
sub(blocks, blocks, (unsigned char)unrolls);

View File

@@ -160,7 +160,7 @@ address NativeCall::destination() const {
address destination = instruction_address() + displacement();
// Do we use a trampoline stub for this call?
CodeBlob* cb = CodeCache::find_blob_unsafe(addr); // Else we get assertion if nmethod is zombie.
CodeBlob* cb = CodeCache::find_blob(addr);
assert(cb && cb->is_nmethod(), "sanity");
nmethod *nm = (nmethod *)cb;
if (nm->stub_contains(destination) && is_NativeCallTrampolineStub_at(destination)) {
@@ -456,7 +456,7 @@ bool NativeInstruction::is_movk() {
return Instruction_aarch64::extract(int_at(0), 30, 23) == 0b11100101;
}
bool NativeInstruction::is_sigill_zombie_not_entrant() {
bool NativeInstruction::is_sigill_not_entrant() {
return uint_at(0) == 0xd4bbd5a1; // dcps1 #0xdead
}
@@ -471,13 +471,13 @@ bool NativeInstruction::is_stop() {
//-------------------------------------------------------------------
// MT-safe inserting of a jump over a jump or a nop (used by
// nmethod::make_not_entrant_or_zombie)
// nmethod::make_not_entrant)
void NativeJump::patch_verified_entry(address entry, address verified_entry, address dest) {
assert(dest == SharedRuntime::get_handle_wrong_method_stub(), "expected fixed destination of patch");
assert(nativeInstruction_at(verified_entry)->is_jump_or_nop()
|| nativeInstruction_at(verified_entry)->is_sigill_zombie_not_entrant(),
|| nativeInstruction_at(verified_entry)->is_sigill_not_entrant(),
"Aarch64 cannot replace non-jump with jump");
// Patch this nmethod atomically.
@@ -488,8 +488,7 @@ void NativeJump::patch_verified_entry(address entry, address verified_entry, add
unsigned int insn = (0b000101 << 26) | ((disp >> 2) & 0x3ffffff);
*(unsigned int*)verified_entry = insn;
} else {
// We use an illegal instruction for marking a method as
// not_entrant or zombie.
// We use an illegal instruction for marking a method as not_entrant.
NativeIllegalInstruction::insert(verified_entry);
}

View File

@@ -79,7 +79,7 @@ public:
bool is_safepoint_poll();
bool is_movz();
bool is_movk();
bool is_sigill_zombie_not_entrant();
bool is_sigill_not_entrant();
bool is_stop();
protected:

View File

@@ -34,7 +34,7 @@ address RegisterMap::pd_location(VMReg base_reg, int slot_idx) const {
// the upper slots by offsetting from the base address.
assert(base_reg->is_concrete(), "must pass base reg");
int base_reg_enc = (base_reg->value() - ConcreteRegisterImpl::max_gpr) /
FloatRegisterImpl::max_slots_per_register;
FloatRegister::max_slots_per_register;
intptr_t offset_in_bytes = slot_idx * VMRegImpl::stack_slot_size;
address base_location = location(base_reg, nullptr);
if (base_location != NULL) {

View File

@@ -26,45 +26,36 @@
#include "precompiled.hpp"
#include "register_aarch64.hpp"
REGISTER_IMPL_DEFINITION(Register, RegisterImpl, RegisterImpl::number_of_declared_registers);
REGISTER_IMPL_DEFINITION(FloatRegister, FloatRegisterImpl, FloatRegisterImpl::number_of_registers);
REGISTER_IMPL_DEFINITION(PRegister, PRegisterImpl, PRegisterImpl::number_of_registers);
Register::RegisterImpl all_RegisterImpls [Register::number_of_declared_registers + 1];
FloatRegister::FloatRegisterImpl all_FloatRegisterImpls[FloatRegister::number_of_registers + 1];
PRegister::PRegisterImpl all_PRegisterImpls [PRegister::number_of_registers + 1];
const int ConcreteRegisterImpl::max_gpr = RegisterImpl::number_of_registers *
RegisterImpl::max_slots_per_register;
const int ConcreteRegisterImpl::max_fpr
= ConcreteRegisterImpl::max_gpr +
FloatRegisterImpl::number_of_registers * FloatRegisterImpl::max_slots_per_register;
const int ConcreteRegisterImpl::max_pr
= ConcreteRegisterImpl::max_fpr +
PRegisterImpl::number_of_registers * PRegisterImpl::max_slots_per_register;
const char* RegisterImpl::name() const {
static const char *const names[number_of_registers] = {
const char* Register::RegisterImpl::name() const {
static const char *const names[number_of_declared_registers + 1] = {
"noreg",
"c_rarg0", "c_rarg1", "c_rarg2", "c_rarg3", "c_rarg4", "c_rarg5", "c_rarg6", "c_rarg7",
"rscratch1", "rscratch2", "r10", "r11", "r12", "r13", "r14", "r15",
"r16", "r17", "r18_tls", "r19", "resp", "rdispatch", "rbcp", "r23",
"rlocals", "r25", "rcpool", "rheapbase", "rthread", "rfp", "lr", "sp"
"rlocals", "r25", "rcpool", "rheapbase", "rthread", "rfp", "lr", "r31_sp",
"zp", "sp"
};
return is_valid() ? names[encoding()] : "noreg";
return names[raw_encoding() + 1];
}
const char* FloatRegisterImpl::name() const {
const char* FloatRegister::FloatRegisterImpl::name() const {
static const char *const names[number_of_registers] = {
"v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7",
"v8", "v9", "v10", "v11", "v12", "v13", "v14", "v15",
"v16", "v17", "v18", "v19", "v20", "v21", "v22", "v23",
"v24", "v25", "v26", "v27", "v28", "v29", "v30", "v31"
};
return is_valid() ? names[encoding()] : "noreg";
return is_valid() ? names[encoding()] : "fnoreg";
}
const char* PRegisterImpl::name() const {
const char* PRegister::PRegisterImpl::name() const {
static const char *const names[number_of_registers] = {
"p0", "p1", "p2", "p3", "p4", "p5", "p6", "p7",
"p8", "p9", "p10", "p11", "p12", "p13", "p14", "p15"
};
return is_valid() ? names[encoding()] : "noreg";
return is_valid() ? names[encoding()] : "pnoreg";
}

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