summaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-c2c.c
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2022-11-19 01:34:46 +0000
committerPaolo Bonzini <pbonzini@redhat.com>2022-12-02 13:22:33 -0500
commit75d7ba32f9829e778484cf6e96e6e8f80914b0b3 (patch)
tree84e0c2d67e2c6b35138bfd9ecf13e5e99677399b /tools/perf/builtin-c2c.c
parent7f2b47f22b825c16d9843e6e78bbb2370d2c31a0 (diff)
downloadlinux-75d7ba32f9829e778484cf6e96e6e8f80914b0b3.tar.bz2
perf tools: Use dedicated non-atomic clear/set bit helpers
Use the dedicated non-atomic helpers for {clear,set}_bit() and their test variants, i.e. the double-underscore versions. Depsite being defined in atomic.h, and despite the kernel versions being atomic in the kernel, tools' {clear,set}_bit() helpers aren't actually atomic. Move to the double-underscore versions so that the versions that are expected to be atomic (for kernel developers) can be made atomic without affecting users that don't want atomic operations. No functional change intended. Signed-off-by: Sean Christopherson <seanjc@google.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Message-Id: <20221119013450.2643007-6-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/perf/builtin-c2c.c')
-rw-r--r--tools/perf/builtin-c2c.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index a9190458d2d5..52d94c7dd836 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -230,7 +230,7 @@ static void c2c_he__set_cpu(struct c2c_hist_entry *c2c_he,
"WARNING: no sample cpu value"))
return;
- set_bit(sample->cpu, c2c_he->cpuset);
+ __set_bit(sample->cpu, c2c_he->cpuset);
}
static void c2c_he__set_node(struct c2c_hist_entry *c2c_he,
@@ -247,7 +247,7 @@ static void c2c_he__set_node(struct c2c_hist_entry *c2c_he,
if (WARN_ONCE(node < 0, "WARNING: failed to find node\n"))
return;
- set_bit(node, c2c_he->nodeset);
+ __set_bit(node, c2c_he->nodeset);
if (c2c_he->paddr != sample->phys_addr) {
c2c_he->paddr_cnt++;
@@ -2318,7 +2318,7 @@ static int setup_nodes(struct perf_session *session)
continue;
perf_cpu_map__for_each_cpu(cpu, idx, map) {
- set_bit(cpu.cpu, set);
+ __set_bit(cpu.cpu, set);
if (WARN_ONCE(cpu2node[cpu.cpu] != -1, "node/cpu topology bug"))
return -EINVAL;