Message ID | 20231102175735.2272696-18-irogers@google.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp534787vqu; Thu, 2 Nov 2023 11:00:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IErLPy8W8xINaBo43zPHZ247Ja3bSC5aCfaGKa85DXwl3x4zuwwekcJTsxNr8yU6bEwkF2B X-Received: by 2002:a05:6a00:14cc:b0:6c3:45bc:41f8 with SMTP id w12-20020a056a0014cc00b006c345bc41f8mr1341136pfu.33.1698948056644; Thu, 02 Nov 2023 11:00:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698948056; cv=none; d=google.com; s=arc-20160816; b=blgDPikFUB4sFYOh19BYyaYZlRzCtzagrsN8Z0B6unRMNFprFAXyRVaVM2uwAaizaU 0ywJL+CfCJa6EfuTBKNGFIan0sBhpP3DX7jSBeU7yZHBmidOh4JbeN/l+xZGHqOZeyXN QU/RSFDzW4+hJ0uvvNSvgY3gj2D19HjOOryHbPjDAKKUQs5pal0JGNFDXVn/ioEewsjz HHhECnhR3XNfjOdqK/mznP3hFlU41301XfHL12Tfgkuk8rqO73F449vF577TRx229mVH 6tQCoU2PBpgW2vORtpvkVjJgG+aJMmRzL/8ZA/SChkGl7yS7kd3DNq6eNdJsdO/YsL1i RJ8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:from:subject:references:mime-version :message-id:in-reply-to:date:dkim-signature; bh=2wyNJQL6CFNlRT5cB8RLt/NVGX6O9HhWy8v7f/NT0so=; fh=z1KcSqUpYQ9oC4uLSeIkhAYTnJ2bvP0QbNW2xqV5NqA=; b=FxewwqQ6+9kcN4ps6ETjdz2Ot9nFB71Tlzq6HT/mGSa1JhOJEedfbQcR5IANVjsRNX YT998mmrPG/krXS3121nxOxxw76Dp9xawc7qMfWwA8Z8rmX3uyN8wdg6tG6rFyU3TXjT qbXQAREiTyYMuSGL400NxIGNXh1ZtN+JziJyLJoLlWGpN128pcLQocl4c91HRDLDXPLn oq4bfPN7RST0xKyd40LkrwJ6iif9DWdp1hh/sgRWtvxQ5/mxwfsPJ4iCuhypzhU2KOxq 0tsNyOWyJsGj9uY9CNBH/CQrt2somqnJlYUh4Y4pPt/ZRsX+3GAdiRoaRYdWuWGG1H0K ZRlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="J4/rq3Gf"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id i67-20020a639d46000000b005b9a149e61esi51015pgd.649.2023.11.02.11.00.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 11:00:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="J4/rq3Gf"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 17B6882155E3; Thu, 2 Nov 2023 11:00:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377268AbjKBR7g (ORCPT <rfc822;heyuhang3455@gmail.com> + 35 others); Thu, 2 Nov 2023 13:59:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377186AbjKBR65 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 2 Nov 2023 13:58:57 -0400 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FD8BD43 for <linux-kernel@vger.kernel.org>; Thu, 2 Nov 2023 10:58:36 -0700 (PDT) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-5af9b0850fdso17011137b3.1 for <linux-kernel@vger.kernel.org>; Thu, 02 Nov 2023 10:58:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1698947915; x=1699552715; darn=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=2wyNJQL6CFNlRT5cB8RLt/NVGX6O9HhWy8v7f/NT0so=; b=J4/rq3GfGSJmb3gADePg0FlMl9oi2h0BAEhZI7ydS69Tt7/lUZYn1m6WER38PmoaIi SCgU5uW9O/w5dqnAJgTyTkUf8w7fpTk7hiri3Rsd/nNug21HcABFykBIkTU6mX7oX78j nde98Rt9QJmKiuEBOgDqSmvanWO3HMMUQ+Jc4EcPuNlAxqDZpzL1j4oYezLdfWpXNH2L ZPbV1+W7tc0y0jJlkUR2QVUMAXBMJqwzUIKOL74HEgWaakcqAn0i+XWV0aVvJT1Mobx7 CTXCBkxy/o8M1zwEvdp9fQg9s8RMaKQU9kF5UNfqQyNAO8b1Xm5GnXXl7f5ENN/HCUIS HLgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698947915; x=1699552715; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2wyNJQL6CFNlRT5cB8RLt/NVGX6O9HhWy8v7f/NT0so=; b=jFRALHqRP8Fen8ipTPRZW+HLmQO4BgG7CEypneztjHUr72unoF39FvukWDEeBJ/SU0 W+Es+p3Tpu11AO94EFy9+I5C4rGgMPrhAhsvkJzWzLxBrF/ho8wQu/EWseWhaFfjacrw JXwl9k7IOgB3fIaRxWU6moEAnF0KJl06XYRdCZk8CqWRv59JltiDv9exyYGYhxNlxT2W oFOeIHFTcNJIMYOhK7PKS1DdD4S18SvWh80KYYfErU8cIzGNSo2FXlA7AajLZN3u1V7K etk26ViwisDrqwmkVujDzM9nTRtlqUXOy9OD0P9eJxWhoxSpVmn5IAZQGubmOx9izmJh m2bQ== X-Gm-Message-State: AOJu0Yzomvq3n5hNIN9XmkkZlWvA+XbnxrB/tGKBG8FWvmWuQaoCs/Pa mS8vCk68p33t+sLvxJLA9ZdSJCV9nhsR X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:bb34:df9c:836c:afca]) (user=irogers job=sendgmr) by 2002:a05:6902:1083:b0:d9a:c3b8:4274 with SMTP id v3-20020a056902108300b00d9ac3b84274mr460458ybu.7.1698947915222; Thu, 02 Nov 2023 10:58:35 -0700 (PDT) Date: Thu, 2 Nov 2023 10:56:59 -0700 In-Reply-To: <20231102175735.2272696-1-irogers@google.com> Message-Id: <20231102175735.2272696-18-irogers@google.com> Mime-Version: 1.0 References: <20231102175735.2272696-1-irogers@google.com> X-Mailer: git-send-email 2.42.0.869.gea05f2083d-goog Subject: [PATCH v4 17/53] perf thread: Add missing RC_CHK_EQUAL From: Ian Rogers <irogers@google.com> To: Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>, Arnaldo Carvalho de Melo <acme@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>, Ian Rogers <irogers@google.com>, Adrian Hunter <adrian.hunter@intel.com>, Nick Terrell <terrelln@fb.com>, Kan Liang <kan.liang@linux.intel.com>, Andi Kleen <ak@linux.intel.com>, Kajol Jain <kjain@linux.ibm.com>, Athira Rajeev <atrajeev@linux.vnet.ibm.com>, Huacai Chen <chenhuacai@kernel.org>, Masami Hiramatsu <mhiramat@kernel.org>, Vincent Whitchurch <vincent.whitchurch@axis.com>, "Steinar H. Gunderson" <sesse@google.com>, Liam Howlett <liam.howlett@oracle.com>, Miguel Ojeda <ojeda@kernel.org>, Colin Ian King <colin.i.king@gmail.com>, Dmitrii Dolgov <9erthalion6@gmail.com>, Yang Jihong <yangjihong1@huawei.com>, Ming Wang <wangming01@loongson.cn>, James Clark <james.clark@arm.com>, K Prateek Nayak <kprateek.nayak@amd.com>, Sean Christopherson <seanjc@google.com>, Leo Yan <leo.yan@linaro.org>, Ravi Bangoria <ravi.bangoria@amd.com>, German Gomez <german.gomez@arm.com>, Changbin Du <changbin.du@huawei.com>, Paolo Bonzini <pbonzini@redhat.com>, Li Dong <lidong@vivo.com>, Sandipan Das <sandipan.das@amd.com>, liuwenyu <liuwenyu7@huawei.com>, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 02 Nov 2023 11:00:49 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781476157594367269 X-GMAIL-MSGID: 1781476157594367269 |
Series |
Improvements to memory use
|
|
Commit Message
Ian Rogers
Nov. 2, 2023, 5:56 p.m. UTC
Comparing pointers without RC_CHK_ACCESS means the indirect object
will be compared rather than the underlying maps when REFCNT_CHECKING
is enabled. Fix by adding missing RC_CHK_EQUAL.
Signed-off-by: Ian Rogers <irogers@google.com>
---
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 fe5e6991ae4b..b9c2039c4230 100644 --- a/tools/perf/util/thread.c +++ b/tools/perf/util/thread.c @@ -385,7 +385,7 @@ static int thread__clone_maps(struct thread *thread, struct thread *parent, bool if (thread__pid(thread) == thread__pid(parent)) return thread__prepare_access(thread); - if (thread__maps(thread) == thread__maps(parent)) { + if (RC_CHK_EQUAL(thread__maps(thread), thread__maps(parent))) { pr_debug("broken map groups on thread %d/%d parent %d/%d\n", thread__pid(thread), thread__tid(thread), thread__pid(parent), thread__tid(parent));