Compare commits

..

397 Commits

Author SHA1 Message Date
Vyacheslav Moklev
871fbb45e0 JBR-2442 fix memory leak of fileBuffer
fix was suggested by Nikita Gubarkov
2021-06-23 14:29:04 +01:00
Denis Konoplev
f9d78954c6 JBR-3544: Generate popup invoked instead of New in this directory 2021-06-23 11:57:58 +03:00
Vitaly Provodin
1bdb9d291f JBR-2545 Clean up the list of ignored Render tests
(cherry picked from commit f7b4c42e1d)
2021-06-23 07:07:32 +03:00
Jayathirth D V
d57330da6b 8241490: Add large text performance tests in RenderPerfTest
(cherry picked from commit 803ee2f2b5)
2021-06-23 07:07:31 +03:00
Alexey Ushakov
d8378498a1 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)
(cherry picked from commit 8bd8d2d132)
2021-06-23 07:07:30 +03:00
Konstantin Bulenkov
bec1b51441 Update FiraCode to 5.2
(cherry picked from commit 71e2a8d8ad)
2021-06-23 07:07:29 +03:00
Alexey Ushakov
a47d0d0f04 JBR-1929 Improve rendering of San Francisco font of macOS Catalina
Reverting gamma correction because of rendering artifacts in the light theme

This reverts commit 5016db51

(cherry picked from commit c1d644a004)
2021-06-23 07:07:28 +03:00
Alexey Ushakov
285656cb58 JBR-1929 Improve rendering of San Francisco font of macOS Catalina
Added gamma correction to match grayscale rendering with subpixel one

(cherry picked from commit 5016db518a)
2021-06-23 07:07:27 +03:00
Alexey Ushakov
5d016e02f4 JBR-2463 Font rendering problem on macOS Mojave
Use adjusted advances for glyphs

(cherry picked from commit 1af5dd4aae)
2021-06-23 07:07:26 +03:00
Anton Tarasov
1153da9d05 JBR-3413 use timeout in CAccessibility.invokeAndWait 2021-06-23 07:07:25 +03:00
Anton Tarasov
a6da53aae9 revert: JBR-1434 "New file dialog" popup remains above all windows on switching application
java.awt.peer.WindowPeer.isLightweightDialog() method does not exist.

(cherry picked from commit 7d8aeaf7de)
2021-06-23 07:07:24 +03:00
Anton Tarasov
f04b644f00 JBR-2872 improve: JBR-2866 JCEF: Markdown editor steals focus from a different frame
(cherry picked from commit bad748e3d0)
2021-06-23 07:07:23 +03:00
Anton Tarasov
6b296f9a8a JBR-2866 JCEF: Markdown editor steals focus from a different frame 2021-06-23 07:07:22 +03:00
Anton Tarasov
8621994718 JBR-2645 enable CefBrowser.close(true) in jcef reg tests
(cherry picked from commit 492c217125)
2021-06-23 07:07:21 +03:00
Anton Tarasov
907601d37d JBR-2259 WebSite isn't loaded with .loadUrl method if browser isn't shown in UI
(cherry picked from commit 57bbddf071)
2021-06-23 07:07:19 +03:00
Anton Tarasov
45072c51b2 JBR-2557 use com.jetbrains.cef.JCefAppConfig in JCEF tests
(cherry picked from commit e30a309f92)
2021-06-23 07:07:18 +03:00
Anton Tarasov
a72d27bea1 JBR-2489 Git branch operations (switch to another branch, rebase) sometimes crash WebStorm 202.5428.27
(cherry picked from commit 81d2156fb1)
2021-06-23 07:07:17 +03:00
Anton Tarasov
84743c0534 JBR-2282 [jcef] update to JCEF/80.0.4+g74f7b0c+chromium-80.0.3987.122
(cherry picked from commit a5adc725df)
2021-06-23 07:07:16 +03:00
Anton Tarasov
c6bb789459 JBR-2305 jcef: jb/java/jcef/JCEFStartupTest.java throws java.lang.ExceptionInInitializerError
(cherry picked from commit f0385f01ec)
2021-06-23 07:07:15 +03:00
Anton Tarasov
505423d878 JBR-2306 jcef: jb/java/jcef/JCEFStartupTest.java unexpectedly exits with the exit code: 0
(cherry picked from commit ff7d7bd43c)
2021-06-23 07:07:14 +03:00
Anton Tarasov
78b73c40d3 JBR-2299 [mac] jcef requests for "chromium safe storage" keychain access
(cherry picked from commit dd1334a352)
2021-06-23 07:07:13 +03:00
Anton Tarasov
e394f0f966 JBR-2222 Crash during closing IDE
(cherry picked from commit d0c367b31f)
2021-06-23 07:07:12 +03:00
Anton Tarasov
6541014b7a JBR-2287 [jcef] add CefBrowser wrapper to jtreg tests
(cherry picked from commit fa961d1769)
2021-06-23 07:07:11 +03:00
Anton Tarasov
c166685074 JBR-2169 AWTThreading: remove tracked invocation event from completion listener
(cherry picked from commit a855f3b835)
2021-06-23 07:07:10 +03:00
Anton Tarasov
2d2709331a JBR-2159 Native crash in thread AWT-EventQueue-0 when trying to push commit
(cherry picked from commit bba297b4a4)
2021-06-23 07:07:09 +03:00
Anton Tarasov
48bc17eb27 JBR-2148 JCEF: JBR bundle has invalid app structure
(cherry picked from commit f45f84d7ed)
2021-06-23 07:07:08 +03:00
Anton Tarasov
ff4f9c6e77 JBR-2146 improve InvokeOnToolkitHelper to cover more generic case 2021-06-23 07:07:07 +03:00
Anton Tarasov
5a117a2019 JBR-2139 Idea freeze on dynamic plugin unloading
(cherry picked from commit e57bae4f66)
2021-06-23 07:07:06 +03:00
Anton Tarasov
ffdf42678c JBR-2099 jb/java/jcef/JCEFStartupTest.java fails on Windows, Linux
(cherry picked from commit 3dfb0aa16a)
2021-06-23 07:07:05 +03:00
Anton Tarasov
b31994453d JBR-2093 create reg test for JCEF startup
(cherry picked from commit e8c2761f5b)
2021-06-23 07:07:04 +03:00
Anton Tarasov
6da27f795d JBR-2082 Revealing taskbar does not work when "Automatically hide the taskbar"
(cherry picked from commit b31a41fb2f)
2021-06-23 07:07:02 +03:00
Mikhail Grishchenko
641eb013d3 JBR-2639, JBR-2412 [jcef] Tests that checks mouse events
(cherry picked from commit b7cde4fd05)
2021-06-23 07:07:01 +03:00
Mikhail Grishchenko
31bce7b3db JBR-2639 [win] jcef does not recognize vertical mouse wheel events
added regression test

(cherry picked from commit e8e4741bb0)
2021-06-23 07:07:00 +03:00
Mikhail Grishchenko
2ec797612e JBR-2412 [windows] mouse listener does not work for jcef
added regression test

(cherry picked from commit d1479872f2)
2021-06-23 07:06:59 +03:00
Elena Sayapina
8c0c8f72bb 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)
2021-06-23 07:06:58 +03:00
Mikhail Grishchenko
2d368311d3 JBR-2430 [jcef] Added Regression test
Checks that JS Query is handled in 2nd opened browser

(cherry picked from commit 404ff84565)

Refactoring + changed EDT awaiting method

(cherry picked from commit dc24658b31)
2021-06-23 07:06:57 +03:00
Vitaly Provodin
15c5ca53ba exclude the new printer test 8262731 2021-06-23 07:06:56 +03:00
Alexey Ushakov
ee9ff54a2a 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL
Keep MTLLayer opacity in sync with window content view
2021-06-23 07:06:55 +03:00
Alexey Ushakov
af58835c19 JBR-2419 Improve performance of CStrike.getNativeGlyphOutlineBounds
Do not pass the result via java object. Use more straight api.

(cherry picked from commit 9f91fe91f5)
(cherry picked from commit c0fd2daf5c)
2021-06-23 07:06:54 +03:00
Alexey Ushakov
4f0294d522 JBR-2382 Provide detailed stack trace in crash dumps for unhandled ObjC exceptions
Used user home dir for jbr_err files. Removed logging with reportException method

(cherry picked from commit 2c8cdb221b)

JBR-2382 Provide detailed stack trace in crash dumps for unhandled ObjC exceptions

Used process workdir for jbr_err files. Added one more logging to reportException method

(cherry picked from commit 95a47810d5)

JBR-2382 Provide detailed stack trace in crash dumps for unhandled ObjC exceptions

Generate jbr_err_pidXX.log file with detailed stack trace of the exception

(cherry picked from commit 4c42f75021)
2021-06-23 07:06:53 +03:00
Artem Bochkarev
3abd56b5b6 JBR-2253: unset LD_PRELOAD just after VM loaded
workaround for JBR-2253 Preload libjsig.so to fix JNA crashes

(cherry picked from commit 127a2deddf)
2021-06-23 07:06:52 +03:00
Kirill Kirichenko
8e602d500a JBR-1874 Cursor not changing from 'default' to 'text'. Additional fix after reopening.
(cherry picked from commit 5a29d4ade9)
2021-06-23 07:06:51 +03:00
Nikita Gubarkov
596535310e Add JBR-specific .idea project files 2021-06-23 07:06:50 +03:00
Nikita Gubarkov
c6594d9285 Added Clion project setup 2021-06-23 07:06:48 +03:00
Nikita Gubarkov
023f704cf7 Updated IDEA project setup 2021-06-23 07:06:47 +03:00
Elena Sayapina
40d3966f87 JBR-1388 [TESTBUG] Regression test java/awt/Graphics2D/DrawString/LCDTextSrcEa.java fails on macOS Mojave
(cherry picked from commit 50b24a147b)
2021-06-23 07:06:46 +03:00
Elena Sayapina
70333efefe 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)
2021-06-23 07:06:45 +03:00
Alexey Ushakov
949b0d688c 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL
Implemented blit via compute kernel
2021-06-23 07:06:44 +03:00
Denis Konoplev
7d3cc7f4db fixup! macOS national keyboard support
Remove unused import that broke compilation
2021-06-23 07:06:43 +03:00
Elena Sayapina
d47dfe10c0 IDEA-165950 [TESTUPDATE] National keyboard layouts support
Update regression test after the following commits:

02fad83c: Remove public constants from KeyEvent
f4227faf: Impossible to assign cmd+ß shortcuts
(cherry picked from commit 264802cf4b)
2021-06-23 07:06:42 +03:00
Konstantin Aleev
fb6d2d32ad fix memory leaks in AccessibleJTree
(cherry picked from commit 561a7b8def)
2021-06-23 07:06:41 +03:00
Elena Sayapina
4013153a0f 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)
2021-06-23 07:06:40 +03:00
Mikhail Grishchenko
bca36ea84a JBR-2259 WebSite isn't loaded with .loadUrl method if browser isn't shown in UI
Added reproducer

(cherry picked from commit e875bf72c9)
2021-06-23 07:06:39 +03:00
Denis Konoplev
ee03038cbe JBR-2490 Add option to work with Surface Pen
(cherry picked from commit 5acc7680a1)
2021-06-23 07:06:38 +03:00
Denis Konoplev
32c58721c2 JBR-2669: set unicode for both keyCode and extendedKeyCode
(cherry picked from commit ba3f14c83a)
2021-06-23 07:06:37 +03:00
Denis Konoplev
08637a0bb0 JBR-2554: Proper unicode values in KeyEvent.keyCode
(cherry picked from commit 703d77a927)
2021-06-23 07:06:36 +03:00
Denis Konoplev
9c7f5362fb JBR-215: Remove SystemInfo
(cherry picked from commit 9adf77a512)
2021-06-23 07:06:35 +03:00
Denis Konoplev
92efdda997 JBR-215: Separate LatinNonAlphaNumKeycodes option
(cherry picked from commit caf366f6f3)
2021-06-23 07:06:33 +03:00
Denis Konoplev
a4b5841588 JBR-215: Windows non-alphanumeric shortcuts
(cherry picked from commit 4f60efebe2)
2021-06-23 07:06:32 +03:00
Denis Konoplev
d23aab807b JBR-2280: Fix regression. Mode compatible with old option.
(cherry picked from commit a3e3c23cb1)
2021-06-23 07:06:31 +03:00
Denis Fokin
55d430f807 macOS national keyboard support 2021-06-23 07:06:30 +03:00
Sergey Malenkov
ace6ce7439 JBR-1929 FractionalMetricsSupport
(cherry picked from commit bbdc159762)
2021-06-23 07:06:29 +03:00
Mikhail Grishchenko
a86dd9ea57 JBR-2256 JEditorPane with test/html type and zero margins is not shown
Updated reproducer

(cherry picked from commit 529a188b8b)

JBR-2256 JEditorPane with test/html type and zero margins is not shown

Added reproducer

(cherry picked from commit 41578a40b5)
2021-06-23 07:06:28 +03:00
Mikhail Grishchenko
8b46f96794 JBR-2210 IDEA fails to start (JVM crashes) when using the -Dfile.encoding=UTF-8in IDEA's vmoptions file
Added regression test

(cherry picked from commit 4e1f5a43b3)
2021-06-23 07:06:27 +03:00
Alexey Ushakov
5b7a5b2e98 JBR-2210 IDEA fails to start (JVM crashes) when using the -Dfile.encoding=UTF-8in IDEA's vmoptions file
Returning devanagari subset back for ja.UTF-8 to get non-null font name from WFontConfiguration.getTextComponentFontName(). It is a regression from JDK-8208179.

(cherry picked from commit b51254a975)
2021-06-23 07:06:26 +03:00
Mikhail Grishchenko
90ea04d331 JBR-1414 [Test] downscale frames to run on low-dpi screens
(cherry picked from commit b46e74fe6f)
2021-06-23 07:06:25 +03:00
Elena Sayapina
62b34ca27a 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)
2021-06-23 07:06:24 +03:00
Alexey Ushakov
4d60acffc3 JBR-2135 Use CoreText api to select the font with the most recent version
Added a property to force loading bundled fonts: -Djava2d.font.noVersionCheck=true

(cherry picked from commit cbb148dff4)
2021-06-23 07:06:23 +03:00
Alexey Ushakov
1f96fab51d JBR-2137 JetBrainsMono fonts update to v1.0.3
(cherry picked from commit a6e441828a)
2021-06-23 07:06:22 +03:00
Mikhail Grishchenko
08c39c6055 JBR-1414: Added regression test for dnd with HiDPI scaling
(cherry picked from commit 1f4ab12fbb)
2021-06-23 07:06:21 +03:00
Elena Sayapina
cfc82b8af8 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)
2021-06-23 07:06:20 +03:00
Konstantin Bulenkov
1e19017900 Update JetBrains Mono to 1.0.2
(cherry picked from commit 6f4a13e46f)
2021-06-23 07:06:18 +03:00
Ivan Migalev
fe0cfae0a9 Extract the DWM colorization parameters from registry (JBR-2070)
(cherry picked from commit 0330cab60b)
2021-06-23 07:06:17 +03:00
Ivan Migalev
4ea982615d Refresh desktop properties on WM_DWMCOLORIZATIONCOLORCHANGED (JBR-2070)
(cherry picked from commit 06086f4a7e)
2021-06-23 07:06:16 +03:00
Ivan Migalev
fe68ecb28d Fix a possible resource leak in ColorizationColorAffectsBorders
(cherry picked from commit 0c911b6ffe)
2021-06-23 07:06:15 +03:00
Elena Sayapina
3584c2dc5a JBR-2086 JetBrainsMono fonts update to v1.0.1
(cherry picked from commit a4b373e631)
2021-06-23 07:06:14 +03:00
Konstantin Bulenkov
fcc479e437 JetBrains Mono 1.0
(cherry picked from commit d514f7a982)
2021-06-23 07:06:13 +03:00
Alexey Ushakov
324be919c4 JBR-1110 [JDK11] java/awt/font/Outline/OutlineInvarianceTest.java: Failed for font java.awt.Font[family=Dialog,name=MS Gothic,style=bold,size=30]
Replaced FT_LOAD_NO_HINTING mode for non AA rendering with FT_LOAD_TARGET_LIGHT

(cherry picked from commit 3368768244)
2021-06-23 07:06:12 +03:00
Denis Konoplev
952d17da7d JBR-3444: Return NullSurfaceData when gc == null
(cherry picked from commit 01ad15e61c)
2021-06-23 07:06:11 +03:00
Denis Konoplev
2f5fd5633e JBR-1995: Last character issue with korean
Fix for JTextComponent

(cherry picked from commit a7c8b0b535)
2021-06-23 07:06:10 +03:00
Denis Konoplev
ef77e22a57 JBR-2891: Post PhaseEvents in the begin and end of Magnify and Rotate
(cherry picked from commit c811c295c2)
2021-06-23 07:06:09 +03:00
Denis Konoplev
8ae392da23 JBR-2444: Turn on IM workaround by default
(cherry picked from commit 15c4ce1d3e)
2021-06-23 07:06:08 +03:00
Denis Konoplev
eb321704cf Fix build: add import & fix jwhen 2021-06-23 07:06:07 +03:00
Denis Konoplev
9ef17a2b66 JBR-2795: Add explicit conversion
(cherry picked from commit bf3e1c0c31)
2021-06-23 07:06:06 +03:00
Denis Konoplev
2d89645335 IDEA-237231: Correct signarute mask
(cherry picked from commit 6974131eec)
2021-06-23 07:06:05 +03:00
Denis Konoplev
5d47aec5a1 IDEA-237231: Possible fix for pen interraction
(cherry picked from commit 33a8c95d39)
2021-06-23 07:06:03 +03:00
Denis Konoplev
4565ea48ed JBR-2347: Free memory on other exceptions, rethrow ThreadDead & log it
(cherry picked from commit 16ca839ed3)
2021-06-23 07:06:02 +03:00
Denis Konoplev
89175d258e JBR-2347: Don't free memory when thread is dead
(cherry picked from commit afb3303db5)
2021-06-23 07:06:01 +03:00
Denis Konoplev
5d222bfaa3 JBR-2041: Project view tap fix, recovery? constants & logging
(cherry picked from commit 1e904db3b0)
2021-06-23 07:06:00 +03:00
Denis Konoplev
51ada575f6 IDEA-229135: Fling animation stop on tap
(cherry picked from commit 7ce0f79561)
2021-06-23 07:05:59 +03:00
Denis Konoplev
4c0a601857 Windows touch screen support
(cherry picked from commit cab3f28907)
2021-06-23 07:05:58 +03:00
Denis Konoplev
2280f9b637 Turn off multitouch
(cherry picked from commit a2576ffa9a)
2021-06-23 07:05:57 +03:00
Denis Konoplev
422b9cee97 Check XInput extension && touch inertia
(cherry picked from commit cca7fb97f4)
2021-06-23 07:05:56 +03:00
Denis Konoplev
b7389b6c4e Touch scroll handling
(cherry picked from commit 6dcec3dc31)
2021-06-23 07:05:55 +03:00
Denis Konoplev
35f84ca05e XI2 Constants
(cherry picked from commit 588cd6ee73)
2021-06-23 07:05:54 +03:00
Denis Konoplev
2c499871f7 XLibWrapper XI2 functions
(cherry picked from commit d6bd1bfa2b)
2021-06-23 07:05:53 +03:00
Denis Konoplev
c628e34c55 X11 native get put double
(cherry picked from commit f101bc1108)
2021-06-23 07:05:52 +03:00
Denis Konoplev
a0fcbe9a72 Native data types
(cherry picked from commit 9504574dbb)
2021-06-23 07:05:50 +03:00
Denis Konoplev
6ea4422fd5 XI2 headers in xlib wrapper generator
(cherry picked from commit ef108067a1)
2021-06-23 07:05:49 +03:00
Denis Konoplev
a3cefd997d Revert "Turn off multitouch"
This reverts commit 90ea3bf57e4c687e9d9bf0a37f2f64c82a81f4eb.
2021-06-23 07:05:48 +03:00
Denis Konoplev
f86241dd4b Turn off multitouch
(cherry picked from commit a2576ffa9a)
2021-06-23 07:05:47 +03:00
Alexey Ushakov
0a1724146b JBR-2000 RM 2019.3.1 font rendering regression, normal text is heavier
Added -Djava2d.font.loadFontConfig=bundled to force loading bundled font.conf

(cherry picked from commit 788e078f64)
2021-06-23 07:05:46 +03:00
Alexey Ushakov
30d679351b JBR-1962 Allow to change font config
Replaced several privileged blocks with just one

(cherry picked from commit faa8d3d258)
2021-06-23 07:05:45 +03:00
Vitaly Provodin
fa4d7cb32b 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)
2021-06-23 07:05:44 +03:00
Dennis Ushakov
5a09b36d9f JBR-1863, JBR-1868 correct advances on Catalina 2021-06-23 07:05:43 +03:00
Dennis Ushakov
6ff63947e5 JBR-1850: on macOS fonts should be sorted by weight to ensure proper population of the families 2021-06-23 07:05:42 +03:00
Dennis Ushakov
a3775f11db faster font family loading & lazy font family population
1. NSFont.familyName is faster than loading allFamilyNames
2. Prebuilt list of system fonts
3. Cleanup San Francisco family loading
4. Avoid calling expensive native getWidth on font when creating font family, load styles only when they would be used.
2021-06-23 07:05:41 +03:00
Dennis Ushakov
e83b2c76a5 JBR-1756 use CoreText for all font rendering on Catalina 2021-06-23 07:05:40 +03:00
Nikita Gubarkov
f2c16a8fff JBR-410 Added emoji support for Linux 2021-06-23 07:05:39 +03:00
Alexey Ushakov
6c9e41cdde JBR-1997 JetBrainsMono fonts update to v0.22
(cherry picked from commit 41f4fddd34)
(cherry picked from commit f5302a02f4)
(cherry picked from commit 5d7fd2e1e5)
2021-06-23 07:05:38 +03:00
Anton Tarasov
d4e56a8430 JRE-729 [windows] unreasonable IME activity consumes CPU 2021-06-23 07:05:36 +03:00
Dmitry Batrak
f055c1bad6 JBR-3119 Application's panel in KDE taskbar blinks when popup window is shown
this re-fixes JBR-2934 in a different way

(cherry picked from commit 63134e091b)
2021-06-23 07:05:35 +03:00
Dmitry Batrak
1850b7e13f JBR-3038 Unexpected windows z-order change on workspace switch
(cherry picked from commit ddda860f42)
2021-06-23 07:05:34 +03:00
Dmitry Batrak
626a7bc3a5 JBR-3035 The Confirm Exit pop-up window remains hidden behind a window of another application
(cherry picked from commit 470c3bd1b5)
2021-06-23 07:05:33 +03:00
Dmitry Batrak
c84ea20fe5 JBR-2934 Serious usability issue with GoLand 2020.3 caused by JBR
(cherry picked from commit 95be4351d4)
2021-06-23 07:05:32 +03:00
Dmitry Batrak
3c2c79d80b JBR-2977 Opening a recent project in a new window doesn't bring this window to the front
(cherry picked from commit 2d9fb9e7b8)
2021-06-23 07:05:31 +03:00
Dmitry Batrak
f8ca5f3221 JBR-2698 setAutoRequestFocus(false) breaks focus logic under i3 window manager on Linux
(cherry picked from commit ebcdeb7d80)
2021-06-23 07:05:30 +03:00
Dmitry Batrak
aee2ad6b61 JBR-2696 Log focus API invocations with stack traces
(cherry picked from commits 0f038754e5, a507cab6d3)
2021-06-23 07:05:29 +03:00
Dmitry Batrak
cf99b64876 JBR-2496 Prevent JVM stealing focus from other applications on Linux (JBR-2497, JBR-2499, JBR-2503, JBR-2652)
(cherry picked from commits 87525d1d2a, 66381f0dec, 8a789e04e9, 665ebc5d47, 98a9219c23)
2021-06-23 07:05:28 +03:00
Alexey Ushakov
5205cea1cd JBR-3509 Extend JDK-8267521 (Post JEP 411 refactoring: maximum covering > 50K) to JBR specific changes
Marked all the usages of SecurityManager related api
2021-06-23 07:05:27 +03:00
Artem Bochkarev
6e2eaa860e JBR-1851: check NSArray length
and make more exception-safe
and minor optimization for logging (cache jobjects)

(cherry picked from commit 5839539379)
2021-06-23 07:05:26 +03:00
Artem Bochkarev
ea66dc1b38 JBR-1841: allow deferred disabling of InputMethods-support
(cherry picked from commit 969255904b)
2021-06-23 07:05:25 +03:00
Artem Bochkarev
d9011e2a09 JBR-1762: request focus of immediate parent when dispose popup
because requesting focus for frame-parent causes to close whole popup chain

(cherry picked from commit 7a2ccfc521)

JBR-1762: fixed review comments

(cherry picked from commit 0efbe5d9b9)
2021-06-23 07:05:23 +03:00
Artem Bochkarev
7ef929571a JBR-1668: add hardcoded default values for preferences node NSServicesStatus
(cherry picked from commit 8445f53d85)
2021-06-23 07:05:22 +03:00
Artem Bochkarev
fcd0c47015 JBR-1515: obtain shortcut from OS to check inside AWTView.performKeyEquivalent
(cherry picked from commit 30d479fbd4)
2021-06-23 07:05:21 +03:00
Artem Bochkarev
8f19077100 JBR-1668: add hardcoded descriptions of system actions
and minor fixes

fix memory management

(cherry picked from commit 15f7368309)
2021-06-23 07:05:20 +03:00
Elena Sayapina
7ffc1bc236 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)
2021-06-23 07:05:19 +03:00
Alexey Ushakov
070b0ec84e JBR-1690 Bundle new fonts
Test correction
Restored RenderUtil.java
Removed obsolete golden images
(cherry picked from commits:
aa13c8b4ea
943b1472c7
cab6dd5087
7997c7a5ee
cab6dd5087
7997c7a5ee
d3731df79d)
2021-06-23 07:05:18 +03:00
Dmitry Batrak
ee723f0740 IDEA-257525 Unable to show Chinese when using IDEA mac ARM version
The proposed solution is to use a 'normal' font as a base for 'San Francisco' font fallback.
Most of its fallback components/candidates (provided by the OS) are expected to be normal
fonts as well, and so the resulting coverage of Unicode character repertoire should be much better.

(cherry picked from commits 9b7113a6cf, 92b00d50b5, 53489fab27)
2021-06-23 07:05:17 +03:00
Dmitry Batrak
25c7fe161b 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)

cherry picked from commit 0db7e948af
2021-06-23 07:05:16 +03:00
Dmitry Batrak
a1954f8391 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)

cherry-picked from commit f309844f75
2021-06-23 07:05:15 +03:00
Artem Bochkarev
6ee307f196 JBR-1771: fixed compilation errors (macosx-x86_64-normal-server-fastdebug)
(cherry picked from commit 1acada7cac)
2021-06-23 07:05:14 +03:00
Artem Bochkarev
a75500c9e7 JBR-1668: minor fixes
fixed review comments

(cherry picked from commit 9dbcf194c9)
2021-06-23 07:05:13 +03:00
Vitaly Provodin
aa1bad552d JBR-1618: fixed misprint, added saving screenshots in case of failure
(cherry picked from commit e4a3889cf0)
2021-06-23 07:05:12 +03:00
Alexey Ushakov
940eaad7a6 JBR-1624 Fonts rendering is broken in the 2019.2 EAP (Fira Code)
Corrected lookup for bold fonts

(cherry picked from commit 114b8af38f)
2021-06-23 07:05:11 +03:00
Alexey Ushakov
7ad36e8033 JBR-1399 Improve font discovery and loading by introducing font cache
Added unit test

(cherry picked from commit b4f5bf8bd3)
2021-06-23 07:05:10 +03:00
Elena Sayapina
87f931bdcf IDEA-165950 [TEST] Added new regression test (National keyboard layouts support)
(cherry picked from commit 0900a705bc)
2021-06-23 07:05:08 +03:00
Artem Bochkarev
bc25c4eabe JBR-1668: read system keyboard shortcuts
initial support for OS X

(cherry picked from commit 6bbe7102e2)
2021-06-23 07:05:07 +03:00
Artem Bochkarev
1c620b5dde JBR-1573: restore current input context after cleanup
(cherry picked from commit b7acd7f6f6)
2021-06-23 07:05:06 +03:00
Alexey Ushakov
14d6f07974 JBR-1624 Fonts rendering is broken in the 2019.2 EAP (Fira Code)
Restored old behaviour of registerFontsInDir as it does not affect idea bundled fonts

(cherry picked from commit cef29e8100)
2021-06-23 07:05:05 +03:00
Alexey Ushakov
7597c79ec3 JBR-1874 Cursor not changing from 'default' to 'text'
Prevent OS from changing cursor

(cherry picked from commit 94a4eb7002)
2021-06-23 07:05:04 +03:00
Alexey Ushakov
a82cacb8fd 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)
2021-06-23 07:05:03 +03:00
Alexey Ushakov
9bca8c0609 JBR-1699 Use platform font rendering for bundled fonts on MacOS
Use different family for specific font faces. Refactoring

(cherry picked from commit c423003bd4)
2021-06-23 07:05:02 +03:00
Alexey Ushakov
9c8b7a4638 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)
2021-06-23 07:05:01 +03:00
Alexey Ushakov
fb8f212a89 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)
2021-06-23 07:05:00 +03:00
Alexey Ushakov
2fd46484b2 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)
2021-06-23 07:04:59 +03:00
Alexey Ushakov
0a1fdd7d3b 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)
2021-06-23 07:04:58 +03:00
Alexey Ushakov
39057baa11 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)
2021-06-23 07:04:57 +03:00
Alexey Ushakov
3cdfe6629d JBR-1645 javax/swing/JTextArea/TestTabSize.java: Tab width calculation wrong
Corrected idea font filter

(cherry picked from commit 62f9d1f46a)
2021-06-23 07:04:56 +03:00
Artem Bochkarev
bd2df7986d JBR-1573: workaround for 'Sudden keyboard death on Ubuntu 18'
recreate instance of system InputMethod when starts filter all events

(cherry picked from commit 3ad94911af)

(cherry picked from commit c8533a1219)
2021-06-23 07:04:55 +03:00
Alexey Ushakov
31b6c234b0 JBR-1399 Improve font discovery and loading by introducing font cache
Bundle IDEA fonts to improve startup performance

(cherry picked from commit 350a3fdef3)
2021-06-23 07:04:54 +03:00
Artem Bochkarev
b05b735da5 JBR-1541: activate menu in completion handler of modal dialog
(cherry picked from commit e57384c1d6)
2021-06-23 07:04:53 +03:00
Alexey Ushakov
b6df2597cf JBR-1314 Font difference in pycharm 2019.1 on Ubuntu
Removed disabling hints on MAX_FCSIZE_LTL_DISABLED font size

(cherry picked from commit 2b99dfed40)
2021-06-23 07:04:52 +03:00
Alexey Ushakov
8ee98f99ae JBR-1412 [fwp to JBR11] JBR-1393 RubyMine is hanging after log in (macOS)
Modified version of JBR8 fix

(cherry picked from commit 434166fe63)
2021-06-23 07:04:50 +03:00
Alexey Ushakov
a72fd4a4e8 JBR-1394 JBR11 does not support LCD text on Mac
Enable LCD rendering for transparent destinations

(cherry picked from commit 207c6b92ff)
2021-06-23 07:04:49 +03:00
Elena Sayapina
c47a6a1bf6 JBR-1380: [TESTBUG] Regression test java/awt/Graphics2D/DrawString/LCDTextSrcEa.java works incorrectly
(cherry picked from commit 95df9908f4)
2021-06-23 07:04:48 +03:00
Elena Sayapina
7ac64cfb7e JBR-1372: [TESTBUG] JDialog1054.java, MoveFocusShortcutTest.java regression tests need update
(cherry picked from commit a5948894bf)
2021-06-23 07:04:47 +03:00
Maxim Kartashev
4449d0269a JBR-2755 IDE UI became slow via remote X Server connection from Windows
When XGetImage() calls become slow in a remote X11 session, fake
XGetImage() with client-side XCreateImage() that is filled with some
background color. The color is chosen from several top left corner
pixels of the "slow" images obtained with XGetImage().

This feature activates in a remote X11 session only and is
controlled with -Dremote.x11.workaround={true|false|auto}.
2021-06-23 07:04:46 +03:00
Vyacheslav Moklev
17e87e199d Fix const pointer after JDK-8225032 fix 2021-06-23 07:04:45 +03:00
Vyacheslav Moklev
daa553a6a5 Fix compilation on windows platform: awt_ole.h must be included before awt.h 2021-06-23 07:04:44 +03:00
Vyacheslav Moklev
d97dfd8d24 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
2021-06-23 07:04:43 +03:00
Vyacheslav Moklev
922d7cbe8f JBR-1271 Wrong parent of native windows dialogs
Set a proper parent to a dialog window
2021-06-23 07:04:42 +03:00
Vyacheslav Moklev
2d9ff62530 JBR-1273 Common Item Dialog does not open when wrong path to directory is passed
Handle set directory / set file properly
2021-06-23 07:04:41 +03:00
Vyacheslav Moklev
a29d6e371b JBR-1274 Common Item Dialog sometimes crash the process
Prevent from freeing memory with CoTaskMemFree twice
2021-06-23 07:04:40 +03:00
Vyacheslav Moklev
29e7aed94b JBR-1257 CommonItemDialog modal window has no owner
Fix modality for Common Item Dialog
2021-06-23 07:04:39 +03:00
Vyacheslav Moklev
e92a3d3d0e JBR-1258 CommonItemDialog ignores directory to open
Fix parsing of directory path / file path
2021-06-23 07:04:38 +03:00
Vyacheslav Moklev
8ccbabcd0b 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
2021-06-23 07:04:37 +03:00
Alexey Ushakov
8cfb14ce8e JBR-1144 [JDK11] [macos] Held down key is not deleted when press backspace after accent menu popup (Mojave)
Handled both Delete and ForwardDelete keys

(cherry picked from commit e3ba0bd651)
2021-06-23 07:04:36 +03:00
Alexey Ushakov
2238489d6f JBR-1144 [JDK11] [macos] Held down key is not deleted when press backspace after accent menu popup (Mojave)
Handled backspace separately

(cherry picked from commit 81916a92af)
2021-06-23 07:04:35 +03:00
Elena Sayapina
9b7b5155fe 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)
2021-06-23 07:04:34 +03:00
Elena Sayapina
b996a98bdf JBR-998: [TEST] Added new regression test (Input freezes after MacOS key-selector on Mojave)
(cherry picked from commit 3d898a8024)
(cherry picked from commit f368f0f101)
2021-06-23 07:04:33 +03:00
Elena Sayapina
fb250a69b3 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)
2021-06-23 07:04:32 +03:00
Elena Sayapina
5cbfc7a28a JBR-1054: [TEST] Added new regression test (Weird non-modal dialog above modal dialog behaviour)
(cherry picked from commit b808be6a6a)
(cherry picked from commit 48b7dd874f)
2021-06-23 07:04:31 +03:00
Vitaly Provodin
4d97d66887 JRE-1117 J2DBench: introduced result reader for TC's charts (follow up)
separated printing values fo TC charts and values for comparisons

(cherry picked from commit bbdbe17e2a)
2021-06-23 07:04:30 +03:00
Vitaly Provodin
64f8f02f99 JRE-1117 J2DBench: introduced result reader for TC's charts
(cherry picked from commit 422fa59643)
2021-06-23 07:04:29 +03:00
Alexey Ushakov
f0ffb67a4c JRE-60 Editor font is distorted on Kubuntu Linux 16.04 with HiDPI
Override FC_HINT_SLIGHT only for small font sizes

(cherry picked from commit 0e1d23c807)
2021-06-23 07:04:28 +03:00
Alexey Ushakov
485ad8a83b JRE-471 Crash on macOS Sierra after Sleep
Replaced [NSScreen screens] 'objectAtIndex' with 'firstObject' to get nil instead of NSRangeException. Added nil checks

(cherry picked from commit d6b98511262055c01522d9ec8024253af7e91564)
(cherry picked from commit cef970e1ba)
2021-06-23 07:04:26 +03:00
Alexey Ushakov
e813da2fd3 JRE-608 J2DBench metrics: up to 20x degradation
Increased rendering queue buffer up to 6.4 MB

(cherry picked from commit 9ef00f00a7fb6e14835393f8d3944157c6800727)
(cherry picked from commit 2a61e9e997a880a60c5acb361849205170501b91)
(cherry picked from commit 68ca9f00ded004c970b94bd047a04b9f09237047)
(cherry picked from commit 2fe5289178)
2021-06-23 07:04:25 +03:00
Maxim Kartashev
1d7c2a5e51 JBR-3416 Introduce new client property for Linux: linux.awt.windowTitleVisible 2021-06-23 07:04:24 +03:00
Alexey Ushakov
a1591245e8 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)
2021-06-23 07:04:23 +03:00
Konstantin Bulenkov
d48d6186dc update icons
(cherry picked from commit dfe387ff5037deda29d8d522cba6cc5370796ff4)
(cherry picked from commit de1e4a9d71)
2021-06-23 07:04:22 +03:00
Konstantin Bulenkov
fc95ace2d5 add workspace.xml to gitignore
(cherry picked from commit bd5b9403fdca779ecc76f0b3af2918fe772f7ed1)

