3 ms·
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
by cyrusand 11y ago
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?
Feel free to open an issue (https://github.com/cyrus-and/prof/issues https://github.com/cyrus-and/prof/issues) with these information if you can't manage to make it work.