20492 Commits

Author SHA1 Message Date
Ehsan Behrangi
00cc9be854 8381560: AArch64: Optimize String.equals intrinsic
This change improves the AArch64 implementation of String.equals by
introducing SIMD-based fast paths using SVE and NEON.

SVE implementation:
- Uses predicated loads and comparisons for short lengths (len < VL)
- Uses a full predicated loop for longer inputs
- Handles the tail via an overlapped compare at (base + len - VL)

NEON implementation:
- Uses an 8-byte pre-read to simplify tail handling and eliminate
  4/2/1-byte scalar branches
- Processes 16-byte chunks using LDP pair loads
- Uses CMP/CCMP to collapse comparisons into a single branch on mismatch

These changes reduce branch pressure and improve throughput for both
short and long strings.

Correctness:
- The implementation preserves existing semantics and matches behavior
  for all lengths

Testing:
- Updated and extended intrinsic tests to cover boundary conditions
  and mismatch positions

Benchmark:
Across evaluated macrobenchmarks (DaCapo and Renaissance), most workloads
spend <0.5% of CPU time in String.equals. DaCapo biojava is a notable
exception (~8–9%). In biojava, most String.equals calls are on very short
strings (1–2 bytes), where SVE shows ~1% end-to-end improvement, while
NEON is largely neutral or shows a small regression (~1%).

Measured using JMH on AArch64 (Arm Neoverse V2 CPU).
Values are relative (%) vs baseline. Negative values indicate regressions.
Mismatch results are reported across first(DF), middle(DM),
and last(DL) difference positions.

SVE results:
Length | L1_EQ  L1_DF  L1_DM  L1_DL | U16_EQ U16_DF U16_DM U16_DL | Avg
-------+----------------------------+-----------------------------+------
0      | 19.63                      | 20.05                      | 19.84
1      | 16.59  17.81  16.57  18.34 | 16.02   0.71   0.42   1.39 | 10.98
2      | 16.44   1.32   0.30  -0.16 | 15.90  -5.17  -4.55  -1.09 |  2.87
3      | 26.58   1.60   1.43  27.07 | 30.34  -8.86  -7.06  14.08 | 10.65
7      | 41.47  -2.94  -3.37  39.82 | 24.02  -8.82  -6.27  20.48 | 13.05
8      | 19.08  -1.16  -3.50  -0.90 | 22.49  -9.75  17.50  13.13 |  7.11
9      | 20.17  -4.12  -5.17  19.03 |  9.25  -2.24  21.35   3.39 |  7.71
15     | 19.48  -3.83  -4.50  19.01 | 29.26 -10.06  11.76  17.07 |  9.77
16     | 19.04  -3.15  16.41  16.85 | 38.37 -11.12  13.18  27.70 | 14.66
17     |  8.95  -2.40   5.68   6.38 | 16.32  -1.61   7.49  11.44 |  6.53
31     | 28.87  -0.01  19.79  23.37 | 41.43  -7.57  23.85  35.89 | 20.70
32     | 32.58   3.38  12.39  26.90 | 46.01 -10.99  20.53  44.15 | 21.87
33     | 11.62 -15.20   6.04  13.27 | 32.27  -9.38  20.33  32.28 | 11.40
63     | 44.66 -11.59  37.20  42.56 | 55.41 -10.57  43.19  55.90 | 32.10
64     | 53.99  -2.19  27.04  51.79 | 59.36  -8.72  35.41  60.32 | 34.63
65     | 33.79 -14.01  23.95  29.15 | 48.91 -11.58  36.54  50.03 | 24.60
127    | 62.10  -3.79  47.51  62.79 | 58.13  -8.89  60.68  60.90 | 42.43
128    | 67.38  -2.47  38.62  67.09 | 62.83  -0.38  51.72  61.87 | 43.33
129    | 52.02  -1.42  39.17  49.20 | 55.04  -9.52  53.23  52.81 | 36.32
256    | 66.11  -1.38  56.12  64.93 | 70.67  -3.68  53.67  74.54 | 47.62

Average:
         33.03  -2.40  17.46  30.34 | 37.60  -7.27  23.84  33.49 | 20.91

