projects
/
userspace-rcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: rcuja merge fixes
[userspace-rcu.git]
/
rcuja
/
testpop.c
diff --git
a/rcuja/testpop.c
b/rcuja/testpop.c
index 0315c49951034c32e31fcbdb5679f6545a7f819b..76dbb03f7ac86572a736a97c83c886a0a7f569da 100644
(file)
--- a/
rcuja/testpop.c
+++ b/
rcuja/testpop.c
@@
-3,7
+3,7
@@
*
* Userspace RCU library - RCU Judy Array population size test
*
*
* 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
*
* 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 unsigned int subclass_len_distrib[256];
+static int verbose;
+
static
uint8_t random_char(void)
{
static
uint8_t random_char(void)
{
@@
-258,6
+260,8
@@
void print_distrib(void)
return;
printf("Distribution:\n");
for (i = 0; i < 256; i++) {
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);
printf("(%u, %u, %llu%%) ",
i, subclass_len_distrib[i],
100 * (unsigned long long) subclass_len_distrib[i] / tot);
@@
-295,6
+299,13
@@
int main(int argc, char **argv)
return -1;
}
}
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) {
printf("pool distributions: %d\n", nr_distrib);
if (nr_distrib != 2 && nr_distrib != 4) {
@@
-306,8
+317,10
@@
int main(int argc, char **argv)
while (1) {
gen_pool();
count_pool();
while (1) {
gen_pool();
count_pool();
- //print_pool();
- //print_count();
+ if (verbose) {
+ print_pool();
+ print_count();
+ }
stat_count();
if (!(i % 100000ULL))
print_stat(i);
stat_count();
if (!(i % 100000ULL))
print_stat(i);
This page took
0.023811 seconds
and
4
git commands to generate.