THREADSCOPE(1)
π THREADSCOPE β bestie edition π
okay so real talk, this is the threadscope manual page (section 1, General Commands Manual, iykyk) and it's literally a graphical thread profiler for Haskell GHC programs. Let me walk you through it, no cap. β¨
πΈ NAME πΈ
threadscope β a graphical thread profiler for Haskell GHC programs π§
π SYNOPSIS π
threadscope [program.eventlog]
π¦ DESCRIPTION π¦
Threadscope is a graphical thread profiler for Haskell programs. Like, it literally draws you a picture of your threads. Obsessed.
It parses and displays the content of .eventlog files emitted by the GHC 6.12.1 and later runtimes, showing a timeline of spark creation, spark-to-thread promotions and garbage collections. It's giving β¨data visualizationβ¨ but make it concurrency.
This helps debugging the parallel performance of Haskell programs β making it easier to check that work is well balanced across the available processors, and to spot performance issues relating to garbage collection or poor load balancing. She's a whole detective honestly. π
π ARGUMENTS π
threadscope takes the name of the GHC RTS event-log file to process as its single argument.
If no filename is given, threadscope starts with an empty workspace, where any event-log file can be loaded by means of the GUI file browser facilities. So you're never stuck, bestie. π«Ά
π USAGE π
In order for threadscope to be useful, you have to compile your Haskell program to use GHC's threaded run-time and also to create runtime profile logs. This can be accomplished with the following command line options to ghc(1):
$ ghc -threaded -eventlog --make Foo.hs -o foo
Once the program is built, execute it using the multithreaded run-time, specifying the number of HECs (Haskell Execution Contexts) to use in the usual manner, but also requesting the creation of an event log. For example, to use two HECs and create an event log you would use:
$ foo +RTS -N2 -ls -RTS ...
Once the program runs to completion, a file named foo.eventlog is produced. You can start threadscope from the shell prompt passing the event-log filename as the single argument, or you can start threadscope from the desktop menus and use its file browsing capabilities to find and open it. Two paths, same slay. π
β SEE ALSO β
π AUTHOR π
threadscope was written by:
Simon Marlow <marlowsd@gmail.com>
Donnie Jones <donnie@darthik.com>
Satnam Singh <s.singh@ieee.org>
This manual page was written by:
Ernesto HernΓ‘ndez-Novich (USB) <emhn@usb.ve>
for the Debian project (and may be used by others).
and that's the whole page, bestie π₯Ή this was the THREADSCOPE(1) manual from the General Commands Manual, dated June 28, 2010. go profile some threads, you've got this πβ¨ππ¦
π¦ where this page comes from
- debian bookworm: threadscope 0.2.14.1-1 Β· Glasgow Haskell Compiler License
- ubuntu jammy: threadscope 0.2.13-1build1.1 Β· Glasgow Haskell Compiler License
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms