4 ms·
It wasn't mentioned in the article, but I've recently merged LuaJIT to BPF compiler. So you just write Lua and the kernel bits get compiled into BPF bytecode an
by vavrusa 10y ago
It wasn't mentioned in the article, but I've recently merged LuaJIT to BPF compiler. So you just write Lua and the kernel bits get compiled into BPF bytecode and loaded. No C.
See https://github.com/iovisor/bcc/blob/master/src/lua/README.md#luajit-bpf-compiler https://github.com/iovisor/bcc/blob/master/src/lua/README.md... or examples https://github.com/iovisor/bcc/blob/master/examples/lua/tracepoint-offcputime.lua https://github.com/iovisor/bcc/blob/master/examples/lua/trac... (this one is for tracing).
- qwertyuiop924 10y agoOkay, that's really cool. Thanks. It does need more documentation, but this is an excellent step. It also allows for building higher level APIs atop BCC's low-level lua integration, as opposed to writing yet another DSL.