Guest User

libperfcount.h

a guest
Dec 31st, 2015
427
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.31 KB | None | 0 0
  1. /* Include Guards */
  2. #ifndef LIBPERFCOUNT_H
  3. #define LIBPERFCOUNT_H
  4.  
  5.  
  6. /* Includes */
  7. #include <stdint.h>
  8.  
  9.  
  10.  
  11. /* Data types */
  12.  
  13.  
  14.  
  15. /* Extern "C" Guard */
  16. #ifdef __cplusplus
  17. extern "C"{
  18. #endif
  19.  
  20. /* Functions */
  21.  
  22. /**
  23.  * Initialize library
  24.  */
  25.  
  26. int pfcInit(void);
  27.  
  28. /**
  29.  * Finalize library
  30.  */
  31.  
  32. void pfcFini(void);
  33.  
  34. /**
  35.  * Pins calling thread to given core
  36.  */
  37.  
  38. void pfcPinThread(int core);
  39.  
  40. /**
  41.  * Configure the n counters starting at counter k.
  42.  *
  43.  * Stops and disables the selected counters.
  44.  */
  45.  
  46. int  pfcWrConfigCnts(int f, int n, const uint64_t* cfg);
  47.  
  48. /**
  49.  * Read configuration of the n counters starting at counter k.
  50.  */
  51.  
  52. int  pfcRdConfigCnts(int f, int n, uint64_t* cfg);
  53.  
  54. /**
  55.  * Sets the starting counts for the n counters starting at counter k.
  56.  *
  57.  * Stops and disables the selected counters.
  58.  */
  59.  
  60. int  pfcWrCountsCnts(int f, int n, const uint64_t* cnt);
  61.  
  62. /**
  63.  * Read counts of the n counters starting at counter k.
  64.  *
  65.  * Starts the selected counters.
  66.  */
  67.  
  68. int  pfcRdCountsCnts(int f, int n, uint64_t* cnt);
  69.  
  70. /**
  71.  * Translate argument to configuration.
  72.  */
  73.  
  74. uint64_t pfcParseConfig(const char* s);
  75.  
  76. /**
  77.  * Dump out available events
  78.  */
  79.  
  80. void pfcDumpEvents(void);
  81.  
  82.  
  83.  
  84.  
  85. /* End Extern "C" Guard */
  86. #ifdef __cplusplus
  87. }
  88. #endif
  89.  
  90. #endif // LIBPERFCOUNT_H
Add Comment
Please, Sign In to add comment