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

Simplify JFR event posting

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • tbd
    • 12
    • hotspot
    • None
    • jfr

      Quite a few places in Hotspot code sending JFR events look like this:

      EventXYZ event;
      event.set_X(a)
      event.set_Y(b);
      ...
      event.commit();

      This could be simplified by using the variant of the commit() method taking the arguments directly, ie.

      EventXYZ event;
      event.commit(a, b, ...)

      Maybe even the set_* methods become obsolete by doing this.

      Suggested during the discussion of JDK-8211213 on the hotspot-dev mailing list.

            lkorinth Leo Korinth
            tschatzl Thomas Schatzl
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: