public override IProcessAsyncOperation Execute (ExecutionCommand command, IConsole console)
		{
			DummyProcessAsyncOperation dpao = new DummyProcessAsyncOperation (process);
			string profilerIdentifier, tempFile, snapshotFile;
			ProfilingService.GetProfilerInformation (process.Id, out profilerIdentifier, out tempFile);
			DotNetExecutionCommand dotcmd = (DotNetExecutionCommand) command;
			snapshotFile = profiler.GetSnapshotFileName (dotcmd.WorkingDirectory, tempFile);
			
			ProfilingService.ActiveProfiler = profiler;
			ProfilingContext profContext = new ProfilingContext (dpao, snapshotFile);
			profiler.Start (profContext);

			return dpao;
		}
        public virtual void Start(ProfilingContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }

            lock (sync) {
                if (State != ProfilerState.Inactive)
                {
                    throw new InvalidOperationException("The profiler is already running.");
                }
                State = ProfilerState.Profiling;
            }

            this.context = context;
        }
        public override IProcessAsyncOperation Execute(ExecutionCommand command, IConsole console)
        {
            DummyProcessAsyncOperation dpao = new DummyProcessAsyncOperation(process);
            string profilerIdentifier, tempFile, snapshotFile;

            ProfilingService.GetProfilerInformation(process.Id, out profilerIdentifier, out tempFile);
            DotNetExecutionCommand dotcmd = (DotNetExecutionCommand)command;

            snapshotFile = profiler.GetSnapshotFileName(dotcmd.WorkingDirectory, tempFile);

            ProfilingService.ActiveProfiler = profiler;
            ProfilingContext profContext = new ProfilingContext(dpao, snapshotFile);

            profiler.Start(profContext);

            return(dpao);
        }
		public override IProcessAsyncOperation Execute (ExecutionCommand command, IConsole console)
		{
			DotNetExecutionCommand dotcmd = (DotNetExecutionCommand) command;
			
			string tempFile = Path.GetTempFileName ();
			string snapshotFile = profiler.GetSnapshotFileName (dotcmd.Command, tempFile);
			
			string args = string.Format ("--profile={2}:{3} --debug \"{0}\" {1}", dotcmd.Command, dotcmd.Arguments, profiler.Identifier, tempFile);
			NativeExecutionCommand cmd = new NativeExecutionCommand ("mono", args, dotcmd.WorkingDirectory, dotcmd.EnvironmentVariables);
			
			IProcessAsyncOperation pao = base.Execute (cmd, console);
			
			ProfilingService.ActiveProfiler = profiler;
			ProfilingContext profContext = new ProfilingContext (pao, snapshotFile);
			profiler.Start (profContext);
			return pao;
		}
Beispiel #5
0
		public override void Start (ProfilingContext context)
		{
			base.Start (context);
			dumpCount = 0;
		}
Beispiel #6
0
		public virtual void Start (ProfilingContext context)
		{
			if (context == null)
				throw new ArgumentNullException ("context");

			lock (sync) {
				if (State != ProfilerState.Inactive)
					throw new InvalidOperationException ("The profiler is already running.");
				State = ProfilerState.Profiling;
			}

			this.context = context;				
		}
		public override void Start (ProfilingContext context)
		{
			base.Start (context);
			
			context.AsyncOperation.Completed += new OperationHandler (OnOperationCompleted);
		}