Skip to content

Commit 789688f

Browse files
zanussiacmel
authored andcommitted
perf/live: don't synthesize build ids at the end of a live mode trace
It doesn't really make sense to record the build ids at the end of a live mode session - live mode samples need that information during the trace rather than at the end. Leave event__synthesize_build_id() in place, however; we'll still be using that to synthesize build ids in a more timely fashion in a future patch. Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Steven Rostedt <rostedt@goodmis.org> LKML-Reference: <1272696080-16435-2-git-send-email-tzanussi@gmail.com> Signed-off-by: Tom Zanussi <tzanussi@gmail.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent fb72014 commit 789688f

3 files changed

Lines changed: 0 additions & 70 deletions

File tree

‎tools/perf/builtin-record.c‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -446,13 +446,6 @@ static void atexit_header(void)
446446

447447
process_buildids();
448448
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");
456449
}
457450
}
458451

‎tools/perf/util/header.c‎

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,67 +1136,6 @@ int event__synthesize_build_id(struct dso *pos, u16 misc,
11361136
return err;
11371137
}
11381138

1139-
static 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-
1160-
int 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-
12001139
int event__process_build_id(event_t *self,
12011140
struct perf_session *session)
12021141
{

‎tools/perf/util/header.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,6 @@ int event__synthesize_build_id(struct dso *pos, u16 misc,
122122
event__handler_t process,
123123
struct machine *machine,
124124
struct perf_session *session);
125-
int event__synthesize_build_ids(event__handler_t process,
126-
struct perf_session *session);
127125
int event__process_build_id(event_t *self, struct perf_session *session);
128126

129127
#endif /* __PERF_HEADER_H */

0 commit comments

Comments
 (0)