Skip to content

Commit

Permalink
libbpf-tools/hardirqs: Fix logarithmic calculation issue
Browse files Browse the repository at this point in the history
Should use log2l

Signed-off-by: Feng Yang <[email protected]>
  • Loading branch information
kknjh committed Feb 7, 2025
1 parent e80ad4d commit 3896116
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libbpf-tools/hardirqs.bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ static int handle_exit(int irq, struct irqaction *action)
} else {
u64 slot;

slot = log2(delta);
slot = log2l(delta);
if (slot >= MAX_SLOTS)
slot = MAX_SLOTS - 1;
info->slots[slot]++;
Expand Down

0 comments on commit 3896116

Please sign in to comment.