perf: Remove the perf_output_begin(.sample) argument
Since only samples call perf_output_sample() its much saner (and more correct) to put the sample logic in there than in the perf_output_begin()/perf_output_end() pair. Saves a useless argument, reduces conditionals and shrinks struct perf_output_handle, win! Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/n/tip-2crpvsx3cqu67q3zqjbnlpsc@git.kernel.org Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
committed by
Ingo Molnar
parent
a8b0ca17b8
commit
a7ac67ea02
@@ -340,7 +340,7 @@ static int intel_pmu_drain_bts_buffer(void)
|
||||
*/
|
||||
perf_prepare_sample(&header, &data, event, ®s);
|
||||
|
||||
if (perf_output_begin(&handle, event, header.size * (top - at), 1))
|
||||
if (perf_output_begin(&handle, event, header.size * (top - at)))
|
||||
return 1;
|
||||
|
||||
for (; at < top; at++) {
|
||||
|
Reference in New Issue
Block a user