The profiler receives method calls (event notifications from the Microsoft VM) on its Java event notification interface when various events occur. The NotifyEvent method receives an event type passed as its first parameter along with a UniqueID for the second parameter. The type of the UniqueID passed to NotifyEvent is determined by the event type. See NotifyEvent for the possible event types from the JVM_EVENT_TYPE enumeration and the associated UniqueIDs passed to the NotifyEvent method.
Certain events may require special synchronization with the use of methods that operate on the event's parameters. For example, the ThreadInformation method should not be called on a ThreadID that a profiler has received a JVM_EVENT_TYPE_THREAD_DESTROY event for. The Microsoft VM does not verify that the thread associated with the given ThreadID is still valid. Profilers should take care to synchronize destruction event notifications with uses of UniqueIDs to ensure that the last use of a UniqueID occurs before returning from handling the associated destruction event. Those Events and UniqueIDs that need to be synchronized are also described in the NotifyEvent topic of the Java Profiler Interfaces Reference.
NotifyEvent2 receives an event type passed as its first parameter along with two UniqueIDs. The types of the UniqueIDs passed to NotifyEvent2 are determined by the event type.