Ejemplo n.º 1
0
 private void ClearEvents()
 {
     loggingActiveEvent.Dispose();
     loggingActiveEvent = null;
     loggingActiveCompletedEvent.Dispose();
     loggingActiveCompletedEvent = null;
     forceGcEvent.Dispose();
     forceGcEvent = null;
     forceGcCompletedEvent.Dispose();
     forceGcCompletedEvent = null;
     callGraphActiveEvent.Dispose();
     callGraphActiveEvent = null;
     callGraphActiveCompletedEvent.Dispose();
     callGraphActiveCompletedEvent = null;
     detachEvent.Dispose();
     detachEvent = null;
 }
Ejemplo n.º 2
0
 private void ToggleEvent(NamedManualResetEvent toggleEvent, NamedManualResetEvent toggleEventCompleted)
 {
     if (profiledProcess != null && !ProfiledProcessHasExited() )
     {
         if (toggleEvent != null)
         {
             toggleEvent.Set();
             if (toggleEventCompleted.Wait(10 * 1000))
                 toggleEventCompleted.Reset();
             else
                 MessageBox.Show("There was no response from the application");
         }
     }
 }
Ejemplo n.º 3
0
 private void CreateEvents(int pid)
 {
     try
     {
         loggingActiveEvent = CreateEvent("OMV_TriggerObjects", pid, true);
         loggingActiveCompletedEvent = CreateEvent("OMV_TriggerObjects_Completed", pid, true);
         forceGcEvent = CreateEvent("OMV_ForceGC", pid, true);
         forceGcCompletedEvent = CreateEvent("OMV_ForceGC_Completed", pid, true);
         callGraphActiveEvent = CreateEvent("OMV_Callgraph", pid, true);
         callGraphActiveCompletedEvent = CreateEvent("OMV_Callgraph_Completed", pid, true);
         detachEvent = CreateEvent("OMV_Detach", pid, true);
     }
     catch
     {
         MessageBox.Show("Could not create events - in case you are profiling a service, " +
             "start the profiler BEFORE starting the service");
         throw;
     }
 }