Next: Trying it yourself - simulation Up: Trace-Based Cache Analysis Previous: Conclusions of Trace-Based Analysis

Trying it yourself

You can experiment with alternative cache designs yourself using the CSG Linux systems in two ways -- instrumentation or simulation:

1: Hardware instrumentation

Compile your application as normal then use the 'hpm' command:



 % cp ~phjk/ToyPrograms/C/MM.c ./
 % gcc -O3 MM.c
 % hpm -e PCL_L2CACHE_READWRITE,PCL_L2CACHE_MISS ./a.out
hpm: counter 0   : 21798432 PCL_L2CACHE_READWRITE
hpm: counter 1   : 15239794 PCL_L2CACHE_MISS



Ie. a miss rate of about 69%. Try also ``hpm -s'' and ``cat /proc/cpuinfo''.