Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v6.19-rc2 21 lines 387 B view raw
1// SPDX-License-Identifier: GPL-2.0 2// Copyright (c) 2018 Facebook 3 4#include <linux/bpf.h> 5#include <bpf/bpf_helpers.h> 6 7__u64 cg_id; 8__u64 expected_pid; 9 10SEC("tracepoint/syscalls/sys_enter_nanosleep") 11int trace(void *ctx) 12{ 13 __u32 pid = bpf_get_current_pid_tgid(); 14 15 if (expected_pid == pid) 16 cg_id = bpf_get_current_cgroup_id(); 17 18 return 0; 19} 20 21char _license[] SEC("license") = "GPL";