Skip to content

Commit

Permalink
perf tools: Convert getpagesize() uses to sysconf(_SC_GETPAGESIZE)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arnaldo Carvalho de Melo authored and Ingo Molnar committed Jan 16, 2010
1 parent ba21594 commit 1b75962
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/perf/util/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion tools/perf/util/trace-event-info.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 1b75962

Please sign in to comment.