Re: [PATCH 07/19] perf script: Set up output options for in-streamattributes

From: Arnaldo Carvalho de Melo
Date: Fri Oct 18 2013 - 10:32:19 EST


Em Fri, Oct 18, 2013 at 07:30:13AM -0600, David Ahern escreveu:
> On 10/18/13 6:29 AM, Adrian Hunter wrote:

> >Attributes (struct perf_event_attr) are recorded separately in the perf.data
> >file. perf script uses them to set up output options. However attributes
> >can also be in the event stream, for example when the input is a pipe (i.e.
> >live mode). This patch makes perf script process in-stream attributes in
> >the same way as on-file attributes.

> You have multiple changes in this patch -- expanding attribute
> processing to set output options per the description above and you
> are also making perf_script a stack variable. The latter should be a
> separate patch.

Agreed, and this conversion of struct perf_script to be a stack variable is
nice (killing globals, a favourite pastime, yeah!), I like it, but in the past
one such conversion showed something nasty that made several people stare at
the build seeing builtin-sched.o take ages to build...

Please consider testing before/after that specific stack move:

commit f36f83f947ede547833e462696893f866df77324
Author: Namhyung Kim <namhyung.kim@xxxxxxx>
Date: Tue Jun 4 14:46:19 2013 +0900

perf sched: Move struct perf_sched definition out of cmd_sched()

For some reason it consumed quite amount of compile time when declared
as local variable, and it disappeared when moved out of the function.
Moving other variables/tables didn't help.

On my system this single-file-change build time reduced from 11s to 3s.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/