aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/bench/futex-requeue.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <[email protected]>2016-08-08 18:35:21 +0000
committerArnaldo Carvalho de Melo <[email protected]>2016-08-23 18:37:33 +0000
commit565e69114e4aa42664b0e7da135181651c3402f2 (patch)
tree187ba16acccb28c61730f10f01beb32f35885c49 /tools/perf/bench/futex-requeue.c
parentperf kvm: Use NSEC_PER_USEC (diff)
downloadkernel-565e69114e4aa42664b0e7da135181651c3402f2.tar.gz
kernel-565e69114e4aa42664b0e7da135181651c3402f2.zip
perf bench futex: Use NSEC_PER_USEC
Following kernel practices and better documentin Cc: Adrian Hunter <[email protected]> Cc: David Ahern <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Wang Nan <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/bench/futex-requeue.c')
-rw-r--r--tools/perf/bench/futex-requeue.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/perf/bench/futex-requeue.c b/tools/perf/bench/futex-requeue.c
index f96e22ed9f87..2b9705a8734c 100644
--- a/tools/perf/bench/futex-requeue.c
+++ b/tools/perf/bench/futex-requeue.c
@@ -16,6 +16,7 @@
#include <subcmd/parse-options.h>
#include <linux/compiler.h>
#include <linux/kernel.h>
+#include <linux/time64.h>
#include <errno.h>
#include "bench.h"
#include "futex.h"
@@ -62,7 +63,7 @@ static void print_summary(void)
printf("Requeued %d of %d threads in %.4f ms (+-%.2f%%)\n",
requeued_avg,
nthreads,
- requeuetime_avg/1e3,
+ requeuetime_avg / USEC_PER_MSEC,
rel_stddev_stats(requeuetime_stddev, requeuetime_avg));
}
@@ -184,7 +185,7 @@ int bench_futex_requeue(int argc, const char **argv,
if (!silent) {
printf("[Run %d]: Requeued %d of %d threads in %.4f ms\n",
- j + 1, nrequeued, nthreads, runtime.tv_usec/1e3);
+ j + 1, nrequeued, nthreads, runtime.tv_usec / (double)USEC_PER_MSEC);
}
/* everybody should be blocked on futex2, wake'em up */