18 static int build_id_cache__add_file(
const char *
filename,
const char *debugdir)
25 pr_debug(
"Couldn't read a build-id in %s\n", filename);
33 pr_info(
"Adding %s %s: %s\n", sbuild_id, filename,
38 static int build_id_cache__remove_file(
const char *filename,
47 pr_debug(
"Couldn't read a build-id in %s\n", filename);
54 pr_info(
"Removing %s %s: %s\n", sbuild_id, filename,
66 char const *add_name_list_str =
NULL,
67 *remove_name_list_str =
NULL;
68 const struct option buildid_cache_options[] = {
70 "file list",
"file(s) to add"),
71 OPT_STRING(
'r',
"remove", &remove_name_list_str,
"file list",
76 const char *
const buildid_cache_usage[] = {
77 "perf buildid-cache [<options>]",
82 buildid_cache_usage, 0);
91 if (add_name_list_str) {
95 if (build_id_cache__add_file(pos->
s, debugdir)) {
97 pr_debug(
"%s already in the cache\n",
109 if (remove_name_list_str) {
113 if (build_id_cache__remove_file(pos->
s, debugdir)) {
115 pr_debug(
"%s wasn't in the cache\n",