42 Commits

Author SHA1 Message Date
Bhavana Kilambi
513b1f1d82 AArch64 SVE implementation for Arrays.sort
This patch adds an SVE implementation of primitive array sorting
(Arrays.sort()) on AArch64 systems that support SVE. On non-SVE machines,
we fall back to the existing Java implementation.

For smaller arrays (length <= 64), we use insertion sort;
for larger arrays we use an SVE-vectorized quicksort partitioner
followed by an odd-even transposition cleanup pass.

The SVE path is enabled by default for int type.
For float type, it is available through the experimental flag :

-XX:+UnlockExperimentalVMOptions -XX:+UseSVELibSimdSortForFP

Without this flag being enabled, the default Java implementation would
be executed for floats (the flag is disabled by default).

Float is gated due to observed regressions on some small/medium sizes.
On larger arrays, the SVE float path shows upto 1.47x speedup on
Neoverse V2 and 2.12x on Neoverse V1.

Following are the performance numbers for ArraysSort JMH benchmark -

Case A: Ratio between the scores of master branch and
UseSVELibSimdSortForFP flag disabled (which is the default).
Case B: Ratio between the scores of master branch and
UseSVELibSimdSortForFP flag enabled (the int numbers will be the same
but this now enables SVE vectorized sorting for floats).

We would want the ratios to be >= 1 to be at par or better than the
default Java implementation (master branch).

On Neoverse V1:

Benchmark                       (size)   Mode    Cnt    A       B
ArraysSort.floatParallelSort    10       avgt    3      0.98    0.98
ArraysSort.floatParallelSort    25       avgt    3      1.01    0.83
ArraysSort.floatParallelSort    50       avgt    3      0.99    0.55
ArraysSort.floatParallelSort    75       avgt    3      0.99    0.66
ArraysSort.floatParallelSort    100      avgt    3      0.98    0.66
ArraysSort.floatParallelSort    1000     avgt    3      1.00    0.84
ArraysSort.floatParallelSort    10000    avgt    3      1.03    1.52
ArraysSort.floatParallelSort    100000   avgt    3      1.03    1.46
ArraysSort.floatParallelSort    1000000  avgt    3      0.98    1.81
ArraysSort.floatSort            10       avgt    3      1.00    0.98
ArraysSort.floatSort            25       avgt    3      1.00    0.81
ArraysSort.floatSort            50       avgt    3      0.99    0.56
ArraysSort.floatSort            75       avgt    3      0.99    0.65
ArraysSort.floatSort            100      avgt    3      0.98    0.70
ArraysSort.floatSort            1000     avgt    3      0.99    0.84
ArraysSort.floatSort            10000    avgt    3      0.99    1.72
ArraysSort.floatSort            100000   avgt    3      1.00    1.94
ArraysSort.floatSort            1000000  avgt    3      1.00    2.13
ArraysSort.intParallelSort      10       avgt    3      1.08    1.08
ArraysSort.intParallelSort      25       avgt    3      1.04    1.05
ArraysSort.intParallelSort      50       avgt    3      1.29    1.30
ArraysSort.intParallelSort      75       avgt    3      1.16    1.16
ArraysSort.intParallelSort      100      avgt    3      1.07    1.07
ArraysSort.intParallelSort      1000     avgt    3      1.13    1.13
ArraysSort.intParallelSort      10000    avgt    3      1.49    1.38
ArraysSort.intParallelSort      100000   avgt    3      1.64    1.62
ArraysSort.intParallelSort      1000000  avgt    3      2.26    2.27
ArraysSort.intSort              10       avgt    3      1.08    1.08
ArraysSort.intSort              25       avgt    3      1.02    1.02
ArraysSort.intSort              50       avgt    3      1.25    1.25
ArraysSort.intSort              75       avgt    3      1.16    1.20
ArraysSort.intSort              100      avgt    3      1.07    1.07
ArraysSort.intSort              1000     avgt    3      1.12    1.13
ArraysSort.intSort              10000    avgt    3      1.94    1.95
ArraysSort.intSort              100000   avgt    3      1.86    1.86
ArraysSort.intSort              1000000  avgt    3      2.09    2.09
On Neoverse V2:

