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

2012-10-23 Thread Andi Kleen
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

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

2012-10-23 Thread Peter Zijlstra
On Thu, 2012-10-18 at 16:19 -0700, Andi Kleen wrote: > @@ -601,6 +602,7 @@ static inline void perf_sample_data_init(struct > perf_sample_data *data, > data->regs_user.abi = PERF_SAMPLE_REGS_ABI_NONE; > data->regs_user.regs = NULL; > data->stack_user_size = 0; > +

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

2012-10-23 Thread Peter Zijlstra
On Thu, 2012-10-18 at 16:19 -0700, Andi Kleen wrote: @@ -601,6 +602,7 @@ static inline void perf_sample_data_init(struct perf_sample_data *data, data-regs_user.abi = PERF_SAMPLE_REGS_ABI_NONE; data-regs_user.regs = NULL; data-stack_user_size = 0; + data-weight

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

2012-10-23 Thread Andi Kleen
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

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

2012-10-18 Thread Andi Kleen
From: Andi Kleen For some events it's useful to weight sample with a hardware provided number. This expresses how expensive the action the sample represent was. This allows the profiler to scale the samples to be more informative to the programmer. There is already the period which is used

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

2012-10-18 Thread Andi Kleen
From: Andi Kleen a...@linux.intel.com For some events it's useful to weight sample with a hardware provided number. This expresses how expensive the action the sample represent was. This allows the profiler to scale the samples to be more informative to the programmer. There is already the