lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131127145546.GD11498@ghostprotocols.net>
Date:	Wed, 27 Nov 2013 11:55:46 -0300
From:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	Stanislav Fomichev <stfomichev@...dex-team.ru>,
	Chia-I Wu <olvaffe@...il.com>, a.p.zijlstra@...llo.nl,
	paulus@...ba.org, mingo@...hat.com, linux-kernel@...r.kernel.org,
	Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [PATCH] perf timechart: dynamically determine event data offset

Em Wed, Nov 27, 2013 at 11:51:25PM +0900, Namhyung Kim escreveu:
> 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/. :)

We would have to use perf for that 8-)

Its just that doing a string search on a doubly linked list for each
field on each sample doesn't _look_ optimal to me, so I didn't bother
using a profiler for that :-)

Anyway, lets move on, will apply the patch after lunch and send Ingo's
way.

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