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:   Wed, 14 Mar 2018 11:45:14 -0700
From:   Stephane Eranian <eranian@...gle.com>
To:     Jiri Olsa <jolsa@...nel.org>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        lkml <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        David Ahern <dsahern@...il.com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [PATCH 1/2] perf record: Synthesize features before events in
 pipe mode

On Wed, Mar 14, 2018 at 2:22 AM, Jiri Olsa <jolsa@...nel.org> wrote:
> We need to synthesize events first, because some
> features works on top of them (on report side).
>
> Link: http://lkml.kernel.org/n/tip-vz436m6fobfz8ykmuxo8phyy@git.kernel.org
> Signed-off-by: Jiri Olsa <jolsa@...nel.org>

Works for me.
Tested-by: Stephane Eranian <eranian@...gle.com>

> ---
>  tools/perf/builtin-record.c | 18 +++++++++++-------
>  1 file changed, 11 insertions(+), 7 deletions(-)
>
> diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
> index d33103291b02..22ebeb92ac51 100644
> --- a/tools/perf/builtin-record.c
> +++ b/tools/perf/builtin-record.c
> @@ -754,13 +754,10 @@ static int record__synthesize(struct record *rec, bool tail)
>                 return 0;
>
>         if (data->is_pipe) {
> -               err = perf_event__synthesize_features(
> -                       tool, session, rec->evlist, process_synthesized_event);
> -               if (err < 0) {
> -                       pr_err("Couldn't synthesize features.\n");
> -                       return err;
> -               }
> -
> +               /*
> +                * We need to synthesize events first, because some
> +                * features works on top of them (on report side).
> +                */
>                 err = perf_event__synthesize_attrs(tool, session,
>                                                    process_synthesized_event);
>                 if (err < 0) {
> @@ -768,6 +765,13 @@ static int record__synthesize(struct record *rec, bool tail)
>                         goto out;
>                 }
>
> +               err = perf_event__synthesize_features(tool, session, rec->evlist,
> +                                                     process_synthesized_event);
> +               if (err < 0) {
> +                       pr_err("Couldn't synthesize features.\n");
> +                       return err;
> +               }
> +
>                 if (have_tracepoints(&rec->evlist->entries)) {
>                         /*
>                          * FIXME err <= 0 here actually means that
> --
> 2.13.6
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