Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188262
b: refs/heads/master
c: d403d0a
h: refs/heads/master
v: v3
  • Loading branch information
Eric B Munson authored and Ingo Molnar committed Mar 10, 2010
1 parent 2f0d996 commit ae4af8a
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 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: 8907fd607b66e36636469a2de9833db643869db8
refs/heads/master: d403d0acc9c5afa679a3f61e71489530d7fa0606
2 changes: 1 addition & 1 deletion trunk/tools/perf/builtin-annotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ static int perf_session__add_hist_entry(struct perf_session *self,
return 0;
}

he = __perf_session__add_hist_entry(self, al, NULL, count, &hit);
he = __perf_session__add_hist_entry(&self->hists, al, NULL, count, &hit);
if (he == NULL)
return -ENOMEM;

Expand Down
3 changes: 2 additions & 1 deletion trunk/tools/perf/builtin-diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ static int perf_session__add_hist_entry(struct perf_session *self,
struct addr_location *al, u64 count)
{
bool hit;
struct hist_entry *he = __perf_session__add_hist_entry(self, al, NULL,
struct hist_entry *he = __perf_session__add_hist_entry(&self->hists,
al, NULL,
count, &hit);
if (he == NULL)
return -ENOMEM;
Expand Down
3 changes: 2 additions & 1 deletion trunk/tools/perf/builtin-report.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ static int perf_session__add_hist_entry(struct perf_session *self,
if ((sort__has_parent || symbol_conf.use_callchain) && chain)
syms = perf_session__resolve_callchain(self, al->thread,
chain, &parent);
he = __perf_session__add_hist_entry(self, al, parent, count, &hit);
he = __perf_session__add_hist_entry(&self->hists, al, parent,
count, &hit);
if (he == NULL)
return -ENOMEM;

Expand Down
6 changes: 3 additions & 3 deletions trunk/tools/perf/util/hist.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ struct callchain_param callchain_param = {
* histogram, sorted on item, collects counts
*/

struct hist_entry *__perf_session__add_hist_entry(struct perf_session *self,
struct hist_entry *__perf_session__add_hist_entry(struct rb_root *hists,
struct addr_location *al,
struct symbol *sym_parent,
u64 count, bool *hit)
{
struct rb_node **p = &self->hists.rb_node;
struct rb_node **p = &hists->rb_node;
struct rb_node *parent = NULL;
struct hist_entry *he;
struct hist_entry entry = {
Expand Down Expand Up @@ -53,7 +53,7 @@ struct hist_entry *__perf_session__add_hist_entry(struct perf_session *self,
return NULL;
*he = entry;
rb_link_node(&he->rb_node, parent, p);
rb_insert_color(&he->rb_node, &self->hists);
rb_insert_color(&he->rb_node, hists);
*hit = false;
return he;
}
Expand Down
3 changes: 2 additions & 1 deletion trunk/tools/perf/util/hist.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ struct perf_session;
struct hist_entry;
struct addr_location;
struct symbol;
struct rb_root;

struct hist_entry *__perf_session__add_hist_entry(struct perf_session *self,
struct hist_entry *__perf_session__add_hist_entry(struct rb_root *hists,
struct addr_location *al,
struct symbol *parent,
u64 count, bool *hit);
Expand Down

0 comments on commit ae4af8a

Please sign in to comment.