Created On:  14 October 2010

Problem:

Conditions:
For large applications that may run about 10 minutes before any instrumented COM DLL gets loaded, it is noticed that the NCS service gives up waiting for any instrumented sessions after 5 minutes. 

Observations:
In the output window of Visual Studio one sees the message "Initializing process monitoring... Session started." when running Performance Analysis on a large application.  Upon exiting the application/finishing the analysis, it is expected that a session file for PA(Application.dpprf) pops up, but does not.  Increasing memory does not resolve the issue.  The main problem here may be due to the fact that the instrumented DLL is not being loaded until all other files in an application are processed.  Depending upon the number of files, this could take more that 5 minutes.  5 minutes is the
timeout for our sessions.  If no activity takes place in that time-frame, the session is terminated automatically and no session file is produced.

Resolution:

Use DPAnalysis.exe from the command line to do late instrumentation of the EXE so that the NCS service can hook into the application sooner before a timeout occurs.  To properly do this workaround, utilize the /f (force injection) flag.  Since injection is performed right off the bat, the time-out issue is avoided.
Incident #2453478