Compare commits

..

381 Commits

Author SHA1 Message Date
Anton Tarasov
ac7c8f9e1a JBR-3413 use timeout in CAccessibility.invokeAndWait 2021-06-22 16:01:57 +03:00
Anton Tarasov
c3d4a025c2 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-22 12:24:06 +03:00
Anton Tarasov
31d1975698 JBR-2872 improve: JBR-2866 JCEF: Markdown editor steals focus from a different frame
(cherry picked from commit bad748e3d0)
2021-06-22 12:24:05 +03:00
Anton Tarasov
dabeac2f2b JBR-2866 JCEF: Markdown editor steals focus from a different frame 2021-06-22 12:24:04 +03:00
Anton Tarasov
917bd8d7a0 JBR-2645 enable CefBrowser.close(true) in jcef reg tests
(cherry picked from commit 492c217125)
2021-06-22 12:24:03 +03:00
Anton Tarasov
fb082283f7 JBR-2259 WebSite isn't loaded with .loadUrl method if browser isn't shown in UI
(cherry picked from commit 57bbddf071)
2021-06-22 12:24:02 +03:00
Anton Tarasov
92e60d45e7 JBR-2557 use com.jetbrains.cef.JCefAppConfig in JCEF tests
(cherry picked from commit e30a309f92)
2021-06-22 12:24:01 +03:00
Anton Tarasov
ac52411e43 JBR-2489 Git branch operations (switch to another branch, rebase) sometimes crash WebStorm 202.5428.27
(cherry picked from commit 81d2156fb1)
2021-06-22 12:24:00 +03:00
Anton Tarasov
31a10f7fd2 JBR-2282 [jcef] update to JCEF/80.0.4+g74f7b0c+chromium-80.0.3987.122
(cherry picked from commit a5adc725df)
2021-06-22 12:23:59 +03:00
Anton Tarasov
2a0d448dfe JBR-2305 jcef: jb/java/jcef/JCEFStartupTest.java throws java.lang.ExceptionInInitializerError
(cherry picked from commit f0385f01ec)
2021-06-22 12:23:58 +03:00
Anton Tarasov
d950b20e8e JBR-2306 jcef: jb/java/jcef/JCEFStartupTest.java unexpectedly exits with the exit code: 0
(cherry picked from commit ff7d7bd43c)
2021-06-22 12:23:58 +03:00
Anton Tarasov
028f07c602 JBR-2299 [mac] jcef requests for "chromium safe storage" keychain access
(cherry picked from commit dd1334a352)
2021-06-22 12:23:57 +03:00
Anton Tarasov
4d53c5c088 JBR-2222 Crash during closing IDE
(cherry picked from commit d0c367b31f)
2021-06-22 12:23:56 +03:00
Anton Tarasov
80e73ab764 JBR-2287 [jcef] add CefBrowser wrapper to jtreg tests
(cherry picked from commit fa961d1769)
2021-06-22 12:23:55 +03:00
Anton Tarasov
dc05876817 JBR-2169 AWTThreading: remove tracked invocation event from completion listener
(cherry picked from commit a855f3b835)
2021-06-22 12:23:54 +03:00
Anton Tarasov
a919eeb209 JBR-2159 Native crash in thread AWT-EventQueue-0 when trying to push commit
(cherry picked from commit bba297b4a4)
2021-06-22 12:23:53 +03:00
Anton Tarasov
c004fa0d40 JBR-2148 JCEF: JBR bundle has invalid app structure
(cherry picked from commit f45f84d7ed)
2021-06-22 12:23:52 +03:00
Anton Tarasov
643b5d9de3 JBR-2146 improve InvokeOnToolkitHelper to cover more generic case 2021-06-22 12:23:51 +03:00
Anton Tarasov
2d54aed52b JBR-2139 Idea freeze on dynamic plugin unloading
(cherry picked from commit e57bae4f66)
2021-06-18 22:02:14 +03:00
Anton Tarasov
0fae697d22 JBR-2099 jb/java/jcef/JCEFStartupTest.java fails on Windows, Linux
(cherry picked from commit 3dfb0aa16a)
2021-06-18 22:01:42 +03:00
Anton Tarasov
258a85c681 JBR-2093 create reg test for JCEF startup
(cherry picked from commit e8c2761f5b)
2021-06-18 22:01:17 +03:00
Anton Tarasov
1ac4a803b6 JBR-2082 Revealing taskbar does not work when "Automatically hide the taskbar"
(cherry picked from commit b31a41fb2f)
2021-06-18 22:00:48 +03:00
Maxim Kartashev
5f43886d2d fixup! JBR-1430 (8195129) Windows: use UTF16 version of Win32 API to load DLL 2021-06-18 18:03:18 +03:00
Alexey Ushakov
49dd17a4e6 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-18 11:40:34 +07:00
Artem Bochkarev
116eead3b9 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-18 07:06:58 +03:00
Kirill Kirichenko
061267777c JBR-1874 Cursor not changing from 'default' to 'text'. Additional fix after reopening.
(cherry picked from commit 5a29d4ade9)
2021-06-18 07:06:57 +03:00
Nikita Gubarkov
36f7b30e39 Add JBR-specific .idea project files 2021-06-18 07:06:55 +03:00
Nikita Gubarkov
203695b2ee Added Clion project setup 2021-06-18 07:06:54 +03:00
Nikita Gubarkov
4b07674296 Updated IDEA project setup 2021-06-18 07:06:53 +03:00
Elena Sayapina
bf05a32fc6 JBR-1388 [TESTBUG] Regression test java/awt/Graphics2D/DrawString/LCDTextSrcEa.java fails on macOS Mojave
(cherry picked from commit 50b24a147b)
2021-06-18 07:06:51 +03:00
Elena Sayapina
eaaefbe1c1 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-18 07:06:50 +03:00
Alexey Ushakov
31a581155b 8266079: Lanai: AlphaComposite shows differences on Metal compared to OpenGL
Implemented blit via compute kernel
2021-06-18 07:06:49 +03:00
Denis Konoplev
79541f23be fixup! macOS national keyboard support
Remove unused import that broke compilation
2021-06-18 07:06:48 +03:00
Elena Sayapina
4e6a98cca4 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-18 07:06:47 +03:00
Konstantin Aleev
f7335df557 fix memory leaks in AccessibleJTree
(cherry picked from commit 561a7b8def)
2021-06-18 07:06:46 +03:00
Elena Sayapina
3fc77cb4c8 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-18 07:06:45 +03:00
Mikhail Grishchenko
98bc748080 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-18 07:06:44 +03:00
Denis Konoplev
7a8979c91d JBR-2490 Add option to work with Surface Pen
(cherry picked from commit 5acc7680a1)
2021-06-18 07:06:43 +03:00
Denis Konoplev
98a23d141d JBR-2669: set unicode for both keyCode and extendedKeyCode
(cherry picked from commit ba3f14c83a)
2021-06-18 07:06:42 +03:00
Denis Konoplev
22063f0c17 JBR-2554: Proper unicode values in KeyEvent.keyCode
(cherry picked from commit 703d77a927)
2021-06-18 07:06:40 +03:00
Denis Konoplev
ee4557383d JBR-215: Remove SystemInfo
(cherry picked from commit 9adf77a512)
2021-06-18 07:06:39 +03:00
Denis Konoplev
30c852cda0 JBR-215: Separate LatinNonAlphaNumKeycodes option
(cherry picked from commit caf366f6f3)
2021-06-18 07:06:38 +03:00
Denis Konoplev
24f745fa2b JBR-215: Windows non-alphanumeric shortcuts
(cherry picked from commit 4f60efebe2)
2021-06-18 07:06:37 +03:00
Denis Konoplev
a71fd1ad71 JBR-2280: Fix regression. Mode compatible with old option.
(cherry picked from commit a3e3c23cb1)
2021-06-18 07:06:36 +03:00
Denis Fokin
ac4040685c macOS national keyboard support 2021-06-18 07:06:35 +03:00
Sergey Malenkov
a131b36216 JBR-1929 FractionalMetricsSupport
(cherry picked from commit bbdc159762)
2021-06-18 07:06:34 +03:00
Mikhail Grishchenko
36683ee07f 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-18 07:06:33 +03:00
Mikhail Grishchenko
13cb4cc84b 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-18 07:06:32 +03:00
Alexey Ushakov
e324c2d800 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-18 07:06:31 +03:00
Mikhail Grishchenko
a54a1bd9b0 JBR-1414 [Test] downscale frames to run on low-dpi screens
(cherry picked from commit b46e74fe6f)
2021-06-18 07:06:30 +03:00
Elena Sayapina
23276462b4 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-18 07:06:29 +03:00
Alexey Ushakov
ead6ba7c3c 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-18 07:06:28 +03:00
Alexey Ushakov
fee24cb87d JBR-2137 JetBrainsMono fonts update to v1.0.3
(cherry picked from commit a6e441828a)
2021-06-18 07:06:27 +03:00
Mikhail Grishchenko
614a62d0a6 JBR-1414: Added regression test for dnd with HiDPI scaling
(cherry picked from commit 1f4ab12fbb)
2021-06-18 07:06:26 +03:00
Elena Sayapina
98e17cdc53 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-18 07:06:25 +03:00
Konstantin Bulenkov
821902e031 Update JetBrains Mono to 1.0.2
(cherry picked from commit 6f4a13e46f)
2021-06-18 07:06:24 +03:00
Ivan Migalev
7907ee81a2 Extract the DWM colorization parameters from registry (JBR-2070)
(cherry picked from commit 0330cab60b)
2021-06-18 07:06:22 +03:00
Ivan Migalev
905d9b1faf Refresh desktop properties on WM_DWMCOLORIZATIONCOLORCHANGED (JBR-2070)
(cherry picked from commit 06086f4a7e)
2021-06-18 07:06:21 +03:00
Ivan Migalev
2700bc2fe5 Fix a possible resource leak in ColorizationColorAffectsBorders
(cherry picked from commit 0c911b6ffe)
2021-06-18 07:06:20 +03:00
Elena Sayapina
9983233f3f JBR-2086 JetBrainsMono fonts update to v1.0.1
(cherry picked from commit a4b373e631)
2021-06-18 07:06:19 +03:00
Konstantin Bulenkov
f4808da480 JetBrains Mono 1.0
(cherry picked from commit d514f7a982)
2021-06-18 07:06:18 +03:00
Alexey Ushakov
1f86292168 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-18 07:06:17 +03:00
Denis Konoplev
0b4f613ff3 JBR-3444: Return NullSurfaceData when gc == null
(cherry picked from commit 01ad15e61c)
2021-06-18 07:06:16 +03:00
Denis Konoplev
8b0002b42f JBR-1995: Last character issue with korean
Fix for JTextComponent

