Skip to content

Commit 1e6db2e

Browse files
olsajiriacmel
authored andcommitted
perf top: Always sample time to satisfy needs of use of ordered queuing
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 16c66bc 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 <[email protected]> Signed-off-by: Jiri Olsa <[email protected]> Tested-by: Arnaldo Carvalho de Melo <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: bastian beischer <[email protected]> Fixes: 16c66bc ("perf top: Add processing thread") Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent b24131e commit 1e6db2e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/perf/builtin-top.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,6 +1377,7 @@ int cmd_top(int argc, const char **argv)
13771377
* */
13781378
.overwrite = 0,
13791379
.sample_time = true,
1380+
.sample_time_set = true,
13801381
},
13811382
.max_stack = sysctl__max_stack(),
13821383
.annotation_opts = annotation__default_options,

0 commit comments

Comments
 (0)