~/talk

Tracing Go Programs with eBPF!

Talkat GopherCon 2020 · 2020-11-09..11-13· [observability, security]
links:none on file
slides:none on file

Builds a Go tracer that compiles and loads small eBPF C snippets via BCC, attaches an uprobe + bcc to a Go symbol (e.g. main.handler), and streams events back over a perf buffer into a Go channel. Shows use of bpf_probe_read to reconstruct Go stack-based arguments (example: addTwoNumbers(42,3)) and bpf_probe_write_user to mutate an argument in flight, changing the observed result. Requires sudo, demos both logging and fault injection and the prototype works end-to-end.

AI-written summary · about

  1. 0:00Start
  2. 0:06Tracing Go Programs with eBPF!
  3. 3:23What is tracing? By using many features of the operating system we can inspect the activity of running programs We can make sure programs are doing what they say they're doing We can see why programs aren't working properly. We can monitor performance
  4. 7:34eBPF is used to build tracing tools - A virtual machine that runs inside the Linux kernel Let's you write C code which is executed when triggered by events. You can define the event triegers - system calls being executed network packets arriving functions in programs being run.
  5. 34:47Tracing Go function arguments - When switching contexts between different functions, the Go runtime will place arguments at offsets from the top of the stack based on their size and order in the list of arguments
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.