| Valgrind 3.3 - Advanced Debugging and Profiling for GNU/Linux applications by J. Seward, N. Nethercote, J. Weidendorfer and the Valgrind Development Team Paperback (6"x9"), 164 pages ISBN 0954612051 RRP £12.95 ($19.95) |
6.2.2 Cachegrind options
Using command line options, you can manually specify the I1/D1/L2 cache configuration to simulate. For each cache, you can specify the size, associativity and line size. The size and line size are measured in bytes. The three items must be comma-separated, but with no spaces, e.g.:
valgrind --tool=cachegrind --I1=65535,2,64
You can specify one, two or three of the I1/D1/L2 caches. Any level not manually specified will be simulated using the configuration found in the normal way (via the CPUID instruction for automagic cache configuration, or failing that, via defaults).
Cache-simulation specific options are:
--I1=<size>,<associativity>,<line size>Specify the size, associativity and line size of the level 1 instruction cache.--D1=<size>,<associativity>,<line size>Specify the size, associativity and line size of the level 1 data cache.--L2=<size>,<associativity>,<line size>Specify the size, associativity and line size of the level 2 cache.--cachegrind-out-file=<file>Write the profile data to ‘file’ rather than to the default output file, ‘cachegrind.out.<pid>’. The%pand%qformat specifiers can be used to embed the process ID and/or the contents of an environment variable in the name, as is the case for the core option--log-file. See 3.6.2 for details.--cache-sim=no|yes [yes]Enables or disables collection of cache access and miss counts.--branch-sim=no|yes [no]Enables or disables collection of branch instruction and misprediction counts. By default this is disabled as it slows Cachegrind down by approximately 25%. Note that you cannot specify ‘--cache-sim=no’ and ‘--branch-sim=no’ together, as that would leave Cachegrind with no information to collect.
| ISBN 0954612051 | Valgrind 3.3 - Advanced Debugging and Profiling for GNU/Linux applications | See the print edition |