From patchwork Wed Jul 5 18:12:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Schneider X-Patchwork-Id: 116281 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp2052544vqx; Wed, 5 Jul 2023 11:19:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4zrFnWbXf0rrUYI5WUNa7fR4AVQF2qoLu+S1ZcsFDhPo3b0mdWAe5TBwoWh2dT1cdJOk/p X-Received: by 2002:a05:6808:138f:b0:3a3:65d6:d76 with SMTP id c15-20020a056808138f00b003a365d60d76mr22060096oiw.42.1688581160699; Wed, 05 Jul 2023 11:19:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688581160; cv=none; d=google.com; s=arc-20160816; b=n78M2ftK/f1iMNKuRPQy5pPL7robObrE7P6eHncelVUliAwgftG+jP1DBLJUNflifA S308Fi9bQ76bII6fOx0VB1bzyYiZ+QP/NYHSLl9Srcru979mc26LJij3VlZl/FLf9iyJ xiJQuso3Mr769o/+TYXQGScXiIMj8/9yfiebMcIY0jHq0rIUZOoZxcKCwdT2g5Vq7B5n GvIthuzFIIhwodIw+AFDNKel7D1xrFXo9DnUVaBQj/I68hfFN6k3RoLSdfcRAZBA83+W TPP8KDDrsqBMIwGsKl7LT5rISbT74BE+ggjxRfhr2Pee/J4/ZG+2i0cSszosOkhYizEs WeNQ== 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=; fh=dVCMRuKhK2aqTEuWethYlqkP4G2sINJQEE+rq5xoO1c=; b=XQ913Ba+Bxrl6VD2DcO5pCizy0L+qFzQHWOEbs1ioBYabGGNFKRMP8jOc/qHkQqVF7 bOagQCHzLLrnCQmkju0K8TYMBVQdAlpd5v6XeD4n0489EWlipxVgKqTzIvx5y/INbCT8 Sf90/Pihg9uOGL6lFMczmis2Llvg5ZpNu0W/BiHGcltFFi7K1uySMSkfXRBN8r2lHiKO N6N4WgMCDUFoI3cHBk8PWqpzZea7jfi35+1GJ7E9wU8bHC8gpQlP3rej/9kzOCeziS9j n0zGm3M/LpQe+5/ePu/cHeqEkrWovTFM1FT7qe4F0DVo+W854ZPglG2la4M+rWHEnEh3 SlzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gbFZdI+C; 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 b15-20020a630c0f000000b0051b9a71329fsi24899691pgl.360.2023.07.05.11.19.05; Wed, 05 Jul 2023 11:19:20 -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=gbFZdI+C; 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 S233380AbjGESRZ (ORCPT + 99 others); Wed, 5 Jul 2023 14:17:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233353AbjGESRU (ORCPT ); Wed, 5 Jul 2023 14:17:20 -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 1D14C19AF for ; Wed, 5 Jul 2023 11:16:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688580996; 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=gbFZdI+CtiuzRmPWqKrw9wu3m900gR3Z0Q6ZTozWwRTClBZcjFW7ayEchlbBZ0z4VqxbQZ XjB1zBuO4FZiRDxVEk5RcZiJJR5S7Esde691DFrJCAT7sJ4QxQF0lMycbxKSfmlddbKE17 P5LzQabDCMxO6MPvxq9rjln1lRKkk4c= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-668-hNYP9ME2PT2zK_PDEefSuQ-1; Wed, 05 Jul 2023 14:16:33 -0400 X-MC-Unique: hNYP9ME2PT2zK_PDEefSuQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1D8FE3815EF2; Wed, 5 Jul 2023 18:16:31 +0000 (UTC) Received: from vschneid.remote.csb (unknown [10.42.28.164]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CDDF218EB4; Wed, 5 Jul 2023 18:16:24 +0000 (UTC) From: Valentin Schneider To: 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 Cc: Steven Rostedt , 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" , Andrew Morton , Uladzislau Rezki , Christoph Hellwig , Lorenzo Stoakes , Josh Poimboeuf , 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 , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= , Juri Lelli , Daniel Bristot de Oliveira , Marcelo Tosatti , Yair Podemsky Subject: [RFC PATCH 05/14] tracing/filters: Document cpumask filtering Date: Wed, 5 Jul 2023 19:12:47 +0100 Message-Id: <20230705181256.3539027-6-vschneid@redhat.com> In-Reply-To: <20230705181256.3539027-1-vschneid@redhat.com> References: <20230705181256.3539027-1-vschneid@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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_H4,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?1770605679240025719?= X-GMAIL-MSGID: =?utf-8?q?1770605679240025719?= 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 -------------------