Global Hotkey

Global Hotkey

It would be nice to have a global hotkey for starting/stopping a sampling session. This is particularly useful for games running in fullscreen mode or for any other app where you don't want to switch out of it. I realize that this is what "sample after xxx seconds" is for but this isn't always convenient to use.

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Actually, there is (ok are) hotkeys. For starting an activity it is "F5", for stopping it is "Shift-F5". Most of the hotkeys are defined in the menu display (ex: for running an activity, click on the "Activity" menu item and notice that there is an "F5" to the right of the "Run" menu item).

Yes, but these aren't global. They only persist within the application. What I am looking for is to have them persist even if VTune is not the active window (thus the example of the game running in fullscreen). So, the F5 when VTune is the active window will have another hotkey associated with it, but registered globally and could be, for example, Ctrl+Alt+F5.

I have submitted a feature request in Premier about this, but I wanted to see what this forum's thoughts on it are.

You're right, a good idea. Putting the feature request into Premier will work, we scan the feature requests there prior to defining what goes into each VTune Analyzer release. Now if only we had enough programmers to do everything we wanted...

Hi jandrew2,

I think you may be able to do this with the upcoming VTune analyzer 7.0 release. The VTune analyzer 7.0 product ships with a utility, the ActivityController, which can be used for controlling running Activities from the command line. It is primarily intended for controlling Activities that are started from the command line (using the new command line VTune feature, ala vtl), but it also can be used to control Activities that are started from the GUI.

The Activity Controller can be used both interactively and non-interactively. To use it non-interactively to stop the running Activity, use ActivityController -stop.

Create a batch file to invoke ActivityController -stop. Create a shortcut for the batch file. Display the properties for the shortcut and pick the key combination for the Shortcut key. At least, this is supposed to work according to the help that comes with Microsoft* Windows* XP Professional, but it didn't work for me. Anyway, assuming that you can get global hotkeys to work, a hotkey can be used to invoke the batch file and stop the running Activity, outside of the VTune analyzer GUI.

The Activity Controller, however, cannot be used to start an Activity. But, if you would like to run an Activity while your full-screen application is already running, you can do this with vtl. vtl can be used to create and run Activities from the command line, and you can bind specific vtl commands to a hotkey using the technique described above.

Other option #1: Logon to the system via Windows Terminal server, while the full-screen application is running on the interactive logon. Start up the VTune analyzer. Run a Sampling Activity--Sampling will collect data for all processes that are currently running.

Other option #2: Install a telnet/ssh server on the system. Start the full-screen application. Telnet/ssh into the system. Use vtl and the Activity Controller to run/stop an Activity.

Both of these additional options require a second system for use in logging into the system running the application. The second "system", however, could be as minimal as a PDA.

Hope this helps,
Aaron Levinson

Leave a Comment

Please sign in to add a comment. Not a member? Join today