perf/x86/intel: Optimize intel_get_excl_constraints()
authorPeter Zijlstra <peterz@infradead.org>
Thu, 14 Mar 2019 12:01:14 +0000 (13:01 +0100)
committerIngo Molnar <mingo@kernel.org>
Wed, 3 Apr 2019 07:25:31 +0000 (09:25 +0200)
commitc090cb70c6152fc97ce91242789d7c322109f1a1
treeaa422c4c19f89076a054d65b5c3087a764805066
parent1f6a1e2d7d7135280125418b25d35aebd6fa0952
perf/x86/intel: Optimize intel_get_excl_constraints()

Avoid the POPCNT  by noting we can decrement the weight for each
cleared bit.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Stephane Eranian <eranian@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/events/intel/core.c