/external/bcc/src/lua/ |
D | bpf-scm-1.rockspec | 1 package = "bpf" 29 bpf = "src/lua/bpf/bpf.lua", 30 ["bpf.builtins"] = "src/lua/bpf/builtins.lua", 31 ["bpf.cdef"] = "src/lua/bpf/cdef.lua", 32 ["bpf.elf"] = "src/lua/bpf/elf.lua", 33 ["bpf.init"] = "src/lua/bpf/init.lua", 34 ["bpf.ljbytecode"] = "src/lua/bpf/ljbytecode.lua", 35 ["bpf.proto"] = "src/lua/bpf/proto.lua",
|
D | squishy | 9 Module "bcc.bpf" "bcc/bpf.lua" 16 Module "bpf" "bpf/init.lua" 17 Module "bpf.bpf" "bpf/bpf.lua" 18 Module "bpf.builtins" "bpf/builtins.lua" 19 Module "bpf.cdef" "bpf/cdef.lua" 20 Module "bpf.elf" "bpf/elf.lua" 21 Module "bpf.ljbytecode" "bpf/ljbytecode.lua" 22 Module "bpf.proto" "bpf/proto.lua"
|
/external/bcc/tests/cc/ |
D | test_perf_event.cc | 56 ebpf::BPF bpf; variable 58 res = bpf.init( 63 bpf.open_perf_event("cnt", PERF_TYPE_SOFTWARE, PERF_COUNT_SW_CPU_CLOCK); 65 std::string getuid_fnname = bpf.get_syscall_fnname("getuid"); 66 res = bpf.attach_kprobe(getuid_fnname, "on_sys_getuid"); 69 res = bpf.detach_kprobe(getuid_fnname); 71 res = bpf.close_perf_event("cnt"); 74 auto val = bpf.get_hash_table<int, uint64_t>("val"); 80 bpf.get_hash_table<int, struct bpf_perf_event_value>("counter"); 82 auto ret = bpf.get_hash_table<int, int>("ret"); [all …]
|
D | test_bpf_table.cc | 29 ebpf::BPF *bpf(new ebpf::BPF); 32 res = bpf->init(BPF_PROGRAM); 35 ebpf::BPFTable t = bpf->get_table("myhash"); 82 delete bpf; 100 ebpf::BPF bpf; variable 102 res = bpf.init(BPF_PROGRAM); 105 ebpf::BPFTable t = bpf.get_table("myhash"); 130 ebpf::BPF bpf; variable 132 res = bpf.init(BPF_PROGRAM); 135 auto t = bpf.get_hash_table<int, int>("myhash"); [all …]
|
D | test_array_table.cc | 33 ebpf::BPF bpf(0, nullptr, false); variable 35 res = bpf.init(BPF_PROGRAM); 38 ebpf::BPFArrayTable<int> t = bpf.get_array_table<int>("myarray"); 43 bpf.get_array_table<int>("myhash"); in __anonfce37d410102() 105 ebpf::BPF bpf; variable 107 res = bpf.init(BPF_PROGRAM); 110 ebpf::BPFPercpuArrayTable<uint64_t> t = bpf.get_percpu_array_table<uint64_t>("myarray"); 116 bpf.get_percpu_array_table<uint64_t>("myhash"); in __anonfce37d410202()
|
/external/minijail/tools/ |
D | compiler_unittest.py | 28 import bpf 49 self.arch, kill_action=bpf.KillProcess()) 54 kill_action=bpf.KillProcess()) 76 bpf.SockFilter(bpf.BPF_LD | bpf.BPF_W | bpf.BPF_ABS, 0, 0, 77 bpf.arg_offset(0, True)), 79 bpf.SockFilter(bpf.BPF_JMP | bpf.BPF_JEQ | bpf.BPF_K, 0, 2, 0), 80 bpf.SockFilter(bpf.BPF_LD | bpf.BPF_W | bpf.BPF_ABS, 0, 0, 81 bpf.arg_offset(0, False)), 83 bpf.SockFilter(bpf.BPF_JMP | bpf.BPF_JEQ | bpf.BPF_K, 1, 0, 85 bpf.SockFilter(bpf.BPF_RET, 0, 0, [all …]
|
D | compiler.py | 23 import bpf 62 return bpf.simulate(self.filter.instructions, arch, syscall_number, 114 bpf.SyscallEntry( 115 entry.numbers[0], action, reject_action, op=bpf.BPF_JEQ)) 120 bpf.SyscallEntry( 121 entry.numbers[1], reject_action, action, op=bpf.BPF_JGE)) 126 bpf.SyscallEntry( 127 entry.numbers[0], action, reject_action, op=bpf.BPF_JGE)) 130 upper_entry = bpf.SyscallEntry( 131 entry.numbers[1], reject_action, action, op=bpf.BPF_JGE) [all …]
|
D | parser_unittest.py | 29 import bpf 103 self.arch, kill_action=bpf.KillProcess()) 249 self.arch, kill_action=bpf.KillProcess()) 309 self.arch, kill_action=bpf.KillProcess()) 319 parser.Filter([[parser.Atom(0, '==', 0)]], bpf.Allow()), 323 parser.Filter(None, bpf.KillProcess()), 327 parser.Filter(None, bpf.KillThread()), 331 parser.Filter(None, bpf.Trap()), 336 bpf.ReturnErrno(self.arch.constants['ENOSYS'])), 340 parser.Filter(None, bpf.Trace()), [all …]
|
/external/bcc/src/cc/export/ |
D | helpers.h | 254 int bpf_trace_printk(const char *fmt, ...) asm("llvm.bpf.extra"); 444 unsigned long long off) asm("llvm.bpf.load.byte"); 446 unsigned long long off) asm("llvm.bpf.load.half"); 448 unsigned long long off) asm("llvm.bpf.load.word"); 518 void bpf_store_byte(void *skb, u64 off, u64 val) asm("llvm.bpf.store.byte"); 519 void bpf_store_half(void *skb, u64 off, u64 val) asm("llvm.bpf.store.half"); 520 void bpf_store_word(void *skb, u64 off, u64 val) asm("llvm.bpf.store.word"); 521 u64 bpf_pseudo_fd(u64, u64) asm("llvm.bpf.pseudo"); 674 int incr_cksum_l3(void *off, u64 oldval, u64 newval) asm("llvm.bpf.extra"); 675 int incr_cksum_l4(void *off, u64 oldval, u64 newval, u64 flags) asm("llvm.bpf.extra"); [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/test/CodeGen/BPF/ |
D | sockex2.ll | 13 %2 = call i64 @llvm.bpf.load.half(i8* %1, i64 12) #2 18 %5 = call i64 @llvm.bpf.load.half(i8* %1, i64 16) #2 29 %10 = call i64 @llvm.bpf.load.half(i8* %1, i64 %9) #2 43 %15 = call i64 @llvm.bpf.load.half(i8* %1, i64 %14) #2 50 %20 = call i64 @llvm.bpf.load.byte(i8* %1, i64 %19) #2 57 %24 = call i64 @llvm.bpf.load.word(i8* %1, i64 %23) #2 59 %26 = call i64 @llvm.bpf.load.word(i8* %1, i64 %25) #2 66 %31 = call i64 @llvm.bpf.load.byte(i8* %1, i64 %nhoff.1.i) #2 82 %41 = call i64 @llvm.bpf.load.byte(i8* %1, i64 %40) #2 84 %43 = call i64 @llvm.bpf.load.word(i8* %1, i64 %42) #2 [all …]
|
/external/llvm/test/CodeGen/BPF/ |
D | sockex2.ll | 13 %2 = call i64 @llvm.bpf.load.half(i8* %1, i64 12) #2 18 %5 = call i64 @llvm.bpf.load.half(i8* %1, i64 16) #2 29 %10 = call i64 @llvm.bpf.load.half(i8* %1, i64 %9) #2 43 %15 = call i64 @llvm.bpf.load.half(i8* %1, i64 %14) #2 50 %20 = call i64 @llvm.bpf.load.byte(i8* %1, i64 %19) #2 57 %24 = call i64 @llvm.bpf.load.word(i8* %1, i64 %23) #2 59 %26 = call i64 @llvm.bpf.load.word(i8* %1, i64 %25) #2 66 %31 = call i64 @llvm.bpf.load.byte(i8* %1, i64 %nhoff.1.i) #2 82 %41 = call i64 @llvm.bpf.load.byte(i8* %1, i64 %40) #2 84 %43 = call i64 @llvm.bpf.load.word(i8* %1, i64 %42) #2 [all …]
|
D | intrinsics.ll | 5 %1 = tail call i64 @llvm.bpf.load.byte(i8* %ctx, i64 123) #2 9 %5 = tail call i64 @llvm.bpf.load.byte(i8* %ctx2, i64 %foo) #2 20 declare i64 @llvm.bpf.load.byte(i8*, i64) #1 24 %1 = tail call i64 @llvm.bpf.load.half(i8* %ctx, i64 123) #2 26 %3 = tail call i64 @llvm.bpf.load.half(i8* %ctx2, i64 %2) #2 35 declare i64 @llvm.bpf.load.half(i8*, i64) #1 39 %1 = tail call i64 @llvm.bpf.load.word(i8* %ctx, i64 123) #2 41 %3 = tail call i64 @llvm.bpf.load.word(i8* %ctx2, i64 %2) #2 50 declare i64 @llvm.bpf.load.word(i8*, i64) #1 54 %call = tail call i64 @llvm.bpf.pseudo(i64 2, i64 3) [all …]
|
/external/libpcap/msdos/ |
D | makefile | 107 bpf_filt.obj: bpf_filt.c pcap-int.h pcap.h pcap-bpf.h gnuc.h 109 bpf_imag.obj: bpf_imag.c pcap-int.h pcap.h pcap-bpf.h 111 bpf_dump.obj: bpf_dump.c pcap.h pcap-bpf.h 113 etherent.obj: etherent.c pcap-int.h pcap.h pcap-bpf.h pcap-namedb.h 115 optimize.obj: optimize.c pcap-int.h pcap.h pcap-bpf.h gencode.h 117 savefile.obj: savefile.c pcap-int.h pcap.h pcap-bpf.h 119 pcap.obj: pcap.c pcap-dos.h pcap-int.h pcap.h pcap-bpf.h 121 grammar.obj: grammar.c pcap-int.h pcap.h pcap-bpf.h gencode.h \ 124 scanner.obj: scanner.c pcap-int.h pcap.h pcap-bpf.h gencode.h \ 127 gencode.obj: gencode.c pcap-dos.h pcap-int.h pcap.h pcap-bpf.h \ [all …]
|
D | makefile.wc | 55 $(OBJDIR)\bpf_filter.obj: bpf\net\bpf_filter.c 56 *$(CC) $(CFLAGS) bpf\net\bpf_filter.c -fo=$@ 97 $(OBJDIR)\bpf_filter.obj: bpf\net\bpf_filter.c pcap-int.h pcap.h pcap-bpf.h 99 $(OBJDIR)\bpf_imag.obj: bpf_imag.c pcap-int.h pcap.h pcap-bpf.h 101 $(OBJDIR)\bpf_dump.obj: bpf_dump.c pcap.h pcap-bpf.h 103 $(OBJDIR)\etherent.obj: etherent.c pcap-int.h pcap.h pcap-bpf.h pcap-namedb.h 105 $(OBJDIR)\optimize.obj: optimize.c pcap-int.h pcap.h pcap-bpf.h gencode.h 107 $(OBJDIR)\savefile.obj: savefile.c pcap-int.h pcap.h pcap-bpf.h 109 $(OBJDIR)\pcap.obj: pcap.c pcap-dos.h pcap-int.h pcap.h pcap-bpf.h 111 $(OBJDIR)\grammar.obj: grammar.c pcap-int.h pcap.h pcap-bpf.h gencode.h & [all …]
|
/external/bcc/src/lua/bcc/ |
D | table.lua | 34 function BaseTable:initialize(t_type, bpf, map_id, map_fd, key_type, leaf_type) 35 assert(t_type == libbcc.bpf_table_type_id(bpf.module, map_id)) 38 self.bpf = bpf 51 self.bpf.module, self.map_id, pbuf, buf_len, pkey) 63 self.bpf.module, self.map_id, pbuf, buf_len, pleaf) 72 self.bpf.module, self.map_id, key_str, pkey) 80 self.bpf.module, self.map_id, leaf_str, pleaf) 152 function HashTable:initialize(bpf, map_id, map_fd, key_type, leaf_type) 153 BaseTable.initialize(self, BaseTable.BPF_MAP_TYPE_HASH, bpf, map_id, map_fd, key_type, leaf_type) 171 function BaseArray:initialize(t_type, bpf, map_id, map_fd, key_type, leaf_type) [all …]
|
/external/bcc/tools/lib/ |
D | ucalls.py | 261 bpf = BPF(text=program, usdt_contexts=[usdt] if usdt else []) variable 264 bpf.attach_kprobe(event_re=syscall_regex, fn_name="syscall_entry") 266 bpf.attach_kretprobe(event_re=syscall_regex, fn_name="syscall_return") 268 bpf.num_open_kprobes()) 277 bpf["times"].items())) 283 bpf["counts"].items())) 287 syscalls = map(lambda kv: (bpf.ksym(kv[0].value), 289 bpf["systimes"].items()) 292 syscalls = map(lambda kv: (bpf.ksym(kv[0].value), 294 bpf["syscounts"].items()) [all …]
|
/external/bcc/examples/cpp/ |
D | RandomRead.cc | 74 ebpf::BPF* bpf; variable 78 delete bpf; in signal_handler() 92 bpf = new ebpf::BPF(); in main() 93 auto init_res = bpf->init(BPF_PROGRAM, cflags, {}); in main() 99 auto cgroup_array = bpf->get_cgroup_array("cgroup"); in main() 108 bpf->attach_tracepoint("random:urandom_read", "on_urandom_read"); in main() 114 auto open_res = bpf->open_perf_buffer("events", &handle_output); in main() 123 bpf->poll_perf_buffer("events"); in main()
|
D | LLCStat.cc | 70 ebpf::BPF bpf; in main() local 71 auto init_res = bpf.init(BPF_PROGRAM); in main() 78 bpf.attach_perf_event(PERF_TYPE_HARDWARE, PERF_COUNT_HW_CACHE_REFERENCES, in main() 84 auto attach_miss_res = bpf.attach_perf_event( in main() 97 bpf.detach_perf_event(PERF_TYPE_HARDWARE, PERF_COUNT_HW_CACHE_REFERENCES); in main() 98 bpf.detach_perf_event(PERF_TYPE_HARDWARE, PERF_COUNT_HW_CACHE_MISSES); in main() 100 auto refs = bpf.get_hash_table<event_t, uint64_t>("ref_count"); in main() 101 auto misses = bpf.get_hash_table<event_t, uint64_t>("miss_count"); in main()
|
D | FollyRequestContextSwitch.cc | 93 ebpf::BPF* bpf = new ebpf::BPF(); in main() local 95 auto init_res = bpf->init(BPF_PROGRAM, {}, {u}); in main() 101 auto attach_res = bpf->attach_usdt(u); in main() 109 auto open_res = bpf->open_perf_buffer("events", &handle_output); in main() 117 bpf->detach_usdt(u); in main() 118 delete bpf; in main() 124 auto perf_buffer = bpf->get_perf_buffer("events"); in main()
|
/external/bcc/scripts/ |
D | README.md | 6 `./build_bpf_demo.sh -n bpf-demo -k bpf_demo.ks.erb` 11 To set up a kernel with the right options, run `bpf-kernel-setup`. 14 [root@bpf-demo ~]# bpf-kernel-setup 21 [*] Enable bpf() system call 30 kernel. This kernel has updated userspace headers (e.g. the bpf() syscall) which 34 Next, run `bpf-llvm-setup` to pull and compile LLVM with BPF support enabled. 36 [root@bpf-demo ~]# bpf-llvm-setup 43 [root@bpf-demo ~]# kexec-4.1.0-rc1+ 50 [root@bpf-demo ~]# bcc-setup
|
/external/bcc/examples/lua/ |
D | memleak.lua | 127 local bpf = BPF:new{text=text, debug=0} 133 bpf:attach_uprobe{name="c", sym="malloc", fn_name="alloc_enter", pid=args.pid} 134 bpf:attach_uprobe{name="c", sym="malloc", fn_name="alloc_exit", pid=args.pid, retprobe=true} 135 bpf:attach_uprobe{name="c", sym="free", fn_name="free_enter", pid=args.pid} 138 bpf:attach_kprobe{event="__kmalloc", fn_name="alloc_enter"} 139 bpf:attach_kprobe{event="__kmalloc", fn_name="alloc_exit", retprobe=true} -- TODO 140 bpf:attach_kprobe{event="kfree", fn_name="free_enter"} 144 local allocs = bpf:get_table("allocs") 145 local stack_traces = bpf:get_table("stack_traces") 194 local pipe = bpf:pipe()
|
/external/bcc/tools/ |
D | biosnoop.lua | 123 local bpf = BPF:new{text=program} 125 bpf:attach_kprobe{event="blk_account_io_start", fn_name="trace_pid_start"} 126 bpf:attach_kprobe{event="blk_start_request", fn_name="trace_req_start"} 127 bpf:attach_kprobe{event="blk_mq_start_request", fn_name="trace_req_start"} 128 bpf:attach_kprobe{event="blk_account_io_completion", 180 bpf:get_table("events"):open_perf_buffer(print_event, [[ 192 bpf:perf_buffer_poll_loop()
|
D | memleak.py | 394 bpf = BPF(text=bpf_source) variable 404 bpf.attach_uprobe(name=obj, sym=sym, 407 bpf.attach_uretprobe(name=obj, sym=sym, 424 bpf.attach_uprobe(name=obj, sym="free", fn_name="free_enter", 451 allocs = bpf["allocs"] 452 stack_traces = bpf["stack_traces"] 464 combined.append(bpf.sym(addr, pid, 478 stack_traces = bpf["stack_traces"] 479 stacks = sorted(bpf["combined_allocs"].items(), 487 sym = bpf.sym(addr, pid, [all …]
|
/external/syzkaller/sys/linux/ |
D | bpf.txt | 8 include <linux/bpf.h> 15 bpf$MAP_CREATE(cmd const[BPF_MAP_CREATE], arg ptr[in, bpf_map_create_arg], size len[arg]) fd_bpf_map 16 bpf$MAP_LOOKUP_ELEM(cmd const[BPF_MAP_LOOKUP_ELEM], arg ptr[in, bpf_map_lookup_arg], size len[arg]) 17 bpf$MAP_UPDATE_ELEM(cmd const[BPF_MAP_UPDATE_ELEM], arg ptr[in, bpf_map_update_arg], size len[arg]) 18 bpf$MAP_DELETE_ELEM(cmd const[BPF_MAP_DELETE_ELEM], arg ptr[in, bpf_map_delete_arg], size len[arg]) 19 bpf$MAP_GET_NEXT_KEY(cmd const[BPF_MAP_GET_NEXT_KEY], arg ptr[in, bpf_map_get_next_arg], size len[a… 20 bpf$PROG_LOAD(cmd const[BPF_PROG_LOAD], arg ptr[in, bpf_prog], size len[arg]) fd_bpf_prog 21 bpf$OBJ_PIN_MAP(cmd const[BPF_OBJ_PIN], arg ptr[in, bpf_obj_pin_map], size len[arg]) 22 bpf$OBJ_PIN_PROG(cmd const[BPF_OBJ_PIN], arg ptr[in, bpf_obj_pin_prog], size len[arg]) 23 bpf$OBJ_GET_MAP(cmd const[BPF_OBJ_GET], arg ptr[in, bpf_obj_get], size len[arg]) fd_bpf_map [all …]
|
/external/bcc/src/python/bcc/ |
D | table.py | 125 def Table(bpf, map_id, map_fd, keytype, leaftype, **kwargs): argument 130 ttype = lib.bpf_table_type_id(bpf.module, map_id) 133 t = HashTable(bpf, map_id, map_fd, keytype, leaftype) 135 t = Array(bpf, map_id, map_fd, keytype, leaftype) 137 t = ProgArray(bpf, map_id, map_fd, keytype, leaftype) 139 t = PerfEventArray(bpf, map_id, map_fd, keytype, leaftype) 141 t = PerCpuHash(bpf, map_id, map_fd, keytype, leaftype, **kwargs) 143 t = PerCpuArray(bpf, map_id, map_fd, keytype, leaftype, **kwargs) 145 t = LpmTrie(bpf, map_id, map_fd, keytype, leaftype) 147 t = StackTrace(bpf, map_id, map_fd, keytype, leaftype) [all …]
|