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

JFR: Some UNTIMED events only sets endTime

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 20
    • 19, 20
    • hotspot
    • None
    • jfr
    • b27

    Description

      It was pointed out that some UNTIMED events only call set_endtime(), for example some events in jfrPeriodic.cpp. There has been some changes in the logic for timestamps, and this can have caused some weird effects, for example:

        // Write allocation statistics to buffer.
        for(int i = 0; i < thread_ids.length(); i++) {
          EventThreadAllocationStatistics event(UNTIMED);
          event.set_allocated(allocated.at(i));
          event.set_thread(thread_ids.at(i));
          event.set_endtime(time_stamp);
          event.commit();
        }

      This event will not have the declared time_stamp, but will instead get a new timestamp because set_starttime() is not called.

      Revise usages to ensure they are correct in relation to timestamping.

      Attachments

        Issue Links

          Activity

            People

              mgronlun Markus Grönlund
              mgronlun Markus Grönlund
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: