aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/symbol.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2012-12-07 07:53:58 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-12-09 06:46:07 -0500
commit417c2ff6806fd9183cb36682dcf32c4d068aba5e (patch)
tree76660911e3c6faa54e5f2424c80c4d7ad376c116 /tools/perf/util/symbol.c
parentdb6d0bb86164497f6c9ef46020cf1881953f4b08 (diff)
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.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 295f8d4feedf..e5ba9840ac22 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)
1315} 1315}
1316 1316
1317size_t machine__fprintf_dsos_buildid(struct machine *machine, FILE *fp, 1317size_t machine__fprintf_dsos_buildid(struct machine *machine, FILE *fp,
1318 bool with_hits) 1318 bool (skip)(struct dso *dso, int parm), int parm)
1319{ 1319{
1320 return __dsos__fprintf_buildid(&machine->kernel_dsos, fp, with_hits) + 1320 return __dsos__fprintf_buildid(&machine->kernel_dsos, fp, skip, parm) +
1321 __dsos__fprintf_buildid(&machine->user_dsos, fp, with_hits); 1321 __dsos__fprintf_buildid(&machine->user_dsos, fp, skip, parm);
1322} 1322}
1323 1323
1324size_t machines__fprintf_dsos_buildid(struct rb_root *machines, 1324size_t machines__fprintf_dsos_buildid(struct rb_root *machines, FILE *fp,
1325 FILE *fp, bool with_hits) 1325 bool (skip)(struct dso *dso, int parm), int parm)
1326{ 1326{
1327 struct rb_node *nd; 1327 struct rb_node *nd;
1328 size_t ret = 0; 1328 size_t ret = 0;
1329 1329
1330 for (nd = rb_first(machines); nd; nd = rb_next(nd)) { 1330 for (nd = rb_first(machines); nd; nd = rb_next(nd)) {
1331 struct machine *pos = rb_entry(nd, struct machine, rb_node); 1331 struct machine *pos = rb_entry(nd, struct machine, rb_node);
1332 ret += machine__fprintf_dsos_buildid(pos, fp, with_hits); 1332 ret += machine__fprintf_dsos_buildid(pos, fp, skip, parm);
1333 } 1333 }
1334 return ret; 1334 return ret;
1335} 1335}