Image

retransformClasses() doesn't retransform all needed classes

XMLWordPrintable

    • Type: Image Bug
    • Resolution: Fixed
    • Priority: Image P3
    • 9.0.0
    • Affects Version/s: None
    • Component/s: Mission Control Core
    • None

      The retransformClasses() methods in Agent and AgentController use Class.forName() to try to get the class objects of  classes needed to retransform. This obviously doesn't work for classes loaded by classloaders different from the one which loads the agent.

      Those classes would be instrumented if they were loaded after their event probes were defined the AgentController. But when loaded earlier they would not be instrumented.

      The fix is to iterate over all loaded classes via Instrumentation.getAllLoadedClasses() and check if a class matches an event probe definition.

            Assignee:
            Image Ralf Schmelter
            Reporter:
            Image Ralf Schmelter
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: