This content has been marked as final. Show 3 replies
Please make sure you include the cal_ext_counter.h header file when using counters.
I did include the header. The compilation goes fine but the linker complains that it cannot find the symbols. I looked at the list of symbols exported by libamdcalrt.so and libamdcalcl.so (using nm -D) and neither of them include calCtxCreateCounter or other counter related functions.
I was doing it the wrong way. There is no predefined function called calCtxCreateCounter etc. They have to be obtained using calExtGetProc. I followed the example in perf_counters.cpp and counters are working for me now.