#77 Update tapsets from IcedTea 6.x repository with fix for JDK-8015774 changes (_heap->_heaps) and @JAVA_SPEC_VER@
Merged a month ago by ahughes. Opened a month ago by ahughes.
rpms/ ahughes/java-latest-openjdk build  into  rawhide

file modified
+1
@@ -19,3 +19,4 @@ 

  /openjdk-jdk17-jdk-17+33.tar.xz

  /openjdk-jdk17-jdk-17+35.tar.xz

  /openjdk-jdk17u-jdk-17.0.1+12.tar.xz

+ /tapsets-icedtea-6.0.0pre00-c848b93a8598.tar.xz

file modified
+135 -41
@@ -16,12 +16,30 @@ 

  # You should have received a copy of the GNU Affero General Public License

  # along with this program.  If not, see <http://www.gnu.org/licenses/>.

  

+ ICEDTEA_USE_VCS=true

+ 

  ICEDTEA_VERSION=3.15.0

  ICEDTEA_URL=https://icedtea.classpath.org/download/source

  ICEDTEA_SIGNING_KEY=CFDA0F9B35964222

  

+ ICEDTEA_HG_URL=https://icedtea.classpath.org/hg/icedtea11

  set -e

  

+ RPM_DIR=${PWD}

+ if [ ! -f ${RPM_DIR}/jconsole.desktop.in ] ; then

+     echo "Not in RPM source tree.";

+     exit 1;

+ fi

+ 

+ if test "x${TMPDIR}" = "x"; then

+     TMPDIR=/tmp;

+ fi

+ WORKDIR=${TMPDIR}/it.sync

+ 

+ echo "Using working directory ${WORKDIR}"

+ mkdir ${WORKDIR}

+ pushd ${WORKDIR}

+ 

  if test "x${WGET}" = "x"; then

      WGET=$(which wget);

      if test "x${WGET}" = "x"; then
@@ -30,68 +48,144 @@ 

      fi

  fi

  

- if test "x${CHECKSUM}" = "x"; then

-     CHECKSUM=$(which sha256sum)

-     if test "x${CHECKSUM}" = "x"; then

- 	echo "sha256sum not found";

- 	exit 2;

-     fi

- fi

- 

- if test "x${PGP}" = "x"; then

-     PGP=$(which gpg)

-     if test "x${PGP}" = "x"; then

- 	echo "gpg not found";

- 	exit 3;

-     fi

- fi

- 

  if test "x${TAR}" = "x"; then

      TAR=$(which tar)

      if test "x${TAR}" = "x"; then

  	echo "tar not found";

- 	exit 4;

+ 	exit 2;

      fi

  fi

  

  echo "Dependencies:";

  echo -e "\tWGET: ${WGET}";

- echo -e "\tCHECKSUM: ${CHECKSUM}";

- echo -e "\tPGP: ${PGP}\n";

  echo -e "\tTAR: ${TAR}\n";

  

- echo "Checking for IcedTea signing key ${ICEDTEA_SIGNING_KEY}...";

- if ! gpg --list-keys ${ICEDTEA_SIGNING_KEY}; then

-     echo "IcedTea signing key ${ICEDTEA_SIGNING_KEY} not installed.";

-     exit 5;

- fi

+ if test "x${ICEDTEA_USE_VCS}" = "xtrue"; then

+     echo "Mode: Using VCS";

  

- echo "Downloading IcedTea release tarball...";

- ${WGET} -v ${ICEDTEA_URL}/icedtea-${ICEDTEA_VERSION}.tar.xz

- echo "Downloading IcedTea tarball signature...";

- ${WGET} -v ${ICEDTEA_URL}/icedtea-${ICEDTEA_VERSION}.tar.xz.sig

- echo "Downloading IcedTea tarball checksums...";

- ${WGET} -v ${ICEDTEA_URL}/icedtea-${ICEDTEA_VERSION}.sha256

+     if test "x${GREP}" = "x"; then

+ 	GREP=$(which grep);

+ 	if test "x${GREP}" = "x"; then

+ 	    echo "grep not found";

+ 	    exit 3;

+ 	fi

+     fi

  

