From: Adrian Hunter Date: Fri, 18 Oct 2013 12:29:00 +0000 (+0300) Subject: perf record: Improve write_output error message X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4f624685f92719565981eb6f8d9195bb578522a3;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git perf record: Improve write_output error message Improve the error message from write_output() to say what failed to write and give the error number. Signed-off-by: Adrian Hunter Cc: David Ahern Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mike Galbraith Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/1382099356-4918-4-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 92ca5419073b..d269dfa3ab08 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -88,7 +88,7 @@ static int write_output(struct perf_record *rec, void *buf, size_t size) int ret = write(rec->output, buf, size); if (ret < 0) { - pr_err("failed to write\n"); + pr_err("failed to write perf data, error: %m\n"); return -1; }