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

OBJECT_FREE event not sent for all generations

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.3.0
    • 1.3.0
    • vm-legacy
    • sol-beta2
    • generic
    • generic
    • Not verified

      daniel.daugherty@Eng 2000-02-04

      From hs-chat e-mails by David Detlefs and Steffen Grarup:

      > > Not quite. In MarkSweep, all objects are marked and everything is
      > > compacted. The mark-compact supports compaction through a series of
      > > spaces, see Space::next_compaction_space().
      >
      > Aha. I see that now, and realize that I was misled by the following
      > code in MarkSweep::invoke_at_safepoint:
      >
      > mark_sweep_phase1(marked_for_deopt);
      >
      > if (jvmpi::is_event_enabled(JVMPI_EVENT_OBJECT_FREE)) {
      > JVMPI_Object_Free clo;
      > Universe::old_gen()->object_iterate(&clo);
      > Universe::perm_gen()->object_iterate(&clo);
      > }
      >
      > I saw that this did not seem to be posting the JVMPI Object_free
      > events for new generation objects that might be unmarked, and assumed
      > that meant that they wouldn't be collected. Is this just a bug?

      That is certainly a bug!! Thanks for catching this. The code should do

            if (jvmpi::is_event_enabled(JVMPI_EVENT_OBJECT_FREE)) {
              JVMPI_Object_Free clo;
              Universe::object_iterate(&clo);
            }

      rather than iterating over the individual generations.

            acorn Karen Kinnear (Inactive)
            dcubed Daniel Daugherty
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: