-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
During young-gc, `PSThreadRootsTaskClosure` is applied on every thread, and it visits all oops and nmethods within a thread.
However, the actual set of nmethods that needs visiting are more accurately visited already:
```
case ParallelRootType::code_cache:
{
MarkingNMethodClosure code_closure(&roots_to_old_closure, NMethodToOopClosure::FixRelocations, false /* keepalive nmethods */);
ScavengableNMethods::nmethods_do(&code_closure);
}
```
There is no need to visit nmethods reachable from threads.
However, the actual set of nmethods that needs visiting are more accurately visited already:
```
case ParallelRootType::code_cache:
{
MarkingNMethodClosure code_closure(&roots_to_old_closure, NMethodToOopClosure::FixRelocations, false /* keepalive nmethods */);
ScavengableNMethods::nmethods_do(&code_closure);
}
```
There is no need to visit nmethods reachable from threads.
- links to
-
Review(master) openjdk/jdk/26089