*
* 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
static unsigned int subclass_len_distrib[256];
+static int verbose;
+
static
uint8_t random_char(void)
{
return;
printf("Distribution:\n");
for (i = 0; i < 256; i++) {
+ if (!subclass_len_distrib[i])
+ continue;
printf("(%u, %u, %llu%%) ",
i, subclass_len_distrib[i],
100 * (unsigned long long) subclass_len_distrib[i] / tot);
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) {
while (1) {
gen_pool();
count_pool();
- //print_pool();
- //print_count();
+ if (verbose) {
+ print_pool();
+ print_count();
+ }
stat_count();
if (!(i % 100000ULL))
print_stat(i);