~/talk

Lightweight profiling with ghc-stack-profiler

Talkat 2026 Haskell Implementors' Workshop · on Friday, 2026-06-05· [haskell]
links:none on file
slides:none on file

Lightweight sampling profiler implemented as a Haskell library that writes samples to the eventlog by periodically cloning RTS call stacks with the existing cloneThreadStack primitive and serialising frames. It doesn’t need the profiled RTS or recompilation of dependencies, but it requires -finfo-table-map for source locations and benefits from GHC 9.14 stack annotations to label regions. Output converts to SpeedScope via gstack-profiler-speedscope. Sampling is configurable (µs–ms); reported overheads in real workloads are around 20% and pure/lazy code can hide annotations.

AI-written summary · about

  1. 0:00Introduction to the profiler
  2. 1:36Architecture and design
  3. 4:59Practical demonstration
  4. 14:25Stack annotations explained
  5. 20:49Strategic usage guidelines
  6. 22:40Summary and Q&A
~/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.