aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/flamegraph.py
diff options
context:
space:
mode:
authorHou Tao <[email protected]>2023-06-13 16:09:19 +0800
committerAlexei Starovoitov <[email protected]>2023-06-19 13:26:43 -0700
commitda77ae2b27ec73a644624a6d4bffc206e2df6bb8 (patch)
tree497632c6c324836e12a66a25df993208f78d4cb2 /tools/perf/scripts/python/flamegraph.py
parentea400d13fc92ec66578b068e661a162e01d4b641 (diff)
selftests/bpf: Ensure that next_cpu() returns a valid CPU number
When using option -a without --prod-affinity or --cons-affinity, if the number of producers and consumers is greater than the number of online CPUs, the benchmark will fail to run as shown below: $ getconf _NPROCESSORS_ONLN 8 $ ./bench bpf-loop -a -p9 Setting up benchmark 'bpf-loop'... setting affinity to CPU #8 failed: -22 Fix it by returning the remainder of next_cpu divided by the number of online CPUs in next_cpu(). Signed-off-by: Hou Tao <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions