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

Investigate reasons for root=N/A in JFR OldObjectSample events

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 14
    • hotspot
    • None
    • jfr

      When taking JFR recording samples from applications we found that a number of recordings have root of the object reference chain listed as "root=N/A". There can be valid reasons for this, but it is worth investigating the reasons, and possibly providing ways to handle such cases.

      Possible reasons:
        - reference chain is too long (e.g. LinkedList)
          JFR limits the lenght of the chain it follows for efficiency reasons
          In such case, recommended to provide a message similar to: "root=N/A, reference chain exceeded N"
        - if soft or weak link is encountered in the reference chain then JFR will stop following the chain
          the reasoning is that such objects will be GC collected when memory pressure is high, hence no strong reason to follow/sample them
          For such cases, recommending to print a message: "Encountered soft/weak reference", or perhaps not to include such object in the recording.
        - other reasons (to be discovered)

            Unassigned Unassigned
            mseledtsov Mikhailo Seledtsov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: