From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Stanislav Fomichev <stfomichev@yandex-team.ru>,
Chia-I Wu <olvaffe@gmail.com>,
a.p.zijlstra@chello.nl, paulus@samba.org, mingo@redhat.com,
linux-kernel@vger.kernel.org,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH] perf timechart: dynamically determine event data offset
Date: Wed, 27 Nov 2013 23:51:25 +0900 [thread overview]
Message-ID: <1385563885.1685.40.camel@leonhard> (raw)
In-Reply-To: <20131127144144.GB11498@ghostprotocols.net>
2013-11-27 (수), 11:41 -0300, Arnaldo Carvalho de Melo:
> Em Wed, Nov 27, 2013 at 11:17:43PM +0900, Namhyung Kim escreveu:
> > 2013-11-27 (수), 10:44 -0300, Arnaldo Carvalho de Melo:
> > > Same signature, 32-bit, 64-bit userland, so whoever wrote timechart, Arjan, I
> > > think, made no mistakes at using the kernel exported interface, choosing the
> > > most efficient way to extract the data, casting to a struct.
>
> > > Yeah, using the interface that searches for a field name to get the offset and
> > > then add it to a pointer to then cast to the type will allow maximum flexibility,
> > > but is not really efficient.
>
> > > Doing that for something that is not performance critical (probably) as
> > > timechart probably is not a problem, but so is not a problem using the patch
> > > that does the cast after finding the offset of the first non-common field.
>
> > I'm not sure how it affects the performance really.
>
> Hey, everytime we need to get the value of a field when processing each
> tracepoint sample we need to do it via:
>
> struct format_field *pevent_find_field(struct event_format *event, const char *name)
> {
> struct format_field *format;
>
> for (format = event->format.fields; format; format = format->next) {
> if (strcmp(format->name, name) == 0)
> break;
> }
>
> return format;
> }
>
> I don't think this is optimal, no.
>
> But yeah, for things that don't have performance needs, don't process that many
> samples and hey, machines are fast and cheap these days ;-)
Right. What I wanted to say actually was like s/how/how much/. :)
Thanks,
Namhyung
next prev parent reply other threads:[~2013-11-27 14:51 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-07 6:48 [PATCH] perf timechart: remove lock_depth from trace_entry Chia-I Wu
2013-10-22 10:32 ` Stanislav Fomichev
2013-11-25 18:21 ` Arnaldo Carvalho de Melo
2013-11-26 11:05 ` Stanislav Fomichev
2013-11-26 12:10 ` Arnaldo Carvalho de Melo
2013-11-26 13:47 ` Stanislav Fomichev
2013-11-26 13:57 ` Arnaldo Carvalho de Melo
2013-11-26 14:54 ` [PATCH] perf timechart: dynamically determine event data offset Stanislav Fomichev
2013-11-26 22:04 ` Arnaldo Carvalho de Melo
2013-11-27 8:49 ` Namhyung Kim
2013-11-27 9:01 ` Stanislav Fomichev
2013-11-27 10:45 ` [PATCH] perf timechart: dynamically determine event fields offset Stanislav Fomichev
2013-11-30 12:53 ` [tip:perf/core] " tip-bot for Stanislav Fomichev
2013-11-27 13:44 ` [PATCH] perf timechart: dynamically determine event data offset Arnaldo Carvalho de Melo
2013-11-27 14:17 ` Namhyung Kim
2013-11-27 14:41 ` Arnaldo Carvalho de Melo
2013-11-27 14:51 ` Namhyung Kim [this message]
2013-11-27 14:55 ` Arnaldo Carvalho de Melo
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=1385563885.1685.40.camel@leonhard \
--to=namhyung@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=olvaffe@gmail.com \
--cc=paulus@samba.org \
--cc=rostedt@goodmis.org \
--cc=stfomichev@yandex-team.ru \
/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