linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>, Thomas Gleixner <tglx@linutronix.de>
Cc: Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Clark Williams <williams@redhat.com>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	Hari Bathini <hbathini@linux.vnet.ibm.com>,
	Jiri Olsa <jolsa@redhat.com>,
	Krister Johansen <kjlx@templeofstupid.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 20/41] perf top: Add --namespaces option
Date: Wed, 29 May 2019 10:35:44 -0300	[thread overview]
Message-ID: <20190529133605.21118-21-acme@kernel.org> (raw)
In-Reply-To: <20190529133605.21118-1-acme@kernel.org>

From: Namhyung Kim <namhyung@kernel.org>

Since 'perf record' already have this option, let's have it for 'perf top'
as well.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Hari Bathini <hbathini@linux.vnet.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Krister Johansen <kjlx@templeofstupid.com>
Link: http://lkml.kernel.org/r/20190522053250.207156-4-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 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 fbbb0da43abb..31d78d874fc7 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.20.1

  parent reply	other threads:[~2019-05-29 13:35 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-29 13:35 [GIT PULL] perf/core improvements and fixes for 5.3 Arnaldo Carvalho de Melo
2019-05-29 13:35 ` [PATCH 01/41] perf-with-kcore.sh: Always allow fix_buildid_cache_permissions Arnaldo Carvalho de Melo
2019-05-29 13:35 ` [PATCH 02/41] perf intel-pt: Fix itrace defaults for perf script Arnaldo Carvalho de Melo
2019-05-29 13:35 ` [PATCH 03/41] perf auxtrace: " Arnaldo Carvalho de Melo
2019-05-29 13:35 ` [PATCH 04/41] perf intel-pt: Fix itrace defaults for perf script intel-pt documentation Arnaldo Carvalho de Melo
2019-05-29 13:35 ` [PATCH 05/41] perf machine: Keep zero in pgoff BPF map Arnaldo Carvalho de Melo
2019-05-29 13:35 ` [PATCH 06/41] perf tools: Preserve eBPF maps when loading kcore Arnaldo Carvalho de Melo
2019-05-29 13:35 ` [PATCH 07/41] perf augmented_raw_syscalls: Fix up comment Arnaldo Carvalho de Melo
2019-05-29 13:35 ` [PATCH 08/41] perf beauty: Add generator for 'move_mount' flags argument Arnaldo Carvalho de Melo
2019-05-29 13:35 ` [PATCH 09/41] perf trace: Beautify 'move_mount' arguments Arnaldo Carvalho de Melo
2019-05-29 13:35 ` [PATCH 10/41] perf beauty: Add generator for fspick's 'flags' arg values Arnaldo Carvalho de Melo
2019-05-29 13:35 ` [PATCH 11/41] perf trace: Beautify 'fspick' arguments Arnaldo Carvalho de Melo
2019-05-29 13:35 ` [PATCH 12/41] perf beauty: Add generator for fsconfig's 'cmd' arg values Arnaldo Carvalho de Melo
2019-05-29 13:35 ` [PATCH 13/41] perf trace: Beautify 'fsconfig' arguments Arnaldo Carvalho de Melo
2019-05-29 13:35 ` [PATCH 14/41] perf beauty: Add generator for fsmount's 'attr_flags' arg values Arnaldo Carvalho de Melo
2019-05-29 13:35 ` [PATCH 15/41] perf trace: Introduce syscall_arg__scnprintf_strarray_flags Arnaldo Carvalho de Melo
2019-05-29 13:35 ` [PATCH 16/41] perf trace: Beautify 'fsmount' arguments Arnaldo Carvalho de Melo
2019-05-29 13:35 ` [PATCH 17/41] perf trace beauty clone: Handle CLONE_PIDFD Arnaldo Carvalho de Melo
2019-05-29 14:49   ` Christian Brauner
2019-05-29 13:35 ` [PATCH 18/41] perf beauty: Add generator for sync_file_range's 'flags' arg values Arnaldo Carvalho de Melo
2019-05-29 13:35 ` [PATCH 19/41] perf trace: Beautify 'sync_file_range' arguments Arnaldo Carvalho de Melo
2019-05-29 13:35 ` Arnaldo Carvalho de Melo [this message]
2019-05-29 13:35 ` [PATCH 21/41] perf tools: Remove const from thread read accessors Arnaldo Carvalho de Melo
2019-05-29 13:35 ` [PATCH 22/41] perf dso: Separate generic code in dso__data_file_size() Arnaldo Carvalho de Melo
2019-05-29 13:35 ` [PATCH 23/41] perf dso: Separate generic code in dso_cache__read Arnaldo Carvalho de Melo
2019-05-29 13:35 ` [PATCH 24/41] perf dso: Simplify dso_cache__read function Arnaldo Carvalho de Melo
2019-05-29 13:35 ` [PATCH 25/41] perf dso: Add BPF DSO read and size hooks Arnaldo Carvalho de Melo
2019-05-29 13:35 ` [PATCH 26/41] perf script: Pad DSO name for --call-trace Arnaldo Carvalho de Melo
2019-05-29 13:35 ` [PATCH 27/41] perf tests: Add map_groups__merge_in test Arnaldo Carvalho de Melo
2019-05-29 13:35 ` [PATCH 28/41] perf script: Add --show-bpf-events to show eBPF related events Arnaldo Carvalho de Melo
2019-05-29 13:35 ` [PATCH 29/41] perf script: Remove superfluous BPF event titles Arnaldo Carvalho de Melo
2019-05-29 13:35 ` [PATCH 30/41] perf version: Append 12 git SHA chars to the version string Arnaldo Carvalho de Melo
2019-05-29 13:35 ` [PATCH 31/41] perf machine: Return NULL instead of null-terminating /proc/version array Arnaldo Carvalho de Melo
2019-05-29 13:35 ` [PATCH 32/41] perf annotate TUI browser: Do not use member from variable within its own initialization Arnaldo Carvalho de Melo
2019-05-29 13:35 ` [PATCH 33/41] perf python: Remove -fstack-protector-strong if clang doesn't have it Arnaldo Carvalho de Melo
2019-05-29 13:35 ` [PATCH 34/41] perf top: Lower message level for failure on synthesizing events for pre-existing BPF programs Arnaldo Carvalho de Melo
2019-05-29 13:35 ` [PATCH 35/41] perf scripts python: exported-sql-viewer.py: Change python2 to python Arnaldo Carvalho de Melo
2019-05-29 13:36 ` [PATCH 36/41] perf scripts python: exported-sql-viewer.py: Use argparse module for argument parsing Arnaldo Carvalho de Melo
2019-05-29 13:36 ` [PATCH 37/41] perf scripts python: exported-sql-viewer.py: Add support for pyside2 Arnaldo Carvalho de Melo
2019-05-29 13:36 ` [PATCH 38/41] perf scripts python: export-to-sqlite.py: " Arnaldo Carvalho de Melo
2019-05-29 13:36 ` [PATCH 39/41] perf scripts python: export-to-postgresql.py: " Arnaldo Carvalho de Melo
2019-05-29 13:36 ` [PATCH 40/41] perf intel-pt: Improve sync_switch by processing PERF_RECORD_SWITCH* in events Arnaldo Carvalho de Melo
2019-05-29 13:36 ` [PATCH 41/41] perf intel-pt: Rationalize intel_pt_sync_switch()'s use of next_tid Arnaldo Carvalho de Melo
2019-05-30  7:50 ` [GIT PULL] perf/core improvements and fixes for 5.3 Ingo Molnar

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=20190529133605.21118-21-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=hbathini@linux.vnet.ibm.com \
    --cc=jolsa@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=kjlx@templeofstupid.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=williams@redhat.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).