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

Simplify {Register,Unregister}NMethodOopClosure

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 18
    • Component/s: hotspot
    • Subcomponent:
      gc
    • Resolved In Build:
      b05
    • CPU:
      generic
    • OS:
      generic

      Description

      The classes {Register,Unregister}NMethodOopClosure implement both oop* and narrowOop* do_oop overloads, using a shared function template. However, these are called from nmethod::oops_do, which only ever calls the do_oop(oop*) overload. As a result, generating code for the narrowOop* overload is just a waste of time and space. The body of the narrowOop* overload could just be ShouldNotReachHere(), and move the function template code directly into the oop* overload.

      In addition, the do_oop implementations for these closures get the associated region for the oop using heap_region_containing. They then assert the region is not a continues_humongous region. But that isn't possible here, since heap_region_containing implicitly resolves continues_humongous to the associated start_humongous region. And besides, an oop that refers to a continues_humongous region has other problems, which would be better handled in heap_region_containing. So the assert in this case is just a big blob of uninteresting and unneeded code.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ayang Albert Yang
              Reporter:
              kbarrett Kim Barrett
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: