lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 23 May 2019 11:42:04 +0900
From:   Namhyung Kim <namhyung@...nel.org>
To:     Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:     Jiri Olsa <jolsa@...hat.com>, LKML <linux-kernel@...r.kernel.org>,
        Krister Johansen <kjlx@...pleofstupid.com>,
        Hari Bathini <hbathini@...ux.vnet.ibm.com>
Subject: Re: [PATCH 3/3] perf top: Enable --namespaces option

On Wed, May 22, 2019 at 10:24:24AM -0300, Arnaldo Carvalho de Melo wrote:
> 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...

Not sure, it'll only add a bit of overhead to task and/or namespace
creation.

Thanks,
Namhyung


> 
> - Arnaldo
>  
> > Signed-off-by: Namhyung Kim <namhyung@...nel.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