Re: [PATCH 15/34] perf, core: Add a concept of a weightened sample

From: Andi Kleen
Date: Tue Oct 23 2012 - 09:18:54 EST


On Tue, Oct 23, 2012 at 03:13:52PM +0200, Peter Zijlstra wrote:
> > @@ -562,6 +565,7 @@ enum perf_event_type {
> > * { u64 stream_id;} && PERF_SAMPLE_STREAM_ID
> > * { u32 cpu, res; } && PERF_SAMPLE_CPU
> > * { u64 period; } && PERF_SAMPLE_PERIOD
> > + * { u64 weight; } && PERF_SAMPLE_WEIGHT
> > *
> > * { struct read_format values; } && PERF_SAMPLE_READ
> > *
>
> So the only issues I have are that his makes every sample more expensive
> by having to 0 out that weight data and the sample placement.

It's only reported when explicitely enabled (-W). So most users
shouldn't see any overhead (except two untaken if()s or so)

-Andi

--
ak@xxxxxxxxxxxxxxx -- Speaking for myself only.
--
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/