Compare commits

...

403 Commits

Author SHA1 Message Date
Ludovic Henry
6af643e5a1 8248657: Windows: strengthening in ThreadCritical regarding memory model
Reviewed-by: dholmes, kbarrett, aph, stuefe
2020-07-29 10:38:28 +02:00
Aleksey Shipilev
3349e10b7f 8250612: jvmciCompilerToVM.cpp declares jio_printf with "void" return type, should be "int"
Reviewed-by: thartmann, kvn
2020-07-29 09:48:08 +02:00
Andrei Pangin
a72a8984a9 8249719: MethodHandle performance suffers from bad ResolvedMethodTable hash function
Reviewed-by: simonis, stuefe, coleenp
2020-07-24 15:33:38 +03:00
Mikael Vidstedt
25d1305f7e Merge 2020-07-28 22:37:23 -07:00
Chris Plummer
76baa501fa 8250742: ProblemList serviceability/sa/ClhsdbPstack.java #id0 and #id1 for ZGC
Reviewed-by: sspitsyn
2020-07-28 16:41:07 -07:00
Joe Wang
64d130efc4 8249643: Clarify DOM documentation
Reviewed-by: lancea
2020-07-28 23:29:33 +00:00
Joe Darcy
77a10a182f 8250580: Address reliance on default constructors in java.rmi
Reviewed-by: smarks
2020-07-28 16:26:28 -07:00
Igor Ignatyev
0b42b1cf15 8250739: remove Compile::Generate_*_Graph methods declarations
Reviewed-by: kvn
2020-07-28 15:31:10 -07:00
Igor Ignatyev
f4301530b4 8250738: C2Compiler::is_intrinsic_supported(methodHandle&, bool) shouldn't be virtual
Reviewed-by: xliu, kvn
2020-07-28 15:31:09 -07:00
Harold Seigel
99ae9558fe 8250562: Clean up weird comment in vmTestbase class Terminator.java
Delete the weird comment.

Reviewed-by: lfoltan
2020-07-28 20:14:01 +00:00
Chris Plummer
816a7060ba 8248882: SA PMap and PStack support on OSX works with core files. Enable them
Reviewed-by: sspitsyn, amenkov
2020-07-28 12:04:58 -07:00
Chris Plummer
ab729d7075 8247515: OSX pc_to_symbol() lookup does not work with core files
Reviewed-by: sspitsyn, kevinw
2020-07-28 09:52:07 -07:00
Joe Darcy
1a5ef6606f 8249219: Update --release 15 symbol information for JDK 15 build 33
Reviewed-by: jlahoda
2020-07-28 09:25:23 -07:00
Joe Darcy
8a9675663f 8250640: Address reliance on default constructors in jdk.jdi
Reviewed-by: alanb
2020-07-28 09:21:04 -07:00
Christian Hagedorn
31368cd1f0 8249602: C2: assert(cnt == _outcnt) failed: no insertions allowed
Use DUIterator instead of DUIterator_Fast due to legit insertions.

Reviewed-by: kvn, thartmann
2020-07-28 16:05:30 +02:00
Coleen Phillimore
aff80ee900 8250589: Move Universe::_reference_pending_list into OopHandle
Use synchronization to reference the _reference_pending_list with OopHandle

Reviewed-by: shade, kbarrett, dholmes, eosterlund
2020-07-28 08:10:43 -04:00
Coleen Phillimore
42ac8e1856 8250042: Clean up methodOop and method_oop names from the code
Reviewed-by: dholmes, sspitsyn, cjplummer, chagedorn
2020-07-28 07:33:51 -04:00
Nick Gasson
0ebcf5c59d 8237483: AArch64 C1 OopMap inserted twice fatal error
Reviewed-by: aph
2020-07-28 16:50:32 +08:00
Aleksey Shipilev
5b99c6ae1f 8250605: Linux x86_32 builds fail after JDK-8249821
Reviewed-by: erikj, prr
2020-07-28 09:05:36 +02:00
Mikael Vidstedt
e7289aa4d4 Merge 2020-07-27 22:26:00 -07:00
Kim Barrett
188ad9714d 8247976: Update HotSpot Style Guide for C++14 adoption
Update and move style guide from wiki to jdk repo.

Reviewed-by: jrose, stefank, dholmes, mikael, stuefe, kvn
2020-07-27 22:19:33 -04:00
Jamil Nimeh
2aa291ad2c 8247630: Use two key share entries
Reviewed-by: xuelei
2020-07-27 18:20:57 -07:00
Doug Simon
f2e69156c8 8250556: revert JVMCI part of JDK-8230395
Reviewed-by: never, dholmes
2020-07-27 22:59:27 +02:00
Daniil Titov
277ec3d260 8216324: GetClassMethods is confused by the presence of default methods in super interfaces
Reviewed-by: sspitsyn, amenkov
2020-07-27 11:34:19 -07:00
Joe Darcy
ed7f796494 8250213: Address use of default constructors in com.sun.source.util
Reviewed-by: jjg
2020-07-27 11:07:30 -07:00
Patric Hedlin
761a92d7c9 8247766: [aarch64] guarantee(val < (1U << nbits)) failed: Field too big for insn
Reviewed-by: neliasso, aph
2020-07-27 10:56:51 +02:00
Martin Balao
31753ef9bf 8250582: Revert Principal Name type to NT-UNKNOWN when requesting TGS Kerberos tickets
Reviewed-by: weijun
2020-07-25 01:02:51 -03:00
Vicente Romero
6c2ff1781b 8249829: javac is issuing an incorrect static access error
Reviewed-by: jlahoda
2020-07-27 10:12:30 -04:00
Albert Yang
af8c3b4a7e 8242036: G1 HeapRegionRemSet::_n_coarse_entries could be a bool
Reviewed-by: kbarrett, eosterlund, tschatzl, lkorinth
2020-07-27 12:59:32 +02:00
Christian Hagedorn
417e8e449d 8248552: C2 crashes with SIGFPE due to division by zero
Bail out in PhaseIdealLoop:split_thru_phi when trying to split a Div or ModNode iv phi whose zero check was removed but could potentially still be zero based on type information.

Reviewed-by: kvn, thartmann
2020-07-27 11:03:17 +02:00
Yasumasa Suenaga
f84b5d2f80 8248362: JVMTI frame operations should use Thread-Local Handshake
Reviewed-by: sspitsyn, dholmes, dcubed
2020-07-27 15:49:53 +09:00
David Holmes
3dba35d248 8247296: Optimize JVM_GetDeclaringClass
Co-authored-by: Christoph Dreis <christoph.dreis@freenet.de>
Reviewed-by: shade, minqi
2020-07-26 20:29:42 -04:00
Ioi Lam
112bbcb396 8249087: Always initialize _body[0..1] in Symbol constructor
Reviewed-by: dholmes, lfoltan
2020-07-24 13:56:45 -07:00
Prasanta Sadhukhan
831e98327b Merge 2020-07-26 14:46:36 +05:30
Joe Darcy
dfd3080c05 8250583: Address reliance on default constructors in java.management
Reviewed-by: alanb
2020-07-25 12:49:09 -07:00
Prasanta Sadhukhan
091b0c95c3 Merge 2020-07-25 12:48:29 +05:30
Doug Simon
41eaa00eed 8250548: libgraal can deadlock in -Xcomp mode
Reviewed-by: never, kvn
2020-07-25 08:41:51 +02:00
Aleksei Voitylov
5a365e8627 8248239: jpackage adds some arguments twice in case it is re-executed by JLI
Reviewed-by: herrick, almatvee
2020-07-24 19:54:01 -04:00
Joe Darcy
c0b9999c35 8250578: Address reliance on default constructors in javax.sql
Reviewed-by: lancea
2020-07-25 09:46:08 -07:00
Joe Darcy
0e54ce2a8e 8250244: Address reliance on default constructors in java.net
Reviewed-by: alanb, vtewari
2020-07-25 09:42:45 -07:00
Coleen Phillimore
ac4dc0470e 8250519: [REDO] Move mirror oops from Universe into OopStorage
Redo the patch but add a null pointer check where one belongs.

Reviewed-by: dcubed, iklam, dholmes
2020-07-25 10:36:19 -04:00
Hai-May Chao
cce3929e07 8247960: jarsigner says "signer errors" for some normal warnings when -strict is set
8250586: jarsigner refactoring in displayMessagesAndResult() method

Reviewed-by: weijun
2020-07-25 16:40:10 +08:00
Alexander Matveev
bbddae5552 8248248: [macos] EmptyFolderPackageTest.java fails EmptyFolderPackageTest-dmg-setup.scpt exited with 134 code
Reviewed-by: herrick, asemenyuk
2020-07-24 16:46:18 -07:00
Joe Darcy
5db58348f8 8250246: Address reliance on default constructors in security libs
Reviewed-by: mullan
2020-07-24 13:49:38 -07:00
Harold Seigel
9b73fb125d 8250557: Rename vmTestbase/nsk shared timeout handler package to Terminator.java
Rename the class and fix the tests that use it.

Reviewed-by: dcubed
2020-07-24 18:44:27 +00:00
Yumin Qi
4b076cb93f 8249624: update appcds/sharedStrings/IncompatibleOptions test in view of 8081416 closed as WNF
With CDS can archive with compressed oops off, the result of the test gives correct information.

Reviewed-by: iklam, dholmes
2020-07-24 10:29:27 -07:00
Roger Riggs
a0149f53f1 8249217: Unexpected StackOverflowError in "process reaper" thread still happens
Reviewed-by: martin, plevart, dholmes
2020-07-24 11:00:50 -04:00
Coleen Phillimore
e6875c9bac Merge 2020-07-24 10:51:38 -04:00
Vicente Romero
75d642a467 8243057: compilation of annotated static record fields fails with NPE
Reviewed-by: jlahoda
2020-07-24 10:34:18 -04:00
Coleen Phillimore
cbf6894299 8250516: [BACKOUT] Move mirror oops from Universe into OopStorage
Reviewed-by: dholmes, tschatzl
2020-07-24 10:34:11 -04:00
Boris Ulasevich
77c4adbeb5 8249189: AARCH64: more L2I conversions can be skipped
Reviewed-by: aph
2020-07-24 09:07:10 -04:00
Harold Seigel
890ca6ea2c 8222582: [TESTBUG] AbstractMethodErrorTest.java fails with "did not test both cases (interpreted and compiled)."
Exclude the test from running with Graal

Reviewed-by: dholmes, coleenp
2020-07-24 12:40:41 +00:00
Coleen Phillimore
bd12e85975 8249938: Move mirror oops from Universe into OopStorage
Save and restore mirror oops to temporary array for CDS, and move them to OopStorage once restored.

Reviewed-by: iklam, dholmes
2020-07-24 08:32:27 -04:00
Boris Ulasevich
4a1d4be729 8248870: AARCH64: I2L/L2I conversions can be skipped for masked positive values
Reviewed-by: aph
2020-07-24 08:21:11 -04:00
Michael McMahon
f79b7e62db Merge 2020-07-24 12:49:33 +01:00
Coleen Phillimore
c63911b33b 8249822: SymbolPropertyTable creates an extra OopHandle per entry
Add an assert to OopHandle assigment operator to catch leaking OopHandles, and fix code accordingly.

Reviewed-by: sspitsyn, eosterlund, dholmes
2020-07-24 07:45:38 -04:00
Rahul Yadav
778d8a45cb 8245306: Update sun.security.ssl.SSLLogger to use Immutable DateTimeFormatter
The fix updates sun.security.ssl.SSLLogger to use DateTimeFormatter to make it virtual thread friendly

Reviewed-by: alanb, jnimeh
2020-07-24 12:07:59 +01:00
Kim Barrett
8b005fa74e 8249945: Improve ARRAY_SIZE()
Make ARRAY_SIZE type-safe.

Reviewed-by: tschatzl, lfoltan, dholmes
2020-07-24 05:07:37 -04:00
Monica Beckwith
26680f0c1a 8248668: AArch64: Avoid MIN/MAX macros when using MSVC
MSVC employs min/max as macros

Co-authored-by: Ludovic Henry <luhenry@microsoft.com>
Reviewed-by: tschatzl, kbarrett
2020-07-24 11:16:08 +02:00
Cesar Soares Lucas
eaeb43542b 8249225: Move definition of PADDING_ELEM_NUM
Reviewed-by: tschatzl, kbarrett
2020-07-24 11:16:05 +02:00
Nick Gasson
22006dceb4 8249781: AArch64: AOT compiled code crashes if C2 allocates r27
Reviewed-by: aph
2020-07-24 11:28:28 +08:00
Kim Barrett
df923ff2fb 8249944: Move and improve the AllStatic class
Move AllStatic to it's own standalone file, and use C++11 deleted functions

Reviewed-by: dholmes, stuefe
2020-07-24 04:43:08 -04:00
Kim Barrett
55b19e84f2 8247908: Replace IsRegisteredEnum with std::is_enum
Reviewed-by: tschatzl, dholmes
2020-07-24 04:29:34 -04:00
Joe Darcy
0ef80293f9 8250240: Address use of default constructors in the java.util.concurrent
Reviewed-by: martin, lancea
2020-07-23 22:50:12 -07:00
David Holmes
1f91e0ebe3 8194309: JNI handle allocation failure not reported correctly
Reviewed-by: kbarrett, coleenp
2020-07-23 21:46:39 -04:00
Stuart Monteith
e427697e55 8246373: AArch64: Refactor register spilling code in ZGC barriers
Tidy up code spilling registers, reduce in some cases.

Reviewed-by: aph, eosterlund
2020-07-24 09:00:40 +08:00
Joe Darcy
5c8a154e93 8250237: Address use of default constructors in the javax.script package
Reviewed-by: lancea, psandoz
2020-07-23 15:13:08 -07:00
Daniel D. Daugherty
2abefad512 8250236: ProblemList java/lang/invoke/lambda/LambdaFileEncodingSerialization.java on linux-x64
Reviewed-by: rriggs
2020-07-23 16:36:44 -04:00
Daniel Fuchs
9f23c2c159 8249812: java/net/DatagramSocket/PortUnreachable.java still fails intermittently with SocketTimeoutException
Fixed the test to reenable its retry logic

Reviewed-by: alanb
2020-07-23 20:25:41 +01:00
Thomas Schatzl
6d665ed31f 8249192: MonitorInfo stores raw oops across safepoints
Change raw oops in MonitorInfo to Handles and update Resource/HandleMarks.

Reviewed-by: sspitsyn, dholmes, coleenp, dcubed
2020-07-23 21:10:52 +02:00
Joe Darcy
bb6647c845 8250221: Address use of default constructors in java.logging
Reviewed-by: lancea
2020-07-23 11:26:23 -07:00
Robert Field
6e198fec0b 8249197: JShell: variable declaration with unicode type name gets garbled result
8249199: JShell: Consistent representation of unicode

Reviewed-by: jlahoda
2020-07-23 10:37:06 -07:00
Calvin Cheung
5088193336 8249630: unused is_static_archive parameter in SystemDictionaryShared::write_dictionary
Reviewed-by: minqi, dholmes
2020-07-23 16:52:08 +00:00
Aleksei Voitylov
8b87402a44 8247592: refactor test/jdk/tools/launcher/Test7029048.java
Reviewed-by: mchung
2020-07-23 09:43:55 -07:00
Naoto Sato
1f63603288 8248655: Support supplementary characters in String case insensitive operations
8248434: some newly added locale cannot parse uppercased date string

Reviewed-by: jlaskey, joehw, rriggs, bchristi
2020-07-23 08:46:31 -07:00
Aleksey Shipilev
dc80e63811 8249953: Shenandoah: gc/shenandoah/mxbeans tests should account for corner cases
Reviewed-by: rkennke
2020-07-23 12:46:24 +02:00
Doug Simon
63d2421c3b 8249888: failure to create a libgraal JavaVM should result in a VM crash
Reviewed-by: never, kvn
2020-07-23 11:47:20 +02:00
Alexander Scherbatiy
993b1b0afa 8249612: Remove unused ISNANF and ISNAND from jdk_util_md.h
Reviewed-by: darcy
2020-07-23 11:39:56 +03:00
Phil Race
b1ff2bd00a 8249821: Separate libharfbuzz from libfontmanager
Reviewed-by: erikj
2020-07-22 07:46:50 -07:00
Bernhard Urban-Forster
2f8653fbf0 8248666: AArch64: Use THREAD_LOCAL instead of __thread
__thread is gcc-ism, instead rely on compiler independent macro.

Reviewed-by: dholmes
2020-07-22 15:03:50 +02:00
David Holmes
1b1c1cd7b9 8249940: Remove unnecessary includes of jni_util.h in native tests
Reviewed-by: iignatyev, mchung
2020-07-23 00:47:02 -04:00
Yasumasa Suenaga
401d3ea9bc 8249875: GCC 10 warnings -Wtype-limits with JFR code
Reviewed-by: mgronlun
2020-07-23 12:19:59 +09:00
Mikael Vidstedt
9cf96bf398 Merge 2020-07-22 19:45:45 -07:00
Mikael Vidstedt
668acc7581 Added tag jdk-16+7 for changeset c3a4a7ea7c30 2020-07-22 19:20:42 -07:00
Alexander Matveev
f8a06bc497 8245311: [macos] misc package tests failed due to "execution error: Finder got an error: AppleEvent timed out."
Reviewed-by: herrick, asemenyuk
2020-07-22 14:19:01 -07:00
Bob Vandette
a764279daa 8249880: JVMCI calling register_nmethod without CodeCache lock
Reviewed-by: eosterlund, kvn, never
2020-07-22 17:59:33 +00:00
Roman Kennke
9b42f4786c 8249884: Shenandoah: Call report_num_dead() from ShParallelWeakRootsCleaningTask destructor
Reviewed-by: zgu
2020-07-22 17:08:01 +02:00
Coleen Phillimore
2d8e74ddea 8249768: Move static oops and NullPointerException oops from Universe into OopStorage
Make NPE oops an objArrayOop.

Reviewed-by: dholmes, eosterlund
2020-07-22 10:32:44 -04:00
Raffaello Giulietti
4d43cf9fc6 8222187: java.util.Base64.Decoder stream adds unexpected null bytes at the end
Reviewed-by: lancea, rriggs
2020-07-22 10:01:03 -04:00
Roman Kennke
45e17d8dd2 8249877: Shenandoah: Report number of dead weak oops during STW weak roots
Reviewed-by: zgu
2020-07-22 15:16:57 +02:00
Christian Hagedorn
18cf3d8080 8247743: Segmentation fault in debug builds due to stack overflow in find_recur with deep graphs
Replace the recursive algorithm of Node::find() by an iterative one to avoid a stack overflow crash with deep graphs.

Reviewed-by: kvn, thartmann
2020-07-22 10:31:37 +02:00
Christian Hagedorn
4f99e1fb11 8248467: C2: compiler/intrinsics/object/TestClone fails with -XX:+VerifyGraphEdges
Fix assert by taking MemBarNodes into account whose precedence edge can be NULL.

Reviewed-by: kvn, thartmann
2020-07-22 10:28:34 +02:00
David Holmes
73c75ed838 8249650: Optimize JNIHandle::make_local thread variable usage
Reviewed-by: kbarrett, dcubed, kvn, coleenp, sspitsyn
2020-07-22 01:27:08 -04:00
Kim Barrett
2a8f92e7e7 8246032: Implementation of JEP 347: Enable C++14 Language Features
Update build configuration to use C++14

Reviewed-by: jlaskey, mdoerr, ihse, erikj
2020-07-22 00:13:53 -04:00
Bernhard Urban-Forster
dff37f89c5 8248671: AArch64: Remove unused variables
Remove unused variables in the AArch64 backend. Detected by compiling with MSVC, which warns about them.

Reviewed-by: aph, dholmes
2020-07-21 10:32:52 -04:00
Mikael Vidstedt
9ff01f7b2f Merge 2020-07-21 20:55:29 -07:00
Igor Ignatyev
f8c1d79917 8249697: remove temporary fixes from java/lang/invoke/RicochetTest.java
Reviewed-by: mchung
2020-07-20 12:16:35 -07:00
Vladimir A Ivanov
cd98f7d5bf 8249672: Include microcode revision in features_string on x86
Reviewed-by: kvn, stuefe
2020-07-21 13:06:45 -07:00
Roman Kennke
006d0bcec1 8249801: Shenandoah: Clear soft-refs on requested GC cycle
Reviewed-by: shade
2020-07-21 17:27:44 +02:00
Thomas Stuefe
a20c31865d 8249748: gtest silently ignores bad jvm arguments
Reviewed-by: shade, dholmes, iignatyev
2020-07-21 16:46:37 +02:00
Daniel Fuchs
d116022893 8249774: Add java/foreign/TestMismatch.java to ProblemList.txt
Reviewed-by: lancea
2020-07-20 20:33:59 +01:00
Mandy Chung
35554ea085 8217527: jmod hash does not work if --hash-module does not include the target module
Reviewed-by: alanb
2020-07-20 11:40:03 -07:00
Vicente Romero
3a69dfb5c5 8245652: some tests at RecordCompilationTests are resetting the wrong compilation options
Reviewed-by: darcy
2020-07-20 12:14:44 -04:00
Coleen Phillimore
6ee76b6b05 8249760: Unnecessary #include oopStorageSet
Reviewed-by: hseigel
2020-07-20 10:53:29 -04:00
Matthias Baesken
3e641b796f 8249588: libwindowsaccessbridge issues on 64bit Windows
Reviewed-by: arapte, prr
2020-07-16 09:52:48 +02:00
Phil Race
631085bdfd Merge 2020-07-21 13:55:53 -07:00
Phil Race
1ce6ec6a28 8199529: javax/swing/text/Utilities/8142966/SwingFontMetricsTest.java fails on windows
Reviewed-by: serb, psadhukhan
2020-07-21 13:14:35 -07:00
Phil Race
3ec5f6b374 8249725: testbug: ZeroWithStringBoundsTest.java needs update to copyright header
Reviewed-by: jdv
2020-07-20 08:13:02 -07:00
Phil Race
ca2df0e543 8245159: Font.getStringBounds() throws IAE for empty string if the Font has layout attributes
Reviewed-by: serb
2020-07-19 11:03:50 -07:00
Prasanta Sadhukhan
df3c55230e 8042055: Nimbus DerivedColor incorrectly clamps hue
Reviewed-by: serb
2020-07-18 12:12:41 +05:30
Prasanta Sadhukhan
c9f9fde366 8245785: javax.swing.JTabbedPane cannot be deserialized
Reviewed-by: serb, prr, kizune
2020-07-18 12:10:35 +05:30
Tejpal Rebari
39d4b22fc0 8249619: Nimbus L&F Fix for 8041701 is causing some Nimbus tests to fail
Reviewed-by: prr
2020-07-17 10:05:38 -07:00
Ambarish Rapte
d11b0078a1 8249278: Revert JDK-8226253 which breaks the spec of AccessibleState.SHOWING for JList
Reviewed-by: prr, serb
2020-07-16 04:47:27 +05:30
Matthias Baesken
7a0914c44c 8248802: Add log helper methods to FontUtilities.java
Reviewed-by: clanger, jdv
2020-07-14 17:02:48 +02:00
Tejpal Rebari
13bcda40dc 8041701: Nimbus JTree renderer properties persist across L&F changes
Reviewed-by: serb, psadhukhan
2020-07-15 11:37:55 +05:30
Tejpal Rebari
54c0178787 8041705: Bugs in DefaultTreeCellRenderer.updateUI()
Reviewed-by: psadhukhan, pbansal
2020-07-09 12:59:25 +05:30
Patric Hedlin
3e0dc68883 8248901: Signed immediate support in .../share/assembler.hpp is broken
Reviewed-by: neliasso, kvn, thartmann
2020-07-06 21:29:51 +02:00
Chihiro Ito
ba2caf0014 8249720: Generated bytecodes of EventWriter don't be output to the log
Reviewed-by: egahlin
2020-07-20 22:43:28 +09:00
Yu Li
907719baec 8245694: java.util.Properties.entrySet() does not override Object methods
Add missing override methods

Reviewed-by: bchristi, jboes
2020-07-20 13:11:09 +01:00
Coleen Phillimore
99eccaf6ec 8247878: Move Management strong oops to OopStorage
Use OopStorage for strong oops stored with memory and thread sampling and dumping, and remove oops_do and GC calls.

Reviewed-by: dholmes, kbarrett
2020-07-20 07:50:27 -04:00
Andrew Haley
c7d84850bf 8248414: AArch64: Remove uses of long and unsigned long ints
Reviewed-by: adinn, dholmes
2020-07-09 11:01:29 -04:00
Mikael Vidstedt
ec074011a4 Merge 2020-07-19 21:34:28 -07:00
Poonam Bajaj
9376dd810c 8236042: [TESTBUG] serviceability/sa/ClhsdbCDSCore.java fails with -Xcomp -XX:TieredStopAtLevel=1
Modify the test case to handle the scenario's of no printmdo's.

Reviewed-by: cjplummer, kvn
2020-07-19 22:39:07 +00:00
Aleksey Shipilev
5d270677f7 8249649: Shenandoah: provide per-cycle pacing stats
Reviewed-by: rkennke
2020-07-19 15:34:08 +02:00
Joe Darcy
b7c307c019 8249687: Use inline @jls and @jvm tages in more places in java.base
Reviewed-by: bpb, mchung, mikael
2020-07-17 17:27:31 -07:00
Joe Darcy
d1d17200c5 8249632: remove no-arg constructor from ToolProvider
Reviewed-by: jjg
2020-07-17 16:38:44 -07:00
Andy Herrick
59cd79a8f9 8247734: [macos] jpackage fails to retrieve signing certificate when there are multiple
Reviewed-by: asemenyuk, almatvee
2020-07-17 10:37:28 -04:00
Jean Christophe Beyler
7339cf8f54 8247615: Initialize the bytes left for the heap sampler
Initialize the heap sampler correctly before usage

Reviewed-by: sspitsyn, martin, manc
2020-07-16 16:58:55 -07:00
Andy Herrick
2f6afe55d8 8249289: Exception thrown when --temp points to non-existant directory
Reviewed-by: asemenyuk, almatvee
2020-07-17 09:18:51 -04:00
Hannes Wallnöfer
e13cb76baa 8249133: Javadoc: Browser back navigation does not jump to previous position anymore
Reviewed-by: jjg
2020-07-17 12:54:12 +02:00
Vyom Tewari
955aee3bfa 8237858: PlainSocketImpl.socketAccept() handles EINTR incorrectly
PlainSocketImpl.socketAccept() handles EINTR incorrectly

Reviewed-by: alanb, dfuchs, martin
2020-07-17 11:15:00 +05:30
Kim Barrett
a8d6a05ce8 8248391: Unify handling of all OopStorage instances in weak root processing
OopStorage instance now owned by subsystems, and generalize dead entry notification

Co-authored-by: Erik Osterlund <erik.osterlund@oracle.com>
Co-authored-by: Stefan Karlsson <stefan.karlsson@oracle.com>
Reviewed-by: coleenp, tschatzl
2020-07-16 17:41:14 -04:00
Albert Yang
55af701cc3 8245030: CardTable::precleaned_card is unused
Reviewed-by: lkorinth, kbarrett
2020-07-16 14:48:38 +02:00
Coleen Phillimore
749be7e761 8247808: Move JVMTI strong oops to OopStorage
Remove JVMTI oops_do calls from JVMTI and GCs

Reviewed-by: sspitsyn, stefank, zgu, dholmes, iklam
2020-07-16 08:29:11 -04:00
Mikael Vidstedt
1f5e21a16e Merge 2020-07-15 21:24:39 -07:00
Mikael Vidstedt
cdc1dc939f Added tag jdk-16+6 for changeset 4a8fd81d64ba 2020-07-15 20:10:13 -07:00
Vicente Romero
bcd4690bc3 8247790: javac shouldn't allow type variable references from local static declarations
Reviewed-by: jlahoda
2020-07-15 22:36:45 -04:00
Chris Plummer
fd206e1e7e 8247272: SA ELF file support has never worked for 64-bit causing address to symbol name mapping to fail
Reviewed-by: sspitsyn, kevinw
2020-07-15 16:54:12 -07:00
Chris Plummer
f1bdd9fca6 8248878: SA: Implement simple workaround for JDK-8248876
Reviewed-by: sspitsyn, ysuenaga
2020-07-15 16:07:24 -07:00
Erik Joelsson
c83ce2e8d9 8249292: DependOnVariable macro fails on empty value
Reviewed-by: tbell
2020-07-15 14:04:54 -07:00
Daniel D. Daugherty
ee1efed55d Merge 2020-07-15 17:13:00 -04:00
Andy Herrick
05bb6f1ec2 8248864: JPackage test extension misspelled "extention"
Reviewed-by: asemenyuk, almatvee, prr
2020-07-15 14:53:05 -04:00
Athijegannathan Sundararajan
2f989d273d 8246113: re-visit javax/script test that still requires jdk.scripting.nashorn module
Reviewed-by: jlaskey
2020-07-15 21:52:56 +05:30
Lance Andersen
023c53d190 8247677: Incorrect class name displayed in DriverManager trace output
Reviewed-by: joehw
2020-07-15 09:19:20 -04:00
Mikael Vidstedt
1982432db4 Merge 2020-07-14 23:29:45 -07:00
Leonid Mesnik
590de670a9 8242891: vmTestbase/nsk/jvmti/ test should be fixed to fail early if JVMTI function return error
Reviewed-by: sspitsyn, cjplummer
2020-07-14 14:31:14 -07:00
Naoto Sato
f8f35d30af 8248695: HostLocaleProviderAdapterImpl provides invalid date-only
Reviewed-by: joehw
2020-07-14 09:30:08 -07:00
Joe Darcy
10e6a6a19a 8248605: Update --release 15 symbol information for JDK 15 build 31
Reviewed-by: jlahoda, jjg
2020-07-14 09:05:50 -07:00
Jesper Wilhelmsson
4922a35c6a Merge 2020-07-03 19:05:00 +02:00
Thomas Schatzl
83fff05498 8248306: gc/stress/gclocker/TestExcessGCLockerCollections.java does not compile
Update the test to use the method suggested in JDK-8244010.

Reviewed-by: kbarrett
2020-07-03 16:32:33 +02:00
Prasanta Sadhukhan
20147c36fe Merge 2020-07-03 18:58:03 +05:30
Nils Eliasson
4506975561 8248398: Add diagnostic RepeatCompilation utility
Reviewed-by: redestad, kvn, thartmann
2020-07-03 11:46:41 +02:00
Rahul Yadav
e2072bba70 8245302: Upgrade LogRecord to support long thread ids and remove its usage of ThreadLocal
Java.util.logging.LogRecord has been updated to use long thread ids instead of int thread id

Reviewed-by: alanb, dfuchs
2020-07-03 10:19:54 +01:00
Prasanta Sadhukhan
396146854b Merge 2020-07-03 09:26:16 +05:30
Chris Plummer
af51a73224 8244383: jhsdb/HeapDumpTestWithActiveProcess.java fails with "AssertionFailure: illegal bci"
Reviewed-by: sspitsyn, dcubed, dtitov
2020-07-02 17:19:16 -07:00
Joe Wang
e0c26b37fd 8248348: Regression caused by the update to BCEL 6.0
Reviewed-by: smarks, plevart
2020-07-03 00:09:45 +00:00
Jesper Wilhelmsson
6b8bf62a75 Merge 2020-07-03 00:14:21 +02:00
Chris Plummer
4858141ce4 8247533: SA stack walking sometimes fails with sun.jvm.hotspot.debugger.DebuggerException: get_thread_regs failed for a lwp
Reviewed-by: sspitsyn, ysuenaga, dtitov
2020-07-02 13:13:10 -07:00
Dean Long
8b7c959164 8247922: Update Graal
Reviewed-by: kvn
2020-07-02 13:03:32 -07:00
Vladimir Kozlov
ec25b42804 8076985: Allocation path: biased locking + compressed oops code quality
Use 64-bit constant class pointer for loading class prototype header.

Reviewed-by: roland
2020-07-02 12:52:49 -07:00
Jonathan Gibbons
579ed70629 8248417: some jdk/javadoc/doclet tests fail (JDK 16)
Reviewed-by: prappo
2020-07-02 11:06:16 -07:00
Vladimir Kempik
78b9de8e40 8248495: [macos] zerovm is broken due to libffi headers location
Reviewed-by: ihse, erikj
2020-07-02 20:33:06 +03:00
Jesper Wilhelmsson
1eaa4116f5 Added tag jdk-16+4 for changeset e2622818f0bd 2020-07-02 18:39:35 +02:00
Doug Simon
4e962f9675 8248321: [JVMCI] improve libgraal logging and fatal error handling
Reviewed-by: kvn, never
2020-07-02 18:02:20 +02:00
Magnus Ihse Bursie
1356a0f1ac 8248667: Need support for building native libraries located in the test/lib directory
Reviewed-by: erikj
2020-07-02 17:35:03 +02:00
Sean Coffey
3d9bad16d1 8218021: Have jarsigner preserve posix permission attributes
Reviewed-by: weijun, lancea, alanb
2020-07-02 08:17:31 +00:00
Thomas Schatzl
dc63bf261b 8248650: [BACKOUT] Backout JDK-8244603 because it generates too much noise in CI
Reviewed-by: kbarrett
2020-07-02 09:40:27 +02:00
Aleksey Shipilev
51937e18f8 8248634: Shenandoah: incorrect include in shenandoahInitLogger.cpp
Reviewed-by: rkennke
2020-07-02 08:32:45 +02:00
Aleksey Shipilev
00e0a60955 8248632: Shenandoah: build fails without both JVMTI and JFR
Reviewed-by: rkennke, zgu
2020-07-02 08:32:39 +02:00
Vyom Tiwari
5fbac4a34c 8244324: RTFEditorKit does not display some of Japanese characters correctly
Reviewed-by: serb, psadhukhan
2020-07-02 09:31:42 +05:30
Prasanta Sadhukhan
911c553cd2 8245921: Minor copy/paste issue in BasicScrollBarUI
Reviewed-by: serb
2020-07-02 09:29:42 +05:30
Prasanta Sadhukhan
c3ec97d41a 8248187: javax/swing/plaf/basic/BasicGraphicsUtils/8132119/bug8132119.java fails with String is not properly drawn
Reviewed-by: serb, pbansal
2020-07-02 09:27:58 +05:30
Jesper Wilhelmsson
43a2010936 Merge 2020-07-02 03:25:23 +02:00
Jesper Wilhelmsson
637fdbc83c Added tag jdk-16+4 for changeset 78c07dd72404 2020-07-02 03:19:33 +02:00
Pankaj Bansal
5699024184 8197560: test javax/swing/JTree/8003400/Test8003400.java fails
Reviewed-by: serb, psadhukhan
2020-07-01 09:14:59 +05:30
Jie Fu
7e93e03da5 8248612: Back quotes and double quotes must not be escaped in: Cannot convert \"$unix_path\" to Windows path
Reviewed-by: ihse
2020-07-01 10:27:10 +08:00
Vladimir Kozlov
bf04926d72 8005088: remove unused NativeInstruction::test methods
Reviewed-by: iignatyev
2020-07-01 15:37:56 -07:00
Calvin Cheung
dc74336a65 8243586: Optimize calls to SystemDictionaryShared::define_shared_package for classpath
Define_shared_package only needs to be called once for each package in a jar specified in the shared class path.

Reviewed-by: iklam, dholmes, minqi
2020-07-01 21:05:14 +00:00
Magnus Ihse Bursie
4b85bd546e 8248610: Clean up handling of Windows RC files
Reviewed-by: erikj
2020-07-01 22:39:58 +02:00
Joe Darcy
32aa66126e 8247534: Update --release 15 symbol information for JDK 15 build 29
Reviewed-by: jlahoda
2020-07-01 13:12:11 -07:00
Jesper Wilhelmsson
292a3d5722 Merge 2020-07-01 21:14:55 +02:00
Doug Simon
03d47d58d6 8248359: Update JVMCI
Reviewed-by: kvn, never
2020-07-01 12:06:44 +02:00
Harold Seigel
eb78035d05 8247741: Test test/hotspot/jtreg/runtime/7162488/TestUnrecognizedVmOption.java fails when -XX:+IgnoreUnrecognizedVMOptions is set
Use createJavaProcessBuilder() to prevent JTreg flags from being passed to the new process created by the test

Reviewed-by: lfoltan, dholmes
2020-07-01 18:42:13 +00:00
Christian Hagedorn
13b7c2e131 8244724: CTW: C2 compilation fails with "Live Node limit exceeded limit"
Fix live limit assert in node construction to be ignored during code generation in Compile::Code_Gen().

Reviewed-by: kvn, neliasso
2020-07-01 09:18:28 +02:00
Magnus Ihse Bursie
2a37607e98 8248563: Gtest CFLAGS/warnings is not properly handled
Reviewed-by: erikj
2020-07-01 01:56:52 +02:00
Yasumasa Suenaga
f5673586b7 8248526: configure script failed on WSL in May 2020 update
Reviewed-by: ihse
2020-07-01 07:23:48 +09:00
Jesper Wilhelmsson
545d56dd42 Merge 2020-06-30 20:59:15 +02:00
Daniel D. Daugherty
7d54e71d38 8246493: JDI stress/serial/mixed002 needs to use WhiteBox.deflateIdleMonitors support
Reviewed-by: cjplummer, sspitsyn
2020-06-30 15:24:01 -04:00
Jesper Wilhelmsson
7c3d72fd3a Merge 2020-06-30 20:09:03 +02:00
Stefan Karlsson
13750b6aca 8248048: ZGC: AArch64: SIGILL in load barrier register spilling
Reviewed-by: adinn, aph
2020-06-30 19:20:22 +02:00
Kim Barrett
a338213bb4 8248545: Remove unneeded warning suppression of MSVC++ 4521/4522
Reviewed-by: tschatzl, ihse
2020-06-30 12:41:27 -04:00
Magnus Ihse Bursie
2de3595895 8248548: Use DISABLED_WARNINGS for globally disabled warnings on Visual Studio in Hotspot
Reviewed-by: kbarrett, erikj
2020-06-30 16:26:24 +02:00
Magnus Ihse Bursie
f19db799f3 8248547: Use SetupJdkLibrary for hotspot libraries
Reviewed-by: erikj
2020-06-30 16:23:34 +02:00
Matthias Baesken
f23c983a46 8248468: java/awt/font/DefaultFontTest/DefaultFontTest.java fails in SunFontManager.findFont2D
Reviewed-by: jdv
2020-06-29 09:59:45 +02:00
Patric Hedlin
622117d275 8234605: C2 failed "assert(C->live_nodes() - live_at_begin <= 2 * _nodes_required) failed: Bad node estimate: actual = 208 >> request = 101"
Reviewed-by: neliasso, kvn
2020-06-26 15:47:16 +02:00
Jonathan Gibbons
20a1e352c0 8248492: ProblemList open/test/langtools//jdk/javadoc/doclet/testHeadTag/TestHeadTag.java
Reviewed-by: prappo
2020-06-29 15:03:36 -07:00
Stefan Karlsson
46f86477ad 8248346: Move OopStorage mutex setup out from OopStorageSet
Reviewed-by: kbarrett, eosterlund
2020-06-29 23:17:50 +02:00
Paul Hohensee
51b7c76a95 8245129: Enhance jstat gc option output and tests
Widen and right-justify size fields assuming 2tb heap

Reviewed-by: simonis, dtitov
2020-06-29 13:39:35 -07:00
Bob Vandette
ba711f63ba 8248410: Correct Fix for 8236647: java/lang/invoke/CallSiteTest.java failed with InvocationTargetException in Graal mode
Reviewed-by: kvn, never
2020-06-29 17:25:44 +00:00
Magnus Ihse Bursie
682e836d60 8248488: JDK-8246484 actually broke COMPARE_BUILD
Reviewed-by: erikj
2020-06-29 18:39:40 +02:00
Zhuo Wang
5a6954abba 8246051: SIGBUS by unaligned Unsafe compare_and_swap
Reviewed-by: aph
2020-06-29 10:15:45 -04:00
Christian Hagedorn
840867efa6 8247218: Add default constructor to VectorSet to use Thread::current()->resource_area() as arena by default
Add a default construction to VectorSet and clean up uses of the old constructor.

Reviewed-by: kvn, thartmann
2020-06-29 17:14:19 +02:00
Zhengyu Gu
fe145646e7 8248227: Shenandoah: Refactor Shenandoah::heap() to match other GCs
Reviewed-by: shade
2020-06-29 10:14:18 -04:00
Rahul Yadav
c07ce7eec7 8245245: Websocket can lose the URL encoding of URI query parameters
The fix updates jdk.internal.net.http.websocket.OpeningHandshake to avoid double encoding and decoding of URL

Reviewed-by: dfuchs, chegar, prappo
2020-06-29 14:49:03 +01:00
Harold Seigel
55bbaf1ae1 8248273: Small clean up for PerfClassTraceTime
Remove the unused code.

Reviewed-by: dholmes, redestad
2020-06-29 12:28:55 +00:00
Boris Ulasevich
48c0ce3b4b 8247408: IdealGraph bit check expression canonicalization
Reviewed-by: aph, kvn, adinn
2020-06-29 07:26:10 -04:00
Tobias Hartmann
a25bacdd13 8248234: Disabling UseExactTypes crashes C2
Remove the flag since it is broken, untested and hasn't been used in many years.

Reviewed-by: kvn, redestad, neliasso
2020-06-29 08:21:42 +02:00
Aleksey Shipilev
a793293464 8247845: Shenandoah: refactor TLAB/GCLAB retirement code
Reviewed-by: rkennke
2020-06-29 07:16:53 +02:00
Yasumasa Suenaga
5ad963cf61 8248379: Handshake closures for JVMTI monitor functions lack of some validations
Reviewed-by: sspitsyn, dholmes
2020-06-29 13:35:45 +09:00
Jesper Wilhelmsson
9d6797019b Merge 2020-06-29 04:38:30 +02:00
Pengfei Li
ac4f14c386 8247307: C2: Loop array fill stub routines are not called
Ignore safepoint polling use of CountedLoopNode when matching loop array fill pattern.

Reviewed-by: kvn, thartmann
2020-06-28 06:15:31 +00:00
Joe Darcy
bdab5a0a3a 8248428: Cleanup pass on javax.lang.model docs
Reviewed-by: jjg
2020-06-26 17:14:14 -07:00
Calvin Cheung
a0a0539b0d 8248112: array index out of bound in FileMapInfo::check_paths
Check runtime classpath lengths after calling create_path_array().

Reviewed-by: iklam, minqi
2020-06-26 19:26:30 +00:00
Robert Field
f6c537f8bc 8247438: JShell: When FailOverExecutionControlProvider fails the proximal cause is not shown
8237743: test/langtools/jdk/jshell/FailOverExecutionControlTest.java fails No ExecutionControlProvider with name 'nonExistent' and parameter keys: []
8199646: JShell tests: jdk/jshell/FailOverDirectExecutionControlTest.java failed with java.lang.UnsupportedOperationException

Reviewed-by: jlahoda
2020-06-26 11:56:21 -07:00
Lance Andersen
fc82a465d3 8248412: test/jdk/java/sql/testng/test/sql/DriverManagerPermissionsTests.java can fail
Reviewed-by: naoto, dfuchs
2020-06-26 13:37:43 -04:00
Chris Hegarty
c0c4a8d738 8248326: Add a minimal serialization test for local records
Reviewed-by: dfuchs
2020-06-26 14:55:09 +01:00
Erik Österlund
57b792cba2 8248216: JFR: Unify handling of all OopStorage instances in LeakProfiler root processing
Reviewed-by: mgronlun, stefank
2020-06-26 13:20:12 +00:00
Thomas Schatzl
18cddad5a2 8247819: G1: Process strong OopStorage entries in parallel
Implement parallel processing of strong OopStorage entries for G1.

Co-authored-by: Erik Osterlund <erik.osterlund@oracle.com>
Co-authored-by: Stefan Karlsson <stefan.karlsson@oracle.com>
Reviewed-by: kbarrett, stefank
2020-06-26 14:43:09 +02:00
Harold Seigel
51ddc2adbf 8246337: Add more JVM tests for sealed classes
Add missing test cases for sealed interfaces and sealed classes.

Reviewed-by: dholmes, lfoltan
2020-06-26 12:38:00 +00:00
Matthias Baesken
e7fa180e05 8248334: hs build errors on ppc64 and s390x platforms
Reviewed-by: dholmes, mdoerr
2020-06-26 12:05:57 +02:00
Kim Barrett
9ffba3002a 8247747: Remove macro definition of "inline" in stack.hpp
Removed "inline" macro and some microoptimizations.

Reviewed-by: lfoltan, tschatzl
2020-06-26 05:26:19 -04:00
Jesper Wilhelmsson
55b472251e Merge 2020-06-26 04:15:33 +02:00
Vladimir Kozlov
b87302ca99 8248347: windows build broken by JDK-8243114
Reviewed-by: dcubed, dholmes
2020-06-25 16:01:16 -07:00
Erik Gahlin
23bbc981a6 8248302: JFR: Add test for OldObjectSample event when using ZGC
Reviewed-by: mgronlun
2020-06-25 21:46:12 +02:00
Yumin Qi
4682835fb4 8203005: The top-of-stack type specified for nofast_* bytecodes are wrong
The change was left by 8074345 the types were wrongly put as T_ILLEGAL for T_OBJECT, and T_ILLEGAL for T_INT.

Reviewed-by: dcubed, cjplummer
2020-06-25 12:40:02 -07:00
Thomas Schatzl
e00aa7c866 8248329: JDK-8244603 breaks windows build
Reviewed-by: sundar, dcubed
2020-06-25 18:58:14 +02:00
Magnus Ihse Bursie
aacb827896 8220639: Need a way to augment JTREG_LAUNCHER_OPTIONS from command-line
Reviewed-by: erikj, dholmes
2020-06-25 18:35:40 +02:00
Andrew Haley
47e465cf1b 8243114: Implement montgomery{Multiply,Square}intrinsics on Windows
Reviewed-by: dholmes, andrew
2020-06-25 14:19:37 +01:00
Thomas Schatzl
0f2ac2021b 8244603: G1 incorrectly limiting young gen size when using the reserve can result in repeated full gcs
8238858: G1 Mixed gc young gen sizing might cause the first mixed gc to immediately follow the prepare mixed gc

Reviewed-by: sjohanss, iwalulya
2020-06-25 16:07:43 +02:00
Thomas Schatzl
8c20401051 8243672: Short term pause time ratio calculation in G1 off
Reviewed-by: sjohanss, kbarrett
2020-06-25 16:07:39 +02:00
Sibabrata Sahoo
a953a0f4ab 8247968: test/jdk/javax/crypto/SecretKeyFactory/security.properties has wrong header
Wrong copyright header removed

Reviewed-by: weijun
2020-06-25 06:12:29 -07:00
Coleen Phillimore
a6e794b3e8 8248240: Remove extendedPC.hpp and fetch_frame_from_ucontext
This empty interface was left over from deleting code from before safepoint polling.

Reviewed-by: lfoltan, dholmes
2020-06-25 08:04:28 -04:00
Coleen Phillimore
06cea107ef 8248271: linux-x86-zero build failure
Reviewed-by: dholmes
2020-06-25 08:01:17 -04:00
Andrey Turbanov
921155dfc7 8036604: Typo in BufferedBufImgOps.java in the exception message
Reviewed-by: serb
2020-06-24 20:32:32 -07:00
Jesper Wilhelmsson
233cac3232 Merge 2020-06-25 03:11:32 +02:00
Jesper Wilhelmsson
9e5f6885d8 Added tag jdk-16+3 for changeset 76810b3a88c8 2020-06-25 02:54:12 +02:00
Sergey Bylokhov
a1b5e01003 8213535: Windows HiDPI html lightweight tooltips are truncated
Reviewed-by: kizune
2020-06-24 15:35:43 -07:00
Daniel D. Daugherty
ac37a29914 8248049: minor cleanups in gc/whitebox/TestWBGC.java
Reviewed-by: hseigel
2020-06-24 17:49:10 -04:00
Daniel D. Daugherty
3e4ad5d8d1 8246477: add whitebox support for deflating idle monitors
Reviewed-by: dholmes, eosterlund
2020-06-24 17:48:53 -04:00
Erik Gahlin
362f168d23 8242501: JFR: oldobject/TestG1.java can't find leaking object
Reviewed-by: mgronlun
2020-06-24 23:47:16 +02:00
Magnus Ihse Bursie
2ad638621c 8247573: gtest/GTestWrapper.java is not helpful if gtest framework is missing
Reviewed-by: erikj, iignatyev
2020-06-24 23:45:01 +02:00
Ioi Lam
1e45eb3b13 8248235: appcds/jigsaw/PatchModule/Simple.java failed when running in dynamic CDS mode
Reviewed-by: minqi
2020-06-24 13:52:01 -07:00
Jonathan Gibbons
95b9024ab2 8164597: TestIOException.java fails after push for JDK-8164130
Reviewed-by: prappo
2020-06-24 12:41:50 -07:00
Yumin Qi
0e60e8ad85 8246181: Avoid walking SymbolTable during -Xshare:dump
All symbols at dump are created as permanent. Store them in a global array to avoid working SymbolTable.

Reviewed-by: iklam, ccheung
2020-06-24 11:15:22 -07:00
Coleen Phillimore
1550fd889b 8239782: CC_INTERP is only used by Zero interpreter
Change CC_INTERP conditional to ZERO and remove in places where unnecessary. Fix build to exclude compilers and rename CppInterpreter to ZeroInterpreter. The "C++ Interpreter" has been removed from the code a while ago.

Reviewed-by: dholmes, ihse
2020-06-24 09:56:20 -04:00
Claes Redestad
6b251191e0 8248131: Simplify ServicesCatalog provider handling
Reviewed-by: alanb
2020-06-24 15:18:13 +02:00
Harold Seigel
112a4bd8bc 8247966: runtime/logging/loadLibraryTest/LoadLibraryTest.java failed "RuntimeException: 'Unloaded library with handle' missing from stdout/stderr"
Make sure the native library is unloaded before exiting the main thread.

Reviewed-by: dcubed, dholmes
2020-06-24 12:34:14 +00:00
Alexander Matveev
9584e01d24 8225251: Minimise import statements in jpackage sources
Reviewed-by: herrick, asemenyuk
2020-06-23 20:31:38 -04:00
Stefan Karlsson
ef3b0ec567 8247755: Leaner and more versatile GrowableArray classes
Reviewed-by: kbarrett, coleenp
2020-06-24 13:16:52 +02:00
Stefan Karlsson
9d6aa42a7c 8247820: ParallelGC: Process strong OopStorage entries in parallel
Reviewed-by: pliden, eosterlund, kbarrett, tschatzl
2020-06-24 13:16:24 +02:00
Stefan Karlsson
3797364ce9 8248133: SerialGC: Unify handling of all OopStorage instances in root processing
Reviewed-by: eosterlund, kbarrett, pliden
2020-06-24 13:15:54 +02:00
Stefan Karlsson
156f6174ed 8248132: ZGC: Unify handling of all OopStorage instances in root processing
Reviewed-by: pliden, kbarrett, tschatzl
2020-06-24 13:15:00 +02:00
Stefan Karlsson
a1f02d13e5 8248130: AArch64: pf() uses mtNone instead of mtInternal
Reviewed-by: tschatzl, kbarrett, dholmes
2020-06-24 12:19:14 +02:00
Ioi Lam
27fc8b6787 8246546: Simplify SystemDictionary::is_shared_class_visible
Reviewed-by: minqi, ccheung
2020-06-23 21:23:00 -07:00
Naoto Sato
e178f0467b 8248184: AMPM_OF_DAY doc fix in ChronoField
Reviewed-by: bpb, lancea
2020-06-23 17:43:58 -07:00
Erik Gahlin
1aa6539576 8241885: JFR tool: print does not work with inner class events
Reviewed-by: jbachorik
2020-06-23 21:28:45 +02:00
Erik Gahlin
0a6262f0b8 8242593: JFR: EventFactory does not scale well past unique 1000 events
Reviewed-by: jbachorik
2020-06-23 20:15:54 +02:00
Xin Liu
4076ca82d2 8151779: Some intrinsic flags could be replaced with one general flag
Add ControlIntrinsic switch

Reviewed-by: neliasso, phh
2020-06-23 10:40:26 -07:00
Zhengyu Gu
6986ab256d 8248041: Shenandoah: pre-Full GC root updates may miss some roots
Reviewed-by: shade
2020-06-23 13:38:20 -04:00
Phil Race
2c868d6101 Merge 2020-06-22 15:55:57 -07:00
Jesper Wilhelmsson
4862d0d542 Merge 2020-06-22 18:23:49 +02:00
Zhengyu Gu
3192ef367a 8247736: Shenandoah: assert(_nm->is_alive()) failed: only alive nmethods here
Reviewed-by: rkennke, shade
2020-06-22 11:40:06 -04:00
Dong Wangya
cb9d3efe5d 8247979: aarch64: missing side effect of killing flags for clearArray_reg_reg
Reviewed-by: adinn
2020-06-22 20:26:02 +08:00
Jamil Nimeh
c0b348f3ef 8239950: Update PKCS9 Attributes to PKCS#9 v2.0 Encodings
Reviewed-by: weijun
2020-06-23 07:48:39 -07:00
Erik Joelsson
d8219d0a78 8213214: Set -Djava.io.tmpdir= when running tests
Reviewed-by: alanb, mikael
2020-06-23 06:51:35 -07:00
Erik Österlund
2765410a28 8247319: Remove on-stack nmethod hotness counter sampling from safepoints
Reviewed-by: kvn, dholmes
2020-06-23 11:59:13 +00:00
Erik Österlund
a10a9284c1 8247179: Mechanism for VM operations to not take part in safepoint coalescing
Reviewed-by: rehn, dholmes
2020-06-23 11:59:13 +00:00
Vladimir Kempik
88df2f0f7f 8243470: [macos] bring back O2 opt level for unsafe.cpp
Remove special case for unsafe.cpp on clang macos

Reviewed-by: erikj, ihse
2020-06-23 13:41:55 +03:00
Kim Barrett
f8596b57f3 8247740: Inline derived CollectedHeap access for G1 and ParallelGC
Added shared helper in CollectedHeap, and inlined for G1 and ParallelGC

Reviewed-by: stefank, pliden
2020-06-23 05:58:52 -04:00
Hai-May Chao
e3eb38f4d2 8244148: keytool -printcert and -printcrl should support the -trustcacerts and -keystore options
Reviewed-by: weijun, jjiang
2020-06-23 16:30:38 +08:00
Claes Redestad
8d9826e4d1 8247995: Avoid use of a mapping function in Permissions.getPermissionCollection
Reviewed-by: rriggs
2020-06-23 10:07:10 +02:00
Stefan Karlsson
17f2250c5a 8247879: Rework WeakHandle and OopHandle to dynamically support different OopStorages
Reviewed-by: coleenp, eosterlund
2020-06-23 09:38:21 +02:00
Jesper Wilhelmsson
b7e944953e Merge 2020-06-23 03:05:07 +02:00
Pankaj Bansal
3c472b6700 8198623: java/awt/KeyboardFocusmanager/TypeAhead/EnqueueWithDialogButtonTest/EnqueueWithDialogButtonTest.java fails on mac
Reviewed-by: jdv
2020-06-22 12:39:59 +05:30
Sergey Bylokhov
02201d19c6 7131400: [macosx] Desktop.edit(a directory) should throw IOException
Reviewed-by: pbansal, aivanov
2020-06-22 06:48:26 +01:00
Severin Gehwolf
732d8865df 8244500: jtreg test error in test/hotspot/jtreg/containers/docker/TestMemoryAwareness.java
When the kernel doesn't support swap limits, expect host values instead.

Reviewed-by: mbaesken, bobv, stuefe
2020-05-20 21:12:20 +02:00
Roland Westrelin
5adfaa3986 8247763: assert(outer->outcnt() == 2) failed: 'only phis' failure in LoopNode::verify_strip_mined()
Reviewed-by: kvn, thartmann
2020-06-18 15:44:55 +02:00
Erik Gahlin
04adafb753 8247901: Multiple conflicting @return for FlightRecorderMXBean
Reviewed-by: mgronlun
2020-06-22 09:44:32 +02:00
Erik Gahlin
3576a88369 8246436: JFR: Avoid parsing metadata.xml during startup
Reviewed-by: mgronlun, erikj, redestad
2020-06-22 08:09:23 +02:00
Weijun Wang
927a7287b7 8247907: XMLDsig logging does not work
Reviewed-by: mullan
2020-06-20 15:11:19 +08:00
Daniel D. Daugherty
5bd6e9d790 8247876: ProblemList various crypto tests on aarch64
Reviewed-by: wetmore
2020-06-19 15:22:19 -04:00
Jonathan Gibbons
4ef42b9215 8247760: Improve documentation for javadoc.tester.JavadocTester
Reviewed-by: prappo
2020-06-19 07:55:30 -07:00
Yasumasa Suenaga
cd3354756a 8247729: GetObjectMonitorUsage() might return inconsistent information
Reviewed-by: dholmes, dcubed, sspitsyn
2020-06-19 16:09:49 +09:00
Ludovic Henry
651c20d4ef 8247697: Remove delayed_forbidden dead code in C2
The delayed_forbidden parameter to Compile::call_generator is never used.

Reviewed-by: kvn, vlivanov, thartmann
2020-06-19 08:06:08 +02:00
Jesper Wilhelmsson
a16994ff7b Merge 2020-06-19 00:30:46 +02:00
Aleksey Shipilev
0bacc69a4c 8247860: Shenandoah: add update watermark line in rich assert failure message
Reviewed-by: rkennke
2020-06-18 19:14:13 +02:00
David Holmes
2627f15348 8238832: Obsolete PrintVMQWaitTime
Reviewed-by: ccheung, dcubed
2020-06-17 21:07:08 -04:00
Jesper Wilhelmsson
9a26a01e2f Added tag jdk-16+2 for changeset bcbe7b8a77b8 2020-06-18 03:04:27 +02:00
Chris Plummer
07f9376f54 8246369: CodeCache.findBlobUnsafe(addr) sometimes asserts with valid address
Reviewed-by: sspitsyn, amenkov
2020-06-17 13:12:54 -07:00
Joe Darcy
1cb5a48ed7 8245588: Update --release 15 symbol information for JDK 15 build 27
Reviewed-by: jjg
2020-06-17 13:00:14 -07:00
Martin Buchholz
175b597ad2 8247706: Unintentional use of new Date(year...) with absolute year
Reviewed-by: naoto, rriggs
2020-06-17 12:45:17 -07:00
Martin Buchholz
4f2edacaaf 8247782: typos in java.math
Reviewed-by: rriggs, lancea, darcy
2020-06-17 12:29:58 -07:00
Claes Redestad
34c79640e7 8247681: Improve bootstrapping of unary concatenations
Reviewed-by: jlaskey, psandoz
2020-06-17 19:36:26 +02:00
Jonathan Gibbons
1d87958ead 8243113: Always identify version of javadoc used to generate docs
Reviewed-by: prappo
2020-06-17 09:24:28 -07:00
Aleksey Shipilev
44d4e37ccb 8247757: Shenandoah: split heavy tests by heuristics to improve parallelism
Reviewed-by: rkennke
2020-06-17 17:22:09 +02:00
Aleksey Shipilev
00dc525e5f 8247754: Shenandoah: mxbeans tests can be shorter
Reviewed-by: rkennke
2020-06-17 17:21:56 +02:00
Aleksey Shipilev
d2c1027edc 8247751: Shenandoah: options tests should run with smaller heaps
Reviewed-by: zgu, rkennke
2020-06-17 17:21:47 +02:00
Aleksey Shipilev
aeeaffa888 8247593: Shenandoah: should not block pacing reporters
Reviewed-by: rkennke
2020-06-17 09:43:16 +02:00
Jesper Wilhelmsson
6d2959b393 Merge 2020-06-17 05:28:05 +02:00
Jonathan Gibbons
3e5abdaf32 8152313: [javadoc] convert tool tests to doclet tests
Reviewed-by: ksrini
2020-06-16 14:27:16 -07:00
Patric Hedlin
3839c8656e 8247200: assert((unsigned)fpargs < 32)
Reviewed-by: aph, neliasso
2020-06-04 10:17:40 +02:00
Rahul Yadav
a512099313 8247675: Update DateFormatterTest Copyright
The fix updates the test DateFormatterTest copyright by adding missing comma

Reviewed-by: dfuchs, chegar
2020-06-16 13:15:42 +01:00
Magnus Ihse Bursie
9e4b9e9151 8201575: Allow numbers in VERSION_PRE according to JEP 223
Reviewed-by: erikj
2020-06-16 14:22:15 +02:00
Stefan Karlsson
77bdc30650 8247470: Fix CHeap GrowableArray NMT accounting
Reviewed-by: coleenp, tschatzl, kbarrett
2020-06-16 09:37:53 +02:00
Tagir F. Valeev
0a108f9ef2 8247605: Avoid array allocation when concatenating with empty string
Reviewed-by: redestad, plevart
2020-06-16 03:16:41 +00:00
Jesper Wilhelmsson
e33ebc7f0a Merge 2020-06-16 04:20:30 +02:00
Kim Barrett
c1cd3893bd 8247524: Remove unnecessary volatile qualifiers from member functions
Remove qualifiers for oopDesc and metadata-related member functions.

Reviewed-by: stefank, dholmes, stuefe, coleenp
2020-06-15 21:14:52 -04:00
David Holmes
0be5b7d66e 8247289: Obsolete unused UseBsdPosixThreadCPUClocks
8247292: Obsolete unused UseOprofile flag on BSD

Co-authored-by: Christoph Dreis <christoph.dreis@freenet.de>
Reviewed-by: hseigel, dcubed
2020-06-15 18:35:46 -04:00
Naoto Sato
23e2f27996 8246623: Remove minimum 4 digit requirement from Year.parse()
Reviewed-by: lancea, rriggs, joehw
2020-06-15 09:21:39 -07:00
Rahul Yadav
38f9a938e5 8245307: Update ExchangeImpl to use thread safe DateTimeFormatter
The fix updates sun.net.httpserver.ExchangeImpl to use thread safe DateTimeFormatter for response headers, this replaces DateFormat that was using ThreadLocal.

Reviewed-by: dfuchs, alanb, chegar
2020-06-15 16:26:31 +01:00
Erik Helin
ab57f7d628 8193686: Allow --with-jtreg to accept a zip compressed jtreg image
Reviewed-by: ihse
2020-06-15 12:28:27 +02:00
Christian Hagedorn
08df6a1f15 8246203: Segmentation fault in verification due to stack overflow with -XX:+VerifyIterativeGVN
Replace the recursive verification algorithm with an iterative one to avoid a stack overflow for large graphs.

Reviewed-by: kvn, thartmann
2020-06-15 09:50:11 +02:00
Matthias Baesken
3341d36131 8247469: getSystemCpuLoad() returns -1 on linux when some offline cpus are present and cpusets.effective_cpus is not available
Reviewed-by: bobv, dtitov
2020-06-12 16:40:47 +02:00
Yang Zhang
3752a81ec8 8244926: Add absolute check for int/long to generate Abs nodes
Reviewed-by: neliasso, thartmann
2020-06-15 06:05:17 +00:00
Jesper Wilhelmsson
76879aa9c6 Merge 2020-06-15 02:40:51 +02:00
David Holmes
0f7b18a9c8 8231560: Remove expired flags in JDK 16
Reviewed-by: kvn, iklam, iignatyev, eosterlund
2020-06-14 17:43:54 -04:00
Ioi Lam
c82c50b2a2 8245925: G1 allocates EDEN region after CDS has executed GC
Reviewed-by: jiangli, minqi, tschatzl
2020-06-14 01:19:48 -07:00
Jesper Wilhelmsson
af83d6ab25 Merge 2020-06-13 01:00:00 +02:00
Xue-Lei Andrew Fan
1faed205df 8247510: typo in IllegalHandshakeMessage
Reviewed-by: wetmore
2020-06-12 15:55:08 -07:00
Leonid Mesnik
bac2e7fcad 8242328: Update mentions of ThreadMBean to ThreadMXBean
Reviewed-by: dholmes, iignatyev, sspitsyn
2020-06-12 14:33:55 -07:00
Daniel D. Daugherty
8c90f4c0a7 8247495: ProblemList vmTestbase/nsk/jvmti/SetFieldAccessWatch/setfldw001/TestDescription.java
Reviewed-by: cjplummer, minqi
2020-06-12 17:28:39 -04:00
Xin Liu
892d998587 8139046: Compiler Control: IGVPrintLevel directive should set PrintIdealGraph
Make !PrintIdealGraph a synonym for PrintIdealGraphLevel=-1 => print nothing

Reviewed-by: simonis, phh, neliasso
2020-06-12 13:33:29 -07:00
Joe Darcy
be278bc564 8246222: Rename javac test T6395981.java to be more informative
Reviewed-by: jjg
2020-06-12 13:16:40 -07:00
Magnus Ihse Bursie
1a681a434f 8200738: Use --hash-style=gnu for gcc
Reviewed-by: erikj
2020-06-12 20:28:07 +02:00
Calvin Cheung
0e4829ef0a 8245060: remove copying of s.h.WB$WhiteBoxPermission in cds/appcds tests
Reviewed-by: dholmes, minqi, iklam
2020-06-12 16:48:27 +00:00
Daniel D. Daugherty
c06fe155ef 8247492: ProblemList tools/jlink/plugins/CompressorPluginTest.java
Reviewed-by: jlaskey
2020-06-12 12:06:24 -04:00
Poonam Bajaj
ac4603144d 8243290: Improve diagnostic messages for class verification and redefinition failures
Reviewed-by: coleenp, hseigel, sspitsyn
2020-06-12 12:51:32 +00:00
Jan Lahoda
1b64fb2063 8247334: Trees.getScope crashes for annotated local records
Reviewed-by: vromero
2020-06-12 13:38:06 +02:00
Jie Fu
24f040da36 8247396: Exclude PCH for files in $(OPT_SPEED_SRC) with clang after JDK-8246751
Reviewed-by: ihse, erikj
2020-06-12 10:52:20 +08:00
Conor Cleary
1b75b7de80 8246143: UnreferencedXXX tests fail when run with --illegal-access=deny
This patch updates the @modules tag with +open in the tests UnreferencedDatagramSockets and UnreferncedMulticastSockets in advance of the removal of --illegal-access to allow access to private member fields required by the tests.

Reviewed-by: alanb, dfuchs
2020-06-12 09:48:30 +01:00
Jesper Wilhelmsson
08304ada3c Added tag jdk-16+1 for changeset 4a485c89d5a0 2020-06-12 09:47:25 +02:00
Jesper Wilhelmsson
494f9667b4 Merge 2020-06-12 05:12:32 +02:00
Joe Darcy
2f5d4c633b 8247374: Remove default constructors from javax.net.sslK
Reviewed-by: xuelei
2020-06-11 16:35:29 -07:00
Joe Darcy
b81f2f1f48 8245620: Improve Annotation.annotationType() documentation
Reviewed-by: alanb, prappo
2020-06-11 15:55:19 -07:00
Leonid Mesnik
6341f8c077 8244965: Incorrect error message in vmTestbase/nsk/jdi/VirtualMachine/suspend/suspend001/TestDescription.java
Reviewed-by: dholmes
2020-06-11 14:03:00 -07:00
Iris Clark
319b4e71e1 8246803: Update link to license in Docs.gmk
Reviewed-by: darcy, mikael
2020-06-09 08:56:13 -07:00
Joe Darcy
a5b5712733 8235496: Start of release updates for JDK 16
8245585: Add SourceVersion.RELEASE_16
8245586: Add source 16 and target 16 to javac
8245544: com/sun/tools/javac/platform/JDKPlatformProvider.java does not support ct.sym with platform versions 16+

Co-authored-by: David Holmes <david.holmes@oracle.com>
Co-authored-by: Jan Lahoda <jan.lahoda@oracle.com>
Reviewed-by: erikj, dholmes, ihse, neugens, jjg, jlahoda, jlaskey, mikael
2020-06-07 20:02:03 -07:00
Sean Coffey
15999a9f21 Merge 2020-06-11 20:06:46 +00:00
Mandy Chung
6dec50a7e8 8247247: JFR tests fail due to JDK-8235521 missing doPrivileged block
Reviewed-by: egahlin
2020-06-11 11:07:09 -07:00
Lance Andersen
65455ff60b 8207936: TestZipFile.java can fail with an OOM error
Reviewed-by: joehw, redestad
2020-06-11 12:58:13 -04:00
Prasadrao Koppula
bb86779366 8246031: SSLSocket.getSession() doesn't close connection for timeout/ interrupts
Reviewed-by: xuelei, coffeys
2020-06-11 21:54:51 +05:30
Aleksey Shipilev
4862a00f6b 8247367: Shenandoah: pacer should wait on lock instead of exponential backoff
Reviewed-by: zgu
2020-06-11 18:16:32 +02:00
Aleksey Shipilev
9ac1ab372d 8247358: Shenandoah: reconsider free budget slice for marking
Reviewed-by: zgu
2020-06-11 18:16:26 +02:00
Jesper Wilhelmsson
7da56dfbf3 Added tag jdk-16+0 for changeset 93813843680b 2020-06-11 18:08:29 +02:00
Patric Hedlin
195c45a0e1 8245226: Clean-up FlagSetting and remove misuse
Reviewed-by: neliasso, dholmes
2020-02-24 14:06:01 +01:00
Erik Gahlin
30bc2b7ca1 8248997: JFR: Improve javadoc for @Name
Reviewed-by: mgronlun
2020-07-14 05:10:46 +02:00
Alexander Matveev
49002194fb 8249264: Build validate-headers task fails after JDK-8248261
Reviewed-by: herrick
2020-07-13 17:52:35 -07:00
Vladimir Kozlov
c4f835b3a7 8249165: Remove unneeded nops introduced by 8234160 changes
Check for branch instruction at the end of code block

Reviewed-by: vlivanov
2020-07-13 16:41:01 -07:00
Daniel D. Daugherty
7436ef236e 8246476: remove AsyncDeflateIdleMonitors option and the safepoint based deflation mechanism
Reviewed-by: dholmes, pchilanomate, coleenp
2020-07-13 16:36:01 -04:00
Alexander Matveev
231a8408b2 8248261: Add timestamps to jpackage and jpackage tests verbose output
Reviewed-by: herrick, asemenyuk
2020-07-13 12:04:58 -07:00
Joe Wang
8f8ff52cae 8248486: SafeThread illegal access to java.lang private fields should be removed
Reviewed-by: chegar, rriggs, mchung, alanb
2020-07-13 18:19:02 +00:00
Andy Herrick
83a458c5f7 8247779: Remove deprecated --bind-services option from jpackage
Reviewed-by: asemenyuk, almatvee
2020-07-13 12:04:40 -04:00
Calvin Cheung
5146474954 8246308: Reference count for PackageEntry::name may be incorrectly decremented
Corrected the usage of TempNewSymbol.

Reviewed-by: minqi, iklam
2020-07-13 16:05:25 +00:00
Erik Joelsson
097720cce5 8249195: Change to Xcode 11.3.1 for building on Macos at Oracle
Reviewed-by: ihse
2020-07-13 07:52:59 -07:00
Vladimir Ivanov
a14490dd16 8247502: PhaseStringOpts crashes while optimising effectively dead code
Reviewed-by: kvn, thartmann
2020-07-13 16:44:13 +03:00
Erik Gahlin
deddbe5a85 8248988: JFR: Split up TestThreadStartEndEvents.java
Reviewed-by: mgronlun
2020-07-13 13:17:43 +02:00
Aleksey Shipilev
f613d43f26 8249230: Shenandoah: assertion failure with -XX:-ResizeTLAB
Reviewed-by: rkennke
2020-07-13 11:55:26 +02:00
Richard Reingruber
870e67d520 8247695: PPC/S390: compiler/intrinsics/math/TestFpMinMaxIntrinsics.java fails
Reviewed-by: goetz, lucy
2020-07-13 10:33:14 +02:00
Aleksey Shipilev
2d3c928f0b 8249137: Remove CollectedHeap::obj_size
Reviewed-by: rkennke, tschatzl, cjplummer
2020-07-13 07:39:39 +02:00
Yasumasa Suenaga
faf4d7ccb7 8242428: JVMTI thread operations should use Thread-Local Handshake
Reviewed-by: dcubed, sspitsyn, dholmes
2020-07-11 23:28:02 +09:00
Mikael Vidstedt
09510a15a1 Merge 2020-07-10 23:12:29 -07:00
Zhengyu Gu
086124845f 8247670: Shenandoah: deadlock during class unloading OOME
Reviewed-by: rkennke
2020-07-10 11:40:57 -04:00
Frederic Parain
985061ac28 8249149: Remove obsolete UseNewFieldLayout option and associated code
Reviewed-by: hseigel, iklam
2020-07-10 09:13:03 -04:00
Aleksey Shipilev
0a38584c10 8248652: Shenandoah: SATB buffer handling may assume no forwarded objects
Reviewed-by: rkennke
2020-07-10 10:37:12 +02:00
Jesper Wilhelmsson
d3d29a4f82 Merge 2020-07-10 02:51:04 +02:00
Joe Darcy
5c76194ae9 8248983: Add links to definition of empty name
Reviewed-by: forax, jjg, jlaskey
2020-07-09 16:06:09 -07:00
Zhengyu Gu
9bac33fbc6 8248426: NMT: VirtualMemoryTracker::split_reserved_region() does not properly update summary counting
Reviewed-by: stuefe, minqi
2020-07-09 13:34:24 -04:00
Andrew Haley
97b948a9b2 8248336: AArch64: C2: offset overflow in BoxLockNode::emit
Reviewed-by: adinn
2020-06-25 12:24:50 -04:00
Thomas Schatzl
6b911624f2 8210462: Fix remaining mentions of initial mark
Reviewed-by: lkorinth, kbarrett
2020-07-09 16:22:23 +02:00
Thomas Schatzl
59e3ebb4a5 8248322: G1: Refactor full collection sizing code
Reviewed-by: iwalulya, kbarrett
2020-07-09 16:22:22 +02:00
Bob Vandette
65b23ca67a 8249080: Reduce MemberName class dependency on MethodHandles
Reviewed-by: mchung
2020-07-08 19:59:22 +00:00
Aleksey Shipilev
f4f094021c 8249141: Fix indent in java_lang_Record definition in vmSymbols.hpp
Reviewed-by: dholmes
2020-07-09 12:26:10 +02:00
Andrew Haley
6a91c73dda 8248403: AArch64: Remove uses of kernel integer types
Reviewed-by: kbarrett, dholmes
2020-07-09 05:30:22 -04:00
Koichi Sakata
ed31b661d3 8247818: GCC 10 warning stringop-overflow with symbol code
Reviewed-by: kbarrett, iklam
2020-07-08 11:39:11 -07:00
Jesper Wilhelmsson
3dcd1c1ab0 Merge 2020-07-09 04:32:30 +02:00
Jesper Wilhelmsson
11ba454f39 Added tag jdk-16+5 for changeset 143e258f64af 2020-07-09 04:10:33 +02:00
Weijun Wang
fc1b24e4e8 8243592: Subject$SecureSet::addAll should not call contains(null)
Reviewed-by: mullan
2020-07-09 09:22:01 +08:00
Vladimir Kozlov
e2353cc324 8248987: AOT's Linker.java seems to eagerly fail-fast on Windows
Treat all problems in getVC141AndNewerLinker() as non-fatal. Print error messages with --verbose flag.

Reviewed-by: iignatyev, iveresov
2020-07-08 15:46:02 -07:00
Leonid Mesnik
dfe381ae08 8248658: Remove vmTestbase/vm/share/vmcrasher
Reviewed-by: cjplummer, sspitsyn
2020-07-08 12:11:06 -07:00
Erik Gahlin
4d2b0b53b4 8248016: JFR: Remove Javadoc warnings
Reviewed-by: mgronlun
2020-07-08 17:37:27 +02:00
Andrew Leonard
0853b33004 8248701: On Windows generated modules-deps.gmk can contain backslash-r (CR) characters
Reviewed-by: erikj
2020-07-08 03:08:30 -07:00
Daniel Fuchs
d308558d4f 8248865: Document JNDI/LDAP timeout properties
Documentation added in the module-info of java.naming

Reviewed-by: chegar, aefimov, mullan
2020-07-08 15:16:47 +01:00
Andrew Leonard
d42f541dc3 8248231: deserializeLambda created with wrong encoding if platform encoding not UTF-8
Reviewed-by: vromero
2020-07-08 09:23:59 -04:00
Patric Hedlin
1d5ec8f363 8247762: [aarch64] Timeout in .../HeapDumpTestWithActiveProcess.java due to inf. loop in AARCH64CurrentFrameGuess.run()
Reviewed-by: cjplummer, aph
2020-06-17 19:53:48 +02:00
Ioi Lam
d7b097f117 8244764: Improve assertion for CPP_VTABLE_PATCH_TYPES_DO
Reviewed-by: lfoltan, coleenp
2020-07-07 23:11:13 -07:00
Chris Plummer
eeb4b15f06 8249002: New serviceability/sa/ClhsdbFindPC.java #id2 and #id3 tests are failing with ZGC
Reviewed-by: iignatyev
2020-07-07 19:17:47 -07:00
Alexander Matveev
ed05d57603 8223955: Eliminate or reduce mixing of old File API and new Path/Files APIs
Reviewed-by: herrick, asemenyuk
2020-07-07 16:08:29 -07:00
Jesper Wilhelmsson
c782d0e486 Merge 2020-07-07 23:42:50 +02:00
Chris Plummer
db2d4e8f5a 8248194: Need better support for running SA tests on core files
Reviewed-by: amenkov, lmesnik
2020-07-07 13:07:53 -07:00
Daniil Titov
f243b281ea 8205467: javax/management/remote/mandatory/connection/MultiThreadDeadLockTest.java possible deadlock
Reviewed-by: phh
2020-07-07 10:27:47 -07:00
Daniil Titov
50e18e29e3 8227337: javax/management/remote/mandatory/connection/ReconnectTest.java NoSuchObjectException no such object in table
Reviewed-by: phh
2020-07-07 10:18:53 -07:00
Christian Hagedorn
a6cf325152 8248226: TestCloneAccessStressGCM fails with -XX:-ReduceBulkZeroing
Taking GC barriers into account in LoadNode::find_previous_arraycopy() when ReduceInitialCardMarks is disabled.

Reviewed-by: kvn, roland
2020-07-07 13:00:46 +02:00
Boris Ulasevich
584e983c38 8248568: compiler/c2/TestBit.java failed: test missing from stdout/stderr
Reviewed-by: kvn
2020-07-07 06:20:03 -04:00
Kelvin Nilsen
c5bb023584 8232782: Shenandoah: streamline post-LRB CAS barrier (aarch64)
Reviewed-by: rkennke
2020-07-07 11:35:14 +02:00
Patric Hedlin
485194c1a7 8245021: Adding method 'remove_if_existing' to growableArray
Reviewed-by: thartmann, neliasso
2020-04-21 10:35:53 +02:00
Ioi Lam
3d1b1a6bc9 8248170: Excessive include of compiledMethod, codeCache, javaClasses and systemDictionary
Reviewed-by: dholmes, kvn, coleenp, stefank
2020-07-06 23:11:37 -07:00
Jesper Wilhelmsson
e58423796e Merge 2020-07-07 03:12:11 +02:00
Ioi Lam
8170244a81 8248886: InstanceKlass::initialize_impl crashes with -XX:-UsePerfData after JDK-8246019
Reviewed-by: ccheung
2020-07-06 17:52:52 -07:00
Toshio Nakamura
28e219f038 8233829: javac cannot find non-ASCII module name under non-UTF8 environment
Reviewed-by: jjg
2020-07-06 16:08:00 -07:00
Ioi Lam
2e09a58f64 8246019: PerfClassTraceTime slows down VM start-up
Reviewed-by: dholmes, redestad, minqi, ccheung
2020-07-06 15:14:44 -07:00
Boris Ulasevich
6d137a3616 8248043: Need to eliminate excessive i2l conversions
Reviewed-by: redestad, kvn, iveresov
2020-07-06 04:44:25 -04:00
Christian Hagedorn
b02e4d4aba 8248596: [TESTBUG] compiler/loopopts/PartialPeelingUnswitch.java times out with Graal enabled
Change C2 specific test to be executed only with server compiler.

Reviewed-by: roland, kvn, thartmann
2020-07-06 09:16:58 +02:00
Yaofei Song
459da4aa11 8248219: aarch64: missing memory barrier in fast_storefield and fast_accessfield
Reviewed-by: aph
2020-06-28 16:47:25 +08:00
1679 changed files with 30157 additions and 14900 deletions

12
.hgtags
View File

@@ -635,16 +635,20 @@ dd5198db2e5b1ebcafe065d987c03ba9fcb50fc3 jdk-15+17
7223c6d610343fd8323af9d07d501e01fa1a7696 jdk-15+22
f143729ca00ec14a98ea5c7f73acba88da97746e jdk-15+23
497fd9f9129c4928fd5a876dd55e0daf6298b511 jdk-15+24
58833044988772ca06c97ab2f142474a8627af80 jdk-15+25
58833044988772ca06c97ab2f142474a8627af80 jdk-15+25
90b266a84c06f1b3dc0ed8767856793e8c1c357e jdk-15+25
0a32396f7a690015d22ca3328ac441a358295d90 jdk-15+26
506abc554caeb275928c02bf3a16e95d1978749f jdk-15+27
506abc554caeb275928c02bf3a16e95d1978749f jdk-15+27
93813843680bbe1b7efbca56c03fd137f20a2c31 jdk-16+0
93813843680bbe1b7efbca56c03fd137f20a2c31 jdk-15+27
4a485c89d5a08b495961835f5308a96038678aeb jdk-16+1
06c9f89459daba98395fad726100feb44f89ba71 jdk-15+28
bcbe7b8a77b8971bc221c0be1bd2abb6fb68c2d0 jdk-16+2
b58fc60580550a4a587cab729d8fd87223ad6932 jdk-15+29
76810b3a88c8c641ae3850a8dfd7c40c984aea9d jdk-16+3
6909e4a1f25bfe9a2727026f5845fc1fc44a36aa jdk-15+30
e2622818f0bd30e736252eba101fe7d2c27f400b jdk-16+4
a32f58c6b8be81877411767de7ba9c4cf087c1b5 jdk-15+31
143e258f64af490010eb7e0bacc1cfaeceff0993 jdk-16+5
2dad000726b8d5db9f3df647fb4949d88f269dd4 jdk-15+32
4a8fd81d64bafa523cddb45f82805536edace106 jdk-16+6
6b65f4e7a975628df51ef755b02642075390041d jdk-15+33
c3a4a7ea7c304cabdacdc31741eb94c51351668d jdk-16+7

View File

@@ -283,7 +283,7 @@
<p>The JDK is currently known to be able to compile with at least version 9.2 of gcc.</p>
<p>In general, any version between these two should be usable.</p>
<h3 id="clang">clang</h3>
<p>The minimum accepted version of clang is 3.2. Older versions will not be accepted by <code>configure</code>.</p>
<p>The minimum accepted version of clang is 3.5. Older versions will not be accepted by <code>configure</code>.</p>
<p>To use clang instead of gcc on Linux, use <code>--with-toolchain-type=clang</code>.</p>
<h3 id="apple-xcode">Apple Xcode</h3>
<p>The oldest supported version of Xcode is 8.</p>
@@ -292,9 +292,8 @@
<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>The minimum accepted version of Visual Studio is 2010. Older versions will not be accepted by <code>configure</code>. The maximum accepted version of Visual Studio is 2019. Versions older than 2017 are unlikely to continue working for long.</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=2015</code>.</p>
<p>If you get <code>LINK: fatal error LNK1123: failure during conversion to COFF: file invalid</code> when building using Visual Studio 2010, you have encountered <a href="http://support.microsoft.com/kb/2757355">KB2757355</a>, a bug triggered by a specific installation order. However, the solution suggested by the KB article does not always resolve the problem. See <a href="https://stackoverflow.com/questions/10888391">this stackoverflow discussion</a> for other suggestions.</p>
<p>The minimum accepted version of Visual Studio is 2017. Older versions will not be accepted by <code>configure</code> and will not work. The maximum accepted version of Visual Studio is 2019.</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>
<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>
<h2 id="boot-jdk-requirements">Boot JDK Requirements</h2>

View File

@@ -323,7 +323,7 @@ In general, any version between these two should be usable.
### clang
The minimum accepted version of clang is 3.2. Older versions will not be
The minimum accepted version of clang is 3.5. Older versions will not be
accepted by `configure`.
To use clang instead of gcc on Linux, use `--with-toolchain-type=clang`.
@@ -355,20 +355,13 @@ available for this update.
### Microsoft Visual Studio
The minimum accepted version of Visual Studio is 2010. Older versions will not
be accepted by `configure`. The maximum accepted version of Visual Studio is
2019. Versions older than 2017 are unlikely to continue working for long.
The minimum accepted version of Visual Studio is 2017. Older versions will not
be accepted by `configure` and will not work. The maximum accepted
version of Visual Studio is 2019.
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=2015`.
If you get `LINK: fatal error LNK1123: failure during conversion to COFF: file
invalid` when building using Visual Studio 2010, you have encountered
[KB2757355](http://support.microsoft.com/kb/2757355), a bug triggered by a
specific installation order. However, the solution suggested by the KB article
does not always resolve the problem. See [this stackoverflow discussion](
https://stackoverflow.com/questions/10888391) for other suggestions.
setting `--with-toolchain-version`, e.g. `--with-toolchain-version=2017`.
### IBM XL C/C++

319
doc/hotspot-style.html Normal file
View File

@@ -0,0 +1,319 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>HotSpot Coding Style</title>
<style type="text/css">
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
</style>
<link rel="stylesheet" href="../make/data/docs-resources/resources/jdk-default.css" />
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<header id="title-block-header">
<h1 class="title">HotSpot Coding Style</h1>
</header>
<nav id="TOC">
<ul>
<li><a href="#introduction">Introduction</a><ul>
<li><a href="#why-care-about-style">Why Care About Style?</a></li>
<li><a href="#counterexamples-and-updates">Counterexamples and Updates</a></li>
</ul></li>
<li><a href="#structure-and-formatting">Structure and Formatting</a><ul>
<li><a href="#factoring-and-class-design">Factoring and Class Design</a></li>
<li><a href="#files">Files</a></li>
<li><a href="#naming">Naming</a></li>
<li><a href="#commenting">Commenting</a></li>
<li><a href="#macros">Macros</a></li>
<li><a href="#whitespace">Whitespace</a></li>
<li><a href="#miscellaneous">Miscellaneous</a></li>
</ul></li>
<li><a href="#use-of-c-features">Use of C++ Features</a><ul>
<li><a href="#error-handling">Error Handling</a></li>
<li><a href="#rtti-runtime-type-information">RTTI (Runtime Type Information)</a></li>
<li><a href="#memory-allocation">Memory Allocation</a></li>
<li><a href="#class-inheritance">Class Inheritance</a></li>
<li><a href="#namespaces">Namespaces</a></li>
<li><a href="#c-standard-library">C++ Standard Library</a></li>
<li><a href="#type-deduction">Type Deduction</a></li>
<li><a href="#expression-sfinae">Expression SFINAE</a></li>
<li><a href="#enum">enum</a></li>
<li><a href="#thread_local">thread_local</a></li>
<li><a href="#nullptr">nullptr</a></li>
<li><a href="#atomic">&lt;atomic&gt;</a></li>
<li><a href="#additional-permitted-features">Additional Permitted Features</a></li>
<li><a href="#excluded-features">Excluded Features</a></li>
<li><a href="#undecided-features">Undecided Features</a></li>
</ul></li>
</ul>
</nav>
<h2 id="introduction">Introduction</h2>
<p>This is a collection of rules, guidelines, and suggestions for writing HotSpot code. Following these will help new code fit in with existing HotSpot code, making it easier to read and maintain. Failure to follow these guidelines may lead to discussion during code reviews, if not outright rejection of a change.</p>
<h3 id="why-care-about-style">Why Care About Style?</h3>
<p>Some programmers seem to have lexers and even C preprocessors installed directly behind their eyeballs. The rest of us require code that is not only functionally correct but also easy to read. More than that, since there is no one style for easy-to-read code, and since a mashup of many styles is just as confusing as no style at all, it is important for coders to be conscious of the many implicit stylistic choices that historically have gone into the HotSpot code base.</p>
<p>Some of these guidelines are driven by the cross-platform requirements for HotSpot. Shared code must work on a variety of platforms, and may encounter deficiencies in some. Using platform conditionalization in shared code is usually avoided, while shared code is strongly preferred to multiple platform-dependent implementations, so some language features may be recommended against.</p>
<p>Some of the guidelines here are relatively arbitrary choices among equally plausible alternatives. The purpose of stating and enforcing these rules is largely to provide a consistent look to the code. That consistency makes the code more readable by avoiding non-functional distractions from the interesting functionality.</p>
<p>When changing pre-existing code, it is reasonable to adjust it to match these conventions. Exception: If the pre-existing code clearly conforms locally to its own peculiar conventions, it is not worth reformatting the whole thing. Also consider separating changes that make extensive stylistic updates from those which make functional changes.</p>
<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, and approved by <a href="https://en.wikipedia.org/wiki/Rough_consensus">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. Changes are likely to be cautious and incremental, since HotSpot coders have been using these guidelines for years.</p>
<h2 id="structure-and-formatting">Structure and Formatting</h2>
<h3 id="factoring-and-class-design">Factoring and Class Design</h3>
<ul>
<li><p>Group related code together, so readers can concentrate on one section of one file.</p></li>
<li><p>Classes are the primary code structuring mechanism. Place related functionality in a class, or a set of related classes. Use of either namespaces or public non-member functions is rare in HotSpot code. Static non-member functions are not uncommon.</p></li>
<li><p>If a class <code>FooBar</code> is going to be used in more than one place, put it a file named fooBar.hpp and fooBar.cpp. If the class is a sidekick to a more important class <code>BazBat</code>, it can go in bazBat.hpp.</p></li>
<li><p>Put a member function <code>FooBar::bang</code> into the same file that defined <code>FooBar</code>, or its associated <em>.inline.hpp or </em>.cpp file.</p></li>
<li><p>Use public accessor functions for member variables accessed outside the class.</p></li>
<li><p>Assign names to constant literals and use the names instead.</p></li>
<li><p>Keep functions small, a screenful at most. Split out chunks of logic into file-local classes or static functions if needed.</p></li>
<li><p>Factor away nonessential complexity into local inline helper functions and helper classes.</p></li>
<li><p>Think clearly about internal invariants that apply to each class, and document them in the form of asserts within member functions.</p></li>
<li><p>Make simple, self-evident contracts for member functions. If you cannot communicate a simple contract, redesign the class.</p></li>
<li><p>Implement classes as if expecting rough usage by clients. Check for incorrect usage of a class using <code>assert(...)</code>, <code>guarantee(...)</code>, <code>ShouldNotReachHere()</code> and comments wherever needed. Performance is almost never a reason to omit asserts.</p></li>
<li><p>When possible, design as if for reusability. This forces a clear design of the class's externals, and clean hiding of its internals.</p></li>
<li><p>Initialize all variables and data structures to a known state. If a class has a constructor, initialize it there.</p></li>
<li><p>Do no optimization before its time. Prove the need to optimize.</p></li>
<li><p>When you must defactor to optimize, preserve as much structure as possible. If you must hand-inline some name, label the local copy with the original name.</p></li>
<li><p>If you need to use a hidden detail (e.g., a structure offset), name it (as a constant or function) in the class that owns it.</p></li>
<li><p>Don't use the Copy and Paste keys to replicate more than a couple lines of code. Name what you must repeat.</p></li>
<li><p>If a class needs a member function to change a user-visible attribute, the change should be done with a &quot;setter&quot; accessor matched to the simple &quot;getter&quot;.</p></li>
</ul>
<h3 id="files">Files</h3>
<ul>
<li><p>All source files must have a globally unique basename. The build system depends on this uniqueness.</p></li>
<li><p>Do not put non-trivial function implementations in .hpp files. If the implementation depends on other .hpp files, put it in a .cpp or a .inline.hpp file.</p></li>
<li><p>.inline.hpp files should only be included in .cpp or .inline.hpp files.</p></li>
<li><p>All .cpp files include precompiled.hpp as the first include line.</p></li>
<li><p>precompiled.hpp is just a build time optimization, so don't rely on it to resolve include problems.</p></li>
<li><p>Keep the include lines alphabetically sorted.</p></li>
<li><p>Put conditional inclusions (<code>#if ...</code>) at the end of the include list.</p></li>
</ul>
<h3 id="naming">Naming</h3>
<ul>
<li><p>The length of a name may be correlated to the size of its scope. In particular, short names (even single letter names) may be fine in a small scope, but are usually inappropriate for larger scopes.</p></li>
<li><p>Prefer whole words rather than abbreviations, unless the abbreviation is more widely used than the long form in the code's domain.</p></li>
<li><p>Choose names consistently. Do not introduce spurious variations. Abbreviate corresponding terms to a consistent length.</p></li>
<li><p>Global names must be unique, to avoid <a href="https://en.cppreference.com/w/cpp/language/definition" title="One Definition Rule">One Definition Rule</a> (ODR) violations. A common prefixing scheme for related global names is often used. (This is instead of using namespaces, which are mostly avoided in HotSpot.)</p></li>
<li><p>Don't give two names to the semantically same thing. But use different names for semantically different things, even if they are representationally the same. (So use meaningful <code>typedef</code> or template alias names where appropriate.)</p></li>
<li><p>When choosing names, avoid categorical nouns like &quot;variable&quot;, &quot;field&quot;, &quot;parameter&quot;, &quot;value&quot;, and verbs like &quot;compute&quot;, &quot;get&quot;. (<code>storeValue(int param)</code> is bad.)</p></li>
<li><p>Type names and global names should use mixed-case with the first letter of each word capitalized (<code>FooBar</code>).</p></li>
<li><p>Embedded abbreviations in otherwise mixed-case names are usually capitalized entirely rather than being treated as a single word with only the initial letter capitalized, e.g. &quot;HTML&quot; rather than &quot;Html&quot;.</p></li>
<li><p>Function and local variable names use lowercase with words separated by a single underscore (<code>foo_bar</code>).</p></li>
<li><p>Class data member names have a leading underscore, and use lowercase with words separated by a single underscore (<code>_foo_bar</code>).</p></li>
<li><p>Constant names may be upper-case or mixed-case, according to historical necessity. (Note: There are many examples of constants with lowercase names.)</p></li>
<li><p>Constant names should follow an existing pattern, and must have a distinct appearance from other names in related APIs.</p></li>
<li><p>Class and type names should be noun phrases. Consider an &quot;er&quot; suffix for a class that represents an action.</p></li>
<li><p>Function names should be verb phrases that reflect changes of state known to a class's user, or else noun phrases if they cause no change of state visible to the class's user.</p></li>
<li><p>Getter accessor names are noun phrases, with no &quot;<code>get_</code>&quot; noise word. Boolean getters can also begin with &quot;<code>is_</code>&quot; or &quot;<code>has_</code>&quot;. Member function for reading data members usually have the same name as the data member, exclusive of the leading underscore.</p></li>
<li><p>Setter accessor names prepend &quot;<code>set_</code>&quot; to the getter name.</p></li>
<li><p>Other member function names are verb phrases, as if commands to the receiver.</p></li>
<li><p>Avoid leading underscores (as &quot;<code>_oop</code>&quot;) except in cases required above. (Names with leading underscores can cause portability problems.)</p></li>
</ul>
<h3 id="commenting">Commenting</h3>
<ul>
<li><p>Clearly comment subtle fixes.</p></li>
<li><p>Clearly comment tricky classes and functions.</p></li>
<li><p>If you have to choose between commenting code and writing wiki content, comment the code. Link from the wiki to the source file if it makes sense.</p></li>
<li><p>As a general rule don't add bug numbers to comments (they would soon overwhelm the code). But if the bug report contains significant information that can't reasonably be added as a comment, then refer to the bug report.</p></li>
<li><p>Personal names are discouraged in the source code, which is a team product.</p></li>
</ul>
<h3 id="macros">Macros</h3>
<ul>
<li><p>You can almost always use an inline function or class instead of a macro. Use a macro only when you really need it.</p></li>
<li><p>Templates may be preferable to multi-line macros. (There may be subtle performance effects with templates on some platforms; revert to macros if absolutely necessary.)</p></li>
<li><p><code>#ifdef</code>s should not be used to introduce platform-specific code into shared code (except for <code>_LP64</code>). They must be used to manage header files, in the pattern found at the top of every source file. They should be used mainly for major build features, including <code>PRODUCT</code>, <code>ASSERT</code>, <code>_LP64</code>, <code>INCLUDE_SERIALGC</code>, <code>COMPILER1</code>, etc.</p></li>
<li><p>For build features such as <code>PRODUCT</code>, use <code>#ifdef PRODUCT</code> for multiple-line inclusions or exclusions.</p></li>
<li><p>For short inclusions or exclusions based on build features, use macros like <code>PRODUCT_ONLY</code> and <code>NOT_PRODUCT</code>. But avoid using them with multiple-line arguments, since debuggers do not handle that well.</p></li>
<li><p>Use <code>CATCH</code>, <code>THROW</code>, etc. for HotSpot-specific exception processing.</p></li>
</ul>
<h3 id="whitespace">Whitespace</h3>
<ul>
<li><p>In general, don't change whitespace unless it improves readability or consistency. Gratuitous whitespace changes will make integrations and backports more difficult.</p></li>
<li><p>Use One-True-Brace-Style. The opening brace for a function or class is normally at the end of the line; it is sometimes moved to the beginning of the next line for emphasis. Substatements are enclosed in braces, even if there is only a single statement. Extremely simple one-line statements may drop braces around a substatement.</p></li>
<li><p>Indentation levels are two columns.</p></li>
<li><p>There is no hard line length limit. That said, bear in mind that excessively long lines can cause difficulties. Some people like to have multiple side-by-side windows in their editors, and long lines may force them to choose among unpleasant options. They can use wide windows, reducing the number that can fit across the screen, and wasting a lot of screen real estate because most lines are not that long. Alternatively, they can have more windows across the screen, with long lines wrapping (or worse, requiring scrolling to see in their entirety), which is harder to read. Similar issues exist for side-by-side code reviews.</p></li>
<li><p>Tabs are not allowed in code. Set your editor accordingly.<br> (Emacs: <code>(setq-default indent-tabs-mode nil)</code>.)</p></li>
<li><p>Use good taste to break lines and align corresponding tokens on adjacent lines.</p></li>
<li><p>Use spaces around operators, especially comparisons and assignments. (Relaxable for boolean expressions and high-precedence operators in classic math-style formulas.)</p></li>
<li><p>Put spaces on both sides of control flow keywords <code>if</code>, <code>else</code>, <code>for</code>, <code>switch</code>, etc. Don't add spaces around the associated <em>control</em> expressions. Examples:</p>
<pre><code>while (test_foo(args...)) { // Yes
while(test_foo(args...)) { // No, missing space after while
while ( test_foo(args...) ) { // No, excess spaces around control</code></pre></li>
<li><p>Use extra parentheses in expressions whenever operator precedence seems doubtful. Always use parentheses in shift/mask expressions (<code>&lt;&lt;</code>, <code>&amp;</code>, <code>|</code>). Don't add whitespace immediately inside parentheses.</p></li>
<li><p>Use more spaces and blank lines between larger constructs, such as classes or function definitions.</p></li>
<li><p>If the surrounding code has any sort of vertical organization, adjust new lines horizontally to be consistent with that organization. (E.g., trailing backslashes on long macro definitions often align.)</p></li>
</ul>
<h3 id="miscellaneous">Miscellaneous</h3>
<ul>
<li><p>Use the <a href="https://en.cppreference.com/w/cpp/language/raii" title="Resource Acquisition Is Initialization">Resource Acquisition Is Initialization</a> (RAII) design pattern to manage bracketed critical sections. See class <code>ResourceMark</code> for an example.</p></li>
<li>Avoid implicit conversions to <code>bool</code>.
<ul>
<li>Use <code>bool</code> for boolean values.</li>
<li>Do not use ints or pointers as (implicit) booleans with <code>&amp;&amp;</code>, <code>||</code>, <code>if</code>, <code>while</code>. Instead, compare explicitly, i.e. <code>if (x != 0)</code> or <code>if (ptr != nullptr)</code>, etc.</li>
<li>Do not use declarations in <em>condition</em> forms, i.e. don't use <code>if (T v = value) { ... }</code>.</li>
</ul></li>
<li><p>Use functions from globalDefinitions.hpp and related files when performing bitwise operations on integers. Do not code directly as C operators, unless they are extremely simple. (Examples: <code>align_up</code>, <code>is_power_of_2</code>, <code>exact_log2</code>.)</p></li>
<li><p>Use arrays with abstractions supporting range checks.</p></li>
<li><p>Always enumerate all cases in a switch statement or provide a default case. It is ok to have an empty default with comment.</p></li>
</ul>
<h2 id="use-of-c-features">Use of C++ Features</h2>
<p>HotSpot was originally written in a subset of the C++98/03 language. More recently, support for C++14 is provided, though again, HotSpot only uses a subset. (Backports to JDK versions lacking support for more recent Standards must of course stick with the original C++98/03 subset.)</p>
<p>This section describes that subset. Features from the C++98/03 language may be used unless explicitly excluded here. Features from C++11 and C++14 may be explicitly permitted or explicitly excluded, and discussed accordingly here. There is a third category, undecided features, about which HotSpot developers have not yet reached a consensus, or perhaps have not discussed at all. Use of these features is also excluded.</p>
<p>(The use of some features may not be immediately obvious and may slip in anyway, since the compiler will accept them. The code review process is the main defense against this.)</p>
<p>Some features are discussed in their own subsection, typically to provide more extensive discussion or rationale for limitations. Features that don't have their own subsection are listed in omnibus feature sections for permitted, excluded, and undecided features.</p>
<p>Lists of new features for C++11 and C++14, along with links to their descriptions, can be found in the online documentation for some of the compilers and libraries. The C++14 Standard is the definitive description.</p>
<ul>
<li><a href="https://gcc.gnu.org/projects/cxx-status.html">C++ Standards Support in GCC</a></li>
<li><a href="https://clang.llvm.org/cxx_status.html">C++ Support in Clang</a></li>
<li><a href="https://docs.microsoft.com/en-us/cpp/visual-cpp-language-conformance">Visual C++ Language Conformance</a></li>
<li><a href="https://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html">libstdc++ Status</a></li>
<li><a href="https://libcxx.llvm.org/cxx1y_status.html">libc++ Status</a></li>
</ul>
<p>As a rule of thumb, permitting features which simplify writing code and, especially, reading code, is encouraged.</p>
<p>Similar discussions for some other projects:</p>
<ul>
<li><p><a href="https://google.github.io/styleguide/cppguide.html">Google C++ Style Guide</a> — Currently (2020) targeting C++17.</p></li>
<li><p><a href="https://chromium-cpp.appspot.com">C++11 and C++14 use in Chromium</a> — Categorizes features as allowed, banned, or to be discussed.</p></li>
<li><p><a href="https://llvm.org/docs/CodingStandards.html">llvm Coding Standards</a> — Currently (2020) targeting C++14.</p></li>
<li><p><a href="https://firefox-source-docs.mozilla.org/code-quality/coding-style/using_cxx_in_firefox_code.html">Using C++ in Mozilla code</a> — C++17 support is required for recent versions (2020).</p></li>
</ul>
<h3 id="error-handling">Error Handling</h3>
<p>Do not use exceptions. Exceptions are disabled by the build configuration for some platforms.</p>
<p>Rationale: There is significant concern over the performance cost of exceptions and their usage model and implications for maintainable code. That's not just a matter of history that has been fixed; there remain questions and problems even today (2019). See, for example, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0709r0.pdf">Zero cost deterministic exceptions</a>. Because of this, HotSpot has always used a build configuration that disables exceptions where that is available. As a result, HotSpot code uses error handling mechanisms such as two-phase construction, factory functions, returning error codes, and immediate termination. Even if the cost of exceptions were not a concern, the existing body of code was not written with exception safety in mind. Making HotSpot exception safe would be a very large undertaking.</p>
<p>In addition to the usual alternatives to exceptions, HotSpot provides its own exception mechanism. This is based on a set of macros defined in utilities/exceptions.hpp.</p>
<h3 id="rtti-runtime-type-information">RTTI (Runtime Type Information)</h3>
<p>Do not use <a href="https://en.wikipedia.org/wiki/Run-time_type_information" title="Runtime Type Information">Runtime Type Information</a> (RTTI). <a href="https://en.wikipedia.org/wiki/Run-time_type_information" title="Runtime Type Information">RTTI</a> is disabled by the build configuration for some platforms. Among other things, this means <code>dynamic_cast</code> cannot be used.</p>
<p>Rationale: Other than to implement exceptions (which HotSpot doesn't use), most potential uses of <a href="https://en.wikipedia.org/wiki/Run-time_type_information" title="Runtime Type Information">RTTI</a> are better done via virtual functions. Some of the remainder can be replaced by bespoke mechanisms. The cost of the additional runtime data structures needed to support <a href="https://en.wikipedia.org/wiki/Run-time_type_information" title="Runtime Type Information">RTTI</a> are deemed not worthwhile, given the alternatives.</p>
<h3 id="memory-allocation">Memory Allocation</h3>
<p>Do not use the standard global allocation and deallocation functions (operator new and related functions). Use of these functions by HotSpot code is disabled for some platforms.</p>
<p>Rationale: HotSpot often uses &quot;resource&quot; or &quot;arena&quot; allocation. Even where heap allocation is used, the standard global functions are avoided in favor of wrappers around malloc and free that support the VM's Native Memory Tracking (NMT) feature.</p>
<p>Native memory allocation failures are often treated as non-recoverable. The place where &quot;out of memory&quot; is (first) detected may be an innocent bystander, unrelated to the actual culprit.</p>
<h3 id="class-inheritance">Class Inheritance</h3>
<p>Use public single inheritance.</p>
<p>Prefer composition rather than non-public inheritance.</p>
<p>Restrict inheritance to the &quot;is-a&quot; case; use composition rather than non-is-a related inheritance.</p>
<p>Avoid multiple inheritance. Never use virtual inheritance.</p>
<h3 id="namespaces">Namespaces</h3>
<p>Avoid using namespaces. HotSpot code normally uses &quot;all static&quot; classes rather than namespaces for grouping. An &quot;all static&quot; class is not instantiable, has only static members, and is normally derived (possibly indirectly) from the helper class <code>AllStatic</code>.</p>
<p>Benefits of using such classes include:</p>
<ul>
<li><p>Provides access control for members, which is unavailable with namespaces.</p></li>
<li><p>Avoids <a href="https://en.cppreference.com/w/cpp/language/adl" title="Argument Dependent Lookup">Argument Dependent Lookup</a> (ADL).</p></li>
<li><p>Closed for additional members. Namespaces allow names to be added in multiple contexts, making it harder to see the complete API.</p></li>
</ul>
<p>Namespaces should be used only in cases where one of those &quot;benefits&quot; is actually a hindrance.</p>
<p>In particular, don't use anonymous namespaces. They seem like they should be useful, and indeed have some real benefits for naming and generated code size on some platforms. Unfortunately, debuggers don't seem to like them at all.</p>
<p><a href="https://groups.google.com/forum/#!topic/mozilla.dev.platform/KsaG3lEEaRM" class="uri">https://groups.google.com/forum/#!topic/mozilla.dev.platform/KsaG3lEEaRM</a><br> Suggests Visual Studio debugger might not be able to refer to anonymous namespace symbols, so can't set breakpoints in them. Though the discussion seems to go back and forth on that.</p>
<p><a href="https://firefox-source-docs.mozilla.org/code-quality/coding-style/coding_style_cpp.html" class="uri">https://firefox-source-docs.mozilla.org/code-quality/coding-style/coding_style_cpp.html</a><br> Search for &quot;Anonymous namespaces&quot; Suggests preferring &quot;static&quot; to anonymous namespaces where applicable, because of poor debugger support for anonymous namespaces.</p>
<p><a href="https://sourceware.org/bugzilla/show_bug.cgi?id=16874" class="uri">https://sourceware.org/bugzilla/show_bug.cgi?id=16874</a><br> Bug for similar gdb problems.</p>
<h3 id="c-standard-library">C++ Standard Library</h3>
<p>Avoid using the C++ Standard Library.</p>
<p>Historically, HotSpot has mostly avoided use of the Standard Library.</p>
<p>(It used to be impossible to use most of it in shared code, because the build configuration for Solaris with Solaris Studio made all but a couple of pieces inaccessible. Support for header-only parts was added in mid-2017. Support for Solaris was removed in 2020.)</p>
<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>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>
</ul>
<p>There are a few exceptions to this rule.</p>
<ul>
<li><code>#include &lt;new&gt;</code> to use placement <code>new</code>, <code>std::nothrow</code>, and <code>std::nothrow_t</code>.</li>
<li><code>#include &lt;limits&gt;</code> to use <code>std::numeric_limits</code>.</li>
<li><code>#include &lt;type_traits&gt;</code>.</li>
<li><code>#include &lt;cstddef&gt;</code> to use <code>std::nullptr_t</code>.</li>
</ul>
<p>TODO: Rather than directly #including (permitted) Standard Library headers, use a convention of #including wrapper headers (in some location like hotspot/shared/stdcpp). This provides a single place for dealing with issues we might have for any given header, esp. platform-specific issues.</p>
<h3 id="type-deduction">Type Deduction</h3>
<p>Use type deduction only if it makes the code clearer or safer. Do not use it merely to avoid the inconvenience of writing an explicit type, unless that type is itself difficult to write. An example of the latter is a function template return type that depends on template parameters in a non-trivial way.</p>
<p>There are several contexts where types are deduced.</p>
<ul>
<li><p>Function argument deduction. This is always permitted, and indeed encouraged. It is nearly always better to allow the type of a function template argument to be deduced rather than explicitly specified.</p></li>
<li><p><code>auto</code> variable declarations (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1984.pdf">n1984</a>)<br> For local variables, this can be used to make the code clearer by eliminating type information that is obvious or irrelevant. Excessive use can make code much harder to understand.</p></li>
<li><p>Function return type deduction (<a href="https://isocpp.org/files/papers/N3638.html">n3638</a>)<br> Only use if the function body has a very small number of <code>return</code> statements, and generally relatively little other code.</p></li>
<li><p>Generic lambdas. Lambdas are not (yet) permitted.</p></li>
<li><p>Lambda init captures. Lambdas are not (yet) permitted.</p></li>
</ul>
<h3 id="expression-sfinae">Expression SFINAE</h3>
<p><a href="https://en.cppreference.com/w/cpp/language/sfinae" title="Substitution Failure Is Not An Error">Substitution Failure Is Not An Error</a> (SFINAE) is a template metaprogramming technique that makes use of template parameter substitution failures to make compile-time decisions.</p>
<p>C++11 relaxed the rules for what constitutes a hard-error when attempting to substitute template parameters with template arguments, making most deduction errors be substitution errors; see (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2634.html">n2634</a>). This makes <a href="https://en.cppreference.com/w/cpp/language/sfinae" title="Substitution Failure Is Not An Error">SFINAE</a> more powerful and easier to use. However, the implementation complexity for this change is significant, and this seems to be a place where obscure corner-case bugs in various compilers can be found. So while this feature can (and indeed should) be used (and would be difficult to avoid), caution should be used when pushing to extremes.</p>
<p>Here are a few closely related example bugs:<br> <a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95468" class="uri">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95468</a><br> <a href="https://developercommunity.visualstudio.com/content/problem/396562/sizeof-deduced-type-is-sometimes-not-a-constant-ex.html" class="uri">https://developercommunity.visualstudio.com/content/problem/396562/sizeof-deduced-type-is-sometimes-not-a-constant-ex.html</a></p>
<h3 id="enum">enum</h3>
<p>Where appropriate, <em>scoped-enums</em> should be used. (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2347.pdf">n2347</a>)</p>
<p>Use of <em>unscoped-enums</em> is permitted, though ordinary constants may be preferable when the automatic initializer feature isn't used.</p>
<p>The underlying type (the <em>enum-base</em>) of an unscoped enum type should always be specified explicitly. When unspecified, the underlying type is dependent on the range of the enumerator values and the platform.</p>
<p>The underlying type of a <em>scoped-enum</em> should also be specified explicitly if conversions may be applied to values of that type.</p>
<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>Do not use <code>thread_local</code> (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2659.htm">n2659</a>); instead, use the HotSpot macro <code>THREAD_LOCAL</code>. The initializer must be a constant expression.</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 namespace-scoped thread local variables also has the same ordering problems as for ordinary namespace-scoped variables.</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>
<h3 id="atomic">&lt;atomic&gt;</h3>
<p>Do not use facilities provided by the <code>&lt;atomic&gt;</code> header (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2427.html">n2427</a>), (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2752.htm">n2752</a>); instead, use the HotSpot <code>Atomic</code> class and related facilities.</p>
<p>Atomic operations in HotSpot code must have semantics which are consistent with those provided by the JDK's compilers for Java. There are platform-specific implementation choices that a C++ compiler might make or change that are outside the scope of the C++ Standard, and might differ from what the Java compilers implement.</p>
<p>In addition, HotSpot <code>Atomic</code> has a concept of &quot;conservative&quot; memory ordering, which may differ from (may be stronger than) sequentially consistent. There are algorithms in HotSpot that are believed to rely on that ordering.</p>
<h3 id="additional-permitted-features">Additional Permitted Features</h3>
<ul>
<li><p><code>constexpr</code> (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf">n2235</a>) (<a href="https://isocpp.org/files/papers/N3652.html">n3652</a>)</p></li>
<li><p>Sized deallocation (<a href="https://isocpp.org/files/papers/n3778.html">n3778</a>)</p></li>
<li><p>Variadic templates (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2242.pdf">n2242</a>) (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2555.pdf">n2555</a>)</p></li>
<li><p>Static assertions (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1720.html">n1720</a>)</p></li>
<li><p><code>decltype</code> (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2343.pdf">n2343</a>) (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3276.pdf">n3276</a>)</p></li>
<li><p>Right angle brackets (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1757.html">n1757</a>)</p></li>
<li><p>Default template arguments for function templates (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#226">CWG D226</a>)</p></li>
<li><p>Template aliases (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2258.pdf">n2258</a>)</p></li>
<li><p>Delegating constructors (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1986.pdf">n1986</a>)</p></li>
<li><p>Explicit conversion operators (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2437.pdf">n2437</a>)</p></li>
<li><p>Standard Layout Types (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2342.htm">n2342</a>)</p></li>
<li><p>Defaulted and deleted functions (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2346.htm">n2346</a>)</p></li>
<li><p>Dynamic initialization and destruction with concurrency (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2660.htm">n2660</a>)</p></li>
<li><p><code>final</code> virtual specifiers for classes and virtual functions (<a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2928.htm">n2928</a>), (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3206.htm">n3206</a>), (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3272.htm">n3272</a>)</p></li>
<li><p>Local and unnamed types as template parameters (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm">n2657</a>)</p></li>
</ul>
<h3 id="excluded-features">Excluded Features</h3>
<ul>
<li>New string and character literals
<ul>
<li>New character types (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2249.html">n2249</a>)</li>
<li>Unicode string literals (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm">n2442</a>)</li>
<li>Raw string literals (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm">n2442</a>)</li>
<li>Universal character name literals (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2170.html">n2170</a>)</li>
</ul>
<p>HotSpot doesn't need any of the new character and string literal types.</p></li>
<li><p>User-defined literals (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2765.pdf">n2765</a>) — User-defined literals should not be added casually, but only through a proposal to add a specific UDL.</p></li>
<li><p>Inline namespaces (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2535.htm">n2535</a>) — HotSpot makes very limited use of namespaces.</p></li>
<li><p><code>using namespace</code> directives. In particular, don't use <code>using namespace std;</code> to avoid needing to qualify Standard Library names.</p></li>
<li><p>Propagating exceptions (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html">n2179</a>) — HotSpot does not permit the use of exceptions, so this feature isn't useful.</p></li>
<li><p>Avoid namespace-scoped variables with non-constexpr initialization. In particular, avoid variables with types requiring non-trivial initialization or destruction. Initialization order problems can be difficult to deal with and lead to surprises, as can destruction ordering. HotSpot doesn't generally try to cleanup on exit, and running destructors at exit can also lead to problems.</p></li>
<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>
<p>This list is incomplete; it serves to explicitly call out some features that have not yet been discussed.</p>
<ul>
<li><p><code>overrides</code> virtual specifiers for virtual functions (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3272.htm">n3272</a>)</p></li>
<li><p>Trailing return type syntax for functions (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2541.htm">n2541</a>)</p></li>
<li><p>Variable templates (<a href="https://isocpp.org/files/papers/N3651.pdf">n3651</a>)</p></li>
<li><p>Member initializers and aggregates (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3653.html">n3653</a>)</p></li>
<li><p><code>[[noreturn]]</code> attribute (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf">n2761</a>)</p></li>
<li><p>Rvalue references and move semantics</p></li>
<li><p>Lambdas</p></li>
</ul>
</body>
</html>

810
doc/hotspot-style.md Normal file
View File

@@ -0,0 +1,810 @@
% HotSpot Coding Style
## Introduction
This is a collection of rules, guidelines, and suggestions for writing
HotSpot code. Following these will help new code fit in with existing
HotSpot code, making it easier to read and maintain. Failure to
follow these guidelines may lead to discussion during code reviews, if
not outright rejection of a change.
### Why Care About Style?
Some programmers seem to have lexers and even C preprocessors
installed directly behind their eyeballs. The rest of us require code
that is not only functionally correct but also easy to read. More than
that, since there is no one style for easy-to-read code, and since a
mashup of many styles is just as confusing as no style at all, it is
important for coders to be conscious of the many implicit stylistic
choices that historically have gone into the HotSpot code base.
Some of these guidelines are driven by the cross-platform requirements
for HotSpot. Shared code must work on a variety of platforms, and may
encounter deficiencies in some. Using platform conditionalization in
shared code is usually avoided, while shared code is strongly
preferred to multiple platform-dependent implementations, so some
language features may be recommended against.
Some of the guidelines here are relatively arbitrary choices among
equally plausible alternatives. The purpose of stating and enforcing
these rules is largely to provide a consistent look to the code. That
consistency makes the code more readable by avoiding non-functional
distractions from the interesting functionality.
When changing pre-existing code, it is reasonable to adjust it to
match these conventions. Exception: If the pre-existing code clearly
conforms locally to its own peculiar conventions, it is not worth
reformatting the whole thing. Also consider separating changes that
make extensive stylistic updates from those which make functional
changes.
### Counterexamples and Updates
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.
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 "When in Rome do as the Romans". Sometimes in the
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
list, and approved by
[rough consensus](https://en.wikipedia.org/wiki/Rough_consensus) of
the [HotSpot Group](https://openjdk.java.net/census#hotspot) Members.
The Group Lead determines whether consensus has been reached.
Changes are likely to be cautious and incremental, since HotSpot
coders have been using these guidelines for years.
## Structure and Formatting
### Factoring and Class Design
* Group related code together, so readers can concentrate on one
section of one file.
* Classes are the primary code structuring mechanism. Place related
functionality in a class, or a set of related classes. Use of either
namespaces or public non-member functions is rare in HotSpot code.
Static non-member functions are not uncommon.
* If a class `FooBar` is going to be used in more than one place, put it
a file named fooBar.hpp and fooBar.cpp. If the class is a sidekick
to a more important class `BazBat`, it can go in bazBat.hpp.
* Put a member function `FooBar::bang` into the same file that defined
`FooBar`, or its associated *.inline.hpp or *.cpp file.
* Use public accessor functions for member variables accessed
outside the class.
* Assign names to constant literals and use the names instead.
* Keep functions small, a screenful at most. Split out chunks of
logic into file-local classes or static functions if needed.
* Factor away nonessential complexity into local inline helper
functions and helper classes.
* Think clearly about internal invariants that apply to each class,
and document them in the form of asserts within member functions.
* Make simple, self-evident contracts for member functions. If you cannot
communicate a simple contract, redesign the class.
* Implement classes as if expecting rough usage by clients. Check for
incorrect usage of a class using `assert(...)`, `guarantee(...)`,
`ShouldNotReachHere()` and comments wherever needed. Performance is
almost never a reason to omit asserts.
* When possible, design as if for reusability. This forces a clear
design of the class's externals, and clean hiding of its internals.
* Initialize all variables and data structures to a known state. If a
class has a constructor, initialize it there.
* Do no optimization before its time. Prove the need to optimize.
* When you must defactor to optimize, preserve as much structure as
possible. If you must hand-inline some name, label the local copy with
the original name.
* If you need to use a hidden detail (e.g., a structure offset), name
it (as a constant or function) in the class that owns it.
* Don't use the Copy and Paste keys to replicate more than a couple
lines of code. Name what you must repeat.
* If a class needs a member function to change a user-visible attribute, the
change should be done with a "setter" accessor matched to the simple
"getter".
### Files
* All source files must have a globally unique basename. The build
system depends on this uniqueness.
* Do not put non-trivial function implementations in .hpp files. If
the implementation depends on other .hpp files, put it in a .cpp or
a .inline.hpp file.
* .inline.hpp files should only be included in .cpp or .inline.hpp
files.
* All .cpp files include precompiled.hpp as the first include line.
* precompiled.hpp is just a build time optimization, so don't rely on
it to resolve include problems.
* Keep the include lines alphabetically sorted.
* Put conditional inclusions (`#if ...`) at the end of the include list.
### Naming
* The length of a name may be correlated to the size of its scope. In
particular, short names (even single letter names) may be fine in a
small scope, but are usually inappropriate for larger scopes.
* Prefer whole words rather than abbreviations, unless the
abbreviation is more widely used than the long form in the code's
domain.
* Choose names consistently. Do not introduce spurious
variations. Abbreviate corresponding terms to a consistent length.
* Global names must be unique, to avoid [One Definition Rule][ODR] (ODR)
violations. A common prefixing scheme for related global names is
often used. (This is instead of using namespaces, which are mostly
avoided in HotSpot.)
* Don't give two names to the semantically same thing. But use
different names for semantically different things, even if they are
representationally the same. (So use meaningful `typedef` or template
alias names where appropriate.)
* When choosing names, avoid categorical nouns like "variable",
"field", "parameter", "value", and verbs like "compute", "get".
(`storeValue(int param)` is bad.)
* Type names and global names should use mixed-case with the first
letter of each word capitalized (`FooBar`).
* Embedded abbreviations in
otherwise mixed-case names are usually capitalized entirely rather
than being treated as a single word with only the initial letter
capitalized, e.g. "HTML" rather than "Html".
* Function and local variable names use lowercase with words separated
by a single underscore (`foo_bar`).
* Class data member names have a leading underscore, and use lowercase
with words separated by a single underscore (`_foo_bar`).
* Constant names may be upper-case or mixed-case, according to
historical necessity. (Note: There are many examples of constants
with lowercase names.)
* Constant names should follow an existing pattern, and must have a
distinct appearance from other names in related APIs.
* Class and type names should be noun phrases. Consider an "er" suffix
for a class that represents an action.
* Function names should be verb phrases that reflect changes of state
known to a class's user, or else noun phrases if they cause no change
of state visible to the class's user.
* Getter accessor names are noun phrases, with no "`get_`" noise
word. Boolean getters can also begin with "`is_`" or "`has_`". Member
function for reading data members usually have the same name as the
data member, exclusive of the leading underscore.
* Setter accessor names prepend "`set_`" to the getter name.
* Other member function names are verb phrases, as if commands to the receiver.
* Avoid leading underscores (as "`_oop`") except in cases required
above. (Names with leading underscores can cause portability
problems.)
### Commenting
* Clearly comment subtle fixes.
* Clearly comment tricky classes and functions.
* If you have to choose between commenting code and writing wiki
content, comment the code. Link from the wiki to the source file if
it makes sense.
* As a general rule don't add bug numbers to comments (they would soon
overwhelm the code). But if the bug report contains significant
information that can't reasonably be added as a comment, then refer to
the bug report.
* Personal names are discouraged in the source code, which is a team
product.
### Macros
* You can almost always use an inline function or class instead of a
macro. Use a macro only when you really need it.
* Templates may be preferable to multi-line macros. (There may be
subtle performance effects with templates on some platforms; revert
to macros if absolutely necessary.)
* `#ifdef`s should not be used to introduce platform-specific code
into shared code (except for `_LP64`). They must be used to manage
header files, in the pattern found at the top of every source
file. They should be used mainly for major build features, including
`PRODUCT`, `ASSERT`, `_LP64`, `INCLUDE_SERIALGC`, `COMPILER1`, etc.
* For build features such as `PRODUCT`, use `#ifdef PRODUCT` for
multiple-line inclusions or exclusions.
* For short inclusions or exclusions based on build features, use
macros like `PRODUCT_ONLY` and `NOT_PRODUCT`. But avoid using them
with multiple-line arguments, since debuggers do not handle that
well.
* Use `CATCH`, `THROW`, etc. for HotSpot-specific exception processing.
### Whitespace
* In general, don't change whitespace unless it improves readability
or consistency. Gratuitous whitespace changes will make integrations
and backports more difficult.
* Use One-True-Brace-Style. The opening brace for a function or class
is normally at the end of the line; it is sometimes moved to the
beginning of the next line for emphasis. Substatements are enclosed
in braces, even if there is only a single statement. Extremely simple
one-line statements may drop braces around a substatement.
* Indentation levels are two columns.
* There is no hard line length limit. That said, bear in mind that
excessively long lines can cause difficulties. Some people like to
have multiple side-by-side windows in their editors, and long lines
may force them to choose among unpleasant options. They can use wide
windows, reducing the number that can fit across the screen, and
wasting a lot of screen real estate because most lines are not that
long. Alternatively, they can have more windows across the screen,
with long lines wrapping (or worse, requiring scrolling to see in
their entirety), which is harder to read. Similar issues exist for
side-by-side code reviews.
* Tabs are not allowed in code. Set your editor accordingly.<br>
(Emacs: `(setq-default indent-tabs-mode nil)`.)
* Use good taste to break lines and align corresponding tokens on
adjacent lines.
* Use spaces around operators, especially comparisons and
assignments. (Relaxable for boolean expressions and high-precedence
operators in classic math-style formulas.)
* Put spaces on both sides of control flow keywords `if`, `else`,
`for`, `switch`, etc. Don't add spaces around the associated
_control_ expressions. Examples:
```
while (test_foo(args...)) { // Yes
while(test_foo(args...)) { // No, missing space after while
while ( test_foo(args...) ) { // No, excess spaces around control
```
* Use extra parentheses in expressions whenever operator precedence
seems doubtful. Always use parentheses in shift/mask expressions
(`<<`, `&`, `|`). Don't add whitespace immediately inside
parentheses.
* Use more spaces and blank lines between larger constructs, such as
classes or function definitions.
* If the surrounding code has any sort of vertical organization,
adjust new lines horizontally to be consistent with that
organization. (E.g., trailing backslashes on long macro definitions
often align.)
### Miscellaneous
* Use the [Resource Acquisition Is Initialization][RAII] (RAII)
design pattern to manage bracketed critical
sections. See class `ResourceMark` for an example.
* Avoid implicit conversions to `bool`.
* Use `bool` for boolean values.
* Do not use ints or pointers as (implicit) booleans with `&&`, `||`,
`if`, `while`. Instead, compare explicitly, i.e. `if (x != 0)` or
`if (ptr != nullptr)`, etc.
* Do not use declarations in _condition_ forms, i.e. don't use
`if (T v = value) { ... }`.
* Use functions from globalDefinitions.hpp and related files when
performing bitwise
operations on integers. Do not code directly as C operators, unless
they are extremely simple. (Examples: `align_up`, `is_power_of_2`,
`exact_log2`.)
* Use arrays with abstractions supporting range checks.
* Always enumerate all cases in a switch statement or provide a default
case. It is ok to have an empty default with comment.
## Use of C++ Features
HotSpot was originally written in a subset of the C++98/03 language.
More recently, support for C++14 is provided, though again,
HotSpot only uses a subset. (Backports to JDK versions lacking
support for more recent Standards must of course stick with the
original C++98/03 subset.)
This section describes that subset. Features from the C++98/03
language may be used unless explicitly excluded here. Features from
C++11 and C++14 may be explicitly permitted or explicitly excluded,
and discussed accordingly here. There is a third category, undecided
features, about which HotSpot developers have not yet reached a
consensus, or perhaps have not discussed at all. Use of these
features is also excluded.
(The use of some features may not be immediately obvious and may slip
in anyway, since the compiler will accept them. The code review
process is the main defense against this.)
Some features are discussed in their own subsection, typically to provide
more extensive discussion or rationale for limitations. Features that
don't have their own subsection are listed in omnibus feature sections
for permitted, excluded, and undecided features.
Lists of new features for C++11 and C++14, along with links to their
descriptions, can be found in the online documentation for some of the
compilers and libraries. The C++14 Standard is the definitive
description.
* [C++ Standards Support in GCC](https://gcc.gnu.org/projects/cxx-status.html)
* [C++ Support in Clang](https://clang.llvm.org/cxx_status.html)
* [Visual C++ Language Conformance](https://docs.microsoft.com/en-us/cpp/visual-cpp-language-conformance)
* [libstdc++ Status](https://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html)
* [libc++ Status](https://libcxx.llvm.org/cxx1y_status.html)
As a rule of thumb, permitting features which simplify writing code
and, especially, reading code, is encouraged.
Similar discussions for some other projects:
* [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html) &mdash;
Currently (2020) targeting C++17.
* [C++11 and C++14 use in Chromium](https://chromium-cpp.appspot.com) &mdash;
Categorizes features as allowed, banned, or to be discussed.
* [llvm Coding Standards](https://llvm.org/docs/CodingStandards.html) &mdash;
Currently (2020) targeting C++14.
* [Using C++ in Mozilla code](https://firefox-source-docs.mozilla.org/code-quality/coding-style/using_cxx_in_firefox_code.html) &mdash;
C++17 support is required for recent versions (2020).
### Error Handling
Do not use exceptions. Exceptions are disabled by the build configuration
for some platforms.
Rationale: There is significant concern over the performance cost of
exceptions and their usage model and implications for maintainable code.
That's not just a matter of history that has been fixed; there remain
questions and problems even today (2019). See, for example, [Zero cost
deterministic
exceptions](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0709r0.pdf).
Because of this, HotSpot has always used a build configuration that disables
exceptions where that is available. As a result, HotSpot code uses error
handling mechanisms such as two-phase construction, factory functions,
returning error codes, and immediate termination. Even if the cost of
exceptions were not a concern, the existing body of code was not written with
exception safety in mind. Making HotSpot exception safe would be a very large
undertaking.
In addition to the usual alternatives to exceptions, HotSpot provides its
own exception mechanism. This is based on a set of macros defined in
utilities/exceptions.hpp.
### RTTI (Runtime Type Information)
Do not use [Runtime Type Information][RTTI] (RTTI).
[RTTI][] is disabled by the build configuration for some
platforms. Among other things, this means `dynamic_cast` cannot be used.
Rationale: Other than to implement exceptions (which HotSpot doesn't use),
most potential uses of [RTTI][] are better done via virtual functions. Some of
the remainder can be replaced by bespoke mechanisms. The cost of the
additional runtime data structures needed to support [RTTI][] are deemed not
worthwhile, given the alternatives.
### Memory Allocation
Do not use the standard global allocation and deallocation functions
(operator new and related functions). Use of these functions by HotSpot
code is disabled for some platforms.
Rationale: HotSpot often uses "resource" or "arena" allocation. Even
where heap allocation is used, the standard global functions are
avoided in favor of wrappers around malloc and free that support the
VM's Native Memory Tracking (NMT) feature.
Native memory allocation failures are often treated as non-recoverable.
The place where "out of memory" is (first) detected may be an innocent
bystander, unrelated to the actual culprit.
### Class Inheritance
Use public single inheritance.
Prefer composition rather than non-public inheritance.
Restrict inheritance to the "is-a" case; use composition rather than
non-is-a related inheritance.
Avoid multiple inheritance. Never use virtual inheritance.
### Namespaces
Avoid using namespaces. HotSpot code normally uses "all static"
classes rather than namespaces for grouping. An "all static" class is
not instantiable, has only static members, and is normally derived
(possibly indirectly) from the helper class `AllStatic`.
Benefits of using such classes include:
* Provides access control for members, which is unavailable with
namespaces.
* Avoids [Argument Dependent Lookup][ADL] (ADL).
* Closed for additional members. Namespaces allow names to be added in
multiple contexts, making it harder to see the complete API.
Namespaces should be used only in cases where one of those "benefits"
is actually a hindrance.
In particular, don't use anonymous namespaces. They seem like they should
be useful, and indeed have some real benefits for naming and generated code
size on some platforms. Unfortunately, debuggers don't seem to like them at
all.
<https://groups.google.com/forum/#!topic/mozilla.dev.platform/KsaG3lEEaRM><br>
Suggests Visual Studio debugger might not be able to refer to
anonymous namespace symbols, so can't set breakpoints in them.
Though the discussion seems to go back and forth on that.
<https://firefox-source-docs.mozilla.org/code-quality/coding-style/coding_style_cpp.html><br>
Search for "Anonymous namespaces"
Suggests preferring "static" to anonymous namespaces where applicable,
because of poor debugger support for anonymous namespaces.
<https://sourceware.org/bugzilla/show_bug.cgi?id=16874><br>
Bug for similar gdb problems.
### C++ Standard Library
Avoid using the C++ Standard Library.
Historically, HotSpot has mostly avoided use of the Standard
Library.
(It used to be impossible to use most of it in shared code,
because the build configuration for Solaris with Solaris Studio made
all but a couple of pieces inaccessible. Support for header-only
parts was added in mid-2017. Support for Solaris was removed
in 2020.)
Some reasons for this include
* 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.
* `assert`. An issue that is quickly encountered is the `assert` macro name
collision ([JDK-8007770](https://bugs.openjdk.java.net/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.)
* Memory allocation. HotSpot requires explicit control over where
allocations occur. The C++98/03 `std::allocator` class is too limited
to support our usage. (Changes in more recent Standards may remove
this limitation.)
* Implementation vagaries. Bugs, or simply different implementation choices,
can lead to different behaviors among the various Standard Libraries we need
to deal with.
* Inconsistent naming conventions. HotSpot and the C++ Standard use
different naming conventions. The coexistence of those different conventions
might appear jarring and reduce readability.
There are a few exceptions to this rule.
* `#include <new>` to use placement `new`, `std::nothrow`, and `std::nothrow_t`.
* `#include <limits>` to use `std::numeric_limits`.
* `#include <type_traits>`.
* `#include <cstddef>` to use `std::nullptr_t`.
TODO: Rather than directly \#including (permitted) Standard Library
headers, use a convention of \#including wrapper headers (in some
location like hotspot/shared/stdcpp). This provides a single place
for dealing with issues we might have for any given header, esp.
platform-specific issues.
### Type Deduction
Use type deduction only if it makes the code clearer or safer. Do not
use it merely to avoid the inconvenience of writing an explicit type,
unless that type is itself difficult to write. An example of the
latter is a function template return type that depends on template
parameters in a non-trivial way.
There are several contexts where types are deduced.
* Function argument deduction. This is always permitted, and indeed
encouraged. It is nearly always better to allow the type of a
function template argument to be deduced rather than explicitly
specified.
* `auto` variable declarations
([n1984](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1984.pdf))<br>
For local variables, this can be used to make the code clearer by
eliminating type information that is obvious or irrelevant. Excessive
use can make code much harder to understand.
* Function return type deduction
([n3638](https://isocpp.org/files/papers/N3638.html))<br>
Only use if the function body has a very small number of `return`
statements, and generally relatively little other code.
* Generic lambdas. Lambdas are not (yet) permitted.
* Lambda init captures. Lambdas are not (yet) permitted.
### Expression SFINAE
[Substitution Failure Is Not An Error][SFINAE] (SFINAE)
is a template metaprogramming technique that makes use of
template parameter substitution failures to make compile-time decisions.
C++11 relaxed the rules for what constitutes a hard-error when
attempting to substitute template parameters with template arguments,
making most deduction errors be substitution errors; see
([n2634](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2634.html)).
This makes [SFINAE][] more powerful and easier to use. However, the
implementation complexity for this change is significant, and this
seems to be a place where obscure corner-case bugs in various
compilers can be found. So while this feature can (and indeed should)
be used (and would be difficult to avoid), caution should be used when
pushing to extremes.
Here are a few closely related example bugs:<br>
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95468><br>
<https://developercommunity.visualstudio.com/content/problem/396562/sizeof-deduced-type-is-sometimes-not-a-constant-ex.html>
### enum
Where appropriate, _scoped-enums_ should be used.
([n2347](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2347.pdf))
Use of _unscoped-enums_ is permitted, though ordinary constants may be
preferable when the automatic initializer feature isn't used.
The underlying type (the _enum-base_) of an unscoped enum type should
always be specified explicitly. When unspecified, the underlying type
is dependent on the range of the enumerator values and the platform.
The underlying type of a _scoped-enum_ should also be specified
explicitly if conversions may be applied to values of that type.
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.
### thread_local
Do not use `thread_local`
([n2659](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2659.htm));
instead, use the HotSpot macro `THREAD_LOCAL`. The initializer must
be a constant expression.
As was discussed in the review for
[JDK-8230877](https://mail.openjdk.java.net/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
different translation unit, even if they don't need dynamic
initialization. Dynamic initialization and destruction of
namespace-scoped thread local variables also has the same ordering
problems as for ordinary namespace-scoped variables.
### nullptr
Prefer `nullptr`
([n2431](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf))
to `NULL`. Don't use (constexpr or literal) 0 for pointers.
For historical reasons there are widespread uses of both `NULL` and of
integer 0 as a pointer value.
### &lt;atomic&gt;
Do not use facilities provided by the `<atomic>` header
([n2427](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2427.html)),
([n2752](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2752.htm));
instead, use the HotSpot `Atomic` class and related facilities.
Atomic operations in HotSpot code must have semantics which are
consistent with those provided by the JDK's compilers for Java. There
are platform-specific implementation choices that a C++ compiler might
make or change that are outside the scope of the C++ Standard, and
might differ from what the Java compilers implement.
In addition, HotSpot `Atomic` has a concept of "conservative" memory
ordering, which may differ from (may be stronger than) sequentially
consistent. There are algorithms in HotSpot that are believed to rely
on that ordering.
### Additional Permitted Features
* `constexpr`
([n2235](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf))
([n3652](https://isocpp.org/files/papers/N3652.html))
* Sized deallocation
([n3778](https://isocpp.org/files/papers/n3778.html))
* Variadic templates
([n2242](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2242.pdf))
([n2555](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2555.pdf))
* Static assertions
([n1720](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1720.html))
* `decltype`
([n2343](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2343.pdf))
([n3276](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3276.pdf))
* Right angle brackets
([n1757](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1757.html))
* Default template arguments for function templates
([CWG D226](http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#226))
* Template aliases
([n2258](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2258.pdf))
* Delegating constructors
([n1986](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1986.pdf))
* Explicit conversion operators
([n2437](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2437.pdf))
* Standard Layout Types
([n2342](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2342.htm))
* Defaulted and deleted functions
([n2346](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2346.htm))
* Dynamic initialization and destruction with concurrency
([n2660](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2660.htm))
* `final` virtual specifiers for classes and virtual functions
([n2928](http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2928.htm)),
([n3206](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3206.htm)),
([n3272](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3272.htm))
* Local and unnamed types as template parameters
([n2657](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm))
### Excluded Features
* New string and character literals
* New character types
([n2249](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2249.html))
* Unicode string literals
([n2442](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm))
* Raw string literals
([n2442](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm))
* Universal character name literals
([n2170](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2170.html))
HotSpot doesn't need any of the new character and string literal
types.
* User-defined literals
([n2765](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2765.pdf)) &mdash;
User-defined literals should not be added casually, but only
through a proposal to add a specific UDL.
* Inline namespaces
([n2535](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2535.htm)) &mdash;
HotSpot makes very limited use of namespaces.
* `using namespace` directives. In particular, don't use `using
namespace std;` to avoid needing to qualify Standard Library names.
* Propagating exceptions
([n2179](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html)) &mdash;
HotSpot does not permit the use of exceptions, so this feature isn't useful.
* Avoid namespace-scoped variables with non-constexpr initialization.
In particular, avoid variables with types requiring non-trivial
initialization or destruction. Initialization order problems can be
difficult to deal with and lead to surprises, as can destruction
ordering. HotSpot doesn't generally try to cleanup on exit, and
running destructors at exit can also lead to problems.
* `[[deprecated]]` attribute
([n3760](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3760.html)) &mdash;
Not relevant in HotSpot code.
* Avoid most operator overloading, preferring named functions. When
operator overloading is used, ensure the semantics conform to the
normal expected behavior of the operation.
* Avoid most implicit conversion constructors and (implicit or explicit)
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
This list is incomplete; it serves to explicitly call out some
features that have not yet been discussed.
* `overrides` virtual specifiers for virtual functions
([n3272](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3272.htm))
* Trailing return type syntax for functions
([n2541](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2541.htm))
* Variable templates
([n3651](https://isocpp.org/files/papers/N3651.pdf))
* Member initializers and aggregates
([n3653](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3653.html))
* `[[noreturn]]` attribute
([n2761](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf))
* Rvalue references and move semantics
* Lambdas
[ADL]: https://en.cppreference.com/w/cpp/language/adl
"Argument Dependent Lookup"
[ODR]: https://en.cppreference.com/w/cpp/language/definition
"One Definition Rule"
[RAII]: https://en.cppreference.com/w/cpp/language/raii
"Resource Acquisition Is Initialization"
[RTTI]: https://en.wikipedia.org/wiki/Run-time_type_information
"Runtime Type Information"
[SFINAE]: https://en.cppreference.com/w/cpp/language/sfinae
"Substitution Failure Is Not An Error"

View File

@@ -137,6 +137,8 @@ TEST FAILURE</code></pre>
<h4 id="timeout_factor-1">TIMEOUT_FACTOR</h4>
<p>The timeout factor (<code>-timeoutFactor</code>).</p>
<p>Defaults to 4.</p>
<h4 id="failure_handler_timeout">FAILURE_HANDLER_TIMEOUT</h4>
<p>Sets the argument <code>-timeoutHandlerTimeout</code> for JTReg. The default value is 0. This is only valid if the failure handler is built.</p>
<h4 id="test_mode">TEST_MODE</h4>
<p>The test mode (<code>agentvm</code> or <code>othervm</code>).</p>
<p>Defaults to <code>agentvm</code>.</p>
@@ -153,8 +155,10 @@ TEST FAILURE</code></pre>
<p>Limit memory consumption (<code>-Xmx</code> and <code>-vmoption:-Xmx</code>, or none).</p>
<p>Limit memory consumption for JTReg test framework and VM under test. Set to 0 to disable the limits.</p>
<p>Defaults to 512m, except for hotspot, where it defaults to 0 (no limit).</p>
<h4 id="max_output">MAX_OUTPUT</h4>
<p>Set the property <code>javatest.maxOutputSize</code> for the launcher, to change the default JTReg log limit.</p>
<h4 id="keywords">KEYWORDS</h4>
<p>JTReg kewords sent to JTReg using <code>-k</code>. Please be careful in making sure that spaces and special characters (like <code>!</code>) are properly quoted. To avoid some issues, the special value <code>%20</code> can be used instead of space.</p>
<p>JTReg keywords sent to JTReg using <code>-k</code>. Please be careful in making sure that spaces and special characters (like <code>!</code>) are properly quoted. To avoid some issues, the special value <code>%20</code> can be used instead of space.</p>
<h4 id="extra_problem_lists">EXTRA_PROBLEM_LISTS</h4>
<p>Use additional problem lists file or files, in addition to the default ProblemList.txt located at the JTReg test roots.</p>
<p>If multiple file names are specified, they should be separated by space (or, to help avoid quoting issues, the special value <code>%20</code>).</p>
@@ -170,6 +174,8 @@ TEST FAILURE</code></pre>
<h4 id="vm_options-1">VM_OPTIONS</h4>
<p>Additional Java options to be used when compiling and running classes (sent to JTReg as <code>-vmoption</code>).</p>
<p>This option is only needed in special circumstances. To pass Java options to your test classes, use <code>JAVA_OPTIONS</code>.</p>
<h4 id="launcher_options">LAUNCHER_OPTIONS</h4>
<p>Additional Java options that are sent to the java launcher that starts the JTReg harness.</p>
<h4 id="aot_modules-1">AOT_MODULES</h4>
<p>Generate AOT modules before testing for the specified module, or set of modules. If multiple modules are specified, they should be separated by space (or, to help avoid quoting issues, the special value <code>%20</code>).</p>
<h4 id="retry_count">RETRY_COUNT</h4>
@@ -205,14 +211,19 @@ TEST FAILURE</code></pre>
<p>Docker tests with default parameters may fail on systems with glibc versions not compatible with the one used in the default docker image (e.g., Oracle Linux 7.6 for x86). For example, they pass on Ubuntu 16.04 but fail on Ubuntu 18.04 if run like this on x86:</p>
<pre><code>$ make test TEST=&quot;jtreg:test/hotspot/jtreg/containers/docker&quot;</code></pre>
<p>To run these tests correctly, additional parameters for the correct docker image are required on Ubuntu 18.04 by using <code>JAVA_OPTIONS</code>.</p>
<pre><code>$ make test TEST=&quot;jtreg:test/hotspot/jtreg/containers/docker&quot; JTREG=&quot;JAVA_OPTIONS=-Djdk.test.docker.image.name=ubuntu -Djdk.test.docker.image.version=latest&quot;</code></pre>
<pre><code>$ make test TEST=&quot;jtreg:test/hotspot/jtreg/containers/docker&quot; \
JTREG=&quot;JAVA_OPTIONS=-Djdk.test.docker.image.name=ubuntu
-Djdk.test.docker.image.version=latest&quot;</code></pre>
<h3 id="non-us-locale">Non-US locale</h3>
<p>If your locale is non-US, some tests are likely to fail. To work around this you can set the locale to US. On Unix platforms simply setting <code>LANG=&quot;en_US&quot;</code> in the environment before running tests should work. On Windows, setting <code>JTREG=&quot;VM_OPTIONS=-Duser.language=en -Duser.country=US&quot;</code> helps for most, but not all test cases. For example:</p>
<p>If your locale is non-US, some tests are likely to fail. To work around this you can set the locale to US. On Unix platforms simply setting <code>LANG=&quot;en_US&quot;</code> in the environment before running tests should work. On Windows, setting <code>JTREG=&quot;VM_OPTIONS=-Duser.language=en -Duser.country=US&quot;</code> helps for most, but not all test cases.</p>
<p>For example:</p>
<pre><code>$ export LANG=&quot;en_US&quot; &amp;&amp; make test TEST=...
$ make test JTREG=&quot;VM_OPTIONS=-Duser.language=en -Duser.country=US&quot; TEST=...</code></pre>
<h3 id="pkcs11-tests">PKCS11 Tests</h3>
<p>It is highly recommended to use the latest NSS version when running PKCS11 tests. Improper NSS version may lead to unexpected failures which are hard to diagnose. For example, sun/security/pkcs11/Secmod/AddTrustedCert.java may fail on Ubuntu 18.04 with the default NSS version in the system. To run these tests correctly, the system property <code>test.nss.lib.paths</code> is required on Ubuntu 18.04 to specify the alternative NSS lib directories. For example:</p>
<pre><code>$ make test TEST=&quot;jtreg:sun/security/pkcs11/Secmod/AddTrustedCert.java&quot; JTREG=&quot;JAVA_OPTIONS=-Dtest.nss.lib.paths=/path/to/your/latest/NSS-libs&quot;</code></pre>
<p>It is highly recommended to use the latest NSS version when running PKCS11 tests. Improper NSS version may lead to unexpected failures which are hard to diagnose. For example, sun/security/pkcs11/Secmod/AddTrustedCert.java may fail on Ubuntu 18.04 with the default NSS version in the system. To run these tests correctly, the system property <code>test.nss.lib.paths</code> is required on Ubuntu 18.04 to specify the alternative NSS lib directories.</p>
<p>For example:</p>
<pre><code>$ make test TEST=&quot;jtreg:sun/security/pkcs11/Secmod/AddTrustedCert.java&quot; \
JTREG=&quot;JAVA_OPTIONS=-Dtest.nss.lib.paths=/path/to/your/latest/NSS-libs&quot;</code></pre>
<p>For more notes about the PKCS11 tests, please refer to test/jdk/sun/security/pkcs11/README.</p>
<h3 id="client-ui-tests">Client UI Tests</h3>
<p>Some Client UI tests use key sequences which may be reserved by the operating system. Usually that causes the test failure. So it is highly recommended to disable system key shortcuts prior testing. The steps to access and disable system key shortcuts for various platforms are provided below.</p>

View File

@@ -37,11 +37,11 @@ Note that this option should point to the JTReg home, i.e. the top directory,
containing `lib/jtreg.jar` etc. (An alternative is to set the `JT_HOME`
environment variable to point to the JTReg home before running `configure`.)
To be able to run microbenchmarks, `configure` needs to know where to find
the JMH dependency. Use `--with-jmh=<path to JMH jars>` to point to a directory
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.
To be able to run microbenchmarks, `configure` needs to know where to find the
JMH dependency. Use `--with-jmh=<path to JMH jars>` to point to a directory
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.
## Test selection
@@ -182,10 +182,10 @@ variables.
These variables use a keyword=value approach to allow multiple values to be
set. So, for instance, `JTREG="JOBS=1;TIMEOUT_FACTOR=8"` will set the JTReg
concurrency level to 1 and the timeout factor to 8. This is equivalent to
setting `JTREG_JOBS=1 JTREG_TIMEOUT_FACTOR=8`, but using the keyword format means that
the `JTREG` variable is parsed and verified for correctness, so
`JTREG="TMIEOUT_FACTOR=8"` would give an error, while `JTREG_TMIEOUT_FACTOR=8` would just
pass unnoticed.
setting `JTREG_JOBS=1 JTREG_TIMEOUT_FACTOR=8`, but using the keyword format
means that the `JTREG` variable is parsed and verified for correctness, so
`JTREG="TMIEOUT_FACTOR=8"` would give an error, while `JTREG_TMIEOUT_FACTOR=8`
would just pass unnoticed.
To separate multiple keyword=value pairs, use `;` (semicolon). Since the shell
normally eats `;`, the recommended usage is to write the assignment inside
@@ -203,9 +203,10 @@ test suites.
### General keywords (TEST_OPTS)
Some keywords are valid across different test suites. If you want to run
tests from multiple test suites, or just don't want to care which test suite specific
control variable to use, then you can use the general TEST_OPTS control variable.
Some keywords are valid across different test suites. If you want to run tests
from multiple test suites, or just don't want to care which test suite specific
control variable to use, then you can use the general TEST_OPTS control
variable.
There are also some keywords that applies globally to the test runner system,
not to any specific test suites. These are also available as TEST_OPTS keywords.
@@ -252,12 +253,13 @@ for only recently changed code. JCOV_DIFF_CHANGESET specifies a source
revision. A textual report will be generated showing coverage of the diff
between the specified revision and the repository tip.
The report is stored in `build/$BUILD/test-results/jcov-output/diff_coverage_report`
file.
The report is stored in
`build/$BUILD/test-results/jcov-output/diff_coverage_report` file.
### JTReg keywords
#### JOBS
The test concurrency (`-concurrency`).
Defaults to TEST_JOBS (if set by `--with-test-jobs=`), otherwise it defaults to
@@ -265,32 +267,43 @@ JOBS, except for Hotspot, where the default is *number of CPU cores/2*,
but never more than *memory size in GB/2*.
#### TIMEOUT_FACTOR
The timeout factor (`-timeoutFactor`).
Defaults to 4.
#### FAILURE_HANDLER_TIMEOUT
Sets the argument `-timeoutHandlerTimeout` for JTReg. The default value is 0.
This is only valid if the failure handler is built.
#### TEST_MODE
The test mode (`agentvm` or `othervm`).
Defaults to `agentvm`.
#### ASSERT
Enable asserts (`-ea -esa`, or none).
Set to `true` or `false`. If true, adds `-ea -esa`. Defaults to true, except
for hotspot.
#### VERBOSE
The verbosity level (`-verbose`).
Defaults to `fail,error,summary`.
#### RETAIN
What test data to retain (`-retain`).
Defaults to `fail,error`.
#### MAX_MEM
Limit memory consumption (`-Xmx` and `-vmoption:-Xmx`, or none).
Limit memory consumption for JTReg test framework and VM under test. Set to 0
@@ -298,9 +311,14 @@ to disable the limits.
Defaults to 512m, except for hotspot, where it defaults to 0 (no limit).
#### MAX_OUTPUT
Set the property `javatest.maxOutputSize` for the launcher, to change the
default JTReg log limit.
#### KEYWORDS
JTReg kewords sent to JTReg using `-k`. Please be careful in making sure that
JTReg keywords sent to JTReg using `-k`. Please be careful in making sure that
spaces and special characters (like `!`) are properly quoted. To avoid some
issues, the special value `%20` can be used instead of space.
@@ -323,23 +341,30 @@ Set to `true` or `false`.
If `true`, JTReg will use `-match:` option, otherwise `-exclude:` will be used.
Default is `false`.
#### OPTIONS
Additional options to the JTReg test framework.
Use `JTREG="OPTIONS=--help all"` to see all available JTReg options.
#### JAVA_OPTIONS
Additional Java options for running test classes (sent to JTReg as
`-javaoption`).
#### VM_OPTIONS
Additional Java options to be used when compiling and running classes (sent to
JTReg as `-vmoption`).
This option is only needed in special circumstances. To pass Java options to
your test classes, use `JAVA_OPTIONS`.
#### LAUNCHER_OPTIONS
Additional Java options that are sent to the java launcher that starts the
JTReg harness.
#### AOT_MODULES
Generate AOT modules before testing for the specified module, or set of
@@ -353,6 +378,7 @@ Retry failed tests up to a set number of times. Defaults to 0.
### Gtest keywords
#### REPEAT
The number of times to repeat the tests (`--gtest_repeat`).
Default is 1. Set to -1 to repeat indefinitely. This can be especially useful
@@ -360,6 +386,7 @@ combined with `OPTIONS=--gtest_break_on_failure` to reproduce an intermittent
problem.
#### OPTIONS
Additional options to the Gtest test framework.
Use `GTEST="OPTIONS=--help"` to see all available Gtest options.
@@ -373,98 +400,127 @@ modules. If multiple modules are specified, they should be separated by space
### Microbenchmark keywords
#### FORK
Override the number of benchmark forks to spawn. Same as specifying `-f <num>`.
#### ITER
Number of measurement iterations per fork. Same as specifying `-i <num>`.
#### TIME
Amount of time to spend in each measurement iteration, in seconds. Same as
specifying `-r <num>`
#### WARMUP_ITER
Number of warmup iterations to run before the measurement phase in each fork.
Same as specifying `-wi <num>`.
#### WARMUP_TIME
Amount of time to spend in each warmup iteration. Same as specifying `-w <num>`.
#### RESULTS_FORMAT
Specify to have the test run save a log of the values. Accepts the same values
as `-rff`, i.e., `text`, `csv`, `scsv`, `json`, or `latex`.
#### VM_OPTIONS
Additional VM arguments to provide to forked off VMs. Same as `-jvmArgs <args>`
#### OPTIONS
Additional arguments to send to JMH.
## Notes for Specific Tests
### Docker Tests
Docker tests with default parameters may fail on systems with glibc versions not
compatible with the one used in the default docker image (e.g., Oracle Linux 7.6 for x86).
For example, they pass on Ubuntu 16.04 but fail on Ubuntu 18.04 if run like this on x86:
Docker tests with default parameters may fail on systems with glibc versions
not compatible with the one used in the default docker image (e.g., Oracle
Linux 7.6 for x86). For example, they pass on Ubuntu 16.04 but fail on Ubuntu
18.04 if run like this on x86:
$ make test TEST="jtreg:test/hotspot/jtreg/containers/docker"
```
$ make test TEST="jtreg:test/hotspot/jtreg/containers/docker"
```
To run these tests correctly, additional parameters for the correct docker image are
required on Ubuntu 18.04 by using `JAVA_OPTIONS`.
To run these tests correctly, additional parameters for the correct docker
image are required on Ubuntu 18.04 by using `JAVA_OPTIONS`.
$ make test TEST="jtreg:test/hotspot/jtreg/containers/docker" JTREG="JAVA_OPTIONS=-Djdk.test.docker.image.name=ubuntu -Djdk.test.docker.image.version=latest"
```
$ make test TEST="jtreg:test/hotspot/jtreg/containers/docker" \
JTREG="JAVA_OPTIONS=-Djdk.test.docker.image.name=ubuntu
-Djdk.test.docker.image.version=latest"
```
### Non-US locale
If your locale is non-US, some tests are likely to fail. To work around this you can
set the locale to US. On Unix platforms simply setting `LANG="en_US"` in the
environment before running tests should work. On Windows, setting
`JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US"` helps for most, but not all test cases.
If your locale is non-US, some tests are likely to fail. To work around this
you can set the locale to US. On Unix platforms simply setting `LANG="en_US"`
in the environment before running tests should work. On Windows, setting
`JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US"` helps for most, but
not all test cases.
For example:
$ export LANG="en_US" && make test TEST=...
$ make test JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US" TEST=...
```
$ export LANG="en_US" && make test TEST=...
$ make test JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US" TEST=...
```
### PKCS11 Tests
It is highly recommended to use the latest NSS version when running PKCS11 tests.
Improper NSS version may lead to unexpected failures which are hard to diagnose.
For example, sun/security/pkcs11/Secmod/AddTrustedCert.java may fail on Ubuntu
18.04 with the default NSS version in the system.
To run these tests correctly, the system property `test.nss.lib.paths` is required
on Ubuntu 18.04 to specify the alternative NSS lib directories.
It is highly recommended to use the latest NSS version when running PKCS11
tests. Improper NSS version may lead to unexpected failures which are hard to
diagnose. For example, sun/security/pkcs11/Secmod/AddTrustedCert.java may fail
on Ubuntu 18.04 with the default NSS version in the system. To run these tests
correctly, the system property `test.nss.lib.paths` is required on Ubuntu 18.04
to specify the alternative NSS lib directories.
For example:
$ make test TEST="jtreg:sun/security/pkcs11/Secmod/AddTrustedCert.java" JTREG="JAVA_OPTIONS=-Dtest.nss.lib.paths=/path/to/your/latest/NSS-libs"
```
$ make test TEST="jtreg:sun/security/pkcs11/Secmod/AddTrustedCert.java" \
JTREG="JAVA_OPTIONS=-Dtest.nss.lib.paths=/path/to/your/latest/NSS-libs"
```
For more notes about the PKCS11 tests, please refer to test/jdk/sun/security/pkcs11/README.
For more notes about the PKCS11 tests, please refer to
test/jdk/sun/security/pkcs11/README.
### Client UI Tests
Some Client UI tests use key sequences which may be reserved by the operating
system. Usually that causes the test failure. So it is highly recommended to disable
system key shortcuts prior testing. The steps to access and disable system key shortcuts
for various platforms are provided below.
system. Usually that causes the test failure. So it is highly recommended to
disable system key shortcuts prior testing. The steps to access and disable
system key shortcuts for various platforms are provided below.
#### MacOS
Choose Apple menu; System Preferences, click Keyboard, then click Shortcuts;
select or deselect desired shortcut.
For example, test/jdk/javax/swing/TooltipManager/JMenuItemToolTipKeyBindingsTest/JMenuItemToolTipKeyBindingsTest.java fails
on MacOS because it uses `CTRL + F1` key sequence to show or hide tooltip message
but the key combination is reserved by the operating system. To run the test correctly
the default global key shortcut should be disabled using the steps described above, and then deselect
"Turn keyboard access on or off" option which is responsible for `CTRL + F1` combination.
For example,
test/jdk/javax/swing/TooltipManager/JMenuItemToolTipKeyBindingsTest/JMenuItemToolTipKeyBindingsTest.java
fails on MacOS because it uses `CTRL + F1` key sequence to show or hide tooltip
message but the key combination is reserved by the operating system. To run the
test correctly the default global key shortcut should be disabled using the
steps described above, and then deselect "Turn keyboard access on or off"
option which is responsible for `CTRL + F1` combination.
#### Linux
Open the Activities overview and start typing Settings; Choose Settings, click Devices,
then click Keyboard; set or override desired shortcut.
Open the Activities overview and start typing Settings; Choose Settings, click
Devices, then click Keyboard; set or override desired shortcut.
#### Windows
Type `gpedit` in the Search and then click Edit group policy; navigate to
User Configuration -> Administrative Templates -> Windows Components -> File Explorer;
in the right-side pane look for "Turn off Windows key hotkeys" and double click on it;
enable or disable hotkeys.
Type `gpedit` in the Search and then click Edit group policy; navigate to User
Configuration -> Administrative Templates -> Windows Components -> File
Explorer; in the right-side pane look for "Turn off Windows key hotkeys" and
double click on it; enable or disable hotkeys.
Note: restart is required to make the settings take effect.

View File

@@ -52,7 +52,6 @@ TARGETS =
# READMEs and other files.
DEMO_SHARE_SRC := $(TOPDIR)/src/demo/share
GLOBAL_VERSION_INFO_RESOURCE := $(TOPDIR)/src/java.base/windows/native/common/version.rc
DEMO_MANIFEST := $(SUPPORT_OUTPUTDIR)/demos/java-main-manifest.mf

View File

@@ -477,6 +477,7 @@ jdk.internal.vm.compiler_EXCLUDES += \
org.graalvm.compiler.options.test \
org.graalvm.compiler.phases.common.test \
org.graalvm.compiler.processor \
org.graalvm.compiler.replacements.jdk10.test \
org.graalvm.compiler.replacements.jdk12.test \
org.graalvm.compiler.replacements.jdk9.test \
org.graalvm.compiler.replacements.processor \

View File

@@ -36,6 +36,24 @@ TARGETS :=
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, hotspot/CompileTools.gmk))
################################################################################
# Build tools needed for the JFR source code generation
HOTSPOT_TOOLS_SRCDIR := $(TOPDIR)/make/src/classes
HOTSPOT_TOOLS_OUTPUTDIR := $(BUILDTOOLS_OUTPUTDIR)/buildtools/hotspot_tools_classes
$(eval $(call SetupJavaCompilation, BUILD_TOOLS_HOTSPOT, \
COMPILER := bootjdk, \
SRC := $(HOTSPOT_TOOLS_SRCDIR), \
BIN := $(HOTSPOT_TOOLS_OUTPUTDIR), \
))
TARGETS += $(BUILD_TOOLS_HOTSPOT)
################################################################################
# Graal build tools
ifeq ($(INCLUDE_GRAAL), true)
VM_CI_SRC_DIR := $(TOPDIR)/src/jdk.internal.vm.ci/share/classes

View File

@@ -63,7 +63,7 @@ MODULES_SOURCE_PATH := $(call PathList, $(call GetModuleSrcPath) )
JAVADOC_BASE_URL := https://docs.oracle.com/pls/topic/lookup?ctx=javase$(VERSION_NUMBER)&amp;id=homepage
BUG_SUBMIT_URL := https://bugreport.java.com/bugreport/
COPYRIGHT_URL := legal/copyright.html
LICENSE_URL := https://www.oracle.com/technetwork/java/javase/terms/license/java$(VERSION_NUMBER)speclicense.html
LICENSE_URL := https://www.oracle.com/java/javase/terms/license/java$(VERSION_NUMBER)speclicense.html
REDISTRIBUTION_URL := https://www.oracle.com/technetwork/java/redist-137594.html
# In order to get a specific ordering it's necessary to specify the total

View File

@@ -101,9 +101,9 @@ help:
$(info $(_) # method is 'auto', 'ignore' or 'fail' (default))
$(info $(_) TEST="test1 ..." # Use the given test descriptor(s) for testing, e.g.)
$(info $(_) # make test TEST="jdk_lang gtest:all")
$(info $(_) JTREG="OPT1=x;OPT2=y" # Control the JTREG test harness)
$(info $(_) GTEST="OPT1=x;OPT2=y" # Control the GTEST test harness)
$(info $(_) MICRO="OPT1=x;OPT2=y" # Control the MICRO test harness)
$(info $(_) JTREG="OPT1=x;OPT2=y" # Control the JTREG test harness, use 'help' to list)
$(info $(_) GTEST="OPT1=x;OPT2=y" # Control the GTEST test harness, use 'help' to list)
$(info $(_) MICRO="OPT1=x;OPT2=y" # Control the MICRO test harness, use 'help' to list)
$(info $(_) TEST_OPTS="OPT1=x;..." # Generic control of all test harnesses)
$(info $(_) TEST_VM_OPTS="ARG ..." # Same as setting TEST_OPTS to VM_OPTIONS="ARG ...")
$(info )

View File

@@ -197,7 +197,7 @@ ifeq ($(HAS_SPEC),)
COMPARE_BUILD="$(COMPARE_BUILD)" pre-compare-build && \
$(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -j 1 -f $(topdir)/make/Init.gmk \
SPEC=$(spec) HAS_SPEC=true $(MAKE_INIT_WITH_SPEC_ARGUMENTS) \
COMPARE_BUILD="$(COMPARE_BUILD)" main && \
COMPARE_BUILD="$(COMPARE_BUILD):NODRYRUN=true" main && \
$(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -f $(topdir)/make/Init.gmk \
SPEC=$(spec) HAS_SPEC=true ACTUAL_TOPDIR=$(topdir) \
COMPARE_BUILD="$(COMPARE_BUILD)" post-compare-build && \

View File

@@ -350,6 +350,9 @@ else # $(HAS_SPEC)=true
$$(if $$(filter FAIL=%, $$(part)), \
$$(eval COMPARE_BUILD_FAIL=$$(strip $$(subst +, , $$(patsubst FAIL=%, %, $$(part))))) \
) \
$$(if $$(filter NODRYRUN=%, $$(part)), \
$$(eval COMPARE_BUILD_NODRYRUN=$$(strip $$(subst +, , $$(patsubst NODRYRUN=%, %, $$(part))))) \
) \
)
else
# Separate handling for single field case, to allow for spaces in values.
@@ -372,9 +375,11 @@ else # $(HAS_SPEC)=true
else ifeq ($$(wildcard $$(COMPARE_BUILD_PATCH)), )
$$(error Patch file $$(COMPARE_BUILD_PATCH) does not exist)
endif
PATCH_DRY_RUN := $$(shell cd $$(topdir) && $$(PATCH) --dry-run -p1 < $$(COMPARE_BUILD_PATCH) > /dev/null 2>&1 || $$(ECHO) FAILED)
ifeq ($$(PATCH_DRY_RUN), FAILED)
$$(error Patch file $$(COMPARE_BUILD_PATCH) does not apply cleanly)
ifneq ($$(COMPARE_BUILD_NODRYRUN), true)
PATCH_DRY_RUN := $$(shell cd $$(topdir) && $$(PATCH) --dry-run -p1 < $$(COMPARE_BUILD_PATCH) > /dev/null 2>&1 || $$(ECHO) FAILED)
ifeq ($$(PATCH_DRY_RUN), FAILED)
$$(error Patch file $$(COMPARE_BUILD_PATCH) does not apply cleanly)
endif
endif
endif
ifneq ($$(COMPARE_BUILD_FAIL), true)

View File

@@ -640,6 +640,20 @@ $(eval $(call SetupTarget, test-image-jdk-jtreg-native, \
DEPS := build-test-jdk-jtreg-native, \
))
# Native files needed by the testlib
$(eval $(call SetupTarget, build-test-lib-native, \
MAKEFILE := test/BuildTestLibNative, \
TARGET := build-test-lib-native, \
DEPS := buildtools-jdk java.base-libs, \
))
$(eval $(call SetupTarget, test-image-lib-native, \
MAKEFILE := test/BuildTestLibNative, \
TARGET := test-image-lib-native, \
DEPS := build-test-lib-native, \
))
# Native files needed when testing the testlib itself
$(eval $(call SetupTarget, build-test-libtest-jtreg-native, \
MAKEFILE := test/JtregNativeLibTest, \
TARGET := build-test-libtest-jtreg-native, \
@@ -804,7 +818,7 @@ else
# Declare dependencies between hotspot-<variant>* targets
$(foreach v, $(JVM_VARIANTS), \
$(eval hotspot-$v-gensrc: java.base-copy) \
$(eval hotspot-$v-gensrc: java.base-copy buildtools-hotspot) \
$(eval hotspot-$v-libs: hotspot-$v-gensrc java.base-copy) \
)
@@ -1118,7 +1132,9 @@ endif
docs-image: docs-jdk
# This target builds the test image
test-image: prepare-test-image test-image-jdk-jtreg-native test-image-demos-jdk test-image-libtest-jtreg-native
test-image: prepare-test-image test-image-jdk-jtreg-native \
test-image-demos-jdk test-image-libtest-jtreg-native \
test-image-lib-native
ifneq ($(JVM_TEST_IMAGE_TARGETS), )
# If JVM_TEST_IMAGE_TARGETS is externally defined, use it instead of the

View File

@@ -143,9 +143,6 @@ endif
# Optionally create AOT libraries for specified modules before running tests.
# Note, this could not be done during JDK build time.
################################################################################
# Note, this could not be done during JDK build time.
# Parameter 1 is the name of the rule.
#
# Remaining parameters are named arguments.
@@ -198,6 +195,10 @@ define SetupAotModuleBody
$1_AOT_TARGETS += $$($1_AOT_LIB)
endef
################################################################################
# Optionally create AOT libraries before running tests.
# Note, this could not be done during JDK build time.
################################################################################
# Parameter 1 is the name of the rule.
#
# Remaining parameters are named arguments.
@@ -291,9 +292,9 @@ $(eval $(call SetTestOpt,FAILURE_HANDLER_TIMEOUT,JTREG))
$(eval $(call ParseKeywordVariable, JTREG, \
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR FAILURE_HANDLER_TIMEOUT \
TEST_MODE ASSERT VERBOSE RETAIN MAX_MEM RUN_PROBLEM_LISTS \
RETRY_COUNT, \
RETRY_COUNT MAX_OUTPUT, \
STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS KEYWORDS \
EXTRA_PROBLEM_LISTS AOT_MODULES, \
EXTRA_PROBLEM_LISTS AOT_MODULES LAUNCHER_OPTIONS, \
))
ifneq ($(JTREG), )
@@ -844,15 +845,27 @@ define SetupRunJtregTestBody
JTREG_RUN_PROBLEM_LISTS ?= false
JTREG_RETRY_COUNT ?= 0
ifneq ($$(JTREG_LAUNCHER_OPTIONS), )
$1_JTREG_LAUNCHER_OPTIONS += $$(JTREG_LAUNCHER_OPTIONS)
endif
ifneq ($$(JTREG_MAX_OUTPUT), )
$1_JTREG_LAUNCHER_OPTIONS += -Djavatest.maxOutputSize=$$(JTREG_MAX_OUTPUT)
endif
ifneq ($$($1_JTREG_MAX_MEM), 0)
$1_JTREG_BASIC_OPTIONS += -vmoption:-Xmx$$($1_JTREG_MAX_MEM)
$1_JTREG_LAUNCHER_OPTIONS += -Xmx$$($1_JTREG_MAX_MEM)
endif
# Make sure the tmp dir is normalized as some tests will react badly otherwise
$1_TEST_TMP_DIR := $$(abspath $$($1_TEST_SUPPORT_DIR)/tmp)
$1_JTREG_BASIC_OPTIONS += -$$($1_JTREG_TEST_MODE) \
-verbose:$$(JTREG_VERBOSE) -retain:$$(JTREG_RETAIN) \
-concurrency:$$($1_JTREG_JOBS) -timeoutFactor:$$(JTREG_TIMEOUT_FACTOR) \
-vmoption:-XX:MaxRAMPercentage=$$($1_JTREG_MAX_RAM_PERCENTAGE)
-vmoption:-XX:MaxRAMPercentage=$$($1_JTREG_MAX_RAM_PERCENTAGE) \
-vmoption:-Djava.io.tmpdir="$$($1_TEST_TMP_DIR)"
$1_JTREG_BASIC_OPTIONS += -automatic -ignore:quiet
@@ -968,7 +981,8 @@ define SetupRunJtregTestBody
run-test-$1: pre-run-test clean-workdir-$1 $$($1_AOT_TARGETS)
$$(call LogWarn)
$$(call LogWarn, Running test '$$($1_TEST)')
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR))
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR) \
$$($1_TEST_TMP_DIR))
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/jtreg, ( \
$$(COV_ENVIRONMENT) $$($1_COMMAND_LINE) \
))

47
make/ToolsHotspot.gmk Normal file
View File

@@ -0,0 +1,47 @@
#
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. 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.
#
ifndef _TOOLS_HOTSPOT_GMK
_TOOLS_HOTSPOT_GMK := 1
include JavaCompilation.gmk
HOTSPOT_TOOLS_OUTPUTDIR := $(BUILDTOOLS_OUTPUTDIR)/buildtools/hotspot_tools_classes
################################################################################
# To avoid reevaluating the compilation setup for the tools each time this file
# is included, the actual compilation is handled by CompileToolsHotspot.gmk. The
# following trick is used to be able to declare a dependency on the built tools.
BUILD_TOOLS_HOTSPOT := $(call SetupJavaCompilationCompileTarget, \
BUILD_TOOLS_HOTSPOT, $(HOTSPOT_TOOLS_OUTPUTDIR))
################################################################################
TOOL_JFR_GEN := $(JAVA_SMALL) -cp $(HOTSPOT_TOOLS_OUTPUTDIR) \
build.tools.jfr.GenerateJfrFiles
##########################################################################################
endif # _TOOLS_HOTSPOT_GMK

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2020, 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
@@ -150,10 +150,10 @@ AC_DEFUN_ONCE([BASIC_COMPILE_FIXPATH],
fi
FIXPATH_SRC_W="$FIXPATH_SRC"
FIXPATH_BIN_W="$FIXPATH_BIN"
UTIL_REWRITE_AS_WINDOWS_MIXED_PATH([FIXPATH_SRC_W])
UTIL_REWRITE_AS_WINDOWS_MIXED_PATH([FIXPATH_BIN_W])
$RM -rf $FIXPATH_BIN $FIXPATH_DIR
$MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
UTIL_REWRITE_AS_WINDOWS_MIXED_PATH([FIXPATH_SRC_W])
UTIL_REWRITE_AS_WINDOWS_MIXED_PATH([FIXPATH_BIN_W])
cd $FIXPATH_DIR
$CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
cd $CONFIGURE_START_DIR

View File

@@ -512,6 +512,18 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
fi
TOOLCHAIN_CFLAGS_JDK_CONLY="$LANGSTD_CFLAGS $TOOLCHAIN_CFLAGS_JDK_CONLY"
# CXXFLAGS C++ language level for all of JDK, including Hotspot.
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang || test "x$TOOLCHAIN_TYPE" = xxlc; then
LANGSTD_CXXFLAGS="-std=c++14"
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
LANGSTD_CXXFLAGS="-std:c++14"
else
AC_MSG_ERROR([Don't know how to enable C++14 for this toolchain])
fi
TOOLCHAIN_CFLAGS_JDK_CXXONLY="$TOOLCHAIN_CFLAGS_JDK_CXXONLY $LANGSTD_CXXFLAGS"
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM $LANGSTD_CXXFLAGS"
ADLC_LANGSTD_CXXFLAGS="$LANGSTD_CXXFLAGS"
# CFLAGS WARNINGS STUFF
# Set JVM_CFLAGS warning handling
if test "x$TOOLCHAIN_TYPE" = xgcc; then
@@ -694,13 +706,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
$1_CFLAGS_CPU_JDK="${$1_CFLAGS_CPU_JDK} -fno-omit-frame-pointer"
fi
$1_CXXSTD_CXXFLAG="-std=gnu++98"
FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${$1_CXXSTD_CXXFLAG}],
PREFIX: $3, IF_FALSE: [$1_CXXSTD_CXXFLAG=""])
$1_TOOLCHAIN_CFLAGS_JDK_CXXONLY="${$1_CXXSTD_CXXFLAG}"
$1_TOOLCHAIN_CFLAGS_JVM="${$1_TOOLCHAIN_CFLAGS_JVM} ${$1_CXXSTD_CXXFLAG}"
$2ADLC_CXXFLAG="${$1_CXXSTD_CXXFLAG}"
elif test "x$TOOLCHAIN_TYPE" = xclang; then
if test "x$FLAGS_OS" = xlinux; then
# ppc test not really needed for clang
@@ -795,7 +800,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
AC_SUBST($2CFLAGS_JDKEXE)
AC_SUBST($2CXXFLAGS_JDKLIB)
AC_SUBST($2CXXFLAGS_JDKEXE)
AC_SUBST($2ADLC_CXXFLAG)
AC_SUBST($2ADLC_LANGSTD_CXXFLAGS)
COMPILER_FP_CONTRACT_OFF_FLAG="-ffp-contract=off"
# Check that the compiler supports -ffp-contract=off flag

View File

@@ -53,6 +53,7 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS],
LDFLAGS_TESTEXE="${TARGET_LDFLAGS_JDK_LIBPATH}"
AC_SUBST(LDFLAGS_TESTEXE)
AC_SUBST(ADLC_LDFLAGS)
])
################################################################################
@@ -62,17 +63,10 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
[
# Setup basic LDFLAGS
if test "x$TOOLCHAIN_TYPE" = xgcc; then
# If this is a --hash-style=gnu system, use --hash-style=both, why?
# We have previously set HAS_GNU_HASH if this is the case
if test -n "$HAS_GNU_HASH"; then
BASIC_LDFLAGS="-Wl,--hash-style=both"
LIBJSIG_HASHSTYLE_LDFLAGS="-Wl,--hash-style=both"
fi
# Add -z,defs, to forbid undefined symbols in object files.
# add -z,relro (mark relocations read only) for all libs
# add -z,now ("full relro" - more of the Global Offset Table GOT is marked read only)
BASIC_LDFLAGS="$BASIC_LDFLAGS -Wl,-z,defs -Wl,-z,relro -Wl,-z,now"
BASIC_LDFLAGS="-Wl,--hash-style=gnu -Wl,-z,defs -Wl,-z,relro -Wl,-z,now"
# Linux : remove unused code+data in link step
if test "x$ENABLE_LINKTIME_GC" = xtrue; then
if test "x$OPENJDK_TARGET_CPU" = xs390x; then
@@ -152,8 +146,6 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
# Export some intermediate variables for compatibility
LDFLAGS_CXX_JDK="$BASIC_LDFLAGS_ONLYCXX $BASIC_LDFLAGS_ONLYCXX_JDK_ONLY $DEBUGLEVEL_LDFLAGS_JDK_ONLY"
AC_SUBST(LDFLAGS_CXX_JDK)
AC_SUBST(LIBJSIG_HASHSTYLE_LDFLAGS)
AC_SUBST(LIBJSIG_NOEXECSTACK_LDFLAGS)
])
################################################################################

View File

@@ -64,39 +64,12 @@ AC_DEFUN([FLAGS_SETUP_RCFLAGS],
[
# On Windows, we need to set RC flags.
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
RC_FLAGS="-nologo -l0x409"
JVM_RCFLAGS="-nologo"
RCFLAGS="-nologo"
if test "x$DEBUG_LEVEL" = xrelease; then
RC_FLAGS="$RC_FLAGS -DNDEBUG"
JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
RCFLAGS="$RCFLAGS -DNDEBUG"
fi
# The version variables used to create RC_FLAGS may be overridden
# in a custom configure script, or possibly the command line.
# Let those variables be expanded at make time in spec.gmk.
# The \$ are escaped to the shell, and the $(...) variables
# are evaluated by make.
RC_FLAGS="$RC_FLAGS \
-D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
-D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
-D\"JDK_FILEDESC=\$(JDK_RC_NAME) binary\" \
-D\"JDK_VER=\$(VERSION_NUMBER)\" \
-D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
-D\"JDK_NAME=\$(JDK_RC_NAME) \$(VERSION_FEATURE)\" \
-D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
JVM_RCFLAGS="$JVM_RCFLAGS \
-D\"HS_VERSION_STRING=\$(VERSION_STRING)\" \
-D\"HS_COMPANY=\$(COMPANY_NAME)\" \
-D\"HS_VER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
-D\"HS_INTERNAL_NAME=jvm\" \
-D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
-D\"HS_FNAME=jvm.dll\" \
-D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
-D\"HS_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
fi
AC_SUBST(RC_FLAGS)
AC_SUBST(JVM_RCFLAGS)
AC_SUBST(RCFLAGS)
])
################################################################################

View File

@@ -179,7 +179,7 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
AC_MSG_ERROR([--with-version-string must have a value])
elif test "x$with_version_string" != x; then
# Additional [] needed to keep m4 from mangling shell constructs.
if [ [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ]; then
if [ [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z0-9]+))?(((\+)([0-9]*))?(-([-a-zA-Z0-9.]+))?)?$ ]] ]; then
VERSION_FEATURE=${BASH_REMATCH[[1]]}
VERSION_INTERIM=${BASH_REMATCH[[3]]}
VERSION_UPDATE=${BASH_REMATCH[[5]]}
@@ -188,9 +188,9 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
VERSION_EXTRA2=${BASH_REMATCH[[11]]}
VERSION_EXTRA3=${BASH_REMATCH[[13]]}
VERSION_PRE=${BASH_REMATCH[[15]]}
version_plus_separator=${BASH_REMATCH[[17]]}
VERSION_BUILD=${BASH_REMATCH[[18]]}
VERSION_OPT=${BASH_REMATCH[[20]]}
version_plus_separator=${BASH_REMATCH[[18]]}
VERSION_BUILD=${BASH_REMATCH[[19]]}
VERSION_OPT=${BASH_REMATCH[[21]]}
# Unspecified numerical fields are interpreted as 0.
if test "x$VERSION_INTERIM" = x; then
VERSION_INTERIM=0
@@ -233,8 +233,8 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
# Interpret --without-* as empty string instead of the literal "no"
VERSION_PRE=
else
# Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
[ VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'` ]
# Only [a-zA-Z0-9] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
[ VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-zA-Z0-9]'` ]
if test "x$VERSION_PRE" != "x$with_version_pre"; then
AC_MSG_WARN([--with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'])
fi

View File

@@ -87,6 +87,20 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBFFI],
[LIBFFI_FOUND=no]
)
fi
# on macos we need a special case for system's libffi as
# headers are located only in sdk in $SYSROOT and in ffi subfolder
if test "x$LIBFFI_FOUND" = xno; then
if test "x$SYSROOT" != "x"; then
AC_CHECK_HEADER([$SYSROOT/usr/include/ffi/ffi.h],
[
LIBFFI_FOUND=yes
LIBFFI_CFLAGS="-I${SYSROOT}/usr/include/ffi"
LIBFFI_LIBS=-lffi
],
[LIBFFI_FOUND=no]
)
fi
fi
if test "x$LIBFFI_FOUND" = xno; then
HELP_MSG_MISSING_DEPENDENCY([ffi])
AC_MSG_ERROR([Could not find libffi! $HELP_MSG])

View File

@@ -70,6 +70,7 @@ AC_DEFUN_ONCE([LIB_SETUP_STD_LIBS],
else
LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
ADLC_LDFLAGS="$ADLC_LDFLAGS $STATIC_STDCXX_FLAGS"
# Ideally, we should test stdc++ for the BUILD toolchain separately. For now
# just use the same setting as for the TARGET toolchain.
OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"

View File

@@ -476,7 +476,8 @@ DISABLED_WARNINGS_CXX := @DISABLED_WARNINGS_CXX@
WARNINGS_AS_ERRORS := @WARNINGS_AS_ERRORS@
CFLAGS_CCACHE:=@CFLAGS_CCACHE@
ADLC_CXXFLAG=@ADLC_CXXFLAG@
ADLC_LANGSTD_CXXFLAGS=@ADLC_LANGSTD_CXXFLAGS@
ADLC_LDFLAGS=@ADLC_LDFLAGS@
# Tools that potentially need to be cross compilation aware.
CC:=@FIXPATH@ @CCACHE@ @ICECC@ @CC@
@@ -489,15 +490,11 @@ CXXFLAGS_JDKLIB:=@CXXFLAGS_JDKLIB@
CFLAGS_JDKEXE:=@CFLAGS_JDKEXE@
CXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@
LIBJSIG_HASHSTYLE_LDFLAGS := @LIBJSIG_HASHSTYLE_LDFLAGS@
LIBJSIG_NOEXECSTACK_LDFLAGS := @LIBJSIG_NOEXECSTACK_LDFLAGS@
FDLIBM_CFLAGS := @FDLIBM_CFLAGS@
JVM_CFLAGS := @JVM_CFLAGS@
JVM_LDFLAGS := @JVM_LDFLAGS@
JVM_ASFLAGS := @JVM_ASFLAGS@
JVM_LIBS := @JVM_LIBS@
JVM_RCFLAGS := @JVM_RCFLAGS@
# These flags might contain variables set by a custom extension that is included later.
EXTRA_CFLAGS = @EXTRA_CFLAGS@
@@ -668,12 +665,7 @@ NEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) $(JAVADOC_MAIN_CLASS)
JLINK_KEEP_PACKAGED_MODULES:=@JLINK_KEEP_PACKAGED_MODULES@
# Base flags for RC
# Guarding this against resetting value. Legacy make files include spec multiple
# times.
ifndef RC_FLAGS
RC_FLAGS:=@RC_FLAGS@
endif
RCFLAGS := @RCFLAGS@
# Tools adhering to a minimal and common standard of posix compliance.
AWK:=@AWK@

View File

@@ -50,9 +50,9 @@ TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
# Minimum supported versions, empty means unspecified
TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
TOOLCHAIN_MINIMUM_VERSION_clang="3.5"
TOOLCHAIN_MINIMUM_VERSION_gcc="5.0"
TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
TOOLCHAIN_MINIMUM_VERSION_microsoft="19.10.0.0" # VS2017
TOOLCHAIN_MINIMUM_VERSION_xlc=""
# Minimum supported linker versions, empty means unspecified
@@ -972,12 +972,6 @@ AC_DEFUN_ONCE([TOOLCHAIN_MISC_CHECKS],
fi
fi
if test "x$TOOLCHAIN_TYPE" = xgcc; then
# If this is a --hash-style=gnu system, use --hash-style=both, why?
HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
# This is later checked when setting flags.
fi
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
# Check if linker has -z noexecstack.
HAS_NOEXECSTACK=`$CC -Wl,--help 2>/dev/null | $GREP 'z noexecstack'`
@@ -1005,8 +999,27 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JTREG],
AC_MSG_CHECKING([for jtreg test harness])
AC_MSG_RESULT([no, disabled])
elif test "x$with_jtreg" != xyes && test "x$with_jtreg" != x; then
# An explicit path is specified, use it.
JT_HOME="$with_jtreg"
if test -d "$with_jtreg"; then
# An explicit path is specified, use it.
JT_HOME="$with_jtreg"
else
case "$with_jtreg" in
*.zip )
JTREG_SUPPORT_DIR=$CONFIGURESUPPORT_OUTPUTDIR/jtreg
$RM -rf $JTREG_SUPPORT_DIR
$MKDIR -p $JTREG_SUPPORT_DIR
$UNZIP -qq -d $JTREG_SUPPORT_DIR $with_jtreg
# Try to find jtreg to determine JT_HOME path
JTREG_PATH=`$FIND $JTREG_SUPPORT_DIR | $GREP "/bin/jtreg"`
if test "x$JTREG_PATH" != x; then
JT_HOME=$($DIRNAME $($DIRNAME $JTREG_PATH))
fi
;;
* )
;;
esac
fi
UTIL_FIXUP_PATH([JT_HOME])
if test ! -d "$JT_HOME"; then
AC_MSG_ERROR([jtreg home directory from --with-jtreg=$with_jtreg does not exist])

View File

@@ -25,55 +25,7 @@
################################################################################
# The order of these defines the priority by which we try to find them.
VALID_VS_VERSIONS="2019 2017 2013 2015 2012 2010"
VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
VS_VERSION_INTERNAL_2010=100
VS_MSVCR_2010=msvcr100.dll
# We don't use msvcp on Visual Studio 2010
#VS_MSVCP_2010=msvcp100.dll
VS_ENVVAR_2010="VS100COMNTOOLS"
VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
VS_VS_PLATFORM_NAME_2010="v100"
VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
VS_SUPPORTED_2010=false
VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
VS_VERSION_INTERNAL_2012=110
VS_MSVCR_2012=msvcr110.dll
VS_MSVCP_2012=msvcp110.dll
VS_ENVVAR_2012="VS110COMNTOOLS"
VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
VS_SDK_INSTALLDIR_2012=
VS_VS_PLATFORM_NAME_2012="v110"
VS_SDK_PLATFORM_NAME_2012=
VS_SUPPORTED_2012=false
VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
VS_VERSION_INTERNAL_2013=120
VS_MSVCR_2013=msvcr120.dll
VS_MSVCP_2013=msvcp120.dll
VS_ENVVAR_2013="VS120COMNTOOLS"
VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
VS_SDK_INSTALLDIR_2013=
VS_VS_PLATFORM_NAME_2013="v120"
VS_SDK_PLATFORM_NAME_2013=
VS_SUPPORTED_2013=false
VS_DESCRIPTION_2015="Microsoft Visual Studio 2015"
VS_VERSION_INTERNAL_2015=140
VS_MSVCR_2015=vcruntime140.dll
VS_MSVCP_2015=msvcp140.dll
VS_ENVVAR_2015="VS140COMNTOOLS"
VS_VS_INSTALLDIR_2015="Microsoft Visual Studio 14.0"
VS_SDK_INSTALLDIR_2015=
VS_VS_PLATFORM_NAME_2015="v140"
VS_SDK_PLATFORM_NAME_2015=
# The vcvars of 2015 breaks if 2017 is also installed. Work around this by
# explicitly specifying Windows Kit 8.1 to be used.
VS_ENV_ARGS_2015="8.1"
VS_SUPPORTED_2015=false
VALID_VS_VERSIONS="2019 2017"
VS_DESCRIPTION_2017="Microsoft Visual Studio 2017"
VS_VERSION_INTERNAL_2017=141

View File

@@ -52,7 +52,15 @@ AC_DEFUN([UTIL_REWRITE_AS_WINDOWS_MIXED_PATH],
windows_path=`cmd //c echo $unix_path`
$1="$windows_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
windows_path=`$WSLPATH -m "$unix_path"`
windows_path=`$WSLPATH -m "$unix_path" 2>/dev/null`
if test $? -ne 0; then
dir=`dirname "$unix_path"`
base=`basename "$unix_path"`
windows_path=`$WSLPATH -m "$dir"`/"$base"
if test $? -ne 0; then
AC_MSG_ERROR([Cannot convert "$unix_path" to Windows path])
fi
fi
$1="$windows_path"
fi
])

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2020, 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
@@ -26,18 +26,18 @@
# Default version, product, and vendor information to use,
# unless overridden by configure
DEFAULT_VERSION_FEATURE=15
DEFAULT_VERSION_FEATURE=16
DEFAULT_VERSION_INTERIM=0
DEFAULT_VERSION_UPDATE=0
DEFAULT_VERSION_PATCH=0
DEFAULT_VERSION_EXTRA1=0
DEFAULT_VERSION_EXTRA2=0
DEFAULT_VERSION_EXTRA3=0
DEFAULT_VERSION_DATE=2020-09-15
DEFAULT_VERSION_CLASSFILE_MAJOR=59 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
DEFAULT_VERSION_DATE=2021-03-16
DEFAULT_VERSION_CLASSFILE_MAJOR=60 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
DEFAULT_VERSION_CLASSFILE_MINOR=0
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="14 15"
DEFAULT_JDK_SOURCE_TARGET_VERSION=15
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="14 15 16"
DEFAULT_JDK_SOURCE_TARGET_VERSION=16
DEFAULT_PROMOTED_VERSION_PRE=ea
LAUNCHER_NAME=openjdk

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2018, 2020, 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
@@ -92,6 +92,16 @@ ProcessDir = \
) \
)
GLOBAL_VERSION_INFO_RESOURCE := $(TOPDIR)/src/java.base/windows/native/common/version.rc
JDK_RCFLAGS=$(RCFLAGS) \
-D"JDK_VERSION_STRING=$(VERSION_STRING)" \
-D"JDK_COMPANY=$(COMPANY_NAME)" \
-D"JDK_VER=$(VERSION_NUMBER_FOUR_POSITIONS)" \
-D"JDK_COPYRIGHT=Copyright \xA9 $(COPYRIGHT_YEAR)" \
-D"JDK_NAME=$(JDK_RC_NAME) $(VERSION_SHORT)" \
-D"JDK_FVER=$(subst .,$(COMMA),$(VERSION_NUMBER_FOUR_POSITIONS))"
# Setup make rules for creating a native shared library with suitable defaults
# for the OpenJDK project.
#
@@ -100,7 +110,7 @@ ProcessDir = \
#
# Remaining parameters are named arguments. These are all passed on to
# SetupNativeCompilation, except for
# EXTRA_RC_FLAGS -- additional RC_FLAGS to append.
# EXTRA_RCFLAGS -- additional RCFLAGS to append.
# EXTRA_HEADER_DIRS -- additional directories to look for headers in
# EXTRA_SRC -- additional directories to look for source in
# EXCLUDE_SRC_PATTERNS -- exclude source dirs matching these patterns from
@@ -108,6 +118,7 @@ ProcessDir = \
# HEADERS_FROM_SRC -- if false, does not add source dirs automatically as
# header include dirs. (Defaults to true.)
# SRC -- this is passed on, but preprocessed to accept source dir designations
# RC_FILEDESC -- override the default FILEDESC for Windows version.rc
# such as "java.base:headers".
SetupJdkLibrary = $(NamedParamsMacroTemplate)
define SetupJdkLibraryBody
@@ -137,19 +148,20 @@ define SetupJdkLibraryBody
ifeq ($$($1_VERSIONINFO_RESOURCE), )
$1_VERSIONINFO_RESOURCE := $$(GLOBAL_VERSION_INFO_RESOURCE)
else ifeq ($$($1_VERSIONINFO_RESOURCE), DISABLE)
$1_VERSIONINFO_RESOURCE :=
endif
ifeq ($$($1_RC_FLAGS), )
$1_RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=$$($1_NAME).dll" \
-D "JDK_INTERNAL_NAME=$$($1_NAME)" \
-D "JDK_FTYPE=0x2L"
else ifeq ($$($1_RC_FLAGS), DISABLE)
$1_RC_FLAGS :=
ifeq ($$($1_RC_FILEDESC), )
$1_RC_FILEDESC := $(JDK_RC_NAME) binary
endif
$1_RCFLAGS := $(JDK_RCFLAGS) \
-D"JDK_FILEDESC=$$(strip $$($1_RC_FILEDESC))" \
-D"JDK_FNAME=$$($1_NAME).dll" \
-D"JDK_INTERNAL_NAME=$$($1_NAME)" \
-D"JDK_FTYPE=0x2L" \
-I$(TOPDIR)/src/java.base/windows/native/common \
$$($1_EXTRA_RCFLAGS)
ifneq ($$($1_HEADERS_FROM_SRC), false)
$1_SRC_HEADER_FLAGS := $$(addprefix -I, $$(wildcard $$($1_SRC)))
endif
@@ -171,7 +183,6 @@ define SetupJdkLibraryBody
ifeq ($$($1_CFLAGS)$$($1_CXXFLAGS), )
$1_CFLAGS += $$($1_SRC_HEADER_FLAGS) $$($1_EXTRA_HEADER_FLAGS)
endif
$1_RC_FLAGS += $$($1_EXTRA_RC_FLAGS)
# Since we reuse the rule name ($1), all our arguments will pass through.
# We lose in transparency, but gain in brevity in this call...
@@ -186,7 +197,7 @@ endef
#
# Remaining parameters are named arguments. These are all passed on to
# SetupNativeCompilation, except for
# EXTRA_RC_FLAGS -- additional RC_FLAGS to append.
# EXTRA_RCFLAGS -- additional RCFLAGS to append.
SetupJdkExecutable = $(NamedParamsMacroTemplate)
define SetupJdkExecutableBody
$1_TYPE := EXECUTABLE
@@ -201,20 +212,15 @@ define SetupJdkExecutableBody
ifeq ($$($1_VERSIONINFO_RESOURCE), )
$1_VERSIONINFO_RESOURCE := $$(GLOBAL_VERSION_INFO_RESOURCE)
else ifeq ($$($1_VERSIONINFO_RESOURCE), DISABLE)
$1_VERSIONINFO_RESOURCE :=
endif
ifeq ($$($1_RC_FLAGS), )
$1_RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=$$($1_NAME).exe" \
-D "JDK_INTERNAL_NAME=$$($1_NAME)" \
-D "JDK_FTYPE=0x01L"
else ifeq ($$($1_RC_FLAGS), DISABLE)
$1_RC_FLAGS :=
endif
$1_RC_FLAGS += $$($1_EXTRA_RC_FLAGS)
$1_RCFLAGS := $(JDK_RCFLAGS) \
-D"JDK_FILEDESC=$(JDK_RC_NAME) binary" \
-D"JDK_FNAME=$$($1_NAME).exe" \
-D"JDK_INTERNAL_NAME=$$($1_NAME)" \
-D"JDK_FTYPE=0x1L" \
-I$(TOPDIR)/src/java.base/windows/native/common \
$$($1_EXTRA_RCFLAGS)
# Since we reuse the rule name ($1), all our arguments will pass through.
# We lose in transparency, but gain in brevity in this call...

View File

@@ -484,7 +484,7 @@ endif
# Defines the sub directory structure to store variable value file in
DependOnVariableDirName = \
$(strip $(addsuffix $(if $(MODULE),/$(MODULE)), \
$(subst $(TOPDIR)/,, $(if $(filter /%, $(firstword $(MAKEFILE_LIST))), \
$(subst $(WORKSPACE_ROOT)/,, $(if $(filter /%, $(firstword $(MAKEFILE_LIST))), \
$(firstword $(MAKEFILE_LIST)), \
$(CURDIR)/$(firstword $(MAKEFILE_LIST))))))
@@ -496,6 +496,13 @@ DependOnVariableFileName = \
$(strip $(if $(strip $2), $2, \
$(MAKESUPPORT_OUTPUTDIR)/vardeps/$(DependOnVariableDirName)/$(strip $1).vardeps))
# Writes the vardeps file. Assumes $1_filename has been setup
# Param 1 - Name of variable
DependOnVariableWriteFile = \
$(call MakeDir, $(dir $($1_filename))) \
$(call WriteFile, $1_old:=$(call DoubleDollar,$(call EscapeHash,$($1))), \
$($1_filename)) \
# Does the actual work with parameters stripped.
# If the file exists AND the contents is the same as the variable, do nothing
# else print a new file.
@@ -505,14 +512,18 @@ DependOnVariableFileName = \
DependOnVariableHelper = \
$(strip \
$(eval $1_filename := $(call DependOnVariableFileName, $1, $2)) \
$(if $(wildcard $($1_filename)), $(eval include $($1_filename))) \
$(if $(call equals, $(strip $($1)), $(strip $($1_old))),,\
$(call MakeDir, $(dir $($1_filename))) \
$(if $(findstring $(LOG_LEVEL), trace), \
$(info NewVariable $1: >$(strip $($1))<) \
$(info OldVariable $1: >$(strip $($1_old))<)) \
$(call WriteFile, $1_old:=$(call DoubleDollar,$(call EscapeHash,$($1))), \
$($1_filename))) \
$(if $(wildcard $($1_filename)), \
$(eval include $($1_filename)) \
$(if $(call equals, $(strip $($1)), $(strip $($1_old))),,\
$(if $(findstring $(LOG_LEVEL), trace), \
$(info NewVariable $1: >$(strip $($1))<) \
$(info OldVariable $1: >$(strip $($1_old))<) \
) \
$(call DependOnVariableWriteFile,$1) \
) \
, \
$(call DependOnVariableWriteFile,$1) \
) \
$($1_filename) \
)

View File

@@ -346,6 +346,7 @@ $(MODULE_DEPS_MAKEFILE): $(MODULE_INFOS) \
sub(/\/\*.*\*\//, ""); \
gsub(/^ +\*.*/, ""); \
gsub(/ /, ""); \
gsub(/\r/, ""); \
printf(" %s", $$0) } \
END { printf("\n") }' $m && \
$(PRINTF) "TRANSITIVE_MODULES_$(call GetModuleNameFromModuleInfo, $m) :=" && \
@@ -359,6 +360,7 @@ $(MODULE_DEPS_MAKEFILE): $(MODULE_INFOS) \
sub(/\/\*.*\*\//, ""); \
gsub(/^ +\*.*/, ""); \
gsub(/ /, ""); \
gsub(/\r/, ""); \
printf(" %s", $$0) } \
END { printf("\n") }' $m \
) >> $@ $(NEWLINE))

View File

@@ -457,7 +457,7 @@ endef
# EXTRA_OBJECT_FILES List of extra object files to include when linking
# EXTRA_DEPS List of extra dependencies to be added to each compiled file
# VERSIONINFO_RESOURCE Input file for RC. Setting this implies that RC will be run
# RC_FLAGS flags for RC.
# RCFLAGS flags for RC.
# EMBED_MANIFEST if true, embed manifest on Windows.
# MAPFILE mapfile
# USE_MAPFILE_FOR_SYMBOLS if true and this is a STATIC_BUILD, just copy the
@@ -860,7 +860,7 @@ define SetupNativeCompilationBody
-include $$($1_RES_DEPS_FILE)
-include $$($1_RES_DEPS_TARGETS_FILE)
$1_RES_VARDEPS := $$($1_RC) $$($1_RC_FLAGS)
$1_RES_VARDEPS := $$($1_RC) $$($1_RCFLAGS)
$1_RES_VARDEPS_FILE := $$(call DependOnVariable, $1_RES_VARDEPS, \
$$($1_RES).vardeps)
@@ -868,7 +868,7 @@ define SetupNativeCompilationBody
$$(call LogInfo, Compiling resource $$(notdir $$($1_VERSIONINFO_RESOURCE)) (for $$($1_BASENAME)))
$$(call MakeDir, $$(@D) $$($1_OBJECT_DIR))
$$(call ExecuteWithLog, $$@, $$(call MakeCommandRelative, \
$$($1_RC) $$($1_RC_FLAGS) $$($1_SYSROOT_CFLAGS) $(CC_OUT_OPTION)$$@ \
$$($1_RC) $$($1_RCFLAGS) $$($1_SYSROOT_CFLAGS) $(CC_OUT_OPTION)$$@ \
$$($1_VERSIONINFO_RESOURCE) 2>&1 ))
# Windows RC compiler does not support -showIncludes, so we mis-use CL
# for this. Filter out RC specific arguments that are unknown to CL.
@@ -876,7 +876,7 @@ define SetupNativeCompilationBody
# includes to stderr so need to redirect it to hide the output from the
# main log.
$$(call ExecuteWithLog, $$($1_RES_DEPS_FILE).obj, \
$$($1_CC) $$(filter-out -l%, $$($1_RC_FLAGS)) \
$$($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 \
$$($1_VERSIONINFO_RESOURCE)) 2>&1 \

View File

@@ -62,7 +62,11 @@ define SetupTestFilesCompilationBody
$1_OUTPUT_SUBDIR := lib
$1_BASE_CFLAGS := $(CFLAGS_JDKLIB)
$1_BASE_CXXFLAGS := $(CXXFLAGS_JDKLIB)
$1_LDFLAGS := $(LDFLAGS_JDKLIB) $$(call SET_SHARED_LIBRARY_ORIGIN)
ifeq ($(call isTargetOs, windows), false)
$1_LDFLAGS := $(LDFLAGS_JDKLIB) $$(call SET_SHARED_LIBRARY_ORIGIN) -pthread
else
$1_LDFLAGS := $(LDFLAGS_JDKLIB) $$(call SET_SHARED_LIBRARY_ORIGIN)
endif
$1_COMPILATION_TYPE := LIBRARY
else ifeq ($$($1_TYPE), PROGRAM)
$1_PREFIX = exe

View File

@@ -220,6 +220,10 @@ define ParseKeywordVariableBody
$$(eval mangled_part_eval := $$(call DoubleDollar, $$(mangled_part))) \
$$(eval part := $$$$(subst ||||,$$$$(SPACE),$$$$(mangled_part_eval))) \
$$(eval $1_NO_MATCH := true) \
$$(if $$(filter help, $$(part)), \
$$(info Valid keywords for $1:) \
$$(info $$($1_SINGLE_KEYWORDS) $$($1_STRING_KEYWORDS).) \
$$(error Re-run without 'help' to continue)) \
$$(foreach keyword, $$($1_SINGLE_KEYWORDS), \
$$(eval keyword_eval := $$(call DoubleDollar, $$(keyword))) \
$$(if $$(filter $$(keyword)=%, $$(part)), \

View File

@@ -48,7 +48,6 @@ LAUNCHER_CFLAGS += -I$(TOPDIR)/src/java.base/share/native/launcher \
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjli \
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libjli \
#
GLOBAL_VERSION_INFO_RESOURCE := $(TOPDIR)/src/java.base/windows/native/common/version.rc
MACOSX_PLIST_DIR := $(TOPDIR)/src/java.base/macosx/native/launcher
JAVA_MANIFEST := $(TOPDIR)/src/java.base/windows/native/launcher/java.manifest
@@ -71,7 +70,7 @@ JAVA_MANIFEST := $(TOPDIR)/src/java.base/windows/native/launcher/java.manifest
# compile time defines exceeding Visual Studio 2013 limitations.
# CFLAGS Additional CFLAGS
# CFLAGS_windows Additional CFLAGS_windows
# EXTRA_RC_FLAGS Additional EXTRA_RC_FLAGS
# EXTRA_RCFLAGS Additional EXTRA_RCFLAGS
# MACOSX_PRIVILEGED On macosx, allow to access other processes
# OPTIMIZATION Override default optimization level (LOW)
# OUTPUT_DIR Override default output directory
@@ -170,7 +169,7 @@ define SetupBuildLauncherBody
$(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib, \
OUTPUT_DIR := $$($1_OUTPUT_DIR), \
VERSIONINFO_RESOURCE := $$($1_VERSION_INFO_RESOURCE), \
EXTRA_RC_FLAGS := $$($1_EXTRA_RC_FLAGS), \
EXTRA_RCFLAGS := $$($1_EXTRA_RCFLAGS), \
MANIFEST := $(JAVA_MANIFEST), \
MANIFEST_VERSION := $(VERSION_NUMBER_FOUR_POSITIONS), \
))

View File

@@ -27,8 +27,6 @@ include JdkNativeCompilation.gmk
################################################################################
GLOBAL_VERSION_INFO_RESOURCE := $(TOPDIR)/src/java.base/windows/native/common/version.rc
# Absolute paths to lib files on windows for use in LIBS. Should figure out a more
# elegant solution to this.
WIN_JAVA_LIB := $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib

View File

@@ -960,7 +960,7 @@ var getJibProfilesDependencies = function (input, common) {
var devkit_platform_revisions = {
linux_x64: "gcc9.2.0-OL6.4+1.0",
macosx_x64: "Xcode10.1-MacOSX10.14+1.0",
macosx_x64: "Xcode11.3.1-MacOSX10.15+1.0",
windows_x64: "VS2019-16.5.3+1.0",
linux_aarch64: "gcc9.2.0-OL7.6+1.0",
linux_arm: "gcc8.2.0-Fedora27+1.0",

View File

@@ -0,0 +1,276 @@
#
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. 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.
#
# ##########################################################
# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
# ##########################################################
#
class name java/lang/Boolean
header extends java/lang/Object implements java/io/Serializable,java/lang/Comparable,java/lang/constant/Constable flags 31 signature Ljava/lang/Object;Ljava/io/Serializable;Ljava/lang/Comparable<Ljava/lang/Boolean;>;Ljava/lang/constant/Constable;
method name describeConstable descriptor ()Ljava/util/Optional; flags 1 signature ()Ljava/util/Optional<Ljava/lang/constant/DynamicConstantDesc<Ljava/lang/Boolean;>;>;
class name java/lang/Byte
header extends java/lang/Number implements java/lang/Comparable,java/lang/constant/Constable flags 31 signature Ljava/lang/Number;Ljava/lang/Comparable<Ljava/lang/Byte;>;Ljava/lang/constant/Constable;
method name describeConstable descriptor ()Ljava/util/Optional; flags 1 signature ()Ljava/util/Optional<Ljava/lang/constant/DynamicConstantDesc<Ljava/lang/Byte;>;>;
class name java/lang/CharSequence
method name isEmpty descriptor ()Z flags 1
class name java/lang/Character
header extends java/lang/Object implements java/io/Serializable,java/lang/Comparable,java/lang/constant/Constable nestMembers java/lang/Character$UnicodeScript,java/lang/Character$UnicodeBlock,java/lang/Character$Subset flags 31 signature Ljava/lang/Object;Ljava/io/Serializable;Ljava/lang/Comparable<Ljava/lang/Character;>;Ljava/lang/constant/Constable;
innerclass innerClass java/lang/Character$UnicodeBlock outerClass java/lang/Character innerClassName UnicodeBlock flags 19
innerclass innerClass java/lang/Character$UnicodeScript outerClass java/lang/Character innerClassName UnicodeScript flags 4019
innerclass innerClass java/lang/Character$Subset outerClass java/lang/Character innerClassName Subset flags 9
method name describeConstable descriptor ()Ljava/util/Optional; flags 1 signature ()Ljava/util/Optional<Ljava/lang/constant/DynamicConstantDesc<Ljava/lang/Character;>;>;
class name java/lang/Character$UnicodeBlock
field name YEZIDI descriptor Ljava/lang/Character$UnicodeBlock; flags 19
field name CHORASMIAN descriptor Ljava/lang/Character$UnicodeBlock; flags 19
field name DIVES_AKURU descriptor Ljava/lang/Character$UnicodeBlock; flags 19
field name LISU_SUPPLEMENT descriptor Ljava/lang/Character$UnicodeBlock; flags 19
field name KHITAN_SMALL_SCRIPT descriptor Ljava/lang/Character$UnicodeBlock; flags 19
field name TANGUT_SUPPLEMENT descriptor Ljava/lang/Character$UnicodeBlock; flags 19
field name SYMBOLS_FOR_LEGACY_COMPUTING descriptor Ljava/lang/Character$UnicodeBlock; flags 19
field name CJK_UNIFIED_IDEOGRAPHS_EXTENSION_G descriptor Ljava/lang/Character$UnicodeBlock; flags 19
class name java/lang/Character$UnicodeScript
field name YEZIDI descriptor Ljava/lang/Character$UnicodeScript; flags 4019
field name CHORASMIAN descriptor Ljava/lang/Character$UnicodeScript; flags 4019
field name DIVES_AKURU descriptor Ljava/lang/Character$UnicodeScript; flags 4019
field name KHITAN_SMALL_SCRIPT descriptor Ljava/lang/Character$UnicodeScript; flags 4019
class name java/lang/Class
method name isHidden descriptor ()Z flags 101 runtimeAnnotations @Ljdk/internal/HotSpotIntrinsicCandidate;
method name permittedSubclasses descriptor ()[Ljava/lang/constant/ClassDesc; flags 1 classAnnotations @Ljdk/internal/PreviewFeature;(feature=eLjdk/internal/PreviewFeature$Feature;SEALED_CLASSES;,essentialAPI=Zfalse)
method name isSealed descriptor ()Z flags 1 classAnnotations @Ljdk/internal/PreviewFeature;(feature=eLjdk/internal/PreviewFeature$Feature;SEALED_CLASSES;,essentialAPI=Zfalse)
class name java/lang/Math
method name absExact descriptor (I)I flags 9
method name absExact descriptor (J)J flags 9
class name java/lang/NullPointerException
method name fillInStackTrace descriptor ()Ljava/lang/Throwable; flags 21
class name java/lang/Short
header extends java/lang/Number implements java/lang/Comparable,java/lang/constant/Constable flags 31 signature Ljava/lang/Number;Ljava/lang/Comparable<Ljava/lang/Short;>;Ljava/lang/constant/Constable;
method name describeConstable descriptor ()Ljava/util/Optional; flags 1 signature ()Ljava/util/Optional<Ljava/lang/constant/DynamicConstantDesc<Ljava/lang/Short;>;>;
class name java/lang/StrictMath
method name absExact descriptor (I)I flags 9
method name absExact descriptor (J)J flags 9
class name java/lang/String
-method name stripIndent descriptor ()Ljava/lang/String;
-method name translateEscapes descriptor ()Ljava/lang/String;
-method name formatted descriptor ([Ljava/lang/Object;)Ljava/lang/String;
method name stripIndent descriptor ()Ljava/lang/String; flags 1
method name translateEscapes descriptor ()Ljava/lang/String; flags 1
method name formatted descriptor ([Ljava/lang/Object;)Ljava/lang/String; flags 81
class name java/lang/constant/ConstantDescs
field name BSM_GET_STATIC_FINAL descriptor Ljava/lang/constant/DirectMethodHandleDesc; flags 19
field name BSM_EXPLICIT_CAST descriptor Ljava/lang/constant/DirectMethodHandleDesc; flags 19
field name TRUE descriptor Ljava/lang/constant/DynamicConstantDesc; flags 19 signature Ljava/lang/constant/DynamicConstantDesc<Ljava/lang/Boolean;>;
field name FALSE descriptor Ljava/lang/constant/DynamicConstantDesc; flags 19 signature Ljava/lang/constant/DynamicConstantDesc<Ljava/lang/Boolean;>;
class name java/lang/invoke/ConstantBootstraps
-method name <init> descriptor ()V
method name explicitCast descriptor (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;Ljava/lang/Object;)Ljava/lang/Object; thrownTypes java/lang/ClassCastException flags 9 signature (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class<*>;Ljava/lang/Object;)Ljava/lang/Object;
class name java/lang/invoke/MethodHandles
header extends java/lang/Object nestMembers java/lang/invoke/MethodHandles$Lookup,java/lang/invoke/MethodHandles$Lookup$ClassOption flags 21
innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19
innerclass innerClass java/lang/invoke/VarHandle$AccessMode outerClass java/lang/invoke/VarHandle innerClassName AccessMode flags 4019
innerclass innerClass java/lang/invoke/MethodHandles$Lookup$ClassOption outerClass java/lang/invoke/MethodHandles$Lookup innerClassName ClassOption flags 4019
class name java/lang/invoke/MethodHandles$Lookup
header extends java/lang/Object nestHost java/lang/invoke/MethodHandles flags 31
innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19
innerclass innerClass java/lang/invoke/MethodHandles$Lookup$ClassOption outerClass java/lang/invoke/MethodHandles$Lookup innerClassName ClassOption flags 4019
innerclass innerClass java/lang/invoke/VarHandle$AccessMode outerClass java/lang/invoke/VarHandle innerClassName AccessMode flags 4019
method name defineHiddenClass descriptor ([BZ[Ljava/lang/invoke/MethodHandles$Lookup$ClassOption;)Ljava/lang/invoke/MethodHandles$Lookup; thrownTypes java/lang/IllegalAccessException flags 81
method name ensureInitialized descriptor (Ljava/lang/Class;)Ljava/lang/Class; thrownTypes java/lang/IllegalAccessException flags 1 signature (Ljava/lang/Class<*>;)Ljava/lang/Class<*>;
class name java/lang/invoke/MethodHandles$Lookup$ClassOption
header extends java/lang/Enum nestHost java/lang/invoke/MethodHandles flags 4031 signature Ljava/lang/Enum<Ljava/lang/invoke/MethodHandles$Lookup$ClassOption;>;
innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19
innerclass innerClass java/lang/invoke/MethodHandles$Lookup$ClassOption outerClass java/lang/invoke/MethodHandles$Lookup innerClassName ClassOption flags 4019
field name NESTMATE descriptor Ljava/lang/invoke/MethodHandles$Lookup$ClassOption; flags 4019
field name STRONG descriptor Ljava/lang/invoke/MethodHandles$Lookup$ClassOption; flags 4019
method name values descriptor ()[Ljava/lang/invoke/MethodHandles$Lookup$ClassOption; flags 9
method name valueOf descriptor (Ljava/lang/String;)Ljava/lang/invoke/MethodHandles$Lookup$ClassOption; flags 9
class name java/lang/invoke/VarHandle
-method name varType descriptor ()Ljava/lang/Class;
-method name coordinateTypes descriptor ()Ljava/util/List;
-method name toMethodHandle descriptor (Ljava/lang/invoke/VarHandle$AccessMode;)Ljava/lang/invoke/MethodHandle;
method name varType descriptor ()Ljava/lang/Class; flags 1 signature ()Ljava/lang/Class<*>;
method name coordinateTypes descriptor ()Ljava/util/List; flags 1 signature ()Ljava/util/List<Ljava/lang/Class<*>;>;
method name toMethodHandle descriptor (Ljava/lang/invoke/VarHandle$AccessMode;)Ljava/lang/invoke/MethodHandle; flags 1
class name java/lang/reflect/AnnotatedType
method name getAnnotation descriptor (Ljava/lang/Class;)Ljava/lang/annotation/Annotation; flags 401 signature <T::Ljava/lang/annotation/Annotation;>(Ljava/lang/Class<TT;>;)TT;
method name getAnnotations descriptor ()[Ljava/lang/annotation/Annotation; flags 401
method name getDeclaredAnnotations descriptor ()[Ljava/lang/annotation/Annotation; flags 401
class name java/lang/reflect/Modifier
-method name <init> descriptor ()V
class name java/net/DatagramSocket
header extends java/lang/Object implements java/io/Closeable flags 21
innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19
-method name bind descriptor (Ljava/net/SocketAddress;)V
-method name receive descriptor (Ljava/net/DatagramPacket;)V
-method name setSoTimeout descriptor (I)V
-method name getSoTimeout descriptor ()I
-method name setSendBufferSize descriptor (I)V
-method name getSendBufferSize descriptor ()I
-method name setReceiveBufferSize descriptor (I)V
-method name getReceiveBufferSize descriptor ()I
-method name setReuseAddress descriptor (Z)V
-method name getReuseAddress descriptor ()Z
-method name setBroadcast descriptor (Z)V
-method name getBroadcast descriptor ()Z
-method name setTrafficClass descriptor (I)V
-method name getTrafficClass descriptor ()I
method name bind descriptor (Ljava/net/SocketAddress;)V thrownTypes java/net/SocketException flags 1
method name receive descriptor (Ljava/net/DatagramPacket;)V thrownTypes java/io/IOException flags 1
method name setSoTimeout descriptor (I)V thrownTypes java/net/SocketException flags 1
method name getSoTimeout descriptor ()I thrownTypes java/net/SocketException flags 1
method name setSendBufferSize descriptor (I)V thrownTypes java/net/SocketException flags 1
method name getSendBufferSize descriptor ()I thrownTypes java/net/SocketException flags 1
method name setReceiveBufferSize descriptor (I)V thrownTypes java/net/SocketException flags 1
method name getReceiveBufferSize descriptor ()I thrownTypes java/net/SocketException flags 1
method name setReuseAddress descriptor (Z)V thrownTypes java/net/SocketException flags 1
method name getReuseAddress descriptor ()Z thrownTypes java/net/SocketException flags 1
method name setBroadcast descriptor (Z)V thrownTypes java/net/SocketException flags 1
method name getBroadcast descriptor ()Z thrownTypes java/net/SocketException flags 1
method name setTrafficClass descriptor (I)V thrownTypes java/net/SocketException flags 1
method name getTrafficClass descriptor ()I thrownTypes java/net/SocketException flags 1
class name java/net/MulticastSocket
-method name supportedOptions descriptor ()Ljava/util/Set;
class name java/nio/CharBuffer
method name isEmpty descriptor ()Z flags 11
class name java/nio/channels/ServerSocketChannel
method name open descriptor (Ljava/net/ProtocolFamily;)Ljava/nio/channels/ServerSocketChannel; thrownTypes java/io/IOException flags 9
class name java/nio/channels/SocketChannel
method name open descriptor (Ljava/net/ProtocolFamily;)Ljava/nio/channels/SocketChannel; thrownTypes java/io/IOException flags 9
class name java/nio/channels/spi/SelectorProvider
method name openSocketChannel descriptor (Ljava/net/ProtocolFamily;)Ljava/nio/channels/SocketChannel; thrownTypes java/io/IOException flags 1
method name openServerSocketChannel descriptor (Ljava/net/ProtocolFamily;)Ljava/nio/channels/ServerSocketChannel; thrownTypes java/io/IOException flags 1
class name java/security/KeyStore
header extends java/lang/Object nestMembers java/security/KeyStore$Builder,java/security/KeyStore$TrustedCertificateEntry,java/security/KeyStore$SecretKeyEntry,java/security/KeyStore$PrivateKeyEntry,java/security/KeyStore$Entry,java/security/KeyStore$Entry$Attribute,java/security/KeyStore$CallbackHandlerProtection,java/security/KeyStore$PasswordProtection,java/security/KeyStore$ProtectionParameter,java/security/KeyStore$LoadStoreParameter flags 21
innerclass innerClass java/security/KeyStore$LoadStoreParameter outerClass java/security/KeyStore innerClassName LoadStoreParameter flags 609
innerclass innerClass java/security/KeyStore$ProtectionParameter outerClass java/security/KeyStore innerClassName ProtectionParameter flags 609
innerclass innerClass java/security/KeyStore$Entry outerClass java/security/KeyStore innerClassName Entry flags 609
innerclass innerClass java/security/Provider$Service outerClass java/security/Provider innerClassName Service flags 9
innerclass innerClass java/security/KeyStore$Builder outerClass java/security/KeyStore innerClassName Builder flags 409
innerclass innerClass java/security/KeyStore$TrustedCertificateEntry outerClass java/security/KeyStore innerClassName TrustedCertificateEntry flags 19
innerclass innerClass java/security/KeyStore$SecretKeyEntry outerClass java/security/KeyStore innerClassName SecretKeyEntry flags 19
innerclass innerClass java/security/KeyStore$PrivateKeyEntry outerClass java/security/KeyStore innerClassName PrivateKeyEntry flags 19
innerclass innerClass java/security/KeyStore$CallbackHandlerProtection outerClass java/security/KeyStore innerClassName CallbackHandlerProtection flags 9
innerclass innerClass java/security/KeyStore$PasswordProtection outerClass java/security/KeyStore innerClassName PasswordProtection flags 9
innerclass innerClass java/security/KeyStore$Entry$Attribute outerClass java/security/KeyStore$Entry innerClassName Attribute flags 609
class name java/security/interfaces/EdECKey
header extends java/lang/Object flags 601
method name getParams descriptor ()Ljava/security/spec/NamedParameterSpec; flags 401
class name java/security/interfaces/EdECPrivateKey
header extends java/lang/Object implements java/security/interfaces/EdECKey,java/security/PrivateKey flags 601
method name getBytes descriptor ()Ljava/util/Optional; flags 401 signature ()Ljava/util/Optional<[B>;
class name java/security/interfaces/EdECPublicKey
header extends java/lang/Object implements java/security/interfaces/EdECKey,java/security/PublicKey flags 601
method name getPoint descriptor ()Ljava/security/spec/EdECPoint; flags 401
class name java/security/spec/EdDSAParameterSpec
header extends java/lang/Object implements java/security/spec/AlgorithmParameterSpec flags 21
method name <init> descriptor (Z)V flags 1
method name <init> descriptor (Z[B)V flags 1
method name isPrehash descriptor ()Z flags 1
method name getContext descriptor ()Ljava/util/Optional; flags 1 signature ()Ljava/util/Optional<[B>;
class name java/security/spec/EdECPoint
header extends java/lang/Object flags 31
method name <init> descriptor (ZLjava/math/BigInteger;)V flags 1
method name isXOdd descriptor ()Z flags 1
method name getY descriptor ()Ljava/math/BigInteger; flags 1
class name java/security/spec/EdECPrivateKeySpec
header extends java/lang/Object implements java/security/spec/KeySpec flags 31
method name <init> descriptor (Ljava/security/spec/NamedParameterSpec;[B)V flags 1
method name getParams descriptor ()Ljava/security/spec/NamedParameterSpec; flags 1
method name getBytes descriptor ()[B flags 1
class name java/security/spec/EdECPublicKeySpec
header extends java/lang/Object implements java/security/spec/KeySpec flags 31
method name <init> descriptor (Ljava/security/spec/NamedParameterSpec;Ljava/security/spec/EdECPoint;)V flags 1
method name getParams descriptor ()Ljava/security/spec/NamedParameterSpec; flags 1
method name getPoint descriptor ()Ljava/security/spec/EdECPoint; flags 1
class name java/security/spec/NamedParameterSpec
field name ED25519 descriptor Ljava/security/spec/NamedParameterSpec; flags 19
field name ED448 descriptor Ljava/security/spec/NamedParameterSpec; flags 19
class name java/text/DecimalFormatSymbols
method name getMonetaryGroupingSeparator descriptor ()C flags 1
method name setMonetaryGroupingSeparator descriptor (C)V flags 1
class name java/util/NoSuchElementException
method name <init> descriptor (Ljava/lang/String;Ljava/lang/Throwable;)V flags 1
method name <init> descriptor (Ljava/lang/Throwable;)V flags 1
class name java/util/TreeMap
method name putIfAbsent descriptor (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; flags 1 signature (TK;TV;)TV;
method name computeIfAbsent descriptor (Ljava/lang/Object;Ljava/util/function/Function;)Ljava/lang/Object; flags 1 signature (TK;Ljava/util/function/Function<-TK;+TV;>;)TV;
method name computeIfPresent descriptor (Ljava/lang/Object;Ljava/util/function/BiFunction;)Ljava/lang/Object; flags 1 signature (TK;Ljava/util/function/BiFunction<-TK;-TV;+TV;>;)TV;
method name compute descriptor (Ljava/lang/Object;Ljava/util/function/BiFunction;)Ljava/lang/Object; flags 1 signature (TK;Ljava/util/function/BiFunction<-TK;-TV;+TV;>;)TV;
method name merge descriptor (Ljava/lang/Object;Ljava/lang/Object;Ljava/util/function/BiFunction;)Ljava/lang/Object; flags 1 signature (TK;TV;Ljava/util/function/BiFunction<-TV;-TV;+TV;>;)TV;
class name java/util/concurrent/locks/StampedLock
header extends java/lang/Object implements java/io/Serializable flags 21 classAnnotations @Ljdk/Profile+Annotation;(value=I1)
-method name tryWriteLock descriptor ()J
-method name writeLockInterruptibly descriptor ()J
-method name tryReadLock descriptor ()J
-method name tryReadLock descriptor (JLjava/util/concurrent/TimeUnit;)J
-method name readLockInterruptibly descriptor ()J
-method name unlock descriptor (J)V
method name tryWriteLock descriptor ()J flags 1
method name writeLockInterruptibly descriptor ()J thrownTypes java/lang/InterruptedException flags 1
method name tryReadLock descriptor ()J flags 1
method name tryReadLock descriptor (JLjava/util/concurrent/TimeUnit;)J thrownTypes java/lang/InterruptedException flags 1
method name readLockInterruptibly descriptor ()J thrownTypes java/lang/InterruptedException flags 1
method name unlock descriptor (J)V flags 1
class name javax/net/ssl/SSLSession
-method name getPeerCertificateChain descriptor ()[Ljavax/security/cert/X509Certificate;
method name getPeerCertificateChain descriptor ()[Ljavax/security/cert/X509Certificate; thrownTypes javax/net/ssl/SSLPeerUnverifiedException flags 1 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="9")

View File

@@ -0,0 +1,74 @@
#
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. 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.
#
# ##########################################################
# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
# ##########################################################
#
class name javax/lang/model/SourceVersion
field name RELEASE_15 descriptor Ljavax/lang/model/SourceVersion; flags 4019
class name javax/lang/model/element/Element
method name getAnnotationsByType descriptor (Ljava/lang/Class;)[Ljava/lang/annotation/Annotation; flags 401 signature <A::Ljava/lang/annotation/Annotation;>(Ljava/lang/Class<TA;>;)[TA;
class name javax/lang/model/element/Modifier
header extends java/lang/Enum flags 4021 signature Ljava/lang/Enum<Ljavax/lang/model/element/Modifier;>;
field name SEALED descriptor Ljavax/lang/model/element/Modifier; flags 4019 classAnnotations @Ljdk/internal/PreviewFeature;(feature=eLjdk/internal/PreviewFeature$Feature;SEALED_CLASSES;,essentialAPI=Zfalse)
field name NON_SEALED descriptor Ljavax/lang/model/element/Modifier; flags 4019 classAnnotations @Ljdk/internal/PreviewFeature;(feature=eLjdk/internal/PreviewFeature$Feature;SEALED_CLASSES;,essentialAPI=Zfalse)
class name javax/lang/model/element/TypeElement
method name getPermittedSubclasses descriptor ()Ljava/util/List; flags 1 signature ()Ljava/util/List<+Ljavax/lang/model/type/TypeMirror;>; classAnnotations @Ljdk/internal/PreviewFeature;(feature=eLjdk/internal/PreviewFeature$Feature;SEALED_CLASSES;,essentialAPI=Zfalse)
class name javax/lang/model/type/TypeMirror
method name getAnnotationMirrors descriptor ()Ljava/util/List; flags 401 signature ()Ljava/util/List<+Ljavax/lang/model/element/AnnotationMirror;>;
method name getAnnotation descriptor (Ljava/lang/Class;)Ljava/lang/annotation/Annotation; flags 401 signature <A::Ljava/lang/annotation/Annotation;>(Ljava/lang/Class<TA;>;)TA;
method name getAnnotationsByType descriptor (Ljava/lang/Class;)[Ljava/lang/annotation/Annotation; flags 401 signature <A::Ljava/lang/annotation/Annotation;>(Ljava/lang/Class<TA;>;)[TA;
class name javax/lang/model/util/AbstractAnnotationValueVisitor14
header extends javax/lang/model/util/AbstractAnnotationValueVisitor9 flags 421 signature <R:Ljava/lang/Object;P:Ljava/lang/Object;>Ljavax/lang/model/util/AbstractAnnotationValueVisitor9<TR;TP;>; runtimeAnnotations @Ljavax/annotation/processing/SupportedSourceVersion;(value=eLjavax/lang/model/SourceVersion;RELEASE_15;)
class name javax/lang/model/util/AbstractElementVisitor14
header extends javax/lang/model/util/AbstractElementVisitor9 flags 421 signature <R:Ljava/lang/Object;P:Ljava/lang/Object;>Ljavax/lang/model/util/AbstractElementVisitor9<TR;TP;>; classAnnotations @Ljdk/internal/PreviewFeature;(feature=eLjdk/internal/PreviewFeature$Feature;RECORDS;,essentialAPI=Zfalse) runtimeAnnotations @Ljavax/annotation/processing/SupportedSourceVersion;(value=eLjavax/lang/model/SourceVersion;RELEASE_15;)
class name javax/lang/model/util/AbstractTypeVisitor14
header extends javax/lang/model/util/AbstractTypeVisitor9 flags 421 signature <R:Ljava/lang/Object;P:Ljava/lang/Object;>Ljavax/lang/model/util/AbstractTypeVisitor9<TR;TP;>; runtimeAnnotations @Ljavax/annotation/processing/SupportedSourceVersion;(value=eLjavax/lang/model/SourceVersion;RELEASE_15;)
class name javax/lang/model/util/ElementKindVisitor14
header extends javax/lang/model/util/ElementKindVisitor9 flags 21 signature <R:Ljava/lang/Object;P:Ljava/lang/Object;>Ljavax/lang/model/util/ElementKindVisitor9<TR;TP;>; classAnnotations @Ljdk/internal/PreviewFeature;(feature=eLjdk/internal/PreviewFeature$Feature;RECORDS;,essentialAPI=Zfalse) runtimeAnnotations @Ljavax/annotation/processing/SupportedSourceVersion;(value=eLjavax/lang/model/SourceVersion;RELEASE_15;)
class name javax/lang/model/util/ElementScanner14
header extends javax/lang/model/util/ElementScanner9 flags 21 signature <R:Ljava/lang/Object;P:Ljava/lang/Object;>Ljavax/lang/model/util/ElementScanner9<TR;TP;>; classAnnotations @Ljdk/internal/PreviewFeature;(feature=eLjdk/internal/PreviewFeature$Feature;RECORDS;,essentialAPI=Zfalse) runtimeAnnotations @Ljavax/annotation/processing/SupportedSourceVersion;(value=eLjavax/lang/model/SourceVersion;RELEASE_15;)
class name javax/lang/model/util/SimpleAnnotationValueVisitor14
header extends javax/lang/model/util/SimpleAnnotationValueVisitor9 flags 21 signature <R:Ljava/lang/Object;P:Ljava/lang/Object;>Ljavax/lang/model/util/SimpleAnnotationValueVisitor9<TR;TP;>; runtimeAnnotations @Ljavax/annotation/processing/SupportedSourceVersion;(value=eLjavax/lang/model/SourceVersion;RELEASE_15;)
class name javax/lang/model/util/SimpleElementVisitor14
header extends javax/lang/model/util/SimpleElementVisitor9 flags 21 signature <R:Ljava/lang/Object;P:Ljava/lang/Object;>Ljavax/lang/model/util/SimpleElementVisitor9<TR;TP;>; classAnnotations @Ljdk/internal/PreviewFeature;(feature=eLjdk/internal/PreviewFeature$Feature;RECORDS;,essentialAPI=Zfalse) runtimeAnnotations @Ljavax/annotation/processing/SupportedSourceVersion;(value=eLjavax/lang/model/SourceVersion;RELEASE_15;)
class name javax/lang/model/util/SimpleTypeVisitor14
header extends javax/lang/model/util/SimpleTypeVisitor9 flags 21 signature <R:Ljava/lang/Object;P:Ljava/lang/Object;>Ljavax/lang/model/util/SimpleTypeVisitor9<TR;TP;>; runtimeAnnotations @Ljavax/annotation/processing/SupportedSourceVersion;(value=eLjavax/lang/model/SourceVersion;RELEASE_15;)
class name javax/lang/model/util/TypeKindVisitor14
header extends javax/lang/model/util/TypeKindVisitor9 flags 21 signature <R:Ljava/lang/Object;P:Ljava/lang/Object;>Ljavax/lang/model/util/TypeKindVisitor9<TR;TP;>; runtimeAnnotations @Ljavax/annotation/processing/SupportedSourceVersion;(value=eLjavax/lang/model/SourceVersion;RELEASE_15;)

View File

@@ -0,0 +1,65 @@
#
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. 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.
#
# ##########################################################
# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
# ##########################################################
#
class name java/awt/Robot
-method name delay descriptor (I)V
method name delay descriptor (I)V flags 1
class name javax/accessibility/AccessibleBundle
header extends java/lang/Object flags 421 classAnnotations @Ljdk/Profile+Annotation;(value=I4)
class name javax/sound/sampled/BooleanControl
header extends javax/sound/sampled/Control nestMembers javax/sound/sampled/BooleanControl$Type flags 421
innerclass innerClass javax/sound/sampled/Control$Type outerClass javax/sound/sampled/Control innerClassName Type flags 9
innerclass innerClass javax/sound/sampled/BooleanControl$Type outerClass javax/sound/sampled/BooleanControl innerClassName Type flags 9
class name javax/sound/sampled/CompoundControl
header extends javax/sound/sampled/Control nestMembers javax/sound/sampled/CompoundControl$Type flags 421
innerclass innerClass javax/sound/sampled/Control$Type outerClass javax/sound/sampled/Control innerClassName Type flags 9
innerclass innerClass javax/sound/sampled/CompoundControl$Type outerClass javax/sound/sampled/CompoundControl innerClassName Type flags 9
class name javax/sound/sampled/Control
header extends java/lang/Object nestMembers javax/sound/sampled/Control$Type flags 421
innerclass innerClass javax/sound/sampled/Control$Type outerClass javax/sound/sampled/Control innerClassName Type flags 9
class name javax/sound/sampled/LineEvent
header extends java/util/EventObject nestMembers javax/sound/sampled/LineEvent$Type flags 21
innerclass innerClass javax/sound/sampled/LineEvent$Type outerClass javax/sound/sampled/LineEvent innerClassName Type flags 9
class name javax/sound/sampled/Mixer$Info
header extends java/lang/Object nestHost javax/sound/sampled/Mixer flags 21
innerclass innerClass javax/sound/sampled/Mixer$Info outerClass javax/sound/sampled/Mixer innerClassName Info flags 9
class name javax/sound/sampled/Port$Info
header extends javax/sound/sampled/Line$Info nestHost javax/sound/sampled/Port flags 21
innerclass innerClass javax/sound/sampled/Line$Info outerClass javax/sound/sampled/Line innerClassName Info flags 9
innerclass innerClass javax/sound/sampled/Port$Info outerClass javax/sound/sampled/Port innerClassName Info flags 9
class name javax/sound/sampled/ReverbType
header extends java/lang/Object flags 21 classAnnotations @Ljdk/Profile+Annotation;(value=I4)

View File

@@ -0,0 +1,31 @@
#
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. 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.
#
# ##########################################################
# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
# ##########################################################
#
class name javax/management/remote/rmi/RMIConnectorServer
-field name CREDENTIAL_TYPES descriptor Ljava/lang/String;

View File

@@ -0,0 +1,33 @@
#
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. 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.
#
# ##########################################################
# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
# ##########################################################
#
class name javax/naming/spi/NamingManager
header extends java/lang/Object flags 21
innerclass innerClass java/util/ServiceLoader$Provider outerClass java/util/ServiceLoader innerClassName Provider flags 609
innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19

View File

@@ -0,0 +1,77 @@
#
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. 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.
#
# ##########################################################
# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
# ##########################################################
#
class name java/rmi/activation/Activatable
header extends java/rmi/server/RemoteServer flags 421 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="15")
class name java/rmi/activation/ActivateFailedException
header extends java/rmi/RemoteException flags 21 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="15")
class name java/rmi/activation/ActivationDesc
header extends java/lang/Object implements java/io/Serializable flags 31 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="15")
class name java/rmi/activation/ActivationException
header extends java/lang/Exception flags 21 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="15")
innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19
class name java/rmi/activation/ActivationGroup
header extends java/rmi/server/UnicastRemoteObject implements java/rmi/activation/ActivationInstantiator flags 421 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="15")
innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19
class name java/rmi/activation/ActivationGroupDesc
header extends java/lang/Object implements java/io/Serializable nestMembers java/rmi/activation/ActivationGroupDesc$CommandEnvironment flags 31 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="15")
innerclass innerClass java/rmi/activation/ActivationGroupDesc$CommandEnvironment outerClass java/rmi/activation/ActivationGroupDesc innerClassName CommandEnvironment flags 9
class name java/rmi/activation/ActivationGroupID
header extends java/lang/Object implements java/io/Serializable flags 21 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="15")
class name java/rmi/activation/ActivationGroup_Stub
header extends java/rmi/server/RemoteStub implements java/rmi/activation/ActivationInstantiator,java/rmi/Remote flags 31 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="15")
class name java/rmi/activation/ActivationID
header extends java/lang/Object implements java/io/Serializable flags 21 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="15")
innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19
class name java/rmi/activation/ActivationInstantiator
header extends java/lang/Object implements java/rmi/Remote flags 601 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="15")
class name java/rmi/activation/ActivationMonitor
header extends java/lang/Object implements java/rmi/Remote flags 601 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="15")
class name java/rmi/activation/ActivationSystem
header extends java/lang/Object implements java/rmi/Remote flags 601 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="15")
class name java/rmi/activation/Activator
header extends java/lang/Object implements java/rmi/Remote flags 601 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="15")
class name java/rmi/activation/UnknownGroupException
header extends java/rmi/activation/ActivationException flags 21 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="15")
class name java/rmi/activation/UnknownObjectException
header extends java/rmi/activation/ActivationException flags 21 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="15")

View File

@@ -0,0 +1,32 @@
#
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. 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.
#
# ##########################################################
# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
# ##########################################################
#
class name javax/xml/stream/XMLInputFactory
-method name newFactory descriptor ()Ljavax/xml/stream/XMLInputFactory;
method name newFactory descriptor ()Ljavax/xml/stream/XMLInputFactory; thrownTypes javax/xml/stream/FactoryConfigurationError flags 9

View File

@@ -0,0 +1,34 @@
#
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. 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.
#
# ##########################################################
# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
# ##########################################################
#
class name com/sun/source/tree/ClassTree
method name getPermitsClause descriptor ()Ljava/util/List; flags 1 signature ()Ljava/util/List<+Lcom/sun/source/tree/Tree;>; classAnnotations @Ljdk/internal/PreviewFeature;(feature=eLjdk/internal/PreviewFeature$Feature;SEALED_CLASSES;,essentialAPI=Zfalse)
class name com/sun/source/util/DocTrees
method name getType descriptor (Lcom/sun/source/util/DocTreePath;)Ljavax/lang/model/type/TypeMirror; flags 401

View File

@@ -0,0 +1,131 @@
#
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. 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.
#
# ##########################################################
# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
# ##########################################################
#
class name jdk/incubator/foreign/AbstractLayout
header extends java/lang/Object implements jdk/incubator/foreign/MemoryLayout flags 420
innerclass innerClass java/util/Map$Entry outerClass java/util/Map innerClassName Entry flags 609
innerclass innerClass java/lang/constant/DirectMethodHandleDesc$Kind outerClass java/lang/constant/DirectMethodHandleDesc innerClassName Kind flags 4019
innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19
-method name <init> descriptor (Ljava/util/OptionalLong;JLjava/util/Optional;)V
method name <init> descriptor (Ljava/util/OptionalLong;JLjava/util/Map;)V flags 1 signature (Ljava/util/OptionalLong;JLjava/util/Map<Ljava/lang/String;Ljava/lang/constant/Constable;>;)V
method name attribute descriptor (Ljava/lang/String;)Ljava/util/Optional; flags 1 signature (Ljava/lang/String;)Ljava/util/Optional<Ljava/lang/constant/Constable;>;
method name attributes descriptor ()Ljava/util/stream/Stream; flags 1 signature ()Ljava/util/stream/Stream<Ljava/lang/String;>;
method name withAttribute descriptor (Ljava/lang/String;Ljava/lang/constant/Constable;)Ljdk/incubator/foreign/AbstractLayout; flags 1
method name isPadding descriptor ()Z flags 1
method name withAttribute descriptor (Ljava/lang/String;Ljava/lang/constant/Constable;)Ljdk/incubator/foreign/MemoryLayout; flags 1041
class name jdk/incubator/foreign/GroupLayout
method name withAttribute descriptor (Ljava/lang/String;Ljava/lang/constant/Constable;)Ljdk/incubator/foreign/GroupLayout; flags 1
method name isPadding descriptor ()Z flags 1041
method name withAttribute descriptor (Ljava/lang/String;Ljava/lang/constant/Constable;)Ljdk/incubator/foreign/AbstractLayout; flags 1041
method name attributes descriptor ()Ljava/util/stream/Stream; flags 1041
method name attribute descriptor (Ljava/lang/String;)Ljava/util/Optional; flags 1041
method name withAttribute descriptor (Ljava/lang/String;Ljava/lang/constant/Constable;)Ljdk/incubator/foreign/MemoryLayout; flags 1041
class name jdk/incubator/foreign/MappedMemorySegment
header extends java/lang/Object implements jdk/incubator/foreign/MemorySegment flags 601
method name withAccessModes descriptor (I)Ljdk/incubator/foreign/MappedMemorySegment; flags 401
method name asSlice descriptor (JJ)Ljdk/incubator/foreign/MappedMemorySegment; flags 401
method name force descriptor ()V flags 401
method name load descriptor ()V flags 401
method name unload descriptor ()V flags 401
method name isLoaded descriptor ()Z flags 401
method name asSlice descriptor (JJ)Ljdk/incubator/foreign/MemorySegment; flags 1041
method name withAccessModes descriptor (I)Ljdk/incubator/foreign/MemorySegment; flags 1041
class name jdk/incubator/foreign/MemoryAddress
field name NULL descriptor Ljdk/incubator/foreign/MemoryAddress; flags 19
-method name offset descriptor ()J
-method name copy descriptor (Ljdk/incubator/foreign/MemoryAddress;Ljdk/incubator/foreign/MemoryAddress;J)V
method name segmentOffset descriptor ()J flags 401
method name toRawLongValue descriptor ()J flags 401
method name rebase descriptor (Ljdk/incubator/foreign/MemorySegment;)Ljdk/incubator/foreign/MemoryAddress; flags 401
method name ofLong descriptor (J)Ljdk/incubator/foreign/MemoryAddress; flags 9
class name jdk/incubator/foreign/MemoryHandles
method name asAddressVarHandle descriptor (Ljava/lang/invoke/VarHandle;)Ljava/lang/invoke/VarHandle; flags 9
method name asUnsigned descriptor (Ljava/lang/invoke/VarHandle;Ljava/lang/Class;)Ljava/lang/invoke/VarHandle; flags 9 signature (Ljava/lang/invoke/VarHandle;Ljava/lang/Class<*>;)Ljava/lang/invoke/VarHandle;
method name filterValue descriptor (Ljava/lang/invoke/VarHandle;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodHandle;)Ljava/lang/invoke/VarHandle; flags 9
method name filterCoordinates descriptor (Ljava/lang/invoke/VarHandle;I[Ljava/lang/invoke/MethodHandle;)Ljava/lang/invoke/VarHandle; flags 89
method name insertCoordinates descriptor (Ljava/lang/invoke/VarHandle;I[Ljava/lang/Object;)Ljava/lang/invoke/VarHandle; flags 89
method name permuteCoordinates descriptor (Ljava/lang/invoke/VarHandle;Ljava/util/List;[I)Ljava/lang/invoke/VarHandle; flags 89 signature (Ljava/lang/invoke/VarHandle;Ljava/util/List<Ljava/lang/Class<*>;>;[I)Ljava/lang/invoke/VarHandle;
method name collectCoordinates descriptor (Ljava/lang/invoke/VarHandle;ILjava/lang/invoke/MethodHandle;)Ljava/lang/invoke/VarHandle; flags 9
method name dropCoordinates descriptor (Ljava/lang/invoke/VarHandle;I[Ljava/lang/Class;)Ljava/lang/invoke/VarHandle; flags 89 signature (Ljava/lang/invoke/VarHandle;I[Ljava/lang/Class<*>;)Ljava/lang/invoke/VarHandle;
class name jdk/incubator/foreign/MemoryLayout
field name LAYOUT_NAME descriptor Ljava/lang/String; constantValue layout/name flags 19
-method name offset descriptor ([Ljdk/incubator/foreign/MemoryLayout$PathElement;)J
method name attribute descriptor (Ljava/lang/String;)Ljava/util/Optional; flags 401 signature (Ljava/lang/String;)Ljava/util/Optional<Ljava/lang/constant/Constable;>;
method name withAttribute descriptor (Ljava/lang/String;Ljava/lang/constant/Constable;)Ljdk/incubator/foreign/MemoryLayout; flags 401
method name attributes descriptor ()Ljava/util/stream/Stream; flags 401 signature ()Ljava/util/stream/Stream<Ljava/lang/String;>;
method name bitOffset descriptor ([Ljdk/incubator/foreign/MemoryLayout$PathElement;)J flags 81
method name byteOffset descriptor ([Ljdk/incubator/foreign/MemoryLayout$PathElement;)J flags 81
method name isPadding descriptor ()Z flags 401
class name jdk/incubator/foreign/MemorySegment
field name READ descriptor I constantValue 1 flags 19
field name WRITE descriptor I constantValue 2 flags 19
field name CLOSE descriptor I constantValue 4 flags 19
field name ACQUIRE descriptor I constantValue 8 flags 19
field name HANDOFF descriptor I constantValue 16 flags 19
field name ALL_ACCESS descriptor I constantValue 31 flags 19
-method name acquire descriptor ()Ljdk/incubator/foreign/MemorySegment;
-method name asReadOnly descriptor ()Ljdk/incubator/foreign/MemorySegment;
-method name isReadOnly descriptor ()Z
-method name mapFromPath descriptor (Ljava/nio/file/Path;JLjava/nio/channels/FileChannel$MapMode;)Ljdk/incubator/foreign/MemorySegment;
method name spliterator descriptor (Ljdk/incubator/foreign/MemorySegment;Ljdk/incubator/foreign/SequenceLayout;)Ljava/util/Spliterator; flags 9 signature <S::Ljdk/incubator/foreign/MemorySegment;>(TS;Ljdk/incubator/foreign/SequenceLayout;)Ljava/util/Spliterator<TS;>;
method name withOwnerThread descriptor (Ljava/lang/Thread;)Ljdk/incubator/foreign/MemorySegment; flags 401
method name withAccessModes descriptor (I)Ljdk/incubator/foreign/MemorySegment; flags 401
method name hasAccessModes descriptor (I)Z flags 401
method name accessModes descriptor ()I flags 401
method name fill descriptor (B)Ljdk/incubator/foreign/MemorySegment; flags 401
method name copyFrom descriptor (Ljdk/incubator/foreign/MemorySegment;)V flags 401
method name mismatch descriptor (Ljdk/incubator/foreign/MemorySegment;)J flags 401
method name mapFromPath descriptor (Ljava/nio/file/Path;JJLjava/nio/channels/FileChannel$MapMode;)Ljdk/incubator/foreign/MappedMemorySegment; thrownTypes java/io/IOException flags 9
method name ofNativeRestricted descriptor (Ljdk/incubator/foreign/MemoryAddress;JLjava/lang/Thread;Ljava/lang/Runnable;Ljava/lang/Object;)Ljdk/incubator/foreign/MemorySegment; flags 9
class name jdk/incubator/foreign/SequenceLayout
header extends jdk/incubator/foreign/AbstractLayout flags 31
innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19
method name reshape descriptor ([J)Ljdk/incubator/foreign/SequenceLayout; flags 81
method name flatten descriptor ()Ljdk/incubator/foreign/SequenceLayout; flags 1
method name withAttribute descriptor (Ljava/lang/String;Ljava/lang/constant/Constable;)Ljdk/incubator/foreign/SequenceLayout; flags 1
method name isPadding descriptor ()Z flags 1041
method name withAttribute descriptor (Ljava/lang/String;Ljava/lang/constant/Constable;)Ljdk/incubator/foreign/AbstractLayout; flags 1041
method name attributes descriptor ()Ljava/util/stream/Stream; flags 1041
method name attribute descriptor (Ljava/lang/String;)Ljava/util/Optional; flags 1041
method name withAttribute descriptor (Ljava/lang/String;Ljava/lang/constant/Constable;)Ljdk/incubator/foreign/MemoryLayout; flags 1041
class name jdk/incubator/foreign/ValueLayout
method name withAttribute descriptor (Ljava/lang/String;Ljava/lang/constant/Constable;)Ljdk/incubator/foreign/ValueLayout; flags 1
method name isPadding descriptor ()Z flags 1041
method name withAttribute descriptor (Ljava/lang/String;Ljava/lang/constant/Constable;)Ljdk/incubator/foreign/AbstractLayout; flags 1041
method name attributes descriptor ()Ljava/util/stream/Stream; flags 1041
method name attribute descriptor (Ljava/lang/String;)Ljava/util/Optional; flags 1041
method name withAttribute descriptor (Ljava/lang/String;Ljava/lang/constant/Constable;)Ljdk/incubator/foreign/MemoryLayout; flags 1041

View File

@@ -0,0 +1,34 @@
#
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. 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.
#
# ##########################################################
# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
# ##########################################################
#
class name com/sun/jarsigner/ContentSigner
header extends java/lang/Object flags 421 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="9")
class name com/sun/jarsigner/ContentSignerParameters
header extends java/lang/Object flags 601 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="9")

View File

@@ -0,0 +1,35 @@
#
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. 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.
#
# ##########################################################
# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
# ##########################################################
#
class name jdk/javadoc/doclet/StandardDoclet
-method name getSupportedOptions descriptor ()Ljava/util/Set;
method name getSupportedOptions descriptor ()Ljava/util/Set; flags 1 signature ()Ljava/util/Set<+Ljdk/javadoc/doclet/Doclet$Option;>;
class name jdk/javadoc/doclet/Taglet
method name isBlockTag descriptor ()Z flags 1

View File

@@ -0,0 +1,34 @@
#
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. 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.
#
# ##########################################################
# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
# ##########################################################
#
class name com/sun/jdi/VirtualMachine
-method name canAddMethod descriptor ()Z
-method name canUnrestrictedlyRedefineClasses descriptor ()Z
method name canAddMethod descriptor ()Z flags 401 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(since="15")
method name canUnrestrictedlyRedefineClasses descriptor ()Z flags 401 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(since="15")

View File

@@ -0,0 +1,37 @@
#
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. 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.
#
# ##########################################################
# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
# ##########################################################
#
class name jdk/net/ExtendedSocketOptions
header extends java/lang/Object flags 31
-field name SO_FLOW_SLA descriptor Ljava/net/SocketOption;
field name SO_INCOMING_NAPI_ID descriptor Ljava/net/SocketOption; flags 19 signature Ljava/net/SocketOption<Ljava/lang/Integer;>;
-class name jdk/net/SocketFlow
-class name jdk/net/SocketFlow$Status

View File

@@ -0,0 +1,37 @@
#
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. 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.
#
# ##########################################################
# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
# ##########################################################
#
module name jdk.nio.mapmode
header exports jdk/nio/mapmode requires name\u0020;java.base\u0020;flags\u0020;8000 target linux-amd64 flags 8000
class name jdk/nio/mapmode/ExtendedMapMode
header extends java/lang/Object flags 21
innerclass innerClass java/nio/channels/FileChannel$MapMode outerClass java/nio/channels/FileChannel innerClassName MapMode flags 9
field name READ_ONLY_SYNC descriptor Ljava/nio/channels/FileChannel$MapMode; flags 19
field name READ_WRITE_SYNC descriptor Ljava/nio/channels/FileChannel$MapMode; flags 19

View File

@@ -0,0 +1,30 @@
#
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. 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.
#
# ##########################################################
# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
# ##########################################################
#
-module name jdk.rmic

View File

@@ -0,0 +1,180 @@
#
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. 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.
#
# ##########################################################
# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
# ##########################################################
#
-module name jdk.scripting.nashorn
-class name jdk/nashorn/api/scripting/AbstractJSObject
-class name jdk/nashorn/api/scripting/ClassFilter
-class name jdk/nashorn/api/scripting/JSObject
-class name jdk/nashorn/api/scripting/NashornException
-class name jdk/nashorn/api/scripting/NashornScriptEngine
-class name jdk/nashorn/api/scripting/NashornScriptEngineFactory
-class name jdk/nashorn/api/scripting/ScriptObjectMirror
-class name jdk/nashorn/api/scripting/ScriptUtils
-class name jdk/nashorn/api/scripting/URLReader
-class name jdk/nashorn/api/tree/ArrayAccessTree
-class name jdk/nashorn/api/tree/ArrayLiteralTree
-class name jdk/nashorn/api/tree/AssignmentTree
-class name jdk/nashorn/api/tree/BinaryTree
-class name jdk/nashorn/api/tree/BlockTree
-class name jdk/nashorn/api/tree/BreakTree
-class name jdk/nashorn/api/tree/CaseTree
-class name jdk/nashorn/api/tree/CatchTree
-class name jdk/nashorn/api/tree/ClassDeclarationTree
-class name jdk/nashorn/api/tree/ClassExpressionTree
-class name jdk/nashorn/api/tree/CompilationUnitTree
-class name jdk/nashorn/api/tree/CompoundAssignmentTree
-class name jdk/nashorn/api/tree/ConditionalExpressionTree
-class name jdk/nashorn/api/tree/ConditionalLoopTree
-class name jdk/nashorn/api/tree/ContinueTree
-class name jdk/nashorn/api/tree/DebuggerTree
-class name jdk/nashorn/api/tree/Diagnostic
-class name jdk/nashorn/api/tree/Diagnostic$Kind
-class name jdk/nashorn/api/tree/DiagnosticListener
-class name jdk/nashorn/api/tree/DoWhileLoopTree
-class name jdk/nashorn/api/tree/EmptyStatementTree
-class name jdk/nashorn/api/tree/ErroneousTree
-class name jdk/nashorn/api/tree/ExportEntryTree
-class name jdk/nashorn/api/tree/ExpressionStatementTree
-class name jdk/nashorn/api/tree/ExpressionTree
-class name jdk/nashorn/api/tree/ForInLoopTree
-class name jdk/nashorn/api/tree/ForLoopTree
-class name jdk/nashorn/api/tree/ForOfLoopTree
-class name jdk/nashorn/api/tree/FunctionCallTree
-class name jdk/nashorn/api/tree/FunctionDeclarationTree
-class name jdk/nashorn/api/tree/FunctionExpressionTree
-class name jdk/nashorn/api/tree/GotoTree
-class name jdk/nashorn/api/tree/IdentifierTree
-class name jdk/nashorn/api/tree/IfTree
-class name jdk/nashorn/api/tree/ImportEntryTree
-class name jdk/nashorn/api/tree/InstanceOfTree
-class name jdk/nashorn/api/tree/LabeledStatementTree
-class name jdk/nashorn/api/tree/LineMap
-class name jdk/nashorn/api/tree/LiteralTree
-class name jdk/nashorn/api/tree/LoopTree
-class name jdk/nashorn/api/tree/MemberSelectTree
-class name jdk/nashorn/api/tree/ModuleTree
-class name jdk/nashorn/api/tree/NewTree
-class name jdk/nashorn/api/tree/ObjectLiteralTree
-class name jdk/nashorn/api/tree/ParenthesizedTree
-class name jdk/nashorn/api/tree/Parser
-class name jdk/nashorn/api/tree/PropertyTree
-class name jdk/nashorn/api/tree/RegExpLiteralTree
-class name jdk/nashorn/api/tree/ReturnTree
-class name jdk/nashorn/api/tree/SimpleTreeVisitorES5_1
-class name jdk/nashorn/api/tree/SimpleTreeVisitorES6
-class name jdk/nashorn/api/tree/SpreadTree
-class name jdk/nashorn/api/tree/StatementTree
-class name jdk/nashorn/api/tree/SwitchTree
-class name jdk/nashorn/api/tree/TemplateLiteralTree
-class name jdk/nashorn/api/tree/ThrowTree
-class name jdk/nashorn/api/tree/Tree
-class name jdk/nashorn/api/tree/Tree$Kind
-class name jdk/nashorn/api/tree/TreeVisitor
-class name jdk/nashorn/api/tree/TryTree
-class name jdk/nashorn/api/tree/UnaryTree
-class name jdk/nashorn/api/tree/UnknownTreeException
-class name jdk/nashorn/api/tree/VariableTree
-class name jdk/nashorn/api/tree/WhileLoopTree
-class name jdk/nashorn/api/tree/WithTree
-class name jdk/nashorn/api/tree/YieldTree

View File

@@ -0,0 +1,38 @@
#
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. 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.
#
# ##########################################################
# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
# ##########################################################
#
class name sun/misc/Unsafe
header extends java/lang/Object flags 31 classAnnotations @Lsun/Proprietary+Annotation;
innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19
-method name shouldBeInitialized descriptor (Ljava/lang/Class;)Z
-method name ensureClassInitialized descriptor (Ljava/lang/Class;)V
-method name defineAnonymousClass descriptor (Ljava/lang/Class;[B[Ljava/lang/Object;)Ljava/lang/Class;
method name shouldBeInitialized descriptor (Ljava/lang/Class;)Z flags 1 deprecated true signature (Ljava/lang/Class<*>;)Z runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="15")@Ljdk/internal/vm/annotation/ForceInline;
method name ensureClassInitialized descriptor (Ljava/lang/Class;)V flags 1 deprecated true signature (Ljava/lang/Class<*>;)V runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="15")@Ljdk/internal/vm/annotation/ForceInline;
method name defineAnonymousClass descriptor (Ljava/lang/Class;[B[Ljava/lang/Object;)Ljava/lang/Class; flags 1 deprecated true signature (Ljava/lang/Class<*>;[B[Ljava/lang/Object;)Ljava/lang/Class<*>; runtimeAnnotations @Ljdk/internal/vm/annotation/ForceInline;@Ljava/lang/Deprecated;(forRemoval=Zfalse,since="15")

View File

@@ -27,9 +27,9 @@
# ##########################################################
#
#command used to generate this file:
#build.tools.symbolgenerator.CreateSymbols build-description-incremental-file symbols include.list 8 jdk8-updated.classes <none> --normalize-method-flags
#build.tools.symbolgenerator.CreateSymbols build-description-incremental symbols include.list
#
generate platforms 7:8:9:A:B:C:D:E
generate platforms 7:8:9:A:B:C:D:E:F
platform version 8 files java.activation-8.sym.txt:java.base-8.sym.txt:java.compiler-8.sym.txt:java.corba-8.sym.txt:java.datatransfer-8.sym.txt:java.desktop-8.sym.txt:java.instrument-8.sym.txt:java.logging-8.sym.txt:java.management-8.sym.txt:java.management.rmi-8.sym.txt:java.naming-8.sym.txt:java.prefs-8.sym.txt:java.rmi-8.sym.txt:java.scripting-8.sym.txt:java.security.jgss-8.sym.txt:java.security.sasl-8.sym.txt:java.sql-8.sym.txt:java.sql.rowset-8.sym.txt:java.transaction-8.sym.txt:java.xml-8.sym.txt:java.xml.bind-8.sym.txt:java.xml.crypto-8.sym.txt:java.xml.ws-8.sym.txt:java.xml.ws.annotation-8.sym.txt:jdk.httpserver-8.sym.txt:jdk.management-8.sym.txt:jdk.scripting.nashorn-8.sym.txt:jdk.sctp-8.sym.txt:jdk.security.auth-8.sym.txt:jdk.security.jgss-8.sym.txt
platform version 7 base 8 files java.base-7.sym.txt:java.compiler-7.sym.txt:java.datatransfer-7.sym.txt:java.desktop-7.sym.txt:java.logging-7.sym.txt:java.management-7.sym.txt:java.naming-7.sym.txt:java.prefs-7.sym.txt:java.rmi-7.sym.txt:java.scripting-7.sym.txt:java.security.jgss-7.sym.txt:java.security.sasl-7.sym.txt:java.sql-7.sym.txt:java.sql.rowset-7.sym.txt:java.xml-7.sym.txt:java.xml.bind-7.sym.txt:java.xml.ws.annotation-7.sym.txt:jdk.httpserver-7.sym.txt:jdk.management-7.sym.txt:jdk.scripting.nashorn-7.sym.txt:jdk.sctp-7.sym.txt:jdk.security.auth-7.sym.txt:jdk.security.jgss-7.sym.txt
platform version 9 base 8 files java.activation-9.sym.txt:java.base-9.sym.txt:java.compiler-9.sym.txt:java.corba-9.sym.txt:java.datatransfer-9.sym.txt:java.desktop-9.sym.txt:java.instrument-9.sym.txt:java.logging-9.sym.txt:java.management-9.sym.txt:java.management.rmi-9.sym.txt:java.naming-9.sym.txt:java.prefs-9.sym.txt:java.rmi-9.sym.txt:java.scripting-9.sym.txt:java.se-9.sym.txt:java.se.ee-9.sym.txt:java.security.jgss-9.sym.txt:java.security.sasl-9.sym.txt:java.smartcardio-9.sym.txt:java.sql-9.sym.txt:java.sql.rowset-9.sym.txt:java.transaction-9.sym.txt:java.xml-9.sym.txt:java.xml.bind-9.sym.txt:java.xml.crypto-9.sym.txt:java.xml.ws-9.sym.txt:java.xml.ws.annotation-9.sym.txt:jdk.accessibility-9.sym.txt:jdk.attach-9.sym.txt:jdk.charsets-9.sym.txt:jdk.compiler-9.sym.txt:jdk.crypto.cryptoki-9.sym.txt:jdk.crypto.ec-9.sym.txt:jdk.dynalink-9.sym.txt:jdk.editpad-9.sym.txt:jdk.hotspot.agent-9.sym.txt:jdk.httpserver-9.sym.txt:jdk.incubator.httpclient-9.sym.txt:jdk.jartool-9.sym.txt:jdk.javadoc-9.sym.txt:jdk.jcmd-9.sym.txt:jdk.jconsole-9.sym.txt:jdk.jdeps-9.sym.txt:jdk.jdi-9.sym.txt:jdk.jdwp.agent-9.sym.txt:jdk.jlink-9.sym.txt:jdk.jshell-9.sym.txt:jdk.jsobject-9.sym.txt:jdk.jstatd-9.sym.txt:jdk.localedata-9.sym.txt:jdk.management-9.sym.txt:jdk.management.agent-9.sym.txt:jdk.naming.dns-9.sym.txt:jdk.naming.rmi-9.sym.txt:jdk.net-9.sym.txt:jdk.pack-9.sym.txt:jdk.policytool-9.sym.txt:jdk.rmic-9.sym.txt:jdk.scripting.nashorn-9.sym.txt:jdk.sctp-9.sym.txt:jdk.security.auth-9.sym.txt:jdk.security.jgss-9.sym.txt:jdk.unsupported-9.sym.txt:jdk.xml.dom-9.sym.txt:jdk.zipfs-9.sym.txt
@@ -38,3 +38,4 @@ platform version B base A files java.activation-B.sym.txt:java.base-B.sym.txt:ja
platform version C base B files java.base-C.sym.txt:java.compiler-C.sym.txt:java.desktop-C.sym.txt:java.naming-C.sym.txt:java.rmi-C.sym.txt:java.xml-C.sym.txt:jdk.compiler-C.sym.txt:jdk.jfr-C.sym.txt:jdk.jsobject-C.sym.txt:jdk.unsupported-C.sym.txt
platform version D base C files java.base-D.sym.txt:java.compiler-D.sym.txt:java.desktop-D.sym.txt:java.management-D.sym.txt:java.management.rmi-D.sym.txt:java.net.http-D.sym.txt:java.security.jgss-D.sym.txt:java.xml-D.sym.txt:java.xml.crypto-D.sym.txt:jdk.compiler-D.sym.txt:jdk.httpserver-D.sym.txt:jdk.jartool-D.sym.txt:jdk.javadoc-D.sym.txt:jdk.jlink-D.sym.txt:jdk.jshell-D.sym.txt
platform version E base D files java.base-E.sym.txt:java.compiler-E.sym.txt:java.desktop-E.sym.txt:java.xml-E.sym.txt:jdk.compiler-E.sym.txt:jdk.httpserver-E.sym.txt:jdk.incubator.foreign-E.sym.txt:jdk.incubator.jpackage-E.sym.txt:jdk.jfr-E.sym.txt:jdk.jlink-E.sym.txt:jdk.jshell-E.sym.txt:jdk.jsobject-E.sym.txt:jdk.management-E.sym.txt:jdk.net-E.sym.txt:jdk.pack-E.sym.txt
platform version F base E files java.base-F.sym.txt:java.compiler-F.sym.txt:java.desktop-F.sym.txt:java.management.rmi-F.sym.txt:java.naming-F.sym.txt:java.rmi-F.sym.txt:java.xml-F.sym.txt:jdk.compiler-F.sym.txt:jdk.incubator.foreign-F.sym.txt:jdk.jartool-F.sym.txt:jdk.javadoc-F.sym.txt:jdk.jdi-F.sym.txt:jdk.net-F.sym.txt:jdk.nio.mapmode-F.sym.txt:jdk.rmic-F.sym.txt:jdk.scripting.nashorn-F.sym.txt:jdk.unsupported-F.sym.txt

View File

@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2015, 2020, 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
@@ -63,45 +63,42 @@ mkdir -p $DEVKIT_ROOT
################################################################################
# Copy the relevant parts of Xcode.app, removing things that are both big and
# unecessary for our purposes, without building an impossibly long exclude list.
#
# Not including WatchSimulator.platform makes ibtool crashes in some situations.
# It doesn't seem to matter which extra platform is included, but that is the
# smallest one.
EXCLUDE_DIRS=" \
Contents/_CodeSignature \
$XCODE_APP_DIR_NAME/Contents/Applications \
$XCODE_APP_DIR_NAME/Contents/Resources \
$XCODE_APP_DIR_NAME/Contents/Library \
$XCODE_APP_DIR_NAME/Contents/XPCServices \
$XCODE_APP_DIR_NAME/Contents/OtherFrameworks \
$XCODE_APP_DIR_NAME/Contents/Developer/Documentation \
$XCODE_APP_DIR_NAME/Contents/Developer/usr/share \
$XCODE_APP_DIR_NAME/Contents/Developer/usr/libexec/git-core \
$XCODE_APP_DIR_NAME/Contents/Developer/usr/bin/git* \
$XCODE_APP_DIR_NAME/Contents/Developer/usr/bin/svn* \
$XCODE_APP_DIR_NAME/Contents/Developer/usr/lib/libgit* \
$XCODE_APP_DIR_NAME/Contents/Developer/usr/lib/libsvn* \
$XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/share/man \
$XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/${SDK_VERSION}.sdk/usr/share/man \
$XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/share/man \
$XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/usr \
$XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man \
$XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift* \
$XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift* \
$XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/sourcekitd.framework \
$XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec/swift* \
$XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/swift* \
$XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/arc \
Contents/Applications \
Contents/Resources \
Contents/Library \
Contents/XPCServices \
Contents/OtherFrameworks \
Contents/Developer/Documentation \
Contents/Developer/usr/share \
Contents/Developer/usr/libexec/git-core \
Contents/Developer/usr/bin/git* \
Contents/Developer/usr/bin/svn* \
Contents/Developer/usr/lib/libgit* \
Contents/Developer/usr/lib/libsvn* \
Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/share/man \
Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/${SDK_VERSION}.sdk/usr/share/man \
Contents/Developer/Platforms/MacOSX.platform/Developer/usr/share/man \
Contents/Developer/Platforms/MacOSX.platform/usr \
Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man \
Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift* \
Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift* \
Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/sourcekitd.framework \
Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec/swift* \
Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/swift* \
Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/arc \
Platforms/AppleTVSimulator.platform \
Platforms/iPhoneSimulator.platform \
$XCODE_APP_DIR_NAME/Contents/SharedFrameworks/LLDB.framework \
$XCODE_APP_DIR_NAME/Contents/SharedFrameworks/ModelIO.framework \
$XCODE_APP_DIR_NAME/Contents/SharedFrameworks/XCSUI.framework \
$XCODE_APP_DIR_NAME/Contents/SharedFrameworks/SceneKit.framework \
$XCODE_APP_DIR_NAME/Contents/SharedFrameworks/XCBuild.framework \
$XCODE_APP_DIR_NAME/Contents/SharedFrameworks/GPUTools.framework \
$(cd $XCODE_APP/.. && ls -d $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/* \
Platforms/WatchSimulator.platform \
Contents/SharedFrameworks/LLDB.framework \
Contents/SharedFrameworks/ModelIO.framework \
Contents/SharedFrameworks/XCSUI.framework \
Contents/SharedFrameworks/SceneKit.framework \
Contents/SharedFrameworks/XCBuild.framework \
Contents/SharedFrameworks/GPUTools*.framework \
Contents/SharedFrameworks/DNTDocumentationSupport.framework/Versions/A/Resources/external \
$(cd $XCODE_APP && ls -d Contents/Developer/Platforms/* \
| grep -v MacOSX.platform | grep -v WatchSimulator.platform) \
"
@@ -110,8 +107,8 @@ for ex in $EXCLUDE_DIRS; do
done
echo "Copying Xcode.app..."
echo rsync -rlH $INCLUDE_ARGS $EXCLUDE_ARGS "$XCODE_APP" $DEVKIT_ROOT/
rsync -rlH $INCLUDE_ARGS $EXCLUDE_ARGS "$XCODE_APP" $DEVKIT_ROOT/
echo rsync -rlH $INCLUDE_ARGS $EXCLUDE_ARGS "$XCODE_APP/." $DEVKIT_ROOT/Xcode.app/
rsync -rlH $INCLUDE_ARGS $EXCLUDE_ARGS "$XCODE_APP/." $DEVKIT_ROOT/Xcode.app/
################################################################################

View File

@@ -37,18 +37,18 @@ ifeq ($(call check-jvm-feature, compiler2), true)
ifeq ($(call isBuildOs, linux), true)
ADLC_CFLAGS := -fno-exceptions -DLINUX
else ifeq ($(call isBuildOs, aix), true)
ADLC_LDFLAGS := -q64
ADLC_LDFLAGS += -q64
ADLC_CFLAGS := -qnortti -qeh -q64 -DAIX
else ifeq ($(call isBuildOs, windows), true)
ADLC_LDFLAGS := -nologo
ADLC_LDFLAGS += -nologo
ADLC_CFLAGS := -nologo -EHsc
# NOTE: The old build also have -D_CRT_SECURE_NO_DEPRECATE but it doesn't
# seem needed any more.
ADLC_CFLAGS_WARNINGS := -W3 -D_CRT_SECURE_NO_WARNINGS
endif
# Set the C++ standard if supported
ADLC_CFLAGS += $(ADLC_CXXFLAG)
# Set the C++ standard
ADLC_CFLAGS += $(ADLC_LANGSTD_CXXFLAG)
# NOTE: The old build didn't set -DASSERT for windows but it doesn't seem to
# hurt.

View File

@@ -23,40 +23,24 @@
# questions.
#
################################################################################
# Build tools needed for the JFR source code generation
JFR_TOOLS_SRCDIR := $(TOPDIR)/make/src/classes
JFR_TOOLS_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/buildtools/tools_classes
$(eval $(call SetupJavaCompilation, BUILD_JFR_TOOLS, \
COMPILER := bootjdk, \
SMALL_JAVA := false, \
SRC := $(JFR_TOOLS_SRCDIR), \
BIN := $(JFR_TOOLS_OUTPUTDIR), \
DISABLED_WARNINGS := try, \
))
TARGETS += $(BUILD_JFR_TOOLS)
################################################################################
# Setup make rules for JFR gensrc file generation.
#
TOOL_JFR_GEN := $(JAVA_SMALL) -cp $(JFR_TOOLS_OUTPUTDIR) build.tools.jfr.GenerateJfrFiles
JFR_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/gensrc/jfrfiles
include $(TOPDIR)/make/ToolsHotspot.gmk
JFR_SRCDIR := $(TOPDIR)/src/hotspot/share/jfr/metadata
JFR_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/gensrc/jfrfiles
# Changing these will trigger a rebuild of generated jfr files.
METADATA_XML := $(JFR_SRCDIR)/metadata.xml
METADATA_XSD := $(JFR_SRCDIR)/metadata.xsd
$(eval $(call SetupExecute, jfr_gen, \
$(eval $(call SetupExecute, jfr_gen_headers, \
INFO := Generating JFR header files, \
DEPS := $(METADATA_XML) $(METADATA_XSD) $(BUILD_JFR_TOOLS), \
DEPS := $(METADATA_XML) $(METADATA_XSD) $(BUILD_TOOLS_HOTSPOT), \
OUTPUT_DIR := $(JFR_OUTPUTDIR), \
COMMAND := $(TOOL_JFR_GEN) $(METADATA_XML) $(METADATA_XSD) $(JFR_OUTPUTDIR), \
COMMAND := $(TOOL_JFR_GEN) --mode headers --xml $(METADATA_XML) --xsd $(METADATA_XSD) --output $(JFR_OUTPUTDIR), \
))
JFR_FILES := $(jfr_gen_TARGET)
TARGETS += $(JFR_FILES)
TARGETS += $(jfr_gen_headers)

View File

@@ -106,14 +106,16 @@ $(eval $(call SetupJvmtiGeneration, jvmti.h, jvmtiH.xsl, \
$(eval $(call SetupJvmtiGeneration, jvmti.html, jvmti.xsl, \
-PARAM majorversion $(VERSION_FEATURE)))
JVMTI_BC_SRCDIR := $(TOPDIR)/src/hotspot/share/interpreter
JVMTI_BC_SRCDIR := $(TOPDIR)/src/hotspot/share/interpreter/zero
$(eval $(call SetupXslTransform, bytecodeInterpreterWithChecks.cpp, \
XML_FILE := $(JVMTI_BC_SRCDIR)/bytecodeInterpreterWithChecks.xml, \
XSL_FILE := $(JVMTI_BC_SRCDIR)/bytecodeInterpreterWithChecks.xsl, \
OUTPUT_DIR := $(JVMTI_OUTPUTDIR), \
DEPS := $(JVMTI_BC_SRCDIR)/bytecodeInterpreter.cpp, \
))
ifeq ($(call check-jvm-feature, zero), true)
$(eval $(call SetupXslTransform, bytecodeInterpreterWithChecks.cpp, \
XML_FILE := $(JVMTI_BC_SRCDIR)/bytecodeInterpreterWithChecks.xml, \
XSL_FILE := $(JVMTI_BC_SRCDIR)/bytecodeInterpreterWithChecks.xsl, \
OUTPUT_DIR := $(JVMTI_OUTPUTDIR), \
DEPS := $(JVMTI_BC_SRCDIR)/bytecodeInterpreter.cpp, \
))
endif
################################################################################
# Copy jvmti.h to include dir

View File

@@ -38,9 +38,8 @@ endif
################################################################################
# Disabling all warnings in gtest source code
$(eval $(call SetupNativeCompilation, BUILD_GTEST_LIBGTEST, \
$(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBGTEST, \
NAME := gtest, \
TYPE := STATIC_LIBRARY, \
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
@@ -50,8 +49,9 @@ $(eval $(call SetupNativeCompilation, BUILD_GTEST_LIBGTEST, \
$(GTEST_FRAMEWORK_SRC)/googletest/src \
$(GTEST_FRAMEWORK_SRC)/googlemock/src, \
INCLUDE_FILES := gtest-all.cc gmock-all.cc, \
CFLAGS := $(filter-out $(WARNING_CFLAGS_JVM), $(JVM_CFLAGS)) \
-w \
DISABLED_WARNINGS_gcc := undef unused-result format-nonliteral, \
DISABLED_WARNINGS_clang := undef unused-result format-nonliteral, \
CFLAGS := $(JVM_CFLAGS) \
-I$(GTEST_FRAMEWORK_SRC)/googletest \
-I$(GTEST_FRAMEWORK_SRC)/googletest/include \
-I$(GTEST_FRAMEWORK_SRC)/googlemock \
@@ -81,10 +81,9 @@ else
$(call create-mapfile)
endif
# Disabling undef, switch, format-nonliteral and tautological-undefined-compare
# warnings for clang because of test source.
# Additional disabled warnings are due to code in the test source.
$(eval $(call SetupNativeCompilation, BUILD_GTEST_LIBJVM, \
$(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBJVM, \
NAME := jvm, \
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
OUTPUT_DIR := $(JVM_OUTPUTDIR)/gtest, \
@@ -106,6 +105,7 @@ $(eval $(call SetupNativeCompilation, BUILD_GTEST_LIBJVM, \
DISABLED_WARNINGS_clang := $(DISABLED_WARNINGS_clang) \
undef switch format-nonliteral tautological-undefined-compare \
self-assign-overloaded, \
DISABLED_WARNINGS_microsoft := $(DISABLED_WARNINGS_microsoft), \
LDFLAGS := $(JVM_LDFLAGS), \
LDFLAGS_unix := -L$(JVM_OUTPUTDIR)/libgtest, \
LIBS := $(JVM_LIBS), \
@@ -127,7 +127,7 @@ TARGETS += $(BUILD_GTEST_LIBJVM)
################################################################################
$(eval $(call SetupNativeCompilation, BUILD_GTEST_LAUNCHER, \
$(eval $(call SetupJdkExecutable, BUILD_GTEST_LAUNCHER, \
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
NAME := gtestLauncher, \
TYPE := EXECUTABLE, \

View File

@@ -95,9 +95,8 @@ DISABLED_WARNINGS_clang := tautological-compare \
DISABLED_WARNINGS_xlc := tautological-compare shift-negative-value
DISABLED_WARNINGS_microsoft :=
DISABLED_WARNINGS_microsoft := 4100 4127 4201 4244 4291 4351 \
4511 4512 4514 4624 4996
################################################################################
# Platform specific setup
@@ -126,13 +125,6 @@ else ifeq ($(call isTargetCpu, x86_64), true)
JVM_EXCLUDE_PATTERNS += x86_32
endif
ifeq ($(call isTargetOs, windows), true)
ifeq ($(call isTargetCpuBits, 64), true)
RC_DESC := 64-Bit$(SPACE)
endif
JVM_RCFLAGS += -D"HS_FILEDESC=$(HOTSPOT_VM_DISTRO) $(RC_DESC)$(JVM_VARIANT) VM"
endif
JVM_OPTIMIZATION ?= HIGHEST_JVM
# Need to set JVM_STRIPFLAGS to the default value from SPEC since the STRIPFLAGS
@@ -146,7 +138,7 @@ $(call FillFindCache, $(JVM_SRC_DIRS))
################################################################################
# Now set up the actual compilation of the main hotspot native library
$(eval $(call SetupNativeCompilation, BUILD_LIBJVM, \
$(eval $(call SetupJdkLibrary, BUILD_LIBJVM, \
NAME := jvm, \
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
OUTPUT_DIR := $(JVM_LIB_OUTPUTDIR), \
@@ -170,8 +162,7 @@ $(eval $(call SetupNativeCompilation, BUILD_LIBJVM, \
USE_MAPFILE_FOR_SYMBOLS := true, \
STRIPFLAGS := $(JVM_STRIPFLAGS), \
EMBED_MANIFEST := true, \
RC_FLAGS := $(JVM_RCFLAGS), \
VERSIONINFO_RESOURCE := $(TOPDIR)/src/hotspot/os/windows/version.rc, \
RC_FILEDESC := $(HOTSPOT_VM_DISTRO) $(OPENJDK_TARGET_CPU_BITS)-Bit $(JVM_VARIANT) VM, \
PRECOMPILED_HEADER := $(JVM_PRECOMPILED_HEADER), \
PRECOMPILED_HEADER_EXCLUDE := $(JVM_PRECOMPILED_HEADER_EXCLUDE), \
))

View File

@@ -27,7 +27,7 @@ default: all
include $(SPEC)
include MakeBase.gmk
include NativeCompilation.gmk
include JdkNativeCompilation.gmk
include HotspotCommon.gmk

View File

@@ -45,11 +45,17 @@ else
endif
ifeq ($(call check-jvm-feature, zero), true)
JVM_CFLAGS_FEATURES += -DZERO -DCC_INTERP -DZERO_LIBARCH='"$(OPENJDK_TARGET_CPU_LEGACY_LIB)"' $(LIBFFI_CFLAGS)
JVM_EXCLUDES += opto libadt
JVM_EXCLUDE_PATTERNS += c1_ c1/ c2_ runtime_ /c2/
JVM_EXCLUDE_FILES += templateInterpreter.cpp templateInterpreterGenerator.cpp \
bcEscapeAnalyzer.cpp ciTypeFlow.cpp
JVM_CFLAGS_FEATURES += -DZERO -DZERO_LIBARCH='"$(OPENJDK_TARGET_CPU_LEGACY_LIB)"' $(LIBFFI_CFLAGS)
JVM_LIBS_FEATURES += $(LIBFFI_LIBS)
ifeq ($(ENABLE_LIBFFI_BUNDLING), true)
JVM_LDFLAGS_FEATURES += $(call SET_EXECUTABLE_ORIGIN,/..)
endif
else
JVM_EXCLUDE_PATTERNS += /zero/
endif
ifeq ($(JVM_VARIANT), custom)

View File

@@ -62,6 +62,7 @@ ifeq ($(call isTargetOs, linux), true)
JVM_PRECOMPILED_HEADER_EXCLUDE := \
sharedRuntimeTrig.cpp \
sharedRuntimeTrans.cpp \
$(OPT_SPEED_SRC) \
#
endif
@@ -91,9 +92,6 @@ else ifeq ($(call isTargetOs, macosx), true)
# NOTE: The old build tested clang version to make sure this workaround
# for the clang bug was still needed.
BUILD_LIBJVM_loopTransform.cpp_CXXFLAGS := $(CXX_O_FLAG_NONE)
ifneq ($(DEBUG_LEVEL), slowdebug)
BUILD_LIBJVM_unsafe.cpp_CXXFLAGS := -O1
endif
# The following files are compiled at various optimization
# levels due to optimization issues encountered at the
@@ -109,8 +107,8 @@ else ifeq ($(call isTargetOs, macosx), true)
sharedRuntimeTrig.cpp \
sharedRuntimeTrans.cpp \
loopTransform.cpp \
unsafe.cpp \
jvmciCompilerToVM.cpp \
$(OPT_SPEED_SRC) \
#
endif

View File

@@ -30,14 +30,13 @@ $(eval $(call IncludeCustomExtension, modules/java.base/Launcher.gmk))
JAVA_VERSION_INFO_RESOURCE := $(TOPDIR)/src/java.base/windows/native/launcher/java.rc
JAVA_RC_FLAGS += -I$(TOPDIR)/src/java.base/windows/native/common
JAVA_RC_FLAGS += -I$(TOPDIR)/src/java.base/windows/native/launcher/icons
JAVA_RCFLAGS ?= -I$(TOPDIR)/src/java.base/windows/native/launcher/icons
################################################################################
$(eval $(call SetupBuildLauncher, java, \
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS -DENABLE_ARG_FILES, \
EXTRA_RC_FLAGS := $(JAVA_RC_FLAGS), \
EXTRA_RCFLAGS := $(JAVA_RCFLAGS), \
VERSION_INFO_RESOURCE := $(JAVA_VERSION_INFO_RESOURCE), \
OPTIMIZATION := HIGH, \
))
@@ -45,7 +44,7 @@ $(eval $(call SetupBuildLauncher, java, \
ifeq ($(call isTargetOs, windows), true)
$(eval $(call SetupBuildLauncher, javaw, \
CFLAGS := -DJAVAW -DEXPAND_CLASSPATH_WILDCARDS -DENABLE_ARG_FILES, \
EXTRA_RC_FLAGS := $(JAVA_RC_FLAGS), \
EXTRA_RCFLAGS := $(JAVA_RCFLAGS), \
VERSION_INFO_RESOURCE := $(JAVA_VERSION_INFO_RESOURCE), \
))
endif

View File

@@ -116,7 +116,7 @@ ifeq ($(call isTargetOs, windows), true)
LIBAWT_CFLAGS += -DMLIB_OS64BIT
endif
LIBAWT_RC_FLAGS ?= -I $(TOPDIR)/src/java.base/windows/native/launcher/icons
LIBAWT_RCFLAGS ?= -I$(TOPDIR)/src/java.base/windows/native/launcher/icons
LIBAWT_VERSIONINFO_RESOURCE := $(TOPDIR)/src/$(MODULE)/windows/native/libawt/windows/awt.rc
endif
@@ -169,10 +169,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBAWT, \
comdlg32.lib winmm.lib comctl32.lib shlwapi.lib \
delayimp.lib jvm.lib $(WIN_JAVA_LIB) advapi32.lib, \
VERSIONINFO_RESOURCE := $(LIBAWT_VERSIONINFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) $(LIBAWT_RC_FLAGS) \
-D "JDK_FNAME=awt.dll" \
-D "JDK_INTERNAL_NAME=awt" \
-D "JDK_FTYPE=0x2L", \
EXTRA_RCFLAGS := $(LIBAWT_RCFLAGS), \
))
$(BUILD_LIBAWT): $(call FindLib, java.base, java)
@@ -435,10 +432,15 @@ endif
###########################################################################
#### Begin harfbuzz configuration
HARFBUZZ_CFLAGS := -DHAVE_OT -DHAVE_FALLBACK -DHAVE_UCDN -DHAVE_ROUND
# This is better than adding EXPORT_ALL_SYMBOLS
ifneq ($(filter $(TOOLCHAIN_TYPE), gcc clang), )
HARFBUZZ_CFLAGS += -DHB_EXTERN=__attribute__\(\(visibility\(\"default\"\)\)\)
else ifeq ($(TOOLCHAIN_TYPE), microsoft)
HARFBUZZ_CFLAGS += -DHB_EXTERN=__declspec\(dllexport\)
endif
ifeq ($(call isTargetOs, windows), false)
HARFBUZZ_CFLAGS += -DGETPAGESIZE -DHAVE_MPROTECT -DHAVE_PTHREAD \
-DHAVE_SYSCONF -DHAVE_SYS_MMAN_H -DHAVE_UNISTD_H \
@@ -451,18 +453,65 @@ ifeq ($(call isTargetOs, macosx), true)
HARFBUZZ_CFLAGS += -DHAVE_CORETEXT
endif
ifeq ($(call isTargetOs, macosx), false)
LIBFONTMANAGER_EXCLUDE_FILES += harfbuzz/hb-coretext.cc
LIBHARFBUZZ_EXCLUDE_FILES += harfbuzz/hb-coretext.cc
endif
# hb-ft.cc is not presently needed, and requires freetype 2.4.2 or later.
LIBFONTMANAGER_EXCLUDE_FILES += harfbuzz/hb-ft.cc
LIBHARFBUZZ_EXCLUDE_FILES += harfbuzz/hb-ft.cc
LIBFONTMANAGER_CFLAGS += $(HARFBUZZ_CFLAGS)
LIBHARFBUZZ_CFLAGS += $(HARFBUZZ_CFLAGS)
#### End harfbuzz configuration
# For use by libfontmanager:
ifeq ($(call isTargetOs, windows), true)
LIBHARFBUZZ_LIBS := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libharfbuzz/harfbuzz.lib
else
LIBHARFBUZZ_LIBS := -lharfbuzz
endif
LIBHARFBUZZ_EXTRA_HEADER_DIRS := \
libharfbuzz/hb-ucdn \
#
LIBHARFBUZZ_OPTIMIZATION := HIGH
LIBHARFBUZZ_CFLAGS += $(X_CFLAGS) -DLE_STANDALONE -DHEADLESS
$(eval $(call SetupJdkLibrary, BUILD_LIBHARFBUZZ, \
NAME := harfbuzz, \
EXCLUDE_FILES := $(LIBHARFBUZZ_EXCLUDE_FILES), \
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBHARFBUZZ_CFLAGS), \
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBHARFBUZZ_CFLAGS), \
OPTIMIZATION := $(LIBHARFBUZZ_OPTIMIZATION), \
CFLAGS_windows = -DCC_NOEX, \
EXTRA_HEADER_DIRS := $(LIBHARFBUZZ_EXTRA_HEADER_DIRS), \
WARNINGS_AS_ERRORS_xlc := false, \
DISABLED_WARNINGS_gcc := type-limits missing-field-initializers strict-aliasing, \
DISABLED_WARNINGS_CXX_gcc := reorder delete-non-virtual-dtor strict-overflow \
maybe-uninitialized class-memaccess, \
DISABLED_WARNINGS_clang := unused-value incompatible-pointer-types \
tautological-constant-out-of-range-compare int-to-pointer-cast \
undef missing-field-initializers, \
DISABLED_WARNINGS_microsoft := 4267 4244 4090 4146 4334 4819 4101 4068 4805 4138, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_unix := -L$(INSTALL_LIBRARIES_HERE), \
LDFLAGS_aix := -Wl$(COMMA)-berok, \
LIBS := $(BUILD_LIBHARFBUZZ), \
LIBS_unix := $(LIBM) $(LIBCXX), \
LIBS_macosx := -framework CoreText -framework CoreFoundation -framework CoreGraphics, \
LIBS_windows := user32.lib, \
))
ifeq ($(FREETYPE_TO_USE), bundled)
$(BUILD_LIBHARFBUZZ): $(BUILD_LIBFREETYPE)
endif
TARGETS += $(BUILD_LIBHARFBUZZ)
###########################################################################
LIBFONTMANAGER_EXTRA_HEADER_DIRS := \
libfontmanager/harfbuzz \
libfontmanager/harfbuzz/hb-ucdn \
libharfbuzz \
common/awt \
common/font \
libawt/java2d \
@@ -470,8 +519,8 @@ LIBFONTMANAGER_EXTRA_HEADER_DIRS := \
libawt/java2d/loops \
#
LIBFONTMANAGER_CFLAGS += $(LIBFREETYPE_CFLAGS)
BUILD_LIBFONTMANAGER_FONTLIB += $(LIBFREETYPE_LIBS)
LIBFONTMANAGER_CFLAGS += $(LIBFREETYPE_CFLAGS) $(HARFBUZZ_FLAGS)
BUILD_LIBFONTMANAGER_FONTLIB += $(LIBHARFBUZZ_LIBS) $(LIBFREETYPE_LIBS)
LIBFONTMANAGER_OPTIMIZATION := HIGH
@@ -512,15 +561,9 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBFONTMANAGER, \
CFLAGS_windows = -DCC_NOEX, \
EXTRA_HEADER_DIRS := $(LIBFONTMANAGER_EXTRA_HEADER_DIRS), \
WARNINGS_AS_ERRORS_xlc := false, \
DISABLED_WARNINGS_gcc := sign-compare int-to-pointer-cast \
type-limits missing-field-initializers implicit-fallthrough \
strict-aliasing undef unused-function, \
DISABLED_WARNINGS_CXX_gcc := reorder delete-non-virtual-dtor strict-overflow \
maybe-uninitialized class-memaccess, \
DISABLED_WARNINGS_clang := unused-value incompatible-pointer-types \
tautological-constant-out-of-range-compare int-to-pointer-cast \
sign-compare undef missing-field-initializers, \
DISABLED_WARNINGS_microsoft := 4267 4244 4018 4090 4996 4146 4334 4819 4101 4068 4805 4138, \
DISABLED_WARNINGS_gcc := sign-compare unused-function int-to-pointer-cast, \
DISABLED_WARNINGS_clang := sign-compare, \
DISABLED_WARNINGS_microsoft := 4018 4146 4244 4996, \
LDFLAGS := $(subst -Xlinker -z -Xlinker defs,, \
$(subst -Wl$(COMMA)-z$(COMMA)defs,,$(LDFLAGS_JDKLIB))) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
@@ -528,13 +571,12 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBFONTMANAGER, \
LDFLAGS_aix := -Wl$(COMMA)-berok, \
LIBS := $(BUILD_LIBFONTMANAGER_FONTLIB), \
LIBS_unix := -lawt -ljava -ljvm $(LIBM) $(LIBCXX), \
LIBS_macosx := -lawt_lwawt -framework CoreText -framework CoreFoundation \
-framework CoreGraphics, \
LIBS_macosx := -lawt_lwawt, \
LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib user32.lib gdi32.lib \
$(WIN_AWT_LIB), \
))
$(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT)
$(BUILD_LIBFONTMANAGER): $(BUILD_LIBAWT) $(BUILD_LIBHARFBUZZ)
ifeq ($(call isTargetOs, macosx), true)
$(BUILD_LIBFONTMANAGER): $(call FindLib, $(MODULE), awt_lwawt)

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2020, 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,17 +25,20 @@
include LauncherCommon.gmk
################################################################################
# jabswitch
ifeq ($(call isTargetOs, windows), true)
JABSWITCH_SRC := $(TOPDIR)/src/jdk.accessibility/windows/native/jabswitch
ACCESSBRIDGE_SRC := $(TOPDIR)/src/jdk.accessibility/windows/native/common
ACCESSIBILITY_SRCDIR := $(TOPDIR)/src/jdk.accessibility/windows/native
TOOLS_CFLAGS := $(addprefix -I, \
$(ACCESSIBILITY_SRCDIR)/include/bridge \
$(ACCESSIBILITY_SRCDIR)/common \
$(ACCESSIBILITY_SRCDIR)/toolscommon)
##############################################################################
# jabswitch
$(eval $(call SetupJdkExecutable, BUILD_JABSWITCH, \
NAME := jabswitch, \
SRC := $(JABSWITCH_SRC), \
SRC := $(ACCESSIBILITY_SRCDIR)/jabswitch, \
INCLUDE_FILES := jabswitch.cpp, \
CFLAGS := $(filter-out -Zc:wchar_t-, $(CFLAGS_JDKEXE)) -Zc:wchar_t \
-analyze- -Od -Gd -D_WINDOWS \
@@ -43,21 +46,15 @@ ifeq ($(call isTargetOs, windows), true)
DISABLED_WARNINGS_microsoft := 4267 4996, \
LDFLAGS := $(LDFLAGS_JDKEXE), \
LIBS := advapi32.lib version.lib user32.lib, \
VERSIONINFO_RESOURCE := $(ACCESSBRIDGE_SRC)/AccessBridgeStatusWindow.rc, \
MANIFEST := $(JABSWITCH_SRC)/jabswitch.manifest, \
VERSIONINFO_RESOURCE := $(ACCESSIBILITY_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
MANIFEST := $(ACCESSIBILITY_SRCDIR)/jabswitch/jabswitch.manifest, \
MANIFEST_VERSION := $(VERSION_NUMBER_FOUR_POSITIONS), \
))
TARGETS += $(BUILD_JABSWITCH)
################################################################################
# jaccessinspector
TOPDIR := $(TOPDIR)/src/jdk.accessibility/windows/native
TOOLS_CFLAGS := $(addprefix -I, \
$(TOPDIR)/include/bridge \
$(TOPDIR)/common \
$(TOPDIR)/toolscommon)
##############################################################################
# jaccessinspector
define SetupInspector
# Parameter 1 File name suffix
@@ -65,20 +62,20 @@ ifeq ($(call isTargetOs, windows), true)
$$(eval $$(call SetupJdkExecutable, BUILD_JACCESSINSPECTOR$1, \
NAME := jaccessinspector$1, \
SRC := $(TOPDIR)/jaccessinspector $(TOPDIR)/common \
$(TOPDIR)/toolscommon $(TOPDIR)/bridge, \
SRC := $(ACCESSIBILITY_SRCDIR)/jaccessinspector $(ACCESSIBILITY_SRCDIR)/common \
$(ACCESSIBILITY_SRCDIR)/toolscommon $(ACCESSIBILITY_SRCDIR)/bridge, \
CFLAGS := $$(CFLAGS_JDKEXE) $(TOOLS_CFLAGS) -DACCESSBRIDGE_ARCH_$2 -EHsc, \
LDFLAGS := $$(LDFLAGS_JDKEXE) -stack:655360, \
LIBS := advapi32.lib user32.lib, \
VERSIONINFO_RESOURCE := $(TOPDIR)/jaccessinspector/jaccessinspectorWindow.rc, \
VERSIONINFO_RESOURCE := $(ACCESSIBILITY_SRCDIR)/jaccessinspector/jaccessinspectorWindow.rc, \
))
TARGETS += $$(BUILD_JACCESSINSPECTOR$1)
endef
################################################################################
# jaccesswalker
##############################################################################
# jaccesswalker
define SetupWalker
# Parameter 1 File name suffix
@@ -86,12 +83,12 @@ ifeq ($(call isTargetOs, windows), true)
$$(eval $$(call SetupJdkExecutable, BUILD_JACCESSWALKER$1, \
NAME := jaccesswalker$1, \
SRC := $(TOPDIR)/jaccesswalker $(TOPDIR)/common \
$(TOPDIR)/toolscommon $(TOPDIR)/bridge, \
SRC := $(ACCESSIBILITY_SRCDIR)/jaccesswalker $(ACCESSIBILITY_SRCDIR)/common \
$(ACCESSIBILITY_SRCDIR)/toolscommon $(ACCESSIBILITY_SRCDIR)/bridge, \
CFLAGS := $$(CFLAGS_JDKEXE) $(TOOLS_CFLAGS) -DACCESSBRIDGE_ARCH_$2 -EHsc, \
LDFLAGS := $$(LDFLAGS_JDKEXE) -stack:655360, \
LIBS := advapi32.lib comctl32.lib gdi32.lib user32.lib, \
VERSIONINFO_RESOURCE := $(TOPDIR)/jaccesswalker/jaccesswalkerWindow.rc, \
VERSIONINFO_RESOURCE := $(ACCESSIBILITY_SRCDIR)/jaccesswalker/jaccesswalkerWindow.rc, \
))
TARGETS += $$(BUILD_JACCESSWALKER$1)

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2020, 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 @@ include LibCommon.gmk
ifeq ($(call isTargetOs, windows), true)
ROOT_SRCDIR := $(TOPDIR)/src/jdk.accessibility/windows/native
ACCESSIBILITY_SRCDIR := $(TOPDIR)/src/jdk.accessibility/windows/native
define SetupJavaDLL
# Parameter 1 Suffix
@@ -52,7 +52,7 @@ ifeq ($(call isTargetOs, windows), true)
winspool.lib comdlg32.lib advapi32.lib shell32.lib \
$(SUPPORT_OUTPUTDIR)/native/java.desktop/libjawt/jawt.lib \
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib, \
VERSIONINFO_RESOURCE := $(ROOT_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
VERSIONINFO_RESOURCE := $(ACCESSIBILITY_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
)
$$(BUILD_JAVAACCESSBRIDGE$1): $(call FindStaticLib, java.desktop, jawt, /libjawt)
@@ -75,11 +75,11 @@ ifeq ($(call isTargetOs, windows), true)
include/bridge \
java.base:include, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
-def:$(ROOT_SRCDIR)/libwindowsaccessbridge/WinAccessBridge.DEF, \
-def:$(ACCESSIBILITY_SRCDIR)/libwindowsaccessbridge/WinAccessBridge.DEF, \
LIBS := kernel32.lib user32.lib gdi32.lib \
winspool.lib comdlg32.lib advapi32.lib shell32.lib \
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib, \
VERSIONINFO_RESOURCE := $(ROOT_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
VERSIONINFO_RESOURCE := $(ACCESSIBILITY_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
)
TARGETS += $$(BUILD_WINDOWSACCESSBRIDGE$1)
@@ -93,7 +93,7 @@ ifeq ($(call isTargetOs, windows), true)
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB), \
LDFLAGS := $(LDFLAGS_JDKLIB), \
VERSIONINFO_RESOURCE := $(ROOT_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
VERSIONINFO_RESOURCE := $(ACCESSIBILITY_SRCDIR)/common/AccessBridgeStatusWindow.rc, \
)
TARGETS += $$(BUILD_ACCESSBRIDGESYSINFO)

View File

@@ -66,6 +66,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBSA, \
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(SA_CFLAGS) $(SA_CXXFLAGS), \
EXTRA_SRC := $(LIBSA_EXTRA_SRC), \
LDFLAGS := $(LDFLAGS_JDKLIB), \
LIBS := $(LIBCXX), \
LIBS_linux := $(LIBDL), \
LIBS_macosx := -framework Foundation -framework JavaNativeFoundation \
-framework JavaRuntimeSupport -framework Security -framework CoreFoundation, \

View File

@@ -27,14 +27,6 @@ include CopyCommon.gmk
################################################################################
$(eval $(call SetupCopyFiles, COPY_JFR_METADATA, \
SRC := $(TOPDIR)/src/hotspot/share/jfr/metadata, \
DEST := $(JDK_OUTPUTDIR)/modules/jdk.jfr/jdk/jfr/internal/types, \
FILES := metadata.xml \
))
TARGETS += $(COPY_JFR_METADATA)
JFR_CONF_DIR := $(TOPDIR)/src/jdk.jfr/share/conf/jfr
$(eval $(call SetupCopyFiles, COPY_JFR_CONF, \
DEST := $(LIB_DST_DIR)/jfr, \

View File

@@ -0,0 +1,48 @@
#
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. 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.
#
################################################################################
include ToolsHotspot.gmk
include Execute.gmk
JFR_SRCDIR := $(TOPDIR)/src/hotspot/share/jfr/metadata
JFR_DATA_OUTPUTDIR := $(OUTPUTDIR)/jdk/modules/jdk.jfr/jdk/jfr/internal/types
JFR_DATA_OUTPUTFILE := $(JFR_DATA_OUTPUTDIR)/metadata.bin
JFR_DATA_SUPPORTDIR := $(SUPPORT_OUTPUTDIR)/gendata/jdk.jfr
# Changing these will trigger a rebuild of generated jfr files.
METADATA_XML := $(JFR_SRCDIR)/metadata.xml
METADATA_XSD := $(JFR_SRCDIR)/metadata.xsd
$(eval $(call SetupExecute, jfr_gen_metadata, \
INFO := Generating JFR metadata, \
DEPS := $(METADATA_XML) $(METADATA_XSD) $(BUILD_TOOLS_HOTSPOT), \
OUTPUT_FILE := $(JFR_DATA_OUTPUTFILE), \
SUPPORT_DIR := $(JFR_DATA_SUPPORTDIR), \
COMMAND := $(TOOL_JFR_GEN) --mode metadata --xml $(METADATA_XML) --xsd $(METADATA_XSD) --output $(JFR_DATA_OUTPUTFILE), \
))
TARGETS += $(jfr_gen_metadata)

View File

@@ -1,16 +1,19 @@
package build.tools.jfr;
import java.io.BufferedOutputStream;
import java.io.Closeable;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Objects;
import java.util.StringJoiner;
import java.util.function.Predicate;
@@ -25,94 +28,107 @@ import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
import org.xml.sax.helpers.DefaultHandler;
/**
* Purpose of this program is twofold:
*
* 1) Generate C++ classes to be used when writing native events for HotSpot.
*
* 2) Generate metadata (label, descriptions, field layout etc.) from XML
* (metadata.xml) into a binary format (metadata.bin) that can be read quickly
* during startup by the jdk.jfr module.
*
* INPUT FILES:
*
* - metadata.xml File that contains descriptions of events and types
* - metadata.xsd Schema that verifies that metadata.xml is legit XML
*
* OUTPUT FILES:
*
* MODE: headers
*
* - jfrEventIds.hpp List of IDs so events can be identified from native
* - jfrTypes.hpp List of IDs so types can be identified from native
* - jfrPeriodic.hpp Dispatch mechanism so Java can emit native periodic events
* - jfrEventControl.hpp Data structure for native event settings.
* - jfrEventClasses.hpp C++ event classes that can write data into native buffers
*
* MODE: metadata
*
* - metadata.bin Binary representation of the information in metadata.xml
*
*/
public class GenerateJfrFiles {
public static void main(String... args) throws Exception {
if (args.length != 3) {
System.err.println("Incorrect number of command line arguments.");
System.err.println("Usage:");
System.err.println("java GenerateJfrFiles[.java] <path-to-metadata.xml> <path-to-metadata.xsd> <output-directory>");
System.exit(1);
}
try {
File metadataXml = new File(args[0]);
File metadataSchema = new File(args[1]);
File outputDirectory = new File(args[2]);
enum OutputMode {
headers, metadata
}
Metadata metadata = new Metadata(metadataXml, metadataSchema);
private static void printUsage(PrintStream out) {
out.println("Usage: java GenerateJfrFiles[.java]");
out.println(" --mode <headers|metadata>");
out.println(" --xml <path-to-metadata.xml> ");
out.println(" --xsd <path-to-metadata.xsd>");
out.println(" --output <output-file-or-directory>");
}
private static String consumeOption(String option, List<String> argList) throws Exception {
int index = argList.indexOf(option);
if (index >= 0 && index <= argList.size() - 2) {
String result = argList.get(index + 1);
argList.remove(index);
argList.remove(index);
return result;
}
throw new IllegalArgumentException("missing option " + option);
}
public static void main(String... args) throws Exception {
try {
List<String> argList = new ArrayList<>();
argList.addAll(Arrays.asList(args));
String mode = consumeOption("--mode", argList);
String output = consumeOption("--output", argList);
String xml = consumeOption("--xml", argList);
String xsd = consumeOption("--xsd", argList);
if (!argList.isEmpty()) {
throw new IllegalArgumentException("unknown option " + argList);
}
OutputMode outputMode = OutputMode.valueOf(mode);
File xmlFile = new File(xml);
File xsdFile = new File(xsd);
Metadata metadata = new Metadata(xmlFile, xsdFile);
metadata.verify();
metadata.wireUpTypes();
TypeCounter typeCounter = new TypeCounter();
printJfrEventIdsHpp(metadata, typeCounter, outputDirectory);
printJfrTypesHpp(metadata, typeCounter, outputDirectory);
printJfrPeriodicHpp(metadata, outputDirectory);
printJfrEventControlHpp(metadata, typeCounter, outputDirectory);
printJfrEventClassesHpp(metadata, outputDirectory);
if (outputMode == OutputMode.headers) {
File outputDir = new File(output);
printJfrEventIdsHpp(metadata, new File(outputDir, "jfrEventIds.hpp"));
printJfrTypesHpp(metadata, new File(outputDir, "jfrTypes.hpp"));
printJfrPeriodicHpp(metadata, new File(outputDir, "jfrPeriodic.hpp"));
printJfrEventControlHpp(metadata, new File(outputDir, "jfrEventControl.hpp"));
printJfrEventClassesHpp(metadata, new File(outputDir, "jfrEventClasses.hpp"));
}
if (outputMode == OutputMode.metadata) {
File outputFile = new File(output);
try (var b = new DataOutputStream(
new BufferedOutputStream(
new FileOutputStream(outputFile)))) {
metadata.persist(b);
}
}
System.exit(0);
} catch (IllegalArgumentException iae) {
System.err.println();
System.err.println("GenerateJfrFiles: " + iae.getMessage());
System.err.println();
printUsage(System.err);
System.err.println();
} catch (Exception e) {
e.printStackTrace();
System.exit(1);
}
}
static class TypeCounter {
final static long RESERVED_EVENT_COUNT = 2;
long typeId = -1;
long eventId = -1;
long eventCount = 0;
String firstTypeName;
String lastTypeName;
String firstEventName;
String lastEventname;
public long nextEventId(String name) {
eventCount++;
if (eventId == -1) {
eventId = firstEventId();
firstEventName = lastEventname = name;
return eventId;
}
lastEventname = name;
return ++eventId;
}
public long nextTypeId(String typeName) {
if (typeId == -1) {
lastTypeName = firstTypeName = typeName;
typeId = lastEventId();
}
lastTypeName = typeName;
return ++typeId;
}
public long firstEventId() {
return RESERVED_EVENT_COUNT;
}
public long lastEventId() {
return eventId == -1 ? firstEventId() : eventId;
}
public long eventCount() {
return eventCount;
}
public String firstTypeName() {
return firstTypeName;
}
public String lastTypeName() {
return lastTypeName;
}
public String firstEventName() {
return firstEventName;
}
public String lastEventName() {
return lastEventname;
}
System.exit(1);
}
static class XmlType {
@@ -121,28 +137,99 @@ public class GenerateJfrFiles {
final String parameterType;
final String javaType;
final boolean unsigned;
final String contentType;
XmlType(String name, String fieldType, String parameterType, String javaType, boolean unsigned) {
XmlType(String name, String fieldType, String parameterType, String javaType, String contentType,
boolean unsigned) {
this.name = name;
this.fieldType = fieldType;
this.parameterType = parameterType;
this.javaType = javaType;
this.unsigned = unsigned;
this.contentType = contentType;
}
}
static class XmlContentType {
final String name;
final String annotation;
XmlContentType(String name, String annotation) {
this.name = name;
this.annotation = annotation;
}
}
static class TypeElement {
List<FieldElement> fields = new ArrayList<>();
String name;
String fieldType;
String parameterType;
boolean supportStruct;
String javaType;
String label = "";
String description = "";
String category = "";
boolean thread;
boolean stackTrace;
boolean startTime;
String period = "";
boolean cutoff;
boolean experimental;
long id;
boolean isEvent;
boolean isRelation;
boolean supportStruct = false;
String commitState;
public boolean primitive;
public void persist(DataOutputStream pos) throws IOException {
pos.writeInt(fields.size());
for (FieldElement field : fields) {
field.persist(pos);
}
pos.writeUTF(javaType);
pos.writeUTF(label);
pos.writeUTF(description);
pos.writeUTF(category);
pos.writeBoolean(thread);
pos.writeBoolean(stackTrace);
pos.writeBoolean(startTime);
pos.writeUTF(period);
pos.writeBoolean(cutoff);
pos.writeBoolean(experimental);
pos.writeLong(id);
pos.writeBoolean(isEvent);
pos.writeBoolean(isRelation);
}
}
static class Metadata {
static class TypeCounter {
final long first;
long last = -1;
long count = 0;
long id = -1;
TypeCounter(long startId) {
this.first = startId;
}
long next() {
id = (id == -1) ? first : id + 1;
count++;
last = id;
return id;
}
}
static int RESERVED_EVENT_COUNT = 2;
final Map<String, TypeElement> types = new LinkedHashMap<>();
final Map<String, XmlType> xmlTypes = new LinkedHashMap<>();
Metadata(File metadataXml, File metadataSchema) throws ParserConfigurationException, SAXException, FileNotFoundException, IOException {
final Map<String, XmlContentType> xmlContentTypes = new LinkedHashMap<>();
int lastEventId;
private TypeCounter eventCounter;
private TypeCounter typeCounter;
Metadata(File metadataXml, File metadataSchema)
throws ParserConfigurationException, SAXException, FileNotFoundException, IOException {
SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
SAXParserFactory factory = SAXParserFactory.newInstance();
factory.setSchema(schemaFactory.newSchema(metadataSchema));
@@ -150,16 +237,19 @@ public class GenerateJfrFiles {
sp.parse(metadataXml, new MetadataHandler(this));
}
List<EventElement> getEvents() {
return getList(t -> t.getClass() == EventElement.class);
public void persist(DataOutputStream pos) throws IOException {
pos.writeInt(types.values().size());
for (TypeElement t : types.values()) {
t.persist(pos);
}
}
List<TypeElement> getEvents() {
return getList(t -> t.isEvent);
}
List<TypeElement> getEventsAndStructs() {
return getList(t -> t.getClass() == EventElement.class || t.supportStruct);
}
List<TypeElement> getTypesAndStructs() {
return getList(t -> t.getClass() == TypeElement.class || t.supportStruct);
return getList(t -> t.isEvent || t.supportStruct);
}
@SuppressWarnings("unchecked")
@@ -173,24 +263,25 @@ public class GenerateJfrFiles {
return result;
}
List<EventElement> getPeriodicEvents() {
return getList(t -> t.getClass() == EventElement.class && ((EventElement) t).periodic);
List<TypeElement> getPeriodicEvents() {
return getList(t -> t.isEvent && !t.period.isEmpty());
}
List<TypeElement> getTypes() {
return getList(t -> t.getClass() == TypeElement.class);
return getList(t -> !t.isEvent);
}
List<TypeElement> getStructs() {
return getList(t -> t.getClass() == TypeElement.class && t.supportStruct);
return getList(t -> !t.isEvent && t.supportStruct);
}
void verify() {
void verify() {
for (TypeElement t : types.values()) {
for (FieldElement f : t.fields) {
if (!xmlTypes.containsKey(f.typeName)) { // ignore primitives
if (!types.containsKey(f.typeName)) {
throw new IllegalStateException("Could not find definition of type '" + f.typeName + "' used by " + t.name + "#" + f.name);
throw new IllegalStateException("Could not find definition of type '" + f.typeName
+ "' used by " + t.name + "#" + f.name);
}
}
}
@@ -198,26 +289,96 @@ public class GenerateJfrFiles {
}
void wireUpTypes() {
// Add Java primitives
for (var t : xmlTypes.entrySet()) {
String name = t.getKey();
XmlType xmlType = t.getValue();
// Excludes Thread and Class
if (!types.containsKey(name)) {
// Excludes u8, u4, u2, u1, Ticks and Ticksspan
if (!xmlType.javaType.isEmpty() && !xmlType.unsigned) {
TypeElement te = new TypeElement();
te.name = name;
te.javaType = xmlType.javaType;
te.primitive = true;
types.put(te.name, te);
}
}
}
// Setup Java fully qualified names
for (TypeElement t : types.values()) {
if (t.isEvent) {
t.javaType = "jdk." + t.name;
} else {
XmlType xmlType = xmlTypes.get(t.name);
if (xmlType != null && !xmlType.javaType.isEmpty()) {
t.javaType = xmlType.javaType;
} else {
t.javaType = "jdk.types." + t.name;
}
}
}
// Setup content type, annotation, constant pool etc. for fields.
for (TypeElement t : types.values()) {
for (FieldElement f : t.fields) {
TypeElement type = types.get(f.typeName);
XmlType xmlType = xmlTypes.get(f.typeName);
if (type == null) {
if (xmlType == null) {
throw new IllegalStateException("Unknown type");
}
if (f.contentType.isEmpty()) {
f.contentType = xmlType.contentType;
}
String javaType = xmlType.javaType;
type = types.get(javaType);
Objects.requireNonNull(type);
}
if (type.primitive) {
f.constantPool = false;
}
if (xmlType != null) {
f.unsigned = xmlType.unsigned;
}
if (f.struct) {
f.constantPool = false;
type.supportStruct = true;
}
f.type = type;
XmlContentType xmlContentType = xmlContentTypes.get(f.contentType);
if (xmlContentType == null) {
f.annotations = "";
} else {
f.annotations = xmlContentType.annotation;
}
if (!f.relation.isEmpty()) {
f.relation = "jdk.types." + f.relation;
}
}
}
}
}
static class EventElement extends TypeElement {
String representation;
boolean thread;
boolean stackTrace;
boolean startTime;
boolean periodic;
boolean cutoff;
String commitState;
// Low numbers for event so most of them
// can fit in one byte with compressed integers
eventCounter = new TypeCounter(RESERVED_EVENT_COUNT);
for (TypeElement t : getEvents()) {
t.id = eventCounter.next();
}
typeCounter = new TypeCounter(eventCounter.last + 1);
for (TypeElement t : getTypes()) {
t.id = typeCounter.next();
}
}
public String getName(long id) {
for (TypeElement t : types.values()) {
if (t.id == id) {
return t.name;
}
}
throw new IllegalStateException("Unexpected id " + id );
}
}
static class FieldElement {
@@ -225,12 +386,36 @@ public class GenerateJfrFiles {
TypeElement type;
String name;
String typeName;
boolean struct;
boolean constantPool = true;
public String transition;
public String contentType;
private String label;
private String description;
private String relation;
private boolean experimental;
private boolean unsigned;
private boolean array;
private String annotations;
public boolean struct;
FieldElement(Metadata metadata) {
this.metadata = metadata;
}
public void persist(DataOutputStream pos) throws IOException {
pos.writeUTF(name);
pos.writeUTF(type.javaType);
pos.writeUTF(label);
pos.writeUTF(description);
pos.writeBoolean(constantPool);
pos.writeBoolean(array);
pos.writeBoolean(unsigned);
pos.writeUTF(annotations);
pos.writeUTF(transition);
pos.writeUTF(relation);
pos.writeBoolean(experimental);
}
String getParameterType() {
if (struct) {
return "const JfrStruct" + typeName + "&";
@@ -262,50 +447,75 @@ public class GenerateJfrFiles {
final Metadata metadata;
FieldElement currentField;
TypeElement currentType;
MetadataHandler(Metadata metadata) {
this.metadata = metadata;
}
@Override
public void error(SAXParseException e) throws SAXException {
throw e;
throw e;
}
@Override
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
public void startElement(String uri, String localName, String qName, Attributes attributes)
throws SAXException {
switch (qName) {
case "XmlContentType":
String n = attributes.getValue("name"); // mandatory
String a = attributes.getValue("annotation"); // mandatory
metadata.xmlContentTypes.put(n, new XmlContentType(n, a));
break;
case "XmlType":
String name = attributes.getValue("name");
String parameterType = attributes.getValue("parameterType");
String fieldType = attributes.getValue("fieldType");
String javaType = attributes.getValue("javaType");
String name = attributes.getValue("name"); // mandatory
String parameterType = attributes.getValue("parameterType"); // mandatory
String fieldType = attributes.getValue("fieldType"); // mandatory
String javaType = getString(attributes, "javaType");
String contentType = getString(attributes, "contentType");
boolean unsigned = getBoolean(attributes, "unsigned", false);
metadata.xmlTypes.put(name, new XmlType(name, fieldType, parameterType, javaType, unsigned));
metadata.xmlTypes.put(name,
new XmlType(name, fieldType, parameterType, javaType, contentType, unsigned));
break;
case "Relation":
case "Type":
currentType = new TypeElement();
currentType.name = attributes.getValue("name");
break;
case "Event":
EventElement eventType = new EventElement();
eventType.name = attributes.getValue("name");
eventType.thread = getBoolean(attributes, "thread", false);
eventType.stackTrace = getBoolean(attributes, "stackTrace", false);
eventType.startTime = getBoolean(attributes, "startTime", true);
eventType.periodic = attributes.getValue("period") != null;
eventType.cutoff = getBoolean(attributes, "cutoff", false);
eventType.commitState = attributes.getValue("commitState");
currentType = eventType;
currentType = new TypeElement();
currentType.name = attributes.getValue("name"); // mandatory
currentType.label = getString(attributes, "label");
currentType.description = getString(attributes, "description");
currentType.category = getString(attributes, "category");
currentType.experimental = getBoolean(attributes, "experimental", false);
currentType.thread = getBoolean(attributes, "thread", false);
currentType.stackTrace = getBoolean(attributes, "stackTrace", false);
currentType.startTime = getBoolean(attributes, "startTime", true);
currentType.period = getString(attributes, "period");
currentType.cutoff = getBoolean(attributes, "cutoff", false);
currentType.commitState = getString(attributes, "commitState");
currentType.isEvent = "Event".equals(qName);
currentType.isRelation = "Relation".equals(qName);
break;
case "Field":
currentField = new FieldElement(metadata);
currentField.name = attributes.getValue("name"); // mandatory
currentField.typeName = attributes.getValue("type"); // mandatory
currentField.label = getString(attributes, "label");
currentField.description = getString(attributes, "description");
currentField.contentType = getString(attributes, "contentType");
currentField.struct = getBoolean(attributes, "struct", false);
currentField.name = attributes.getValue("name");
currentField.typeName = attributes.getValue("type");
currentField.array = getBoolean(attributes, "array", false);
currentField.transition = getString(attributes, "transition");
currentField.relation = getString(attributes, "relation");
currentField.experimental = getBoolean(attributes, "experimental", false);
break;
}
}
private boolean getBoolean(Attributes attributes, String name, boolean defaultValue) {
private static String getString(Attributes attributes, String name) {
String value = attributes.getValue(name);
return value != null ? value : "";
}
private static boolean getBoolean(Attributes attributes, String name, boolean defaultValue) {
String value = attributes.getValue(name);
return value == null ? defaultValue : Boolean.valueOf(value);
}
@@ -327,10 +537,11 @@ public class GenerateJfrFiles {
}
}
static class Printer implements AutoCloseable {
static class Printer implements Closeable {
final PrintStream out;
Printer(File outputDirectory, String filename) throws FileNotFoundException {
out = new PrintStream(new BufferedOutputStream(new FileOutputStream(new File(outputDirectory, filename))));
Printer(File outputFile) throws FileNotFoundException {
out = new PrintStream(new BufferedOutputStream(new FileOutputStream(outputFile)));
write("/* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */");
write("");
}
@@ -341,13 +552,13 @@ public class GenerateJfrFiles {
}
@Override
public void close() throws Exception {
public void close() throws IOException {
out.close();
}
}
private static void printJfrPeriodicHpp(Metadata metadata, File outputDirectory) throws Exception {
try (Printer out = new Printer(outputDirectory, "jfrPeriodic.hpp")) {
private static void printJfrPeriodicHpp(Metadata metadata, File outputFile) throws Exception {
try (var out = new Printer(outputFile)) {
out.write("#ifndef JFRFILES_JFRPERIODICEVENTSET_HPP");
out.write("#define JFRFILES_JFRPERIODICEVENTSET_HPP");
out.write("");
@@ -361,7 +572,7 @@ public class GenerateJfrFiles {
out.write(" static void requestEvent(JfrEventId id) {");
out.write(" switch(id) {");
out.write(" ");
for (EventElement e : metadata.getPeriodicEvents()) {
for (TypeElement e : metadata.getPeriodicEvents()) {
out.write(" case Jfr" + e.name + "Event:");
out.write(" request" + e.name + "();");
out.write(" break;");
@@ -374,7 +585,7 @@ public class GenerateJfrFiles {
out.write("");
out.write(" private:");
out.write("");
for (EventElement e : metadata.getPeriodicEvents()) {
for (TypeElement e : metadata.getPeriodicEvents()) {
out.write(" static void request" + e.name + "(void);");
out.write("");
}
@@ -385,8 +596,8 @@ public class GenerateJfrFiles {
}
}
private static void printJfrEventControlHpp(Metadata metadata, TypeCounter typeCounter, File outputDirectory) throws Exception {
try (Printer out = new Printer(outputDirectory, "jfrEventControl.hpp")) {
private static void printJfrEventControlHpp(Metadata metadata, File outputFile) throws Exception {
try (var out = new Printer(outputFile)) {
out.write("#ifndef JFRFILES_JFR_NATIVE_EVENTSETTING_HPP");
out.write("#define JFRFILES_JFR_NATIVE_EVENTSETTING_HPP");
out.write("");
@@ -426,8 +637,8 @@ public class GenerateJfrFiles {
}
}
private static void printJfrEventIdsHpp(Metadata metadata, TypeCounter typeCounter, File outputDirectory) throws Exception {
try (Printer out = new Printer(outputDirectory, "jfrEventIds.hpp")) {
private static void printJfrEventIdsHpp(Metadata metadata, File outputFile) throws Exception {
try (var out = new Printer(outputFile)) {
out.write("#ifndef JFRFILES_JFREVENTIDS_HPP");
out.write("#define JFRFILES_JFREVENTIDS_HPP");
out.write("");
@@ -438,23 +649,28 @@ public class GenerateJfrFiles {
out.write(" JfrMetadataEvent = 0,");
out.write(" JfrCheckpointEvent = 1,");
for (TypeElement t : metadata.getEvents()) {
String name = "Jfr" + t.name +"Event";
out.write(" " + name + " = " + typeCounter.nextEventId(name) + ",");
out.write(" " + jfrEventId(t.name) + " = " + t.id + ",");
}
out.write("};");
out.write("typedef enum JfrEventId JfrEventId;");
out.write("");
out.write("static const JfrEventId FIRST_EVENT_ID = " + typeCounter.firstEventName() + ";");
out.write("static const JfrEventId LAST_EVENT_ID = " + typeCounter.lastEventName() + ";");
out.write("static const int NUMBER_OF_EVENTS = " + typeCounter.eventCount() + ";");
out.write("static const int NUMBER_OF_RESERVED_EVENTS = " + TypeCounter.RESERVED_EVENT_COUNT + ";");
String first = metadata.getName(metadata.eventCounter.first);
String last = metadata.getName(metadata.eventCounter.last);
out.write("static const JfrEventId FIRST_EVENT_ID = " + jfrEventId(first) + ";");
out.write("static const JfrEventId LAST_EVENT_ID = " + jfrEventId(last) + ";");
out.write("static const int NUMBER_OF_EVENTS = " + metadata.eventCounter.count + ";");
out.write("static const int NUMBER_OF_RESERVED_EVENTS = " + Metadata.RESERVED_EVENT_COUNT + ";");
out.write("#endif // INCLUDE_JFR");
out.write("#endif // JFRFILES_JFREVENTIDS_HPP");
}
}
private static void printJfrTypesHpp(Metadata metadata, TypeCounter typeCounter, File outputDirectory) throws Exception {
try (Printer out = new Printer(outputDirectory, "jfrTypes.hpp")) {
private static String jfrEventId(String name) {
return "Jfr" + name + "Event";
}
private static void printJfrTypesHpp(Metadata metadata, File outputFile) throws Exception {
try (var out = new Printer(outputFile)) {
out.write("#ifndef JFRFILES_JFRTYPES_HPP");
out.write("#define JFRFILES_JFRTYPES_HPP");
out.write("");
@@ -465,36 +681,27 @@ public class GenerateJfrFiles {
out.write("#include \"memory/allocation.hpp\"");
out.write("");
out.write("enum JfrTypeId {");
Map<String, XmlType> javaTypes = new LinkedHashMap<>();
for (var t : metadata.xmlTypes.entrySet()) {
String name = t.getKey();
XmlType xmlType = t.getValue();
if (xmlType.javaType != null && !xmlType.unsigned) {
String typeName = "TYPE_" + name.toUpperCase();
long typeId = typeCounter.nextTypeId(typeName);
out.write(" " + typeName + " = " + typeId + ",");
javaTypes.put(name, xmlType);
}
}
for (TypeElement type : metadata.getTypes()) {
String name = type.name;
if (!javaTypes.containsKey(name)) {
String typeName = "TYPE_" + name.toUpperCase();
long typeId = typeCounter.nextTypeId(typeName);
out.write(" " + typeName + " = " + typeId + ",");
}
out.write(" " + jfrTypeId(type.name) + " = " + type.id + ",");
}
out.write("};");
out.write("");
out.write("static const JfrTypeId FIRST_TYPE_ID = " + typeCounter.firstTypeName() + ";");
out.write("static const JfrTypeId LAST_TYPE_ID = " + typeCounter.lastTypeName() + ";");
String first = metadata.getName(metadata.typeCounter.first);
String last = metadata.getName(metadata.typeCounter.last);
out.write("static const JfrTypeId FIRST_TYPE_ID = " + jfrTypeId(first) + ";");
out.write("static const JfrTypeId LAST_TYPE_ID = " + jfrTypeId(last) + ";");
out.write("");
out.write("class JfrType : public AllStatic {");
out.write(" public:");
out.write(" static jlong name_to_id(const char* type_name) {");
for (Entry<String, XmlType> m : javaTypes.entrySet()) {
XmlType xmlType = m.getValue();
Map<String, XmlType> javaTypes = new LinkedHashMap<>();
for (XmlType xmlType : metadata.xmlTypes.values()) {
if (!xmlType.javaType.isEmpty()) {
javaTypes.put(xmlType.javaType, xmlType);
}
}
for (XmlType xmlType : javaTypes.values()) {
String javaName = xmlType.javaType;
String typeName = xmlType.name.toUpperCase();
out.write(" if (strcmp(type_name, \"" + javaName + "\") == 0) {");
@@ -508,11 +715,14 @@ public class GenerateJfrFiles {
out.write("#endif // INCLUDE_JFR");
out.write("#endif // JFRFILES_JFRTYPES_HPP");
}
;
}
private static void printJfrEventClassesHpp(Metadata metadata, File outputDirectory) throws Exception {
try (Printer out = new Printer(outputDirectory, "jfrEventClasses.hpp")) {
private static String jfrTypeId(String name) {
return "TYPE_" + name.toUpperCase();
}
private static void printJfrEventClassesHpp(Metadata metadata, File outputFile) throws Exception {
try (var out = new Printer(outputFile)) {
out.write("#ifndef JFRFILES_JFREVENTCLASSES_HPP");
out.write("#define JFRFILES_JFREVENTCLASSES_HPP");
out.write("");
@@ -566,7 +776,7 @@ public class GenerateJfrFiles {
printType(out, t, empty);
out.write("");
}
for (EventElement e : metadata.getEvents()) {
for (TypeElement e : metadata.getEvents()) {
printEvent(out, e, empty);
out.write("");
}
@@ -576,81 +786,83 @@ public class GenerateJfrFiles {
out.write("struct JfrStruct" + t.name);
out.write("{");
if (!empty) {
out.write(" private:");
for (FieldElement f : t.fields) {
printField(out, f);
}
out.write("");
out.write(" private:");
for (FieldElement f : t.fields) {
printField(out, f);
}
out.write("");
}
out.write(" public:");
for (FieldElement f : t.fields) {
printTypeSetter(out, f, empty);
printTypeSetter(out, f, empty);
}
out.write("");
if (!empty) {
printWriteData(out, t.fields, null);
printWriteData(out, t);
}
out.write("};");
out.write("");
}
private static void printEvent(Printer out, EventElement event, boolean empty) {
private static void printEvent(Printer out, TypeElement event, boolean empty) {
out.write("class Event" + event.name + " : public JfrEvent<Event" + event.name + ">");
out.write("{");
if (!empty) {
out.write(" private:");
for (FieldElement f : event.fields) {
printField(out, f);
}
out.write("");
out.write(" private:");
for (FieldElement f : event.fields) {
printField(out, f);
}
out.write("");
}
out.write(" public:");
if (!empty) {
out.write(" static const bool hasThread = " + event.thread + ";");
out.write(" static const bool hasStackTrace = " + event.stackTrace + ";");
out.write(" static const bool isInstant = " + !event.startTime + ";");
out.write(" static const bool hasCutoff = " + event.cutoff + ";");
out.write(" static const bool isRequestable = " + event.periodic + ";");
out.write(" static const JfrEventId eventId = Jfr" + event.name + "Event;");
out.write("");
out.write(" static const bool hasThread = " + event.thread + ";");
out.write(" static const bool hasStackTrace = " + event.stackTrace + ";");
out.write(" static const bool isInstant = " + !event.startTime + ";");
out.write(" static const bool hasCutoff = " + event.cutoff + ";");
out.write(" static const bool isRequestable = " + !event.period.isEmpty() + ";");
out.write(" static const JfrEventId eventId = Jfr" + event.name + "Event;");
out.write("");
}
if (!empty) {
out.write(" Event" + event.name + "(EventStartTime timing=TIMED) : JfrEvent<Event" + event.name + ">(timing) {}");
out.write(" Event" + event.name + "(EventStartTime timing=TIMED) : JfrEvent<Event" + event.name
+ ">(timing) {}");
} else {
out.write(" Event" + event.name + "(EventStartTime timing=TIMED) {}");
out.write(" Event" + event.name + "(EventStartTime timing=TIMED) {}");
}
out.write("");
int index = 0;
for (FieldElement f : event.fields) {
out.write(" void set_" + f.name + "(" + f.getParameterType() + " " + f.getParameterName() + ") {");
if (!empty) {
out.write(" this->_" + f.name + " = " + f.getParameterName() + ";");
out.write(" DEBUG_ONLY(set_field_bit(" + index++ + "));");
out.write(" this->_" + f.name + " = " + f.getParameterName() + ";");
out.write(" DEBUG_ONLY(set_field_bit(" + index++ + "));");
}
out.write(" }");
}
out.write("");
if (!empty) {
printWriteData(out, event.fields, event.commitState);
out.write("");
printWriteData(out, event);
out.write("");
}
out.write(" using JfrEvent<Event" + event.name + ">::commit; // else commit() is hidden by overloaded versions in this class");
out.write(" using JfrEvent<Event" + event.name
+ ">::commit; // else commit() is hidden by overloaded versions in this class");
printConstructor2(out, event, empty);
printCommitMethod(out, event, empty);
if (!empty) {
printVerify(out, event.fields);
printVerify(out, event.fields);
}
out.write("};");
}
private static void printWriteData(Printer out, List<FieldElement> fields, String commitState) {
private static void printWriteData(Printer out, TypeElement type) {
out.write(" template <typename Writer>");
out.write(" void writeData(Writer& w) {");
if (("_thread_in_native").equals(commitState)) {
if (("_thread_in_native").equals(type.commitState)) {
out.write(" // explicit epoch synchronization check");
out.write(" JfrEpochSynchronization sync;");
}
for (FieldElement field : fields) {
for (FieldElement field : type.fields) {
if (field.struct) {
out.write(" _" + field.name + ".writeData(w);");
} else {
@@ -662,9 +874,10 @@ public class GenerateJfrFiles {
private static void printTypeSetter(Printer out, FieldElement field, boolean empty) {
if (!empty) {
out.write(" void set_" + field.name + "(" + field.getParameterType() + " new_value) { this->_" + field.name + " = new_value; }");
out.write(" void set_" + field.name + "(" + field.getParameterType() + " new_value) { this->_" + field.name
+ " = new_value; }");
} else {
out.write(" void set_" + field.name + "(" + field.getParameterType() + " new_value) { }");
out.write(" void set_" + field.name + "(" + field.getParameterType() + " new_value) { }");
}
}
@@ -674,13 +887,14 @@ public class GenerateJfrFiles {
out.write(" void verify() const {");
int index = 0;
for (FieldElement f : fields) {
out.write(" assert(verify_field_bit(" + index++ + "), \"Attempting to write an uninitialized event field: %s\", \"_" + f.name + "\");");
out.write(" assert(verify_field_bit(" + index++
+ "), \"Attempting to write an uninitialized event field: %s\", \"_" + f.name + "\");");
}
out.write(" }");
out.write("#endif");
}
private static void printCommitMethod(Printer out, EventElement event, boolean empty) {
private static void printCommitMethod(Printer out, TypeElement event, boolean empty) {
if (event.startTime) {
StringJoiner sj = new StringJoiner(",\n ");
for (FieldElement f : event.fields) {
@@ -689,12 +903,12 @@ public class GenerateJfrFiles {
out.write("");
out.write(" void commit(" + sj.toString() + ") {");
if (!empty) {
out.write(" if (should_commit()) {");
for (FieldElement f : event.fields) {
out.write(" set_" + f.name + "(" + f.name + ");");
}
out.write(" commit();");
out.write(" }");
out.write(" if (should_commit()) {");
for (FieldElement f : event.fields) {
out.write(" set_" + f.name + "(" + f.name + ");");
}
out.write(" commit();");
out.write(" }");
}
out.write(" }");
}
@@ -715,23 +929,23 @@ public class GenerateJfrFiles {
}
out.write(" static void commit(" + sj.toString() + ") {");
if (!empty) {
out.write(" Event" + event.name + " me(UNTIMED);");
out.write("");
out.write(" if (me.should_commit()) {");
if (event.startTime) {
out.write(" me.set_starttime(startTicks);");
out.write(" me.set_endtime(endTicks);");
}
for (FieldElement f : event.fields) {
out.write(" me.set_" + f.name + "(" + f.name + ");");
}
out.write(" me.commit();");
out.write(" }");
out.write(" Event" + event.name + " me(UNTIMED);");
out.write("");
out.write(" if (me.should_commit()) {");
if (event.startTime) {
out.write(" me.set_starttime(startTicks);");
out.write(" me.set_endtime(endTicks);");
}
for (FieldElement f : event.fields) {
out.write(" me.set_" + f.name + "(" + f.name + ");");
}
out.write(" me.commit();");
out.write(" }");
}
out.write(" }");
}
private static void printConstructor2(Printer out, EventElement event, boolean empty) {
private static void printConstructor2(Printer out, TypeElement event, boolean empty) {
if (!event.startTime) {
out.write("");
out.write("");
@@ -744,14 +958,14 @@ public class GenerateJfrFiles {
sj.add(f.getParameterType() + " " + f.name);
}
if (!empty) {
out.write(" " + sj.toString() + ") : JfrEvent<Event" + event.name + ">(TIMED) {");
out.write(" if (should_commit()) {");
for (FieldElement f : event.fields) {
out.write(" set_" + f.name + "(" + f.name + ");");
}
out.write(" }");
out.write(" " + sj.toString() + ") : JfrEvent<Event" + event.name + ">(TIMED) {");
out.write(" if (should_commit()) {");
for (FieldElement f : event.fields) {
out.write(" set_" + f.name + "(" + f.name + ");");
}
out.write(" }");
} else {
out.write(" " + sj.toString() + ") {");
out.write(" " + sj.toString() + ") {");
}
out.write(" }");
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2020, 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
@@ -32,7 +32,7 @@
void report_error(char const * msg)
{
LPVOID lpMsgBuf;
LPTSTR lpMsgBuf;
DWORD dw = GetLastError();
FormatMessage(

View File

@@ -43,12 +43,14 @@ $(eval $(call SetupJavaCompilation, BUILD_WB_JAR, \
TARGETS += $(BUILD_WB_JAR)
# test-lib.jar will contain only hprof classes until JDK-8081381 is resolved
$(eval $(call SetupJavaCompilation, BUILD_TEST_LIB_JAR, \
TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED), \
SRC := $(TEST_LIB_SOURCE_DIR)/jdk/test/lib/hprof, \
SRC := $(TEST_LIB_SOURCE_DIR), \
EXCLUDES := jdk/test/lib/containers jdk/test/lib/security, \
BIN := $(TEST_LIB_SUPPORT)/test-lib_classes, \
HEADERS := $(TEST_LIB_SUPPORT)/test-lib_headers, \
JAR := $(TEST_LIB_SUPPORT)/test-lib.jar, \
DISABLED_WARNINGS := try deprecation rawtypes unchecked serial cast, \
))
TARGETS += $(BUILD_TEST_LIB_JAR)

View File

@@ -0,0 +1,83 @@
#
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. 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.
#
################################################################################
# This file builds the native component of testlib.
# It also covers the test-image part, where the built files are copied to the
# test image.
################################################################################
default: all
include $(SPEC)
include MakeBase.gmk
include TestFilesCompilation.gmk
################################################################################
# Targets for building the native tests themselves.
################################################################################
BUILD_LIBTEST_NATIVE_SRC := $(TOPDIR)/test/lib
BUILD_LIBTEST_OUTPUT_DIR := $(OUTPUTDIR)/support/test/lib/native
BUILD_LIBTEST_IMAGE_DIR := $(TEST_IMAGE_DIR)/lib
# This evaluation is expensive and should only be done if this target was
# explicitly called.
ifneq ($(filter build-test-lib-native, $(MAKECMDGOALS)), )
$(eval $(call SetupTestFilesCompilation, BUILD_LIBTEST_LIBRARIES, \
TYPE := LIBRARY, \
SOURCE_DIRS := $(BUILD_LIBTEST_NATIVE_SRC), \
OUTPUT_DIR := $(BUILD_LIBTEST_OUTPUT_DIR), \
))
endif
build-test-lib-native: $(BUILD_LIBTEST_LIBRARIES)
################################################################################
# Targets for building test-image.
################################################################################
# Copy to testlib test image. We need it in both hotspot and jdk.
$(eval $(call SetupCopyFiles, COPY_LIBTEST_NATIVE_TO_HOTSPOT, \
SRC := $(BUILD_LIBTEST_OUTPUT_DIR), \
DEST := $(TEST_IMAGE_DIR)/hotspot/jtreg/native, \
FILES := $(wildcard $(addprefix $(BUILD_LIBTEST_OUTPUT_DIR), /lib/*)), \
FLATTEN := true, \
))
$(eval $(call SetupCopyFiles, COPY_LIBTEST_NATIVE_TO_JDK, \
SRC := $(BUILD_LIBTEST_OUTPUT_DIR), \
DEST := $(TEST_IMAGE_DIR)/jdk/jtreg/native, \
FILES := $(wildcard $(addprefix $(BUILD_LIBTEST_OUTPUT_DIR), /lib/*)), \
FLATTEN := true, \
))
test-image-lib-native: $(COPY_LIBTEST_NATIVE_TO_HOTSPOT) $(COPY_LIBTEST_NATIVE_TO_JDK)
all: build-test-lib-native
.PHONY: default all build-test-lib-native test-image-lib-native

View File

@@ -105,6 +105,7 @@ ifeq ($(INCLUDE_GRAAL), true)
$(SRC_DIR)/org.graalvm.compiler.nodes.test/src \
$(SRC_DIR)/org.graalvm.compiler.options.test/src \
$(SRC_DIR)/org.graalvm.compiler.phases.common.test/src \
$(SRC_DIR)/org.graalvm.compiler.replacements.jdk10.test/src \
$(SRC_DIR)/org.graalvm.compiler.replacements.jdk12.test/src \
$(SRC_DIR)/org.graalvm.compiler.replacements.jdk9.test/src \
$(SRC_DIR)/org.graalvm.compiler.replacements.test/src \

View File

@@ -1,8 +1,8 @@
import random
AARCH64_AS = "<PATH-TO-AS>"
AARCH64_OBJDUMP = "<PATH-TO-OBJDUMP>"
AARCH64_OBJCOPY = "<PATH-TO-OBJCOPY>"
AARCH64_AS = "as"
AARCH64_OBJDUMP = "objdump"
AARCH64_OBJCOPY = "objcopy"
class Operand(object):
@@ -348,7 +348,7 @@ class LogicalImmOp(AddSubImmOp):
+ ', #0x%x' % self.immed)
def cstr(self):
return super(AddSubImmOp, self).cstr() + "l);"
return super(AddSubImmOp, self).cstr() + "ll);"
class MultiOp():

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
dnl Copyright (c) 2014, Red Hat Inc. All rights reserved.
dnl Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
dnl DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
dnl
dnl This code is free software; you can redistribute it and/or modify it
@@ -23,12 +23,12 @@ dnl
dnl Process this file with m4 aarch64_ad.m4 to generate the arithmetic
dnl and shift patterns patterns used in aarch64.ad.
dnl
// BEGIN This section of the file is automatically generated. Do not edit --------------
dnl
define(`ORL2I', `ifelse($1,I,orL2I)')
dnl
define(`BASE_SHIFT_INSN',
`
`// This pattern is automatically generated from aarch64_ad.m4
// DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
instruct $2$1_reg_$4_reg(iReg$1NoSp dst,
iReg$1`'ORL2I($1) src1, iReg$1`'ORL2I($1) src2,
immI src3, rFlagsReg cr) %{
@@ -46,9 +46,11 @@ instruct $2$1_reg_$4_reg(iReg$1NoSp dst,
%}
ins_pipe(ialu_reg_reg_shift);
%}')dnl
%}
')dnl
define(`BASE_INVERTED_INSN',
`
`// This pattern is automatically generated from aarch64_ad.m4
// DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
instruct $2$1_reg_not_reg(iReg$1NoSp dst,
iReg$1`'ORL2I($1) src1, iReg$1`'ORL2I($1) src2, imm$1_M1 m1,
rFlagsReg cr) %{
@@ -68,9 +70,11 @@ dnl into this canonical form.
%}
ins_pipe(ialu_reg_reg);
%}')dnl
%}
')dnl
define(`INVERTED_SHIFT_INSN',
`
`// This pattern is automatically generated from aarch64_ad.m4
// DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
instruct $2$1_reg_$4_not_reg(iReg$1NoSp dst,
iReg$1`'ORL2I($1) src1, iReg$1`'ORL2I($1) src2,
immI src3, imm$1_M1 src4, rFlagsReg cr) %{
@@ -91,9 +95,12 @@ dnl into this canonical form.
%}
ins_pipe(ialu_reg_reg_shift);
%}')dnl
%}
')dnl
define(`NOT_INSN',
`instruct reg$1_not_reg(iReg$1NoSp dst,
`// This pattern is automatically generated from aarch64_ad.m4
// DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
instruct reg$1_not_reg(iReg$1NoSp dst,
iReg$1`'ORL2I($1) src1, imm$1_M1 m1,
rFlagsReg cr) %{
match(Set dst (Xor$1 src1 m1));
@@ -108,7 +115,8 @@ define(`NOT_INSN',
%}
ins_pipe(ialu_reg);
%}')dnl
%}
')dnl
dnl
define(`BOTH_SHIFT_INSNS',
`BASE_SHIFT_INSN(I, $1, ifelse($2,andr,andw,$2w), $3, $4)
@@ -120,7 +128,7 @@ BASE_INVERTED_INSN(L, $1, $2, $3, $4)')dnl
dnl
define(`BOTH_INVERTED_SHIFT_INSNS',
`INVERTED_SHIFT_INSN(I, $1, $2w, $3, $4, ~0, int)
INVERTED_SHIFT_INSN(L, $1, $2, $3, $4, ~0l, long)')dnl
INVERTED_SHIFT_INSN(L, $1, $2, $3, $4, ~0l, jlong)')dnl
dnl
define(`ALL_SHIFT_KINDS',
`BOTH_SHIFT_INSNS($1, $2, URShift, LSR)
@@ -147,8 +155,10 @@ ALL_SHIFT_KINDS(Add, add)
ALL_SHIFT_KINDS(Sub, sub)
dnl
dnl EXTEND mode, rshift_op, src, lshift_count, rshift_count
define(`EXTEND', `($2$1 (LShift$1 $3 $4) $5)')
define(`BFM_INSN',`
define(`EXTEND', `($2$1 (LShift$1 $3 $4) $5)') dnl
define(`BFM_INSN',`// This pattern is automatically generated from aarch64_ad.m4
// DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
// Shift Left followed by Shift Right.
// This idiom is used by the compiler for the i2b bytecode etc.
instruct $4$1(iReg$1NoSp dst, iReg$1`'ORL2I($1) src, immI lshift_count, immI rshift_count)
@@ -167,7 +177,8 @@ instruct $4$1(iReg$1NoSp dst, iReg$1`'ORL2I($1) src, immI lshift_count, immI rsh
%}
ins_pipe(ialu_reg_shift);
%}')
%}
')
BFM_INSN(L, 63, RShift, sbfm)
BFM_INSN(I, 31, RShift, sbfmw)
BFM_INSN(L, 63, URShift, ubfm)
@@ -175,7 +186,9 @@ BFM_INSN(I, 31, URShift, ubfmw)
dnl
// Bitfield extract with shift & mask
define(`BFX_INSN',
`instruct $3$1(iReg$1NoSp dst, iReg$1`'ORL2I($1) src, immI rshift, imm$1_bitmask mask)
`// This pattern is automatically generated from aarch64_ad.m4
// DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
instruct $3$1(iReg$1NoSp dst, iReg$1`'ORL2I($1) src, immI rshift, imm$1_bitmask mask)
%{
match(Set dst (And$1 ($2$1 src rshift) mask));
// Make sure we are not going to exceed what $3 can do.
@@ -185,16 +198,20 @@ define(`BFX_INSN',
format %{ "$3 $dst, $src, $rshift, $mask" %}
ins_encode %{
int rshift = $rshift$$constant & $4;
long mask = $mask$$constant;
intptr_t mask = $mask$$constant;
int width = exact_log2$6(mask+1);
__ $3(as_Register($dst$$reg),
as_Register($src$$reg), rshift, width);
%}
ins_pipe(ialu_reg_shift);
%}')
%}
')
BFX_INSN(I, URShift, ubfxw, 31, int)
BFX_INSN(L, URShift, ubfx, 63, long, _long)
// This pattern is automatically generated from aarch64_ad.m4
// DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
// We can use ubfx when extending an And with a mask when we know mask
// is positive. We know that because immI_bitmask guarantees it.
instruct ubfxIConvI2L(iRegLNoSp dst, iRegIorL2I src, immI rshift, immI_bitmask mask)
@@ -207,7 +224,7 @@ instruct ubfxIConvI2L(iRegLNoSp dst, iRegIorL2I src, immI rshift, immI_bitmask m
format %{ "ubfx $dst, $src, $rshift, $mask" %}
ins_encode %{
int rshift = $rshift$$constant & 31;
long mask = $mask$$constant;
intptr_t mask = $mask$$constant;
int width = exact_log2(mask+1);
__ ubfx(as_Register($dst$$reg),
as_Register($src$$reg), rshift, width);
@@ -215,50 +232,81 @@ instruct ubfxIConvI2L(iRegLNoSp dst, iRegIorL2I src, immI rshift, immI_bitmask m
ins_pipe(ialu_reg_shift);
%}
define(`UBFIZ_INSN',
define(`UBFIZ_INSN', `// This pattern is automatically generated from aarch64_ad.m4
// DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
// We can use ubfiz when masking by a positive number and then left shifting the result.
// We know that the mask is positive because imm$1_bitmask guarantees it.
`instruct $2$1(iReg$1NoSp dst, iReg$1`'ORL2I($1) src, immI lshift, imm$1_bitmask mask)
instruct $3$1$8(iReg$2NoSp dst, iReg$1`'ORL2I($1) src, immI lshift, $7 mask)
%{
match(Set dst (LShift$1 (And$1 src mask) lshift));
predicate((exact_log2$5(n->in(1)->in(2)->get_$4() + 1) + (n->in(2)->get_int() & $3)) <= ($3 + 1));
ifelse($8,,
match(Set dst (LShift$1 (And$1 src mask) lshift));,
match(Set dst ($8 (LShift$1 (And$1 src mask) lshift)));)
ifelse($8,,
predicate(($6(n->in(1)->in(2)->get_$5() + 1) + (n->in(2)->get_int() & $4)) <= ($4 + 1));,
predicate(($6(n->in(1)->in(1)->in(2)->get_$5() + 1) + (n->in(1)->in(2)->get_int() & $4)) <= 31);)
ins_cost(INSN_COST);
format %{ "$2 $dst, $src, $lshift, $mask" %}
format %{ "$3 $dst, $src, $lshift, $mask" %}
ins_encode %{
int lshift = $lshift$$constant & $3;
long mask = $mask$$constant;
int width = exact_log2$5(mask+1);
__ $2(as_Register($dst$$reg),
int lshift = $lshift$$constant & $4;
intptr_t mask = $mask$$constant;
int width = $6(mask+1);
__ $3(as_Register($dst$$reg),
as_Register($src$$reg), lshift, width);
%}
ins_pipe(ialu_reg_shift);
%}')
UBFIZ_INSN(I, ubfizw, 31, int)
UBFIZ_INSN(L, ubfiz, 63, long, _long)
%}
')
UBFIZ_INSN(I, I, ubfizw, 31, int, exact_log2, immI_bitmask)
UBFIZ_INSN(L, L, ubfiz, 63, long, exact_log2_long, immL_bitmask)
UBFIZ_INSN(I, L, ubfizw, 31, int, exact_log2, immI_bitmask, ConvI2L)
UBFIZ_INSN(L, I, ubfiz, 63, long, exact_log2_long, immL_positive_bitmaskI, ConvL2I)
// If there is a convert I to L block between and AndI and a LShiftL, we can also match ubfiz
instruct ubfizIConvI2L(iRegLNoSp dst, iRegIorL2I src, immI lshift, immI_bitmask mask)
define(`BFX1_INSN', `// This pattern is automatically generated from aarch64_ad.m4
// DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
// If there is a convert $1 to $2 block between and And$1 and a LShift$2, we can also match ubfiz
instruct ubfiz$1Conv$3$9(iReg$2NoSp dst, iReg$1`'ORL2I($1) src, immI lshift, $8 mask)
%{
match(Set dst (LShiftL (ConvI2L (AndI src mask)) lshift));
predicate((exact_log2(n->in(1)->in(1)->in(2)->get_int() + 1) + (n->in(2)->get_int() & 63)) <= (63 + 1));
match(Set dst (LShift$2 (Conv$3 (And$1 src mask)) lshift));
predicate(($4(n->in(1)->in(1)->in(2)->$5() + 1) + (n->in(2)->get_int() & $6)) <= $7);
ins_cost(INSN_COST);
format %{ "ubfiz $dst, $src, $lshift, $mask" %}
ins_encode %{
int lshift = $lshift$$constant & 63;
long mask = $mask$$constant;
int lshift = $lshift$$constant & $6;
intptr_t mask = $mask$$constant;
int width = exact_log2(mask+1);
__ ubfiz(as_Register($dst$$reg),
as_Register($src$$reg), lshift, width);
%}
ins_pipe(ialu_reg_shift);
%}
')dnl
BFX1_INSN(I, L, I2L, exact_log2, get_int, 63, (63 + 1), immI_bitmask)
BFX1_INSN(L, I, L2I, exact_log2_long, get_long, 31, 31, immL_positive_bitmaskI, x)
// This pattern is automatically generated from aarch64_ad.m4
// DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
// Rotations
// Can skip int2long conversions after AND with small bitmask
instruct ubfizIConvI2LAndI(iRegLNoSp dst, iRegI src, immI_bitmask msk)
%{
match(Set dst (ConvI2L (AndI src msk)));
ins_cost(INSN_COST);
format %{ "ubfiz $dst, $src, 0, exact_log2($msk + 1) " %}
ins_encode %{
__ ubfiz(as_Register($dst$$reg), as_Register($src$$reg), 0, exact_log2($msk$$constant + 1));
%}
ins_pipe(ialu_reg_shift);
%}
define(`EXTRACT_INSN',
`instruct extr$3$1(iReg$1NoSp dst, iReg$1`'ORL2I($1) src1, iReg$1`'ORL2I($1) src2, immI lshift, immI rshift, rFlagsReg cr)
// Rotations dnl
define(`EXTRACT_INSN',`
// This pattern is automatically generated from aarch64_ad.m4
// DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
instruct extr$3$1(iReg$1NoSp dst, iReg$1`'ORL2I($1) src1, iReg$1`'ORL2I($1) src2, immI lshift, immI rshift, rFlagsReg cr)
%{
match(Set dst ($3$1 (LShift$1 src1 lshift) (URShift$1 src2 rshift)));
predicate(0 == (((n->in(1)->in(2)->get_int() & $2) + (n->in(2)->in(2)->get_int() & $2)) & $2));
@@ -277,9 +325,10 @@ EXTRACT_INSN(L, 63, Or, extr)
EXTRACT_INSN(I, 31, Or, extrw)
EXTRACT_INSN(L, 63, Add, extr)
EXTRACT_INSN(I, 31, Add, extrw)
define(`ROL_EXPAND', `
// $2 expander
define(`ROL_EXPAND', `// This pattern is automatically generated from aarch64_ad.m4
// DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
// $2 expander
instruct $2$1_rReg(iReg$1NoSp dst, iReg$1 src, iRegI shift, rFlagsReg cr)
%{
effect(DEF dst, USE src, USE shift);
@@ -292,10 +341,12 @@ instruct $2$1_rReg(iReg$1NoSp dst, iReg$1 src, iRegI shift, rFlagsReg cr)
rscratch1);
%}
ins_pipe(ialu_reg_reg_vshift);
%}')dnl
define(`ROR_EXPAND', `
// $2 expander
%}
')
define(`ROR_EXPAND', `// This pattern is automatically generated from aarch64_ad.m4
// DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
// $2 expander
instruct $2$1_rReg(iReg$1NoSp dst, iReg$1 src, iRegI shift, rFlagsReg cr)
%{
effect(DEF dst, USE src, USE shift);
@@ -307,8 +358,10 @@ instruct $2$1_rReg(iReg$1NoSp dst, iReg$1 src, iRegI shift, rFlagsReg cr)
as_Register($shift$$reg));
%}
ins_pipe(ialu_reg_reg_vshift);
%}')dnl
define(ROL_INSN, `
%}
')dnl
define(ROL_INSN, `// This pattern is automatically generated from aarch64_ad.m4
// DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
instruct $3$1_rReg_Var_C$2(iReg$1NoSp dst, iReg$1 src, iRegI shift, immI$2 c$2, rFlagsReg cr)
%{
match(Set dst (Or$1 (LShift$1 src shift) (URShift$1 src (SubI c$2 shift))));
@@ -316,8 +369,10 @@ instruct $3$1_rReg_Var_C$2(iReg$1NoSp dst, iReg$1 src, iRegI shift, immI$2 c$2,
expand %{
$3$1_rReg(dst, src, shift, cr);
%}
%}')dnl
define(ROR_INSN, `
%}
')dnl
define(ROR_INSN, `// This pattern is automatically generated from aarch64_ad.m4
// DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
instruct $3$1_rReg_Var_C$2(iReg$1NoSp dst, iReg$1 src, iRegI shift, immI$2 c$2, rFlagsReg cr)
%{
match(Set dst (Or$1 (URShift$1 src shift) (LShift$1 src (SubI c$2 shift))));
@@ -325,7 +380,8 @@ instruct $3$1_rReg_Var_C$2(iReg$1NoSp dst, iReg$1 src, iRegI shift, immI$2 c$2,
expand %{
$3$1_rReg(dst, src, shift, cr);
%}
%}')dnl
%}
')dnl
ROL_EXPAND(L, rol, rorv)
ROL_EXPAND(I, rol, rorvw)
ROL_INSN(L, _64, rol)
@@ -342,6 +398,8 @@ ROR_INSN(I, 0, ror)
// Add/subtract (extended)
dnl ADD_SUB_EXTENDED(mode, size, add node, shift node, insn, shift type, wordsize
define(`ADD_SUB_CONV', `
// This pattern is automatically generated from aarch64_ad.m4
// DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
instruct $3Ext$1(iReg$2NoSp dst, iReg$2`'ORL2I($2) src1, iReg$1`'ORL2I($1) src2, rFlagsReg cr)
%{
match(Set dst ($3$2 src1 (ConvI2L src2)));
@@ -354,10 +412,12 @@ instruct $3Ext$1(iReg$2NoSp dst, iReg$2`'ORL2I($2) src1, iReg$1`'ORL2I($1) src2,
%}
ins_pipe(ialu_reg_reg);
%}')dnl
ADD_SUB_CONV(I,L,Add,add,sxtw);
ADD_SUB_CONV(I,L,Sub,sub,sxtw);
ADD_SUB_CONV(I,L,Add,add,sxtw)
ADD_SUB_CONV(I,L,Sub,sub,sxtw)
dnl
define(`ADD_SUB_EXTENDED', `
// This pattern is automatically generated from aarch64_ad.m4
// DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
instruct $3Ext$1_$6(iReg$1NoSp dst, iReg$1`'ORL2I($1) src1, iReg$1`'ORL2I($1) src2, immI_`'eval($7-$2) lshift, immI_`'eval($7-$2) rshift, rFlagsReg cr)
%{
match(Set dst ($3$1 src1 EXTEND($1, $4, src2, lshift, rshift)));
@@ -369,7 +429,7 @@ instruct $3Ext$1_$6(iReg$1NoSp dst, iReg$1`'ORL2I($1) src1, iReg$1`'ORL2I($1) sr
as_Register($src2$$reg), ext::$6);
%}
ins_pipe(ialu_reg_reg);
%}')
%}')dnl
ADD_SUB_EXTENDED(I,16,Add,RShift,add,sxth,32)
ADD_SUB_EXTENDED(I,8,Add,RShift,add,sxtb,32)
ADD_SUB_EXTENDED(I,8,Add,URShift,add,uxtb,32)
@@ -379,7 +439,8 @@ ADD_SUB_EXTENDED(L,8,Add,RShift,add,sxtb,64)
ADD_SUB_EXTENDED(L,8,Add,URShift,add,uxtb,64)
dnl
dnl ADD_SUB_ZERO_EXTEND(mode, size, add node, insn, shift type)
define(`ADD_SUB_ZERO_EXTEND', `
define(`ADD_SUB_ZERO_EXTEND', `// This pattern is automatically generated from aarch64_ad.m4
// DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
instruct $3Ext$1_$5_and(iReg$1NoSp dst, iReg$1`'ORL2I($1) src1, iReg$1`'ORL2I($1) src2, imm$1_$2 mask, rFlagsReg cr)
%{
match(Set dst ($3$1 src1 (And$1 src2 mask)));
@@ -391,7 +452,8 @@ instruct $3Ext$1_$5_and(iReg$1NoSp dst, iReg$1`'ORL2I($1) src1, iReg$1`'ORL2I($1
as_Register($src2$$reg), ext::$5);
%}
ins_pipe(ialu_reg_reg);
%}')
%}
')
dnl
ADD_SUB_ZERO_EXTEND(I,255,Add,addw,uxtb)
ADD_SUB_ZERO_EXTEND(I,65535,Add,addw,uxth)
@@ -406,7 +468,8 @@ ADD_SUB_ZERO_EXTEND(L,65535,Sub,sub,uxth)
ADD_SUB_ZERO_EXTEND(L,4294967295,Sub,sub,uxtw)
dnl
dnl ADD_SUB_ZERO_EXTEND_SHIFT(mode, size, add node, insn, ext type)
define(`ADD_SUB_EXTENDED_SHIFT', `
define(`ADD_SUB_EXTENDED_SHIFT', `// This pattern is automatically generated from aarch64_ad.m4
// DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
instruct $3Ext$1_$6_shift(iReg$1NoSp dst, iReg$1`'ORL2I($1) src1, iReg$1`'ORL2I($1) src2, immIExt lshift2, immI_`'eval($7-$2) lshift1, immI_`'eval($7-$2) rshift1, rFlagsReg cr)
%{
match(Set dst ($3$1 src1 (LShift$1 EXTEND($1, $4, src2, lshift1, rshift1) lshift2)));
@@ -418,7 +481,8 @@ instruct $3Ext$1_$6_shift(iReg$1NoSp dst, iReg$1`'ORL2I($1) src1, iReg$1`'ORL2I(
as_Register($src2$$reg), ext::$6, ($lshift2$$constant));
%}
ins_pipe(ialu_reg_reg_shift);
%}')
%}
')
dnl $1 $2 $3 $4 $5 $6 $7
ADD_SUB_EXTENDED_SHIFT(L,8,Add,RShift,add,sxtb,64)
ADD_SUB_EXTENDED_SHIFT(L,16,Add,RShift,add,sxth,64)
@@ -435,7 +499,8 @@ ADD_SUB_EXTENDED_SHIFT(I,8,Sub,RShift,subw,sxtb,32)
ADD_SUB_EXTENDED_SHIFT(I,16,Sub,RShift,subw,sxth,32)
dnl
dnl ADD_SUB_CONV_SHIFT(mode, add node, insn, ext type)
define(`ADD_SUB_CONV_SHIFT', `
define(`ADD_SUB_CONV_SHIFT', `// This pattern is automatically generated from aarch64_ad.m4
// DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
instruct $2ExtI_shift(iReg$1NoSp dst, iReg$1`'ORL2I($1) src1, iRegIorL2I src2, immIExt lshift, rFlagsReg cr)
%{
match(Set dst ($2$1 src1 (LShiftL (ConvI2L src2) lshift)));
@@ -447,13 +512,14 @@ instruct $2ExtI_shift(iReg$1NoSp dst, iReg$1`'ORL2I($1) src1, iRegIorL2I src2, i
as_Register($src2$$reg), ext::$4, ($lshift$$constant));
%}
ins_pipe(ialu_reg_reg_shift);
%}')
dnl
ADD_SUB_CONV_SHIFT(L,Add,add,sxtw);
ADD_SUB_CONV_SHIFT(L,Sub,sub,sxtw);
%}
')dnl
ADD_SUB_CONV_SHIFT(L,Add,add,sxtw)
ADD_SUB_CONV_SHIFT(L,Sub,sub,sxtw)
dnl
dnl ADD_SUB_ZERO_EXTEND(mode, size, add node, insn, ext type)
define(`ADD_SUB_ZERO_EXTEND_SHIFT', `
define(`ADD_SUB_ZERO_EXTEND_SHIFT', `// This pattern is automatically generated from aarch64_ad.m4
// DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
instruct $3Ext$1_$5_and_shift(iReg$1NoSp dst, iReg$1`'ORL2I($1) src1, iReg$1`'ORL2I($1) src2, imm$1_$2 mask, immIExt lshift, rFlagsReg cr)
%{
match(Set dst ($3$1 src1 (LShift$1 (And$1 src2 mask) lshift)));
@@ -465,8 +531,8 @@ instruct $3Ext$1_$5_and_shift(iReg$1NoSp dst, iReg$1`'ORL2I($1) src1, iReg$1`'OR
as_Register($src2$$reg), ext::$5, ($lshift$$constant));
%}
ins_pipe(ialu_reg_reg_shift);
%}')
dnl
%}
')dnl
dnl $1 $2 $3 $4 $5
ADD_SUB_ZERO_EXTEND_SHIFT(L,255,Add,add,uxtb)
ADD_SUB_ZERO_EXTEND_SHIFT(L,65535,Add,add,uxth)
@@ -482,4 +548,4 @@ dnl
ADD_SUB_ZERO_EXTEND_SHIFT(I,255,Sub,subw,uxtb)
ADD_SUB_ZERO_EXTEND_SHIFT(I,65535,Sub,subw,uxth)
dnl
// END This section of the file is automatically generated. Do not edit --------------

View File

@@ -31,7 +31,7 @@
#include "interpreter/interpreter.hpp"
#ifndef PRODUCT
const unsigned long Assembler::asm_bp = 0x00007fffee09ac88;
const uintptr_t Assembler::asm_bp = 0x00007fffee09ac88;
#endif
#include "compiler/disassembler.hpp"
@@ -132,14 +132,14 @@ void entry(CodeBuffer *cb) {
__ subs(r4, r1, 698u); // subs x4, x1, #698
// LogicalImmOp
__ andw(r28, r19, 4294709247ul); // and w28, w19, #0xfffc0fff
__ orrw(r27, r5, 536870910ul); // orr w27, w5, #0x1ffffffe
__ eorw(r30, r20, 4294840319ul); // eor w30, w20, #0xfffe0fff
__ andsw(r22, r26, 4294959615ul); // ands w22, w26, #0xffffe1ff
__ andr(r5, r7, 4194300ul); // and x5, x7, #0x3ffffc
__ orr(r13, r7, 18014398509481728ul); // orr x13, x7, #0x3fffffffffff00
__ eor(r7, r9, 18442240474082197503ul); // eor x7, x9, #0xfff0000000003fff
__ ands(r3, r0, 18374686479671656447ul); // ands x3, x0, #0xff00000000007fff
__ andw(r28, r19, 4294709247ull); // and w28, w19, #0xfffc0fff
__ orrw(r27, r5, 536870910ull); // orr w27, w5, #0x1ffffffe
__ eorw(r30, r20, 4294840319ull); // eor w30, w20, #0xfffe0fff
__ andsw(r22, r26, 4294959615ull); // ands w22, w26, #0xffffe1ff
__ andr(r5, r7, 4194300ull); // and x5, x7, #0x3ffffc
__ orr(r13, r7, 18014398509481728ull); // orr x13, x7, #0x3fffffffffff00
__ eor(r7, r9, 18442240474082197503ull); // eor x7, x9, #0xfff0000000003fff
__ ands(r3, r0, 18374686479671656447ull); // ands x3, x0, #0xff00000000007fff
// AbsOp
__ b(__ pc()); // b .
@@ -1493,7 +1493,7 @@ extern "C" {
Disassembler::decode((address)start, (address)start + len);
}
JNIEXPORT void das1(unsigned long insn) {
JNIEXPORT void das1(uintptr_t insn) {
das(insn, 1);
}
}
@@ -1517,7 +1517,7 @@ void Address::lea(MacroAssembler *as, Register r) const {
break;
}
case base_plus_offset_reg: {
__ add(r, _base, _index, _ext.op(), MAX(_ext.shift(), 0));
__ add(r, _base, _index, _ext.op(), MAX2(_ext.shift(), 0));
break;
}
case literal: {
@@ -1532,7 +1532,7 @@ void Address::lea(MacroAssembler *as, Register r) const {
}
}
void Assembler::adrp(Register reg1, const Address &dest, unsigned long &byte_offset) {
void Assembler::adrp(Register reg1, const Address &dest, uintptr_t &byte_offset) {
ShouldNotReachHere();
}
@@ -1541,7 +1541,7 @@ void Assembler::adrp(Register reg1, const Address &dest, unsigned long &byte_off
#define starti Instruction_aarch64 do_not_use(this); set_current(&do_not_use)
void Assembler::adr(Register Rd, address adr) {
long offset = adr - pc();
intptr_t offset = adr - pc();
int offset_lo = offset & 3;
offset >>= 2;
starti;
@@ -1552,7 +1552,7 @@ void Assembler::adrp(Register reg1, const Address &dest, unsigned long &byte_off
void Assembler::_adrp(Register Rd, address adr) {
uint64_t pc_page = (uint64_t)pc() >> 12;
uint64_t adr_page = (uint64_t)adr >> 12;
long offset = adr_page - pc_page;
intptr_t offset = adr_page - pc_page;
int offset_lo = offset & 3;
offset >>= 2;
starti;
@@ -1701,9 +1701,9 @@ void Assembler::add_sub_immediate(Register Rd, Register Rn, unsigned uimm, int o
srf(Rn, 5);
}
bool Assembler::operand_valid_for_add_sub_immediate(long imm) {
bool Assembler::operand_valid_for_add_sub_immediate(int64_t imm) {
bool shift = false;
unsigned long uimm = uabs(imm);
uint64_t uimm = (uint64_t)uabs(imm);
if (uimm < (1 << 12))
return true;
if (uimm < (1 << 24)

View File

@@ -199,7 +199,7 @@ public:
return extend(uval, msb - lsb);
}
static void patch(address a, int msb, int lsb, unsigned long val) {
static void patch(address a, int msb, int lsb, uint64_t val) {
int nbits = msb - lsb + 1;
guarantee(val < (1U << nbits), "Field too big for insn");
assert_cond(msb >= lsb);
@@ -212,9 +212,9 @@ public:
*(unsigned *)a = target;
}
static void spatch(address a, int msb, int lsb, long val) {
static void spatch(address a, int msb, int lsb, int64_t val) {
int nbits = msb - lsb + 1;
long chk = val >> (nbits - 1);
int64_t chk = val >> (nbits - 1);
guarantee (chk == -1 || chk == 0, "Field too big for insn");
unsigned uval = val;
unsigned mask = (1U << nbits) - 1;
@@ -245,9 +245,9 @@ public:
f(val, bit, bit);
}
void sf(long val, int msb, int lsb) {
void sf(int64_t val, int msb, int lsb) {
int nbits = msb - lsb + 1;
long chk = val >> (nbits - 1);
int64_t chk = val >> (nbits - 1);
guarantee (chk == -1 || chk == 0, "Field too big for insn");
unsigned uval = val;
unsigned mask = (1U << nbits) - 1;
@@ -357,7 +357,7 @@ class Address {
private:
Register _base;
Register _index;
long _offset;
int64_t _offset;
enum mode _mode;
extend _ext;
@@ -380,9 +380,9 @@ class Address {
: _base(r), _index(noreg), _offset(0), _mode(base_plus_offset), _target(0) { }
Address(Register r, int o)
: _base(r), _index(noreg), _offset(o), _mode(base_plus_offset), _target(0) { }
Address(Register r, long o)
Address(Register r, int64_t o)
: _base(r), _index(noreg), _offset(o), _mode(base_plus_offset), _target(0) { }
Address(Register r, unsigned long o)
Address(Register r, uint64_t o)
: _base(r), _index(noreg), _offset(o), _mode(base_plus_offset), _target(0) { }
#ifdef ASSERT
Address(Register r, ByteSize disp)
@@ -422,7 +422,7 @@ class Address {
"wrong mode");
return _base;
}
long offset() const {
int64_t offset() const {
return _offset;
}
Register index() const {
@@ -554,14 +554,7 @@ class Address {
void lea(MacroAssembler *, Register) const;
static bool offset_ok_for_immed(long offset, int shift) {
unsigned mask = (1 << shift) - 1;
if (offset < 0 || offset & mask) {
return (uabs(offset) < (1 << (20 - 12))); // Unscaled offset
} else {
return ((offset >> shift) < (1 << (21 - 10 + 1))); // Scaled, unsigned offset
}
}
static bool offset_ok_for_immed(int64_t offset, uint shift);
};
// Convience classes
@@ -616,10 +609,10 @@ typedef enum {
class Assembler : public AbstractAssembler {
#ifndef PRODUCT
static const unsigned long asm_bp;
static const uintptr_t asm_bp;
void emit_long(jint x) {
if ((unsigned long)pc() == asm_bp)
if ((uintptr_t)pc() == asm_bp)
asm volatile ("nop");
AbstractAssembler::emit_int32(x);
}
@@ -670,7 +663,7 @@ public:
void f(unsigned val, int msb) {
current->f(val, msb, msb);
}
void sf(long val, int msb, int lsb) {
void sf(int64_t val, int msb, int lsb) {
current->sf(val, msb, lsb);
}
void rf(Register reg, int lsb) {
@@ -720,7 +713,7 @@ public:
wrap_label(Rd, L, &Assembler::_adrp);
}
void adrp(Register Rd, const Address &dest, unsigned long &offset);
void adrp(Register Rd, const Address &dest, uint64_t &offset);
#undef INSN
@@ -846,7 +839,7 @@ public:
// architecture. In debug mode we shrink it in order to test
// trampolines, but not so small that branches in the interpreter
// are out of range.
static const unsigned long branch_range = NOT_DEBUG(128 * M) DEBUG_ONLY(2 * M);
static const uint64_t branch_range = NOT_DEBUG(128 * M) DEBUG_ONLY(2 * M);
static bool reachable_from_branch_at(address branch, address target) {
return uabs(target - branch) < branch_range;
@@ -856,7 +849,7 @@ public:
#define INSN(NAME, opcode) \
void NAME(address dest) { \
starti; \
long offset = (dest - pc()) >> 2; \
int64_t offset = (dest - pc()) >> 2; \
DEBUG_ONLY(assert(reachable_from_branch_at(pc(), dest), "debug only")); \
f(opcode, 31), f(0b00101, 30, 26), sf(offset, 25, 0); \
} \
@@ -873,7 +866,7 @@ public:
// Compare & branch (immediate)
#define INSN(NAME, opcode) \
void NAME(Register Rt, address dest) { \
long offset = (dest - pc()) >> 2; \
int64_t offset = (dest - pc()) >> 2; \
starti; \
f(opcode, 31, 24), sf(offset, 23, 5), rf(Rt, 0); \
} \
@@ -891,7 +884,7 @@ public:
// Test & branch (immediate)
#define INSN(NAME, opcode) \
void NAME(Register Rt, int bitpos, address dest) { \
long offset = (dest - pc()) >> 2; \
int64_t offset = (dest - pc()) >> 2; \
int b5 = bitpos >> 5; \
bitpos &= 0x1f; \
starti; \
@@ -912,7 +905,7 @@ public:
{EQ, NE, HS, CS=HS, LO, CC=LO, MI, PL, VS, VC, HI, LS, GE, LT, GT, LE, AL, NV};
void br(Condition cond, address dest) {
long offset = (dest - pc()) >> 2;
int64_t offset = (dest - pc()) >> 2;
starti;
f(0b0101010, 31, 25), f(0, 24), sf(offset, 23, 5), f(0, 4), f(cond, 3, 0);
}
@@ -1292,7 +1285,7 @@ public:
// Load register (literal)
#define INSN(NAME, opc, V) \
void NAME(Register Rt, address dest) { \
long offset = (dest - pc()) >> 2; \
int64_t offset = (dest - pc()) >> 2; \
starti; \
f(opc, 31, 30), f(0b011, 29, 27), f(V, 26), f(0b00, 25, 24), \
sf(offset, 23, 5); \
@@ -1317,7 +1310,7 @@ public:
#define INSN(NAME, opc, V) \
void NAME(FloatRegister Rt, address dest) { \
long offset = (dest - pc()) >> 2; \
int64_t offset = (dest - pc()) >> 2; \
starti; \
f(opc, 31, 30), f(0b011, 29, 27), f(V, 26), f(0b00, 25, 24), \
sf(offset, 23, 5); \
@@ -1332,7 +1325,7 @@ public:
#define INSN(NAME, opc, V) \
void NAME(address dest, prfop op = PLDL1KEEP) { \
long offset = (dest - pc()) >> 2; \
int64_t offset = (dest - pc()) >> 2; \
starti; \
f(opc, 31, 30), f(0b011, 29, 27), f(V, 26), f(0b00, 25, 24), \
sf(offset, 23, 5); \
@@ -1408,7 +1401,7 @@ public:
assert(size == 0b10 || size == 0b11, "bad operand size in ldr");
assert(op == 0b01, "literal form can only be used with loads");
f(size & 0b01, 31, 30), f(0b011, 29, 27), f(0b00, 25, 24);
long offset = (adr.target() - pc()) >> 2;
int64_t offset = (adr.target() - pc()) >> 2;
sf(offset, 23, 5);
code_section()->relocate(pc(), adr.rspec());
return;
@@ -2683,7 +2676,7 @@ void ext(FloatRegister Vd, SIMD_Arrangement T, FloatRegister Vn, FloatRegister V
virtual void bang_stack_with_offset(int offset);
static bool operand_valid_for_logical_immediate(bool is32, uint64_t imm);
static bool operand_valid_for_add_sub_immediate(long imm);
static bool operand_valid_for_add_sub_immediate(int64_t imm);
static bool operand_valid_for_float_immediate(double imm);
void emit_data64(jlong data, relocInfo::relocType rtype, int format = 0);

View File

@@ -30,4 +30,16 @@
#include "asm/codeBuffer.hpp"
#include "code/codeCache.hpp"
inline bool Address::offset_ok_for_immed(int64_t offset, uint shift) {
uint mask = (1 << shift) - 1;
if (offset < 0 || (offset & mask) != 0) {
// Unscaled signed offset, encoded in a signed imm9 field.
return Assembler::is_simm9(offset);
} else {
// Scaled unsigned offset, encoded in an unsigned imm12:_ field.
return Assembler::is_uimm12(offset >> shift);
}
}
#endif // CPU_AARCH64_ASSEMBLER_AARCH64_INLINE_HPP

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -30,6 +30,7 @@
#include "c1/c1_LIRAssembler.hpp"
#include "c1/c1_MacroAssembler.hpp"
#include "c1/c1_Runtime1.hpp"
#include "classfile/javaClasses.hpp"
#include "nativeInst_aarch64.hpp"
#include "runtime/sharedRuntime.hpp"
#include "vmreg_aarch64.inline.hpp"

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -211,6 +211,19 @@ Address LIR_Assembler::as_Address_lo(LIR_Address* addr) {
// FIXME: This needs to be much more clever. See x86.
}
// Ensure a valid Address (base + offset) to a stack-slot. If stack access is
// not encodable as a base + (immediate) offset, generate an explicit address
// calculation to hold the address in a temporary register.
Address LIR_Assembler::stack_slot_address(int index, uint size, Register tmp, int adjust) {
precond(size == 4 || size == 8);
Address addr = frame_map()->address_for_slot(index, adjust);
precond(addr.getMode() == Address::base_plus_offset);
precond(addr.base() == sp);
precond(addr.offset() > 0);
uint mask = size - 1;
assert((addr.offset() & mask) == 0, "scaled offsets only");
return __ legitimize_address(addr, size, tmp);
}
void LIR_Assembler::osr_entry() {
offsets()->set_value(CodeOffsets::OSR_Entry, code_offset());
@@ -735,32 +748,38 @@ void LIR_Assembler::reg2reg(LIR_Opr src, LIR_Opr dest) {
}
void LIR_Assembler::reg2stack(LIR_Opr src, LIR_Opr dest, BasicType type, bool pop_fpu_stack) {
precond(src->is_register() && dest->is_stack());
uint const c_sz32 = sizeof(uint32_t);
uint const c_sz64 = sizeof(uint64_t);
if (src->is_single_cpu()) {
int index = dest->single_stack_ix();
if (is_reference_type(type)) {
__ str(src->as_register(), frame_map()->address_for_slot(dest->single_stack_ix()));
__ str(src->as_register(), stack_slot_address(index, c_sz64, rscratch1));
__ verify_oop(src->as_register());
} else if (type == T_METADATA || type == T_DOUBLE || type == T_ADDRESS) {
__ str(src->as_register(), frame_map()->address_for_slot(dest->single_stack_ix()));
__ str(src->as_register(), stack_slot_address(index, c_sz64, rscratch1));
} else {
__ strw(src->as_register(), frame_map()->address_for_slot(dest->single_stack_ix()));
__ strw(src->as_register(), stack_slot_address(index, c_sz32, rscratch1));
}
} else if (src->is_double_cpu()) {
Address dest_addr_LO = frame_map()->address_for_slot(dest->double_stack_ix(), lo_word_offset_in_bytes);
int index = dest->double_stack_ix();
Address dest_addr_LO = stack_slot_address(index, c_sz64, rscratch1, lo_word_offset_in_bytes);
__ str(src->as_register_lo(), dest_addr_LO);
} else if (src->is_single_fpu()) {
Address dest_addr = frame_map()->address_for_slot(dest->single_stack_ix());
__ strs(src->as_float_reg(), dest_addr);
int index = dest->single_stack_ix();
__ strs(src->as_float_reg(), stack_slot_address(index, c_sz32, rscratch1));
} else if (src->is_double_fpu()) {
Address dest_addr = frame_map()->address_for_slot(dest->double_stack_ix());
__ strd(src->as_double_reg(), dest_addr);
int index = dest->double_stack_ix();
__ strd(src->as_double_reg(), stack_slot_address(index, c_sz64, rscratch1));
} else {
ShouldNotReachHere();
}
}
@@ -845,30 +864,34 @@ void LIR_Assembler::reg2mem(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_Patch
void LIR_Assembler::stack2reg(LIR_Opr src, LIR_Opr dest, BasicType type) {
assert(src->is_stack(), "should not call otherwise");
assert(dest->is_register(), "should not call otherwise");
precond(src->is_stack() && dest->is_register());
uint const c_sz32 = sizeof(uint32_t);
uint const c_sz64 = sizeof(uint64_t);
if (dest->is_single_cpu()) {
int index = src->single_stack_ix();
if (is_reference_type(type)) {
__ ldr(dest->as_register(), frame_map()->address_for_slot(src->single_stack_ix()));
__ ldr(dest->as_register(), stack_slot_address(index, c_sz64, rscratch1));
__ verify_oop(dest->as_register());
} else if (type == T_METADATA || type == T_ADDRESS) {
__ ldr(dest->as_register(), frame_map()->address_for_slot(src->single_stack_ix()));
__ ldr(dest->as_register(), stack_slot_address(index, c_sz64, rscratch1));
} else {
__ ldrw(dest->as_register(), frame_map()->address_for_slot(src->single_stack_ix()));
__ ldrw(dest->as_register(), stack_slot_address(index, c_sz32, rscratch1));
}
} else if (dest->is_double_cpu()) {
Address src_addr_LO = frame_map()->address_for_slot(src->double_stack_ix(), lo_word_offset_in_bytes);
int index = src->double_stack_ix();
Address src_addr_LO = stack_slot_address(index, c_sz64, rscratch1, lo_word_offset_in_bytes);
__ ldr(dest->as_register_lo(), src_addr_LO);
} else if (dest->is_single_fpu()) {
Address src_addr = frame_map()->address_for_slot(src->single_stack_ix());
__ ldrs(dest->as_float_reg(), src_addr);
int index = src->single_stack_ix();
__ ldrs(dest->as_float_reg(), stack_slot_address(index, c_sz32, rscratch1));
} else if (dest->is_double_fpu()) {
Address src_addr = frame_map()->address_for_slot(src->double_stack_ix());
__ ldrd(dest->as_double_reg(), src_addr);
int index = src->double_stack_ix();
__ ldrd(dest->as_double_reg(), stack_slot_address(index, c_sz64, rscratch1));
} else {
ShouldNotReachHere();
@@ -1352,7 +1375,7 @@ void LIR_Assembler::emit_typecheck_helper(LIR_OpTypeCheck *op, Label* success, L
__ load_klass(klass_RInfo, obj);
if (k->is_loaded()) {
// See if we get an immediate positive hit
__ ldr(rscratch1, Address(klass_RInfo, long(k->super_check_offset())));
__ ldr(rscratch1, Address(klass_RInfo, int64_t(k->super_check_offset())));
__ cmp(k_RInfo, rscratch1);
if ((juint)in_bytes(Klass::secondary_super_cache_offset()) != k->super_check_offset()) {
__ br(Assembler::NE, *failure_target);
@@ -2016,7 +2039,7 @@ void LIR_Assembler::comp_fl2i(LIR_Code code, LIR_Opr left, LIR_Opr right, LIR_Op
} else if (code == lir_cmp_l2i) {
Label done;
__ cmp(left->as_register_lo(), right->as_register_lo());
__ mov(dst->as_register(), (u_int64_t)-1L);
__ mov(dst->as_register(), (uint64_t)-1L);
__ br(Assembler::LT, done);
__ csinc(dst->as_register(), zr, zr, Assembler::EQ);
__ bind(done);
@@ -2085,6 +2108,13 @@ void LIR_Assembler::throw_op(LIR_Opr exceptionPC, LIR_Opr exceptionOop, CodeEmit
// get current pc information
// pc is only needed if the method has an exception handler, the unwind code does not need it.
if (compilation()->debug_info_recorder()->last_pc_offset() == __ offset()) {
// As no instructions have been generated yet for this LIR node it's
// possible that an oop map already exists for the current offset.
// In that case insert an dummy NOP here to ensure all oop map PCs
// are unique. See JDK-8237483.
__ nop();
}
int pc_for_athrow_offset = __ offset();
InternalAddress pc_for_athrow(__ pc());
__ adr(exceptionPC->as_register(), pc_for_athrow);
@@ -2284,7 +2314,6 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
assert(default_type != NULL && default_type->is_array_klass() && default_type->is_loaded(), "must be true at this point");
int elem_size = type2aelembytes(basic_type);
int shift_amount;
int scale = exact_log2(elem_size);
Address src_length_addr = Address(src, arrayOopDesc::length_offset_in_bytes());
@@ -2675,7 +2704,7 @@ void LIR_Assembler::emit_updatecrc32(LIR_OpUpdateCRC32* op) {
Register res = op->result_opr()->as_register();
assert_different_registers(val, crc, res);
unsigned long offset;
uint64_t offset;
__ adrp(res, ExternalAddress(StubRoutines::crc_table_addr()), offset);
if (offset) __ add(res, res, offset);

View File

@@ -45,10 +45,12 @@ friend class ArrayCopyStub;
bool is_literal_address(LIR_Address* addr);
// When we need to use something other than rscratch1 use this
// method.
// When we need to use something other than rscratch1 use this method.
Address as_Address(LIR_Address* addr, Register tmp);
// Ensure we have a valid Address (base+offset) to a stack-slot.
Address stack_slot_address(int index, uint shift, Register tmp, int adjust = 0);
// Record the type of the receiver in ReceiverTypeData
void type_profile_helper(Register mdo,
ciMethodData *md, ciProfileData *data,

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -653,15 +653,15 @@ intptr_t* frame::real_fp() const {
#define DESCRIBE_FP_OFFSET(name) \
{ \
unsigned long *p = (unsigned long *)fp; \
printf("0x%016lx 0x%016lx %s\n", (unsigned long)(p + frame::name##_offset), \
uintptr_t *p = (uintptr_t *)fp; \
printf("0x%016lx 0x%016lx %s\n", (uintptr_t)(p + frame::name##_offset), \
p[frame::name##_offset], #name); \
}
static __thread unsigned long nextfp;
static __thread unsigned long nextpc;
static __thread unsigned long nextsp;
static __thread RegisterMap *reg_map;
static THREAD_LOCAL uintptr_t nextfp;
static THREAD_LOCAL uintptr_t nextpc;
static THREAD_LOCAL uintptr_t nextsp;
static THREAD_LOCAL RegisterMap *reg_map;
static void printbc(Method *m, intptr_t bcx) {
const char *name;
@@ -679,7 +679,7 @@ static void printbc(Method *m, intptr_t bcx) {
printf("%s : %s ==> %s\n", m->name_and_sig_as_C_string(), buf, name);
}
void internal_pf(unsigned long sp, unsigned long fp, unsigned long pc, unsigned long bcx) {
void internal_pf(uintptr_t sp, uintptr_t fp, uintptr_t pc, uintptr_t bcx) {
if (! fp)
return;
@@ -693,7 +693,7 @@ void internal_pf(unsigned long sp, unsigned long fp, unsigned long pc, unsigned
DESCRIBE_FP_OFFSET(interpreter_frame_locals);
DESCRIBE_FP_OFFSET(interpreter_frame_bcp);
DESCRIBE_FP_OFFSET(interpreter_frame_initial_sp);
unsigned long *p = (unsigned long *)fp;
uintptr_t *p = (uintptr_t *)fp;
// We want to see all frames, native and Java. For compiled and
// interpreted frames we have special information that allows us to
@@ -703,16 +703,16 @@ void internal_pf(unsigned long sp, unsigned long fp, unsigned long pc, unsigned
if (this_frame.is_compiled_frame() ||
this_frame.is_interpreted_frame()) {
frame sender = this_frame.sender(reg_map);
nextfp = (unsigned long)sender.fp();
nextpc = (unsigned long)sender.pc();
nextsp = (unsigned long)sender.unextended_sp();
nextfp = (uintptr_t)sender.fp();
nextpc = (uintptr_t)sender.pc();
nextsp = (uintptr_t)sender.unextended_sp();
} else {
nextfp = p[frame::link_offset];
nextpc = p[frame::return_addr_offset];
nextsp = (unsigned long)&p[frame::sender_sp_offset];
nextsp = (uintptr_t)&p[frame::sender_sp_offset];
}
if (bcx == -1ul)
if (bcx == -1ULL)
bcx = p[frame::interpreter_frame_bcp_offset];
if (Interpreter::contains((address)pc)) {
@@ -746,10 +746,10 @@ extern "C" void npf() {
internal_pf (nextsp, nextfp, nextpc, -1);
}
extern "C" void pf(unsigned long sp, unsigned long fp, unsigned long pc,
unsigned long bcx, unsigned long thread) {
extern "C" void pf(uintptr_t sp, uintptr_t fp, uintptr_t pc,
uintptr_t bcx, uintptr_t thread) {
if (!reg_map) {
reg_map = NEW_C_HEAP_OBJ(RegisterMap, mtNone);
reg_map = NEW_C_HEAP_OBJ(RegisterMap, mtInternal);
::new (reg_map) RegisterMap((JavaThread*)thread, false);
} else {
*reg_map = RegisterMap((JavaThread*)thread, false);
@@ -766,9 +766,9 @@ extern "C" void pf(unsigned long sp, unsigned long fp, unsigned long pc,
// support for printing out where we are in a Java method
// needs to be passed current fp and bcp register values
// prints method name, bc index and bytecode name
extern "C" void pm(unsigned long fp, unsigned long bcx) {
extern "C" void pm(uintptr_t fp, uintptr_t bcx) {
DESCRIBE_FP_OFFSET(interpreter_frame_method);
unsigned long *p = (unsigned long *)fp;
uintptr_t *p = (uintptr_t *)fp;
Method* m = (Method*)p[frame::interpreter_frame_method_offset];
printbc(m, bcx);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -50,7 +50,7 @@
// [padding ]
// [methodData ] = mdp() mdx_offset
// [methodOop ] = method() method_offset
// [Method ] = method() method_offset
// [last esp ] = last_sp() last_sp_offset
// [old stack pointer ] (sender_sp) sender_sp_offset

View File

@@ -178,7 +178,7 @@ void BarrierSetAssembler::eden_allocate(MacroAssembler* masm, Register obj,
Label retry;
__ bind(retry);
{
unsigned long offset;
uint64_t offset;
__ adrp(rscratch1, ExternalAddress((address) Universe::heap()->end_addr()), offset);
__ ldr(heap_end, Address(rscratch1, offset));
}
@@ -187,7 +187,7 @@ void BarrierSetAssembler::eden_allocate(MacroAssembler* masm, Register obj,
// Get the current top of the heap
{
unsigned long offset;
uint64_t offset;
__ adrp(rscratch1, heap_top, offset);
// Use add() here after ARDP, rather than lea().
// lea() does not generate anything if its offset is zero.

View File

@@ -48,7 +48,7 @@ void LIR_OpShenandoahCompareAndSwap::emit_code(LIR_Assembler* masm) {
newval = tmp2;
}
ShenandoahBarrierSet::assembler()->cmpxchg_oop(masm->masm(), addr, cmpval, newval, /*acquire*/ false, /*release*/ true, /*weak*/ false, /*is_cae*/ false, result);
ShenandoahBarrierSet::assembler()->cmpxchg_oop(masm->masm(), addr, cmpval, newval, /*acquire*/ false, /*release*/ true, /*is_cae*/ false, result);
}
#undef __

View File

@@ -449,9 +449,64 @@ void ShenandoahBarrierSetAssembler::try_resolve_jobject_in_native(MacroAssembler
__ bind(done);
}
void ShenandoahBarrierSetAssembler::cmpxchg_oop(MacroAssembler* masm, Register addr, Register expected, Register new_val,
bool acquire, bool release, bool weak, bool is_cae,
// Special Shenandoah CAS implementation that handles false negatives due
// to concurrent evacuation. The service is more complex than a
// traditional CAS operation because the CAS operation is intended to
// succeed if the reference at addr exactly matches expected or if the
// reference at addr holds a pointer to a from-space object that has
// been relocated to the location named by expected. There are two
// races that must be addressed:
// a) A parallel thread may mutate the contents of addr so that it points
// to a different object. In this case, the CAS operation should fail.
// b) A parallel thread may heal the contents of addr, replacing a
// from-space pointer held in addr with the to-space pointer
// representing the new location of the object.
// Upon entry to cmpxchg_oop, it is assured that new_val equals NULL
// or it refers to an object that is not being evacuated out of
// from-space, or it refers to the to-space version of an object that
// is being evacuated out of from-space.
//
// By default, this operation implements sequential consistency and the
// value held in the result register following execution of the
// generated code sequence is 0 to indicate failure of CAS, non-zero
// to indicate success. Arguments support variations on this theme:
//
// acquire: Allow relaxation of the memory ordering on CAS from
// sequential consistency. This can be useful when
// sequential consistency is not required, such as when
// another sequentially consistent operation is already
// present in the execution stream. If acquire, successful
// execution has the side effect of assuring that memory
// values updated by other threads and "released" will be
// visible to any read operations perfomed by this thread
// which follow this operation in program order. This is a
// special optimization that should not be enabled by default.
// release: Allow relaxation of the memory ordering on CAS from
// sequential consistency. This can be useful when
// sequential consistency is not required, such as when
// another sequentially consistent operation is already
// present in the execution stream. If release, successful
// completion of this operation has the side effect of
// assuring that all writes to memory performed by this
// thread that precede this operation in program order are
// visible to all other threads that subsequently "acquire"
// before reading the respective memory values. This is a
// special optimization that should not be enabled by default.
// is_cae: This turns CAS (compare and swap) into CAE (compare and
// exchange). This HotSpot convention is that CAE makes
// available to the caller the "failure witness", which is
// the value that was stored in memory which did not match
// the expected value. If is_cae, the result is the value
// most recently fetched from addr rather than a boolean
// success indicator.
//
// Clobbers rscratch1, rscratch2
void ShenandoahBarrierSetAssembler::cmpxchg_oop(MacroAssembler* masm,
Register addr,
Register expected,
Register new_val,
bool acquire, bool release,
bool is_cae,
Register result) {
Register tmp1 = rscratch1;
Register tmp2 = rscratch2;
@@ -460,48 +515,124 @@ void ShenandoahBarrierSetAssembler::cmpxchg_oop(MacroAssembler* masm, Register a
assert_different_registers(addr, expected, new_val, tmp1, tmp2);
Label retry, done, fail;
Label step4, done;
// CAS, using LL/SC pair.
__ bind(retry);
__ load_exclusive(tmp1, addr, size, acquire);
if (is_narrow) {
__ cmpw(tmp1, expected);
} else {
__ cmp(tmp1, expected);
}
__ br(Assembler::NE, fail);
__ store_exclusive(tmp2, new_val, addr, size, release);
if (weak) {
__ cmpw(tmp2, 0u); // If the store fails, return NE to our caller
} else {
__ cbnzw(tmp2, retry);
}
__ b(done);
// There are two ways to reach this label. Initial entry into the
// cmpxchg_oop code expansion starts at step1 (which is equivalent
// to label step4). Additionally, in the rare case that four steps
// are required to perform the requested operation, the fourth step
// is the same as the first. On a second pass through step 1,
// control may flow through step 2 on its way to failure. It will
// not flow from step 2 to step 3 since we are assured that the
// memory at addr no longer holds a from-space pointer.
//
// The comments that immediately follow the step4 label apply only
// to the case in which control reaches this label by branch from
// step 3.
__ bind (step4);
// Step 4. CAS has failed because the value most recently fetched
// from addr (which is now held in tmp1) is no longer the from-space
// pointer held in tmp2. If a different thread replaced the
// in-memory value with its equivalent to-space pointer, then CAS
// may still be able to succeed. The value held in the expected
// register has not changed.
//
// It is extremely rare we reach this point. For this reason, the
// implementation opts for smaller rather than potentially faster
// code. Ultimately, smaller code for this rare case most likely
// delivers higher overall throughput by enabling improved icache
// performance.
// Step 1. Fast-path.
//
// Try to CAS with given arguments. If successful, then we are done.
//
// No label required for step 1.
__ cmpxchg(addr, expected, new_val, size, acquire, release, false, tmp2);
// EQ flag set iff success. tmp2 holds value fetched.
// If expected equals null but tmp2 does not equal null, the
// following branches to done to report failure of CAS. If both
// expected and tmp2 equal null, the following branches to done to
// report success of CAS. There's no need for a special test of
// expected equal to null.
__ br(Assembler::EQ, done);
// if CAS failed, fall through to step 2
// Step 2. CAS has failed because the value held at addr does not
// match expected. This may be a false negative because the value fetched
// from addr (now held in tmp2) may be a from-space pointer to the
// original copy of same object referenced by to-space pointer expected.
//
// To resolve this, it suffices to find the forward pointer associated
// with fetched value. If this matches expected, retry CAS with new
// parameters. If this mismatches, then we have a legitimate
// failure, and we're done.
//
// No need for step2 label.
// overwrite tmp1 with from-space pointer fetched from memory
__ mov(tmp1, tmp2);
__ bind(fail);
// Check if rb(expected)==rb(tmp1)
// Shuffle registers so that we have memory value ready for next expected.
__ mov(tmp2, expected);
__ mov(expected, tmp1);
if (is_narrow) {
// Decode tmp1 in order to resolve its forward pointer
__ decode_heap_oop(tmp1, tmp1);
__ decode_heap_oop(tmp2, tmp2);
}
resolve_forward_pointer(masm, tmp1);
resolve_forward_pointer(masm, tmp2);
__ cmp(tmp1, tmp2);
// Retry with expected now being the value we just loaded from addr.
__ br(Assembler::EQ, retry);
if (is_cae && is_narrow) {
// For cmp-and-exchange and narrow oops, we need to restore
// the compressed old-value. We moved it to 'expected' a few lines up.
__ mov(tmp1, expected);
}
__ bind(done);
// Encode tmp1 to compare against expected.
__ encode_heap_oop(tmp1, tmp1);
// Does forwarded value of fetched from-space pointer match original
// value of expected? If tmp1 holds null, this comparison will fail
// because we know from step1 that expected is not null. There is
// no need for a separate test for tmp1 (the value originally held
// in memory) equal to null.
__ cmp(tmp1, expected);
// If not, then the failure was legitimate and we're done.
// Branching to done with NE condition denotes failure.
__ br(Assembler::NE, done);
// Fall through to step 3. No need for step3 label.
// Step 3. We've confirmed that the value originally held in memory
// (now held in tmp2) pointed to from-space version of original
// expected value. Try the CAS again with the from-space expected
// value. If it now succeeds, we're good.
//
// Note: tmp2 holds encoded from-space pointer that matches to-space
// object residing at expected. tmp2 is the new "expected".
// Note that macro implementation of __cmpxchg cannot use same register
// tmp2 for result and expected since it overwrites result before it
// compares result with expected.
__ cmpxchg(addr, tmp2, new_val, size, acquire, release, false, tmp1);
// EQ flag set iff success. tmp2 holds value fetched.
// If fetched value did not equal the new expected, this could
// still be a false negative because some other thread may have
// newly overwritten the memory value with its to-space equivalent.
__ br(Assembler::NE, step4);
if (is_cae) {
__ mov(result, tmp1);
// We're falling through to done to indicate success. Success
// with is_cae is denoted by returning the value of expected as
// result.
__ mov(tmp2, expected);
}
__ bind(done);
// At entry to done, the Z (EQ) flag is on iff if the CAS
// operation was successful. Additionally, if is_cae, tmp2 holds
// the value most recently fetched from addr. In this case, success
// is denoted by tmp2 matching expected.
if (is_cae) {
__ mov(result, tmp2);
} else {
__ cset(result, Assembler::EQ);
}

View File

@@ -84,7 +84,7 @@ public:
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,
bool acquire, bool release, bool weak, bool is_cae, Register result);
bool acquire, bool release, bool is_cae, Register result);
virtual void barrier_stubs_init();
};

View File

@@ -33,7 +33,7 @@ encode %{
Register tmp = $tmp$$Register;
__ mov(tmp, $oldval$$Register); // Must not clobber oldval.
ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register,
/*acquire*/ false, /*release*/ true, /*weak*/ false, /*is_cae*/ false, $res$$Register);
/*acquire*/ false, /*release*/ true, /*is_cae*/ false, $res$$Register);
%}
enc_class aarch64_enc_cmpxchg_acq_oop_shenandoah(memory mem, iRegP oldval, iRegP newval, iRegPNoSp tmp, iRegINoSp res) %{
@@ -42,7 +42,7 @@ encode %{
Register tmp = $tmp$$Register;
__ mov(tmp, $oldval$$Register); // Must not clobber oldval.
ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register,
/*acquire*/ true, /*release*/ true, /*weak*/ false, /*is_cae*/ false, $res$$Register);
/*acquire*/ true, /*release*/ true, /*is_cae*/ false, $res$$Register);
%}
%}
@@ -76,7 +76,7 @@ instruct compareAndSwapN_shenandoah(iRegINoSp res, indirect mem, iRegN oldval, i
ins_encode %{
Register tmp = $tmp$$Register;
__ mov(tmp, $oldval$$Register); // Must not clobber oldval.
ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register, /*acquire*/ false, /*release*/ true, /*weak*/ false, /*is_cae*/ false, $res$$Register);
ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register, /*acquire*/ false, /*release*/ true, /*is_cae*/ false, $res$$Register);
%}
ins_pipe(pipe_slow);
@@ -114,7 +114,7 @@ instruct compareAndSwapNAcq_shenandoah(iRegINoSp res, indirect mem, iRegN oldval
ins_encode %{
Register tmp = $tmp$$Register;
__ mov(tmp, $oldval$$Register); // Must not clobber oldval.
ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register, /*acquire*/ true, /*release*/ true, /*weak*/ false, /*is_cae*/ false, $res$$Register);
ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register, /*acquire*/ true, /*release*/ true, /*is_cae*/ false, $res$$Register);
%}
ins_pipe(pipe_slow);
@@ -131,7 +131,7 @@ instruct compareAndExchangeN_shenandoah(iRegNNoSp res, indirect mem, iRegN oldva
Register tmp = $tmp$$Register;
__ mov(tmp, $oldval$$Register); // Must not clobber oldval.
ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register,
/*acquire*/ false, /*release*/ true, /*weak*/ false, /*is_cae*/ true, $res$$Register);
/*acquire*/ false, /*release*/ true, /*is_cae*/ true, $res$$Register);
%}
ins_pipe(pipe_slow);
%}
@@ -147,7 +147,7 @@ instruct compareAndExchangeP_shenandoah(iRegPNoSp res, indirect mem, iRegP oldva
Register tmp = $tmp$$Register;
__ mov(tmp, $oldval$$Register); // Must not clobber oldval.
ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register,
/*acquire*/ false, /*release*/ true, /*weak*/ false, /*is_cae*/ true, $res$$Register);
/*acquire*/ false, /*release*/ true, /*is_cae*/ true, $res$$Register);
%}
ins_pipe(pipe_slow);
%}
@@ -164,7 +164,7 @@ instruct compareAndExchangeNAcq_shenandoah(iRegNNoSp res, indirect mem, iRegN ol
Register tmp = $tmp$$Register;
__ mov(tmp, $oldval$$Register); // Must not clobber oldval.
ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register,
/*acquire*/ true, /*release*/ true, /*weak*/ false, /*is_cae*/ true, $res$$Register);
/*acquire*/ true, /*release*/ true, /*is_cae*/ true, $res$$Register);
%}
ins_pipe(pipe_slow);
%}
@@ -181,7 +181,7 @@ instruct compareAndExchangePAcq_shenandoah(iRegPNoSp res, indirect mem, iRegP ol
Register tmp = $tmp$$Register;
__ mov(tmp, $oldval$$Register); // Must not clobber oldval.
ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register,
/*acquire*/ true, /*release*/ true, /*weak*/ false, /*is_cae*/ true, $res$$Register);
/*acquire*/ true, /*release*/ true, /*is_cae*/ true, $res$$Register);
%}
ins_pipe(pipe_slow);
%}
@@ -197,8 +197,9 @@ instruct weakCompareAndSwapN_shenandoah(iRegINoSp res, indirect mem, iRegN oldva
ins_encode %{
Register tmp = $tmp$$Register;
__ mov(tmp, $oldval$$Register); // Must not clobber oldval.
// Weak is not currently supported by ShenandoahBarrierSet::cmpxchg_oop
ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register,
/*acquire*/ false, /*release*/ true, /*weak*/ true, /*is_cae*/ false, $res$$Register);
/*acquire*/ false, /*release*/ true, /*is_cae*/ false, $res$$Register);
%}
ins_pipe(pipe_slow);
%}
@@ -213,8 +214,9 @@ instruct weakCompareAndSwapP_shenandoah(iRegINoSp res, indirect mem, iRegP oldva
ins_encode %{
Register tmp = $tmp$$Register;
__ mov(tmp, $oldval$$Register); // Must not clobber oldval.
// Weak is not currently supported by ShenandoahBarrierSet::cmpxchg_oop
ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register,
/*acquire*/ false, /*release*/ true, /*weak*/ true, /*is_cae*/ false, $res$$Register);
/*acquire*/ false, /*release*/ true, /*is_cae*/ false, $res$$Register);
%}
ins_pipe(pipe_slow);
%}
@@ -231,8 +233,9 @@ instruct weakCompareAndSwapNAcq_shenandoah(iRegINoSp res, indirect mem, iRegN ol
ins_encode %{
Register tmp = $tmp$$Register;
__ mov(tmp, $oldval$$Register); // Must not clobber oldval.
// Weak is not currently supported by ShenandoahBarrierSet::cmpxchg_oop
ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register,
/*acquire*/ true, /*release*/ true, /*weak*/ true, /*is_cae*/ false, $res$$Register);
/*acquire*/ true, /*release*/ true, /*is_cae*/ false, $res$$Register);
%}
ins_pipe(pipe_slow);
%}
@@ -249,8 +252,9 @@ instruct weakCompareAndSwapPAcq_shenandoah(iRegINoSp res, indirect mem, iRegP ol
ins_encode %{
Register tmp = $tmp$$Register;
__ mov(tmp, $oldval$$Register); // Must not clobber oldval.
// Weak is not currently supported by ShenandoahBarrierSet::cmpxchg_oop
ShenandoahBarrierSet::assembler()->cmpxchg_oop(&_masm, $mem$$Register, tmp, $newval$$Register,
/*acquire*/ true, /*release*/ true, /*weak*/ true, /*is_cae*/ false, $res$$Register);
/*acquire*/ true, /*release*/ true, /*is_cae*/ false, $res$$Register);
%}
ins_pipe(pipe_slow);
%}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2020, 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
@@ -67,8 +67,6 @@ void ZBarrierSetAssembler::load_at(MacroAssembler* masm,
assert_different_registers(rscratch1, rscratch2, src.base());
assert_different_registers(rscratch1, rscratch2, dst);
RegSet savedRegs = RegSet::range(r0, r28) - RegSet::of(dst, rscratch1, rscratch2);
Label done;
// Load bad mask into scratch register.
@@ -82,37 +80,21 @@ void ZBarrierSetAssembler::load_at(MacroAssembler* masm,
__ enter();
__ push(savedRegs, sp);
__ push_call_clobbered_registers_except(RegSet::of(dst));
if (c_rarg0 != dst) {
__ mov(c_rarg0, dst);
}
__ mov(c_rarg1, rscratch2);
int step = 4 * wordSize;
__ mov(rscratch2, -step);
__ sub(sp, sp, step);
for (int i = 28; i >= 4; i -= 4) {
__ st1(as_FloatRegister(i), as_FloatRegister(i+1), as_FloatRegister(i+2),
as_FloatRegister(i+3), __ T1D, Address(__ post(sp, rscratch2)));
}
__ st1(as_FloatRegister(0), as_FloatRegister(1), as_FloatRegister(2),
as_FloatRegister(3), __ T1D, Address(sp));
__ call_VM_leaf(ZBarrierSetRuntime::load_barrier_on_oop_field_preloaded_addr(decorators), 2);
for (int i = 0; i <= 28; i += 4) {
__ ld1(as_FloatRegister(i), as_FloatRegister(i+1), as_FloatRegister(i+2),
as_FloatRegister(i+3), __ T1D, Address(__ post(sp, step)));
}
// Make sure dst has the return value.
if (dst != r0) {
__ mov(dst, r0);
}
__ pop(savedRegs, sp);
__ pop_call_clobbered_registers_except(RegSet::of(dst));
__ leave();
__ bind(done);
@@ -170,7 +152,7 @@ void ZBarrierSetAssembler::arraycopy_prologue(MacroAssembler* masm,
assert_different_registers(src, count, rscratch1);
__ pusha();
__ push(saved_regs, sp);
if (count == c_rarg0) {
if (src == c_rarg1) {
@@ -189,7 +171,8 @@ void ZBarrierSetAssembler::arraycopy_prologue(MacroAssembler* masm,
__ call_VM_leaf(ZBarrierSetRuntime::load_barrier_on_oop_array_addr(), 2);
__ popa();
__ pop(saved_regs, sp);
BLOCK_COMMENT("} ZBarrierSetAssembler::arraycopy_prologue");
}
@@ -206,7 +189,7 @@ void ZBarrierSetAssembler::try_resolve_jobject_in_native(MacroAssembler* masm,
BarrierSetAssembler::try_resolve_jobject_in_native(masm, jni_env, robj, tmp, slowpath);
// The Address offset is too large to direct load - -784. Our range is +127, -128.
__ mov(tmp, (long int)(in_bytes(ZThreadLocalData::address_bad_mask_offset()) -
__ mov(tmp, (int64_t)(in_bytes(ZThreadLocalData::address_bad_mask_offset()) -
in_bytes(JavaThread::jni_environment_offset())));
// Load address bad mask
@@ -295,13 +278,7 @@ void ZBarrierSetAssembler::generate_c1_load_barrier_runtime_stub(StubAssembler*
DecoratorSet decorators) const {
__ prologue("zgc_load_barrier stub", false);
// We don't use push/pop_clobbered_registers() - we need to pull out the result from r0.
for (int i = 0; i < 32; i += 2) {
__ stpd(as_FloatRegister(i), as_FloatRegister(i + 1), Address(__ pre(sp,-16)));
}
const RegSet save_regs = RegSet::range(r1, r28);
__ push(save_regs, sp);
__ push_call_clobbered_registers_except(RegSet::of(r0));
// Setup arguments
__ load_parameter(0, c_rarg0);
@@ -309,11 +286,7 @@ void ZBarrierSetAssembler::generate_c1_load_barrier_runtime_stub(StubAssembler*
__ call_VM_leaf(ZBarrierSetRuntime::load_barrier_on_oop_field_preloaded_addr(decorators), 2);
__ pop(save_regs, sp);
for (int i = 30; i >= 0; i -= 2) {
__ ldpd(as_FloatRegister(i), as_FloatRegister(i + 1), Address(__ post(sp, 16)));
}
__ pop_call_clobbered_registers_except(RegSet::of(r0));
__ epilogue();
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,6 +23,7 @@
*/
#include <stdlib.h>
#include <stdint.h>
#include "immediate_aarch64.hpp"
// there are at most 2^13 possible logical immediate encodings
@@ -34,14 +35,14 @@ static int li_table_entry_count;
// for forward lookup we just use a direct array lookup
// and assume that the cient has supplied a valid encoding
// table[encoding] = immediate
static u_int64_t LITable[LI_TABLE_SIZE];
static uint64_t LITable[LI_TABLE_SIZE];
// for reverse lookup we need a sparse map so we store a table of
// immediate and encoding pairs sorted by immediate value
struct li_pair {
u_int64_t immediate;
u_int32_t encoding;
uint64_t immediate;
uint32_t encoding;
};
static struct li_pair InverseLITable[LI_TABLE_SIZE];
@@ -63,9 +64,9 @@ int compare_immediate_pair(const void *i1, const void *i2)
// helper functions used by expandLogicalImmediate
// for i = 1, ... N result<i-1> = 1 other bits are zero
static inline u_int64_t ones(int N)
static inline uint64_t ones(int N)
{
return (N == 64 ? (u_int64_t)-1UL : ((1UL << N) - 1));
return (N == 64 ? -1ULL : (1ULL << N) - 1);
}
/*
@@ -73,49 +74,49 @@ static inline u_int64_t ones(int N)
*/
// 32 bit mask with bits [hi,...,lo] set
static inline u_int32_t mask32(int hi = 31, int lo = 0)
static inline uint32_t mask32(int hi = 31, int lo = 0)
{
int nbits = (hi + 1) - lo;
return ((1 << nbits) - 1) << lo;
}
static inline u_int64_t mask64(int hi = 63, int lo = 0)
static inline uint64_t mask64(int hi = 63, int lo = 0)
{
int nbits = (hi + 1) - lo;
return ((1L << nbits) - 1) << lo;
}
// pick bits [hi,...,lo] from val
static inline u_int32_t pick32(u_int32_t val, int hi = 31, int lo = 0)
static inline uint32_t pick32(uint32_t val, int hi = 31, int lo = 0)
{
return (val & mask32(hi, lo));
}
// pick bits [hi,...,lo] from val
static inline u_int64_t pick64(u_int64_t val, int hi = 31, int lo = 0)
static inline uint64_t pick64(uint64_t val, int hi = 31, int lo = 0)
{
return (val & mask64(hi, lo));
}
// mask [hi,lo] and shift down to start at bit 0
static inline u_int32_t pickbits32(u_int32_t val, int hi = 31, int lo = 0)
static inline uint32_t pickbits32(uint32_t val, int hi = 31, int lo = 0)
{
return (pick32(val, hi, lo) >> lo);
}
// mask [hi,lo] and shift down to start at bit 0
static inline u_int64_t pickbits64(u_int64_t val, int hi = 63, int lo = 0)
static inline uint64_t pickbits64(uint64_t val, int hi = 63, int lo = 0)
{
return (pick64(val, hi, lo) >> lo);
}
// result<0> to val<N>
static inline u_int64_t pickbit(u_int64_t val, int N)
static inline uint64_t pickbit(uint64_t val, int N)
{
return pickbits64(val, N, N);
}
static inline u_int32_t uimm(u_int32_t val, int hi, int lo)
static inline uint32_t uimm(uint32_t val, int hi, int lo)
{
return pickbits32(val, hi, lo);
}
@@ -123,11 +124,11 @@ static inline u_int32_t uimm(u_int32_t val, int hi, int lo)
// SPEC bits(M*N) Replicate(bits(M) x, integer N);
// this is just an educated guess
u_int64_t replicate(u_int64_t bits, int nbits, int count)
uint64_t replicate(uint64_t bits, int nbits, int count)
{
u_int64_t result = 0;
uint64_t result = 0;
// nbits may be 64 in which case we want mask to be -1
u_int64_t mask = ones(nbits);
uint64_t mask = ones(nbits);
for (int i = 0; i < count ; i++) {
result <<= nbits;
result |= (bits & mask);
@@ -140,24 +141,24 @@ u_int64_t replicate(u_int64_t bits, int nbits, int count)
// encoding must be treated as an UNALLOC instruction
// construct a 32 bit immediate value for a logical immediate operation
int expandLogicalImmediate(u_int32_t immN, u_int32_t immr,
u_int32_t imms, u_int64_t &bimm)
int expandLogicalImmediate(uint32_t immN, uint32_t immr,
uint32_t imms, uint64_t &bimm)
{
int len; // ought to be <= 6
u_int32_t levels; // 6 bits
u_int32_t tmask_and; // 6 bits
u_int32_t wmask_and; // 6 bits
u_int32_t tmask_or; // 6 bits
u_int32_t wmask_or; // 6 bits
u_int64_t imm64; // 64 bits
u_int64_t tmask, wmask; // 64 bits
u_int32_t S, R, diff; // 6 bits?
int len; // ought to be <= 6
uint32_t levels; // 6 bits
uint32_t tmask_and; // 6 bits
uint32_t wmask_and; // 6 bits
uint32_t tmask_or; // 6 bits
uint32_t wmask_or; // 6 bits
uint64_t imm64; // 64 bits
uint64_t tmask, wmask; // 64 bits
uint32_t S, R, diff; // 6 bits?
if (immN == 1) {
len = 6; // looks like 7 given the spec above but this cannot be!
} else {
len = 0;
u_int32_t val = (~imms & 0x3f);
uint32_t val = (~imms & 0x3f);
for (int i = 5; i > 0; i--) {
if (val & (1 << i)) {
len = i;
@@ -170,7 +171,7 @@ int expandLogicalImmediate(u_int32_t immN, u_int32_t immr,
// for valid inputs leading 1s in immr must be less than leading
// zeros in imms
int len2 = 0; // ought to be < len
u_int32_t val2 = (~immr & 0x3f);
uint32_t val2 = (~immr & 0x3f);
for (int i = 5; i > 0; i--) {
if (!(val2 & (1 << i))) {
len2 = i;
@@ -199,12 +200,12 @@ int expandLogicalImmediate(u_int32_t immN, u_int32_t immr,
for (int i = 0; i < 6; i++) {
int nbits = 1 << i;
u_int64_t and_bit = pickbit(tmask_and, i);
u_int64_t or_bit = pickbit(tmask_or, i);
u_int64_t and_bits_sub = replicate(and_bit, 1, nbits);
u_int64_t or_bits_sub = replicate(or_bit, 1, nbits);
u_int64_t and_bits_top = (and_bits_sub << nbits) | ones(nbits);
u_int64_t or_bits_top = (0 << nbits) | or_bits_sub;
uint64_t and_bit = pickbit(tmask_and, i);
uint64_t or_bit = pickbit(tmask_or, i);
uint64_t and_bits_sub = replicate(and_bit, 1, nbits);
uint64_t or_bits_sub = replicate(or_bit, 1, nbits);
uint64_t and_bits_top = (and_bits_sub << nbits) | ones(nbits);
uint64_t or_bits_top = (0 << nbits) | or_bits_sub;
tmask = ((tmask
& (replicate(and_bits_top, 2 * nbits, 32 / nbits)))
@@ -218,12 +219,12 @@ int expandLogicalImmediate(u_int32_t immN, u_int32_t immr,
for (int i = 0; i < 6; i++) {
int nbits = 1 << i;
u_int64_t and_bit = pickbit(wmask_and, i);
u_int64_t or_bit = pickbit(wmask_or, i);
u_int64_t and_bits_sub = replicate(and_bit, 1, nbits);
u_int64_t or_bits_sub = replicate(or_bit, 1, nbits);
u_int64_t and_bits_top = (ones(nbits) << nbits) | and_bits_sub;
u_int64_t or_bits_top = (or_bits_sub << nbits) | 0;
uint64_t and_bit = pickbit(wmask_and, i);
uint64_t or_bit = pickbit(wmask_or, i);
uint64_t and_bits_sub = replicate(and_bit, 1, nbits);
uint64_t or_bits_sub = replicate(or_bit, 1, nbits);
uint64_t and_bits_top = (ones(nbits) << nbits) | and_bits_sub;
uint64_t or_bits_top = (or_bits_sub << nbits) | 0;
wmask = ((wmask
& (replicate(and_bits_top, 2 * nbits, 32 / nbits)))
@@ -248,9 +249,9 @@ static void initLITables()
{
li_table_entry_count = 0;
for (unsigned index = 0; index < LI_TABLE_SIZE; index++) {
u_int32_t N = uimm(index, 12, 12);
u_int32_t immr = uimm(index, 11, 6);
u_int32_t imms = uimm(index, 5, 0);
uint32_t N = uimm(index, 12, 12);
uint32_t immr = uimm(index, 11, 6);
uint32_t imms = uimm(index, 5, 0);
if (expandLogicalImmediate(N, immr, imms, LITable[index])) {
InverseLITable[li_table_entry_count].immediate = LITable[index];
InverseLITable[li_table_entry_count].encoding = index;
@@ -264,12 +265,12 @@ static void initLITables()
// public APIs provided for logical immediate lookup and reverse lookup
u_int64_t logical_immediate_for_encoding(u_int32_t encoding)
uint64_t logical_immediate_for_encoding(uint32_t encoding)
{
return LITable[encoding];
}
u_int32_t encoding_for_logical_immediate(u_int64_t immediate)
uint32_t encoding_for_logical_immediate(uint64_t immediate)
{
struct li_pair pair;
struct li_pair *result;
@@ -293,15 +294,15 @@ u_int32_t encoding_for_logical_immediate(u_int64_t immediate)
// fpimm[3:0] = fraction (assuming leading 1)
// i.e. F = s * 1.f * 2^(e - b)
u_int64_t fp_immediate_for_encoding(u_int32_t imm8, int is_dp)
uint64_t fp_immediate_for_encoding(uint32_t imm8, int is_dp)
{
union {
float fpval;
double dpval;
u_int64_t val;
uint64_t val;
};
u_int32_t s, e, f;
uint32_t s, e, f;
s = (imm8 >> 7 ) & 0x1;
e = (imm8 >> 4) & 0x7;
f = imm8 & 0xf;
@@ -329,7 +330,7 @@ u_int64_t fp_immediate_for_encoding(u_int32_t imm8, int is_dp)
return val;
}
u_int32_t encoding_for_fp_immediate(float immediate)
uint32_t encoding_for_fp_immediate(float immediate)
{
// given a float which is of the form
//
@@ -341,10 +342,10 @@ u_int32_t encoding_for_fp_immediate(float immediate)
union {
float fpval;
u_int32_t val;
uint32_t val;
};
fpval = immediate;
u_int32_t s, r, f, res;
uint32_t s, r, f, res;
// sign bit is 31
s = (val >> 31) & 0x1;
// exponent is bits 30-23 but we only want the bottom 3 bits

View File

@@ -46,9 +46,9 @@
* encoding then a map lookup will return 0xffffffff.
*/
u_int64_t logical_immediate_for_encoding(u_int32_t encoding);
u_int32_t encoding_for_logical_immediate(u_int64_t immediate);
u_int64_t fp_immediate_for_encoding(u_int32_t imm8, int is_dp);
u_int32_t encoding_for_fp_immediate(float immediate);
uint64_t logical_immediate_for_encoding(uint32_t encoding);
uint32_t encoding_for_logical_immediate(uint64_t immediate);
uint64_t fp_immediate_for_encoding(uint32_t imm8, int is_dp);
uint32_t encoding_for_fp_immediate(float immediate);
#endif // _IMMEDIATE_H

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -168,7 +168,7 @@ void InterpreterMacroAssembler::get_unsigned_2_byte_index_at_bcp(
}
void InterpreterMacroAssembler::get_dispatch() {
unsigned long offset;
uint64_t offset;
adrp(rdispatch, ExternalAddress((address)Interpreter::dispatch_table()), offset);
lea(rdispatch, Address(rdispatch, offset));
}
@@ -765,7 +765,7 @@ void InterpreterMacroAssembler::lock_object(Register lock_reg)
// copy
mov(rscratch1, sp);
sub(swap_reg, swap_reg, rscratch1);
ands(swap_reg, swap_reg, (unsigned long)(7 - os::vm_page_size()));
ands(swap_reg, swap_reg, (uint64_t)(7 - os::vm_page_size()));
// Save the test result, for recursive case, the result is zero
str(swap_reg, Address(lock_reg, mark_offset));

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -346,7 +346,7 @@ class SlowSignatureHandler
if (_num_fp_args < Argument::n_float_register_parameters_c) {
*_fp_args++ = from_obj;
*_fp_identifiers |= (1 << _num_fp_args); // mark as double
*_fp_identifiers |= (1ull << _num_fp_args); // mark as double
_num_fp_args++;
} else {
*_to++ = from_obj;
@@ -382,7 +382,7 @@ JRT_ENTRY(address,
// handle arguments
SlowSignatureHandler ssh(m, (address)from, to);
ssh.iterate(UCONST64(-1));
ssh.iterate((uint64_t)CONST64(-1));
// return result handler
return Interpreter::result_handler(m->result_type());

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -73,7 +73,7 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) {
Label slow;
unsigned long offset;
uint64_t offset;
__ adrp(rcounter_addr,
SafepointSynchronize::safepoint_counter_addr(), offset);
Address safepoint_counter_addr(rcounter_addr, offset);
@@ -88,7 +88,7 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) {
// Check to see if a field access watch has been set before we
// take the fast path.
unsigned long offset2;
uint64_t offset2;
__ adrp(result,
ExternalAddress((address) JvmtiExport::get_field_access_count_addr()),
offset2);

View File

@@ -21,7 +21,8 @@
* questions.
*/
#include "jvmci/jvmciCodeInstaller.hpp"
#include "jvmci/jvmci.hpp"
#include "jvmci/jvmciCodeInstaller.hpp"
#include "jvmci/jvmciRuntime.hpp"
#include "jvmci/jvmciCompilerToVM.hpp"
#include "jvmci/jvmciJavaClasses.hpp"
@@ -72,12 +73,12 @@ void CodeInstaller::pd_patch_MetaspaceConstant(int pc_offset, JVMCIObject consta
if (jvmci_env()->get_HotSpotMetaspaceConstantImpl_compressed(constant)) {
narrowKlass narrowOop = record_narrow_metadata_reference(_instructions, pc, constant, JVMCI_CHECK);
MacroAssembler::patch_narrow_klass(pc, narrowOop);
TRACE_jvmci_3("relocating (narrow metaspace constant) at " PTR_FORMAT "/0x%x", p2i(pc), narrowOop);
JVMCI_event_3("relocating (narrow metaspace constant) at " PTR_FORMAT "/0x%x", p2i(pc), narrowOop);
} else {
NativeMovConstReg* move = nativeMovConstReg_at(pc);
void* reference = record_metadata_reference(_instructions, pc, constant, JVMCI_CHECK);
move->set_data((intptr_t) reference);
TRACE_jvmci_3("relocating (metaspace constant) at " PTR_FORMAT "/" PTR_FORMAT, p2i(pc), p2i(reference));
JVMCI_event_3("relocating (metaspace constant) at " PTR_FORMAT "/" PTR_FORMAT, p2i(pc), p2i(reference));
}
}
@@ -88,7 +89,7 @@ void CodeInstaller::pd_patch_DataSectionReference(int pc_offset, int data_offset
|| (NativeInstruction::maybe_cpool_ref(pc))) {
address dest = _constants->start() + data_offset;
_instructions->relocate(pc, section_word_Relocation::spec((address) dest, CodeBuffer::SECT_CONSTS));
TRACE_jvmci_3("relocating at " PTR_FORMAT " (+%d) with destination at %d", p2i(pc), pc_offset, data_offset);
JVMCI_event_3("relocating at " PTR_FORMAT " (+%d) with destination at %d", p2i(pc), pc_offset, data_offset);
} else {
JVMCI_ERROR("unknown load or move instruction at " PTR_FORMAT, p2i(pc));
}
@@ -115,7 +116,7 @@ void CodeInstaller::pd_relocate_ForeignCall(NativeInstruction* inst, jlong forei
} else {
JVMCI_ERROR("unknown call or jump instruction at " PTR_FORMAT, p2i(pc));
}
TRACE_jvmci_3("relocating (foreign call) at " PTR_FORMAT, p2i(inst));
JVMCI_event_3("relocating (foreign call) at " PTR_FORMAT, p2i(inst));
}
void CodeInstaller::pd_relocate_JavaMethod(CodeBuffer &cbuf, JVMCIObject hotspot_method, jint pc_offset, JVMCI_TRAPS) {

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