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?