Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234352
b: refs/heads/master
c: 1b3a0e9
h: refs/heads/master
v: v3
  • Loading branch information
Frederic Weisbecker authored and Arnaldo Carvalho de Melo committed Jan 22, 2011
1 parent c9ea4f1 commit 5ac05f6
Show file tree
Hide file tree
Showing 8 changed files with 205 additions and 140 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: de5fa3a8a05cd60f59622e88cfeb90416760d78e
refs/heads/master: 1b3a0e9592ebf174af934b3908a2bf6a6fa86169
25 changes: 12 additions & 13 deletions trunk/tools/perf/builtin-report.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,17 @@ static int perf_session__add_hist_entry(struct perf_session *self,
struct addr_location *al,
struct sample_data *data)
{
struct map_symbol *syms = NULL;
struct symbol *parent = NULL;
int err = -ENOMEM;
int err = 0;
struct hist_entry *he;
struct hists *hists;
struct perf_event_attr *attr;

if ((sort__has_parent || symbol_conf.use_callchain) && data->callchain) {
syms = perf_session__resolve_callchain(self, al->thread,
data->callchain, &parent);
if (syms == NULL)
return -ENOMEM;
err = perf_session__resolve_callchain(self, al->thread,
data->callchain, &parent);
if (err)
return err;
}

attr = perf_header__find_attr(data->id, &self->header);
Expand All @@ -101,16 +100,17 @@ static int perf_session__add_hist_entry(struct perf_session *self,
else
hists = perf_session__hists_findnew(self, data->id, 0, 0);
if (hists == NULL)
goto out_free_syms;
return -ENOMEM;

he = __hists__add_entry(hists, al, parent, data->period);
if (he == NULL)
goto out_free_syms;
err = 0;
return -ENOMEM;

if (symbol_conf.use_callchain) {
err = callchain_append(he->callchain, data->callchain, syms,
err = callchain_append(he->callchain, &self->callchain_cursor,
data->period);
if (err)
goto out_free_syms;
return err;
}
/*
* Only in the newt browser we are doing integrated annotation,
Expand All @@ -119,8 +119,7 @@ static int perf_session__add_hist_entry(struct perf_session *self,
*/
if (use_browser > 0)
err = hist_entry__inc_addr_samples(he, al->addr);
out_free_syms:
free(syms);

return err;
}

Expand Down
Loading

0 comments on commit 5ac05f6

Please sign in to comment.