summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDavid Ahern <dsahern@gmail.com>2013-11-07 21:23:24 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-11-11 15:56:40 -0300
commita9986fad6645b98d5bb3c2f83c22efb0761ca272 (patch)
tree4264c79d83371f3ba0032a0934d85ff5e1118cb3 /tools
parent410f17860318f36b999a90138f50350e3dc49933 (diff)
downloadlinux-a9986fad6645b98d5bb3c2f83c22efb0761ca272.tar.gz
linux-a9986fad6645b98d5bb3c2f83c22efb0761ca272.tar.bz2
linux-a9986fad6645b98d5bb3c2f83c22efb0761ca272.zip
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 <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1383884605-30968-2-git-send-email-dsahern@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/builtin-record.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 8f5af32d6451..880227eae20f 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,