mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-28 23:24:50 +00:00
perf probe: Rename some die_get_* functions
Rename die_get_real_subprogram and die_get_inlinefunc to die_find_real_subprogram and die_find_inlinefunc respectively, because these functions search its children. After that, 'die_get_' means getting a property of that die, and 'die_find_' means searching DIE-tree to get an appropriate child die. Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com> Cc: systemtap <systemtap@sources.redhat.com> Cc: DLE <dle-develop@lists.sourceforge.net> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <20100316220551.32050.36181.stgit@localhost6.localdomain6> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
12a1fadb41
commit
95a3e4c4e2
1 changed files with 8 additions and 8 deletions
|
@ -204,8 +204,8 @@ static int __die_search_func_cb(Dwarf_Die *fn_die, void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Search a real subprogram including this line, */
|
/* Search a real subprogram including this line, */
|
||||||
static Dwarf_Die *die_get_real_subprogram(Dwarf_Die *cu_die, Dwarf_Addr addr,
|
static Dwarf_Die *die_find_real_subprogram(Dwarf_Die *cu_die, Dwarf_Addr addr,
|
||||||
Dwarf_Die *die_mem)
|
Dwarf_Die *die_mem)
|
||||||
{
|
{
|
||||||
struct __addr_die_search_param ad;
|
struct __addr_die_search_param ad;
|
||||||
ad.addr = addr;
|
ad.addr = addr;
|
||||||
|
@ -218,8 +218,8 @@ static Dwarf_Die *die_get_real_subprogram(Dwarf_Die *cu_die, Dwarf_Addr addr,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Similar to dwarf_getfuncs, but returns inlined_subroutine if exists. */
|
/* Similar to dwarf_getfuncs, but returns inlined_subroutine if exists. */
|
||||||
static Dwarf_Die *die_get_inlinefunc(Dwarf_Die *sp_die, Dwarf_Addr addr,
|
static Dwarf_Die *die_find_inlinefunc(Dwarf_Die *sp_die, Dwarf_Addr addr,
|
||||||
Dwarf_Die *die_mem)
|
Dwarf_Die *die_mem)
|
||||||
{
|
{
|
||||||
Dwarf_Die child_die;
|
Dwarf_Die child_die;
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -233,7 +233,7 @@ static Dwarf_Die *die_get_inlinefunc(Dwarf_Die *sp_die, Dwarf_Addr addr,
|
||||||
dwarf_haspc(die_mem, addr))
|
dwarf_haspc(die_mem, addr))
|
||||||
return die_mem;
|
return die_mem;
|
||||||
|
|
||||||
if (die_get_inlinefunc(die_mem, addr, &child_die)) {
|
if (die_find_inlinefunc(die_mem, addr, &child_die)) {
|
||||||
memcpy(die_mem, &child_die, sizeof(Dwarf_Die));
|
memcpy(die_mem, &child_die, sizeof(Dwarf_Die));
|
||||||
return die_mem;
|
return die_mem;
|
||||||
}
|
}
|
||||||
|
@ -401,7 +401,7 @@ static void show_probe_point(Dwarf_Die *sp_die, struct probe_finder *pf)
|
||||||
|
|
||||||
/* If no real subprogram, find a real one */
|
/* If no real subprogram, find a real one */
|
||||||
if (!sp_die || dwarf_tag(sp_die) != DW_TAG_subprogram) {
|
if (!sp_die || dwarf_tag(sp_die) != DW_TAG_subprogram) {
|
||||||
sp_die = die_get_real_subprogram(&pf->cu_die,
|
sp_die = die_find_real_subprogram(&pf->cu_die,
|
||||||
pf->addr, &die_mem);
|
pf->addr, &die_mem);
|
||||||
if (!sp_die)
|
if (!sp_die)
|
||||||
die("Probe point is not found in subprograms.");
|
die("Probe point is not found in subprograms.");
|
||||||
|
@ -564,7 +564,7 @@ static void find_probe_point_lazy(Dwarf_Die *sp_die, struct probe_finder *pf)
|
||||||
if (!dwarf_haspc(sp_die, addr))
|
if (!dwarf_haspc(sp_die, addr))
|
||||||
continue;
|
continue;
|
||||||
/* Address filtering 2: No child include addr? */
|
/* Address filtering 2: No child include addr? */
|
||||||
if (die_get_inlinefunc(sp_die, addr, &die_mem))
|
if (die_find_inlinefunc(sp_die, addr, &die_mem))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -714,7 +714,7 @@ static void find_line_range_by_line(Dwarf_Die *sp_die, struct line_finder *lf)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* Address filtering 2: No child include addr? */
|
/* Address filtering 2: No child include addr? */
|
||||||
if (die_get_inlinefunc(sp_die, addr, &die_mem))
|
if (die_find_inlinefunc(sp_die, addr, &die_mem))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue