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)
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)
- relates to
-
JDK-8351698 JFR: Strengthen assertion on missing IDs
-
- In Progress
-