40 #define DEBUGLEV_ONLY_ERROR 0 41 #define DEBUGLEV_INFO 1 42 #define DEBUGLEV_DETAIL 2 43 #define DEBUGLEV_DEVELOP 3 45 #define LIKWID_VERSION "VERSION.RELEASE.MINORVERSION" 46 #define LIKWID_COMMIT GITCOMMIT 48 extern int perfmon_verbosity;
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) 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) 242 extern int HPMinit() __attribute__ ((visibility ("default") ));
249 extern
int HPMaddThread(
int cpu_id) __attribute__ ((visibility ("default") ));
254 extern
void HPMfinalize() __attribute__ ((visibility ("default") ));
307 extern Configuration_t
get_configuration(
void) __attribute__ ((visibility ("default") ));
315 extern
int config_setGroupPath(const
char* path) __attribute__ ((visibility ("default") ));
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") ));
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") ));
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") ));
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") ));
686 extern
int perfmon_getGroups(
char*** groups,
char*** shortinfos,
char*** longinfos) __attribute__ ((visibility ("default") ));
695 extern
void perfmon_returnGroups(
int nrgroups,
char** groups,
char** shortinfos,
char** longinfos) __attribute__ ((visibility ("default") ));
705 extern
int perfmon_init(
int nrThreads, const
int* threadsToCpu) __attribute__ ((visibility ("default") ));
730 extern
int perfmon_addEventSet(const
char* eventCString) __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") ));
883 extern
char*
perfmon_getEventName(
int groupId,
int eventId) __attribute__ ((visibility ("default") ));
906 extern
char*
perfmon_getMetricName(
int groupId,
int metricId) __attribute__ ((visibility ("default") ));
1029 struct {uint32_t lo, hi;} int32;
1041 extern void timer_init(
void ) __attribute__ ((visibility ("default") ));
1063 extern uint64_t
timer_getCpuClock(
void ) __attribute__ ((visibility ("default") ));
1078 extern uint64_t
timer_getBaseline(
void ) __attribute__ ((visibility ("default") ));
1093 extern
int timer_sleep(
unsigned long usec) __attribute__ ((visibility ("default") ));
1098 extern
void timer_finalize(
void) __attribute__ ((visibility ("default") ));
1115 #define NUM_POWER_DOMAINS 5 1124 #define POWER_DOMAIN_SUPPORT_STATUS (1ULL<<0) 1129 #define POWER_DOMAIN_SUPPORT_LIMIT (1ULL<<1) 1134 #define POWER_DOMAIN_SUPPORT_POLICY (1ULL<<2) 1139 #define POWER_DOMAIN_SUPPORT_PERF (1ULL<<3) 1144 #define POWER_DOMAIN_SUPPORT_INFO (1ULL<<4) 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") ));
1277 int power_limitGet(
int cpuId,
PowerType domain,
double* power,
double* time) __attribute__ ((visibility ("default") ));
1289 int power_limitSet(
int cpuId,
PowerType domain,
double power,
double time,
int doClamping) __attribute__ ((visibility ("default") ));
1302 extern
void power_finalize(
void) __attribute__ ((visibility ("default") ));
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") ));
1347 extern
void memsweep_domain(
int domainId) __attribute__ ((visibility ("default") ));
1354 extern
void memsweep_threadGroup(const
int* processorList,
int numberOfProcessors) __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") ));
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") ));
1535 extern
int freq_setUncoreFreqMin(const
int socket_id, const uint64_t freq) __attribute__ ((visibility ("default") ));
1543 extern uint64_t
freq_getUncoreFreqMin(const
int socket_id) __attribute__ ((visibility ("default") ));
1552 extern
int freq_setUncoreFreqMax(const
int socket_id, const uint64_t freq) __attribute__ ((visibility ("default") ));
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") ));
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'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'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'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'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'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'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