TinySTM
1.0.5
|
Module for gathering statistics about transactions. More...
Go to the source code of this file.
Functions | |
int | stm_get_global_stats (const char *name, void *val) |
Get various statistics about the transactions of all threads. More... | |
int | stm_get_local_stats (const char *name, void *val) |
Get various statistics about the transactions of the current thread. More... | |
void | mod_stats_init (void) |
Initialize the module. More... | |
Module for gathering statistics about transactions.
This module maintains both aggregate statistics about all threads (aggregates are updated upon thread cleanup) and per-thread statistics. The built-in statistics of the core STM library are more efficient and detailed but this module is useful in case the library is compiled without support for statistics.
void mod_stats_init | ( | void | ) |
Initialize the module.
This function must be called once, from the main thread, after initializing the STM library and before performing any transactional operation.
int stm_get_global_stats | ( | const char * | name, |
void * | val | ||
) |
Get various statistics about the transactions of all threads.
See the source code (mod_stats.c) for a list of supported statistics.
name | Name of the statistics. |
val | Pointer to the variable that should hold the value of the statistics. |
int stm_get_local_stats | ( | const char * | name, |
void * | val | ||
) |
Get various statistics about the transactions of the current thread.
See the source code (mod_stats.c) for a list of supported statistics.
name | Name of the statistics. |
val | Pointer to the variable that should hold the value of the statistics. |