LKML Archive mirror
 help / color / mirror / Atom feed
* [PATCH perf/urgent] perf top: Always sample time
@ 2019-04-15 12:53 Jiri Olsa
  2019-04-15 17:22 ` Arnaldo Carvalho de Melo
  2019-04-19 17:16 ` [tip:perf/urgent] perf top: Always sample time to satisfy needs of use of ordered queuing tip-bot for Jiri Olsa
  0 siblings, 2 replies; 3+ messages in thread
From: Jiri Olsa @ 2019-04-15 12:53 UTC (permalink / raw
  To: Arnaldo Carvalho de Melo
  Cc: lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin,
	Peter Zijlstra, Bastian Beischer

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.

Fixes: 16c66bc167cc ("perf top: Add processing thread")
Reported-by: Bastian Beischer <bastian.beischer@rwth-aachen.de>
Link: http://lkml.kernel.org/n/tip-zhn7jg8hqpl9547g7vqjini7@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 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,
-- 
2.17.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH perf/urgent] perf top: Always sample time
  2019-04-15 12:53 [PATCH perf/urgent] perf top: Always sample time Jiri Olsa
@ 2019-04-15 17:22 ` Arnaldo Carvalho de Melo
  2019-04-19 17:16 ` [tip:perf/urgent] perf top: Always sample time to satisfy needs of use of ordered queuing tip-bot for Jiri Olsa
  1 sibling, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-04-15 17:22 UTC (permalink / raw
  To: Jiri Olsa
  Cc: lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin,
	Peter Zijlstra, Bastian Beischer

Em Mon, Apr 15, 2019 at 02:53:33PM +0200, Jiri Olsa escreveu:
> 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.

Thanks, tested and applied.

- Arnaldo
 
> Fixes: 16c66bc167cc ("perf top: Add processing thread")
> Reported-by: Bastian Beischer <bastian.beischer@rwth-aachen.de>
> Link: http://lkml.kernel.org/n/tip-zhn7jg8hqpl9547g7vqjini7@git.kernel.org
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> ---
>  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,
> -- 
> 2.17.2

-- 

- Arnaldo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:perf/urgent] perf top: Always sample time to satisfy needs of use of ordered queuing
  2019-04-15 12:53 [PATCH perf/urgent] perf top: Always sample time Jiri Olsa
  2019-04-15 17:22 ` Arnaldo Carvalho de Melo
@ 2019-04-19 17:16 ` tip-bot for Jiri Olsa
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Jiri Olsa @ 2019-04-19 17:16 UTC (permalink / raw
  To: linux-tip-commits
  Cc: hpa, bastian.beischer, jolsa, alexander.shishkin, acme, tglx,
	mingo, peterz, linux-kernel, namhyung

Commit-ID:  1e6db2ee86e6a4399fc0ae5689e55e0fd1c43caf
Gitweb:     https://git.kernel.org/tip/1e6db2ee86e6a4399fc0ae5689e55e0fd1c43caf
Author:     Jiri Olsa <jolsa@kernel.org>
AuthorDate: Mon, 15 Apr 2019 14:53:33 +0200
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 16 Apr 2019 12:36:20 -0300

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 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>
---
 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,

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-04-19 19:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-15 12:53 [PATCH perf/urgent] perf top: Always sample time Jiri Olsa
2019-04-15 17:22 ` Arnaldo Carvalho de Melo
2019-04-19 17:16 ` [tip:perf/urgent] perf top: Always sample time to satisfy needs of use of ordered queuing tip-bot for Jiri Olsa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).