diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-10-21 17:34:06 -0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-10-23 08:24:21 +0200 |
commit | b7cb10e790fbd145296e771f789273a875c15719 (patch) | |
tree | 53b0e9df9aebf91d35ed232505655bdb1cc0b1d1 /tools/perf/builtin-probe.c | |
parent | 43315956509ca6913764861ac7dec128b91eb1ec (diff) | |
download | linux-b7cb10e790fbd145296e771f789273a875c15719.tar.bz2 |
perf probe: Print debug messages using pr_*()
Use the new pr_{err,warning,debug,etc} printout methods, just
like in the kernel.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Mike Galbraith <efault@gmx.de>
LKML-Reference: <1256153646-10097-1-git-send-email-acme@redhat.com>
[ Split this patch out, to keep perf/probes separate. ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-probe.c')
-rw-r--r-- | tools/perf/builtin-probe.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c index b5ad86a265ff..dcb406c7f82d 100644 --- a/tools/perf/builtin-probe.c +++ b/tools/perf/builtin-probe.c @@ -78,7 +78,7 @@ static int parse_probepoint(const struct option *opt __used, if (!str) /* The end of probe points */ return 0; - eprintf("probe-definition(%d): %s\n", session.nr_probe, str); + pr_debug("probe-definition(%d): %s\n", session.nr_probe, str); if (++session.nr_probe == MAX_PROBES) semantic_error("Too many probes"); @@ -103,7 +103,7 @@ static int parse_probepoint(const struct option *opt __used, die("strndup"); if (++argc == MAX_PROBE_ARGS) semantic_error("Too many arguments"); - eprintf("argv[%d]=%s\n", argc, argv[argc - 1]); + pr_debug("argv[%d]=%s\n", argc, argv[argc - 1]); } } while (*str != '\0'); if (argc < 2) @@ -133,7 +133,7 @@ static int parse_probepoint(const struct option *opt __used, pp->line = atoi(ptr); if (!pp->file || !pp->line) semantic_error("Failed to parse line."); - eprintf("file:%s line:%d\n", pp->file, pp->line); + pr_debug("file:%s line:%d\n", pp->file, pp->line); } else { /* Function name */ ptr = strchr(arg, '+'); @@ -150,8 +150,8 @@ static int parse_probepoint(const struct option *opt __used, pp->file = strdup(ptr); } pp->function = strdup(arg); - eprintf("symbol:%s file:%s offset:%d\n", - pp->function, pp->file, pp->offset); + pr_debug("symbol:%s file:%s offset:%d\n", + pp->function, pp->file, pp->offset); } free(argv[1]); if (pp->file) @@ -175,7 +175,7 @@ static int parse_probepoint(const struct option *opt __used, session.need_dwarf = 1; } - eprintf("%d arguments\n", pp->nr_args); + pr_debug("%d arguments\n", pp->nr_args); return 0; } @@ -188,7 +188,7 @@ static int open_default_vmlinux(void) ret = uname(&uts); if (ret) { - eprintf("uname() failed.\n"); + pr_debug("uname() failed.\n"); return -errno; } session.release = uts.release; @@ -196,12 +196,12 @@ static int open_default_vmlinux(void) ret = snprintf(fname, MAX_PATH_LEN, default_search_path[i], session.release); if (ret >= MAX_PATH_LEN || ret < 0) { - eprintf("Filename(%d,%s) is too long.\n", i, + pr_debug("Filename(%d,%s) is too long.\n", i, uts.release); errno = E2BIG; return -E2BIG; } - eprintf("try to open %s\n", fname); + pr_debug("try to open %s\n", fname); fd = open(fname, O_RDONLY); if (fd >= 0) break; @@ -341,7 +341,7 @@ int cmd_probe(int argc, const char **argv, const char *prefix __used) ret = find_probepoint(fd, pp); if (ret <= 0) die("No probe point found.\n"); - eprintf("probe event %s found\n", session.events[j]); + pr_debug("probe event %s found\n", session.events[j]); } close(fd); |