Re:Show HN: Prof – Self-contained C/C++ profiler library for...
by cyrusand on Saturday June 27, 2015 @06:59AM
(#9789782)
Yes, including "prof.h" is enough, but you can try using different events, by default Prof uses `PERF_COUNT_HW_REF_CPU_CYCLES`. For example try defining before #include "prof.h":
#define PROF_EVENT_LIST PROF_EVENT_HW(CPU_CYCLES)
or
#define PROF_EVENT_LIST PROF_EVENT_SW(CPU_CLOCK)
Which kernel version are you running?
Are you running this from a virtual machine?
#define PROF_EVENT_LIST PROF_EVENT_HW(CPU_CYCLES)
or
#define PROF_EVENT_LIST PROF_EVENT_SW(CPU_CLOCK)
Which kernel version are you running? Are you running this from a virtual machine?
Feel free to open an issue (https://github.com/cyrus-and/prof/issues) with these information if you can't manage to make it work.