Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4618564rwb; Mon, 31 Jul 2023 09:29:13 -0700 (PDT) X-Google-Smtp-Source: APBJJlG/DPPnciDVPHmOmdoDOaVBRM2GeKeTpgA/IaU12619tTIllECjt9vabuVOnw6cEOvrTaG6 X-Received: by 2002:a17:90a:8d06:b0:268:1d1e:baaf with SMTP id c6-20020a17090a8d0600b002681d1ebaafmr10537769pjo.17.1690820953663; Mon, 31 Jul 2023 09:29:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690820953; cv=none; d=google.com; s=arc-20160816; b=vg26glgV1zCQNLixqVQCcc+FQcsGjmiMlTzI8fSUrLPDgk6lDrh8wRQQ5JwN9mSka6 Lok7kvfPEvcvsbRlSLpdx66/GOp5Vts0JNACVnF7l1Nbz2WPneBxHHJ/E8DMGKfZZ6yv 7Ax1qT59Q4UaUnIFOOAfTdCd9erwyxG+YakvV6A0g61K5G8qMOeyFnYsqGcAHI0QPInm axZQRh4BjAwmR8RV0KK8bdP2DmiYI7NQX7bBAtkJHX7Mn2p0ypb0AtZ41RYVg2jf1136 d/e1nTGh65Ur1T6GtPUstAmxTBQgyxUxb1SdOdCsu6kkjDf5eOmOhzy5hSKf+9o5LmtR qB4A== 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=K/wUrF6c5zWmuZIjPo03/SJU0DsfRfBL5ZcrdRWrJNo=; fh=xYyztlBE4vjnuX+vioeEZ/kazBqn8ahYOSeU2UkK32o=; b=j5JAGTom1NkuKw7C+hUmkQ3r4jvtn/3gRth3tCuMX48dOr1OHXGDDw+tLlyreFpfw2 ZFK5eQBXXWwfkJuKSI32ysLjJdW4mKsQ9J56Qpn5bV9qnOJex1B0XdffZ2e7avYbCW8s lh26MhudktGR6+kgnuutVz0RqoCFuSssx5DdUkDE+rwicv04CuDceQVN7wLOyRlMFTsE nrRJgXzKkWZlGFAmQDGEQf93xXQSYW2xnUtftj+KIcwM3HB52p4oFPa6Jwayxqz1pmYJ O7Sy5q2KRk4FMAvMq8qdnCxldZxAgsgU4Qg2Vm4/K1vlZ8f5udnPODhcO6i3/7zeTx0/ btRw== 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:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c7-20020a17090a558700b00267f33cf006si8986922pji.67.2023.07.31.09.29.00; Mon, 31 Jul 2023 09:29:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232925AbjGaPzO (ORCPT + 99 others); Mon, 31 Jul 2023 11:55:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232898AbjGaPzK (ORCPT ); Mon, 31 Jul 2023 11:55:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DA9A173F; Mon, 31 Jul 2023 08:55:03 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8E39D611E1; Mon, 31 Jul 2023 15:55:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 494BDC433C7; Mon, 31 Jul 2023 15:54:55 +0000 (UTC) Date: Mon, 31 Jul 2023 11:54:53 -0400 From: Steven Rostedt To: Dan Carpenter Cc: Valentin Schneider , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-doc@vger.kernel.org, kvm@vger.kernel.org, linux-mm@kvack.org, bpf@vger.kernel.org, x86@kernel.org, rcu@vger.kernel.org, linux-kselftest@vger.kernel.org, Masami Hiramatsu , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Paolo Bonzini , Wanpeng Li , Vitaly Kuznetsov , Andy Lutomirski , Peter Zijlstra , Frederic Weisbecker , "Paul E. McKenney" , Neeraj Upadhyay , Joel Fernandes , Josh Triplett , Boqun Feng , Mathieu Desnoyers , Lai Jiangshan , Zqiang , Andrew Morton , Uladzislau Rezki , Christoph Hellwig , Lorenzo Stoakes , Josh Poimboeuf , Jason Baron , Kees Cook , Sami Tolvanen , Ard Biesheuvel , Nicholas Piggin , Juerg Haefliger , Nicolas Saenz Julienne , "Kirill A. Shutemov" , Nadav Amit , Dan Carpenter , Chuang Wang , Yang Jihong , Petr Mladek , "Jason A. Donenfeld" , Song Liu , Julian Pidancet , Tom Lendacky , Dionna Glaze , Thomas =?UTF-8?B?V2Vpw59zY2h1aA==?= , Juri Lelli , Daniel Bristot de Oliveira , Marcelo Tosatti , Yair Podemsky Subject: Re: [RFC PATCH v2 06/20] tracing/filters: Optimise scalar vs cpumask filtering when the user mask is a single CPU Message-ID: <20230731115453.395d20c6@gandalf.local.home> In-Reply-To: <04f20e58-6b24-4f44-94e2-0d12324a30e4@kadam.mountain> References: <20230720163056.2564824-1-vschneid@redhat.com> <20230720163056.2564824-7-vschneid@redhat.com> <20230729155547.35719a1f@rorschach.local.home> <04f20e58-6b24-4f44-94e2-0d12324a30e4@kadam.mountain> X-Mailer: Claws Mail 3.19.1 (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.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS,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 Mon, 31 Jul 2023 15:07:52 +0300 Dan Carpenter wrote: > On Sat, Jul 29, 2023 at 03:55:47PM -0400, Steven Rostedt wrote: > > > @@ -1761,6 +1761,11 @@ static int parse_pred(const char *str, void *data, > > > FILTER_PRED_FN_CPUMASK; > > > } else if (field->filter_type == FILTER_CPU) { > > > pred->fn_num = FILTER_PRED_FN_CPU_CPUMASK; > > > + } else if (single) { > > > + pred->op = pred->op == OP_BAND ? OP_EQ : pred->op; > > > > Nit, the above can be written as: > > > > pred->op = pret->op != OP_BAND ? : OP_EQ; > > > > Heh. Those are not equivalent. The right way to write this is: You mean because of my typo? > > if (pred->op == OP_BAND) > pred->op = OP_EQ; But sure, I'm fine with that, and it's probably more readable too. -- Steve