Add simple debug hit rate counter
commit61f41a057dd84a38e5cc9c58b37a30bfa00e253a
authorMarco Costalba <mcostalba@gmail.com>
Sat, 6 Sep 2008 10:22:10 +0000 (6 12:22 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 6 Sep 2008 10:22:10 +0000 (6 12:22 +0200)
treef256ac0db284cb91b980f8637284519f69ac1764
parentd786822b92c26d758ea2f2f21368a4cfcce43ca8
Add simple debug hit rate counter

Add a very simple debug framework to
measure the hit rate of a given condition.

Simply insert macro

dbg_hit_on(x);

Anywhere you want to compute hit rate of condition x
and then call, as example in poll(), function
dbg_print_hit_rate() to print current results.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/misc.cpp
src/misc.h