TinySTM  1.0.5
Functions
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. 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...
 

Detailed Description

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.

Author
Pascal Felber pasca.nosp@m.l.fe.nosp@m.lber@.nosp@m.unin.nosp@m.e.ch Patrick Marlier patri.nosp@m.ck.m.nosp@m.arlie.nosp@m.r@un.nosp@m.ine.c.nosp@m.h
Date
2007-2014

Function Documentation

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.

Parameters
nameName of the statistics.
valPointer 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
nameName of the statistics.
valPointer to the variable that should hold the value of the statistics.
Returns
1 upon success, 0 otherwise.