perf inject: Make sure mmap records are ordered when injecting build_ids
authorArnaldo Carvalho de Melo <[email protected]>
Fri, 22 Jan 2016 21:41:00 +0000 (18:41 -0300)
committerArnaldo Carvalho de Melo <[email protected]>
Fri, 5 Feb 2016 12:46:45 +0000 (09:46 -0300)
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 <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Carl Love <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: John McCutchan <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Pawel Moll <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Sonny Rao <[email protected]>
Cc: Sukadev Bhattiprolu <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
[ Carved out from a larger patch ]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/builtin-inject.c

index 0022e02ed31a7034b9286884ab87c4c131e41fa3..6567baedd92a8d7b4ce0f3f465421b445e3c3438 100644 (file)
@@ -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;