Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2185011rda; Tue, 24 Oct 2023 15:24:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFIBQuci3zftkyOEHvyt9B5zoktBPTwZY9CXfdq+CjeHXmBj0UIKQbkzdZkJqw0eglYdyu9 X-Received: by 2002:a92:cb0a:0:b0:34c:cf1f:2a4a with SMTP id s10-20020a92cb0a000000b0034ccf1f2a4amr12505462ilo.4.1698186295191; Tue, 24 Oct 2023 15:24:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698186295; cv=none; d=google.com; s=arc-20160816; b=DjMDoocCoicsRmgWB7ENd0pwyicta9iROiPVW63E0N8+rmCn1fnL4MFQSs3C6ZlYPr Bgxm9cmH1tjF6cN7VF/O8+0573K4hnR0OIwDpNEYNcQS1DCMpAV4+oVv1jgOD0jCENSi IclKo76EfmrIyS44MUz/+MdGVJ8EvBV2e437X7EObnQ0Bdi1hvgwSIXf0tD2J2tjky7y aCjcIY+yfE+o6r456QLfAxJfVBHOfSuHj6kFLIj6f1Ch3fTNwtXK5+aca7GX9zXjJ9ts iDxgNiiXF41pOzB8wvd5LXdwFx6huQSLKILRigAND1sAFhH1Cfx7nOP2naiKTGJ5bIY7 CPyA== 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=IMICwswuJ/vFGwUP8a8fOw6frHIgUKsDaScdLo+z8js=; fh=NAro5oTsDEB2Or99ABwb774QJkwQSkr6EoLVqn/Yde0=; b=CRM7zuEERgoFrdH69tj7UT86G4drFOWdjDRrO2dpTQRKglvj1QM7mj/AjoTo8XcMg2 8OHf7asX68NGej2Cn0EjHfrFpetdCIDWOtGsHjvoEORAijgJheX3pYODRu4z6SZCbYA1 HnQrBrAdLID+obCzVx/M+vxfbThysaP6lfkimOySkLq8KgjWeQVVd03T5Rla3W3JGNct nDvCKqHtBd+sB0lm09bg2bGyekKAS8dAQM5MQdwqZuCAO3QLZdnnb1U+2nBuLSvStRSO rmuoK2Sb7Mtxs9UW2B3QJsbi7j+PyZv5ykgXjO7vkXc9voFLFStL50uFK1aFYAtL3QTN fR/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=yzf29tqS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id h62-20020a638341000000b005a9fde46fa0si8801995pge.130.2023.10.24.15.24.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 15:24:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=yzf29tqS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id 0654B80BEF08; Tue, 24 Oct 2023 15:24:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344454AbjJXWY1 (ORCPT + 99 others); Tue, 24 Oct 2023 18:24:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344438AbjJXWYW (ORCPT ); Tue, 24 Oct 2023 18:24:22 -0400 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45A2710CB for ; Tue, 24 Oct 2023 15:24:20 -0700 (PDT) Received: by mail-yb1-xb49.google.com with SMTP id 3f1490d57ef6-d9cfec5e73dso4928212276.2 for ; Tue, 24 Oct 2023 15:24:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1698186259; x=1698791059; 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=IMICwswuJ/vFGwUP8a8fOw6frHIgUKsDaScdLo+z8js=; b=yzf29tqSgdydmD27uXNLY91T1l+1xEhTu+Qf8zjxwFlVdrHiJASm//O1glCrXisOlQ 4/Fft7aAdPvmDbUF2T1Z8H7eOVrKsKJuBlkATpb8TKk5f6WpRn7T7wQLo8TIUx7c1hKI lD5ItFDFLWi1XtcDaIIlyzFSwXGHmWo+aB8v8W8hS67EBvh/pf+kLWe7ENxIbGcrKW67 O+VAkhdigKl6XKUvH2gAw1HyUfdA+HWgHkqIfFqtYo8M+lblSlMD8SMKsjSbgidOvU1Y o0LJyyOdNnCPNiDCH1U2ZV+dgTqmTF2Y8Or5rJtJpP8boqX7MYnOC+Qfdj1n9tmY607J vVsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698186259; x=1698791059; 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=IMICwswuJ/vFGwUP8a8fOw6frHIgUKsDaScdLo+z8js=; b=drIuWMt24e/ZBG0lTjHAmH8pvp1bw9iJCNXnrOLGewEnFztmTFu8stdX57cRJ7plp3 7BG2OadFatT07HHxhX/GjDRO8B66DsVYD/q2BuvKqNDuA05ggXThyxjDoF/EOdmlWqXR e3ZiZw1G1/QbN3RhWxVI0tF5eE/gnRpu6k8UpqvizK0Qa65cGoxdfCTrnYL6mL3qALfn AOvH8vIurfUJnE6fgTHaLwL4YAyTTuAtJW5/DDtccq6I4nlZK36fTsm4g+xbGZEK+iuL 5G0X6Wr7G8rdeOXl2LFO57QC0lFFZ/Bq5i5nZgGbf7HT91QReH1uCZf8nqhuNI/gU8r1 mQGA== X-Gm-Message-State: AOJu0Yxy1DaZH4SPcWK4HCLqZVqlhZj+k6pwrhu3xuL+7bAdub6IHWbN qitTw5BCVNGw07z3hQ9SIALG26KKpJ7v X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:93d2:18cc:4d63:45ba]) (user=irogers job=sendgmr) by 2002:a05:6902:168c:b0:d9a:e6ae:ddb7 with SMTP id bx12-20020a056902168c00b00d9ae6aeddb7mr243432ybb.7.1698186259418; Tue, 24 Oct 2023 15:24:19 -0700 (PDT) Date: Tue, 24 Oct 2023 15:23:06 -0700 In-Reply-To: <20231024222353.3024098-1-irogers@google.com> Message-Id: <20231024222353.3024098-4-irogers@google.com> Mime-Version: 1.0 References: <20231024222353.3024098-1-irogers@google.com> X-Mailer: git-send-email 2.42.0.758.gaed0368e0e-goog Subject: [PATCH v3 03/50] libperf rc_check: Make implicit enabling work for GCC From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , Nick Terrell , Kan Liang , Andi Kleen , Leo Yan , Song Liu , Sandipan Das , James Clark , Anshuman Khandual , Miguel Ojeda , Liam Howlett , Yang Jihong , Athira Rajeev , Kajol Jain , K Prateek Nayak , Sean Christopherson , Yanteng Si , Ravi Bangoria , German Gomez , Changbin Du , Paolo Bonzini , Masami Hiramatsu , liuwenyu , 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,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 agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 24 Oct 2023 15:24:49 -0700 (PDT) Make the implicit REFCOUNT_CHECKING robust to when building with GCC. Fixes: 9be6ab181b7b ("libperf rc_check: Enable implicitly with sanitizers") Signed-off-by: Ian Rogers --- tools/lib/perf/include/internal/rc_check.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/lib/perf/include/internal/rc_check.h b/tools/lib/perf/include/internal/rc_check.h index d5d771ccdc7b..e88a6d8a0b0f 100644 --- a/tools/lib/perf/include/internal/rc_check.h +++ b/tools/lib/perf/include/internal/rc_check.h @@ -9,8 +9,12 @@ * Enable reference count checking implicitly with leak checking, which is * integrated into address sanitizer. */ -#if defined(LEAK_SANITIZER) || defined(ADDRESS_SANITIZER) +#if defined(__SANITIZE_ADDRESS__) || defined(LEAK_SANITIZER) || defined(ADDRESS_SANITIZER) #define REFCNT_CHECKING 1 +#elif defined(__has_feature) +#if __has_feature(address_sanitizer) || __has_feature(leak_sanitizer) +#define REFCNT_CHECKING 1 +#endif #endif /* -- 2.42.0.758.gaed0368e0e-goog