aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/session.c')
-rw-r--r--tools/perf/util/session.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 378ac5422bcf..fd1c5a39a5bb 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -69,9 +69,6 @@ struct perf_session *perf_session__new(const char *filename, int mode, bool forc
69 self->unknown_events = 0; 69 self->unknown_events = 0;
70 map_groups__init(&self->kmaps); 70 map_groups__init(&self->kmaps);
71 71
72 if (perf_session__create_kernel_maps(self) < 0)
73 goto out_delete;
74
75 if (mode == O_RDONLY && perf_session__open(self, force) < 0) 72 if (mode == O_RDONLY && perf_session__open(self, force) < 0)
76 goto out_delete; 73 goto out_delete;
77 74
@@ -268,8 +265,11 @@ int perf_header__read_build_ids(int input, u64 offset, u64 size)
268 head = &dsos__kernel; 265 head = &dsos__kernel;
269 266
270 dso = __dsos__findnew(head, filename); 267 dso = __dsos__findnew(head, filename);
271 if (dso != NULL) 268 if (dso != NULL) {
272 dso__set_build_id(dso, &bev.build_id); 269 dso__set_build_id(dso, &bev.build_id);
270 if (head == &dsos__kernel && filename[0] == '[')
271 dso->kernel = 1;
272 }
273 273
274 offset += bev.header.size; 274 offset += bev.header.size;
275 } 275 }