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 v5.7-rc1 27 lines 467 B view raw
1// SPDX-License-Identifier: GPL-2.0 2#include <stdio.h> 3#include <linux/bpf.h> 4#include <unistd.h> 5#include <bpf/bpf.h> 6#include "bpf_load.h" 7#include "trace_helpers.h" 8 9int main(int ac, char **argv) 10{ 11 FILE *f; 12 char filename[256]; 13 14 snprintf(filename, sizeof(filename), "%s_kern.o", argv[0]); 15 16 if (load_bpf_file(filename)) { 17 printf("%s", bpf_log_buf); 18 return 1; 19 } 20 21 f = popen("taskset 1 ping -c5 localhost", "r"); 22 (void) f; 23 24 read_trace_pipe(); 25 26 return 0; 27}