aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/ordered-events.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2018-11-05 13:24:55 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-12-17 14:57:52 -0300
commit16c66bc167cc52992f66748aed7ac21396189457 (patch)
tree3df75ce71a4087525888d764a68fb81bdc61360b /tools/perf/util/ordered-events.h
parentperf top: Move lost events warning to helpline (diff)
downloadlinux-dev-16c66bc167cc52992f66748aed7ac21396189457.tar.xz
linux-dev-16c66bc167cc52992f66748aed7ac21396189457.zip
perf top: Add processing thread
Add a new thread that takes care of the hist creating to alleviate the main reader thread so it can keep perf mmaps served in time so that we reduce the possibility of losing events. The 'perf top' command now spawns 2 extra threads, the data processing is the following: 1) The main thread reads the data from mmaps and queues them to ordered events object; 2) The processing threads takes the data from the ordered events object and create initial histogram; 3) The GUI thread periodically sorts the initial histogram and presents it. Passing the data between threads 1 and 2 is done by having 2 ordered events queues. One is always being stored by thread 1 while the other is flushed out in thread 2. Passing the data between threads 2 and 3 stays the same as was initially for threads 1 and 3. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Namhyung Kim <namhyung@kernel.org> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/n/tip-hhf4hllgkmle9wl1aly1jli0@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/ordered-events.h')
-rw-r--r--tools/perf/util/ordered-events.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/ordered-events.h b/tools/perf/util/ordered-events.h
index 507b4e4df79e..0c6e26aec0e3 100644
--- a/tools/perf/util/ordered-events.h
+++ b/tools/perf/util/ordered-events.h
@@ -18,6 +18,7 @@ enum oe_flush {
OE_FLUSH__FINAL,
OE_FLUSH__ROUND,
OE_FLUSH__HALF,
+ OE_FLUSH__TOP,
};
struct ordered_events;