mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 15:11:16 +00:00
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>
This commit is contained in:
parent
ec5761eab3
commit
0e43e5d222
2 changed files with 38 additions and 34 deletions
|
@ -95,7 +95,7 @@ static int init_vmlinux(void)
|
|||
goto out;
|
||||
|
||||
if (machine__create_kernel_maps(&machine) < 0) {
|
||||
pr_debug("machine__create_kernel_maps ");
|
||||
pr_debug("machine__create_kernel_maps() failed.\n");
|
||||
goto out;
|
||||
}
|
||||
out:
|
||||
|
@ -140,7 +140,8 @@ static int open_vmlinux(const char *module)
|
|||
{
|
||||
const char *path = kernel_get_module_path(module);
|
||||
if (!path) {
|
||||
pr_err("Failed to find path of %s module", module ?: "kernel");
|
||||
pr_err("Failed to find path of %s module.\n",
|
||||
module ?: "kernel");
|
||||
return -ENOENT;
|
||||
}
|
||||
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,
|
|||
pr_warning("Warning: No dwarf info found in the vmlinux - "
|
||||
"please rebuild kernel with CONFIG_DEBUG_INFO=y.\n");
|
||||
if (!need_dwarf) {
|
||||
pr_debug("Trying to use symbols.\nn");
|
||||
pr_debug("Trying to use symbols.\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -457,7 +458,7 @@ int show_available_vars(struct perf_probe_event *pevs, int npevs,
|
|||
|
||||
fd = open_vmlinux(module);
|
||||
if (fd < 0) {
|
||||
pr_warning("Failed to open debuginfo file.\n");
|
||||
pr_warning("Failed to open debug information file.\n");
|
||||
return fd;
|
||||
}
|
||||
|
||||
|
@ -690,39 +691,40 @@ static int parse_perf_probe_point(char *arg, struct perf_probe_event *pev)
|
|||
|
||||
/* Exclusion check */
|
||||
if (pp->lazy_line && pp->line) {
|
||||
semantic_error("Lazy pattern can't be used with line number.");
|
||||
semantic_error("Lazy pattern can't be used with"
|
||||
" line number.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (pp->lazy_line && pp->offset) {
|
||||
semantic_error("Lazy pattern can't be used with offset.");
|
||||
semantic_error("Lazy pattern can't be used with offset.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (pp->line && pp->offset) {
|
||||
semantic_error("Offset can't be used with line number.");
|
||||
semantic_error("Offset can't be used with line number.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!pp->line && !pp->lazy_line && pp->file && !pp->function) {
|
||||
semantic_error("File always requires line number or "
|
||||
"lazy pattern.");
|
||||
"lazy pattern.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (pp->offset && !pp->function) {
|
||||
semantic_error("Offset requires an entry function.");
|
||||
semantic_error("Offset requires an entry function.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (pp->retprobe && !pp->function) {
|
||||
semantic_error("Return probe requires an entry function.");
|
||||
semantic_error("Return probe requires an entry function.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if ((pp->offset || pp->line || pp->lazy_line) && pp->retprobe) {
|
||||
semantic_error("Offset/Line/Lazy pattern can't be used with "
|
||||
"return probe.");
|
||||
"return probe.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -996,7 +998,7 @@ int synthesize_perf_probe_arg(struct perf_probe_arg *pa, char *buf, size_t len)
|
|||
|
||||
return tmp - buf;
|
||||
error:
|
||||
pr_debug("Failed to synthesize perf probe argument: %s",
|
||||
pr_debug("Failed to synthesize perf probe argument: %s\n",
|
||||
strerror(-ret));
|
||||
return ret;
|
||||
}
|
||||
|
@ -1046,7 +1048,7 @@ static char *synthesize_perf_probe_point(struct perf_probe_point *pp)
|
|||
|
||||
return buf;
|
||||
error:
|
||||
pr_debug("Failed to synthesize perf probe point: %s",
|
||||
pr_debug("Failed to synthesize perf probe point: %s\n",
|
||||
strerror(-ret));
|
||||
if (buf)
|
||||
free(buf);
|
||||
|
@ -1787,7 +1789,7 @@ static int del_trace_probe_event(int fd, const char *group,
|
|||
|
||||
ret = e_snprintf(buf, 128, "%s:%s", group, event);
|
||||
if (ret < 0) {
|
||||
pr_err("Failed to copy event.");
|
||||
pr_err("Failed to copy event.\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue