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

Re-exam the debug agent logic for enabling ObjectFree events

    XMLWordPrintable

Details

    • Enhancement
    • Status: Open
    • P4
    • Resolution: Unresolved
    • 20
    • tbd
    • core-svc
    • None

    Description

      During reviewing JDK-8256811, [~cjplummer] has following comments (https://github.com/openjdk/jdk/pull/9168#discussion_r907812755)
      "This looked a bit strange to me w.r.t. when we activate class tracking, so I looked into it. It turns out that when the debugger sends a request for CLASS_UNLOAD events, we convert it to EI_GC_FINISH and install a handler for it (and activate class tracking as you see in the above code). Activating doesn't do much. In fact it's not even where the ObjectFree events are enabled. This is done unconditionally in `classTrack_initialize()`, which is called whenever the debug agent is initialized. This means we always have the ObjectFree events enabled, even when the debugger has not requested CLASS_LOAD events. This seems like a bit of a performance issue. Maybe `classTrack_activate()` is where we should be enabling ObjectFree events. We should probably file a separate CR to have this fixed"

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              zgu Zhengyu Gu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: