diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-10-06 14:57:10 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-10-06 16:33:14 -0300 |
commit | 0c1fe6b2f30fa275d939071293b6e28771283f6d (patch) | |
tree | ebb758186c877498940002396fd39916bc831da1 /tools/perf/util/session.c | |
parent | 6e92349d5a814a3f633a43d9d6bd3b199ef3ad72 (diff) | |
download | linux-0c1fe6b2f30fa275d939071293b6e28771283f6d.tar.gz linux-0c1fe6b2f30fa275d939071293b6e28771283f6d.tar.bz2 linux-0c1fe6b2f30fa275d939071293b6e28771283f6d.zip |
perf tools: Have the page size value available for all tools
Its such a common need that we might as well have a global with that
value.
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-mwfqji9f17k5j81l1404dk3q@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/session.c')
-rw-r--r-- | tools/perf/util/session.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 8cdd23239c90..15abe40dc702 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -1375,15 +1375,13 @@ int __perf_session__process_events(struct perf_session *session, { u64 head, page_offset, file_offset, file_pos, progress_next; int err, mmap_prot, mmap_flags, map_idx = 0; - size_t page_size, mmap_size; + size_t mmap_size; char *buf, *mmaps[8]; union perf_event *event; uint32_t size; perf_tool__fill_defaults(tool); - page_size = sysconf(_SC_PAGESIZE); - page_offset = page_size * (data_offset / page_size); file_offset = page_offset; head = data_offset - page_offset; |