perf record: Stop intercepting events, use postprocessing to get build-ids
We want to stream events as fast as possible to perf.data, and also in the future we want to have splice working, when no interception will be possible. Using build_id__mark_dso_hit_ops to create the list of DSOs that back MMAPs we also optimize disk usage in the build-id cache by only caching DSOs that had hits. Suggested-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> LKML-Reference: <1265223128-11786-6-git-send-email-acme@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
committed by
Ingo Molnar
parent
7b2567c1f5
commit
6122e4e4f5
@@ -205,8 +205,11 @@ static int __dsos__write_buildid_table(struct list_head *head, u16 misc, int fd)
|
||||
dsos__for_each_with_build_id(pos, head) {
|
||||
int err;
|
||||
struct build_id_event b;
|
||||
size_t len = pos->long_name_len + 1;
|
||||
size_t len;
|
||||
|
||||
if (!pos->hit)
|
||||
continue;
|
||||
len = pos->long_name_len + 1;
|
||||
len = ALIGN(len, NAME_ALIGN);
|
||||
memset(&b, 0, sizeof(b));
|
||||
memcpy(&b.build_id, pos->build_id, sizeof(pos->build_id));
|
||||
@@ -371,7 +374,7 @@ static int perf_header__adds_write(struct perf_header *self, int fd)
|
||||
u64 sec_start;
|
||||
int idx = 0, err;
|
||||
|
||||
if (dsos__read_build_ids())
|
||||
if (dsos__read_build_ids(true))
|
||||
perf_header__set_feat(self, HEADER_BUILD_ID);
|
||||
|
||||
nr_sections = bitmap_weight(self->adds_features, HEADER_FEAT_BITS);
|
||||
|
||||
Reference in New Issue
Block a user