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

[TESTBUG] Test JFR API from Java agent

    XMLWordPrintable

Details

    • jfr
    • b12

    Backports

      Description

        Today, there is no testing of JFR API from a Java agent. There is a test caledl EvilInstrument.java, but It doesn't start JFR programmatically It only instruments JDK code that JFR also tries to instrument.

        The new test:

        - Should start a recording
        - Commit 1 000 000 events from 5 different threads. This will fill some global buffers and provoke a chunk rotation. The events should contain:
          - stack trace
          - a class field
          - a thread field (assigned with a started thread)
          - a string field (assigned with a string of more than 20 characters)
          The above will provoke constant pools early.
        - Stop the recording
        - Dump the file
        - Verify the file is correct (in process)
        - Transfer recording over JMX to another process and verify that it is correct.

        All operations should happen before the main method is started.

        Using a Java agent is a common scenario for tools vendors and should explicitly be tested.

        Attachments

          Issue Links

            Activity

              People

                mseledtsov Mikhailo Seledtsov
                egahlin Erik Gahlin
                Votes:
                1 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: