path: root/tools/perf/builtin-buildid-list.c
diff options
authorArnaldo Carvalho de Melo <>2012-12-07 09:53:58 -0300
committerArnaldo Carvalho de Melo <>2012-12-09 08:46:07 -0300
commit417c2ff6806fd9183cb36682dcf32c4d068aba5e (patch)
tree76660911e3c6faa54e5f2424c80c4d7ad376c116 /tools/perf/builtin-buildid-list.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 <> Cc: Frederic Weisbecker <> Cc: Jiri Olsa <> Cc: Mike Galbraith <> Cc: Namhyung Kim <> Cc: Paul Mackerras <> Cc: Peter Zijlstra <> Cc: Stephane Eranian <> Link: Signed-off-by: Arnaldo Carvalho de Melo <>
Diffstat (limited to 'tools/perf/builtin-buildid-list.c')
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/perf/builtin-buildid-list.c b/tools/perf/builtin-buildid-list.c
index 4c770d252fd2..e74366a13218 100644
--- a/tools/perf/builtin-buildid-list.c
+++ b/tools/perf/builtin-buildid-list.c
@@ -44,6 +44,11 @@ static int filename__fprintf_build_id(const char *name, FILE *fp)
return fprintf(fp, "%s\n", sbuild_id);
+static bool dso__skip_buildid(struct dso *dso, int with_hits)
+ return with_hits && !dso->hit;
static int perf_session__list_build_ids(bool force, bool with_hits)
struct perf_session *session;
@@ -66,7 +71,7 @@ static int perf_session__list_build_ids(bool force, bool with_hits)
if (with_hits || session->fd_pipe)
perf_session__process_events(session, &build_id__mark_dso_hit_ops);
- perf_session__fprintf_dsos_buildid(session, stdout, with_hits);
+ perf_session__fprintf_dsos_buildid(session, stdout, dso__skip_buildid, with_hits);
return 0;