16 #include <subcmd/parse-options.h> 28 if (ret !=
sizeof(sbuild_id))
29 return ret < 0 ? ret : -EINVAL;
31 return fprintf(fp,
"%s\n", sbuild_id);
40 if (ret !=
sizeof(sbuild_id))
41 return ret < 0 ? ret : -EINVAL;
43 return fprintf(fp,
"%s\n", sbuild_id);
48 return with_hits && !dso->
hit;
96 bool show_kernel =
false;
97 bool with_hits =
false;
99 const struct option options[] = {
100 OPT_BOOLEAN(
'H',
"with-hits", &with_hits,
"Show only DSOs with hits"),
101 OPT_STRING(
'i',
"input", &
input_name,
"file",
"input file name"),
102 OPT_BOOLEAN(
'f',
"force", &force,
"don't complain, do it"),
103 OPT_BOOLEAN(
'k',
"kernel", &show_kernel,
"Show current kernel build id"),
104 OPT_INCR(
'v',
"verbose", &
verbose,
"be more verbose"),
107 const char *
const buildid_list_usage[] = {
108 "perf buildid-list [<options>]",
112 argc = parse_options(argc, argv, options, buildid_list_usage, 0);
size_t perf_session__fprintf_dsos_buildid(struct perf_session *session, FILE *fp, bool(skip)(struct dso *dso, int parm), int parm)
struct perf_data_file file
static int filename__fprintf_build_id(const char *name, FILE *fp)
void perf_session__delete(struct perf_session *session)
static int perf_session__list_build_ids(bool force, bool with_hits)
void symbol__elf_init(void)
static struct perf_session * session
int filename__sprintf_build_id(const char *pathname, char *sbuild_id)
int sysfs__sprintf_build_id(const char *root_dir, char *sbuild_id)
static int perf_data__is_pipe(struct perf_data *data)
struct perf_session * perf_session__new(struct perf_data *data, bool repipe, struct perf_tool *tool)
struct perf_tool build_id__mark_dso_hit_ops
int perf_session__process_events(struct perf_session *session)
struct perf_header header
static int sysfs__fprintf_build_id(FILE *fp)
int cmd_buildid_list(int argc, const char **argv)
static bool dso__skip_buildid(struct dso *dso, int with_hits)