(cherry picked from commit a7c8b0b535)
2021-06-18 07:06:15 +03:00
Denis Konoplev
97f52e2e78 JBR-2891: Post PhaseEvents in the begin and end of Magnify and Rotate
(cherry picked from commit c811c295c2)
2021-06-18 07:06:14 +03:00
Denis Konoplev
23fd660232 JBR-2444: Turn on IM workaround by default
(cherry picked from commit 15c4ce1d3e)
2021-06-18 07:06:13 +03:00
Denis Konoplev
41d0b11161 Fix build: add import & fix jwhen 2021-06-18 07:06:12 +03:00
Denis Konoplev
bfa7056529 JBR-2795: Add explicit conversion
(cherry picked from commit bf3e1c0c31)
2021-06-18 07:06:11 +03:00
Denis Konoplev
07ede667ca IDEA-237231: Correct signarute mask
(cherry picked from commit 6974131eec)
2021-06-18 07:06:10 +03:00
Denis Konoplev
c1322f6b1c IDEA-237231: Possible fix for pen interraction
(cherry picked from commit 33a8c95d39)
2021-06-18 07:06:09 +03:00
Denis Konoplev
a505cdc201 JBR-2347: Free memory on other exceptions, rethrow ThreadDead & log it
(cherry picked from commit 16ca839ed3)
2021-06-18 07:06:08 +03:00
Denis Konoplev
f42354c383 JBR-2347: Don't free memory when thread is dead
(cherry picked from commit afb3303db5)
2021-06-18 07:06:07 +03:00
Denis Konoplev
5d87caa45d JBR-2041: Project view tap fix, recovery? constants & logging
(cherry picked from commit 1e904db3b0)
2021-06-18 07:06:05 +03:00
Denis Konoplev
1983d8526d IDEA-229135: Fling animation stop on tap
(cherry picked from commit 7ce0f79561)
2021-06-18 07:06:04 +03:00
Denis Konoplev
75aee6cd58 Windows touch screen support
(cherry picked from commit cab3f28907)
2021-06-18 07:06:03 +03:00
Denis Konoplev
18a7d3daa2 Turn off multitouch
(cherry picked from commit a2576ffa9a)
2021-06-18 07:06:02 +03:00
Denis Konoplev
596510aa82 Check XInput extension && touch inertia
(cherry picked from commit cca7fb97f4)
2021-06-18 07:06:01 +03:00
Denis Konoplev
2a950bdba9 Touch scroll handling
(cherry picked from commit 6dcec3dc31)
2021-06-18 07:06:00 +03:00
Denis Konoplev
709db73e79 XI2 Constants
(cherry picked from commit 588cd6ee73)
2021-06-18 07:05:59 +03:00
Denis Konoplev
1a8991079a XLibWrapper XI2 functions
(cherry picked from commit d6bd1bfa2b)
2021-06-18 07:05:58 +03:00
Denis Konoplev
1be8176c41 X11 native get put double
(cherry picked from commit f101bc1108)
2021-06-18 07:05:57 +03:00
Denis Konoplev
06a79fd91f Native data types
(cherry picked from commit 9504574dbb)
2021-06-18 07:05:56 +03:00
Denis Konoplev
1fa104bacb XI2 headers in xlib wrapper generator
(cherry picked from commit ef108067a1)
2021-06-18 07:05:55 +03:00
Denis Konoplev
11f3c0bb10 Revert "Turn off multitouch"
This reverts commit 90ea3bf57e4c687e9d9bf0a37f2f64c82a81f4eb.
2021-06-18 07:05:54 +03:00
Denis Konoplev
a18060b4e1 Turn off multitouch
(cherry picked from commit a2576ffa9a)
2021-06-18 07:05:53 +03:00
Alexey Ushakov
b1c8e5a0eb 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-18 07:05:52 +03:00
Alexey Ushakov
166b1b27a4 JBR-1962 Allow to change font config
Replaced several privileged blocks with just one

(cherry picked from commit faa8d3d258)
2021-06-18 07:05:50 +03:00
Vitaly Provodin
5440375c66 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-18 07:05:49 +03:00
Dennis Ushakov
2e656563d5 JBR-1863, JBR-1868 correct advances on Catalina 2021-06-18 07:05:48 +03:00
Dennis Ushakov
d87e4e900c JBR-1850: on macOS fonts should be sorted by weight to ensure proper population of the families 2021-06-18 07:05:47 +03:00
Dennis Ushakov
479a96cab7 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-18 07:05:46 +03:00
Dennis Ushakov
2af6dcd7dd JBR-1756 use CoreText for all font rendering on Catalina 2021-06-18 07:05:45 +03:00
Nikita Gubarkov
bd1b5ed5ea JBR-410 Added emoji support for Linux 2021-06-18 07:05:44 +03:00
Alexey Ushakov
0245cb524c 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-18 07:05:43 +03:00
Anton Tarasov
397175e30d JRE-729 [windows] unreasonable IME activity consumes CPU 2021-06-18 07:05:42 +03:00
Dmitry Batrak
cacd7fa9a6 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-18 07:05:41 +03:00
Dmitry Batrak
597352ee8e JBR-3038 Unexpected windows z-order change on workspace switch
(cherry picked from commit ddda860f42)
2021-06-18 07:05:40 +03:00
Dmitry Batrak
13b0d241c4 JBR-3035 The Confirm Exit pop-up window remains hidden behind a window of another application
(cherry picked from commit 470c3bd1b5)
2021-06-18 07:05:39 +03:00
Dmitry Batrak
64dbc858b6 JBR-2934 Serious usability issue with GoLand 2020.3 caused by JBR
(cherry picked from commit 95be4351d4)
2021-06-18 07:05:38 +03:00
Dmitry Batrak
5a7b8d67d3 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-18 07:05:37 +03:00
Dmitry Batrak
a178b56d47 JBR-2698 setAutoRequestFocus(false) breaks focus logic under i3 window manager on Linux
(cherry picked from commit ebcdeb7d80)
2021-06-18 07:05:36 +03:00
Dmitry Batrak
34bbd68d59 JBR-2696 Log focus API invocations with stack traces
(cherry picked from commits 0f038754e5, a507cab6d3)
2021-06-18 07:05:35 +03:00
Dmitry Batrak
65d70133bd 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-18 07:05:34 +03:00
Alexey Ushakov
6e04ec7065 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-18 07:05:32 +03:00
Artem Bochkarev
ef4cdadfe9 JBR-1851: check NSArray length
and make more exception-safe
and minor optimization for logging (cache jobjects)

(cherry picked from commit 5839539379)
2021-06-18 07:05:31 +03:00
Artem Bochkarev
30bc9dd5a0 JBR-1841: allow deferred disabling of InputMethods-support
(cherry picked from commit 969255904b)
2021-06-18 07:05:30 +03:00
Artem Bochkarev
e6e210a999 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-18 07:05:29 +03:00
Artem Bochkarev
62760c5cc7 JBR-1668: add hardcoded default values for preferences node NSServicesStatus
(cherry picked from commit 8445f53d85)
2021-06-18 07:05:28 +03:00
Artem Bochkarev
016dc2f234 JBR-1515: obtain shortcut from OS to check inside AWTView.performKeyEquivalent
(cherry picked from commit 30d479fbd4)
2021-06-18 07:05:27 +03:00
Artem Bochkarev
aba9385fa0 JBR-1668: add hardcoded descriptions of system actions
and minor fixes

fix memory management

(cherry picked from commit 15f7368309)
2021-06-18 07:05:26 +03:00
Elena Sayapina
c8a2ee888d 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-18 07:05:25 +03:00
Alexey Ushakov
1abae60146 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-18 07:05:24 +03:00
Dmitry Batrak
97bf0a5fd5 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-18 07:05:23 +03:00
Dmitry Batrak
fc9950107a 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-18 07:05:22 +03:00
Dmitry Batrak
b7229ccc1c 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-18 07:05:21 +03:00
Artem Bochkarev
1d1c49d3fe JBR-1771: fixed compilation errors (macosx-x86_64-normal-server-fastdebug)
(cherry picked from commit 1acada7cac)
2021-06-18 07:05:20 +03:00
Artem Bochkarev
dd1b624fb3 JBR-1668: minor fixes
fixed review comments

(cherry picked from commit 9dbcf194c9)
2021-06-18 07:05:19 +03:00
Vitaly Provodin
fcb4e51120 JBR-1618: fixed misprint, added saving screenshots in case of failure
(cherry picked from commit e4a3889cf0)
2021-06-18 07:05:18 +03:00
Alexey Ushakov
d22b4fb018 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-18 07:05:17 +03:00
Alexey Ushakov
3facfe7147 JBR-1399 Improve font discovery and loading by introducing font cache
Added unit test

(cherry picked from commit b4f5bf8bd3)
2021-06-18 07:05:16 +03:00
Elena Sayapina
af3cee542b IDEA-165950 [TEST] Added new regression test (National keyboard layouts support)
(cherry picked from commit 0900a705bc)
2021-06-18 07:05:15 +03:00
Artem Bochkarev
46fd71dbf6 JBR-1668: read system keyboard shortcuts
initial support for OS X

(cherry picked from commit 6bbe7102e2)
2021-06-18 07:05:14 +03:00
Artem Bochkarev
c6e3bdb52c JBR-1573: restore current input context after cleanup
(cherry picked from commit b7acd7f6f6)
2021-06-18 07:05:12 +03:00
Alexey Ushakov
c3f9293ce0 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-18 07:05:11 +03:00
Alexey Ushakov
24c12cc70a JBR-1874 Cursor not changing from 'default' to 'text'
Prevent OS from changing cursor

(cherry picked from commit 94a4eb7002)
2021-06-18 07:05:10 +03:00
Alexey Ushakov
7f0952122d 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-18 07:05:09 +03:00
Alexey Ushakov
f25b8a4638 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-18 07:05:08 +03:00
Alexey Ushakov
9f328e3aab 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-18 07:05:07 +03:00
Alexey Ushakov
ab3313dced 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-18 07:05:06 +03:00
Alexey Ushakov
76ae60dfdd 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-18 07:05:05 +03:00
Alexey Ushakov
6e065eaa4f 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-18 07:05:04 +03:00
Alexey Ushakov
33cc229deb 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-18 07:05:03 +03:00
Alexey Ushakov
9542ac063e JBR-1645 javax/swing/JTextArea/TestTabSize.java: Tab width calculation wrong
Corrected idea font filter

(cherry picked from commit 62f9d1f46a)
2021-06-18 07:05:02 +03:00
Artem Bochkarev
dfc76ce0c6 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-18 07:05:01 +03:00
Alexey Ushakov
4f366d675a 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-18 07:05:00 +03:00
Artem Bochkarev
5cd6022055 JBR-1541: activate menu in completion handler of modal dialog
(cherry picked from commit e57384c1d6)
2021-06-18 07:04:59 +03:00
Alexey Ushakov
4092c2efb6 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-18 07:04:58 +03:00
Alexey Ushakov
f755bc3fe8 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-18 07:04:57 +03:00
Alexey Ushakov
b8de146ec0 JBR-1394 JBR11 does not support LCD text on Mac
Enable LCD rendering for transparent destinations

