ktap A lightweight script-based dynamic tracing tool for Linux

ktap is a new script-based dynamic tracing tool for Linux, it uses a scripting language and lets users trace the Linux kernel dynamically. ktap is designed to give operational insights with interoperability that allows users to tune, troubleshoot and extend kernel and application. It's similar with Linux Systemtap and Solaris Dtrace.

ktap have different design principles from Linux mainstream dynamic tracing language in that it's based on bytecode, so it doesn't depend upon GCC, doesn't require compiling kernel module for each script, safe to use in production environment, fulfilling the embedded ecosystem's tracing needs.

A short summary of features

Simplesimple but powerful scripting language
Fastregister based interpreter (heavily optimized) in Linux kernel
Lightweightsmall and lightweight (6KLOC of interpreter)
Compilationnot depend on gcc for each script running
Embeddedeasy to use in embedded environment without debugging info
Tracingsupport for tracepoint, kprobe, uprobe, function trace, timer and more
Architecturesupported in x86, arm, ppc, mips
Safetysafety in sandbox
LicenseGPL v2

A very small taste of what it looks like

#/usr/bin/env ktap

#trace all syscalls in system
trace syscalls:* {
  print(cpu(), pid(), execname(), argevent)
}