From patchwork Fri Jun 9 15:03:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Schneider X-Patchwork-Id: 105701 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:3046:b0:115:7a1d:dabb with SMTP id p6csp1075672rwl; Fri, 9 Jun 2023 08:25:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5U8S4Alo29W6vaHn9Z7gpRYOOEqDgiJZeUUdMiv/z1G0Unpi/izg6SKxWIPe7dE/KLeV97 X-Received: by 2002:a05:6a00:b46:b0:64b:f03b:2642 with SMTP id p6-20020a056a000b4600b0064bf03b2642mr2123463pfo.23.1686324346168; Fri, 09 Jun 2023 08:25:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686324346; cv=none; d=google.com; s=arc-20160816; b=F5NT+9y4vWJ4j4IX1c12JvtETf/jBvIMWuBMqg5UV3fUVSIbROv8g954+ApiAdCAKT 2UzROOoPb06T6FEYuxmwaJU88O7qrQ7SzUgJN9bXBwQvl2LRVTH6W3pSabw4EI4eeuB6 tBZqOweeJrV/kp52cX7wg/JQNklvFq8Y4dRmtwNMYnqV5n3FdYJddU3XLLNtsAV1zE6F T4+2E2v06Bfqz/aViYSML+82k9Wmuwi/LbvDjhm1FzeCb9uLOwq3Ox9ouZT5KJ4qU1aV A9GIwwhhZb7pvg5DgYbIYpeBxswJIz/Me0c+cTSOqVGzvNJNIblqxRogU1Z6EvFOiNL1 jtcQ== 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:date:subject:cc:to:from :dkim-signature; bh=snCuxFAiT0B/bnlHGtaiRqsJwVD+zCZujmUlSZJWpwM=; b=D/+m6sIsFSIpU0A7JU2VbDj9kJkDF5LWhOoUr2RwxiExvRgnSqAOm3TwkDjO3PnGl4 39DJpSiIt4nLpA0gW7BaxlvbgcN0SK75o3dav4af+3aqXUbLlCIPcTY47JOXvC8JkYZU koEg7eymNI7I3KKcI/WQS1h0nCNFsiHr4uaBFeSuvFv4d/JFrq2x7TPVooCf0neesA2l j3BH2XuIxOWSVG7UL7riW8nU/YuwbcHSjymdumN3PDrKrrWYjbLw6QmP9ceEq4zLLO3J hoVG1aE5lyk+dMLI+LKbqqSQiEsrS9EwnUii372fNKo8ilW/YV4wKNybzpt5KjSu8V7i 47EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FYvttFH6; 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=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s65-20020a637744000000b005406e76606csi2759161pgc.900.2023.06.09.08.25.21; Fri, 09 Jun 2023 08:25:46 -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=@redhat.com header.s=mimecast20190719 header.b=FYvttFH6; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231981AbjFIPFu (ORCPT + 99 others); Fri, 9 Jun 2023 11:05:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241482AbjFIPFh (ORCPT ); Fri, 9 Jun 2023 11:05:37 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1BFC35B7 for ; Fri, 9 Jun 2023 08:04:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686323069; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=snCuxFAiT0B/bnlHGtaiRqsJwVD+zCZujmUlSZJWpwM=; b=FYvttFH64LWYJcp7fnajMu/mF/2g4z/EazwGxwTHpP3IytegGxCHK4a9F6d60TIhtdXqCu zGOC/B9qp/EbwCFL4qB4+URujsBlEnzpNCiq0YnkSCzXLqjBV2t069hHsaJSlvtxo1Whzj YooSlBuvlQk8pL08x/+bEGTpz2JLJKE= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-80-nCse8t6ROPCfh-6T_4NSdQ-1; Fri, 09 Jun 2023 11:04:25 -0400 X-MC-Unique: nCse8t6ROPCfh-6T_4NSdQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 73E2E101A52C; Fri, 9 Jun 2023 15:04:24 +0000 (UTC) Received: from vschneid.remote.csb (unknown [10.42.28.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AACC54087C62; Fri, 9 Jun 2023 15:04:18 +0000 (UTC) From: Valentin Schneider To: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-doc@vger.kernel.org Cc: Steven Rostedt , Masami Hiramatsu , Jonathan Corbet , Juri Lelli , Daniel Bristot de Oliveira , Marcelo Tosatti , Leonardo Bras , Frederic Weisbecker Subject: [RFC PATCH 5/5] tracing/filters: Document cpumask filtering Date: Fri, 9 Jun 2023 16:03:24 +0100 Message-Id: <20230609150324.143538-6-vschneid@redhat.com> In-Reply-To: <20230609150324.143538-1-vschneid@redhat.com> References: <20230609150324.143538-1-vschneid@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768239237466015098?= X-GMAIL-MSGID: =?utf-8?q?1768239237466015098?= Cpumask, scalar and CPU fields can now be filtered by a user-provided cpumask, document the syntax. Signed-off-by: Valentin Schneider --- Documentation/trace/events.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Documentation/trace/events.rst b/Documentation/trace/events.rst index f5fcb8e1218f6..e9bc9f23891a0 100644 --- a/Documentation/trace/events.rst +++ b/Documentation/trace/events.rst @@ -219,6 +219,20 @@ the function "security_prepare_creds" and less than the end of that function. The ".function" postfix can only be attached to values of size long, and can only be compared with "==" or "!=". +Cpumask fields or scalar fields that encode a CPU number can be filtered using +a user-provided cpumask in cpulist format. The format is as follows:: + + MASK{$cpulist} + +Operators available to cpumask filtering are: + +& (intersection), ==, != + +For example, this will filter events that have their .target_cpu field present +in the given cpumask:: + + target_cpu & MASK{17-42} + 5.2 Setting filters -------------------