From: Arnaldo Carvalho de Melo Date: Fri, 22 Jan 2016 21:41:00 +0000 (-0300) Subject: perf inject: Make sure mmap records are ordered when injecting build_ids X-Git-Tag: v4.6-rc1~165^2~68^2~3 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=921f3fadbc48c7c3799b415b895297cd476cf7f1;p=linux.git perf inject: Make sure mmap records are ordered when injecting build_ids To make sure the mmap records are ordered correctly and so that the correct especially due to jitted code mmaps. We cannot generate the buildid hit list and inject the jit mmaps (will come right after this patch) in at the same time for now. Signed-off-by: Stephane Eranian Cc: Adrian Hunter Cc: Andi Kleen Cc: Carl Love Cc: David Ahern Cc: Jiri Olsa Cc: John McCutchan Cc: Namhyung Kim Cc: Pawel Moll Cc: Peter Zijlstra Cc: Sonny Rao Cc: Sukadev Bhattiprolu Link: http://lkml.kernel.org/r/1448874143-7269-3-git-send-email-eranian@google.com [ Carved out from a larger patch ] Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c index 0022e02ed31a..6567baedd92a 100644 --- a/tools/perf/builtin-inject.c +++ b/tools/perf/builtin-inject.c @@ -755,6 +755,17 @@ int cmd_inject(int argc, const char **argv, const char *prefix __maybe_unused) if (inject.session == NULL) return -1; + if (inject.build_ids) { + /* + * to make sure the mmap records are ordered correctly + * and so that the correct especially due to jitted code + * mmaps. We cannot generate the buildid hit list and + * inject the jit mmaps at the same time for now. + */ + inject.tool.ordered_events = true; + inject.tool.ordering_requires_timestamps = true; + } + ret = symbol__init(&inject.session->header.env); if (ret < 0) goto out_delete;