21 days ago · Tech · 0 comments

You've probably heard about eBPF before, it's getting more popular everyday with the extended observability and low-level control coverages it gets in Linux kernel. But did you know that eBPF can also look inside the Go runtime? Keep reading and I'll show you how we can use eBPF uprobes to trace goroutine lifecycle events and memory allocations as they happen, giving us a real-time view of what Go's scheduler is doing under the hood. Here's my latest side project, also a winner of the : xgotop. xgotop is a Go runtime tracing tool to observe goroutine state changes and memory allocations in near realtime. This will be a two part series. In this article, we'll go through my thought process during the design and development of xgotop, also I'll explain some aspects of Go runtime internals, as well as using bpftrace to write PoCs for eBPF programs. The second one will cover turning the bpftrace PoC into a standalone project utilizing eBPF ringbuffers, hashmaps, LRU caches, and…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.