Skip to content

8386586: [s390x] TestSyncOnValueBasedClassEvent.java fails due to incorrect branch#31497

Open
offamitkumar wants to merge 1 commit into
openjdk:masterfrom
offamitkumar:jfr_1
Open

8386586: [s390x] TestSyncOnValueBasedClassEvent.java fails due to incorrect branch#31497
offamitkumar wants to merge 1 commit into
openjdk:masterfrom
offamitkumar:jfr_1

Conversation

@offamitkumar

@offamitkumar offamitkumar commented Jun 12, 2026

Copy link
Copy Markdown
Member

Depends on:

This test case was mistakenly marked as "related to loom" and disabled on s390x.

Explanation:

What we WANT: Jump to slow path when the value-based class bit IS SET (bit = 1)

What TM instruction does when testing a single bit:

  • Bit is 0 → CC=0 (all tested bits are zero)
  • Bit is 1 → CC=3 (all tested bits are one)

Branch conditions:

  • z_brne uses mask bcondNotEqual = 6 = binary 0110 = branches on CC=1 or CC=2
  • z_brnaz uses mask bcondNotAllZero = 7 = binary 0111 = branches on CC=1, CC=2, or CC=3

The problem:
When the bit IS SET (value-based class detected):

  • TM sets CC=3
  • z_brne (mask 6) does NOT include CC=3, so it does NOT branch → BUG!

Failure:
java.lang.RuntimeException: No events: expected false, was true
at jdk.test.lib.Asserts.fail(Asserts.java:715)
at jdk.test.lib.Asserts.assertFalse(Asserts.java:520)
at jdk.test.lib.jfr.Events.hasEvents(Events.java:160)
at jdk.jfr.event.runtime.TestSyncOnValueBasedClassEvent.main(TestSyncOnValueBasedClassEvent.java:79)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:583)
at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
at java.base/java.lang.Thread.run(Thread.java:1527)

with the change:

Finished running test 'jtreg:test/jdk/jdk/jfr/event/runtime/TestSyncOnValueBasedClassEvent.java'
Test report is stored in build/linux-s390x-server-fastdebug/test-results/jtreg_test_jdk_jdk_jfr_event_runtime_TestSyncOnValueBasedClassEvent_java

==============================
Test summary
==============================
   TEST                                              TOTAL  PASS  FAIL ERROR  SKIP   
   jtreg:test/jdk/jdk/jfr/event/runtime/TestSyncOnValueBasedClassEvent.java
                                                         1     1     0     0     0   
==============================
TEST SUCCESS

Finished building target 'test' in configuration 'linux-s390x-server-fastdebug'


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (2 reviews required, with at least 1 Reviewer, 1 Author)

Issue

  • JDK-8386586: [s390x] TestSyncOnValueBasedClassEvent.java fails due to incorrect branch (Bug - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/31497/head:pull/31497
$ git checkout pull/31497

Update a local copy of the PR:
$ git checkout pull/31497
$ git pull https://git.openjdk.org/jdk.git pull/31497/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 31497

View PR using the GUI difftool:
$ git pr show -t 31497

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/31497.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper

bridgekeeper Bot commented Jun 12, 2026

Copy link
Copy Markdown

👋 Welcome back amitkumar! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk

openjdk Bot commented Jun 12, 2026

Copy link
Copy Markdown

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk Bot changed the title 8386586 8386586: [s390x] TestSyncOnValueBasedClassEvent.java fails due to incorrect branch Jun 12, 2026
@openjdk

openjdk Bot commented Jun 12, 2026

Copy link
Copy Markdown

@offamitkumar The following label will be automatically applied to this pull request:

  • hotspot

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk

openjdk Bot commented Jun 12, 2026

Copy link
Copy Markdown

The total number of required reviews for this PR has been set to 2 based on the presence of this label: hotspot. This can be overridden with the /reviewers command.

@openjdk openjdk Bot added the rfr Pull request is ready for review label Jun 12, 2026
@mlbridge

mlbridge Bot commented Jun 12, 2026

Copy link
Copy Markdown

Webrevs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotspot [email protected] rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

1 participant