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

JVMTI Doc: Clarify OBJECT_FREE event timing with regards to ForceGarbageCollecti

    Details

    • Subcomponent:
    • Resolved In Build:
      b56
    • CPU:
      generic
    • OS:
      generic

      Description

      Clarify OBJECT_FREE event timing with regards to ForceGarbageCollection()

      From Kelly:

      It says in the JVMTI spec for ForceGarbageCollection():
       "Force the VM to perform a garbage collection.
        The garbage collection is as complete as possible.
        This function does not cause finalizers to be run.
        This function does not return until the garbage collection is finished."

      And for OBJECT_FREE it says:
       "An Object Free event is sent when the garbage collector frees an object."

      I'd read the above as meaning that most OBJECT_FREE calls WOULD be made and
      the only issue is the timing of the thread running the ForceGarbageCollection
      call, and the thread (or threads) making the OBJECT_FREE event callbacks?????

      From Alan:
        I agree the wording could be better. The ObjectFree is posted after the GC frees an object
        and the spec should say something to indicate that there isn't a guarantee that the
        ObjectFree events will be posted by the time that ForceGarbageCollection completes.
        Also, for tagged objects that have finalizers it could be sometime later before the event is posted.

        Attachments

          Activity

            People

            • Assignee:
              rfield Robert Field
              Reporter:
              ohair Kelly Ohair (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: