From: David Ahern Date: Fri, 8 Nov 2013 04:23:24 +0000 (-0700) Subject: perf record: Move existing write_output into helper function X-Git-Tag: upstream/snapshot3+hdmi~3945^2~4^2~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a9986fad6645b98d5bb3c2f83c22efb0761ca272;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git perf record: Move existing write_output into helper function Code move only; no logic changes. In preparation for the mmap based output option in the next patch. Signed-off-by: David Ahern Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mike Galbraith Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/1383884605-30968-2-git-send-email-dsahern@gmail.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 8f5af32..880227e 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -76,7 +76,7 @@ struct perf_record { long samples; }; -static int write_output(struct perf_record *rec, void *buf, size_t size) +static int do_write_output(struct perf_record *rec, void *buf, size_t size) { struct perf_data_file *file = &rec->file; @@ -97,6 +97,11 @@ static int write_output(struct perf_record *rec, void *buf, size_t size) return 0; } +static int write_output(struct perf_record *rec, void *buf, size_t size) +{ + return do_write_output(rec, buf, size); +} + static int process_synthesized_event(struct perf_tool *tool, union perf_event *event, struct perf_sample *sample __maybe_unused,