aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/probe-event.c
diff options
context:
space:
mode:
authorMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>2010-12-17 08:12:11 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-12-21 17:20:58 -0500
commit0e43e5d222095ca2d1d825dd2e4fa158bdc4cc9b (patch)
tree2fa6d24d7e3fdb366bd070e2068b059fad5c0fd5 /tools/perf/util/probe-event.c
parentec5761eab318e50e69fcf8e63e9edaef5949c067 (diff)
perf probe: Cleanup messages
Add new lines for error or debug messages, change dwarf related words to more generic words (or just removed). Cc: 2nddept-manager@sdl.hitachi.co.jp Cc: Ingo Molnar <mingo@elte.hu> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Cc: Steven Rostedt <rostedt@goodmis.org> LKML-Reference: <20101217131211.24123.40437.stgit@ltc236.sdl.hitachi.co.jp> Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/probe-event.c')
-rw-r--r--tools/perf/util/probe-event.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 3b6a5297bf16..089d78ecbdda 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -95,7 +95,7 @@ static int init_vmlinux(void)
95 goto out; 95 goto out;
96 96
97 if (machine__create_kernel_maps(&machine) < 0) { 97 if (machine__create_kernel_maps(&machine) < 0) {
98 pr_debug("machine__create_kernel_maps "); 98 pr_debug("machine__create_kernel_maps() failed.\n");
99 goto out; 99 goto out;
100 } 100 }
101out: 101out:
@@ -140,7 +140,8 @@ static int open_vmlinux(const char *module)
140{ 140{
141 const char *path = kernel_get_module_path(module); 141 const char *path = kernel_get_module_path(module);
142 if (!path) { 142 if (!path) {
143 pr_err("Failed to find path of %s module", module ?: "kernel"); 143 pr_err("Failed to find path of %s module.\n",
144 module ?: "kernel");
144 return -ENOENT; 145 return -ENOENT;
145 } 146 }
146 pr_debug("Try to open %s\n", path); 147 pr_debug("Try to open %s\n", path);
@@ -217,7 +218,7 @@ static int try_to_find_probe_trace_events(struct perf_probe_event *pev,
217 pr_warning("Warning: No dwarf info found in the vmlinux - " 218 pr_warning("Warning: No dwarf info found in the vmlinux - "
218 "please rebuild kernel with CONFIG_DEBUG_INFO=y.\n"); 219 "please rebuild kernel with CONFIG_DEBUG_INFO=y.\n");
219 if (!need_dwarf) { 220 if (!need_dwarf) {
220 pr_debug("Trying to use symbols.\nn"); 221 pr_debug("Trying to use symbols.\n");
221 return 0; 222 return 0;
222 } 223 }
223 } 224 }
@@ -457,7 +458,7 @@ int show_available_vars(struct perf_probe_event *pevs, int npevs,
457 458
458 fd = open_vmlinux(module); 459 fd = open_vmlinux(module);
459 if (fd < 0) { 460 if (fd < 0) {
460 pr_warning("Failed to open debuginfo file.\n"); 461 pr_warning("Failed to open debug information file.\n");
461 return fd; 462 return fd;
462 } 463 }
463 464
@@ -690,39 +691,40 @@ static int parse_perf_probe_point(char *arg, struct perf_probe_event *pev)
690 691
691 /* Exclusion check */ 692 /* Exclusion check */
692 if (pp->lazy_line && pp->line) { 693 if (pp->lazy_line && pp->line) {
693 semantic_error("Lazy pattern can't be used with line number."); 694 semantic_error("Lazy pattern can't be used with"
695 " line number.\n");
694 return -EINVAL; 696 return -EINVAL;
695 } 697 }
696 698
697 if (pp->lazy_line && pp->offset) { 699 if (pp->lazy_line && pp->offset) {
698 semantic_error("Lazy pattern can't be used with offset."); 700 semantic_error("Lazy pattern can't be used with offset.\n");
699 return -EINVAL; 701 return -EINVAL;
700 } 702 }
701 703
702 if (pp->line && pp->offset) { 704 if (pp->line && pp->offset) {
703 semantic_error("Offset can't be used with line number."); 705 semantic_error("Offset can't be used with line number.\n");
704 return -EINVAL; 706 return -EINVAL;
705 } 707 }
706 708
707 if (!pp->line && !pp->lazy_line && pp->file && !pp->function) { 709 if (!pp->line && !pp->lazy_line && pp->file && !pp->function) {
708 semantic_error("File always requires line number or " 710 semantic_error("File always requires line number or "
709 "lazy pattern."); 711 "lazy pattern.\n");
710 return -EINVAL; 712 return -EINVAL;
711 } 713 }
712 714
713 if (pp->offset && !pp->function) { 715 if (pp->offset && !pp->function) {
714 semantic_error("Offset requires an entry function."); 716 semantic_error("Offset requires an entry function.\n");
715 return -EINVAL; 717 return -EINVAL;
716 } 718 }
717 719
718 if (pp->retprobe && !pp->function) { 720 if (pp->retprobe && !pp->function) {
719 semantic_error("Return probe requires an entry function."); 721 semantic_error("Return probe requires an entry function.\n");
720 return -EINVAL; 722 return -EINVAL;
721 } 723 }
722 724
723 if ((pp->offset || pp->line || pp->lazy_line) && pp->retprobe) { 725 if ((pp->offset || pp->line || pp->lazy_line) && pp->retprobe) {
724 semantic_error("Offset/Line/Lazy pattern can't be used with " 726 semantic_error("Offset/Line/Lazy pattern can't be used with "
725 "return probe."); 727 "return probe.\n");
726 return -EINVAL; 728 return -EINVAL;
727 } 729 }
728 730
@@ -996,7 +998,7 @@ int synthesize_perf_probe_arg(struct perf_probe_arg *pa, char *buf, size_t len)
996 998
997 return tmp - buf; 999 return tmp - buf;
998error: 1000error:
999 pr_debug("Failed to synthesize perf probe argument: %s", 1001 pr_debug("Failed to synthesize perf probe argument: %s\n",
1000 strerror(-ret)); 1002 strerror(-ret));
1001 return ret; 1003 return ret;
1002} 1004}
@@ -1046,7 +1048,7 @@ static char *synthesize_perf_probe_point(struct perf_probe_point *pp)
1046 1048
1047 return buf; 1049 return buf;
1048error: 1050error:
1049 pr_debug("Failed to synthesize perf probe point: %s", 1051 pr_debug("Failed to synthesize perf probe point: %s\n",
1050 strerror(-ret)); 1052 strerror(-ret));
1051 if (buf) 1053 if (buf)
1052 free(buf); 1054 free(buf);
@@ -1787,7 +1789,7 @@ static int del_trace_probe_event(int fd, const char *group,
1787 1789
1788 ret = e_snprintf(buf, 128, "%s:%s", group, event); 1790 ret = e_snprintf(buf, 128, "%s:%s", group, event);
1789 if (ret < 0) { 1791 if (ret < 0) {
1790 pr_err("Failed to copy event."); 1792 pr_err("Failed to copy event.\n");
1791 return ret; 1793 return ret;
1792 } 1794 }
1793 1795