1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (c) 2021 Facebook */
4 #include <bpf/bpf_helpers.h>
5 #include <bpf/bpf_tracing.h>
7 #if __has_attribute(btf_decl_tag)
8 #define __tag1 __attribute__((btf_decl_tag("tag1")))
9 #define __tag2 __attribute__((btf_decl_tag("tag2")))
10 volatile const bool skip_tests __tag1 __tag2 = false;
14 volatile const bool skip_tests = true;
26 } value_t __tag1 __tag2;
29 __uint(type, BPF_MAP_TYPE_HASH);
30 __uint(max_entries, 3);
31 __type(key, struct key_t);
32 __type(value, value_t);
33 } hashmap1 SEC(".maps");
36 static __noinline int foo(int x __tag1 __tag2) __tag1 __tag2
41 key.a = key.b = key.c = x;
42 bpf_map_update_elem(&hashmap1, &key, &val, 0);
46 SEC("fentry/bpf_fentry_test1")
47 int BPF_PROG(sub, int x)