From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756594AbdERQN7 (ORCPT ); Thu, 18 May 2017 12:13:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33898 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756520AbdERQNy (ORCPT ); Thu, 18 May 2017 12:13:54 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 5D3F580C21 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jolsa@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 5D3F580C21 Date: Thu, 18 May 2017 18:13:49 +0200 From: Jiri Olsa To: David Carrillo-Cisneros Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Andi Kleen , Simon Que , Wang Nan , Jiri Olsa , He Kuang , Masami Hiramatsu , David Ahern , Namhyung Kim , Stephane Eranian , Paul Turner Subject: Re: [PATCH 7/7] perf tools: add feature header record to pipe-mode Message-ID: <20170518161349.GG17926@krava> References: <20170518041602.28689-1-davidcc@google.com> <20170518041602.28689-8-davidcc@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170518041602.28689-8-davidcc@google.com> User-Agent: Mutt/1.8.0 (2017-02-23) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 18 May 2017 16:13:54 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 17, 2017 at 09:16:02PM -0700, David Carrillo-Cisneros wrote: SNIP > > @@ -2107,42 +2109,80 @@ struct feature_ops { > int (*process)(struct feat_fd *fd, void *data); > const char *name; > bool full_only; > + int record_type; > }; > > -#define FEAT_OPA(n, func) \ > - [n] = { .name = #n, .write = write_##func, .print = print_##func } > -#define FEAT_OPP(n, func) \ > - [n] = { .name = #n, .write = write_##func, .print = print_##func, \ > - .process = process_##func } > -#define FEAT_OPF(n, func) \ > - [n] = { .name = #n, .write = write_##func, .print = print_##func, \ > - .process = process_##func, .full_only = true } > +#define FEAT_OPP(n, func, __full_only) \ > + [HEADER_##n] = { \ > + .name = __stringify(HEADER_##n), \ > + .write = write_##func, \ > + .print = print_##func, \ > + .full_only = __full_only, \ > + .process = process_##func, \ > + .record_type = PERF_RECORD_HEADER_##n \ > + } > + > +#define FEAT_OPN(n, func, __full_only) \ > + [HEADER_##n] = { \ > + .name = __stringify(HEADER_##n), \ > + .write = write_##func, \ > + .print = print_##func, \ > + .full_only = __full_only, \ > + .process = process_##func \ > + } you're adding record_type, which should not be a reason to rename FEAT_* macros.. please do that in the separate patch and state reason in changelog thanks, jirka