summaryrefslogtreecommitdiffstats
path: root/tools/include
diff options
context:
space:
mode:
authorYury Norov <yury.norov@gmail.com>2022-01-23 10:38:43 -0800
committerArnaldo Carvalho de Melo <acme@redhat.com>2022-02-15 17:15:31 -0300
commit1006c5c1698618b5c7fc1ec57bfffef899d95334 (patch)
treef524c009813cba2016af4d9f614c7b392dfe26a2 /tools/include
parent3402ae0a2e05e05254960581ae53d99118e1e134 (diff)
downloadlinux-1006c5c1698618b5c7fc1ec57bfffef899d95334.tar.bz2
perf c2c: Replace bitmap_weight() with bitmap_empty() where appropriate
Some code in builtin-c2c.c calls bitmap_weight() to check if any bit of a given bitmap is set. It's better to use bitmap_empty() in that case because bitmap_empty() stops traversing the bitmap as soon as it finds first set bit, while bitmap_weight() counts all bits unconditionally. Signed-off-by: Yury Norov <yury.norov@gmail.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Alexey Klimov <aklimov@redhat.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: David Laight <david.laight@aculab.com> Cc: Dennis Zhou <dennis@kernel.org> Cc: Emil Renner Berthing <kernel@esmil.dk> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Joe Perches <joe@perches.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Cc: Michał Mirosław <mirq-linux@rere.qmqm.pl> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Link: http://lore.kernel.org/lkml/20220123183925.1052919-13-yury.norov@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/include')
0 files changed, 0 insertions, 0 deletions