- echo "Verifying checksums...";

- ${CHECKSUM} --check --ignore-missing icedtea-${ICEDTEA_VERSION}.sha256

+     if test "x${CUT}" = "x"; then

+ 	CUT=$(which cut);

+ 	if test "x${CUT}" = "x"; then

+ 	    echo "cut not found";

+ 	    exit 4;

+ 	fi

+     fi

  

- echo "Checking signature...";

- ${PGP} --verify icedtea-${ICEDTEA_VERSION}.tar.xz.sig

+     if test "x${TR}" = "x"; then

+ 	TR=$(which tr);

+ 	if test "x${TR}" = "x"; then

+ 	    echo "tr not found";

+ 	    exit 5;

+ 	fi

+     fi

  

- echo "Extracting files...";

- ${TAR} xJf icedtea-${ICEDTEA_VERSION}.tar.xz \

+     if test "x${HG}" = "x"; then

+ 	HG=$(which hg);

+ 	if test "x${HG}" = "x"; then

+ 	    echo "hg not found";

+ 	    exit 6;

+ 	fi

+     fi

+ 

+     echo "Dependencies:";

+     echo -e "\tGREP: ${GREP}";

+     echo -e "\tCUT: ${CUT}";

+     echo -e "\tTR: ${TR}";

+     echo -e "\tHG: ${HG}";

+ 

+     echo "Checking out repository from VCS...";

+     ${HG} clone ${ICEDTEA_HG_URL} icedtea

+ 

+     echo "Obtaining version from configure.ac...";

+     ROOT_VER=$(${GREP} '^AC_INIT' icedtea/configure.ac|${CUT} -d ',' -f 2|${TR} -d '[][:space:]')

+     echo "Root version from configure: ${ROOT_VER}";

+ 

+     VCS_REV=$(${HG} log -R icedtea --template '{node|short}' -r tip)

+     echo "VCS revision: ${VCS_REV}";

+ 

+     ICEDTEA_VERSION="${ROOT_VER}-${VCS_REV}"

+     echo "Creating icedtea-${ICEDTEA_VERSION}";

+     mkdir icedtea-${ICEDTEA_VERSION}

+     echo "Copying required files from checkout to icedtea-${ICEDTEA_VERSION}";

+     # Commented out for now as IcedTea 6's jconsole.desktop.in is outdated

+     #cp -a icedtea/jconsole.desktop.in ../icedtea-${ICEDTEA_VERSION}

+     cp -a ${RPM_DIR}/jconsole.desktop.in icedtea-${ICEDTEA_VERSION}

+     cp -a icedtea/tapset icedtea-${ICEDTEA_VERSION}

+ 

+     rm -rf icedtea

+ else

+     echo "Mode: Using tarball";

+ 

+     if test "x${ICEDTEA_VERSION}" = "x"; then

+ 	echo "No IcedTea version specified for tarball download.";

+ 	exit 3;

+     fi

+ 

+     if test "x${CHECKSUM}" = "x"; then

+ 	CHECKSUM=$(which sha256sum)

+ 	if test "x${CHECKSUM}" = "x"; then

+ 	    echo "sha256sum not found";

+ 	    exit 4;

+ 	fi

+     fi

+ 

+     if test "x${PGP}" = "x"; then

+ 	PGP=$(which gpg)

+ 	if test "x${PGP}" = "x"; then

+ 	    echo "gpg not found";

+ 	    exit 5;

+ 	fi

+     fi

+ 

+     echo "Dependencies:";

+     echo -e "\tCHECKSUM: ${CHECKSUM}";

+     echo -e "\tPGP: ${PGP}\n";

+ 

+     echo "Checking for IcedTea signing key ${ICEDTEA_SIGNING_KEY}...";

+     if ! gpg --list-keys ${ICEDTEA_SIGNING_KEY}; then

+ 	echo "IcedTea signing key ${ICEDTEA_SIGNING_KEY} not installed.";

+ 	exit 6;

+     fi

+ 

+     echo "Downloading IcedTea release tarball...";

+     ${WGET} -v ${ICEDTEA_URL}/icedtea-${ICEDTEA_VERSION}.tar.xz

