19 static int sysfs__fprintf_build_id(FILE *
fp)
25 sizeof(kallsyms_build_id)) != 0)
34 static int filename__fprintf_build_id(
const char *
name, FILE *fp)
40 sizeof(build_id)) !=
sizeof(build_id))
44 return fprintf(fp,
"%s\n", sbuild_id);
47 static int perf_session__list_build_ids(
const char *input_name,
48 bool force,
bool with_hits)
62 if (filename__fprintf_build_id(session->
filename, stdout))
69 if (with_hits || session->
fd_pipe)
81 bool show_kernel =
false;
82 bool with_hits =
false;
84 const char *input_name =
NULL;
85 const struct option options[] = {
86 OPT_BOOLEAN(
'H',
"with-hits", &with_hits,
"Show only DSOs with hits"),
87 OPT_STRING(
'i',
"input", &input_name,
"file",
"input file name"),
88 OPT_BOOLEAN(
'f',
"force", &force,
"don't complain, do it"),
89 OPT_BOOLEAN(
'k',
"kernel", &show_kernel,
"Show current kernel build id"),
93 const char *
const buildid_list_usage[] = {
94 "perf buildid-list [<options>]",
98 argc =
parse_options(argc, argv, options, buildid_list_usage, 0);
102 return sysfs__fprintf_build_id(stdout);
104 return perf_session__list_build_ids(input_name, force, with_hits);