Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191170
b: refs/heads/master
c: ad5b217
h: refs/heads/master
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo committed Apr 2, 2010
1 parent dbe11c7 commit c7d9709
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 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: b9fb93047756c5e4129dfda7591612de61b0e877
refs/heads/master: ad5b217b152d99ca3922153500c619d9758dd87a
5 changes: 4 additions & 1 deletion trunk/tools/perf/builtin-report.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,12 @@ static int perf_session__add_hist_entry(struct perf_session *self,
struct event_stat_id *stats;
struct perf_event_attr *attr;

if ((sort__has_parent || symbol_conf.use_callchain) && data->callchain)
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;
}

attr = perf_header__find_attr(data->id, &self->header);
if (attr)
Expand Down
11 changes: 3 additions & 8 deletions trunk/tools/perf/util/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,11 @@ struct map_symbol *perf_session__resolve_callchain(struct perf_session *self,
struct symbol **parent)
{
u8 cpumode = PERF_RECORD_MISC_USER;
struct map_symbol *syms = NULL;
unsigned int i;
struct map_symbol *syms = calloc(chain->nr, sizeof(*syms));

if (symbol_conf.use_callchain) {
syms = calloc(chain->nr, sizeof(*syms));
if (!syms) {
fprintf(stderr, "Can't allocate memory for symbols\n");
exit(-1);
}
}
if (!syms)
return NULL;

for (i = 0; i < chain->nr; i++) {
u64 ip = chain->ips[i];
Expand Down

0 comments on commit c7d9709

Please sign in to comment.