int augmented_syscalls__prepare(void)
{ struct bpf_program *prog; char buf[128]; int err;
skel = augmented_raw_syscalls_bpf__open(); if (!skel) {
pr_debug("Failed to open augmented syscalls BPF skeleton\n"); return -errno;
}
/* * Disable attaching the BPF programs except for sys_enter and * sys_exit that tail call into this as necessary.
*/
bpf_object__for_each_program(prog, skel->obj) { if (prog != skel->progs.sys_enter && prog != skel->progs.sys_exit)
bpf_program__set_autoattach(prog, /*autoattach=*/false);
}
int augmented_syscalls__create_bpf_output(struct evlist *evlist)
{ int err = parse_event(evlist, "bpf-output/no-inherit=1,name=__augmented_syscalls__/");
void augmented_syscalls__setup_bpf_output(void)
{ struct perf_cpu cpu; int i;
if (bpf_output == NULL) return;
/* * Set up the __augmented_syscalls__ BPF map to hold for each * CPU the bpf-output event's file descriptor.
*/
perf_cpu_map__for_each_cpu(cpu, i, bpf_output->core.cpus) { int mycpu = cpu.cpu;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.