Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4411498rwb; Mon, 31 Jul 2023 06:35:50 -0700 (PDT) X-Google-Smtp-Source: APBJJlH2iKrCtVxbuFqqkkbQrdkZN7QL3k23NAkqqY4XpuCyPFtCm+EZBH6MWGOuumzOQpKHY2z1 X-Received: by 2002:aa7:c401:0:b0:51e:fbe:dc81 with SMTP id j1-20020aa7c401000000b0051e0fbedc81mr8135973edq.3.1690810550414; Mon, 31 Jul 2023 06:35:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690810550; cv=none; d=google.com; s=arc-20160816; b=yUBe30S91syATOZzH3GivNvLYHRlVUPtHOeZuyGEMbcBfYdx1PizqJz/zr9oOI/ncC Va+7njvRdyWwGOBOEwGV8pAicCK2Stx7CovXGUqfS9vsDN8Mqwd+OLwZO/opmaX90XSV hMnVuSuyij8C5B142dwDNyzz5vjAELwOH66RPhne5h6qPqQGsSATcjwUtOpjx35GA8UI 6BBdSKMkxtfar2p4QY/aAXeWb8LHJPON8jlcCpps6i0y+/nB7a8b5xsI69ES8GRoagfF 5byelg/fWvWq5+LKxKLPehAbvyU5Rvqm2dcrGcbf8rcYaRNtRugYtMW3L9FyJxV9R/D4 VcRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=RtmERFMlZOzYX/xBspxMX5ThTF00TCl7wQ49mzpQ0/E=; fh=hacBTkuwh8JJjY82eG/jzoQO0gXVnilNT2aQYsjdDYM=; b=bid7n3RhKH9+5WY6NrAAvC53YRRp48UuW02RZCSaXbj0Pwz80XmwnjvN6sqFus2GQd TxoWDF8D4A/fyXdD7c2FACuLyW1m+7FH5ZDAk02o4hKBmluOzaFVa5z5oma5uSQf23k/ V9m9RAgdWLkDdPt1hXK8Sd0aI3wWF16AHqBIpE52P8xgWhK44DouLhrxpLYXR2dFCKTw Dpee8aCWiRo/Ps0l2XO3aLE9nHZGpMvupm1ConZBEMI7UzYvju/1fcYX9zw0LUofZDrg BbwchpKOkn4AgyHXysm690kStPxhKmip+XdGzg3UZl1QrJauFAt1jHGcfHH0wORVOqb3 VT6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ckvKa3Zx; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a20-20020aa7d914000000b005221e49e4c6si6639265edr.299.2023.07.31.06.35.24; Mon, 31 Jul 2023 06:35:50 -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; dkim=pass header.i=@linaro.org header.s=google header.b=ckvKa3Zx; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231185AbjGaMIC (ORCPT + 99 others); Mon, 31 Jul 2023 08:08:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229753AbjGaMIA (ORCPT ); Mon, 31 Jul 2023 08:08:00 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DB8310DE for ; Mon, 31 Jul 2023 05:07:57 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-3175f17a7baso4009209f8f.0 for ; Mon, 31 Jul 2023 05:07:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690805276; x=1691410076; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=RtmERFMlZOzYX/xBspxMX5ThTF00TCl7wQ49mzpQ0/E=; b=ckvKa3Zx6KLTC/M6VWdrDZz/SSn75QqFRlMc0INiSsSBx74N0XLvwMHXr/+1kT27eP 2VJgFZt4x2XA8zK/QCSOllF4qlJL0zdlWeiSenxoo5XA6bg0BWmo4iAsdwWj5iJRGauk wDEn65j7MAM1S5M1tIugT7l19Cfb4tdy6ef+XqorZf5v2By4dSwzVTenowDcofckzNyO K3OktzO+ncq6RAs2ijzNHWsQJJW4olboxJSVETmXZPSjGFq7VH+zra5n0r2r2pTXta7N Q1Jy7aFI41e+av0nqqcbhUAS0OF7+1gTr+jZqBOc0NfGDi0XeErtkvl+rKkCg5HXkczs 4qsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690805276; x=1691410076; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=RtmERFMlZOzYX/xBspxMX5ThTF00TCl7wQ49mzpQ0/E=; b=FEwZSJ1Rp+OAiemmmBV/8X9PVvDWxNqgD5r4xgmwGs+fCunFi50lhEdj8a0No0gx4t PjcUCA0CMlzAglSEIAEF+pIo3TdN3acGXNEct0btufwokDwNLfGMvIWZadhx6cOJHdI7 2m/8eXZycQVYRP1kfTwNgF6JgebAUnNtsrPNsISXvqScw5HAVHXHCneEbnGpXynvDhfH EYe+cvtigIVzwKb/8oMBMhtamOEWN6LOuftGHIcteMWuljb2Dkv8PzmLUgbCMsMLHyxh 6kdDWd/meCHMwWFiZG+Ec+1NFAexwR4pHkkw9W3VOTwQhUjmwaLZipNllDZnQYI2bO90 q16w== X-Gm-Message-State: ABy/qLY7Y5HDBKq4bzIxNmD+6L4RJDeuiolOVlGToH/sl+LvnFmsTZlm G5Nq8baLzh+uZL+6BEuiV11kkA== X-Received: by 2002:a5d:6889:0:b0:313:f548:25b9 with SMTP id h9-20020a5d6889000000b00313f54825b9mr6424281wru.40.1690805275895; Mon, 31 Jul 2023 05:07:55 -0700 (PDT) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id q15-20020a7bce8f000000b003fe20533a1esm3193045wmj.44.2023.07.31.05.07.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jul 2023 05:07:55 -0700 (PDT) Date: Mon, 31 Jul 2023 15:07:52 +0300 From: Dan Carpenter To: Steven Rostedt 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 =?iso-8859-1?Q?Wei=DFschuh?= , 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: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230729155547.35719a1f@rorschach.local.home> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 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: if (pred->op == OP_BAND) pred->op = OP_EQ; regards, dan carpenter