Page 1 of 1

some questions when coding PAPI programs

PostPosted: Sun Sep 20, 2009 5:30 pm
by kakagou
now I am going to write a program to read counter values periodically on linux, for example one time per second,
the program is used to get the counter values of bechmarks
Since PAPI is based on per-thread, how I get the performance counter values of the bechmark periodically?

Should I add codes in linux scheduler? or just write a program to handle this? who can give me some advise?

Re: some questions when coding PAPI programs

PostPosted: Mon Sep 21, 2009 1:13 pm
by Dan Terpstra
You need to instrument the benchmark source code with PAPI calls and recompile. You can overflow based on the cycle counter to get periodic values. If you don't have the source, you can use a tool like PerfSuite to get aggregate counts for the whole benchmark.

Re: some questions when coding PAPI programs

PostPosted: Sun Nov 15, 2009 2:26 am
by yuzhibin
I think we can monitor the performance counters of a benchmark by PAPI. It can used in following way:
./monitor_perf (PAPI tool name) bzip2 (benchmark name) benchmark parameters...

above program has been developed correctly.
I am working on how to output the values periodically.

Best regards,
Zhibin :roll: