From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752298AbbCTPp6 (ORCPT ); Fri, 20 Mar 2015 11:45:58 -0400 Received: from mail.kernel.org ([198.145.29.136]:54867 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751198AbbCTPpz (ORCPT ); Fri, 20 Mar 2015 11:45:55 -0400 Date: Fri, 20 Mar 2015 12:44:35 -0300 From: Arnaldo Carvalho de Melo To: Steven Rostedt Cc: David Ahern , linux-kernel@vger.kernel.org, Namhyung Kim , Jiri Olsa Subject: Re: [PATCH] perf trace: Handle legacy syscalls Message-ID: <20150320154435.GJ16485@kernel.org> References: <1426790181-19118-1-git-send-email-dsahern@gmail.com> <20150320153226.GI16485@kernel.org> <20150320114011.4e25167c@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150320114011.4e25167c@gandalf.local.home> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Fri, Mar 20, 2015 at 11:40:11AM -0400, Steven Rostedt escreveu: > On Fri, 20 Mar 2015 12:32:26 -0300 > Arnaldo Carvalho de Melo wrote: > > Em Thu, Mar 19, 2015 at 12:36:21PM -0600, David Ahern escreveu: > > > +++ b/tools/lib/traceevent/event-parse.c > > > @@ -6228,15 +6228,20 @@ void pevent_ref(struct pevent *pevent) > > > pevent->ref_count++; > > > } > > > > > > +void free_format_field(struct format_field *field) > > > +{ > > > + free(field->type); > > > + free(field->name); > > > + free(field); > > > +} > > > + > > > static void free_format_fields(struct format_field *field) > > > { > > > struct format_field *next; > > > > > > while (field) { > > > next = field->next; > > > - free(field->type); > > > - free(field->name); > > > - free(field); > > > + free_format_field(field); > > > field = next; > > > } > > > } > > > diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h > > > index 5b4efc062320..a548fac646f6 100644 > > > --- a/tools/lib/traceevent/event-parse.h > > > +++ b/tools/lib/traceevent/event-parse.h > > > @@ -619,6 +619,7 @@ enum pevent_errno pevent_parse_format(struct pevent *pevent, > > > const char *buf, > > > unsigned long size, const char *sys); > > > void pevent_free_format(struct event_format *event); > > > +void free_format_field(struct format_field *field); > > Can we make it "pevent_free_format_field" to keep consistency. > > > > > > > void *pevent_get_field_raw(struct trace_seq *s, struct event_format *event, > > > const char *name, struct pevent_record *record, > > > diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c > > > index dcd950ef2fd7..5caeefeda48a 100644 > > > > > > Up to here we should have a separate patch, one that I would like to > > have an Acked-by: Rostedt, ok? > > I'm fine with the change if the name of the function is updated. Ok, so I'll put it in a separate patch, authored by David, with your Acked-by, it may be useful at some point besides being used in the libtraceevent internal free_format_fields() static function. - Arnaldo