NEON results:
Length | L1_EQ  L1_DF  L1_DM  L1_DL | U16_EQ U16_DF U16_DM U16_DL | Avg
-------+----------------------------+-----------------------------+------
0      |  9.22                      |  8.69                      |  8.95
1      |  3.07   3.59   1.34   5.42 |  6.36  -6.20  -6.71 -10.59 | -0.47
2      |  3.23  -4.79  -5.67  -4.09 |  8.06  -8.43  -9.89  -9.20 | -3.85
3      | 12.80  -4.16  -3.95  11.28 | 11.94 -14.50 -14.41  11.83 |  1.36
7      | 31.00  -7.21 -12.76  33.59 |  4.73 -17.67 -17.38   1.65 |  1.99
8      |  4.43  -7.20  -4.70  -6.73 |  2.71 -18.05  -3.17  -4.05 | -4.59
9      | -9.33 -19.90 -16.27  -1.80 | 16.65 -23.72   4.26   8.78 | -5.17
15     | -6.96 -16.17 -15.60  -4.01 |  7.46 -24.60  -3.19  77.82 |  1.84
16     |  2.48 -16.38  -2.56  -3.62 |  9.08 -19.29  -5.45  77.93 |  5.27
17     |  4.88 -18.85  -0.18  19.35 | 18.43 -19.80  -8.37  84.96 | 10.05
31     |  6.92 -21.13  -4.62  60.71 | 24.42 -21.81   9.48 188.59 | 30.32
32     |  7.75 -24.20  -5.29  68.23 | 25.33 -20.57   4.17 183.65 | 29.88
33     | 20.23 -20.42 -11.33  98.60 | 23.76 -24.76   5.97 188.57 | 35.08
63     | 30.25 -22.30  14.29 152.37 | 25.02 -28.37  21.43 419.68 | 76.55
64     | 28.99 -22.91   9.03 185.51 | 38.20 -22.82  19.76 446.60 | 85.29
65     | 16.13 -21.77   1.45 211.38 | 27.94 -24.79  17.50 446.80 | 84.33
127    | 33.69 -28.94  28.75 429.23 | 41.75 -24.86  37.35 832.68 |168.71
128    | 26.28 -29.03  24.13 432.87 | 43.48 -18.53  26.44 810.20 |164.48
129    | 27.73 -20.30  20.84 439.01 | 44.09 -22.35  30.09 827.38 |168.31
256    | 53.30 -20.27  26.09 841.37 | 56.66 -21.07  47.41 1604.98|323.56

Average:
         15.30 -16.97   2.26 156.24 | 22.24 -20.12   8.17 325.70 | 59.10

Observations:
- SVE shows consistent improvements across all tested lengths, with gains
  increasing as input size grows
- NEON improves equal-string performance across all lengths
- NEON shows regressions for short mismatched inputs due to the loss
  of the scalar tbz-based early-exit sequence, which efficiently
  detects mismatches at small sizes and at early positions
- The scalar implementation relies on a branchy 4/2/1 tbz ladder,
  which is efficient for early mismatches but suboptimal for equal
  strings
- The NEON implementation replaces this with a branchless SIMD
  approach and performs upfront comparisons of the first and last
  8 bytes, improving throughput and late-mismatch detection
2026-06-05 12:22:15 +01:00
Thomas Schatzl
5719b671a2 8385369: G1: Concurrent Cleanup For Next Mark accesses uncommitted bitmaps after region uncommit
Reviewed-by: aboldtch, manc
2026-06-05 07:33:51 +00:00
Emanuel Peter
cc69221519 8381618: VectorExpressionFuzzer.java: enable test for all platforms
Reviewed-by: vlivanov, mhaessig
2026-06-05 05:44:21 +00:00
Xueming Shen
9229878648 8385355: NullPointerException in jdk.tools.jlink.internal.ImageResourcesTree after JDK-8377070
Co-authored-by: David Beaumont <dbeaumont@openjdk.org>
Reviewed-by: alanb
2026-06-05 00:10:44 +00:00
Chad Rakoczy
cf78a2a89a 8384606: HotCodeHeap tests require C2
Reviewed-by: shade, kvn
2026-06-04 19:36:30 +00:00
Phil Race
aa98d5d20b 8385100: Null pointer dereference in java.desktop/windows/classes/sun/print/Win32PrintJob.java:606 and other PrintJob implementations
Reviewed-by: psadhukhan, kizune
2026-06-04 19:09:19 +00:00
Nizar Benalla
ca52afa38e 8384833: Start of release updates for JDK 28
8384838: Add SourceVersion.RELEASE_28
8384842: Add source 28 and target 28 to javac

