Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf ftrace: Remove an unnecessary condition check in BPF

The bucket_num is set based on the {max,min}_latency already in
cmd_ftrace(), so no need to check it again in BPF. Also I found
that it didn't pass the max_latency to BPF. :)

No functional changes intended.

Cc: Gabriele Monaco <gmonaco@redhat.com>
Link: https://lore.kernel.org/r/20250227191223.1288473-2-namhyung@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>

+1 -2
+1 -2
tools/perf/util/bpf_skel/func_latency.bpf.c
··· 125 125 // than the min latency desired. 126 126 if (val > 0) { // 1st entry: [ 1 unit .. bucket_range units ) 127 127 key = val / bucket_range + 1; 128 - if (key >= bucket_num || 129 - val >= max_latency - min_latency) 128 + if (key >= bucket_num) 130 129 key = bucket_num - 1; 131 130 } 132 131