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, 6 Jun 2019 16:46:14 +0200
From:   Jiri Olsa <jolsa@...hat.com>
To:     Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:     ufo19890607 <ufo19890607@...il.com>, peterz@...radead.org,
        mingo@...hat.com, alexander.shishkin@...ux.intel.com,
        jolsa@...nel.org, dsahern@...il.com, namhyung@...nel.org,
        milian.wolff@...b.com, arnaldo.melo@...il.com,
        yuzhoujian@...ichuxing.com, adrian.hunter@...el.com,
        wangnan0@...wei.com, linux-perf-users@...r.kernel.org,
        linux-kernel@...r.kernel.org, acme@...hat.com
Subject: Re: [PATCH] perf record: Add support to collect callchains from
 kernel or user space only.

On Thu, Jun 06, 2019 at 11:26:44AM -0300, Arnaldo Carvalho de Melo wrote:
> Em Thu, May 30, 2019 at 02:29:22PM +0100, ufo19890607 escreveu:
> > From: yuzhoujian <yuzhoujian@...ichuxing.com>
> > 
> > One can just record callchains in the kernel or user space with
> > this new options. We can use it together with "--all-kernel" options.
> > This two options is used just like print_stack(sys) or print_ustack(usr)
> > for systemtap.
> > 
> > Show below is the usage of this new option combined with "--all-kernel"
> > options.
> > 	1. Configure all used events to run in kernel space and just
> > collect kernel callchains.
> > 	$ perf record -a -g --all-kernel --kernel-callchains
> > 	2. Configure all used events to run in kernel space and just
> > collect user callchains.
> > 	$ perf record -a -g --all-kernel --user-callchains
> > 
> > Signed-off-by: yuzhoujian <yuzhoujian@...ichuxing.com>
> > ---
> >  tools/perf/Documentation/perf-record.txt | 6 ++++++
> >  tools/perf/builtin-record.c              | 4 ++++
> >  tools/perf/perf.h                        | 2 ++
> >  tools/perf/util/evsel.c                  | 4 ++++
> >  4 files changed, 16 insertions(+)
> > 
> > diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt
> > index de269430720a..b647eb3db0c6 100644
> > --- a/tools/perf/Documentation/perf-record.txt
> > +++ b/tools/perf/Documentation/perf-record.txt
> > @@ -490,6 +490,12 @@ Configure all used events to run in kernel space.
> >  --all-user::
> >  Configure all used events to run in user space.
> >  
> > +--kernel-callchains::
> > +Collect callchains from kernel space.
> 
> Ok, changing this to:
> 
> Collect callchains only from kernel space. I.e. this option sets
> perf_event_attr.exclude_callchain_user to 1,
> perf_event_attr.exclude_callchain_kernel to 0.
> 
> > +
> > +--user-callchains::
> > +Collect callchains from user space.
> 
> And this one to:
> Collect callchains only from user space. I.e. this option sets
> 
> perf_event_attr.exclude_callchain_kernel to 1,
> perf_event_attr.exclude_callchain_user to 0.
> 
> 
> So that the user don't try using:
> 
>     pref record --user-callchains --kernel-callchains
> 
> expecting to get both user and kernel callchains and instead gets
> nothing.

good catch.. we should add the logic to keep both (default)
in this case.. so do nothing ;-)

jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