Skip to content

Commit

Permalink
perf trace: Handle missing HUGEPAGE defines
Browse files Browse the repository at this point in the history
Needed for compile on Fedora 12 which goes back to the 2.6.32 kernel.
Might be needed for RHEL6. I use F12 to compile static binaries for
Wind River Linux 4.3.

Signed-off-by: David Ahern <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
  • Loading branch information
dsahern authored and acmel committed Aug 30, 2013
1 parent bdc8966 commit f2935f3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/perf/builtin-trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ static size_t syscall_arg__scnprintf_mmap_flags(char *bf, size_t size, unsigned
P_MMAP_FLAG(FILE);
P_MMAP_FLAG(FIXED);
P_MMAP_FLAG(GROWSDOWN);
#ifdef MAP_HUGETLB
P_MMAP_FLAG(HUGETLB);
#endif
P_MMAP_FLAG(LOCKED);
P_MMAP_FLAG(NONBLOCK);
P_MMAP_FLAG(NORESERVE);
Expand Down Expand Up @@ -110,8 +112,12 @@ static size_t syscall_arg__scnprintf_madvise_behavior(char *bf, size_t size, uns
#endif
P_MADV_BHV(MERGEABLE);
P_MADV_BHV(UNMERGEABLE);
#ifdef MADV_HUGEPAGE
P_MADV_BHV(HUGEPAGE);
#endif
#ifdef MADV_NOHUGEPAGE
P_MADV_BHV(NOHUGEPAGE);
#endif
#ifdef MADV_DONTDUMP
P_MADV_BHV(DONTDUMP);
#endif
Expand Down

0 comments on commit f2935f3

Please sign in to comment.