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]
Message-ID: <CALcN6mhtC8d==fZGrVDFVQtreNu6wet88_aJoOUy_LjEq8GyDw@mail.gmail.com>
Date:   Mon, 12 Jun 2017 21:23:44 -0700
From:   David Carrillo-Cisneros <davidcc@...gle.com>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     linux-kernel <linux-kernel@...r.kernel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Andi Kleen <ak@...ux.intel.com>, Simon Que <sque@...omium.org>,
        Wang Nan <wangnan0@...wei.com>, Jiri Olsa <jolsa@...nel.org>,
        He Kuang <hekuang@...wei.com>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Stephane Eranian <eranian@...gle.com>,
        Paul Turner <pjt@...gle.com>
Subject: Re: [PATCH v3 15/15] perf header: add event desc to pipe-mode header

On Thu, Jun 8, 2017 at 4:54 AM, Jiri Olsa <jolsa@...hat.com> wrote:
> On Tue, Jun 06, 2017 at 12:07:22AM -0700, David Carrillo-Cisneros wrote:
>
> SNIP
>
>> diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
>> index 6c1963e5bf10..c91acd5b0838 100644
>> --- a/tools/perf/util/header.c
>> +++ b/tools/perf/util/header.c
>> @@ -66,6 +66,7 @@ struct feat_fd {
>>       void                    *buf;   /* Either buf != NULL or fd >= 0 */
>>       ssize_t                 offset;
>>       size_t                  size;
>> +     struct perf_evsel       *events;
>>  };
>>
>>  void perf_header__set_feat(struct perf_header *header, int feat)
>> @@ -1353,10 +1354,15 @@ static int __desc_attr__fprintf(FILE *fp, const char *name, const char *val,
>>
>>  static void print_event_desc(struct feat_fd *ff, FILE *fp)
>>  {
>> -     struct perf_evsel *evsel, *events = read_event_desc(ff);
>> +     struct perf_evsel *evsel, *events;
>>       u32 j;
>>       u64 *id;
>>
>> +     if (ff->events)
>> +             events = ff->events;
>> +     else
>> +             events = read_event_desc(ff);
>
> can you read from ff at this point in print callback?

Yes, ->print it's always called after ->process in
perf_event__synthesize_features. So process_event_desc (that in
pipe-mode sets ff->events) is called before this print_event_desc.

>
> jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