summaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo2015-05-15 20:32:55 +0200
committerArnaldo Carvalho de Melo2015-05-15 20:32:55 +0200
commit59a51c1dc9fbb3fb4af928b852d7b35df83edd74 (patch)
tree99e2b00a4edb911a46578c9279264848f6e384ef /tools/perf
parentperf tools: Use atomic.h for the map_groups refcount (diff)
downloadkernel-qcow2-linux-59a51c1dc9fbb3fb4af928b852d7b35df83edd74.tar.gz
kernel-qcow2-linux-59a51c1dc9fbb3fb4af928b852d7b35df83edd74.tar.xz
kernel-qcow2-linux-59a51c1dc9fbb3fb4af928b852d7b35df83edd74.zip
perf machine: Stop accessing atomic_t::counter directly
Use atomic_read(&counter) instead. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Borislav Petkov <bp@suse.de> Cc: David Ahern <dsahern@gmail.com> Cc: Don Zickus <dzickus@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-k3hvfvpaut8wp02lzq27muhb@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/util/machine.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 34bf89f7f4f3..daa55910ff28 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -1311,7 +1311,7 @@ static void __machine__remove_thread(struct machine *machine, struct thread *th,
if (machine->last_match == th)
machine->last_match = NULL;
- BUG_ON(th->refcnt.counter == 0);
+ BUG_ON(atomic_read(&th->refcnt) == 0);
if (lock)
pthread_rwlock_wrlock(&machine->threads_lock);
rb_erase(&th->rb_node, &machine->threads);