/external/bcc/tests/python/ |
D | test_clang.py | 5 from bcc import BPF 40 b = BPF(src_file="test_clang_complex.c", debug=0) 41 fn = b.load_func("handle_packet", BPF.SCHED_CLS) 53 b = BPF(text=text, debug=0) 54 fn = b.load_func("handle_packet", BPF.SCHED_CLS) 65 b = BPF(text=text, debug=0) 66 fn = b.load_func("count_sched", BPF.KPROBE) 76 b = BPF(text=text, debug=0) 77 fn = b.load_func("count_foo", BPF.KPROBE) 88 b = BPF(text=text) [all …]
|
D | test_license.py | 6 from bcc import BPF 62 b = BPF(text=self.gpl_only_text) 66 b = BPF(text=self.gpl_only_text + self.license('GPL')) 70 b = BPF(text=self.proprietary_text + self.license('Proprietary')) 74 b = BPF(text=self.gpl_only_text + self.license('Dual BSD/GPL')) 78 b = BPF(text=self.proprietary_text + self.license('Proprietary license')) 83 b = BPF(text=self.gpl_only_text, cflags=["-DBPF_LICENSE=GPL"]) 88 b = BPF(text=self.gpl_only_text + self.license('GPL'), cflags=["-DBPF_LICENSE=GPL"]) 93 b = BPF(text=self.gpl_only_text + self.license('')) 98 b = BPF(text=self.gpl_only_text + self.license('Proprietary license')) [all …]
|
D | test_probe_count.py | 5 from bcc import BPF, _get_num_open_probes, TRACEFS 12 self.b = BPF(text=""" 34 self.b1 = BPF(text="""int count(void *ctx) { return 0; }""") 35 self.b2 = BPF(text="""int count(void *ctx) { return 0; }""") 50 self.b = BPF(text=""" 64 self.b = BPF(text="""int count(void *ctx) { return 0; }""") 80 self.b = BPF(text="""int count(void *ctx) { return 0; }""")
|
D | test_call1.py | 7 from bcc import BPF 23 b = BPF(src_file=arg1, debug=0) 24 ether_fn = b.load_func("parse_ether", BPF.SCHED_CLS) 25 arp_fn = b.load_func("parse_arp", BPF.SCHED_CLS) 26 ip_fn = b.load_func("parse_ip", BPF.SCHED_CLS) 27 eop_fn = b.load_func("eop", BPF.SCHED_CLS)
|
D | test_bpf_log.py | 5 from bcc import BPF 48 b = BPF(text=text, debug=2) 50 ingress = b.load_func("sim_port",BPF.SCHED_CLS) 58 b = BPF(text=text, debug=0) 60 ingress = b.load_func("sim_port",BPF.SCHED_CLS)
|
/external/bcc/src/lua/bpf/ |
D | builtins.lua | 20 local BPF, HELPER = ffi.typeof('struct bpf'), ffi.typeof('struct bpf_func_id') 22 [1] = BPF.B, [2] = BPF.H, [4] = BPF.W, [8] = BPF.DW, 79 e.emit(BPF.ALU + BPF.END + BPF.TO_BE, e.vreg(dst), 0, 0, w) 87 e.emit(BPF.ALU + BPF.END + BPF.TO_LE, e.vreg(dst), 0, 0, w) 121 e.emit(BPF.JMP + BPF.JEQ + BPF.K, dst_reg, 0, 1, 0) -- if (dst != NULL) 123 e.emit(BPF.XADD + BPF.STX + const_width[w], dst_reg, src_reg, off or 0, 0) 133 e.emit(BPF.ALU64 + BPF.MOV + BPF.X, 1, 10, 0, 0) 137 e.emit(BPF.ALU64 + BPF.ADD + BPF.K, 1, 0, 0, -e.V[dst].const.__base) 146 e.emit(BPF.ALU64 + BPF.MOV + BPF.K, 2, 0, 0, w) 150 e.emit(BPF.ALU64 + BPF.MOV + BPF.X, 3, e.V[src].reg, 0, 0) [all …]
|
D | bpf.lua | 44 local BPF = ffi.typeof('struct bpf') 60 [1] = BPF.B, [2] = BPF.H, [4] = BPF.W, [8] = BPF.DW, 120 emit(BPF.MEM + BPF.STX + BPF.DW, 10, vinfo.reg, -vinfo.spill, 0) 128 emit(BPF.MEM + BPF.LDX + BPF.DW, reg, 10, -vinfo.spill, 0) 209 emit(BPF.ALU64 + BPF.MOV + BPF.X, reg, src.reg, 0, 0) 217 emit(BPF.ALU64 + BPF.MOV + BPF.X, reg, 10, 0, 0) 218 emit(BPF.ALU64 + BPF.ADD + BPF.K, reg, 0, 0, -src.const.__base) 221 emit(BPF.ALU64 + BPF.MOV + BPF.K, reg, 0, 0, src.const.off or 0) 224 emit(BPF.LD + BPF.DW, reg, 0, 0, ffi.cast('uint32_t', src.const)) 228 emit(BPF.ALU64 + BPF.MOV + BPF.K, reg, 0, 0, src.const) [all …]
|
D | proto.lua | 17 local BPF = ffi.typeof('struct bpf') 231 e.emit(BPF.LD + BPF.ABS + e.const_width[ffi.sizeof(type)], tmp_reg, 0, 0, d.off + off or 0) 235 e.emit(BPF.LD + BPF.IND + e.const_width[ffi.sizeof(type)], tmp_reg, dst_reg, 0, off or 0) 239 e.emit(BPF.ALU + BPF.AND + BPF.K, tmp_reg, 0, 0, mask) 242 local op = BPF.LSH 244 op = BPF.RSH 247 e.emit(BPF.ALU + op + BPF.K, tmp_reg, 0, 0, shift) 251 e.emit(BPF.ALU + BPF.ADD + BPF.X, dst_reg, tmp_reg, 0, 0) 253 e.emit(BPF.ALU + BPF.ADD + BPF.K, dst_reg, 0, 0, d.off) 264 e.emit(BPF.ALU64 + BPF.ADD + BPF.K, dst_reg, 0, 0, off) [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/BPF/Disassembler/ |
D | BPFDisassembler.cpp | 100 BPF::R0, BPF::R1, BPF::R2, BPF::R3, BPF::R4, BPF::R5, 101 BPF::R6, BPF::R7, BPF::R8, BPF::R9, BPF::R10, BPF::R11}; 115 BPF::W0, BPF::W1, BPF::W2, BPF::W3, BPF::W4, BPF::W5, 116 BPF::W6, BPF::W7, BPF::W8, BPF::W9, BPF::W10, BPF::W11}; 180 STI.getFeatureBits()[BPF::ALU32]) in getInstruction() 190 case BPF::LD_imm64: in getInstruction() 191 case BPF::LD_pseudo: { in getInstruction() 205 case BPF::LD_ABS_B: in getInstruction() 206 case BPF::LD_ABS_H: in getInstruction() 207 case BPF::LD_ABS_W: in getInstruction() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Target/BPF/ |
D | BPFInstrInfo.cpp | 30 : BPFGenInstrInfo(BPF::ADJCALLSTACKDOWN, BPF::ADJCALLSTACKUP) {} in BPFInstrInfo() 36 if (BPF::GPRRegClass.contains(DestReg, SrcReg)) in copyPhysReg() 37 BuildMI(MBB, I, DL, get(BPF::MOV_rr), DestReg) in copyPhysReg() 39 else if (BPF::GPR32RegClass.contains(DestReg, SrcReg)) in copyPhysReg() 40 BuildMI(MBB, I, DL, get(BPF::MOV_rr_32), DestReg) in copyPhysReg() 58 LdOpc = BPF::LDB; in expandMEMCPY() 59 StOpc = BPF::STB; in expandMEMCPY() 62 LdOpc = BPF::LDH; in expandMEMCPY() 63 StOpc = BPF::STH; in expandMEMCPY() 66 LdOpc = BPF::LDW; in expandMEMCPY() [all …]
|
D | BPFISelLowering.cpp | 63 addRegisterClass(MVT::i64, &BPF::GPRRegClass); in BPFTargetLowering() 65 addRegisterClass(MVT::i32, &BPF::GPR32RegClass); in BPFTargetLowering() 70 setStackPointerRegisterToSaveRestore(BPF::R11); in BPFTargetLowering() 181 return std::make_pair(0U, &BPF::GPRRegClass); in getRegForInlineAsmConstraint() 239 &BPF::GPRRegClass : in LowerFormalArguments() 240 &BPF::GPR32RegClass); in LowerFormalArguments() 568 int RShiftOp = isSigned ? BPF::SRA_ri : BPF::SRL_ri; in EmitSubregExt() 576 BuildMI(BB, DL, TII.get(BPF::MOV_32_64), PromotedReg0).addReg(Reg); in EmitSubregExt() 577 BuildMI(BB, DL, TII.get(BPF::SLL_ri), PromotedReg1) in EmitSubregExt() 609 ScratchReg = MRI.createVirtualRegister(&BPF::GPRRegClass); in EmitInstrWithCustomInserterMemcpy() [all …]
|
D | BPFRegisterInfo.cpp | 31 : BPFGenRegisterInfo(BPF::R0) {} in BPFRegisterInfo() 40 markSuperRegs(Reserved, BPF::W10); // [W|R]10 is read only frame pointer in getReservedRegs() 41 markSuperRegs(Reserved, BPF::W11); // [W|R]11 is pseudo stack pointer in getReservedRegs() 85 if (MI.getOpcode() == BPF::MOV_rr) { in eliminateFrameIndex() 91 BuildMI(MBB, ++II, DL, TII.get(BPF::ADD_ri), reg) in eliminateFrameIndex() 105 if (MI.getOpcode() == BPF::FI_ri) { in eliminateFrameIndex() 111 BuildMI(MBB, ++II, DL, TII.get(BPF::MOV_rr), reg) in eliminateFrameIndex() 113 BuildMI(MBB, II, DL, TII.get(BPF::ADD_ri), reg) in eliminateFrameIndex() 126 return BPF::R10; in getFrameRegister()
|
D | BPFMIPeephole.cpp | 97 if (!PhiDef || PhiDef->isPHI() || PhiDef->getOpcode() == BPF::COPY) in isMovFrom32Def() 102 if (DefInsn->getOpcode() == BPF::COPY) { in isMovFrom32Def() 110 MRI->getRegClass(Reg) == &BPF::GPRRegClass)) in isMovFrom32Def() 136 if (MI.getOpcode() == BPF::SRL_ri && in eliminateZExtSeq() 147 SllMI->getOpcode() != BPF::SLL_ri || in eliminateZExtSeq() 157 MovMI->getOpcode() != BPF::MOV_32_64) in eliminateZExtSeq() 170 BuildMI(MBB, MI, MI.getDebugLoc(), TII->get(BPF::SUBREG_TO_REG), DstReg) in eliminateZExtSeq() 171 .addImm(0).addReg(SubReg).addImm(BPF::sub_32); in eliminateZExtSeq() 257 if (MI.getOpcode() == BPF::MOV_32_64) { in eliminateRedundantMov() 259 unsigned dst_sub = TRI->getSubReg(dst, BPF::sub_32); in eliminateRedundantMov()
|
D | BPFRegisterInfo.td | 1 //===-- BPFRegisterInfo.td - BPF Register defs -------------*- tablegen -*-===// 11 // Declarations that describe the BPF register file 14 let Namespace = "BPF" in { 20 let Namespace = "BPF"; 28 let Namespace = "BPF"; 40 def GPR32 : RegisterClass<"BPF", [i32], 32, (add 47 def GPR : RegisterClass<"BPF", [i64], 64, (add
|
/external/bcc/tests/lua/ |
D | test_clang.lua | 13 local b = BPF:new{text=text, debug=0} 25 local b = BPF:new{text=text, debug=0} 48 local b = BPF:new{text=text, debug=0} 60 local b = BPF:new{text=text, debug=0} 81 local b = BPF:new{text=text, debug=0} 116 local b = BPF:new{text=text, debug=0} 129 local b = BPF:new{text=text, debug=0} 139 local b = BPF:new{text=text, debug=0} 161 local b = BPF:new{text=text, debug=0} 175 local b = BPF:new{text=text, debug=0} [all …]
|
/external/llvm/lib/Target/BPF/ |
D | BPFInstrInfo.cpp | 32 : BPFGenInstrInfo(BPF::ADJCALLSTACKDOWN, BPF::ADJCALLSTACKUP) {} in BPFInstrInfo() 38 if (BPF::GPRRegClass.contains(DestReg, SrcReg)) in copyPhysReg() 39 BuildMI(MBB, I, DL, get(BPF::MOV_rr), DestReg) in copyPhysReg() 54 if (RC == &BPF::GPRRegClass) in storeRegToStackSlot() 55 BuildMI(MBB, I, DL, get(BPF::STD)) in storeRegToStackSlot() 72 if (RC == &BPF::GPRRegClass) in loadRegFromStackSlot() 73 BuildMI(MBB, I, DL, get(BPF::LDD), DestReg).addFrameIndex(FI).addImm(0); in loadRegFromStackSlot() 102 if (I->getOpcode() == BPF::JMP) { in analyzeBranch() 144 BuildMI(&MBB, DL, get(BPF::JMP)).addMBB(TBB); in InsertBranch() 159 if (I->getOpcode() != BPF::JMP) in RemoveBranch()
|
D | BPFRegisterInfo.cpp | 30 : BPFGenRegisterInfo(BPF::R0) {} in BPFRegisterInfo() 39 Reserved.set(BPF::R10); // R10 is read only frame pointer in getReservedRegs() 40 Reserved.set(BPF::R11); // R11 is pseudo stack pointer in getReservedRegs() 64 if (MI.getOpcode() == BPF::MOV_rr) { in eliminateFrameIndex() 69 BuildMI(MBB, ++II, DL, TII.get(BPF::ADD_ri), reg) in eliminateFrameIndex() 81 if (MI.getOpcode() == BPF::FI_ri) { in eliminateFrameIndex() 87 BuildMI(MBB, ++II, DL, TII.get(BPF::MOV_rr), reg) in eliminateFrameIndex() 89 BuildMI(MBB, II, DL, TII.get(BPF::ADD_ri), reg) in eliminateFrameIndex() 102 return BPF::R10; in getFrameRegister()
|
/external/bcc/ |
D | LINKS.md | 4 - 2017-12-22: [An introduction to the BPF Compiler Collection](https://lwn.net/Articles/742082) 5 - 2017-09-13: [Performance Analysis Superpowers with Linux BPF](https://www.slideshare.net/brendang… 7 - 2017-07-13: [Performance Superpowers with Enhanced BPF](https://www.usenix.org/conference/atc17/p… 9 - 2017-03-04: [Linux 4.x Tracing: Performance Analysis with bcc/BPF](https://www.slideshare.net/bre… 12 - 2017-01-31: [Golang bcc/BPF Function Tracing](http://www.brendangregg.com/blog/2017-01-31/golang-… 13 - 2017-01-18: [BPF: Tracing and more](https://www.slideshare.net/brendangregg/bpf-tracing-and-more) 14 - 2016-12-09: [Linux 4.x Tracing Tools: Using BPF Superpowers](https://www.slideshare.net/brendangr… 16 - 2016-11-30: [Linux bcc/BPF tcplife: TCP Lifespans](http://www.brendangregg.com/blog/2016-11-30/li… 18 - 2016-10-21: [Linux 4.9's Efficient BPF-based Profiler](http://www.brendangregg.com/blog/2016-10-2… 20 - 2016-10-12: [Linux bcc/BPF Node.js USDT Tracing](http://www.brendangregg.com/blog/2016-10-12/linu… [all …]
|
/external/bcc/SPECS/ |
D | bcc+clang.spec | 7 Summary: BPF Compiler Collection (BCC) 20 Python bindings for BPF Compiler Collection (BCC). Control a BPF program from 59 Summary: Shared Library for BPF Compiler Collection (BCC) 62 Shared Library for BPF Compiler Collection (BCC) 65 Summary: Examples for BPF Compiler Collection (BCC) 68 Examples for BPF Compiler Collection (BCC) 71 Summary: Python bindings for BPF Compiler Collection (BCC) 74 Python bindings for BPF Compiler Collection (BCC) 77 Summary: Command line tools for BPF Compiler Collection (BCC) 80 Command line tools for BPF Compiler Collection (BCC)
|
D | bcc.spec | 38 Summary: BPF Compiler Collection (BCC) 64 Python bindings for BPF Compiler Collection (BCC). Control a BPF program from 97 Summary: Shared Library for BPF Compiler Collection (BCC) 100 Shared Library for BPF Compiler Collection (BCC) 103 Summary: Python2 bindings for BPF Compiler Collection (BCC) 107 Python bindings for BPF Compiler Collection (BCC) 111 Summary: Python3 bindings for BPF Compiler Collection (BCC) 115 Python bindings for BPF Compiler Collection (BCC) 127 Summary: Examples for BPF Compiler Collection (BCC) 133 Examples for BPF Compiler Collection (BCC) [all …]
|
/external/bcc/src/cc/api/ |
D | BPF.cc | 57 StatusTuple BPF::init(const std::string& bpf_program, in init() 83 BPF::~BPF() { in ~BPF() 90 StatusTuple BPF::detach_all() { in detach_all() 164 StatusTuple BPF::attach_kprobe(const std::string& kernel_func, in attach_kprobe() 192 StatusTuple BPF::attach_uprobe(const std::string& binary_path, in attach_uprobe() 227 StatusTuple BPF::attach_usdt(const USDT& usdt, pid_t pid) { in attach_usdt() 267 StatusTuple BPF::attach_tracepoint(const std::string& tracepoint, in attach_tracepoint() 298 StatusTuple BPF::attach_perf_event(uint32_t ev_type, uint32_t ev_config, in attach_perf_event() 338 StatusTuple BPF::attach_perf_event_raw(void* perf_event_attr, in attach_perf_event_raw() 379 StatusTuple BPF::detach_kprobe(const std::string& kernel_func, in detach_kprobe() [all …]
|
/external/bcc/src/python/bcc/ |
D | __init__.py | 130 class BPF(object): class 320 src_file = BPF._find_file(src_file) 321 hdr_file = BPF._find_file(hdr_file) 379 fn = BPF.Function(self, func_name, fd) 418 return BPF.str2ctype[desc] 423 fields.append((t[0], BPF._decode_table_type(t[1]))) 426 fields.append((t[0], BPF._decode_table_type(t[1]) * t[2][0])) 428 fields.append((t[0], BPF._decode_table_type(t[1]), t[2])) 436 fields.append((name, BPF._decode_table_type(t))) 469 keytype = BPF._decode_table_type(json.loads(key_desc)) [all …]
|
/external/libpcap/doc/ |
D | README.macos | 1 As with other systems using BPF, macOS allows users with read access to 2 the BPF devices to capture packets with libpcap and allows users with 3 write access to the BPF devices to send packets with libpcap. 5 On some systems that use BPF, the BPF devices live on the root file 10 On newer versions of FreeBSD, the BPF devices live on devfs, and devfs 15 On macOS, the BPF devices live on devfs, but the macOS version of devfs 26 Both of them will change the ownership of the BPF devices so that the 27 "admin" group owns them, and will change the permission of the BPF 61 If you want to give a particular user permission to access the BPF 65 give a particular user permission to read and write the BPF devices and [all …]
|
/external/bcc/debian/ |
D | control | 20 Description: Shared Library for BPF Compiler Collection (BCC) 21 Shared Library for BPF Compiler Collection to control BPF programs 27 Description: Examples for BPF Compiler Collection (BCC) 32 Description: Python wrappers for BPF Compiler Collection (BCC) 37 Description: Python3 wrappers for BPF Compiler Collection (BCC) 42 Description: Command line tools for BPF Compiler Collection (BCC)
|
/external/bcc/examples/networking/xdp/ |
D | xdp_drop_count.py | 10 from bcc import BPF 38 mode = BPF.XDP 41 if mode == BPF.XDP: 49 b = BPF(text = """ 135 if mode == BPF.XDP: 162 if mode == BPF.XDP:
|