diff options
author | Jiri Olsa <jolsa@redhat.com> | 2013-09-01 12:36:12 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-10-09 11:24:10 -0300 |
commit | 994a1f78b191df0c9d6caca3f3afb03e247aff26 (patch) | |
tree | 387ca6391f946bbbca73a579105ee0bc2ba76ad8 /tools/perf/util/evlist.h | |
parent | f37376cd721a539ac398cbb7718b72fce83cd49b (diff) | |
download | op-kernel-dev-994a1f78b191df0c9d6caca3f3afb03e247aff26.zip op-kernel-dev-994a1f78b191df0c9d6caca3f3afb03e247aff26.tar.gz |
perf tools: Check mmap pages value early
Move the check of the mmap_pages value to the options parsing time, so
we could rely on this value on other parts of code.
Related changes come in the next patches.
Also changes perf_evlist::mmap_len to proper size_t type.
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1378031796-17892-2-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/evlist.h')
-rw-r--r-- | tools/perf/util/evlist.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h index 880d713..4edb500 100644 --- a/tools/perf/util/evlist.h +++ b/tools/perf/util/evlist.h @@ -31,7 +31,7 @@ struct perf_evlist { int nr_groups; int nr_fds; int nr_mmaps; - int mmap_len; + size_t mmap_len; int id_pos; int is_pos; u64 combined_sample_type; @@ -103,6 +103,10 @@ int perf_evlist__prepare_workload(struct perf_evlist *evlist, bool want_signal); int perf_evlist__start_workload(struct perf_evlist *evlist); +int perf_evlist__parse_mmap_pages(const struct option *opt, + const char *str, + int unset); + int perf_evlist__mmap(struct perf_evlist *evlist, unsigned int pages, bool overwrite); void perf_evlist__munmap(struct perf_evlist *evlist); |