src/core/stats.c File Reference

Statistics collector implementation. More...

#include <string.h>
#include <core/tx.h>
#include <core/txdesc.h>
#include <core/stats.h>
#include <core/config.h>
#include <misc/hash_table.h>
#include <misc/generic_types.h>
#include <misc/malloc.h>
#include <misc/mutex.h>
#include <misc/debug.h>

Go to the source code of this file.

Classes

struct  txc_stats_threadstat_s
struct  txc_statsmgr_s

Defines

#define MIN(A, B)   (((A) < (B)) ? (A) : (B))
#define MAX(A, B)   (((A) > (B)) ? (A) : (B))
#define ACTION(name)   #name,
#define WHITESPACE(len)   &__whitespaces[sizeof(__whitespaces) - (len) -1]
#define RESETSTAT(name)

Functions

txc_result_t txc_statsmgr_create (txc_statsmgr_t **statsmgrp)
txc_result_t txc_statsmgr_destroy (txc_statsmgr_t **statsmgrp)
txc_result_t txc_stats_threadstat_create (txc_statsmgr_t *statsmgr, txc_stats_threadstat_t **threadstatp, txc_tx_t *txd)
txc_result_t txc_stats_txstat_create (txc_stats_txstat_t **txstatp)
txc_result_t txc_stats_txstat_destroy (txc_stats_txstat_t **txstatp)
txc_result_t txc_stats_txstat_init (txc_stats_txstat_t *txstat, const char *srcloc_str, txc_tx_srcloc_t *srcloc)
void txc_stats_register_statsmgr_commit_action (txc_tx_t *txd)
void txc_stats_register_statsmgr_undo_action (txc_tx_t *txd)
void txc_stats_transaction_postbegin (txc_tx_t *txd)
void txc_stats_print (txc_statsmgr_t *statsmgr)
 Prints a statistics report.

Variables

txc_statsmgr_ttxc_g_statsmgr
char * stats_strings []


Detailed Description

Statistics collector implementation.

Definition in file stats.c.


Define Documentation

#define RESETSTAT ( name   ) 

Value:

txstat->total_stats[txc_stats_##name##_stat].total = 0;                    \
  txstat->total_stats[txc_stats_##name##_stat].min = 0xFFFFFFFF;             \
  txstat->total_stats[txc_stats_##name##_stat].max = 0;


Function Documentation

void txc_stats_print ( txc_statsmgr_t statsmgr  ) 

Prints a statistics report.

Summarizes statistics and prints a report into the statistics file. Print the statistics report in the same format as the Intel STM's one to avoid duplicating post-processing scripts.

Parameters:
[in] statsmgr Pointer to the statistics manager collecting the statistics.
Returns:
None

Definition at line 486 of file stats.c.

References txc_statsmgr_s::alloc_threadstat_list_head, txc_stats_threadstat_s::count, txc_stats_txstat_s::count, txc_stats_stat_s::max, txc_stats_stat_s::min, txc_stats_threadstat_s::next, txc_stats_stat_s::total, txc_stats_threadstat_s::total_stats, txc_stats_txstat_s::total_stats, txc_stats_threadstat_s::tx_stats, txc_hash_table_create(), txc_hash_table_iter_init(), txc_hash_table_iter_next(), TXC_R_SUCCESS, txc_runtime_settings, and TXC_STATS_THREADSTAT_HASHTABLE_SIZE.

Referenced by _TXC_global_shutdown().


Variable Documentation

char* stats_strings[]

Initial value:

 {

}

Definition at line 25 of file stats.c.


Generated on Wed Dec 9 20:32:40 2009 for xCalls by  doxygen 1.4.7