Compare commits

...

197 Commits

Author SHA1 Message Date
Vitaly Provodin
ec04f240d0 updated JTreg exclude list 2020-05-28 11:43:10 +07:00
Tejpal Rebari
7f16bf3d2a 8233559: [TESTBUG] TestNimbusOverride.java is failing on macos
Reviewed-by: psadhukhan, pbansal
2020-05-27 13:05:35 +07:00
Vyacheslav Moklev
01b1e43caf JBR-1274 Common Item Dialog sometimes crash the process
Prevent from freeing memory with CoTaskMemFree twice

(cherry picked from commit 94c75b0537)
2020-05-27 00:13:52 +03:00
Vyacheslav Moklev
a088ea7a22 JBR-1273 Common Item Dialog does not open when wrong path to directory is passed
Handle set directory / set file properly

(cherry picked from commit bff7dfddfb)
2020-05-26 23:48:46 +03:00
Vyacheslav Moklev
0e6072ffc4 JBR-1271 Wrong parent of native windows dialogs
Set a proper parent to a dialog window

(cherry picked from commit 6ecbc2736b)
2020-05-26 23:47:27 +03:00
Vyacheslav Moklev
fd420cda55 JBR-1269 Common Item Dialog does not appear on Alt+Tab or click in windows toolbar
JBR-1270 Common Item Dialog does not have an icon

Select a proper window handle

(cherry picked from commit 8cde9502f1)
2020-05-26 23:47:09 +03:00
Vyacheslav Moklev
8efe07ac52 JBR-1258 CommonItemDialog ignores directory to open
Fix parsing of directory path / file path

(cherry picked from commit 04112e6f90)
2020-05-26 23:37:46 +03:00
Vyacheslav Moklev
f685f2dac1 JBR-1257 CommonItemDialog modal window has no owner
Fix modality for Common Item Dialog

(cherry picked from commit e0c79eb54f)
2020-05-26 23:36:03 +03:00
Vyacheslav Moklev
5505211785 JRE-1216 Implement Windows native file dialogs with the new Common Item Dialog API
Add implementation of file dialogs with the new Common Items Dialog API

(cherry picked from commit 764909ce2a)
Also fixed memory leak of fileBuffer
2020-05-26 23:35:05 +03:00
Vitaly Provodin
feacdbe1ed updated JTreg exclude list 2020-05-23 07:06:28 +07:00
Eugene Petrenko
bd239e2e67 cds - add more logging to -Xshare:dump errors
log exception along with "Preload Warning: Verification failed" warning messages
advanced debug logging to diagnose listed class was not defined error from -Xshare:dump
more detailed error logging from the Xshare:dump phase

(cherry picked from commit 82dcb03358)
2020-05-22 18:20:11 +03:00
Vitaly Provodin
0baf10364a updated JTreg exclude list 2020-05-22 18:20:38 +07:00
Prasanta Sadhukhan
2e2fe0daa7 8239312: [macos] javax/swing/JFrame/NSTexturedJFrame/NSTexturedJFrame.java
Reviewed-by: serb
2020-05-22 18:19:48 +07:00
Sergey Bylokhov
6cab3cee0d 8235153: [TESTBUG] [macos 10.15] java/awt/Graphics/DrawImageBG/SystemBgColorTest.java fails
Reviewed-by: aivanov
2020-05-22 18:19:48 +07:00
Phil Race
48607c2bd8 8223935: PIT: java/awt/font/WindowsIndicFonts.java fails on windows10
Reviewed-by: serb, jdv
2020-05-22 18:18:25 +07:00
Eugene Petrenko
1d90a4efaf cds - log exception along with "Preload Warning: Verification failed" warning messages
(cherry picked from commit c3839647c6)
2020-05-21 20:59:18 +03:00
Vitaly Provodin
61315cec50 updated JTreg exclude list 2020-05-20 06:06:45 +07:00
Vitaly Provodin
6c277514cd JBR-2395 eliminate JavaFX from JBR (follow up x64 packaging) 2020-05-20 05:49:36 +07:00
Vitaly Provodin
b3f7acae0e JBR-2409 fix prameters for configure 2020-05-19 18:11:04 +07:00
Vitaly Provodin
d3d647482c JBR-2395 eliminate JavaFX from JBR (fix misprint) 2020-05-19 18:10:05 +07:00
Vitaly Provodin
a438190dd0 add git into image for Linux x86 2020-05-19 18:10:04 +07:00
Vitaly Provodin
077c459a42 JDK14: exclude dependencies on jcef in x86, fastdebug builds 2020-05-19 18:10:04 +07:00
Vitaly Provodin
88a9f6aac1 add docker files for Linux x64 and x86 2020-05-17 20:02:17 +07:00
Vitaly Provodin
77edf91292 8234596 remove of Pack200 Tools and API 2020-05-17 05:30:19 +07:00
Vitaly Provodin
1871da9d1c JBR-2395 eliminate JavaFX from JBR 2020-05-17 05:30:19 +07:00
Vitaly Provodin
b63167860a JBR-2396 fix CONF names 2020-05-17 05:30:19 +07:00
Vitaly Provodin
de199a7120 JBR-2394 replace --disable-debug-symbols with --with-native-debug-symbols=none 2020-05-17 05:30:19 +07:00
Vitaly Provodin
862d57aa49 add exec permitions to configure 2020-05-15 12:10:04 +07:00
Vitaly Provodin
405c69f3cb split checkout before building JBR+JFX or JBR+JCEF on two separate commands 2020-05-15 12:08:17 +07:00
Vitaly Provodin
d461bf7869 change BOOT_JDK, fix target names 2020-05-15 12:03:15 +07:00
Vitaly Provodin
9fa51d6334 change BOOT_JDK 2020-05-15 11:40:30 +07:00
Vitaly Provodin
69e522b1c6 JBR-2291 add vendor info into bundles 2020-05-15 11:38:10 +07:00
Vitaly Provodin
3105f0cd04 JBR-2324 address new layout in mac jcef 80.0.4+g74f7b0c+chromium-80.0.3987.122 2020-05-15 09:57:24 +07:00
Vitaly Provodin
59ce59ba82 JBR-2320 add jdk.attach module into JBR 2020-05-15 09:57:24 +07:00
Vitaly Provodin
8ca73521c2 JBR-2217 provide JCEF-only (no JavaFX) bundle for master/202 branches 2020-05-15 09:57:24 +07:00
Vitaly Provodin
d0f24cad2c JBR-2212 add scripts for linux_x86, linux_aarch64, linux_x64_fastdebug, osx_fastdebug, windows_x86 2020-05-15 09:57:24 +07:00
Vitaly Provodin
f7909316f1 JBR-1643 fix intermittent fialures of Windows builds at make/Init.gmk:304
combine images and test-image into one make invocation
2020-05-15 09:57:23 +07:00
Vitaly Provodin
d900c998b4 JBR-2181 create two separate JBR bundles with JFX and JFX+JCEF 2020-05-15 09:57:23 +07:00
Vitaly Provodin
18ce94e157 JBR-2148 modify signapp&build scripts to match to the new layout 2020-05-15 09:57:23 +07:00
Vitaly Provodin
768cbfdb61 JBR-2084 modify scripts to sign Contents/MacOS/libjli.dylib as a a normal file 2020-05-15 09:57:23 +07:00
Vitaly Provodin
7cb7464329 JBR-1821 notarize JBR bundles as a standalone app 2020-05-15 09:57:23 +07:00
Vitaly Provodin
ab19e95c30 JBR-2162 move building scripts from TC to JBR repo 2020-05-15 09:57:23 +07:00
Anton Tarasov
b8a4deee83 JBR-2016 add jcef module and export some sun.* packages to it 2020-05-15 09:57:23 +07:00
Vitaly Provodin
4de7d27f51 JBR-2014 add jdk.hotspot.agent module to jbr 2020-05-15 09:57:22 +07:00
Vitaly Provodin
ddab99867f JBR-1286 add jdk.compiler into JBR 2020-05-15 09:57:22 +07:00
Vitaly Provodin
57a54f2c11 JBR-1199 add JBR modules list for jlink 2020-05-15 09:57:17 +07:00
Jesper Wilhelmsson
5ed4b9f2c0 Added tag jdk-14+36 for changeset bc54620a3848 2020-02-07 00:17:01 +01:00
Naoto Sato
ae39310243 8238605: Correct the CLDR version number in cldr.md files
Reviewed-by: joehw, alanb
2020-02-06 10:10:54 -08:00
Jesper Wilhelmsson
c63a8d1090 Added tag jdk-14+35 for changeset 4a87bb7ebfd7 2020-02-06 02:52:17 +01:00
Roland Westrelin
ba7d18db86 8237776: Shenandoah: Wrong result with Lucene test
Reviewed-by: rkennke, zgu, shade
2020-01-31 14:36:07 +01:00
Leo Jiang
9ec5da00bc 8238377: JDK 14 L10N resource file update - msgdrop 20
Reviewed-by: naoto, herrick, mchung
2020-02-04 16:26:54 +00:00
Brian Burkhalter
7db8a1762f 8237514: Spec Clarification - ByteBuffer::alignmentOffset Spec
Reviewed-by: alanb, psandoz
2020-01-31 08:04:11 -08:00
Markus Grönlund
953fbd2e66 8236743: JFR: assert(klass != __null) failed: invariant in ObjectSampleCheckpoint::add_to_leakp_set
Reviewed-by: egahlin
2020-01-31 12:17:55 +01:00
Jerry Zhou
5495efdb84 8236092: Remove EA from JDK 14 version string starting with Initial RC promotion
Reviewed-by: tbell, erikj
2020-01-30 18:02:39 +01:00
Jesper Wilhelmsson
06bf842d9a Added tag jdk-14+34 for changeset a96bc204e3b3 2020-01-30 03:23:28 +01:00
Andy Herrick
cdd3cc4a0b 8238168: Remove Copyright from WinLauncher.template
Reviewed-by: kcr, prr, asemenyuk
2020-01-29 14:35:04 -05:00
Vicente Romero
c2e69df562 8235778: No compilation error reported when a record is declared in a local class
Reviewed-by: mcimadamore
2020-01-27 23:06:46 -05:00
David Holmes
8c33bba226 8237918: Bad copyright line in a hotspot test
Reviewed-by: jjg
2020-01-27 20:01:35 -05:00
Jonathan Gibbons
cdedede9ca 8237916: Bad copyright line in a jshell source file
Reviewed-by: vromero
2020-01-27 16:19:25 -08:00
Roger Riggs
933bb55c49 8237651: Clarify initialization of jdk.serialFilter
Reviewed-by: bchristi
2020-01-27 08:36:55 -05:00
Roger Riggs
42726a87e9 8215361: (doc) Cleanup package-info markup - smartcardio, java.sql, java.sql.rowset
Reviewed-by: lancea, prappo, naoto
2020-01-24 14:32:04 -05:00
Roger Riggs
2760497b01 8237368: Problem with NullPointerException in RMI TCPEndpoint.read
Reviewed-by: mchung, alanb
2020-01-24 13:33:31 -05:00
Alexander Matveev
f8f98bdbff 8237607: [macos] Signing app bundle with jpackage fails if runtime is already signed
Reviewed-by: herrick, asemenyuk, kcr
2020-01-24 11:24:28 -05:00
Brian Burkhalter
f4f7dbd54c 8225471: Test utility jdk.test.lib.util.FileUtils.areAllMountPointsAccessible needs to tolerate duplicates
Reviewed-by: alanb
2020-01-23 10:19:32 -08:00
Tom Rodriguez
2f2594d5d0 8231515: [Graal] Crash during exception throwing in InterpreterRuntime::resolve_invoke
Reviewed-by: kvn, dlong, iveresov
2020-01-23 08:43:22 -08:00
Jesper Wilhelmsson
4df9b91002 Added tag jdk-14+33 for changeset f728b6c7f491 2020-01-23 02:36:42 +01:00
Leo Jiang
b94b082727 8237465: JDK 14 L10n resource files update - msg drop 10
Reviewed-by: naoto
2020-01-22 22:37:36 +08:00
Zhengyu Gu
9d4f3b2c2c 8237396: JvmtiTagMap::weak_oops_do() should not trigger barriers
Reviewed-by: stefank, rkennke
2020-01-22 07:40:11 -05:00
Thomas Schatzl
e3c7f43298 8235305: Corrupted oops embedded in nmethods due to parallel modification during optional evacuation
During optional evacuation it is possible that G1 modifies oops embedded in nmethods in parallel. One source are oop* gathered by a previous evacuation phase in the optional roots, the other the region's strong code roots list. Since these oops may be unaligned on x64, this can result in them being corrupted. The fix is to not gather embedded oops in the optional roots list as the strong code roots list contains them already.

Co-authored-by: Erik Osterlund <erik.osterlund@oracle.com>
Co-authored-by: Stefan Johansson <stefan.johansson@oracle.com>
Co-authored-by: Stefan Karlsson <stefan.karlsson@oracle.com>
Reviewed-by: sjohanss, stefank
2020-01-22 10:00:13 +01:00
Zhengyu Gu
f7165c322a 8237392: Shenandoah: Remove unreliable assertion
Reviewed-by: shade
2020-01-16 16:30:20 -05:00
Sangheon Kim
c26aa638a1 8234173: assert(loader != __null && oopDesc::is_oop(loader)) failed: loader must be oop
Reviewed-by: kbarrett, egahlin, tschatzl
2020-01-16 13:19:55 -08:00
Zhengyu Gu
85255c54da 8237369: Shenandoah: failed vmTestbase/nsk/jvmti/AttachOnDemand/attach021/TestDescription.java test
Reviewed-by: rkennke
2020-01-16 14:22:35 -05:00
Maurizio Cimadamore
96f5699e92 8237370: Javadoc of memory access API still refers to old MemoryAddress::offset method
Reviewed-by: chegar
2020-01-16 17:25:04 +00:00
Maurizio Cimadamore
af5ff9aeee 8237348: Javadoc of MemorySegment::allocateNative should state that memory is zero-initialized8237348: Javadoc of MemorySegment::allocateNative should state that memory is zero-initialized
Reviewed-by: chegar, jlaskey
2020-01-16 14:55:26 +00:00
Hannes Wallnöfer
5903e20af2 8224052: Javadoc doesn't handle non-public intermediate types well
Reviewed-by: jjg
2020-01-16 15:50:23 +01:00
Roland Westrelin
995fae6d4b 8235584: UseProfiledLoopPredicate fails with assert(_phase->get_loop(c) == loop) failed: have to be in the same loop
Reviewed-by: thartmann, neliasso
2020-01-10 17:50:51 +01:00
Fei Yang
e3eb6dbd1f 8235762: JVM crash in SWPointer during C2 compilation
Reviewed-by: thartmann, chagedorn, neliasso
2020-01-09 19:12:16 +08:00
Sergey Bylokhov
b95d34698e 8236953: [macos] JavaFX SwingNode is not rendered on macOS
Reviewed-by: kcr, prr
2020-01-15 13:17:46 -08:00
Jesper Wilhelmsson
b4ba74321b Added tag jdk-14+32 for changeset 2776da28515e 2020-01-16 02:56:52 +01:00
Daniel Le Duc Khoi Nguyen
f0c804676c 8233680: JavacFileManager.close() doesn't clear some cache instance variables
Reviewed-by: jjg
2020-01-15 14:02:50 -08:00
Vladimir Kozlov
bdc9d3dee2 8236726: Put vmTestbase/vm/mlvm/indy/stress/java tests on AOT Problem list
Reviewed-by: iignatyev
2020-01-15 11:04:45 -08:00
Brian Burkhalter
40d0110ac6 8237186: Fix typo in copyright header of java/io/Reader/TransferTo.java
Reviewed-by: mchung, lancea, prappo
2020-01-15 08:21:07 -08:00
Maurizio Cimadamore
099184950b 8235837: Memory access API refinements
Reviewed-by: chegar, psandoz
2020-01-15 11:09:00 +00:00
Jan Lahoda
8787b9a66d 8233655: NPE at jdk.compiler/com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitApply
Ensuring that errors reported during speculative attribution that belong to a different file are not lost.

Reviewed-by: mcimadamore
2020-01-15 11:31:16 +01:00
Joe Darcy
006b5e0f96 8233452: java.math.BigDecimal.sqrt() with RoundingMode.FLOOR results in incorrect result
Reviewed-by: bpb, dfuchs
2020-01-14 20:19:51 -08:00
Henry Jen
643a98d553 Merge 2020-01-15 01:57:30 +00:00
Henry Jen
ae81cfa30f Merge 2020-01-15 01:54:35 +00:00
Brian Burkhalter
a91ec31636 8237183: Bug ID missing for test in patch which fixed JDK-8230665
Reviewed-by: lancea
2020-01-14 17:28:54 -08:00
Jonathan Gibbons
9ec4001d87 8237058: Update all nroff manpages for JDK 14 release
Reviewed-by: dholmes
2020-01-14 15:01:34 -08:00
Bradford Wetmore
0b70f01e98 8236957: Obvious typo in java/security/spec/RSAMultiPrimePrivateCrtKeySpec.java
Reviewed-by: ascarpino
2020-01-14 12:28:15 -08:00
Brian Burkhalter
79ec4004d7 8236661: launcher test PatchSystemModules.java start failing frequently after JDK-8234049
Reviewed-by: alanb, mchung
2020-01-14 11:06:03 -08:00
Brian Burkhalter
03cd98e15b 8230665: (bf spec) ByteBuffer::alignmentOffset spec misleading when address is misaligned
Reviewed-by: alanb, darcy, psandoz
2020-01-14 11:06:00 -08:00
Joe Darcy
72a35c899e 8237062: Refine JSR 269 API ahead of Java SE 14 MR
Reviewed-by: jlahoda
2020-01-14 10:25:22 -08:00
Erik Gahlin
6ee7f3734d 8236691: JFR: assert((((((klass)->trace_id()) & ((JfrTraceIdEpoch::method_and_class_in_use_this_epoch_bits()))) != 0))) failed: invariant
Reviewed-by: mgronlun
2020-01-14 15:25:17 +01:00
Vicente Romero
5ff1d72185 8236005: local records shouldn't capture any non-static state from any enclosing type
Reviewed-by: mcimadamore
2020-01-14 07:07:43 -05:00
Jie Fu
6d03f918cf 8237055: [TESTBUG] compiler/c2/TestJumpTable.java fails with release VMs
Reviewed-by: thartmann
2020-01-14 18:07:45 +08:00
Jan Lahoda
a35d087f54 8236670: Conflicting bindings accepted in some cases
Reviewed-by: mcimadamore
2020-01-14 11:10:07 +01:00
Jatin Bhateja
eccf39b295 8236443: Issues with specializing vector register type for phi operand with generic operands
Fix special handling for operand resolution of vectorshift and shiftcount nodes. Fix for crash in the resolution algorithm due to non-machine type nodes.

Reviewed-by: vlivanov
2020-01-14 10:55:11 +05:30
Ivan Gerasimov
1507a1fb67 8234423: Modifying ArrayList.subList().subList() resets modCount of subList
Reviewed-by: rriggs
2020-01-13 18:00:32 -08:00
Zhengyu Gu
27d782be64 8237038: Shenandoah: Reduce thread pool size in TestEvilSyncBug.java test
Reviewed-by: shade
2020-01-13 13:53:37 -05:00
Alex Kasko
87c5a28403 8236125: Windows (MSVC 2013) build fails in jpackage: Need to include strsafe.h after tchar.h
Reviewed-by: shade, alanb, herrick, prr
2020-01-13 18:39:51 +01:00
Athijegannathan Sundararajan
72db22cb12 8222100: tools/jimage/JImageTest.java time out
Reviewed-by: jlaskey
2020-01-13 22:45:41 +05:30
Sandhya Viswanathan
0b5f4f77e4 8236944: The legVecZ operand should be limited to zmm0-zmm15 registers
Associate legVecZ operand with vectorz_reg_legacy register class

Reviewed-by: vlivanov, thartmann
2020-01-13 08:27:38 -08:00
Henry Jen
231d9afe6f Merge 2020-01-09 20:16:21 +00:00
Thomas Schatzl
89f2d14518 8235934: gc/g1/TestGCLogMessages.java fails with 'DerivedPointerTable Update' found
Fix determining whether C2 or JVMCI are enabled in the test.

Reviewed-by: sjohanss, kbarrett
2020-01-08 14:36:48 +01:00
Kim Barrett
ef5b447b04 8235751: Assertion when triggering concurrent cycle during shutdown
Skip initial mark during shutdown and don't assert when that happens.

Reviewed-by: sjohanss, tschatzl
2020-01-07 17:28:42 -05:00
Serguei Spitsyn
4e29c964f9 8236124: Minimal VM slowdebug build failed after JDK-8212160
Use macro JVMTI_ONLY to avoid slowdebug build fail

Reviewed-by: coleenp, cjplummer, dholmes
2020-01-07 21:36:10 +00:00
Joe Darcy
03073cd46d 8234783: Improve wording of spec of Record.equals
Reviewed-by: jjg, vromero
2020-01-07 10:22:06 -08:00
Joe Darcy
af4ad226c8 8236695: java.lang.Record should be declared with an explicit constructor
Reviewed-by: psandoz, chegar
2020-01-07 09:17:51 -08:00
Christian Hagedorn
3e9a17c53e 8235984: C2: assert(out->in(PhiNode::Region) == head || out->in(PhiNode::Region) == slow_head) failed: phi must be either part of the slow or the fast loop
Bailout from loop unswitching if loop predicates have a control dependency to partially peeled statements.

Reviewed-by: neliasso, thartmann
2020-01-07 17:06:10 +01:00
Igor Veresov
cc99075c79 8236050: Some compiler tests fail when executed with custom TieredLevel
Make sure TieredStopAtLevel is properly supported for different compilation modes