(cherry picked from commit 207c6b92ff)
2021-06-18 07:04:55 +03:00
Elena Sayapina
c6d2170d51 JBR-1380: [TESTBUG] Regression test java/awt/Graphics2D/DrawString/LCDTextSrcEa.java works incorrectly
(cherry picked from commit 95df9908f4)
2021-06-18 07:04:54 +03:00
Elena Sayapina
7cf8c25f64 JBR-1372: [TESTBUG] JDialog1054.java, MoveFocusShortcutTest.java regression tests need update
(cherry picked from commit a5948894bf)
2021-06-18 07:04:53 +03:00
Maxim Kartashev
e157fc2a75 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-18 07:04:52 +03:00
Vyacheslav Moklev
95356915d0 Fix const pointer after JDK-8225032 fix 2021-06-18 07:04:51 +03:00
Vyacheslav Moklev
2bd3a12994 Fix compilation on windows platform: awt_ole.h must be included before awt.h 2021-06-18 07:04:50 +03:00
Vyacheslav Moklev
7cbe358971 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-18 07:04:49 +03:00
Vyacheslav Moklev
546e639f9f JBR-1271 Wrong parent of native windows dialogs
Set a proper parent to a dialog window
2021-06-18 07:04:48 +03:00
Vyacheslav Moklev
571a08209c JBR-1273 Common Item Dialog does not open when wrong path to directory is passed
Handle set directory / set file properly
2021-06-18 07:04:47 +03:00
Vyacheslav Moklev
794a1758cf JBR-1274 Common Item Dialog sometimes crash the process
Prevent from freeing memory with CoTaskMemFree twice
2021-06-18 07:04:46 +03:00
Vyacheslav Moklev
8a324d1bbf JBR-1257 CommonItemDialog modal window has no owner
Fix modality for Common Item Dialog
2021-06-18 07:04:45 +03:00
Vyacheslav Moklev
7d1b3cf82f JBR-1258 CommonItemDialog ignores directory to open
Fix parsing of directory path / file path
2021-06-18 07:04:44 +03:00
Vyacheslav Moklev
dff54840bf 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-18 07:04:43 +03:00
Alexey Ushakov
95a10cc6fa 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-18 07:04:42 +03:00
Alexey Ushakov
90439280c6 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-18 07:04:41 +03:00
Elena Sayapina
709b2197f9 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-18 07:04:40 +03:00
Elena Sayapina
a3de746ad4 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-18 07:04:39 +03:00
Elena Sayapina
63a9ff9483 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-18 07:04:38 +03:00
Elena Sayapina
96bd2bb454 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-18 07:04:37 +03:00
Vitaly Provodin
501c2e16f3 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-18 07:04:35 +03:00
Vitaly Provodin
e979b2531c JRE-1117 J2DBench: introduced result reader for TC's charts
(cherry picked from commit 422fa59643)
2021-06-18 07:04:34 +03:00
Alexey Ushakov
2d65a0ae4e 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-18 07:04:33 +03:00
Alexey Ushakov
fd0cb244a9 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-18 07:04:32 +03:00
Alexey Ushakov
d50591f48c 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-18 07:04:31 +03:00
Maxim Kartashev
c697330c84 JBR-3416 Introduce new client property for Linux: linux.awt.windowTitleVisible 2021-06-18 07:04:30 +03:00
Alexey Ushakov
d39ab014f6 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-18 07:04:29 +03:00
Konstantin Bulenkov
e3b7adfc8a update icons
(cherry picked from commit dfe387ff5037deda29d8d522cba6cc5370796ff4)
(cherry picked from commit de1e4a9d71)
2021-06-18 07:04:28 +03:00
Konstantin Bulenkov
eeff4c20de add workspace.xml to gitignore
(cherry picked from commit bd5b9403fdca779ecc76f0b3af2918fe772f7ed1)

(cherry picked from commit 37e7661f85)
2021-06-18 07:04:27 +03:00
Vitaly Provodin
5a4cfd73c8 Update README.md 2021-06-18 07:04:26 +03:00
Vitaly Provodin
43bf447b24 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-18 07:04:25 +03:00
Vitaly Provodin
ddebd6ea5d 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-18 07:04:24 +03:00
Vitaly Provodin
71d42a533e JRE-9: added regression test
(cherry picked from commit 4ffb665)
(cherry picked from commit 00a29ad129)
2021-06-18 07:04:23 +03:00
Sergey Malenkov
609a565599 JRE-100 Scroll with inertia (Mac os) should only work in the initial component
(cherry picked from commit e79502c708)
2021-06-18 07:04:22 +03:00
Sergey Malenkov
f600196b25 IDEA-161965 ignore dragged event that does not change mouse location Sierra is more sensit
(cherry picked from commit ef490fa465)
2021-06-18 07:04:21 +03:00
Stanislav Dombrovsky
0e628d08a4 Fix rendering of HTML list dots + better vertical align for them.
(cherry picked from commit fa4a404533ba1ef638fe523adc74391aee8a3ebf)

(cherry picked from commit 9f079c66e9)
2021-06-18 07:04:20 +03:00
Vitaly Provodin
27468ccaff configure BOOT_JDK to use JDK 16 2021-06-18 07:04:19 +03:00
Maxim Kartashev
a2bcfb8d49 JBR-1430 (8195129) Windows: use UTF16 version of Win32 API to load DLL
Also correct library name encoding in exception messages.
2021-06-18 07:04:18 +03:00
Dmitry Batrak
16e20230d3 JBR-3353 Sibling popup window is shown below dialog on macOS
(cherry picked from commit 4c6f3e4510)
2021-06-18 07:04:17 +03:00
Dmitry Batrak
37fc46cc05 JBR-3339 Window requests focus on horizontal scroll (on Linux)
(cherry picked from commit 8d74e8e30b)
2021-06-18 07:04:16 +03:00
Alexey Ushakov
c8541dff58 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-18 07:04:14 +03:00
Anton Tarasov
abd7c3d6fb JRE-166 [macOS] deadlock with JFXPanel
(cherry picked from commit a9dbb6990fac0c659297487a261ba9170e5fb3ad)

(cherry picked from commit 8a44e1bb37)
2021-06-18 07:04:13 +03:00
Alexey Ushakov
67714809e5 8265445: Introduce the new client property for mac: apple.awt.windowAppearance
Implemented apple.awt.windowAppearance client property
2021-06-18 07:04:12 +03:00
Anton Tarasov
c6350712bb JBR-3306 jbr-dev warnings: incompatible pointer to integer conversion returning 'void *' from a function with result type 'jlong' 2021-06-18 07:04:11 +03:00
Dmitry Batrak
b4b83de06f JBR-2498 Fix unexpected window raising under Mutter WM
re-implement the fix, so that ChildAlwaysOnTopTest isn't failing
2021-06-18 07:04:10 +03:00
Maxim Kartashev
2d5efaa55d 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-18 07:04:09 +03:00
Maxim Kartashev
a347a81c6b 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-18 07:04:08 +03:00
Alexey Ushakov
44f26be631 JBR-3327 [jbr-dev] Adjust mac window appearance according to AppleInterfaceStyle property
Set window appearance according to AppleInterfaceStyle default
2021-06-18 07:04:07 +03:00
Alexey Ushakov
3680f7f0f4 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-18 07:04:06 +03:00
Alexey Ushakov
eff5d54f5d 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-18 07:04:05 +03:00
Dmitry Batrak
9912c524f8 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-18 07:04:04 +03:00
Dmitry Batrak
ce7b7a9e0c JBR-2759 Typeahead issue on Linux
(cherry picked from commits 76bdaf1131, b20c56ff3e)
2021-06-18 07:04:03 +03:00
Denis Fokin
273ab18234 JBR-1362 Multiple child windows opened and closed in sequence result in a focus loss
(cherry picked from commit 3c9c599a2d)
2021-06-18 07:04:02 +03:00
Dmitry Batrak
fb591cc16a JBR-3307 First character is dropped when editing a table cell
(cherry picked from commit 2ccf6b65a7)
2021-06-18 07:04:01 +03:00
Dmitry Batrak
c4585ca494 JBR-3291 Input of characters using Alt+<NumPad> stopped working on Windows
(cherry picked from commit ba6b9c085e)
2021-06-18 07:04:00 +03:00
Alexey Ushakov
e9ca82e0f2 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-18 07:03:59 +03:00
Alexey Ushakov
7d0ed1202b 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-18 07:03:58 +03:00
Alexey Ushakov
668cf53ed5 JRE-193 UI freeze and 12/second thread dumps
Moved CStrikeDisposer dispose code to AppKit

(cherry picked from commit 28774d6878)
2021-06-18 07:03:57 +03:00
Alexey Ushakov
7639777115 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-18 07:03:56 +03:00
Alexey Ushakov
31c847c86f JBR-3304 jbr-dev warnings: 'getPhysFontName' defined but not used [-Werror=unused-function]
Removed unused code
2021-06-18 07:03:55 +03:00
Vitaly Provodin
bf637a1760 exclude javax/swing/JTabbedPane/4624207/bug4624207.java failing on windows due to 8197552 2021-06-18 07:03:54 +03:00
Alexey Ushakov
f38bec3b31 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-18 07:03:52 +03:00
Alexey Ushakov
8f704fc7a9 JRE-353 Fedora 25 + XMonad rendering issues
Added support for Xmonad WM

(cherry picked from commit c690c3c7fdf1390e6b1a8d388ff752a09391ae3c)
(cherry picked from commit 6851dc3441)
2021-06-18 07:03:51 +03:00
Denis Konoplev
6174d6c909 8264143: Change uint8_t to unsigned char 2021-06-18 07:03:50 +03:00
Dmitry Batrak
de22f45c9b JBR-3255 Applying 'incline' transform might change character's advance
(cherry picked from commit b37f7cfdb1)
2021-06-18 07:03:49 +03:00
Dmitry Batrak
8dca4f0aed JBR-3215 'deriveFont(float)' can return a different font (not just change the size)
(cherry picked from commit 8eafcaab24)
2021-06-18 07:03:48 +03:00
Dmitry Batrak
807919104b JBR-3157 Maximized window with custom decorations isn't focused on showing
(cherry picked from commit 62b04983f2)
2021-06-18 07:03:47 +03:00
Dmitry Batrak
948803f106 make AwtListGarbageCollectionTest pass reliably
(cherry picked from commit 304eb7f919)
2021-06-18 07:03:45 +03:00
Dmitry Batrak
0347ac8f0d JBR-1752 Floating windows overlap modal dialogs
(cherry picked from commit 0161050077)
2021-06-18 07:03:44 +03:00
Dmitry Batrak
0b33c38ea2 JBR-3054 Focus is not returned to frame after closing of second-level popup on Windows
(cherry picked from commit 0c2b6e1c04)
2021-06-18 07:03:43 +03:00
Dmitry Batrak
6024616b08 JBR-2702 Tooltips display through other applications on hover
(cherry picked from commits 11732c2469, 0ed7deabaa)
2021-06-18 07:03:42 +03:00
Dmitry Batrak
b3179cafa9 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-18 07:03:41 +03:00
Dmitry Batrak
7b3719d9db 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-18 07:03:40 +03:00
Dmitry Batrak
f935acced6 JBR-2712 Typeahead mechanism doesn't work on Windows
(cherry picked from commits 1a9838082e, f5b6222835, acd7e3b2da, cd6dd5c3cf8556f97f3113cb7d615a92393b57bf(partially), e8bbd8ffdd90f57cd12d7d7e89188be97ee4be0b(partially))
2021-06-18 07:03:39 +03:00
Denis Konoplev
78a624d00e 8264143: Lanai: RenderPerfTest.BgrSwBlitImage has artefacts on apple M1
Add stdint include to fix x64 build
2021-06-18 07:03:38 +03:00
Dmitry Batrak
5163f19c04 JBR-2498 Fix unexpected window raising under Mutter WM
(cherry picked from commit 73b45fb899)
2021-06-18 07:03:37 +03:00
Dmitry Batrak
ffee0695f2 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-18 07:03:36 +03:00
Dmitry Batrak
4db07b860c 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-18 07:03:35 +03:00
Dmitry Batrak
867f404eea 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-18 07:03:34 +03:00
Dmitry Batrak
6c0db687ab 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-18 07:03:33 +03:00
Dmitry Batrak
e84c003eb6 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-18 07:03:32 +03:00
Dmitry Batrak
ae710843df 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-18 07:03:31 +03:00
Dmitry Batrak
0753450eaa 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-18 07:03:29 +03:00
Alexey Ushakov
b4efb71003 JRE-18 CCE in XRMaskFill.MaskFill
Throwing InvalidPipeException for incompatible surfaces

