Fix: rcuja merge fixes
[userspace-rcu.git] / rcuja / testpop.c
index 3b5833e70a61c18839f153fd0bce48ae5d765c50..76dbb03f7ac86572a736a97c83c886a0a7f569da 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Userspace RCU library - RCU Judy Array population size test
  *
- * Copyright 2012 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright 2012-2013 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -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.023335 seconds and 4 git commands to generate.