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

JVMTI GenerateEvents() sends CompiledMethodLoad events to wrong jvmtiEnv

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8u202, 11.0.2, 13
    • Fix Version/s: 13
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b17

      Description

      Consider two JVMTI agents subscribed to DynamicCodeGenerated and CompiledMethodLoad events.

      If one agents calls GenerateEvents(JVMTI_EVENT_COMPILED_METHOD_LOAD), the events will be received by both agents.

      However, if one agent calls GenerateEvents(JVMTI_EVENT_DYNAMIC_CODE_GENERATED), those events will be expectedly received only by this agent, and not by the second one.

      Seems like GenerateEvents behavior is inconsistent. CompiledMethodLoad events generated by the first agent should not be received by the second (unrelated) agent.

      To reproduce the bug compile the attached agents and run
      jcmd <pid> JVMTI.agent_load dupevent_1.dll
      jcmd <pid> JVMTI.agent_load dupevent_2.dll

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sspitsyn Serguei Spitsyn
                Reporter:
                apangin Andrei Pangin
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: