Skip to content

Commit

Permalink
tm: added fcount field for free operations debugging
Browse files Browse the repository at this point in the history
(cherry picked from commit e361e5e)
  • Loading branch information
miconda committed Sep 10, 2018
1 parent 5d6be9c commit 8c19114
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/modules/tm/h_table.c
Expand Up @@ -143,7 +143,10 @@ void free_cell_helper(
unlink_timers(dead_cell);
remove_from_hash_table_unsafe(dead_cell);
}
release_cell_lock(dead_cell);
release_cell_lock(dead_cell); /* does nothing */

dead_cell->fcount++;

if(unlikely(has_tran_tmcbs(dead_cell, TMCB_DESTROY)))
run_trans_callbacks(TMCB_DESTROY, dead_cell, 0, 0, 0);

Expand Down
3 changes: 3 additions & 0 deletions src/modules/tm/h_table.h
Expand Up @@ -366,6 +366,9 @@ typedef struct cell
/* number of forks */
short nr_of_outgoings;

/* free operations counter - debug */
int fcount;

#ifdef TM_DEL_UNREF
/* every time the transaction/cell is referenced from somewhere this
* ref_count should be increased (via REF()) and every time the reference
Expand Down

0 comments on commit 8c19114

Please sign in to comment.