![]() |
LIKWID
|
Enumerations | |
enum | AccessMode { ACCESSMODE_PERF = -1, ACCESSMODE_DIRECT = 0, ACCESSMODE_DAEMON = 1 } |
Enum for the access modes. More... | |
Functions | |
int | HPMaddThread (int cpu_id) __attribute__((visibility("default"))) |
Add CPU to access module. More... | |
void | HPMfinalize () __attribute__((visibility("default"))) |
Close connections. More... | |
int | HPMinit () __attribute__((visibility("default"))) |
Initialize access module. More... | |
void | HPMmode (int mode) __attribute__((visibility("default"))) |
Set access mode. More... | |
enum AccessMode |
Enum for the access modes.
LIKWID supports multiple access modes to the MSR and PCI performance monitoring registers. For direct access the user must have enough priviledges to access the MSR and PCI devices. The daemon mode forwards the operations to a daemon with higher priviledges.
int HPMaddThread | ( | int | cpu_id | ) |
Add CPU to access module.
Add the given CPU to the access module. This opens the commnunication to either the MSR/PCI files or the access daemon.
[in] | cpu_id | CPU that should be enabled for measurements |
void HPMfinalize | ( | ) |
Close connections.
Close the connections to the MSR/PCI files or the access daemon
int HPMinit | ( | ) |
Initialize access module.
Initialize the module internals to either the MSR/PCI files or the access daemon
void HPMmode | ( | int | mode | ) |
Set access mode.
Sets the mode how the MSR and PCI registers should be accessed. 0 for direct access (propably root priviledges required) and 1 for accesses through the access daemon. It must be called before HPMinit()
[in] | mode | (0=direct, 1=daemon) |