An arrangement is provided for using a stack trace cache when performing
root set enumeration in a stack of a thread during garbage collection.
During the first root set enumeration in the stack, full stack unwinding
may be performed and a stack trace cache may be created to cache stack
trace information relating to stack frames. Subsequent sessions of root
set enumeration in the stack may access and copy parts or the entire
cached stack trace information instead of performing full stack
unwinding.