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

[RFC] introduce periodic BPF programs #924

Closed
wants to merge 1 commit into from

Commits on Jan 31, 2023

  1. link: introduce periodic BPF programs

    link.Periodic attaches an eBPF program to a periodic perf event running
    on specified CPU at specified frequency. Similarly, link.PeriodicAllCpus
    does the same for each online CPU. Under the hood, this uses a
    PERF_COUNT_SW_CPU_CLOCK perf event.
    
    The design of this module is symmetric to the tracepoint module and
    re-uses most of the logic and based on an original example by @florianl
    https://gist.github.com/florianl/5d9cc9dbb3822e03f6f65a073ffbedbb.
    
    The main use-case for this module is to periodically sample kernel state
    to build higher level performance metrics like runqlen or a custom
    profiler using bpf_get_stackid().
    
    Signed-off-by: Jean-Tiare Le Bigot <jt@yadutaf.fr>
    yadutaf committed Jan 31, 2023
    Configuration menu
    Copy the full SHA
    221ce34 View commit details
    Browse the repository at this point in the history