test_rwlock: Add per-thread count to verbose output
authorMichael Jeanson <mjeanson@efficios.com>
Fri, 23 Nov 2018 20:27:07 +0000 (15:27 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 23 Nov 2018 22:01:30 +0000 (17:01 -0500)
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
tests/benchmark/test_rwlock.c

index c33ee1be58928e63f79e39a40608fd2eb627c485..3bbffecba7227d3289dccaa7a03fe66abba472e1 100644 (file)
@@ -204,8 +204,9 @@ void *thr_reader(void *_count)
        }
 
        *count = URCU_TLS(nr_reads);
-       printf_verbose("thread_end %s, tid %lu\n",
-                       "reader", urcu_get_thread_id());
+
+       printf_verbose("thread_end %s, tid %lu, count %llu\n",
+                       "reader", urcu_get_thread_id(), *count);
        return ((void*)1);
 
 }
@@ -250,10 +251,10 @@ void *thr_writer(void *_count)
                if (caa_unlikely(wdelay))
                        loop_sleep(wdelay);
        }
-
-       printf_verbose("thread_end %s, tid %lu\n",
-                       "writer", urcu_get_thread_id());
        *count = URCU_TLS(nr_writes);
+
+       printf_verbose("thread_end %s, tid %lu, count %llu\n",
+                       "writer", urcu_get_thread_id(), *count);
        return ((void*)2);
 }
 
@@ -347,6 +348,7 @@ int main(int argc, char **argv)
        printf_verbose("running test for %lu seconds, %u readers, %u writers.\n",
                duration, nr_readers, nr_writers);
        printf_verbose("Writer delay : %lu loops.\n", wdelay);
+       printf_verbose("Writer duration : %lu loops.\n", wduration);
        printf_verbose("Reader duration : %lu loops.\n", rduration);
        printf_verbose("thread %-6s, tid %lu\n",
                        "main", urcu_get_thread_id());
This page took 0.026003 seconds and 4 git commands to generate.