From nobody Wed Feb 11 04:01:08 2026 Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) (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 B71EF1FE455; Fri, 30 May 2025 06:24:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748586255; cv=none; b=ntZkn1TtXHFVUaIOyKC8KGf0weAE93vn9wNbm6T9CKfZhzboEqYyqpziaUYF70txKPqFy+1DxGIBjGwSOaQOXMplWRZw5475oko5xHfoT8xGeCK1DTFT5pbAyTJYqY1f7YRen+9AKqER5HQZBAomeV5xdfR3HDe79zIMAvoOh2w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748586255; c=relaxed/simple; bh=OYvYPHL2WgbBwyBOJ5/Dnn15RG6NScDVsfeRryDXXlI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=u6C92hdlsKIdeDuEmt69xQVP3P7VokJTO7I//WRYnLfe6Kzp6XC2h5YsxlWvXTHHAnGuE2AZfui5AyCvCdOyFYmvfAbN5d2otzp9A4bW52LH0+oWh4bdyxv2tTEa01FYqvoJF5tv01N5jJyT2eY1bQciAfkY08wvx4PoY6xO8ic= 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=HJEY/BEb; arc=none smtp.client-ip=209.85.214.174 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HJEY/BEb" Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-23228b9d684so19161645ad.1; Thu, 29 May 2025 23:24:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1748586253; x=1749191053; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/KAmaZGstt+itlsylRoWzIqpr+NCv8aQmcMmtle5two=; b=HJEY/BEb7ezVjwEGN4pLH/lOPhm8fxnAfEwZelvdijcQcpUsDqS/JhteZ0pHVnRhrR c0vdz9ifVp66vNqcFs9jbMOWjBW9oU0EsLixAz9eeBp5lZpnkrp9Ahv8GTnz5oYeRlsD E7Fm9G7sa1Bd6ICvldx5LJtxN3B91LZBYgc3Vh3fVEPphnf0vpidxPRcmpw86ZUiiF5t BbkSB/ZZU8odThuTgQlbiz1Me43+qzDHsWXO9u8PkZfOkD36ELprdWn4OUF14qZo6TY7 YW5OBlxb606YfCTrscwZOG34aqu3xoBhvkjGzNDzrsbgXKlmYv6uZBzyQjbK8F+URW+1 5Nkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748586253; x=1749191053; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/KAmaZGstt+itlsylRoWzIqpr+NCv8aQmcMmtle5two=; b=GLa4DHVWEgJ1IZ0spOuXbNB9RwIeVAJPWjhY20M5fO5q0N0XwtC+ad2WqcaxcedPZb prscXuMxooXj57PeTjfJ98WykgepjRRjvUJNply/MpOGKUNPauuklXJ7sd4yH7iPNY6C Lji++4JC/Z8UgnI0kJUatSRqECflz/nXbDr9D6m0qI5wKmHnMnyEZQwv9F32UhrO8mMl v4IvZxNi6oq3tpAOUJtn1Ow3zsp1DmYCSZOapC/uYtJJt8o+/yRpNCkJXk33kUZbTft9 1b7pp+jmdIGaZM9tPSQtbRt4j9l0h1tzNb+DDktaNLvjwhwOSyDX2GTHlHmP32EforAc 9dOQ== X-Forwarded-Encrypted: i=1; AJvYcCVXFUYO6VkQOc6D83bZD7qqI7taGMGn+0MrSBgHH790mSW7Vm0Sw5YVSAoPNuATkY8p8/L5fWUiKayljLtLLgGJfQ==@vger.kernel.org, AJvYcCW5aH73aqYl48yZhxKFRl4Gv+48lH4y8xV/rYEY1eq3OEZjWMfPBZCWyKVnE+shgDV5qKR3odIxyFEoT34=@vger.kernel.org X-Gm-Message-State: AOJu0YzJBWXjUdY6NztgakeKxfk8eDYPCX8LbnwiikaX7Co1YMd+R6Nq +nBgrZly7WgqzpLGtjtI+az1gB1UatHLngRkgX+xehEzyv5zwJzqZOJe X-Gm-Gg: ASbGncvrKGp8ENwTihXYQFUhuGxkicutQDkoFEVirCI8UpF37Yl0jkuGmkb5jQYez24 L+7IxJAPEJtNtrhGO8b2PKIz5QqTpehq6e03hJinyic7W8RCTrPe7a9IWxgxGiZujitXp6Jns5j JYZKmwbNpf9i80eg1bbvzQdkhnRmqVfQCvtyJNwB00f4Jz3friMXxw4168JSjQZKZOViCNIm7Wu /HUTWaybGRlXQkaAS9Qg5xCbek868cNeJd5wLCR7t5zF7BVseeAYq1Wt9ek0IvaIzfvW4RaJBvo 2T0KMBCz6ulaDPgyNHXUctlouQhTUn2+hKzwxNr6tTQdVAwTyZhf42pBIUCtCvSy4bdlFibbW3w pGrHv47kEpks= X-Google-Smtp-Source: AGHT+IHzeXymVD09NDmgEKtmmFolex8pa6fKmlGntRYRQoFBZckRRqq//lmcpdxVzsrHkeSypRcJCA== X-Received: by 2002:a17:903:190:b0:234:c2e7:a0d0 with SMTP id d9443c01a7336-23538ed0117mr17467805ad.5.1748586252854; Thu, 29 May 2025 23:24:12 -0700 (PDT) Received: from howard.lan (c-73-202-46-50.hsd1.ca.comcast.net. [73.202.46.50]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b2ecebb6857sm757498a12.73.2025.05.29.23.24.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 May 2025 23:24:12 -0700 (PDT) From: Howard Chu To: acme@kernel.org Cc: mingo@redhat.com, namhyung@kernel.org, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@kernel.org, irogers@google.com, adrian.hunter@intel.com, peterz@infradead.org, kan.liang@linux.intel.com, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Howard Chu Subject: [PATCH v1 1/2] perf trace: Enhance task filtering Date: Thu, 29 May 2025 23:24:07 -0700 Message-ID: <20250530062408.1438861-2-howardchu95@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250530062408.1438861-1-howardchu95@gmail.com> References: <20250530062408.1438861-1-howardchu95@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This patch does two things: 1. Add a pids_targeted map, put pids that interest perf trace in. 2. Make bpf-output event system-wide. Effect 1: perf trace doesn't augment threads properly. With the script below: Program test_trace_loop.c ~~~ #include #include #include #include #define THREAD_NR 2 struct thread_arg { int index; }; void *func(void *arg) { struct thread_arg *t_arg =3D arg; while (1) { printf("thread %d running\n", t_arg->index); sleep(1); } return NULL; } int main() { pthread_t thread_ids[THREAD_NR]; struct thread_arg thread_args[THREAD_NR]; for (int i =3D 0; i < THREAD_NR; i++) { thread_args[i].index =3D i; if (pthread_create(&thread_ids[i], NULL, &func, &thread_args[i])) { perror("failed to create thread, exiting\n"); exit(1); } } while (1) { printf("parent sleeping\n"); sleep(1); } for (int i =3D 0; i < THREAD_NR; i++) pthread_join(thread_ids[i], NULL); return 0; } ~~~ Commands ~~~ $ gcc test_trace_loop.c -o test_trace_loop $ ./test_trace_loop & [1] 1404183 $ pstree 1404183 -p test_trace_loop(1404183)=E2=94=80=E2=94=AC=E2=94=80{test_trace_loop}(140418= 5) =E2=94=94=E2=94=80{test_trace_loop}(1404186) $ sudo perf trace -p 1404183 -e *sleep ~~~ Output before: $ sudo /tmp/perf/perf trace -p 1404183 -e *sleep ? ( ): test_trace_loo/1404186 ... [continued]: clock_nano= sleep()) =3D 0 ? ( ): test_trace_loo/1404183 ... [continued]: clock_nano= sleep()) =3D 0 0.119 ( ): test_trace_loo/1404186 clock_nanosleep(rqtp: 0x7a86= 061fde60, rmtp: 0x7a86061fde60) ... ? ( ): test_trace_loo/1404185 ... [continued]: clock_nano= sleep()) =3D 0 0.047 ( ): test_trace_loo/1404183 clock_nanosleep(rqtp: { .tv_= sec: 1, .tv_nsec: 0 }, rmtp: 0x7ffd89091450) ... 0.047 (1000.127 ms): test_trace_loo/1404183 ... [continued]: clock_na= nosleep()) =3D 0 explanation: only the parent thread 1404183 got augmented after: $ sudo /tmp/perf/perf trace -p 1404183 -e *sleep ? ( ): test_trace_loo/1404183 ... [continued]: clock_nano= sleep()) =3D 0 ? ( ): test_trace_loo/1404186 ... [continued]: clock_nano= sleep()) =3D 0 0.147 ( ): test_trace_loo/1404186 clock_nanosleep(rqtp: { .tv_= sec: 1, .tv_nsec: 0 }, rmtp: 0x7a86061fde60) ... ? ( ): test_trace_loo/1404185 ... [continued]: clock_nano= sleep()) =3D 0 0.076 ( ): test_trace_loo/1404183 clock_nanosleep(rqtp: { .tv_= sec: 1, .tv_nsec: 0 }, rmtp: 0x7ffd89091450) ... 0.076 (1000.160 ms): test_trace_loo/1404183 ... [continued]: clock_na= nosleep()) =3D 0 0.147 (1000.090 ms): test_trace_loo/1404186 ... [continued]: clock_na= nosleep()) =3D 0 2.557 ( ): test_trace_loo/1404185 clock_nanosleep(rqtp: { .tv_= sec: 1, .tv_nsec: 0 }, rmtp: 0x7a86069fee60) ... 1000.323 ( ): test_trace_loo/1404186 clock_nanosleep(rqtp: { .tv_= sec: 1, .tv_nsec: 0 }, rmtp: 0x7a86061fde60) ... 2.557 (1000.129 ms): test_trace_loo/1404185 ... [continued]: clock_na= nosleep()) =3D 0 1000.384 ( ): test_trace_loo/1404183 clock_nanosleep(rqtp: { .tv_= sec: 1, .tv_nsec: 0 }, rmtp: 0x7ffd89091450) ... explanation: all threads augmented Effect 2: perf trace doesn't collect syscall argument data for *ALL* pids, and throw it away anymore. Those uninteresting pids get filtered right away. There should be a performance advantage. Signed-off-by: Howard Chu --- tools/perf/builtin-trace.c | 52 ++++++++++++++++--- .../bpf_skel/augmented_raw_syscalls.bpf.c | 35 ++++++++++--- tools/perf/util/evlist.c | 2 +- 3 files changed, 73 insertions(+), 16 deletions(-) diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 67b557ec3b0d..11620cb40198 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -4377,6 +4377,7 @@ static int trace__run(struct trace *trace, int argc, = const char **argv) unsigned long before; const bool forks =3D argc > 0; bool draining =3D false; + bool enable_evlist =3D false; =20 trace->live =3D true; =20 @@ -4447,6 +4448,9 @@ static int trace__run(struct trace *trace, int argc, = const char **argv) evlist__set_default_cgroup(trace->evlist, trace->cgroup); =20 create_maps: + if (trace->syscalls.events.bpf_output) + trace->syscalls.events.bpf_output->core.system_wide =3D true; + err =3D evlist__create_maps(evlist, &trace->opts.target); if (err < 0) { fprintf(trace->output, "Problems parsing the target to trace, check your= options!\n"); @@ -4481,20 +4485,54 @@ static int trace__run(struct trace *trace, int argc= , const char **argv) goto out_error_open; #ifdef HAVE_BPF_SKEL if (trace->syscalls.events.bpf_output) { + struct perf_evsel *perf_evsel =3D &trace->syscalls.events.bpf_output->co= re; struct perf_cpu cpu; + bool t =3D true; + + enable_evlist =3D true; + if (trace->opts.target.system_wide) + trace->skel->bss->system_wide =3D true; + else + trace->skel->bss->system_wide =3D false; =20 /* * Set up the __augmented_syscalls__ BPF map to hold for each * CPU the bpf-output event's file descriptor. */ - perf_cpu_map__for_each_cpu(cpu, i, trace->syscalls.events.bpf_output->co= re.cpus) { + perf_cpu_map__for_each_cpu(cpu, i, perf_evsel->cpus) { int mycpu =3D cpu.cpu; =20 - bpf_map__update_elem(trace->skel->maps.__augmented_syscalls__, - &mycpu, sizeof(mycpu), - xyarray__entry(trace->syscalls.events.bpf_output->core.fd, - mycpu, 0), - sizeof(__u32), BPF_ANY); + err =3D bpf_map__update_elem(trace->skel->maps.__augmented_syscalls__, + &mycpu, sizeof(mycpu), + xyarray__entry(perf_evsel->fd, mycpu, 0), + sizeof(__u32), BPF_ANY); + if (err) { + pr_err("Couldn't set system-wide bpf output perf event fd" + ", err: %d\n", err); + goto out_disable; + } + } + + if (target__has_task(&trace->opts.target)) { + struct perf_thread_map *threads =3D trace->evlist->core.threads; + + for (int thread =3D 0; thread < perf_thread_map__nr(threads); thread++)= { + pid_t pid =3D perf_thread_map__pid(threads, thread); + + err =3D bpf_map__update_elem(trace->skel->maps.pids_targeted, &pid, + sizeof(pid), &t, sizeof(t), BPF_ANY); + if (err) { + pr_err("Couldn't set pids_targeted map, err: %d\n", err); + goto out_disable; + } + } + } else if (workload_pid !=3D -1) { + err =3D bpf_map__update_elem(trace->skel->maps.pids_targeted, &workload= _pid, + sizeof(workload_pid), &t, sizeof(t), BPF_ANY); + if (err) { + pr_err("Couldn't set pids_targeted map for workload, err: %d\n", err); + goto out_disable; + } } } =20 @@ -4553,7 +4591,7 @@ static int trace__run(struct trace *trace, int argc, = const char **argv) goto out_error_mmap; } =20 - if (!target__none(&trace->opts.target) && !trace->opts.target.initial_del= ay) + if (enable_evlist || (!target__none(&trace->opts.target) && !trace->opts.= target.initial_delay)) evlist__enable(evlist); =20 if (forks) diff --git a/tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c b/tools/= perf/util/bpf_skel/augmented_raw_syscalls.bpf.c index e4352881e3fa..e517eec7290b 100644 --- a/tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c +++ b/tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c @@ -26,6 +26,7 @@ #define is_power_of_2(n) (n !=3D 0 && ((n & (n - 1)) =3D=3D 0)) =20 #define MAX_CPUS 4096 +#define MAX_PIDS 4096 =20 /* bpf-output associated map */ struct __augmented_syscalls__ { @@ -113,6 +114,15 @@ struct pids_filtered { __uint(max_entries, 64); } pids_filtered SEC(".maps"); =20 +volatile bool system_wide; + +struct pids_targeted { + __uint(type, BPF_MAP_TYPE_HASH); + __type(key, pid_t); + __type(value, bool); + __uint(max_entries, MAX_PIDS); +} pids_targeted SEC(".maps"); + struct augmented_args_payload { struct syscall_enter_args args; struct augmented_arg arg, arg2; // We have to reserve space for two argum= ents (rename, etc) @@ -145,6 +155,11 @@ struct beauty_payload_enter_map { __uint(max_entries, 1); } beauty_payload_enter_map SEC(".maps"); =20 +static pid_t getpid(void) +{ + return bpf_get_current_pid_tgid(); +} + static inline struct augmented_args_payload *augmented_args_payload(void) { int key =3D 0; @@ -418,14 +433,18 @@ int sys_enter_nanosleep(struct syscall_enter_args *ar= gs) return 1; /* Failure: don't filter */ } =20 -static pid_t getpid(void) +static bool filter_pid(void) { - return bpf_get_current_pid_tgid(); -} + if (system_wide) + return false; =20 -static bool pid_filter__has(struct pids_filtered *pids, pid_t pid) -{ - return bpf_map_lookup_elem(pids, &pid) !=3D NULL; + pid_t pid =3D getpid(); + + if (bpf_map_lookup_elem(&pids_targeted, &pid) && + !bpf_map_lookup_elem(&pids_filtered, &pid)) + return false; + + return true; } =20 static int augment_sys_enter(void *ctx, struct syscall_enter_args *args) @@ -534,7 +553,7 @@ int sys_enter(struct syscall_enter_args *args) * initial, non-augmented raw_syscalls:sys_enter payload. */ =20 - if (pid_filter__has(&pids_filtered, getpid())) + if (filter_pid()) return 0; =20 augmented_args =3D augmented_args_payload(); @@ -560,7 +579,7 @@ int sys_exit(struct syscall_exit_args *args) { struct syscall_exit_args exit_args; =20 - if (pid_filter__has(&pids_filtered, getpid())) + if (filter_pid()) return 0; =20 bpf_probe_read_kernel(&exit_args, sizeof(exit_args), args); diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index dcd1130502df..7b5837c6e6bb 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -1012,7 +1012,7 @@ int evlist__create_maps(struct evlist *evlist, struct= target *target) if (!threads) return -1; =20 - if (target__uses_dummy_map(target) && !evlist__has_bpf_output(evlist)) + if (target__uses_dummy_map(target)) cpus =3D perf_cpu_map__new_any_cpu(); else cpus =3D perf_cpu_map__new(target->cpu_list); --=20 2.45.2 From nobody Wed Feb 11 04:01:08 2026 Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) (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 383B320B80E; Fri, 30 May 2025 06:24:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748586257; cv=none; b=l3GuKbI2jlNM7W7BFKTUCgMouLbLi5talS0pNtymuNbidIcIbSHBbz5H2sJHwMdyTBy80SI2UE37MFYFD8RoFv1i/d+BLYJS0+aLPp5wUUWKqxwxblqL7WbbGGpn5b4AQFtGlyV2/bWy9FlYiz6NmbQlwcpj99rkTAtK0SRuin8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748586257; c=relaxed/simple; bh=rsHqclV0wwJ+jYvaB6k+vgMp1oYs6c5EIO//r1OUdho=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AkIWU82YKORQEXMWRnjFsYFZMkjdCTHPjn+jPQIfu8s/95Q8IWZFO46aCSxH0tssCM9Y3XHKxd/4/bz/JiTVUAnVNevnDGQDjN4qYxMI3zTGCn8owvB+huvDmFiwHhIY6YssX7HOaGQB4UKtxFl263I7WFMoJrNYYRfGB7PQBz8= 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=G2du+f0Y; arc=none smtp.client-ip=209.85.210.173 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="G2du+f0Y" Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-742c27df0daso1376906b3a.1; Thu, 29 May 2025 23:24:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1748586254; x=1749191054; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DwHMlGLBbWMktCeyAIGsdWrLp2OXZKXa5jc6etwR3FQ=; b=G2du+f0YOPaCDagqvwQ2pdBrTZbLrTFSEuLF44q35zVskN/Wc+3RbFIvyZPUtUW/kh FWXtQjNu8ry+JzEEiSfhPy+9v3UbWSQMmowxdow4hfR/Mm3TzP067e0z8CjqPnYR/INv 1ep7ax4r7S/reUbtE4mgtF8IB8RegY9GU6VzrE42Hnn/BWPINk4r9Y7zXy6ZqDwgAjV0 Ufz8PKbnYpM2QnHjNjTNs9utEFh7ZbVtaNRml3ktKtfRdZ4sHhOKAlcdQKa/AlGfon9g 4OrOFiRDvzGDGRK+xxHkJPQHA18upQsRNeKB7uf8bH5Vco3uW6Mcbr59aa1HYJHBVXl0 XElg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748586254; x=1749191054; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DwHMlGLBbWMktCeyAIGsdWrLp2OXZKXa5jc6etwR3FQ=; b=NTaRoXk7VeuBJ0ei+VQBT7qne2Ha5Ap8qR2Eg7T5zNCuujT4SeFh6HUOYjp+nW0QPQ u2qfX+GhsOpRbyztn+69uH2NGku4PxLy7suF2y5Vyhh8Wg06M7Zx0j/s5DUiS0h4Y+7Z 9dB/GZoifyHwBuHt8dWevwcSvA7HaZlqmtwpFfzQtCAVgNMb0f/yYsG0qwyzo2YeM3KB kkBwNaMrf2HWFMs1cM9P8OZwBWAwB8uuA8eH2GzbKjLRPF5ak3dP7qno3UkJf/yOaz9/ 5DJAV2b2tzFFh8j2l324DIbInqoyfaVbulSEG1GRa2SJ5GHTFbgOw+3qz9TviM9f24AP cQlw== X-Forwarded-Encrypted: i=1; AJvYcCVR68ZkOKfIGSfaKY7NMe911LaCcahDbYu0HkOsAg5exBmoI/Kv/U6ZJTG62kXAWmz5xPzEYZEgb0YF+UijLdKU3A==@vger.kernel.org, AJvYcCVbjgcuKVVfAqES9Kp7VFzv9W7qGxacTI3ruwsikPJG0Zy0kzGQ+EunHSA/4jBYPJvEP0eN4zNwA+TBrGQ=@vger.kernel.org X-Gm-Message-State: AOJu0YxnVkslqZOCRbQCYLDbf3bH2FiQqOAZJJNXRY/KnfoWDs8bA3/N lksGwTIupz2F/fN4MkS86g6vUTPxyWaQyB/KxWOPFgp280VRIs3i7cYN X-Gm-Gg: ASbGncs/RCDnIDWjAbOytAra1o3mjsjKp9N4qgiG9hKwHfK2x2xrUX5byATLi1hES2s uGzy2WSDk8RHw+Ac9NsQHh/fFCVK5b6pFMbwn03fbwDM2KgfnIhyk5679evAkRZVb5+AKypC6GI vMi9AhSgqoFRDCub6tmxRRk+bTSGH66PNWJDH4VP4lCzAuyFvJBeCMv1bxfI9c1Ea1/ManMwQuW uQG7r2FmeROm95tJ2KbX9f6nRnq7Cio0aNa9QsdVxcHHcMqXC/yn5Fj3Yh8mG1LLnLCi/8lOCQj w15g21lDGbjmIOZiMKeFchUHldIa6GyluwhFPgDrmCDV9g1h1/27nu+bpqgiFg652kJt3jZMEi9 YLRrXq6Zj3jk= X-Google-Smtp-Source: AGHT+IEWuw8NAHaYGrNnE/bVGa1Yuo/O/jxEoQUYt2NcNRy377Xme8SuumEbqFGesDEc2zI45jruLg== X-Received: by 2002:a05:6a20:2591:b0:1fe:90c5:7cfb with SMTP id adf61e73a8af0-21ad9816be9mr4005375637.27.1748586254374; Thu, 29 May 2025 23:24:14 -0700 (PDT) Received: from howard.lan (c-73-202-46-50.hsd1.ca.comcast.net. [73.202.46.50]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b2ecebb6857sm757498a12.73.2025.05.29.23.24.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 May 2025 23:24:14 -0700 (PDT) From: Howard Chu To: acme@kernel.org Cc: mingo@redhat.com, namhyung@kernel.org, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@kernel.org, irogers@google.com, adrian.hunter@intel.com, peterz@infradead.org, kan.liang@linux.intel.com, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Howard Chu Subject: [PATCH v1 2/2] perf evlist: Remove evlist__has_bpf_output() Date: Thu, 29 May 2025 23:24:08 -0700 Message-ID: <20250530062408.1438861-3-howardchu95@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250530062408.1438861-1-howardchu95@gmail.com> References: <20250530062408.1438861-1-howardchu95@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This function is no longer needed. Signed-off-by: Howard Chu --- tools/perf/util/evlist.c | 12 ------------ tools/perf/util/evlist.h | 1 - 2 files changed, 13 deletions(-) diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 7b5837c6e6bb..876952685803 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -2618,18 +2618,6 @@ void evlist__uniquify_evsel_names(struct evlist *evl= ist, const struct perf_stat_ } } =20 -bool evlist__has_bpf_output(struct evlist *evlist) -{ - struct evsel *evsel; - - evlist__for_each_entry(evlist, evsel) { - if (evsel__is_bpf_output(evsel)) - return true; - } - - return false; -} - bool evlist__needs_bpf_sb_event(struct evlist *evlist) { struct evsel *evsel; diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h index 85859708393e..dd5e32583c74 100644 --- a/tools/perf/util/evlist.h +++ b/tools/perf/util/evlist.h @@ -436,7 +436,6 @@ void evlist__format_evsels(struct evlist *evlist, struc= t strbuf *sb, size_t max_ void evlist__check_mem_load_aux(struct evlist *evlist); void evlist__warn_user_requested_cpus(struct evlist *evlist, const char *c= pu_list); void evlist__uniquify_evsel_names(struct evlist *evlist, const struct perf= _stat_config *config); -bool evlist__has_bpf_output(struct evlist *evlist); bool evlist__needs_bpf_sb_event(struct evlist *evlist); =20 #endif /* __PERF_EVLIST_H */ --=20 2.45.2