Reviewed-by: redestad, thartmann
2020-01-07 07:31:28 -08:00
Vicente Romero
50a56141ba 8234445: spurious error message for record constructors with receiver parameters
Reviewed-by: mcimadamore
2020-01-07 09:21:07 -05:00
Vicente Romero
320d4b7f72 8236266: change error message for the case when a class extends j.l.Record
Reviewed-by: mcimadamore
2020-01-07 09:10:14 -05:00
Vicente Romero
aa3a79a29b 8236544: confusing error message: return type of accessor method is not compatible with type of record component
Reviewed-by: mcimadamore
2020-01-07 09:08:31 -05:00
Jim Laskey
0cb75321ef 8233751: StringBuilder / StringBuffer capacity() doc is misleading
Reviewed-by: bchristi
2020-01-07 09:03:00 -04:00
Naoto Sato
e72f6028fb 8236495: open/test/jdk/java/util/Locale/LocaleProvidersRun.java failed on mac 10.14 with de_DE locale
Reviewed-by: lancea, clanger
2020-01-06 17:23:57 -08:00
Sergey Bylokhov
151ab6acc1 8236545: Compilation error in mach5 java/awt/FileDialog/MacOSGoToFolderCrash.java
Reviewed-by: dmarkov
2020-01-03 13:40:33 -08:00
Matthias Baesken
44f7fe57a8 8236617: jtreg test containers/docker/TestMemoryAwareness.java fails after 8226575
Reviewed-by: bobv, clanger, mdoerr
2020-01-03 11:10:42 +01:00
Patric Hedlin
9549cd2877 8235870: C2 crashes in IdealLoopTree::est_loop_flow_merge_sz()
Reviewed-by: thartmann
2020-01-13 11:26:44 +01:00
Tobias Hartmann
ea152dcd9b 8229855: C2 fails with assert(false) failed: bad AD file
Strengthen the check to ensure that both control and data paths die consistently.

Reviewed-by: vlivanov, roland
2020-01-13 13:37:01 +01:00
Jan Lahoda
8e2c1c68f6 8236546: Yield with boolean expression and Object target type crashes javac
The whenTrue and whenFalse sets need to be merged for non-boolean expressions.

Reviewed-by: mcimadamore
2020-01-13 10:50:31 +01:00
Jan Lahoda
6fc159f17c 8236715: JShell: Records with errors are not properly corraled
Correctly corralling record classes, and providing correct messages to the user.

Reviewed-by: rfield, vromero
2020-01-13 10:49:58 +01:00
Nick Gasson
2afe1c6c23 8236634: Memory Access API tests fail on 32-bit
Reviewed-by: mcimadamore, shade
2020-01-13 15:31:23 +08:00
Athijegannathan Sundararajan
34b9c84af4 8222098: tools/jlink/plugins/IncludeLocalesPluginTest.java time out
Reviewed-by: jlaskey, naoto
2020-01-13 08:29:32 +05:30
Aleksey Shipilev
fca022b43b 8236936: x86_32 Minimal VM build failure after JDK-8230765
Reviewed-by: iklam, zgu
2020-01-12 12:09:29 +01:00
Vicente Romero
4692bc58eb 8236841: compact constructor parameters are always final
Reviewed-by: mcimadamore
2020-01-10 15:32:04 -05:00
Erik Gahlin
2c7c8023ed 8236263: Remove experimental streaming events
Reviewed-by: rehn, mseledtsov
2020-01-10 21:09:53 +01:00
Christoph Dreis
0b542e3bae 8236945: typo "the the" in Lookup::in javadoc
Reviewed-by: mchung
2020-01-10 12:01:21 -08:00
Mandy Chung
fe8e1aacd1 8225773: jdeps --check produces NPE if there are missing module dependences
Reviewed-by: alanb
2020-01-10 11:50:54 -08:00
Mandy Chung
b7e74ef62f 8229396: jdeps ignores multi-release when generate-module-info used on command line
Reviewed-by: alanb
2020-01-10 11:48:16 -08:00
Joe Darcy
78df4d412e 8236877: Add "record" to descriptions in java.lang.{annotation, reflect}
Reviewed-by: mchung, lancea, chegar
2020-01-10 09:15:20 -08:00
Erik Österlund
feccf3cdb6 8235669: G1: Stack walking API can expose AS_NO_KEEPALIVE oops
Reviewed-by: kbarrett, tschatzl
2020-01-10 16:20:31 +00:00
Martin Doerr
89f7e1925e 8236555: [s390] Fix VerifyOops
Reviewed-by: goetz, lucy
2020-01-10 16:30:02 +01:00
Goetz Lindenmaier
d6a2a079d1 8236772: Fix build for windows 32-bit after 8212160 and 8234331
Reviewed-by: clanger
2020-01-08 14:22:30 +01:00
Zhengyu Gu
b81bfcbff1 8236902: Shenandoah: Missing string dedup roots in all root scanner
Reviewed-by: rkennke
2020-01-10 07:21:32 -05:00
Valerie Peng
efc96d1c07 8236897: Fix the copyright header for pkcs11gcm2.h
Add the "Classpath" exception to existing header

Reviewed-by: weijun
2020-01-10 02:52:25 +00:00
Serguei Spitsyn
d94f8c91c9 8229847: AttachProvider javadoc page needs an update
Replace Sun references with Oracle references in AttachProvider javadoc

Reviewed-by: amenkov, dholmes
2020-01-10 01:36:48 +00:00
Brian Burkhalter
d8e3d8af7b 8236804: java/nio/channels/FileChannel/MapWithSecurityManager.java should be run in othervm mode
Reviewed-by: chegar, lancea
2020-01-09 08:31:41 -08:00
Brian Burkhalter
7cd4d9ac6a 8236582: (fc) FileChannel.map fails with InternalError when security manager enabled
Reviewed-by: alanb
2020-01-09 08:31:29 -08:00
Christian Hagedorn
863f741611 8236140: assert(!VerifyHashTableKeys || _hash_lock == 0) failed: remove node from hash table before modifying it
Add missing rehashing for modified node in InitializeNode::complete_stores().

Reviewed-by: neliasso, thartmann
2020-01-09 16:14:14 +01:00
Maurizio Cimadamore
b1df8adbf8 8236779: static field in implementation class erroneously leaking in memory access javadoc
Reviewed-by: chegar
2020-01-09 12:04:22 +00:00
Athijegannathan Sundararajan
6e467d4d02 8225561: jlink --help doesn't state that ALL-MODULE-PATH is accepted for --add-modules
Reviewed-by: alanb
2020-01-09 17:25:05 +05:30
Jesper Wilhelmsson
cd74b2a23d Added tag jdk-14+31 for changeset decd3d2953b6 2020-01-09 02:34:23 +01:00
Jesper Wilhelmsson
0a4d6f6925 Added tag jdk-14+31 for changeset d54ce919da90 2020-01-09 02:31:10 +01:00
Paul Sandoz
e5b0568e1c 8236769: Clarify javadoc of memory access API
Reviewed-by: chegar
2020-01-08 23:12:45 +00:00
Erik Gahlin
0239771501 8236264: Remove jdk.jfr.Recording::setFlushInterval and jdk.jfr.Recording::getFlushInterval
Reviewed-by: rehn, mseledtsov
2020-01-08 22:44:34 +01:00
Anthony Scarpino
7ed4930a8e 8236098: AlgorithmConstraints:permits method not throwing IAEx when primitives are empty
Reviewed-by: xuelei
2020-01-08 13:25:03 -08:00
Roman Kennke
ba6cedcf24 8236732: Shenandoah: Stricter placement for oom-evac scopes
Reviewed-by: zgu
2020-01-07 21:53:52 +01:00
Zhengyu Gu
9e09ba5e13 8236681: Shenandoah: Disable concurrent class unloading flag if no class unloading for the GC cycle
Reviewed-by: rkennke
2020-01-07 08:53:37 -05:00
Roman Kennke
49b1cc8ee6 8236181: C2: Remove useless step_over_gc_barrier() in int->bool conversion
Reviewed-by: thartmann, roland
2020-01-07 13:45:10 +01:00
Jesper Wilhelmsson
39d46a1f76 Added tag jdk-14+30 for changeset d54ce919da90 2020-01-01 03:08:17 +01:00
Jesper Wilhelmsson
44765b8218 Added tag jdk-14+29 for changeset 563fa900fa17 2019-12-27 18:26:17 +01:00
Weijun Wang
e7a07ea2f3 8236470: Deal with ECDSA using ecdsa-with-SHA2 plus hash algorithm as AlgorithmId
Reviewed-by: xuelei
2019-12-25 07:17:25 +08:00
Sandhya Viswanathan
45e4c4c4dc 8236364: TEMP vector registers could be incorrectly assigned upper bank xmm registers after Generic Operands (JDK-8234391)
Reviewed-by: kvn, vlivanov
2019-12-24 16:49:37 +03:00
Yasumasa Suenaga
1e67b2c457 8235637: jhsdb jmap from OpenJDK 11.0.5 doesn't work if prelink is enabled
Error handling for "lib_base_diff == 0"

Reviewed-by: ysuenaga, cjplummer, kevinw
2019-12-24 04:47:44 -05:00
Lance Andersen
da03b15fac 8235961: SyncResolverImpl does not throw SQLException as expected
Reviewed-by: joehw, bpb
2019-12-23 17:18:32 -05:00
Chris Hegarty
417672bc9d 8236441: Bound MulticastSocket fails when setting outbound interface on Windows
Reviewed-by: alanb
2019-12-23 09:17:00 +00:00
Tobias Hartmann
34b08ed2a5 8233164: C2 fails with assert(phase->C->get_alias_index(t) == phase->C->get_alias_index(t_adr)) failed: correct memory chain
Use _src_type/_dest_type as address types for the loads and stores.

Reviewed-by: vlivanov, roland
2019-12-23 09:44:35 +01:00
Markus Grönlund
5acd373a10 8234059: Stress test fails with "Unexpected Exception in thread JFR Event Stream"
Reviewed-by: egahlin
2019-12-21 13:03:02 +01:00
Markus Grönlund
304ab31cff 8233111: Epoch shift synchronization point for Compiler threads
Reviewed-by: egahlin
2019-12-21 12:45:08 +01:00
Roman Kennke
773b7b6c4b 8236106: [TESTBUG] Shenandoah: Make TestThreadFailure more resilient
Reviewed-by: zgu
2019-12-17 18:23:33 +01:00
Aditya Mandaleeka
950ebec4a9 8236179: C1 register allocation error with T_ADDRESS
Reviewed-by: rkennke, vlivanov, roland, mdoerr
2019-12-20 19:51:00 +01:00
Goetz Lindenmaier
51abf67ce1 8235998: [c2] Memory leaks during tracing after '8224193: stringStream should not use Resource Area'
Reviewed-by: dholmes, kvn
2019-12-16 14:10:20 +01:00
John Jiang
4deb35453f 8234727: sun/security/ssl/X509TrustManagerImpl tests support TLSv1.3
Reviewed-by: xuelei
2019-12-21 06:28:48 +08:00
Mikael Vidstedt
59216c2e77 8236449: Problem list compiler/jsr292/ContinuousCallSiteTargetChange.java on solaris-sparcv9
Reviewed-by: iignatyev
2019-12-20 14:04:40 -08:00
Stefan Johansson
8d00c5aa0d 8235119: Incomplete initialization of scan_top values results in out-of-bounds scanning of regions
Reviewed-by: kbarrett, tschatzl, sangheki
2019-12-20 09:42:38 -08:00
Markus Grönlund
ffdf1dea9b 8235390: JfrEmergencyDump::on_vm_shutdown crashes
Reviewed-by: egahlin
2019-12-20 16:04:34 +01:00
Igor Veresov
261f4bffae 8235927: Update Graal
Reviewed-by: kvn
2019-12-19 15:13:24 -08:00
Ekaterina Pavlova
cfddf53c01 8236139: [Graal] java/lang/RuntimeTests/exec/LotsOfOutput.java fails with JVMCI enabled
Reviewed-by: kvn
2019-12-19 13:20:58 -08:00
Alexander Matveev
c751493f0c 8235738: [macos] tools/jpackage tests timeout on macOS
Reviewed-by: herrick, asemenyuk
2019-12-19 15:20:53 -05:00
Stefan Karlsson
9847d8161b 8236110: Windows (MSVC 2013) build failures after JDK-8233299
Reviewed-by: erikj
2019-12-19 14:19:34 +01:00
Jesper Wilhelmsson
cbcb488d77 Added tag jdk-14+28 for changeset 2069b4bfd23b 2019-12-19 03:46:03 +01:00
Vladimir Kozlov
4b1be3ecf9 8236000: VM build without C2 fails
C2 flags should be checked only when C2 is present.

Reviewed-by: kbarrett, thartmann
2019-12-18 12:32:34 -08:00
Anthony Scarpino
ca112043f1 8233228: Disable weak named curves by default in TLS, CertPath, and Signed JAR
Reviewed-by: mullan, xuelei, weijun
2019-12-18 12:10:09 -08:00
Zhengyu Gu
0591a66b90 8235842: Shenandoah: Implement native LRB for narrow oop
Reviewed-by: rkennke
2019-12-12 15:20:53 -05:00
Roman Kennke
450b97f593 8234974: Shenandoah: Do concurrent roots even when no evacuation is necessary
Reviewed-by: zgu
2019-12-12 18:34:30 +01:00
Vicente Romero
be6b4aab40 8236692: static final fields without initializer are accepted by javac
Reviewed-by: mcimadamore
2020-01-08 15:18:58 -05:00
Erik Gahlin
0562caa4cb 8236487: JFR Recorder Thread crashed due to "assert(_chunkwriter.is_valid()) failed: invariant"
Reviewed-by: mgronlun, mseledtsov
2020-01-08 19:12:20 +01:00
Xue-Lei Andrew Fan
02cc064144 8234037: Improve Object Identifier Processing
Reviewed-by: weijun, mschoene, ssahoo
2019-11-25 07:24:17 -08:00
Roger Riggs
796f3ba8be 8232419: Improve Registry registration
Reviewed-by: smarks, chegar
2019-10-30 13:22:35 -04:00
Ivan Gerasimov
34e36a8c01 8233002: Further enhance datagram socket support
Reviewed-by: alanb, chegar, dfuchs
2019-10-29 09:51:37 -07:00
Jamil Nimeh
c5f884c6d1 8231780: Better TLS messaging support
Reviewed-by: ascarpino, rhalade, mschoene
2019-10-28 18:53:51 -07:00
Sean Mullan
a0f8febb8b 8230318: Better trust store usage
Reviewed-by: weijun, rhalade, ahgross
2019-10-22 17:25:34 -04:00
Anton Litvinov
10b1e756e2 8225279: Better XRender interpolation
Reviewed-by: serb, prr, rhalade, ahgross
2019-10-16 19:01:22 +01:00
Brian Burkhalter
68c5b95b13 8231790: Provide better FileSystemProviders
Reviewed-by: alanb, skoivu, rhalade
2019-10-10 10:52:31 -07:00
Roger Riggs
be35f9ef53 8230967: Improve Registry support of clients
Reviewed-by: skoivu, smarks, rhalade
2019-10-15 15:05:33 -04:00
Roger Riggs
24a7ba0c61 8231422: Setting JEP 290 Filter via System Property May Be Ignored
Reviewed-by: smarks, rhalade
2019-10-15 09:52:44 -04:00
Weijun Wang
f3815c85a1 8231139: Improved keystore support
Reviewed-by: mullan, ahgross
2019-10-09 17:42:38 +08:00
Phil Race
af20c6b9c4 8227816: More Colorful ICC profiles
Reviewed-by: serb, psadhukhan, mschoene, rhalade
2019-10-01 08:47:32 -07:00
Weijun Wang
7c32a6aeae 8231134: Improved credential support
Reviewed-by: ahgross, valeriep
2019-09-26 18:13:20 +08:00
Weijun Wang
bda0fba56b 8229951: Better Ticket Granting Services
Reviewed-by: ahgross, valeriep
2019-09-26 18:12:53 +08:00
Lois Foltan
40429eea41 8225261: Better method resolutions
Correct the class used to perform the overriding check in klassVtable::find_transitive_override

Reviewed-by: ahgross, dholmes, hseigel, jwilhelm, rhalade
2019-09-12 11:46:05 -04:00
Xue-Lei Andrew Fan
10b010d0f5 8229728: Implement negotiation parameters
Reviewed-by: jnimeh, ahgross, rhalade
2019-09-10 17:13:48 -07:00
Sean Mullan
6cb8dfa9e3 8227758: More valid PKIX processing
Reviewed-by: xuelei, rhalade, coffeys, mschoene
2019-08-26 13:57:51 -04:00
Sergey Bylokhov
1236be7e4a 8224909: Unlink Set of LinkedHashSets
Reviewed-by: prr, mschoene, rhalade, psadhukhan
2019-08-21 18:07:29 -07:00
Daniel Fuchs
3375411e1b 8228548: Normalize normalization for all
Reviewed-by: chegar, rhalade, igerasim
2019-08-08 16:47:55 +01:00
Weijun Wang
2215201dd5 8226352: Improve Kerberos interop capabilities
Reviewed-by: ahgross, mullan, valeriep
2019-07-19 14:51:04 +08:00
557 changed files with 14818 additions and 5310 deletions

11
.hgtags
View File

@@ -600,3 +600,14 @@ c16ac7a2eba4e73cb4f7ee9294dd647860eebff0 jdk-14+21
17d242844fc9e7d18b3eac97426490a9c246119e jdk-14+25
288777cf0702914e5266bc1e5d380eed9032ca41 jdk-14+26
91a3f092682fc715d991a87eb6ec6f28886d2035 jdk-14+27
2069b4bfd23b56b6fc659fba8b75aaaa23debbe0 jdk-14+28
563fa900fa17c290ae516c7a3a69e8c069dde304 jdk-14+29
d54ce919da90dab361995bb4d87be9851f00537a jdk-14+30
d54ce919da90dab361995bb4d87be9851f00537a jdk-14+31
d54ce919da90dab361995bb4d87be9851f00537a jdk-14+31
decd3d2953b640f1043ee76953ff89238bff92e8 jdk-14+31
2776da28515e087cc8849acf1e131a65ea7e77b6 jdk-14+32
f728b6c7f4910d6bd6070cb4dde8393f4ba95113 jdk-14+33
a96bc204e3b31ddbf909b20088964112f052927e jdk-14+34
4a87bb7ebfd7f6a25ec59a5982fe3607242777f8 jdk-14+35
bc54620a3848c26cff9766e5e2a6e5ddab98ed18 jdk-14+36

0
configure vendored Normal file → Executable file
View File

View File

@@ -0,0 +1,9 @@
# jetbrains/runtime:jbr14env
FROM centos:7
RUN yum -y install zip bzip2 unzip tar wget make autoconf automake libtool gcc gcc-c++ libstdc++-devel alsa-devel cups-devel xorg-x11-devel libjpeg62-devel giflib-devel freetype-devel file which libXtst-devel libXt-devel libXrender-devel alsa-lib-devel fontconfig-devel libXrandr-devel libXi-devel git
# Install Java 13
RUN wget https://download.java.net/java/GA/jdk13.0.1/cec27d702aa74d5a8630c65ae61e4305/9/GPL/openjdk-13.0.1_linux-x64_bin.tar.gz \
-O - | tar xz -C /
ENV JAVA_HOME /jbrsdk
ENV PATH $JAVA_HOME/bin:$PATH

View File

@@ -0,0 +1,10 @@
FROM i386/ubuntu:xenial
RUN linux32 apt-get update && apt-get install -y --no-install-recommends apt-utils
RUN linux32 apt-get -y install file build-essential zip unzip tar wget curl libx11-dev libxext-dev \
libxrender-dev libxrandr-dev libxtst-dev libxt-dev libcups2-dev libasound2-data \
libpng12-0 libasound2 libfreetype6 libfontconfig1-dev libasound2-dev autoconf git
RUN wget https://cdn.azul.com/zulu/bin/zulu13.31.11-ca-jdk13.0.3-linux_i686.tar.gz \
-O - | tar xz -C /
ENV JAVA_HOME /zulu13.31.11-ca-jdk13.0.3-linux_i686
ENV PATH $JAVA_HOME/bin:$PATH

View File

@@ -0,0 +1,3 @@
VENDOR_NAME="JetBrains s.r.o."
VENDOR_VERSION_STRING="JBR-${JBSDK_VERSION_WITH_DOTS}.${JDK_BUILD_NUMBER}-${build_number}"
[ -z ${bundle_type} ] || VENDOR_VERSION_STRING="${VENDOR_VERSION_STRING}-${bundle_type}"

View File

@@ -0,0 +1,34 @@
Index: modules.list
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- modules.list (revision a73d4ecbefe65fd6d79b78663d916ff71b5346f7)
+++ modules.list (date 1589581743550)
@@ -54,5 +54,4 @@
jdk.unsupported,
jdk.xml.dom,
jdk.zipfs,
-jdk.hotspot.agent,
-jcef
+jdk.hotspot.agent
Index: src/java.desktop/share/classes/module-info.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/java.desktop/share/classes/module-info.java (revision a73d4ecbefe65fd6d79b78663d916ff71b5346f7)
+++ src/java.desktop/share/classes/module-info.java (date 1589581743547)
@@ -109,11 +109,7 @@
// see make/GensrcModuleInfo.gmk
exports sun.awt to
jdk.accessibility,
- jdk.unsupported.desktop,
- jcef;
-
- exports sun.lwawt.macosx to jcef;
- exports sun.lwawt to jcef;
+ jdk.unsupported.desktop;
exports java.awt.dnd.peer to jdk.unsupported.desktop;
exports sun.awt.dnd to jdk.unsupported.desktop;

View File

