[PATCH v2 2/3] samples/bpf: Add a sampling BPF example

2016-08-02 Thread Brendan Gregg
This example samples the instruction pointer at a timed interval, and frequency counts it in a BPF map. It is an example of summarizing sampled data in-kernel for passing to user space. It uses the perf:perf_hrtimer tracepoint with perf_events sampling. Example output: Sampling at 99 Hertz for 5

[PATCH v2 2/3] samples/bpf: Add a sampling BPF example

2016-08-02 Thread Brendan Gregg
This example samples the instruction pointer at a timed interval, and frequency counts it in a BPF map. It is an example of summarizing sampled data in-kernel for passing to user space. It uses the perf:perf_hrtimer tracepoint with perf_events sampling. Example output: Sampling at 99 Hertz for 5