diff options
| author | Namhyung Kim <namhyung@kernel.org> | 2025-02-27 11:12:22 -0800 |
|---|---|---|
| committer | Namhyung Kim <namhyung@kernel.org> | 2025-03-13 00:18:10 -0700 |
| commit | 79056b3fe8878fa77ea8e9cbe062e428d2845982 (patch) | |
| tree | 12dc795fbfabaf418945ed24f4356479913174dc /tools/perf/util | |
| parent | perf ftrace: Fix latency stats with BPF (diff) | |
| download | linux-79056b3fe8878fa77ea8e9cbe062e428d2845982.tar.gz linux-79056b3fe8878fa77ea8e9cbe062e428d2845982.zip | |
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>
Diffstat (limited to 'tools/perf/util')
| -rw-r--r-- | tools/perf/util/bpf_skel/func_latency.bpf.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/perf/util/bpf_skel/func_latency.bpf.c b/tools/perf/util/bpf_skel/func_latency.bpf.c index 3d3d9f427c20..ad7054744678 100644 --- a/tools/perf/util/bpf_skel/func_latency.bpf.c +++ b/tools/perf/util/bpf_skel/func_latency.bpf.c @@ -125,8 +125,7 @@ int BPF_PROG(func_end) // than the min latency desired. if (val > 0) { // 1st entry: [ 1 unit .. bucket_range units ) key = val / bucket_range + 1; - if (key >= bucket_num || - val >= max_latency - min_latency) + if (key >= bucket_num) key = bucket_num - 1; } |
