Which tool is to use for CPU cycle, cache miss counting (for selected functions in user process)?
TSC instruction doesn't count context switches, interruptions.
I made basic search on this field, see below. If this question isn't appropriated for SO please move it or vote for close...
In some blog post author uses pfmon command (for Itanium/ADM64/Intel P6 CPUs) to get CPU cycles count spending in selected functions.
This tool seems belong to http://perfmon2.sourceforge.net/ project.
There are no corresponding packages in Debian/Ubuntu.
Same is with http://oprofile.sourceforge.net/ project. I think this is for some good reason, but who know...
Also there is Performance Counters for Linux presented by perf
tool and it available through linux-perf
package.
Also I found vendor tools:
- Intel VTune - free trial, 900$ licenced
- AMD CodeAnalyst Performance Analyzer - end of life, freeware
- AMD CodeXL - seems freeware