RFR: 8373096: JFR: Path-to-gc-roots search should be non-recursive [v6]
Thomas Stuefe
stuefe at openjdk.org
Thu Feb 5 10:31:38 UTC 2026
On Tue, 3 Feb 2026 14:42:03 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> I wonder if you have looked at performance. For example, in which order is it best to check for nullptr, oop has been visited or whether the stack is full? You added a _num_objects_processed variable, but it’s never used, so you might want to remove it.
It is better to check if the stack is full first. 10 mio references take (median user CPU time) about 10.7 seconds with mark bit search first, 9.7 seconds with stack fullness check first. That makes sense since the stack fullness check is just comparing two integers, whereas the markbit query is more involved.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/29382#issuecomment-3852622930
More information about the hotspot-jfr-dev
mailing list