]> git.sesse.net Git - stockfish/commitdiff
Add dbg_hit_on_c(c, x) tool
authorMarco Costalba <mcostalba@gmail.com>
Sat, 27 Sep 2008 10:12:23 +0000 (11:12 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 28 Sep 2008 08:58:47 +0000 (10:58 +0200)
Like dbg_hit_on(x) but first filter out events and
only when condition 'c' is true the hit counter
is tested with 'x'.

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

index 506422b2a5b80c92eeb788b724cccb169084a60d..29fc8f0340cf76c9816daa5ade0fde5d5ee70d6f 100644 (file)
@@ -64,5 +64,6 @@ extern long dbg_cnt1;
 extern void dbg_print_hit_rate();
 
 #define dbg_hit_on(x) { dbg_cnt0++; if (x) dbg_cnt1++; }
 extern void dbg_print_hit_rate();
 
 #define dbg_hit_on(x) { dbg_cnt0++; if (x) dbg_cnt1++; }
+#define dbg_hit_on_c(c, x) { if (c) dbg_hit_on(x) }
 
 #endif // !defined(MISC_H_INCLUDED)
 
 #endif // !defined(MISC_H_INCLUDED)