(cherry picked from commit 37e7661f85)
2021-06-23 07:04:21 +03:00
Vitaly Provodin
3399aca3fc Update README.md 2021-06-23 07:04:20 +03:00
Vitaly Provodin
440bb7ee22 Regression test on https://bugs.openjdk.java.net/browse/JDK-8139176
(cherry picked from commit 6f1c0a6)
(cherry picked from commit 63130fd461)

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-06-23 07:04:19 +03:00
Vitaly Provodin
ddb262a8c4 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)
2021-06-23 07:04:18 +03:00
Vitaly Provodin
9888e9212e JRE-9: added regression test
(cherry picked from commit 4ffb665)
(cherry picked from commit 00a29ad129)
2021-06-23 07:04:17 +03:00
Sergey Malenkov
26a083c9ca JRE-100 Scroll with inertia (Mac os) should only work in the initial component
(cherry picked from commit e79502c708)
2021-06-23 07:04:16 +03:00
Sergey Malenkov
f910b91e4a IDEA-161965 ignore dragged event that does not change mouse location Sierra is more sensit
(cherry picked from commit ef490fa465)
2021-06-23 07:04:15 +03:00
Stanislav Dombrovsky
5416f1ab7c Fix rendering of HTML list dots + better vertical align for them.
(cherry picked from commit fa4a404533ba1ef638fe523adc74391aee8a3ebf)

(cherry picked from commit 9f079c66e9)
2021-06-23 07:04:14 +03:00
Vitaly Provodin
ba51f5c85b configure BOOT_JDK to use JDK 16 2021-06-23 07:04:13 +03:00
Maxim Kartashev
e67cb3eb13 JBR-1430 (8195129) Windows: use UTF16 version of Win32 API to load DLL
Also correct library name encoding in exception messages.
2021-06-23 07:04:11 +03:00
Dmitry Batrak
9a3146dadc JBR-3353 Sibling popup window is shown below dialog on macOS
(cherry picked from commit 4c6f3e4510)
2021-06-23 07:04:10 +03:00
Dmitry Batrak
2524289f29 JBR-3339 Window requests focus on horizontal scroll (on Linux)
(cherry picked from commit 8d74e8e30b)
2021-06-23 07:04:09 +03:00
Alexey Ushakov
0e3a35b3df JRE-202 Deadlock in CGLGraphicsConfig.getCGLConfigInfo
Added processing system events while waiting for OGLRenderQueue.lock
Moved getCGLConfigInfo logic execution to AppKit thread so, awt lock is
 taken on one thread

(cherry picked from commit d1c8bf03e1bd41cb075aa73cc39558103af7fe1a)
(cherry picked from commit 6bf9f31986be64acf3755b34568802f9960a66ec)
(cherry picked from commit 4e21d67e0369bffac45662c63699b39946218a7a)
2021-06-23 07:04:08 +03:00
Anton Tarasov
24c617d90b JRE-166 [macOS] deadlock with JFXPanel
(cherry picked from commit a9dbb6990fac0c659297487a261ba9170e5fb3ad)

(cherry picked from commit 8a44e1bb37)
2021-06-23 07:04:07 +03:00
Alexey Ushakov
9bc56eab37 8265445: Introduce the new client property for mac: apple.awt.windowAppearance
Implemented apple.awt.windowAppearance client property
2021-06-23 07:04:06 +03:00
Anton Tarasov
ffba5e94e4 JBR-3306 jbr-dev warnings: incompatible pointer to integer conversion returning 'void *' from a function with result type 'jlong' 2021-06-23 07:04:05 +03:00
Dmitry Batrak
7e9dea7873 JBR-2498 Fix unexpected window raising under Mutter WM
re-implement the fix, so that ChildAlwaysOnTopTest isn't failing
2021-06-23 07:04:03 +03:00
Maxim Kartashev
c7644552aa JBR-3323 Exclude parts of VM code from sanitizer checks
Exclude VM error-reporting code that treats memory as a raw sequence of
bytes from address sanitizer checks. This is needed to only get true
reports when running tests against the --enable-asan build.
2021-06-23 07:04:02 +03:00
Maxim Kartashev
6ef1f24703 JBR-3323 Improve sanitizer-enabled builds
Improve usability of builds with --enable-asan.
Add the --enable-usan option to build with Undefined Behavior Sanitizer.
2021-06-23 07:04:01 +03:00
Alexey Ushakov
a89a363e74 JBR-3327 [jbr-dev] Adjust mac window appearance according to AppleInterfaceStyle property
Set window appearance according to AppleInterfaceStyle default
2021-06-23 07:04:00 +03:00
Alexey Ushakov
bf5163fd2d JRE-238 [736] java.awt.AWTError: access denied ("java.lang.RuntimePermission" "canInvokeInSystemThreadGroup")
Moved task execution on AppKit to the privileged block. Minor refactoring

(cherry picked from commit 5dbb88471115c9e4a536ae37d0e6794de9e5ac9c)
2021-06-23 07:03:59 +03:00
Alexey Ushakov
dfe81916cb JRE-359 CGraphicsEnvironment.getDefaultScreenDevice() returns null
Moved CG api calls to AppKit thread

(cherry picked from commit fd0210f035199e8612097a2c1d42b90cfd2111f8)
(cherry picked from commit 5e99e376d9dfe477401121878704630c3c13f9f7)

(cherry picked from commit 6d73b25130)
2021-06-23 07:03:58 +03:00
Dmitry Batrak
53696a2d70 JBR-2973 Copy/Move dialog not in the focus on drag-n-drop to Project Tool window from external application
(cherry picked from commit 20fe78b650)
2021-06-23 07:03:57 +03:00
Dmitry Batrak
aa2a43a729 JBR-2759 Typeahead issue on Linux
(cherry picked from commits 76bdaf1131, b20c56ff3e)
2021-06-23 07:03:56 +03:00
Denis Fokin
a65d9ae337 JBR-1362 Multiple child windows opened and closed in sequence result in a focus loss
(cherry picked from commit 3c9c599a2d)
2021-06-23 07:03:55 +03:00
Dmitry Batrak
7e71b4ad32 JBR-3307 First character is dropped when editing a table cell
(cherry picked from commit 2ccf6b65a7)
2021-06-23 07:03:54 +03:00
Dmitry Batrak
d781d9d29f JBR-3291 Input of characters using Alt+<NumPad> stopped working on Windows
(cherry picked from commit ba6b9c085e)
2021-06-23 07:03:53 +03:00
Alexey Ushakov
902c61ef20 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)
2021-06-23 07:03:52 +03:00
Alexey Ushakov
350c292819 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)
2021-06-23 07:03:51 +03:00
Alexey Ushakov
06f6da66a0 JRE-193 UI freeze and 12/second thread dumps
Moved CStrikeDisposer dispose code to AppKit

(cherry picked from commit 28774d6878)
2021-06-23 07:03:50 +03:00
Alexey Ushakov
a82405e151 JBR-3316 Reimplement CThreading functionality on top of OpenJDK17 sourcebase
Adopted CThreading related code to OpenJDK17 source base

(cherry picked from commit 5dfb30ae68b2c54d58c98a9195709c031f823581)
(cherry picked from commit 94163bd69f64616836523e81567aa1141480d841)
2021-06-23 07:03:49 +03:00
Alexey Ushakov
ccb61bda56 JBR-3304 jbr-dev warnings: 'getPhysFontName' defined but not used [-Werror=unused-function]
Removed unused code
2021-06-23 07:03:47 +03:00
Vitaly Provodin
8e25a46a9a exclude javax/swing/JTabbedPane/4624207/bug4624207.java failing on windows due to 8197552 2021-06-23 07:03:46 +03:00
Alexey Ushakov
e1193869ae 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)
2021-06-23 07:03:45 +03:00
Alexey Ushakov
5c174e7b08 JRE-353 Fedora 25 + XMonad rendering issues
Added support for Xmonad WM

(cherry picked from commit c690c3c7fdf1390e6b1a8d388ff752a09391ae3c)
(cherry picked from commit 6851dc3441)
2021-06-23 07:03:44 +03:00
Denis Konoplev
e63309eefa 8264143: Change uint8_t to unsigned char 2021-06-23 07:03:42 +03:00
Dmitry Batrak
b1926d5019 JBR-3255 Applying 'incline' transform might change character's advance
(cherry picked from commit b37f7cfdb1)
2021-06-23 07:03:41 +03:00
Dmitry Batrak
14b000be9c JBR-3215 'deriveFont(float)' can return a different font (not just change the size)
(cherry picked from commit 8eafcaab24)
2021-06-23 07:03:40 +03:00
Dmitry Batrak
282721afed JBR-3157 Maximized window with custom decorations isn't focused on showing
(cherry picked from commit 62b04983f2)
2021-06-23 07:03:39 +03:00
Dmitry Batrak
e2c3abb34c make AwtListGarbageCollectionTest pass reliably
(cherry picked from commit 304eb7f919)
2021-06-23 07:03:38 +03:00
Dmitry Batrak
37279a5fde JBR-1752 Floating windows overlap modal dialogs
(cherry picked from commit 0161050077)
2021-06-23 07:03:37 +03:00
Dmitry Batrak
321bb26c0f JBR-3054 Focus is not returned to frame after closing of second-level popup on Windows
(cherry picked from commit 0c2b6e1c04)
2021-06-23 07:03:36 +03:00
Dmitry Batrak
f0ceae850f JBR-2702 Tooltips display through other applications on hover
(cherry picked from commits 11732c2469, 0ed7deabaa)
2021-06-23 07:03:35 +03:00
Dmitry Batrak
0a306de427 added RobotSmokeTest
this test failing in jtreg launch most probably indicates either some problem with the environment (e.g. some windows left open from previously launched processes) or with java.awt.Robot implementation

(cherry picked from commit 1d525a2d2f)
2021-06-23 07:03:34 +03:00
Dmitry Batrak
b976fedbfa JBR-2847 Always dispatch KEY_TYPED event to the same component as KEY_PRESSED event
also fixes JBR-2834, IDEA-254466, IDEA-254466

(cherry picked from commit e94f6057a4)
2021-06-23 07:03:33 +03:00
Dmitry Batrak
9c052ef63a JBR-2712 Typeahead mechanism doesn't work on Windows
(cherry picked from commits 1a9838082e, f5b6222835, acd7e3b2da, cd6dd5c3cf8556f97f3113cb7d615a92393b57bf(partially), e8bbd8ffdd90f57cd12d7d7e89188be97ee4be0b(partially))
2021-06-23 07:03:32 +03:00
Denis Konoplev
e2e4094334 8264143: Lanai: RenderPerfTest.BgrSwBlitImage has artefacts on apple M1
Add stdint include to fix x64 build
2021-06-23 07:03:31 +03:00
Dmitry Batrak
23d85d392e JBR-2498 Fix unexpected window raising under Mutter WM
(cherry picked from commit 73b45fb899)
2021-06-23 07:03:30 +03:00
Dmitry Batrak
42aa34b029 JBR-2248 Support text wrapping in a <pre> tag in JEditorPane
port from JBR 11 to JBR 15 (cherry picked from commit ff2e915371)

cherry picked from commit 6a30c56138
2021-06-23 07:03:29 +03:00
Dmitry Batrak
27cb94583f JBR-2234 Support CSS setting overflow-wrap:anywhere in JEditorPane
port from JBR 11 to JBR 15 (cherry picked from commits b6583d0a71, 6003abc15f)

cherry picked from commit 93ad4f06dd
2021-06-23 07:03:28 +03:00
Dmitry Batrak
b241188993 JBR-2050 Issue with keycap emojis
port from JBR 11 to JBR 15 (cherry picked from commit ae91e1d7f1)

cherry picked from commit d3018a1837
2021-06-23 07:03:27 +03:00
Dmitry Batrak
d52cbc6a6e 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)

cherry picked from commit 2bf43a57ab
2021-06-23 07:03:26 +03:00
Dmitry Batrak
99615b11df JBR-1714 Italic text is displayed using incorrect glyphs on Windows
port from JBR 11 to JBR 15 (cherry picked from commits 46e4cdfcbd, 9cc5cbc99b)

cherry picked from commit 6769b27e53
2021-06-23 07:03:25 +03:00
Dmitry Batrak
c132899a95 JBR-1689 Incorrect painting of long strings on linux
port from JBR 11 to JBR 15 (cherry picked from commits e12c1d6f0d, 0429e74e9d)

cherry picked from commit e43cfd198f
2021-06-23 07:03:24 +03:00
Dmitry Batrak
89745fe2dc JBR-1248 Exception caused by broken font
port from JBR 11 to JBR 15 (cherry picked from commit 4efa7eab3e)

cherry picked from commit 6e1c514c6c
2021-06-23 07:03:23 +03:00
Alexey Ushakov
37486c1df5 JRE-18 CCE in XRMaskFill.MaskFill
Throwing InvalidPipeException for incompatible surfaces

(cherry picked from commit 55dab103c24bf86cf025b9ce02b67e72508d41ba)
(cherry picked from commit 0a4fdad0f2)
2021-06-23 07:03:22 +03:00
Dmitry Batrak
97a705863e JBR-1245 [JDK 11] There are different letter spacings in some controls
port from JBR 11 to JBR 15 (cherry picked from commit a26b70568a)

cherry picked from commit e2637199e9
2021-06-23 07:03:20 +03:00
Dmitry Batrak
f28d999eae 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)

cherry picked from commit 47ff31ae82
2021-06-23 07:03:19 +03:00
Dmitry Batrak
ca08f5b03f 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)

cherry picked from commit a5e25d1ef9
2021-06-23 07:03:18 +03:00
Dmitry Batrak
d12d3c0dcb 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)

cherry picked from commit eea293f4a4
2021-06-23 07:03:17 +03:00
Dmitry Batrak
239cb29f70 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)

cherry picked from commit e0475e9ba2
2021-06-23 07:03:16 +03:00
Dmitry Batrak
1cf4ae27c7 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)

cherry picked from commit 087ff34c2e
2021-06-23 07:03:15 +03:00
Dmitry Batrak
30eb852987 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)

cherry picked from commits b871188f44, 0a9f16dc90
2021-06-23 07:03:14 +03:00
Dmitry Batrak
a2eb48301f 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)

cherry picked from commit 51ce1d6427
2021-06-23 07:03:13 +03:00
Alexey Ushakov
ba2ea7ff2f JRE-303 2017.1.1 update breaks linux fonts
Corrected rendering hints for Non-AA text rendering

(cherry picked from commit b923aa7a0729a10ea47d3438622d659fbead44c9)
(cherry picked from commit b6bdd04e41)
2021-06-23 07:03:12 +03:00
Alexey Ushakov
9084a8000f JRE-205 Font is wrong and without anti aliasing in 2017.1 EAP
Added property to disable bundled font config:
  java2d.font.loadFontConf=false
Do not load custom font.conf by default

Moved hints adjusting logic from code to bundled font.conf file
Applied correction only for regular fonts with platform sizes less than 12
Some fonts are not corrected at all: Consolas, Noto Sans Mono
Used family name instead of physical one in requests to Fontconfig
Removed redundant call to FcConfigBuildFonts
Added privileged access to the properties (JRE-235,JRE-235)

(cherry picked from commit 4d4c915047077ebd966b0e3be056566d56ba11a4)
(cherry picked from commit 9d6f325f72482405264852f3ee2636f5fedaeaf0)
(cherry picked from commit e7e3372bf8db539c0f6bc85db9f1093f8fa4c380)
(cherry picked from commit 3e724caed2f199be50d25d1ecb20b7819c86be2e)
(cherry picked from commit d372b35963c096a32331b05b257e26841ace5d94)
(cherry picked from commit 18a5f5de03eb107f89dca138a44b9aab2151235c)
(cherry picked from commit 9ba320efef0539f75aa93fd1b5dd80266c954d0a)
(cherry picked from commit b8c38f419972af61291953f7f452c1698f7a1624)
(cherry picked from commit debba0128e200be60adc9a339d5985590ef4e230)
(cherry picked from commit 2fa17b1bd7d6524e4b5fa4d0b3ce2bf02a8fcc78)
(cherry picked from commit 09b4f61db0d4f5beea0e16ce9136c99e2185c10b)
(cherry picked from commit 3b6782dd742f9c74a9535145db2f9f7ffaccf7c8)
(cherry picked from commit f1b68149528c13a22fa64468c130b1405bf3d081)
(cherry picked from commit db5cf5a2b9cb454630fb86783c2d58cd5446cba6)
(cherry picked from commit 32140948578bc3c2a0c5f8adb537660421efe5e7)
(cherry picked from commit b978e3d0b131ed642774c5a14a649e13f764c20b)

(cherry picked from commit c75c1ef8b2)

(cherry picked from commit a29f19e6a2)
2021-06-23 07:03:11 +03:00
Dmitry Batrak
2e6b37b0af 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)

cherry picked from commit e6752600a5
2021-06-23 07:03:10 +03:00
Dmitry Batrak
010c6db0f9 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)

cherry picked from commit a5bd092449
2021-06-23 07:03:09 +03:00
Dmitry Batrak
a9d90ef40d 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)

cherry picked from commit b16ee45915
2021-06-23 07:03:08 +03:00
Dmitry Batrak
c062063331 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)

cherry picked from commit 8c9402b60b
2021-06-23 07:03:07 +03:00
Dmitry Batrak
3eaa3f7009 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)

cherry picked from commit 2c0d6150d0
2021-06-23 07:03:06 +03:00
Vitaly Provodin
944d93e1dc JRE-186 added regression test (Modal dialogs (Messages) shouldn't popup IDEA when another application is active)
(cherry picked from commit 236bd38d1b)
2021-06-23 07:03:05 +03:00
Vitaly Provodin
32a05500a8 JRE-269 added regression (JLabel doesn't scale <code>text</code> HTML fragments.)
(cherry picked from commit 1f4ad38d23)
2021-06-23 07:03:04 +03:00
Alexey Ushakov
d7908fee54 JRE-307 Wrong dpi reported on Wayland
(cherry picked from commit 15693661cc)
2021-06-23 07:03:03 +03:00
Vitaly Provodin
914afa05f6 JRE-392 added regression (Tip of the day is not hidden while another modal window is shown)
(cherry picked from commit c7b0ac686f)
2021-06-23 07:03:02 +03:00
Vitaly Provodin
c710ba7926 JRE-394 added regression test (System getenv doesn't return env var set in JNI code)
(cherry picked from commit 3a7b3c67b0)
2021-06-23 07:03:01 +03:00
Vitaly Provodin
17a7c818cf JRE-401 added regression test (AppCode freezes during autocomplete and other operations)
(cherry picked from commit cb4453b1d1)
2021-06-23 07:03:00 +03:00
Vitaly Provodin
3647a66ef5 JRE-422 added new regression test (AWTView deliverJavaMouseEvent leaks jEvent)
(cherry picked from commit 37dc13c603)
2021-06-23 07:02:59 +03:00
Vitaly Provodin
8316dc4ae5 JRE-430 added new regression test (Font fallback sometimes doesn't work in Swing text components)
(cherry picked from commit d04debc847)
2021-06-23 07:02:58 +03:00
Vitaly Provodin
96fd4dc70d JRE-457 added new regression test (OGLTR_DisableGlyphModeState is slow)
(cherry picked from commit 3a43f4557f)
2021-06-23 07:02:56 +03:00
Vitaly Provodin
4f8b7d2527 JRE-458 added new regression test (Insufficient and inconsistent permissions on some files in Linux build)
(cherry picked from commit 82adbe9c25)
2021-06-23 07:02:55 +03:00
Vitaly Provodin
99d2c87ce5 JRE-467 added new regression test (Wrong rendering of variation sequences)
(cherry picked from commit 0026095202)
2021-06-23 07:02:54 +03:00
Vitaly Provodin
963d452ff0 JRE-468 added new regression test (Idea freezes on project loading)
(cherry picked from commit 1ce8c3ce82)
2021-06-23 07:02:53 +03:00
Vitaly Provodin
8ea62039eb JRE-501 added new regression test (Live resize is jerky for heavy java applications on Mac)
(cherry picked from commit c4a1277c1b)
2021-06-23 07:02:52 +03:00
Vitaly Provodin
90e5595461 JRE-638 added new regression test (enable unlimited cryptographic policy by default)
(cherry picked from commit 4a14c6f15a)
2021-06-23 07:02:51 +03:00
Vitaly Provodin
1d63013ef7 JRE-705 added new regression test (Z-order of child windows is broken on Mac OS)
(cherry picked from commit 82cd480619)
2021-06-23 07:02:50 +03:00
Vitaly Provodin
736a33ec9c JRE-741 added new regression test (Modal dialog stays above other process windows)
(cherry picked from commit 9ea664c299)
2021-06-23 07:02:49 +03:00
Vitaly Provodin
756d9e02b6 JRE-624 CThreading isAppKit() fails to detect main app thread if it was renamed
(cherry picked from commit c8f248a936)
2021-06-23 07:02:48 +03:00
Alexey Ushakov
664956746e IDEA-166173 IntelliJ freezes when returning from sleep
Fixed deadlock by removing unnecessary getScreenResolution call

(cherry picked from commit cec93cf1fd)
2021-06-23 07:02:47 +03:00
Alexey Ushakov
4b27beb8ad Added missing fontconfig defines
(cherry picked from commit 2ac273a456)
2021-06-23 07:02:46 +03:00
Alexey Ushakov
7d4deefcb9 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)
2021-06-23 07:02:45 +03:00
Alexey Ushakov
390d7b3efc JRE-43 Font.getFamily() does not work in headless mode
Removed unused code

(cherry picked from commit 5b523f049e)
2021-06-23 07:02:44 +03:00
Alexey Ushakov
79ea09cd08 JRE-43 Font.getFamily() does not work in headless mode
Bundled Droid fonts to fallback in headless mode

(cherry picked from commit 5b523f049e)
2021-06-23 07:02:43 +03:00
Alexey Ushakov
64e80c7f24 JRE-15 Greyscale text is too dark comparing with subpixel AA
Adjusted default value for greyscale text rendering in freetype

(cherry picked from commit f80497c4f0)
2021-06-23 07:02:42 +03:00
Alexey Ushakov
ac5ed14839 IDEA-155347 On Ubuntu with High DPI tooltip font is too thick when the tooltip is fading in and out
Handled missing FC_RGBA_NONE value

(cherry picked from commit 44fcbdabf8)
2021-06-23 07:02:41 +03:00
Alexey Ushakov
987a7543f3 IDEA-149882 Issue with fonts in Ubuntu 12.04
Provided fallback to default font rendering settings if libfontconfig unable to
match font pattern

(cherry picked from commit d93a5f1598)
2021-06-23 07:02:40 +03:00
Alexey Ushakov
c69a5d366a IDEA-151619 CLion EAP fails to start with missing symbol: FT_Library_setLcdFilter
Skip FT_Library_setLcdFilter call if the symbol is not there
Cache negative FT_Library_setLcdFilter symbol lookup result
Used RTLD_DEFAULT handler for process symbols lookup

(cherry picked from commit e6f0055704)
2021-06-23 07:02:39 +03:00
Alexey Ushakov
225da06427 JRE-29 fontconfig lib crashes CLion on OSX
Disabled fontconfig usage on OSX

(cherry picked from commit 431e14429c)
2021-06-23 07:02:38 +03:00
Vitaly Provodin
3b12ea78d5 exclude tests spontaneously creating windows during test execution 2021-06-23 07:02:37 +03:00
Alexey Ushakov
0dfd62f8db JRE-48 built-in jre renders fonts abnormally heavier (normal text looks bold) than the oracle jre
Disable FT_LOAD_TARGET_LIGHT for fonts with FC_AUTOHINT=false (this target implicitly enables  FC_AUTOHINT)
Reused setupLoadRenderFlags for all rendering cases

(cherry picked from commit f3f2667a4c)
2021-06-23 07:02:36 +03:00
Alexey Ushakov
662cd04716 Added logging for freetypeScaler via env variable OPENJDK_LOG_FFS=yes
and for screen resolution in freetypeScaler

(cherry picked from commit 091d74a791)
2021-06-23 07:02:35 +03:00
Alexey Ushakov
44e428f1da JRE-34 IDE Crashes During Startup
Added validation of dpi settings coming from xserver

(cherry picked from commit b1c49c3b27)
2021-06-23 07:02:34 +03:00
Anton Tarasov
3b25b421d5 Add build.gradle 2021-06-23 07:02:32 +03:00
Anton Tarasov
fbce996294 JBR-2031 [mac] jcef deadlocks with a11y on start
(cherry picked from commit 4f44b37f08)
2021-06-23 07:02:31 +03:00
Alexey Ushakov
8203d376f4 JRE-1083 [JDK11] Test com/sun/java/accessibility/util/8051626/Bug8051626.java fails on macOS on JB JDK11b
Wrapped SelectorPerformer invocation into privileged action

(cherry picked from commit 48e7b547ae)
2021-06-23 07:02:30 +03:00
Anton Tarasov
d3a216048e JBR-2019 provide getWindowHandle method for jcef
(cherry picked from commit 7ae706b629)
2021-06-23 07:02:29 +03:00
Anton Tarasov
5e0335a5f8 Comment assertion (originally JRE-965)
The assert line crashes debug hotspot.

(cherry picked from commit a00074a86c)
2021-06-23 07:02:28 +03:00
Anton Tarasov
5c6cdaaa1d JBR-1976 [jcef] need mouse-transparent window on Windows
(cherry picked from commit b60fac96b4)
2021-06-23 07:02:27 +03:00
Anton Tarasov
4eb2e97813 JBR-1834 [linux] runtime hidpi switch is broken
(cherry picked from commit eaa04303a7)
2021-06-23 07:02:26 +03:00
Anton Tarasov
0a747f52f9 JBR-1824 export NSWindow::setIgnoresMouseEvents to java internal API
(cherry picked from commit 4399dc382c)
2021-06-23 07:02:25 +03:00
Anton Tarasov
4e396c0812 JBR-1802 com/sun/java/accessibility/util/8051626/Bug8051626.java: access denied ("java.lang.RuntimePermission" "getClassLoader")
(cherry picked from commit eae772aca9)
2021-06-23 07:02:24 +03:00
Anton Tarasov
a7823270d4 JBR-1795 Project opened from Welcome screen goes to backgound after loading
(cherry picked from commit 322526458a)
2021-06-23 07:02:23 +03:00
Anton Tarasov
d8d99dceb8 JBR-1609 Jupyter Notebook eventually causes IDEA to become unresponsive on Mac OSX
(cherry picked from commit 8ae0be8eb6)
2021-06-23 07:02:22 +03:00
Anton Tarasov
a2183407ed JBR-1786 Weird white border for IDE window
(cherry picked from commit 4b09614a0e)
2021-06-23 07:02:21 +03:00
Vyacheslav Moklev
3e427efc38 JBR-1552 Invalid screen bounds in full screen mode
Check is window is not in undecorated state

(cherry picked from commit 5547701e2c)
2021-06-23 07:02:20 +03:00
Vyacheslav Moklev
12cdd62353 JBR-1509 Client area size is wrong in Borderless mode
Fix client area size

(cherry picked from commit 00d32e58dc)
2021-06-23 07:02:19 +03:00
Anton Tarasov
db22fb94ff JBR-1770 [windows] frame does not open as maximized
(cherry picked from commit d9dfc3c6c5)
2021-06-23 07:02:18 +03:00
Anton Tarasov
a16c687417 JBR-1693 difficult to input Japanese text with "Fast" Key Repeat
(cherry picked from commit 12de3e287e)
2021-06-23 07:02:17 +03:00
Anton Tarasov
9b3b83c508 JBR-1429 Scale is huge due to GDK_SCALE
(cherry picked from commit 1c3477df2e)
2021-06-23 07:02:16 +03:00
Anton Tarasov
8baf2b7712 JBR-1669 IDE-managed HiDPI mode is broken
(cherry picked from commit 461b0b5cd4)
2021-06-23 07:02:15 +03:00
Anton Tarasov
c31990d48d JBR-1650 propagate custom decoration title bar height to native
(cherry picked from commit f6fc65d014)
2021-06-23 07:02:14 +03:00
Anton Tarasov
8d7c9fe827 JBR-1629 Maximized window cut at the right and bottom
(cherry picked from commit 9e768377db)
2021-06-23 07:02:13 +03:00
Anton Tarasov
50eb295651 JBR-1492 Not able to start Intellij Idea 2017.2.5 with modified vmoptions
(cherry picked from commit e7ca6db66b)
2021-06-23 07:02:12 +03:00
Anton Tarasov
09d2af4d1e JBR-1427 pycharm jupyter preview stuck and no response when click on preview.
(cherry picked from commit 1746b04686)
2021-06-23 07:02:11 +03:00
Anton Tarasov
df45b36a86 IDEA-210154 Borderless UI: Top frame of IDEA window is blue
(cherry picked from commit 2dd4163bc4)
2021-06-23 07:02:10 +03:00
Anton Tarasov
8f3775e3df JBR-1365 force IDE-managed HiDPI on Linux for fractional scales
(cherry picked from commit f092ff3962)
2021-06-23 07:02:09 +03:00
Anton Tarasov
893e40817b JBR-1351 Borderless UI: Bold frame around IDEA window appears on non-HiDPI display
(cherry picked from commit 06d35de069)
2021-06-23 07:02:08 +03:00
Anton Tarasov
a8f3b5f8ce JBR-1313 wrong insets for non-resizable custom-decorated frame
(cherry picked from commit 9179718cb6)
2021-06-23 07:02:07 +03:00
Anton Tarasov
cf227a0b5d JBR-1293 do not modify client bounds when custom-decorated frame is set undecorated
(cherry picked from commit cb188edaab)
2021-06-23 07:02:06 +03:00
Anton Tarasov
ab83445821 JBR-1278 allow native border and shadow for custom decoration mode
(cherry picked from commit a879ad5739)
2021-06-23 07:02:05 +03:00
Anton Tarasov
342cb06f85 JRE-1232 forwardport: JRE-1228 support custom frame decoration
(cherry picked from commit d2820524a1)
2021-06-23 07:02:04 +03:00
Anton Tarasov
c8f8e87794 JRE-1162 [jdk11] support on-the-fly DPI change on linux
(cherry picked from commit c06c4c69d3)
2021-06-23 07:02:03 +03:00
Anton Tarasov
0a6c279c07 JRE-1142 [jdk11] hidpi is not detected since Ubuntu 18.04
(cherry picked from commit be4f8c0d9d)
2021-06-23 07:02:02 +03:00
Anton Tarasov
eddf2c3a40 JRE-1111 [JDK11] java/beans/Beans/TypoInBeanDescription.java crashes at libawt_xawt.so+0x4a30d
(cherry picked from commit b89e6aed0b)
2021-06-23 07:02:01 +03:00
Anton Tarasov
35b57e8adb fix JNI_OnUnload definition
(cherry picked from the commit  3571e39071)

(cherry picked from commit 1019d8f0f2)
2021-06-23 07:02:00 +03:00
Anton Tarasov
21419a9e34 JRE-981 IM workaround does not work anymore
forward port of 2d7c29b in JetBrains/jdk8u_jdk

(cherry picked from commit f3ccc53e02)
2021-06-23 07:01:59 +03:00
Anton Tarasov
0698ab3f88 JRE-938 [windows] Frame.setMaximizedBounds not hidpi-aware
(cherry picked from commit cc97899923320e1fa17f5e44975c4a0f0ba51014)
(cherry picked from commit ccfe65be7f)
2021-06-23 07:01:58 +03:00
Anton Tarasov
e898c250d1 JRE-907 macOS: add ability to check for scaled display mode
(cherry picked from commit e496262aa1)
2021-06-23 07:01:57 +03:00
Anton Tarasov
61e7b5c536 JRE-934 Diff viewer errors are not visible on HiDPI Linux
(cherry picked from commit 641a09dd52)
2021-06-23 07:01:56 +03:00
Anton Tarasov
e632dc3eb1 [jdk9] HiDPI scale is not detected on some linux desktops
(cherry picked from commit 9279d80110)
2021-06-23 07:01:55 +03:00
Anton Tarasov
d4b0957c91 JRE-681 [windows] direct drawing into frame graphics may have wrong translate
(cherry picked from commit 6ea1d45fd1)
2021-06-23 07:01:54 +03:00
Anton Tarasov
fc06b53a93 Read org.gnome.desktop.interface/scaling-factor
(cherry picked from commit 277357ae73)
2021-06-23 07:01:53 +03:00
Anton Tarasov
498c82f2f9 Revert "8239894: Xserver crashes when the wrong high refresh rate is used"
This code is needed for "Read org.gnome.desktop.interface/scaling-factor".
Keep it until "JDK-8260270 Implement the HiDPI scale factor reading" is fixed.

This reverts commit a7c2ebc7
2021-06-23 07:01:51 +03:00
Anton Tarasov
83281dbcdb Do not scale base font in HiDPI mode on Linux
(cherry picked from commit 6fb2c36529)
2021-06-23 07:01:50 +03:00
Anton Tarasov
355e97897c Allow HiDPI mode on Linux
(cherry picked from commit 34234263fb)
2021-06-23 07:01:49 +03:00
Anton Tarasov
ec5ece3591 JRE-772 swing returns incorrect FRC when AA is off
(cherry picked from commit a161897d908aa10da6306c06452c5d6317fed2f0)
(cherry picked from commit 2bf5a7ca5c)
2021-06-23 07:01:48 +03:00
Anton Tarasov
42e94234c5 JRE-711 Horizontal grey lines appear in every window in IntelliJ Idea
(cherry picked from commit 62000130d86e5831d81cfb24659386c6930f84cf)

(cherry picked from commit e2d1655703)
2021-06-23 07:01:47 +03:00
Anton Tarasov
8d04a0719f JRE-681 [windows] direct drawing into frame graphics may have wrong translate
(cherry picked from commit ab6dee4c1fc453ad3cb5adb69fc243e550d184ae)

(cherry picked from commit 6ea1d45fd1)
2021-06-23 07:01:46 +03:00
Anton Tarasov
a11472fe46 JRE-665 Navigate Class/File/Symbol, Find in Path popup windows don't pick characters from input method
(cherry picked from commit 676f305b2b3b278e305bd4d9bde4269f27b3d676)
(cherry picked from commit 6ce31e0a32)
2021-06-23 07:01:45 +03:00
Anton Tarasov
2a9f80a866 JRE-616 [linux] notify when dpi correction factor is applied to fonts
(cherry picked from commit f57d41f3118bfd773c99ce32d58cfae16931be6a)
(cherry picked from commit 6246abc72f)
2021-06-23 07:01:44 +03:00
Anton Tarasov
0223808597 JRE-612 [windows] icon in frame title is not dpi-aware
(cherry picked from commit dec04385177a2abb677add909d3b94f94c62a14e)

(cherry picked from commit 38466cbab0)
2021-06-23 07:01:43 +03:00
Anton Tarasov
7e788e826a JRE-604 [fps] frame's client area is one pixel beneath frame's borders
Adopted.

(cherry picked from commit ef2870ee38)
2021-06-23 07:01:42 +03:00
Anton Tarasov
ce103929f0 JRE-596 [windows] popup positioning is broken with JRE-573
Adopted: moved to AwtWindow::Reshape

(cherry picked from commit c5cc28d85d)
2021-06-23 07:01:41 +03:00
Anton Tarasov
348ab47df8 JRE-577 Goland 18 displays out of memory
(cherry picked from commit 2daaf21e420d4af15d3b1bfeb3f896074bea1e61)

(cherry picked from commit 9ea2011948)
2021-06-23 07:01:40 +03:00
Anton Tarasov
529fdfba23 JRE-573 [windows] window client area bounds mismatch
Apply only WmEraseBkgnd

(cherry picked from commit afa68f7ad6440303c6417be3f675b1c4644b6014)

(cherry picked from commit 0651b45e13)
2021-06-23 07:01:39 +03:00
Anton Tarasov
e9f9662544 JRE-489 -Dswing.bufferPerWindow is fractional scale unfriendly
(cherry picked from commit 5e183c397b)
2021-06-23 07:01:38 +03:00
Anton Tarasov
d45d3e3cd5 JRE-310 check for Windows8.1 when enabling ui scale
Was "don't fallback on fractional scale" in JBSDK9.

(cherry picked from commit 263d8641974d263075c93f11c4db6208754d7325)

(cherry picked from commit deeda6fada)
2021-06-23 07:01:37 +03:00
Anton Tarasov
4990440333 JRE-382 Three AWT-tests become hanging starting since master-875
(cherry picked from commit 7d492101db8fcbb3d285fd8e9669f74b0e0fce8f)
(cherry picked from commit b965f85c1b)
2021-06-23 07:01:36 +03:00
Anton Tarasov
5537f7c29d JRE-373 [macos] nativeCreateNSWindow deadlocks with a11y
(cherry picked from commit 72c77a992bbf1b95b82ffc08cb2f4f3bc36b3657)

(cherry picked from commit aa09fa2c85)
2021-06-23 07:01:35 +03:00
Anton Tarasov
ee8ebc2de4 IDEA-172422 Popup at the wrong place on the second monitor (new hidpi)
Adopted: moved to AwtWindow::Reshape

(cherry picked from commit 11a0911d65)
2021-06-23 07:01:34 +03:00
Anton Tarasov
c810c54f60 JRE-309 [windows] on-screen position of a component is not pixel-perfect in user space in JRE-HiDPI mode
Adopted: moved to AwtWindow::Reshape

(cherry picked from commit 985908cf10)
2021-06-23 07:01:33 +03:00
Anton Tarasov
298ba6dd06 JRE-269 JLabel doesn't scale <code>text</code> HTML fragments.
(cherry picked from commit 9ef72b6c3a477e4225f9b98e30fa9190613520e4)
(cherry picked from commit c17bc728ee)
2021-06-23 07:01:32 +03:00
Anton Tarasov
0b9a36ea8c JRE-225 [macos] IDEA hangs on attempt to call getDefaultScreenDevice() from EDT
(cherry picked from commit 76aba25)

(cherry picked from commit df11dcc97bb5556ac5d0299b773a512b4f0bb5bb)
(cherry picked from commit aeea6c1ca3)
2021-06-23 07:01:31 +03:00
Anton Tarasov
eb0e42273b JRE-210 JEditorPane may return wrong preferred size as it moves b/w monitors of different scale
(cherry picked from commit 6c3087e6bda32ae9b095e069d8bea614502f5c03)
(cherry picked from commit adb3a4be16)
2021-06-23 07:01:30 +03:00
Anton Tarasov
98da0d4641 JRE-119 [suppress updateGC() for WFileDialogPeer/WPrintDialogPeer]
updateGC() is called from WWindowPeer.<init> though it's not applicable to the named dialogs
as they don't have native AwtWindow peer required for the method.

(cherry picked from commit 72ed9f653177e273b811cfe70c2dba102a8636e4)
(cherry picked from commit cec49aaa38)
2021-06-23 07:01:29 +03:00
Anton Tarasov
29dc4dd3ca JRE-119 [use default "sun.java2d.dpiaware=true" to be dpi-aware on Window 7]
This lets awt_Win32GraphicsEnv.cpp SetProcessDPIAwareProperty() call Win7 specific ::SetProcessDPIAware() API func.

(cherry picked from commit 5e7a766090810d839f4352d06fc2812499d766f8)
(cherry picked from commit 7d1d43bfa1)
2021-06-23 07:01:28 +03:00
Anton Tarasov
e167df4a9e JRE-119 [Dynamically set DPI-awareness level to enable backward compatible HiDPI behavior]
Adopted: rely on java.manifest

(cherry picked from commit d00cfa4dc62a14a4cf89df9d4c4899970c9fc9e8)

Adopted

(cherry picked from commit 60be76b725)
2021-06-23 07:01:27 +03:00
Anton Tarasov
ec87f6d2dd JRE-119 [ask if ui scale is enabled natively]
(cherry picked from commit 801f45875fd8699edcbda5896210cec191062261)
(cherry picked from commit 20edebdefa)
2021-06-23 07:01:26 +03:00
Anton Tarasov
d26eded198 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)
2021-06-23 07:01:25 +03:00
Anton Tarasov
63cad9789b IDEA-148854: AppCode crashes randomly every 15 mins or so
(cherry picked from commit 02f9a5fbb4924ff67c8a04c15e490acfcc750003)
(cherry picked from commit b8f4b4a9ed)
2021-06-23 07:01:24 +03:00
Vitaly Provodin
e0d83f4569 updated JTreg exclude list 2021-06-23 07:01:23 +03:00
Alexey Ushakov
3f6f737b26 Resolve merge compile problems on mac
(cherry picked from commit d1ed8ab118)
2021-06-23 07:01:22 +03:00
Anton Tarasov
ce5a3fcd0d IDEA-152524 can't compile fontconfig changes on Windows
(cherry picked from commit 4c8351fecf)

(cherry picked from commit 5faebc73d5)
2021-06-23 07:01:21 +03:00
Alexey Ushakov
773fc3d95b IDEA-57233 Editor font antialising/appearance problems on Linux
Used desktop DPI instead of hard-coded 72
Compensated increased glyph bitmap size by adjusting font size
Added LCD filter for sub-pixel rendering
Use fontconfig library to provide right rendering options for fonts
Corrected sizes passed to fontconfig library and hinting disabling policy
Added logging and versioned fontconfig lib loading
Resolved font rendering problem in lenses

(cherry picked from commit 0456745afb)

IDEA-152816, IDEA-152454 fix text rendering issues (text cutoff and incorrect rendering in editor fragment components)

FcMatchFont-type pattern substitutions shouldn't be invoked before specific font is selected - it can apply unrelated rules

port commit e21cd635 from JBR 9

(cherry picked from commit 5d704a963b)

partially rollback JBR-363 fix, to apply corresponding change from OpenJDK 12

(cherry picked from commit 3d7ac30072)
2021-06-23 07:01:20 +03:00
Vitaly Provodin
c8a4d9b440 JBR-3401 enable macos-aarhc64 builds 2021-06-23 07:01:19 +03:00
Vitaly Provodin
060815822b JBR-3305 remove the option --disable-warnings-as-errors from configure 2021-06-23 07:01:18 +03:00
Vitaly Provodin
27dba0a337 JBR-3398 remove the Experimental AOT and JIT Compiler (JEP 410) 2021-06-23 07:01:17 +03:00
Alexey Ushakov
1035968704 JBR-2807: JDK15: update modules.list to resolve jbr build failure
removed nashorn modules
2021-06-23 07:01:16 +03:00
Vitaly Provodin
456c5541dc JBR-2130 remove module jdk.pack 2021-06-23 07:01:15 +03:00
Vitaly Provodin
10a39fc954 JBR-2922 add JCEF to jbrsdk binaries
& fix a misprint in get_mods_list

JBR-2922 add JCEF to jbrsdk binaries

& fix a misprint in get_mods_list
2021-06-23 07:01:14 +03:00
Vitaly Provodin
6a810f9f2d JBR-2912 add JBR 15 builds with DCEVM 2021-06-23 07:01:13 +03:00
Vitaly Provodin
af8882714f JBR-2864 initial commit of DCEVM patches reworked for 15 2021-06-23 07:01:12 +03:00
Vitaly Provodin
e4d6d86c6e JBR-2812 remove --with-import-modules from configure for aarch64 2021-06-23 07:01:11 +03:00
Anton Tarasov
2a38e08b63 JBR-2812 bundle jcef in jmod format instead of modular-sdk
Build test-image with non-jcef build target
2021-06-23 07:01:10 +03:00
Vitaly Provodin
5a1dc1457e JBR-2787 fix copying jcef files into jbr/jbrsdk binaries 2021-06-23 07:01:09 +03:00
Vitaly Provodin
05a06e6fd4 JBR-2758 refactor building scripts to apply patches adding required modules instead of excluding
Add jogl and gluegen modules to support jcef osr mode
2021-06-23 07:01:08 +03:00
Anton Tarasov
cb1503709a JBR-2016 add jcef module and export packages to it
(cherry picked from commit cf997f71c6)
2021-06-23 07:01:07 +03:00
Vitaly Provodin
34f042312b JBR-2473 modify building scripts to add dcevm clauses, add git config to docker image
(cherry picked from commit 2620c62848)
2021-06-23 07:01:05 +03:00
Vitaly Provodin
c30712e635 JBR-2473 add initial set of DCEVM patches
(cherry picked from commit c0c0a96cf4)
2021-06-23 07:01:04 +03:00
Vitaly Provodin
2250a00e31 JBR-2395 eliminate JavaFX from JBR 2021-06-23 07:01:03 +03:00
Vitaly Provodin
842335850d JBR-2409 fix prameters for configure 2021-06-23 07:01:02 +03:00
Vitaly Provodin
fca9c144ee JDK14: exclude dependencies on jcef in x86, fastdebug builds 2021-06-23 07:01:01 +03:00
Vitaly Provodin
e503e1871e JBR-2396 fix CONF names 2021-06-23 07:01:00 +03:00
Vitaly Provodin
b8f99ef569 JBR-2394 replace --disable-debug-symbols with --with-native-debug-symbols=none 2021-06-23 07:00:59 +03:00
Vitaly Provodin
de84f3315e add exec permitions to configure 2021-06-23 07:00:58 +03:00
Vitaly Provodin
a8b48cca0c split checkout before building JBR+JFX or JBR+JCEF on two separate commands 2021-06-23 07:00:57 +03:00
Vitaly Provodin
13b4f47559 change BOOT_JDK, fix target names 2021-06-23 07:00:56 +03:00
Vitaly Provodin
41af21c89d JBR-2291 add vendor info into bundles 2021-06-23 07:00:55 +03:00
Vitaly Provodin
2f507a4f09 JBR-2324 address new layout in mac jcef 80.0.4+g74f7b0c+chromium-80.0.3987.122 2021-06-23 07:00:54 +03:00
Vitaly Provodin
f6fb8e26e6 JBR-2320 add jdk.attach module into JBR 2021-06-23 07:00:53 +03:00
Vitaly Provodin
f3ae1dc69b JBR-2217 provide JCEF-only (no JavaFX) bundle for master/202 branches 2021-06-23 07:00:52 +03:00
Vitaly Provodin
9a9656503f JBR-2212 add scripts for linux_x86, linux_aarch64, linux_x64_fastdebug, osx_fastdebug, windows_x86 2021-06-23 07:00:51 +03:00
Vitaly Provodin
73acb84e01 JBR-1643 fix intermittent fialures of Windows builds at make/Init.gmk:304
combine images and test-image into one make invocation
2021-06-23 07:00:50 +03:00
Vitaly Provodin
7a7565b3f2 JBR-2181 create two separate JBR bundles with JFX and JFX+JCEF 2021-06-23 07:00:49 +03:00
Vitaly Provodin
bd1e7f09e2 JBR-2148 modify signapp&build scripts to match to the new layout 2021-06-23 07:00:47 +03:00
Vitaly Provodin
367ff82787 JBR-2084 modify scripts to sign Contents/MacOS/libjli.dylib as a a normal file 2021-06-23 07:00:45 +03:00
Vitaly Provodin
0f7b33d42e JBR-1821 notarize JBR bundles as a standalone app 2021-06-23 07:00:44 +03:00
Vitaly Provodin
e01241ff3c JBR-2162 move building scripts from TC to JBR repo 2021-06-23 07:00:43 +03:00
Anton Tarasov
55af4833cf JBR-2016 add jcef module and export some sun.* packages to it 2021-06-23 07:00:42 +03:00
Vitaly Provodin
2e2896c187 JBR-2014 add jdk.hotspot.agent module to jbr 2021-06-23 07:00:41 +03:00
Vitaly Provodin
8828372c87 JBR-1286 add jdk.compiler into JBR 2021-06-23 07:00:40 +03:00
Vitaly Provodin
844c7cd32b JBR-1199 add JBR modules list for jlink 2021-06-23 07:00:39 +03:00
Vitaly Provodin
08229cf68a Update docker script to create jdk15 build env 2021-06-23 07:00:38 +03:00
Vitaly Provodin
d474ded3f5 JBR-3045 add pressing ESC to close the dialog after test completion
(cherry picked from commit 44d8b28b0b)
2021-06-23 07:00:37 +03:00
Vitaly Provodin
3671b2330b JBR-3040 press the button END at the beggining in order to avoid text selection
(cherry picked from commit 1c2bf33db2)
2021-06-23 07:00:36 +03:00
Vitaly.Provodin
95560b7c2b updated JTreg exclude list 2021-06-23 07:00:35 +03:00
3184 changed files with 50390 additions and 113620 deletions

View File

@@ -10,7 +10,7 @@ on:
platforms:
description: "Platform(s) to execute on"
required: true
default: "Linux additional (hotspot only), Linux x64, Linux x86, Windows aarch64, Windows x64, macOS x64"
default: "Linux additional (hotspot only), Linux x64, Linux x86, Windows x64, macOS x64"
jobs:
prerequisites:
@@ -22,7 +22,6 @@ jobs:
platform_linux_additional: ${{ steps.check_platforms.outputs.platform_linux_additional }}
platform_linux_x64: ${{ steps.check_platforms.outputs.platform_linux_x64 }}
platform_linux_x86: ${{ steps.check_platforms.outputs.platform_linux_x86 }}
platform_windows_aarch64: ${{ steps.check_platforms.outputs.platform_windows_aarch64 }}
platform_windows_x64: ${{ steps.check_platforms.outputs.platform_windows_x64 }}
platform_macos_x64: ${{ steps.check_platforms.outputs.platform_macos_x64 }}
platform_macos_aarch64: ${{ steps.check_platforms.outputs.platform_macos_aarch64 }}
@@ -39,7 +38,6 @@ jobs:
echo "::set-output name=platform_linux_additional::${{ contains(github.event.inputs.platforms, 'linux additional (hotspot only)') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'linux additional (hotspot only)'))) }}"
echo "::set-output name=platform_linux_x64::${{ contains(github.event.inputs.platforms, 'linux x64') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'linux x64'))) }}"
echo "::set-output name=platform_linux_x86::${{ contains(github.event.inputs.platforms, 'linux x86') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'linux x86'))) }}"
echo "::set-output name=platform_windows_aarch64::${{ contains(github.event.inputs.platforms, 'windows aarch64') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'windows aarch64'))) }}"
echo "::set-output name=platform_windows_x64::${{ contains(github.event.inputs.platforms, 'windows x64') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'windows x64'))) }}"
echo "::set-output name=platform_macos_x64::${{ contains(github.event.inputs.platforms, 'macos x64') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'macos x64'))) }}"
echo "::set-output name=platform_macos_aarch64::${{ contains(github.event.inputs.platforms, 'macos aarch64') || (github.event.inputs.platforms == '' && (secrets.JDK_SUBMIT_PLATFORMS == '' || contains(secrets.JDK_SUBMIT_PLATFORMS, 'macos aarch64'))) }}"
@@ -174,7 +172,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install gcc-10=10.3.0-1ubuntu1~20.04 g++-10=10.3.0-1ubuntu1~20.04 libxrandr-dev libxtst-dev libcups2-dev libasound2-dev
sudo apt-get install gcc-10=10.2.0-5ubuntu1~20.04 g++-10=10.2.0-5ubuntu1~20.04 libxrandr-dev libxtst-dev libcups2-dev libasound2-dev
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
- name: Configure
@@ -489,12 +487,12 @@ jobs:
- name: Install native host dependencies
run: |
sudo apt-get install gcc-10=10.3.0-1ubuntu1~20.04 g++-10=10.3.0-1ubuntu1~20.04 libxrandr-dev libxtst-dev libcups2-dev libasound2-dev
sudo apt-get install gcc-10=10.2.0-5ubuntu1~20.04 g++-10=10.2.0-5ubuntu1~20.04 libxrandr-dev libxtst-dev libcups2-dev libasound2-dev
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
if: matrix.debian-arch == ''
- name: Install cross-compilation host dependencies
run: sudo apt-get install gcc-10-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}=10.3.0-1ubuntu1~20.04cross1 g++-10-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}=10.3.0-1ubuntu1~20.04cross1
run: sudo apt-get install gcc-10-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}=10.2.0-5ubuntu1~20.04cross1 g++-10-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-flavor}}=10.2.0-5ubuntu1~20.04cross1
if: matrix.debian-arch != ''
- name: Cache sysroot
@@ -849,94 +847,6 @@ jobs:
path: ~/linux-x86${{ matrix.artifact }}_testsupport_${{ env.logsuffix }}.zip
continue-on-error: true
windows_aarch64_build:
name: Windows aarch64
runs-on: "windows-2019"
needs: prerequisites
if: needs.prerequisites.outputs.should_run != 'false' && needs.prerequisites.outputs.platform_windows_aarch64 != 'false'
strategy:
fail-fast: false
matrix:
flavor:
- build debug
include:
- flavor: build debug
flags: --enable-debug
artifact: -debug
env:
JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).DEFAULT_VERSION_FEATURE }}"
BOOT_JDK_VERSION: "${{ fromJson(needs.prerequisites.outputs.dependencies).BOOT_JDK_VERSION }}"
BOOT_JDK_FILENAME: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X64_BOOT_JDK_FILENAME }}"
BOOT_JDK_URL: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X64_BOOT_JDK_URL }}"
BOOT_JDK_SHA256: "${{ fromJson(needs.prerequisites.outputs.dependencies).WINDOWS_X64_BOOT_JDK_SHA256 }}"
steps:
- name: Restore cygwin packages from cache
id: cygwin
uses: actions/cache@v2
with:
path: ~/cygwin/packages
key: cygwin-packages-${{ runner.os }}-v1
- name: Install cygwin
run: |
New-Item -Force -ItemType directory -Path "$HOME\cygwin"
& curl -L "https://www.cygwin.com/setup-x86_64.exe" -o "$HOME/cygwin/setup-x86_64.exe"
Start-Process -FilePath "$HOME\cygwin\setup-x86_64.exe" -ArgumentList "--quiet-mode --packages autoconf,make,zip,unzip --root $HOME\cygwin\cygwin64 --local-package-dir $HOME\cygwin\packages --site http://mirrors.kernel.org/sourceware/cygwin --no-desktop --no-shortcuts --no-startmenu --no-admin" -Wait -NoNewWindow
- name: Checkout the source
uses: actions/checkout@v2
with:
path: jdk
- name: Restore boot JDK from cache
id: bootjdk
uses: actions/cache@v2
with:
path: ~/bootjdk/${{ env.BOOT_JDK_VERSION }}
key: bootjdk-${{ runner.os }}-${{ env.BOOT_JDK_VERSION }}-${{ env.BOOT_JDK_SHA256 }}-v1
- name: Download boot JDK
run: |
mkdir -p "$HOME\bootjdk\$env:BOOT_JDK_VERSION"
& curl -L "$env:BOOT_JDK_URL" -o "$HOME/bootjdk/$env:BOOT_JDK_FILENAME"
$FileHash = Get-FileHash -Algorithm SHA256 "$HOME/bootjdk/$env:BOOT_JDK_FILENAME"
$FileHash.Hash -eq $env:BOOT_JDK_SHA256
& tar -xf "$HOME/bootjdk/$env:BOOT_JDK_FILENAME" -C "$HOME/bootjdk/$env:BOOT_JDK_VERSION"
Get-ChildItem "$HOME\bootjdk\$env:BOOT_JDK_VERSION\*\*" | Move-Item -Destination "$HOME\bootjdk\$env:BOOT_JDK_VERSION"
if: steps.bootjdk.outputs.cache-hit != 'true'
- name: Ensure a specific version of MSVC is installed
run: >
Start-Process -FilePath 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe' -Wait -NoNewWindow -ArgumentList
'modify --installPath "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise" --quiet
--add Microsoft.VisualStudio.Component.VC.14.29.arm64'
- name: Configure
run: >
$env:Path = "$HOME\cygwin\cygwin64\bin;$HOME\cygwin\cygwin64\bin;$env:Path" ;
$env:Path = $env:Path -split ";" -match "C:\\Windows|PowerShell|cygwin" -join ";" ;
$env:BOOT_JDK = cygpath "$HOME/bootjdk/$env:BOOT_JDK_VERSION" ;
& bash configure
--with-conf-name=windows-aarch64
--with-msvc-toolset-version=14.29
--openjdk-target=aarch64-unknown-cygwin
${{ matrix.flags }}
--with-version-opt="$env:GITHUB_ACTOR-$env:GITHUB_SHA"
--with-version-build=0
--with-boot-jdk="$env:BOOT_JDK"
--with-default-make-target="hotspot"
working-directory: jdk
- name: Build
run: |
$env:Path = "$HOME\cygwin\cygwin64\bin;$HOME\cygwin\cygwin64\bin;$env:Path" ;
$env:Path = $env:Path -split ";" -match "C:\\Windows|PowerShell|cygwin" -join ";" ;
& make CONF_NAME=windows-aarch64
working-directory: jdk
windows_x64_build:
name: Windows x64
runs-on: "windows-2019"
@@ -1661,7 +1571,6 @@ jobs:
needs:
- prerequisites
- linux_additional_build
- windows_aarch64_build
- linux_x64_test
- linux_x86_test
- windows_x64_test

