Community
cancel
Showing results for 
Search instead for 
Did you mean: 
sureshk
Beginner
113 Views

Profiling a .NET Windows Service

Is it possible to profile a Windows Service written using .NET using VTune? Thanks.
-Suresh
0 Kudos
5 Replies
Anonymous24
Beginner
113 Views

sureshk:

Sampling can be used on any code that runs on the system: application, driver, service, etc. As long as you have debug information for the module (i.e., exe, dll, etc.), the analyzer can display hotspots within your code.

To use call graph on a Windows service, there are special instructions. Please see http://support.intel.com/support/performancetools/vtune/sb/cs-006207-prd232.htm.

-dlanders

James_P_Intel
Employee
113 Views

The above link does not work.
aokunev
Beginner
113 Views

Hi

http://www.intel.com/support/performancetools/vtune/v71/sb/cs-009677.htm is the correct one. It was the first in google search for 'call graph windows service'. There were no big changes in .NET related functionality, so there are chances the document is relevant for 9.0 as well.

regards, Andrei
jbuxtonval
Beginner
113 Views

That link isbroken too. Search seems useless.
David_A_Intel1
Employee
113 Views

It's here.

Also, looks like we archived that original article (it has been 4 years, after all! :-}. Here is the content for reference:

Symptom:
No data is collected when I try to call graph my Windows* service.

Solution:
The Intel VTune analyzer, by default, does not have administrative privileges to access Windows services. Follow the steps listed below to enable the analyzer:
  1. Make sure that you are logged in as Administrator on the system.
  2. Make sure that your service is installed and registered correctly.
  3. Open the Services applet (in Administrative Tools) and find your service in the list of installed services.
  4. If your service is running, stop it.
  5. Depending on your OS, click on the Startup button or right-click the service and select Properties, and change the StartUp type to Manual.
  6. Change LogOnAs to This Account and type "Administrator" in the This Account text box.
  7. Enter the password for the Administrator account. This will enable the analyzer to access the service when the activity is started.
  8. Confirm the password.
  9. Confirm that the service can be manually started and stopped.

The service cannow be call graphed using the following steps:

  1. Start the analyzer and select the Call Graph Wizard.
  2. Select Win32*/Win64* Profiling and press Next.
  3. Select No application to launch and press Next.
  4. Add your service to list of Modules of Interest and press Finish.
  5. Run the activity. When activity is run, the analyzer should instrument your service and prompt you to start the service.
  6. Start the service. The analyzer detects that the service has started and starts call graph analysis.
  7. Use the service - exercise the service by whatever means you have developed.
  8. Stop the service.
  9. Now, manually stop the analyzer activity by pressing the Stop button. The analyzer should produce a call graph for the selected service.

Reply