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

JVMTI Spec: GarbageCollectionFinish event - regression from JVMPI's equivalent

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P3 P3
    • 10
    • 5.0
    • hotspot
    • x86
    • windows_xp

      FULL PRODUCT VERSION :


      A DESCRIPTION OF THE PROBLEM :
      With JVMPI we were able to get heap info on a GC-finish event through a union 'u' member of JVMPI_Event as follows:

      static void process_event(JVMPI_Event *event)
      {
      switch(event->event_type) {
      ...
      case JVMPI_EVENT_GC_FINISH:
      mymethod(event->env_id,
      event->u.gc_info.used_objects,
      event->u.gc_info.used_object_space,
      event->u.gc_info.total_object_space);

      We knew what the used object space looked like right after GC was performed, and we could provide accurate heap graphs that would indicate memory leaks, and we could provide low-heap alerts based on this accurate data.

      With JVMTI it looks like this data is not available in the callbac. It looks like one has to write an agent thread waiting on a raw monitor which should be awakened, and then it could make JNI calls to get that data via methods in java.lang.Runtime, but by the time it gets to do that the data will be somewhat tainted again.

      I am hoping this regression is fixed soon.

      THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Did not try

      THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Did not try

      REPRODUCIBILITY :
      This bug can be reproduced always.

            Unassigned Unassigned
            tbell Tim Bell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: