Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
4975 Discussions

Launch inspxe-cl automatically when a process starts

Takin_N_
Beginner
397 Views

Is there a way to automatically launch inspxe-cl when a process starts?  In some cases, the tool cannot be run manually because the process is started through some other component.  Windows services come to mind, as well as applications that launch child processes such as iexplore.exe.

I tried using the "Image File Execution Options" registry key:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\intel_inspector_demo.exe]
"Debugger"="C:\\Program Files\\Intel\\Inspector XE 2013\\bin32\\inspxe-cl.exe -collect mi2 -result-dir C:\\Users\\admin\\Desktop\\demo\\result@@@ --"

This did not work as expected and caused the application to hang.  When looking in Process Explorer, I noticed that there were three instances of inspxe-cl.exe in the process tree.

0 Kudos
2 Replies
Peter_W_Intel
Employee
397 Views

A process has to be launched by Inspector XE, then Inspector can analyze it. Inspector cannot work on attach-a-process mode, as I know.

Inspector also can launch a script (or another process), which will start a target process  - the process will be analyzed. Do (for example):

 inspxe-cl -collect mi2 -executable-of-interest my-process -- test.sh

0 Kudos
Kirill_R_Intel
Employee
397 Views

Takin N., please refer to this article: http://software.intel.com/node/256329

You're on the right track with "debugger" registry attribute. But you may also need to creat a script that avoids recursive launch, that may happen in your case if your see three inspxe-cl.exe processes - there is an example how to do it. The article is about Intel(R) VTune (TM) Amplifier XE, but you can employ the same tricks.

Regards,
Kirill

0 Kudos
Reply