]> git.baikalelectronics.ru Git - kernel.git/commit
samples/bpf: offwaketime example
authorAlexei Starovoitov <ast@fb.com>
Thu, 18 Feb 2016 03:58:59 +0000 (19:58 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 20 Feb 2016 05:21:44 +0000 (00:21 -0500)
commit82414793f5126891273d1455663c9d37d4080fc9
treeec8f20a73795ff16ed02887eb72870eeeee186a8
parentbbb0755401a3a9d4ab41363cb3b8dd9a54e172ee
samples/bpf: offwaketime example

This is simplified version of Brendan Gregg's offwaketime:
This program shows kernel stack traces and task names that were blocked and
"off-CPU", along with the stack traces and task names for the threads that woke
them, and the total elapsed time from when they blocked to when they were woken
up. The combined stacks, task names, and total time is summarized in kernel
context for efficiency.

Example:
$ sudo ./offwaketime | flamegraph.pl > demo.svg
Open demo.svg in the browser as FlameGraph visualization.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
samples/bpf/Makefile
samples/bpf/bpf_helpers.h
samples/bpf/offwaketime_kern.c [new file with mode: 0644]
samples/bpf/offwaketime_user.c [new file with mode: 0644]