summaryrefslogtreecommitdiff
path: root/tools/perf/bench/epoll-ctl.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-23 10:01:20 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-23 10:01:20 +0300
commit6203da9803017701da5782998157d9826215059d (patch)
tree1d754f139ac25c643e88f429966606d3b44e431f /tools/perf/bench/epoll-ctl.c
parent3017e587e36819f87e53d3c8751afdf987c1f542 (diff)
parent16fbf79b0f83bc752cee8589279f1ebfe57b3b6e (diff)
downloadlinux-6203da9803017701da5782998157d9826215059d.tar.xz
Merge 5.6-rc7 into staging-next
We need the staging/iio fixes in here as well Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/bench/epoll-ctl.c')
-rw-r--r--tools/perf/bench/epoll-ctl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/bench/epoll-ctl.c b/tools/perf/bench/epoll-ctl.c
index bb617e568841..cadc18d42aa4 100644
--- a/tools/perf/bench/epoll-ctl.c
+++ b/tools/perf/bench/epoll-ctl.c
@@ -35,7 +35,6 @@
static unsigned int nthreads = 0;
static unsigned int nsecs = 8;
-struct timeval start, end, runtime;
static bool done, __verbose, randomize;
/*
@@ -94,8 +93,8 @@ static void toggle_done(int sig __maybe_unused,
{
/* inform all threads that we're done for the day */
done = true;
- gettimeofday(&end, NULL);
- timersub(&end, &start, &runtime);
+ gettimeofday(&bench__end, NULL);
+ timersub(&bench__end, &bench__start, &bench__runtime);
}
static void nest_epollfd(void)
@@ -313,6 +312,7 @@ int bench_epoll_ctl(int argc, const char **argv)
exit(EXIT_FAILURE);
}
+ memset(&act, 0, sizeof(act));
sigfillset(&act.sa_mask);
act.sa_sigaction = toggle_done;
sigaction(SIGINT, &act, NULL);
@@ -361,7 +361,7 @@ int bench_epoll_ctl(int argc, const char **argv)
threads_starting = nthreads;
- gettimeofday(&start, NULL);
+ gettimeofday(&bench__start, NULL);
do_threads(worker, cpu);