perf tools: Convert getpagesize() uses to sysconf(_SC_GETPAGESIZE)
authorArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 14 Jan 2010 20:30:04 +0000 (18:30 -0200)
committerIngo Molnar <mingo@elte.hu>
Sat, 16 Jan 2010 09:58:46 +0000 (10:58 +0100)
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>
tools/perf/util/session.c
tools/perf/util/trace-event-info.c

index 604e14f6a6f901e412cf5db81334622d72eba33d..1951e330377c099ecd284e9a0b99b650bbf7b7a2 100644 (file)
@@ -384,7 +384,7 @@ int perf_session__process_events(struct perf_session *self,
 
        perf_event_ops__fill_defaults(ops);
 
-       page_size = getpagesize();
+       page_size = sysconf(_SC_PAGESIZE);
 
        head = self->header.data_offset;
 
index 407fd65b6cdb9dcaeef09426aa4108648a2a8618..5ea8973ad331d48e1d4d9e9c94cc65d27a816599 100644 (file)
@@ -515,7 +515,7 @@ int read_tracing_data(int fd, struct perf_event_attr *pattrs, int nb_events)
        write_or_die(buf, 1);
 
        /* save page_size */
-       page_size = getpagesize();
+       page_size = sysconf(_SC_PAGESIZE);
        write_or_die(&page_size, 4);
 
        read_header_files();