Home
last modified time | relevance | path

Searched refs:BPF (Results 1 – 25 of 441) sorted by relevance

12345678910>>...18

/external/bcc/tests/python/
Dtest_clang.py5 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 …]
Dtest_license.py6 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 …]
/external/bcc/src/lua/bpf/
Dbuiltins.lua20 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 …]
Dbpf.lua44 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 …]
Dproto.lua17 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/llvm-project/llvm/lib/Target/BPF/
DBPFMIChecking.cpp108 &BPFMCRegisterClasses[BPF::GPRRegClassID]; in hasLiveDefs()
157 if (MI.getOpcode() != BPF::XADDW && in processAtomicInsts()
158 MI.getOpcode() != BPF::XADDD && in processAtomicInsts()
159 MI.getOpcode() != BPF::XADDW32) in processAtomicInsts()
188 if (MI.getOpcode() != BPF::XFADDW32 && MI.getOpcode() != BPF::XFADDD && in processAtomicInsts()
189 MI.getOpcode() != BPF::XFANDW32 && MI.getOpcode() != BPF::XFANDD && in processAtomicInsts()
190 MI.getOpcode() != BPF::XFXORW32 && MI.getOpcode() != BPF::XFXORD && in processAtomicInsts()
191 MI.getOpcode() != BPF::XFORW32 && MI.getOpcode() != BPF::XFORD) in processAtomicInsts()
200 case BPF::XFADDW32: in processAtomicInsts()
201 newOpcode = BPF::XADDW32; in processAtomicInsts()
[all …]
DBPFMISimplifyPatchable.cpp111 if (Opcode == BPF::LDB || Opcode == BPF::LDH || Opcode == BPF::LDW || in checkADDrr()
112 Opcode == BPF::LDD || Opcode == BPF::STB || Opcode == BPF::STH || in checkADDrr()
113 Opcode == BPF::STW || Opcode == BPF::STD) in checkADDrr()
114 COREOp = BPF::CORE_MEM; in checkADDrr()
115 else if (Opcode == BPF::LDB32 || Opcode == BPF::LDH32 || in checkADDrr()
116 Opcode == BPF::LDW32 || Opcode == BPF::STB32 || in checkADDrr()
117 Opcode == BPF::STH32 || Opcode == BPF::STW32) in checkADDrr()
118 COREOp = BPF::CORE_ALU32_MEM; in checkADDrr()
130 if (Opcode == BPF::STB || Opcode == BPF::STH || Opcode == BPF::STW || in checkADDrr()
131 Opcode == BPF::STD || Opcode == BPF::STB32 || Opcode == BPF::STH32 || in checkADDrr()
[all …]
DBPFInstrInfo.cpp29 : BPFGenInstrInfo(BPF::ADJCALLSTACKDOWN, BPF::ADJCALLSTACKUP) {} in BPFInstrInfo()
35 if (BPF::GPRRegClass.contains(DestReg, SrcReg)) in copyPhysReg()
36 BuildMI(MBB, I, DL, get(BPF::MOV_rr), DestReg) in copyPhysReg()
38 else if (BPF::GPR32RegClass.contains(DestReg, SrcReg)) in copyPhysReg()
39 BuildMI(MBB, I, DL, get(BPF::MOV_rr_32), DestReg) in copyPhysReg()
57 LdOpc = BPF::LDB; in expandMEMCPY()
58 StOpc = BPF::STB; in expandMEMCPY()
61 LdOpc = BPF::LDH; in expandMEMCPY()
62 StOpc = BPF::STH; in expandMEMCPY()
65 LdOpc = BPF::LDW; in expandMEMCPY()
[all …]
DBPFMIPeephole.cpp104 if (MRI->getRegClass(Reg) == &BPF::GPRRegClass) in isCopyFrom32Def()
132 if (PhiDef->getOpcode() == BPF::COPY && !isCopyFrom32Def(PhiDef)) in isPhiFrom32Def()
151 } else if (DefInsn->getOpcode() == BPF::COPY) { in isInsnFrom32Def()
192 if (MI.getOpcode() == BPF::SRL_ri && in eliminateZExtSeq()
203 SllMI->getOpcode() != BPF::SLL_ri || in eliminateZExtSeq()
213 MovMI->getOpcode() != BPF::MOV_32_64) in eliminateZExtSeq()
226 BuildMI(MBB, MI, MI.getDebugLoc(), TII->get(BPF::SUBREG_TO_REG), DstReg) in eliminateZExtSeq()
227 .addImm(0).addReg(SubReg).addImm(BPF::sub_32); in eliminateZExtSeq()
255 if (MI.getOpcode() != BPF::MOV_32_64) in eliminateZExt()
277 BuildMI(MBB, MI, MI.getDebugLoc(), TII->get(BPF::SUBREG_TO_REG), dst) in eliminateZExt()
[all …]
DBPFRegisterInfo.cpp30 : BPFGenRegisterInfo(BPF::R0) {} in BPFRegisterInfo()
39 markSuperRegs(Reserved, BPF::W10); // [W|R]10 is read only frame pointer in getReservedRegs()
40 markSuperRegs(Reserved, BPF::W11); // [W|R]11 is pseudo stack pointer in getReservedRegs()
84 if (MI.getOpcode() == BPF::MOV_rr) { in eliminateFrameIndex()
90 BuildMI(MBB, ++II, DL, TII.get(BPF::ADD_ri), reg) in eliminateFrameIndex()
104 if (MI.getOpcode() == BPF::FI_ri) { in eliminateFrameIndex()
110 BuildMI(MBB, ++II, DL, TII.get(BPF::MOV_rr), reg) in eliminateFrameIndex()
112 BuildMI(MBB, II, DL, TII.get(BPF::ADD_ri), reg) in eliminateFrameIndex()
125 return BPF::R10; in getFrameRegister()
/external/llvm-project/llvm/lib/Target/BPF/Disassembler/
DBPFDisassembler.cpp97 BPF::R0, BPF::R1, BPF::R2, BPF::R3, BPF::R4, BPF::R5,
98 BPF::R6, BPF::R7, BPF::R8, BPF::R9, BPF::R10, BPF::R11};
112 BPF::W0, BPF::W1, BPF::W2, BPF::W3, BPF::W4, BPF::W5,
113 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-10.0/llvm/lib/Target/BPF/Disassembler/
DBPFDisassembler.cpp97 BPF::R0, BPF::R1, BPF::R2, BPF::R3, BPF::R4, BPF::R5,
98 BPF::R6, BPF::R7, BPF::R8, BPF::R9, BPF::R10, BPF::R11};
112 BPF::W0, BPF::W1, BPF::W2, BPF::W3, BPF::W4, BPF::W5,
113 BPF::W6, BPF::W7, BPF::W8, BPF::W9, BPF::W10, BPF::W11};
177 STI.getFeatureBits()[BPF::ALU32]) in getInstruction()
187 case BPF::LD_imm64: in getInstruction()
188 case BPF::LD_pseudo: { in getInstruction()
202 case BPF::LD_ABS_B: in getInstruction()
203 case BPF::LD_ABS_H: in getInstruction()
204 case BPF::LD_ABS_W: in getInstruction()
[all …]
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Target/BPF/
DBPFMISimplifyPatchable.cpp108 if (Opcode == BPF::LDB || Opcode == BPF::LDH || Opcode == BPF::LDW || in checkADDrr()
109 Opcode == BPF::LDD || Opcode == BPF::STB || Opcode == BPF::STH || in checkADDrr()
110 Opcode == BPF::STW || Opcode == BPF::STD) in checkADDrr()
111 COREOp = BPF::CORE_MEM; in checkADDrr()
112 else if (Opcode == BPF::LDB32 || Opcode == BPF::LDH32 || in checkADDrr()
113 Opcode == BPF::LDW32 || Opcode == BPF::STB32 || in checkADDrr()
114 Opcode == BPF::STH32 || Opcode == BPF::STW32) in checkADDrr()
115 COREOp = BPF::CORE_ALU32_MEM; in checkADDrr()
139 BuildMI(MBB, *Inst, Inst->getDebugLoc(), TII->get(BPF::CORE_SHIFT)) in checkShift()
148 if (MRI->getRegClass(DstReg) == &BPF::GPR32RegClass) { in processCandidate()
[all …]
DBPFInstrInfo.cpp29 : BPFGenInstrInfo(BPF::ADJCALLSTACKDOWN, BPF::ADJCALLSTACKUP) {} in BPFInstrInfo()
35 if (BPF::GPRRegClass.contains(DestReg, SrcReg)) in copyPhysReg()
36 BuildMI(MBB, I, DL, get(BPF::MOV_rr), DestReg) in copyPhysReg()
38 else if (BPF::GPR32RegClass.contains(DestReg, SrcReg)) in copyPhysReg()
39 BuildMI(MBB, I, DL, get(BPF::MOV_rr_32), DestReg) in copyPhysReg()
57 LdOpc = BPF::LDB; in expandMEMCPY()
58 StOpc = BPF::STB; in expandMEMCPY()
61 LdOpc = BPF::LDH; in expandMEMCPY()
62 StOpc = BPF::STH; in expandMEMCPY()
65 LdOpc = BPF::LDW; in expandMEMCPY()
[all …]
DBPFMIPeephole.cpp97 if (MRI->getRegClass(Reg) == &BPF::GPRRegClass) in isCopyFrom32Def()
125 if (PhiDef->getOpcode() == BPF::COPY && !isCopyFrom32Def(PhiDef)) in isPhiFrom32Def()
144 } else if (DefInsn->getOpcode() == BPF::COPY) { in isInsnFrom32Def()
185 if (MI.getOpcode() == BPF::SRL_ri && in eliminateZExtSeq()
196 SllMI->getOpcode() != BPF::SLL_ri || in eliminateZExtSeq()
206 MovMI->getOpcode() != BPF::MOV_32_64) in eliminateZExtSeq()
219 BuildMI(MBB, MI, MI.getDebugLoc(), TII->get(BPF::SUBREG_TO_REG), DstReg) in eliminateZExtSeq()
220 .addImm(0).addReg(SubReg).addImm(BPF::sub_32); in eliminateZExtSeq()
308 if (Opcode == BPF::MOV_32_64 || in eliminateRedundantMov()
309 Opcode == BPF::MOV_rr || Opcode == BPF::MOV_rr_32) { in eliminateRedundantMov()
[all …]
DBPFRegisterInfo.cpp30 : BPFGenRegisterInfo(BPF::R0) {} in BPFRegisterInfo()
39 markSuperRegs(Reserved, BPF::W10); // [W|R]10 is read only frame pointer in getReservedRegs()
40 markSuperRegs(Reserved, BPF::W11); // [W|R]11 is pseudo stack pointer in getReservedRegs()
84 if (MI.getOpcode() == BPF::MOV_rr) { in eliminateFrameIndex()
90 BuildMI(MBB, ++II, DL, TII.get(BPF::ADD_ri), reg) in eliminateFrameIndex()
104 if (MI.getOpcode() == BPF::FI_ri) { in eliminateFrameIndex()
110 BuildMI(MBB, ++II, DL, TII.get(BPF::MOV_rr), reg) in eliminateFrameIndex()
112 BuildMI(MBB, II, DL, TII.get(BPF::ADD_ri), reg) in eliminateFrameIndex()
125 return BPF::R10; in getFrameRegister()
DBPFRegisterInfo.td1 //===-- BPFRegisterInfo.td - BPF Register defs -------------*- tablegen -*-===//
10 // Declarations that describe the BPF register file
13 let Namespace = "BPF" in {
19 let Namespace = "BPF";
27 let Namespace = "BPF";
39 def GPR32 : RegisterClass<"BPF", [i32], 32, (add
46 def GPR : RegisterClass<"BPF", [i64], 64, (add
/external/bcc/tests/lua/
Dtest_clang.lua13 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/
DBPFInstrInfo.cpp32 : 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()
DBPFRegisterInfo.cpp30 : 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/
DLINKS.md4 - 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/
Dbcc+clang.spec7 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)
/external/bcc/src/cc/api/
DBPF.cc58 StatusTuple BPF::init(const std::string& bpf_program, in init()
84 BPF::~BPF() { in ~BPF()
91 StatusTuple BPF::detach_all() { in detach_all()
165 StatusTuple BPF::attach_kprobe(const std::string& kernel_func, in attach_kprobe()
193 StatusTuple BPF::attach_uprobe(const std::string& binary_path, in attach_uprobe()
228 StatusTuple BPF::attach_usdt(const USDT& usdt, pid_t pid) { in attach_usdt()
268 StatusTuple BPF::attach_tracepoint(const std::string& tracepoint, in attach_tracepoint()
299 StatusTuple BPF::attach_perf_event(uint32_t ev_type, uint32_t ev_config, in attach_perf_event()
339 StatusTuple BPF::attach_perf_event_raw(void* perf_event_attr, in attach_perf_event_raw()
380 StatusTuple BPF::detach_kprobe(const std::string& kernel_func, in detach_kprobe()
[all …]
/external/libcap/doc/values/
D39.txt2 enhanced Berkeley Packet Filter (BPF) system. This is
3 an execution subsystem of the kernel, that manages BPF
5 - create all types of BPF maps
9 - BPF to BPF function calls
16 further manipulate the BPF system:
18 - BPF programs can use pointer-to-integer
/external/llvm-project/llvm/utils/gn/secondary/llvm/lib/Target/BPF/
DBUILD.gn6 td_file = "BPF.td"
12 td_file = "BPF.td"
18 td_file = "BPF.td"
24 td_file = "BPF.td"
30 td_file = "BPF.td"
36 td_file = "BPF.td"
84 # having the directory's name, "//llvm/lib/Target/BPF" will refer to this
89 group("BPF") {

12345678910>>...18