rcuja: testpop: fix warning
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 7 Jun 2013 17:27:04 +0000 (13:27 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 7 Jun 2013 17:27:04 +0000 (13:27 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
rcuja/testpop.c

index adbe4c57bec0531fb1a35acaea7559838948dc25..76dbb03f7ac86572a736a97c83c886a0a7f569da 100644 (file)
@@ -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);
This page took 0.026179 seconds and 4 git commands to generate.