diff options
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/util/build-id.c | 12 | ||||
-rw-r--r-- | tools/perf/util/build-id.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-id.c index 20aef90bf194..62b147366d01 100644 --- a/tools/perf/util/build-id.c +++ b/tools/perf/util/build-id.c | |||
@@ -387,9 +387,8 @@ void disable_buildid_cache(void) | |||
387 | no_buildid_cache = true; | 387 | no_buildid_cache = true; |
388 | } | 388 | } |
389 | 389 | ||
390 | static char *build_id_cache__dirname_from_path(const char *name, | 390 | char *build_id_cache__cachedir(const char *sbuild_id, const char *name, |
391 | bool is_kallsyms, bool is_vdso, | 391 | bool is_kallsyms, bool is_vdso) |
392 | const char *sbuild_id) | ||
393 | { | 392 | { |
394 | char *realname = (char *)name, *filename; | 393 | char *realname = (char *)name, *filename; |
395 | bool slash = is_kallsyms || is_vdso; | 394 | bool slash = is_kallsyms || is_vdso; |
@@ -417,8 +416,7 @@ int build_id_cache__list_build_ids(const char *pathname, | |||
417 | char *dir_name; | 416 | char *dir_name; |
418 | int ret = 0; | 417 | int ret = 0; |
419 | 418 | ||
420 | dir_name = build_id_cache__dirname_from_path(pathname, false, false, | 419 | dir_name = build_id_cache__cachedir(NULL, pathname, false, false); |
421 | NULL); | ||
422 | if (!dir_name) | 420 | if (!dir_name) |
423 | return -ENOMEM; | 421 | return -ENOMEM; |
424 | 422 | ||
@@ -444,8 +442,8 @@ int build_id_cache__add_s(const char *sbuild_id, const char *name, | |||
444 | goto out_free; | 442 | goto out_free; |
445 | } | 443 | } |
446 | 444 | ||
447 | dir_name = build_id_cache__dirname_from_path(name, is_kallsyms, | 445 | dir_name = build_id_cache__cachedir(sbuild_id, name, |
448 | is_vdso, sbuild_id); | 446 | is_kallsyms, is_vdso); |
449 | if (!dir_name) | 447 | if (!dir_name) |
450 | goto out_free; | 448 | goto out_free; |
451 | 449 | ||
diff --git a/tools/perf/util/build-id.h b/tools/perf/util/build-id.h index e5435f46e48e..d8c7f2fc6a87 100644 --- a/tools/perf/util/build-id.h +++ b/tools/perf/util/build-id.h | |||
@@ -30,6 +30,8 @@ bool perf_session__read_build_ids(struct perf_session *session, bool with_hits); | |||
30 | int perf_session__write_buildid_table(struct perf_session *session, int fd); | 30 | int perf_session__write_buildid_table(struct perf_session *session, int fd); |
31 | int perf_session__cache_build_ids(struct perf_session *session); | 31 | int perf_session__cache_build_ids(struct perf_session *session); |
32 | 32 | ||
33 | char *build_id_cache__cachedir(const char *sbuild_id, const char *name, | ||
34 | bool is_kallsyms, bool is_vdso); | ||
33 | int build_id_cache__list_build_ids(const char *pathname, | 35 | int build_id_cache__list_build_ids(const char *pathname, |
34 | struct strlist **result); | 36 | struct strlist **result); |
35 | bool build_id_cache__cached(const char *sbuild_id); | 37 | bool build_id_cache__cached(const char *sbuild_id); |