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

Remove HandleMark

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • tbd
    • 18
    • hotspot

      We should remove the HandleMark mechanism which is a leftover from when Metadata was in Handles. There aren't many places where we have a lot of Handles that would benefit from the optimization of bulk cleanup of Handles and it's really easy to have unnecessary Handles that GC has to process.

      We should make Handle an RAII class whose destructor removes the Handle from the GC list, like methodHandle and constantPoolHandle.

      The main problem with doing this is that Handle is most commonly passed as foo(Handle h), and to avoid unnecessary copy constructors and destructors, they'd all have to be changed to: foo(const Handle& h); So it's a lot of changes.

      Another bug caused by a missing HandleMark was just fixed.

            coleenp Coleen Phillimore
            coleenp Coleen Phillimore
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: