提交 a4210141 编写于 作者: N Namhyung Kim 提交者: Arnaldo Carvalho de Melo

perf report: Use pr_*() functions where applicable

There're some places printing messages to stdout/err directly.

It should be converted to use proper error printing functions instead.
Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1387516278-17024-2-git-send-email-namhyung@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 cc22e575
...@@ -242,8 +242,8 @@ static int process_sample_event(struct perf_tool *tool, ...@@ -242,8 +242,8 @@ static int process_sample_event(struct perf_tool *tool,
int ret; int ret;
if (perf_event__preprocess_sample(event, machine, &al, sample) < 0) { if (perf_event__preprocess_sample(event, machine, &al, sample) < 0) {
fprintf(stderr, "problem processing %d event, skipping it.\n", pr_debug("problem processing %d event, skipping it.\n",
event->header.type); event->header.type);
return -1; return -1;
} }
...@@ -637,7 +637,7 @@ parse_callchain_opt(const struct option *opt, const char *arg, int unset) ...@@ -637,7 +637,7 @@ parse_callchain_opt(const struct option *opt, const char *arg, int unset)
return -1; return -1;
setup: setup:
if (callchain_register_param(&callchain_param) < 0) { if (callchain_register_param(&callchain_param) < 0) {
fprintf(stderr, "Can't register callchain params\n"); pr_err("Can't register callchain params\n");
return -1; return -1;
} }
return 0; return 0;
...@@ -859,7 +859,7 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused) ...@@ -859,7 +859,7 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
} }
if (report.mem_mode) { if (report.mem_mode) {
if (sort__mode == SORT_MODE__BRANCH) { if (sort__mode == SORT_MODE__BRANCH) {
fprintf(stderr, "branch and mem mode incompatible\n"); pr_err("branch and mem mode incompatible\n");
goto error; goto error;
} }
sort__mode = SORT_MODE__MEMORY; sort__mode = SORT_MODE__MEMORY;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册