From 58c402866a3a057091bacf73d3099ec345088aac Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Apr 25 2016 14:17:22 +0000 Subject: Added shenandoah hotspot --- diff --git a/.gitignore b/.gitignore index 0c57188..87e370e 100644 --- a/.gitignore +++ b/.gitignore @@ -55,3 +55,4 @@ /aarch64-port-jdk8u-aarch64-jdk8u72-b16-ec.tar.xz /aarch64-port-jdk8u-aarch64-jdk8u77-b03.tar.xz /aarch64-port-jdk8u-aarch64-jdk8u91-b14.tar.xz +/aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u80-b00-beta01.tar.xz diff --git a/generate_source_tarball.sh b/generate_source_tarball.sh index c6be068..3b7bf66 100755 --- a/generate_source_tarball.sh +++ b/generate_source_tarball.sh @@ -87,8 +87,13 @@ echo "Cloning ${VERSION} root repository from ${REPO_ROOT}" hg clone ${REPO_ROOT} openjdk -r ${VERSION} pushd openjdk -#jdk is last for its size -repos="hotspot corba jaxws jaxp langtools nashorn jdk" + +if [ "x$REPOS" = "x" ] ; then + #jdk is last for its size + repos="hotspot corba jaxws jaxp langtools nashorn jdk" +else + repos=$REPOS +fi; for subrepo in $repos do @@ -96,7 +101,7 @@ do hg clone ${REPO_ROOT}/${subrepo} -r ${VERSION} done - +if [ -d jdk ]; then echo "Removing EC source code we don't build" mv -v jdk/src/share/native/sun/security/ec/impl/ecc_impl.h . @@ -115,6 +120,7 @@ else echo "Applying ${PR2126}" patch -Np1 < $PR2126 fi; +fi popd echo "Compressing remaining forest" diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec index bd7dc0f..eb3dbfe 100644 --- a/java-1.8.0-openjdk.spec +++ b/java-1.8.0-openjdk.spec @@ -27,6 +27,13 @@ %global include_debug_build 0 %endif +# on intels, we build shenandoah htspot +%ifarch %{ix86} x86_64 +%global use_shenandoah_hotspot 1 +%else +%global use_shenandoah_hotspot 0 +%endif + %if %{include_debug_build} %global build_loop2 %{debug_suffix} %else @@ -766,7 +773,7 @@ Obsoletes: java-1.7.0-openjdk-accessibility%1 Name: java-%{javaver}-%{origin} Version: %{javaver}.%{updatever} -Release: 2.%{buildver}%{?dist} +Release: 3.%{buildver}%{?dist} # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons, # and this change was brought into RHEL-4. java-1.5.0-ibm packages # also included the epoch in their virtual provides. This created a @@ -821,6 +828,8 @@ Source20: repackReproduciblePolycies.sh # New versions of config files with aarch64 support. This is not upstream yet. Source100: config.guess Source101: config.sub +# shenandoah hotpost +Source999: aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u80-b00-beta01.tar.xz # RPM/distribution specific patches @@ -1169,6 +1178,15 @@ if [ $prioritylength -ne 7 ] ; then fi # For old patches ln -s openjdk jdk8 +%if %{use_shenandoah_hotspot} +#on intels, repalce hotpost by shenandoah-able hotspot +pushd openjdk +tar -xf %{SOURCE999} +rm -rf hotspot +cp -r openjdk/hotspot . +rm -rf openjdk +popd +%endif cp %{SOURCE2} . @@ -1199,13 +1217,17 @@ sh %{SOURCE12} %patch103 # Zero fixes. +%if %{use_shenandoah_hotspot} != 1 %patch403 %patch505 +%endif %patch606 # AArch64 fixes %patch106 +%if %{use_shenandoah_hotspot} != 1 %patch701 +%endif %patch603 %patch601 @@ -1815,6 +1837,9 @@ require "copy_jdk_configs.lua" %endif %changelog +* Mon Apr 25 2016 Jiri Vanek - 1:1.8.0.91-3.b14 +- included shenandoah support + * Sun Apr 24 2016 Jiri Vanek - 1:1.8.0.91-2.b14 - added patch518 httpsFix1329342.patch - test based on SOURCE14 enabled diff --git a/sources b/sources index c8ab915..8b33ddc 100644 --- a/sources +++ b/sources @@ -1,2 +1,3 @@ 94ca5a45c3cb3b85c4577d0891166007 systemtap-tapset.tar.gz 39880a5af218dfb9ef167bf1800b1b45 aarch64-port-jdk8u-aarch64-jdk8u91-b14.tar.xz +c116a8f376e4bb9d2a23b77c54015792 aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u80-b00-beta01.tar.xz diff --git a/update_package.sh b/update_package.sh index c069ca2..633124a 100755 --- a/update_package.sh +++ b/update_package.sh @@ -62,8 +62,6 @@ sed -i "s/^%global\s\+revision.*/%global revision ${VERSION}/" $SPEC # updated sources, resetting release sed -i "s/^Release:.*/Release: $RELEASE.%{buildver}%{?dist}/" $SPEC -git --no-pager diff $SPEC - #https://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance#Bash function levenshtein { if [ "$#" -ne "2" ]; then @@ -96,6 +94,32 @@ function levenshtein { echo ${d[str1len+str1len*(str2len)]} fi } +# generate shenandoah hotspot +# that means supply the underlying script with new values +# to new filename. +MAIN_VERSION=$VERSION +if [ "x$VERSION" = "xtip" ] ; then + VERSION="tip" +else + #hardcoding version for anything else except tip + VERSION="aarch64-shenandoah-jdk8u80-b00-beta01" +fi +MAIN_REPO_NAME=$REPO_NAME +REPO_NAME=jdk8u-shenandoah +MAIN_FILE_NAME_ROOT=$FILE_NAME_ROOT +FILE_NAME_ROOT=${PROJECT_NAME}-${REPO_NAME}-${VERSION} +FILENAME_SH=${FILE_NAME_ROOT}.tar.${COMPRESSION} +REPOS="hotspot" + +if [ ! -f ${FILENAME_SH} ] ; then +echo "Generating ${FILENAME_SH}" +. ./generate_source_tarball.sh +else +echo "${FILENAME_SH} already exists, using" +fi + +sed -i "s/^Source999:.*/Source999: ${FILENAME_SH}/" $SPEC +git --no-pager diff $SPEC # find the most similar sources name and replace it by newly generated one. echo "Old sources" @@ -112,6 +136,19 @@ for x in $a_sources ; do done sum=`md5sum ${FILENAME}` sed -i "s;.*$winner;$sum;" sources +# now shenandoah hotspot +winner="" +winnerDistance=999999 +for x in $a_sources ; do + distance=`levenshtein $x ${FILENAME_SH}` + if [ $distance -lt $winnerDistance ] ; then + winner=$x + winnerDistance=$distance + fi +done +sum=`md5sum ${FILENAME_SH}` +sed -i "s;.*$winner;$sum;" sources + echo "New sources" cat sources a_sources=`cat sources | sed "s/.*\s\+//g"` @@ -122,12 +159,14 @@ user_gecos_field=$(echo "$user_record" | cut -d ':' -f 5) user_full_name=$(echo "$user_gecos_field" | cut -d ',' -f 1) spec_date=`date +"%a %b %d %Y"` # See spec: -revision_helper=`echo ${VERSION%-*}` +revision_helper=`echo ${MAIN_VERSION%-*}` updatever=`echo ${revision_helper##*u}` -buildver=`echo ${VERSION##*-}` +buildver=`echo ${MAIN_VERSION##*-}` echo "* $spec_date $user_full_name <$user_name@redhat.com> - 1:1.8.0.$updatever-$RELEASE.$buildver" -echo "- updated to $VERSION (from $PROJECT_NAME/$REPO_NAME)" +echo "- updated to $MAIN_VERSION (from $PROJECT_NAME/$MAIN_REPO_NAME)" +echo "- updated to $VERSION (from $PROJECT_NAME/$REPO_NAME) of hotspot" echo "- used $FILENAME as new sources" +echo "- used $FILENAME_SH as new sources for hotspot" echo " execute:" echo "fedpkg/rhpkg new-sources "$a_sources