Reviewed-by: iris, darcy, erikj, dholmes
2026-06-04 16:06:29 +00:00
Manuel Hässig
f8f7ad28ba 8381235: TestCompileTaskTimeout intermittently fails due to unexpected exit code 1
Reviewed-by: dlong, kvn
2026-06-04 15:01:15 +00:00
Jan Lahoda
ee53e7569e 8381812: The synthetic $deserializeLambda$ is notably bigger
Reviewed-by: mcimadamore
2026-06-04 12:04:03 +00:00
Per Minborg
d47d729c9b 8384648: LazyConstantTest::interruptStatusIsPreservedForComputingThread fails
Reviewed-by: jvernee
2026-06-04 07:59:21 +00:00
Manuel Hässig
8fad96dea3 8377808: compiler/c2/irTests/TestFloat16ScalarOperations.java is fragile in the presence of special constants
Reviewed-by: qamai, epeter, syan, jbhateja
2026-06-04 07:51:20 +00:00
Cesar Soares Lucas
b7e26358f6 8384442: Shenandoah: Remove vestigial CAS barrier code
Reviewed-by: fyang, shade
2026-06-04 02:45:01 +00:00
Daniel Gredler
7ebfc031bc 8269888: Thai text rendered incorrectly using some AffineTransform-derived fonts
Reviewed-by: prr, psadhukhan
2026-06-03 22:07:46 +00:00
Alexey Ivanov
24d31296e1 8372546: UnixMultiResolutionSplashTest.java fails intermittently on Ubuntu_24.04
Remove .../unix/UnixMultiResolutionSplashTest.java

