/external/bcc/src/lua/bpf/ |
D | proto.lua | 16 local ffi = require('ffi') 17 local BPF = ffi.typeof('struct bpf') 19 ffi.cdef [[ 173 ffi.cdef [[ 199 ffi.cdef 'struct pt_regs {};' 202 ffi.metatype('struct pt_regs', { 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) 273 d.off = d.off + ffi.sizeof('struct eth_t') 279 t.__dissector=ffi.typeof(typestr) [all …]
|
D | cdef.lua | 16 local ffi = require('ffi') 21 ffi.cdef [[ 193 ffi.metatype('struct bpf_stacktrace', { 194 __len = function (t) return ffi.sizeof(t.ip) / ffi.sizeof(t.ip[0]) end, 201 return string.match(tostring(ffi.typeof(v)), '<([^>]+)') 217 return (type(v.const) == 'number' and not ffi.istype(v.type, ffi.typeof('void'))) 218 …or type(v.const) == 'cdata' and ffi.istype(v.type, ffi.typeof('uint64_t')) -- Lua numbers are at m… 219 or type(v.const) == 'cdata' and ffi.istype(v.type, ffi.typeof('int64_t')) 240 …assert(type(event_type) == 'string' and ffi.typeof(event_type), 'not a valid type for event reader… 241 event_type = ffi.typeof(event_type .. '*') -- Convert type to pointer-to-type [all …]
|
D | builtins.lua | 16 local ffi = require('ffi') 20 local BPF, HELPER = ffi.typeof('struct bpf'), ffi.typeof('struct bpf_func_id') 25 …[1] = ffi.typeof('uint8_t'), [2] = ffi.typeof('uint16_t'), [4] = ffi.typeof('uint32_t'), [8] = ffi… 43 return const_width_type[w] or ffi.typeof(string.format('uint8_t [%d]', w)) 50 if not ffi.typeinfo then error('LuaJIT 2.1+ is required for ffi.typeinfo') end 51 local cinfo = ffi.typeinfo(ct) 53 cinfo = ffi.typeinfo(cinfo.sib) 57 local size = math.max(1, ffi.typeinfo(cinfo.sib or ct).size - cinfo.size) 65 if w then x = ffi.cast(const_width_type[w/8], x) end 74 w = w or ffi.sizeof(e.V[a].type)*8 [all …]
|
D | elf.lua | 20 local ffi = require('ffi') 21 ffi.cdef [[ 150 local elf = ffi.load('elf') 156 local ELF_C = ffi.new('struct Elf_Cmd') 181 ffi.metatype('struct Elf_object', { 193 local phnum = ffi.new('size_t [1]') 197 local header = ffi.new('GElf_Phdr [1]') 209 local header = ffi.new('GElf_Shdr [1]') 218 local sym = ffi.new('GElf_Sym [1]') 224 name = ffi.string(name) [all …]
|
D | bpf.lua | 34 local ffi = require('ffi') 44 local BPF = ffi.typeof('struct bpf') 45 local HELPER = ffi.typeof('struct bpf_func_id') 65 [ffi.new] = true, 92 insn = ffi.new('struct bpf_insn[4096]'), 104 local stack_top = (stackslots + 1) * ffi.sizeof('uint64_t') 119 vinfo.spill = (var + 1) * ffi.sizeof('uint64_t') -- Index by (variable number) * (register width) 186 vtype = ffi.typeof(const) 222 elseif vtype and ffi.sizeof(vtype) == 8 then 224 emit(BPF.LD + BPF.DW, reg, 0, 0, ffi.cast('uint32_t', src.const)) [all …]
|
/external/libffi/ |
D | Makefile.am | 10 src/aarch64/ffi.c src/aarch64/ffitarget.h src/aarch64/sysv.S \ 11 src/alpha/ffi.c src/alpha/osf.S \ 12 src/alpha/ffitarget.h src/arc/ffi.c src/arc/arcompact.S \ 13 src/arc/ffitarget.h src/arm/ffi.c src/arm/sysv.S \ 14 src/arm/ffitarget.h src/avr32/ffi.c src/avr32/sysv.S \ 15 src/avr32/ffitarget.h src/cris/ffi.c src/cris/sysv.S \ 16 src/cris/ffitarget.h src/ia64/ffi.c src/ia64/ffitarget.h \ 17 src/ia64/ia64_flags.h src/ia64/unix.S src/mips/ffi.c \ 18 src/mips/n32.S src/mips/o32.S src/metag/ffi.c \ 19 src/metag/ffitarget.h src/metag/sysv.S src/moxie/ffi.c \ [all …]
|
D | ChangeLog.v1 | 24 * m68k/ffi.c (ffi_prep_cif_machdep): Use bitmask for cif->flags. 202 It is now inserted into ffi.h at configure time. 229 ffi.h.in changes. This is a work-around for SGI's "simple" 234 * ffi.h.in: PowerPC support. 238 * ffi.h.in: Add m68k support. 243 * ffi.h.in (SIZEOF_ARG): Use a pointer type by default. 245 * ffi.h.in: Alpha support. 249 * ffi.h.in, ffi_common.h: Cygnus Support -> Cygnus Solutions. 253 * ffi.h.in: Added ffi_type_void definition. 259 * ffi.h.in: Removed FFI_DEBUG. It's now in the correct [all …]
|
D | ChangeLog.libffi | 39 include/ffi.h.in, 43 src/x86/ffi.c, 166 * src/sh64/ffi.c: Remove lint directives. Was missing from merge 171 * src/sh/ffi.c: Apply missing hunk from Alexandre Oliva's patch of 220 * src/powerpc/ffi.c: Add two new flags to indicate if we have one 247 * src/sh/ffi.c (ffi_prep_closure_loc): Turn INSN into an unsigned 266 * include/ffi.h.in: Wrap definition of target architecture to 271 * src/x86/ffi.c (ffi_prep_closure_loc): Fix for bug revealed in 316 * src/x86/ffi.c (ffi_closure_SYSV_inner): Change C++ comment to C 322 * include/ffi.h.in: Change void (*)() to void (*)(void). [all …]
|
D | ChangeLog.libffi-3.1 | 24 * src/x86/ffi.c: Add support for FFI_STDCALL, FFI_THISCALL, and 166 * src/aarch64/ffi.c: Fix missing semicolons on assertions under 172 * src/aarch64/ffi.c, src/arm/ffi.c, src/x86/ffi.c: Inhibit Clang 174 * src/arm/ffi.c: Prevent NULL dereference, fix short type warning 188 * src/aarch64/ffi.c: Clean up for double == long double. Clean up 200 * configure, Makefile.in, include/Makefile.in, include/ffi.h.in, 208 * include/ffi.h.in (ffi_prep_types): Declare. 213 * src/powerpc/ffi.c: Split into.. 230 * src/powerpc/ffi.c (ffi_prep_cif_machdep_core): Use 244 * src/arm/ffi.c (ffi_call): Hoist declaration of temp to top of [all …]
|
/external/python/cpython2/Modules/_ctypes/libffi/ |
D | Makefile.am | 10 src/aarch64/ffi.c src/aarch64/ffitarget.h src/aarch64/sysv.S \ 11 src/alpha/ffi.c src/alpha/osf.S \ 12 src/alpha/ffitarget.h src/arc/ffi.c src/arc/arcompact.S \ 13 src/arc/ffitarget.h src/arm/ffi.c src/arm/sysv.S \ 14 src/arm/ffitarget.h src/avr32/ffi.c src/avr32/sysv.S \ 15 src/avr32/ffitarget.h src/cris/ffi.c src/cris/sysv.S \ 16 src/cris/ffitarget.h src/ia64/ffi.c src/ia64/ffitarget.h \ 17 src/ia64/ia64_flags.h src/ia64/unix.S src/mips/ffi.c \ 18 src/mips/n32.S src/mips/o32.S src/metag/ffi.c \ 19 src/metag/ffitarget.h src/metag/sysv.S src/moxie/ffi.c \ [all …]
|
D | fficonfig.py.in | 7 'MIPS_IRIX': ['src/mips/ffi.c', 'src/mips/o32.S', 'src/mips/n32.S'], 8 'MIPS_LINUX': ['src/mips/ffi.c', 'src/mips/o32.S'], 9 'X86': ['src/x86/ffi.c', 'src/x86/sysv.S', 'src/x86/win32.S'], 10 'X86_FREEBSD': ['src/x86/ffi.c', 'src/x86/freebsd.S'], 11 'X86_WIN32': ['src/x86/ffi.c', 'src/x86/win32.S'], 12 'SPARC': ['src/sparc/ffi.c', 'src/sparc/v8.S', 'src/sparc/v9.S'], 13 'ALPHA': ['src/alpha/ffi.c', 'src/alpha/osf.S'], 14 'IA64': ['src/ia64/ffi.c', 'src/ia64/unix.S'], 15 'M32R': ['src/m32r/sysv.S', 'src/m32r/ffi.c'], 16 'M68K': ['src/m68k/ffi.c', 'src/m68k/sysv.S'], [all …]
|
D | ChangeLog.v1 | 24 * m68k/ffi.c (ffi_prep_cif_machdep): Use bitmask for cif->flags. 202 It is now inserted into ffi.h at configure time. 229 ffi.h.in changes. This is a work-around for SGI's "simple" 234 * ffi.h.in: PowerPC support. 238 * ffi.h.in: Add m68k support. 243 * ffi.h.in (SIZEOF_ARG): Use a pointer type by default. 245 * ffi.h.in: Alpha support. 249 * ffi.h.in, ffi_common.h: Cygnus Support -> Cygnus Solutions. 253 * ffi.h.in: Added ffi_type_void definition. 259 * ffi.h.in: Removed FFI_DEBUG. It's now in the correct [all …]
|
D | Makefile.in | 84 @MIPS_TRUE@am__append_2 = src/mips/ffi.c src/mips/o32.S src/mips/n32.S 85 @BFIN_TRUE@am__append_3 = src/bfin/ffi.c src/bfin/sysv.S 86 @X86_TRUE@am__append_4 = src/x86/ffi.c src/x86/sysv.S src/x86/win32.S 87 @X86_FREEBSD_TRUE@am__append_5 = src/x86/ffi.c src/x86/freebsd.S src/x86/win32.S 88 @X86_WIN32_TRUE@am__append_6 = src/x86/ffi.c src/x86/win32.S 89 @X86_WIN64_TRUE@am__append_7 = src/x86/ffi.c src/x86/win64.S 90 @X86_DARWIN_TRUE@am__append_8 = src/x86/ffi.c src/x86/darwin.S src/x86/ffi64.c src/x86/darwin64.S 92 @SPARC_TRUE@am__append_10 = src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S 93 @ALPHA_TRUE@am__append_11 = src/alpha/ffi.c src/alpha/osf.S 94 @IA64_TRUE@am__append_12 = src/ia64/ffi.c src/ia64/unix.S [all …]
|
D | ChangeLog.libffi | 39 include/ffi.h.in, 43 src/x86/ffi.c, 166 * src/sh64/ffi.c: Remove lint directives. Was missing from merge 171 * src/sh/ffi.c: Apply missing hunk from Alexandre Oliva's patch of 220 * src/powerpc/ffi.c: Add two new flags to indicate if we have one 247 * src/sh/ffi.c (ffi_prep_closure_loc): Turn INSN into an unsigned 266 * include/ffi.h.in: Wrap definition of target architecture to 271 * src/x86/ffi.c (ffi_prep_closure_loc): Fix for bug revealed in 316 * src/x86/ffi.c (ffi_closure_SYSV_inner): Change C++ comment to C 322 * include/ffi.h.in: Change void (*)() to void (*)(void). [all …]
|
D | ChangeLog.libffi-3.1 | 24 * src/x86/ffi.c: Add support for FFI_STDCALL, FFI_THISCALL, and 166 * src/aarch64/ffi.c: Fix missing semicolons on assertions under 172 * src/aarch64/ffi.c, src/arm/ffi.c, src/x86/ffi.c: Inhibit Clang 174 * src/arm/ffi.c: Prevent NULL dereference, fix short type warning 188 * src/aarch64/ffi.c: Clean up for double == long double. Clean up 200 * configure, Makefile.in, include/Makefile.in, include/ffi.h.in, 208 * include/ffi.h.in (ffi_prep_types): Declare. 213 * src/powerpc/ffi.c: Split into.. 230 * src/powerpc/ffi.c (ffi_prep_cif_machdep_core): Use 244 * src/arm/ffi.c (ffi_call): Hoist declaration of temp to top of [all …]
|
/external/bcc/src/lua/bpf/spec/ |
D | codegen_spec.lua | 1 local ffi = require('ffi') 35 if not key_ctype then key_ctype = ffi.typeof('uint32_t') end 36 if not val_ctype then val_ctype = ffi.typeof('uint32_t') end 41 key = ffi.new(ffi.typeof('$ [1]', key_ctype)), 42 val = ffi.new(ffi.typeof('$ [1]', val_ctype)), 299 local mem = ffi.new('uint8_t [16]') 315 local mem = ffi.new('uint8_t [7]') 331 local mem = ffi.new('uint8_t [1]') 349 local mem = ffi.new('uint8_t [7]') 369 local mem = ffi.new(kv_t) [all …]
|
/external/python/cpython2/Modules/_ctypes/ |
D | libffi.diff | 40 …ac_config_files="$ac_config_files include/Makefile include/ffi.h Makefile testsuite/Makefile man/M… 108 AC_CONFIG_FILES(include/Makefile include/ffi.h Makefile testsuite/Makefile man/Makefile libffi.pc) 125 + 'MIPS_IRIX': ['src/mips/ffi.c', 'src/mips/o32.S', 'src/mips/n32.S'], 126 + 'MIPS_LINUX': ['src/mips/ffi.c', 'src/mips/o32.S'], 127 + 'X86': ['src/x86/ffi.c', 'src/x86/sysv.S', 'src/x86/win32.S'], 128 + 'X86_FREEBSD': ['src/x86/ffi.c', 'src/x86/freebsd.S'], 129 + 'X86_WIN32': ['src/x86/ffi.c', 'src/x86/win32.S'], 130 + 'SPARC': ['src/sparc/ffi.c', 'src/sparc/v8.S', 'src/sparc/v9.S'], 131 + 'ALPHA': ['src/alpha/ffi.c', 'src/alpha/osf.S'], 132 + 'IA64': ['src/ia64/ffi.c', 'src/ia64/unix.S'], [all …]
|
/external/bcc/src/lua/bcc/vendor/ |
D | posix.lua | 16 local ffi = require("ffi") 21 ffi.cdef [[ 35 ffi.cdef [[ 51 local ts = ffi.new("struct timespec[1]") 52 assert(ffi.C.clock_gettime(clock or CLOCK.MONOTONIC_RAW, ts) == 0, 53 "clock_gettime() failed: "..ffi.errno()) 59 local ts = ffi.new("struct timespec[1]") 64 ffi.C.clock_nanosleep(clock or CLOCK.MONOTONIC, 0, ts, nil) 68 return tonumber(ffi.C.get_nprocs()) 73 return ffi.C.strtoull(n, nil, base or 10)
|
/external/bcc/src/lua/bcc/ |
D | libbcc.lua | 16 local ffi = require("ffi") 18 ffi.cdef[[ 60 ffi.cdef[[ 98 ffi.cdef[[ 108 ffi.cdef[[ 132 ffi.cdef[[ 145 return ffi.C 147 return ffi.load(
|
D | table.lua | 16 local ffi = require("ffi") 41 self.c_key = ffi.typeof(key_type.."[1]") 42 self.c_leaf = ffi.typeof(leaf_type.."[1]") 47 local buf_len = ffi.sizeof(self.c_key) * 8 48 local pbuf = ffi.new("char[?]", buf_len) 54 return ffi.string(pbuf) 59 local buf_len = ffi.sizeof(self.c_leaf) * 8 60 local pbuf = ffi.new("char[?]", buf_len) 66 return ffi.string(pbuf) 107 ffi.fill(pkey, ffi.sizeof(pkey[0]), v) [all …]
|
D | sym.lua | 16 local ffi = require("ffi") 18 local SYM = ffi.typeof("struct bcc_symbol[1]") 28 local name_res = ffi.string(sym[0].demangle_name) 42 module_path = ffi.string(sym[0].module) 48 module_path = ffi.string(sym[0].module)
|
/external/bcc/examples/lua/ |
D | tracepoint-offcputime.lua | 19 local ffi = require('ffi') 25 local starts = assert(bpf.map('hash', 128, ffi.typeof('uint32_t'), ffi.typeof('uint64_t'))) 26 local counts = assert(bpf.map('hash', 128, ffi.typeof(key_t), ffi.typeof('uint64_t'))) 48 local key = ffi.new(key_t) 59 ffi.cdef 'unsigned long long strtoull(const char *, char **, int);' 63 if addr then ksyms[ffi.C.strtoull(addr, nil, 16)] = sym end 75 s = s .. string.format(" %-16s %s", "-", ffi.string(k.name))
|
D | uprobe-readline-perf.lua | 20 local ffi = require('ffi') 28 local sample = ffi.new(sample_t) 30 …ffi.copy(sample.str, ffi.cast('char *', ptregs.ax)) -- Cast `ax` to string pointer and copy to buf… 40 …print(string.format('%12s%-16s %-10s %s', '', tonumber(e.pid), os.date("%H:%M:%S"), ffi.string(e.s…
|
D | uprobe-readline.lua | 20 local ffi = require('ffi') 25 local line = ffi.new('char [40]') -- Create a 40 byte buffer on stack 26 ffi.copy(line, ffi.cast('char *', ptregs.ax)) -- Cast `ax` to string pointer and copy to buffer
|
/external/bcc/tools/ |
D | tcplife.lua | 18 local ffi = require("ffi") 21 ffi.cdef[[ 223 local addr_dst = ffi.new("char[?]", len) 226 addr_src = ffi.new("uint64_t[1]", addr) 228 addr_src = ffi.new("uint64_t[2]", addr) 230 ffi.C.inet_ntop(af, addr_src, addr_dst, len) 231 return ffi.string(addr_dst, len) 236 return ffi.C.ntohs(p) 242 local event_task = ffi.string(event.task) 281 local event_task = ffi.string(event.task)
|