Chapter 4: Debug via Instrumentation – Kprobes
A kernel probe (kprobe) is one of the powerful weapons in our debug/performance/observability armory! Here, you'll learn what exactly it can do for you and how to leverage it, with the emphasis being on debug scenarios. You will find that there's a so-called static and a dynamic probing approach to using them... We'll also cover using a way to figure out the return value of any function via a kernel return probe (kretprobe)!
Along the way, you'll learn what the Application Binary Interface (ABI) is and why it's important to know at least the basics of the processor ABI.
Don't miss delving into the section on dynamic kprobes or kprobe-based event tracing, as well as employing the perf-tools
and (especially) the modern eBPF BCC frontends – it makes it all so much easier!
In this chapter, we're going to cover the following main topics:
- Understanding kprobes basics
- Using...