aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-annotate.c
diff options
context:
space:
mode:
authorAdrian Hunter <[email protected]>2013-12-09 13:18:39 +0000
committerArnaldo Carvalho de Melo <[email protected]>2013-12-09 18:18:05 +0000
commit1dbfa9387b397f2c4b8c65411b3e3fdf9284d2b1 (patch)
treee74ddb41f0a7e8829d144dbe01dc1afaa150a832 /tools/perf/builtin-annotate.c
parentperf evlist: Fix max mmap_pages (diff)
downloadkernel-1dbfa9387b397f2c4b8c65411b3e3fdf9284d2b1.tar.gz
kernel-1dbfa9387b397f2c4b8c65411b3e3fdf9284d2b1.zip
perf evlist: Fix mmap pages rounding to power of 2
'next_pow2()' only works for 'unsigned int' but the argument is 'unsigned long'. Checking for values less than (1 << 31) ensures that 'next_pow2()' is not passed a value out of range but lets anything else go through unvalidated. As a result mmap_pages of zero is used e.g. perf record -v -m2147483649 uname mmap size 0B failed to mmap with 22 (Invalid argument) Fixed: perf record -m2147483649 uname rounding mmap pages size to 17592186044416 bytes (4294967296 pages) Invalid argument for --mmap_pages/-m Signed-off-by: Adrian Hunter <[email protected]> Acked-by: Jiri Olsa <[email protected]> Cc: David Ahern <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/builtin-annotate.c')
0 files changed, 0 insertions, 0 deletions