PyCon China
Hangzhou 2019
Python for Linux Kernel
Debugging
Feng Li (李枫)
hkli2013@126.com
Oct 19,2019
Agenda
I. Linux Kernel Debugging
Overview
eBPF
Development
II. BCC
Overview
Development
III. LISA
Overview
Internals
IV. Drgn
Overview
V. Practice on ARM
Development Environment
My Practice
VI. Wrap-up
I. Linux Kernel Debugging
1) Overview
DTrace
/wiki/DTrace
a comprehensive dynamic tracing framework created by Sun
Microsystems for troubleshooting kernel and application problems
on production systems in real time. Originally developed for Solaris,
it has since been released under the free CDDL in OpenSolaris and
its descendant illumos…
/technetwork/server-storage/
solaris11/technologies/dtrace-1930301.html
/en/operating-systems/oracle-linux/
dtrace-guide/
…
/dtrace.html
Linux Tracing Landscape
Sanitizers BCC
a
Source: “Dynamic Probes for Linux”, Masami Hiramatsu, Tracing Summit 2015
$KERNEL_SRC/Documentation/kbuild/modules.rst
$KERNEL_SRC/Documentation/trace/events.rst
$KERNEL_SRC/Documentation/trace/ftrace*.rst
$KERNEL_SRC/Documentation/kprobes
$KERNEL_SRC/Documentation/trace/kprobetrace.rst
$KERNEL_SRC/Documentation/trace/uprobetracer.rst
$KERNEL_SRC/Documentation/trace/tracepoints*.rst
$KERNEL_SRC/Documentation/trace/features/*.*
Browsing Kernel Code Online
/
/torvalds/linux
/linux/latest/source
2) eBPF
2.1 BPF (Berkeley Packet Filter, aka cBPF)
/wiki/Berkeley_Packet_Filter
/papers/bpf-usenix93.pdf
History
Source: ebpfbasics-190611051559.