Labs

Reproduce behavior with small C and C++ programs, observe it with tools, and compare results.

Each lab lists its tools and permissions, commands, and expected observations. How are experiments verified?

LAB 01 C / Linux

A first GDB investigation — from C to machine code ↗

Pause a small C program, watch a number change in memory, then change one argument yourself.

LAB 02 C / Linux

Branches and pointers under optimization ↗

Compare two builds of the same condition and catch the moment a pointer target changes.

LAB 03 C / Linux

Observing a memory permission change ↗

Watch a memory page change from writable to executable, then explain what that observation proves.

LAB 04 C / Linux

Symbol selection and function interposition with LD_PRELOAD ↗

Make the same program print 11 or 22 by choosing which library supplies a function.

LAB 05 C / Linux

Separating, stripping, and reconnecting debug information ↗

Move debugging information to a separate file and help GDB find the source again.

LAB 06 C / Linux

Examining compiler differences and optimization levels ↗

Compile one calculation three ways: keep the answer and compare the instructions.

LAB 07 C / Linux

CPU profiling and flame graphs with perf ↗

Profile a C program with perf stat, perf record, and a flame graph; confirm the hotspot and prove the fix.

LAB 08 C / Linux

First steps with bpftrace ↗

Trace a deterministic C program and check every bpftrace count, histogram, and stack against the source.

LAB 09 C / Linux

Diagnosing a slow program that barely uses the CPU ↗

Find a lock held across a slow step when the CPU is idle: syscalls, uprobes, a timeline, and GDB.

LAB 10 C++ / Linux

Measuring call intervals, elapsed time, and thread CPU time ↗

Read the C++ measurement points and calculate elapsed, CPU, and entry-to-entry time from raw CSV rows.

LAB 11 C++ / Linux

Correlating six event boundaries across direct and queued calls ↗

Inspect direct calls and queue handoffs, then calculate each stage from six matching event markers.

LAB 12 Bash / Linux

Sampling thread counters without scheduler tracing ↗

Read procfs files directly, check task identity, and subtract thread counters yourself in Bash.

LAB 13 C++ / Linux

Measuring function entries and returns with probes ↗

Write an entry counter and entry/return probes, then explain clocks, pairing, and histogram counts.

LAB 14 Bash / Linux

Reading a scheduler timeline one transition at a time ↗

Inspect scheduler tracepoints, pair raw task transitions, and calculate blocked and runnable time.

execmap / search

Type a few letters to search.