[lkml]   [2019]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 1/7] perf top: Always sample time to satisfy needs of use of ordered queuing
From: Jiri Olsa <>

Bastian reported broken 'perf top -p PID' command, it won't display any

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 <>
Signed-off-by: Jiri Olsa <>
Tested-by: Arnaldo Carvalho de Melo <>
Cc: Alexander Shishkin <>
Cc: Namhyung Kim <>
Cc: Peter Zijlstra <>
Cc: bastian beischer <>
Fixes: 16c66bc167cc ("perf top: Add processing thread")
Signed-off-by: Arnaldo Carvalho de Melo <>
tools/perf/builtin-top.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 1999d6533d12..fbbb0da43abb 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -1377,6 +1377,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,
 \ /
  Last update: 2019-04-19 20:35    [W:0.061 / U:2.760 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site