Compare commits

...

2479 Commits

Author SHA1 Message Date
Julia Boes
72dfba8053 8257637: Update usage of "type" terminology in java.lang.annotation
Reviewed-by: darcy
2020-12-16 10:46:39 +00:00
Calvin Cheung
b5a3a5b621 8258236: Segfault in ClassListParser::resolve_indy dumping static AppCDS archive
Reviewed-by: redestad, coleenp
2020-12-16 02:37:29 +00:00
Weijun Wang
b97fe6c410 8258419: RSA cipher buffer cleanup
Reviewed-by: valeriep
2020-12-15 22:49:35 +00:00
Tom Rodriguez
1f556d22ca 8258380: [JVMCI] don't clear InstalledCode reference when unloading JVMCI nmethods
Reviewed-by: kvn, eosterlund
2020-12-15 21:31:00 +00:00
Pankaj Bansal
e7aa5fe602 8258427: Problem List some tests related to FileDialog for MacOS
Reviewed-by: prr, serb
2020-12-15 21:28:50 +00:00
Joe Darcy
e9113517d4 8258140: Update @jls tags in java.base for renamed/renumbered sections
Reviewed-by: psandoz
2020-12-15 16:48:31 +00:00
Christian Hagedorn
ce36aeaac3 8257822: C2 crashes with SIGFPE due to a division that floats above its zero check
Reviewed-by: kvn, thartmann
2020-12-15 15:14:34 +00:00
Markus Grönlund
fa1cbb47aa 8258404: Restore stacktrace reuse after 8258094
Reviewed-by: egahlin
2020-12-15 14:48:57 +00:00
Maurizio Cimadamore
7ff9c85639 8258242: Type profile pollution occurs when memory segments of different kinds are used
Reviewed-by: vlivanov, redestad
2020-12-15 13:50:40 +00:00
Richard Reingruber
09e8675f56 8255381: com/sun/jdi/EATests.java should not suspend graal threads
Reviewed-by: cjplummer, mdoerr, sspitsyn
2020-12-15 08:38:58 +00:00
Markus Grönlund
afc44414d5 8258094: AIX build fails after 8257602
Reviewed-by: rrich, stuefe, egahlin
2020-12-14 11:36:01 +00:00
Hannes Wallnöfer
164c8a6e18 8258092: Link to early access platform documentation in TestHtmlTableTags.java
Reviewed-by: jjg
2020-12-14 08:08:57 +00:00
Martin Buchholz
43dc3f7992 8254350: CompletableFuture.get may swallow InterruptedException
Reviewed-by: alanb, dl
2020-12-13 19:17:36 +00:00
Aleksey Shipilev
6d79ec87fb 8258111: Problemlist compiler/blackhole tests for -Xcomp until JDK-8258101 is fixed
Reviewed-by: iignatyev, kvn
2020-12-12 06:09:57 +00:00
Mandy Chung
2001da3dd4 8257596: Clarify trusted final fields for record classes
Reviewed-by: hseigel, chegar, psandoz
2020-12-11 22:44:48 +00:00
Vladimir Ivanov
b1afed7501 8257919: [JVMCI] profiling info didn't change after reprofile
Reviewed-by: kvn, redestad
2020-12-11 21:50:49 +00:00
Vicente Romero
b7ac32d6ee 8257598: Clarify what component values are used in Record::equals
Reviewed-by: darcy, chegar
2020-12-11 19:16:34 +00:00
Joe Darcy
a280182956 8258060: Update @jls tags for renamed/renumbered sections
Reviewed-by: jjg, abuckley
2020-12-11 18:38:45 +00:00
Thomas Schatzl
bacf22b907 8256641: CDS VM operations do not lock the heap
Reviewed-by: kbarrett, iklam
2020-12-11 18:14:37 +00:00
Yudi Zheng
58dca9253d 8257910: [JVMCI] Set exception_seen accordingly in the runtime.
Reviewed-by: kvn
2020-12-10 22:43:37 +00:00
Markus Grönlund
e90d0d1da4 8258065: ProblemList JfrGTestAdaptiveSampling
Reviewed-by: iignatyev
2020-12-10 22:25:23 +00:00
Doug Simon
fa77008f19 8258015: [JVMCI] JVMCI_lock shouldn't be held while initializing box classes
Reviewed-by: kvn
Backport-of: d163c6fe2e
2020-12-10 21:18:35 +00:00
Maurizio Cimadamore
37043b0557 8257837: Performance regression in heap byte buffer views
Reviewed-by: chegar, roland
2020-12-10 15:32:36 +00:00
Magnus Ihse Bursie
0890620c94 8258005: JDK build fails with incorrect fixpath script
Co-authored-by: Mikael Vidstedt <mikael@openjdk.org>
Reviewed-by: erikj
2020-12-10 14:54:40 +00:00
Markus Grönlund
502a5241e5 8257602: Introduce JFR Event Throttling and new jdk.ObjectAllocationSample event (enabled by default)
Co-authored-by: Jaroslav Bachorik <jbachorik@openjdk.org>
Reviewed-by: egahlin, jbachorik
2020-12-10 12:33:48 +00:00
Dong Bo
026b09cf64 8257483: C2: Split immediate vector rotate from RotateLeftV and RotateRightV nodes
Reviewed-by: vlivanov
2020-12-10 12:26:04 +00:00
Per Liden
0a0691ebcf 8257901: ZGC: Take virtual memory usage into account when sizing heap
Reviewed-by: stefank, eosterlund, ayang, tschatzl
2020-12-10 11:10:38 +00:00
Christoph Langer
29ffffa7b9 8257997: sun/security/ssl/SSLSocketImpl/SSLSocketLeak.java again reports leaks after JDK-8257884
Reviewed-by: mbaesken
2020-12-10 10:56:36 +00:00
Kim Barrett
db5da9619b 8257876: Avoid Reference.isEnqueued in tests
Reviewed-by: mchung, tschatzl
2020-12-10 10:34:47 +00:00
Daniel Fuchs
4a839e95de 8256459: java/net/httpclient/ManyRequests.java and java/net/httpclient/LineBodyHandlerTest.java fail infrequently with java.net.ConnectException: Connection timed out: no further information
Reviewed-by: chegar
2020-12-10 10:09:29 +00:00
Roland Westrelin
d93293f31b 8256730: Code that uses Object.checkIndex() range checks doesn't optimize well
Reviewed-by: vlivanov, thartmann
2020-12-10 08:09:08 +00:00
Sandhya Viswanathan
869dcb6f50 8257806: Optimize x86 allTrue and anyTrue vector mask operations of Vector API
Reviewed-by: kvn, psandoz
2020-12-10 04:31:27 +00:00
Koichi Sakata
34650f52b5 8257872: UL: -Xlog does not check number of options
Reviewed-by: dholmes, iklam, ysuenaga
2020-12-10 04:05:18 +00:00
Michael Edgar
6847bbbb11 8255918: XMLStreamFilterImpl constructor consumes XMLStreamException
Reviewed-by: joehw
2020-12-10 03:40:01 +00:00
Joe Darcy
d2f9e31ae4 8257638: Update usage of "type" terminology in javax.lang.model
Reviewed-by: jjg
2020-12-10 02:59:26 +00:00
Phil Race
f631a9901f 8256888: Client manual test problem list update
Reviewed-by: serb
2020-12-10 01:36:52 +00:00
Alexander Matveev
eb1c8a15b6 8257924: Use full path when running external executable from jpackage
Reviewed-by: herrick, asemenyuk
2020-12-10 01:01:38 +00:00
Andy Herrick
1ce2a36c7b 8257539: tools/jpackage/windows/WinL10nTest.java unpack.bat failed with Exit code: 1618
Reviewed-by: almatvee, asemenyuk, prr, kizune
2020-12-10 00:50:28 +00:00
Toshio Nakamura
53e537c738 8255387: Japanese characters were printed upside down on AIX
Reviewed-by: prr, serb
2020-12-10 00:27:44 +00:00
Coleen Phillimore
0a3e446ad9 8257993: vmTestbase/nsk/jvmti/RedefineClasses/StressRedefine/TestDescription.java crash intermittently
Reviewed-by: sspitsyn, hseigel, dholmes
2020-12-09 23:08:52 +00:00
Guoxiong Li
46c9a860b6 8245956: JavaCompiler still uses File API instead of Path API in a specific case
Reviewed-by: jjg
2020-12-09 21:09:23 +00:00
Doug Simon
baf4c1a4af 8257917: [JVMCI] crash when materializing boxed values under -Xcomp
Reviewed-by: iveresov, kvn
2020-12-09 20:26:55 +00:00
Vladimir Kozlov
fd5f6e2e19 8257986: [JVMCI] ProblemList 2 reprofile JVMCI tests
Reviewed-by: iignatyev
2020-12-09 19:21:53 +00:00
Andrey Turbanov
30de320c01 6882207: Convert javap to use diamond operator internally
Reviewed-by: jjg
2020-12-09 19:20:13 +00:00
Harold Seigel
d33a689b96 8256867: Classes with empty PermittedSubclasses attribute cannot be extended
Reviewed-by: lfoltan, mchung, jlahoda, chegar
2020-12-09 19:07:11 +00:00
Alexander Matveev
e6b4c4d716 8238781: [macos] jpackage tests failed due to "hdiutil: convert failed" in various ways
Reviewed-by: herrick, asemenyuk
2020-12-09 19:02:15 +00:00
Marcus G K Williams
b977a7b8a5 8257989: Error in gtest os_page_size_for_region_unaligned after 8257588
Reviewed-by: stuefe
2020-12-09 18:59:09 +00:00
Mandy Chung
5f03341211 8052260: Reference.isEnqueued() spec does not match the long-standing behavior returning true iff it's in the ref queue
Reviewed-by: kbarrett, alanb
2020-12-09 17:27:02 +00:00
Patrick Concannon
6dd06add9d 8254996: make jdk.net.UnixDomainPrincipal a record class
Reviewed-by: dfuchs, michaelm
2020-12-09 17:03:07 +00:00
Jan Lahoda
bd22aa5e86 8229862: NPE in jdk.compiler/com.sun.tools.javac.jvm.Code.emitop0(Code.java:570)
Co-authored-by: Bernard Blaser <bsrbnd@openjdk.org>
Reviewed-by: vromero
2020-12-09 16:49:50 +00:00
Eric Caspole
cf62b0ad86 8257518: LogCompilation: java.lang.InternalError with JFR turned on
Reviewed-by: kvn, redestad
2020-12-09 15:55:33 +00:00
Magnus Ihse Bursie
6c69eca380 8257973: UTIL_LOOKUP_PROGS should only find executable files
Reviewed-by: erikj
2020-12-09 15:41:08 +00:00
Jan Lahoda
6eff9315e1 8256950: Add record attribute support to symbol generator CreateSymbols
Reviewed-by: jjg, chegar
2020-12-09 15:05:01 +00:00
Christian Hagedorn
f148915d54 8245107: Use Unified Logging in trace_method_handle_stub()
Reviewed-by: coleenp, mdoerr
2020-12-09 14:36:13 +00:00
Martin Doerr
0201a33dd6 8255959: Timeouts in VectorConversion tests
Reviewed-by: psandoz, stuefe
2020-12-09 13:17:50 +00:00
Bernhard Urban-Forster
d3dddb6a56 8256657: Add cross-compiled build for Windows+Arm64 to submit workflow
Reviewed-by: shade, ihse
2020-12-09 11:21:37 +00:00
Ivan Šipka
616b1f12bd 8257516: define test group for manual tests
Reviewed-by: iignatyev
2020-12-09 10:28:04 +00:00
Julia Boes
5bdce9b995 8257639: Update usage of "type" terminology in java.lang.Enum & java.lang.Record
Reviewed-by: chegar, dfuchs
2020-12-09 09:32:22 +00:00
Hannes Wallnöfer
b4615c67a3 8256580: Fault in new grid display
Reviewed-by: jjg
2020-12-09 09:21:50 +00:00
Jie Fu
df55ecd83c 8257794: Zero: assert(istate->_stack_limit == istate->_thread->last_Java_sp() + 1) failed: wrong on Linux/x86_32
Reviewed-by: shade
2020-12-09 09:01:07 +00:00
Christoph Langer
fae7961a03 8257884: Re-enable sun/security/ssl/SSLSocketImpl/SSLSocketLeak.java as automatic test
Reviewed-by: xuelei
2020-12-09 08:12:09 +00:00
Per Liden
79f1dfb8d3 8255987: JDI tests fail with com.sun.jdi.ObjectCollectedException
Reviewed-by: dholmes, cjplummer
2020-12-09 07:46:04 +00:00
Aleksey Shipilev
9ce3d806fa 8257887: java/foreign/TestSegments.java test fails on 32-bit after JDK-8257186
Reviewed-by: jiefu, adityam, redestad
2020-12-09 06:42:38 +00:00
Igor Veresov
10da767c2f 8257847: Tiered should publish MDO data pointer for interpreter after profile start
Reviewed-by: thartmann, kvn, dlong
2020-12-09 04:28:59 +00:00
Joe Darcy
2a62d5d34f 8256917: Use combo @returns tag in java.compiler javadoc
Reviewed-by: jjg, iris
2020-12-09 02:37:30 +00:00
Jonathan Gibbons
b29f9cd7b0 8075778: Add javadoc tag to avoid duplication of return information in simple situations.
Reviewed-by: prappo, jlahoda
2020-12-08 23:25:08 +00:00
Dan Smith
48d8650ae1 8257845: Integrate JEP 390
8254047: [JEP 390] Revise "value-based class" & apply to wrappers
8252181: [JEP 390] Define & apply annotation jdk.internal.ValueBased
8252183: [JEP 390] Add 'lint' warning for @ValueBased classes
8257027: [JEP 390] Diagnose synchronization on @ValueBased classes
8252180: [JEP 390] Deprecate wrapper class constructors for removal

Co-authored-by: Roger Riggs <rriggs@openjdk.org>
Co-authored-by: Srikanth Adayapalam <sadayapalam@openjdk.org>
Co-authored-by: Lois Foltan <lfoltan@openjdk.org>
Reviewed-by: rriggs, hseigel, mchung, darcy
2020-12-08 23:04:01 +00:00
Mark Reinhold
ed4c4ee73b 8256299: Implement JEP 396: Strongly Encapsulate JDK Internals by Default
Co-authored-by: Alan Bateman <alanb@openjdk.org>
Reviewed-by: mchung, alanb
2020-12-08 22:12:24 +00:00
Marius Volkhart
c47ab5f6b7 8256515: javax.xml.XMLEventReader produces incorrect START_DOCUMENT event
Reviewed-by: joehw
2020-12-08 20:43:42 +00:00
Calvin Cheung
291ba97fab 8251267: CDS tests should use CDSTestUtils.getOutputDir instead of System.getProperty("user.dir")
Reviewed-by: minqi, iklam
2020-12-08 20:00:10 +00:00
Erik Joelsson
f48d5d1b7e 8257789: Fix incremental build of test-image and bundles
Reviewed-by: tbell, ihse
2020-12-08 18:45:38 +00:00
Brent Christian
1a9ed92d6f 8200102: NativeLibraryTest.java fails intermittently, unloaded count is not same as expected
Reviewed-by: mchung, naoto
2020-12-08 18:01:04 +00:00
Magnus Ihse Bursie
264feb35ff 8257905: Make fixpath.sh more liberal in accepting paths embedded in arguments
Reviewed-by: erikj
2020-12-08 17:59:35 +00:00
Vladimir Ivanov
044616bd71 8252049: Native memory leak in ciMethodData ctor
Reviewed-by: kbarrett, coleenp
2020-12-08 17:02:09 +00:00
Daniel Fuchs
fab6158c19 8236413: AbstractConnectTimeout should tolerate both NoRouteToHostException and UnresolvedAddressException
Reviewed-by: aefimov, michaelm
2020-12-08 16:36:04 +00:00
Gerard Ziemski
936a7acf32 8252797: Non-PCH build fails on Ubuntu 16.4 when building with gtests
Reviewed-by: dholmes
2020-12-08 15:49:11 +00:00
Jan Lahoda
d0c526513d 8256149: Weird AST structure for incomplete member select
Reviewed-by: vromero
2020-12-08 13:09:15 +00:00
Maurizio Cimadamore
a70802477e 8257194: Add 'foreign linker API' in 'jdk.incubator.foreign' module desc/summary
Reviewed-by: jvernee, shade
2020-12-08 12:15:13 +00:00
Aleksey Shipilev
35e81536e7 8257848: -XX:CompileCommand=blackhole,* should be diagnostic
Reviewed-by: vlivanov
2020-12-08 10:11:01 +00:00
Athijegannathan Sundararajan
d2b66196b4 8242258: (jrtfs) Path::toUri throws AssertionError for malformed input
Reviewed-by: alanb
2020-12-08 09:38:38 +00:00
Kim Barrett
52ab72127d 8254733: HotSpot Style Guide should permit using range-based for loops
Reviewed-by: dholmes, pliden, jrose, dcubed, iklam, eosterlund, tschatzl, kvn
2020-12-08 09:25:42 +00:00
Christian Hagedorn
1d0adbb812 8253644: C2: assert(skeleton_predicate_has_opaque(iff)) failed: unexpected
Reviewed-by: roland, kvn
2020-12-08 08:48:58 +00:00
Jan Lahoda
51ac37686c 8256411: Based anonymous classes have a weird end position
Reviewed-by: vromero
2020-12-08 08:38:24 +00:00
Roland Westrelin
0b6b6eb59a 8257813: [redo] C2: Filter type in PhiNode::Value() for induction variables of trip-counted integer loops
Reviewed-by: chagedorn, kvn
2020-12-08 08:30:18 +00:00
Jamil Nimeh
500ab45770 8257769: Cipher.getParameters() throws NPE for ChaCha20-Poly1305
Reviewed-by: mullan, valeriep
2020-12-08 06:10:10 +00:00
Vicente Romero
6ff18e38b4 8257855: Example SafeVarargsNotApplicableToRecordAccessors breaks test tools/javac/diags/CheckExamples.java
Reviewed-by: jjg
2020-12-08 04:07:38 +00:00
Erik Gahlin
cef606feca 8253762: JFR: getField(String) should be able to access subfields
Reviewed-by: mgronlun
2020-12-08 00:06:20 +00:00
Xue-Lei Andrew Fan
39b8a2e682 8257670: sun/security/ssl/SSLSocketImpl/SSLSocketLeak.java reports leaks
Reviewed-by: jnimeh
2020-12-07 23:53:17 +00:00
Jie Fu
c43c224ef9 8257796: [TESTBUG] TestUseSHA512IntrinsicsOptionOnSupportedCPU.java fails on x86_32
Reviewed-by: kvn
2020-12-07 22:59:51 +00:00
Vladimir Ivanov
62c7788b29 8257211: C2: Enable call devirtualization during post-parse phase
Reviewed-by: kvn, neliasso, thartmann
2020-12-07 22:50:38 +00:00
David Holmes
149a02f99a 8257572: Deprecate the archaic signal-chaining interfaces: sigset and signal
Reviewed-by: ihse, alanb, dcubed, erikj
2020-12-07 21:56:05 +00:00
Eric Caspole
f92745d73e 8257718: LogCompilation: late_inline doesnt work right for JDK 8 logs
Reviewed-by: redestad, kvn
2020-12-07 21:31:19 +00:00
Joe Darcy
6937d9f9dd 8257799: Update JLS cross-references in java.compiler
Reviewed-by: jjg
2020-12-07 20:46:22 +00:00
Dean Long
a5297bd0d4 8254939: macOS: unused function 'replicate4_imm'
Reviewed-by: redestad, thartmann
2020-12-07 20:10:07 +00:00
Aleksey Shipilev
36c0600523 8257805: Add compiler/blackhole tests to tier1
Reviewed-by: kvn
2020-12-07 19:26:40 +00:00
Zhengyu Gu
395b6bdeee 8257817: Shenandoah: Don't race with conc-weak-in-progress flag in weak-LRB
Reviewed-by: rkennke
2020-12-07 19:19:23 +00:00
Alexander Matveev
a265c20138 8255619: Localized WinResources.properties have MsiInstallerStrings_en.wxl resource
Reviewed-by: herrick, naoto, asemenyuk
2020-12-07 18:11:35 +00:00
Andy Herrick
e3793e5a60 8257514: Fix the issues in jdk.jpackage identified by SpotBugs
Reviewed-by: asemenyuk, almatvee, shade
2020-12-07 18:04:04 +00:00
Maurizio Cimadamore
bbc44f57c4 8257186: Size of heap segments is not computed correctlyFix overflow in size computation for heap segments
Reviewed-by: jvernee, chegar
2020-12-07 17:25:23 +00:00
Vicente Romero
b4b9828cb0 8254784: javac should reject records with @SafeVarargs applied to varargs record component
Reviewed-by: mcimadamore
2020-12-07 16:45:51 +00:00
Xue-Lei Andrew Fan
dcf63f8578 8257788: Class fields could be local in the SunJSSE provider
Reviewed-by: shade
2020-12-07 16:35:01 +00:00
Magnus Ihse Bursie
d29c78da19 8257679: Improved unix compatibility layer in Windows build (winenv)
Reviewed-by: erikj, jvernee, burban
2020-12-07 15:55:53 +00:00
Eric Caspole
74be819088 8257517: LogCompilation: Add -z to the help messages
Reviewed-by: redestad
2020-12-07 15:41:03 +00:00
Guoxiong Li
2c04fc02c9 8257037: No javac warning when calling deprecated constructor with diamond
Reviewed-by: mcimadamore
2020-12-07 13:51:33 +00:00
Martin Doerr
46b35acfcb 8257798: [PPC64] undefined reference to Klass::vtable_start_offset()
Reviewed-by: goetz
2020-12-07 13:45:19 +00:00
Zhengyu Gu
ecd7e476f8 8257793: Shenandoah: SATB barrier should only filter out already strongly marked oops
Reviewed-by: shade, rkennke
2020-12-07 13:18:02 +00:00
Thomas Schatzl
e08b9ed0be 8257820: Remove gc/ergonomics/TestMinHeapSize.java as it is too brittle
Reviewed-by: jiefu, kbarrett
2020-12-07 12:43:35 +00:00
Jan Lahoda
637b0c64b0 8246778: Compiler implementation for Sealed Classes (Second Preview)
Co-authored-by: Vicente Romero <vromero@openjdk.org>
Co-authored-by: Harold Seigel <hseigel@openjdk.org>
Reviewed-by: lfoltan, mchung, alanb, mcimadamore, chegar
2020-12-07 11:11:31 +00:00
Erik Gahlin
09707dd4f2 8252807: The jdk.jfr.Recording.getStream does not work when toDisk is disabled
Reviewed-by: mgronlun
2020-12-07 11:09:25 +00:00
Jorn Vernee
04ce8e3840 8257184: Upstream 8252504: Add a method to MemoryLayout which returns a offset-computing method handle
Reviewed-by: mcimadamore, chegar
2020-12-07 11:08:24 +00:00
Chris Hegarty
5a03e47605 8255560: Class::isRecord should check that the current class is final and not abstract
Reviewed-by: mchung, darcy
2020-12-07 11:02:52 +00:00
Thomas Stuefe
8e8e584552 8257588: Make os::_page_sizes a bitmask
Reviewed-by: tschatzl, stefank
2020-12-07 10:32:05 +00:00
Daniel Fuchs
566d77a2ae 8254802: ThrowingPushPromisesAsStringCustom.java fails in "try throwing in GET_BODY"
Reviewed-by: michaelm
2020-12-07 09:58:16 +00:00
Roland Westrelin
f5a582c287 8257575: C2: "failed: only phis" assert failure in loop strip mining verification
Reviewed-by: thartmann, neliasso
2020-12-07 09:38:22 +00:00
Julia Boes
d05401d886 8256679: Update serialization javadoc once JOSS changes for records are complete
Reviewed-by: chegar, rriggs
2020-12-07 09:30:52 +00:00
Jie Fu
7620124ee9 8257230: assert(InitialHeapSize >= MinHeapSize) failed: Ergonomics decided on incompatible initial and minimum heap sizes
Reviewed-by: tschatzl, sjohanss
2020-12-07 09:27:33 +00:00
Aleksey Shipilev
05dac03f36 8257803: Add -Xbatch to compiler/blackhole tests
Reviewed-by: dholmes
2020-12-07 06:43:34 +00:00
Lin Zang
29a09c8911 8257668: SA JMap - skip non-java thread stack dump for heap dump
Reviewed-by: cjplummer, sspitsyn, phh
2020-12-07 04:01:51 +00:00
Aleksey Shipilev
e590618962 8252505: C1/C2 compiler support for blackholes
Reviewed-by: vlivanov, aph
2020-12-06 17:43:34 +00:00
Mandy Chung
972bc3b408 8256167: Convert JDK use of Reference::get to Reference::refersTo
Reviewed-by: sspitsyn, shade, dfuchs, alanb, kbarrett
2020-12-06 00:08:22 +00:00
Valerie Peng
78be334c38 8242332: Add SHA3 support to SunPKCS11 provider
Reviewed-by: xuelei
2020-12-05 23:47:35 +00:00
Martin Buchholz
c4339c3064 8243614: Typo in ReentrantLock's Javadoc
Reviewed-by: dholmes, alanb
2020-12-05 08:44:22 +00:00
Sergey Bylokhov
d3ac1bf16c 8198390: Test MultiResolutionDrawImageWithTransformTest.java fails when -esa is passed
Reviewed-by: kizune
2020-12-04 23:06:07 +00:00
Erik Joelsson
51d325e613 8257633: Missing -mmacosx-version-min=X flag when linking libjvm
Reviewed-by: mikael
2020-12-04 21:40:39 +00:00
Brian Burkhalter
e27ea4d12c 8257750: writeBuffer field of java.io.DataOutputStream should be final
Reviewed-by: lancea, naoto
2020-12-04 20:32:07 +00:00
Vladimir Kozlov
dd0b9454a2 8257531: Super word not applied to a loop of simple Buffer operations
Reviewed-by: roland, psandoz
2020-12-04 19:23:52 +00:00
Xue-Lei Andrew Fan
d76039d3dc 8257725: No throws of SSLHandshakeException
Reviewed-by: jnimeh
2020-12-04 18:29:55 +00:00
Xue-Lei Andrew Fan
fcc84795f6 8257724: Incorrect package of the linked class in BaseSSLSocketImpl
Reviewed-by: valeriep, wetmore
2020-12-04 18:20:14 +00:00
Calvin Cheung
d8ac76fa09 8257651: LambdaEagerInit.java test failed in 2 different ways
Reviewed-by: iklam, lfoltan
2020-12-04 17:07:00 +00:00
Mikhailo Seledtsov
3eb694605e 8257732: Problem list TestJFRWithJMX for OL 8.2 until the issue is resolved
Reviewed-by: hseigel
2020-12-04 16:38:21 +00:00
Kartik Ohri
ac54900849 8257401: Use switch expressions in jdk.internal.net.http and java.net.http
Reviewed-by: chegar, dfuchs, pconcannon
2020-12-04 15:15:56 +00:00
Roland Westrelin
86b65756cb 8257574: C2: "failed: parsing found no loops but there are some" assert failure
Reviewed-by: thartmann, neliasso, chagedorn
2020-12-04 12:01:53 +00:00
Maurizio Cimadamore
dede01eb20 8257622: MemoryAccess methods are missing @ForceInline annotations
Reviewed-by: jvernee, shade
2020-12-04 11:46:06 +00:00
Martin Doerr
1d2d9815d0 8257423: [PPC64] Support -XX:-UseInlineCaches
Reviewed-by: stuefe, rrich
2020-12-04 11:24:15 +00:00
Erik Gahlin
feabddee56 8251843: jfr/tool/TestPrintJSON.java fails intermittently
Reviewed-by: mgronlun
2020-12-04 10:37:59 +00:00
Andrey Turbanov
c6f93ec9f2 8257707: Fix incorrect format string in Http1HeaderParser
Reviewed-by: shade
2020-12-04 10:19:30 +00:00
Vladimir Ivanov
fbdc1877e2 8257624: C2: PhaseMacroExpand::eliminate_macro_nodes() crashes on out-of-bounds access into macro node array
Reviewed-by: neliasso, kvn
2020-12-04 09:37:18 +00:00
Vladimir Ivanov
fd6756ee2b 8257634: C2: Introduce IncrementalInliningForceCleanup diagnostic flag
Reviewed-by: kvn, adityam, thartmann
2020-12-04 09:24:08 +00:00
Hao Sun
af6b7f9c55 8257743: Minimal build on AArch64 failed with --disable-precompiled-headers
Reviewed-by: shade
2020-12-04 09:12:30 +00:00
Alexander Scherbatiy
d6dd440c76 8256264: Printed GlyphVector outline with low DPI has bad quality on Windows
Reviewed-by: serb
2020-12-04 09:02:20 +00:00
Alan Bateman
2b4a423fd7 8255542: Attribute length of Module, ModulePackages and other attributes is ignored
Reviewed-by: mchung, dfuchs, chegar
2020-12-04 08:59:14 +00:00
Thomas Schatzl
ca402671af 8257509: Strengthen requirements to call G1HeapVerifier::verify(VerifyOption)
Reviewed-by: sjohanss, ayang
2020-12-04 08:40:12 +00:00
Christian Hagedorn
4a85514963 8257182: JCK test failures in integer / long rotation tests
Reviewed-by: mdoerr, vlivanov, thartmann, kvn
2020-12-04 08:10:31 +00:00
Vladimir Ivanov
f33808ffc9 8257631: C2: Assertion failure in ArrayCopyNode::get_count() during late inlining
Reviewed-by: neliasso, kvn, thartmann
2020-12-04 07:55:40 +00:00
Vladimir Ivanov
417e7e6317 8257632: C2: Late inlining attempt on a call with a dead memory crashes
Reviewed-by: neliasso, kvn, thartmann
2020-12-04 07:55:04 +00:00
Vladimir Ivanov
6845fee905 8257625: C2: Harden input checks in vector intrinsics
Reviewed-by: thartmann
2020-12-04 07:54:24 +00:00
Vladimir Ivanov
4390f2c8c3 8257630: C2: ReplacedNodes doesn't handle non-CFG multi nodes
Reviewed-by: neliasso, kvn, thartmann
2020-12-04 07:53:17 +00:00
Andrey Turbanov
d08c612b40 8257708: Remove redundant unmodifiableSet wrapper from already immutable set returned by Collections.singleton
Reviewed-by: shade, sspitsyn
2020-12-04 06:32:14 +00:00
Valerie Peng
49f9e57715 8257734: Extraneous output in HmacSHA3_512 constructor
Reviewed-by: ascarpino
2020-12-04 03:52:04 +00:00
Andrey Turbanov
f83fd4acb4 8257438: Avoid adding duplicate values into extendedKeyCodesSet
Reviewed-by: serb
2020-12-03 23:11:55 +00:00
Jie Fu
37c7835c78 8257673: Build fails without shenandoahgc after JDK-8257563
Reviewed-by: aph, shade
2020-12-03 23:09:07 +00:00
Mandy Chung
f0b1194004 8235784: java/lang/invoke/VarHandles/VarHandleTestByteArrayAsInt.java fails due to timeout with fastdebug bits
Reviewed-by: bchristi, naoto
2020-12-03 22:14:52 +00:00
Erik Joelsson
36209b70da 8257547: Handle multiple prereqs on the same line in deps files
Reviewed-by: ihse, tbell
2020-12-03 21:41:37 +00:00
Alex Menkov
c5b32b33eb 8256808: com/sun/jdi/CatchAllTest.java failed with "NullPointerException: Cannot invoke "lib.jdb.Jdb.log(String)" because "this.jdb" is null"
Reviewed-by: cjplummer, sspitsyn
2020-12-03 21:31:33 +00:00
Sergey Bylokhov
85269470e5 6508941: java.awt.Desktop.open causes VM to crash with video files sporadically
Reviewed-by: kizune, aivanov
2020-12-03 20:08:09 +00:00
Zhengyu Gu
7c7facc234 8257701: Shenandoah: objArrayKlass metadata is not marked with chunked arrays
Reviewed-by: shade
2020-12-03 19:58:58 +00:00
Stuart Marks
2b73f9929f 8228615: Optional.empty doc should suggest using isEmpty
Reviewed-by: lancea, bpb, naoto
2020-12-03 19:32:53 +00:00
Amit Pawar
805d05812c 8254699: Suboptimal PreTouchParallelChunkSize defaults and limits
Reviewed-by: tschatzl, sjohanss
2020-12-03 19:05:04 +00:00
Zhengyu Gu
e29ee5b8a5 8257641: Shenandoah: Query is_at_shenandoah_safepoint() from control thread should return false
Reviewed-by: shade
2020-12-03 18:42:42 +00:00
Anthony Scarpino
55f5542ca2 8026976: ECParameters, Point does not match field size
Reviewed-by: xuelei
2020-12-03 18:05:53 +00:00
Volker Simonis
d3f3c32282 8255742: PrintInlining as compiler directive doesn't print virtual calls
Reviewed-by: thartmann, kvn
2020-12-03 18:02:05 +00:00
Vladimir Kozlov
6c9482eef5 8257561: Some code is not vectorized after 8251925 and 8250607
Reviewed-by: chagedorn, vlivanov, thartmann
2020-12-03 17:02:04 +00:00
Anthony Scarpino
70517c83c2 8257642: CipherByteBufferOverwriteTest copyright issue
Reviewed-by: xuelei, wetmore
2020-12-03 16:29:16 +00:00
Evgeny Astigeevich
e836396207 8257436: [aarch64] Regressions in ArrayCopyUnalignedDst.testByte/testChar for 65-78 bytes when UseSIMDForMemoryOps is on
Reviewed-by: simonis
2020-12-03 15:55:32 +00:00
Julia Boes
b170c8376d 8257591: Remove suppression of record preview related warnings in java.lang
Reviewed-by: chegar
2020-12-03 15:48:03 +00:00
Evan Whelan
66a2e70985 8255845: Memory leak in imageFile.cpp
Reviewed-by: jlaskey, sundar
2020-12-03 15:28:42 +00:00
Doug Simon
fa58671f9f 8257020: [JVMCI] enable a JVMCICompiler to specify which GCs it supports
Reviewed-by: stefank, kvn
2020-12-03 13:42:50 +00:00
Tobias Hartmann
129c37700f 8257594: C2 compiled checkcast of non-null object triggers endless deoptimization/recompilation cycle
Reviewed-by: roland, vlivanov
2020-12-03 13:42:19 +00:00
Harold Seigel
e4497c9e69 8256718: Obsolete the long term deprecated and aliased Trace flags
Reviewed-by: sspitsyn, iklam, dholmes, coleenp
2020-12-03 13:14:57 +00:00
Richard Reingruber
4a267f1bc2 8244847: Linux/PPC: runtime/CompressedOops/CompressedClassPointers: smallHeapTest fails
Reviewed-by: stuefe, mdoerr
2020-12-03 08:50:08 +00:00
Thomas Stuefe
b44a329f91 8256864: [windows] Improve tracing for mapping errors
Reviewed-by: iklam, rrich
2020-12-03 08:41:26 +00:00
Thomas Stuefe
ae1eb286c6 8257604: JNI_ArgumentPusherVaArg leaks valist
Reviewed-by: dcubed, coleenp
2020-12-03 07:50:19 +00:00
Nick Gasson
4169d96e24 8257143: Enable JVMCI code installation tests on AArch64
Reviewed-by: burban, kvn
2020-12-03 07:26:10 +00:00
Hannes Wallnöfer
a5a034b72f 8257617: TestLinkPlatform fails with new Java source version
Reviewed-by: darcy
2020-12-03 07:12:25 +00:00
Jamil Nimeh
d80ae05f61 8166596: TLS support for the EdDSA signature algorithm
Reviewed-by: xuelei
2020-12-03 06:12:07 +00:00
Kim Barrett
3932527288 8257466: Improve enum iteration
Improve support for iteration on enums that are just range of values, without named enumerators.

Reviewed-by: iklam, lfoltan
2020-12-03 04:26:23 +00:00
Ioi Lam
02a0a027f4 8257563: Remove excessive include of klass.inline.hpp
Reviewed-by: dholmes, stuefe, stefank
2020-12-03 01:34:04 +00:00
Anthony Scarpino
cc1915b3b3 8253821: Improve ByteBuffer performance with GCM
Reviewed-by: xuelei, valeriep
2020-12-02 23:10:32 +00:00
Calvin Cheung
3da30e991a 8257241: CDS should not handle disableEagerInitialization for archived lambda proxy classes
Reviewed-by: iklam, redestad, mchung
2020-12-02 22:17:46 +00:00
Vladimir Ivanov
7104400ad8 8257164: Share LambdaForms for VH linkers/invokers
Reviewed-by: redestad, kvn, psandoz
2020-12-02 21:47:27 +00:00
Leonid Mesnik
3e89981d98 8257623: vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted001/TestDescription.java shouldn't use timeout
Reviewed-by: sspitsyn, dcubed
2020-12-02 20:16:28 +00:00
Christoph Langer
93b6ab56ae 8256818: SSLSocket that is never bound or connected leaks socket resources
Reviewed-by: xuelei
2020-12-02 19:23:26 +00:00
Vladimir Ivanov
692b273ec5 8257189: Handle concurrent updates of MH.form better
Reviewed-by: redestad, psandoz
2020-12-02 17:35:41 +00:00
Ioi Lam
670426646d 8257565: epsilonBarrierSet.hpp should not include barrierSetAssembler
Reviewed-by: kbarrett, stuefe, shade
2020-12-02 16:56:55 +00:00
Yumin Qi
0b8c7807fe 8256256: UL should not use heap allocation for output string
Reviewed-by: dholmes, stuefe
2020-12-02 16:22:51 +00:00
Coleen Phillimore
2508bc7c58 8257140: Crash in JvmtiTagMap::flush_object_free_events()
Reviewed-by: sspitsyn, kbarrett
2020-12-02 14:09:55 +00:00
Coleen Phillimore
cfb50a9cb7 8253916: ResourceExhausted/resexhausted001 crashes on Linux-x64
Reviewed-by: stuefe, sspitsyn, dholmes
2020-12-02 13:40:26 +00:00
Stefan Karlsson
287b829c04 8254877: GCLogPrecious::_lock rank constrains what locks you are allowed to have when crashing
Reviewed-by: eosterlund
2020-12-02 12:28:38 +00:00
Stefan Karlsson
1fd0ea7035 8256382: Use try_lock for hs_err EventLog printing
Reviewed-by: stuefe
2020-12-02 12:28:10 +00:00
Magnus Ihse Bursie
bff68f1f67 8257533: legacy-jre-image includes jpackage and jlink tools
Reviewed-by: alanb, sundar
2020-12-02 10:30:48 +00:00
Stuart Monteith
9a60413ba0 8248736: [aarch64] runtime/signal/TestSigpoll.java failed "fatal error: not an ldr (literal) instruction."
Reviewed-by: aph, shade
2020-12-02 10:22:20 +00:00
Magnus Ihse Bursie
e7ca0c4ae3 8257224: JDK-8251549 didn't update building.html
Reviewed-by: sundar, shade
2020-12-02 10:18:15 +00:00
Doug Simon
7e37c7c544 8257471: fatal error: Fatal exception in JVMCI: Exception during JVMCI compiler initialization
Reviewed-by: kvn, never
2020-12-02 10:14:46 +00:00
Yasumasa Suenaga
3e3745c2da 8256008: UL does not report anything if disk writing fails
Reviewed-by: stuefe
2020-12-02 09:19:24 +00:00
Yasumasa Suenaga
fb139cff1a 8257467: [TESTBUG] -Wdeprecated-declarations is reported at sigset() in exesigtest.c
Reviewed-by: dholmes, stuefe
2020-12-02 09:06:02 +00:00
Stefan Johansson
9de283b891 8257505: nsk/share/test/StressOptions stressTime is scaled in getter but not when printed
Reviewed-by: kbarrett, dholmes
2020-12-02 08:53:54 +00:00
Sergey Bylokhov
282cb325b1 8005970: Mouse cursor is default cursor over TextArea's scrollbar
Reviewed-by: kizune
2020-12-02 06:51:53 +00:00
Jie Fu
f2a0988a4a 8257228: G1: SIGFPE in G1ConcurrentRefine::create(int*) due to buffers_to_cards overflow
Reviewed-by: kbarrett, tschatzl
2020-12-02 06:49:57 +00:00
Bradford Wetmore
fe5cccc1ec 8254631: Better support ALPN byte wire values in SunJSSE
Reviewed-by: xuelei, dfuchs
2020-12-02 04:14:28 +00:00
Alexey Semenyuk
541c7f74bb 8257434: jpackage fails to create rpm on Fedora Linux
Reviewed-by: almatvee, herrick
2020-12-02 02:50:33 +00:00
Jie Fu
8f4fa3f8d5 8257232: CompileThresholdScaling fails to work on 32-bit platforms
Reviewed-by: kvn, redestad
2020-12-02 02:31:08 +00:00
Paul Sandoz
cfd070ece6 8257537: [vector] Cleanup redundant bitwise cases on floating point vectors
Reviewed-by: vlivanov
2020-12-02 02:01:19 +00:00
Sergey Bylokhov
03f3b8eadd 8210253: Clipped UI rendering with X11 pipeline and HiDPI
Reviewed-by: aivanov, kizune
2020-12-02 00:04:20 +00:00
Xin Liu
ce496cbda5 8257190: simplify PhaseIdealLoop constructors
Currently, C2 has 3 private constructors of PhaseIdealLoop as follows. a-b are for verification. only c is for real loop optimizations.
a. PhaseIdealLoop( PhaseIterGVN &igvn)
b. PhaseIdealLoop(PhaseIterGVN &igvn, const PhaseIdealLoop *verify_me)
c. PhaseIdealLoop(PhaseIterGVN &igvn, LoopOptsMode mode)

I propose 3 changes to simplify them.
1. add assertion in the constructor c. C2 shouldn't use mode = LoopOptsVerify for it.
2. merge a and b into one constructor.
3. make the merged verification ctor only for debug builds.

Reviewed-by: thartmann, kvn
2020-12-01 23:50:53 +00:00
David Holmes
927504e827 8256474: Migrate Mutex _owner accesses to use Atomic operations
Reviewed-by: coleenp, kbarrett
2020-12-01 23:10:39 +00:00
Claes Redestad
00e79db89e 8257511: JDK-8254082 brings regression to AbstractStringBuilder.insert(int dstOffset, CharSequence s, int start, int end)
Reviewed-by: alanb, rriggs, bpb
2020-12-01 22:50:05 +00:00
Nils Eliasson
015e6e58c5 8257460: Further CompilerOracle cleanup
Reviewed-by: kvn, redestad, thartmann
2020-12-01 21:08:45 +00:00
Guoxiong Li
29d90b952c 8255968: Confusing error message for inaccessible constructor
Reviewed-by: mcimadamore
2020-12-01 21:06:06 +00:00
Brian Burkhalter
c5046ca5b3 8246739: InputStream.skipNBytes could be implemented more efficiently
Reviewed-by: rriggs, lancea, naoto
2020-12-01 20:07:53 +00:00
Mandy Chung
56b15fbbcc 8159746: (proxy) Support for default methods
Co-authored-by: Peter Levart <plevart@openjdk.org>
Reviewed-by: darcy, alanb, plevart
2020-12-01 17:23:07 +00:00
Alan Bateman
1433bafb33 8253751: Dependencies of automatic modules are not propagated through module layers
Reviewed-by: mchung
2020-12-01 15:40:10 +00:00
Patric Hedlin
e3d0f27031 8257231: assert(!is_mcall || (call_returns[block->_pre_order] <= (uint) current_offset))
Reviewed-by: shade, chagedorn
2020-12-01 14:16:41 +00:00
Aleksey Shipilev
eaf4db6b8b 8257502: Builds fail with new warnings after JDK-8256254
Reviewed-by: jiefu, stuefe
2020-12-01 13:51:35 +00:00
Claes Redestad
2966d0d334 8257223: C2: Optimize RegMask::is_bound
Reviewed-by: kvn, neliasso
2020-12-01 13:18:32 +00:00
Coleen Phillimore
3a11009dac 8256830: misc tests failed with "assert(env->is_enabled(JVMTI_EVENT_OBJECT_FREE)) failed: checking"
Reviewed-by: kbarrett, sspitsyn, dholmes
2020-12-01 13:07:41 +00:00
Mahendra Chhipa
c859fb02f3 8249836: java/io/IOException/LastErrorString.java should have bug-id as 1st word in @ignore
Reviewed-by: iignatyev
2020-12-01 12:57:36 +00:00
Yasumasa Suenaga
e0de28c1d3 8257424: RecordingStream does not specify the recording name
Reviewed-by: egahlin
2020-12-01 11:17:43 +00:00
Magnus Ihse Bursie
60f2ba9a24 8257487: Include configuration name in summary
Reviewed-by: shade
2020-12-01 11:04:13 +00:00
Per Liden
021dced22a 8257415: ZGC: Fix barrier_data types
Reviewed-by: smonteith, stefank
2020-12-01 10:40:46 +00:00
Christian Hagedorn
aa2d36f6de 8256807: C2: Not marking stores correctly as mismatched in string opts
Reviewed-by: vlivanov, roland, thartmann
2020-12-01 10:11:39 +00:00
Roland Westrelin
3d460bd295 8256655: rework long counted loop handling
Reviewed-by: kvn, thartmann, vlivanov
2020-12-01 07:30:51 +00:00
Aleksey Shipilev
13bd2e82ca 8257396: AArch64 Zero build is broken after JDK-8252684
Reviewed-by: dholmes
2020-12-01 07:14:24 +00:00
Tobias Hartmann
353e791a18 8257398: Enhance debug output in Type::check_symmetrical
Reviewed-by: vlivanov, chagedorn
2020-12-01 07:02:48 +00:00
Ioi Lam
f48737c7b3 8256254: Convert vmIntrinsics::ID to enum class
Reviewed-by: redestad, kvn
2020-12-01 05:35:29 +00:00
Sergey Bylokhov
b5ce8af3d7 8256373: [Windows/HiDPI] The Frame#setBounds does not work in a minimized state
Reviewed-by: kizune, aivanov
2020-12-01 04:49:21 +00:00
Jie Fu
0eaf0bbe26 8257420: Zero VM build broken with clang after JDK-8256726 due to strlen() is not a constexpr
Reviewed-by: shade, stuefe
2020-12-01 03:38:30 +00:00
Prasanta Sadhukhan
822ee47459 8257242: [macOS] Java app crashes while switching input methods
Reviewed-by: serb
2020-12-01 03:21:57 +00:00
Valerie Peng
7d8985243d 8244154: Update SunPKCS11 provider with PKCS11 v3.0 header files
Reviewed-by: weijun
2020-12-01 00:49:39 +00:00
Mandy Chung
4356469a31 8230501: Class data support for hidden classes
Reviewed-by: jvernee, psandoz, chegar
2020-12-01 00:24:40 +00:00
Lance Andersen
11dad148ff 8257445: (zipfs) Add DataProvider to TestLocOffsetFromZip64EF.java
Reviewed-by: bpb
2020-12-01 00:14:59 +00:00
Rohit Arul Raj
29f86e00b1 8256536: Newer AMD 19h (EPYC) Processor family defaults
Reviewed-by: kvn
2020-11-30 22:29:53 +00:00
Weijun Wang
7f58a8e954 8213719: Both sect163r2 and sect163k1 are default curves for field size 163
Reviewed-by: valeriep, xuelei
2020-11-30 22:19:53 +00:00
Xue-Lei Andrew Fan
ae5b5268f3 8257448: Clean duplicated non-null check in the SunJSSE provider implementation
Reviewed-by: mullan
2020-11-30 21:57:14 +00:00
Stuart Marks
41dbc139ab 8180352: Add Stream.toList() method
Reviewed-by: psandoz
2020-11-30 19:37:56 +00:00
Paul Sandoz
89690699b2 8256995: [vector] Improve broadcast operations
Co-authored-by: Paul Sandoz <psandoz@openjdk.org>
Co-authored-by: Sandhya Viswanathan <sviswanathan@openjdk.org>
Reviewed-by: kvn, vlivanov
2020-11-30 18:52:20 +00:00
Sergey Tsypanov
6eb25d7cb4 8254082: AbstractStringBuilder.insert(int dstOffset, CharSequence s, int start, int end) is missing fast-path for String
Reviewed-by: redestad
2020-11-30 17:43:19 +00:00
Erik Joelsson
4c86e46d75 8256810: Incremental rebuild broken on Macosx
Reviewed-by: mikael, ihse
2020-11-30 17:40:39 +00:00
Stefan Johansson
02ba5194c0 8255001: Move G1PeriodicGCTask to its own file
Reviewed-by: tschatzl, lkorinth
2020-11-30 17:37:19 +00:00
skodanda
8aaee53c2c 8256187: [TEST_BUG] Automate bug4275046.java test
Reviewed-by: aivanov, psadhukhan
2020-11-30 17:36:45 +00:00
Magnus Ihse Bursie
a3e1980c08 8256541: Sort out what version of awk is used in the build system
Reviewed-by: erikj
2020-11-30 16:35:02 +00:00
Per Liden
e3abe51a31 8257418: C2: Rename barrier data member in MemNode and LoadStoreNode
Reviewed-by: vlivanov
2020-11-30 14:15:43 +00:00
Sean Mullan
c0719605e7 8257083: Security infra test failures caused by JDK-8202343
Reviewed-by: xuelei
2020-11-30 13:31:47 +00:00
Coleen Phillimore
4db05e991b 8254042: gtest/GTestWrapper.java failed os.test_random
Reviewed-by: dholmes, stuefe, kbarrett
2020-11-30 12:48:17 +00:00
Thomas Schatzl
962f7a3bae 8257162: Initialize ThreadLocalAllocBuffer members
Reviewed-by: shade, ayang, sjohanss, pliden
2020-11-30 11:27:45 +00:00
Vladimir Ivanov
337d7bce03 8257165: C2: Improve box elimination for vector masks and shuffles
Reviewed-by: kvn, thartmann
2020-11-30 10:36:38 +00:00
Vladimir Ivanov
4e55d0f31e 8257057: C2: Improve safepoint processing during vector scalarization pass
Reviewed-by: kvn, thartmann
2020-11-30 10:30:47 +00:00
Richard Reingruber
e77aed624e 8256754: Deoptimization::revoke_for_object_deoptimization: stack processing start call is redundant
Reviewed-by: dlong, eosterlund
2020-11-30 08:37:06 +00:00
Erik Gahlin
738efea9c6 8248564: JFR: Remote Recording Stream
Reviewed-by: mgronlun
2020-11-30 08:19:08 +00:00
Claes Redestad
9bcd2695c3 8257221: C2: RegMask::is_bound_set split set handling broken since JDK-8221404
Reviewed-by: kvn, neliasso
2020-11-30 08:18:32 +00:00
David Holmes
222e943074 8257238: Cleanup include directives for precompiled.hpp
Reviewed-by: kbarrett
2020-11-30 03:38:10 +00:00
Xue-Lei Andrew Fan
fdee70d174 8257237: Cleanup unused imports in the SunJSSE provider implementation
Reviewed-by: wetmore
2020-11-30 01:54:36 +00:00
Vladimir Kozlov
816e8f83b8 8256999: Add C2 intrinsic for Reference.refersTo and PhantomReference::refersTo
Reviewed-by: pliden, vlivanov, rkennke, eosterlund, shade
2020-11-29 20:27:01 +00:00
Doug Simon
c5d95071df 8257220: [JVMCI] option validation should not result in a heavy-weight VM crash
Reviewed-by: kvn
2020-11-29 16:52:14 +00:00
Vladimir Kempik
c2af27beb0 8257148: Remove obsolete code in AWTView.m
Reviewed-by: serb
2020-11-29 08:17:52 +00:00
Aleksey Shipilev
87f37aa278 8256726: Zero: print proper message in ArrayIndexOutOfBoundException
Reviewed-by: dholmes, sgehwolf
2020-11-29 08:02:53 +00:00
Aleksey Shipilev
f4c15a98e3 8256832: Zero: micro-optimize safepoint handling after JDK-8255384
Reviewed-by: rehn
2020-11-29 08:02:25 +00:00
David Holmes
04eecf03eb 8257233: Windows x86 build is broken by JDK-8252684
Reviewed-by: mikael
2020-11-29 01:20:37 +00:00
Nick Gasson
c93f0a07c4 8252684: Move the AArch64 assember test under test/hotspot/gtest
Reviewed-by: aph
2020-11-28 15:37:18 +00:00
Sergey Bylokhov
1241f80002 8196086: java/awt/image/DrawImage/IncorrectSourceOffset.java fails
Reviewed-by: shade
2020-11-28 04:30:22 +00:00
Joe Darcy
65137ff02c 8253753: Enable default constructor warning in client modules
Reviewed-by: prr, serb, ihse
2020-11-27 21:31:59 +00:00
Hollow Man
f6bfbb2b09 8257208: Fix typo in doc/building.md
Reviewed-by: ihse
2020-11-27 19:32:24 +00:00
Fleshgrinder
b4cba15a0e 8170432: Class java.util.UUID & @Override
Reviewed-by: dfuchs, lancea
2020-11-27 19:29:50 +00:00
Hannes Wallnöfer
5be4de8583 8245058: improve presentation of annotations for modules and packages
Reviewed-by: jjg
2020-11-27 19:12:31 +00:00
Martin Doerr
d51e2ab219 8256986: [PPC64] C2 crashes when accessing nonexisting jvms of CallLeafDirectNode
Reviewed-by: clanger
2020-11-27 15:43:52 +00:00
Hannes Wallnöfer
644271e7a4 8248566: Make API docs more usable on mobile browsers
Reviewed-by: jjg
2020-11-27 15:31:56 +00:00
Hannes Wallnöfer
53d14442c9 8244535: JavaDoc search is overly strict with letter case
Reviewed-by: jjg
2020-11-27 15:27:19 +00:00
Hannes Wallnöfer
78fdb65dcf 8254893: Fix display of search tag results without holder information
Reviewed-by: jjg
2020-11-27 13:21:18 +00:00
Albert Mingkun Yang
20525d2110 8257149: Improve G1 Service thread task scheduling to guarantee task delay
Reviewed-by: sjohanss, iwalulya
2020-11-27 11:57:11 +00:00
Hannes Wallnöfer
f2f3ba92d7 8242652: Throw SkippedException if no JS engine availabe in TestSearchScript
Reviewed-by: prappo
2020-11-27 09:43:01 +00:00
Stefan Johansson
ee99686b28 8252645: Change time measurements in G1ServiceThread to only account remembered set work
Reviewed-by: ayang, tschatzl
2020-11-27 08:44:35 +00:00
Aleksey Shipilev
a3eec39b01 8257181: s390x builds are very noisy with gc-sections messages
Reviewed-by: mdoerr, lucy
2020-11-27 06:48:04 +00:00
Aleksey Shipilev
9a468d8599 8256757: Incorrect MachCallRuntimeNode::ret_addr_offset() for CallLeafNoFP on x86_32
Reviewed-by: jiefu, kvn
2020-11-27 06:47:30 +00:00
Evgeny Astigeevich
2215e5a47e 8255351: Add detection for Graviton 2 CPUs
Reviewed-by: simonis, kvn
2020-11-26 19:55:39 +00:00
Bradford Wetmore
62d72dec5e 8220730: sun.security.provider.SecureRandom default constructor has wrong documentation
Reviewed-by: weijun
2020-11-26 18:47:38 +00:00
Andrew Haley
4e43b28858 8256359: AArch64: runtime/ReservedStack/ReservedStackTestCompiler.java fails
Reviewed-by: shade, adinn
2020-11-26 17:52:54 +00:00
Evgeny Astigeevich
6e0062236c 8256488: [aarch64] Use ldpq/stpq instead of ld4/st4 for small copies in StubGenerator::copy_memory
Reviewed-by: simonis
2020-11-26 16:10:23 +00:00
Daniel Fuchs
a93841ac9c 8255277: randomDelay in DrainDeadlockT and LoggingDeadlock do not randomly delay
Reviewed-by: lancea
2020-11-26 14:50:40 +00:00
Claes Redestad
2d30a10138 8257069: C2: Clarify and sanity test RegMask/RegMaskIterator
Reviewed-by: jvernee, kvn
2020-11-26 13:42:55 +00:00
Stefan Karlsson
0a5de50052 8257151: ZGC: Simplify ZVerify
Reviewed-by: pliden, eosterlund
2020-11-26 13:02:49 +00:00
Per Liden
bf66d734bc 8257073: ZGC: Try forward object before retaining page
Reviewed-by: ayang, eosterlund, stefank
2020-11-26 12:30:28 +00:00
Aleksey Shipilev
1b3aa3afc5 8256831: MIPS Zero builds fail with undefined __atomic_compare_exchange_8
Reviewed-by: ihse
2020-11-26 11:26:01 +00:00
Jorn Vernee
734d3c3b8a 8256862: Several java/foreign tests fail on x86_32 platforms
Reviewed-by: sundar
2020-11-26 11:21:10 +00:00
Per Liden
7946c94170 8257082: ZGC: Clean up ZRuntimeWorkers and ZWorkers
Reviewed-by: stefank
2020-11-26 10:57:24 +00:00
Stefan Johansson
f6d6a07c30 8256938: Improve remembered set sampling task scheduling
Reviewed-by: tschatzl, ayang
2020-11-26 10:06:14 +00:00
Per Liden
b823ad9270 8257072: ZGC: Rename roots iterators
Reviewed-by: ayang, stefank
2020-11-26 09:54:19 +00:00
Sergey Bylokhov
973255c469 8196100: javax/swing/text/JTextComponent/5074573/bug5074573.java fails
Reviewed-by: kizune
2020-11-26 08:43:29 +00:00
Joakim Nordström
a8e3eabb6d 8245026: PsAdaptiveSizePolicy::_old_gen_policy_is_ready is unused
Reviewed-by: sjohanss, pliden
2020-11-26 07:31:09 +00:00
Jie Fu
b1d1499356 8256956: RegisterImpl::max_slots_per_register is incorrect on AMD64
Reviewed-by: thartmann, vlivanov
2020-11-26 02:41:42 +00:00
Claes Redestad
20020d1572 8254360: Re-examine use of CodeBuffer::verify_section_allocation
Reviewed-by: neliasso, thartmann, kvn
2020-11-25 21:50:34 +00:00
Thomas Stuefe
e56a8df8a0 8257042: [aix] Disable os.release_one_mapping_multi_commits_vm gtest
Reviewed-by: shade
2020-11-25 21:26:36 +00:00
Sergey Bylokhov
9d7121c180 8256713: SwingSet2 : Slider leaves tracks in uiScale=2
Reviewed-by: jdv, psadhukhan
2020-11-25 20:28:10 +00:00
Per Liden
434b98fe0f 8257077: ZGC: Remove ZWorkers::run_serial()
Reviewed-by: stefank
2020-11-25 20:12:16 +00:00
Per Liden
f3fc0e088d 8257079: ZGC: Fold ZMark::prepare_mark() into ZMark::start()
Reviewed-by: stefank, ayang
2020-11-25 20:11:26 +00:00
Aleksey Shipilev
a14f02d8e5 8256267: Relax compiler/floatingpoint/NaNTest.java for x86_32 and lower -XX:+UseSSE
Reviewed-by: kvn, iignatyev
2020-11-25 20:01:00 +00:00
Jorn Vernee
7c73fff34d 8256486: Linux/Windows-x86 builds broken after JDK-8254231
Reviewed-by: shade
2020-11-25 18:09:22 +00:00
Lin Zang
461c5fc637 8256450: Add gz option to jmap to write a gzipped heap dump
Reviewed-by: cjplummer, sspitsyn, phh
2020-11-25 16:51:42 +00:00
Vipin Sharma
dee79d6053 8253936: Replace <code>...</code> with {@code ...} for java.sql
Reviewed-by: lancea
2020-11-25 16:01:40 +00:00
Nils Eliasson
cfb175dfdf 8256508: Improve CompileCommand flag
Reviewed-by: redestad, kvn
2020-11-25 14:20:35 +00:00
Christian Hagedorn
7aed9b65d0 8256016: Dacapo24H.java failed with "assert(false) failed: unscheduable graph"
Reviewed-by: kvn, vlivanov
2020-11-25 14:00:40 +00:00
Ralf Schmelter
26e6cb3eb9 8256489: Make gtest for long path names on Windows more resilient in the presence of virus scanners
Reviewed-by: dholmes, clanger
2020-11-25 13:16:36 +00:00
Aleksey Shipilev
911f16d4c8 8257056: Submit workflow should apt-get update to avoid package installation errors
Reviewed-by: rwestberg, sgehwolf
2020-11-25 13:13:15 +00:00
Chris Hegarty
b0bd0c24aa 8256755: Update build.tools.depend.Depend to handle record components in API signatures
Reviewed-by: jlahoda
2020-11-25 11:37:19 +00:00
Maurizio Cimadamore
9aeadbb020 8256865: Foreign Memory Access and Linker API are missing NPE checks
Reviewed-by: jvernee, sundar, chegar
2020-11-25 10:48:37 +00:00
Joakim Nordström
8cd2e0f694 8243315: ParallelScavengeHeap::initialize() passes GenAlignment as page size to os::trace_page_sizes instead of actual page size
Reviewed-by: sjohanss, tschatzl
2020-11-25 09:36:45 +00:00
Chris Hegarty
cdb41ba1d0 8255904: Remove superfluous use of reflection in Class::isRecord
Reviewed-by: redestad, alanb
2020-11-25 09:00:30 +00:00
Robin Westberg
c45725e587 8256747: GitHub Actions: decouple the hotspot build-only jobs from Linux x64 testing
Reviewed-by: shade
2020-11-25 08:28:59 +00:00
Alan Bateman
79e57ace65 8256643: Terminally deprecate ThreadGroup stop, destroy, isDestroyed, setDaemon and isDaemon
Reviewed-by: serb, rriggs, iris, mchung, smarks
2020-11-25 08:26:00 +00:00
Jatin Bhateja
0d91f0a1df 8252848: Optimize small primitive arrayCopy operations through partial inlining using AVX-512 masked instructions
Reviewed-by: neliasso, kvn
2020-11-25 06:08:19 +00:00
Kim Barrett
66943fefa7 8256517: (ref) Reference.clear during reference processing may lose notification
8240696: (ref) Reference.clear may extend the lifetime of the referent

Use private native helper to implement Reference.clear.

Reviewed-by: pliden, rkennke, mchung
2020-11-25 03:34:50 +00:00
Mandy Chung
3c230b8ac5 8256993: Clarify Package::isSealed javadoc about package sealing vs sealed class or interface
Reviewed-by: alanb
2020-11-24 21:18:46 +00:00
Stefan Johansson
1b7a61ff4a 8254999: Move G1RemSetSamplingTask to more appropriate location
Reviewed-by: tschatzl, ayang
2020-11-24 20:56:14 +00:00
Patric Hedlin
695117f8f6 8255479: [aarch64] assert(src->section_index_of(target) == CodeBuffer::SECT_NONE) failed: sanity
Reviewed-by: aph, neliasso
2020-11-24 18:56:58 +00:00
Sean Mullan
dbfeb90d3a 8243559: Remove root certificates with 1024-bit keys
Reviewed-by: weijun
2020-11-24 18:14:05 +00:00
Alex Menkov
2a1e9be6c2 8256364: vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t002 failed with "assert(handle != __null) failed: JNI handle should not be null"
Reviewed-by: cjplummer, sspitsyn
2020-11-24 17:49:55 +00:00
Eric Liu
f1d6e8dbb6 8256387: Unexpected result if patching an entire instruction on AArch64
Reviewed-by: shade, aph
2020-11-24 17:29:03 +00:00
Roger Riggs
bd14274b1b 8256480: Refactor ObjectInputStream field reader implementation
Reviewed-by: bchristi
2020-11-24 17:04:08 +00:00
Tobias Hartmann
1c4c99eae2 8256823: C2 compilation fails with "assert(isShiftCount(imm8 >> 1)) failed: illegal shift count"
Reviewed-by: vlivanov, kvn, chagedorn
2020-11-24 16:52:13 +00:00
Martin Doerr
3b3e90ecad 8256924: ppc, ppcle, s390: JVM crashes at VM init after JDK-8254231
Reviewed-by: shade
2020-11-24 16:24:55 +00:00
Andy Herrick
ff6df15be3 8256801: tools/jpackage/share/FileAssociationsTest.java#id0 failed unpack.bat with "Exit code: 1603"
Reviewed-by: asemenyuk, almatvee, kizune
2020-11-24 14:59:13 +00:00
Andy Herrick
303631e3d5 8256475: Fix Behavior when Installer name differs from application name.
Reviewed-by: asemenyuk, almatvee, kizune
2020-11-24 14:56:23 +00:00
Claes Redestad
fa3cfcd0cd 8256883: C2: Add a RegMask iterator
Reviewed-by: kvn, pliden, eosterlund
2020-11-24 14:35:51 +00:00
Claes Redestad
f55ae9595e 8256858: C2: Devirtualize PhaseIterGVN-specific methods
Reviewed-by: kvn, thartmann
2020-11-24 14:33:47 +00:00
Aleksey Shipilev
7b3d0958c0 8256618: Zero: Linux x86_32 build still fails
Reviewed-by: aph, dholmes, stuefe
2020-11-24 12:26:44 +00:00
Magnus Ihse Bursie
9e4944f7b6 8256308: Send arguments to javac server in a config file
Reviewed-by: erikj, jfranck
2020-11-24 11:13:09 +00:00
Aleksey Shipilev
8f7caa4353 8256857: ARM32 builds broken after JDK-8254231
Reviewed-by: jvernee, stuefe
2020-11-24 11:02:13 +00:00
Thomas Stuefe
f8d7c5a5cf 8256922: ppc, ppcle build broken after JDK-8254231
Reviewed-by: shade, lucy, mdoerr
2020-11-24 10:59:54 +00:00
Aleksey Shipilev
b52f6c053b 8256736: Zero: GTest tests fail with "unsuppported vm variant"
Reviewed-by: dholmes
2020-11-24 06:49:55 +00:00
Fairoz Matte
e838d71d61 8256722: handle VC++:1927 VS2019 in abstract_vm_version
Reviewed-by: shade, dholmes
2020-11-24 04:48:40 +00:00
Kim Barrett
cc96b0acbc 8256813: Simplify WeakProcessor counting of OopStorage entries
Reviewed-by: sjohanss, stefank
2020-11-24 02:17:47 +00:00
Xiaohong Gong
67a959002d 8256614: AArch64: Add SVE backend implementation for integer min/max
Reviewed-by: adinn
2020-11-24 02:04:34 +00:00
Per Liden
372595cca3 8256390: ZGC: Relocate in-place instead of having a heap reserve
Reviewed-by: stefank, eosterlund
2020-11-23 23:30:38 +00:00
Aleksey Shipilev
1df94c9fff 8256912: Zero builds fail after JDK-8255984
Reviewed-by: zgu, rkennke
2020-11-23 22:30:36 +00:00
Naoto Sato
b3497f9b36 8256839: JavaDoc for java.time.Period.negated() method
Reviewed-by: rriggs, lancea, joehw, scolebourne
2020-11-23 22:17:45 +00:00
Kim Barrett
b50b99dfcb 8256825: Cleanup WeakProcessorPhaseTimes
Reviewed-by: sjohanss, stefank
2020-11-23 20:20:20 +00:00
Aleksey Shipilev
47a78e8a6d 8256829: GNU hash style is not available on MIPS
Reviewed-by: ihse, aoqi, glaubitz
2020-11-23 19:32:34 +00:00
Aleksey Shipilev
7551c6800c 8256675: Zero: purge biased locking support
Reviewed-by: coleenp, pchilanomate
2020-11-23 19:15:50 +00:00
Aleksey Shipilev
d9ae0db699 8256746: gc/CriticalNativeArgs.java fails without -XX:-CriticalJNINatives
Reviewed-by: kbarrett, coleenp, rkennke
2020-11-23 19:12:13 +00:00
William Kemper
aac5c2a862 8255984: Shenandoah: "adaptive" heuristic is prone to missing load spikes
Reviewed-by: shade
2020-11-23 18:53:59 +00:00
Thomas Stuefe
fa75ad695c 8256725: Metaspace: better blocktree and binlist asserts
Reviewed-by: shade, rrich, lkorinth
2020-11-23 18:50:09 +00:00
Sandhya Viswanathan
9de5d091ff 8256585: Remove in-place conversion vector operators from Vector API
Reviewed-by: psandoz
2020-11-23 18:48:16 +00:00
Aleksey Shipilev
18e8506412 8256860: S390 builds broken after JDK-8254231
Reviewed-by: stuefe
2020-11-23 17:55:20 +00:00
Joe Darcy
042734cc5b 8251549: Update docs on building for Git
Reviewed-by: lancea
2020-11-23 17:44:10 +00:00
Naoto Sato
ae0ca743f5 8247432: Update IANA Language Subtag Registry to Version 2020-09-29
Reviewed-by: joehw
2020-11-23 16:41:50 +00:00
Elliott Baron
8ddf5e172b 8256809: Annotation processing causes NPE during flow analysis
Reviewed-by: jlahoda
2020-11-23 16:02:52 +00:00
Patricio Chilano Mateo
aabc9ca266 8255678: Add Mutex::try_lock version without rank checks
Reviewed-by: dcubed, dholmes, coleenp
2020-11-23 15:41:19 +00:00
Jorn Vernee
884b9ff24f 8256485: Zero VM build broken after JDK-8254231
Reviewed-by: shade, redestad
2020-11-23 15:13:51 +00:00
Zhengyu Gu
84429cd944 8249144: Potential memory leak in TypedMethodOptionMatcher
Reviewed-by: thartmann
2020-11-23 13:44:43 +00:00
ANUPAM DEV
895cc4f0a2 8255675: Typo in java.net.HttpURLConnection
Reviewed-by: chegar
2020-11-23 12:08:47 +00:00
Conor Cleary
5ed704484e 8256154: Some TestNG tests require default constructors
Reviewed-by: dfuchs, bpb
2020-11-23 11:48:39 +00:00
Magnus Ihse Bursie
b0485b9632 8256240: Reproducible builds should turn on the "deterministic" flag for Visual Studio
Reviewed-by: erikj
2020-11-23 11:33:18 +00:00
Maurizio Cimadamore
0fb31dbf3a 8254231: Implementation of Foreign Linker API (Incubator)
Reviewed-by: coleenp, ihse, dholmes, vlivanov
2020-11-23 11:00:38 +00:00
Per Liden
53f38353e0 8256419: ZGC: Remove "Heap Used Before/After Mark/Relocation" samplers
Reviewed-by: eosterlund, stefank
2020-11-23 10:38:38 +00:00
Claes Redestad
b450e7c1c5 8256827: C2: Avoid reallocations by pre-sizing lists in post_allocate_copy_removal
Reviewed-by: kvn, thartmann
2020-11-23 10:18:40 +00:00
Claes Redestad
c0689d25fb 8256741: Reduce footprint of compiler interface data structures
Reviewed-by: cjplummer, kvn
2020-11-23 10:17:43 +00:00
Claes Redestad
65b77d5920 8256738: Compiler interface clean-up
Reviewed-by: neliasso, kvn, thartmann
2020-11-23 10:17:09 +00:00
Stefan Karlsson
69c3470e72 8252973: ZGC: Implement Large Pages support on Windows
Reviewed-by: eosterlund, mbeckwit, pliden
2020-11-23 08:39:23 +00:00
Christian Hagedorn
e4a32bea9f 8251925: C2: RenaissanceStressTest fails with assert(!had_error): bad dominance
Reviewed-by: kvn, thartmann
2020-11-23 08:37:09 +00:00
Stefan Karlsson
1f32c11d5e 8256740: ZGC: Move closures out of zOopClosure files
Reviewed-by: pliden
2020-11-23 08:24:47 +00:00
Tobias Hartmann
659aec8096 8256719: C1 flags that should have expired are still present
Reviewed-by: shade, neliasso
2020-11-23 07:09:32 +00:00
Aleksey Shipilev
e06a68397d 8256497: Zero: enable G1 and Shenandoah GCs
Reviewed-by: rkennke, erikj, ihse
2020-11-22 18:10:04 +00:00
Aleksey Shipilev
037e49cf57 8256670: Zero: enable compressed oops support back
Reviewed-by: coleenp
2020-11-22 18:06:18 +00:00
Aleksey Shipilev
d46f6f5a80 8256523: Streamline Java SHA2 implementation
Reviewed-by: valeriep
2020-11-22 18:03:06 +00:00
Coleen Phillimore
1aa90ac629 8256822: runtime/logging/RedefineClasses.java fails with "Error: VM option 'Verbose' is develop and is available only in debug version of VM."
Reviewed-by: stuefe
2020-11-21 21:55:59 +00:00
Kim Barrett
edf72f065f 8256824: test/langtools/tools/javac/diags/examples/InnerClassCantHaveStatic.java has a bad copyright
Reviewed-by: dcubed
2020-11-21 16:06:31 +00:00
Vicente Romero
9a19eb6918 8254105: allow static nested declarations
Reviewed-by: mcimadamore
2020-11-21 03:17:57 +00:00
Alex Menkov
14de791d60 8255934: JConsole 14 and greater fails to connect to older JVM
Reviewed-by: cjplummer, sspitsyn
2020-11-20 23:33:11 +00:00
Aleksey Shipilev
86f36027e4 8256806: Shenandoah: optimize shenandoah/jni/TestPinnedGarbage.java test
Reviewed-by: rkennke
2020-11-20 21:45:13 +00:00
Vladimir Ivanov
57025e65e1 8256073: Improve vector rematerialization support
Reviewed-by: thartmann, kvn
2020-11-20 21:17:09 +00:00
Vladimir Ivanov
41c05876bc 8255367: C2: Deoptimization during vector box construction is broken
Reviewed-by: thartmann, kvn
2020-11-20 21:16:34 +00:00
Vladimir Ivanov
f79e9d4573 8256061: RegisterSaver::save_live_registers() omits upper halves of ZMM0-15 registers
Reviewed-by: kvn
2020-11-20 21:15:58 +00:00
Vladimir Ivanov
503590f6bf 8256056: Deoptimization stub doesn't save vector registers on x86
Reviewed-by: redestad, kvn
2020-11-20 21:15:21 +00:00
Vladimir Ivanov
e6fa85b493 8256058: Improve vector register handling in RegisterMap::pd_location() on x86
Reviewed-by: kvn
2020-11-20 21:14:34 +00:00
Conor Cleary
be6c89366f 8256183: InputStream.skipNBytes is missing @since 12
Reviewed-by: dfuchs, lancea, bpb
2020-11-20 20:11:48 +00:00
Weijun Wang
b21b96df21 8256507: Add a micro benchmark for JDK-8153005
Reviewed-by: shade
2020-11-20 19:53:24 +00:00
Poonam Bajaj
8d9cf48e81 8255908: ExceptionInInitializerError due to UncheckedIOException while initializing cgroupv1 subsystem
Reviewed-by: shade, sgehwolf, bobv
2020-11-20 18:40:01 +00:00
Zhengyu Gu
5ad1e22866 8256658: Shenandoah: Deadlock between nmethod_entry_barrier and concurrent code root evacuator
Reviewed-by: rkennke
2020-11-20 18:36:17 +00:00
Stuart Marks
cc0ed401ec 8037384: Fix wording in Javadoc of java.io.Serializable
8231547: Serializable class doc should link to serialization specification

Reviewed-by: rriggs, iris, chegar
2020-11-20 18:26:38 +00:00
Erik Joelsson
19b2898691 8256751: Incremental rebuild with precompiled header fails when touching a header file
Reviewed-by: ihse
2020-11-20 18:13:56 +00:00
Daniel D. Daugherty
4dd71ae1c5 8256803: ProblemList runtime/ReservedStack/ReservedStackTestCompiler.java on linux-aarch64
Reviewed-by: mikael
2020-11-20 17:59:05 +00:00
Naoto Sato
2c3a2bed6d 8211449: Correction to the spec of implicit negative subpattern in DecimalFormat
Reviewed-by: bpb
2020-11-20 17:10:00 +00:00
Alexey Semenyuk
11bfdc57f9 8235304: JPackage Windows test should be added to set Publisher
Reviewed-by: herrick, almatvee
2020-11-20 16:38:50 +00:00
Brian Burkhalter
2ae3e51f59 8229845: Decrease memory consumption of BigInteger.toString()
Reviewed-by: redestad
2020-11-20 16:23:41 +00:00
Igor Ignatyev
ff00c591c3 8256569: Add C2 compiler stress flags to CTW
Reviewed-by: kvn, shade, thartmann
2020-11-20 15:01:37 +00:00
Coleen Phillimore
e7c7469cf5 8246378: [Windows] assert on MethodHandle logging code
Reviewed-by: iklam, vlivanov
2020-11-20 13:00:10 +00:00
Zhengyu Gu
98a5d5a6ee 8256664: Shenandoah: Cleanup after JDK-8212879
Reviewed-by: rkennke
2020-11-20 12:57:13 +00:00
jasontatton-aws
b99fd4c7d6 8033441: print line numbers with -XX:+PrintOptoAssembly
Reviewed-by: jiefu, thartmann
2020-11-20 12:51:47 +00:00
Zhengyu Gu
266dea06ec 8256688: Shenandoah: Lock rank inversion after JDK-8212879
Reviewed-by: rkennke
2020-11-20 12:51:11 +00:00
Per Liden
aeba9259b2 8256416: ZGC: Lower ZMarkCompleteTimeout
Reviewed-by: ayang, eosterlund
2020-11-20 12:36:42 +00:00
Stefan Karlsson
10ba541846 8256727: ZGC: Clean out dead code after JDK-8212879
Reviewed-by: pliden
2020-11-20 12:35:37 +00:00
Roberto Castañeda Lozano
eb35ade9a0 6232281: -XX:-UseLoopSafepoints causes assert(v_false,"Parse::remove_useless_nodes missed this node")
Check for nodes missed by remove_useless_nodes() only if PhaseRemoveUseless has
actually been run. This makes it possible to use -XX:-UseLoopSafepoints without
crashing trivially, although implicit assumptions in other parts of C2 about the
existence of loop safepoints might lead to more subtle failures for more complex
methods.

Reviewed-by: neliasso, thartmann, kvn
2020-11-20 12:06:36 +00:00
Thomas Schatzl
a25fb0356a 8256406: G1 x86 C1/Interpreter post write barrier always uses 32 bit to access variable sized PtrQueue::_index
Reviewed-by: shade
2020-11-20 11:09:07 +00:00
Bernhard Urban-Forster
f57662874a 8256633: Fix product build on Windows+Arm64
Reviewed-by: shade
2020-11-20 11:01:25 +00:00
Magnus Ihse Bursie
8e7a855ee8 8255526: Enable jcheck whitespace checking of build system files
Reviewed-by: shade, erikj
2020-11-20 10:01:34 +00:00
Robin Westberg
c45ab1aada 8256393: Github Actions build on Linux should define OS and GCC versions
Reviewed-by: shade, erikj, ihse
2020-11-20 08:04:08 +00:00
Guoxiong Li
5fedb69e66 8250888: nsk/jvmti/scenarios/general_functions/GF08/gf08t001/TestDriver.java fails
Reviewed-by: cjplummer, sspitsyn
2020-11-20 07:02:48 +00:00
Thomas Stuefe
02adaa5854 8255885: Metaspace: freelist commit counter is not updated when purging
Reviewed-by: coleenp, iklam
2020-11-20 06:52:21 +00:00
David Holmes
fa240f2261 8256594: Unexpected warning: SIGSEGV handler flags expected:SA_RESTART|SA_SIGINFO found:SA_RESTART|SA_SIGINFO
Reviewed-by: stuefe, coleenp, dcubed
2020-11-20 04:17:27 +00:00
Alexander Zuev
4c095252a5 8256108: Create implementation for NSAccessibilityElement protocol peer
Reviewed-by: serb
2020-11-20 04:10:09 +00:00
Naoto Sato
68138893a5 8251317: Support for CLDR version 38
Reviewed-by: erikj, bchristi, joehw
2020-11-19 22:41:11 +00:00
Sergey Bylokhov
c816464c1d 4916923: In MetalRootPaneUI, MetalRootLayout does not correctly calculate minimumsize
Reviewed-by: shade
2020-11-19 22:39:37 +00:00
Coleen Phillimore
fae68ff016 8256640: assert(!m->is_old() || ik()->is_being_redefined()) failed: old methods should not be in vtable
Reviewed-by: lfoltan, dcubed, dholmes
2020-11-19 22:39:07 +00:00
Aleksey Shipilev
c1407733c5 8256692: Zero: remove obsolete block from ZeroInterpreter::native_entry
Reviewed-by: coleenp
2020-11-19 21:57:53 +00:00
Ian Graves
080c707aab 8253459: Formatter treats index, width and precision > Integer.MAX_VALUE incorrectly
Reviewed-by: rriggs, smarks
2020-11-19 20:20:55 +00:00
Sean Mullan
b9db002fef 8256682: JDK-8202343 is incomplete
Reviewed-by: dfuchs
2020-11-19 19:09:22 +00:00
Stefan Johansson
b8244b606e 8236926: Concurrently uncommit memory in G1
Reviewed-by: ayang, tschatzl
2020-11-19 17:55:33 +00:00
Aleksey Shipilev
defdd12e70 8142984: Zero: fast accessors should handle both getters and setters
Reviewed-by: andrew, coleenp
2020-11-19 17:37:07 +00:00
Alexey Semenyuk
1718abaefa 8227400: Adjust jib profiles to make 3rd party tools for creating installers available on Mach5 test machines
Reviewed-by: almatvee, herrick
2020-11-19 17:24:32 +00:00
Hai-May Chao
9bb82232fa 8253299: Manifest bytes are read twice when verifying a signed JAR
Reviewed-by: redestad, lancea, alanb
2020-11-19 17:22:59 +00:00
Paul Sandoz
580f22ccb7 8256581: Refactor vector conversion tests
Reviewed-by: vlivanov
2020-11-19 16:58:03 +00:00
Kim Barrett
675d1d56e6 8256516: Simplify clearing References
Provide and use explicit referent clearing instead of set to null.

Reviewed-by: rkennke, shade, pliden, mchung
2020-11-19 15:42:46 +00:00
Coleen Phillimore
ba721f5f2f 8212879: Make JVMTI TagMap table concurrent
Co-authored-by: Kim Barrett <kbarrett@openjdk.org>
Co-authored-by: Coleen Phillimore <coleenp@openjdk.org>
Reviewed-by: stefank, ihse, zgu, eosterlund, sspitsyn, kbarrett
2020-11-19 14:30:02 +00:00
Sean Mullan
3a4b90f086 8202343: Disable TLS 1.0 and 1.1
Reviewed-by: xuelei, dfuchs, coffeys
2020-11-19 14:15:57 +00:00
Patricio Chilano Mateo
342ccf6903 8256253: Defer Biased Locking obsoletion to JDK 18
Reviewed-by: dholmes, coleenp, dcubed, mdoerr
2020-11-19 14:12:41 +00:00
Alan Hayward
d183fc7faa 8221554: aarch64 cross-modifying code
Reviewed-by: rehn, aph
2020-11-19 12:27:22 +00:00
Thomas Stuefe
f626ed6a43 8255978: [windows] os::release_memory may not release the full range
Reviewed-by: iklam, minqi
2020-11-19 11:51:09 +00:00
Dong Bo
6702910b74 8256375: AArch64: aarch64-asmtest.py may generate undefined register r18
Reviewed-by: aph
2020-11-19 09:46:34 +00:00
Patrick Concannon
9fe2d31d6e 8252304: Seed an HttpRequest.Builder from an existing HttpRequest
Co-authored-by: Chris Hegarty <chegar@openjdk.org>
Reviewed-by: chegar, dfuchs, michaelm
2020-11-19 09:35:49 +00:00
Aleksey Shipilev
cb2676c8b7 8256499: Zero: enable Epsilon GC
Reviewed-by: rkennke, ihse
2020-11-19 08:02:37 +00:00
Nils Eliasson
8e241b5262 8256552: Let ReplayCompiles set UseDebuggerErgo
Reviewed-by: vlivanov, redestad
2020-11-19 07:45:08 +00:00
Ioi Lam
4178834deb 8256172: Clean up CDS handling of i2i_entry
Reviewed-by: minqi, ccheung
2020-11-19 07:31:00 +00:00
Yasumasa Suenaga
cfa92a53c0 8256178: Add RAII object for file lock
Reviewed-by: dholmes, coleenp
2020-11-19 04:09:25 +00:00
David Holmes
2b15571316 8256383: PlatformMutex::try_lock has different semantics on Windows and Posix
Reviewed-by: stuefe, dcubed
2020-11-18 22:48:39 +00:00
David Holmes
99eac53580 8225631: Consider replacing muxAcquire/Release with PlatformMonitor
Reviewed-by: coleenp, dcubed, kbarrett
2020-11-18 22:45:49 +00:00
Stuart Marks
646c20022c 8256152: tests fail because of ambiguous method resolution
Reviewed-by: psandoz
2020-11-18 22:04:18 +00:00
Christoph Langer
5912df2440 8256427: Test com/sun/jndi/dns/ConfigTests/PortUnreachable.java does not work on AIX
Reviewed-by: jiefu, mbaesken
2020-11-18 22:00:19 +00:00
Magnus Ihse Bursie
3110d589e1 8256538: Fix annoying awk warning in configure for java versions
Reviewed-by: erikj
2020-11-18 21:54:12 +00:00
Jorn Vernee
03e84ef7e3 8256189: Exact VarHandle tests should test withInvokeBehavior() works as expected
Reviewed-by: mcimadamore, chegar
2020-11-18 19:01:52 +00:00
Leonid Mesnik
300cbaa6ad 8256418: Jittester make build is broken.
Reviewed-by: iignatyev
2020-11-18 18:05:38 +00:00
Daniel D. Daugherty
c9c1573375 8256567: ProblemList java/util/stream/test/org/openjdk/tests/java/util/stream/SpliteratorTest.java for Xcomp testing
Reviewed-by: mcimadamore
2020-11-18 18:02:40 +00:00
Daniel D. Daugherty
33d3918e5a 8256565: ProblemList jdk/jfr/api/recording/event/TestReEnableName.java on windows
Reviewed-by: egahlin
2020-11-18 17:15:37 +00:00
Daniel D. Daugherty
1707d5ca3c 8238174: migrate ObjectMonitor::_owner field away from C++ volatile semantics
Reviewed-by: dholmes, mdoerr
2020-11-18 16:48:17 +00:00
Gerard Ziemski
50a2c22ff7 8253742: POSIX signal code cleanup
Reviewed-by: stuefe, dholmes
2020-11-18 15:29:13 +00:00
Coleen Phillimore
fa8dce4f77 8256365: Clean up vtable initialization code
Reviewed-by: eosterlund, dholmes
2020-11-18 14:12:48 +00:00
Erik Joelsson
4e5116c46e 8256501: libTestMainKeyWindow fails to build with Xcode 12.2
Reviewed-by: ihse, serb
2020-11-18 14:10:27 +00:00
Weijun Wang
486d6f631b 8256363: Define toString() for MGF1ParameterSpec
Reviewed-by: mullan
2020-11-18 13:14:11 +00:00
Zhengyu Gu
eab170c0af 8256415: Shenandoah: Should evacuate/update codecache concurrently when class unloading is off
Reviewed-by: rkennke
2020-11-18 12:59:17 +00:00
Tobias Hartmann
f504f419d3 8256385: C2: fatal error: modified node is not on IGVN._worklist
Reviewed-by: chagedorn, roland
2020-11-18 11:53:25 +00:00
Tobias Hartmann
5bcf898b97 8256478: C2 compilation fails with assert(t1->isa_long()) failed: Type must be a long
Reviewed-by: roland, chagedorn, kvn
2020-11-18 11:52:47 +00:00
Claes Redestad
f7f3447496 8256453: C2: Reduce State footprint
Reviewed-by: neliasso, kvn
2020-11-18 10:31:13 +00:00
Maurizio Cimadamore
d2ddf07461 8256477: Specialize heap memory segment implementations
Reviewed-by: jvernee, chegar
2020-11-18 10:23:20 +00:00
Martin Doerr
97074969a5 8256479: [PPC64] C2 crashes when UseVectorByteReverseInstructionsPPC64 used without SuperwordUseVSX
Reviewed-by: goetz, psandoz
2020-11-18 10:20:37 +00:00
Dong Bo
b0b9dd27b8 8256318: AArch64: Add support for floating-point absolute difference
Reviewed-by: aph
2020-11-18 10:14:20 +00:00
Roland Westrelin
655bb619a3 8255936: "parsing found no loops but there are some" assertion failure with Shenandoah
Reviewed-by: thartmann, rkennke
2020-11-18 09:24:17 +00:00
Michael McMahon
6948456dbf 8256461: AbstractFileSystemProvider.getSunPathForSocketCall for empty Path returns '.'
Reviewed-by: dfuchs, alanb
2020-11-18 08:43:51 +00:00
Thomas Schatzl
d30956055b 8253081: G1 fails on stale objects in archived module graph in Open Archive regions
Change the handling of Open Archive areas, instead of assuming that everything in there is live always, a root containing references to all live root objects is provided. Adapt G1 to handle Open Archive regions as any other old region apart from never compacting or evacuating them.

Co-authored-by: Ioi Lam <iklam@openjdk.org>
Reviewed-by: kbarrett, sjohanss, redestad
2020-11-18 08:21:03 +00:00
Xubo Zhang
c08921487b 8255368: Math.exp() gives wrong result for large values on x86 32-bit platforms
Reviewed-by: darcy, kvn
2020-11-18 04:49:15 +00:00
Ioi Lam
7ecf070e7d 8256476: Assert in vmIntrinsics::flags_for with -XX:+Verbose
Reviewed-by: redestad
2020-11-18 03:44:27 +00:00
Nick Gasson
26a1ec1b96 8256435: [TESTBUG] java/foreign/TestHandshake.java fails with direct buffer memory OOM
Reviewed-by: mcimadamore
2020-11-18 02:08:20 +00:00
Dongbo He
ef3ddb1d03 8255448: Fastdebug JVM crashes with Vector API when PrintAssembly is turned on
Co-authored-by: Huang Wang <wanghuang3@huawei.com>
Reviewed-by: vlivanov
2020-11-18 01:10:11 +00:00
Daniel D. Daugherty
eb021848ba 8134630: make code and comments consistent for stack lock optimization
Reviewed-by: dholmes, coleenp
2020-11-17 23:59:08 +00:00
Per Liden
f751738645 8256484: ZGC: Rename ZRelocationSetSelector::register_garbage_page()
Reviewed-by: stefank, ayang
2020-11-17 20:48:14 +00:00
Igor Ignatyev
d9dbd5def6 8256430: add linux-x64-optimized to regular testing
Reviewed-by: kvn, dcubed, vlivanov, erikj
2020-11-17 19:59:04 +00:00
Roman Kennke
9efbb463a4 8256426: Shenandoah: Remove superfluous assert is ShBS::load_reference_barrier()
Reviewed-by: shade
2020-11-17 17:09:56 +00:00
Per Liden
9130ca4c73 8256401: ZGC: Improve ZList verification
Reviewed-by: ayang, stefank
2020-11-17 16:40:12 +00:00
Roman Kennke
f2a9d02de2 8256370: Add asserts to Reference.getInactive()
Reviewed-by: mchung
2020-11-17 15:46:34 +00:00
Magnus Ihse Bursie
c255b18cfc 8256216: Enable reproducible builds in jib-profiles
Reviewed-by: erikj
2020-11-17 15:29:43 +00:00
Jose Ricardo Ziviani
c371782630 8255553: [PPC64] Introduce and use setbc and setnbc P10 instructions
Reviewed-by: mdoerr
2020-11-17 15:15:44 +00:00
Aleksey Shipilev
3b9c5a36f5 8255796: Zero: CASE(_new) should replenish TLABs properly
Reviewed-by: sgehwolf
2020-11-17 14:48:00 +00:00
Claes Redestad
654ad27418 8256392: C2: Various Node cleanups
Reviewed-by: neliasso, thartmann, vlivanov
2020-11-17 12:24:42 +00:00
Daniel Fuchs
9dbbe83a06 8256146: Cleanup test/jdk/java/nio/channels/DatagramChannel/Connect.java
Reviewed-by: alanb
2020-11-17 12:21:11 +00:00
Michael McMahon
9d0ee66f2d 8255758: JEP 380 spec clarifications
Reviewed-by: dfuchs, alanb
2020-11-17 12:12:08 +00:00
Aleksey Shipilev
3dcde557f7 8256386: ARM32 tests fail with "bad AD file" after JDK-8223051
Reviewed-by: azeemj, kvn, roland
2020-11-17 12:10:52 +00:00
Rafael Winterhalter
53a31889fe 8202471: (ann) Cannot read type annotations on generic receiver type's type variables
Reviewed-by: jfranck
2020-11-17 11:23:47 +00:00
Doug Simon
adb8561aba 8253228: [JVMCI] provide more info on fatal JVMCI errors
Reviewed-by: kvn, never
2020-11-17 11:21:17 +00:00
Roland Westrelin
a7422ac2f4 8255150: Add utility methods to check long indexes and ranges
Co-authored-by: Paul Sandoz <psandoz@openjdk.org>
Reviewed-by: jvernee, dlong, vlivanov
2020-11-17 10:37:27 +00:00
Tobias Hartmann
6d878565f8 8256325: Remove duplicate asserts in PhaseMacroExpand::expand_macro_nodes
Reviewed-by: shade, redestad
2020-11-17 09:37:36 +00:00
Christian Hagedorn
5dbfae0176 8255058: C1: assert(is_virtual()) failed: type check
Reviewed-by: neliasso, kvn
2020-11-17 09:16:06 +00:00
Matthias Baesken
4553fa0b98 8256258: some missing NULL checks or asserts after CodeCache::find_blob_unsafe
Reviewed-by: shade
2020-11-17 07:59:01 +00:00
Claes Redestad
1228517261 8256274: C2: Optimize copying of the shared type dictionary
Reviewed-by: neliasso, kvn
2020-11-17 07:15:04 +00:00
Kim Barrett
537b40e013 8252588: HotSpot Style Guide should permit uniform initialization
Reviewed-by: jrose, dholmes, dcubed, tschatzl, kvn
2020-11-17 03:16:10 +00:00
Alexander Matveev
c35e1a284b 8255947: [macos] Signed macOS jpackage app doesn't filter spurious '-psn' argument
Reviewed-by: herrick, asemenyuk
2020-11-17 01:57:24 +00:00
Eric Liu
30a2ad5501 8254872: Optimize Rotate on AArch64
Reviewed-by: aph, kvn
2020-11-17 01:55:09 +00:00
Jie Fu
eabf3bace7 8256037: [TESTBUG] com/sun/jndi/dns/ConfigTests/PortUnreachable.java fails due to the hard coded threshold is small
Reviewed-by: shade, aefimov
2020-11-17 01:35:30 +00:00
Sergey Bylokhov
36dbe6f2de 8256376: The javax/swing/JSpinner/SerializationTest.java fails on headful windows
Reviewed-by: aivanov
2020-11-16 23:14:58 +00:00
Naoto Sato
bf84dac4cf 8247781: Day periods support
Reviewed-by: scolebourne, rriggs, joehw
2020-11-16 23:12:45 +00:00
Thomas Stuefe
0357db3581 8256287: [windows] add loop fuse to map_or_reserve_memory_aligned
Reviewed-by: luhenry, iklam, minqi
2020-11-16 20:08:49 +00:00
Claes Redestad
6e35bcbf03 8256205: Simplify compiler calling convention handling
Reviewed-by: kvn, neliasso
2020-11-16 19:39:36 +00:00
Igor Ignatyev
68fd71d2ad 8256414: add optimized build to submit workflow
add linux-x64-optimized to submit workflow

Reviewed-by: vlivanov, shade, kvn
2020-11-16 19:30:43 +00:00
Patricio Chilano Mateo
3675653c20 8255384: Remove special_runtime_exit_condition() check from SS::block()
Reviewed-by: dholmes, rrich, dcubed
2020-11-16 17:21:13 +00:00
Boris Ulasevich
f611fdfee8 8254016: Test8237524 fails with -XX:-CompactStrings option
Reviewed-by: shade
2020-11-16 14:58:14 +00:00
Jorn Vernee
b8de2391d6 8256380: JDK-8254162 broke 32bit windows build
Reviewed-by: shade
2020-11-16 14:25:51 +00:00
Daniel D. Daugherty
1d7ed03d5c 8244376: possibly stale comment above "struct SharedGlobals" in synchronizer.cpp
Reviewed-by: hseigel, dholmes
2020-11-16 14:10:08 +00:00
Jie Kang
c85c9ad1f1 8255992: JFR EventWriter does not use first string from StringPool with id 0
Reviewed-by: egahlin
2020-11-16 13:25:40 +00:00
Robbin Ehn
c5fe2c1fcb 8244679: JVM/TI GetCurrentContendedMonitor/contmon001 failed due to "(IsSameObject#3) unexpected monitor object: 0x000000562336DBA8"
Reviewed-by: pchilanomate, dcubed, dholmes, sspitsyn
2020-11-16 13:06:45 +00:00
Hui Shi
8eeb36f14a 8255883: Avoid duplicated GeneratedMethodAccessor when reflect method invoked from different threads
Reviewed-by: shade, alanb
2020-11-16 11:34:47 +00:00
Thomas Schatzl
ac3948930e 8256323: Remove HeapRegionManager::update_committed_space()
Reviewed-by: shade, sjohanss
2020-11-16 10:11:33 +00:00
Robin Westberg
1103e3374c 8256354: Github Action build on Windows should define OS and MSVC versions
Reviewed-by: erikj, shade
2020-11-16 08:02:11 +00:00
Robin Westberg
588caab074 8256277: Github Action build on macOS should define OS and Xcode versions
Reviewed-by: shade, ehelin, erikj
2020-11-16 08:00:21 +00:00
Stefan Karlsson
6a69e304dd 8256337: ap01t001.cpp, 67: Received unexpected number of ObjectFree events: 7
Reviewed-by: coleenp, sspitsyn
2020-11-16 07:58:40 +00:00
Thomas Stuefe
298bce1d92 8256367: [windows] Better logging for some system calls
Reviewed-by: iklam
2020-11-16 07:15:43 +00:00
Christoph Langer
1e9a432d59 8256202: Some tweaks for jarsigner tests PosixPermissionsTest and SymLinkTest
Reviewed-by: mbaesken
2020-11-13 17:28:05 +00:00
Daniel Fuchs
1c47244b01 8255244: HttpClient: Response headers contain incorrectly encoded Unicode characters
Reviewed-by: chegar, michaelm
2020-11-13 15:10:41 +00:00
Harold Seigel
56ea7864d4 8245215: Obsolete InitialBootClassLoaderMetaspaceSize and UseLargePagesInMetaspace
Reviewed-by: lfoltan, ccheung, stuefe, coleenp
2020-11-13 13:13:43 +00:00
Aleksey Shipilev
e9956fec9a 8256127: Add cross-compiled foreign architectures builds to submit workflow
Reviewed-by: ihse, rwestberg
2020-11-13 12:36:51 +00:00
Stefan Karlsson
c8dd0b53ee 8256320: ZGC: Update zDebug to support UseCompressedClassPointers
Reviewed-by: pliden
2020-11-13 12:23:08 +00:00
Patrick Concannon
5973e91cc3 8253005: Add @throws IOException in javadoc for HttpEchange.sendResponseHeaders
Reviewed-by: dfuchs
2020-11-13 11:31:25 +00:00
Vladimir Ivanov
8c31bd2939 8256275: Optimized build is broken
Reviewed-by: redestad, coleenp
2020-11-13 11:07:53 +00:00
Roman Kennke
b0c28fadaa 8256011: Shenandoah: Don't resurrect finalizably reachable objects
Reviewed-by: shade, zgu
2020-11-13 09:47:00 +00:00
Nils Eliasson
41139e31c0 8255964: Add all details to jstack log in jtreg timeout handler
Reviewed-by: iignatyev
2020-11-13 09:40:06 +00:00
Aleksey Shipilev
b4d0186718 8253525: Implement getInstanceSize/sizeOf intrinsics
Reviewed-by: kvn, sspitsyn
2020-11-13 08:20:11 +00:00
Roland Westrelin
ea576ddbd4 8254887: C2: assert(cl->trip_count() > 0) failed: peeling a fully unrolled loop
Reviewed-by: chagedorn, thartmann
2020-11-13 08:19:33 +00:00
Aleksey Shipilev
05b824567c 8256290: javac/lambda/T8031967.java fails with StackOverflowError on x86_32
Reviewed-by: mcimadamore
2020-11-13 07:40:19 +00:00
Aleksey Shipilev
c3139abe38 8256220: C1: x86_32 fails with -XX:UseSSE=1 after JDK-8210764 due to mishandled lir_neg
Reviewed-by: chagedorn
2020-11-13 07:39:29 +00:00
Yumin Qi
1d3d64f34c 8255973: Add more logging to debug JDK-8255917
Reviewed-by: ccheung, stuefe, iklam
2020-11-13 03:44:41 +00:00
Alexandre Iline
e32a4ea4ef 8253820: Save test images and dumps with timestamps from client sanity suite
Reviewed-by: serb
2020-11-13 02:27:32 +00:00
Mandy Chung
dff26a489d 8256063: Module::getPackages on an unnamed module may return packages that are in a named module
Reviewed-by: alanb, chegar
2020-11-13 00:32:29 +00:00
Zhengyu Gu
531c56ea65 8256278: Shenandoah: Avoid num of dead callback from weak processor in Shenandoah root verifier
Reviewed-by: rkennke, shade
2020-11-12 21:37:30 +00:00
Roger Riggs
b5a9c92b7a 8256244: java/lang/ProcessHandle/PermissionTest.java fails with TestNG 7.1
Reviewed-by: lancea, iignatyev
2020-11-12 17:06:00 +00:00
Fernando Guallini
90f9a7053a 8255546: Missing coverage for javax.smartcardio.CardPermission and ResponseAPDU
Reviewed-by: xuelei
2020-11-12 17:04:16 +00:00
Sergey Bylokhov
1c0b490c28 8256201: java/awt/FullScreen/FullscreenWindowProps/FullscreenWindowProps.java failed
Reviewed-by: jdv
2020-11-12 17:00:15 +00:00
Maurizio Cimadamore
3e70aac5cc 8254162: Implementation of Foreign-Memory Access API (Third Incubator)
Reviewed-by: erikj, psandoz, alanb
2020-11-12 16:37:23 +00:00
Calvin Cheung
c6ab0fdb15 8255990: Bitmap region of dynamic CDS archive is not unmapped
Reviewed-by: iklam, minqi
2020-11-12 16:14:29 +00:00
Patricio Chilano Mateo
943acd22e5 8256276: Temporarily disable gtest special_flags
Reviewed-by: tschatzl, dcubed
2020-11-12 15:45:26 +00:00
Claes Redestad
19bade0280 8256238: Remove Matcher::pass_original_key_for_aes
Reviewed-by: thartmann, chagedorn
2020-11-12 14:21:24 +00:00
Claes Redestad
f7685a4639 8256203: Simplify RegMask::Empty
Reviewed-by: thartmann, chagedorn
2020-11-12 14:20:48 +00:00
Roland Westrelin
70c7b1d93c 8250607: C2: Filter type in PhiNode::Value() for induction variables of trip-counted integer loops
Reviewed-by: chagedorn, thartmann
2020-11-12 14:15:40 +00:00
Thomas Schatzl
bd8693a084 8256181: Remove Allocation of old generation on alternate memory devices functionality
Reviewed-by: ayang, iignatyev, iklam
2020-11-12 14:05:50 +00:00
Harold Seigel
4df8abc200 8255787: Tag container tests that use cGroups with cgroups keyword
Reviewed-by: sspitsyn
2020-11-12 13:23:57 +00:00
Matthias Baesken
ec08b3f28d 8256188: Adjust output of make/autoconf/configure
Reviewed-by: clanger, ihse
2020-11-12 06:29:13 +00:00
Hao Sun
da48003abd 8255975: Fix AArch64 OpenJDK build failure with gcc-5
Reviewed-by: dholmes
2020-11-12 02:30:39 +00:00
Lin Zang
14e25e2059 8255982: Extend BasicJMapTest to test with different GC Heap
Reviewed-by: shade, iignatyev
2020-11-12 02:12:15 +00:00
Ioi Lam
2f06893a29 8252526: Remove excessive inclusion of jvmti.h and jvmtiExport.hpp
Reviewed-by: ihse, kbarrett
2020-11-12 01:45:27 +00:00
Corey Ashford
ccb48b7203 8248188: Add IntrinsicCandidate and API for Base64 decoding
8248188: Add IntrinsicCandidate and API for Base64 decoding, add Power64LE intrinsic implementation.

This patch set encompasses the following commits:

Adds a new intrinsic candidate to the java.lang.Base64 class - decodeBlock(), and provides a flexible API for the intrinsic. The API is similar to the existing encodeBlock intrinsic.

Adds the code in HotSpot to check and martial the new intrinsic's arguments to the arch-specific intrinsic implementation.

Adds a Power64LE-specific implementation of the decodeBlock intrinsic.

Adds a JMH microbenchmark for both Base64 encoding and encoding.

Enhances the JTReg hotspot intrinsic "TestBase64.java" regression test to more fully test both decoding and encoding.

Reviewed-by: rriggs, mdoerr, kvn
2020-11-11 21:31:07 +00:00
Aleksey Shipilev
59965c17b4 8256237: Zero: non-PCH build fails after JDK-8253064
Reviewed-by: zgu, dcubed
2020-11-11 19:52:18 +00:00
Zhengyu Gu
bfa060f098 8256051: nmethod_entry_barrier stub miscalculates xmm spill size on x86_32
Reviewed-by: shade
2020-11-11 19:12:55 +00:00
Roman Kennke
96e0261041 8256106: Bypass intrinsic/barrier when calling Reference.get() from Finalizer
Reviewed-by: eosterlund
2020-11-11 18:07:08 +00:00
Roman Kennke
3c3469b9ce 8256020: Shenandoah: Don't resurrect objects during evacuation on AS_NO_KEEPALIVE
Reviewed-by: shade
2020-11-11 18:03:58 +00:00
Daniel D. Daugherty
2e19026d45 8253064: monitor list simplifications and getting rid of TSM
Co-authored-by: Erik Österlund <eosterlund@openjdk.org>
Reviewed-by: eosterlund, rehn, coleenp
2020-11-11 16:20:11 +00:00
Aleksey Shipilev
421a7c3b41 8256182: Update qemu-debootstrap cross-compilation recipe
Reviewed-by: ihse
2020-11-11 16:06:08 +00:00
Lance Andersen
6247736fc9 8256018: Adler32/CRC32/CRC32C missing reachabilityFence
Reviewed-by: naoto, alanb
2020-11-11 15:34:03 +00:00
Martin Doerr
436019b8bb 8256166: [C2] Registers get confused on Big Endian after 8221404
Reviewed-by: redestad, thartmann
2020-11-11 15:28:09 +00:00
Alexander Zuev
ed615e3ca0 4907798: MEMORY LEAK: javax.swing.plaf.basic.BasicPopupMenuUI$MenuKeyboardHelper
Reviewed-by: psadhukhan, serb
2020-11-11 11:43:47 +00:00
Boris Ulasevich
362feaae24 8254661: arm32: additional cleanup after fixing SIGSEGV
Reviewed-by: ngasson, shade
2020-11-11 11:09:26 +00:00
Roberto Castañeda Lozano
432c387e21 8254317: C2: Resource consumption of ConvI2LNode::Ideal() grows exponentially
Prevent exponential number of calls to ConvI2LNode::Ideal() when AddIs are used
multiple times by other AddIs in the optimization ConvI2L(AddI(x, y)) ->
AddL(ConvI2L(x), ConvI2L(y)). This is achieved by (1) reusing existing ConvI2Ls
if possible rather than eagerly creating new ones and (2) postponing the
optimization of newly created ConvI2Ls. Remove hook node solution introduced in
8217359, since this is subsumed by (2). Use phase->is_IterGVN() rather than
can_reshape to check if ConvI2LNode::Ideal() is called within iterative GVN, for
clarity. Add regression tests that cover different shapes and sizes of AddI
subgraphs, implicitly checking (by not timing out) that there is no
combinatorial explosion.

Co-authored-by: Vladimir Ivanov <vlivanov@openjdk.org>
Reviewed-by: vlivanov, kvn
2020-11-11 10:18:36 +00:00
Nick Gasson
79ac041844 8256025: AArch64: MachCallRuntimeNode::ret_addr_offset() is incorrect for stub calls
Reviewed-by: aph
2020-11-11 09:59:56 +00:00
prajwal_kumaraswamy
6e8b862811 8255559: Leak File Descriptors Because of ResolverLocalFilesystem#engineResolveURI()
Reviewed-by: weijun
2020-11-11 09:24:42 +00:00
Jan Lahoda
129ff97fe6 8231599: NPE when loading a preview classfile from a future Java version
Reviewed-by: vromero
2020-11-11 09:11:02 +00:00
Prasanta Sadhukhan
5181f9cea2 7190978: javax/swing/JComponent/7154030/bug7154030.java fails on mac
Reviewed-by: serb
2020-11-11 08:08:39 +00:00
Prasanta Sadhukhan
35284e4667 8255916: [macos] javax/swing/JInternalFrame/6647340/bug6647340.java timed out
Reviewed-by: serb
2020-11-11 08:05:20 +00:00
Dong Bo
8638cd9acf 8255625: AArch64: Implement Base64.encodeBlock accelerator/intrinsic
Reviewed-by: aph
2020-11-11 01:51:27 +00:00
Sergey Bylokhov
5de99da75c 8237495: Java MIDI fails with a dereferenced memory error when asked to send a raw 0xF7
Reviewed-by: kizune
2020-11-11 01:31:03 +00:00
Sergey Bylokhov
be635258fa 8211999: Window positioning bugs due to overlapping GraphicsDevice bounds (Windows/HiDPI)
Reviewed-by: kizune, aivanov
2020-11-11 01:29:33 +00:00
Jorn Vernee
0a41ca6b75 8254354: Add a withInvokeExactBehavior() VarHandle combinator
Reviewed-by: psandoz, chegar
2020-11-10 23:26:02 +00:00
Alexey Semenyuk
d6f1463cb3 8233332: Need to create exploded tests covering all forms of modules
Reviewed-by: herrick, almatvee
2020-11-10 22:36:31 +00:00
Claes Redestad
f2a0bf3ea8 8256017: Remove unused elapsedTimer constructor
Reviewed-by: tschatzl, hseigel
2020-11-10 20:39:30 +00:00
Coleen Phillimore
7d4e86be3b 8138588: VerifyMergedCPBytecodes option cleanup needed
Reviewed-by: hseigel, dcubed, sspitsyn
2020-11-10 20:38:25 +00:00
Jayashree S Kumar
a7f46919ff 8244088: [Regression] Switch of Gnome theme ends up in deadlocked UI
Reviewed-by: serb
2020-11-10 19:36:59 +00:00
Frederic Parain
bd3e65b576 8256052: Remove unused allocation type from fieldInfo
Reviewed-by: redestad, lfoltan, hseigel
2020-11-10 19:16:35 +00:00
Mandy Chung
6d8acd2696 8256066: Tests use deprecated TestNG API that is no longer available in new versions
Reviewed-by: jjg
2020-11-10 17:51:52 +00:00
Aleksey Shipilev
643969a184 8255822: Zero: improve build-time JVMTI handling
Reviewed-by: dholmes, ihse
2020-11-10 17:23:10 +00:00
Claes Redestad
6ae5e5b6b7 8221404: C2: Convert RegMask and IndexSet to use uintptr_t
Reviewed-by: kvn, thartmann
2020-11-10 16:48:21 +00:00
Thomas Schatzl
6555996f92 8253600: G1: Fully support pinned regions for full gc
Reviewed-by: sjohanss, ayang
2020-11-10 16:36:06 +00:00
Roman Kennke
97d6e4aed7 8256046: Shenandoah: Mix-in NULL_PTR in non-strong ShLRBNode's type
Reviewed-by: roland, shade
2020-11-10 15:25:44 +00:00
Jie Fu
a1d4b9f35b 8256009: Remove src/hotspot/share/adlc/Test/i486.ad
Reviewed-by: shade, thartmann
2020-11-10 13:49:01 +00:00
Vladimir Ivanov
3455fa9bfd 8256050: JVM crashes with -XX:+PrintDeoptimizationDetails
Reviewed-by: kvn, dcubed
2020-11-10 12:41:11 +00:00
Vladimir Ivanov
e6df13e6e0 8256054: C2: Floating-point min/max operations on vectors intermittently produce wrong results for NaN values
Reviewed-by: redestad, psandoz, dlong
2020-11-10 12:39:33 +00:00
Jie Fu
52805f526b 8256048: Incomplete gitignore setting for netbeans project
Reviewed-by: erikj
2020-11-10 12:16:00 +00:00
Martin Doerr
9d07259f16 8255598: [PPC64] assert(Universe::heap()->is_in(result)) failed: object not in heap
Reviewed-by: ayang, tschatzl
2020-11-10 11:48:23 +00:00
Nils Eliasson
e281b13597 8255011: [TESTBUG] compiler/codecache/stress/UnexpectedDeoptimizationAllTest.java timed out
Change CodeCacheStressRunner to have a 60 second test time

Reviewed-by: iignatyev
2020-11-10 11:25:53 +00:00
Thomas Schatzl
c601849e00 8256038: G1: Improve comment about mark word handling of displaced mark words
Reviewed-by: sjohanss, kbarrett
2020-11-10 09:12:29 +00:00
Roman Kennke
a38dd53411 8256040: Shenandoah: Allow NULL referent in ShenandoahReferenceProcessor::should_discover()
Reviewed-by: shade
2020-11-10 06:56:58 +00:00
Aleksey Shipilev
01567b51dc 8256036: Shenandoah: MethodHandles adapters section overflows after JDK-8255762
Reviewed-by: jiefu, redestad
2020-11-10 06:30:26 +00:00
Aleksey Shipilev
4bc065cf9e 8255782: Turn UseTLAB and ResizeTLAB from product_pd to product, defaulting to "true"
Reviewed-by: stuefe, stefank, tschatzl
2020-11-10 06:29:53 +00:00
Sergey Bylokhov
b5d78afe20 8254863: Delete code leftover from old fixes
Reviewed-by: azeemj, kizune, prr
2020-11-10 06:17:19 +00:00
amresh-sahu
8066b33c40 8253905: Update sanity test suite to not place windows at (0,0)
Reviewed-by: shurailine, serb
2020-11-10 05:27:16 +00:00
Dong Bo
f71f9dc93a 8255949: AArch64: Add support for vectorized shift right and accumulate
Reviewed-by: aph
2020-11-10 01:24:25 +00:00
Zhengyu Gu
1332ba3c3c 8256039: Shenandoah: runtime/stringtable/StringTableCleaningTest.java fails
Reviewed-by: shade, rkennke
2020-11-10 00:05:20 +00:00
Sergey Bylokhov
11431b16e0 4619330: All built-in java.awt.color.ColorSpace fields should be specified as such
Reviewed-by: prr
2020-11-09 23:40:04 +00:00
Andrew Haley
17f04fc9e7 8254078: DataOutputStream is very slow post-disabling of Biased Locking
Reviewed-by: rriggs, shade, alanb
2020-11-09 16:02:30 +00:00
Stefan Johansson
79b7909507 8255980: G1 Service thread register_task can be used after shutdown
Reviewed-by: tschatzl, ayang
2020-11-09 14:24:24 +00:00
Thomas Stuefe
dd8e4ffbe5 8255711: Fix and unify hotspot signal handlers
Reviewed-by: coleenp, gziemski, dholmes
2020-11-09 12:03:06 +00:00
Roman Kennke
d99e1f6c29 8255991: Shenandoah: Apply 'weak' LRB on cmpxchg and xchg
Reviewed-by: shade
2020-11-09 09:19:13 +00:00
Sergey Bylokhov
c7551c37c7 8256014: Eliminate the warning about serialization in non-public API of Swing
Reviewed-by: prr, psadhukhan
2020-11-09 06:38:53 +00:00
Sergey Bylokhov
2d6c28db24 6847157: java.lang.NullPointerException: HDC for component at sun.java2d.loops.Blit.Blit
Reviewed-by: prr
2020-11-09 06:35:50 +00:00
Sergey Bylokhov
3ce09c05c4 8255920: J2DBench should support CS_PYCC color profile
Reviewed-by: prr
2020-11-09 01:38:28 +00:00
Anton Kozlov
2c8f4e202b 8255799: AArch64: CPU_A53MAC feature may be set incorrectly
Reviewed-by: ngasson, aph
2020-11-09 01:35:26 +00:00
Sergey Bylokhov
2cad836833 8255575: java.awt.color.ICC_ColorSpace is not thread-safe
Reviewed-by: prr
2020-11-09 01:28:19 +00:00
Sergey Bylokhov
a53b12df2d 8255722: Create a new test for rotated blit
Reviewed-by: prr
2020-11-09 01:12:46 +00:00
Roman Kennke
f39a2c89fc 8256015: Shenandoah: Add missing Shenandoah implementation in WB_isObjectInOldGen
Reviewed-by: shade
2020-11-08 20:35:25 +00:00
Phil Race
ed7526a66c 8247872: Upgrade HarfBuzz to the latest 2.7.2
Reviewed-by: serb
2020-11-08 17:06:12 +00:00
Xin Liu
6a183fbbc3 8255562: delete UseRDPCForConstantTableBase
Reviewed-by: simonis
2020-11-08 15:03:57 +00:00
Pavel Rappo
c5462bb95d 8255989: Remove explicitly unascribed authorship from Java source files
Reviewed-by: redestad, mr, mchung, iris, serb
2020-11-07 12:11:43 +00:00
Sergey Bylokhov
358f5d2b03 6422025: ThemeReader.cpp can be updated for VC7
Reviewed-by: aivanov
2020-11-07 06:10:56 +00:00
Alex Menkov
a9dff9420a 8254864: vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted001/TestDescription.java timed out
Reviewed-by: sspitsyn, cjplummer
2020-11-06 21:57:43 +00:00
Coleen Phillimore
0b7fba75c1 8254270: linux 32 bit build doesn't compile libjdwp/log_messages.c
Reviewed-by: redestad, cjplummer, dholmes, stuefe
2020-11-06 19:04:09 +00:00
Conor Cleary
f5d36e6c94 8246741: NetworkInterface/UniqueMacAddressesTest: mac address uniqueness test failed
Reviewed-by: chegar, dfuchs
2020-11-06 17:35:24 +00:00
Vicente Romero
688b10b970 8255561: add tests to check binary compatibility rules for records
Reviewed-by: jjg
2020-11-06 16:39:40 +00:00
Brian Burkhalter
727a69f537 8255969: Improve java/io/BufferedInputStream/LargeCopyWithMark.java using jtreg tags
Reviewed-by: naoto
2020-11-06 16:15:14 +00:00
Andy Herrick
952abea47b 8254920: Application launched with jpackage produced .exe crashes JVM
Reviewed-by: asemenyuk, almatvee, kizune
2020-11-06 16:14:36 +00:00
David Holmes
5dfb42fc68 8255563: Missing NULL checks after JDK-8233624
Reviewed-by: kvn
2020-11-06 01:38:10 +00:00
Sergey Bylokhov
e730e8b691 8241806: The sun/awt/shell/FileSystemViewMemoryLeak.java is unstable
Reviewed-by: jdv, aivanov
2020-11-06 00:30:09 +00:00
Eric Caspole
57b98fa55a 8255965: LogCompilation: add sort by nmethod code size
Reviewed-by: kvn, redestad
2020-11-05 23:51:27 +00:00
Chris Plummer
e42c134038 8255706: The JDWP debug agent unecessarily checks for JVMTI_ERROR_INTERRUPT after calling RawMonitorEnter
Reviewed-by: alanb, dholmes, sspitsyn
2020-11-05 23:18:01 +00:00
Claes Redestad
e66fd6f0aa 8255756: Disabling logging does unnecessary work
Reviewed-by: iklam
2020-11-05 21:20:13 +00:00
Claes Redestad
140c162a0d 8255894: Remove unused StubRoutines::_zero_aligned_words
Reviewed-by: shade
2020-11-05 21:18:59 +00:00
Zhengyu Gu
fc894ab11b 8255955: Shenandoah: Only STW GC should process concurrent roots at pauses
Reviewed-by: rkennke
2020-11-05 18:59:33 +00:00
Brian Burkhalter
d6f0940400 8255913: Decrease number of iterations in TestMaxCachedBufferSize
Reviewed-by: lancea, dfuchs
2020-11-05 18:30:34 +00:00
Vladimir Kozlov
1b59595e1e 8255914: [AOT] Using AOT flag should give warning when AOT is not included in build
Reviewed-by: dholmes, iveresov
2020-11-05 17:18:19 +00:00
Brian Burkhalter
a50fdd5484 8219014: (bf) Add absolute bulk put methods which accept a source Buffer
Reviewed-by: psandoz, alanb
2020-11-05 16:27:49 +00:00
Erik Österlund
3a02578b33 8255452: Doing GC during JVMTI MethodExit event posting breaks return oop
Reviewed-by: coleenp, dlong, rrich, sspitsyn
2020-11-05 16:17:33 +00:00
Gerard Ziemski
ba2ff3a6d2 8250637: UseOSErrorReporting times out (on Mac and Linux)
Reviewed-by: stuefe, dholmes
2020-11-05 16:15:27 +00:00
Zhengyu Gu
31918c55f3 8255847: Shenandoah: Shenandoah should not mark through weak roots
Reviewed-by: rkennke
2020-11-05 15:29:11 +00:00
Rahul Yadav
867a484df1 8255214: Unsupported 'valign' attribute for 'th' tag used in j.u.l.LogManager
Reviewed-by: mchung, dfuchs
2020-11-05 14:35:06 +00:00
Sergey Bylokhov
d3c43c2816 8255937: Better cleanup for test/jdk/javax/imageio/stream/StreamFlush.java
Reviewed-by: jdv
2020-11-05 11:35:54 +00:00
Kiran Sidhartha Ravikumar
b65ff60a8e 8255226: (tz) Upgrade time-zone data to tzdata2020d
Reviewed-by: naoto
2020-11-05 11:29:19 +00:00
Patrick Concannon
2b78a43f77 8255584: HttpPrincipal::getName returns incorrect name
Reviewed-by: dfuchs
2020-11-05 10:10:21 +00:00
Lin Zang
a6ce6a5d80 8252103: Parallel heap inspection for ParallelScavengeHeap
Reviewed-by: sjohanss, tschatzl
2020-11-05 09:43:21 +00:00
Jan Lahoda
cdef186c11 8232856: jshell crashes when pressing up arrow after /!
Reviewed-by: psandoz
2020-11-05 09:12:07 +00:00
Claes Redestad
700447f7e4 8255909: Remove unused delayed_value methods
Reviewed-by: minqi, coleenp, thartmann
2020-11-05 08:37:08 +00:00
Stefan Johansson
397972ebf3 8255848: -Xlog:gc+heap+exit shows "used 0K"
Reviewed-by: tschatzl, ayang
2020-11-05 08:13:40 +00:00
Tobias Hartmann
eb85b8da32 8255665: C2 should aggressively remove temporary hook nodes
Reviewed-by: chagedorn, kvn
2020-11-05 08:02:47 +00:00
Jan Lahoda
18bc95ba51 8250625: Compiler implementation of Pattern Matching for instanceof (Final)
Reviewed-by: vromero
2020-11-05 08:01:33 +00:00
Aleksey Shipilev
60e4aca846 8255890: Zero: remove unused methods from BytecodeInterpreter
Reviewed-by: coleenp
2020-11-05 06:29:35 +00:00
Ioi Lam
397bae20e9 8255860: Clean up CDS logging related to lambda
Reviewed-by: ccheung, minqi
2020-11-05 05:20:59 +00:00
Vicente Romero
97a81cee25 8253385: annotation processors remove varargs information from record components
Reviewed-by: jjg
2020-11-04 23:30:41 +00:00
Chris Plummer
166c728300 8255858: Add debug agent support for storing thread names
Reviewed-by: sspitsyn, amenkov
2020-11-04 22:43:34 +00:00
Claes Redestad
a0ade22057 8255900: x86: Reduce impact when VerifyOops is disabled
Reviewed-by: neliasso, minqi, kvn
2020-11-04 21:40:31 +00:00
Roman Kennke
29db1dcd62 8255886: Shenandoah: Resolve cset address truncation and register clash in interpreter LRB
Reviewed-by: shade
2020-11-04 21:30:27 +00:00
Andy Herrick
26e7ef78fb 8252870: Finalize (remove "incubator" from) jpackage
Reviewed-by: kcr, erikj, almatvee, asemenyuk, prr, ihse
2020-11-04 20:27:11 +00:00
Jorn Vernee
804bd72599 8255128: linux x86 build failure with libJNIPoint.c
Reviewed-by: coleenp, shade, ihse
2020-11-04 18:10:49 +00:00
Jorn Vernee
160759ceef 8255838: Use 32-bit immediate movslq in macro assembler if 64-bit value fits in 32 bits on x86_64
Reviewed-by: azeemj, kvn, redestad, thartmann
2020-11-04 18:10:23 +00:00
Mandy Chung
94ace035a5 8255863: Clean up test/jdk/java/lang/invoke/defineHiddenClass/BasicTest.java
Reviewed-by: rriggs, chegar
2020-11-04 17:44:09 +00:00
Mandy Chung
2da9981e33 8255862: Remove @SuppressWarnings from sun.misc.Unsafe
Reviewed-by: shade, alanb, chegar
2020-11-04 17:40:06 +00:00
Calvin Cheung
5348298f62 8255855: appcds/jigsaw/NewModuleFinderTest.java test failed due to unexpected NPE
Reviewed-by: iklam
2020-11-04 17:17:46 +00:00
Brian Burkhalter
c287170c94 8254742: InputStream::readNBytes(int) result may contain zeros not in input
Reviewed-by: shade, bchristi
2020-11-04 16:50:02 +00:00
Magnus Ihse Bursie
7dcaba6312 8253892: Disable misleading-indentation on clang as well as gcc
Reviewed-by: erikj
2020-11-04 16:17:15 +00:00
Aleksey Shipilev
61c924701f 8255895: Submit workflow artifacts miss hs_errs/replays due to ZIP include mismatch
Reviewed-by: erikj
2020-11-04 14:44:27 +00:00
Prasanta Sadhukhan
7f4d873dd9 8255215: Unsupported 'valign' attribute for 'tr' tag used in j.s.t.h.HTMLDocument
Reviewed-by: serb
2020-11-04 13:08:46 +00:00
Jesper Wilhelmsson
724217c740 8255893: Problemlist runtime/cds/appcds/jigsaw/NewModuleFinderTest.java
Reviewed-by: dholmes
2020-11-04 11:51:59 +00:00
Kim Barrett
6023f6b1bf 8188055: (ref) Add Reference::refersTo predicate
Reviewed-by: mchung, pliden, rriggs, dholmes, ihse, smarks, alanb
2020-11-04 09:18:23 +00:00
Matthias Baesken
ab9192e463 8255681: print callstack in error case in runAWTLoopWithApp
Reviewed-by: clanger, serb
2020-11-04 07:44:43 +00:00
Roberto Castañeda Lozano
c7a2c24529 8255797: ciReplay: improve documentation of replay file syntax in parser
Complete and disambiguate the informal specification of the replay file syntax
given in the ciReplay class implementation.

Reviewed-by: kvn, thartmann
2020-11-04 07:32:21 +00:00
Aleksey Shipilev
a5d8a9c211 8255617: Zero: purge the remaining bytecode interpreter profiling support
Reviewed-by: coleenp, sgehwolf, jiefu
2020-11-04 06:40:31 +00:00
Kim Barrett
4b88119b4b 8253037: G1: Improve check for string dedup
Combine dedup enabled and is_string into a single test, using the already in-hand klass of the object.

Reviewed-by: ayang, tschatzl
2020-11-04 05:04:02 +00:00
Magnus Ihse Bursie
2668d23244 8255861: Also update jaotc.1 for JDK 16
Reviewed-by: kvn
2020-11-03 23:52:08 +00:00
Erik Joelsson
76fa974cb2 8255850: Hotspot recompiled on first incremental build
Reviewed-by: ihse
2020-11-03 23:11:23 +00:00
Magnus Ihse Bursie
622f72bc8b 8255853: Update all nroff manpages for JDK 16 release
Reviewed-by: erikj
2020-11-03 22:12:56 +00:00
Yumin Qi
cdf9cd8afa 8255784: appcds/javaldr/ExceptionDuringDumpAtObjectsInitPhase.java test failed resulting in VM crash
Reviewed-by: ccheung, iklam
2020-11-03 20:50:51 +00:00
Roman Kennke
eab99f37ce 8255852: Shenandoah: Fix incorrect copyright header in new files added by 8254315
Reviewed-by: zgu
2020-11-03 20:34:42 +00:00
Brian Burkhalter
450452bb8c 8254876: (fs) NullPointerException not thrown when first argument to Path.of or Paths.get is null
Reviewed-by: rriggs, alanb
2020-11-03 19:39:28 +00:00
Calvin Cheung
b46d73bee8 8255239: The timezone of the hs_err_pid log file is corrupted in Japanese locale
Reviewed-by: iklam, minqi
2020-11-03 19:30:46 +00:00
Lance Andersen
6606e0909c 8255380: (zipfs) ZipFileSystem::readExtra can fail if zipinfo-time is not set to false
Reviewed-by: redestad
2020-11-03 19:20:42 +00:00
Bernhard Urban-Forster
88ee973334 8254827: JVMCI: Enable it for Windows+AArch64
Reviewed-by: ihse, never, kvn
2020-11-03 19:04:47 +00:00
Roman Kennke
f64a15d62e 8254315: Shenandoah: Concurrent weak reference processing
Reviewed-by: zgu, shade
2020-11-03 18:58:46 +00:00
Sergey Bylokhov
83f3cf4298 8196087: java/awt/image/DrawImage/IncorrectUnmanagedImageRotatedClip.java fails
Reviewed-by: jdv
2020-11-03 18:28:19 +00:00
Zhengyu Gu
134e22a00f 8255606: Enable concurrent stack processing on x86_32 platforms
Reviewed-by: shade, rkennke, eosterlund
2020-11-03 17:23:47 +00:00
Aleksey Shipilev
ca216bae1a 8255810: Zero: build fails without JVMTI
Reviewed-by: coleenp
2020-11-03 17:21:16 +00:00
Jonathan Gibbons
d47336bf1c 8248320: Provide a unique accessible name for <nav role="navigation">
Reviewed-by: hannesw
2020-11-03 17:15:17 +00:00
Magnus Ihse Bursie
64a981124a 8255798: Remove dead headless code in CompileJavaModules.gmk
Reviewed-by: shade, erikj
2020-11-03 14:52:05 +00:00
Magnus Ihse Bursie
364b0fe82e 8255801: Race when building ct.sym build tools
Reviewed-by: erikj
2020-11-03 14:51:14 +00:00
Aleksey Shipilev
f389a718a8 8255737: Zero: DO_UPDATE_INSTRUCTION_COUNT should only update when relevant VM flags are set
Reviewed-by: sgehwolf
2020-11-03 14:00:28 +00:00
Roman Kennke
93ef0091db 8255762: Shenandoah: Consolidate/streamline interpreter LRBs
Reviewed-by: shade
2020-11-03 12:59:17 +00:00
Richard Reingruber
63461d59a1 8255072: [TESTBUG] com/sun/jdi/EATests.java should not fail if expected VMOutOfMemoryException is not thrown
Reviewed-by: cjplummer, sspitsyn, kvn
2020-11-03 12:36:59 +00:00
Jorn Vernee
b8d4e02ce7 8255374: Add a dropReturn MethodHandle combinator
Reviewed-by: redestad
2020-11-03 12:10:48 +00:00
Stefan Johansson
1d0bd50624 8254758: Change G1ServiceThread to be task based
Reviewed-by: ayang, iwalulya, tschatzl
2020-11-03 11:07:35 +00:00
Aleksey Shipilev
9a0cf58721 8255615: Zero: demote ZeroStack::abi_stack_available guarantee to assert
Reviewed-by: sgehwolf
2020-11-03 11:04:47 +00:00
Aleksey Shipilev
904561ebf2 8255719: Zero: on return path, check for pending exception before attempting to clear it
Reviewed-by: sgehwolf
2020-11-03 11:02:15 +00:00
Aleksey Shipilev
9bd836e046 8255744: Zero: handle JVM_CONSTANT_DynamicInError
Reviewed-by: sgehwolf
2020-11-03 10:35:20 +00:00
Patrick Zhang
36998b006d 8255716: AArch64: Regression: JVM crashes if manually offline a core
Reviewed-by: aph, adinn, akozlov
2020-11-03 09:28:12 +00:00
Jayathirth D V
4107670d62 8233562: [TESTBUG] Swing StyledEditorKit test bug4506788.java fails on MacOS
Reviewed-by: psadhukhan
2020-11-03 07:54:31 +00:00
Thomas Stuefe
9a36747927 8255780: Remove unused overloads of VMError::report_and_die()
Reviewed-by: mdoerr, coleenp
2020-11-03 07:34:06 +00:00
Stefan Karlsson
c96a914b52 8255662: ZGC: Unify nmethod closures in the heap iterator
Reviewed-by: eosterlund, pliden
2020-11-03 07:31:47 +00:00
Aleksey Shipilev
aa2862ad86 8255741: Zero: print signal name in unhandled signal handler
Reviewed-by: stuefe
2020-11-03 07:28:06 +00:00
Tobias Hartmann
15805741f1 8255672: Replace PhaseTransform::eqv by pointer equality check
Reviewed-by: chagedorn, redestad, kvn
2020-11-03 07:17:58 +00:00
Thomas Stuefe
e7a2d5c843 8252533: Signal handlers should run with synchronous error signals unblocked
Reviewed-by: gziemski, dholmes
2020-11-03 07:16:45 +00:00
Aleksey Shipilev
6d36b4bb79 8255743: Relax SIGFPE match in in runtime/ErrorHandling/SecondaryErrorTest.java
Reviewed-by: stuefe
2020-11-03 07:06:14 +00:00
Aleksey Shipilev
f0eeca9080 8255718: Zero: VM should know it runs in interpreter-only mode
Reviewed-by: andrew, coleenp
2020-11-03 07:04:28 +00:00
Jayathirth D V
9beb866b12 8233561: [TESTBUG] Swing text test bug8014863.java fails on macos
Reviewed-by: psadhukhan
2020-11-03 06:38:22 +00:00
Prasanta Sadhukhan
fe4e6b3e90 8196089: javax/swing/Action/8133039/bug8133039.java fails
Reviewed-by: jdv
2020-11-03 03:16:36 +00:00
Nick Gasson
50357d136a 8254723: add diagnostic command to write Linux perf map file
Reviewed-by: ysuenaga, sspitsyn
2020-11-03 01:37:57 +00:00
Magnus Ihse Bursie
f97ec359ec 8255785: X11 libraries should not be required by configure for headless only
Reviewed-by: mikael, prr
2020-11-03 01:17:10 +00:00
Erik Joelsson
184db64dfb 8255732: OpenJDK fails to build if $A is set to a value with spaces
Reviewed-by: ihse
2020-11-02 21:06:38 +00:00
Chris Plummer
c774741655 8255695: Some JVMTI calls in the jdwp debug agent are using FUNC_PTR instead of JVMTI_FUNC_PTR
Reviewed-by: sspitsyn, amenkov
2020-11-02 20:31:49 +00:00
Bernhard Urban-Forster
bee864fb3a 8255766: Fix linux+arm64 build after 8254072
Reviewed-by: kvn, ihse
2020-11-02 20:25:59 +00:00
Chris Plummer
ceba2f8503 8255696: JDWP debug agent's canSuspendResumeThreadLists() should be removed
Reviewed-by: amenkov, sspitsyn
2020-11-02 20:23:44 +00:00
Chris Plummer
a250716ad2 8255694: memory leak in JDWP debug agent after calling JVMTI GetAllThreads
Reviewed-by: amenkov, sspitsyn
2020-11-02 20:13:32 +00:00
Sergey Bylokhov
acb5f654b1 8211958: Broken links in java.desktop files
Reviewed-by: aivanov
2020-11-02 19:32:06 +00:00
Tom Rodriguez
bc6085b06c 8255578: [JVMCI] be more careful about reflective reads of Class.componentType.
Reviewed-by: kvn, dlong
2020-11-02 19:19:48 +00:00
Lance Andersen
05bcd67e65 8255529: Remove unused methods from java.util.zip.ZipFile
Reviewed-by: naoto, redestad
2020-11-02 18:24:48 +00:00
Aleksey Shipilev
d93e3a7d0b 8255760: Shenandoah: match constants style in ShenandoahMarkTask fallback
Reviewed-by: zgu, rkennke
2020-11-02 17:34:01 +00:00
Per Liden
3e89f729af 8255237: ZGC: Bulk free garbage pages during relocation set selection
Co-authored-by: Albert Mingkun Yang <ayang@openjdk.org>
Co-authored-by: Per Liden <pliden@openjdk.org>
Reviewed-by: ayang, eosterlund
2020-11-02 17:00:34 +00:00
Naoto Sato
6dac8d2780 8255671: Bidi.reorderVisually has misleading exception messages
Reviewed-by: joehw
2020-11-02 16:48:16 +00:00
Vladimir Kozlov
2f7d34f205 8255616: Disable AOT and Graal in Oracle OpenJDK
Reviewed-by: iignatyev, vlivanov, iveresov, ihse
2020-11-02 16:04:46 +00:00
Roman Kennke
0e19ded93d 8255401: Shenandoah: Allow oldval and newval registers to overlap in cmpxchg_oop()
Reviewed-by: roland
2020-11-02 16:01:18 +00:00
Roland Westrelin
a3aad11918 8255400: Shenandoah: C2 failures after JDK-8255000
Reviewed-by: rkennke
2020-11-02 15:48:14 +00:00
Stefan Karlsson
1769c48342 8255471: ZGC: Rework root iterators and closures
Reviewed-by: eosterlund, pliden
2020-11-02 15:26:32 +00:00
Erik Joelsson
b028074384 8255673: Wrong version in docs bundles
Reviewed-by: tbell, ihse
2020-11-02 14:45:39 +00:00
Per Liden
4c66b158a8 8255235: ZGC: Allocate and initialize forwarding data structures in parallel
Reviewed-by: ayang, eosterlund
2020-11-02 14:31:56 +00:00
Roman Kennke
1019581ce2 8255691: Shenandoah: Invoke native-LRB only on non-strong refs
Reviewed-by: zgu
2020-11-02 14:10:47 +00:00
Bernhard Urban-Forster
d2812f780e 8254072: AArch64: Get rid of --disable-warnings-as-errors on Windows+ARM64 build
Reviewed-by: ihse, aph
2020-11-02 13:42:56 +00:00
Claes Redestad
120aec7054 8255720: Optimize bci_to_dp/-data by enabling iteration over raw DataLayouts
Reviewed-by: kvn, thartmann
2020-11-02 13:25:11 +00:00
Claes Redestad
4b775e64bd 8255721: Remove no-op clean_weak_method_links methods
Reviewed-by: kvn, thartmann
2020-11-02 13:24:37 +00:00
Andrew Haley
3302d3adb5 8255544: Create a checked cast
Reviewed-by: adinn, iklam
2020-11-02 13:12:18 +00:00
Thomas Stuefe
54c8813254 8255734: VM should ignore SIGXFSZ on ppc64, s390 too
Reviewed-by: mdoerr, lucy
2020-11-02 12:45:05 +00:00
Sergey Bylokhov
ceab9f3248 6816284: Notepad class should be public
Reviewed-by: pbansal
2020-11-02 12:26:15 +00:00
Sergey Bylokhov
eb66418b32 7124397: [macosx] JSpinner serialiazation - deserialization issue
Reviewed-by: pbansal
2020-11-02 12:22:28 +00:00
Claes Redestad
79a010f76b 8255697: LogTargetHandle::print should check if log level is enabled
Reviewed-by: stefank, tschatzl, stuefe
2020-11-02 10:58:16 +00:00
Prasanta Sadhukhan
98c91b64b2 8233637: [TESTBUG] Swing ActionListenerCalledTwiceTest.java fails on macos
Reviewed-by: jdv
2020-11-02 10:37:45 +00:00
Prasanta Sadhukhan
e97809d3d4 8233641: [TESTBUG] JMenuItem test bug4171437.java fails on macos
Reviewed-by: jdv
2020-11-02 10:37:09 +00:00
Kim Barrett
69f5235e16 8255596: Mutex safepoint checking options and flags should be scoped enums
Reviewed-by: tschatzl, rehn
2020-11-02 10:16:40 +00:00
Jan Lahoda
d05df7c17a 8236842: Surprising 'multiple elements' behaviour from getTypeElement when cross-compiling with --release
Reviewed-by: vromero
2020-11-02 10:15:16 +00:00
Christoph Langer
64feeab70a 8255603: Memory/Performance regression after JDK-8210985
Reviewed-by: simonis, xuelei, aph
2020-11-01 23:24:47 +00:00
Prasanta Sadhukhan
518ff518e1 8233569: [TESTBUG] JTextComponent test bug6361367.java fails on macos
Reviewed-by: serb
2020-11-01 15:49:49 +00:00
Prasanta Sadhukhan
4c4b8f4de2 8196302: javax/swing/JFileChooser/8041694/bug8041694.java
Reviewed-by: serb
2020-11-01 15:46:07 +00:00
Christian Stein
f61ce32770 8255576: (fs) Files.isHidden() throws ArrayIndexOutOfBoundsException (unix)
Reviewed-by: alanb
2020-11-01 12:39:43 +00:00
Sergey Bylokhov
fe7672bac6 8196099: javax/swing/text/CSSBorder/6796710/bug6796710.java fails
Reviewed-by: psadhukhan
2020-10-31 22:20:30 +00:00
Prasanta Sadhukhan
cacce843aa 8169954: JFileChooser/8021253: java.lang.RuntimeException: Default button is not pressed
Reviewed-by: serb
2020-10-31 11:03:43 +00:00
Prasanta Sadhukhan
7597cba92b 8143021: [TEST_BUG] Test javax/swing/JColorChooser/Test6541987.java fails
Reviewed-by: serb
2020-10-31 10:58:38 +00:00
Weijun Wang
80380d51d2 8255494: PKCS7 should use digest algorithm to verify the signature
Reviewed-by: valeriep
2020-10-31 03:22:35 +00:00
Yumin Qi
9d5c9cc78b 8254309: appcds GCDuringDump.java failed - class must exist
Reviewed-by: ccheung, iklam
2020-10-31 00:08:37 +00:00
Calvin Cheung
36c150b199 8255489: Unify the parsing of @lambda-proxy and @lambda-form-invokers tags in a classlist
Reviewed-by: iklam, minqi
2020-10-30 22:01:59 +00:00
Brent Christian
0f48603394 8214561: Use {@systemProperty} for definition of "java.util.prefs.PreferencesFactory" system property
Reviewed-by: lancea
2020-10-30 20:35:33 +00:00
Brent Christian
98a69edec7 8255690: &nbsp in StringBuilder.subSequence
Reviewed-by: lancea
2020-10-30 20:35:06 +00:00
Claes Redestad
4158567f84 8255455: Pre-generate ThreadHeapSampler::_log_table
Reviewed-by: iklam, sspitsyn
2020-10-30 18:13:45 +00:00
Jonathan Gibbons
d086757834 8254052: improve type specificity of TagletWriter and friends
Reviewed-by: hannesw
2020-10-30 17:23:39 +00:00
Roman Kennke
8600d0d982 8255614: Shenandoah: Consolidate/streamline runtime LRBs
Reviewed-by: zgu
2020-10-30 17:09:56 +00:00
Erik Joelsson
9b1eebc73d 8255620: Build race between modulegraphs and exploded-image-optimize targets
Reviewed-by: tbell
2020-10-30 13:55:31 +00:00
Erik Joelsson
3fd821606d 8255612: Explicitly disable dtrace for Oracle OpenJDK Linux builds
Reviewed-by: mikael
2020-10-30 13:42:12 +00:00
Weijun Wang
a7563207f6 8255536: Remove the directsign property and option
Reviewed-by: mullan
2020-10-30 13:29:41 +00:00
Weijun Wang
f77a658557 8153005: Upgrade the default PKCS12 encryption/MAC algorithms
Reviewed-by: mullan
2020-10-30 13:23:33 +00:00
Harold Seigel
8a065ef2e2 8255005: Fix indentation levels in classFileParser.cpp
Reviewed-by: lfoltan, coleenp
2020-10-30 12:56:15 +00:00
Jie Fu
e48016b163 8255565: [Vector API] Add missing format strings for extract instructs in x86.ad
Reviewed-by: vlivanov, jbhateja
2020-10-30 08:49:08 +00:00
Thomas Schatzl
2c7fc85be9 8254972: Fix pretouch chunk calculations
Reviewed-by: sjohanss, kbarrett
2020-10-30 08:45:34 +00:00
Patrick Concannon
d12819158a 8253473: Javadoc clean up in HttpHandler, HttpPrincipal, HttpContext, and HttpsConfigurator
Reviewed-by: dfuchs
2020-10-30 08:42:20 +00:00
Kim Barrett
379ba80eb7 8255595: delay_to_keep_mmu passes wrong arguments to Monitor wait
Remove improper wait argument.

Reviewed-by: sjohanss, tschatzl, ayang
2020-10-30 04:24:34 +00:00
Ioi Lam
1a89d68e87 8255285: Move JVMFlag origins into a new enum JVMFlagOrigin
Reviewed-by: dholmes, redestad
2020-10-30 03:44:54 +00:00
Vladimir Kozlov
56eb5f54f4 8255466: C2 crashes at ciObject::get_oop() const+0x0
Reviewed-by: vlivanov
2020-10-29 22:34:14 +00:00
Mandy Chung
5782a2a309 8254975: lambda proxy fails to access a protected member inherited from a split package
Reviewed-by: rriggs
2020-10-29 21:11:37 +00:00
Conor Cleary
d5138d1fce 8255604: java/nio/channels/DatagramChannel/Connect.java fails with java.net.BindException: Cannot assign requested address: connect
Reviewed-by: dfuchs, michaelm
2020-10-29 19:08:06 +00:00
Jorn Vernee
2a2fa134c3 8255449: Improve the exception message of MethodHandles::permuteArguments
Reviewed-by: chegar, mchung
2020-10-29 18:32:48 +00:00
Xin Liu
2a50c3f810 8241495: Make more compiler related flags available on a per method level
add more method-level options  for -XX:CompileCommand
eg. -XX:CompileCommand=option,java.lang.String::startsWith,BreakAtCompile directs JIT compilers to hit BREAKPOINT when they compile the method java.lang.String::startsWith.

Reviewed-by: neliasso, azeemj, phh
2020-10-29 17:41:57 +00:00
Thomas Schatzl
5c520c3fdd 8255232: G1: Make G1BiasedMappedArray freeable
Reviewed-by: ayang, kbarrett
2020-10-29 15:06:25 +00:00
Aleksey Shipilev
9e5bbff51d 8255550: x86: Assembler::cmpq(Address dst, Register src) encoding is incorrect
Reviewed-by: kvn, eosterlund
2020-10-29 14:19:56 +00:00
Erik Österlund
5b185585e8 8255243: Reinforce escape barrier interactions with ZGC conc stack processing
Co-authored-by: Richard Reingruber <rrich@openjdk.org>
Reviewed-by: rrich, sspitsyn
2020-10-29 14:18:11 +00:00
Roman Kennke
faf23de54d 8255534: Shenandoah: Fix CmpP optimization wrt native-LRB
Reviewed-by: shade
2020-10-29 12:55:54 +00:00
Zhengyu Gu
579e50bb40 8255564: InterpreterMacroAssembler::remove_activation() needs to restore thread right after VM call on x86_32
Reviewed-by: dholmes, shade
2020-10-29 12:32:30 +00:00
Aleksey Shipilev
4b20e460dc 8255579: x86: Use cmpq(Register,Address) in safepoint_poll
Reviewed-by: eosterlund, zgu
2020-10-29 12:25:11 +00:00
jasontatton-aws
72ff8e2118 8254782: Fix benchmark issues in java/lang/StringIndexOfChar.java benchmark
Reviewed-by: redestad, shade
2020-10-29 12:06:43 +00:00
Conor Cleary
ea26ff1142 8247614: java/nio/channels/DatagramChannel/Connect.java timed out
Reviewed-by: dfuchs, alanb
2020-10-29 09:57:09 +00:00
Thomas Schatzl
38574d5169 8255298: Remove SurvivorAlignmentInBytes functionality
Reviewed-by: shade, ayang, kbarrett
2020-10-29 08:49:15 +00:00
Thomas Stuefe
4031cb4190 8254189: Improve comments for StackOverFlow and fix in_xxx() functions
Reviewed-by: dholmes, gziemski
2020-10-29 06:30:03 +00:00
Prasanta Sadhukhan
caec8d2208 8233560: [TESTBUG] ToolTipManager/Test6256140.java is failing on macos
Reviewed-by: serb
2020-10-29 02:37:09 +00:00
Prasanta Sadhukhan
a5b42ec8b2 8233570: [TESTBUG] HTMLEditorKit test bug5043626.java is failing on macos
Reviewed-by: serb
2020-10-29 02:35:07 +00:00
Igor Ignatyev
7e305ad1d4 8255405: sun/net/ftp/imp/FtpClient uses SimpleDateFormat in not thread-safe manner
Reviewed-by: chegar, ryadav, dfuchs
2020-10-28 23:53:51 +00:00
Jie Fu
d82a6dcfb9 8255438: [Vector API] More instructs in x86.ad should use legacy mode for code-gen
Reviewed-by: kvn, vlivanov, azeemj
2020-10-28 23:03:11 +00:00
Jason Tatton (AWS)
1a5e6c98c2 8253101: Clean up CallStaticJavaNode EA flags
Reviewed-by: kvn
2020-10-28 22:44:52 +00:00
Claes Redestad
a7595b2a61 8250669: Running JMH micros is broken after JDK-8248135
Reviewed-by: ecaspole, erikj
2020-10-28 22:36:43 +00:00
Magnus Ihse Bursie
edd19888df 8255530: Additional cleanup after JDK-8235710 (elliptic curve removal)
Reviewed-by: erikj
2020-10-28 22:25:21 +00:00
Naoto Sato
790d6e2d25 8255533: Incorrect javadoc in DateTimeFormatterBuilder.appendPattern() for 'uu'/'yy'
Reviewed-by: lancea, rriggs
2020-10-28 20:01:51 +00:00
Michael McMahon
3f20612e03 8255555: Bad copyright headers in SocketChannelCompare.java SocketChannelConnectionSetup.java UnixSocketChannelReadWrite.java
Reviewed-by: dfuchs, bpb
2020-10-28 19:00:47 +00:00
Severin Gehwolf
42fc158991 8253939: [TESTBUG] Increase coverage of the cgroups detection code
Reviewed-by: shade, bobv
2020-10-28 18:54:02 +00:00
Michael McMahon
01eb69035e 8255554: Bad copyright header in AbstractFileSystemProvider.java
Reviewed-by: bpb, alanb, iris
2020-10-28 18:27:08 +00:00
Aleksey Shipilev
1215b1a8f5 8255457: Shenandoah: cleanup ShenandoahMarkTask
Reviewed-by: rkennke
2020-10-28 18:04:34 +00:00
Aleksey Shipilev
af33e16225 8255441: Cleanup ciEnv/jvmciEnv::lookup_method-s
Reviewed-by: kvn
2020-10-28 17:45:53 +00:00
Vicente Romero
8ad7f383c1 8255014: Record Classes javax.lang.model changes, follow-up
Reviewed-by: jlahoda
2020-10-28 17:34:10 +00:00
Michael McMahon
6bb7e45e8e 8245194: Unix domain socket channel implementation
Reviewed-by: erikj, dfuchs, alanb, chegar
2020-10-28 17:26:26 +00:00
Vicente Romero
8bde2f4e3d 8255013: implement Record Classes as a standard feature in Java, follow-up
Co-authored-by: Vicente Romero <vromero@openjdk.org>
Co-authored-by: Harold Seigel <hseigel@openjdk.org>
Co-authored-by: Chris Hegarty <chegar@openjdk.org>
Reviewed-by: jlahoda
2020-10-28 17:18:46 +00:00
Igor Veresov
0425889885 8255429: Remove C2-based profiling
Reviewed-by: kvn, neliasso, vlivanov
2020-10-28 16:22:07 +00:00
Erik Österlund
aaf4f690f0 8255233: InterpreterRuntime::at_unwind should be a JRT_LEAF
Reviewed-by: coleenp, dholmes
2020-10-28 14:14:51 +00:00
Claes Redestad
bbf0a31e9e 8255397: x86: coalesce reference and int entry points into vtos bytecodes
Reviewed-by: shade, coleenp
2020-10-28 14:13:31 +00:00
Harold Seigel
3bd5b80761 8243583: Change 'final' error checks to throw ICCE
Reviewed-by: lfoltan, dholmes
2020-10-28 12:32:45 +00:00
Roman Kennke
1f00c3b9ba 8255527: Shenandoah: Let ShenadoahGCStateResetter disable barriers
Reviewed-by: shade, zgu
2020-10-28 12:14:44 +00:00
Sergey Tsypanov
3c4fc79326 8255299: Drop explicit zeroing at instantiation of Atomic* objects
Reviewed-by: redestad, serb, prr
2020-10-28 12:11:53 +00:00
Dong Bo
6b2d11ba24 8255246: AArch64: Implement BigInteger shiftRight and shiftLeft accelerator/intrinsic
Reviewed-by: aph
2020-10-28 11:52:07 +00:00
Jie Fu
591e7e2c19 8255378: [Vector API] Remove redundant vector length check after JDK-8254814 and JDK-8255210
Reviewed-by: vlivanov, adinn
2020-10-28 11:04:08 +00:00
Per Liden
2c9dfc73f9 8255234: ZGC: Bulk allocate forwarding data structures
Co-authored-by: Albert Mingkun Yang <ayang@openjdk.org>
Co-authored-by: Per Liden <pliden@openjdk.org>
Reviewed-by: ayang, stefank
2020-10-28 08:56:57 +00:00
Christian Hagedorn
b7d483c7d5 8255245: C1: Fix output of -XX:+PrintCFGToFile to open it with visualizer
Reviewed-by: kvn, xliu
2020-10-28 08:47:14 +00:00
Sergey Bylokhov
5e0a8cdf89 8255488: Re-enable some problem listed tests
Reviewed-by: psadhukhan
2020-10-28 08:40:41 +00:00
Prasanta Sadhukhan
3f8bd92308 8233556: [TESTBUG] JPopupMenu tests fail on MacOS
Reviewed-by: serb
2020-10-28 06:37:49 +00:00
Prasanta Sadhukhan
4acf634d05 8171998: javax/swing/JMenu/4692443/bug4692443.java fails on Windows
Reviewed-by: serb
2020-10-28 06:32:29 +00:00
Eric Liu
a804c6a6ef 8254871: Remove unnecessary string copy in NetworkInterface.c
Reviewed-by: michaelm
2020-10-28 02:15:36 +00:00
Anton Kozlov
acd0e2560c 8255254: Split os::reserve_memory and os::map_memory_to_file interfaces
Reviewed-by: stefank, stuefe
2020-10-27 20:37:01 +00:00
Sergey Bylokhov
dc85a3fe81 8015602: [macosx] Test javax/swing/SpringLayout/4726194/bug4726194.java fails on MacOSX
Reviewed-by: psadhukhan, pbansal
2020-10-27 20:23:32 +00:00
Alex Menkov
1d245c6ec8 8252117: com/sun/jdi/BadHandshakeTest.java failed with "ConnectException: Connection refused: connect"
Reviewed-by: cjplummer, sspitsyn
2020-10-27 19:49:38 +00:00
Alexey Bakhtin
7a7ce021de 8007632: DES/3DES keys support in PKCS12 keystore
Reviewed-by: weijun
2020-10-27 18:41:44 +00:00
Roger Riggs
a023b93712 8255394: jdk/test/lib/hexdump/ASN1FormatterTest.java fails with ---illegal-access=deny
Reviewed-by: alanb, weijun
2020-10-27 18:17:57 +00:00
Calvin Cheung
84e985da4b 8253920: Share method trampolines in CDS dynamic archive
Reviewed-by: redestad, minqi, iklam
2020-10-27 16:16:01 +00:00
Thomas Stuefe
7d41a54188 8255450: runtime/ThreadCountLimit.java causes high system load
Reviewed-by: shade
2020-10-27 14:25:34 +00:00
Magnus Ihse Bursie
504cb00568 8252113: Move jfr man page into jfr module
Reviewed-by: erikj
2020-10-27 13:57:56 +00:00
Aleksey Shipilev
552192ff71 8255305: Add Linux x86_32 tier1 to submit workflow
Reviewed-by: ihse
2020-10-27 13:57:07 +00:00
Aleksey Shipilev
66a3917d4d 8255331: Problemlist java/foreign/TestMismatch.java on 32-bit platforms until JDK-8254162
Reviewed-by: mcimadamore
2020-10-27 13:53:02 +00:00
Stefan Karlsson
cf56c7e04c 8254980: ZGC: ZHeapIterator visits armed nmethods with -XX:-ClassUnloading
Reviewed-by: eosterlund, pliden
2020-10-27 12:27:23 +00:00
Harold Seigel
18d9905c40 8255342: Remove non-specified JVM checks on Classes with Record attributes
Reviewed-by: dholmes, coleenp
2020-10-27 12:23:14 +00:00
Prasanta Sadhukhan
767965046e 8231231: The printing result is different from the case instruction
Reviewed-by: prr
2020-10-27 11:16:27 +00:00
Claes Redestad
f7c59c661c 8255231: Avoid upcalls when initializing the statSampler
Reviewed-by: iklam, dholmes
2020-10-27 10:31:21 +00:00
Aleksey Shipilev
dccfd2b3e0 8255389: ConcurrentHashTable::NoOp omits return in non-void return method
Reviewed-by: kbarrett, rehn
2020-10-27 08:16:43 +00:00
Jie Fu
d735f91919 8255040: Replace __sync_add_and_fetch with __atomic_add_fetch to avoid build errors with clang
Reviewed-by: dholmes, kbarrett
2020-10-27 05:50:54 +00:00
Prasanta Sadhukhan
bcdeeaa04c 8199054: Test javax/swing/UIDefaults/8149879/InternalResourceBundle.java is unstable
Reviewed-by: prr, serb
2020-10-27 02:59:33 +00:00
Prasanta Sadhukhan
dee31d0e95 8167355: [macos 10.12] Timeout in javax/swing/JTextArea/TextViewOOM/TextViewOOM.java
Reviewed-by: prr
2020-10-27 02:55:40 +00:00
Sergey Bylokhov
abdbbe3a79 8254370: Update the classes in the java.awt.color package
Reviewed-by: prr
2020-10-26 23:56:11 +00:00
Alexander Matveev
8ca59c9e2e 8255206: [macos] LicenseTest fails on macOS 11
Reviewed-by: asemenyuk, herrick
2020-10-26 22:45:58 +00:00
Harold Seigel
ca8bba64dc 8238263: Create at-requires mechanism for containers
Reviewed-by: bobv, iignatyev
2020-10-26 20:30:37 +00:00
Vladimir Kozlov
a7fa1b70f2 8251994: VM crashed running TestComplexAddrExpr.java test with -XX:UseAVX=X
Reviewed-by: shade, redestad
2020-10-26 19:40:48 +00:00
Daniel Kamil Kozar
b498433631 8254825: Monitoring available clipboard formats should be done via new Windows APIs
Reviewed-by: serb
2020-10-26 19:13:20 +00:00
Phil Race
de05b0065a 8255365: Problem list failing client manual tests
Reviewed-by: kizune, serb
2020-10-26 18:56:23 +00:00
Sergey Bylokhov
49c4978d0a 8060202: [macosx] Test closed/java/awt/Choice/GetSizeTest/GetSizeTest fails only in MacOSX(10.10)
Reviewed-by: prr
2020-10-26 18:35:52 +00:00
Sergey Bylokhov
2b47a58dd7 8028281: [TEST_BUG] [macosx] javax/swing/JTabbedPane/7024235/Test7024235.java fails
Reviewed-by: psadhukhan, prr
2020-10-26 18:31:54 +00:00
Vladimir Ivanov
83a91bfaed 8253734: C2: Optimize Move nodes
Reviewed-by: thartmann, neliasso, kvn
2020-10-26 17:24:08 +00:00
Stefan Karlsson
6666dcbe72 8237363: Remove automatic is in heap verification in OopIterateClosure
Reviewed-by: eosterlund, pliden
2020-10-26 17:22:47 +00:00
Aleksey Shipilev
fa64477c82 8255301: Common and strengthen the code in ciMemberName and ciMethodHandle
Reviewed-by: vlivanov, kvn
2020-10-26 15:42:39 +00:00
Martin Doerr
9b5a2a6b24 8255349: Vector API issues on Big Endian
Reviewed-by: psandoz, rrich
2020-10-26 15:29:51 +00:00
Weijun Wang
e8b75b13dc 8255393: sun/security/util/DerValue/Indefinite.java fails with ---illegal-access=deny
Reviewed-by: alanb
2020-10-26 14:33:34 +00:00
Aleksey Shipilev
7cafe35424 8255352: Archive important test outputs in submit workflow
Reviewed-by: rwestberg, ihse
2020-10-26 11:20:38 +00:00
Aleksey Shipilev
888086f109 8255373: Submit workflow artifact name is always "test-results_.zip"
Reviewed-by: rwestberg, ihse
2020-10-26 10:18:36 +00:00
Aleksey Shipilev
69188188f4 8255265: IdealLoopTree::iteration_split_impl does not use should_align
Reviewed-by: thartmann, kvn
2020-10-26 07:16:10 +00:00
Aleksey Shipilev
c28b011121 8255343: java/util/stream/SpliteratorTest.java fails on 32-bit platforms with "Misaligned access at address: 12"
Co-authored-by: Maurizio Cimadamore <mcimadamore@openjdk.org>
Reviewed-by: mcimadamore
2020-10-26 07:11:44 +00:00
Prasanta Sadhukhan
b71b5b4375 8199062: Test javax/swing/text/Utilities/8134721/bug8134721.java is unstable
Reviewed-by: serb
2020-10-26 04:36:21 +00:00
Sergey Bylokhov
ee34fa585a 8199060: Test javax/swing/text/html/parser/Parser/6990651/bug6990651.java is unstable
Reviewed-by: prr
2020-10-25 20:54:35 +00:00
Sergey Bylokhov
93dadbe0dc 7190589: [macosx] In the test bug4278839 never press ctrl+arrow
Reviewed-by: prr
2020-10-25 20:47:48 +00:00
Naoto Sato
57d903bdd9 8255242: Bidi.requiresBidi has misleading exception message
Reviewed-by: bchristi
2020-10-25 18:22:10 +00:00
Daniel D. Daugherty
60d014242b 8255379: ProblemList compiler/loopstripmining/BackedgeNodeWithOutOfLoopControl.java
Reviewed-by: alanb
2020-10-25 14:49:26 +00:00
Prasanta Sadhukhan
1a94ebc7d7 8254112: javax/swing/plaf/basic/BasicComboPopup/JComboBoxPopupLocation/JComboBoxPopupLocation.java fails on windows
Reviewed-by: trebari, serb
2020-10-25 07:32:57 +00:00
Prasanta Sadhukhan
69b017248b 8199074: Test javax/swing/DataTransfer/8059739/bug8059739.java is unstable
Reviewed-by: serb, prr
2020-10-25 07:27:22 +00:00
Igor Ignatyev
6545e19fcc 8255078: sun/net/ftp/imp/FtpClient$MLSxParser uses wrong datetime format
Reviewed-by: dfuchs
2020-10-23 22:31:18 +00:00
Aleksey Shipilev
3f6abd220f 8255330: gtest/MetaspaceGtests.java fail on 32-bit platforms
Reviewed-by: stuefe
2020-10-23 19:42:30 +00:00
Alexey Semenyuk
cf821b0bd3 8232024: Don't pollute log output with multiple errors of the same type
Reviewed-by: almatvee, herrick
2020-10-23 18:36:31 +00:00
Claes Redestad
185c8bcf8a 8255338: CodeSections are never frozen
Reviewed-by: neliasso, kvn
2020-10-23 17:46:30 +00:00
Claes Redestad
cc861134f4 8255271: Avoid generating duplicate interpreter entries for subword types
Reviewed-by: iklam, coleenp
2020-10-23 15:37:46 +00:00
Fei Yang
5ec1b80c4a 8255287: aarch64: fix SVE patterns for vector shift count
Co-authored-by: Yanhong Zhu <zhuyanhong2@huawei.com>
Reviewed-by: adinn
2020-10-23 13:16:37 +00:00
Martin Doerr
12daf2b692 8255340: [s390] build failure after JDK-8255208
Reviewed-by: shade
2020-10-23 12:20:35 +00:00
Martin Doerr
9007bc20b0 8255129: [PPC64, s390] Check vector_size_supported and add VectorReinterpret node
Reviewed-by: lucy
2020-10-23 10:52:17 +00:00
Martin Doerr
df792573e8 8255274: [PPC64, s390] wrong StringLatin1.indexOf version matched
Reviewed-by: clanger, rrich
2020-10-23 10:49:29 +00:00
Kiran Sidhartha Ravikumar
55a0cad827 8254982: (tz) Upgrade time-zone data to tzdata2020c
Reviewed-by: erikj, naoto
2020-10-23 10:13:08 +00:00
Ningsheng Jian
ac1748e786 8254670: SVE test uses linux-specific api
Reviewed-by: adinn, vkempik
2020-10-23 10:06:40 +00:00
Jan Lahoda
0e9205315e 8254286: Wrong inference in switch expression with "null" arm
Reviewed-by: mcimadamore, vromero
2020-10-23 09:47:29 +00:00
Markus Grönlund
63ce304ea4 8249675: x86: frequency extraction from cpu brand string is incomplete
Reviewed-by: egahlin, dholmes
2020-10-23 09:04:03 +00:00
Vladimir Ivanov
e52156d730 8255067: Restore Copyright line in file modified by 8253191
Reviewed-by: kvn, shade
2020-10-23 08:33:14 +00:00
Thomas Schatzl
c520469639 8255131: G1CollectedHeap::is_in() returns wrong result
Reviewed-by: sjohanss, kbarrett, ayang
2020-10-23 08:22:05 +00:00
Claes Redestad
107fb9ccf8 8255049: Remove support for the hsdis decode_instructions entry point in hotspot
Reviewed-by: neliasso, kvn
2020-10-23 07:59:31 +00:00
Claes Redestad
c1524c59ad 8255208: CodeStrings passed to Disassembler::decode are ignored
Reviewed-by: kvn, iklam
2020-10-23 07:30:28 +00:00
Jie Fu
8e5dff08fa 8255213: Shenandoah build fails without JFR after JDK-8255036
Reviewed-by: shade
2020-10-23 07:16:03 +00:00
Roland Westrelin
fe74f3cd10 8255224: x86_32 tests fail with "bad AD file" after JDK-8223051
Reviewed-by: shade, kvn
2020-10-23 07:11:58 +00:00
Aleksey Shipilev
64dc4b1888 8255225: compiler/aot tests fail on Windows with NPE during artifact resolution
Reviewed-by: erikj, clanger
2020-10-23 06:34:17 +00:00
Jie Fu
a824781b8c 8255210: [Vector API] jdk/incubator/vector/Int256VectorTests.java crashes on AVX512 machines
Reviewed-by: psandoz, sviswanathan, jbhateja
2020-10-23 05:49:56 +00:00
Thomas Stuefe
2ca7a08091 8255268: 32-bit failures in runtime/Metaspace/elastic
Reviewed-by: shade
2020-10-23 05:27:57 +00:00
Sergey Bylokhov
d8d9197712 8242559: Clean the "libawt_xawt" library from code for headless mode
Reviewed-by: kizune
2020-10-23 01:51:44 +00:00
Naoto Sato
ff5f2265d2 8255086: Update the root locale display names
Reviewed-by: bchristi, joehw
2020-10-23 01:13:36 +00:00
Brent Christian
8afdcaee1c 8255031: Update java/util/prefs/AddNodeChangeListener.java to report more failure info
Reviewed-by: bpb
2020-10-22 21:45:43 +00:00
Jonathan Gibbons
0aa3c92577 8255262: Remove use of legacy custom @spec tag
Reviewed-by: lancea, mr, iris, alanb, darcy, mchung
2020-10-22 19:42:01 +00:00
Severin Gehwolf
a0b687bfb2 8254854: [cgroups v1] Metric limits not properly detected on some join controller combinations
Reviewed-by: bobv
2020-10-22 16:36:29 +00:00
Patric Hedlin
f279ddfa06 8248411: [aarch64] Insufficient error handling when CodeBuffer is exhausted
Reviewed-by: adinn
2020-10-22 15:56:56 +00:00
Robbin Ehn
4634dbef6d 8223312: Utilize handshakes instead of is_thread_fully_suspended
Reviewed-by: dholmes, rrich, dcubed, eosterlund
2020-10-22 15:16:50 +00:00
Thomas Schatzl
cc50c8d4f1 8255196: Remove unused G1FullGCCompactionPoint::merge()
Reviewed-by: shade
2020-10-22 09:15:30 +00:00
Stefan Karlsson
ae72b5283b 8255047: Add HotSpot UseDebuggerErgo flags
Reviewed-by: dcubed, dholmes
2020-10-22 08:24:51 +00:00
Jan Lahoda
211bb62a90 8255124: KeepAliveStreamCleaner may crash with java.lang.IllegalMonitorStateException: current thread is not owner
Reviewed-by: alanb, chegar, dfuchs
2020-10-22 07:29:37 +00:00
Prasanta Sadhukhan
299e1154af 8198395: Test javax/swing/plaf/metal/MetalLookAndFeel/Test8039750.java fails in mach5
Reviewed-by: prr
2020-10-22 06:55:50 +00:00
Prasanta Sadhukhan
a5b7bc50d4 7156347: javax/swing/JList/6462008/bug6462008.java fails
Reviewed-by: serb, pbansal
2020-10-22 06:45:03 +00:00
Fei Yang
b25d894015 8252204: AArch64: Implement SHA3 accelerator/intrinsic
Co-authored-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Co-authored-by: Dong Bo <dongbo4@huawei.com>
Reviewed-by: aph, kvn
2020-10-22 04:38:39 +00:00
Sergey Bylokhov
7d3d4daefd 8240709: Enable javax/swing/UI/UnninstallUIMemoryLeaks/UnninstallUIMemoryLeaks.java on all L&F
Reviewed-by: kizune
2020-10-22 03:43:45 +00:00
Sandhya Viswanathan
5d262290c4 8255174: Vector API unit tests for missed public api code coverage
Reviewed-by: psandoz
2020-10-22 00:09:41 +00:00
Alex Menkov
b9186bebc3 6606767: resexhausted00[34] fail assert(!thread->owns_locks(), "must release all locks when leaving VM")
Reviewed-by: sspitsyn, cjplummer
2020-10-21 23:40:48 +00:00
Valerie Peng
1191a633fe 8199697: FIPS 186-4 RSA Key Generation
Reviewed-by: xuelei
2020-10-21 22:42:07 +00:00
Paul Sandoz
60d3fa2ed8 8255022: Documentation missing for Vector API zero methods
Reviewed-by: vlivanov, darcy
2020-10-21 22:27:42 +00:00
Erik Joelsson
9ade94b727 8206311: Add docs-javase, docs-reference to CI build
Reviewed-by: ihse
2020-10-21 22:04:37 +00:00
Daniel D. Daugherty
34450311d9 8255200: ProblemList com/sun/jdi/EATests.java for ZGC
Reviewed-by: kvn, iignatyev, dholmes
2020-10-21 21:30:28 +00:00
Eric Caspole
85a8949caa 8254913: Increase InlineSmallCode default from 2000 to 2500 for x64
Reviewed-by: redestad, shade, azeemj
2020-10-21 20:34:58 +00:00
Coleen Phillimore
56ea490f1e 8233343: Deprecate -XX:+CriticalJNINatives flag which implements JavaCritical native functions
Reviewed-by: rehn, mdoerr, zgu
2020-10-21 20:33:24 +00:00
Zhengyu Gu
615b759edd 8255070: Shenandoah: Use single thread for concurrent CLD liveness test
Reviewed-by: rkennke
2020-10-21 19:44:24 +00:00
Tom Rodriguez
6020991530 8255068: [JVMCI] errors during compiler creation can be hidden
Reviewed-by: kvn
2020-10-21 19:37:52 +00:00
Aleksey Shipilev
8d9e6d01fb 8255041: Zero: remove old JSR 292 support leftovers
Reviewed-by: rkennke
2020-10-21 16:33:53 +00:00
Raffaello Giulietti
0efdde188b 8238669: Long.divideUnsigned is extremely slow for certain values (Needs to be Intrinsic)
Reviewed-by: bpb
2020-10-21 16:32:59 +00:00
Sandhya Viswanathan
365f19c8e1 8254790: SIGSEGV in string_indexof_char and stringL_indexof_char intrinsics
Reviewed-by: kvn, thartmann
2020-10-21 16:24:30 +00:00
Fernando Guallini
f813a28b95 8254692: (se) Clarify the behaviour of the non-abstract SelectorProvider::inheritedChannel
Reviewed-by: chegar, bpb, alanb
2020-10-21 14:54:19 +00:00
Zhengyu Gu
c9269bf59e 8255036: Shenandoah: Reset GC state for root verifier
Reviewed-by: rkennke
2020-10-21 14:42:37 +00:00
Weijun Wang
839f01ddf5 8242068: Signed JAR support for RSASSA-PSS and EdDSA
Reviewed-by: valeriep
2020-10-21 14:18:43 +00:00
Matthias Baesken
e559bd2c8b 8254889: name_and_sig_as_C_string usages in frame coding without ResourceMark
Reviewed-by: dholmes
2020-10-21 12:24:35 +00:00
Patrick Concannon
da97ab5c8a 8253474: Javadoc clean up in HttpsExchange, HttpsParameters, and HttpsServer
Reviewed-by: dfuchs, michaelm
2020-10-21 10:04:21 +00:00
Vladimir Ivanov
7e2640432b 8255000: C2: Unify IGVN processing when loop opts are over
Reviewed-by: neliasso, iveresov, kvn
2020-10-21 08:09:00 +00:00
Vladimir Ivanov
27230fae24 8255026: C2: Miscellaneous cleanups in Compile and PhaseIdealLoop code
Reviewed-by: thartmann, neliasso, redestad
2020-10-21 07:34:54 +00:00
David Leopoldseder
c107178bcc 8253964: [Graal] UnschedulableGraphTest#test01fails with expected:<4> but was:<3>
Reviewed-by: kvn, dlong
2020-10-21 07:34:08 +00:00
Aleksey Shipilev
bd45191f00 8255065: Zero: accessor_entry misses the IRIW case
Reviewed-by: mdoerr
2020-10-21 06:14:25 +00:00
Aleksey Shipilev
2a0633507c 8254785: compiler/graalunit/HotspotTest.java failed with "missing Graal intrinsics for: java/lang/StringLatin1.indexOfChar([BIII)I"
Reviewed-by: psandoz, iignatyev, kvn
2020-10-21 06:09:54 +00:00
Prasanta Sadhukhan
1b7ddebe46 8254976: Re-enable swing jtreg tests which were broken due to samevm mode
Reviewed-by: serb
2020-10-21 05:52:20 +00:00
Sergey Bylokhov
2e510e04bd 8255043: Incorrectly styled copyright text
Reviewed-by: dholmes, trebari, jdv
2020-10-21 04:53:16 +00:00
Igor Ignatyev
6bd05b12a0 8255074: sun.nio.fs.WindowsPath::getPathForWin32Calls synchronizes on String object
Reviewed-by: bpb
2020-10-21 02:34:47 +00:00
Sergey Bylokhov
9e9f5e6974 8017179: [macosx] list1 and list2 vistble item isn't desired
Reviewed-by: kizune
2020-10-21 02:28:01 +00:00
Sergey Bylokhov
2ee2b4ae19 8231454: File lock in Windows on a loaded jar due to a leak in Introspector::getBeanInfo
Reviewed-by: kizune
2020-10-21 02:05:16 +00:00
Ningsheng Jian
42a6eadb85 8254884: Make sure jvm does not crash with Arm SVE and Vector API
Reviewed-by: vlivanov, adinn
2020-10-21 01:15:13 +00:00
Sergey Bylokhov
e5870cf002 8252133: The java/awt/GraphicsDevice/DisplayModes/CycleDMImage.java fails if metal pipeline is active
Reviewed-by: prr
2020-10-21 00:15:46 +00:00
Andy Herrick
afc967fcd0 8254783: jpackage fails on Windows when application name differs from installer name
Reviewed-by: asemenyuk, kizune, almatvee
2020-10-20 22:54:19 +00:00
Phil Race
3ccf4877a8 8253019: Enhanced JPEG decoding
Reviewed-by: rhalade, mschoene, serb, psadhukhan
2020-10-20 14:58:40 -07:00
Tobias Hartmann
cfb02d4854 8250861: Crash in MinINode::Ideal(PhaseGVN*, bool)
Added missing NULL checks.

Reviewed-by: kvn, chagedorn
2020-10-20 14:58:40 -07:00
Roger Riggs
0d35235723 8249927: Specify limits of jdk.serialProxyInterfaceLimit
corrections to limits defined by 8236862 implemented by 8248183

Reviewed-by: smarks, rhalade, skoivu
2020-10-20 14:58:39 -07:00
Jamil Nimeh
d6cef99050 8245417: Improve certificate chain handling
Co-authored-by: Hai-may Chao <hai-may.chao@oracle.com>
Reviewed-by: mullan, jnimeh
2020-10-20 14:58:39 -07:00
Ioi Lam
24f7f84594 8245412: Better class definitions
Reviewed-by: coleenp, rhalade, jwilhelm, skoivu
2020-10-20 14:58:39 -07:00
Phil Race
00a5af44af 8248574: Improve jpeg processing
Reviewed-by: serb, jdv, mschoene, rhalade
2020-10-20 14:58:39 -07:00
Roger Riggs
036da9950b 8236862: Enhance support of Proxy class
Reviewed-by: smarks, chegar, skoivu, rhalade
2020-10-20 14:58:39 -07:00
Harold Seigel
29c68087c9 8243302: Advanced class supports
Co-authored-by: Harold Seigel <harold.seigel@oracle.com>
Reviewed-by: coleenp, lfoltan, mschoene, rhalade
2020-10-20 14:58:39 -07:00
Aleksei Efimov
7eda1196c6 8237990: Enhanced LDAP contexts
Reviewed-by: dfuchs, robm, weijun, xyin, rhalade, ahgross
2020-10-20 14:58:39 -07:00
Naoto Sato
d149dcdbd5 8245407: Enhance zoning of times
Reviewed-by: rriggs, rhalade, skoivu
2020-10-20 14:58:39 -07:00
Brian Burkhalter
fc5fca9ade 8242695: Enhanced buffer support
Reviewed-by: alanb, rhalade
2020-10-20 14:58:38 -07:00
Brian Burkhalter
a6723c8552 8244136: Improved Buffer supports
Reviewed-by: alanb, ahgross, rhalade, psandoz
2020-10-20 14:58:38 -07:00
Sean Mullan
27f1ebc0af 8244479: Further constrain certificates
Reviewed-by: ascarpino, ahgross, rhalade
2020-10-20 14:58:38 -07:00
Coleen Phillimore
5f1918db26 8244955: Additional Fix for JDK-8240124
Reviewed-by: rehn, pliden, smarks
2020-10-20 14:58:38 -07:00
David Holmes
798bfb3b9c 8233624: Enhance JNI linkage
Co-authored-by: David Holmes <david.holmes@oracle.com>, Alex Buckley <alex.buckley@oracle.com>, John Rose <john.r.rose@oracle.com>
Reviewed-by: abuckley, jrose, rhalade, mschoene
2020-10-20 14:58:38 -07:00
Tobias Hartmann
7c05f32bc9 8244924: Additional fix for JDK-8241119
Reviewed-by: kvn, vlivanov, rhalade, ahgross
2020-10-20 14:58:38 -07:00
Sean Mullan
62a03bd387 8237995: Enhance certificate processing
Reviewed-by: weijun, rhalade, ahgross, erikj
2020-10-20 14:58:38 -07:00
Brian Burkhalter
9291e60892 8242680: Improved URI Support
Reviewed-by: alanb, rhalade
2020-10-20 14:58:37 -07:00
Brian Burkhalter
ff3e558679 8242685: Better Path Validation
Reviewed-by: alanb, rhalade
2020-10-20 14:58:37 -07:00
Coleen Phillimore
a5cb23e29f 8240124: Better VM Interning
Reviewed-by: rehn, pliden, smarks, rhalade, ahgross, jwilhelm
2020-10-20 14:58:37 -07:00
Erik Gahlin
fa25d083be 8236196: Improve string pooling
Reviewed-by: mgronlun, rehn, ahgross, jwilhelm, rhalade
2020-10-20 14:58:37 -07:00
Tobias Hartmann
afd852ccb8 8241114: Better range handling
Reviewed-by: kvn, vlivanov, rhalade, ahgross
2020-10-20 14:58:37 -07:00
Andy Herrick
acacae5e0c 8254843: Exception launching app on windows in some cases
Reviewed-by: asemenyuk, kcr, almatvee, kizune
2020-10-20 21:28:09 +00:00
Zhengyu Gu
856037c417 8255006: Add NULL-check to StringDedupTable lookup
Reviewed-by: rkennke, kbarrett
2020-10-20 18:06:43 +00:00
Aleksey Shipilev
ee6eb9860e 8254995: [x86] ControlWord::print(), rc/pc variables might not be initialized
Reviewed-by: kvn
2020-10-20 17:55:36 +00:00
Michael Bien
e577c8c852 8253641: Missing newline in the printout of certain JFR events
Co-authored-by: Michael Bien <mbien42@gmail.com>
Reviewed-by: mgronlun
2020-10-20 17:47:34 +00:00
Sergey Bylokhov
89e5444554 8254788: Dead code in the sun.java2d.xr.XRPMBlitLoops$XrSwToPMBlit
Reviewed-by: prr
2020-10-20 17:31:54 +00:00
Per Liden
3267b09d5a 8254883: ZGC: Make the ZArrayIterator reusable for ZRelocationSetIterators
Reviewed-by: eosterlund
2020-10-20 16:07:33 +00:00
Guoxiong Li
cb6167b226 8254557: Compiler crashes with java.lang.AssertionError: isSubtype UNKNOWN
Reviewed-by: mcimadamore
2020-10-20 15:45:17 +00:00
Richard Reingruber
40f847e2fb 8227745: Enable Escape Analysis for Better Performance in the Presence of JVMTI Agents
8233915: JVMTI FollowReferences: Java Heap Leak not found because of C2 Scalar Replacement

Reviewed-by: mdoerr, goetz, sspitsyn, kvn
2020-10-20 15:31:55 +00:00
Patricio Chilano Mateo
f167a71f1d 8254264: Remove redundant cross_modify_fence()
Reviewed-by: rehn, dholmes, dcubed
2020-10-20 15:07:36 +00:00
Joe Darcy
44f9271dc2 8254974: Fix stutter typo in TypeElement
Reviewed-by: shade, redestad
2020-10-20 14:44:38 +00:00
Claes Redestad
76fdd7fccf 8255038: Adjust adapter_code_size to account for -Xlog:methodhandles in debug builds
Reviewed-by: shade, neliasso
2020-10-20 14:23:50 +00:00
Per Liden
cdc8c401b5 8254878: Move last piece of ZArray to GrowableArray
Reviewed-by: stefank, eosterlund
2020-10-20 13:07:35 +00:00
Roland Westrelin
294e0705fa 8254998: C2: assert(!n->as_Loop()->is_transformed_long_loop()) failure with -XX:StressLongCountedLoop=1
Reviewed-by: vlivanov, kvn, thartmann
2020-10-20 11:53:41 +00:00
Vipin Menon
3ee0380e99 8234393: [macos] printing ignores printer tray
Reviewed-by: psadhukhan, prr
2020-10-20 11:14:28 +00:00
Claes Redestad
3f9c8a3920 8254966: Remove unused code from Matcher
Reviewed-by: neliasso, kvn
2020-10-20 09:27:35 +00:00
Pankaj Bansal
21e67e5460 8225790: Two NestedDialogs tests fail on Ubuntu
Reviewed-by: serb
2020-10-20 09:05:51 +00:00
Doug Simon
017d151e11 8254842: [JVMCI] copy thread name when attaching libgraal thread to HotSpot
Reviewed-by: kvn, never
2020-10-20 08:38:14 +00:00
Aleksey Shipilev
5d1397fa9a 8254282: Add Linux x86_32 builds to submit workflow
Reviewed-by: erikj, rwestberg
2020-10-20 06:55:36 +00:00
Thomas Stuefe
7ba6a6bf00 8251158: Implementation of JEP 387: Elastic Metaspace
Reviewed-by: lkorinth, coleenp, iklam, rrich
2020-10-20 06:48:09 +00:00
Nhat Nguyen
5fedfa707e 8251271: C2: Compile::_for_igvn list is corrupted after RenumberLiveNodes
Reviewed-by: vlivanov, thartmann
2020-10-20 06:18:49 +00:00
Roberto Castañeda Lozano
98ec4a6792 8254805: compiler/debug/TestStressCM.java is still failing
Use the code motion trace produced by TraceOptoPipelining (excluding traces of
stubs) to assert that two compilations with the same seed cause StressLCM and
StressGCM to take the same randomized decisions. Previously, the entire output
produced by PrintOptoStatistics was used instead, which has shown to be too
fragile. Also, disable inlining in both TestStressCM.java and the similar
TestStressIGVN.java to prevent flaky behavior, and run both tests for ten
different seeds to improve coverage.

Reviewed-by: kvn, thartmann
2020-10-20 06:08:25 +00:00
Aleksey Shipilev
355f44dd11 8254994: [x86] C1 StubAssembler::call_RT, "call_offset might not be initialized"
Reviewed-by: chagedorn, kvn
2020-10-20 05:31:39 +00:00
Aleksey Shipilev
0a75b37f7a 8254776: Remove unimplemented LowMemoryDetector::check_memory_usage
Reviewed-by: sspitsyn, cjplummer
2020-10-20 05:28:22 +00:00
Aleksey Shipilev
b65dcfa3a0 8197981: Missing return statement in __sync_val_compare_and_swap_8
Reviewed-by: andrew, dholmes
2020-10-20 05:26:59 +00:00
Aleksey Shipilev
5b51085c98 8254997: Remove unimplemented OSContainer::read_memory_limit_in_bytes
Reviewed-by: sgehwolf
2020-10-20 05:25:57 +00:00
Daniel D. Daugherty
c87cdf70e4 8254029: ObjectMonitor cleanup/minor bug-fix changes extracted from JDK-8253064
Reviewed-by: dholmes, eosterlund
2020-10-20 01:08:19 +00:00
Vladimir Kozlov
7a580ca8c0 8255027: Problem list for Graal test gc/stress/TestStressG1Humongous.java
Reviewed-by: dlong
2020-10-20 00:12:37 +00:00
Sergey Bylokhov
6e8835c6bc 7110890: reg test TranslucentShapedFrameTest fails to create non-opaque frame
Reviewed-by: prr
2020-10-19 23:54:10 +00:00
Stuart Marks
bf19581ab0 8255016: ConstantDescs.FALSE claims it represents TRUE
Reviewed-by: bpb, jvernee, mchung, rriggs
2020-10-19 23:53:06 +00:00
Jonathan Gibbons
0f4fb367d5 8255032: Conflict between recent pushes breaks the build
Reviewed-by: redestad, vromero
2020-10-19 22:05:47 +00:00
Jonathan Gibbons
cb5cdd7705 8254721: Improve support for conditionally generated files
Reviewed-by: hannesw
2020-10-19 20:52:01 +00:00
Paul Sandoz
0001435044 8255020: Minor updates to docs jdk.incubator.vector
Reviewed-by: erikj, darcy
2020-10-19 20:37:36 +00:00
Doug Simon
14e1e1741f 8255004: [JVMCI] expose JVM_ACC_FIELD_INITIALIZED_FINAL_UPDATE
Reviewed-by: never, kvn
2020-10-19 19:39:19 +00:00
Doug Simon
f42c03226f 8254793: [JVMCI] improve speculation encoding
Reviewed-by: kvn, dlong, never
2020-10-19 19:06:23 +00:00
Calvin Cheung
74ac77e2b1 8247666: Support Lambda proxy classes in static CDS archive
Reviewed-by: iklam, mchung
2020-10-19 18:27:50 +00:00
Claes Redestad
e2e11d3449 8254955: x86: MethodHandlesAdapterBlob is too big
Reviewed-by: neliasso, kvn
2020-10-19 17:50:40 +00:00
Erik Joelsson
0b5101658d 8253660: Need better error report when artifact resolution fails in AotCompiler.java
Reviewed-by: ihse
2020-10-19 17:40:54 +00:00
Erik Joelsson
52cb3292ae 8254862: lldb in devkit doesn't work
Reviewed-by: lmesnik, mikael, ihse
2020-10-19 17:38:22 +00:00
Jonathan Gibbons
60f63ec811 8254796: Cleanup pervasive unnecessary parameter
Reviewed-by: ksrini, hannesw
2020-10-19 17:08:06 +00:00
Michael McMahon
953e472ded 8254967: com.sun.net.HttpsServer spins on TLS session close
Reviewed-by: dfuchs
2020-10-19 16:57:40 +00:00
Vicente Romero
1da28de82f 8255009: delta apply fixes for JDK-8246774 and JDK-8253455, pushed too soon
Reviewed-by: jlahoda
2020-10-19 15:55:54 +00:00
Ekaterina Vergizova
a0382cd17c 8253235: JFR.dump does not respect maxage parameter
Reviewed-by: egahlin
2020-10-19 14:19:58 +00:00
Jie Fu
cb7701b725 8253970: Build error: address argument to atomic builtin must be a pointer to integer or pointer ('volatile narrowOop *' invalid)
Reviewed-by: kbarrett, dholmes
2020-10-19 13:18:50 +00:00
Anton Kozlov
4ffed326fa 8254940: AArch64: Cleanup non-product thread members
Reviewed-by: aph
2020-10-19 11:43:02 +00:00
Thomas Schatzl
cd66e0f25f 8253877: gc/g1/TestGCLogMessages.java fails - missing "Evacuation failure" message
Reviewed-by: sjohanss
2020-10-19 11:40:58 +00:00
Roland Westrelin
e76de18956 8223051: support loops with long (64b) trip counts
Reviewed-by: vlivanov, thartmann, jrose
2020-10-19 11:30:13 +00:00
Claes Redestad
e9be2db7ac 8253453: SourceFileInfoTable should be allocated lazily
Reviewed-by: neliasso, chagedorn
2020-10-19 10:49:33 +00:00
Markus Grönlund
e10b53853a 8243962: Various JVM TI tests time out using JFR on Windows
Reviewed-by: sspitsyn, cjplummer
2020-10-19 09:18:40 +00:00
Per Liden
a1a3e9def7 8254882: ZGC: Use static_assert instead of guarantee
Reviewed-by: kbarrett, tschatzl
2020-10-19 07:35:36 +00:00
Stefan Karlsson
8edc2f05b5 8254912: ZGC: Change ZCollectionInterval type to double
Reviewed-by: pliden, ayang
2020-10-19 07:23:43 +00:00
Stefan Karlsson
672f56695e 8254874: ZGC: JNIHandleBlock verification failure in stack watermark processing
Reviewed-by: tschatzl, cjplummer, sspitsyn, pliden
2020-10-19 07:22:29 +00:00
Per Liden
98a395a39e 8254880: ZGC: Let ZList iterators be alias templates
Reviewed-by: ayang, kbarrett, tschatzl
2020-10-19 07:11:40 +00:00
Robbin Ehn
011dd0d8fa 8254824: SignalHandlerMark have no purpose
Reviewed-by: stuefe, shade, dholmes, coleenp
2020-10-19 06:28:47 +00:00
Aleksey Shipilev
736e077335 8254178: Remove .hgignore
Reviewed-by: ehelin
2020-10-19 06:16:50 +00:00
Alexander Zuev
51a865d66a 8254085: javax/swing/text/Caret/TestCaretPositionJTextPane.java failed with "RuntimeException: Wrong caret position"
Reviewed-by: serb
2020-10-19 04:26:42 +00:00
Sergey Bylokhov
dd032b7fa6 8254798: Deprecate for removal an empty finalize() methods in java.desktop module
Reviewed-by: kcr, pbansal
2020-10-19 03:11:51 +00:00
Vicente Romero
272bb5d580 8253455: Record Classes javax.lang.model changes
Reviewed-by: darcy
2020-10-19 02:03:10 +00:00
Vicente Romero
c17d58516f 8246774: implement Record Classes as a standard feature in Java
Co-authored-by: Vicente Romero <vromero@openjdk.org>
Co-authored-by: Harold Seigel <hseigel@openjdk.org>
Co-authored-by: Chris Hegarty <chegar@openjdk.org>
Reviewed-by: coleenp, jlahoda, sspitsyn, chegar
2020-10-18 18:54:33 +00:00
Prasanta Sadhukhan
0b3e6c51ba 8194126: Regression automated Test '/open/test/jdk/javax/swing/JColorChooser/Test7194184.java' fails
Reviewed-by: serb, trebari
2020-10-17 07:18:48 +00:00
Prasanta Sadhukhan
ce1aac1e13 8028707: javax/swing/JComboBox/6236162/bug6236162.java fails on azure
Reviewed-by: serb, pbansal
2020-10-17 07:12:59 +00:00
Jonathan Gibbons
83ea863122 8253559: The INDEX page should link to Serialized Form and Constant Values pages
Reviewed-by: hannesw
2020-10-16 22:15:52 +00:00
Sergey Bylokhov
e66c6bb9d5 8254349: The TestNoScreenMenuBar test should be updated
Reviewed-by: pbansal
2020-10-16 21:56:54 +00:00
Jonathan Gibbons
402d01aa11 8254795: Remove obsolete template files
Reviewed-by: ksrini
2020-10-16 19:35:10 +00:00
Thomas Schatzl
07ec35e2e5 8254623: gc/g1/TestHumongousConcurrentStartUndo.java still fails sometimes
Reviewed-by: kbarrett, sjohanss
2020-10-16 15:21:37 +00:00
Claes Redestad
0570cc10b5 8254855: Clean up and remove unused code in vmIntrinsics
Reviewed-by: kbarrett, iklam, kvn
2020-10-16 11:38:02 +00:00
Thomas Schatzl
1742c44ac9 8254695: G1: Next mark bitmap clear not cancelled after marking abort
Reviewed-by: iwalulya, sjohanss
2020-10-16 09:19:22 +00:00
Chris Hegarty
34583ebdfc 8254161: Prevent instantiation of EnumSet subclasses through deserialization
Reviewed-by: dfuchs, alanb, rriggs, smarks
2020-10-16 08:09:57 +00:00
Jie Fu
3d23bd8e5b 8254814: [Vector API] Fix an AVX512 crash after JDK-8223347
Reviewed-by: vlivanov, thartmann, psandoz
2020-10-16 06:57:36 +00:00
Tobias Hartmann
7c0d417027 8251535: Partial peeling at unsigned test adds incorrect loop exit check
Reviewed-by: chagedorn, neliasso, kvn
2020-10-16 06:25:33 +00:00
Ioi Lam
5145bed028 8254125: Assertion in cppVtables.cpp during builds on 32bit Windows
Reviewed-by: shade, ccheung
2020-10-16 05:14:46 +00:00
Xin Liu
bdda2058c2 8254369: Node::disconnect_inputs may skip precedences
disconnect_inputs() needs to iterate precedences edges in reverse order because rm_prec(i) may backfill _in[i] with a value afterward.
also remove the predicate if (n != NULL) in set_prec because it's always true.

Reviewed-by: kvn, redestad
2020-10-16 01:59:07 +00:00
Calvin Cheung
96bb6e76bf 8251325: Miss 'L' for long value in if statement
Reviewed-by: iklam
2020-10-15 20:05:28 +00:00
Yumin Qi
546620bb9e 8254192: ExtraSharedClassListFile contains extra white space at end of line
Reviewed-by: iklam, ccheung, mchung
2020-10-15 16:47:06 +00:00
Jie Fu
f3ce45f2a1 8254799: runtime/ErrorHandling/TestHeapDumpOnOutOfMemoryError.java fails with release VMs
Reviewed-by: dholmes, dcubed, stuefe
2020-10-15 14:46:04 +00:00
Martin Doerr
cda22e3624 8254811: JDK-8254158 broke ppc64, s390 builds
Reviewed-by: stuefe, goetz
2020-10-15 14:16:20 +00:00
Markus Grönlund
8ef88e5905 8249878: jfr_emergency_dump has secondary crashes
Reviewed-by: egahlin
2020-10-15 14:07:52 +00:00
Thomas Schatzl
3c2f5e08f7 8254674: G1: Improve root location reference to dead obj verification message
Reviewed-by: sjohanss, lkorinth
2020-10-15 10:39:11 +00:00
Per Liden
abe5137737 8254719: ZGC: Clean up includes
Reviewed-by: stefank
2020-10-15 09:23:00 +00:00
Volker Simonis
60159cff40 8253952: Refine ZipOutputStream.putNextEntry() to recalculate ZipEntry's compressed size
Reviewed-by: lancea, alanb
2020-10-15 09:18:26 +00:00
Amit Pawar
9359ff03ae 8252221: Use multiple workers for Parallel GC pre-touching
Reviewed-by: kbarrett, tschatzl
2020-10-15 07:22:38 +00:00
Roland Westrelin
f44fc6defc 8254734: "dead loop detected" assert failure with patch from 8223051
Reviewed-by: chagedorn, kvn
2020-10-15 06:53:03 +00:00
Aleksey Shipilev
7f73474f74 8254773: Remove unimplemented ciReplay::is_loaded(Klass* klass)
Reviewed-by: thartmann, kvn
2020-10-15 06:32:16 +00:00
Aleksey Shipilev
167c192456 8254771: Remove unimplemented ciSignature::get_all_klasses
Reviewed-by: thartmann, kvn
2020-10-15 06:31:19 +00:00
Aleksey Shipilev
81a8ff1d92 8254769: Remove unimplemented BCEscapeAnalyzer::{add_dependence, propagate_dependencies}
Reviewed-by: thartmann, kvn
2020-10-15 06:30:19 +00:00
Ioi Lam
7e5eb493e1 8253402: Convert vmSymbols::SID to enum class
Reviewed-by: kvn, coleenp, kbarrett, iveresov
2020-10-15 05:52:54 +00:00
Yasumasa Suenaga
038f58d4f0 8226236: [TESTBUG] win32: gc/metaspace/TestCapacityUntilGCWrapAround.java fails
Reviewed-by: stuefe
2020-10-15 00:21:42 +00:00
Vladimir Kozlov
5194f11bc7 8254792: Disable intrinsic StringLatin1.indexOf until 8254790 is fixed
Reviewed-by: dcubed
2020-10-15 00:05:40 +00:00
Patricio Chilano Mateo
55d760d416 8254263: Remove special_runtime_exit_condition() check from ~ThreadInVMForHandshake()
Reviewed-by: rrich, dholmes, dcubed, rehn
2020-10-14 22:15:57 +00:00
Aleksey Shipilev
03fa733e8b 8254777: Remove unimplemented Management::get_loaded_classes
Reviewed-by: sspitsyn
2020-10-14 20:58:18 +00:00
Aleksey Shipilev
8fb294a2bf 8254781: Remove unimplemented ClassFieldMap::compute_field_count
Reviewed-by: phh, sspitsyn
2020-10-14 20:57:41 +00:00
Aleksey Shipilev
da2f5ab5b2 8254780: EnterInterpOnlyModeClosure::completed() always returns true
Reviewed-by: sspitsyn, rehn
2020-10-14 20:56:58 +00:00
Paul Sandoz
0c99b19258 8223347: Integration of Vector API (Incubator)
Co-authored-by: Vivek Deshpande <vdeshpande@openjdk.org>
Co-authored-by: Qi Feng <qfeng@openjdk.org>
Co-authored-by: Ian Graves <igraves@openjdk.org>
Co-authored-by: Jean-Philippe Halimi <jphalimi@openjdk.org>
Co-authored-by: Vladimir Ivanov <vlivanov@openjdk.org>
Co-authored-by: Ningsheng Jian <njian@openjdk.org>
Co-authored-by: Razvan Lupusoru <rlupusoru@openjdk.org>
Co-authored-by: Smita Kamath <svkamath@openjdk.org>
Co-authored-by: Rahul Kandu <rkandu@openjdk.org>
Co-authored-by: Kishor Kharbas <kkharbas@openjdk.org>
Co-authored-by: Eric Liu <Eric.Liu2@arm.com>
Co-authored-by: Aaloan Miftah <someusername3@gmail.com>
Co-authored-by: John R Rose <jrose@openjdk.org>
Co-authored-by: Shravya Rukmannagari <srukmannagar@openjdk.org>
Co-authored-by: Paul Sandoz <psandoz@openjdk.org>
Co-authored-by: Sandhya Viswanathan <sviswanathan@openjdk.org>
Co-authored-by: Lauren Walkowski <lauren.walkowski@arm.com>
Co-authored-by: Yang Zang <Yang.Zhang@arm.com>
Co-authored-by: Joshua Zhu <jzhu@openjdk.org>
Co-authored-by: Wang Zhuo <wzhuo@openjdk.org>
Co-authored-by: Jatin Bhateja <jbhateja@openjdk.org>
Reviewed-by: erikj, chegar, kvn, darcy, forax, briangoetz, aph, epavlova, coleenp
2020-10-14 20:02:46 +00:00
Daniel D. Daugherty
386e7e8b73 8254789: ProblemList compiler/graalunit/HotspotTest.java
Reviewed-by: rriggs, iignatyev, kvn
2020-10-14 19:07:53 +00:00
Alex Menkov
cd33abb136 8249623: test @ignore-d due to 7013634 should be returned back to execution
Reviewed-by: cjplummer, sspitsyn
2020-10-14 17:49:42 +00:00
Alex Menkov
b7daf8427b 8254345: com/sun/jdi/JdwpAttachTest.java reports error incorrectly
Reviewed-by: cjplummer, sspitsyn
2020-10-14 17:46:36 +00:00
Yumin Qi
fde02e231b 8254012: NMT: MetaspaceSnapshot::snapshot uses wrong enum
Reviewed-by: stuefe, rrich
2020-10-14 17:13:27 +00:00
Claes Redestad
96a1f08e80 8254775: Microbenchmark StringIndexOfChar doesn't compile
Reviewed-by: rriggs
2020-10-14 15:25:43 +00:00
Claes Redestad
a6a381353a 8254761: Wrong intrinsic annotation used for StringLatin1.indexOfChar
Reviewed-by: alanb
2020-10-14 14:11:16 +00:00
Claes Redestad
738effade4 8254744: Clean-up CodeBlob::align_code_offset
Reviewed-by: mdoerr, eosterlund
2020-10-14 13:21:07 +00:00
Jason Tatton (AWS)
f71e8a6198 8173585: Intrinsify StringLatin1.indexOf(char)
Reviewed-by: neliasso
2020-10-14 12:58:21 +00:00
Harold Seigel
95e68c6346 8254586: Replace fthrow() calls with simpler method calls in classFileParser.cpp
Reviewed-by: lfoltan, dholmes, coleenp
2020-10-14 12:23:09 +00:00
Thomas Stuefe
ba140b0f11 8254748: Bad Copyright header format after JDK-8212218
Reviewed-by: shade, dholmes
2020-10-14 11:21:38 +00:00
Stefan Karlsson
db9dcdf1ae 8254668: JVMTI process frames on thread without started processing
Reviewed-by: eosterlund, rrich
2020-10-14 10:29:15 +00:00
Thomas Stuefe
dc262dfcbf 8212218: [TESTBUG] runtime/ErrorHandling/TestHeapDumpOnOutOfMemoryErrorInMetaspace.java timed out
Reviewed-by: iklam, lmesnik
2020-10-14 09:37:54 +00:00
Martin Doerr
9eeeb8a20f 8254696: safepointMechanism_aix needs adaptation for JDK-8253180
Reviewed-by: dholmes, clanger
2020-10-14 08:17:13 +00:00
Roberto Castañeda Lozano
b509e31e5f 8254602: compiler/debug/TestStressCM.java failed with "RuntimeException: got the same optimization stats for different seeds: expected 45"
Remove test assertion checking that different random seeds lead to different
code motion decisions. This was the case for the specific pair of random seeds,
IR fed to code motion, and target platforms tested originally; but does not need
to hold in general. Remove similar test assertion in IGVN randomization test
case. Re-enable the test case.

Reviewed-by: shade, kvn
2020-10-14 08:07:59 +00:00
Roberto Castañeda Lozano
9fe9b24b88 8254575: C2: Clean up unused TRACK_PHI_INPUTS assertion code
Remove assertion code that was disabled in all build configurations.

Co-authored-by: Vladimir Ivanov <vlivanov@openjdk.org>
Reviewed-by: vlivanov, kvn
2020-10-14 08:06:59 +00:00
Tobias Hartmann
31d9b7fe45 8254252: Generic arraycopy stub overwrites callee-save rdi register on 64-bit Windows
Reviewed-by: kvn, chagedorn
2020-10-14 07:26:13 +00:00
Ioi Lam
a098037375 8254365: ciMethod.hpp should not include methodHandles.hpp
Reviewed-by: dholmes, coleenp
2020-10-14 04:59:52 +00:00
Jie Fu
d50e0de8fb 8254722: bsd_zero builds broken after JDK-8253717
Reviewed-by: dholmes
2020-10-14 03:09:01 +00:00
Coleen Phillimore
ba5dc67a74 8254158: Consolidate per-platform stack overflow handling code
Reviewed-by: fparain, hseigel
2020-10-13 20:42:34 +00:00
Ludovic Henry
715e24afb2 8254311: Incorrect statements in createWindowsDevkit2017.sh
Reviewed-by: erikj, thartmann
2020-10-13 17:28:41 +00:00
Kiran Sidhartha Ravikumar
ba24f9633e 8251861: Remove unused jdk.internal.ref.SoftCleanable and WeakCleanable
Reviewed-by: mchung, rriggs
2020-10-13 17:08:47 +00:00
Daniel Fuchs
6ed4c89dc8 8254704: Add missing @since tag to BodyPublishers::concat
Reviewed-by: chegar
2020-10-13 16:53:40 +00:00
Jonathan Gibbons
3fb2e822be 8254627: Cleanup {Abstract,Single,Split}IndexWriter classes
Reviewed-by: hannesw
2020-10-13 16:22:52 +00:00
Per Liden
02d9c29185 8254672: ZGC: ZParallelOopsDo/ZSerialWeakOopsDo should use atomic load/store
Reviewed-by: stefank
2020-10-13 15:36:23 +00:00
Daniel Fuchs
65393a093c 8229867: Re-examine synchronization usages in http and https protocol handlers
Reviewed-by: chegar, alanb, michaelm
2020-10-13 14:22:11 +00:00
Per Liden
6fe209b564 8254671: ZGC: Remove unused roots iterator types
Reviewed-by: stefank
2020-10-13 13:40:50 +00:00
Kiran Sidhartha Ravikumar
9c9349098a 8254177: (tz) Upgrade time-zone data to tzdata2020b
Reviewed-by: erikj, naoto, coffeys
2020-10-13 11:38:03 +00:00
Per Liden
5d6a625543 8254576: ZGC: Clean up timers in roots iterators
Reviewed-by: eosterlund, stefank
2020-10-13 09:49:14 +00:00
Aleksei Voitylov
508c8a9585 8247591: Document Alpine Linux build steps in OpenJDK build guide
Co-authored-by: Aleksei Voitylov <avoitylov@openjdk.org>
Reviewed-by: erikj
2020-10-13 09:42:23 +00:00
Aleksei Voitylov
63009f90ec 8247589: Implementation of Alpine Linux/x64 Port
Co-authored-by: Mikael Vidstedt <mikael@openjdk.org>
Co-authored-by: Alexander Scherbatiy <alexsch@openjdk.org>
Co-authored-by: Axel Siebenborn <asiebenborn@openjdk.org>
Co-authored-by: Aleksei Voitylov <avoitylov@openjdk.org>
Reviewed-by: alanb, erikj, dholmes
2020-10-13 09:35:58 +00:00
Stefan Karlsson
9d230ea87d 8254562: ZGC: Remove ZMarkRootsTask
Reviewed-by: pliden
2020-10-13 09:05:52 +00:00
Aleksey Shipilev
90de2894e9 8254611: x86_32: Call to IRT::at_unwind clobbers rthread after JDK-8253180
Reviewed-by: eosterlund
2020-10-13 05:47:03 +00:00
Ioi Lam
c9ca1bb025 8254364: Remove leading _ from struct/union declarations in jvmti.h
Reviewed-by: dholmes, sspitsyn
2020-10-13 05:22:49 +00:00
Yumin Qi
e49232a0d2 8254599: CDS dump should not warn about hidden classes
Reviewed-by: redestad, lfoltan, iklam
2020-10-13 04:05:21 +00:00
Eric Liu
b464213942 8252407: Build failure with gcc-8+ and asan
Reviewed-by: ihse, kbarrett
2020-10-13 03:38:41 +00:00
Vladimir Kozlov
2a4328ba7d 8254610: Problem list test compiler/debug/TestStressCM.java
Reviewed-by: iignatyev, dcubed
2020-10-12 20:08:43 +00:00
Xin Liu
bff586f07a 8254269: simplify Node::disconnect_inputs
Node::disconnect_inputs cuts off all input edges without exception.

Reviewed-by: redestad, kvn
2020-10-12 19:54:25 +00:00
Stuart Marks
d7128e7dac 8254090: Collectors.toUnmodifiableList exposes shared secret
Co-authored-by: Tagir F. Valeev <tvaleev@openjdk.org>
Reviewed-by: psandoz
2020-10-12 17:22:21 +00:00
Valerie Peng
df1f132b67 8253563: Change sun.security.jca.Providers.threadLists to be ThreadLocal
Reviewed-by: alanb
2020-10-12 16:56:47 +00:00
Vladimir Kempik
c7f0064062 8253899: Make IsClassUnloadingEnabled signature match specification
Reviewed-by: sspitsyn, dholmes
2020-10-12 13:16:28 +00:00
Chris Hegarty
aad3cf4df7 8254234: Add test library stream object builder
Reviewed-by: rriggs
2020-10-12 13:06:10 +00:00
Daniel Fuchs
4184959d85 8252374: Add a new factory method to concatenate a sequence of BodyPublisher instances into a single publisher.
Reviewed-by: chegar
2020-10-12 12:52:55 +00:00
Roberto Castañeda Lozano
05459df0c7 8253765: C2: Control randomization in StressLCM and StressGCM
Use the compilation-local seed in 'StressLCM' and 'StressGCM' rather than the
global one. As a consequence, these options use by default a fresh seed in every
compilation, unless 'StressSeed=N' is specified, in which case they behave
deterministically. Annotate tests that use 'StressLCM' and 'StressGCM' with the
'stress' and 'randomness' keys to reflect this change in default behavior.

Reviewed-by: kvn, thartmann
2020-10-12 11:40:50 +00:00
Roman Kennke
6620b617a7 8254573: Shenandoah: Streamline/inline native-LRB entry point
Reviewed-by: shade
2020-10-12 11:29:36 +00:00
Roland Westrelin
a6c23b7753 8253923: C2 doesn't always run loop opts for compilations that include loops
Reviewed-by: neliasso, thartmann
2020-10-12 10:55:22 +00:00
Roman Kennke
dfe8ba6099 8254320: Shenandoah: C2 native LRB should activate for non-cset objects
Reviewed-by: roland, shade
2020-10-12 10:54:32 +00:00
Aleksey Shipilev
295a44af6f 8254558: Remove unimplemented Arguments::do_pd_flag_adjustments
Reviewed-by: dholmes
2020-10-12 10:35:21 +00:00
Aleksey Shipilev
0fab73ed58 8254560: Shenandoah: Concurrent Strong Roots logging is incorrect
Reviewed-by: rkennke
2020-10-12 10:33:22 +00:00
Aleksey Shipilev
638f910951 8254559: Remove unimplemented JVMFlag::get_locked_message_ext
Reviewed-by: dholmes, tschatzl
2020-10-12 09:40:03 +00:00
Hannes Wallnöfer
0ec1d6385a 8253117: Replace HTML tables in javadoc summaries with CSS grid elements
Reviewed-by: jjg
2020-10-12 09:36:43 +00:00
Christian Hagedorn
54bbe76ed0 8251544: CTW: C2 fails with assert(no_dead_loop) failed: dead loop detected
Reviewed-by: kvn, roland
2020-10-12 08:18:13 +00:00
Christian Hagedorn
13fe054cb9 8253588: C1: assert(false) failed: unknown register on x86_32 only with -XX:+TraceLinearScanLevel=4
Reviewed-by: thartmann, kvn
2020-10-12 08:16:33 +00:00
Thomas Schatzl
59378a19b2 8254164: G1 only removes self forwarding pointers for last collection set increment
Reviewed-by: sjohanss, kbarrett
2020-10-12 07:55:01 +00:00
Thomas Schatzl
bf46acf933 8254028: G1 incorrectly updates scan_top for collection set regions during preparation of evacuation
Reviewed-by: kbarrett
2020-10-12 07:42:22 +00:00
Roland Westrelin
a2bb4c6014 8254314: Shenandoah: null checks in c2 should not skip over native load barrier
Reviewed-by: rkennke
2020-10-12 07:21:03 +00:00
Per Liden
c73a0fffaa 8252105: Parallel heap inspection for ZCollectedHeap
Reviewed-by: ayang, eosterlund
2020-10-12 07:04:59 +00:00
Robbin Ehn
45b09a3f25 8253833: mutexLocker assert_locked_or_safepoint should not access VMThread state from non-VM-thread
Reviewed-by: shade, coleenp, dcubed, dholmes
2020-10-12 06:01:31 +00:00
Claes Redestad
77c776275e 8254353: Remove unused non-product flags
Reviewed-by: iignatyev, kvn
2020-10-11 21:59:52 +00:00
Aleksey Shipilev
d3069ac9ec 8254362: x86_32 builds fail after JDK-8253180
Reviewed-by: kvn
2020-10-11 21:07:48 +00:00
Vladimir Kozlov
25001c50d6 8254352: 3 compiler tests failed with "assert(allocates2(pc)) failed: not in CodeBuffer memory"
Reviewed-by: shade
2020-10-11 19:37:36 +00:00
Jie Fu
d43f14161e 8254351: Minimal VM build fails with undeclared identifier 'MaxVectorSize' after JDK-8252847
Reviewed-by: kvn
2020-10-11 00:41:06 +00:00
Daniel D. Daugherty
cc52358c42 8254335: logging/logStream.hpp includes memory/resourceArea.hpp but doesn't need it
Reviewed-by: kbarrett, iklam
2020-10-10 13:38:55 +00:00
Jatin Bhateja
4b5ac3abac 8252847: Optimize primitive arrayCopy stubs using AVX-512 masked instructions
Reviewed-by: neliasso, kvn
2020-10-10 06:29:38 +00:00
Jie Fu
ec41046c5c 8254348: Build fails when cds is disabled after JDK-8247536
Reviewed-by: dcubed
2020-10-10 04:26:37 +00:00
Yumin Qi
e4469d2c8c 8247536: Support for pre-generated java.lang.invoke classes in CDS static archive
Reviewed-by: iklam, mchung
2020-10-10 02:06:52 +00:00
Coleen Phillimore
7ec9c8eac7 8233214: Remove runtime code not needed with CMS removed
Reviewed-by: shade, stefank, tschatzl
2020-10-09 20:46:11 +00:00
Roman Kennke
536b35b53a 8254319: Shenandoah: Interpreter native-LRB needs to activate during HAS_FORWARDED
Reviewed-by: shade, zgu
2020-10-09 19:07:14 +00:00
Andy Herrick
be26972432 8253379: [windows] Several jpackage tests failed with error code 1638
Reviewed-by: asemenyuk, almatvee, kizune
2020-10-09 18:17:37 +00:00
Evgeny Nikitin
52e45a3677 8229186: Improve error messages for TestStringIntrinsics failures
Reviewed-by: iignatyev, lmesnik
2020-10-09 16:48:49 +00:00
Aleksey Shipilev
6d2c1a66bb 8254292: Update JMH devkit to 1.26
Reviewed-by: erikj, aph
2020-10-09 16:44:37 +00:00
Severin Gehwolf
2bbf8a2a96 8245543: Cgroups: Incorrect detection logic on some systems (still reproducible)
Reviewed-by: bobv, shade
2020-10-09 16:25:50 +00:00
Jie Fu
aaa0a2a047 8254297: Zero and Minimal VMs are broken with undeclared identifier 'DerivedPointerTable' after JDK-8253180
Reviewed-by: shade, eosterlund
2020-10-09 15:16:49 +00:00
Igor Ignatyev
7e80c9897d 8254261: fix javadocs in jdk.test.lib.Utils
Reviewed-by: shade
2020-10-09 14:47:25 +00:00
Zhengyu Gu
d4b5dfd1a2 8253857: Shenandoah: Bugs in ShenandoahEvacOOMHandler related code
Reviewed-by: rkennke
2020-10-09 13:44:13 +00:00
Martin Doerr
e9c1905bd0 8253740: [PPC64] Minor interpreter cleanup
Reviewed-by: lucy
2020-10-09 13:35:01 +00:00
Jose Ricardo Ziviani
b1448da109 8253900: SA: wrong size computation when JVM was built without AOT
Reviewed-by: cjplummer, sspitsyn
2020-10-09 12:56:47 +00:00
Martin Doerr
2bc8bc5722 8254265: s390 and linux 32 bit builds broken
Reviewed-by: coleenp, dholmes
2020-10-09 11:51:21 +00:00
Jim Laskey
4f9a1ffcdd 8254073: Tokenizer improvements (revised)
Reviewed-by: mcimadamore
2020-10-09 11:08:56 +00:00
Claes Redestad
9cecc16747 8254244: Some code emitted by TemplateTable::branch is unused when running TieredCompilation
Reviewed-by: mdoerr, coleenp, iveresov
2020-10-09 11:01:53 +00:00
Thomas Schatzl
a95590d00e 8254285: G1: Remove "What is this about" comment in G1CollectedHeap.cpp
Reviewed-by: shade, sjohanss
2020-10-09 09:55:57 +00:00
Aleksey Shipilev
0230781107 8254175: Build no-pch configuration in debug mode for submit checks
Reviewed-by: rwestberg, erikj, dholmes
2020-10-09 09:42:39 +00:00
Erik Österlund
b9873e1833 8253180: ZGC: Implementation of JEP 376: ZGC: Concurrent Thread-Stack Processing
Reviewed-by: stefank, pliden, rehn, neliasso, coleenp, smonteith
2020-10-09 08:40:33 +00:00
Jan Lahoda
a2f651904d 8233685: Test tools/javac/modules/AddLimitMods.java fails
Reviewed-by: vromero
2020-10-09 06:22:15 +00:00
Sergey Bylokhov
70be8c7a46 8253965: Delete the outdated java.awt.PeerFixer class
Reviewed-by: prr, pbansal
2020-10-09 05:08:49 +00:00
Martin Doerr
ced46b19f7 8254190: [s390] interpreter misses exception check after calling monitorenter
Reviewed-by: shade, rrich
2020-10-08 20:52:50 +00:00
Igor Ignatyev
5351ba6cfa 8254262: jdk.test.lib.Utils::createTemp* don't pass attrs
Reviewed-by: shade
2020-10-08 19:09:25 +00:00
Nhat Nguyen
8c0d3d754b 8254195: java/nio/file/Files/SubstDrive.java failed with "AssertionError: expected [144951656448] but found [144951640064]"
Reviewed-by: alanb, bpb
2020-10-08 18:05:23 +00:00
Sergey Bylokhov
c2a5de636f 8253681: closed java/awt/dnd/MouseEventAfterStartDragTest/MouseEventAfterStartDragTest.html test failed
Reviewed-by: shade
2020-10-08 16:34:01 +00:00
Zhengyu Gu
d036dca085 8254103: Shenandoah: Move updating thread roots to concurrent phase
Reviewed-by: rkennke
2020-10-08 13:50:57 +00:00
Christoph Dreis
7e82ba1ff0 8254146: Avoid unnecessary volatile write on new AtomicBoolean(false)
Reviewed-by: redestad, rriggs, chegar
2020-10-08 13:18:09 +00:00
Vladimir Ivanov
6d13c766bf 8253191: C2: Masked byte comparisons with large masks produce wrong result on x86
Reviewed-by: thartmann
2020-10-08 12:41:46 +00:00
Roberto Castañeda Lozano
a191c586dc 8253404: C2: assert(C->live_nodes() <= C->max_node_limit()) failed: Live Node limit exceeded limit
Record nodes as dead in Node::destruct() if their index cannot be directly
reclaimed. This prevents the "Live Node limit exceeded limit" assertion failure
by improving the accuracy of Compile::live_nodes() when "hook" nodes in
ConvI2LNode::Ideal() are created and deleted non-consecutively.

This addition might result in multiple calls to compile::record_dead_node() for
the same node (e.g. from PhaseIdealLoop::spinup()), but this is safe, as
compile::record_dead_node() is idempotent.

Reviewed-by: neliasso, thartmann
2020-10-08 12:30:38 +00:00
Coleen Phillimore
6bc493188b 8253717: Relocate stack overflow code out of thread.hpp/cpp
Reviewed-by: rehn, dcubed, dholmes, stuefe
2020-10-08 11:24:27 +00:00
Jaikiran Pai
782d45bdec 8242882: opening jar file with large manifest might throw NegativeArraySizeException
Reviewed-by: bchristi, lancea
2020-10-08 10:46:37 +00:00
Roland Westrelin
f86037207c 8253566: clazz.isAssignableFrom will return false for interface implementors
Reviewed-by: kvn, thartmann, neliasso
2020-10-08 09:33:42 +00:00
Kim Barrett
66f27b5fca 8254015: copy_to_survivor_space should use in-hand klass for scanning
Reviewed-by: tschatzl, sjohanss, ayang
2020-10-08 08:56:01 +00:00
Roland Westrelin
76a5852776 8253756: C2 CompilerThread0 crash in Node::add_req(Node*)
Reviewed-by: vlivanov, thartmann
2020-10-08 08:39:40 +00:00
Aleksey Shipilev
8f9e4792a1 8254144: Non-x86 Zero builds fail with return-type warning in os_linux_zero.cpp
Reviewed-by: zgu
2020-10-08 08:11:26 +00:00
Aleksey Shipilev
7952c06b36 8254166: Zero: return-type warning in zeroInterpreter_zero.cpp
Reviewed-by: sgehwolf
2020-10-08 08:10:55 +00:00
Thomas Schatzl
894ec76c11 8254027: gc/g1/TestHumongousConcurrentStartUndo.java failed with "'Concurrent Mark Cycle' missing from stdout/stderr"
Reviewed-by: sjohanss, kbarrett
2020-10-08 07:43:32 +00:00
Aleksey Shipilev
bc236903a2 8254173: Add Zero, Minimal hotspot targets to submit workflow
Reviewed-by: erikj, rwestberg
2020-10-08 07:25:42 +00:00
Christian Stein
e1187c401e 8248262: Wrong link target in ModuleDescriptor#isAutomatic's API documentation
Reviewed-by: alanb
2020-10-08 07:11:43 +00:00
Igor Ignatyev
9cdfd0fafe 8254096: remove jdk.test.lib.Utils::getMandatoryProperty(String) method
Reviewed-by: shade
2020-10-08 06:56:20 +00:00
Ioi Lam
d1e94eebdd 8253909: Implement detailed map file for CDS
Reviewed-by: stuefe, ccheung
2020-10-08 06:55:42 +00:00
Igor Ignatyev
7733a0e76b 8254182: remove Utils.tryFindJvmPid/waitForJvmPid
Reviewed-by: rriggs
2020-10-08 06:54:21 +00:00
Igor Veresov
4e5ef30303 8254104: MethodCounters must exist before nmethod is installed
Reviewed-by: dnsimon, kvn
2020-10-08 06:53:24 +00:00
Boris Ulasevich
fd0cb98ed0 8253901: ARM32: SIGSEGV during monitorexit due to incorrect register use (after JDK-8253540)
Reviewed-by: shade
2020-10-08 06:52:27 +00:00
Nhat Nguyen
abe2593772 8232092: (fs) Files::isWritable returns false on a writeable root directory (win)
Reviewed-by: alanb
2020-10-07 19:45:20 +00:00
Igor Ignatyev
5a9bd41e79 8254102: use ProcessHandle::pid instead of ManagementFactory::getRuntimeMXBean to get pid in tests
Reviewed-by: rriggs, shade
2020-10-07 18:51:52 +00:00
Roger Riggs
38159d52d4 8253876: jdk/test/lib/hexdump/ASN1FormatterTest.java fails with "AssertionError: Lines expected [126] but found [202]"
Reviewed-by: shade, lancea
2020-10-07 18:36:14 +00:00
Brian Burkhalter
db3053dcd1 8067127: Tags cleanup
Reviewed-by: rriggs, dfuchs, lancea
2020-10-07 17:16:04 +00:00
Claes Redestad
739347f093 8254168: Remove TemplateTable::count_calls
Reviewed-by: coleenp
2020-10-07 17:10:37 +00:00
Gerard Ziemski
4fe07ccc53 8252324: Signal related code should be shared among POSIX platforms
Reviewed-by: coleenp, dholmes, stuefe, ysuenaga
2020-10-07 16:21:51 +00:00
Hannes Wallnöfer
1e8e543b26 8216497: javadoc should auto-link to platform classes
Co-authored-by: Jan Lahoda <jlahoda@openjdk.org>
Reviewed-by: erikj, jjg
2020-10-07 13:08:34 +00:00
Doug Simon
04ca660e81 8253874: [JVMCI] added test omitted in 8252881
Reviewed-by: shade
2020-10-07 09:14:43 +00:00
Patrick Concannon
49128a1ee5 8253475: Javadoc clean up in HttpExchange and HttpServer
Reviewed-by: dfuchs
2020-10-07 09:12:34 +00:00
Adam Farley
9543d7607b 8253000: Remove redundant MAKE_SUBDIR argument
Reviewed-by: erikj
2020-10-07 08:07:22 +00:00
Adam Farley
4dfa411247 8252997: Null-proofing for linker_md.c
Reviewed-by: sspitsyn
2020-10-07 08:05:27 +00:00
Prasanta Sadhukhan
97ff38caff 8254141: Typo in copyright year
Reviewed-by: jdv
2020-10-07 07:14:05 +00:00
Jan Lahoda
cd4faff0ec 8249095: tools/javac/launcher/SourceLauncherTest.java fails on Windows
Reviewed-by: jjg
2020-10-07 06:52:03 +00:00
Prasanta Sadhukhan
bdd5782a67 8253980: javax/swing/plaf/synth/7158712/bug7158712.java fails on windows
Reviewed-by: kizune, prr
2020-10-07 06:41:02 +00:00
Conor Cleary
703b345eee 8253179: Replace LinkedList Impl in net.http.Http2Connection
Reviewed-by: dfuchs, prappo, chegar, shade
2020-10-07 06:21:53 +00:00
Sergey Bylokhov
397307311e 8253977: More memory leaks in client-libs on macOS
Reviewed-by: kizune
2020-10-07 03:06:35 +00:00
Igor Ignatyev
2a0389a892 8254095: remove jdk.test.lib.Utils::distro() method
Reviewed-by: bchristi
2020-10-06 22:57:56 +00:00
Igor Ignatyev
ac772cd916 8253750: use build-stable default seed for Utils.RANDOM_GENERATOR
Reviewed-by: rriggs
2020-10-06 20:35:34 +00:00
Claes Redestad
6712f8caff 8254084: Remove TemplateTable::pd_initialize
Reviewed-by: mdoerr, coleenp
2020-10-06 20:23:59 +00:00
Harold Seigel
82fe023b06 8254061: Missing space in flag description
Reviewed-by: coleenp
2020-10-06 19:19:27 +00:00
Jonathan Gibbons
bd50ccd037 8253735: Cleanup SearchIndexItem API
Reviewed-by: hannesw
2020-10-06 17:32:33 +00:00
Rajan Halade
54b340b44f 8254081: java/security/cert/PolicyNode/GetPolicyQualifiers.java fails due to an expired certificate
Perform backdated validation of test certificate.

Reviewed-by: mullan, xuelei
2020-10-06 16:38:42 +00:00
Zhengyu Gu
51fdb4c039 8254075: Shenandoah: Remove ShenandoahCodeRootsStyle diagnostic flag and related test
Reviewed-by: shade
2020-10-06 15:28:44 +00:00
Ian Graves
77921b9736 8254080: fix for JDK-8204256 causes jlink test failures
Reviewed-by: alanb
2020-10-06 15:23:19 +00:00
Patricio Chilano Mateo
57493c1991 8253694: Remove Thread::muxAcquire() from ThreadCrashProtection()
Reviewed-by: dholmes, dcubed, coleenp
2020-10-06 14:48:56 +00:00
Robin Westberg
d2b1dc6d78 8254054: Pre-submit testing using GitHub Actions should not use the deprecated set-env command
Reviewed-by: ehelin, erikj
2020-10-06 13:39:57 +00:00
Naoto Sato
a34f48bcf5 8253832: CharsetDecoder : decode() mentioning CoderMalfunctionError behavior not as per spec
Reviewed-by: alanb
2020-10-06 12:35:52 +00:00
Sergey Bylokhov
f397b60ae1 8251123: doclint warnings about missing javadoc tags and comments
Reviewed-by: jdv, prr
2020-10-06 10:49:56 +00:00
Thomas Schatzl
c9d1dcc63d 8253902: G1: Starting a new marking cycle before the conc mark thread fully completed causes assertion failure
Reviewed-by: kbarrett, sjohanss
2020-10-06 10:16:19 +00:00
Jose Ricardo Ziviani
919978380c 8253565: PPC64: Fix duplicate if condition in vm_version_ppc.cpp
Reviewed-by: mdoerr
2020-10-06 08:16:57 +00:00
Tobias Hartmann
1728547270 8254010: GrowableArrayView::print fails to compile
Reviewed-by: stefank
2020-10-06 05:48:45 +00:00
Christoph Langer
6e61861740 8254046: Remove double semicolon introduced by JDK-8235521
Reviewed-by: serb
2020-10-06 05:42:19 +00:00
Ian Graves
5d84e95ed5 8204256: improve jlink error message to report unsupported class file format
Reviewed-by: mchung
2020-10-05 23:19:27 +00:00
Andy Herrick
4fe68f55a4 8253426: jpackage is unable to generate working EXE for add-launcher configurations
Reviewed-by: almatvee, kizune, asemenyuk
2020-10-05 21:10:48 +00:00
Robbin Ehn
c9d0407e94 8253794: TestAbortVMOnSafepointTimeout never timeouts
Reviewed-by: pchilanomate, dcubed, mdoerr
2020-10-05 19:16:11 +00:00
Christian Stein
f2f77f7b14 8253761: Wrong URI syntax printed by jar --describe-module
Reviewed-by: alanb
2020-10-05 18:16:29 +00:00
Paul Sandoz
b29e1086ac 8253944: Certain method references to VarHandle methods should fail
Reviewed-by: mcimadamore
2020-10-05 17:15:31 +00:00
Stuart Marks
88d75c9ad5 8156071: List.of: reduce array copying during creation
Reviewed-by: psandoz, redestad
2020-10-05 17:00:57 +00:00
Calvin Cheung
ea27a54bf0 8224509: Incorrect alignment in CDS related allocation code on 32-bit platforms
Reviewed-by: iklam, stuefe
2020-10-05 16:52:00 +00:00
Coleen Phillimore
4d29116d6d 8253433: Remove -XX:+Debugging product option
Reviewed-by: kbarrett, stuefe, dholmes
2020-10-05 15:46:07 +00:00
Zhengyu Gu
81dae70f67 8253948: Memory leak in ImageFileReader
Reviewed-by: alanb
2020-10-05 13:51:37 +00:00
Per Liden
65cab55c1b 8253971: ZGC: Flush mark stacks after processing concurrent roots
Reviewed-by: ayang, eosterlund
2020-10-05 13:18:38 +00:00
Zhengyu Gu
19219a964b 8253960: Memory leak in Java_java_lang_ClassLoader_defineClass0()
Reviewed-by: mchung, stuefe, alanb
2020-10-05 13:09:42 +00:00
Yudi Zheng
5d4a1350d0 8253842: [JVMCI] Allow implicit exception to dispatch to other address in jvmci compilers.
Reviewed-by: kvn
2020-10-05 12:21:33 +00:00
Adam Farley
289ae798f4 8252998: ModuleWrapper.gmk doesn't consult include path
Reviewed-by: erikj
2020-10-05 09:53:16 +00:00
Monica Beckwith
9604ee8269 8248238: Implementation: JEP 388: Windows AArch64 Support
Co-authored-by: Monica Beckwith <mbeckwit@openjdk.org>
Co-authored-by: Ludovic Henry <luhenry@openjdk.org>
Co-authored-by: Bernhard Urban-Forster <burban@openjdk.org>
Reviewed-by: dholmes, cjplummer, aph, ihse
2020-10-05 03:21:39 +00:00
Sergey Bylokhov
1c2754bfe3 8253269: The CheckCommonColors test should provide more info on failure
Reviewed-by: prr
2020-10-03 19:46:41 +00:00
Sergey Bylokhov
d296708ca6 8253606: Need to add missed constructor to the SwingEventMonitor
Reviewed-by: jdv, pbansal, prr
2020-10-02 22:03:55 +00:00
Phil Race
58102386eb 8253945: Missed default constructor for StreamPrintServiceFactory.java
Reviewed-by: kcr, serb
2020-10-02 21:54:53 +00:00
Rajan Halade
123e786db2 8239105: Add exception for expiring Digicert root certificates to VerifyCACerts test
"8239105: added verisigntsaca and thawtepremiumserverca to EXPIRY_EXC_ENTRIES list"

Reviewed-by: mullan
2020-10-02 17:21:56 +00:00
Per Liden
22f091608d 8253938: ZGC: Clean up argument names after JDK-8253030
Reviewed-by: tschatzl, ayang
2020-10-02 16:53:34 +00:00
Jonathan Gibbons
777804759f 8253736: Cleanup some of WorkArounds and usage thereof
Reviewed-by: vromero, ksrini
2020-10-02 16:15:46 +00:00
Jonathan Gibbons
87d77eb2a0 8253879: Simplify redundant code in IndexBuilder
Reviewed-by: ksrini
2020-10-02 16:12:26 +00:00
Vipin Sharma
dffe9db25c 8252537: Updated @exception with @throws
8252536: Replace @exception with @throws for core-libs
8252539: Replace @exception with @throws java.rmi.activation package
8252540: Replace @exception with @throws java.rmi.registry package
8252541: Replace @exception with @throws java.rmi.server package

Reviewed-by: rriggs, sspitsyn, lancea
2020-10-02 14:50:53 +00:00
Igor Ignatyev
406db1c270 8253913: unify gtest test names
Reviewed-by: stefank
2020-10-02 13:46:13 +00:00
Xin Liu
ea5a2b15a0 8251464: make Node::dump(int depth) support indent
Reviewed-by: thartmann
2020-10-02 13:45:29 +00:00
Igor Ignatyev
fff8c8deaa 8253882: remove PropertyResolvingWrapper
Reviewed-by: shade
2020-10-02 13:44:12 +00:00
Robin Westberg
7dcdc1fbdd 8253865: Pre-submit testing using GitHub Actions does not detect failures reliably
8253867: Pre-submit testing using GitHub Actions can fail to download intermediate artifacts

Reviewed-by: erikj
2020-10-02 13:12:14 +00:00
Patrick Concannon
0fd41c3b6a 8253470: Javadoc clean up in Filter and Headers
Reviewed-by: dfuchs, michaelm
2020-10-02 12:06:48 +00:00
Stefan Johansson
f686a380f3 8253926: Use extra_size correctly in anon_mmap_aligned
Reviewed-by: shade, kbarrett, tschatzl, stefank
2020-10-02 11:45:24 +00:00
Thomas Schatzl
b8966e1f7b 8253928: G1: Remove G1ConcurrentMarkThread::set_in_progress declaration
Reviewed-by: ayang, shade
2020-10-02 11:05:34 +00:00
Prasanta Sadhukhan
4185ed3290 5078989: Null Pointer exception in SpinnerListMode
Reviewed-by: serb
2020-10-02 08:10:21 +00:00
Aleksey Shipilev
6f40a41466 8253891: Debug x86_32 builds fail after JDK-8239090
Reviewed-by: stuefe, phh
2020-10-02 06:57:03 +00:00
Igor Veresov
b9505df3b4 8253118: Avoid unnecessary deopts when OSR nmethods of the same level are present.
Reviewed-by: kvn
2020-10-02 02:22:56 +00:00
Weijun Wang
3c4e824aa5 8249783: Simplify DerValue and DerInputStream
Reviewed-by: valeriep
2020-10-01 18:55:35 +00:00
Andy Herrick
9230c2aaae 8253747: tools/jpackage/share/AppImagePackageTest.java fails with InstalledPackageSize: 0
Reviewed-by: almatvee, prr
2020-10-01 18:36:35 +00:00
Fernando Guallini
cfd41c0c1d 8232840: java/math/BigInteger/largeMemory/SymmetricRangeTests.java fails due to "OutOfMemoryError: Requested array size exceeds VM limit"
Reviewed-by: alanb
2020-10-01 17:44:23 +00:00
Jim Laskey
8fda5b82f0 8253904: Revert Tokenizer improvements JDK-8224225
Reviewed-by: mcimadamore
2020-10-01 17:42:29 +00:00
Aleksey Shipilev
60ec2a53c2 8253824: Revert JDK-8253089 since VS warning C4307 has been disabled
Reviewed-by: mdoerr, iklam
2020-10-01 16:07:43 +00:00
Jim Laskey
90c131f29f 8224225: Tokenizer improvements
Reviewed-by: mcimadamore
2020-10-01 15:39:01 +00:00
Nils Eliasson
96704253b6 8253822: Remove unused exception_address_is_unpack_entry
Removing dead code

Reviewed-by: chagedorn, kvn
2020-10-01 15:31:11 +00:00
Leonid Mesnik
84402796b2 8180514: TestPrintMdo.java test fails with -XX:-TieredCompilation
Reviewed-by: cjplummer, sspitsyn
2020-10-01 14:59:51 +00:00
Thomas Stuefe
44e6820c37 8253650: Cleanup: remove alignment_hint parameter from os::reserve_memory
Reviewed-by: stefank, tschatzl
2020-10-01 12:09:59 +00:00
Prasanta Sadhukhan
ed62b0104f 6646602: Spelling error in javadoc for javax.swing.tree.TreeModel
Reviewed-by: jdv
2020-10-01 12:02:46 +00:00
Prasanta Sadhukhan
87276bce47 6690021: typos in TransferHandler Javadoc
Reviewed-by: jdv
2020-10-01 12:00:52 +00:00
Zhengyu Gu
dd36d8c64d 8253429: Error reporting should report correct state of terminated/aborted threads
Reviewed-by: dholmes, stuefe
2020-10-01 11:57:21 +00:00
Kim Barrett
2d9fa9da02 8247912: Make narrowOop a scoped enum
Reviewed-by: iklam, stefank
2020-10-01 10:45:22 +00:00
Jayathirth D V
928da494a8 8253739: java/awt/image/MultiResolutionImage/MultiResolutionImageObserverTest.java fails
Reviewed-by: serb
2020-10-01 09:38:15 +00:00
Severin Gehwolf
3e96721cd9 8253727: [cgroups v2] Memory and swap limits reported incorrectly
Account for interface files for swap and memory being reported independently.
The cgroup v1-like value is now reported by adding the memory.max value to
the memory.swap.max value, and memory.current and memory.swap.current
respectively.

Reviewed-by: bobv, shade
2020-10-01 09:28:40 +00:00
Martin Doerr
7779ce9fb4 8253689: [s390] Use flag kind "diagnostic" for platform specific flags
Reviewed-by: stuefe, lucy
2020-10-01 09:23:31 +00:00
Martin Doerr
a8242892c2 8253690: [PPC64] Use flag kind "diagnostic" for platform specific flags
Reviewed-by: stuefe, lucy
2020-10-01 09:21:12 +00:00
Sergey Bylokhov
1d88172c06 8253682: The AppletInitialFocusTest1.java is unstable
Reviewed-by: jdv
2020-10-01 08:10:32 +00:00
Roberto Castañeda Lozano
5dd9353b83 8253636: C2: Adjust NodeClasses::_max_classes
Update NodeClasses::_max_classes to the max class id within the
enumeration. Update comment and assertion to reflect that NodeClasses uses now
32 bits after the addition of Opaque1 in JDK-8229495.

Reviewed-by: neliasso, kvn
2020-10-01 06:39:25 +00:00
Roger Riggs
05a764f4ff 8253883: Problem list jdk/test/lib/hexdump/ASN1Formatter on Windows
Reviewed-by: lancea
2020-09-30 23:45:08 +00:00
Igor Ignatyev
55c282bb34 8253878: clean up nsk/share/jvmti/ArgumentHandler
Reviewed-by: cjplummer
2020-09-30 23:34:06 +00:00
Igor Ignatyev
776acfd80a 8253880: clean up sun/hotspot/tools/ctw/Utils class
Reviewed-by: kvn
2020-09-30 22:40:43 +00:00
Igor Veresov
79d70f6b51 8253869: sun/hotspot/whitebox/CPUInfoTest.java fails after JDK-8239090
Reviewed-by: mikael
2020-09-30 21:49:16 +00:00
Igor Ignatyev
ca0e014e60 8252003: remove usage of PropertyResolvingWrapper in vmTestbase/nsk/jvmti
Reviewed-by: cjplummer, sspitsyn
2020-09-30 21:37:12 +00:00
Roger Riggs
092c227721 8252523: Add ASN.1 Formatter to work with test utility HexPrinter
Reviewed-by: weijun
2020-09-30 20:42:39 +00:00
Jonathan Gibbons
06d8cf6fef 8253812: Cleanup AbstractMemberWriter
Reviewed-by: ksrini
2020-09-30 20:29:11 +00:00
Doug Simon
424d7d6485 8252881: [JVMCI] ResolvedJavaType.resolveMethod fails in fastdebug when invoked with a constructor
Reviewed-by: never
2020-09-30 20:06:31 +00:00
Philippe Marschall
2a406f3ce5 8138732: Rename @HotSpotIntrinsicCandidate to @IntrinsicCandidate and move it to the jdk.internal.vm.annotation package
Reviewed-by: dholmes, alanb, psandoz, kvn, egahlin
2020-09-30 20:05:07 +00:00
Igor Ignatyev
4b16f8ab94 8253872: ArgumentHandler must use the same delimiters as in jvmti_tools.cpp
Reviewed-by: cjplummer
2020-09-30 20:03:20 +00:00
Jonathan Gibbons
4fb8c77696 8253733: Cleanup internal taglet API
Reviewed-by: prappo
2020-09-30 19:28:10 +00:00
Weijun Wang
e5ba020ee9 8253829: Wrong length compared in SSPI bridge
Reviewed-by: valeriep
2020-09-30 17:13:47 +00:00
Paul Hohensee
9e453d9792 8239090: Improve CPU feature support in VM_Version
Reviewed-by: iveresov, simonis
2020-09-30 17:02:08 +00:00
Igor Ignatyev
8f7c9a7b18 8252001: remove usage of PropertyResolvingWrapper in vmTestbase/nsk/jdi
Reviewed-by: cjplummer, sspitsyn
2020-09-30 16:18:27 +00:00
Jonathan Gibbons
8cf8e463c6 8253700: spurious "extends Throwable" at end of Optional.orElseThrow method declaration
Reviewed-by: prappo
2020-09-30 16:08:58 +00:00
Igor Ignatyev
8b3d67681e 8238737: remove DeoptimizeAllClassesRate from CTW library
Reviewed-by: shade, vlivanov
2020-09-30 14:50:15 +00:00
Stefan Johansson
709cfe5f28 8253815: Remove unused HeapRegionManager::_num_committed from SA
Reviewed-by: tschatzl, cjplummer
2020-09-30 13:02:41 +00:00
Paul Hohensee
f80a6066e4 8253375: OSX build fails with Xcode 12.0 (12A7209)
Replace double array with short array in AdapterHandlerLibrary::create_native_wrapper, add parens around ?: in CSystemColors:getColor

Reviewed-by: prr, kbarrett, lucy
2020-09-30 12:16:25 +00:00
Patric Hedlin
04775f11fe 8253768: Deleting unused pipe_class definitions in adl-file (x86_64.ad).
Reviewed-by: neliasso
2020-09-30 09:06:17 +00:00
Martin Doerr
dc3a0f5f88 8253183: Fragile memory barrier selection for some weak memory model platforms
Reviewed-by: dholmes, eosterlund, dcubed
2020-09-30 09:03:06 +00:00
Aleksey Shipilev
8331e63fe4 8253778: ShenandoahSafepoint::is_at_shenandoah_safepoint should not access VMThread state from other threads
Reviewed-by: jiefu, rehn, rkennke
2020-09-30 08:58:24 +00:00
Prasanta Sadhukhan
4c65365116 8253792: javax.swing.text.GapContent documentation typos
Reviewed-by: jdv
2020-09-30 07:04:00 +00:00
Prasanta Sadhukhan
3078b5f340 6441211: Small Error in API at javax.swing.plaf.synth.Region
Reviewed-by: trebari, jdv
2020-09-30 07:02:29 +00:00
Matthias Baesken
4622a18a72 8253791: Issue with useAppleColor check in CSystemColors.m
Reviewed-by: phh, lucy, serb
2020-09-30 05:28:20 +00:00
Jatin Bhateja
ac02afe9dc 8253721: Flag -XX:AVX3Threshold does not accept Zero value
Reviewed-by: kvn, thartmann
2020-09-30 05:09:12 +00:00
Tejpal Rebari
4d9f207347 7151826: [TEST_BUG] [macosx] The test javax/swing/JPopupMenu/4966112/bug4966112.java not for mac
Reviewed-by: serb, jdv
2020-09-30 05:00:26 +00:00
Igor Ignatyev
1eca634736 8252000: remove usage of PropertyResolvingWrapper in vmTestbase/nsk/jdb
Reviewed-by: shade, cjplummer, sspitsyn
2020-09-30 03:03:53 +00:00
Igor Ignatyev
a55cde4d6b 8252002: remove usage of PropertyResolvingWrapper in vmTestbase/nsk/jdwp
Reviewed-by: cjplummer, sspitsyn
2020-09-30 02:43:10 +00:00
Alexandre Iline
ffc97ba585 8253543: sanity/client/SwingSet/src/ButtonDemoScreenshotTest.java failed with "AssertionError: All pixels are not black"
Reviewed-by: serb
2020-09-30 01:27:30 +00:00
Brian Burkhalter
5310d85809 8252937: Correct "no comment" warnings from javadoc in java.math package
Reviewed-by: darcy
2020-09-29 22:46:16 +00:00
Ian Graves
8df3e72cea 8218685: jlink --list-plugins needs to be readable and tidy
Reviewed-by: mchung, alanb
2020-09-29 21:16:35 +00:00
Harold Seigel
2fe0a5d75e 8253476: TestUseContainerSupport.java fails on some Linux kernels w/o swap limit capabilities
Reviewed-by: bobv, coleenp
2020-09-29 19:59:26 +00:00
Anthony Scarpino
fb206908b4 8253637: Update EC removal
Reviewed-by: mullan
2020-09-29 18:05:20 +00:00
Ioi Lam
b1ce6bdba9 8253548: jvmFlagAccess.cpp: clang 9.0.0 format specifier error
Reviewed-by: lfoltan
2020-09-29 15:17:34 +00:00
Severin Gehwolf
ff6843ca48 8253714: [cgroups v2] Soft memory limit incorrectly using memory.high
The early implementation of cgroups v2 support was done with
crun 0.8 and it contained a bug which set memory.high over
memory.low when --memory-reservation was being used as a CLI
option.

This bug has been fixed in later crun versions, starting with
crun 0.11. Use memory.low in OpenJDK as well.

Reviewed-by: bobv, adinn
2020-09-29 15:15:50 +00:00
Jan Lahoda
d5be82948b 8253770: Test tools/javac/parser/JavacParserTest.java fails on Windows after JDK-8253584
Reviewed-by: vromero
2020-09-29 14:29:28 +00:00
Evgeny Nikitin
6e5d4f33c5 8253607: [mlvm] meth/func/jdi/breakpointOtherStratum: un-problemlist and add randomness keyword
Reviewed-by: iignatyev
2020-09-29 12:42:20 +00:00
Stefan Karlsson
3ed960ec77 8253640: Make MEMFLAGS an enum class
Reviewed-by: stuefe, tschatzl
2020-09-29 12:03:00 +00:00
Jan Lahoda
86491a5f6b 8253584: Redunant errors for partial member selects
Reviewed-by: vromero
2020-09-29 10:11:08 +00:00
Maurizio Cimadamore
ebf443a16f 8253590: java/foreign tests are still failing on x86_32 after foreign-memaccess integration
Reviewed-by: psandoz
2020-09-29 09:40:21 +00:00
Robbin Ehn
431338bcb3 8212107: VMThread issues and cleanup
Reviewed-by: shade, dcubed, coleenp, dholmes, redestad
2020-09-29 09:37:15 +00:00
Robbin Ehn
6bddeb709d 8238761: Asynchronous handshakes
Reviewed-by: pchilanomate, dcubed, dholmes, coleenp, sspitsyn
2020-09-29 08:50:54 +00:00
Per Liden
6d19fe65d1 8253763: ParallelObjectIterator should have virtual destructor
Reviewed-by: shade, stefank
2020-09-29 08:39:09 +00:00
Prasanta Sadhukhan
55c90a171f 6514600: AbstractAction can throw NullPointerException when clone()d
Reviewed-by: serb, pbansal
2020-09-29 08:20:21 +00:00
John Tortugo
b65913249f 8252888: Collapse G1MMUTracker class hierarchy
Reviewed-by: ayang, sjohanss, kbarrett
2020-09-29 08:15:41 +00:00
Aditya Mandaleeka
e63b90cc17 8251358: Clean up Access configuration after Shenandoah barrier change
Reviewed-by: eosterlund, rkennke, shade
2020-09-29 07:25:08 +00:00
Jie Fu
9c17a35e50 8253748: StressIGV tests fail with release VMs
Reviewed-by: thartmann
2020-09-29 06:37:46 +00:00
Patric Hedlin
70b0fccf79 8253728: tests fail with "assert(fr.is_compiled_frame()) failed: Wrong frame type"
Reviewed-by: kvn
2020-09-28 21:48:55 +00:00
Mikael Vidstedt
527b0e44eb 8248984: Bump minimum boot jdk to JDK 15
Reviewed-by: darcy, erikj, dholmes
2020-09-28 21:22:00 +00:00
Vicente Romero
ac15d6445b 8241151: Incorrect lint warning for no definition of serialVersionUID in a record
Co-authored-by: Bernard Blaser <bsrbnd@gmail.com>
Co-authored-by: Vicente Romero <vicente.romero@oracle.com>
Reviewed-by: jjg
2020-09-28 21:20:14 +00:00
Mikael Vidstedt
d25b03e987 8253616: Change to GCC 10.2 for building on Linux at Oracle
Reviewed-by: erikj
2020-09-28 18:31:30 +00:00
Daniel D. Daugherty
821bd08cd6 8253667: ProblemList tools/jlink/JLinkReproducible{,3}Test.java on linux-aarch64
Reviewed-by: dfuchs, iignatyev
2020-09-28 16:41:35 +00:00
Pankaj Bansal
1ae6b533fb 8252194: Add automated test for fix done in JDK-8218469
Reviewed-by: serb, jdv, kizune
2020-09-28 16:05:38 +00:00
Coleen Phillimore
77a0f3999a 8253540: InterpreterRuntime::monitorexit should be a JRT_LEAF function
Reviewed-by: rehn, mdoerr, dcubed, pchilanomate
2020-09-28 15:49:02 +00:00
Volker Simonis
0054c15f60 8253435: Cgroup: 'stomping of _mount_path' crash if manually mounted cpusets exist
Reviewed-by: sgehwolf, bobv
2020-09-28 15:42:10 +00:00
Claes Redestad
8e338f67b2 8253646: ZGC: Avoid overhead of sorting ZStatIterableValues on bootstrap
Reviewed-by: pliden, eosterlund
2020-09-28 15:14:56 +00:00
Anton Kozlov
ec9bee6866 8253015: Aarch64: Move linux code out from generic CPU feature detection
Reviewed-by: aph
2020-09-28 13:52:10 +00:00
Patrick Concannon
16b8c39964 8253053: Javadoc clean up in Authenticator and BasicAuthenicator
Reviewed-by: dfuchs, rriggs, chegar, michaelm
2020-09-28 13:17:46 +00:00
Robin Westberg
840aa2b79e 8253424: Add support for running pre-submit testing using GitHub Actions
Reviewed-by: ehelin, erikj
2020-09-28 09:31:51 +00:00
Nick Gasson
8e87d46f41 8252857: AArch64: Shenandoah C1 CAS is not sequentially consistent
Reviewed-by: rkennke, shade
2020-09-28 09:12:26 +00:00
Martin Doerr
c2692f8875 8225329: -XX:+PrintBiasedLockingStatistics causes crash during initia…
Reviewed-by: stuefe, dholmes
2020-09-28 09:06:31 +00:00
Thomas Schatzl
e9c178276f 8252752: Clear card table for old regions during scan in G1
Reviewed-by: kbarrett, iwalulya, ayang
2020-09-28 08:28:57 +00:00
Wang Zhuo
276fcee795 8252835: Revert fix for JDK-8246051
Reviewed-by: psandoz, dholmes, mikael
2020-09-28 07:34:01 +00:00
Stefan Karlsson
ca1ed16292 8253639: Change os::attempt_reserve_memory_at parameter order
Reviewed-by: tschatzl, iklam
2020-09-28 07:12:48 +00:00
Roberto Castaneda Lozano
fed3636f12 8252219: C2: Randomize IGVN worklist for stress testing
Add 'StressIGVN' option to let C2 randomize IGVN worklist order. When enabled,
the worklist is shuffled before each main run of the IGVN loop. Also add
'StressSeed=N' option to specify the seed. If the seed is not specified, a
random one is generated. In either case, the seed is logged if 'LogCompilation'
is enabled. The new options are declared as production+diagnostic for
consistency with the existing 'StressLCM' and 'StressGCM' options.

Reviewed-by: kvn, chagedorn, thartmann
2020-09-28 06:44:58 +00:00
Stefan Karlsson
625a9352bf 8253638: Cleanup os::reserve_memory and remove MAP_FIXED
Reviewed-by: stuefe, iklam
2020-09-28 06:30:09 +00:00
Nick Gasson
f014854ac7 8253624: gtest fails when run from make with read-only source directory
Reviewed-by: erikj
2020-09-28 01:54:45 +00:00
Patric Hedlin
7817963ce9 8247691: [aarch64] Incorrect handling of VM exceptions in C1 deopt stub/traps
Reviewed-by: eosterlund, aph
2020-09-26 18:24:11 +00:00
Ian Graves
79904c1fa3 8252730: jlink does not create reproducible builds on different servers
Reviewed-by: mchung, alanb
2020-09-26 07:01:22 +00:00
Phil Race
ea7c47c1bb 7179006: [macosx] Print-to-file doesn't work: printing to the default printer instead.
Reviewed-by: serb
2020-09-26 04:15:30 +00:00
Thomas Stuefe
b66fa8f444 8253572: [windows] CDS archive may fail to open with long file names
8249943: [TESTBUG] runtime/cds/serviceability/transformRelatedClasses/TransformInterfaceAndImplementor.java


Reviewed-by: ccheung, iklam
2020-09-26 04:12:54 +00:00
Zhengyu Gu
4167540074 8253647: Remove dead code in os::create_thread() on Linux/BSD
Reviewed-by: stuefe, dholmes
2020-09-25 23:33:42 +00:00
Alexander Matveev
5a57945f1a 8231591: [TESTBUG] Create additional two phase jpackage tests
Reviewed-by: asemenyuk, herrick
2020-09-25 23:02:00 +00:00
Andy Herrick
b159e4ed9e 8253149: Building an installer from invalid app image fails on Window…
Reviewed-by: asemenyuk, almatvee, kizune
2020-09-25 20:22:38 +00:00
Hai-May Chao
0e855fe5fa 8252377: Incorrect encoding for EC AlgorithmIdentifier
Reviewed-by: weijun
2020-09-25 19:47:15 +00:00
Daniel D. Daugherty
9150b902d5 8253659: ProblemList sun/security/ec/TestEC.java on linux-aarch64
Reviewed-by: iklam
2020-09-25 19:38:15 +00:00
Harold Seigel
0187567704 8250984: Memory Docker tests fail on some Linux kernels w/o cgroupv1 …
Reviewed-by: bobv, sgehwolf
2020-09-25 17:16:38 +00:00
Aleksei Efimov
a75edc29c6 8251188: Update LDAP tests not to use wildcard addresses
Reviewed-by: dfuchs
2020-09-25 12:46:08 +00:00
Stefan Karlsson
1f5a033421 8253555: Make ByteSize and WordSize typed scoped enums
Reviewed-by: kbarrett, tschatzl
2020-09-25 10:29:26 +00:00
Aleksey Shipilev
f62eefc02b 8253469: ARM32 Zero: replace usages of __sync_synchronize() with OrderAccess::fence
Reviewed-by: dholmes
2020-09-25 10:14:04 +00:00
Gilles Duboscq
1b79326c05 8242451: ensure semantics of non-capturing lambdas are preserved independent of execution mode
Reviewed-by: mchung
2020-09-25 10:10:36 +00:00
Aleksey Shipilev
dc1ef58351 8253631: Remove unimplemented CompileBroker methods after JEP-165
Reviewed-by: thartmann
2020-09-25 10:10:04 +00:00
Aleksey Shipilev
27d0a70b34 8253633: Remove unimplemented TieredThresholdPolicy::set_carry_if_neccessary
Reviewed-by: thartmann
2020-09-25 10:09:27 +00:00
Stefan Karlsson
e12d94af0b 8253594: Remove CollectedHeap::supports_tlab_allocation
Reviewed-by: sjohanss, pliden
2020-09-25 09:12:38 +00:00
Alexey Bakhtin
cfa3f74931 8245527: LDAP Channel Binding support for Java GSS/Kerberos
Reviewed-by: dfuchs, aefimov, mullan
2020-09-25 07:26:54 +00:00
Thomas Schatzl
37b70282b5 8240556: Abort concurrent mark after effective eager reclamation of humongous objects
Reviewed-by: sjohanss, ayang
2020-09-25 07:11:55 +00:00
Roberto Castaneda Lozano
dcde95ba0d 8253586: C2: Clean up unused PhaseIterGVN::init_worklist()
Remove unused method PhaseIterGVN::init_worklist(Node *).

Reviewed-by: thartmann, chagedorn, neliasso
2020-09-25 06:53:48 +00:00
Anthony Scarpino
0b83fc0150 8235710: Remove the legacy elliptic curves
Reviewed-by: xuelei, erikj
2020-09-25 02:40:36 +00:00
Sergey Bylokhov
8239b67d4f 8253322: Update the specification in the newly added constructors
Reviewed-by: psadhukhan, prr
2020-09-24 22:48:28 +00:00
Erik Joelsson
24a424891c 8253615: Change to Visual Studio 2019 16.7.2 for building on Windows at Oracle
Reviewed-by: mikael
2020-09-24 22:29:25 +00:00
Ioi Lam
8b85c3a6d7 8251261: CDS dumping should not clear states in live classes
Reviewed-by: minqi, ccheung
2020-09-24 19:19:53 +00:00
Igor Ignatyev
9ac162e896 8251999: remove usage of PropertyResolvingWrapper in vmTestbase/nsk/aod
Reviewed-by: shade, sspitsyn
2020-09-24 16:32:05 +00:00
Prasanta Sadhukhan
527a30930e 8252722: More Swing plaf APIs that rely on default constructors
Reviewed-by: prr
2020-09-24 16:19:20 +00:00
Conor Cleary
3495c19d1a 8250855: Address reliance on default constructors in the Java 2D APIs
Reviewed-by: prr, serb
2020-09-24 16:07:24 +00:00
Conor Cleary
a9d04408b3 8250859: Address reliance on default constructors in the Accessibility APIs
Reviewed-by: prr
2020-09-24 16:06:37 +00:00
Yumin Qi
89c5e49ba2 8253500: [REDO] JDK-8253208 Move CDS related code to a separate class
Reviewed-by: mchung, iklam
2020-09-24 15:28:10 +00:00
Coleen Phillimore
bf442c5b9e 8253539: Remove unused JavaThread functions for set_last_Java_fp/pc
Reviewed-by: rehn, dholmes
2020-09-24 10:45:37 +00:00
Aleksey Shipilev
dd2c456eb8 8253583: java/util/StringJoiner tests failing on 32-bit VMs after JDK-8246697
Reviewed-by: alanb, tschatzl
2020-09-24 10:38:12 +00:00
Roland Westrelin
b1e2f026d9 8253524: C2: Refactor code that clones predicates during loop unswitching
Reviewed-by: chagedorn, kvn, thartmann
2020-09-24 10:00:33 +00:00
Aleksey Shipilev
c303fd5de9 8253581: runtime/stringtable/StringTableCleaningTest.java fails on 32-bit platforms
Reviewed-by: kbarrett, tschatzl
2020-09-24 09:19:40 +00:00
Roberto Castaneda Lozano
f3ea0d362f 8252583: Clean up unused phi-to-copy degradation mechanism
Remove unused notion of 'PhiNode-to-copy degradation', where PhiNodes can be
degraded to copies by setting their RegionNode to NULL. Remove corresponding
PhiNode::is_copy() test, which always returned NULL (false). Assert that
PhiNodes have an associated RegionNode in PhiNode::Ideal().

Reviewed-by: thartmann, kvn
2020-09-24 08:10:56 +00:00
Lutz Schmidt
4440bda325 8219586: CodeHeap State Analytics processes dead nmethods
Reviewed-by: thartmann, eosterlund
2020-09-24 07:48:48 +00:00
Kim Barrett
154b8cfcfd 8253014: OopStorage bulk release logs entries multiple times
Remove excess logging.

Reviewed-by: shade, tschatzl
2020-09-24 07:07:47 +00:00
Joshua Zhu
ba174af344 8253048: AArch64: When CallLeaf, no need to preserve callee-saved registers in caller
Reviewed-by: adinn, aph
2020-09-24 00:55:27 +00:00
Alex Menkov
3320fc0f52 8253372: [TESTBUG] update tests which require jvmti - hotspot
Reviewed-by: sspitsyn, iklam
2020-09-23 21:11:31 +00:00
Jonathan Gibbons
f765a7f513 8252712: move doclint to jdk.javadoc module
Reviewed-by: hannesw
2020-09-23 19:55:08 +00:00
Aleksey Shipilev
c21690b518 8253464: ARM32 Zero: atomic_copy64 is incorrect, breaking volatile stores
Reviewed-by: aph
2020-09-23 16:53:10 +00:00
Lutz Schmidt
0bc01da702 8250635: MethodArityHistogram should use Compile_lock in favour of fancy checks
Reviewed-by: mdoerr, thartmann
2020-09-23 15:37:57 +00:00
Lance Andersen
812b39f574 8252739: Deflater.setDictionary(byte[], int off, int len) ignores the starting offset for the dictionary
Reviewed-by: uschindler, alanb
2020-09-23 14:21:45 +00:00
Claes Redestad
5f1d6120a5 8253397: Ensure LogTag types are sorted
Reviewed-by: dholmes, kbarrett, tschatzl
2020-09-23 14:14:52 +00:00
Coleen Phillimore
b8ea80af33 8253457: Remove unimplemented register stack functions
Reviewed-by: iklam, dholmes, shade
2020-09-23 11:29:58 +00:00
Stefan Karlsson
e4d0e5af4d 8253516: ZGC: Remove card table functions
Reviewed-by: tschatzl, eosterlund
2020-09-23 08:26:10 +00:00
Roland Westrelin
3fe5886baf 8252696: Loop unswitching may cause out of bound array load to be executed
Reviewed-by: neliasso, chagedorn
2020-09-23 07:34:56 +00:00
Richard Reingruber
226faa5503 8253241: Update comment on java_suspend_self_with_safepoint_check()
Reviewed-by: dcubed, dholmes
2020-09-23 07:17:30 +00:00
Aleksey Shipilev
bd6797543f 8253349: Remove unimplemented SharedRuntime::native_method_throw_unsupported_operation_exception_entry
Reviewed-by: adityam, dholmes
2020-09-23 06:36:35 +00:00
Naoto Sato
bddb82255c 8253240: No javadoc for DecimalFormatSymbols.hashCode()
Reviewed-by: rriggs, lancea
2020-09-22 22:59:07 +00:00
Ioi Lam
c68a31ddce 8253499: Problem list runtime/cds/DeterministicDump.java
Reviewed-by: dcubed
2020-09-22 22:20:46 +00:00
Phil Race
93a2018d1e 8252195: AWT Accessibility API nested classes rely on default constructors
Reviewed-by: serb
2020-09-22 22:14:51 +00:00
Xin Liu
426c9049ce 8253392: remove PhaseCCP_DCE declaration
remove the deprecated declaration PhaseCCP_DCE

Reviewed-by: neliasso, phh
2020-09-22 20:24:05 +00:00
Ioi Lam
65af837391 8253496: [BACKOUT] JDK-8253208 Move CDS related code to a separate class
Reviewed-by: eosterlund, dcubed
2020-09-22 20:15:01 +00:00
Zhengyu Gu
581f0f2643 8253493: Shenandoah: Remove ShenandoahSerialRoot definition
Reviewed-by: rkennke
2020-09-22 19:41:56 +00:00
Yumin Qi
7b860120e1 8253492: Miss comma after second copyright year in FDBigInteger.java
Reviewed-by: ccheung
2020-09-22 18:18:58 +00:00
Doug Simon
0f26ab16dd 8252518: cache result of CompilerToVM.getComponentType
Reviewed-by: kvn, never
2020-09-22 16:55:04 +00:00
Yumin Qi
c1df13b855 8253208: Move CDS related code to a separate class
Reviewed-by: mchung, iklam
2020-09-22 16:12:05 +00:00
Vladimir Kozlov
24e12b3811 8247251: Assert (_pcs_length == 0 || last_pc()->pc_offset() < pc_offs…
Co-authored-by: Tom Rodriguez <never@openjdk.org>
Reviewed-by: never
2020-09-22 15:41:12 +00:00
Zhengyu Gu
3d5fea1f07 8253434: Shenandoah: Cleanup ShenandoahRootScanner
Reviewed-by: rkennke
2020-09-22 14:03:25 +00:00
Zhengyu Gu
8c02bdbf13 8252921: NMT overwrite memory type for region assert when building dynamic archive
Reviewed-by: minqi, iklam, dholmes
2020-09-22 11:58:03 +00:00
Roman Kennke
0c287de4f6 8253421: Initialize JFR trace-IDs with zero
Reviewed-by: mgronlun, egahlin
2020-09-22 10:53:00 +00:00
skodanda
aa3862403b 8248352: [TEST_BUG] Test test/jdk/java/awt/font/TextLayout/ArabicDiacriticTest.java can leave frame open
Reviewed-by: prr, serb, aivanov
2020-09-22 09:59:10 +00:00
Patrick Concannon
ae20dd6b9b 8251496: Fix doclint warnings in jdk.net.httpserver
Reviewed-by: dfuchs, rriggs, chegar
2020-09-22 08:56:15 +00:00
Aleksey Shipilev
b9729cb432 8253284: Zero OrderAccess barrier mappings are incorrect
Reviewed-by: dholmes, aph, andrew
2020-09-22 08:33:42 +00:00
Ioi Lam
284bbf02dd 8253079: DeterministicDump.java fails due to garbage in structure padding
Reviewed-by: minqi, jiefu, shade
2020-09-22 08:04:26 +00:00
Aleksey Shipilev
a4affd5b04 8253412: Unsupported GC options passed in JAVA_TOOL_OPTIONS are silently ignored
Reviewed-by: pliden
2020-09-22 07:58:45 +00:00
Monica Beckwith
96f722cf63 8252114: Windows-AArch64: Enable and test ZGC and ShenandoahGC
Reviewed-by: shade, stefank, rkennke
2020-09-22 07:09:48 +00:00
Jamsheed Mohammed C M
f7b1ce457a 8253447: Remove buggy code introduced by 8249451
Reviewed-by: iveresov, eosterlund
2020-09-22 06:26:32 +00:00
Ioi Lam
282b9dcfdc 8081833: Clean up JVMFlag getter/setter code
Reviewed-by: gziemski, coleenp
2020-09-22 06:04:31 +00:00
Kim Barrett
0e98fc1ccd 8253237: [REDO] Improve large object handling during evacuation
8253238: [REDO] Improve object array chunking test in G1's copy_to_survivor_space
8253236: [REDO] Investigate fast-path for scanning only objects with references during gc

Generate multiple partial array tasks for large objArrays.

Reviewed-by: sjohanss, ayang, tschatzl
2020-09-22 05:14:06 +00:00
Alex Menkov
d1f9b8a8b5 8234808: jdb quoted option parsing broken
Reviewed-by: cjplummer, sspitsyn
2020-09-22 00:05:14 +00:00
Daniel D. Daugherty
d8921ed573 8247281: migrate ObjectMonitor::_object to OopStorage
Co-authored-by: Erik Österlund <erik.osterlund@oracle.com>
Co-authored-by: Daniel Daugherty <daniel.daugherty@oracle.com>
Reviewed-by: eosterlund, coleenp, dholmes, stefank, kbarrett, rkennke, sspitsyn
2020-09-21 22:12:07 +00:00
Daniil Titov
f800af978c 8241390: 'Deadlock' with VM_RedefineClasses::lock_classes()
Reviewed-by: coleenp, sspitsyn
2020-09-21 19:32:24 +00:00
Kim Barrett
2e30ff61b0 8253311: Cleanup relocInfo constructors
Reviewed-by: kvn, thartmann
2020-09-21 14:50:11 +00:00
Andy Herrick
43be5a3cb6 8230652: Improve verbose output
Reviewed-by: almatvee, asemenyuk, kizune
2020-09-21 13:08:19 +00:00
Stefan Karlsson
5a7390b62a 8253418: ZGC: Use pd_ prefix to denote platform dependent code
Reviewed-by: pliden, eosterlund
2020-09-21 13:04:10 +00:00
Stefan Karlsson
7e49eaecbc 8253407: Move max_pow2 from test to src
Reviewed-by: kbarrett, tschatzl
2020-09-21 13:02:04 +00:00
Stefan Karlsson
fbfb62dffe 8253332: ZGC: Make heap views reservation platform independent
Reviewed-by: shade, pliden
2020-09-21 12:48:18 +00:00
Naoto Sato
dad6edbf83 8253321: java.util.Locale.LanguageRange#equals is inconsistent after calling hashCode
Reviewed-by: joehw, rriggs
2020-09-21 12:33:00 +00:00
Stefan Johansson
edc14f92d9 8253286: Use expand_exact() instead of expand_at() for fixed requests in G1
Reviewed-by: tschatzl, ayang
2020-09-21 12:02:33 +00:00
Thomas Schatzl
bba948f0ff 8253411: [BACKOUT] [REDO] G1 incorrectly limiting young gen size when using the reserve can result in repeated full gcs
Reviewed-by: kbarrett, sjohanss
2020-09-21 11:29:41 +00:00
Thomas Schatzl
955c2e6292 8253303: G1: Move static initialization of G1FromCardCache to a proper location
Reviewed-by: ayang, sjohanss
2020-09-21 11:28:24 +00:00
Lin Zang
34ec1bedd1 8252104: parallel heap inspection for ShenandoahHeap
Reviewed-by: shade, zgu
2020-09-21 07:50:52 +00:00
Junyuan Zheng
fdce055a9b 8253253: Binutils tar ball extension update to gz
Reviewed-by: erikj
2020-09-21 05:57:00 +00:00
Aleksey Shipilev
388c8f2538 8253348: Remove unimplemented JNIHandles::initialize
Reviewed-by: zgu
2020-09-21 05:00:07 +00:00
Kim Barrett
bca9e55b1e 8253167: ARM32 builds fail after JDK-8247910
8213483: ARM32: runtime/ErrorHandling/ShowRegistersOnAssertTest.java jtreg test fail

Removed platform-dependent definitions of BREAKPOINT as asm(breakpoint instruction).

Reviewed-by: coleenp, mikael, bulasevich
2020-09-21 00:31:26 +00:00
Phil Race
cc7521c452 8252199: Reimplement support of Type 1 fonts without MappedByteBuffer
Reviewed-by: serb, jdv
2020-09-20 16:17:30 +00:00
Sergey Bylokhov
3d88d387c3 8252070: Some platform-specific BLIT optimizations are not effective
Reviewed-by: prr, jdv
2020-09-20 04:33:27 +00:00
Sergey Bylokhov
83b05373a1 8253291: bug7072653.java still failed "Popup window height ... is wrong"
Reviewed-by: prr
2020-09-19 22:22:43 +00:00
Phil Race
d27835b34e 8249142: java/awt/FontClass/CreateFont/DeleteFont.sh is unstable
Reviewed-by: serb
2020-09-19 17:36:12 +00:00
Vladimir Kozlov
1438ce097f 8252188: Crash in OrINode::Ideal(PhaseGVN*, bool)+0x8b9
Reviewed-by: vlivanov, thartmann, jbhateja
2020-09-19 16:06:35 +00:00
Boris Ulasevich
224a30f12c 8252311: AArch64: save two words in itable lookup stub
Reviewed-by: adinn, aph
2020-09-19 07:47:37 +00:00
Sergey Bylokhov
22f7af7fcf 8253317: The "com/apple/eawt" is missed in the "othervm.dirs" config option
Reviewed-by: shade
2020-09-19 02:22:26 +00:00
Sergey Tsypanov
f55dd9d40e 8251548: Remove unnecessary explicit initialization of volatile variables in security-libs code
Reviewed-by: mullan
2020-09-18 21:26:59 +00:00
Zhengyu Gu
d35b117956 8253361: Shenandoah: runtime barrier does not honor ShenandoahSelfFixing flag
Reviewed-by: rkennke
2020-09-18 20:15:42 +00:00
Kim Barrett
f37c34d32e 8253270: Limit fastdebug inlining in G1 evacuation
Reviewed-by: tschatzl, sjohanss, ayang
2020-09-18 19:29:18 +00:00
Naoto Sato
89044200cd 8253153: Mentioning of "hour-of-minute" in java.time.temporal.TemporalField JavaDoc
Reviewed-by: joehw, lancea, rriggs
2020-09-18 15:40:37 +00:00
Matthias Baesken
52c28b8692 8253239: Disable VS warning C4307
Reviewed-by: mdoerr, erikj
2020-09-18 14:06:29 +00:00
Aleksey Shipilev
05572e8651 8253350: Remove unimplemented SharedRuntime::clean_*_entry
Reviewed-by: zgu, coleenp
2020-09-18 13:30:48 +00:00
Aleksey Shipilev
43019a0e6b 8253345: Remove unimplemented Arguments::lookup_logging_aliases
Reviewed-by: tschatzl
2020-09-18 13:26:43 +00:00
Aleksey Shipilev
6e9efffced 8253344: Remove unimplemented Arguments::check_gc_consistency
Reviewed-by: tschatzl, coleenp
2020-09-18 13:25:03 +00:00
Pavel Rappo
83b2411fd1 8253342: Fix typos in String.transform
Reviewed-by: jlaskey
2020-09-18 10:45:28 +00:00
Ivan Walulya
86a16400bd 8244505: G1 pause time ratio calculation does not consider Remark/Cleanup pauses
Reviewed-by: tschatzl, sjohanss
2020-09-18 09:35:34 +00:00
Aleksey Shipilev
11c4ea963c 8253278: Refactor/cleanup oopDesc::*_klass_addr
Reviewed-by: coleenp, stefank
2020-09-18 08:22:54 +00:00
Jamsheed Mohammed C M
73c9088b81 8249451: Unconditional exceptions clearing logic in compiler code should honor Async Exceptions.
Reviewed-by: dholmes, iveresov
2020-09-18 05:48:14 +00:00
Prasanta Sadhukhan
3ef2efb1f4 8252721: Nested classes in Swing APIs rely on default constructors
Reviewed-by: prr
2020-09-18 03:57:08 +00:00
Sergey Bylokhov
fd380d75b0 8253274: The CycleDMImagetest brokes the system
Reviewed-by: prr
2020-09-18 01:33:03 +00:00
Ioi Lam
2c3a37c6d7 8253314: precompiled.hpp missing from vmIntrinsics.cpp
Reviewed-by: mikael
2020-09-17 22:39:40 +00:00
Chris Plummer
d4269fd520 8253028: SA core file tests still time out on OSX with "java.io.IOException: App waiting timeout"
Reviewed-by: amenkov
2020-09-17 22:17:36 +00:00
Ioi Lam
6c3e483b56 8253313: xmlstream.hpp missing from vmIntrinsics.cpp
Reviewed-by: mikael
2020-09-17 21:49:53 +00:00
Ioi Lam
0a1dc50f54 8253271: vm_version_x86.hpp should not include globals_extension.hpp
Reviewed-by: dholmes
2020-09-17 21:32:22 +00:00
John Tortugo
1e39649907 8243066: Move VM_INTRINSICS_DO into its own vmIntrinsics.hpp file
Reviewed-by: iklam, vlivanov
2020-09-17 21:20:20 +00:00
Yumin Qi
12dfe1c9b6 8253262: Allocate in DumpRegion is not thread safe
Reviewed-by: ccheung
2020-09-17 16:56:37 +00:00
Thomas Schatzl
3570f5a924 8252041: G1: Fix incorrect uses of HeapRegionManager::max_length
Reviewed-by: sjohanss, kbarrett
2020-09-17 15:40:54 +00:00
Andrew Leonard
24765e4559 8253285: Some java/util/StringJoiner tests do not explicitly specify required -XX:+CompactStrings
Reviewed-by: rriggs, jlaskey
2020-09-17 14:43:51 +00:00
Galder Zamarreño
81e2cf82d9 8251397: NPE on ClassValue.ClassValueMap.cacheArray
Add release fence to ClassValueMap constructor.

* Release fence guarantees that cacheArray field will published
with a non-null value.
* Without this fix, CacheValueMap.cacheArray can sometimes be
seen as null.

Reviewed-by: shade, psandoz
2020-09-17 13:42:15 +00:00
David M. Lloyd
cca3a26e43 8252996: Thread safety problem in java.net.ProxySelector
Reviewed-by: alanb
2020-09-17 13:40:29 +00:00
Richard Reingruber
a4c6a99e61 8252593: [TESTBUG] serviceability/jvmti/GetLocalVariable/GetLocalWithoutSuspendTest.java failed with JVMTI_ERROR_INVALID_SLOT
Reviewed-by: sspitsyn, cjplummer
2020-09-17 13:08:43 +00:00
Ekaterina Vergizova
a67f890fc6 8253050: jfr disassemble command processes --max-chunks incorrectly
Reviewed-by: egahlin
2020-09-17 13:03:26 +00:00
Per Lidén
f972155d63 8252196: ZGC: TestUncommit.java fails due to "Exception: Uncommitted too fast" again(2)
Reviewed-by: stefank, eosterlund
2020-09-17 10:05:43 +00:00
Aleksey Shipilev
a9993f9464 8253275: Remove unused methods after CMS removal
Reviewed-by: pliden, tschatzl
2020-09-17 10:01:34 +00:00
Ivan Walulya
4ac6934965 8253232: G1Analytics::compute_pause_time_ratios() uses wrong pause times in calculation
Reviewed-by: tschatzl, kbarrett
2020-09-17 07:58:30 +00:00
Rafael Winterhalter
53a4ef2670 8202473: A type variable with multiple bounds does not correctly place type annotation
Reviewed-by: jfranck
2020-09-17 07:26:49 +00:00
Jayathirth D V
b87a159967 8252100: NumberOverflow in class MemoryCache
Reviewed-by: prr, serb
2020-09-17 04:31:11 +00:00
Ioi Lam
9a7dcdcdba 8253261: Disable CDS full module graph until JDK-8253081 is fixed
Reviewed-by: ccheung
2020-09-16 22:43:32 +00:00
Sergey Bylokhov
1c84cfa236 8253130: bug7072653.java failed "Popup window height ... is wrong"
Reviewed-by: psadhukhan
2020-09-16 20:23:04 +00:00
Harold Seigel
ce93cbce77 8253125: vmTestbase/nsk/stress/stack/stack017.java timed out
Reviewed-by: dcubed
2020-09-16 18:58:06 +00:00
Zhengyu Gu
d250f9e08c 8253244: Shenandoah: cleanup includes in Shenandoah root processor files
Reviewed-by: shade
2020-09-16 17:19:28 +00:00
Igor Ignatyev
d38c97dd52 8253207: enable problemlists jcheck's check
Reviewed-by: erikj
2020-09-16 17:18:27 +00:00
Jaikiran Pai
671dfba802 6714834: JarFile.getManifest() leaves an open InputStream as an undocumented side effect
Reviewed-by: lancea, alanb
2020-09-16 15:13:32 +00:00
Jaikiran Pai
e5866aa756 8244706: GZIP "OS" header flag hard-coded to 0 instead of 255 (RFC 1952 non-compliance)
Reviewed-by: lancea, bchristi
2020-09-16 15:10:57 +00:00
Kevin Rushforth
10867134fd 8253206: Enforce whitespace checking for additional source files
Reviewed-by: prr, erikj, jdv
2020-09-16 14:02:22 +00:00
Stefan Karlsson
e2196f8882 8253162: Make frame::oops_do const
Reviewed-by: kbarrett, coleenp, pliden
2020-09-16 12:21:39 +00:00
Aleksey Shipilev
300b8517c3 8253226: Shenandoah: remove unimplemented ShenandoahStrDedupQueue::verify
Reviewed-by: rkennke, zgu
2020-09-16 12:17:22 +00:00
Aleksey Shipilev
c781594bfe 8253224: Shenandoah: ShenandoahStrDedupQueue destructor calls virtual num_queues()
Reviewed-by: rkennke, zgu
2020-09-16 12:16:51 +00:00
Stefan Karlsson
33f8e7022c 8253173: Print heap before and after GC lacks a newline
Reviewed-by: tschatzl, pliden, rkennke, sjohanss
2020-09-16 11:53:58 +00:00
Aleksey Shipilev
f509eb069d 8253219: Epsilon: clean up unnecessary includes
Reviewed-by: tschatzl, kbarrett
2020-09-16 11:17:51 +00:00
Aleksey Shipilev
7f9b5d9e32 8253220: Epsilon: clean up unused code/declarations
Reviewed-by: tschatzl
2020-09-16 11:15:40 +00:00
Julia Boes
e0cf023263 8245309: Re-examine use of ThreadLocalCoders in sun.net.www.ParseUtil
Reviewed-by: shade, dfuchs, alanb, chegar
2020-09-16 10:49:13 +00:00
Prasanta Sadhukhan
60c4902f61 8253016: Box.Filler components should be unfocusable by default
Reviewed-by: prr, serb
2020-09-16 09:47:13 +00:00
Aleksey Shipilev
dd43533165 8253222: Shenandoah: unused AlwaysTrueClosure after JDK-8246591
Reviewed-by: rkennke
2020-09-16 09:25:58 +00:00
Roberto Castaneda Lozano
efe3540d8f 8252966: CI: Remove KILL_COMPILE_ON_FATAL_ and KILL_COMPILE_ON_ANY macros
Remove the KILL_COMPILE_ON_FATAL_ and KILL_COMPILE_ON_ANY macros, replacing uses
of KILL_COMPILE_ON_FATAL_ with CHECK_AND_CLEAR_. Unlike KILL_COMPILE_ON_FATAL_,
CHECK_AND_CLEAR_ ignores ThreadDeath exceptions, which compiler threads should
not receive anyway.

Reviewed-by: vlivanov, neliasso
2020-09-16 06:47:45 +00:00
Cesar
fbf4699d23 8253040: Remove unused Matcher::regnum_to_fpu_offset()
Reviewed-by: adityam, vlivanov
2020-09-16 06:41:37 +00:00
Aleksey Shipilev
7c564e13ee 8253146: C2: Purge unused MachCallNode::_arg_size field
Reviewed-by: thartmann, adityam
2020-09-16 06:38:53 +00:00
Cesar
2caa20a76d 8250668: Clean up method_oop names in adlc
Reviewed-by: coleenp, adityam, thartmann
2020-09-16 05:54:16 +00:00
Naoto Sato
57f92d23b1 8220483: Calendar.setTime(Date date) throws NPE with Date date = null
Reviewed-by: lancea, joehw
2020-09-15 22:14:14 +00:00
Sergey Bylokhov
65bfe0928a 8253147: The javax/swing/JPopupMenu/7154841/bug7154841.java fail on big screens
Reviewed-by: prr
2020-09-15 21:32:56 +00:00
Joe Darcy
fc36328d4f 8253034: Update symbol generation to accomodate Git as the SCM
Reviewed-by: erikj, adityam
2020-09-15 20:41:43 +00:00
Valerie Peng
40206822f4 8172366: Support SHA-3 based signatures
Enhance default JDK providers including SUN, SunRsaSign, and SunEC, with signatures using SHA-3 family of digests.

Reviewed-by: xuelei
2020-09-15 20:28:48 +00:00
Thomas Schatzl
46598c8644 8253177: outputStream not declared in markWord.hpp
Reviewed-by: iklam
2020-09-15 18:59:16 +00:00
Joe Wang
5191f3159a 8251495: Remove the implNote in the DOM package description added by JDK-8249643
Remove the implNote from the package description added by JDK-8249643.

Reviewed-by: lancea, smarks, naoto, alanb
2020-09-15 16:39:48 +00:00
Daniil Titov
65d6c10185 8252933: com.sun.tools.jdi.ObjectReferenceImpl#validateAssignment always requests referenceType
Reviewed-by: cjplummer, amenkov
2020-09-15 15:29:12 +00:00
Kim Barrett
74851c507b 8253169: [BACKOUT] Improve large object handling during evacuation
Revert "8027545: Improve object array chunking test in G1's copy_to_survivor_space"
Revert "8158045: Improve large object handling during evacuation"
Revert "8027761: Investigate fast-path for scanning only objects with references during gc"

Reviewed-by: tschatzl, sjohanss
2020-09-15 14:33:04 +00:00
Christoph Langer
b5620a36f4 8253155: Minor cleanups and Javadoc fixes for LdapDnsProvider of java.naming
Reviewed-by: dfuchs, aefimov, alanb, vtewari
2020-09-15 13:50:37 +00:00
Jorn Vernee
d219d8b987 8253002: Remove the unused SafePointNode::_oop_map field
Reviewed-by: thartmann
2020-09-15 12:21:45 +00:00
Kim Barrett
dafcf1056f 8027545: Improve object array chunking test in G1's copy_to_survivor_space
8158045: Improve large object handling during evacuation
8027761: Investigate fast-path for scanning only objects with references during gc

Generate multiple partial array tasks for large objArrays.

Reviewed-by: sjohanss, ayang, tschatzl
2020-09-15 12:18:24 +00:00
Kim Barrett
7eb4d4aa01 8247909: Improve PrimitiveConversions::cast using C++14
Reimpliment PrimitiveConversions::cast, with some cases now constexpr.
<!-- Anything below this marker will be automatically updated, please do not edit manually! -->
---------
### Progress
- [x] Change must not contain extraneous whitespace
- [x] Commit message must refer to an issue
- [ ] Change must be properly reviewed

### Issue
* [JDK-8247909](https://bugs.openjdk.java.net/browse/JDK-8247909): Improve PrimitiveConversions::cast using C++14


### Download
`$ git fetch https://git.openjdk.java.net/jdk pull/143/head:pull/143`
`$ git checkout pull/143`

Reviewed-by: dholmes, stefank
2020-09-15 10:52:50 +00:00
Thomas Schatzl
fa30241ddb 8249676: [REDO] G1 incorrectly limiting young gen size when using the reserve can result in repeated full gcs
Reviewed-by: sjohanss, kbarrett
2020-09-15 10:19:36 +00:00
Kim Barrett
9ea43a9213 8253148: Fix terminology in align_down comment
Change lognot => logical_not in comment

Reviewed-by: shade
2020-09-15 07:07:58 +00:00
Aleksey Shipilev
3f455f09dc 8253089: Windows (MSVC 2017) build fails after JDK-8243208
Reviewed-by: mdoerr, goetz, iklam
2020-09-15 05:14:06 +00:00
Kim Barrett
af8c678038 8247910: Improve alignment and power-of-2 utilities using C++14
8238956: Replace powerOfTwo::max_value with std::numeric_limits

Reviewed-by: tschatzl, stefank
2020-09-15 04:34:49 +00:00
Ioi Lam
70cc7fc198 8253098: Archived full module graph should be disabled if CDS heap cannot be mapped
Reviewed-by: ccheung, dholmes
2020-09-15 02:37:19 +00:00
Alexander Matveev
ac9d1b08ee 8223187: Remove setLocale() call in jpackage native launcher
Reviewed-by: kcr, herrick, naoto
2020-09-14 20:41:50 +00:00
Martin Doerr
9c24a5635e 8253029: [PPC64] Remove obsolete Power6 code
Reviewed-by: dholmes, lucy
2020-09-14 17:34:08 +00:00
Pavel Rappo
e6a493ab88 8252882: Clean up jdk.javadoc and the related parts of jdk.compiler
Reviewed-by: vromero
2020-09-14 17:21:42 +00:00
Jan Lahoda
68da63dcde 8240658: Code completion not working for lambdas in method invocations that require type inference
Reviewed-by: vromero
2020-09-14 08:13:10 +00:00
Doug Simon
b05290aaea 8252898: remove bulk registration of JFR CompilerPhaseType names
Reviewed-by: kvn, jcm
2020-09-14 07:48:59 +00:00
Jie Fu
779d2c34ae 8253084: Zero VM is broken after JDK-8252689
Reviewed-by: iklam, dholmes
2020-09-14 07:21:04 +00:00
Per Lidén
07da3a1808 8253030: ZGC: Change ZMarkCompleteTimeout unit to microseconds
Reviewed-by: kbarrett, stefank, eosterlund
2020-09-14 07:06:20 +00:00
Yumin Qi
f978f6fe8a 8252689: Classes are loaded from jrt:/java.base even when CDS is used
Reviewed-by: iklam, ccheung
2020-09-14 03:39:13 +00:00
Ioi Lam
c5e63b639e 8248186: Move CDS C++ vtable code to cppVtables.cpp
Reviewed-by: coleenp
2020-09-13 19:20:45 +00:00
Ioi Lam
03a4df0acd 8244778: Archive full module graph in CDS
Reviewed-by: erikj, coleenp, lfoltan, redestad, alanb, mchung
2020-09-13 14:45:12 +00:00
Doug Simon
998ce78e53 8252543: [JVMCI] Libgraal can deadlock in blocking compilation mode
Reviewed-by: kvn
2020-09-12 05:26:16 +00:00
Stuart Marks
b1b0f0b2cc 8253066: typo in Stream.mapMulti
Reviewed-by: darcy, lancea
2020-09-11 23:11:10 +00:00
Leonid Mesnik
306b166336 8253033: CheckUnhandledOops check fails in ThreadSnapshot::initialize…
Reviewed-by: coleenp, dholmes
2020-09-11 23:03:38 +00:00
Igor Ignatyev
5c0d985abf 8253060: remove test/hotspot/jtreg/test_env.sh
Reviewed-by: dcubed
2020-09-11 17:22:47 +00:00
Kevin Rushforth
952518640a 8253031: git jcheck complains about invalid tags in jdk repo after fix for JDK-8252844
Reviewed-by: ehelin, erikj
2020-09-11 15:17:51 +00:00
Jonathan Gibbons
7f27d0b013 8236142: DocTrees should provide getCharacters(EntityTree)
Reviewed-by: prappo
2020-09-11 14:47:15 +00:00
Daniel D. Daugherty
e7a1b9bf81 8252981: ObjectMonitor::object() cleanup changes extracted from JDK-8247281
Co-authored-by: Erik Österlund <erik.osterlund@oracle.com>
Co-authored-by: Daniel Daugherty <daniel.daugherty@oracle.com>
Reviewed-by: rehn, coleenp, eosterlund
2020-09-11 13:35:34 +00:00
Roberto Castaneda Lozano
040c8f58e5 8250914: Matcher::stack_direction() is unused
Remove unused Matcher::stack_direction() together with related ADL entries and
ADLC support.

Reviewed-by: vlivanov, thartmann
2020-09-11 11:57:46 +00:00
Roberto Castaneda Lozano
9687dcabb6 8252494: C2: TypeAryPtr::cast_to_autobox_cache does not use ptr_type
Remove dead definition of ptr_type in TypeAryPtr::cast_to_autobox_cache. Also remove
unnecessary cache parameter (always true) for simplicity.

Reviewed-by: shade, vlivanov, thartmann
2020-09-11 11:55:30 +00:00
Robbin Ehn
8777ded123 8253008: Remove develop flags TraceLongCompiles/LongCompileThreshold
Reviewed-by: shade, dholmes, adityam
2020-09-11 07:23:31 +00:00
Robbin Ehn
c7062dc22b 8253026: Remove dummy call to gc alot from VM Thread
Reviewed-by: coleenp, dholmes
2020-09-11 07:07:22 +00:00
Ioi Lam
5144190ea0 8243208: Clean up JVMFlag implementation
Reviewed-by: dholmes, coleenp, gziemski
2020-09-11 04:05:18 +00:00
David Holmes
976acddeb5 8252406: Introduce Thread::as_Java_thread() convenience function
Reviewed-by: shade, coleenp, kbarrett, dcubed
2020-09-11 01:31:32 +00:00
Sergey Bylokhov
488022689f 8171303: sun/java2d/pipe/InterpolationQualityTest.java fails on Windows & Linux
Reviewed-by: prr, psadhukhan, kcr
2020-09-10 21:47:05 +00:00
Sergey Bylokhov
8da6c8d6aa 7183828: Invalid Image Variant when using anything other than BufferedImage
Reviewed-by: prr
2020-09-10 21:26:10 +00:00
Sergey Bylokhov
ff21696bc0 8252817: Cleanup the classes in the java.awt.color package
Reviewed-by: jdv, pbansal
2020-09-10 19:26:39 +00:00
Mandy Chung
44a74dac95 8252919: JDK built with --enable-cds=no fails with NoClassDefFoundError
Reviewed-by: minqi, sundar, alanb, redestad
2020-09-10 16:04:58 +00:00
Roger Riggs
418e4a259c 8252830: Correct missing javadoc comments in java.rmi module
Reviewed-by: dfuchs, lancea, smarks, chegar
2020-09-10 14:38:04 +00:00
Igor Ignatyev
41d29b752b 8252774: remove jdk.test.lib.FileInstaller action from graalunit tests
Reviewed-by: shade, epavlova
2020-09-10 13:25:29 +00:00
Igor Ignatyev
5b30a83133 8252778: remove jdk.test.lib.FileInstaller action from compiler/c2/stemmer test
Reviewed-by: shade, epavlova
2020-09-10 13:23:01 +00:00
Thomas Schatzl
8db333531f 8247928: Refactor G1ConcurrentMarkThread for mark abort
Reviewed-by: sjohanss, kbarrett
2020-09-10 11:06:39 +00:00
Goetz Lindenmaier
7ccf435825 8252846: Fix ppc/s390 after "8231441: AArch64: Initial SVE backend su…
Reviewed-by: shade
2020-09-10 09:16:23 +00:00
Kim Barrett
d236cf4bec 8252995: Non-PCH builds broken by JDK-8250961
Reviewed-by: sjohanss, stefank
2020-09-10 08:48:50 +00:00
Aditya Mandaleeka
6a005343b4 8250961: Move Universe::update_heap_info_at_gc to CollectedHeap
Reviewed-by: stefank, kbarrett
2020-09-10 07:09:19 +00:00
Tobias Hartmann
f78f780570 8252889: Obsolete -XX:+InsertMemBarAfterArraycopy
Reviewed-by: shade, adityam
2020-09-10 05:41:51 +00:00
Daniel D. Daugherty
f9339616e1 8252980: comment only changes extracted from JDK-8247281
Reviewed-by: iklam, dholmes
2020-09-09 23:35:17 +00:00
Vicente Romero
433394203d 8250217: com.sun.tools.javac.api.JavacTaskImpl swallows compiler exceptions potentially producing false positive test results
Reviewed-by: jlahoda
2020-09-09 14:05:00 +00:00
Severin Gehwolf
5166094647 8252957: Wrong comment in CgroupV1Subsystem::cpu_quota
The comment is wrong. The 'us' in 'cpu.cfs_quota_us' stands for
microseconds, which is read verbatim. Similarly for cgroups v2
all units in 'cpu.max' are in microseconds.

Reviewed-by: shade, hseigel
2020-09-09 13:53:10 +00:00
Prasanta Sadhukhan
6329de4504 8248532: Every time I change keyboard language at my MacBook, Java crashes
Reviewed-by: serb, prr
2020-09-09 13:43:06 +00:00
Robbin Ehn
d56096471b 8252794: Creation of JNIMethodBlock should be done with a leaf lock
Reviewed-by: coleenp, dholmes
2020-09-09 13:21:01 +00:00
Jan Lahoda
5fef8ddaff 8235229: Compilation against a modular, multi-release JAR erroneous with --release
Reviewed-by: vromero
2020-09-09 13:03:00 +00:00
Aleksey Shipilev
382b8fedf5 8240751: Shenandoah: fold ShenandoahTracer definition
Reviewed-by: adityam, zgu
2020-09-09 12:10:36 +00:00
Jan Lahoda
c98417ebca 8250840: some tests use --enable-preview unnecessarily
Reviewed-by: vromero
2020-09-09 07:51:43 +00:00
Tobias Hartmann
c655b703a9 8252916: Newline in object field values list of ScopeDesc should be removed
Reviewed-by: vlivanov
2020-09-09 05:57:41 +00:00
Stuart Marks
30fa8d5d34 8157729: examples in LinkedHashMap and LinkedHashSet class doc use raw types
Reviewed-by: darcy, naoto, lancea
2020-09-09 00:43:48 +00:00
Christoph Göttschkes
26c7218ab9 8252773: [TESTBUG] serviceability/jvmti/GetObjectSizeOverflow fails due to OOM conditions
Reviewed-by: cjplummer, lmesnik
2020-09-08 22:59:41 +00:00
Calvin Cheung
e20004d7c1 8249625: cleanup unused SkippedException in the tests under cds/appcds/dynamicArchive/methodHandles
Reviewed-by: iklam
2020-09-08 19:00:50 +00:00
Ivan Walulya
63a5a12949 8252658: G1: Do not consider G1HeapWastePercent during region selection within a gc
Reviewed-by: tschatzl, sjohanss
2020-09-08 18:39:56 +00:00
Ioi Lam
001e51d965 8250563: Add KVHashtable::add_if_absent
Reviewed-by: ccheung, coleenp
2020-09-08 18:27:59 +00:00
Aleksey Shipilev
91a20ca7e5 8252695: Shenandoah: clean up Graal enabled/disabled filter in tests
Reviewed-by: zgu
2020-09-08 17:42:38 +00:00
Robbin Ehn
704f784c88 8252871: fatal error: must own lock JvmtiThreadState_lock
8252816: JvmtiEnvThreadState::clear_to_frame_pop() is not used

Reviewed-by: ysuenaga, dholmes
2020-09-08 13:45:19 +00:00
Robin Westberg
bf5da0c778 8252897: Minor .jcheck/conf update
Reviewed-by: ehelin
2020-09-08 12:04:44 +00:00
Albert Mingkun Yang
76002747d5 8252859: Inconsistent use of alpha in class AbsSeq
Reviewed-by: tschatzl, sjohanss
2020-09-08 11:17:09 +00:00
Nick Gasson
4fb1980fd0 8252853: AArch64: gc/shenandoah/TestVerifyJCStress.java fails intermittently with C1
Reviewed-by: shade
2020-09-08 10:17:25 +00:00
Christoph Göttschkes
73ba3ae1f5 8252500: ZGC on aarch64: Unable to allocate heap for certain Linux kernel configurations
Reviewed-by: stefank, eosterlund, pliden
2020-09-08 09:34:40 +00:00
Jaikiran Pai
5dd1eaded7 8252767: URLConnection.setRequestProperty throws IllegalAccessError
Reviewed-by: chegar, michaelm, alanb
2020-09-08 09:10:15 +00:00
Evgeny Nikitin
2cceeedfe1 8166554: Avoid compilation blocking in OverloadCompileQueueTest.java
Reviewed-by: shade
2020-09-08 08:24:35 +00:00
Stefan Johansson
188b0bc7be 8252868: Clean up unused function from G1MMUTracker
Reviewed-by: tschatzl
2020-09-08 07:58:29 +00:00
Jie Fu
891886b622 8252887: Zero VM is broken after JDK-8252661
Zero VM is broken due to 'block_if_requested' is not a member of 'SafepointMechanism'.

Reviewed-by: dholmes
2020-09-08 02:35:51 +00:00
Sean Coffey
7686e87155 8250968: Symlinks attributes not preserved when using jarsigner on zip files
Reviewed-by: lancea, weijun, hchao
2020-09-07 19:01:07 +00:00
Severin Gehwolf
8d6d43c33b 8251193: bin/idea.sh is generating wrong folder definitions for JVMCI modules
Co-authored-by: Galder Zamarreno <galder@redhat.com>
Reviewed-by: mcimadamore
2020-09-07 16:18:45 +00:00
Filipp Zhinkin
70d5cac961 8251152: ARM32: jtreg c2 Test8202414 test crash
Some CPUs (like ARM32) does not support unaligned memory accesses. To avoid JVM crashes tests that perform such accesses should be skipped on corresponding platforms.

Reviewed-by: iignatyev, clanger
2020-09-07 15:33:27 +00:00
Erik Österlund
e0d5b5f7f2 8252627: Make it safe for JFR thread to read threadObj
Reviewed-by: dholmes, mgronlun
2020-09-07 14:33:10 +00:00
Erik Österlund
e29c3f6123 8252661: Change SafepointMechanism terminology to talk less about "blocking"
Reviewed-by: rehn, shade, dholmes
2020-09-07 13:59:24 +00:00
Robin Westberg
e0c8d4420c 8252844: Update check configuration to Skara format
Reviewed-by: ehelin
2020-09-07 08:20:40 +00:00
Christoph Langer
cc5039e19e 8252837: Cleanup SAP Copyright file headers
Reviewed-by: dholmes
2020-09-07 07:30:10 +00:00
Pankaj Bansal
55c7e769c8 8252825: Add automated test for fix done in JDK-8218479
Reviewed-by: serb, prr
2020-09-07 07:25:30 +00:00
Igor Ignatyev
5f76deb2e0 8252522: nsk/share/test/StressOptions should multiple stressTime by jtreg's timeout-factor
Reviewed-by: dholmes
2020-09-06 16:17:30 +00:00
Sergey Bylokhov
1262ae36af 8252679: Two windows specific FileDIalog tests may fail on some Windows_Server_2016_Standard
Reviewed-by: prr
2020-09-06 01:25:23 +00:00
Phil Race
d0f4366a85 8252715: Problem list java/awt/event/KeyEvent/KeyTyped/CtrlASCII.java on Linux
Reviewed-by: serb
2020-09-05 21:49:01 +00:00
Vicente Romero
4b3a0b789e 8247352: improve error messages for sealed classes and records
Reviewed-by: mcimadamore
2020-09-04 23:51:26 -04:00
Yasumasa Suenaga
3e81b3ad48 8242427: JVMTI frame pop operations should use Thread-Local Handshakes
Reviewed-by: dcubed, dholmes, pchilanomate, rehn, sspitsyn
2020-09-05 12:42:05 +09:00
Vicente Romero
5d2e79e2c3 8252307: javac rejects code with annotation applicable to fields
Reviewed-by: darcy
2020-09-04 13:44:48 -04:00
Igor Ignatyev
15af276157 8252004: remove usage of PropertyResolvingWrapper in vmTestbase/nsk/sysdict
Reviewed-by: dcubed, gziemski
2020-09-04 10:36:05 -07:00
Yumin Qi
8f36580594 8252725: Refactor jlink GenerateJLIClassesPlugin code
Cleanup code for jlink classes generation, move parsing file work to java.lang.invoke and add a new API in interface JavaLangInvokeAccess to generate holder classes, remove old APIs. The new API is used both by JLI and CDS.

Reviewed-by: mchung, sundar
2020-09-04 09:47:18 -07:00
Ningsheng Jian
9b5a9b6189 8231441: AArch64: Initial SVE backend support
Co-authored-by: Joshua Zhu <joshua.zhu@arm.com>
Co-authored-by: Yang Zhang <yang.zhang@arm.com>
Reviewed-by: adinn, pli, ihse, vlivanov, eosterlund
2020-09-02 09:45:44 +08:00
Fernando Guallini
0dadf81e14 8249694: java/lang/StringBuffer/HugeCapacity.java and j/l/StringBuilder/HugeCapacity.java tests shouldn't be @ignore-d
Remove @ignore since @requires os.maxMemory is enough to ensure tests will not be executed if memory requirements are not satisfied

Reviewed-by: coffeys
2020-09-02 17:43:33 +01:00
Richard Reingruber
e25f2a5715 8252521: possible race in java_suspend_self_with_safepoint_check
Reviewed-by: dholmes, rehn
2020-09-04 09:01:45 +02:00
Jie Fu
ae5a6dde2d 8252740: java/util/Properties/LoadAndStoreXMLWithDefaults.java fails after JDK-8252354
Reviewed-by: alanb, joehw
2020-09-03 16:42:17 +08:00
Vladimir Kozlov
a9e78595f0 8252779: compiler/graalunit/HotspotTest.java failed after 8251525
Updated CheckGraalIntrinsics.java test

Reviewed-by: dcubed
2020-09-03 13:01:20 -07:00
Mandy Chung
4e6a4af186 8244090: public lookup should find public members of public exported types
Reviewed-by: lfoltan, psandoz
2020-09-03 12:43:13 -07:00
Magnus Ihse Bursie
49a9d49dbd 8241768: git needs .gitattributes
Reviewed-by: erikj, jvernee, ehelin
2020-09-03 19:14:11 +02:00
Igor Ignatyev
933f90fbfa 8251997: remove usage of PropertyResolvingWrapper in vmTestbase/vm/mlvm/
Reviewed-by: thartmann
2020-09-03 09:21:27 -07:00
Igor Ignatyev
850d62301c 8252720: clean up FileInstaller $test.src $cwd in vmTestbase/vm/compiler/optimizations tests
Reviewed-by: thartmann
2020-09-03 09:21:01 -07:00
Bob Vandette
76f0588aaf 8252359: HotSpot Not Identifying it is Running in a Container
Reviewed-by: sgehwolf
2020-09-03 13:50:11 +00:00
Vipin Sharma
57a27a6fb9 8252538: Replace @exception with @throws java.rmi package
Reviewed-by: rriggs
2020-09-03 09:28:24 -04:00
Jaroslav Bachorik
43d36857d0 8252754: Hash code calculation of JfrStackTrace is inconsistent
Reviewed-by: egahlin
2020-09-03 13:22:52 +02:00
Dmitry Chuyko
35ea00085f 8251525: AARCH64: Faster Math.signum(fp)
Reviewed-by: aph, vlivanov, adinn
2020-09-03 14:54:43 +03:00
Jan Lahoda
a951a15379 8245664: javac erroneously issues deprecation warning for use of a deprecated package
Reviewed-by: vromero
2020-09-03 11:14:23 +02:00
Jan Lahoda
aab706c66f 8160601: unexpected error compiling @Deprecated package
Reviewed-by: jlaskey
2020-09-03 11:13:46 +02:00
Jesper Wilhelmsson
869b05169f Added tag jdk-16+14 for changeset 36b29df125dc 2020-09-03 02:47:38 +02:00
Joe Wang
38cd5d0936 8252354: Properties :: storeToXML method does not throw ClassCastException when supplied non strings
Reviewed-by: lancea, naoto
2020-09-02 21:32:48 +00:00
Aleksey Shipilev
c61204b3f3 8252660: Shenandoah: support manageable SoftMaxHeapSize option
Reviewed-by: zgu
2020-09-02 18:37:31 +02:00
Robert Field
261eb76ea2 8247456: JShell: Handling of top-level final, abstract, and static modifiers
Reviewed-by: jlahoda
2020-09-02 09:37:25 -07:00
Yumin Qi
a588752fd6 8248337: sparc related code clean up after solaris removal
Reviewed-by: dholmes, kvn
2020-09-02 09:29:31 -07:00
Harold Seigel
f3597c4a54 8252249: nsk/stress/stack/stack016.java fails with "Error: TEST_BUG: trickyRecursion() must throw an error anyway!"
Run test separately with both -Xint and -Xcomp to ensure thread stacks are similarly sized.

Reviewed-by: dholmes, coleenp
2020-09-02 13:50:39 +00:00
Fernando Guallini
737ae7742a 8249699: java/io/ByteArrayOutputStream/MaxCapacity.java should use @requires instead of @ignore
Use @requires os.maxMemory in order to run the test only if memory requirements are satisfied as opposed to ignoring it

Reviewed-by: coffeys
2020-09-01 19:04:42 +01:00
Stefan Karlsson
4c73e045ce 8252656: Replace RegisterArrayForGC mechanism with plain Handles
Reviewed-by: coleenp, tschatzl, dholmes
2020-09-02 11:13:11 +02:00
Stefan Karlsson
7282d0deb5 8252589: Code duplication in ParallelSPCleanupTask
Reviewed-by: shade, dholmes
2020-09-02 11:13:10 +02:00
Stefan Karlsson
02049ee6c3 8252514: ZGC: Physical memory splitting is broken
Reviewed-by: eosterlund, pliden
2020-09-02 11:13:09 +02:00
Stefan Karlsson
ac2b1ae5e2 8252513: ZGC: Contiguous memory reservation probing is broken for TB heap sizes
Reviewed-by: eosterlund, pliden
2020-09-02 11:13:09 +02:00
Ivan Walulya
553f3b1497 8252303: G1MMUTrackerQueue::when_sec skip queue iteration on max_gc_time pause time
Reviewed-by: sjohanss, tschatzl
2020-08-25 11:39:38 +02:00
Albert Mingkun Yang
f01e6261a2 8252093: formula used to calculate decaying variance in numberSeq
Reviewed-by: sjohanss, kbarrett
2020-09-02 12:40:16 +02:00
Thomas Schatzl
f9e6f26ca4 8252035: G1: Clean up G1CollectedHeap::*reserved* methods
Reviewed-by: sjohanss, iwalulya
2020-09-02 10:07:03 +02:00
Thomas Schatzl
75a69333f8 8252231: G1AdaptiveIHOP has swapped current_occupancy and additional_buffer_size
Reviewed-by: shade
2020-09-02 10:06:11 +02:00
Aleksey Shipilev
c8257ea4e2 8252691: Build failure after JDK-8252481
Reviewed-by: goetz
2020-09-02 09:14:18 +02:00
Prasanta Sadhukhan
be5ed8666c Merge 2020-09-02 11:47:59 +05:30
Kim Barrett
1e4f886107 8251274: Provide utilities for function SFINAE using extra template parameters
Added ENABLE_IF macro.

Reviewed-by: eosterlund, lfoltan
2020-09-01 21:49:20 -04:00
Igor Ignatyev
ca3374253c 8252402: rewrite vmTestbase/nsk/jvmti/Allocate/alloc001 shell test to Java
Reviewed-by: amenkov
2020-09-01 17:29:34 -07:00
Igor Ignatyev
4fe6a3da68 8252532: use Utils.TEST_NATIVE_PATH instead of System.getProperty("test.nativepath")
Reviewed-by: dholmes, sspitsyn
2020-09-01 17:23:00 -07:00
Ian Graves
de49337060 8252529: Unsafe Documentation around Barrier Methods Inaccurate
Reviewed-by: psandoz
2020-09-01 13:43:26 -07:00
Gerard Ziemski
b3e264187a 8222671: thread_large/thread_large.java times out on MacOSX
Removed unreliable test, and replaced it with more robust one

Reviewed-by: dholmes, iignatyev
2020-09-01 14:36:59 -05:00
Prasanta Sadhukhan
64e2c67e7b Merge 2020-09-01 17:50:05 +05:30
Tejpal Rebari
dc549663d7 8251122: doclint html5 errors in java.desktop/share/classes/javax/swing/plaf/nimbus/doc-files/properties.html
Reviewed-by: serb, aivanov
2020-09-01 12:53:28 +05:30
Aleksey Shipilev
a4ab61339b 8252592: Non-PCH build is broken after JDK-8251560
Reviewed-by: zgu, iklam
2020-09-01 07:06:18 +02:00
Naoto Sato
2914064cf4 8252552: DecimalFormat javadoc contains HTML tags in example code
Reviewed-by: lancea, joehw
2020-08-31 15:32:29 -07:00
Sergey Bylokhov
c89ee9b0a1 8198334: java/awt/FileDialog/8003399/bug8003399.java fails in headless mode
Reviewed-by: pbansal, psadhukhan
2020-08-31 22:30:04 +01:00
Phil Race
9d71814dca Merge 2020-08-31 12:26:58 -07:00
Anton Litvinov
4e3d9e3944 8249183: JVM crash in "AwtFrame::WmSize" method
Reviewed-by: serb, aivanov
2020-08-31 17:06:41 +01:00
Patrick Concannon
79d12507b3 8238286: Add new flatMap stream operation that is more amenable to pushing
This patch adds a new flatmap-like operation called mapMulti to the java.util.Stream class as well as the primitive variations of this operation i.e. mapMultiToInt, IntStream mapMulti, etc.

Reviewed-by: psandoz, smarks
2020-08-31 16:12:32 +01:00
Ioi Lam
dd89c92c50 8251560: Remove excessive header file inclusion from systemDictionary.hpp and others
Reviewed-by: coleenp
2020-08-31 08:05:08 -07:00
Coleen Phillimore
a616bc979b 8230052: MLVM findDeadlock test timed out
Add logging for debugging for the next timeout

Reviewed-by: iignatyev, iklam, pchilanomate, dholmes
2020-08-31 09:32:44 -04:00
Phil Race
62cc45c3df 8245400: Upgrade to LittleCMS 2.11
Reviewed-by: serb, jdv
2020-08-31 06:14:42 -07:00
Prasanta Sadhukhan
1a480ab570 8040914: Test javax/swing/JLabel/6596966/bug6596966.java fails : comboBox isn't focus owner
Reviewed-by: prr
2020-08-31 17:53:04 +05:30
Pankaj Bansal
22bb597d0d 8249548: backward focus traversal gets stuck in button group
Reviewed-by: serb
2020-08-31 15:58:57 +05:30
Christian Hagedorn
8d30bb03ee 8249607: C2: assert(!had_error) failed: bad dominance
Fix prevented igvn optimization in SplitIf for LoadNodes which resulted in dominanance errors with loop strip mining.

Reviewed-by: roland, kvn
2020-08-31 12:10:25 +02:00
Yuri Nesterenko
8f98911c7b 8252497: Incorrect numeric currency code for ROL
Reviewed-by: naoto
2020-08-31 12:26:13 +03:00
Stefan Karlsson
24e9d356df 8252368: Undo JDK-8245002: Windows GDI functions don't support NUMA interleaving
Reviewed-by: eosterlund, sjohanss
2020-08-31 11:02:47 +02:00
Stefan Karlsson
178c2ff5eb 8252367: Undo JDK-8245000: Windows GDI functions don't support large pages
Reviewed-by: eosterlund, sjohanss
2020-08-31 11:01:57 +02:00
Stefan Karlsson
1605edfcc3 8139800: Remove OopsInGenClosure
Reviewed-by: kbarrett, sjohanss
2020-08-31 09:57:44 +02:00
Phil Race
3d7b524593 8074844: Resolve disabled warnings for libfontmanager
Reviewed-by: serb, ihse, erikj
2020-08-29 10:07:22 -07:00
Dmitry Markov
acb329cd0e 8252470: java/awt/dnd/DisposeFrameOnDragCrash/DisposeFrameOnDragTest.java fails on Windows
Reviewed-by: serb, prr
2020-08-29 08:10:18 +01:00
Prasanta Sadhukhan
31cccbe016 Merge 2020-08-29 11:14:49 +05:30
Prasanta Sadhukhan
c8b6cfbdc5 Merge 2020-08-29 11:10:16 +05:30
Sergey Bylokhov
33ee441df1 8252349: Delete the "sun.awt.X11.checkSTRUT" property
Reviewed-by: kizune, prr
2020-08-28 22:55:38 +01:00
Erik Joelsson
50cc54c730 8252233: Put debug symbols in symbols-image
Reviewed-by: ihse, aleonard
2020-08-28 12:03:50 -07:00
Vipin Sharma
bfabf1279d 8252265: Replace @exception with @throws java.util.logging package
@exception should be updated with @throws.

Reviewed-by: dfuchs, lancea
2020-08-29 00:00:10 +05:30
Alexander Scherbatiy
5490b03160 8252248: __SIGRTMAX is not declared in musl libc
Reviewed-by: alanb, vtewari, stuefe
2020-08-31 11:18:20 +03:00
Aleksei Voitylov
b957d802e6 8252250: isnanf is obsolete
Reviewed-by: dcubed, mikael
2020-08-31 09:28:32 +03:00
Dean Long
f0b30a5d24 8209961: [AOT] crash in Graal stub when -XX:+VerifyOops is used
Reviewed-by: kvn
2020-08-30 15:53:46 -07:00
Daniel D. Daugherty
02062b34ad 8252551: JDK-8250630 causes build error on Win*
Reviewed-by: dsamersoff
2020-08-30 12:20:59 -04:00
Dmitry Samersoff
09e86303ab 8250630: test/jdk/com/sun/jdi/JdwpListenTest.java fails on Alpine Linux
Make sure that IN6ADDR_ANY is preferred over mapped INADDR_ANY

Reviewed-by: amenkov, sspitsyn
2020-08-30 15:48:16 +03:00
Rajan Halade
24578630cf 8249176: Update GlobalSignR6CA test certificates
Reviewed-by: xuelei
2020-08-29 13:55:48 -07:00
Rahul Yadav
0f64d4bead 8245308: Replace ThreadLocalCoders decoder/encoder cache in java.net.URI
This fix updates java.net.URI and replaces the ThreadLocalCoders optimization.

Reviewed-by: alanb, dfuchs
2020-08-28 18:05:20 +01:00
Igor Ignatyev
e1d29cd6fb 8252401: Introduce Utils.TEST_NATIVE_PATH
Reviewed-by: sspitsyn
2020-08-28 10:28:06 -07:00
Stefan Karlsson
507ec8ab30 8252294: Remove OopsInGenClosure usage from younger_refs_iterate
Reviewed-by: sjohanss, kbarrett
2020-08-28 17:20:19 +02:00
Stefan Karlsson
07a879a9f7 8252289: Remove usage of OopsInGenClosure from full_process_roots
Reviewed-by: sjohanss, kbarrett
2020-08-28 17:20:13 +02:00
Stefan Karlsson
f0acabc64b 8252245: Remove ScanClosure
Reviewed-by: pliden, sjohanss
2020-08-28 17:20:08 +02:00
Pavel Rappo
26b48999df 8252172: Improve prettiness of printing HTML attributes by DocPretty
Reviewed-by: jjg
2020-08-28 15:26:34 +01:00
Erik Joelsson
7df86108cb 8252145: Unify Info.plist files with correct version strings
Reviewed-by: ihse, serb
2020-08-28 06:23:41 -07:00
Prasanta Sadhukhan
925d275a62 Merge 2020-08-28 17:58:18 +05:30
Aleksei Efimov
30c2dbea95 8251182: Fix "no comment" warnings in java.naming
Reviewed-by: lancea, rriggs, dfuchs
2020-08-28 13:10:32 +01:00
Prasanta Sadhukhan
31f2426821 6542439: Significant memory leak in BasicComboBoxUI and MetalComboBoxButton
Reviewed-by: serb
2020-08-28 17:12:50 +05:30
Daniel Fuchs
80d889189a 8245462: HttpClient send throws InterruptedException when interrupted but does not cancel request
Allows an HTTP operation to be cancelled by calling CompletableFuture::cancel(true)

Reviewed-by: michaelm, chegar, alanb
2020-08-28 10:48:17 +01:00
Robbin Ehn
13918a4519 8252414: Redundant suspend check when determining if a java thread is safe
Reviewed-by: dholmes, dcubed, coleenp
2020-08-28 10:30:02 +02:00
Attila Szegedi
4b1b547020 8251538: Modernize and lint Dynalink code
Reviewed-by: sundar
2020-08-28 10:23:21 +02:00
Ioi Lam
9523001f65 8251557: Avoid dumping unused symbols/strings into the CDS archive
Reviewed-by: minqi, ccheung
2020-08-27 22:24:28 -07:00
Prasanta Sadhukhan
b6c6b4a89a 8252469: Backout JDK-8250935 fix
Reviewed-by: prr, serb
2020-08-28 09:17:47 +05:30
Igor Ignatyev
00452d32f5 8252477: nsk/share/ArgumentParser should expect that jtreg "splits" an argument
Reviewed-by: sspitsyn, dholmes
2020-08-27 19:37:51 -07:00
Igor Ignatyev
c58de6c6ff 8252403: rewrite serviceability/7170638/SDTProbesGNULinuxTest.sh to java
Reviewed-by: sspitsyn, amenkov
2020-09-01 12:25:10 -07:00
Vicente Romero
e19022e515 8230776: Javac throws AssertionError in jvm.Gen.visitExec
8231311: javac throws NPE in TransTypes.retype
8230964: Javac throws AssertionError in PoolReader.resolve
8230963: javac throws j.l.CCE in PoolReader.getName
8230919: javac throws j.l.CCE in ClassReader.readClass

Reviewed-by: jlahoda
2020-09-01 14:31:18 -04:00
Harold Seigel
9924c45fae 8252090: JFR: StreamWriterHost::write_unbuffered() stucks in an infinite loop OpenJDK (build 13.0.1+9)
Reviewed-by: hseigel
2020-09-01 18:01:35 +02:00
Ioi Lam
5ca47be633 8252481: Remove excessive include of memTracker.hpp
Reviewed-by: lfoltan, ccheung
2020-09-01 08:29:15 -07:00
Calvin Cheung
0e42d5c4ae 8251860: ClassLoaderData::loaded_classes_do fails with "assert(ZAddress::is_marked(addr)) failed: Should be marked"
Call ClassLoaderDataGraph::loaded_cld_do to collect ClassLoaderData in a GrowableArray and then walk through them to link the classes in each ClassLoaderData.

Reviewed-by: coleenp, iklam
2020-09-01 15:42:30 +00:00
Coleen Phillimore
6428c693f0 8252652: Buggy looking null check in ServiceThread::oops_do()
Remove the null check.

Reviewed-by: stefank
2020-09-01 10:20:35 -04:00
Stefan Johansson
2c4fbbca23 8252141: Rename G1YoungRemSetSamplingThread to better reflect its purpose
Reviewed-by: kbarrett, tschatzl
2020-09-01 15:55:56 +02:00
Evan Whelan
0d1aa3cbc8 8248772: Extra comma in documentation of Thread#interrupt()
Reviewed-by: coffeys, rriggs
2020-09-01 13:35:47 +00:00
Aleksey Shipilev
a1176dc8c9 8252648: Shenandoah: name gang tasks consistently
Reviewed-by: zgu
2020-09-01 15:23:59 +02:00
Joe Darcy
ba7f7fe417 8251921: Expand default constructor warning to cover more cases
Reviewed-by: jjg, abuckley
2020-08-27 13:01:41 -07:00
Jan Lahoda
235ef8e6df 8252458: Test tools/javac/parser/JavacParserTest.java fails on Windows after JDK-8237041
Reviewed-by: vromero
2020-08-27 20:20:39 +02:00
Vladimir Kozlov
edf36d90c3 8252467: AOT need to process new markId DEOPT_MH_HANDLER_ENTRY in compiled code
Reviewed-by: dlong
2020-08-27 10:51:48 -07:00
Jan Lahoda
0504064717 8237041: AssertionError in parsing
Avoid parser crash for deeply nested classes without closing braces, improve error recovery for classes without an opening brace.

Reviewed-by: vromero
2020-08-27 16:15:11 +02:00
Prasanta Sadhukhan
79dd472913 8250935: JFileChooser incorrectly placed "Date" value in "Type" field
Reviewed-by: prr
2020-08-27 17:07:56 +05:30
Phil Race
e0989c0068 8247867: Upgrade to freetype 2.10.2
Reviewed-by: serb
2020-08-26 09:28:03 -07:00
Prasanta Sadhukhan
4b8ea58b76 8250853: Address reliance on default constructors in the javax.swing APIs
Reviewed-by: serb
2020-08-26 17:20:05 +05:30
Prasanta Sadhukhan
fa31c0de68 8250850: Address reliance on default constructors in the javax.swing.plaf.metal APIs
Reviewed-by: serb
2020-08-26 14:47:38 +05:30
Dmitry Markov
0643f3aa4c 8232114: JVM crashed at imjpapi.dll in native code
Reviewed-by: serb, alitvinov
2020-08-26 08:13:33 +01:00
Sergey Bylokhov
4d4161a57e 8250858: Address reliance on default constructors in the Java Sound APIs
Reviewed-by: prr
2020-08-24 22:12:26 +01:00
Kumar Abhishek
e11ce6d5fe 8136363: Nimbus-LaF: background color cleared when setting component name of JToolBar
Reviewed-by: serb, aivanov, dmarkov
2020-08-24 22:48:26 +01:00
Roland Westrelin
c663323043 8252292: 8240795 may cause anti-dependence to be missed
Reviewed-by: thartmann, kvn
2020-08-24 11:29:40 +02:00
Erik Helin
01dc2644c3 8251552: Add minimal CONTRIBUTING.md file
Reviewed-by: iris, ihse
2020-08-27 14:41:33 +02:00
Erik Helin
6ed221cb9a 8251551: Use .md filename extension for README
Reviewed-by: mr, ihse, darcy
2020-08-27 14:33:42 +02:00
Sergey Bylokhov
484864c932 8251558: J2DBench should support shaped and translucent windows
Reviewed-by: avu
2020-08-24 00:34:35 +01:00
Pankaj Bansal
b6c861f9f8 8251252: Add automated testcase for fix done in JDK-8214253
Reviewed-by: serb, psadhukhan
2020-08-23 13:18:47 +05:30
Pankaj Bansal
8bf5b1d18b 8251254: Add automated test for fix done in JDK-8218472
Reviewed-by: serb
2020-08-23 13:09:00 +05:30
Prasanta Sadhukhan
fb8ceae0a7 Merge 2020-08-22 10:23:35 +05:30
Igor Ignatyev
6612598a13 8251998: remove usage of PropertyResolvingWrapper in vmTestbase/jit/t
Reviewed-by: kvn
2020-08-21 19:00:52 -07:00
Calvin Cheung
31d108c1af 8251918: [Graal] Crash in DumpTimeSharedClassInfo::add_verification_constraint
Add NULL check on the return value of SystemDictionaryShared::find_or_allocate_info_for().

Reviewed-by: iklam, minqi
2020-08-22 00:09:23 +00:00
Alex Menkov
ca6d6385f8 8251384: [TESTBUG] jvmti tests should not be executed with minimal VM
Reviewed-by: sspitsyn, iignatyev
2020-08-21 15:49:09 -07:00
Daniel D. Daugherty
5db57dc1a5 8252125: add an "inflating" entry to the "table" of bit patterns in share/oops/markWord.hpp
Reviewed-by: tschatzl, coleenp
2020-08-21 16:01:46 -04:00
Daniel D. Daugherty
d1ab20c633 8252126: 'GVars.stw_random = os::random()' lost by JDK-8246476
Reviewed-by: eosterlund
2020-08-21 16:00:11 -04:00
Lance Andersen
4ee601c870 8252128: Remove javax.transaction Exception references
Reviewed-by: rriggs
2020-08-21 13:10:04 -04:00
Roland Westrelin
6a85e1454d 8241486: G1/Z give warning when using LoopStripMiningIter and turn off LoopStripMiningIter (0)
Reviewed-by: thartmann, kvn
2020-08-21 17:41:57 +02:00
Patrick Concannon
56d8e8a0a1 8189744: Deprecate the JDK-specific API for setting socket options, jdk.net.Sockets
The JDK-specific API `jdk.net.Sockets` has been redundant since Java SE 9 added standard methods to get/set socket options and retrieve per-Socket supported options. This fix deprecates the class and its public methods.

Reviewed-by: chegar, dfuchs
2020-08-27 10:57:13 +01:00
Stefan Karlsson
08310982f4 8247759: ZGC: Replace ZGC specific array implementations with GrowableArray
Reviewed-by: pliden
2020-08-27 09:54:32 +02:00
Stefan Karlsson
16d8f5f6ef 8252224: ZGC: Convert ZValue to use alias templates
Reviewed-by: pliden, kbarrett
2020-08-27 09:53:31 +02:00
Stefan Karlsson
0351595ba8 8252223: ZGC: Convert ZPage to use delegating constructor
Reviewed-by: pliden, sjohanss, kbarrett
2020-08-27 09:52:22 +02:00
Roland Westrelin
84d2c2678a 8252296: Shenandoah: crash in CallNode::extract_projections
Reviewed-by: chagedorn
2020-08-25 14:25:53 +02:00
Jie Fu
c31bcc58b0 8252404: compiler/c1/TestTraceLinearScanLevel.java fails with release VMs
Reviewed-by: kvn, thartmann
2020-08-27 10:35:00 +08:00
Aleksey Shipilev
124db3be8e 8252215: Remove VerifyOptoOopOffsets flag
Reviewed-by: thartmann, kvn
2020-08-27 06:34:27 +02:00
Aleksey Shipilev
0483ff56a0 8252362: C2: Remove no-op checking for callee-saved-floats
Reviewed-by: vlivanov
2020-08-27 06:34:24 +02:00
Jesper Wilhelmsson
7a702ae55e Added tag jdk-16+13 for changeset fd07cdb26fc7 2020-08-27 04:40:05 +02:00
Igor Ignatyev
c98fd38979 8251127: clean up FileInstaller $test.src $cwd in remaining vmTestbase_vm_compiler tests
Reviewed-by: kvn
2020-08-26 17:06:15 -07:00
Jie Fu
f586b6c0cd 8252264: tools/javac/flags/LockedFlagClash.java fails to compile
Reviewed-by: jlahoda
2020-08-25 12:46:18 +08:00
Ioi Lam
d4e6262f3c 8252398: minimal debug build broken - CURRENT_PC undefined in resourceArea.inline.hpp
Reviewed-by: kbarrett
2020-08-26 14:44:23 -07:00
Ioi Lam
a6f41d513e 8252151: Remove excessive inclusion of arguments.hpp
Reviewed-by: coleenp, stuefe
2020-08-26 14:42:07 -07:00
Joe Wang
88f93f3214 8251561: Fix doclint warnings in the java.xml package
Reviewed-by: lancea, naoto, rriggs, erikj, alanb
2020-08-26 17:48:41 +00:00
Sean Mullan
f879698c63 8241003: Deprecate "denigrated" java.security.cert APIs that represent DNs as Principal or String objects
Reviewed-by: xuelei, valeriep, weijun
2020-08-26 13:31:10 -04:00
Rajan Halade
0df797de94 8238157: Remove intermittent key from AmazonCA.java
Reviewed-by: xuelei
2020-08-26 10:22:21 -07:00
Vicente Romero
55dd4401ce 8230918: j.l.NASE in javap
Reviewed-by: jjg
2020-08-26 13:08:39 -04:00
Christian Hagedorn
6c4a27ccb1 8251093: Improve C1 register allocator logging and debugging support
Various printing and debug improvements to better analyze C1 register allocator problems.

Reviewed-by: kvn, thartmann
2020-08-26 13:46:46 +02:00
Christian Hagedorn
84e62e8597 8252037: Optimized build is broken
Fix some optimized build issues.

Reviewed-by: vlivanov, tschatzl, thartmann, kbarrett
2020-08-26 13:41:49 +02:00
Coleen Phillimore
b978ebee46 8244386: convert runtime/Safepoint/AssertSafepointCheckConsistency tests to gtest
Reviewed-by: stuefe, lfoltan, dcubed
2020-08-26 07:55:05 -04:00
Yasumasa Suenaga
0c20de1954 8250598: Hyper-V is detected in spite of running on host OS
Reviewed-by: mbaesken, mdoerr, dholmes
2020-08-26 19:21:09 +09:00
Joshua Zhu
b4787e6c3f 8252259: AArch64: Adjust default value of FLOATPRESSURE
Reviewed-by: aph
2020-08-26 17:34:48 +08:00
Nick Gasson
7856c1a311 8252108: Modify nsk/stress/stack tests to check page size
Reviewed-by: hseigel, stuefe
2020-08-26 11:28:10 +08:00
Aleksey Shipilev
25af8d8f69 8252291: C2: Assignment in conditional in loopUnswitch.cpp
Reviewed-by: thartmann
2020-08-26 09:29:46 +02:00
Aleksey Shipilev
27b5007ad5 8252290: Remove unused enum in CallGenerator
Reviewed-by: thartmann, rrich
2020-08-26 09:29:37 +02:00
Prasanta Sadhukhan
2847cd5e66 Merge 2020-08-21 14:35:52 +05:30
Aleksey Shipilev
2462995662 8252120: compiler/oracle/TestCompileCommand.java misspells "occured"
Reviewed-by: iignatyev
2020-08-21 09:38:27 +02:00
Igor Ignatyev
ef614ed8af 8251996: remove usage of PropertyResolvingWrapper in vm/compiler/complog/uninit
Reviewed-by: kvn, epavlova
2020-08-20 20:17:44 -07:00
Valerie Peng
03f2ab325d 8246383: NullPointerException in JceSecurity.getVerificationResult when using Entrust provider
Removed the static SecureRandom object in JceSecurity whose instantion caused NPE

Reviewed-by: xuelei
2020-08-21 03:09:42 +00:00
Kumar Abhishek
fc19aa9263 8200281: Add missing @Override annotations in ImageIO plugins
Reviewed-by: prr, dmarkov, aivanov
2020-08-20 23:18:29 +01:00
Igor Ignatyev
b2da6e1a90 8252005: narrow disabling of allowSmartActionArgs in vmTestbase
Reviewed-by: sspitsyn
2020-08-20 11:12:00 -07:00
Mikael Vidstedt
51a3b25d71 8252051: Make mlvmJvmtiUtils strncpy uses GCC 10.x friendly
Reviewed-by: iignatyev, kvn
2020-08-20 11:09:25 -07:00
Lance Andersen
6160353be3 8251208: Add missing javadoc comments to java.sql and java.sql.rowsets
Reviewed-by: joehw
2020-08-20 12:38:39 -04:00
Kevin Walls
99c9b39058 8248295: serviceability/jvmti/CompiledMethodLoad/Zombie.java failure with Graal
Reviewed-by: kvn, sspitsyn
2020-08-20 11:42:12 +01:00
Jesper Wilhelmsson
17bc6915a1 Added tag jdk-16+12 for changeset fc8e62b399bd 2020-08-20 11:43:46 +02:00
Jan Lahoda
b29c1fbbd1 8252031: --patch-module java.base= may fail with \"cyclic inheritance involving Object\"
Avoiding clash in use of Flags.LOCKED between Types.asSuper and Check.checkNonCyclic.

Reviewed-by: jjg
2020-08-20 10:48:36 +02:00
Nick Gasson
b9a37e48e2 8251923: "Invalid JNI handle" assertion failure in JVMCICompiler::force_comp_at_level_simple()
Reviewed-by: kvn, dnsimon
2020-08-20 09:32:01 +08:00
Naoto Sato
49e7609da2 8251499: no-placeholder compact number patterns throw IllegalArgumentException
Reviewed-by: joehw, rriggs
2020-08-19 13:41:08 -07:00
Harold Seigel
93c00472eb 8251490: [TESTBUG] The Java thread stack size specified is too small for nsk/stress/stack. Specify at least 448k
Increase the -Xss stack size for some tests, mark other tests as not runnable on AArch64.

Reviewed-by: gziemski, lfoltan
2020-08-19 19:40:46 +00:00
Pavel Rappo
8e4a4cdbe0 8251454: Wrong "self type" in DCTree.DCEndElement
Reviewed-by: jjg
2020-08-19 17:51:14 +01:00
Pavel Rappo
ecfb2914d0 8251357: [DocCommentParser] Infinite loop while looking for the end of a preamble
Reviewed-by: jjg
2020-08-19 17:44:14 +01:00
Conor Cleary
3fb8f4364d 8246047: Replace LinkedList impl in net.http.websocket.BuilderImpl
Replaced usages of LinkedList with ArrayList in http.websocket.BuilderImpl

Reviewed-by: chegar, dfuchs
2020-08-19 16:27:16 +01:00
Kim Barrett
9fc76c2b2c 8251888: Move HotSpot Style Guide wiki subpages to jdk/jdk/doc
Copy unit-test page from wiki, merge jtreg names page into hotspot-style.md

Reviewed-by: kvn, iignatyev
2020-08-19 06:11:15 -04:00
Roland Westrelin
fcd005c417 8251527: CTW: C2 (Shenandoah) compilation fails with SEGV due to unhandled catchproj == NULL
Reviewed-by: chagedorn, kvn
2020-08-19 10:56:08 +02:00
Coleen Phillimore
fc0d883a13 8252149: Compilation error after JDK-8252043
Reviewed-by: hseigel
2020-08-21 11:23:45 -04:00
Patricio Chilano Mateo
e56002c7d3 8242263: Diagnose synchronization on primitive wrappers
Added diagnostic flag DiagnoseSyncOnPrimitiveWrappers

Reviewed-by: dholmes, mdoerr, dcubed, coleenp, egahlin, mgronlun
2020-08-21 15:04:02 +00:00
Coleen Phillimore
fac22ce20c 8252043: Move inner class metaspace cleaning out of safepoint cleanup tasks
Clean up inner metaspaces from ServiceThread if cleanup is needed for concurrent GCs.

Reviewed-by: eosterlund, pchilanomate
2020-08-21 10:01:40 -04:00
Christoph Dreis
9d00332ee5 8252127: Optimize sun.invoke.util.BytecodeDescriptor.unparse
Reviewed-by: mchung, rriggs
2020-08-21 09:29:08 -04:00
Thomas Schatzl
fe8439f0d4 8252086: G1: Remove g1_rs in G1CollectedHeap::initialize
Reviewed-by: sjohanss
2020-08-21 11:57:55 +02:00
Thomas Schatzl
8a56d7e00d 8252034: G1: Remove *g1_reserved* methods
Remove duplicate methods.

Reviewed-by: sjohanss, kbarrett
2020-08-21 11:54:34 +02:00
Thomas Schatzl
f189db2813 8252038: G1: Remove unused G1MarkStatsCache::_num_stats
Reviewed-by: sjohanss, kbarrett
2020-08-21 11:54:33 +02:00
Ziyi Luo
10fb6f9c4b 8245511: G1 adaptive IHOP does not account for reclamation of humongous objects by young GC
Discount humongous object eager reclaim in IHOP allocation rate.

Reviewed-by: tschatzl, sjohanss
2020-08-21 11:54:32 +02:00
Prasanta Sadhukhan
e6a0c6cf4d 8250852: Address reliance on default constructors in the javax.swing.plaf.basic APIs
Reviewed-by: serb, aivanov
2020-08-19 11:49:54 +05:30
Prasanta Sadhukhan
d8d3cc3ab6 8250851: Address reliance on default constructors in the javax.swing.plaf.synth APIs
Reviewed-by: serb
2020-08-19 11:47:48 +05:30
Rahul Yadav
b328bc14a0 8251715: Throw UncheckedIOException in place of InternalError when HttpClient fails due to unavailability of underlying resources required by SSLContext
This fix updates jdk.internal.net.http.HttpClientImpl to throw an UncheckedIOException instead of InternalError.

Reviewed-by: chegar, dfuchs
2020-08-18 16:44:42 +01:00
Evan Whelan
67b3cbff2e 8250748: Doc of URL(String, String, int, String, URLStreamHandler) does not use link
Reviewed-by: dfuchs
2020-08-19 08:58:00 +00:00
Vicente Romero
c2ee432602 8249902: tools/javac/records/mandated_members/read_resolve_method/CheckReadResolveMethodTest.java uses @ignore w/o bug-id
Reviewed-by: jjg
2020-08-18 19:23:58 -04:00
Anton Kozlov
f1e0780668 8251930: Native types mismatch in hotspot
Reviewed-by: aph
2020-08-18 01:34:46 -07:00
Sergey Bylokhov
a1c29335a8 8251469: Better cleanup for test/jdk/javax/imageio/SetOutput.java
Reviewed-by: prr, pbansal
2020-08-18 00:08:21 +01:00
Sergey Bylokhov
fbad5a0d5b 8022535: [TEST BUG] javax/swing/text/html/parser/Test8017492.java fails
Reviewed-by: prr, pbansal
2020-08-18 00:06:57 +01:00
Prasanta Sadhukhan
69c0df6b8f 8250849: Address reliance on default constructors in the javax.swing.plaf APIs
Reviewed-by: prr, serb
2020-08-17 13:36:36 +05:30
Pankaj Bansal
2ef86262e0 8239137: JAWS does not always announce the value of JSliders in JColorChooser
Reviewed-by: serb, prr, kizune
2020-08-17 11:55:31 +05:30
Tejpal Rebari
0cf76bde34 8251125: doclint errors about missing references in Swing javadoc
Reviewed-by: psadhukhan, pbansal
2020-08-17 11:20:44 +05:30
Tejpal Rebari
d6348691ee 8249674: Redo: Nimbus JTree renderer properties persist across L&F changes
Reviewed-by: psadhukhan, prr
2020-08-17 11:18:19 +05:30
Pankaj Bansal
4264cd9f46 8251124: doclint errors about missing accessibility support in HTML files
Reviewed-by: serb
2020-08-16 11:53:50 +05:30
Pankaj Bansal
a0d6a8a174 8251166: Add automated testcases for changes done in JDK-8214112
Reviewed-by: serb
2020-08-16 11:44:05 +05:30
Prasanta Sadhukhan
8d432d29b8 Merge 2020-08-15 11:06:44 +05:30
Gerard Ziemski
087cbbfd69 8237591: Mac: include OS X version in hs_err_pid crash log file
Added macOS and build version to crash lof report

Reviewed-by: dholmes, dcubed
2020-08-14 13:24:24 -05:00
Charlie Gracie
65b99c7b1a 8241065: Shenandoah: remove leftover code after JDK-8231086
Reviewed-by: rkennke
2020-08-14 18:23:43 +02:00
Harold Seigel
5732032707 8251414: Add test that invokeinterface of a protected method in java.lang.Object throws NoSuchMethodError
Add the missing test cases to existing test InterfaceObjectTest.java

Reviewed-by: lfoltan, coleenp
2020-08-14 15:42:09 +00:00
Brian Burkhalter
a963aab1a8 8181919: Refactor test/java/io/File/GetXSpace.sh to java test
Reviewed-by: naoto
2020-08-14 08:12:13 -07:00
Prasanta Sadhukhan
9573ef8bda Merge 2020-08-14 15:49:27 +05:30
Christian Hagedorn
552a73301c 8248791: sun/util/resources/cldr/TimeZoneNamesTest.java fails with -XX:-ReduceInitialCardMarks -XX:-ReduceBulkZeroing
Fix wrong replacement of loads by zero for non-completed InitializationNodes belonging to a clone when ReduceBulkZeroing is disabled.

Reviewed-by: kvn, thartmann
2020-08-14 10:30:51 +02:00
Prasanta Sadhukhan
50f1b87a97 8250811: Address reliance on default constructors in the javax.swing.plaf.multi APIs
Reviewed-by: prr, serb
2020-08-12 19:32:29 +05:30
Sergey Bylokhov
fe8fcfb4be 8078228: Default file manager and web browser didn't launch and got SecurityException
Reviewed-by: jdv, dmarkov
2020-08-11 06:03:16 +01:00
Martin Desruisseaux
d2d5bc7038 8166038: BufferedImage methods getTileGridXOffset() and getTileGridYOffset() return a non 0 value for sub images
Reviewed-by: jdv, serb
2020-08-11 05:52:35 +01:00
Sergey Bylokhov
3148072079 8250857: Address reliance on default constructors in the Java Beans API
Reviewed-by: prr
2020-08-11 05:34:33 +01:00
Sergey Bylokhov
dce1aee4ef 8250856: Address reliance on default constructors in the AWT APIs
Reviewed-by: prr
2020-08-11 05:30:52 +01:00
Phil Race
62a67c5d90 Merge 2020-08-11 10:56:30 -07:00
Phil Race
63b3498733 8251367: [windows] harfbuzz.dll not found causes failure to load sun.font.SunFontManager
Reviewed-by: serb
2020-08-10 21:12:47 -07:00
Patric Hedlin
5d2f6e737b 8250848: [aarch64] nativeGotJump_at() missing call to verify()
Reviewed-by: aph
2020-08-10 17:36:46 +02:00
Magnus Ihse Bursie
d6bd183b84 8251399: JDK-8248701 had incorrect indentation
Reviewed-by: erikj
2020-08-11 16:07:04 +02:00
Coleen Phillimore
b16a01bb67 8251302: Create dedicated OopStorages for Management and Jvmti
Reviewed-by: sspitsyn, dholmes
2020-08-11 07:29:45 -04:00
Dmitry Cherepanov
28f963f6fc 8251365: Build failure on AIX after 8250636
Reviewed-by: dholmes
2020-08-11 13:03:15 +03:00
Hannes Wallnöfer
315ae4c51c 8250954: Avoid multiple warnings for external docs with mismatching modularity
Reviewed-by: jjg
2020-08-11 08:38:47 +02:00
Xiaohong Gong
23ed3a9e91 8250808: Re-associate loop invariants with other associative operations
Reviewed-by: kvn, thartmann
2020-08-11 06:00:43 +00:00
Mikael Vidstedt
91926e262c Merge 2020-08-10 22:25:26 -07:00
Vladimir Kozlov
b83ea8b391 8251369: [JVMCI] Backout 8246347 changes
Reviewed-by: dholmes
2020-08-10 16:26:08 -07:00
Vladimir Kozlov
092389e3c9 8249749: modify a primitive array through a stream and a for cycle causes jre crash
Check align_to_ref for NULL early and bailout SuperWord optimization.

Reviewed-by: vlivanov, thartmann
2020-08-10 15:31:01 -07:00
Mandy Chung
6cfe3fea08 Merge 2020-08-10 14:57:53 -07:00
Doug Simon
e64a25b256 8246347: [JVMCI] Set is_method_handle_invoke flag accordingly when describing scope in jvmciCodeInstaller
Reviewed-by: kvn, dlong
2020-08-10 21:52:02 +02:00
Vladimir Kempik
5e9702d390 8250876: Fix issues with cross-compile on macos
Reviewed-by: erikj, ihse
2020-08-10 22:42:09 +03:00
Evgeny Nikitin
929ffca471 8069411: OutOfMemoryError in OverloadCompileQueueTest.java
OOME seems to have happened in older version and does not show up in modern VM, hence the test OverloadCompileQueueTest.java gets un-quarantined.

Reviewed-by: iignatyev
2020-08-10 16:11:40 +02:00
Evgeny Nikitin
714db70bf3 8251349: Add TestCaseImpl to OverloadCompileQueueTest.java's build dependencies
Reviewed-by: iignatyev, kvn
2020-08-10 20:31:27 +02:00
Claes Redestad
ae912be86f 8251459: Compute caller save exclusion RegMasks once
Reviewed-by: kvn, vlivanov
2020-08-18 15:34:28 -07:00
Zhengyu Gu
f797e19e3d 8251910: Shenandoah: Handshake threads between weak-roots and reset phases
Reviewed-by: rkennke
2020-08-18 13:34:10 -04:00
Pavel Rappo
9871f3a27a 8251939: Fix copy-paste issues and address TODOs
Reviewed-by: jjg
2020-08-18 17:34:59 +01:00
Magnus Ihse Bursie
74cb1b4e75 8251541: "no symbols" printed when building hotspot
Reviewed-by: erikj
2020-08-18 17:35:38 +02:00
Evan Whelan
54490d30c8 8249691: jdk/lambda/vm/StrictfpDefault.java file can be removed
Reviewed-by: coffeys
2020-08-18 14:43:28 +00:00
Per Lidén
e8d284faac 8248266: ZGC: TestUncommit.java fails due to "Exception: Uncommitted too fast" again
Reviewed-by: shade, eosterlund
2020-08-18 16:37:09 +02:00
Dong Bo
f779affda0 8251885: aarch64: aarch64-asmtest.py script generates unpredictable instructions
Reviewed-by: aph
2020-08-18 10:20:23 +08:00
Aleksey Shipilev
70c0815335 8251924: 32-bit build failures after JDK-8235765
Reviewed-by: dholmes
2020-08-18 12:46:33 +02:00
Daniel Fuchs
daffaa8376 8251160: Fix "no comment" warnings in java.logging
Add missing documentation to the Serialized Form of Level and LogRecord.

Reviewed-by: lancea, mchung
2020-08-18 11:37:17 +01:00
Albert Mingkun Yang
74ae13716b 8251463: Obsolete -XX:ForceNUMA option
Reviewed-by: kbarrett, sjohanss, lkorinth
2020-08-18 11:43:24 +02:00
Pavel Rappo
cc8d52020d 8251550: Clean up jdk.javadoc and the related parts of jdk.compiler
Reviewed-by: jjg
2020-08-18 10:29:06 +01:00
Joe Darcy
61e42ed85d 8071961: Add javac lint warning when a default constructor is created
Reviewed-by: jjg, jlahoda, abuckley, erikj, mcimadamore
2020-08-17 18:58:20 -07:00
Rajan Halade
39c9560cbf 8251859: sun/security/validator/PKIXValAndRevCheckTests.java fails
Reviewed-by: jnimeh
2020-08-17 17:26:30 -07:00
Jesper Wilhelmsson
38f4f06ccc Merge 2020-08-18 01:08:18 +02:00
Vicente Romero
c190193eac 8246804: Incorrect copyright header in TypeAnnotationParser.java
Reviewed-by: darcy, psandoz
2020-08-17 17:33:51 -04:00
Alexander Matveev
89d7530411 8250803: pkgbuild failed with exit code 134
Reviewed-by: herrick, asemenyuk
2020-08-17 13:41:22 -07:00
Calvin Cheung
57d2c86985 8247529: Crash in runtime/cds/appcds/dynamicArchive/LambdaProxyCallerIsHidden.java with Graal
Avoid inserting InstanceKlass into the DumpTimeSharedClassTable after dynamic CDS dumping has started. Acquire the DumpTimeTable_lock before iterations on _dumptime_table to ensure memory order correctness.

Reviewed-by: iklam, minqi
2020-08-17 18:46:38 +00:00
Andy Herrick
5dbcdbbef7 8250611: Cannot display splash screen on Windows
Reviewed-by: asemenyuk, almatvee, prr
2020-08-17 11:59:36 -04:00
Coleen Phillimore
35421399a4 8235765: Use of the long type should be avoided in shared code
Changed some long declarations to uint64_t/int64_t or unsigned int, depending on context.

Reviewed-by: lfoltan, kvn, dholmes
2020-08-17 10:08:36 -04:00
Stefan Karlsson
51c8ac362e 8251837: Rename get_safepoint_workers to safepoint_workers
Reviewed-by: tschatzl
2020-08-17 11:36:09 +02:00
Patrick Concannon
34949494e4 7164518: No PortUnreachableException when connecting to a non-existing DatagramSocket (mac)
This fix changes the test to run with the new impl of DatagramSocket, which remedies the issue that caused the test to fail with a wrong expection and can now be taken off the ProblemList.

Reviewed-by: dfuchs
2020-08-17 10:36:20 +01:00
Stefan Karlsson
5d9c1e45dc 8251835: JDK-8251374 breaks jmap -dump:all
Reviewed-by: phh, sspitsyn
2020-08-17 11:34:49 +02:00
Stefan Karlsson
2631422bc5 8251570: JDK-8215624 causes assert(worker_id <' _n_workers) failed: Invalid worker_id
Reviewed-by: kbarrett, sjohanss
2020-08-17 11:32:26 +02:00
Stefan Karlsson
ea73b5b0d9 8233281: Obsolete UseSemaphoreGCThreadsSynchronization
Reviewed-by: tschatzl, kbarrett, ayang
2020-08-17 11:30:09 +02:00
Thomas Schatzl
55e3560abc 8245721: Refactor the TaskTerminator
Improve the structure of the TaskTerminator code to make it more understandable and amenable to improvements.

Reviewed-by: zgu, kbarrett, lkorinth
2020-08-17 11:23:54 +02:00
Martin Doerr
f1a5cbb11e 8251846: Replace __linux which is no longer defined
Reviewed-by: dholmes, goetz
2020-08-17 10:40:46 +02:00
Nick Gasson
fb300a3ff3 8251517: [TESTBUG] com/sun/net/httpserver/bugs/B6393710.java does not scale socket timeout
Reviewed-by: dfuchs
2020-08-14 18:08:30 +08:00
Ioi Lam
77522d1270 8251559: Remove empty file utilities/sizes.cpp
Reviewed-by: ccheung, dholmes
2020-08-15 18:13:49 -07:00
Daniel D. Daugherty
50c37fc749 8251543: add mention of INFLATING() to share/oops/markWord.hpp header comment
Reviewed-by: kbarrett
2020-08-15 16:02:29 -04:00
Mikael Vidstedt
d1b6691295 Added tag jdk-15+36 for changeset e3f940bd3c8f 2020-08-12 20:07:07 -07:00
Pankaj Bansal
79a4a019bb 8247753: UIManager.getSytemLookAndFeelClassName() returns wrong value on Fedora 32
Reviewed-by: prr, psadhukhan
2020-08-09 14:30:02 +05:30
Athijegannathan Sundararajan
f70fc149b5 8251276: JDK-8248299 breaks JDK 15 validate-headers build
Reviewed-by: mchung, iris, vtewari
2020-08-08 12:22:05 +05:30
Nick Gasson
90f0612ada 8247354: [aarch64] PopFrame causes assert(oopDesc::is_oop(obj)) failed: not an oop
Reviewed-by: adinn
2020-08-07 14:10:55 +08:00
Ioi Lam
35e3226df8 8250990: Consolidate object copying code for CDS static/dynamic archive dumping
Reviewed-by: coleenp, ccheung
2020-08-13 18:40:51 -07:00
Lin Zang
7638580477 8251374: jmap -dump could accept invalid options
Emit usage(1) in dump() argument loop

Reviewed-by: sspitsyn, phh
2020-08-13 13:57:12 -07:00
Daniel D. Daugherty
0db838628c Merge 2020-08-13 15:42:21 -04:00
Xue-Lei Andrew Fan
473fa82000 8250839: Improve test template SSLEngineTemplate with SSLContextTemplate
Reviewed-by: ascarpino
2020-08-13 12:31:12 -07:00
Lin Zang
3498a10a2b 8215624: Add parallel heap iteration for jmap –histo
Chunk and parallelize the heap scan

Reviewed-by: sspitsyn, stefank, phh
2020-08-13 11:31:37 -07:00
Paul Hohensee
9f090cb6f8 8215624: Add parallel heap iteration for jmap –histo
Chunk and parallelize the heap scan

Reviewed-by: sspitsyn, stefank, phh
2020-08-13 11:31:37 -07:00
Igor Ignatyev
e44575ad3e 8251526: CTW fails to build after JDK-8251121
Reviewed-by: shade
2020-08-13 10:33:51 -07:00
Rahul Yadav
d8355e0281 8249773: Upgrade ReceiveISA.java test to be resilient to failure due to stray packets and interference
This fix upgrades java/nio/channels/DatagramChannel/ReceiveISA.java so it can handle interference from stray packets.

Reviewed-by: alanb, dfuchs
2020-08-13 17:48:15 +01:00
Brian Burkhalter
03e5f256ca 8245304: Re-examine ThreadLocal usage in java.math.BigDecimal
Reviewed-by: darcy, alanb
2020-08-13 09:33:28 -07:00
Patricio Chilano Mateo
12ae68b197 8251118: BiasedLocking::preserve_marks should not have a HandleMark
Removed HandleMark from BiasedLocking::preserve_marks() method

Reviewed-by: hseigel, coleenp, dcubed, tschatzl, dholmes
2020-08-13 15:42:41 +00:00
Magnus Ihse Bursie
19a08080e4 8251516: VSCode IDE configuration specifies c++03
Reviewed-by: erikj
2020-08-13 17:34:31 +02:00
Magnus Ihse Bursie
9edcdf12a0 8251533: MacOS build of libjimage explicitly adds C++ standard library
Reviewed-by: erikj
2020-08-13 17:10:48 +02:00
Patrick Concannon
a096c0a83f 8240901: Add a test to check that large datagrams are sent/received on the network correctly
This fix updates `java/net/DatagramSocket/SendReceiveMaxSize.java` and `java/net/DatagramSocket/SendReceiveMaxSize.java` to check (on all platforms) that the sending/receiving of large datagrams across a network are sent, fragmented, and re-assembled correctly

Reviewed-by: alanb, dfuchs
2020-08-13 15:40:13 +01:00
Kim Barrett
e648a907b3 8250597: G1: Improve inlining around trim_queue
Refactor, using NOINLINE and (new) ATTRIBUTE_FLATTEN for control.

Reviewed-by: tschatzl, sjohanss
2020-08-13 10:02:35 -04:00
Tobias Hartmann
191e1e6075 8251458: Parse::do_lookupswitch fails with "assert(_cnt >= 0) failed"
Limit the counter value to max_jint.

Reviewed-by: kvn, vlivanov, chagedorn
2020-08-13 16:01:45 +02:00
Tobias Hartmann
51b3bd2c2e 8251456: [TESTBUG] compiler/vectorization/TestVectorsNotSavedAtSafepoint.java failed OutOfMemoryError
Removed allocation of large arrays to avoid OOME.

Reviewed-by: kvn, chagedorn
2020-08-13 15:59:12 +02:00
Prasanta Sadhukhan
0615eac2e6 8249838: javax.swing.JLayeredPane has used valueOf twice in example code in documentation
Reviewed-by: jdv, pbansal
2020-08-07 09:23:54 +05:30
Prasanta Sadhukhan
2c00d740d4 8251187: Mark BasicComboNPE regression test as headful
Reviewed-by: prr
2020-08-07 09:21:46 +05:30
Athijegannathan Sundararajan
764b50a7e3 8248299: two jdeps files miss copyright header
Reviewed-by: mchung
2020-08-07 07:03:12 +05:30
Phil Race
c32923e06f 8240487: Cleanup whitespace in .cc, .hh, .m, and .mm files
Reviewed-by: serb, kizune, kcr, cjplummer
2020-08-06 09:43:10 -07:00
Mikael Vidstedt
44c6537b57 Added tag jdk-15+35 for changeset fd60c3146a02 2020-08-05 18:59:04 -07:00
Mandy Chung
18d5626e25 8250929: Missing "classpath exception" in LambdaProxyClassArchive.java
Reviewed-by: sundar
2020-08-05 13:24:53 -07:00
Leonid Mesnik
13946835b5 8244537: JDI tests fail due to "ERROR: Exception : nsk.share.jdi.JDITestRuntimeException: JDITestRuntimeException : ** event IS NOT a breakpoint **"
Reviewed-by: sspitsyn, amenkov
2020-08-05 10:48:55 -07:00
Igor Ignatyev
0019679c69 8251190: nsk jdi tests failing "TestBug: Exception during config file parsing: java.io.FileNotFoundException"
Reviewed-by: dholmes, sspitsyn
2020-08-05 08:57:21 -07:00
Prasanta Sadhukhan
c798b3d040 6709913: BasicComboBoxUI.isPopupVisible returns NullPointerException
Reviewed-by: serb
2020-08-05 17:49:11 +05:30
Galder Zamarreno
96f56eb4fc 8248158: Configure fails with autoconf not found even though it's installed
Reviewed-by: erikj, ihse, stooke
2020-08-05 11:59:10 +02:00
Coleen Phillimore
97bbbbba51 8235573: Move JFR ObjectSample oop into OopStorage
Reviewed-by: mgronlun, dholmes, kbarrett
2020-08-05 10:25:49 -04:00
Harold Seigel
c200b4f1cb 8139875: [TESTBUG] Improve nsk/stress/stack/* tests
Use -Xss200k to limit the stack size, avoid running with -Xcomp, and, in one test, reduce iterations.

Reviewed-by: dholmes, lfoltan
2020-08-05 13:27:43 +00:00
Boris Ulasevich
1066357887 8248445: Use of AbsI/AbsL nodes should be limited to supported platforms
Reviewed-by: kvn, vlivanov
2020-08-05 06:31:32 -04:00
Alexander Zuev
7f74c7dd7f 8212226: SurfaceManager throws "Invalid Image variant" for MultiResolutionImage (Windows)
Reviewed-by: serb
2020-08-05 12:52:33 +03:00
Joe Darcy
3a0741afa1 8250920: Increase @jls usage in core reflection
Reviewed-by: mchung
2020-08-04 20:31:57 -07:00
Igor Ignatyev
61ebb6adb7 8249030: clean up FileInstaller $test.src $cwd in vmTestbase_nsk_jdi tests
Reviewed-by: dholmes, sspitsyn
2020-08-04 20:05:47 -07:00
Igor Ignatyev
a53ecac07c 8251128: remove vmTestbase/vm/compiler/jbe/combine
Reviewed-by: kvn
2020-08-04 20:04:47 -07:00
Jie Fu
30c8811d11 8251031: Some vmTestbase/nsk/monitoring/RuntimeMXBean tests fail with hostnames starting from digits
Reviewed-by: dholmes, cjplummer, sspitsyn
2020-08-05 10:54:18 +08:00
David Holmes
6b8c16cf41 8248906: runtime/Thread/ThreadObjAccessAtExit.java fails due to OutOfMemoryErrors
Reviewed-by: mdoerr
2020-08-04 21:11:45 -04:00
Alexander Matveev
45c4d9d519 8250646: hdiutil detach fix JDK-8245311 still fails sometimes
Reviewed-by: herrick, asemenyuk
2020-08-04 17:47:51 -07:00
Yasumasa Suenaga
36b129fe84 8250826: jhsdb does not work with coredump which comes from Substrate VM
Reviewed-by: cjplummer, sspitsyn
2020-08-05 09:24:02 +09:00
Chris Plummer
eaf70e0ab8 8247516: DSO.closestSymbolToPC() should use dbg.lookup() rather than rely on java ELF file support
Reviewed-by: sspitsyn, ysuenaga
2020-08-04 13:58:11 -07:00
Zdenek Zambersky
1cc09ccaef 8251117: Cannot check P11Key size in P11Cipher and P11AEADCipher
Reviewed-by: valeriep
2020-08-04 17:19:21 -03:00
Charlie Gracie
ed5696dd2c 8251361: Potential race between Logger configuration and GCs in HttpURLConWithProxy test
Keep a static reference to the logger to prevent its inadvertent garbage collection while the test is running.

Reviewed-by: dfuchs
2020-08-10 19:21:50 +01:00
Brian Burkhalter
688e5d9071 Merge 2020-08-10 10:32:27 -07:00
Brian Burkhalter
d0d925c13a 8251017: java/io/File/GetXSpace.java fails on UNIX
Reviewed-by: naoto
2020-08-10 10:25:17 -07:00
Joe Wang
b5f785ba9b 8246816: XMLGregorianCalendar.hashCode() produces far too many identical hashes
Reviewed-by: naoto, rriggs
2020-08-10 17:16:56 +00:00
Brian Burkhalter
db1e207a72 8249703: test/jdk/java/io/File/GetXSpace.java fails on macos
Reviewed-by: naoto
2020-08-10 09:54:34 -07:00
Tagir F. Valeev
55e381b32f 8247605: Avoid array allocation when concatenating with empty string
Reviewed-by: redestad, plevart
2020-08-10 16:14:03 +00:00
Rahul Yadav
8e687450d6 8248006: Revisit exceptions thrown when creating an HttpClient fails due to unavailability of underlying resources
This fix updates jdk.internal.net.http.HttpClientImpl to throw an UncheckedIOException instead of InternalError.

Reviewed-by: chegar, dfuchs
2020-08-10 15:15:10 +01:00
Kim Barrett
b35a3bdee9 8251322: Improve BitMap::iterate
Rewrite and inline BitMap::iterate.

Reviewed-by: stuefe, dholmes, tschatzl
2020-08-10 10:54:56 -04:00
Thomas Stuefe
c57d89ad1a 8251255: [linux] Add process-memory information to hs-err and VM.info
Reviewed-by: dholmes, mdoerr
2020-08-10 15:42:20 +02:00
Nikola Grcevski
c2fa441d8d 8250521: Configure initial RTO to use minimal retry for loopback connections on Windows
Reviewed-by: alanb
2020-08-10 12:57:38 +01:00
Charlie Gracie
7332181372 8251303: C2: remove unused _site_invoke_ratio and related code from InlineTree
Reviewed-by: vlivanov, thartmann
2020-08-10 12:12:40 +03:00
Dmitry Cherepanov
1d480a7b96 8250636: iso8601_time returns incorrect offset part on MacOS
Reviewed-by: dholmes, gziemski
2020-08-10 11:25:38 +03:00
Charlie Gracie
660272ce7c 8241574: Shenandoah: remove ShenandoahAssertToSpaceClosure
Reviewed-by: zgu, bmathiske, shade
2020-08-10 08:37:05 +02:00
Nikola Grcevski
032a4d6b9f 8241007: Shenandoah: remove ShenandoahCriticalControlThreadPriority support
Reviewed-by: adityam, shade
2020-08-10 08:36:56 +02:00
Tobias Hartmann
970e251a54 8249608: Vector register used by C2 compiled method corrupted at safepoint
Always update 'max_vlen_in_bytes'.

Reviewed-by: kvn, vlivanov, chagedorn
2020-08-10 08:21:14 +02:00
Ioi Lam
c1093dc244 8251213: [TESTBUG] CDS tests shouldn't write output files into test.classes directory
Reviewed-by: minqi, ccheung
2020-08-09 20:56:04 -07:00
Chris Plummer
ee060c777c 8241951: SA core file tests failed to find core file for signed binaries on OSX 10.15
Reviewed-by: amenkov, dcubed
2020-08-09 19:38:51 -07:00
Thomas Stuefe
6df465de73 8251257: NMT: jcmd VM.native_memory scale=1 crashes target VM
Reviewed-by: zgu, dholmes
2020-08-09 09:20:02 +02:00
Abdul Kolarkunnu
b5d775f115 8248745: Add jarsigner and keytool tests for restricted algorithms
Reviewed-by: mullan, hchao
2020-08-08 20:29:27 -07:00
Jatin Bhateja
3ed56830b4 8248830: C2: Optimize Rotate API on x86
Improved existing scalar rotate operations, added support for vector rotate operations using new AVX512 instructions.

Reviewed-by: vlivanov, kvn
2020-08-09 02:03:09 +05:30
Alexander Matveev
084e15bca3 8248905: [macos] symbolic links not properly resolved
Reviewed-by: herrick, asemenyuk
2020-08-07 19:04:45 -07:00
Vladimir Kozlov
c79e6346d0 8250233: -XX:+CITime triggers guarantee(events != NULL) in jvmci.cpp:173
Add missing EnableJVMCI flag check. Refactoring compiler print statistic code.

Reviewed-by: thartmann
2020-08-04 13:16:45 -07:00
Phil Race
84e397b4de 8250894: Provide a configure option to build and run against the platform libharfbuzz
Reviewed-by: erikj
2020-08-04 12:20:37 -07:00
Calvin Cheung
d7c7f70a6a 8249586: Test runtime/cds/appcds/DirClasspathTest.java will fail if run twice
Add the StandardCopyOption.REPLACE_EXISTING option when calling Files.copy().

Reviewed-by: iklam
2020-08-04 19:17:31 +00:00
Mandy Chung
f4de95a97c 8250219: Proxy::newProxyInstance spec should specify the behavior if a given proxy interface is hidden
Reviewed-by: alanb
2020-08-04 10:36:02 -07:00
Mandy Chung
38af8be984 8022795: Method.isVarargs of dynamic proxy generated method to match the proxy interface method
Reviewed-by: rriggs, darcy
2020-08-04 10:26:39 -07:00
Kim Barrett
b0ceab23dd 8250652: Add logical operations on types
Add stand-ins for C++17 logical operations on types.

Reviewed-by: eosterlund, tschatzl
2020-08-04 04:19:23 -04:00
Yasumasa Suenaga
39616b4d7c 8250930: [TESTBUG] Some forceEarlyReturn00* tests failed due to compiler optimization
Reviewed-by: cjplummer, dholmes
2020-08-04 15:28:27 +09:00
Mikael Vidstedt
00d223cff6 8250899: Backout JDK-8249628 from jdk/jdk
Reviewed-by: erikj
2020-08-03 22:10:31 -07:00
Mikael Vidstedt
bafa476135 Merge 2020-08-03 22:08:37 -07:00
Mikael Vidstedt
15a9c29036 Merge 2020-08-03 21:56:35 -07:00
Mikhailo Seledtsov
4bd94fb9ea 8250986: Problem list docker/TestMemoryAwareness.java and docker/TestDockerMemoryMetrics.java for linux-5.4.0-1019-oracle
Problem listed the tests

Reviewed-by: dholmes
2020-08-03 18:58:53 -07:00
Chris Plummer
54bed60bfe 8250750: JDK-8247515 fix for OSX pc_to_symbol() lookup fails with some symbols
8249150: SA core file tests sometimes time out on OSX with "java.io.IOException: App waiting timeout"

Reviewed-by: sspitsyn, amenkov
2020-08-03 17:38:22 -07:00
Chris Plummer
d12fdfa3b7 8250750: JDK-8247515 fix for OSX pc_to_symbol() lookup fails with some symbols
Reviewed-by: sspitsyn, kevinw
2020-08-03 16:11:41 -07:00
Rajan Halade
1e535dfa53 8243320: Add SSL root certificates to Oracle Root CA program
Reviewed-by: mullan
2020-08-03 11:35:24 -07:00
Albert Mingkun Yang
9385203fbd 8250628: ZGC: fixup_partial_loads was removed, but still are referenced
Reviewed-by: eosterlund, kbarrett, lkorinth
2020-08-03 14:01:00 +02:00
Jayathirth D V
42f4170b2a 8243674: Remove language tag length limit for iTXt chunk in PNGImageReader
Reviewed-by: prr, serb
2020-08-03 17:27:05 +05:30
Christian Hagedorn
696b9e1847 8249605: C2: assert(no_dead_loop) failed: dead loop detected
Fixed dead loop detection in PhiNode::Ideal() to additionally account for dead MergeMemNodes

Reviewed-by: kvn, thartmann
2020-08-03 09:21:45 +02:00
Yasumasa Suenaga
e15e30fef2 8249215: JFrame::setVisible crashed with -Dfile.encoding=UTF-8 on Japanese Windows
Reviewed-by: prr, serb
2020-08-03 15:29:48 +09:00
Monica Beckwith
d9abf606d9 8250824: AArch64: follow up for JDK-8248414
The original change missed to update an assert.

Co-authored-by: Ludovic Henry <luhenry@microsoft.com>
Co-authored-by: Bernhard Urban-Forster <beurba@microsoft.com>
Reviewed-by: dholmes
2020-08-03 00:16:49 -04:00
Aleksey Shipilev
ddb726d4a0 8250844: Make sure {type,obj}ArrayOopDesc accessors check the bounds
Reviewed-by: rrich, coleenp
2020-08-02 16:58:14 +02:00
Thomas Stuefe
aab365f746 8250911: [windows] os::pd_map_memory() error detection broken
Reviewed-by: iklam, kbarrett
2020-08-02 09:54:33 +02:00
Prasanta Sadhukhan
13a335722f Merge 2020-08-02 10:34:21 +05:30
Robert Field
9390446081 8249566: jshell tool: retained modes from JDK-13 or prior cause confusing messages to be generated for records
Reviewed-by: jlahoda
2020-08-01 14:18:06 -07:00
Prasanta Sadhukhan
b76a154c6d Merge 2020-08-01 17:54:03 +05:30
Chihiro Ito
ee5dc7cbb4 8250818: idea.sh script doesn't work on WSL 1 and 2
Reviewed-by: erikj
2020-08-01 20:25:02 +09:00
Jie Fu
e03ca73dc1 8250825: C2 crashes with assert(field != __null) failed: missing field
Reviewed-by: kvn, thartmann
2020-07-31 17:10:46 +08:00
Xin Liu
a9ad296a55 8249809: avoid calling DirectiveSet::clone(this) in compilecommand_compatibility_init
Add DirectiveSet smart pointer to isolate cloning

Reviewed-by: simonis, thartmann
2020-07-31 11:35:25 -07:00
Joe Wang
024fa0969a 8250638: Address reliance on default constructors in java.xml
Reviewed-by: darcy, lancea
2020-07-31 18:25:12 +00:00
Patrick Concannon
dc71097c2e 8250889: Disable testing SendReceiveMaxSize with preferIPv4Stack=true on the old impl until JDK-8250886 is fixed
The `test java/net/DatagramSocket/SendReceiveMaxSize` is currently failing when run with `-Djdk.net.usePlainDatagramSocketImpl` and `-Djava.net.preferIPv4Stack=true`. This fix removes these run settings from the test until a more permanent solution can be found.

Reviewed-by: dfuchs
2020-07-31 18:59:27 +01:00
Vicente Romero
229f41808d 8250629: do not allow C-style array declaration in record components
Reviewed-by: jlahoda
2020-07-31 12:13:52 -04:00
Naoto Sato
58107e52a8 8233048: WeekFields.ISO is not a singleton
Reviewed-by: joehw, rriggs, scolebourne
2020-07-31 09:09:53 -07:00
Vicente Romero
0f5e57aa8c 8250741: an annotation interface may not be declared as a local interface
Reviewed-by: jlahoda
2020-07-31 12:05:55 -04:00
Patrick Concannon
7fd5cb6117 8242885: PlainDatagramSocketImpl doesn’t allow for the sending of IPv6 datagrams on macOS with sizes between 65508-65527 bytes
This fix changes the current max size for IPv6 datagrams on macOS from it's current size of 65507, which is the IPv4 limit, to 65527, the actual limit for IPv6 on macOS

Reviewed-by: alanb, dfuchs, vtewari
2020-07-31 12:42:32 +01:00
Patrick Concannon
2dda9965cd 8246164: SendDatagramToBadAddress.java and ChangingAddress.java should be changed to explicitly require the new DatagramSocket implementation
This fix updates these tests to explicitly run with `-Djdk.net.usePlainDatagramSocketImpl=false` to avoid false failures when running all tests with a global jtreg -Djdk.net.usePlainDatagramSocketImpl switch.

Reviewed-by: vtewari
2020-07-31 12:12:49 +01:00
Hannes Wallnöfer
1cc8d3a34b 8241518: Member signature parameter span contains closing but not opening parens
Reviewed-by: prappo
2020-07-31 12:09:59 +02:00
Pankaj Bansal
38636a8c96 8233635: [TESTBUG] ProgressMonitorEscapeKeyPress.java fails on macos
Reviewed-by: psadhukhan
2020-07-31 13:25:15 +05:30
Richard Reingruber
c4bb35ef33 8249293: Unsafe stackwalk in VM_GetOrSetLocal::doit_prologue()
Reviewed-by: sspitsyn, dholmes
2020-07-31 09:07:29 +02:00
Kim Barrett
52117c6f62 8251850: Refactor ResourceMark and DeoptResourceMark for better code sharing
Move saved state to ResourceArea, merge most of marks into shared helper.

Reviewed-by: stuefe, iklam, tschatzl, xliu, vlivanov
2020-08-25 22:17:04 -04:00
Vladimir Kozlov
0ea0338055 8252331: JDK-8252058 is causing failures in Tier1
Added Graal changes which were missing in 8252058 push.

Reviewed-by: dcubed
2020-08-25 15:00:37 -07:00
Yudi Zheng
13c176bee4 8252058: [JVMCI] Rework setting is_method_handle_invoke flag in jvmciCodeInstaller
Reviewed-by: kvn, dlong
2020-08-25 22:23:08 +02:00
Roger Riggs
afce1f4ebd 8251203: Fix "no comment" warnings in java.base/java.lang and java/io
Reviewed-by: dfuchs, lancea, mchung, naoto
2020-08-25 10:20:14 -04:00
Jie Fu
5585e6f63a 8251155: HostIdentifier fails to canonicalize hostnames starting with digits
Reviewed-by: sspitsyn, redestad
2020-08-05 15:07:25 +08:00
Andy Herrick
9e6782d24b 8251988: jpackage --runtime-image fails on mac when using JDK11 based runtime
Reviewed-by: asemenyuk, almatvee, prr
2020-08-25 07:54:59 -04:00
Vipin Sharma
d4626d89cc 8251542: Several small Javadoc errors in java.base
Fixing wrong exception type in throws clause and wrong return type description

Reviewed-by: darcy, dfuchs, mullan, mchung, rriggs
2020-08-25 09:27:36 +01:00
Jose Ziviani
eaeddeddb1 8248190: Enable Power10 system and implement new byte-reverse instructions
Reviewed-by: mdoerr, stuefe
2020-08-25 09:01:54 +09:00
Lin Zang
8ebe591a28 8252101: Add description of expected behavior of using "live" and "all" options together for jmap
Update description

Reviewed-by: dcubed, sspitsyn, phh
2020-08-24 13:48:17 -07:00
Lin Zang
58a3e40a5c 8251848: JMap.histo() and JMap.dump() should parse sub-arguments similarly
Update JMap histo/dump parsing code

Reviewed-by: sspitsyn, phh
2020-08-24 13:47:33 -07:00
Igor Ignatyev
8ce2053723 8252186: remove FileInstaller action from vmTestbase/jit/graph tests
Reviewed-by: kvn
2020-08-24 13:23:34 -07:00
Attila Szegedi
97f8261e41 8252124: Restore Dynalink tests
Reviewed-by: sundar
2020-08-23 14:58:59 +02:00
Ioi Lam
e4eaa2377b 8252056: Move DumpRegion/ReadClosure/WriteClosure to archiveUtils.hpp
Reviewed-by: ccheung, minqi
2020-08-22 17:09:41 -07:00
Yumin Qi
56881d6465 8249096: Clean up code for DumpLoadedClassList
Clean up code for DumpLoadedClassList output code, centralize in InstanceKlass.

Reviewed-by: iklam, dcubed
2020-08-21 22:23:12 -07:00
Igor Ignatyev
d5c4c292a0 6501010: test/java/io/File/GetXSpace.java fails on Windows
Reviewed-by: bpb
2020-07-30 19:39:44 -07:00
Koichi Sakata
e3c6574ac0 8250863: Build error with GCC 10 in NetworkInterface.c and k_standard.c
Reviewed-by: aph, ysuenaga
2020-07-31 09:15:57 +09:00
Sergey Bylokhov
72b530aac4 8250755: Better cleanup for jdk/test/javax/imageio/plugins/shared/CanWriteSequence.java
Reviewed-by: jdv
2020-07-31 00:19:42 +01:00
Brian Burkhalter
d6035a522e 8249772: (ch) Improve sun/nio/ch/TestMaxCachedBufferSize.java
Reviewed-by: alanb
2020-07-30 15:06:29 -07:00
Hannes Wallnöfer
39892bf43f 8250779: Anchor is ignored when reloading a page in Chrome
Reviewed-by: prappo
2020-07-30 16:53:56 +02:00
Coleen Phillimore
9798a0846b 8249837: Avoid direct or implicit Thread::current() calls when we already have a current thread variable
Add current thread OR remove unneeded HandleMark

Reviewed-by: kvn, dholmes
2020-07-30 10:41:31 -04:00
Bernhard Urban
d3776c7d30 8248816: C1: Fix signature mismatch of LIRGenerator::strengh_reduce_multiply
Co-authored-by: Monica Beckwith <monica.beckwith@microsoft.com>
Co-authored-by: Ludovic Henry <luhenry@microsoft.com>
Reviewed-by: aph
2020-07-30 15:05:22 +02:00
David Holmes
07c3021936 8251460: Fix the biased-locking code in ObjectSynchronizer::FastHashCode
Reviewed-by: coleenp, dcubed, pchilanomate
2020-08-13 00:20:42 -04:00
Mikael Vidstedt
60745d14ec Added tag jdk-16+11 for changeset 5c18d696c7ce 2020-08-12 20:23:40 -07:00
Coleen Phillimore
5735fce331 8251489: universe.cpp includes too many headers
Reviewed-by: lfoltan, stuefe
2020-08-12 12:37:16 -04:00
Alexey Semenyuk
ee2e61d7e0 8232621: L10n issues with msi installers
Reviewed-by: herrick, almatvee
2020-08-12 11:38:30 -04:00
Alexander Scherbatiy
c55e52e01f 8241053: Hotspot runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java test fails on Alpine Linux with debug build
Reviewed-by: dholmes, stuefe, dsamersoff
2020-08-12 15:01:12 +03:00
Coleen Phillimore
7f0777ae88 8251336: OopHandle release can not be called in a safepoint
Release OopStorage oops for threadObj for exiting threads outside the service lock region that is marked as safe for safepoint.

Reviewed-by: zgu, dholmes, kbarrett
2020-08-12 07:54:17 -04:00
Conor Cleary
831f23ee86 8246707: (sc) SocketChannel.read/write throws AsynchronousCloseException on closed channel
This fix addresses an issue where an AsynchronousCloseException was being thrown instead of a ChannelClosedException when SocketChannel.write() is called on a closed SocketChannel.

Reviewed-by: alanb, chegar, dfuchs
2020-08-12 12:32:54 +01:00
Roman Kennke
c540da3c4c 8251451: Shenandoah: Remark ObjectSynchronizer roots with I-U
Reviewed-by: shade
2020-08-12 13:19:44 +02:00
Aleksei Efimov
6a5203877e 8251189: com/sun/jndi/ldap/LdapDnsProviderTest.java failed due to timeout
Reviewed-by: dfuchs, vtewari
2020-08-12 12:01:52 +01:00
Aleksei Efimov
d502554467 8250772: Test com/sun/jndi/ldap/NamingExceptionMessageTest.java fails intermittently with javax.naming.ServiceUnavailableException
Reviewed-by: dfuchs
2020-08-12 11:45:18 +01:00
Christian Hagedorn
9885ac18ac 8249603: C1: assert(has_error == false) failed: register allocation invalid
Added bailout in combine_spilled_intervals() to avoid an overlap between two intervals

Reviewed-by: kvn, thartmann
2020-08-12 08:45:44 +02:00
Ioi Lam
178eea6065 8249276: CDS archived objects must have "neutral" markwords
Reviewed-by: coleenp, dholmes
2020-08-11 22:05:56 -07:00
Vladimir Kozlov
a5ae1e306e 8251306: compiler/aot/cli/jaotc/IgnoreErrorsTest.java timed out on MacOS
Icrease test timout to 6 min

Reviewed-by: iignatyev
2020-08-11 19:44:40 -07:00
David Holmes
fe5817aae8 8251383: Disable Event::log from linux_mprotect when processing the assertion poison page
Reviewed-by: stuefe, dcubed
2020-08-11 20:05:58 -04:00
Clive Verghese
832d896443 8251268: Move PhaseChaitin definitions from live.cpp to chaitin.cpp
Move PhaseChaitin verify_base_ptrs() and verify() from live.cpp to chaitin.cpp

Reviewed-by: chagedorn, kvn
2020-08-11 15:32:55 -07:00
Lance Andersen
dc8026d66d 8251205: Add missing javadoc comments to ZipConstants.java
Reviewed-by: naoto, rriggs
2020-08-11 15:41:47 -04:00
Zhengyu Gu
7ca448b4fc 8251359: Shenandoah: filter null oops before calling enqueue/SATB barrier
Reviewed-by: shade
2020-08-11 14:41:52 -04:00
Prasanta Sadhukhan
fff8122978 8146451: javax/swing/JComponent/4337267/bug4337267.java failed on Windows
Reviewed-by: serb
2020-07-29 17:29:45 +05:30
Prasanta Sadhukhan
8812113984 8169959: javax/swing/JTable/6263446/bug6263446.java: Table should be editing
Reviewed-by: serb
2020-07-28 12:07:20 +05:30
Prasanta Sadhukhan
74eb250e36 8246742: ServiceUI.printDialog does not support properties dialog
Reviewed-by: prr, jdv
2020-07-28 12:00:55 +05:30
Huang Wang
846d21961c 8250609: C2 crash in IfNode::fold_compares
Reviewed-by: kvn, chagedorn
2020-07-28 10:38:04 +08:00
Dean Long
6986d53af9 8248597: [Graal] api/java_security/SignatureSpi/DelegationTests.html fails with Method "javasoft.sqe.tests.api.java.security.SignatureSpi.JCKSignatureSpi.clear" doesn't exist
Reviewed-by: kvn
2020-07-29 23:15:48 -07:00
Matthias Baesken
11a8c9c13e 8250770: Net.java translateToSocketException does not handle IOException
Reviewed-by: alanb, dfuchs
2020-07-29 12:56:02 +02:00
Mikael Vidstedt
7efa6090e8 Added tag jdk-15+34 for changeset b0817631d2f4 2020-07-29 18:24:00 -07:00
Igor Ignatyev
03cf1c3a83 8250688: missed open parenthesis for GTEST_FRAMEWORK_SRC var in Main.gmk
Reviewed-by: erikj
2020-07-28 09:05:06 -07:00
Zhengyu Gu
3a8a15b5d0 8250588: Shenandoah: LRB needs to save/restore fp registers for runtime call
Reviewed-by: rkennke
2020-07-28 10:32:57 -04:00
Evgeny Nikitin
3c276ce1fe 8067651: LevelTransitionTest.java, fix trivial methods levels logic
Make test method really trivial, adjust trivial logic, make logic independent of background compilation.

Reviewed-by: iignatyev, thartmann, kvn
2020-07-27 21:17:44 +02:00
Raffaello Giulietti
4ac45a3b50 8245036: DataInputStream.readFully(byte[], int, int) does not throw expected IndexOutOfBoundsExceptions
Reviewed-by: bpb
2020-08-07 12:58:40 -07:00
Patrick Concannon
c8c4d8377a 8250886: java/net/DatagramSocket/SendReceiveMaxSize.java fails in timeout
SO_RCVBUF was previously set to match the SO_SNDBUF, however the kernel value for SO_RCVBUF is much larger. This mismatch caused the test to fail, and the fix removes this issue.

Reviewed-by: alanb, dfuchs
2020-08-07 20:39:10 +01:00
Thomas Schatzl
9852a6f75c 8248401: Refactor/unify RMI gc support functionality
Move recent timestamp of most recent whole heap liveness analysis into CollectedHeap, removing the duplicates in all collectors

Reviewed-by: kbarrett, ayang, stefank
2020-08-07 19:23:53 +02:00
Vladimir Kozlov
1ad1659413 8251260: two MD5 tests fail "RuntimeException: Unexpected count of intrinsic"
Do not run intrinsics/sha/sanity tests with AOTed java.base

Reviewed-by: vlivanov
2020-08-07 10:16:19 -07:00
Andy Herrick
e800cc2d2d 8251184: File association without description causes exception
Reviewed-by: asemenyuk, almatvee
2020-08-07 11:42:42 -04:00
Daniel Fuchs
77c46ea911 8229822: ThrowingPushPromises tests sometimes fail due to EOF
SocketTube is fixed to cater for errors caused by pausing/resuming events on an asynchronously closed connection, from within the selector's manager thread. Http2Connection and Stream are fixed to prevent sending a DataFrame on a stream after Reset has been sent.

Reviewed-by: chegar
2020-08-07 16:16:45 +01:00
Daniel Fuchs
45c89daf72 8249786: java/net/httpclient/websocket/PendingPingTextClose.java fails very infrequently
TransportImpl is modified to make sure the CLOSED state is recorded before the channel is closed. The tests are modified to enable their retry mechanism on windows, similar to what was done previously for macOS.

Reviewed-by: prappo, chegar
2020-08-07 15:09:19 +01:00
Coleen Phillimore
0c9e0c2e7f 8244997: Convert the JavaThread::_threadObj oop to use OopStorage
Move the oop and handle releasing it in the service thread.  Remove Universe::oops_do from callers.

Co-authored-by: Erik Osterlund <erik.osterlund@oracle.com>
Co-authored-by: Tom Rodriguez <tom.rodriguez@oracle.com>
Reviewed-by: dholmes, zgu, eosterlund, cjplummer
2020-08-07 07:53:26 -04:00
Markus Grönlund
4d3baa2d37 8251179: Word tearing problem with _last_sweep
Reviewed-by: coleenp, dholmes, kbarrett
2020-08-07 11:52:09 +02:00
Dong Bo
c148c2c176 8165404: AArch64: Implement SHA512 accelerator/intrinsic
Reviewed-by: aph
2020-08-07 12:35:30 +08:00
Mikael Vidstedt
555f0e6e2a Added tag jdk-16+10 for changeset b01985b4f88f 2020-08-06 20:56:46 -07:00
Gabriel Reid
12879e91b4 8250928: JFR: Improve hash algorithm for stack traces
Reviewed-by: egahlin
2020-08-07 04:21:57 +02:00
Leo Jiang
ef86f06c42 8250665: Wrong translation for the month name of May in ar_JO,LB,SY
Reviewed-by: naoto
2020-08-07 01:48:31 +00:00
Brian Burkhalter
70885cae5e Merge 2020-08-06 18:27:33 -07:00
Brian Burkhalter
d02e7d55e8 8251272: Typo in java.util.Formatter: "Numberic" should be "Numeric"
Reviewed-by: bchristi, naoto, jlaskey
2020-08-06 18:23:21 -07:00
Chris Plummer
db46b297fa 8251121: six SA tests leave core files behind on macOS
Reviewed-by: dholmes, dcubed
2020-08-06 18:21:21 -07:00
David Holmes
c202bd705e 8250606: Remove unnecessary assertions in ObjectSynchronizer FastHashcode and inflate
Reviewed-by: dcubed, coleenp
2020-08-06 21:03:18 -04:00
Alex Menkov
111ba18ac6 8249550: jdb should use loopback address when not using remote agent
Reviewed-by: cjplummer, sspitsyn
2020-08-06 15:59:47 -07:00
Leonid Mesnik
c02b75705f 8161684: [testconf] Add VerifyOops' testing into compiler tiers
Reviewed-by: kvn
2020-08-06 13:29:15 -07:00
Chris Plummer
9886b7e9e9 8248879: SA core file support on OSX has some bugs trying to locate the jvm libraries
Reviewed-by: sspitsyn, amenkov
2020-08-06 13:14:15 -07:00
Lois Foltan
deaadfad52 8247938: Change various JVM enums like LinkInfo::AccessCheck and Klass::DefaultsLookupMode to enum class
Use C++11 scoped enumeration declarations for several different Klass and LinkInfo enumerations.

Reviewed-by: coleenp, hseigel, kbarrett
2020-08-06 18:13:56 +00:00
Joe Darcy
99c7b2b85b 8249273: Documentation of BigInteger(String) constructor does not mention leading plus
Reviewed-by: bpb
2020-08-06 09:58:57 -07:00
Chihiro Ito
db4d59cc0c 8250912: Recording#copy() doesn't copy the flush interval
Reviewed-by: jbachorik
2020-08-06 23:47:55 +09:00
Zhengyu Gu
b0e4e9a2e4 8251192: Shenandoah: Shenandoah build failed after JDK-8235573
Reviewed-by: stuefe, ysuenaga, adityam
2020-08-06 08:30:37 -04:00
Joe Darcy
2d3372c8b5 8250660: Clarify that WildcardType and AnnotatedWildcardType bounds methods return one
Reviewed-by: mchung, dholmes
2020-08-05 23:02:22 -07:00
Mikael Vidstedt
dc86b2e22b Added tag jdk-16+9 for changeset c075a286cc7d 2020-08-05 19:05:05 -07:00
Igor Ignatyev
b37b1a391a 8251126: nsk.share.GoldChecker should read golden file from ${test.src}
Reviewed-by: dholmes
2020-08-05 16:39:38 -07:00
Igor Ignatyev
65577cf58a 8251132: make main classes public in vmTestbase/jit tests
Reviewed-by: kvn
2020-08-05 16:39:08 -07:00
Brian Burkhalter
3ea5fdc9ac 8235792: LineNumberReader.getLineNumber() behavior is inconsistent with respect to EOF
Reviewed-by: alanb, darcy, rriggs
2020-08-05 11:40:07 -07:00
Ludovic Henry
339016a0f2 8250902: Implement MD5 Intrinsics on x86
Reviewed-by: kvn, vdeshpande, ascarpino
2020-08-05 11:32:15 -07:00
Prasanta Sadhukhan
831e98327b Merge 2020-07-26 14:46:36 +05:30
Joe Darcy
dfd3080c05 8250583: Address reliance on default constructors in java.management
Reviewed-by: alanb
2020-07-25 12:49:09 -07:00
Prasanta Sadhukhan
091b0c95c3 Merge 2020-07-25 12:48:29 +05:30
Doug Simon
41eaa00eed 8250548: libgraal can deadlock in -Xcomp mode
Reviewed-by: never, kvn
2020-07-25 08:41:51 +02:00
Aleksei Voitylov
5a365e8627 8248239: jpackage adds some arguments twice in case it is re-executed by JLI
Reviewed-by: herrick, almatvee
2020-07-24 19:54:01 -04:00
Joe Darcy
c0b9999c35 8250578: Address reliance on default constructors in javax.sql
Reviewed-by: lancea
2020-07-25 09:46:08 -07:00
Joe Darcy
0e54ce2a8e 8250244: Address reliance on default constructors in java.net
Reviewed-by: alanb, vtewari
2020-07-25 09:42:45 -07:00
Coleen Phillimore
ac4dc0470e 8250519: [REDO] Move mirror oops from Universe into OopStorage
Redo the patch but add a null pointer check where one belongs.

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

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

Reviewed-by: dcubed
2020-07-24 18:44:27 +00:00
Erik Joelsson
fcd5d414d6 8246094: [macos] Sound Recording and playback is not working
Reviewed-by: prr, serb
2020-07-24 10:52:02 -07:00
Yumin Qi
4b076cb93f 8249624: update appcds/sharedStrings/IncompatibleOptions test in view of 8081416 closed as WNF
With CDS can archive with compressed oops off, the result of the test gives correct information.

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

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

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

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

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

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

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

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

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

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

Reviewed-by: sspitsyn, dholmes, coleenp, dcubed
2020-07-23 21:10:52 +02:00
Joe Darcy
bb6647c845 8250221: Address use of default constructors in java.logging
Reviewed-by: lancea
2020-07-23 11:26:23 -07:00
Mark Reinhold
8a9d2b08a0 8250216: The README need not mention retrieving source code
Reviewed-by: darcy, erikj
2020-07-23 10:40:52 -07:00
Robert Field
6e198fec0b 8249197: JShell: variable declaration with unicode type name gets garbled result
8249199: JShell: Consistent representation of unicode

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

Reviewed-by: jlaskey, joehw, rriggs, bchristi
2020-07-23 08:46:31 -07:00
Roman Kennke
a28f4100ce 8249787: Make TestGCLocker more resilient with concurrent GCs
Reviewed-by: eosterlund, tschatzl
2020-07-23 14:44:13 +02:00
Aleksey Shipilev
dc80e63811 8249953: Shenandoah: gc/shenandoah/mxbeans tests should account for corner cases
Reviewed-by: rkennke
2020-07-23 12:46:24 +02:00
Doug Simon
63d2421c3b 8249888: failure to create a libgraal JavaVM should result in a VM crash
Reviewed-by: never, kvn
2020-07-23 11:47:20 +02:00
Alexander Scherbatiy
993b1b0afa 8249612: Remove unused ISNANF and ISNAND from jdk_util_md.h
Reviewed-by: darcy
2020-07-23 11:39:56 +03:00
Mikael Vidstedt
54ad4f9a80 Added tag jdk-15+33 for changeset 6b65f4e7a975 2020-07-22 19:17:32 -07:00
Bob Vandette
33016a8325 8249880: JVMCI calling register_nmethod without CodeCache lock
Reviewed-by: eosterlund, kvn, never
2020-07-22 17:59:33 +00:00
Phil Race
b1ff2bd00a 8249821: Separate libharfbuzz from libfontmanager
Reviewed-by: erikj
2020-07-22 07:46:50 -07:00
Bernhard Urban-Forster
2f8653fbf0 8248666: AArch64: Use THREAD_LOCAL instead of __thread
__thread is gcc-ism, instead rely on compiler independent macro.

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

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

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

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

Reviewed-by: jlaskey, mdoerr, ihse, erikj
2020-07-22 00:13:53 -04:00
Jamsheed Mohammed C M
39b22d134f 8242895: failed: sanity at src/hotspot/share/opto/escape.cpp:2361
The address_offset code in EA was improved to detect raw stores(init captured ones) after loopopt.

Reviewed-by: kvn, thartmann
2020-07-21 08:03:20 -07:00
Bernhard Urban-Forster
dff37f89c5 8248671: AArch64: Remove unused variables
Remove unused variables in the AArch64 backend. Detected by compiling with MSVC, which warns about them.

Reviewed-by: aph, dholmes
2020-07-21 10:32:52 -04:00
Mikael Vidstedt
9ff01f7b2f Merge 2020-07-21 20:55:29 -07:00
Markus Grönlund
c7b074a9db 8249713: JFR: java.base events have incomplete stacktraces
Reviewed-by: egahlin
2020-07-21 11:54:19 +02:00
Igor Ignatyev
f8c1d79917 8249697: remove temporary fixes from java/lang/invoke/RicochetTest.java
Reviewed-by: mchung
2020-07-20 12:16:35 -07:00
Vladimir A Ivanov
cd98f7d5bf 8249672: Include microcode revision in features_string on x86
Reviewed-by: kvn, stuefe
2020-07-21 13:06:45 -07:00
Roman Kennke
006d0bcec1 8249801: Shenandoah: Clear soft-refs on requested GC cycle
Reviewed-by: shade
2020-07-21 17:27:44 +02:00
Thomas Stuefe
a20c31865d 8249748: gtest silently ignores bad jvm arguments
Reviewed-by: shade, dholmes, iignatyev
2020-07-21 16:46:37 +02:00
Daniel Fuchs
d116022893 8249774: Add java/foreign/TestMismatch.java to ProblemList.txt
Reviewed-by: lancea
2020-07-20 20:33:59 +01:00
Mandy Chung
35554ea085 8217527: jmod hash does not work if --hash-module does not include the target module
Reviewed-by: alanb
2020-07-20 11:40:03 -07:00
Vicente Romero
3a69dfb5c5 8245652: some tests at RecordCompilationTests are resetting the wrong compilation options
Reviewed-by: darcy
2020-07-20 12:14:44 -04:00
Igor Ignatyev
8d97637cf2 8249700: java/io/File/GetXSpace.java should be added to exclude list, and not @ignore-d
Reviewed-by: alanb
2020-07-20 09:11:53 -07:00
Igor Ignatyev
af0d6d28b0 8249698: java/lang/invoke/LFCaching/LFGarbageCollectedTest.java should be ProblemList-ed and not @ignored
Reviewed-by: kvn, mchung
2020-07-20 09:11:51 -07:00
Coleen Phillimore
6ee76b6b05 8249760: Unnecessary #include oopStorageSet
Reviewed-by: hseigel
2020-07-20 10:53:29 -04:00
Igor Ignatyev
ac38b399de 8249681: gc/stress/TestJNIBlockFullGC/TestJNIBlockFullGC.java fails w/ UnsatisfiedLinkError
Reviewed-by: tschatzl
2020-07-17 15:01:10 -07:00
Igor Ignatyev
4a4003e900 8249678: @ignore should be used instead of ProblemList for 8158860, 8163894, 8193479, 8194310
Reviewed-by: kvn
2020-07-17 11:54:14 -07:00
Igor Ignatyev
1c882d91f0 8249673: cleanup graal problem lists
Reviewed-by: kvn
2020-07-17 10:51:55 -07:00
Igor Ignatyev
24a7d8c766 8249622: use 8249621 to ignore 8 jvmci tests
Reviewed-by: kvn, epavlova
2020-07-16 20:03:10 -07:00
Jerry Zhou
4d13bf33d4 8249628: Remove EA from JDK 15 version string starting with Initial RC promotion
Reviewed-by: tbell, erikj
2020-07-17 01:50:44 +00:00
Jamsheed Mohammed C M
d63aebe6cb 8246381: VM crashes with "Current BasicObjectLock* below than low_mark"
Save and restores "donotunlock" flag in check_and_handle_async_exceptions

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

Reviewed-by: rfield, cstein
2020-07-16 11:30:11 +02:00
Matthias Baesken
3e641b796f 8249588: libwindowsaccessbridge issues on 64bit Windows
Reviewed-by: arapte, prr
2020-07-16 09:52:48 +02:00
Phil Race
631085bdfd Merge 2020-07-21 13:55:53 -07:00
Phil Race
1ce6ec6a28 8199529: javax/swing/text/Utilities/8142966/SwingFontMetricsTest.java fails on windows
Reviewed-by: serb, psadhukhan
2020-07-21 13:14:35 -07:00
Phil Race
3ec5f6b374 8249725: testbug: ZeroWithStringBoundsTest.java needs update to copyright header
Reviewed-by: jdv
2020-07-20 08:13:02 -07:00
Phil Race
ca2df0e543 8245159: Font.getStringBounds() throws IAE for empty string if the Font has layout attributes
Reviewed-by: serb
2020-07-19 11:03:50 -07:00
Prasanta Sadhukhan
df3c55230e 8042055: Nimbus DerivedColor incorrectly clamps hue
Reviewed-by: serb
2020-07-18 12:12:41 +05:30
Prasanta Sadhukhan
c9f9fde366 8245785: javax.swing.JTabbedPane cannot be deserialized
Reviewed-by: serb, prr, kizune
2020-07-18 12:10:35 +05:30
Tejpal Rebari
39d4b22fc0 8249619: Nimbus L&F Fix for 8041701 is causing some Nimbus tests to fail
Reviewed-by: prr
2020-07-17 10:05:38 -07:00
Jie Fu
507e54840f 8246805: Incorrect copyright header in TestInvalidTieredStopAtLevel.java
Reviewed-by: mikael, iignatyev
2020-07-16 10:30:39 +08:00
Mikael Vidstedt
1108a4a77c Added tag jdk-15+32 for changeset 2dad000726b8 2020-07-15 19:19:36 -07:00
Ambarish Rapte
18f3591a1b 8249278: Revert JDK-8226253 which breaks the spec of AccessibleState.SHOWING for JList
Reviewed-by: prr, serb
2020-07-16 06:35:01 +05:30
Ambarish Rapte
d11b0078a1 8249278: Revert JDK-8226253 which breaks the spec of AccessibleState.SHOWING for JList
Reviewed-by: prr, serb
2020-07-16 04:47:27 +05:30
Mark Reinhold
55039aa1c6 8249205: Remove unnecessary trademark symbols
Reviewed-by: darcy, lancea, bpb, prr, jjg, cjplummer, iris, dfuchs, weijun, joehw, wetmore, bchristi
2020-07-15 14:21:54 -07:00
Daniel D. Daugherty
24f4f14c3d Merge 2020-07-15 17:08:28 -04:00
Daniel D. Daugherty
f636b84f48 8246676: monitor list lock operations need more fencing
Reviewed-by: dholmes, eosterlund, rehn, pchilanomate
2020-07-15 17:01:38 -04:00
Daniel D. Daugherty
62d77dc3fc 8247280: more fencing needed in async deflation for non-TSO machines
Reviewed-by: dholmes, pchilanomate
2020-07-15 16:59:39 -04:00
Tom Rodriguez
8cfc7e39df 8248524: [JVMCI] Memory corruption / segfault during NumPy installation
Reviewed-by: kvn
2020-07-15 12:17:19 -07:00
Igor Ignatyev
e07ad838b5 8249040: clean up FileInstaller $test.src $cwd in vmTestbase_nsk_jdb tests
Reviewed-by: dholmes
2020-07-15 11:34:34 -07:00
Igor Ignatyev
b27e717c56 8249034: clean up FileInstaller $test.src $cwd in vmTestbase_nsk_jvmti tests
Reviewed-by: sspitsyn
2020-07-15 11:33:43 -07:00
Igor Ignatyev
1b5391264a 8249039: clean up FileInstaller $test.src $cwd in vmTestbase_nsk_aod tests
Reviewed-by: dholmes, sspitsyn
2020-07-15 11:31:35 -07:00
Pankaj Bansal
be2a92d8c7 8249251: [dark_mode ubuntu 20.04] The selected menu is not highlighted in GTKLookAndFeel
Reviewed-by: serb, prr
2020-07-15 23:40:18 +05:30
Ekaterina Pavlova
681d06d39b 8242388: compiler/graalunit/CoreTest.java timed out
Reviewed-by: kvn
2020-07-15 10:26:48 -07:00
Goetz Lindenmaier
8906904591 8248476: No helpful NullPointerException message after calling fillInStackTrace
Reported by christoph.dreis@freenet.de

Reviewed-by: coleenp, dholmes, mchung
2020-07-15 18:47:47 +02:00
Jim Laskey
a640835c62 8249258: java/util/StringJoiner/StringJoinerTest.java failed due to OOM
Reviewed-by: dcubed, rriggs
2020-07-15 09:22:29 -03:00
Henry Jen
d7c1bb1fb7 Merge 2020-07-14 19:11:16 +00:00
Igor Ignatyev
6d201dbba6 8249036: clean up FileInstaller $test.src $cwd in vmTestbase_nsk_stress tests
Reviewed-by: kvn
2020-07-14 11:24:39 -07:00
Igor Ignatyev
919eb12b14 8249032: clean up FileInstaller $test.src $cwd in vmTestbase_nsk_sysdict tests
Reviewed-by: dholmes
2020-07-14 11:16:00 -07:00
Igor Ignatyev
6c95a87157 8249035: clean up FileInstaller $test.src $cwd in vmTestbase_nsk_jdwp tests
Reviewed-by: dholmes
2020-07-14 11:10:40 -07:00
Igor Ignatyev
ba1db57dde 8249028: clean up FileInstaller $test.src $cwd in vmTestbase_nsk_monitoring tests
Reviewed-by: dholmes
2020-07-14 11:09:34 -07:00
Igor Ignatyev
765abcb329 8249033: clean up FileInstaller $test.src $cwd in vmTestbase_vm_metaspace tests
Reviewed-by: dholmes
2020-07-14 11:09:06 -07:00
Igor Ignatyev
606aad5dc8 8249029: clean up FileInstaller $test.src $cwd in vmTestbase_vm_defmeth tests
Reviewed-by: dholmes
2020-07-14 11:08:21 -07:00
Henry Jen
52977fd914 Merge 2020-07-14 17:25:17 +00:00
Ekaterina Pavlova
265b36ff28 8236809: [Graal] java/lang/Class/getDeclaredField/FieldSetAccessibleTest.java timeouts
Reviewed-by: kvn
2020-07-14 10:07:32 -07:00
Matthias Baesken
7a0914c44c 8248802: Add log helper methods to FontUtilities.java
Reviewed-by: clanger, jdv
2020-07-14 17:02:48 +02:00
Tejpal Rebari
13bcda40dc 8041701: Nimbus JTree renderer properties persist across L&F changes
Reviewed-by: serb, psadhukhan
2020-07-15 11:37:55 +05:30
Erik Joelsson
a9b7ae8ac2 8249255: Build fails if source code in cygwin home dir
Reviewed-by: tbell
2020-07-14 07:09:11 -07:00
Vladimir Ivanov
7a6c1a66b2 8247502: PhaseStringOpts crashes while optimising effectively dead code
Reviewed-by: kvn, thartmann
2020-07-14 16:57:34 +03:00
Alexander Matveev
be04c8c724 8249256: [macos] Add EmptyFolderPackageTest test to problem list
Reviewed-by: herrick
2020-07-13 18:08:26 -07:00
Henry Jen
92be493f0b Merge 2020-07-13 20:46:15 +00:00
Hannes Wallnöfer
77c83d9ee6 8236935: Improve UX of the search control
Reviewed-by: jjg, prappo
2020-07-13 11:33:50 +02:00
Zhengyu Gu
5b2fd36a6d 8247670: Shenandoah: deadlock during class unloading OOME
Reviewed-by: rkennke
2020-07-10 11:40:57 -04:00
Igor Ignatyev
04280a0d05 8249000: vm.gc.X should take selected JIT into account
Reviewed-by: kvn
2020-07-10 11:52:35 -07:00
Igor Ignatyev
c5ad1daa96 8249019: clean up FileInstaller $test.src $cwd in vmTestbase_vm_compiler tests
Reviewed-by: kvn, epavlova
2020-07-10 11:49:58 -07:00
Igor Ignatyev
9bbec0433c 8249038: clean up FileInstaller $test.src $cwd in vmTestbase_vm_gc tests
Reviewed-by: kbarrett
2020-07-10 11:49:02 -07:00
Roger Riggs
a376fb7720 8217475: Unexpected StackOverflowError in "process reaper" thread
Reviewed-by: martin, dholmes
2020-07-10 09:17:00 -04:00
Roland Westrelin
32482c82a6 8248598: [Graal] Several testcases from applications/jcstress/acqrel.java fails with forbidden state
Reviewed-by: dlong
2020-07-09 10:20:32 +02:00
Tejpal Rebari
54c0178787 8041705: Bugs in DefaultTreeCellRenderer.updateUI()
Reviewed-by: psadhukhan, pbansal
2020-07-09 12:59:25 +05:30
Patric Hedlin
3e0dc68883 8248901: Signed immediate support in .../share/assembler.hpp is broken
Reviewed-by: neliasso, kvn, thartmann
2020-07-06 21:29:51 +02:00
Chihiro Ito
ba2caf0014 8249720: Generated bytecodes of EventWriter don't be output to the log
Reviewed-by: egahlin
2020-07-20 22:43:28 +09:00
Yu Li
907719baec 8245694: java.util.Properties.entrySet() does not override Object methods
Add missing override methods

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

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

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

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

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

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

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

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

Reviewed-by: kbarrett
2020-07-03 16:32:33 +02:00
Thomas Schatzl
6c89a9653e 8248306: gc/stress/gclocker/TestExcessGCLockerCollections.java does not compile
Update the test to use the method suggested in JDK-8244010.

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

Reviewed-by: alanb, dfuchs
2020-07-03 10:19:54 +01:00
Roman Kennke
5cf33168d7 8248725: Shenandoah: Claim verifier thread roots for parallel processing
Reviewed-by: shade
2020-07-03 11:09:59 +02:00
Nils Eliasson
999357250a 8248388: ZGC: Load barrier incorrectly elided in jdk/java/text/Format/DateFormat/SDFTCKZoneNamesTest.java
Reviewed-by: kvn, thartmann
2020-07-03 10:05:53 +02:00
Prasanta Sadhukhan
396146854b Merge 2020-07-03 09:26:16 +05:30
Chris Plummer
af51a73224 8244383: jhsdb/HeapDumpTestWithActiveProcess.java fails with "AssertionFailure: illegal bci"
Reviewed-by: sspitsyn, dcubed, dtitov
2020-07-02 17:19:16 -07:00
Joe Wang
e0c26b37fd 8248348: Regression caused by the update to BCEL 6.0
Reviewed-by: smarks, plevart
2020-07-03 00:09:45 +00:00
Jesper Wilhelmsson
6b8bf62a75 Merge 2020-07-03 00:14:21 +02:00
Chris Plummer
4858141ce4 8247533: SA stack walking sometimes fails with sun.jvm.hotspot.debugger.DebuggerException: get_thread_regs failed for a lwp
Reviewed-by: sspitsyn, ysuenaga, dtitov
2020-07-02 13:13:10 -07:00
Dean Long
8b7c959164 8247922: Update Graal
Reviewed-by: kvn
2020-07-02 13:03:32 -07:00
Vladimir Kozlov
ec25b42804 8076985: Allocation path: biased locking + compressed oops code quality
Use 64-bit constant class pointer for loading class prototype header.

Reviewed-by: roland
2020-07-02 12:52:49 -07:00
Markus Grönlund
5a90271d01 8237488: jdk/jfr/event/compiler/TestCompilerCompile.java failed due to "RuntimeException: No thread in event"
Reviewed-by: egahlin
2020-07-02 21:13:41 +02:00
Jonathan Gibbons
579ed70629 8248417: some jdk/javadoc/doclet tests fail (JDK 16)
Reviewed-by: prappo
2020-07-02 11:06:16 -07:00
Vladimir Kempik
78b9de8e40 8248495: [macos] zerovm is broken due to libffi headers location
Reviewed-by: ihse, erikj
2020-07-02 20:33:06 +03:00
Jonathan Gibbons
dc0c0c7eca 8248060: small HTML issues in java.xml package-info.java files
Reviewed-by: joehw
2020-07-02 10:21:21 -07:00
Jesper Wilhelmsson
1eaa4116f5 Added tag jdk-16+4 for changeset e2622818f0bd 2020-07-02 18:39:35 +02:00
Doug Simon
4e962f9675 8248321: [JVMCI] improve libgraal logging and fatal error handling
Reviewed-by: kvn, never
2020-07-02 18:02:20 +02:00
Magnus Ihse Bursie
1356a0f1ac 8248667: Need support for building native libraries located in the test/lib directory
Reviewed-by: erikj
2020-07-02 17:35:03 +02:00
Igor Ignatyev
72ae322022 8208207: Test nsk/stress/jni/gclocker/gcl001 fails after co-location
Reviewed-by: tschatzl
2020-07-02 08:05:00 -07:00
Sean Coffey
3d9bad16d1 8218021: Have jarsigner preserve posix permission attributes
Reviewed-by: weijun, lancea, alanb
2020-07-02 08:17:31 +00:00
Thomas Schatzl
dc63bf261b 8248650: [BACKOUT] Backout JDK-8244603 because it generates too much noise in CI
Reviewed-by: kbarrett
2020-07-02 09:40:27 +02:00
Aleksey Shipilev
51937e18f8 8248634: Shenandoah: incorrect include in shenandoahInitLogger.cpp
Reviewed-by: rkennke
2020-07-02 08:32:45 +02:00
Aleksey Shipilev
00e0a60955 8248632: Shenandoah: build fails without both JVMTI and JFR
Reviewed-by: rkennke, zgu
2020-07-02 08:32:39 +02:00
Vyom Tiwari
5fbac4a34c 8244324: RTFEditorKit does not display some of Japanese characters correctly
Reviewed-by: serb, psadhukhan
2020-07-02 09:31:42 +05:30
Prasanta Sadhukhan
911c553cd2 8245921: Minor copy/paste issue in BasicScrollBarUI
Reviewed-by: serb
2020-07-02 09:29:42 +05:30
Prasanta Sadhukhan
c3ec97d41a 8248187: javax/swing/plaf/basic/BasicGraphicsUtils/8132119/bug8132119.java fails with String is not properly drawn
Reviewed-by: serb, pbansal
2020-07-02 09:27:58 +05:30
Jesper Wilhelmsson
43a2010936 Merge 2020-07-02 03:25:23 +02:00
Jesper Wilhelmsson
637fdbc83c Added tag jdk-16+4 for changeset 78c07dd72404 2020-07-02 03:19:33 +02:00
Jesper Wilhelmsson
2e65885257 Added tag jdk-15+30 for changeset 6909e4a1f25b 2020-07-02 03:15:27 +02:00
Alexander Matveev
55e7003fd5 8248059: [macos] EmptyFolderPackageTest.java failed "hdiutil: create failed - No child processes"
Reviewed-by: herrick, asemenyuk
2020-07-01 14:52:09 -04:00
Roland Westrelin
b67814941f 8229495: SIGILL in C2 generated OSR compilation
Reviewed-by: kvn, chagedorn
2020-07-01 17:28:49 +02:00
Christian Hagedorn
83a8c4acc7 8244724: CTW: C2 compilation fails with "Live Node limit exceeded limit"
Fix live limit assert in node construction to be ignored during code generation in Compile::Code_Gen().

Reviewed-by: kvn, neliasso
2020-07-01 09:18:28 +02:00
Pankaj Bansal
5699024184 8197560: test javax/swing/JTree/8003400/Test8003400.java fails
Reviewed-by: serb, psadhukhan
2020-07-01 09:14:59 +05:30
Jie Fu
7e93e03da5 8248612: Back quotes and double quotes must not be escaped in: Cannot convert \"$unix_path\" to Windows path
Reviewed-by: ihse
2020-07-01 10:27:10 +08:00
Vladimir Kozlov
bf04926d72 8005088: remove unused NativeInstruction::test methods
Reviewed-by: iignatyev
2020-07-01 15:37:56 -07:00
Calvin Cheung
dc74336a65 8243586: Optimize calls to SystemDictionaryShared::define_shared_package for classpath
Define_shared_package only needs to be called once for each package in a jar specified in the shared class path.

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

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

Reviewed-by: kvn, neliasso
2020-07-01 09:18:28 +02:00
Magnus Ihse Bursie
2a37607e98 8248563: Gtest CFLAGS/warnings is not properly handled
Reviewed-by: erikj
2020-07-01 01:56:52 +02:00
Yasumasa Suenaga
f5673586b7 8248526: configure script failed on WSL in May 2020 update
Reviewed-by: ihse
2020-07-01 07:23:48 +09:00
Jesper Wilhelmsson
545d56dd42 Merge 2020-06-30 20:59:15 +02:00
Daniel D. Daugherty
7d54e71d38 8246493: JDI stress/serial/mixed002 needs to use WhiteBox.deflateIdleMonitors support
Reviewed-by: cjplummer, sspitsyn
2020-06-30 15:24:01 -04:00
Jonathan Gibbons
46ff8fdce9 8248409: some jdk/javadoc/doclet tests fail (JDK 15)
Reviewed-by: prappo
2020-06-30 11:36:02 -07:00
Jesper Wilhelmsson
7c3d72fd3a Merge 2020-06-30 20:09:03 +02:00
Daniel Fuchs
0f43de9f02 8246114: java/net/MulticastSocket/Promiscuous.java fails after 8241072 (multi-homed systems)
Fixed the test - an IPv4 group cannot be joined from an interface that has no IPv4 address configured

Reviewed-by: alanb, amlu
2020-06-30 18:52:59 +01:00
Stefan Karlsson
a18e8d3d57 8248048: ZGC: AArch64: SIGILL in load barrier register spilling
Reviewed-by: adinn, aph
2020-06-30 19:20:22 +02:00
Alexey Semenyuk
8f26a1f748 8247229: jpackage tests failed due to "semop(1): encountered an error: Invalid argument"
Reviewed-by: herrick, almatvee
2020-07-09 16:11:55 -04:00
Vicente Romero
37880ba60d 8242529: javac defines type annotations incorrectly for record members (constructor and property accessor)
Reviewed-by: psandoz, jlahoda
2020-07-09 17:37:53 -04:00
Leo Jiang
1b1fb08000 8249086: JDK 15 L10N resource file update - msg drop 10
Reviewed-by: naoto
2020-07-09 17:04:06 +00:00
Igor Ignatyev
183dadbef2 8249037: clean up FileInstaller $test.src $cwd in vmTestbase_vm_g1classunloading tests
Reviewed-by: kbarrett
2020-07-09 09:05:58 -07:00
Jesper Wilhelmsson
2fe15bc62e Added tag jdk-15+31 for changeset a32f58c6b8be 2020-07-09 04:02:21 +02:00
Igor Veresov
69a9403995 8248822: 8 vm/classfmt/atr_ann/atr_rtm_annot007/atr_rtm_annot00709 tests fail w/ AOT
Remove Remove jdk.internal.reflect.ConstantPool intrinsics.

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

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

Reviewed-by: weijun, coffeys, mullan
2020-07-07 16:55:29 +00:00
Markus Grönlund
ca91da0e0c 8248794: Transition JFR Periodic Task Thread to "_thread_in_native" before invoking performance counters
Reviewed-by: egahlin
2020-07-07 17:52:55 +02:00
Stefan Karlsson
13750b6aca 8248048: ZGC: AArch64: SIGILL in load barrier register spilling
Reviewed-by: adinn, aph
2020-06-30 19:20:22 +02:00
Markus Grönlund
abc55dea7e 8248485: Poor scalability in JfrCheckpointManager when using many threads after JDK-8242008
Reviewed-by: egahlin
2020-06-30 19:00:14 +02:00
Kim Barrett
a338213bb4 8248545: Remove unneeded warning suppression of MSVC++ 4521/4522
Reviewed-by: tschatzl, ihse
2020-06-30 12:41:27 -04:00
Markus Grönlund
eb1bacc71b 8248475: Suppress unconditional warning "JFR will be disabled during CDS dumping"
Reviewed-by: redestad
2020-06-30 18:10:44 +02:00
Magnus Ihse Bursie
2de3595895 8248548: Use DISABLED_WARNINGS for globally disabled warnings on Visual Studio in Hotspot
Reviewed-by: kbarrett, erikj
2020-06-30 16:26:24 +02:00
Magnus Ihse Bursie
f19db799f3 8248547: Use SetupJdkLibrary for hotspot libraries
Reviewed-by: erikj
2020-06-30 16:23:34 +02:00
Matthias Baesken
f23c983a46 8248468: java/awt/font/DefaultFontTest/DefaultFontTest.java fails in SunFontManager.findFont2D
Reviewed-by: jdv
2020-06-29 09:59:45 +02:00
Yaofei Song
c7ecaa4a1d 8248219: aarch64: missing memory barrier in fast_storefield and fast_accessfield
Reviewed-by: aph
2020-06-28 16:47:25 +08:00
Markus Grönlund
1b3a127d06 8241803: JFR TestThreadStartEndEvents.java failed due to "RuntimeException: Wrong thread id"
Reviewed-by: egahlin
2020-07-07 16:20:30 +02:00
Joe Wang
653af300cc 8248348: Regression caused by the update to BCEL 6.0
Reviewed-by: smarks, plevart
2020-07-07 00:09:29 +00:00
Andy Herrick
7a4bf2456e 8248501: [macos] App created with jpackage on Mac fails with error -10810
Reviewed-by: asemenyuk, almatvee
2020-07-03 07:49:00 -04:00
John Jiang
45fce6baf9 8242538: java/security/SecureRandom/ThreadSafe.java failed on windows
Reviewed-by: mullan
2020-07-07 06:06:18 +08:00
Vladimir Kozlov
a8d20c9254 8247527: serviceability/dcmd/gc/HeapDumpCompressedTest.java fails with Graal + ZGC
Excludes running Graal with GC which it does not support

Reviewed-by: dholmes, iignatyev
2020-07-04 01:06:07 -07:00
Yong Zhou
79ad5512cf 8243670: Unexpected test result caused by C2 MergeMemNode::Ideal
Reviewed-by: thartmann, roland
2020-07-04 08:18:17 +08:00
Chris Plummer
63a6adf2b5 8248746: Undo jhsdb related exclusiveAccess.dirs changes that were done for JDK-8220295
Reviewed-by: iignatyev
2020-07-03 10:02:37 -07:00
Patric Hedlin
622117d275 8234605: C2 failed "assert(C->live_nodes() - live_at_begin <= 2 * _nodes_required) failed: Bad node estimate: actual = 208 >> request = 101"
Reviewed-by: neliasso, kvn
2020-06-26 15:47:16 +02:00
Jonathan Gibbons
20a1e352c0 8248492: ProblemList open/test/langtools//jdk/javadoc/doclet/testHeadTag/TestHeadTag.java
Reviewed-by: prappo
2020-06-29 15:03:36 -07:00
Stefan Karlsson
46f86477ad 8248346: Move OopStorage mutex setup out from OopStorageSet
Reviewed-by: kbarrett, eosterlund
2020-06-29 23:17:50 +02:00
Paul Hohensee
51b7c76a95 8245129: Enhance jstat gc option output and tests
Widen and right-justify size fields assuming 2tb heap

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

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

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

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

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

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

Reviewed-by: jlahoda
2020-06-26 18:20:22 -07:00
Joe Darcy
bdab5a0a3a 8248428: Cleanup pass on javax.lang.model docs
Reviewed-by: jjg
2020-06-26 17:14:14 -07:00
Igor Veresov
1ef33e4df9 8248168: [Graal] jck tests timeout in Graal with -Xcomp mode
Re-enable deadlock avoidance logic for JVMCI and Xcomp.

Reviewed-by: kvn
2020-06-26 15:08:25 -07:00
Calvin Cheung
a0a0539b0d 8248112: array index out of bound in FileMapInfo::check_paths
Check runtime classpath lengths after calling create_path_array().

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

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

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

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

Reviewed-by: lfoltan, tschatzl
2020-06-26 05:26:19 -04:00
Jesper Wilhelmsson
55b472251e Merge 2020-06-26 04:15:33 +02:00
Vladimir Kozlov
b87302ca99 8248347: windows build broken by JDK-8243114
Reviewed-by: dcubed, dholmes
2020-06-25 16:01:16 -07:00
Daniel D. Daugherty
2534e72618 8248358: ProblemList sun/nio/ch/TestMaxCachedBufferSize.java on macOSX
Reviewed-by: iignatyev
2020-06-25 18:47:26 -04:00
Daniel D. Daugherty
e098a31307 8248351: ProblemList serviceability/jvmti/ModuleAwareAgents/ThreadStart/MAAThreadStart.java on Windows
Reviewed-by: iignatyev
2020-06-25 18:29:53 -04:00
Daniel D. Daugherty
708b60e8c6 8248354: ProblemList vmTestbase/nsk/jdi/stress/serial/mixed002/TestDescription.java
Reviewed-by: cjplummer
2020-06-25 17:54:18 -04:00
Vicente Romero
fc82768478 8247849: permits clause of sealed interfaces should not allow parameterized types
Reviewed-by: jlahoda
2020-06-25 17:48:53 -04:00
Erik Gahlin
23bbc981a6 8248302: JFR: Add test for OldObjectSample event when using ZGC
Reviewed-by: mgronlun
2020-06-25 21:46:12 +02:00
Yumin Qi
4682835fb4 8203005: The top-of-stack type specified for nofast_* bytecodes are wrong
The change was left by 8074345 the types were wrongly put as T_ILLEGAL for T_OBJECT, and T_ILLEGAL for T_INT.

Reviewed-by: dcubed, cjplummer
2020-06-25 12:40:02 -07:00
Daniel D. Daugherty
8a424425e1 8248341: ProblemList java/lang/management/ThreadMXBean/ThreadMXBeanStateTest.java
Reviewed-by: iignatyev
2020-06-25 15:00:59 -04:00
Daniel D. Daugherty
5724c0d321 8248339: ProblemList jdk/jfr/event/os/TestThreadContextSwitches.java
Reviewed-by: iignatyev
2020-06-25 13:10:47 -04:00
Daniel D. Daugherty
b4ea9cf23e 8248335: ProblemList compiler/ciReplay/TestServerVM.java and TestVMNoCompLevel.java with AOT
Reviewed-by: kvn
2020-06-25 13:08:50 -04:00
Thomas Schatzl
e00aa7c866 8248329: JDK-8244603 breaks windows build
Reviewed-by: sundar, dcubed
2020-06-25 18:58:14 +02:00
Magnus Ihse Bursie
aacb827896 8220639: Need a way to augment JTREG_LAUNCHER_OPTIONS from command-line
Reviewed-by: erikj, dholmes
2020-06-25 18:35:40 +02:00
Chris Plummer
d886d8c465 8247730: 2 JNI exception pending defect groups in DwarfParser.cpp
Reviewed-by: sspitsyn, amenkov
2020-06-25 08:36:59 -07:00
Andrew Haley
47e465cf1b 8243114: Implement montgomery{Multiply,Square}intrinsics on Windows
Reviewed-by: dholmes, andrew
2020-06-25 14:19:37 +01:00
Thomas Schatzl
0f2ac2021b 8244603: G1 incorrectly limiting young gen size when using the reserve can result in repeated full gcs
8238858: G1 Mixed gc young gen sizing might cause the first mixed gc to immediately follow the prepare mixed gc

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

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

Reviewed-by: lfoltan, dholmes
2020-06-25 08:04:28 -04:00
Coleen Phillimore
06cea107ef 8248271: linux-x86-zero build failure
Reviewed-by: dholmes
2020-06-25 08:01:17 -04:00
Christian Hagedorn
601e566b26 8245128: Kitchensink fails with: assert(destination == (address)-1 || destination == entry) failed: b) MT-unsafe modification of inline cache
Fix too strong assertion by additionally considering races due to class unloading and redefinition.

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

Reviewed-by: jlaskey
2020-06-25 11:06:46 +02:00
Chris Hegarty
42d3bad0b1 8248233: Avoid superfluous Class::isRecord invocations during deserialization
Co-authored-by: Peter Levart <peter.levart@gmail.com>
Reviewed-by: redestad, plevart
2020-06-25 09:54:19 +01:00
Andrey Turbanov
921155dfc7 8036604: Typo in BufferedBufImgOps.java in the exception message
Reviewed-by: serb
2020-06-24 20:32:32 -07:00
Jesper Wilhelmsson
233cac3232 Merge 2020-06-25 03:11:32 +02:00
Jesper Wilhelmsson
9e5f6885d8 Added tag jdk-16+3 for changeset 76810b3a88c8 2020-06-25 02:54:12 +02:00
Jesper Wilhelmsson
34755c3528 Added tag jdk-15+29 for changeset b58fc6058055 2020-06-25 02:47:58 +02:00
Sergey Bylokhov
a1b5e01003 8213535: Windows HiDPI html lightweight tooltips are truncated
Reviewed-by: kizune
2020-06-24 15:35:43 -07:00
Alexander Matveev
f45d121128 8248255: [macos] Add failing DMG tests to problem list
Reviewed-by: herrick, asemenyuk
2020-06-24 17:53:16 -04:00
Daniel D. Daugherty
ac37a29914 8248049: minor cleanups in gc/whitebox/TestWBGC.java
Reviewed-by: hseigel
2020-06-24 17:49:10 -04:00
Daniel D. Daugherty
3e4ad5d8d1 8246477: add whitebox support for deflating idle monitors
Reviewed-by: dholmes, eosterlund
2020-06-24 17:48:53 -04:00
Erik Gahlin
362f168d23 8242501: JFR: oldobject/TestG1.java can't find leaking object
Reviewed-by: mgronlun
2020-06-24 23:47:16 +02:00
Magnus Ihse Bursie
2ad638621c 8247573: gtest/GTestWrapper.java is not helpful if gtest framework is missing
Reviewed-by: erikj, iignatyev
2020-06-24 23:45:01 +02:00
Ioi Lam
1e45eb3b13 8248235: appcds/jigsaw/PatchModule/Simple.java failed when running in dynamic CDS mode
Reviewed-by: minqi
2020-06-24 13:52:01 -07:00
Jonathan Gibbons
95b9024ab2 8164597: TestIOException.java fails after push for JDK-8164130
Reviewed-by: prappo
2020-06-24 12:41:50 -07:00
Mandy Chung
4b3c33bac1 8247785: Small clarification of the javadoc about builtin class loaders
Reviewed-by: alanb, rriggs, dholmes
2020-06-24 12:21:51 -07:00
Yumin Qi
0e60e8ad85 8246181: Avoid walking SymbolTable during -Xshare:dump
All symbols at dump are created as permanent. Store them in a global array to avoid working SymbolTable.

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

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

Reviewed-by: dcubed, dholmes
2020-06-24 12:34:14 +00:00
Alexander Matveev
9584e01d24 8225251: Minimise import statements in jpackage sources
Reviewed-by: herrick, asemenyuk
2020-06-23 20:31:38 -04:00
Stefan Karlsson
ef3b0ec567 8247755: Leaner and more versatile GrowableArray classes
Reviewed-by: kbarrett, coleenp
2020-06-24 13:16:52 +02:00
Stefan Karlsson
9d6aa42a7c 8247820: ParallelGC: Process strong OopStorage entries in parallel
Reviewed-by: pliden, eosterlund, kbarrett, tschatzl
2020-06-24 13:16:24 +02:00
Stefan Karlsson
3797364ce9 8248133: SerialGC: Unify handling of all OopStorage instances in root processing
Reviewed-by: eosterlund, kbarrett, pliden
2020-06-24 13:15:54 +02:00
Stefan Karlsson
156f6174ed 8248132: ZGC: Unify handling of all OopStorage instances in root processing
Reviewed-by: pliden, kbarrett, tschatzl
2020-06-24 13:15:00 +02:00
Stefan Karlsson
a1f02d13e5 8248130: AArch64: pf() uses mtNone instead of mtInternal
Reviewed-by: tschatzl, kbarrett, dholmes
2020-06-24 12:19:14 +02:00
Ioi Lam
27fc8b6787 8246546: Simplify SystemDictionary::is_shared_class_visible
Reviewed-by: minqi, ccheung
2020-06-23 21:23:00 -07:00
Naoto Sato
e178f0467b 8248184: AMPM_OF_DAY doc fix in ChronoField
Reviewed-by: bpb, lancea
2020-06-23 17:43:58 -07:00
Erik Gahlin
1aa6539576 8241885: JFR tool: print does not work with inner class events
Reviewed-by: jbachorik
2020-06-23 21:28:45 +02:00
Erik Gahlin
0a6262f0b8 8242593: JFR: EventFactory does not scale well past unique 1000 events
Reviewed-by: jbachorik
2020-06-23 20:15:54 +02:00
Alexey Semenyuk
d85ff3c7f0 8246212: JPKG001-012: application icon is missing in Control Panel Add/Remove
Reviewed-by: herrick, almatvee
2020-06-23 13:42:57 -04:00
Tom Rodriguez
29936542ad 8247246: Add explicit ResolvedJavaType.link and expose presence of default methods
Reviewed-by: kvn
2020-06-24 10:42:26 -07:00
Markus Grönlund
6715f2306e 8241718: assert ((klass)->trace_id()) & ((JfrTraceIdEpoch::method_and_class_in_use_this_epoch_bits()))) != 0 in ObjectSampleCheckpoint::add_to_leakp_set
Reviewed-by: dholmes, iklam, ccheung
2020-06-24 11:22:14 +02:00
Peter Levart
2f09989ec0 8247532: Records deserialization is slow
8248135: Build microbenchmarks with --enable-preview

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

Reviewed-by: chegar, psandoz, redestad, ihse
2020-06-24 11:05:09 +02:00
Markus Grönlund
4bcd70acc0 8247967: SparkExamples24H.java SIGSEGV in various places
Reviewed-by: dcubed, dholmes
2020-06-24 01:02:19 +02:00
Jonathan Gibbons
e66a2a3384 8247955: doclint: don't complain about summary/caption when role=presentation
Reviewed-by: prappo
2020-06-23 12:27:31 -07:00
Xin Liu
4076ca82d2 8151779: Some intrinsic flags could be replaced with one general flag
Add ControlIntrinsic switch

Reviewed-by: neliasso, phh
2020-06-23 10:40:26 -07:00
Zhengyu Gu
6986ab256d 8248041: Shenandoah: pre-Full GC root updates may miss some roots
Reviewed-by: shade
2020-06-23 13:38:20 -04:00
Athijegannathan Sundararajan
1e1985da9b 8247956: remove scripts under bin/nashorn and doc/nashorn/source
Reviewed-by: jlaskey
2020-06-23 17:22:07 +05:30
Maurizio Cimadamore
36d716aa08 8248011: Improve javadoc of Foreign Memory Access API
Reviewed-by: psandoz
2020-06-23 11:49:48 +01:00
Chris Hegarty
7f69acc778 8247696: Incorrect tail computation for large segments in AbstractMemorySegmentImpl::mismatch
Reviewed-by: psandoz, mcimadamore
2020-06-23 10:09:26 +01:00
Doug Simon
6469685285 8247992: [JVMCI] HotSpotNmethod.executeVarargs can try execute a zombie nmethod
Reviewed-by: eosterlund, kvn, never
2020-06-23 09:57:30 +02:00
Jonathan Gibbons
4167ba1288 8248061: bad reference in @throws in HotSpotDiagnosticMXBean
Reviewed-by: dcubed
2020-06-22 19:39:18 -07:00
Phil Race
2c868d6101 Merge 2020-06-22 15:55:57 -07:00
Phil Race
12554c2c03 8244818: Java2D Queue Flusher crash while moving application window to external monitor
Reviewed-by: serb, jdv, kcr
2020-06-22 13:37:41 -07:00
Jonathan Gibbons
9a99f511aa 8247958: minor HTML errors in com.sun.jdi
Reviewed-by: dholmes, sspitsyn
2020-06-22 09:42:42 -07:00
Jonathan Gibbons
9a120e7f79 8247959: doclint errors in NIO code
Reviewed-by: alanb, lancea
2020-06-22 09:29:16 -07:00
Jesper Wilhelmsson
4862d0d542 Merge 2020-06-22 18:23:49 +02:00
Zhengyu Gu
3192ef367a 8247736: Shenandoah: assert(_nm->is_alive()) failed: only alive nmethods here
Reviewed-by: rkennke, shade
2020-06-22 11:40:06 -04:00
Dong Wangya
cb9d3efe5d 8247979: aarch64: missing side effect of killing flags for clearArray_reg_reg
Reviewed-by: adinn
2020-06-22 20:26:02 +08:00
Jamil Nimeh
c0b348f3ef 8239950: Update PKCS9 Attributes to PKCS#9 v2.0 Encodings
Reviewed-by: weijun
2020-06-23 07:48:39 -07:00
Erik Joelsson
d8219d0a78 8213214: Set -Djava.io.tmpdir= when running tests
Reviewed-by: alanb, mikael
2020-06-23 06:51:35 -07:00
Erik Österlund
2765410a28 8247319: Remove on-stack nmethod hotness counter sampling from safepoints
Reviewed-by: kvn, dholmes
2020-06-23 11:59:13 +00:00
Erik Österlund
a10a9284c1 8247179: Mechanism for VM operations to not take part in safepoint coalescing
Reviewed-by: rehn, dholmes
2020-06-23 11:59:13 +00:00
Vladimir Kempik
88df2f0f7f 8243470: [macos] bring back O2 opt level for unsafe.cpp
Remove special case for unsafe.cpp on clang macos

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

Reviewed-by: stefank, pliden
2020-06-23 05:58:52 -04:00
Hai-May Chao
e3eb38f4d2 8244148: keytool -printcert and -printcrl should support the -trustcacerts and -keystore options
Reviewed-by: weijun, jjiang
2020-06-23 16:30:38 +08:00
Claes Redestad
8d9826e4d1 8247995: Avoid use of a mapping function in Permissions.getPermissionCollection
Reviewed-by: rriggs
2020-06-23 10:07:10 +02:00
Stefan Karlsson
17f2250c5a 8247879: Rework WeakHandle and OopHandle to dynamically support different OopStorages
Reviewed-by: coleenp, eosterlund
2020-06-23 09:38:21 +02:00
Jesper Wilhelmsson
b7e944953e Merge 2020-06-23 03:05:07 +02:00
Jan Lahoda
61e44cdb6a 8247932: JShell crashes when typing text block
Setting up Log before running javac's scanner, so that errors reported from the scanner are properly ignored.

Reviewed-by: rfield
2020-06-22 12:03:11 +02:00
Pankaj Bansal
3c472b6700 8198623: java/awt/KeyboardFocusmanager/TypeAhead/EnqueueWithDialogButtonTest/EnqueueWithDialogButtonTest.java fails on mac
Reviewed-by: jdv
2020-06-22 12:39:59 +05:30
Sergey Bylokhov
02201d19c6 7131400: [macosx] Desktop.edit(a directory) should throw IOException
Reviewed-by: pbansal, aivanov
2020-06-22 06:48:26 +01:00
Severin Gehwolf
79f02a67ce 8247863: Unreachable code in OperatingSystemImpl.getTotalSwapSpaceSize()
After 8231111 we have -1 for missing metrics, thus the fix of 8236617 is obsolete

Reviewed-by: mbaesken
2020-06-19 10:40:04 +02:00
Ludovic Henry
a4eaf9536c 8250810: Push missing parts of JDK-8248817
Push changes from JDK-8248817 that were accidentally excluded from the commit.

Reviewed-by: kbarrett, dholmes
2020-07-30 02:47:00 -04:00
Jie Fu
cf345fd768 8250745: assert(eval_map.contains(n)) failed: absent
Reviewed-by: vlivanov, kvn
2020-07-29 11:38:28 +08:00
Mikael Vidstedt
d86ab942f6 Added tag jdk-16+8 for changeset 0a73d6f3aab4 2020-07-29 18:31:44 -07:00
Ludovic Henry
0417fcf13f 8248682: AArch64: Use ATTRIBUTE_ALIGNED helper
Reviewed-by: kbarrett, tschatzl, dholmes
2020-07-29 20:28:11 -04:00
Ludovic Henry
257809d744 8248817: Windows: Improving common cross-platform code
Reviewed-by: kbarrett, dholmes
2020-07-29 20:25:39 -04:00
Igor Ignatyev
7685e53426 8250797: remove CompileReason::Reason_CTW
Reviewed-by: kvn, epavlova
2020-07-29 16:52:23 -07:00
Alexandre Iline
bd843673a8 8250743: Switch to JCov build which supports byte code version 60
Reviewed-by: erikj
2020-07-29 16:12:10 -07:00
Eric Caspole
0aefe6f20a 8249663: LogCompilation cannot process log from o.r.scala.dotty.JmhDotty
Fix stale site and uncommon trap processing in LogParser

Reviewed-by: vlivanov, kvn
2020-07-29 15:41:37 -04:00
Naoto Sato
4946a162aa 8247546: Pattern matching does not skip correctly over supplementary characters
Reviewed-by: joehw
2020-07-29 09:49:43 -07:00
Rajan Halade
6e32338330 8243321: Add Entrust root CA - G4 to Oracle Root CA program
Reviewed-by: mullan
2020-07-29 09:31:38 -07:00
Huang Wang
eef2e1e3fc 8250609: C2 crash in IfNode::fold_compares
Reviewed-by: kvn, chagedorn
2020-07-28 10:38:04 +08:00
Severin Gehwolf
e6517d1ae2 8250627: Use -XX:+/-UseContainerSupport for enabling/disabling Java container metrics
Reviewed-by: aph, dholmes, bobv
2020-07-24 19:57:06 +02:00
Richard Reingruber
10b9d0b6a6 8250610: SafepointMechanism::disarm_if_needed() is declared but not used
Reviewed-by: shade, dholmes
2020-07-29 14:11:46 +02:00
Jan Lahoda
27a9a2f64a 8249261: AssertionError in StructuralStuckChecker
Reviewed-by: mcimadamore
2020-07-29 11:34:25 +02:00
Jan Lahoda
b37228e11f 8248641: Trees.getScope returns incorrect results for code inside a rule case
Ensuring rule cases are copied correctly by TreeCopier.

Reviewed-by: vromero
2020-07-29 11:34:24 +02:00
Rahul Yadav
17035efe87 8250602: Update sun/security/ssl/SSLLogger/LoggerDateFormatterTest.java to handle TimeZones
This fix updates the test LoggerDateFormatterTest.java to be able to handle different TimeZones

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

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

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

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

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

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

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

Reviewed-by: kvn, neliasso
2020-06-19 11:32:51 +02:00
Goetz Lindenmaier
bf1e6903a2 8233014: Enable ShowCodeDetailsInExceptionMessages by default
Reviewed-by: coleenp, stuefe, dholmes
2020-06-18 22:03:18 +02:00
Jonathan Gibbons
e208d9aa1f 8247899: HTML errors and warnings in threadPrimitiveDeprecation.html
Reviewed-by: lancea
2020-06-18 17:32:57 -07:00
Jonathan Gibbons
510354452f 8247896: Invalid (@throw) tags in 2 java.io classes
Reviewed-by: mchung
2020-06-18 16:21:34 -07:00
Jonathan Gibbons
6c2c0563eb 8247894: Invalid @see in java.management
Reviewed-by: mchung, darcy
2020-06-18 16:19:07 -07:00
Jonathan Gibbons
2155d525dd 8247880: bad HTML(href==...) in table
Reviewed-by: lancea, darcy
2020-06-18 15:54:26 -07:00
Jonathan Gibbons
de3923edf9 8247788: DocCommentParser should not reject standalone '>'
Reviewed-by: prappo
2020-06-18 14:07:49 -07:00
Roland Westrelin
05dc2af21f 8247824: CTW: C2 (Shenandoah) compilation fails with SEGV in SBC2Support::pin_and_expand
Reviewed-by: rkennke, thartmann
2020-06-18 13:51:40 +02:00
Tobias Hartmann
d5ae932b3f 8248265: compiler/ciReplay tests fail with AOT compiled java.base
The test should use a non-empty method to trigger compilation.

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

Reviewed-by: roland, kvn
2020-06-29 08:18:23 +02:00
Prasadrao Koppula
4a588d89f0 8246031: SSLSocket.getSession() doesn't close connection for timeout/ interrupts
Reviewed-by: xuelei, coffeys
2020-06-11 21:54:51 +05:30
Aleksey Shipilev
a750ac5feb 8247358: Shenandoah: reconsider free budget slice for marking
Reviewed-by: zgu
2020-06-11 18:16:26 +02:00
Chris Hegarty
56048d0480 8247789: Remove use of reflection from test/jdk/java/io/Serializable/records/StreamRefTest.java
Reviewed-by: rriggs, mchung
2020-06-18 17:46:15 +01:00
Alexey Semenyuk
11ac92c8fb 8246244: BasicShortcutHintTest shortcut can not be found
Reviewed-by: herrick, almatvee
2020-06-16 16:23:32 -04:00
Aleksey Shipilev
cfab7f4c68 8247778: ZGC: More parallel gc/z/TestUncommit.java test configuration
Reviewed-by: iignatyev, stefank
2020-06-18 11:23:19 +02:00
Gilles Duboscq
2cbdd21ed7 8241802: [Graal] compiler/loopopts/TestLogSum.java timed out
Reviewed-by: kvn
2020-06-18 10:39:36 +02:00
Jesper Wilhelmsson
59a4517d07 Added tag jdk-15+28 for changeset 06c9f89459da 2020-06-18 03:05:41 +02:00
Vicente Romero
ecb4cbfd4a 8245842: provide tests for binary compatibility assertions for sealed classes
Reviewed-by: jjg
2020-06-17 14:39:44 -04:00
Vicente Romero
ce4978ffe6 8246257: Annotated record's vararg type component started to be uncompilable with JDK15b24
Reviewed-by: jjg, jlaskey
2020-06-17 13:19:51 -04:00
Jonathan Gibbons
2a794b696c 8245696: javadoc crashes when a doc-files directory contains a '#' file
Reviewed-by: hannesw
2020-06-17 09:20:24 -07:00
Adam Sotona
ed4b801771 8238735: NPE compiling lambda expression within conditional expression
The fix saves result type from the first pass through the Attr.visitLambda and returns it after recovery pass to avoid NPE caused by exposure of Type.recoveryType

Reviewed-by: mcimadamore
2020-06-17 13:18:19 +02:00
Igor Ignatyev
338dd21cfe 8247725: move two tests for whitebox from test/hotspot/jtreg/sanity to test/lib-test
Reviewed-by: dcubed
2020-06-17 07:40:11 -07:00
Igor Ignatyev
f740cda526 8247716: JVM_RegisterWhiteBoxMethods checks wrong classloader
Reviewed-by: dcubed
2020-06-17 07:40:09 -07:00
Patric Hedlin
5547d3204d 8247200: assert((unsigned)fpargs < 32)
Reviewed-by: aph, neliasso
2020-06-17 11:08:44 +02:00
Severin Gehwolf
732d8865df 8244500: jtreg test error in test/hotspot/jtreg/containers/docker/TestMemoryAwareness.java
When the kernel doesn't support swap limits, expect host values instead.

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

Reviewed-by: kvn, vlivanov, thartmann
2020-06-19 08:06:08 +02:00
Jesper Wilhelmsson
a16994ff7b Merge 2020-06-19 00:30:46 +02:00
Aleksey Shipilev
0bacc69a4c 8247860: Shenandoah: add update watermark line in rich assert failure message
Reviewed-by: rkennke
2020-06-18 19:14:13 +02:00
David Holmes
2627f15348 8238832: Obsolete PrintVMQWaitTime
Reviewed-by: ccheung, dcubed
2020-06-17 21:07:08 -04:00
Jesper Wilhelmsson
9a26a01e2f Added tag jdk-16+2 for changeset bcbe7b8a77b8 2020-06-18 03:04:27 +02:00
Chris Plummer
07f9376f54 8246369: CodeCache.findBlobUnsafe(addr) sometimes asserts with valid address
Reviewed-by: sspitsyn, amenkov
2020-06-17 13:12:54 -07:00
Joe Darcy
1cb5a48ed7 8245588: Update --release 15 symbol information for JDK 15 build 27
Reviewed-by: jjg
2020-06-17 13:00:14 -07:00
Martin Buchholz
175b597ad2 8247706: Unintentional use of new Date(year...) with absolute year
Reviewed-by: naoto, rriggs
2020-06-17 12:45:17 -07:00
Martin Buchholz
4f2edacaaf 8247782: typos in java.math
Reviewed-by: rriggs, lancea, darcy
2020-06-17 12:29:58 -07:00
Claes Redestad
34c79640e7 8247681: Improve bootstrapping of unary concatenations
Reviewed-by: jlaskey, psandoz
2020-06-17 19:36:26 +02:00
Jonathan Gibbons
1d87958ead 8243113: Always identify version of javadoc used to generate docs
Reviewed-by: prappo
2020-06-17 09:24:28 -07:00
Aleksey Shipilev
44d4e37ccb 8247757: Shenandoah: split heavy tests by heuristics to improve parallelism
Reviewed-by: rkennke
2020-06-17 17:22:09 +02:00
Aleksey Shipilev
00dc525e5f 8247754: Shenandoah: mxbeans tests can be shorter
Reviewed-by: rkennke
2020-06-17 17:21:56 +02:00
Aleksey Shipilev
d2c1027edc 8247751: Shenandoah: options tests should run with smaller heaps
Reviewed-by: zgu, rkennke
2020-06-17 17:21:47 +02:00
Jan Lahoda
a4b135316c 8244763: Update --release 8 symbol information after JSR 337 MR3
Reviewed-by: jjg, wetmore
2020-05-18 18:20:53 +02:00
Weijun Wang
b852688c05 8237592: Enhance certificate verification
Reviewed-by: xuelei, mullan, rhalade, ahgross
2020-04-18 12:16:42 +08:00
Roger Riggs
34fc33074a 8234836: Improve serialization handling
Reviewed-by: chegar, rhalade, skoivu
2020-04-16 10:33:44 -04:00
Alex Menkov
19c29923a5 8241522: Manifest improved jar headers redux
Reviewed-by: sspitsyn, jwilhelm, mschoene, rhalade
2020-04-14 14:21:25 -07:00
Joe Wang
d7bbb5c4a6 8242136: Better XML namespace handling
Reviewed-by: lancea, dfuchs, skoivu, rhalade, kravikumar
2020-04-14 16:29:15 +00:00
Stuart Marks
343ecd806b 8231800: Better listing of arrays
Reviewed-by: alanb, rhalade, ahgross, igerasim
2020-04-07 13:27:55 -07:00
Chris Hegarty
0ffa6b75fd 8237117: Better ForkJoinPool behavior
Reviewed-by: dfuchs, alanb, rhalade, mullan
2020-04-03 17:20:45 +01:00
Weijun Wang
fe514a2e55 8241379: Update JCEKS support
Reviewed-by: ahgross, mullan, rhalade
2020-04-03 17:24:59 +08:00
Phil Race
e3673d4677 8238843: Enhanced font handing
Reviewed-by: serb, psadhukhan, mschoene, rhalade
2020-03-25 16:26:21 -07:00
Igor Veresov
45258a1799 8236867: Enhance Graal interface handling
Reviewed-by: never, dnsimon, kvn, ahgross, rhalade
2020-03-24 08:42:32 -07:00
Sergey Bylokhov
0c58055bac 8240482: Improved WAV file playback
Reviewed-by: amenkov, rhalade, mschoene, prr
2020-03-23 19:57:51 -07:00
Weijun Wang
6ac3892e16 8238804: Enhance key handling process
Reviewed-by: rriggs, mullan, ahgross, rhalade
2020-03-18 13:35:16 +08:00
Brian Burkhalter
c90e523e0a 8238920: Better Buffer support
Reviewed-by: alanb, ahgross, rhalade, psandoz
2020-03-17 14:05:19 -07:00
Phil Race
800f133a29 8240119: Less Affine Transformations
Reviewed-by: serb, bpb, mschoene, rhalade
2020-03-17 13:46:19 -07:00
Sergey Bylokhov
45cace2867 8238925: Enhance WAV file playback
Reviewed-by: prr, amenkov, rhalade, mschoene
2020-03-10 07:07:09 +01:00
Xue-Lei Andrew Fan
8fdbb29079 8236191: Enhance OID processing
Reviewed-by: jnimeh, weijun, ahgross, rhalade
2020-03-05 14:59:34 -08:00
Aleksei Efimov
fa3d79c2f8 8230613: Better ASCII conversions
Reviewed-by: dfuchs, naoto, mschoene, rhalade
2020-02-28 14:24:39 +00:00
Patric Hedlin
195c45a0e1 8245226: Clean-up FlagSetting and remove misuse
Reviewed-by: neliasso, dholmes
2020-02-24 14:06:01 +01:00
Erik Gahlin
30bc2b7ca1 8248997: JFR: Improve javadoc for @Name
Reviewed-by: mgronlun
2020-07-14 05:10:46 +02:00
Alexander Matveev
49002194fb 8249264: Build validate-headers task fails after JDK-8248261
Reviewed-by: herrick
2020-07-13 17:52:35 -07:00
Vladimir Kozlov
c4f835b3a7 8249165: Remove unneeded nops introduced by 8234160 changes
Check for branch instruction at the end of code block

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

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

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

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

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

Reviewed-by: roland, kvn, thartmann
2020-07-06 09:16:58 +02:00
Yaofei Song
459da4aa11 8248219: aarch64: missing memory barrier in fast_storefield and fast_accessfield
Reviewed-by: aph
2020-06-28 16:47:25 +08:00
Jayathirth D V
151b6f1402 8233239: Enhance TIFF support
Reviewed-by: prr, bpb, mschoene, rhalade
2020-02-20 11:32:54 +05:30
Phil Race
3476724641 8238002: Better matrix operations
Reviewed-by: serb, erikj, mschoene, rhalade
2020-02-12 12:18:46 -08:00
Joe Wang
697fb9e41b 8232014: Expand DTD support
Reviewed-by: lancea, dfuchs, mschoene, rhalade, aefimov
2020-02-12 18:59:58 +00:00
Brian Burkhalter
fc02d9872e 8238013: Enhance String writing
Reviewed-by: alanb, ahgross, rhalade, rriggs
2020-02-06 07:59:39 -08:00
Sean Mullan
d285fd6dce 8234418: Better parsing with CertificateFactory
Reviewed-by: weijun, mschoene, rhalade
2020-02-06 09:36:51 -05:00
Lance Andersen
8a616df8b5 8233234: Better Zip Naming
Reviewed-by: alanb, ahgross, redestad, coffeys, mschoene, rhalade
2020-01-31 13:52:04 -05:00
Sergey Bylokhov
a5a46ff8e5 8233255: Better Swing Buttons
Reviewed-by: alitvinov, prr, ahgross, rhalade
2020-01-28 10:51:00 -08:00
Sean Mullan
da6daad2e5 8234042: Better factory production of certificates
Reviewed-by: weijun, rhalade, mschoene
2020-01-17 08:04:14 -05:00
Sean Mullan
1bfcf768f5 8234032: Improve basic calendar services
Reviewed-by: weijun, rhalade, mschoene
2020-01-14 14:51:57 -05:00
11956 changed files with 711686 additions and 209053 deletions

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
* -text

1611
.github/workflows/submit.yml vendored Normal file

File diff suppressed because it is too large Load Diff

2
.gitignore vendored
View File

@@ -2,6 +2,7 @@
/dist/
/.idea/
/.vscode/
/nbproject/
nbproject/private/
/webrev
/.src-rev
@@ -14,3 +15,4 @@ test/nashorn/lib
NashornProfile.txt
**/JTreport/**
**/JTwork/**
/src/utils/LogCompilation/target/

View File

@@ -1,18 +0,0 @@
^build/
^dist/
^.idea/
^.vscode/
nbproject/private/
^webrev
^.src-rev$
^.jib/
(^|/)\.DS_Store
(^|/)\.metadata/
(^|/)\.recommenders/
test/nashorn/script/external
test/nashorn/lib
NashornProfile.txt
(^|/)JTreport/
(^|/)JTwork/
(^|/)\.git/
^src/utils/hsdis/build/

22
.hgtags
View File

@@ -640,3 +640,25 @@ f143729ca00ec14a98ea5c7f73acba88da97746e jdk-15+23
93813843680bbe1b7efbca56c03fd137f20a2c31 jdk-16+0
93813843680bbe1b7efbca56c03fd137f20a2c31 jdk-15+27
4a485c89d5a08b495961835f5308a96038678aeb jdk-16+1
06c9f89459daba98395fad726100feb44f89ba71 jdk-15+28
bcbe7b8a77b8971bc221c0be1bd2abb6fb68c2d0 jdk-16+2
b58fc60580550a4a587cab729d8fd87223ad6932 jdk-15+29
76810b3a88c8c641ae3850a8dfd7c40c984aea9d jdk-16+3
6909e4a1f25bfe9a2727026f5845fc1fc44a36aa jdk-15+30
e2622818f0bd30e736252eba101fe7d2c27f400b jdk-16+4
a32f58c6b8be81877411767de7ba9c4cf087c1b5 jdk-15+31
143e258f64af490010eb7e0bacc1cfaeceff0993 jdk-16+5
2dad000726b8d5db9f3df647fb4949d88f269dd4 jdk-15+32
4a8fd81d64bafa523cddb45f82805536edace106 jdk-16+6
6b65f4e7a975628df51ef755b02642075390041d jdk-15+33
c3a4a7ea7c304cabdacdc31741eb94c51351668d jdk-16+7
b0817631d2f4395508cb10e81c3858a94d9ae4de jdk-15+34
0a73d6f3aab48ff6d7e61e47f0bc2d87a054f217 jdk-16+8
fd60c3146a024037cdd9be34c645bb793995a7cc jdk-15+35
c075a286cc7df767cce28e8057d6ec5051786490 jdk-16+9
b01985b4f88f554f97901e53e1ba314681dd9c19 jdk-16+10
e3f940bd3c8fcdf4ca704c6eb1ac745d155859d5 jdk-15+36
5c18d696c7ce724ca36df13933aa53f50e12b9e0 jdk-16+11
fc8e62b399bd93d06e8d13dc3b384c450e853dcd jdk-16+12
fd07cdb26fc70243ef23d688b545514f4ddf1c2b jdk-16+13
36b29df125dc88f11657ce93b4998aa9ff5f5d41 jdk-16+14

View File

@@ -1,2 +1,34 @@
[general]
project=jdk
bugids=dup
jbs=JDK
[checks]
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists
[repository]
tags=(?:jdk-(?:[1-9]([0-9]*)(?:\.(?:0|[1-9][0-9]*)){0,4})(?:\+(?:(?:[0-9]+))|(?:-ga)))|(?:jdk[4-9](?:u\d{1,3})?-(?:(?:b\d{2,3})|(?:ga)))|(?:hs\d\d(?:\.\d{1,2})?-b\d\d)
branches=
[census]
version=0
domain=openjdk.org
[checks "whitespace"]
files=.*\.cpp|.*\.hpp|.*\.c|.*\.h|.*\.java|.*\.cc|.*\.hh|.*\.m|.*\.mm|.*\.gmk|.*\.m4|.*\.ac|Makefile
ignore-tabs=.*\.gmk|Makefile
[checks "merge"]
message=Merge
[checks "reviewers"]
reviewers=1
ignore=duke
[checks "committer"]
role=committer
[checks "issues"]
pattern=^([124-8][0-9]{6}): (\S.*)$
[checks "problemlists"]
dirs=test/jdk|test/langtools|test/lib-test|test/hotspot/jtreg|test/jaxp

3
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,3 @@
# Contributing to the JDK
Please see <https://openjdk.java.net/contribute/> for how to contribute.

12
README
View File

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

11
README.md Normal file
View File

@@ -0,0 +1,11 @@
# Welcome to the JDK!
For build instructions please see the
[online documentation](https://openjdk.java.net/groups/build/doc/building.html),
or either of these files:
- [doc/building.html](doc/building.html) (html version)
- [doc/building.md](doc/building.md) (markdown version)
See <https://openjdk.java.net/> for more information about
the OpenJDK Community and the JDK.

View File

@@ -147,13 +147,7 @@ add_replacement() {
add_replacement "###MODULE_NAMES###" "$MODULE_NAMES"
add_replacement "###VCS_TYPE###" "$VCS_TYPE"
SPEC_DIR=`dirname $SPEC`
if [ "x$CYGPATH" = "x" ]; then
add_replacement "###BUILD_DIR###" "$SPEC_DIR"
add_replacement "###JTREG_HOME###" "$JT_HOME"
add_replacement "###IMAGES_DIR###" "$SPEC_DIR/images/jdk"
add_replacement "###ROOT_DIR###" "$TOPLEVEL_DIR"
add_replacement "###IDEA_DIR###" "$IDEA_OUTPUT"
else
if [ "x$CYGPATH" != "x" ]; then
add_replacement "###BUILD_DIR###" "`cygpath -am $SPEC_DIR`"
add_replacement "###IMAGES_DIR###" "`cygpath -am $SPEC_DIR`/images/jdk"
add_replacement "###ROOT_DIR###" "`cygpath -am $TOPLEVEL_DIR`"
@@ -163,6 +157,22 @@ else
else
add_replacement "###JTREG_HOME###" "`cygpath -am $JT_HOME`"
fi
elif [ "x$WSL_DISTRO_NAME" != "x" ]; then
add_replacement "###BUILD_DIR###" "`wslpath -am $SPEC_DIR`"
add_replacement "###IMAGES_DIR###" "`wslpath -am $SPEC_DIR`/images/jdk"
add_replacement "###ROOT_DIR###" "`wslpath -am $TOPLEVEL_DIR`"
add_replacement "###IDEA_DIR###" "`wslpath -am $IDEA_OUTPUT`"
if [ "x$JT_HOME" = "x" ]; then
add_replacement "###JTREG_HOME###" ""
else
add_replacement "###JTREG_HOME###" "`wslpath -am $JT_HOME`"
fi
else
add_replacement "###BUILD_DIR###" "$SPEC_DIR"
add_replacement "###JTREG_HOME###" "$JT_HOME"
add_replacement "###IMAGES_DIR###" "$SPEC_DIR/images/jdk"
add_replacement "###ROOT_DIR###" "$TOPLEVEL_DIR"
add_replacement "###IDEA_DIR###" "$IDEA_OUTPUT"
fi
SOURCE_PREFIX="<sourceFolder url=\"file://"
@@ -170,9 +180,22 @@ SOURCE_POSTFIX="\" isTestSource=\"false\" />"
for root in $MODULE_ROOTS; do
if [ "x$CYGPATH" != "x" ]; then
root=`cygpath -am $root`
root=`cygpath -am $root`
elif [ "x$WSL_DISTRO_NAME" != "x" ]; then
root=`wslpath -am $root`
fi
VM_CI="jdk.internal.vm.ci/share/classes"
VM_COMPILER="src/jdk.internal.vm.compiler/share/classes"
if test "${root#*$VM_CI}" != "$root" || test "${root#*$VM_COMPILER}" != "$root"; then
for subdir in "$root"/*; do
if [ -d "$subdir" ]; then
SOURCES=$SOURCES" $SOURCE_PREFIX""$subdir"/src"$SOURCE_POSTFIX"
fi
done
else
SOURCES=$SOURCES" $SOURCE_PREFIX""$root""$SOURCE_POSTFIX"
fi
SOURCES=$SOURCES" $SOURCE_PREFIX""$root""$SOURCE_POSTFIX"
done
add_replacement "###SOURCE_ROOTS###" "$SOURCES"
@@ -196,16 +219,30 @@ fi
CP=$ANT_HOME/lib/ant.jar
rm -rf $CLASSES; mkdir $CLASSES
if [ "x$CYGPATH" = "x" ] ; then ## CYGPATH may be set in env.cfg
JAVAC_SOURCE_FILE=$IDEA_OUTPUT/src/idea/IdeaLoggerWrapper.java
JAVAC_SOURCE_PATH=$IDEA_OUTPUT/src
JAVAC_CLASSES=$CLASSES
JAVAC_CP=$CP
else
if [ "x$CYGPATH" != "x" ] ; then ## CYGPATH may be set in env.cfg
JAVAC_SOURCE_FILE=`cygpath -am $IDEA_OUTPUT/src/idea/IdeaLoggerWrapper.java`
JAVAC_SOURCE_PATH=`cygpath -am $IDEA_OUTPUT/src`
JAVAC_CLASSES=`cygpath -am $CLASSES`
JAVAC_CP=`cygpath -am $CP`
JAVAC=javac
elif [ "x$WSL_DISTRO_NAME" != "x" ]; then
JAVAC_SOURCE_FILE=`realpath --relative-to=./ $IDEA_OUTPUT/src/idea/IdeaLoggerWrapper.java`
JAVAC_SOURCE_PATH=`realpath --relative-to=./ $IDEA_OUTPUT/src`
JAVAC_CLASSES=`realpath --relative-to=./ $CLASSES`
ANT_TEMP=`mktemp -d -p ./`
cp $ANT_HOME/lib/ant.jar $ANT_TEMP/ant.jar
JAVAC_CP=$ANT_TEMP/ant.jar
JAVAC=javac.exe
else
JAVAC_SOURCE_FILE=$IDEA_OUTPUT/src/idea/IdeaLoggerWrapper.java
JAVAC_SOURCE_PATH=$IDEA_OUTPUT/src
JAVAC_CLASSES=$CLASSES
JAVAC_CP=$CP
JAVAC=javac
fi
$BOOT_JDK/bin/javac -d $JAVAC_CLASSES -sourcepath $JAVAC_SOURCE_PATH -cp $JAVAC_CP $JAVAC_SOURCE_FILE
$BOOT_JDK/bin/$JAVAC -d $JAVAC_CLASSES -sourcepath $JAVAC_SOURCE_PATH -cp $JAVAC_CP $JAVAC_SOURCE_FILE
if [ "x$WSL_DISTRO_NAME" != "x" ]; then
rm -rf $ANT_TEMP
fi

View File

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

View File

@@ -78,6 +78,7 @@
<li><a href="#native-libraries">Native Libraries</a></li>
<li><a href="#creating-and-using-sysroots-with-qemu-deboostrap">Creating And Using Sysroots With qemu-deboostrap</a></li>
<li><a href="#building-for-armaarch64">Building for ARM/aarch64</a></li>
<li><a href="#building-for-musl">Building for musl</a></li>
<li><a href="#verifying-the-build">Verifying the Build</a></li>
</ul></li>
<li><a href="#build-performance">Build Performance</a><ul>
@@ -96,12 +97,10 @@
<li><a href="#getting-help">Getting Help</a></li>
</ul></li>
<li><a href="#hints-and-suggestions-for-advanced-users">Hints and Suggestions for Advanced Users</a><ul>
<li><a href="#setting-up-a-repository-for-pushing-changes-defpath">Setting Up a Repository for Pushing Changes (defpath)</a></li>
<li><a href="#bash-completion">Bash Completion</a></li>
<li><a href="#using-multiple-configurations">Using Multiple Configurations</a></li>
<li><a href="#handling-reconfigurations">Handling Reconfigurations</a></li>
<li><a href="#using-fine-grained-make-targets">Using Fine-Grained Make Targets</a></li>
<li><a href="#learn-about-mercurial">Learn About Mercurial</a></li>
</ul></li>
<li><a href="#understanding-the-build-system">Understanding the Build System</a><ul>
<li><a href="#configurations">Configurations</a></li>
@@ -115,10 +114,10 @@
</ul>
</nav>
<h2 id="tldr-instructions-for-the-impatient">TL;DR (Instructions for the Impatient)</h2>
<p>If you are eager to try out building the JDK, these simple steps works most of the time. They assume that you have installed Mercurial (and Cygwin if running on Windows) and cloned the top-level JDK repository that you want to build.</p>
<p>If you are eager to try out building the JDK, these simple steps works most of the time. They assume that you have installed Git (and Cygwin if running on Windows) and cloned the top-level JDK repository that you want to build.</p>
<ol type="1">
<li><p><a href="#getting-the-source-code">Get the complete source code</a>:<br />
<code>hg clone http://hg.openjdk.java.net/jdk/jdk</code></p></li>
<code>git clone https://git.openjdk.java.net/jdk/</code></p></li>
<li><p><a href="#running-configure">Run configure</a>:<br />
<code>bash configure</code></p>
<p>If <code>configure</code> fails due to missing dependencies (to either the <a href="#native-compiler-toolchain-requirements">toolchain</a>, <a href="#build-tools-requirements">build tools</a>, <a href="#external-library-requirements">external libraries</a> or the <a href="#boot-jdk-requirements">boot JDK</a>), most of the time it prints a suggestion on how to resolve the situation on your platform. Follow the instructions, and try running <code>bash configure</code> again.</p></li>
@@ -134,8 +133,8 @@
<p>The JDK is a complex software project. Building it requires a certain amount of technical expertise, a fair number of dependencies on external software, and reasonably powerful hardware.</p>
<p>If you just want to use the JDK and not build it yourself, this document is not for you. See for instance <a href="http://openjdk.java.net/install">OpenJDK installation</a> for some methods of installing a prebuilt JDK.</p>
<h2 id="getting-the-source-code">Getting the Source Code</h2>
<p>Make sure you are getting the correct version. As of JDK 10, the source is no longer split into separate repositories so you only need to clone one single repository. At the <a href="http://hg.openjdk.java.net/">OpenJDK Mercurial server</a> you can see a list of all available repositories. If you want to build an older version, e.g. JDK 8, it is recommended that you get the <code>jdk8u</code> forest, which contains incremental updates, instead of the <code>jdk8</code> forest, which was frozen at JDK 8 GA.</p>
<p>If you are new to Mercurial, a good place to start is the <a href="http://www.mercurial-scm.org/guide">Mercurial Beginner's Guide</a>. The rest of this document assumes a working knowledge of Mercurial.</p>
<p>Make sure you are getting the correct version. As of JDK 10, the source is no longer split into separate repositories so you only need to clone one single repository. At the <a href="https://git.openjdk.java.net/">OpenJDK Git site</a> you can see a list of all available repositories. If you want to build an older version, e.g. JDK 11, it is recommended that you get the <code>jdk11u</code> repo, which contains incremental updates, instead of the <code>jdk11</code> repo, which was frozen at JDK 11 GA.</p>
<p>If you are new to Git, a good place to start is the book <a href="https://git-scm.com/book/en/v2">Pro Git</a>. The rest of this document assumes a working knowledge of Git.</p>
<h3 id="special-considerations">Special Considerations</h3>
<p>For a smooth building experience, it is recommended that you follow these rules on where and how to check out the source code.</p>
<ul>
@@ -146,7 +145,11 @@
<ul>
<li><p>Create the directory that is going to contain the top directory of the JDK clone by using the <code>mkdir</code> command in the Cygwin bash shell. That is, do <em>not</em> create it using Windows Explorer. This will ensure that it will have proper Cygwin attributes, and that it's children will inherit those attributes.</p></li>
<li><p>Do not put the JDK clone in a path under your Cygwin home directory. This is especially important if your user name contains spaces and/or mixed upper and lower case letters.</p></li>
<li><p>Clone the JDK repository using the Cygwin command line <code>hg</code> client as instructed in this document. That is, do <em>not</em> use another Mercurial client such as TortoiseHg.</p></li>
<li><p>You need to install a git client. You have two choices, Cygwin git or Git for Windows. Unfortunately there are pros and cons with each choice.</p>
<ul>
<li><p>The Cygwin <code>git</code> client has no line ending issues and understands Cygwin paths (which are used throughout the JDK build system). However, it does not currently work well with the Skara CLI tooling. Please see the <a href="https://wiki.openjdk.java.net/display/SKARA/Skara#Skara-Git">Skara wiki on Git clients</a> for up-to-date information about the Skara git client support.</p></li>
<li><p>The <a href="https://gitforwindows.org">Git for Windows</a> client has issues with line endings, and do not understand Cygwin paths. It does work well with the Skara CLI tooling, however. To alleviate the line ending problems, make sure you set <code>core.autocrlf</code> to <code>false</code> (this is asked during installation).</p></li>
</ul></li>
</ul>
<p>Failure to follow this procedure might result in hard-to-debug build problems.</p></li>
</ul>
@@ -193,7 +196,7 @@
<p>Windows XP is not a supported platform, but all newer Windows should be able to build the JDK.</p>
<p>On Windows, it is important that you pay attention to the instructions in the <a href="#special-considerations">Special Considerations</a>.</p>
<p>Windows is the only non-POSIX OS supported by the JDK, and as such, requires some extra care. A POSIX support layer is required to build on Windows. Currently, the only supported such layers are Cygwin and Windows Subsystem for Linux (WSL). (Msys is no longer supported due to a too old bash; msys2 would likely be possible to support in a future version but that would require effort to implement.)</p>
<p>Internally in the build system, all paths are represented as Unix-style paths, e.g. <code>/cygdrive/c/hg/jdk9/Makefile</code> rather than <code>C:\hg\jdk9\Makefile</code>. This rule also applies to input to the build system, e.g. in arguments to <code>configure</code>. So, use <code>--with-msvcr-dll=/cygdrive/c/msvcr100.dll</code> rather than <code>--with-msvcr-dll=c:\msvcr100.dll</code>. For details on this conversion, see the section on <a href="#fixpath">Fixpath</a>.</p>
<p>Internally in the build system, all paths are represented as Unix-style paths, e.g. <code>/cygdrive/c/git/jdk/Makefile</code> rather than <code>C:\git\jdk\Makefile</code>. This rule also applies to input to the build system, e.g. in arguments to <code>configure</code>. So, use <code>--with-msvcr-dll=/cygdrive/c/msvcr100.dll</code> rather than <code>--with-msvcr-dll=c:\msvcr100.dll</code>. For details on this conversion, see the section on <a href="#fixpath">Fixpath</a>.</p>
<h4 id="cygwin">Cygwin</h4>
<p>A functioning <a href="http://www.cygwin.com/">Cygwin</a> environment is required for building the JDK on Windows. If you have a 64-bit OS, we strongly recommend using the 64-bit version of Cygwin.</p>
<p><strong>Note:</strong> Cygwin has a model of continuously updating all packages without any easy way to install or revert to a specific version of a package. This means that whenever you add or update a package in Cygwin, you might (inadvertently) update tools that are used by the JDK build process, and that can cause unexpected build problems.</p>
@@ -224,6 +227,8 @@
<pre><code>sudo apt-get install build-essential</code></pre>
<p>For rpm-based distributions (Fedora, Red Hat, etc), try this:</p>
<pre><code>sudo yum groupinstall &quot;Development Tools&quot;</code></pre>
<p>For Alpine Linux, aside from basic tooling, install the GNU versions of some programs:</p>
<pre><code>sudo apk add build-base bash grep zip</code></pre>
<h3 id="aix">AIX</h3>
<p>Please consult the AIX section of the <a href="https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms">Supported Build Platforms</a> OpenJDK Build Wiki page for details about which versions of AIX are supported.</p>
<h2 id="native-compiler-toolchain-requirements">Native Compiler (Toolchain) Requirements</h2>
@@ -265,7 +270,7 @@
<tbody>
<tr class="odd">
<td style="text-align: left;">Linux</td>
<td style="text-align: left;">gcc 9.2.0</td>
<td style="text-align: left;">gcc 10.2.0</td>
</tr>
<tr class="even">
<td style="text-align: left;">macOS</td>
@@ -273,17 +278,17 @@
</tr>
<tr class="odd">
<td style="text-align: left;">Windows</td>
<td style="text-align: left;">Microsoft Visual Studio 2019 update 16.5.3</td>
<td style="text-align: left;">Microsoft Visual Studio 2019 update 16.7.2</td>
</tr>
</tbody>
</table>
<p>All compilers are expected to be able to compile to the C99 language standard, as some C99 features are used in the source code. Microsoft Visual Studio doesn't fully support C99 so in practice shared code is limited to using C99 features that it does support.</p>
<h3 id="gcc">gcc</h3>
<p>The minimum accepted version of gcc is 5.0. Older versions will generate a warning by <code>configure</code> and are unlikely to work.</p>
<p>The JDK is currently known to be able to compile with at least version 9.2 of gcc.</p>
<p>The JDK is currently known to be able to compile with at least version 10.2 of gcc.</p>
<p>In general, any version between these two should be usable.</p>
<h3 id="clang">clang</h3>
<p>The minimum accepted version of clang is 3.2. Older versions will not be accepted by <code>configure</code>.</p>
<p>The minimum accepted version of clang is 3.5. Older versions will not be accepted by <code>configure</code>.</p>
<p>To use clang instead of gcc on Linux, use <code>--with-toolchain-type=clang</code>.</p>
<h3 id="apple-xcode">Apple Xcode</h3>
<p>The oldest supported version of Xcode is 8.</p>
@@ -292,9 +297,8 @@
<p>It is advisable to keep an older version of Xcode for building the JDK when updating Xcode. This <a href="http://iosdevelopertips.com/xcode/install-multiple-versions-of-xcode.html">blog page</a> has good suggestions on managing multiple Xcode versions. To use a specific version of Xcode, use <code>xcode-select -s</code> before running <code>configure</code>, or use <code>--with-toolchain-path</code> to point to the version of Xcode to use, e.g. <code>configure --with-toolchain-path=/Applications/Xcode8.app/Contents/Developer/usr/bin</code></p>
<p>If you have recently (inadvertently) updated your OS and/or Xcode version, and the JDK can no longer be built, please see the section on <a href="#problems-with-the-build-environment">Problems with the Build Environment</a>, and <a href="#getting-help">Getting Help</a> to find out if there are any recent, non-merged patches available for this update.</p>
<h3 id="microsoft-visual-studio">Microsoft Visual Studio</h3>
<p>The minimum accepted version of Visual Studio is 2010. Older versions will not be accepted by <code>configure</code>. The maximum accepted version of Visual Studio is 2019. Versions older than 2017 are unlikely to continue working for long.</p>
<p>If you have multiple versions of Visual Studio installed, <code>configure</code> will by default pick the latest. You can request a specific version to be used by setting <code>--with-toolchain-version</code>, e.g. <code>--with-toolchain-version=2015</code>.</p>
<p>If you get <code>LINK: fatal error LNK1123: failure during conversion to COFF: file invalid</code> when building using Visual Studio 2010, you have encountered <a href="http://support.microsoft.com/kb/2757355">KB2757355</a>, a bug triggered by a specific installation order. However, the solution suggested by the KB article does not always resolve the problem. See <a href="https://stackoverflow.com/questions/10888391">this stackoverflow discussion</a> for other suggestions.</p>
<p>The minimum accepted version of Visual Studio is 2017. Older versions will not be accepted by <code>configure</code> and will not work. The maximum accepted version of Visual Studio is 2019.</p>
<p>If you have multiple versions of Visual Studio installed, <code>configure</code> will by default pick the latest. You can request a specific version to be used by setting <code>--with-toolchain-version</code>, e.g. <code>--with-toolchain-version=2017</code>.</p>
<h3 id="ibm-xl-cc">IBM XL C/C++</h3>
<p>Please consult the AIX section of the <a href="https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms">Supported Build Platforms</a> OpenJDK Build Wiki page for details about which versions of XLC are supported.</p>
<h2 id="boot-jdk-requirements">Boot JDK Requirements</h2>
@@ -314,6 +318,7 @@
<ul>
<li>To install on an apt-based Linux, try running <code>sudo apt-get install libfreetype6-dev</code>.</li>
<li>To install on an rpm-based Linux, try running <code>sudo yum install freetype-devel</code>.</li>
<li>To install on Alpine Linux, try running <code>sudo apk add freetype-dev</code>.</li>
</ul>
<p>Use <code>--with-freetype-include=&lt;path&gt;</code> and <code>--with-freetype-lib=&lt;path&gt;</code> if <code>configure</code> does not automatically locate the platform FreeType files.</p>
<h3 id="cups">CUPS</h3>
@@ -321,6 +326,7 @@
<ul>
<li>To install on an apt-based Linux, try running <code>sudo apt-get install libcups2-dev</code>.</li>
<li>To install on an rpm-based Linux, try running <code>sudo yum install cups-devel</code>.</li>
<li>To install on Alpine Linux, try running <code>sudo apk add cups-dev</code>.</li>
</ul>
<p>Use <code>--with-cups=&lt;path&gt;</code> if <code>configure</code> does not properly locate your CUPS files.</p>
<h3 id="x11">X11</h3>
@@ -328,6 +334,7 @@
<ul>
<li>To install on an apt-based Linux, try running <code>sudo apt-get install libx11-dev libxext-dev libxrender-dev libxrandr-dev libxtst-dev libxt-dev</code>.</li>
<li>To install on an rpm-based Linux, try running <code>sudo yum install libXtst-devel libXt-devel libXrender-devel libXrandr-devel libXi-devel</code>.</li>
<li>To install on Alpine Linux, try running <code>sudo apk add libx11-dev libxext-dev libxrender-dev libxrandr-dev libxtst-dev libxt-dev</code>.</li>
</ul>
<p>Use <code>--with-x=&lt;path&gt;</code> if <code>configure</code> does not properly locate your X11 files.</p>
<h3 id="alsa">ALSA</h3>
@@ -335,6 +342,7 @@
<ul>
<li>To install on an apt-based Linux, try running <code>sudo apt-get install libasound2-dev</code>.</li>
<li>To install on an rpm-based Linux, try running <code>sudo yum install alsa-lib-devel</code>.</li>
<li>To install on Alpine Linux, try running <code>sudo apk add alsa-lib-dev</code>.</li>
</ul>
<p>Use <code>--with-alsa=&lt;path&gt;</code> if <code>configure</code> does not properly locate your ALSA files.</p>
<h3 id="libffi">libffi</h3>
@@ -342,6 +350,7 @@
<ul>
<li>To install on an apt-based Linux, try running <code>sudo apt-get install libffi-dev</code>.</li>
<li>To install on an rpm-based Linux, try running <code>sudo yum install libffi-devel</code>.</li>
<li>To install on Alpine Linux, try running <code>sudo apk add libffi-dev</code>.</li>
</ul>
<p>Use <code>--with-libffi=&lt;path&gt;</code> if <code>configure</code> does not properly locate your libffi files.</p>
<h2 id="build-tools-requirements">Build Tools Requirements</h2>
@@ -350,6 +359,7 @@
<ul>
<li>To install on an apt-based Linux, try running <code>sudo apt-get install autoconf</code>.</li>
<li>To install on an rpm-based Linux, try running <code>sudo yum install autoconf</code>.</li>
<li>To install on Alpine Linux, try running <code>sudo apk add autoconf</code>.</li>
<li>To install on macOS, try running <code>brew install autoconf</code>.</li>
<li>To install on Windows, try running <code>&lt;path to Cygwin setup&gt;/setup-x86_64 -q -P autoconf</code>.</li>
</ul>
@@ -392,7 +402,7 @@
<li><code>--enable-jvm-feature-&lt;feature&gt;</code> or <code>--disable-jvm-feature-&lt;feature&gt;</code> - Include (or exclude) <code>&lt;feature&gt;</code> as a JVM feature in Hotspot. You can also specify a list of features to be enabled, separated by space or comma, as <code>--with-jvm-features=&lt;feature&gt;[,&lt;feature&gt;...]</code>. If you prefix <code>&lt;feature&gt;</code> with a <code>-</code>, it will be disabled. These options will modify the default list of features for the JVM variant(s) you are building. For the <code>custom</code> JVM variant, the default list is empty. A complete list of valid JVM features can be found using <code>bash configure --help</code>.</li>
<li><code>--with-target-bits=&lt;bits&gt;</code> - Create a target binary suitable for running on a <code>&lt;bits&gt;</code> platform. Use this to create 32-bit output on a 64-bit build platform, instead of doing a full cross-compile. (This is known as a <em>reduced</em> build.)</li>
</ul>
<p>On Linux, BSD and AIX, it is possible to override where Java by default searches for runtime/JNI libraries. This can be useful in situations where there is a special shared directory for system JNI libraries. This setting can in turn be overriden at runtime by setting the <code>java.library.path</code> property.</p>
<p>On Linux, BSD and AIX, it is possible to override where Java by default searches for runtime/JNI libraries. This can be useful in situations where there is a special shared directory for system JNI libraries. This setting can in turn be overridden at runtime by setting the <code>java.library.path</code> property.</p>
<ul>
<li><code>--with-jni-libpath=&lt;path&gt;</code> - Use the specified path as a default when searching for runtime libraries.</li>
</ul>
@@ -431,7 +441,7 @@
<h3 id="configure-control-variables">Configure Control Variables</h3>
<p>It is possible to control certain aspects of <code>configure</code> by overriding the value of <code>configure</code> variables, either on the command line or in the environment.</p>
<p>Normally, this is <strong>not recommended</strong>. If used improperly, it can lead to a broken configuration. Unless you're well versed in the build system, this is hard to use properly. Therefore, <code>configure</code> will print a warning if this is detected.</p>
<p>However, there are a few <code>configure</code> variables, known as <em>control variables</em> that are supposed to be overriden on the command line. These are variables that describe the location of tools needed by the build, like <code>MAKE</code> or <code>GREP</code>. If any such variable is specified, <code>configure</code> will use that value instead of trying to autodetect the tool. For instance, <code>bash configure MAKE=/opt/gnumake4.0/bin/make</code>.</p>
<p>However, there are a few <code>configure</code> variables, known as <em>control variables</em> that are supposed to be overridden on the command line. These are variables that describe the location of tools needed by the build, like <code>MAKE</code> or <code>GREP</code>. If any such variable is specified, <code>configure</code> will use that value instead of trying to autodetect the tool. For instance, <code>bash configure MAKE=/opt/gnumake4.0/bin/make</code>.</p>
<p>If a configure argument exists, use that instead, e.g. use <code>--with-jtreg</code> instead of setting <code>JTREGEXE</code>.</p>
<p>Also note that, despite what autoconf claims, setting <code>CFLAGS</code> will not accomplish anything. Instead use <code>--with-extra-cflags</code> (and similar for <code>cxxflags</code> and <code>ldflags</code>).</p>
<h2 id="running-make">Running Make</h2>
@@ -468,7 +478,7 @@
<h3 id="make-control-variables">Make Control Variables</h3>
<p>It is possible to control <code>make</code> behavior by overriding the value of <code>make</code> variables, either on the command line or in the environment.</p>
<p>Normally, this is <strong>not recommended</strong>. If used improperly, it can lead to a broken build. Unless you're well versed in the build system, this is hard to use properly. Therefore, <code>make</code> will print a warning if this is detected.</p>
<p>However, there are a few <code>make</code> variables, known as <em>control variables</em> that are supposed to be overriden on the command line. These make up the &quot;make time&quot; configuration, as opposed to the &quot;configure time&quot; configuration.</p>
<p>However, there are a few <code>make</code> variables, known as <em>control variables</em> that are supposed to be overridden on the command line. These make up the &quot;make time&quot; configuration, as opposed to the &quot;configure time&quot; configuration.</p>
<h4 id="general-make-control-variables">General Make Control Variables</h4>
<ul>
<li><code>JOBS</code> - Specify the number of jobs to build with. See <a href="#build-performance">Build Performance</a>.</li>
@@ -621,21 +631,30 @@ cp: cannot stat `arm-linux-gnueabihf/libXt.so&#39;: No such file or directory</c
<p>Fortunately, you can create sysroots for foreign architectures with tools provided by your OS. On Debian/Ubuntu systems, one could use <code>qemu-deboostrap</code> to create the <em>target</em> system chroot, which would have the native libraries and headers specific to that <em>target</em> system. After that, we can use the cross-compiler on the <em>build</em> system, pointing into chroot to get the build dependencies right. This allows building for foreign architectures with native compilation speed.</p>
<p>For example, cross-compiling to AArch64 from x86_64 could be done like this:</p>
<ul>
<li>Install cross-compiler on the <em>build</em> system:</li>
</ul>
<pre><code>apt install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu</code></pre>
<ul>
<li>Create chroot on the <em>build</em> system, configuring it for <em>target</em> system:</li>
</ul>
<pre><code>sudo qemu-debootstrap --arch=arm64 --verbose \
--include=fakeroot,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng12-dev \
--resolve-deps jessie /chroots/arm64 http://httpredir.debian.org/debian/</code></pre>
<ul>
<li>Configure and build with newly created chroot as sysroot/toolchain-path:</li>
</ul>
<pre><code>CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ sh ./configure --openjdk-target=aarch64-linux-gnu --with-sysroot=/chroots/arm64/ --with-toolchain-path=/chroots/arm64/
<li><p>Install cross-compiler on the <em>build</em> system:</p>
<pre><code>apt install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu</code></pre></li>
<li><p>Create chroot on the <em>build</em> system, configuring it for <em>target</em> system:</p>
<pre><code>sudo qemu-debootstrap \
--arch=arm64 \
--verbose \
--include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng-dev \
--resolve-deps \
buster \
~/sysroot-arm64 \
http://httpredir.debian.org/debian/</code></pre></li>
<li><p>Make sure the symlinks inside the newly created chroot point to proper locations:</p>
<pre><code>sudo chroot ~/sysroot-arm64 symlinks -cr .</code></pre></li>
<li><p>Configure and build with newly created chroot as sysroot/toolchain-path:</p>
<pre><code>CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ sh ./configure \
--openjdk-target=aarch64-linux-gnu \
--with-sysroot=~/sysroot-arm64 \
--with-toolchain-path=~/sysroot-arm64 \
--with-freetype-lib=~/sysroot-arm64/usr/lib/aarch64-linux-gnu/ \
--with-freetype-include=~/sysroot-arm64/usr/include/freetype2/ \
--x-libraries=~/sysroot-arm64/usr/lib/aarch64-linux-gnu/
make images
ls build/linux-aarch64-normal-server-release/</code></pre>
ls build/linux-aarch64-server-release/</code></pre></li>
</ul>
<p>The build does not create new files in that chroot, so it can be reused for multiple builds without additional cleanup.</p>
<p>Architectures that are known to successfully cross-compile like this are:</p>
<table>
@@ -689,6 +708,15 @@ ls build/linux-aarch64-normal-server-release/</code></pre>
<p>Additional architectures might be supported by Debian/Ubuntu Ports.</p>
<h3 id="building-for-armaarch64">Building for ARM/aarch64</h3>
<p>A common cross-compilation target is the ARM CPU. When building for ARM, it is useful to set the ABI profile. A number of pre-defined ABI profiles are available using <code>--with-abi-profile</code>: arm-vfp-sflt, arm-vfp-hflt, arm-sflt, armv5-vfp-sflt, armv6-vfp-hflt. Note that soft-float ABIs are no longer properly supported by the JDK.</p>
<h3 id="building-for-musl">Building for musl</h3>
<p>Just like it's possible to cross-compile for a different CPU, it's possible to cross-compile for musl libc on a glibc-based <em>build</em> system. A devkit suitable for most target CPU architectures can be obtained from <a href="https://musl.cc">musl.cc</a>. After installing the required packages in the sysroot, configure the build with <code>--openjdk-target</code>:</p>
<pre><code>sh ./configure --with-jvm-variants=server \
--with-boot-jdk=$BOOT_JDK \
--with-build-jdk=$BUILD_JDK \
--openjdk-target=x86_64-unknown-linux-musl \
--with-devkit=$DEVKIT \
--with-sysroot=$SYSROOT</code></pre>
<p>and run <code>make</code> normally.</p>
<h3 id="verifying-the-build">Verifying the Build</h3>
<p>The build will end up in a directory named like <code>build/linux-arm-normal-server-release</code>.</p>
<p>Inside this build output directory, the <code>images/jdk</code> will contain the newly built JDK, for your <em>target</em> system.</p>
@@ -732,14 +760,14 @@ ls build/linux-aarch64-normal-server-release/</code></pre>
=== Output from failing command(s) repeated here ===
* For target hotspot_variant-server_libjvm_objs_psMemoryPool.o:
/localhome/hg/jdk9-sandbox/hotspot/src/share/vm/services/psMemoryPool.cpp:1:1: error: &#39;failhere&#39; does not name a type
/localhome/git/jdk-sandbox/hotspot/src/share/vm/services/psMemoryPool.cpp:1:1: error: &#39;failhere&#39; does not name a type
... (rest of output omitted)
* All command lines available in /localhome/hg/jdk9-sandbox/build/linux-x64/make-support/failure-logs.
* All command lines available in /localhome/git/jdk-sandbox/build/linux-x64/make-support/failure-logs.
=== End of repeated output ===
=== Make failed targets repeated here ===
lib/CompileJvm.gmk:207: recipe for target &#39;/localhome/hg/jdk9-sandbox/build/linux-x64/hotspot/variant-server/libjvm/objs/psMemoryPool.o&#39; failed
lib/CompileJvm.gmk:207: recipe for target &#39;/localhome/git/jdk-sandbox/build/linux-x64/hotspot/variant-server/libjvm/objs/psMemoryPool.o&#39; failed
make/Main.gmk:263: recipe for target &#39;hotspot-server-libs&#39; failed
=== End of repeated output ===
@@ -766,7 +794,7 @@ Hint: If caused by a warning, try configure --disable-warnings-as-errors.</code>
<p>Here are a suggested list of things to try if you are having unexpected build problems. Each step requires more time than the one before, so try them in order. Most issues will be solved at step 1 or 2.</p>
<ol type="1">
<li><p>Make sure your repository is up-to-date</p>
<p>Run <code>hg pull -u</code> to make sure you have the latest changes.</p></li>
<p>Run <code>git pull origin master</code> to make sure you have the latest changes.</p></li>
<li><p>Clean build results</p>
<p>The simplest way to fix incremental rebuild issues is to run <code>make clean</code>. This will remove all build results, but not the configuration or any build system support artifacts. In most cases, this will solve build errors resulting from incremental build mismatches.</p></li>
<li><p>Completely clean the build directory.</p>
@@ -775,8 +803,8 @@ Hint: If caused by a warning, try configure --disable-warnings-as-errors.</code>
make dist-clean
bash configure $(cat current-configuration)
make</code></pre></li>
<li><p>Re-clone the Mercurial repository</p>
<p>Sometimes the Mercurial repository gets in a state that causes the product to be un-buildable. In such a case, the simplest solution is often the &quot;sledgehammer approach&quot;: delete the entire repository, and re-clone it. If you have local changes, save them first to a different location using <code>hg export</code>.</p></li>
<li><p>Re-clone the Git repository</p>
<p>Sometimes the Git repository gets in a state that causes the product to be un-buildable. In such a case, the simplest solution is often the &quot;sledgehammer approach&quot;: delete the entire repository, and re-clone it. If you have local changes, save them first to a different location using <code>git format-patch</code>.</p></li>
</ol>
<h3 id="specific-build-issues">Specific Build Issues</h3>
<h4 id="clock-skew">Clock Skew</h4>
@@ -795,19 +823,6 @@ spawn failed</code></pre>
<p>If none of the suggestions in this document helps you, or if you find what you believe is a bug in the build system, please contact the Build Group by sending a mail to <a href="mailto:build-dev@openjdk.java.net">build-dev@openjdk.java.net</a>. Please include the relevant parts of the configure and/or build log.</p>
<p>If you need general help or advice about developing for the JDK, you can also contact the Adoption Group. See the section on <a href="#contributing-to-openjdk">Contributing to OpenJDK</a> for more information.</p>
<h2 id="hints-and-suggestions-for-advanced-users">Hints and Suggestions for Advanced Users</h2>
<h3 id="setting-up-a-repository-for-pushing-changes-defpath">Setting Up a Repository for Pushing Changes (defpath)</h3>
<p>To help you prepare a proper push path for a Mercurial repository, there exists a useful tool known as <a href="http://openjdk.java.net/projects/code-tools/defpath">defpath</a>. It will help you setup a proper push path for pushing changes to the JDK.</p>
<p>Install the extension by cloning <code>http://hg.openjdk.java.net/code-tools/defpath</code> and updating your <code>.hgrc</code> file. Here's one way to do this:</p>
<pre><code>cd ~
mkdir hg-ext
cd hg-ext
hg clone http://hg.openjdk.java.net/code-tools/defpath
cat &lt;&lt; EOT &gt;&gt; ~/.hgrc
[extensions]
defpath=~/hg-ext/defpath/defpath.py
EOT</code></pre>
<p>You can now setup a proper push path using:</p>
<pre><code>hg defpath -d -u &lt;your OpenJDK username&gt;</code></pre>
<h3 id="bash-completion">Bash Completion</h3>
<p>The <code>configure</code> and <code>make</code> commands tries to play nice with bash command-line completion (using <code>&lt;tab&gt;</code> or <code>&lt;tab&gt;&lt;tab&gt;</code>). To use this functionality, make sure you enable completion in your <code>~/.bashrc</code> (see instructions for bash in your operating system).</p>
<p>Make completion will work out of the box, and will complete valid make targets. For instance, typing <code>make jdk-i&lt;tab&gt;</code> will complete to <code>make jdk-image</code>.</p>
@@ -860,14 +875,6 @@ sudo mv /tmp/configure /usr/local/bin</code></pre>
<h4 id="rebuilding-part-of-java.base-jdk_filter">Rebuilding Part of java.base (JDK_FILTER)</h4>
<p>If you are modifying files in <code>java.base</code>, which is the by far largest module in the JDK, then you need to rebuild all those files whenever a single file has changed. (This inefficiency will hopefully be addressed in JDK 10.)</p>
<p>As a hack, you can use the make control variable <code>JDK_FILTER</code> to specify a pattern that will be used to limit the set of files being recompiled. For instance, <code>make java.base JDK_FILTER=javax/crypto</code> (or, to combine methods, <code>make java.base-java-only JDK_FILTER=javax/crypto</code>) will limit the compilation to files in the <code>javax.crypto</code> package.</p>
<h3 id="learn-about-mercurial">Learn About Mercurial</h3>
<p>To become an efficient JDK developer, it is recommended that you invest in learning Mercurial properly. Here are some links that can get you started:</p>
<ul>
<li><a href="http://www.mercurial-scm.org/wiki/GitConcepts">Mercurial for git users</a></li>
<li><a href="http://www.mercurial-scm.org/wiki/Tutorial">The official Mercurial tutorial</a></li>
<li><a href="http://hginit.com/">hg init</a></li>
<li><a href="http://hgbook.red-bean.com/read/">Mercurial: The Definitive Guide</a></li>
</ul>
<h2 id="understanding-the-build-system">Understanding the Build System</h2>
<p>This section will give you a more technical description on the details of the build system.</p>
<h3 id="configurations">Configurations</h3>

View File

@@ -3,11 +3,11 @@
## TL;DR (Instructions for the Impatient)
If you are eager to try out building the JDK, these simple steps works most of
the time. They assume that you have installed Mercurial (and Cygwin if running
the time. They assume that you have installed Git (and Cygwin if running
on Windows) and cloned the top-level JDK repository that you want to build.
1. [Get the complete source code](#getting-the-source-code): \
`hg clone http://hg.openjdk.java.net/jdk/jdk`
`git clone https://git.openjdk.java.net/jdk/`
2. [Run configure](#running-configure): \
`bash configure`
@@ -47,14 +47,14 @@ JDK.
Make sure you are getting the correct version. As of JDK 10, the source is no
longer split into separate repositories so you only need to clone one single
repository. At the [OpenJDK Mercurial server](http://hg.openjdk.java.net/) you
repository. At the [OpenJDK Git site](https://git.openjdk.java.net/) you
can see a list of all available repositories. If you want to build an older version,
e.g. JDK 8, it is recommended that you get the `jdk8u` forest, which contains
incremental updates, instead of the `jdk8` forest, which was frozen at JDK 8 GA.
e.g. JDK 11, it is recommended that you get the `jdk11u` repo, which contains
incremental updates, instead of the `jdk11` repo, which was frozen at JDK 11 GA.
If you are new to Mercurial, a good place to start is the [Mercurial Beginner's
Guide](http://www.mercurial-scm.org/guide). The rest of this document assumes a
working knowledge of Mercurial.
If you are new to Git, a good place to start is the book [Pro
Git](https://git-scm.com/book/en/v2). The rest of this document
assumes a working knowledge of Git.
### Special Considerations
@@ -89,9 +89,21 @@ on where and how to check out the source code.
directory. This is especially important if your user name contains
spaces and/or mixed upper and lower case letters.
* Clone the JDK repository using the Cygwin command line `hg` client
as instructed in this document. That is, do *not* use another Mercurial
client such as TortoiseHg.
* You need to install a git client. You have two choices, Cygwin git or
Git for Windows. Unfortunately there are pros and cons with each choice.
* The Cygwin `git` client has no line ending issues and understands
Cygwin paths (which are used throughout the JDK build system).
However, it does not currently work well with the Skara CLI tooling.
Please see the [Skara wiki on Git clients](
https://wiki.openjdk.java.net/display/SKARA/Skara#Skara-Git) for
up-to-date information about the Skara git client support.
* The [Git for Windows](https://gitforwindows.org) client has issues
with line endings, and do not understand Cygwin paths. It does work
well with the Skara CLI tooling, however. To alleviate the line ending
problems, make sure you set `core.autocrlf` to `false` (this is asked
during installation).
Failure to follow this procedure might result in hard-to-debug build
problems.
@@ -173,7 +185,7 @@ likely be possible to support in a future version but that would require effort
to implement.)
Internally in the build system, all paths are represented as Unix-style paths,
e.g. `/cygdrive/c/hg/jdk9/Makefile` rather than `C:\hg\jdk9\Makefile`. This
e.g. `/cygdrive/c/git/jdk/Makefile` rather than `C:\git\jdk\Makefile`. This
rule also applies to input to the build system, e.g. in arguments to
`configure`. So, use `--with-msvcr-dll=/cygdrive/c/msvcr100.dll` rather than
`--with-msvcr-dll=c:\msvcr100.dll`. For details on this conversion, see the section
@@ -273,6 +285,13 @@ For rpm-based distributions (Fedora, Red Hat, etc), try this:
sudo yum groupinstall "Development Tools"
```
For Alpine Linux, aside from basic tooling, install the GNU versions of some
programs:
```
sudo apk add build-base bash grep zip
```
### AIX
Please consult the AIX section of the [Supported Build Platforms](
@@ -302,9 +321,9 @@ issues.
Operating system Toolchain version
------------------ -------------------------------------------------------
Linux gcc 9.2.0
Linux gcc 10.2.0
macOS Apple Xcode 10.1 (using clang 10.0.0)
Windows Microsoft Visual Studio 2019 update 16.5.3
Windows Microsoft Visual Studio 2019 update 16.7.2
All compilers are expected to be able to compile to the C99 language standard,
as some C99 features are used in the source code. Microsoft Visual Studio
@@ -316,14 +335,14 @@ features that it does support.
The minimum accepted version of gcc is 5.0. Older versions will generate a warning
by `configure` and are unlikely to work.
The JDK is currently known to be able to compile with at least version 9.2 of
The JDK is currently known to be able to compile with at least version 10.2 of
gcc.
In general, any version between these two should be usable.
### clang
The minimum accepted version of clang is 3.2. Older versions will not be
The minimum accepted version of clang is 3.5. Older versions will not be
accepted by `configure`.
To use clang instead of gcc on Linux, use `--with-toolchain-type=clang`.
@@ -355,20 +374,13 @@ available for this update.
### Microsoft Visual Studio
The minimum accepted version of Visual Studio is 2010. Older versions will not
be accepted by `configure`. The maximum accepted version of Visual Studio is
2019. Versions older than 2017 are unlikely to continue working for long.
The minimum accepted version of Visual Studio is 2017. Older versions will not
be accepted by `configure` and will not work. The maximum accepted
version of Visual Studio is 2019.
If you have multiple versions of Visual Studio installed, `configure` will by
default pick the latest. You can request a specific version to be used by
setting `--with-toolchain-version`, e.g. `--with-toolchain-version=2015`.
If you get `LINK: fatal error LNK1123: failure during conversion to COFF: file
invalid` when building using Visual Studio 2010, you have encountered
[KB2757355](http://support.microsoft.com/kb/2757355), a bug triggered by a
specific installation order. However, the solution suggested by the KB article
does not always resolve the problem. See [this stackoverflow discussion](
https://stackoverflow.com/questions/10888391) for other suggestions.
setting `--with-toolchain-version`, e.g. `--with-toolchain-version=2017`.
### IBM XL C/C++
@@ -438,6 +450,7 @@ rather than bundling the JDK's own copy.
libfreetype6-dev`.
* To install on an rpm-based Linux, try running `sudo yum install
freetype-devel`.
* To install on Alpine Linux, try running `sudo apk add freetype-dev`.
Use `--with-freetype-include=<path>` and `--with-freetype-lib=<path>`
if `configure` does not automatically locate the platform FreeType files.
@@ -452,6 +465,7 @@ your operating system.
libcups2-dev`.
* To install on an rpm-based Linux, try running `sudo yum install
cups-devel`.
* To install on Alpine Linux, try running `sudo apk add cups-dev`.
Use `--with-cups=<path>` if `configure` does not properly locate your CUPS
files.
@@ -465,6 +479,8 @@ Linux.
libx11-dev libxext-dev libxrender-dev libxrandr-dev libxtst-dev libxt-dev`.
* To install on an rpm-based Linux, try running `sudo yum install
libXtst-devel libXt-devel libXrender-devel libXrandr-devel libXi-devel`.
* To install on Alpine Linux, try running `sudo apk add libx11-dev
libxext-dev libxrender-dev libxrandr-dev libxtst-dev libxt-dev`.
Use `--with-x=<path>` if `configure` does not properly locate your X11 files.
@@ -477,6 +493,7 @@ required on Linux. At least version 0.9.1 of ALSA is required.
libasound2-dev`.
* To install on an rpm-based Linux, try running `sudo yum install
alsa-lib-devel`.
* To install on Alpine Linux, try running `sudo apk add alsa-lib-dev`.
Use `--with-alsa=<path>` if `configure` does not properly locate your ALSA
files.
@@ -491,6 +508,7 @@ Hotspot.
libffi-dev`.
* To install on an rpm-based Linux, try running `sudo yum install
libffi-devel`.
* To install on Alpine Linux, try running `sudo apk add libffi-dev`.
Use `--with-libffi=<path>` if `configure` does not properly locate your libffi
files.
@@ -506,6 +524,7 @@ platforms. At least version 2.69 is required.
autoconf`.
* To install on an rpm-based Linux, try running `sudo yum install
autoconf`.
* To install on Alpine Linux, try running `sudo apk add autoconf`.
* To install on macOS, try running `brew install autoconf`.
* To install on Windows, try running `<path to Cygwin setup>/setup-x86_64 -q
-P autoconf`.
@@ -634,7 +653,7 @@ features, use `bash configure --help=short` instead.)
On Linux, BSD and AIX, it is possible to override where Java by default
searches for runtime/JNI libraries. This can be useful in situations where
there is a special shared directory for system JNI libraries. This setting
can in turn be overriden at runtime by setting the `java.library.path` property.
can in turn be overridden at runtime by setting the `java.library.path` property.
* `--with-jni-libpath=<path>` - Use the specified path as a default
when searching for runtime libraries.
@@ -700,7 +719,7 @@ hard to use properly. Therefore, `configure` will print a warning if this is
detected.
However, there are a few `configure` variables, known as *control variables*
that are supposed to be overriden on the command line. These are variables that
that are supposed to be overridden on the command line. These are variables that
describe the location of tools needed by the build, like `MAKE` or `GREP`. If
any such variable is specified, `configure` will use that value instead of
trying to autodetect the tool. For instance, `bash configure
@@ -780,7 +799,7 @@ broken build. Unless you're well versed in the build system, this is hard to
use properly. Therefore, `make` will print a warning if this is detected.
However, there are a few `make` variables, known as *control variables* that
are supposed to be overriden on the command line. These make up the "make time"
are supposed to be overridden on the command line. These make up the "make time"
configuration, as opposed to the "configure time" configuration.
#### General Make Control Variables
@@ -1079,23 +1098,39 @@ for foreign architectures with native compilation speed.
For example, cross-compiling to AArch64 from x86_64 could be done like this:
* Install cross-compiler on the *build* system:
```
apt install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu
```
```
apt install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu
```
* Create chroot on the *build* system, configuring it for *target* system:
```
sudo qemu-debootstrap --arch=arm64 --verbose \
--include=fakeroot,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng12-dev \
--resolve-deps jessie /chroots/arm64 http://httpredir.debian.org/debian/
```
```
sudo qemu-debootstrap \
--arch=arm64 \
--verbose \
--include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng-dev \
--resolve-deps \
buster \
~/sysroot-arm64 \
http://httpredir.debian.org/debian/
```
* Make sure the symlinks inside the newly created chroot point to proper locations:
```
sudo chroot ~/sysroot-arm64 symlinks -cr .
```
* Configure and build with newly created chroot as sysroot/toolchain-path:
```
CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ sh ./configure --openjdk-target=aarch64-linux-gnu --with-sysroot=/chroots/arm64/ --with-toolchain-path=/chroots/arm64/
make images
ls build/linux-aarch64-normal-server-release/
```
```
CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ sh ./configure \
--openjdk-target=aarch64-linux-gnu \
--with-sysroot=~/sysroot-arm64 \
--with-toolchain-path=~/sysroot-arm64 \
--with-freetype-lib=~/sysroot-arm64/usr/lib/aarch64-linux-gnu/ \
--with-freetype-include=~/sysroot-arm64/usr/include/freetype2/ \
--x-libraries=~/sysroot-arm64/usr/lib/aarch64-linux-gnu/
make images
ls build/linux-aarch64-server-release/
```
The build does not create new files in that chroot, so it can be reused for multiple builds
without additional cleanup.
@@ -1120,6 +1155,25 @@ available using `--with-abi-profile`: arm-vfp-sflt, arm-vfp-hflt, arm-sflt,
armv5-vfp-sflt, armv6-vfp-hflt. Note that soft-float ABIs are no longer
properly supported by the JDK.
### Building for musl
Just like it's possible to cross-compile for a different CPU, it's possible to
cross-compile for musl libc on a glibc-based *build* system.
A devkit suitable for most target CPU architectures can be obtained from
[musl.cc](https://musl.cc). After installing the required packages in the
sysroot, configure the build with `--openjdk-target`:
```
sh ./configure --with-jvm-variants=server \
--with-boot-jdk=$BOOT_JDK \
--with-build-jdk=$BUILD_JDK \
--openjdk-target=x86_64-unknown-linux-musl \
--with-devkit=$DEVKIT \
--with-sysroot=$SYSROOT
```
and run `make` normally.
### Verifying the Build
The build will end up in a directory named like
@@ -1244,14 +1298,14 @@ ERROR: Build failed for target 'hotspot' in configuration 'linux-x64' (exit code
=== Output from failing command(s) repeated here ===
* For target hotspot_variant-server_libjvm_objs_psMemoryPool.o:
/localhome/hg/jdk9-sandbox/hotspot/src/share/vm/services/psMemoryPool.cpp:1:1: error: 'failhere' does not name a type
/localhome/git/jdk-sandbox/hotspot/src/share/vm/services/psMemoryPool.cpp:1:1: error: 'failhere' does not name a type
... (rest of output omitted)
* All command lines available in /localhome/hg/jdk9-sandbox/build/linux-x64/make-support/failure-logs.
* All command lines available in /localhome/git/jdk-sandbox/build/linux-x64/make-support/failure-logs.
=== End of repeated output ===
=== Make failed targets repeated here ===
lib/CompileJvm.gmk:207: recipe for target '/localhome/hg/jdk9-sandbox/build/linux-x64/hotspot/variant-server/libjvm/objs/psMemoryPool.o' failed
lib/CompileJvm.gmk:207: recipe for target '/localhome/git/jdk-sandbox/build/linux-x64/hotspot/variant-server/libjvm/objs/psMemoryPool.o' failed
make/Main.gmk:263: recipe for target 'hotspot-server-libs' failed
=== End of repeated output ===
@@ -1349,7 +1403,7 @@ order. Most issues will be solved at step 1 or 2.
1. Make sure your repository is up-to-date
Run `hg pull -u` to make sure you have the latest changes.
Run `git pull origin master` to make sure you have the latest changes.
2. Clean build results
@@ -1374,13 +1428,13 @@ order. Most issues will be solved at step 1 or 2.
make
```
4. Re-clone the Mercurial repository
4. Re-clone the Git repository
Sometimes the Mercurial repository gets in a state that causes the product
Sometimes the Git repository gets in a state that causes the product
to be un-buildable. In such a case, the simplest solution is often the
"sledgehammer approach": delete the entire repository, and re-clone it.
If you have local changes, save them first to a different location using
`hg export`.
`git format-patch`.
### Specific Build Issues
@@ -1425,33 +1479,6 @@ contact the Adoption Group. See the section on [Contributing to OpenJDK](
## Hints and Suggestions for Advanced Users
### Setting Up a Repository for Pushing Changes (defpath)
To help you prepare a proper push path for a Mercurial repository, there exists
a useful tool known as [defpath](
http://openjdk.java.net/projects/code-tools/defpath). It will help you setup a
proper push path for pushing changes to the JDK.
Install the extension by cloning
`http://hg.openjdk.java.net/code-tools/defpath` and updating your `.hgrc` file.
Here's one way to do this:
```
cd ~
mkdir hg-ext
cd hg-ext
hg clone http://hg.openjdk.java.net/code-tools/defpath
cat << EOT >> ~/.hgrc
[extensions]
defpath=~/hg-ext/defpath/defpath.py
EOT
```
You can now setup a proper push path using:
```
hg defpath -d -u <your OpenJDK username>
```
### Bash Completion
The `configure` and `make` commands tries to play nice with bash command-line
@@ -1592,16 +1619,6 @@ instance, `make java.base JDK_FILTER=javax/crypto` (or, to combine methods,
`make java.base-java-only JDK_FILTER=javax/crypto`) will limit the compilation
to files in the `javax.crypto` package.
### Learn About Mercurial
To become an efficient JDK developer, it is recommended that you invest in
learning Mercurial properly. Here are some links that can get you started:
* [Mercurial for git users](http://www.mercurial-scm.org/wiki/GitConcepts)
* [The official Mercurial tutorial](http://www.mercurial-scm.org/wiki/Tutorial)
* [hg init](http://hginit.com/)
* [Mercurial: The Definitive Guide](http://hgbook.red-bean.com/read/)
## Understanding the Build System
This section will give you a more technical description on the details of the

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

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

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

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

223
doc/hotspot-unit-tests.html Normal file
View File

@@ -0,0 +1,223 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>Native/Unit Test Development Guidelines</title>
<style type="text/css">
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
</style>
<link rel="stylesheet" href="../make/data/docs-resources/resources/jdk-default.css" />
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<header id="title-block-header">
<h1 class="title">Native/Unit Test Development Guidelines</h1>
</header>
<nav id="TOC">
<ul>
<li><a href="#good-test-properties">Good test properties</a><ul>
<li><a href="#lightness">Lightness</a></li>
<li><a href="#isolation">Isolation</a></li>
<li><a href="#atomicity-and-self-containment">Atomicity and self-containment</a></li>
<li><a href="#repeatability">Repeatability</a></li>
<li><a href="#informativeness">Informativeness</a></li>
<li><a href="#testing-instead-of-visiting">Testing instead of visiting</a></li>
<li><a href="#nearness">Nearness</a></li>
</ul></li>
<li><a href="#asserts">Asserts</a><ul>
<li><a href="#several-checks">Several checks</a></li>
<li><a href="#first-parameter-is-expected-value">First parameter is expected value</a></li>
<li><a href="#floating-point-comparison">Floating-point comparison</a></li>
<li><a href="#c-string-comparison">C string comparison</a></li>
<li><a href="#error-messages">Error messages</a></li>
<li><a href="#uncluttered-output">Uncluttered output</a></li>
<li><a href="#failures-propagation">Failures propagation</a></li>
</ul></li>
<li><a href="#naming-and-grouping">Naming and Grouping</a><ul>
<li><a href="#test-group-names">Test group names</a></li>
<li><a href="#filename">Filename</a></li>
<li><a href="#file-location">File location</a></li>
<li><a href="#test-names">Test names</a></li>
<li><a href="#fixture-classes">Fixture classes</a></li>
<li><a href="#friend-classes">Friend classes</a></li>
<li><a href="#oscpu-specific-tests">OS/CPU specific tests</a></li>
</ul></li>
<li><a href="#miscellaneous">Miscellaneous</a><ul>
<li><a href="#hotspot-style">Hotspot style</a></li>
<li><a href="#codetest-metrics">Code/test metrics</a></li>
<li><a href="#access-to-non-public-members">Access to non-public members</a></li>
<li><a href="#death-tests">Death tests</a></li>
<li><a href="#external-flags">External flags</a></li>
<li><a href="#test-specific-flags">Test-specific flags</a></li>
<li><a href="#flag-restoring">Flag restoring</a></li>
<li><a href="#googletest-documentation">GoogleTest documentation</a></li>
</ul></li>
<li><a href="#todo">TODO</a></li>
</ul>
</nav>
<p>The purpose of these guidelines is to establish a shared vision on what kind of native tests and how we want to develop them for Hotspot using GoogleTest. Hence these guidelines include style items as well as test approach items.</p>
<p>First section of this document describes properties of good tests which are common for almost all types of test regardless of language, framework, etc. Further sections provide recommendations to achieve those properties and other HotSpot and/or GoogleTest specific guidelines.</p>
<h2 id="good-test-properties">Good test properties</h2>
<h3 id="lightness">Lightness</h3>
<p>Use the most lightweight type of tests.</p>
<p>In Hotspot, there are 3 different types of tests regarding their dependency on a JVM, each next level is slower than previous</p>
<ul>
<li><p><code>TEST</code> : a test does not depend on a JVM</p></li>
<li><p><code>TEST_VM</code> : a test does depend on an initialized JVM, but are supposed not to break a JVM, i.e. leave it in a workable state.</p></li>
<li><p><code>TEST_OTHER_VM</code> : a test depends on a JVM and requires a freshly initialized JVM or leaves a JVM in non-workable state</p></li>
</ul>
<h3 id="isolation">Isolation</h3>
<p>Tests have to be isolated: not to have visible side-effects, influences on other tests results.</p>
<p>Results of one test should not depend on test execution order, other tests, otherwise it is becoming almost impossible to find out why a test failed. Due to hotspot-specific, it is not so easy to get a full isolation, e.g. we share an initialized JVM between all <code>TEST_VM</code> tests, so if your test changes JVM's state too drastically and does not change it back, you had better consider <code>TEST_OTHER_VM</code>.</p>
<h3 id="atomicity-and-self-containment">Atomicity and self-containment</h3>
<p>Tests should be <em>atomic</em> and <em>self-contained</em> at the same time.</p>
<p>One test should check a particular part of a class, subsystem, functionality, etc. Then it is quite easy to determine what parts of a product are broken basing on test failures. On the other hand, a test should test that part more-or-less entirely, because when one sees a test <code>FooTest::bar</code>, they assume all aspects of bar from <code>Foo</code> are tested.</p>
<p>However, it is impossible to cover all aspects even of a method, not to mention a subsystem. In such cases, it is recommended to have several tests, one for each aspect of a thing under test. For example one test to tests how <code>Foo::bar</code> works if an argument is <code>null</code>, another test to test how it works if an argument is acceptable but <code>Foo</code> is not in the right state to accept it and so on. This helps not only to make tests atomic, self-contained but also makes test name self-descriptive (discussed in more details in <a href="#test-names">Test names</a>).</p>
<h3 id="repeatability">Repeatability</h3>
<p>Tests have to be repeatable.</p>
<p>Reproducibility is very crucial for a test. No one likes sporadic test failures, they are hard to investigate, fix and verify a fix.</p>
<p>In some cases, it is quite hard to write a 100% repeatable test, since besides a test there can be other moving parts, e.g. in case of <code>TEST_VM</code> there are several concurrently running threads. Despite this, we should try to make a test as reproducible as possible.</p>
<h3 id="informativeness">Informativeness</h3>
<p>In case of a failure, a test should be as <em>informative</em> as possible.</p>
<p>Having more information about a test failure than just compared values can be very useful for failure troubleshooting, it can reduce or even completely eliminate debugging hours. This is even more important in case of not 100% reproducible failures.</p>
<p>Achieving this property, one can easily make a test too verbose, so it will be really hard to find useful information in the ocean of useless information. Hence they should not only think about how to provide <a href="#error-messages">good information</a>, but also <a href="#uncluttered-output">when to do it</a>.</p>
<h3 id="testing-instead-of-visiting">Testing instead of visiting</h3>
<p>Tests should <em>test</em>.</p>
<p>It is not enough just to &quot;visit&quot; some code, a test should check that code does that it has to do, compare return values with expected values, check that desired side effects are done, and undesired are not, and so on. In other words, a test should contain at least one GoogleTest assertion and do not rely on JVM asserts.</p>
<p>Generally speaking to write a good test, one should create a model of the system under tests, a model of possible bugs (or bugs which one wants to find) and design tests using those models.</p>
<h3 id="nearness">Nearness</h3>
<p>Prefer having checks inside test code.</p>
<p>Not only does having test logic outside, e.g. verification method, depending on asserts in product code contradict with several items above but also decreases tests readability and stability. It is much easier to understand that a test is testing when all testing logic is located inside a test or nearby in shared test libraries. As a rule of thumb, the closer a check to a test, the better.</p>
<h2 id="asserts">Asserts</h2>
<h3 id="several-checks">Several checks</h3>
<p>Prefer <code>EXPECT</code> over <code>ASSERT</code> if possible.</p>
<p>This is related to the <a href="#informativeness">informativeness</a> property of tests, information for other checks can help to better localize a defects root-cause. One should use <code>ASSERT</code> if it is impossible to continue test execution or if it does not make much sense. Later in the text, <code>EXPECT</code> forms will be used to refer to both <code>ASSERT/EXPECT</code>.</p>
<p>When it is possible to make several different checks, but impossible to continue test execution if at least one check fails, you can use <code>::testing::Test::HasNonfatalFailure()</code> function. The recommended way to express that is <code>ASSERT_FALSE(::testing::Test::HasNonfatalFailure())</code>. Besides making it clear why a test is aborted, it also allows you to provide more information about a failure.</p>
<h3 id="first-parameter-is-expected-value">First parameter is expected value</h3>
<p>In all equality assertions, expected values should be passed as the first parameter.</p>
<p>This convention is adopted by GoogleTest, and there is a slight difference in how GoogleTest treats parameters, the most important one is <code>null</code> detection. Due to different reasons, <code>null</code> detection is enabled only for the first parameter, that is to said <code>EXPECT_EQ(NULL, object)</code> checks that object is <code>null</code>, while <code>EXPECT_EQ(object, NULL)</code> checks that object equals to <code>NULL</code>, GoogleTest is very strict regarding types of compared values so the latter will generates a compile-time error.</p>
<h3 id="floating-point-comparison">Floating-point comparison</h3>
<p>Use floating-point special macros to compare <code>float/double</code> values.</p>
<p>Because of floating-point number representations and round-off errors, regular equality comparison will not return true in most cases. There are special <code>EXPECT_FLOAT_EQ/EXPECT_DOUBLE_EQ</code> assertions which check that the distance between compared values is not more than 4 ULPs, there is also <code>EXPECT_NEAR(v1, v2, eps)</code> which checks that the absolute value of the difference between <code>v1</code> and <code>v2</code> is not greater than <code>eps</code>.</p>
<h3 id="c-string-comparison">C string comparison</h3>
<p>Use string special macros for C strings comparisons.</p>
<p><code>EXPECT_EQ</code> just compares pointers values, which is hardly what one wants comparing C strings. GoogleTest provides <code>EXPECT_STREQ</code> and <code>EXPECT_STRNE</code> macros to compare C string contents. There are also case-insensitive versions <code>EXPECT_STRCASEEQ</code>, <code>EXPECT_STRCASENE</code>.</p>
<h3 id="error-messages">Error messages</h3>
<p>Provide informative, but not too verbose error messages.</p>
<p>All GoogleTest asserts print compared expressions and their values, so there is no need to have them in error messages. Asserts print only compared values, they do not print any of interim variables, e.g. <code>ASSERT_TRUE((val1 == val2 &amp;&amp; isFail(foo(8)) || i == 18)</code> prints only one value. If you use some complex predicates, please consider <code>EXPECT_PRED*</code> or <code>EXPECT_FORMAT_PRED</code> assertions family, they check that a predicate returns true/success and print out all parameters values.</p>
<p>However in some cases, default information is not enough, a commonly used example is an assert inside a loop, GoogleTest will not print iteration values (unless it is an assert's parameter). Other demonstrative examples are printing error code and a corresponding error message; printing internal states which might have an impact on results. One should add this information to assert message using <code>&lt;&lt;</code> operator.</p>
<h3 id="uncluttered-output">Uncluttered output</h3>
<p>Print information only if it is needed.</p>
<p>Too verbose tests which print all information even if they pass are very bad practice. They just pollute output, so it becomes harder to find useful information. In order not print information till it is really needed, one should consider saving it to a temporary buffer and pass to an assert. <a href="https://hg.openjdk.java.net/jdk/jdk/file/tip/test/hotspot/gtest/gc/shared/test_memset_with_concurrent_readers.cpp" class="uri">https://hg.openjdk.java.net/jdk/jdk/file/tip/test/hotspot/gtest/gc/shared/test_memset_with_concurrent_readers.cpp</a> has a good example how to do that.</p>
<h3 id="failures-propagation">Failures propagation</h3>
<p>Wrap a subroutine call into <code>EXPECT_NO_FATAL_FAILURE</code> macro to propagate failures.</p>
<p><code>ASSERT</code> and <code>FAIL</code> abort only the current function, so if you have them in a subroutine, a test will not be aborted after the subroutine even if <code>ASSERT</code> or <code>FAIL</code> fails. You should call such subroutines in <code>ASSERT_NO_FATAL_FAILURE</code> macro to propagate fatal failures and abort a test. <code>(EXPECT|ASSERT)_NO_FATAL_FAILURE</code> can also be used to provide more information.</p>
<p>Due to obvious reasons, there are no <code>(EXPECT|ASSERT)_NO_NONFATAL_FAILURE</code> macros. However, if you need to check if a subroutine generated a nonfatal failure (failed an <code>EXPECT</code>), you can use <code>::testing::Test::HasNonfatalFailure</code> function, or <code>::testing::Test::HasFailure</code> function to check if a subroutine generated any failures, see <a href="#several-checks">Several checks</a>.</p>
<h2 id="naming-and-grouping">Naming and Grouping</h2>
<h3 id="test-group-names">Test group names</h3>
<p>Test group names should be in CamelCase, start and end with a letter. A test group should be named after tested class, functionality, subsystem, etc.</p>
<p>This naming scheme helps to find tests, filter them and simplifies test failure analysis. For example, class <code>Foo</code> - test group <code>Foo</code>, compiler logging subsystem - test group <code>CompilerLogging</code>, G1 GC — test group <code>G1GC</code>, and so forth.</p>
<h3 id="filename">Filename</h3>
<p>A test file must have <code>test_</code> prefix and <code>.cpp</code> suffix.</p>
<p>Both are actually requirements from the current build system to recognize your tests.</p>
<h3 id="file-location">File location</h3>
<p>Test file location should reflect a location of the tested part of the product.</p>
<ul>
<li><p>All unit tests for a class from <code>foo/bar/baz.cpp</code> should be placed <code>foo/bar/test_baz.cpp</code> in <code>hotspot/test/native/</code> directory. Having all tests for a class in one file is a common practice for unit tests, it helps to see all existing tests at once, share functions and/or resources without losing encapsulation.</p></li>
<li><p>For tests which test more than one class, directory hierarchy should be the same as product hierarchy, and file name should reflect the name of the tested subsystem/functionality. For example, if a sub-system under tests belongs to <code>gc/g1</code>, tests should be placed in <code>gc/g1</code> directory.</p></li>
</ul>
<p>Please note that framework prepends directory name to a test group name. For example, if <code>TEST(foo, check_this)</code> and <code>TEST(bar, check_that)</code> are defined in <code>hotspot/test/native/gc/shared/test_foo.cpp</code> file, they will be reported as <code>gc/shared/foo::check_this</code> and <code>gc/shared/bar::check_that</code>.</p>
<h3 id="test-names">Test names</h3>
<p>Test names should be in small_snake_case, start and end with a letter. A test name should reflect that a test checks.</p>
<p>Such naming makes tests self-descriptive and helps a lot during the whole test life cycle. It is easy to do test planning, test inventory, to see what things are not tested, to review tests, to analyze test failures, to evolve a test, etc. For example <code>foo_return_0_if_name_is_null</code> is better than <code>foo_sanity</code> or <code>foo_basic</code> or just <code>foo</code>, <code>humongous_objects_can_not_be_moved_by_young_gc</code> is better than <code>ho_young_gc</code>.</p>
<p>Actually using underscore is against GoogleTest project convention, because it can lead to illegal identifiers, however, this is too strict. Restricting usage of underscore for test names only and prohibiting test name starts or ends with an underscore are enough to be safe.</p>
<h3 id="fixture-classes">Fixture classes</h3>
<p>Fixture classes should be named after tested classes, subsystems, etc (follow <a href="#test-group-names">Test group names rule</a>) and have <code>Test</code> suffix to prevent class name conflicts.</p>
<h3 id="friend-classes">Friend classes</h3>
<p>All test purpose friends should have either <code>Test</code> or <code>Testable</code> suffix.</p>
<p>It greatly simplifies understanding of friendships purpose and allows statically check that private members are not exposed unexpectedly. Having <code>FooTest</code> as a friend of <code>Foo</code> without any comments will be understood as a necessary evil to get testability.</p>
<h3 id="oscpu-specific-tests">OS/CPU specific tests</h3>
<p>Guard OS/CPU specific tests by <code>#ifdef</code> and have OS/CPU name in filename.</p>
<p>For the time being, we do not support separate directories for OS, CPU, OS-CPU specific tests, in case we will have lots of such tests, we will change directory layout and build system to support that in the same way it is done in hotspot.</p>
<h2 id="miscellaneous">Miscellaneous</h2>
<h3 id="hotspot-style">Hotspot style</h3>
<p>Abide the norms and rules accepted in Hotspot style guide.</p>
<p>Tests are a part of Hotspot, so everything (if applicable) we use for Hotspot, should be used for tests as well. Those guidelines cover test-specific things.</p>
<h3 id="codetest-metrics">Code/test metrics</h3>
<p>Coverage information and other code/test metrics are quite useful to decide what tests should be written, what tests should be improved and what can be removed.</p>
<p>For unit tests, widely used and well-known coverage metric is branch coverage, which provides good quality of tests with relatively easy test development process. For other levels of testing, branch coverage is not as good, and one should consider others metrics, e.g. transaction flow coverage, data flow coverage.</p>
<h3 id="access-to-non-public-members">Access to non-public members</h3>
<p>Use explicit friend class to get access to non-public members.</p>
<p>We do not use GoogleTest macro to declare friendship relation, because, from our point of view, it is less clear than an explicit declaration.</p>
<p>Declaring a test fixture class as a friend class of a tested test is the easiest and the clearest way to get access. However, it has some disadvantages, here is some of them:</p>
<ul>
<li>Each test has to be declared as a friend</li>
<li>Subclasses do not inheritance friendship relation</li>
</ul>
<p>In other words, it is harder to share code between tests. Hence if you want to share code or expect it to be useful in other tests, you should consider making members in a tested class protected and introduce a shared test-only class which expose those members via public functions, or even making members publicly accessible right away in a product class. If it is not an option to change members visibility, one can create a friend class which exposes members.</p>
<h3 id="death-tests">Death tests</h3>
<p>You can not use death tests inside <code>TEST_OTHER_VM</code> and <code>TEST_VM_ASSERT*</code>.</p>
<p>We tried to make Hotspot-GoogleTest integration as transparent as possible, however, due to the current implementation of <code>TEST_OTHER_VM</code> and <code>TEST_VM_ASSERT*</code> tests, you cannot use death test functionality in them. These tests are implemented as GoogleTest death tests, and GoogleTest does not allow to have a death test inside another death test.</p>
<h3 id="external-flags">External flags</h3>
<p>Passing external flags to a tested JVM is not supported.</p>
<p>The rationality of such design decision is to simplify both tests and a test framework and to avoid failures related to incompatible flags combination till there is a good solution for that. However there are cases when one wants to test a JVM with specific flags combination, <code>_JAVA_OPTIONS</code> environment variable can be used to do that. Flags from <code>_JAVA_OPTIONS</code> will be used in <code>TEST_VM</code>, <code>TEST_OTHER_VM</code> and <code>TEST_VM_ASSERT*</code> tests.</p>
<h3 id="test-specific-flags">Test-specific flags</h3>
<p>Passing flags to a tested JVM in <code>TEST_OTHER_VM</code> and <code>TEST_VM_ASSERT*</code> should be possible, but is not implemented yet.</p>
<p>Facility to pass test-specific flags is needed for system, regression or other types of tests which require a fully initialized JVM in some particular configuration, e.g. with Serial GC selected. There is no support for such tests now, however, there is a plan to add that in upcoming releases.</p>
<p>For now, if a test depends on flags values, it should have <code>if (!&lt;flag&gt;) { return }</code> guards in the very beginning and <code>@requires</code> comment similar to jtreg <code>@requires</code> directive right before test macros. <a href="https://hg.openjdk.java.net/jdk/jdk/file/tip/test/hotspot/gtest/gc/g1/test_g1IHOPControl.cpp" class="uri">https://hg.openjdk.java.net/jdk/jdk/file/tip/test/hotspot/gtest/gc/g1/test_g1IHOPControl.cpp</a> ha an example of this temporary workaround. It is important to follow that pattern as it allows us to easily find all such tests and update them as soon as there is an implementation of flag passing facility.</p>
<p>In long-term, we expect jtreg to support GoogleTest tests as first class citizens, that is to say, jtreg will parse <span class="citation" data-cites="requires">@requires</span> comments and filter out inapplicable tests.</p>
<h3 id="flag-restoring">Flag restoring</h3>
<p>Restore changed flags.</p>
<p>It is quite common for tests to configure JVM in a certain way changing flags values. GoogleTest provides two ways to set up environment before a test and restore it afterward: using either constructor and destructor or <code>SetUp</code> and <code>TearDown</code> functions. Both ways require to use a test fixture class, which sometimes is too wordy. The simpler facilities like <code>FLAG_GUARD</code> macro or <code>*FlagSetting</code> classes could be used in such cases to restore/set values.</p>
<p>Caveats:</p>
<ul>
<li><p>Changing a flags value could break the invariants between flags' values and hence could lead to unexpected/unsupported JVM state.</p></li>
<li><p><code>FLAG_SET_*</code> macros can change more than one flag (in order to maintain invariants) so it is hard to predict what flags will be changed and it makes restoring all changed flags a nontrivial task. Thus in case one uses <code>FLAG_SET_*</code> macros, they should use <code>TEST_OTHER_VM</code> test type.</p></li>
</ul>
<h3 id="googletest-documentation">GoogleTest documentation</h3>
<p>In case you have any questions regarding GoogleTest itself, its asserts, test declaration macros, other macros, etc, please consult its documentation.</p>
<h2 id="todo">TODO</h2>
<p>Although this document provides guidelines on the most important parts of test development using GTest, it still misses a few items:</p>
<ul>
<li><p>Examples, esp for <a href="#access-to-non-public-members">access to non-public members</a></p></li>
<li>test types: purpose, drawbacks, limitation
<ul>
<li><code>TEST_VM</code></li>
<li><code>TEST_VM_F</code></li>
<li><code>TEST_OTHER_VM</code></li>
<li><code>TEST_VM_ASSERT</code></li>
<li><code>TEST_VM_ASSERT_MSG</code></li>
</ul></li>
<li>Miscellaneous
<ul>
<li>Test libraries
<ul>
<li>where to place</li>
<li>how to write</li>
<li>how to use</li>
</ul></li>
<li>test your tests
<ul>
<li>how to run tests in random order</li>
<li>how to run only specific tests</li>
<li>how to run each test separately</li>
<li>check that a test can find bugs it is supposed to by introducing them</li>
</ul></li>
<li>mocks/stubs/dependency injection</li>
<li>setUp/tearDown
<ul>
<li>vs c-tor/d-tor</li>
<li>empty test to test them</li>
</ul></li>
<li>internal (declared in .cpp) struct/classes</li>
</ul></li>
</ul>
</body>
</html>

451
doc/hotspot-unit-tests.md Normal file
View File

@@ -0,0 +1,451 @@
% Native/Unit Test Development Guidelines
The purpose of these guidelines is to establish a shared vision on
what kind of native tests and how we want to develop them for Hotspot
using GoogleTest. Hence these guidelines include style items as well
as test approach items.
First section of this document describes properties of good tests
which are common for almost all types of test regardless of language,
framework, etc. Further sections provide recommendations to achieve
those properties and other HotSpot and/or GoogleTest specific
guidelines.
## Good test properties
### Lightness
Use the most lightweight type of tests.
In Hotspot, there are 3 different types of tests regarding their
dependency on a JVM, each next level is slower than previous
* `TEST` : a test does not depend on a JVM
* `TEST_VM` : a test does depend on an initialized JVM, but are
supposed not to break a JVM, i.e. leave it in a workable state.
* `TEST_OTHER_VM` : a test depends on a JVM and requires a freshly
initialized JVM or leaves a JVM in non-workable state
### Isolation
Tests have to be isolated: not to have visible side-effects,
influences on other tests results.
Results of one test should not depend on test execution order, other
tests, otherwise it is becoming almost impossible to find out why a
test failed. Due to hotspot-specific, it is not so easy to get a full
isolation, e.g. we share an initialized JVM between all `TEST_VM` tests,
so if your test changes JVM's state too drastically and does not
change it back, you had better consider `TEST_OTHER_VM`.
### Atomicity and self-containment
Tests should be *atomic* and *self-contained* at the same time.
One test should check a particular part of a class, subsystem,
functionality, etc. Then it is quite easy to determine what parts of a
product are broken basing on test failures. On the other hand, a test
should test that part more-or-less entirely, because when one sees a
test `FooTest::bar`, they assume all aspects of bar from `Foo` are tested.
However, it is impossible to cover all aspects even of a method, not
to mention a subsystem. In such cases, it is recommended to have
several tests, one for each aspect of a thing under test. For example
one test to tests how `Foo::bar` works if an argument is `null`, another
test to test how it works if an argument is acceptable but `Foo` is not
in the right state to accept it and so on. This helps not only to make
tests atomic, self-contained but also makes test name self-descriptive
(discussed in more details in [Test names](#test-names)).
### Repeatability
Tests have to be repeatable.
Reproducibility is very crucial for a test. No one likes sporadic test
failures, they are hard to investigate, fix and verify a fix.
In some cases, it is quite hard to write a 100% repeatable test, since
besides a test there can be other moving parts, e.g. in case of
`TEST_VM` there are several concurrently running threads. Despite this,
we should try to make a test as reproducible as possible.
### Informativeness
In case of a failure, a test should be as *informative* as possible.
Having more information about a test failure than just compared values
can be very useful for failure troubleshooting, it can reduce or even
completely eliminate debugging hours. This is even more important in
case of not 100% reproducible failures.
Achieving this property, one can easily make a test too verbose, so it
will be really hard to find useful information in the ocean of useless
information. Hence they should not only think about how to provide
[good information](#error-messages), but also
[when to do it](#uncluttered-output).
### Testing instead of visiting
Tests should *test*.
It is not enough just to "visit" some code, a test should check that
code does that it has to do, compare return values with expected
values, check that desired side effects are done, and undesired are
not, and so on. In other words, a test should contain at least one
GoogleTest assertion and do not rely on JVM asserts.
Generally speaking to write a good test, one should create a model of
the system under tests, a model of possible bugs (or bugs which one
wants to find) and design tests using those models.
### Nearness
Prefer having checks inside test code.
Not only does having test logic outside, e.g. verification method,
depending on asserts in product code contradict with several items
above but also decreases tests readability and stability. It is much
easier to understand that a test is testing when all testing logic is
located inside a test or nearby in shared test libraries. As a rule of
thumb, the closer a check to a test, the better.
## Asserts
### Several checks
Prefer `EXPECT` over `ASSERT` if possible.
This is related to the [informativeness](#informativeness) property of
tests, information for other checks can help to better localize a
defects root-cause. One should use `ASSERT` if it is impossible to
continue test execution or if it does not make much sense. Later in
the text, `EXPECT` forms will be used to refer to both
`ASSERT/EXPECT`.
When it is possible to make several different checks, but impossible
to continue test execution if at least one check fails, you can
use `::testing::Test::HasNonfatalFailure()` function. The recommended
way to express that is
`ASSERT_FALSE(::testing::Test::HasNonfatalFailure())`. Besides making it
clear why a test is aborted, it also allows you to provide more
information about a failure.
### First parameter is expected value
In all equality assertions, expected values should be passed as the
first parameter.
This convention is adopted by GoogleTest, and there is a slight
difference in how GoogleTest treats parameters, the most important one
is `null` detection. Due to different reasons, `null` detection is enabled
only for the first parameter, that is to said `EXPECT_EQ(NULL, object)`
checks that object is `null`, while `EXPECT_EQ(object, NULL)` checks that
object equals to `NULL`, GoogleTest is very strict regarding types of
compared values so the latter will generates a compile-time error.
### Floating-point comparison
Use floating-point special macros to compare `float/double` values.
Because of floating-point number representations and round-off errors,
regular equality comparison will not return true in most cases. There
are special `EXPECT_FLOAT_EQ/EXPECT_DOUBLE_EQ` assertions which check
that the distance between compared values is not more than 4 ULPs,
there is also `EXPECT_NEAR(v1, v2, eps)` which checks that the absolute
value of the difference between `v1` and `v2` is not greater than `eps`.
### C string comparison
Use string special macros for C strings comparisons.
`EXPECT_EQ` just compares pointers values, which is hardly what one
wants comparing C strings. GoogleTest provides `EXPECT_STREQ` and
`EXPECT_STRNE` macros to compare C string contents. There are also
case-insensitive versions `EXPECT_STRCASEEQ`, `EXPECT_STRCASENE`.
### Error messages
Provide informative, but not too verbose error messages.
All GoogleTest asserts print compared expressions and their values, so
there is no need to have them in error messages. Asserts print only
compared values, they do not print any of interim variables, e.g.
`ASSERT_TRUE((val1 == val2 && isFail(foo(8)) || i == 18)` prints only
one value. If you use some complex predicates, please consider
`EXPECT_PRED*` or `EXPECT_FORMAT_PRED` assertions family, they check that
a predicate returns true/success and print out all parameters values.
However in some cases, default information is not enough, a commonly
used example is an assert inside a loop, GoogleTest will not print
iteration values (unless it is an assert's parameter). Other
demonstrative examples are printing error code and a corresponding
error message; printing internal states which might have an impact on
results. One should add this information to assert message using `<<`
operator.
### Uncluttered output
Print information only if it is needed.
Too verbose tests which print all information even if they pass are
very bad practice. They just pollute output, so it becomes harder to
find useful information. In order not print information till it is
really needed, one should consider saving it to a temporary buffer and
pass to an assert.
<https://hg.openjdk.java.net/jdk/jdk/file/tip/test/hotspot/gtest/gc/shared/test_memset_with_concurrent_readers.cpp>
has a good example how to do that.
### Failures propagation
Wrap a subroutine call into `EXPECT_NO_FATAL_FAILURE` macro to
propagate failures.
`ASSERT` and `FAIL` abort only the current function, so if you have them
in a subroutine, a test will not be aborted after the subroutine even
if `ASSERT` or `FAIL` fails. You should call such subroutines in
`ASSERT_NO_FATAL_FAILURE` macro to propagate fatal failures and abort a
test. `(EXPECT|ASSERT)_NO_FATAL_FAILURE` can also be used to provide
more information.
Due to obvious reasons, there are no
`(EXPECT|ASSERT)_NO_NONFATAL_FAILURE` macros. However, if you need to
check if a subroutine generated a nonfatal failure (failed an `EXPECT`),
you can use `::testing::Test::HasNonfatalFailure` function,
or `::testing::Test::HasFailure` function to check if a subroutine
generated any failures, see [Several checks](#several-checks).
## Naming and Grouping
### Test group names
Test group names should be in CamelCase, start and end with a letter.
A test group should be named after tested class, functionality,
subsystem, etc.
This naming scheme helps to find tests, filter them and simplifies
test failure analysis. For example, class `Foo` - test group `Foo`,
compiler logging subsystem - test group `CompilerLogging`, G1 GC — test
group `G1GC`, and so forth.
### Filename
A test file must have `test_` prefix and `.cpp` suffix.
Both are actually requirements from the current build system to
recognize your tests.
### File location
Test file location should reflect a location of the tested part of the product.
* All unit tests for a class from `foo/bar/baz.cpp` should be placed
`foo/bar/test_baz.cpp` in `hotspot/test/native/` directory. Having all
tests for a class in one file is a common practice for unit tests, it
helps to see all existing tests at once, share functions and/or
resources without losing encapsulation.
* For tests which test more than one class, directory hierarchy should
be the same as product hierarchy, and file name should reflect the
name of the tested subsystem/functionality. For example, if a
sub-system under tests belongs to `gc/g1`, tests should be placed in
`gc/g1` directory.
Please note that framework prepends directory name to a test group
name. For example, if `TEST(foo, check_this)` and `TEST(bar, check_that)`
are defined in `hotspot/test/native/gc/shared/test_foo.cpp` file, they
will be reported as `gc/shared/foo::check_this` and
`gc/shared/bar::check_that`.
### Test names
Test names should be in small_snake_case, start and end with a letter.
A test name should reflect that a test checks.
Such naming makes tests self-descriptive and helps a lot during the
whole test life cycle. It is easy to do test planning, test inventory,
to see what things are not tested, to review tests, to analyze test
failures, to evolve a test, etc. For example
`foo_return_0_if_name_is_null` is better than `foo_sanity` or `foo_basic` or
just `foo`, `humongous_objects_can_not_be_moved_by_young_gc` is better
than `ho_young_gc`.
Actually using underscore is against GoogleTest project convention,
because it can lead to illegal identifiers, however, this is too
strict. Restricting usage of underscore for test names only and
prohibiting test name starts or ends with an underscore are enough to
be safe.
### Fixture classes
Fixture classes should be named after tested classes, subsystems, etc
(follow [Test group names rule](#test-group-names)) and have
`Test` suffix to prevent class name conflicts.
### Friend classes
All test purpose friends should have either `Test` or `Testable` suffix.
It greatly simplifies understanding of friendships purpose and allows
statically check that private members are not exposed unexpectedly.
Having `FooTest` as a friend of `Foo` without any comments will be
understood as a necessary evil to get testability.
### OS/CPU specific tests
Guard OS/CPU specific tests by `#ifdef` and have OS/CPU name in filename.
For the time being, we do not support separate directories for OS,
CPU, OS-CPU specific tests, in case we will have lots of such tests,
we will change directory layout and build system to support that in
the same way it is done in hotspot.
## Miscellaneous
### Hotspot style
Abide the norms and rules accepted in Hotspot style guide.
Tests are a part of Hotspot, so everything (if applicable) we use for
Hotspot, should be used for tests as well. Those guidelines cover
test-specific things.
### Code/test metrics
Coverage information and other code/test metrics are quite useful to
decide what tests should be written, what tests should be improved and
what can be removed.
For unit tests, widely used and well-known coverage metric is branch
coverage, which provides good quality of tests with relatively easy
test development process. For other levels of testing, branch coverage
is not as good, and one should consider others metrics, e.g.
transaction flow coverage, data flow coverage.
### Access to non-public members
Use explicit friend class to get access to non-public members.
We do not use GoogleTest macro to declare friendship relation,
because, from our point of view, it is less clear than an explicit
declaration.
Declaring a test fixture class as a friend class of a tested test is
the easiest and the clearest way to get access. However, it has some
disadvantages, here is some of them:
* Each test has to be declared as a friend
* Subclasses do not inheritance friendship relation
In other words, it is harder to share code between tests. Hence if you
want to share code or expect it to be useful in other tests, you
should consider making members in a tested class protected and
introduce a shared test-only class which expose those members via
public functions, or even making members publicly accessible right
away in a product class. If it is not an option to change members
visibility, one can create a friend class which exposes members.
### Death tests
You can not use death tests inside `TEST_OTHER_VM` and `TEST_VM_ASSERT*`.
We tried to make Hotspot-GoogleTest integration as transparent as
possible, however, due to the current implementation of `TEST_OTHER_VM`
and `TEST_VM_ASSERT*` tests, you cannot use death test functionality in
them. These tests are implemented as GoogleTest death tests, and
GoogleTest does not allow to have a death test inside another death
test.
### External flags
Passing external flags to a tested JVM is not supported.
The rationality of such design decision is to simplify both tests and
a test framework and to avoid failures related to incompatible flags
combination till there is a good solution for that. However there are
cases when one wants to test a JVM with specific flags combination,
`_JAVA_OPTIONS` environment variable can be used to do that. Flags from
`_JAVA_OPTIONS` will be used in `TEST_VM`, `TEST_OTHER_VM` and
`TEST_VM_ASSERT*` tests.
### Test-specific flags
Passing flags to a tested JVM in `TEST_OTHER_VM` and `TEST_VM_ASSERT*`
should be possible, but is not implemented yet.
Facility to pass test-specific flags is needed for system, regression
or other types of tests which require a fully initialized JVM in some
particular configuration, e.g. with Serial GC selected. There is no
support for such tests now, however, there is a plan to add that in
upcoming releases.
For now, if a test depends on flags values, it should have `if
(!<flag>) { return }` guards in the very beginning and `@requires`
comment similar to jtreg `@requires` directive right before test macros.
<https://hg.openjdk.java.net/jdk/jdk/file/tip/test/hotspot/gtest/gc/g1/test_g1IHOPControl.cpp>
ha an example of this temporary workaround. It is important to follow
that pattern as it allows us to easily find all such tests and update
them as soon as there is an implementation of flag passing facility.
In long-term, we expect jtreg to support GoogleTest tests as first
class citizens, that is to say, jtreg will parse @requires comments
and filter out inapplicable tests.
### Flag restoring
Restore changed flags.
It is quite common for tests to configure JVM in a certain way
changing flags values. GoogleTest provides two ways to set up
environment before a test and restore it afterward: using either
constructor and destructor or `SetUp` and `TearDown` functions. Both ways
require to use a test fixture class, which sometimes is too wordy. The
simpler facilities like `FLAG_GUARD` macro or `*FlagSetting` classes could
be used in such cases to restore/set values.
Caveats:
* Changing a flags value could break the invariants between flags' values and hence could lead to unexpected/unsupported JVM state.
* `FLAG_SET_*` macros can change more than one flag (in order to
maintain invariants) so it is hard to predict what flags will be
changed and it makes restoring all changed flags a nontrivial task.
Thus in case one uses `FLAG_SET_*` macros, they should use `TEST_OTHER_VM`
test type.
### GoogleTest documentation
In case you have any questions regarding GoogleTest itself, its
asserts, test declaration macros, other macros, etc, please consult
its documentation.
## TODO
Although this document provides guidelines on the most important parts
of test development using GTest, it still misses a few items:
* Examples, esp for [access to non-public members](#access-to-non-public-members)
* test types: purpose, drawbacks, limitation
* `TEST_VM`
* `TEST_VM_F`
* `TEST_OTHER_VM`
* `TEST_VM_ASSERT`
* `TEST_VM_ASSERT_MSG`
* Miscellaneous
* Test libraries
* where to place
* how to write
* how to use
* test your tests
* how to run tests in random order
* how to run only specific tests
* how to run each test separately
* check that a test can find bugs it is supposed to by introducing them
* mocks/stubs/dependency injection
* setUp/tearDown
* vs c-tor/d-tor
* empty test to test them
* internal (declared in .cpp) struct/classes

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -242,16 +242,6 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
)
JDK_SYMBOLS_BUNDLE_FILES := \
$(filter \
$(JDK_SYMBOLS_EXCLUDE_PATTERN) \
$(SYMBOLS_EXCLUDE_PATTERN) \
, \
$(filter-out \
$(JDK_IMAGE_HOMEDIR)/demo/% %.stripped.pdb \
, \
$(ALL_JDK_SYMBOLS_FILES) \
) \
) \
$(call FindFiles, $(SYMBOLS_IMAGE_DIR))
TEST_DEMOS_BUNDLE_FILES := $(filter $(JDK_DEMOS_IMAGE_HOMEDIR)/demo/%, \
@@ -383,7 +373,7 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
$(eval $(call SetupBundleFile, BUILD_JDK_SYMBOLS_BUNDLE, \
BUNDLE_NAME := $(JDK_SYMBOLS_BUNDLE_NAME), \
FILES := $(JDK_SYMBOLS_BUNDLE_FILES), \
BASE_DIRS := $(JDK_SYMBOLS_IMAGE_DIR) $(wildcard $(SYMBOLS_IMAGE_DIR)), \
BASE_DIRS := $(SYMBOLS_IMAGE_DIR), \
SUBDIR := $(JDK_BUNDLE_SUBDIR), \
UNZIP_DEBUGINFO := true, \
))
@@ -420,17 +410,43 @@ endif
################################################################################
ifneq ($(filter docs-bundles, $(MAKECMDGOALS)), )
DOCS_BUNDLE_FILES := $(call FindFiles, $(DOCS_IMAGE_DIR))
ifneq ($(filter docs-jdk-bundles, $(MAKECMDGOALS)), )
DOCS_JDK_BUNDLE_FILES := $(call FindFiles, $(DOCS_JDK_IMAGE_DIR))
$(eval $(call SetupBundleFile, BUILD_DOCS_BUNDLE, \
BUNDLE_NAME := $(DOCS_BUNDLE_NAME), \
FILES := $(DOCS_BUNDLE_FILES), \
BASE_DIRS := $(DOCS_IMAGE_DIR), \
$(eval $(call SetupBundleFile, BUILD_DOCS_JDK_BUNDLE, \
BUNDLE_NAME := $(DOCS_JDK_BUNDLE_NAME), \
FILES := $(DOCS_JDK_BUNDLE_FILES), \
BASE_DIRS := $(DOCS_JDK_IMAGE_DIR), \
SUBDIR := docs, \
))
DOCS_TARGETS += $(BUILD_DOCS_BUNDLE)
DOCS_JDK_TARGETS += $(BUILD_DOCS_JDK_BUNDLE)
endif
ifneq ($(filter docs-javase-bundles, $(MAKECMDGOALS)), )
DOCS_JAVASE_BUNDLE_FILES := $(call FindFiles, $(DOCS_JAVASE_IMAGE_DIR))
$(eval $(call SetupBundleFile, BUILD_DOCS_JAVASE_BUNDLE, \
BUNDLE_NAME := $(DOCS_JAVASE_BUNDLE_NAME), \
FILES := $(DOCS_JAVASE_BUNDLE_FILES), \
BASE_DIRS := $(DOCS_JAVASE_IMAGE_DIR), \
SUBDIR := docs-javase, \
))
DOCS_JAVASE_TARGETS += $(BUILD_DOCS_JAVASE_BUNDLE)
endif
ifneq ($(filter docs-reference-bundles, $(MAKECMDGOALS)), )
DOCS_REFERENCE_BUNDLE_FILES := $(call FindFiles, $(DOCS_REFERENCE_IMAGE_DIR))
$(eval $(call SetupBundleFile, BUILD_DOCS_REFERENCE_BUNDLE, \
BUNDLE_NAME := $(DOCS_REFERENCE_BUNDLE_NAME), \
FILES := $(DOCS_REFERENCE_BUNDLE_FILES), \
BASE_DIRS := $(DOCS_REFERENCE_IMAGE_DIR), \
SUBDIR := docs-reference, \
))
DOCS_REFERENCE_TARGETS += $(BUILD_DOCS_REFERENCE_BUNDLE)
endif
################################################################################
@@ -479,9 +495,12 @@ $(eval $(call IncludeCustomExtension, Bundles.gmk))
product-bundles: $(PRODUCT_TARGETS)
legacy-bundles: $(LEGACY_TARGETS)
test-bundles: $(TEST_TARGETS)
docs-bundles: $(DOCS_TARGETS)
docs-jdk-bundles: $(DOCS_JDK_TARGETS)
docs-javase-bundles: $(DOCS_JAVASE_TARGETS)
docs-reference-bundles: $(DOCS_REFERENCE_TARGETS)
static-libs-bundles: $(STATIC_LIBS_TARGETS)
jcov-bundles: $(JCOV_TARGETS)
.PHONY: all default product-bundles test-bundles docs-bundles \
.PHONY: all default product-bundles test-bundles \
docs-jdk-bundles docs-javase-bundles docs-reference-bundles \
static-libs-bundles jcov-bundles

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -45,11 +45,6 @@ $(OUTPUTDIR)/compile_commands.json: $(wildcard $(MAKESUPPORT_OUTPUTDIR)/compile-
$(RM) $@
$(FIND) $(MAKESUPPORT_OUTPUTDIR)/compile-commands/ -name \*.json | \
$(SORT) | $(XARGS) $(CAT) >> $@.tmp
$(if $(FIXPATH),$(FIXPATH) $(AWK) 'BEGIN { \
tmpfile = substr(ARGV[2],2); \
cmd = "$(CP) " "\047" tmpfile "\047" " $@.tmp"; \
system(cmd); \
}' -- @$@.tmp)
$(SED) -e '1s/^/[\$(NEWLINE)/' -e '$(DOLLAR)s/,\s\{0,\}$(DOLLAR)/\$(NEWLINE)]/' $@.tmp > $@
$(RM) $@.tmp

View File

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

View File

@@ -74,7 +74,7 @@ define SetupInterimModule
EXCLUDE_FILES := $(TOPDIR)/src/$1/share/classes/module-info.java \
Standard.java, \
EXTRA_FILES := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim/module-info.java, \
COPY := .gif .png .xml .css .js javax.tools.JavaCompilerTool, \
COPY := .gif .png .xml .css .js .txt javax.tools.JavaCompilerTool, \
BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules/$1.interim, \
DISABLED_WARNINGS := module options, \
JAVAC_FLAGS := \

View File

@@ -183,10 +183,6 @@ ifeq ($(call isTargetOs, windows), true)
java.desktop_EXCLUDES += com/sun/java/swing/plaf/gtk
endif
ifdef BUILD_HEADLESS_ONLY
java.desktop_EXCLUDES += sun/applet
endif
ifeq ($(call isTargetOs, windows macosx), false)
java.desktop_EXCLUDE_FILES += sun/awt/AWTCharset.java
endif
@@ -343,14 +339,23 @@ jdk.dynalink_CLEAN += .properties
################################################################################
jdk.javadoc_COPY += .xml .css .js .png
jdk.javadoc_COPY += .xml .css .js .png .txt
################################################################################
jdk.jartool_DISABLED_WARNINGS += missing-explicit-ctor
jdk.jartool_JAVAC_FLAGS += -XDstringConcat=inline
################################################################################
jdk.httpserver_DISABLED_WARNINGS += missing-explicit-ctor
################################################################################
jdk.unsupported.desktop_DISABLED_WARNINGS += missing-explicit-ctor
################################################################################
# No SCTP implementation on Mac OS X or AIX. These classes should be excluded.
SCTP_IMPL_CLASSES = \
$(TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/AssociationChange.java \
@@ -375,11 +380,11 @@ endif
################################################################################
jdk.incubator.jpackage_COPY += .gif .png .txt .spec .script .prerm .preinst \
jdk.jpackage_COPY += .gif .png .txt .spec .script .prerm .preinst \
.postrm .postinst .list .sh .desktop .copyright .control .plist .template \
.icns .scpt .wxs .wxl .wxi .ico .bmp .tiff
jdk.incubator.jpackage_CLEAN += .properties
jdk.jpackage_CLEAN += .properties
################################################################################
@@ -477,6 +482,7 @@ jdk.internal.vm.compiler_EXCLUDES += \
org.graalvm.compiler.options.test \
org.graalvm.compiler.phases.common.test \
org.graalvm.compiler.processor \
org.graalvm.compiler.replacements.jdk10.test \
org.graalvm.compiler.replacements.jdk12.test \
org.graalvm.compiler.replacements.jdk9.test \
org.graalvm.compiler.replacements.processor \
@@ -531,6 +537,10 @@ jdk.jfr_DISABLED_WARNINGS += exports
jdk.jfr_COPY := .xsd .xml .dtd
jdk.jfr_JAVAC_FLAGS := -XDstringConcat=inline
################################################################################
jdk.incubator.vector_DOCLINT += -Xdoclint:all/protected
################################################################################
# If this is an imported module that has prebuilt classes, only compile
# module-info.java.

View File

@@ -33,8 +33,20 @@ include JavaCompilation.gmk
TOOLS_CLASSES_DIR := $(BUILDTOOLS_OUTPUTDIR)/tools_jigsaw_classes
# When using an external BUILDJDK, make it possible to shortcut building of
# these tools using the BUILD_JAVAC instead of having to build the complete
# exploded image first.
ifeq ($(EXTERNAL_BUILDJDK), true)
COMPILER := buildjdk
TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK)
else
COMPILER := interim
TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED)
endif
$(eval $(call SetupJavaCompilation, BUILD_JIGSAW_TOOLS, \
TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED), \
TARGET_RELEASE := $(TARGET_RELEASE), \
COMPILER := $(COMPILER), \
SRC := $(TOPDIR)/make/jdk/src/classes, \
INCLUDES := build/tools/deps \
build/tools/docs \

View File

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

View File

@@ -56,7 +56,8 @@ $(eval $(call SetupJavaCompilation, BUILD_TOOLS_JDK, \
DISABLED_WARNINGS := options, \
JAVAC_FLAGS := \
--add-exports java.desktop/sun.awt=ALL-UNNAMED \
--add-exports java.base/sun.text=ALL-UNNAMED, \
--add-exports java.base/sun.text=ALL-UNNAMED \
--add-exports java.base/sun.security.util=ALL-UNNAMED, \
))
TARGETS += $(BUILD_TOOLS_JDK)

View File

@@ -298,6 +298,8 @@ define SetupApiDocsGenerationBody
# Create a string like "-Xdoclint:all,-syntax,-html,..."
$1_OPTIONS += -Xdoclint:all,$$(call CommaList, $$(addprefix -, \
$$(JAVADOC_DISABLED_DOCLINT)))
# Ignore the doclint warnings in the W3C DOM package
$1_OPTIONS += -Xdoclint/package:-org.w3c.*
$1_DOC_TITLE := $$($1_LONG_NAME)<br>Version $$(VERSION_SPECIFICATION) API \
Specification
@@ -456,7 +458,7 @@ $(eval $(call SetupApiDocsGeneration, JAVASE_API, \
MODULES := $(JAVASE_MODULES), \
SHORT_NAME := $(JAVASE_SHORT_NAME), \
LONG_NAME := $(JAVASE_LONG_NAME), \
TARGET_DIR := $(IMAGES_OUTPUTDIR)/javase-docs/api, \
TARGET_DIR := $(DOCS_JAVASE_IMAGE_DIR)/api, \
))
# Targets generated are returned in JAVASE_API_JAVADOC_TARGETS and
@@ -474,7 +476,7 @@ $(eval $(call SetupApiDocsGeneration, REFERENCE_API, \
MODULES := $(JAVASE_MODULES), \
SHORT_NAME := $(JAVASE_SHORT_NAME), \
LONG_NAME := $(JAVASE_LONG_NAME), \
TARGET_DIR := $(IMAGES_OUTPUTDIR)/reference-docs/api, \
TARGET_DIR := $(DOCS_REFERENCE_IMAGE_DIR)/api, \
JAVADOC_CMD := $(JAVADOC), \
OPTIONS := $(REFERENCE_OPTIONS), \
TAGS := $(REFERENCE_TAGS), \

View File

@@ -61,7 +61,7 @@ endif
# Save the stderr output of the command and print it along with stdout in case
# something goes wrong.
$(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXE_SUFFIX) $(CLASSLIST_JAR)
$(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST_JAR)
$(call MakeDir, $(LINK_OPT_DIR))
$(call LogInfo, Generating $(patsubst $(OUTPUTDIR)/%, %, $@))
$(call LogInfo, Generating $(patsubst $(OUTPUTDIR)/%, %, $(JLI_TRACE_FILE)))
@@ -94,7 +94,7 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXE_SUFFIX) $(CLASSLIST_JAR)
# dependencies, make will correctly rebuild both jli trace and classlist
# incrementally using the single recipe above.
$(CLASSLIST_FILE): $(JLI_TRACE_FILE)
$(JLI_TRACE_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXE_SUFFIX) $(CLASSLIST_JAR)
$(JLI_TRACE_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST_JAR)
TARGETS += $(CLASSLIST_FILE) $(JLI_TRACE_FILE)

View File

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

View File

@@ -238,6 +238,7 @@ endif
ALL_JDK_MODULES := $(JDK_MODULES)
ALL_JRE_MODULES := $(sort $(JRE_MODULES), $(foreach m, $(JRE_MODULES), \
$(call FindTransitiveDepsForModule, $m)))
ALL_SYMBOLS_MODULES := $(JDK_MODULES)
ifeq ($(call isTargetOs, windows), true)
LIBS_TARGET_SUBDIR := bin
@@ -293,6 +294,7 @@ SetupCopyDebuginfo = \
# implementation above.
$(call SetupCopyDebuginfo,JDK)
$(call SetupCopyDebuginfo,JRE)
$(call SetupCopyDebuginfo,SYMBOLS)
################################################################################

View File

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

View File

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

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2016, 2018, 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
@@ -32,7 +32,7 @@ include Modules.gmk
################################################################################
# Use this file inside the image as target for make rule
JIMAGE_TARGET_FILE := bin/java$(EXE_SUFFIX)
JIMAGE_TARGET_FILE := bin/java$(EXECUTABLE_SUFFIX)
INTERIM_MODULES_LIST := $(call CommaList, $(INTERIM_IMAGE_MODULES))

View File

@@ -38,11 +38,8 @@ ifeq ($(call isTargetOs, macosx), true)
MACOSX_PLIST_SRC := $(TOPDIR)/make/data/bundle
BUNDLE_ID := $(MACOSX_BUNDLE_ID_BASE).$(VERSION_SHORT)
BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_SHORT)
BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_STRING)
BUNDLE_PLATFORM_VERSION := $(VERSION_FEATURE).$(VERSION_INTERIM)
BUNDLE_VERSION := $(VERSION_NUMBER)
ifeq ($(COMPANY_NAME), N/A)
BUNDLE_VENDOR := UNDEFINED
else
@@ -75,24 +72,26 @@ ifeq ($(call isTargetOs, macosx), true)
SOURCE_FILES := $(MACOSX_PLIST_SRC)/JDK-Info.plist, \
OUTPUT_FILE := $(JDK_MACOSX_CONTENTS_DIR)/Info.plist, \
REPLACEMENTS := \
@@ID@@ => $(BUNDLE_ID).jdk ; \
@@ID@@ => $(MACOSX_BUNDLE_ID_BASE).jdk ; \
@@NAME@@ => $(BUNDLE_NAME) ; \
@@INFO@@ => $(BUNDLE_INFO) ; \
@@PLATFORM_VERSION@@ => $(BUNDLE_PLATFORM_VERSION) ; \
@@VERSION@@ => $(BUNDLE_VERSION) ; \
@@VENDOR@@ => $(BUNDLE_VENDOR) , \
@@VERSION@@ => $(VERSION_NUMBER) ; \
@@BUILD_VERSION@@ => $(MACOSX_BUNDLE_BUILD_VERSION) ; \
@@VENDOR@@ => $(BUNDLE_VENDOR) ; \
@@MACOSX_VERSION_MIN@@ => $(MACOSX_VERSION_MIN) , \
))
$(eval $(call SetupTextFileProcessing, BUILD_JRE_PLIST, \
SOURCE_FILES := $(MACOSX_PLIST_SRC)/JRE-Info.plist, \
OUTPUT_FILE := $(JRE_MACOSX_CONTENTS_DIR)/Info.plist, \
REPLACEMENTS := \
@@ID@@ => $(BUNDLE_ID).jre ; \
@@ID@@ => $(MACOSX_BUNDLE_ID_BASE).jre ; \
@@NAME@@ => $(BUNDLE_NAME) ; \
@@INFO@@ => $(BUNDLE_INFO) ; \
@@PLATFORM_VERSION@@ => $(BUNDLE_PLATFORM_VERSION) ; \
@@VERSION@@ => $(BUNDLE_VERSION) ; \
@@VENDOR@@ => $(BUNDLE_VENDOR) , \
@@VERSION@@ => $(VERSION_NUMBER) ; \
@@BUILD_VERSION@@ => $(BUNDLE_BUILD_VERSION) ; \
@@VENDOR@@ => $(BUNDLE_VENDOR) ; \
@@MACOSX_VERSION_MIN@@ => $(MACOSX_VERSION_MIN) , \
))
$(SUPPORT_OUTPUTDIR)/images/_jdk_bundle_attribute_set: $(COPY_JDK_IMAGE)

View File

@@ -90,7 +90,6 @@ $(eval $(call SetupTarget, buildtools-jdk, \
$(eval $(call SetupTarget, buildtools-modules, \
MAKEFILE := CompileModuleTools, \
DEPS := exploded-image-base, \
))
$(eval $(call SetupTarget, buildtools-hotspot, \
@@ -112,7 +111,6 @@ $(eval $(call SetupTarget, generate-exported-symbols, \
$(eval $(call DeclareRecipesForPhase, GENSRC, \
TARGET_SUFFIX := gensrc-src, \
FILE_PREFIX := Gensrc, \
MAKE_SUBDIR := gensrc, \
CHECK_MODULES := $(ALL_MODULES), \
))
@@ -150,7 +148,6 @@ ALL_TARGETS += $(GENSRC_TARGETS)
$(eval $(call DeclareRecipesForPhase, GENDATA, \
TARGET_SUFFIX := gendata, \
FILE_PREFIX := Gendata, \
MAKE_SUBDIR := gendata, \
CHECK_MODULES := $(ALL_MODULES), \
))
@@ -161,7 +158,6 @@ ALL_TARGETS += $(GENDATA_TARGETS)
$(eval $(call DeclareRecipesForPhase, COPY, \
TARGET_SUFFIX := copy, \
FILE_PREFIX := Copy, \
MAKE_SUBDIR := copy, \
CHECK_MODULES := $(ALL_MODULES), \
))
@@ -203,7 +199,6 @@ ALL_TARGETS += $(JAVA_TARGETS)
$(eval $(call DeclareRecipesForPhase, LIBS, \
TARGET_SUFFIX := libs, \
FILE_PREFIX := Lib, \
MAKE_SUBDIR := lib, \
CHECK_MODULES := $(ALL_MODULES), \
))
@@ -216,7 +211,6 @@ ALL_TARGETS += $(LIBS_TARGETS)
$(eval $(call DeclareRecipesForPhase, STATIC_LIBS, \
TARGET_SUFFIX := static-libs, \
FILE_PREFIX := Lib, \
MAKE_SUBDIR := lib, \
CHECK_MODULES := $(ALL_MODULES), \
EXTRA_ARGS := STATIC_LIBS=true, \
))
@@ -228,7 +222,6 @@ ALL_TARGETS += $(STATIC_LIBS_TARGETS)
$(eval $(call DeclareRecipesForPhase, LAUNCHER, \
TARGET_SUFFIX := launchers, \
FILE_PREFIX := Launcher, \
MAKE_SUBDIR := launcher, \
CHECK_MODULES := $(ALL_MODULES), \
))
@@ -345,7 +338,7 @@ $(eval $(call SetupTarget, test-image-demos-jdk, \
$(eval $(call SetupTarget, generate-summary, \
MAKEFILE := GenerateModuleSummary, \
DEPS := jmods buildtools-modules, \
DEPS := jmods buildtools-modules runnable-buildjdk, \
))
################################################################################
@@ -475,7 +468,7 @@ $(eval $(call SetupTarget, docs-jdk-api-javadoc, \
$(eval $(call SetupTarget, docs-jdk-api-modulegraph, \
MAKEFILE := Docs, \
TARGET := docs-jdk-api-modulegraph, \
DEPS := exploded-image buildtools-modules, \
DEPS := buildtools-modules runnable-buildjdk, \
))
$(eval $(call SetupTarget, docs-javase-api-javadoc, \
@@ -486,7 +479,7 @@ $(eval $(call SetupTarget, docs-javase-api-javadoc, \
$(eval $(call SetupTarget, docs-javase-api-modulegraph, \
MAKEFILE := Docs, \
TARGET := docs-javase-api-modulegraph, \
DEPS := exploded-image buildtools-modules, \
DEPS := buildtools-modules runnable-buildjdk, \
))
$(eval $(call SetupTarget, docs-reference-api-javadoc, \
@@ -497,7 +490,7 @@ $(eval $(call SetupTarget, docs-reference-api-javadoc, \
$(eval $(call SetupTarget, docs-reference-api-modulegraph, \
MAKEFILE := Docs, \
TARGET := docs-reference-api-modulegraph, \
DEPS := exploded-image buildtools-modules, \
DEPS := buildtools-modules runnable-buildjdk, \
))
# The gensrc steps for jdk.jdi create html spec files.
@@ -640,6 +633,20 @@ $(eval $(call SetupTarget, test-image-jdk-jtreg-native, \
DEPS := build-test-jdk-jtreg-native, \
))
# Native files needed by the testlib
$(eval $(call SetupTarget, build-test-lib-native, \
MAKEFILE := test/BuildTestLibNative, \
TARGET := build-test-lib-native, \
DEPS := buildtools-jdk java.base-libs, \
))
$(eval $(call SetupTarget, test-image-lib-native, \
MAKEFILE := test/BuildTestLibNative, \
TARGET := test-image-lib-native, \
DEPS := build-test-lib-native, \
))
# Native files needed when testing the testlib itself
$(eval $(call SetupTarget, build-test-libtest-jtreg-native, \
MAKEFILE := test/JtregNativeLibTest, \
TARGET := build-test-libtest-jtreg-native, \
@@ -664,7 +671,7 @@ $(eval $(call SetupTarget, test-image-hotspot-jtreg-graal, \
DEPS := build-test-hotspot-jtreg-graal, \
))
ifneq ($GTEST_FRAMEWORK_SRC), )
ifneq ($(GTEST_FRAMEWORK_SRC), )
$(eval $(call SetupTarget, test-image-hotspot-gtest, \
MAKEFILE := hotspot/test/GtestImage, \
DEPS := hotspot, \
@@ -741,12 +748,24 @@ $(eval $(call SetupTarget, test-bundles, \
DEPS := test-image, \
))
$(eval $(call SetupTarget, docs-bundles, \
$(eval $(call SetupTarget, docs-jdk-bundles, \
MAKEFILE := Bundles, \
TARGET := docs-bundles, \
TARGET := docs-jdk-bundles, \
DEPS := docs-image, \
))
$(eval $(call SetupTarget, docs-javase-bundles, \
MAKEFILE := Bundles, \
TARGET := docs-javase-bundles, \
DEPS := docs-javase-image, \
))
$(eval $(call SetupTarget, docs-reference-bundles, \
MAKEFILE := Bundles, \
TARGET := docs-reference-bundles, \
DEPS := docs-reference-image, \
))
$(eval $(call SetupTarget, static-libs-bundles, \
MAKEFILE := Bundles, \
TARGET := static-libs-bundles, \
@@ -804,7 +823,7 @@ else
# Declare dependencies between hotspot-<variant>* targets
$(foreach v, $(JVM_VARIANTS), \
$(eval hotspot-$v-gensrc: java.base-copy) \
$(eval hotspot-$v-gensrc: java.base-copy buildtools-hotspot) \
$(eval hotspot-$v-libs: hotspot-$v-gensrc java.base-copy) \
)
@@ -937,10 +956,13 @@ else
$(JMOD_TARGETS) $(INTERIM_JMOD_TARGETS): java.base-libs java.base-copy \
java.base-gendata jdk.jlink-launchers java
endif
else
# The normal non cross compilation case uses needs to wait for the full
else ifeq ($(EXTERNAL_BUILDJDK), false)
# The normal non cross compilation usecase needs to wait for the full
# exploded-image to avoid a race with the optimize target.
$(JMOD_TARGETS) $(INTERIM_JMOD_TARGETS): exploded-image
# The buildtools-modules are used for the exploded-image-optimize target,
# but can be built either using the exploded-image or an external BUILDJDK.
buildtools-modules: exploded-image-base
endif
# All modules include the main license files from java.base.
@@ -1061,6 +1083,18 @@ ifneq ($(COMPILE_TYPE), cross)
exploded-image: exploded-image-optimize
endif
# The runnable-buildjdk target guarantees that the buildjdk is done
# building and ready to be used. The exact set of dependencies it needs
# depends on what kind of buildjdk is used for the current configuration.
runnable-buildjdk:
ifeq ($(CREATE_BUILDJDK), true)
ifneq ($(CREATING_BUILDJDK), true)
runnable-buildjdk: create-buildjdk
endif
else ifeq ($(EXTERNAL_BUILDJDK), false)
runnable-buildjdk: exploded-image
endif
create-buildjdk: create-buildjdk-interim-image
docs-jdk-api: docs-jdk-api-javadoc
@@ -1114,11 +1148,21 @@ ifeq ($(call isTargetOs, macosx), true)
legacy-images: mac-legacy-jre-bundle
endif
# This target builds the documentation image
docs-image: docs-jdk
# These targets build the various documentation images
docs-jdk-image: docs-jdk
docs-javase-image: docs-javase
docs-reference-image: docs-reference
# The docs-jdk-image is what most users expect to be built
docs-image: docs-jdk-image
all-docs-images: docs-jdk-image docs-javase-image docs-reference-image
docs-bundles: docs-jdk-bundles
all-docs-bundles: docs-jdk-bundles docs-javase-bundles docs-reference-bundles
# This target builds the test image
test-image: prepare-test-image test-image-jdk-jtreg-native test-image-demos-jdk test-image-libtest-jtreg-native
test-image: prepare-test-image test-image-jdk-jtreg-native \
test-image-demos-jdk test-image-libtest-jtreg-native \
test-image-lib-native
ifneq ($(JVM_TEST_IMAGE_TARGETS), )
# If JVM_TEST_IMAGE_TARGETS is externally defined, use it instead of the
@@ -1146,7 +1190,7 @@ endif
################################################################################
# all-images builds all our deliverables as images.
all-images: product-images test-image docs-image
all-images: product-images test-image all-docs-images
# all-bundles packages all our deliverables as tar.gz bundles.
all-bundles: product-bundles test-bundles docs-bundles static-libs-bundles
@@ -1154,10 +1198,11 @@ all-bundles: product-bundles test-bundles docs-bundles static-libs-bundles
ALL_TARGETS += buildtools hotspot hotspot-libs hotspot-gensrc gensrc gendata \
copy java libs static-libs launchers jmods \
jdk.jdwp.agent-gensrc $(ALL_MODULES) demos \
exploded-image-base exploded-image \
exploded-image-base exploded-image runnable-buildjdk \
create-buildjdk docs-jdk-api docs-javase-api docs-reference-api docs-jdk \
docs-javase docs-reference docs-javadoc mac-bundles product-images legacy-images \
docs-image test-image all-images \
docs-image docs-javase-image docs-reference-image all-docs-images \
docs-bundles all-docs-bundles test-image all-images \
all-bundles
################################################################################

View File

@@ -185,7 +185,6 @@ endef
# Param 1: Name of list to add targets to
# Named params:
# TARGET_SUFFIX : Suffix of target to create for recipe
# MAKE_SUBDIR : Subdir for this build phase
# FILE_PREFIX : File prefix for this build phase
# CHECK_MODULES : List of modules to try
# MULTIPLE_MAKEFILES : Set to true to handle makefiles for the same module and

View File

@@ -39,7 +39,7 @@ include MakeBase.gmk
TARGETS :=
# Include the file being wrapped.
include modules/$(MODULE)/$(MAKEFILE_PREFIX).gmk
include $(MAKEFILE_PREFIX).gmk
# Setup copy rules from the modules directories to the jdk image directory.
ifeq ($(call isTargetOs, windows), true)

View File

@@ -53,6 +53,7 @@ define create-info-file
$(call info-file-item, "JAVA_VERSION_DATE", "$(VERSION_DATE)")
$(call info-file-item, "OS_NAME", "$(RELEASE_FILE_OS_NAME)")
$(call info-file-item, "OS_ARCH", "$(RELEASE_FILE_OS_ARCH)")
$(call info-file-item, "LIBC", "$(RELEASE_FILE_LIBC)")
endef
# Param 1 - The file containing the MODULES list

View File

@@ -60,19 +60,14 @@ define SetTestOpt
endif
endef
# Setup _NT_SYMBOL_PATH on Windows
# Setup _NT_SYMBOL_PATH on Windows, which points to our pdb files.
ifeq ($(call isTargetOs, windows), true)
ifndef _NT_SYMBOL_PATH
# Can't use PathList here as it adds quotes around the value.
_NT_SYMBOL_PATH := \
$(subst $(SPACE),;,$(strip \
$(foreach p, $(sort $(dir $(wildcard \
$(addprefix $(SYMBOLS_IMAGE_DIR)/bin/, *.pdb */*.pdb)))), \
$(call FixPath, $p) \
) \
))
export _NT_SYMBOL_PATH
$(call LogDebug, Rewriting _NT_SYMBOL_PATH to $(_NT_SYMBOL_PATH))
SYMBOL_PATH := $(call PathList, $(sort $(patsubst %/, %, $(dir $(wildcard \
$(addprefix $(SYMBOLS_IMAGE_DIR)/bin/, *.pdb */*.pdb))))))
export _NT_SYMBOL_PATH := $(subst \\,\, $(call FixPath, \
$(subst $(DQUOTE),, $(SYMBOL_PATH))))
$(call LogDebug, Setting _NT_SYMBOL_PATH to $(_NT_SYMBOL_PATH))
endif
endif
@@ -143,9 +138,6 @@ endif
# Optionally create AOT libraries for specified modules before running tests.
# Note, this could not be done during JDK build time.
################################################################################
# Note, this could not be done during JDK build time.
# Parameter 1 is the name of the rule.
#
# Remaining parameters are named arguments.
@@ -175,6 +167,10 @@ define SetupAotModuleBody
$1_JAOTC_OPTS += --compile-with-assertions
endif
ifneq ($$(filter -XX:+VerifyOops, $$($1_VM_OPTIONS)), )
$1_JAOTC_OPTS += -J-Dgraal.AOTVerifyOops=true
endif
$$($1_AOT_LIB): $$(JDK_UNDER_TEST)/release \
$$(call DependOnVariable, $1_JAOTC_OPTS) \
$$(call DependOnVariable, JDK_UNDER_TEST)
@@ -198,6 +194,10 @@ define SetupAotModuleBody
$1_AOT_TARGETS += $$($1_AOT_LIB)
endef
################################################################################
# Optionally create AOT libraries before running tests.
# Note, this could not be done during JDK build time.
################################################################################
# Parameter 1 is the name of the rule.
#
# Remaining parameters are named arguments.
@@ -291,9 +291,9 @@ $(eval $(call SetTestOpt,FAILURE_HANDLER_TIMEOUT,JTREG))
$(eval $(call ParseKeywordVariable, JTREG, \
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR FAILURE_HANDLER_TIMEOUT \
TEST_MODE ASSERT VERBOSE RETAIN MAX_MEM RUN_PROBLEM_LISTS \
RETRY_COUNT, \
RETRY_COUNT MAX_OUTPUT, \
STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS KEYWORDS \
EXTRA_PROBLEM_LISTS AOT_MODULES, \
EXTRA_PROBLEM_LISTS AOT_MODULES LAUNCHER_OPTIONS, \
))
ifneq ($(JTREG), )
@@ -604,6 +604,7 @@ define SetupRunGtestTestBody
$$(call LogWarn, Running test '$$($1_TEST)')
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR))
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/gtest, ( \
$$(CD) $$($1_TEST_SUPPORT_DIR) && \
$$(FIXPATH) $$(TEST_IMAGE_DIR)/hotspot/gtest/$$($1_VARIANT)/gtestLauncher \
-jdk $(JDK_UNDER_TEST) $$($1_GTEST_FILTER) \
--gtest_output=xml:$$($1_TEST_RESULTS_DIR)/gtest.xml \
@@ -844,15 +845,27 @@ define SetupRunJtregTestBody
JTREG_RUN_PROBLEM_LISTS ?= false
JTREG_RETRY_COUNT ?= 0
ifneq ($$(JTREG_LAUNCHER_OPTIONS), )
$1_JTREG_LAUNCHER_OPTIONS += $$(JTREG_LAUNCHER_OPTIONS)
endif
ifneq ($$(JTREG_MAX_OUTPUT), )
$1_JTREG_LAUNCHER_OPTIONS += -Djavatest.maxOutputSize=$$(JTREG_MAX_OUTPUT)
endif
ifneq ($$($1_JTREG_MAX_MEM), 0)
$1_JTREG_BASIC_OPTIONS += -vmoption:-Xmx$$($1_JTREG_MAX_MEM)
$1_JTREG_LAUNCHER_OPTIONS += -Xmx$$($1_JTREG_MAX_MEM)
endif
# Make sure the tmp dir is normalized as some tests will react badly otherwise
$1_TEST_TMP_DIR := $$(abspath $$($1_TEST_SUPPORT_DIR)/tmp)
$1_JTREG_BASIC_OPTIONS += -$$($1_JTREG_TEST_MODE) \
-verbose:$$(JTREG_VERBOSE) -retain:$$(JTREG_RETAIN) \
-concurrency:$$($1_JTREG_JOBS) -timeoutFactor:$$(JTREG_TIMEOUT_FACTOR) \
-vmoption:-XX:MaxRAMPercentage=$$($1_JTREG_MAX_RAM_PERCENTAGE)
-vmoption:-XX:MaxRAMPercentage=$$($1_JTREG_MAX_RAM_PERCENTAGE) \
-vmoption:-Djava.io.tmpdir="$$($1_TEST_TMP_DIR)"
$1_JTREG_BASIC_OPTIONS += -automatic -ignore:quiet
@@ -968,7 +981,8 @@ define SetupRunJtregTestBody
run-test-$1: pre-run-test clean-workdir-$1 $$($1_AOT_TARGETS)
$$(call LogWarn)
$$(call LogWarn, Running test '$$($1_TEST)')
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR))
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR) \
$$($1_TEST_TMP_DIR))
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/jtreg, ( \
$$(COV_ENVIRONMENT) $$($1_COMMAND_LINE) \
))

View File

@@ -189,15 +189,9 @@ ifeq ($(OPENJDK_TARGET_CPU), x86_64)
endif
ifeq ($(OPENJDK_TARGET_OS), windows)
ifeq ($(wildcard $(TEST_IMAGE_DIR)/bin/fixpath.exe), )
$(info Error: fixpath is missing from test image '$(TEST_IMAGE_DIR)')
$(error Cannot continue.)
endif
FIXPATH := $(TEST_IMAGE_DIR)/bin/fixpath.exe -c
PATH_SEP:=;
FIXPATH := $(BASH) $(TOPDIR)/make/scripts/fixpath.sh exec
else
FIXPATH :=
PATH_SEP:=:
endif
# Check number of cores and memory in MB
@@ -280,7 +274,6 @@ $(call CreateNewSpec, $(NEW_SPEC), \
BASH := $(BASH), \
JIB_JAR := $(JIB_JAR), \
FIXPATH := $(FIXPATH), \
PATH_SEP := $(PATH_SEP), \
OPENJDK_TARGET_OS := $(OPENJDK_TARGET_OS), \
OPENJDK_TARGET_OS_TYPE := $(OPENJDK_TARGET_OS_TYPE), \
OPENJDK_TARGET_OS_ENV := $(OPENJDK_TARGET_OS_ENV), \

View File

@@ -116,16 +116,13 @@ JAVAC_CMD := $(BOOT_JDK)/bin/javac
JAR_CMD := $(BOOT_JDK)/bin/jar
JLINK_CMD := $(JDK_OUTPUTDIR)/bin/jlink
JMOD_CMD := $(JDK_OUTPUTDIR)/bin/jmod
JARSIGNER_CMD := $(BOOT_JDK)/bin/jarsigner
JAVA := $(FIXPATH) $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
JAVA_SMALL := $(FIXPATH) $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS)
JAVA_DETACH := $(FIXPATH) $(FIXPATH_DETACH_FLAG) $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
JAVAC := $(FIXPATH) $(JAVAC_CMD)
JAR := $(FIXPATH) $(JAR_CMD)
JLINK := $(FIXPATH) $(JLINK_CMD)
JMOD := $(FIXPATH) $(JMOD_CMD)
JARSIGNER := $(FIXPATH) $(JARSIGNER_CMD)
BUILD_JAVA := $(JDK_IMAGE_DIR)/bin/JAVA
################################################################################
@@ -153,7 +150,6 @@ LN := ln
MIG := mig
MKDIR := mkdir
MV := mv
NAWK := nawk
NICE := nice
PATCH := patch
PRINTF := printf
@@ -167,7 +163,6 @@ TAIL := tail
TEE := tee
TR := tr
TOUCH := touch
UNIQ := uniq
WC := wc
XARGS := xargs
ZIPEXE := zip
@@ -178,7 +173,7 @@ HG := hg
ULIMIT := ulimit
ifeq ($(OPENJDK_BUILD_OS), windows)
CYGPATH := cygpath
PATHTOOL := cygpath
endif
################################################################################

View File

@@ -30,34 +30,25 @@ include MakeBase.gmk
############################################################################
ifeq ($(call isTargetOs, windows), true)
FIXPATH_COPY := $(TEST_IMAGE_DIR)/bin/fixpath.exe
$(FIXPATH_COPY): $(firstword $(FIXPATH))
$(call install-file)
FIXPATH_WORKSPACE_ROOT := $(call FixPath, $(WORKSPACE_ROOT))
FIXPATH_OUTPUTDIR := $(call FixPath, $(OUTPUTDIR))
else
FIXPATH_WORKSPACE_ROOT := $(WORKSPACE_ROOT)
FIXPATH_OUTPUTDIR := $(OUTPUTDIR)
endif
BUILD_INFO_PROPERTIES := $(TEST_IMAGE_DIR)/build-info.properties
$(BUILD_INFO_PROPERTIES):
$(call MakeTargetDir)
$(ECHO) "# Build info properties for JDK tests" > $@
$(ECHO) "build.workspace.root=$(FIXPATH_WORKSPACE_ROOT)" >> $@
$(ECHO) "build.output.root=$(FIXPATH_OUTPUTDIR)" >> $@
$(ECHO) "build.workspace.root=$(call FixPath, $(WORKSPACE_ROOT))" >> $@
$(ECHO) "build.output.root=$(call FixPath, $(OUTPUTDIR))" >> $@
prepare-test-image: $(FIXPATH_COPY) $(BUILD_INFO_PROPERTIES)
$(call MakeDir, $(TEST_IMAGE_DIR))
$(ECHO) > $(TEST_IMAGE_DIR)/Readme.txt 'JDK test image'
README := $(TEST_IMAGE_DIR)/Readme.txt
$(README):
$(call MakeTargetDir)
$(ECHO) > $@ 'JDK test image'
TARGETS += $(BUILD_INFO_PROPERTIES) $(README)
################################################################################
prepare-test-image: $(TARGETS)
all: prepare-test-image
.PHONY: default all prepare-test-image

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2018, 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,27 +23,25 @@
# questions.
#
include LibCommon.gmk
ifndef _TOOLS_HOTSPOT_GMK
_TOOLS_HOTSPOT_GMK := 1
include JavaCompilation.gmk
HOTSPOT_TOOLS_OUTPUTDIR := $(BUILDTOOLS_OUTPUTDIR)/buildtools/hotspot_tools_classes
################################################################################
# To avoid reevaluating the compilation setup for the tools each time this file
# is included, the actual compilation is handled by CompileToolsHotspot.gmk. The
# following trick is used to be able to declare a dependency on the built tools.
BUILD_TOOLS_HOTSPOT := $(call SetupJavaCompilationCompileTarget, \
BUILD_TOOLS_HOTSPOT, $(HOTSPOT_TOOLS_OUTPUTDIR))
################################################################################
ifeq ($(ENABLE_INTREE_EC), true)
$(eval $(call SetupJdkLibrary, BUILD_LIBSUNEC, \
NAME := sunec, \
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-DMP_API_COMPATIBLE -DNSS_ECC_MORE_THAN_SUITE_B, \
CXXFLAGS := $(CXXFLAGS_JDKLIB), \
DISABLED_WARNINGS_gcc := sign-compare implicit-fallthrough unused-value, \
DISABLED_WARNINGS_clang := sign-compare, \
DISABLED_WARNINGS_microsoft := 4101 4244 4146 4018, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \
LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := $(LIBCXX), \
))
TOOL_JFR_GEN := $(JAVA_SMALL) -cp $(HOTSPOT_TOOLS_OUTPUTDIR) \
build.tools.jfr.GenerateJfrFiles
TARGETS += $(BUILD_LIBSUNEC)
endif
##########################################################################################
################################################################################
endif # _TOOLS_HOTSPOT_GMK

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -68,6 +68,7 @@ TOOL_TZDB = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
build.tools.tzdb.TzdbZoneRulesCompiler
TOOL_BLACKLISTED_CERTS = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
--add-exports java.base/sun.security.util=ALL-UNNAMED \
build.tools.blacklistedcertsconverter.BlacklistedCertsConverter
TOOL_MAKEJAVASECURITY = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \

View File

@@ -70,32 +70,27 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
fi
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
PATH_SEP=";"
EXE_SUFFIX=".exe"
BASIC_CHECK_PATHS_WINDOWS
else
PATH_SEP=":"
EXE_SUFFIX=""
BASIC_SETUP_PATHS_WINDOWS
fi
AC_SUBST(PATH_SEP)
AC_SUBST(EXE_SUFFIX)
# We get the top-level directory from the supporting wrappers.
BASIC_WINDOWS_VERIFY_DIR($TOPDIR, source)
UTIL_FIXUP_PATH(TOPDIR)
AC_MSG_CHECKING([for top-level directory])
AC_MSG_RESULT([$TOPDIR])
AC_SUBST(TOPDIR)
AC_SUBST(CONFIGURE_START_DIR)
if test "x$CUSTOM_ROOT" != x; then
BASIC_WINDOWS_VERIFY_DIR($CUSTOM_ROOT, custom root)
UTIL_FIXUP_PATH(CUSTOM_ROOT)
WORKSPACE_ROOT="${CUSTOM_ROOT}"
else
WORKSPACE_ROOT="${TOPDIR}"
fi
AC_SUBST(WORKSPACE_ROOT)
# We can only call UTIL_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
UTIL_FIXUP_PATH(CONFIGURE_START_DIR)
UTIL_FIXUP_PATH(TOPDIR)
AC_SUBST(CONFIGURE_START_DIR)
# Locate the directory of this script.
AUTOCONF_DIR=$TOPDIR/make/autoconf
@@ -116,6 +111,16 @@ AC_DEFUN([BASIC_EVAL_DEVKIT_VARIABLE],
fi
])
###############################################################################
# Evaluates platform specific overrides for build devkit variables.
# $1: Name of variable
AC_DEFUN([BASIC_EVAL_BUILD_DEVKIT_VARIABLE],
[
if test "x[$]$1" = x; then
eval $1="\${$1_${OPENJDK_BUILD_CPU}}"
fi
])
###############################################################################
AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
[
@@ -223,9 +228,12 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
# if no Xcode installed, xcodebuild exits with 1
# if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
# We need to use xcodebuild in the toolchain dir provided by the user, this will
# fall back on the stub binary in /usr/bin/xcodebuild
AC_PATH_PROG([XCODEBUILD], [xcodebuild], [/usr/bin/xcodebuild], [$TOOLCHAIN_PATH])
# We need to use xcodebuild in the toolchain dir provided by the user
UTIL_LOOKUP_PROGS(XCODEBUILD, xcodebuild, $TOOLCHAIN_PATH)
if test x$XCODEBUILD = x; then
# fall back on the stub binary in /usr/bin/xcodebuild
XCODEBUILD=/usr/bin/xcodebuild
fi
else
# this should result in SYSROOT being empty, unless --with-sysroot is provided
# when only the command line tools are installed there are no SDKs, so headers
@@ -295,6 +303,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
AC_MSG_RESULT([$SYSROOT])
AC_MSG_CHECKING([for toolchain path])
AC_MSG_RESULT([$TOOLCHAIN_PATH])
AC_SUBST(TOOLCHAIN_PATH)
AC_MSG_CHECKING([for extra path])
AC_MSG_RESULT([$EXTRA_PATH])
])
@@ -369,6 +378,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
AC_MSG_CHECKING([what configuration name to use])
AC_MSG_RESULT([$CONF_NAME])
BASIC_WINDOWS_VERIFY_DIR($OUTPUTDIR, output)
UTIL_FIXUP_PATH(OUTPUTDIR)
CONFIGURESUPPORT_OUTPUTDIR="$OUTPUTDIR/configure-support"
@@ -405,26 +415,16 @@ AC_DEFUN([BASIC_CHECK_DIR_ON_LOCAL_DISK],
# df -l lists only local disks; if the given directory is not found then
# a non-zero exit code is given
if test "x$DF" = x; then
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
# msys does not have df; use Windows "net use" instead.
IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
if test "x$IS_NETWORK_DISK" = x; then
$2
else
$3
fi
else
# No df here, say it's local
$2
fi
# No df here, say it's local
$2
else
# JDK-8189619
# df on AIX does not understand -l. On modern AIXes it understands "-T local" which
# is the same. On older AIXes we just continue to live with a "not local build" warning.
if test "x$OPENJDK_TARGET_OS" = xaix; then
DF_LOCAL_ONLY_OPTION='-T local'
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
# In WSL, we can only build on a drvfs file system (that is, a mounted real Windows drive)
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl1"; then
# In WSL1, we can only build on a drvfs file system (that is, a mounted real Windows drive)
DF_LOCAL_ONLY_OPTION='-t drvfs'
else
DF_LOCAL_ONLY_OPTION='-l'

View File

@@ -28,38 +28,37 @@
# but is used by much of the early bootstrap code.
AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
[
# Start with tools that do not need have cross compilation support
# and can be expected to be found in the default PATH. These tools are
# used by configure.
# Bootstrapping: These tools are needed by UTIL_LOOKUP_PROGS
AC_PATH_PROGS(BASENAME, basename)
UTIL_CHECK_NONEMPTY(BASENAME)
AC_PATH_PROGS(DIRNAME, dirname)
UTIL_CHECK_NONEMPTY(DIRNAME)
AC_PATH_PROGS(FILE, file)
UTIL_CHECK_NONEMPTY(FILE)
AC_PATH_PROGS(LDD, ldd)
# First are all the simple required tools.
UTIL_REQUIRE_PROGS(BASENAME, basename)
# First are all the fundamental required tools.
UTIL_REQUIRE_PROGS(BASH, bash)
UTIL_REQUIRE_PROGS(CAT, cat)
UTIL_REQUIRE_PROGS(CHMOD, chmod)
UTIL_REQUIRE_PROGS(CMP, cmp)
UTIL_REQUIRE_PROGS(COMM, comm)
UTIL_REQUIRE_PROGS(CP, cp)
UTIL_REQUIRE_PROGS(CUT, cut)
UTIL_REQUIRE_PROGS(DATE, date)
UTIL_REQUIRE_PROGS(DIFF, [gdiff diff])
UTIL_REQUIRE_PROGS(DIRNAME, dirname)
UTIL_REQUIRE_PROGS(DIFF, gdiff diff)
UTIL_REQUIRE_PROGS(ECHO, echo)
UTIL_REQUIRE_PROGS(EXPR, expr)
UTIL_REQUIRE_PROGS(FILE, file)
UTIL_REQUIRE_PROGS(FIND, find)
UTIL_REQUIRE_PROGS(HEAD, head)
UTIL_REQUIRE_PROGS(GUNZIP, gunzip)
UTIL_REQUIRE_PROGS(GZIP, pigz gzip)
UTIL_REQUIRE_PROGS(HEAD, head)
UTIL_REQUIRE_PROGS(LN, ln)
UTIL_REQUIRE_PROGS(LS, ls)
# gmkdir is known to be safe for concurrent invocations with -p flag.
UTIL_REQUIRE_PROGS(MKDIR, [gmkdir mkdir])
UTIL_REQUIRE_PROGS(MKDIR, gmkdir mkdir)
UTIL_REQUIRE_PROGS(MKTEMP, mktemp)
UTIL_REQUIRE_PROGS(MV, mv)
UTIL_REQUIRE_PROGS(NAWK, [nawk gawk awk])
UTIL_REQUIRE_PROGS(AWK, gawk nawk awk)
UTIL_REQUIRE_PROGS(PRINTF, printf)
UTIL_REQUIRE_PROGS(READLINK, [greadlink readlink])
UTIL_REQUIRE_PROGS(RM, rm)
UTIL_REQUIRE_PROGS(RMDIR, rmdir)
UTIL_REQUIRE_PROGS(SH, sh)
@@ -70,34 +69,31 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
UTIL_REQUIRE_PROGS(TOUCH, touch)
UTIL_REQUIRE_PROGS(TR, tr)
UTIL_REQUIRE_PROGS(UNAME, uname)
UTIL_REQUIRE_PROGS(UNIQ, uniq)
UTIL_REQUIRE_PROGS(WC, wc)
UTIL_REQUIRE_PROGS(WHICH, which)
UTIL_REQUIRE_PROGS(XARGS, xargs)
# Then required tools that require some special treatment.
UTIL_REQUIRE_SPECIAL(AWK, [AC_PROG_AWK])
UTIL_REQUIRE_SPECIAL(GREP, [AC_PROG_GREP])
UTIL_REQUIRE_SPECIAL(EGREP, [AC_PROG_EGREP])
UTIL_REQUIRE_SPECIAL(FGREP, [AC_PROG_FGREP])
UTIL_REQUIRE_SPECIAL(SED, [AC_PROG_SED])
# Optional tools, we can do without them
UTIL_LOOKUP_PROGS(DF, df)
UTIL_LOOKUP_PROGS(NICE, nice)
UTIL_LOOKUP_PROGS(READLINK, greadlink readlink)
# These are only needed on some platforms
UTIL_LOOKUP_PROGS(PATHTOOL, cygpath wslpath)
UTIL_LOOKUP_PROGS(LSB_RELEASE, lsb_release)
UTIL_LOOKUP_PROGS(CMD, cmd.exe, $PATH:/cygdrive/c/windows/system32:/mnt/c/windows/system32:/c/windows/system32)
# For compare.sh only
UTIL_LOOKUP_PROGS(CMP, cmp)
UTIL_LOOKUP_PROGS(UNIQ, uniq)
# Always force rm.
RM="$RM -f"
# pwd behaves differently on various platforms and some don't support the -L flag.
# Always use the bash builtin pwd to get uniform behavior.
THEPWDCMD=pwd
# These are not required on all platforms
UTIL_PATH_PROGS(CYGPATH, cygpath)
UTIL_PATH_PROGS(WSLPATH, wslpath)
UTIL_PATH_PROGS(DF, df)
UTIL_PATH_PROGS(CPIO, [cpio bsdcpio])
UTIL_PATH_PROGS(NICE, nice)
UTIL_PATH_PROGS(LSB_RELEASE, lsb_release)
UTIL_PATH_PROGS(CMD, cmd.exe, $PATH /cygdrive/c/Windows/System32 /mnt/c/Windows/System32)
])
###############################################################################
@@ -132,10 +128,14 @@ AC_DEFUN([BASIC_CHECK_MAKE_VERSION],
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
MAKE_EXPECTED_ENV='cygwin'
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys2"; then
MAKE_EXPECTED_ENV='msys'
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
MAKE_EXPECTED_ENV='x86_64-.*-linux-gnu'
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl1" || test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl2"; then
if test "x$OPENJDK_BUILD_CPU" = "xaarch64"; then
MAKE_EXPECTED_ENV='aarch64-.*-linux-gnu'
else
MAKE_EXPECTED_ENV='x86_64-.*-linux-gnu'
fi
else
AC_MSG_ERROR([Unknown Windows environment])
fi
@@ -187,14 +187,14 @@ AC_DEFUN([BASIC_CHECK_MAKE_OUTPUT_SYNC],
# Goes looking for a usable version of GNU make.
AC_DEFUN([BASIC_CHECK_GNU_MAKE],
[
UTIL_SETUP_TOOL([MAKE],
UTIL_SETUP_TOOL(MAKE,
[
# Try our hardest to locate a correct version of GNU make
AC_PATH_PROGS(CHECK_GMAKE, gmake)
UTIL_LOOKUP_PROGS(CHECK_GMAKE, gmake)
BASIC_CHECK_MAKE_VERSION("$CHECK_GMAKE", [gmake in PATH])
if test "x$FOUND_MAKE" = x; then
AC_PATH_PROGS(CHECK_MAKE, make)
UTIL_LOOKUP_PROGS(CHECK_MAKE, make)
BASIC_CHECK_MAKE_VERSION("$CHECK_MAKE", [make in PATH])
fi
@@ -203,10 +203,10 @@ AC_DEFUN([BASIC_CHECK_GNU_MAKE],
# We have a toolchain path, check that as well before giving up.
OLD_PATH=$PATH
PATH=$TOOLCHAIN_PATH:$PATH
AC_PATH_PROGS(CHECK_TOOLSDIR_GMAKE, gmake)
UTIL_LOOKUP_PROGS(CHECK_TOOLSDIR_GMAKE, gmake)
BASIC_CHECK_MAKE_VERSION("$CHECK_TOOLSDIR_GMAKE", [gmake in tools-dir])
if test "x$FOUND_MAKE" = x; then
AC_PATH_PROGS(CHECK_TOOLSDIR_MAKE, make)
UTIL_LOOKUP_PROGS(CHECK_TOOLSDIR_MAKE, make)
BASIC_CHECK_MAKE_VERSION("$CHECK_TOOLSDIR_MAKE", [make in tools-dir])
fi
PATH=$OLD_PATH
@@ -336,24 +336,17 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
# Non-required basic tools
UTIL_PATH_PROGS(LDD, ldd)
if test "x$LDD" = "x"; then
# List shared lib dependencies is used for
# debug output and checking for forbidden dependencies.
# We can build without it.
LDD="true"
fi
UTIL_PATH_PROGS(READELF, [greadelf readelf])
UTIL_PATH_PROGS(DOT, dot)
UTIL_PATH_PROGS(HG, hg)
UTIL_PATH_PROGS(GIT, git)
UTIL_PATH_PROGS(STAT, stat)
UTIL_PATH_PROGS(TIME, time)
UTIL_PATH_PROGS(FLOCK, flock)
UTIL_LOOKUP_PROGS(READELF, greadelf readelf)
UTIL_LOOKUP_PROGS(DOT, dot)
UTIL_LOOKUP_PROGS(HG, hg)
UTIL_LOOKUP_PROGS(GIT, git)
UTIL_LOOKUP_PROGS(STAT, stat)
UTIL_LOOKUP_PROGS(TIME, time)
UTIL_LOOKUP_PROGS(FLOCK, flock)
# Dtrace is usually found in /usr/sbin, but that directory may not
# be in the user path.
UTIL_PATH_PROGS(DTRACE, dtrace, $PATH:/usr/sbin)
UTIL_PATH_PROGS(PATCH, [gpatch patch])
UTIL_LOOKUP_PROGS(DTRACE, dtrace, $PATH:/usr/sbin)
UTIL_LOOKUP_PROGS(PATCH, gpatch patch)
# Check if it's GNU time
IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
if test "x$IS_GNU_TIME" != x; then
@@ -367,7 +360,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
UTIL_REQUIRE_PROGS(DSYMUTIL, dsymutil)
UTIL_REQUIRE_PROGS(MIG, mig)
UTIL_REQUIRE_PROGS(XATTR, xattr)
UTIL_PATH_PROGS(CODESIGN, codesign)
UTIL_LOOKUP_PROGS(CODESIGN, codesign)
if test "x$CODESIGN" != "x"; then
# Check for user provided code signing identity.
@@ -408,7 +401,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
UTIL_REQUIRE_PROGS(SETFILE, SetFile)
fi
if ! test "x$OPENJDK_TARGET_OS" = "xwindows"; then
UTIL_REQUIRE_BUILTIN_PROGS(ULIMIT, ulimit)
UTIL_REQUIRE_PROGS(ULIMIT, ulimit)
fi
])
@@ -454,7 +447,7 @@ AC_DEFUN_ONCE([BASIC_CHECK_BASH_OPTIONS],
#
AC_DEFUN_ONCE([BASIC_SETUP_PANDOC],
[
UTIL_PATH_PROGS(PANDOC, pandoc)
UTIL_LOOKUP_PROGS(PANDOC, pandoc)
PANDOC_MARKDOWN_FLAG="markdown"
if test -n "$PANDOC"; then

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -24,97 +24,160 @@
#
# Setup basic configuration paths, and platform-specific stuff related to PATHs.
AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS],
AC_DEFUN([BASIC_SETUP_PATHS_WINDOWS],
[
SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
if test $SRC_ROOT_LENGTH -gt 100; then
AC_MSG_ERROR([Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported])
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
# Clarify if it is wsl1 or wsl2, and use that as OS_ENV from this point forward
$PATHTOOL -w / > /dev/null 2>&1
if test $? -ne 0; then
# Without Windows access to our root, it's definitely WSL1
OPENJDK_BUILD_OS_ENV=windows.wsl1
else
# This test is not guaranteed, but there is no documented way of
# distinguishing between WSL1 and WSL2. Assume only WSL2 has WSL_INTEROP
# in /run/WSL
if test -d "/run/WSL" ; then
OPENJDK_BUILD_OS_ENV=windows.wsl2
else
OPENJDK_BUILD_OS_ENV=windows.wsl1
fi
fi
# This is a bit silly since we really don't have a target env as such,
# but do it to keep consistency.
OPENJDK_TARGET_OS_ENV=$OPENJDK_BUILD_OS_ENV
fi
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys2"; then
# Must be done prior to calling any commands to avoid mangling of command line
export MSYS2_ARG_CONV_EXCL="*"
fi
AC_MSG_CHECKING([Windows environment type])
WINENV_VENDOR=${OPENJDK_BUILD_OS_ENV#windows.}
AC_MSG_RESULT([$WINENV_VENDOR])
if test "x$WINENV_VENDOR" = x; then
AC_MSG_ERROR([Unknown Windows environment. Neither cygwin, msys2, wsl1 nor wsl2 was detected.])
fi
if test "x$PATHTOOL" = x; then
AC_MSG_ERROR([Incorrect $WINENV_VENDOR installation. Neither cygpath nor wslpath was found])
fi
if test "x$CMD" = x; then
AC_MSG_ERROR([Incorrect Windows/$WINENV_VENDOR setup. Could not locate cmd.exe])
fi
AC_MSG_CHECKING([$WINENV_VENDOR drive prefix])
WINENV_PREFIX=`$PATHTOOL -u c:/ | $SED -e 's!/c/!!'`
AC_MSG_RESULT(['$WINENV_PREFIX'])
AC_SUBST(WINENV_PREFIX)
AC_MSG_CHECKING([$WINENV_VENDOR root directory as Windows path])
if test "x$OPENJDK_BUILD_OS_ENV" != "xwindows.wsl1"; then
WINENV_ROOT=`$PATHTOOL -w / 2> /dev/null`
# msys2 has a trailing backslash; strip it
WINENV_ROOT=${WINENV_ROOT%\\}
else
WINENV_ROOT='[[unavailable]]'
fi
AC_MSG_RESULT(['$WINENV_ROOT'])
AC_SUBST(WINENV_ROOT)
AC_MSG_CHECKING([$WINENV_VENDOR temp directory])
WINENV_TEMP_DIR=$($PATHTOOL -u $($CMD /q /c echo %TEMP% 2> /dev/null) | $TR -d '\r\n')
AC_MSG_RESULT([$WINENV_TEMP_DIR])
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl2"; then
# Don't trust the current directory for WSL2, but change to an OK temp dir
cd "$WINENV_TEMP_DIR"
# Bring along confdefs.h or autoconf gets all confused
cp "$CONFIGURE_START_DIR/confdefs.h" "$WINENV_TEMP_DIR"
fi
AC_MSG_CHECKING([$WINENV_VENDOR release])
WINENV_UNAME_RELEASE=`$UNAME -r`
AC_MSG_RESULT([$WINENV_UNAME_RELEASE])
AC_MSG_CHECKING([$WINENV_VENDOR version])
WINENV_UNAME_VERSION=`$UNAME -v`
AC_MSG_RESULT([$WINENV_UNAME_VERSION])
WINENV_VERSION="$WINENV_UNAME_RELEASE, $WINENV_UNAME_VERSION"
AC_MSG_CHECKING([Windows version])
# We must change directory to one guaranteed to work, otherwise WSL1
# can complain (since it does not have a WINENV_ROOT so it can't access
# unix-style paths from Windows.
# Additional [] needed to keep m4 from mangling shell constructs.
[ WINDOWS_VERSION=`$CMD /c ver.exe | $EGREP -o '([0-9]+\.)+[0-9]+'` ]
[ WINDOWS_VERSION=`cd $WINENV_TEMP_DIR && $CMD /c ver | $EGREP -o '([0-9]+\.)+[0-9]+'` ]
AC_MSG_RESULT([$WINDOWS_VERSION])
# Additional handling per specific env
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
AC_MSG_CHECKING([cygwin release])
CYGWIN_RELEASE=`$UNAME -r`
AC_MSG_RESULT([$CYGWIN_RELEASE])
AC_MSG_CHECKING([cygwin version])
CYGWIN_VERSION=`$UNAME -v`
AC_MSG_RESULT([$CYGWIN_VERSION])
# Additional [] needed to keep m4 from mangling shell constructs.
[ CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_RELEASE | $GREP -e '^1\.[0-6]'` ]
[ CYGWIN_VERSION_OLD=`$ECHO $WINENV_UNAME_RELEASE | $GREP -e '^1\.[0-6]'` ]
if test "x$CYGWIN_VERSION_OLD" != x; then
AC_MSG_NOTICE([Your cygwin is too old. You are running $CYGWIN_RELEASE, but at least cygwin 1.7 is required. Please upgrade.])
AC_MSG_ERROR([Cannot continue])
fi
WINDOWS_ENV_VENDOR='cygwin'
WINDOWS_ENV_VERSION="$CYGWIN_RELEASE, $CYGWIN_VERSION"
if test "x$CYGPATH" = x; then
AC_MSG_ERROR([Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path])
if test "x$LDD" = x; then
AC_MSG_ERROR([ldd is missing, which is needed on cygwin])
fi
AC_MSG_CHECKING([cygwin root directory as unix-style path])
# The cmd output ends with Windows line endings (CR/LF)
cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
# Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
AC_MSG_RESULT([$CYGWIN_ROOT_PATH])
WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
if test "x$test_cygdrive_prefix" = x; then
AC_MSG_ERROR([Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c.])
WINENV_MARKER_DLL=cygwin1.dll
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys2"; then
if test "x$LDD" = x; then
AC_MSG_ERROR([ldd is missing, which is needed on msys2])
fi
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
AC_MSG_CHECKING([msys release])
MSYS_RELEASE=`$UNAME -r`
AC_MSG_RESULT([$MSYS_RELEASE])
AC_MSG_CHECKING([msys version])
MSYS_VERSION=`$UNAME -v`
AC_MSG_RESULT([$MSYS_VERSION])
WINDOWS_ENV_VENDOR='msys'
WINDOWS_ENV_VERSION="$MSYS_RELEASE, $MSYS_VERSION"
AC_MSG_CHECKING([msys root directory as unix-style path])
# The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
UTIL_REWRITE_AS_UNIX_PATH(MSYS_ROOT_PATH)
AC_MSG_RESULT([$MSYS_ROOT_PATH])
WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
AC_MSG_CHECKING([WSL kernel version])
WSL_KERNEL_VERSION=`$UNAME -v`
AC_MSG_RESULT([$WSL_KERNEL_VERSION])
AC_MSG_CHECKING([WSL kernel release])
WSL_KERNEL_RELEASE=`$UNAME -r`
AC_MSG_RESULT([$WSL_KERNEL_RELEASE])
AC_MSG_CHECKING([WSL distribution])
WINENV_MARKER_DLL=msys-2.0.dll
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl1" || test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl2"; then
AC_MSG_CHECKING([wsl distribution])
WSL_DISTRIBUTION=`$LSB_RELEASE -d | sed 's/Description:\t//'`
AC_MSG_RESULT([$WSL_DISTRIBUTION])
WINDOWS_ENV_VENDOR='wsl'
WINDOWS_ENV_VERSION="$WSL_KERNEL_RELEASE, $WSL_KERNEL_VERSION ($WSL_DISTRIBUTION)"
else
AC_MSG_ERROR([Unknown Windows environment. Neither cygwin, msys, nor wsl was detected.])
WINENV_VERSION="$WINENV_VERSION ($WSL_DISTRIBUTION)"
# Tell WSL to automatically translate the PATH variable
export WSLENV=PATH/l
fi
# Test if windows or unix (cygwin/msys) find is first in path.
# Chicken and egg: FIXPATH is needed for UTIL_FIXUP_PATH to work. So for the
# first run we use the auto-detect abilities of fixpath.sh.
FIXPATH_DIR="$TOPDIR/make/scripts"
FIXPATH="$BASH $FIXPATH_DIR/fixpath.sh exec"
FIXPATH_BASE="$BASH $FIXPATH_DIR/fixpath.sh"
FIXPATH_SAVED_PATH="$PATH"
UTIL_FIXUP_PATH(FIXPATH_DIR)
# Now we can use FIXPATH_DIR to rewrite path to fixpath.sh properly.
if test "x$WINENV_PREFIX" = x; then
# On msys the prefix is empty, but we need to pass something to have the
# fixpath.sh options parser happy.
WINENV_PREFIX_ARG="NONE"
else
WINENV_PREFIX_ARG="$WINENV_PREFIX"
fi
FIXPATH_ARGS="-e $PATHTOOL -p $WINENV_PREFIX_ARG -r ${WINENV_ROOT//\\/\\\\} -t $WINENV_TEMP_DIR -c $CMD -q"
FIXPATH_BASE="$BASH $FIXPATH_DIR/fixpath.sh $FIXPATH_ARGS"
FIXPATH="$FIXPATH_BASE exec"
AC_SUBST(FIXPATH_BASE)
AC_SUBST(FIXPATH)
SRC_ROOT_LENGTH=`$ECHO "$TOPDIR" | $WC -m`
if test $SRC_ROOT_LENGTH -gt 100; then
AC_MSG_ERROR([Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported])
fi
# Test if windows or unix "find" is first in path.
AC_MSG_CHECKING([what kind of 'find' is first on the PATH])
FIND_BINARY_OUTPUT=`find --version 2>&1`
if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
AC_MSG_RESULT([unix style])
elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
AC_MSG_RESULT([Windows])
AC_MSG_NOTICE([Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools.])
AC_MSG_NOTICE([Your path contains Windows tools (C:\Windows\system32) before your unix tools.])
AC_MSG_NOTICE([This will not work. Please correct and make sure /usr/bin (or similar) is first in path.])
AC_MSG_ERROR([Cannot continue])
else
@@ -123,73 +186,39 @@ AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS],
fi
])
AC_DEFUN_ONCE([BASIC_COMPILE_FIXPATH],
# Verify that the directory is usable on Windows
AC_DEFUN([BASIC_WINDOWS_VERIFY_DIR],
[
# When using cygwin or msys, we need a wrapper binary that renames
# /cygdrive/c/ arguments into c:/ arguments and peeks into
# @files and rewrites these too! This wrapper binary is
# called fixpath.
FIXPATH=
if test "x$OPENJDK_BUILD_OS" = xwindows; then
AC_MSG_CHECKING([if fixpath can be created])
FIXPATH_SRC="$TOPDIR/make/src/native/fixpath.c"
FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
# Important to keep the .exe suffix on Cygwin for Hotspot makefiles
FIXPATH="$FIXPATH_BIN -c"
elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
# Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
# @ was chosen as separator to minimize risk of other tools messing around with it
all_unique_prefixes=`echo "${all_fixpath_prefixes@<:@@@:>@}" \
| tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
fixpath_argument_list=`echo $all_unique_prefixes | tr ' ' '@'`
FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.wsl; then
FIXPATH="$FIXPATH_BIN -w"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl1"; then
OUTPUTDIR_WIN=`$FIXPATH_BASE print $1`
if test "x$OUTPUTDIR_WIN" = x; then
AC_MSG_NOTICE([For wsl1, the $2 dir must be located on a Windows drive. Please see doc/building.md for details.])
AC_MSG_ERROR([Cannot continue])
fi
FIXPATH_SRC_W="$FIXPATH_SRC"
FIXPATH_BIN_W="$FIXPATH_BIN"
UTIL_REWRITE_AS_WINDOWS_MIXED_PATH([FIXPATH_SRC_W])
UTIL_REWRITE_AS_WINDOWS_MIXED_PATH([FIXPATH_BIN_W])
$RM -rf $FIXPATH_BIN $FIXPATH_DIR
$MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
cd $FIXPATH_DIR
$CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
cd $CONFIGURE_START_DIR
if test ! -x $FIXPATH_BIN; then
AC_MSG_RESULT([no])
cat $FIXPATH_DIR/fixpath1.log
AC_MSG_ERROR([Could not create $FIXPATH_BIN])
fi
AC_MSG_RESULT([yes])
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
OLD_WSLENV="$WSLENV"
WSLENV=`$ECHO $WSLENV | $SED 's/PATH\/l://'`
UTIL_APPEND_TO_PATH(WSLENV, "FIXPATH_PATH")
export WSLENV
export FIXPATH_PATH=$VS_PATH_WINDOWS
AC_MSG_NOTICE([FIXPATH_PATH is $FIXPATH_PATH])
AC_MSG_NOTICE([Rewriting WSLENV from $OLD_WSLENV to $WSLENV])
fi
AC_MSG_CHECKING([if fixpath.exe works])
cd $FIXPATH_DIR
$FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
> $FIXPATH_DIR/fixpath2.log 2>&1
cd $CONFIGURE_START_DIR
if test ! -x $FIXPATH_DIR/fixpath2.exe; then
AC_MSG_RESULT([no])
cat $FIXPATH_DIR/fixpath2.log
AC_MSG_ERROR([fixpath did not work!])
fi
AC_MSG_RESULT([yes])
FIXPATH_DETACH_FLAG="--detach"
fi
AC_SUBST(FIXPATH)
AC_SUBST(FIXPATH_DETACH_FLAG)
])
# Create fixpath wrapper
AC_DEFUN([BASIC_WINDOWS_FINALIZE_FIXPATH],
[
if test "x$OPENJDK_BUILD_OS" = xwindows; then
FIXPATH_CMDLINE=". $TOPDIR/make/scripts/fixpath.sh -e $PATHTOOL \
-p $WINENV_PREFIX_ARG -r ${WINENV_ROOT//\\/\\\\} -t $WINENV_TEMP_DIR \
-c $CMD -q"
$ECHO > $OUTPUTDIR/fixpath '#!/bin/bash'
$ECHO >> $OUTPUTDIR/fixpath export PATH='"[$]PATH:'$PATH'"'
$ECHO >> $OUTPUTDIR/fixpath $FIXPATH_CMDLINE '"[$]@"'
$CHMOD +x $OUTPUTDIR/fixpath
FIXPATH_BASE="$OUTPUTDIR/fixpath"
FIXPATH="$FIXPATH_BASE exec"
fi
])
# Platform-specific finalization
AC_DEFUN([BASIC_WINDOWS_FINALIZE],
[
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl2"; then
# Change back from temp dir
cd $CONFIGURE_START_DIR
fi
])

View File

@@ -63,19 +63,23 @@ AC_DEFUN([BOOTJDK_DO_CHECK],
# If previous step claimed to have found a JDK, check it to see if it seems to be valid.
if test "x$BOOT_JDK_FOUND" = xmaybe; then
# Do we have a bin/java?
if test ! -x "$BOOT_JDK/bin/java$EXE_SUFFIX"; then
if test ! -x "$BOOT_JDK/bin/java" && test ! -x "$BOOT_JDK/bin/java.exe"; then
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring])
BOOT_JDK_FOUND=no
else
# Do we have a bin/javac?
if test ! -x "$BOOT_JDK/bin/javac$EXE_SUFFIX"; then
if test ! -x "$BOOT_JDK/bin/javac" && test ! -x "$BOOT_JDK/bin/javac.exe"; then
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring])
AC_MSG_NOTICE([(This might be an JRE instead of an JDK)])
BOOT_JDK_FOUND=no
else
# Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
java_to_test="$BOOT_JDK/bin/java"
UTIL_FIXUP_EXECUTABLE(java_to_test)
BOOT_JDK_VERSION_OUTPUT=`$java_to_test $USER_BOOT_JDK_OPTIONS -version 2>&1`
# Additional [] needed to keep m4 from mangling shell constructs.
[ BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java$EXE_SUFFIX" $USER_BOOT_JDK_OPTIONS -version 2>&1 | $AWK '/version \"[0-9a-zA-Z\._\-]+\"/{print $ 0; exit;}'` ]
[ BOOT_JDK_VERSION=`echo $BOOT_JDK_VERSION_OUTPUT | $AWK '/version "[0-9a-zA-Z\._\-]+"/ {print $ 0; exit;}'` ]
if [ [[ "$BOOT_JDK_VERSION" =~ "Picked up" ]] ]; then
AC_MSG_NOTICE([You have _JAVA_OPTIONS or JAVA_TOOL_OPTIONS set. This can mess up the build. Please use --with-boot-jdk-jvmargs instead.])
AC_MSG_NOTICE([Java reports: "$BOOT_JDK_VERSION".])
@@ -91,7 +95,12 @@ AC_DEFUN([BOOTJDK_DO_CHECK],
# Extra M4 quote needed to protect [] in grep expression.
[FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION \
| $EGREP "\"(${DEFAULT_ACCEPTABLE_BOOT_VERSIONS// /|})([\.+-].*)?\""`]
if test "x$FOUND_CORRECT_VERSION" = x; then
if test "x$BOOT_JDK_VERSION" = x; then
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK is not a working JDK; ignoring])
AC_MSG_NOTICE([Output from java -version was: $BOOT_JDK_VERSION_OUTPUT])
BOOT_JDK_FOUND=no
elif test "x$FOUND_CORRECT_VERSION" = x; then
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring])
AC_MSG_NOTICE([(Your Boot JDK version must be one of: $DEFAULT_ACCEPTABLE_BOOT_VERSIONS)])
BOOT_JDK_FOUND=no
@@ -102,7 +111,9 @@ AC_DEFUN([BOOTJDK_DO_CHECK],
AC_MSG_CHECKING([for Boot JDK])
AC_MSG_RESULT([$BOOT_JDK])
AC_MSG_CHECKING([Boot JDK version])
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java$EXE_SUFFIX" $USER_BOOT_JDK_OPTIONS -version 2>&1 | $TR '\n\r' ' '`
BOOT_JDK_VERSION=`$java_to_test $USER_BOOT_JDK_OPTIONS -version 2>&1 | $TR -d '\r'`
# This is not a no-op; it will portably convert newline to space
BOOT_JDK_VERSION=`$ECHO $BOOT_JDK_VERSION`
AC_MSG_RESULT([$BOOT_JDK_VERSION])
fi # end check jdk version
fi # end check javac
@@ -151,8 +162,8 @@ AC_DEFUN([BOOTJDK_CHECK_JAVA_HOME],
[
if test "x$JAVA_HOME" != x; then
JAVA_HOME_PROCESSED="$JAVA_HOME"
UTIL_FIXUP_PATH(JAVA_HOME_PROCESSED)
if test ! -d "$JAVA_HOME_PROCESSED"; then
UTIL_FIXUP_PATH(JAVA_HOME_PROCESSED, NOFAIL)
if test "x$JAVA_HOME_PROCESSED" = x || test ! -d "$JAVA_HOME_PROCESSED"; then
AC_MSG_NOTICE([Your JAVA_HOME points to a non-existing directory!])
else
# Aha, the user has set a JAVA_HOME
@@ -167,8 +178,8 @@ AC_DEFUN([BOOTJDK_CHECK_JAVA_HOME],
# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
AC_DEFUN([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK],
[
AC_PATH_PROG(JAVAC_CHECK, javac)
AC_PATH_PROG(JAVA_CHECK, java)
UTIL_LOOKUP_PROGS(JAVAC_CHECK, javac, , NOFIXPATH)
UTIL_LOOKUP_PROGS(JAVA_CHECK, java, , NOFIXPATH)
BINARY="$JAVAC_CHECK"
if test "x$JAVAC_CHECK" = x; then
BINARY="$JAVA_CHECK"
@@ -207,9 +218,9 @@ AC_DEFUN([BOOTJDK_CHECK_MACOSX_JAVA_LOCATOR],
# First check at user selected default
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME()])
# If that did not work out (e.g. too old), try explicit versions instead
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME([-v 1.9])])
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME([-v 1.8])])
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME([-v 1.7])])
for ver in $DEFAULT_ACCEPTABLE_BOOT_VERSIONS ; do
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME([-v $ver])])
done
fi
])
@@ -242,8 +253,10 @@ AC_DEFUN([BOOTJDK_FIND_BEST_JDK_IN_WINDOWS_VIRTUAL_DIRECTORY],
[
if test "x[$]$1" != x; then
VIRTUAL_DIR="[$]$1/Java"
UTIL_REWRITE_AS_UNIX_PATH(VIRTUAL_DIR)
BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY($VIRTUAL_DIR)
UTIL_FIXUP_PATH(VIRTUAL_DIR, NOFAIL)
if test "x$VIRTUAL_DIR" != x; then
BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY($VIRTUAL_DIR)
fi
fi
])
@@ -270,16 +283,17 @@ AC_DEFUN([BOOTJDK_CHECK_WELL_KNOWN_LOCATIONS],
AC_DEFUN([BOOTJDK_CHECK_TOOL_IN_BOOTJDK],
[
# Use user overridden value if available, otherwise locate tool in the Boot JDK.
UTIL_SETUP_TOOL($1,
UTIL_REQUIRE_SPECIAL($1,
[
AC_MSG_CHECKING([for $2 in Boot JDK])
AC_MSG_CHECKING([for $2 [[Boot JDK]]])
$1=$BOOT_JDK/bin/$2
if test ! -x [$]$1; then
if test ! -x [$]$1 && test ! -x [$]$1.exe; then
AC_MSG_RESULT(not found)
AC_MSG_NOTICE([Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk])
AC_MSG_ERROR([Could not find $2 in the Boot JDK])
fi
AC_MSG_RESULT(ok)
AC_MSG_RESULT(\[$]BOOT_JDK/bin/$2)
UTIL_FIXUP_EXECUTABLE($1)
AC_SUBST($1)
])
])
@@ -313,12 +327,12 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
AC_MSG_ERROR([The path given by --with-boot-jdk does not contain a valid Boot JDK])
fi
# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_MACOSX_JAVA_LOCATOR])
# Test: Is $JAVA_HOME set?
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_HOME])
# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_MACOSX_JAVA_LOCATOR])
# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK])
@@ -336,11 +350,10 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
AC_SUBST(BOOT_JDK)
# Setup tools from the Boot JDK.
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVA, java$EXE_SUFFIX)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAC, javac$EXE_SUFFIX)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVADOC, javadoc$EXE_SUFFIX)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAR, jar$EXE_SUFFIX)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JARSIGNER, jarsigner$EXE_SUFFIX)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVA, java)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAC, javac)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVADOC, javadoc)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAR, jar)
# Finally, set some other options...
@@ -353,7 +366,7 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
AC_SUBST(BOOT_JDK_SOURCETARGET)
# Check if the boot jdk is 32 or 64 bit
if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
if $JAVA -version 2>&1 | $GREP -q "64-Bit"; then
BOOT_JDK_BITS="64"
else
BOOT_JDK_BITS="32"
@@ -368,7 +381,7 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
if test "x$boot_jdk_cds_args" != x; then
# Try creating a CDS archive
"$JAVA" $boot_jdk_cds_args -Xshare:dump > /dev/null 2>&1
$JAVA $boot_jdk_cds_args -Xshare:dump > /dev/null 2>&1
if test $? -eq 0; then
BOOTJDK_USE_LOCAL_CDS=true
AC_MSG_RESULT([yes, created])
@@ -516,7 +529,7 @@ AC_DEFUN([BOOTJDK_CHECK_BUILD_JDK],
else
# Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
# Additional [] needed to keep m4 from mangling shell constructs.
[ BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $AWK '/version \"[0-9a-zA-Z\._\-]+\"/{print $ 0; exit;}'` ]
[ BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $AWK '/version "[0-9a-zA-Z\._\-]+"/ {print $ 0; exit;}'` ]
# Extra M4 quote needed to protect [] in grep expression.
[FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP "\"$VERSION_FEATURE([\.+-].*)?\""`]
@@ -574,8 +587,12 @@ AC_DEFUN([BOOTJDK_SETUP_BUILD_JDK],
fi
fi
# Since these tools do not yet exist, we cannot use UTIL_FIXUP_EXECUTABLE to
# detect the need of fixpath
JMOD="$BUILD_JDK/bin/jmod"
UTIL_ADD_FIXPATH(JMOD)
JLINK="$BUILD_JDK/bin/jlink"
UTIL_ADD_FIXPATH(JLINK)
AC_SUBST(JMOD)
AC_SUBST(JLINK)

View File

@@ -28,14 +28,6 @@
# First include the real base spec.gmk file
include @SPEC@
# Check that the user did not try to specify a different java to use for compiling.
# On windows we need to account for fixpath being first word.
ifeq ($(firstword $(JAVA)),$(FIXPATH))
JAVA_EXEC_POS=2
else
JAVA_EXEC_POS=1
endif
# Override specific values to do a boot cycle build
# Use a different Boot JDK
@@ -47,10 +39,9 @@ OUTPUTDIR:=$(OLD_OUTPUTDIR)/bootcycle-build
# No spaces in patsubst to avoid leading space in variable
JAVAC_SERVER_DIR:=$(patsubst $(OLD_OUTPUTDIR)%,$(OUTPUTDIR)%,$(JAVAC_SERVER_DIR))
JAVA_CMD:=$(BOOT_JDK)/bin/java
JAVAC_CMD:=$(BOOT_JDK)/bin/javac
JAR_CMD:=$(BOOT_JDK)/bin/jar
JARSIGNER_CMD:=$(BOOT_JDK)/bin/jarsigner
JAVA_CMD := $(FIXPATH) $(BOOT_JDK)/bin/java
JAVAC_CMD := $(FIXPATH) $(BOOT_JDK)/bin/javac
JAR_CMD := $(FIXPATH) $(BOOT_JDK)/bin/jar
# The bootcycle JVM arguments may differ from the original boot jdk.
JAVA_FLAGS_BIG := @BOOTCYCLE_JVM_ARGS_BIG@
# Any CDS settings generated for the bootjdk are invalid in the bootcycle build.
@@ -58,5 +49,3 @@ JAVA_FLAGS_BIG := @BOOTCYCLE_JVM_ARGS_BIG@
# settings for CDS.
JAVA_FLAGS := $(filter-out -XX:SharedArchiveFile% -Xshare%, $(JAVA_FLAGS))
# Pandoc cannot be used without the jjs plugin, which was removed with Nashorn.
ENABLE_PANDOC := false

View File

@@ -30,6 +30,17 @@
DIR=`dirname $0`
OUT=`. $DIR/autoconf-config.guess`
# Detect C library.
# Use '-gnu' suffix on systems that use glibc.
# Use '-musl' suffix on systems that use the musl libc.
echo $OUT | grep -- -linux- > /dev/null 2> /dev/null
if test $? = 0; then
libc_vendor=`ldd --version 2>&1 | sed -n '1s/.*\(musl\).*/\1/p'`
if [ x"${libc_vendor}" = x"musl" ]; then
OUT=`echo $OUT | sed 's/-gnu/-musl/'`
fi
fi
# Test and fix cygwin on x86_64
echo $OUT | grep 86-pc-cygwin > /dev/null 2> /dev/null
if test $? != 0; then
@@ -45,11 +56,11 @@ if test $? = 0; then
fi
# Test and fix wsl
echo $OUT | grep x86_64-unknown-linux-gnu > /dev/null 2> /dev/null
echo $OUT | grep unknown-linux-gnu > /dev/null 2> /dev/null
if test $? = 0; then
uname -r | grep -i microsoft > /dev/null 2> /dev/null
if test $? = 0; then
OUT="x86_64-pc-wsl"
OUT=`echo $OUT | sed -e 's/unknown-linux-gnu/pc-wsl/'`
fi
fi

View File

@@ -1,6 +1,6 @@
#!/bin/sh
#
# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -29,8 +29,19 @@
DIR=`dirname $0`
if echo $* | grep linux-musl >/dev/null ; then
echo $*
exit
fi
# Allow wsl
if echo $* | grep x86_64-pc-wsl >/dev/null ; then
if echo $* | grep pc-wsl >/dev/null ; then
echo $*
exit
fi
# Allow msys2
if echo $* | grep pc-msys >/dev/null ; then
echo $*
exit
fi
@@ -44,7 +55,7 @@ if ! echo $* | grep '^aarch64-' >/dev/null ; then
fi
while test $# -gt 0 ; do
case $1 in
case $1 in
-- ) # Stop option processing
shift; break ;;
aarch64-* )

View File

@@ -175,7 +175,7 @@ AC_DEFUN([BPERF_SETUP_CCACHE],
if test "x$TOOLCHAIN_PATH" != x; then
PATH=$TOOLCHAIN_PATH:$PATH
fi
UTIL_PATH_PROGS(CCACHE, ccache)
UTIL_LOOKUP_PROGS(CCACHE, ccache)
PATH="$OLD_PATH"
AC_MSG_CHECKING([if ccache is available])

View File

@@ -54,11 +54,13 @@ IMAGES_OUTPUTDIR := $(patsubst $(OUTPUTDIR)%,$(BUILDJDK_OUTPUTDIR)%,$(IMAGES_OUT
OPENJDK_BUILD_CPU_LEGACY := @OPENJDK_BUILD_CPU_LEGACY@
OPENJDK_BUILD_CPU_LEGACY_LIB := @OPENJDK_BUILD_CPU_LEGACY_LIB@
OPENJDK_BUILD_LIBC := @OPENJDK_BUILD_LIBC@
OPENJDK_TARGET_CPU := @OPENJDK_BUILD_CPU@
OPENJDK_TARGET_CPU_ARCH := @OPENJDK_BUILD_CPU_ARCH@
OPENJDK_TARGET_CPU_BITS := @OPENJDK_BUILD_CPU_BITS@
OPENJDK_TARGET_CPU_ENDIAN := @OPENJDK_BUILD_CPU_ENDIAN@
OPENJDK_TARGET_CPU_LEGACY := @OPENJDK_BUILD_CPU_LEGACY@
OPENJDK_TARGET_LIBC := @OPENJDK_BUILD_LIBC@
OPENJDK_TARGET_OS_INCLUDE_SUBDIR := @OPENJDK_BUILD_OS_INCLUDE_SUBDIR@
HOTSPOT_TARGET_OS := @HOTSPOT_BUILD_OS@
@@ -66,6 +68,7 @@ HOTSPOT_TARGET_OS_TYPE := @HOTSPOT_BUILD_OS_TYPE@
HOTSPOT_TARGET_CPU := @HOTSPOT_BUILD_CPU@
HOTSPOT_TARGET_CPU_ARCH := @HOTSPOT_BUILD_CPU_ARCH@
HOTSPOT_TARGET_CPU_DEFINE := @HOTSPOT_BUILD_CPU_DEFINE@
HOTSPOT_TARGET_LIBC := @HOTSPOT_BUILD_LIBC@
CFLAGS_JDKLIB := @OPENJDK_BUILD_CFLAGS_JDKLIB@
CXXFLAGS_JDKLIB := @OPENJDK_BUILD_CXXFLAGS_JDKLIB@

View File

@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2012, 2016, 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
@@ -43,7 +43,7 @@ export CMP="@CMP@"
export CP="@CP@"
export CUT="@CUT@"
export DIFF="@DIFF@"
export DUMPBIN="@FIXPATH@ @DUMPBIN@"
export DUMPBIN="@DUMPBIN@"
export EXPR="@EXPR@"
export FILE="@FILE@"
export FIND="@FIND@"
@@ -53,7 +53,6 @@ export LDD="@LDD@"
export LN="@LN@"
export MKDIR="@MKDIR@"
export MV="@MV@"
export NAWK="@NAWK@"
export NM="@GNM@"
export OBJDUMP="@OBJDUMP@"
export OTOOL="@OTOOL@"
@@ -87,12 +86,10 @@ else
fi
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
if [ "$OPENJDK_BUILD_OS_ENV" = "windows.wsl" ]; then
export FIXPATH_PATH="@VS_PATH_WINDOWS@"
export WSLENV="$WSLENV:FIXPATH_PATH:DEBUG_FIXPATH"
else
export PATH="@VS_PATH@"
if [[ $OPENJDK_BUILD_OS_ENV =~ ^windows.wsl ]]; then
export WSLENV=PATH/l
fi
export PATH="$PATH:@TOOLCHAIN_PATH@"
fi
export HOTSPOT_BUILD_TIME="@HOTSPOT_BUILD_TIME@"

View File

@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -49,7 +49,7 @@ export LC_ALL=C
if test "x$CUSTOM_CONFIG_DIR" != x; then
custom_hook=$CUSTOM_CONFIG_DIR/custom-hook.m4
if test ! -e $custom_hook; then
echo "CUSTOM_CONFIG_DIR not pointing to a proper custom config dir."
echo "CUSTOM_CONFIG_DIR ($CUSTOM_CONFIG_DIR) not pointing to a proper custom config dir."
echo "Error: Cannot continue" 1>&2
exit 1
fi
@@ -78,11 +78,12 @@ generated_script="$build_support_dir/generated-configure.sh"
###
autoconf_missing_help() {
APT_GET="`which apt-get 2> /dev/null | grep -v '^no apt-get in'`"
YUM="`which yum 2> /dev/null | grep -v '^no yum in'`"
BREW="`which brew 2> /dev/null | grep -v '^no brew in'`"
ZYPPER="`which zypper 2> /dev/null | grep -v '^no zypper in'`"
CYGWIN="`which cygpath 2> /dev/null | grep -v '^no cygpath in'`"
APT_GET="`type -p apt-get 2> /dev/null`"
YUM="`type -p yum 2> /dev/null`"
BREW="`type -p brew 2> /dev/null`"
ZYPPER="`type -p zypper 2> /dev/null`"
CYGWIN="`type -p cygpath 2> /dev/null`"
UNAMEOUT="`uname 2> /dev/null`"
if test "x$ZYPPER" != x; then
PKGHANDLER_COMMAND="sudo zypper install autoconf"
@@ -92,6 +93,8 @@ autoconf_missing_help() {
PKGHANDLER_COMMAND="sudo yum install autoconf"
elif test "x$BREW" != x; then
PKGHANDLER_COMMAND="brew install autoconf"
elif test "x$UNAMEOUT" == xAIX; then
echo "You might be able to fix this by installing autoconf from the 'AIX Toolbox for Linux Applications' (or compile it from the sources)."
elif test "x$CYGWIN" != x; then
PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P autoconf )"
fi
@@ -111,10 +114,10 @@ generate_configure_script() {
exit 1
fi
else
AUTOCONF="`which autoconf 2> /dev/null | grep -v '^no autoconf in'`"
AUTOCONF="`type -p autoconf 2> /dev/null`"
if test "x$AUTOCONF" = x; then
echo
echo "Autoconf is not found on the PATH, and AUTOCONF is not set."
echo "Autoconf is not found on the PATH ($PATH), and AUTOCONF is not set."
echo "You need autoconf to be able to generate a runnable configure script."
autoconf_missing_help
echo "Error: Cannot find autoconf" 1>&2

View File

@@ -106,6 +106,8 @@ BASIC_SETUP_DEVKIT
# To properly create a configuration name, we need to have the OpenJDK target
# and options (variants and debug level) parsed.
BASIC_SETUP_OUTPUT_DIR
# After we have the output dir we can finalize the fixpath wrapper
BASIC_WINDOWS_FINALIZE_FIXPATH
# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
HELP_SETUP_DEPENDENCY_HELP
@@ -203,7 +205,8 @@ FLAGS_POST_TOOLCHAIN
PLATFORM_SETUP_OPENJDK_TARGET_BITS
PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS
# Configure flags for the tools
# Configure flags for the tools. Need to know if we should build reproducible.
JDKOPT_SETUP_REPRODUCIBLE_BUILD
FLAGS_SETUP_FLAGS
# Setup debug symbols (need objcopy from the toolchain for that)
@@ -219,9 +222,6 @@ JDKOPT_SETUP_ADDRESS_SANITIZER
#
###############################################################################
# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
BASIC_COMPILE_FIXPATH
LIB_DETERMINE_DEPENDENCIES
LIB_SETUP_LIBRARIES
@@ -242,13 +242,11 @@ HOTSPOT_SETUP_MISC
#
###############################################################################
JDKOPT_DETECT_INTREE_EC
JDKOPT_ENABLE_DISABLE_FAILURE_HANDLER
JDKOPT_ENABLE_DISABLE_GENERATE_CLASSLIST
JDKOPT_EXCLUDE_TRANSLATIONS
JDKOPT_ENABLE_DISABLE_MANPAGES
JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE
JDKOPT_SETUP_REPRODUCIBLE_BUILD
###############################################################################
#
@@ -295,6 +293,7 @@ BASIC_CHECK_LEFTOVER_OVERRIDDEN
CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
# Create the actual output files. Now the main work of configure is done.
BASIC_WINDOWS_FINALIZE
AC_OUTPUT
# After AC_OUTPUT, we need to do final work

View File

@@ -130,14 +130,20 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS],
case "${TOOLCHAIN_TYPE}" in
microsoft)
DISABLE_WARNING_PREFIX="-wd"
BUILD_CC_DISABLE_WARNING_PREFIX="-wd"
CFLAGS_WARNINGS_ARE_ERRORS="-WX"
WARNINGS_ENABLE_ALL="-W3"
DISABLED_WARNINGS="4800"
if test "x$TOOLCHAIN_VERSION" = x2017; then
# VS2017 incorrectly triggers this warning for constexpr
DISABLED_WARNINGS+=" 4307"
fi
;;
gcc)
DISABLE_WARNING_PREFIX="-Wno-"
BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
# Additional warnings that are not activated by -Wall and -Wextra
@@ -149,7 +155,6 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS],
WARNINGS_ENABLE_ALL_CXXFLAGS="$WARNINGS_ENABLE_ALL_CFLAGS $WARNINGS_ENABLE_ADDITIONAL_CXX"
DISABLED_WARNINGS="unused-parameter unused"
BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
;;
clang)
@@ -227,8 +232,14 @@ AC_DEFUN([FLAGS_SETUP_OPTIMIZATION],
# -D_FORTIFY_SOURCE=2 hardening option needs optimization (at least -O1) enabled
# set for lower O-levels -U_FORTIFY_SOURCE to overwrite previous settings
if test "x$OPENJDK_TARGET_OS" = xlinux -a "x$DEBUG_LEVEL" = "xfastdebug"; then
ENABLE_FORTIFY_CFLAGS="-D_FORTIFY_SOURCE=2"
DISABLE_FORTIFY_CFLAGS="-U_FORTIFY_SOURCE"
# ASan doesn't work well with _FORTIFY_SOURCE
# See https://github.com/google/sanitizers/wiki/AddressSanitizer#faq
if test "x$ASAN_ENABLED" = xyes; then
ENABLE_FORTIFY_CFLAGS="${DISABLE_FORTIFY_CFLAGS}"
else
ENABLE_FORTIFY_CFLAGS="-D_FORTIFY_SOURCE=2"
fi
C_O_FLAG_HIGHEST_JVM="${C_O_FLAG_HIGHEST_JVM} ${ENABLE_FORTIFY_CFLAGS}"
C_O_FLAG_HIGHEST="${C_O_FLAG_HIGHEST} ${ENABLE_FORTIFY_CFLAGS}"
C_O_FLAG_HI="${C_O_FLAG_HI} ${ENABLE_FORTIFY_CFLAGS}"
@@ -512,6 +523,18 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
fi
TOOLCHAIN_CFLAGS_JDK_CONLY="$LANGSTD_CFLAGS $TOOLCHAIN_CFLAGS_JDK_CONLY"
# CXXFLAGS C++ language level for all of JDK, including Hotspot.
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang || test "x$TOOLCHAIN_TYPE" = xxlc; then
LANGSTD_CXXFLAGS="-std=c++14"
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
LANGSTD_CXXFLAGS="-std:c++14"
else
AC_MSG_ERROR([Don't know how to enable C++14 for this toolchain])
fi
TOOLCHAIN_CFLAGS_JDK_CXXONLY="$TOOLCHAIN_CFLAGS_JDK_CXXONLY $LANGSTD_CXXFLAGS"
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM $LANGSTD_CXXFLAGS"
ADLC_LANGSTD_CXXFLAGS="$LANGSTD_CXXFLAGS"
# CFLAGS WARNINGS STUFF
# Set JVM_CFLAGS warning handling
if test "x$TOOLCHAIN_TYPE" = xgcc; then
@@ -542,6 +565,11 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
fi
fi
OS_CFLAGS="$OS_CFLAGS -DLIBC=$OPENJDK_TARGET_LIBC"
if test "x$OPENJDK_TARGET_LIBC" = xmusl; then
OS_CFLAGS="$OS_CFLAGS -DMUSL_LIBC"
fi
# Where does this really belong??
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
PICFLAG="-fPIC"
@@ -636,21 +664,17 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
$1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -DARCH='\"$FLAGS_CPU_LEGACY\"' \
-D$FLAGS_CPU_LEGACY"
if test "x$FLAGS_CPU_BITS" = x64; then
# -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
# unpack200.exe.
if test "x$FLAGS_OS" = xlinux || test "x$FLAGS_OS" = xmacosx; then
$1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -D_LP64=1"
fi
if test "x$FLAGS_OS" != xaix; then
# xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
$1_DEFINES_CPU_JVM="${$1_DEFINES_CPU_JVM} -D_LP64=1"
fi
if test "x$FLAGS_CPU_BITS" = x64 && test "x$FLAGS_OS" != xaix; then
# xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
$1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -D_LP64=1"
$1_DEFINES_CPU_JVM="${$1_DEFINES_CPU_JVM} -D_LP64=1"
fi
# toolchain dependend, per-cpu
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
if test "x$FLAGS_CPU" = xx86_64; then
if test "x$FLAGS_CPU" = xaarch64; then
$1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -D_ARM64_ -Darm64"
elif test "x$FLAGS_CPU" = xx86_64; then
$1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -D_AMD64_ -Damd64"
else
$1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -D_X86_ -Dx86"
@@ -694,13 +718,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
$1_CFLAGS_CPU_JDK="${$1_CFLAGS_CPU_JDK} -fno-omit-frame-pointer"
fi
$1_CXXSTD_CXXFLAG="-std=gnu++98"
FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${$1_CXXSTD_CXXFLAG}],
PREFIX: $3, IF_FALSE: [$1_CXXSTD_CXXFLAG=""])
$1_TOOLCHAIN_CFLAGS_JDK_CXXONLY="${$1_CXXSTD_CXXFLAG}"
$1_TOOLCHAIN_CFLAGS_JVM="${$1_TOOLCHAIN_CFLAGS_JVM} ${$1_CXXSTD_CXXFLAG}"
$2ADLC_CXXFLAG="${$1_CXXSTD_CXXFLAG}"
elif test "x$TOOLCHAIN_TYPE" = xclang; then
if test "x$FLAGS_OS" = xlinux; then
# ppc test not really needed for clang
@@ -734,6 +751,18 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
$1_WARNING_CFLAGS_JVM="-Wno-format-zero-length -Wtype-limits -Wuninitialized"
fi
if test "x$TOOLCHAIN_TYPE" = xmicrosoft && test "x$ENABLE_REPRODUCIBLE_BUILD" = xtrue; then
# Enabling deterministic creates warnings if __DATE__ or __TIME__ are
# used, and since we are, silence that warning.
REPRODUCIBLE_CFLAGS="-experimental:deterministic -wd5048"
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${REPRODUCIBLE_CFLAGS}],
PREFIX: $3,
IF_FALSE: [
REPRODUCIBLE_CFLAGS=
]
)
fi
# Prevent the __FILE__ macro from generating absolute paths into the built
# binaries. Depending on toolchain, different mitigations are possible.
# * GCC and Clang of new enough versions have -fmacro-prefix-map.
@@ -752,6 +781,29 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
FILE_MACRO_CFLAGS=
]
)
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft &&
test "x$ENABLE_REPRODUCIBLE_BUILD" = xtrue; then
# There is a known issue with the pathmap if the mapping is made to the
# empty string. Add a minimal string "s" as prefix to work around this.
workspace_root_win=`$FIXPATH_BASE print "${WORKSPACE_ROOT%/}"`
# PATHMAP_FLAGS is also added to LDFLAGS in flags-ldflags.m4.
PATHMAP_FLAGS="-pathmap:${workspace_root_win//\//\\\\}=s \
-pathmap:${workspace_root_win}=s"
FILE_MACRO_CFLAGS="$PATHMAP_FLAGS"
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${FILE_MACRO_CFLAGS}],
PREFIX: $3,
IF_FALSE: [
PATHMAP_FLAGS=
FILE_MACRO_CFLAGS=
]
)
fi
AC_MSG_CHECKING([how to prevent absolute paths in output])
if test "x$FILE_MACRO_CFLAGS" != x; then
AC_MSG_RESULT([using compiler options])
else
AC_MSG_RESULT([using relative paths])
fi
fi
AC_SUBST(FILE_MACRO_CFLAGS)
@@ -760,12 +812,13 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
CFLAGS_JVM_COMMON="$ALWAYS_CFLAGS_JVM $ALWAYS_DEFINES_JVM \
$TOOLCHAIN_CFLAGS_JVM ${$1_TOOLCHAIN_CFLAGS_JVM} \
$OS_CFLAGS $OS_CFLAGS_JVM $CFLAGS_OS_DEF_JVM $DEBUG_CFLAGS_JVM \
$WARNING_CFLAGS $WARNING_CFLAGS_JVM $JVM_PICFLAG $FILE_MACRO_CFLAGS"
$WARNING_CFLAGS $WARNING_CFLAGS_JVM $JVM_PICFLAG $FILE_MACRO_CFLAGS \
$REPRODUCIBLE_CFLAGS"
CFLAGS_JDK_COMMON="$ALWAYS_CFLAGS_JDK $ALWAYS_DEFINES_JDK $TOOLCHAIN_CFLAGS_JDK \
$OS_CFLAGS $CFLAGS_OS_DEF_JDK $DEBUG_CFLAGS_JDK $DEBUG_OPTIONS_FLAGS_JDK \
$WARNING_CFLAGS $WARNING_CFLAGS_JDK $DEBUG_SYMBOLS_CFLAGS_JDK \
$FILE_MACRO_CFLAGS"
$FILE_MACRO_CFLAGS $REPRODUCIBLE_CFLAGS"
# Use ${$2EXTRA_CFLAGS} to block EXTRA_CFLAGS to be added to build flags.
# (Currently we don't have any OPENJDK_BUILD_EXTRA_CFLAGS, but that might
@@ -795,7 +848,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
AC_SUBST($2CFLAGS_JDKEXE)
AC_SUBST($2CXXFLAGS_JDKLIB)
AC_SUBST($2CXXFLAGS_JDKEXE)
AC_SUBST($2ADLC_CXXFLAG)
AC_SUBST($2ADLC_LANGSTD_CXXFLAGS)
COMPILER_FP_CONTRACT_OFF_FLAG="-ffp-contract=off"
# Check that the compiler supports -ffp-contract=off flag

View File

@@ -53,6 +53,7 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS],
LDFLAGS_TESTEXE="${TARGET_LDFLAGS_JDK_LIBPATH}"
AC_SUBST(LDFLAGS_TESTEXE)
AC_SUBST(ADLC_LDFLAGS)
])
################################################################################
@@ -65,11 +66,11 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
# Add -z,defs, to forbid undefined symbols in object files.
# add -z,relro (mark relocations read only) for all libs
# add -z,now ("full relro" - more of the Global Offset Table GOT is marked read only)
BASIC_LDFLAGS="-Wl,--hash-style=gnu -Wl,-z,defs -Wl,-z,relro -Wl,-z,now"
BASIC_LDFLAGS="-Wl,-z,defs -Wl,-z,relro -Wl,-z,now"
# Linux : remove unused code+data in link step
if test "x$ENABLE_LINKTIME_GC" = xtrue; then
if test "x$OPENJDK_TARGET_CPU" = xs390x; then
BASIC_LDFLAGS="$BASIC_LDFLAGS -Wl,--gc-sections -Wl,--print-gc-sections"
BASIC_LDFLAGS="$BASIC_LDFLAGS -Wl,--gc-sections"
else
BASIC_LDFLAGS_JDK_ONLY="$BASIC_LDFLAGS_JDK_ONLY -Wl,--gc-sections"
fi
@@ -105,7 +106,7 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
# Assume clang or gcc.
# FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
OS_LDFLAGS_JVM_ONLY="-Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
OS_LDFLAGS_JDK_ONLY="-mmacosx-version-min=$MACOSX_VERSION_MIN"
OS_LDFLAGS="-mmacosx-version-min=$MACOSX_VERSION_MIN"
fi
fi
@@ -136,9 +137,17 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
fi
fi
if test "x$ENABLE_REPRODUCIBLE_BUILD" = "xtrue"; then
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
REPRODUCIBLE_LDFLAGS="-experimental:deterministic"
fi
fi
if test "x$ALLOW_ABSOLUTE_PATHS_IN_OUTPUT" = "xfalse"; then
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
BASIC_LDFLAGS="$BASIC_LDFLAGS -pdbaltpath:%_PDB%"
# PATHMAP_FLAGS is setup in flags-cflags.m4.
FILE_MACRO_LDFLAGS="${PATHMAP_FLAGS}"
fi
fi
@@ -163,21 +172,30 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_CPU_DEP],
$1_CPU_LDFLAGS="$ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
fi
# MIPS ABI does not support GNU hash style
if test "x${OPENJDK_$1_CPU}" = xmips ||
test "x${OPENJDK_$1_CPU}" = xmipsel ||
test "x${OPENJDK_$1_CPU}" = xmips64 ||
test "x${OPENJDK_$1_CPU}" = xmips64el; then
$1_CPU_LDFLAGS="${$1_CPU_LDFLAGS} -Wl,--hash-style=sysv"
else
$1_CPU_LDFLAGS="${$1_CPU_LDFLAGS} -Wl,--hash-style=gnu"
fi
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
if test "x${OPENJDK_$1_CPU_BITS}" = "x32"; then
$1_CPU_EXECUTABLE_LDFLAGS="-stack:327680"
elif test "x${OPENJDK_$1_CPU_BITS}" = "x64"; then
$1_CPU_EXECUTABLE_LDFLAGS="-stack:1048576"
fi
if test "x${OPENJDK_$1_CPU}" = "xx86"; then
$1_CPU_LDFLAGS="-safeseh"
# NOTE: Old build added -machine. Probably not needed.
$1_CPU_LDFLAGS_JVM_ONLY="-machine:I386"
$1_CPU_EXECUTABLE_LDFLAGS="-stack:327680"
else
$1_CPU_LDFLAGS_JVM_ONLY="-machine:AMD64"
$1_CPU_EXECUTABLE_LDFLAGS="-stack:1048576"
fi
fi
# JVM_VARIANT_PATH depends on if this is build or target...
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
$1_LDFLAGS_JDK_LIBPATH="-libpath:${OUTPUTDIR}/support/modules_libs/java.base"
$1_LDFLAGS_JDK_LIBPATH="-libpath:\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
else
$1_LDFLAGS_JDK_LIBPATH="-L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base \
-L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/${$1_JVM_VARIANT_PATH}"
@@ -185,15 +203,17 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_CPU_DEP],
# Export variables according to old definitions, prefix with $2 if present.
LDFLAGS_JDK_COMMON="$BASIC_LDFLAGS $BASIC_LDFLAGS_JDK_ONLY \
$OS_LDFLAGS_JDK_ONLY $DEBUGLEVEL_LDFLAGS_JDK_ONLY ${$2EXTRA_LDFLAGS}"
$OS_LDFLAGS $DEBUGLEVEL_LDFLAGS_JDK_ONLY ${$2EXTRA_LDFLAGS}"
$2LDFLAGS_JDKLIB="$LDFLAGS_JDK_COMMON $BASIC_LDFLAGS_JDK_LIB_ONLY \
${$1_LDFLAGS_JDK_LIBPATH} $SHARED_LIBRARY_FLAGS"
${$1_LDFLAGS_JDK_LIBPATH} $SHARED_LIBRARY_FLAGS \
$REPRODUCIBLE_LDFLAGS $FILE_MACRO_LDFLAGS"
$2LDFLAGS_JDKEXE="$LDFLAGS_JDK_COMMON $EXECUTABLE_LDFLAGS \
${$1_CPU_EXECUTABLE_LDFLAGS}"
${$1_CPU_EXECUTABLE_LDFLAGS} $REPRODUCIBLE_LDFLAGS $FILE_MACRO_LDFLAGS"
$2JVM_LDFLAGS="$BASIC_LDFLAGS $BASIC_LDFLAGS_JVM_ONLY $OS_LDFLAGS_JVM_ONLY \
$2JVM_LDFLAGS="$BASIC_LDFLAGS $BASIC_LDFLAGS_JVM_ONLY $OS_LDFLAGS $OS_LDFLAGS_JVM_ONLY \
$DEBUGLEVEL_LDFLAGS $DEBUGLEVEL_LDFLAGS_JVM_ONLY $BASIC_LDFLAGS_ONLYCXX \
${$1_CPU_LDFLAGS} ${$1_CPU_LDFLAGS_JVM_ONLY} ${$2EXTRA_LDFLAGS}"
${$1_CPU_LDFLAGS} ${$1_CPU_LDFLAGS_JVM_ONLY} ${$2EXTRA_LDFLAGS} \
$REPRODUCIBLE_LDFLAGS $FILE_MACRO_LDFLAGS"
AC_SUBST($2LDFLAGS_JDKLIB)
AC_SUBST($2LDFLAGS_JDKEXE)

View File

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

View File

@@ -218,10 +218,20 @@ AC_DEFUN([FLAGS_SETUP_SYSROOT_FLAGS],
# We also need -iframework<path>/System/Library/Frameworks
$1SYSROOT_CFLAGS="[$]$1SYSROOT_CFLAGS -iframework [$]$1SYSROOT/System/Library/Frameworks"
$1SYSROOT_LDFLAGS="[$]$1SYSROOT_LDFLAGS -iframework [$]$1SYSROOT/System/Library/Frameworks"
# These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
# set this here so it doesn't have to be peppered throughout the forest
$1SYSROOT_CFLAGS="[$]$1SYSROOT_CFLAGS -F [$]$1SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
$1SYSROOT_LDFLAGS="[$]$1SYSROOT_LDFLAGS -F [$]$1SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
if test -d "[$]$1SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks" ; then
# These always need to be set on macOS 10.X, or we can't find the frameworks embedded in JavaVM.framework
# set this here so it doesn't have to be peppered throughout the forest
$1SYSROOT_CFLAGS="[$]$1SYSROOT_CFLAGS -F [$]$1SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
$1SYSROOT_LDFLAGS="[$]$1SYSROOT_LDFLAGS -F [$]$1SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
fi
fi
# For the microsoft toolchain, we need to get the SYSROOT flags from the
# Visual Studio environment. Currently we cannot handle this as a separate
# build toolchain.
if test "x$1" = x && test "x$OPENJDK_BUILD_OS" = "xwindows" \
&& test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
fi
AC_SUBST($1SYSROOT_CFLAGS)
@@ -232,6 +242,7 @@ AC_DEFUN_ONCE([FLAGS_PRE_TOOLCHAIN],
[
# We should always include user supplied flags
FLAGS_SETUP_USER_SUPPLIED_FLAGS
# The sysroot flags are needed for configure to be able to run the compilers
FLAGS_SETUP_SYSROOT_FLAGS
@@ -256,10 +267,6 @@ AC_DEFUN_ONCE([FLAGS_PRE_TOOLCHAIN],
GLOBAL_LDFLAGS="$MACHINE_FLAG $SYSROOT_LDFLAGS $USER_LDFLAGS"
# FIXME: Don't really know how to do with this, but this was the old behavior
GLOBAL_CPPFLAGS="$SYSROOT_CFLAGS"
AC_SUBST(GLOBAL_CFLAGS)
AC_SUBST(GLOBAL_CXXFLAGS)
AC_SUBST(GLOBAL_LDFLAGS)
AC_SUBST(GLOBAL_CPPFLAGS)
# FIXME: For compatilibity, export this as EXTRA_CFLAGS for now.
EXTRA_CFLAGS="$MACHINE_FLAG $USER_CFLAGS"
@@ -278,6 +285,14 @@ AC_DEFUN_ONCE([FLAGS_PRE_TOOLCHAIN],
CXXFLAGS="$GLOBAL_CXXFLAGS"
LDFLAGS="$GLOBAL_LDFLAGS"
CPPFLAGS="$GLOBAL_CPPFLAGS"
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
# When autoconf sends both compiler and linker flags to cl.exe at the same
# time, linker flags must be last at the command line. Achieve this by
# moving them to LIBS.
LIBS="$LIBS -link $LDFLAGS"
LDFLAGS=""
fi
])
AC_DEFUN([FLAGS_SETUP_TOOLCHAIN_CONTROL],
@@ -368,9 +383,6 @@ AC_DEFUN_ONCE([FLAGS_POST_TOOLCHAIN],
BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
fi
fi
AC_SUBST(BUILD_SYSROOT_CFLAGS)
AC_SUBST(BUILD_SYSROOT_LDFLAGS)
])
AC_DEFUN([FLAGS_SETUP_FLAGS],

View File

@@ -25,7 +25,7 @@
AC_DEFUN_ONCE([HELP_SETUP_DEPENDENCY_HELP],
[
AC_CHECK_PROGS(PKGHANDLER, zypper apt-get yum brew port pkgutil pkgadd)
UTIL_LOOKUP_PROGS(PKGHANDLER, zypper apt-get yum brew port pkgutil pkgadd pacman)
])
AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
@@ -38,8 +38,6 @@ AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
HELP_MSG="OpenJDK distributions are available at http://jdk.java.net/."
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
cygwin_help $MISSING_DEPENDENCY
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
msys_help $MISSING_DEPENDENCY
else
PKGHANDLER_COMMAND=
@@ -58,6 +56,8 @@ AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
pkgadd_help $MISSING_DEPENDENCY ;;
zypper)
zypper_help $MISSING_DEPENDENCY ;;
pacman)
pacman_help $MISSING_DEPENDENCY ;;
esac
if test "x$PKGHANDLER_COMMAND" != x; then
@@ -83,10 +83,6 @@ cygwin_help() {
esac
}
msys_help() {
PKGHANDLER_COMMAND=""
}
apt_help() {
case $1 in
reduced)
@@ -101,6 +97,8 @@ apt_help() {
PKGHANDLER_COMMAND="sudo apt-get install libfontconfig1-dev" ;;
freetype)
PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
harfbuzz)
PKGHANDLER_COMMAND="sudo apt-get install libharfbuzz-dev" ;;
ffi)
PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
x11)
@@ -124,6 +122,8 @@ zypper_help() {
PKGHANDLER_COMMAND="sudo zypper install fontconfig-devel" ;;
freetype)
PKGHANDLER_COMMAND="sudo zypper install freetype-devel" ;;
harfbuzz)
PKGHANDLER_COMMAND="sudo zypper install harfbuzz-devel" ;;
x11)
PKGHANDLER_COMMAND="sudo zypper install libX11-devel libXext-devel libXrender-devel libXrandr-devel libXtst-devel libXt-devel libXi-devel" ;;
ccache)
@@ -143,6 +143,8 @@ yum_help() {
PKGHANDLER_COMMAND="sudo yum install fontconfig-devel" ;;
freetype)
PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
harfbuzz)
PKGHANDLER_COMMAND="sudo yum install harfbuzz-devel" ;;
x11)
PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXrandr-devel libXi-devel" ;;
ccache)
@@ -159,6 +161,17 @@ brew_help() {
esac
}
pacman_help() {
case $1 in
unzip)
PKGHANDLER_COMMAND="sudo pacman -S unzip" ;;
zip)
PKGHANDLER_COMMAND="sudo pacman -S zip" ;;
make)
PKGHANDLER_COMMAND="sudo pacman -S make" ;;
esac
}
port_help() {
PKGHANDLER_COMMAND=""
}
@@ -232,6 +245,7 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
printf "\n"
printf "Configuration summary:\n"
printf "* Name: $CONF_NAME\n"
printf "* Debug level: $DEBUG_LEVEL\n"
printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
printf "* JVM variants: $JVM_VARIANTS\n"
@@ -250,16 +264,13 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
printf "\n"
printf "Tools summary:\n"
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION. Windows version $WINDOWS_VERSION"
if test "x$WINDOWS_ENV_ROOT_PATH" != "x"; then
printf ". Root at $WINDOWS_ENV_ROOT_PATH"
fi
printf "\n"
printf "* Environment: %s version %s; windows version %s; prefix \"%s\"; root \"%s\"\n" \
"$WINENV_VENDOR" "$WINENV_VERSION" "$WINDOWS_VERSION" "$WINENV_PREFIX" "$WINENV_ROOT"
fi
printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
printf "* Toolchain: $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
printf "* C Compiler: Version $CC_VERSION_NUMBER (at $CC)\n"
printf "* C++ Compiler: Version $CXX_VERSION_NUMBER (at $CXX)\n"
printf "* C Compiler: Version $CC_VERSION_NUMBER (at ${CC#"$FIXPATH "})\n"
printf "* C++ Compiler: Version $CXX_VERSION_NUMBER (at ${CXX#"$FIXPATH "})\n"
printf "\n"
printf "Build performance summary:\n"

View File

@@ -228,23 +228,6 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
])
###############################################################################
#
# Enable or disable the elliptic curve crypto implementation
#
AC_DEFUN_ONCE([JDKOPT_DETECT_INTREE_EC],
[
AC_MSG_CHECKING([if elliptic curve crypto implementation is present])
if test -d "${TOPDIR}/src/jdk.crypto.ec/share/native/libsunec/impl"; then
ENABLE_INTREE_EC=true
AC_MSG_RESULT([yes])
else
ENABLE_INTREE_EC=false
AC_MSG_RESULT([no])
fi
AC_SUBST(ENABLE_INTREE_EC)
])
AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
[
@@ -405,9 +388,9 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_CODE_COVERAGE],
UTIL_FIXUP_PATH(JCOV_HOME)
if test "x$with_jcov_input_jdk" != "x" ; then
JCOV_INPUT_JDK="$with_jcov_input_jdk"
if test ! -f "$JCOV_INPUT_JDK/bin/java$EXE_SUFFIX"; then
if test ! -f "$JCOV_INPUT_JDK/bin/java" && test ! -f "$JCOV_INPUT_JDK/bin/java.exe"; then
AC_MSG_RESULT([fail])
AC_MSG_ERROR([Invalid JDK bundle: "$JCOV_INPUT_JDK/bin/java$EXE_SUFFIX" does not exist])
AC_MSG_ERROR([Invalid JDK bundle: "$JCOV_INPUT_JDK/bin/java" does not exist])
fi
UTIL_FIXUP_PATH(JCOV_INPUT_JDK)
fi
@@ -440,7 +423,10 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_ADDRESS_SANITIZER],
fi
],
IF_ENABLED: [
ASAN_CFLAGS="-fsanitize=address -fno-omit-frame-pointer"
# ASan is simply incompatible with gcc -Wstringop-truncation. See
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85650
# It's harmless to be suppressed in clang as well.
ASAN_CFLAGS="-fsanitize=address -Wno-stringop-truncation -fno-omit-frame-pointer"
ASAN_LDFLAGS="-fsanitize=address"
JVM_CFLAGS="$JVM_CFLAGS $ASAN_CFLAGS"
JVM_LDFLAGS="$JVM_LDFLAGS $ASAN_LDFLAGS"
@@ -678,10 +664,27 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_REPRODUCIBLE_BUILD],
fi
fi
UTIL_ARG_ENABLE(NAME: reproducible-build, DEFAULT: $with_source_date_present,
REPRODUCIBLE_BUILD_DEFAULT=$with_source_date_present
if test "x$OPENJDK_BUILD_OS" = xwindows && \
test "x$ALLOW_ABSOLUTE_PATHS_IN_OUTPUT" = xfalse; then
# To support banning absolute paths on Windows, we must use the -pathmap
# method, which requires reproducible builds.
REPRODUCIBLE_BUILD_DEFAULT=true
fi
UTIL_ARG_ENABLE(NAME: reproducible-build, DEFAULT: $REPRODUCIBLE_BUILD_DEFAULT,
RESULT: ENABLE_REPRODUCIBLE_BUILD,
DESC: [enable reproducible builds (not yet fully functional)],
DEFAULT_DESC: [enabled if --with-source-date is given])
DEFAULT_DESC: [enabled if --with-source-date is given or on Windows without absolute paths])
if test "x$OPENJDK_BUILD_OS" = xwindows && \
test "x$ALLOW_ABSOLUTE_PATHS_IN_OUTPUT" = xfalse && \
test "x$ENABLE_REPRODUCIBLE_BUILD" = xfalse; then
AC_MSG_NOTICE([On Windows it is not possible to combine --disable-reproducible-builds])
AC_MSG_NOTICE([with --disable-absolute-paths-in-output.])
AC_MSG_ERROR([Cannot continue])
fi
AC_SUBST(SOURCE_DATE)
AC_SUBST(ENABLE_REPRODUCIBLE_BUILD)

View File

@@ -67,34 +67,6 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
AC_SUBST(JDK_RC_PLATFORM_NAME)
AC_SUBST(HOTSPOT_VM_DISTRO)
# Set the MACOSX Bundle Name base
AC_ARG_WITH(macosx-bundle-name-base, [AS_HELP_STRING([--with-macosx-bundle-name-base],
[Set the MacOSX Bundle Name base. This is the base name for calculating MacOSX Bundle Names.
@<:@not specified@:>@])])
if test "x$with_macosx_bundle_name_base" = xyes; then
AC_MSG_ERROR([--with-macosx-bundle-name-base must have a value])
elif [ ! [[ $with_macosx_bundle_name_base =~ ^[[:print:]]*$ ]] ]; then
AC_MSG_ERROR([--with-macosx-bundle-name-base contains non-printing characters: $with_macosx_bundle_name_base])
elif test "x$with_macosx_bundle_name_base" != x; then
# Set MACOSX_BUNDLE_NAME_BASE to the configured value.
MACOSX_BUNDLE_NAME_BASE="$with_macosx_bundle_name_base"
fi
AC_SUBST(MACOSX_BUNDLE_NAME_BASE)
# Set the MACOSX Bundle ID base
AC_ARG_WITH(macosx-bundle-id-base, [AS_HELP_STRING([--with-macosx-bundle-id-base],
[Set the MacOSX Bundle ID base. This is the base ID for calculating MacOSX Bundle IDs.
@<:@not specified@:>@])])
if test "x$with_macosx_bundle_id_base" = xyes; then
AC_MSG_ERROR([--with-macosx-bundle-id-base must have a value])
elif [ ! [[ $with_macosx_bundle_id_base =~ ^[[:print:]]*$ ]] ]; then
AC_MSG_ERROR([--with-macosx-bundle-id-base contains non-printing characters: $with_macosx_bundle_id_base])
elif test "x$with_macosx_bundle_id_base" != x; then
# Set MACOSX_BUNDLE_ID_BASE to the configured value.
MACOSX_BUNDLE_ID_BASE="$with_macosx_bundle_id_base"
fi
AC_SUBST(MACOSX_BUNDLE_ID_BASE)
# Set the JDK RC name
AC_ARG_WITH(jdk-rc-name, [AS_HELP_STRING([--with-jdk-rc-name],
[Set JDK RC name. This is used for FileDescription and ProductName properties
@@ -502,6 +474,60 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
VENDOR_VERSION_STRING="$with_vendor_version_string"
fi
# Set the MACOSX Bundle Name base
AC_ARG_WITH(macosx-bundle-name-base, [AS_HELP_STRING([--with-macosx-bundle-name-base],
[Set the MacOSX Bundle Name base. This is the base name for calculating MacOSX Bundle Names.
@<:@not specified@:>@])])
if test "x$with_macosx_bundle_name_base" = xyes; then
AC_MSG_ERROR([--with-macosx-bundle-name-base must have a value])
elif [ ! [[ $with_macosx_bundle_name_base =~ ^[[:print:]]*$ ]] ]; then
AC_MSG_ERROR([--with-macosx-bundle-name-base contains non-printing characters: $with_macosx_bundle_name_base])
elif test "x$with_macosx_bundle_name_base" != x; then
# Set MACOSX_BUNDLE_NAME_BASE to the configured value.
MACOSX_BUNDLE_NAME_BASE="$with_macosx_bundle_name_base"
fi
AC_SUBST(MACOSX_BUNDLE_NAME_BASE)
# Set the MACOSX Bundle ID base
AC_ARG_WITH(macosx-bundle-id-base, [AS_HELP_STRING([--with-macosx-bundle-id-base],
[Set the MacOSX Bundle ID base. This is the base ID for calculating MacOSX Bundle IDs.
@<:@not specified@:>@])])
if test "x$with_macosx_bundle_id_base" = xyes; then
AC_MSG_ERROR([--with-macosx-bundle-id-base must have a value])
elif [ ! [[ $with_macosx_bundle_id_base =~ ^[[:print:]]*$ ]] ]; then
AC_MSG_ERROR([--with-macosx-bundle-id-base contains non-printing characters: $with_macosx_bundle_id_base])
elif test "x$with_macosx_bundle_id_base" != x; then
# Set MACOSX_BUNDLE_ID_BASE to the configured value.
MACOSX_BUNDLE_ID_BASE="$with_macosx_bundle_id_base"
else
# If using the default value, append the VERSION_PRE if there is one
# to make it possible to tell official builds apart from developer builds
if test "x$VERSION_PRE" != x; then
MACOSX_BUNDLE_ID_BASE="$MACOSX_BUNDLE_ID_BASE-$VERSION_PRE"
fi
fi
AC_SUBST(MACOSX_BUNDLE_ID_BASE)
# Set the MACOSX CFBundleVersion field
AC_ARG_WITH(macosx-bundle-build-version, [AS_HELP_STRING([--with-macosx-bundle-build-version],
[Set the MacOSX Bundle CFBundleVersion field. This key is a machine-readable
string composed of one to three period-separated integers and should represent the
build version. Defaults to the build number.])])
if test "x$with_macosx_bundle_build_version" = xyes; then
AC_MSG_ERROR([--with-macosx-bundle-build-version must have a value])
elif [ ! [[ $with_macosx_bundle_build_version =~ ^[0-9\.]*$ ]] ]; then
AC_MSG_ERROR([--with-macosx-bundle-build-version contains non numbers and periods: $with_macosx_bundle_build_version])
elif test "x$with_macosx_bundle_build_version" != x; then
MACOSX_BUNDLE_BUILD_VERSION="$with_macosx_bundle_build_version"
else
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+=".$VERSION_OPT"
fi
fi
AC_SUBST(MACOSX_BUNDLE_BUILD_VERSION)
# We could define --with flags for these, if really needed
VERSION_CLASSFILE_MAJOR="$DEFAULT_VERSION_CLASSFILE_MAJOR"
VERSION_CLASSFILE_MINOR="$DEFAULT_VERSION_CLASSFILE_MINOR"

View File

@@ -159,7 +159,7 @@ AC_DEFUN_ONCE([JVM_FEATURES_PARSE_OPTIONS],
# Likewise, check for deprecated arguments.
m4_foreach(FEATURE, m4_split(jvm_features_deprecated), [
AC_ARG_ENABLE(jvm-feature-FEATURE, AS_HELP_STRING(
[--enable-jvm-feature-FEATURE],
[--enable-jvm-feature-FEATURE],
[Deprecated. Option is kept for backwards compatibility and is ignored]))
m4_define(FEATURE_SHELL, [enable_jvm_feature_]m4_translit(FEATURE, -, _))
@@ -237,8 +237,9 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_AOT],
JVM_FEATURES_CHECK_AVAILABILITY(aot, [
AC_MSG_CHECKING([if platform is supported by AOT])
# AOT is only available where JVMCI is available since it requires JVMCI.
if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then
if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
AC_MSG_RESULT([yes])
elif test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-aarch64"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no, $OPENJDK_TARGET_CPU])
@@ -303,8 +304,9 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_GRAAL],
JVM_FEATURES_CHECK_AVAILABILITY(graal, [
AC_MSG_CHECKING([if platform is supported by Graal])
# Graal is only available where JVMCI is available since it requires JVMCI.
if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
AC_MSG_RESULT([yes])
elif test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no, $OPENJDK_TARGET_CPU])
@@ -336,8 +338,9 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_JVMCI],
[
JVM_FEATURES_CHECK_AVAILABILITY(jvmci, [
AC_MSG_CHECKING([if platform is supported by JVMCI])
if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
AC_MSG_RESULT([yes])
elif test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no, $OPENJDK_TARGET_CPU])
@@ -395,8 +398,14 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_ZGC],
AC_MSG_RESULT([no, $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU])
AVAILABLE=false
fi
elif test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-aarch64"; then
AC_MSG_RESULT([yes])
elif test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then
if test "x$OPENJDK_TARGET_OS" = "xlinux" || \
test "x$OPENJDK_TARGET_OS" = "xwindows"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no, $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU])
AVAILABLE=false
fi
else
AC_MSG_RESULT([no, $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU])
AVAILABLE=false
@@ -467,7 +476,7 @@ AC_DEFUN([JVM_FEATURES_PREPARE_VARIANT],
JVM_FEATURES_VARIANT_UNAVAILABLE="cds minimal zero"
elif test "x$variant" = "xzero"; then
JVM_FEATURES_VARIANT_UNAVAILABLE="aot cds compiler1 compiler2 \
epsilongc g1gc graal jvmci minimal shenandoahgc zgc"
graal jvmci minimal zgc"
else
JVM_FEATURES_VARIANT_UNAVAILABLE="minimal zero"
fi

View File

@@ -40,6 +40,7 @@ AC_DEFUN_ONCE([LIB_SETUP_BUNDLED_LIBS],
LIB_SETUP_LIBPNG
LIB_SETUP_ZLIB
LIB_SETUP_LCMS
LIB_SETUP_HARFBUZZ
])
################################################################################
@@ -263,3 +264,43 @@ AC_DEFUN_ONCE([LIB_SETUP_LCMS],
AC_SUBST(LCMS_CFLAGS)
AC_SUBST(LCMS_LIBS)
])
################################################################################
# Setup harfbuzz
################################################################################
AC_DEFUN_ONCE([LIB_SETUP_HARFBUZZ],
[
AC_ARG_WITH(harfbuzz, [AS_HELP_STRING([--with-harfbuzz],
[use harfbuzz from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
AC_MSG_CHECKING([for which harfbuzz to use])
DEFAULT_HARFBUZZ=bundled
# If user didn't specify, use DEFAULT_HARFBUZZ
if test "x${with_harfbuzz}" = "x"; then
with_harfbuzz=${DEFAULT_HARFBUZZ}
fi
if test "x${with_harfbuzz}" = "xbundled"; then
USE_EXTERNAL_HARFBUZZ=false
HARFBUZZ_CFLAGS=""
HARFBUZZ_LIBS=""
AC_MSG_RESULT([bundled])
elif test "x${with_harfbuzz}" = "xsystem"; then
AC_MSG_RESULT([system])
PKG_CHECK_MODULES([HARFBUZZ], [harfbuzz], [HARFBUZZ_FOUND=yes], [HARFBUZZ_FOUND=no])
if test "x${HARFBUZZ_FOUND}" = "xyes"; then
# PKG_CHECK_MODULES will set HARFBUZZ_CFLAGS and HARFBUZZ_LIBS
USE_EXTERNAL_HARFBUZZ=true
else
HELP_MSG_MISSING_DEPENDENCY([harfbuzz])
AC_MSG_ERROR([--with-harfbuzz=system specified, but no harfbuzz found! $HELP_MSG])
fi
else
AC_MSG_ERROR([Invalid value for --with-harfbuzz: ${with_harfbuzz}, use 'system' or 'bundled'])
fi
AC_SUBST(USE_EXTERNAL_HARFBUZZ)
AC_SUBST(HARFBUZZ_CFLAGS)
AC_SUBST(HARFBUZZ_LIBS)
])

View File

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

View File

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

View File

@@ -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
@@ -122,6 +124,14 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lpthread"
fi
# Libatomic library
# 32-bit MIPS needs fallback library for 8-byte atomic ops
if test "x$OPENJDK_TARGET_OS" = xlinux &&
(test "x$OPENJDK_TARGET_CPU" = xmips ||
test "x$OPENJDK_TARGET_CPU" = xmipsel); then
BASIC_JVM_LIBS="$BASIC_JVM_LIBS -latomic"
fi
# perfstat lib
if test "x$OPENJDK_TARGET_OS" = xaix; then
BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lperfstat"

View File

@@ -206,9 +206,9 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_OS],
VAR_OS=windows
VAR_OS_ENV=windows.wsl
;;
*mingw*)
*msys*)
VAR_OS=windows
VAR_OS_ENV=windows.msys
VAR_OS_ENV=windows.msys2
;;
*aix*)
VAR_OS=aix
@@ -220,6 +220,24 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_OS],
esac
])
# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
# Converts autoconf style OS name to OpenJDK style, into
# VAR_LIBC.
AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_LIBC],
[
case "$1" in
*linux*-musl)
VAR_LIBC=musl
;;
*linux*-gnu)
VAR_LIBC=gnu
;;
*)
VAR_LIBC=default
;;
esac
])
# Expects $host_os $host_cpu $build_os and $build_cpu
# and $with_target_bits to have been setup!
#
@@ -237,9 +255,10 @@ AC_DEFUN([PLATFORM_EXTRACT_TARGET_AND_BUILD],
AC_SUBST(OPENJDK_TARGET_AUTOCONF_NAME)
AC_SUBST(OPENJDK_BUILD_AUTOCONF_NAME)
# Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
# Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU/LIBC variables.
PLATFORM_EXTRACT_VARS_FROM_OS($build_os)
PLATFORM_EXTRACT_VARS_FROM_CPU($build_cpu)
PLATFORM_EXTRACT_VARS_FROM_LIBC($build_os)
# ..and setup our own variables. (Do this explicitly to facilitate searching)
OPENJDK_BUILD_OS="$VAR_OS"
if test "x$VAR_OS_TYPE" != x; then
@@ -256,6 +275,7 @@ AC_DEFUN([PLATFORM_EXTRACT_TARGET_AND_BUILD],
OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
OPENJDK_BUILD_LIBC="$VAR_LIBC"
AC_SUBST(OPENJDK_BUILD_OS)
AC_SUBST(OPENJDK_BUILD_OS_TYPE)
AC_SUBST(OPENJDK_BUILD_OS_ENV)
@@ -263,13 +283,20 @@ AC_DEFUN([PLATFORM_EXTRACT_TARGET_AND_BUILD],
AC_SUBST(OPENJDK_BUILD_CPU_ARCH)
AC_SUBST(OPENJDK_BUILD_CPU_BITS)
AC_SUBST(OPENJDK_BUILD_CPU_ENDIAN)
AC_SUBST(OPENJDK_BUILD_LIBC)
AC_MSG_CHECKING([openjdk-build os-cpu])
AC_MSG_RESULT([$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU])
# Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
if test "x$OPENJDK_BUILD_OS" = "xlinux"; then
AC_MSG_CHECKING([openjdk-build C library])
AC_MSG_RESULT([$OPENJDK_BUILD_LIBC])
fi
# Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU/LIBC variables.
PLATFORM_EXTRACT_VARS_FROM_OS($host_os)
PLATFORM_EXTRACT_VARS_FROM_CPU($host_cpu)
PLATFORM_EXTRACT_VARS_FROM_LIBC($host_os)
# ... and setup our own variables. (Do this explicitly to facilitate searching)
OPENJDK_TARGET_OS="$VAR_OS"
if test "x$VAR_OS_TYPE" != x; then
@@ -287,6 +314,7 @@ AC_DEFUN([PLATFORM_EXTRACT_TARGET_AND_BUILD],
OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
OPENJDK_TARGET_LIBC="$VAR_LIBC"
AC_SUBST(OPENJDK_TARGET_OS)
AC_SUBST(OPENJDK_TARGET_OS_TYPE)
@@ -296,9 +324,15 @@ AC_DEFUN([PLATFORM_EXTRACT_TARGET_AND_BUILD],
AC_SUBST(OPENJDK_TARGET_CPU_ARCH)
AC_SUBST(OPENJDK_TARGET_CPU_BITS)
AC_SUBST(OPENJDK_TARGET_CPU_ENDIAN)
AC_SUBST(OPENJDK_TARGET_LIBC)
AC_MSG_CHECKING([openjdk-target os-cpu])
AC_MSG_RESULT([$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU])
if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
AC_MSG_CHECKING([openjdk-target C library])
AC_MSG_RESULT([$OPENJDK_TARGET_LIBC])
fi
])
# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
@@ -420,7 +454,13 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HELPER],
else
OPENJDK_$1_CPU_BUNDLE="$OPENJDK_$1_CPU"
fi
OPENJDK_$1_BUNDLE_PLATFORM="${OPENJDK_$1_OS_BUNDLE}-${OPENJDK_$1_CPU_BUNDLE}"
OPENJDK_$1_LIBC_BUNDLE=""
if test "x$OPENJDK_$1_LIBC" = "xmusl"; then
OPENJDK_$1_LIBC_BUNDLE="-$OPENJDK_$1_LIBC"
fi
OPENJDK_$1_BUNDLE_PLATFORM="${OPENJDK_$1_OS_BUNDLE}-${OPENJDK_$1_CPU_BUNDLE}${OPENJDK_$1_LIBC_BUNDLE}"
AC_SUBST(OPENJDK_$1_BUNDLE_PLATFORM)
if test "x$COMPILE_TYPE" = "xcross"; then
@@ -493,6 +533,9 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HELPER],
fi
AC_SUBST(HOTSPOT_$1_CPU_DEFINE)
HOTSPOT_$1_LIBC=$OPENJDK_$1_LIBC
AC_SUBST(HOTSPOT_$1_LIBC)
# For historical reasons, the OS include directories have odd names.
OPENJDK_$1_OS_INCLUDE_SUBDIR="$OPENJDK_TARGET_OS"
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
@@ -518,9 +561,11 @@ AC_DEFUN([PLATFORM_SET_RELEASE_FILE_OS_VALUES],
RELEASE_FILE_OS_NAME="AIX"
fi
RELEASE_FILE_OS_ARCH=${OPENJDK_TARGET_CPU}
RELEASE_FILE_LIBC=${OPENJDK_TARGET_LIBC}
AC_SUBST(RELEASE_FILE_OS_NAME)
AC_SUBST(RELEASE_FILE_OS_ARCH)
AC_SUBST(RELEASE_FILE_LIBC)
])
AC_DEFUN([PLATFORM_SET_MODULE_TARGET_OS_VALUES],

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2017, 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
@@ -28,9 +28,6 @@ AC_DEFUN_ONCE([SRCDIRS_SETUP_DIRS],
OUTPUTDIR="$OUTPUTDIR"
AC_SUBST(OUTPUTDIR)
JDK_OUTPUTDIR="$OUTPUTDIR/jdk"
# Where are the sources.
AC_SUBST(TOPDIR)
])
################################################################################

View File

@@ -80,6 +80,8 @@ OPENJDK_TARGET_CPU_ARCH:=@OPENJDK_TARGET_CPU_ARCH@
OPENJDK_TARGET_CPU_BITS:=@OPENJDK_TARGET_CPU_BITS@
OPENJDK_TARGET_CPU_ENDIAN:=@OPENJDK_TARGET_CPU_ENDIAN@
OPENJDK_TARGET_LIBC:=@OPENJDK_TARGET_LIBC@
COMPILE_TYPE:=@COMPILE_TYPE@
# Legacy support
@@ -95,6 +97,8 @@ HOTSPOT_TARGET_CPU := @HOTSPOT_TARGET_CPU@
HOTSPOT_TARGET_CPU_ARCH := @HOTSPOT_TARGET_CPU_ARCH@
HOTSPOT_TARGET_CPU_DEFINE := @HOTSPOT_TARGET_CPU_DEFINE@
HOTSPOT_TARGET_LIBC := @HOTSPOT_TARGET_LIBC@
OPENJDK_TARGET_BUNDLE_PLATFORM:=@OPENJDK_TARGET_BUNDLE_PLATFORM@
JDK_ARCH_ABI_PROP_NAME := @JDK_ARCH_ABI_PROP_NAME@
@@ -109,6 +113,8 @@ OPENJDK_BUILD_CPU_ARCH:=@OPENJDK_BUILD_CPU_ARCH@
OPENJDK_BUILD_CPU_BITS:=@OPENJDK_BUILD_CPU_BITS@
OPENJDK_BUILD_CPU_ENDIAN:=@OPENJDK_BUILD_CPU_ENDIAN@
OPENJDK_BUILD_LIBC:=@OPENJDK_BUILD_LIBC@
OPENJDK_BUILD_OS_INCLUDE_SUBDIR:=@OPENJDK_TARGET_OS_INCLUDE_SUBDIR@
# Target platform value in ModuleTarget class file attribute.
@@ -117,6 +123,7 @@ OPENJDK_MODULE_TARGET_PLATFORM:=@OPENJDK_MODULE_TARGET_PLATFORM@
# OS_* properties in release file
RELEASE_FILE_OS_NAME:=@RELEASE_FILE_OS_NAME@
RELEASE_FILE_OS_ARCH:=@RELEASE_FILE_OS_ARCH@
RELEASE_FILE_LIBC:=@RELEASE_FILE_LIBC@
SOURCE_DATE := @SOURCE_DATE@
ENABLE_REPRODUCIBLE_BUILD := @ENABLE_REPRODUCIBLE_BUILD@
@@ -124,20 +131,24 @@ ENABLE_REPRODUCIBLE_BUILD := @ENABLE_REPRODUCIBLE_BUILD@
LIBM:=@LIBM@
LIBDL:=@LIBDL@
# colon or semicolon
PATH_SEP:=@PATH_SEP@
WINENV_ROOT := @WINENV_ROOT@
WINENV_PREFIX := @WINENV_PREFIX@
ifneq ($(findstring windows.wsl, @OPENJDK_BUILD_OS_ENV@), )
# Tell WSL to convert PATH between linux and windows
export WSLENV := PATH/l
else ifeq (@OPENJDK_BUILD_OS_ENV@, windows.msys2)
# Prohibit msys2 from attemping any path wrangling
export MSYS2_ARG_CONV_EXCL := "*"
endif
# Save the original path before replacing it with the Visual Studio tools
ORIGINAL_PATH:=@ORIGINAL_PATH@
ifeq ($(OPENJDK_TARGET_OS), windows)
# On Windows, the Visual Studio toolchain needs the PATH to be adjusted
# to include Visual Studio tools (this needs to be in cygwin/msys style).
ifeq ($(OPENJDK_TARGET_OS_ENV), windows.wsl)
export FIXPATH_PATH:=@VS_PATH_WINDOWS@
export WSLENV:=$(WSLENV):FIXPATH_PATH:DEBUG_FIXPATH
else
export PATH:=@VS_PATH@
endif
ORIGINAL_PATH := @ORIGINAL_PATH@
ifeq (@TOOLCHAIN_TYPE@, microsoft)
# The Visual Studio toolchain needs the PATH to be adjusted to include
# Visual Studio tools.
export PATH := @TOOLCHAIN_PATH@:$(PATH)
endif
SYSROOT_CFLAGS := @SYSROOT_CFLAGS@
@@ -170,6 +181,7 @@ COMPANY_NAME:=@COMPANY_NAME@
HOTSPOT_VM_DISTRO:=@HOTSPOT_VM_DISTRO@
MACOSX_BUNDLE_NAME_BASE=@MACOSX_BUNDLE_NAME_BASE@
MACOSX_BUNDLE_ID_BASE=@MACOSX_BUNDLE_ID_BASE@
MACOSX_BUNDLE_BUILD_VERSION=@MACOSX_BUNDLE_BUILD_VERSION@
USERNAME:=@USERNAME@
VENDOR_URL:=@VENDOR_URL@
VENDOR_URL_BUG:=@VENDOR_URL_BUG@
@@ -476,10 +488,11 @@ DISABLED_WARNINGS_CXX := @DISABLED_WARNINGS_CXX@
WARNINGS_AS_ERRORS := @WARNINGS_AS_ERRORS@
CFLAGS_CCACHE:=@CFLAGS_CCACHE@
ADLC_CXXFLAG=@ADLC_CXXFLAG@
ADLC_LANGSTD_CXXFLAGS=@ADLC_LANGSTD_CXXFLAGS@
ADLC_LDFLAGS=@ADLC_LDFLAGS@
# Tools that potentially need to be cross compilation aware.
CC:=@FIXPATH@ @CCACHE@ @ICECC@ @CC@
CC := @CCACHE@ @ICECC@ @CC@
# CFLAGS used to compile the jdk native libraries (C-code)
CFLAGS_JDKLIB:=@CFLAGS_JDKLIB@
@@ -494,7 +507,6 @@ JVM_CFLAGS := @JVM_CFLAGS@
JVM_LDFLAGS := @JVM_LDFLAGS@
JVM_ASFLAGS := @JVM_ASFLAGS@
JVM_LIBS := @JVM_LIBS@
JVM_RCFLAGS := @JVM_RCFLAGS@
# These flags might contain variables set by a custom extension that is included later.
EXTRA_CFLAGS = @EXTRA_CFLAGS@
@@ -502,12 +514,12 @@ EXTRA_CXXFLAGS = @EXTRA_CXXFLAGS@
EXTRA_LDFLAGS = @EXTRA_LDFLAGS@
EXTRA_ASFLAGS = @EXTRA_ASFLAGS@
CXX:=@FIXPATH@ @CCACHE@ @ICECC@ @CXX@
CXX := @CCACHE@ @ICECC@ @CXX@
CPP:=@FIXPATH@ @CPP@
CPP := @CPP@
# The linker can be gcc or ld on unix systems, or link.exe on windows systems.
LD:=@FIXPATH@ @LD@
LD := @LD@
# Linker used by the jaotc tool for AOT compilation.
LD_JAOTC:=@LD_JAOTC@
@@ -527,7 +539,7 @@ JDKEXE_LIBS:=@JDKEXE_LIBS@
LDFLAGS_CXX_JDK:=@LDFLAGS_CXX_JDK@
# Sometimes a different linker is needed for c++ libs
LDCXX:=@FIXPATH@ @LDCXX@
LDCXX := @LDCXX@
# The flags for linking libstdc++ linker.
LIBCXX:=@LIBCXX@
@@ -536,22 +548,22 @@ LDFLAGS_TESTEXE:=@LDFLAGS_TESTEXE@
# BUILD_CC/BUILD_LD is a compiler/linker that generates code that is runnable on the
# build platform.
BUILD_CC:=@FIXPATH@ @BUILD_ICECC@ @BUILD_CC@
BUILD_CXX:=@FIXPATH@ @BUILD_ICECC@ @BUILD_CXX@
BUILD_LD:=@FIXPATH@ @BUILD_LD@
BUILD_LDCXX:=@FIXPATH@ @BUILD_LDCXX@
BUILD_AS:=@FIXPATH@ @BUILD_AS@
BUILD_AR:=@FIXPATH@ @BUILD_AR@
BUILD_NM:=@FIXPATH@ @BUILD_NM@
BUILD_CC := @BUILD_ICECC@ @BUILD_CC@
BUILD_CXX := @BUILD_ICECC@ @BUILD_CXX@
BUILD_LD := @BUILD_LD@
BUILD_LDCXX := @BUILD_LDCXX@
BUILD_AS := @BUILD_AS@
BUILD_AR := @BUILD_AR@
BUILD_NM := @BUILD_NM@
BUILD_OBJCOPY:=@BUILD_OBJCOPY@
BUILD_STRIP:=@BUILD_STRIP@
BUILD_SYSROOT_CFLAGS:=@BUILD_SYSROOT_CFLAGS@
BUILD_SYSROOT_LDFLAGS:=@BUILD_SYSROOT_LDFLAGS@
AS:=@FIXPATH@ @AS@
AS := @AS@
# AR is used to create a static library (is ar in unix, lib.exe in windows)
AR:=@FIXPATH@ @AR@
AR := @AR@
ARFLAGS:=@ARFLAGS@
NM:=@NM@
@@ -600,7 +612,7 @@ STATIC_LIBRARY=@STATIC_LIBRARY@
LIBRARY_PREFIX:=@LIBRARY_PREFIX@
SHARED_LIBRARY_SUFFIX:=@SHARED_LIBRARY_SUFFIX@
STATIC_LIBRARY_SUFFIX:=@STATIC_LIBRARY_SUFFIX@
EXE_SUFFIX:=@EXE_SUFFIX@
EXECUTABLE_SUFFIX:=@EXECUTABLE_SUFFIX@
OBJ_SUFFIX:=@OBJ_SUFFIX@
STATIC_BUILD:=@STATIC_BUILD@
@@ -621,21 +633,19 @@ JAVADOC_CMD:=@JAVADOC@
JAR_CMD:=@JAR@
JLINK_CMD := @JLINK@
JMOD_CMD := @JMOD@
JARSIGNER_CMD:=@JARSIGNER@
# These variables are meant to be used. They are defined with = instead of := to make
# it possible to override only the *_CMD variables.
JAVA=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
JAVA_SMALL=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS)
JAVA_DETACH =@FIXPATH@ @FIXPATH_DETACH_FLAG@ $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
JAVAC=@FIXPATH@ $(JAVAC_CMD)
JAVADOC=@FIXPATH@ $(JAVADOC_CMD)
JAR=@FIXPATH@ $(JAR_CMD)
JLINK = @FIXPATH@ $(JLINK_CMD)
JMOD = @FIXPATH@ $(JMOD_CMD) $(JAVA_TOOL_FLAGS_SMALL)
JARSIGNER=@FIXPATH@ $(JARSIGNER_CMD)
JAVA = $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
JAVA_SMALL = $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS)
JAVAC = $(JAVAC_CMD)
JAVADOC = $(JAVADOC_CMD)
JAR = $(JAR_CMD)
JLINK = $(JLINK_CMD)
JMOD = $(JMOD_CMD) $(JAVA_TOOL_FLAGS_SMALL)
BUILD_JAVA_FLAGS := @BOOTCYCLE_JVM_ARGS_BIG@
BUILD_JAVA=@FIXPATH@ $(BUILD_JDK)/bin/java $(BUILD_JAVA_FLAGS)
BUILD_JAVAC=@FIXPATH@ $(BUILD_JDK)/bin/javac
BUILD_JAR=@FIXPATH@ $(BUILD_JDK)/bin/jar
# Interim langtools modules and arguments
@@ -665,12 +675,7 @@ NEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) $(JAVADOC_MAIN_CLASS)
JLINK_KEEP_PACKAGED_MODULES:=@JLINK_KEEP_PACKAGED_MODULES@
# Base flags for RC
# Guarding this against resetting value. Legacy make files include spec multiple
# times.
ifndef RC_FLAGS
RC_FLAGS:=@RC_FLAGS@
endif
RCFLAGS := @RCFLAGS@
# Tools adhering to a minimal and common standard of posix compliance.
AWK:=@AWK@
@@ -681,9 +686,7 @@ CCACHE:=@CCACHE@
CD:=cd
CHMOD:=@CHMOD@
CODESIGN:=@CODESIGN@
COMM:=@COMM@
CP:=@CP@
CPIO:=@CPIO@
CUT:=@CUT@
DATE:=@DATE@
DIFF:=@DIFF@
@@ -703,9 +706,8 @@ LN:=@LN@
MIG:=@MIG@
MKDIR:=@MKDIR@
MV:=@MV@
NAWK:=@NAWK@
NICE:=@NICE@
PANDOC:=@FIXPATH@ @PANDOC@
PANDOC:=@PANDOC@
PATCH:=@PATCH@
PRINTF:=@PRINTF@
READLINK:=@READLINK@
@@ -721,15 +723,14 @@ TIME:=@TIME@
IS_GNU_TIME:=@IS_GNU_TIME@
TR:=@TR@
TOUCH:=@TOUCH@
UNIQ:=@UNIQ@
WC:=@WC@
XARGS:=@XARGS@
ZIPEXE:=@ZIPEXE@
UNZIP:=@UNZIP@
MT:=@FIXPATH@ @MT@
RC:=@FIXPATH@ @RC@
DUMPBIN:=@FIXPATH@ @DUMPBIN@
CYGPATH:=@CYGPATH@
MT:=@MT@
RC:=@RC@
DUMPBIN:=@DUMPBIN@
PATHTOOL:=@PATHTOOL@
WSLPATH:=@WSLPATH@
LDD:=@LDD@
OTOOL:=@OTOOL@
@@ -746,7 +747,8 @@ JT_HOME:=@JT_HOME@
JIB_HOME:=@JIB_HOME@
XCODEBUILD=@XCODEBUILD@
DTRACE := @DTRACE@
FIXPATH:=@FIXPATH@
FIXPATH := @FIXPATH@
FIXPATH_BASE := @FIXPATH_BASE@
ULIMIT:=@ULIMIT@
TAR_TYPE:=@TAR_TYPE@
@@ -755,7 +757,6 @@ TAR_SUPPORTS_TRANSFORM:=@TAR_SUPPORTS_TRANSFORM@
# Build setup
ENABLE_AOT:=@ENABLE_AOT@
ENABLE_INTREE_EC:=@ENABLE_INTREE_EC@
USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@
USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@
USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@
@@ -829,6 +830,10 @@ USE_EXTERNAL_LCMS:=@USE_EXTERNAL_LCMS@
LCMS_CFLAGS:=@LCMS_CFLAGS@
LCMS_LIBS:=@LCMS_LIBS@
USE_EXTERNAL_HARFBUZZ:=@USE_EXTERNAL_HARFBUZZ@
HARFBUZZ_CFLAGS:=@HARFBUZZ_CFLAGS@
HARFBUZZ_LIBS:=@HARFBUZZ_LIBS@
USE_EXTERNAL_LIBPNG:=@USE_EXTERNAL_LIBPNG@
PNG_LIBS:=@PNG_LIBS@
PNG_CFLAGS:=@PNG_CFLAGS@
@@ -869,10 +874,14 @@ INTERIM_JMODS_DIR := $(SUPPORT_OUTPUTDIR)/interim-jmods
INTERIM_IMAGE_DIR := $(SUPPORT_OUTPUTDIR)/interim-image
# Docs image
DOCS_IMAGE_SUBDIR := docs
DOCS_IMAGE_DIR = $(IMAGES_OUTPUTDIR)/$(DOCS_IMAGE_SUBDIR)
DOCS_JDK_IMAGE_SUBDIR := docs
DOCS_JDK_IMAGE_DIR = $(IMAGES_OUTPUTDIR)/$(DOCS_JDK_IMAGE_SUBDIR)
DOCS_JAVASE_IMAGE_SUBDIR := docs-javase
DOCS_JAVASE_IMAGE_DIR = $(IMAGES_OUTPUTDIR)/$(DOCS_JAVASE_IMAGE_SUBDIR)
DOCS_REFERENCE_IMAGE_SUBDIR := docs-reference
DOCS_REFERENCE_IMAGE_DIR = $(IMAGES_OUTPUTDIR)/$(DOCS_REFERENCE_IMAGE_SUBDIR)
# Output docs directly into image
DOCS_OUTPUTDIR := $(DOCS_IMAGE_DIR)
DOCS_OUTPUTDIR := $(DOCS_JDK_IMAGE_DIR)
# Static libs image
STATIC_LIBS_IMAGE_SUBDIR := static-libs
@@ -915,7 +924,9 @@ JRE_BUNDLE_NAME := jre-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)
JDK_SYMBOLS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin$(DEBUG_PART)-symbols.tar.gz
TEST_DEMOS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-tests-demos$(DEBUG_PART).tar.gz
TEST_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-tests$(DEBUG_PART).tar.gz
DOCS_BUNDLE_NAME := jdk-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
DOCS_JDK_BUNDLE_NAME := jdk-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
DOCS_JAVASE_BUNDLE_NAME := javase-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
DOCS_REFERENCE_BUNDLE_NAME := jdk-reference-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
STATIC_LIBS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-static-libs$(DEBUG_PART).tar.gz
JCOV_BUNDLE_NAME := jdk-jcov-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)
@@ -924,7 +935,9 @@ JRE_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JRE_BUNDLE_NAME)
JDK_SYMBOLS_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JDK_SYMBOLS_BUNDLE_NAME)
TEST_DEMOS_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(TEST_DEMOS_BUNDLE_NAME)
TEST_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(TEST_BUNDLE_NAME)
DOCS_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(DOCS_BUNDLE_NAME)
DOCS_JDK_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(DOCS_JDK_BUNDLE_NAME)
DOCS_JAVASE_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(DOCS_JAVASE_BUNDLE_NAME)
DOCS_REFERENCE_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(DOCS_REFERENCE_BUNDLE_NAME)
JCOV_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JCOV_BUNDLE_NAME)
# This macro is called to allow inclusion of closed source counterparts.

View File

@@ -32,7 +32,7 @@
# compilers and related tools that are used.
########################################################################
m4_include([toolchain_windows.m4])
m4_include([toolchain_microsoft.m4])
# All valid toolchains, regardless of platform (used by help.m4)
VALID_TOOLCHAINS_all="gcc clang xlc microsoft"
@@ -50,9 +50,9 @@ TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
# Minimum supported versions, empty means unspecified
TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
TOOLCHAIN_MINIMUM_VERSION_clang="3.5"
TOOLCHAIN_MINIMUM_VERSION_gcc="5.0"
TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
TOOLCHAIN_MINIMUM_VERSION_microsoft="19.10.0.0" # VS2017
TOOLCHAIN_MINIMUM_VERSION_xlc=""
# Minimum supported linker versions, empty means unspecified
@@ -179,6 +179,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_FILENAME_PATTERNS],
SHARED_LIBRARY='[$]1.dll'
STATIC_LIBRARY='[$]1.lib'
OBJ_SUFFIX='.obj'
EXECUTABLE_SUFFIX='.exe'
else
LIBRARY_PREFIX=lib
SHARED_LIBRARY_SUFFIX='.so'
@@ -186,6 +187,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_FILENAME_PATTERNS],
SHARED_LIBRARY='lib[$]1.so'
STATIC_LIBRARY='lib[$]1.a'
OBJ_SUFFIX='.o'
EXECUTABLE_SUFFIX=''
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
# For full static builds, we're overloading the SHARED_LIBRARY
# variables in order to limit the amount of changes required.
@@ -209,6 +211,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_FILENAME_PATTERNS],
AC_SUBST(SHARED_LIBRARY)
AC_SUBST(STATIC_LIBRARY)
AC_SUBST(OBJ_SUFFIX)
AC_SUBST(EXECUTABLE_SUFFIX)
])
# Determine which toolchain type to use, and make sure it is valid for this
@@ -292,12 +295,12 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE],
TOOLCHAIN_CC_BINARY_clang="clang"
TOOLCHAIN_CC_BINARY_gcc="gcc"
TOOLCHAIN_CC_BINARY_microsoft="cl$EXE_SUFFIX"
TOOLCHAIN_CC_BINARY_microsoft="cl"
TOOLCHAIN_CC_BINARY_xlc="xlclang"
TOOLCHAIN_CXX_BINARY_clang="clang++"
TOOLCHAIN_CXX_BINARY_gcc="g++"
TOOLCHAIN_CXX_BINARY_microsoft="cl$EXE_SUFFIX"
TOOLCHAIN_CXX_BINARY_microsoft="cl"
TOOLCHAIN_CXX_BINARY_xlc="xlclang++"
# Use indirect variable referencing
@@ -325,9 +328,6 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE],
# special setup, e.g. additional paths etc.
AC_DEFUN_ONCE([TOOLCHAIN_PRE_DETECTION],
[
# FIXME: Is this needed?
AC_LANG(C++)
# Store the CFLAGS etc passed to the configure script.
ORG_CFLAGS="$CFLAGS"
ORG_CXXFLAGS="$CXXFLAGS"
@@ -335,52 +335,26 @@ AC_DEFUN_ONCE([TOOLCHAIN_PRE_DETECTION],
# autoconf magic only relies on PATH, so update it if tools dir is specified
OLD_PATH="$PATH"
# On Windows, we need to detect the visual studio installation first.
# This will change the PATH, but we need to keep that new PATH even
# after toolchain detection is done, since the compiler (on x86) uses
# it for DLL resolution in runtime.
if test "x$OPENJDK_BUILD_OS" = "xwindows" \
&& test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
# Append VS_PATH. In WSL, VS_PATH will not contain the WSL env path needed
# for using basic Unix tools, so need to keep the original PATH.
UTIL_APPEND_TO_PATH(PATH, $VS_PATH)
UTIL_APPEND_TO_PATH(WSLENV, "PATH/l:LIB:INCLUDE")
export WSLENV
else
# Reset path to VS_PATH. It will include everything that was on PATH at the time we
# ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
PATH="$VS_PATH"
fi
# The microsoft toolchain also requires INCLUDE and LIB to be set.
export INCLUDE="$VS_INCLUDE"
export LIB="$VS_LIB"
else
if test "x$XCODE_VERSION_OUTPUT" != x; then
# For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode $TOOLCHAIN_VERSION"
else
# Currently we do not define this for other toolchains. This might change as the need arise.
TOOLCHAIN_VERSION=
fi
if test "x$XCODE_VERSION_OUTPUT" != x; then
# For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode $TOOLCHAIN_VERSION"
fi
AC_SUBST(TOOLCHAIN_VERSION)
# Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
# Finally prepend TOOLCHAIN_PATH to the PATH, to allow --with-tools-dir to
# override all other locations.
if test "x$TOOLCHAIN_PATH" != x; then
PATH=$TOOLCHAIN_PATH:$PATH
export PATH=$TOOLCHAIN_PATH:$PATH
fi
])
# Restore path, etc
AC_DEFUN_ONCE([TOOLCHAIN_POST_DETECTION],
[
# Restore old path, except for the microsoft toolchain, which requires VS_PATH
# to remain in place. Otherwise the compiler will not work in some siutations
# in later configure checks.
# Restore old path, except for the microsoft toolchain, which requires the
# toolchain path to remain in place. Otherwise the compiler will not work in
# some siutations in later configure checks.
if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
PATH="$OLD_PATH"
fi
@@ -427,7 +401,7 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_COMPILER_VERSION],
# First line typically looks something like:
# Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
# but the compiler name may vary depending on locale.
COMPILER_VERSION_OUTPUT=`"$COMPILER" 2>&1 | $GREP -v 'ERROR.*UtilTranslatePathList' | $HEAD -n 1 | $TR -d '\r'`
COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 1>/dev/null | $HEAD -n 1 | $TR -d '\r'`
# Check that this is likely to be Microsoft CL.EXE.
$ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft" > /dev/null
if test $? -ne 0; then
@@ -506,7 +480,7 @@ AC_DEFUN([TOOLCHAIN_FIND_COMPILER],
if test "x`basename [$]$1`" = "x[$]$1"; then
# A command without a complete path is provided, search $PATH.
AC_PATH_PROGS(POTENTIAL_$1, [$]$1)
UTIL_LOOKUP_PROGS(POTENTIAL_$1, [$]$1)
if test "x$POTENTIAL_$1" != x; then
$1=$POTENTIAL_$1
else
@@ -528,34 +502,16 @@ AC_DEFUN([TOOLCHAIN_FIND_COMPILER],
# If we are not cross compiling, then the default compiler name will be
# used.
$1=
# If TOOLCHAIN_PATH is set, check for all compiler names in there first
# before checking the rest of the PATH.
# FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
# step, this should not be necessary.
if test -n "$TOOLCHAIN_PATH"; then
PATH_save="$PATH"
PATH="$TOOLCHAIN_PATH"
AC_PATH_TOOL(TOOLCHAIN_PATH_$1, $SEARCH_LIST)
$1=$TOOLCHAIN_PATH_$1
PATH="$PATH_save"
fi
# AC_PATH_TOOL can't be run multiple times with the same variable,
# so create a new name for this run.
if test "x[$]$1" = x; then
AC_PATH_TOOL(POTENTIAL_$1, $SEARCH_LIST)
UTIL_LOOKUP_TOOLCHAIN_PROGS(POTENTIAL_$1, $SEARCH_LIST)
if test "x$POTENTIAL_$1" != x; then
$1=$POTENTIAL_$1
fi
if test "x[$]$1" = x; then
else
HELP_MSG_MISSING_DEPENDENCY([devkit])
AC_MSG_ERROR([Could not find a $COMPILER_NAME compiler. $HELP_MSG])
fi
fi
# Now we have a compiler binary in $1. Make sure it's okay.
UTIL_FIXUP_EXECUTABLE($1)
TEST_COMPILER="[$]$1"
AC_MSG_CHECKING([resolved symbolic links for $1])
@@ -596,12 +552,7 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_LD_VERSION],
# There is no specific version flag, but all output starts with a version string.
# First line typically looks something like:
# Microsoft (R) Incremental Linker Version 12.00.31101.0
# Reset PATH since it can contain a mix of WSL/linux paths and Windows paths from VS,
# which, in combination with WSLENV, will make the WSL layer complain
old_path="$PATH"
PATH=
LINKER_VERSION_STRING=`$LD 2>&1 | $HEAD -n 1 | $TR -d '\r'`
PATH="$old_path"
LINKER_VERSION_STRING=`$LINKER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
# Extract version number
[ LINKER_VERSION_NUMBER=`$ECHO $LINKER_VERSION_STRING | \
$SED -e 's/.* \([0-9][0-9]*\(\.[0-9][0-9]*\)*\).*/\1/'` ]
@@ -612,7 +563,7 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_LD_VERSION],
# This program is free software; [...]
# If using gold it will look like:
# GNU gold (GNU Binutils 2.30) 1.15
LINKER_VERSION_STRING=`$LD -Wl,--version 2> /dev/null | $HEAD -n 1`
LINKER_VERSION_STRING=`$LINKER -Wl,--version 2> /dev/null | $HEAD -n 1`
# Extract version number
if [ [[ "$LINKER_VERSION_STRING" == *gold* ]] ]; then
[ LINKER_VERSION_NUMBER=`$ECHO $LINKER_VERSION_STRING | \
@@ -629,7 +580,7 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_LD_VERSION],
# or
# GNU ld (GNU Binutils for Ubuntu) 2.26.1
LINKER_VERSION_STRING=`$LD -Wl,-v 2>&1 | $HEAD -n 1`
LINKER_VERSION_STRING=`$LINKER -Wl,-v 2>&1 | $HEAD -n 1`
# Check if we're using the GNU ld
$ECHO "$LINKER_VERSION_STRING" | $GREP "GNU" > /dev/null
if test $? -eq 0; then
@@ -649,6 +600,23 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_LD_VERSION],
AC_MSG_NOTICE([Using $TOOLCHAIN_TYPE $LINKER_NAME version $LINKER_VERSION_NUMBER @<:@$LINKER_VERSION_STRING@:>@])
])
# Make sure we did not pick up /usr/bin/link, which is the unix-style link
# executable.
#
# $1 = linker to test (LD or BUILD_LD)
AC_DEFUN(TOOLCHAIN_VERIFY_LINK_BINARY,
[
LINKER=[$]$1
AC_MSG_CHECKING([if the found link.exe is actually the Visual Studio linker])
$LINKER --version > /dev/null
if test $? -eq 0 ; then
AC_MSG_RESULT([no])
AC_MSG_ERROR([$LINKER is the winenv link tool. Please check your PATH and rerun configure.])
else
AC_MSG_RESULT([yes])
fi
])
# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
# archiver (AR). Verify that the compilers are correct according to the
@@ -693,39 +661,18 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
#
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
# In the Microsoft toolchain we have a separate LD command "link".
# Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
# a cygwin program for something completely different.
AC_CHECK_PROG([LD], [link$EXE_SUFFIX],[link$EXE_SUFFIX],,, [$CYGWIN_LINK])
UTIL_FIXUP_EXECUTABLE(LD)
# Verify that we indeed succeeded with this trick.
AC_MSG_CHECKING([if the found link.exe is actually the Visual Studio linker])
# Reset PATH since it can contain a mix of WSL/linux paths and Windows paths from VS,
# which, in combination with WSLENV, will make the WSL layer complain
old_path="$PATH"
PATH=
"$LD" --version > /dev/null
if test $? -eq 0 ; then
AC_MSG_RESULT([no])
AC_MSG_ERROR([This is the Cygwin link tool. Please check your PATH and rerun configure.])
else
AC_MSG_RESULT([yes])
fi
PATH="$old_path"
UTIL_LOOKUP_TOOLCHAIN_PROGS(LD, link)
TOOLCHAIN_VERIFY_LINK_BINARY(LD)
LDCXX="$LD"
# jaotc being a windows program expects the linker to be supplied with exe suffix.
LD_JAOTC="$LD$EXE_SUFFIX"
# jaotc being a windows program expects the linker to be supplied with exe suffix.but without
# fixpath
LD_JAOTC="${LD##$FIXPATH }"
else
# All other toolchains use the compiler to link.
LD="$CC"
LDCXX="$CXX"
# jaotc expects 'ld' as the linker rather than the compiler.
UTIL_CHECK_TOOLS([LD_JAOTC], ld)
UTIL_FIXUP_EXECUTABLE(LD_JAOTC)
UTIL_LOOKUP_TOOLCHAIN_PROGS(LD_JAOTC, ld)
fi
AC_SUBST(LD)
AC_SUBST(LD_JAOTC)
@@ -746,8 +693,12 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
#
# Setup the assembler (AS)
#
# FIXME: is this correct for microsoft?
AS="$CC -c"
if test "x$TOOLCHAIN_TYPE" != xmicrosoft; then
AS="$CC -c"
else
# On windows, the assember is "ml.exe"
UTIL_LOOKUP_TOOLCHAIN_PROGS(AS, ml)
fi
AC_SUBST(AS)
#
@@ -755,13 +706,12 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
#
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
# The corresponding ar tool is lib.exe (used to create static libraries)
AC_CHECK_PROG([AR], [lib$EXE_SUFFIX],[lib$EXE_SUFFIX],,,)
UTIL_LOOKUP_TOOLCHAIN_PROGS(AR, lib)
elif test "x$TOOLCHAIN_TYPE" = xgcc; then
UTIL_CHECK_TOOLS(AR, ar gcc-ar)
UTIL_LOOKUP_TOOLCHAIN_PROGS(AR, ar gcc-ar)
else
UTIL_CHECK_TOOLS(AR, ar)
UTIL_LOOKUP_TOOLCHAIN_PROGS(AR, ar)
fi
UTIL_FIXUP_EXECUTABLE(AR)
])
# Setup additional tools that is considered a part of the toolchain, but not the
@@ -770,41 +720,26 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_EXTRA],
[
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
UTIL_PATH_PROGS(LIPO, lipo)
UTIL_FIXUP_EXECUTABLE(LIPO)
UTIL_LOOKUP_PROGS(LIPO, lipo)
UTIL_REQUIRE_PROGS(OTOOL, otool)
UTIL_FIXUP_EXECUTABLE(OTOOL)
UTIL_REQUIRE_PROGS(INSTALL_NAME_TOOL, install_name_tool)
UTIL_FIXUP_EXECUTABLE(INSTALL_NAME_TOOL)
fi
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
AC_CHECK_PROG([MT], [mt$EXE_SUFFIX], [mt$EXE_SUFFIX],,, [/usr/bin/mt])
UTIL_FIXUP_EXECUTABLE(MT)
# Setup the manifest tool (MT)
UTIL_LOOKUP_TOOLCHAIN_PROGS(MT, mt)
# Setup the resource compiler (RC)
AC_CHECK_PROG([RC], [rc$EXE_SUFFIX], [rc$EXE_SUFFIX],,, [/usr/bin/rc])
UTIL_FIXUP_EXECUTABLE(RC)
AC_CHECK_PROG([DUMPBIN], [dumpbin$EXE_SUFFIX], [dumpbin$EXE_SUFFIX],,,)
UTIL_FIXUP_EXECUTABLE(DUMPBIN)
# We need to check for 'msbuild.exe' because at the place where we expect to
# find 'msbuild.exe' there's also a directory called 'msbuild' and configure
# won't find the 'msbuild.exe' executable in that case (and the
# 'ac_executable_extensions' is unusable due to performance reasons).
# Notice that we intentionally don't fix up the path to MSBUILD because we
# will call it in a DOS shell during freetype detection on Windows (see
# 'LIB_SETUP_FREETYPE' in "libraries.m4"
AC_CHECK_PROG([MSBUILD], [msbuild$EXE_SUFFIX], [msbuild$EXE_SUFFIX],,,)
UTIL_LOOKUP_TOOLCHAIN_PROGS(RC, rc)
UTIL_LOOKUP_TOOLCHAIN_PROGS(DUMPBIN, dumpbin)
fi
if test "x$OPENJDK_TARGET_OS" != xwindows; then
UTIL_CHECK_TOOLS(STRIP, strip)
UTIL_FIXUP_EXECUTABLE(STRIP)
UTIL_LOOKUP_TOOLCHAIN_PROGS(STRIP, strip)
if test "x$TOOLCHAIN_TYPE" = xgcc; then
UTIL_CHECK_TOOLS(NM, nm gcc-nm)
UTIL_LOOKUP_TOOLCHAIN_PROGS(NM, nm gcc-nm)
else
UTIL_CHECK_TOOLS(NM, nm)
UTIL_LOOKUP_TOOLCHAIN_PROGS(NM, nm)
fi
UTIL_FIXUP_EXECUTABLE(NM)
GNM="$NM"
AC_SUBST(GNM)
fi
@@ -812,25 +747,14 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_EXTRA],
# objcopy is used for moving debug symbols to separate files when
# full debug symbols are enabled.
if test "x$OPENJDK_TARGET_OS" = xlinux; then
UTIL_CHECK_TOOLS(OBJCOPY, [gobjcopy objcopy])
# Only call fixup if objcopy was found.
if test -n "$OBJCOPY"; then
UTIL_FIXUP_EXECUTABLE(OBJCOPY)
fi
UTIL_LOOKUP_TOOLCHAIN_PROGS(OBJCOPY, gobjcopy objcopy)
fi
UTIL_CHECK_TOOLS(OBJDUMP, [gobjdump objdump])
if test "x$OBJDUMP" != x; then
# Only used for compare.sh; we can live without it. UTIL_FIXUP_EXECUTABLE
# bails if argument is missing.
UTIL_FIXUP_EXECUTABLE(OBJDUMP)
fi
UTIL_LOOKUP_TOOLCHAIN_PROGS(OBJDUMP, gobjdump objdump)
case $TOOLCHAIN_TYPE in
gcc|clang)
UTIL_CHECK_TOOLS(CXXFILT, [c++filt])
UTIL_CHECK_NONEMPTY(CXXFILT)
UTIL_FIXUP_EXECUTABLE(CXXFILT)
UTIL_REQUIRE_TOOLCHAIN_PROGS(CXXFILT, c++filt)
;;
esac
])
@@ -872,14 +796,18 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_BUILD_COMPILERS],
. $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
# This potentially sets the following:
# A descriptive name of the devkit
BASIC_EVAL_DEVKIT_VARIABLE([BUILD_DEVKIT_NAME])
BASIC_EVAL_BUILD_DEVKIT_VARIABLE([BUILD_DEVKIT_NAME])
# Corresponds to --with-extra-path
BASIC_EVAL_DEVKIT_VARIABLE([BUILD_DEVKIT_EXTRA_PATH])
BASIC_EVAL_BUILD_DEVKIT_VARIABLE([BUILD_DEVKIT_EXTRA_PATH])
# Corresponds to --with-toolchain-path
BASIC_EVAL_DEVKIT_VARIABLE([BUILD_DEVKIT_TOOLCHAIN_PATH])
BASIC_EVAL_BUILD_DEVKIT_VARIABLE([BUILD_DEVKIT_TOOLCHAIN_PATH])
# Corresponds to --with-sysroot
BASIC_EVAL_DEVKIT_VARIABLE([BUILD_DEVKIT_SYSROOT])
# Skip the Window specific parts
BASIC_EVAL_BUILD_DEVKIT_VARIABLE([BUILD_DEVKIT_SYSROOT])
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
BASIC_EVAL_BUILD_DEVKIT_VARIABLE([BUILD_DEVKIT_VS_INCLUDE])
BASIC_EVAL_BUILD_DEVKIT_VARIABLE([BUILD_DEVKIT_VS_LIB])
fi
fi
AC_MSG_CHECKING([for build platform devkit])
@@ -889,36 +817,70 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_BUILD_COMPILERS],
AC_MSG_RESULT([$BUILD_DEVKIT_ROOT])
fi
BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
# Fallback default of just /bin if DEVKIT_PATH is not defined
# Fallback default of just /bin if DEVKIT_PATH is not defined
if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
fi
PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
# For historical reasons, paths are separated by ; in devkit.info
BUILD_VS_INCLUDE="${BUILD_DEVKIT_VS_INCLUDE//;/:}"
BUILD_VS_LIB="${BUILD_DEVKIT_VS_LIB//;/:}"
TOOLCHAIN_SETUP_VISUAL_STUDIO_SYSROOT_FLAGS(BUILD_, BUILD_)
fi
fi
else
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
# If we got no devkit, we need to go hunting for the proper env
TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE($OPENJDK_BUILD_CPU, [$TOOLCHAIN_VERSION])
TOOLCHAIN_EXTRACT_VISUAL_STUDIO_ENV($OPENJDK_BUILD_CPU, BUILD_)
# We cannot currently export the VS_PATH to spec.gmk. This is probably
# strictly not correct, but seems to work anyway.
# Convert VS_INCLUDE and VS_LIB into sysroot flags
TOOLCHAIN_SETUP_VISUAL_STUDIO_SYSROOT_FLAGS(BUILD_)
fi
fi
# FIXME: we should list the discovered compilers as an exclude pattern!
# If we do that, we can do this detection before POST_DETECTION, and still
# find the build compilers in the tools dir, if needed.
UTIL_REQUIRE_PROGS(BUILD_CC, [cl cc gcc])
UTIL_FIXUP_EXECUTABLE(BUILD_CC)
UTIL_REQUIRE_PROGS(BUILD_CXX, [cl CC g++])
UTIL_FIXUP_EXECUTABLE(BUILD_CXX)
UTIL_PATH_PROGS(BUILD_NM, nm gcc-nm)
UTIL_FIXUP_EXECUTABLE(BUILD_NM)
UTIL_PATH_PROGS(BUILD_AR, ar gcc-ar)
UTIL_FIXUP_EXECUTABLE(BUILD_AR)
UTIL_PATH_PROGS(BUILD_OBJCOPY, objcopy)
UTIL_FIXUP_EXECUTABLE(BUILD_OBJCOPY)
UTIL_PATH_PROGS(BUILD_STRIP, strip)
UTIL_FIXUP_EXECUTABLE(BUILD_STRIP)
# Assume the C compiler is the assembler
BUILD_AS="$BUILD_CC -c"
# Just like for the target compiler, use the compiler as linker
BUILD_LD="$BUILD_CC"
BUILD_LDCXX="$BUILD_CXX"
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
UTIL_REQUIRE_PROGS(BUILD_CC, cl, [$VS_PATH])
UTIL_REQUIRE_PROGS(BUILD_CXX, cl, [$VS_PATH])
# On windows, the assember is "ml.exe". We currently don't need this so
# do not require.
UTIL_LOOKUP_PROGS(BUILD_AS, ml, [$VS_PATH])
# On windows, the ar tool is lib.exe (used to create static libraries).
# We currently don't need this so do not require.
UTIL_LOOKUP_PROGS(BUILD_AR, lib, [$VS_PATH])
# In the Microsoft toolchain we have a separate LD command "link".
UTIL_REQUIRE_PROGS(BUILD_LD, link, [$VS_PATH])
TOOLCHAIN_VERIFY_LINK_BINARY(BUILD_LD)
BUILD_LDCXX="$BUILD_LD"
else
if test "x$OPENJDK_BUILD_OS" = xmacosx; then
UTIL_REQUIRE_PROGS(BUILD_CC, clang cc gcc)
UTIL_REQUIRE_PROGS(BUILD_CXX, clang++ CC g++)
else
UTIL_REQUIRE_PROGS(BUILD_CC, cc gcc)
UTIL_REQUIRE_PROGS(BUILD_CXX, CC g++)
fi
UTIL_LOOKUP_PROGS(BUILD_NM, nm gcc-nm)
UTIL_LOOKUP_PROGS(BUILD_AR, ar gcc-ar lib)
UTIL_LOOKUP_PROGS(BUILD_OBJCOPY, objcopy)
UTIL_LOOKUP_PROGS(BUILD_STRIP, strip)
# Assume the C compiler is the assembler
BUILD_AS="$BUILD_CC -c"
# Just like for the target compiler, use the compiler as linker
BUILD_LD="$BUILD_CC"
BUILD_LDCXX="$BUILD_CXX"
fi
PATH="$OLDPATH"
@@ -959,7 +921,7 @@ AC_DEFUN_ONCE([TOOLCHAIN_MISC_CHECKS],
# Check for extra potential brokenness.
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
# On Windows, double-check that we got the right compiler.
CC_VERSION_OUTPUT=`$CC 2>&1 | $GREP -v 'ERROR.*UtilTranslatePathList' | $HEAD -n 1 | $TR -d '\r'`
CC_VERSION_OUTPUT=`$CC 2>&1 1>/dev/null | $HEAD -n 1 | $TR -d '\r'`
COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
@@ -969,6 +931,10 @@ AC_DEFUN_ONCE([TOOLCHAIN_MISC_CHECKS],
if test "x$COMPILER_CPU_TEST" != "xx64"; then
AC_MSG_ERROR([Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for "$COMPILER_CPU_TEST"; expected "x64".])
fi
elif test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then
if test "x$COMPILER_CPU_TEST" != "xARM64"; then
AC_MSG_ERROR([Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for "$COMPILER_CPU_TEST"; expected "arm64".])
fi
fi
fi
@@ -1051,7 +1017,7 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JTREG],
if test "x$JT_HOME" = x; then
# JT_HOME is not set in environment, or was deemed invalid.
# Try to find jtreg on path
UTIL_PATH_PROGS(JTREGEXE, jtreg)
UTIL_LOOKUP_PROGS(JTREGEXE, jtreg)
if test "x$JTREGEXE" != x; then
# That's good, now try to derive JT_HOME
JT_HOME=`(cd $($DIRNAME $JTREGEXE)/.. && pwd)`

View File

@@ -25,55 +25,7 @@
################################################################################
# The order of these defines the priority by which we try to find them.
VALID_VS_VERSIONS="2019 2017 2013 2015 2012 2010"
VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
VS_VERSION_INTERNAL_2010=100
VS_MSVCR_2010=msvcr100.dll
# We don't use msvcp on Visual Studio 2010
#VS_MSVCP_2010=msvcp100.dll
VS_ENVVAR_2010="VS100COMNTOOLS"
VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
VS_VS_PLATFORM_NAME_2010="v100"
VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
VS_SUPPORTED_2010=false
VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
VS_VERSION_INTERNAL_2012=110
VS_MSVCR_2012=msvcr110.dll
VS_MSVCP_2012=msvcp110.dll
VS_ENVVAR_2012="VS110COMNTOOLS"
VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
VS_SDK_INSTALLDIR_2012=
VS_VS_PLATFORM_NAME_2012="v110"
VS_SDK_PLATFORM_NAME_2012=
VS_SUPPORTED_2012=false
VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
VS_VERSION_INTERNAL_2013=120
VS_MSVCR_2013=msvcr120.dll
VS_MSVCP_2013=msvcp120.dll
VS_ENVVAR_2013="VS120COMNTOOLS"
VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
VS_SDK_INSTALLDIR_2013=
VS_VS_PLATFORM_NAME_2013="v120"
VS_SDK_PLATFORM_NAME_2013=
VS_SUPPORTED_2013=false
VS_DESCRIPTION_2015="Microsoft Visual Studio 2015"
VS_VERSION_INTERNAL_2015=140
VS_MSVCR_2015=vcruntime140.dll
VS_MSVCP_2015=msvcp140.dll
VS_ENVVAR_2015="VS140COMNTOOLS"
VS_VS_INSTALLDIR_2015="Microsoft Visual Studio 14.0"
VS_SDK_INSTALLDIR_2015=
VS_VS_PLATFORM_NAME_2015="v140"
VS_SDK_PLATFORM_NAME_2015=
# The vcvars of 2015 breaks if 2017 is also installed. Work around this by
# explicitly specifying Windows Kit 8.1 to be used.
VS_ENV_ARGS_2015="8.1"
VS_SUPPORTED_2015=false
VALID_VS_VERSIONS="2019 2017"
VS_DESCRIPTION_2017="Microsoft Visual Studio 2017"
VS_VERSION_INTERNAL_2017=141
@@ -109,29 +61,35 @@ VS_TOOLSET_SUPPORTED_2019=true
AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
[
if test "x$VS_ENV_CMD" = x; then
VS_VERSION="$1"
VS_BASE="$2"
METHOD="$3"
TARGET_CPU="$1"
VS_VERSION="$2"
VS_BASE="$3"
METHOD="$4"
UTIL_REWRITE_AS_UNIX_PATH(VS_BASE)
# In VS 2017 and VS 2019, the default installation is in a subdir named after the edition.
# Find the first one present and use that.
if test "x$VS_EDITIONS" != x; then
for edition in $VS_EDITIONS; do
if test -d "$VS_BASE/$edition"; then
VS_BASE="$VS_BASE/$edition"
break
fi
done
fi
UTIL_FIXUP_PATH(VS_BASE, NOFAIL)
if test "x$VS_BASE" != x && test -d "$VS_BASE"; then
# In VS 2017 and VS 2019, the default installation is in a subdir named after the edition.
# Find the first one present and use that.
if test "x$VS_EDITIONS" != x; then
for edition in $VS_EDITIONS; do
if test -d "$VS_BASE/$edition"; then
VS_BASE="$VS_BASE/$edition"
break
fi
done
fi
if test -d "$VS_BASE"; then
AC_MSG_NOTICE([Found Visual Studio installation at $VS_BASE using $METHOD])
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
if test "x$TARGET_CPU" = xx86; then
VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
else
elif test "x$TARGET_CPU" = xx86_64; then
VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
VC/Auxiliary/Build/vcvarsx86_amd64.bat VC/Auxiliary/Build/vcvars64.bat"
vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
elif test "x$TARGET_CPU" = xaarch64; then
# for host x86-64, target aarch64
VCVARSFILES="vc/auxiliary/build/vcvarsamd64_arm64.bat \
vc/auxiliary/build/vcvarsx86_arm64.bat"
fi
for VCVARSFILE in $VCVARSFILES; do
@@ -158,23 +116,28 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT],
[
if test "x$VS_ENV_CMD" = x; then
VS_VERSION="$1"
WIN_SDK_BASE="$2"
METHOD="$3"
UTIL_REWRITE_AS_UNIX_PATH(WIN_SDK_BASE)
if test -d "$WIN_SDK_BASE"; then
TARGET_CPU="$1"
VS_VERSION="$2"
WIN_SDK_BASE="$3"
METHOD="$4"
UTIL_FIXUP_PATH(WIN_SDK_BASE, NOFAIL)
if test "x$WIN_SDK_BASE" != x && test -d "$WIN_SDK_BASE"; then
# There have been cases of partial or broken SDK installations. A missing
# lib dir is not going to work.
if test ! -d "$WIN_SDK_BASE/lib"; then
AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
AC_MSG_NOTICE([Warning: Installation is broken, lib dir is missing. Ignoring])
elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
elif test -f "$WIN_SDK_BASE/bin/setenv.cmd"; then
AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
VS_ENV_CMD="$WIN_SDK_BASE/bin/setenv.cmd"
if test "x$TARGET_CPU" = xx86; then
VS_ENV_ARGS="/x86"
else
elif test "x$TARGET_CPU" = xx86_64; then
VS_ENV_ARGS="/x64"
elif test "x$TARGET_CPU" = xaarch64; then
VS_ENV_ARGS="/arm64"
fi
# PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
# 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
@@ -202,7 +165,8 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
[specific MSVC toolset version to use, passed as -vcvars_ver argument to
pass to vcvarsall.bat (Windows only)])])
VS_VERSION="$1"
TARGET_CPU="$1"
VS_VERSION="$2"
eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
@@ -216,9 +180,9 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
# When using --with-tools-dir, assume it points to the correct and default
# version of Visual Studio or that --with-toolchain-version was also set.
if test "x$with_tools_dir" != x; then
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$TARGET_CPU], [$VS_VERSION],
[$with_tools_dir/../..], [--with-tools-dir])
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$TARGET_CPU], [$VS_VERSION],
[$with_tools_dir/../../..], [--with-tools-dir])
if test "x$VS_ENV_CMD" = x; then
# Having specified an argument which is incorrect will produce an instant failure;
@@ -231,45 +195,46 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
fi
if test "x$VS_COMNTOOLS" != x; then
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$TARGET_CPU], [$VS_VERSION],
[$VS_COMNTOOLS/../..], [$VS_COMNTOOLS_VAR variable])
fi
if test "x$PROGRAMFILES" != x; then
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$TARGET_CPU], [$VS_VERSION],
[$PROGRAMFILES/$VS_INSTALL_DIR], [well-known name])
fi
# Work around the insanely named ProgramFiles(x86) env variable
PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
if test "x$PROGRAMFILES_X86" != x; then
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$TARGET_CPU], [$VS_VERSION],
[$PROGRAMFILES_X86/$VS_INSTALL_DIR], [well-known name])
fi
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
[C:/Program Files/$VS_INSTALL_DIR], [well-known name])
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
[C:/Program Files (x86)/$VS_INSTALL_DIR], [well-known name])
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$TARGET_CPU], [$VS_VERSION],
[c:/program files/$VS_INSTALL_DIR], [well-known name])
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$TARGET_CPU], [$VS_VERSION],
[c:/program files (x86)/$VS_INSTALL_DIR], [well-known name])
if test "x$SDK_INSTALL_DIR" != x; then
if test "x$ProgramW6432" != x; then
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([${VS_VERSION}],
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$TARGET_CPU], [$VS_VERSION],
[$ProgramW6432/$SDK_INSTALL_DIR], [well-known name])
fi
if test "x$PROGRAMW6432" != x; then
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([${VS_VERSION}],
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$TARGET_CPU], [$VS_VERSION],
[$PROGRAMW6432/$SDK_INSTALL_DIR], [well-known name])
fi
if test "x$PROGRAMFILES" != x; then
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([${VS_VERSION}],
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$TARGET_CPU], [$VS_VERSION],
[$PROGRAMFILES/$SDK_INSTALL_DIR], [well-known name])
fi
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([${VS_VERSION}],
[C:/Program Files/$SDK_INSTALL_DIR], [well-known name])
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([${VS_VERSION}],
[C:/Program Files (x86)/$SDK_INSTALL_DIR], [well-known name])
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$TARGET_CPU], [$VS_VERSION],
[c:/program files/$SDK_INSTALL_DIR], [well-known name])
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$TARGET_CPU], [$VS_VERSION],
[c:/program files (x86)/$SDK_INSTALL_DIR], [well-known name])
fi
VCVARS_VER=auto
if test "x$VS_TOOLSET_SUPPORTED" != x; then
if test "x$with_msvc_toolset_version" != x; then
VS_ENV_ARGS="$VS_ENV_ARGS -vcvars_ver=$with_msvc_toolset_version"
VCVARS_VER="$with_msvc_toolset_version"
fi
fi
])
@@ -306,44 +271,9 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO],
eval VS_SUPPORTED="\${VS_SUPPORTED_${VS_VERSION}}"
eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
# The TOOLCHAIN_PATH from a devkit is in Unix format. In WSL we need a
# windows version of the complete VS_PATH as VS_PATH_WINDOWS
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
# Convert the toolchain path
OLDIFS="$IFS"
IFS=":"
VS_PATH_WINDOWS=""
for i in $TOOLCHAIN_PATH; do
path=$i
UTIL_REWRITE_AS_WINDOWS_MIXED_PATH([path])
VS_PATH_WINDOWS="$VS_PATH_WINDOWS;$path"
done
IFS="$OLDIFS"
# Append the current path from Windows env
WINDOWS_PATH="`$CMD /c echo %PATH%`"
VS_PATH_WINDOWS="$VS_PATH_WINDOWS;$WINDOWS_PATH"
else
VS_PATH="$TOOLCHAIN_PATH:$PATH"
fi
# Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
# can still be exported as INCLUDE for compiler invocations without
# SYSROOT_CFLAGS
OLDIFS="$IFS"
IFS=";"
for i in $DEVKIT_VS_INCLUDE; do
ipath=$i
UTIL_REWRITE_AS_WINDOWS_MIXED_PATH([ipath])
VS_INCLUDE="$VS_INCLUDE;$ipath"
done
# Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
# as LIB for compiler invocations without SYSROOT_LDFLAGS
for i in $DEVKIT_VS_LIB; do
libpath=$i
UTIL_REWRITE_AS_WINDOWS_MIXED_PATH([libpath])
VS_LIB="$VS_LIB;$libpath"
done
IFS="$OLDIFS"
# For historical reasons, paths are separated by ; in devkit.info
VS_INCLUDE=${DEVKIT_VS_INCLUDE//;/:}
VS_LIB=${DEVKIT_VS_LIB//;/:}
AC_MSG_NOTICE([Found devkit $VS_DESCRIPTION])
@@ -361,7 +291,7 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO],
fi
for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE([$VS_VERSION])
TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE($OPENJDK_TARGET_CPU, [$VS_VERSION])
if test "x$VS_ENV_CMD" != x; then
TOOLCHAIN_VERSION=$VS_VERSION
eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
@@ -383,240 +313,118 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO],
fi
])
AC_DEFUN([TOOLCHAIN_EXTRACT_VISUAL_STUDIO_ENV],
[
TARGET_CPU=$1
AC_MSG_NOTICE([Trying to extract Visual Studio environment variables for $TARGET_CPU])
AC_MSG_NOTICE([using $VS_ENV_CMD $VS_ENV_ARGS])
VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env-$TARGET_CPU"
$MKDIR -p $VS_ENV_TMP_DIR
# Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
# Instead create a shell script which will set the relevant variables when run.
OLDPATH="$PATH"
# Make sure we only capture additions to PATH needed by VS.
# Clear out path, but need system dir present for vsvars cmd file to be able to run
export PATH=$WINENV_PREFIX/c/windows/system32
# The "| cat" is to stop SetEnv.Cmd to mess with system colors on some systems
# We can't pass -vcvars_ver=$VCVARS_VER here because cmd.exe eats all '='
# in bat file arguments. :-(
$FIXPATH $CMD /c "$TOPDIR/make/scripts/extract-vs-env.cmd" "$VS_ENV_CMD" \
"$VS_ENV_TMP_DIR/set-vs-env.sh" $VCVARS_VER $VS_ENV_ARGS \
> $VS_ENV_TMP_DIR/extract-vs-env.log | $CAT 2>&1
PATH="$OLDPATH"
if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
AC_MSG_NOTICE([Could not succesfully extract the environment variables needed for the VS setup.])
AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation.])
AC_MSG_NOTICE([To analyze the problem, see extract-vs-env.log and extract-vs-env.bat in])
AC_MSG_NOTICE([$VS_ENV_TMP_DIR.])
AC_MSG_ERROR([Cannot continue])
fi
# Remove windows line endings
$SED -i -e 's|\r||g' $VS_ENV_TMP_DIR/set-vs-env.sh
# Now set all paths and other env variables by executing the generated
# shell script. This will allow the rest of the configure script to find
# and run the compiler in the proper way.
AC_MSG_NOTICE([Setting extracted environment variables for $TARGET_CPU])
. $VS_ENV_TMP_DIR/set-vs-env.sh
# Extract only what VS_ENV_CMD added to the PATH
VS_PATH=${PATH_AFTER/"$PATH_BEFORE"}
VS_PATH=${VS_PATH//::/:}
# Remove any paths containing # (typically F#) as that messes up make. This
# is needed if visual studio was installed with F# support.
[ VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'` ]
# Sometimes case is off
if test -z "$WINDOWSSDKDIR"; then
WINDOWSSDKDIR="$WindowsSdkDir"
fi
# Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
# also define VCINSTALLDIR and WINDOWSSDKDIR. All are in
# unix style.
])
################################################################################
# Check if the VS env variables were setup prior to running configure.
# If not, then find vcvarsall.bat and run it automatically, and integrate
# the set env variables into the spec file.
AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
[
# Store path to cygwin link.exe to help excluding it when searching for
# VS linker. This must be done before changing the PATH when looking for VS.
AC_PATH_PROG(CYGWIN_LINK, link.exe)
if test "x$CYGWIN_LINK" != x; then
AC_MSG_CHECKING([if the first found link.exe is actually the Cygwin link tool])
"$CYGWIN_LINK" --version > /dev/null
if test $? -eq 0 ; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
# This might be the VS linker. Don't exclude it later on.
CYGWIN_LINK=""
fi
fi
# First-hand choice is to locate and run the vsvars bat file.
# Locate the vsvars bat file and save it as VS_ENV_CMD
TOOLCHAIN_FIND_VISUAL_STUDIO
# If we have a devkit, skip all of the below.
# If we have a devkit, we don't need to run VS_ENV_CMD
if test "x$DEVKIT_VS_VERSION" = x; then
if test "x$VS_ENV_CMD" != x; then
# We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
UTIL_FIXUP_EXECUTABLE(VS_ENV_CMD)
# We have found a Visual Studio environment on disk, let's extract variables
# from the vsvars bat file into shell variables in the configure script.
TOOLCHAIN_EXTRACT_VISUAL_STUDIO_ENV($OPENJDK_TARGET_CPU)
# Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
AC_MSG_NOTICE([Trying to extract Visual Studio environment variables])
# We need to create a couple of temporary files.
VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
$MKDIR -p $VS_ENV_TMP_DIR
# Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
# Instead create a shell script which will set the relevant variables when run.
WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
UTIL_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_VS_ENV_CMD])
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
WINPATH_BASH="bash"
else
WINPATH_BASH="$BASH"
UTIL_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_BASH])
fi
# Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
# script (executable by bash) that will setup the important variables.
EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
$ECHO "@echo off" > $EXTRACT_VC_ENV_BAT_FILE
# This will end up something like:
# call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
$ECHO "call \"$WINPATH_VS_ENV_CMD\" $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
# In some cases, the VS_ENV_CMD will change directory, change back so
# the set-vs-env.sh ends up in the right place.
$ECHO 'cd %~dp0' >> $EXTRACT_VC_ENV_BAT_FILE
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
# These will end up something like:
# echo VS_PATH=\"$PATH\" > set-vs-env.sh
# The trailing space for everyone except PATH is no typo, but is needed due
# to trailing \ in the Windows paths. These will be stripped later.
# Trying pure CMD extract. This results in windows paths that need to
# be converted post extraction, but a simpler script.
$ECHO 'echo VS_PATH="%PATH%" > set-vs-env.sh' \
>> $EXTRACT_VC_ENV_BAT_FILE
$ECHO 'echo VS_INCLUDE="%INCLUDE% " >> set-vs-env.sh' \
>> $EXTRACT_VC_ENV_BAT_FILE
$ECHO 'echo VS_LIB="%LIB% " >> set-vs-env.sh' \
>> $EXTRACT_VC_ENV_BAT_FILE
$ECHO 'echo VCINSTALLDIR="%VCINSTALLDIR% " >> set-vs-env.sh' \
>> $EXTRACT_VC_ENV_BAT_FILE
$ECHO 'echo VCToolsRedistDir="%VCToolsRedistDir% " >> set-vs-env.sh' \
>> $EXTRACT_VC_ENV_BAT_FILE
$ECHO 'echo WindowsSdkDir="%WindowsSdkDir% " >> set-vs-env.sh' \
>> $EXTRACT_VC_ENV_BAT_FILE
$ECHO 'echo WINDOWSSDKDIR="%WINDOWSSDKDIR% " >> set-vs-env.sh' \
>> $EXTRACT_VC_ENV_BAT_FILE
else
# These will end up something like:
# C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
# The trailing space for everyone except PATH is no typo, but is needed due
# to trailing \ in the Windows paths. These will be stripped later.
$ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
>> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
>> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
>> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
>> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo VCToolsRedistDir="'\"$VCToolsRedistDir \" >> set-vs-env.sh' \
>> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
>> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
>> $EXTRACT_VC_ENV_BAT_FILE
fi
# Now execute the newly created bat file.
# Change directory so we don't need to mess with Windows paths in redirects.
cd $VS_ENV_TMP_DIR
$CMD /c extract-vs-env.bat > extract-vs-env.log 2>&1
cd $CONFIGURE_START_DIR
if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
AC_MSG_NOTICE([Could not succesfully extract the environment variables needed for the VS setup.])
AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation])
AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.])
AC_MSG_ERROR([Cannot continue])
fi
# Remove windows line endings
$SED -i -e 's|\r||g' $VS_ENV_TMP_DIR/set-vs-env.sh
# Now set all paths and other env variables. This will allow the rest of
# the configure script to find and run the compiler in the proper way.
AC_MSG_NOTICE([Setting extracted environment variables])
. $VS_ENV_TMP_DIR/set-vs-env.sh
# Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
# also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
# In WSL, the extracted VS_PATH is Windows style. This needs to be
# rewritten as Unix style and the Windows style version is saved
# in VS_PATH_WINDOWS.
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
OLDIFS="$IFS"
IFS=";"
# Convert VS_PATH to unix style
VS_PATH_WINDOWS="$VS_PATH"
VS_PATH=""
for i in $VS_PATH_WINDOWS; do
path=$i
# Only process non-empty elements
if test "x$path" != x; then
IFS="$OLDIFS"
# Check that directory exists before calling fixup_path
testpath=$path
UTIL_REWRITE_AS_UNIX_PATH([testpath])
if test -d "$testpath"; then
UTIL_FIXUP_PATH([path])
UTIL_APPEND_TO_PATH(VS_PATH, $path)
fi
IFS=";"
fi
done
IFS="$OLDIFS"
fi
# also define VCINSTALLDIR and WINDOWSSDKDIR. All are in
# unix style.
else
# We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
AC_MSG_NOTICE([Cannot locate a valid Visual Studio installation, checking current environment])
# We did not find a vsvars bat file.
AC_MSG_ERROR([Cannot locate a valid Visual Studio installation])
fi
fi
# At this point, we should have correct variables in the environment, or we can't continue.
AC_MSG_CHECKING([for Visual Studio variables])
# At this point, we should have correct variables in the environment
AC_MSG_CHECKING([that Visual Studio variables have been correctly extracted])
if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
|| test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
if test "x$VCINSTALLDIR" != x || test "x$WINDOWSSDKDIR" != x \
|| test "x$DEVKIT_NAME" != x; then
if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
AC_MSG_RESULT([present but broken])
AC_MSG_RESULT([no; Visual Studio present but broken])
AC_MSG_ERROR([Your VC command prompt seems broken, INCLUDE and/or LIB is missing.])
else
AC_MSG_RESULT([ok])
# Remove any trailing "\" ";" and " " from the variables.
VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
VCToolsRedistDir=`$ECHO "$VCToolsRedistDir" | $SED 's/\\\\* *$//'`
WindowsSdkDir=`$ECHO "$WindowsSdkDir" | $SED 's/\\\\* *$//'`
WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
if test -z "$WINDOWSSDKDIR"; then
WINDOWSSDKDIR="$WindowsSdkDir"
fi
# Remove any paths containing # (typically F#) as that messes up make. This
# is needed if visual studio was installed with F# support.
VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[[^:#]]*#[^:]*://g'`
AC_SUBST(VS_PATH)
AC_SUBST(VS_INCLUDE)
AC_SUBST(VS_LIB)
# Turn VS_PATH into TOOLCHAIN_PATH
TOOLCHAIN_PATH="$TOOLCHAIN_PATH:$VS_PATH"
# Convert VS_INCLUDE into SYSROOT_CFLAGS
OLDIFS="$IFS"
IFS=";"
for i in $VS_INCLUDE; do
ipath=$i
# Only process non-empty elements
if test "x$ipath" != x; then
IFS="$OLDIFS"
# Check that directory exists before calling fixup_path
testpath=$ipath
UTIL_REWRITE_AS_UNIX_PATH([testpath])
if test -d "$testpath"; then
UTIL_FIXUP_PATH([ipath])
SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
fi
IFS=";"
fi
done
# Convert VS_LIB into SYSROOT_LDFLAGS
for i in $VS_LIB; do
libpath=$i
# Only process non-empty elements
if test "x$libpath" != x; then
IFS="$OLDIFS"
# Check that directory exists before calling fixup_path
testpath=$libpath
UTIL_REWRITE_AS_UNIX_PATH([testpath])
if test -d "$testpath"; then
UTIL_FIXUP_PATH([libpath])
SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
fi
IFS=";"
fi
done
IFS="$OLDIFS"
AC_SUBST(VS_PATH_WINDOWS)
# Convert VS_INCLUDE and VS_LIB into sysroot flags
TOOLCHAIN_SETUP_VISUAL_STUDIO_SYSROOT_FLAGS
fi
else
AC_MSG_RESULT([not found])
if test "x$VS_ENV_CMD" = x; then
AC_MSG_NOTICE([Cannot locate a valid Visual Studio or Windows SDK installation on disk,])
AC_MSG_NOTICE([nor is this script run from a Visual Studio command prompt.])
AC_MSG_NOTICE([Cannot locate a valid Visual Studio or Windows SDK installation on disk])
else
AC_MSG_NOTICE([Running the extraction script failed.])
AC_MSG_NOTICE([Running the extraction script failed])
fi
AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation])
AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.])
AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation.])
AC_MSG_NOTICE([To analyze the problem, see extract-vs-env.log and extract-vs-env.bat in])
AC_MSG_NOTICE([$VS_ENV_TMP_DIR.])
AC_MSG_ERROR([Cannot continue])
fi
])
@@ -632,20 +440,15 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL],
# Need to check if the found msvcr is correct architecture
AC_MSG_CHECKING([found $DLL_NAME architecture])
MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
# The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
# on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
CORRECT_MSVCR_ARCH="PE32 executable"
else
CORRECT_MSVCR_ARCH="PE32+ executable"
fi
else
if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
CORRECT_MSVCR_ARCH=386
else
CORRECT_MSVCR_ARCH=x86-64
fi
if test "x$OPENJDK_TARGET_CPU" = xx86; then
CORRECT_MSVCR_ARCH=386
elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
CORRECT_MSVCR_ARCH=x86-64
elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
# The cygwin 'file' command only returns "PE32+ executable (DLL) (console), for MS Windows",
# without specifying which architecture it is for specifically. This has been fixed upstream.
# https://github.com/file/file/commit/b849b1af098ddd530094bf779b58431395db2e10#diff-ff2eced09e6860de75057dd731d092aeR142
CORRECT_MSVCR_ARCH="PE32+ executable"
fi
if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
AC_MSG_RESULT([ok])
@@ -664,30 +467,25 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
DLL_NAME="$1"
MSVC_DLL=
if test "x$OPENJDK_TARGET_CPU" = xx86; then
vs_target_cpu=x86
elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
vs_target_cpu=x64
elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
vs_target_cpu=arm64
fi
if test "x$MSVC_DLL" = x; then
if test "x$VCINSTALLDIR" != x; then
CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
UTIL_FIXUP_PATH(CYGWIN_VC_INSTALL_DIR)
if test "$VS_VERSION" -lt 2017; then
# Probe: Using well-known location from Visual Studio 12.0 and older
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
else
POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
fi
POSSIBLE_MSVC_DLL="$VCINSTALLDIR/redist/$vs_target_cpu/microsoft.vc${VS_VERSION_INTERNAL}.crt/$DLL_NAME"
else
CYGWIN_VC_TOOLS_REDIST_DIR="$VCToolsRedistDir"
UTIL_FIXUP_PATH(CYGWIN_VC_TOOLS_REDIST_DIR)
# Probe: Using well-known location from VS 2017 and VS 2019
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_TOOLS_REDIST_DIR/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
else
POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_TOOLS_REDIST_DIR/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
fi
POSSIBLE_MSVC_DLL="`ls $VCToolsRedistDir/$vs_target_cpu/microsoft.vc${VS_VERSION_INTERNAL}.crt/$DLL_NAME 2> /dev/null`"
fi
# In case any of the above finds more than one file, loop over them.
for possible_msvc_dll in $POSSIBLE_MSVC_DLL; do
$ECHO "POSSIBLE_MSVC_DLL $possible_msvc_dll"
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$possible_msvc_dll],
[well-known location in VCINSTALLDIR])
done
@@ -703,45 +501,44 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
if test "x$MSVC_DLL" = x; then
# Probe: Look in the Windows system32 directory
CYGWIN_SYSTEMROOT="$SYSTEMROOT"
UTIL_REWRITE_AS_UNIX_PATH(CYGWIN_SYSTEMROOT)
POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
[well-known location in SYSTEMROOT])
WIN_SYSTEMROOT="$SYSTEMROOT"
UTIL_FIXUP_PATH(WIN_SYSTEMROOT, NOFAIL)
if test "x$WIN_SYSTEMROOT" != x; then
POSSIBLE_MSVC_DLL="$WIN_SYSTEMROOT/system32/$DLL_NAME"
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
[well-known location in SYSTEMROOT])
fi
fi
if test "x$MSVC_DLL" = x; then
# Probe: If Visual Studio Express is installed, there is usually one with the debugger
if test "x$VS100COMNTOOLS" != x; then
CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
UTIL_REWRITE_AS_UNIX_PATH(CYGWIN_VS_TOOLS_DIR)
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
| $GREP -i /x64/ | $HEAD --lines 1`
else
POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
| $GREP -i /x86/ | $HEAD --lines 1`
WIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
UTIL_FIXUP_PATH(WIN_VS_TOOLS_DIR, NOFAIL)
if test "x$WIN_VS_TOOLS_DIR" != x; then
POSSIBLE_MSVC_DLL=`$FIND "$WIN_VS_TOOLS_DIR" -name $DLL_NAME \
| $GREP -i /$vs_target_cpu/ | $HEAD --lines 1`
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
[search of VS100COMNTOOLS])
fi
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
[search of VS100COMNTOOLS])
fi
fi
if test "x$MSVC_DLL" = x; then
# Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
# (This was the original behaviour; kept since it might turn something up)
if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
| $GREP x64 | $HEAD --lines 1`
else
POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
| $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
if test "x$VCINSTALLDIR" != x; then
if test "x$OPENJDK_TARGET_CPU" = xx86; then
POSSIBLE_MSVC_DLL=`$FIND "$VCINSTALLDIR" -name $DLL_NAME \
| $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $GREP -v arm64 | $HEAD --lines 1`
if test "x$POSSIBLE_MSVC_DLL" = x; then
# We're grasping at straws now...
POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
POSSIBLE_MSVC_DLL=`$FIND "$VCINSTALLDIR" -name $DLL_NAME \
| $HEAD --lines 1`
fi
else
POSSIBLE_MSVC_DLL=`$FIND "$VCINSTALLDIR" -name $DLL_NAME \
| $GREP x64 | $HEAD --lines 1`
fi
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
@@ -805,9 +602,9 @@ AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS],
fi
AC_ARG_WITH(vcruntime-1-dll, [AS_HELP_STRING([--with-vcruntime-1-dll],
[path to microsoft C++ runtime dll (vcruntime*_1.dll) (Windows only) @<:@probed@:>@])])
[path to microsoft C++ runtime dll (vcruntime*_1.dll) (Windows x64 only) @<:@probed@:>@])])
if test "x$VCRUNTIME_1_NAME" != "x"; then
if test "x$VCRUNTIME_1_NAME" != "x" && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
if test "x$with_vcruntime_1_dll" != x; then
# If given explicitly by user, do not probe. If not present, fail directly.
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($VCRUNTIME_1_NAME, [$with_vcruntime_1_dll],
@@ -826,13 +623,13 @@ AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS],
TOOLCHAIN_SETUP_MSVC_DLL([${VCRUNTIME_1_NAME}])
VCRUNTIME_1_DLL="$MSVC_DLL"
fi
AC_SUBST(VCRUNTIME_1_DLL)
fi
AC_SUBST(VCRUNTIME_1_DLL)
AC_ARG_WITH(ucrt-dll-dir, [AS_HELP_STRING([--with-ucrt-dll-dir],
[path to Microsoft Windows Kit UCRT DLL dir (Windows only) @<:@probed@:>@])])
if test "x$USE_UCRT" = "xtrue"; then
if test "x$USE_UCRT" = "xtrue" && test "x$OPENJDK_TARGET_CPU" != xaarch64; then
AC_MSG_CHECKING([for UCRT DLL dir])
if test "x$with_ucrt_dll_dir" != x; then
if test -z "$(ls -d "$with_ucrt_dll_dir/"*.dll 2> /dev/null)"; then
@@ -847,16 +644,16 @@ AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS],
UCRT_DLL_DIR="$DEVKIT_UCRT_DLL_DIR"
AC_MSG_RESULT($UCRT_DLL_DIR)
else
CYGWIN_WINDOWSSDKDIR="${WINDOWSSDKDIR}"
UTIL_FIXUP_PATH([CYGWIN_WINDOWSSDKDIR])
dll_subdir=$OPENJDK_TARGET_CPU
if test "x$dll_subdir" = "xx86_64"; then
if test "x$dll_subdir" = "xaarch64"; then
dll_subdir="arm64"
elif test "x$dll_subdir" = "xx86_64"; then
dll_subdir="x64"
fi
UCRT_DLL_DIR="$CYGWIN_WINDOWSSDKDIR/Redist/ucrt/DLLs/$dll_subdir"
UCRT_DLL_DIR="$WINDOWSSDKDIR/redist/ucrt/dlls/$dll_subdir"
if test -z "$(ls -d "$UCRT_DLL_DIR/"*.dll 2> /dev/null)"; then
# Try with version subdir
UCRT_DLL_DIR="`ls -d $CYGWIN_WINDOWSSDKDIR/Redist/*/ucrt/DLLs/$dll_subdir \
UCRT_DLL_DIR="`ls -d $WINDOWSSDKDIR/redist/*/ucrt/dlls/$dll_subdir \
2> /dev/null | $SORT -d | $HEAD -n1`"
if test -z "$UCRT_DLL_DIR" \
|| test -z "$(ls -d "$UCRT_DLL_DIR/"*.dll 2> /dev/null)"; then
@@ -874,3 +671,29 @@ AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS],
fi
AC_SUBST(UCRT_DLL_DIR)
])
# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
# that configure can use them while detecting compilers.
# TOOLCHAIN_TYPE is available here.
# Param 1 - Optional prefix to SYSROOT variables. (e.g BUILD_)
# Param 2 - Optional prefix to VS variables. (e.g BUILD_)
AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_SYSROOT_FLAGS],
[
OLDIFS="$IFS"
IFS=":"
# Convert VS_INCLUDE into SYSROOT_CFLAGS
for ipath in [$]$2VS_INCLUDE; do
$1SYSROOT_CFLAGS="[$]$1SYSROOT_CFLAGS -I$ipath"
done
# Convert VS_LIB into SYSROOT_LDFLAGS
for libpath in [$]$2VS_LIB; do
$1SYSROOT_LDFLAGS="[$]$1SYSROOT_LDFLAGS -libpath:$libpath"
done
IFS="$OLDIFS"
AC_SUBST($1SYSROOT_CFLAGS)
AC_SUBST($1SYSROOT_LDFLAGS)
])

View File

@@ -24,7 +24,6 @@
#
m4_include([util_paths.m4])
m4_include([util_windows.m4])
###############################################################################
# Create a function/macro that takes a series of named arguments. The call is
@@ -462,151 +461,3 @@ UTIL_DEFUN_NAMED([UTIL_ARG_ENABLE],
fi
])
###############################################################################
# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
# $1: variable to check
AC_DEFUN([UTIL_CHECK_NONEMPTY],
[
if test "x[$]$1" = x; then
AC_MSG_ERROR([Could not find required tool for $1])
fi
])
###############################################################################
# Setup a tool for the given variable. If correctly specified by the user,
# use that value, otherwise search for the tool using the supplied code snippet.
# $1: variable to set
# $2: code snippet to call to look for the tool
# $3: code snippet to call if variable was used to find tool
AC_DEFUN([UTIL_SETUP_TOOL],
[
# Publish this variable in the help.
AC_ARG_VAR($1, [Override default value for $1])
if [[ -z "${$1+x}" ]]; then
# The variable is not set by user, try to locate tool using the code snippet
$2
else
# The variable is set, but is it from the command line or the environment?
# Try to remove the string !$1! from our list.
try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!$1!/}
if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
# If it failed, the variable was not from the command line. Ignore it,
# but warn the user (except for BASH, which is always set by the calling BASH).
if test "x$1" != xBASH; then
AC_MSG_WARN([Ignoring value of $1 from the environment. Use command line variables instead.])
fi
# Try to locate tool using the code snippet
$2
else
# If it succeeded, then it was overridden by the user. We will use it
# for the tool.
# First remove it from the list of overridden variables, so we can test
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
tool_override=[$]$1
AC_MSG_NOTICE([User supplied override $1="$tool_override"])
# Check if we try to supply an empty value
if test "x$tool_override" = x; then
AC_MSG_CHECKING([for $1])
AC_MSG_RESULT([disabled])
else
# Split up override in command part and argument part
tool_and_args=($tool_override)
[ tool_command=${tool_and_args[0]} ]
[ unset 'tool_and_args[0]' ]
[ tool_args=${tool_and_args[@]} ]
# Check if the provided tool contains a complete path.
tool_basename="${tool_command##*/}"
if test "x$tool_basename" = "x$tool_command"; then
# A command without a complete path is provided, search $PATH.
AC_MSG_NOTICE([Will search for user supplied tool "$tool_basename"])
AC_PATH_PROG($1, $tool_basename)
if test "x[$]$1" = x; then
AC_MSG_ERROR([User supplied tool $1="$tool_basename" could not be found])
fi
else
# Otherwise we believe it is a complete path. Use it as it is.
AC_MSG_NOTICE([Will use user supplied tool "$tool_command"])
AC_MSG_CHECKING([for $tool_command])
if test ! -x "$tool_command" && test ! -x "$tool_command.exe"; then
AC_MSG_RESULT([not found])
AC_MSG_ERROR([User supplied tool $1="$tool_command" does not exist or is not executable])
fi
$1="$tool_command"
AC_MSG_RESULT([found])
fi
if test "x$tool_args" != x; then
# If we got arguments, re-append them to the command after the fixup.
$1="[$]$1 $tool_args"
fi
fi
fi
$3
fi
])
###############################################################################
# Call UTIL_SETUP_TOOL with AC_PATH_PROGS to locate the tool
# $1: variable to set
# $2: executable name (or list of names) to look for
# $3: [path]
AC_DEFUN([UTIL_PATH_PROGS],
[
UTIL_SETUP_TOOL($1, [AC_PATH_PROGS($1, $2, , $3)])
])
###############################################################################
# Call UTIL_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
# $1: variable to set
# $2: executable name (or list of names) to look for
AC_DEFUN([UTIL_CHECK_TOOLS],
[
UTIL_SETUP_TOOL($1, [AC_CHECK_TOOLS($1, $2)])
])
###############################################################################
# Like UTIL_PATH_PROGS but fails if no tool was found.
# $1: variable to set
# $2: executable name (or list of names) to look for
# $3: [path]
AC_DEFUN([UTIL_REQUIRE_PROGS],
[
UTIL_PATH_PROGS($1, $2, , $3)
UTIL_CHECK_NONEMPTY($1)
])
###############################################################################
# Like UTIL_SETUP_TOOL but fails if no tool was found.
# $1: variable to set
# $2: autoconf macro to call to look for the special tool
AC_DEFUN([UTIL_REQUIRE_SPECIAL],
[
UTIL_SETUP_TOOL($1, [$2])
UTIL_CHECK_NONEMPTY($1)
])
###############################################################################
# Like UTIL_REQUIRE_PROGS but also allows for bash built-ins
# $1: variable to set
# $2: executable name (or list of names) to look for
# $3: [path]
AC_DEFUN([UTIL_REQUIRE_BUILTIN_PROGS],
[
UTIL_SETUP_TOOL($1, [AC_PATH_PROGS($1, $2, , $3)])
if test "x[$]$1" = x; then
AC_MSG_NOTICE([Required tool $2 not found in PATH, checking built-in])
if command -v $2 > /dev/null 2>&1; then
AC_MSG_NOTICE([Found $2 as shell built-in. Using it])
$1="$2"
else
AC_MSG_ERROR([Required tool $2 also not found as built-in.])
fi
fi
UTIL_CHECK_NONEMPTY($1)
])

View File

@@ -23,6 +23,7 @@
# questions.
#
###############################################################################
# Appends a string to a path variable, only adding the : when needed.
AC_DEFUN([UTIL_APPEND_TO_PATH],
[
@@ -35,6 +36,7 @@ AC_DEFUN([UTIL_APPEND_TO_PATH],
fi
])
###############################################################################
# Prepends a string to a path variable, only adding the : when needed.
AC_DEFUN([UTIL_PREPEND_TO_PATH],
[
@@ -47,34 +49,6 @@ AC_DEFUN([UTIL_PREPEND_TO_PATH],
fi
])
################################################################################
# This will make a path absolute. Assumes it's already a unix path. Also
# resolves ~ to homedir.
AC_DEFUN([UTIL_ABSOLUTE_PATH],
[
if test "x[$]$1" != x; then
new_path="[$]$1"
# Use eval to expand a potential ~. This technique does not work if there
# are spaces in the path (which is valid at this point on Windows), so only
# try to apply it if there is an actual ~ first in the path.
if [ [[ "$new_path" = "~"* ]] ]; then
eval new_path="$new_path"
if test ! -f "$new_path" && test ! -d "$new_path"; then
AC_MSG_ERROR([The new_path of $1, which resolves as "$new_path", is not found.])
fi
fi
if test -d "$new_path"; then
$1="`cd "$new_path"; $THEPWDCMD -L`"
else
dir="`$DIRNAME "$new_path"`"
base="`$BASENAME "$new_path"`"
$1="`cd "$dir"; $THEPWDCMD -L`/$base"
fi
fi
])
###############################################################################
# This will make sure the given variable points to a full and proper
# path. This means:
@@ -84,31 +58,100 @@ AC_DEFUN([UTIL_ABSOLUTE_PATH],
# 2) The path will be absolute, and it will be in unix-style (on
# cygwin).
# $1: The name of the variable to fix
# $2: if NOFAIL, errors will be silently ignored
AC_DEFUN([UTIL_FIXUP_PATH],
[
# Only process if variable expands to non-empty
if test "x[$]$1" != x; then
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
UTIL_FIXUP_PATH_CYGWIN($1)
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
UTIL_FIXUP_PATH_MSYS($1)
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
UTIL_FIXUP_PATH_WSL($1)
path="[$]$1"
if test "x$path" != x; then
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
if test "x$2" = "xNOFAIL"; then
quiet_option="-q"
fi
imported_path=`$FIXPATH_BASE $quiet_option import "$path"`
$FIXPATH_BASE verify "$imported_path"
if test $? -ne 0; then
if test "x$2" != "xNOFAIL"; then
AC_MSG_ERROR([The path of $1, which resolves as "$path", could not be imported.])
else
imported_path=""
fi
fi
if test "x$imported_path" != "x$path"; then
$1="$imported_path"
fi
else
# We're on a unix platform. Hooray! :)
path="[$]$1"
has_space=`$ECHO "$path" | $GREP " "`
if test "x$has_space" != x; then
AC_MSG_NOTICE([The path of $1, which resolves as "$path", is invalid.])
AC_MSG_ERROR([Spaces are not allowed in this path.])
[ if [[ "$path" =~ " " ]]; then ]
if test "x$2" != "xNOFAIL"; then
AC_MSG_NOTICE([The path of $1, which resolves as "$path", is invalid.])
AC_MSG_ERROR([Spaces are not allowed in this path.])
else
path=""
fi
fi
# Use eval to expand a potential ~.
eval new_path="$path"
if test ! -e "$new_path"; then
if test "x$2" != "xNOFAIL"; then
AC_MSG_ERROR([The path of $1, which resolves as "$new_path", is not found.])
else
new_path=""
fi
fi
# Make the path absolute
if test "x$new_path" != x; then
if test -d "$new_path"; then
path="`cd "$new_path"; pwd -L`"
else
dir="`$DIRNAME "$new_path"`"
base="`$BASENAME "$new_path"`"
path="`cd "$dir"; pwd -L`/$base"
fi
else
path=""
fi
UTIL_ABSOLUTE_PATH(path)
$1="$path"
fi
fi
])
###############################################################################
# Check if the given file is a unix-style or windows-style executable, that is,
# if it expects paths in unix-style or windows-style.
# Returns "windows" or "unix" in $RESULT.
AC_DEFUN([UTIL_CHECK_WINENV_EXEC_TYPE],
[
# For cygwin and msys2, if it's linked with the correct helper lib, it
# accept unix paths
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin" || \
test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys2"; then
linked_libs=`$LDD $1 2>&1`
if test $? -ne 0; then
# Non-binary files (e.g. shell scripts) are unix files
RESULT=unix
else
[ if [[ "$linked_libs" =~ $WINENV_MARKER_DLL ]]; then ]
RESULT=unix
else
RESULT=windows
fi
fi
elif test "x$OPENJDK_BUILD_OS" = "xwindows"; then
# On WSL, we can check if it is a PE file
file_type=`$FILE -b $1 2>&1`
[ if [[ $file_type =~ PE.*Windows ]]; then ]
RESULT=windows
else
RESULT=unix
fi
else
RESULT=unix
fi
])
###############################################################################
# This will make sure the given variable points to a executable
# with a full and proper path. This means:
@@ -121,65 +164,331 @@ AC_DEFUN([UTIL_FIXUP_PATH],
# If the input variable does not have a directory specification, then
# it need to be in the PATH.
# $1: The name of the variable to fix
# $2: Where to look for the command (replaces $PATH)
# $3: set to NOFIXPATH to skip prefixing FIXPATH, even if needed on platform
AC_DEFUN([UTIL_FIXUP_EXECUTABLE],
[
input="[$]$1"
# Only process if variable expands to non-empty
if test "x[$]$1" != x; then
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
UTIL_FIXUP_EXECUTABLE_CYGWIN($1)
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
UTIL_FIXUP_EXECUTABLE_MSYS($1)
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
UTIL_FIXUP_EXECUTABLE_WSL($1)
if test "x$input" != x; then
# First separate the path from the arguments. This will split at the first
# space.
[ if [[ "$OPENJDK_BUILD_OS" = "windows" && input =~ ^$FIXPATH ]]; then
line="${input#$FIXPATH }"
prefix="$FIXPATH "
else
# We're on a unix platform. Hooray! :)
# First separate the path from the arguments. This will split at the first
# space.
complete="[$]$1"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
line="$input"
prefix=""
fi ]
path="${line%% *}"
arguments="${line#"$path"}"
# Cannot rely on the command "which" here since it doesn't always work.
is_absolute_path=`$ECHO "$path" | $GREP ^/`
if test -z "$is_absolute_path"; then
# Path to executable is not absolute. Find it.
IFS_save="$IFS"
IFS=:
for p in $PATH; do
if test -f "$p/$path" && test -x "$p/$path"; then
new_path="$p/$path"
break
fi
done
IFS="$IFS_save"
else
# This is an absolute path, we can use it without further modifications.
[ if ! [[ "$path" =~ /|\\ ]]; then ]
# This is a command without path (e.g. "gcc" or "echo")
command_type=`type -t "$path"`
if test "x$command_type" = xbuiltin || test "x$command_type" = xkeyword; then
# Shell builtin or keyword; we're done here
new_path="$path"
fi
if test "x$new_path" = x; then
AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
AC_MSG_NOTICE([This might be caused by spaces in the path, which is not allowed.])
else
# Search in $PATH using bash built-in 'type -p'.
saved_path="$PATH"
if test "x$2" != x; then
PATH="$2"
fi
new_path=`type -p "$path"`
if test "x$new_path" = x && test "x$OPENJDK_BUILD_OS" = "xwindows"; then
# Try again with .exe
new_path="`type -p "$path.exe"`"
fi
PATH="$saved_path"
if test "x$new_path" = x; then
AC_MSG_NOTICE([The command for $1, which resolves as "$input", is not found in the PATH.])
AC_MSG_ERROR([Cannot locate $path])
fi
AC_MSG_ERROR([Cannot locate the the path of $1])
fi
else
# This is a path with slashes, don't look at $PATH
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
# fixpath.sh import will do all heavy lifting for us
new_path=`$FIXPATH_BASE import "$path"`
if test ! -e $new_path; then
# It failed, but maybe spaces were part of the path and not separating
# the command and argument. Retry using that assumption.
new_path=`$FIXPATH_BASE import "$input"`
if test ! -e $new_path; then
AC_MSG_NOTICE([The command for $1, which resolves as "$input", can not be found.])
AC_MSG_ERROR([Cannot locate $input])
fi
# It worked, clear all "arguments"
arguments=""
fi
else # on unix
# Make absolute
$1="$path"
UTIL_FIXUP_PATH($1, NOFAIL)
new_path="[$]$1"
if test ! -e $new_path; then
AC_MSG_NOTICE([The command for $1, which resolves as "$input", is not found])
[ if [[ "$path" =~ " " ]]; then ]
AC_MSG_NOTICE([This might be caused by spaces in the path, which is not allowed.])
fi
AC_MSG_ERROR([Cannot locate $path])
fi
if test ! -x $new_path; then
AC_MSG_NOTICE([The command for $1, which resolves as "$input", is not executable.])
AC_MSG_ERROR([Cannot execute command at $path])
fi
fi # end on unix
fi # end with or without slashes
# Now we have a usable command as new_path, with arguments in arguments
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
if test "x$prefix" = x; then
# Only mess around if prefix was not given
UTIL_CHECK_WINENV_EXEC_TYPE("$new_path")
if test "x$RESULT" = xwindows; then
prefix="$FIXPATH "
# make sure we have an .exe suffix (but not two)
new_path="${new_path%.exe}.exe"
else
# If we have gotten a .exe suffix, remove it
new_path="${new_path%.exe}"
fi
fi
fi
if test "x$3" = xNOFIXPATH; then
prefix=""
fi
# Now join together the path and the arguments once again
if test "x$arguments" != xEOL; then
new_complete="$new_path ${arguments% *}"
new_complete="$prefix$new_path$arguments"
$1="$new_complete"
fi
])
###############################################################################
# Setup a tool for the given variable. If correctly specified by the user,
# use that value, otherwise search for the tool using the supplied code snippet.
# $1: variable to set
# $2: code snippet to call to look for the tool
# $3: code snippet to call if variable was used to find tool
AC_DEFUN([UTIL_SETUP_TOOL],
[
# Publish this variable in the help.
AC_ARG_VAR($1, [Override default value for $1])
if [[ -z "${$1+x}" ]]; then
# The variable is not set by user, try to locate tool using the code snippet
$2
else
# The variable is set, but is it from the command line or the environment?
# Try to remove the string !$1! from our list.
try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!$1!/}
if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
# If it failed, the variable was not from the command line. Ignore it,
# but warn the user (except for BASH, which is always set by the calling BASH).
if test "x$1" != xBASH; then
AC_MSG_WARN([Ignoring value of $1 from the environment. Use command line variables instead.])
fi
# Try to locate tool using the code snippet
$2
else
new_complete="$new_path"
# If it succeeded, then it was overridden by the user. We will use it
# for the tool.
# First remove it from the list of overridden variables, so we can test
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
tool_override=[$]$1
# Check if we try to supply an empty value
if test "x$tool_override" = x; then
AC_MSG_CHECKING([for $1])
AC_MSG_RESULT([[[disabled by user]]])
else
# Split up override in command part and argument part
tool_and_args=($tool_override)
[ tool_command=${tool_and_args[0]} ]
[ unset 'tool_and_args[0]' ]
[ tool_args=${tool_and_args[@]} ]
# Check if the provided tool contains a complete path.
tool_basename="${tool_command##*/}"
if test "x$tool_basename" = "x$tool_command"; then
# A command without a complete path is provided, search $PATH.
AC_MSG_NOTICE([Will search for user supplied tool "$tool_basename"])
AC_PATH_PROGS($1, $tool_basename ${tool_basename}.exe)
tool_command="[$]$1"
if test "x$tool_command" = x; then
AC_MSG_ERROR([User supplied tool $1="$tool_basename" could not be found in PATH])
fi
else
# Otherwise we believe it is a complete path. Use it as it is.
if test ! -x "$tool_command" && test ! -x "${tool_command}.exe"; then
AC_MSG_ERROR([User supplied tool $1="$tool_command" does not exist or is not executable])
fi
if test ! -x "$tool_command"; then
tool_command="${tool_command}.exe"
fi
$1="$tool_command"
fi
if test "x$tool_args" != x; then
# If we got arguments, re-append them to the command after the fixup.
$1="[$]$1 $tool_args"
fi
AC_MSG_CHECKING([for $1])
AC_MSG_RESULT([[$]$1 [[user supplied]]])
fi
fi
$3
fi
])
###############################################################################
# Locate a tool using proper methods.
# $1: variable to set
# $2: executable name (or list of names) to look for
# $3: [path]
# $4: set to NOFIXPATH to skip prefixing FIXPATH, even if needed on platform
AC_DEFUN([UTIL_LOOKUP_PROGS],
[
UTIL_SETUP_TOOL($1, [
$1=""
if test "x$3" != x; then
old_path="$PATH"
PATH="$3"
fi
if test "x$complete" != "x$new_complete"; then
$1="$new_complete"
AC_MSG_NOTICE([Rewriting $1 to "$new_complete"])
for name in $2; do
AC_MSG_CHECKING(for $name)
command_type=`type -t "$name"`
if test "x$command_type" = xbuiltin || test "x$command_type" = xkeyword; then
# Shell builtin or keyword; we're done here
full_path="$name"
$1="$full_path"
AC_MSG_RESULT([[$full_path [builtin]]])
break
else
# Search in $PATH
old_ifs="$IFS"
IFS=":"
for elem in $PATH; do
IFS="$old_ifs"
if test "x$elem" = x; then
continue
fi
full_path="$elem/$name"
if test ! -e "$full_path" && test "x$OPENJDK_BUILD_OS" = "xwindows"; then
# Try again with .exe
full_path="$elem/$name.exe"
fi
if test -x "$full_path" && test ! -d "$full_path" ; then
$1="$full_path"
UTIL_FIXUP_EXECUTABLE($1, $3, $4)
result="[$]$1"
# If we have FIXPATH enabled, strip all instances of it and prepend
# a single one, to avoid double fixpath prefixing.
if test "x$4" != xNOFIXPATH; then
[ if [[ $FIXPATH != "" && $result =~ ^"$FIXPATH " ]]; then ]
result="\$FIXPATH ${result#"$FIXPATH "}"
fi
fi
AC_MSG_RESULT([$result])
break 2;
fi
done
IFS="$old_ifs"
fi
AC_MSG_RESULT([[[not found]]])
done
if test "x$3" != x; then
PATH="$old_path"
fi
])
])
###############################################################################
# Call UTIL_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool. This will look
# first for cross-compilation tools.
# $1: variable to set
# $2: executable name (or list of names) to look for
# $3: [path]
AC_DEFUN([UTIL_LOOKUP_TOOLCHAIN_PROGS],
[
if test "x$ac_tool_prefix" = x; then
UTIL_LOOKUP_PROGS($1, $2, $3)
else
prefixed_names=$(for name in $2; do echo ${ac_tool_prefix}${name} $name; done)
UTIL_LOOKUP_PROGS($1, $prefixed_names, $3)
fi
])
###############################################################################
# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
# $1: variable to check
AC_DEFUN([UTIL_CHECK_NONEMPTY],
[
if test "x[$]$1" = x; then
AC_MSG_ERROR([Could not find required tool for $1])
fi
])
###############################################################################
# Like UTIL_LOOKUP_PROGS but fails if no tool was found.
# $1: variable to set
# $2: executable name (or list of names) to look for
# $3: [path]
AC_DEFUN([UTIL_REQUIRE_PROGS],
[
UTIL_LOOKUP_PROGS($1, $2, $3)
UTIL_CHECK_NONEMPTY($1)
])
###############################################################################
# Like UTIL_LOOKUP_PROGS but fails if no tool was found.
# $1: variable to set
# $2: executable name (or list of names) to look for
# $3: [path]
AC_DEFUN([UTIL_REQUIRE_TOOLCHAIN_PROGS],
[
UTIL_LOOKUP_TOOLCHAIN_PROGS($1, $2, $3)
UTIL_CHECK_NONEMPTY($1)
])
###############################################################################
# Like UTIL_SETUP_TOOL but fails if no tool was found.
# $1: variable to set
# $2: autoconf macro to call to look for the special tool
AC_DEFUN([UTIL_REQUIRE_SPECIAL],
[
UTIL_SETUP_TOOL($1, [$2])
UTIL_CHECK_NONEMPTY($1)
# The special macro will return an absolute path, and is only used for
# unix tools. No further processing needed.
])
###############################################################################
# Add FIXPATH prefix to variable. Normally this is done by UTIL_LOOKUP_PROGS
# or UTIL_FIXUP_EXECUTABLE, but in some circumstances this has to be done
# explicitly, such as when the command in question does not exist yet.
#
# $1: variable to add fixpath to
AC_DEFUN([UTIL_ADD_FIXPATH],
[
if test "x$FIXPATH" != x; then
$1="$FIXPATH [$]$1"
fi
])
@@ -208,8 +517,8 @@ AC_DEFUN([UTIL_REMOVE_SYMBOLIC_LINKS],
sym_link_file=`$BASENAME [$]$1`
cd $sym_link_dir
# Use -P flag to resolve symlinks in directories.
cd `$THEPWDCMD -P`
sym_link_dir=`$THEPWDCMD -P`
cd `pwd -P`
sym_link_dir=`pwd -P`
# Resolve file symlinks
while test $COUNTER -lt 20; do
ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
@@ -220,7 +529,7 @@ AC_DEFUN([UTIL_REMOVE_SYMBOLIC_LINKS],
# Again resolve directory symlinks since the target of the just found
# link could be in a different directory
cd `$DIRNAME $ISLINK`
sym_link_dir=`$THEPWDCMD -P`
sym_link_dir=`pwd -P`
sym_link_file=`$BASENAME $ISLINK`
let COUNTER=COUNTER+1
done
@@ -229,4 +538,3 @@ AC_DEFUN([UTIL_REMOVE_SYMBOLIC_LINKS],
fi
fi
])

View File

@@ -1,443 +0,0 @@
#
# 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
# 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.
#
AC_DEFUN([UTIL_REWRITE_AS_UNIX_PATH],
[
windows_path="[$]$1"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
$1="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
$1="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
# wslpath does not check the input, only call if an actual windows path was
# given.
if $ECHO "$windows_path" | $GREP -q ["^[a-zA-Z]:[\\\\/]"]; then
unix_path=`$WSLPATH -u "$windows_path"`
$1="$unix_path"
fi
fi
])
AC_DEFUN([UTIL_REWRITE_AS_WINDOWS_MIXED_PATH],
[
unix_path="[$]$1"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
windows_path=`$CYGPATH -m "$unix_path"`
$1="$windows_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
windows_path=`cmd //c echo $unix_path`
$1="$windows_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
windows_path=`$WSLPATH -m "$unix_path"`
$1="$windows_path"
fi
])
# Helper function which possibly converts a path using DOS-style short mode.
# If so, the updated path is stored in $new_path.
# $1: The path to check
AC_DEFUN([UTIL_MAKE_WINDOWS_SPACE_SAFE_CYGWIN],
[
input_path="$1"
# Check if we need to convert this using DOS-style short mode. If the path
# contains just simple characters, use it. Otherwise (spaces, weird characters),
# take no chances and rewrite it.
# Note: m4 eats our [], so we need to use @<:@ and @:>@ instead.
has_forbidden_chars=`$ECHO "$input_path" | $GREP @<:@^-._/a-zA-Z0-9@:>@`
if test "x$has_forbidden_chars" != x; then
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
shortmode_path=`$CYGPATH -s -m -a "$input_path"`
path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
# Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
fi
test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
if test "x$test_cygdrive_prefix" = x; then
# As a simple fix, exclude /usr/bin since it's not a real path.
if test "x`$ECHO $1 | $GREP ^/usr/bin/`" = x; then
# The path is in a Cygwin special directory (e.g. /home). We need this converted to
# a path prefixed by /cygdrive for fixpath to work.
new_path="$CYGWIN_ROOT_PATH$input_path"
fi
fi
])
# Helper function which possibly converts a path using DOS-style short mode.
# If so, the updated path is stored in $new_path.
# $1: The path to check
AC_DEFUN([UTIL_MAKE_WINDOWS_SPACE_SAFE_MSYS],
[
input_path="$1"
# Check if we need to convert this using DOS-style short mode. If the path
# contains just simple characters, use it. Otherwise (spaces, weird characters),
# take no chances and rewrite it.
# Note: m4 eats our [], so we need to use @<:@ and @:>@ instead.
has_forbidden_chars=`$ECHO "$input_path" | $GREP @<:@^-_/:a-zA-Z0-9@:>@`
if test "x$has_forbidden_chars" != x; then
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
fi
])
# Helper function which possibly converts a path using DOS-style short mode.
# If so, the updated path is stored in $new_path.
# $1: The path to check
AC_DEFUN([UTIL_MAKE_WINDOWS_SPACE_SAFE_WSL],
[
input_path="$1"
# Check if we need to convert this using DOS-style short mode. If the path
# contains just simple characters, use it. Otherwise (spaces, weird characters),
# take no chances and rewrite it.
# Note: m4 eats our [], so we need to use @<:@ and @:>@ instead.
has_forbidden_chars=`$ECHO "$input_path" | $GREP [[^-_/:a-zA-Z0-9\\.]]`
if test "x$has_forbidden_chars" != x; then
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
TOPDIR_windows="$TOPDIR"
UTIL_REWRITE_AS_WINDOWS_MIXED_PATH([TOPDIR_windows])
# First convert to Windows path to make input valid for cmd
UTIL_REWRITE_AS_WINDOWS_MIXED_PATH([input_path])
# Reset PATH since it can contain a mix of WSL/linux paths and Windows paths from VS,
# which, in combination with WSLENV, will make the WSL layer complain
old_path="$PATH"
PATH=
new_path=`$CMD /c $TOPDIR_windows/make/scripts/windowsShortName.bat "$input_path" \
| $SED -e 's|\r||g' \
| $TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
# Rewrite back to unix style
PATH="$old_path"
UTIL_REWRITE_AS_UNIX_PATH([new_path])
fi
])
# FIXME: The UTIL_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
# and could probably be heavily simplified. However, all changes in this
# area tend to need lot of testing in different scenarios, and in lack of
# proper unit testing, cleaning this up has not been deemed worth the effort
# at the moment.
AC_DEFUN([UTIL_FIXUP_PATH_CYGWIN],
[
# Input might be given as Windows format, start by converting to
# unix format.
path="[$]$1"
new_path=`$CYGPATH -u "$path"`
UTIL_ABSOLUTE_PATH(new_path)
# Cygwin tries to hide some aspects of the Windows file system, such that binaries are
# named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
# "foo.exe" is OK but "foo" is an error.
#
# This test is therefore slightly more accurate than "test -f" to check for file precense.
# It is also a way to make sure we got the proper file name for the real test later on.
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
if test "x$test_shortpath" = x; then
AC_MSG_NOTICE([The path of $1, which resolves as "$path", is invalid.])
AC_MSG_ERROR([Cannot locate the the path of $1])
fi
# Call helper function which possibly converts this using DOS-style short mode.
# If so, the updated path is stored in $new_path.
UTIL_MAKE_WINDOWS_SPACE_SAFE_CYGWIN([$new_path])
if test "x$path" != "x$new_path"; then
$1="$new_path"
AC_MSG_NOTICE([Rewriting $1 to "$new_path"])
fi
])
AC_DEFUN([UTIL_FIXUP_PATH_MSYS],
[
path="[$]$1"
has_colon=`$ECHO $path | $GREP ^.:`
new_path="$path"
if test "x$has_colon" = x; then
# Not in mixed or Windows style, start by that.
new_path=`cmd //c echo $path`
fi
UTIL_ABSOLUTE_PATH(new_path)
UTIL_MAKE_WINDOWS_SPACE_SAFE_MSYS([$new_path])
UTIL_REWRITE_AS_UNIX_PATH(new_path)
if test "x$path" != "x$new_path"; then
$1="$new_path"
AC_MSG_NOTICE([Rewriting $1 to "$new_path"])
fi
# Save the first 10 bytes of this path to the storage, so fixpath can work.
all_fixpath_prefixes=("${all_fixpath_prefixes@<:@@@:>@}" "${new_path:0:10}")
])
AC_DEFUN([UTIL_FIXUP_PATH_WSL],
[
# Input might be given as Windows format, start by converting to
# unix format.
new_path="[$]$1"
UTIL_REWRITE_AS_UNIX_PATH([new_path])
UTIL_ABSOLUTE_PATH(new_path)
# Call helper function which possibly converts this using DOS-style short mode.
# If so, the updated path is stored in $new_path.
UTIL_MAKE_WINDOWS_SPACE_SAFE_WSL([$new_path])
if test "x$path" != "x$new_path"; then
$1="$new_path"
AC_MSG_NOTICE([Rewriting $1 to "$new_path"])
fi
])
AC_DEFUN([UTIL_FIXUP_EXECUTABLE_CYGWIN],
[
# First separate the path from the arguments. This will split at the first
# space.
complete="[$]$1"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
# Input might be given as Windows format, start by converting to
# unix format.
new_path=`$CYGPATH -u "$path"`
# Now try to locate executable using which
new_path=`$WHICH "$new_path" 2> /dev/null`
# bat and cmd files are not always considered executable in cygwin causing which
# to not find them
if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
new_path=`$CYGPATH -u "$path"`
fi
if test "x$new_path" = x; then
# Oops. Which didn't find the executable.
# The splitting of arguments from the executable at a space might have been incorrect,
# since paths with space are more likely in Windows. Give it another try with the whole
# argument.
path="$complete"
arguments="EOL"
new_path=`$CYGPATH -u "$path"`
new_path=`$WHICH "$new_path" 2> /dev/null`
# bat and cmd files are not always considered executable in cygwin causing which
# to not find them
if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
new_path=`$CYGPATH -u "$path"`
fi
if test "x$new_path" = x; then
# It's still not found. Now this is an unrecoverable error.
AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
AC_MSG_NOTICE([You might be mixing spaces in the path and extra arguments, which is not allowed.])
fi
AC_MSG_ERROR([Cannot locate the the path of $1])
fi
fi
# Cygwin tries to hide some aspects of the Windows file system, such that binaries are
# named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
# "foo.exe" is OK but "foo" is an error.
#
# This test is therefore slightly more accurate than "test -f" to check for file presence.
# It is also a way to make sure we got the proper file name for the real test later on.
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
if test "x$test_shortpath" = x; then
# Short path failed, file does not exist as specified.
# Try adding .exe or .cmd
if test -f "${new_path}.exe"; then
input_to_shortpath="${new_path}.exe"
elif test -f "${new_path}.cmd"; then
input_to_shortpath="${new_path}.cmd"
else
AC_MSG_NOTICE([The path of $1, which resolves as "$new_path", is invalid.])
AC_MSG_NOTICE([Neither "$new_path" nor "$new_path.exe/cmd" can be found])
AC_MSG_ERROR([Cannot locate the the path of $1])
fi
else
input_to_shortpath="$new_path"
fi
# Call helper function which possibly converts this using DOS-style short mode.
# If so, the updated path is stored in $new_path.
new_path="$input_to_shortpath"
UTIL_MAKE_WINDOWS_SPACE_SAFE_CYGWIN([$input_to_shortpath])
# remove trailing .exe if any
new_path="${new_path/%.exe/}"
])
AC_DEFUN([UTIL_FIXUP_EXECUTABLE_MSYS],
[
# First separate the path from the arguments. This will split at the first
# space.
complete="[$]$1"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
# Input might be given as Windows format, start by converting to
# unix format.
new_path="$path"
UTIL_REWRITE_AS_UNIX_PATH(new_path)
# Now try to locate executable using which
new_path=`$WHICH "$new_path" 2> /dev/null`
if test "x$new_path" = x; then
# Oops. Which didn't find the executable.
# The splitting of arguments from the executable at a space might have been incorrect,
# since paths with space are more likely in Windows. Give it another try with the whole
# argument.
path="$complete"
arguments="EOL"
new_path="$path"
UTIL_REWRITE_AS_UNIX_PATH(new_path)
new_path=`$WHICH "$new_path" 2> /dev/null`
# bat and cmd files are not always considered executable in MSYS causing which
# to not find them
if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
new_path="$path"
UTIL_REWRITE_AS_UNIX_PATH(new_path)
fi
if test "x$new_path" = x; then
# It's still not found. Now this is an unrecoverable error.
AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
AC_MSG_NOTICE([You might be mixing spaces in the path and extra arguments, which is not allowed.])
fi
AC_MSG_ERROR([Cannot locate the the path of $1])
fi
fi
# Now new_path has a complete unix path to the binary
if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
# Keep paths in /bin as-is, but remove trailing .exe if any
new_path="${new_path/%.exe/}"
# Do not save /bin paths to all_fixpath_prefixes!
else
# Not in mixed or Windows style, start by that.
new_path=`cmd //c echo $new_path`
UTIL_MAKE_WINDOWS_SPACE_SAFE_MSYS([$new_path])
# Output is in $new_path
UTIL_REWRITE_AS_UNIX_PATH(new_path)
# remove trailing .exe if any
new_path="${new_path/%.exe/}"
# Save the first 10 bytes of this path to the storage, so fixpath can work.
all_fixpath_prefixes=("${all_fixpath_prefixes@<:@@@:>@}" "${new_path:0:10}")
fi
])
AC_DEFUN([UTIL_FIXUP_EXECUTABLE_WSL],
[
# First separate the path from the arguments. This will split at the first
# space.
complete="[$]$1"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
# Input might be given as Windows format, start by converting to
# unix format.
new_path="$path"
UTIL_REWRITE_AS_UNIX_PATH([new_path])
# Now try to locate executable using which
new_path_bak="$new_path"
new_path=`$WHICH "$new_path" 2> /dev/null`
# bat and cmd files are not considered executable in WSL
if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
new_path="$new_path_back"
fi
if test "x$new_path" = x; then
# Oops. Which didn't find the executable.
# The splitting of arguments from the executable at a space might have been incorrect,
# since paths with space are more likely in Windows. Give it another try with the whole
# argument.
path="$complete"
arguments="EOL"
new_path="$path"
UTIL_REWRITE_AS_UNIX_PATH([new_path])
new_path_bak="$new_path"
new_path=`$WHICH "$new_path" 2> /dev/null`
# bat and cmd files are not considered executable in WSL
if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
new_path="$new_path_bak"
fi
if test "x$new_path" = x; then
# It's still not found. Now this is an unrecoverable error.
AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
AC_MSG_NOTICE([You might be mixing spaces in the path and extra arguments, which is not allowed.])
fi
AC_MSG_ERROR([Cannot locate the the path of $1])
fi
fi
# In WSL, suffixes must be present for Windows executables
if test ! -f "$new_path"; then
# Try adding .exe or .cmd
if test -f "${new_path}.exe"; then
input_to_shortpath="${new_path}.exe"
elif test -f "${new_path}.cmd"; then
input_to_shortpath="${new_path}.cmd"
else
AC_MSG_NOTICE([The path of $1, which resolves as "$new_path", is invalid.])
AC_MSG_NOTICE([Neither "$new_path" nor "$new_path.exe/cmd" can be found])
AC_MSG_ERROR([Cannot locate the the path of $1])
fi
else
input_to_shortpath="$new_path"
fi
# Call helper function which possibly converts this using DOS-style short mode.
# If so, the updated path is stored in $new_path.
new_path="$input_to_shortpath"
UTIL_MAKE_WINDOWS_SPACE_SAFE_WSL([$input_to_shortpath])
])

View File

@@ -36,7 +36,7 @@ DEFAULT_VERSION_EXTRA3=0
DEFAULT_VERSION_DATE=2021-03-16
DEFAULT_VERSION_CLASSFILE_MAJOR=60 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
DEFAULT_VERSION_CLASSFILE_MINOR=0
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="14 15 16"
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="15 16"
DEFAULT_JDK_SOURCE_TARGET_VERSION=16
DEFAULT_PROMOTED_VERSION_PRE=ea

View File

@@ -177,6 +177,12 @@ define SetupJavaCompilationBody
$$(error Must specify BIN (in $1))
endif
ifneq ($$($1_MODULE), )
$1_MODULE_SUBDIR := /$$($1_MODULE)
endif
$1_SAFE_NAME := $$(strip $$(subst /,_, $1))
ifeq ($$($1_SMALL_JAVA), )
# If unspecified, default to true
$1_SMALL_JAVA := true
@@ -202,24 +208,42 @@ define SetupJavaCompilationBody
# If unspecified, default to the new jdk we're building
$1_TARGET_RELEASE := $$(TARGET_RELEASE_BOOTJDK)
endif
else ifeq ($$($1_COMPILER), buildjdk)
$1_JAVAC_CMD := $$(BUILD_JAVAC)
ifeq ($$($1_TARGET_RELEASE), )
# If unspecified, default to the new jdk we're building
$1_TARGET_RELEASE := $$(TARGET_RELEASE_NEWJDK)
endif
else ifeq ($$($1_COMPILER), interim)
# Use java server if it is enabled, and the user does not want a specialized
# class path.
ifeq ($$(ENABLE_JAVAC_SERVER)+$$($1_CLASSPATH), true+)
$1_JAVAC := $$(INTERIM_LANGTOOLS_ARGS) -m jdk.compiler.interim/com.sun.tools.sjavac.Main
# How to launch the server. This must use JAVA_DETACH, which is the "big" java
# with an ability to detach from fixpath (on Windows)
# This will be executed by the client, if needed.
$1_JAVAC_SERVER_CMD := $$(JAVA_DETACH) $$($1_JAVA_FLAGS) $$($1_JAVAC)
$1_ESCAPED_CMD := $$(subst $$(SPACE),%20,$$(subst $$(COMMA),%2C,$$(strip $$($1_JAVAC_SERVER_CMD))))
# Create a configuration file with the needed information for the javac
# server to function properly.
$1_JAVAC_SERVER_CONFIG := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$$($1_SAFE_NAME)-server.conf
# The port file contains the tcp/ip on which the server listens
# The portfile contains the tcp/ip on which the server listens
# and the cookie necessary to talk to the server.
$1_JAVA_SERVER_FLAGS := --server:portfile=$$(JAVAC_SERVER_DIR)/server.port,sjavac=$$($1_ESCAPED_CMD)
$1_JAVAC_PORT_FILE := $$(call FixPath, $$(JAVAC_SERVER_DIR)/server.port)
# Always use small to launch client
$1_JAVAC_CMD := $$(JAVA_SMALL) $$($1_JAVA_FLAGS) $$($1_JAVAC) $$($1_JAVA_SERVER_FLAGS)
# The servercmd specifies how to launch the server. This will be executed
# by the client, if needed.
$1_JAVAC_SERVER_CMD := $$(call FixPath, $$(JAVA) $$($1_JAVA_FLAGS) $$($1_JAVAC))
$1_CONFIG_VARDEPS := $$($1_JAVAC_PORT_FILE) $$($1_JAVAC_SERVER_CMD)
$1_CONFIG_VARDEPS_FILE := $$(call DependOnVariable, $1_CONFIG_VARDEPS, \
$$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1.config_vardeps)
$$($1_JAVAC_SERVER_CONFIG): $$($1_CONFIG_VARDEPS_FILE)
$(ECHO) portfile=$$($1_JAVAC_PORT_FILE) > $$@
$(ECHO) servercmd=$$($1_JAVAC_SERVER_CMD) >> $$@
# Always use small java to launch client
$1_JAVAC_CMD := $$(JAVA_SMALL) $$($1_JAVA_FLAGS) $$($1_JAVAC) \
--server:conf=$$($1_JAVAC_SERVER_CONFIG)
else
# No javac server
$1_JAVAC := $$(INTERIM_LANGTOOLS_ARGS) -m jdk.compiler.interim/com.sun.tools.javac.Main
@@ -256,10 +280,6 @@ define SetupJavaCompilationBody
$1_FLAGS += -cp $$(call PathList, $$($1_CLASSPATH))
endif
ifneq ($$($1_MODULE), )
$1_MODULE_SUBDIR := /$$($1_MODULE)
endif
# Make sure the dirs exist, or that one of the EXTRA_FILES, that may not
# exist yet, is in it.
$$(foreach d, $$($1_SRC), \
@@ -304,9 +324,11 @@ define SetupJavaCompilationBody
ifneq ($$($1_KEEP_DUPS), true)
# Remove duplicate source files by keeping the first found of each duplicate.
# This allows for automatic overrides with custom or platform specific versions
# source files.
# source files. Need to call DoubleDollar as we have java classes with '$' in
# their names.
$1_SRCS := $$(strip $$(foreach s, $$($1_SRCS), \
$$(eval relative_src := $$(call remove-prefixes, $$($1_SRC), $$(s))) \
$$(eval relative_src := $$(call remove-prefixes, $$($1_SRC), \
$$(call DoubleDollar, $$(s)))) \
$$(if $$($1_$$(relative_src)), \
, \
$$(eval $1_$$(relative_src) := 1) $$(s))))
@@ -322,9 +344,6 @@ define SetupJavaCompilationBody
$$(error No source files found for $1)
endif
else
$1_SAFE_NAME := $$(strip $$(subst /,_, $1))
# All files below META-INF are always copied.
$1_ALL_COPIES := $$(filter $$(addsuffix /META-INF%,$$($1_SRC)),$$($1_ALL_SRCS))
# Find all files to be copied from source to bin.
@@ -433,7 +452,7 @@ define SetupJavaCompilationBody
# Do the actual compilation
$$($1_COMPILE_TARGET): $$($1_SRCS) $$($1_FILELIST) $$($1_DEPENDS) \
$$($1_VARDEPS_FILE) $$($1_EXTRA_DEPS)
$$($1_VARDEPS_FILE) $$($1_EXTRA_DEPS) $$($1_JAVAC_SERVER_CONFIG)
$$(call MakeDir, $$(@D))
$$(call ExecuteWithLog, $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$$($1_SAFE_NAME)_batch, \
$$($1_JAVAC_CMD) $$($1_FLAGS) \

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -77,8 +77,10 @@ ifeq ($(STATIC_LIBS), true)
FindStaticLib =
endif
# Returns the module specific java header dir if it exists.
# Param 1 - module name
GetJavaHeaderDir = \
$(wildcard $(SUPPORT_OUTPUTDIR)/headers/$(strip $1))
$(if $(strip $1),$(wildcard $(SUPPORT_OUTPUTDIR)/headers/$(strip $1)))
# Process a dir description such as "java.base:headers" into a set of proper absolute paths.
ProcessDir = \
@@ -92,6 +94,16 @@ ProcessDir = \
) \
)
GLOBAL_VERSION_INFO_RESOURCE := $(TOPDIR)/src/java.base/windows/native/common/version.rc
JDK_RCFLAGS=$(RCFLAGS) \
-D"JDK_VERSION_STRING=$(VERSION_STRING)" \
-D"JDK_COMPANY=$(COMPANY_NAME)" \
-D"JDK_VER=$(VERSION_NUMBER_FOUR_POSITIONS)" \
-D"JDK_COPYRIGHT=Copyright \xA9 $(COPYRIGHT_YEAR)" \
-D"JDK_NAME=$(JDK_RC_NAME) $(VERSION_SHORT)" \
-D"JDK_FVER=$(subst .,$(COMMA),$(VERSION_NUMBER_FOUR_POSITIONS))"
# Setup make rules for creating a native shared library with suitable defaults
# for the OpenJDK project.
#
@@ -100,7 +112,7 @@ ProcessDir = \
#
# Remaining parameters are named arguments. These are all passed on to
# SetupNativeCompilation, except for
# EXTRA_RC_FLAGS -- additional RC_FLAGS to append.
# EXTRA_RCFLAGS -- additional RCFLAGS to append.
# EXTRA_HEADER_DIRS -- additional directories to look for headers in
# EXTRA_SRC -- additional directories to look for source in
# EXCLUDE_SRC_PATTERNS -- exclude source dirs matching these patterns from
@@ -108,19 +120,32 @@ ProcessDir = \
# HEADERS_FROM_SRC -- if false, does not add source dirs automatically as
# header include dirs. (Defaults to true.)
# SRC -- this is passed on, but preprocessed to accept source dir designations
# RC_FILEDESC -- override the default FILEDESC for Windows version.rc
# such as "java.base:headers".
SetupJdkLibrary = $(NamedParamsMacroTemplate)
define SetupJdkLibraryBody
ifeq ($$($1_OUTPUT_DIR), )
$1_OUTPUT_DIR := $$(call FindLibDirForModule, $$(MODULE))
ifneq ($$(MODULE), )
$1_OUTPUT_DIR := $$(call FindLibDirForModule, $$(MODULE))
else
$$(error Must specify OUTPUT_DIR in a MODULE free context)
endif
endif
ifeq ($$($1_OBJECT_DIR), )
$1_OBJECT_DIR := $$(SUPPORT_OUTPUTDIR)/native/$$(MODULE)/lib$$($1_NAME)
ifneq ($$(MODULE), )
$1_OBJECT_DIR := $$(SUPPORT_OUTPUTDIR)/native/$$(MODULE)/lib$$($1_NAME)
else
$$(error Must specify OBJECT_DIR in a MODULE free context)
endif
endif
ifeq ($$($1_SRC), )
$1_SRC := $$(call FindSrcDirsForLib, $$(MODULE), $$($1_NAME))
ifneq ($$(MODULE), )
$1_SRC := $$(call FindSrcDirsForLib, $$(MODULE), $$($1_NAME))
else
$$(error Must specify SRC in a MODULE free context)
endif
else
$1_SRC := $$(foreach dir, $$($1_SRC), $$(call ProcessDir, $$(dir)))
endif
@@ -137,23 +162,25 @@ define SetupJdkLibraryBody
ifeq ($$($1_VERSIONINFO_RESOURCE), )
$1_VERSIONINFO_RESOURCE := $$(GLOBAL_VERSION_INFO_RESOURCE)
else ifeq ($$($1_VERSIONINFO_RESOURCE), DISABLE)
$1_VERSIONINFO_RESOURCE :=
endif
ifeq ($$($1_RC_FLAGS), )
$1_RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=$$($1_NAME).dll" \
-D "JDK_INTERNAL_NAME=$$($1_NAME)" \
-D "JDK_FTYPE=0x2L"
else ifeq ($$($1_RC_FLAGS), DISABLE)
$1_RC_FLAGS :=
ifeq ($$($1_RC_FILEDESC), )
$1_RC_FILEDESC := $(JDK_RC_NAME) binary
endif
$1_RCFLAGS := $(JDK_RCFLAGS) \
-D"JDK_FILEDESC=$$(strip $$($1_RC_FILEDESC))" \
-D"JDK_FNAME=$$($1_NAME).dll" \
-D"JDK_INTERNAL_NAME=$$($1_NAME)" \
-D"JDK_FTYPE=0x2L" \
-I$(TOPDIR)/src/java.base/windows/native/common \
$$($1_EXTRA_RCFLAGS)
ifneq ($$($1_HEADERS_FROM_SRC), false)
$1_SRC_HEADER_FLAGS := $$(addprefix -I, $$(wildcard $$($1_SRC)))
endif
# Always add the java header dir
# Add the module specific java header dir
$1_SRC_HEADER_FLAGS += $$(addprefix -I, $$(call GetJavaHeaderDir, $$(MODULE)))
ifneq ($$($1_EXTRA_HEADER_DIRS), )
@@ -171,7 +198,6 @@ define SetupJdkLibraryBody
ifeq ($$($1_CFLAGS)$$($1_CXXFLAGS), )
$1_CFLAGS += $$($1_SRC_HEADER_FLAGS) $$($1_EXTRA_HEADER_FLAGS)
endif
$1_RC_FLAGS += $$($1_EXTRA_RC_FLAGS)
# Since we reuse the rule name ($1), all our arguments will pass through.
# We lose in transparency, but gain in brevity in this call...
@@ -186,35 +212,38 @@ endef
#
# Remaining parameters are named arguments. These are all passed on to
# SetupNativeCompilation, except for
# EXTRA_RC_FLAGS -- additional RC_FLAGS to append.
# EXTRA_RCFLAGS -- additional RCFLAGS to append.
SetupJdkExecutable = $(NamedParamsMacroTemplate)
define SetupJdkExecutableBody
$1_TYPE := EXECUTABLE
ifeq ($$($1_OUTPUT_DIR), )
$1_OUTPUT_DIR := $$(call FindExecutableDirForModule, $$(MODULE))
ifneq ($$(MODULE), )
$1_OUTPUT_DIR := $$(call FindExecutableDirForModule, $$(MODULE))
else
$$(error Must specify OUTPUT_DIR in a MODULE free context)
endif
endif
ifeq ($$($1_OBJECT_DIR), )
$1_OBJECT_DIR := $$(SUPPORT_OUTPUTDIR)/native/$$(MODULE)/$$($1_NAME)
ifneq ($$(MODULE), )
$1_OBJECT_DIR := $$(SUPPORT_OUTPUTDIR)/native/$$(MODULE)/$$($1_NAME)
else
$$(error Must specify OBJECT_DIR in a MODULE free context)
endif
endif
ifeq ($$($1_VERSIONINFO_RESOURCE), )
$1_VERSIONINFO_RESOURCE := $$(GLOBAL_VERSION_INFO_RESOURCE)
else ifeq ($$($1_VERSIONINFO_RESOURCE), DISABLE)
$1_VERSIONINFO_RESOURCE :=
endif
ifeq ($$($1_RC_FLAGS), )
$1_RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=$$($1_NAME).exe" \
-D "JDK_INTERNAL_NAME=$$($1_NAME)" \
-D "JDK_FTYPE=0x01L"
else ifeq ($$($1_RC_FLAGS), DISABLE)
$1_RC_FLAGS :=
endif
$1_RC_FLAGS += $$($1_EXTRA_RC_FLAGS)
$1_RCFLAGS := $(JDK_RCFLAGS) \
-D"JDK_FILEDESC=$(JDK_RC_NAME) binary" \
-D"JDK_FNAME=$$($1_NAME).exe" \
-D"JDK_INTERNAL_NAME=$$($1_NAME)" \
-D"JDK_FTYPE=0x1L" \
-I$(TOPDIR)/src/java.base/windows/native/common \
$$($1_EXTRA_RCFLAGS)
# Since we reuse the rule name ($1), all our arguments will pass through.
# We lose in transparency, but gain in brevity in this call...

View File

@@ -64,6 +64,9 @@ define NEWLINE
endef
# Make sure we have a value (could be overridden on command line by caller)
CREATING_BUILDJDK ?= false
# Certain features only work in newer version of GNU Make. The build will still
# function in 3.81, but will be less performant.
ifeq (4.0, $(firstword $(sort 4.0 $(MAKE_VERSION))))
@@ -89,7 +92,7 @@ BUILDTIMESDIR=$(OUTPUTDIR)/make-support/build-times
# Record starting time for build of a sub repository.
define RecordStartTime
$(DATE) '+%Y %m %d %H %M %S' | $(NAWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_start_$(strip $1) && \
$(DATE) '+%Y %m %d %H %M %S' | $(AWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_start_$(strip $1) && \
$(DATE) '+%Y-%m-%d %H:%M:%S' > $(BUILDTIMESDIR)/build_time_start_$(strip $1)_human_readable
endef
@@ -97,10 +100,10 @@ endef
# easy to read format. Handles builds that cross midnight. Expects
# that a build will never take 24 hours or more.
define RecordEndTime
$(DATE) '+%Y %m %d %H %M %S' | $(NAWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_end_$(strip $1)
$(DATE) '+%Y %m %d %H %M %S' | $(AWK) '{ print $$1,$$2,$$3,$$4,$$5,$$6,($$4*3600+$$5*60+$$6) }' > $(BUILDTIMESDIR)/build_time_end_$(strip $1)
$(DATE) '+%Y-%m-%d %H:%M:%S' > $(BUILDTIMESDIR)/build_time_end_$(strip $1)_human_readable
$(ECHO) `$(CAT) $(BUILDTIMESDIR)/build_time_start_$(strip $1)` `$(CAT) $(BUILDTIMESDIR)/build_time_end_$(strip $1)` $1 | \
$(NAWK) '{ F=$$7; T=$$14; if (F > T) { T+=3600*24 }; D=T-F; H=int(D/3600); \
$(AWK) '{ F=$$7; T=$$14; if (F > T) { T+=3600*24 }; D=T-F; H=int(D/3600); \
M=int((D-H*3600)/60); S=D-H*3600-M*60; printf("%02d:%02d:%02d %s\n",H,M,S,$$15); }' \
> $(BUILDTIMESDIR)/build_time_diff_$(strip $1)
endef
@@ -436,37 +439,18 @@ endif
# On Windows, converts a path from cygwin/unix style (e.g. /bin/foo) into
# "mixed mode" (e.g. c:/cygwin/bin/foo). On other platforms, return the path
# unchanged.
# This also converts a colon-separated list of paths to a semicolon-separated
# list.
# This is normally not needed since we use the FIXPATH prefix for command lines,
# but might be needed in certain circumstances.
ifeq ($(call isTargetOs, windows), true)
ifeq ($(call isBuildOsEnv, windows.wsl), true)
FixPath = \
$(shell $(WSLPATH) -m $1)
else
FixPath = \
$(shell $(CYGPATH) -m $1)
endif
FixPath = \
$(strip $(subst \,\\, $(shell $(FIXPATH_BASE) print $(patsubst $(FIXPATH), , $1))))
else
FixPath = \
$1
endif
################################################################################
# FixPathList
#
# On Windows, converts a cygwin/unix style path list (colon-separated) into
# the native format (mixed mode, semicolon-separated). On other platforms,
# return the path list unchanged.
################################################################################
ifeq ($(call isTargetOs, windows), true)
FixPathList = \
$(subst @,$(SPACE),$(subst $(SPACE),;,$(foreach entry,$(subst :,$(SPACE),\
$(subst $(SPACE),@,$(strip $1))),$(call FixPath, $(entry)))))
else
FixPathList = \
$1
endif
################################################################################
# DependOnVariable
#
@@ -484,7 +468,7 @@ endif
# Defines the sub directory structure to store variable value file in
DependOnVariableDirName = \
$(strip $(addsuffix $(if $(MODULE),/$(MODULE)), \
$(subst $(TOPDIR)/,, $(if $(filter /%, $(firstword $(MAKEFILE_LIST))), \
$(subst $(WORKSPACE_ROOT)/,, $(if $(filter /%, $(firstword $(MAKEFILE_LIST))), \
$(firstword $(MAKEFILE_LIST)), \
$(CURDIR)/$(firstword $(MAKEFILE_LIST))))))
@@ -496,6 +480,13 @@ DependOnVariableFileName = \
$(strip $(if $(strip $2), $2, \
$(MAKESUPPORT_OUTPUTDIR)/vardeps/$(DependOnVariableDirName)/$(strip $1).vardeps))
# Writes the vardeps file. Assumes $1_filename has been setup
# Param 1 - Name of variable
DependOnVariableWriteFile = \
$(call MakeDir, $(dir $($1_filename))) \
$(call WriteFile, $1_old:=$(call DoubleDollar,$(call EscapeHash,$($1))), \
$($1_filename)) \
# Does the actual work with parameters stripped.
# If the file exists AND the contents is the same as the variable, do nothing
# else print a new file.
@@ -505,14 +496,18 @@ DependOnVariableFileName = \
DependOnVariableHelper = \
$(strip \
$(eval $1_filename := $(call DependOnVariableFileName, $1, $2)) \
$(if $(wildcard $($1_filename)), $(eval include $($1_filename))) \
$(if $(call equals, $(strip $($1)), $(strip $($1_old))),,\
$(call MakeDir, $(dir $($1_filename))) \
$(if $(findstring $(LOG_LEVEL), trace), \
$(info NewVariable $1: >$(strip $($1))<) \
$(info OldVariable $1: >$(strip $($1_old))<)) \
$(call WriteFile, $1_old:=$(call DoubleDollar,$(call EscapeHash,$($1))), \
$($1_filename))) \
$(if $(wildcard $($1_filename)), \
$(eval include $($1_filename)) \
$(if $(call equals, $(strip $($1)), $(strip $($1_old))),,\
$(if $(findstring $(LOG_LEVEL), trace), \
$(info NewVariable $1: >$(strip $($1))<) \
$(info OldVariable $1: >$(strip $($1_old))<) \
) \
$(call DependOnVariableWriteFile,$1) \
) \
, \
$(call DependOnVariableWriteFile,$1) \
) \
$($1_filename) \
)

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