JDK-8316283 : field watch events are not always posted with -Xcomp option
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jvmti
  • Affected Version: 22
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2023-09-14
  • Updated: 2024-10-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 25
25Unresolved
Related Reports
Relates :  
Description
The field watch event are not posted when the attached FieldWatchTest is run with -Xcomp options:
Agent_OnAttach started
main: 
# Java: Starting threads
Agent: enabled events
main: wait iter: 0
main: wait iter: 1
main: wait iter: 2
main: wait iter: 3
main: wait iter: 4
main: wait iter: 5
main: wait iter: 6
main: wait iter: 7
main: wait iter: 8
main: wait iter: 9
Agent: disabled events
main: dummy: 1010
main: FieldAccess cnt: 0 (expected: 10)
main: FieldModify cnt: 0 (expected: 10)
main: unexpected count of FieldAccess events
main: unexpected count of FieldModification events
----------System.err:(11/641)----------
java.lang.RuntimeException: FAILED: event count is wrong
	at FieldWatchTest.main(FieldWatchTest.java:144)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
	at java.base/java.lang.Thread.run(Thread.java:1570)

JavaTest Message: Test threw exception: java.lang.RuntimeException: FAILED: event count is wrong
JavaTest Message: shutting down test


However, all the expected field watch events are posted when run without -Xcomp option:

Agent_OnAttach started
main: 
# Java: Starting threads
Agent: enabled events
Agent: disabled events
main: dummy: 1004
main: FieldAccess cnt: 10 (expected: 10)
main: FieldModify cnt: 10 (expected: 10)
----------System.err:(1/15)----------
STATUS:Passed.