Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191169
b: refs/heads/master
c: b9fb930
h: refs/heads/master
i:
  191167: 14eb9ab
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo committed Apr 2, 2010
1 parent 23c5107 commit dbe11c7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 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: 71cf8b8ff7d6a79af086be9e4c72628da9d62d58
refs/heads/master: b9fb93047756c5e4129dfda7591612de61b0e877
4 changes: 2 additions & 2 deletions trunk/tools/perf/builtin-report.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ static int perf_session__add_hist_entry(struct perf_session *self,

if (symbol_conf.use_callchain) {
if (!hit)
callchain_init(&he->callchain);
err = append_chain(&he->callchain, data->callchain, syms);
callchain_init(he->callchain);
err = append_chain(he->callchain, data->callchain, syms);
free(syms);

if (err)
Expand Down
5 changes: 3 additions & 2 deletions trunk/tools/perf/util/hist.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ struct hist_entry *__perf_session__add_hist_entry(struct rb_root *hists,
p = &(*p)->rb_right;
}

he = malloc(sizeof(*he));
he = malloc(sizeof(*he) + (symbol_conf.use_callchain ?
sizeof(struct callchain_node) : 0));
if (!he)
return NULL;
*he = entry;
Expand Down Expand Up @@ -168,7 +169,7 @@ static void perf_session__insert_output_hist_entry(struct rb_root *root,
struct hist_entry *iter;

if (symbol_conf.use_callchain)
callchain_param.sort(&he->sorted_chain, &he->callchain,
callchain_param.sort(&he->sorted_chain, he->callchain,
min_callchain_hits, &callchain_param);

while (*p != NULL) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/tools/perf/util/sort.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ struct hist_entry {
u64 ip;
char level;
struct symbol *parent;
struct callchain_node callchain;
union {
unsigned long position;
struct hist_entry *pair;
struct rb_root sorted_chain;
};
struct callchain_node callchain[0];
};

enum sort_type {
Expand Down

0 comments on commit dbe11c7

Please sign in to comment.