perf trace: Honour -m option
authorJiri Olsa <[email protected]>
Thu, 28 Nov 2013 16:57:22 +0000 (17:57 +0100)
committerArnaldo Carvalho de Melo <[email protected]>
Mon, 2 Dec 2013 19:29:40 +0000 (16:29 -0300)
Currently trace command supports '-m' option, but does not honours its
value and keeps the default.

Changing the perf_evlist__mmap function call to use the '-m' configured
value.

Signed-off-by: Jiri Olsa <[email protected]>
Acked-by: David Ahern <[email protected]>
Cc: Corey Ashford <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/builtin-trace.c

index e9f345e2551a18be6e5a17af51b8547f89c5ddbb..9f2a242fa79c13dcc5b81b09472602ba09ca510e 100644 (file)
@@ -1890,7 +1890,7 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
        if (err < 0)
                goto out_error_open;
 
-       err = perf_evlist__mmap(evlist, UINT_MAX, false);
+       err = perf_evlist__mmap(evlist, trace->opts.mmap_pages, false);
        if (err < 0) {
                fprintf(trace->output, "Couldn't mmap the events: %s\n", strerror(errno));
                goto out_close_evlist;