• Home
    • View
    • Login
    This page
    • Normal
    • Export PDF
    • Export Word
    • Attachments
    • Page Information

    Loading...
  1. Dashboard
  2. HotSpot
  3. Main
  4. Runtime
  5. Application Class Data Sharing - AppCDS
  6. Debugging CDS DeterministicDump.java test failures

Page History

Versions Compared

Old Version 3

changes.mady.by.user Ioi Lam

Saved on Jul 25, 2020

compared with

New Version Current

changes.mady.by.user Ioi Lam

Saved on Jul 25, 2020

  • Previous Change: Difference between versions 2 and 3
  • View Page History

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
#! /bin/bash
#
# Run "java -Xshare:dump" twice. They should generate the exact same classes.jsa.
# See https://bugs.openjdk.java.net/browse/JDK-8241071
#
# Usage: bash compare_cds_dump.sh $JAVA_HOME
#
# If "xxd" is not available, use "hexdump" instead.
# 
# "xxd -g 8" is used because most of the time we have mismatched (64-bit) pointers.
# you may want to change to "-g 4", etc, if the mismatch is caused by fields
# of other sizes.

JAVA=$1/bin/java
shift

ARGS="-Xshare:dump -Xlog:cds=debug -Xmx256m"
$JAVA $ARGS -XX:SharedArchiveFile=1.jsa $* | egrep " crc " | cut -b 9- | tee old1.txt
cksum 1.jsa | tee -a old 1.txt
xxd -e -g 8 1.jsa >> 1.txt
hexdump#hexdump -C 1.jsa >> old1.txt

$JAVA $ARGS -XX:SharedArchiveFile=2.jsa $* | egrep " crc " | cut -b 9- | tee new2.txt
cksum 2.jsa | tee -a new 2.txt
xxd -e -g 8 2.jsa >> 2.txt
hexdump#hexdump -C 2.jsa >> new2.txt

(set -x; 
diff old1.txt new2.txt | wc
)

Example

Often time we break reproducibility by writing an unprocessed native pointer into the archive. For example, InstanceKlass::_package_entry should be set to NULL before the InstanceKlass is copied. We can disable this by:

...

Overview
Content Tools
ThemeBuilder

Terms of Use • License: GPLv2 • Privacy • Trademarks • Contact Us

Powered by a free Atlassian Confluence Open Source Project License granted to https://www.atlassian.com/software/views/opensource-community-additional-license-offer. Evaluate Confluence today.

  • Adaptavist ThemeBuilder Powered by Atlassian Confluence 7.4.13
  • Adaptavist ThemeBuilder printed.by.atlassian.confluence
  • Report a bug
  • Atlassian News
Atlassian
Adaptavist ThemeBuilder EngineAtlassian Confluence
{"serverDuration": 285, "requestCorrelationId": "cf2ec5f708e5225b"}