@@ -0,0 +1,85 @@
#!/bin/bash -x
# The following parameters must be specified:
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
# build_number - specifies the number of JetBrainsRuntime build
#
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
#
# $ ./java --version
# openjdk 11.0.6 2020-01-14
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
#
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
source jb/project/tools/common.sh
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
[ -z "$bundle_type" ] && git apply -p0 < jb/project/tools/exclude_jcef_module.patch
sh configure \
--disable-warnings-as-errors \
--with-debug-level=release \
--with-vendor-name="${VENDOR_NAME}" \
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
--with-version-pre= \
--with-version-build=${JDK_BUILD_NUMBER} \
--with-version-opt=b${build_number} \
--with-import-modules=./modular-sdk \
--with-boot-jdk=${BOOT_JDK} \
--enable-cds=yes || exit $?
make clean CONF=linux-aarch64-server-release || exit $?
make images CONF=linux-aarch64-server-release test-image || exit $?
JBSDK=${JBRSDK_BASE_NAME}-linux-aarch64-b${build_number}
BASE_DIR=build/linux-aarch64-server-release/images
JSDK=${BASE_DIR}/jdk
JBRSDK_BUNDLE=jbrsdk
echo Fixing permissions
chmod -R a+r $JSDK
rm -rf $BASE_DIR/$JBRSDK_BUNDLE
cp -r $JSDK $BASE_DIR/$JBRSDK_BUNDLE || exit $?
echo Creating $JBSDK.tar.gz ...
sed 's/JBR/JBRSDK/g' ${BASE_DIR}/${JBRSDK_BUNDLE}/release > release
mv release ${BASE_DIR}/${JBRSDK_BUNDLE}/release
tar -pcf $JBSDK.tar \
--exclude=*.debuginfo --exclude=demo --exclude=sample --exclude=man \
-C $BASE_DIR ${JBRSDK_BUNDLE} || exit $?
gzip $JBSDK.tar || exit $?
JBR_BUNDLE=jbr
JBR_BASE_NAME=jbr-$JBSDK_VERSION
rm -rf $BASE_DIR/$JBR_BUNDLE
JBR=$JBR_BASE_NAME-linux-aarch64-b$build_number
grep -v javafx modules.list | grep -v "jdk.internal.vm\|jdk.aot\|jcef" > modules.list.aarch64
echo Running jlink....
${JSDK}/bin/jlink \
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
--add-modules $(xargs < modules.list.aarch64 | sed s/" "//g | sed s/,$//g) \
--output ${BASE_DIR}/${JBR_BUNDLE} || exit $?
echo Modifying release info ...
grep -v \"^JAVA_VERSION\" ${JSDK}/release | grep -v \"^MODULES\" >> ${BASE_DIR}/${JBR_BUNDLE}/release
echo Creating $JBR.tar.gz ...
tar -pcf $JBR.tar -C $BASE_DIR ${JBR_BUNDLE} || exit $?
gzip $JBR.tar || exit $?
JBRSDK_TEST=$JBRSDK_BASE_NAME-linux-test-aarch64-b$build_number
echo Creating $JBRSDK_TEST.tar.gz ...
tar -pcf $JBRSDK_TEST.tar -C $BASE_DIR --exclude='test/jdk/demos' test || exit $?
gzip $JBRSDK_TEST.tar || exit $?

View File

@@ -0,0 +1,110 @@
#!/bin/bash -x
# The following parameters must be specified:
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
# build_number - specifies the number of JetBrainsRuntime build
# bundle_type - specifies bundle to bu built; possible values:
# jcef - the bundles with jcef
# empty - the bundles without jcef
#
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
#
# $ ./java --version
# openjdk 11.0.6 2020-01-14
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
#
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
bundle_type=$4
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
source jb/project/tools/common.sh
function create_jbr {
if [ -z "${bundle_type}" ]; then
JBR_BUNDLE=jbr
else
JBR_BUNDLE=jbr_${bundle_type}
fi
JBR_BASE_NAME=${JBR_BUNDLE}-${JBSDK_VERSION}
cat modules.list > modules_tmp.list
rm -rf ${BASE_DIR}/jbr
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
JBR=$JBR_BASE_NAME-linux-x64-b$build_number
echo Running jlink....
$JSDK/bin/jlink \
--module-path $JSDK/jmods --no-man-pages --compress=2 \
--add-modules $(xargs < modules_tmp.list | sed s/" "//g) --output $BASE_DIR/$JBR_BUNDLE
if [ ! -z "${bundle_type}" ]; then
cp -R ${BASE_DIR}/${JBR_BUNDLE} ${BASE_DIR}/jbr
cp -R jcef_linux_x64/* $BASE_DIR/$JBR_BUNDLE/lib || exit $?
fi
grep -v "^JAVA_VERSION" $JSDK/release | grep -v "^MODULES" >> $BASE_DIR/$JBR_BUNDLE/release
echo Creating $JBR.tar.gz ...
tar -pcf $JBR.tar -C $BASE_DIR jbr || exit $?
gzip $JBR.tar || exit $?
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
}
JBRSDK_BASE_NAME=jbrsdk-$JBSDK_VERSION
git checkout -- modules.list
git checkout -- src/java.desktop/share/classes/module-info.java
[ -z "$bundle_type" ] && git apply -p0 < jb/project/tools/exclude_jcef_module.patch
sh configure \
--disable-warnings-as-errors \
--with-debug-level=release \
--with-vendor-name="${VENDOR_NAME}" \
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
--with-version-pre= \
--with-version-build=${JDK_BUILD_NUMBER} \
--with-version-opt=b${build_number} \
--with-import-modules=./modular-sdk \
--with-boot-jdk=${BOOT_JDK} \
--enable-cds=yes || exit $?
make images CONF=linux-x86_64-server-release || exit $?
JSDK=build/linux-x86_64-server-release/images/jdk
JBSDK=$JBRSDK_BASE_NAME-linux-x64-b$build_number
echo Fixing permissions
chmod -R a+r $JSDK
BASE_DIR=build/linux-x86_64-server-release/images
JBRSDK_BUNDLE=jbrsdk
rm -rf $BASE_DIR/$JBRSDK_BUNDLE
cp -r $JSDK $BASE_DIR/$JBRSDK_BUNDLE || exit $?
if [[ "$bundle_type" == *jcef* ]]; then
cp -R jcef_linux_x64/* $BASE_DIR/$JBRSDK_BUNDLE/lib || exit $?
fi
echo Creating $JBSDK.tar.gz ...
sed 's/JBR/JBRSDK/g' ${BASE_DIR}/${JBRSDK_BUNDLE}/release > release
mv release ${BASE_DIR}/${JBRSDK_BUNDLE}/release
tar -pcf $JBSDK.tar --exclude=*.debuginfo --exclude=demo --exclude=sample --exclude=man \
-C $BASE_DIR $JBRSDK_BUNDLE || exit $?
gzip $JBSDK.tar || exit $?
create_jbr || exit $?
make test-image || exit $?
JBRSDK_TEST=$JBRSDK_BASE_NAME-linux-test-x64-b$build_number
echo Creating $JBSDK_TEST.tar.gz ...
tar -pcf $JBRSDK_TEST.tar -C $BASE_DIR --exclude='test/jdk/demos' test || exit $?
gzip $JBRSDK_TEST.tar || exit $?

View File

@@ -0,0 +1,82 @@
#!/bin/bash -x
# The following parameters must be specified:
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
# build_number - specifies the number of JetBrainsRuntime build
#
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
#
# $ ./java --version
# openjdk 11.0.6 2020-01-14
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
#
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
source jb/project/tools/common.sh
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
[ -z "$bundle_type" ] && git apply -p0 < jb/project/tools/exclude_jcef_module.patch
sh configure \
--disable-warnings-as-errors \
--with-debug-level=fastdebug \
--with-vendor-name="${VENDOR_NAME}" \
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
--with-version-pre= \
--with-version-build=${JDK_BUILD_NUMBER} \
--with-version-opt=b${build_number} \
--with-import-modules=./modular-sdk \
--with-boot-jdk=${BOOT_JDK} \
--enable-cds=yes || exit $?
make clean CONF=linux-x86_64-server-fastdebug || exit $?
make images CONF=linux-x86_64-server-fastdebug || exit $?
JBSDK=${JBRSDK_BASE_NAME}-linux-x64-fastdebug-b${build_number}
BASE_DIR=build/linux-x86_64-server-fastdebug/images
JSDK=${BASE_DIR}/jdk
JBRSDK_BUNDLE=jbrsdk
echo Fixing permissions
chmod -R a+r $JSDK
rm -rf $BASE_DIR/$JBRSDK_BUNDLE
cp -r $JSDK $BASE_DIR/$JBRSDK_BUNDLE || exit $?
cp -R jcef_linux_x64/* $BASE_DIR/$JBRSDK_BUNDLE/lib || exit $?
echo Creating $JBSDK.tar.gz ...
sed 's/JBR/JBRSDK/g' ${BASE_DIR}/${JBRSDK_BUNDLE}/release > release
mv release ${BASE_DIR}/${JBRSDK_BUNDLE}/release
tar -pcf $JBSDK.tar \
--exclude=*.debuginfo --exclude=demo --exclude=sample --exclude=man \
-C $BASE_DIR ${JBRSDK_BUNDLE} || exit $?
gzip $JBSDK.tar || exit $?
JBR_BUNDLE=jbr
JBR_BASE_NAME=jbr-$JBSDK_VERSION
rm -rf $BASE_DIR/$JBR_BUNDLE
JBR=$JBR_BASE_NAME-linux-x64-fastdebug-b$build_number
echo Running jlink....
${JSDK}/bin/jlink \
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
--add-modules $(xargs < modules.list | sed s/" "//g | sed s/,$//g) \
--output ${BASE_DIR}/${JBR_BUNDLE} || exit $?
cp -R jcef_linux_x64/* $BASE_DIR/$JBR_BUNDLE/lib || exit $?
echo Modifying release info ...
grep -v \"^JAVA_VERSION\" ${JSDK}/release | grep -v \"^MODULES\" >> ${BASE_DIR}/${JBR_BUNDLE}/release
echo Creating $JBR.tar.gz ...
tar -czf $JBR.tar -C $BASE_DIR ${JBR_BUNDLE} || exit $?
gzip $JBR.tar || exit $?

View File

@@ -0,0 +1,81 @@
#!/bin/bash -x
# The following parameters must be specified:
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
# build_number - specifies the number of JetBrainsRuntime build
#
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
#
# $ ./java --version
# openjdk 11.0.6 2020-01-14
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
#
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
source jb/project/tools/common.sh
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
[ -z "$bundle_type" ] && git apply -p0 < jb/project/tools/exclude_jcef_module.patch
linux32 bash configure \
--disable-warnings-as-errors \
--with-debug-level=release \
--with-vendor-name="${VENDOR_NAME}" \
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
--with-version-pre= \
--with-version-build=$JDK_BUILD_NUMBER \
--with-version-opt=b${build_number} \
--with-boot-jdk=${BOOT_JDK} \
--enable-cds=yes || exit $?
make clean CONF=linux-x86-server-release || exit $?
make images CONF=linux-x86-server-release test-image || exit $?
JBSDK=${JBRSDK_BASE_NAME}-linux-x86-b${build_number}
BASE_DIR=build/linux-x86-server-release/images
JSDK=${BASE_DIR}/jdk
JBRSDK_BUNDLE=jbrsdk
echo Fixing permissions
chmod -R a+r $JSDK
rm -rf $BASE_DIR/$JBRSDK_BUNDLE
cp -r $JSDK $BASE_DIR/$JBRSDK_BUNDLE || exit $?
echo Creating $JBSDK.tar.gz ...
sed 's/JBR/JBRSDK/g' ${BASE_DIR}/${JBRSDK_BUNDLE}/release > release
mv release ${BASE_DIR}/${JBRSDK_BUNDLE}/release
tar -pcf $JBSDK.tar --exclude=*.debuginfo --exclude=demo --exclude=sample --exclude=man -C $BASE_DIR ${JBRSDK_BUNDLE} || exit $?
gzip $JBSDK.tar || exit $?
JBR_BUNDLE=jbr
JBR_BASE_NAME=jbr-$JBSDK_VERSION
rm -rf $BASE_DIR/$JBR_BUNDLE
JBR=$JBR_BASE_NAME-linux-x86-b$build_number
grep -v javafx modules.list | grep -v "jdk.internal.vm\|jdk.aot\|jcef" > modules.list.x86
echo Running jlink....
${JSDK}/bin/jlink \
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
--add-modules $(xargs < modules.list.x86 | sed s/" "//g | sed s/,$//g) --output ${BASE_DIR}/${JBR_BUNDLE} || exit $?
echo Modifying release info ...
grep -v \"^JAVA_VERSION\" ${JSDK}/release | grep -v \"^MODULES\" >> ${BASE_DIR}/${JBR_BUNDLE}/release
echo Creating $JBR.tar.gz ...
tar -pcf $JBR.tar -C $BASE_DIR $JBR_BUNDLE || exit $?
gzip $JBR.tar || exit $?
JBRSDK_TEST=$JBRSDK_BASE_NAME-linux-test-x86-b$build_number
echo Creating $JBRSDK_TEST.tar.gz ...
tar -pcf $JBRSDK_TEST.tar -C $BASE_DIR --exclude='test/jdk/demos' --exclude='test/hotspot/gtest' test || exit $?
gzip $JBRSDK_TEST.tar || exit $?

View File

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

View File

@@ -0,0 +1,116 @@
#!/bin/bash -x
# The following parameters must be specified:
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
# build_number - specifies the number of JetBrainsRuntime build
# bundle_type - specifies bundle to bu built; possible values:
# jcef - the bundles with jcef
# empty - the bundles without jcef
#
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
#
# $ ./java --version
# openjdk 11.0.6 2020-01-14
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
#
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
bundle_type=$4
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
MAJOR_JBSDK_VERSION=$(echo $JBSDK_VERSION_WITH_DOTS | awk -F "." '{print $1}')
source jb/project/tools/common.sh
function create_jbr {
if [ -z "${bundle_type}" ]; then
JBR_BUNDLE=jbr
else
JBR_BUNDLE=jbr_${bundle_type}
fi
JBR_BASE_NAME=${JBR_BUNDLE}-${JBSDK_VERSION}
cat modules.list > modules_tmp.list
rm -rf ${BASE_DIR}/jbr
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
JRE_CONTENTS=${BASE_DIR}/${JBR_BUNDLE}/Contents
JRE_HOME=${JRE_CONTENTS}/Home
if [ -d "${JRE_CONTENTS}" ]; then
rm -rf ${JRE_CONTENTS}
fi
mkdir -p ${JRE_CONTENTS}
JBR=${JBR_BASE_NAME}-osx-x64-b${build_number}
echo Running jlink....
${BASE_DIR}/$JBRSDK_BUNDLE/Contents/Home/bin/jlink \
--module-path ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/jmods --no-man-pages --compress=2 \
--add-modules $(xargs < modules_tmp.list | sed s/" "//g) --output ${JRE_HOME} || exit $?
grep -v "^JAVA_VERSION" ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/release | grep -v "^MODULES" >> ${JRE_HOME}/release
cp -R ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/MacOS ${JRE_CONTENTS}
cp ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Info.plist ${JRE_CONTENTS}
rm -rf ${JRE_CONTENTS}/Frameworks || exit $?
[ ! -z "${bundle_type}" ] && (cp -a jcef_mac/Frameworks ${JRE_CONTENTS} || exit $?)
echo Creating ${JBR}.tar.gz ...
[ ! -z "${bundle_type}" ] && cp -R ${BASE_DIR}/${JBR_BUNDLE} ${BASE_DIR}/jbr
COPYFILE_DISABLE=1 tar -pczf ${JBR}.tar.gz --exclude='*.dSYM' --exclude='man' -C ${BASE_DIR} jbr || exit $?
rm -rf ${BASE_DIR}/${JBR_BUNDLE}
}
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
git checkout -- modules.list
git checkout -- src/java.desktop/share/classes/module-info.java
[ -z "$bundle_type" ] && git apply -p0 < jb/project/tools/exclude_jcef_module.patch
sh configure \
--disable-warnings-as-errors \
--with-debug-level=release \
--with-vendor-name="${VENDOR_NAME}" \
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
--with-version-pre= \
--with-version-build=${JDK_BUILD_NUMBER} \
--with-version-opt=b${build_number} \
--with-import-modules=./modular-sdk \
--with-boot-jdk=`/usr/libexec/java_home -v 14` \
--enable-cds=yes || exit $?
make images CONF=macosx-x86_64-server-release || exit $?
JSDK=build/macosx-x86_64-server-release/images/jdk-bundle
JBSDK=${JBRSDK_BASE_NAME}-osx-x64-b${build_number}
BASE_DIR=jre
JBRSDK_BUNDLE=jbrsdk
rm -rf $BASE_DIR
mkdir $BASE_DIR || exit $?
cp -a $JSDK/jdk-$MAJOR_JBSDK_VERSION.jdk $BASE_DIR/$JBRSDK_BUNDLE || exit $?
if [[ "$bundle_type" == *jcef* ]]; then
cp -a jcef_mac/Frameworks $BASE_DIR/$JBRSDK_BUNDLE/Contents/
fi
echo Creating $JBSDK.tar.gz ...
sed 's/JBR/JBRSDK/g' ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/release > release
mv release ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/release
COPYFILE_DISABLE=1 tar -pczf $JBSDK.tar.gz -C $BASE_DIR \
--exclude='._*' --exclude='.DS_Store' --exclude='*~' \
--exclude='Home/demo' --exclude='Home/man' --exclude='Home/sample' \
$JBRSDK_BUNDLE || exit $?
create_jbr || exit $?
make test-image || exit $?
JBRSDK_TEST=$JBRSDK_BASE_NAME-osx-test-x64-b$build_number
echo Creating $JBRSDK_TEST.tar.gz ...
COPYFILE_DISABLE=1 tar -pczf $JBRSDK_TEST.tar.gz -C build/macosx-x86_64-server-release/images \
--exclude='test/jdk/demos' test || exit $?

View File

@@ -0,0 +1,89 @@
#!/bin/bash -x
# The following parameters must be specified:
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
# build_number - specifies the number of JetBrainsRuntime build
#
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
#
# $ ./java --version
# openjdk 11.0.6 2020-01-14
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
#
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
MAJOR_JBSDK_VERSION=$(echo $JBSDK_VERSION_WITH_DOTS | awk -F "." '{print $1}')
source jb/project/tools/common.sh
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
[ -z "$bundle_type" ] && git apply -p0 < jb/project/tools/exclude_jcef_module.patch
sh configure \
--disable-warnings-as-errors \
--with-debug-level=fastdebug \
--with-vendor-name="${VENDOR_NAME}" \
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
--with-version-pre= \
--with-version-build=${JDK_BUILD_NUMBER} \
--with-version-opt=b${build_number} \
--with-import-modules=./modular-sdk \
--with-boot-jdk=`/usr/libexec/java_home -v 14` \
--enable-cds=yes || exit $?
make clean CONF=macosx-x86_64-server-fastdebug || exit $?
make images CONF=macosx-x86_64-server-fastdebug || exit $?
JSDK=build/macosx-x86_64-server-fastdebug/images/jdk-bundle
JBSDK=${JBRSDK_BASE_NAME}-osx-x64-fastdebug-b${build_number}
BASE_DIR=jre
JBRSDK_BUNDLE=jbrsdk
rm -rf $BASE_DIR
mkdir $BASE_DIR || exit $?
cp -a $JSDK/jdk-$MAJOR_JBSDK_VERSION.jdk $BASE_DIR/$JBRSDK_BUNDLE || exit $?
echo Creating $JBSDK.tar.gz ...
cp -a jcef_mac/Frameworks $BASE_DIR/$JBRSDK_BUNDLE/Contents/
sed 's/JBR/JBRSDK/g' ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/release > release
mv release ${BASE_DIR}/${JBRSDK_BUNDLE}/Contents/Home/release
COPYFILE_DISABLE=1 \
tar -pczf ${JBSDK}.tar.gz -C ${BASE_DIR} \
--exclude='._*' --exclude='.DS_Store' --exclude='*~' \
--exclude='Home/demo' --exclude='Home/man' --exclude='Home/sample' \
${JBRSDK_BUNDLE} || exit $?
JBR_BUNDLE=jbr
JRE_CONTENTS=$BASE_DIR/$JBR_BUNDLE/Contents
JRE_HOME=$JRE_CONTENTS/Home
JBR_BASE_NAME=jbr-$JBSDK_VERSION
mkdir -p $JRE_CONTENTS
if [ -d "$JRE_HOME" ]; then
rm -rf $JRE_HOME
fi
JBR=${JBR_BASE_NAME}-osx-x64-fastdebug-b${build_number}
$BASE_DIR/$JBRSDK_BUNDLE/Contents/Home/bin/jlink \
--module-path $BASE_DIR/$JBRSDK_BUNDLE/Contents/Home/jmods --no-man-pages --compress=2 \
--add-modules $(xargs < modules.list | sed s/" "//g) --output $JRE_HOME || exit $?
grep -v "^JAVA_VERSION" $BASE_DIR/$JBRSDK_BUNDLE/Contents/Home/release | grep -v "^MODULES" >> $JRE_HOME/release
cp -R $BASE_DIR/$JBRSDK_BUNDLE/Contents/MacOS $JRE_CONTENTS
cp $BASE_DIR/$JBRSDK_BUNDLE/Contents/Info.plist $JRE_CONTENTS
cp -a jcef_mac/Frameworks ${JRE_CONTENTS} || exit $?
echo Creating $JBR.tar.gz ...
COPYFILE_DISABLE=1 tar -pczf $JBR.tar.gz --exclude='*.dSYM' --exclude='man' -C $BASE_DIR $JBR_BUNDLE || exit $?

View File

@@ -0,0 +1,120 @@
#!/bin/bash
APP_DIRECTORY=$1
APPL_USER=$2
APPL_PASSWORD=$3
APP_NAME=$4
BUNDLE_ID=$5
FAKE_ROOT="${6:-fake-root}"
if [[ -z "$APP_DIRECTORY" ]] || [[ -z "$APPL_USER" ]] || [[ -z "$APPL_PASSWORD" ]]; then
echo "Usage: $0 AppDirectory Username Password"
exit 1
fi
if [[ ! -d "$APP_DIRECTORY" ]]; then
echo "AppDirectory '$APP_DIRECTORY' does not exist or not a directory"
exit 1
fi
function log() {
echo "$(date '+[%H:%M:%S]') $*"
}
function publish-log() {
id=$1
file=$2
curl -T "$file" "$ARTIFACTORY_URL/$id" || true
}
function altool-upload() {
# Since altool uses same file for upload token we have to trick it into using different folders for token file location
# Also it copies zip into TMPDIR so we override it too, to simplify cleanup
OLD_HOME="$HOME"
export HOME="$FAKE_ROOT/home"
export TMPDIR="$FAKE_ROOT/tmp"
mkdir -p "$HOME"
mkdir -p "$TMPDIR"
export _JAVA_OPTIONS="-Duser.home=$HOME -Djava.io.tmpdir=$TMPDIR"
# Reduce amount of downloads, cache transporter libraries
shared_itmstransporter="$OLD_HOME/shared-itmstransporter"
if [[ -f "$shared_itmstransporter" ]]; then
cp -r "$shared_itmstransporter" "$HOME/.itmstransporter"
fi
# For some reason altool prints everything to stderr, not stdout
set +e
xcrun altool --notarize-app \
--username "$APPL_USER" --password "$APPL_PASSWORD" \
--primary-bundle-id "$BUNDLE_ID" \
--asc-provider JetBrainssro --file "$1" 2>&1 | tee "altool.init.out"
unset TMPDIR
export HOME="$OLD_HOME"
set -e
}
#immediately exit script with an error if a command fails
set -euo pipefail
file="$APP_NAME.zip"
log "Zipping $file..."
rm -rf "$file"
ditto -c -k --sequesterRsrc --keepParent "$APP_DIRECTORY/Contents" "$file"
log "Notarizing $file..."
rm -rf "altool.init.out" "altool.check.out"
altool-upload "$file"
rm -rf "$file"
notarization_info="$(grep -e "RequestUUID" "altool.init.out" | grep -oE '([0-9a-f-]{36})')"
if [ -z "$notarization_info" ]; then
log "Faile to read RequestUUID from altool.init.out"
exit 10
fi
PATH="$PATH:/usr/local/bin/"
log "Notarization request sent, awaiting response"
spent=0
while true; do
# For some reason altool prints everything to stderr, not stdout
xcrun altool --username "$APPL_USER" --notarization-info "$notarization_info" --password "$APPL_PASSWORD" >"altool.check.out" 2>&1 || true
status="$(grep -oe 'Status: .*' "altool.check.out" | cut -c 9- || true)"
log "Current status: $status"
if [ "$status" = "invalid" ]; then
log "Notarization failed"
ec=1
elif [ "$status" = "success" ]; then
log "Notarization succeeded"
ec=0
else
if [ "$status" != "in progress" ]; then
log "Unknown notarization status, waiting more, altool output:"
cat "altool.check.out"
fi
if [[ $spent -gt 60 ]]; then
log "Waiting time out (apx 60 minutes)"
ec=2
break
fi
sleep 60
((spent += 1))
continue
fi
developer_log="developer_log.json"
log "Fetching $developer_log"
# TODO: Replace cut with trim or something better
url="$(grep -oe 'LogFileURL: .*' "altool.check.out" | cut -c 13-)"
wget "$url" -O "$developer_log" && cat "$developer_log" || true
if [ $ec != 0 ]; then
log "Publishing $developer_log"
publish-log "$notarization_info" "$developer_log"
fi
break
done
cat "altool.check.out"
rm -rf "altool.init.out" "altool.check.out"
exit $ec

View File

@@ -0,0 +1,94 @@
#!/bin/bash
APP_DIRECTORY=$1
JB_CERT=$2
if [[ -z "$APP_DIRECTORY" ]] || [[ -z "$JB_CERT" ]]; then
echo "Usage: $0 AppDirectory CertificateID"
exit 1
fi
if [[ ! -d "$APP_DIRECTORY" ]]; then
echo "AppDirectory '$APP_DIRECTORY' does not exist or not a directory"
exit 1
fi
function log() {
echo "$(date '+[%H:%M:%S]') $*"
}
#immediately exit script with an error if a command fails
set -euo pipefail
# Cleanup files left from previous sign attempt (if any)
find "$APP_DIRECTORY" -name '*.cstemp' -exec rm '{}' \;
log "Signing libraries and executables..."
# -perm +111 searches for executables
for f in \
"Contents/Home/bin" \
"Contents/Home/lib" \
"Contents/Frameworks"; do
if [ -d "$APP_DIRECTORY/$f" ]; then
find "$APP_DIRECTORY/$f" \
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -perm +111 \) \
-exec codesign --timestamp \
-v -s "$JB_CERT" --options=runtime \
--entitlements entitlements.xml {} \;
fi
done
log "Signing libraries in jars in $PWD"
# todo: add set -euo pipefail; into the inner sh -c
# `-e` prevents `grep -q && printf` loginc
# with `-o pipefail` there's no input for 'while' loop
find "$APP_DIRECTORY" -name '*.jar' \
-exec sh -c "set -u; unzip -l \"\$0\" | grep -q -e '\.dylib\$' -e '\.jnilib\$' -e '\.so\$' -e '^jattach\$' && printf \"\$0\0\" " {} \; |
while IFS= read -r -d $'\0' file; do
log "Processing libraries in $file"
rm -rf jarfolder jar.jar
mkdir jarfolder
filename="${file##*/}"
log "Filename: $filename"
cp "$file" jarfolder && (cd jarfolder && jar xf "$filename" && rm "$filename")
find jarfolder \
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -name "jattach" \) \
-exec codesign --timestamp \
-v -s "$JB_CERT" --options=runtime \
--entitlements entitlements.xml {} \;
(cd jarfolder; zip -q -r -o ../jar.jar .)
mv jar.jar "$file"
done
rm -rf jarfolder jar.jar
log "Signing other files..."
for f in \
"Contents/MacOS"; do
if [ -d "$APP_DIRECTORY/$f" ]; then
find "$APP_DIRECTORY/$f" \
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -perm +111 \) \
-exec codesign --timestamp \
-v -s "$JB_CERT" --options=runtime \
--entitlements entitlements.xml {} \;
fi
done
#log "Signing executable..."
#codesign --timestamp \
# -v -s "$JB_CERT" --options=runtime \
# --force \
# --entitlements entitlements.xml "$APP_DIRECTORY/Contents/MacOS/idea"
log "Signing whole app..."
codesign --timestamp \
-v -s "$JB_CERT" --options=runtime \
--force \
--entitlements entitlements.xml "$APP_DIRECTORY"
log "Verifying java is not broken"
find "$APP_DIRECTORY" \
-type f -name 'java' -perm +111 -exec {} -version \;

