hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/tools/perf/util/build-id.h
....@@ -6,14 +6,21 @@
66 #define SBUILD_ID_SIZE (BUILD_ID_SIZE * 2 + 1)
77
88 #include "tool.h"
9
-#include "namespaces.h"
109 #include <linux/types.h>
10
+
11
+struct build_id {
12
+ u8 data[BUILD_ID_SIZE];
13
+ size_t size;
14
+};
15
+
16
+struct nsinfo;
1117
1218 extern struct perf_tool build_id__mark_dso_hit_ops;
1319 struct dso;
1420 struct feat_fd;
1521
16
-int build_id__sprintf(const u8 *build_id, int len, char *bf);
22
+void build_id__init(struct build_id *bid, const u8 *data, size_t size);
23
+int build_id__sprintf(const struct build_id *build_id, char *bf);
1724 int sysfs__sprintf_build_id(const char *root_dir, char *sbuild_id);
1825 int filename__sprintf_build_id(const char *pathname, char *sbuild_id);
1926 char *build_id_cache__kallsyms_path(const char *sbuild_id, char *bf,
....@@ -23,11 +30,15 @@
2330 bool is_debug);
2431
2532 int build_id__mark_dso_hit(struct perf_tool *tool, union perf_event *event,
26
- struct perf_sample *sample, struct perf_evsel *evsel,
33
+ struct perf_sample *sample, struct evsel *evsel,
2734 struct machine *machine);
2835
2936 int dsos__hit_all(struct perf_session *session);
3037
38
+int perf_event__inject_buildid(struct perf_tool *tool, union perf_event *event,
39
+ struct perf_sample *sample, struct evsel *evsel,
40
+ struct machine *machine);
41
+
3142 bool perf_session__read_build_ids(struct perf_session *session, bool with_hits);
3243 int perf_session__write_buildid_table(struct perf_session *session,
3344 struct feat_fd *fd);