Benchmark                       (size)   Mode    Cnt    A       B
ArraysSort.floatParallelSort    10       avgt    3      1.02    1.02
ArraysSort.floatParallelSort    25       avgt    3      0.97    0.71
ArraysSort.floatParallelSort    50       avgt    3      0.94    0.65
ArraysSort.floatParallelSort    75       avgt    3      0.96    0.82
ArraysSort.floatParallelSort    100      avgt    3      0.95    0.84
ArraysSort.floatParallelSort    1000     avgt    3      1.01    0.94
ArraysSort.floatParallelSort    10000    avgt    3      1.01    1.25
ArraysSort.floatParallelSort    100000   avgt    3      1.01    1.09
ArraysSort.floatParallelSort    1000000  avgt    3      1.00    1.10
ArraysSort.floatSort            10       avgt    3      1.02    1.00
ArraysSort.floatSort            25       avgt    3      0.99    0.76
ArraysSort.floatSort            50       avgt    3      0.97    0.66
ArraysSort.floatSort            75       avgt    3      1.01    0.83
ArraysSort.floatSort            100      avgt    3      1.00    0.85
ArraysSort.floatSort            1000     avgt    3      0.99    0.93
ArraysSort.floatSort            10000    avgt    3      1.00    1.28
ArraysSort.floatSort            100000   avgt    3      1.00    1.37
ArraysSort.floatSort            1000000  avgt    3      1.00    1.48
ArraysSort.intParallelSort      10       avgt    3      1.05    1.05
ArraysSort.intParallelSort      25       avgt    3      0.99    0.84
ArraysSort.intParallelSort      50       avgt    3      1.03    1.14
ArraysSort.intParallelSort      75       avgt    3      0.91    0.99
ArraysSort.intParallelSort      100      avgt    3      0.98    0.96
ArraysSort.intParallelSort      1000     avgt    3      1.32    1.30
ArraysSort.intParallelSort      10000    avgt    3      1.40    1.40
ArraysSort.intParallelSort      100000   avgt    3      1.00    1.04
ArraysSort.intParallelSort      1000000  avgt    3      1.15    1.14
ArraysSort.intSort              10       avgt    3      1.05    1.05
ArraysSort.intSort              25       avgt    3      1.03    1.03
ArraysSort.intSort              50       avgt    3      1.08    1.14
ArraysSort.intSort              75       avgt    3      0.88    0.98
ArraysSort.intSort              100      avgt    3      1.01    0.99
ArraysSort.intSort              1000     avgt    3      1.3     1.32
ArraysSort.intSort              10000    avgt    3      1.43    1.43
ArraysSort.intSort              100000   avgt    3      1.30    1.30
ArraysSort.intSort              1000000  avgt    3      1.37    1.37
2025-12-05 14:23:12 +00:00
Matthias Baesken
82bdef1639 8367913: LIBDL dependency seems to be not needed for some jdk libs
Reviewed-by: aivanov, ihse, clanger, mdoerr
2025-09-23 15:07:59 +00:00
Jiangli Zhou
acd93df612 8355080: java.base/jdk.internal.foreign.SystemLookup.find() doesn't work on static JDK
Reviewed-by: mcimadamore, jvernee
2025-04-28 18:55:26 +00:00
Jiangli Zhou
a21fa463c4 8351309: test/hotspot/jtreg/runtime/posixSig/TestPosixSig.java fails on static-jdk
Reviewed-by: manc, ihse, stuefe
2025-03-12 14:40:43 +00:00
Harald Eilertsen
b957e5ed1a 8351322: Parameterize link option for pthreads
Reviewed-by: erikj, ihse, dholmes
2025-03-11 15:11:10 +00:00
Magnus Ihse Bursie
964dd18fd2 8349515: [REDO] Framework for tracing makefile inclusion and parsing
Reviewed-by: erikj
2025-02-11 10:55:47 +00:00
David Holmes
64bd8d2592 8349511: [BACKOUT] Framework for tracing makefile inclusion and parsing
Reviewed-by: darcy, mikael
2025-02-06 02:51:12 +00:00
Magnus Ihse Bursie
61465883b4 8348190: Framework for tracing makefile inclusion and parsing
Reviewed-by: erikj
2025-02-05 11:17:08 +00:00
Magnus Ihse Bursie
66945e5010 8339336: Fix build system whitespace to adhere to coding conventions
Reviewed-by: erikj
2024-09-03 15:31:09 +00:00
Magnus Ihse Bursie
a528c4b370 8339156: Use more fine-granular clang unused warnings
Reviewed-by: erikj, kbarrett
2024-08-30 16:43:16 +00:00
Magnus Ihse Bursie
362f9ce077 8339120: Use more fine-granular gcc unused warnings
Reviewed-by: jwaters, kbarrett, erikj
2024-08-29 07:29:12 +00:00
Magnus Ihse Bursie
f0bffbce35 8333301: Remove static builds using --enable-static-build
Reviewed-by: sgehwolf, erikj
2024-06-03 10:03:42 +00:00
Magnus Ihse Bursie
61fa4d45b6 8330351: Remove the SHARED_LIBRARY and STATIC_LIBRARY macros
Reviewed-by: erikj
2024-04-16 13:51:14 +00:00
Magnus Ihse Bursie
16061874ff 8326947: Minimize MakeBase.gmk
Reviewed-by: erikj
2024-04-11 14:15:34 +00:00
Magnus Ihse Bursie
f0cd866a37 8329704: Implement framework for proper handling of JDK_LIBS
Reviewed-by: erikj, jwaters
2024-04-11 09:40:12 +00:00
Magnus Ihse Bursie
3f4b167c97 8329672: Only call SetupNativeCompilation from SetupJdkNativeCompilation
Reviewed-by: erikj
2024-04-05 08:37:41 +00:00
Magnus Ihse Bursie
26b2ec4847 8328824: Clean up java.base native compilation
Reviewed-by: erikj
2024-03-25 15:04:38 +00:00
Magnus Ihse Bursie
9e98118f28 8328177: Move LDFLAGS_JDK[LIB/EXE] to JdkNativeCompilation.gmk
Reviewed-by: erikj
2024-03-18 14:41:51 +00:00
Magnus Ihse Bursie
bfba4894e1 8328157: Move C[XX]FLAGS_JDK[LIB/EXE] to JdkNativeCompilation.gmk
Reviewed-by: erikj
2024-03-15 14:36:57 +00:00
Magnus Ihse Bursie
42aec8c5e7 8328146: Set LIBCXX automatically
Reviewed-by: erikj
2024-03-15 13:23:37 +00:00
Magnus Ihse Bursie
107cb536e7 8327701: Remove the xlc toolchain
Reviewed-by: jwaters, erikj
2024-03-13 08:42:12 +00:00
Magnus Ihse Bursie
ac3ce2aa15 8326583: Remove over-generalized DefineNativeToolchain solution
Reviewed-by: erikj
2024-02-27 11:14:11 +00:00
vamsi-parasa
ce108446ca 8319577: x86_64 AVX2 intrinsics for Arrays.sort methods (int, float arrays)
Reviewed-by: sviswanathan, ihse, jbhateja, kvn
2023-12-08 22:52:48 +00:00
suchismith1993
25cebe8c3e 8317799: AIX PPC64: FFI symbol lookup doesn't find symbols
Reviewed-by: mdoerr, ihse, dholmes, jvernee
2023-11-22 15:43:34 +00:00
vamsi-parasa
2edf9c3f1e 8317763: Follow-up to AVX512 intrinsics for Arrays.sort() PR
Reviewed-by: jbhateja, kvn, ihse, sviswanathan
2023-10-12 04:45:19 +00:00
vamsi-parasa
a4e9168bab 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays)
Reviewed-by: jbhateja, sviswanathan, psandoz, kvn
2023-10-06 20:15:30 +00:00
Daniel Jeliński
063790012d 8316433: net.dll should delay load winhttp.dll
Reviewed-by: erikj, ihse
2023-09-21 15:43:05 +00:00
Jorn Vernee
4c18b9e1fa 8309880: Add support for linking libffi on Windows and Mac
Co-authored-by: Aleksey Shipilev <shade@openjdk.org>
Co-authored-by: Jorn Vernee <jvernee@openjdk.org>
Reviewed-by: erikj
2023-06-14 12:03:42 +00:00
JoKern65
6eddbe26dd 8309219: Fix xlc17 clang 15 warnings in java.base
Reviewed-by: goetz, mdoerr
2023-06-07 13:42:03 +00:00
Per Minborg
cbccc4c817 8304265: Implementation of Foreign Function and Memory API (Third Preview)
Co-authored-by: Maurizio Cimadamore <mcimadamore@openjdk.org>
Co-authored-by: Jorn Vernee <jvernee@openjdk.org>
Co-authored-by: Paul Sandoz <psandoz@openjdk.org>
Co-authored-by: Feilong Jiang <fjiang@openjdk.org>
Co-authored-by: Per Minborg <pminborg@openjdk.org>
Reviewed-by: erikj, jvernee, vlivanov, psandoz
2023-04-27 09:00:58 +00:00
Rich DiCroce
35a2969057 8302659: Modernize Windows native code for NetworkInterface
Reviewed-by: ihse, djelinski, alanb, michaelm
2023-03-15 17:06:32 +00:00
Daniel Jeliński
2f3f3b6185 8295792: Clean up old async close code
Reviewed-by: alanb
2022-10-24 15:25:48 +00:00
Julian Waters
8d751de319 8295231: Move all linking of native libraries to make
Reviewed-by: ihse, erikj
2022-10-17 20:57:26 +00:00
Magnus Ihse Bursie
755958e5ee 8294376: Minimize disabled warnings in java.base
Reviewed-by: erikj
2022-10-05 05:56:44 +00:00
Maurizio Cimadamore
2c5d136260 8282191: Implementation of Foreign Function & Memory API (Preview)
Reviewed-by: erikj, jvernee, psandoz, dholmes, mchung
2022-05-12 16:17:45 +00:00
Aleksey Shipilev
f242cb5ce0 8273797: Stop impersonating "server" VM in all VM variants
Reviewed-by: dholmes, erikj, ihse
2021-09-21 06:00:06 +00:00
Aleksey Shipilev
8fbcc8239a 8273494: Zero: Put libjvm.so into "zero" folder, not "server"
Reviewed-by: ihse, sgehwolf
2021-09-15 08:56:53 +00:00
Phil Race
3bb6a3d2ab 8261109: [macOS] Remove disabled warning for JNF in make/autoconf/flags-cflags.m4
Reviewed-by: serb, ihse, erikj
2021-02-04 21:00:18 +00:00
Weijun Wang
4a8b5c1602 8257858: [macOS]: Remove JNF dependency from libosxsecurity/KeystoreImpl.m
8257860: [macOS]: Remove JNF dependency from libosxkrb5/SCDynamicStoreConfig.m

Reviewed-by: erikj, prr, ihse, valeriep
2021-02-03 16:20:16 +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
Mikael Vidstedt
071bd521bc 8244224: Implementation of JEP 381: Remove the Solaris and SPARC Ports
Reviewed-by: alanb, bchristi, dcubed, dfuchs, eosterlund, erikj, glaubitz, ihse, iignatyev, jjiang, kbarrett, ksrini, kvn, naoto, prr, rriggs, serb, sspitsyn, stefank, tschatzl, valeriep, weijun, weijun
2020-05-20 17:33:37 -07:00
Magnus Ihse Bursie
0de9bbd4f3 8244044: Refactor phase makefiles to be structured per module
Reviewed-by: erikj
2020-04-29 08:55:01 +02:00