Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1657218

Re: [PATCH v2 11/13] perf header: change FEAT_OP* macros

Path csiph.com!news.redatomik.org!aioe.org!bofh.it!news.nic.it!robomod
From David Carrillo-Cisneros <davidcc@google.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 11/13] perf header: change FEAT_OP* macros
Date Mon, 05 Jun 2017 04:20:01 +0200
Message-ID <tOPMB-53N-1@gated-at.bofh.it> (permalink)
References <tKcTv-a4-3@gated-at.bofh.it> <tKcTx-a4-41@gated-at.bofh.it> <tKW9X-5J4-19@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=W76ERQiHQYLWVqB4YRiSCLZzr4XCcAfIz7hz08LL+AQ=; b=aHWYBww8AAFYxaVa7yueSN8Wjmg0QCKdiRdZ80GDsVqpFGLbJdzQLeBhwERbK987BW dK6tfC34hpyqkzd7AoiE2HLDEOmYST7ousTw+yXrDKFiVbpo/6BbOSK8cMFfqU2yrNDb d74xMn2v+DbQOlsJT2jJUFB9Q5ikO8jhI7aXILRHFo4Xmt4y5xvaF6gVVbBAiOV5QYUq /VeKgnlg30LX35+d28merXRmHYIYNCk9H+JNAE+f1NfygrRIwWPxtP7X36blLiHC7fw4 YCaQDGUWdHVKvyJCSqbKuGcWU0q8ix9MP1M4wtdv01n1mrWMAyw6ZY1enf0KtADPLwm8 zgrw==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=W76ERQiHQYLWVqB4YRiSCLZzr4XCcAfIz7hz08LL+AQ=; b=bMLeqXF4Bp1s+jLqaIRSlDmeiwrPoZDkGSzOClh3/6qe+om2Ea5YUEJ8e9+Lz9gbYQ /mvrzROwAzM0dMMdL6IE+5vqiZDLzd9O/5UxorXjMARDFi+cUxFq2jhsy5PEEQd4c45h K+kV0+0BAkCC91QQKcN7Ixkfrb2vrNnepv0VWzCFlGEF+x/TQMPHtd8DEb7QfAeuXA8/ Wc6kVAnDTjIp70LMXg7FAYsYaYnxpKh6ZBD6GhVALTUGvus2akC0VSS0+naJ6jfKjHUQ R3yr3wUedpR7k7QAktsoutLhVg6OKVQeaRXMFnUBjzBVCR7yVmoc0Cj9tDwSzf2cwt6t snVA==
X-Gm-Message-State AODbwcDmoSHTm30LBL9cDlZpYXaAdNfkYNzwLdZ6MJRC/P7UwFWgqiQ5 tAeSuXWRVUIoYJX4zhrBCuyOIFsqEIdMrVE=
X-Received by 10.31.183.139 with SMTP id h133mr8929093vkf.148.1496628786383; Sun, 04 Jun 2017 19:13:06 -0700 (PDT)
MIME-Version 1.0
Content-Type text/plain; charset="UTF-8"
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 55
Organization linux.* mail to news gateway
X-Original-Cc linux-kernel <linux-kernel@vger.kernel.org>, Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>, Arnaldo Carvalho de Melo <acme@kernel.org>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Andi Kleen <ak@linux.intel.com>, Simon Que <sque@chromium.org>, Wang Nan <wangnan0@huawei.com>, Jiri Olsa <jolsa@kernel.org>, He Kuang <hekuang@huawei.com>, Masami Hiramatsu <mhiramat@kernel.org>, David Ahern <dsa@cumulusnetworks.com>, Namhyung Kim <namhyung@kernel.org>, Stephane Eranian <eranian@google.com>, Paul Turner <pjt@google.com>
X-Original-Date Sun, 4 Jun 2017 19:13:05 -0700
X-Original-Message-ID <CALcN6mhypyh1zcz5De-kh=vv3QsZghOMkAojNkpXzQYPVfh8Ng@mail.gmail.com>
X-Original-References <20170523074853.54892-1-davidcc@google.com> <20170523074853.54892-12-davidcc@google.com> <20170525080826.GF14467@krava>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1657218

Show key headers only | View raw


On Thu, May 25, 2017 at 1:08 AM, Jiri Olsa <jolsa@redhat.com> wrote:
> On Tue, May 23, 2017 at 12:48:51AM -0700, David Carrillo-Cisneros wrote:
>> There are three FEAT_OP* macros:
>>   - FEAT_OPA: for features without process record.
>>   - FEAT_OPP: for features with process record.
>>   - FEAT_OPF: like FEAT_OPP but to show only if show_full_info flags
>>     is set.
>>
>> To add pipe-mode headers we need to specify whether a feature generates a
>> corresponding sample record. This is an extra variation to the existing
>
> nit, the sample word here is confusing, it's an aux event

Will change.

>
>> macros. To simplify, redefine macros instead so that:
>>   - show_full_info is specified as an argument (to remove the
>>   FEAT_OPF variation) and,
>>   - it always sets "process" handler (to remove the FEAT_OPA variation).
>>   Individual process handlers can be NULLed individually.
>>
>> This allows to define two variations only:
>>   - FEAT_OPR: has sample record.
>>   - FEAT_OPN: doesn't has sample record.
>>
>> Signed-off-by: David Carrillo-Cisneros <davidcc@google.com>
>> ---
>>  tools/perf/util/header.c | 72 +++++++++++++++++++++++++++++-------------------
>>  1 file changed, 44 insertions(+), 28 deletions(-)
>>
>> diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
>> index b7704b30ed52..7aa84a02b9bd 100644
>> --- a/tools/perf/util/header.c
>> +++ b/tools/perf/util/header.c
>> @@ -11,6 +11,7 @@
>>  #include <linux/list.h>
>>  #include <linux/kernel.h>
>>  #include <linux/bitops.h>
>> +#include <linux/stringify.h>
>>  #include <sys/stat.h>
>>  #include <sys/types.h>
>>  #include <sys/utsname.h>
>> @@ -2106,42 +2107,57 @@ struct feature_ops {
>>       int (*process)(struct feat_fd *fd, void *data);
>>       const char *name;
>>       bool full_only;
>> +     bool has_record;
>
> 'synthesize' might be better choice

Yeah, it's better. Will change.

>
> jirka

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH v2 11/13] perf header: change FEAT_OP* macros Jiri Olsa <jolsa@redhat.com> - 2017-05-25 10:20 +0200
  Re: [PATCH v2 11/13] perf header: change FEAT_OP* macros David Carrillo-Cisneros <davidcc@google.com> - 2017-06-05 04:20 +0200

csiph-web