+     echo "Downloading IcedTea tarball signature...";

+     ${WGET} -v ${ICEDTEA_URL}/icedtea-${ICEDTEA_VERSION}.tar.xz.sig

+     echo "Downloading IcedTea tarball checksums...";

+     ${WGET} -v ${ICEDTEA_URL}/icedtea-${ICEDTEA_VERSION}.sha256

+ 

+     echo "Verifying checksums...";

+     ${CHECKSUM} --check --ignore-missing icedtea-${ICEDTEA_VERSION}.sha256

+ 

+     echo "Checking signature...";

+     ${PGP} --verify icedtea-${ICEDTEA_VERSION}.tar.xz.sig

+ 

+     echo "Extracting files...";

+     ${TAR} xJf icedtea-${ICEDTEA_VERSION}.tar.xz \

         icedtea-${ICEDTEA_VERSION}/tapset \

         icedtea-${ICEDTEA_VERSION}/jconsole.desktop.in

  

+     rm -vf icedtea-${ICEDTEA_VERSION}.tar.xz

+     rm -vf icedtea-${ICEDTEA_VERSION}.tar.xz.sig

+     rm -vf icedtea-${ICEDTEA_VERSION}.sha256

+ fi

+ 

  echo "Replacing desktop files...";

- mv -v icedtea-${ICEDTEA_VERSION}/jconsole.desktop.in .

+ mv -v icedtea-${ICEDTEA_VERSION}/jconsole.desktop.in ${RPM_DIR}

  

  echo "Creating new tapset tarball...";

  mv -v icedtea-${ICEDTEA_VERSION} openjdk

- ${TAR} cJf tapsets-icedtea-${ICEDTEA_VERSION}.tar.xz openjdk

+ ${TAR} cJf ${RPM_DIR}/tapsets-icedtea-${ICEDTEA_VERSION}.tar.xz openjdk

  

  rm -rvf openjdk

- rm -vf icedtea-${ICEDTEA_VERSION}.tar.xz

- rm -vf icedtea-${ICEDTEA_VERSION}.tar.xz.sig

- rm -vf icedtea-${ICEDTEA_VERSION}.sha256

+ 

+ popd

+ rm -rf ${WORKDIR}

file modified
+10 -5
@@ -290,7 +290,7 @@ 

   %global lts_designator_zip ""

  

  # Define IcedTea version used for SystemTap tapsets and desktop file

- %global icedteaver      3.15.0

+ %global icedteaver      6.0.0pre00-c848b93a8598

  

  # Standard JPackage naming and versioning defines

  %global origin          openjdk
@@ -298,7 +298,7 @@ 

  %global top_level_dir_name   %{origin}

  %global top_level_dir_name_backup %{top_level_dir_name}-backup

  %global buildver        12

- %global rpmrelease      1

+ %global rpmrelease      2

  # Priority must be 8 digits in total; up to openjdk 1.8, we were using 18..... so when we moved to 11, we had to add another digit

  %if %is_system_jdk

  # Using 10 digits may overflow the int used for priority, so we combine the patch and build versions
@@ -1112,7 +1112,7 @@ 

  Source0: openjdk-jdk%{featurever}u-jdk-%{filever}+%{buildver}%{?tagsuffix:-%{tagsuffix}}.tar.xz

  

  # Use 'icedtea_sync.sh' to update the following

- # They are based on code contained in the IcedTea project (3.x).

+ # They are based on code contained in the IcedTea project (6.x).

  # Systemtap tapsets. Zipped up to keep it small.

  Source8: tapsets-icedtea-%{icedteaver}.tar.xz

  