Reviewed-by: syan, prr
2026-06-03 18:46:54 +00:00
Phil Race
9f83006f10 8378464: PixelInterleavedSampleModel constructors and methods do not specify behavior when arguments are null or out of bounds
Reviewed-by: kizune, psadhukhan
2026-06-03 18:32:56 +00:00
Anthony Scarpino
e70e691307 8377506: Implement JEP 538: PEM Encodings of Cryptographic Objects (Third Preview)
Reviewed-by: weijun, mullan
2026-06-03 17:06:31 +00:00
Robert Toyonaga
79923019f5 8334403: Unify behavior of os::committed_in_range across OSes
Reviewed-by: stuefe, jsjolen
2026-06-03 16:05:09 +00:00
Dusan Balek
7a7f37f0e5 8385828: The javac benchmarks fail after JDK-8385347
Reviewed-by: asotona, syan
2026-06-03 15:27:07 +00:00
Ivan Walulya
85db081db4 8379846: G1: IHOP Allocation rate calculation too sensitive to outliers causing endless concurrent cycles
Co-authored-by: Thomas Schatzl <tschatzl@openjdk.org>
Reviewed-by: tschatzl, aboldtch
2026-06-03 14:04:11 +00:00
Vladimir Petko
2688bf7305 8385738: Javadoc does not produce reproducible output due to the snippet ids
Reviewed-by: nbenalla
2026-06-03 06:35:57 +00:00
Erik Gahlin
39de79eae2 8367584: Implement JEP 536: JFR In-Process Data Redaction
Reviewed-by: mgronlun
2026-06-03 06:33:32 +00:00
Alexander Matveev
f630ab0e5f 8384250: [macos] Test tools/jpackage/share/AsyncTest.java failed
Reviewed-by: asemenyuk
2026-06-02 22:35:48 +00:00
Anthony Scarpino
43d80fd192 8329548: Change KeyUpdate messages from TLS 1.3
Reviewed-by: jnimeh
2026-06-02 21:42:24 +00:00
Naoto Sato
4192f9bf2e 8385736: Optimize ListFormat custom pattern parsing
Reviewed-by: jlu
2026-06-02 20:27:12 +00:00
Quan Anh Mai
1e67c84b66 8382936: C2: Load folding must not drop Type information
Reviewed-by: kvn, vlivanov
2026-06-02 15:26:28 +00:00
Roman Marchenko
c469bb2cd7 8383867: File.getCanonicalPath drops backslash from UNC path with directory junctions
Reviewed-by: alanb
2026-06-02 14:54:16 +00:00
Stefan Karlsson
cb502e7993 8385747: Test gc/g1/TestGCLogMessages.java failed: 'Update Derived Pointers' found in stdout
Reviewed-by: dholmes, tschatzl
2026-06-02 14:46:25 +00:00
Eric Fang
9c244ec182 8382532: C2: VectorAPI: disable VectorMaskCmp-not optimization for predicated compares
Reviewed-by: epeter, vlivanov
2026-06-02 06:37:35 +00:00
Jaikiran Pai
207dc4e82f 8322256: Define and document GZIPInputStream concatenated stream semantics
Reviewed-by: lancea, alanb, simonis
2026-06-02 04:37:09 +00:00
Shiv Shah
70c92d6c2b 8382275: Update nsk/stress/jni to use ThreadWrapper
Reviewed-by: lmesnik, syan
2026-06-01 18:37:35 +00:00
Brian Burkhalter
a23ce9cd30 8379535: test/jdk/java/io/File/ListRoots.java fails with RuntimeException: Does not match FileSystem::getRootDirectories
Reviewed-by: alanb
2026-06-01 17:48:51 +00:00
Patricio Chilano Mateo
b2bf91bf12 8376621: Should not suspend thread in start_transition if _is_disable_suspend set
Reviewed-by: dholmes, sspitsyn
2026-06-01 17:36:17 +00:00
Jan Lahoda
9acd9f8790 8381965: NullPointerException in TypeAnnotationPositions
Reviewed-by: mcimadamore
2026-06-01 11:17:01 +00:00
Jatin Bhateja
3f2002d488 8384507: Incorrect vector reassociation for signed saturating addition
Reviewed-by: shade, epeter
2026-06-01 08:27:38 +00:00
Manuel Hässig
2820c789fa 8385408: C2: no reachable node should have no use
Reviewed-by: dlong, kvn
2026-06-01 07:26:30 +00:00
Johan Sjölen
9536b7f6c0 8384964: Add an entry count to the MallocSiteTable
Reviewed-by: coleenp, fbredberg
2026-06-01 07:17:50 +00:00
Emanuel Peter
62843fcdce 8346420: C2: IfNode::fold_compares_helper() wrongly folds two CmpI nodes to a single CmpU node
Reviewed-by: roland, qamai, galder
2026-06-01 06:56:33 +00:00
Ashay Rane
7b2845eab4 8384087: Test tools/jpackage/junit/share/jdk.jpackage/jdk/jpackage/internal/cli/MainTest.java fails
Reviewed-by: almatvee, asemenyuk
2026-06-01 00:26:50 +00:00
William Kemper
d3073b53d3 8385610: Shenandoah: TestSoftMaxHeapSizeAvailableCalc should have more tolerance for other GC triggers
Reviewed-by: kdnilsen, xpeng, syan, ruili
2026-05-30 02:08:31 +00:00
Ashay Rane
b66dcc9474 8385345: AWT and ImageIO shell tests fail when run using MSys/MinGW
Reviewed-by: prr, macarte
2026-05-29 23:38:31 +00:00
Shiv Shah
0eeacb5b38 8382130: Remove test/failure_handler/Makefile
Reviewed-by: lmesnik, erikj, syan
2026-05-29 21:47:12 +00:00
Alexander Matveev
1618bf4254 8382025: [lworld] tools/jpackage/share/AsyncTest.java fails with An error of type -10810 has occurred
Reviewed-by: asemenyuk
2026-05-29 20:01:20 +00:00
Aleksey Shipilev
8f8f9b4637 8385179: Shenandoah: Simplify and optimize string deduplication
Reviewed-by: wkemper, xpeng, kdnilsen, rkennke
2026-05-29 19:50:29 +00:00
Phil Race
cd0b9fbeec 8383605: Incomplete input validation on the bands parameters in j.a.i.Raster
Reviewed-by: aivanov, jdv, avu
2026-05-29 18:42:17 +00:00
Phil Race
c09e403385 8381007: MultiPixelPackedSampleModel can throw ArithmeticException
Reviewed-by: jdv, azvegint, serb
2026-05-29 18:41:55 +00:00
Shiv Shah
2baa87be25 8316466: 8 com/sun/jdi tests ignore VM flags
Reviewed-by: lmesnik, sspitsyn
2026-05-29 18:06:13 +00:00
Phil Race
05244e8d37 8385347: Remove AppContext from SunToolkit and also remove AppContext
Reviewed-by: azvegint, serb, kizune
2026-05-29 17:43:23 +00:00
Rajan Halade
08ecb87b3d 8374886: CAInterop.java#microsoftrsa2017 test fails as EE certificate does not specify OCSP responder
Reviewed-by: mullan
2026-05-29 17:22:28 +00:00
Rajan Halade
4a0a8587db 8385584: CAInterop.java#buypassclass3ca fails with Intermediate Root CA not found in the chain
Reviewed-by: mullan
2026-05-29 17:19:54 +00:00
Chris Plummer
2fa9eb6764 8375076: Two JDI scenario tests are failing with out of wait time after completing successfully
Reviewed-by: sspitsyn, dholmes
2026-05-29 17:05:56 +00:00