[perfmon2] Using performance monitoring from within a program

2009-12-18 Thread Vlad Slavici
Hi again, Is it possible to start performance monitoring from within C code and then turn it off from the code as well? I would like to be able to do something like: int main(){ ... code ... start performance monitoring on LOCKED_OPS:CYCLES_WAITING event ... code ... turn off performance moni

[perfmon2] Which performance counter to use for L1 data misses?

2009-12-18 Thread Vlad Slavici
Hello again, Which performance counter should I use to count L1 data cache misses? Also, will L1 data cache misses always report the cache misses for the cache closest to the CPU in the cache hierarchy? And if so, how can I monitor L2 cache misses and, for some machines, L3 cache misses? What I

[perfmon2] Monitoring a multi-threaded program

2009-12-18 Thread Vlad Slavici
Hello, I would like to monitor a multi-threaded program. For a single-threaded executable, I use: libpfm4/perf_examples/task -e L2_FILL_WRITEBACK:L2_WRITEBACKS ./program Do I need to add any parameters to this command to monitor all threads in a multi-threaded program? Thank you, Vlad -

[perfmon2] Using perf_events and libpfm4 in Ubuntu kernel 2.6.31 on AMD multi-core Opteron

2009-12-10 Thread Vlad Slavici
Hello, I would like to use the performance counters in libpfm4 on an AMD Opteron running Ubuntu, kernel 2.6.31 . I have built libpfm4. I am mostly interesting in two counters: LOCK WAIT and LOCK COUNT (I basically want to see how many times a multi-threaded user-level program makes calls to fun