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: 13302571 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92F5EEB64DD for ; Wed, 5 Jul 2023 18:16:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3735B8D0007; Wed, 5 Jul 2023 14:16:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2FCBB8D0001; Wed, 5 Jul 2023 14:16:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 175F78D0007; Wed, 5 Jul 2023 14:16:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 019CD8D0001 for ; Wed, 5 Jul 2023 14:16:43 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id B1D7D1C8ED4 for ; Wed, 5 Jul 2023 18:16:43 +0000 (UTC) X-FDA: 80978363886.06.BF97861 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf24.hostedemail.com (Postfix) with ESMTP id 2B5B1180014 for ; Wed, 5 Jul 2023 18:16:40 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=QLH0tR65; spf=pass (imf24.hostedemail.com: domain of vschneid@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=vschneid@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1688581001; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=snCuxFAiT0B/bnlHGtaiRqsJwVD+zCZujmUlSZJWpwM=; b=TcrYKDH60HwbV9ts80/hIq2TqHMJtUTVuNJ7WmZdYkSE9nm+LUqe8t2MQZXY+W5+ZUo+GE 4BjKhMw28g1t+p3tDH3E5vwwn98iUc4QlgsdKGg8M7+29gSPAIf2a+Kcrt5H7ZEW/7d57s qVm41fIsLXVYTOe58EqXEYbBSVMdBSI= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1688581001; a=rsa-sha256; cv=none; b=qcTBQmYRp+HATLi6Wg/yOTbHfnR2ZxR53rO0GgXA2KyqQF+C90tGYNBg1MfSKREvmUFLWE z8dYtje0EMeqS1p84+rGJYCPbd8afKHYUzjFQpa36aLFLXJ9vsT34RAGMb7ON7cmmY1Uav 6NHr6KUmsFDHiUAlG0sr0UHWm2g8gVA= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=QLH0tR65; spf=pass (imf24.hostedemail.com: domain of vschneid@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=vschneid@redhat.com; dmarc=pass (policy=none) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688581000; 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=QLH0tR65sjccfs/u32T73cOq6YvJTRtaxYOHhAOfaKm0s9gZnv7ECqbMO22ObUGLU08XzW Sb2yQyBMX3gy+RtgNAY0I+mZrKvCQkVznHufSp/4DFU4aFq/lbft+39zE6+dbqISJjD1cR Zv5jFIIYMkcSmusdqgaA/nY/fh5PDT0= 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-Rspamd-Queue-Id: 2B5B1180014 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: cterka8yzkqiwrzt4h9kn4nmya8udx3j X-HE-Tag: 1688581000-631116 X-HE-Meta: U2FsdGVkX1+nhGUX9VtRKJR9wOumPv5qTj9RtCLnDi/RyDup+7qVx/AcQ+OoxnzYmGcjLRZoT7Py3i4x4e+Yk5HnHOvY9W8Fwvg8qdqfVuvUZpuW0oGEb1nQ0pjQVGm0fKJEjPDZybRS3B7rSJJ9GdEGnf30r5mjikRMHkHSVmEMBOX/U18xXCYfi1ln4jAz+77ng0slp47mVlj/0ghG4FWzBLVThwWAM78EWg3eZH700PhUbl2Fi1sUi8Zw8PgOA0X30gRdLPc4/dK9AH1Iiko99007e2tN8C0+rXoJ8DPbHpXcyFMeIxaXdzZ+fk0JHqRGQC7uua60Ix5NvlTb3aboLgVCAc/1KhfuBpLIi/ccIRZIumy+vZawEQlv6FswGXf2DdpAsCCSdVaKoklEUreosNC6y3E4Lkkweb3vwy+MkLieHVb0MjHnrvuoKnNMbdUCHoioX+/cW6pcBr0hOFTcEsGDexihepdqK00Pj4fchxbEtFKE1M1Ajj8kGYqNqNKW2LPS1FBkdU5uPdfMeOmfD7QayUkiptI7vsCj+IT2AAFfkNmjYLXWX2FJsLVGJm8lWxZCTARqp3ubhDmygH7/VGQ5N+U55BKuwlOw/YBK3R45vtqVdnSIL8Dslydi3AyIZ6qkv3XSXst7f4WxietEidJmPJx1E/mFZ9FucvCJgvGlk3e1C7u1JVlof3IQiqZoeGTx1nqSdvh8A7P6k0Y0h1ss1oHTk8hHIQRipAdC1QhAqqgZIRHR2O6iZ+oFUEm3TSyi9pX4vRLfPZaHHBlJ9Dhv6g//HA8w+2DtzQigmssMcKWvazpq3yw++qO3Am4hUXgm1z0pu+MpfsQd/8zpYCxyr1ECJYfG4jAbJoQxIAx3tWDC7NlZf9qJVjkK0uKRwaD+MaITlA5drq4fD7Sp/Wp+7ZQ+US+MntmRka8BXipreFVAjCG0zrG19hh5oZU+R7LCZV46IVZKw/H eaSsSuXU AR9eiQ7p5Jh8UClTyJU+LWjG7T9kt7GxxjyB/03MwTNbNPJcWTMjtyEaXaNYaGmXXaSR4JOTvcTvQ5YauCCbyhue9/7uZOkhq1bKju59dgyEUw8J0opF29wjzcQykxOqp5t8lWOYL8ParzeM+y6TcPpZfQoi7hzIsCVkC1/JS7GVr3OI= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 -------------------