[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-a0c0a4ac021b017e385d0328541ccfebeef165fc@git.kernel.org>
Date: Thu, 30 May 2019 01:06:57 -0700
From: tip-bot for Namhyung Kim <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: hbathini@...ux.vnet.ibm.com, kjlx@...pleofstupid.com,
acme@...hat.com, mingo@...nel.org, namhyung@...nel.org,
jolsa@...hat.com, tglx@...utronix.de, linux-kernel@...r.kernel.org,
hpa@...or.com
Subject: [tip:perf/core] perf top: Add --namespaces option
Commit-ID: a0c0a4ac021b017e385d0328541ccfebeef165fc
Gitweb: https://git.kernel.org/tip/a0c0a4ac021b017e385d0328541ccfebeef165fc
Author: Namhyung Kim <namhyung@...nel.org>
AuthorDate: Wed, 22 May 2019 14:32:50 +0900
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Tue, 28 May 2019 18:37:43 -0300
perf top: Add --namespaces option
Since 'perf record' already have this option, let's have it for 'perf top'
as well.
Signed-off-by: Namhyung Kim <namhyung@...nel.org>
Cc: Hari Bathini <hbathini@...ux.vnet.ibm.com>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Krister Johansen <kjlx@...pleofstupid.com>
Link: http://lkml.kernel.org/r/20190522053250.207156-4-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.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;
Powered by blists - more mailing lists