summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/perf/util/evlist.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index 8eb92cf..7d88327 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;
OpenPOWER on IntegriCloud