Ubuntu performance counter library in C

I am trying to find a library to access the performance counter in ubuntu. But I can’t find him. On linux website I found about pmc.h library. But I can not find it in my system. Can someone help me find a library to get performance counters data?

I am using ubuntu 11 and i386 processor. Another strange thing that I observed in my ubuntu is that I cannot find the / usr / include / sys directory. This is necessary to use socket.h :(

+4
source share
1 answer
  • I don't know about pmc (does it seem to exist only for Darwin?), But consider using libpfm :

    sudo apt-cache search libpfm 
  • /usr/include/socket.h belongs to libc6-dev:

     dpkg -L libc6-dev | grep socket.h 

    Install libc6-dev via:

     sudo apt-get install libc6-dev 
+4
source

Source: https://habr.com/ru/post/1397091/


All Articles