View File

@@ -0,0 +1,138 @@
#!/bin/bash
#immediately exit script with an error if a command fails
set -euo pipefail
export COPY_EXTENDED_ATTRIBUTES_DISABLE=true
export COPYFILE_DISABLE=true
INPUT_FILE=$1
EXPLODED=$2.exploded
BACKUP_JMODS=$2.backup
USERNAME=$3
PASSWORD=$4
CODESIGN_STRING=$5
NOTARIZE=$6
BUNDLE_ID=$7
cd "$(dirname "$0")"
function log() {
echo "$(date '+[%H:%M:%S]') $*"
}
log "Deleting $EXPLODED ..."
if test -d "$EXPLODED"; then
find "$EXPLODED" -mindepth 1 -maxdepth 1 -exec chmod -R u+wx '{}' \;
fi
rm -rf "$EXPLODED"
mkdir "$EXPLODED"
rm -rf "$BACKUP_JMODS"
mkdir "$BACKUP_JMODS"
log "Unzipping $INPUT_FILE to $EXPLODED ..."
tar -xzvf "$INPUT_FILE" --directory $EXPLODED
rm "$INPUT_FILE"
BUILD_NAME="$(ls "$EXPLODED")"
if test -d $EXPLODED/$BUILD_NAME/Contents/Home/jmods; then
mv $EXPLODED/$BUILD_NAME/Contents/Home/jmods $BACKUP_JMODS
fi
if test -f $EXPLODED/$BUILD_NAME/Contents/MacOS/libjli.dylib; then
mv $EXPLODED/$BUILD_NAME/Contents/MacOS/libjli.dylib $BACKUP_JMODS
fi
if test -d $EXPLODED/$BUILD_NAME/Contents/Home/Frameworks; then
mv $EXPLODED/$BUILD_NAME/Contents/Home/Frameworks $BACKUP_JMODS
fi
log "$INPUT_FILE extracted and removed"
APPLICATION_PATH="$EXPLODED/$BUILD_NAME"
find "$APPLICATION_PATH/Contents/Home/bin" \
-maxdepth 1 -type f -name '*.jnilib' -print0 |
while IFS= read -r -d $'\0' file; do
if [ -f "$file" ]; then
log "Linking $file"
b="$(basename "$file" .jnilib)"
ln -sf "$b.jnilib" "$(dirname "$file")/$b.dylib"
fi
done
find "$APPLICATION_PATH/Contents/" \
-maxdepth 1 -type f -name '*.txt' -print0 |
while IFS= read -r -d $'\0' file; do
if [ -f "$file" ]; then
log "Moving $file"
mv "$file" "$APPLICATION_PATH/Contents/Resources"
fi
done
non_plist=$(find "$APPLICATION_PATH/Contents/" -maxdepth 1 -type f -and -not -name 'Info.plist' | wc -l)
if [[ $non_plist -gt 0 ]]; then
log "Only Info.plist file is allowed in Contents directory but found $non_plist file(s):"
log "$(find "$APPLICATION_PATH/Contents/" -maxdepth 1 -type f -and -not -name 'Info.plist')"
exit 1
fi
log "Unlocking keychain..."
# Make sure *.p12 is imported into local KeyChain
security unlock-keychain -p "$PASSWORD" "/Users/$USERNAME/Library/Keychains/login.keychain"
attempt=1
limit=3
set +e
while [[ $attempt -le $limit ]]; do
log "Signing (attempt $attempt) $APPLICATION_PATH ..."
./sign.sh "$APPLICATION_PATH" "$CODESIGN_STRING"
ec=$?
if [[ $ec -ne 0 ]]; then
((attempt += 1))
if [ $attempt -eq $limit ]; then
set -e
fi
log "Signing failed, wait for 30 sec and try to sign again"
sleep 30
else
log "Signing done"
codesign -v "$APPLICATION_PATH" -vvvvv
log "Check sign done"
((attempt += limit))
fi
done
set -e
if [ "$NOTARIZE" = "yes" ]; then
log "Notarizing..."
# shellcheck disable=SC1090
source "$HOME/.notarize_token"
APP_NAME=$(echo ${INPUT_FILE} | awk -F"." '{ print $1 }')
# Since notarization tool uses same file for upload token we have to trick it into using different folders, hence fake root
# Also it leaves copy of zip file in TMPDIR, so notarize.sh overrides it and uses FAKE_ROOT as location for temp TMPDIR
FAKE_ROOT="$(pwd)/fake-root"
mkdir -p "$FAKE_ROOT"
echo "Notarization will use fake root: $FAKE_ROOT"
./notarize.sh "$APPLICATION_PATH" "$APPLE_USERNAME" "$APPLE_PASSWORD" "$APP_NAME" "$BUNDLE_ID" "$FAKE_ROOT"
rm -rf "$FAKE_ROOT"
set +e
log "Stapling..."
xcrun stapler staple "$APPLICATION_PATH"
else
log "Notarization disabled"
log "Stapling disabled"
fi
log "Zipping $BUILD_NAME to $INPUT_FILE ..."
(
#cd "$EXPLODED"
#ditto -c -k --sequesterRsrc --keepParent "$BUILD_NAME" "../$INPUT_FILE"
if test -d $BACKUP_JMODS/jmods; then
mv $BACKUP_JMODS/jmods $EXPLODED/$BUILD_NAME/Contents/Home
fi
COPYFILE_DISABLE=1 tar -pczf $INPUT_FILE --exclude='*.dSYM' --exclude='man' -C $EXPLODED $BUILD_NAME
log "Finished zipping"
)
rm -rf "$EXPLODED"
log "Done"

View File

