How to collect profiling info from Haskell service running in Kubernetes?
I think the only way to do live profiling with GHC is to use the eventlog. You can insert Debug.Trace.traceEvent
into your code at the functions that you want to measure and then compile with -eventlog
and run with +RTS -l -ol <output-file-name> -RTS
. You can use ghc-events-analyze
to analyze and visualize the produced eventlog.
The official eventlog documentation for GHC 8.8.3 is here.