serviceability/sa/ClhsdbLongConstant.java asserts an exact value for VM_Version::CPU_SHA in checkForTruncation(). CPU_SHA is a feature-flag bit index in vm_version_x86.hpp whose value shifts whenever a CPU feature is added, so the hardcoded expectation goes stale and the test fails (it has already been bumped once, and the in-file comment lists yet another value).
This check exists only to confirm the `longConstant` output was not truncated, using CPU_SHA as a sentinel that appears late in the output, the exact value is irrelevant to that purpose. SA reads the value correctly from the VM in every case. Change checkForTruncation() to verify the constant is present with a parseable long value (checkLongValuePresent) instead of asserting a specific number, so the check no longer breaks on every feature-flag change. The markWord::hash_mask_in_place assertion is unchanged, since that value is derived from a stable definition. Testing: serviceability/sa/ClhsdbLongConstant.java (x64). --------- - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - 8388799: ClhsdbLongConstant should not assert a specific value for VM_Version::CPU_SHA Changes: https://git.openjdk.org/jdk/pull/32017/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=32017&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8388799 Stats: 14 lines in 1 file changed: 10 ins; 1 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/32017.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/32017/head:pull/32017 PR: https://git.openjdk.org/jdk/pull/32017