2
.gitignore vendored
View File

@@ -16,7 +16,5 @@ NashornProfile.txt
**/JTreport/**
**/JTwork/**
/src/utils/LogCompilation/target/
/.project/
/.settings/
*.class
.idea/workspace.xml

177
README.md
View File

@@ -1,174 +1,13 @@
[![official JetBrains project](http://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
# Welcome to JetBrains Runtime!
# Welcome to the JDK!
JetBrains Runtime is a fork of [OpenJDK](https://github.com/openjdk/jdk) available for Windows, Mac OS X, and Linux.
It includes a number enhancements in font rendering, HiDPI support, ligatures, performance improvements, and bugfixes.
For build instructions please see the
[online documentation](https://openjdk.java.net/groups/build/doc/building.html),
or either of these files:
> **_NOTE_**: This is a **development** branch that is periodically synhronized with
> the [OpenJDK master](https://github.com/openjdk/jdk/tree/master) branch.
>
> Release builds are based on these branches:
> * [master](https://github.com/JetBrains/JetBrainsRuntime/tree/master) (JDK 11)
> * [master17](https://github.com/JetBrains/JetBrainsRuntime/tree/master17) (JDK 17)
- [doc/building.html](doc/building.html) (html version)
- [doc/building.md](doc/building.md) (markdown version)
## Contents
- [Welcome to JetBrains Runtime](#jetbrains-runtime)
- [Products Built on JetBrains Runtime](#products-built-on-jetbrains-runtime)
- [Getting Sources](#getting-sources)
- [macOS, Linux](#macos-linux)
- [Windows](#sources-windows)
- [Configuring the Build Environment](#configuring-the-build-environment)
- [Linux (Docker)](#linux-docker)
- [Ubuntu Linux](#ubuntu-linux)
- [Windows](#build-windows)
- [macOS](#macos)
- [Developing](#developing)
- [Contributing](#contributing)
- [Resources](#resources)
## Products Built on JetBrains Runtime
* [Android Studio](https://developer.android.com/studio). The official IDE for Google's Android operating system.
* [CLion](https://www.jetbrains.com/clion/). A cross-platform IDE for C and C++ from JetBrains.
* [DataGrip](https://www.jetbrains.com/datagrip/). The IDE for Databases and SQL from JetBrains.
* [GoLand](https://www.jetbrains.com/go/). The cross-platform Go IDE from JetBrains.
* [IntelliJ IDEA](https://www.jetbrains.com/idea/). The IDE for JVM from JetBrains.
* [JProfiler](https://www.ej-technologies.com/products/jprofiler/overview.html). The Java profiler.
* [PhpStorm](https://www.jetbrains.com/phpstorm/). The PHP IDE from JetBrains.
* [PyCharm](https://www.jetbrains.com/pycharm/). The Python IDE from JetBrains.
* [Rider](https://www.jetbrains.com/rider/). The cross-platform .NET IDE from JetBrains.
* [RubyMine](https://www.jetbrains.com/ruby/). The Ruby and Rails IDE from JetBrains.
* [WebStorm](https://www.jetbrains.com/webstorm/). The JavaScript IDE from JetBrains.
* [YourKit](https://www.yourkit.com/). Java and .NET profilers.
## Getting Sources
### macOS, Linux
```
git config --global core.autocrlf input
git clone git@github.com:JetBrains/JetBrainsRuntime.git
```
### Windows
<a name="sources-windows"></a>
```
git config --global core.autocrlf false
git clone git@github.com:JetBrains/JetBrainsRuntime.git
```
## Configuring the Build Environment
Here are quick per-platform instructions for those who can't wait to get started.
Please refer to [OpenJDK build docs](https://openjdk.java.net/groups/build/doc/building.html) for in-depth
coverage of all the details.
> **_TIP:_** To get a preliminary report of what's missing, run `./configure` and check its output.
> It would usually have a meaningful advice on how to solve the problem.
### Linux (Docker)
Create a container:
```
$ cd jb/project/docker
$ docker build .
...
Successfully built 942ea9900054
```
Run these commands in the new container:
```
$ docker run -v `pwd`../../../../:/JetBrainsRuntime -it 942ea9900054
# cd /JetBrainsRuntime
# sh ./configure
# make images CONF=linux-x86_64-normal-server-release
```
### Ubuntu Linux
Install the necessary tools, libraries, and headers with:
```
$ sudo apt-get install autoconf make build-essential libx11-dev libxext-dev libxrender-dev libxtst-dev \
libxt-dev libxrandr-dev libcups2-dev libfontconfig1-dev libasound2-dev
```
Get Java 17 (for instance, [Azul Zulu Builds of OpenJDK 17](https://www.azul.com/downloads/?version=java-17-ea&package=jdk)).
Then run the following:
```
$ cd JetBrainsRuntime
$ git checkout jbr-dev
$ sh ./configure
$ make images
```
This will build the release configuration under `./build/linux-x86_64-server-release/`.
### Windows
<a name="build-windows"></a>
Install the following:
* [Cygwin x64](http://www.cygwin.com/).
Required packages: `autoconf`, `binutils`, `cpio`, `diffutils`, `file`, `gawk`, `gcc-core`, `make`, `m4`, `unzip`, `zip`.
Install those together with Cygwin.
* [Visual Studio compiler toolset](https://visualstudio.microsoft.com/downloads/).
Install with the desktop development kit, which includes Windows SDK and compilers.
Visual Studio 2019 is supported by default.
* Java 17 (for instance, [Azul Zulu Builds of OpenJDK 17](https://www.azul.com/downloads/?version=java-17-ea&os=windows&architecture=x86-64-bit&package=jdk).
If you have problems while configuring, read [Java tips on Cygwin](http://horstmann.com/articles/cygwin-tips.html).
From the command line:
```
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
"c:\Program_Files\cygwin64\bin\mintty.exe" /bin/bash -l
```
The first command sets up environment variables, the second starts a Cygwin shell with the proper environment.
In the Cygwin shell:
```
$ cd JetBrainsRuntime
$ git checkout jbr-dev
$ bash configure --with-toolchain-version=2019
$ make images
```
This will build the release configuration under `./build/windows-x86_64-server-release/`.
### macOS
Install the following:
* Xcode command line developer tools and `autoconf` via [Homebrew](https://brew.sh/).
* Java 17 (for instance, [Azul Zulu Builds of OpenJDK 17](https://www.azul.com/downloads/?version=java-17-ea&package=jdk)).
From the command line:
```
$ cd JetBrainsRuntime
$ git checkout jbr-dev
$ sh ./configure
$ make images
```
This will build the release configuration under `./build/macosx-x86_64-server-release/`.
## Developing
You can use [CLion](https://www.jetbrains.com/clion/) to develop native parts of the JetBrains Runtime and
[IntelliJ IDEA](https://www.jetbrains.com/idea/) for the parts written in Java.
Both require projects to be created.
### CLion
Run
```
$ make compile-commands
```
in the git root and open the resulting `build/.../compile_commands.json` file as a project.
Then use `Tools | Compilation Database | Change Project Root` to point to git root of this repository.
See also this detailed step-by-step tutorial for all platforms:
[How to develop OpenJDK with CLion](https://blog.jetbrains.com/clion/2020/03/openjdk-with-clion/).
### IDEA
Run
```
$ sh ./bin/idea.sh
```
in the git root to generate project files (add `--help` for options). If you have multiple
configurations (for example, `release` and `fastdebug`), supply the `--conf <conf_name>` argument.
Then open the git root directory as a project in IDEA.
## Contributing
We are happy to receive your pull requests!
Before you submit one, please sign our [Contributor License Agreement (CLA)](https://www.jetbrains.com/agreements/cla/).
## Resources
* [JetBrains Runtime on github](https://github.com/JetBrains/JetBrainsRuntime).
* [OpenJDK build instructions](https://openjdk.java.net/groups/build/doc/building.html).
* [OpenJDK test instructions](https://htmlpreview.github.io/?https://raw.githubusercontent.com/openjdk/jdk/master/doc/building.html#running-tests).
See <https://openjdk.java.net/> for more information about
the OpenJDK Community and the JDK.

View File

@@ -25,7 +25,7 @@
# Shell script for generating an IDEA project from a given list of modules
usage() {
echo "Usage: $0 [-h|--help] [-q|--quiet] [-a|--absolute-paths] [-r|--root <path>] [-o|--output <path>] [-c|--conf <conf_name>] [modules...]"
echo "Usage: $0 [-h|--help] [-q|--quiet] [-a|--absolute-paths] [-r|--root <path>] [-o|--output <path>] [modules...]"
echo " -h | --help"
echo " -q | --quiet
No stdout output"
@@ -39,8 +39,6 @@ usage() {
Where .idea directory with project files will be generated
(e.g. using '-o .' will place project files in './.idea')
Default: same as --root"
echo " -c | --conf <conf_name>
make configuration (release, slowdebug etc)"
echo " [modules...]
Generate project modules for specific java modules
(e.g. 'java.base java.desktop')
@@ -59,7 +57,6 @@ cd $TOP;
VERBOSE=true
ABSOLUTE_PATHS=false
CONF_ARG=
while [ $# -gt 0 ]
do
case $1 in
@@ -85,11 +82,6 @@ do
shift
;;
-c | --conf )
CONF_ARG="CONF_NAME=$2"
shift
;;
-*) # bad option
usage
;;
@@ -129,7 +121,7 @@ if [ "$VERBOSE" = true ] ; then
fi
cd $TOP ; make -f "$IDEA_MAKE/idea.gmk" -I "$OPENJDK_DIR" idea TOPLEVEL_DIR="$TOPLEVEL_DIR" \
MAKEOVERRIDES= IDEA_OUTPUT_PARENT="$IDEA_OUTPUT_PARENT" OUT="$IDEA_OUTPUT/env.cfg" MODULES="$*" $CONF_ARG || exit 1
MAKEOVERRIDES= IDEA_OUTPUT_PARENT="$IDEA_OUTPUT_PARENT" OUT="$IDEA_OUTPUT/env.cfg" MODULES="$*" || exit 1
cd $SCRIPT_DIR
. $IDEA_OUTPUT/env.cfg
@@ -274,9 +266,8 @@ for value in $MODULES; do
CONTENT_ROOTS=""
IFS=' '
for dir in $moduleSrcDirs; do
case $dir in
case $dir in # See https://youtrack.jetbrains.com/issue/IDEA-185108
"src/"*) MAIN_SOURCE_DIRS="$MAIN_SOURCE_DIRS <sourceFolder url=\"file://$MODULE_DIR/$dir\" isTestSource=\"false\" />" ;;
*"/support/gensrc/$module") ;; # Exclude generated sources to avoid module-info conflicts, see https://youtrack.jetbrains.com/issue/IDEA-185108
*) CONTENT_ROOTS="$CONTENT_ROOTS <content url=\"file://$MODULE_DIR/$dir\">\
<sourceFolder url=\"file://$MODULE_DIR/$dir\" isTestSource=\"false\" generated=\"true\" /></content>" ;;
esac

View File

@@ -488,7 +488,7 @@
<li><code>CONF</code> and <code>CONF_NAME</code> - Selecting the configuration(s) to use. See <a href="#using-multiple-configurations">Using Multiple Configurations</a></li>
</ul>
<h4 id="test-make-control-variables">Test Make Control Variables</h4>
<p>These make control variables only make sense when running tests. Please see <strong>Testing the JDK</strong> (<a href="testing.html">html</a>, <a href="testing.md">markdown</a>) for details.</p>
<p>These make control variables only make sense when running tests. Please see <a href="testing.html">Testing the JDK</a> for details.</p>
<ul>
<li><code>TEST</code></li>
<li><code>TEST_JOBS</code></li>
@@ -506,7 +506,7 @@
</ul>
<h2 id="running-tests">Running Tests</h2>
<p>Most of the JDK tests are using the <a href="http://openjdk.java.net/jtreg">JTReg</a> test framework. Make sure that your configuration knows where to find your installation of JTReg. If this is not picked up automatically, use the <code>--with-jtreg=&lt;path to jtreg home&gt;</code> option to point to the JTReg framework. Note that this option should point to the JTReg home, i.e. the top directory, containing <code>lib/jtreg.jar</code> etc.</p>
<p>The <a href="https://wiki.openjdk.java.net/display/Adoption">Adoption Group</a> provides recent builds of jtreg <a href="https://ci.adoptopenjdk.net/view/Dependencies/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/">here</a>. Download the latest <code>.tar.gz</code> file, unpack it, and point <code>--with-jtreg</code> to the <code>jtreg</code> directory that you just unpacked.</p>
<p>The <a href="https://wiki.openjdk.java.net/display/Adoption">Adoption Group</a> provides recent builds of jtreg <a href="https://ci.adoptopenjdk.net/view/Dependencies/job/jtreg/lastSuccessfulBuild/artifact">here</a>. Download the latest <code>.tar.gz</code> file, unpack it, and point <code>--with-jtreg</code> to the <code>jtreg</code> directory that you just unpacked.</p>
<p>Building of Hotspot Gtest suite requires the source code of Google Test framework. The top directory, which contains both <code>googletest</code> and <code>googlemock</code> directories, should be specified via <code>--with-gtest</code>. The supported version of Google Test is 1.8.1, whose source code can be obtained:</p>
<ul>
<li>by downloading and unpacking the source bundle from <a href="https://github.com/google/googletest/releases/tag/release-1.8.1">here</a></li>
@@ -514,7 +514,7 @@
</ul>
<p>To execute the most basic tests (tier 1), use:</p>
<pre><code>make run-test-tier1</code></pre>
<p>For more details on how to run tests, please see <strong>Testing the JDK</strong> (<a href="testing.html">html</a>, <a href="testing.md">markdown</a>).</p>
<p>For more details on how to run tests, please see the <a href="testing.html">Testing the JDK</a> document.</p>
<h2 id="cross-compiling">Cross-compiling</h2>
<p>Cross-compiling means using one platform (the <em>build</em> platform) to generate output that can ran on another platform (the <em>target</em> platform).</p>
<p>The typical reason for cross-compiling is that the build is performed on a more powerful desktop computer, but the resulting binaries will be able to run on a different, typically low-performing system. Most of the complications that arise when building for embedded is due to this separation of <em>build</em> and <em>target</em> systems.</p>

View File

@@ -818,7 +818,7 @@ configuration, as opposed to the "configure time" configuration.
#### Test Make Control Variables
These make control variables only make sense when running tests. Please see
**Testing the JDK** ([html](testing.html), [markdown](testing.md)) for details.
[Testing the JDK](testing.html) for details.
* `TEST`
* `TEST_JOBS`
@@ -848,7 +848,7 @@ containing `lib/jtreg.jar` etc.
The [Adoption Group](https://wiki.openjdk.java.net/display/Adoption) provides
recent builds of jtreg [here](
https://ci.adoptopenjdk.net/view/Dependencies/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/).
https://ci.adoptopenjdk.net/view/Dependencies/job/jtreg/lastSuccessfulBuild/artifact).
Download the latest `.tar.gz` file, unpack it, and point `--with-jtreg` to the
`jtreg` directory that you just unpacked.
@@ -865,8 +865,8 @@ To execute the most basic tests (tier 1), use:
make run-test-tier1
```
For more details on how to run tests, please see **Testing the JDK**
([html](testing.html), [markdown](testing.md)).
For more details on how to run tests, please see the [Testing
the JDK](testing.html) document.
## Cross-compiling

View File

@@ -1,230 +0,0 @@
#!/usr/bin/env python3
import argparse
import math
import os.path
import sys
import subprocess
def fatal(msg):
sys.stderr.write(f"[fatal] {msg}\n")
sys.exit(1)
def verbose(options, *msg):
if options.verbose:
sys.stdout.write(f"[verbose] ")
sys.stdout.write(*msg)
sys.stdout.write('\n')
def first_line(str):
return "" if not str else str.splitlines()[0]
class Options:
def __init__(self):
ap = argparse.ArgumentParser(description="Show bugfixes differences between JBR and OpenJDK git repos",
epilog="Example: %(prog)s --jdk ./jdk11u/ --jbr ./JetBrainsRuntime/ --path src/hotspot --limit 200")
ap.add_argument('--jdk', dest='jdkpath', help='path to OpenJDK git repo', required=True)
ap.add_argument('--jbr', dest='jbrpath', help='path to JBR git repo', required=True)
ap.add_argument('--path', dest='path', help='limit to changes in this path (relative to git root)')
ap.add_argument('--limit', dest='limit', help='limit to this many log entries in --jdk repo', type=int, default=-1)
ap.add_argument('-o', dest="output_dir", help="save patches to this directory (created if necessary)")
ap.add_argument('-v', dest='verbose', help="verbose output", default=False, action='store_true')
args = ap.parse_args()
if not os.path.isdir(args.jdkpath):
fatal(f"{args.jdkpath} not a directory")
if not os.path.isdir(args.jbrpath):
fatal(f"{args.jbrpath} not a directory")
if not git_is_available():
fatal("can't run git commands; make sure git is in PATH")
self.jdkpath = args.jdkpath
self.jbrpath = args.jbrpath
self.path = args.path
self.limit = args.limit
self.output_dir = args.output_dir
self.verbose = args.verbose
class GitRepo:
def __init__(self, rootpath):
self.rootpath = rootpath
def run_git_cmd(self, git_args):
args = ["git", "-C", self.rootpath]
args.extend(git_args)
# print(f"Runnig git cmd '{' '.join(args)}'")
p = subprocess.run(args, capture_output=True, text=True)
if p.returncode != 0:
fatal(f"git returned non-zero code in {self.rootpath} ({first_line(p.stderr)})")
return p.stdout
def save_git_cmd(self, fname, git_args):
args = ["git", "-C", self.rootpath]
args.extend(git_args)
# print(f"Runnig git cmd '{' '.join(args)}'")
with open(fname, "w") as stdout_file:
p = subprocess.run(args, stdout=stdout_file)
if p.returncode != 0:
fatal(f"git returned non-zero code in {self.rootpath} ({first_line(p.stderr)})")
def current_branch(self):
branch_name = self.run_git_cmd(["branch", "--show-current"]).strip()
return branch_name
def log(self, path=None, limit=None):
cmds = ["log", "--no-decorate"]
if limit:
cmds.extend(["-n", str(limit)])
if path:
cmds.append(path)
full_log = self.run_git_cmd(cmds)
return full_log
class Commit:
def __init__(self, lines):
self.sha = lines[0].split()[1]
self.message = ""
self.bugid = None
# Commit message starts after one blank line
read_message = False
for l in lines:
if read_message:
self.message += l + "\n"
if not read_message and l == "":
read_message = True
if self.message and self.message != "" and ":" in self.message:
maybe_bugid = self.message.split(":")[0].strip()
if 10 >= len(maybe_bugid) >= 4:
self.bugid = maybe_bugid
class History:
def __init__(self, log):
log_itr = iter(log.splitlines())
self.commits = []
commit_lines = []
for line in log_itr:
if line.startswith("commit ") and len(commit_lines) > 0:
commit = Commit(commit_lines)
self.commits.append(commit)
commit_lines = []
commit_lines.append(line)
if len(commit_lines) > 0:
commit = Commit(commit_lines)
self.commits.append(commit)
def contains(self, str):
return any(str in commit.message for commit in self.commits)
def size(self):
return len(self.commits)
def print_explanation(options, jdk, jbr):
verbose(options, f"Reading history from '{jdk.rootpath}' on branch '{jdk.current_branch()}'")
if options.path:
verbose(options, f"\t(only under '{options.path}')")
verbose(options, f"Searching for same fixes in '{jbr.rootpath}' on branch '{jbr.current_branch()}'")
def git_is_available():
p = None
try:
p = subprocess.run(["git", "--help"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
except:
pass
return p is not None and p.returncode == 0
def main():
check_python_min_requirements()
options = Options()
jdk = GitRepo(options.jdkpath)
jbr = GitRepo(options.jbrpath)
print_explanation(options, jdk, jbr)
commits_to_save = []
try:
jdk_log = jdk.log(options.path, options.limit)
jdk_history = History(jdk_log)
jbr_log = jbr.log(options.path)
jbr_history = History(jbr_log)
verbose(options, f"Read {jdk_history.size()} commits in JDK, {jbr_history.size()} in JBR")
for c in jdk_history.commits:
if c.bugid:
verbose(options, f"Looking for bugfix for {c.bugid}")
if not jbr_history.contains(c.bugid):
commits_to_save.append(c)
print(f"[note] Fix for {c.bugid} not found in JBR ({jbr.rootpath})")
print(f" commit {c.sha}")
print(f" {first_line(c.message).strip()}")
except KeyboardInterrupt:
fatal("Interrupted")
if len(commits_to_save) > 0 and options.output_dir:
print()
if not os.path.exists(options.output_dir):
verbose(options, f"Creating output directory {options.output_dir}")
os.makedirs(options.output_dir)
nzeroes = len(str(len(commits_to_save)))
for i, c in enumerate(reversed(commits_to_save)):
fname = os.path.join(options.output_dir, f"{str(i).zfill(nzeroes)}-{c.bugid}.patch")
print(f"[note] {c.bugid} saved as {fname}")
fname = os.path.abspath(fname)
jdk.save_git_cmd(fname, ["format-patch", "-1", c.sha, "--stdout"])
script_fname = os.path.join(options.output_dir, "apply.sh")
with open(script_fname, "w") as script_file:
print(apply_script_code.format(os.path.abspath(jbr.rootpath), os.path.abspath(options.output_dir)),
file=script_file)
print(f"[note] Execute 'bash {script_fname}' to apply patches to {jbr.rootpath}")
def check_python_min_requirements():
if sys.version_info < (3, 6):
fatal("Minimum version 3.6 is required to run this script")
apply_script_code = """
#!/bin/bash
GITROOT={0}
PATCHROOT={1}
cd $PATCHROOT || exit 1
PATCHES=$(find $PATCHROOT -name '*.patch' | sort -n)
for P in $PATCHES; do
git -C $GITROOT am $P
if [ $? != 0 ]; then
mv "$P" "$P.failed"
echo "[ERROR] Patch $P did not apply cleanly. Try applying it manually."
echo "[NOTE] Execute this script to apply the remaining patches."
exit 1
else
mv "$P" "$P.done"
fi
done
echo "[NOTE] Done applying patches; check $PATCHROOT for .patch and .patch.failed to see if all have been applied."
"""
if __name__ == '__main__':
main()

View File

@@ -1,7 +0,0 @@
FROM i386/ubuntu:xenial
RUN linux32 apt-get update && apt-get install -y --no-install-recommends apt-utils
COPY jbrsdk-11.0.5-b1 /jbrsdk-11.0.5-b1
RUN linux32 apt-get -y install file build-essential zip unzip 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

View File

@@ -1,6 +1,6 @@
<component name="CopyrightManager">
<copyright>
<option name="notice" value="Copyright &amp;#36;originalComment.match(&quot;Copyright (\d+)&quot;, 1, &quot;-&quot;)&amp;#36;today.year JetBrains s.r.o.&#10;DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.&#10;&#10;This code is free software; you can redistribute it and/or modify it&#10;under the terms of the GNU General Public License version 2 only, as&#10;published by the Free Software Foundation.&#10;&#10;This code is distributed in the hope that it will be useful, but WITHOUT&#10;ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or&#10;FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License&#10;version 2 for more details (a copy is included in the LICENSE file that&#10;accompanied this code).&#10;&#10;You should have received a copy of the GNU General Public License version&#10;2 along with this work; if not, write to the Free Software Foundation,&#10;Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.&#10;&#10;Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA&#10;or visit www.oracle.com if you need additional information or have any&#10;questions." />
<option name="notice" value="Copyright 2000-&amp;#36;today.year JetBrains s.r.o.&#10;&#10;Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);&#10;you may not use this file except in compliance with the License.&#10;You may obtain a copy of the License at&#10;&#10;http://www.apache.org/licenses/LICENSE-2.0&#10;&#10;Unless required by applicable law or agreed to in writing, software&#10;distributed under the License is distributed on an &quot;AS IS&quot; BASIS,&#10;WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#10;See the License for the specific language governing permissions and&#10;limitations under the License." />
<option name="keyword" value="Copyright" />
<option name="allowReplaceKeyword" value="JetBrains" />
<option name="myName" value="JetBrains" />

View File

@@ -52,13 +52,3 @@ function get_mods_list() {
__mods=$1
echo $(ls $__mods) | sed s/\.jmod/,/g | sed s/,$//g | sed s/' '//g
}
function copy_jmods() {
__mods_list=$1
__jmods_from=$2
__jmods_to=$3
mkdir -p $__jmods_to
echo "${__mods_list}," | while read -d, mod; do cp $__jmods_from/$mod.jmod $__jmods_to/; done
}

View File

@@ -30,9 +30,8 @@ sh configure \
--with-debug-level=release \
--with-vendor-name="${VENDOR_NAME}" \
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
--with-jvm-features=shenandoahgc \
--with-version-pre= \
--with-version-build="${JDK_BUILD_NUMBER}" \
--with-version-build=${JDK_BUILD_NUMBER} \
--with-version-opt=b${build_number} \
--with-boot-jdk=${BOOT_JDK} \
--enable-cds=yes || exit $?
@@ -68,7 +67,7 @@ grep -v javafx modules.list | grep -v "jdk.internal.vm\|jdk.aot\|jcef" > modules
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) \
--add-modules $(xargs < modules.list.aarch64 | sed s/" "//g | sed s/,$//g) \
--output ${BASE_DIR}/${JBR_BUNDLE} || exit $?
echo Modifying release info ...

View File

@@ -36,7 +36,7 @@ function create_image_bundle {
__modules_path=$3
__modules=$4
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
[ "$bundle_type" == "fd" ] && fastdebug_infix="fastdebug-"
JBR=${__bundle_name}-${JBSDK_VERSION}-linux-x64-${fastdebug_infix}b${build_number}
echo Running jlink....
@@ -46,10 +46,9 @@ function create_image_bundle {
--add-modules "$__modules" --output "$IMAGES_DIR"/"$__arch_name"
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> "$IMAGES_DIR"/"$__arch_name"/release
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
if [ "$__bundle_name" == "$JBRSDK_BUNDLE" ]; then
sed 's/JBR/JBRSDK/g' "$IMAGES_DIR"/"$__arch_name"/release > release
mv release "$IMAGES_DIR"/"$__arch_name"/release
copy_jmods "$__modules" "$__modules_path" "$IMAGES_DIR"/"$__arch_name"/jmods
fi
# jmod does not preserve file permissions (JDK-8173610)
@@ -67,19 +66,19 @@ RELEASE_NAME=linux-x86_64-server-release
case "$bundle_type" in
"jcef")
do_reset_changes=0
do_reset_changes=1
;;
"dcevm")
HEAD_REVISION=$(git rev-parse HEAD)
git am jb/project/tools/patches/dcevm/*.patch || do_exit $?
do_reset_dcevm=0
do_reset_changes=0
do_reset_dcevm=1
do_reset_changes=1
;;
"nomod" | "")
bundle_type=""
;;
"fd")
do_reset_changes=0
do_reset_changes=1
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
RELEASE_NAME=linux-x86_64-server-fastdebug
;;
@@ -89,7 +88,6 @@ sh configure \
$WITH_DEBUG_LEVEL \
--with-vendor-name="$VENDOR_NAME" \
--with-vendor-version-string="$VENDOR_VERSION_STRING" \
--with-jvm-features=shenandoahgc \
--with-version-pre= \
--with-version-build="$JDK_BUILD_NUMBER" \
--with-version-opt=b"$build_number" \
@@ -113,7 +111,6 @@ if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_t
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
jbr_name_postfix="_${bundle_type}"
[ "$bundle_type" != "fd" ] && jbrsdk_name_postfix="_${bundle_type}"
fi
# create runtime image bundle
@@ -121,11 +118,11 @@ 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 $?
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${jbr_name_postfix}" $JBRSDK_BUNDLE $JSDK_MODS_DIR "$modules" || do_exit $?
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}

View File

@@ -51,7 +51,7 @@ function create_image_bundle {
tmp=.bundle.$$.tmp
mkdir "$tmp" || do_exit $?
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
[ "$bundle_type" == "fd" ] && fastdebug_infix="fastdebug-"
JBR=${__bundle_name}-${JBSDK_VERSION}-osx-${architecture}-${fastdebug_infix}b${build_number}
JRE_CONTENTS=$tmp/$__arch_name/Contents
@@ -63,10 +63,9 @@ function create_image_bundle {
--add-modules "$__modules" --output "$JRE_CONTENTS/Home" || do_exit $?
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> "$JRE_CONTENTS/Home/release"
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
if [ "$__bundle_name" == "$JBRSDK_BUNDLE" ]; then
sed 's/JBR/JBRSDK/g' $JRE_CONTENTS/Home/release > release
mv release $JRE_CONTENTS/Home/release
copy_jmods "$__modules" "$__modules_path" "$JRE_CONTENTS"/Home/jmods
fi
cp -R "$JSDK"/../MacOS "$JRE_CONTENTS"
@@ -94,19 +93,19 @@ RELEASE_NAME=macosx-${CONF_ARCHITECTURE}-server-release
case "$bundle_type" in
"jcef")
do_reset_changes=0
do_reset_changes=1
;;
"dcevm")
HEAD_REVISION=$(git rev-parse HEAD)
git am jb/project/tools/patches/dcevm/*.patch || do_exit $?
do_reset_dcevm=0
do_reset_changes=0
do_reset_dcevm=1
do_reset_changes=1
;;
"nomod" | "")
bundle_type=""
;;
"fd")
do_reset_changes=0
do_reset_changes=1
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
RELEASE_NAME=macosx-${CONF_ARCHITECTURE}-server-fastdebug
JBSDK=macosx-${architecture}-server-release
@@ -118,7 +117,6 @@ if [[ "${architecture}" == *aarch64* ]]; then
$WITH_DEBUG_LEVEL \
--with-vendor-name="${VENDOR_NAME}" \
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
--with-jvm-features=shenandoahgc \
--with-version-pre= \
--with-version-build="${JDK_BUILD_NUMBER}" \
--with-version-opt=b"${build_number}" \
@@ -133,7 +131,6 @@ else
$WITH_DEBUG_LEVEL \
--with-vendor-name="$VENDOR_NAME" \
--with-vendor-version-string="$VENDOR_VERSION_STRING" \
--with-jvm-features=shenandoahgc \
--with-version-pre= \
--with-version-build="$JDK_BUILD_NUMBER" \
--with-version-opt=b"$build_number" \
@@ -161,11 +158,11 @@ 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 $?
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${jbr_name_postfix}" "$JBRSDK_BUNDLE" "$JSDK_MODS_DIR" "$modules" || do_exit $?
create_image_bundle "$JBRSDK_BUNDLE" "$JBRSDK_BUNDLE" "$JSDK_MODS_DIR" "$modules" || do_exit $?
if [ -z "$bundle_type" ]; then
JBRSDK_TEST=${JBRSDK_BUNDLE}-${JBSDK_VERSION}-osx-test-${architecture}-b${build_number}

View File

@@ -58,7 +58,7 @@ file="$APP_NAME.zip"
log "Zipping $file..."
rm -rf "$file"
ditto -c -k --sequesterRsrc --keepParent "$APP_DIRECTORY" "$file"
ditto -c -k --sequesterRsrc --keepParent "$APP_DIRECTORY/Contents" "$file"
log "Notarizing $file..."
rm -rf "altool.init.out" "altool.check.out"

View File

@@ -1,56 +0,0 @@
#!/bin/bash -x
# How to call this script:
# eval $(jb/project/tools/mkjbrapi.sh)
# It is used to build jetbrains.api module
# After properly calling this script, you can use following variables:
# JBR_API_JAR - absolute path to resulting JAR
# JBR_API_SOURCES_JAR - absolute path to JAR with sources
# JBR_API_VERSION - JBR API version in form <major>.<minor>
# JBR_API_VERSION_MAJOR, JBR_API_VERSION_MINOR - JBR API version components
# JBR_BUILD_DIR - absolute path to JBR build directory
# JBR_BOOT_JDK - absolute path to used boot JDK
ROOT=$(pwd)
sh configure --with-debug-level=release --disable-warnings-as-errors 1>&2 || exit $?
# Get boot JDK & build directory using make script
make -f $ROOT/make/JBRApi.gmk -I $ROOT jbr-api MAKEOVERRIDES= CONF=release OUT="$ROOT/build/jbr-api.cfg" 1>&2 || exit $?
source "$ROOT/build/jbr-api.cfg" || exit $?
# Build module
make jetbrains.api 1>&2 || exit $?
# Get JBR API version from compiled class
JSHELL_COMMAND='
System.out.println("\nVERSION_MAJOR=" + com.jetbrains.JBRApi.getMajorVersion());
System.out.println("\nVERSION_MINOR=" + com.jetbrains.JBRApi.getMinorVersion());
/exit'
VERSION_VARIABLES=$("$BOOT_JDK/bin/jshell" -s --module-path "$BUILD_DIR/jdk/modules/jetbrains.api" \
--add-modules jetbrains.api <<< "$JSHELL_COMMAND" | grep "^VERSION\|^|") || exit $?
eval "$VERSION_VARIABLES" || exit $?
# Create JAR
(
cd "$BUILD_DIR/jdk/modules/jetbrains.api"
"$BOOT_JDK/bin/jar" -cf "$BUILD_DIR/jbr-api.jar" * 1>&2
) || exit $?
# Create source JAR
(
cd "src/jetbrains.api/share/classes"
"$BOOT_JDK/bin/jar" -cf "$BUILD_DIR/jbr-api-sources.jar" * 1>&2
) || exit $?
# Print output values
echo "JBR_API_JAR=$BUILD_DIR/jbr-api.jar"
echo "JBR_API_SOURCES_JAR=$BUILD_DIR/jbr-api-sources.jar"
echo "JBR_API_VERSION=$VERSION_MAJOR.$VERSION_MINOR"
echo "JBR_API_VERSION_MAJOR=$VERSION_MAJOR"
echo "JBR_API_VERSION_MINOR=$VERSION_MINOR"
echo "JBR_BUILD_DIR=$BUILD_DIR"
echo "JBR_BOOT_JDK=$BOOT_JDK"
echo "Success!" 1>&2

View File

@@ -1,21 +1,21 @@
diff --git modules.list modules.list
index dcf610a6a56..f8797505c23 100644
index 7c4b3e9cb6d..5ed60349ca7 100644
--- modules.list
+++ modules.list
@@ -51,4 +51,7 @@ jdk.zipfs,
jdk.hotspot.agent,
jetbrains.api,
jetbrains.api.impl,
-jdk.jcmd
+jdk.jcmd,
@@ -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 897647ee368..781d1809493 100644
index b663b382f52..3e9acdc0c27 100644
--- src/java.desktop/share/classes/module-info.java
+++ src/java.desktop/share/classes/module-info.java
@@ -116,7 +116,11 @@ module java.desktop {
@@ -109,7 +109,11 @@ module java.desktop {
// see make/GensrcModuleInfo.gmk
exports sun.awt to
jdk.accessibility,

View File

@@ -33,9 +33,8 @@ source jb/project/tools/common/scripts/common.sh
function create_image_bundle {
__bundle_name=$1
__arch_name=$2
__modules_path=$3
__modules=$4
__modules_path=$2
__modules=$3
[ -d $__bundle_name ] && rm -rf $__bundle_name
@@ -45,10 +44,9 @@ function create_image_bundle {
--add-modules $__modules --output $__bundle_name || do_exit $?
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> $__bundle_name/release
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
if [ "$__bundle_name" == "$JBRSDK_BUNDLE" ]; then
sed 's/JBR/JBRSDK/g' $__bundle_name/release > release
mv release $__bundle_name/release
copy_jmods "$__modules" "$__modules_path" "$__bundle_name"/jmods
fi
}
@@ -57,19 +55,19 @@ RELEASE_NAME=windows-x86_64-server-release
case "$bundle_type" in
"jcef")
do_reset_changes=0
do_reset_changes=1
;;
"dcevm")
HEAD_REVISION=$(git rev-parse HEAD)
git am jb/project/tools/patches/dcevm/*.patch || do_exit $?
do_reset_dcevm=0
do_reset_changes=0
do_reset_dcevm=1
do_reset_changes=1
;;
"nomod" | "")
bundle_type=""
;;
"fd")
do_reset_changes=0
do_reset_changes=1
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
RELEASE_NAME=windows-x86_64-server-fastdebug
;;
@@ -79,7 +77,6 @@ sh ./configure \
$WITH_DEBUG_LEVEL \
--with-vendor-name="$VENDOR_NAME" \
--with-vendor-version-string="$VENDOR_VERSION_STRING" \
--with-jvm-features=shenandoahgc \
--with-version-pre= \
--with-version-build=$JDK_BUILD_NUMBER \
--with-version-opt=b${build_number} \
@@ -99,11 +96,6 @@ JSDK=$IMAGES_DIR/jdk
JSDK_MODS_DIR=$IMAGES_DIR/jmods
JBRSDK_BUNDLE=jbrsdk
where cygpath
if [ $? -eq 0 ]; then
JCEF_PATH="$(cygpath -w $JCEF_PATH | sed 's/\\/\//g')"
fi
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 $?
@@ -114,13 +106,13 @@ 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_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)
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${jbr_name_postfix}" "$JBRSDK_BUNDLE" "$JSDK_MODS_DIR" "$modules" || do_exit $?
create_image_bundle "$JBRSDK_BUNDLE" "$JSDK_MODS_DIR" "$modules" || do_exit $?
do_exit 0

View File

@@ -26,30 +26,49 @@ build_number=$3
bundle_type=$4
function pack_jbr {
__bundle_name=$1
__arch_name=$2
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
JBR=${__bundle_name}-${JBSDK_VERSION}-windows-x64-${fastdebug_infix}b${build_number}
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 $__bundle_name || do_exit $?
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR jbr || do_exit $?
}
[ "$bundle_type" == "nomod" ] && bundle_type=""
JBRSDK_BUNDLE=jbrsdk
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
jbr_name_postfix="_${bundle_type}"
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 jbr${jbr_name_postfix}
pack_jbr jbrsdk${jbr_name_postfix}
pack_jbr $bundle_type
if [ -z "$bundle_type" ]; then
JBRSDK_TEST=$JBRSDK_BASE_NAME-windows-test-x64-b$build_number

View File

@@ -213,12 +213,12 @@ endif
ifeq ($(call isTargetOs, windows), true)
ifeq ($(SHIP_DEBUG_SYMBOLS), )
JMOD_FLAGS += --exclude '**{_the.*,_*.marker*,*.diz,*.pdb,*.map}'
JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.pdb,*.map}'
else
JMOD_FLAGS += --exclude '**{_the.*,_*.marker*,*.diz,*.map}'
JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.map}'
endif
else
JMOD_FLAGS += --exclude '**{_the.*,_*.marker*,*.diz,*.debuginfo,*.dSYM/**,*.dSYM}'
JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.debuginfo,*.dSYM/**,*.dSYM}'
endif
# Create jmods in the support dir and then move them into place to keep the

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2016, 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
@@ -88,10 +88,7 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST
$(CAT) $(LINK_OPT_DIR)/stderr $(JLI_TRACE_FILE) ; \
exit $$exitcode \
)
$(GREP) -v HelloClasslist $@.raw.2 > $@.raw.3
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java \
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
build.tools.classlist.SortClasslist $@.raw.3 > $@
$(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

@@ -1,20 +0,0 @@
include Makefile
include make/MainSupport.gmk
.PHONY: jbr-api
ifeq ($(SPEC),)
ifneq ($(words $(SPECS)),1)
@echo "Error: Multiple build specification files found. Please select one explicitly."
@exit 2
endif
jbr-api:
@cd $(topdir)
@$(MAKE) $(MFLAGS) $(MAKE_LOG_FLAGS) -r -R -j 1 -f $(topdir)/make/JBRApi.gmk SPEC=$(SPECS) HAS_SPEC=true ACTUAL_TOPDIR=$(topdir) MODULES="$(MODULES)" jbr-api
else #with SPEC
jbr-api:
$(ECHO) "BUILD_DIR=$(OUTPUTDIR)" > $(OUT)
$(ECHO) "BOOT_JDK=\"$(BOOT_JDK)\"" >> $(OUT)
endif

View File

@@ -857,9 +857,6 @@ else
# virtual target.
jdk.jdwp.agent-libs: jdk.jdwp.agent-gensrc
# jdk.jfr-gendata uses TOOL_JFR_GEN from buildtools-hotspot
jdk.jfr-gendata: buildtools-hotspot
# The swing beans need to have java base properly generated to avoid errors
# in javadoc. The X11 wrappers need the java.base include files to have been
# copied and processed.

View File

@@ -298,28 +298,6 @@ AC_DEFUN([BOOTJDK_CHECK_TOOL_IN_BOOTJDK],
])
])
# Setup CLASSPATH environment variable
AC_DEFUN([BOOTJDK_SETUP_CLASSPATH],
[
AC_ARG_WITH([classpath], [AS_HELP_STRING([--with-classpath],
[Optional classpath to set as CLASSPATH to all Java invocations @<:@none@:>@])])
if test "x$CLASSPATH" != x; then
AC_MSG_WARN([CLASSPATH is set in the environment. This will be ignored. Use --with-classpath instead.])
fi
CLASSPATH=
if test "x$with_classpath" != x && test "x$with_classpath" != xyes &&
test "x$with_classpath" != xno ; then
CLASSPATH="$with_classpath"
AC_MSG_CHECKING([for classpath to use for all Java invocations])
AC_MSG_RESULT([$CLASSPATH])
fi
AC_SUBST(CLASSPATH)
])
###############################################################################
#
# We need a Boot JDK to bootstrap the build.
@@ -416,8 +394,6 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
BOOTJDK_USE_LOCAL_CDS=false
AC_MSG_RESULT([no, -XX:SharedArchiveFile not supported])
fi
BOOTJDK_SETUP_CLASSPATH
])
AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],

View File

@@ -102,15 +102,6 @@ if [ "x$OUT" = x ]; then
fi
fi
# Test and fix LoongArch64.
if [ "x$OUT" = x ]; then
if [ `uname -s` = Linux ]; then
if [ `uname -m` = loongarch64 ]; then
OUT=loongarch64-unknown-linux-gnu
fi
fi
fi
# Test and fix cpu on macos-aarch64, uname -p reports arm, buildsys expects aarch64
echo $OUT | grep arm-apple-darwin > /dev/null 2> /dev/null
if test $? != 0; then

View File

@@ -137,7 +137,7 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS],
DISABLED_WARNINGS="4800"
if test "x$TOOLCHAIN_VERSION" = x2017; then
# VS2017 incorrectly triggers this warning for constexpr
DISABLED_WARNINGS="$DISABLED_WARNINGS 4307"
DISABLED_WARNINGS+=" 4307"
fi
;;

View File

@@ -33,11 +33,11 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS],
# Setup the target toolchain
# On some platforms (mac) the linker warns about non existing -L dirs.
# For any of the variants server, client, minimal or zero, the dir matches the
# For any of the variants server, client or minimal, the dir matches the
# variant name. The "main" variant should be used for linking. For the
# rest, the dir is just server.
if HOTSPOT_CHECK_JVM_VARIANT(server) || HOTSPOT_CHECK_JVM_VARIANT(client) \
|| HOTSPOT_CHECK_JVM_VARIANT(minimal) || HOTSPOT_CHECK_JVM_VARIANT(zero); then
|| HOTSPOT_CHECK_JVM_VARIANT(minimal); then
TARGET_JVM_VARIANT_PATH=$JVM_VARIANT_MAIN
else
TARGET_JVM_VARIANT_PATH=server

View File

@@ -89,12 +89,11 @@ AC_DEFUN([FLAGS_SETUP_ASFLAGS],
# Fix linker warning.
# Code taken from make/autoconf/flags-cflags.m4 and adapted.
JVM_BASIC_ASFLAGS="$JVM_BASIC_ASFLAGS \
-DMAC_OS_X_VERSION_MIN_REQUIRED=$MACOSX_VERSION_MIN_NODOTS \
JVM_BASIC_ASFLAGS+="-DMAC_OS_X_VERSION_MIN_REQUIRED=$MACOSX_VERSION_MIN_NODOTS \
-mmacosx-version-min=$MACOSX_VERSION_MIN"
if test -n "$MACOSX_VERSION_MAX"; then
JVM_BASIC_ASFLAGS="$JVM_BASIC_ASFLAGS $OS_CFLAGS \
JVM_BASIC_ASFLAGS+="$OS_CFLAGS \
-DMAC_OS_X_VERSION_MAX_ALLOWED=$MACOSX_VERSION_MAX_NODOTS"
fi
fi

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -42,21 +42,21 @@ AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
PKGHANDLER_COMMAND=
case $PKGHANDLER in
*apt-get)
apt-get)
apt_help $MISSING_DEPENDENCY ;;
*yum)
yum)
yum_help $MISSING_DEPENDENCY ;;
*brew)
brew)
brew_help $MISSING_DEPENDENCY ;;
*port)
port)
port_help $MISSING_DEPENDENCY ;;
*pkgutil)
pkgutil)
pkgutil_help $MISSING_DEPENDENCY ;;
*pkgadd)
pkgadd)
pkgadd_help $MISSING_DEPENDENCY ;;
*zypper)
zypper)
zypper_help $MISSING_DEPENDENCY ;;
*pacman)
pacman)
pacman_help $MISSING_DEPENDENCY ;;
esac
@@ -274,7 +274,7 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
printf "\n"
printf "Build performance summary:\n"
printf "* Build jobs: $JOBS\n"
printf "* Cores to use: $JOBS\n"
printf "* Memory limit: $MEMORY_SIZE MB\n"
if test "x$CCACHE_STATUS" != "x"; then
printf "* ccache status: $CCACHE_STATUS\n"

View File

@@ -84,7 +84,7 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANTS],
fi
# All "special" variants share the same output directory ("server")
VALID_MULTIPLE_JVM_VARIANTS="server client minimal zero"
VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
UTIL_GET_NON_MATCHING_VALUES(INVALID_MULTIPLE_VARIANTS, $JVM_VARIANTS, \
$VALID_MULTIPLE_JVM_VARIANTS)
if test "x$INVALID_MULTIPLE_VARIANTS" != x && \
@@ -95,7 +95,7 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANTS],
# The "main" variant is the one used by other libs to link against during the
# build.
if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
MAIN_VARIANT_PRIO_ORDER="server client minimal zero"
MAIN_VARIANT_PRIO_ORDER="server client minimal"
for variant in $MAIN_VARIANT_PRIO_ORDER; do
if HOTSPOT_CHECK_JVM_VARIANT($variant); then
JVM_VARIANT_MAIN="$variant"

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -525,7 +525,7 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
MACOSX_BUNDLE_BUILD_VERSION="$VERSION_BUILD"
# If VERSION_OPT consists of only numbers and periods, add it.
if [ [[ $VERSION_OPT =~ ^[0-9\.]+$ ]] ]; then
MACOSX_BUNDLE_BUILD_VERSION="$MACOSX_BUNDLE_BUILD_VERSION.$VERSION_OPT"
MACOSX_BUNDLE_BUILD_VERSION+=".$VERSION_OPT"
fi
fi
AC_SUBST(MACOSX_BUNDLE_BUILD_VERSION)

View File

@@ -43,9 +43,11 @@ AC_DEFUN_ONCE([LIB_DETERMINE_DEPENDENCIES],
if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
# No X11 support on windows or macosx
NEEDS_LIB_X11=false
elif test "x$ENABLE_HEADLESS_ONLY" = xtrue; then
# No X11 support needed when building headless only
NEEDS_LIB_X11=false
else
# All other instances need X11, even if building headless only, libawt still
# needs X11 headers.
# All other instances need X11
NEEDS_LIB_X11=true
fi

View File

@@ -72,12 +72,6 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU],
VAR_CPU_BITS=64
VAR_CPU_ENDIAN=little
;;
loongarch64)
VAR_CPU=loongarch64
VAR_CPU_ARCH=loongarch
VAR_CPU_BITS=64
VAR_CPU_ENDIAN=little
;;
m68k)
VAR_CPU=m68k
VAR_CPU_ARCH=m68k

View File

@@ -54,9 +54,6 @@ MAKE := @MAKE@
# Make sure all shell commands are executed with the C locale
export LC_ALL := C
# Make sure we override any local CLASSPATH variable
export CLASSPATH := @CLASSPATH@
# The default make arguments
MAKE_ARGS = $(MAKE_LOG_FLAGS) -r -R -I $(TOPDIR)/make/common SPEC=$(SPEC) \
MAKE_LOG_FLAGS="$(MAKE_LOG_FLAGS)" $(MAKE_LOG_VARS)

View File

@@ -51,7 +51,7 @@ TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
# Minimum supported versions, empty means unspecified
TOOLCHAIN_MINIMUM_VERSION_clang="3.5"
TOOLCHAIN_MINIMUM_VERSION_gcc="6.0"
TOOLCHAIN_MINIMUM_VERSION_gcc="5.0"
TOOLCHAIN_MINIMUM_VERSION_microsoft="19.10.0.0" # VS2017
TOOLCHAIN_MINIMUM_VERSION_xlc=""

View File

@@ -103,7 +103,7 @@ define ProcessMarkdown
$$(call LogInfo, Post-processing markdown file $2)
$$(call MakeDir, $$(SUPPORT_OUTPUTDIR)/markdown $$($1_$2_TARGET_DIR))
$$(call ExecuteWithLog, $$(SUPPORT_OUTPUTDIR)/markdown/$$($1_$2_MARKER)_post, \
( $$($1_POST_PROCESS) $$($1_$2_PANDOC_OUTPUT) > $$($1_$2_OUTPUT_FILE) ) )
( $$($1_POST_PROCESS) < $$($1_$2_PANDOC_OUTPUT) > $$($1_$2_OUTPUT_FILE) ) )
endif
$1 += $$($1_$2_OUTPUT_FILE)

View File

@@ -1,4 +1,4 @@
# Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -23,9 +23,9 @@
#
# URLs
JAVADOC_BASE_URL=https://docs.oracle.com/pls/topic/lookup?ctx=javase$(VERSION_FEATURE)&amp;id=homepage
JAVADOC_BASE_URL=https://docs.oracle.com/pls/topic/lookup?ctx=javase$(VERSION_NUMBER)&amp;id=homepage
BUG_SUBMIT_URL=https://bugreport.java.com/bugreport/
COPYRIGHT_URL=legal/copyright.html
LICENSE_URL=https://www.oracle.com/java/javase/terms/license/java$(VERSION_FEATURE)speclicense.html
LICENSE_URL=https://www.oracle.com/java/javase/terms/license/java$(VERSION_NUMBER)speclicense.html
REDISTRIBUTION_URL=https://www.oracle.com/technetwork/java/redist-137594.html
OTHER_JDK_VERSIONS_URL=https://docs.oracle.com/en/java/javase/index.html

View File

@@ -249,7 +249,7 @@ var getJibProfilesCommon = function (input, data) {
dependencies: ["boot_jdk", "gnumake", "jtreg", "jib", "autoconf", "jmh", "jcov"],
default_make_targets: ["product-bundles", "test-bundles", "static-libs-bundles"],
configure_args: concat("--enable-jtreg-failure-handler",
"--with-exclude-translations=es,fr,it,ko,pt_BR,sv,ca,tr,cs,sk,ja_JP_A,ja_JP_HA,ja_JP_HI,ja_JP_I,zh_TW,zh_HK",
"--with-exclude-translations=de,es,fr,it,ko,pt_BR,sv,ca,tr,cs,sk,ja_JP_A,ja_JP_HA,ja_JP_HI,ja_JP_I,zh_TW,zh_HK",
"--disable-manpages",
"--disable-jvm-feature-shenandoahgc",
versionArgs(input, common))
@@ -1164,7 +1164,7 @@ var getJibProfilesDependencies = function (input, common) {
// build_number: "b07",
// file: "bundles/jcov-3_0.zip",
organization: common.organization,
revision: "3.0-9-jdk-asm+1.0",
revision: "3.0-7-jdk-asm+1.0",
ext: "zip",
environment_name: "JCOV_HOME",
},

View File

@@ -55,8 +55,6 @@ BOOT_MODULES= \
jdk.sctp \
jdk.unsupported \
jdk.naming.rmi \
jetbrains.api \
jetbrains.api.impl \
#
# Modules that directly or indirectly requiring upgradeable modules

View File

@@ -0,0 +1,29 @@
Owner: CN=GlobalSign, O=GlobalSign, OU=GlobalSign Root CA - R2
Issuer: CN=GlobalSign, O=GlobalSign, OU=GlobalSign Root CA - R2
Serial number: 400000000010f8626e60d
Valid from: Fri Dec 15 08:00:00 GMT 2006 until: Wed Dec 15 08:00:00 GMT 2021
Signature algorithm name: SHA1withRSA
Subject Public Key Algorithm: 2048-bit RSA key
Version: 3
-----BEGIN CERTIFICATE-----
MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4G
A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNp
Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1
MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMjETMBEG
A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI
hvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6ErPL
v4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8
eoLrvozps6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklq
tTleiDTsvHgMCJiEbKjNS7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzd
C9XZzPnqJworc5HGnRusyMvo4KD0L5CLTfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pa
zq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6CygPCm48CAwEAAaOBnDCB
mTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUm+IH
V2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5n
bG9iYWxzaWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG
3lm0mi3f3BmGLjANBgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4Gs
J0/WwbgcQ3izDJr86iw8bmEbTUsp9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO
291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu01yiPqFbQfXf5WRDLenVOavS
ot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG79G+dwfCMNYxd
AfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7
TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg==
-----END CERTIFICATE-----

View File

@@ -0,0 +1,27 @@
Owner: CN=DST Root CA X3, O=Digital Signature Trust Co.
Issuer: CN=DST Root CA X3, O=Digital Signature Trust Co.
Serial number: 44afb080d6a327ba893039862ef8406b
Valid from: Sat Sep 30 21:12:19 GMT 2000 until: Thu Sep 30 14:01:15 GMT 2021
Signature algorithm name: SHA1withRSA
Subject Public Key Algorithm: 2048-bit RSA key
Version: 3
-----BEGIN CERTIFICATE-----
MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/
MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT
DkRTVCBSb290IENBIFgzMB4XDTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVow
PzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMRcwFQYDVQQD
Ew5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
AN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmTrE4O
rz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEq
OLl5CjH9UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9b
xiqKqy69cK3FCxolkHRyxXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw
7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40dutolucbY38EVAjqr2m7xPi71XAicPNaD
aeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNV
HQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQMA0GCSqG
SIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69
ikugdB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXr
AvHRAosZy5Q6XkjEGB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZz
R8srzJmwN0jP41ZL9c8PDHIyh8bwRLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5
JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubSfZGL+T0yjWW06XyxV3bqxbYo
Ob8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ
-----END CERTIFICATE-----

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2000, 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
@@ -49,6 +49,7 @@ charset US-ASCII US_ASCII
alias IBM367
alias cp367
alias csASCII
alias default
# Other aliases
alias 646 # Solaris POSIX locale
alias iso_646.irv:1983

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2000, 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
@@ -317,8 +317,6 @@ KI=AUD
KP=KPW
# KOREA (THE REPUBLIC OF)
KR=KRW
# KOSOVO - Not in ISO 3166/4217
XK=EUR
# KUWAIT
KW=KWD
# KYRGYZSTAN

View File

@@ -114,8 +114,8 @@ header extends java/lang/Object implements java/lang/annotation/Annotation flags
class name java/lang/System
-method name setSecurityManager descriptor (Ljava/lang/SecurityManager;)V
-method name getSecurityManager descriptor ()Ljava/lang/SecurityManager;
method name setSecurityManager descriptor (Ljava/lang/SecurityManager;)V flags 9 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="17")
method name getSecurityManager descriptor ()Ljava/lang/SecurityManager; flags 9 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="17")
method name setSecurityManager descriptor (Ljava/lang/SecurityManager;)V flags 9 deprecated true runtimeAnnotations @Ljava/lang/Deprecated;(forRemoval=Ztrue,since="17")@Ljdk/internal/reflect/CallerSensitive;
class name java/lang/Thread
-method name checkAccess descriptor ()V
@@ -209,8 +209,7 @@ header extends java/lang/RuntimeException flags 21
class name java/lang/runtime/SwitchBootstraps
header extends java/lang/Object flags 21 classAnnotations @Ljdk/internal/javac/PreviewFeature;(feature=eLjdk/internal/javac/PreviewFeature$Feature;SWITCH_PATTERN_MATCHING;)
innerclass innerClass java/lang/invoke/MethodHandles$Lookup outerClass java/lang/invoke/MethodHandles innerClassName Lookup flags 19
method name typeSwitch descriptor (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite; flags 89
method name enumSwitch descriptor (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite; flags 89
method name typeSwitch descriptor (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite; thrownTypes java/lang/Throwable flags 89
class name java/net/DatagramSocket
-method name setDatagramSocketImplFactory descriptor (Ljava/net/DatagramSocketImplFactory;)V
@@ -455,7 +454,8 @@ innerclass innerClass java/io/ObjectInputStream$GetField outerClass java/io/Obje
innerclass innerClass java/io/ObjectOutputStream$PutField outerClass java/io/ObjectOutputStream innerClassName PutField flags 409
class name java/util/SplittableRandom
header extends java/lang/Object implements java/util/random/RandomGenerator,java/util/random/RandomGenerator$SplittableGenerator flags 31 runtimeAnnotations @Ljdk/internal/util/random/RandomSupport$RandomGeneratorProperties;(name="SplittableRandom",i=I64,j=I0,k=I0,equidistribution=I1)
header extends jdk/internal/util/random/RandomSupport$AbstractSplittableGenerator flags 31 runtimeAnnotations @Ljdk/internal/util/random/RandomSupport$RandomGeneratorProperties;(name="SplittableRandom",i=I64,j=I0,k=I0,equidistribution=I1)
innerclass innerClass jdk/internal/util/random/RandomSupport$AbstractSplittableGenerator outerClass jdk/internal/util/random/RandomSupport innerClassName AbstractSplittableGenerator flags 409
innerclass innerClass java/util/random/RandomGenerator$SplittableGenerator outerClass java/util/random/RandomGenerator innerClassName SplittableGenerator flags 609
-method name nextInt descriptor (I)I
-method name nextInt descriptor (II)I

View File

@@ -39,7 +39,6 @@ innerclass innerClass jdk/incubator/foreign/CLinker$VaList$Builder outerClass jd
-method name toCString descriptor (Ljava/lang/String;Ljava/nio/charset/Charset;Ljdk/incubator/foreign/NativeScope;)Ljdk/incubator/foreign/MemorySegment;
-method name toJavaStringRestricted descriptor (Ljdk/incubator/foreign/MemoryAddress;)Ljava/lang/String;
-method name toJavaStringRestricted descriptor (Ljdk/incubator/foreign/MemoryAddress;Ljava/nio/charset/Charset;)Ljava/lang/String;
-method name toJavaString descriptor (Ljdk/incubator/foreign/MemorySegment;Ljava/nio/charset/Charset;)Ljava/lang/String;
-method name allocateMemoryRestricted descriptor (J)Ljdk/incubator/foreign/MemoryAddress;
-method name freeMemoryRestricted descriptor (Ljdk/incubator/foreign/MemoryAddress;)V
method name getInstance descriptor ()Ljdk/incubator/foreign/CLinker; flags 9 runtimeAnnotations @Ljdk/internal/reflect/CallerSensitive;
@@ -48,7 +47,10 @@ method name downcallHandle descriptor (Ljava/lang/invoke/MethodType;Ljdk/incubat
method name upcallStub descriptor (Ljava/lang/invoke/MethodHandle;Ljdk/incubator/foreign/FunctionDescriptor;Ljdk/incubator/foreign/ResourceScope;)Ljdk/incubator/foreign/MemoryAddress; flags 401
method name toCString descriptor (Ljava/lang/String;Ljdk/incubator/foreign/SegmentAllocator;)Ljdk/incubator/foreign/MemorySegment; flags 9
method name toCString descriptor (Ljava/lang/String;Ljdk/incubator/foreign/ResourceScope;)Ljdk/incubator/foreign/MemorySegment; flags 9
method name toCString descriptor (Ljava/lang/String;Ljava/nio/charset/Charset;Ljdk/incubator/foreign/SegmentAllocator;)Ljdk/incubator/foreign/MemorySegment; flags 9
method name toCString descriptor (Ljava/lang/String;Ljava/nio/charset/Charset;Ljdk/incubator/foreign/ResourceScope;)Ljdk/incubator/foreign/MemorySegment; flags 9
method name toJavaString descriptor (Ljdk/incubator/foreign/MemoryAddress;)Ljava/lang/String; flags 9 runtimeAnnotations @Ljdk/internal/reflect/CallerSensitive;
method name toJavaString descriptor (Ljdk/incubator/foreign/MemoryAddress;Ljava/nio/charset/Charset;)Ljava/lang/String; flags 9 runtimeAnnotations @Ljdk/internal/reflect/CallerSensitive;
method name allocateMemory descriptor (J)Ljdk/incubator/foreign/MemoryAddress; flags 9 runtimeAnnotations @Ljdk/internal/reflect/CallerSensitive;
method name freeMemory descriptor (Ljdk/incubator/foreign/MemoryAddress;)V flags 9 runtimeAnnotations @Ljdk/internal/reflect/CallerSensitive;
method name systemLookup descriptor ()Ljdk/incubator/foreign/SymbolLookup; flags 9 runtimeAnnotations @Ljdk/internal/reflect/CallerSensitive;

View File

@@ -29,9 +29,9 @@
class name jdk/javadoc/doclet/Reporter
header extends java/lang/Object flags 601
innerclass innerClass javax/tools/Diagnostic$Kind outerClass javax/tools/Diagnostic innerClassName Kind flags 4019
method name print descriptor (Ljavax/tools/Diagnostic$Kind;Ljavax/tools/FileObject;IIILjava/lang/String;)V flags 401
method name getStandardWriter descriptor ()Ljava/io/PrintWriter; flags 1
method name getDiagnosticWriter descriptor ()Ljava/io/PrintWriter; flags 1
method name print descriptor (Ljavax/tools/Diagnostic$Kind;Ljavax/tools/FileObject;IIILjava/lang/String;)V flags 1
class name jdk/javadoc/doclet/StandardDoclet
header extends java/lang/Object implements jdk/javadoc/doclet/Doclet flags 21

View File

@@ -272,14 +272,12 @@ XEvent.xclient 0
XEvent.xcolormap 0
XEvent.xconfigure 0
XEvent.xconfigurerequest 0
XEvent.xcookie 0
XEvent.xcreatewindow 0
XEvent.xcrossing 0
XEvent.xdestroywindow 0
XEvent.xerror 0
XEvent.xexpose 0
XEvent.xfocus 0
XEvent.xgeneric 0
XEvent.xgraphicsexpose 0
XEvent.xgravity 0
XEvent.xkey 0
@@ -372,22 +370,6 @@ XGCValues.subwindow_mode 64
XGCValues.tile 44
XGCValues.ts_x_origin 52
XGCValues.ts_y_origin 56
XGenericEvent 24
XGenericEventCookie 32
XGenericEventCookie.cookie 24
XGenericEventCookie.data 28
XGenericEventCookie.display 12
XGenericEventCookie.evtype 20
XGenericEventCookie.extension 16
XGenericEventCookie.send_event 8
XGenericEventCookie.serial 4
XGenericEventCookie.type 0
XGenericEvent.display 12
XGenericEvent.evtype 20
XGenericEvent.extension 16
XGenericEvent.send_event 8
XGenericEvent.serial 4
XGenericEvent.type 0
XGraphicsExposeEvent 48
XGraphicsExposeEvent.count 36
XGraphicsExposeEvent.display 12
@@ -414,9 +396,6 @@ XHostAddress 12
XHostAddress.address 8
XHostAddress.family 0
XHostAddress.length 4
XIButtonState 8
XIButtonState.mask 4
XIButtonState.mask_len 0
XIconSize 24
XIconSize.height_inc 20
XIconSize.max_height 12
@@ -424,29 +403,6 @@ XIconSize.max_width 8
XIconSize.min_height 4
XIconSize.min_width 0
XIconSize.width_inc 16
XIDeviceEvent 140
XIDeviceEvent.buttons 88
XIDeviceEvent.child 48
XIDeviceEvent.detail 36
XIDeviceEvent.deviceid 28
XIDeviceEvent.display 12
XIDeviceEvent.event 44
XIDeviceEvent.event_x 68
XIDeviceEvent.event_y 76
XIDeviceEvent.evtype 20
XIDeviceEvent.extension 16
XIDeviceEvent.flags 84
XIDeviceEvent.group 124
XIDeviceEvent.mods 108
XIDeviceEvent.root 40
XIDeviceEvent.root_x 52
XIDeviceEvent.root_y 60
XIDeviceEvent.send_event 8
XIDeviceEvent.serial 4
XIDeviceEvent.sourceid 32
XIDeviceEvent.time 24
XIDeviceEvent.type 0
XIDeviceEvent.valuators 96
XImage 88
XImage.bitmap_bit_order 28
XImage.bitmap_pad 32
@@ -480,11 +436,6 @@ XIMHotKeyTrigger.modifier_mask 8
XIMHotKeyTriggers 8
XIMHotKeyTriggers.key 4
XIMHotKeyTriggers.num_hot_key 0
XIModifierState 16
XIModifierState.base 0
XIModifierState.effective 12
XIModifierState.latched 4
XIModifierState.locked 8
XIMPreeditCaretCallbackStruct 12
XIMPreeditCaretCallbackStruct.direction 4
XIMPreeditCaretCallbackStruct.position 0
@@ -521,10 +472,6 @@ XIMText.string 12
XIMValuesList 8
XIMValuesList.count_values 0
XIMValuesList.supported_values 4
XIValuatorState 12
XIValuatorState.mask 4
XIValuatorState.mask_len 0
XIValuatorState.values 8
XkbAccessXNotifyEvent 44
XkbAccessXNotifyEvent.debounce_delay 40
XkbAccessXNotifyEvent.detail 28

View File

@@ -1,6 +1,6 @@
#!/bin/bash -e
#
# Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 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
@@ -26,7 +26,7 @@
# Create a bundle in the build directory, containing what's needed to
# build and run JMH microbenchmarks from the OpenJDK build.
JMH_VERSION=1.32
JMH_VERSION=1.28
COMMONS_MATH3_VERSION=3.2
JOPT_SIMPLE_VERSION=4.6

View File

@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2015, 2021, 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
@@ -102,7 +102,7 @@ EXCLUDE_DIRS=" \
"
for ex in $EXCLUDE_DIRS; do
EXCLUDE_ARGS="$EXCLUDE_ARGS --exclude=$ex"
EXCLUDE_ARGS+="--exclude=$ex "
done
echo "Copying Xcode.app..."

View File

@@ -34,7 +34,7 @@ JVM_SUPPORT_DIR := $(JVM_VARIANT_OUTPUTDIR)/support
DTRACE_SUPPORT_DIR := $(JVM_SUPPORT_DIR)/dtrace
LIB_OUTPUTDIR := $(call FindLibDirForModule, java.base)
ifneq ($(filter client minimal zero, $(JVM_VARIANT)), )
ifneq ($(filter client minimal, $(JVM_VARIANT)), )
JVM_VARIANT_SUBDIR := $(JVM_VARIANT)
else
# Use 'server' as default target directory name for all other variants.

View File

@@ -116,12 +116,8 @@ endif
ifneq ($(call check-jvm-feature, cds), true)
JVM_CFLAGS_FEATURES += -DINCLUDE_CDS=0
JVM_EXCLUDE_FILES += \
cdsProtectionDomain.cpp \
classLoaderDataShared.cpp \
classLoaderExt.cpp \
dumpTimeSharedClassInfo.cpp \
lambdaProxyClassDictionary.cpp \
runTimeSharedClassInfo.cpp \
systemDictionaryShared.cpp
JVM_EXCLUDE_PATTERNS += cds/
endif
@@ -187,6 +183,7 @@ ifeq ($(call check-jvm-feature, opt-size), true)
assembler.cpp \
barrierSet.cpp \
basicLock.cpp \
biasedLocking.cpp \
bytecode.cpp \
bytecodeInterpreter.cpp \
c1_Compilation.cpp \

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2013, 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
@@ -36,7 +36,6 @@ ifeq ($(TOOLCHAIN_TYPE), gcc)
BUILD_LIBJVM_assembler_x86.cpp_CXXFLAGS := -Wno-maybe-uninitialized
BUILD_LIBJVM_cardTableBarrierSetAssembler_x86.cpp_CXXFLAGS := -Wno-maybe-uninitialized
BUILD_LIBJVM_interp_masm_x86.cpp_CXXFLAGS := -Wno-uninitialized
BUILD_LIBJVM_ad_$(HOTSPOT_TARGET_CPU_ARCH).cpp_CXXFLAGS := -Wno-nonnull
ifeq ($(DEBUG_LEVEL), release)
# Need extra inlining to collapse shared marking code into the hot marking loop
BUILD_LIBJVM_shenandoahMark.cpp_CXXFLAGS := --param inline-unit-growth=1000

View File

@@ -9,7 +9,7 @@
<jre alt="true" value="###BUILD_DIR###/images/jdk" />
<options></options>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_X" assert-keyword="true" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_X" assert-keyword="true" jdk-15="true">
<output url="file://###BUILD_DIR###/idea" />
</component>
</project>

View File

@@ -1,99 +0,0 @@
/*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* This application is meant to be run to create a classlist file representing
* common use.
*
* The classlist is produced by adding -XX:DumpLoadedClassList=classlist
*/
package build.tools.classlist;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
import java.util.Scanner;
/**
* The classlist generated by build.tools.classlist.HelloClasslist
* may have non-deterministic contents, affected by Java thread execution order.
* SortClasslist sorts the file to make the JDK image's contents more deterministic.
*/
public class SortClasslist {
public static void main(String args[]) throws FileNotFoundException {
ArrayList<String> classes = new ArrayList<>();
ArrayList<String> lambdas = new ArrayList<>();
FileInputStream fis = new FileInputStream(args[0]);
Scanner scanner = new Scanner(fis);
Pattern p = Pattern.compile("^(.*)[ ]+id:[ ]+([0-9]+)$");
while (scanner.hasNextLine()) {
String line = scanner.nextLine();
Matcher m = p.matcher(line);
if (line.startsWith("#")) {
// Comments -- print them first without sorting. These appear only at the top
// of the file.
System.out.println(line);
} else if (line.startsWith("@")) {
// @lambda-form-invoker, @lambda-proxy, etc.
lambdas.add(line);
} else if (m.find()) {
// We found a pattern like this:
//
// <beginning of line>java/lang/Object id: 0<end of line>
//
// This is a class used by one of the three builtin class loaders
// (boot/platform/app). Since the default classlist does not support unregistered
// classes, the ID is unused. Let's omit the ID, as it may be non-deterministic.
String className = m.group(1); // matches the (.*) part of the pattern.
classes.add(className);
} else {
// HelloClasslist should not load classes in custom class loaders, or else
// we might end up with output like this:
//
// SomeClass id: 123 super: 0 source: foo.jar
//
// Such classes won't be usable for common applications, so they should
// not be included in the JDK's default classlist.
System.err.println("Unexpected line: " + line);
System.err.println("The default classlist should not contain unregistered classes");
System.exit(1);
}
}
Collections.sort(classes);
Collections.sort(lambdas);
for (String s : classes) {
System.out.println(s);
}
for (String s : lambdas) {
System.out.println(s);
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@ package build.tools.generatelsrequivmaps;
import java.io.BufferedWriter;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.time.ZoneId;
@@ -78,7 +79,8 @@ public class EquivMapsGenerator {
String preferred = null;
String prefix = null;
for (String line : Files.readAllLines(Paths.get(filename))) {
for (String line : Files.readAllLines(Paths.get(filename),
Charset.forName("UTF-8"))) {
line = line.toLowerCase(Locale.ROOT);
int index = line.indexOf(' ') + 1;
if (line.startsWith("file-date:")) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2006, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 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
@@ -229,7 +229,6 @@ public class CreateSymbols {
: null,
Paths.get(ctDescriptionFile));
stripNonExistentAnnotations(data);
splitHeaders(data.classes);
Map<String, Map<Character, String>> package2Version2Module = new HashMap<>();
@@ -302,50 +301,6 @@ public class CreateSymbols {
}
}
private static final String PREVIEW_FEATURE_ANNOTATION_OLD =
"Ljdk/internal/PreviewFeature;";
private static final String PREVIEW_FEATURE_ANNOTATION_NEW =
"Ljdk/internal/javac/PreviewFeature;";
private static final String PREVIEW_FEATURE_ANNOTATION_INTERNAL =
"Ljdk/internal/PreviewFeature+Annotation;";
private static final String VALUE_BASED_ANNOTATION =
"Ljdk/internal/ValueBased;";
private static final String VALUE_BASED_ANNOTATION_INTERNAL =
"Ljdk/internal/ValueBased+Annotation;";
public static final Set<String> HARDCODED_ANNOTATIONS = new HashSet<>(
List.of("Ljdk/Profile+Annotation;",
"Lsun/Proprietary+Annotation;",
PREVIEW_FEATURE_ANNOTATION_OLD,
PREVIEW_FEATURE_ANNOTATION_NEW,
VALUE_BASED_ANNOTATION));
private void stripNonExistentAnnotations(LoadDescriptions data) {
Set<String> allClasses = data.classes.name2Class.keySet();
data.modules.values().forEach(mod -> {
stripNonExistentAnnotations(allClasses, mod.header);
});
data.classes.classes.forEach(clazz -> {
stripNonExistentAnnotations(allClasses, clazz.header);
stripNonExistentAnnotations(allClasses, clazz.fields);
stripNonExistentAnnotations(allClasses, clazz.methods);
});
}
private void stripNonExistentAnnotations(Set<String> allClasses, Iterable<? extends FeatureDescription> descs) {
descs.forEach(d -> stripNonExistentAnnotations(allClasses, d));
}
private void stripNonExistentAnnotations(Set<String> allClasses, FeatureDescription d) {
stripNonExistentAnnotations(allClasses, d.classAnnotations);
stripNonExistentAnnotations(allClasses, d.runtimeAnnotations);
}
private void stripNonExistentAnnotations(Set<String> allClasses, List<AnnotationDescription> annotations) {
if (annotations != null)
annotations.removeIf(ann -> !HARDCODED_ANNOTATIONS.contains(ann.annotationType) &&
!allClasses.contains(ann.annotationType.substring(1, ann.annotationType.length() - 1)));
}
private ZipEntry createZipEntry(String name, long timestamp) {
ZipEntry ze = new ZipEntry(name);
@@ -1185,16 +1140,17 @@ public class CreateSymbols {
values.put("reflective", essentialAPI != null && !essentialAPI);
}
if (VALUE_BASED_ANNOTATION.equals(annotationType)) {
//the non-public ValueBased annotation will not be available in ct.sym,
//replace with purely synthetic javac-internal annotation:
annotationType = VALUE_BASED_ANNOTATION_INTERNAL;
}
return new Annotation(null,
addString(constantPool, annotationType),
createElementPairs(constantPool, values));
}
//where:
private static final String PREVIEW_FEATURE_ANNOTATION_OLD =
"Ljdk/internal/PreviewFeature;";
private static final String PREVIEW_FEATURE_ANNOTATION_NEW =
"Ljdk/internal/javac/PreviewFeature;";
private static final String PREVIEW_FEATURE_ANNOTATION_INTERNAL =
"Ljdk/internal/PreviewFeature+Annotation;";
private element_value_pair[] createElementPairs(List<CPInfo> constantPool, Map<String, Object> annotationAttributes) {
element_value_pair[] pairs = new element_value_pair[annotationAttributes.size()];

View File

@@ -95,9 +95,9 @@ ifeq ($(call And, $(call isTargetOs, windows) $(call isTargetCpu, x86)), true)
endif
DEFAULT_CFG_VARIANT ?= server
# Any variant other than server, client, minimal, or zero is represented as server in
# Any variant other than server, client or minimal is represented as server in
# the cfg file.
VALID_CFG_VARIANTS := server client minimal zero
VALID_CFG_VARIANTS := server client minimal
CFG_VARIANTS := $(filter $(VALID_CFG_VARIANTS), $(JVM_VARIANTS)) \
$(if $(filter-out $(VALID_CFG_VARIANTS), $(JVM_VARIANTS)), server)

View File

@@ -156,10 +156,10 @@ ifeq ($(call isTargetOsType, unix), true)
TARGETS += $(LIB_OUTPUTDIR)/$1/$(call SHARED_LIBRARY,jsig)
endef
# The subdir is the same as the variant for client, minimal or zero, for all
# The subdir is the same as the variant for client and minimal, for all
# others it's server.
VARIANT_SUBDIRS := $(filter client minimal zero, $(JVM_VARIANTS)) \
$(if $(filter-out client minimal zero, $(JVM_VARIANTS)), server)
VARIANT_SUBDIRS := $(filter client minimal, $(JVM_VARIANTS)) \
$(if $(filter-out client minimal, $(JVM_VARIANTS)), server)
$(foreach v, $(VARIANT_SUBDIRS), $(eval $(call CreateSymlinks,$v)))
endif
############################################################################

View File

@@ -84,7 +84,7 @@ TARGETS += $(COPY_LEGAL)
################################################################################
FONTFILE_SRC_DIR := $(TOPDIR)/src/java.desktop/share
FONTFILE_SRCS := $(wildcard $(FONTFILE_SRC_DIR)/fonts/*.ttf) $(wildcard $(FONTFILE_SRC_DIR)/fonts/*.otf) $(FONTFILE_SRC_DIR)/fonts/fonts.dir $(FONTFILE_SRC_DIR)/fonts/font.conf
FONTFILE_SRCS := $(wildcard $(FONTFILE_SRC_DIR)/fonts/*.ttf) $(FONTFILE_SRC_DIR)/fonts/fonts.dir $(FONTFILE_SRC_DIR)/fonts/font.conf
FONTFILE_TARGET_FILES := $(subst $(FONTFILE_SRC_DIR),$(LIB_DST_DIR),$(FONTFILE_SRCS))
$(LIB_DST_DIR)/fonts/%: $(FONTFILE_SRC_DIR)/fonts/%

View File

@@ -23,7 +23,7 @@
# questions.
#
DOCLINT += -Xdoclint:all/protected,-reference,-missing \
DOCLINT += -Xdoclint:all/protected,-reference \
'-Xdoclint/package:java.*,javax.*'
COPY += .gif .png .wav .txt .xml .css .pf
CLEAN += iio-plugin.properties cursors.properties

View File

@@ -436,7 +436,7 @@ endif
ifeq ($(USE_EXTERNAL_HARFBUZZ), true)
LIBFONTMANAGER_EXTRA_SRC =
BUILD_LIBFONTMANAGER_FONTLIB += $(HARFBUZZ_LIBS)
BUILD_LIBFONTMANAGER_FONTLIB += $(LIBHARFBUZZ_LIBS)
else
LIBFONTMANAGER_EXTRA_SRC = libharfbuzz

View File

@@ -61,54 +61,36 @@ $(eval $(call SetupJavaCompilation, COMPILE_CREATE_SYMBOLS, \
$(COMPILECREATESYMBOLS_ADD_EXPORTS), \
))
GENERATE_SYMBOLS_FROM_JDK_VERSION := 11
JDK_JAVADOC_DIR := $(JDK_OUTPUTDIR)/modules/jdk.javadoc
ELEMENT_LISTS_PKG := jdk/javadoc/internal/doclets/toolkit/resources/releases
ELEMENT_LISTS_DIR := $(JDK_JAVADOC_DIR)/$(ELEMENT_LISTS_PKG)
$(JDK_JAVADOC_DIR)/_element_lists.marker: \
$(SUPPORT_OUTPUTDIR)/javadoc-symbols/symbols: \
$(COMPILE_CREATE_SYMBOLS) \
$(wildcard $(TOPDIR)/make/data/symbols/*) \
$(MODULE_INFOS)
$(call MakeTargetDir)
$(call LogInfo, Creating javadoc element lists)
$(RM) -r $(ELEMENT_LISTS_DIR)
# Generate element-list files for JDK 11 to current-1
$(call ExecuteWithLog, $@_historic, \
$(JAVA_SMALL) $(INTERIM_LANGTOOLS_ARGS) \
$(COMPILECREATESYMBOLS_ADD_EXPORTS) \
-classpath $(BUILDTOOLS_OUTPUTDIR)/create_symbols_javadoc \
build.tools.symbolgenerator.CreateSymbols \
build-javadoc-data \
$(CT_DATA_DESCRIPTION) \
$(ELEMENT_LISTS_DIR) \
$(GENERATE_SYMBOLS_FROM_JDK_VERSION) \
)
# Generate element-list file for the current JDK version
$(call ExecuteWithLog, $@_current, \
$(JAVA_SMALL) $(INTERIM_LANGTOOLS_ARGS) \
$(COMPILECREATESYMBOLS_ADD_EXPORTS) \
-classpath $(BUILDTOOLS_OUTPUTDIR)/create_symbols_javadoc \
build.tools.symbolgenerator.JavadocElementList \
$(ELEMENT_LISTS_DIR)/element-list-$(JDK_SOURCE_TARGET_VERSION).txt \
$(JAVADOC_MODULESOURCEPATH) \
$(JAVADOC_MODULES) \
)
$(RM) -r $(@D)
$(MKDIR) -p $(@D)
$(ECHO) Creating javadoc element list
$(JAVA_SMALL) $(INTERIM_LANGTOOLS_ARGS) \
$(COMPILECREATESYMBOLS_ADD_EXPORTS) \
-classpath $(BUILDTOOLS_OUTPUTDIR)/create_symbols_javadoc \
build.tools.symbolgenerator.CreateSymbols \
build-javadoc-data \
$(CT_DATA_DESCRIPTION) \
$(JDK_OUTPUTDIR)/modules/jdk.javadoc/jdk/javadoc/internal/doclets/toolkit/resources/releases \
11
$(JAVA_SMALL) $(INTERIM_LANGTOOLS_ARGS) \
$(COMPILECREATESYMBOLS_ADD_EXPORTS) \
-classpath $(BUILDTOOLS_OUTPUTDIR)/create_symbols_javadoc \
build.tools.symbolgenerator.JavadocElementList \
$(JDK_OUTPUTDIR)/modules/jdk.javadoc/jdk/javadoc/internal/doclets/toolkit/resources/releases/element-list-$(JDK_SOURCE_TARGET_VERSION).txt \
$(JAVADOC_MODULESOURCEPATH) \
$(JAVADOC_MODULES)
$(TOUCH) $@
################################################################################
# Copy element-lists to interim langtools
# Copy ct.sym to the modules libs dir
$(eval $(call SetupCopyFiles, COPY_TO_LIBS, \
FILES := $(SUPPORT_OUTPUTDIR)/javadoc-symbols/*.txt, \
DEST := $(JDK_OUTPUTDIR)/modules/jdk.javadoc/jdk/javadoc/internal/doclets/toolkit/resources/releases, \
))
INTERIM_JDK_JAVADOC_DIR := $(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules/jdk.javadoc.interim
INTERIM_ELEMENT_LISTS_DIR := $(INTERIM_JDK_JAVADOC_DIR)/$(ELEMENT_LISTS_PKG)
$(INTERIM_JDK_JAVADOC_DIR)/_element_lists.marker: $(JDK_JAVADOC_DIR)/_element_lists.marker
$(call MakeDir, $(INTERIM_ELEMENT_LISTS_DIR))
$(RM) -r $(INTERIM_ELEMENT_LISTS_DIR)/*
$(CP) -R $(ELEMENT_LISTS_DIR)/* $(INTERIM_ELEMENT_LISTS_DIR)/
$(TOUCH) $@
TARGETS += $(SUPPORT_OUTPUTDIR)/javadoc-symbols/symbols
################################################################################
TARGETS += $(JDK_JAVADOC_DIR)/_element_lists.marker \
$(INTERIM_JDK_JAVADOC_DIR)/_element_lists.marker

View File

@@ -356,8 +356,8 @@ compare_general_files() {
"
$CAT $OTHER_DIR/$f | eval "$SVG_FILTER" > $OTHER_FILE
$CAT $THIS_DIR/$f | eval "$SVG_FILTER" > $THIS_FILE
elif [ "$SUFFIX" = "jar_contents" ]; then
# The jar_contents files may have some lines in random order
elif [[ "$f" = *"/lib/classlist" ]] || [ "$SUFFIX" = "jar_contents" ]; then
# The classlist files may have some lines in random order
OTHER_FILE=$WORK_DIR/$f.other
THIS_FILE=$WORK_DIR/$f.this
$MKDIR -p $(dirname $OTHER_FILE) $(dirname $THIS_FILE)

View File

@@ -863,7 +863,7 @@ ifeq ($(call isTargetOs, linux), true)
BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exeFPRegs := -ldl
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libAsyncGetCallTraceTest := -ldl
else
BUILD_HOTSPOT_JTREG_EXCLUDE += libtest-rw.c libtest-rwx.c \
BUILD_HOTSPOT_JTREG_EXCLUDE += libtest-rw.c libtest-rwx.c libTestJNI.c \
exeinvoke.c exestack-gap.c exestack-tls.c libAsyncGetCallTraceTest.cpp
endif
@@ -871,7 +871,7 @@ BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exesigtest := -ljvm
ifeq ($(call isTargetOs, windows), true)
BUILD_HOTSPOT_JTREG_EXECUTABLES_CFLAGS_exeFPRegs := -MT
BUILD_HOTSPOT_JTREG_EXCLUDE += exesigtest.c libterminatedThread.c libTestJNI.c
BUILD_HOTSPOT_JTREG_EXCLUDE += exesigtest.c libterminatedThread.c
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libatExit := jvm.lib
else
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libbootclssearch_agent += -lpthread

View File

@@ -48,7 +48,4 @@ jdk.security.jgss,
jdk.unsupported,
jdk.xml.dom,
jdk.zipfs,
jdk.hotspot.agent,
jetbrains.api,
jetbrains.api.impl,
jdk.jcmd
jdk.hotspot.agent

View File

@@ -0,0 +1,49 @@
<html>
<!-- Changed by: Shinsuke Fukuda, 4-Aug-2000 -->
<head>
<title>
Font2DTest Demo
</title>
</head>
<BODY BGCOLOR="#FFFFFF">
<font size=-1>
<hr>
</font>
<h1>
Font2DTest
</h1>
An encompassing font/glyph demo application.
Source code is in <BR>
<a href=src/Font2DTest.java>Font2DTest.java</a>,<BR>
<a href=src/Font2DTestApplet.java>Font2DTestApplet.java</a>,<BR>
<a href=src/RangeMenu.java>RangeMenu.java</a> and<BR>
<a href=src/FontPanel.java>FontPanel.java</a>.<BR>
You can run this program either as an applet or as an application.<BR>
Detailed information about the program can be found in
<a href=README.txt>README.txt</a><BR>
<p>To run it as an application,
execute the <code>Font2DTest</code> class.
For example:
<blockquote>
<pre>
% <b>java -jar Font2DTest.jar</b>
</pre>
</blockquote>
<p>
Note: If AWTPermission's showWindowWithoutWarningBanner permission is not given,<BR>
the zoom feature will not look as good, as characters may be hidden by the warning banner.<BR>
<APPLET code="Font2DTestApplet.class" archive="Font2DTest.jar" width="850" height="700">
</APPLET>
<hr>
<font size=-1>
</font>
</body>
</html>

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2018, 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
@@ -72,8 +72,6 @@ import java.util.BitSet;
import javax.swing.*;
import javax.swing.event.*;
import static java.nio.charset.StandardCharsets.UTF_16;
/**
* Font2DTest.java
*
@@ -135,7 +133,7 @@ public final class Font2DTest extends JPanel
private static boolean canDisplayCheck = true;
/// Initialize GUI variables and its layouts
public Font2DTest( JFrame f) {
public Font2DTest( JFrame f, boolean isApplet ) {
parent = f;
rm = new RangeMenu( this, parent );
@@ -167,8 +165,8 @@ public final class Font2DTest extends JPanel
contrastSlider.setPaintLabels(true);
contrastSlider.addChangeListener(this);
setupPanel();
setupMenu();
setupDialog();
setupMenu( isApplet );
setupDialog( isApplet );
if(canDisplayCheck) {
fireRangeChanged();
@@ -258,7 +256,7 @@ public final class Font2DTest extends JPanel
}
/// Sets up menu entries
private void setupMenu() {
private void setupMenu( boolean isApplet ) {
JMenu fileMenu = new JMenu( "File" );
JMenu optionMenu = new JMenu( "Option" );
@@ -270,7 +268,11 @@ public final class Font2DTest extends JPanel
fileMenu.add( new MenuItemV2( "Page Setup...", this ));
fileMenu.add( new MenuItemV2( "Print...", this ));
fileMenu.addSeparator();
fileMenu.add( new MenuItemV2( "Exit", this ));
if ( !isApplet )
fileMenu.add( new MenuItemV2( "Exit", this ));
else
fileMenu.add( new MenuItemV2( "Close", this ));
displayGridCBMI = new CheckboxMenuItemV2( "Display Grid", true, this );
force16ColsCBMI = new CheckboxMenuItemV2( "Force 16 Columns", false, this );
showFontInfoCBMI = new CheckboxMenuItemV2( "Display Font Info", false, this );
@@ -324,8 +326,11 @@ public final class Font2DTest extends JPanel
}
/// Sets up the all dialogs used in Font2DTest...
private void setupDialog() {
filePromptDialog = new JFileChooser();
private void setupDialog( boolean isApplet ) {
if (!isApplet)
filePromptDialog = new JFileChooser( );
else
filePromptDialog = null;
/// Prepare user text dialog...
userTextDialog = new JDialog( parent, "User Text", false );
@@ -427,6 +432,8 @@ public final class Font2DTest extends JPanel
/// Changes the message on the status bar
public void fireChangeStatus( String message, boolean error ) {
/// If this is not ran as an applet, use own status bar,
/// Otherwise, use the appletviewer/browser's status bar
statusBar.setText( message );
if ( error )
fp.showingError = true;
@@ -591,7 +598,7 @@ public final class Font2DTest extends JPanel
if (numBytes >= 2 &&
(( byteData[0] == (byte) 0xFF && byteData[1] == (byte) 0xFE ) ||
( byteData[0] == (byte) 0xFE && byteData[1] == (byte) 0xFF )))
fileText = new String(byteData, UTF_16);
fileText = new String( byteData, "UTF-16" );
/// Otherwise, use system default encoding
else
fileText = new String( byteData );
@@ -649,7 +656,7 @@ public final class Font2DTest extends JPanel
showFontInfoCBMI.getState() + "\n" +
rm.getSelectedItem() + "\n" +
range[0] + "\n" + range[1] + "\n" + curOptions + tFileName);
byte[] toBeWritten = completeOptions.getBytes(UTF_16);
byte[] toBeWritten = completeOptions.getBytes( "UTF-16" );
bos.write( toBeWritten, 0, toBeWritten.length );
bos.close();
}
@@ -714,7 +721,7 @@ public final class Font2DTest extends JPanel
(byteData[0] != (byte) 0xFE || byteData[1] != (byte) 0xFF) )
throw new Exception( "Not a Font2DTest options file" );
String options = new String(byteData, UTF_16);
String options = new String( byteData, "UTF-16" );
StringTokenizer perLine = new StringTokenizer( options, "\n" );
String title = perLine.nextToken();
if ( !title.equals( "Font2DTest Option File" ))
@@ -1023,7 +1030,7 @@ public final class Font2DTest extends JPanel
UIManager.put("swing.boldMetal", Boolean.FALSE);
final JFrame f = new JFrame( "Font2DTest" );
final Font2DTest f2dt = new Font2DTest( f);
final Font2DTest f2dt = new Font2DTest( f, false );
f.addWindowListener( new WindowAdapter() {
public void windowOpening( WindowEvent e ) { f2dt.repaint(); }
public void windowClosing( WindowEvent e ) { System.exit(0); }

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2018, 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
@@ -80,7 +80,6 @@ import javax.imageio.*;
import javax.swing.*;
import static java.awt.RenderingHints.*;
import static java.nio.charset.StandardCharsets.ISO_8859_1;
/**
* FontPanel.java
@@ -644,7 +643,7 @@ public final class FontPanel extends JPanel implements AdjustmentListener {
break;
case DRAW_BYTES:
try {
byte[] lineBytes = line.getBytes(ISO_8859_1);
byte[] lineBytes = line.getBytes( "ISO-8859-1" );
g2.drawBytes( lineBytes, 0, lineBytes.length, 0, 0 );
}
catch ( Exception e ) {

View File

@@ -4,17 +4,35 @@ Font2DTest
To run Font2DTest:
% java -jar Font2DTest.jar
or
% appletviewer Font2DTest.html
These instructions assume that the java command is in your path.
If they aren't, then you should either specify the complete path to the commands
These instructions assume that the 1.7 versions of the java
and appletviewer commands are in your path. If they aren't,
then you should either specify the complete path to the commands
or update your PATH environment variable as described in the
installation instructions for the Java(TM) SE Development Kit.
To view Font2DTest within a web browser with Java Plugin,
load Font2DTest.html.
If you wish to modify any of the source code, you may want to extract
the contents of the Font2DTest.jar file by executing this command:
% jar -xvf Font2DTest.jar
NOTE:
When Font2DTest is ran as an applet, the browser plugin/viewer needs
following permissions given in order to run properly:
AWTPermission "showWindowWithoutWarningBanner"
RuntimePermission "queuePrintJob"
The program will run without these properties set,
but some of its features will be limited.
To enable all features, please add these permissions.
-----------------------------------------------------------------------
Introduction
-----------------------------------------------------------------------
@@ -111,3 +129,23 @@ that are within the selected range. Third option, "Print all text..."
is similar, and it will print all lines of text that user has put in.
====================================================================
Known Problems:
- When a PostScript font is used, the characters may extend beyond the
enclosing grid or zoom rectangle. This is due to the problem with
FontMetrics.getMaxAscent() and getMaxDescent() functions; the functions
do not always return the right values for PostScript fonts.
- There are still some bugs around the error handling.
Most of these problems will usually get fixed when some parameters
are changed, or the screen is refreshed.
- Many fonts on Solaris fails to retrieve outlines properly,
and as the result, they do not align within the grid properly.
These are mainly F3 and fonts that was returned by X server.
- When showWindowWithoutWarningBanner AWTPermission is not given,
the "zoom" window will look really bad because of the
Applet warning label tacked at the bottom of the zoom window.
To remove this, follow the "NOTE:" instruction at the top.

View File

@@ -1,5 +1,6 @@
/*
* Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved.
*
* Copyright (c) 2007, 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
@@ -45,8 +46,6 @@ import java.io.*;
import java.applet.*;
import java.net.*;
import static java.nio.charset.StandardCharsets.UTF_8;
/**
* A generic SwingSet2 demo module
*
@@ -156,7 +155,7 @@ public class DemoModule extends JFrame {
try {
url = getClass().getResource(filename);
is = url.openStream();
isr = new InputStreamReader(is, UTF_8);
isr = new InputStreamReader(is, "UTF-8");
BufferedReader reader = new BufferedReader(isr);
// Read one line at a time, htmlize using super-spiffy

View File

@@ -549,10 +549,7 @@ public class TableDemo extends DemoModule {
public int getRowCount() { return data.length;}
public Object getValueAt(int row, int col) {return data[row][col];}
public String getColumnName(int column) {return names[column];}
public Class<?> getColumnClass(int c) {
Object obj = getValueAt(0, c);
return obj != null ? obj.getClass() : Object.class;
}
public Class<?> getColumnClass(int c) {return getValueAt(0, c).getClass();}
public boolean isCellEditable(int row, int col) {return col != 5;}
public void setValueAt(Object aValue, int row, int column) { data[row][column] = aValue; }
};

View File

@@ -1,5 +1,6 @@
/*
* Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved.
*
* Copyright (c) 2007, 2019, 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
@@ -43,8 +44,6 @@ import java.io.*;
import java.applet.*;
import java.net.*;
import static java.nio.charset.StandardCharsets.UTF_8;
/**
* JTree Demo
*
@@ -85,7 +84,7 @@ public class TreeDemo extends DemoModule {
try {
// convert url to buffered string
InputStream is = url.openStream();
InputStreamReader isr = new InputStreamReader(is, UTF_8);
InputStreamReader isr = new InputStreamReader(is, "UTF-8");
BufferedReader reader = new BufferedReader(isr);
// read one line at a time, put into tree

View File

@@ -1295,7 +1295,7 @@ public:
};
};
bool is_CAS(int opcode, bool maybe_volatile);
bool is_CAS(int opcode, bool maybe_volatile);
// predicates controlling emit of ldr<x>/ldar<x> and associated dmb
@@ -2161,7 +2161,7 @@ uint MachSpillCopyNode::implementation(CodeBuffer *cbuf, PhaseRegAlloc *ra_, boo
as_FloatRegister(Matcher::_regEncode[src_lo]));
}
} else if (dst_lo_rc == rc_float) { // fpr --> fpr copy
if (is64) {
if (cbuf) {
__ fmovd(as_FloatRegister(Matcher::_regEncode[dst_lo]),
as_FloatRegister(Matcher::_regEncode[src_lo]));
} else {
@@ -2400,14 +2400,6 @@ const bool Matcher::match_rule_supported_vector(int opcode, int vlen, BasicType
} else { // NEON
// Special cases
switch (opcode) {
case Op_VectorMaskCmp:
// We don't have VectorReinterpret with bit_size less than 64 support for
// now, even for byte type. To be refined with fully VectorCast support.
case Op_VectorReinterpret:
if (vlen < 2 || bit_size < 64) {
return false;
}
break;
case Op_MulAddVS2VI:
if (bit_size < 128) {
return false;
@@ -2421,23 +2413,6 @@ const bool Matcher::match_rule_supported_vector(int opcode, int vlen, BasicType
return false;
}
break;
// Some types of VectorCast are not implemented for now.
case Op_VectorCastI2X:
if (bt == T_BYTE) {
return false;
}
break;
case Op_VectorCastS2X:
if (vlen < 4 || bit_size < 64) {
return false;
}
break;
case Op_VectorCastF2X:
case Op_VectorCastD2X:
if (bt == T_INT || bt == T_SHORT || bt == T_BYTE || bt == T_LONG) {
return false;
}
break;
default:
break;
}
@@ -2534,7 +2509,7 @@ MachOper* Matcher::pd_specialize_generic_vector_operand(MachOper* original_opnd,
return NULL;
}
bool Matcher::is_reg2reg_move(MachNode* m) {
bool Matcher::is_generic_reg2reg_move(MachNode* m) {
ShouldNotReachHere(); // generic vector operands not supported
return false;
}
@@ -2591,14 +2566,6 @@ uint Matcher::int_pressure_limit()
// a high register pressure area of the code so that split_DEF can
// generate DefinitionSpillCopy for the derived pointer.
uint default_int_pressure_threshold = _NO_SPECIAL_REG32_mask.Size() - 1;
if (!PreserveFramePointer) {
// When PreserveFramePointer is off, frame pointer is allocatable,
// but different from other SOC registers, it is excluded from
// fatproj's mask because its save type is No-Save. Decrease 1 to
// ensure high pressure at fatproj when PreserveFramePointer is off.
// See check_pressure_at_fatproj().
default_int_pressure_threshold--;
}
return (INTPRESSURE == -1) ? default_int_pressure_threshold : INTPRESSURE;
}
@@ -2642,13 +2609,6 @@ const RegMask Matcher::method_handle_invoke_SP_save_mask() {
bool size_fits_all_mem_uses(AddPNode* addp, int shift) {
for (DUIterator_Fast imax, i = addp->fast_outs(imax); i < imax; i++) {
Node* u = addp->fast_out(i);
if (u->is_LoadStore()) {
// On AArch64, LoadStoreNodes (i.e. compare and swap
// instructions) only take register indirect as an operand, so
// any attempt to use an AddPNode as an input to a LoadStoreNode
// must fail.
return false;
}
if (u->is_Mem()) {
int opsize = u->as_Mem()->memory_size();
assert(opsize > 0, "unexpected memory operand size");
@@ -3828,6 +3788,10 @@ encode %{
__ br(Assembler::NE, cont);
}
if (UseBiasedLocking && !UseOptoBiasInlining) {
__ biased_locking_enter(box, oop, disp_hdr, tmp, true, cont);
}
// Check for existing monitor
__ tbnz(disp_hdr, exact_log2(markWord::monitor_value), object_has_monitor);
@@ -3898,6 +3862,10 @@ encode %{
assert_different_registers(oop, box, tmp, disp_hdr);
if (UseBiasedLocking && !UseOptoBiasInlining) {
__ biased_locking_exit(oop, tmp, cont);
}
// Find the lock address and load the displaced header from the stack.
__ ldr(disp_hdr, Address(box, BasicLock::displaced_header_offset_in_bytes()));
@@ -5510,15 +5478,6 @@ operand vRegD_V31()
interface(REG_INTER);
%}
operand pReg()
%{
constraint(ALLOC_IN_RC(pr_reg));
match(RegVectMask);
op_cost(0);
format %{ %}
interface(REG_INTER);
%}
operand pRegGov()
%{
constraint(ALLOC_IN_RC(gov_pr));
@@ -8928,6 +8887,11 @@ instruct storePConditional(memory8 heap_top_ptr, iRegP oldval, iRegP newval, rFl
ins_pipe(pipe_serial);
%}
// storeLConditional is used by PhaseMacroExpand::expand_lock_node
// when attempting to rebias a lock towards the current thread. We
// must use the acquire form of cmpxchg in order to guarantee acquire
// semantics in this case.
instruct storeLConditional(indirect mem, iRegLNoSp oldval, iRegLNoSp newval, rFlagsReg cr)
%{
match(Set cr (StoreLConditional mem (Binary oldval newval)));
@@ -14990,12 +14954,12 @@ instruct clearArray_reg_reg(iRegL_R11 cnt, iRegP_R10 base, Universe dummy, rFlag
ins_pipe(pipe_class_memory);
%}
instruct clearArray_imm_reg(immL cnt, iRegP_R10 base, iRegL_R11 temp, Universe dummy, rFlagsReg cr)
instruct clearArray_imm_reg(immL cnt, iRegP_R10 base, Universe dummy, rFlagsReg cr)
%{
predicate((uint64_t)n->in(2)->get_long()
< (uint64_t)(BlockZeroingLowLimit >> LogBytesPerWord));
match(Set dummy (ClearArray cnt base));
effect(TEMP temp, USE_KILL base, KILL cr);
effect(USE_KILL base);
ins_cost(4 * INSN_COST);
format %{ "ClearArray $cnt, $base" %}
@@ -16684,11 +16648,11 @@ instruct string_indexof_conUL(iRegP_R1 str1, iRegI_R4 cnt1, iRegP_R3 str2,
%}
instruct string_indexof_char(iRegP_R1 str1, iRegI_R2 cnt1, iRegI_R3 ch,
iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2,
iRegINoSp tmp3, rFlagsReg cr)
iRegI_R0 result, iRegINoSp tmp1, iRegINoSp tmp2,
iRegINoSp tmp3, rFlagsReg cr)
%{
match(Set result (StrIndexOfChar (Binary str1 cnt1) ch));
predicate((UseSVE == 0) && (((StrIndexOfCharNode*)n)->encoding() == StrIntrinsicNode::U));
predicate(((StrIndexOfCharNode*)n)->encoding() == StrIntrinsicNode::U);
effect(USE_KILL str1, USE_KILL cnt1, USE_KILL ch,
TEMP tmp1, TEMP tmp2, TEMP tmp3, KILL cr);
@@ -16707,7 +16671,7 @@ instruct stringL_indexof_char(iRegP_R1 str1, iRegI_R2 cnt1, iRegI_R3 ch,
iRegINoSp tmp3, rFlagsReg cr)
%{
match(Set result (StrIndexOfChar (Binary str1 cnt1) ch));
predicate((UseSVE == 0) && (((StrIndexOfCharNode*)n)->encoding() == StrIntrinsicNode::L));
predicate(((StrIndexOfCharNode*)n)->encoding() == StrIntrinsicNode::L);
effect(USE_KILL str1, USE_KILL cnt1, USE_KILL ch,
TEMP tmp1, TEMP tmp2, TEMP tmp3, KILL cr);
@@ -16715,8 +16679,8 @@ instruct stringL_indexof_char(iRegP_R1 str1, iRegI_R2 cnt1, iRegI_R3 ch,
ins_encode %{
__ stringL_indexof_char($str1$$Register, $cnt1$$Register, $ch$$Register,
$result$$Register, $tmp1$$Register, $tmp2$$Register,
$tmp3$$Register);
$result$$Register, $tmp1$$Register, $tmp2$$Register,
$tmp3$$Register);
%}
ins_pipe(pipe_class_memory);
%}

View File

@@ -1850,7 +1850,7 @@ instruct vcmpD(vecD dst, vecD src1, vecD src2, immI cond)
format %{ "vcmpD $dst, $src1, $src2\t# vector compare " %}
ins_cost(INSN_COST);
ins_encode %{
BasicType bt = Matcher::vector_element_basic_type(this);
BasicType bt = vector_element_basic_type(this);
assert(type2aelembytes(bt) != 8, "not supported");
__ neon_compare(as_FloatRegister($dst$$reg), bt, as_FloatRegister($src1$$reg),
as_FloatRegister($src2$$reg), (int)$cond$$constant, /*isQ*/ false);
@@ -1865,7 +1865,7 @@ instruct vcmpX(vecX dst, vecX src1, vecX src2, immI cond)
format %{ "vcmpX $dst, $src1, $src2\t# vector compare " %}
ins_cost(INSN_COST);
ins_encode %{
BasicType bt = Matcher::vector_element_basic_type(this);
BasicType bt = vector_element_basic_type(this);
__ neon_compare(as_FloatRegister($dst$$reg), bt, as_FloatRegister($src1$$reg),
as_FloatRegister($src2$$reg), (int)$cond$$constant, /*isQ*/ true);
%}
@@ -5296,172 +5296,3 @@ instruct vpopcount2I(vecD dst, vecD src) %{
%}
ins_pipe(pipe_class_default);
%}
// vector mask reductions
instruct vmask_truecount8B(iRegINoSp dst, vecD src, vecD tmp) %{
predicate(n->in(1)->bottom_type()->is_vect()->element_basic_type() == T_BOOLEAN);
match(Set dst (VectorMaskTrueCount src));
effect(TEMP tmp);
ins_cost(2 * INSN_COST);
format %{ "addv $tmp, $src\n\t"
"umov $dst, $tmp, B, 0\t# vector (8B)" %}
ins_encode %{
// Input "src" is a vector of boolean represented as bytes with
// 0x00/0x01 as element values.
__ addv(as_FloatRegister($tmp$$reg), __ T8B, as_FloatRegister($src$$reg));
__ umov($dst$$Register, as_FloatRegister($tmp$$reg), __ B, 0);
%}
ins_pipe(pipe_slow);
%}
instruct vmask_truecount16B(iRegINoSp dst, vecX src, vecX tmp) %{
predicate(n->in(1)->bottom_type()->is_vect()->element_basic_type() == T_BOOLEAN);
match(Set dst (VectorMaskTrueCount src));
effect(TEMP tmp);
ins_cost(2 * INSN_COST);
format %{ "addv $tmp, $src\n\t"
"umov $dst, $tmp, B, 0\t# vector (16B)" %}
ins_encode %{
// Input "src" is a vector of boolean represented as bytes with
// 0x00/0x01 as element values.
__ addv(as_FloatRegister($tmp$$reg), __ T16B, as_FloatRegister($src$$reg));
__ umov($dst$$Register, as_FloatRegister($tmp$$reg), __ B, 0);
%}
ins_pipe(pipe_slow);
%}
instruct vmask_firsttrue_LT8B(iRegINoSp dst, vecD src, rFlagsReg cr) %{
predicate(n->in(1)->bottom_type()->is_vect()->element_basic_type() == T_BOOLEAN &&
n->in(1)->bottom_type()->is_vect()->length() < 8);
match(Set dst (VectorMaskFirstTrue src));
effect(KILL cr);
ins_cost(7 * INSN_COST);
format %{ "vmask_firsttrue $dst, $src\t# vector (4I/4S/2I)" %}
ins_encode %{
// Returns the index of the first active lane of the
// vector mask, or VLENGTH if no lane is active.
//
// Input "src" is a vector of boolean represented as
// bytes with 0x00/0x01 as element values.
//
// Computed by reversing the bits and counting the leading
// zero bytes.
__ fmovd($dst$$Register, as_FloatRegister($src$$reg));
__ rbit($dst$$Register, $dst$$Register);
__ clz($dst$$Register, $dst$$Register);
__ lsrw($dst$$Register, $dst$$Register, 3);
__ movw(rscratch1, Matcher::vector_length(this, $src));
__ cmpw($dst$$Register, rscratch1);
__ cselw($dst$$Register, rscratch1, $dst$$Register, Assembler::GE);
%}
ins_pipe(pipe_slow);
%}
instruct vmask_firsttrue8B(iRegINoSp dst, vecD src) %{
predicate(n->in(1)->bottom_type()->is_vect()->element_basic_type() == T_BOOLEAN &&
n->in(1)->bottom_type()->is_vect()->length() == 8);
match(Set dst (VectorMaskFirstTrue src));
ins_cost(4 * INSN_COST);
format %{ "vmask_firsttrue $dst, $src\t# vector (8B)" %}
ins_encode %{
// Returns the index of the first active lane of the
// vector mask, or VLENGTH if no lane is active.
//
// Input "src" is a vector of boolean represented as
// bytes with 0x00/0x01 as element values.
//
// Computed by reversing the bits and counting the leading
// zero bytes.
__ fmovd($dst$$Register, as_FloatRegister($src$$reg));
__ rbit($dst$$Register, $dst$$Register);
__ clz($dst$$Register, $dst$$Register);
__ lsrw($dst$$Register, $dst$$Register, 3);
%}
ins_pipe(pipe_slow);
%}
instruct vmask_firsttrue16B(iRegINoSp dst, vecX src) %{
predicate(n->in(1)->bottom_type()->is_vect()->element_basic_type() == T_BOOLEAN);
match(Set dst (VectorMaskFirstTrue src));
ins_cost(6 * INSN_COST);
format %{ "vmask_firsttrue $dst, $src\t# vector (16B)" %}
ins_encode %{
// Returns the index of the first active lane of the
// vector mask, or 16 (VLENGTH) if no lane is active.
//
// Input "src" is a vector of boolean represented as
// bytes with 0x00/0x01 as element values.
Label FIRST_TRUE_INDEX;
// Try to compute the result from lower 64 bits.
__ fmovd($dst$$Register, as_FloatRegister($src$$reg));
__ movw(rscratch1, zr);
__ cbnz($dst$$Register, FIRST_TRUE_INDEX);
// Compute the result from the higher 64 bits.
__ fmovhid($dst$$Register, as_FloatRegister($src$$reg));
__ movw(rscratch1, 8);
// Reverse the bits and count the leading zero bytes.
__ bind(FIRST_TRUE_INDEX);
__ rbit($dst$$Register, $dst$$Register);
__ clz($dst$$Register, $dst$$Register);
__ addw($dst$$Register, rscratch1, $dst$$Register, Assembler::LSR, 3);
%}
ins_pipe(pipe_slow);
%}
instruct vmask_lasttrue8B(iRegINoSp dst, vecD src) %{
predicate(n->in(1)->bottom_type()->is_vect()->element_basic_type() == T_BOOLEAN);
match(Set dst (VectorMaskLastTrue src));
ins_cost(4 * INSN_COST);
format %{ "vmask_lasttrue $dst, $src\t# vector (8B)" %}
ins_encode %{
// Returns the index of the last active lane of the
// vector mask, or -1 if no lane is active.
//
// Input "src" is a vector of boolean represented as
// bytes with 0x00/0x01 as element values.
//
// Computed by counting the leading zero bytes and
// substracting it by 7 (VLENGTH - 1).
__ fmovd($dst$$Register, as_FloatRegister($src$$reg));
__ clz($dst$$Register, $dst$$Register);
__ movw(rscratch1, 7);
__ subw($dst$$Register, rscratch1, $dst$$Register, Assembler::LSR, 3);
%}
ins_pipe(pipe_slow);
%}
instruct vmask_lasttrue16B(iRegINoSp dst, vecX src) %{
predicate(n->in(1)->bottom_type()->is_vect()->element_basic_type() == T_BOOLEAN);
match(Set dst (VectorMaskLastTrue src));
ins_cost(5 * INSN_COST);
format %{ "vmask_lasttrue $dst, $src\t# vector (16B)" %}
ins_encode %{
// Returns the index of the last active lane of the
// vector mask, or -1 if no lane is active.
//
// Input "src" is a vector of boolean represented as
// bytes with 0x00/0x01 as element values.
Label LAST_TRUE_INDEX;
// Try to compute the result from higher 64 bits.
__ fmovhid($dst$$Register, as_FloatRegister($src$$reg));
__ movw(rscratch1, 16 - 1);
__ cbnz($dst$$Register, LAST_TRUE_INDEX);
// Compute the result from the lower 64 bits.
__ fmovd($dst$$Register, as_FloatRegister($src$$reg));
__ movw(rscratch1, 8 - 1);
// Count the leading zero bytes and substract it by 15 (VLENGTH - 1).
__ bind(LAST_TRUE_INDEX);
__ clz($dst$$Register, $dst$$Register);
__ subw($dst$$Register, rscratch1, $dst$$Register, Assembler::LSR, 3);
%}
ins_pipe(pipe_slow);
%}

View File

@@ -872,7 +872,7 @@ instruct vcmpD(vecD dst, vecD src1, vecD src2, immI cond)
format %{ "vcmpD $dst, $src1, $src2\t# vector compare " %}
ins_cost(INSN_COST);
ins_encode %{
BasicType bt = Matcher::vector_element_basic_type(this);
BasicType bt = vector_element_basic_type(this);
assert(type2aelembytes(bt) != 8, "not supported");
__ neon_compare(as_FloatRegister($dst$$reg), bt, as_FloatRegister($src1$$reg),
as_FloatRegister($src2$$reg), (int)$cond$$constant, /*isQ*/ false);
@@ -887,7 +887,7 @@ instruct vcmpX(vecX dst, vecX src1, vecX src2, immI cond)
format %{ "vcmpX $dst, $src1, $src2\t# vector compare " %}
ins_cost(INSN_COST);
ins_encode %{
BasicType bt = Matcher::vector_element_basic_type(this);
BasicType bt = vector_element_basic_type(this);
__ neon_compare(as_FloatRegister($dst$$reg), bt, as_FloatRegister($src1$$reg),
as_FloatRegister($src2$$reg), (int)$cond$$constant, /*isQ*/ true);
%}
@@ -2243,151 +2243,3 @@ instruct vpopcount$1$2`'(vec$5 dst, vec$5 src) %{
dnl $1 $2 $3 $4 $5
VPOPCOUNT(4, I, 16, 8, X)
VPOPCOUNT(2, I, 8, 4, D)
dnl
dnl VMASK_TRUECOUNT($1, $2 )
dnl VMASK_TRUECOUNT(suffix, reg)
define(`VMASK_TRUECOUNT', `
instruct vmask_truecount$1(iRegINoSp dst, $2 src, $2 tmp) %{
predicate(n->in(1)->bottom_type()->is_vect()->element_basic_type() == T_BOOLEAN);
match(Set dst (VectorMaskTrueCount src));
effect(TEMP tmp);
ins_cost(2 * INSN_COST);
format %{ "addv $tmp, $src\n\t"
"umov $dst, $tmp, B, 0\t# vector ($1)" %}
ins_encode %{
// Input "src" is a vector of boolean represented as bytes with
// 0x00/0x01 as element values.
__ addv(as_FloatRegister($tmp$$reg), __ T$1, as_FloatRegister($src$$reg));
__ umov($dst$$Register, as_FloatRegister($tmp$$reg), __ B, 0);
%}
ins_pipe(pipe_slow);
%}')dnl
dnl
dnl
define(`ARGLIST',
`ifelse($1, `_LT8B', `iRegINoSp dst, vecD src, rFlagsReg cr', `iRegINoSp dst, vecD src')')
dnl
dnl VMASK_FIRSTTRUE_D($1, $2, $3, $4 )
dnl VMASK_FIRSTTRUE_D(suffix, cond, cost, size)
define(`VMASK_FIRSTTRUE_D', `
instruct vmask_firsttrue$1(ARGLIST($1)) %{
predicate(n->in(1)->bottom_type()->is_vect()->element_basic_type() == T_BOOLEAN &&
n->in(1)->bottom_type()->is_vect()->length() $2 8);
match(Set dst (VectorMaskFirstTrue src));dnl
ifelse($1, `_LT8B', `
effect(KILL cr);')
ins_cost($3 * INSN_COST);
format %{ "vmask_firsttrue $dst, $src\t# vector ($4)" %}
ins_encode %{
// Returns the index of the first active lane of the
// vector mask, or VLENGTH if no lane is active.
//
// Input "src" is a vector of boolean represented as
// bytes with 0x00/0x01 as element values.
//
// Computed by reversing the bits and counting the leading
// zero bytes.
__ fmovd($dst$$Register, as_FloatRegister($src$$reg));
__ rbit($dst$$Register, $dst$$Register);
__ clz($dst$$Register, $dst$$Register);
__ lsrw($dst$$Register, $dst$$Register, 3);dnl
ifelse(`$1', `_LT8B', `
__ movw(rscratch1, Matcher::vector_length(this, $src));
__ cmpw($dst$$Register, rscratch1);
__ cselw($dst$$Register, rscratch1, $dst$$Register, Assembler::GE);')
%}
ins_pipe(pipe_slow);
%}')dnl
dnl
undefine(ARGLIST)dnl
dnl
// vector mask reductions
VMASK_TRUECOUNT(8B, vecD)
VMASK_TRUECOUNT(16B, vecX)
VMASK_FIRSTTRUE_D(_LT8B, <, 7, 4I/4S/2I)
VMASK_FIRSTTRUE_D(8B, ==, 4, 8B)
instruct vmask_firsttrue16B(iRegINoSp dst, vecX src) %{
predicate(n->in(1)->bottom_type()->is_vect()->element_basic_type() == T_BOOLEAN);
match(Set dst (VectorMaskFirstTrue src));
ins_cost(6 * INSN_COST);
format %{ "vmask_firsttrue $dst, $src\t# vector (16B)" %}
ins_encode %{
// Returns the index of the first active lane of the
// vector mask, or 16 (VLENGTH) if no lane is active.
//
// Input "src" is a vector of boolean represented as
// bytes with 0x00/0x01 as element values.
Label FIRST_TRUE_INDEX;
// Try to compute the result from lower 64 bits.
__ fmovd($dst$$Register, as_FloatRegister($src$$reg));
__ movw(rscratch1, zr);
__ cbnz($dst$$Register, FIRST_TRUE_INDEX);
// Compute the result from the higher 64 bits.
__ fmovhid($dst$$Register, as_FloatRegister($src$$reg));
__ movw(rscratch1, 8);
// Reverse the bits and count the leading zero bytes.
__ bind(FIRST_TRUE_INDEX);
__ rbit($dst$$Register, $dst$$Register);
__ clz($dst$$Register, $dst$$Register);
__ addw($dst$$Register, rscratch1, $dst$$Register, Assembler::LSR, 3);
%}
ins_pipe(pipe_slow);
%}
instruct vmask_lasttrue8B(iRegINoSp dst, vecD src) %{
predicate(n->in(1)->bottom_type()->is_vect()->element_basic_type() == T_BOOLEAN);
match(Set dst (VectorMaskLastTrue src));
ins_cost(4 * INSN_COST);
format %{ "vmask_lasttrue $dst, $src\t# vector (8B)" %}
ins_encode %{
// Returns the index of the last active lane of the
// vector mask, or -1 if no lane is active.
//
// Input "src" is a vector of boolean represented as
// bytes with 0x00/0x01 as element values.
//
// Computed by counting the leading zero bytes and
// substracting it by 7 (VLENGTH - 1).
__ fmovd($dst$$Register, as_FloatRegister($src$$reg));
__ clz($dst$$Register, $dst$$Register);
__ movw(rscratch1, 7);
__ subw($dst$$Register, rscratch1, $dst$$Register, Assembler::LSR, 3);
%}
ins_pipe(pipe_slow);
%}
instruct vmask_lasttrue16B(iRegINoSp dst, vecX src) %{
predicate(n->in(1)->bottom_type()->is_vect()->element_basic_type() == T_BOOLEAN);
match(Set dst (VectorMaskLastTrue src));
ins_cost(5 * INSN_COST);
format %{ "vmask_lasttrue $dst, $src\t# vector (16B)" %}
ins_encode %{
// Returns the index of the last active lane of the
// vector mask, or -1 if no lane is active.
//
// Input "src" is a vector of boolean represented as
// bytes with 0x00/0x01 as element values.
Label LAST_TRUE_INDEX;
// Try to compute the result from higher 64 bits.
__ fmovhid($dst$$Register, as_FloatRegister($src$$reg));
__ movw(rscratch1, 16 - 1);
__ cbnz($dst$$Register, LAST_TRUE_INDEX);
// Compute the result from the lower 64 bits.
__ fmovd($dst$$Register, as_FloatRegister($src$$reg));
__ movw(rscratch1, 8 - 1);
// Count the leading zero bytes and substract it by 15 (VLENGTH - 1).
__ bind(LAST_TRUE_INDEX);
__ clz($dst$$Register, $dst$$Register);
__ subw($dst$$Register, rscratch1, $dst$$Register, Assembler::LSR, 3);
%}
ins_pipe(pipe_slow);
%}

View File

@@ -87,6 +87,18 @@ source_hpp %{
%}
source %{
static inline BasicType vector_element_basic_type(const MachNode* n) {
const TypeVect* vt = n->bottom_type()->is_vect();
return vt->element_basic_type();
}
static inline BasicType vector_element_basic_type(const MachNode* use, const MachOper* opnd) {
int def_idx = use->operand_index(opnd);
Node* def = use->in(def_idx);
const TypeVect* vt = def->bottom_type()->is_vect();
return vt->element_basic_type();
}
static Assembler::SIMD_RegVariant elemBytes_to_regVariant(int esize) {
switch(esize) {
case 1:
@@ -191,9 +203,6 @@ source %{
case Op_VectorReinterpret:
case Op_VectorStoreMask:
case Op_VectorTest:
case Op_VectorMaskTrueCount:
case Op_VectorMaskLastTrue:
case Op_VectorMaskFirstTrue:
return false;
default:
return true;
@@ -219,7 +228,7 @@ instruct loadV(vReg dst, vmemA mem) %{
ins_encode %{
FloatRegister dst_reg = as_FloatRegister($dst$$reg);
loadStoreA_predicate(C2_MacroAssembler(&cbuf), false, dst_reg, ptrue,
Matcher::vector_element_basic_type(this), $mem->opcode(),
vector_element_basic_type(this), $mem->opcode(),
as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp);
%}
ins_pipe(pipe_slow);
@@ -233,7 +242,7 @@ instruct storeV(vReg src, vmemA mem) %{
ins_encode %{
FloatRegister src_reg = as_FloatRegister($src$$reg);
loadStoreA_predicate(C2_MacroAssembler(&cbuf), true, src_reg, ptrue,
Matcher::vector_element_basic_type(this, $src), $mem->opcode(),
vector_element_basic_type(this, $src), $mem->opcode(),
as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp);
%}
ins_pipe(pipe_slow);
@@ -538,7 +547,7 @@ instruct vmin(vReg dst_src1, vReg src2) %{
ins_cost(SVE_COST);
format %{ "sve_min $dst_src1, $dst_src1, $src2\t # vector (sve)" %}
ins_encode %{
BasicType bt = Matcher::vector_element_basic_type(this);
BasicType bt = vector_element_basic_type(this);
Assembler::SIMD_RegVariant size = elemType_to_regVariant(bt);
if (is_floating_point_type(bt)) {
__ sve_fmin(as_FloatRegister($dst_src1$$reg), size,
@@ -558,7 +567,7 @@ instruct vmax(vReg dst_src1, vReg src2) %{
ins_cost(SVE_COST);
format %{ "sve_max $dst_src1, $dst_src1, $src2\t # vector (sve)" %}
ins_encode %{
BasicType bt = Matcher::vector_element_basic_type(this);
BasicType bt = vector_element_basic_type(this);
Assembler::SIMD_RegVariant size = elemType_to_regVariant(bt);
if (is_floating_point_type(bt)) {
__ sve_fmax(as_FloatRegister($dst_src1$$reg), size,
@@ -1766,42 +1775,3 @@ instruct vmaskcast(vReg dst) %{
ins_pipe(pipe_class_empty);
%}
// Intrisics for String.indexOf(char)
instruct stringL_indexof_char_sve(iRegP_R1 str1, iRegI_R2 cnt1, iRegI_R3 ch,
iRegI_R0 result, vReg ztmp1, vReg ztmp2,
pRegGov pgtmp, pReg ptmp, rFlagsReg cr)
%{
match(Set result (StrIndexOfChar (Binary str1 cnt1) ch));
predicate((UseSVE > 0) && (((StrIndexOfCharNode*)n)->encoding() == StrIntrinsicNode::L));
effect(TEMP ztmp1, TEMP ztmp2, TEMP pgtmp, TEMP ptmp, KILL cr);
format %{ "StringLatin1 IndexOf char[] $str1,$cnt1,$ch -> $result # use sve" %}
ins_encode %{
__ string_indexof_char_sve($str1$$Register, $cnt1$$Register, $ch$$Register, $result$$Register,
as_FloatRegister($ztmp1$$reg), as_FloatRegister($ztmp2$$reg),
as_PRegister($pgtmp$$reg), as_PRegister($ptmp$$reg), true /* isL */);
%}
ins_pipe(pipe_class_memory);
%}
instruct stringU_indexof_char_sve(iRegP_R1 str1, iRegI_R2 cnt1, iRegI_R3 ch,
iRegI_R0 result, vReg ztmp1, vReg ztmp2,
pRegGov pgtmp, pReg ptmp, rFlagsReg cr)
%{
match(Set result (StrIndexOfChar (Binary str1 cnt1) ch));
predicate((UseSVE > 0) && (((StrIndexOfCharNode*)n)->encoding() == StrIntrinsicNode::U));
effect(TEMP ztmp1, TEMP ztmp2, TEMP pgtmp, TEMP ptmp, KILL cr);
format %{ "StringUTF16 IndexOf char[] $str1,$cnt1,$ch -> $result # use sve" %}
ins_encode %{
__ string_indexof_char_sve($str1$$Register, $cnt1$$Register, $ch$$Register, $result$$Register,
as_FloatRegister($ztmp1$$reg), as_FloatRegister($ztmp2$$reg),
as_PRegister($pgtmp$$reg), as_PRegister($ptmp$$reg), false /* isL */);
%}
ins_pipe(pipe_class_memory);
%}

View File

@@ -74,6 +74,18 @@ source_hpp %{
%}
source %{
static inline BasicType vector_element_basic_type(const MachNode* n) {
const TypeVect* vt = n->bottom_type()->is_vect();
return vt->element_basic_type();
}
static inline BasicType vector_element_basic_type(const MachNode* use, const MachOper* opnd) {
int def_idx = use->operand_index(opnd);
Node* def = use->in(def_idx);
const TypeVect* vt = def->bottom_type()->is_vect();
return vt->element_basic_type();
}
static Assembler::SIMD_RegVariant elemBytes_to_regVariant(int esize) {
switch(esize) {
case 1:
@@ -178,9 +190,6 @@ source %{
case Op_VectorReinterpret:
case Op_VectorStoreMask:
case Op_VectorTest:
case Op_VectorMaskTrueCount:
case Op_VectorMaskLastTrue:
case Op_VectorMaskFirstTrue:
return false;
default:
return true;
@@ -214,7 +223,7 @@ instruct loadV(vReg dst, vmemA mem) %{
ins_encode %{
FloatRegister dst_reg = as_FloatRegister($dst$$reg);
loadStoreA_predicate(C2_MacroAssembler(&cbuf), false, dst_reg, ptrue,
Matcher::vector_element_basic_type(this), $mem->opcode(),
vector_element_basic_type(this), $mem->opcode(),
as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp);
%}
ins_pipe(pipe_slow);
@@ -228,7 +237,7 @@ instruct storeV(vReg src, vmemA mem) %{
ins_encode %{
FloatRegister src_reg = as_FloatRegister($src$$reg);
loadStoreA_predicate(C2_MacroAssembler(&cbuf), true, src_reg, ptrue,
Matcher::vector_element_basic_type(this, $src), $mem->opcode(),
vector_element_basic_type(this, $src), $mem->opcode(),
as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp);
%}
ins_pipe(pipe_slow);
@@ -386,7 +395,7 @@ instruct vmin(vReg dst_src1, vReg src2) %{
ins_cost(SVE_COST);
format %{ "sve_min $dst_src1, $dst_src1, $src2\t # vector (sve)" %}
ins_encode %{
BasicType bt = Matcher::vector_element_basic_type(this);
BasicType bt = vector_element_basic_type(this);
Assembler::SIMD_RegVariant size = elemType_to_regVariant(bt);
if (is_floating_point_type(bt)) {
__ sve_fmin(as_FloatRegister($dst_src1$$reg), size,
@@ -406,7 +415,7 @@ instruct vmax(vReg dst_src1, vReg src2) %{
ins_cost(SVE_COST);
format %{ "sve_max $dst_src1, $dst_src1, $src2\t # vector (sve)" %}
ins_encode %{
BasicType bt = Matcher::vector_element_basic_type(this);
BasicType bt = vector_element_basic_type(this);
Assembler::SIMD_RegVariant size = elemType_to_regVariant(bt);
if (is_floating_point_type(bt)) {
__ sve_fmax(as_FloatRegister($dst_src1$$reg), size,
@@ -910,29 +919,3 @@ instruct vmaskcast(vReg dst) %{
ins_pipe(pipe_class_empty);
%}
// Intrisics for String.indexOf(char)
dnl
define(`STRING_INDEXOF_CHAR', `
instruct string$1_indexof_char_sve(iRegP_R1 str1, iRegI_R2 cnt1, iRegI_R3 ch,
iRegI_R0 result, vReg ztmp1, vReg ztmp2,
pRegGov pgtmp, pReg ptmp, rFlagsReg cr)
%{
match(Set result (StrIndexOfChar (Binary str1 cnt1) ch));
predicate((UseSVE > 0) && (((StrIndexOfCharNode*)n)->encoding() == StrIntrinsicNode::$1));
effect(TEMP ztmp1, TEMP ztmp2, TEMP pgtmp, TEMP ptmp, KILL cr);
format %{ "String$2 IndexOf char[] $str1,$cnt1,$ch -> $result # use sve" %}
ins_encode %{
__ string_indexof_char_sve($str1$$Register, $cnt1$$Register, $ch$$Register, $result$$Register,
as_FloatRegister($ztmp1$$reg), as_FloatRegister($ztmp2$$reg),
as_PRegister($pgtmp$$reg), as_PRegister($ptmp$$reg), $3 /* isL */);
%}
ins_pipe(pipe_class_memory);
%}')dnl
dnl $1 $2 $3
STRING_INDEXOF_CHAR(L, Latin1, true)
STRING_INDEXOF_CHAR(U, UTF16, false)
dnl

View File

@@ -134,16 +134,7 @@ void Assembler::adrp(Register reg1, const Address &dest, uint64_t &byte_offset)
#undef __
#define starti Instruction_aarch64 current_insn(this);
#define f current_insn.f
#define sf current_insn.sf
#define rf current_insn.rf
#define srf current_insn.srf
#define zrf current_insn.zrf
#define prf current_insn.prf
#define pgrf current_insn.pgrf
#define fixed current_insn.fixed
#define starti Instruction_aarch64 do_not_use(this); set_current(&do_not_use)
void Assembler::adr(Register Rd, address adr) {
intptr_t offset = adr - pc();
@@ -165,53 +156,6 @@ void Assembler::adrp(Register reg1, const Address &dest, uint64_t &byte_offset)
rf(Rd, 0);
}
// An "all-purpose" add/subtract immediate, per ARM documentation:
// A "programmer-friendly" assembler may accept a negative immediate
// between -(2^24 -1) and -1 inclusive, causing it to convert a
// requested ADD operation to a SUB, or vice versa, and then encode
// the absolute value of the immediate as for uimm24.
void Assembler::add_sub_immediate(Instruction_aarch64 &current_insn,
Register Rd, Register Rn, unsigned uimm, int op,
int negated_op) {
bool sets_flags = op & 1; // this op sets flags
union {
unsigned u;
int imm;
};
u = uimm;
bool shift = false;
bool neg = imm < 0;
if (neg) {
imm = -imm;
op = negated_op;
}
assert(Rd != sp || imm % 16 == 0, "misaligned stack");
if (imm >= (1 << 11)
&& ((imm >> 12) << 12 == imm)) {
imm >>= 12;
shift = true;
}
f(op, 31, 29), f(0b10001, 28, 24), f(shift, 23, 22), f(imm, 21, 10);
// add/subtract immediate ops with the S bit set treat r31 as zr;
// with S unset they use sp.
if (sets_flags)
zrf(Rd, 0);
else
srf(Rd, 0);
srf(Rn, 5);
}
#undef f
#undef sf
#undef rf
#undef srf
#undef zrf
#undef prf
#undef pgrf
#undef fixed
#undef starti
Address::Address(address target, relocInfo::relocType rtype) : _mode(literal){
@@ -316,6 +260,43 @@ void Assembler::wrap_label(Label &L, prfop op, prefetch_insn insn) {
}
}
// An "all-purpose" add/subtract immediate, per ARM documentation:
// A "programmer-friendly" assembler may accept a negative immediate
// between -(2^24 -1) and -1 inclusive, causing it to convert a
// requested ADD operation to a SUB, or vice versa, and then encode
// the absolute value of the immediate as for uimm24.
void Assembler::add_sub_immediate(Register Rd, Register Rn, unsigned uimm, int op,
int negated_op) {
bool sets_flags = op & 1; // this op sets flags
union {
unsigned u;
int imm;
};
u = uimm;
bool shift = false;
bool neg = imm < 0;
if (neg) {
imm = -imm;
op = negated_op;
}
assert(Rd != sp || imm % 16 == 0, "misaligned stack");
if (imm >= (1 << 11)
&& ((imm >> 12) << 12 == imm)) {
imm >>= 12;
shift = true;
}
f(op, 31, 29), f(0b10001, 28, 24), f(shift, 23, 22), f(imm, 21, 10);
// add/subtract immediate ops with the S bit set treat r31 as zr;
// with S unset they use sp.
if (sets_flags)
zrf(Rd, 0);
else
srf(Rd, 0);
srf(Rn, 5);
}
bool Assembler::operand_valid_for_add_sub_immediate(int64_t imm) {
bool shift = false;
uint64_t uimm = (uint64_t)uabs((jlong)imm);

View File

@@ -247,12 +247,12 @@ public:
int nbits = msb - lsb + 1;
guarantee(val < (1ULL << nbits), "Field too big for insn");
assert_cond(msb >= lsb);
val <<= lsb;
insn |= val;
#ifdef ASSERT
unsigned mask = checked_cast<unsigned>(right_n_bits(nbits));
val <<= lsb;
mask <<= lsb;
insn |= val;
assert_cond((bits & mask) == 0);
#ifdef ASSERT
bits |= mask;
#endif
}
@@ -313,7 +313,7 @@ public:
}
};
#define starti Instruction_aarch64 current_insn(this);
#define starti Instruction_aarch64 do_not_use(this); set_current(&do_not_use)
class PrePost {
int _offset;
@@ -694,14 +694,46 @@ public:
static address locate_next_instruction(address inst);
#define f current_insn.f
#define sf current_insn.sf
#define rf current_insn.rf
#define srf current_insn.srf
#define zrf current_insn.zrf
#define prf current_insn.prf
#define pgrf current_insn.pgrf
#define fixed current_insn.fixed
Instruction_aarch64* current;
void set_current(Instruction_aarch64* i) { current = i; }
void f(unsigned val, int msb, int lsb) {
current->f(val, msb, lsb);
}
void f(unsigned val, int msb) {
current->f(val, msb, msb);
}
void sf(int64_t val, int msb, int lsb) {
current->sf(val, msb, lsb);
}
void rf(Register reg, int lsb) {
current->rf(reg, lsb);
}
void srf(Register reg, int lsb) {
current->srf(reg, lsb);
}
void zrf(Register reg, int lsb) {
current->zrf(reg, lsb);
}
void rf(FloatRegister reg, int lsb) {
current->rf(reg, lsb);
}
void prf(PRegister reg, int lsb) {
current->prf(reg, lsb);
}
void pgrf(PRegister reg, int lsb) {
current->pgrf(reg, lsb);
}
void fixed(unsigned value, unsigned mask) {
current->fixed(value, mask);
}
void emit() {
emit_long(current->get_insn());
assert_cond(current->get_bits() == 0xffffffff);
current = NULL;
}
typedef void (Assembler::* uncond_branch_insn)(address dest);
typedef void (Assembler::* compare_and_branch_insn)(Register Rt, address dest);
@@ -732,8 +764,8 @@ public:
#undef INSN
void add_sub_immediate(Instruction_aarch64 &current_insn, Register Rd, Register Rn,
unsigned uimm, int op, int negated_op);
void add_sub_immediate(Register Rd, Register Rn, unsigned uimm, int op,
int negated_op);
// Add/subtract (immediate)
#define INSN(NAME, decode, negated) \
@@ -745,7 +777,7 @@ public:
\
void NAME(Register Rd, Register Rn, unsigned imm) { \
starti; \
add_sub_immediate(current_insn, Rd, Rn, imm, decode, negated); \
add_sub_immediate(Rd, Rn, imm, decode, negated); \
}
INSN(addsw, 0b001, 0b011);
@@ -758,7 +790,7 @@ public:
#define INSN(NAME, decode, negated) \
void NAME(Register Rd, Register Rn, unsigned imm) { \
starti; \
add_sub_immediate(current_insn, Rd, Rn, imm, decode, negated); \
add_sub_immediate(Rd, Rn, imm, decode, negated); \
}
INSN(addw, 0b000, 0b010);
@@ -1060,7 +1092,7 @@ public:
}
void sys(int op1, int CRn, int CRm, int op2,
Register rt = as_Register(0b11111)) {
Register rt = (Register)0b11111) {
system(0b01, op1, CRn, CRm, op2, rt);
}
@@ -1329,7 +1361,7 @@ public:
starti; \
f(opc, 31, 30), f(0b011, 29, 27), f(V, 26), f(0b00, 25, 24), \
sf(offset, 23, 5); \
rf(as_Register(Rt), 0); \
rf((Register)Rt, 0); \
}
INSN(ldrs, 0b00, 1);
@@ -1343,7 +1375,7 @@ public:
starti; \
f(size, 31, 30), f(0b111100, 29, 24), f(opc, 23, 22), f(0, 21); \
f(0, 20, 12), f(0b01, 11, 10); \
rf(Rn, 5), rf(as_Register(Rt), 0); \
rf(Rn, 5), rf((Register)Rt, 0); \
}
INSN(ldrs, 0b10, 0b01);
@@ -1376,9 +1408,9 @@ public:
f(opc, 31, 30), f(p1, 29, 27), f(V, 26), f(L, 22);
zrf(Rt2, 10), zrf(Rt1, 0);
if (no_allocate) {
adr.encode_nontemporal_pair(&current_insn);
adr.encode_nontemporal_pair(current);
} else {
adr.encode_pair(&current_insn);
adr.encode_pair(current);
}
}
@@ -1404,8 +1436,7 @@ public:
#define INSN(NAME, size, p1, V, L, no_allocate) \
void NAME(FloatRegister Rt1, FloatRegister Rt2, Address adr) { \
ld_st1(size, p1, V, L, \
as_Register(Rt1), as_Register(Rt2), adr, no_allocate); \
ld_st1(size, p1, V, L, (Register)Rt1, (Register)Rt2, adr, no_allocate); \
}
INSN(stps, 0b00, 0b101, 1, 0, false);
@@ -1440,7 +1471,7 @@ public:
f(size, 31, 30);
f(op, 23, 22); // str
adr.encode(&current_insn);
adr.encode(current);
}
#define INSN(NAME, size, op) \
@@ -1468,7 +1499,7 @@ public:
#define INSN(NAME, size, op) \
void NAME(const Address &adr, prfop pfop = PLDL1KEEP) { \
ld_st2(as_Register(pfop), adr, size, op); \
ld_st2((Register)pfop, adr, size, op); \
}
INSN(prfm, 0b11, 0b10); // FIXME: PRFM should not be used with
@@ -1479,7 +1510,7 @@ public:
#define INSN(NAME, size, op) \
void NAME(FloatRegister Rt, const Address &adr) { \
ld_st2(as_Register(Rt), adr, size, op, 1); \
ld_st2((Register)Rt, adr, size, op, 1); \
}
INSN(strd, 0b11, 0b00);
@@ -1516,7 +1547,7 @@ public:
enum shift_kind { LSL, LSR, ASR, ROR };
void op_shifted_reg(Instruction_aarch64 &current_insn, unsigned decode,
void op_shifted_reg(unsigned decode,
enum shift_kind kind, unsigned shift,
unsigned size, unsigned op) {
f(size, 31);
@@ -1527,14 +1558,14 @@ public:
}
// Logical (shifted register)
#define INSN(NAME, size, op, N) \
void NAME(Register Rd, Register Rn, Register Rm, \
enum shift_kind kind = LSL, unsigned shift = 0) { \
starti; \
guarantee(size == 1 || shift < 32, "incorrect shift"); \
f(N, 21); \
zrf(Rm, 16), zrf(Rn, 5), zrf(Rd, 0); \
op_shifted_reg(current_insn, 0b01010, kind, shift, size, op); \
#define INSN(NAME, size, op, N) \
void NAME(Register Rd, Register Rn, Register Rm, \
enum shift_kind kind = LSL, unsigned shift = 0) { \
starti; \
guarantee(size == 1 || shift < 32, "incorrect shift"); \
f(N, 21); \
zrf(Rm, 16), zrf(Rn, 5), zrf(Rd, 0); \
op_shifted_reg(0b01010, kind, shift, size, op); \
}
INSN(andr, 1, 0b00, 0);
@@ -1554,7 +1585,7 @@ public:
starti; \
f(N, 21); \
zrf(Rm, 16), zrf(Rn, 5), zrf(Rd, 0); \
op_shifted_reg(current_insn, 0b01010, kind, shift, size, op); \
op_shifted_reg(0b01010, kind, shift, size, op); \
} \
\
/* These instructions have no immediate form. Provide an overload so \
@@ -1601,7 +1632,7 @@ void mvnw(Register Rd, Register Rm,
assert_cond(kind != ROR); \
guarantee(size == 1 || shift < 32, "incorrect shift");\
zrf(Rd, 0), zrf(Rn, 5), zrf(Rm, 16); \
op_shifted_reg(current_insn, 0b01011, kind, shift, size, op); \
op_shifted_reg(0b01011, kind, shift, size, op); \
}
INSN(add, 1, 0b000);
@@ -1622,10 +1653,10 @@ void mvnw(Register Rd, Register Rm,
ext::operation option, int amount = 0) { \
starti; \
zrf(Rm, 16), srf(Rn, 5), srf(Rd, 0); \
add_sub_extended_reg(current_insn, op, 0b01011, Rd, Rn, Rm, 0b00, option, amount); \
add_sub_extended_reg(op, 0b01011, Rd, Rn, Rm, 0b00, option, amount); \
}
void add_sub_extended_reg(Instruction_aarch64 &current_insn, unsigned op, unsigned decode,
void add_sub_extended_reg(unsigned op, unsigned decode,
Register Rd, Register Rn, Register Rm,
unsigned opt, ext::operation option, unsigned imm) {
guarantee(imm <= 4, "shift amount must be <= 4");
@@ -1645,7 +1676,7 @@ void mvnw(Register Rd, Register Rm,
ext::operation option, int amount = 0) { \
starti; \
zrf(Rm, 16), srf(Rn, 5), zrf(Rd, 0); \
add_sub_extended_reg(current_insn, op, 0b01011, Rd, Rn, Rm, 0b00, option, amount); \
add_sub_extended_reg(op, 0b01011, Rd, Rn, Rm, 0b00, option, amount); \
}
INSN(addsw, 0b001);
@@ -1746,7 +1777,7 @@ void mvnw(Register Rd, Register Rm,
}
#define INSN(NAME, op, op2) \
void NAME(Register Rd, Register Rn, Register Rm, Condition cond) { \
void NAME(Register Rd, Register Rn, Register Rm, Condition cond) { \
conditional_select(op, op2, Rd, Rn, Rm, cond); \
}
@@ -1762,7 +1793,7 @@ void mvnw(Register Rd, Register Rm,
#undef INSN
// Data processing
void data_processing(Instruction_aarch64 &current_insn, unsigned op29, unsigned opcode,
void data_processing(unsigned op29, unsigned opcode,
Register Rd, Register Rn) {
f(op29, 31, 29), f(0b11010110, 28, 21);
f(opcode, 15, 10);
@@ -1770,11 +1801,11 @@ void mvnw(Register Rd, Register Rm,
}
// (1 source)
#define INSN(NAME, op29, opcode2, opcode) \
void NAME(Register Rd, Register Rn) { \
starti; \
f(opcode2, 20, 16); \
data_processing(current_insn, op29, opcode, Rd, Rn); \
#define INSN(NAME, op29, opcode2, opcode) \
void NAME(Register Rd, Register Rn) { \
starti; \
f(opcode2, 20, 16); \
data_processing(op29, opcode, Rd, Rn); \
}
INSN(rbitw, 0b010, 0b00000, 0b00000);
@@ -1793,11 +1824,11 @@ void mvnw(Register Rd, Register Rm,
#undef INSN
// (2 sources)
#define INSN(NAME, op29, opcode) \
void NAME(Register Rd, Register Rn, Register Rm) { \
starti; \
rf(Rm, 16); \
data_processing(current_insn, op29, opcode, Rd, Rn); \
#define INSN(NAME, op29, opcode) \
void NAME(Register Rd, Register Rn, Register Rm) { \
starti; \
rf(Rm, 16); \
data_processing(op29, opcode, Rd, Rn); \
}
INSN(udivw, 0b000, 0b000010);
@@ -1842,9 +1873,9 @@ void mvnw(Register Rd, Register Rm,
#undef INSN
#define INSN(NAME, op54, op31, o0) \
void NAME(Register Rd, Register Rn, Register Rm) { \
data_processing(op54, op31, o0, Rd, Rn, Rm, as_Register(31)); \
#define INSN(NAME, op54, op31, o0) \
void NAME(Register Rd, Register Rn, Register Rm) { \
data_processing(op54, op31, o0, Rd, Rn, Rm, (Register)31); \
}
INSN(smulh, 0b100, 0b010, 0);
@@ -2023,7 +2054,7 @@ public:
#define INSN(NAME, op31, type, rmode, opcode) \
void NAME(Register Rd, FloatRegister Vn) { \
float_int_convert(op31, type, rmode, opcode, Rd, as_Register(Vn)); \
float_int_convert(op31, type, rmode, opcode, Rd, (Register)Vn); \
}
INSN(fcvtzsw, 0b000, 0b00, 0b11, 0b000);
@@ -2034,13 +2065,13 @@ public:
INSN(fmovs, 0b000, 0b00, 0b00, 0b110);
INSN(fmovd, 0b100, 0b01, 0b00, 0b110);
INSN(fmovhid, 0b100, 0b10, 0b01, 0b110);
// INSN(fmovhid, 0b100, 0b10, 0b01, 0b110);
#undef INSN
#define INSN(NAME, op31, type, rmode, opcode) \
void NAME(FloatRegister Vd, Register Rn) { \
float_int_convert(op31, type, rmode, opcode, as_Register(Vd), Rn); \
float_int_convert(op31, type, rmode, opcode, (Register)Vd, Rn); \
}
INSN(fmovs, 0b000, 0b00, 0b00, 0b111);
@@ -2095,7 +2126,7 @@ public:
// Floating-point compare
void float_compare(unsigned op31, unsigned type,
unsigned op, unsigned op2,
FloatRegister Vn, FloatRegister Vm = as_FloatRegister(0)) {
FloatRegister Vn, FloatRegister Vm = (FloatRegister)0) {
starti;
f(op31, 31, 29);
f(0b11110, 28, 24);
@@ -2225,10 +2256,10 @@ private:
static short SIMD_Size_in_bytes[];
public:
#define INSN(NAME, op) \
void NAME(FloatRegister Rt, SIMD_RegVariant T, const Address &adr) { \
ld_st2(as_Register(Rt), adr, (int)T & 3, op + ((T==Q) ? 0b10:0b00), 1); \
}
#define INSN(NAME, op) \
void NAME(FloatRegister Rt, SIMD_RegVariant T, const Address &adr) { \
ld_st2((Register)Rt, adr, (int)T & 3, op + ((T==Q) ? 0b10:0b00), 1); \
} \
INSN(ldr, 1);
INSN(str, 0);
@@ -3214,70 +3245,6 @@ public:
f(pattern, 9, 5), f(0b0, 4), prf(pd, 0);
}
// Integer comparisons (SVE)
#define INSN(NAME, cond) \
void NAME(PRegister Pd, SIMD_RegVariant T, PRegister Pg, FloatRegister Zn, FloatRegister Zm) { \
starti; \
assert(T != Q, "invalid size"); \
f(0b00100100, 31, 24), f(T, 23, 22), f(0, 21), rf(Zm, 16), f((cond >> 1) & 7, 15, 13); \
pgrf(Pg, 10), rf(Zn, 5), f(cond & 1, 4), prf(Pd, 0); \
}
INSN(sve_cmpeq, 0b1010); // Compare signed equal to vector
INSN(sve_cmpne, 0b1011); // Compare not equal to vector
INSN(sve_cmpge, 0b1000); // Compare signed greater than or equal to vector
INSN(sve_cmpgt, 0b1001); // Compare signed greater than vector
#undef INSN
// Predicate counted loop (SVE) (32-bit variants are not included)
#define INSN(NAME, decode) \
void NAME(PRegister Pd, SIMD_RegVariant T, Register Rn, Register Rm) { \
starti; \
assert(T != Q, "invalid register variant"); \
f(0b00100101, 31, 24), f(T, 23, 22), f(1, 21), \
zrf(Rm, 16), f(0, 15, 13), f(1, 12), f(decode >> 1, 11, 10), \
zrf(Rn, 5), f(decode & 1, 4), prf(Pd, 0); \
}
INSN(sve_whilelt, 0b010); // While incrementing signed scalar less than scalar
INSN(sve_whilele, 0b011); // While incrementing signed scalar less than or equal to scalar
INSN(sve_whilelo, 0b110); // While incrementing unsigned scalar lower than scalar
INSN(sve_whilels, 0b111); // While incrementing unsigned scalar lower than or the same as scalar
#undef INSN
// Predicate scan (SVE)
// Break after the first true condition
void sve_brka(PRegister pd, PRegister pg, PRegister pn, bool isMerge) {
starti;
f(0b00100101, 31, 24), f(0b00, 23, 22), f(0b01000001, 21, 14),
prf(pg, 10), f(0b0, 9), prf(pn, 5), f(isMerge ? 1 : 0, 4), prf(pd, 0);
}
// Element count and increment scalar (SVE)
#define INSN(NAME, TYPE) \
void NAME(Register Xdn, unsigned imm4 = 1, int pattern = 0b11111) { \
starti; \
f(0b00000100, 31, 24), f(TYPE, 23, 22), f(0b10, 21, 20); \
f(imm4 - 1, 19, 16), f(0b11100, 15, 11), f(0, 10), f(pattern, 9, 5), rf(Xdn, 0); \
}
INSN(sve_cntb, B); // Set scalar to multiple of 8-bit predicate constraint element count
INSN(sve_cnth, H); // Set scalar to multiple of 16-bit predicate constraint element count
INSN(sve_cntw, S); // Set scalar to multiple of 32-bit predicate constraint element count
INSN(sve_cntd, D); // Set scalar to multiple of 64-bit predicate constraint element count
#undef INSN
// Predicate count and increment scalar (SVE)
// Set scalar to the number of Active predicate elements that are TRUE
void sve_incp(const Register rd, SIMD_RegVariant T, PRegister pg) {
starti;
assert(T != Q, "invalid size");
f(0b00100101, 31, 24), f(T, 23, 22), f(0b1011001000100, 21, 9),
prf(pg, 5), rf(rd, 0);
}
Assembler(CodeBuffer* code) : AbstractAssembler(code) {
}
@@ -3298,19 +3265,9 @@ inline Assembler::Membar_mask_bits operator|(Assembler::Membar_mask_bits a,
}
Instruction_aarch64::~Instruction_aarch64() {
assem->emit_int32(insn);
assert_cond(get_bits() == 0xffffffff);
assem->emit();
}
#undef f
#undef sf
#undef rf
#undef srf
#undef zrf
#undef prf
#undef pgrf
#undef fixed
#undef starti
// Invert a condition
@@ -3318,6 +3275,8 @@ inline const Assembler::Condition operator~(const Assembler::Condition cond) {
return Assembler::Condition(int(cond) ^ 1);
}
class BiasedLockingCounters;
extern "C" void das(uint64_t start, int len);
#endif // CPU_AARCH64_ASSEMBLER_AARCH64_HPP

View File

@@ -45,9 +45,5 @@ extern aarch64_atomic_stub_t aarch64_atomic_cmpxchg_8_impl;
extern aarch64_atomic_stub_t aarch64_atomic_cmpxchg_1_relaxed_impl;
extern aarch64_atomic_stub_t aarch64_atomic_cmpxchg_4_relaxed_impl;
extern aarch64_atomic_stub_t aarch64_atomic_cmpxchg_8_relaxed_impl;
extern aarch64_atomic_stub_t aarch64_atomic_cmpxchg_4_release_impl;
extern aarch64_atomic_stub_t aarch64_atomic_cmpxchg_8_release_impl;
extern aarch64_atomic_stub_t aarch64_atomic_cmpxchg_4_seq_cst_impl;
extern aarch64_atomic_stub_t aarch64_atomic_cmpxchg_8_seq_cst_impl;
#endif // CPU_AARCH64_ATOMIC_AARCH64_HPP

View File

@@ -784,7 +784,7 @@ void LIR_Assembler::reg2stack(LIR_Opr src, LIR_Opr dest, BasicType type, bool po
}
void LIR_Assembler::reg2mem(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_PatchCode patch_code, CodeEmitInfo* info, bool pop_fpu_stack, bool wide) {
void LIR_Assembler::reg2mem(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_PatchCode patch_code, CodeEmitInfo* info, bool pop_fpu_stack, bool wide, bool /* unaligned */) {
LIR_Address* to_addr = dest->as_address_ptr();
PatchingStub* patch = NULL;
Register compressed_src = rscratch1;
@@ -941,7 +941,7 @@ void LIR_Assembler::stack2stack(LIR_Opr src, LIR_Opr dest, BasicType type) {
}
void LIR_Assembler::mem2reg(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_PatchCode patch_code, CodeEmitInfo* info, bool wide) {
void LIR_Assembler::mem2reg(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_PatchCode patch_code, CodeEmitInfo* info, bool wide, bool /* unaligned */) {
LIR_Address* addr = src->as_address_ptr();
LIR_Address* from_addr = src->as_address_ptr();
@@ -2577,9 +2577,13 @@ void LIR_Assembler::emit_lock(LIR_OpLock* op) {
if (!UseFastLocking) {
__ b(*op->stub()->entry());
} else if (op->code() == lir_lock) {
Register scratch = noreg;
if (UseBiasedLocking) {
scratch = op->scratch_opr()->as_register();
}
assert(BasicLock::displaced_header_offset_in_bytes() == 0, "lock_reg must point to the displaced header");
// add debug info for NullPointerException only if one is possible
int null_check_offset = __ lock_object(hdr, obj, lock, *op->stub()->entry());
int null_check_offset = __ lock_object(hdr, obj, lock, scratch, *op->stub()->entry());
if (op->info() != NULL) {
add_debug_info_for_null_check(null_check_offset, op->info());
}
@@ -2833,7 +2837,7 @@ void LIR_Assembler::emit_profile_type(LIR_OpProfileType* op) {
}
#endif
// first time here. Set profile type.
__ str(tmp, mdo_addr);
__ ldr(tmp, mdo_addr);
} else {
assert(ciTypeEntries::valid_ciklass(current_klass) != NULL &&
ciTypeEntries::valid_ciklass(current_klass) != exact_klass, "inconsistent");
@@ -2907,7 +2911,7 @@ void LIR_Assembler::rt_call(LIR_Opr result, address dest, const LIR_OprList* arg
void LIR_Assembler::volatile_move_op(LIR_Opr src, LIR_Opr dest, BasicType type, CodeEmitInfo* info) {
if (dest->is_address() || src->is_address()) {
move_op(src, dest, type, lir_patch_none, info,
/*pop_fpu_stack*/false, /*wide*/false);
/*pop_fpu_stack*/false, /*unaligned*/false, /*wide*/false);
} else {
ShouldNotReachHere();
}

View File

@@ -331,6 +331,11 @@ void LIRGenerator::do_MonitorEnter(MonitorEnter* x) {
// "lock" stores the address of the monitor stack slot, so this is not an oop
LIR_Opr lock = new_register(T_INT);
// Need a scratch register for biased locking
LIR_Opr scratch = LIR_OprFact::illegalOpr;
if (UseBiasedLocking) {
scratch = new_register(T_INT);
}
CodeEmitInfo* info_for_exception = NULL;
if (x->needs_null_check()) {
@@ -339,7 +344,7 @@ void LIRGenerator::do_MonitorEnter(MonitorEnter* x) {
// this CodeEmitInfo must not have the xhandlers because here the
// object is already locked (xhandlers expect object to be unlocked)
CodeEmitInfo* info = state_for(x, x->state(), true);
monitor_enter(obj.result(), lock, syncTempOpr(), LIR_OprFact::illegalOpr,
monitor_enter(obj.result(), lock, syncTempOpr(), scratch,
x->monitor_no(), info_for_exception, info);
}
@@ -1127,8 +1132,8 @@ void LIRGenerator::do_NewInstance(NewInstance* x) {
CodeEmitInfo* info = state_for(x, x->state());
LIR_Opr reg = result_register_for(x->type());
new_instance(reg, x->klass(), x->is_unresolved(),
FrameMap::r10_oop_opr,
FrameMap::r11_oop_opr,
FrameMap::r2_oop_opr,
FrameMap::r5_oop_opr,
FrameMap::r4_oop_opr,
LIR_OprFact::illegalOpr,
FrameMap::r3_metadata_opr, info);
@@ -1143,8 +1148,8 @@ void LIRGenerator::do_NewTypeArray(NewTypeArray* x) {
length.load_item_force(FrameMap::r19_opr);
LIR_Opr reg = result_register_for(x->type());
LIR_Opr tmp1 = FrameMap::r10_oop_opr;
LIR_Opr tmp2 = FrameMap::r11_oop_opr;
LIR_Opr tmp1 = FrameMap::r2_oop_opr;
LIR_Opr tmp2 = FrameMap::r4_oop_opr;
LIR_Opr tmp3 = FrameMap::r5_oop_opr;
LIR_Opr tmp4 = reg;
LIR_Opr klass_reg = FrameMap::r3_metadata_opr;
@@ -1172,8 +1177,8 @@ void LIRGenerator::do_NewObjectArray(NewObjectArray* x) {
CodeEmitInfo* info = state_for(x, x->state());
LIR_Opr reg = result_register_for(x->type());
LIR_Opr tmp1 = FrameMap::r10_oop_opr;
LIR_Opr tmp2 = FrameMap::r11_oop_opr;
LIR_Opr tmp1 = FrameMap::r2_oop_opr;
LIR_Opr tmp2 = FrameMap::r4_oop_opr;
LIR_Opr tmp3 = FrameMap::r5_oop_opr;
LIR_Opr tmp4 = reg;
LIR_Opr klass_reg = FrameMap::r3_metadata_opr;

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2021, Red Hat Inc. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -33,6 +33,7 @@
#include "oops/arrayOop.hpp"
#include "oops/markWord.hpp"
#include "runtime/basicLock.hpp"
#include "runtime/biasedLocking.hpp"
#include "runtime/os.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.hpp"
@@ -60,7 +61,7 @@ void C1_MacroAssembler::float_cmp(bool is_float, int unordered_result,
}
}
int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr, Label& slow_case) {
int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr, Register scratch, Label& slow_case) {
const int aligned_mask = BytesPerWord -1;
const int hdr_offset = oopDesc::mark_offset_in_bytes();
assert(hdr != obj && hdr != disp_hdr && obj != disp_hdr, "registers must be different");
@@ -81,6 +82,11 @@ int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr
br(Assembler::NE, slow_case);
}
if (UseBiasedLocking) {
assert(scratch != noreg, "should have scratch register at this point");
biased_locking_enter(disp_hdr, obj, hdr, scratch, false, done, &slow_case);
}
// Load object header
ldr(hdr, Address(obj, hdr_offset));
// and mark it as unlocked
@@ -116,6 +122,10 @@ int C1_MacroAssembler::lock_object(Register hdr, Register obj, Register disp_hdr
cbnz(hdr, slow_case);
// done
bind(done);
if (PrintBiasedLockingStatistics) {
lea(rscratch2, ExternalAddress((address)BiasedLocking::fast_path_entry_count_addr()));
addmw(Address(rscratch2, 0), 1, rscratch1);
}
return null_check_offset;
}
@@ -126,13 +136,21 @@ void C1_MacroAssembler::unlock_object(Register hdr, Register obj, Register disp_
assert(hdr != obj && hdr != disp_hdr && obj != disp_hdr, "registers must be different");
Label done;
if (UseBiasedLocking) {
// load object
ldr(obj, Address(disp_hdr, BasicObjectLock::obj_offset_in_bytes()));
biased_locking_exit(obj, hdr, done);
}
// load displaced header
ldr(hdr, Address(disp_hdr, 0));
// if the loaded hdr is NULL we had recursive locking
// if we had recursive locking, we are done
cbz(hdr, done);
// load object
ldr(obj, Address(disp_hdr, BasicObjectLock::obj_offset_in_bytes()));
if (!UseBiasedLocking) {
// load object
ldr(obj, Address(disp_hdr, BasicObjectLock::obj_offset_in_bytes()));
}
verify_oop(obj);
// test if object header is pointing to the displaced header, and if so, restore
// the displaced header in the object - if the object header is not pointing to
@@ -161,8 +179,13 @@ void C1_MacroAssembler::try_allocate(Register obj, Register var_size_in_bytes, i
void C1_MacroAssembler::initialize_header(Register obj, Register klass, Register len, Register t1, Register t2) {
assert_different_registers(obj, klass, len);
// This assumes that all prototype bits fit in an int32_t
mov(t1, (int32_t)(intptr_t)markWord::prototype().value());
if (UseBiasedLocking && !len->is_valid()) {
assert_different_registers(obj, klass, len, t1, t2);
ldr(t1, Address(klass, Klass::prototype_header_offset()));
} else {
// This assumes that all prototype bits fit in an int32_t
mov(t1, (int32_t)(intptr_t)markWord::prototype().value());
}
str(t1, Address(obj, oopDesc::mark_offset_in_bytes()));
if (UseCompressedClassPointers) { // Take care not to kill klass
@@ -180,24 +203,20 @@ void C1_MacroAssembler::initialize_header(Register obj, Register klass, Register
}
// preserves obj, destroys len_in_bytes
//
// Scratch registers: t1 = r10, t2 = r11
//
void C1_MacroAssembler::initialize_body(Register obj, Register len_in_bytes, int hdr_size_in_bytes, Register t1, Register t2) {
void C1_MacroAssembler::initialize_body(Register obj, Register len_in_bytes, int hdr_size_in_bytes, Register t1) {
assert(hdr_size_in_bytes >= 0, "header size must be positive or 0");
assert(t1 == r10 && t2 == r11, "must be");
Label done;
// len_in_bytes is positive and ptr sized
subs(len_in_bytes, len_in_bytes, hdr_size_in_bytes);
br(Assembler::EQ, done);
// zero_words() takes ptr in r10 and count in words in r11
mov(rscratch1, len_in_bytes);
lea(t1, Address(obj, hdr_size_in_bytes));
lsr(t2, rscratch1, LogBytesPerWord);
zero_words(t1, t2);
// Preserve obj
if (hdr_size_in_bytes)
add(obj, obj, hdr_size_in_bytes);
zero_memory(obj, len_in_bytes, t1);
if (hdr_size_in_bytes)
sub(obj, obj, hdr_size_in_bytes);
bind(done);
}
@@ -212,7 +231,6 @@ void C1_MacroAssembler::allocate_object(Register obj, Register t1, Register t2,
initialize_object(obj, klass, noreg, object_size * HeapWordSize, t1, t2, UseTLAB);
}
// Scratch registers: t1 = r10, t2 = r11
void C1_MacroAssembler::initialize_object(Register obj, Register klass, Register var_size_in_bytes, int con_size_in_bytes, Register t1, Register t2, bool is_tlab_allocated) {
assert((con_size_in_bytes & MinObjAlignmentInBytesMask) == 0,
"con_size_in_bytes is not multiple of alignment");
@@ -223,13 +241,45 @@ void C1_MacroAssembler::initialize_object(Register obj, Register klass, Register
if (!(UseTLAB && ZeroTLAB && is_tlab_allocated)) {
// clear rest of allocated space
const Register index = t2;
const int threshold = 16 * BytesPerWord; // approximate break even point for code size (see comments below)
if (var_size_in_bytes != noreg) {
mov(index, var_size_in_bytes);
initialize_body(obj, index, hdr_size_in_bytes, t1, t2);
initialize_body(obj, index, hdr_size_in_bytes, t1);
} else if (con_size_in_bytes <= threshold) {
// use explicit null stores
int i = hdr_size_in_bytes;
if (i < con_size_in_bytes && (con_size_in_bytes % (2 * BytesPerWord))) {
str(zr, Address(obj, i));
i += BytesPerWord;
}
for (; i < con_size_in_bytes; i += 2 * BytesPerWord)
stp(zr, zr, Address(obj, i));
} else if (con_size_in_bytes > hdr_size_in_bytes) {
con_size_in_bytes -= hdr_size_in_bytes;
lea(t1, Address(obj, hdr_size_in_bytes));
zero_words(t1, con_size_in_bytes / BytesPerWord);
block_comment("zero memory");
// use loop to null out the fields
int words = (con_size_in_bytes - hdr_size_in_bytes) / BytesPerWord;
mov(index, words / 8);
const int unroll = 8; // Number of str(zr) instructions we'll unroll
int remainder = words % unroll;
lea(rscratch1, Address(obj, hdr_size_in_bytes + remainder * BytesPerWord));
Label entry_point, loop;
b(entry_point);
bind(loop);
sub(index, index, 1);
for (int i = -unroll; i < 0; i++) {
if (-i == remainder)
bind(entry_point);
str(zr, Address(rscratch1, i * wordSize));
}
if (remainder == 0)
bind(entry_point);
add(rscratch1, rscratch1, unroll * wordSize);
cbnz(index, loop);
}
}
@@ -264,7 +314,8 @@ void C1_MacroAssembler::allocate_array(Register obj, Register len, Register t1,
initialize_header(obj, klass, len, t1, t2);
// clear rest of allocated space
initialize_body(obj, arr_size, header_size * BytesPerWord, t1, t2);
const Register len_zero = len;
initialize_body(obj, arr_size, header_size * BytesPerWord, len_zero);
membar(StoreStore);

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2021, Red Hat Inc. All rights reserved.
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2015, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -48,7 +48,7 @@ using MacroAssembler::null_check;
);
void initialize_header(Register obj, Register klass, Register len, Register t1, Register t2);
void initialize_body(Register obj, Register len_in_bytes, int hdr_size_in_bytes, Register t1, Register t2);
void initialize_body(Register obj, Register len_in_bytes, int hdr_size_in_bytes, Register t1);
void float_cmp(bool is_float, int unordered_result,
FloatRegister f0, FloatRegister f1,
@@ -58,8 +58,9 @@ using MacroAssembler::null_check;
// hdr : must be r0, contents destroyed
// obj : must point to the object to lock, contents preserved
// disp_hdr: must point to the displaced header location, contents preserved
// scratch : scratch register, contents destroyed
// returns code offset at which to add null check debug information
int lock_object (Register swap, Register obj, Register disp_hdr, Label& slow_case);
int lock_object (Register swap, Register obj, Register disp_hdr, Register scratch, Label& slow_case);
// unlocking
// hdr : contents destroyed

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2021, Red Hat Inc. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -656,9 +656,9 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
if ((id == fast_new_instance_id || id == fast_new_instance_init_check_id) &&
!UseTLAB && Universe::heap()->supports_inline_contig_alloc()) {
Label slow_path;
Register obj_size = r19;
Register t1 = r10;
Register t2 = r11;
Register obj_size = r2;
Register t1 = r19;
Register t2 = r4;
assert_different_registers(klass, obj, obj_size, t1, t2);
__ stp(r19, zr, Address(__ pre(sp, -2 * wordSize)));
@@ -769,9 +769,9 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
// allocations.
// Otherwise, just go to the slow path.
if (!UseTLAB && Universe::heap()->supports_inline_contig_alloc()) {
Register arr_size = r5;
Register t1 = r10;
Register t2 = r11;
Register arr_size = r4;
Register t1 = r2;
Register t2 = r5;
Label slow_path;
assert_different_registers(length, klass, obj, arr_size, t1, t2);
@@ -801,7 +801,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
__ andr(t1, t1, Klass::_lh_header_size_mask);
__ sub(arr_size, arr_size, t1); // body length
__ add(t1, t1, obj); // body start
__ initialize_body(t1, arr_size, 0, t1, t2);
__ initialize_body(t1, arr_size, 0, t2);
__ membar(Assembler::StoreStore);
__ verify_oop(obj);

View File

@@ -540,75 +540,6 @@ void C2_MacroAssembler::string_indexof_char(Register str1, Register cnt1,
BIND(DONE);
}
void C2_MacroAssembler::string_indexof_char_sve(Register str1, Register cnt1,
Register ch, Register result,
FloatRegister ztmp1,
FloatRegister ztmp2,
PRegister tmp_pg,
PRegister tmp_pdn, bool isL)
{
// Note that `tmp_pdn` should *NOT* be used as governing predicate register.
assert(tmp_pg->is_governing(),
"this register has to be a governing predicate register");
Label LOOP, MATCH, DONE, NOMATCH;
Register vec_len = rscratch1;
Register idx = rscratch2;
SIMD_RegVariant T = (isL == true) ? B : H;
cbz(cnt1, NOMATCH);
// Assign the particular char throughout the vector.
sve_dup(ztmp2, T, ch);
if (isL) {
sve_cntb(vec_len);
} else {
sve_cnth(vec_len);
}
mov(idx, 0);
// Generate a predicate to control the reading of input string.
sve_whilelt(tmp_pg, T, idx, cnt1);
BIND(LOOP);
// Read a vector of 8- or 16-bit data depending on the string type. Note
// that inactive elements indicated by the predicate register won't cause
// a data read from memory to the destination vector.
if (isL) {
sve_ld1b(ztmp1, T, tmp_pg, Address(str1, idx));
} else {
sve_ld1h(ztmp1, T, tmp_pg, Address(str1, idx, Address::lsl(1)));
}
add(idx, idx, vec_len);
// Perform the comparison. An element of the destination predicate is set
// to active if the particular char is matched.
sve_cmpeq(tmp_pdn, T, tmp_pg, ztmp1, ztmp2);
// Branch if the particular char is found.
br(NE, MATCH);
sve_whilelt(tmp_pg, T, idx, cnt1);
// Loop back if the particular char not found.
br(MI, LOOP);
BIND(NOMATCH);
mov(result, -1);
b(DONE);
BIND(MATCH);
// Undo the index increment.
sub(idx, idx, vec_len);
// Crop the vector to find its location.
sve_brka(tmp_pdn, tmp_pg, tmp_pdn, false /* isMerge */);
add(result, idx, -1);
sve_incp(result, T, tmp_pdn);
BIND(DONE);
}
void C2_MacroAssembler::stringL_indexof_char(Register str1, Register cnt1,
Register ch, Register result,
Register tmp1, Register tmp2, Register tmp3)

View File

@@ -46,13 +46,8 @@
Register tmp1, Register tmp2, Register tmp3);
void stringL_indexof_char(Register str1, Register cnt1,
Register ch, Register result,
Register tmp1, Register tmp2, Register tmp3);
void string_indexof_char_sve(Register str1, Register cnt1,
Register ch, Register result,
FloatRegister ztmp1, FloatRegister ztmp2,
PRegister pgtmp, PRegister ptmp, bool isL);
Register ch, Register result,
Register tmp1, Register tmp2, Register tmp3);
// SIMD&FP comparison
void neon_compare(FloatRegister dst, BasicType bt, FloatRegister src1,

View File

@@ -45,18 +45,17 @@ bool ABIDescriptor::is_volatile_reg(FloatRegister reg) const {
const ABIDescriptor ForeignGlobals::parse_abi_descriptor_impl(jobject jabi) const {
oop abi_oop = JNIHandles::resolve_non_null(jabi);
ABIDescriptor abi;
const Register (*to_Register)(int) = as_Register;
objArrayOop inputStorage = cast<objArrayOop>(abi_oop->obj_field(ABI.inputStorage_offset));
loadArray(inputStorage, INTEGER_TYPE, abi._integer_argument_registers, to_Register);
loadArray(inputStorage, INTEGER_TYPE, abi._integer_argument_registers, as_Register);
loadArray(inputStorage, VECTOR_TYPE, abi._vector_argument_registers, as_FloatRegister);
objArrayOop outputStorage = cast<objArrayOop>(abi_oop->obj_field(ABI.outputStorage_offset));
loadArray(outputStorage, INTEGER_TYPE, abi._integer_return_registers, to_Register);
loadArray(outputStorage, INTEGER_TYPE, abi._integer_return_registers, as_Register);
loadArray(outputStorage, VECTOR_TYPE, abi._vector_return_registers, as_FloatRegister);
objArrayOop volatileStorage = cast<objArrayOop>(abi_oop->obj_field(ABI.volatileStorage_offset));
loadArray(volatileStorage, INTEGER_TYPE, abi._integer_additional_volatile_registers, to_Register);
loadArray(volatileStorage, INTEGER_TYPE, abi._integer_additional_volatile_registers, as_Register);
loadArray(volatileStorage, VECTOR_TYPE, abi._vector_additional_volatile_registers, as_FloatRegister);
abi._stack_alignment_bytes = abi_oop->int_field(ABI.stackAlignment_offset);

View File

@@ -362,7 +362,7 @@ frame frame::sender_for_entry_frame(RegisterMap* map) const {
return fr;
}
OptimizedEntryBlob::FrameData* OptimizedEntryBlob::frame_data_for_frame(const frame& frame) const {
JavaFrameAnchor* OptimizedEntryBlob::jfa_for_frame(const frame& frame) const {
ShouldNotCallThis();
return nullptr;
}
@@ -814,6 +814,7 @@ frame::frame(void* sp, void* fp, void* pc) {
init((intptr_t*)sp, (intptr_t*)fp, (address)pc);
}
void frame::pd_ps() {}
#endif
void JavaFrameAnchor::make_walkable(JavaThread* thread) {

View File

@@ -236,20 +236,14 @@ inline JavaCallWrapper** frame::entry_frame_call_wrapper_addr() const {
// Compiled frames
inline oop frame::saved_oop_result(RegisterMap* map) const {
PRAGMA_DIAG_PUSH
PRAGMA_NONNULL_IGNORED
oop* result_adr = (oop *)map->location(r0->as_VMReg());
PRAGMA_DIAG_POP
guarantee(result_adr != NULL, "bad register save location");
return (*result_adr);
}
inline void frame::set_saved_oop_result(RegisterMap* map, oop obj) {
PRAGMA_DIAG_PUSH
PRAGMA_NONNULL_IGNORED
oop* result_adr = (oop *)map->location(r0->as_VMReg());
PRAGMA_DIAG_POP
guarantee(result_adr != NULL, "bad register save location");
*result_adr = obj;

View File

@@ -343,7 +343,7 @@ void G1BarrierSetAssembler::gen_pre_barrier_stub(LIR_Assembler* ce, G1PreBarrier
Register pre_val_reg = stub->pre_val()->as_register();
if (stub->do_load()) {
ce->mem2reg(stub->addr(), stub->pre_val(), T_OBJECT, stub->patch_code(), stub->info(), false /*wide*/);
ce->mem2reg(stub->addr(), stub->pre_val(), T_OBJECT, stub->patch_code(), stub->info(), false /*wide*/, false /*unaligned*/);
}
__ cbz(pre_val_reg, *stub->continuation());
ce->store_parameter(stub->pre_val()->as_register(), 0);

View File

@@ -116,7 +116,7 @@ void BarrierSetNMethod::deoptimize(nmethod* nm, address* return_address_ptr) {
log_trace(nmethod, barrier)("deoptimize(nmethod: %s(%p), return_addr: %p, osr: %d, thread: %p(%s), making rsp: %p) -> %p",
nm->method()->name_and_sig_as_C_string(),
nm, *(address *) return_address_ptr, nm->is_osr_method(), thread,
thread->name(), frame.sp(), nm->verified_entry_point());
thread->get_thread_name(), frame.sp(), nm->verified_entry_point());
}
new_frame->sp = frame.sp();

View File

@@ -613,7 +613,7 @@ void ShenandoahBarrierSetAssembler::gen_pre_barrier_stub(LIR_Assembler* ce, Shen
Register pre_val_reg = stub->pre_val()->as_register();
if (stub->do_load()) {
ce->mem2reg(stub->addr(), stub->pre_val(), T_OBJECT, stub->patch_code(), stub->info(), false /*wide*/);
ce->mem2reg(stub->addr(), stub->pre_val(), T_OBJECT, stub->patch_code(), stub->info(), false /*wide*/, false /*unaligned*/);
}
__ cbz(pre_val_reg, *stub->continuation());
ce->store_parameter(stub->pre_val()->as_register(), 0);

View File

@@ -39,6 +39,7 @@ define_pd_global(bool, UncommonNullCast, true); // Uncommon-trap NULLs
define_pd_global(uintx, CodeCacheSegmentSize, 64 COMPILER1_AND_COMPILER2_PRESENT(+64)); // Tiered compilation has large code-entry alignment.
define_pd_global(intx, CodeEntryAlignment, 64);
define_pd_global(intx, OptoLoopAlignment, 16);
define_pd_global(intx, InlineFrequencyCount, 100);
#define DEFAULT_STACK_YELLOW_PAGES (2)
#define DEFAULT_STACK_RED_PAGES (1)

View File

@@ -39,6 +39,7 @@
#include "prims/jvmtiExport.hpp"
#include "prims/jvmtiThreadState.hpp"
#include "runtime/basicLock.hpp"
#include "runtime/biasedLocking.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/safepointMechanism.hpp"
#include "runtime/sharedRuntime.hpp"
@@ -753,6 +754,10 @@ void InterpreterMacroAssembler::lock_object(Register lock_reg)
br(Assembler::NE, slow_case);
}
if (UseBiasedLocking) {
biased_locking_enter(lock_reg, obj_reg, swap_reg, tmp, false, done, &slow_case);
}
// Load (object->mark() | 1) into swap_reg
ldr(rscratch1, Address(obj_reg, oopDesc::mark_offset_in_bytes()));
orr(swap_reg, rscratch1, 1);
@@ -764,7 +769,17 @@ void InterpreterMacroAssembler::lock_object(Register lock_reg)
"displached header must be first word in BasicObjectLock");
Label fail;
cmpxchg_obj_header(swap_reg, lock_reg, obj_reg, rscratch1, done, /*fallthrough*/NULL);
if (PrintBiasedLockingStatistics) {
Label fast;
cmpxchg_obj_header(swap_reg, lock_reg, obj_reg, rscratch1, fast, &fail);
bind(fast);
atomic_incw(Address((address)BiasedLocking::fast_path_entry_count_addr()),
rscratch2, rscratch1, tmp);
b(done);
bind(fail);
} else {
cmpxchg_obj_header(swap_reg, lock_reg, obj_reg, rscratch1, done, /*fallthrough*/NULL);
}
// Fast check for recursive lock.
//
@@ -801,6 +816,12 @@ void InterpreterMacroAssembler::lock_object(Register lock_reg)
// Save the test result, for recursive case, the result is zero
str(swap_reg, Address(lock_reg, mark_offset));
if (PrintBiasedLockingStatistics) {
br(Assembler::NE, slow_case);
atomic_incw(Address((address)BiasedLocking::fast_path_entry_count_addr()),
rscratch2, rscratch1, tmp);
}
br(Assembler::EQ, done);
bind(slow_case);
@@ -851,6 +872,10 @@ void InterpreterMacroAssembler::unlock_object(Register lock_reg)
// Free entry
str(zr, Address(lock_reg, BasicObjectLock::obj_offset_in_bytes()));
if (UseBiasedLocking) {
biased_locking_exit(obj_reg, header_reg, done);
}
// Load the old header from BasicLock structure
ldr(header_reg, Address(swap_reg,
BasicLock::displaced_header_offset_in_bytes()));

View File

@@ -37,7 +37,6 @@
#include "gc/shared/tlab_globals.hpp"
#include "interpreter/bytecodeHistogram.hpp"
#include "interpreter/interpreter.hpp"
#include "compiler/compileTask.hpp"
#include "compiler/disassembler.hpp"
#include "memory/resourceArea.hpp"
#include "memory/universe.hpp"
@@ -45,6 +44,7 @@
#include "oops/accessDecorators.hpp"
#include "oops/compressedOops.inline.hpp"
#include "oops/klass.inline.hpp"
#include "runtime/biasedLocking.hpp"
#include "runtime/icache.hpp"
#include "runtime/interfaceSupport.inline.hpp"
#include "runtime/jniHandles.inline.hpp"
@@ -442,6 +442,178 @@ void MacroAssembler::reserved_stack_check() {
bind(no_reserved_zone_enabling);
}
void MacroAssembler::biased_locking_enter(Register lock_reg,
Register obj_reg,
Register swap_reg,
Register tmp_reg,
bool swap_reg_contains_mark,
Label& done,
Label* slow_case,
BiasedLockingCounters* counters) {
assert(UseBiasedLocking, "why call this otherwise?");
assert_different_registers(lock_reg, obj_reg, swap_reg);
if (PrintBiasedLockingStatistics && counters == NULL)
counters = BiasedLocking::counters();
assert_different_registers(lock_reg, obj_reg, swap_reg, tmp_reg, rscratch1, rscratch2, noreg);
assert(markWord::age_shift == markWord::lock_bits + markWord::biased_lock_bits, "biased locking makes assumptions about bit layout");
Address mark_addr (obj_reg, oopDesc::mark_offset_in_bytes());
Address klass_addr (obj_reg, oopDesc::klass_offset_in_bytes());
Address saved_mark_addr(lock_reg, 0);
// Biased locking
// See whether the lock is currently biased toward our thread and
// whether the epoch is still valid
// Note that the runtime guarantees sufficient alignment of JavaThread
// pointers to allow age to be placed into low bits
// First check to see whether biasing is even enabled for this object
Label cas_label;
if (!swap_reg_contains_mark) {
ldr(swap_reg, mark_addr);
}
andr(tmp_reg, swap_reg, markWord::biased_lock_mask_in_place);
cmp(tmp_reg, (u1)markWord::biased_lock_pattern);
br(Assembler::NE, cas_label);
// The bias pattern is present in the object's header. Need to check
// whether the bias owner and the epoch are both still current.
load_prototype_header(tmp_reg, obj_reg);
orr(tmp_reg, tmp_reg, rthread);
eor(tmp_reg, swap_reg, tmp_reg);
andr(tmp_reg, tmp_reg, ~((int) markWord::age_mask_in_place));
if (counters != NULL) {
Label around;
cbnz(tmp_reg, around);
atomic_incw(Address((address)counters->biased_lock_entry_count_addr()), tmp_reg, rscratch1, rscratch2);
b(done);
bind(around);
} else {
cbz(tmp_reg, done);
}
Label try_revoke_bias;
Label try_rebias;
// At this point we know that the header has the bias pattern and
// that we are not the bias owner in the current epoch. We need to
// figure out more details about the state of the header in order to
// know what operations can be legally performed on the object's
// header.
// If the low three bits in the xor result aren't clear, that means
// the prototype header is no longer biased and we have to revoke
// the bias on this object.
andr(rscratch1, tmp_reg, markWord::biased_lock_mask_in_place);
cbnz(rscratch1, try_revoke_bias);
// Biasing is still enabled for this data type. See whether the
// epoch of the current bias is still valid, meaning that the epoch
// bits of the mark word are equal to the epoch bits of the
// prototype header. (Note that the prototype header's epoch bits
// only change at a safepoint.) If not, attempt to rebias the object
// toward the current thread. Note that we must be absolutely sure
// that the current epoch is invalid in order to do this because
// otherwise the manipulations it performs on the mark word are
// illegal.
andr(rscratch1, tmp_reg, markWord::epoch_mask_in_place);
cbnz(rscratch1, try_rebias);
// The epoch of the current bias is still valid but we know nothing
// about the owner; it might be set or it might be clear. Try to
// acquire the bias of the object using an atomic operation. If this
// fails we will go in to the runtime to revoke the object's bias.
// Note that we first construct the presumed unbiased header so we
// don't accidentally blow away another thread's valid bias.
{
Label here;
mov(rscratch1, markWord::biased_lock_mask_in_place | markWord::age_mask_in_place | markWord::epoch_mask_in_place);
andr(swap_reg, swap_reg, rscratch1);
orr(tmp_reg, swap_reg, rthread);
cmpxchg_obj_header(swap_reg, tmp_reg, obj_reg, rscratch1, here, slow_case);
// If the biasing toward our thread failed, this means that
// another thread succeeded in biasing it toward itself and we
// need to revoke that bias. The revocation will occur in the
// interpreter runtime in the slow case.
bind(here);
if (counters != NULL) {
atomic_incw(Address((address)counters->anonymously_biased_lock_entry_count_addr()),
tmp_reg, rscratch1, rscratch2);
}
}
b(done);
bind(try_rebias);
// At this point we know the epoch has expired, meaning that the
// current "bias owner", if any, is actually invalid. Under these
// circumstances _only_, we are allowed to use the current header's
// value as the comparison value when doing the cas to acquire the
// bias in the current epoch. In other words, we allow transfer of
// the bias from one thread to another directly in this situation.
//
// FIXME: due to a lack of registers we currently blow away the age
// bits in this situation. Should attempt to preserve them.
{
Label here;
load_prototype_header(tmp_reg, obj_reg);
orr(tmp_reg, rthread, tmp_reg);
cmpxchg_obj_header(swap_reg, tmp_reg, obj_reg, rscratch1, here, slow_case);
// If the biasing toward our thread failed, then another thread
// succeeded in biasing it toward itself and we need to revoke that
// bias. The revocation will occur in the runtime in the slow case.
bind(here);
if (counters != NULL) {
atomic_incw(Address((address)counters->rebiased_lock_entry_count_addr()),
tmp_reg, rscratch1, rscratch2);
}
}
b(done);
bind(try_revoke_bias);
// The prototype mark in the klass doesn't have the bias bit set any
// more, indicating that objects of this data type are not supposed
// to be biased any more. We are going to try to reset the mark of
// this object to the prototype value and fall through to the
// CAS-based locking scheme. Note that if our CAS fails, it means
// that another thread raced us for the privilege of revoking the
// bias of this particular object, so it's okay to continue in the
// normal locking code.
//
// FIXME: due to a lack of registers we currently blow away the age
// bits in this situation. Should attempt to preserve them.
{
Label here, nope;
load_prototype_header(tmp_reg, obj_reg);
cmpxchg_obj_header(swap_reg, tmp_reg, obj_reg, rscratch1, here, &nope);
bind(here);
// Fall through to the normal CAS-based lock, because no matter what
// the result of the above CAS, some thread must have succeeded in
// removing the bias bit from the object's header.
if (counters != NULL) {
atomic_incw(Address((address)counters->revoked_lock_entry_count_addr()), tmp_reg,
rscratch1, rscratch2);
}
bind(nope);
}
bind(cas_label);
}
void MacroAssembler::biased_locking_exit(Register obj_reg, Register temp_reg, Label& done) {
assert(UseBiasedLocking, "why call this otherwise?");
// Check for biased locking unlock case, which is a no-op
// Note: we do not have to check the thread ID for two reasons.
// First, the interpreter checks for IllegalMonitorStateException at
// a higher level. Second, if the bias was revoked while we held the
// lock, the object could not be rebiased toward another thread, so
// the bias bit would be clear.
ldr(temp_reg, Address(obj_reg, oopDesc::mark_offset_in_bytes()));
andr(temp_reg, temp_reg, markWord::biased_lock_mask_in_place);
cmp(temp_reg, (u1)markWord::biased_lock_pattern);
br(Assembler::EQ, done);
}
static void pass_arg0(MacroAssembler* masm, Register arg) {
if (c_rarg0 != arg ) {
masm->mov(c_rarg0, arg);
@@ -3663,6 +3835,11 @@ void MacroAssembler::cmp_klass(Register oop, Register trial_klass, Register tmp)
cmp(trial_klass, tmp);
}
void MacroAssembler::load_prototype_header(Register dst, Register src) {
load_klass(dst, src);
ldr(dst, Address(dst, Klass::prototype_header_offset()));
}
void MacroAssembler::store_klass(Register dst, Register src) {
// FIXME: Should this be a store release? concurrent gcs assumes
// klass length is valid if klass field is not null.
@@ -4089,6 +4266,68 @@ void MacroAssembler::eden_allocate(Register obj,
bs->eden_allocate(this, obj, var_size_in_bytes, con_size_in_bytes, t1, slow_case);
}
// Zero words; len is in bytes
// Destroys all registers except addr
// len must be a nonzero multiple of wordSize
void MacroAssembler::zero_memory(Register addr, Register len, Register t1) {
assert_different_registers(addr, len, t1, rscratch1, rscratch2);
#ifdef ASSERT
{ Label L;
tst(len, BytesPerWord - 1);
br(Assembler::EQ, L);
stop("len is not a multiple of BytesPerWord");
bind(L);
}
#endif
#ifndef PRODUCT
block_comment("zero memory");
#endif
Label loop;
Label entry;
// Algorithm:
//
// scratch1 = cnt & 7;
// cnt -= scratch1;
// p += scratch1;
// switch (scratch1) {
// do {
// cnt -= 8;
// p[-8] = 0;
// case 7:
// p[-7] = 0;
// case 6:
// p[-6] = 0;
// // ...
// case 1:
// p[-1] = 0;
// case 0:
// p += 8;
// } while (cnt);
// }
const int unroll = 8; // Number of str(zr) instructions we'll unroll
lsr(len, len, LogBytesPerWord);
andr(rscratch1, len, unroll - 1); // tmp1 = cnt % unroll
sub(len, len, rscratch1); // cnt -= unroll
// t1 always points to the end of the region we're about to zero
add(t1, addr, rscratch1, Assembler::LSL, LogBytesPerWord);
adr(rscratch2, entry);
sub(rscratch2, rscratch2, rscratch1, Assembler::LSL, 2);
br(rscratch2);
bind(loop);
sub(len, len, unroll);
for (int i = -unroll; i < 0; i++)
Assembler::str(zr, Address(t1, i * wordSize));
bind(entry);
add(t1, t1, unroll * wordSize);
cbnz(len, loop);
}
void MacroAssembler::verify_tlab() {
#ifdef ASSERT
if (UseTLAB && VerifyOops) {
@@ -4607,11 +4846,10 @@ void MacroAssembler::string_equals(Register a1, Register a2,
// handle anything smaller than this ourselves in zero_words().
const int MacroAssembler::zero_words_block_size = 8;
// zero_words() is used by C2 ClearArray patterns and by
// C1_MacroAssembler. It is as small as possible, handling small word
// counts locally and delegating anything larger to the zero_blocks
// stub. It is expanded many times in compiled code, so it is
// important to keep it short.
// zero_words() is used by C2 ClearArray patterns. It is as small as
// possible, handling small word counts locally and delegating
// anything larger to the zero_blocks stub. It is expanded many times
// in compiled code, so it is important to keep it short.
// ptr: Address of a buffer to be zeroed.
// cnt: Count in HeapWords.
@@ -4620,46 +4858,32 @@ const int MacroAssembler::zero_words_block_size = 8;
address MacroAssembler::zero_words(Register ptr, Register cnt)
{
assert(is_power_of_2(zero_words_block_size), "adjust this");
assert(ptr == r10 && cnt == r11, "mismatch in register usage");
BLOCK_COMMENT("zero_words {");
assert(ptr == r10 && cnt == r11, "mismatch in register usage");
RuntimeAddress zero_blocks = RuntimeAddress(StubRoutines::aarch64::zero_blocks());
assert(zero_blocks.target() != NULL, "zero_blocks stub has not been generated");
subs(rscratch1, cnt, zero_words_block_size);
cmp(cnt, (u1)zero_words_block_size);
Label around;
br(LO, around);
{
RuntimeAddress zero_blocks = RuntimeAddress(StubRoutines::aarch64::zero_blocks());
assert(zero_blocks.target() != NULL, "zero_blocks stub has not been generated");
// Make sure this is a C2 compilation. C1 allocates space only for
// trampoline stubs generated by Call LIR ops, and in any case it
// makes sense for a C1 compilation task to proceed as quickly as
// possible.
CompileTask* task;
if (StubRoutines::aarch64::complete()
&& Thread::current()->is_Compiler_thread()
&& (task = ciEnv::current()->task())
&& is_c2_compile(task->comp_level())) {
if (StubRoutines::aarch64::complete()) {
address tpc = trampoline_call(zero_blocks);
if (tpc == NULL) {
DEBUG_ONLY(reset_labels(around));
assert(false, "failed to allocate space for trampoline");
postcond(pc() == badAddress);
return NULL;
}
} else {
far_call(zero_blocks);
bl(zero_blocks);
}
}
bind(around);
// We have a few words left to do. zero_blocks has adjusted r10 and r11
// for us.
for (int i = zero_words_block_size >> 1; i > 1; i >>= 1) {
Label l;
tbz(cnt, exact_log2(i), l);
for (int j = 0; j < i; j += 2) {
stp(zr, zr, post(ptr, 2 * BytesPerWord));
stp(zr, zr, post(ptr, 16));
}
bind(l);
}
@@ -4669,56 +4893,46 @@ address MacroAssembler::zero_words(Register ptr, Register cnt)
str(zr, Address(ptr));
bind(l);
}
BLOCK_COMMENT("} zero_words");
postcond(pc() != badAddress);
return pc();
}
// base: Address of a buffer to be zeroed, 8 bytes aligned.
// cnt: Immediate count in HeapWords.
//
// r10, r11, rscratch1, and rscratch2 are clobbered.
#define SmallArraySize (18 * BytesPerLong)
void MacroAssembler::zero_words(Register base, uint64_t cnt)
{
guarantee(zero_words_block_size < BlockZeroingLowLimit,
"increase BlockZeroingLowLimit");
if (cnt <= (uint64_t)BlockZeroingLowLimit / BytesPerWord) {
#ifndef PRODUCT
{
char buf[64];
snprintf(buf, sizeof buf, "zero_words (count = %" PRIu64 ") {", cnt);
BLOCK_COMMENT(buf);
}
#endif
if (cnt >= 16) {
uint64_t loops = cnt/16;
if (loops > 1) {
mov(rscratch2, loops - 1);
}
{
Label loop;
bind(loop);
for (int i = 0; i < 16; i += 2) {
stp(zr, zr, Address(base, i * BytesPerWord));
}
add(base, base, 16 * BytesPerWord);
if (loops > 1) {
subs(rscratch2, rscratch2, 1);
br(GE, loop);
}
}
}
cnt %= 16;
int i = cnt & 1; // store any odd word to start
if (i) str(zr, Address(base));
BLOCK_COMMENT("zero_words {");
int i = cnt & 1; // store any odd word to start
if (i) str(zr, Address(base));
if (cnt <= SmallArraySize / BytesPerLong) {
for (; i < (int)cnt; i += 2) {
stp(zr, zr, Address(base, i * wordSize));
}
BLOCK_COMMENT("} zero_words");
} else {
mov(r10, base); mov(r11, cnt);
zero_words(r10, r11);
const int unroll = 4; // Number of stp(zr, zr) instructions we'll unroll
int remainder = cnt % (2 * unroll);
for (; i < remainder; i += 2) {
stp(zr, zr, Address(base, i * wordSize));
}
Label loop;
Register cnt_reg = rscratch1;
Register loop_base = rscratch2;
cnt = cnt - remainder;
mov(cnt_reg, cnt);
// adjust base and prebias by -2 * wordSize so we can pre-increment
add(loop_base, base, (remainder - 2) * wordSize);
bind(loop);
sub(cnt_reg, cnt_reg, 2 * unroll);
for (i = 1; i < unroll; i++) {
stp(zr, zr, Address(loop_base, 2 * i * wordSize));
}
stp(zr, zr, Address(pre(loop_base, 2 * unroll * wordSize)));
cbnz(cnt_reg, loop);
}
BLOCK_COMMENT("} zero_words");
}
// Zero blocks of memory by using DC ZVA.
@@ -4773,37 +4987,23 @@ void MacroAssembler::fill_words(Register base, Register cnt, Register value)
{
// Algorithm:
//
// if (cnt == 0) {
// return;
// }
// if ((p & 8) != 0) {
// *p++ = v;
// }
//
// scratch1 = cnt & 14;
// scratch1 = cnt & 7;
// cnt -= scratch1;
// p += scratch1;
// switch (scratch1 / 2) {
// switch (scratch1) {
// do {
// cnt -= 16;
// p[-16] = v;
// p[-15] = v;
// cnt -= 8;
// p[-8] = v;
// case 7:
// p[-14] = v;
// p[-13] = v;
// p[-7] = v;
// case 6:
// p[-12] = v;
// p[-11] = v;
// p[-6] = v;
// // ...
// case 1:
// p[-2] = v;
// p[-1] = v;
// case 0:
// p += 16;
// p += 8;
// } while (cnt);
// }
// if ((cnt & 1) == 1) {
// *p++ = v;
// }
assert_different_registers(base, cnt, value, rscratch1, rscratch2);

View File

@@ -105,6 +105,20 @@ class MacroAssembler: public Assembler {
void safepoint_poll(Label& slow_path, bool at_return, bool acquire, bool in_nmethod);
// Biased locking support
// lock_reg and obj_reg must be loaded up with the appropriate values.
// swap_reg is killed.
// tmp_reg must be supplied and must not be rscratch1 or rscratch2
// Optional slow case is for implementations (interpreter and C1) which branch to
// slow case directly. Leaves condition codes set for C2's Fast_Lock node.
void biased_locking_enter(Register lock_reg, Register obj_reg,
Register swap_reg, Register tmp_reg,
bool swap_reg_contains_mark,
Label& done, Label* slow_case = NULL,
BiasedLockingCounters* counters = NULL);
void biased_locking_exit (Register obj_reg, Register temp_reg, Label& done);
// Helper functions for statistics gathering.
// Unconditional atomic increment.
void atomic_incw(Register counter_addr, Register tmp, Register tmp2);
@@ -833,6 +847,8 @@ public:
// stored using routines that take a jobject.
void store_heap_oop_null(Address dst);
void load_prototype_header(Register dst, Register src);
void store_klass_gap(Register dst, Register src);
// This dummy is to prevent a call to store_heap_oop from
@@ -888,6 +904,7 @@ public:
Register t2, // temp register
Label& slow_case // continuation point if fast allocation fails
);
void zero_memory(Register addr, Register len, Register t1);
void verify_tlab();
// interface method calling

View File

@@ -1,5 +1,5 @@
/* Copyright (c) 2018, Cavium. All rights reserved. (By BELLSOFT)
* Copyright (c) 2016, 2021, Intel Corporation. All rights reserved.
* Copyright (c) 2016, Intel Corporation.
* Intel Math Library (LIBM) Source Code
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.

View File

@@ -138,11 +138,6 @@
return false;
}
// Does the CPU supports vector constant rotate instructions?
static constexpr bool supports_vector_constant_rotates(int shift) {
return false;
}
// Does the CPU supports vector unsigned comparison instructions?
static const bool supports_vector_comparison_unsigned(int vlen, BasicType bt) {
// Not supported on SVE yet.

View File

@@ -22,8 +22,8 @@
*
*/
#ifndef CPU_AARCH64_PAUTH_AARCH64_HPP
#define CPU_AARCH64_PAUTH_AARCH64_HPP
#ifndef CPU_AARCH64_PAUTH_AARCH64_INLINE_HPP
#define CPU_AARCH64_PAUTH_AARCH64_INLINE_HPP
#include OS_CPU_HEADER_INLINE(pauth)
@@ -32,4 +32,4 @@ inline bool pauth_ptr_is_raw(address ptr) {
return ptr == pauth_strip_pointer(ptr);
}
#endif // CPU_AARCH64_PAUTH_AARCH64_HPP
#endif // CPU_AARCH64_PAUTH_AARCH64_INLINE_HPP

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -36,7 +36,7 @@ typedef VMRegImpl* VMReg;
class RegisterImpl;
typedef RegisterImpl* Register;
inline const Register as_Register(int encoding) {
inline Register as_Register(int encoding) {
return (Register)(intptr_t) encoding;
}
@@ -53,7 +53,7 @@ class RegisterImpl: public AbstractRegisterImpl {
Register successor() const { return as_Register(encoding() + 1); }
// construction
inline friend const Register as_Register(int encoding);
inline friend Register as_Register(int encoding);
VMReg as_VMReg();
@@ -242,7 +242,6 @@ class PRegisterImpl: public AbstractRegisterImpl {
public:
enum {
number_of_registers = 16,
number_of_governing_registers = 8,
max_slots_per_register = 1
};
@@ -258,7 +257,6 @@ class PRegisterImpl: public AbstractRegisterImpl {
int encoding() const { assert(is_valid(), "invalid register"); return (intptr_t)this; }
int encoding_nocheck() const { return (intptr_t)this; }
bool is_valid() const { return 0 <= (intptr_t)this && (intptr_t)this < number_of_registers; }
bool is_governing() const { return 0 <= (intptr_t)this && (intptr_t)this < number_of_governing_registers; }
const char* name() const;
};
@@ -422,8 +420,4 @@ inline FloatRegister AbstractRegSet<FloatRegister>::first() {
return first ? as_FloatRegister(exact_log2(first)) : fnoreg;
}
inline Register as_Register(FloatRegister reg) {
return as_Register(reg->encoding());
}
#endif // CPU_AARCH64_REGISTER_AARCH64_HPP

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