mod_stats.h File Reference

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.
int stm_get_local_stats (const char *name, void *val)
 Get various statistics about the transactions of the current thread.
void mod_stats_init ()
 Initialize the module.

Detailed Description

Module for gathering statistics about transactions.

This module maintain 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.

Author:
Pascal Felber <pascal.felber@unine.ch>
Date:
2007-2009

Function Documentation

void mod_stats_init (  ) 

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.

Parameters:
name Name of the statistics.
val Pointer to the variable that should hold the value of the statistics.
Returns:
1 upon success, 0 otherwise.
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.

Parameters:
name Name of the statistics.
val Pointer to the variable that should hold the value of the statistics.
Returns:
1 upon success, 0 otherwise.
Generated on Mon Feb 22 15:49:59 2010 for TinySTM by  doxygen 1.6.3