tools/testing/selftests/bpf/progs/tracing_multi_rollback.c

Source file repositories/reference/linux-study-clean/tools/testing/selftests/bpf/progs/tracing_multi_rollback.c

File Facts

System
Linux kernel
Corpus path
tools/testing/selftests/bpf/progs/tracing_multi_rollback.c
Extension
.c
Size
655 bytes
Lines
44
Domain
Support Tooling And Documentation
Bucket
tools
Inferred role
Support Tooling And Documentation: implementation source
Status
source implementation candidate

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

// SPDX-License-Identifier: GPL-2.0
#include <vmlinux.h>
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>

char _license[] SEC("license") = "GPL";

int pid = 0;

__u64 test_result_fentry = 0;
__u64 test_result_fexit = 0;

SEC("?fentry.multi")
int BPF_PROG(test_fentry)
{
	if (bpf_get_current_pid_tgid() >> 32 != pid)
		return 0;

	test_result_fentry++;
	return 0;
}

SEC("?fexit.multi")
int BPF_PROG(test_fexit)
{
	if (bpf_get_current_pid_tgid() >> 32 != pid)
		return 0;

	test_result_fexit++;
	return 0;
}

SEC("?fentry/bpf_fentry_test1")
int BPF_PROG(extra)
{
	return 0;
}

SEC("?fentry/bpf_fentry_test10")
int BPF_PROG(filler)
{
	return 0;
}

Annotation

Implementation Notes