@@ -1566,11 +1566,12 @@ 

    for file in "tapset"$suffix/*.in; do

      OUTPUT_FILE=`echo $file | sed -e "s:\.stp\.in$:%{version}-%{release}.%{_arch}.stp:g"`

      sed -e "s:@ABS_SERVER_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/lib/server/libjvm.so:g" $file > $file.1

+     sed -e "s:@JAVA_SPEC_VER@:%{javaver}:g" $file.1 > $file.2

  # TODO find out which architectures other than i686 have a client vm

  %ifarch %{ix86}

-     sed -e "s:@ABS_CLIENT_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/lib/client/libjvm.so:g" $file.1 > $OUTPUT_FILE

+     sed -e "s:@ABS_CLIENT_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/lib/client/libjvm.so:g" $file.2 > $OUTPUT_FILE

  %else

-     sed -e "/@ABS_CLIENT_LIBJVM_SO@/d" $file.1 > $OUTPUT_FILE

+     sed -e "/@ABS_CLIENT_LIBJVM_SO@/d" $file.2 > $OUTPUT_FILE

  %endif

      sed -i -e "s:@ABS_JAVA_HOME_DIR@:%{_jvmdir}/%{sdkdir -- $suffix}:g" $OUTPUT_FILE

      sed -i -e "s:@INSTALL_ARCH_DIR@:%{archinstall}:g" $OUTPUT_FILE
@@ -2276,6 +2277,10 @@ 

  %endif

  

  %changelog

+ * Thu Oct 21 2021 Andrew Hughes <gnu.andrew@redhat.com> - 1:17.0.1.0.12-2.rolling

+ - Update tapsets from IcedTea 6.x repository with fix for JDK-8015774 changes (_heap->_heaps) and @JAVA_SPEC_VER@

+ - Update icedtea_sync.sh with a VCS mode that retrieves sources from a Mercurial repository

+ 

  * Wed Oct 20 2021 Petra Alice Mikova <pmikova@redhat.com> - 1:17.0.1.0.12-1.rolling

  - October CPU update to jdk 17.0.1+12

  - dropped commented-out source line

file modified
+1 -1
@@ -1,2 +1,2 @@ 

- SHA512 (tapsets-icedtea-3.15.0.tar.xz) = c752a197cb3d812d50c35e11e4722772be40096c81d2a57933e0d9b8a3c708b9c157b8108a4e33a06ca7bb81648170994408c75d6f69d5ff12785d0c31009671

+ SHA512 (tapsets-icedtea-6.0.0pre00-c848b93a8598.tar.xz) = 97d026212363b3c83f6a04100ad7f6fdde833d16579717f8756e2b8c2eb70e144a41a330cb9ccde9c3badd37a2d54fdf4650a950ec21d8b686d545ecb2a64d30

  SHA512 (openjdk-jdk17u-jdk-17.0.1+12.tar.xz) = d9503de1001e42657ddb2600e1141d4169e333f0592ce3ad3c4ce14f817ca73a6bf6fb867e15930150c7b55e8fd4c4cd73d43984979e721df481a9ac7919580c

Update icedtea_sync.sh with a VCS mode that retrieves sources from a Mercurial repository

This brings in the changes to the tapsets from java-11-openjdk. I've verified that the icedtea_sync.sh script produces a tarball with the same contents (though I had to hack ICEDTEA_HG_URL due to the IcedTea server still being down...) A possible future change would be to make the tarballs reproducible

I haven't tested the tapsets themselves yet with java-17-openjdk. It may be that more changes are needed to work with the newer JDK, which would be a further bug & patch, but this at least adds the changes we made for 11.

Relevant changes in the new tapsets:

-@_private global CodeCache_heap;
+@_private global CodeCache_heaps;

 @_private global sp_register;
 /* On PowerPC there is a link register, but no frame pointer register.  */
@@ -71,7 +71,7 @@

 /* We need to collect some global symbol addresses that cannot be resolved
    in a bare function and vm_init_end seems a good place to use. */
