mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 03:24:19 +02:00
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>
This commit is contained in:
parent
9c33441418
commit
79056b3fe8
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user