From: Mathieu Desnoyers Date: Fri, 7 Jun 2013 17:27:04 +0000 (-0400) Subject: rcuja: testpop: fix warning X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=baae2417ac24491a95b8873e7a56563b7822c6d5;p=urcu.git rcuja: testpop: fix warning Signed-off-by: Mathieu Desnoyers --- diff --git a/rcuja/testpop.c b/rcuja/testpop.c index adbe4c5..76dbb03 100644 --- a/rcuja/testpop.c +++ b/rcuja/testpop.c @@ -49,6 +49,8 @@ static int global_max_minsubclass_len = 0; static unsigned int subclass_len_distrib[256]; +static int verbose; + static uint8_t random_char(void) { @@ -297,6 +299,13 @@ int main(int argc, char **argv) return -1; } } + + if (argc > 3) { + if (!strcmp(argv[3], "-v")) { + verbose = 1; + } + } + printf("pool distributions: %d\n", nr_distrib); if (nr_distrib != 2 && nr_distrib != 4) { @@ -308,8 +317,10 @@ int main(int argc, char **argv) while (1) { gen_pool(); count_pool(); - //print_pool(); - //print_count(); + if (verbose) { + print_pool(); + print_count(); + } stat_count(); if (!(i % 100000ULL)) print_stat(i);