Performance-Monitoring Counters Library, for Intel/AMD Processors and Linux
This example introduces
   command-line syntax for rabbit and pmc_getargs()

Return to Main Menu

Command-Line Syntax Options can be abbreviated, -option to 2 characters, --option to 3 characters. The (imperfect) mnemonic is: -option needs one value, --option needs two values on an Intel processor, or four values on an AMD Athlon. Values cannot be adjoined to their options; for example, use '-g 2' and not '-g2'. However, the form '-g=2' is accepted. When two values are required for an option, but only one is supplied, the first is repeated. For example, the option '--compare 2' is equivalent to '--compare 2,2'. The first value applies to counter 0, the second to counter 1. Similarly, when four values are required, the last supplied is repeated, for counters 0, 1, 2 and 3. Numeric values can be supplied in decimal, octal, or hexadecimal, in the usual way (15 == 017 == 0xf). When the numeric range is limited (for example, with --user or --mesi) only the least-significant bits are used. The options are not permuted. When multiple instances of an option are used, on the command line or from an input file, the last instance applies. The option '--' separates rabbit's options from the command to be executed, in case the command starts with '-', or for clarity. The options -help, -version, -list, -codes, -descriptions, -processor, -alignment, -Input and -mhz 0 cause rabbit to print to stdout and then exit with status 0. The command is not executed. It is recommended to use these options to verify that an experiment has been formulated correctly. -Input is incompatible with the other options in this group. No environment variables are used. Unless stated otherwise, the default is to omit the option. Unless stated otherwise, the option applies to each of the Pentium, Pentium Pro and Athlon families of processors.
Examples rabbit -v rabbit --events 0,1 -d rabbit --events 0xc0,0xc2 -l -c -d rabbit -g 0 -d rabbit -g 0 sleep 1 rabbit -g 0 ls

Performance-Monitoring Counters Library, for Intel/AMD Processors and Linux
Author: Don Heller,
Last revised: 2 August 2000