Skip to content

Commit f954eb1

Browse files
authored
libbpf-tools/softirqs: Fix logarithmic calculation issue (#5208)
Should use log2l. Signed-off-by: Feng Yang <[email protected]>
1 parent cccb26e commit f954eb1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libbpf-tools/softirqs.bpf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ static int handle_exit(unsigned int vec_nr)
6666
u64 slot;
6767

6868
hist = &hists[vec_nr];
69-
slot = log2(delta);
69+
slot = log2l(delta);
7070
if (slot >= MAX_SLOTS)
7171
slot = MAX_SLOTS - 1;
7272
__sync_fetch_and_add(&hist->slots[slot], 1);

0 commit comments

Comments
 (0)