@hackage hs-speedscope0.3.0
Convert an eventlog into the speedscope json format
Categories
License
BSD-3-Clause
Maintainer
matthewtpickering@gmail.com
Links
Versions
Installation
Tested Compilers
Dependencies (8)
- aeson >=1.4 && <2.3
- base >=4.12.0.0 && <5
- extra >=1.7 && <1.9
- ghc-events >=0.13 && <0.21
- machines >=0.7 && <0.8
- optparse-applicative >=0.15.0 && <0.20 Show all…
Dependents (1)
@hackage/ghc-stack-profiler-speedscope
hs-speedscope
hs-speedscope is a simple executable for converting an eventlog into a format suitable to load into speedscope.
WARNING: Only GHC 8.10 supports generating an eventlog with the correct events for this program to work.
Usage
- Create an eventlog which contains time profiling events by running your program with
program +RTS -p -l-au. - Run
hs-speedscopeon the resulting eventloghs-speedscope program.eventlog. - Load the resulting
program.eventlog.jsonfile into speedscope to visualise the profile.
Installation
cabal update
cabal install exe:hs-speedscope
This will install to cabal's per-user default location: ~/.cabal/bin/hs-speedscope.
Filtering an eventlog
It is sometimes useful to isolate a specific part of the sample, for example, when I was profiling ghcide, I want to isolate a single hover request.
The --start and --end options can be used to indicate which parts of the
eventlog to keep. The filtering options look for messages inserted into the
eventlog by traceMarker events.
- No events before the first marker which matches the prefix given by
--startwill be included in the result - No events after the first marker which matches the prefix given by
--endwill be included in the result.
For example, the following invocation will filter the profile between the START and END markers.
hs-speedscope File.eventlog --start START --end END