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

Can't allocate and retain memory from resource area in frame::oops_interpreted_do oop closure after 8329665

    XMLWordPrintable

Details

    • b06

    Backports

      Description

        In JDK-8329665 a ResourceMark was added in frame::oops_interpreted_do() for the case of having to allocate extra memory for the _bit_mask in InterpreterOopMap::resource_copy(). But that prevents code in the closure from allocating and retaining memory from the resource area across the closure, relying on some ResourceMark in scope further up the stack from frame::oops_interpreted_do().
        There is one case in JFR code where this kind of allocation happens: https://github.com/openjdk/jdk/blob/d9bcf061450ebfb7fe02b5a50c855db1d9178e5d/src/hotspot/share/jfr/leakprofiler/checkpoint/objectSampleWriter.cpp#L462. We allocate for the names of JavaThreads in the closure and then we later retrieve them after traversing all frames from all threads: https://github.com/openjdk/jdk/blob/d9bcf061450ebfb7fe02b5a50c855db1d9178e5d/src/hotspot/share/jfr/leakprofiler/checkpoint/objectSampleWriter.cpp#L328

        Attachments

          Issue Links

            Activity

              People

                pchilanomate Patricio Chilano Mateo
                pchilanomate Patricio Chilano Mateo
                Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: