Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8316283

field watch events are not always posted with -Xcomp option

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • 25
    • 22
    • hotspot
    • None

      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.

            sspitsyn Serguei Spitsyn
            sspitsyn Serguei Spitsyn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: