LIKWID
likwid.h
1 /*
2  * =======================================================================================
3  *
4  * Filename: likwid.h
5  *
6  * Description: Header File of likwid API
7  *
8  * Version: <VERSION>
9  * Released: <DATE>
10  *
11  * Authors: Thomas Roehl (tr), thomas.roehl@googlemail.com
12  *
13  * Project: likwid
14  *
15  * Copyright (C) 2016 RRZE, University Erlangen-Nuremberg
16  *
17  * This program is free software: you can redistribute it and/or modify it under
18  * the terms of the GNU General Public License as published by the Free Software
19  * Foundation, either version 3 of the License, or (at your option) any later
20  * version.
21  *
22  * This program is distributed in the hope that it will be useful, but WITHOUT ANY
23  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
24  * PARTICULAR PURPOSE. See the GNU General Public License for more details.
25  *
26  * You should have received a copy of the GNU General Public License along with
27  * this program. If not, see <http://www.gnu.org/licenses/>.
28  *
29  * =======================================================================================
30  */
31 #ifndef LIKWID_H
32 #define LIKWID_H
33 
34 #include <stdint.h>
35 #include <errno.h>
36 #include <string.h>
37 
38 #include <bstrlib.h>
39 
40 #define DEBUGLEV_ONLY_ERROR 0
41 #define DEBUGLEV_INFO 1
42 #define DEBUGLEV_DETAIL 2
43 #define DEBUGLEV_DEVELOP 3
44 
45 #define LIKWID_VERSION "VERSION.RELEASE.MINORVERSION"
46 #define LIKWID_COMMIT GITCOMMIT
47 
48 extern int perfmon_verbosity;
49 
87 #ifdef LIKWID_PERFMON
88 #define LIKWID_MARKER_INIT likwid_markerInit()
89 #define LIKWID_MARKER_THREADINIT likwid_markerThreadInit()
90 #define LIKWID_MARKER_SWITCH likwid_markerNextGroup()
91 #define LIKWID_MARKER_REGISTER(regionTag) likwid_markerRegisterRegion(regionTag)
92 #define LIKWID_MARKER_START(regionTag) likwid_markerStartRegion(regionTag)
93 #define LIKWID_MARKER_STOP(regionTag) likwid_markerStopRegion(regionTag)
94 #define LIKWID_MARKER_CLOSE likwid_markerClose()
95 #define LIKWID_MARKER_GET(regionTag, nevents, events, time, count) likwid_markerGetRegion(regionTag, nevents, events, time, count)
96 #else
97 #define LIKWID_MARKER_INIT
98 #define LIKWID_MARKER_THREADINIT
99 #define LIKWID_MARKER_SWITCH
100 #define LIKWID_MARKER_REGISTER(regionTag)
101 #define LIKWID_MARKER_START(regionTag)
102 #define LIKWID_MARKER_STOP(regionTag)
103 #define LIKWID_MARKER_CLOSE
104 #define LIKWID_MARKER_GET(regionTag, nevents, events, time, count)
105 #endif
106 
107 #ifdef __cplusplus
108 extern "C" {
109 #endif
110 
111 
112 /*
113 ################################################################################
114 # Marker API related functions
115 ################################################################################
116 */
131 extern void likwid_markerInit(void) __attribute__ ((visibility ("default") ));
138 extern void likwid_markerThreadInit(void) __attribute__ ((visibility ("default") ));
143 extern void likwid_markerNextGroup(void) __attribute__ ((visibility ("default") ));
149 extern void likwid_markerClose(void) __attribute__ ((visibility ("default") ));
156 extern int likwid_markerRegisterRegion(const char* regionTag) __attribute__ ((visibility ("default") ));
164 extern int likwid_markerStartRegion(const char* regionTag) __attribute__ ((visibility ("default") ));
172 extern int likwid_markerStopRegion(const char* regionTag) __attribute__ ((visibility ("default") ));
173 
183 extern void likwid_markerGetRegion(const char* regionTag, int* nr_events, double* events, double *time, int *count) __attribute__ ((visibility ("default") ));
184 /* utility routines */
190 extern int likwid_getProcessorId() __attribute__ ((visibility ("default") ));
198 extern int likwid_pinProcess(int processorId) __attribute__ ((visibility ("default") ));
206 extern int likwid_pinThread(int processorId) __attribute__ ((visibility ("default") ));
209 /*
210 ################################################################################
211 # Access client related functions
212 ################################################################################
213 */
225 typedef enum {
229 } AccessMode;
230 
236 extern void HPMmode(int mode) __attribute__ ((visibility ("default") ));
242 extern int HPMinit() __attribute__ ((visibility ("default") ));
249 extern int HPMaddThread(int cpu_id) __attribute__ ((visibility ("default") ));
254 extern void HPMfinalize() __attribute__ ((visibility ("default") ));
257 /*
258 ################################################################################
259 # Config file related functions
260 ################################################################################
261 */
273 typedef struct {
276  char* daemonPath;
277  char* groupPath;
282 
292 extern int init_configuration(void) __attribute__ ((visibility ("default") ));
298 extern int destroy_configuration(void) __attribute__ ((visibility ("default") ));
299 
300 
307 extern Configuration_t get_configuration(void) __attribute__ ((visibility ("default") ));
308 
315 extern int config_setGroupPath(const char* path) __attribute__ ((visibility ("default") ));
316 
318 /*
319 ################################################################################
320 # CPU topology related functions
321 ################################################################################
322 */
331 typedef struct {
332  uint32_t family;
333  uint32_t model;
334  uint32_t stepping;
335  uint64_t clock;
336  int turbo;
337  char* osname;
338  char* name;
339  char* short_name;
340  char* features;
341  int isIntel;
343  uint32_t featureFlags;
344  uint32_t perf_version;
345  uint32_t perf_num_ctr;
346  uint32_t perf_width_ctr;
348 } CpuInfo;
349 
356 typedef struct {
357  uint32_t threadId;
358  uint32_t coreId;
359  uint32_t packageId;
360  uint32_t apicId;
361  uint32_t inCpuSet;
362 } HWThread;
363 
369 typedef enum {
376 } CacheType;
377 
383 typedef struct {
384  uint32_t level;
385  CacheType type;
386  uint32_t associativity;
387  uint32_t sets;
388  uint32_t lineSize;
389  uint32_t size;
390  uint32_t threads;
391  uint32_t inclusive;
392 } CacheLevel;
393 
398 typedef struct {
399  uint32_t numHWThreads;
400  uint32_t activeHWThreads;
401  uint32_t numSockets;
402  uint32_t numCoresPerSocket;
403  uint32_t numThreadsPerCore;
404  uint32_t numCacheLevels;
408 } CpuTopology;
409 
411 extern CpuInfo cpuid_info;
414 
425 extern int topology_init(void) __attribute__ ((visibility ("default") ));
431 extern CpuTopology_t get_cpuTopology(void) __attribute__ ((visibility ("default") ));
438 extern CpuInfo_t get_cpuInfo(void) __attribute__ ((visibility ("default") ));
444 extern void topology_finalize(void) __attribute__ ((visibility ("default") ));
447 extern void print_supportedCPUs(void) __attribute__ ((visibility ("default") ));
449 /*
450 ################################################################################
451 # NUMA related functions
452 ################################################################################
453 */
464 typedef struct {
465  uint32_t id;
466  uint64_t totalMemory;
467  uint64_t freeMemory;
469  uint32_t* processors;
470  uint32_t numberOfDistances;
471  uint32_t* distances;
472 } NumaNode;
473 
474 
477 typedef struct {
478  uint32_t numberOfNodes;
480 } NumaTopology;
481 
483 extern NumaTopology numa_info;
484 
487 
495 extern int numa_init(void) __attribute__ ((visibility ("default") ));
502 extern NumaTopology_t get_numaTopology(void) __attribute__ ((visibility ("default") ));
509 extern void numa_setInterleaved(const int* processorList, int numberOfProcessors) __attribute__ ((visibility ("default") ));
515 extern void numa_membind(void* ptr, size_t size, int domainId) __attribute__ ((visibility ("default") ));
522 extern void numa_finalize(void) __attribute__ ((visibility ("default") ));
530 extern int likwid_getNumberOfNodes(void) __attribute__ ((visibility ("default") ));
532 /*
533 ################################################################################
534 # Affinity domains related functions
535 ################################################################################
536 */
546 typedef struct {
547  bstring tag;
549  uint32_t numberOfCores;
552 
562 typedef struct {
572 
575 
582 extern void affinity_init() __attribute__ ((visibility ("default") ));
589 extern AffinityDomains_t get_affinityDomains(void) __attribute__ ((visibility ("default") ));
595 extern void affinity_pinProcess(int processorId) __attribute__ ((visibility ("default") ));
602 extern void affinity_pinProcesses(int cpu_count, const int* processorIds) __attribute__ ((visibility ("default") ));
608 extern void affinity_pinThread(int processorId) __attribute__ ((visibility ("default") ));
613 extern int affinity_processGetProcessorId() __attribute__ ((visibility ("default") ));
618 extern int affinity_threadGetProcessorId() __attribute__ ((visibility ("default") ));
625 extern void affinity_finalize() __attribute__ ((visibility ("default") ));
628 /*
629 ################################################################################
630 # CPU string parsing related functions
631 ################################################################################
632 */
647 extern int cpustr_to_cpulist(const char* cpustring, int* cpulist, int length) __attribute__ ((visibility ("default") ));
657 extern int nodestr_to_nodelist(const char* nodestr, int* nodes, int length) __attribute__ ((visibility ("default") ));
667 extern int sockstr_to_socklist(const char* sockstr, int* sockets, int length) __attribute__ ((visibility ("default") ));
668 
671 /*
672 ################################################################################
673 # Performance monitoring related functions
674 ################################################################################
675 */
686 extern int perfmon_getGroups(char*** groups, char*** shortinfos, char*** longinfos) __attribute__ ((visibility ("default") ));
687 
695 extern void perfmon_returnGroups(int nrgroups, char** groups, char** shortinfos, char** longinfos) __attribute__ ((visibility ("default") ));
696 
705 extern int perfmon_init(int nrThreads, const int* threadsToCpu) __attribute__ ((visibility ("default") ));
706 
714 extern void perfmon_init_maps(void) __attribute__ ((visibility ("default") ));
722 extern void perfmon_check_counter_map(int cpu_id) __attribute__ ((visibility ("default") ));
730 extern int perfmon_addEventSet(const char* eventCString) __attribute__ ((visibility ("default") ));
738 extern int perfmon_setupCounters(int groupId) __attribute__ ((visibility ("default") ));
745 extern int perfmon_startCounters(void) __attribute__ ((visibility ("default") ));
752 extern int perfmon_stopCounters(void) __attribute__ ((visibility ("default") ));
760 extern int perfmon_readCounters(void) __attribute__ ((visibility ("default") ));
769 extern int perfmon_readCountersCpu(int cpu_id) __attribute__ ((visibility ("default") ));
778 extern int perfmon_readGroupCounters(int groupId) __attribute__ ((visibility ("default") ));
788 extern int perfmon_readGroupThreadCounters(int groupId, int threadId) __attribute__ ((visibility ("default") ));
796 extern int perfmon_switchActiveGroup(int new_group) __attribute__ ((visibility ("default") ));
802 extern void perfmon_finalize(void) __attribute__ ((visibility ("default") ));
812 extern double perfmon_getResult(int groupId, int eventId, int threadId) __attribute__ ((visibility ("default") ));
822 extern double perfmon_getLastResult(int groupId, int eventId, int threadId) __attribute__ ((visibility ("default") ));
831 extern double perfmon_getMetric(int groupId, int metricId, int threadId) __attribute__ ((visibility ("default") ));
840 extern double perfmon_getLastMetric(int groupId, int metricId, int threadId) __attribute__ ((visibility ("default") ));
841 
846 extern int perfmon_getNumberOfGroups(void) __attribute__ ((visibility ("default") ));
852 extern int perfmon_getNumberOfEvents(int groupId) __attribute__ ((visibility ("default") ));
858 extern double perfmon_getTimeOfGroup(int groupId) __attribute__ ((visibility ("default") ));
863 extern int perfmon_getIdOfActiveGroup(void) __attribute__ ((visibility ("default") ));
868 extern int perfmon_getNumberOfThreads(void) __attribute__ ((visibility ("default") ));
869 
870 
874 extern void perfmon_setVerbosity(int verbose) __attribute__ ((visibility ("default") ));
875 
883 extern char* perfmon_getEventName(int groupId, int eventId) __attribute__ ((visibility ("default") ));
891 extern char* perfmon_getCounterName(int groupId, int eventId) __attribute__ ((visibility ("default") ));
898 extern char* perfmon_getGroupName(int groupId) __attribute__ ((visibility ("default") ));
906 extern char* perfmon_getMetricName(int groupId, int metricId) __attribute__ ((visibility ("default") ));
914 extern char* perfmon_getGroupInfoShort(int groupId) __attribute__ ((visibility ("default") ));
922 extern char* perfmon_getGroupInfoLong(int groupId) __attribute__ ((visibility ("default") ));
923 
929 extern int perfmon_getNumberOfMetrics(int groupId) __attribute__ ((visibility ("default") ));
930 
936 extern double perfmon_getLastTimeOfGroup(int groupId) __attribute__ ((visibility ("default") ));
937 
942 extern int perfmon_readMarkerFile(const char* filename) __attribute__ ((visibility ("default") ));
945 extern void perfmon_destroyMarkerResults() __attribute__ ((visibility ("default") ));
950 extern int perfmon_getNumberOfRegions() __attribute__ ((visibility ("default") ));
956 extern int perfmon_getGroupOfRegion(int region) __attribute__ ((visibility ("default") ));
961 extern char* perfmon_getTagOfRegion(int region) __attribute__ ((visibility ("default") ));
966 extern int perfmon_getEventsOfRegion(int region) __attribute__ ((visibility ("default") ));
971 extern int perfmon_getMetricsOfRegion(int region) __attribute__ ((visibility ("default") ));
976 extern int perfmon_getThreadsOfRegion(int region) __attribute__ ((visibility ("default") ));
983 extern int perfmon_getCpulistOfRegion(int region, int count, int* cpulist) __attribute__ ((visibility ("default") ));
989 extern double perfmon_getTimeOfRegion(int region, int thread) __attribute__ ((visibility ("default") ));
995 extern int perfmon_getCountOfRegion(int region, int thread) __attribute__ ((visibility ("default") ));
1002 extern double perfmon_getResultOfRegionThread(int region, int event, int thread) __attribute__ ((visibility ("default") ));
1009 extern double perfmon_getMetricOfRegionThread(int region, int metricId, int threadId) __attribute__ ((visibility ("default") ));
1010 
1013 /*
1014 ################################################################################
1015 # Time measurements related functions
1016 ################################################################################
1017 */
1018 
1026 typedef union
1027 {
1028  uint64_t int64;
1029  struct {uint32_t lo, hi;} int32;
1030 } TscCounter;
1031 
1034 typedef struct {
1037 } TimerData;
1038 
1041 extern void timer_init( void ) __attribute__ ((visibility ("default") ));
1047 extern double timer_print( const TimerData* time) __attribute__ ((visibility ("default") ));
1053 extern uint64_t timer_printCycles( const TimerData* time) __attribute__ ((visibility ("default") ));
1058 extern void timer_reset( TimerData* time ) __attribute__ ((visibility ("default") ));
1063 extern uint64_t timer_getCpuClock( void ) __attribute__ ((visibility ("default") ));
1068 extern uint64_t timer_getCpuClockCurrent( int cpu_id ) __attribute__ ((visibility ("default") ));
1073 extern uint64_t timer_getCycleClock( void ) __attribute__ ((visibility ("default") ));
1078 extern uint64_t timer_getBaseline( void ) __attribute__ ((visibility ("default") ));
1083 extern void timer_start( TimerData* time ) __attribute__ ((visibility ("default") ));
1088 extern void timer_stop ( TimerData* time) __attribute__ ((visibility ("default") ));
1093 extern int timer_sleep(unsigned long usec) __attribute__ ((visibility ("default") ));
1094 
1098 extern void timer_finalize(void) __attribute__ ((visibility ("default") ));
1099 
1102 /*
1103 ################################################################################
1104 # Power measurements related functions
1105 ################################################################################
1106 */
1115 #define NUM_POWER_DOMAINS 5
1116 
1118 extern const char* power_names[NUM_POWER_DOMAINS] __attribute__ ((visibility ("default") ));
1119 
1124 #define POWER_DOMAIN_SUPPORT_STATUS (1ULL<<0)
1125 
1129 #define POWER_DOMAIN_SUPPORT_LIMIT (1ULL<<1)
1130 
1134 #define POWER_DOMAIN_SUPPORT_POLICY (1ULL<<2)
1135 
1139 #define POWER_DOMAIN_SUPPORT_PERF (1ULL<<3)
1140 
1144 #define POWER_DOMAIN_SUPPORT_INFO (1ULL<<4)
1145 
1146 
1150 typedef struct {
1151  int numSteps;
1152  double* steps;
1153 } TurboBoost;
1154 
1158 typedef enum {
1159  PKG = 0,
1160  PP0 = 1,
1161  PP1 = 2,
1162  DRAM = 3,
1164 } PowerType;
1165 
1169 typedef struct {
1171  uint32_t supportFlags;
1172  double energyUnit;
1173  double tdp;
1174  double minPower;
1175  double maxPower;
1176  double maxTimeWindow;
1177 } PowerDomain;
1178 
1181 typedef struct {
1182  double baseFrequency;
1183  double minFrequency;
1185  int hasRAPL;
1186  double powerUnit;
1187  double timeUnit;
1188  double uncoreMinFreq;
1189  double uncoreMaxFreq;
1190  uint8_t perfBias;
1192 } PowerInfo;
1193 
1196 typedef struct {
1197  int domain;
1198  uint32_t before;
1199  uint32_t after;
1200 } PowerData;
1201 
1203 extern PowerInfo power_info;
1204 
1209 
1217 extern int power_init(int cpuId) __attribute__ ((visibility ("default") ));
1223 extern PowerInfo_t get_powerInfo(void) __attribute__ ((visibility ("default") ));
1230 extern int power_read(int cpuId, uint64_t reg, uint32_t *data) __attribute__ ((visibility ("default") ));
1238 extern int power_tread(int socket_fd, int cpuId, uint64_t reg, uint32_t *data) __attribute__ ((visibility ("default") ));
1246 extern int power_start(PowerData_t data, int cpuId, PowerType type) __attribute__ ((visibility ("default") ));
1254 extern int power_stop(PowerData_t data, int cpuId, PowerType type) __attribute__ ((visibility ("default") ));
1260 extern double power_printEnergy(const PowerData* data) __attribute__ ((visibility ("default") ));
1266 extern double power_getEnergyUnit(int domain) __attribute__ ((visibility ("default") ));
1267 
1277 int power_limitGet(int cpuId, PowerType domain, double* power, double* time) __attribute__ ((visibility ("default") ));
1278 
1289 int power_limitSet(int cpuId, PowerType domain, double power, double time, int doClamping) __attribute__ ((visibility ("default") ));
1290 
1298 int power_limitState(int cpuId, PowerType domain) __attribute__ ((visibility ("default") ));
1299 
1302 extern void power_finalize(void) __attribute__ ((visibility ("default") ));
1305 /*
1306 ################################################################################
1307 # Thermal measurements related functions
1308 ################################################################################
1309 */
1317 extern void thermal_init(int cpuId) __attribute__ ((visibility ("default") ));
1323 extern int thermal_read(int cpuId, uint32_t *data) __attribute__ ((visibility ("default") ));
1330 extern int thermal_tread(int socket_fd, int cpuId, uint32_t *data) __attribute__ ((visibility ("default") ));
1334 /*
1335 ################################################################################
1336 # Memory sweeping related functions
1337 ################################################################################
1338 */
1347 extern void memsweep_domain(int domainId) __attribute__ ((visibility ("default") ));
1354 extern void memsweep_threadGroup(const int* processorList, int numberOfProcessors) __attribute__ ((visibility ("default") ));
1357 /*
1358 ################################################################################
1359 # CPU feature related functions
1360 ################################################################################
1361 */
1367 typedef enum {
1387  CPUFEATURES_MAX
1388 } CpuFeature;
1389 
1394 extern void cpuFeatures_init() __attribute__ ((visibility ("default") ));
1400 extern void cpuFeatures_print(int cpu) __attribute__ ((visibility ("default") ));
1408 extern int cpuFeatures_get(int cpu, CpuFeature type) __attribute__ ((visibility ("default") ));
1415 extern char* cpuFeatures_name(CpuFeature type) __attribute__ ((visibility ("default") ));
1424 extern int cpuFeatures_enable(int cpu, CpuFeature type, int print) __attribute__ ((visibility ("default") ));
1433 extern int cpuFeatures_disable(int cpu, CpuFeature type, int print) __attribute__ ((visibility ("default") ));
1437 /*
1438 ################################################################################
1439 # CPU frequency related functions
1440 ################################################################################
1441 */
1451 extern uint64_t freq_getCpuClockCurrent(const int cpu_id ) __attribute__ ((visibility ("default") ));
1452 
1459 extern uint64_t freq_getCpuClockMax(const int cpu_id ) __attribute__ ((visibility ("default") ));
1467 extern uint64_t freq_setCpuClockMax(const int cpu_id, const uint64_t freq) __attribute__ ((visibility ("default") ));
1474 extern uint64_t freq_getCpuClockMin(const int cpu_id ) __attribute__ ((visibility ("default") ));
1482 extern uint64_t freq_setCpuClockMin(const int cpu_id, const uint64_t freq) __attribute__ ((visibility ("default") ));
1490 extern int freq_setTurbo(const int cpu_id, int turbo) __attribute__ ((visibility ("default") ));
1497 extern int freq_getTurbo(const int cpu_id) __attribute__ ((visibility ("default") ));
1504 extern char * freq_getGovernor(const int cpu_id ) __attribute__ ((visibility ("default") ));
1512 extern int freq_setGovernor(const int cpu_id, const char* gov) __attribute__ ((visibility ("default") ));
1519 extern char * freq_getAvailFreq(const int cpu_id ) __attribute__ ((visibility ("default") ));
1526 extern char * freq_getAvailGovs(const int cpu_id ) __attribute__ ((visibility ("default") ));
1527 
1535 extern int freq_setUncoreFreqMin(const int socket_id, const uint64_t freq) __attribute__ ((visibility ("default") ));
1536 
1543 extern uint64_t freq_getUncoreFreqMin(const int socket_id) __attribute__ ((visibility ("default") ));
1544 
1552 extern int freq_setUncoreFreqMax(const int socket_id, const uint64_t freq) __attribute__ ((visibility ("default") ));
1553 
1560 extern uint64_t freq_getUncoreFreqMax(const int socket_id) __attribute__ ((visibility ("default") ));
1567 extern uint64_t freq_getUncoreFreqCur(const int socket_id) __attribute__ ((visibility ("default") ));
1570 #ifdef __cplusplus
1571 }
1572 #endif
1573 
1574 #endif /*LIKWID_H*/
CpuInfo cpuid_info
Variable holding the global cpu information structure.
CpuInfo_t get_cpuInfo(void) __attribute__((visibility("default")))
Retrieve CPU information of the current machine.
Use the access daemon to access the registers.
Definition: likwid.h:228
Structure describing the topology of the HW threads in the system.
Definition: likwid.h:398
Precise Event Based Sampling (PEBS)
Definition: likwid.h:1378
int likwid_getNumberOfNodes(void) __attribute__((visibility("default")))
Retrieve the number of NUMA nodes.
PP1 domain, not clearly defined by Intel.
Definition: likwid.h:1161
Structure describing a cache level.
Definition: likwid.h:383
char * perfmon_getMetricName(int groupId, int metricId) __attribute__((visibility("default")))
Get the metric name of the specified group and metric.
uint32_t family
CPU family ID.
Definition: likwid.h:332
uint32_t perf_version
Version of Intel&#39;s performance monitoring facility.
Definition: likwid.h:344
int power_limitState(int cpuId, PowerType domain) __attribute__((visibility("default")))
Get the state of a energy limit, activated or deactivated NOT IMPLEMENTED.
int sockstr_to_socklist(const char *sockstr, int *sockets, int length) __attribute__((visibility("default")))
Read CPU socket selection string and resolve to available CPU socket numbers.
Configuration_t get_configuration(void) __attribute__((visibility("default")))
Retrieve the config structure.
Cache holding instruction cache lines.
Definition: likwid.h:372
int HPMaddThread(int cpu_id) __attribute__((visibility("default")))
Add CPU to access module.
Limit CPUID Maxval.
Definition: likwid.h:1382
void affinity_pinProcesses(int cpu_count, const int *processorIds) __attribute__((visibility("default")))
Pin processes to a CPU.
char * cpuFeatures_name(CpuFeature type) __attribute__((visibility("default")))
Get the name of a CPU feature.
uint32_t perf_num_ctr
Number of general purpose core-local performance monitoring counters.
Definition: likwid.h:345
char * features
String with all features supported by the CPU.
Definition: likwid.h:340
char * osname
Name of the CPU reported by OS.
Definition: likwid.h:337
AccessMode
Enum for the access modes.
Definition: likwid.h:225
int nodestr_to_nodelist(const char *nodestr, int *nodes, int length) __attribute__((visibility("default")))
Read NUMA node selection string and resolve to available NUMA node numbers.
xTPR Message to set processor priority
Definition: likwid.h:1377
Structure describing an RAPL power domain.
Definition: likwid.h:1169
uint32_t numberOfCoresPerCache
Number of HW threads per LLC cache in the system.
Definition: likwid.h:567
uint32_t numberOfProcessors
umber of processors covered by the NUMA node and length of processors
Definition: likwid.h:468
Execute Disable Bit.
Definition: likwid.h:1383
uint32_t perf_num_fixed_ctr
Number of fixed purpose core-local performance monitoring counters.
Definition: likwid.h:347
double perfmon_getMetric(int groupId, int metricId, int threadId) __attribute__((visibility("default")))
Get the metric result of the specified group, counter and thread.
The NumaTopology structure describes all NUMA nodes in the current system.
Definition: likwid.h:477
int likwid_pinProcess(int processorId) __attribute__((visibility("default")))
Pin the current process to given CPU.
Access performance monitoring through perf_event kernel interface.
Definition: likwid.h:226
uint64_t freq_getCpuClockMin(const int cpu_id) __attribute__((visibility("default")))
Get the minimal clock frequency of a core.
int perfmon_getNumberOfRegions() __attribute__((visibility("default")))
Get the number of regions listed in Marker API result file.
NumaNode * nodes
List of NUMA nodes.
Definition: likwid.h:479
Likwid_Configuration * Configuration_t
Pointer for exporting the Configuration data structure.
Definition: likwid.h:284
int init_configuration(void) __attribute__((visibility("default")))
Read the config file of LIKWID, if it exists.
int perfmon_readMarkerFile(const char *filename) __attribute__((visibility("default")))
Read the output file of the Marker API.
double baseFrequency
Base frequency of the CPU.
Definition: likwid.h:1182
AffinityDomain * domains
List of all domains in the system.
Definition: likwid.h:570
uint64_t freq_setCpuClockMax(const int cpu_id, const uint64_t freq) __attribute__((visibility("default")))
Set the maximal clock frequency of a core.
int domain
RAPL domain identifier.
Definition: likwid.h:1197
void power_finalize(void) __attribute__((visibility("default")))
Free space of power_unit.
uint32_t numberOfNodes
Number of NUMA nodes in the system and length of nodes.
Definition: likwid.h:478
uint32_t id
ID of the NUMA node.
Definition: likwid.h:465
int * processorList
List of HW thread IDs in the domain.
Definition: likwid.h:550
Cache holding data cache lines.
Definition: likwid.h:371
void cpuFeatures_print(int cpu) __attribute__((visibility("default")))
Print state of all CPU features for a given CPU.
int power_init(int cpuId) __attribute__((visibility("default")))
Initialize energy measurements on specific CPU.
void timer_init(void) __attribute__((visibility("default")))
Initialize timer by retrieving baseline frequency and cpu clock.
int perfmon_getGroups(char ***groups, char ***shortinfos, char ***longinfos) __attribute__((visibility("default")))
Get all groups.
void likwid_markerGetRegion(const char *regionTag, int *nr_events, double *events, double *time, int *count) __attribute__((visibility("default")))
Get accumulated data of a code region.
FERR# Multiplexing, must be 1 for XAPIC interrupt model.
Definition: likwid.h:1375
int perfmon_getGroupOfRegion(int region) __attribute__((visibility("default")))
Get the groupID of a region.
Struct defining the start and stop time of a time interval.
Definition: likwid.h:1034
int perfmon_init(int nrThreads, const int *threadsToCpu) __attribute__((visibility("default")))
Initialize performance monitoring facility.
uint64_t clock
Current clock frequency of the executing CPU.
Definition: likwid.h:335
uint32_t inCpuSet
ID of HW thread inside the CPU core.
Definition: likwid.h:361
int maxNumThreads
Maximum number of HW threads.
Definition: likwid.h:279
uint32_t numHWThreads
Amount of HW threads in the system and length of threadPool.
Definition: likwid.h:399
uint64_t timer_getCycleClock(void) __attribute__((visibility("default")))
Return the cycles clock determined at timer_init.
double maxPower
Maximal power consumption of the CPU.
Definition: likwid.h:1175
int freq_setGovernor(const int cpu_id, const char *gov) __attribute__((visibility("default")))
Set the frequency governor of a core.
double power_getEnergyUnit(int domain) __attribute__((visibility("default")))
Get energy Unit.
int perfmon_getNumberOfThreads(void) __attribute__((visibility("default")))
Get the number of threads specified at perfmon_init()
void thermal_init(int cpuId) __attribute__((visibility("default")))
Initialize thermal measurements on specific CPU.
void perfmon_returnGroups(int nrgroups, char **groups, char **shortinfos, char **longinfos) __attribute__((visibility("default")))
Free all group information.
uint32_t * processors
List of HW threads in the NUMA node.
Definition: likwid.h:469
void print_supportedCPUs(void) __attribute__((visibility("default")))
Print all supported architectures.
char * perfmon_getCounterName(int groupId, int eventId) __attribute__((visibility("default")))
Get the counter name of the specified group and event.
int power_start(PowerData_t data, int cpuId, PowerType type) __attribute__((visibility("default")))
Start energy measurements.
uint64_t int64
Cycle count in 64 bit.
Definition: likwid.h:1028
int supportUncore
Flag if system has Uncore performance monitors.
Definition: likwid.h:342
void cpuFeatures_init() __attribute__((visibility("default")))
Initialize the internal feature variables for all CPUs.
The AffinityDomain data structure describes a single domain in the current system.
Definition: likwid.h:546
AccessMode daemonMode
Access mode to the MSR and PCI registers.
Definition: likwid.h:278
double maxTimeWindow
Minimal power measurement interval.
Definition: likwid.h:1176
uint64_t totalMemory
Amount of memory in the NUMA node.
Definition: likwid.h:466
void affinity_init() __attribute__((visibility("default")))
Initialize affinity information.
const char *power_names[NUM_POWER_DOMAINS] __attribute__((visibility("default")))
List of all RAPL domain names.
int perfmon_readCountersCpu(int cpu_id) __attribute__((visibility("default")))
Read the performance monitoring counters on one CPU.
TurboBoost turbo
Turbo boost information.
Definition: likwid.h:1184
DCU L1 data cache prefetcher.
Definition: likwid.h:1370
CacheType type
Type of the cache.
Definition: likwid.h:385
The AffinityDomains data structure holds different count variables describing the various system laye...
Definition: likwid.h:562
TscCounter start
Cycles at start.
Definition: likwid.h:1035
int power_limitGet(int cpuId, PowerType domain, double *power, double *time) __attribute__((visibility("default")))
Get the values of the limit register of a domain NOT IMPLEMENTED.
uint32_t numberOfAffinityDomains
Number of affinity domains in the current system and length of domains array.
Definition: likwid.h:569
void perfmon_check_counter_map(int cpu_id) __attribute__((visibility("default")))
Check the performance monitoring maps whether counters and events are available.
int likwid_markerStopRegion(const char *regionTag) __attribute__((visibility("default")))
Stop a measurement region.
CPUs in NUMA node and general information about a NUMA domain.
Definition: likwid.h:464
double perfmon_getMetricOfRegionThread(int region, int metricId, int threadId) __attribute__((visibility("default")))
Get the metric result of a region for a metric and thread.
double perfmon_getLastTimeOfGroup(int groupId) __attribute__((visibility("default")))
Get the last measurement time a group.
Hardware performance monitoring.
Definition: likwid.h:1374
double timeUnit
Multiplier for time information.
Definition: likwid.h:1187
Information structure of CPU&#39;s turbo mode.
Definition: likwid.h:1150
int perfmon_switchActiveGroup(int new_group) __attribute__((visibility("default")))
Switch the active eventSet to a new one.
uint64_t timer_getCpuClock(void) __attribute__((visibility("default")))
Return the CPU clock determined at timer_init.
int perfmon_stopCounters(void) __attribute__((visibility("default")))
Stop performance monitoring counters.
uint32_t supportFlags
Bitmask which features are supported by the power domain.
Definition: likwid.h:1171
void timer_reset(TimerData *time) __attribute__((visibility("default")))
Reset values in TimerData.
AffinityDomains_t get_affinityDomains(void) __attribute__((visibility("default")))
Retrieve affinity structure.
void likwid_markerThreadInit(void) __attribute__((visibility("default")))
Initialize LIKWID&#39;s marker API for the current thread.
double perfmon_getTimeOfGroup(int groupId) __attribute__((visibility("default")))
Get the accumulated measurement time a group.
double powerUnit
Multiplier for power measurements.
Definition: likwid.h:1186
char * freq_getAvailFreq(const int cpu_id) __attribute__((visibility("default")))
Get the available frequencies of a core.
int perfmon_readCounters(void) __attribute__((visibility("default")))
Read the performance monitoring counters on all CPUs.
int turbo
Flag if CPU has a turbo mode.
Definition: likwid.h:336
PowerInfo_t get_powerInfo(void) __attribute__((visibility("default")))
Get a pointer to the energy facility information.
int perfmon_getNumberOfMetrics(int groupId) __attribute__((visibility("default")))
Get the number of configured metrics for group.
uint64_t freq_getCpuClockCurrent(const int cpu_id) __attribute__((visibility("default")))
Get the current clock frequency of a core.
char * perfmon_getGroupInfoLong(int groupId) __attribute__((visibility("default")))
Get the long descriptive string of the specified group.
double minPower
Minimal power consumption of the CPU.
Definition: likwid.h:1174
double perfmon_getLastResult(int groupId, int eventId, int threadId) __attribute__((visibility("default")))
Get the last results of the specified group, counter and thread.
double tdp
Thermal Design Power (maximum amount of heat generated by the CPU)
Definition: likwid.h:1173
double perfmon_getResultOfRegionThread(int region, int event, int thread) __attribute__((visibility("default")))
Get the event result of a region for an event and thread.
void timer_start(TimerData *time) __attribute__((visibility("default")))
Start time measurement.
uint32_t packageId
ID of CPU socket containing the HW thread.
Definition: likwid.h:359
int likwid_pinThread(int processorId) __attribute__((visibility("default")))
Pin the current thread to given CPU.
uint32_t after
Counter state at stop.
Definition: likwid.h:1199
uint32_t size
Size in bytes of the cache.
Definition: likwid.h:389
int thermal_tread(int socket_fd, int cpuId, uint32_t *data) __attribute__((visibility("default")))
Read the current thermal value using a specific communication socket.
double uncoreMinFreq
Minimal uncore frequency.
Definition: likwid.h:1188
int numSteps
Amount of turbo mode steps/frequencies.
Definition: likwid.h:1151
HWThread * threadPool
List of all HW thread descriptions.
Definition: likwid.h:405
Adjacent cache line prefetcher.
Definition: likwid.h:1369
double perfmon_getTimeOfRegion(int region, int thread) __attribute__((visibility("default")))
Get the accumulated measurement time of a region for a thread.
int hasRAPL
RAPL support flag.
Definition: likwid.h:1185
uint32_t numCoresPerSocket
Amount of physical cores in one CPU socket/package.
Definition: likwid.h:402
int power_stop(PowerData_t data, int cpuId, PowerType type) __attribute__((visibility("default")))
Stop energy measurements.
int destroy_configuration(void) __attribute__((visibility("default")))
Destroy the config structure.
uint32_t activeHWThreads
Amount of HW threads in the system and length of threadPool.
Definition: likwid.h:400
char * perfmon_getTagOfRegion(int region) __attribute__((visibility("default")))
Get the tag of a region.
uint32_t numberOfCores
Number of CPU cores in the domain.
Definition: likwid.h:549
uint64_t timer_getBaseline(void) __attribute__((visibility("default")))
Return the baseline CPU clock determined at timer_init.
char * topologyCfgFileName
Path to the topology file.
Definition: likwid.h:275
void perfmon_destroyMarkerResults() __attribute__((visibility("default")))
Free space for read in Marker API file.
double * steps
List of turbo mode steps.
Definition: likwid.h:1152
void likwid_markerNextGroup(void) __attribute__((visibility("default")))
Select next group to measure.
int perfmon_getCountOfRegion(int region, int thread) __attribute__((visibility("default")))
Get the call count of a region for a thread.
No cache used as undef value.
Definition: likwid.h:370
IP L1 data cache prefetcher.
Definition: likwid.h:1371
Information structure of CPU&#39;s power measurement facility.
Definition: likwid.h:1181
void timer_finalize(void) __attribute__((visibility("default")))
Finalize timer module.
char * short_name
Short name of the CPU.
Definition: likwid.h:339
CacheLevel * cacheLevels
List of all caches in the hierarchy.
Definition: likwid.h:406
int power_read(int cpuId, uint64_t reg, uint32_t *data) __attribute__((visibility("default")))
Read the current power value.
char * freq_getGovernor(const int cpu_id) __attribute__((visibility("default")))
Get the frequency governor of a core.
NumaTopology numa_info
Variable holding the global NUMA information structure.
uint32_t numCacheLevels
Amount of caches for each HW thread and length of cacheLevels.
Definition: likwid.h:404
int freq_setUncoreFreqMax(const int socket_id, const uint64_t freq) __attribute__((visibility("default")))
Set the maximal Uncore frequency.
void perfmon_init_maps(void) __attribute__((visibility("default")))
Initialize performance monitoring maps.
double minFrequency
Minimal frequency of the CPU.
Definition: likwid.h:1183
double power_printEnergy(const PowerData *data) __attribute__((visibility("default")))
Print energy measurements gathered by power_start() and power_stop()
void topology_finalize(void) __attribute__((visibility("default")))
Destroy topology structures CpuInfo_t and CpuTopology_t.
int numa_init(void) __attribute__((visibility("default")))
Initialize NUMA information.
void affinity_pinProcess(int processorId) __attribute__((visibility("default")))
Pin process to a CPU.
int config_setGroupPath(const char *path) __attribute__((visibility("default")))
Set group path in the config struction.
MONITOR/MWAIT feature to monitor write-back stores.
Definition: likwid.h:1380
uint32_t lineSize
Size in bytes of one cache line.
Definition: likwid.h:388
#define NUM_POWER_DOMAINS
Definition: likwid.h:1115
int perfmon_getThreadsOfRegion(int region) __attribute__((visibility("default")))
Get the number of threads of a region.
int cpuFeatures_disable(int cpu, CpuFeature type, int print) __attribute__((visibility("default")))
Disable a CPU feature for a specific CPU.
uint32_t model
CPU model ID.
Definition: likwid.h:333
int perfmon_getNumberOfEvents(int groupId) __attribute__((visibility("default")))
Get the number of configured eventSets in group.
int likwid_markerStartRegion(const char *regionTag) __attribute__((visibility("default")))
Start a measurement region.
void memsweep_domain(int domainId) __attribute__((visibility("default")))
Sweeping the memory of a NUMA node.
uint8_t perfBias
Performance energy bias.
Definition: likwid.h:1190
Access performance monitoring registers directly.
Definition: likwid.h:227
int perfmon_getNumberOfGroups(void) __attribute__((visibility("default")))
Get the number of configured event groups.
Enhanced Intel SpeedStep Technology Select Lock.
Definition: likwid.h:1381
int likwid_markerRegisterRegion(const char *regionTag) __attribute__((visibility("default")))
Register a measurement region.
CpuTopology_t get_cpuTopology(void) __attribute__((visibility("default")))
Retrieve CPU topology of the current machine.
char * configFileName
Path to the configuration file.
Definition: likwid.h:274
int affinity_threadGetProcessorId() __attribute__((visibility("default")))
Return the CPU ID where the current thread runs.
PowerType type
Identifier which RAPL domain is managed by this struct.
Definition: likwid.h:1170
uint32_t coreId
ID of CPU core that executes the HW thread.
Definition: likwid.h:358
Intel Dynamic Acceleration.
Definition: likwid.h:1384
Structure with general CPU information.
Definition: likwid.h:331
uint32_t numSockets
Amount of CPU sockets/packages in the system.
Definition: likwid.h:401
uint32_t apicId
ID of HW thread retrieved through the Advanced Programmable Interrupt Controller. ...
Definition: likwid.h:360
Thermal Monitoring 2.
Definition: likwid.h:1386
uint32_t numberOfProcessorsPerCache
Number of CPU cores per LLC cache in the system.
Definition: likwid.h:568
uint32_t numberOfCacheDomains
Number of LLC caches in the system.
Definition: likwid.h:566
uint32_t associativity
Amount of cache lines hold by each set.
Definition: likwid.h:386
Intel Turbo Mode.
Definition: likwid.h:1385
int perfmon_getMetricsOfRegion(int region) __attribute__((visibility("default")))
Get the number of metrics of a region.
bstring tag
Bstring with the ID for the affinity domain. Currently possible values: N (node), SX (socket/package ...
Definition: likwid.h:547
PowerInfo * PowerInfo_t
Pointer for exporting the PowerInfo data structure.
Definition: likwid.h:1206
uint32_t inclusive
Flag if cache is inclusive (holds also cache lines available in caches nearer to the CPU) or exclusiv...
Definition: likwid.h:391
void numa_finalize(void) __attribute__((visibility("default")))
Destroy NUMA information structure.
double energyUnit
Multiplier for energy measurements.
Definition: likwid.h:1172
void memsweep_threadGroup(const int *processorList, int numberOfProcessors) __attribute__((visibility("default")))
Sweeping the memory of all NUMA nodes covered by CPU list.
double perfmon_getResult(int groupId, int eventId, int threadId) __attribute__((visibility("default")))
Get the results of the specified group, counter and thread.
void likwid_markerInit(void) __attribute__((visibility("default")))
Initialize LIKWID&#39;s marker API.
uint32_t featureFlags
Mask of all features supported by the CPU.
Definition: likwid.h:343
uint32_t perf_width_ctr
Bit width of fixed and general purpose counters.
Definition: likwid.h:346
char * perfmon_getGroupInfoShort(int groupId) __attribute__((visibility("default")))
Get the short informational string of the specified group.
int power_tread(int socket_fd, int cpuId, uint64_t reg, uint32_t *data) __attribute__((visibility("default")))
Read the current energy value using a specific communication socket.
CpuInfo * CpuInfo_t
Pointer for exporting the CpuInfo data structure.
Definition: likwid.h:416
uint64_t timer_getCpuClockCurrent(int cpu_id) __attribute__((visibility("default")))
Return the current CPU clock read from sysfs.
int perfmon_getIdOfActiveGroup(void) __attribute__((visibility("default")))
Get the ID of the currently set up event group.
int maxNumNodes
Maximum number of NUMA nodes.
Definition: likwid.h:280
Branch Trace Storage.
Definition: likwid.h:1376
int perfmon_readGroupThreadCounters(int groupId, int threadId) __attribute__((visibility("default")))
Read the performance monitoring counters of on thread in a group.
CacheType
Enum of possible caches.
Definition: likwid.h:369
uint32_t sets
Amount of sets.
Definition: likwid.h:387
uint64_t freq_getCpuClockMax(const int cpu_id) __attribute__((visibility("default")))
Get the maximal clock frequency of a core.
int topology_init(void) __attribute__((visibility("default")))
Initialize topology information.
int isIntel
Flag if it is an Intel CPU.
Definition: likwid.h:341
AffinityDomains * AffinityDomains_t
Pointer for exporting the AffinityDomains data structure.
Definition: likwid.h:574
int HPMinit() __attribute__((visibility("default")))
Initialize access module.
void affinity_pinThread(int processorId) __attribute__((visibility("default")))
Pin thread to a CPU.
DRAM domain, the memory modules.
Definition: likwid.h:1162
uint32_t before
Counter state at start.
Definition: likwid.h:1198
Translation Lookaside Buffer cache for data pages.
Definition: likwid.h:375
double timer_print(const TimerData *time) __attribute__((visibility("default")))
Return the measured interval in seconds.
uint32_t numberOfProcessors
Number of HW threads in the domain and length of processorList.
Definition: likwid.h:548
PLATFORM domain, the whole system (if powered through the main board)
Definition: likwid.h:1163
int likwid_getProcessorId() __attribute__((visibility("default")))
Get CPU ID of the current process/thread.
void HPMfinalize() __attribute__((visibility("default")))
Close connections.
CpuTopology * CpuTopology_t
Pointer for exporting the CpuTopology data structure.
Definition: likwid.h:418
CpuTopology cpuid_topology
Variable holding the global cpu topology structure.
NumaTopology_t get_numaTopology(void) __attribute__((visibility("default")))
Retrieve NUMA information of the current machine.
Structure of a tree node.
Definition: tree_types.h:42
uint64_t timer_printCycles(const TimerData *time) __attribute__((visibility("default")))
Return the measured interval in cycles.
int cpuFeatures_enable(int cpu, CpuFeature type, int print) __attribute__((visibility("default")))
Enable a CPU feature for a specific CPU.
uint64_t freq_getUncoreFreqMax(const int socket_id) __attribute__((visibility("default")))
Get the maximal Uncore frequency.
PowerType
Enum for all supported RAPL domains.
Definition: likwid.h:1158
Structure with IDs of a HW thread.
Definition: likwid.h:356
int freq_getTurbo(const int cpu_id) __attribute__((visibility("default")))
Get state of turbo mode for core.
Hardware prefetcher.
Definition: likwid.h:1368
Enhanced Intel SpeedStep Technology to reduce energy consumption.
Definition: likwid.h:1379
uint64_t freeMemory
Amount of free memory in the NUMA node.
Definition: likwid.h:467
Automatic Thermal Control Circuit.
Definition: likwid.h:1373
uint64_t freq_setCpuClockMin(const int cpu_id, const uint64_t freq) __attribute__((visibility("default")))
Set the minimal clock frequency of a core.
void HPMmode(int mode) __attribute__((visibility("default")))
Set access mode.
char * name
Name of the CPU as identified by LIKWID.
Definition: likwid.h:338
int freq_setUncoreFreqMin(const int socket_id, const uint64_t freq) __attribute__((visibility("default")))
Set the minimal Uncore frequency.
uint32_t threads
Number of HW thread connected to the cache.
Definition: likwid.h:390
void numa_membind(void *ptr, size_t size, int domainId) __attribute__((visibility("default")))
Allocate memory from a specific specific NUMA node.
double uncoreMaxFreq
Maximal uncore frequency.
Definition: likwid.h:1189
uint32_t level
Level of the cache in the hierarchy.
Definition: likwid.h:384
PP0 domain, not clearly defined by Intel.
Definition: likwid.h:1160
uint32_t numberOfNumaDomains
Number of NUMA nodes in the system.
Definition: likwid.h:564
PowerInfo power_info
Variable holding the global power information structure.
char * perfmon_getEventName(int groupId, int eventId) __attribute__((visibility("default")))
Get the event name of the specified group and event.
char * freq_getAvailGovs(const int cpu_id) __attribute__((visibility("default")))
Get the available frequency governors of a core.
void likwid_markerClose(void) __attribute__((visibility("default")))
Close LIKWID&#39;s marker API.
Structure holding values of the configuration file.
Definition: likwid.h:273
int cpustr_to_cpulist(const char *cpustring, int *cpulist, int length) __attribute__((visibility("default")))
Read CPU selection string and resolve to available CPU numbers.
int affinity_processGetProcessorId() __attribute__((visibility("default")))
Return the CPU ID where the current process runs.
Fast-strings feature.
Definition: likwid.h:1372
void perfmon_setVerbosity(int verbose) __attribute__((visibility("default")))
Set verbosity of LIKWID library.
uint32_t numberOfSocketDomains
Number of CPU sockets/packages in the system.
Definition: likwid.h:563
uint64_t freq_getUncoreFreqMin(const int socket_id) __attribute__((visibility("default")))
Get the minimal Uncore frequency.
double perfmon_getLastMetric(int groupId, int metricId, int threadId) __attribute__((visibility("default")))
Get the last metric result of the specified group, counter and thread.
int perfmon_getCpulistOfRegion(int region, int count, int *cpulist) __attribute__((visibility("default")))
Get the cpulist of a region.
struct treeNode * topologyTree
Anchor for a tree structure describing the system topology.
Definition: likwid.h:407
int freq_setTurbo(const int cpu_id, int turbo) __attribute__((visibility("default")))
De/Activate turbo mode for core.
uint32_t stepping
Stepping (version) of the CPU.
Definition: likwid.h:334
char * daemonPath
Path of the access daemon.
Definition: likwid.h:276
void perfmon_finalize(void) __attribute__((visibility("default")))
Close the perfomance monitoring facility of LIKWID.
void timer_stop(TimerData *time) __attribute__((visibility("default")))
Stop time measurement.
Power measurement data for start/stop measurements.
Definition: likwid.h:1196
TscCounter stop
Cycles at stop.
Definition: likwid.h:1036
int perfmon_addEventSet(const char *eventCString) __attribute__((visibility("default")))
Add an event string to LIKWID.
PKG domain, mostly one CPU socket/package.
Definition: likwid.h:1159
uint32_t * distances
List of distances to the other NUMA nodes and self.
Definition: likwid.h:471
char * groupPath
Path of default performance group directory.
Definition: likwid.h:277
int perfmon_readGroupCounters(int groupId) __attribute__((visibility("default")))
Read the performance monitoring counters of all threads in a group.
int power_limitSet(int cpuId, PowerType domain, double power, double time, int doClamping) __attribute__((visibility("default")))
Set the values of the limit register of a domain NOT IMPLEMENTED.
uint32_t threadId
ID of HW thread inside the CPU core.
Definition: likwid.h:357
int perfmon_startCounters(void) __attribute__((visibility("default")))
Start performance monitoring counters.
NumaTopology * NumaTopology_t
Pointer for exporting the NumaTopology data structure.
Definition: likwid.h:486
int perfmon_setupCounters(int groupId) __attribute__((visibility("default")))
Setup all performance monitoring counters of an eventSet.
int timer_sleep(unsigned long usec) __attribute__((visibility("default")))
Sleep for specified usecs.
CpuFeature
Enumeration of all CPU related features.
Definition: likwid.h:1367
int cpuFeatures_get(int cpu, CpuFeature type) __attribute__((visibility("default")))
Get state of a CPU feature for a given CPU.
Translation Lookaside Buffer cache for instruction pages.
Definition: likwid.h:374
void numa_setInterleaved(const int *processorList, int numberOfProcessors) __attribute__((visibility("default")))
Set memory allocation policy to interleaved.
uint64_t freq_getUncoreFreqCur(const int socket_id) __attribute__((visibility("default")))
Get the current Uncore frequency.
Struct defining the start and stop time of a time interval.
Definition: likwid.h:1026
uint32_t numberOfProcessorsPerSocket
Number of HW threads per socket/package in the system.
Definition: likwid.h:565
uint32_t numThreadsPerCore
Amount of HW threads in one physical CPU core.
Definition: likwid.h:403
PowerData * PowerData_t
Pointer for exporting the PowerData data structure.
Definition: likwid.h:1208
void affinity_finalize() __attribute__((visibility("default")))
Destroy affinity information structure.
Cache holding both instruction and data cache lines.
Definition: likwid.h:373
char * perfmon_getGroupName(int groupId) __attribute__((visibility("default")))
Get the name group.
int thermal_read(int cpuId, uint32_t *data) __attribute__((visibility("default")))
Read the current thermal value.
int perfmon_getEventsOfRegion(int region) __attribute__((visibility("default")))
Get the number of events of a region.
uint32_t numberOfDistances
Amount of distances to the other NUMA nodes in the system and self.
Definition: likwid.h:470