Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 205330
b: refs/heads/master
c: 7a007ca
h: refs/heads/master
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo committed Jul 23, 2010
1 parent 40e8da4 commit a6770ac
Show file tree
Hide file tree
Showing 2 changed files with 17 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: 3a01736e70a7d629140695ba46a901266b4460cc
refs/heads/master: 7a007ca90b7c465137de06795ef4d5faa10f459e
21 changes: 16 additions & 5 deletions trunk/tools/perf/util/hist.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
#include "sort.h"
#include <math.h>

enum hist_filter {
HIST_FILTER__DSO,
HIST_FILTER__THREAD,
HIST_FILTER__PARENT,
};

struct callchain_param callchain_param = {
.mode = CHAIN_GRAPH_REL,
.min_percent = 0.5
Expand Down Expand Up @@ -52,11 +58,20 @@ static struct hist_entry *hist_entry__new(struct hist_entry *template)

static void hists__inc_nr_entries(struct hists *self, struct hist_entry *entry)
{
if (entry->filtered)
return;
if (entry->ms.sym && self->max_sym_namelen < entry->ms.sym->namelen)
self->max_sym_namelen = entry->ms.sym->namelen;
++self->nr_entries;
}

static u8 symbol__parent_filter(const struct symbol *parent)
{
if (symbol_conf.exclude_other && parent == NULL)
return 1 << HIST_FILTER__PARENT;
return 0;
}

struct hist_entry *__hists__add_entry(struct hists *self,
struct addr_location *al,
struct symbol *sym_parent, u64 period)
Expand All @@ -75,6 +90,7 @@ struct hist_entry *__hists__add_entry(struct hists *self,
.level = al->level,
.period = period,
.parent = sym_parent,
.filtered = symbol__parent_filter(sym_parent),
};
int cmp;

Expand Down Expand Up @@ -790,11 +806,6 @@ size_t hists__fprintf(struct hists *self, struct hists *pair,
return ret;
}

enum hist_filter {
HIST_FILTER__DSO,
HIST_FILTER__THREAD,
};

static void hists__remove_entry_filter(struct hists *self, struct hist_entry *h,
enum hist_filter filter)
{
Expand Down

0 comments on commit a6770ac

Please sign in to comment.