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

Andi Kleen
2012-10-23T13:19:05Z

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@linux.intel.com -- Speaking for myself only.