(cherry picked from commit 55dab103c24bf86cf025b9ce02b67e72508d41ba)
(cherry picked from commit 0a4fdad0f2)
2021-06-18 07:03:28 +03:00
Dmitry Batrak
e5a8c59db1 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-18 07:03:27 +03:00
Dmitry Batrak
5d12b731bd 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-18 07:03:26 +03:00
Dmitry Batrak
59ab61270f 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-18 07:03:25 +03:00
Dmitry Batrak
a0eebb7f0b 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-18 07:03:24 +03:00
Dmitry Batrak
cf9df07661 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-18 07:03:23 +03:00
Dmitry Batrak
42344e3423 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-18 07:03:22 +03:00
Dmitry Batrak
720bfcf41b 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-18 07:03:21 +03:00
Dmitry Batrak
c096d68d10 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-18 07:03:20 +03:00
Alexey Ushakov
ac8277ddd7 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-18 07:03:19 +03:00
Alexey Ushakov
1efe9ebef2 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-18 07:03:18 +03:00
Dmitry Batrak
f489fab795 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-18 07:03:17 +03:00
Dmitry Batrak
23bebeb98f 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-18 07:03:16 +03:00
Dmitry Batrak
e2d8d8ba36 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-18 07:03:15 +03:00
Dmitry Batrak
fc2f86172a 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-18 07:03:14 +03:00
Dmitry Batrak
c0d497490a 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-18 07:03:13 +03:00
Vitaly Provodin
896b9736b1 JRE-186 added regression test (Modal dialogs (Messages) shouldn't popup IDEA when another application is active)
(cherry picked from commit 236bd38d1b)
2021-06-18 07:03:12 +03:00
Vitaly Provodin
01acfac44a JRE-269 added regression (JLabel doesn't scale <code>text</code> HTML fragments.)
(cherry picked from commit 1f4ad38d23)
2021-06-18 07:03:11 +03:00
Alexey Ushakov
df37263007 JRE-307 Wrong dpi reported on Wayland
(cherry picked from commit 15693661cc)
2021-06-18 07:03:10 +03:00
Vitaly Provodin
be4bafdc74 JRE-392 added regression (Tip of the day is not hidden while another modal window is shown)
(cherry picked from commit c7b0ac686f)
2021-06-18 07:03:09 +03:00
Vitaly Provodin
bdd5d394c8 JRE-394 added regression test (System getenv doesn't return env var set in JNI code)
(cherry picked from commit 3a7b3c67b0)
2021-06-18 07:03:07 +03:00
Vitaly Provodin
775239d881 JRE-401 added regression test (AppCode freezes during autocomplete and other operations)
(cherry picked from commit cb4453b1d1)
2021-06-18 07:03:06 +03:00
Vitaly Provodin
dca0db418d JRE-422 added new regression test (AWTView deliverJavaMouseEvent leaks jEvent)
(cherry picked from commit 37dc13c603)
2021-06-18 07:03:05 +03:00
Vitaly Provodin
bef950bd78 JRE-430 added new regression test (Font fallback sometimes doesn't work in Swing text components)
(cherry picked from commit d04debc847)
2021-06-18 07:03:04 +03:00
Vitaly Provodin
932ea73f1b JRE-457 added new regression test (OGLTR_DisableGlyphModeState is slow)
(cherry picked from commit 3a43f4557f)
2021-06-18 07:03:03 +03:00
Vitaly Provodin
391c1d7468 JRE-458 added new regression test (Insufficient and inconsistent permissions on some files in Linux build)
(cherry picked from commit 82adbe9c25)
2021-06-18 07:03:02 +03:00
Vitaly Provodin
23f924bf1d JRE-467 added new regression test (Wrong rendering of variation sequences)
(cherry picked from commit 0026095202)
2021-06-18 07:03:01 +03:00
Vitaly Provodin
9abfdfd2e1 JRE-468 added new regression test (Idea freezes on project loading)
(cherry picked from commit 1ce8c3ce82)
2021-06-18 07:03:00 +03:00
Vitaly Provodin
62466a9865 JRE-501 added new regression test (Live resize is jerky for heavy java applications on Mac)
(cherry picked from commit c4a1277c1b)
2021-06-18 07:02:59 +03:00
Vitaly Provodin
c59c58096a JRE-638 added new regression test (enable unlimited cryptographic policy by default)
(cherry picked from commit 4a14c6f15a)
2021-06-18 07:02:58 +03:00
Vitaly Provodin
5c08a31b50 JRE-705 added new regression test (Z-order of child windows is broken on Mac OS)
(cherry picked from commit 82cd480619)
2021-06-18 07:02:57 +03:00
Vitaly Provodin
6ac5a9df4b JRE-741 added new regression test (Modal dialog stays above other process windows)
(cherry picked from commit 9ea664c299)
2021-06-18 07:02:56 +03:00
Vitaly Provodin
03b32933f7 JRE-624 CThreading isAppKit() fails to detect main app thread if it was renamed
(cherry picked from commit c8f248a936)
2021-06-18 07:02:55 +03:00
Alexey Ushakov
7e236a57ea IDEA-166173 IntelliJ freezes when returning from sleep
Fixed deadlock by removing unnecessary getScreenResolution call

(cherry picked from commit cec93cf1fd)
2021-06-18 07:02:54 +03:00
Alexey Ushakov
4a4b553b14 Added missing fontconfig defines
(cherry picked from commit 2ac273a456)
2021-06-18 07:02:53 +03:00
Alexey Ushakov
77d3593fc1 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-18 07:02:52 +03:00
Alexey Ushakov
9383df9a46 JRE-43 Font.getFamily() does not work in headless mode
Removed unused code

(cherry picked from commit 5b523f049e)
2021-06-18 07:02:51 +03:00
Alexey Ushakov
8bc8e5580e 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-18 07:02:50 +03:00
Alexey Ushakov
110851d901 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-18 07:02:49 +03:00
Alexey Ushakov
bd9dc77d84 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-18 07:02:48 +03:00
Alexey Ushakov
1392fe7223 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-18 07:02:47 +03:00
Alexey Ushakov
95faee38d3 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-18 07:02:46 +03:00
Alexey Ushakov
75858032bf JRE-29 fontconfig lib crashes CLion on OSX
Disabled fontconfig usage on OSX

(cherry picked from commit 431e14429c)
2021-06-18 07:02:45 +03:00
Vitaly Provodin
1fb3472065 exclude tests spontaneously creating windows during test execution 2021-06-18 07:02:44 +03:00
Alexey Ushakov
daf9cd861e 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-18 07:02:43 +03:00
Alexey Ushakov
cfe1aadf15 Added logging for freetypeScaler via env variable OPENJDK_LOG_FFS=yes
and for screen resolution in freetypeScaler

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

(cherry picked from commit b1c49c3b27)
2021-06-18 07:02:40 +03:00
Anton Tarasov
bf5ae96736 Add build.gradle 2021-06-18 07:02:39 +03:00
Anton Tarasov
80752cbac1 JBR-2031 [mac] jcef deadlocks with a11y on start
(cherry picked from commit 4f44b37f08)
2021-06-18 07:02:38 +03:00
Alexey Ushakov
3e5d9c3ba4 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-18 07:02:37 +03:00
Anton Tarasov
d79e8e61d4 JBR-2019 provide getWindowHandle method for jcef
(cherry picked from commit 7ae706b629)
2021-06-18 07:02:36 +03:00
Anton Tarasov
3bbd6b9a4f Comment assertion (originally JRE-965)
The assert line crashes debug hotspot.

(cherry picked from commit a00074a86c)
2021-06-18 07:02:35 +03:00
Anton Tarasov
1b9ad73edb JBR-1976 [jcef] need mouse-transparent window on Windows
(cherry picked from commit b60fac96b4)
2021-06-18 07:02:34 +03:00
Anton Tarasov
8b69e96c27 JBR-1834 [linux] runtime hidpi switch is broken
(cherry picked from commit eaa04303a7)
2021-06-18 07:02:33 +03:00
Anton Tarasov
ffe4819421 JBR-1824 export NSWindow::setIgnoresMouseEvents to java internal API
(cherry picked from commit 4399dc382c)
2021-06-18 07:02:32 +03:00
Anton Tarasov
e34609337a JBR-1802 com/sun/java/accessibility/util/8051626/Bug8051626.java: access denied ("java.lang.RuntimePermission" "getClassLoader")
(cherry picked from commit eae772aca9)
2021-06-18 07:02:31 +03:00
Anton Tarasov
423931953f JBR-1795 Project opened from Welcome screen goes to backgound after loading
(cherry picked from commit 322526458a)
2021-06-18 07:02:30 +03:00
Anton Tarasov
2a17202fd9 JBR-1609 Jupyter Notebook eventually causes IDEA to become unresponsive on Mac OSX
(cherry picked from commit 8ae0be8eb6)
2021-06-18 07:02:29 +03:00
Anton Tarasov
d7bd4a0688 JBR-1786 Weird white border for IDE window
(cherry picked from commit 4b09614a0e)
2021-06-18 07:02:28 +03:00
Vyacheslav Moklev
1697bfe33a JBR-1552 Invalid screen bounds in full screen mode
Check is window is not in undecorated state

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

(cherry picked from commit 00d32e58dc)
2021-06-18 07:02:26 +03:00
Anton Tarasov
ce7a473777 JBR-1770 [windows] frame does not open as maximized
(cherry picked from commit d9dfc3c6c5)
2021-06-18 07:02:25 +03:00
Anton Tarasov
50a6f90883 JBR-1693 difficult to input Japanese text with "Fast" Key Repeat
(cherry picked from commit 12de3e287e)
2021-06-18 07:02:24 +03:00
Anton Tarasov
3a899cfab9 JBR-1429 Scale is huge due to GDK_SCALE
(cherry picked from commit 1c3477df2e)
2021-06-18 07:02:23 +03:00
Anton Tarasov
bdeb56d93e JBR-1669 IDE-managed HiDPI mode is broken
(cherry picked from commit 461b0b5cd4)
2021-06-18 07:02:22 +03:00
Anton Tarasov
2443130b36 JBR-1650 propagate custom decoration title bar height to native
(cherry picked from commit f6fc65d014)
2021-06-18 07:02:21 +03:00
Anton Tarasov
5f286a45fb JBR-1629 Maximized window cut at the right and bottom
(cherry picked from commit 9e768377db)
2021-06-18 07:02:19 +03:00
Anton Tarasov
65ad9dbfd2 JBR-1492 Not able to start Intellij Idea 2017.2.5 with modified vmoptions
(cherry picked from commit e7ca6db66b)
2021-06-18 07:02:18 +03:00
Anton Tarasov
a6465c89a2 JBR-1427 pycharm jupyter preview stuck and no response when click on preview.
(cherry picked from commit 1746b04686)
2021-06-18 07:02:17 +03:00
Anton Tarasov
1766a8d6c3 IDEA-210154 Borderless UI: Top frame of IDEA window is blue
(cherry picked from commit 2dd4163bc4)
2021-06-18 07:02:16 +03:00
Anton Tarasov
88d01ca7a0 JBR-1365 force IDE-managed HiDPI on Linux for fractional scales
(cherry picked from commit f092ff3962)
2021-06-18 07:02:15 +03:00
Anton Tarasov
a1e3b224b5 JBR-1351 Borderless UI: Bold frame around IDEA window appears on non-HiDPI display
(cherry picked from commit 06d35de069)
2021-06-18 07:02:14 +03:00
Anton Tarasov
c37d5b917a JBR-1313 wrong insets for non-resizable custom-decorated frame
(cherry picked from commit 9179718cb6)
2021-06-18 07:02:13 +03:00
Anton Tarasov
833f9efa09 JBR-1293 do not modify client bounds when custom-decorated frame is set undecorated
(cherry picked from commit cb188edaab)
2021-06-18 07:02:12 +03:00
Anton Tarasov
c004cc885f JBR-1278 allow native border and shadow for custom decoration mode
(cherry picked from commit a879ad5739)
2021-06-18 07:02:11 +03:00
Anton Tarasov
a4aff6cd0b JRE-1232 forwardport: JRE-1228 support custom frame decoration
(cherry picked from commit d2820524a1)
2021-06-18 07:02:10 +03:00
Anton Tarasov
e329c372ce JRE-1162 [jdk11] support on-the-fly DPI change on linux
(cherry picked from commit c06c4c69d3)
2021-06-18 07:02:09 +03:00
Anton Tarasov
c16a04ff4d JRE-1142 [jdk11] hidpi is not detected since Ubuntu 18.04
(cherry picked from commit be4f8c0d9d)
2021-06-18 07:02:08 +03:00
Anton Tarasov
36cd30a341 JRE-1111 [JDK11] java/beans/Beans/TypoInBeanDescription.java crashes at libawt_xawt.so+0x4a30d
(cherry picked from commit b89e6aed0b)
2021-06-18 07:02:07 +03:00
Anton Tarasov
77e0cfb468 fix JNI_OnUnload definition
(cherry picked from the commit  3571e39071)

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

(cherry picked from commit f3ccc53e02)
2021-06-18 07:02:05 +03:00
Anton Tarasov
6efcd17c63 JRE-938 [windows] Frame.setMaximizedBounds not hidpi-aware
(cherry picked from commit cc97899923320e1fa17f5e44975c4a0f0ba51014)
(cherry picked from commit ccfe65be7f)
2021-06-18 07:02:04 +03:00
Anton Tarasov
7df9173504 JRE-907 macOS: add ability to check for scaled display mode
(cherry picked from commit e496262aa1)
2021-06-18 07:02:03 +03:00
Anton Tarasov
eb74762123 JRE-934 Diff viewer errors are not visible on HiDPI Linux
(cherry picked from commit 641a09dd52)
2021-06-18 07:02:02 +03:00
Anton Tarasov
118870b319 [jdk9] HiDPI scale is not detected on some linux desktops
(cherry picked from commit 9279d80110)
2021-06-18 07:02:01 +03:00
Anton Tarasov
8ca137edb9 JRE-681 [windows] direct drawing into frame graphics may have wrong translate
(cherry picked from commit 6ea1d45fd1)
2021-06-18 07:02:00 +03:00
Anton Tarasov
bae13c07c5 Read org.gnome.desktop.interface/scaling-factor
(cherry picked from commit 277357ae73)
2021-06-18 07:01:59 +03:00
Anton Tarasov
f60a46cdf0 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-18 07:01:58 +03:00
Anton Tarasov
ad27479214 Do not scale base font in HiDPI mode on Linux
(cherry picked from commit 6fb2c36529)
2021-06-18 07:01:57 +03:00
Anton Tarasov
adc2600e1c Allow HiDPI mode on Linux
(cherry picked from commit 34234263fb)
2021-06-18 07:01:55 +03:00
Anton Tarasov
6e2c787752 JRE-772 swing returns incorrect FRC when AA is off
(cherry picked from commit a161897d908aa10da6306c06452c5d6317fed2f0)
(cherry picked from commit 2bf5a7ca5c)
2021-06-18 07:01:54 +03:00
Anton Tarasov
ed0a1b279e JRE-711 Horizontal grey lines appear in every window in IntelliJ Idea
(cherry picked from commit 62000130d86e5831d81cfb24659386c6930f84cf)

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

(cherry picked from commit 6ea1d45fd1)
2021-06-18 07:01:52 +03:00
Anton Tarasov
dff1b757b0 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-18 07:01:51 +03:00
Anton Tarasov
54ebb0d07e JRE-616 [linux] notify when dpi correction factor is applied to fonts
(cherry picked from commit f57d41f3118bfd773c99ce32d58cfae16931be6a)
(cherry picked from commit 6246abc72f)
2021-06-18 07:01:50 +03:00
Anton Tarasov
e7f6e37f06 JRE-612 [windows] icon in frame title is not dpi-aware
(cherry picked from commit dec04385177a2abb677add909d3b94f94c62a14e)

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

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

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

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

(cherry picked from commit afa68f7ad6440303c6417be3f675b1c4644b6014)

(cherry picked from commit 0651b45e13)
2021-06-18 07:01:45 +03:00
Anton Tarasov
6891eb5827 JRE-489 -Dswing.bufferPerWindow is fractional scale unfriendly
(cherry picked from commit 5e183c397b)
2021-06-18 07:01:44 +03:00
Anton Tarasov
d74c443456 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-18 07:01:43 +03:00
Anton Tarasov
b985ac9b74 JRE-382 Three AWT-tests become hanging starting since master-875
(cherry picked from commit 7d492101db8fcbb3d285fd8e9669f74b0e0fce8f)
(cherry picked from commit b965f85c1b)
2021-06-18 07:01:42 +03:00
Anton Tarasov
0f30d55981 JRE-373 [macos] nativeCreateNSWindow deadlocks with a11y
(cherry picked from commit 72c77a992bbf1b95b82ffc08cb2f4f3bc36b3657)

(cherry picked from commit aa09fa2c85)
2021-06-18 07:01:41 +03:00
Anton Tarasov
b5da90bfe7 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-18 07:01:40 +03:00
Anton Tarasov
24ca47f63a 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-18 07:01:39 +03:00
Anton Tarasov
12f8dffe41 JRE-269 JLabel doesn't scale <code>text</code> HTML fragments.
(cherry picked from commit 9ef72b6c3a477e4225f9b98e30fa9190613520e4)
(cherry picked from commit c17bc728ee)
2021-06-18 07:01:38 +03:00
Anton Tarasov
1801fef225 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-18 07:01:37 +03:00
Anton Tarasov
7f9635230e 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-18 07:01:36 +03:00
Anton Tarasov
219c5cbc01 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-18 07:01:35 +03:00
Anton Tarasov
52171d4bbf 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-18 07:01:34 +03:00
Anton Tarasov
a285c0c5a8 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-18 07:01:32 +03:00
Anton Tarasov
16267fc6c5 JRE-119 [ask if ui scale is enabled natively]
(cherry picked from commit 801f45875fd8699edcbda5896210cec191062261)
(cherry picked from commit 20edebdefa)
2021-06-18 07:01:30 +03:00
Anton Tarasov
53453402dd 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-18 07:01:29 +03:00
Anton Tarasov
5823129592 IDEA-148854: AppCode crashes randomly every 15 mins or so
(cherry picked from commit 02f9a5fbb4924ff67c8a04c15e490acfcc750003)
(cherry picked from commit b8f4b4a9ed)
2021-06-18 07:01:28 +03:00
Vitaly Provodin
354d1a819e updated JTreg exclude list 2021-06-18 07:01:27 +03:00
Alexey Ushakov
27ea833193 Resolve merge compile problems on mac
(cherry picked from commit d1ed8ab118)
2021-06-18 07:01:26 +03:00
Anton Tarasov
3ce88aba4c IDEA-152524 can't compile fontconfig changes on Windows
(cherry picked from commit 4c8351fecf)

(cherry picked from commit 5faebc73d5)
2021-06-18 07:01:25 +03:00
Alexey Ushakov
08c9bb5338 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-18 07:01:23 +03:00
Vitaly Provodin
eb423b9af0 JBR-3401 enable macos-aarhc64 builds 2021-06-18 07:01:22 +03:00
Vitaly Provodin
b060c5f809 JBR-3305 remove the option --disable-warnings-as-errors from configure 2021-06-18 07:01:21 +03:00
Vitaly Provodin
9b6ea07556 JBR-3398 remove the Experimental AOT and JIT Compiler (JEP 410) 2021-06-18 07:01:20 +03:00
Alexey Ushakov
e96d04180f JBR-2807: JDK15: update modules.list to resolve jbr build failure
removed nashorn modules
2021-06-18 07:01:19 +03:00
Vitaly Provodin
0b02bde580 JBR-2130 remove module jdk.pack 2021-06-18 07:01:18 +03:00
Vitaly Provodin
ab3551bdbc 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-18 07:01:17 +03:00
Vitaly Provodin
b5c77fb964 JBR-2912 add JBR 15 builds with DCEVM 2021-06-18 07:01:16 +03:00
Vitaly Provodin
37f417fd8c JBR-2864 initial commit of DCEVM patches reworked for 15 2021-06-18 07:01:15 +03:00
Vitaly Provodin
73bf97bd20 JBR-2812 remove --with-import-modules from configure for aarch64 2021-06-18 07:01:14 +03:00
Anton Tarasov
e32706f9b1 JBR-2812 bundle jcef in jmod format instead of modular-sdk
Build test-image with non-jcef build target
2021-06-18 07:01:13 +03:00
Vitaly Provodin
a6f29f4867 JBR-2787 fix copying jcef files into jbr/jbrsdk binaries 2021-06-18 07:01:11 +03:00
Vitaly Provodin
4f68c82fd7 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-18 07:01:10 +03:00
Anton Tarasov
2f07166948 JBR-2016 add jcef module and export packages to it
(cherry picked from commit cf997f71c6)
2021-06-18 07:01:09 +03:00
Vitaly Provodin
008d7eee43 JBR-2473 modify building scripts to add dcevm clauses, add git config to docker image
(cherry picked from commit 2620c62848)
2021-06-18 07:01:08 +03:00
Vitaly Provodin
11713185dc JBR-2473 add initial set of DCEVM patches
(cherry picked from commit c0c0a96cf4)
2021-06-18 07:01:07 +03:00
Vitaly Provodin
4e17fa64f4 JBR-2395 eliminate JavaFX from JBR 2021-06-18 07:01:06 +03:00
Vitaly Provodin
d2a7ea87c0 JBR-2409 fix prameters for configure 2021-06-18 07:01:05 +03:00
Vitaly Provodin
7f42f40db4 JDK14: exclude dependencies on jcef in x86, fastdebug builds 2021-06-18 07:01:04 +03:00
Vitaly Provodin
817f70bdff JBR-2396 fix CONF names 2021-06-18 07:01:03 +03:00
Vitaly Provodin
68f84ba2e0 JBR-2394 replace --disable-debug-symbols with --with-native-debug-symbols=none 2021-06-18 07:01:02 +03:00
Vitaly Provodin
0939a236e4 add exec permitions to configure 2021-06-18 07:01:01 +03:00
Vitaly Provodin
827d1ff80a split checkout before building JBR+JFX or JBR+JCEF on two separate commands 2021-06-18 07:01:00 +03:00
Vitaly Provodin
405515f60f change BOOT_JDK, fix target names 2021-06-18 07:00:58 +03:00
Vitaly Provodin
3e57380f85 JBR-2291 add vendor info into bundles 2021-06-18 07:00:57 +03:00
Vitaly Provodin
db84a1051d JBR-2324 address new layout in mac jcef 80.0.4+g74f7b0c+chromium-80.0.3987.122 2021-06-18 07:00:56 +03:00
Vitaly Provodin
5dc064ab58 JBR-2320 add jdk.attach module into JBR 2021-06-18 07:00:55 +03:00
Vitaly Provodin
908e5cf3fc JBR-2217 provide JCEF-only (no JavaFX) bundle for master/202 branches 2021-06-18 07:00:54 +03:00
Vitaly Provodin
6f2292fe29 JBR-2212 add scripts for linux_x86, linux_aarch64, linux_x64_fastdebug, osx_fastdebug, windows_x86 2021-06-18 07:00:53 +03:00
Vitaly Provodin
ff7a904f37 JBR-1643 fix intermittent fialures of Windows builds at make/Init.gmk:304
combine images and test-image into one make invocation
2021-06-18 07:00:52 +03:00
Vitaly Provodin
a2549d1caf JBR-2181 create two separate JBR bundles with JFX and JFX+JCEF 2021-06-18 07:00:50 +03:00
Vitaly Provodin
1e8510b482 JBR-2148 modify signapp&build scripts to match to the new layout 2021-06-18 07:00:49 +03:00
Vitaly Provodin
1e24fd96b5 JBR-2084 modify scripts to sign Contents/MacOS/libjli.dylib as a a normal file 2021-06-18 07:00:48 +03:00
Vitaly Provodin
4eeb0e9c48 JBR-1821 notarize JBR bundles as a standalone app 2021-06-18 07:00:47 +03:00
Vitaly Provodin
7e541072b8 JBR-2162 move building scripts from TC to JBR repo 2021-06-18 07:00:46 +03:00
Anton Tarasov
ce9acd21c9 JBR-2016 add jcef module and export some sun.* packages to it 2021-06-18 07:00:45 +03:00
Vitaly Provodin
f3f16efcfc JBR-2014 add jdk.hotspot.agent module to jbr 2021-06-18 07:00:44 +03:00
Vitaly Provodin
d3f6573f6b JBR-1286 add jdk.compiler into JBR 2021-06-18 07:00:43 +03:00
Vitaly Provodin
145a7ebe91 JBR-1199 add JBR modules list for jlink 2021-06-18 07:00:42 +03:00
Vitaly Provodin
87f50b5e0c Update docker script to create jdk15 build env 2021-06-18 07:00:41 +03:00
Vitaly Provodin
352d574213 JBR-3045 add pressing ESC to close the dialog after test completion
(cherry picked from commit 44d8b28b0b)
2021-06-18 07:00:40 +03:00
Vitaly Provodin
c869cb05f8 JBR-3040 press the button END at the beggining in order to avoid text selection
(cherry picked from commit 1c2bf33db2)
2021-06-18 07:00:39 +03:00
Vitaly.Provodin
4ce0eeba46 updated JTreg exclude list 2021-06-18 07:00:38 +03:00
3380 changed files with 59351 additions and 129175 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

@@ -9,5 +9,5 @@ RUN wget https://cdn.azul.com/zulu/bin/zulu16.28.11-ca-jdk16.0.0-linux_x64.tar.g
RUN mv /zulu16.28.11-ca-jdk16.0.0-linux_x64 /jdk16.0.0
ENV PATH /opt/rh/devtoolset-8/root/usr/bin:$PATH
RUN mkdir .git
RUN git config user.email "teamcity@jetbrains.com"
RUN git config user.email "builduser@jetbrains.com"
RUN git config user.name "builduser"

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=""
@@ -221,12 +221,6 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE],
AC_ARG_WITH(toolchain-type, [AS_HELP_STRING([--with-toolchain-type],
[the toolchain type (or family) to use, use '--help' to show possible values @<:@platform dependent@:>@])])
# Linux x86_64 needs higher binutils after 8265783
# (this really is a dependency on as version, but we take ld as a check for a general binutils version)
if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
TOOLCHAIN_MINIMUM_LD_VERSION_gcc="2.25"
fi
# Use indirect variable referencing
toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
VALID_TOOLCHAINS=${!toolchain_var_name}
@@ -683,10 +677,9 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
TOOLCHAIN_PREPARE_FOR_LD_VERSION_COMPARISONS
if test "x$TOOLCHAIN_MINIMUM_LD_VERSION" != x; then
AC_MSG_NOTICE([comparing linker version to minimum version $TOOLCHAIN_MINIMUM_LD_VERSION])
TOOLCHAIN_CHECK_LINKER_VERSION(VERSION: $TOOLCHAIN_MINIMUM_LD_VERSION,
IF_OLDER_THAN: [
AC_MSG_ERROR([You are using a linker older than $TOOLCHAIN_MINIMUM_LD_VERSION. This is not a supported configuration.])
AC_MSG_WARN([You are using a linker older than $TOOLCHAIN_MINIMUM_LD_VERSION. This is not a supported configuration.])
]
)
fi

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

@@ -53,8 +53,6 @@ BUILD_JDK_JTREG_EXECUTABLES_CFLAGS_exeJliLaunchTest := \
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjli \
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libjli
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libAsyncStackWalk := $(LIBCXX)
# Platform specific setup
ifeq ($(call isTargetOs, windows), true)
BUILD_JDK_JTREG_EXCLUDE += libDirectIO.c libInheritedChannel.c exelauncher.c
@@ -65,7 +63,6 @@ ifeq ($(call isTargetOs, windows), true)
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeJliLaunchTest := $(WIN_LIB_JLI)
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeCallerAccessTest := jvm.lib
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exerevokeall := advapi32.lib
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libAsyncStackWalk := /EHsc
else
BUILD_JDK_JTREG_LIBRARIES_LIBS_libstringPlatformChars := -ljava
BUILD_JDK_JTREG_LIBRARIES_LIBS_libDirectIO := -ljava

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

@@ -1,74 +0,0 @@
#
# Copyright (c) 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
# are met:
#
# - Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# - Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# - Neither the name of Oracle nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
SOURCEPATH=src
CLASSES=build
DIST=dist
RESOURCES=resources
RENDERPERF_CLASSES = $(CLASSES)/renderperf/RenderPerfTest.class
RENDERPERF_SOURCES = $(SOURCEPATH)/renderperf/RenderPerfTest.java
RENDERPERF_RESOURCES = $(CLASSES)/renderperf/images/duke.png
all: mkdirs $(DIST)/RenderPerfTest.jar
run: mkdirs $(DIST)/RenderPerfTest.jar
java -jar $(DIST)/RenderPerfTest.jar
$(DIST)/RenderPerfTest.jar: \
$(RENDERPERF_CLASSES) $(RENDERPERF_RESOURCES) \
$(CLASSES)/renderperf.manifest
jar cvmf $(CLASSES)/renderperf.manifest $(DIST)/RenderPerfTest.jar -C $(CLASSES) .
$(CLASSES)/renderperf/images/%: $(RESOURCES)/images/%
cp -r $< $@
$(CLASSES)/renderperf.manifest:
echo "Main-Class: renderperf.RenderPerfTest" > $@
$(DIST):
mkdir $(DIST)
$(CLASSES):
mkdir $(CLASSES)
mkdir -p $(CLASSES)/renderperf/images
mkdirs: $(DIST) $(CLASSES)
$(RENDERPERF_CLASSES): $(RENDERPERF_SOURCES)
javac -g:none -d $(CLASSES) -sourcepath $(SOURCEPATH) $<
clean:
rm -rf $(CLASSES)
rm -rf $(DIST)

View File

@@ -1,34 +0,0 @@
-----------------------------------------------------------------------
Introduction
-----------------------------------------------------------------------
RenderPerfTest is a set of on-screen rendering microbenchmarks to
analyze the performance of Java2D graphical primitives rendering
-----------------------------------------------------------------------
How To Compile
-----------------------------------------------------------------------
#> cd RenderPerfTest
The benchmark can be compiled by using either ant:
#> ant
or gnumake (assuming there's 'javac' in the path):
#> gnumake
The jar files will be generated into RenderPerfTest/dist directory.
-----------------------------------------------------------------------
How To Run RenderPerfTest
-----------------------------------------------------------------------
Run all tests
#> ant run
or
#> java -jar dist/RenderPerfTest.jar
Run particular test cases
#> java -jar dist/RenderPerfTest.jar testWhiteTextBubblesGray ...

View File

@@ -1,94 +0,0 @@
<!--
Copyright (c) 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
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of Oracle nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<project name="RenderPerfTest" default="dist" basedir=".">
<description>
simple example build file
</description>
<!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<property name="resources" location="resources"/>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
</target>
<target name="compile" depends="init"
description="compile the source " >
<!-- Compile the java code from ${src} into ${build} -->
<javac includeantruntime="false" debug="off" srcdir="${src}" destdir="${build}"/>
</target>
<target name="run" depends="dist"
description="run RenderPerfTest" >
<java jar="${dist}/RenderPerfTest.jar"
fork="true"
>
</java>
</target>
<target name="resources" depends="init"
description="copy resources into build dir" >
<!-- Copy the resource files from ${resources} into ${build}/ -->
<mkdir dir="${dist}"/>
<mkdir dir="${dist}/renderperf"/>
<mkdir dir="${build}/renderperf/images"/>
<copy todir="${build}/renderperf/images">
<fileset dir="resources/renderperf/images" />
</copy>
</target>
<target name="dist" depends="compile, resources"
description="generate the distribution" >
<!-- Create the distribution directory -->
<mkdir dir="${dist}"/>
<!-- Put everything in ${build} into the J2DBench.jar file -->
<jar jarfile="${dist}/RenderPerfTest.jar" basedir="${build}">
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Main-Class" value="renderperf.RenderPerfTest"/>
</manifest>
</jar>
</target>
<target name="clean"
description="clean up" >
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
</project>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -1,739 +0,0 @@
/*
* Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package renderperf;
import javax.imageio.ImageIO;
import javax.swing.*;
import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.geom.AffineTransform;
import java.awt.geom.Point2D;
import java.awt.geom.QuadCurve2D;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.HashSet;
import java.util.Objects;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicBoolean;
public class RenderPerfTest {
private static HashSet<String> ignoredTests = new HashSet<>();
private final static int N = 1000;
private final static float WIDTH = 800;
private final static float HEIGHT = 800;
private final static float R = 25;
private final static int BW = 50;
private final static int BH = 50;
private final static int COUNT = 300;
private final static int DELAY = 10;
private final static int RESOLUTION = 5;
private final static int COLOR_TOLERANCE = 10;
private final static int MAX_MEASURE_TIME = 5000;
interface Configurable {
void configure(Graphics2D g2d);
}
interface Renderable {
void setup(Graphics2D g2d);
void render(Graphics2D g2d);
void update();
}
static class Particles {
private float[] bx;
private float[] by;
private float[] vx;
private float[] vy;
private float r;
private int n;
private float x0;
private float y0;
private float width;
private float height;
Particles(int n, float r, float x0, float y0, float width, float height) {
bx = new float[n];
by = new float[n];
vx = new float[n];
vy = new float[n];
this.n = n;
this.r = r;
this.x0 = x0;
this.y0 = y0;
this.width = width;
this.height = height;
for (int i = 0; i < n; i++) {
bx[i] = (float) (x0 + r + 0.1 + Math.random() * (width - 2 * r - 0.2 - x0));
by[i] = (float) (y0 + r + 0.1 + Math.random() * (height - 2 * r - 0.2 - y0));
vx[i] = 0.1f * (float) (Math.random() * 2 * r - r);
vy[i] = 0.1f * (float) (Math.random() * 2 * r - r);
}
}
void render(Graphics2D g2d, ParticleRenderer renderer) {
for (int i = 0; i < n; i++) {
renderer.render(g2d, i, bx, by, vx, vy);
}
}
void update() {
for (int i = 0; i < n; i++) {
bx[i] += vx[i];
if (bx[i] + r > width || bx[i] - r < x0) vx[i] = -vx[i];
by[i] += vy[i];
if (by[i] + r > height || by[i] - r < y0) vy[i] = -vy[i];
}
}
}
ParticleRenderable createPR(ParticleRenderer renderer) {
return new ParticleRenderable(renderer);
}
static class ParticleRenderable implements Renderable {
ParticleRenderer renderer;
Configurable configure;
ParticleRenderable(ParticleRenderer renderer, Configurable configure) {
this.renderer = renderer;
this.configure = configure;
}
ParticleRenderable(ParticleRenderer renderer) {
this(renderer, null);
}
@Override
public void setup(Graphics2D g2d) {
if (configure != null) configure.configure(g2d);
}
@Override
public void render(Graphics2D g2d) {
balls.render(g2d, renderer);
}
@Override
public void update() {
balls.update();
}
public ParticleRenderable configure(Configurable configure) {
this.configure = configure;
return this;
}
}
interface ParticleRenderer {
void render(Graphics2D g2d, int id, float[] x, float[] y, float[] vx, float[] vy);
}
static class FlatParticleRenderer implements ParticleRenderer {
Color[] colors;
float r;
FlatParticleRenderer(int n, float r) {
colors = new Color[n];
this.r = r;
for (int i = 0; i < n; i++) {
colors[i] = new Color((float) Math.random(),
(float) Math.random(), (float) Math.random());
}
}
@Override
public void render(Graphics2D g2d, int id, float[] x, float[] y, float[] vx, float[] vy) {
g2d.setColor(colors[id % colors.length]);
g2d.fillOval((int)(x[id] - r), (int)(y[id] - r), (int)(2*r), (int)(2*r));
}
}
static class WhiteTextParticleRenderer implements ParticleRenderer {
float r;
WhiteTextParticleRenderer(float r) {
this.r = r;
}
void setPaint(Graphics2D g2d, int id) {
g2d.setColor(Color.WHITE);
}
@Override
public void render(Graphics2D g2d, int id, float[] x, float[] y, float[] vx, float[] vy) {
setPaint(g2d, id);
g2d.drawString("The quick brown fox jumps over the lazy dog",
(int)(x[id] - r), (int)(y[id] - r));
g2d.drawString("The quick brown fox jumps over the lazy dog",
(int)(x[id] - r), (int)y[id]);
g2d.drawString("The quick brown fox jumps over the lazy dog",
(int)(x[id] - r), (int)(y[id] + r));
}
}
static class TextParticleRenderer extends WhiteTextParticleRenderer {
Color[] colors;
float r;
TextParticleRenderer(int n, float r) {
super(r);
colors = new Color[n];
this.r = r;
for (int i = 0; i < n; i++) {
colors[i] = new Color((float) Math.random(),
(float) Math.random(), (float) Math.random());
}
}
void setPaint(Graphics2D g2d, int id) {
g2d.setColor(colors[id % colors.length]);
}
}
static class LargeTextParticleRenderer extends TextParticleRenderer {
LargeTextParticleRenderer(int n, float r) {
super(n, r);
}
@Override
public void render(Graphics2D g2d, int id, float[] x, float[] y, float[] vx, float[] vy) {
setPaint(g2d, id);
Font font = new Font("LucidaGrande", Font.PLAIN, 32);
g2d.setFont(font);
g2d.drawString("The quick brown fox jumps over the lazy dog",
(int)(x[id] - r), (int)(y[id] - r));
g2d.drawString("The quick brown fox jumps over the lazy dog",
(int)(x[id] - r), (int)y[id]);
g2d.drawString("The quick brown fox jumps over the lazy dog",
(int)(x[id] - r), (int)(y[id] + r));
}
}
static class FlatOvalRotParticleRenderer extends FlatParticleRenderer {
FlatOvalRotParticleRenderer(int n, float r) {
super(n, r);
}
void setPaint(Graphics2D g2d, int id) {
g2d.setColor(colors[id % colors.length]);
}
@Override
public void render(Graphics2D g2d, int id, float[] x, float[] y, float[] vx, float[] vy) {
setPaint(g2d, id);
if (Math.abs(vx[id] + vy[id]) > 0.001) {
AffineTransform t = (AffineTransform) g2d.getTransform().clone();
double l = vx[id] / Math.sqrt(vx[id] * vx[id] + vy[id] * vy[id]);
if (vy[id] < 0) {
l = -l;
}
g2d.translate(x[id], y[id]);
g2d.rotate(Math.acos(l));
g2d.fillOval(-(int)r, (int)(-0.5*r), (int) (2 * r), (int)r);
g2d.setTransform(t);
} else {
g2d.fillOval((int)(x[id] - r), (int)(y[id] - 0.5*r),
(int) (2 * r), (int) r);
}
}
}
static class LinGradOvalRotParticleRenderer extends FlatOvalRotParticleRenderer {
LinGradOvalRotParticleRenderer(int n, float r) {
super(n, r);
}
@Override
void setPaint(Graphics2D g2d, int id) {
Point2D start = new Point2D.Double(- r, - 0.5*r);
Point2D end = new Point2D.Double( 2 * r, r);
float[] dist = {0.0f, 1.0f};
Color[] cls = {colors[id %colors.length], colors[(colors.length - id) %colors.length]};
LinearGradientPaint p =
new LinearGradientPaint(start, end, dist, cls);
g2d.setPaint(p);
}
}
static class FlatBoxParticleRenderer extends FlatParticleRenderer {
FlatBoxParticleRenderer(int n, float r) {
super(n, r);
}
@Override
public void render(Graphics2D g2d, int id, float[] x, float[] y, float[] vx, float[] vy) {
g2d.setColor(colors[id % colors.length]);
g2d.fillRect((int)(x[id] - r), (int)(y[id] - r), (int)(2*r), (int)(2*r));
}
}
static class ImgParticleRenderer extends FlatParticleRenderer {
BufferedImage dukeImg;
ImgParticleRenderer(int n, float r) {
super(n, r);
try {
dukeImg = ImageIO.read(
Objects.requireNonNull(
RenderPerfTest.class.getClassLoader().getResourceAsStream(
"renderperf/images/duke.png")));
} catch (IOException e) {
throw new RuntimeException(e);
}
}
@Override
public void render(Graphics2D g2d, int id, float[] x, float[] y, float[] vx, float[] vy) {
g2d.setColor(colors[id % colors.length]);
g2d.drawImage(dukeImg, (int)(x[id] - r), (int)(y[id] - r), (int)(2*r), (int)(2*r), null);
}
}
static class FlatBoxRotParticleRenderer extends FlatParticleRenderer {
FlatBoxRotParticleRenderer(int n, float r) {
super(n, r);
}
@Override
public void render(Graphics2D g2d, int id, float[] x, float[] y, float[] vx, float[] vy) {
g2d.setColor(colors[id % colors.length]);
if (Math.abs(vx[id] + vy[id]) > 0.001) {
AffineTransform t = (AffineTransform) g2d.getTransform().clone();
double l = vx[id] / Math.sqrt(vx[id] * vx[id] + vy[id] * vy[id]);
if (vy[id] < 0) {
l = -l;
}
g2d.translate(x[id], y[id]);
g2d.rotate(Math.acos(l));
g2d.fillRect(-(int)r, -(int)r, (int) (2 * r), (int) (2 * r));
g2d.setTransform(t);
} else {
g2d.fillRect((int)(x[id] - r), (int)(y[id] - r),
(int) (2 * r), (int) (2 * r));
}
}
}
static class WiredParticleRenderer extends FlatParticleRenderer {
WiredParticleRenderer(int n, float r) {
super(n, r);
}
@Override
public void render(Graphics2D g2d, int id, float[] x, float[] y, float[] vx, float[] vy) {
g2d.setColor(colors[id % colors.length]);
g2d.drawOval((int)(x[id] - r), (int)(y[id] - r), (int)(2*r), (int)(2*r));
}
}
static class WiredBoxParticleRenderer extends FlatParticleRenderer {
WiredBoxParticleRenderer(int n, float r) {
super(n, r);
}
@Override
public void render(Graphics2D g2d, int id, float[] x, float[] y, float[] vx, float[] vy) {
g2d.setColor(colors[id % colors.length]);
g2d.drawRect((int)(x[id] - r), (int)(y[id] - r), (int)(2*r), (int)(2*r));
}
}
static class SegParticleRenderer extends FlatParticleRenderer {
SegParticleRenderer(int n, float r) {
super(n, r);
}
@Override
public void render(Graphics2D g2d, int id, float[] x, float[] y, float[] vx, float[] vy) {
double v = Math.sqrt(vx[id]*vx[id]+vy[id]*vy[id]);
float nvx = (float) (vx[id]/v);
float nvy = (float) (vy[id]/v);
g2d.setColor(colors[id % colors.length]);
g2d.drawLine((int)(x[id] - r*nvx), (int)(y[id] - r*nvy),
(int)(x[id] + 2*r*nvx), (int)(y[id] + 2*r*nvy));
}
}
static class WiredQuadParticleRenderer extends FlatParticleRenderer {
WiredQuadParticleRenderer(int n, float r) {
super(n, r);
}
@Override
public void render(Graphics2D g2d, int id, float[] x, float[] y, float[] vx, float[] vy) {
if (id > 2 && (id % 3) == 0) {
g2d.setColor(colors[id % colors.length]);
g2d.draw(new QuadCurve2D.Float(x[id-3], y[id-3], x[id-2], y[id-2], x[id-1], y[id-1]));
}
}
}
static class FlatQuadParticleRenderer extends FlatParticleRenderer {
FlatQuadParticleRenderer(int n, float r) {
super(n, r);
}
@Override
public void render(Graphics2D g2d, int id, float[] x, float[] y, float[] vx, float[] vy) {
if (id > 2 && (id % 3) == 0) {
g2d.setColor(colors[id % colors.length]);
g2d.fill(new QuadCurve2D.Float(x[id-3], y[id-3], x[id-2], y[id-2], x[id-1], y[id-1]));
}
}
}
static class PerfMeter {
private String name;
private int frame = 0;
private JPanel panel;
private long time;
private double execTime = 0;
private Color expColor = Color.RED;
AtomicBoolean waiting = new AtomicBoolean(false);
private double fps;
PerfMeter(String name) {
this.name = name;
}
PerfMeter exec(final Renderable renderable) throws Exception {
final CountDownLatch latch = new CountDownLatch(COUNT);
final CountDownLatch latchFrame = new CountDownLatch(1);
final long endTime = System.currentTimeMillis() + MAX_MEASURE_TIME;
final JFrame f = new JFrame();
f.addWindowListener(new WindowAdapter() {
@Override
public void windowClosed(WindowEvent e) {
latchFrame.countDown();
}
});
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
panel = new JPanel()
{
@Override
protected void paintComponent(Graphics g) {
super.paintComponent(g);
time = System.nanoTime();
Graphics2D g2d = (Graphics2D) g.create();
renderable.setup(g2d);
renderable.render(g2d);
g2d.setColor(expColor);
g.fillRect(0, 0, BW, BH);
}
};
panel.setPreferredSize(new Dimension((int)(WIDTH + BW), (int)(HEIGHT + BH)));
panel.setBackground(Color.BLACK);
f.add(panel);
f.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
f.pack();
f.setVisible(true);
}
});
Robot robot = new Robot();
Timer timer = new Timer(DELAY, e -> {
if (waiting.compareAndSet(false, true)) {
Color c = robot.getPixelColor(
panel.getTopLevelAncestor().getX() + panel.getTopLevelAncestor().getInsets().left + BW / 2,
panel.getTopLevelAncestor().getY() + panel.getTopLevelAncestor().getInsets().top + BW / 2);
if (isAlmostEqual(c, Color.BLUE)) {
expColor = Color.RED;
} else {
expColor = Color.BLUE;
}
renderable.update();
panel.getParent().repaint();
} else {
while (!isAlmostEqual(
robot.getPixelColor(
panel.getTopLevelAncestor().getX() + panel.getTopLevelAncestor().getInsets().left + BW/2,
panel.getTopLevelAncestor().getY() + panel.getTopLevelAncestor().getInsets().top + BH/2),
expColor))
{
try {
Thread.sleep(RESOLUTION);
} catch (InterruptedException ex) {
ex.printStackTrace();
}
}
time = System.nanoTime() - time;
execTime += time;
frame++;
waiting.set(false);
}
if (System.currentTimeMillis() < endTime) {
latch.countDown();
} else {
while(latch.getCount() > 0) latch.countDown();
}
});
timer.start();
latch.await();
SwingUtilities.invokeAndWait(() -> {
timer.stop();
f.setVisible(false);
f.dispose();
});
latchFrame.await();
if (execTime != 0 && frame != 0) {
fps = 1e9 / (execTime / frame);
} else {
fps = 0;
}
return this;
}
private void report() {
System.err.println(name + " : " + String.format("%.2f FPS", fps));
}
private boolean isAlmostEqual(Color c1, Color c2) {
return Math.abs(c1.getRed() - c2.getRed()) < COLOR_TOLERANCE ||
Math.abs(c1.getGreen() - c2.getGreen()) < COLOR_TOLERANCE ||
Math.abs(c1.getBlue() - c2.getBlue()) < COLOR_TOLERANCE;
}
}
private static final Particles balls = new Particles(N, R, BW, BH, WIDTH, HEIGHT);
private static final ParticleRenderer flatRenderer = new FlatParticleRenderer(N, R);
private static final ParticleRenderer flatOvalRotRenderer = new FlatOvalRotParticleRenderer(N, R);
private static final ParticleRenderer flatBoxRenderer = new FlatBoxParticleRenderer(N, R);
private static final ParticleRenderer flatBoxRotRenderer = new FlatBoxRotParticleRenderer(N, R);
private static final ParticleRenderer linGradOvalRotRenderer = new LinGradOvalRotParticleRenderer(N, R);
private static final ParticleRenderer wiredRenderer = new WiredParticleRenderer(N, R);
private static final ParticleRenderer wiredBoxRenderer = new WiredBoxParticleRenderer(N, R);
private static final ParticleRenderer segRenderer = new SegParticleRenderer(N, R);
private static final ParticleRenderer flatQuadRenderer = new FlatQuadParticleRenderer(N, R);
private static final ParticleRenderer wiredQuadRenderer = new WiredQuadParticleRenderer(N, R);
private static final ParticleRenderer imgRenderer = new ImgParticleRenderer(N, R);
private static final ParticleRenderer textRenderer = new TextParticleRenderer(N, R);
private static final ParticleRenderer largeTextRenderer = new LargeTextParticleRenderer(N, R);
private static final ParticleRenderer whiteTextRenderer = new WhiteTextParticleRenderer(R);
private static final Configurable AA = (Graphics2D g2d) ->
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
private static final Configurable TextLCD = (Graphics2D g2d) ->
g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB);
private static final Configurable TextAA = (Graphics2D g2d) ->
g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
public void testFlatBubbles() throws Exception {
(new PerfMeter("FlatOval")).exec(createPR(flatRenderer)).report();
}
public void testFlatBubblesAA() throws Exception {
(new PerfMeter("FlatOvalAA")).exec(createPR(flatRenderer).configure(AA)).report();
}
public void testFlatBoxBubbles() throws Exception {
(new PerfMeter("FlatBox")).exec(createPR(flatBoxRenderer)).report();
}
public void testFlatBoxBubblesAA() throws Exception {
(new PerfMeter("FlatBoxAA")).exec(createPR(flatBoxRenderer).configure(AA)).report();
}
public void testImgBubbles() throws Exception {
(new PerfMeter("Image")).exec(createPR(imgRenderer)).report();
}
public void testImgBubblesAA() throws Exception {
(new PerfMeter("ImageAA")).exec(createPR(imgRenderer).configure(AA)).report();
}
public void testFlatBoxRotBubbles() throws Exception {
(new PerfMeter("RotatedBox")).exec(createPR(flatBoxRotRenderer)).report();
}
public void testFlatBoxRotBubblesAA() throws Exception {
(new PerfMeter("RotatedBoxAA")).exec(createPR(flatBoxRotRenderer).configure(AA)).report();
}
public void testFlatOvalRotBubbles() throws Exception {
(new PerfMeter("RotatedOval")).exec(createPR(flatOvalRotRenderer)).report();
}
public void testFlatOvalRotBubblesAA() throws Exception {
(new PerfMeter("RotatedOvalAA")).exec(createPR(flatOvalRotRenderer).configure(AA)).report();
}
public void testLinGradOvalRotBubbles() throws Exception {
(new PerfMeter("LinGradRotatedOval")).exec(createPR(linGradOvalRotRenderer)).report();
}
public void testLinGradOvalRotBubblesAA() throws Exception {
(new PerfMeter("LinGradRotatedOvalAA")).exec(createPR(linGradOvalRotRenderer).configure(AA)).report();
}
public void testWiredBubbles() throws Exception {
(new PerfMeter("WiredBubbles")).exec(createPR(wiredRenderer)).report();
}
public void testWiredBubblesAA() throws Exception {
(new PerfMeter("WiredBubblesAA")).exec(createPR(wiredRenderer).configure(AA)).report();
}
public void testWiredBoxBubbles() throws Exception {
(new PerfMeter("WiredBox")).exec(createPR(wiredBoxRenderer)).report();
}
public void testWiredBoxBubblesAA() throws Exception {
(new PerfMeter("WiredBoxAA")).exec(createPR(wiredBoxRenderer).configure(AA)).report();
}
public void testLines() throws Exception {
(new PerfMeter("Lines")).exec(createPR(segRenderer)).report();
}
public void testLinesAA() throws Exception {
(new PerfMeter("LinesAA")).exec(createPR(segRenderer).configure(AA)).report();
}
public void testFlatQuad() throws Exception {
(new PerfMeter("FlatQuad")).exec(createPR(flatQuadRenderer)).report();
}
public void testFlatQuadAA() throws Exception {
(new PerfMeter("FlatQuadAA")).exec(createPR(flatQuadRenderer).configure(AA)).report();
}
public void testWiredQuad() throws Exception {
(new PerfMeter("WiredQuad")).exec(createPR(wiredQuadRenderer)).report();
}
public void testWiredQuadAA() throws Exception {
(new PerfMeter("WiredQuadAA")).exec(createPR(wiredQuadRenderer).configure(AA)).report();
}
public void testTextBubblesNoAA() throws Exception {
(new PerfMeter("TextNoAA")).exec(createPR(textRenderer)).report();
}
public void testTextBubblesLCD() throws Exception {
(new PerfMeter("TextLCD")).exec(createPR(textRenderer).configure(TextLCD)).report();
}
public void testTextBubblesGray() throws Exception {
(new PerfMeter("TextGray")).exec(createPR(textRenderer).configure(TextAA)).report();
}
public void testLargeTextBubblesNoAA() throws Exception {
(new PerfMeter("LargeTextNoAA")).exec(createPR(largeTextRenderer)).report();
}
public void testLargeTextBubblesLCD() throws Exception {
(new PerfMeter("LargeTextLCD")).exec(createPR(largeTextRenderer).configure(TextLCD)).report();
}
public void testLargeTextBubblesGray() throws Exception {
(new PerfMeter("LargeTextGray")).exec(createPR(largeTextRenderer).configure(TextAA)).report();
}
public void testWhiteTextBubblesNoAA() throws Exception {
(new PerfMeter("WhiteTextNoAA")).exec(createPR(whiteTextRenderer)).report();
}
public void testWhiteTextBubblesLCD() throws Exception {
(new PerfMeter("WhiteTextLCD")).exec(createPR(whiteTextRenderer).configure(TextLCD)).report();
}
public void testWhiteTextBubblesGray() throws Exception {
(new PerfMeter("WhiteTextGray")).exec(createPR(whiteTextRenderer).configure(TextAA)).report();
}
public static void main(String[] args)
throws InvocationTargetException, IllegalAccessException, NoSuchMethodException
{
RenderPerfTest test = new RenderPerfTest();
if (args.length > 0) {
for (String testCase : args) {
Method m = RenderPerfTest.class.getDeclaredMethod(testCase);
m.invoke(test);
}
} else {
Method[] methods = RenderPerfTest.class.getDeclaredMethods();
for (Method m : methods) {
if (m.getName().startsWith("test") && !ignoredTests.contains(m.getName())) {
m.invoke(test);
}
}
}
}
}

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;
}
@@ -2463,6 +2438,10 @@ OptoRegPair Matcher::vector_return_value(uint ideal_reg) {
return OptoRegPair(0, 0);
}
const int Matcher::float_pressure(int default_pressure_threshold) {
return default_pressure_threshold;
}
// Is this branch offset short enough that a short branch can be used?
//
// NOTE: If the platform does not provide any short branch variants, then
@@ -2534,7 +2513,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;
}
@@ -2575,39 +2554,6 @@ bool Matcher::is_spillable_arg(int reg)
return can_be_java_arg(reg);
}
uint Matcher::int_pressure_limit()
{
// JDK-8183543: When taking the number of available registers as int
// register pressure threshold, the jtreg test:
// test/hotspot/jtreg/compiler/regalloc/TestC2IntPressure.java
// failed due to C2 compilation failure with
// "COMPILE SKIPPED: failed spill-split-recycle sanity check".
//
// A derived pointer is live at CallNode and then is flagged by RA
// as a spilled LRG. Spilling heuristics(Spill-USE) explicitly skip
// derived pointers and lastly fail to spill after reaching maximum
// number of iterations. Lowering the default pressure threshold to
// (_NO_SPECIAL_REG32_mask.Size() minus 1) forces CallNode to become
// 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;
}
uint Matcher::float_pressure_limit()
{
// _FLOAT_REG_mask is generated by adlc from the float_reg register class.
return (FLOATPRESSURE == -1) ? _FLOAT_REG_mask.Size() : FLOATPRESSURE;
}
bool Matcher::use_asm_for_ldiv_by_con(jlong divisor) {
return false;
}
@@ -2642,13 +2588,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 +3767,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 +3841,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 +5457,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 +8866,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 +14933,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 +16627,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 +16650,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 +16658,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

@@ -361,10 +361,8 @@ void ArrayCopyStub::emit_code(LIR_Assembler* ce) {
ce->add_call_info_here(info());
#ifndef PRODUCT
if (PrintC1Statistics) {
__ lea(rscratch2, ExternalAddress((address)&Runtime1::_arraycopy_slowcase_cnt));
__ incrementw(Address(rscratch2));
}
__ lea(rscratch2, ExternalAddress((address)&Runtime1::_arraycopy_slowcase_cnt));
__ incrementw(Address(rscratch2));
#endif
__ b(_continuation);

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

@@ -44,8 +44,10 @@ define_pd_global(intx, CompileThreshold, 10000);
define_pd_global(intx, OnStackReplacePercentage, 140);
define_pd_global(intx, ConditionalMoveLimit, 3);
define_pd_global(intx, FLOATPRESSURE, 32);
define_pd_global(intx, FreqInlineSize, 325);
define_pd_global(intx, MinJumpTableSize, 10);
define_pd_global(intx, INTPRESSURE, 24);
define_pd_global(intx, InteriorEntryAlignment, 16);
define_pd_global(intx, NewSizeThreadIncrease, ScaleForWordSize(4*K));
define_pd_global(intx, LoopUnrollLimit, 60);

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,16 +362,11 @@ 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;
}
bool frame::optimized_entry_frame_is_first() const {
ShouldNotCallThis();
return false;
}
frame frame::sender_for_optimized_entry_frame(RegisterMap* map) const {
ShouldNotCallThis();
return {};
@@ -814,6 +809,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();

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