All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>, LKML <linux-kernel@vger.kernel.org>,
	Krister Johansen <kjlx@templeofstupid.com>,
	Hari Bathini <hbathini@linux.vnet.ibm.com>
Subject: Re: [PATCH 3/3] perf top: Enable --namespaces option
Date: Wed, 22 May 2019 10:24:24 -0300	[thread overview]
Message-ID: <20190522132424.GD30271@kernel.org> (raw)
In-Reply-To: <20190522053250.207156-4-namhyung@kernel.org>

Em Wed, May 22, 2019 at 02:32:50PM +0900, Namhyung Kim escreveu:
> Since perf record already have the option, let's have it for perf top
> as well.

I'm applying, but I wonder if this shouldn't be the default...

- Arnaldo
 
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
>  tools/perf/Documentation/perf-top.txt | 5 +++++
>  tools/perf/builtin-top.c              | 5 +++++
>  2 files changed, 10 insertions(+)
> 
> diff --git a/tools/perf/Documentation/perf-top.txt b/tools/perf/Documentation/perf-top.txt
> index 44d89fb9c788..cfea87c6f38e 100644
> --- a/tools/perf/Documentation/perf-top.txt
> +++ b/tools/perf/Documentation/perf-top.txt
> @@ -262,6 +262,11 @@ Default is to monitor all CPUS.
>  	The number of threads to run when synthesizing events for existing processes.
>  	By default, the number of threads equals to the number of online CPUs.
>  
> +--namespaces::
> +	Record events of type PERF_RECORD_NAMESPACES and display it with the
> +	'cgroup_id' sort key.
> +
> +
>  INTERACTIVE PROMPTING KEYS
>  --------------------------
>  
> diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
> index 3648ef576996..6651377fd762 100644
> --- a/tools/perf/builtin-top.c
> +++ b/tools/perf/builtin-top.c
> @@ -1208,6 +1208,9 @@ static int __cmd_top(struct perf_top *top)
>  
>  	init_process_thread(top);
>  
> +	if (opts->record_namespaces)
> +		top->tool.namespace_events = true;
> +
>  	ret = perf_event__synthesize_bpf_events(top->session, perf_event__process,
>  						&top->session->machines.host,
>  						&top->record_opts);
> @@ -1500,6 +1503,8 @@ int cmd_top(int argc, const char **argv)
>  	OPT_BOOLEAN(0, "force", &symbol_conf.force, "don't complain, do it"),
>  	OPT_UINTEGER(0, "num-thread-synthesize", &top.nr_threads_synthesize,
>  			"number of thread to run event synthesize"),
> +	OPT_BOOLEAN(0, "namespaces", &opts->record_namespaces,
> +		    "Record namespaces events"),
>  	OPT_END()
>  	};
>  	struct perf_evlist *sb_evlist = NULL;
> -- 
> 2.21.0.1020.gf2820cf01a-goog

-- 

- Arnaldo

  reply	other threads:[~2019-05-22 13:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-22  5:32 [PATCH 0/3] perf tools: Assorted fixes and cleanups for namespace events Namhyung Kim
2019-05-22  5:32 ` [PATCH 1/3] perf tools: Protect reading thread's namespace Namhyung Kim
2019-05-22 13:18   ` Arnaldo Carvalho de Melo
2019-05-23  2:36     ` Namhyung Kim
2019-05-27  6:11       ` [PATCH 4/3] perf tools: Remove const from thread read accessors Namhyung Kim
2019-05-27 14:15         ` Arnaldo Carvalho de Melo
2019-05-30  8:07         ` [tip:perf/core] " tip-bot for Namhyung Kim
2019-05-28 21:27   ` [tip:perf/urgent] perf namespace: Protect reading thread's namespace tip-bot for Namhyung Kim
2019-05-22  5:32 ` [PATCH 2/3] perf tools: Add missing swap ops for namespace events Namhyung Kim
2019-05-22 13:23   ` Arnaldo Carvalho de Melo
2019-05-28 21:28   ` [tip:perf/urgent] perf session: " tip-bot for Namhyung Kim
2019-05-22  5:32 ` [PATCH 3/3] perf top: Enable --namespaces option Namhyung Kim
2019-05-22 13:24   ` Arnaldo Carvalho de Melo [this message]
2019-05-23  2:42     ` Namhyung Kim
2019-05-30  8:06   ` [tip:perf/core] perf top: Add " tip-bot for Namhyung Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190522132424.GD30271@kernel.org \
    --to=arnaldo.melo@gmail.com \
    --cc=hbathini@linux.vnet.ibm.com \
    --cc=jolsa@redhat.com \
    --cc=kjlx@templeofstupid.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --subject='Re: [PATCH 3/3] perf top: Enable --namespaces option' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.