Skip to contentSkip to conversation

perf tools: Make trace command to follow -m option

PATCH In review Jiri Olsa 3 participants 3 messages Nov 28, 2013 – Dec 4, 2013 perf events

lore
Share & tools
lore

Jiri Olsa

author
#0 lore raw

PATCH 1/1 perf tools: Make trace command to follow -m option

Currently trace command supports '-m' option, but does not follow its value and keeps the default.

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

Cc Corey Ashford <[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]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc David Ahern <[email protected]>
---
 tools/perf/builtin-trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-trace.c +1 -1
index e9f345e2..9f2a242 100644
@@ -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;
Signature · 1 line
1.8.3.1
Acked-by on v1 1/1
#1 lore raw
Quoted 25 lines · Jiri Olsa

Currently trace command supports '-m' option, but does not follow its value and keeps the default.

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

Cc Corey Ashford <[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]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc David Ahern <[email protected]>
---
  tools/perf/builtin-trace.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-trace.c +0 -0
index e9f345e2..9f2a242 100644

tools/perf/builtin-trace.c static int trace__run(struct trace *trace, int argc, const char **argv) · line 1896

Quoted 8 lines
tools/perf/builtin-trace.c +1 -1
@@ -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;
#2 lore raw

[tip:perf/core] perf trace: Honour -m option

In reply to Jiri Olsa
perf trace: Honour -m option
Commit-ID:  f885037ef6400ce4a4c122a88845dea2c9bca256
Gitweb:     http://git.kernel.org/tip/f885037ef6400ce4a4c122a88845dea2c9bca256
Author:     Jiri Olsa <[email protected]>
AuthorDate: Thu, 28 Nov 2013 17:57:22 +0100
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Mon, 2 Dec 2013 16:29:40 -0300

perf trace: Honour -m option

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.

---
 tools/perf/builtin-trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-trace.c +1 -1
index e9f345e2..9f2a242 100644
@@ -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;