Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ebpf): optimize filldir64 program #4183

Merged
merged 1 commit into from
Jul 16, 2024

Commits on Jul 16, 2024

  1. chore(ebpf): optimize filldir64 program

    The filldir64 program runs very frequently, and as such incurs great
    overhead. However, its usecase only requires the submission of events
    from pid 0 inodes. Since this filter is faster than scope evaluation,
    the condition check is moved before program data initialization and
    scope evaluation.
    
    Optimization reduces the average runtime to ~18% of the previous
    overhead. Note, that even for more run amounts, the overall runtime is
    now 27% from the previous version.
    
    Before:
    PROGRAM: filldir64 (type: kprobe, runtime: 61047110 ns, amount: 53135 times, average: 1148 ns)
    After:
    PROGRAM: filldir64 (type: kprobe, runtime: 16507056 ns, amount: 80350 times, average: 205 ns)
    NDStrahilevitz committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    0785d75 View commit details
    Browse the repository at this point in the history