Using VTune to count (rather than sample)

Using VTune to count (rather than sample)

Portrait de demianmnave

Let's say I am interested in counting the overall number of L1 I- and D-cache misses experienced by my application, and let's assume that my platform is a "standard" PIII (733MHz variety).

Can I use VTune to do this accurately? For example, would setting the sampling rate longer than my program's execution do the trick?

Thanks for your help,
Demian M. Nave

Pittsburgh Supercomputing Center
Carnegie Mellon University
Pittsburgh, PA 15213
dnave@psc.edu

3 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.
Portrait de Daniel Bricker (Intel)

Demian,

The way you propose to do it (setting the duration longer then yours program execution) will work.

Just take into account that you'll get so called "calibrations" runs (see more about the callibration in help).
The number of calibration runs depends on events and its number you chose, as well on the processor you use.

So if you program takes a long time to run you might prefer to switch to the mode without calibration.

To run sampling collection on the whole session of your program and eliminate calibration runs set the duration of the activity to zero (use the switch "-d 0") and "-cal no" option to the sampling collector.
See the example of the command line:

vtl activity -c sampling -o "-cal no" -app netscape,/opt/intel/vtune/doc/users_guide/index.htm -d 0 run



That command will run sampling collection with default settings (except the calibration) for the default events on Netscape application, that will open the html file with help for VTune Performance Environment. (Here you can find more info about the calibration and sample after). In this activity run the default values for sample after will be used. Generally speaking you have to provide the sample after values, when you do not use the calibration.

vtl view


will show your the total count of events you used in the last activity run.

To see what are the default setting for sampling collector are dump them to some file (e.g. /tmp/dss):

vtl query -c sampling -dof /tmp/dss


and investigate it.

You can prepare your own setting files (use the example of the dumped one). To use the prepared setting files use the "-of" flag for activity:

vtl activity -c sampling -of /tmp/your_setting_file -app netscape,/opt/intel/vtune/doc/users_guide/index.htm -d 0 run




Daniel

Portrait de Aaron Levinson (Intel)

I'd like to add just a bit to Daniel's excellent response.

In the "vtl activity", line, Daniel added "-d 0". This indicates that the Activity should have a duration of 0, meaning that it has no duration. It will run until the application exits or the Activity is manually stopped using the Activity Controller (for more information, type ActivityController -help or man ActivityController). Stopping the Activity using the Activity Controller will also cause the application to be terminated.

Turning off calibration (-o "-cal no") is necessary in the case where the duration is set to zero.

If you don't want sampling to stop until the application has exited, then the only sure way to do this is by using a duration of zero.

Aaron Levinson

Connectez-vous pour laisser un commentaire.