aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/probe-finder.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2012-03-05 03:20:08 -0500
committerIngo Molnar <mingo@elte.hu>2012-03-05 03:20:08 -0500
commit737f24bda723fdf89ecaacb99fa2bf5683c32799 (patch)
tree35495fff3e9956679cb5468e74e6814c8e44ee66 /tools/perf/util/probe-finder.c
parent8eedce996556d7d06522cd3a0e6069141c8dffe0 (diff)
parentb7c924274c456499264d1cfa3d44063bb11eb5db (diff)
Merge branch 'perf/urgent' into perf/core
Conflicts: tools/perf/builtin-record.c tools/perf/builtin-top.c tools/perf/perf.h tools/perf/util/top.h Merge reason: resolve these cherry-picking conflicts. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/probe-finder.c')
-rw-r--r--tools/perf/util/probe-finder.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index 67dc4aed721c..2cc162d3b78c 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -671,7 +671,7 @@ static int find_variable(Dwarf_Die *sc_die, struct probe_finder *pf)
671static int convert_to_trace_point(Dwarf_Die *sp_die, Dwarf_Addr paddr, 671static int convert_to_trace_point(Dwarf_Die *sp_die, Dwarf_Addr paddr,
672 bool retprobe, struct probe_trace_point *tp) 672 bool retprobe, struct probe_trace_point *tp)
673{ 673{
674 Dwarf_Addr eaddr; 674 Dwarf_Addr eaddr, highaddr;
675 const char *name; 675 const char *name;
676 676
677 /* Copy the name of probe point */ 677 /* Copy the name of probe point */
@@ -682,6 +682,16 @@ static int convert_to_trace_point(Dwarf_Die *sp_die, Dwarf_Addr paddr,
682 dwarf_diename(sp_die)); 682 dwarf_diename(sp_die));
683 return -ENOENT; 683 return -ENOENT;
684 } 684 }
685 if (dwarf_highpc(sp_die, &highaddr) != 0) {
686 pr_warning("Failed to get end address of %s\n",
687 dwarf_diename(sp_die));
688 return -ENOENT;
689 }
690 if (paddr > highaddr) {
691 pr_warning("Offset specified is greater than size of %s\n",
692 dwarf_diename(sp_die));
693 return -EINVAL;
694 }
685 tp->symbol = strdup(name); 695 tp->symbol = strdup(name);
686 if (tp->symbol == NULL) 696 if (tp->symbol == NULL)
687 return -ENOMEM; 697 return -ENOMEM;