diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-12-07 09:53:58 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-12-09 08:46:07 -0300 |
commit | 417c2ff6806fd9183cb36682dcf32c4d068aba5e (patch) | |
tree | 76660911e3c6faa54e5f2424c80c4d7ad376c116 /tools/perf/util/symbol.c | |
parent | db6d0bb86164497f6c9ef46020cf1881953f4b08 (diff) | |
download | op-kernel-dev-417c2ff6806fd9183cb36682dcf32c4d068aba5e.zip op-kernel-dev-417c2ff6806fd9183cb36682dcf32c4d068aba5e.tar.gz |
perf symbols: Generalize filter in __fprintf_buildid methods
We had that 'with_hits' filter to show just the build ids for DSOs that
had samples, make that generic so that we can use it in the upcoming
buildid-cache --missing feature, to show just the build ids that are not
in the cache.
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-9nfesdfpnx7zp96yn3tmfbx0@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/symbol.c')
-rw-r--r-- | tools/perf/util/symbol.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 295f8d4..e5ba984 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -1315,21 +1315,21 @@ size_t machines__fprintf_dsos(struct rb_root *machines, FILE *fp) } size_t machine__fprintf_dsos_buildid(struct machine *machine, FILE *fp, - bool with_hits) + bool (skip)(struct dso *dso, int parm), int parm) { - return __dsos__fprintf_buildid(&machine->kernel_dsos, fp, with_hits) + - __dsos__fprintf_buildid(&machine->user_dsos, fp, with_hits); + return __dsos__fprintf_buildid(&machine->kernel_dsos, fp, skip, parm) + + __dsos__fprintf_buildid(&machine->user_dsos, fp, skip, parm); } -size_t machines__fprintf_dsos_buildid(struct rb_root *machines, - FILE *fp, bool with_hits) +size_t machines__fprintf_dsos_buildid(struct rb_root *machines, FILE *fp, + bool (skip)(struct dso *dso, int parm), int parm) { struct rb_node *nd; size_t ret = 0; for (nd = rb_first(machines); nd; nd = rb_next(nd)) { struct machine *pos = rb_entry(nd, struct machine, rb_node); - ret += machine__fprintf_dsos_buildid(pos, fp, with_hits); + ret += machine__fprintf_dsos_buildid(pos, fp, skip, parm); } return ret; } |