@@ -0,0 +1,82 @@
#!/bin/bash -x
# The following parameters must be specified:
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
# build_number - specifies the number of JetBrainsRuntime build
# bundle_type - specifies bundle to bu built; possible values:
# jcef - the bundles with jcef
# empty - the bundles without jcef
#
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
#
# $ ./java --version
# openjdk 11.0.6 2020-01-14
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
#
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
bundle_type=$4
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
source jb/project/tools/common.sh
function create_jbr {
if [ -z "${bundle_type}" ]; then
JBR_BUNDLE=jbr
else
JBR_BUNDLE=jbr_${bundle_type}
fi
cat modules.list > modules_tmp.list
rm -rf ${JBR_BUNDLE}
echo Running jlink....
${JSDK}/bin/jlink \
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
--add-modules $(xargs < modules_tmp.list | sed s/" "//g) --output ${JBR_BUNDLE} || exit $?
[ ! -z "${bundle_type}" ] && (cp -R jcef_win_x64/* ${JBR_BUNDLE}/bin || exit $?)
echo Modifying release info ...
cat ${JSDK}/release | tr -d '\r' | grep -v 'JAVA_VERSION' | grep -v 'MODULES' >> ${JBR_BUNDLE}/release
}
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
WORK_DIR=$(pwd)
git checkout -- modules.list
git checkout -- src/java.desktop/share/classes/module-info.java
[ -z "$bundle_type" ] && git apply -p0 < jb/project/tools/exclude_jcef_module.patch
PATH="/usr/local/bin:/usr/bin:${PATH}"
sh ./configure \
--disable-warnings-as-errors \
--with-target-bits=64 \
--with-vendor-name="${VENDOR_NAME}" \
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
--with-version-pre= \
--with-version-build=${JDK_BUILD_NUMBER} \
--with-version-opt=b${build_number} \
--with-toolchain-version=${TOOLCHAIN_VERSION} \
--with-import-modules=${WORK_DIR}/modular-sdk \
--with-boot-jdk=${BOOT_JDK} \
--disable-ccache \
--enable-cds=yes || exit 1
make LOG=info images CONF=windows-x86_64-server-release test-image || exit 1
JSDK=build/windows-x86_64-server-release/images/jdk
JBSDK=${JBRSDK_BASE_NAME}-windows-x64-b${build_number}
BASE_DIR=build/windows-x86_64-server-release/images
JBRSDK_BUNDLE=jbrsdk
rm -rf ${BASE_DIR}/${JBRSDK_BUNDLE} && rsync -a --exclude demo --exclude sample ${JSDK}/ ${JBRSDK_BUNDLE} || exit 1
cp -R jcef_win_x64/* ${JBRSDK_BUNDLE}/bin
sed 's/JBR/JBRSDK/g' ${JSDK}/release > release
mv release ${JBRSDK_BUNDLE}/release
create_jbr || exit $?

View File

@@ -0,0 +1,66 @@
#!/bin/bash -x
# The following parameters must be specified:
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
# build_number - specifies the number of JetBrainsRuntime build
# bundle_type - specifies bundle to bu built; possible values:
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
# jfx - the bundle 1) jbr with javafx only will be created
#
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
#
# $ ./java --version
# openjdk 11.0.6 2020-01-14
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
#
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
source jb/project/tools/common.sh
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
WORK_DIR=$(pwd)
[ -z "$bundle_type" ] && git apply -p0 < jb/project/tools/exclude_jcef_module.patch
PATH="/usr/local/bin:/usr/bin:${PATH}"
./configure \
--disable-warnings-as-errors \
--with-target-bits=32 \
--with-vendor-name="${VENDOR_NAME}" \
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
--with-version-pre= \
--with-version-build=${JDK_BUILD_NUMBER} \
--with-version-opt=b${build_number} \
--with-toolchain-version=${TOOLCHAIN_VERSION} \
--with-boot-jdk=${BOOT_JDK} \
--disable-ccache \
--enable-cds=yes || exit 1
make clean CONF=windows-x86-server-release || exit 1
make LOG=info images CONF=windows-x86-server-release test-image || exit 1
JBSDK=${JBRSDK_BASE_NAME}-windows-x86-b${build_number}
BASE_DIR=build/windows-x86-server-release/images
JSDK=${BASE_DIR}/jdk
JBRSDK_BUNDLE=jbrsdk
rm -rf ${BASE_DIR}/${JBRSDK_BUNDLE} && rsync -a --exclude demo --exclude sample ${JSDK}/ ${JBRSDK_BUNDLE} || exit 1
sed 's/JBR/JBRSDK/g' ${JSDK}/release > release
mv release ${JBRSDK_BUNDLE}/release
JBR_BUNDLE=jbr
rm -rf ${JBR_BUNDLE}
grep -v javafx modules.list | grep -v "jdk.internal.vm\|jdk.aot\|jcef" > modules.list.x86
${JSDK}/bin/jlink \
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
--add-modules $(xargs < modules.list.x86 | sed s/" "//g) --output ${JBR_BUNDLE} || exit $?
echo Modifying release info ...
#grep -v \"^JAVA_VERSION\" ${JSDK}/release | grep -v \"^MODULES\" >> ${JBR_BUNDLE}/release

View File

@@ -0,0 +1,57 @@
#!/bin/bash -x
# The following parameters must be specified:
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
# build_number - specifies the number of JetBrainsRuntime build
# jcef - the bundles with jcef
# empty - the bundles without jcef
#
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
#
# $ ./java --version
# openjdk 11.0.6 2020-01-14
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
#
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
bundle_type=$4
function pack_jbr {
if [ -z "${bundle_type}" ]; then
JBR_BUNDLE=jbr
else
JBR_BUNDLE=jbr_${bundle_type}
rm -rf ${BASE_DIR}/jbr
cp -R ${BASE_DIR}/${JBR_BUNDLE} ${BASE_DIR}/jbr
fi
JBR_BASE_NAME=${JBR_BUNDLE}-${JBSDK_VERSION}
JBR=$JBR_BASE_NAME-windows-x64-b$build_number
echo Creating $JBR.tar.gz ...
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR jbr || exit 1
}
JBRSDK_BASE_NAME=jbrsdk-$JBSDK_VERSION
JBR_BASE_NAME=jbr-$JBSDK_VERSION
IMAGES_DIR=build/windows-x86_64-server-release/images
JSDK=$IMAGES_DIR/jdk
JBSDK=$JBRSDK_BASE_NAME-windows-x64-b$build_number
BASE_DIR=.
JBRSDK_BUNDLE=jbrsdk
echo Creating $JBSDK.tar.gz ...
/usr/bin/tar -czf $JBSDK.tar.gz $JBRSDK_BUNDLE || exit 1
pack_jbr $bundle_type
JBRSDK_TEST=$JBRSDK_BASE_NAME-windows-test-x64-b$build_number
echo Creating $JBRSDK_TEST.tar.gz ...
/usr/bin/tar -czf $JBRSDK_TEST.tar.gz -C $IMAGES_DIR --exclude='test/jdk/demos' test || exit 1

View File

@@ -0,0 +1,45 @@
#!/bin/bash -x
# The following parameters must be specified:
# JBSDK_VERSION - specifies the current version of OpenJDK e.g. 11_0_6
# JDK_BUILD_NUMBER - specifies the number of OpenJDK build or the value of --with-version-build argument to configure
# build_number - specifies the number of JetBrainsRuntime build
# bundle_type - specifies bundle to bu built; possible values:
# jcef - the bundles 1) jbr with jcef+javafx, 2) jbrsdk and 3) test will be created
# jfx - the bundle 1) jbr with javafx only will be created
#
# jbrsdk-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
# jbr-${JBSDK_VERSION}-osx-x64-b${build_number}.tar.gz
#
# $ ./java --version
# openjdk 11.0.6 2020-01-14
# OpenJDK Runtime Environment (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number})
# OpenJDK 64-Bit Server VM (build 11.0.6+${JDK_BUILD_NUMBER}-b${build_number}, mixed mode)
#
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
JBRSDK_BASE_NAME=jbrsdk-$JBSDK_VERSION
JBR_BASE_NAME=jbr-$JBSDK_VERSION
IMAGES_DIR=build/windows-x86-server-release/images
JSDK=$IMAGES_DIR/jdk
JBSDK=$JBRSDK_BASE_NAME-windows-x86-b$build_number
BASE_DIR=.
JBRSDK_BUNDLE=jbrsdk
echo Creating $JBSDK.tar.gz ...
/usr/bin/tar -czf $JBSDK.tar.gz $JBRSDK_BUNDLE || exit 1
JBR_BUNDLE=jbr
JBR_BASE_NAME=jbr-${JBSDK_VERSION}
JBR=$JBR_BASE_NAME-windows-x86-b$build_number
echo Creating $JBR.tar.gz ...
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR ${JBR_BUNDLE} || exit 1
JBRSDK_TEST=$JBRSDK_BASE_NAME-windows-test-x86-b$build_number
echo Creating $JBRSDK_TEST.tar.gz ...
/usr/bin/tar -czf $JBRSDK_TEST.tar.gz -C $IMAGES_DIR --exclude='test/jdk/demos' test || exit 1

View File

@@ -345,10 +345,27 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_FEATURES],
fi
# Only enable ZGC on supported platforms
if (test "x$OPENJDK_TARGET_OS" = "xwindows" && test "x$OPENJDK_TARGET_CPU" = "xx86_64"); then
AC_MSG_CHECKING([if zgc can be built on windows])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[#include <windows.h>]],
[[struct MEM_EXTENDED_PARAMETER x;]])
],
[
AC_MSG_RESULT([yes])
CAN_BUILD_ZGC_ON_WINDOWS="yes"
],
[
AC_MSG_RESULT([no, missing required APIs])
CAN_BUILD_ZGC_ON_WINDOWS="no"
]
)
fi
AC_MSG_CHECKING([if zgc can be built])
if (test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK_TARGET_CPU" = "xx86_64") || \
(test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK_TARGET_CPU" = "xaarch64") || \
(test "x$OPENJDK_TARGET_OS" = "xwindows" && test "x$OPENJDK_TARGET_CPU" = "xx86_64") || \
(test "x$CAN_BUILD_ZGC_ON_WINDOWS" = "xyes") || \
(test "x$OPENJDK_TARGET_OS" = "xmacosx" && test "x$OPENJDK_TARGET_CPU" = "xx86_64"); then
AC_MSG_RESULT([yes])
else

View File

@@ -38,7 +38,7 @@ DEFAULT_VERSION_CLASSFILE_MAJOR=58 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
DEFAULT_VERSION_CLASSFILE_MINOR=0
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="13 14"
DEFAULT_JDK_SOURCE_TARGET_VERSION=14
DEFAULT_PROMOTED_VERSION_PRE=ea
DEFAULT_PROMOTED_VERSION_PRE=
LAUNCHER_NAME=openjdk
PRODUCT_NAME=OpenJDK

View File

@@ -154,6 +154,7 @@ public class GenerateJfrFiles {
boolean startTime;
boolean periodic;
boolean cutoff;
String commitState;
}
static class FieldElement {
@@ -219,14 +220,15 @@ public class GenerateJfrFiles {
currentType.name = attributes.getValue("name");
break;
case "Event":
EventElement eventtType = new EventElement();
eventtType.name = attributes.getValue("name");
eventtType.thread = getBoolean(attributes, "thread", false);
eventtType.stackTrace = getBoolean(attributes, "stackTrace", false);
eventtType.startTime = getBoolean(attributes, "startTime", true);
eventtType.periodic = attributes.getValue("period") != null;
eventtType.cutoff = getBoolean(attributes, "cutoff", false);
currentType = eventtType;
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;
break;
case "Field":
currentField = new FieldElement(metadata);
@@ -459,6 +461,7 @@ public class GenerateJfrFiles {
out.write("#include \"utilities/ticks.hpp\"");
out.write("#if INCLUDE_JFR");
out.write("#include \"jfr/recorder/service/jfrEvent.hpp\"");
out.write("#include \"jfr/support/jfrEpochSynchronization.hpp\"");
out.write("/*");
out.write(" * Each event class has an assert member function verify() which is invoked");
out.write(" * just before the engine writes the event and its fields to the data stream.");
@@ -523,7 +526,7 @@ public class GenerateJfrFiles {
}
out.write("");
if (!empty) {
printWriteData(out, t.fields);
printWriteData(out, t.fields, null);
}
out.write("};");
out.write("");
@@ -566,7 +569,7 @@ public class GenerateJfrFiles {
}
out.write("");
if (!empty) {
printWriteData(out, event.fields);
printWriteData(out, event.fields, event.commitState);
out.write("");
}
out.write(" using JfrEvent<Event" + event.name + ">::commit; // else commit() is hidden by overloaded versions in this class");
@@ -578,9 +581,13 @@ public class GenerateJfrFiles {
out.write("};");
}
private static void printWriteData(Printer out, List<FieldElement> fields) {
private static void printWriteData(Printer out, List<FieldElement> fields, String commitState) {
out.write(" template <typename Writer>");
out.write(" void writeData(Writer& w) {");
if (("_thread_in_native").equals(commitState)) {
out.write(" // explicit epoch synchronization check");
out.write(" JfrEpochSynchronization sync;");
}
for (FieldElement field : fields) {
if (field.struct) {
out.write(" _" + field.name + ".writeData(w);");

57
modules.list Normal file
View File

@@ -0,0 +1,57 @@
java.base,
java.compiler,
java.datatransfer,
java.desktop,
java.instrument,
java.logging,
java.management,
java.management.rmi,
java.naming,
java.net.http,
java.prefs,
java.rmi,
java.scripting,
java.se,
java.security.jgss,
java.security.sasl,
java.smartcardio,
java.sql,
java.sql.rowset,
java.transaction.xa,
java.xml,
java.xml.crypto,
jdk.accessibility,
jdk.aot,
jdk.attach,
jdk.charsets,
jdk.compiler,
jdk.crypto.cryptoki,
jdk.crypto.ec,
jdk.dynalink,
jdk.httpserver,
jdk.internal.ed,
jdk.internal.le,
jdk.internal.vm.ci,
jdk.internal.vm.compiler,
jdk.internal.vm.compiler.management,
jdk.jdi,
jdk.jdwp.agent,
jdk.jfr,
jdk.jsobject,
jdk.localedata,
jdk.management,
jdk.management.agent,
jdk.management.jfr,
jdk.naming.dns,
jdk.naming.rmi,
jdk.net,
jdk.scripting.nashorn,
jdk.scripting.nashorn.shell,
jdk.sctp,
jdk.security.auth,
jdk.security.jgss,
jdk.unsupported,
jdk.xml.dom,
jdk.zipfs,
jdk.hotspot.agent,
jcef

View File

@@ -2297,7 +2297,7 @@ const bool Matcher::need_masked_shift_count = false;
// No support for generic vector operands.
const bool Matcher::supports_generic_vector_operands = false;
MachOper* Matcher::specialize_generic_vector_operand(MachOper* original_opnd, uint ideal_reg) {
MachOper* Matcher::specialize_generic_vector_operand(MachOper* original_opnd, uint ideal_reg, bool is_temp) {
ShouldNotReachHere(); // generic vector operands not supported
return NULL;
}

View File

@@ -49,6 +49,8 @@ LIR_Opr FrameMap::map_to_opr(BasicType type, VMRegPair* reg, bool) {
opr = as_oop_opr(reg);
} else if (type == T_METADATA) {
opr = as_metadata_opr(reg);
} else if (type == T_ADDRESS) {
opr = as_address_opr(reg);
} else {
opr = as_opr(reg);
}

View File

@@ -759,7 +759,7 @@ void LIR_Assembler::reg2stack(LIR_Opr src, LIR_Opr dest, BasicType type, bool po
if (is_reference_type(type)) {
__ str(src->as_register(), frame_map()->address_for_slot(dest->single_stack_ix()));
__ verify_oop(src->as_register());
} else if (type == T_METADATA || type == T_DOUBLE) {
} else if (type == T_METADATA || type == T_DOUBLE || type == T_ADDRESS) {
__ str(src->as_register(), frame_map()->address_for_slot(dest->single_stack_ix()));
} else {
__ strw(src->as_register(), frame_map()->address_for_slot(dest->single_stack_ix()));
@@ -872,7 +872,7 @@ void LIR_Assembler::stack2reg(LIR_Opr src, LIR_Opr dest, BasicType type) {
if (is_reference_type(type)) {
__ ldr(dest->as_register(), frame_map()->address_for_slot(src->single_stack_ix()));
__ verify_oop(dest->as_register());
} else if (type == T_METADATA) {
} else if (type == T_METADATA || type == T_ADDRESS) {
__ ldr(dest->as_register(), frame_map()->address_for_slot(src->single_stack_ix()));
} else {
__ ldrw(dest->as_register(), frame_map()->address_for_slot(src->single_stack_ix()));

View File

@@ -1080,7 +1080,7 @@ const bool Matcher::convi2l_type_required = true;
// No support for generic vector operands.
const bool Matcher::supports_generic_vector_operands = false;
MachOper* Matcher::specialize_generic_vector_operand(MachOper* original_opnd, uint ideal_reg) {
MachOper* Matcher::specialize_generic_vector_operand(MachOper* original_opnd, uint ideal_reg, bool is_temp) {
ShouldNotReachHere(); // generic vector operands not supported
return NULL;
}

View File

@@ -80,10 +80,12 @@ LIR_Opr FrameMap::map_to_opr(BasicType type, VMRegPair* reg, bool) {
Register reg = r_1->as_Register();
if (r_2->is_Register() && (type == T_LONG || type == T_DOUBLE)) {
opr = as_long_opr(reg, r_2->as_Register());
} else if (type == T_OBJECT || type == T_ARRAY) {
} else if (is_reference_type(type)) {
opr = as_oop_opr(reg);
} else if (type == T_METADATA) {
opr = as_metadata_opr(reg);
} else if (type == T_ADDRESS) {
opr = as_address_opr(reg);
} else {
// PreferInterpreterNativeStubs should ensure we never need to
// handle a long opr passed as R3+stack_slot

View File

@@ -54,6 +54,10 @@ LIR_Opr FrameMap::map_to_opr(BasicType type, VMRegPair* reg, bool outgoing) {
opr = as_long_opr(reg);
} else if (is_reference_type(type)) {
opr = as_oop_opr(reg);
} else if (type == T_METADATA) {
opr = as_metadata_opr(reg);
} else if (type == T_ADDRESS) {
opr = as_address_opr(reg);
} else {
opr = as_opr(reg);
}

View File

@@ -2429,7 +2429,7 @@ const bool Matcher::need_masked_shift_count = true;
// No support for generic vector operands.
const bool Matcher::supports_generic_vector_operands = false;
MachOper* Matcher::specialize_generic_vector_operand(MachOper* original_opnd, uint ideal_reg) {
MachOper* Matcher::specialize_generic_vector_operand(MachOper* original_opnd, uint ideal_reg, bool is_temp) {
ShouldNotReachHere(); // generic vector operands not supported
return NULL;
}

View File

@@ -294,7 +294,7 @@ void PatchingStub::align_patch_site(MacroAssembler* masm) {
void PatchingStub::emit_code(LIR_Assembler* ce) {
// Copy original code here.
assert(NativeGeneralJump::instruction_size <= _bytes_to_copy && _bytes_to_copy <= 0xFF,
"not enough room for call");
"not enough room for call, need %d", _bytes_to_copy);
NearLabel call_patch;
@@ -331,7 +331,7 @@ void PatchingStub::emit_code(LIR_Assembler* ce) {
}
#endif
} else {
// Make a copy the code which is going to be patched.
// Make a copy of the code which is going to be patched.
for (int i = 0; i < _bytes_to_copy; i++) {
address ptr = (address)(_pc_start + i);
int a_byte = (*ptr) & 0xFF;

View File

@@ -50,6 +50,8 @@ LIR_Opr FrameMap::map_to_opr(BasicType type, VMRegPair* reg, bool outgoing) {
opr = as_oop_opr(reg);
} else if (type == T_METADATA) {
opr = as_metadata_opr(reg);
} else if (type == T_ADDRESS) {
opr = as_address_opr(reg);
} else {
opr = as_opr(reg);
}

View File

@@ -897,7 +897,7 @@ void LIR_Assembler::mem2reg(LIR_Opr src_opr, LIR_Opr dest, BasicType type, LIR_P
bool needs_patching = (patch_code != lir_patch_none);
if (addr->base()->type() == T_OBJECT) {
__ verify_oop(src);
__ verify_oop(src, FILE_AND_LINE);
}
PatchingStub* patch = NULL;
@@ -972,7 +972,7 @@ void LIR_Assembler::mem2reg(LIR_Opr src_opr, LIR_Opr dest, BasicType type, LIR_P
} else {
__ z_lg(dest->as_register(), disp_value, disp_reg, src);
}
__ verify_oop(dest->as_register());
__ verify_oop(dest->as_register(), FILE_AND_LINE);
break;
}
case T_FLOAT:
@@ -1006,8 +1006,8 @@ void LIR_Assembler::stack2reg(LIR_Opr src, LIR_Opr dest, BasicType type) {
if (dest->is_single_cpu()) {
if (is_reference_type(type)) {
__ mem2reg_opt(dest->as_register(), frame_map()->address_for_slot(src->single_stack_ix()), true);
__ verify_oop(dest->as_register());
} else if (type == T_METADATA) {
__ verify_oop(dest->as_register(), FILE_AND_LINE);
} else if (type == T_METADATA || type == T_ADDRESS) {
__ mem2reg_opt(dest->as_register(), frame_map()->address_for_slot(src->single_stack_ix()), true);
} else {
__ mem2reg_opt(dest->as_register(), frame_map()->address_for_slot(src->single_stack_ix()), false);
@@ -1033,9 +1033,9 @@ void LIR_Assembler::reg2stack(LIR_Opr src, LIR_Opr dest, BasicType type, bool po
if (src->is_single_cpu()) {
const Address dst = frame_map()->address_for_slot(dest->single_stack_ix());
if (is_reference_type(type)) {
__ verify_oop(src->as_register());
__ verify_oop(src->as_register(), FILE_AND_LINE);
__ reg2mem_opt(src->as_register(), dst, true);
} else if (type == T_METADATA) {
} else if (type == T_METADATA || type == T_ADDRESS) {
__ reg2mem_opt(src->as_register(), dst, true);
} else {
__ reg2mem_opt(src->as_register(), dst, false);
@@ -1079,7 +1079,7 @@ void LIR_Assembler::reg2reg(LIR_Opr from_reg, LIR_Opr to_reg) {
ShouldNotReachHere();
}
if (is_reference_type(to_reg->type())) {
__ verify_oop(to_reg->as_register());
__ verify_oop(to_reg->as_register(), FILE_AND_LINE);
}
}
@@ -1095,7 +1095,7 @@ void LIR_Assembler::reg2mem(LIR_Opr from, LIR_Opr dest_opr, BasicType type,
bool needs_patching = (patch_code != lir_patch_none);
if (addr->base()->is_oop_register()) {
__ verify_oop(dest);
__ verify_oop(dest, FILE_AND_LINE);
}
PatchingStub* patch = NULL;
@@ -1130,7 +1130,7 @@ void LIR_Assembler::reg2mem(LIR_Opr from, LIR_Opr dest_opr, BasicType type,
assert(disp_reg != Z_R0 || Immediate::is_simm20(disp_value), "should have set this up");
if (is_reference_type(type)) {
__ verify_oop(from->as_register());
__ verify_oop(from->as_register(), FILE_AND_LINE);
}
bool short_disp = Immediate::is_uimm12(disp_value);
@@ -2412,7 +2412,7 @@ void LIR_Assembler::emit_alloc_obj(LIR_OpAllocObj* op) {
op->klass()->as_register(),
*op->stub()->entry());
__ bind(*op->stub()->continuation());
__ verify_oop(op->obj()->as_register());
__ verify_oop(op->obj()->as_register(), FILE_AND_LINE);
}
void LIR_Assembler::emit_alloc_array(LIR_OpAllocArray* op) {
@@ -2548,7 +2548,7 @@ void LIR_Assembler::emit_typecheck_helper(LIR_OpTypeCheck *op, Label* success, L
}
assert(obj != k_RInfo, "must be different");
__ verify_oop(obj);
__ verify_oop(obj, FILE_AND_LINE);
// Get object class.
// Not a safepoint as obj null check happens earlier.
@@ -3009,7 +3009,7 @@ void LIR_Assembler::emit_profile_type(LIR_OpProfileType* op) {
assert(do_null || do_update, "why are we here?");
assert(!TypeEntries::was_null_seen(current_klass) || do_update, "why are we here?");
__ verify_oop(obj);
__ verify_oop(obj, FILE_AND_LINE);
if (do_null || tmp1 != obj DEBUG_ONLY(|| true)) {
__ z_ltgr(tmp1, obj);

View File

@@ -40,7 +40,7 @@
void C1_MacroAssembler::inline_cache_check(Register receiver, Register iCache) {
Label ic_miss, ic_hit;
verify_oop(receiver);
verify_oop(receiver, FILE_AND_LINE);
int klass_offset = oopDesc::klass_offset_in_bytes();
if (!ImplicitNullChecks || MacroAssembler::needs_explicit_null_check(klass_offset)) {
@@ -83,7 +83,7 @@ void C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hd
assert_different_registers(hdr, obj, disp_hdr);
NearLabel done;
verify_oop(obj);
verify_oop(obj, FILE_AND_LINE);
// Load object header.
z_lg(hdr, Address(obj, hdr_offset));
@@ -158,7 +158,7 @@ void C1_MacroAssembler::unlock_object(Register hdr, Register obj, Register disp_
// Load object.
z_lg(obj, Address(disp_hdr, BasicObjectLock::obj_offset_in_bytes()));
}
verify_oop(obj);
verify_oop(obj, FILE_AND_LINE);
// Test if object header is pointing to the displaced header, and if so, restore
// the displaced header in the object. If the object header is not pointing to
// the displaced header, get the object header instead.
@@ -278,7 +278,7 @@ void C1_MacroAssembler::initialize_object(
// call(RuntimeAddress(Runtime1::entry_for (Runtime1::dtrace_object_alloc_id)));
// }
verify_oop(obj);
verify_oop(obj, FILE_AND_LINE);
}
void C1_MacroAssembler::allocate_array(
@@ -336,16 +336,15 @@ void C1_MacroAssembler::allocate_array(
// call(RuntimeAddress(Runtime1::entry_for (Runtime1::dtrace_object_alloc_id)));
// }
verify_oop(obj);
verify_oop(obj, FILE_AND_LINE);
}
#ifndef PRODUCT
void C1_MacroAssembler::verify_stack_oop(int stack_offset) {
Unimplemented();
// if (!VerifyOops) return;
// verify_oop_addr(Address(SP, stack_offset + STACK_BIAS));
if (!VerifyOops) return;
verify_oop_addr(Address(Z_SP, stack_offset), FILE_AND_LINE);
}
void C1_MacroAssembler::verify_not_null_oop(Register r) {
@@ -354,7 +353,7 @@ void C1_MacroAssembler::verify_not_null_oop(Register r) {
compareU64_and_branch(r, (intptr_t)0, bcondNotEqual, not_null);
stop("non-null oop required");
bind(not_null);
verify_oop(r);
verify_oop(r, FILE_AND_LINE);
}
void C1_MacroAssembler::invalidate_registers(Register preserve1,

View File

@@ -339,7 +339,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
oop_maps->add_gc_map(call_offset, map);
restore_live_registers_except_r2(sasm);
__ verify_oop(obj);
__ verify_oop(obj, FILE_AND_LINE);
__ z_br(Z_R14);
}
break;
@@ -405,7 +405,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
oop_maps->add_gc_map(call_offset, map);
restore_live_registers_except_r2(sasm);
__ verify_oop(obj);
__ verify_oop(obj, FILE_AND_LINE);
__ z_br(Z_R14);
}
break;
@@ -423,7 +423,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
restore_live_registers_except_r2(sasm);
// Z_R2,: new multi array
__ verify_oop(Z_R2);
__ verify_oop(Z_R2, FILE_AND_LINE);
__ z_br(Z_R14);
}
break;

View File

@@ -400,11 +400,11 @@ void G1BarrierSetAssembler::resolve_jobject(MacroAssembler* masm, Register value
__ z_tmll(tmp1, JNIHandles::weak_tag_mask); // Test for jweak tag.
__ z_braz(Lnot_weak);
__ verify_oop(value);
__ verify_oop(value, FILE_AND_LINE);
DecoratorSet decorators = IN_NATIVE | ON_PHANTOM_OOP_REF;
g1_write_barrier_pre(masm, decorators, (const Address*)NULL, value, noreg, tmp1, tmp2, true);
__ bind(Lnot_weak);
__ verify_oop(value);
__ verify_oop(value, FILE_AND_LINE);
__ bind(Ldone);
}

View File

@@ -108,7 +108,7 @@ void BarrierSetAssembler::resolve_jobject(MacroAssembler* masm, Register value,
__ z_nill(value, ~JNIHandles::weak_tag_mask);
__ z_lg(value, 0, value); // Resolve (untagged) jobject.
__ verify_oop(value);
__ verify_oop(value, FILE_AND_LINE);
__ bind(Ldone);
}

View File

@@ -1664,7 +1664,7 @@ void InterpreterMacroAssembler::profile_obj_type(Register obj, Address mdo_addr,
compareU64_and_branch(obj, (intptr_t)0, Assembler::bcondEqual, null_seen);
}
verify_oop(obj);
MacroAssembler::verify_oop(obj, FILE_AND_LINE);
load_klass(klass, obj);
// Klass seen before, nothing to do (regardless of unknown bit).
@@ -2073,7 +2073,7 @@ void InterpreterMacroAssembler::access_local_int(Register index, Register dst) {
}
void InterpreterMacroAssembler::verify_oop(Register reg, TosState state) {
if (state == atos) { MacroAssembler::verify_oop(reg); }
if (state == atos) { MacroAssembler::verify_oop(reg, FILE_AND_LINE); }
}
// Inline assembly for:

View File

@@ -3587,7 +3587,7 @@ void MacroAssembler::get_vm_result(Register oop_result) {
z_lg(oop_result, Address(Z_thread, JavaThread::vm_result_offset()));
clear_mem(Address(Z_thread, JavaThread::vm_result_offset()), sizeof(void*));
verify_oop(oop_result);
verify_oop(oop_result, FILE_AND_LINE);
}
void MacroAssembler::get_vm_result_2(Register result) {
@@ -6813,26 +6813,94 @@ void MacroAssembler::verify_thread() {
}
}
// Save and restore functions: Exclude Z_R0.
void MacroAssembler::save_volatile_regs(Register dst, int offset, bool include_fp, bool include_flags) {
z_stmg(Z_R1, Z_R5, offset, dst); offset += 5 * BytesPerWord;
if (include_fp) {
z_std(Z_F0, Address(dst, offset)); offset += BytesPerWord;
z_std(Z_F1, Address(dst, offset)); offset += BytesPerWord;
z_std(Z_F2, Address(dst, offset)); offset += BytesPerWord;
z_std(Z_F3, Address(dst, offset)); offset += BytesPerWord;
z_std(Z_F4, Address(dst, offset)); offset += BytesPerWord;
z_std(Z_F5, Address(dst, offset)); offset += BytesPerWord;
z_std(Z_F6, Address(dst, offset)); offset += BytesPerWord;
z_std(Z_F7, Address(dst, offset)); offset += BytesPerWord;
}
if (include_flags) {
Label done;
z_mvi(Address(dst, offset), 2); // encoding: equal
z_bre(done);
z_mvi(Address(dst, offset), 4); // encoding: higher
z_brh(done);
z_mvi(Address(dst, offset), 1); // encoding: lower
bind(done);
}
}
void MacroAssembler::restore_volatile_regs(Register src, int offset, bool include_fp, bool include_flags) {
z_lmg(Z_R1, Z_R5, offset, src); offset += 5 * BytesPerWord;
if (include_fp) {
z_ld(Z_F0, Address(src, offset)); offset += BytesPerWord;
z_ld(Z_F1, Address(src, offset)); offset += BytesPerWord;
z_ld(Z_F2, Address(src, offset)); offset += BytesPerWord;
z_ld(Z_F3, Address(src, offset)); offset += BytesPerWord;
z_ld(Z_F4, Address(src, offset)); offset += BytesPerWord;
z_ld(Z_F5, Address(src, offset)); offset += BytesPerWord;
z_ld(Z_F6, Address(src, offset)); offset += BytesPerWord;
z_ld(Z_F7, Address(src, offset)); offset += BytesPerWord;
}
if (include_flags) {
z_cli(Address(src, offset), 2); // see encoding above
}
}
// Plausibility check for oops.
void MacroAssembler::verify_oop(Register oop, const char* msg) {
if (!VerifyOops) return;
BLOCK_COMMENT("verify_oop {");
Register tmp = Z_R0;
unsigned int nbytes_save = 5*BytesPerWord;
address entry = StubRoutines::verify_oop_subroutine_entry_address();
unsigned int nbytes_save = (5 + 8 + 1) * BytesPerWord;
address entry_addr = StubRoutines::verify_oop_subroutine_entry_address();
save_return_pc();
push_frame_abi160(nbytes_save);
z_stmg(Z_R1, Z_R5, frame::z_abi_160_size, Z_SP);
z_lgr(Z_ARG2, oop);
load_const(Z_ARG1, (address) msg);
load_const(Z_R1, entry);
// Push frame, but preserve flags
z_lgr(Z_R0, Z_SP);
z_lay(Z_SP, -((int64_t)nbytes_save + frame::z_abi_160_size), Z_SP);
z_stg(Z_R0, _z_abi(callers_sp), Z_SP);
save_volatile_regs(Z_SP, frame::z_abi_160_size, true, true);
lgr_if_needed(Z_ARG2, oop);
load_const_optimized(Z_ARG1, (address)msg);
load_const_optimized(Z_R1, entry_addr);
z_lg(Z_R1, 0, Z_R1);
call_c(Z_R1);
z_lmg(Z_R1, Z_R5, frame::z_abi_160_size, Z_SP);
restore_volatile_regs(Z_SP, frame::z_abi_160_size, true, true);
pop_frame();
restore_return_pc();
BLOCK_COMMENT("} verify_oop ");
}
void MacroAssembler::verify_oop_addr(Address addr, const char* msg) {
if (!VerifyOops) return;
BLOCK_COMMENT("verify_oop {");
unsigned int nbytes_save = (5 + 8) * BytesPerWord;
address entry_addr = StubRoutines::verify_oop_subroutine_entry_address();
save_return_pc();
unsigned int frame_size = push_frame_abi160(nbytes_save); // kills Z_R0
save_volatile_regs(Z_SP, frame::z_abi_160_size, true, false);
z_lg(Z_ARG2, addr.plus_disp(frame_size));
load_const_optimized(Z_ARG1, (address)msg);
load_const_optimized(Z_R1, entry_addr);
z_lg(Z_R1, 0, Z_R1);
call_c(Z_R1);
restore_volatile_regs(Z_SP, frame::z_abi_160_size, true, false);
pop_frame();
restore_return_pc();

View File

@@ -973,8 +973,15 @@ class MacroAssembler: public Assembler {
// Verify Z_thread contents.
void verify_thread();
// Save and restore functions: Exclude Z_R0.
void save_volatile_regs( Register dst, int offset, bool include_fp, bool include_flags);
void restore_volatile_regs(Register src, int offset, bool include_fp, bool include_flags);
// Only if +VerifyOops.
// Kills Z_R0.
void verify_oop(Register reg, const char* s = "broken oop");
// Kills Z_R0, condition code.
void verify_oop_addr(Address addr, const char* msg = "contains broken oop");
// TODO: verify_method and klass metadata (compare against vptr?).
void _verify_method_ptr(Register reg, const char * msg, const char * file, int line) {}

View File

@@ -85,7 +85,7 @@ void MethodHandles::verify_klass(MacroAssembler* _masm,
BLOCK_COMMENT("verify_klass {");
__ verify_oop(obj_reg);
__ verify_oop(obj_reg, FILE_AND_LINE);
__ compareU64_and_branch(obj_reg, (intptr_t)0L, Assembler::bcondEqual, L_bad);
__ load_klass(temp_reg, obj_reg);
// klass_addr is a klass in allstatic SystemDictionaryHandles. Can't get GCed.
@@ -194,22 +194,22 @@ void MethodHandles::jump_to_lambda_form(MacroAssembler* _masm,
BLOCK_COMMENT("jump_to_lambda_form {");
// Load the invoker, as MH -> MH.form -> LF.vmentry
__ verify_oop(recv);
__ verify_oop(recv, FILE_AND_LINE);
__ load_heap_oop(method_temp,
Address(recv,
NONZERO(java_lang_invoke_MethodHandle::form_offset_in_bytes())),
noreg, noreg, IS_NOT_NULL);
__ verify_oop(method_temp);
__ verify_oop(method_temp, FILE_AND_LINE);
__ load_heap_oop(method_temp,
Address(method_temp,
NONZERO(java_lang_invoke_LambdaForm::vmentry_offset_in_bytes())),
noreg, noreg, IS_NOT_NULL);
__ verify_oop(method_temp);
__ verify_oop(method_temp, FILE_AND_LINE);
__ load_heap_oop(method_temp,
Address(method_temp,
NONZERO(java_lang_invoke_MemberName::method_offset_in_bytes())),
noreg, noreg, IS_NOT_NULL);
__ verify_oop(method_temp);
__ verify_oop(method_temp, FILE_AND_LINE);
__ z_lg(method_temp,
Address(method_temp,
NONZERO(java_lang_invoke_ResolvedMethodName::vmtarget_offset_in_bytes())));
@@ -385,7 +385,7 @@ void MethodHandles::generate_method_handle_dispatch(MacroAssembler* _masm,
Register temp1_recv_klass = temp1;
if (iid != vmIntrinsics::_linkToStatic) {
__ verify_oop(receiver_reg);
__ verify_oop(receiver_reg, FILE_AND_LINE);
if (iid == vmIntrinsics::_linkToSpecial) {
// Don't actually load the klass; just null-check the receiver.
__ null_check(receiver_reg);

View File

@@ -1661,7 +1661,7 @@ const bool Matcher::need_masked_shift_count = false;
// No support for generic vector operands.
const bool Matcher::supports_generic_vector_operands = false;
MachOper* Matcher::specialize_generic_vector_operand(MachOper* original_opnd, uint ideal_reg) {
MachOper* Matcher::specialize_generic_vector_operand(MachOper* original_opnd, uint ideal_reg, bool is_temp) {
ShouldNotReachHere(); // generic vector operands not supported
return NULL;
}

View File

@@ -892,9 +892,9 @@ static void verify_oop_args(MacroAssembler *masm,
if (r->is_stack()) {
__ z_lg(Z_R0_scratch,
Address(Z_SP, r->reg2stack() * VMRegImpl::stack_slot_size + wordSize));
__ verify_oop(Z_R0_scratch);
__ verify_oop(Z_R0_scratch, FILE_AND_LINE);
} else {
__ verify_oop(r->as_Register());
__ verify_oop(r->as_Register(), FILE_AND_LINE);
}
}
}
@@ -2686,7 +2686,7 @@ AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm
__ z_ltgr(Z_ARG1, Z_ARG1);
__ z_bre(ic_miss);
}
__ verify_oop(Z_ARG1);
__ verify_oop(Z_ARG1, FILE_AND_LINE);
// Check ic: object class <-> cached class
// Compress cached class for comparison. That's more efficient.
@@ -2955,7 +2955,7 @@ void SharedRuntime::generate_deopt_blob() {
#ifdef ASSERT
// verify that there is really an exception oop in JavaThread
__ z_lg(Z_ARG1, Address(Z_thread, JavaThread::exception_oop_offset()));
__ verify_oop(Z_ARG1);
__ MacroAssembler::verify_oop(Z_ARG1, FILE_AND_LINE);
// verify that there is no pending exception
__ asm_assert_mem8_is_zero(in_bytes(Thread::pending_exception_offset()), Z_thread,

View File

@@ -667,6 +667,17 @@ class StubGenerator: public StubCodeGenerator {
return start;
}
#if !defined(PRODUCT)
// Wrapper which calls oopDesc::is_oop_or_null()
// Only called by MacroAssembler::verify_oop
static void verify_oop_helper(const char* message, oopDesc* o) {
if (!oopDesc::is_oop_or_null(o)) {
fatal("%s. oop: " PTR_FORMAT, message, p2i(o));
}
++ StubRoutines::_verify_oop_count;
}
#endif
// Return address of code to be called from code generated by
// MacroAssembler::verify_oop.
//
@@ -679,6 +690,11 @@ class StubGenerator: public StubCodeGenerator {
// StubCodeMark mark(this, "StubRoutines", "verify_oop_stub");
address start = 0;
#if !defined(PRODUCT)
start = CAST_FROM_FN_PTR(address, verify_oop_helper);
#endif
return start;
}

View File

@@ -55,6 +55,8 @@ LIR_Opr FrameMap::map_to_opr(BasicType type, VMRegPair* reg, bool outgoing) {
opr = as_oop_opr(reg);
} else if (type == T_METADATA) {
opr = as_metadata_opr(reg);
} else if (type == T_ADDRESS) {
opr = as_address_opr(reg);
} else {
opr = as_opr(reg);
}

View File

@@ -1818,7 +1818,7 @@ const bool Matcher::need_masked_shift_count = false;
// No support for generic vector operands.
const bool Matcher::supports_generic_vector_operands = false;
MachOper* Matcher::specialize_generic_vector_operand(MachOper* original_opnd, uint ideal_reg) {
MachOper* Matcher::specialize_generic_vector_operand(MachOper* original_opnd, uint ideal_reg, bool is_temp) {
ShouldNotReachHere(); // generic vector operands not supported
return NULL;
}

View File

@@ -54,6 +54,8 @@ LIR_Opr FrameMap::map_to_opr(BasicType type, VMRegPair* reg, bool) {
opr = as_oop_opr(reg);
} else if (type == T_METADATA) {
opr = as_metadata_opr(reg);
} else if (type == T_ADDRESS) {
opr = as_address_opr(reg);
} else {
opr = as_opr(reg);
}

View File

@@ -935,7 +935,7 @@ void LIR_Assembler::reg2stack(LIR_Opr src, LIR_Opr dest, BasicType type, bool po
if (is_reference_type(type)) {
__ verify_oop(src->as_register());
__ movptr (dst, src->as_register());
} else if (type == T_METADATA) {
} else if (type == T_METADATA || type == T_ADDRESS) {
__ movptr (dst, src->as_register());
} else {
__ movl (dst, src->as_register());
@@ -1116,7 +1116,7 @@ void LIR_Assembler::stack2reg(LIR_Opr src, LIR_Opr dest, BasicType type) {
if (is_reference_type(type)) {
__ movptr(dest->as_register(), frame_map()->address_for_slot(src->single_stack_ix()));
__ verify_oop(dest->as_register());
} else if (type == T_METADATA) {
} else if (type == T_METADATA || type == T_ADDRESS) {
__ movptr(dest->as_register(), frame_map()->address_for_slot(src->single_stack_ix()));
} else {
__ movl(dest->as_register(), frame_map()->address_for_slot(src->single_stack_ix()));

View File

@@ -512,6 +512,19 @@ void ShenandoahBarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet d
// 3: apply keep-alive barrier if needed
if (ShenandoahBarrierSet::need_keep_alive_barrier(decorators, type)) {
__ push_IU_state();
// That path can be reached from the c2i adapter with live fp
// arguments in registers.
LP64_ONLY(assert(Argument::n_float_register_parameters_j == 8, "8 fp registers to save at java call"));
__ subptr(rsp, 64);
__ movdbl(Address(rsp, 0), xmm0);
__ movdbl(Address(rsp, 8), xmm1);
__ movdbl(Address(rsp, 16), xmm2);
__ movdbl(Address(rsp, 24), xmm3);
__ movdbl(Address(rsp, 32), xmm4);
__ movdbl(Address(rsp, 40), xmm5);
__ movdbl(Address(rsp, 48), xmm6);
__ movdbl(Address(rsp, 56), xmm7);
Register thread = NOT_LP64(tmp_thread) LP64_ONLY(r15_thread);
assert_different_registers(dst, tmp1, tmp_thread);
if (!thread->is_valid()) {
@@ -527,6 +540,15 @@ void ShenandoahBarrierSetAssembler::load_at(MacroAssembler* masm, DecoratorSet d
tmp1 /* tmp */,
true /* tosca_live */,
true /* expand_call */);
__ movdbl(xmm0, Address(rsp, 0));
__ movdbl(xmm1, Address(rsp, 8));
__ movdbl(xmm2, Address(rsp, 16));
__ movdbl(xmm3, Address(rsp, 24));
__ movdbl(xmm4, Address(rsp, 32));
__ movdbl(xmm5, Address(rsp, 40));
__ movdbl(xmm6, Address(rsp, 48));
__ movdbl(xmm7, Address(rsp, 56));
__ addptr(rsp, 64);
__ pop_IU_state();
}
}

