diff options
-rw-r--r-- | tools/perf/util/evlist.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 8eb92cf5d552..7d88327d94a9 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -909,6 +909,8 @@ static size_t perf_evlist__mmap_size(unsigned long pages) } pages = (max * 1024) / page_size; + if (!is_power_of_2(pages)) + pages = rounddown_pow_of_two(pages); } else if (!is_power_of_2(pages)) return 0; |