I've been trying to instrument SPEC CPU2006 benchmarks using Intel's Pin on Ubuntu. I have a Pintool with a simple cache simulator that counts reads and writes. When running the Pintool on a 'runspec -nonreportable' command for a specific benchmark I get the data I want. However, the results of different benchmarks hardly differ at all. My pintool doesn't seem to be the problem as it looks to be working correctly on other applications. I suspect the results are due to the Pintool is instrumenting everything including the setup of the benchmark.
What I've previously done it just running the pintool on the runspec command. I've also tried to use '--action build' and '--action setup' prior to using runspec to reduce the overhead, but it seems like runs much of the same setup anyway. I know there are monitoring hooks in SPEC CPU 2006 where I can run additional commands right before starting a benchmark, and I'm thinking there might be someway in which I can use those but I'm know sure how. Maybe the 'monitor_wrapper' hook is most appropriate? Maybe I can get a hold of the pid somehow and attach my pintool to the correct process just as the benchmark is starting? Super thankful for any help I can get!