Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libbpf-tools/offcputime.bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ static int handle_sched_switch(void *ctx, bool preempt, struct task_struct *prev
delta = (s64)(bpf_ktime_get_ns() - i_keyp->start_ts);
if (delta < 0)
goto cleanup;
delta /= 1000U;
if (delta < min_block_ns || delta > max_block_ns)
goto cleanup;
delta /= 1000U;
valp = bpf_map_lookup_elem(&info, &i_keyp->key);
if (!valp)
goto cleanup;
Expand Down
Loading