Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 205315
b: refs/heads/master
c: cc5edb0
h: refs/heads/master
i:
  205313: 8e5afe9
  205311: 091e55a
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo committed Jul 17, 2010
1 parent 7183a91 commit f60bb3b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 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: b66ecd97c1866f9a869643a5b69a984d5ce8f8f1
refs/heads/master: cc5edb0eb9ce892b530e34a5d110382483587942
36 changes: 18 additions & 18 deletions trunk/tools/perf/util/hist.c
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,21 @@ enum hist_filter {
HIST_FILTER__THREAD,
};

static void hists__remove_entry_filter(struct hists *self, struct hist_entry *h,
enum hist_filter filter)
{
h->filtered &= ~(1 << filter);
if (h->filtered)
return;

++self->nr_entries;
self->stats.total_period += h->period;
self->stats.nr_events[PERF_RECORD_SAMPLE] += h->nr_events;

if (h->ms.sym && self->max_sym_namelen < h->ms.sym->namelen)
self->max_sym_namelen = h->ms.sym->namelen;
}

void hists__filter_by_dso(struct hists *self, const struct dso *dso)
{
struct rb_node *nd;
Expand All @@ -814,15 +829,7 @@ void hists__filter_by_dso(struct hists *self, const struct dso *dso)
continue;
}

h->filtered &= ~(1 << HIST_FILTER__DSO);
if (!h->filtered) {
++self->nr_entries;
self->stats.total_period += h->period;
self->stats.nr_events[PERF_RECORD_SAMPLE] += h->nr_events;
if (h->ms.sym &&
self->max_sym_namelen < h->ms.sym->namelen)
self->max_sym_namelen = h->ms.sym->namelen;
}
hists__remove_entry_filter(self, h, HIST_FILTER__DSO);
}
}

Expand All @@ -841,15 +848,8 @@ void hists__filter_by_thread(struct hists *self, const struct thread *thread)
h->filtered |= (1 << HIST_FILTER__THREAD);
continue;
}
h->filtered &= ~(1 << HIST_FILTER__THREAD);
if (!h->filtered) {
++self->nr_entries;
self->stats.total_period += h->period;
self->stats.nr_events[PERF_RECORD_SAMPLE] += h->nr_events;
if (h->ms.sym &&
self->max_sym_namelen < h->ms.sym->namelen)
self->max_sym_namelen = h->ms.sym->namelen;
}

hists__remove_entry_filter(self, h, HIST_FILTER__THREAD);
}
}

Expand Down

0 comments on commit f60bb3b

Please sign in to comment.