Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp41260rdh; Tue, 6 Feb 2024 18:33:02 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUmSf2NvzlUWnLCES9OR4A1eoX/1pQZKheMQnBAK3LcedBHU4NLfeWyBRjob7X9ZwTq4O3llCocAW7Q02+RqJcTeTLgD7Yg0VthvJo9bg== X-Google-Smtp-Source: AGHT+IEOPsybRyO5C23hFSBGofuwTkC3MZyeFTxMaDLY4yXtA/8UnXXdtRcg7AzTciG173qZeoyI X-Received: by 2002:a0d:ec43:0:b0:603:fd67:a5aa with SMTP id r3-20020a0dec43000000b00603fd67a5aamr4022430ywn.19.1707273182121; Tue, 06 Feb 2024 18:33:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707273182; cv=pass; d=google.com; s=arc-20160816; b=fPCgYDkP+b11gLSLwAlfP7aUP3pD+4z7ufkLJV7/oPM/EwEoh968xEjbqmsQALl5K6 w+SbiqR/FP+0O7WEPrDIsgXeWhQhOvXE5pm4noFy0lXd/ZImmBbCxDmL6g6WXc2B3Zek PuP3w4LCMKnLjipPq4lD8D0SFb/pll98GkN34V3BzSIvOw/KLPTJQoKqXKOCS2meVpx2 ySO8aEpoK/C5W56lmaaHs2GescsNZC54zg//Q35zPoeXyN9/2AgwELrhIAOr0mu7YRWR AwQXH+lqDKygQBvYTFIcK/eguZvckFaYbNO0LTM9ViNRssSFvwYosmvPvfopiikG1Tp6 WeKA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=+iVcz3g4MxUWRJae273hESZ7afXcLOcAGbcYewPQcZ4=; fh=h3rdYJjMH4wfrnSm0pPONVQiSKCtMJEXlXcSrmNKOm4=; b=GzKYdA4jWn9COZHAo0IZOQnbEtJCDtsshWFo4cKlHvmPKP+ymwC3sAHAFyZnqXDLF4 UqtN/0AeccPvqJo6JAetXs1aAIxUDA+6+8m05H70OMZLVEt6GwizWR9qpxx5f9//5PxR BhsLocYPTgJCs2ypOGkWQqapVZ39LQBW2f1MfSxVn/85dat/ANE9eYwS+dKAA0vrC/Qn z4mfTLyqtUcF17FP7Yqy5MPFFXTJk89FqQdZsLt0eqeDQ3OsErCyXNqbfo9g5XscsqzF FdPe38c4uYeWHDT6gbJfUQa+DGNTWCrtkJevjXPxlgvOKNqTiWO3j5MLZBI0qoiJOK+U Ysxg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=QUkclYJR; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-55851-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55851-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com X-Forwarded-Encrypted: i=2; AJvYcCXp3N8X2KnTiNiyPdCZzT2fYrs47fV0FvLUSRjnR5CCrf6Hv/bzbHDn3vKbZIbrnJiXHhLuerY7Z87xJCAcENmkHsGOwc+R0mwI8NX2Yg== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id q25-20020a638c59000000b005b8ebaa2937si375800pgn.47.2024.02.06.18.33.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 18:33:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55851-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=QUkclYJR; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-55851-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55851-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 45847285244 for ; Wed, 7 Feb 2024 02:29:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6C033F4E2; Wed, 7 Feb 2024 02:28:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QUkclYJR" Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0B577DF58; Wed, 7 Feb 2024 02:28:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707272936; cv=none; b=YVoY3SPHYgMLxyB/C/yUvBJEVATJExvKRQJPllVceZoC9EuMPYpTaJIY1VfRTIQGXhStROPVh7nmOCuo68UmbioAPdHT8c5eYEODLMdRy4J7NM2wvJ7zaBKDKxKEhywXBDxa6ZBY09CqIdmwLt8BIa4VmNhtVCH9j7YP9HkBw3Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707272936; c=relaxed/simple; bh=GAzfdjQyUQZQlsw/9SQ4PdngMFFUkF5iE/vp59Bqf/I=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=OI2HZL7c0oaEWHYqQwnp8SyB8Ph3/1Q9MRnf4v2uPOCZUeGTf3PiC7B4PXA8ctZrSWlcGmUdklp3gRZ8T4DcRa0U5kg4nXEfl77xiHlZ900mbs03RshgGIMZiVhT5Q13CgSqiMXPHw+5yYsyLp2nC+FGuTIrqzFiGv8fxKCjD+g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=QUkclYJR; arc=none smtp.client-ip=209.85.221.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-3394ca0c874so128327f8f.2; Tue, 06 Feb 2024 18:28:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707272929; x=1707877729; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=+iVcz3g4MxUWRJae273hESZ7afXcLOcAGbcYewPQcZ4=; b=QUkclYJRVNI9ZVjWQCWhMYViG515va0/LqMDJe5Fy8+FVGvD31iQFm7Er7pIW7j+om AiBNTKFUzlqJJfUaTYBTWan1CdkobSQbgARmmBmLXqljHg30d1CIM6HHnWYeHHa9EMnK 1LabsdWw7kwFXyoZb27cTkdk1eNVdgEBL25gY9NZKnepsds7x0KucYs3gknSLaBtvKdM jNBESIgmZ0tN8MrZTwYbJywp7OW4qS9ssqvLTDXCLuOaoHHL7OoK9/Be0OOKZKaTFfrf ZjmoXzysr3KXcqRMl0zTzKhsOaSOSoTvFKJhDwKnFa/in1v0iucjvh60v4JnK0itf1za JO7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707272929; x=1707877729; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+iVcz3g4MxUWRJae273hESZ7afXcLOcAGbcYewPQcZ4=; b=ot4+nEDtmp2jhFhsQ6JSaGM80OYGlVqrkcfrrfY2nbjvsRucCQPWU0oFW+KqH0bab6 BWUdszJIbGAf+RZqUIi0KQyLPVFPTsLkK/HG9I8fh6lemxFkz2P7er75iv4/YxDxKEPv KDFJYxxjMFJDLm/8dwC7lKQXgrks40+uQIadf6tB4nmxrTKxlUXq4mnWF362Z+HtBnkq lyQyNRdGWiid6Ud9ybsR6LRdGM6RRVuSYt4gTtTqjvg0+ObHcITsH7q/A15eg6ZOQALt XfEH9/Cn7PIHFfeQ6HqVLmdnHwyjLpb+IKZbdR0AaGQBKoMuAd8mN2TH8faS6vJR0Mf2 oSTA== X-Forwarded-Encrypted: i=1; AJvYcCVJHYvDK8KBjG2sSQZaE6P2YVT+WoGFzeEpssFvPZFTXc6u44BY619syG8I62DkK2d9SgY8POvXwuWLk7w4oW+EjprCFNx1S8nC40myBD7CYiwpJ6voFtkcgNFPVmR6JixPKQeqsxPOWUApvETjF70q X-Gm-Message-State: AOJu0YyFFTBd8hyjx+yDytRxAOUflXs6kHyWKnGNFESmDnyishEgi64V GmXo2IaWpdo4P+V5ikhey2ksFggjilnTBUiW3zkPaRdC+z2oElEnUg64VNFnTkQ+Og2hcBNVqtc Zx2TBViKuPANttNW+3RPfzrXvfn/bEc3mmAE= X-Received: by 2002:a5d:4a90:0:b0:33b:3d7b:9df5 with SMTP id o16-20020a5d4a90000000b0033b3d7b9df5mr2368927wrq.3.1707272929037; Tue, 06 Feb 2024 18:28:49 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: In-Reply-To: From: richard clark Date: Wed, 7 Feb 2024 10:28:33 +0800 Message-ID: Subject: Re: Question about the ipi_raise filter usage and output To: Valentin Schneider Cc: Mark Rutland , Steven Rostedt , nico@fluxnic.net, mhiramat@kernel.org, linux-arm-kernel@lists.infradead.org, linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Feb 6, 2024 at 5:39=E2=80=AFPM Valentin Schneider wrote: > > You should have access to the generic fields which include the CPU from > which the event happens. Any of "CPU", "cpu" or "common_cpu" would match > this. > > So if you're on a recent enough kernel (v6.6 or above AFAICT), you should > be able to do something like so: > > trace-cmd record -e 'ipi_raise' -f 'CPU & CPUS{7-42}' ./foo.sh > > If you just want to match a single CPU, or are on an older kernel, this > should work as well: > > trace-cmd record -e 'ipi_raise' -f 'CPU =3D=3D 42' ./foo.sh > > For example on a QEMU x86 environment: > > # trace-cmd record -e 'call_function*' -f 'CPU & CPUS{3}' hackbench > Running in process mode with 10 groups using 40 file descriptors each (= =3D=3D 400 tasks) > Each sender will pass 100 messages of 100 bytes > Time: 0.396 > CPU0 data recorded at offset=3D0x738000 > 0 bytes in size > CPU1 data recorded at offset=3D0x738000 > 0 bytes in size > CPU2 data recorded at offset=3D0x738000 > 0 bytes in size > CPU3 data recorded at offset=3D0x738000 > 4096 bytes in size > > # trace-cmd report > CPU 0 is empty > CPU 1 is empty > CPU 2 is empty > cpus=3D4 > -0 [003] 29.704387: call_function_single_entry: = vector=3D251 > -0 [003] 29.704388: call_function_single_exit: v= ector=3D251 > -0 [003] 29.705950: call_function_single_entry: = vector=3D251 > -0 [003] 29.705951: call_function_single_exit: v= ector=3D251 > -0 [003] 29.706462: call_function_single_entry: = vector=3D251 > -0 [003] 29.706463: call_function_single_exit: v= ector=3D251 > hackbench-962 [003] 29.706501: call_function_single_entry: = vector=3D251 > hackbench-962 [003] 29.706502: call_function_single_exit: v= ector=3D251 > hackbench-955 [003] 29.706521: call_function_single_entry: = vector=3D251 > hackbench-955 [003] 29.706522: call_function_single_exit: v= ector=3D251 > -0 [003] 30.101812: call_function_single_entry: = vector=3D251 > -0 [003] 30.101814: call_function_single_exit: v= ector=3D251 > -0 [003] 30.101897: call_function_single_entry: = vector=3D251 > -0 [003] 30.101898: call_function_single_exit: v= ector=3D251 > -0 [003] 30.101985: call_function_single_entry: = vector=3D251 > -0 [003] 30.101986: call_function_single_exit: v= ector=3D251 > -0 [003] 30.102072: call_function_single_entry: = vector=3D251 > -0 [003] 30.102072: call_function_single_exit: v= ector=3D251 > -0 [003] 30.102161: call_function_single_entry: = vector=3D251 > -0 [003] 30.102161: call_function_single_exit: v= ector=3D251 > -0 [003] 30.102250: call_function_single_entry: = vector=3D251 > -0 [003] 30.102251: call_function_single_exit: v= ector=3D251 > -0 [003] 30.102372: call_function_single_entry: = vector=3D251 > -0 [003] 30.102372: call_function_single_exit: v= ector=3D251 > > > CPU 0 is empty > CPU 1 is empty > CPU 2 is empty > cpus=3D4 > -0 [003] 1067.718304: call_function_single_entry: ve= ctor=3D251 > -0 [003] 1067.718309: call_function_single_exit: vec= tor=3D251 > > and that behaves the same as > > trace-cmd record -e 'call_function*' -f 'CPU =3D=3D 3' hackbench > Thanks, # trace-cmd record -e 'ipi' -f 'CPU=3D=3D10 || CPU=3D=3D11' -f 'reason=3D=3D"Function call interrupts"' works: CPU0 data recorded at offset=3D0x336000 0 bytes in size CPU1 data recorded at offset=3D0x336000 0 bytes in size CPU2 data recorded at offset=3D0x336000 0 bytes in size CPU3 data recorded at offset=3D0x336000 0 bytes in size CPU4 data recorded at offset=3D0x336000 0 bytes in size CPU5 data recorded at offset=3D0x336000 0 bytes in size CPU6 data recorded at offset=3D0x336000 0 bytes in size CPU7 data recorded at offset=3D0x336000 0 bytes in size CPU8 data recorded at offset=3D0x336000 0 bytes in size CPU9 data recorded at offset=3D0x336000 0 bytes in size CPU10 data recorded at offset=3D0x336000 4096 bytes in size CPU11 data recorded at offset=3D0x337000 4096 bytes in size # trace-cmd report CPU 0 is empty CPU 1 is empty CPU 2 is empty CPU 3 is empty CPU 4 is empty CPU 5 is empty CPU 6 is empty CPU 7 is empty CPU 8 is empty CPU 9 is empty cpus=3D12 insmod-8519 [010] 170847.580062: ipi_raise: target_mask=3D00000000,00000bff (Function call interrupts) -0 [011] 170847.580070: ipi_entry: (Function call interrupts) -0 [011] 170847.580071: ipi_exit: (Function call interrupts) insmod-8519 [010] 170847.580078: ipi_raise: target_mask=3D00000000,00000bff (Function call interrupts) -0 [011] 170847.580080: ipi_entry: (Function call interrupts) -0 [011] 170847.580080: ipi_exit: (Function call interrupts) insmod-8519 [010] 170847.580282: ipi_raise: target_mask=3D00000000,00000002 (Function call interrupts) insmod-8519 [010] 170847.580329: ipi_raise: target_mask=3D00000000,00000800 (Function call interrupts) -0 [011] 170847.580331: ipi_entry: (Function call interrupts) -0 [011] 170847.580343: ipi_exit: (Function call interrupts) BTW: where does 12 come from in 'cpus=3D12' :-)