From: Jiri Olsa <jolsa@redhat.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Corey Ashford <cjashfor@linux.vnet.ibm.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@elte.hu>, Namhyung Kim <namhyung@kernel.org>,
Paul Mackerras <paulus@samba.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCH] tools lib traceevent: Handle dynamic array's element size properly
Date: Tue, 22 Jan 2013 14:16:47 +0100 [thread overview]
Message-ID: <20130122131646.GB1037@krava.brq.redhat.com> (raw)
In-Reply-To: <1358829942.21576.49.camel@gandalf.local.home>
On Mon, Jan 21, 2013 at 11:45:42PM -0500, Steven Rostedt wrote:
> On Mon, 2013-01-21 at 13:44 +0100, Jiri Olsa wrote:
SNIP
> > + for (i = 0; table[i].type; i++) {
> > + if (!strcmp(table[i].type, field->type_dyn))
> > + return table[i].size;
> > + }
> > +
> > + return 0;
> > +}
> > +
> > static int event_read_fields(struct event_format *event, struct format_field **fields)
> > {
> > struct format_field *field = NULL;
> > @@ -1390,7 +1418,7 @@ static int event_read_fields(struct event_format *event, struct format_field **f
> > field->type = new_type;
> > strcat(field->type, " ");
> > strcat(field->type, field->name);
> > - free_token(field->name);
> > + field->type_dyn = field->name;
>
> This is only used in this function (the field_dynamic_elem_size() is
> only called here). Can we not add the field->type_dyn, and just use a
> local variable here. You just need to make sure you free it correctly.
ook, will send v2
thanks,
jirka
next prev parent reply other threads:[~2013-01-22 13:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-21 12:44 Jiri Olsa
2013-01-22 4:45 ` Steven Rostedt
2013-01-22 13:16 ` Jiri Olsa [this message]
2013-01-24 19:28 ` Arnaldo Carvalho de Melo
2013-01-25 7:53 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130122131646.GB1037@krava.brq.redhat.com \
--to=jolsa@redhat.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=cjashfor@linux.vnet.ibm.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=namhyung@kernel.org \
--cc=paulus@samba.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®