-probe hotspot.vm_init_end8
+probe hotspot.vm_init_end17
 {
   /**
    * The CodeCache class contains the static CodeHeap _heap that
@@ -89,8 +89,8 @@
    * the segment at index - N (which can be recursive if a block
    * contains more than 0xFE segments).
    */
-  CodeCache_heap[pid()] = %( systemtap_v >= "1.8"
-                            %? @var("_heap@codeCache.cpp")
+  CodeCache_heaps[pid()] = %( systemtap_v >= "1.8"
+                            %? @var("_heaps@codeCache.cpp")
                             %: $_heap %);

   // Should really check arch of user space (for 32bit jvm on 64bit kernel).
@@ -139,7 +139,7 @@

 probe hotspot.vm_shutdown
 {
-  delete(CodeCache_heap[pid()]);
+  delete(CodeCache_heaps[pid()]);
   delete(vm_inited[pid()]);
 }

@@ -268,19 +268,6 @@
         return frame;
     }

-  // Extract code bounds.
-  CodeCache_low = @cast(CodeCache_heap[pid()], "CodeHeap",
-                        "/usr/lib/jvm/java-17-openjdk-17.0.0.0.35-1.rolling.fc33.x86_64/lib/server/libjvm.so")->_memory->_low;
-  CodeCache_high =  @cast(CodeCache_heap[pid()], "CodeHeap",
-                          "/usr/lib/jvm/java-17-openjdk-17.0.0.0.35-1.rolling.fc33.x86_64/lib/server/libjvm.so")->_memory->_high;
-
-  CodeHeap_log2_segment_size = @cast(CodeCache_heap[pid()],
-                                     "CodeHeap",
-                                     "/usr/lib/jvm/java-17-openjdk-17.0.0.0.35-1.rolling.fc33.x86_64/lib/server/libjvm.so")->_log2_segment_size;
-  CodeCache_segmap_low = @cast(CodeCache_heap[pid()],
-                               "CodeHeap",
-                               "/usr/lib/jvm/java-17-openjdk-17.0.0.0.35-1.rolling.fc33.x86_64/lib/server/libjvm.so")->_segmap->_low;
-
   // Might want to sanity check above values.

   // Loop through all the frames. The program counter is the starting
@@ -308,8 +295,39 @@
       // Assume things are fine unless indicated otherwise.
       trust_fp = 1;

+      // Extract code bounds.
+      CodeHeaps_len = @cast(CodeCache_heaps[pid()], "GrowableArray<CodeHeap*>",
+                            "/usr/lib/jvm/java-17-openjdk-17.0.0.0.35-6.rolling.fc33.x86_64/lib/server/libjvm.so")->_len;
+      heapsPos = 0;
+      foundCodeHeap = 0;
+      while (heapsPos < CodeHeaps_len)
+        {
+          CodeHeap = &@cast(CodeCache_heaps[pid()], "GrowableArray<CodeHeap*>",
+                            "/usr/lib/jvm/java-17-openjdk-17.0.0.0.35-6.rolling.fc33.x86_64/lib/server/libjvm.so")->_data[heapsPos];
+          heapsPos++;
+
+          // Extract code bounds.
+          CodeCache_low = @cast(CodeHeap, "CodeHeap",
+                                "/usr/lib/jvm/java-17-openjdk-17.0.0.0.35-6.rolling.fc33.x86_64/lib/server/libjvm.so")->_memory->_low_boundary;
+          CodeCache_high =  @cast(CodeHeap, "CodeHeap",
+                                  "/usr/lib/jvm/java-17-openjdk-17.0.0.0.35-6.rolling.fc33.x86_64/lib/server/libjvm.so")->_memory->_high;
+
+          CodeHeap_log2_segment_size = @cast(CodeHeap,
+                                             "CodeHeap",
+                                             "/usr/lib/jvm/java-17-openjdk-17.0.0.0.35-6.rolling.fc33.x86_64/lib/server/libjvm.so")->_log2_segment_size;
+          CodeCache_segmap_low = @cast(CodeHeap,
+                                       "CodeHeap",
+                                       "/usr/lib/jvm/java-17-openjdk-17.0.0.0.35-6.rolling.fc33.x86_64/lib/server/libjvm.so")->_segmap->_low;
+          // break out of the loop if we've found the code heap
+          if (CodeCache_low <= pc && pc < CodeCache_high)
+            {
+              foundCodeHeap = 1;
+              break;
+            }
+        }
+
       // Generated code? (Interpreter and stub methods are also generated)
-      if (CodeCache_low <= pc && pc < CodeCache_high)
+      if (foundCodeHeap == 1)
         {
           // Find the start of the code segment and code block that
           // this pc is in.

The above is jstack.stp. The diff was produced before pulling in the latest changes from main, hence the older verson number.

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

Pull-Request has been merged by ahughes

a month ago