Arnaldo Carvalho de Melo | 7b2567c | 2010-02-03 16:52:04 -0200 | [diff] [blame] | 1 | #ifndef PERF_BUILD_ID_H_ |
| 2 | #define PERF_BUILD_ID_H_ 1 |
| 3 | |
Masami Hiramatsu | d77fac7 | 2015-07-15 18:14:28 +0900 | [diff] [blame] | 4 | #define BUILD_ID_SIZE 20 |
| 5 | #define SBUILD_ID_SIZE (BUILD_ID_SIZE * 2 + 1) |
Jiri Olsa | 4383db8 | 2012-10-27 23:18:29 +0200 | [diff] [blame] | 6 | |
| 7 | #include "tool.h" |
Masami Hiramatsu | 8d8c8e4 | 2015-02-27 13:50:26 +0900 | [diff] [blame] | 8 | #include "strlist.h" |
Borislav Petkov | d944c4e | 2014-04-25 21:31:02 +0200 | [diff] [blame] | 9 | #include <linux/types.h> |
Arnaldo Carvalho de Melo | 7b2567c | 2010-02-03 16:52:04 -0200 | [diff] [blame] | 10 | |
Arnaldo Carvalho de Melo | 45694aa | 2011-11-28 08:30:20 -0200 | [diff] [blame] | 11 | extern struct perf_tool build_id__mark_dso_hit_ops; |
Jiri Olsa | 4383db8 | 2012-10-27 23:18:29 +0200 | [diff] [blame] | 12 | struct dso; |
Arnaldo Carvalho de Melo | 7b2567c | 2010-02-03 16:52:04 -0200 | [diff] [blame] | 13 | |
Jiri Olsa | ebb296c | 2012-10-27 23:18:28 +0200 | [diff] [blame] | 14 | int build_id__sprintf(const u8 *build_id, int len, char *bf); |
Masami Hiramatsu | 0b5a793 | 2015-08-15 20:42:59 +0900 | [diff] [blame] | 15 | int sysfs__sprintf_build_id(const char *root_dir, char *sbuild_id); |
| 16 | int filename__sprintf_build_id(const char *pathname, char *sbuild_id); |
| 17 | |
Arnaldo Carvalho de Melo | 3344996 | 2013-12-10 15:46:29 -0300 | [diff] [blame] | 18 | char *dso__build_id_filename(const struct dso *dso, char *bf, size_t size); |
Wang Nan | e7ee404 | 2016-02-05 14:01:27 +0000 | [diff] [blame] | 19 | bool dso__build_id_is_kmod(const struct dso *dso, char *bf, size_t size); |
Arnaldo Carvalho de Melo | b36f19d | 2010-05-20 12:15:33 -0300 | [diff] [blame] | 20 | |
Andrew Vagin | 54a3cf5 | 2012-08-07 16:56:05 +0400 | [diff] [blame] | 21 | int build_id__mark_dso_hit(struct perf_tool *tool, union perf_event *event, |
| 22 | struct perf_sample *sample, struct perf_evsel *evsel, |
| 23 | struct machine *machine); |
Namhyung Kim | e195fac | 2014-11-04 10:14:30 +0900 | [diff] [blame] | 24 | |
| 25 | int dsos__hit_all(struct perf_session *session); |
| 26 | |
| 27 | bool perf_session__read_build_ids(struct perf_session *session, bool with_hits); |
| 28 | int perf_session__write_buildid_table(struct perf_session *session, int fd); |
| 29 | int perf_session__cache_build_ids(struct perf_session *session); |
| 30 | |
Masami Hiramatsu | 8d8c8e4 | 2015-02-27 13:50:26 +0900 | [diff] [blame] | 31 | int build_id_cache__list_build_ids(const char *pathname, |
| 32 | struct strlist **result); |
Masami Hiramatsu | a50d11a | 2015-02-26 15:54:40 +0900 | [diff] [blame] | 33 | bool build_id_cache__cached(const char *sbuild_id); |
Masami Hiramatsu | e35f736 | 2015-02-10 18:18:51 +0900 | [diff] [blame] | 34 | int build_id_cache__add_s(const char *sbuild_id, |
Namhyung Kim | e195fac | 2014-11-04 10:14:30 +0900 | [diff] [blame] | 35 | const char *name, bool is_kallsyms, bool is_vdso); |
Masami Hiramatsu | e35f736 | 2015-02-10 18:18:51 +0900 | [diff] [blame] | 36 | int build_id_cache__remove_s(const char *sbuild_id); |
Namhyung Kim | 73c5d22 | 2014-11-07 22:57:56 +0900 | [diff] [blame] | 37 | void disable_buildid_cache(void); |
Namhyung Kim | e195fac | 2014-11-04 10:14:30 +0900 | [diff] [blame] | 38 | |
Arnaldo Carvalho de Melo | 7b2567c | 2010-02-03 16:52:04 -0200 | [diff] [blame] | 39 | #endif |