JFR: Cache label and contentType in EventType and ValueDescriptor

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P3
    • 21
    • Affects Version/s: None
    • Component/s: hotspot
    • None
    • jfr
    • b12

      Metadata about events and fields are stored in annotations, for example Label, and are accessed with getters, such as EventType::getLabel().

      The current implementation creates a dynamic proxy to access the annotation with each invocation. This is probably OK since most metadata is only accessed a few times per application.

      Two exception might be the getLabel() and getContentType(). An application that prints event values might use the label for each event value and getContentType() to decide formatting. Caching the label speeds up access about 50 times.

      The methods getName() and getTypeName(), which are also likely to be accessed frequently, already have dedicated fields. getUnsigned() is also already cached.



            Assignee:
            Erik Gahlin
            Reporter:
            Erik Gahlin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: