From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752712AbbERAnx (ORCPT ); Sun, 17 May 2015 20:43:53 -0400 Received: from LGEMRELSE6Q.lge.com ([156.147.1.121]:56608 "EHLO lgemrelse6q.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752596AbbERAnI (ORCPT ); Sun, 17 May 2015 20:43:08 -0400 X-Original-SENDERIP: 10.177.220.203 X-Original-MAILFROM: namhyung@kernel.org From: Namhyung Kim To: Arnaldo Carvalho de Melo Cc: Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , David Ahern , Adrian Hunter , Andi Kleen , Frederic Weisbecker , Stephane Eranian Subject: [PATCH Not-for-merge 40/40] perf tools: Disable thread refcount due to bug Date: Mon, 18 May 2015 09:30:55 +0900 Message-Id: <1431909055-21442-41-git-send-email-namhyung@kernel.org> X-Mailer: git-send-email 2.4.0 In-Reply-To: <1431909055-21442-1-git-send-email-namhyung@kernel.org> References: <1431909055-21442-1-git-send-email-namhyung@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This makes thread mg sharing test failed due to not decrement thread->refcnt on thread__put(). Not-signed-off-by: Namhyung Kim --- tools/perf/util/thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c index 702f12dc5a90..dc5ec9a5cca1 100644 --- a/tools/perf/util/thread.c +++ b/tools/perf/util/thread.c @@ -163,7 +163,7 @@ struct thread *thread__get(struct thread *thread) void thread__put(struct thread *thread) { - if (thread && atomic_dec_and_test(&thread->refcnt)) { + if (thread && atomic_dec_and_test(&thread->refcnt) && 0) { if (!RB_EMPTY_NODE(&thread->rb_node)) { struct machine *machine = thread->mg->machine; -- 2.4.0