Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1623252pxp; Thu, 17 Mar 2022 12:59:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKSsdw9aDnqx5ghU7hwwYBfa3KeTFoC6+vrszWNZ4PLOyqgnXbj9eUxTcgC27gYNk40KXn X-Received: by 2002:a17:902:8549:b0:153:563a:39a1 with SMTP id d9-20020a170902854900b00153563a39a1mr6621065plo.21.1647547153758; Thu, 17 Mar 2022 12:59:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647547153; cv=none; d=google.com; s=arc-20160816; b=XPwz0TMTTBUFRH8iNSji0YEpK7fgpG8FPN9sZnA73ka93h9hY3GTE4QjAi9ayB8eyk 1ugO6OUx9996Jn9NbEgVnd4b5gYUVQPUY3PYX7MBQMzyKDkCpaFcVNA4fYF3778j+maY eF5wBCGUywFrmDV7bnTQlcwlizOHZYqVi3eWc1tbZ99yjTYETk6VsivUml98U1Nffivh xsZevfcTDJZZgY9SJ1cqVN5vexm62q+Vl443YnN3AF/pPCvFo7LUs29ExRQis2QizKlj czBeT3fnQrVtY6b/wDR81bkIi4I/51I9IPIplxSb45Xxouwx3U0L/Yg4FEonqSDXY57P HqRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=LSZzUGIYrnDbrppwDzXN58XbGMm3oaPV1uVpXCQpBG0=; b=IB/ftuUHWAqUoqDUouqErV3wcRV2Hy7AlRc3evA8ygoeWug4H81xDa9uS2p0DTeUkZ 5VV5YbeR1BnC1+Db58P+AmGylv9oLJ/JXtHus5GytIt3bRM8rAUQ9oWtUugWI19bR/TF 3l36Pi7CTGG7kS0ojYortLrpmZy5dSq237dPJcyyzoMRsy5WozIfrzv32Qv6kRZucIiz HVkR2v+oQnQjTi/fszfPHFiaHUsKxi7f6OsI8dFs8m83fGQPipL5RRjle26CdH0qsH7B QDWewCw3E5o2ppYHOPUAiBLbYtuEQzXdsb9DlE5bmX2/7NUgrfzzRk9SUtD5cHpyMVPH ufvQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id f2-20020a636a02000000b003816043ef86si3022880pgc.379.2022.03.17.12.59.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Mar 2022 12:59:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6BC39281833; Thu, 17 Mar 2022 12:52:38 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236332AbiCQQJR (ORCPT + 99 others); Thu, 17 Mar 2022 12:09:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235503AbiCQQJQ (ORCPT ); Thu, 17 Mar 2022 12:09:16 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95850616E; Thu, 17 Mar 2022 09:07:59 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 484CCB81F12; Thu, 17 Mar 2022 16:07:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5493BC340EF; Thu, 17 Mar 2022 16:07:55 +0000 (UTC) Date: Thu, 17 Mar 2022 12:07:53 -0400 From: Steven Rostedt To: Mathieu Desnoyers Cc: Namhyung Kim , Peter Zijlstra , Ingo Molnar , Will Deacon , Waiman Long , Boqun Feng , linux-kernel , Thomas Gleixner , Byungchul Park , paulmck , Arnd Bergmann , Radoslaw Burny , linux-arch , bpf Subject: Re: [PATCH 1/2] locking: Add lock contention tracepoints Message-ID: <20220317120753.4cd73f9e@gandalf.local.home> In-Reply-To: <636955156.156341.1647523975127.JavaMail.zimbra@efficios.com> References: <20220316224548.500123-1-namhyung@kernel.org> <20220316224548.500123-2-namhyung@kernel.org> <636955156.156341.1647523975127.JavaMail.zimbra@efficios.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 17 Mar 2022 09:32:55 -0400 (EDT) Mathieu Desnoyers wrote: > Unless there is a particular reason for using preprocessor defines here, the > following form is typically better because it does not pollute the preprocessor > defines, e.g.: > > enum lock_contention_flags { > LCB_F_SPIN = 1U << 0; > LCB_F_READ = 1U << 1; > LCB_F_WRITE = 1U << 2; > LCB_F_RT = 1U << 3; > LCB_F_PERCPU = 1U << 4; > }; If you do this, then to use the __print_flags(), You'll also need to add: TRACE_DEFINE_ENUM(LCB_F_SPIN); TRACE_DEFINE_ENUM(LCB_F_READ); TRACE_DEFINE_ENUM(LCB_F_WRITE); TRACE_DEFINE_ENUM(LCB_F_RT); TRACE_DEFINE_ENUM(LCB_F_PERCPU); Which does slow down boot up slightly. -- Steve