Documentation: Updating OpenJDK for Android Platform Builds
PATH/TO/openjdk/repo/toolchain/jdk/build/build-openjdk17-linux.sh -d destdir builddir
The build writes jdk.zip
and jdk-debuginfo.zip
to destdir
.
rm -rf PATH/TO/internal/repo/main/prebuilts/jdk/jdk17/linux-x86 mkdir PATH/TO/internal/repo/main/prebuilts/jdk/jdk17/linux-x86 unzip $DIST_DIR/jdk.zip -d PATH/TO/internal/repo/main/prebuilts/jdk/jdk17/linux-x86
Use jdk.zip
to populate PATH/TO/internal/repo/main/prebuilts/jdk/jdk17/linux-x86
.
Public Documents: How to disable or enable hyper threading on my Linux server
grep -H . /sys/devices/system/cpu/cpu*/topology/thread_siblings_list | sort -n -t ',' -k 2 -u
If hyperthreading is enabled, disable it. (assume there are n CPUs)
Create a script to disable hyperthreading.
$ cat > /tmp/disable_ht.sh <<EOF #!/bin/bash for i in {0..n/2}; do echo "Disabling logical HT core $i." echo 0 > /sys/devices/system/cpu/cpu${i}/online; done EOF sh /tmp/disable_ht.sh
rm -rf `PATH/TO/internal/repo/main/out` USE_RBE=false m -j32
PATH/TO/internal/repo/main/out/build.trace.gz
gunzip PATH/TO/internal/repo/main/out/build.trace.gz
Then you will get a json file called build.trace
. Collect all file whose rule_name
is javac
and then the sum of their user_time
is the total time. Two methods are provided below. Both work.
grep rule_name.*javac PATH/TO/build.trace | cut -d '"' -f 13 | cut -c2- | sed 's/.$//' | awk '{sum += $1} END {print sum}'