41 #define DEBUGLEV_ONLY_ERROR 0 42 #define DEBUGLEV_INFO 1 43 #define DEBUGLEV_DETAIL 2 44 #define DEBUGLEV_DEVELOP 3 46 extern int perfmon_verbosity;
86 #define LIKWID_MARKER_INIT likwid_markerInit() 87 #define LIKWID_MARKER_THREADINIT likwid_markerThreadInit() 88 #define LIKWID_MARKER_SWITCH likwid_markerNextGroup() 89 #define LIKWID_MARKER_REGISTER(regionTag) likwid_markerRegisterRegion(regionTag) 90 #define LIKWID_MARKER_START(regionTag) likwid_markerStartRegion(regionTag) 91 #define LIKWID_MARKER_STOP(regionTag) likwid_markerStopRegion(regionTag) 92 #define LIKWID_MARKER_CLOSE likwid_markerClose() 93 #define LIKWID_MARKER_GET(regionTag, nevents, events, time, count) likwid_markerGetRegion(regionTag, nevents, events, time, count) 95 #define LIKWID_MARKER_INIT 96 #define LIKWID_MARKER_THREADINIT 97 #define LIKWID_MARKER_SWITCH 98 #define LIKWID_MARKER_REGISTER(regionTag) 99 #define LIKWID_MARKER_START(regionTag) 100 #define LIKWID_MARKER_STOP(regionTag) 101 #define LIKWID_MARKER_CLOSE 102 #define LIKWID_MARKER_GET(regionTag, nevents, events, time, count) 240 extern int HPMinit() __attribute__ ((visibility ("default") ));
247 extern
int HPMaddThread(
int cpu_id) __attribute__ ((visibility ("default") ));
252 extern
void HPMfinalize() __attribute__ ((visibility ("default") ));
305 extern Configuration_t
get_configuration(
void) __attribute__ ((visibility ("default") ));
423 extern int topology_init(
void) __attribute__ ((visibility ("default") ));
429 extern CpuTopology_t
get_cpuTopology(
void) __attribute__ ((visibility ("default") ));
436 extern CpuInfo_t
get_cpuInfo(
void) __attribute__ ((visibility ("default") ));
493 extern int numa_init(
void) __attribute__ ((visibility ("default") ));
500 extern NumaTopology_t
get_numaTopology(
void) __attribute__ ((visibility ("default") ));
507 extern
void numa_setInterleaved(
int* processorList,
int numberOfProcessors) __attribute__ ((visibility ("default") ));
513 extern
void numa_membind(
void* ptr,
size_t size,
int domainId) __attribute__ ((visibility ("default") ));
520 extern
void numa_finalize(
void) __attribute__ ((visibility ("default") ));
580 extern void affinity_init() __attribute__ ((visibility ("default") ));
587 extern AffinityDomains_t
get_affinityDomains(
void) __attribute__ ((visibility ("default") ));
593 extern
void affinity_pinProcess(
int processorId) __attribute__ ((visibility ("default") ));
600 extern
void affinity_pinProcesses(
int cpu_count,
int* processorIds) __attribute__ ((visibility ("default") ));
606 extern
void affinity_pinThread(
int processorId) __attribute__ ((visibility ("default") ));
645 extern
int cpustr_to_cpulist(
char* cpustring,
int* cpulist,
int length) __attribute__ ((visibility ("default") ));
655 extern
int nodestr_to_nodelist(
char* nodestr,
int* nodes,
int length) __attribute__ ((visibility ("default") ));
665 extern
int sockstr_to_socklist(
char* sockstr,
int* sockets,
int length) __attribute__ ((visibility ("default") ));
683 extern
int perfmon_getGroups(
char*** groups,
char*** shortinfos,
char*** longinfos) __attribute__ ((visibility ("default") ));
692 extern
void perfmon_returnGroups(
int nrgroups,
char** groups,
char** shortinfos,
char** longinfos) __attribute__ ((visibility ("default") ));
702 extern
int perfmon_init(
int nrThreads,
int threadsToCpu[]) __attribute__ ((visibility ("default") ));
719 extern
int perfmon_addEventSet(
char* eventCString) __attribute__ ((visibility ("default") ));
790 extern
void perfmon_finalize(
void) __attribute__ ((visibility ("default") ));
800 extern
double perfmon_getResult(
int groupId,
int eventId,
int threadId) __attribute__ ((visibility ("default") ));
810 extern
double perfmon_getLastResult(
int groupId,
int eventId,
int threadId) __attribute__ ((visibility ("default") ));
819 extern
double perfmon_getMetric(
int groupId,
int metricId,
int threadId) __attribute__ ((visibility ("default") ));
828 extern
double perfmon_getLastMetric(
int groupId,
int metricId,
int threadId) __attribute__ ((visibility ("default") ));
871 extern
char*
perfmon_getEventName(
int groupId,
int eventId) __attribute__ ((visibility ("default") ));
894 extern
char*
perfmon_getMetricName(
int groupId,
int metricId) __attribute__ ((visibility ("default") ));
1017 struct {uint32_t lo, hi;} int32;
1029 extern void timer_init(
void ) __attribute__ ((visibility ("default") ));
1051 extern uint64_t
timer_getCpuClock(
void ) __attribute__ ((visibility ("default") ));
1066 extern uint64_t
timer_getBaseline(
void ) __attribute__ ((visibility ("default") ));
1081 extern
int timer_sleep(
unsigned long usec) __attribute__ ((visibility ("default") ));
1086 extern
void timer_finalize(
void) __attribute__ ((visibility ("default") ));
1103 #define NUM_POWER_DOMAINS 4 1112 #define POWER_DOMAIN_SUPPORT_STATUS (1ULL<<0) 1117 #define POWER_DOMAIN_SUPPORT_LIMIT (1ULL<<1) 1122 #define POWER_DOMAIN_SUPPORT_POLICY (1ULL<<2) 1127 #define POWER_DOMAIN_SUPPORT_PERF (1ULL<<3) 1132 #define POWER_DOMAIN_SUPPORT_INFO (1ULL<<4) 1207 extern PowerInfo_t
get_powerInfo(
void) __attribute__ ((visibility ("default") ));
1214 extern
int power_read(
int cpuId, uint64_t reg, uint32_t *data) __attribute__ ((visibility ("default") ));
1222 extern
int power_tread(
int socket_fd,
int cpuId, uint64_t reg, uint32_t *data) __attribute__ ((visibility ("default") ));
1230 extern
int power_start(PowerData_t data,
int cpuId,
PowerType type) __attribute__ ((visibility ("default") ));
1238 extern
int power_stop(PowerData_t data,
int cpuId,
PowerType type) __attribute__ ((visibility ("default") ));
1261 int power_limitGet(
int cpuId,
PowerType domain,
double* power,
double* time) __attribute__ ((visibility ("default") ));
1273 int power_limitSet(
int cpuId,
PowerType domain,
double power,
double time,
int doClamping) __attribute__ ((visibility ("default") ));
1286 extern
void power_finalize(
void) __attribute__ ((visibility ("default") ));
1301 extern
void thermal_init(
int cpuId) __attribute__ ((visibility ("default") ));
1307 extern
int thermal_read(
int cpuId, uint32_t *data) __attribute__ ((visibility ("default") ));
1314 extern
int thermal_tread(
int socket_fd,
int cpuId, uint32_t *data) __attribute__ ((visibility ("default") ));
1331 extern
void memsweep_domain(
int domainId) __attribute__ ((visibility ("default") ));
1338 extern
void memsweep_threadGroup(
int* processorList,
int numberOfProcessors) __attribute__ ((visibility ("default") ));
1383 extern
void cpuFeatures_print(
int cpu) __attribute__ ((visibility ("default") ));
1391 extern
int cpuFeatures_get(
int cpu, CpuFeature type) __attribute__ ((visibility ("default") ));
1398 extern
char*
cpuFeatures_name(CpuFeature type) __attribute__ ((visibility ("default") ));
1406 extern
int cpuFeatures_enable(
int cpu, CpuFeature type,
int print) __attribute__ ((visibility ("default") ));
1414 extern
int cpuFeatures_disable(
int cpu, CpuFeature type,
int print) __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:226
Structure describing the topology of the HW threads in the system.
Definition: likwid.h:396
Precise Event Based Sampling (PEBS)
Definition: likwid.h:1361
int likwid_getNumberOfNodes(void) __attribute__((visibility("default")))
Retrieve the number of NUMA nodes.
PP1 domain, not clearly defined by Intel.
Definition: likwid.h:1149
Structure describing a cache level.
Definition: likwid.h:381
int sockstr_to_socklist(char *sockstr, int *sockets, int length) __attribute__((visibility("default")))
Read CPU socket selection string and resolve to available CPU socket numbers.
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:330
uint32_t perf_version
Version of Intel's performance monitoring facility.
Definition: likwid.h:342
int power_limitState(int cpuId, PowerType domain) __attribute__((visibility("default")))
Get the state of a energy limit, activated or deactivated NOT IMPLEMENTED.
Configuration_t get_configuration(void) __attribute__((visibility("default")))
Retrieve the config structure.
Cache holding instruction cache lines.
Definition: likwid.h:370
AccessMode daemonMode
Access mode to the MSR and PCI registers.
Definition: likwid.h:276
int HPMaddThread(int cpu_id) __attribute__((visibility("default")))
Add CPU to access module.
Limit CPUID Maxval.
Definition: likwid.h:1365
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:343
void numa_setInterleaved(int *processorList, int numberOfProcessors) __attribute__((visibility("default")))
Set memory allocation policy to interleaved.
char * features
String with all features supported by the CPU.
Definition: likwid.h:338
char * osname
Name of the CPU reported by OS.
Definition: likwid.h:335
AccessMode
Enum for the access modes.
Definition: likwid.h:224
xTPR Message to set processor priority
Definition: likwid.h:1360
Structure describing an RAPL power domain.
Definition: likwid.h:1156
uint32_t numberOfCoresPerCache
Number of HW threads per LLC cache in the system.
Definition: likwid.h:565
uint32_t numberOfProcessors
umber of processors covered by the NUMA node and length of processors
Definition: likwid.h:466
Execute Disable Bit.
Definition: likwid.h:1366
uint64_t timer_printCycles(TimerData *time) __attribute__((visibility("default")))
Return the measured interval in cycles.
uint32_t perf_num_fixed_ctr
Number of fixed purpose core-local performance monitoring counters.
Definition: likwid.h:345
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:475
int likwid_pinProcess(int processorId) __attribute__((visibility("default")))
Pin the current process to given CPU.
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:477
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:1169
AffinityDomain * domains
List of all domains in the system.
Definition: likwid.h:568
int domain
RAPL domain identifier.
Definition: likwid.h:1181
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:476
uint32_t id
ID of the NUMA node.
Definition: likwid.h:463
int * processorList
List of HW thread IDs in the domain.
Definition: likwid.h:548
Cache holding data cache lines.
Definition: likwid.h:369
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:1358
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:1022
uint64_t clock
Current clock frequency of the executing CPU.
Definition: likwid.h:333
uint32_t inCpuSet
ID of HW thread inside the CPU core.
Definition: likwid.h:359
uint32_t numHWThreads
Amount of HW threads in the system and length of threadPool.
Definition: likwid.h:397
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:1162
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.
int config_setGroupPath(char *path) __attribute__((visibility("default")))
Set group path in the config struction.
uint32_t * processors
List of HW threads in the NUMA node.
Definition: likwid.h:467
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:1016
int supportUncore
Flag if system has Uncore performance monitors.
Definition: likwid.h:340
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:544
double maxTimeWindow
Minimal power measurement interval.
Definition: likwid.h:1163
uint64_t totalMemory
Amount of memory in the NUMA node.
Definition: likwid.h:464
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:1171
DCU L1 data cache prefetcher.
Definition: likwid.h:1353
CacheType type
Type of the cache.
Definition: likwid.h:383
The AffinityDomains data structure holds different count variables describing the various system laye...
Definition: likwid.h:560
TscCounter start
Cycles at start.
Definition: likwid.h:1023
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:567
int likwid_markerStopRegion(const char *regionTag) __attribute__((visibility("default")))
Stop a measurement region.
int maxNumNodes
Maximum number of NUMA nodes.
Definition: likwid.h:278
CPUs in NUMA node and general information about a NUMA domain.
Definition: likwid.h:462
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:1357
double timeUnit
Multiplier for time information.
Definition: likwid.h:1174
Information structure of CPU's turbo mode.
Definition: likwid.h:1138
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:1158
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:1173
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:334
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.
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:1161
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:1160
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.
int nodestr_to_nodelist(char *nodestr, int *nodes, int length) __attribute__((visibility("default")))
Read NUMA node selection string and resolve to available NUMA node numbers.
uint32_t packageId
ID of CPU socket containing the HW thread.
Definition: likwid.h:357
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:1183
uint32_t size
Size in bytes of the cache.
Definition: likwid.h:387
int thermal_tread(int socket_fd, int cpuId, uint32_t *data) __attribute__((visibility("default")))
Read the current thermal value using a specific communication socket.
int numSteps
Amount of turbo mode steps/frequencies.
Definition: likwid.h:1139
HWThread * threadPool
List of all HW thread descriptions.
Definition: likwid.h:403
Adjacent cache line prefetcher.
Definition: likwid.h:1352
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:1172
uint32_t numCoresPerSocket
Amount of physical cores in one CPU socket/package.
Definition: likwid.h:400
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:398
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:547
char * configFileName
Path to the configuration file.
Definition: likwid.h:272
uint64_t timer_getBaseline(void) __attribute__((visibility("default")))
Return the baseline CPU clock determined at timer_init.
void perfmon_destroyMarkerResults() __attribute__((visibility("default")))
Free space for read in Marker API file.
double * steps
List of turbo mode steps.
Definition: likwid.h:1140
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:368
IP L1 data cache prefetcher.
Definition: likwid.h:1354
Information structure of CPU's power measurement facility.
Definition: likwid.h:1168
void timer_finalize(void) __attribute__((visibility("default")))
Finalize timer module.
char * short_name
Short name of the CPU.
Definition: likwid.h:337
CacheLevel * cacheLevels
List of all caches in the hierarchy.
Definition: likwid.h:404
int power_read(int cpuId, uint64_t reg, uint32_t *data) __attribute__((visibility("default")))
Read the current power value.
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:402
void perfmon_init_maps(void) __attribute__((visibility("default")))
Initialize performance monitoring maps.
double minFrequency
Minimal frequency of the CPU.
Definition: likwid.h:1170
int maxNumThreads
Maximum number of HW threads.
Definition: likwid.h:277
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.
MONITOR/MWAIT feature to monitor write-back stores.
Definition: likwid.h:1363
uint32_t lineSize
Size in bytes of one cache line.
Definition: likwid.h:386
#define NUM_POWER_DOMAINS
Definition: likwid.h:1103
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.
Structure holding values of the configuration file.
Definition: likwid.h:271
uint32_t model
CPU model ID.
Definition: likwid.h:331
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.
Access performance monitoring registers directly.
Definition: likwid.h:225
int perfmon_getNumberOfGroups(void) __attribute__((visibility("default")))
Get the number of configured event groups.
Enhanced Intel SpeedStep Technology Select Lock.
Definition: likwid.h:1364
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.
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:1157
uint32_t coreId
ID of CPU core that executes the HW thread.
Definition: likwid.h:356
Intel Dynamic Acceleration.
Definition: likwid.h:1367
Structure with general CPU information.
Definition: likwid.h:329
uint32_t numSockets
Amount of CPU sockets/packages in the system.
Definition: likwid.h:399
uint32_t apicId
ID of HW thread retrieved through the Advanced Programmable Interrupt Controller. ...
Definition: likwid.h:358
Thermal Monitoring 2.
Definition: likwid.h:1369
uint32_t numberOfProcessorsPerCache
Number of CPU cores per LLC cache in the system.
Definition: likwid.h:566
uint32_t numberOfCacheDomains
Number of LLC caches in the system.
Definition: likwid.h:564
uint32_t associativity
Amount of cache lines hold by each set.
Definition: likwid.h:384
void affinity_pinProcesses(int cpu_count, int *processorIds) __attribute__((visibility("default")))
Pin processes to a CPU.
Intel Turbo Mode.
Definition: likwid.h:1368
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:545
PowerInfo * PowerInfo_t
Pointer for exporting the PowerInfo data structure.
Definition: likwid.h:1190
uint32_t inclusive
Flag if cache is inclusive (holds also cache lines available in caches nearer to the CPU) or exclusiv...
Definition: likwid.h:389
void numa_finalize(void) __attribute__((visibility("default")))
Destroy NUMA information structure.
double energyUnit
Multiplier for energy measurements.
Definition: likwid.h:1159
char * groupPath
Path of default performance group directory.
Definition: likwid.h:275
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:341
uint32_t perf_width_ctr
Bit width of fixed and general purpose counters.
Definition: likwid.h:344
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:414
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.
Branch Trace Storage.
Definition: likwid.h:1359
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:367
uint32_t sets
Amount of sets.
Definition: likwid.h:385
int topology_init(void) __attribute__((visibility("default")))
Initialize topology information.
int isIntel
Flag if it is an Intel CPU.
Definition: likwid.h:339
AffinityDomains * AffinityDomains_t
Pointer for exporting the AffinityDomains data structure.
Definition: likwid.h:572
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:1150
uint32_t before
Counter state at start.
Definition: likwid.h:1182
Translation Lookaside Buffer cache for data pages.
Definition: likwid.h:373
uint32_t numberOfProcessors
Number of HW threads in the domain and length of processorList.
Definition: likwid.h:546
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:416
Configuration * Configuration_t
Pointer for exporting the Configuration data structure.
Definition: likwid.h:282
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:44
int cpuFeatures_enable(int cpu, CpuFeature type, int print) __attribute__((visibility("default")))
Enable a CPU feature for a specific CPU.
PowerType
Enum for all supported RAPL domains.
Definition: likwid.h:1146
Structure with IDs of a HW thread.
Definition: likwid.h:354
Hardware prefetcher.
Definition: likwid.h:1351
Enhanced Intel SpeedStep Technology to reduce energy consumption.
Definition: likwid.h:1362
uint64_t freeMemory
Amount of free memory in the NUMA node.
Definition: likwid.h:465
Automatic Thermal Control Circuit.
Definition: likwid.h:1356
void HPMmode(int mode) __attribute__((visibility("default")))
Set access mode.
char * name
Name of the CPU as identified by LIKWID.
Definition: likwid.h:336
uint32_t threads
Number of HW thread connected to the cache.
Definition: likwid.h:388
void numa_membind(void *ptr, size_t size, int domainId) __attribute__((visibility("default")))
Allocate memory from a specific specific NUMA node.
int perfmon_init(int nrThreads, int threadsToCpu[]) __attribute__((visibility("default")))
Initialize performance monitoring facility.
void memsweep_threadGroup(int *processorList, int numberOfProcessors) __attribute__((visibility("default")))
Sweeping the memory of all NUMA nodes covered by CPU list.
uint32_t level
Level of the cache in the hierarchy.
Definition: likwid.h:382
PP0 domain, not clearly defined by Intel.
Definition: likwid.h:1148
uint32_t numberOfNumaDomains
Number of NUMA nodes in the system.
Definition: likwid.h:562
double timer_print(TimerData *time) __attribute__((visibility("default")))
Return the measured interval in seconds.
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.
double power_printEnergy(PowerData *data) __attribute__((visibility("default")))
Print energy measurements gathered by power_start() and power_stop()
void likwid_markerClose(void) __attribute__((visibility("default")))
Close LIKWID's marker API.
int affinity_processGetProcessorId() __attribute__((visibility("default")))
Return the CPU ID where the current process runs.
Fast-strings feature.
Definition: likwid.h:1355
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:561
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:405
uint32_t stepping
Stepping (version) of the CPU.
Definition: likwid.h:332
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:1180
char * topologyCfgFileName
Path to the topology file.
Definition: likwid.h:273
TscCounter stop
Cycles at stop.
Definition: likwid.h:1024
PKG domain, mostly one CPU socket/package.
Definition: likwid.h:1147
uint32_t * distances
List of distances to the other NUMA nodes and self.
Definition: likwid.h:469
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:355
int perfmon_startCounters(void) __attribute__((visibility("default")))
Start performance monitoring counters.
NumaTopology * NumaTopology_t
Pointer for exporting the NumaTopology data structure.
Definition: likwid.h:484
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
Definition: likwid.h:1350
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:372
Struct defining the start and stop time of a time interval.
Definition: likwid.h:1014
uint32_t numberOfProcessorsPerSocket
Number of HW threads per socket/package in the system.
Definition: likwid.h:563
uint32_t numThreadsPerCore
Amount of HW threads in one physical CPU core.
Definition: likwid.h:401
PowerData * PowerData_t
Pointer for exporting the PowerData data structure.
Definition: likwid.h:1192
void affinity_finalize() __attribute__((visibility("default")))
Destroy affinity information structure.
int perfmon_addEventSet(char *eventCString) __attribute__((visibility("default")))
Add an event string to LIKWID.
int cpustr_to_cpulist(char *cpustring, int *cpulist, int length) __attribute__((visibility("default")))
Read CPU selection string and resolve to available CPU numbers.
Cache holding both instruction and data cache lines.
Definition: likwid.h:371
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.
char * daemonPath
Path of the access daemon.
Definition: likwid.h:274
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:468