Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 189083
b: refs/heads/master
c: d0cb426
h: refs/heads/master
i:
  189081: f478e92
  189079: 3130ee7
v: v3
  • Loading branch information
Masami Hiramatsu authored and Ingo Molnar committed Mar 16, 2010
1 parent c1cb515 commit dbe8917
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 67c7ff7c56f38a8ab338fbbfe366621ce6303ba1
refs/heads/master: d0cb4260f899d07462d49fc67e29f2438dbaca2f
11 changes: 2 additions & 9 deletions trunk/tools/perf/util/probe-finder.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,7 @@ static void show_variable(Dwarf_Die *vr_die, struct probe_finder *pf)
if (dwarf_attr(vr_die, DW_AT_location, &attr) == NULL)
goto error;
/* TODO: handle more than 1 exprs */
ret = dwarf_getlocation_addr(&attr, (pf->addr - pf->cu_base),
&expr, &nexpr, 1);
ret = dwarf_getlocation_addr(&attr, pf->addr, &expr, &nexpr, 1);
if (ret <= 0 || nexpr == 0)
goto error;

Expand Down Expand Up @@ -437,8 +436,7 @@ static void show_probe_point(Dwarf_Die *sp_die, struct probe_finder *pf)

/* Get the frame base attribute/ops */
dwarf_attr(sp_die, DW_AT_frame_base, &fb_attr);
ret = dwarf_getlocation_addr(&fb_attr, (pf->addr - pf->cu_base),
&pf->fb_ops, &nops, 1);
ret = dwarf_getlocation_addr(&fb_attr, pf->addr, &pf->fb_ops, &nops, 1);
if (ret <= 0 || nops == 0)
pf->fb_ops = NULL;

Expand Down Expand Up @@ -644,7 +642,6 @@ static void find_probe_point_by_func(struct probe_finder *pf)
int find_probe_point(int fd, struct probe_point *pp)
{
struct probe_finder pf = {.pp = pp};
int ret;
Dwarf_Off off, noff;
size_t cuhl;
Dwarf_Die *diep;
Expand All @@ -671,10 +668,6 @@ int find_probe_point(int fd, struct probe_point *pp)
pf.fname = NULL;

if (!pp->file || pf.fname) {
/* Save CU base address (for frame_base) */
ret = dwarf_lowpc(&pf.cu_die, &pf.cu_base);
if (ret != 0)
pf.cu_base = 0;
if (pp->function)
find_probe_point_by_func(&pf);
else if (pp->lazy_line)
Expand Down
1 change: 0 additions & 1 deletion trunk/tools/perf/util/probe-finder.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ struct probe_finder {

/* For variable searching */
Dwarf_Op *fb_ops; /* Frame base attribute */
Dwarf_Addr cu_base; /* Current CU base address */
const char *var; /* Current variable name */
char *buf; /* Current output buffer */
int len; /* Length of output buffer */
Expand Down

0 comments on commit dbe8917

Please sign in to comment.