Bring Powersort to Java
https://dubi253.github.io/openjdk/
https://www.wild-inter.net/publications/munro-wild-2018
Java: https://github.com/sebawild/nearly-optimal-mergesort-code
C++: https://github.com/sebawild/powersort
- PowerSort.java
- ComparablePowerSort.java
- Arrays.java
- ArraysParallelSortHelpers.java
- TEST.groups
- PowerSortTest folder
- GitHub Actions CI/CD workflow files
clone jtreg repository
git clone https://github.com/openjdk/jtreg.gitadd JAVA_HOME to your environment variables, change to your java home directory if necessary
export JAVA_HOME=/usr/lib/jvm/javago to jtreg directory
cd jtregbuild jtreg
sh make/build.shadd jtreg to your PATH
export JTREG_HOME=[your jtreg root directory]/build/images/jtreg
export PATH=$PATH:$JAVA_HOME/bin:$JTREG_HOME/binAll done, you can now use jtreg to test your openjdk build.
jtreg -hhttps://openjdk.org/groups/build/doc/building.html
Optional - clean make if necessary
make dist-cleanNormal build
If you have jtreg installed and env PATH, you can run the following command to build the JDK:
bash configure("../jtreg/" is my jtreg directory, change to yours if necessary)
bash configure --with-jtreg=../jtreg/make imagesYou can run the test with any of the following commands:
make test TEST="jdk_powersort" jtreg -verbose:all -jdk:build/linux-x86_64-server-release/jdk test/jdk/java/util/PowerSort/PowerSortTest.javaInstall AsyncProfiler at https://github.com/async-profiler/async-profiler
Enable perf_event_paranoid and disable kptr_restrict for async-profiler to work
sudo sysctl kernel.perf_event_paranoid=1 && sudo sysctl kernel.kptr_restrict=0List all Java processes
jps -lRun AsyncProfiler and generate flame graph
./asprof -d 400s -f ./tmp.html [PID]Following is the original README.md file from the OpenJDK repository.
For build instructions please see the online documentation, or either of these files:
- doc/building.html (html version)
- doc/building.md (markdown version)
See https://openjdk.org/ for more information about the OpenJDK Community and the JDK and see https://bugs.openjdk.org for JDK issue tracking.