* [tip:perf/core] perf machine: Stop accessing atomic_t:: counter directly
@ 2015-05-20 12:21 tip-bot for Arnaldo Carvalho de Melo
0 siblings, 0 replies; only message in thread
From: tip-bot for Arnaldo Carvalho de Melo @ 2015-05-20 12:21 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, bp, jolsa, namhyung, dzickus, fweisbec,
adrian.hunter, mingo, acme, eranian, tglx, hpa, dsahern
Commit-ID: 59a51c1dc9fbb3fb4af928b852d7b35df83edd74
Gitweb: http://git.kernel.org/tip/59a51c1dc9fbb3fb4af928b852d7b35df83edd74
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
AuthorDate: Fri, 15 May 2015 15:32:55 -0300
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 15 May 2015 15:32:55 -0300
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>
---
tools/perf/util/machine.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index 34bf89f..daa5591 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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-05-20 12:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-20 12:21 [tip:perf/core] perf machine: Stop accessing atomic_t:: counter directly tip-bot for Arnaldo Carvalho de Melo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome