Add an event to config.
@param cfg The config.
@param ev_ptr A event pointer.
@param flag 0: all, 1: user space only
@param err Error bitmap pointer, can be NULL.
If return value is CONFLICTING_EVENTS, this bitmap contains
the conflicted event indices, e.g. “1 << 2” means index 2.
@return kpep_config_error_code, 0 for success.
Create a config.
@param db A kpep db, see kpep_db_create()
@param cfg_ptr A pointer to receive the new config.
@return kpep_config_error_code, 0 for success.
Get all event pointers.
@param buf A buffer to receive event pointers.
@param buf_size The buffer’s size in bytes, should not smaller than
kpep_config_events_count() * sizeof(void *).
@return kpep_config_error_code, 0 for success.
Get events count.
@return kpep_config_error_code, 0 for success.
Force all counters.
@return kpep_config_error_code, 0 for success.
Free the config.
Get kpc register configs.
@param buf A buffer to receive kpc register configs.
@param buf_size The buffer’s size in bytes, should not smaller than
kpep_config_kpc_count() * sizeof(kpc_config_t).
@return kpep_config_error_code, 0 for success.
Get kpc classes.
@param classes See class mask constants above.
@return kpep_config_error_code, 0 for success.
Get kpc register config count.
@return kpep_config_error_code, 0 for success.
Get the index mapping from event to counter.
@param buf A buffer to receive indexes.
@param buf_size The buffer’s size in bytes, should not smaller than
kpep_config_events_count() * sizeof(kpc_config_t).
@return kpep_config_error_code, 0 for success.
Remove event at index.
@return kpep_config_error_code, 0 for success.
Get all alias.
@param buf A buffer to receive all alias strings.
@param buf_size The buffer’s size in bytes,
should not smaller than kpep_db_aliases_count() * sizeof(void *).
@return kpep_config_error_code, 0 for success.
Get the event alias count.
@return kpep_config_error_code, 0 for success.
Get counters count for given classes.
@param classes 1: Fixed, 2: Configurable.
@return kpep_config_error_code, 0 for success.
Open a kpep database file in “/usr/share/kpep/” or “/usr/local/share/kpep/”.
@param name File name, for example “haswell”, “cpu_100000c_1_92fb37c8”.
Pass NULL for current CPU.
@return kpep_config_error_code, 0 for success.
Get one event by name.
@return kpep_config_error_code, 0 for success.
Get all events.
@param buf A buffer to receive all event pointers.
@param buf_size The buffer’s size in bytes,
should not smaller than kpep_db_events_count() * sizeof(void *).
@return kpep_config_error_code, 0 for success.
Get all event count.
@return kpep_config_error_code, 0 for success.
Free the kpep database.
Get the database’s name.
@return kpep_config_error_code, 0 for success.
Get event’s alias.
@return kpep_config_error_code, 0 for success.
Get event’s description.
@return kpep_config_error_code, 0 for success.
Get event’s name.
@return kpep_config_error_code, 0 for success.