summaryrefslogtreecommitdiff
path: root/p/threadscope/debian/README.Debian
blob: b6400bb4a55c2e6375974ba313ca3457ebd42c1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Using Threadscope
-----------------

In order for threadscope to be useful, you have to compile your
Haskell program to use the threaded run-time and also to create
runtime profile logs, e.g.

$ ghc -threaded -eventlog --make Foo.hs -o foo

Once the program is built, execute it using the multithreaded
run-time, specifying the number of cores to use in the usual
manner, but also requesting the creation of an event log, e.g.
for two cores (actually Haskell Execution Contexts, or HEC)
and event log creation you'd 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 command line, using the
aforementioned .eventlog file as the sole argument, e.g.

$ threadscope foo.eventlog

or you can start threadscope from the desktop menus and use its
file browsing capabilities to find and open foo.eventlog.

Once opened, you'll see that threadscope:

* Displays the activity on each Haskell Execution Context (HEC)
  which roughly corresponds to an operating system thread. For
  each thread you can see whether it is running a Haskell thread
  or performing garbage collection.

* You can find out information about when Haskell threads are
  ready to run and information about why a Haskell thread was
  suspended.

* You can observe how threads migrate between HECs and you can
  observe sparks being picked up for speculative execution.

* An activity profile indicates the rough utilization of the HECs
  and when the number of HECs are greater than the number of
  processing cores this gives a rough guide to the overall
  utilization.

* You can place bookmarks at various points in the time profile
  to help with navigation.

* You can save the graphical reports to PNG or PDF files.

Have fun!
--
Ernesto Hernández-Novich (USB) <emhn@usb.ve>
Mon, 28 Jun 2010 19:26:47 -0430