aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/probe-finder.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/probe-finder.c')
-rw-r--r--tools/perf/util/probe-finder.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index 338fdb9e093d..db24c913225f 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -32,6 +32,8 @@
32#include <stdarg.h> 32#include <stdarg.h>
33#include <ctype.h> 33#include <ctype.h>
34 34
35#include "event.h"
36#include "debug.h"
35#include "util.h" 37#include "util.h"
36#include "probe-finder.h" 38#include "probe-finder.h"
37 39
@@ -134,7 +136,7 @@ static Dwarf_Unsigned die_get_fileno(Dwarf_Die cu_die, const char *fname)
134 dwarf_dealloc(__dw_debug, srcs, DW_DLA_LIST); 136 dwarf_dealloc(__dw_debug, srcs, DW_DLA_LIST);
135 } 137 }
136 if (found) 138 if (found)
137 debug("found fno: %d\n", (int)found); 139 eprintf("found fno: %d\n", (int)found);
138 return found; 140 return found;
139} 141}
140 142
@@ -440,7 +442,7 @@ static void find_variable(Dwarf_Die sp_die, struct probe_finder *pf)
440 return ; 442 return ;
441 } 443 }
442 444
443 debug("Searching '%s' variable in context.\n", pf->var); 445 eprintf("Searching '%s' variable in context.\n", pf->var);
444 /* Search child die for local variables and parameters. */ 446 /* Search child die for local variables and parameters. */
445 ret = search_die_from_children(sp_die, variable_callback, pf); 447 ret = search_die_from_children(sp_die, variable_callback, pf);
446 if (!ret) 448 if (!ret)
@@ -550,7 +552,7 @@ static void find_by_line(Dwarf_Die cu_die, struct probe_finder *pf)
550 552
551 ret = dwarf_lineaddr(lines[i], &addr, &__dw_error); 553 ret = dwarf_lineaddr(lines[i], &addr, &__dw_error);
552 ERR_IF(ret != DW_DLV_OK); 554 ERR_IF(ret != DW_DLV_OK);
553 debug("Probe point found: 0x%llx\n", addr); 555 eprintf("Probe point found: 0x%llx\n", addr);
554 pf->addr = addr; 556 pf->addr = addr;
555 /* Search a real subprogram including this line, */ 557 /* Search a real subprogram including this line, */
556 ret = search_die_from_children(cu_die, probeaddr_callback, pf); 558 ret = search_die_from_children(cu_die, probeaddr_callback, pf);
@@ -581,7 +583,7 @@ static int probefunc_callback(struct die_link *dlink, void *data)
581 &pf->inl_offs, 583 &pf->inl_offs,
582 &__dw_error); 584 &__dw_error);
583 ERR_IF(ret != DW_DLV_OK); 585 ERR_IF(ret != DW_DLV_OK);
584 debug("inline definition offset %lld\n", 586 eprintf("inline definition offset %lld\n",
585 pf->inl_offs); 587 pf->inl_offs);
586 return 0; 588 return 0;
587 } 589 }
@@ -597,7 +599,7 @@ static int probefunc_callback(struct die_link *dlink, void *data)
597 /* Get probe address */ 599 /* Get probe address */
598 pf->addr = die_get_entrypc(dlink->die); 600 pf->addr = die_get_entrypc(dlink->die);
599 pf->addr += pp->offset; 601 pf->addr += pp->offset;
600 debug("found inline addr: 0x%llx\n", pf->addr); 602 eprintf("found inline addr: 0x%llx\n", pf->addr);
601 /* Inlined function. Get a real subprogram */ 603 /* Inlined function. Get a real subprogram */
602 for (lk = dlink->parent; lk != NULL; lk = lk->parent) { 604 for (lk = dlink->parent; lk != NULL; lk = lk->parent) {
603 tag = 0; 605 tag = 0;