diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-01-14 15:30:04 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-01-16 04:58:46 -0500 |
commit | 1b75962e92d48a41019d4b440e221638aa2a7238 (patch) | |
tree | df87a4cdb52038593f09d0c38d19a7a2ccec0735 /tools | |
parent | ba21594cddee0a3af582971656702b1c4509d8f5 (diff) |
perf tools: Convert getpagesize() uses to sysconf(_SC_GETPAGESIZE)
Using the more portable and equivalent sysconf call.
Reported-by: Aristeu Rozanski <aris@redhat.com>
Reported-by: Ulrich Drepper <drepper@redhat.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Aristeu Rozanski <aris@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ulrich Drepper <drepper@redhat.com>
LKML-Reference: <1263501006-14185-1-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/session.c | 2 | ||||
-rw-r--r-- | tools/perf/util/trace-event-info.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 604e14f6a6f9..1951e330377c 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c | |||
@@ -384,7 +384,7 @@ int perf_session__process_events(struct perf_session *self, | |||
384 | 384 | ||
385 | perf_event_ops__fill_defaults(ops); | 385 | perf_event_ops__fill_defaults(ops); |
386 | 386 | ||
387 | page_size = getpagesize(); | 387 | page_size = sysconf(_SC_PAGESIZE); |
388 | 388 | ||
389 | head = self->header.data_offset; | 389 | head = self->header.data_offset; |
390 | 390 | ||
diff --git a/tools/perf/util/trace-event-info.c b/tools/perf/util/trace-event-info.c index 407fd65b6cdb..5ea8973ad331 100644 --- a/tools/perf/util/trace-event-info.c +++ b/tools/perf/util/trace-event-info.c | |||
@@ -515,7 +515,7 @@ int read_tracing_data(int fd, struct perf_event_attr *pattrs, int nb_events) | |||
515 | write_or_die(buf, 1); | 515 | write_or_die(buf, 1); |
516 | 516 | ||
517 | /* save page_size */ | 517 | /* save page_size */ |
518 | page_size = getpagesize(); | 518 | page_size = sysconf(_SC_PAGESIZE); |
519 | write_or_die(&page_size, 4); | 519 | write_or_die(&page_size, 4); |
520 | 520 | ||
521 | read_header_files(); | 521 | read_header_files(); |