summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2019-04-15 14:53:33 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-16 19:40:20 +0200
commitd2ae8127d693545cdc7cb36516f00699bd66aa6b (patch)
treed77524be9af84fb3c70786413313cc3d94db8613 /tools
parent9b2395e2bfec918b2f3c1226957976a4a514fe10 (diff)
downloadlinux-stable-d2ae8127d693545cdc7cb36516f00699bd66aa6b.tar.gz
linux-stable-d2ae8127d693545cdc7cb36516f00699bd66aa6b.tar.bz2
linux-stable-d2ae8127d693545cdc7cb36516f00699bd66aa6b.zip
perf top: Always sample time to satisfy needs of use of ordered queuing
[ Upstream commit 1e6db2ee86e6a4399fc0ae5689e55e0fd1c43caf ] Bastian reported broken 'perf top -p PID' command, it won't display any data. The problem is that for -p option we monitor single thread, so we don't enable time in samples, because it's not needed. However since commit 16c66bc167cc we use ordered queues to stash data plus later commits added logic for dropping samples in case there's big load and we don't keep up. All this needs timestamp for sample. Enabling it unconditionally for perf top. Reported-by: Bastian Beischer <bastian.beischer@rwth-aachen.de> Signed-off-by: Jiri Olsa <jolsa@kernel.org> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: bastian beischer <bastian.beischer@rwth-aachen.de> Fixes: 16c66bc167cc ("perf top: Add processing thread") Link: http://lkml.kernel.org/r/20190415125333.27160-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/builtin-top.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 616408251e25..63750a711123 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -1393,6 +1393,7 @@ int cmd_top(int argc, const char **argv)
* */
.overwrite = 0,
.sample_time = true,
+ .sample_time_set = true,
},
.max_stack = sysctl__max_stack(),
.annotation_opts = annotation__default_options,