aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/perf/builtin-record.c7
-rw-r--r--tools/perf/util/header.c61
-rw-r--r--tools/perf/util/header.h2
3 files changed, 0 insertions, 70 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 83b308a035c2..1a7379674c29 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -446,13 +446,6 @@ static void atexit_header(void)
446 446
447 process_buildids(); 447 process_buildids();
448 perf_header__write(&session->header, output, true); 448 perf_header__write(&session->header, output, true);
449 } else {
450 int err;
451
452 err = event__synthesize_build_ids(process_synthesized_event,
453 session);
454 if (err < 0)
455 pr_err("Couldn't synthesize build ids.\n");
456 } 449 }
457} 450}
458 451
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 6227dc4cb2cf..2d1d97e0746d 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -1136,67 +1136,6 @@ int event__synthesize_build_id(struct dso *pos, u16 misc,
1136 return err; 1136 return err;
1137} 1137}
1138 1138
1139static int __event_synthesize_build_ids(struct list_head *head, u16 misc,
1140 event__handler_t process,
1141 struct machine *machine,
1142 struct perf_session *session)
1143{
1144 struct dso *pos;
1145
1146 dsos__for_each_with_build_id(pos, head) {
1147 int err;
1148 if (!pos->hit)
1149 continue;
1150
1151 err = event__synthesize_build_id(pos, misc, process,
1152 machine, session);
1153 if (err < 0)
1154 return err;
1155 }
1156
1157 return 0;
1158}
1159
1160int event__synthesize_build_ids(event__handler_t process,
1161 struct perf_session *session)
1162{
1163 int err = 0;
1164 u16 kmisc, umisc;
1165 struct machine *pos;
1166 struct rb_node *nd;
1167
1168 if (!dsos__read_build_ids(&session->header, true))
1169 return 0;
1170
1171 for (nd = rb_first(&session->machines); nd; nd = rb_next(nd)) {
1172 pos = rb_entry(nd, struct machine, rb_node);
1173 if (machine__is_host(pos)) {
1174 kmisc = PERF_RECORD_MISC_KERNEL;
1175 umisc = PERF_RECORD_MISC_USER;
1176 } else {
1177 kmisc = PERF_RECORD_MISC_GUEST_KERNEL;
1178 umisc = PERF_RECORD_MISC_GUEST_USER;
1179 }
1180
1181 err = __event_synthesize_build_ids(&pos->kernel_dsos, kmisc,
1182 process, pos, session);
1183 if (err == 0)
1184 err = __event_synthesize_build_ids(&pos->user_dsos, umisc,
1185 process, pos, session);
1186 if (err)
1187 break;
1188 }
1189
1190 if (err < 0) {
1191 pr_debug("failed to synthesize build ids\n");
1192 return err;
1193 }
1194
1195 dsos__cache_build_ids(&session->header);
1196
1197 return 0;
1198}
1199
1200int event__process_build_id(event_t *self, 1139int event__process_build_id(event_t *self,
1201 struct perf_session *session) 1140 struct perf_session *session)
1202{ 1141{
diff --git a/tools/perf/util/header.h b/tools/perf/util/header.h
index f39443db0706..402ac2454cf8 100644
--- a/tools/perf/util/header.h
+++ b/tools/perf/util/header.h
@@ -122,8 +122,6 @@ int event__synthesize_build_id(struct dso *pos, u16 misc,
122 event__handler_t process, 122 event__handler_t process,
123 struct machine *machine, 123 struct machine *machine,
124 struct perf_session *session); 124 struct perf_session *session);
125int event__synthesize_build_ids(event__handler_t process,
126 struct perf_session *session);
127int event__process_build_id(event_t *self, struct perf_session *session); 125int event__process_build_id(event_t *self, struct perf_session *session);
128 126
129#endif /* __PERF_HEADER_H */ 127#endif /* __PERF_HEADER_H */