summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2018-06-03 18:22:42 -0700
committerAlexei Starovoitov <ast@kernel.org>2018-06-03 18:22:42 -0700
commit432bdb581e410ad3cea8f04e9323397f17501e3e (patch)
tree74151563ca1a780f930b7537846123d165af5829 /samples
parentea9916ea3ed98d0a1f67f5cbe8ed8ae28e37f8c8 (diff)
parentf269099a7e7a0c6732c4a817d0e99e92216414d9 (diff)
Merge branch 'bpf_get_current_cgroup_id'
Yonghong Song says: ==================== bpf has been used extensively for tracing. For example, bcc contains an almost full set of bpf-based tools to trace kernel and user functions/events. Most tracing tools are currently either filtered based on pid or system-wide. Containers have been used quite extensively in industry and cgroup is often used together to provide resource isolation and protection. Several processes may run inside the same container. It is often desirable to get container-level tracing results as well, e.g. syscall count, function count, I/O activity, etc. This patch implements a new helper, bpf_get_current_cgroup_id(), which will return cgroup id based on the cgroup within which the current task is running. Patch #1 implements the new helper in the kernel. Patch #2 syncs the uapi bpf.h header and helper between tools and kernel. Patch #3 shows how to get the same cgroup id in user space, so a filter or policy could be configgured in the bpf program based on current task cgroup. Changelog: v1 -> v2: . rebase to resolve merge conflict with latest bpf-next. ==================== Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions