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

Parallel: Skip visiting per-thread nmethods during young GC

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 26
    • None
    • hotspot
    • gc
    • b08

      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.

            ayang Albert Yang
            ayang Albert Yang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: