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

(ref) Remove ReferenceQueue::queueLength

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • core-libs
    • None

      The ReferenceQueue class has a private long queueLength field. It is incremented by enqueue, and decremented by reallyPoll.

      The *only* use of this field is in the hotspot agent code, in sun/jvm/hotspot/tools/FinalizerInfo.java. It obtains access using reflection. It is used to print the "current" number of objects pending finalization. Of course, that number can (and probably will) change almost immediately.

      That count is also available via jdk.internal.misc.VM::geFinalRefCount(), and the agent could get it from there instead.

            Unassigned Unassigned
            kbarrett Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: