Compare commits

...

682 Commits

Author SHA1 Message Date
Konstantin Aleev
869b50a639 fix memory leaks in AccessibleJTree
(cherry picked from commit 561a7b8def)
2021-01-14 17:41:24 +07:00
Vitaly Provodin
77cf8ed0dd JBR-2545 Clean up the list of ignored Render tests
(cherry picked from commit f7b4c42e1d)
2021-01-14 16:37:00 +07:00
Jayathirth D V
ffac8df8b1 8241490: Add large text performance tests in RenderPerfTest
(cherry picked from commit 803ee2f2b5)
2021-01-14 16:36:50 +07:00
Alexey Ushakov
24e29c8774 8230657: Create fine grained render perf test for metal pipeline
Converted gradle JUnit test to plain java for ant and gnumake

To run the tests:
cd src/demo/share/java2d/RenderPerfTest

ant run
or
java -jar dist/RenderPerfTest.jar
or
java -jar dist/RenderPerfTest.jar testWhiteTextBubblesGray

(cherry picked from commit 356121b18f)
2021-01-14 16:36:34 +07:00
Alexey Ushakov
838741cf0f 8230657: Create fine grained render perf test for metal pipeline
To run the tests:
cd src/demo/share/java2d/RenderPerfTest

sh gradlew test -i
or
sh gradlew test --tests *testWiredBoxBubbles* -i

(cherry picked from commit 8bd8d2d132)
2021-01-14 16:36:07 +07:00
Vitaly Provodin
61e6fb1586 add regression test on https://bugs.openjdk.java.net/browse/JDK-8139176
(cherry picked from commit 380c17456c)

(cherry picked from commit 6f1c0a6)
(cherry picked from commit 63130fd461)
2021-01-14 16:12:32 +07:00
Andrey Starovoyt
70d22558e6 JBR-2736 provide writeObjects implementation for copying files/folders from Project Explorer to the Finder
(cherry picked from commit 33db034d49)

(cherry picked from commit d3ec3d899d)
2021-01-14 15:53:05 +07:00
Vitaly Provodin
8f203c3da6 updated JTreg exclude list 2021-01-14 11:31:31 +07:00
Leonid Mesnik
7eb6a282e9 8244537: JDI tests fail due to "ERROR: Exception : nsk.share.jdi.JDITestRuntimeException: JDITestRuntimeException : ** event IS NOT a breakpoint **"
Reviewed-by: sspitsyn, amenkov
2021-01-14 11:31:31 +07:00
Alexey Ushakov
0b954aaa9c JBR-1997 JetBrainsMono fonts update to v0.22
(cherry picked from commit 41f4fddd34)
(cherry picked from commit f5302a02f4)
(cherry picked from commit 5d7fd2e1e5)
2020-12-25 23:02:52 +03:00
Alexey Ushakov
b48b9e0a27 JBR-1690 Bundle new fonts
Test correction

(cherry picked from commit aa13c8b4ea)
2020-12-25 22:28:18 +03:00
Vitaly Provodin
76609f3ae2 JBR-572: Regression test on the crash caused by the fix
(cherry picked from commit 6cc380ffb5)
(cherry picked from commit 958e25ed21)
(cherry picked from commit a7de601d5f)
2020-12-23 18:19:01 +07:00
Vitaly Provodin
7793fc89cb JBR-1618: fixed misprint, added saving screenshots in case of failure
(cherry picked from commit e4a3889cf0)
2020-12-23 18:14:37 +07:00
Vitaly Provodin
28ce81cb26 JRE-1117 J2DBench: introduced result reader for TC's charts 2020-12-23 17:53:23 +07:00
Vitaly Provodin
37d906e0bb enabling dtrace-tests: added dtrace keyword
(cherry picked from commit 0b5119ca89)
2020-12-23 17:51:35 +07:00
Vitaly Provodin
cb0245e66f moving diff-image file into the scratch directory
(cherry picked from commit d295bb0bbd)
2020-12-23 17:51:03 +07:00
Vitaly Provodin
efb04a90de JRE-9: added regression test
(cherry picked from commit 4ffb665)
(cherry picked from commit 00a29ad129)
2020-12-23 17:44:09 +07:00
Vitaly Provodin
d7b0ebd0e2 not for upstream: added disposing frames in order to provide the test with the chance on the second run
(cherry picked from commit 8170635)
(cherry picked from commit 7fc924f065)
2020-12-23 17:42:17 +07:00
Vitaly Provodin
4fe30ac595 JRE-741 added new regression test (Modal dialog stays above other process windows)
(cherry picked from commit 9ea664c299)
2020-12-23 17:36:16 +07:00
Vitaly Provodin
698d8f6f45 JRE-705 added new regression test (Z-order of child windows is broken on Mac OS)
(cherry picked from commit 82cd480619)
2020-12-23 17:36:01 +07:00
Vitaly Provodin
e52e6f85f6 JRE-501 added new regression test (Live resize is jerky for heavy java applications on Mac)
(cherry picked from commit c4a1277c1b)
2020-12-23 17:35:45 +07:00
Vitaly Provodin
ecb5ff220e JRE-457 added new regression test (OGLTR_DisableGlyphModeState is slow)
(cherry picked from commit 3a43f4557f)
2020-12-23 17:35:22 +07:00
Vitaly Provodin
50f97dd320 JRE-422 added new regression test (AWTView deliverJavaMouseEvent leaks jEvent)
(cherry picked from commit 37dc13c603)
2020-12-23 17:34:55 +07:00
Vitaly Provodin
fa3c1c0750 updated JTreg exclude list 2020-12-22 15:11:49 +07:00
Prasanta Sadhukhan
1dc6f955f6 8040914: Test javax/swing/JLabel/6596966/bug6596966.java fails : comboBox isn't focus owner
Reviewed-by: prr
2020-12-22 15:11:49 +07:00
Pankaj Bansal
57dd1b4bdd 8225790: Two NestedDialogs tests fail on Ubuntu
Reviewed-by: serb
2020-12-22 15:11:49 +07:00
Elena Sayapina
03fd0867a7 JBR-1905 [TESBUG] java/awt/TextArea/DisposeTest/TestDispose.java: frame is not disposed
- java/awt/TextArea/DisposeTest/TestDispose.java, java/awt/TextField/DisposeTest/TestDispose.java: fixed test frame disposal
- java/awt/Frame/DisposeStressTest/DisposeStressTest.java: decreased test timeout from 2h to 10 min, added minor diagnostic logging

(cherry picked from commit 7f025f4e16)
(cherry picked from commit dda7f3d871)
(cherry picked from commit bc09aadadb)
2020-12-21 14:22:56 +07:00
Elena Sayapina
71db65e090 JBR-2585 [TESTBUG] TouchScreenEvent tests affect tests simulating mouse actions
- added workaround for JBR-2585
- added README.md about manual test run
- made an update to close LinuxTouchScreenDevice properly
- added an error exit from linux shell script if sudo password is empty or chown fails

(cherry picked from commit 4deb3bbe61)
2020-12-19 15:28:58 +07:00
Elena Sayapina
8e0458c4e8 JBR-2041 [TEST] Added new regression test (Touchscreen devices support)
(cherry picked from commit 2d587b3728)
(cherry picked from commit 92606f2c7f)
(cherry picked from commit 05af375909)
(cherry picked from commit 0f895bf1b2)
(cherry picked from commit 08aa0852b7)
2020-12-19 15:24:15 +07:00
Elena Sayapina
22a229c23a JBR-2657 [TESTBUG] ChainOfPopupsFocusTest misbehaving on Windows
- changed open popup shortcut from Ctrl+N to Ctrl+M, so no new explorer windows appear if desktop gets focused by error
- added a click on the main test frame, so it gets focus when running from background cygwin process on Windows, otherwise it just flashes on the taskbar

(cherry picked from commit eda8e4d50e)
2020-12-19 14:34:16 +07:00
Elena Sayapina
d858fa2ac0 JBR-2630 Typing speed in IDE editor was dropped after switching to 11.0.8
Introduced sun.awt.osx.RobotSafeDelayMillis property to control macOS specific safe delay for Robot methods.
50 ms safe delay was initially hardcoded in 3862142d (JDK-8242174: [macos] The NestedModelessDialogTest test make the macOS unstable) which affected performance tests execution.

(cherry picked from commit 5f691bb788)
2020-12-19 14:32:29 +07:00
Elena Sayapina
068a76c54c JBR-1694: java.lang.IllegalArgumentException: Null charset name
Move GB18030.class from sun/nio/cs/ext (jdk.charsets) to sun/nio/cs (java.base),
so the charset is available during VM initialization on Windows.

(cherry picked from commit 588cfef576)
2020-12-19 14:32:29 +07:00
Elena Sayapina
7303892b7f IDEA-165950 [TEST] Added new regression test (National keyboard layouts support)
(cherry picked from commit 0900a705bc)
2020-12-19 14:32:28 +07:00
Elena Sayapina
2799cdbdfd JBR-2328 [TESTBUG] Regression test java/awt/keyboard/AllKeyCode/AllKeyCode.java is not correct
(cherry picked from commit 861f73c393)
(cherry picked from commit bfab6a9364)
(cherry picked from commit e9fa7a0882)
2020-12-18 16:45:28 +07:00
Elena Sayapina
3b27838dab JBR-1417 [TEST] Added new regression test (JBR 11 does not support chain of popups)
(cherry picked from commit 41e89505be)
(cherry picked from commit 9fe5c778d9)
(cherry picked from commit 6ea9530d9f)
(cherry picked from commit d757108517)
(cherry picked from commit b99c1e7b5c)
2020-12-18 16:34:27 +07:00
Elena Sayapina
93e8419be6 JBR-1380: [TESTBUG] Regression test java/awt/Graphics2D/DrawString/LCDTextSrcEa.java works incorrectly
(cherry picked from commit 95df9908f4)
2020-12-18 16:34:26 +07:00
Elena Sayapina
b94d5431da JBR-1102: [TESTBUG] java/awt/Paint/ComponentIsNotDrawnAfterRemoveAddTest/ComponentIsNotDrawnAfterRemoveAddTest.java: 'paint' method of 60 components was not called
(cherry picked from commit dc7abebe17)
(cherry picked from commit c8d631a142)
2020-12-18 15:49:39 +07:00
Elena Sayapina
2416c47967 JBR-1148: [TESTBUG] jb/sun/awt/macos/KeyPressAndHoldTest.java intermittently fails by timeout, added max time to wait, reverted ApplePressAndHoldEnabled check
(cherry picked from commit f368f0f101)
2020-12-18 15:49:39 +07:00
Elena Sayapina
40644b2736 JBR-998: [TEST] Added new regression test (Input freezes after MacOS key-selector on Mojave)
(cherry picked from commit 3d898a8024)
2020-12-18 15:49:38 +07:00
Elena Sayapina
53b6d61a17 JBR-1372: [TESTBUG] JDialog1054.java, MoveFocusShortcutTest.java regression tests need update
(cherry picked from commit a5948894bf)
2020-12-18 15:49:27 +07:00
Elena Sayapina
40559f86bf JBR-1146: [TESTBUG] Test jb/javax/swing/JDialog/JDialog1054.java intermittently fails by timeout
(cherry picked from commit 48b7dd874f)
2020-12-18 15:49:27 +07:00
Elena Sayapina
fffb0e9560 JBR-1054: [TEST] Added new regression test (Weird non-modal dialog above modal dialog behaviour)
(cherry picked from commit b808be6a6a)
2020-12-18 15:49:26 +07:00
Elena Sayapina
9a2941aa8e JBR-318: [TEST] Added new regression test (Cmd+` doesn't work after update to JDK 152_*)
(cherry picked from commit 0be0a018b5)
(cherry picked from commit 5bb4c2a1d6)
2020-12-18 15:49:16 +07:00
Alexey Ushakov
61ea0be9b2 JBR-1874 Cursor not changing from 'default' to 'text'
Prevent OS from changing cursor

(cherry picked from commit 94a4eb7002)
2020-12-11 15:47:25 +03:00
Alexey Ushakov
755e5f6b57 JBR-1778 Font in editor incorrect (always italics)
Added -it pattern into italic detection code
Added some more patterns to bold and italic detection code
'Anka/Coder' font support

(cherry picked from commit 5119eeee12)
(cherry picked from commit ec241e4a0a)
(cherry picked from commit 251068294e)
(cherry picked from commit 08ae9ff034)
2020-12-11 15:47:25 +03:00
Alexey Ushakov
12ba27af82 JBR-1699 Use platform font rendering for bundled fonts on MacOS
Use different family for specific font faces. Refactoring

(cherry picked from commit c423003bd4)
2020-12-11 15:47:25 +03:00
Alexey Ushakov
6a000c143e JBR-1624 Fonts rendering is broken in the 2019.2 EAP (Fira Code)
Lower priority for idea bundled fonts to pickup platform ones
(if installed)

(cherry picked from commit e838103a24)
2020-12-11 15:47:25 +03:00
Alexey Ushakov
13d71d1192 JBR-1885 JetBrainsMono fonts update to v0.19
Updated the fonts to v0.19. Bundled italic fonts

(cherry picked from commit 7f032e3fe7)
(cherry picked from commit a7b4c9449a)
2020-12-11 15:47:25 +03:00
Alexey Ushakov
d12863856a JBR-1624 Fonts rendering is broken in the 2019.2 EAP (Fira Code)
Lower priority for idea bundled fonts to pickup platform ones
(if installed)

(cherry picked from commit e838103a24)
2020-12-11 15:47:25 +03:00
Alexey Ushakov
d40efa111b JBR-1699 Use platform font rendering for bundled fonts on MacOS
Used CFont instead of TrueTypeFont for bundled fonts on mac
Use different family for specific font faces. Refactoring

(cherry picked from commit 8c86ad3e96)
(cherry picked from commit c423003bd4)
(cherry picked from commit bcae402dc8)
2020-12-11 15:47:25 +03:00
Alexey Ushakov
17ef2ad1d1 JBR-1690 Bundle new fonts
Update family name for JetBrainsMono-Thin

(cherry picked from commit 0d2326ff34)
(cherry picked from commit 83843f9124)
(cherry picked from commit 2a2e1cfb36)
(cherry picked from commit 76abb69262)
2020-12-11 15:40:45 +03:00
Alexey Ushakov
e916dca5a7 JBR-1645 javax/swing/JTextArea/TestTabSize.java: Tab width calculation wrong
Corrected idea font filter

(cherry picked from commit 62f9d1f46a)
2020-12-11 15:39:55 +03:00
Alexey Ushakov
8b0e632a0b JBR-1399 Improve font discovery and loading by introducing font cache
Bundle IDEA fonts to improve startup performance

(cherry picked from commit 350a3fdef3)
2020-12-11 10:34:57 +03:00
Dennis Ushakov
982846e60c JBR-1863, JBR-1868 correct advances on Catalina
(cherry picked from commit d5868e8fe1)
2020-12-10 18:58:40 +03:00
Dennis Ushakov
6567b4b1a9 JBR-1756 use CoreText for all font rendering on Catalina
(cherry picked from commit acdc0ea38e)
2020-12-10 18:57:29 +03:00
Alexey Ushakov
0cbec0caef JRE-1028 fwport(9): JRE-1008 Do not use LCD shader on macOS 10.14+ in font rendering
Disable LCD text shader on macOS 10.14+ if LCD rendering is not explicitly specified

(cherry picked from commit dffea9d701)
2020-12-10 18:48:58 +03:00
Alexey Ushakov
2a43129290 JRE-482 Java_sun_font_CStrike_getNativeGlyphOutline takes too much time in scrolling
Replaced glyph outlines with bounding boxes for glyph boundaries calculation for most common usages. Also, skipped unnecessary OGL flushes in OGL rendering queue

(cherry picked from commit c58dc052af48887338a38beb0c721eddca3af481)
(cherry picked from commit 7f6be7cfb907bbf1c3572b911df5690fa3039fde)
(cherry picked from commit c68913d82c0ba4b4c509179123f0a4bf7971f857)
(cherry picked from commit 9cfa04c93ad416a8177d9e7ca410850bd3ff880f)
(cherry picked from commit 0e930841704e4e98ecc0c888b144245e74218799)
(cherry picked from commit 8ffc190fbdb059d5a24842115c0bc3ade8b351b9)
(cherry picked from commit 0f7c26186a)
2020-12-10 18:37:31 +03:00
Alexey Ushakov
65a7cc6d22 JRE-444 CPlatformWindow.nativeGetTopmostPlatformWindowUnderMouse is slow
Replaced number of CGWindowListCopyWindowInfo for each window layer with [NSWindow windowNumberAtPoint: belowWindowWithWindowNumber:]

(cherry picked from commit 2a143af4d62340acdfd9c94d876f684385febbc8)
(cherry picked from commit 6fc369e8bf)
2020-12-10 18:16:05 +03:00
Alexey Ushakov
857891fb87 JRE-161 CCE in OGLTextRenderer.validateContext
Throw InvalidPipeException instead of CCE

(cherry picked from commit eafe84a8519b42dea5518cc91a27652befd91473)
(cherry picked from commit be707de431)
2020-12-10 18:14:53 +03:00
Alexey Ushakov
d26b57199c IDEA-144261 IDE is unusably slow when using a 4K display on OS X
2x increase  size of cached glyphs

(cherry picked from commit 52da5f8934ccc482a58606309e44de51521ed9e2)
(cherry picked from commit ee05ba1b33)
2020-12-10 18:07:40 +03:00
Alexey Ushakov
a8725f2acb 8257886 Build issue in macOS 10.14
Replaced detection logic with one constant because we have the same max texture size (16384) for all macs (https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf)
2020-12-09 21:00:14 +03:00
Alexey Ushakov
8c3873b7e8 JBR-745 Improve java2d rendering performance on macOS by using Metal framework
Corrected build failures with modern Xcode
2020-12-09 12:24:17 +03:00
Alexey Ushakov
81bf622589 JBR-745 Improve java2d rendering performance on macOS by using Metal framework
Backport from Lanai project. Last commit from main repo:
21d33db0 Jayathirth D V <jdv@openjdk.org> on 08.12.2020 at 12:22
2020-12-08 19:41:25 +03:00
Vitaly Provodin
96acea2265 JBR-2922 fix release info 2020-12-08 06:27:50 +07:00
Vitaly Provodin
946dcfe767 add a golden image for Emoji test & fix a misprint in exclude list 2020-12-07 09:04:50 +07:00
Vitaly Provodin
efecbac9bb JBR-2922 add JCEF to jbrsdk binaries
& fix a misprint in get_mods_list
2020-12-06 07:59:23 +07:00
Vitaly Provodin
fc222a0154 updated JTreg exclude list 2020-12-03 15:44:32 +07:00
Vitaly Provodin
2a7428f3d7 add git config settings for dcevm 2020-12-03 09:05:24 +07:00
Vitaly Provodin
48df5d367a JBR-2912 add JBR 15 builds with DCEVM 2020-12-03 05:21:08 +07:00
Vitaly Provodin
578da92dc2 JBR-2864 initial commit of DCEVM patches reworked for 15 2020-12-02 15:36:43 +07:00
Alexey Ushakov
d1cea2ff04 JRE-43 Font.getFamily() does not work in headless mode
Removed unused code

(cherry picked from commit 5b523f049e)
2020-11-29 02:13:05 -08:00
Alexey Ushakov
ba02769ca6 JRE-43 Font.getFamily() does not work in headless mode
Bundled Droid fonts to fallback in headless mode

(cherry picked from commit 5b523f049e)
2020-11-27 07:39:00 -08:00
Dmitry Batrak
8c8144a7c1 test case for JBR-1875
port from JBR 11 to JBR 15 (cherry picked from commit fc25d3598c)
2020-11-23 19:42:17 +03:00
Dmitry Batrak
6a30c56138 JBR-2248 Support text wrapping in a <pre> tag in JEditorPane
port from JBR 11 to JBR 15 (cherry picked from commit ff2e915371)
2020-11-23 19:18:37 +03:00
Dmitry Batrak
93ad4f06dd JBR-2234 Support CSS setting overflow-wrap:anywhere in JEditorPane
port from JBR 11 to JBR 15 (cherry picked from commits b6583d0a71, 6003abc15f)
2020-11-23 19:18:37 +03:00
Dmitry Batrak
d3018a1837 JBR-2050 Issue with keycap emojis
port from JBR 11 to JBR 15 (cherry picked from commit ae91e1d7f1)
2020-11-23 18:48:08 +03:00
Dmitry Batrak
2bf43a57ab JBR-1987 Korean/Thai characters not printed properly in annotation tooltip (e.g. spellchecker)
This changes the fonts JDK uses for font fallback on Windows. These used to be DokChampa (for Thai) and Batang/Gulim/Gulim (for Korean).
Those fonts are not available by default on Windows 10, user needs to install supplementary font language packs to get them.
Now the following fonts will be used - Tahoma (for Thai) and Malgun Gothic (for Korean). They are available by default
on Windows 7, 8 and 10.

port from JBR 11 to JBR 15 (cherry picked from commit 850653192b)
2020-11-23 18:44:08 +03:00
Dmitry Batrak
6769b27e53 JBR-1714 Italic text is displayed using incorrect glyphs on Windows
port from JBR 11 to JBR 15 (cherry picked from commits 46e4cdfcbd, 9cc5cbc99b)
2020-11-23 18:44:07 +03:00
Dmitry Batrak
e43cfd198f JBR-1689 Incorrect painting of long strings on linux
port from JBR 11 to JBR 15 (cherry picked from commits e12c1d6f0d, 0429e74e9d)
2020-11-23 18:44:07 +03:00
Dmitry Batrak
6e1c514c6c JBR-1248 Exception caused by broken font
port from JBR 11 to JBR 15 (cherry picked from commit 4efa7eab3e)
2020-11-23 18:44:07 +03:00
Dmitry Batrak
e2637199e9 JBR-1245 [JDK 11] There are different letter spacings in some controls
port from JBR 11 to JBR 15 (cherry picked from commit a26b70568a)
2020-11-23 18:44:07 +03:00
Dmitry Batrak
47ff31ae82 JRE-927 Unexpected wrapping of bidirectional text in JEditorPane on HiDPI screens
port commit 11a5a4a2 from JBR 9

port from JBR 11 to JBR 15 (cherry picked from commit 65a5e450d5)
2020-11-23 18:44:07 +03:00
Dmitry Batrak
a5e25d1ef9 JRE-774 Don't paste BOM from clipboard on Mac
port commit ea9b75b3 from JBR 9

port from JBR 11 to JBR 15 (cherry picked from commit c6fed2cf58)
2020-11-23 18:44:07 +03:00
Dmitry Batrak
eea293f4a4 JRE-847 Box drawing characters have different widths with Monospaced font on Windows
port commit 778cef18 from JBR 9

port from JBR 11 to JBR 15 (cherry picked from commit 9caaac4a5a)
2020-11-23 18:44:06 +03:00
Dmitry Batrak
e0475e9ba2 JRE-748 Strange dots with fractional metrics turned on
port commit 82e7c82d from JBR 9

port from JBR 11 to JBR 15 (cherry picked from commit e9bd5f5dad)
2020-11-23 18:44:06 +03:00
Dmitry Batrak
087ff34c2e JRE-593 Wrong italic font rendering for Source Code Pro
port commit 1f6bd200 from JBR 9

port from JBR 11 to JBR 15 (cherry picked from commit 32ce109355)
2020-11-23 18:44:06 +03:00
Dmitry Batrak
0db7e948af JRE-469 Console with emoji output becomes slow
The fix consists of two parts:
* Making CCharToGlyphMapper remember that a particular character cannot be displayed (isn't mapped to glyph with given font). Checking this repeatedly in native code is very slow.
* Make CCompositeGlyphMapper remember the results of char-to-glyph mapping, this was missing in previous implementation. This reuses caching code in CompositeGlyphMapper, extending the range of characters for which the results are cached to include Supplementary Multilingual Plane (most emoji characters belong to it).

port commit 4e0ccde2 from JBR 9

port from JBR 11 to JBR 15 (cherry picked from commit 394e055ae6)
2020-11-23 18:44:06 +03:00
Dmitry Batrak
b871188f44 JRE-430 Font fallback sometimes doesn't work in Swing text components
port commit fc8003ad from JBR 9

port from JBR 11 to JBR 15 (cherry picked from commit 5b814d6b34)
2020-11-23 18:44:06 +03:00
Dmitry Batrak
51ce1d6427 JRE-372 IntelliJ editors silently precompose diacritics
port commit f7facf1b from JBR 9

port from JBR 11 to JBR 15 (cherry picked from commit 67b1e552d8)
2020-11-23 18:44:06 +03:00
Dmitry Batrak
7fb31a1665 JRE-118 Emoji support
port commits 5dcafa4d, 70e14949 from JBR 9

port from JBR 11 to JBR 15 (cherry picked from commit 690696bb52)
2020-11-23 18:44:05 +03:00
Dmitry Batrak
e6752600a5 fix direction of vertical glyph offsets (regression introduced by backporting JDK 9 changes for JRE-33)
port commit 9b98eaf0 from JBR 9

port from JBR 11 to JBR 15 (cherry picked from commit cbf4d301ee)
2020-11-23 17:51:01 +03:00
Dmitry Batrak
a5bd092449 an option to disable native rendering for rotated text (following JRE-19)
port commit ccc1ded6 from JBR 9

port from JBR 11 to JBR 15 (cherry picked from commit 72fb9ff7c4)
2020-11-23 17:51:01 +03:00
Dmitry Batrak
b16ee45915 JRE-11 Support text rendering via DirectWrite API on Windows
port commits 7b180f8d, cccbcab4 from JBR 9

port from JBR 11 to JBR 15 (cherry picked from commit 030f15834c)
2020-11-23 17:51:01 +03:00
Dmitry Batrak
8c9402b60b JRE-10 Ligatures are not working sometimes when characters from multiple scripts are present
ports commit 18b3f575 from JBR 9

port from JBR 11 to JBR 15 (cherry picked from commit c30407cb87)
2020-11-23 15:07:08 +03:00
Dmitry Batrak
2c0d6150d0 IDEA-150876 OpenJDK fonts for toolwindow names look worse than Oracles's
don't apply FreeType-returned glyph advance for rotated glyphs rendered by GDI

This seems to produce a better looking text (more evenly spaced). Fractional metrics won't be respected by this code, but we can address this later if needed.

port commits c9debd5e, ed78cd00, 4c7e1619, 7aa0429c, 7bd6c17c from JBR 9

port from JBR 11 to JBR 15 (cherry picked from commits d6b588bdab, dbc15fb84e)
2020-11-23 15:03:58 +03:00
Dmitry Batrak
f309844f75 reimplement JDK-7162125 to fix JDK-8147002
port commit ba38e5c4 from JBR 9

port from JBR 11 to JBR 15 (cherry picked from commit a949f9d220)
2020-11-23 13:53:55 +03:00
Vitaly Provodin
d45cab03b1 add jdk_jb into TEST.groups - fix misprint 2020-11-15 07:33:47 +07:00
Vitaly Provodin
e33577c3a5 add jdk_jb into TEST.groups 2020-11-15 05:53:19 +07:00
Vitaly Provodin
32e9c4d353 sync exclude list with openjdk15 2020-11-14 09:21:48 +07:00
Vitaly Provodin
44d62b3234 JRE-624 CThreading isAppKit() fails to detect main app thread if it was renamed
(cherry picked from commit c8f248a936)
2020-11-13 16:39:46 +07:00
Vitaly Provodin
0f0ab2c5ba JRE-638 added new regression test (enable unlimited cryptographic policy by default)
(cherry picked from commit 4a14c6f15a)
2020-11-13 16:29:59 +07:00
Vitaly Provodin
1a807593ab JRE-468 added new regression test (Idea freezes on project loading)
(cherry picked from commit 1ce8c3ce82)
2020-11-13 16:28:37 +07:00
Vitaly Provodin
241c14cb92 JRE-467 added new regression test (Wrong rendering of variation sequences)
(cherry picked from commit 0026095202)
2020-11-13 16:28:06 +07:00
Vitaly Provodin
601064c09c JRE-458 added new regression test (Insufficient and inconsistent permissions on some files in Linux build)
(cherry picked from commit 82adbe9c25)
2020-11-13 16:27:27 +07:00
Vitaly Provodin
2120a8a282 JRE-430 added new regression test (Font fallback sometimes doesn't work in Swing text components)
(cherry picked from commit d04debc847)
2020-11-13 12:12:07 +07:00
Vitaly Provodin
36ef23fb81 JRE-401 added regression test (AppCode freezes during autocomplete and other operations)
(cherry picked from commit cb4453b1d1)
2020-11-13 11:58:25 +07:00
Vitaly Provodin
2afd3d4821 JRE-394 added regression test (System getenv doesn't return env var set in JNI code)
(cherry picked from commit 3a7b3c67b0)
2020-11-13 11:58:13 +07:00
Vitaly Provodin
4b8e82db67 JRE-392 added regression (Tip of the day is not hidden while another modal window is shown)
(cherry picked from commit c7b0ac686f)
2020-11-13 11:58:02 +07:00
Vitaly Provodin
90d22980d5 JRE-269 added regression (JLabel doesn't scale <code>text</code> HTML fragments.)
(cherry picked from commit 1f4ad38d23)
2020-11-13 11:57:49 +07:00
Vitaly Provodin
0d1778962d JRE-186 added regression test (Modal dialogs (Messages) shouldn't popup IDEA when another application is active)
(cherry picked from commit 236bd38d1b)
2020-11-13 11:57:36 +07:00
Conor Cleary
276a53ba14 8246741: NetworkInterface/UniqueMacAddressesTest: mac address uniqueness test failed
Reviewed-by: chegar, dfuchs
2020-11-12 11:35:29 +07:00
Vitaly Provodin
b483235e7f JBR-2812 remove --with-import-modules from configure for aarch64 2020-10-27 18:34:15 +07:00
Vitaly Provodin
bc6ff706da Update docker script to create jdk15 build env for x86 2020-10-23 12:07:44 +07:00
Anton Tarasov
27ffa822c1 JBR-2812 [followup] bundle jcef in jmod format instead of modular-sdk
Build test-image with non-jcef build target
2020-10-22 17:31:04 +03:00
Anton Tarasov
9174496aa0 JBR-2812 bundle jcef in jmod format instead of modular-sdk 2020-10-22 13:51:11 +03:00
Anton Tarasov
d7d16faf16 JBR-2019 provide getWindowHandle method for jcef
(cherry picked from commit 7ae706b629)
2020-10-22 13:51:11 +03:00
Alexey Ushakov
653e7a8101 JBR-2807: JDK15: update modules.list to resolve jbr build failure
removed nashorn modules
2020-10-20 17:07:20 +03:00
Denis Konoplev
fcb22de8b0 JBR-2795: Add explicit conversion
(cherry picked from commit bf3e1c0c31)
2020-10-19 20:09:28 +03:00
Alexey Ushakov
af0e3f69fa Update docker script to create jdk15 build env 2020-10-19 18:41:20 +03:00
Alexey Ushakov
cd74581779 JBR-1412 [fwp to JBR11] JBR-1393 RubyMine is hanging after log in (macOS)
Modified version of JBR8 fix

(cherry picked from commit 434166fe63)
2020-10-16 20:01:18 +03:00
Alexey Ushakov
74ce667016 JRE-366 Add support for Awesome WM
Added detection of Awesome WM and handled similar to Sawfish WM

(cherry picked from commit 6742077ed198975949af567e8ef543f853397351)
(cherry picked from commit 2847be73c6)
2020-10-16 20:01:17 +03:00
Alexey Ushakov
161a7eac4a JRE-353 Fedora 25 + XMonad rendering issues
Added support for Xmonad WM

(cherry picked from commit c690c3c7fdf1390e6b1a8d388ff752a09391ae3c)
(cherry picked from commit 6851dc3441)
2020-10-16 20:01:16 +03:00
Alexey Ushakov
54a2e76122 JRE-18 CCE in XRMaskFill.MaskFill
Throwing InvalidPipeException for incompatible surfaces

(cherry picked from commit 55dab103c24bf86cf025b9ce02b67e72508d41ba)
(cherry picked from commit 0a4fdad0f2)
2020-10-16 20:01:16 +03:00
Alexey Ushakov
be4219caab JRE-12 CCE: XRTextRenderer.drawGlyphList (sun.java2d.NullSurfaceData cannot be cast to sun.java2d.xr.XRSurfaceData)
Throwing InvalidPipeException for incompatible surfaces

(cherry picked from commit f98f34c)
(cherry picked from commit fb2bbc47fe)
2020-10-16 20:01:15 +03:00
Anton Tarasov
4a3199dc9d JRE-119 [Add SwingUtilities2.scalePoint method to translate b/w different scales]
The method is used for popup window location settings.

(cherry picked from commit a7f295f8bc8aaa5bee4bedf1369aefd19152fcf5)
(cherry picked from commit dbc9f3cf91)
2020-10-16 19:29:39 +03:00
Anton Tarasov
b63b0ae668 JRE-1142 [jdk11] hidpi is not detected since Ubuntu 18.04
(cherry picked from commit be4f8c0d9d)
2020-10-16 18:50:34 +03:00
Anton Tarasov
7a084221ca [jdk9] HiDPI scale is not detected on some linux desktops
(cherry picked from commit 9279d80110)
2020-10-16 18:50:33 +03:00
Anton Tarasov
4165ef6306 JRE-1111 [JDK11] java/beans/Beans/TypoInBeanDescription.java crashes at libawt_xawt.so+0x4a30d
(cherry picked from commit b89e6aed0b)
2020-10-16 18:50:32 +03:00
Anton Tarasov
14b7c5adef Read org.gnome.desktop.interface/scaling-factor
(cherry picked from commit 277357ae73)
2020-10-16 18:50:31 +03:00
Anton Tarasov
71fa983bc1 Do not scale base font in HiDPI mode on Linux
(cherry picked from commit 6fb2c36529)
2020-10-16 18:50:30 +03:00
Anton Tarasov
8a2f49d98b JRE-119 [Fix getCursorPos() to work in env with scale]
(cherry picked from commit cbcfb72202125cd9bab5d25e4f06b5ba3f684482)
(cherry picked from commit ca32a66f85)
2020-10-16 18:50:29 +03:00
Anton Tarasov
c971c7fa88 JRE-616 [linux] notify when dpi correction factor is applied to fonts
(cherry picked from commit f57d41f3118bfd773c99ce32d58cfae16931be6a)
(cherry picked from commit 6246abc72f)
2020-10-16 18:50:28 +03:00
Anton Tarasov
b9996c7b47 IDEA-153474 let JDK detect Xft.dpi value on non-GTK Linux DEs
Use the GTK method:

https://developer.gnome.org/gobject/stable/gobject-The-Base-Object-Type.html#g-object-get

to retrieve "gtk-xft-dpi" integer property of the X settings.

Add the property to JDK's GtkEngine & gtk2-interface.
Then read the property via GtkEngine from GTK LaF when "gnome.Xft/dpi" is undefined. It's assumed GTK LaF is forcedly installed.

(cherry picked from commit e05fc391ae0a3cc389e836441f882c0cf6ab3b99)
(cherry picked from commit fd615a5b45)
2020-10-16 18:50:28 +03:00
Denis Konoplev
f160303ec9 JBR-2347: Free memory on other exceptions, rethrow ThreadDead & log it
(cherry picked from commit 16ca839ed3)
2020-10-16 18:32:13 +03:00
Denis Konoplev
307d1c1fd7 JBR-2347: Don't free memory when thread is dead
(cherry picked from commit afb3303db5)
2020-10-16 18:32:12 +03:00
Denis Konoplev
25302b9289 JBR-2041: Project view tap fix, recovery? constants & logging
(cherry picked from commit 1e904db3b0)
2020-10-16 18:32:10 +03:00
Denis Konoplev
1759eb2b89 IDEA-229135: Fling animation stop on tap
(cherry picked from commit 7ce0f79561)
2020-10-16 18:32:09 +03:00
Denis Konoplev
d27d2e2baa Windows touch screen support
(cherry picked from commit cab3f28907)
2020-10-16 18:32:08 +03:00
Denis Konoplev
c13fd2cb3e Turn off multitouch
(cherry picked from commit a2576ffa9a)
2020-10-16 18:32:08 +03:00
Denis Konoplev
c1624ddd8d Check XInput extension && touch inertia
(cherry picked from commit cca7fb97f4)
2020-10-16 18:32:06 +03:00
Denis Konoplev
65affdb4f7 Touch scroll handling
(cherry picked from commit 6dcec3dc31)
2020-10-16 18:30:02 +03:00
Denis Konoplev
08f6a61016 XI2 Constants
(cherry picked from commit 588cd6ee73)
2020-10-16 18:30:00 +03:00
Denis Konoplev
edf629d075 XLibWrapper XI2 functions
(cherry picked from commit d6bd1bfa2b)
2020-10-16 18:29:59 +03:00
Denis Konoplev
d8d095563e X11 native get put double
(cherry picked from commit f101bc1108)
2020-10-16 18:29:58 +03:00
Denis Konoplev
486f078759 Native data types
(cherry picked from commit 9504574dbb)
2020-10-16 18:29:57 +03:00
Denis Konoplev
9b087fe5da XI2 headers in xlib wrapper generator
(cherry picked from commit ef108067a1)
2020-10-16 18:29:56 +03:00
Vitaly Provodin
bd606c0383 JBR-2787 fix copying jcef files into jbr/jbrsdk binaries 2020-10-16 18:00:46 +03:00
Vitaly Provodin
d05263d08c Add jogl and gluegen modules to support jcef osr mode 2020-10-16 18:00:45 +03:00
Vitaly Provodin
5629899859 JBR-2758 fix comments and artifat names 2020-10-16 18:00:45 +03:00
Vitaly Provodin
d3107db64d JBR-2758 refactor building scripts to apply patches adding required modules instead of excluding 2020-10-16 18:00:44 +03:00
Vitaly.Provodin
e2901b99db add 32-sizes for native data types
(cherry picked from commit 3a79870da8)
2020-10-16 15:43:15 +03:00
Vitaly Provodin
d7723b6110 JBR-2473 modify building scripts to add dcevm clauses, add git config to docker image
(cherry picked from commit 2620c62848)
2020-10-16 15:34:06 +03:00
Vitaly Provodin
483e5158be JBR-2473 add initial set of DCEVM patches
(cherry picked from commit c0c0a96cf4)
2020-10-16 15:34:05 +03:00
Anton Tarasov
5f3c9c11ba JBR-2016 add jcef module and export packages to it
(cherry picked from commit cf997f71c6)
2020-10-16 15:34:04 +03:00
Vyacheslav Moklev
fd6e0efbd5 JBR-1274 Common Item Dialog sometimes crash the process
Prevent from freeing memory with CoTaskMemFree twice

(cherry picked from commit 94c75b0537)
2020-10-16 15:29:44 +03:00
Vyacheslav Moklev
fbd999542a 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-10-16 15:29:43 +03:00
Vyacheslav Moklev
5a252a96f1 JBR-1271 Wrong parent of native windows dialogs
Set a proper parent to a dialog window

(cherry picked from commit 6ecbc2736b)
2020-10-16 15:29:42 +03:00
Vyacheslav Moklev
1b9c3ed57b 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-10-16 15:29:41 +03:00
Vyacheslav Moklev
8b32d4cc6f JBR-1258 CommonItemDialog ignores directory to open
Fix parsing of directory path / file path

(cherry picked from commit 04112e6f90)
2020-10-16 15:29:40 +03:00
Vyacheslav Moklev
54152197f5 JBR-1257 CommonItemDialog modal window has no owner
Fix modality for Common Item Dialog

(cherry picked from commit e0c79eb54f)
2020-10-16 15:29:39 +03:00
Vyacheslav Moklev
2588bb7a92 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-10-16 15:29:38 +03:00
Vitaly Provodin
fb6a542b84 updated JTreg exclude list 2020-10-16 15:16:48 +03:00
Vitaly Provodin
4606f42a4b JBR-2395 eliminate JavaFX from JBR (follow up x64 packaging) 2020-10-16 15:16:29 +03:00
Vitaly Provodin
6e29b5cd43 JBR-2409 fix prameters for configure 2020-10-16 15:16:07 +03:00
Vitaly Provodin
6c12492aef JBR-2395 eliminate JavaFX from JBR (fix misprint) 2020-10-16 15:15:36 +03:00
Vitaly Provodin
4ead63ebbe add git into image for Linux x86 2020-10-16 15:15:27 +03:00
Vitaly Provodin
6934ca4826 JDK14: exclude dependencies on jcef in x86, fastdebug builds 2020-10-16 15:15:07 +03:00
Vitaly Provodin
f6b4e4d52d add docker files for Linux x64 and x86 2020-10-16 15:14:47 +03:00
Vitaly Provodin
c49a889919 8234596 remove of Pack200 Tools and API 2020-10-16 15:14:28 +03:00
Vitaly Provodin
1ff8b4b6df JBR-2395 eliminate JavaFX from JBR 2020-10-16 15:14:07 +03:00
Vitaly Provodin
748f55a971 JBR-2396 fix CONF names 2020-10-16 15:13:47 +03:00
Vitaly Provodin
3c594007b5 JBR-2394 replace --disable-debug-symbols with --with-native-debug-symbols=none 2020-10-16 15:13:27 +03:00
Vitaly Provodin
19482e0c9f add exec permitions to configure 2020-10-16 15:13:06 +03:00
Vitaly Provodin
c17f1e9ffe split checkout before building JBR+JFX or JBR+JCEF on two separate commands 2020-10-16 15:12:09 +03:00
Vitaly Provodin
e6cae2dd1a change BOOT_JDK, fix target names 2020-10-16 15:12:06 +03:00
Vitaly Provodin
8373d64d08 change BOOT_JDK 2020-10-16 15:11:46 +03:00
Vitaly Provodin
433d7d4681 JBR-2291 add vendor info into bundles 2020-10-16 15:11:24 +03:00
Vitaly Provodin
9d03be4e29 JBR-2324 address new layout in mac jcef 80.0.4+g74f7b0c+chromium-80.0.3987.122 2020-10-16 15:10:45 +03:00
Vitaly Provodin
0348537300 JBR-2320 add jdk.attach module into JBR 2020-10-16 15:10:42 +03:00
Vitaly Provodin
cd285c9022 JBR-2217 provide JCEF-only (no JavaFX) bundle for master/202 branches 2020-10-16 15:10:22 +03:00
Vitaly Provodin
4dcff472fa JBR-2212 add scripts for linux_x86, linux_aarch64, linux_x64_fastdebug, osx_fastdebug, windows_x86 2020-10-16 15:10:00 +03:00
Vitaly Provodin
0b6cba009c JBR-1643 fix intermittent fialures of Windows builds at make/Init.gmk:304
combine images and test-image into one make invocation
2020-10-16 15:09:39 +03:00
Vitaly Provodin
fbb2e417c9 JBR-2181 create two separate JBR bundles with JFX and JFX+JCEF 2020-10-16 15:09:18 +03:00
Vitaly Provodin
c866c331cd JBR-2148 modify signapp&build scripts to match to the new layout 2020-10-16 15:08:39 +03:00
Vitaly Provodin
4c78467a0d JBR-2084 modify scripts to sign Contents/MacOS/libjli.dylib as a a normal file 2020-10-16 15:08:36 +03:00
Vitaly Provodin
6b0ad1c96f JBR-1821 notarize JBR bundles as a standalone app 2020-10-16 15:08:15 +03:00
Vitaly Provodin
acb92a2a1a JBR-2162 move building scripts from TC to JBR repo 2020-10-16 15:07:43 +03:00
Anton Tarasov
aea97028fb JBR-2016 add jcef module and export some sun.* packages to it 2020-10-16 15:07:34 +03:00
Vitaly Provodin
d6404cf65e JBR-2014 add jdk.hotspot.agent module to jbr 2020-10-16 15:07:12 +03:00
Vitaly Provodin
20a26347e4 JBR-1286 add jdk.compiler into JBR 2020-10-16 15:06:49 +03:00
Vitaly Provodin
397f951cd2 JBR-1199 add JBR modules list for jlink 2020-10-16 15:06:46 +03:00
Mikael Vidstedt
d1b6691295 Added tag jdk-15+36 for changeset e3f940bd3c8f 2020-08-12 20:07:07 -07:00
Prasadrao Koppula
4a588d89f0 8246031: SSLSocket.getSession() doesn't close connection for timeout/ interrupts
Reviewed-by: xuelei, coffeys
2020-06-11 21:54:51 +05:30
Athijegannathan Sundararajan
f70fc149b5 8251276: JDK-8248299 breaks JDK 15 validate-headers build
Reviewed-by: mchung, iris, vtewari
2020-08-08 12:22:05 +05:30
Athijegannathan Sundararajan
764b50a7e3 8248299: two jdeps files miss copyright header
Reviewed-by: mchung
2020-08-07 07:03:12 +05:30
Mikael Vidstedt
44c6537b57 Added tag jdk-15+35 for changeset fd60c3146a02 2020-08-05 18:59:04 -07:00
Jerry Zhou
4d13bf33d4 8249628: Remove EA from JDK 15 version string starting with Initial RC promotion
Reviewed-by: tbell, erikj
2020-07-17 01:50:44 +00:00
Huang Wang
846d21961c 8250609: C2 crash in IfNode::fold_compares
Reviewed-by: kvn, chagedorn
2020-07-28 10:38:04 +08:00
Dean Long
6986d53af9 8248597: [Graal] api/java_security/SignatureSpi/DelegationTests.html fails with Method "javasoft.sqe.tests.api.java.security.SignatureSpi.JCKSignatureSpi.clear" doesn't exist
Reviewed-by: kvn
2020-07-29 23:15:48 -07:00
Matthias Baesken
11a8c9c13e 8250770: Net.java translateToSocketException does not handle IOException
Reviewed-by: alanb, dfuchs
2020-07-29 12:56:02 +02:00
Mikael Vidstedt
7efa6090e8 Added tag jdk-15+34 for changeset b0817631d2f4 2020-07-29 18:24:00 -07:00
Igor Ignatyev
03cf1c3a83 8250688: missed open parenthesis for GTEST_FRAMEWORK_SRC var in Main.gmk
Reviewed-by: erikj
2020-07-28 09:05:06 -07:00
Zhengyu Gu
3a8a15b5d0 8250588: Shenandoah: LRB needs to save/restore fp registers for runtime call
Reviewed-by: rkennke
2020-07-28 10:32:57 -04:00
Erik Joelsson
fcd5d414d6 8246094: [macos] Sound Recording and playback is not working
Reviewed-by: prr, serb
2020-07-24 10:52:02 -07:00
Pavel Rappo
922ba8da30 8240777: Update all nroff manpages for JDK 15 release
Reviewed-by: dholmes
2020-07-24 17:06:35 +01:00
Mark Reinhold
8a9d2b08a0 8250216: The README need not mention retrieving source code
Reviewed-by: darcy, erikj
2020-07-23 10:40:52 -07:00
Roman Kennke
a28f4100ce 8249787: Make TestGCLocker more resilient with concurrent GCs
Reviewed-by: eosterlund, tschatzl
2020-07-23 14:44:13 +02:00
Mikael Vidstedt
54ad4f9a80 Added tag jdk-15+33 for changeset 6b65f4e7a975 2020-07-22 19:17:32 -07:00
Bob Vandette
33016a8325 8249880: JVMCI calling register_nmethod without CodeCache lock
Reviewed-by: eosterlund, kvn, never
2020-07-22 17:59:33 +00:00
Jamsheed Mohammed C M
39b22d134f 8242895: failed: sanity at src/hotspot/share/opto/escape.cpp:2361
The address_offset code in EA was improved to detect raw stores(init captured ones) after loopopt.

Reviewed-by: kvn, thartmann
2020-07-21 08:03:20 -07:00
Markus Grönlund
c7b074a9db 8249713: JFR: java.base events have incomplete stacktraces
Reviewed-by: egahlin
2020-07-21 11:54:19 +02:00
Igor Ignatyev
8d97637cf2 8249700: java/io/File/GetXSpace.java should be added to exclude list, and not @ignore-d
Reviewed-by: alanb
2020-07-20 09:11:53 -07:00
Igor Ignatyev
af0d6d28b0 8249698: java/lang/invoke/LFCaching/LFGarbageCollectedTest.java should be ProblemList-ed and not @ignored
Reviewed-by: kvn, mchung
2020-07-20 09:11:51 -07:00
Igor Ignatyev
ac38b399de 8249681: gc/stress/TestJNIBlockFullGC/TestJNIBlockFullGC.java fails w/ UnsatisfiedLinkError
Reviewed-by: tschatzl
2020-07-17 15:01:10 -07:00
Igor Ignatyev
4a4003e900 8249678: @ignore should be used instead of ProblemList for 8158860, 8163894, 8193479, 8194310
Reviewed-by: kvn
2020-07-17 11:54:14 -07:00
Igor Ignatyev
1c882d91f0 8249673: cleanup graal problem lists
Reviewed-by: kvn
2020-07-17 10:51:55 -07:00
Igor Ignatyev
24a7d8c766 8249622: use 8249621 to ignore 8 jvmci tests
Reviewed-by: kvn, epavlova
2020-07-16 20:03:10 -07:00
Jamsheed Mohammed C M
d63aebe6cb 8246381: VM crashes with "Current BasicObjectLock* below than low_mark"
Save and restores "donotunlock" flag in check_and_handle_async_exceptions

Reviewed-by: coleenp, dholmes
2020-07-16 08:28:55 -07:00
Ivan Sipka
4320afbd58 8242935: test/jdk/java/util/ServiceLoader/ReloadTest.java uses nashorn script engine
Reviewed-by: alanb, iignatyev
2020-07-16 12:03:51 +01:00
Roman Kennke
546158fb42 8249543: Force DirectBufferAllocTest to run with -ExplicitGCInvokesConcurrent
Reviewed-by: alanb
2020-07-16 15:04:58 +02:00
Roman Kennke
9694ca9eaf 8249560: Shenandoah: Fix racy GC request handling
Reviewed-by: shade
2020-07-16 11:49:04 +02:00
Jan Lahoda
3770be7f70 8249367: JShell uses 100% of one core all the time
Workarounding busy wait while reading from NonBlocking.NonBlockingReaderInputStream wrapping NonBlockingPumpReader.

Reviewed-by: rfield, cstein
2020-07-16 11:30:11 +02:00
Jie Fu
507e54840f 8246805: Incorrect copyright header in TestInvalidTieredStopAtLevel.java
Reviewed-by: mikael, iignatyev
2020-07-16 10:30:39 +08:00
Mikael Vidstedt
1108a4a77c Added tag jdk-15+32 for changeset 2dad000726b8 2020-07-15 19:19:36 -07:00
Ambarish Rapte
18f3591a1b 8249278: Revert JDK-8226253 which breaks the spec of AccessibleState.SHOWING for JList
Reviewed-by: prr, serb
2020-07-16 06:35:01 +05:30
Mark Reinhold
55039aa1c6 8249205: Remove unnecessary trademark symbols
Reviewed-by: darcy, lancea, bpb, prr, jjg, cjplummer, iris, dfuchs, weijun, joehw, wetmore, bchristi
2020-07-15 14:21:54 -07:00
Daniel D. Daugherty
24f4f14c3d Merge 2020-07-15 17:08:28 -04:00
Daniel D. Daugherty
f636b84f48 8246676: monitor list lock operations need more fencing
Reviewed-by: dholmes, eosterlund, rehn, pchilanomate
2020-07-15 17:01:38 -04:00
Daniel D. Daugherty
62d77dc3fc 8247280: more fencing needed in async deflation for non-TSO machines
Reviewed-by: dholmes, pchilanomate
2020-07-15 16:59:39 -04:00
Tom Rodriguez
8cfc7e39df 8248524: [JVMCI] Memory corruption / segfault during NumPy installation
Reviewed-by: kvn
2020-07-15 12:17:19 -07:00
Igor Ignatyev
e07ad838b5 8249040: clean up FileInstaller $test.src $cwd in vmTestbase_nsk_jdb tests
Reviewed-by: dholmes
2020-07-15 11:34:34 -07:00
Igor Ignatyev
b27e717c56 8249034: clean up FileInstaller $test.src $cwd in vmTestbase_nsk_jvmti tests
Reviewed-by: sspitsyn
2020-07-15 11:33:43 -07:00
Igor Ignatyev
1b5391264a 8249039: clean up FileInstaller $test.src $cwd in vmTestbase_nsk_aod tests
Reviewed-by: dholmes, sspitsyn
2020-07-15 11:31:35 -07:00
Pankaj Bansal
be2a92d8c7 8249251: [dark_mode ubuntu 20.04] The selected menu is not highlighted in GTKLookAndFeel
Reviewed-by: serb, prr
2020-07-15 23:40:18 +05:30
Ekaterina Pavlova
681d06d39b 8242388: compiler/graalunit/CoreTest.java timed out
Reviewed-by: kvn
2020-07-15 10:26:48 -07:00
Goetz Lindenmaier
8906904591 8248476: No helpful NullPointerException message after calling fillInStackTrace
Reported by christoph.dreis@freenet.de

Reviewed-by: coleenp, dholmes, mchung
2020-07-15 18:47:47 +02:00
Jim Laskey
a640835c62 8249258: java/util/StringJoiner/StringJoinerTest.java failed due to OOM
Reviewed-by: dcubed, rriggs
2020-07-15 09:22:29 -03:00
Henry Jen
d7c1bb1fb7 Merge 2020-07-14 19:11:16 +00:00
Igor Ignatyev
6d201dbba6 8249036: clean up FileInstaller $test.src $cwd in vmTestbase_nsk_stress tests
Reviewed-by: kvn
2020-07-14 11:24:39 -07:00
Igor Ignatyev
919eb12b14 8249032: clean up FileInstaller $test.src $cwd in vmTestbase_nsk_sysdict tests
Reviewed-by: dholmes
2020-07-14 11:16:00 -07:00
Igor Ignatyev
6c95a87157 8249035: clean up FileInstaller $test.src $cwd in vmTestbase_nsk_jdwp tests
Reviewed-by: dholmes
2020-07-14 11:10:40 -07:00
Igor Ignatyev
ba1db57dde 8249028: clean up FileInstaller $test.src $cwd in vmTestbase_nsk_monitoring tests
Reviewed-by: dholmes
2020-07-14 11:09:34 -07:00
Igor Ignatyev
765abcb329 8249033: clean up FileInstaller $test.src $cwd in vmTestbase_vm_metaspace tests
Reviewed-by: dholmes
2020-07-14 11:09:06 -07:00
Igor Ignatyev
606aad5dc8 8249029: clean up FileInstaller $test.src $cwd in vmTestbase_vm_defmeth tests
Reviewed-by: dholmes
2020-07-14 11:08:21 -07:00
Henry Jen
52977fd914 Merge 2020-07-14 17:25:17 +00:00
Ekaterina Pavlova
265b36ff28 8236809: [Graal] java/lang/Class/getDeclaredField/FieldSetAccessibleTest.java timeouts
Reviewed-by: kvn
2020-07-14 10:07:32 -07:00
Erik Joelsson
a9b7ae8ac2 8249255: Build fails if source code in cygwin home dir
Reviewed-by: tbell
2020-07-14 07:09:11 -07:00
Vladimir Ivanov
7a6c1a66b2 8247502: PhaseStringOpts crashes while optimising effectively dead code
Reviewed-by: kvn, thartmann
2020-07-14 16:57:34 +03:00
Alexander Matveev
be04c8c724 8249256: [macos] Add EmptyFolderPackageTest test to problem list
Reviewed-by: herrick
2020-07-13 18:08:26 -07:00
Henry Jen
92be493f0b Merge 2020-07-13 20:46:15 +00:00
Hannes Wallnöfer
77c83d9ee6 8236935: Improve UX of the search control
Reviewed-by: jjg, prappo
2020-07-13 11:33:50 +02:00
Zhengyu Gu
5b2fd36a6d 8247670: Shenandoah: deadlock during class unloading OOME
Reviewed-by: rkennke
2020-07-10 11:40:57 -04:00
Igor Ignatyev
04280a0d05 8249000: vm.gc.X should take selected JIT into account
Reviewed-by: kvn
2020-07-10 11:52:35 -07:00
Igor Ignatyev
c5ad1daa96 8249019: clean up FileInstaller $test.src $cwd in vmTestbase_vm_compiler tests
Reviewed-by: kvn, epavlova
2020-07-10 11:49:58 -07:00
Igor Ignatyev
9bbec0433c 8249038: clean up FileInstaller $test.src $cwd in vmTestbase_vm_gc tests
Reviewed-by: kbarrett
2020-07-10 11:49:02 -07:00
Roger Riggs
a376fb7720 8217475: Unexpected StackOverflowError in "process reaper" thread
Reviewed-by: martin, dholmes
2020-07-10 09:17:00 -04:00
Roland Westrelin
32482c82a6 8248598: [Graal] Several testcases from applications/jcstress/acqrel.java fails with forbidden state
Reviewed-by: dlong
2020-07-09 10:20:32 +02:00
Roland Westrelin
b67814941f 8229495: SIGILL in C2 generated OSR compilation
Reviewed-by: kvn, chagedorn
2020-07-01 17:28:49 +02:00
Stefan Karlsson
a18e8d3d57 8248048: ZGC: AArch64: SIGILL in load barrier register spilling
Reviewed-by: adinn, aph
2020-06-30 19:20:22 +02:00
Alexey Semenyuk
8f26a1f748 8247229: jpackage tests failed due to "semop(1): encountered an error: Invalid argument"
Reviewed-by: herrick, almatvee
2020-07-09 16:11:55 -04:00
Vicente Romero
37880ba60d 8242529: javac defines type annotations incorrectly for record members (constructor and property accessor)
Reviewed-by: psandoz, jlahoda
2020-07-09 17:37:53 -04:00
Leo Jiang
1b1fb08000 8249086: JDK 15 L10N resource file update - msg drop 10
Reviewed-by: naoto
2020-07-09 17:04:06 +00:00
Igor Ignatyev
183dadbef2 8249037: clean up FileInstaller $test.src $cwd in vmTestbase_vm_g1classunloading tests
Reviewed-by: kbarrett
2020-07-09 09:05:58 -07:00
Jesper Wilhelmsson
2fe15bc62e Added tag jdk-15+31 for changeset a32f58c6b8be 2020-07-09 04:02:21 +02:00
Igor Veresov
69a9403995 8248822: 8 vm/classfmt/atr_ann/atr_rtm_annot007/atr_rtm_annot00709 tests fail w/ AOT
Remove Remove jdk.internal.reflect.ConstantPool intrinsics.

Reviewed-by: kvn
2020-07-08 17:00:50 -07:00
Daniel D. Daugherty
9f0bafe6ad 8249097: test/lib/jdk/test/lib/util/JarBuilder.java has a bad copyright
Reviewed-by: iignatyev
2020-07-08 17:19:57 -04:00
Ivan Sipka
dda0c6cecd 8211974: move test/jdk/lib/testlibrary/java/util/jar/*.java to top-level library or a local library
Reviewed-by: rriggs, bchristi, lancea, iignatyev
2020-07-08 20:35:36 +01:00
Igor Ignatyev
e5c43ab86e 8249018: clean up FileInstaller $test.src $cwd in vmTestbase_vm_mlvm tests
Reviewed-by: kvn
2020-07-08 11:28:06 -07:00
Anthony Scarpino
a0e5043781 8246806: Incorrect copyright header in KeyAgreementTest.java, GroupName.java
Reviewed-by: weijun
2020-07-08 08:58:05 -07:00
Nick Gasson
802737cae7 8248845: AArch64: stack corruption after spilling vector register
Reviewed-by: kvn
2020-07-07 14:14:22 +08:00
Calvin Cheung
ddcb17e1e0 8248112: array index out of bound in FileMapInfo::check_paths
Check runtime classpath lengths after calling create_path_array().

Reviewed-by: iklam, minqi
2020-07-07 22:47:59 +00:00
Zhuo Wang
e87c864847 8248570: Incorrect copyright header in TestUnsafeUnalignedSwap.java
Reviewed-by: kvn
2020-07-07 11:38:05 -07:00
Igor Ignatyev
5899ef11fb 8208243: vmTestbase/gc/lock/jni/jnilock002/TestDescription.java fails in jdk/hs nightly
Reviewed-by: tschatzl
2020-07-02 11:38:00 -07:00
Valerie Peng
f4756fdf48 8248505: Unexpected NoSuchAlgorithmException when using secure random impl from BCFIPS provider
Use getService(...) call for Provider.getDefaultSecureRandomService()

Reviewed-by: weijun, coffeys, mullan
2020-07-07 16:55:29 +00:00
Markus Grönlund
ca91da0e0c 8248794: Transition JFR Periodic Task Thread to "_thread_in_native" before invoking performance counters
Reviewed-by: egahlin
2020-07-07 17:52:55 +02:00
Yaofei Song
c7ecaa4a1d 8248219: aarch64: missing memory barrier in fast_storefield and fast_accessfield
Reviewed-by: aph
2020-06-28 16:47:25 +08:00
Markus Grönlund
1b3a127d06 8241803: JFR TestThreadStartEndEvents.java failed due to "RuntimeException: Wrong thread id"
Reviewed-by: egahlin
2020-07-07 16:20:30 +02:00
Joe Wang
653af300cc 8248348: Regression caused by the update to BCEL 6.0
Reviewed-by: smarks, plevart
2020-07-07 00:09:29 +00:00
Andy Herrick
7a4bf2456e 8248501: [macos] App created with jpackage on Mac fails with error -10810
Reviewed-by: asemenyuk, almatvee
2020-07-03 07:49:00 -04:00
John Jiang
45fce6baf9 8242538: java/security/SecureRandom/ThreadSafe.java failed on windows
Reviewed-by: mullan
2020-07-07 06:06:18 +08:00
Vladimir Kozlov
a8d20c9254 8247527: serviceability/dcmd/gc/HeapDumpCompressedTest.java fails with Graal + ZGC
Excludes running Graal with GC which it does not support

Reviewed-by: dholmes, iignatyev
2020-07-04 01:06:07 -07:00
Yong Zhou
79ad5512cf 8243670: Unexpected test result caused by C2 MergeMemNode::Ideal
Reviewed-by: thartmann, roland
2020-07-04 08:18:17 +08:00
Chris Plummer
63a6adf2b5 8248746: Undo jhsdb related exclusiveAccess.dirs changes that were done for JDK-8220295
Reviewed-by: iignatyev
2020-07-03 10:02:37 -07:00
Daniel Fuchs
82cc03fa89 8248703: Clarify the behavior of java.net.NetworkInterface::equals
The API documentation of NetworkInterface::equals is clarified to warn about the possibility that two NetworkInterface representing the same underlying interface objects might not compare equal if the IP addresses bound to the interfaces are being dynamically updated by the system.

Reviewed-by: alanb, chegar
2020-07-03 16:50:16 +01:00
Roman Kennke
734a6c94d3 8248799: Shenandoah: Claim threads token in constructor of ShenandoahRootVerifier
Reviewed-by: zgu
2020-07-03 17:36:56 +02:00
Thomas Schatzl
6c89a9653e 8248306: gc/stress/gclocker/TestExcessGCLockerCollections.java does not compile
Update the test to use the method suggested in JDK-8244010.

Reviewed-by: kbarrett
2020-07-03 16:32:33 +02:00
Roman Kennke
5cf33168d7 8248725: Shenandoah: Claim verifier thread roots for parallel processing
Reviewed-by: shade
2020-07-03 11:09:59 +02:00
Nils Eliasson
999357250a 8248388: ZGC: Load barrier incorrectly elided in jdk/java/text/Format/DateFormat/SDFTCKZoneNamesTest.java
Reviewed-by: kvn, thartmann
2020-07-03 10:05:53 +02:00
Markus Grönlund
5a90271d01 8237488: jdk/jfr/event/compiler/TestCompilerCompile.java failed due to "RuntimeException: No thread in event"
Reviewed-by: egahlin
2020-07-02 21:13:41 +02:00
Jonathan Gibbons
dc0c0c7eca 8248060: small HTML issues in java.xml package-info.java files
Reviewed-by: joehw
2020-07-02 10:21:21 -07:00
Igor Ignatyev
72ae322022 8208207: Test nsk/stress/jni/gclocker/gcl001 fails after co-location
Reviewed-by: tschatzl
2020-07-02 08:05:00 -07:00
Jan Lahoda
a4b135316c 8244763: Update --release 8 symbol information after JSR 337 MR3
Reviewed-by: jjg, wetmore
2020-05-18 18:20:53 +02:00
Jesper Wilhelmsson
2e65885257 Added tag jdk-15+30 for changeset 6909e4a1f25b 2020-07-02 03:15:27 +02:00
Alexander Matveev
55e7003fd5 8248059: [macos] EmptyFolderPackageTest.java failed "hdiutil: create failed - No child processes"
Reviewed-by: herrick, asemenyuk
2020-07-01 14:52:09 -04:00
Christian Hagedorn
83a8c4acc7 8244724: CTW: C2 compilation fails with "Live Node limit exceeded limit"
Fix live limit assert in node construction to be ignored during code generation in Compile::Code_Gen().

Reviewed-by: kvn, neliasso
2020-07-01 09:18:28 +02:00
Jonathan Gibbons
46ff8fdce9 8248409: some jdk/javadoc/doclet tests fail (JDK 15)
Reviewed-by: prappo
2020-06-30 11:36:02 -07:00
Daniel Fuchs
0f43de9f02 8246114: java/net/MulticastSocket/Promiscuous.java fails after 8241072 (multi-homed systems)
Fixed the test - an IPv4 group cannot be joined from an interface that has no IPv4 address configured

Reviewed-by: alanb, amlu
2020-06-30 18:52:59 +01:00
Markus Grönlund
abc55dea7e 8248485: Poor scalability in JfrCheckpointManager when using many threads after JDK-8242008
Reviewed-by: egahlin
2020-06-30 19:00:14 +02:00
Markus Grönlund
eb1bacc71b 8248475: Suppress unconditional warning "JFR will be disabled during CDS dumping"
Reviewed-by: redestad
2020-06-30 18:10:44 +02:00
Roland Westrelin
05dc2af21f 8247824: CTW: C2 (Shenandoah) compilation fails with SEGV in SBC2Support::pin_and_expand
Reviewed-by: rkennke, thartmann
2020-06-18 13:51:40 +02:00
Tobias Hartmann
d5ae932b3f 8248265: compiler/ciReplay tests fail with AOT compiled java.base
The test should use a non-empty method to trigger compilation.

Reviewed-by: kvn, neliasso, iignatyev
2020-06-30 15:08:40 +02:00
Zhuo Wang
a7e352b554 8246051: SIGBUS by unaligned Unsafe compare_and_swap
Reviewed-by: aph
2020-06-29 10:15:45 -04:00
Chris Plummer
144267d30f 7107012: sun.jvm.hostspot.code.CompressedReadStream readDouble() conversion to long mishandled
Reviewed-by: sspitsyn, dcubed
2020-06-29 14:22:01 -07:00
Patric Hedlin
d19f2bdec0 8234605: C2 failed "assert(C->live_nodes() - live_at_begin <= 2 * _nodes_required) failed: Bad node estimate: actual = 208 >> request = 101"
Reviewed-by: neliasso, kvn
2020-06-29 19:33:35 +02:00
Alexey Semenyuk
320af9b34b 8248264: WinUpgradeUUIDTest application is missing in downgrade scenario
Reviewed-by: herrick, almatvee
2020-06-29 10:52:24 -04:00
Alexey Semenyuk
d180fb3044 8248254: jpackage fails if app module is in external runtime
Reviewed-by: herrick, almatvee
2020-06-29 10:52:24 -04:00
Alexey Semenyuk
1a4f31409a 8248427: jpackage jtreg BasicTest.testTemp() test fails on Windows
Reviewed-by: herrick, almatvee
2020-06-29 10:51:39 -04:00
Bob Vandette
d16ea55b62 8236647: Correct Fix for 8236647: java/lang/invoke/CallSiteTest.java failed with InvocationTargetException in Graal mode
Reviewed-by: kvn, never
2020-06-29 15:25:16 +00:00
Tobias Hartmann
97cdfb92f8 8247832: [Graal] Many Javafuzzer tests failures with Graal, due to unexpected results, after last update JDK-8243380
Cherry-picking GR-24281

Reviewed-by: roland, kvn
2020-06-29 08:18:23 +02:00
Mikael Vidstedt
f44f885f27 8248044: Backout ProblemList-ed tests introduced by JDK-8247876
Reviewed-by: dcubed
2020-06-26 20:07:49 -07:00
Robert Field
a2db08ae98 8247438: JShell: When FailOverExecutionControlProvider fails the proximal cause is not shown
8237743: test/langtools/jdk/jshell/FailOverExecutionControlTest.java fails No ExecutionControlProvider with name 'nonExistent' and parameter keys: []
8199646: JShell tests: jdk/jshell/FailOverDirectExecutionControlTest.java failed with java.lang.UnsupportedOperationException

Reviewed-by: jlahoda
2020-06-26 18:20:22 -07:00
Igor Veresov
1ef33e4df9 8248168: [Graal] jck tests timeout in Graal with -Xcomp mode
Re-enable deadlock avoidance logic for JVMCI and Xcomp.

Reviewed-by: kvn
2020-06-26 15:08:25 -07:00
Daniel D. Daugherty
2534e72618 8248358: ProblemList sun/nio/ch/TestMaxCachedBufferSize.java on macOSX
Reviewed-by: iignatyev
2020-06-25 18:47:26 -04:00
Daniel D. Daugherty
e098a31307 8248351: ProblemList serviceability/jvmti/ModuleAwareAgents/ThreadStart/MAAThreadStart.java on Windows
Reviewed-by: iignatyev
2020-06-25 18:29:53 -04:00
Daniel D. Daugherty
708b60e8c6 8248354: ProblemList vmTestbase/nsk/jdi/stress/serial/mixed002/TestDescription.java
Reviewed-by: cjplummer
2020-06-25 17:54:18 -04:00
Vicente Romero
fc82768478 8247849: permits clause of sealed interfaces should not allow parameterized types
Reviewed-by: jlahoda
2020-06-25 17:48:53 -04:00
Daniel D. Daugherty
8a424425e1 8248341: ProblemList java/lang/management/ThreadMXBean/ThreadMXBeanStateTest.java
Reviewed-by: iignatyev
2020-06-25 15:00:59 -04:00
Daniel D. Daugherty
5724c0d321 8248339: ProblemList jdk/jfr/event/os/TestThreadContextSwitches.java
Reviewed-by: iignatyev
2020-06-25 13:10:47 -04:00
Daniel D. Daugherty
b4ea9cf23e 8248335: ProblemList compiler/ciReplay/TestServerVM.java and TestVMNoCompLevel.java with AOT
Reviewed-by: kvn
2020-06-25 13:08:50 -04:00
Chris Plummer
d886d8c465 8247730: 2 JNI exception pending defect groups in DwarfParser.cpp
Reviewed-by: sspitsyn, amenkov
2020-06-25 08:36:59 -07:00
Christian Hagedorn
601e566b26 8245128: Kitchensink fails with: assert(destination == (address)-1 || destination == entry) failed: b) MT-unsafe modification of inline cache
Fix too strong assertion by additionally considering races due to class unloading and redefinition.

Reviewed-by: eosterlund, kvn, coleenp, sspitsyn
2020-06-25 11:43:20 +02:00
Jan Lahoda
31c511e6a5 8246704: --release => \"unknown enum constant PreviewFeature$Feature.TEXT_BLOCKS\"
Use a synthetic annotation instead of inaccessible jdk.internal.PreviewFeature in ct.sym, and avoid resolving that annotation, to prevent errors being printed for the inaccessible types.

Reviewed-by: jlaskey
2020-06-25 11:06:46 +02:00
Chris Hegarty
42d3bad0b1 8248233: Avoid superfluous Class::isRecord invocations during deserialization
Co-authored-by: Peter Levart <peter.levart@gmail.com>
Reviewed-by: redestad, plevart
2020-06-25 09:54:19 +01:00
Jesper Wilhelmsson
34755c3528 Added tag jdk-15+29 for changeset b58fc6058055 2020-06-25 02:47:58 +02:00
Alexander Matveev
f45d121128 8248255: [macos] Add failing DMG tests to problem list
Reviewed-by: herrick, asemenyuk
2020-06-24 17:53:16 -04:00
Mandy Chung
4b3c33bac1 8247785: Small clarification of the javadoc about builtin class loaders
Reviewed-by: alanb, rriggs, dholmes
2020-06-24 12:21:51 -07:00
Alexey Semenyuk
d85ff3c7f0 8246212: JPKG001-012: application icon is missing in Control Panel Add/Remove
Reviewed-by: herrick, almatvee
2020-06-23 13:42:57 -04:00
Tom Rodriguez
29936542ad 8247246: Add explicit ResolvedJavaType.link and expose presence of default methods
Reviewed-by: kvn
2020-06-24 10:42:26 -07:00
Markus Grönlund
6715f2306e 8241718: assert ((klass)->trace_id()) & ((JfrTraceIdEpoch::method_and_class_in_use_this_epoch_bits()))) != 0 in ObjectSampleCheckpoint::add_to_leakp_set
Reviewed-by: dholmes, iklam, ccheung
2020-06-24 11:22:14 +02:00
Peter Levart
2f09989ec0 8247532: Records deserialization is slow
8248135: Build microbenchmarks with --enable-preview

Test contributed by Chris Hegarty <chris.hegarty@oracle.com>

Reviewed-by: chegar, psandoz, redestad, ihse
2020-06-24 11:05:09 +02:00
Markus Grönlund
4bcd70acc0 8247967: SparkExamples24H.java SIGSEGV in various places
Reviewed-by: dcubed, dholmes
2020-06-24 01:02:19 +02:00
Jonathan Gibbons
e66a2a3384 8247955: doclint: don't complain about summary/caption when role=presentation
Reviewed-by: prappo
2020-06-23 12:27:31 -07:00
Athijegannathan Sundararajan
1e1985da9b 8247956: remove scripts under bin/nashorn and doc/nashorn/source
Reviewed-by: jlaskey
2020-06-23 17:22:07 +05:30
Maurizio Cimadamore
36d716aa08 8248011: Improve javadoc of Foreign Memory Access API
Reviewed-by: psandoz
2020-06-23 11:49:48 +01:00
Chris Hegarty
7f69acc778 8247696: Incorrect tail computation for large segments in AbstractMemorySegmentImpl::mismatch
Reviewed-by: psandoz, mcimadamore
2020-06-23 10:09:26 +01:00
Doug Simon
6469685285 8247992: [JVMCI] HotSpotNmethod.executeVarargs can try execute a zombie nmethod
Reviewed-by: eosterlund, kvn, never
2020-06-23 09:57:30 +02:00
Jonathan Gibbons
4167ba1288 8248061: bad reference in @throws in HotSpotDiagnosticMXBean
Reviewed-by: dcubed
2020-06-22 19:39:18 -07:00
Phil Race
12554c2c03 8244818: Java2D Queue Flusher crash while moving application window to external monitor
Reviewed-by: serb, jdv, kcr
2020-06-22 13:37:41 -07:00
Jonathan Gibbons
9a99f511aa 8247958: minor HTML errors in com.sun.jdi
Reviewed-by: dholmes, sspitsyn
2020-06-22 09:42:42 -07:00
Jonathan Gibbons
9a120e7f79 8247959: doclint errors in NIO code
Reviewed-by: alanb, lancea
2020-06-22 09:29:16 -07:00
Jan Lahoda
61e44cdb6a 8247932: JShell crashes when typing text block
Setting up Log before running javac's scanner, so that errors reported from the scanner are properly ignored.

Reviewed-by: rfield
2020-06-22 12:03:11 +02:00
Roland Westrelin
eb758d53f1 8247763: assert(outer->outcnt() == 2) failed: 'only phis' failure in LoopNode::verify_strip_mined()
Reviewed-by: kvn, thartmann
2020-06-18 15:44:55 +02:00
Weijun Wang
f834dc3dc9 8247964: All log0() in com/sun/org/slf4j/internal/Logger.java should be private
Reviewed-by: rriggs, xuelei
2020-06-21 08:32:54 +08:00
Weijun Wang
c4df79117d 8247907: XMLDsig logging does not work
Reviewed-by: mullan
2020-06-20 15:11:19 +08:00
Daniel D. Daugherty
25b1e5a7bd 8247876: ProblemList various crypto tests on aarch64
Reviewed-by: wetmore
2020-06-19 15:22:19 -04:00
Jonathan Gibbons
e0a7782a9e 8247784: Bad link causes invalid documentation
Reviewed-by: mchung, dholmes, sspitsyn
2020-06-19 11:10:31 -07:00
Jonathan Gibbons
8b6d3147fb 8247815: doclint: recategorize "no description for ..." as MISSING, not SYNTAX
Reviewed-by: prappo
2020-06-19 11:04:52 -07:00
Hannes Wallnöfer
2e6923ffd6 8243533: Only one of several deprecated overloaded methods listed in the Deprecated list
Reviewed-by: jjg
2020-06-19 18:21:08 +02:00
Pavel Rappo
9d40d80237 8247780: Refine the Help page for API Documentation
Reviewed-by: jjg
2020-06-19 16:42:52 +01:00
Mandy Chung
f2b191a6e9 8247444: Trust final fields in records
Co-authored-by: Christoph Dreis <christoph.dreis@freenet.de>
Reviewed-by: jrose, dholmes, forax, coleenp, vlivanov
2020-06-19 08:27:59 -07:00
Hannes Wallnöfer
983e012c9f 8241969: Type annotation is not shown for wildcard type in Javadoc
Reviewed-by: jjg
2020-06-19 17:24:46 +02:00
Hannes Wallnöfer
ffbee17d8a 8198705: Javadoc search needs a fix to handle duplicate package names in different modules
Reviewed-by: jjg
2020-06-19 17:17:40 +02:00
Jan Lahoda
226e852831 8242214: NullPointerException in JDK 14 javac compiling a method reference
Ensuring a proper receiver is used to invoke protected method when method reference is unrolled into a lambda.

Reviewed-by: vromero
2020-06-19 14:26:09 +02:00
Pavel Rappo
5d1255bf52 8246078: Javadoc Search specification link from Javadoc Help page points to JDK 13 spec
Reviewed-by: jjg
2020-06-19 11:52:01 +01:00
Tobias Hartmann
326ba31787 8237950: C2 compilation fails with "Live Node limit exceeded limit" during ConvI2L::Ideal optimization
Postpone ConvI2L::Ideal optimization to IGVN.

Reviewed-by: kvn, neliasso
2020-06-19 11:32:51 +02:00
Goetz Lindenmaier
bf1e6903a2 8233014: Enable ShowCodeDetailsInExceptionMessages by default
Reviewed-by: coleenp, stuefe, dholmes
2020-06-18 22:03:18 +02:00
Jonathan Gibbons
e208d9aa1f 8247899: HTML errors and warnings in threadPrimitiveDeprecation.html
Reviewed-by: lancea
2020-06-18 17:32:57 -07:00
Jonathan Gibbons
510354452f 8247896: Invalid (@throw) tags in 2 java.io classes
Reviewed-by: mchung
2020-06-18 16:21:34 -07:00
Jonathan Gibbons
6c2c0563eb 8247894: Invalid @see in java.management
Reviewed-by: mchung, darcy
2020-06-18 16:19:07 -07:00
Jonathan Gibbons
2155d525dd 8247880: bad HTML(href==...) in table
Reviewed-by: lancea, darcy
2020-06-18 15:54:26 -07:00
Jonathan Gibbons
de3923edf9 8247788: DocCommentParser should not reject standalone '>'
Reviewed-by: prappo
2020-06-18 14:07:49 -07:00
Aleksey Shipilev
a750ac5feb 8247358: Shenandoah: reconsider free budget slice for marking
Reviewed-by: zgu
2020-06-11 18:16:26 +02:00
Chris Hegarty
56048d0480 8247789: Remove use of reflection from test/jdk/java/io/Serializable/records/StreamRefTest.java
Reviewed-by: rriggs, mchung
2020-06-18 17:46:15 +01:00
Alexey Semenyuk
11ac92c8fb 8246244: BasicShortcutHintTest shortcut can not be found
Reviewed-by: herrick, almatvee
2020-06-16 16:23:32 -04:00
Aleksey Shipilev
cfab7f4c68 8247778: ZGC: More parallel gc/z/TestUncommit.java test configuration
Reviewed-by: iignatyev, stefank
2020-06-18 11:23:19 +02:00
Gilles Duboscq
2cbdd21ed7 8241802: [Graal] compiler/loopopts/TestLogSum.java timed out
Reviewed-by: kvn
2020-06-18 10:39:36 +02:00
Jesper Wilhelmsson
59a4517d07 Added tag jdk-15+28 for changeset 06c9f89459da 2020-06-18 03:05:41 +02:00
Vicente Romero
ecb4cbfd4a 8245842: provide tests for binary compatibility assertions for sealed classes
Reviewed-by: jjg
2020-06-17 14:39:44 -04:00
Vicente Romero
ce4978ffe6 8246257: Annotated record's vararg type component started to be uncompilable with JDK15b24
Reviewed-by: jjg, jlaskey
2020-06-17 13:19:51 -04:00
Jonathan Gibbons
2a794b696c 8245696: javadoc crashes when a doc-files directory contains a '#' file
Reviewed-by: hannesw
2020-06-17 09:20:24 -07:00
Adam Sotona
ed4b801771 8238735: NPE compiling lambda expression within conditional expression
The fix saves result type from the first pass through the Attr.visitLambda and returns it after recovery pass to avoid NPE caused by exposure of Type.recoveryType

Reviewed-by: mcimadamore
2020-06-17 13:18:19 +02:00
Igor Ignatyev
338dd21cfe 8247725: move two tests for whitebox from test/hotspot/jtreg/sanity to test/lib-test
Reviewed-by: dcubed
2020-06-17 07:40:11 -07:00
Igor Ignatyev
f740cda526 8247716: JVM_RegisterWhiteBoxMethods checks wrong classloader
Reviewed-by: dcubed
2020-06-17 07:40:09 -07:00
Patric Hedlin
5547d3204d 8247200: assert((unsigned)fpargs < 32)
Reviewed-by: aph, neliasso
2020-06-17 11:08:44 +02:00
Calvin Cheung
3237e82b4b 8247526: [TESTBUG] runtime/cds/appcds/dynamicArchive tests failing with Graal
Adjusted the "shouldMatch" statement and increased the timeout of some tests.

Reviewed-by: iklam
2020-06-16 22:05:09 +00:00
Jonathan Gibbons
a27ee6b284 8236539: Relative link tags in record javadoc don't resolve
Reviewed-by: hannesw
2020-06-16 14:42:06 -07:00
Vicente Romero
dee90e4736 8246098: API for Class::permittedSubclasses should clarify if returned elements are ordered or not
Reviewed-by: chegar
2020-06-16 17:25:02 -04:00
Igor Ignatyev
e7f8e1fdb5 8211977: move testlibrary tests into one place
Reviewed-by: erikj, dholmes, ihse
2020-06-16 09:50:45 -07:00
Yumin Qi
5073b8c163 8247528: runtime/cds/appcds/jigsaw/modulepath/OptimizeModuleHandlingTest.java failing with Graal
OptimizeModuleHandlingTest.java should be disabled for jvmci since jvmci will set jdk.module.addmods.0=jdk.internal.vm.ci which lead to optimization disabled.

Reviewed-by: dcubed
2020-06-16 08:03:40 -07:00
Markus Grönlund
e5d33163c7 8247660: 12 Uninitialised variable in 1 files
Reviewed-by: egahlin
2020-06-16 16:33:45 +02:00
Nils Eliasson
bf300e8d8c 8247421: ReturnBlobToWrongHeapTest.java failed allocating blob
Reviewed-by: kvn
2020-06-16 11:15:43 +02:00
Dean Long
02cec3470f 8236647: java/lang/invoke/CallSiteTest.java failed with InvocationTargetException in Graal mode
Reviewed-by: kvn
2020-06-15 17:17:28 -07:00
Valerie Peng
f968f32789 8246077: Cloneable test in HmacCore seems questionable
Updated java.security.MessageDigest and Signature classes to return Cloneable obj for Cloneable spi obj

Reviewed-by: weijun, xuelei, coffeys
2020-06-15 23:30:49 +00:00
Jonathan Gibbons
c55b06a4d5 8247382: doclint errors (missing comments) in jdk.compiler and jdk.javadoc
Reviewed-by: darcy
2020-06-15 16:05:47 -07:00
Markus Grönlund
898c638b95 8247530: JfrCheckpointManager failed "assert(!SafepointSynchronize::is_at_safepoint()) failed: invariant"
Reviewed-by: egahlin
2020-06-15 21:52:25 +02:00
Daniil Titov
6cdf06f02b 8246196: javax/management/MBeanServer/OldMBeanServerTest fails with AssertionError
Reviewed-by: amenkov, dholmes, sspitsyn
2020-06-15 09:03:45 -07:00
Roger Riggs
6c3c3dad97 8247521: (test) jdk/test/lib/hexdump/HexPrinterTest.java fails on windows
Reviewed-by: iignatyev, joehw
2020-06-15 11:57:33 -04:00
Aleksey Shipilev
b71dac2502 8247575: serviceability/dcmd/gc/HeapDumpCompressedTest unlocks experimental options for Shenandoah and Z
Reviewed-by: tschatzl, stefank
2020-06-15 16:16:48 +02:00
Jie Fu
fd7123b268 8247463: java/nio/channels/etc/OpenAndConnect.java fails due to IPv6 not available
Reviewed-by: dfuchs, alanb
2020-06-13 14:29:08 +08:00
Jie Fu
ca85c5ab15 8247522: assert(is_aligned(class_space_rs.base(), class_space_alignment)) failed: Sanity
Co-authored-by: Thomas Stuefe <thomas.stuefe@gmail.com>
Reviewed-by: stuefe, iklam
2020-06-13 23:10:26 +08:00
Aleksey Shipilev
e3b04bc135 8247560: Shenandoah: heap iteration holds root locks all the time
Reviewed-by: zgu
2020-06-15 14:11:43 +02:00
Aleksey Shipilev
bc73f12313 8247474: Shenandoah: Windows build warning after JDK-8247310
Reviewed-by: rkennke
2020-06-14 18:16:31 +02:00
Ao Qi
faaf52cc30 8247388: Minimal build broken after JDK-8240245 (undefined reference to `MetaspaceShared::_use_optimized_module_handling')
Reviewed-by: iklam, coleenp, dholmes
2020-06-13 18:59:44 -07:00
Weijun Wang
2536cbf2cf 8245679: KeyStore cannot probe PKCS12 keystore if BouncyCastle is the top security provider
Reviewed-by: mullan
2020-06-13 17:49:15 +08:00
Vladimir Kozlov
241f401815 8247350: [aarch64] assert(false) failed: wrong size of mach node
Use movptr() to load address of string

Reviewed-by: adinn, azeemj
2020-06-12 14:33:20 -07:00
Daniel D. Daugherty
e68f81ab4c 8247495: ProblemList vmTestbase/nsk/jvmti/SetFieldAccessWatch/setfldw001/TestDescription.java
Reviewed-by: cjplummer, minqi
2020-06-12 17:28:39 -04:00
Phil Race
7b988b31c6 8240654: ZGC can cause severe UI application repaint issues
Reviewed-by: serb, jdv, stefank, kcr
2020-06-12 09:31:08 -07:00
Daniel D. Daugherty
eeb3c5e9e3 8247492: ProblemList tools/jlink/plugins/CompressorPluginTest.java
Reviewed-by: jlaskey
2020-06-12 12:06:24 -04:00
Andy Herrick
4bc69f4255 8247418: Only validate the certificates trust if using the default key user name
Reviewed-by: asemenyuk, almatvee
2020-06-12 11:24:09 -04:00
Jan Lahoda
19c5bfe42f 8247334: Trees.getScope crashes for annotated local records
Reviewed-by: vromero
2020-06-12 13:38:06 +02:00
Jesper Wilhelmsson
56d333c538 Added tag jdk-15+27 for changeset 93813843680b 2020-06-12 05:00:09 +02:00
Valerie Peng
0b8f18beda 8246613: Choose the default SecureRandom algo based on registration ordering
Fixed java.security.Provider and SecureRandom to use the 1st registered SecureRandom service

Reviewed-by: weijun, mullan
2020-06-12 02:34:44 +00:00
Alexey Semenyuk
edefd3c198 8247422: --runtime-image on Mac should work for runtime root
8247424: jpackage BasicTest.java failed two sub-tests

Reviewed-by: herrick, almatvee
2020-06-11 19:46:39 -04:00
Mandy Chung
c0475c81f2 8247247: JFR tests fail due to JDK-8235521 missing doPrivileged block
Reviewed-by: egahlin
2020-06-11 11:07:09 -07:00
Calvin Cheung
30ff2ad58c 8246382: assert in MetaspaceShared::map_archives
Perform base archive header CRC check earlier.

Reviewed-by: iklam, coleenp
2020-06-11 15:47:36 +00:00
Evgeny Nikitin
212ab17635 8242923: Trigger interface MethodHandle resolve in test without Nashorn
Reviewed-by: iignatyev
2020-06-10 13:17:03 +02:00
Evgeny Nikitin
7e05213271 8244282: test/hotspot/jtreg/compiler/intrinsics/Test8237524.java fails with --illegal-access=deny
Add modules to test/hotspot/jtreg/compiler/intrinsics/Test8237524

Reviewed-by: iignatyev
2020-05-11 17:00:16 +02:00
Alexey Semenyuk
95730995b6 8246792: Mac signing tests failed (unsealed contents present in the bundle root)
Reviewed-by: herrick, almatvee
2020-06-11 09:51:33 -04:00
Jim Laskey
03642a01af 8230744: Several classes throw OutOfMemoryError without message
Reviewed-by: psandoz, martin, bchristi, rriggs, smarks
2020-06-11 10:08:23 -03:00
Thomas Stuefe
2085fd32ff 8247252: TestCombinedCompressedFlags.java failed src/hotspot/share/services/virtualMemoryTracker.cpp:388 Error: ShouldNotReachHere()
Reviewed-by: minqi, dholmes
2020-06-11 12:51:09 +02:00
Markus Grönlund
83d0318ea1 8239024: Kitchensink24HStress.java failed due to timeout
Reviewed-by: egahlin
2020-06-11 10:56:59 +02:00
Markus Grönlund
0228a5c767 8245113: JFR Recorder Thread to run in thread state "_thread_in_native"
Reviewed-by: egahlin
2020-06-11 10:48:35 +02:00
Fairoz Matte
b9ce3b435e 8243451: nsk.share.jdi.Debugee.isJFR_active() is incorrect and corresponsing logic seems to be broken
Fix check isJFR_active()

Reviewed-by: sspitsyn, lmesnik
2020-06-11 08:23:09 +00:00
Robbin Ehn
6a2e3ca206 8247248: JVM TI Monitor queries might create JNI locals in another thread when using handshakes
Reviewed-by: dholmes, dcubed, sspitsyn, ysuenaga
2020-06-11 10:00:23 +02:00
Alan Bateman
c563c3d15b 8241770: Module xxxAnnotation() methods throw NCDFE if module-info.class found as resource in unnamed module
Reviewed-by: mchung
2020-06-11 07:27:22 +01:00
Yumin Qi
96fadefaa3 8240245: Avoid calling is_shared_class_visible() in SystemDictionary::load_shared_class()
SystemDitionary::load_shared_class can avoid calling is_shared_class_visible if dumptime and runtime do not use modulepath and boot classpath appending.

Reviewed-by: iklam, ccheung
2020-06-10 23:16:27 -07:00
Serguei Spitsyn
6d8c81f694 8245126: Kitchensink fails with: assert(!method->is_old()) failed: Should not be installing old methods
Fix the method->is_old() assert

Reviewed-by: dlong, chagedorn
2020-06-11 06:04:05 +00:00
Serguei Spitsyn
2ff9f53a44 8222005: ClassRedefinition crashes with: guarantee(false) failed: OLD and/or OBSOLETE method(s) found
Remove optimizations from class redefinition that cause the guarantee hit

Reviewed-by: coleenp, dcubed
2020-06-11 05:53:33 +00:00
Jesper Wilhelmsson
bb5e5b3826 Added tag jdk-15+27 for changeset 506abc554cae 2020-06-11 04:07:58 +02:00
Jie Fu
462f806818 8247377: Zero and Minimal VMs are broken after JDK-8198698 ('SystemDictionaryShared' has not been declared)
Reviewed-by: dholmes
2020-06-11 10:08:33 +08:00
Alexey Semenyuk
259662fe77 8247353: jtreg tests minor issues clean up
Reviewed-by: herrick, almatvee
2020-06-10 20:45:28 -04:00
Alexey Semenyuk
a2401333fa 8246042: Non-ASCII characters are not handled correctly in the native launcher
Reviewed-by: herrick, almatvee
2020-06-10 20:45:28 -04:00
Alexey Semenyuk
609819173e 8233244: Add tests for icons configuration in rpm/deb packages
Reviewed-by: herrick, almatvee
2020-06-10 20:45:28 -04:00
Jonathan Gibbons
e3cb4df4ef 8247235: doclint should permit "self-closing" tags for void elements in HTML5
Reviewed-by: hannesw
2020-06-10 17:23:05 -07:00
Alexander Matveev
52be8949e7 8245788: EmptyFolderPackageTest fails on Windows 10
Reviewed-by: herrick, asemenyuk
2020-06-10 18:18:30 -04:00
Ralf Schmelter
7450098458 8247362: HeapDumpComressedTest fails
Reviewed-by: dcubed, stefank
2020-06-10 23:40:44 +02:00
Naoto Sato
54f7732c2b 8246721: java/util/Locale/LocaleProvidersRun.java failed on Windows platforms
Reviewed-by: rriggs
2020-06-10 13:29:44 -07:00
Igor Ignatyev
b03766fb79 8183040: update jdk/test/lib/Platform.java to use NIO file
Reviewed-by: amenkov, bpb
2020-06-10 13:15:27 -07:00
Roger Riggs
120a0d116a 8247274: (test) HexPrinter cleanup
Reviewed-by: lancea
2020-06-10 14:51:28 -04:00
Claes Redestad
99136026b8 8246129: ZIP entries created for DOS epoch include local timezone metadata
Reviewed-by: lancea
2020-06-10 20:53:04 +02:00
Igor Ignatyev
e47b2bc8c3 8246387: switch to jtreg 5.1
Reviewed-by: dholmes, erikj
2020-06-10 10:47:40 -07:00
Christian Hagedorn
bf22f82207 8244719: CTW: C2 compilation fails with "assert(!VerifyHashTableKeys || _hash_lock == 0) failed: remove node from hash table before modifying it"
Fix Parse::Block::init_graph() to also count predecessors for exception blocks because they can have a direct bytecode jump to them resulting in this assertion failure.

Reviewed-by: kvn, thartmann
2020-06-10 17:56:23 +02:00
Calvin Cheung
847a3baca8 8198698: Support Lambda proxy classes in dynamic CDS archive
Added archving of hidden classes of type lambda proxy classes.

Co-authored-by: Ioi Lam <ioi.lam@oracle.com>
Reviewed-by: mchung, iklam, dholmes
2020-06-10 15:50:26 +00:00
Alexey Semenyuk
268d870187 8231283: Add support to jpackage to create install Linux packages in /usr hierarchy
Reviewed-by: herrick, almatvee
2020-06-10 11:12:33 -04:00
Aleksey Shipilev
714b345bf5 8247310: Shenandoah: pacer should not affect interrupt status
Reviewed-by: zgu
2020-06-10 16:05:36 +02:00
Alexander Matveev
191fe75c0f 8233215: jpackage doesn't allow enough flexibility for file type binding
Reviewed-by: herrick, asemenyuk
2020-06-10 09:44:56 -04:00
Zhengyu Gu
d36a55d2ac 8246591: Shenandoah: move string dedup roots scanning to concurrent phase
Reviewed-by: shade
2020-06-10 08:34:10 -04:00
Coleen Phillimore
f3c2a17a30 8247220: Make OopHandle constructor explicit
Fix null initializations to explicitly call the OopHandle constructor

Reviewed-by: lfoltan, kbarrett
2020-06-10 08:29:39 -04:00
Erik Gahlin
65c461ed74 8247320: JFR: Reduce logging overhead
Reviewed-by: mgronlun
2020-06-10 13:58:15 +02:00
Erik Gahlin
7e3d4f8c4f 8247266: Speed up test\jdk\jdk\jfr\event\gc\detailed\TestZUncommitEvent.java
Reviewed-by: mgronlun
2020-06-10 13:01:49 +02:00
Erik Gahlin
1dc79293a0 8247269: JFR: Reduce allocation when using AnnotationElement
Reviewed-by: mgronlun
2020-06-10 12:42:02 +02:00
Ralf Schmelter
19be497143 8237354: Add option to jcmd to write a gzipped heap dump
Reviewed-by: rrich, clanger, goetz
2020-06-10 12:29:01 +02:00
Patrick Concannon
2e8356ea40 8244933: DatagramSocket.connect does not specify that it may cause datagrams in the socket receive buffer to be discarded
This fix updates the javadoc for `DatagramSocket.connect` to inform the user that it may cause datagrams in the socket receive buffer to be discarded if not previously received via a call to `DatagramSocket.receive`.

Reviewed-by: alanb, dfuchs
2020-06-10 11:08:19 +01:00
Jan Lahoda
c4985fb868 8237210: Modify the header to include Oracle copyright line
Reviewed-by: jjg
2020-06-10 11:01:34 +02:00
Jan Lahoda
a5e03e234b 8235564: javac crashes while compiling incorrect method invocation with member reference
Reviewed-by: vromero
2020-06-10 11:01:29 +02:00
Conor Cleary
0e770d1e3f 8243655: Map.replace javadoc code snippet typo
Replace 'value' with 'oldValue' in Map.replace(K, V, V) javadoc

Reviewed-by: jlaskey, martin, prappo, jboes
2020-06-10 09:56:33 +01:00
Stefan Karlsson
b4d09cc9e4 8247236: fieldDescriptor::print_on_for prints extra newline after NULL
Reviewed-by: iklam, coleenp, tschatzl
2020-06-10 09:00:59 +02:00
Stefan Karlsson
81685b2ab3 8247214: ZGC: ZUncommit initialization should use precious logging
Reviewed-by: pliden, eosterlund, tschatzl
2020-06-10 09:00:12 +02:00
Stefan Karlsson
c58aaca77e 8247201: Print potential pointer value of readable stack memory in hs_err file
Reviewed-by: eosterlund, dholmes, tschatzl
2020-06-10 08:59:34 +02:00
Stefan Karlsson
8e865fc569 8246926: Clean up newlines and whitespaces in hs_err files
Reviewed-by: dholmes, eosterlund, iklam
2020-06-10 08:58:43 +02:00
Stefan Karlsson
90a774b922 8246272: Make use of GCLogPrecious for G1, Parallel and Serial
Reviewed-by: pliden, eosterlund, sjohanss
2020-06-10 08:57:50 +02:00
Prasanta Sadhukhan
a6df9ae23a Merge 2020-06-10 12:43:22 +05:30
Jonathan Gibbons
07e6b75ff5 8242607: -Xdoclint doesn't report missing/unexpected comments
Reviewed-by: ksrini
2020-06-09 20:05:04 -07:00
Jonathan Gibbons
0652a7883d 8246705: javadoc gives "misleading" and incomplete warning message
Reviewed-by: hannesw
2020-06-09 19:50:30 -07:00
Jonathan Gibbons
56abdc178e 8246712: doclint incorrectly reports some HTML elements as empty
Reviewed-by: prappo
2020-06-09 19:34:18 -07:00
Jie Fu
80ae89b1aa 8247284: Zero VM is broken after JDK-8244920 ('class JavaFrameAnchor' has no member named 'set_last_Java_sp')
Reviewed-by: iklam, dholmes
2020-06-10 09:32:27 +08:00
Anthony Scarpino
ee452946fc 8245686: Ed25519 and Ed448 present in handshake messages
Reviewed-by: jnimeh, xuelei, wetmore
2020-06-09 18:27:59 -07:00
Anthony Scarpino
b6a9f3015a 8241680: crypto microbenchmarks need updating for disabled EC curves
Reviewed-by: ecaspole, redestad, skuksenko, jnimeh
2020-06-09 16:01:25 -07:00
Kim Barrett
0bf3ba402b 8246718: ParallelGC should not check for forward objects for copy task queue
Prefetch task's oop markword and unconditionally push task.

Reviewed-by: tschatzl, eosterlund
2020-06-09 18:42:00 -04:00
Naoto Sato
27e168677f 8246662: Test java/time/test/java/time/format/TestUnicodeExtension.java failed on japanese locale
Reviewed-by: rriggs, joehw
2020-06-09 14:46:08 -07:00
Joe Wang
140a79765f 8237456: Transform filtered through SAX filter mishandles character entities
Reviewed-by: aefimov, lancea
2020-06-09 21:23:33 +00:00
Prasanta Sadhukhan
41c5a07fa9 Merge 2020-06-09 17:03:35 +05:30
Per Lidén
9d0ba7ae7f 8246220: ZGC: Introduce ZUnmapper to asynchronous unmap pages
Reviewed-by: eosterlund, stefank
2020-06-09 11:01:09 +02:00
Per Lidén
d7e68f375c 8245208: ZGC: Don't hold the ZPageAllocator lock while committing/uncommitting memory
Reviewed-by: eosterlund, stefank
2020-06-09 11:01:09 +02:00
Per Lidén
cd16b568ce 8246265: ZGC: Introduce ZConditionLock
Reviewed-by: eosterlund, stefank
2020-06-09 11:01:09 +02:00
Per Lidén
63a3d8f0f2 8245204: ZGC: Introduce ZListRemoveIterator
Reviewed-by: eosterlund, stefank
2020-06-09 11:01:09 +02:00
Per Lidén
4d8189b265 8245203: ZGC: Don't track size in ZPhysicalMemoryBacking
Reviewed-by: eosterlund, stefank
2020-06-09 11:01:09 +02:00
Shivangi Gupta
82e3640eb1 8246330: Add TLS Tests for Legacy ECDSA curves
Reviewed-by: rhalade
2020-06-09 00:04:40 -07:00
Thomas Stuefe
8dc66431d4 8243535: NMT may show wrong numbers for CDS and CCS
Reviewed-by: zgu, iklam
2020-06-09 08:41:33 +02:00
Igor Ignatyev
dc91b06661 8244614: cleanup keywords used/available in hotspot testbase
Reviewed-by: coleenp, mseledtsov
2020-06-08 21:27:22 -07:00
Andy Herrick
b37d806d82 8246706: [macos] Allow SigningPackageTest to be built with real certificates
Reviewed-by: asemenyuk, almatvee
2020-06-08 20:24:29 -04:00
Alexander Matveev
976c469305 8236282: [macos] Find permanent solution to macOS test timeout problem JDK-8235738
Reviewed-by: herrick, asemenyuk
2020-06-08 20:19:12 -04:00
Mandy Chung
71d646a160 8235521: Replacement API for Unsafe::ensureClassInitialized
Reviewed-by: alanb, chegar, psandoz
2020-06-08 16:55:45 -07:00
Dean Long
6fc6476da8 8246719: remove LambdaStableNameTest from problem list
Reviewed-by: kvn
2020-06-08 15:12:08 -07:00
Claes Redestad
9cd41b6555 8246592: Simplify checking of boolean file attributes
Reviewed-by: rriggs, alanb
2020-06-08 22:47:16 +02:00
Brian Burkhalter
1786701011 8246729: MappedByteBuffer.force() throws IndexOutOfBoundsException
Reviewed-by: psandoz, alanb
2020-06-08 13:15:59 -07:00
Adam Sotona
63ade9c49c 8236697: Stack overflow with cyclic hierarchy in class file
Implemented minimal necessary cycle detection to avoid stack overflow in c.s.t.j.code.Types::asSuper

Reviewed-by: vromero
2020-06-08 16:07:03 -04:00
Erik Joelsson
46f4bf93db 8246750: Docs bundle should be published to common dir
Reviewed-by: ihse
2020-06-08 11:06:36 -07:00
Markus Grönlund
a748779e1e 8246770: Atomic::add() with 64 bit value fails to link on 32-bit platforms
Reviewed-by: egahlin
2020-06-08 19:49:21 +02:00
Anthony Scarpino
785b914282 8243424: Signature and SignatureSpi get parameter methods may return null when unsupported
Reviewed-by: mullan
2020-06-08 10:45:58 -07:00
Claes Redestad
a043bd0ff8 8246632: StringConcatFactory::makeConcatWithConstants no longer throws NullPointerException when an unexpected constant is null
Reviewed-by: rriggs, mchung
2020-06-08 19:23:51 +02:00
Daniil Titov
5805cbeaaf 8081652: [TESTBUG] java/lang/management/ThreadMXBean/ThreadMXBeanStateTest.java timed out intermittently
Reviewed-by: cjplummer, dholmes
2020-06-08 09:58:55 -07:00
Daniil Titov
ea9aeda5ee 8131745: java/lang/management/ThreadMXBean/AllThreadIds.java still fails intermittently
Reviewed-by: sspitsyn, amenkov
2020-06-08 09:47:21 -07:00
Magnus Ihse Bursie
b073038e54 8246751: Mac OS build settings should use -O3
Reviewed-by: erikj
2020-06-08 18:15:55 +02:00
Vicente Romero
e90621c169 8246199: 'permits' is a restricted identifier
Reviewed-by: mcimadamore
2020-06-08 11:08:28 -04:00
Jan Lahoda
358714bcd0 8246353: Sealed types not supported by jshell
Reviewed-by: rfield, vromero
2020-06-08 16:59:43 +02:00
Julia Boes
3943f9d0b7 8246431: java/net/httpclient/PathSubscriber tests fail due to missing FilePermission
Add explicit jtreg build configuration and adjust permissions accordingly

Reviewed-by: chegar, dfuchs
2020-06-08 15:27:31 +01:00
Alexander Scherbatiy
2845c3d029 8245938: Remove unused print_stack(void) method from XToolkit.c
Reviewed-by: serb
2020-06-08 16:38:23 +03:00
Alexey Semenyuk
f87ef60b09 8238204: run_tests.sh fails on macOS when called from test_jpackage.sh
Reviewed-by: herrick, almatvee
2020-06-08 09:13:01 -04:00
Alexey Semenyuk
28d2cdf99a 8246627: Consolidate app image bundlers
Reviewed-by: herrick, almatvee
2020-06-08 09:13:00 -04:00
Alexey Semenyuk
045d61b5e0 8246624: Refactor JLinkBundlerHelper and StandardBundlerParam classes
Reviewed-by: herrick, almatvee
2020-06-08 09:12:58 -04:00
Erik Österlund
086c5f1750 8246442: nmethod::can_convert_to_zombie() asserts when not called by the sweeper
Reviewed-by: dholmes, dcubed, kvn
2020-06-08 12:15:30 +00:00
Patric Hedlin
201d0a48d1 8246689: Enable independent compressed oops/class ptrs on Aarch64
Reviewed-by: eosterlund
2020-06-08 13:57:55 +02:00
Erik Österlund
6cbd66b1c1 8242240: JfrStacktrace_lock rank not special enough
Reviewed-by: mgronlun, pliden
2020-06-09 16:22:54 +00:00
Erik Österlund
f160c80e3b 8244920: Access violation in frames::interpreter_frame_method
Reviewed-by: mgronlun, coleenp
2020-06-09 16:22:54 +00:00
Hannes Wallnöfer
ac2828ddf1 8164408: Add module support for @see, @link and @linkplain javadoc tags
Reviewed-by: jjg
2020-06-09 18:18:22 +02:00
Erik Österlund
9a8ace2c0a 8246837: Rename WeakHandle<vm_class_loader_data> to better reflect its OopStorage association
Reviewed-by: coleenp
2020-06-09 16:09:55 +00:00
Pavel Rappo
6e43cddad7 8247115: Fix typos in java.lang.invoke and java.lang
Reviewed-by: lancea
2020-06-09 16:28:10 +01:00
Pavel Rappo
3df95aa377 8247212: Use assistant markup in java.lang.module.ModuleDescriptor
Reviewed-by: alanb
2020-06-09 16:17:09 +01:00
Patrick Concannon
5b6f050fce 8245828: Remove unnecessary NetworkPermission checks from jdk/net/ExtendedSocketOptions.java
This fix removes NetworkPermission checks that were made redundant in jdk/net/ExtendedSocketOptions after the socket option SO_FLOW_SLA was removed.

Reviewed-by: alanb
2020-06-09 15:39:22 +01:00
Vicente Romero
59428f4a0d 8245958: j.l.Record need to mention that canonical constructor may not be public
Reviewed-by: mchung
2020-06-09 10:31:05 -04:00
Patrick Concannon
ac906168c8 8243999: DatagramSocket and MulticastSocket constructors don't specify how a null InetAddress is handled
This fix clarifies the behaviours of constructors from DatagramSocket and MulticastSocket when no address or a null address is supplied.

Reviewed-by: dfuchs
2020-06-09 15:26:53 +01:00
Erik Joelsson
c47f27e1c6 8236469: macOS devkit needs 64-bit SetFile for Catalina
Reviewed-by: ihse
2020-06-09 14:09:22 +00:00
Adam Sotona
022d7a19d3 8236108: tools/javac/lambda/LambdaParserTest.java timed out
The patch filters redundant or non-sense combinations of lambdas and it reduces the number of performed sub-tests.

Reviewed-by: vromero
2020-06-09 09:37:53 -04:00
Yasumasa Suenaga
9149f10fa4 8241439: jdk.NativeLibraryEvent hooks all opened regular files
Reviewed-by: stuefe, cito
2020-06-08 17:21:09 +09:00
Matthias Baesken
7d6c1cf4a8 8246648: issue with OperatingSystemImpl getFreeSwapSpaceSize in docker after 8242480
Reviewed-by: bobv, sgehwolf
2020-06-08 09:29:32 +02:00
Tobias Hartmann
a98bad2b22 8246453: TestClone crashes with "all collected exceptions must come from the same place"
Set deoptimize_on_exception for slow paths.

Reviewed-by: neliasso
2020-06-08 08:30:52 +02:00
Yang Zhang
35ceac0083 8243597: AArch64: Add support for integer vector abs
Reviewed-by: aph
2020-06-08 02:42:57 +00:00
Serguei Spitsyn
be14526569 8196450: Deprecate JDWP/JDI canUnrestrictedlyRedefineClasses to match JVM TI capabilities
Deprecate capabilities unsupported in JVM TI

Reviewed-by: dholmes, cjplummer
2020-06-06 08:13:40 +00:00
John Jiang
ff8c6d5deb 8246709: sun/security/tools/jarsigner/TsacertOptionTest.java compilation failed after JDK-8244683
Reviewed-by: weijun
2020-06-06 13:51:23 +08:00
Magnus Ihse Bursie
2625942c43 8246484: Verify patch at start of COMPARE_BUILD=PATCH run
Reviewed-by: erikj
2020-06-06 02:06:48 +02:00
Magnus Ihse Bursie
cd651b9aad 8246435: Replace Javascript implementation of pandoc filters with Java
Reviewed-by: erikj
2020-06-06 02:04:21 +02:00
Phil Race
2048bcb648 8244621: [macos10.15] Garbled FX printing plus CoreText warnings on Catalina when building with Xcode 11
Reviewed-by: kcr, psadhukhan
2020-06-05 16:40:56 -07:00
Jim Laskey
71c926c4f6 8246697: Test: java/util/StringJoiner/StringJoinerTest.java failing with OOM
Reviewed-by: iignatyev
2020-06-05 16:34:23 -03:00
Stuart Marks
a46a94c431 8245068: Implement Deprecation of RMI Activation
Reviewed-by: lancea, rriggs
2020-06-05 10:14:10 -07:00
Fernando Guallini
8d19eca78c 8222241: Example in ServiceLoader API docs should have one provides directive
This patch fixes an example given in the ServiceLoader API doc that, if used, would result in a compilation error.

Reviewed-by: alanb
2020-06-05 17:34:49 +01:00
Hannes Wallnöfer
9c3be78826 8246429: Javadoc comparators are not module-aware
Reviewed-by: jjg
2020-06-05 18:06:13 +02:00
Patrick Concannon
97fc959e35 8246132: AsynchronousSocketChannelNAPITest failing with a NotYetConnectedException
Fix for intermitant failure with AsynchronousSocketChannelNAPITest that sometimes fails with a NotYetConnectedException while trying to read data after connecting

Reviewed-by: alanb, dfuchs
2020-06-05 16:40:16 +01:00
John Jiang
13d30235e1 8244683: A TSA server used by tests
Reviewed-by: weijun
2020-06-05 23:36:01 +08:00
Jim Laskey
ec4240b342 8246696: Test: java/util/StringJoiner/StringJoinerTest.java failing with OOM
Reviewed-by: sundar
2020-06-05 11:46:58 -03:00
Igor Ignatyev
efffff1dbb 8245874: requires.extraPropDefns.vmOpts doesn't need -Xbootclasspath/a:bootClasses
Reviewed-by: lmesnik, vlivanov
2020-06-05 07:28:50 -07:00
Pavel Rappo
0b02c5b5e0 8245981: Upgrade to jQuery 3.5.1
Reviewed-by: hannesw
2020-06-05 15:03:09 +01:00
Coleen Phillimore
498b0e61ed 8246340: Move SystemDictionary GC roots into OopStorage
Use vm_global() OopStorage for system dictionary roots

Reviewed-by: eosterlund, lfoltan
2020-06-05 09:55:31 -04:00
Per Lidén
06e47d05b6 8246622: Remove CollectedHeap::print_gc_threads_on()
Reviewed-by: stefank, tschatzl, sjohanss
2020-06-05 15:22:53 +02:00
Markus Grönlund
c66bef0289 8233705: Let artifact iteration running time be a function of incrementally tagged artifacts
Reviewed-by: egahlin
2020-06-05 15:11:44 +02:00
Markus Grönlund
45fa5aa699 8242088: Replace mutually exclusive lists with concurrent alternatives
Reviewed-by: egahlin
2020-06-05 14:59:27 +02:00
Jim Laskey
4de4200652 8230743: StringJoiner does not handle too large strings correctly
Reviewed-by: rriggs, psandoz, martin
2020-06-05 09:37:14 -03:00
Coleen Phillimore
cb960ee7b5 8245487: Potential double-free of interfaces array
Free _local_interfaces when we free _transitive_interfaces since they can share memory.

Reviewed-by: fparain, lfoltan, iklam
2020-06-05 06:54:05 -04:00
Weijun Wang
f833afa660 8246640: @systemproperty should be @systemProperty in java.security.jgss
Reviewed-by: xuelei
2020-06-05 17:55:57 +08:00
Prasanta Sadhukhan
5aea3f0250 8245668: closed test javax/swing/JComboBox/4765319/bug4765319.java fails on windows
Reviewed-by: kizune
2020-06-03 21:51:50 +05:30
Martin Doerr
5f0f4d75e0 8246377: [PPC64] Further improvements for assembler stop function
Reviewed-by: goetz, xliu
2020-06-03 00:22:26 +02:00
Dean Long
6c3bc71079 8243380: Update Graal
Reviewed-by: kvn
2020-06-05 02:00:02 -07:00
Thomas Schatzl
0963050548 8246557: test_os_linux.cpp uses NULL instead of MAP_FAILED to check for failed mmap call
Reviewed-by: sjohanss, stefank
2020-06-05 10:44:24 +02:00
Patrick Concannon
d071ed0294 8244582: Remove terminally deprecated Solaris-specific SO_FLOW_SLA socket option
This patch removes ExtendedSocketOptions.SO_FLOW_SLA, SocketFlow and SocketFlow.Status which were terminally deprecated in JDK 14 in preparation for the removal of the Solaris port.

Reviewed-by: alanb, dfuchs, chegar, vtewari
2020-06-05 09:35:42 +01:00
Alexander Zuev
b4943a3f02 8237243: [macOS] java/awt/event/KeyEvent/DisabledTargetF10/DisabledTargetF10.html fails
Reviewed-by: psadhukhan
2020-06-02 19:32:44 +03:00
Pankaj Bansal
e97c5f41ee 8196094: javax/swing/JFileChooser/8002077/bug8002077.java fails
Reviewed-by: psadhukhan
2020-06-01 23:06:02 +05:30
Prasanta Sadhukhan
d616488567 Merge 2020-05-30 10:33:28 +05:30
Brian Burkhalter
c328bca493 8246183: Scanner/ScanTest.java fails due to SIGSEGV in StubRoutines::jshort_disjoint_arraycopy
Reviewed-by: mikael, smarks
2020-05-29 19:08:57 -07:00
Brian Burkhalter
cd340d5e70 8245121: (bf) XBuffer.put(Xbuffer src) can give unexpected result when storage overlaps
Reviewed-by: alanb, darcy, psandoz
2020-05-29 14:23:51 -07:00
Xue-Lei Andrew Fan
7514ad9ad0 8240871: SSLEngine handshake status immediately after the handshake can be NOT_HANDSHAKING rather than FINISHED with TLSv1.3
Reviewed-by: ascarpino
2020-05-29 13:48:13 -07:00
Phil Race
604005d65c 8159597: [TEST_BUG] closed/javax/swing/JPopupMenu/4760494/bug4760494.java leaves key pressed
Reviewed-by: serb, psadhukhan
2020-05-29 13:11:36 -07:00
Alexey Semenyuk
1d4bd253e4 8245831: Unify code parsing version strings on Mac and Windows
Reviewed-by: herrick, almatvee
2020-05-29 15:57:18 -04:00
Daniel Fuchs
9e43496c42 8245867: Logger/bundleLeak/BundleTest.java fails due to "OutOfMemoryError: Java heap space"
The test is fixed to release the memory as soon as it's no longer needed.

Reviewed-by: lancea, dcubed, dholmes
2020-05-29 20:35:46 +01:00
Bob Vandette
f79801b74d 8245832: JDK build make-static-libs should build all JDK libraries
Reviewed-by: erikj
2020-05-29 19:18:23 +00:00
Coleen Phillimore
5314d28f84 8245289: Clean up offset code in JavaClasses
Make offset member names consistent and private, move static initializations near owning classes

Reviewed-by: fparain, lfoltan
2020-05-29 15:00:19 -04:00
Zhengyu Gu
e639c9a840 8246162: Shenandoah: full GC does not mark code roots when class unloading is off
Reviewed-by: shade
2020-05-29 13:44:02 -04:00
Zhengyu Gu
4f9020f481 8245880: Shenandoah: check class unloading flag early in concurrent code root scan
Reviewed-by: shade
2020-05-29 13:40:51 -04:00
Andrew Haley
d101efc16b Merge 2020-05-29 13:16:30 -04:00
Erik Gahlin
72f1a49746 8246130: JFR: TestInheritedAnnotations has incorrect validation
Reviewed-by: mgronlun
2020-05-29 18:59:39 +02:00
Erik Gahlin
984373408e 8246128: JFR: Fix warnings
Reviewed-by: mgronlun
2020-05-29 17:02:11 +02:00
Erik Gahlin
6fd44901ec 8216303: JFR: Simplify generated files
Reviewed-by: erikj, mgronlun
2020-05-29 15:19:01 +02:00
Aleksei Efimov
02fbf44cc7 8244958: preferIPv4Stack and preferIPv6Addresses do not affect addresses returned by HostsFileNameService
Reviewed-by: dfuchs, alanb, vtewari
2020-05-29 13:39:16 +01:00
Hannes Wallnöfer
b43f356288 8177280: @see {@link} syntax should allow generic types
8237826: DocTrees should provide getType(DocTreePath) method

Reviewed-by: jjg
2020-05-29 14:28:13 +02:00
Julia Boes
c0a1a4e4fc 8237470: HttpResponse.BodySubscriber::ofFile throws UOE with non-default file systems
Rework non-default file system paths of BodySubscriber::ofFile and BodyHandler::ofFile and fix BodyHandler::ofFileDownload to throw consistently for non-default file system paths

Reviewed-by: dfuchs, chegar
2020-05-29 12:59:13 +01:00
Maurizio Cimadamore
55ed0d853f 8246040: java/foreign/TestAddressHandle fails on big endian platforms
Make test more robust by not relying on implicit endianness-related assumption

Reviewed-by: chegar
2020-05-29 12:40:50 +01:00
Peter Levart
5967aaf629 8246050: Improve scalability of MemoryScope
Reiplement memory scope using StampedLock

Reviewed-by: psandoz
2020-05-29 12:12:09 +01:00
Patrick Concannon
4708c6d343 8243507: DatagramSocket constructors don’t always specify what happens when passed invalid parameters
This fix updates the spec for DatagramSocket's constructors to inform the user of the Exceptions thrown when an invalid argument is passed.

Reviewed-by: dfuchs
2020-05-29 11:08:09 +01:00
Prasanta Sadhukhan
53015e6d82 Merge 2020-05-29 09:44:27 +05:30
Andrew Haley
339d52600b 8245986: AArch64: Provide information when hitting a HaltNode
Reviewed-by: adinn
2020-05-28 12:49:27 -04:00
Tejpal Rebari
7cc3ba5f9b 8239827: The test OpenByUNCPathNameTest.java should be changed to be manual
Reviewed-by: psadhukhan
2020-05-28 14:30:39 +05:30
Pankaj Bansal
e4a972de1a 8245968: javax/swing/JTable/7124218/SelectEditTableCell.java is added to ProblemList twice
Reviewed-by: psadhukhan
2020-05-28 11:23:23 +05:30
Pankaj Bansal
342e9f88cd 8233647: [TESTBUG] JColorChooser/Test8051548.java is failing on macos
Reviewed-by: psadhukhan
2020-05-27 18:02:49 +05:30
Pankaj Bansal
85822a50d5 8233566: [TESTBUG] KeyboardFocusManager tests failing on MacoS
Reviewed-by: psadhukhan
2020-05-27 17:55:47 +05:30
Pankaj Bansal
9b3fb5d1d5 8233551: [TESTBUG] SelectEditTableCell.java fails on MacOS
Reviewed-by: psadhukhan
2020-05-27 17:35:42 +05:30
Tejpal Rebari
c638618814 8233559: [TESTBUG] TestNimbusOverride.java is failing on macos
Reviewed-by: psadhukhan, pbansal
2020-05-27 09:08:08 +05:30
Pankaj Bansal
04b3bf6024 8233550: [TESTBUG] JTree tests fail regularly on MacOS
Reviewed-by: psadhukhan, jdv
2020-05-23 13:27:09 +05:30
Pankaj Bansal
15433df97f 8233552: [TESTBUG] JTable Test bug7068740.java fails on MacOS
Reviewed-by: psadhukhan
2020-05-23 13:11:41 +05:30
Jayathirth D V
ab042c601f 8213129: java/awt/font/FontNames/LocaleFamilyNames.java times out in Win7
Reviewed-by: psadhukhan
2020-05-22 11:31:31 +05:30
Prasanta Sadhukhan
af85c26514 8067986: Test javax/swing/JComboBox/ConsumedKeyTest/ConsumedKeyTest.java fails
Reviewed-by: serb
2020-05-21 12:02:18 +05:30
Jayathirth D V
b58735ea76 8028701: java/awt/Focus/ShowFrameCheckForegroundTest/ShowFrameCheckForegroundTest.java fails
Reviewed-by: pbansal
2020-05-21 11:13:28 +05:30
Weijun Wang
b852688c05 8237592: Enhance certificate verification
Reviewed-by: xuelei, mullan, rhalade, ahgross
2020-04-18 12:16:42 +08:00
Roger Riggs
34fc33074a 8234836: Improve serialization handling
Reviewed-by: chegar, rhalade, skoivu
2020-04-16 10:33:44 -04:00
Alex Menkov
19c29923a5 8241522: Manifest improved jar headers redux
Reviewed-by: sspitsyn, jwilhelm, mschoene, rhalade
2020-04-14 14:21:25 -07:00
Joe Wang
d7bbb5c4a6 8242136: Better XML namespace handling
Reviewed-by: lancea, dfuchs, skoivu, rhalade, kravikumar
2020-04-14 16:29:15 +00:00
Stuart Marks
343ecd806b 8231800: Better listing of arrays
Reviewed-by: alanb, rhalade, ahgross, igerasim
2020-04-07 13:27:55 -07:00
Chris Hegarty
0ffa6b75fd 8237117: Better ForkJoinPool behavior
Reviewed-by: dfuchs, alanb, rhalade, mullan
2020-04-03 17:20:45 +01:00
Weijun Wang
fe514a2e55 8241379: Update JCEKS support
Reviewed-by: ahgross, mullan, rhalade
2020-04-03 17:24:59 +08:00
Phil Race
e3673d4677 8238843: Enhanced font handing
Reviewed-by: serb, psadhukhan, mschoene, rhalade
2020-03-25 16:26:21 -07:00
Igor Veresov
45258a1799 8236867: Enhance Graal interface handling
Reviewed-by: never, dnsimon, kvn, ahgross, rhalade
2020-03-24 08:42:32 -07:00
Sergey Bylokhov
0c58055bac 8240482: Improved WAV file playback
Reviewed-by: amenkov, rhalade, mschoene, prr
2020-03-23 19:57:51 -07:00
Weijun Wang
6ac3892e16 8238804: Enhance key handling process
Reviewed-by: rriggs, mullan, ahgross, rhalade
2020-03-18 13:35:16 +08:00
Brian Burkhalter
c90e523e0a 8238920: Better Buffer support
Reviewed-by: alanb, ahgross, rhalade, psandoz
2020-03-17 14:05:19 -07:00
Phil Race
800f133a29 8240119: Less Affine Transformations
Reviewed-by: serb, bpb, mschoene, rhalade
2020-03-17 13:46:19 -07:00
Sergey Bylokhov
45cace2867 8238925: Enhance WAV file playback
Reviewed-by: prr, amenkov, rhalade, mschoene
2020-03-10 07:07:09 +01:00
Xue-Lei Andrew Fan
8fdbb29079 8236191: Enhance OID processing
Reviewed-by: jnimeh, weijun, ahgross, rhalade
2020-03-05 14:59:34 -08:00
Aleksei Efimov
fa3d79c2f8 8230613: Better ASCII conversions
Reviewed-by: dfuchs, naoto, mschoene, rhalade
2020-02-28 14:24:39 +00:00
Jayathirth D V
151b6f1402 8233239: Enhance TIFF support
Reviewed-by: prr, bpb, mschoene, rhalade
2020-02-20 11:32:54 +05:30
Richard Reingruber
4d75aef609 8238585: JvmtiEventControllerPrivate::enter_interp_only_mode() should not make compiled methods on stack not_entrant
Reviewed-by: mdoerr, kvn, sspitsyn
2020-02-13 15:56:28 +01:00
Stefan Karlsson
8384f7ff28 8246406: ZGC: Generate crash reports in debug builds for a few important errors paths
Reviewed-by: pliden, eosterlund
2020-06-05 09:05:41 +02:00
Stefan Karlsson
1c27ce30b4 8246405: Add GCLogPrecious functionality to log and report debug errors
Reviewed-by: pliden, eosterlund
2020-06-05 07:56:07 +02:00
Zhengyu Gu
aee74901f7 8246593: Shenandoah: string dedup roots should be processed during concurrent weak roots phase
Reviewed-by: shade
2020-06-04 20:57:04 -04:00
Shravya Rukmannagari
9d5f388498 8245512: CRC32 optimization using AVX512 instructions
Reviewed-by: kvn
2020-06-04 17:36:58 -07:00
Serguei Spitsyn
9a7f519aee 8245321: refactor the redefine check that an attribute consisting of a list of classes has not changed
Refactor the redefine check of an array attribute

Reviewed-by: hseigel, coleenp
2020-06-05 00:06:16 +00:00
Weijun Wang
507816d550 8244565: Accept PKCS #8 with version number 1
Reviewed-by: valeriep
2020-06-05 07:53:50 +08:00
Vicente Romero
0db1be28c7 8246486: javac doesn't allow a subclass to be declared before a sealed superclass with no permits clause
Reviewed-by: mcimadamore
2020-06-04 19:02:43 -04:00
Valerie Peng
b94314a0d9 8087327: CipherStream produces new byte array on every update or doFinal operation
Changed Cipher[In/Out]putStream to allocate a buffer and reuse it

Reviewed-by: weijun
2020-06-04 20:30:16 +00:00
Ziyi Luo
9a88048a05 8246274: G1 old gen allocation tracking is not in a separate class
Add G1OldGenAllocationTracker

Reviewed-by: tschatzl, phh
2020-06-04 13:25:33 -07:00
Zhengyu Gu
1b59097077 8246612: Shenandoah: add timing tracking to ShenandoahStringDedupRoots
Reviewed-by: shade
2020-06-04 15:01:04 -04:00
Brian Burkhalter
9cadf1a004 8246282: [REDO] JDK-8245121 (bf) XBuffer.put(Xbuffer src) can give unexpected result when storage overlaps
Reviewed-by: psandoz, alanb
2020-06-04 11:39:39 -07:00
Vladimir Kozlov
dd016c34dd 8227647: [Graal] Test8009761.java fails due to "RuntimeException: static java.lang.Object compiler.uncommontrap.Test8009761.m3(boolean,boolean) not compiled"
Wait Graal compilation to finish if request came from testing environment.

Reviewed-by: thartmann, iignatyev
2020-06-04 10:59:06 -07:00
Eric Caspole
a351ebd40b 8245043: Simplified contention benchmark
Reviewed-by: shade, skuksenko
2020-06-04 13:16:38 -04:00
Magnus Ihse Bursie
e1b8e91e80 8246478: Remove src/utils/reorder
Reviewed-by: iklam
2020-06-04 14:56:32 +02:00
Jorn Vernee
4365c2b745 8246572: Always pass java.library.path when running micro benchmarks
Reviewed-by: ihse, redestad
2020-06-04 14:56:36 +02:00
Jesper Wilhelmsson
62d1de37e2 Added tag jdk-15+26 for changeset 0a32396f7a69 2020-06-04 04:34:51 +02:00
Weijun Wang
bcbe46b0b3 8246397: Use KnownOIDs for known OIDs
Reviewed-by: xuelei
2020-06-04 10:04:32 +08:00
Erik Gahlin
2bfc64ad1f 8245283: JFR: Can't handle constant dynamic used by Jacoco agent
Reviewed-by: mgronlun
2020-06-04 00:14:33 +02:00
Erik Gahlin
7d1eb8f07c 8246260: JFR: Write event size field without padding
Reviewed-by: jbachorik, mgronlun
2020-06-04 00:09:04 +02:00
Claes Redestad
827c8865d8 8246451: Reduce overhead of normalizing file paths with trailing slash
Reviewed-by: lancea
2020-06-03 22:29:34 +02:00
Zhengyu Gu
d9fc44540e 8246458: Shenandoah: TestAllocObjects.java test fail with -XX:+ShenandoahVerify
Reviewed-by: shade
2020-06-03 12:09:04 -04:00
Chris Hegarty
f1e1cb7055 8246095: Tweaks to memory access API
Add more user friendly API points to the foreign memory acesss API

Reviewed-by: chegar, psandoz
2020-06-03 16:50:03 +01:00
Chris Hegarty
eec7750e55 8238763: ObjectInputStream readUnshared method handling of Records
Reviewed-by: rriggs
2020-06-03 15:46:53 +01:00
Man Cao
f7cb0f760f 8244278: Excessive code cache flushes and sweeps
Reviewed-by: neliasso
2020-06-03 15:26:23 +02:00
Nils Eliasson
99d6bea20d 8244660: Code cache sweeper heuristics is broken
Reviewed-by: thartmann, rehn
2020-06-03 15:26:18 +02:00
Nils Eliasson
06b49fa3f7 8244658: Remove dead code in code cache sweeper
Reviewed-by: mdoerr, kvn
2020-06-03 15:26:04 +02:00
Conor Cleary
10874e0291 8245658: Arrays.java has two occurrences of bad unicode constants in Javadoc
This patch fixes two instances of bad unicode formatting in the javadoc for Arrays.java where the null character constant was incorrectly specified.

Reviewed-by: jlaskey, lancea, prappo, dfuchs
2020-06-03 14:31:04 +01:00
Stefan Karlsson
a809ff0e3f 8246434: Threads::print_on_error assumes that the heap has been set up
Reviewed-by: dholmes
2020-06-03 14:34:35 +02:00
Stefan Karlsson
b5678a43cc 8246258: Enable hs_err heap printing earlier during initialization
Reviewed-by: stuefe, sjohanss
2020-06-02 09:57:35 +02:00
Stefan Karlsson
a180444c6f 8246404: ZGC: Use GCLogPrecious for important logging lines
Reviewed-by: sjohanss, pliden, eosterlund
2020-06-03 14:32:31 +02:00
Stefan Karlsson
5fc89b6e72 8246135: Save important GC log lines and print them when dumping hs_err files
Reviewed-by: sjohanss, pliden, eosterlund
2020-06-03 14:30:56 +02:00
Aleksey Shipilev
1314ca87c1 8246433: Shenandoah: walk roots in more efficient order in ShenandoahRootUpdater
Reviewed-by: zgu
2020-06-03 14:02:51 +02:00
Stefan Karlsson
26a18414f6 8246134: ZGC: Restructure hs_err sections
Reviewed-by: pliden, eosterlund
2020-05-29 11:58:00 +02:00
Valerie Peng
56b7960496 8242897: KeyFactory.generatePublic( x509Spec ) failed with java.security.InvalidKeyException
Changed SunRsaSign provider to accept RSA signature oid in RSA key encoding for backward compatibility

Reviewed-by: weijun
2020-06-03 04:29:04 +00:00
Daniel D. Daugherty
563ce12127 8246359: clarify confusing comment in ObjectMonitor::EnterI()'s race with async deflation
Reviewed-by: cvarming, eosterlund, dholmes
2020-06-02 19:49:07 -04:00
Naoto Sato
d347d2ebf9 8246261: TCKLocalTime.java failed due to "AssertionError: expected [18:14:22] but found [18:14:23]"
Reviewed-by: lancea, joehw
2020-06-02 13:49:47 -07:00
Alex Menkov
3dc78e76e4 8204994: SA might fail to attach to process with "Windbg Error: WaitForEvent failed"
Reviewed-by: sspitsyn, cjplummer
2020-06-02 13:22:06 -07:00
Igor Ignatyev
453f6cf4d9 8243434: use reproducible random in :vmTestbase_vm_g1classunloading
Reviewed-by: kbarrett, lmesnik
2020-06-02 13:04:21 -07:00
Igor Ignatyev
f2cd6d6a10 8243430: use reproducible random in :vmTestbase_vm_gc
Reviewed-by: kbarrett, lmesnik, tschatzl
2020-06-02 13:04:21 -07:00
Claes Redestad
0366f6bf45 8246338: Reduce overhead of normalizing file paths
Reviewed-by: alanb
2020-06-02 22:22:58 +02:00
Serguei Spitsyn
ddbc7ed0a1 8221306: JVMTI spec for FramePop(), MethodExit(), and MethodEnter() could use some cleanup
JVMTI spec cleanup for functions FramePop(), MethodExit(), and MethodEnter()

Reviewed-by: cjplummer, amenkov
2020-06-02 19:34:19 +00:00
Joe Darcy
7e862f91dc 8246368: Add override for return tag of Modifier::toString
Reviewed-by: jjg
2020-06-02 12:16:58 -07:00
Alexander Matveev
47cc808b98 8232841: [TESTBUG] [macos] SigningPackageTest fails when untrusted certificates exist on machine
Reviewed-by: herrick, asemenyuk
2020-06-02 09:39:54 -04:00
Andy Herrick
1933fe39ae 8246010: AdditionalLaunchersTest is not enabled, and fails
Reviewed-by: asemenyuk, almatvee
2020-06-02 09:30:21 -04:00
Thomas Stuefe
5ce3d0d8e5 8245707: Increase Metaspace reserve alignment
Reviewed-by: iklam, coleenp
2020-06-02 21:04:13 +02:00
Zhengyu Gu
334df28eca 8246342: Shenandoah: remove unused ShenandoahIsMarkedNextClosure
Reviewed-by: shade
2020-06-02 15:01:45 -04:00
Zhengyu Gu
512cc3ebf2 8245961: Shenandoah: move some root marking to concurrent phase
Reviewed-by: shade
2020-06-02 14:57:40 -04:00
Gerard Ziemski
8752e02e66 8245833: crash_with_sigfpe uses pthread_kill(SIGFPE) on macOS
Changed division code to ensure that real crash happens

Reviewed-by: dholmes
2020-06-02 13:15:13 -05:00
Gerard Ziemski
5f67125ba6 8245509: Crash handler itself crashes when reporting Unsafe.putInt(0) crash
Added ResourceMarker

Reviewed-by: coleenp, dholmes
2020-06-02 13:12:50 -05:00
Pavel Rappo
f6ad22fce5 8236823: Ensure that API documentation uses minified libraries
Reviewed-by: jjg
2020-06-02 18:43:22 +01:00
Joe Darcy
a1114948b0 8246290: Refine specification of javax.lang.model.element.Modifier::toString
Reviewed-by: vromero, jjg
2020-06-02 09:54:51 -07:00
Ioi Lam
ccb6d0e572 8234628: Change BasicHashTables::new_entry() to use clamp()
Reviewed-by: dcubed
2020-06-02 09:29:10 -07:00
Roland Westrelin
9c99008aff 8245714: "Bad graph detected in build_loop_late" when loads are pinned on loop limit check uncommon branch
Reviewed-by: thartmann
2020-05-28 13:21:54 +02:00
Roland Westrelin
01cfedf2c9 8244086: Following 8241492, strip mined loop may run extra iterations
Reviewed-by: mdoerr, thartmann
2020-04-29 10:06:38 +02:00
Aleksey Shipilev
ed538ea5e0 8246097: Shenandoah: limit parallelism in CLDG root handling
Reviewed-by: zgu
2020-06-02 14:27:18 +02:00
Aleksey Shipilev
82dc495ca0 8246100: Shenandoah: walk roots in more efficient order
Reviewed-by: zgu
2020-06-02 14:26:16 +02:00
Claes Redestad
19257f4fb7 8246241: LambdaFormEditor should use a transform lookup key that is not a SoftReference
Reviewed-by: psandoz, mchung
2020-06-02 12:34:05 +02:00
Conor Cleary
22532ff30e 8242281: IntStream.html#reduce doc should not mention average
Remove mention of average function in apiNote of IntStream::reduce(int, IntBinaryOperator)

Reviewed-by: psandoz, jlaskey, lancea, dfuchs
2020-06-02 11:25:58 +01:00
Christian Hagedorn
f7a65b7fff 8239083: C1 assert(known_holder == NULL || (known_holder->is_instance_klass() && (!known_holder->is_interface() || ((ciInstanceKlass*)known_holder)->has_nonstatic_concrete_methods())), "should be non-static concrete method");
Remove unnecessary preparation to profile the holder of a static method called by a method handle in C1.

Reviewed-by: thartmann, kvn
2020-06-02 11:05:34 +02:00
Ioi Lam
f39a71cafe 8243506: SharedBaseAddress is ignored by -Xshare:dump
Reviewed-by: stuefe, ccheung
2020-06-02 01:08:44 -07:00
Tobias Hartmann
b5775c831d 8239477: jdk/jfr/jcmd/TestJcmdStartStopDefault.java fails -XX:+VerifyOops with "verify_oop: rsi: broken oop"
Use T_ADDRESS instead of T_OBJECT to load metadata.

Reviewed-by: kvn
2020-06-02 10:00:40 +02:00
Tobias Hartmann
f822eed55c 8245957: Remove unused LIR_OpBranch::type after SPARC port removal
Removed LIR_OpBranch::type after the only remaining usage was removed with the SPARC port removal.

Reviewed-by: kvn, mdoerr
2020-06-02 09:57:57 +02:00
Tobias Hartmann
5793b0633a 8246153: TestEliminateArrayCopy fails with -XX:+StressReflectiveCode
Use the memory input instead of the control input to find the membar.

Reviewed-by: kvn, neliasso
2020-06-02 09:07:53 +02:00
Jan Lahoda
44ae643b2b 8210649: AssertionError @ jdk.compiler/com.sun.tools.javac.comp.Modules.enter(Modules.java:244)
Do not clean trees after last round of annotation processing, if the trees won't be re-entered again.

Reviewed-by: vromero
2020-06-02 08:41:36 +02:00
Jan Lahoda
04ad75e788 8241519: javac crashes with wrong module-info.class in module path
If module-info.class is broken, mark the corresponding ModuleSymbol as erroneous.

Reviewed-by: jjg
2020-06-02 08:27:37 +02:00
Xiaohong Gong
1adecc8e3a 8245717: VM option "-XX:EnableJVMCIProduct" could not be repetitively enabled
Reviewed-by: dholmes, kvn
2020-06-02 04:32:40 +00:00
Daniel D. Daugherty
00f223e22f 8153224: Monitor deflation prolong safepoints
Add support for AsyncDeflateIdleMonitors (default true); the async deflation work is performed by the ServiceThread.

Co-authored-by: Carsten Varming <varming@gmail.com>
Reviewed-by: dcubed, rehn, rkennke, cvarming, coleenp, acorn, dholmes, eosterlund
2020-06-01 23:37:14 -04:00
Pengfei Li
30aa1b0689 8245158: C2: Enable SLP for some manually unrolled loops
In SuperWord::find_align_to_ref(), only discard unalignable memory ops if memory references should be aligned on this platform.

Reviewed-by: roland, thartmann
2020-06-02 03:34:15 +00:00
Vicente Romero
d42bfef8a4 8227046: compiler implementation for sealed classes
8225056: VM support for sealed classes
8227044: javax.lang.model for sealed classes
8227045: Preview APIs support for sealed classes
8227047: Javadoc for sealed types
8245854: JVM TI Specification for sealed classes

Co-authored-by: Harold Seigel <harold.seigel@oracle.com>
Co-authored-by: Jan Lahoda <jan.lahoda@oracle.com>
Reviewed-by: mcimadamore, forax, darcy, dholmes, jlahoda, lfoltan, mchung, sspitsyn, vromero
2020-06-01 17:00:40 -04:00
Erik Gahlin
567692e4ae 8246259: JFR: Fetch VM memory pools without using streams
Reviewed-by: mgronlun
2020-06-01 22:55:22 +02:00
Mandy Chung
5e5880d4f1 8245061: Lookup::defineHiddenClass should throw ClassFormatError if this_class is not Class_info structure
8245432: Lookup::defineHiddenClass should throw UnsupportedClassVersionError if bytes are of an unsupported major or minor version
8245596: Clarify Lookup::defineHiddenClass spec @throws IAE if the bytes has ACC_MODULE flag set

Reviewed-by: alanb, dholmes
2020-06-01 13:19:06 -07:00
Claes Redestad
1f698a35f2 8246152: Improve String concat bootstrapping
Reviewed-by: forax, psandoz
2020-06-01 22:04:22 +02:00
Fedor Burdun
f3e027c001 8246256: GenerateLinkOptData should not mutate the interim or bootstrap JDK
Reviewed-by: erikj, ihse
2020-06-01 22:03:52 +02:00
Claes Redestad
ad7dafb138 8246251: Adjust HelloClasslist after JDK-8230301
Reviewed-by: mchung
2020-06-01 21:57:08 +02:00
Boris Ulasevich
0b20eafb30 8241004: NMT tests fail on unaligned thread size with debug build
Reviewed-by: zgu, dsamersoff
2020-06-01 13:31:53 -04:00
Phil Race
d0c6eef9a5 8246263: jdk is not yet ready for new Copyright line
Reviewed-by: pbansal
2020-06-01 10:04:19 -07:00
Xin Liu
0ec39a0b70 8230552: Provide information when hitting a HaltNode for architectures other than x86
Reviewed-by: mdoerr
2020-06-01 08:52:01 -04:00
Adam Sotona
5a57b9f8ec 8245153: Unicode encoded double-quoted empty string does not compile
Fixed parsing of Unicode encoded double-quoted empty strings in c.s.t.j.p.JavaTokenizer::scanString

Reviewed-by: jlaskey
2020-05-29 09:56:05 +02:00
Zhengyu Gu
4d10ebba12 8246075: Missing logging in nmethod::oops_do_marking_epilogue() on early return path
Reviewed-by: kbarrett
2020-06-01 08:19:58 -04:00
Jim Laskey
bfd2e96120 8230800: Clarify String::stripIndent javadoc when string ends with line terminator
Reviewed-by: jlaskey, bchristi, rriggs
2020-06-01 08:17:32 -03:00
Per Lidén
7467cd2ee5 8246045: ZGC: Fix ZDirector::rule_high_usage() calculation
Reviewed-by: stefank, eosterlund
2020-05-31 23:15:30 +02:00
Per Lidén
231d9a01d9 8246044: ZGC: Rename ZDirector's max_capacity to soft_max_capacity
Reviewed-by: stefank, eosterlund
2020-05-31 23:15:07 +02:00
Per Lidén
116aee4950 8242527: ZGC: TestUncommit.java fails due to "Exception: Uncommitted too fast"
Reviewed-by: eosterlund
2020-05-31 23:15:05 +02:00
Hong Shao Yang
0082c69496 8246198: Typo in java/util/regex/Pattern.java
Reviewed-by: lancea, prappo, naoto
2020-05-31 11:32:44 -04:00
Weijun Wang
6212aea580 8246193: Possible NPE in ENC-PA-REP search in AS-REQ
Reviewed-by: xuelei
2020-05-31 10:13:04 +08:00
Adam Sotona
4eeb61299f 8244573: java.lang.ArrayIndexOutOfBoundsException thrown for malformed class file
Fixed java.lang.ArrayIndexOutOfBoundsException in com.sun.tools.classfile.Code_attribute.getInstructions() for methods with no instructions

Reviewed-by: vromero
2020-05-30 20:10:18 -04:00
Phil Race
3476724641 8238002: Better matrix operations
Reviewed-by: serb, erikj, mschoene, rhalade
2020-02-12 12:18:46 -08:00
Joe Wang
697fb9e41b 8232014: Expand DTD support
Reviewed-by: lancea, dfuchs, mschoene, rhalade, aefimov
2020-02-12 18:59:58 +00:00
Brian Burkhalter
fc02d9872e 8238013: Enhance String writing
Reviewed-by: alanb, ahgross, rhalade, rriggs
2020-02-06 07:59:39 -08:00
Sean Mullan
d285fd6dce 8234418: Better parsing with CertificateFactory
Reviewed-by: weijun, mschoene, rhalade
2020-02-06 09:36:51 -05:00
Lance Andersen
8a616df8b5 8233234: Better Zip Naming
Reviewed-by: alanb, ahgross, redestad, coffeys, mschoene, rhalade
2020-01-31 13:52:04 -05:00
Sergey Bylokhov
a5a46ff8e5 8233255: Better Swing Buttons
Reviewed-by: alitvinov, prr, ahgross, rhalade
2020-01-28 10:51:00 -08:00
Sean Mullan
da6daad2e5 8234042: Better factory production of certificates
Reviewed-by: weijun, rhalade, mschoene
2020-01-17 08:04:14 -05:00
Sean Mullan
1bfcf768f5 8234032: Improve basic calendar services
Reviewed-by: weijun, rhalade, mschoene
2020-01-14 14:51:57 -05:00
5343 changed files with 136554 additions and 36842 deletions

13
.hgtags
View File

@@ -638,3 +638,16 @@ f143729ca00ec14a98ea5c7f73acba88da97746e jdk-15+23
58833044988772ca06c97ab2f142474a8627af80 jdk-15+25
58833044988772ca06c97ab2f142474a8627af80 jdk-15+25
90b266a84c06f1b3dc0ed8767856793e8c1c357e jdk-15+25
0a32396f7a690015d22ca3328ac441a358295d90 jdk-15+26
506abc554caeb275928c02bf3a16e95d1978749f jdk-15+27
506abc554caeb275928c02bf3a16e95d1978749f jdk-15+27
93813843680bbe1b7efbca56c03fd137f20a2c31 jdk-15+27
06c9f89459daba98395fad726100feb44f89ba71 jdk-15+28
b58fc60580550a4a587cab729d8fd87223ad6932 jdk-15+29
6909e4a1f25bfe9a2727026f5845fc1fc44a36aa jdk-15+30
a32f58c6b8be81877411767de7ba9c4cf087c1b5 jdk-15+31
2dad000726b8d5db9f3df647fb4949d88f269dd4 jdk-15+32
6b65f4e7a975628df51ef755b02642075390041d jdk-15+33
b0817631d2f4395508cb10e81c3858a94d9ae4de jdk-15+34
fd60c3146a024037cdd9be34c645bb793995a7cc jdk-15+35
e3f940bd3c8fcdf4ca704c6eb1ac745d155859d5 jdk-15+36

8
README
View File

@@ -2,11 +2,11 @@
Welcome to the JDK!
===================
For information about building the JDK, including how to retrieve all
of the source code, please see either of these files:
For build instructions, please see either of these files:
* doc/building.html (html version)
* doc/building.md (markdown version)
See http://openjdk.java.net/ for more information about the OpenJDK
Community and the JDK.
See https://openjdk.java.net/ for more information about
the OpenJDK Community and the JDK.

View File

@@ -1,135 +0,0 @@
#!/bin/sh
#
# Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
###########################################################################################
# This is a helper script to evaluate nashorn with optimistic types
# it produces a flight recording for every run, and uses the best
# known flags for performance for the current configration
###########################################################################################
# Flags to enable assertions, we need the system assertions too, since
# this script runs Nashorn in the BCP to override any nashorn.jar that might
# reside in your $JAVA_HOME/jre/lib/ext/nashorn.jar
#
ENABLE_ASSERTIONS_FLAGS="-ea -esa"
# Flags to instrument lambdaform computation, caching, interpretation and compilation
# Default compile threshold for lambdaforms is 30
#
#LAMBDAFORM_FLAGS="\
# -Djava.lang.invoke.MethodHandle.COMPILE_THRESHOLD=3 \
# -Djava.lang.invoke.MethodHandle.DUMP_CLASS_FILES=true \
# -Djava.lang.invoke.MethodHandle.TRACE_METHOD_LINKAGE=true \
# -Djava.lang.invoke.MethodHandle.TRACE_INTERPRETER=true"
# Flags to run trusted tests from the Nashorn test suite
#
#TRUSTED_TEST_FLAGS="\
#-Djava.security.manager \
#-Djava.security.policy=../build/nashorn.policy -Dnashorn.debug"
# Testing out new code optimizations using the generic hotspot "new code" parameter
#
#USE_NEW_CODE_FLAGS=-XX:+UnlockDiagnosticVMOptions -XX:+UseNewCode
#
#-Dnashorn.typeInfo.disabled=false \
# and for Nashorn options:
# --class-cache-size=0 --persistent-code-cache=false
# Unique timestamped file name for JFR recordings. For JFR, we also have to
# crank up the stack cutoff depth to 1024, because of ridiculously long lambda form
# stack traces.
#
# It is also recommended that you go into $JAVA_HOME/jre/lib/jfr/default.jfc and
# set the "method-sampling-interval" Normal and Maximum sample time as low as you
# can go (10 ms on most platforms). The default is normally higher. The increased
# sampling overhead is usually negligible for Nashorn runs, but the data is better
if [ -z $JFR_FILENAME ]; then
JFR_FILENAME="./nashorn_$(date|sed "s/ /_/g"|sed "s/:/_/g").jfr"
fi
# Flight recorder
#
# see above - already in place, copy the flags down here to disable
ENABLE_FLIGHT_RECORDER_FLAGS="\
-XX:+FlightRecorder \
-XX:FlightRecorderOptions=defaultrecording=true,disk=true,dumponexit=true,dumponexitpath=$JFR_FILENAME,stackdepth=1024"
# Type specialization and math intrinsic replacement should be enabled by default in 8u20 and nine,
# keeping this flag around for experimental reasons. Replace + with - to switch it off
#
#ENABLE_TYPE_SPECIALIZATION_FLAGS=-XX:+UseTypeSpeculation
# Same with math intrinsics. They should be enabled by default in 8u20 and 9, so
# this disables them if needed
#
#DISABLE_MATH_INTRINSICS_FLAGS=-XX:-UseMathExactIntrinsics
# Add timing to time the compilation phases.
#ENABLE_TIME_FLAGS=--log=time
# Add ShowHiddenFrames to get lambda form internals on the stack traces
#ENABLE_SHOW_HIDDEN_FRAMES_FLAGS=-XX:+ShowHiddenFrames
# Add print optoassembly to get an asm dump. This requires 1) a debug build, not product,
# That tired compilation is switched off, for C2 only output and that the number of
# compiler threads is set to 1 for determinsm.
#
#PRINT_ASM_FLAGS=-XX:+PrintOptoAssembly -XX:-TieredCompilation -XX:CICompilerCount=1 \
# Tier compile threasholds. Default value is 10. (1-100 is useful for experiments)
#TIER_COMPILATION_THRESHOLD_FLAGS=-XX:IncreaseFirstTierCompileThresholdAt=10
# Directory where to look for nashorn.jar in a dist folder. The default is "..", assuming
# that we run the script from the make dir
DIR=..
NASHORN_JAR=$DIR/dist/nashorn.jar
# The built Nashorn jar is placed first in the bootclasspath to override the JDK
# nashorn.jar in $JAVA_HOME/jre/lib/ext. Thus, we also need -esa, as assertions in
# nashorn count as system assertions in this configuration
# Type profiling default level is 111, 222 adds some compile time, but is faster
$JAVA_HOME/bin/java \
$ENABLE_ASSERTIONS_FLAGS \
$LAMBDAFORM_FLAGS \
$TRUSTED_FLAGS \
$USE_NEW_CODE_FLAGS \
$ENABLE_SHOW_HIDDEN_FRAMES_FLAGS \
$ENABLE_FLIGHT_RECORDER_FLAGS \
$ENABLE_TYPE_SPECIALIZATION_FLAGS \
$TIERED_COMPILATION_THRESOLD_FLAGS \
$DISABLE_MATH_INTRINSICS_FLAGS \
$PRINT_ASM_FLAGS \
-Xbootclasspath/p:$NASHORN_JAR \
-Xms2G -Xmx2G \
-XX:TypeProfileLevel=222 \
-cp $CLASSPATH:../build/test/classes/ \
jdk.nashorn.tools.Shell $ENABLE_TIME_FLAGS ${@}

0
configure vendored Normal file → Executable file
View File

View File

@@ -1,631 +0,0 @@
This document describes system properties that are used for internal
debugging and instrumentation purposes, along with the system loggers,
which are used for the same thing.
This document is intended as a developer resource, and it is not
needed as Nashorn documentation for normal usage. Flags and system
properties described herein are subject to change without notice.
=====================================
1. System properties used internally
=====================================
This documentation of the system property flags assume that the
default value of the flag is false, unless otherwise specified.
SYSTEM PROPERTY: -Dnashorn.args=<string>
This property takes as its value a space separated list of Nashorn
command line options that should be passed to Nashorn. This might be
useful in environments where it is hard to tell how a nashorn.jar is
launched.
Example:
> java -Dnashorn.args="--lazy-complation --log=compiler" large-java-app-with-nashorn.jar
> ant -Dnashorn.args="--log=codegen" antjob
SYSTEM PROPERTY: -Dnashorn.args.prepend=<string>
This property behaves like nashorn.args, but adds the given arguments
before the existing ones instead of after them. Later arguments will
overwrite earlier ones, so this is useful for setting default arguments
that can be overwritten.
SYSTEM PROPERTY: -Dnashorn.unstable.relink.threshold=x
NOTE: This property is deprecated in favor of the
"--unstable-relink-threshold" command line option. It controls how many
call site misses are allowed before a callsite is relinked with "apply"
semantics to never change again. In the case of megamorphic callsites,
this is necessary, or the program would spend all its time swapping out
callsite targets. When neither the system property nor the command line
option are specified, defaults to 8, or 16 with optimistic types turned
on.
SYSTEM PROPERTY: -Dnashorn.compiler.splitter.threshold=x
This will change the node weight that requires a subgraph of the IR to
be split into several classes in order not to run out of bytecode space.
The default value is 0x8000 (32768).
SYSTEM PROPERTY: -Dnashorn.serialize.compression=<x>
This property sets the compression level used when deflating serialized
AST structures of anonymous split functions. Valid values range from 0 to 9,
the default value is 4. Higher values will reduce memory size of serialized
AST but increase CPU usage required for compression.
SYSTEM PROPERTY: -Dnashorn.codegen.debug.trace=<x>
See the description of the codegen logger below.
SYSTEM PROPERTY: -Dnashorn.fields.objects, -Dnashorn.fields.dual
When the nashorn.fields.objects property is true, Nashorn will always
use object fields for AccessorProperties, requiring boxing for all
primitive property values. When nashorn.fields.dual is set, Nashorn
will always use dual long/object fields, which allows primitives to be
stored without boxing. When neither system property is set, Nashorn
chooses a setting depending on the optimistic types setting (dual
fields when optimistic types are enabled, object-only fields otherwise).
With dual fields, Nashorn uses long fields to store primitive values.
Ints are represented as the 32 low bits of the long fields. Doubles
are represented as the doubleToLongBits of their value. This way a
single field can be used for all primitive types. Packing and
unpacking doubles to their bit representation is intrinsified by
the JVM and extremely fast.
In the future, this might complement or be replaced by experimental
feature sun.misc.TaggedArray, which has been discussed on the mlvm
mailing list. TaggedArrays are basically a way to share data space
between primitives and references, and have the GC understand this.
SYSTEM PROPERTY: -Dnashorn.compiler.symbol.trace=[<x>[,*]],
-Dnashorn.compiler.symbol.stacktrace=[<x>[,*]]
When this property is set, creation and manipulation of any symbol
named "x" will show information about when the compiler changes its
type assumption, bytecode local variable slot assignment and other
data. This is useful if, for example, a symbol shows up as an Object,
when you believe it should be a primitive. Usually there is an
explanation for this, for example that it exists in the global scope
and type analysis has to be more conservative.
Several symbols names to watch can be specified by comma separation.
If no variable name is specified (and no equals sign), all symbols
will be watched
By using "stacktrace" instead of or together with "trace", stack
traces will be displayed upon symbol changes according to the same
semantics.
SYSTEM PROPERTY: -Dnashorn.lexer.xmlliterals
If this property it set, it means that the Lexer should attempt to
parse XML literals, which would otherwise generate syntax
errors. Warning: there are currently no unit tests for this
functionality.
XML literals, when this is enabled, end up as standard LiteralNodes in
the IR.
SYSTEM_PROPERTY: -Dnashorn.debug
If this property is set to true, Nashorn runs in Debug mode. Debug
mode is slightly slower, as for example statistics counters are enabled
during the run. Debug mode makes available a NativeDebug instance
called "Debug" in the global space that can be used to print property
maps and layout for script objects, as well as a "dumpCounters" method
that will print the current values of the previously mentioned stats
counters.
These functions currently exists for Debug:
"map" - print(Debug.map(x)) will dump the PropertyMap for object x to
stdout (currently there also exist functions called "embedX", where X
is a value from 0 to 3, that will dump the contents of the embed pool
for the first spill properties in any script object and "spill", that
will dump the contents of the growing spill pool of spill properties
in any script object. This is of course subject to change without
notice, should we change the script object layout.
"methodHandle" - this method returns the method handle that is used
for invoking a particular script function.
"identical" - this method compares two script objects for reference
equality. It is a == Java comparison
"equals" - Returns true if two objects are either referentially
identical or equal as defined by java.lang.Object.equals.
"dumpCounters" - will dump the debug counters' current values to
stdout.
Currently we count number of ScriptObjects in the system, number of
Scope objects in the system, number of ScriptObject listeners added,
removed and dead (without references).
We also count number of ScriptFunctions, ScriptFunction invocations
and ScriptFunction allocations.
Furthermore we count PropertyMap statistics: how many property maps
exist, how many times were property maps cloned, how many times did
the property map history cache hit, prevent new allocations, how many
prototype invalidations were done, how many time the property map
proto cache hit.
Finally we count callsite misses on a per callsite bases, which occur
when a callsite has to be relinked, due to a previous assumption of
object layout being invalidated.
"getContext" - return the current Nashorn context.
"equalWithoutType" - Returns true if if the two objects are both
property maps, and they have identical properties in the same order,
but allows the properties to differ in their types.
"diffPropertyMaps" Returns a diagnostic string representing the difference
of two property maps.
"getClass" - Returns the Java class of an object, or undefined if null.
"toJavaString" - Returns the Java toString representation of an object.
"toIdentString" - Returns a string representation of an object consisting
of its java class name and hash code.
"getListenerCount" - Return the number of property listeners for a
script object.
"getEventQueueCapacity" - Get the capacity of the event queue.
"setEventQueueCapacity" - Set the event queue capacity.
"addRuntimeEvent" - Add a runtime event to the runtime event queue.
The queue has a fixed size (see -Dnashorn.runtime.event.queue.size)
and the oldest entry will be thrown out of the queue is about to overflow.
"expandEventQueueCapacity" - Expands the event queue capacity,
or truncates if capacity is lower than current capacity. Then only
the newest entries are kept.
"clearRuntimeEvents" - Clear the runtime event queue.
"removeRuntimeEvent" - Remove a specific runtime event from the event queue.
"getRuntimeEvents" - Return all runtime events in the queue as an array.
"getLastRuntimeEvent" - Return the last runtime event in the queue.
SYSTEM PROPERTY: -Dnashorn.methodhandles.debug.stacktrace
This enhances methodhandles logging (see below) to also dump the
stack trace for every instrumented method handle operation.
Warning: This is enormously verbose, but provides a pretty
decent "grep:able" picture of where the calls are coming from.
SYSTEM PROPERTY: -Dnashorn.cce
Setting this system property causes the Nashorn linker to rely on
ClassCastExceptions for triggering a callsite relink. If not set, the linker
will add an explicit instanceof guard.
SYSTEM PROPERTY: -Dnashorn.spill.threshold=<x>
This property sets the number of fields in an object from which to use
generic array based spill storage instead of Java fields. The default value
is 256.
SYSTEM PROPERTY: -Dnashorn.tcs.miss.samplePercent=<x>
When running with the trace callsite option (-tcs), Nashorn will count
and instrument any callsite misses that require relinking. As the
number of relinks is large and usually produces a lot of output, this
system property can be used to constrain the percentage of misses that
should be logged. Typically this is set to 1 or 5 (percent). 1% is the
default value.
SYSTEM PROPERTY: -Dnashorn.persistent.code.cache
This property can be used to set the directory where Nashorn stores
serialized script classes generated with the -pcc/--persistent-code-cache
option. The default directory name is "nashorn_code_cache".
SYSTEM PROPERTY: -Dnashorn.typeInfo.maxFiles
Maximum number of files to store in the type info cache. The type info cache
is used to cache type data of JavaScript functions when running with
optimistic types (-ot/--optimistic-types). There is one file per JavaScript
function in the cache.
The default value is 0 which means the feature is disabled. Setting this
to something like 20000 is probably good enough for most applications and
will usually cap the cache directory to about 80MB presuming a 4kB
filesystem allocation unit. Set this to "unlimited" to run without limit.
If the value is not 0 or "unlimited", Nashorn will spawn a cleanup thread
that makes sure the number of files in the cache does not exceed the given
value by deleting the least recently modified files.
SYSTEM PROPERTY: -Dnashorn.typeInfo.cacheDir
This property can be used to set the directory where Nashorn stores the
type info cache when -Dnashorn.typeInfo.maxFiles is set to a nonzero
value. The default location is platform specific. On Windows, it is
"${java.io.tmpdir}\com.oracle.java.NashornTypeInfo". On Linux and
Solaris it is "~/.cache/com.oracle.java.NashornTypeInfo". On Mac OS X,
it is "~/Library/Caches/com.oracle.java.NashornTypeInfo".
SYSTEM PROPERTY: -Dnashorn.typeInfo.cleanupDelaySeconds=<value>
This sets the delay between cleanups of the typeInfo cache, in seconds.
The default delay is 20 seconds.
SYSTEM PROPERTY: -Dnashorn.profilefile=<filename>
When running with the profile callsite options (-pcs), Nashorn will
dump profiling data for all callsites to stderr as a shutdown hook. To
instead redirect this to a file, specify the path to the file using
this system property.
SYSTEM_PROPERTY: -Dnashorn.regexp.impl=[jdk|joni]
This property defines the regular expression engine to be used by
Nashorn. Set this flag to "jdk" to get an implementation based on the
JDK's java.util.regex package. Set this property to "joni" to install
an implementation based on Joni, the regular expression engine used by
the JRuby project. The default value for this flag is "joni"
SYSTEM PROPERTY: -Dnashorn.runtime.event.queue.size=<value>
Nashorn provides a fixed sized runtime event queue for debugging purposes.
See -Dnashorn.debug for methods to access the event queue.
The default value is 1024.
SYSTEM PROPERTY: -Dnashorn.anonymous.classes.threshold=<value>
Nashorn can use anonymous classes for loading compiled scripts, depending
on the --anonymous-classes=[auto|true|false] option. Anonymous classes load
faster, but the loaded classes get less optimization applied to them and
therefore usually run slower. In the default "auto" setting, scripts are
loaded as anonymous classes if the script size does not exceed 512 bytes.
The above system property allows to set this threshold to a user defined
value.
===============
2. The loggers.
===============
It is very simple to create your own logger. Use the DebugLogger class
and give the subsystem name as a constructor argument.
The Nashorn loggers can be used to print per-module or per-subsystem
debug information with different levels of verbosity. The loggers for
a given subsystem are available are enabled by using
--log=<systemname>[:<level>]
on the command line.
Here <systemname> identifies the name of the subsystem to be logged
and the optional colon and level argument is a standard
java.util.logging.Level name (severe, warning, info, config, fine,
finer, finest). If the level is left out for a particular subsystem,
it defaults to "info". Any log message logged as the level or a level
that is more important will be output to stderr by the logger.
Several loggers can be enabled by a single command line option, by
putting a comma after each subsystem/level tuple (or each subsystem if
level is unspecified). The --log option can also be given multiple
times on the same command line, with the same effect.
For example: --log=codegen,fields:finest is equivalent to
--log=codegen:info --log=fields:finest
The following is an incomplete list of subsystems that currently
support logging. Look for classes implementing
jdk.nashorn.internal.runtime.logging.Loggable for more loggers.
* compiler
The compiler is in charge of turning source code and function nodes
into byte code, and installs the classes into a class loader
controlled from the Context. Log messages are, for example, about
things like new compile units being allocated. The compiler has global
settings that all the tiers of codegen (e.g. Lower and CodeGenerator)
use.s
* recompile
This logger shows information about recompilation of scripts and
functions at runtime. Recompilation may happen because a function
was called with different parameter types, or because an optimistic
assumption failed while executing a function with -ot/--optimistic-types.
* codegen
The code generator is the emitter stage of the code pipeline, and
turns the lowest tier of a FunctionNode into bytecode. Codegen logging
shows byte codes as they are being emitted, line number information
and jumps. It also shows the contents of the bytecode stack prior to
each instruction being emitted. This is a good debugging aid. For
example:
[codegen] #41 line:2 (f)_afc824e
[codegen] #42 load symbol x slot=2
[codegen] #43 {1:O} load int 0
[codegen] #44 {2:I O} dynamic_runtime_call GT:ZOI_I args=2 returnType=boolean
[codegen] #45 signature (Ljava/lang/Object;I)Z
[codegen] #46 {1:Z} ifeq ternary_false_5402fe28
[codegen] #47 load symbol x slot=2
[codegen] #48 {1:O} goto ternary_exit_107c1f2f
[codegen] #49 ternary_false_5402fe28
[codegen] #50 load symbol x slot=2
[codegen] #51 {1:O} convert object -> double
[codegen] #52 {1:D} neg
[codegen] #53 {1:D} convert double -> object
[codegen] #54 {1:O} ternary_exit_107c1f2f
[codegen] #55 {1:O} return object
shows a ternary node being generated for the sequence "return x > 0 ?
x : -x"
The first number on the log line is a unique monotonically increasing
emission id per bytecode. There is no guarantee this is the same id
between runs. depending on non deterministic code
execution/compilation, but for small applications it usually is. If
the system variable -Dnashorn.codegen.debug.trace=<x> is set, where x
is a bytecode emission id, a stack trace will be shown as the
particular bytecode is about to be emitted. This can be a quick way to
determine where it comes from without attaching the debugger. "Who
generated that neg?"
The --log=codegen option is equivalent to setting the system variable
"nashorn.codegen.debug" to true.
* fold
Shows constant folding taking place before lowering
* lower
This is the first lowering pass.
Lower is a code generation pass that turns high level IR nodes into
lower level one, for example substituting comparisons to RuntimeNodes
and inlining finally blocks.
Lower is also responsible for determining control flow information
like end points.
* symbols
The symbols logger tracks the assignment os symbols to identifiers.
* scopedepths
This logs the calculation of scope depths for non-local symbols.
* fields
The --log=fields option (at info level) is equivalent to setting the
system variable "nashorn.fields.debug" to true. At the info level it
will only show info about type assumptions that were invalidated. If
the level is set to finest, it will also trace every AccessorProperty
getter and setter in the program, show arguments, return values
etc. It will also show the internal representation of respective field
(Object in the normal case, unless running with the dual field
representation)
* time
This enables timers for various phases of script compilation. The timers
will be dumped when the Nashorn process exits. We see a percentage value
of how much time was spent not executing bytecode (i.e. compilation and
internal tasks) at the end of the report.
A finer level than "info" will show individual compilation timings as they
happen.
Here is an example:
[time] Accumulated complation phase Timings:
[time]
[time] 'JavaScript Parsing' 1076 ms
[time] 'Constant Folding' 159 ms
[time] 'Control Flow Lowering' 303 ms
[time] 'Program Point Calculation' 282 ms
[time] 'Builtin Replacement' 71 ms
[time] 'Code Splitting' 670 ms
[time] 'Symbol Assignment' 474 ms
[time] 'Scope Depth Computation' 249 ms
[time] 'Optimistic Type Assignment' 186 ms
[time] 'Local Variable Type Calculation' 526 ms
[time] 'Bytecode Generation' 5177 ms
[time] 'Class Installation' 1854 ms
[time]
[time] Total runtime: 11994 ms (Non-runtime: 11027 ms [91%])
* methodhandles
If this logger is enabled, each MethodHandle related call that uses
the java.lang.invoke package gets its MethodHandle intercepted and an
instrumentation printout of arguments and return value appended to
it. This shows exactly which method handles are executed and from
where. (Also MethodTypes and SwitchPoints).
* classcache
This logger shows information about reusing code classes using the
in-memory class cache. Nashorn will try to avoid compilation of
scripts by using existing classes. This can significantly improve
performance when repeatedly evaluating the same script.
=======================
3. Undocumented options
=======================
Here follows a short description of undocumented options for Nashorn.
To see a list of all undocumented options, use the (undocumented) flag
"-xhelp".
i.e. jjs -xhelp or java -jar nashorn.jar -xhelp
Undocumented options are not guaranteed to work, run correctly or be
bug free. They are experimental and for internal or debugging use.
They are also subject to change without notice.
In practice, though, all options below not explicitly documented as
EXPERIMENTAL can be relied upon, for example --dump-on-error is useful
for any JavaScript/Nashorn developer, but there is no guarantee.
A short summary follows:
-D (-Dname=value. Set a system property. This option can be repeated.)
-ccs, --class-cache-size (Size of the Class cache size per global scope.)
-cp, -classpath (-cp path. Specify where to find user class files.)
-co, --compile-only (Compile without running.)
param: [true|false] default: false
-d, --dump-debug-dir (specify a destination directory to dump class files.)
param: <path>
--debug-lines (Generate line number table in .class files.)
param: [true|false] default: true
--debug-locals (Generate local variable table in .class files.)
param: [true|false] default: false
-doe, -dump-on-error (Dump a stack trace on errors.)
param: [true|false] default: false
--early-lvalue-error (invalid lvalue expressions should be reported as early errors.)
param: [true|false] default: true
--empty-statements (Preserve empty statements in AST.)
param: [true|false] default: false
-fv, -fullversion (Print full version info of Nashorn.)
param: [true|false] default: false
--function-statement-error (Report an error when function declaration is used as a statement.)
param: [true|false] default: false
--function-statement-warning (Warn when function declaration is used as a statement.)
param: [true|false] default: false
-fx (Launch script as an fx application.)
param: [true|false] default: false
--global-per-engine (Use single Global instance per script engine instance.)
param: [true|false] default: false
-h, -help (Print help for command line flags.)
param: [true|false] default: false
--loader-per-compile (Create a new class loader per compile.)
param: [true|false] default: true
-l, --locale (Set Locale for script execution.)
param: <locale> default: en-US
--log (Enable logging of a given level for a given number of sub systems.
[for example: --log=fields:finest,codegen:info].)
param: <module:level>,*
-nj, --no-java (Disable Java support.)
param: [true|false] default: false
-nse, --no-syntax-extensions (Disallow non-standard syntax extensions.)
param: [true|false] default: false
-nta, --no-typed-arrays (Disable typed arrays support.)
param: [true|false] default: false
--parse-only (Parse without compiling.)
param: [true|false] default: false
--print-ast (Print abstract syntax tree.)
param: [true|false] default: false
-pc, --print-code (Print generated bytecode. If a directory is specified, nothing will
be dumped to stderr. Also, in that case, .dot files will be generated
for all functions or for the function with the specified name only.)
param: [dir:<output-dir>,function:<name>]
--print-lower-ast (Print lowered abstract syntax tree.)
param: [true|false] default: false
-plp, --print-lower-parse (Print the parse tree after lowering.)
param: [true|false] default: false
--print-no-newline (Print function will not print new line char.)
param: [true|false] default: false
-pp, --print-parse (Print the parse tree.)
param: [true|false] default: false
--print-symbols (Print the symbol table.)
param: [true|false] default: false
-pcs, --profile-callsites (Dump callsite profile data.)
param: [true|false] default: false
-scripting (Enable scripting features.)
param: [true|false] default: false
--stderr (Redirect stderr to a filename or to another tty, e.g. stdout.)
param: <output console>
--stdout (Redirect stdout to a filename or to another tty, e.g. stderr.)
param: <output console>
-strict (Run scripts in strict mode.)
param: [true|false] default: false
-t, -timezone (Set timezone for script execution.)
param: <timezone> default: Europe/Stockholm
-tcs, --trace-callsites (Enable callsite trace mode. Options are: miss [trace callsite misses]
enterexit [trace callsite enter/exit], objects [print object properties].)
param: [=[option,]*]
-urt, --unstable-relink-threshold (Number of times a dynamic call site has to be relinked before it
is considered unstable, when the runtime will try to link it as
if it is megamorphic.)
--verify-code (Verify byte code before running.)
param: [true|false] default: false
-v, -version (Print version info of Nashorn.)
param: [true|false] default: false
-xhelp (Print extended help for command line flags.)
param: [true|false] default: false

View File

@@ -1,988 +0,0 @@
<!--
Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 2 only, as
published by the Free Software Foundation. Oracle designates this
particular file as subject to the "Classpath" exception as provided
by Oracle in the LICENSE file that accompanied this code.
This code is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
version 2 for more details (a copy is included in the LICENSE file that
accompanied this code).
You should have received a copy of the GNU General Public License version
2 along with this work; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
or visit www.oracle.com if you need additional information or have any
questions.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html class=" regenabled gecko radius jsenabled regloaded" xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<title>Java Scripting Programmer's Guide</title>
<!-- ============ -->
<!-- MAIN CONTENT -->
<!-- ============ -->
<table summary="layout" border="0" width="100%">
<tbody><tr>
<td>
<div id="sharepage" class="smallpagetitle"><h1>Java Scripting Programmer's Guide</h1><div class="sharepage"> <div class="sharepagew1 share-mailto"> <table summary="" cellpadding="0" cellspacing="0"><tbody><tr> <td id="share-mailto"><a href="mailto:?subject=Java%20Documentation%20Page:%20Java%20Scripting%20Programmer%27s%20Guide&amp;body=Check%20out%20this%20page:%20%0A%0Ahttp%3A%2F%2Fdocs.oracle.com%2Fjavase%2F6%2Fdocs%2Ftechnotes%2Fguides%2Fscripting%2Fprogrammer_guide%2Findex.html" class="sharelink mailto" title="Email this page to a friend"></a></td> <td id="share-technorati"><a href="http://technorati.com/search/http%3A%2F%2Fdocs.oracle.com%2Fjavase%2F6%2Fdocs%2Ftechnotes%2Fguides%2Fscripting%2Fprogrammer_guide%2Findex.html" class="sharelink technorati" title="See who links to this page on Technorati"></a></td> <td id="share-delicious"><a href="http://del.icio.us/post?v=4;url=http%3A%2F%2Fdocs.oracle.com%2Fjavase%2F6%2Fdocs%2Ftechnotes%2Fguides%2Fscripting%2Fprogrammer_guide%2Findex.html;title=Java%20Scripting%20Programmer%27s%20Guide" class="sharelink delicious" title="Bookmark this page in del.icio.us"></a></td> <td id="share-digg"><a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fdocs.oracle.com%2Fjavase%2F6%2Fdocs%2Ftechnotes%2Fguides%2Fscripting%2Fprogrammer_guide%2Findex.html&amp;title=Java%20Scripting%20Programmer%27s%20Guide" class="sharelink digg" title="Submit this page to Digg"></a></td> <td id="share-slashdot"><a href="http://slashdot.org/bookmark.pl?title=Java%20Scripting%20Programmer%27s%20Guide&amp;url=http%3A%2F%2Fdocs.oracle.com%2Fjavase%2F6%2Fdocs%2Ftechnotes%2Fguides%2Fscripting%2Fprogrammer_guide%2Findex.html" class="sharelink slashdot" title="Submit this page to Slashdot"></a></td> <td id="share-blank"> </td></tr></tbody></table></div></div></div>
</td>
</tr>
</tbody></table>
<!-- Body text begins here -->
<ul>
<li><span><a href="#who">Who is the Java Scripting API
For?</a></span></li>
<li><span><a href="#package">Scripting Package</a></span></li>
<li><span><a href="#examples">Examples</a></span>
<ul>
<li><span><a href="#helloworld">"Hello, World"</a></span></li>
<li><span><a href="#evalfile">Evaluating a Script
File</a></span></li>
<li><span><a href="#scriptvars">Script Variables</a></span></li>
<li><span><a href="#invoke">Invoking Script Functions and
Methods</a></span></li>
<li><span><a href="#interfaces">Implementing Java Interfaces by
Scripts</a></span></li>
<li><span><a href="#scopes">Multiple Scopes for
Scripts</a></span></li>
</ul>
</li>
<li><span><a href="#jsengine">JavaScript Script
Engine</a></span></li>
<li><span><a href="#jstojava">JavaScript to Java
Communication</a></span>
<ul>
<li><span><a href="#jsjavaclass">Accessing Java
Classes</a></span></li>
<li><span><a href="#jsimport">Importing Java Packages,
Classes</a></span></li>
<li><span><a href="#jsarrays">Creating, Converting and Using Java
Arrays</a></span></li>
<li><span><a href="#jsimplement">Implementing Java
Interfaces</a></span></li>
<li><span><a href="#jsextendabstract">Extending Abstract Java Classes
</a></span></li>
<li><span><a href="#jsextendconcrete">Extending Concrete Java Classes
</a></span></li>
<li><span><a href="#jsimplementmultiple">Implementing Multiple Java Interfaces
</a></span></li>
<li><span><a href="#classBoundImplementations">Class-Bound Implementations
</a></span></li>
<li><span><a href="#jsoverload">Overload Resolution</a></span></li>
<li><span><a href="#dataTypeMapping">Mapping of Data Types Between Java
and JavaScript</a></span></li>
</ul>
</li>
<li><span><a href="#engineimpl">Implementing Your Own Script
Engine</a></span></li>
<li><span><a href="#refs">References</a></span></li>
</ul>
<span><a name="who" id="who"></a></span>
<h2><span>Who is the Java Scripting API For?</span></h2>
<span>Some useful characteristics of scripting languages
are:</span>
<ul>
<li><span><b>Convenience</b>: Most scripting languages are
dynamically typed. You can usually create new variables without
declaring the variable type, and you can reuse variables to store
objects of different types. Also, scripting languages tend to
perform many type conversions automatically, for example,
converting the number 10 to the text "10" as necessary.</span></li>
<li><span><b>Developing rapid prototypes</b>: You can avoid the
edit-compile-run cycle and just use edit-run!</span></li>
<li><span><b>Application extension/customization</b>: You can
"externalize" parts of your application - like configuration
scripts, business logic/rules and math expressions for financial
applications.</span></li>
<li><span><b>"Command line" shells for applications</b> -for
debugging, runtime/deploy time configuration etc. Most applications
have a web-based GUI configuaration tool these days. But
sysadmins/deployers frequently prefer command line tools. Instead
of inventing ad-hoc scripting language for that purpose, a
"standard" scripting language can be used.</span></li>
</ul>
<p><span>The Java<font size="-1"><sup>TM</sup></font> Scripting API
is a scripting language indepedent framework for using script
engines from Java code. With the Java Scripting API, it is possible
to write customizable/extendable applications in the Java language
and leave the customization scripting language choice to the end
user. The Java application developer need not choose the extension
language during development. If you write your application with
JSR-223 API, then your users can use any JSR-223 compliant
scripting language.</span></p>
<hr>
<span><a name="package" id="package"></a></span>
<h2><span>Scripting Package</span></h2>
<p><span>The Java Scripting functionality is in the <code><a href="http://docs.oracle.com/javase/9/docs/api/javax/script/package-summary.html">javax.script</a></code>
package. This is a relatively small, simple API. The starting point
of the scripting API is the <code>ScriptEngineManager</code> class.
A ScriptEngineManager object can discover script engines through
the jar file service discovery mechanism. It can also instantiate
ScriptEngine objects that interpret scripts written in a specific
scripting language. The simplest way to use the scripting API is as
follows:</span></p>
<ol>
<li><span>Create a <code>ScriptEngineManager</code>
object.</span></li>
<li><span>Get a <code>ScriptEngine</code> object from the
manager.</span></li>
<li><span>Evaluate script using the <code>ScriptEngine</code>'s
<code>eval</code> methods.</span></li>
</ol>
<p><span>Now, it is time to look at some sample code. While it is
not mandatory, it may be useful to know a bit of JavaScript to read
these examples.</span></p>
<hr>
<span><a name="examples" id="examples"></a></span>
<h2><span>Examples</span></h2>
<span><a name="helloworld" id="helloworld"></a></span>
<h3><span>"Hello, World"</span></h3>
<p><span>From the <code>ScriptEngineManager</code> instance, we
request a JavaScript engine instance using
<code>getEngineByName</code> method. On the script engine, the
<code>eval</code> method is called to execute a given String as
JavaScript code! For brevity, in this as well as in subsequent
examples, we have not shown exception handling. There are checked
and runtime exceptions thrown from <code>javax.script</code> API.
Needless to say, you have to handle the exceptions
appropriately.</span></p>
<pre>
<span><code>
// <a href="source/EvalScript.java">EvalScript.java</a>
import javax.script.*;
public class EvalScript {
public static void main(String[] args) throws Exception {
// create a script engine manager
<span class="classref">ScriptEngineManager</span> factory = new ScriptEngineManager();
// create a JavaScript engine
<span class="classref">ScriptEngine</span> engine = factory.<span class="methodref">getEngineByName</span>("nashorn");
// evaluate JavaScript code from String
engine.<span class="methodref">eval</span>("print('Hello, World')");
}
}
</code></span>
</pre>
<hr>
<a name="evalfile" id="evalfile"></a>
<h3>Evaluating a Script File</h3>
<p>In this example, we call the <code>eval</code> method that
accepts <code>java.io.Reader</code> for the input source. The
script read by the given reader is executed. This way it is
possible to execute scripts from files, URLs and resources by
wrapping the relevant input stream objects as readers.</p>
<pre>
<code>
// <a href="source/EvalFile.java">EvalFile.java</a>
import javax.script.*;
public class EvalFile {
public static void main(String[] args) throws Exception {
// create a script engine manager
<span class="classref">ScriptEngineManager</span> factory = new ScriptEngineManager();
// create JavaScript engine
<span class="classref">ScriptEngine</span> engine = factory.<span class="methodref">getEngineByName</span>("nashorn");
// evaluate JavaScript code from given file - specified by first argument
engine.<span class="methodref">eval</span>(new java.io.FileReader(args[0]));
}
}
</code>
</pre>
Let us assume that we have the file named <a href="source/test.js">test.js</a> with the
following text:
<pre><code>
print("This is hello from test.js");
</code>
</pre>
We can run the above Java as
<pre><code>
java EvalFile test.js
</code>
</pre>
<hr>
<a name="scriptvars" id="scriptvars"></a>
<h3>Script Variables</h3>
<p>When you embed script engines and scripts with your Java
application, you may want to expose your application objects as
global variables to scripts. This example demonstrates how you can
expose your application objects as global variables to a script. We
create a <code>java.io.File</code> in the application and expose
the same as a global variable with the name "file". The script can
access the variable - for example, it can call public methods on
it. Note that the syntax to access Java objects, methods and fields
is dependent on the scripting language. JavaScript supports the
most "natural" Java-like syntax.</p>
<p>
Nashorn script engine pre-defines two global variables named "context"
and "engine". The "context" variable is of type javax.script.ScriptContext
and refers to the current ScriptContext instance passed to script engine's
eval method. The "engine" variable is of type javax.script.ScriptEngine and
refers to the current nashorn script engine instance evaluating the script.
Both of these variables are non-writable, non-enumerable and non-configurable
- which implies script code can not write overwrite the value, for..loop iteration
on global object will not iterate these variables and these variables can not be
deleted by script.
<pre><code>
// <a href="source/ScriptVars.java">ScriptVars.java</a>
import javax.script.*;
import java.io.*;
public class ScriptVars {
public static void main(String[] args) throws Exception {
ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine engine = manager.getEngineByName("nashorn");
File f = new File("test.txt");
// expose File object as variable to script
engine.<span class="methodref">put</span>("file", f);
// evaluate a script string. The script accesses "file"
// variable and calls method on it
engine.eval("print(file.getAbsolutePath())");
}
}
</code>
</pre>
<hr>
<a name="invoke" id="invoke"></a>
<h3>Invoking Script Functions and Methods</h3>
<p>Sometimes you may want to call a specific scripting function
repeatedly - for example, your application menu functionality might
be implemented by a script. In your menu's action event handler you
may want to call a specific script function. The following example
demonstrates invoking a specific script function from Java
code.</p>
<pre><code>
// <a href="source/InvokeScriptFunction.java">InvokeScriptFunction.java</a>
import javax.script.*;
public class InvokeScriptFunction {
public static void main(String[] args) throws Exception {
ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine engine = manager.getEngineByName("nashorn");
// JavaScript code in a String
String script = "function hello(name) { print('Hello, ' + name); }";
// evaluate script
engine.eval(script);
// <code>javax.script.Invocable</code> is an optional interface.
// Check whether your script engine implements it or not!
// Note that the JavaScript engine implements Invocable interface.
<span class="classref">Invocable</span> inv = (Invocable) engine;
// invoke the global function named "hello"
inv.<span class="methodref">invokeFunction</span>("hello", "Scripting!!" );
}
}
</code>
</pre>
<p>If your scripting language is object based (like JavaScript) or
object-oriented, then you can invoke a script method on a script
object.</p>
<pre><code>
// <a href="source/InvokeScriptMethod.java">InvokeScriptMethod.java</a>
import javax.script.*;
public class InvokeScriptMethod {
public static void main(String[] args) throws Exception {
ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine engine = manager.getEngineByName("nashorn");
// JavaScript code in a String. This code defines a script object 'obj'
// with one method called 'hello'.
String script = "var obj = new Object(); obj.hello = function(name) { print('Hello, ' + name); }";
// evaluate script
engine.eval(script);
// <code>javax.script.Invocable</code> is an optional interface.
// Check whether your script engine implements or not!
// Note that the JavaScript engine implements Invocable interface.
<span class="classref">Invocable</span> inv = (Invocable) engine;
// get script object on which we want to call the method
Object obj = engine.<span class="methodref">get</span>("obj");
// invoke the method named "hello" on the script object "obj"
inv.<span class="methodref">invokeMethod</span>(obj, "hello", "Script Method !!" );
}
}
</code>
</pre>
<hr>
<a name="interfaces" id="interfaces"></a>
<h3>Implementing Java Interfaces by Scripts</h3>
<p>Instead of calling specific script functions from Java,
sometimes it is convenient to implement a Java interface by script
functions or methods. Also, by using interfaces we can avoid having
to use the <code>javax.script</code> API in many places. We can get
an interface implementor object and pass it to various Java APIs.
The following example demonstrates implementing the
<code>java.lang.Runnable</code> interface with a script.</p>
<pre><code>
// <a href="source/RunnableImpl.java">RunnableImpl.java</a>
import javax.script.*;
public class RunnableImpl {
public static void main(String[] args) throws Exception {
ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine engine = manager.getEngineByName("nashorn");
// JavaScript code in a String
String script = "function run() { print('run called'); }";
// evaluate script
engine.eval(script);
<span class="classref">Invocable</span> inv = (Invocable) engine;
// get Runnable interface object from engine. This interface methods
// are implemented by script functions with the matching name.
Runnable r = inv.<span class="methodref">getInterface</span>(Runnable.class);
// start a new thread that runs the script implemented
// runnable interface
Thread th = new Thread(r);
th.start();
th.join();
}
}
</code>
</pre>
<p>If your scripting language is object-based or object-oriented,
it is possible to implement a Java interface by script methods on
script objects. This avoids having to call script global functions
for interface methods. The script object can store the "state"
associated with the interface implementor.</p>
<pre><code>
// <a href="source/RunnableImplObject.java">RunnableImplObject.java</a>
import javax.script.*;
public class RunnableImplObject {
public static void main(String[] args) throws Exception {
ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine engine = manager.getEngineByName("nashorn");
// JavaScript code in a String
String script = "var obj = new Object(); obj.run = function() { print('run method called'); }";
// evaluate script
engine.eval(script);
// get script object on which we want to implement the interface with
Object obj = engine.<span class="methodref">get</span>("obj");
<span class="classref">Invocable</span> inv = (Invocable) engine;
// get Runnable interface object from engine. This interface methods
// are implemented by script methods of object 'obj'
Runnable r = inv.<span class="methodref">getInterface</span>(obj, Runnable.class);
// start a new thread that runs the script implemented
// runnable interface
Thread th = new Thread(r);
th.start();
th.join();
}
}
</code>
</pre>
<hr>
<a name="scopes" id="scopes"></a>
<h3>Multiple Scopes for Scripts</h3>
<p>In the <a href="#scriptvars">script variables</a> example, we
saw how to expose application objects as script global variables.
It is possible to expose multiple global "scopes" for scripts. A
single scope is an instance of <code>javax.script.Bindings</code>.
This interface is derived from <code>java.util.Map&lt;String,
Object&gt;</code>. A scope a set of name-value pairs where name is
any non-empty, non-null String.
<code>javax.script.ScriptContext</code> interface supports multiple
scopes with associated Bindings for each
scope. By default, every script engine has a default script
context. The default script context has atleast one scope called
"ENGINE_SCOPE". Various scopes supported by a script context are
available through <code>getScopes</code> method.</p>
<pre><code>
// <a href="source/MultiScopes.java">MultiScopes.java</a>
import javax.script.*;
public class MultiScopes {
public static void main(String[] args) throws Exception {
ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine engine = manager.getEngineByName("nashorn");
engine.put("x", "hello");
// print global variable "x"
engine.eval("print(x);");
// the above line prints "hello"
// Now, pass a different script context
<span class="classref">ScriptContext</span> newContext = new <span class="classref">SimpleScriptContext</span>();
newContext.setBindings(engine.createBindings(), ScriptContext.ENGINE_SCOPE);
<span class="classref">Bindings</span> engineScope = newContext.<span class="methodref">getBindings</span>(ScriptContext.ENGINE_SCOPE);
// add new variable "x" to the new engineScope
engineScope.<span class="methodref">put</span>("x", "world");
// execute the same script - but this time pass a different script context
engine.eval("print(x);", newContext);
// the above line prints "world"
}
}
</code>
</pre>
<hr>
<a name="jsengine" id="jsengine"></a>
<h2>JavaScript Script Engine</h2>
<p>Oracle's implementation of JDK 8 is co-bundled with the Nashorn ECMAScript
script engine.
<hr>
<a name="jstojava" id="jstojava"></a>
<h2>JavaScript to Java Communication</h2>
<p>For the most part, accessing Java classes, objects and methods
is straightforward. In particular field and method access from
JavaScript is the same as it is from Java. We highlight important
aspects of JavaScript Java access here.
The following examples are JavaScript snippets accessing Java. This
section requires knowledge of JavaScript. This section can be
skipped if you are planning to use some other JSR-223 scripting
language rather than JavaScript.</p>
<hr>
<a name="jsjavaclass" id=jsjavalass"></a>
<h3>Accessing Java Classes</h3>
<pre>
<code>
// <a href="source/javatypes.js">javatypes.js</a>
var arrayListType = Java.type("java.util.ArrayList")
var intType = Java.type("int")
var stringArrayType = Java.type("java.lang.String[]")
var int2DArrayType = Java.type("int[][]")
</code>
</pre>
Note that the name of the type is always a string for a fully qualified name. You can use any of these expressions to create new instances, e.g.:
<pre><code>
var anArrayList = new (Java.type("java.util.ArrayList"))
</code></pre>
or
<pre><code>
var ArrayList = Java.type("java.util.ArrayList")
var anArrayList = new ArrayList
var anArrayListWithSize = new ArrayList(16)
</code></pre>
In the special case of inner classes, you can either use the JVM fully qualified name, meaning using the dollar sign in the class name, or you can use the dot:
<pre><code>
var ftype = Java.type("java.awt.geom.Arc2D$Float")
</code></pre>
and
<pre><code>
var ftype = Java.type("java.awt.geom.Arc2D.Float")
</code></pre>
both work. Note however that using the dollar sign is faster, as Java.type first tries to resolve the class name as it is originally specified, and the internal JVM names for inner classes use the dollar sign. If you use the dot, Java.type will internally get a ClassNotFoundException and subsequently retry by changing the last dot to dollar sign. As a matter of fact, it'll keep replacing dots with dollar signs until it either successfully loads the class or runs out of all dots in the name. This way it can correctly resolve and load even multiply nested inner classes with the dot notation. Again, this will be slower than using the dollar signs in the name. An alternative way to access the inner class is as a property of the outer class:
<pre><code>
var arctype = Java.type("java.awt.geom.Arc2D")
var ftype = arctype.Float
</code></pre>
<p>
You can access both static and non-static inner classes. If you want to create an instance of a non-static inner class, remember to pass an instance of its outer class as the first argument to the constructor.
</p>
<p>
In addition to creating new instances, the type objects returned from <code>Java.type</code> calls can also be used to access the
static fields and methods of the classes:
<pre><code>
var File = Java.type("java.io.File")
File.createTempFile("nashorn", ".tmp")
</code></pre>
<p>
Methods with names of the form <code>isXxx()</code>, <code>getXxx()</code>, and <code>setXxx()</code> can also be used as properties, for both instances and statics.
</p>
<p>
A type object returned from <code>Java.type</code> is distinct from a <code>java.lang.Class</code> object. You can obtain one from the other using properties <code>class</code> and <code>static</code> on them.
<pre><code>
var ArrayList = Java.type("java.util.ArrayList")
var a = new ArrayList
// All of the following print true:
print("Type acts as target of instanceof: " + (a instanceof ArrayList))
print("Class doesn't act as target of instanceof: " + !(a instanceof a.getClass()))
print("Type is not same as instance's getClass(): " + (a.getClass() !== ArrayList))
print("Type's `class` property is same as instance getClass(): " + (a.getClass() === ArrayList.class))
print("Type is same as instance getClass()'s `static` property: " + (a.getClass().static === ArrayList))
</code></pre>
<p>
You can think of the type object as similar to the class names as used in Java source code: you use them as the
arguments to the <code>new</code> and <code>instanceof</code> operators and as the namespace for the static fields
and methods, but they are different than the runtime <code>Class</code> objects returned by <code>getClass()</code> calls.
Syntactically and semantically, this separation produces code that is most similar to Java code, where a distinction
between compile-time class expressions and runtime class objects also exists. (Also, Java can't have the equivalent of <code>static</code>
property on a <code>Class</code> object since compile-time class expressions are never reified as objects).
</p>
<hr>
<a name="jsimport" id="jsimport"></a>
<h3>Importing Java Packages, Classes</h3>
<p>The built-in functions <code>importPackage</code> (in compatibility script) and
<code>importClass</code> can be used to import Java packages and
classes.</p>
<pre><code>
// <a href="source/importpackageclass.js">importpackageclass.js</a>
// load compatibility script
load("nashorn:mozilla_compat.js");
// Import Java packages and classes
// like import package.*; in Java
<span class="functionref">importPackage</span>(java.awt);
// like import java.awt.Frame in Java
<span class="functionref">importClass</span>(java.awt.Frame);
// Create Java Objects by "new ClassName"
var frame = new java.awt.Frame("hello");
// Call Java public methods from script
frame.setVisible(true);
// Access "JavaBean" properties like "fields"
print(frame.title);
</code>
</pre>
<p>The <span class="objectref">Packages</span> global variable can
be used to access Java packages. Examples:
<code>Packages.java.util.Vector</code>,
<code>Packages.javax.swing.JFrame</code>. Please note that "java"
is a shortcut for "Packages.java". There are equivalent shortcuts
for javax, org, edu, com, net prefixes, so pratically all JDK
platform classes can be accessed without the "Packages" prefix.</p>
<p>Note that java.lang is not imported by default (unlike Java)
because that would result in conflicts with JavaScript's built-in
Object, Boolean, Math and so on.</p>
<p><code>importPackage</code> and <code>importClass</code>
functions "pollute" the global variable scope of JavaScript. To
avoid that, you may use <span class="functionref">JavaImporter</span>.</p>
<pre><code>
// <a href="source/javaimporter.js">javaimporter.js</a>
// create JavaImporter with specific packages and classes to import
var SwingGui = new <span class="functionref">JavaImporter</span>(javax.swing,
javax.swing.event,
javax.swing.border,
java.awt.event);
with (SwingGui) {
// within this 'with' statement, we can access Swing and AWT
// classes by unqualified (simple) names.
var mybutton = new JButton("test");
var myframe = new JFrame("test");
}
</code>
</pre>
<hr>
<a name="jsarrays" id="jsarrays"></a>
<h3>Creating, Converting and Using Java Arrays</h3>
<p>
Array element access or length access is the same as in Java.</p>
<pre><code>
// <a href="source/javaarray.js">javaarray.js</a>
// create Java String array of 5 elements
var StringArray = Java.type("java.lang.String[]");
var a = new StringArray(5);
// Accessing elements and length access is by usual Java syntax
a[0] = "scripting is great!";
print(a.length);
print(a[0]);
</code>
</pre>
<p>
It is also possible to convert between JavaScript and Java arrays.
Given a JavaScript array and a Java type, <code>Java.to</code> returns a Java array with the same initial contents, and with the specified array type.
</p>
<pre><code>
var anArray = [1, "13", false]
var javaIntArray = Java.to(anArray, "int[]")
print(javaIntArray[0]) // prints 1
print(javaIntArray[1]) // prints 13, as string "13" was converted to number 13 as per ECMAScript ToNumber conversion
print(javaIntArray[2]) // prints 0, as boolean false was converted to number 0 as per ECMAScript ToNumber conversion
</code></pre>
<p>
You can use either a string or a type object returned from <code>Java.type()</code> to specify the type of the array.
You can also omit the array type, in which case a <code>Object[]</code> will be created.
</p>
<p>
Given a Java array or Collection, <code>Java.from</code> returns a JavaScript array with a shallow copy of its contents. Note that in most cases, you can use Java arrays and lists natively in Nashorn; in cases where for some reason you need to have an actual JavaScript native array (e.g. to work with the array comprehensions functions), you will want to use this method.
</p>
<pre><code>
var File = Java.type("java.io.File");
var listCurDir = new File(".").listFiles();
var jsList = Java.from(listCurDir);
print(jsList);
</code></pre>
<hr>
<a name="jsimplement" id="jsimplement"></a>
<h3>Implementing Java interfaces</h3>
<p>A Java interface can be implemented in JavaScript by using a
Java anonymous class-like syntax:</p>
<pre><code>
// <a href="source/runnable.js">runnable.js</a>
var r = new java.lang.Runnable() {
run: function() {
print("running...\n");
}
};
// "r" can be passed to Java methods that expect java.lang.Runnable
var th = new java.lang.Thread(r);
th.start();
th.join();
</code>
</pre>
<p>When an interface with a single method is expected, you can pass
a script function directly.(auto conversion)</p>
<pre><code>
// <a href="source/samfunc.js">samfunc.js</a>
function func() {
print("I am func!");
}
// pass script function for java.lang.Runnable argument
var th = new java.lang.Thread(func);
th.start();
th.join();
</code>
</pre>
<hr>
<a name="jsextendabstract" id="jsextendabstract"></a>
<h3>Extending Abstract Java Classes</h3>
<p>
If a Java class is abstract, you can instantiate an anonymous subclass of it using an argument list that is applicable to any of its public or protected constructors, but inserting a JavaScript object with functions properties that provide JavaScript implementations of the abstract methods. If method names are overloaded, the JavaScript function will provide implementation for all overloads. E.g.:
</p>
<pre><code>
var TimerTask = Java.type("java.util.TimerTask")
var task = new TimerTask({ run: function() { print("Hello World!") } })
</code></pre>
Nashorn supports a syntactic extension where a "new" expression followed by an argument is identical to invoking the constructor and passing the argument to it, so you can write the above example also as:
<pre><code>
var task = new TimerTask {
run: function() {
print("Hello World!")
}
}
</code></pre>
which is very similar to Java anonymous inner class definition. On the other hand, if the type is an abstract type with a single abstract method (commonly referred to as a "SAM type") or all abstract methods it has share the same overloaded name), then instead of an object, you can just pass a function, so the above example can become even more simplified to:
<pre><code>
var task = new TimerTask(function() { print("Hello World!") })
</code></pre>
<p>
Note that in every one of these cases if you are trying to instantiate an abstract class that has constructors that take some arguments, you can invoke those simply by specifying the arguments after the initial implementation object or function.
</p>
<p>
The use of functions can be taken even further; if you are invoking a Java method that takes a SAM type, you can just pass in a function object, and Nashorn will know what you meant:
</p>
<code><pre>
Java.type("java.util.Timer")
timer.schedule(function() { print("Hello World!") })
</code></pre>
Here, <code>Timer.schedule()</code> expects a <code>TimerTask</code> as its argument, so Nashorn creates an instance of a TimerTask subclass and uses the passed function to implement its only abstract method, run(). In this usage though, you can't use non-default constructors; the type must be either an interface, or must have a protected or public no-arg constructor.
<hr>
<a name="jsextendconcrete" id="jsextendconcrete"></a>
<h3>Extending Concrete Java Classes</h3>
<p>
To extend a concrete Java class, you have to use <code>Java.extend</code> function.
<code>Java.extend</code> returns a type object for a subclass of the specified Java class (or implementation of the specified interface) that acts as a script-to-Java adapter for it.
</p>
<pre><code>
// <a href="source/javaextend.js">javaextend.js</a>
var ArrayList = Java.type("java.util.ArrayList")
var ArrayListExtender = Java.extend(ArrayList)
var printSizeInvokedArrayList = new ArrayListExtender() {
size: function() { print("size invoked!"); }
}
var printAddInvokedArrayList = new ArrayListExtender() {
add: function(x, y) {
if(typeof(y) === "undefined") {
print("add(e) invoked!");
} else {
print("add(i, e) invoked!");
}
}
};
printSizeInvokedArrayList.size();
printAddInvokedArrayList.add(33, 33);
</code></pre>
<p>
The reason you must use <code>Java.extend()</code> with concrete classes is that with concrete classes, there can be a
syntactic ambiguity if you just invoke their constructor. Consider this example:
</p>
<pre><code>
var t = new java.lang.Thread({ run: function() { print("Hello!") } })
</code></pre>
<p>
If we allowed subclassing of concrete classes with constructor syntax, Nashorn couldn't tell if you're creating a new
<code>Thread</code> and passing it a <code>Runnable</code> at this point, or you are subclassing <code>Thread</code> and
passing it a new implementation for its own <code>run()</code> method.
</p>
<hr>
<a name="jsimplementmultiple" id="jsimplementmultiple"></a>
<h3>Implementing Multiple Interfaces</h3>
<p>
<code>Java.extend</code> can in fact take a list of multiple types. At most one of the types can be a class, and the rest must
be interfaces (the class doesn't have to be the first in the list). You will get back an object that extends the class and
implements all the interfaces. (Obviously, if you only specify interfaces and no class, the object will extend <code>java.lang.Object</code>).
<hr>
<a name="classBoundImplementations" id="classBoundImplementations"></a>
<h3>Class-Bound Implementations</h3>
<p>
The methods shown so far for extending Java classes and implementing interfaces &ndash; passing an implementation JavaScript object
or function to a constructor, or using <code>Java.extend</code> with <code>new</code> &ndash; all produce classes that take an
extra JavaScript object parameter in their constructors that specifies the implementation. The implementation is therefore always bound
to the actual instance being created with <code>new</code>, and not to the whole class. This has some advantages, for example in the
memory footprint of the runtime, as Nashorn can just create a single "universal adapter" for every combination of types being implemented.
In reality, the below code shows that different instantiations of, say, <code>Runnable</code> have the same class regardless of them having
different JavaScript implementation objects:
</p>
<pre><code>
var Runnable = java.lang.Runnable;
var r1 = new Runnable(function() { print("I'm runnable 1!") })
var r2 = new Runnable(function() { print("I'm runnable 2!") })
r1.run()
r2.run()
print("We share the same class: " + (r1.class === r2.class))
</code></pre>
<p>
prints:
</p>
<pre><code>
I'm runnable 1!
I'm runnable 2!
We share the same class: true
</code></pre>
<p>
Sometimes, however, you'll want to extend a Java class or implement an interface with implementation bound to the class, not to
its instances. Such a need arises, for example, when you need to pass the class for instantiation to an external API; prime example
of this is the JavaFX framework where you need to pass an Application class to the FX API and let it instantiate it.
</p>
<p>
Fortunately, there's a solution for that: <code>Java.extend()</code> &ndash; aside from being able to take any number of type parameters
denoting a class to extend and interfaces to implement &ndash; can also take one last argument that has to be a JavaScript object
that serves as the implementation for the methods. In this case, <code>Java.extend()</code> will create a class that has the same
constructors as the original class had, as they don't need to take an an extra implementation object parameter. The example below
shows how you can create class-bound implementations, and shows that in this case, the implementation classes for different invocations
are indeed different:
</p>
<pre><code>
var RunnableImpl1 = Java.extend(java.lang.Runnable, function() { print("I'm runnable 1!") })
var RunnableImpl2 = Java.extend(java.lang.Runnable, function() { print("I'm runnable 2!") })
var r1 = new RunnableImpl1()
var r2 = new RunnableImpl2()
r1.run()
r2.run()
print("We share the same class: " + (r1.class === r2.class))
</code></pre>
<p>
prints:
</p>
<pre><code>
I'm runnable 1!
I'm runnable 2!
We share the same class: false
</code></pre>
<p>
As you can see, the major difference here is that we moved the implementation object into the invocation of <code>Java.extend</code>
from the constructor invocations &ndash; indeed the constructor invocations now don't even need to take an extra parameter! Since
the implementations are bound to a class, the two classes obviously can't be the same, and we indeed see that the two runnables no
longer share the same class &ndash; every invocation of <code>Java.extend()</code> with a class-specific implementation object triggers
the creation of a new Java adapter class.
</p>
<p>
Finally, the adapter classes with class-bound implementations can <i>still</i> take an additional constructor parameter to further
override the behavior on a per-instance basis. Thus, you can even combine the two approaches: you can provide part of the implementation
in a class-based JavaScript implementation object passed to <code>Java.extend</code>, and part in another object passed to the constructor.
Whatever functions are provided by the constructor-passed object will override the functions in the class-bound object.
</p>
<pre><code>
var RunnableImpl = Java.extend(java.lang.Runnable, function() { print("I'm runnable 1!") })
var r1 = new RunnableImpl()
var r2 = new RunnableImpl(function() { print("I'm runnable 2!") })
r1.run()
r2.run()
print("We share the same class: " + (r1.class === r2.class))
</code></pre>
<p>
prints:
</p>
<pre><code>
I'm runnable 1!
I'm runnable 2!
We share the same class: true
</code></pre>
<hr>
<a name="jsoverload" id="jsoverload"></a>
<h3>Overload Resolution</h3>
<p>Java methods can be overloaded by argument types. In Java,
overload resolution occurs at compile time (performed by javac).
When calling Java methods from Nashorn, the appropriate method will be
selected based on the argument types at invocation time. You do not need
to do anything special &ndash; the correct Java method overload variant
is selected based automatically. You still have the option of explicitly
specifying a particular overload variant. Reasons for this include
either running into a genuine ambiguity with actual argument types, or
rarely reasons of performance &ndash; if you specify the actual overload
then the engine doesn't have to perform resolution during invocation.
Individual overloads of a Java methods are exposed as special properties
with the name of the method followed with its signature in parentheses.
You can invoke them like this:</p>
<pre><code>
// <a href="source/overload.js">overload.js</a>
var out = java.lang.System.out;
// select a particular print function
out["println(Object)"]("hello");
</code>
</pre>
<p>
Note that you normally don't even have to use qualified class names in
the signatures as long as the unqualified name of the type is sufficient
for uniquely identifying the signature. In practice this means that only
in the extremely unlikely case that two overloads only differ in
parameter types that have identical unqualified names but come from
different packages would you need to use the fully qualified name of the
class.
</p>
<hr>
<a name="dataTypeMapping" id="dataTypeMapping"></a>
<h3>Mapping of Data Types Between Java and JavaScript</h3>
<p>
We have previously shown some of the data type mappings between Java and JavaScript.
We saw that arrays need to be explicitly converted. We have also shown that JavaScript functions
are automatically converted to SAM types when passed as parameters to Java methods. Most other
conversions work as you would expect.
</p>
<p>
Every JavaScript object is also a <code>java.util.Map</code> so APIs receiving maps will receive them directly.
</p>
<p>
When numbers are passed to a Java API, they will be converted to the expected target numeric type, either boxed or
primitive, but if the target type is less specific, say <code>Number</code> or <code>Object</code>, you can only
count on them being a <code>Number</code>, and have to test specifically for whether it's a boxed <code>Double</code>,
<code>Integer</code>, <code>Long</code>, etc. &ndash; it can be any of these due to internal optimizations. Also, you
can pass any JavaScript value to a Java API expecting either a boxed or primitive number; the JavaScript specification's
<code>ToNumber</code> conversion algorithm will be applied to the value.
</p>
<p>
In a similar vein, if a Java method expects a <code>String</code> or a <code>Boolean</code>, the values will be
converted using all conversions allowed by the JavaScript specification's <code>ToString</code> and <code>ToBoolean</code>
conversions.
</p>
<p>
Finally, a word of caution about strings. Due to internal performance optimizations of string operations, JavaScript strings are
not always necessarily of type <code>java.lang.String</code>, but they will always be of type <code>java.lang.CharSequence</code>.
If you pass them to a Java method that expects a <code>java.lang.String</code> parameter, then you will naturally receive a Java
String, but if the signature of your method is more generic, i.e. it receives a <code>java.lang.Object</code> parameter, you can
end up with an object of private engine implementation class that implements <code>CharSequence</code> but is not a Java String.
</p>
<hr>
<a name="engineimpl" id="engineimpl"></a>
<h2>Implementing Your Own Script Engine</h2>
<p>We will not cover implementation of JSR-223 compliant script
engines in detail. Minimally, you need to implement the
<code>javax.script.ScriptEngine</code> and
<code>javax.script.ScriptEngineFactory</code> interfaces. The
abstract class <code>javax.script.AbstractScriptEngine</code>
provides useful defaults for a few methods of the
<code>ScriptEngine</code> interface.</p>
<p>Before starting to implement a JSR-223 engine, you may want to
check <a href="http://java.net/projects/Scripting">http://java.net/projects/Scripting</a>
project. This project maintains JSR-223 implementations for many
popular open source scripting languages.</p>
<hr>
<a name="refs" id="refs"></a>
<h2>References</h2>
<ul>
<li><a href="http://jcp.org/en/jsr/detail?id=223">JSR-223 Scripting
for the Java Platform</a></li>
<li><a href="http://java.net/projects/Scripting">http://java.net/projects/Scripting
</a></li>
</ul>
<div class="hr"><hr></div>
<table summary="layout" border="0" width="100%">
<tbody><tr valign="TOP">
<td width="30%"> <img src="Java%20Scripting%20Programmer%27s%20Guide_files/logo_oracle_footer.gif" alt="Oracle and/or its affiliates" border="0" height="29" width="100"><br>
<font size="+1"> <i>Java Technology</i></font> </td>
<td width="30%">
<p><font size="-2">
<a href="http://docs.oracle.com/javase/6/docs/legal/cpyr.html">Copyright <20></a> 2013, Oracle and/or its affiliates. All rights reserved.
</font></p>
</td>
<td width="30%">
<p align="right"><font size="-2"><a href="http://download.oracle.com/javase/feedback.html">Contact Us</a></font></p><font size="-2">
</font></td>
</tr>
</tbody></table>
<div class="hr"><hr></div>
</div>
<!-- Start SiteCatalyst code -->
<script language="JavaScript" src="Java%20Scripting%20Programmer%27s%20Guide_files/s_code_download.js"></script>
<script language="JavaScript" src="Java%20Scripting%20Programmer%27s%20Guide_files/s_code.js"></script>
<!-- ********** DO NOT ALTER ANYTHING BELOW THIS LINE ! *********** -->
<!-- Below code will send the info to Omniture server -->
<script language="javascript">var s_code=s.t();if(s_code)document.write(s_code)</script>
<!-- End SiteCatalyst code -->
</body></html>

View File

@@ -1,46 +0,0 @@
/*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Oracle nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
@SuppressWarnings("javadoc")
public class EvalFile {
public static void main(final String[] args) throws Exception {
// create a script engine manager
final ScriptEngineManager factory = new ScriptEngineManager();
// create JavaScript engine
final ScriptEngine engine = factory.getEngineByName("nashorn");
// evaluate JavaScript code from given file - specified by first argument
engine.eval(new java.io.FileReader(args[0]));
}
}

View File

@@ -1,46 +0,0 @@
/*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Oracle nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
@SuppressWarnings("javadoc")
public class EvalScript {
public static void main(final String[] args) throws Exception {
// create a script engine manager
final ScriptEngineManager factory = new ScriptEngineManager();
// create a JavaScript engine
final ScriptEngine engine = factory.getEngineByName("nashorn");
// evaluate JavaScript code from String
engine.eval("print('Hello, World')");
}
}

View File

@@ -1,58 +0,0 @@
/*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Oracle nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import javax.script.Invocable;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
@SuppressWarnings("javadoc")
public class InvokeScriptFunction {
public static void main(final String[] args) throws Exception {
final ScriptEngineManager manager = new ScriptEngineManager();
final ScriptEngine engine = manager.getEngineByName("nashorn");
// JavaScript code in a String
final String script = "function hello(name) { print('Hello, ' + name); }";
// evaluate script
engine.eval(script);
// javax.script.Invocable is an optional interface.
// Check whether your script engine implements or not!
// Note that the JavaScript engine implements Invocable interface.
final Invocable inv = (Invocable) engine;
// invoke the global function named "hello"
inv.invokeFunction("hello", "Scripting!!" );
}
}

View File

@@ -1,59 +0,0 @@
/*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Oracle nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import javax.script.Invocable;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
@SuppressWarnings("javadoc")
public class InvokeScriptMethod {
public static void main(final String[] args) throws Exception {
final ScriptEngineManager manager = new ScriptEngineManager();
final ScriptEngine engine = manager.getEngineByName("nashorn");
// JavaScript code in a String. This code defines a script object 'obj'
// with one method called 'hello'.
final String script = "var obj = new Object(); obj.hello = function(name) { print('Hello, ' + name); }";
// evaluate script
engine.eval(script);
// javax.script.Invocable is an optional interface.
// Check whether your script engine implements or not!
// Note that the JavaScript engine implements Invocable interface.
final Invocable inv = (Invocable) engine;
// get script object on which we want to call the method
final Object obj = engine.get("obj");
// invoke the method named "hello" on the script object "obj"
inv.invokeMethod(obj, "hello", "Script Method !!" );
}
}

View File

@@ -1,63 +0,0 @@
/*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Oracle nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import javax.script.Bindings;
import javax.script.ScriptContext;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.SimpleScriptContext;
@SuppressWarnings("javadoc")
public class MultiScopes {
public static void main(final String[] args) throws Exception {
final ScriptEngineManager manager = new ScriptEngineManager();
final ScriptEngine engine = manager.getEngineByName("nashorn");
engine.put("x", "hello");
// print global variable "x"
engine.eval("print(x);");
// the above line prints "hello"
// Now, pass a different script context
final ScriptContext newContext = new SimpleScriptContext();
newContext.setBindings(engine.createBindings(), ScriptContext.ENGINE_SCOPE);
final Bindings engineScope = newContext.getBindings(ScriptContext.ENGINE_SCOPE);
// add new variable "x" to the new engineScope
engineScope.put("x", "world");
// execute the same script - but this time pass a different script context
engine.eval("print(x);", newContext);
// the above line prints "world"
}
}

View File

@@ -1,60 +0,0 @@
/*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Oracle nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import javax.script.Invocable;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
@SuppressWarnings("javadoc")
public class RunnableImpl {
public static void main(final String[] args) throws Exception {
final ScriptEngineManager manager = new ScriptEngineManager();
final ScriptEngine engine = manager.getEngineByName("nashorn");
// JavaScript code in a String
final String script = "function run() { print('run called'); }";
// evaluate script
engine.eval(script);
final Invocable inv = (Invocable) engine;
// get Runnable interface object from engine. This interface methods
// are implemented by script functions with the matching name.
final Runnable r = inv.getInterface(Runnable.class);
// start a new thread that runs the script implemented
// runnable interface
final Thread th = new Thread(r);
th.start();
th.join();
}
}

View File

@@ -1,63 +0,0 @@
/*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Oracle nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import javax.script.Invocable;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
@SuppressWarnings("javadoc")
public class RunnableImplObject {
public static void main(final String[] args) throws Exception {
final ScriptEngineManager manager = new ScriptEngineManager();
final ScriptEngine engine = manager.getEngineByName("nashorn");
// JavaScript code in a String
final String script = "var obj = new Object(); obj.run = function() { print('run method called'); }";
// evaluate script
engine.eval(script);
// get script object on which we want to implement the interface with
final Object obj = engine.get("obj");
final Invocable inv = (Invocable) engine;
// get Runnable interface object from engine. This interface methods
// are implemented by script methods of object 'obj'
final Runnable r = inv.getInterface(obj, Runnable.class);
// start a new thread that runs the script implemented
// runnable interface
final Thread th = new Thread(r);
th.start();
th.join();
}
}

View File

@@ -1,53 +0,0 @@
/*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Oracle nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import java.io.File;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
@SuppressWarnings("javadoc")
public class ScriptVars {
public static void main(final String[] args) throws Exception {
final ScriptEngineManager manager = new ScriptEngineManager();
final ScriptEngine engine = manager.getEngineByName("nashorn");
final File f = new File("test.txt");
// expose File object as variable to script
engine.put("file", f);
// evaluate a script string. The script accesses "file"
// variable and calls method on it
engine.eval("print(file.getAbsolutePath())");
}
}

View File

@@ -1,45 +0,0 @@
/*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Oracle nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
// load compatibility script
load("nashorn:mozilla_compat.js");
// Import Java packages and classes
// like import package.*; in Java
importPackage(java.awt);
// like import java.awt.Frame in Java
importClass(java.awt.Frame);
// Create Java Objects by "new ClassName"
var frame = new java.awt.Frame("hello");
// Call Java public methods from script
frame.setVisible(true);
// Access "JavaBean" properties like "fields"
print(frame.title);

View File

@@ -1,52 +0,0 @@
/*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Oracle nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
// create Java String array of 5 elements
var StringArray = Java.type("java.lang.String[]");
var a = new StringArray(5);
// Accessing elements and length access is by usual Java syntax
a[0] = "scripting is great!";
print(a.length);
print(a[0]);
// convert a script array to Java array
var anArray = [1, "13", false];
var javaIntArray = Java.to(anArray, "int[]");
print(javaIntArray[0]);// prints 1
print(javaIntArray[1]); // prints 13, as string "13" was converted to number 13 as per ECMAScript ToNumber conversion
print(javaIntArray[2]);// prints 0, as boolean false was converted to number 0 as per ECMAScript ToNumber conversion
// convert a Java array to a JavaScript array
var File = Java.type("java.io.File");
var listCurDir = new File(".").listFiles();
var jsList = Java.from(listCurDir);
print(jsList);

View File

@@ -1,47 +0,0 @@
/*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Oracle nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
var ArrayList = Java.type("java.util.ArrayList")
var ArrayListExtender = Java.extend(ArrayList)
var printSizeInvokedArrayList = new ArrayListExtender() {
size: function() { print("size invoked!"); }
}
var printAddInvokedArrayList = new ArrayListExtender() {
add: function(x, y) {
if(typeof(y) === "undefined") {
print("add(e) invoked!");
} else {
print("add(i, e) invoked!");
}
}
};
printSizeInvokedArrayList.size();
printAddInvokedArrayList.add(33, 33);

View File

@@ -1,48 +0,0 @@
/*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Oracle nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
// create JavaImporter with specific packages and classes to import
var SwingGui = new JavaImporter(javax.swing,
javax.swing.event,
javax.swing.border,
java.awt.event);
with (SwingGui) {
// within this 'with' statement, we can access Swing and AWT
// classes by unqualified (simple) names.
var mybutton = new JButton("test");
print(mybutton);
var myframe = new JFrame("test");
print(myframe);
}

View File

@@ -1,50 +0,0 @@
/*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Oracle nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
// accessing java types
var arrayListType = Java.type("java.util.ArrayList")
var intType = Java.type("int")
var stringArrayType = Java.type("java.lang.String[]")
var int2DArrayType = Java.type("int[][]")
// Using java types
var ArrayList = Java.type("java.util.ArrayList")
var anArrayList = new ArrayList
var anArrayListWithSize = new ArrayList(16)
// fully qualified name
var ftype = Java.type("java.awt.geom.Arc2D$Float")
// inner class property
var arctype = Java.type("java.awt.geom.Arc2D")
var ftype = arctype.Float

View File

@@ -1,36 +0,0 @@
/*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Oracle nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
var out = java.lang.System.out;
// select a particular print function
out["println(java.lang.Object)"]("hello");

View File

@@ -1,41 +0,0 @@
/*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Oracle nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
var r = new java.lang.Runnable() {
run: function() {
print("running...\n");
}
};
// "r" can be passed to Java methods that expect java.lang.Runnable
var th = new java.lang.Thread(r);
th.start();
th.join();

View File

@@ -1,39 +0,0 @@
/*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Oracle nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
function func() {
print("I am func!");
}
// pass script function for java.lang.Runnable argument
var th = new java.lang.Thread(func);
th.start();
th.join();

View File

@@ -1,32 +0,0 @@
/*
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Oracle nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
print("This is hello from test.js");

View File

@@ -0,0 +1,12 @@
# jetbrains/runtime:jbr15env
FROM centos:7
RUN yum -y install centos-release-scl
RUN yum -y install devtoolset-8
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 15
RUN wget https://cdn.azul.com/zulu/bin/zulu15.27.17-ca-jdk15.0.0-linux_x64.tar.gz \
-O - | tar xz -C /
RUN mv /zulu15.27.17-ca-jdk15.0.0-linux_x64 /jdk15.0.0
ENV PATH /opt/rh/devtoolset-8/root/usr/bin:$PATH
RUN git config --global user.email "builduser@jetbrains.com"
RUN git config --global user.name "builduser"

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
# Install Java 15
RUN wget https://cdn.azul.com/zulu/bin/zulu15.27.17-ca-jdk15.0.0-linux_i686.tar.gz \
-O - | tar xz -C /
RUN mv /zulu15.27.17-ca-jdk15.0.0-linux_i686 /jdk15.0.0

View File

@@ -0,0 +1,54 @@
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}"
do_reset_changes=0
do_reset_dcevm=0
HEAD_REVISION=0
function do_exit() {
exit_code=$1
[ $do_reset_changes -eq 1 ] && git checkout HEAD modules.list src/java.desktop/share/classes/module-info.java
if [ $do_reset_dcevm -eq 1 ]; then
[ ! -z $HEAD_REVISION ] && git reset --hard $HEAD_REVISION
fi
exit "$exit_code"
}
function update_jsdk_mods() {
__jsdk=$1
__jcef_mods=$2
__orig_jsdk_mods=$3
__updated_jsdk_mods=$4
# re-create java.desktop.jmod with updated module-info.class
tmp=.java.desktop.$$.tmp
mkdir "$tmp" || exit $?
"$__jsdk"/bin/jmod extract --dir "$tmp" "$__orig_jsdk_mods"/java.desktop.jmod || exit $?
"$__jsdk"/bin/javac \
--patch-module java.desktop="$__orig_jsdk_mods"/java.desktop.jmod \
--module-path "$__jcef_mods" -d "$tmp"/classes src/java.desktop/share/classes/module-info.java || exit $?
"$__jsdk"/bin/jmod \
create --class-path "$tmp"/classes --config "$tmp"/conf --header-files "$tmp"/include --legal-notice "$tmp"/legal --libs "$tmp"/lib \
java.desktop.jmod || exit $?
mv java.desktop.jmod "$__updated_jsdk_mods" || exit $?
rm -rf "$tmp"
# re-create java.base.jmod with updated hashes
tmp=.java.base.$$.tmp
mkdir "$tmp" || exit $?
hash_modules=$("$JSDK"/bin/jmod describe "$__orig_jsdk_mods"/java.base.jmod | grep hashes | awk '{print $2}' | tr '\n' '|' | sed s/\|$//) || exit $?
"$__jsdk"/bin/jmod extract --dir "$tmp" "$__orig_jsdk_mods"/java.base.jmod || exit $?
rm "$__updated_jsdk_mods"/java.base.jmod || exit $? # temp exclude from path
"$__jsdk"/bin/jmod \
create --module-path "$__updated_jsdk_mods" --hash-modules "$hash_modules" \
--class-path "$tmp"/classes --cmds "$tmp"/bin --config "$tmp"/conf --header-files "$tmp"/include --legal-notice "$tmp"/legal --libs "$tmp"/lib \
java.base.jmod || exit $?
mv java.base.jmod "$__updated_jsdk_mods" || exit $?
rm -rf "$tmp"
}
function get_mods_list() {
__mods=$1
echo $(ls $__mods) | sed s/\.jmod/,/g | sed s/,$//g | sed s/' '//g
}

View File

@@ -0,0 +1,84 @@
#!/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/scripts/common.sh
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
[ -z "$bundle_type" ] && (git apply -p0 < jb/project/tools/patches/exclude_jcef_module.patch || exit $?)
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-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,137 @@
#!/bin/bash -x
# The following parameters must be specified:
# JBSDK_VERSION - specifies major version of OpenJDK e.g. 11_0_6 (instead of dots '.' underbars "_" are used)
# JDK_BUILD_NUMBER - specifies update release 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 be built; possible values:
# <empty> or nomod - the release bundles without any additional modules (jcef)
# jcef - the release bundles with jcef
# fd - the fastdebug bundles which also include the jcef module
#
# 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)
#
# Environment variables:
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
# By default JCEF binaries should be located in ./jcef_linux_x64
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
bundle_type=$4
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
JCEF_PATH=${JCEF_PATH:=./jcef_linux_x64}
source jb/project/tools/common/scripts/common.sh
function create_image_bundle {
__bundle_name=$1
__arch_name=$2
__modules_path=$3
__modules=$4
[ "$bundle_type" == "fd" ] && fastdebug_infix="fastdebug-"
JBR=${__bundle_name}-${JBSDK_VERSION}-linux-x64-${fastdebug_infix}b${build_number}
echo Running jlink....
[ -d "$IMAGES_DIR"/"$__arch_name" ] && rm -rf "${IMAGES_DIR:?}"/"$__arch_name"
$JSDK/bin/jlink \
--module-path "$__modules_path" --no-man-pages --compress=2 \
--add-modules "$__modules" --output "$IMAGES_DIR"/"$__arch_name"
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> "$IMAGES_DIR"/"$__arch_name"/release
if [ "$__bundle_name" == "$JBRSDK_BUNDLE" ]; then
sed 's/JBR/JBRSDK/g' "$IMAGES_DIR"/"$__arch_name"/release > release
mv release "$IMAGES_DIR"/"$__arch_name"/release
fi
# jmod does not preserve file permissions (JDK-8173610)
[ -f "$IMAGES_DIR"/"$__arch_name"/lib/jcef_helper ] && chmod a+x "$IMAGES_DIR"/"$__arch_name"/lib/jcef_helper
echo Creating "$JBR".tar.gz ...
tar -pcf "$JBR".tar -C "$IMAGES_DIR" "$__arch_name" || do_exit $?
[ -f "$JBR".tar.gz ] && rm "$JBR.tar.gz"
gzip "$JBR".tar || do_exit $?
rm -rf "${IMAGES_DIR:?}"/"$__arch_name"
}
WITH_DEBUG_LEVEL="--with-debug-level=release"
RELEASE_NAME=linux-x86_64-server-release
case "$bundle_type" in
"jcef")
do_reset_changes=1
;;
"dcevm")
HEAD_REVISION=$(git rev-parse HEAD)
git am jb/project/tools/patches/dcevm/*.patch || do_exit $?
do_reset_dcevm=1
do_reset_changes=1
;;
"nomod" | "")
bundle_type=""
;;
"fd")
do_reset_changes=1
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
RELEASE_NAME=linux-x86_64-server-fastdebug
;;
esac
sh configure \
--disable-warnings-as-errors \
$WITH_DEBUG_LEVEL \
--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 || do_exit $?
make clean CONF=$RELEASE_NAME || exit $?
make images CONF=$RELEASE_NAME || do_exit $?
IMAGES_DIR=build/$RELEASE_NAME/images
JSDK=$IMAGES_DIR/jdk
JSDK_MODS_DIR=$IMAGES_DIR/jmods
JBRSDK_BUNDLE=jbrsdk
echo Fixing permissions
chmod -R a+r $JSDK
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ]; then
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
update_jsdk_mods $JSDK $JCEF_PATH/jmods $JSDK/jmods $JSDK_MODS_DIR || do_exit $?
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
jbr_name_postfix="_${bundle_type}"
fi
# create runtime image bundle
modules=$(xargs < modules.list | sed s/" "//g) || do_exit $?
create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" || do_exit $?
# create sdk image bundle
modules=$(cat $JSDK/release | grep MODULES | sed s/MODULES=//g | sed s/' '/,/g | sed s/\"//g | sed s/\\n//g) || do_exit $?
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
fi
create_image_bundle $JBRSDK_BUNDLE $JBRSDK_BUNDLE $JSDK_MODS_DIR "$modules" || do_exit $?
if [ -z "$bundle_type" ]; then
JBRSDK_TEST=${JBRSDK_BUNDLE}-${JBSDK_VERSION}-linux-test-x64-b${build_number}
echo Creating "$JBRSDK_TEST" ...
make test-image CONF=$RELEASE_NAME || do_exit $?
tar -pcf "$JBRSDK_TEST".tar -C $IMAGES_DIR --exclude='test/jdk/demos' test || do_exit $?
[ -f "$JBRSDK_TEST.tar.gz" ] && rm "$JBRSDK_TEST.tar.gz"
gzip "$JBRSDK_TEST".tar || do_exit $?
fi
do_exit 0

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/scripts/common.sh
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
[ -z "$bundle_type" ] && (git apply -p0 < jb/project/tools/patches/exclude_jcef_module.patch || exit $?)
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,138 @@
#!/bin/bash -x
# The following parameters must be specified:
# JBSDK_VERSION - specifies major version of OpenJDK e.g. 11_0_6 (instead of dots '.' underbars "_" are used)
# JDK_BUILD_NUMBER - specifies update release 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 be built; possible values:
# <empty> or nomod - the release bundles without any additional modules (jcef)
# jcef - the release bundles with jcef
# fd - the fastdebug bundles which also include the jcef module
#
# 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)
#
# Environment variables:
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
# By default JCEF binaries should be located in ./jcef_mac
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
bundle_type=$4
JBSDK_VERSION_WITH_DOTS=$(echo "$JBSDK_VERSION" | sed 's/_/\./g')
JCEF_PATH=${JCEF_PATH:=./jcef_mac}
MAJOR_JBSDK_VERSION=$(echo "$JBSDK_VERSION_WITH_DOTS" | awk -F "." '{print $1}')
BOOT_JDK=${BOOT_JDK:=$(/usr/libexec/java_home -v 14)}
source jb/project/tools/common/scripts/common.sh
function create_image_bundle {
__bundle_name=$1
__modules_path=$2
__modules=$3
tmp=.bundle.$$.tmp
mkdir "$tmp" || do_exit $?
[ "$bundle_type" == "fd" ] && fastdebug_infix="fastdebug-"
JBR=${__bundle_name}-${JBSDK_VERSION}-osx-x64-${fastdebug_infix}b${build_number}
JRE_CONTENTS=$tmp/$__bundle_name/Contents
mkdir -p "$JRE_CONTENTS" || do_exit $?
echo Running jlink...
"$JSDK"/bin/jlink \
--module-path "$__modules_path" --no-man-pages --compress=2 \
--add-modules "$__modules" --output "$JRE_CONTENTS/Home" || do_exit $?
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> "$JRE_CONTENTS/Home/release"
if [ "$__bundle_name" == "$JBRSDK_BUNDLE" ]; then
sed 's/JBR/JBRSDK/g' $JRE_CONTENTS/Home/release > release
mv release $JRE_CONTENTS/Home/release
fi
cp -R "$JSDK"/../MacOS "$JRE_CONTENTS"
cp "$JSDK"/../Info.plist "$JRE_CONTENTS"
[ -n "$bundle_type" ] && (cp -a $JCEF_PATH/Frameworks "$JRE_CONTENTS" || do_exit $?)
echo Creating "$JBR".tar.gz ...
COPYFILE_DISABLE=1 tar -pczf "$JBR".tar.gz --exclude='*.dSYM' --exclude='man' -C "$tmp" "$__bundle_name" || do_exit $?
rm -rf "$tmp"
}
WITH_DEBUG_LEVEL="--with-debug-level=release"
RELEASE_NAME=macosx-x86_64-server-release
case "$bundle_type" in
"jcef")
do_reset_changes=1
;;
"dcevm")
HEAD_REVISION=$(git rev-parse HEAD)
git am jb/project/tools/patches/dcevm/*.patch || do_exit $?
do_reset_dcevm=1
do_reset_changes=1
;;
"nomod" | "")
bundle_type=""
;;
"fd")
do_reset_changes=1
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
RELEASE_NAME=macosx-x86_64-server-fastdebug
;;
esac
sh configure \
--disable-warnings-as-errors \
$WITH_DEBUG_LEVEL \
--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 || do_exit $?
make clean CONF=$RELEASE_NAME || do_exit $?
make images CONF=$RELEASE_NAME || do_exit $?
IMAGES_DIR=build/$RELEASE_NAME/images
JSDK=$IMAGES_DIR/jdk-bundle/jdk-$MAJOR_JBSDK_VERSION.jdk/Contents/Home
JSDK_MODS_DIR=$IMAGES_DIR/jmods
JBRSDK_BUNDLE=jbrsdk
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ]; then
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
update_jsdk_mods "$JSDK" "$JCEF_PATH"/jmods "$JSDK"/jmods "$JSDK_MODS_DIR" || do_exit $?
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
jbr_name_postfix="_${bundle_type}"
fi
# create runtime image bundle
modules=$(xargs < modules.list | sed s/" "//g) || do_exit $?
create_image_bundle "jbr${jbr_name_postfix}" $JSDK_MODS_DIR "$modules" || do_exit $?
# create sdk image bundle
modules=$(cat "$JSDK"/release | grep MODULES | sed s/MODULES=//g | sed s/' '/,/g | sed s/\"//g | sed s/\\n//g) || do_exit $?
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
fi
create_image_bundle "$JBRSDK_BUNDLE" "$JSDK_MODS_DIR" "$modules" || do_exit $?
if [ -z "$bundle_type" ]; then
JBRSDK_TEST=${JBRSDK_BUNDLE}-${JBSDK_VERSION}-osx-test-x64-b${build_number}
echo Creating "$JBRSDK_TEST" ...
make test-image CONF=$RELEASE_NAME || do_exit $?
[ -f "$JBRSDK_TEST.tar.gz" ] && rm "$JBRSDK_TEST.tar.gz"
COPYFILE_DISABLE=1 tar -pczf "$JBRSDK_TEST".tar.gz -C $IMAGES_DIR --exclude='test/jdk/demos' test || do_exit $?
fi
do_exit 0

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,30 @@
diff --git modules.list modules.list
index 7c4b3e9cb6d..5ed60349ca7 100644
--- modules.list
+++ modules.list
@@ -53,4 +53,7 @@ jdk.security.jgss,
jdk.unsupported,
jdk.xml.dom,
jdk.zipfs,
-jdk.hotspot.agent
+jdk.hotspot.agent,
+jcef,
+gluegen.rt,
+jogl.all
diff --git src/java.desktop/share/classes/module-info.java src/java.desktop/share/classes/module-info.java
index b663b382f52..3e9acdc0c27 100644
--- src/java.desktop/share/classes/module-info.java
+++ src/java.desktop/share/classes/module-info.java
@@ -109,7 +109,11 @@ module java.desktop {
// see make/GensrcModuleInfo.gmk
exports sun.awt to
jdk.accessibility,
- jdk.unsupported.desktop;
+ jdk.unsupported.desktop,
+ jcef,
+ jogl.all;
+
+ exports java.awt.peer to jcef;
exports java.awt.dnd.peer to jdk.unsupported.desktop;
exports sun.awt.dnd to jdk.unsupported.desktop;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,29 @@
From 960dafbeeba190911955c208b611fecc15d66738 Mon Sep 17 00:00:00 2001
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
Date: Wed, 11 Mar 2020 14:19:34 +0100
Subject: [PATCH 03/34] Fix class cast exception on redefinition of class A,
that is superclass of B that has anonymous class C
---
src/hotspot/share/oops/instanceKlass.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/hotspot/share/oops/instanceKlass.cpp b/src/hotspot/share/oops/instanceKlass.cpp
index 994fc8a3bc8..3be3a09ef8f 100644
--- a/src/hotspot/share/oops/instanceKlass.cpp
+++ b/src/hotspot/share/oops/instanceKlass.cpp
@@ -953,7 +953,10 @@ bool InstanceKlass::link_class_impl(TRAPS) {
if (!is_linked()) {
if (!is_rewritten()) {
- {
+ // (DCEVM): If class A is being redefined and class B->A (B is extended from A) and B is host class of anonymous class C
+ // then second redefinition fails with cannot cast klass exception. So we currently turn off bytecode verification
+ // on redefinition.
+ if (!AllowEnhancedClassRedefinition || !newest_version()->is_redefining()) {
bool verify_ok = verify_code(THREAD);
if (!verify_ok) {
return false;
--
2.23.0

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,240 @@
From 39df5f163d4a0f1fd6b92313a5570808f19d5e20 Mon Sep 17 00:00:00 2001
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
Date: Sun, 4 Oct 2020 21:12:12 +0200
Subject: [PATCH 05/34] Support for Lambda class redefinition
---
.../share/classfile/classLoaderData.cpp | 9 +++
.../share/classfile/classLoaderData.hpp | 2 +-
.../share/classfile/systemDictionary.cpp | 12 +++-
.../share/classfile/systemDictionary.hpp | 1 +
.../prims/jvmtiEnhancedRedefineClasses.cpp | 65 +++++++++++++++++--
.../prims/jvmtiEnhancedRedefineClasses.hpp | 1 +
.../share/prims/resolvedMethodTable.cpp | 2 +
src/hotspot/share/prims/unsafe.cpp | 1 +
8 files changed, 83 insertions(+), 10 deletions(-)
diff --git a/src/hotspot/share/classfile/classLoaderData.cpp b/src/hotspot/share/classfile/classLoaderData.cpp
index 0cd90bb8c27..4d64c6b454a 100644
--- a/src/hotspot/share/classfile/classLoaderData.cpp
+++ b/src/hotspot/share/classfile/classLoaderData.cpp
@@ -593,6 +593,15 @@ Dictionary* ClassLoaderData::create_dictionary() {
return new Dictionary(this, size, resizable);
}
+void ClassLoaderData::exchange_holders(ClassLoaderData* cld) {
+ oop holder_oop = _holder.peek();
+ _holder.replace(cld->_holder.peek());
+ cld->_holder.replace(holder_oop);
+ WeakHandle<vm_class_loader_data> exchange = _holder;
+ _holder = cld->_holder;
+ cld->_holder = exchange;
+}
+
// Tell the GC to keep this klass alive while iterating ClassLoaderDataGraph
oop ClassLoaderData::holder_phantom() const {
// A klass that was previously considered dead can be looked up in the
diff --git a/src/hotspot/share/classfile/classLoaderData.hpp b/src/hotspot/share/classfile/classLoaderData.hpp
index ba2393f8dd0..e2ae0a77351 100644
--- a/src/hotspot/share/classfile/classLoaderData.hpp
+++ b/src/hotspot/share/classfile/classLoaderData.hpp
@@ -181,7 +181,7 @@ class ClassLoaderData : public CHeapObj<mtClass> {
bool has_accumulated_modified_oops() { return _accumulated_modified_oops; }
oop holder_no_keepalive() const;
oop holder_phantom() const;
-
+ void exchange_holders(ClassLoaderData* cld);
private:
void unload();
bool keep_alive() const { return _keep_alive > 0; }
diff --git a/src/hotspot/share/classfile/systemDictionary.cpp b/src/hotspot/share/classfile/systemDictionary.cpp
index bd0cae7cb9b..8f2b46add4d 100644
--- a/src/hotspot/share/classfile/systemDictionary.cpp
+++ b/src/hotspot/share/classfile/systemDictionary.cpp
@@ -1062,10 +1062,14 @@ InstanceKlass* SystemDictionary::parse_stream(Symbol* class_name,
Handle class_loader,
ClassFileStream* st,
const ClassLoadInfo& cl_info,
+ InstanceKlass* old_klass,
TRAPS) {
EventClassLoad class_load_start_event;
ClassLoaderData* loader_data;
+
+ bool is_redefining = (old_klass != NULL);
+
bool is_unsafe_anon_class = cl_info.unsafe_anonymous_host() != NULL;
// - for unsafe anonymous class: create a new CLD whith a class holder that uses
@@ -1094,8 +1098,12 @@ InstanceKlass* SystemDictionary::parse_stream(Symbol* class_name,
class_name,
loader_data,
cl_info,
- false, // pick_newest
+ is_redefining, // pick_newest
CHECK_NULL);
+ if (is_redefining && k != NULL) {
+ k->set_redefining(true);
+ k->set_old_version(old_klass);
+ }
if ((cl_info.is_hidden() || is_unsafe_anon_class) && k != NULL) {
// Hidden classes that are not strong and unsafe anonymous classes must update
@@ -1998,7 +2006,7 @@ void SystemDictionary::remove_from_hierarchy(InstanceKlass* k) {
k->remove_from_sibling_list();
}
-// (DCEVM)
+// (DCEVM)
void SystemDictionary::update_constraints_after_redefinition() {
constraints()->update_after_redefinition();
}
diff --git a/src/hotspot/share/classfile/systemDictionary.hpp b/src/hotspot/share/classfile/systemDictionary.hpp
index 4547449dbec..931e655d631 100644
--- a/src/hotspot/share/classfile/systemDictionary.hpp
+++ b/src/hotspot/share/classfile/systemDictionary.hpp
@@ -329,6 +329,7 @@ public:
Handle class_loader,
ClassFileStream* st,
const ClassLoadInfo& cl_info,
+ InstanceKlass* old_klass,
TRAPS);
// Resolve from stream (called by jni_DefineClass and JVM_DefineClass)
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
index 92ce6c27b8a..8b765623dcd 100644
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
@@ -494,6 +494,8 @@ void VM_EnhancedRedefineClasses::doit() {
ClassLoaderDataGraph::classes_do(&clear_cpool_cache);
+ // SystemDictionary::methods_do(fix_invoke_method);
+
// JSR-292 support
if (_any_class_has_resolved_methods) {
bool trace_name_printed = false;
@@ -756,12 +758,34 @@ jvmtiError VM_EnhancedRedefineClasses::load_new_class_versions(TRAPS) {
// load hook event.
state->set_class_being_redefined(the_class, _class_load_kind);
- InstanceKlass* k = SystemDictionary::resolve_from_stream(the_class_sym,
- the_class_loader,
- protection_domain,
- &st,
- the_class,
- THREAD);
+ InstanceKlass* k;
+
+ if (InstanceKlass::cast(the_class)->is_anonymous()) {
+ const InstanceKlass* host_class = the_class->host_klass();
+
+ // Make sure it's the real host class, not another anonymous class.
+ while (host_class != NULL && host_class->is_anonymous()) {
+ host_class = host_class->host_klass();
+ }
+
+ k = SystemDictionary::parse_stream(the_class_sym,
+ the_class_loader,
+ protection_domain,
+ &st,
+ host_class,
+ the_class,
+ NULL,
+ THREAD);
+ k->class_loader_data()->exchange_holders(the_class->class_loader_data());
+ the_class->class_loader_data()->inc_keep_alive();
+ } else {
+ k = SystemDictionary::resolve_from_stream(the_class_sym,
+ the_class_loader,
+ protection_domain,
+ &st,
+ the_class,
+ THREAD);
+ }
// Clear class_being_redefined just to be sure.
state->clear_class_being_redefined();
@@ -1442,6 +1466,30 @@ void VM_EnhancedRedefineClasses::MethodDataCleaner::do_klass(Klass* k) {
}
}
+void VM_EnhancedRedefineClasses::fix_invoke_method(Method* method) {
+
+ constantPoolHandle other_cp = constantPoolHandle(method->constants());
+
+ for (int i = 0; i < other_cp->length(); i++) {
+ if (other_cp->tag_at(i).is_klass()) {
+ Klass* klass = other_cp->resolved_klass_at(i);
+ if (klass->new_version() != NULL) {
+ // Constant pool entry points to redefined class -- update to the new version
+ other_cp->klass_at_put(i, klass->newest_version());
+ }
+ assert(other_cp->resolved_klass_at(i)->new_version() == NULL, "Must be new klass!");
+ }
+ }
+
+ ConstantPoolCache* cp_cache = other_cp->cache();
+ if (cp_cache != NULL) {
+ cp_cache->clear_entries();
+ }
+
+}
+
+
+
void VM_EnhancedRedefineClasses::update_jmethod_ids() {
for (int j = 0; j < _matching_methods_length; ++j) {
Method* old_method = _matching_old_methods[j];
@@ -1979,7 +2027,10 @@ jvmtiError VM_EnhancedRedefineClasses::find_sorted_affected_classes(TRAPS) {
// Find classes not directly redefined, but affected by a redefinition (because one of its supertypes is redefined)
AffectedKlassClosure closure(_affected_klasses);
// Updated in j10, from original SystemDictionary::classes_do
- ClassLoaderDataGraph::dictionary_classes_do(&closure);
+
+ ClassLoaderDataGraph::classes_do(&closure);
+ //ClassLoaderDataGraph::dictionary_classes_do(&closure);
+
log_trace(redefine, class, load)("%d classes affected", _affected_klasses->length());
// Sort the affected klasses such that a supertype is always on a smaller array index than its subtype.
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
index 60b62c3170a..d8a11b51fe9 100644
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
@@ -116,6 +116,7 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
void rollback();
static void mark_as_scavengable(nmethod* nm);
static void unpatch_bytecode(Method* method);
+ static void fix_invoke_method(Method* method);
// Figure out which new methods match old methods in name and signature,
// which methods have been added, and which are no longer present
diff --git a/src/hotspot/share/prims/resolvedMethodTable.cpp b/src/hotspot/share/prims/resolvedMethodTable.cpp
index 122bb8c186b..81b3aa96564 100644
--- a/src/hotspot/share/prims/resolvedMethodTable.cpp
+++ b/src/hotspot/share/prims/resolvedMethodTable.cpp
@@ -414,6 +414,8 @@ void ResolvedMethodTable::adjust_method_entries_dcevm(bool * trace_name_printed)
InstanceKlass* newer_klass = InstanceKlass::cast(old_method->method_holder()->new_version());
Method* newer_method = newer_klass->method_with_idnum(old_method->orig_method_idnum());
+ log_info(redefine, class, load, exceptions)("Adjusting method: '%s' of new class %s", newer_method->name_and_sig_as_C_string(), newer_klass->name()->as_C_string());
+
assert(newer_klass == newer_method->method_holder(), "call after swapping redefined guts");
assert(newer_method != NULL, "method_with_idnum() should not be NULL");
assert(old_method != newer_method, "sanity check");
diff --git a/src/hotspot/share/prims/unsafe.cpp b/src/hotspot/share/prims/unsafe.cpp
index 72d81ec9d6c..027afa3fabd 100644
--- a/src/hotspot/share/prims/unsafe.cpp
+++ b/src/hotspot/share/prims/unsafe.cpp
@@ -865,6 +865,7 @@ Unsafe_DefineAnonymousClass_impl(JNIEnv *env,
host_loader,
&st,
cl_info,
+ NULL,
CHECK_NULL);
if (anonk == NULL) {
return NULL;
--
2.23.0

View File

@@ -0,0 +1,135 @@
From 5af1daedc86b5fec0f222cbdda3afbdf518985ea Mon Sep 17 00:00:00 2001
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
Date: Sat, 23 May 2020 10:02:15 +0200
Subject: [PATCH 06/34] Fix "no original bytecode found" error if method with
bkp is missing
Sometimes IDE can deploy class with erroneous method, such method has
n bytecode, but breakpoint position can still exist.
---
src/hotspot/share/interpreter/bytecodes.cpp | 2 +-
.../share/interpreter/interpreterRuntime.cpp | 2 +-
src/hotspot/share/oops/method.cpp | 8 ++++----
src/hotspot/share/oops/method.hpp | 4 ++--
.../prims/jvmtiEnhancedRedefineClasses.cpp | 18 ++++++++++--------
5 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/src/hotspot/share/interpreter/bytecodes.cpp b/src/hotspot/share/interpreter/bytecodes.cpp
index e377e36b88c..262ecc021b2 100644
--- a/src/hotspot/share/interpreter/bytecodes.cpp
+++ b/src/hotspot/share/interpreter/bytecodes.cpp
@@ -84,7 +84,7 @@ Bytecodes::Code Bytecodes::code_at(Method* method, int bci) {
Bytecodes::Code Bytecodes::non_breakpoint_code_at(const Method* method, address bcp) {
assert(method != NULL, "must have the method for breakpoint conversion");
assert(method->contains(bcp), "must be valid bcp in method");
- return method->orig_bytecode_at(method->bci_from(bcp));
+ return method->orig_bytecode_at(method->bci_from(bcp), false);
}
int Bytecodes::special_length_at(Bytecodes::Code code, address bcp, address end) {
diff --git a/src/hotspot/share/interpreter/interpreterRuntime.cpp b/src/hotspot/share/interpreter/interpreterRuntime.cpp
index ed3cc3eb6a2..504e59caf51 100644
--- a/src/hotspot/share/interpreter/interpreterRuntime.cpp
+++ b/src/hotspot/share/interpreter/interpreterRuntime.cpp
@@ -814,7 +814,7 @@ JRT_END
// Invokes
JRT_ENTRY(Bytecodes::Code, InterpreterRuntime::get_original_bytecode_at(JavaThread* thread, Method* method, address bcp))
- return method->orig_bytecode_at(method->bci_from(bcp));
+ return method->orig_bytecode_at(method->bci_from(bcp), false);
JRT_END
JRT_ENTRY(void, InterpreterRuntime::set_original_bytecode_at(JavaThread* thread, Method* method, address bcp, Bytecodes::Code new_code))
diff --git a/src/hotspot/share/oops/method.cpp b/src/hotspot/share/oops/method.cpp
index 516f2bb8f2f..1c88511a5fc 100644
--- a/src/hotspot/share/oops/method.cpp
+++ b/src/hotspot/share/oops/method.cpp
@@ -1853,14 +1853,14 @@ bool CompressedLineNumberReadStream::read_pair() {
#if INCLUDE_JVMTI
-Bytecodes::Code Method::orig_bytecode_at(int bci) const {
+Bytecodes::Code Method::orig_bytecode_at(int bci, bool no_fatal) const {
BreakpointInfo* bp = method_holder()->breakpoints();
for (; bp != NULL; bp = bp->next()) {
if (bp->match(this, bci)) {
return bp->orig_bytecode();
}
}
- {
+ if (!no_fatal) {
ResourceMark rm;
fatal("no original bytecode found in %s at bci %d", name_and_sig_as_C_string(), bci);
}
@@ -2006,7 +2006,7 @@ BreakpointInfo::BreakpointInfo(Method* m, int bci) {
_signature_index = m->signature_index();
_orig_bytecode = (Bytecodes::Code) *m->bcp_from(_bci);
if (_orig_bytecode == Bytecodes::_breakpoint)
- _orig_bytecode = m->orig_bytecode_at(_bci);
+ _orig_bytecode = m->orig_bytecode_at(_bci, false);
_next = NULL;
}
@@ -2015,7 +2015,7 @@ void BreakpointInfo::set(Method* method) {
{
Bytecodes::Code code = (Bytecodes::Code) *method->bcp_from(_bci);
if (code == Bytecodes::_breakpoint)
- code = method->orig_bytecode_at(_bci);
+ code = method->orig_bytecode_at(_bci, false);
assert(orig_bytecode() == code, "original bytecode must be the same");
}
#endif
diff --git a/src/hotspot/share/oops/method.hpp b/src/hotspot/share/oops/method.hpp
index 83ed2d9c3c1..4d4cc6dc012 100644
--- a/src/hotspot/share/oops/method.hpp
+++ b/src/hotspot/share/oops/method.hpp
@@ -230,7 +230,7 @@ class Method : public Metadata {
// JVMTI breakpoints
#if !INCLUDE_JVMTI
- Bytecodes::Code orig_bytecode_at(int bci) const {
+ Bytecodes::Code orig_bytecode_at(int bci, bool no_fatal) const {
ShouldNotReachHere();
return Bytecodes::_shouldnotreachhere;
}
@@ -239,7 +239,7 @@ class Method : public Metadata {
};
u2 number_of_breakpoints() const {return 0;}
#else // !INCLUDE_JVMTI
- Bytecodes::Code orig_bytecode_at(int bci) const;
+ Bytecodes::Code orig_bytecode_at(int bci, bool no_fatal) const;
void set_orig_bytecode_at(int bci, Bytecodes::Code code);
void set_breakpoint(int bci);
void clear_breakpoint(int bci);
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
index 8b765623dcd..a859b8e1162 100644
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
@@ -1362,14 +1362,16 @@ void VM_EnhancedRedefineClasses::unpatch_bytecode(Method* method) {
if (code == Bytecodes::_breakpoint) {
int bci = method->bci_from(bcp);
- code = method->orig_bytecode_at(bci);
- java_code = Bytecodes::java_code(code);
- if (code != java_code &&
- (java_code == Bytecodes::_getfield ||
- java_code == Bytecodes::_putfield ||
- java_code == Bytecodes::_aload_0)) {
- // Let breakpoint table handling unpatch bytecode
- method->set_orig_bytecode_at(bci, java_code);
+ code = method->orig_bytecode_at(bci, true);
+ if (code != Bytecodes::_shouldnotreachhere) {
+ java_code = Bytecodes::java_code(code);
+ if (code != java_code &&
+ (java_code == Bytecodes::_getfield ||
+ java_code == Bytecodes::_putfield ||
+ java_code == Bytecodes::_aload_0)) {
+ // Let breakpoint table handling unpatch bytecode
+ method->set_orig_bytecode_at(bci, java_code);
+ }
}
} else {
java_code = Bytecodes::java_code(code);
--
2.23.0

View File

@@ -0,0 +1,57 @@
From 19d2274a5dff6e6b31474252b45e5e7484f0180b Mon Sep 17 00:00:00 2001
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
Date: Sun, 24 May 2020 12:07:42 +0200
Subject: [PATCH 07/34] Replace deleted method with
Universe::throw_no_such_method_error
---
.../share/prims/resolvedMethodTable.cpp | 28 +++++++++----------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/src/hotspot/share/prims/resolvedMethodTable.cpp b/src/hotspot/share/prims/resolvedMethodTable.cpp
index 81b3aa96564..caf03ffe56d 100644
--- a/src/hotspot/share/prims/resolvedMethodTable.cpp
+++ b/src/hotspot/share/prims/resolvedMethodTable.cpp
@@ -404,25 +404,25 @@ void ResolvedMethodTable::adjust_method_entries_dcevm(bool * trace_name_printed)
if (old_method->is_old()) {
+ InstanceKlass* newer_klass = InstanceKlass::cast(old_method->method_holder()->new_version());
+ Method* newer_method;
+
// Method* new_method;
if (old_method->is_deleted()) {
- // FIXME:(DCEVM) - check if exception can be thrown
- // new_method = Universe::throw_no_such_method_error();
- continue;
- }
-
- InstanceKlass* newer_klass = InstanceKlass::cast(old_method->method_holder()->new_version());
- Method* newer_method = newer_klass->method_with_idnum(old_method->orig_method_idnum());
+ newer_method = Universe::throw_no_such_method_error();
+ } else {
+ newer_method = newer_klass->method_with_idnum(old_method->orig_method_idnum());
- log_info(redefine, class, load, exceptions)("Adjusting method: '%s' of new class %s", newer_method->name_and_sig_as_C_string(), newer_klass->name()->as_C_string());
+ log_info(redefine, class, load, exceptions)("Adjusting method: '%s' of new class %s", newer_method->name_and_sig_as_C_string(), newer_klass->name()->as_C_string());
- assert(newer_klass == newer_method->method_holder(), "call after swapping redefined guts");
- assert(newer_method != NULL, "method_with_idnum() should not be NULL");
- assert(old_method != newer_method, "sanity check");
+ assert(newer_klass == newer_method->method_holder(), "call after swapping redefined guts");
+ assert(newer_method != NULL, "method_with_idnum() should not be NULL");
+ assert(old_method != newer_method, "sanity check");
- if (_the_table->lookup(newer_method) != NULL) {
- // old method was already adjusted if new method exists in _the_table
- continue;
+ if (_the_table->lookup(newer_method) != NULL) {
+ // old method was already adjusted if new method exists in _the_table
+ continue;
+ }
}
java_lang_invoke_ResolvedMethodName::set_vmtarget(mem_name, newer_method);
--
2.23.0

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,50 @@
From ca47ab5a0a6ce8e2644736f323a335a957311af9 Mon Sep 17 00:00:00 2001
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
Date: Sat, 13 Jun 2020 18:50:59 +0200
Subject: [PATCH 09/34] Change log level in advanced redefinition
- Change log level for "Comparing different class ver.." to debug
- Fix adjust_method_entries_dcevm logging levels and severity
---
src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp | 2 +-
src/hotspot/share/prims/resolvedMethodTable.cpp | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
index 6c9eb40ecf5..b09ba554e07 100644
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
@@ -916,7 +916,7 @@ jvmtiError VM_EnhancedRedefineClasses::load_new_class_versions(TRAPS) {
// Calculated the difference between new and old class (field change, method change, supertype change, ...).
int VM_EnhancedRedefineClasses::calculate_redefinition_flags(InstanceKlass* new_class) {
int result = Klass::NoRedefinition;
- log_info(redefine, class, load)("Comparing different class versions of class %s",new_class->name()->as_C_string());
+ log_debug(redefine, class, load)("Comparing different class versions of class %s",new_class->name()->as_C_string());
assert(new_class->old_version() != NULL, "must have old version");
InstanceKlass* the_class = InstanceKlass::cast(new_class->old_version());
diff --git a/src/hotspot/share/prims/resolvedMethodTable.cpp b/src/hotspot/share/prims/resolvedMethodTable.cpp
index caf03ffe56d..eb9fcda44f3 100644
--- a/src/hotspot/share/prims/resolvedMethodTable.cpp
+++ b/src/hotspot/share/prims/resolvedMethodTable.cpp
@@ -413,7 +413,7 @@ void ResolvedMethodTable::adjust_method_entries_dcevm(bool * trace_name_printed)
} else {
newer_method = newer_klass->method_with_idnum(old_method->orig_method_idnum());
- log_info(redefine, class, load, exceptions)("Adjusting method: '%s' of new class %s", newer_method->name_and_sig_as_C_string(), newer_klass->name()->as_C_string());
+ log_debug(redefine, class, update)("Adjusting method: '%s' of new class %s", newer_method->name_and_sig_as_C_string(), newer_klass->name()->as_C_string());
assert(newer_klass == newer_method->method_holder(), "call after swapping redefined guts");
assert(newer_method != NULL, "method_with_idnum() should not be NULL");
@@ -433,7 +433,7 @@ void ResolvedMethodTable::adjust_method_entries_dcevm(bool * trace_name_printed)
ResourceMark rm;
if (!(*trace_name_printed)) {
- log_info(redefine, class, update)("adjust: name=%s", old_method->method_holder()->external_name());
+ log_debug(redefine, class, update)("adjust: name=%s", old_method->method_holder()->external_name());
*trace_name_printed = true;
}
log_debug(redefine, class, update, constantpool)
--
2.23.0

View File

@@ -0,0 +1,26 @@
From 7e236beee0375656d1955fc1168143c1639fb7f1 Mon Sep 17 00:00:00 2001
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
Date: Tue, 6 Oct 2020 22:15:31 +0200
Subject: [PATCH 10/34] AllowEnhancedClassRedefinition is false (disabled) by
default
---
src/hotspot/share/runtime/globals.hpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp
index 5b367704800..2710c6ea0e5 100644
--- a/src/hotspot/share/runtime/globals.hpp
+++ b/src/hotspot/share/runtime/globals.hpp
@@ -2466,7 +2466,7 @@ const size_t minimumSymbolTableSize = 1024;
diagnostic(bool, DeoptimizeNMethodBarriersALot, false, \
"Make nmethod barriers deoptimise a lot.") \
\
- product(bool, AllowEnhancedClassRedefinition, true, \
+ product(bool, AllowEnhancedClassRedefinition, false, \
"Allow enhanced class redefinition beyond swapping method " \
"bodies") \
\
--
2.23.0

View File

@@ -0,0 +1,25 @@
From d56e73885111b386771f564ec6beb305338993df Mon Sep 17 00:00:00 2001
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
Date: Mon, 19 Oct 2020 20:00:04 +0200
Subject: [PATCH 12/34] Set HOTSPOT_VM_DISTRO=Dynamic Code Evolution
---
make/autoconf/version-numbers | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/make/autoconf/version-numbers b/make/autoconf/version-numbers
index aabdc5bed20..df8025a2e84 100644
--- a/make/autoconf/version-numbers
+++ b/make/autoconf/version-numbers
@@ -45,7 +45,7 @@ PRODUCT_NAME=OpenJDK
PRODUCT_SUFFIX="Runtime Environment"
JDK_RC_PLATFORM_NAME=Platform
COMPANY_NAME=N/A
-HOTSPOT_VM_DISTRO="OpenJDK"
+HOTSPOT_VM_DISTRO="Dynamic Code Evolution"
VENDOR_URL=https://openjdk.java.net/
VENDOR_URL_BUG=https://bugreport.java.com/bugreport/
VENDOR_URL_VM_BUG=https://bugreport.java.com/bugreport/crash.jsp
--
2.23.0

View File

@@ -0,0 +1,71 @@
From 7ebad43ed45805b0a3736c510f708ff17697ba7e Mon Sep 17 00:00:00 2001
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
Date: Sun, 11 Oct 2020 10:43:28 +0200
Subject: [PATCH 13/34] Fix G1 nmethod registration
---
.../prims/jvmtiEnhancedRedefineClasses.cpp | 19 ++++++++++++++++---
.../prims/jvmtiEnhancedRedefineClasses.hpp | 3 ++-
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
index b09ba554e07..718426f2819 100644
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
@@ -216,7 +216,14 @@ void VM_EnhancedRedefineClasses::mark_as_scavengable(nmethod* nm) {
}
}
-void VM_EnhancedRedefineClasses::mark_as_scavengable_g1(nmethod* nm) {
+void VM_EnhancedRedefineClasses::unregister_nmethod_g1(nmethod* nm) {
+ // It should work not only for G1 but also for another GCs, but this way is safer now
+ if (!nm->is_zombie() && !nm->is_unloaded()) {
+ Universe::heap()->unregister_nmethod(nm);
+ }
+}
+
+void VM_EnhancedRedefineClasses::register_nmethod_g1(nmethod* nm) {
// It should work not only for G1 but also for another GCs, but this way is safer now
if (!nm->is_zombie() && !nm->is_unloaded()) {
Universe::heap()->register_nmethod(nm);
@@ -521,8 +528,9 @@ void VM_EnhancedRedefineClasses::doit() {
// For now, mark all nmethod's as scavengable that are not scavengable already
if (ScavengeRootsInCode) {
if (UseG1GC) {
- // this should work also for other GCs
- CodeCache::nmethods_do(mark_as_scavengable_g1);
+ // G1 holds references to nmethods in regions based on oops values. Since oops in nmethod can be changed in ChangePointers* closures
+ // we unregister nmethods from G1 heap, then closures are processed (oops are changed) and finally we register nmethod to G1 again
+ CodeCache::nmethods_do(unregister_nmethod_g1);
} else {
CodeCache::nmethods_do(mark_as_scavengable);
}
@@ -545,6 +553,11 @@ void VM_EnhancedRedefineClasses::doit() {
Universe::root_oops_do(&oopClosureNoBarrier);
+ if (UseG1GC) {
+ // this should work also for other GCs
+ CodeCache::nmethods_do(register_nmethod_g1);
+ }
+
}
log_trace(redefine, class, obsolete, metadata)("After updating instances");
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
index 9755944d70b..4c0412d343d 100644
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
@@ -116,7 +116,8 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
void rollback();
static void mark_as_scavengable(nmethod* nm);
- static void mark_as_scavengable_g1(nmethod* nm);
+ static void unregister_nmethod_g1(nmethod* nm);
+ static void register_nmethod_g1(nmethod* nm);
static void unpatch_bytecode(Method* method);
static void fix_invoke_method(Method* method);
--
2.23.0

View File

@@ -0,0 +1,26 @@
From 5c7e5f245f79d7e8575461dab0c356ed74c8e9a3 Mon Sep 17 00:00:00 2001
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
Date: Thu, 22 Oct 2020 20:15:20 +0200
Subject: [PATCH 14/34] Initialize method's _new_version/_old_version to NULL
---
src/hotspot/share/oops/method.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/hotspot/share/oops/method.cpp b/src/hotspot/share/oops/method.cpp
index 1c88511a5fc..ce940cf10a9 100644
--- a/src/hotspot/share/oops/method.cpp
+++ b/src/hotspot/share/oops/method.cpp
@@ -91,7 +91,8 @@ Method* Method::allocate(ClassLoaderData* loader_data,
return new (loader_data, size, MetaspaceObj::MethodType, THREAD) Method(cm, access_flags);
}
-Method::Method(ConstMethod* xconst, AccessFlags access_flags) {
+Method::Method(ConstMethod* xconst, AccessFlags access_flags) : _new_version(NULL),
+ _old_version(NULL) {
NoSafepointVerifier no_safepoint;
set_constMethod(xconst);
set_access_flags(access_flags);
--
2.23.0

View File

@@ -0,0 +1,193 @@
From 6ffac6e5064ec6633fdbeb8520333dca00bc6a62 Mon Sep 17 00:00:00 2001
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
Date: Fri, 23 Oct 2020 10:20:26 +0200
Subject: [PATCH 15/34] Clear dcevm code separation
---
src/hotspot/share/classfile/systemDictionary.cpp | 4 ++--
src/hotspot/share/gc/serial/genMarkSweep.cpp | 8 +++++---
src/hotspot/share/interpreter/linkResolver.cpp | 16 +++++++++++-----
.../instrumentation/jfrEventClassTransformer.cpp | 2 +-
src/hotspot/share/oops/instanceKlass.cpp | 10 ++++++----
src/hotspot/share/oops/method.cpp | 2 +-
.../share/prims/jvmtiGetLoadedClasses.cpp | 2 +-
src/hotspot/share/runtime/reflection.cpp | 2 +-
8 files changed, 28 insertions(+), 18 deletions(-)
diff --git a/src/hotspot/share/classfile/systemDictionary.cpp b/src/hotspot/share/classfile/systemDictionary.cpp
index 8f2b46add4d..9ac6ec96cb5 100644
--- a/src/hotspot/share/classfile/systemDictionary.cpp
+++ b/src/hotspot/share/classfile/systemDictionary.cpp
@@ -1241,7 +1241,7 @@ InstanceKlass* SystemDictionary::resolve_from_stream(Symbol* class_name,
MutexLocker mu(THREAD, SystemDictionary_lock);
Klass* check = find_class(h_name, k->class_loader_data());
- assert((check == k && !k->is_redefining()) || (k->is_redefining() && check == k->old_version()), "should be present in the dictionary");
+ assert(check == k && !k->is_redefining() || k->is_redefining() && check == k->old_version(), "should be present in the dictionary");
} );
return k;
@@ -2290,7 +2290,7 @@ void SystemDictionary::check_constraints(unsigned int d_hash,
// also hold array classes.
assert(check->is_instance_klass(), "noninstance in systemdictionary");
- if ((defining == true) || ((k != check) && k->old_version() != check)) {
+ if ((defining == true) || (k != check && (!AllowEnhancedClassRedefinition || k->old_version() != check))) {
throwException = true;
ss.print("loader %s", loader_data->loader_name_and_id());
ss.print(" attempted duplicate %s definition for %s. (%s)",
diff --git a/src/hotspot/share/gc/serial/genMarkSweep.cpp b/src/hotspot/share/gc/serial/genMarkSweep.cpp
index 1d13c647452..548df01e557 100644
--- a/src/hotspot/share/gc/serial/genMarkSweep.cpp
+++ b/src/hotspot/share/gc/serial/genMarkSweep.cpp
@@ -334,7 +334,9 @@ void GenMarkSweep::mark_sweep_phase4() {
GenCompactClosure blk;
gch->generation_iterate(&blk, true);
- DcevmSharedGC::copy_rescued_objects_back(MarkSweep::_rescued_oops, true);
- DcevmSharedGC::clear_rescued_objects_resource(MarkSweep::_rescued_oops);
- MarkSweep::_rescued_oops = NULL;
+ if (AllowEnhancedClassRedefinition) {
+ DcevmSharedGC::copy_rescued_objects_back(MarkSweep::_rescued_oops, true);
+ DcevmSharedGC::clear_rescued_objects_resource(MarkSweep::_rescued_oops);
+ MarkSweep::_rescued_oops = NULL;
+ }
}
diff --git a/src/hotspot/share/interpreter/linkResolver.cpp b/src/hotspot/share/interpreter/linkResolver.cpp
index b6e9e0a308d..b2f24ddbeda 100644
--- a/src/hotspot/share/interpreter/linkResolver.cpp
+++ b/src/hotspot/share/interpreter/linkResolver.cpp
@@ -282,9 +282,14 @@ void LinkResolver::check_klass_accessibility(Klass* ref_klass, Klass* sel_klass,
if (!base_klass->is_instance_klass()) {
return; // no relevant check to do
}
-
- Reflection::VerifyClassAccessResults vca_result =
- Reflection::verify_class_access(ref_klass->newest_version(), InstanceKlass::cast(base_klass->newest_version()), true);
+ Klass* refKlassNewest = ref_klass;
+ Klass* baseKlassNewest = base_klass;
+ if (AllowEnhancedClassRedefinition) {
+ refKlassNewest = ref_klass->newest_version();
+ baseKlassNewest = base_klass->newest_version();
+ }
+ Reflection::VerifyClassAccessResults vca_result =
+ Reflection::verify_class_access(refKlassNewest, InstanceKlass::cast(baseKlassNewest), true);
if (vca_result != Reflection::ACCESS_OK) {
ResourceMark rm(THREAD);
char* msg = Reflection::verify_class_access_msg(ref_klass,
@@ -566,7 +571,8 @@ void LinkResolver::check_method_accessability(Klass* ref_klass,
// We'll check for the method name first, as that's most likely
// to be false (so we'll short-circuit out of these tests).
if (sel_method->name() == vmSymbols::clone_name() &&
- sel_klass->newest_version() == SystemDictionary::Object_klass()->newest_version() &&
+ ( !AllowEnhancedClassRedefinition && sel_klass == SystemDictionary::Object_klass() ||
+ AllowEnhancedClassRedefinition && sel_klass->newest_version() == SystemDictionary::Object_klass()->newest_version()) &&
resolved_klass->is_array_klass()) {
// We need to change "protected" to "public".
assert(flags.is_protected(), "clone not protected?");
@@ -1011,7 +1017,7 @@ void LinkResolver::resolve_field(fieldDescriptor& fd,
// or by the <init> method (in case of an instance field).
if (is_put && fd.access_flags().is_final()) {
- if (sel_klass != current_klass && sel_klass != current_klass->active_version()) {
+ if (sel_klass != current_klass && (!AllowEnhancedClassRedefinition || sel_klass != current_klass->active_version())) {
ResourceMark rm(THREAD);
stringStream ss;
ss.print("Update to %s final field %s.%s attempted from a different class (%s) than the field's declaring class",
diff --git a/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp b/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp
index 96fc139bea3..f7284197c5a 100644
--- a/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp
+++ b/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp
@@ -1471,7 +1471,7 @@ static InstanceKlass* create_new_instance_klass(InstanceKlass* ik, ClassFileStre
cld,
&cl_info,
ClassFileParser::INTERNAL, // internal visibility
- false,
+ false,
THREAD);
if (HAS_PENDING_EXCEPTION) {
log_pending_exception(PENDING_EXCEPTION);
diff --git a/src/hotspot/share/oops/instanceKlass.cpp b/src/hotspot/share/oops/instanceKlass.cpp
index 3be3a09ef8f..f8e60941046 100644
--- a/src/hotspot/share/oops/instanceKlass.cpp
+++ b/src/hotspot/share/oops/instanceKlass.cpp
@@ -199,7 +199,9 @@ bool InstanceKlass::has_nest_member(InstanceKlass* k, TRAPS) const {
// able to perform that loading but we can't exclude the compiler threads from
// executing this logic. But it should actually be impossible to trigger loading here.
Klass* k2 = _constants->klass_at(cp_index, THREAD);
- k2 = k2->newest_version();
+ if (AllowEnhancedClassRedefinition) {
+ k2 = k2->newest_version();
+ }
assert(!HAS_PENDING_EXCEPTION || PENDING_EXCEPTION->is_a(SystemDictionary::VirtualMachineError_klass()),
"Exceptions should not be possible here");
if (k2 == k) {
@@ -1003,7 +1005,7 @@ bool InstanceKlass::link_class_impl(TRAPS) {
#endif
set_init_state(linked);
// (DCEVM) Must check for old version in order to prevent infinite loops.
- if (JvmtiExport::should_post_class_prepare() && old_version() == NULL /* JVMTI deadlock otherwise */) {
+ if (JvmtiExport::should_post_class_prepare() && (!AllowEnhancedClassRedefinition || old_version() == NULL) /* JVMTI deadlock otherwise */) {
Thread *thread = THREAD;
assert(thread->is_Java_thread(), "thread->is_Java_thread()");
JvmtiExport::post_class_prepare((JavaThread *) thread, this);
@@ -1084,7 +1086,7 @@ void InstanceKlass::initialize_impl(TRAPS) {
// we might end up throwing IE from link/symbol resolution sites
// that aren't expected to throw. This would wreak havoc. See 6320309.
while ((is_being_initialized() && !is_reentrant_initialization(jt))
- || (old_version() != NULL && InstanceKlass::cast(old_version())->is_being_initialized())) {
+ || (AllowEnhancedClassRedefinition && old_version() != NULL && InstanceKlass::cast(old_version())->is_being_initialized())) {
wait = true;
jt->set_class_to_be_initialized(this);
ol.wait_uninterruptibly(jt);
@@ -3782,7 +3784,7 @@ void InstanceKlass::verify_on(outputStream* st) {
guarantee(sib->is_klass(), "should be klass");
// TODO: (DCEVM) explain
- guarantee(sib->super() == super || super->newest_version() == SystemDictionary::Object_klass(), "siblings should have same superklass");
+ guarantee(sib->super() == super || AllowEnhancedClassRedefinition && super->newest_version() == SystemDictionary::Object_klass(), "siblings should have same superklass");
}
// Verify local interfaces
diff --git a/src/hotspot/share/oops/method.cpp b/src/hotspot/share/oops/method.cpp
index ce940cf10a9..2d8e5b0256b 100644
--- a/src/hotspot/share/oops/method.cpp
+++ b/src/hotspot/share/oops/method.cpp
@@ -2208,7 +2208,7 @@ void Method::ensure_jmethod_ids(ClassLoaderData* loader_data, int capacity) {
// Add a method id to the jmethod_ids
jmethodID Method::make_jmethod_id(ClassLoaderData* loader_data, Method* m) {
// FIXME: (DCEVM) ???
- if (m != m->newest_version()) {
+ if (AllowEnhancedClassRedefinition && m != m->newest_version()) {
m = m->newest_version();
}
ClassLoaderData* cld = loader_data;
diff --git a/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp b/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp
index 1c7677f270f..6c12ee64a6e 100644
--- a/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp
+++ b/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp
@@ -75,7 +75,7 @@ public:
// the new version (SystemDictionary stores only new versions). But the LoadedClassesClosure's functionality was
// changed in java8 where jvmtiLoadedClasses collects all classes from all classloaders, therefore we
// must use new versions only.
- if (k->new_version()==NULL) {
+ if (AllowEnhancedClassRedefinition && k->new_version()==NULL) {
_classStack.push((jclass) _env->jni_reference(Handle(_cur_thread, k->java_mirror())));
if (_dictionary_walk) {
// Collect array classes this way when walking the dictionary (because array classes are
diff --git a/src/hotspot/share/runtime/reflection.cpp b/src/hotspot/share/runtime/reflection.cpp
index 0e7722dba7d..d67457f02ac 100644
--- a/src/hotspot/share/runtime/reflection.cpp
+++ b/src/hotspot/share/runtime/reflection.cpp
@@ -628,7 +628,7 @@ bool Reflection::verify_member_access(const Klass* current_class,
TRAPS) {
// (DCEVM) Decide accessibility based on active version
- if (current_class != NULL) {
+ if (AllowEnhancedClassRedefinition && current_class != NULL) {
current_class = current_class->active_version();
}
--
2.23.0

View File

@@ -0,0 +1,26 @@
From dc675de6ac42819b8536827ea450fcad13a97448 Mon Sep 17 00:00:00 2001
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
Date: Wed, 11 Nov 2020 18:45:15 +0100
Subject: [PATCH 16/34] Fix LoadedClassesClosure - fixes problems with remote
debugging
---
src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp b/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp
index 6c12ee64a6e..2a469555dbd 100644
--- a/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp
+++ b/src/hotspot/share/prims/jvmtiGetLoadedClasses.cpp
@@ -75,7 +75,7 @@ public:
// the new version (SystemDictionary stores only new versions). But the LoadedClassesClosure's functionality was
// changed in java8 where jvmtiLoadedClasses collects all classes from all classloaders, therefore we
// must use new versions only.
- if (AllowEnhancedClassRedefinition && k->new_version()==NULL) {
+ if (!AllowEnhancedClassRedefinition || k->new_version()==NULL) {
_classStack.push((jclass) _env->jni_reference(Handle(_cur_thread, k->java_mirror())));
if (_dictionary_walk) {
// Collect array classes this way when walking the dictionary (because array classes are
--
2.23.0

View File

@@ -0,0 +1,183 @@
From 1d682efa88c716e1849163d5abff3a3367581d16 Mon Sep 17 00:00:00 2001
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
Date: Mon, 16 Nov 2020 21:11:19 +0100
Subject: [PATCH 18/34] pre dcevm15 - fix GC spaces originally in removed CMS
patch
---
src/hotspot/share/gc/shared/space.cpp | 16 ++++++++--------
src/hotspot/share/gc/shared/space.hpp | 6 +++---
src/hotspot/share/gc/shared/space.inline.hpp | 14 ++++++++------
.../share/prims/jvmtiEnhancedRedefineClasses.cpp | 6 ++----
4 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/src/hotspot/share/gc/shared/space.cpp b/src/hotspot/share/gc/shared/space.cpp
index 875a6dc854f..9772c32c42e 100644
--- a/src/hotspot/share/gc/shared/space.cpp
+++ b/src/hotspot/share/gc/shared/space.cpp
@@ -375,11 +375,11 @@ HeapWord* CompactibleSpace::forward_compact_top(size_t size, CompactPoint* cp, H
}
HeapWord* CompactibleSpace::forward(oop q, size_t size,
- CompactPoint* cp, HeapWord* compact_top) {
+ CompactPoint* cp, HeapWord* compact_top, bool force_forward) {
compact_top = forward_compact_top(size, cp, compact_top);
// store the forwarding pointer into the mark word
- if (cast_from_oop<HeapWord*>(q) != compact_top || (size_t)q->size() != size) {
+ if (force_forward || cast_from_oop<HeapWord*>(q) != compact_top || (size_t)q->size() != size) {
q->forward_to(oop(compact_top));
assert(q->is_gc_marked(), "encoding the pointer should preserve the mark");
} else {
@@ -501,7 +501,7 @@ bool CompactibleSpace::must_rescue(oop old_obj, oop new_obj) {
} else {
assert(space_index(old_obj) != space_index(new_obj), "old_obj and new_obj must be in different spaces");
- if (tenured_gen->is_in_reserved(new_obj)) {
+ if (new_in_tenured) {
// Must never rescue when moving from the new into the old generation.
assert(GenCollectedHeap::heap()->young_gen()->is_in_reserved(old_obj), "old_obj must be in DefNewGeneration");
assert(space_index(old_obj) > space_index(new_obj), "must be");
@@ -824,14 +824,14 @@ void OffsetTableContigSpace::verify() const {
// Compute the forward sizes and leave out objects whose position could
// possibly overlap other objects.
HeapWord* CompactibleSpace::forward_with_rescue(HeapWord* q, size_t size,
- CompactPoint* cp, HeapWord* compact_top) {
+ CompactPoint* cp, HeapWord* compact_top, bool force_forward) {
size_t forward_size = size;
// (DCEVM) There is a new version of the class of q => different size
if (oop(q)->klass()->new_version() != NULL) {
size_t new_size = oop(q)->size_given_klass(oop(q)->klass()->new_version());
- assert(size != new_size, "instances without changed size have to be updated prior to GC run");
+ // assert(size != new_size, "instances without changed size have to be updated prior to GC run");
forward_size = new_size;
}
@@ -845,7 +845,7 @@ HeapWord* CompactibleSpace::forward_with_rescue(HeapWord* q, size_t size,
return compact_top;
}
- return forward(oop(q), forward_size, cp, compact_top);
+ return forward(oop(q), forward_size, cp, compact_top, force_forward);
}
// Compute the forwarding addresses for the objects that need to be rescued.
@@ -861,11 +861,11 @@ HeapWord* CompactibleSpace::forward_rescued(CompactPoint* cp, HeapWord* compact_
// (DCEVM) There is a new version of the class of q => different size
if (oop(q)->klass()->new_version() != NULL) {
size_t new_size = oop(q)->size_given_klass(oop(q)->klass()->new_version());
- assert(size != new_size, "instances without changed size have to be updated prior to GC run");
+ // assert(size != new_size, "instances without changed size have to be updated prior to GC run");
size = new_size;
}
- compact_top = cp->space->forward(oop(q), size, cp, compact_top);
+ compact_top = cp->space->forward(oop(q), size, cp, compact_top, true);
assert(compact_top <= end(), "must not write over end of space!");
}
MarkSweep::_rescued_oops->clear();
diff --git a/src/hotspot/share/gc/shared/space.hpp b/src/hotspot/share/gc/shared/space.hpp
index c9bfc365f0f..f7648995454 100644
--- a/src/hotspot/share/gc/shared/space.hpp
+++ b/src/hotspot/share/gc/shared/space.hpp
@@ -405,7 +405,7 @@ public:
virtual void prepare_for_compaction(CompactPoint* cp) = 0;
// MarkSweep support phase3
DEBUG_ONLY(int space_index(oop obj));
- bool must_rescue(oop old_obj, oop new_obj);
+ virtual bool must_rescue(oop old_obj, oop new_obj);
HeapWord* rescue(HeapWord* old_obj);
virtual void adjust_pointers();
// MarkSweep support phase4
@@ -436,11 +436,11 @@ public:
// function of the then-current compaction space, and updates "cp->threshold
// accordingly".
virtual HeapWord* forward(oop q, size_t size, CompactPoint* cp,
- HeapWord* compact_top);
+ HeapWord* compact_top, bool force_forward);
// (DCEVM) same as forwad, but can rescue objects. Invoked only during
// redefinition runs
HeapWord* forward_with_rescue(HeapWord* q, size_t size, CompactPoint* cp,
- HeapWord* compact_top);
+ HeapWord* compact_top, bool force_forward);
HeapWord* forward_rescued(CompactPoint* cp, HeapWord* compact_top);
diff --git a/src/hotspot/share/gc/shared/space.inline.hpp b/src/hotspot/share/gc/shared/space.inline.hpp
index 5a93e93471b..fa645423685 100644
--- a/src/hotspot/share/gc/shared/space.inline.hpp
+++ b/src/hotspot/share/gc/shared/space.inline.hpp
@@ -163,6 +163,8 @@ inline void CompactibleSpace::scan_and_forward(SpaceType* space, CompactPoint* c
HeapWord* cur_obj = space->bottom();
HeapWord* scan_limit = space->scan_limit();
+ bool force_forward = false;
+
while (cur_obj < scan_limit) {
assert(!space->scanned_block_is_obj(cur_obj) ||
oop(cur_obj)->mark_raw().is_marked() || oop(cur_obj)->mark_raw().is_unlocked() ||
@@ -174,14 +176,15 @@ inline void CompactibleSpace::scan_and_forward(SpaceType* space, CompactPoint* c
size_t size = space->scanned_block_size(cur_obj);
if (redefinition_run) {
- compact_top = cp->space->forward_with_rescue(cur_obj, size, cp, compact_top);
+ compact_top = cp->space->forward_with_rescue(cur_obj, size, cp, compact_top, force_forward);
if (first_dead == NULL && oop(cur_obj)->is_gc_marked()) {
/* Was moved (otherwise, forward would reset mark),
set first_dead to here */
first_dead = cur_obj;
+ force_forward = true;
}
} else {
- compact_top = cp->space->forward(oop(cur_obj), size, cp, compact_top);
+ compact_top = cp->space->forward(oop(cur_obj), size, cp, compact_top, false);
}
cur_obj += size;
@@ -197,9 +200,9 @@ inline void CompactibleSpace::scan_and_forward(SpaceType* space, CompactPoint* c
// see if we might want to pretend this object is alive so that
// we don't have to compact quite as often.
- if (cur_obj == compact_top && dead_spacer.insert_deadspace(cur_obj, end)) {
+ if (!redefinition_run && cur_obj == compact_top && dead_spacer.insert_deadspace(cur_obj, end)) {
oop obj = oop(cur_obj);
- compact_top = cp->space->forward(obj, obj->size(), cp, compact_top);
+ compact_top = cp->space->forward(obj, obj->size(), cp, compact_top, force_forward);
end_of_live = end;
} else {
// otherwise, it really is a free region.
@@ -362,8 +365,7 @@ inline void CompactibleSpace::scan_and_compact(SpaceType* space, bool redefiniti
Prefetch::write(compaction_top, copy_interval);
// copy object and reinit its mark
- assert(cur_obj != compaction_top || oop(cur_obj)->klass()->new_version() != NULL,
- "everything in this pass should be moving");
+ assert(redefinition_run || cur_obj != compaction_top, "everything in this pass should be moving");
if (redefinition_run && oop(cur_obj)->klass()->new_version() != NULL) {
Klass* new_version = oop(cur_obj)->klass()->new_version();
if (new_version->update_information() == NULL) {
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
index 718426f2819..1da6661dd3e 100644
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
@@ -431,13 +431,11 @@ public:
Klass* new_klass = obj->klass()->new_version();
if (new_klass->update_information() != NULL) {
- int size_diff = obj->size() - obj->size_given_klass(new_klass);
-
- // Either new size is bigger or gap is to small to be filled
- if (size_diff < 0 || (size_diff > 0 && (size_t) size_diff < CollectedHeap::min_fill_size())) {
+ if (obj->size() - obj->size_given_klass(new_klass) != 0) {
// We need an instance update => set back to old klass
_needs_instance_update = true;
} else {
+ // Either new size is bigger or gap is to small to be filled
oop src = obj;
if (new_klass->is_copying_backwards()) {
copy_to_tmp(obj);
--
2.23.0

View File

@@ -0,0 +1,942 @@
From 297f564f6af79fb824f5b4e9119f1d3d0c827fb0 Mon Sep 17 00:00:00 2001
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
Date: Mon, 16 Nov 2020 20:20:12 +0100
Subject: [PATCH 19/34] dcevm15 - fix java15 patch compilation issues
---
.../share/classfile/classFileParser.hpp | 8 +-
.../share/classfile/classLoaderData.cpp | 2 +-
src/hotspot/share/classfile/dictionary.hpp | 10 +-
src/hotspot/share/classfile/javaClasses.hpp | 2 +
.../share/gc/g1/g1FullGCCompactTask.cpp | 4 +-
.../share/gc/g1/g1FullGCCompactionPoint.cpp | 8 +-
.../share/gc/g1/g1FullGCPrepareTask.cpp | 4 +-
src/hotspot/share/gc/shared/dcevmSharedGC.cpp | 14 +-
src/hotspot/share/gc/shared/dcevmSharedGC.hpp | 2 +-
src/hotspot/share/gc/shared/gcConfig.cpp | 2 +-
src/hotspot/share/gc/shared/space.cpp | 4 +-
.../share/interpreter/linkResolver.cpp | 2 +-
src/hotspot/share/oops/instanceKlass.cpp | 17 ++-
src/hotspot/share/oops/instanceKlass.hpp | 1 +
src/hotspot/share/oops/klass.cpp | 8 +-
src/hotspot/share/prims/jvm.cpp | 2 +
.../prims/jvmtiEnhancedRedefineClasses.cpp | 129 +++++++++---------
.../prims/jvmtiEnhancedRedefineClasses.hpp | 14 +-
src/hotspot/share/prims/jvmtiEnv.cpp | 11 +-
.../share/prims/jvmtiRedefineClasses.cpp | 1 +
src/hotspot/share/prims/methodHandles.hpp | 3 +
src/hotspot/share/runtime/arguments.cpp | 22 +--
src/hotspot/share/runtime/mutexLocker.cpp | 2 +-
23 files changed, 159 insertions(+), 113 deletions(-)
diff --git a/src/hotspot/share/classfile/classFileParser.hpp b/src/hotspot/share/classfile/classFileParser.hpp
index e5761e61767..0d266b9047e 100644
--- a/src/hotspot/share/classfile/classFileParser.hpp
+++ b/src/hotspot/share/classfile/classFileParser.hpp
@@ -150,9 +150,6 @@ class ClassFileParser {
const intArray* _method_ordering;
GrowableArray<Method*>* _all_mirandas;
- // Enhanced class redefinition
- const bool _pick_newest;
-
enum { fixed_buffer_size = 128 };
u_char _linenumbertable_buffer[fixed_buffer_size];
@@ -206,6 +203,9 @@ class ClassFileParser {
bool _has_vanilla_constructor;
int _max_bootstrap_specifier_index; // detects BSS values
+ // (DCEVM) Enhanced class redefinition
+ const bool _pick_newest;
+
void parse_stream(const ClassFileStream* const stream, TRAPS);
void mangle_hidden_class_name(InstanceKlass* const ik);
@@ -582,7 +582,7 @@ class ClassFileParser {
ClassLoaderData* loader_data() const { return _loader_data; }
const Symbol* class_name() const { return _class_name; }
const InstanceKlass* super_klass() const { return _super_klass; }
- Array<Klass*>* local_interfaces() const { return _local_interfaces; }
+ Array<InstanceKlass*>* local_interfaces() const { return _local_interfaces; }
ReferenceType reference_type() const { return _rt; }
AccessFlags access_flags() const { return _access_flags; }
diff --git a/src/hotspot/share/classfile/classLoaderData.cpp b/src/hotspot/share/classfile/classLoaderData.cpp
index 4d64c6b454a..aadcd50ef4a 100644
--- a/src/hotspot/share/classfile/classLoaderData.cpp
+++ b/src/hotspot/share/classfile/classLoaderData.cpp
@@ -597,7 +597,7 @@ void ClassLoaderData::exchange_holders(ClassLoaderData* cld) {
oop holder_oop = _holder.peek();
_holder.replace(cld->_holder.peek());
cld->_holder.replace(holder_oop);
- WeakHandle<vm_class_loader_data> exchange = _holder;
+ WeakHandle<vm_weak_data> exchange = _holder;
_holder = cld->_holder;
cld->_holder = exchange;
}
diff --git a/src/hotspot/share/classfile/dictionary.hpp b/src/hotspot/share/classfile/dictionary.hpp
index 114a983e783..a50f4ff84d2 100644
--- a/src/hotspot/share/classfile/dictionary.hpp
+++ b/src/hotspot/share/classfile/dictionary.hpp
@@ -84,6 +84,11 @@ public:
void print_on(outputStream* st) const;
void verify();
+ // (DCEVM) Enhanced class redefinition
+ bool update_klass(unsigned int hash, Symbol* name, ClassLoaderData* loader_data, InstanceKlass* k, InstanceKlass* old_klass);
+
+ void rollback_redefinition();
+
private:
DictionaryEntry* new_entry(unsigned int hash, InstanceKlass* klass);
@@ -106,11 +111,6 @@ public:
void free_entry(DictionaryEntry* entry);
- // Enhanced class redefinition
- bool update_klass(unsigned int hash, Symbol* name, ClassLoaderData* loader_data, InstanceKlass* k, InstanceKlass* old_klass);
-
- void rollback_redefinition();
-
// (DCEVM) return old class if redefining in AllowEnhancedClassRedefinition, otherwise return "k"
static InstanceKlass* old_if_redefined(InstanceKlass* k) {
return (k != NULL && k->is_redefining()) ? ((InstanceKlass* )k->old_version()) : k;
diff --git a/src/hotspot/share/classfile/javaClasses.hpp b/src/hotspot/share/classfile/javaClasses.hpp
index a68c5139151..9abf2e1d105 100644
--- a/src/hotspot/share/classfile/javaClasses.hpp
+++ b/src/hotspot/share/classfile/javaClasses.hpp
@@ -255,7 +255,9 @@ class java_lang_Class : AllStatic {
static void set_init_lock(oop java_class, oop init_lock);
static void set_protection_domain(oop java_class, oop protection_domain);
static void set_class_loader(oop java_class, oop class_loader);
+ public: // DCEVM
static void set_component_mirror(oop java_class, oop comp_mirror);
+ private:
static void initialize_mirror_fields(Klass* k, Handle mirror, Handle protection_domain,
Handle classData, TRAPS);
static void initialize_mirror_fields(Klass* k, Handle mirror, Handle protection_domain, TRAPS);
diff --git a/src/hotspot/share/gc/g1/g1FullGCCompactTask.cpp b/src/hotspot/share/gc/g1/g1FullGCCompactTask.cpp
index f70f4606dc8..a22ed48560d 100644
--- a/src/hotspot/share/gc/g1/g1FullGCCompactTask.cpp
+++ b/src/hotspot/share/gc/g1/g1FullGCCompactTask.cpp
@@ -157,14 +157,14 @@ void G1FullGCCompactTask::serial_compaction_dcevm() {
size_t G1FullGCCompactTask::G1CompactRegionClosureDcevm::apply(oop obj) {
size_t size = obj->size();
- HeapWord* destination = (HeapWord*)obj->forwardee();
+ HeapWord* destination = cast_from_oop<HeapWord*>(obj->forwardee());
if (destination == NULL) {
// Object not moving
return size;
}
// copy object and reinit its mark
- HeapWord* obj_addr = (HeapWord*) obj;
+ HeapWord* obj_addr = cast_from_oop<HeapWord*>(obj);
if (!_rescue_oops_it->at_end() && **_rescue_oops_it == obj_addr) {
++(*_rescue_oops_it);
diff --git a/src/hotspot/share/gc/g1/g1FullGCCompactionPoint.cpp b/src/hotspot/share/gc/g1/g1FullGCCompactionPoint.cpp
index 1e49571c999..755935a2c91 100644
--- a/src/hotspot/share/gc/g1/g1FullGCCompactionPoint.cpp
+++ b/src/hotspot/share/gc/g1/g1FullGCCompactionPoint.cpp
@@ -174,7 +174,7 @@ void G1FullGCCompactionPoint::forward_dcevm(oop object, size_t size, bool force_
assert(_current_region != NULL, "Must have been initialized");
// Store a forwarding pointer if the object should be moved.
- if ((HeapWord*)object != _compaction_top || force_forward) {
+ if (cast_from_oop<HeapWord*>(object) != _compaction_top || force_forward) {
object->forward_to(oop(_compaction_top));
} else {
if (object->forwardee() != NULL) {
@@ -188,11 +188,11 @@ void G1FullGCCompactionPoint::forward_dcevm(oop object, size_t size, bool force_
} else {
// Make sure object has the correct mark-word set or that it will be
// fixed when restoring the preserved marks.
- assert(object->mark_raw() == markOopDesc::prototype_for_object(object) || // Correct mark
- object->mark_raw()->must_be_preserved(object) || // Will be restored by PreservedMarksSet
+ assert(object->mark_raw() == markWord::prototype_for_klass(object->klass()) || // Correct mark
+ object->mark_must_be_preserved() || // Will be restored by PreservedMarksSet
(UseBiasedLocking && object->has_bias_pattern_raw()), // Will be restored by BiasedLocking
"should have correct prototype obj: " PTR_FORMAT " mark: " PTR_FORMAT " prototype: " PTR_FORMAT,
- p2i(object), p2i(object->mark_raw()), p2i(markOopDesc::prototype_for_object(object)));
+ p2i(object), object->mark_raw().value(), markWord::prototype_for_klass(object->klass()).value());
}
assert(object->forwardee() == NULL, "should be forwarded to NULL");
}
diff --git a/src/hotspot/share/gc/g1/g1FullGCPrepareTask.cpp b/src/hotspot/share/gc/g1/g1FullGCPrepareTask.cpp
index a45681b60cf..2f06b9617e4 100644
--- a/src/hotspot/share/gc/g1/g1FullGCPrepareTask.cpp
+++ b/src/hotspot/share/gc/g1/g1FullGCPrepareTask.cpp
@@ -269,7 +269,7 @@ size_t G1FullGCPrepareTask::G1PrepareCompactLiveClosureDcevm::apply(oop object)
HeapWord* compact_top = _cp->forward_compact_top(forward_size);
if (compact_top == NULL || must_rescue(object, oop(compact_top))) {
- _cp->rescued_oops()->append((HeapWord*)object);
+ _cp->rescued_oops()->append(cast_from_oop<HeapWord*>(object));
} else {
_cp->forward_dcevm(object, forward_size, (size != forward_size));
}
@@ -295,7 +295,7 @@ bool G1FullGCPrepareTask::G1PrepareCompactLiveClosureDcevm::must_rescue(oop old_
int new_size = old_obj->size_given_klass(oop(old_obj)->klass()->new_version());
int original_size = old_obj->size();
- bool overlap = ((HeapWord*)old_obj + original_size < (HeapWord*)new_obj + new_size);
+ bool overlap = (cast_from_oop<HeapWord*>(old_obj) + original_size < cast_from_oop<HeapWord*>(new_obj) + new_size);
return overlap;
}
diff --git a/src/hotspot/share/gc/shared/dcevmSharedGC.cpp b/src/hotspot/share/gc/shared/dcevmSharedGC.cpp
index 803e645f843..3dee097f1d3 100644
--- a/src/hotspot/share/gc/shared/dcevmSharedGC.cpp
+++ b/src/hotspot/share/gc/shared/dcevmSharedGC.cpp
@@ -58,10 +58,10 @@ void DcevmSharedGC::copy_rescued_objects_back(GrowableArray<HeapWord*>* rescued_
DcevmSharedGC::update_fields(rescued_obj, new_obj);
} else {
rescued_obj->set_klass(new_klass);
- Copy::aligned_disjoint_words((HeapWord*)rescued_obj, (HeapWord*)new_obj, size);
+ Copy::aligned_disjoint_words(cast_from_oop<HeapWord*>(rescued_obj), cast_from_oop<HeapWord*>(new_obj), size);
}
} else {
- Copy::aligned_disjoint_words((HeapWord*)rescued_obj, (HeapWord*)new_obj, size);
+ Copy::aligned_disjoint_words(cast_from_oop<HeapWord*>(rescued_obj), cast_from_oop<HeapWord*>(new_obj), size);
}
new_obj->init_mark_raw();
@@ -111,11 +111,11 @@ void DcevmSharedGC::update_fields(oop q, oop new_location) {
// Save object somewhere, there is an overlap in fields
if (new_klass_oop->is_copying_backwards()) {
- if (((HeapWord *)q >= (HeapWord *)new_location && (HeapWord *)q < (HeapWord *)new_location + new_size) ||
- ((HeapWord *)new_location >= (HeapWord *)q && (HeapWord *)new_location < (HeapWord *)q + size)) {
+ if ((cast_from_oop<HeapWord*>(q) >= cast_from_oop<HeapWord*>(new_location) && cast_from_oop<HeapWord*>(q) < cast_from_oop<HeapWord*>(new_location) + new_size) ||
+ (cast_from_oop<HeapWord*>(new_location) >= cast_from_oop<HeapWord*>(q) && cast_from_oop<HeapWord*>(new_location) < cast_from_oop<HeapWord*>(q) + size)) {
tmp = NEW_RESOURCE_ARRAY(HeapWord, size);
q = (oop) tmp;
- Copy::aligned_disjoint_words((HeapWord*)tmp_obj, (HeapWord*)q, size);
+ Copy::aligned_disjoint_words(cast_from_oop<HeapWord*>(tmp_obj), cast_from_oop<HeapWord*>(q), size);
}
}
@@ -131,13 +131,13 @@ void DcevmSharedGC::update_fields(oop q, oop new_location) {
void DcevmSharedGC::update_fields(oop new_location, oop tmp_obj, int *cur) {
assert(cur != NULL, "just checking");
- char* to = (char*)(HeapWord*)new_location;
+ char* to = (char*)cast_from_oop<HeapWord*>(new_location);
while (*cur != 0) {
int size = *cur;
if (size > 0) {
cur++;
int offset = *cur;
- HeapWord* from = (HeapWord*)(((char *)(HeapWord*)tmp_obj) + offset);
+ HeapWord* from = (HeapWord*)(((char *)cast_from_oop<HeapWord*>(tmp_obj)) + offset);
if (size == HeapWordSize) {
*((HeapWord*)to) = *from;
} else if (size == HeapWordSize * 2) {
diff --git a/src/hotspot/share/gc/shared/dcevmSharedGC.hpp b/src/hotspot/share/gc/shared/dcevmSharedGC.hpp
index e2ef0171fb2..a4e27e00280 100644
--- a/src/hotspot/share/gc/shared/dcevmSharedGC.hpp
+++ b/src/hotspot/share/gc/shared/dcevmSharedGC.hpp
@@ -29,7 +29,7 @@
#include "gc/shared/genOopClosures.hpp"
#include "gc/shared/taskqueue.hpp"
#include "memory/iterator.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
#include "oops/oop.hpp"
#include "runtime/timer.hpp"
#include "utilities/growableArray.hpp"
diff --git a/src/hotspot/share/gc/shared/gcConfig.cpp b/src/hotspot/share/gc/shared/gcConfig.cpp
index f01d64d1434..5c1a09390f1 100644
--- a/src/hotspot/share/gc/shared/gcConfig.cpp
+++ b/src/hotspot/share/gc/shared/gcConfig.cpp
@@ -100,7 +100,7 @@ void GCConfig::fail_if_non_included_gc_is_selected() {
void GCConfig::select_gc_ergonomically() {
if (AllowEnhancedClassRedefinition && !UseG1GC) {
// Enhanced class redefinition only supports serial GC at the moment
- FLAG_SET_ERGO(bool, UseSerialGC, true);
+ FLAG_SET_ERGO(UseSerialGC, true);
} else if (os::is_server_class_machine()) {
#if INCLUDE_G1GC
FLAG_SET_ERGO_IF_DEFAULT(UseG1GC, true);
diff --git a/src/hotspot/share/gc/shared/space.cpp b/src/hotspot/share/gc/shared/space.cpp
index 9772c32c42e..e8e3d7884c2 100644
--- a/src/hotspot/share/gc/shared/space.cpp
+++ b/src/hotspot/share/gc/shared/space.cpp
@@ -440,7 +440,7 @@ int CompactibleSpace::space_index(oop obj) {
index++;
}
- tty->print_cr("could not compute space_index for %08xh", (HeapWord*)obj);
+ tty->print_cr("could not compute space_index for %08xh", cast_from_oop<HeapWord*>(obj));
index = 0;
Generation* gen = heap->old_gen();
@@ -485,7 +485,7 @@ bool CompactibleSpace::must_rescue(oop old_obj, oop new_obj) {
bool new_in_tenured = tenured_gen->is_in_reserved(new_obj);
if (old_in_tenured == new_in_tenured) {
// Rescue if object may overlap with a higher memory address.
- bool overlap = ((HeapWord*)old_obj + original_size < (HeapWord*)new_obj + new_size);
+ bool overlap = (cast_from_oop<HeapWord*>(old_obj) + original_size < cast_from_oop<HeapWord*>(new_obj) + new_size);
if (old_in_tenured) {
// Old and new address are in same space, so just compare the address.
// Must rescue if object moves towards the top of the space.
diff --git a/src/hotspot/share/interpreter/linkResolver.cpp b/src/hotspot/share/interpreter/linkResolver.cpp
index b2f24ddbeda..9daeeb70b34 100644
--- a/src/hotspot/share/interpreter/linkResolver.cpp
+++ b/src/hotspot/share/interpreter/linkResolver.cpp
@@ -1031,7 +1031,7 @@ void LinkResolver::resolve_field(fieldDescriptor& fd,
assert(m != NULL, "information about the current method must be available for 'put' bytecodes");
bool is_initialized_static_final_update = (byte == Bytecodes::_putstatic &&
fd.is_static() &&
- !(m()->is_static_initializer() || m()->name() == vmSymbols::ha_class_initializer_name()));
+ !(m->is_static_initializer() || m->name() == vmSymbols::ha_class_initializer_name()));
bool is_initialized_instance_final_update = ((byte == Bytecodes::_putfield || byte == Bytecodes::_nofast_putfield) &&
!fd.is_static() &&
!m->is_object_initializer());
diff --git a/src/hotspot/share/oops/instanceKlass.cpp b/src/hotspot/share/oops/instanceKlass.cpp
index f8e60941046..5e40d78a87e 100644
--- a/src/hotspot/share/oops/instanceKlass.cpp
+++ b/src/hotspot/share/oops/instanceKlass.cpp
@@ -1316,7 +1316,7 @@ void InstanceKlass::init_implementor() {
// (DCEVM) - init_implementor() for dcevm
void InstanceKlass::init_implementor_from_redefine() {
assert(is_interface(), "not interface");
- Klass** addr = adr_implementor();
+ Klass* volatile* addr = adr_implementor();
assert(addr != NULL, "null addr");
if (addr != NULL) {
*addr = NULL;
@@ -1659,6 +1659,21 @@ void InstanceKlass::methods_do(void f(Method* method)) {
}
}
+void InstanceKlass::methods_do(void f(Method* method, TRAPS), TRAPS) {
+ // Methods aren't stable until they are loaded. This can be read outside
+ // a lock through the ClassLoaderData for profiling
+ if (!is_loaded()) {
+ return;
+ }
+
+ int len = methods()->length();
+ for (int index = 0; index < len; index++) {
+ Method* m = methods()->at(index);
+ assert(m->is_method(), "must be method");
+ f(m, CHECK);
+ }
+}
+
// (DCEVM) Update information contains mapping of fields from old class to the new class.
// Info is stored on HEAP, you need to call clear_update_information to free the space.
void InstanceKlass::store_update_information(GrowableArray<int> &values) {
diff --git a/src/hotspot/share/oops/instanceKlass.hpp b/src/hotspot/share/oops/instanceKlass.hpp
index 6ead9426728..b56d42cb177 100644
--- a/src/hotspot/share/oops/instanceKlass.hpp
+++ b/src/hotspot/share/oops/instanceKlass.hpp
@@ -1069,6 +1069,7 @@ public:
void clear_update_information();
void methods_do(void f(Method* method));
+ void methods_do(void f(Method* method, TRAPS), TRAPS);
void array_klasses_do(void f(Klass* k));
void array_klasses_do(void f(Klass* k, TRAPS), TRAPS);
diff --git a/src/hotspot/share/oops/klass.cpp b/src/hotspot/share/oops/klass.cpp
index 352d8f84631..88f5ec9ba4a 100644
--- a/src/hotspot/share/oops/klass.cpp
+++ b/src/hotspot/share/oops/klass.cpp
@@ -200,13 +200,13 @@ void* Klass::operator new(size_t size, ClassLoaderData* loader_data, size_t word
Klass::Klass(KlassID id) : _id(id),
_java_mirror(NULL),
_prototype_header(markWord::prototype()),
- _shared_class_path_index(-1),
- _new_version(NULL),
_old_version(NULL),
+ _new_version(NULL),
+ _redefinition_flags(Klass::NoRedefinition),
_is_redefining(false),
+ _update_information(NULL),
_is_copying_backwards(false),
- _redefinition_flags(Klass::NoRedefinition),
- _update_information(NULL) {
+ _shared_class_path_index(-1) {
CDS_ONLY(_shared_class_flags = 0;)
CDS_JAVA_HEAP_ONLY(_archived_mirror = 0;)
_primary_supers[0] = this;
diff --git a/src/hotspot/share/prims/jvm.cpp b/src/hotspot/share/prims/jvm.cpp
index 333b65ccfc1..13bcac352fb 100644
--- a/src/hotspot/share/prims/jvm.cpp
+++ b/src/hotspot/share/prims/jvm.cpp
@@ -1054,6 +1054,7 @@ static jclass jvm_lookup_define_class(JNIEnv *env, jclass lookup, const char *na
class_loader,
protection_domain,
&st,
+ NULL,
CHECK_NULL);
if (log_is_enabled(Debug, class, resolve) && defined_k != NULL) {
@@ -1074,6 +1075,7 @@ static jclass jvm_lookup_define_class(JNIEnv *env, jclass lookup, const char *na
class_loader,
&st,
cl_info,
+ NULL,
CHECK_NULL);
if (defined_k == NULL) {
THROW_MSG_0(vmSymbols::java_lang_Error(), "Failure to define a hidden class");
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
index 1da6661dd3e..619e3988e3a 100644
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
@@ -24,11 +24,14 @@
#include "precompiled.hpp"
#include "aot/aotLoader.hpp"
+#include "classfile/classFileParser.hpp"
#include "classfile/classFileStream.hpp"
#include "classfile/metadataOnStackMark.hpp"
#include "classfile/systemDictionary.hpp"
#include "classfile/verifier.hpp"
#include "classfile/dictionary.hpp"
+#include "classfile/classLoaderDataGraph.hpp"
+#include "interpreter/linkResolver.hpp"
#include "interpreter/oopMapCache.hpp"
#include "interpreter/rewriter.hpp"
#include "logging/logStream.hpp"
@@ -37,17 +40,22 @@
#include "memory/resourceArea.hpp"
#include "memory/iterator.inline.hpp"
#include "oops/fieldStreams.hpp"
+#include "oops/fieldStreams.inline.hpp"
#include "oops/klassVtable.hpp"
#include "oops/oop.inline.hpp"
#include "oops/constantPool.inline.hpp"
+#include "oops/metadata.hpp"
+#include "oops/methodData.hpp"
#include "prims/jvmtiImpl.hpp"
#include "prims/jvmtiClassFileReconstituter.hpp"
#include "prims/jvmtiEnhancedRedefineClasses.hpp"
#include "prims/methodComparator.hpp"
#include "prims/resolvedMethodTable.hpp"
+#include "prims/methodHandles.hpp"
#include "runtime/deoptimization.hpp"
#include "runtime/jniHandles.inline.hpp"
#include "runtime/relocator.hpp"
+#include "runtime/fieldDescriptor.hpp"
#include "runtime/fieldDescriptor.inline.hpp"
#include "utilities/bitMap.inline.hpp"
#include "prims/jvmtiThreadState.inline.hpp"
@@ -55,6 +63,8 @@
#include "oops/constantPool.inline.hpp"
#include "gc/g1/g1CollectedHeap.hpp"
#include "gc/shared/dcevmSharedGC.hpp"
+#include "gc/shared/scavengableNMethods.hpp"
+#include "ci/ciObjectFactory.hpp"
Array<Method*>* VM_EnhancedRedefineClasses::_old_methods = NULL;
Array<Method*>* VM_EnhancedRedefineClasses::_new_methods = NULL;
@@ -66,6 +76,7 @@ int VM_EnhancedRedefineClasses::_matching_methods_length = 0;
int VM_EnhancedRedefineClasses::_deleted_methods_length = 0;
int VM_EnhancedRedefineClasses::_added_methods_length = 0;
Klass* VM_EnhancedRedefineClasses::_the_class_oop = NULL;
+u8 VM_EnhancedRedefineClasses::_id_counter = 0;
//
// Create new instance of enhanced class redefiner.
@@ -88,6 +99,7 @@ VM_EnhancedRedefineClasses::VM_EnhancedRedefineClasses(jint class_count, const j
_class_load_kind = class_load_kind;
_res = JVMTI_ERROR_NONE;
_any_class_has_resolved_methods = false;
+ _id = next_id();
}
static inline InstanceKlass* get_ik(jclass def) {
@@ -211,9 +223,7 @@ class FieldCopier : public FieldClosure {
// TODO: review...
void VM_EnhancedRedefineClasses::mark_as_scavengable(nmethod* nm) {
- if (!nm->on_scavenge_root_list()) {
- CodeCache::add_scavenge_root_nmethod(nm);
- }
+ ScavengableNMethods::register_nmethod(nm);
}
void VM_EnhancedRedefineClasses::unregister_nmethod_g1(nmethod* nm) {
@@ -414,7 +424,7 @@ public:
_tmp_obj_size = size;
_tmp_obj = (oop)resource_allocate_bytes(size * HeapWordSize);
}
- Copy::aligned_disjoint_words((HeapWord*)o, (HeapWord*)_tmp_obj, size);
+ Copy::aligned_disjoint_words(cast_from_oop<HeapWord*>(o), cast_from_oop<HeapWord*>(_tmp_obj), size);
}
virtual void do_object(oop obj) {
@@ -505,9 +515,6 @@ void VM_EnhancedRedefineClasses::doit() {
ClearCpoolCacheAndUnpatch clear_cpool_cache(thread);
ClassLoaderDataGraph::classes_do(&clear_cpool_cache);
-
- // SystemDictionary::methods_do(fix_invoke_method);
-
// JSR-292 support
if (_any_class_has_resolved_methods) {
bool trace_name_printed = false;
@@ -564,8 +571,8 @@ void VM_EnhancedRedefineClasses::doit() {
InstanceKlass* old = InstanceKlass::cast(cur->old_version());
// Swap marks to have same hashcodes
- markOop cur_mark = cur->prototype_header();
- markOop old_mark = old->prototype_header();
+ markWord cur_mark = cur->prototype_header();
+ markWord old_mark = old->prototype_header();
cur->set_prototype_header(old_mark);
old->set_prototype_header(cur_mark);
@@ -579,14 +586,14 @@ void VM_EnhancedRedefineClasses::doit() {
// Revert pool holder for old version of klass (it was updated by one of ours closure!)
old->constants()->set_pool_holder(old);
- Klass* array_klasses = old->array_klasses();
+ ObjArrayKlass* array_klasses = old->array_klasses();
if (array_klasses != NULL) {
assert(cur->array_klasses() == NULL, "just checking");
// Transfer the array classes, otherwise we might get cast exceptions when casting array types.
// Also, set array klasses element klass.
cur->set_array_klasses(array_klasses);
- ObjArrayKlass::cast(array_klasses)->set_element_klass(cur);
+ array_klasses->set_element_klass(cur);
java_lang_Class::release_set_array_klass(cur->java_mirror(), array_klasses);
java_lang_Class::set_component_mirror(array_klasses->java_mirror(), cur->java_mirror());
}
@@ -641,11 +648,15 @@ void VM_EnhancedRedefineClasses::doit() {
//ClassLoaderDataGraph::classes_do(&clean_weak_method_links);
// Disable any dependent concurrent compilations
- SystemDictionary::notice_modification();
+ // SystemDictionary::notice_modification();
+
+ JvmtiExport::increment_redefinition_count();
// Set flag indicating that some invariants are no longer true.
// See jvmtiExport.hpp for detailed explanation.
- JvmtiExport::set_has_redefined_a_class();
+
+ // dcevm15: handled by _redefinition_count
+ // JvmtiExport::set_has_redefined_a_class();
#ifdef PRODUCT
if (log_is_enabled(Trace, redefine, class, obsolete, metadata)) {
@@ -718,7 +729,7 @@ bool VM_EnhancedRedefineClasses::is_modifiable_class(oop klass_mirror) {
}
// Cannot redefine or retransform an anonymous class.
- if (InstanceKlass::cast(k)->is_anonymous()) {
+ if (InstanceKlass::cast(k)->is_unsafe_anonymous()) {
return false;
}
return true;
@@ -804,22 +815,30 @@ jvmtiError VM_EnhancedRedefineClasses::load_new_class_versions(TRAPS) {
InstanceKlass* k;
- if (InstanceKlass::cast(the_class)->is_anonymous()) {
- const InstanceKlass* host_class = the_class->host_klass();
+ if (InstanceKlass::cast(the_class)->is_unsafe_anonymous()) {
+ const InstanceKlass* host_class = the_class->unsafe_anonymous_host();
// Make sure it's the real host class, not another anonymous class.
- while (host_class != NULL && host_class->is_anonymous()) {
- host_class = host_class->host_klass();
+ while (host_class != NULL && host_class->is_unsafe_anonymous()) {
+ host_class = host_class->unsafe_anonymous_host();
}
+ ClassLoadInfo cl_info(protection_domain,
+ host_class,
+ NULL, // dynamic_nest_host
+ NULL, // cp_patches
+ Handle(), // classData
+ false, // is_hidden
+ false, // is_strong_hidden
+ true); // FIXME: check if correct. can_access_vm_annotations
+
k = SystemDictionary::parse_stream(the_class_sym,
the_class_loader,
- protection_domain,
&st,
- host_class,
+ cl_info,
the_class,
- NULL,
THREAD);
+
k->class_loader_data()->exchange_holders(the_class->class_loader_data());
the_class->class_loader_data()->inc_keep_alive();
} else {
@@ -966,7 +985,7 @@ int VM_EnhancedRedefineClasses::calculate_redefinition_flags(InstanceKlass* new_
// Check interfaces
// Interfaces removed?
- Array<Klass*>* old_interfaces = the_class->transitive_interfaces();
+ Array<InstanceKlass*>* old_interfaces = the_class->transitive_interfaces();
for (i = 0; i < old_interfaces->length(); i++) {
InstanceKlass* old_interface = InstanceKlass::cast(old_interfaces->at(i));
if (!new_class->implements_interface_any_version(old_interface)) {
@@ -976,7 +995,7 @@ int VM_EnhancedRedefineClasses::calculate_redefinition_flags(InstanceKlass* new_
}
// Interfaces added?
- Array<Klass*>* new_interfaces = new_class->transitive_interfaces();
+ Array<InstanceKlass*>* new_interfaces = new_class->transitive_interfaces();
for (i = 0; i<new_interfaces->length(); i++) {
if (!the_class->implements_interface_any_version(new_interfaces->at(i))) {
result = result | Klass::ModifyClass;
@@ -1389,8 +1408,8 @@ void VM_EnhancedRedefineClasses::rollback() {
// Rewrite faster byte-codes back to their slower equivalent. Undoes rewriting happening in templateTable_xxx.cpp
// The reason is that once we zero cpool caches, we need to re-resolve all entries again. Faster bytecodes do not
// do that, they assume that cache entry is resolved already.
-void VM_EnhancedRedefineClasses::unpatch_bytecode(Method* method) {
- RawBytecodeStream bcs(method);
+void VM_EnhancedRedefineClasses::unpatch_bytecode(Method* method, TRAPS) {
+ RawBytecodeStream bcs(methodHandle(THREAD, method));
Bytecodes::Code code;
Bytecodes::Code java_code;
while (!bcs.is_last_bytecode()) {
@@ -1454,11 +1473,11 @@ void VM_EnhancedRedefineClasses::ClearCpoolCacheAndUnpatch::do_klass(Klass* k) {
HandleMark hm(_thread);
InstanceKlass *ik = InstanceKlass::cast(k);
- constantPoolHandle other_cp = constantPoolHandle(ik->constants());
+ constantPoolHandle other_cp = constantPoolHandle(_thread, ik->constants());
// Update host klass of anonymous classes (for example, produced by lambdas) to newest version.
- if (ik->is_anonymous() && ik->host_klass()->new_version() != NULL) {
- ik->set_host_klass(InstanceKlass::cast(ik->host_klass()->newest_version()));
+ if (ik->is_unsafe_anonymous() && ik->unsafe_anonymous_host()->new_version() != NULL) {
+ ik->set_unsafe_anonymous_host(InstanceKlass::cast(ik->unsafe_anonymous_host()->newest_version()));
}
// Update implementor if there is only one, in this case implementor() can reference old class
@@ -1492,7 +1511,18 @@ void VM_EnhancedRedefineClasses::ClearCpoolCacheAndUnpatch::do_klass(Klass* k) {
// If bytecode rewriting is enabled, we also need to unpatch bytecode to force resolution of zeroed entries
if (RewriteBytecodes) {
- ik->methods_do(unpatch_bytecode);
+ ik->methods_do(unpatch_bytecode, _thread);
+ }
+}
+
+u8 VM_EnhancedRedefineClasses::next_id() {
+ while (true) {
+ u8 id = _id_counter;
+ u8 next_id = id + 1;
+ u8 result = Atomic::cmpxchg(&_id_counter, id, next_id);
+ if (result == id) {
+ return next_id;
+ }
}
}
@@ -1512,31 +1542,8 @@ void VM_EnhancedRedefineClasses::MethodDataCleaner::do_klass(Klass* k) {
}
}
-void VM_EnhancedRedefineClasses::fix_invoke_method(Method* method) {
-
- constantPoolHandle other_cp = constantPoolHandle(method->constants());
-
- for (int i = 0; i < other_cp->length(); i++) {
- if (other_cp->tag_at(i).is_klass()) {
- Klass* klass = other_cp->resolved_klass_at(i);
- if (klass->new_version() != NULL) {
- // Constant pool entry points to redefined class -- update to the new version
- other_cp->klass_at_put(i, klass->newest_version());
- }
- assert(other_cp->resolved_klass_at(i)->new_version() == NULL, "Must be new klass!");
- }
- }
-
- ConstantPoolCache* cp_cache = other_cp->cache();
- if (cp_cache != NULL) {
- cp_cache->clear_entries();
- }
-
-}
-
-
-void VM_EnhancedRedefineClasses::update_jmethod_ids() {
+void VM_EnhancedRedefineClasses::update_jmethod_ids(TRAPS) {
for (int j = 0; j < _matching_methods_length; ++j) {
Method* old_method = _matching_old_methods[j];
jmethodID jmid = old_method->find_jmethod_id_or_null();
@@ -1547,10 +1554,10 @@ void VM_EnhancedRedefineClasses::update_jmethod_ids() {
if (jmid != NULL) {
// There is a jmethodID, change it to point to the new method
- methodHandle new_method_h(_matching_new_methods[j]);
+ methodHandle new_method_h(THREAD, _matching_new_methods[j]);
if (old_method->new_version() == NULL) {
- methodHandle old_method_h(_matching_old_methods[j]);
+ methodHandle old_method_h(THREAD, _matching_old_methods[j]);
jmethodID new_jmethod_id = Method::make_jmethod_id(old_method_h->method_holder()->class_loader_data(), old_method_h());
bool result = InstanceKlass::cast(old_method_h->method_holder())->update_jmethod_id(old_method_h(), new_jmethod_id);
} else {
@@ -1887,7 +1894,7 @@ void VM_EnhancedRedefineClasses::redefine_single_class(InstanceKlass* new_class_
// track number of methods that are EMCP for add_previous_version() call below
check_methods_and_mark_as_obsolete();
- update_jmethod_ids();
+ update_jmethod_ids(THREAD);
_any_class_has_resolved_methods = the_class->has_resolved_methods() || _any_class_has_resolved_methods;
@@ -2119,12 +2126,12 @@ jvmtiError VM_EnhancedRedefineClasses::do_topological_class_sorting(TRAPS) {
Handle protection_domain(THREAD, klass->protection_domain());
+ ClassLoadInfo cl_info(protection_domain);
+
ClassFileParser parser(&st,
klass->name(),
klass->class_loader_data(),
- protection_domain,
- NULL, // host_klass
- NULL, // cp_patches
+ &cl_info,
ClassFileParser::INTERNAL, // publicity level
true,
THREAD);
@@ -2134,7 +2141,7 @@ jvmtiError VM_EnhancedRedefineClasses::do_topological_class_sorting(TRAPS) {
links.append(KlassPair(super_klass, klass));
}
- Array<Klass*>* local_interfaces = parser.local_interfaces();
+ Array<InstanceKlass*>* local_interfaces = parser.local_interfaces();
for (int j = 0; j < local_interfaces->length(); j++) {
Klass* iface = local_interfaces->at(j);
if (iface != NULL && _affected_klasses->contains(iface)) {
@@ -2157,7 +2164,7 @@ jvmtiError VM_EnhancedRedefineClasses::do_topological_class_sorting(TRAPS) {
links.append(KlassPair(super_klass, klass));
}
- Array<Klass*>* local_interfaces = klass->local_interfaces();
+ Array<InstanceKlass*>* local_interfaces = klass->local_interfaces();
for (int j = 0; j < local_interfaces->length(); j++) {
Klass* interfaceKlass = local_interfaces->at(j);
if (_affected_klasses->contains(interfaceKlass)) {
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
index 4c0412d343d..0066088b3b0 100644
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
@@ -32,7 +32,7 @@
#include "memory/resourceArea.hpp"
#include "oops/objArrayKlass.hpp"
#include "oops/objArrayOop.hpp"
-#include "gc/shared/vmGCOperations.hpp"
+#include "gc/shared/gcVMOperations.hpp"
#include "../../../java.base/unix/native/include/jni_md.h"
//
@@ -59,6 +59,7 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
static int _deleted_methods_length;
static int _added_methods_length;
static Klass* _the_class_oop;
+ static u8 _id_counter;
// The instance fields are used to pass information from
// doit_prologue() to doit() and doit_epilogue().
@@ -91,6 +92,9 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
elapsedTimer _timer_heap_iterate;
elapsedTimer _timer_heap_full_gc;
+ // Redefinition id used by JFR
+ u8 _id;
+
// These routines are roughly in call order unless otherwise noted.
// Load and link new classes (either redefined or affected by redefinition - subclass, ...)
@@ -118,15 +122,14 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
static void mark_as_scavengable(nmethod* nm);
static void unregister_nmethod_g1(nmethod* nm);
static void register_nmethod_g1(nmethod* nm);
- static void unpatch_bytecode(Method* method);
- static void fix_invoke_method(Method* method);
+ static void unpatch_bytecode(Method* method, TRAPS);
// Figure out which new methods match old methods in name and signature,
// which methods have been added, and which are no longer present
void compute_added_deleted_matching_methods();
// Change jmethodIDs to point to the new methods
- void update_jmethod_ids();
+ void update_jmethod_ids(TRAPS);
// marking methods as old and/or obsolete
void check_methods_and_mark_as_obsolete();
@@ -141,6 +144,8 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
void flush_dependent_code(InstanceKlass* k_h, TRAPS);
+ u8 next_id();
+
static void check_class(InstanceKlass* k_oop, TRAPS);
static void dump_methods();
@@ -181,6 +186,7 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
bool allow_nested_vm_operations() const { return true; }
jvmtiError check_error() { return _res; }
+ u8 id() { return _id; }
// Modifiable test must be shared between IsModifiableClass query
// and redefine implementation
diff --git a/src/hotspot/share/prims/jvmtiEnv.cpp b/src/hotspot/share/prims/jvmtiEnv.cpp
index b6838ac034d..fba0f48abd7 100644
--- a/src/hotspot/share/prims/jvmtiEnv.cpp
+++ b/src/hotspot/share/prims/jvmtiEnv.cpp
@@ -456,20 +456,23 @@ JvmtiEnv::RetransformClasses(jint class_count, const jclass* classes) {
EventRetransformClasses event;
jvmtiError error;
+ u8 op_id;
if (AllowEnhancedClassRedefinition) {
MutexLocker sd_mutex(EnhancedRedefineClasses_lock);
VM_EnhancedRedefineClasses op(class_count, class_definitions, jvmti_class_load_kind_retransform);
VMThread::execute(&op);
+ op_id = op.id();
error = (op.check_error());
} else {
VM_RedefineClasses op(class_count, class_definitions, jvmti_class_load_kind_retransform);
VMThread::execute(&op);
+ op_id = op.id();
error = op.check_error();
}
if (error == JVMTI_ERROR_NONE) {
event.set_classCount(class_count);
- event.set_redefinitionId(op.id());
+ event.set_redefinitionId(op_id);
event.commit();
}
return error;
@@ -484,19 +487,23 @@ JvmtiEnv::RedefineClasses(jint class_count, const jvmtiClassDefinition* class_de
EventRedefineClasses event;
jvmtiError error;
+ u8 op_id;
+
if (AllowEnhancedClassRedefinition) {
MutexLocker sd_mutex(EnhancedRedefineClasses_lock);
VM_EnhancedRedefineClasses op(class_count, class_definitions, jvmti_class_load_kind_redefine);
VMThread::execute(&op);
+ op_id = op.id();
error = (op.check_error());
} else {
VM_RedefineClasses op(class_count, class_definitions, jvmti_class_load_kind_redefine);
VMThread::execute(&op);
+ op_id = op.id();
error = op.check_error();
}
if (error == JVMTI_ERROR_NONE) {
event.set_classCount(class_count);
- event.set_redefinitionId(op.id());
+ event.set_redefinitionId(op_id);
event.commit();
}
return error;
diff --git a/src/hotspot/share/prims/jvmtiRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiRedefineClasses.cpp
index a7840848e10..346eac7c431 100644
--- a/src/hotspot/share/prims/jvmtiRedefineClasses.cpp
+++ b/src/hotspot/share/prims/jvmtiRedefineClasses.cpp
@@ -1271,6 +1271,7 @@ jvmtiError VM_RedefineClasses::load_new_class_versions(TRAPS) {
the_class_loader,
&st,
cl_info,
+ NULL,
THREAD);
// Clear class_being_redefined just to be sure.
state->clear_class_being_redefined();
diff --git a/src/hotspot/share/prims/methodHandles.hpp b/src/hotspot/share/prims/methodHandles.hpp
index 54f36202a5f..917d31efd77 100644
--- a/src/hotspot/share/prims/methodHandles.hpp
+++ b/src/hotspot/share/prims/methodHandles.hpp
@@ -180,6 +180,9 @@ public:
assert(ref_kind_is_valid(ref_kind), "");
return (ref_kind & 1) != 0;
}
+ static bool ref_kind_is_static(int ref_kind) {
+ return !ref_kind_has_receiver(ref_kind) && (ref_kind != JVM_REF_newInvokeSpecial);
+ }
static int ref_kind_to_flags(int ref_kind);
diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp
index d05a2893498..3a92b8869dc 100644
--- a/src/hotspot/share/runtime/arguments.cpp
+++ b/src/hotspot/share/runtime/arguments.cpp
@@ -2128,13 +2128,15 @@ bool Arguments::check_gc_consistency() {
// of collectors.
uint i = 0;
if (UseSerialGC) i++;
- if (UseConcMarkSweepGC) i++;
- if (UseParallelGC || UseParallelOldGC) i++;
+ if (UseParallelGC) i++;
if (UseG1GC) i++;
+ if (UseEpsilonGC) i++;
+ if (UseZGC) i++;
+ if (UseShenandoahGC) i++;
if (AllowEnhancedClassRedefinition) {
// Must use serial GC. This limitation applies because the instance size changing GC modifications
// are only built into the mark and compact algorithm.
- if ((!UseSerialGC && !UseG1GC) && i >= 1) {
+ if (!UseSerialGC && !UseG1GC && i >= 1) {
jio_fprintf(defaultStream::error_stream(),
"Must use the Serial or G1 GC with enhanced class redefinition.\n");
return false;
@@ -4494,18 +4496,18 @@ void Arguments::setup_hotswap_agent() {
// TODO: open it only for org.hotswap.agent module
// Use to access java.lang.reflect.Proxy/proxyCache
- create_numbered_property("jdk.module.addopens", "java.base/java.lang=ALL-UNNAMED", addopens_count++);
+ create_numbered_module_property("jdk.module.addopens", "java.base/java.lang=ALL-UNNAMED", addopens_count++);
// Class of field java.lang.reflect.Proxy/proxyCache
- create_numbered_property("jdk.module.addopens", "java.base/jdk.internal.loader=ALL-UNNAMED", addopens_count++);
+ create_numbered_module_property("jdk.module.addopens", "java.base/jdk.internal.loader=ALL-UNNAMED", addopens_count++);
// Use to access java.io.Reader, java.io.InputStream, java.io.FileInputStream
- create_numbered_property("jdk.module.addopens", "java.base/java.io=ALL-UNNAMED", addopens_count++);
+ create_numbered_module_property("jdk.module.addopens", "java.base/java.io=ALL-UNNAMED", addopens_count++);
// java.beans.Introspector access
- create_numbered_property("jdk.module.addopens", "java.desktop/java.beans=ALL-UNNAMED", addopens_count++);
+ create_numbered_module_property("jdk.module.addopens", "java.desktop/java.beans=ALL-UNNAMED", addopens_count++);
// java.beans.Introspector access
- create_numbered_property("jdk.module.addopens", "java.desktop/com.sun.beans=ALL-UNNAMED", addopens_count++);
+ create_numbered_module_property("jdk.module.addopens", "java.desktop/com.sun.beans=ALL-UNNAMED", addopens_count++);
// com.sun.beans.introspect.ClassInfo access
- create_numbered_property("jdk.module.addopens", "java.desktop/com.sun.beans.introspect=ALL-UNNAMED", addopens_count++);
+ create_numbered_module_property("jdk.module.addopens", "java.desktop/com.sun.beans.introspect=ALL-UNNAMED", addopens_count++);
// com.sun.beans.introspect.util.Cache access
- create_numbered_property("jdk.module.addopens", "java.desktop/com.sun.beans.util=ALL-UNNAMED", addopens_count++);
+ create_numbered_module_property("jdk.module.addopens", "java.desktop/com.sun.beans.util=ALL-UNNAMED", addopens_count++);
}
diff --git a/src/hotspot/share/runtime/mutexLocker.cpp b/src/hotspot/share/runtime/mutexLocker.cpp
index 6f982072909..14a3ed730fe 100644
--- a/src/hotspot/share/runtime/mutexLocker.cpp
+++ b/src/hotspot/share/runtime/mutexLocker.cpp
@@ -287,7 +287,7 @@ void mutex_init() {
def(InitCompleted_lock , PaddedMonitor, leaf, true, _safepoint_check_never);
def(VtableStubs_lock , PaddedMutex , nonleaf, true, _safepoint_check_never);
def(Notify_lock , PaddedMonitor, nonleaf, true, _safepoint_check_always);
- def(EnhancedRedefineClasses_lock , PaddedMutex , nonleaf+7, false, Monitor::_safepoint_check_always); // for ensuring that class redefinition is not done in parallel
+ def(EnhancedRedefineClasses_lock , PaddedMutex , nonleaf+7, false, _safepoint_check_always); // for ensuring that class redefinition is not done in parallel
def(JNICritical_lock , PaddedMonitor, nonleaf, true, _safepoint_check_always); // used for JNI critical regions
def(AdapterHandlerLibrary_lock , PaddedMutex , nonleaf, true, _safepoint_check_always);
--
2.23.0

View File

@@ -0,0 +1,25 @@
From 336cab4f72c6e642e3077ea8d1a4860de33f5a4d Mon Sep 17 00:00:00 2001
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
Date: Tue, 17 Nov 2020 17:40:24 +0100
Subject: [PATCH 20/34] dcevm15 - G1 fixes
---
src/hotspot/share/gc/g1/g1FullGCPrepareTask.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/hotspot/share/gc/g1/g1FullGCPrepareTask.cpp b/src/hotspot/share/gc/g1/g1FullGCPrepareTask.cpp
index 2f06b9617e4..476728a5d26 100644
--- a/src/hotspot/share/gc/g1/g1FullGCPrepareTask.cpp
+++ b/src/hotspot/share/gc/g1/g1FullGCPrepareTask.cpp
@@ -240,7 +240,7 @@ void G1FullGCPrepareTask::prepare_serial_compaction_dcevm() {
// collect remaining, not forwarded rescued oops using serial compact point
while (cp->last_rescued_oop() < cp->rescued_oops()->length()) {
- HeapRegion* hr = G1CollectedHeap::heap()->new_region(HeapRegion::GrainBytes / HeapWordSize, false, true);
+ HeapRegion* hr = G1CollectedHeap::heap()->new_region(HeapRegion::GrainBytes / HeapWordSize, HeapRegionType::Eden, true, G1NUMA::AnyNodeIndex);
if (hr == NULL) {
vm_exit_out_of_memory(0, OOM_MMAP_ERROR, "G1 - not enough of free regions after redefinition.");
}
--
2.23.0

View File

@@ -0,0 +1,133 @@
From cea4e2cca3c37233c728be7235f8f9d8be136cb5 Mon Sep 17 00:00:00 2001
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
Date: Tue, 17 Nov 2020 18:52:57 +0100
Subject: [PATCH 21/34] dcevm15 - Fix flush dependent code
---
.../prims/jvmtiEnhancedRedefineClasses.cpp | 57 +++++++------------
.../prims/jvmtiEnhancedRedefineClasses.hpp | 4 +-
2 files changed, 25 insertions(+), 36 deletions(-)
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
index 619e3988e3a..efaf11e1666 100644
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
@@ -508,7 +508,7 @@ void VM_EnhancedRedefineClasses::doit() {
// Deoptimize all compiled code that depends on this class (do only once, because it clears whole cache)
// if (_max_redefinition_flags > Klass::ModifyClass) {
- flush_dependent_code(NULL, thread);
+ flush_dependent_code(thread);
// }
// Adjust constantpool caches for all classes that reference methods of the evolved class.
@@ -647,17 +647,8 @@ void VM_EnhancedRedefineClasses::doit() {
//MethodDataCleaner clean_weak_method_links;
//ClassLoaderDataGraph::classes_do(&clean_weak_method_links);
- // Disable any dependent concurrent compilations
- // SystemDictionary::notice_modification();
-
JvmtiExport::increment_redefinition_count();
- // Set flag indicating that some invariants are no longer true.
- // See jvmtiExport.hpp for detailed explanation.
-
- // dcevm15: handled by _redefinition_count
- // JvmtiExport::set_has_redefined_a_class();
-
#ifdef PRODUCT
if (log_is_enabled(Trace, redefine, class, obsolete, metadata)) {
#endif
@@ -1746,6 +1737,18 @@ void VM_EnhancedRedefineClasses::transfer_old_native_function_registrations(Inst
transfer.transfer_registrations(_matching_old_methods, _matching_methods_length);
}
+// First step is to walk the code cache for each class redefined and mark
+// dependent methods. Wait until all classes are processed to deoptimize everything.
+void VM_EnhancedRedefineClasses::mark_dependent_code(InstanceKlass* ik) {
+ assert_locked_or_safepoint(Compile_lock);
+
+ // All dependencies have been recorded from startup or this is a second or
+ // subsequent use of RedefineClasses
+ if (0 && JvmtiExport::all_dependencies_are_recorded()) {
+ CodeCache::mark_for_evol_deoptimization(ik);
+ }
+}
+
// DCEVM - it always deoptimizes everything! (because it is very difficult to find only correct dependencies)
// Deoptimize all compiled code that depends on this class.
//
@@ -1762,33 +1765,21 @@ void VM_EnhancedRedefineClasses::transfer_old_native_function_registrations(Inst
// subsequent calls to RedefineClasses need only throw away code
// that depends on the class.
//
-void VM_EnhancedRedefineClasses::flush_dependent_code(InstanceKlass* k_h, TRAPS) {
+void VM_EnhancedRedefineClasses::flush_dependent_code(TRAPS) {
assert_locked_or_safepoint(Compile_lock);
// All dependencies have been recorded from startup or this is a second or
// subsequent use of RedefineClasses
// FIXME: for now, deoptimize all!
- if (0 && k_h != NULL && JvmtiExport::all_dependencies_are_recorded()) {
- CodeCache::flush_evol_dependents_on(k_h);
- Klass* superCl = k_h->super();
- // Deoptimize super classes since redefined class can has a new method override
- while (superCl != NULL && !superCl->is_redefining()) {
- CodeCache::flush_evol_dependents_on(InstanceKlass::cast(superCl));
- superCl = superCl->super();
+ if (0 && JvmtiExport::all_dependencies_are_recorded()) {
+ int deopt = CodeCache::mark_dependents_for_evol_deoptimization();
+ log_debug(redefine, class, nmethod)("Marked %d dependent nmethods for deopt", deopt);
+ if (deopt != 0) {
+ CodeCache::flush_evol_dependents();
}
} else {
- CodeCache::mark_all_nmethods_for_deoptimization();
-
- ResourceMark rm(THREAD);
- DeoptimizationMarker dm;
-
- // Deoptimize all activations depending on marked nmethods
- Deoptimization::deoptimize_dependents();
-
- // Make the dependent methods not entrant
- CodeCache::make_marked_nmethods_not_entrant();
-
- // From now on we know that the dependency information is complete
+ CodeCache::mark_all_nmethods_for_evol_deoptimization();
+ CodeCache::flush_evol_dependents();
JvmtiExport::set_all_dependencies_are_recorded(true);
}
}
@@ -1881,11 +1872,7 @@ void VM_EnhancedRedefineClasses::redefine_single_class(InstanceKlass* new_class_
JvmtiBreakpoints& jvmti_breakpoints = JvmtiCurrentBreakpoints::get_jvmti_breakpoints();
jvmti_breakpoints.clearall_in_class_at_safepoint(the_class);
- // DCEVM Deoptimization is always for whole java world, call only once after all classes are redefined
- // Deoptimize all compiled code that depends on this class
-// if (_max_redefinition_flags <= Klass::ModifyClass) {
-// flush_dependent_code(the_class, THREAD);
-// }
+ mark_dependent_code(the_class);
_old_methods = the_class->methods();
_new_methods = new_class->methods();
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
index 0066088b3b0..bd5e7d153be 100644
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
@@ -142,7 +142,9 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
// and in all direct and indirect subclasses.
void increment_class_counter(InstanceKlass *ik, TRAPS);
- void flush_dependent_code(InstanceKlass* k_h, TRAPS);
+ void mark_dependent_code(InstanceKlass* ik);
+
+ void flush_dependent_code(TRAPS);
u8 next_id();
--
2.23.0

View File

@@ -0,0 +1,211 @@
From 4f88dcec830d39452f69d1117729469fdb768a8f Mon Sep 17 00:00:00 2001
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
Date: Sun, 22 Nov 2020 12:05:26 +0100
Subject: [PATCH 22/34] dcevm15 - fix ResolvedMethodTable
---
src/hotspot/share/classfile/javaClasses.cpp | 5 -
src/hotspot/share/classfile/javaClasses.hpp | 1 -
.../share/prims/resolvedMethodTable.cpp | 139 +++++++++++-------
3 files changed, 84 insertions(+), 61 deletions(-)
diff --git a/src/hotspot/share/classfile/javaClasses.cpp b/src/hotspot/share/classfile/javaClasses.cpp
index 9b086a241f7..9a627786d0f 100644
--- a/src/hotspot/share/classfile/javaClasses.cpp
+++ b/src/hotspot/share/classfile/javaClasses.cpp
@@ -3996,11 +3996,6 @@ void java_lang_invoke_ResolvedMethodName::set_vmholder(oop resolved_method, oop
resolved_method->obj_field_put(_vmholder_offset, holder);
}
-void java_lang_invoke_ResolvedMethodName::set_vmholder_offset(oop resolved_method, Method* m) {
- assert(is_instance(resolved_method), "wrong type");
- resolved_method->obj_field_put(_vmholder_offset, m->method_holder()->java_mirror());
-}
-
oop java_lang_invoke_ResolvedMethodName::find_resolved_method(const methodHandle& m, TRAPS) {
const Method* method = m();
diff --git a/src/hotspot/share/classfile/javaClasses.hpp b/src/hotspot/share/classfile/javaClasses.hpp
index 9abf2e1d105..8f5993b7225 100644
--- a/src/hotspot/share/classfile/javaClasses.hpp
+++ b/src/hotspot/share/classfile/javaClasses.hpp
@@ -1107,7 +1107,6 @@ class java_lang_invoke_ResolvedMethodName : AllStatic {
static Method* vmtarget(oop resolved_method);
static void set_vmtarget(oop resolved_method, Method* method);
- static void set_vmholder_offset(oop resolved_method, Method* method);
static void set_vmholder(oop resolved_method, oop holder);
diff --git a/src/hotspot/share/prims/resolvedMethodTable.cpp b/src/hotspot/share/prims/resolvedMethodTable.cpp
index eb9fcda44f3..d0f1667b967 100644
--- a/src/hotspot/share/prims/resolvedMethodTable.cpp
+++ b/src/hotspot/share/prims/resolvedMethodTable.cpp
@@ -375,6 +375,67 @@ public:
}
};
+class AdjustMethodEntriesDcevm : public StackObj {
+ bool* _trace_name_printed;
+ GrowableArray<oop>* _oops_to_add;
+public:
+ AdjustMethodEntriesDcevm(GrowableArray<oop>* oops_to_add, bool* trace_name_printed) : _trace_name_printed(trace_name_printed), _oops_to_add(oops_to_add) {};
+ bool operator()(WeakHandle<vm_resolved_method_table_data>* entry) {
+ oop mem_name = entry->peek();
+ if (mem_name == NULL) {
+ // Removed
+ return true;
+ }
+
+ Method* old_method = (Method*)java_lang_invoke_ResolvedMethodName::vmtarget(mem_name);
+
+ if (old_method->is_old()) {
+
+ InstanceKlass* newer_klass = InstanceKlass::cast(old_method->method_holder()->new_version());
+ Method* newer_method;
+
+ // Method* new_method;
+ if (old_method->is_deleted()) {
+ newer_method = Universe::throw_no_such_method_error();
+ } else {
+ newer_method = newer_klass->method_with_idnum(old_method->orig_method_idnum());
+
+ log_debug(redefine, class, update)("Adjusting method: '%s' of new class %s", newer_method->name_and_sig_as_C_string(), newer_klass->name()->as_C_string());
+
+ assert(newer_klass == newer_method->method_holder(), "call after swapping redefined guts");
+ assert(newer_method != NULL, "method_with_idnum() should not be NULL");
+ assert(old_method != newer_method, "sanity check");
+
+ Thread* thread = Thread::current();
+ ResolvedMethodTableLookup lookup(thread, method_hash(newer_method), newer_method);
+ ResolvedMethodGet rmg(thread, newer_method);
+
+ if (_local_table->get(thread, lookup, rmg)) {
+ // old method was already adjusted if new method exists in _the_table
+ return true;
+ }
+ }
+
+ java_lang_invoke_ResolvedMethodName::set_vmtarget(mem_name, newer_method);
+ java_lang_invoke_ResolvedMethodName::set_vmholder(mem_name, newer_method->method_holder()->java_mirror());
+
+ newer_klass->set_has_resolved_methods();
+ _oops_to_add->append(mem_name);
+
+ ResourceMark rm;
+ if (!(*_trace_name_printed)) {
+ log_debug(redefine, class, update)("adjust: name=%s", old_method->method_holder()->external_name());
+ *_trace_name_printed = true;
+ }
+ log_debug(redefine, class, update, constantpool)
+ ("ResolvedMethod method update: %s(%s)",
+ newer_method->name()->as_C_string(), newer_method->signature()->as_C_string());
+ }
+
+ return true;
+ }
+};
+
// It is called at safepoint only for RedefineClasses
void ResolvedMethodTable::adjust_method_entries(bool * trace_name_printed) {
assert(SafepointSynchronize::is_at_safepoint(), "only called at safepoint");
@@ -382,73 +443,41 @@ void ResolvedMethodTable::adjust_method_entries(bool * trace_name_printed) {
AdjustMethodEntries adjust(trace_name_printed);
_local_table->do_safepoint_scan(adjust);
}
-#endif // INCLUDE_JVMTI
-// (DCEVM) It is called at safepoint only for RedefineClasses
+// It is called at safepoint only for RedefineClasses
void ResolvedMethodTable::adjust_method_entries_dcevm(bool * trace_name_printed) {
assert(SafepointSynchronize::is_at_safepoint(), "only called at safepoint");
// For each entry in RMT, change to new method
- GrowableArray<oop>* oops_to_add = new GrowableArray<oop>();
-
- for (int i = 0; i < _the_table->table_size(); ++i) {
- for (ResolvedMethodEntry* entry = _the_table->bucket(i);
- entry != NULL;
- entry = entry->next()) {
-
- oop mem_name = entry->object_no_keepalive();
- // except ones removed
- if (mem_name == NULL) {
- continue;
- }
- Method* old_method = (Method*)java_lang_invoke_ResolvedMethodName::vmtarget(mem_name);
-
- if (old_method->is_old()) {
-
- InstanceKlass* newer_klass = InstanceKlass::cast(old_method->method_holder()->new_version());
- Method* newer_method;
-
- // Method* new_method;
- if (old_method->is_deleted()) {
- newer_method = Universe::throw_no_such_method_error();
- } else {
- newer_method = newer_klass->method_with_idnum(old_method->orig_method_idnum());
-
- log_debug(redefine, class, update)("Adjusting method: '%s' of new class %s", newer_method->name_and_sig_as_C_string(), newer_klass->name()->as_C_string());
-
- assert(newer_klass == newer_method->method_holder(), "call after swapping redefined guts");
- assert(newer_method != NULL, "method_with_idnum() should not be NULL");
- assert(old_method != newer_method, "sanity check");
-
- if (_the_table->lookup(newer_method) != NULL) {
- // old method was already adjusted if new method exists in _the_table
- continue;
- }
- }
+ GrowableArray<oop> oops_to_add(0);
+ AdjustMethodEntriesDcevm adjust(&oops_to_add, trace_name_printed);
+ _local_table->do_safepoint_scan(adjust);
+ Thread* thread = Thread::current();
+ for (int i = 0; i < oops_to_add.length(); i++) {
+ oop mem_name = oops_to_add.at(i);
+ Method* method = (Method*)java_lang_invoke_ResolvedMethodName::vmtarget(mem_name);
- java_lang_invoke_ResolvedMethodName::set_vmtarget(mem_name, newer_method);
- java_lang_invoke_ResolvedMethodName::set_vmholder_offset(mem_name, newer_method);
+ // The hash table takes ownership of the WeakHandle, even if it's not inserted.
- newer_klass->set_has_resolved_methods();
- oops_to_add->append(mem_name);
+ ResolvedMethodTableLookup lookup(thread, method_hash(method), method);
+ ResolvedMethodGet rmg(thread, method);
- ResourceMark rm;
- if (!(*trace_name_printed)) {
- log_debug(redefine, class, update)("adjust: name=%s", old_method->method_holder()->external_name());
- *trace_name_printed = true;
- }
- log_debug(redefine, class, update, constantpool)
- ("ResolvedMethod method update: %s(%s)",
- newer_method->name()->as_C_string(), newer_method->signature()->as_C_string());
+ while (true) {
+ if (_local_table->get(thread, lookup, rmg)) {
+ break;
+ }
+ WeakHandle<vm_resolved_method_table_data> wh = WeakHandle<vm_resolved_method_table_data>::create(Handle(thread, mem_name));
+ // The hash table takes ownership of the WeakHandle, even if it's not inserted.
+ if (_local_table->insert(thread, lookup, wh)) {
+ log_insert(method);
+ wh.resolve();
+ break;
}
- }
- for (int i = 0; i < oops_to_add->length(); i++) {
- oop mem_name = oops_to_add->at(i);
- Method* method = (Method*)java_lang_invoke_ResolvedMethodName::vmtarget(mem_name);
- _the_table->basic_add(method, Handle(Thread::current(), mem_name));
}
}
}
+#endif // INCLUDE_JVMTI
+
// Verification
class VerifyResolvedMethod : StackObj {
public:
--
2.23.0

View File

@@ -0,0 +1,88 @@
From 5379e56465d3d3930ec7ea91b1c64db2cdf70170 Mon Sep 17 00:00:00 2001
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
Date: Sun, 22 Nov 2020 12:05:50 +0100
Subject: [PATCH 23/34] dcevm15 - fix Universe::root_oops_do
---
src/hotspot/share/memory/universe.cpp | 38 +++++++++------------------
1 file changed, 12 insertions(+), 26 deletions(-)
diff --git a/src/hotspot/share/memory/universe.cpp b/src/hotspot/share/memory/universe.cpp
index f6e4253b5a5..8dad437bd51 100644
--- a/src/hotspot/share/memory/universe.cpp
+++ b/src/hotspot/share/memory/universe.cpp
@@ -39,6 +39,7 @@
#include "gc/shared/gcConfig.hpp"
#include "gc/shared/gcLogPrecious.hpp"
#include "gc/shared/gcTraceTime.inline.hpp"
+#include "gc/shared/weakProcessor.hpp"
#include "interpreter/interpreter.hpp"
#include "logging/log.hpp"
#include "logging/logStream.hpp"
@@ -75,6 +76,7 @@
#include "runtime/thread.inline.hpp"
#include "runtime/timerTrace.hpp"
#include "runtime/vmOperations.hpp"
+#include "services/management.hpp"
#include "services/memoryService.hpp"
#include "utilities/align.hpp"
#include "utilities/copy.hpp"
@@ -180,45 +182,29 @@ void Universe::basic_type_classes_do(KlassClosure *closure) {
// FIXME: (DCEVM) This method should iterate all pointers that are not within heap objects.
void Universe::root_oops_do(OopClosure *oopClosure) {
-
- class AlwaysTrueClosure: public BoolObjectClosure {
- public:
- void do_object(oop p) { ShouldNotReachHere(); }
- bool do_object_b(oop p) { return true; }
- };
- AlwaysTrueClosure always_true;
-
Universe::oops_do(oopClosure);
// ReferenceProcessor::oops_do(oopClosure); (tw) check why no longer there
JNIHandles::oops_do(oopClosure); // Global (strong) JNI handles
Threads::oops_do(oopClosure, NULL);
ObjectSynchronizer::oops_do(oopClosure);
- // TODO: review, flat profiler was removed in j10
- // FlatProfiler::oops_do(oopClosure);
- JvmtiExport::oops_do(oopClosure);
+ // (DCEVM) TODO: Check if this is correct?
+ Management::oops_do(oopClosure);
+ OopStorageSet::vm_global()->oops_do(oopClosure);
+ CLDToOopClosure cld_closure(oopClosure, ClassLoaderData::_claim_none);
+ ClassLoaderDataGraph::cld_do(&cld_closure);
// Now adjust pointers in remaining weak roots. (All of which should
// have been cleared if they pointed to non-surviving objects.)
// Global (weak) JNI handles
- JNIHandles::weak_oops_do(&always_true, oopClosure);
+ WeakProcessor::oops_do(oopClosure);
CodeBlobToOopClosure blobClosure(oopClosure, CodeBlobToOopClosure::FixRelocations);
CodeCache::blobs_do(&blobClosure);
- StringTable::oops_do(oopClosure);
+ AOT_ONLY(AOTLoader::oops_do(oopClosure);)
+ // StringTable::oops_do was removed in j15
+ // StringTable::oops_do(oopClosure);
- // (DCEVM) TODO: Check if this is correct?
- //CodeCache::scavenge_root_nmethods_oops_do(oopClosure);
- //Management::oops_do(oopClosure);
- //ref_processor()->weak_oops_do(&oopClosure);
- //PSScavenge::reference_processor()->weak_oops_do(&oopClosure);
-
-#if INCLUDE_AOT
- if (UseAOT) {
- AOTLoader::oops_do(oopClosure);
- }
-#endif
- // SO_AllClasses
- SystemDictionary::oops_do(oopClosure);
+ // PSScavenge::reference_processor()->weak_oops_do(oopClosure);
}
void Universe::oops_do(OopClosure* f) {
--
2.23.0

View File

@@ -0,0 +1,67 @@
From c6ea68e66d37d70739f7b0ee74131322b4526a68 Mon Sep 17 00:00:00 2001
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
Date: Sun, 22 Nov 2020 12:03:32 +0100
Subject: [PATCH 24/34] Cleanup dcevm comments
---
src/hotspot/share/classfile/classLoaderDataGraph.hpp | 2 +-
src/hotspot/share/classfile/systemDictionary.hpp | 2 +-
src/hotspot/share/gc/shared/gcConfig.cpp | 2 +-
src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/hotspot/share/classfile/classLoaderDataGraph.hpp b/src/hotspot/share/classfile/classLoaderDataGraph.hpp
index f380aa3fa34..8ce94cccb47 100644
--- a/src/hotspot/share/classfile/classLoaderDataGraph.hpp
+++ b/src/hotspot/share/classfile/classLoaderDataGraph.hpp
@@ -104,7 +104,7 @@ class ClassLoaderDataGraph : public AllStatic {
static void dictionary_classes_do(KlassClosure* klass_closure);
- // Enhanced class redefinition
+ // (DCEVM) Enhanced class redefinition
static void rollback_redefinition();
// VM_CounterDecay iteration support
diff --git a/src/hotspot/share/classfile/systemDictionary.hpp b/src/hotspot/share/classfile/systemDictionary.hpp
index 931e655d631..1019dbd0d04 100644
--- a/src/hotspot/share/classfile/systemDictionary.hpp
+++ b/src/hotspot/share/classfile/systemDictionary.hpp
@@ -455,7 +455,7 @@ public:
static bool is_well_known_klass(Symbol* class_name);
#endif
- // Enhanced class redefinition
+ // (DCEVM) Enhanced class redefinition
static void remove_from_hierarchy(InstanceKlass* k);
static void update_constraints_after_redefinition();
diff --git a/src/hotspot/share/gc/shared/gcConfig.cpp b/src/hotspot/share/gc/shared/gcConfig.cpp
index 5c1a09390f1..23fbf715378 100644
--- a/src/hotspot/share/gc/shared/gcConfig.cpp
+++ b/src/hotspot/share/gc/shared/gcConfig.cpp
@@ -99,7 +99,7 @@ void GCConfig::fail_if_non_included_gc_is_selected() {
void GCConfig::select_gc_ergonomically() {
if (AllowEnhancedClassRedefinition && !UseG1GC) {
- // Enhanced class redefinition only supports serial GC at the moment
+ // (DCEVM) Enhanced class redefinition only supports serial GC at the moment
FLAG_SET_ERGO(UseSerialGC, true);
} else if (os::is_server_class_machine()) {
#if INCLUDE_G1GC
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
index bd5e7d153be..5de375fb888 100644
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.hpp
@@ -78,7 +78,7 @@ class VM_EnhancedRedefineClasses: public VM_GC_Operation {
// have any entries.
bool _any_class_has_resolved_methods;
- // Enhanced class redefinition, affected klasses contain all classes which should be redefined
+ // (DCEVM) Enhanced class redefinition, affected klasses contain all classes which should be redefined
// either because of redefine, class hierarchy or interface change
GrowableArray<Klass*>* _affected_klasses;
--
2.23.0

View File

@@ -0,0 +1,43 @@
From 507d97966c7145d0ae2533459cc504c7b0d6d5b6 Mon Sep 17 00:00:00 2001
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
Date: Sun, 22 Nov 2020 18:49:05 +0100
Subject: [PATCH 25/34] Fix cpCache in not AllowEnhancedClassRedefinition mode
---
src/hotspot/share/oops/cpCache.hpp | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/hotspot/share/oops/cpCache.hpp b/src/hotspot/share/oops/cpCache.hpp
index 121a13b1dda..64dcf6223f5 100644
--- a/src/hotspot/share/oops/cpCache.hpp
+++ b/src/hotspot/share/oops/cpCache.hpp
@@ -148,13 +148,13 @@ class ConstantPoolCacheEntry {
void set_bytecode_2(Bytecodes::Code code);
void set_f1(Metadata* f1) {
Metadata* existing_f1 = _f1; // read once
- //assert(existing_f1 == NULL || existing_f1 == f1, "illegal field change");
+ assert(AllowEnhancedClassRedefinition || existing_f1 == NULL || existing_f1 == f1, "illegal field change");
_f1 = f1;
}
void release_set_f1(Metadata* f1);
void set_f2(intx f2) {
intx existing_f2 = _f2; // read once
- //assert(existing_f2 == 0 || existing_f2 == f2, "illegal field change");
+ assert(AllowEnhancedClassRedefinition || existing_f2 == 0 || existing_f2 == f2, "illegal field change");
_f2 = f2;
}
void set_f2_as_vfinal_method(Method* f2) {
@@ -215,7 +215,9 @@ class ConstantPoolCacheEntry {
void initialize_resolved_reference_index(int ref_index) {
assert(_f2 == 0, "set once"); // note: ref_index might be zero also
_f2 = ref_index;
- _flags = 1 << is_resolved_ref_shift;
+ if (AllowEnhancedClassRedefinition) {
+ _flags = 1 << is_resolved_ref_shift;
+ }
}
void set_field( // sets entry to resolved field state
--
2.23.0

View File

@@ -0,0 +1,32 @@
From b516b615c20fafa2094dfb9f4cb08245b26418d0 Mon Sep 17 00:00:00 2001
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
Date: Sun, 22 Nov 2020 19:51:46 +0100
Subject: [PATCH 26/34] dcevm15 - add ClassLoaderDataGraph_lock on
ClassLoaderDataGraph::classes_do
ClassLoaderDataGraph::classes_do need safepoint or lock,
find_sorted_affected_classes is not in safepoint therefore it must be
locked
---
src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
index efaf11e1666..197e1c0029f 100644
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
@@ -2063,7 +2063,10 @@ jvmtiError VM_EnhancedRedefineClasses::find_sorted_affected_classes(TRAPS) {
AffectedKlassClosure closure(_affected_klasses);
// Updated in j10, from original SystemDictionary::classes_do
- ClassLoaderDataGraph::classes_do(&closure);
+ {
+ MutexLocker mcld(ClassLoaderDataGraph_lock);
+ ClassLoaderDataGraph::classes_do(&closure);
+ }
//ClassLoaderDataGraph::dictionary_classes_do(&closure);
log_trace(redefine, class, load)("%d classes affected", _affected_klasses->length());
--
2.23.0

View File

@@ -0,0 +1,29 @@
From c6498946006879314bdc6218ee72da5d9c88f237 Mon Sep 17 00:00:00 2001
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
Date: Sat, 28 Nov 2020 19:29:42 +0100
Subject: [PATCH 27/34] dcevm15 - check if has_nestmate_access_to has newest
host class
---
src/hotspot/share/oops/instanceKlass.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/hotspot/share/oops/instanceKlass.cpp b/src/hotspot/share/oops/instanceKlass.cpp
index 5e40d78a87e..1d9623f2446 100644
--- a/src/hotspot/share/oops/instanceKlass.cpp
+++ b/src/hotspot/share/oops/instanceKlass.cpp
@@ -445,6 +445,11 @@ bool InstanceKlass::has_nestmate_access_to(InstanceKlass* k, TRAPS) {
return false;
}
+ if (AllowEnhancedClassRedefinition) {
+ // TODO: (DCEVM) check if it correct. It fix problems with lambdas (hidden)
+ cur_host = InstanceKlass::cast(cur_host->newest_version());
+ }
+
Klass* k_nest_host = k->nest_host(CHECK_false);
if (k_nest_host == NULL) {
return false;
--
2.23.0

View File

@@ -0,0 +1,24 @@
From 86c27155386c1c40642c99c63a242d1f5d8601a5 Mon Sep 17 00:00:00 2001
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
Date: Sat, 28 Nov 2020 19:31:08 +0100
Subject: [PATCH 28/34] Remove unused fieldType
---
src/hotspot/share/classfile/vmSymbols.hpp | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/hotspot/share/classfile/vmSymbols.hpp b/src/hotspot/share/classfile/vmSymbols.hpp
index 6a3b234b222..eb06684a288 100644
--- a/src/hotspot/share/classfile/vmSymbols.hpp
+++ b/src/hotspot/share/classfile/vmSymbols.hpp
@@ -465,7 +465,6 @@
template(static_offset_name, "staticOffset") \
template(static_base_name, "staticBase") \
template(field_offset_name, "fieldOffset") \
- template(field_type_name, "fieldType") \
\
/* name symbols needed by intrinsics */ \
\
--
2.23.0

View File

@@ -0,0 +1,54 @@
From 025d0d2903963fb79f83cf0d90418783d3ef6813 Mon Sep 17 00:00:00 2001
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
Date: Sun, 29 Nov 2020 17:18:16 +0100
Subject: [PATCH 29/34] mark_as_scavengable only alive methods
---
.../share/prims/jvmtiEnhancedRedefineClasses.cpp | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
index 197e1c0029f..e00fac1f693 100644
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
@@ -223,19 +223,21 @@ class FieldCopier : public FieldClosure {
// TODO: review...
void VM_EnhancedRedefineClasses::mark_as_scavengable(nmethod* nm) {
- ScavengableNMethods::register_nmethod(nm);
+ if (nm->is_alive()) {
+ ScavengableNMethods::register_nmethod(nm);
+ }
}
void VM_EnhancedRedefineClasses::unregister_nmethod_g1(nmethod* nm) {
// It should work not only for G1 but also for another GCs, but this way is safer now
- if (!nm->is_zombie() && !nm->is_unloaded()) {
+ if (nm->is_alive()) {
Universe::heap()->unregister_nmethod(nm);
}
}
void VM_EnhancedRedefineClasses::register_nmethod_g1(nmethod* nm) {
// It should work not only for G1 but also for another GCs, but this way is safer now
- if (!nm->is_zombie() && !nm->is_unloaded()) {
+ if (nm->is_alive()) {
Universe::heap()->register_nmethod(nm);
}
}
@@ -511,9 +513,9 @@ void VM_EnhancedRedefineClasses::doit() {
flush_dependent_code(thread);
// }
- // Adjust constantpool caches for all classes that reference methods of the evolved class.
- ClearCpoolCacheAndUnpatch clear_cpool_cache(thread);
- ClassLoaderDataGraph::classes_do(&clear_cpool_cache);
+ // Adjust constantpool caches for all classes that reference methods of the evolved class.
+ ClearCpoolCacheAndUnpatch clear_cpool_cache(thread);
+ ClassLoaderDataGraph::classes_do(&clear_cpool_cache);
// JSR-292 support
if (_any_class_has_resolved_methods) {
--
2.23.0

View File

@@ -0,0 +1,28 @@
From 27aabfefe7d799545049bb81ba19d4ed2ff6379c Mon Sep 17 00:00:00 2001
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
Date: Sun, 29 Nov 2020 17:20:11 +0100
Subject: [PATCH 30/34] dcevm15 - lock on
ClassLoaderDataGraph::rollback_redefinition
rollback is not in safepoint, therefore must be locked
---
src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
index e00fac1f693..db5fb1c472b 100644
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
@@ -1382,7 +1382,9 @@ void VM_EnhancedRedefineClasses::calculate_instance_update_information(Klass* ne
// Rollback all changes - clear new classes from the system dictionary, return old classes to directory, free memory.
void VM_EnhancedRedefineClasses::rollback() {
log_info(redefine, class, load)("Rolling back redefinition, result=%d", _res);
+ ClassLoaderDataGraph_lock->lock();
ClassLoaderDataGraph::rollback_redefinition();
+ ClassLoaderDataGraph_lock->unlock();
for (int i = 0; i < _new_classes->length(); i++) {
SystemDictionary::remove_from_hierarchy(_new_classes->at(i));
--
2.23.0

View File

@@ -0,0 +1,28 @@
From 9b405cb642d5935c39c8dbd522ea2fdecfc29ef3 Mon Sep 17 00:00:00 2001
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
Date: Sun, 29 Nov 2020 19:59:50 +0100
Subject: [PATCH 31/34] ResourceMark in G1IterateObjectClosureTask fixing
memory leaks
G1IterateObjectClosureTask is used only in redefinition full GC run
---
src/hotspot/share/gc/g1/g1CollectedHeap.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp
index a29d2dddc2d..2af6df6c1e4 100644
--- a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp
@@ -2362,6 +2362,9 @@ class G1IterateObjectClosureTask : public AbstractGangTask {
_cl(cl), _g1h(g1h), _hrclaimer(g1h->workers()->active_workers()) { }
virtual void work(uint worker_id) {
+ Thread *thread = Thread::current();
+ HandleMark hm(thread); // make sure any handles created are deleted
+ ResourceMark rm(thread);
IterateObjectClosureRegionClosure blk(_cl);
_g1h->heap_region_par_iterate_from_worker_offset(&blk, &_hrclaimer, worker_id);
}
--
2.23.0

View File

@@ -0,0 +1,91 @@
From 40fe40884d4efc50864bb3f2dd88f0a2e7122d5a Mon Sep 17 00:00:00 2001
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
Date: Sun, 29 Nov 2020 20:05:03 +0100
Subject: [PATCH 32/34] dcevm15 - fix hidded classes
---
.../prims/jvmtiEnhancedRedefineClasses.cpp | 41 ++++++++++++++-----
1 file changed, 30 insertions(+), 11 deletions(-)
diff --git a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
index db5fb1c472b..590f7fdfafe 100644
--- a/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
+++ b/src/hotspot/share/prims/jvmtiEnhancedRedefineClasses.cpp
@@ -722,7 +722,8 @@ bool VM_EnhancedRedefineClasses::is_modifiable_class(oop klass_mirror) {
}
// Cannot redefine or retransform an anonymous class.
- if (InstanceKlass::cast(k)->is_unsafe_anonymous()) {
+ // TODO: check if is correct in j15
+ if (InstanceKlass::cast(k)->is_unsafe_anonymous() || InstanceKlass::cast(k)->is_hidden()) {
return false;
}
return true;
@@ -808,21 +809,27 @@ jvmtiError VM_EnhancedRedefineClasses::load_new_class_versions(TRAPS) {
InstanceKlass* k;
- if (InstanceKlass::cast(the_class)->is_unsafe_anonymous()) {
- const InstanceKlass* host_class = the_class->unsafe_anonymous_host();
+ if (the_class->is_unsafe_anonymous() || the_class->is_hidden()) {
+ InstanceKlass* dynamic_host_class = NULL;
+ InstanceKlass* unsafe_anonymous_host = NULL;
- // Make sure it's the real host class, not another anonymous class.
- while (host_class != NULL && host_class->is_unsafe_anonymous()) {
- host_class = host_class->unsafe_anonymous_host();
+ if (the_class->is_hidden()) {
+ log_debug(redefine, class, load)("loading hidden class %s", the_class->name()->as_C_string());
+ dynamic_host_class = the_class->nest_host(THREAD);
+ }
+
+ if (the_class->is_unsafe_anonymous()) {
+ log_debug(redefine, class, load)("loading usafe anonymous %s", the_class->name()->as_C_string());
+ unsafe_anonymous_host = the_class->unsafe_anonymous_host();
}
ClassLoadInfo cl_info(protection_domain,
- host_class,
- NULL, // dynamic_nest_host
+ unsafe_anonymous_host,
NULL, // cp_patches
+ dynamic_host_class, // dynamic_nest_host
Handle(), // classData
- false, // is_hidden
- false, // is_strong_hidden
+ the_class->is_hidden(), // is_hidden
+ !the_class->is_non_strong_hidden(), // is_strong_hidden
true); // FIXME: check if correct. can_access_vm_annotations
k = SystemDictionary::parse_stream(the_class_sym,
@@ -833,7 +840,17 @@ jvmtiError VM_EnhancedRedefineClasses::load_new_class_versions(TRAPS) {
THREAD);
k->class_loader_data()->exchange_holders(the_class->class_loader_data());
- the_class->class_loader_data()->inc_keep_alive();
+
+ if (the_class->is_hidden()) {
+ // from jvm_lookup_define_class() (jvm.cpp):
+ // The hidden class loader data has been artificially been kept alive to
+ // this point. The mirror and any instances of this class have to keep
+ // it alive afterwards.
+ the_class->class_loader_data()->dec_keep_alive();
+ } else {
+ the_class->class_loader_data()->inc_keep_alive();
+ }
+
} else {
k = SystemDictionary::resolve_from_stream(the_class_sym,
the_class_loader,
@@ -1475,6 +1492,8 @@ void VM_EnhancedRedefineClasses::ClearCpoolCacheAndUnpatch::do_klass(Klass* k) {
ik->set_unsafe_anonymous_host(InstanceKlass::cast(ik->unsafe_anonymous_host()->newest_version()));
}
+ // FIXME: check new nest_host for hidden
+
// Update implementor if there is only one, in this case implementor() can reference old class
if (ik->is_interface()) {
Klass* implKlass = ik->implementor();
--
2.23.0

View File

@@ -0,0 +1,27 @@
From 29920b076b4ad96d85adbce0a1d947e5022ba3ad Mon Sep 17 00:00:00 2001
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
Date: Sun, 29 Nov 2020 20:08:57 +0100
Subject: [PATCH 33/34] dcevm15 - DON'T clear F2 in CP cache after indy
unevolving
It's not clear why it was cleared in dcevm7-11
---
src/hotspot/share/oops/cpCache.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/hotspot/share/oops/cpCache.cpp b/src/hotspot/share/oops/cpCache.cpp
index 79a38dbeff0..650e6fab42d 100644
--- a/src/hotspot/share/oops/cpCache.cpp
+++ b/src/hotspot/share/oops/cpCache.cpp
@@ -650,7 +650,7 @@ void ConstantPoolCacheEntry::clear_entry() {
if (clearData) {
if (!is_resolved_reference()) {
- _f2 = 0;
+ // _f2 = 0;
}
// FIXME: (DCEVM) we want to clear flags, but parameter size is actually used
// after we return from the method, before entry is re-initialized. So let's
--
2.23.0

View File

@@ -0,0 +1,49 @@
From 1f13b20ab5553182680045b7d7324ff92da7e7f0 Mon Sep 17 00:00:00 2001
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
Date: Sun, 29 Nov 2020 21:28:06 +0100
Subject: [PATCH 34/34] dcevm15 - fix Universe::root_oops_do
Removed ClassLoaderDataGraph::cld_do was cause of crashes due multiple
oop patching. ClassLoaderDataGraph::cld_do replaced in dcevm15
previously used and removed SystemDictionary:oops_do
---
src/hotspot/share/memory/universe.cpp | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/hotspot/share/memory/universe.cpp b/src/hotspot/share/memory/universe.cpp
index 8dad437bd51..0199962a684 100644
--- a/src/hotspot/share/memory/universe.cpp
+++ b/src/hotspot/share/memory/universe.cpp
@@ -190,21 +190,26 @@ void Universe::root_oops_do(OopClosure *oopClosure) {
// (DCEVM) TODO: Check if this is correct?
Management::oops_do(oopClosure);
OopStorageSet::vm_global()->oops_do(oopClosure);
- CLDToOopClosure cld_closure(oopClosure, ClassLoaderData::_claim_none);
- ClassLoaderDataGraph::cld_do(&cld_closure);
+ // CLDToOopClosure cld_closure(oopClosure, ClassLoaderData::_claim_none);
+ // ClassLoaderDataGraph::cld_do(&cld_closure);
// Now adjust pointers in remaining weak roots. (All of which should
// have been cleared if they pointed to non-surviving objects.)
// Global (weak) JNI handles
WeakProcessor::oops_do(oopClosure);
+ JvmtiExport::oops_do(oopClosure);
+
CodeBlobToOopClosure blobClosure(oopClosure, CodeBlobToOopClosure::FixRelocations);
CodeCache::blobs_do(&blobClosure);
+
AOT_ONLY(AOTLoader::oops_do(oopClosure);)
+
// StringTable::oops_do was removed in j15
// StringTable::oops_do(oopClosure);
- // PSScavenge::reference_processor()->weak_oops_do(oopClosure);
+ // OopStorageSet::vm_global()->oops_do(oopClosure);
+
}
void Universe::oops_do(OopClosure* f) {
--
2.23.0

View File

@@ -0,0 +1,119 @@
#!/bin/bash -x
# The following parameters must be specified:
# JBSDK_VERSION - specifies major version of OpenJDK e.g. 11_0_6 (instead of dots '.' underbars "_" are used)
# JDK_BUILD_NUMBER - specifies update release 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 be built; possible values:
# <empty> or nomod - the release bundles without any additional modules (jcef)
# jcef - the release bundles with jcef
# fd - the fastdebug bundles which also include the jcef module
#
# 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)
#
# Environment variables:
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
# By default JCEF binaries should be located in ./jcef_win_x64
JBSDK_VERSION=$1
JDK_BUILD_NUMBER=$2
build_number=$3
bundle_type=$4
JBSDK_VERSION_WITH_DOTS=$(echo $JBSDK_VERSION | sed 's/_/\./g')
WORK_DIR=$(pwd)
JCEF_PATH=${JCEF_PATH:=$WORK_DIR/jcef_win_x64}
source jb/project/tools/common/scripts/common.sh
function create_image_bundle {
__bundle_name=$1
__modules_path=$2
__modules=$3
[ -d $__bundle_name ] && rm -rf $__bundle_name
echo Running jlink ...
${JSDK}/bin/jlink \
--module-path $__modules_path --no-man-pages --compress=2 \
--add-modules $__modules --output $__bundle_name || do_exit $?
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> $__bundle_name/release
if [ "$__bundle_name" == "$JBRSDK_BUNDLE" ]; then
sed 's/JBR/JBRSDK/g' $__bundle_name/release > release
mv release $__bundle_name/release
fi
}
WITH_DEBUG_LEVEL="--with-debug-level=release"
RELEASE_NAME=windows-x86_64-server-release
case "$bundle_type" in
"jcef")
do_reset_changes=1
;;
"dcevm")
HEAD_REVISION=$(git rev-parse HEAD)
git am jb/project/tools/patches/dcevm/*.patch || do_exit $?
do_reset_dcevm=1
do_reset_changes=1
;;
"nomod" | "")
bundle_type=""
;;
"fd")
do_reset_changes=1
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
RELEASE_NAME=windows-x86_64-server-fastdebug
;;
esac
sh ./configure \
--disable-warnings-as-errors \
$WITH_DEBUG_LEVEL \
--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 || do_exit $?
if [ -z "$bundle_type" ]; then
make LOG=info CONF=$RELEASE_NAME clean images test-image || do_exit $?
else
make LOG=info CONF=$RELEASE_NAME clean images || do_exit $?
fi
IMAGES_DIR=build/$RELEASE_NAME/images
JSDK=$IMAGES_DIR/jdk
JSDK_MODS_DIR=$IMAGES_DIR/jmods
JBRSDK_BUNDLE=jbrsdk
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ]; then
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
update_jsdk_mods "$JSDK" "$JCEF_PATH"/jmods "$JSDK"/jmods "$JSDK_MODS_DIR" || do_exit $?
cp $JCEF_PATH/jmods/* ${JSDK_MODS_DIR} # $JSDK/jmods is not unchanged
jbr_name_postfix="_${bundle_type}"
fi
# create runtime image bundle
modules=$(xargs < modules.list | sed s/" "//g) || do_exit $?
create_image_bundle "jbr${jbr_name_postfix}" $JSDK_MODS_DIR "$modules" || do_exit $?
# create sdk image bundle
modules=$(cat ${JSDK}/release | grep MODULES | sed s/MODULES=//g | sed s/' '/,/g | sed s/\"//g | sed s/\\r//g | sed s/\\n//g)
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
fi
create_image_bundle "$JBRSDK_BUNDLE" "$JSDK_MODS_DIR" "$modules" || do_exit $?
do_exit 0

View File

@@ -0,0 +1,63 @@
#!/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/scripts/common.sh
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
WORK_DIR=$(pwd)
[ -z "$bundle_type" ] && (git apply -p0 < jb/project/tools/patches/exclude_jcef_module.patch || exit $?)
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,77 @@
#!/bin/bash -x
# The following parameters must be specified:
# JBSDK_VERSION - specifies major version of OpenJDK e.g. 11_0_6 (instead of dots '.' underbars "_" are used)
# JDK_BUILD_NUMBER - specifies udate release 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 be built; possible values:
# <empty> or nomod - the bundles without any additional modules (jcef)
# jcef - the bundles with jcef
# fd - the fastdebug bundles which also include the jcef module
#
# 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)
#
source jb/project/tools/common/scripts/common.sh
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}
[ -d ${BASE_DIR}/jbr ] && 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 || do_exit $?
}
JBRSDK_BASE_NAME=jbrsdk-$JBSDK_VERSION
JBR_BASE_NAME=jbr-$JBSDK_VERSION
RELEASE_NAME=windows-x86_64-server-release
JBSDK=${JBRSDK_BASE_NAME}-osx-x64-b${build_number}
case "$bundle_type" in
"nomod" | "")
bundle_type=""
;;
"fd")
RELEASE_NAME=macosx-x86_64-server-fastdebug
JBSDK=${JBRSDK_BASE_NAME}-osx-x64-fastdebug-b${build_number}
;;
esac
IMAGES_DIR=build/$RELEASE_NAME/images
JSDK=$IMAGES_DIR/jdk
JBSDK=$JBRSDK_BASE_NAME-windows-x64-b$build_number
BASE_DIR=.
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ]; then
JBRSDK_BUNDLE=jbrsdk
echo Creating $JBSDK.tar.gz ...
[ -f "$JBSDK.tar.gz" ] && rm "$JBSDK.tar.gz"
/usr/bin/tar -czf $JBSDK.tar.gz $JBRSDK_BUNDLE || do_exit $?
fi
pack_jbr $bundle_type
if [ -z "$bundle_type" ]; then
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 || do_exit $?
fi

View File

@@ -0,0 +1,42 @@
#!/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
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

@@ -103,8 +103,8 @@ ifeq ($(ENABLE_PANDOC), true)
SOURCE_FILES := $(TOPDIR)/make/scripts/pandoc-troff-manpage-filter.sh.template, \
OUTPUT_FILE := $(PANDOC_TROFF_MANPAGE_FILTER), \
REPLACEMENTS := \
@@JJS@@ => $(JJS) ; \
@@TOPDIR@@ => $(TOPDIR) ; \
@@JAVA_SMALL@@ => $(JAVA_SMALL) ; \
@@BUILDTOOLS_OUTPUTDIR@@ => $(BUILDTOOLS_OUTPUTDIR) ; \
))
# Created script must be made executable
@@ -126,8 +126,8 @@ ifeq ($(ENABLE_PANDOC), true)
SOURCE_FILES := $(TOPDIR)/make/scripts/pandoc-html-manpage-filter.sh.template, \
OUTPUT_FILE := $(PANDOC_HTML_MANPAGE_FILTER), \
REPLACEMENTS := \
@@JJS@@ => $(JJS) ; \
@@TOPDIR@@ => $(TOPDIR) ; \
@@JAVA_SMALL@@ => $(JAVA_SMALL) ; \
@@BUILDTOOLS_OUTPUTDIR@@ => $(BUILDTOOLS_OUTPUTDIR) ; \
))
# Created script must be made executable

View File

@@ -610,9 +610,9 @@ ifeq ($(ENABLE_PANDOC), true)
# PANDOC_HTML_MANPAGE_FILTER, a wrapper around
# PANDOC_HTML_MANPAGE_FILTER_JAVASCRIPT. This is created by buildtools-jdk.
# We should also depend on the source javascript filter
PANDOC_HTML_MANPAGE_FILTER_JAVASCRIPT := \
$(TOPDIR)/make/scripts/pandoc-html-manpage-filter.js
# We should also depend on the source code for the filter
PANDOC_HTML_MANPAGE_FILTER_SOURCE := $(call FindFiles, \
$(TOPDIR)/make/jdk/src/classes/build/tools/pandocfilter)
$(foreach m, $(ALL_MODULES), \
$(eval MAN_$m := $(call FindModuleManDirs, $m)) \
@@ -632,7 +632,7 @@ ifeq ($(ENABLE_PANDOC), true)
OPTIONS := --toc -V include-before='$(SPECS_TOP)' -V include-after='$(SPECS_BOTTOM_1)', \
POST_PROCESS := $(TOOL_FIXUPPANDOC), \
EXTRA_DEPS := $(PANDOC_HTML_MANPAGE_FILTER) \
$(PANDOC_HTML_MANPAGE_FILTER_JAVASCRIPT), \
$(PANDOC_HTML_MANPAGE_FILTER_SOURCE), \
)) \
$(eval JDK_SPECS_TARGETS += $($($m_$f_NAME))) \
) \

View File

@@ -69,10 +69,12 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXE_SUFFIX) $(CLASSLIST_JAR)
-Duser.language=en -Duser.country=US \
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
build.tools.classlist.HelloClasslist $(LOG_DEBUG)
$(GREP) -v HelloClasslist $@.raw > $(INTERIM_IMAGE_DIR)/lib/classlist
$(GREP) -v HelloClasslist $@.raw > $@.interim
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -Xshare:dump \
-XX:SharedClassListFile=$@.interim -XX:SharedArchiveFile=$@.jsa \
-Xmx128M -Xms128M $(LOG_INFO)
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@.raw \
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:DumpLoadedClassList=$@.raw.2 \
-XX:SharedClassListFile=$@.interim -XX:SharedArchiveFile=$@.jsa \
-Djava.lang.invoke.MethodHandle.TRACE_RESOLVE=true \
-Duser.language=en -Duser.country=US \
--module-path $(SUPPORT_OUTPUTDIR)/classlist.jar \
@@ -86,7 +88,7 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXE_SUFFIX) $(CLASSLIST_JAR)
$(CAT) $(LINK_OPT_DIR)/stderr $(JLI_TRACE_FILE) ; \
exit $$exitcode \
)
$(GREP) -v HelloClasslist $@.raw > $@
$(GREP) -v HelloClasslist $@.raw.2 > $@
# The jli trace is created by the same recipe as classlist. By declaring these
# dependencies, make will correctly rebuild both jli trace and classlist

View File

@@ -372,6 +372,10 @@ else # $(HAS_SPEC)=true
else ifeq ($$(wildcard $$(COMPARE_BUILD_PATCH)), )
$$(error Patch file $$(COMPARE_BUILD_PATCH) does not exist)
endif
PATCH_DRY_RUN := $$(shell cd $$(topdir) && $$(PATCH) --dry-run -p1 < $$(COMPARE_BUILD_PATCH) > /dev/null 2>&1 || $$(ECHO) FAILED)
ifeq ($$(PATCH_DRY_RUN), FAILED)
$$(error Patch file $$(COMPARE_BUILD_PATCH) does not apply cleanly)
endif
endif
ifneq ($$(COMPARE_BUILD_FAIL), true)
COMPARE_BUILD_IGNORE_RESULT := || true

View File

@@ -217,7 +217,7 @@ $(eval $(call DeclareRecipesForPhase, STATIC_LIBS, \
TARGET_SUFFIX := static-libs, \
FILE_PREFIX := Lib, \
MAKE_SUBDIR := lib, \
CHECK_MODULES := $(STATIC_LIBS_MODULES), \
CHECK_MODULES := $(ALL_MODULES), \
EXTRA_ARGS := STATIC_LIBS=true, \
))
@@ -640,6 +640,18 @@ $(eval $(call SetupTarget, test-image-jdk-jtreg-native, \
DEPS := build-test-jdk-jtreg-native, \
))
$(eval $(call SetupTarget, build-test-libtest-jtreg-native, \
MAKEFILE := test/JtregNativeLibTest, \
TARGET := build-test-libtest-jtreg-native, \
DEPS := buildtools-jdk, \
))
$(eval $(call SetupTarget, test-image-libtest-jtreg-native, \
MAKEFILE := test/JtregNativeLibTest, \
TARGET := test-image-libtest-jtreg-native, \
DEPS := build-test-libtest-jtreg-native, \
))
$(eval $(call SetupTarget, build-test-hotspot-jtreg-graal, \
MAKEFILE := test/JtregGraalUnit, \
TARGET := build-test-hotspot-jtreg-graal, \
@@ -652,7 +664,7 @@ $(eval $(call SetupTarget, test-image-hotspot-jtreg-graal, \
DEPS := build-test-hotspot-jtreg-graal, \
))
ifneq ($GTEST_FRAMEWORK_SRC), )
ifneq ($(GTEST_FRAMEWORK_SRC), )
$(eval $(call SetupTarget, test-image-hotspot-gtest, \
MAKEFILE := hotspot/test/GtestImage, \
DEPS := hotspot, \
@@ -798,10 +810,14 @@ else
# If not already set, set the JVM variant target so that the JVM will be built.
JVM_MAIN_LIB_TARGETS ?= hotspot-$(JVM_VARIANT_MAIN)-libs
JVM_MAIN_GENSRC_TARGETS ?= hotspot-$(JVM_VARIANT_MAIN)-gensrc
# Building one JVM variant is enough to start building the other libs
$(LIBS_TARGETS): $(JVM_MAIN_LIB_TARGETS)
# Static libs depend on hotspot gensrc
$(STATIC_LIBS_TARGETS): $(JVM_MAIN_GENSRC_TARGETS)
$(LAUNCHER_TARGETS): java.base-libs
ifeq ($(STATIC_BUILD), true)
@@ -978,6 +994,7 @@ else
interim-image: $(INTERIM_JMOD_TARGETS)
build-test-hotspot-jtreg-native: hotspot-$(JVM_VARIANT_MAIN)-libs
build-test-libtest-jtreg-native: hotspot-$(JVM_VARIANT_MAIN)-libs
endif
@@ -1101,7 +1118,7 @@ endif
docs-image: docs-jdk
# This target builds the test image
test-image: prepare-test-image test-image-jdk-jtreg-native test-image-demos-jdk
test-image: prepare-test-image test-image-jdk-jtreg-native test-image-demos-jdk test-image-libtest-jtreg-native
ifneq ($(JVM_TEST_IMAGE_TARGETS), )
# If JVM_TEST_IMAGE_TARGETS is externally defined, use it instead of the

View File

@@ -342,11 +342,13 @@ hotspot_JTREG_MAX_MEM := 0
hotspot_JTREG_ASSERT := false
hotspot_JTREG_NATIVEPATH := $(TEST_IMAGE_DIR)/hotspot/jtreg/native
jdk_JTREG_NATIVEPATH := $(TEST_IMAGE_DIR)/jdk/jtreg/native
lib-test_JTREG_NATIVEPATH := $(TEST_IMAGE_DIR)/lib-test/jtreg/native
jdk_JTREG_PROBLEM_LIST += $(TOPDIR)/test/jdk/ProblemList.txt
jaxp_JTREG_PROBLEM_LIST += $(TOPDIR)/test/jaxp/ProblemList.txt
langtools_JTREG_PROBLEM_LIST += $(TOPDIR)/test/langtools/ProblemList.txt
hotspot_JTREG_PROBLEM_LIST += $(TOPDIR)/test/hotspot/jtreg/ProblemList.txt
lib-test_JTREG_PROBLEM_LIST += $(TOPDIR)/test/lib-test/ProblemList.txt
langtools_JTREG_MAX_MEM := 768m
@@ -687,13 +689,15 @@ define SetupRunMicroTestBody
$1_MICRO_BASIC_OPTIONS += -rff $$($1_TEST_RESULTS_DIR)/jmh-result.$(MICRO_RESULTS_FORMAT)
endif
# Set library path for native dependencies
$1_JMH_JVM_ARGS := -Djava.library.path=$$(TEST_IMAGE_DIR)/micro/native
ifneq ($$(MICRO_VM_OPTIONS)$$(MICRO_JAVA_OPTIONS), )
JMH_JVM_ARGS := $$(MICRO_VM_OPTIONS) $$(MICRO_JAVA_OPTIONS)
# Set library path for native dependencies
JMH_JVM_ARGS += -Djava.library.path=$$(TEST_IMAGE_DIR)/micro/native
$1_MICRO_VM_OPTIONS := -jvmArgs $(call ShellQuote,$$(JMH_JVM_ARGS))
$1_JMH_JVM_ARGS += $$(MICRO_VM_OPTIONS) $$(MICRO_JAVA_OPTIONS)
endif
$1_MICRO_VM_OPTIONS := -jvmArgs $(call ShellQuote,$$($1_JMH_JVM_ARGS))
ifneq ($$(MICRO_ITER), )
$1_MICRO_ITER := -i $$(MICRO_ITER)
endif

View File

@@ -32,11 +32,13 @@ include $(SPEC)
include MakeBase.gmk
include Modules.gmk
ALL_MODULES = $(call FindAllModules)
################################################################################
TARGETS :=
$(foreach m, $(STATIC_LIBS_MODULES), \
$(foreach m, $(ALL_MODULES), \
$(eval $(call SetupCopyFiles, COPY_STATIC_LIBS_$m, \
FLATTEN := true, \
SRC := $(SUPPORT_OUTPUTDIR)/native/$m, \

View File

@@ -86,17 +86,18 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
AC_SUBST(TOPDIR)
AC_SUBST(CONFIGURE_START_DIR)
# We can only call UTIL_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
UTIL_FIXUP_PATH(TOPDIR)
UTIL_FIXUP_PATH(CONFIGURE_START_DIR)
if test "x$CUSTOM_ROOT" != x; then
UTIL_FIXUP_PATH(CUSTOM_ROOT)
WORKSPACE_ROOT="${CUSTOM_ROOT}"
else
WORKSPACE_ROOT="${TOPDIR}"
fi
AC_SUBST(WORKSPACE_ROOT)
# We can only call UTIL_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
UTIL_FIXUP_PATH(CONFIGURE_START_DIR)
UTIL_FIXUP_PATH(TOPDIR)
# Locate the directory of this script.
AUTOCONF_DIR=$TOPDIR/make/autoconf

View File

@@ -381,22 +381,6 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
BOOTJDK_USE_LOCAL_CDS=false
AC_MSG_RESULT([no, -XX:SharedArchiveFile not supported])
fi
# Check for jjs in bootjdk
UTIL_SETUP_TOOL(JJS,
[
AC_MSG_CHECKING([for jjs in Boot JDK])
JJS=$BOOT_JDK/bin/jjs
if test ! -x $JJS; then
AC_MSG_RESULT(not found)
JJS=""
AC_MSG_NOTICE([Cannot use pandoc without jjs])
ENABLE_PANDOC=false
else
AC_MSG_RESULT(ok)
fi
AC_SUBST(JJS)
])
])
AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],

View File

@@ -239,21 +239,11 @@ AC_DEFUN([FLAGS_SETUP_OPTIMIZATION],
C_O_FLAG_NONE="${C_O_FLAG_NONE} ${DISABLE_FORTIFY_CFLAGS}"
fi
elif test "x$TOOLCHAIN_TYPE" = xclang; then
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
# On MacOSX we optimize for size, something
# we should do for all platforms?
C_O_FLAG_HIGHEST_JVM="-Os"
C_O_FLAG_HIGHEST="-Os"
C_O_FLAG_HI="-Os"
C_O_FLAG_NORM="-Os"
C_O_FLAG_DEBUG_JVM=""
else
C_O_FLAG_HIGHEST_JVM="-O3"
C_O_FLAG_HIGHEST="-O3"
C_O_FLAG_HI="-O3"
C_O_FLAG_NORM="-O2"
C_O_FLAG_DEBUG_JVM="-O0"
fi
C_O_FLAG_HIGHEST_JVM="-O3"
C_O_FLAG_HIGHEST="-O3"
C_O_FLAG_HI="-O3"
C_O_FLAG_NORM="-O2"
C_O_FLAG_DEBUG_JVM="-O0"
C_O_FLAG_SIZE="-Os"
C_O_FLAG_DEBUG="-O0"
C_O_FLAG_NONE="-O0"

View File

@@ -218,10 +218,12 @@ AC_DEFUN([FLAGS_SETUP_SYSROOT_FLAGS],
# We also need -iframework<path>/System/Library/Frameworks
$1SYSROOT_CFLAGS="[$]$1SYSROOT_CFLAGS -iframework [$]$1SYSROOT/System/Library/Frameworks"
$1SYSROOT_LDFLAGS="[$]$1SYSROOT_LDFLAGS -iframework [$]$1SYSROOT/System/Library/Frameworks"
# These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
# set this here so it doesn't have to be peppered throughout the forest
$1SYSROOT_CFLAGS="[$]$1SYSROOT_CFLAGS -F [$]$1SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
$1SYSROOT_LDFLAGS="[$]$1SYSROOT_LDFLAGS -F [$]$1SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
if test -d "[$]$1SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks" ; then
# These always need to be set on macOS 10.X, or we can't find the frameworks embedded in JavaVM.framework
# set this here so it doesn't have to be peppered throughout the forest
$1SYSROOT_CFLAGS="[$]$1SYSROOT_CFLAGS -F [$]$1SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
$1SYSROOT_LDFLAGS="[$]$1SYSROOT_LDFLAGS -F [$]$1SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
fi
fi
AC_SUBST($1SYSROOT_CFLAGS)

View File

@@ -565,6 +565,8 @@ CXXFILT:=@CXXFILT@
LIPO:=@LIPO@
INSTALL_NAME_TOOL:=@INSTALL_NAME_TOOL@
METAL := @METAL@
METALLIB := @METALLIB@
# Options to linker to specify a mapfile.
# (Note absence of := assignment, because we do not want to evaluate the macro body here)
@@ -625,7 +627,6 @@ JAR_CMD:=@JAR@
JLINK_CMD := @JLINK@
JMOD_CMD := @JMOD@
JARSIGNER_CMD:=@JARSIGNER@
JJS_CMD:=@JJS@
# These variables are meant to be used. They are defined with = instead of := to make
# it possible to override only the *_CMD variables.
JAVA=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
@@ -637,7 +638,6 @@ JAR=@FIXPATH@ $(JAR_CMD)
JLINK = @FIXPATH@ $(JLINK_CMD)
JMOD = @FIXPATH@ $(JMOD_CMD) $(JAVA_TOOL_FLAGS_SMALL)
JARSIGNER=@FIXPATH@ $(JARSIGNER_CMD)
JJS=@FIXPATH@ $(JJS_CMD) $(JAVA_TOOL_FLAGS_SMALL)
BUILD_JAVA_FLAGS := @BOOTCYCLE_JVM_ARGS_BIG@
BUILD_JAVA=@FIXPATH@ $(BUILD_JDK)/bin/java $(BUILD_JAVA_FLAGS)
@@ -650,6 +650,7 @@ INTERIM_LANGTOOLS_ADD_EXPORTS := \
--add-exports java.base/sun.reflect.annotation=jdk.compiler.interim \
--add-exports java.base/jdk.internal.jmod=jdk.compiler.interim \
--add-exports java.base/jdk.internal.misc=jdk.compiler.interim \
--add-exports java.base/sun.invoke.util=jdk.compiler.interim \
#
INTERIM_LANGTOOLS_MODULES_COMMA := $(strip $(subst $(SPACE),$(COMMA),$(strip \
$(INTERIM_LANGTOOLS_MODULES))))

View File

@@ -776,6 +776,32 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_EXTRA],
UTIL_FIXUP_EXECUTABLE(OTOOL)
UTIL_REQUIRE_PROGS(INSTALL_NAME_TOOL, install_name_tool)
UTIL_FIXUP_EXECUTABLE(INSTALL_NAME_TOOL)
UTIL_PATH_PROGS(METAL, metal)
if test "x$METAL" = x; then
AC_MSG_CHECKING([if metal can be run using xcrun])
METAL="xcrun -sdk macosx metal"
test_metal=`$METAL --version 2>&1`
if test $? -ne 0; then
AC_MSG_RESULT([no])
AC_MSG_ERROR([XCode tool 'metal' neither found in path nor with xcrun])
else
AC_MSG_RESULT([yes, will be using '$METAL'])
fi
fi
UTIL_PATH_PROGS(METALLIB, metallib)
if test "x$METALLIB" = x; then
AC_MSG_CHECKING([if metallib can be run using xcrun])
METALLIB="xcrun -sdk macosx metallib"
test_metallib=`$METALLIB --version 2>&1`
if test $? -ne 0; then
AC_MSG_RESULT([no])
AC_MSG_ERROR([XCode tool 'metallib' neither found in path nor with xcrun])
else
AC_MSG_RESULT([yes, will be using '$METALLIB'])
fi
fi
fi
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then

View File

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

View File

@@ -43,7 +43,7 @@ $(eval $(call IncludeCustomExtension, common/FindTests.gmk))
TEST_BASEDIRS += $(TOPDIR)/test $(TOPDIR)
# JTREG_TESTROOTS might have been set by a custom extension
JTREG_TESTROOTS += $(addprefix $(TOPDIR)/test/, hotspot/jtreg jdk langtools jaxp)
JTREG_TESTROOTS += $(addprefix $(TOPDIR)/test/, hotspot/jtreg jdk langtools jaxp lib-test)
# Extract the names of the Jtreg group files from the TEST.ROOT files. The
# TEST.ROOT files being properties files can be interpreted as makefiles so

View File

@@ -193,21 +193,6 @@ HOTSPOT_MODULES := \
jdk.internal.vm.compiler.management \
#
# The native dynamic libraries in these modules will also get built into static
# libraries for consumption by downstream projects that need to statically link
# the JDK libraries. Those static libraries are not part of the main JDK
# distribution.
STATIC_LIBS_MODULES := \
java.base \
jdk.crypto.ec \
jdk.security.auth \
java.prefs \
java.security.jgss \
java.smartcardio \
jdk.crypto.cryptoki \
jdk.net \
#
################################################################################
# Some platforms don't have the serviceability agent

View File

@@ -103,12 +103,22 @@ define SetupBuildLauncherBody
ifeq ($(call isTargetOs, macosx), true)
ifeq ($$($1_MACOSX_PRIVILEGED), true)
$1_PLIST_FILE := Info-privileged.plist
$1_PLIST_SRC_FILE := Info-privileged.plist
else
$1_PLIST_FILE := Info-cmdline.plist
$1_PLIST_SRC_FILE := Info-cmdline.plist
endif
$1_LDFLAGS += -sectcreate __TEXT __info_plist $(MACOSX_PLIST_DIR)/$$($1_PLIST_FILE)
$1_PLIST_FILE := $$(SUPPORT_OUTPUTDIR)/native/$$(MODULE)/$1/Info.plist
$$(eval $$(call SetupTextFileProcessing, BUILD_PLIST_$1, \
SOURCE_FILES := $$(TOPDIR)/src/java.base/macosx/native/launcher/$$($1_PLIST_SRC_FILE), \
OUTPUT_FILE := $$($1_PLIST_FILE), \
REPLACEMENTS := \
@@ID@@ => $(MACOSX_BUNDLE_ID_BASE).$(VERSION_SHORT).$1 ; \
@@VERSION@@ => $(VERSION_NUMBER) ; \
))
$1_LDFLAGS += -sectcreate __TEXT __info_plist $$($1_PLIST_FILE)
ifeq ($(STATIC_BUILD), true)
$1_LDFLAGS += -exported_symbols_list \
@@ -168,6 +178,8 @@ define SetupBuildLauncherBody
$1 += $$(BUILD_LAUNCHER_$1)
TARGETS += $$($1)
$$(BUILD_LAUNCHER_$1): $$(BUILD_PLIST_$1)
ifeq ($(call isTargetOs, aix), true)
$$(BUILD_LAUNCHER_$1): $(call FindStaticLib, java.base, jli_static)
endif
@@ -199,9 +211,9 @@ ifeq ($(call isTargetOsType, unix), true)
# PANDOC_TROFF_MANPAGE_FILTER, a wrapper around
# PANDOC_TROFF_MANPAGE_FILTER_JAVASCRIPT. This is created by buildtools-jdk.
# We should also depend on the source javascript filter
PANDOC_TROFF_MANPAGE_FILTER_JAVASCRIPT := \
$(TOPDIR)/make/scripts/pandoc-troff-manpage-filter.js
# We should also depend on the source code for the filter
PANDOC_TROFF_MANPAGE_FILTER_SOURCE := $(call FindFiles, \
$(TOPDIR)/make/jdk/src/classes/build/tools/pandocfilter)
# The norm in man pages is to display code literals as bold, but pandoc
# "correctly" converts these constructs (encoded in markdown using `...`
@@ -231,7 +243,7 @@ ifeq ($(call isTargetOsType, unix), true)
@@VERSION_SHORT@@ => $(VERSION_SHORT) ; \
@@VERSION_SPECIFICATION@@ => $(VERSION_SPECIFICATION), \
EXTRA_DEPS := $(PANDOC_TROFF_MANPAGE_FILTER) \
$(PANDOC_TROFF_MANPAGE_FILTER_JAVASCRIPT), \
$(PANDOC_TROFF_MANPAGE_FILTER_SOURCE), \
))
TARGETS += $(BUILD_MAN_PAGES)

View File

@@ -426,7 +426,10 @@ var getJibProfilesProfiles = function (input, common, data) {
target_cpu: "x64",
dependencies: ["devkit", "gtest", "pandoc", "graalunit_lib"],
configure_args: concat(common.configure_args_64bit, "--with-zlib=system",
"--with-macosx-version-max=10.9.0"),
"--with-macosx-version-max=10.9.0",
// Use system SetFile instead of the one in the devkit as the
// devkit one may not work on Catalina.
"SETFILE=/usr/bin/SetFile"),
},
"windows-x64": {
@@ -604,10 +607,6 @@ var getJibProfilesProfiles = function (input, common, data) {
dependencies: [ name + ".jdk" ],
configure_args: [
"--with-boot-jdk=" + input.get(name + ".jdk", "home_path"),
// Full docs do not currently work with bootcycle build
// since Nashorn was removed. This negates the
// --enable-full-docs from the main profile.
"--enable-full-docs=auto",
]
}
profiles[bootcyclePrebuiltName] = concatObjects(profiles[name],
@@ -688,7 +687,7 @@ var getJibProfilesProfiles = function (input, common, data) {
local: "bundles/\\(jdk.*doc-api-spec.tar.gz\\)",
remote: [
"bundles/common/jdk-" + data.version + "_doc-api-spec.tar.gz",
"bundles/linux-x64/\\1"
"bundles/common/\\1"
],
},
}
@@ -765,7 +764,7 @@ var getJibProfilesProfiles = function (input, common, data) {
profiles[cmpBaselineName].make_args = [ "COMPARE_BUILD=CONF=" ];
profiles[cmpBaselineName].configure_args = concat(
profiles[cmpBaselineName].configure_args,
"--with-hotspot-build-time=n/a",
"--with-hotspot-build-time=n/a",
"--disable-precompiled-headers");
// Do not inherit artifact definitions from base profile
delete profiles[cmpBaselineName].artifacts;
@@ -1046,10 +1045,10 @@ var getJibProfilesDependencies = function (input, common) {
jtreg: {
server: "jpg",
product: "jtreg",
version: "5.0",
version: "5.1",
build_number: "b01",
checksum_file: "MD5_VALUES",
file: "bundles/jtreg_bin-5.0.zip",
file: "bundles/jtreg_bin-5.1.zip",
environment_name: "JT_HOME",
environment_path: input.get("jtreg", "home_path") + "/bin",
configure_args: "--with-jtreg=" + input.get("jtreg", "home_path"),

View File

@@ -22,6 +22,8 @@
<string>????</string>
<key>CFBundleVersion</key>
<string>@@VERSION@@</string>
<key>NSMicrophoneUsageDescription</key>
<string>The application is requesting access to the microphone.</string>
<key>JavaVM</key>
<dict>
<key>JVMCapabilities</key>

View File

@@ -22,6 +22,8 @@
<string>????</string>
<key>CFBundleVersion</key>
<string>@@VERSION@@</string>
<key>NSMicrophoneUsageDescription</key>
<string>The application is requesting access to the microphone.</string>
<key>JavaVM</key>
<dict>
<key>JVMMinimumFrameworkVersion</key>

View File

@@ -2,6 +2,7 @@
# generate these charsets into sun.nio.cs
#
GBK
GB18030
Johab
MS1255
MS1256

View File

@@ -52,7 +52,7 @@ allfonts.myanmar=Myanmar Text
allfonts.dingbats=Wingdings
allfonts.symbol=Symbol
allfonts.symbols=Segoe UI Symbol
allfonts.thai=DokChampa
allfonts.thai=Tahoma
allfonts.georgian=Sylfaen
serif.plain.alphabetic=Times New Roman
@@ -60,140 +60,140 @@ serif.plain.chinese-ms950=MingLiU
serif.plain.chinese-ms950-extb=MingLiU-ExtB
serif.plain.hebrew=David
serif.plain.japanese=MS Mincho
serif.plain.korean=Batang
serif.plain.korean=Malgun Gothic
serif.bold.alphabetic=Times New Roman Bold
serif.bold.chinese-ms950=PMingLiU
serif.bold.chinese-ms950-extb=PMingLiU-ExtB
serif.bold.hebrew=David Bold
serif.bold.japanese=MS Mincho
serif.bold.korean=Batang
serif.bold.korean=Malgun Gothic
serif.italic.alphabetic=Times New Roman Italic
serif.italic.chinese-ms950=PMingLiU
serif.italic.chinese-ms950-extb=PMingLiU-ExtB
serif.italic.hebrew=David
serif.italic.japanese=MS Mincho
serif.italic.korean=Batang
serif.italic.korean=Malgun Gothic
serif.bolditalic.alphabetic=Times New Roman Bold Italic
serif.bolditalic.chinese-ms950=PMingLiU
serif.bolditalic.chinese-ms950-extb=PMingLiU-ExtB
serif.bolditalic.hebrew=David Bold
serif.bolditalic.japanese=MS Mincho
serif.bolditalic.korean=Batang
serif.bolditalic.korean=Malgun Gothic
sansserif.plain.alphabetic=Arial
sansserif.plain.chinese-ms950=MingLiU
sansserif.plain.chinese-ms950-extb=MingLiU-ExtB
sansserif.plain.hebrew=David
sansserif.plain.japanese=MS Gothic
sansserif.plain.korean=Gulim
sansserif.plain.korean=Malgun Gothic
sansserif.bold.alphabetic=Arial Bold
sansserif.bold.chinese-ms950=PMingLiU
sansserif.bold.chinese-ms950-extb=PMingLiU-ExtB
sansserif.bold.hebrew=David Bold
sansserif.bold.japanese=MS Gothic
sansserif.bold.korean=Gulim
sansserif.bold.korean=Malgun Gothic
sansserif.italic.alphabetic=Arial Italic
sansserif.italic.chinese-ms950=PMingLiU
sansserif.italic.chinese-ms950-extb=PMingLiU-ExtB
sansserif.italic.hebrew=David
sansserif.italic.japanese=MS Gothic
sansserif.italic.korean=Gulim
sansserif.italic.korean=Malgun Gothic
sansserif.bolditalic.alphabetic=Arial Bold Italic
sansserif.bolditalic.chinese-ms950=PMingLiU
sansserif.bolditalic.chinese-ms950-extb=PMingLiU-ExtB
sansserif.bolditalic.hebrew=David Bold
sansserif.bolditalic.japanese=MS Gothic
sansserif.bolditalic.korean=Gulim
sansserif.bolditalic.korean=Malgun Gothic
monospaced.plain.alphabetic=Courier New
monospaced.plain.chinese-ms950=MingLiU
monospaced.plain.chinese-ms950-extb=MingLiU-ExtB
monospaced.plain.hebrew=Courier New
monospaced.plain.japanese=MS Gothic
monospaced.plain.korean=GulimChe
monospaced.plain.korean=Malgun Gothic
monospaced.bold.alphabetic=Courier New Bold
monospaced.bold.chinese-ms950=PMingLiU
monospaced.bold.chinese-ms950-extb=PMingLiU-ExtB
monospaced.bold.hebrew=Courier New Bold
monospaced.bold.japanese=MS Gothic
monospaced.bold.korean=GulimChe
monospaced.bold.korean=Malgun Gothic
monospaced.italic.alphabetic=Courier New Italic
monospaced.italic.chinese-ms950=PMingLiU
monospaced.italic.chinese-ms950-extb=PMingLiU-ExtB
monospaced.italic.hebrew=Courier New
monospaced.italic.japanese=MS Gothic
monospaced.italic.korean=GulimChe
monospaced.italic.korean=Malgun Gothic
monospaced.bolditalic.alphabetic=Courier New Bold Italic
monospaced.bolditalic.chinese-ms950=PMingLiU
monospaced.bolditalic.chinese-ms950-extb=PMingLiU-ExtB
monospaced.bolditalic.hebrew=Courier New Bold
monospaced.bolditalic.japanese=MS Gothic
monospaced.bolditalic.korean=GulimChe
monospaced.bolditalic.korean=Malgun Gothic
dialog.plain.alphabetic=Arial
dialog.plain.chinese-ms950=MingLiU
dialog.plain.chinese-ms950-extb=MingLiU-ExtB
dialog.plain.hebrew=David
dialog.plain.japanese=MS Gothic
dialog.plain.korean=Gulim
dialog.plain.korean=Malgun Gothic
dialog.bold.alphabetic=Arial Bold
dialog.bold.chinese-ms950=PMingLiU
dialog.bold.chinese-ms950-extb=PMingLiU-ExtB
dialog.bold.hebrew=David Bold
dialog.bold.japanese=MS Gothic
dialog.bold.korean=Gulim
dialog.bold.korean=Malgun Gothic
dialog.italic.alphabetic=Arial Italic
dialog.italic.chinese-ms950=PMingLiU
dialog.italic.chinese-ms950-extb=PMingLiU-ExtB
dialog.italic.hebrew=David
dialog.italic.japanese=MS Gothic
dialog.italic.korean=Gulim
dialog.italic.korean=Malgun Gothic
dialog.bolditalic.alphabetic=Arial Bold Italic
dialog.bolditalic.chinese-ms950=PMingLiU
dialog.bolditalic.chinese-ms950-extb=PMingLiU-ExtB
dialog.bolditalic.hebrew=David Bold
dialog.bolditalic.japanese=MS Gothic
dialog.bolditalic.korean=Gulim
dialog.bolditalic.korean=Malgun Gothic
dialoginput.plain.alphabetic=Courier New
dialoginput.plain.chinese-ms950=MingLiU
dialoginput.plain.chinese-ms950-extb=MingLiU-ExtB
dialoginput.plain.hebrew=David
dialoginput.plain.japanese=MS Gothic
dialoginput.plain.korean=Gulim
dialoginput.plain.korean=Malgun Gothic
dialoginput.bold.alphabetic=Courier New Bold
dialoginput.bold.chinese-ms950=PMingLiU
dialoginput.bold.chinese-ms950-extb=PMingLiU-ExtB
dialoginput.bold.hebrew=David Bold
dialoginput.bold.japanese=MS Gothic
dialoginput.bold.korean=Gulim
dialoginput.bold.korean=Malgun Gothic
dialoginput.italic.alphabetic=Courier New Italic
dialoginput.italic.chinese-ms950=PMingLiU
dialoginput.italic.chinese-ms950-extb=PMingLiU-ExtB
dialoginput.italic.hebrew=David
dialoginput.italic.japanese=MS Gothic
dialoginput.italic.korean=Gulim
dialoginput.italic.korean=Malgun Gothic
dialoginput.bolditalic.alphabetic=Courier New Bold Italic
dialoginput.bolditalic.chinese-ms950=PMingLiU
dialoginput.bolditalic.chinese-ms950-extb=PMingLiU-ExtB
dialoginput.bolditalic.hebrew=David Bold
dialoginput.bolditalic.japanese=MS Gothic
dialoginput.bolditalic.korean=Gulim
dialoginput.bolditalic.korean=Malgun Gothic
# Search Sequences
@@ -257,7 +257,7 @@ sequence.fallback=symbols,\
# Exclusion Ranges
exclusion.alphabetic=0700-1cff,1d80-1e9f,1f00-2017,2020-20ab,20ad-20b8,20bb-20bc,20be-f8ff
exclusion.alphabetic=0700-1cff,1d80-1e9f,1f00-2017,2020-20ab,20ad-20b8,20bb-20bc,20be-24ff,2501-2501,2503-250b,250d-250f,2511-2513,2515-2517,2519-251b,251d-2523,2525-252b,252d-2533,2535-253b,253d-254f,256d-f8ff
exclusion.chinese-gb18030=0390-03d6,2200-22ef,2701-27be
exclusion.hebrew=0041-005a,0060-007a,007f-00ff,20ac-20ac
@@ -303,21 +303,18 @@ filename.MS_PMincho=MSMINCHO.TTC
filename.MS_Gothic=MSGOTHIC.TTC
filename.MS_PGothic=MSGOTHIC.TTC
filename.Gulim=gulim.TTC
filename.Batang=batang.TTC
filename.GulimChe=gulim.TTC
filename.Gautami=gautami.ttf
filename.Iskoola_Pota=iskpota.ttf
filename.Kalinga=kalinga.ttf
filename.Kartika=kartika.ttf
filename.Latha=latha.ttf
filename.Malgun_Gothic=malgun.ttf
filename.Mangal=MANGAL.TTF
filename.Raavi=raavi.ttf
filename.Shruti=shruti.ttf
filename.Tahoma=tahoma.ttf
filename.Tunga=TUNGA.TTF
filename.Vrinda=vrinda.ttf
filename.DokChampa=dokchamp.ttf
filename.Khmer_UI=KhmerUI.ttf
filename.Mongolian_Baiti=monbaiti.ttf
filename.Myanmar_Text=mmrtext.ttf

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 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
@@ -393,11 +393,14 @@ JDWP "Java(tm) Debug Wire Protocol"
(boolean canRedefineClasses
"Can the VM redefine classes?")
(boolean canAddMethod
"Can the VM add methods when redefining "
"classes?")
"Can the VM add methods when redefining classes? "
"<p>@Deprecated(since=\"15\") A JVM TI based JDWP back-end "
"will never set this capability to true.")
(boolean canUnrestrictedlyRedefineClasses
"Can the VM redefine classes "
"in ways that are normally restricted?")
"in ways that are normally restricted?"
"<p>@Deprecated(since=\"15\") A JVM TI based JDWP back-end "
"will never set this capability to true.")
(boolean canPopFrames
"Can the VM pop stack frames?")
(boolean canUseInstanceFilters
@@ -467,6 +470,7 @@ JDWP "Java(tm) Debug Wire Protocol"
"<p>"
"Requires canRedefineClasses capability - see "
"<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>. "
"<p>@Deprecated(since=\"15\") "
"In addition to the canRedefineClasses capability, the target VM must "
"have the canAddMethod capability to add methods when redefining classes, "
"or the canUnrestrictedlyRedefineClasses capability to redefine classes in ways "
@@ -526,7 +530,7 @@ JDWP "Java(tm) Debug Wire Protocol"
"returned for each class. "
"Generic signatures are described in the signature attribute "
"section in "
"<cite>The Java&trade; Virtual Machine Specification</cite>. "
"<cite>The Java Virtual Machine Specification</cite>. "
"Since JDWP version 1.5."
(Out
)
@@ -639,7 +643,7 @@ JDWP "Java(tm) Debug Wire Protocol"
)
(Reply
(int modBits "Modifier bits as defined in Chapter 4 of "
"<cite>The Java&trade; Virtual Machine Specification</cite>")
"<cite>The Java Virtual Machine Specification</cite>")
)
(ErrorSet
(Error INVALID_CLASS "refType is not the ID of a reference "
@@ -667,7 +671,7 @@ JDWP "Java(tm) Debug Wire Protocol"
"which provide additional information on the "
"field declaration. Individual flag values are "
"defined in Chapter 4 of "
"<cite>The Java&trade; Virtual Machine Specification</cite>. "
"<cite>The Java Virtual Machine Specification</cite>. "
"In addition, The <code>0xf0000000</code> bit identifies "
"the field as synthetic, if the synthetic attribute "
"<a href=\"#JDWP_VirtualMachine_Capabilities\">capability</a> is available.")
@@ -702,7 +706,7 @@ JDWP "Java(tm) Debug Wire Protocol"
"which provide additional information on the "
"method declaration. Individual flag values are "
"defined in Chapter 4 of "
"<cite>The Java&trade; Virtual Machine Specification</cite>. "
"<cite>The Java Virtual Machine Specification</cite>. "
"In addition, The <code>0xf0000000</code> bit identifies "
"the method as synthetic, if the synthetic attribute "
"<a href=\"#JDWP_VirtualMachine_Capabilities\">capability</a> is available.")
@@ -789,7 +793,7 @@ JDWP "Java(tm) Debug Wire Protocol"
"Returns the current status of the reference type. The status "
"indicates the extent to which the reference type has been "
"initialized, as described in section 2.1.6 of "
"<cite>The Java&trade; Virtual Machine Specification</cite>. "
"<cite>The Java Virtual Machine Specification</cite>. "
"If the class is linked the PREPARED and VERIFIED bits in the returned status bits "
"will be set. If the class is initialized the INITIALIZED bit in the returned "
"status bits will be set. If an error occured during initialization then the "
@@ -868,7 +872,7 @@ JDWP "Java(tm) Debug Wire Protocol"
"generic signature if there is one. "
"Generic signatures are described in the signature attribute "
"section in "
"<cite>The Java&trade; Virtual Machine Specification</cite>. "
"<cite>The Java Virtual Machine Specification</cite>. "
"Since JDWP version 1.5."
(Out
(referenceType refType "The reference type ID.")
@@ -896,7 +900,7 @@ JDWP "Java(tm) Debug Wire Protocol"
"Fields are returned in the order they occur in the class file. "
"Generic signatures are described in the signature attribute "
"section in "
"<cite>The Java&trade; Virtual Machine Specification</cite>. "
"<cite>The Java Virtual Machine Specification</cite>. "
"Since JDWP version 1.5."
(Out
(referenceType refType "The reference type ID.")
@@ -913,7 +917,7 @@ JDWP "Java(tm) Debug Wire Protocol"
"which provide additional information on the "
"field declaration. Individual flag values are "
"defined in Chapter 4 of "
"<cite>The Java&trade; Virtual Machine Specification</cite>. "
"<cite>The Java Virtual Machine Specification</cite>. "
"In addition, The <code>0xf0000000</code> bit identifies "
"the field as synthetic, if the synthetic attribute "
"<a href=\"#JDWP_VirtualMachine_Capabilities\">capability</a> is available.")
@@ -938,7 +942,7 @@ JDWP "Java(tm) Debug Wire Protocol"
"Methods are returned in the order they occur in the class file. "
"Generic signatures are described in the signature attribute "
"section in "
"<cite>The Java&trade; Virtual Machine Specification</cite>. "
"<cite>The Java Virtual Machine Specification</cite>. "
"Since JDWP version 1.5."
(Out
(referenceType refType "The reference type ID.")
@@ -955,7 +959,7 @@ JDWP "Java(tm) Debug Wire Protocol"
"which provide additional information on the "
"method declaration. Individual flag values are "
"defined in Chapter 4 of "
"<cite>The Java&trade; Virtual Machine Specification</cite>. "
"<cite>The Java Virtual Machine Specification</cite>. "
"In addition, The <code>0xf0000000</code> bit identifies "
"the method as synthetic, if the synthetic attribute "
"<a href=\"#JDWP_VirtualMachine_Capabilities\">capability</a> is available.")
@@ -1018,7 +1022,7 @@ JDWP "Java(tm) Debug Wire Protocol"
(Command ConstantPool=18
"Return the raw bytes of the constant pool in the format of the "
"constant_pool item of the Class File Format in "
"<cite>The Java&trade; Virtual Machine Specification</cite>. "
"<cite>The Java Virtual Machine Specification</cite>. "
"<p>Since JDWP version 1.6. Requires canGetConstantPool capability - see "
"<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>.""
(Out
@@ -1028,7 +1032,7 @@ JDWP "Java(tm) Debug Wire Protocol"
(int count "Total number of constant pool entries plus one. This "
"corresponds to the constant_pool_count item of the "
"Class File Format in "
"<cite>The Java&trade; Virtual Machine Specification</cite>. ")
"<cite>The Java Virtual Machine Specification</cite>. ")
(Repeat bytes
(byte cpbytes "Raw bytes of constant pool")
)
@@ -1431,7 +1435,7 @@ JDWP "Java(tm) Debug Wire Protocol"
)
(Command Bytecodes=3
"Retrieve the method's bytecodes as defined in "
"<cite>The Java&trade; Virtual Machine Specification</cite>. "
"<cite>The Java Virtual Machine Specification</cite>. "
"Requires canGetBytecodes capability - see "
"<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
(Out
@@ -1487,7 +1491,7 @@ JDWP "Java(tm) Debug Wire Protocol"
"table. Also, synthetic variables may be present. "
"Generic signatures are described in the signature attribute "
"section in "
"<cite>The Java&trade; Virtual Machine Specification</cite>. "
"<cite>The Java Virtual Machine Specification</cite>. "
"Since JDWP version 1.5."
(Out
(referenceType refType "The class.")
@@ -2078,7 +2082,7 @@ JDWP "Java(tm) Debug Wire Protocol"
"The method which will return early is referred to as the "
"called method. The called method is the current method (as "
"defined by the Frames section in "
"<cite>The Java&trade; Virtual Machine Specification</cite>) "
"<cite>The Java Virtual Machine Specification</cite>) "
"for the specified thread at the time this command "
"is received. "
"<p>"
@@ -3160,8 +3164,8 @@ JDWP "Java(tm) Debug Wire Protocol"
"canUnrestrictedlyRedefineClasses is false.")
(Constant CLASS_ATTRIBUTE_CHANGE_NOT_IMPLEMENTED
=72 "The new class version has a different NestHost, "
"NestMembers, or Record class attribute and "
"canUnrestrictedlyRedefineClasses is false.")
"NestMembers, PermittedSubclasses, or Record class attribute "
"and canUnrestrictedlyRedefineClasses is false.")
(Constant NOT_IMPLEMENTED =99 "The functionality is not implemented in "
"this virtual machine.")
(Constant NULL_POINTER =100 "Invalid pointer.")

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -632,10 +632,37 @@ class name java/security/cert/X509CRL
class name java/security/cert/X509Certificate
-method name verify descriptor (Ljava/security/PublicKey;Ljava/security/Provider;)V
class name java/security/interfaces/RSAKey
-method name getParams descriptor ()Ljava/security/spec/AlgorithmParameterSpec;
-class name java/security/spec/DSAGenParameterSpec
class name java/security/spec/MGF1ParameterSpec
-field name SHA224 descriptor Ljava/security/spec/MGF1ParameterSpec;
-field name SHA512_224 descriptor Ljava/security/spec/MGF1ParameterSpec;
-field name SHA512_256 descriptor Ljava/security/spec/MGF1ParameterSpec;
class name java/security/spec/PSSParameterSpec
-field name TRAILER_FIELD_BC descriptor I
-method name toString descriptor ()Ljava/lang/String;
class name java/security/spec/RSAKeyGenParameterSpec
-method name <init> descriptor (ILjava/math/BigInteger;Ljava/security/spec/AlgorithmParameterSpec;)V
-method name getKeyParams descriptor ()Ljava/security/spec/AlgorithmParameterSpec;
class name java/security/spec/RSAMultiPrimePrivateCrtKeySpec
-method name <init> descriptor (Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;[Ljava/security/spec/RSAOtherPrimeInfo;Ljava/security/spec/AlgorithmParameterSpec;)V
class name java/security/spec/RSAPrivateCrtKeySpec
-method name <init> descriptor (Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/security/spec/AlgorithmParameterSpec;)V
class name java/security/spec/RSAPrivateKeySpec
-method name <init> descriptor (Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/security/spec/AlgorithmParameterSpec;)V
-method name getParams descriptor ()Ljava/security/spec/AlgorithmParameterSpec;
class name java/security/spec/RSAPublicKeySpec
-method name <init> descriptor (Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/security/spec/AlgorithmParameterSpec;)V
-method name getParams descriptor ()Ljava/security/spec/AlgorithmParameterSpec;
class name java/text/Collator
-method name getInstance descriptor (Ljava/util/Locale;)Ljava/text/Collator;
@@ -1457,6 +1484,14 @@ method name newUpdater descriptor (Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/
-class name java/util/function/UnaryOperator
class name java/util/jar/Attributes$Name
-field name EXTENSION_INSTALLATION descriptor Ljava/util/jar/Attributes$Name;
-field name IMPLEMENTATION_VENDOR_ID descriptor Ljava/util/jar/Attributes$Name;
-field name IMPLEMENTATION_URL descriptor Ljava/util/jar/Attributes$Name;
field name EXTENSION_INSTALLATION descriptor Ljava/util/jar/Attributes$Name; flags 19
field name IMPLEMENTATION_VENDOR_ID descriptor Ljava/util/jar/Attributes$Name; flags 19
field name IMPLEMENTATION_URL descriptor Ljava/util/jar/Attributes$Name; flags 19
class name java/util/jar/JarFile
-method name stream descriptor ()Ljava/util/stream/Stream;
@@ -1535,6 +1570,9 @@ class name java/util/zip/ZipEntry
class name java/util/zip/ZipFile
-method name stream descriptor ()Ljava/util/stream/Stream;
class name javax/crypto/SealedObject
header extends java/lang/Object implements java/io/Serializable flags 21
class name javax/crypto/SecretKey
header extends java/lang/Object implements java/security/Key flags 601
@@ -1559,6 +1597,12 @@ class name javax/net/ssl/ExtendedSSLSession
-class name javax/net/ssl/SNIServerName
class name javax/net/ssl/SSLEngine
-method name getApplicationProtocol descriptor ()Ljava/lang/String;
-method name getHandshakeApplicationProtocol descriptor ()Ljava/lang/String;
-method name setHandshakeApplicationProtocolSelector descriptor (Ljava/util/function/BiFunction;)V
-method name getHandshakeApplicationProtocolSelector descriptor ()Ljava/util/function/BiFunction;
class name javax/net/ssl/SSLParameters
-method name setServerNames descriptor (Ljava/util/List;)V
-method name getServerNames descriptor ()Ljava/util/List;
@@ -1566,6 +1610,14 @@ class name javax/net/ssl/SSLParameters
-method name getSNIMatchers descriptor ()Ljava/util/Collection;
-method name setUseCipherSuitesOrder descriptor (Z)V
-method name getUseCipherSuitesOrder descriptor ()Z
-method name getApplicationProtocols descriptor ()[Ljava/lang/String;
-method name setApplicationProtocols descriptor ([Ljava/lang/String;)V
class name javax/net/ssl/SSLSocket
-method name getApplicationProtocol descriptor ()Ljava/lang/String;
-method name getHandshakeApplicationProtocol descriptor ()Ljava/lang/String;
-method name setHandshakeApplicationProtocolSelector descriptor (Ljava/util/function/BiFunction;)V
-method name getHandshakeApplicationProtocolSelector descriptor ()Ljava/util/function/BiFunction;
class name javax/net/ssl/SSLSocketFactory
-method name createSocket descriptor (Ljava/net/Socket;Ljava/io/InputStream;Z)Ljava/net/Socket;

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -8200,6 +8200,7 @@ method name getW descriptor ()Ljava/security/spec/ECPoint; flags 401
class name java/security/interfaces/RSAKey
header extends java/lang/Object flags 601 classAnnotations @Ljdk/Profile+Annotation;(value=I1)
method name getModulus descriptor ()Ljava/math/BigInteger; flags 401
method name getParams descriptor ()Ljava/security/spec/AlgorithmParameterSpec; flags 1
class name java/security/interfaces/RSAMultiPrimePrivateCrtKey
header extends java/lang/Object implements java/security/interfaces/RSAPrivateKey flags 601 classAnnotations @Ljdk/Profile+Annotation;(value=I1)
@@ -8363,6 +8364,8 @@ field name SHA224 descriptor Ljava/security/spec/MGF1ParameterSpec; flags 19
field name SHA256 descriptor Ljava/security/spec/MGF1ParameterSpec; flags 19
field name SHA384 descriptor Ljava/security/spec/MGF1ParameterSpec; flags 19
field name SHA512 descriptor Ljava/security/spec/MGF1ParameterSpec; flags 19
field name SHA512_224 descriptor Ljava/security/spec/MGF1ParameterSpec; flags 19
field name SHA512_256 descriptor Ljava/security/spec/MGF1ParameterSpec; flags 19
method name <init> descriptor (Ljava/lang/String;)V flags 1
method name getDigestAlgorithm descriptor ()Ljava/lang/String; flags 1
@@ -8375,6 +8378,7 @@ method name getFormat descriptor ()Ljava/lang/String; flags 11
class name java/security/spec/PSSParameterSpec
header extends java/lang/Object implements java/security/spec/AlgorithmParameterSpec flags 21 classAnnotations @Ljdk/Profile+Annotation;(value=I1)
field name DEFAULT descriptor Ljava/security/spec/PSSParameterSpec; flags 19
field name TRAILER_FIELD_BC descriptor I constantValue 1 flags 19
method name <init> descriptor (Ljava/lang/String;Ljava/lang/String;Ljava/security/spec/AlgorithmParameterSpec;II)V flags 1
method name <init> descriptor (I)V flags 1
method name getDigestAlgorithm descriptor ()Ljava/lang/String; flags 1
@@ -8382,6 +8386,7 @@ method name getMGFAlgorithm descriptor ()Ljava/lang/String; flags 1
method name getMGFParameters descriptor ()Ljava/security/spec/AlgorithmParameterSpec; flags 1
method name getSaltLength descriptor ()I flags 1
method name getTrailerField descriptor ()I flags 1
method name toString descriptor ()Ljava/lang/String; flags 1
class name java/security/spec/RSAKeyGenParameterSpec
header extends java/lang/Object implements java/security/spec/AlgorithmParameterSpec flags 21 classAnnotations @Ljdk/Profile+Annotation;(value=I1)
@@ -8390,6 +8395,8 @@ field name F4 descriptor Ljava/math/BigInteger; flags 19
method name <init> descriptor (ILjava/math/BigInteger;)V flags 1
method name getKeysize descriptor ()I flags 1
method name getPublicExponent descriptor ()Ljava/math/BigInteger; flags 1
method name <init> descriptor (ILjava/math/BigInteger;Ljava/security/spec/AlgorithmParameterSpec;)V flags 1
method name getKeyParams descriptor ()Ljava/security/spec/AlgorithmParameterSpec; flags 1
class name java/security/spec/RSAMultiPrimePrivateCrtKeySpec
header extends java/security/spec/RSAPrivateKeySpec flags 21 classAnnotations @Ljdk/Profile+Annotation;(value=I1)
@@ -8401,6 +8408,7 @@ method name getPrimeExponentP descriptor ()Ljava/math/BigInteger; flags 1
method name getPrimeExponentQ descriptor ()Ljava/math/BigInteger; flags 1
method name getCrtCoefficient descriptor ()Ljava/math/BigInteger; flags 1
method name getOtherPrimeInfo descriptor ()[Ljava/security/spec/RSAOtherPrimeInfo; flags 1
method name <init> descriptor (Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;[Ljava/security/spec/RSAOtherPrimeInfo;Ljava/security/spec/AlgorithmParameterSpec;)V flags 1
class name java/security/spec/RSAOtherPrimeInfo
header extends java/lang/Object flags 21 classAnnotations @Ljdk/Profile+Annotation;(value=I1)
@@ -8418,18 +8426,23 @@ method name getPrimeQ descriptor ()Ljava/math/BigInteger; flags 1
method name getPrimeExponentP descriptor ()Ljava/math/BigInteger; flags 1
method name getPrimeExponentQ descriptor ()Ljava/math/BigInteger; flags 1
method name getCrtCoefficient descriptor ()Ljava/math/BigInteger; flags 1
method name <init> descriptor (Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/security/spec/AlgorithmParameterSpec;)V flags 1
class name java/security/spec/RSAPrivateKeySpec
header extends java/lang/Object implements java/security/spec/KeySpec flags 21 classAnnotations @Ljdk/Profile+Annotation;(value=I1)
method name <init> descriptor (Ljava/math/BigInteger;Ljava/math/BigInteger;)V flags 1
method name getModulus descriptor ()Ljava/math/BigInteger; flags 1
method name getPrivateExponent descriptor ()Ljava/math/BigInteger; flags 1
method name <init> descriptor (Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/security/spec/AlgorithmParameterSpec;)V flags 1
method name getParams descriptor ()Ljava/security/spec/AlgorithmParameterSpec; flags 1
class name java/security/spec/RSAPublicKeySpec
header extends java/lang/Object implements java/security/spec/KeySpec flags 21 classAnnotations @Ljdk/Profile+Annotation;(value=I1)
method name <init> descriptor (Ljava/math/BigInteger;Ljava/math/BigInteger;)V flags 1
method name getModulus descriptor ()Ljava/math/BigInteger; flags 1
method name getPublicExponent descriptor ()Ljava/math/BigInteger; flags 1
method name <init> descriptor (Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/security/spec/AlgorithmParameterSpec;)V flags 1
method name getParams descriptor ()Ljava/security/spec/AlgorithmParameterSpec; flags 1
class name java/security/spec/X509EncodedKeySpec
header extends java/security/spec/EncodedKeySpec flags 21 classAnnotations @Ljdk/Profile+Annotation;(value=I1)
@@ -10429,6 +10442,7 @@ method name values descriptor ()[Ljava/time/chrono/JapaneseEra; flags 9
method name getValue descriptor ()I flags 1
method name range descriptor (Ljava/time/temporal/TemporalField;)Ljava/time/temporal/ValueRange; flags 1
method name toString descriptor ()Ljava/lang/String; flags 1
method name getDisplayName descriptor (Ljava/time/format/TextStyle;Ljava/util/Locale;)Ljava/lang/String; flags 1
class name java/time/chrono/MinguoChronology
header extends java/time/chrono/AbstractChronology implements java/io/Serializable flags 31 classAnnotations @Ljdk/Profile+Annotation;(value=I1)
@@ -15563,15 +15577,15 @@ field name MAIN_CLASS descriptor Ljava/util/jar/Attributes$Name; flags 19
field name SEALED descriptor Ljava/util/jar/Attributes$Name; flags 19
field name EXTENSION_LIST descriptor Ljava/util/jar/Attributes$Name; flags 19
field name EXTENSION_NAME descriptor Ljava/util/jar/Attributes$Name; flags 19
field name EXTENSION_INSTALLATION descriptor Ljava/util/jar/Attributes$Name; flags 19
field name IMPLEMENTATION_TITLE descriptor Ljava/util/jar/Attributes$Name; flags 19
field name IMPLEMENTATION_VERSION descriptor Ljava/util/jar/Attributes$Name; flags 19
field name IMPLEMENTATION_VENDOR descriptor Ljava/util/jar/Attributes$Name; flags 19
field name IMPLEMENTATION_VENDOR_ID descriptor Ljava/util/jar/Attributes$Name; flags 19
field name IMPLEMENTATION_URL descriptor Ljava/util/jar/Attributes$Name; flags 19
field name SPECIFICATION_TITLE descriptor Ljava/util/jar/Attributes$Name; flags 19
field name SPECIFICATION_VERSION descriptor Ljava/util/jar/Attributes$Name; flags 19
field name SPECIFICATION_VENDOR descriptor Ljava/util/jar/Attributes$Name; flags 19
field name EXTENSION_INSTALLATION descriptor Ljava/util/jar/Attributes$Name; flags 19 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;
field name IMPLEMENTATION_VENDOR_ID descriptor Ljava/util/jar/Attributes$Name; flags 19 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;
field name IMPLEMENTATION_URL descriptor Ljava/util/jar/Attributes$Name; flags 19 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;
method name <init> descriptor (Ljava/lang/String;)V flags 1
method name equals descriptor (Ljava/lang/Object;)Z flags 1
method name hashCode descriptor ()I flags 1
@@ -16698,6 +16712,7 @@ method name <init> descriptor ()V flags 1
class name javax/crypto/SealedObject
header extends java/lang/Object implements java/io/Serializable flags 21
innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19
field name encodedParams descriptor [B flags 4
method name <init> descriptor (Ljava/io/Serializable;Ljavax/crypto/Cipher;)V thrownTypes java/io/IOException,javax/crypto/IllegalBlockSizeException flags 1
method name <init> descriptor (Ljavax/crypto/SealedObject;)V flags 4
@@ -17086,6 +17101,10 @@ method name setEnableSessionCreation descriptor (Z)V flags 401
method name getEnableSessionCreation descriptor ()Z flags 401
method name getSSLParameters descriptor ()Ljavax/net/ssl/SSLParameters; flags 1
method name setSSLParameters descriptor (Ljavax/net/ssl/SSLParameters;)V flags 1
method name getApplicationProtocol descriptor ()Ljava/lang/String; flags 1
method name getHandshakeApplicationProtocol descriptor ()Ljava/lang/String; flags 1
method name setHandshakeApplicationProtocolSelector descriptor (Ljava/util/function/BiFunction;)V flags 1 signature (Ljava/util/function/BiFunction<Ljavax/net/ssl/SSLEngine;Ljava/util/List<Ljava/lang/String;>;Ljava/lang/String;>;)V
method name getHandshakeApplicationProtocolSelector descriptor ()Ljava/util/function/BiFunction; flags 1 signature ()Ljava/util/function/BiFunction<Ljavax/net/ssl/SSLEngine;Ljava/util/List<Ljava/lang/String;>;Ljava/lang/String;>;
class name javax/net/ssl/SSLEngineResult
header extends java/lang/Object flags 21 classAnnotations @Ljdk/Profile+Annotation;(value=I1)
@@ -17156,6 +17175,8 @@ method name setSNIMatchers descriptor (Ljava/util/Collection;)V flags 11 signatu
method name getSNIMatchers descriptor ()Ljava/util/Collection; flags 11 signature ()Ljava/util/Collection<Ljavax/net/ssl/SNIMatcher;>;
method name setUseCipherSuitesOrder descriptor (Z)V flags 11
method name getUseCipherSuitesOrder descriptor ()Z flags 11
method name getApplicationProtocols descriptor ()[Ljava/lang/String; flags 1
method name setApplicationProtocols descriptor ([Ljava/lang/String;)V flags 1
class name javax/net/ssl/SSLPeerUnverifiedException
header extends javax/net/ssl/SSLException flags 21 classAnnotations @Ljdk/Profile+Annotation;(value=I1)
@@ -17272,6 +17293,10 @@ method name setEnableSessionCreation descriptor (Z)V flags 401
method name getEnableSessionCreation descriptor ()Z flags 401
method name getSSLParameters descriptor ()Ljavax/net/ssl/SSLParameters; flags 1
method name setSSLParameters descriptor (Ljavax/net/ssl/SSLParameters;)V flags 1
method name getApplicationProtocol descriptor ()Ljava/lang/String; flags 1
method name getHandshakeApplicationProtocol descriptor ()Ljava/lang/String; flags 1
method name setHandshakeApplicationProtocolSelector descriptor (Ljava/util/function/BiFunction;)V flags 1 signature (Ljava/util/function/BiFunction<Ljavax/net/ssl/SSLSocket;Ljava/util/List<Ljava/lang/String;>;Ljava/lang/String;>;)V
method name getHandshakeApplicationProtocolSelector descriptor ()Ljava/util/function/BiFunction; flags 1 signature ()Ljava/util/function/BiFunction<Ljavax/net/ssl/SSLSocket;Ljava/util/List<Ljava/lang/String;>;Ljava/lang/String;>;
class name javax/net/ssl/SSLSocketFactory
header extends javax/net/SocketFactory flags 421 classAnnotations @Ljdk/Profile+Annotation;(value=I1)

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -2083,13 +2083,42 @@ method name equals descriptor (Ljava/lang/Object;)Z flags 1
method name toString descriptor ()Ljava/lang/String; flags 1
method name clone descriptor ()Ljava/lang/Object; thrownTypes java/lang/CloneNotSupportedException flags 1041
class name java/security/interfaces/RSAKey
-method name getParams descriptor ()Ljava/security/spec/AlgorithmParameterSpec;
class name java/security/spec/EncodedKeySpec
method name <init> descriptor ([BLjava/lang/String;)V flags 4
method name getAlgorithm descriptor ()Ljava/lang/String; flags 1
class name java/security/spec/MGF1ParameterSpec
-field name SHA512_224 descriptor Ljava/security/spec/MGF1ParameterSpec;
-field name SHA512_256 descriptor Ljava/security/spec/MGF1ParameterSpec;
class name java/security/spec/PKCS8EncodedKeySpec
method name <init> descriptor ([BLjava/lang/String;)V flags 1
class name java/security/spec/PSSParameterSpec
-field name TRAILER_FIELD_BC descriptor I
-method name toString descriptor ()Ljava/lang/String;
class name java/security/spec/RSAKeyGenParameterSpec
-method name <init> descriptor (ILjava/math/BigInteger;Ljava/security/spec/AlgorithmParameterSpec;)V
-method name getKeyParams descriptor ()Ljava/security/spec/AlgorithmParameterSpec;
class name java/security/spec/RSAMultiPrimePrivateCrtKeySpec
-method name <init> descriptor (Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;[Ljava/security/spec/RSAOtherPrimeInfo;Ljava/security/spec/AlgorithmParameterSpec;)V
class name java/security/spec/RSAPrivateCrtKeySpec
-method name <init> descriptor (Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/security/spec/AlgorithmParameterSpec;)V
class name java/security/spec/RSAPrivateKeySpec
-method name <init> descriptor (Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/security/spec/AlgorithmParameterSpec;)V
-method name getParams descriptor ()Ljava/security/spec/AlgorithmParameterSpec;
class name java/security/spec/RSAPublicKeySpec
-method name <init> descriptor (Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/security/spec/AlgorithmParameterSpec;)V
-method name getParams descriptor ()Ljava/security/spec/AlgorithmParameterSpec;
class name java/security/spec/X509EncodedKeySpec
method name <init> descriptor ([BLjava/lang/String;)V flags 1
@@ -2224,9 +2253,6 @@ innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang
class name java/time/chrono/IsoChronology
method name epochSecond descriptor (IIIIIILjava/time/ZoneOffset;)J flags 1
class name java/time/chrono/JapaneseEra
method name getDisplayName descriptor (Ljava/time/format/TextStyle;Ljava/util/Locale;)Ljava/lang/String; flags 1
class name java/time/format/DateTimeFormatter
header extends java/lang/Object flags 31
innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19
@@ -3221,12 +3247,6 @@ header extends java/lang/Object implements java/util/function/Function flags 601
innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19
class name java/util/jar/Attributes$Name
-field name EXTENSION_INSTALLATION descriptor Ljava/util/jar/Attributes$Name;
-field name IMPLEMENTATION_VENDOR_ID descriptor Ljava/util/jar/Attributes$Name;
-field name IMPLEMENTATION_URL descriptor Ljava/util/jar/Attributes$Name;
field name EXTENSION_INSTALLATION descriptor Ljava/util/jar/Attributes$Name; flags 19 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;
field name IMPLEMENTATION_VENDOR_ID descriptor Ljava/util/jar/Attributes$Name; flags 19 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;
field name IMPLEMENTATION_URL descriptor Ljava/util/jar/Attributes$Name; flags 19 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;
field name MULTI_RELEASE descriptor Ljava/util/jar/Attributes$Name; flags 19
class name java/util/jar/JarFile
@@ -3381,6 +3401,9 @@ method name finalize descriptor ()V thrownTypes java/io/IOException flags 4 depr
class name javax/crypto/ExemptionMechanism
-method name finalize descriptor ()V
class name javax/crypto/SealedObject
header extends java/lang/Object implements java/io/Serializable flags 21
class name javax/net/ssl/ExtendedSSLSession
method name getStatusResponses descriptor ()Ljava/util/List; flags 1 signature ()Ljava/util/List<[B>;
@@ -3388,12 +3411,6 @@ class name javax/net/ssl/HandshakeCompletedEvent
-method name getPeerCertificateChain descriptor ()[Ljavax/security/cert/X509Certificate;
method name getPeerCertificateChain descriptor ()[Ljavax/security/cert/X509Certificate; thrownTypes javax/net/ssl/SSLPeerUnverifiedException flags 1 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(since="9")
class name javax/net/ssl/SSLEngine
method name getApplicationProtocol descriptor ()Ljava/lang/String; flags 1
method name getHandshakeApplicationProtocol descriptor ()Ljava/lang/String; flags 1
method name setHandshakeApplicationProtocolSelector descriptor (Ljava/util/function/BiFunction;)V flags 1 signature (Ljava/util/function/BiFunction<Ljavax/net/ssl/SSLEngine;Ljava/util/List<Ljava/lang/String;>;Ljava/lang/String;>;)V
method name getHandshakeApplicationProtocolSelector descriptor ()Ljava/util/function/BiFunction; flags 1 signature ()Ljava/util/function/BiFunction<Ljavax/net/ssl/SSLEngine;Ljava/util/List<Ljava/lang/String;>;Ljava/lang/String;>;
class name javax/net/ssl/SSLEngineResult
header extends java/lang/Object flags 21
innerclass innerClass javax/net/ssl/SSLEngineResult$HandshakeStatus outerClass javax/net/ssl/SSLEngineResult innerClassName HandshakeStatus flags 4019
@@ -3409,19 +3426,11 @@ method name setEnableRetransmissions descriptor (Z)V flags 1
method name getEnableRetransmissions descriptor ()Z flags 1
method name setMaximumPacketSize descriptor (I)V flags 1
method name getMaximumPacketSize descriptor ()I flags 1
method name getApplicationProtocols descriptor ()[Ljava/lang/String; flags 1
method name setApplicationProtocols descriptor ([Ljava/lang/String;)V flags 1
class name javax/net/ssl/SSLSession
-method name getPeerCertificateChain descriptor ()[Ljavax/security/cert/X509Certificate;
method name getPeerCertificateChain descriptor ()[Ljavax/security/cert/X509Certificate; thrownTypes javax/net/ssl/SSLPeerUnverifiedException flags 401 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(since="9")
class name javax/net/ssl/SSLSocket
method name getApplicationProtocol descriptor ()Ljava/lang/String; flags 1
method name getHandshakeApplicationProtocol descriptor ()Ljava/lang/String; flags 1
method name setHandshakeApplicationProtocolSelector descriptor (Ljava/util/function/BiFunction;)V flags 1 signature (Ljava/util/function/BiFunction<Ljavax/net/ssl/SSLSocket;Ljava/util/List<Ljava/lang/String;>;Ljava/lang/String;>;)V
method name getHandshakeApplicationProtocolSelector descriptor ()Ljava/util/function/BiFunction; flags 1 signature ()Ljava/util/function/BiFunction<Ljavax/net/ssl/SSLSocket;Ljava/util/List<Ljava/lang/String;>;Ljava/lang/String;>;
class name javax/security/auth/Policy
header extends java/lang/Object flags 421 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(since="1.4")

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -77,6 +77,9 @@ class name javax/swing/ImageIcon
field name component descriptor Ljava/awt/Component; flags 1c
field name tracker descriptor Ljava/awt/MediaTracker; flags 1c
class name javax/swing/JComboBox
-method name processKeyBinding descriptor (Ljavax/swing/KeyStroke;Ljava/awt/event/KeyEvent;IZ)Z
class name javax/swing/JComponent
field name accessibleContext descriptor Ljavax/accessibility/AccessibleContext; flags 4
-method name hide descriptor ()V
@@ -90,8 +93,12 @@ field name accessibleFocusHandler descriptor Ljava/awt/event/FocusListener; flag
class name javax/swing/JDesktopPane
-method name remove descriptor (Ljava/awt/Component;)V
class name javax/swing/JViewport
-method name addNotify descriptor ()V
class name javax/swing/JList$AccessibleJList$AccessibleJListChild
method name getAccessibleAction descriptor ()Ljavax/accessibility/AccessibleAction; flags 1
class name javax/swing/plaf/basic/BasicRadioButtonUI
-method name installListeners descriptor (Ljavax/swing/AbstractButton;)V
-method name uninstallListeners descriptor (Ljavax/swing/AbstractButton;)V
class name javax/swing/tree/DefaultMutableTreeNode
-method name setParent descriptor (Ljavax/swing/tree/MutableTreeNode;)V

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