View File

@@ -30,6 +30,8 @@
#include "code/nativeInst.hpp"
#include "code/vtableStubs.hpp"
#include "gc/shared/gcLocker.hpp"
#include "gc/shared/barrierSet.hpp"
#include "gc/shared/barrierSetAssembler.hpp"
#include "interpreter/interpreter.hpp"
#include "logging/log.hpp"
#include "memory/resourceArea.hpp"

View File

@@ -1438,9 +1438,14 @@ const bool Matcher::match_rule_supported_vector(int opcode, int vlen, BasicType
// x86 supports generic vector operands: vec and legVec.
const bool Matcher::supports_generic_vector_operands = true;
MachOper* Matcher::specialize_generic_vector_operand(MachOper* generic_opnd, uint ideal_reg) {
MachOper* Matcher::specialize_generic_vector_operand(MachOper* generic_opnd, uint ideal_reg, bool is_temp) {
assert(Matcher::is_generic_vector(generic_opnd), "not generic");
bool legacy = (generic_opnd->opcode() == LEGVEC);
if (!VM_Version::supports_avx512vlbwdq() && // KNL
is_temp && !legacy && (ideal_reg == Op_VecZ)) {
// Conservatively specialize 512bit vec TEMP operands to legVecZ (zmm0-15) on KNL.
return new legVecZOper();
}
if (legacy) {
switch (ideal_reg) {
case Op_VecS: return new legVecSOper();
@@ -2138,7 +2143,7 @@ operand vecZ() %{
// Replaces legVec during post-selection cleanup. See above.
operand legVecZ() %{
constraint(ALLOC_IN_RC(vectorz_reg_vl));
constraint(ALLOC_IN_RC(vectorz_reg_legacy));
match(VecZ);
format %{ %}

View File

@@ -465,6 +465,7 @@ void AOTCodeHeap::link_shared_runtime_symbols() {
SET_AOT_GLOBAL_SYMBOL_VALUE("_resolve_virtual_entry", address, SharedRuntime::get_resolve_virtual_call_stub());
SET_AOT_GLOBAL_SYMBOL_VALUE("_resolve_opt_virtual_entry", address, SharedRuntime::get_resolve_opt_virtual_call_stub());
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_deopt_blob_unpack", address, SharedRuntime::deopt_blob()->unpack());
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_deopt_blob_unpack_with_exception_in_tls", address, SharedRuntime::deopt_blob()->unpack_with_exception_in_tls());
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_deopt_blob_uncommon_trap", address, SharedRuntime::deopt_blob()->uncommon_trap());
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_ic_miss_stub", address, SharedRuntime::get_ic_miss_stub());
SET_AOT_GLOBAL_SYMBOL_VALUE("_aot_handle_wrong_method_stub", address, SharedRuntime::get_handle_wrong_method_stub());

View File

@@ -185,6 +185,10 @@ class FrameMap : public CompilationResourceObj {
return LIR_OprFact::single_cpu_metadata(cpu_reg2rnr(r));
}
static LIR_Opr as_address_opr(Register r) {
return LIR_OprFact::single_cpu_address(cpu_reg2rnr(r));
}
FrameMap(ciMethod* method, int monitors, int reserved_argument_area_size);
bool finalize_frame(int nof_slots);

View File

@@ -371,7 +371,11 @@ Klass* ClassListParser::load_current_class(TRAPS) {
if (!HAS_PENDING_EXCEPTION && (obj != NULL)) {
klass = java_lang_Class::as_Klass(obj);
} else { // load classes in bootclasspath/a
tty->print_cr("Class %s was not loaded from the system classloader", this->current_class_name());
if (HAS_PENDING_EXCEPTION) {
oop throwable = PENDING_EXCEPTION;
java_lang_Throwable::print(throwable, tty);
tty->cr();
CLEAR_PENDING_EXCEPTION;
}
@@ -380,6 +384,7 @@ Klass* ClassListParser::load_current_class(TRAPS) {
if (k != NULL) {
klass = k;
} else {
tty->print_cr("Class %s is not found from SystemDictionary::resolve_or_null(..) == null", this->current_class_name());
if (!HAS_PENDING_EXCEPTION) {
THROW_NULL(vmSymbols::java_lang_ClassNotFoundException());
}

View File

@@ -265,6 +265,7 @@ InstanceKlass* ClassLoaderExt::load_class(Symbol* name, const char* path, TRAPS)
ClassFileStream* stream = NULL;
ClassPathEntry* e = find_classpath_entry_from_cache(path, CHECK_NULL);
if (e == NULL) {
log_warning(cds)("Preload Warning: ClassPathEntry is not found for class %s and path %s", class_name, path);
return NULL;
}
{
@@ -329,12 +330,14 @@ ClassPathEntry* ClassLoaderExt::find_classpath_entry_from_cache(const char* path
struct stat st;
if (os::stat(path, &st) != 0) {
// File or directory not found
log_warning(cds)("Preload Warning: Source path %s is not found", path);
return NULL;
}
ClassPathEntry* new_entry = NULL;
new_entry = create_class_path_entry(path, &st, false, false, false, CHECK_NULL);
if (new_entry == NULL) {
log_warning(cds)("Preload Warning: The create_class_path_entry() call for path %s returned NULL", path);
return NULL;
}
ccpe._path = strdup(path);

View File

@@ -51,7 +51,15 @@ void DebugInfoWriteStream::write_metadata(Metadata* h) {
}
oop DebugInfoReadStream::read_oop() {
oop o = code()->oop_at(read_int());
nmethod* nm = const_cast<CompiledMethod*>(code())->as_nmethod_or_null();
oop o;
if (nm != NULL) {
// Despite these oops being found inside nmethods that are on-stack,
// they are not kept alive by all GCs (e.g. G1 and Shenandoah).
o = nm->oop_at_phantom(read_int());
} else {
o = code()->oop_at(read_int());
}
assert(oopDesc::is_oop_or_null(o), "oop only");
return o;
}

View File

@@ -104,7 +104,7 @@ void CompilationPolicy::compile_if_required(const methodHandle& selected_method,
return;
}
CompileBroker::compile_method(selected_method, InvocationEntryBci,
CompilationPolicy::policy()->initial_compile_level(),
CompilationPolicy::policy()->initial_compile_level(selected_method),
methodHandle(), 0, CompileTask::Reason_MustBeCompiled, CHECK);
}
}

View File

@@ -59,7 +59,7 @@ public:
static CompileTask* select_task_helper(CompileQueue* compile_queue);
// Return initial compile level that is used with Xcomp
virtual CompLevel initial_compile_level() = 0;
virtual CompLevel initial_compile_level(const methodHandle& method) = 0;
virtual int compiler_count(CompLevel comp_level) = 0;
// main notification entry, return a pointer to an nmethod if the OSR is required,
// returns NULL otherwise.
@@ -97,7 +97,7 @@ class SimpleCompPolicy : public CompilationPolicy {
void method_back_branch_event(const methodHandle& m, int bci, JavaThread* thread);
public:
SimpleCompPolicy() : _compiler_count(0) { }
virtual CompLevel initial_compile_level() { return CompLevel_highest_tier; }
virtual CompLevel initial_compile_level(const methodHandle& m) { return CompLevel_highest_tier; }
virtual int compiler_count(CompLevel comp_level);
virtual void do_safepoint_work();
virtual void reprofile(ScopeDesc* trap_scope, bool is_osr);

View File

@@ -57,9 +57,6 @@ bool CompilationModeFlag::initialize() {
jio_fprintf(defaultStream::error_stream(), "Unsupported compilation mode '%s', supported modes are: quick-only, high-only, high-only-quick-internal\n", CompilationMode);
return false;
}
if (disable_intermediate()) {
CompLevel_initial_compile = CompLevel_full_optimization;
}
}
return true;
}
@@ -74,16 +71,6 @@ CompLevel CompLevel_highest_tier = CompLevel_simple; // pure C
CompLevel CompLevel_highest_tier = CompLevel_none;
#endif
#if defined(TIERED)
CompLevel CompLevel_initial_compile = CompLevel_full_profile; // tiered
#elif defined(COMPILER1) || INCLUDE_JVMCI
CompLevel CompLevel_initial_compile = CompLevel_simple; // pure C1 or JVMCI
#elif defined(COMPILER2)
CompLevel CompLevel_initial_compile = CompLevel_full_optimization; // pure C2
#else
CompLevel CompLevel_initial_compile = CompLevel_none;
#endif
#if defined(COMPILER2)
CompMode Compilation_mode = CompMode_server;
#elif defined(COMPILER1)
@@ -145,7 +132,6 @@ intx CompilerConfig::scaled_freq_log(intx freq_log, double scale) {
void set_client_compilation_mode() {
Compilation_mode = CompMode_client;
CompLevel_highest_tier = CompLevel_simple;
CompLevel_initial_compile = CompLevel_simple;
FLAG_SET_ERGO(TieredCompilation, false);
FLAG_SET_ERGO(ProfileInterpreter, false);
#if INCLUDE_JVMCI

View File

@@ -83,7 +83,6 @@ public:
#endif
extern CompLevel CompLevel_highest_tier;
extern CompLevel CompLevel_initial_compile;
enum CompMode {
CompMode_none = 0,

View File

@@ -307,6 +307,78 @@ void TieredThresholdPolicy::initialize() {
set_start_time(os::javaTimeMillis());
}
#ifdef ASSERT
bool TieredThresholdPolicy::verify_level(CompLevel level) {
// AOT and interpreter levels are always valid.
if (level == CompLevel_aot || level == CompLevel_none) {
return true;
}
if (CompilationModeFlag::normal()) {
return true;
} else if (CompilationModeFlag::quick_only()) {
return level == CompLevel_simple;
} else if (CompilationModeFlag::high_only()) {
return level == CompLevel_full_optimization;
} else if (CompilationModeFlag::high_only_quick_internal()) {
return level == CompLevel_full_optimization || level == CompLevel_simple;
}
return false;
}
#endif
CompLevel TieredThresholdPolicy::limit_level(CompLevel level) {
if (CompilationModeFlag::quick_only()) {
level = MIN2(level, CompLevel_simple);
}
assert(verify_level(level), "Invalid compilation level %d", level);
if (level <= TieredStopAtLevel) {
return level;
}
// Some compilation levels are not valid depending on a compilation mode:
// a) quick_only - levels 2,3,4 are invalid; levels -1,0,1 are valid;
// b) high_only - levels 1,2,3 are invalid; levels -1,0,4 are valid;
// c) high_only_quick_internal - levels 2,3 are invalid; levels -1,0,1,4 are valid.
// The invalid levels are actually sequential so a single comparison is sufficient.
// Down here we already have (level > TieredStopAtLevel), which also implies that
// (TieredStopAtLevel < Highest Possible Level), so we need to return a level that is:
// a) a max level that is strictly less than the highest for a given compilation mode
// b) less or equal to TieredStopAtLevel
if (CompilationModeFlag::normal() || CompilationModeFlag::quick_only()) {
return (CompLevel)TieredStopAtLevel;
}
if (CompilationModeFlag::high_only() || CompilationModeFlag::high_only_quick_internal()) {
return MIN2(CompLevel_none, (CompLevel)TieredStopAtLevel);
}
ShouldNotReachHere();
return CompLevel_any;
}
CompLevel TieredThresholdPolicy::initial_compile_level_helper(const methodHandle& method) {
if (CompilationModeFlag::normal()) {
return CompLevel_full_profile;
} else if (CompilationModeFlag::quick_only()) {
return CompLevel_simple;
} else if (CompilationModeFlag::high_only()) {
return CompLevel_full_optimization;
} else if (CompilationModeFlag::high_only_quick_internal()) {
if (force_comp_at_level_simple(method)) {
return CompLevel_simple;
} else {
return CompLevel_full_optimization;
}
}
ShouldNotReachHere();
return CompLevel_any;
}
CompLevel TieredThresholdPolicy::initial_compile_level(const methodHandle& method) {
return limit_level(initial_compile_level_helper(method));
}
void TieredThresholdPolicy::set_carry_if_necessary(InvocationCounter *counter) {
if (!counter->carry() && counter->count() > InvocationCounter::count_limit / 2) {
counter->set_carry_flag();
@@ -457,12 +529,7 @@ nmethod* TieredThresholdPolicy::event(const methodHandle& method, const methodHa
// Check if the method can be compiled, change level if necessary
void TieredThresholdPolicy::compile(const methodHandle& mh, int bci, CompLevel level, JavaThread* thread) {
assert(level <= TieredStopAtLevel, "Invalid compilation level");
if (CompilationModeFlag::quick_only()) {
assert(level <= CompLevel_simple, "Invalid compilation level");
} else if (CompilationModeFlag::disable_intermediate()) {
assert(level != CompLevel_full_profile && level != CompLevel_limited_profile, "C1 profiling levels shouldn't be used with intermediate levels disabled");
}
assert(verify_level(level) && level <= TieredStopAtLevel, "Invalid compilation level %d", level);
if (level == CompLevel_none) {
if (mh->has_compiled_code()) {
@@ -924,9 +991,11 @@ CompLevel TieredThresholdPolicy::common(Predicate p, const methodHandle& method,
}
}
}
return MIN2(next_level, CompilationModeFlag::quick_only() ? CompLevel_simple : (CompLevel)TieredStopAtLevel);
return limit_level(next_level);
}
// Determine if a method should be compiled with a normal entry point at a different level.
CompLevel TieredThresholdPolicy::call_event(const methodHandle& method, CompLevel cur_level, JavaThread* thread) {
CompLevel osr_level = MIN2((CompLevel) method->highest_osr_comp_level(),
@@ -1027,7 +1096,7 @@ void TieredThresholdPolicy::method_back_branch_event(const methodHandle& mh, con
if (level == CompLevel_aot) {
// Recompile the enclosing method to prevent infinite OSRs. Stay at AOT level while it's compiling.
if (max_osr_level != CompLevel_none && !CompileBroker::compilation_is_in_queue(mh)) {
CompLevel enclosing_level = MIN2(CompilationModeFlag::quick_only() ? CompLevel_simple : (CompLevel)TieredStopAtLevel, CompLevel_full_profile);
CompLevel enclosing_level = limit_level(CompLevel_full_profile);
compile(mh, InvocationEntryBci, enclosing_level, thread);
}
} else {

View File

@@ -170,8 +170,14 @@ class TieredThresholdPolicy : public CompilationPolicy {
inline void set_carry_if_necessary(InvocationCounter *counter);
// Set carry flags in the counters (in Method* and MDO).
inline void handle_counter_overflow(Method* method);
// Verify that a level is consistent with the compilation mode
bool verify_level(CompLevel level);
// Clamp the request level according to various constraints.
inline CompLevel limit_level(CompLevel level);
// Return desired initial compilation level for Xcomp
CompLevel initial_compile_level_helper(const methodHandle& method);
// Call and loop predicates determine whether a transition to a higher compilation
// level should be performed (pointers to predicate functions are passed to common_TF().
// level should be performed (pointers to predicate functions are passed to common().
// Predicates also take compiler load into account.
typedef bool (TieredThresholdPolicy::*Predicate)(int i, int b, CompLevel cur_level, const methodHandle& method);
bool call_predicate(int i, int b, CompLevel cur_level, const methodHandle& method);
@@ -253,7 +259,8 @@ public:
if (is_c2_compile(comp_level)) return c2_count();
return 0;
}
virtual CompLevel initial_compile_level() { return MIN2((CompLevel)TieredStopAtLevel, CompLevel_initial_compile); }
// Return initial compile level to use with Xcomp (depends on compilation mode).
virtual CompLevel initial_compile_level(const methodHandle& method);
virtual void do_safepoint_work() { }
virtual void delay_compilation(Method* method) { }
virtual void disable_compilation(Method* method) { }

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
/*
* Copyright (c) 2001, 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
@@ -2151,6 +2151,13 @@ bool G1CollectedHeap::try_collect_concurrently(GCCause::Cause cause,
return op.gc_succeeded();
}
// If VMOp skipped initiating concurrent marking cycle because
// we're terminating, then we're done.
if (op.terminating()) {
LOG_COLLECT_CONCURRENTLY(cause, "skipped: terminating");
return false;
}
// Lock to get consistent set of values.
uint old_marking_started_after;
uint old_marking_completed_after;

View File

@@ -152,7 +152,8 @@ protected:
enum G1Barrier {
G1BarrierNone,
G1BarrierCLD
G1BarrierCLD,
G1BarrierNoOptRoots // Do not collect optional roots.
};
enum G1Mark {

View File

@@ -246,7 +246,7 @@ void G1ParCopyClosure<barrier, do_mark_object>::do_oop_work(T* p) {
} else {
if (state.is_humongous()) {
_g1h->set_humongous_is_live(obj);
} else if (state.is_optional()) {
} else if ((barrier != G1BarrierNoOptRoots) && state.is_optional()) {
_par_scan_state->remember_root_into_optional_region(p);
}

View File

@@ -305,6 +305,15 @@ public:
}
void prepare() {
// Reset the claim and clear scan top for all regions, including
// regions currently not available or free. Since regions might
// become used during the collection these values must be valid
// for those regions as well.
for (size_t i = 0; i < _max_regions; i++) {
reset_region_claim((uint)i);
clear_scan_top((uint)i);
}
_all_dirty_regions = new G1DirtyRegions(_max_regions);
_next_dirty_regions = new G1DirtyRegions(_max_regions);
}
@@ -885,7 +894,6 @@ void G1RemSet::scan_collection_set_regions(G1ParScanThreadState* pss,
void G1RemSet::prepare_region_for_scan(HeapRegion* region) {
uint hrm_index = region->hrm_index();
_scan_state->reset_region_claim(hrm_index);
if (region->in_collection_set()) {
// Young regions had their card table marked as young at their allocation;
// we need to make sure that these marks are cleared at the end of GC, *but*
@@ -893,7 +901,6 @@ void G1RemSet::prepare_region_for_scan(HeapRegion* region) {
// So directly add them to the "all_dirty_regions".
// Same for regions in the (initial) collection set: they may contain cards from
// the log buffers, make sure they are cleaned.
_scan_state->clear_scan_top(hrm_index);
_scan_state->add_all_dirty_region(hrm_index);
} else if (region->is_old_or_humongous_or_archive()) {
_scan_state->set_scan_top(hrm_index, region->top());

View File

@@ -40,6 +40,14 @@ class G1SharedClosures {
public:
G1ParCopyClosure<G1BarrierNone, Mark> _oops;
G1ParCopyClosure<G1BarrierCLD, Mark> _oops_in_cld;
// We do not need (and actually should not) collect oops from nmethods into the
// optional collection set as we already automatically collect the corresponding
// nmethods in the region's strong code roots set. So set G1BarrierNoOptRoots in
// this closure.
// If these were present there would be opportunity for multiple threads to try
// to change this oop* at the same time. Since embedded oops are not necessarily
// word-aligned, this could lead to word tearing during update and crashes.
G1ParCopyClosure<G1BarrierNoOptRoots, Mark> _oops_in_nmethod;
G1CLDScanClosure _clds;
G1CodeBlobClosure _codeblobs;
@@ -47,6 +55,7 @@ public:
G1SharedClosures(G1CollectedHeap* g1h, G1ParScanThreadState* pss, bool process_only_dirty) :
_oops(g1h, pss),
_oops_in_cld(g1h, pss),
_oops_in_nmethod(g1h, pss),
_clds(&_oops_in_cld, process_only_dirty),
_codeblobs(pss->worker_id(), &_oops, needs_strong_processing()) {}
_codeblobs(pss->worker_id(), &_oops_in_nmethod, needs_strong_processing()) {}
};

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 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
@@ -47,6 +47,7 @@ VM_G1TryInitiateConcMark::VM_G1TryInitiateConcMark(uint gc_count_before,
_target_pause_time_ms(target_pause_time_ms),
_transient_failure(false),
_cycle_already_in_progress(false),
_terminating(false),
_gc_succeeded(false)
{}
@@ -66,7 +67,17 @@ void VM_G1TryInitiateConcMark::doit() {
G1CollectedHeap* g1h = G1CollectedHeap::heap();
GCCauseSetter x(g1h, _gc_cause);
if (!g1h->policy()->force_initial_mark_if_outside_cycle(_gc_cause)) {
// Record for handling by caller.
_terminating = g1h->_cm_thread->should_terminate();
if (_terminating && GCCause::is_user_requested_gc(_gc_cause)) {
// When terminating, the request to initiate a concurrent cycle will be
// ignored by do_collection_pause_at_safepoint; instead it will just do
// a young-only or mixed GC (depending on phase). For a user request
// there's no point in even doing that much, so done. For some non-user
// requests the alternative GC might still be needed.
} else if (!g1h->policy()->force_initial_mark_if_outside_cycle(_gc_cause)) {
// Failure to force the next GC pause to be an initial mark indicates
// there is already a concurrent marking cycle in progress. Set flag
// to notify the caller and return immediately.

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 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
@@ -52,6 +52,7 @@ class VM_G1TryInitiateConcMark : public VM_GC_Operation {
double _target_pause_time_ms;
bool _transient_failure;
bool _cycle_already_in_progress;
bool _terminating;
bool _gc_succeeded;
public:
@@ -63,6 +64,7 @@ public:
virtual void doit();
bool transient_failure() const { return _transient_failure; }
bool cycle_already_in_progress() const { return _cycle_already_in_progress; }
bool terminating() const { return _terminating; }
bool gc_succeeded() const { return _gc_succeeded; }
};

View File

@@ -472,7 +472,7 @@ void GenCollectedHeap::collect_generation(Generation* gen, bool full, size_t siz
HandleMark hm; // Discard invalid handles created during verification
Universe::verify("Before GC");
}
COMPILER2_PRESENT(DerivedPointerTable::clear());
COMPILER2_OR_JVMCI_PRESENT(DerivedPointerTable::clear());
if (restore_marks_for_biased_locking) {
// We perform this mark word preservation work lazily
@@ -520,7 +520,7 @@ void GenCollectedHeap::collect_generation(Generation* gen, bool full, size_t siz
rp->verify_no_references_recorded();
}
COMPILER2_PRESENT(DerivedPointerTable::update_pointers());
COMPILER2_OR_JVMCI_PRESENT(DerivedPointerTable::update_pointers());
gen->stat_record()->accumulated_time.stop();

View File

@@ -199,12 +199,8 @@ oop ShenandoahBarrierSet::load_reference_barrier_impl(oop obj) {
_heap->in_collection_set(obj) &&
obj == fwd) {
Thread *t = Thread::current();
if (t->is_GC_task_thread()) {
return _heap->evacuate_object(obj, t);
} else {
ShenandoahEvacOOMScope oom_evac_scope;
return _heap->evacuate_object(obj, t);
}
ShenandoahEvacOOMScope oom_evac_scope;
return _heap->evacuate_object(obj, t);
} else {
return fwd;
}
@@ -252,9 +248,7 @@ oop ShenandoahBarrierSet::load_reference_barrier_native(oop obj, oop* load_addr)
}
oop ShenandoahBarrierSet::load_reference_barrier_native(oop obj, narrowOop* load_addr) {
// Assumption: narrow oop version should not be used anywhere.
ShouldNotReachHere();
return NULL;
return load_reference_barrier_native_impl(obj, load_addr);
}
template <class T>
@@ -264,7 +258,7 @@ oop ShenandoahBarrierSet::load_reference_barrier_native_impl(oop obj, T* load_ad
}
ShenandoahMarkingContext* const marking_context = _heap->marking_context();
if (_heap->is_evacuation_in_progress() && !marking_context->is_marked(obj)) {
if (_heap->is_concurrent_root_in_progress() && !marking_context->is_marked(obj)) {
Thread* thr = Thread::current();
if (thr->is_Java_thread()) {
return NULL;

View File

@@ -57,7 +57,6 @@ bool ShenandoahBarrierSetNMethod::nmethod_entry_barrier(nmethod* nm) {
}
// Heal oops and disarm
ShenandoahEvacOOMScope scope;
ShenandoahNMethod::heal_nmethod(nm);
ShenandoahNMethod::disarm_nmethod(nm);
return true;

View File

@@ -111,12 +111,13 @@ ShenandoahEvacuateUpdateRootsClosure::ShenandoahEvacuateUpdateRootsClosure() :
template <class T>
void ShenandoahEvacuateUpdateRootsClosure::do_oop_work(T* p) {
assert(_heap->is_evacuation_in_progress(), "Only do this when evacuation is in progress");
assert(_heap->is_concurrent_root_in_progress(), "Only do this when evacuation is in progress");
T o = RawAccess<>::oop_load(p);
if (! CompressedOops::is_null(o)) {
oop obj = CompressedOops::decode_not_null(o);
if (_heap->in_collection_set(obj)) {
assert(_heap->is_evacuation_in_progress(), "Only do this when evacuation is in progress");
shenandoah_assert_marked(p, obj);
oop resolved = ShenandoahBarrierSet::resolve_forwarded_not_null(obj);
if (resolved == obj) {
@@ -139,11 +140,12 @@ ShenandoahEvacUpdateOopStorageRootsClosure::ShenandoahEvacUpdateOopStorageRootsC
}
void ShenandoahEvacUpdateOopStorageRootsClosure::do_oop(oop* p) {
assert(_heap->is_evacuation_in_progress(), "Only do this when evacuation is in progress");
assert(_heap->is_concurrent_root_in_progress(), "Only do this when evacuation is in progress");
oop obj = RawAccess<>::oop_load(p);
if (! CompressedOops::is_null(obj)) {
if (_heap->in_collection_set(obj)) {
assert(_heap->is_evacuation_in_progress(), "Only do this when evacuation is in progress");
shenandoah_assert_marked(p, obj);
oop resolved = ShenandoahBarrierSet::resolve_forwarded_not_null(obj);
if (resolved == obj) {

View File

@@ -155,7 +155,7 @@ void ShenandoahCodeRoots::flush_nmethod(nmethod* nm) {
}
}
void ShenandoahCodeRoots::prepare_concurrent_unloading() {
void ShenandoahCodeRoots::arm_nmethods() {
assert(SafepointSynchronize::is_at_safepoint(), "Must be at a safepoint");
_disarmed_value ++;
// 0 is reserved for new nmethod
@@ -215,7 +215,6 @@ public:
if (nm->is_unloading()) {
ShenandoahReentrantLocker locker(nm_data->lock());
ShenandoahEvacOOMScope evac_scope;
unlink(nm);
return;
}
@@ -223,8 +222,9 @@ public:
ShenandoahReentrantLocker locker(nm_data->lock());
// Heal oops and disarm
ShenandoahEvacOOMScope evac_scope;
ShenandoahNMethod::heal_nmethod(nm);
if (_heap->is_evacuation_in_progress()) {
ShenandoahNMethod::heal_nmethod(nm);
}
ShenandoahNMethod::disarm_nmethod(nm);
// Clear compiled ICs and exception caches

View File

@@ -109,7 +109,7 @@ public:
// Concurrent nmethod unloading support
static void unlink(WorkGang* workers, bool unloading_occurred);
static void purge(WorkGang* workers);
static void prepare_concurrent_unloading();
static void arm_nmethods();
static int disarmed_value() { return _disarmed_value; }
static int* disarmed_value_address() { return &_disarmed_value; }

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, Red Hat, Inc. All rights reserved.
* Copyright (c) 2019, 2020, Red Hat, Inc. All rights reserved.
*
* 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
@@ -47,6 +47,8 @@ bool ShenandoahConcurrentRoots::can_do_concurrent_class_unloading() {
}
bool ShenandoahConcurrentRoots::should_do_concurrent_class_unloading() {
ShenandoahHeap* const heap = ShenandoahHeap::heap();
return can_do_concurrent_class_unloading() &&
!ShenandoahHeap::heap()->is_stw_gc_in_progress();
heap->unload_classes() &&
!heap->is_stw_gc_in_progress();
}

View File

@@ -123,11 +123,3 @@ ShenandoahEvacOOMScope::ShenandoahEvacOOMScope() {
ShenandoahEvacOOMScope::~ShenandoahEvacOOMScope() {
ShenandoahHeap::heap()->leave_evacuation();
}
ShenandoahEvacOOMScopeLeaver::ShenandoahEvacOOMScopeLeaver() {
ShenandoahHeap::heap()->leave_evacuation();
}
ShenandoahEvacOOMScopeLeaver::~ShenandoahEvacOOMScopeLeaver() {
ShenandoahHeap::heap()->enter_evacuation();
}

View File

@@ -119,10 +119,4 @@ public:
~ShenandoahEvacOOMScope();
};
class ShenandoahEvacOOMScopeLeaver : public StackObj {
public:
ShenandoahEvacOOMScopeLeaver();
~ShenandoahEvacOOMScopeLeaver();
};
#endif // SHARE_GC_SHENANDOAH_SHENANDOAHEVACOOMHANDLER_HPP

View File

@@ -542,6 +542,7 @@ void ShenandoahHeap::print_on(outputStream* st) const {
if (is_degenerated_gc_in_progress()) st->print("degenerated gc, ");
if (is_full_gc_in_progress()) st->print("full gc, ");
if (is_full_gc_move_in_progress()) st->print("full gc move, ");
if (is_concurrent_root_in_progress()) st->print("concurrent roots, ");
if (cancelled_gc()) {
st->print("cancelled");
@@ -1329,7 +1330,9 @@ void ShenandoahHeap::object_iterate(ObjectClosure* cl) {
// Keep alive an object that was loaded with AS_NO_KEEPALIVE.
void ShenandoahHeap::keep_alive(oop obj) {
ShenandoahBarrierSet::barrier_set()->enqueue(obj);
if (is_concurrent_mark_in_progress()) {
ShenandoahBarrierSet::barrier_set()->enqueue(obj);
}
}
void ShenandoahHeap::heap_region_iterate(ShenandoahHeapRegionClosure* blk) const {
@@ -1540,6 +1543,11 @@ void ShenandoahHeap::op_final_mark() {
_free_set->rebuild();
}
if (!is_degenerated_gc_in_progress()) {
prepare_concurrent_roots();
prepare_concurrent_unloading();
}
// If collection set has candidates, start evacuation.
// Otherwise, bypass the rest of the cycle.
if (!collection_set()->is_empty()) {
@@ -1554,8 +1562,9 @@ void ShenandoahHeap::op_final_mark() {
set_has_forwarded_objects(true);
if (!is_degenerated_gc_in_progress()) {
prepare_concurrent_roots();
prepare_concurrent_unloading();
if (ShenandoahConcurrentRoots::should_do_concurrent_class_unloading()) {
ShenandoahCodeRoots::arm_nmethods();
}
evacuate_and_update_roots();
}
@@ -1669,7 +1678,7 @@ public:
};
void ShenandoahHeap::op_roots() {
if (is_evacuation_in_progress()) {
if (is_concurrent_root_in_progress()) {
if (ShenandoahConcurrentRoots::should_do_concurrent_class_unloading()) {
_unloader.unload();
}
@@ -2235,7 +2244,6 @@ void ShenandoahHeap::prepare_concurrent_roots() {
void ShenandoahHeap::prepare_concurrent_unloading() {
assert(SafepointSynchronize::is_at_safepoint(), "Must be at a safepoint");
if (ShenandoahConcurrentRoots::should_do_concurrent_class_unloading()) {
ShenandoahCodeRoots::prepare_concurrent_unloading();
_unloader.prepare();
}
}

View File

@@ -174,6 +174,7 @@ void ShenandoahNMethod::heal_nmethod(nmethod* nm) {
assert(data != NULL, "Sanity");
assert(data->lock()->owned_by_self(), "Must hold the lock");
ShenandoahEvacOOMScope evac_scope;
ShenandoahEvacuateUpdateRootsClosure cl;
data->oops_do(&cl, true /*fix relocation*/);
}

View File

@@ -41,7 +41,6 @@ ShenandoahClassUnloadingTask::ShenandoahClassUnloadingTask(BoolObjectClosure* is
}
void ShenandoahClassUnloadingTask::work(uint worker_id) {
ShenandoahEvacOOMScope scope;
_code_cache_task.work(worker_id);
// Clean all klasses that were not unloaded.
// The weak metadata in klass doesn't need to be

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2019, Red Hat, Inc. All rights reserved.
* Copyright (c) 2015, 2020, Red Hat, Inc. All rights reserved.
*
* 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
@@ -226,6 +226,7 @@ private:
ShenandoahThreadRoots _thread_roots;
ShenandoahCodeCacheRoots<ITR> _code_roots;
ShenandoahVMRoots<false /*concurrent*/ > _vm_roots;
ShenandoahStringDedupRoots _dedup_roots;
ShenandoahClassLoaderDataRoots<false /*concurrent*/, false /*single threaded*/>
_cld_roots;
public:

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, Red Hat, Inc. All rights reserved.
* Copyright (c) 2019, 2020, Red Hat, Inc. All rights reserved.
*
* 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
@@ -250,6 +250,9 @@ void ShenandoahRootScanner<ITR>::roots_do(uint worker_id, OopClosure* oops, CLDC
if (code != NULL && !ShenandoahConcurrentScanCodeRoots) {
_code_roots.code_blobs_do(code, worker_id);
}
AlwaysTrueClosure always_true;
_dedup_roots.oops_do(&always_true, oops, worker_id);
}
template <typename ITR>

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2019, Red Hat, Inc. All rights reserved.
* Copyright (c) 2018, 2020, Red Hat, Inc. All rights reserved.
*
* 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
@@ -173,7 +173,6 @@ public:
void work(uint worker_id) {
ShenandoahParallelWorkerSession worker_session(worker_id);
ShenandoahEvacOOMScope oom_evac_scope;
ShenandoahObjToScanQueueSet* queues = _heap->traversal_gc()->task_queues();
ShenandoahObjToScanQueue* q = queues->queue(worker_id);
@@ -194,9 +193,6 @@ public:
} else {
_rp->roots_do(worker_id, &roots_cl, &cld_cl, &code_cl);
}
AlwaysTrueClosure is_alive;
_dedup_roots.oops_do(&is_alive, &roots_cl, worker_id);
}
}
};
@@ -214,7 +210,6 @@ public:
void work(uint worker_id) {
ShenandoahConcurrentWorkerSession worker_session(worker_id);
ShenandoahSuspendibleThreadSetJoiner stsj(ShenandoahSuspendibleWorkers);
ShenandoahEvacOOMScope oom_evac_scope;
ShenandoahTraversalGC* traversal_gc = _heap->traversal_gc();
// Drain all outstanding work in queues.
@@ -237,7 +232,6 @@ public:
void work(uint worker_id) {
ShenandoahParallelWorkerSession worker_session(worker_id);
ShenandoahEvacOOMScope oom_evac_scope;
ShenandoahTraversalGC* traversal_gc = _heap->traversal_gc();
ShenandoahObjToScanQueueSet* queues = traversal_gc->task_queues();
@@ -542,7 +536,6 @@ void ShenandoahTraversalGC::main_loop_work(T* cl, jushort* live_data, uint worke
if (work == 0) {
// No more work, try to terminate
ShenandoahEvacOOMScopeLeaver oom_scope_leaver;
ShenandoahSuspendibleThreadSetLeaver stsl(sts_yield && ShenandoahSuspendibleWorkers);
ShenandoahTerminationTimingsTracker term_tracker(worker_id);
ShenandoahTerminatorTerminator tt(_heap);
@@ -811,7 +804,6 @@ private:
template <class T>
inline void do_oop_work(T* p) {
ShenandoahEvacOOMScope evac_scope;
_traversal_gc->process_oop<T, false /* string dedup */, false /* degen */, true /* atomic update */>(p, _thread, _queue, _mark_context);
}
@@ -834,7 +826,6 @@ private:
template <class T>
inline void do_oop_work(T* p) {
ShenandoahEvacOOMScope evac_scope;
_traversal_gc->process_oop<T, false /* string dedup */, true /* degen */, false /* atomic update */>(p, _thread, _queue, _mark_context);
}
@@ -861,7 +852,6 @@ public:
assert(worker_id == 0, "The code below is single-threaded, only one worker is expected");
ShenandoahParallelWorkerSession worker_session(worker_id);
ShenandoahSuspendibleThreadSetJoiner stsj(ShenandoahSuspendibleWorkers);
ShenandoahEvacOOMScope oom_evac_scope;
ShenandoahHeap* sh = ShenandoahHeap::heap();
@@ -968,7 +958,6 @@ public:
assert(sh->process_references(), "why else would we be here?");
shenandoah_assert_rp_isalive_installed();
ShenandoahEvacOOMScope evac_scope;
traversal_gc->main_loop(_worker_id, _terminator, false);
if (_reset_terminator) {
@@ -1010,7 +999,6 @@ public:
}
void work(uint worker_id) {
ShenandoahEvacOOMScope oom_evac_scope;
assert(ShenandoahSafepoint::is_at_shenandoah_safepoint(), "Must be at a safepoint");
ShenandoahHeap* heap = ShenandoahHeap::heap();
ShenandoahTraversalDrainMarkingStackClosure complete_gc(worker_id, _terminator);

View File

@@ -51,6 +51,7 @@ void ShenandoahTraversalGC::process_oop(T* p, Thread* thread, ShenandoahObjToSca
} else if (_heap->in_collection_set(obj)) {
oop forw = ShenandoahBarrierSet::resolve_forwarded_not_null(obj);
if (obj == forw) {
ShenandoahEvacOOMScope evac_scope;
forw = _heap->evacuate_object(obj, thread);
}
shenandoah_assert_forwarded_except(p, obj, _heap->cancelled_gc());

View File

@@ -79,7 +79,7 @@ class ShenandoahIsUnloadingBehaviour : public IsUnloadingBehaviour {
public:
virtual bool is_unloading(CompiledMethod* method) const {
nmethod* const nm = method->as_nmethod();
guarantee(ShenandoahHeap::heap()->is_evacuation_in_progress(), "Only this phase");
guarantee(ShenandoahHeap::heap()->is_concurrent_root_in_progress(), "Only this phase");
ShenandoahNMethod* data = ShenandoahNMethod::gc_data(nm);
ShenandoahReentrantLocker locker(data->lock());
ShenandoahIsUnloadingOopClosure cl;
@@ -166,7 +166,7 @@ public:
void ShenandoahUnload::unload() {
assert(ShenandoahConcurrentRoots::can_do_concurrent_class_unloading(), "Why we here?");
if (!ShenandoahHeap::heap()->is_evacuation_in_progress()) {
if (!ShenandoahHeap::heap()->is_concurrent_root_in_progress()) {
return;
}

View File

@@ -190,7 +190,7 @@ ZRootsIterator::ZRootsIterator(bool visit_jvmti_weak_export) :
assert(SafepointSynchronize::is_at_safepoint(), "Should be at safepoint");
ZStatTimer timer(ZSubPhasePauseRootsSetup);
Threads::change_thread_claim_token();
COMPILER2_PRESENT(DerivedPointerTable::clear());
COMPILER2_OR_JVMCI_PRESENT(DerivedPointerTable::clear());
if (ClassUnloading) {
nmethod::oops_do_marking_prologue();
} else {
@@ -207,7 +207,7 @@ ZRootsIterator::~ZRootsIterator() {
ZNMethod::oops_do_end();
}
COMPILER2_PRESENT(DerivedPointerTable::update_pointers());
COMPILER2_OR_JVMCI_PRESENT(DerivedPointerTable::update_pointers());
Threads::assert_all_threads_claimed();
}

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
@@ -131,7 +131,7 @@ void BFSClosure::closure_impl(UnifiedOopRef reference, const oop pointee) {
if (!_mark_bits->is_marked(pointee)) {
_mark_bits->mark_obj(pointee);
// is the pointee a sample object?
if (NULL == pointee->mark().to_pointer()) {
if (pointee->mark().is_marked()) {
add_chain(reference, pointee);
}
@@ -148,7 +148,7 @@ void BFSClosure::closure_impl(UnifiedOopRef reference, const oop pointee) {
void BFSClosure::add_chain(UnifiedOopRef reference, const oop pointee) {
assert(pointee != NULL, "invariant");
assert(NULL == pointee->mark().to_pointer(), "invariant");
assert(pointee->mark().is_marked(), "invariant");
Edge leak_edge(_current_parent, reference);
_edge_store->put_chain(&leak_edge, _current_parent == NULL ? 1 : _current_frontier_level + 2);
}

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
@@ -121,7 +121,7 @@ void DFSClosure::closure_impl(UnifiedOopRef reference, const oop pointee) {
assert(_mark_bits->is_marked(pointee), "invariant");
// is the pointee a sample object?
if (NULL == pointee->mark().to_pointer()) {
if (pointee->mark().is_marked()) {
add_chain();
}

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
@@ -231,7 +231,7 @@ StoredEdge* EdgeStore::associate_leak_context_with_candidate(const Edge* edge) {
StoredEdge* const leak_context_edge = put(edge->reference());
oop sample_object = edge->pointee();
assert(sample_object != NULL, "invariant");
assert(NULL == sample_object->mark().to_pointer(), "invariant");
assert(sample_object->mark().is_marked(), "invariant");
sample_object->set_mark(markWord::from_pointer(leak_context_edge));
return leak_context_edge;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 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,14 +67,11 @@ class ObjectSampleMarker : public StackObj {
assert(obj != NULL, "invariant");
// save the original markWord
_store->push(ObjectSampleMarkWord(obj, obj->mark()));
// now we will "poison" the mark word of the sample object
// to the intermediate monitor INFLATING state.
// This is an "impossible" state during a safepoint,
// hence we will use it to quickly identify sample objects
// during the reachability search from gc roots.
assert(NULL == markWord::INFLATING().to_pointer(), "invariant");
obj->set_mark(markWord::INFLATING());
assert(NULL == obj->mark().to_pointer(), "invariant");
// now we will set the mark word to "marked" in order to quickly
// identify sample objects during the reachability search from gc roots.
assert(!obj->mark().is_marked(), "should only mark an object once");
obj->set_mark(markWord::prototype().set_marked());
assert(obj->mark().is_marked(), "invariant");
}
};

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
@@ -53,12 +53,15 @@ EventEmitter::~EventEmitter() {
}
void EventEmitter::emit(ObjectSampler* sampler, int64_t cutoff_ticks, bool emit_all) {
assert(JfrStream_lock->owned_by_self(), "invariant");
assert(sampler != NULL, "invariant");
ResourceMark rm;
EdgeStore edge_store;
if (cutoff_ticks <= 0) {
// no reference chains
MutexLocker lock(JfrStream_lock, Mutex::_no_safepoint_check_flag);
// The lock is needed here to prevent the recorder thread (running flush())
// from writing old object events out from the thread local buffer
// before the required constant pools have been serialized.
JfrTicks time_stamp = JfrTicks::now();
EventEmitter emitter(time_stamp, time_stamp);
emitter.write_events(sampler, &edge_store, emit_all);
@@ -113,7 +116,9 @@ void EventEmitter::write_event(const ObjectSample* sample, EdgeStore* edge_store
traceid gc_root_id = 0;
const Edge* edge = NULL;
if (SafepointSynchronize::is_at_safepoint()) {
edge = (const Edge*)(sample->object())->mark().to_pointer();
if (!sample->object()->mark().is_marked()) {
edge = (const Edge*)(sample->object())->mark().to_pointer();
}
}
if (edge == NULL) {
// In order to dump out a representation of the event

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
@@ -35,8 +35,10 @@
#include "jfr/recorder/checkpoint/types/traceid/jfrTraceId.inline.hpp"
#include "jfr/recorder/service/jfrOptionSet.hpp"
#include "jfr/recorder/stacktrace/jfrStackTraceRepository.hpp"
#include "jfr/support/jfrMethodLookup.hpp"
#include "jfr/utilities/jfrHashtable.hpp"
#include "jfr/utilities/jfrTypes.hpp"
#include "oops/instanceKlass.inline.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/safepoint.hpp"
#include "runtime/thread.hpp"
@@ -108,6 +110,7 @@ void ObjectSampleCheckpoint::on_thread_exit(JavaThread* jt) {
static GrowableArray<traceid>* unloaded_klass_set = NULL;
static void add_to_unloaded_klass_set(traceid klass_id) {
assert_locked_or_safepoint(ClassLoaderDataGraph_lock);
if (unloaded_klass_set == NULL) {
unloaded_klass_set = c_heap_allocate_array<traceid>();
}
@@ -115,14 +118,16 @@ static void add_to_unloaded_klass_set(traceid klass_id) {
}
static void sort_unloaded_klass_set() {
assert_locked_or_safepoint(ClassLoaderDataGraph_lock);
if (unloaded_klass_set != NULL && unloaded_klass_set->length() > 1) {
unloaded_klass_set->sort(sort_traceid);
}
}
void ObjectSampleCheckpoint::on_klass_unload(const Klass* k) {
assert_locked_or_safepoint(ClassLoaderDataGraph_lock);
assert(k != NULL, "invariant");
add_to_unloaded_klass_set(TRACE_ID(k));
add_to_unloaded_klass_set(JfrTraceId::get(k));
}
template <typename Processor>
@@ -295,29 +300,31 @@ void ObjectSampleCheckpoint::on_rotation(const ObjectSampler* sampler, JfrStackT
assert(JfrStream_lock->owned_by_self(), "invariant");
assert(sampler != NULL, "invariant");
assert(LeakProfiler::is_running(), "invariant");
MutexLocker lock(ClassLoaderDataGraph_lock);
// the lock is needed to ensure the unload lists do not grow in the middle of inspection.
install_stack_traces(sampler, stack_trace_repo);
}
static traceid get_klass_id(traceid method_id) {
static bool is_klass_unloaded(traceid klass_id) {
assert(ClassLoaderDataGraph_lock->owned_by_self(), "invariant");
return unloaded_klass_set != NULL && predicate(unloaded_klass_set, klass_id);
}
static bool is_processed(traceid method_id) {
assert(method_id != 0, "invariant");
return method_id >> TRACE_ID_SHIFT;
}
static bool is_klass_unloaded(traceid method_id) {
return unloaded_klass_set != NULL && predicate(unloaded_klass_set, get_klass_id(method_id));
}
static bool is_processed(traceid id) {
assert(id != 0, "invariant");
assert(id_set != NULL, "invariant");
return mutable_predicate(id_set, id);
return mutable_predicate(id_set, method_id);
}
void ObjectSampleCheckpoint::add_to_leakp_set(const Method* method, traceid method_id) {
if (is_processed(method_id) || is_klass_unloaded(method_id)) {
void ObjectSampleCheckpoint::add_to_leakp_set(const InstanceKlass* ik, traceid method_id) {
assert(ik != NULL, "invariant");
if (is_processed(method_id) || is_klass_unloaded(JfrMethodLookup::klass_id(method_id))) {
return;
}
JfrTraceId::set_leakp(method);
const Method* const method = JfrMethodLookup::lookup(ik, method_id);
assert(method != NULL, "invariant");
assert(method->method_holder() == ik, "invariant");
JfrTraceId::set_leakp(ik, method);
}
void ObjectSampleCheckpoint::write_stacktrace(const JfrStackTrace* trace, JfrCheckpointWriter& writer) {
@@ -330,7 +337,7 @@ void ObjectSampleCheckpoint::write_stacktrace(const JfrStackTrace* trace, JfrChe
for (u4 i = 0; i < trace->_nr_of_frames; ++i) {
const JfrStackFrame& frame = trace->_frames[i];
frame.write(writer);
add_to_leakp_set(frame._method, frame._methodid);
add_to_leakp_set(frame._klass, frame._methodid);
}
}
@@ -413,6 +420,7 @@ void ObjectSampleCheckpoint::write(const ObjectSampler* sampler, EdgeStore* edge
}
static void clear_unloaded_klass_set() {
assert(ClassLoaderDataGraph_lock->owned_by_self(), "invariant");
if (unloaded_klass_set != NULL && unloaded_klass_set->is_nonempty()) {
unloaded_klass_set->clear();
}

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,12 +29,12 @@
#include "jfr/utilities/jfrTypes.hpp"
class EdgeStore;
class InstanceKlass;
class JavaThread;
class JfrCheckpointWriter;
class JfrStackTrace;
class JfrStackTraceRepository;
class Klass;
class Method;
class ObjectSample;
class ObjectSampleMarker;
class ObjectSampler;
@@ -45,7 +45,7 @@ class ObjectSampleCheckpoint : AllStatic {
friend class PathToGcRootsOperation;
friend class StackTraceBlobInstaller;
private:
static void add_to_leakp_set(const Method* method, traceid method_id);
static void add_to_leakp_set(const InstanceKlass* ik, traceid method_id);
static int save_mark_words(const ObjectSampler* sampler, ObjectSampleMarker& marker, bool emit_all);
static void write_stacktrace(const JfrStackTrace* trace, JfrCheckpointWriter& writer);
static void write(const ObjectSampler* sampler, EdgeStore* edge_store, bool emit_all, Thread* thread);

View File

@@ -31,7 +31,6 @@
#include "jfr/recorder/service/jfrOptionSet.hpp"
#include "logging/log.hpp"
#include "memory/iterator.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/thread.inline.hpp"
#include "runtime/vmThread.hpp"
@@ -83,7 +82,6 @@ void LeakProfiler::emit_events(int64_t cutoff_ticks, bool emit_all) {
if (!is_running()) {
return;
}
MutexLocker lock(JfrStream_lock);
// exclusive access to object sampler instance
ObjectSampler* const sampler = ObjectSampler::acquire();
assert(sampler != NULL, "invariant");

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2012, 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
@@ -464,7 +464,7 @@
<Field type="ulong" contentType="bytes" name="used" label="Used" />
</Event>
<Event name="Compilation" category="Java Virtual Machine, Compiler" label="Compilation" thread="true">
<Event name="Compilation" category="Java Virtual Machine, Compiler" label="Compilation" thread="true" commitState="_thread_in_native">
<Field type="uint" name="compileId" label="Compilation Identifier" relation="CompileId" />
<Field type="CompilerType" name="compiler" label="Compiler" />
<Field type="Method" name="method" label="Method" />
@@ -492,7 +492,7 @@
<Field type="string" name="descriptor" label="Method Descriptor" />
</Type>
<Event name="CompilerInlining" category="Java Virtual Machine, Compiler, Optimization" label="Method Inlining" thread="true" startTime="false">
<Event name="CompilerInlining" category="Java Virtual Machine, Compiler, Optimization" label="Method Inlining" thread="true" startTime="false" commitState="_thread_in_native">
<Field type="uint" name="compileId" label="Compilation Identifier" relation="CompileId" />
<Field type="Method" name="caller" label="Caller Method" />
<Field type="CalleeMethod" name="callee" struct="true" label="Callee Method" />
@@ -1023,36 +1023,6 @@
<Field type="ulong" contentType="bytes" name="size" label="Size Written" />
</Event>
<Event name="FlushStorage" category="Flight Recorder" label="Flush Storage" thread="false" experimental="true">
<Field type="ulong" name="flushId" label="Flush Identifier" relation="FlushId" />
<Field type="ulong" name="elements" label="Elements Written" />
<Field type="ulong" contentType="bytes" name="size" label="Size Written" />
</Event>
<Event name="FlushStacktrace" category="Flight Recorder" label="Flush Stacktrace" thread="false" experimental="true">
<Field type="ulong" name="flushId" label="Flush Identifier" relation="FlushId" />
<Field type="ulong" name="elements" label="Elements Written" />
<Field type="ulong" contentType="bytes" name="size" label="Size Written" />
</Event>
<Event name="FlushStringPool" category="Flight Recorder" label="Flush String Pool" thread="false" experimental="true">
<Field type="ulong" name="flushId" label="Flush Identifier" relation="FlushId" />
<Field type="ulong" name="elements" label="Elements Written" />
<Field type="ulong" contentType="bytes" name="size" label="Size Written" />
</Event>
<Event name="FlushMetadata" category="Flight Recorder" label="Flush Metadata" thread="false" experimental="true">
<Field type="ulong" name="flushId" label="Flush Identifier" relation="FlushId" />
<Field type="ulong" name="elements" label="Elements Written" />
<Field type="ulong" contentType="bytes" name="size" label="Size Written" />
</Event>
<Event name="FlushTypeSet" category="Flight Recorder" label="Flush Type Set" thread="false" experimental="true">
<Field type="ulong" name="flushId" label="Flush Identifier" relation="FlushId" />
<Field type="ulong" name="elements" label="Elements Written" />
<Field type="ulong" contentType="bytes" name="size" label="Size Written" />
</Event>
<Type name="DeoptimizationReason" label="Deoptimization Reason">
<Field type="string" name="reason" label="Reason" />
</Type>

View File

@@ -70,6 +70,7 @@
<xs:attribute name="stackTrace" type="xs:boolean" use="optional" />
<xs:attribute name="period" type="periodType" use="optional" />
<xs:attribute name="cutoff" type="xs:boolean" use="optional" />
<xs:attribute name="commitState" type="xs:string" use="optional" />
</xs:complexType>
</xs:element>
<xs:element maxOccurs="unbounded" name="Type">

View File

@@ -44,9 +44,9 @@
#include "logging/log.hpp"
#include "memory/iterator.hpp"
#include "memory/resourceArea.hpp"
#include "runtime/atomic.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/mutex.hpp"
#include "runtime/orderAccess.hpp"
#include "runtime/os.inline.hpp"
#include "runtime/safepoint.hpp"
@@ -172,7 +172,7 @@ static BufferPtr lease_free(size_t size, JfrCheckpointMspace* mspace, size_t ret
}
bool JfrCheckpointManager::use_epoch_transition_mspace(const Thread* thread) const {
return _service_thread != thread && _checkpoint_epoch_state != JfrTraceIdEpoch::epoch();
return _service_thread != thread && Atomic::load_acquire(&_checkpoint_epoch_state) != JfrTraceIdEpoch::epoch();
}
static const size_t lease_retry = 10;
@@ -333,7 +333,19 @@ static size_t write_mspace(JfrCheckpointMspace* mspace, JfrChunkWriter& chunkwri
return wo.processed();
}
void JfrCheckpointManager::synchronize_epoch() {
void JfrCheckpointManager::begin_epoch_shift() {
assert(SafepointSynchronize::is_at_safepoint(), "invariant");
JfrTraceIdEpoch::begin_epoch_shift();
}
void JfrCheckpointManager::end_epoch_shift() {
assert(SafepointSynchronize::is_at_safepoint(), "invariant");
debug_only(const u1 current_epoch = JfrTraceIdEpoch::current();)
JfrTraceIdEpoch::end_epoch_shift();
assert(current_epoch != JfrTraceIdEpoch::current(), "invariant");
}
void JfrCheckpointManager::synchronize_checkpoint_manager_with_current_epoch() {
assert(_checkpoint_epoch_state != JfrTraceIdEpoch::epoch(), "invariant");
OrderAccess::storestore();
_checkpoint_epoch_state = JfrTraceIdEpoch::epoch();
@@ -341,7 +353,7 @@ void JfrCheckpointManager::synchronize_epoch() {
size_t JfrCheckpointManager::write() {
const size_t processed = write_mspace<MutexedWriteOp, CompositeOperation>(_free_list_mspace, _chunkwriter);
synchronize_epoch();
synchronize_checkpoint_manager_with_current_epoch();
return processed;
}
@@ -361,11 +373,11 @@ size_t JfrCheckpointManager::flush() {
typedef DiscardOp<DefaultDiscarder<JfrBuffer> > DiscardOperation;
size_t JfrCheckpointManager::clear() {
JfrTypeSet::clear();
clear_type_set();
DiscardOperation discarder(mutexed); // mutexed discard mode
process_free_list(discarder, _free_list_mspace);
process_free_list(discarder, _epoch_transition_mspace);
synchronize_epoch();
synchronize_checkpoint_manager_with_current_epoch();
return discarder.elements();
}
@@ -410,18 +422,21 @@ size_t JfrCheckpointManager::write_static_type_set_and_threads() {
return write_epoch_transition_mspace();
}
void JfrCheckpointManager::shift_epoch() {
debug_only(const u1 current_epoch = JfrTraceIdEpoch::current();)
JfrTraceIdEpoch::shift_epoch();
assert(current_epoch != JfrTraceIdEpoch::current(), "invariant");
}
void JfrCheckpointManager::on_rotation() {
assert(SafepointSynchronize::is_at_safepoint(), "invariant");
JfrTypeManager::on_rotation();
notify_threads();
}
void JfrCheckpointManager::clear_type_set() {
assert(!SafepointSynchronize::is_at_safepoint(), "invariant");
assert(!JfrRecorder::is_recording(), "invariant");
// can safepoint here
MutexLocker cld_lock(ClassLoaderDataGraph_lock);
MutexLocker module_lock(Module_lock);
JfrTypeSet::clear();
}
void JfrCheckpointManager::write_type_set() {
assert(!SafepointSynchronize::is_at_safepoint(), "invariant");
if (LeakProfiler::is_running()) {

View File

@@ -85,11 +85,14 @@ class JfrCheckpointManager : public JfrCHeapObj {
size_t write_threads();
size_t write_static_type_set_and_threads();
bool is_type_set_required();
void clear_type_set();
void write_type_set();
static void write_type_set_for_unloaded_classes();
void shift_epoch();
void synchronize_epoch();
void begin_epoch_shift();
void end_epoch_shift();
void synchronize_checkpoint_manager_with_current_epoch();
void notify_threads();
JfrCheckpointManager(JfrChunkWriter& cw);

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