Personal tools

ThreadScope Tour

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
(toc page)
 
(maybe better wording?)
 
(22 intermediate revisions by one user not shown)
Line 1: Line 1:
  +
__NOTOC__
 
''A guided tour of ThreadScope''
 
''A guided tour of ThreadScope''
   
In this tutorial, we'll be working through concrete examples on using ThreadScope to debug the performance of parallel programs.
+
Have parallel Haskell but not enough performance? Try [[ThreadScope]]! It won't fix your program for you, but it may help you to understand what is slowing your program down. We in the ThreadScope team have put together this user guide to help you get started and make the most of this tool.
   
We aim to keep each module in the tutorial self-contained, so you can either follow the progression suggested or jump to just the sections we need.
+
You can also treat this manual as a tutorial. We'll be working through concrete examples on using ThreadScope to debug the performance of parallel programs. We aim to keep each module in this tutorial self-contained, so you can either follow the progression suggested or jump to just the sections we need.
   
Note that you will need:
+
<div class="subtitle">Software</div>
   
* ThreadScope 0.2.1 or higher
+
This tutorial is written with the following software versions in mind.
* GHC 7.4 or higher. You could try earlier versions, but more advanced features such as spark events will not available
 
   
== Getting Started ==
+
* [[ThreadScope]] 0.2.1
  +
* GHC 7.4. (earlier versions work, but lack more advanced features like spark events)
  +
  +
<div class="subtitle">Getting started</div>
  +
  +
[[Image:ThreadScope-ch8.png|thumb]]
   
 
# [[ThreadScope_Tour/Install|Installation]]: install ThreadScope and run a sample trace
 
# [[ThreadScope_Tour/Install|Installation]]: install ThreadScope and run a sample trace
# [[ThreadScope_Tour/Run|Hello world]]: Run ThreadScope on a small test program
+
# [[ThreadScope_Tour/Run|Hello world]]: run ThreadScope on a small test program
   
== Basic skills ==
+
<div class="subtitle">Basic skills</div>
  +
  +
[[Image:ThreadScope-sudoku2.png|thumb]]
   
 
<ol start="3" style="list-style-type: decimal;">
 
<ol start="3" style="list-style-type: decimal;">
<li><p>[[ThreadScope_Tour/Statistics|Initial statistics]]: collect some simple statistics</p></li>
+
<li>[[ThreadScope_Tour/Statistics|Initial statistics]]: collect some simple statistics</li>
<li><p>[[ThreadScope_Tour/Profile|Profile]]: examine the profile for a real program</p></li>
+
<li>[[ThreadScope_Tour/Profile|Profile]]: examine the profile for a real program </li>
<li><p>[[ThreadScope_Tour/Profile2|Profile 2]]: examine the profile for an improved program</p></li>
+
<li>[[ThreadScope_Tour/Profile2|Profile 2]]: examine the profile for an improved program</li>
<li><p>[[ThreadScope_Tour/Zoom|Zoom]]: zooming and bookmarking</p></li></ol>
+
<li>[[ThreadScope_Tour/Zoom|Zoom]]: zoom in to see performance behaviour at a finer resolution</li>
  +
<li>[[ThreadScope_Tour/Bookmark|Bookmark]]: place a temporary marker in the eventlog</li>
  +
<li>[[ThreadScope_Tour/Consolidate|Consolidate]]: tease out the sequential parts of code</li></ol>
   
== Digging into a program with spark events ==
+
<div class="subtitle">Digging into a program with spark events</div>
   
<ol start="7" style="list-style-type: decimal;">
+
[[Image:spark-lifecycle.png|thumb]]
<li><p>[[ThreadScope_Tour/SparkOverview|Spark overview]]</p>
+
  +
<ol start="9" style="list-style-type: decimal;">
  +
<li>[[ThreadScope_Tour/SparkOverview|Spark overview]]
 
<ul>
 
<ul>
 
<li>[[ThreadScope_Tour/RTS|GHC RTS flags]]: a subset of flags relevant to ThreadScope</li>
 
<li>[[ThreadScope_Tour/RTS|GHC RTS flags]]: a subset of flags relevant to ThreadScope</li>
<li>[[ThreadScope_Tour/spark-lifecycle.png|Spark lifecycle]]: Lifecycle of a spark</li></ul>
+
<li>[[Special:FilePath/spark-lifecycle.png|Spark lifecycle]]: Lifecycle of a spark</li></ul>
  +
</li>
  +
<li>[[ThreadScope_Tour/Spark|Spark rates]]: study spark creation/conversion
 
</li>
 
</li>
<li><p>[[ThreadScope_Tour/Spark|Spark rates]]: study spark creation/conversion</p></li>
+
<li>[[ThreadScope_Tour/Spark2|Spark rates 2]]: spark debugging continued</li>
<li><p>[[ThreadScope_Tour/Spark2|Spark rates 2]]: spark debugging continued</p></li>
+
</ol>
<li><p>[[ThreadScope_Tour/Spark2|Spark sizes]]: spark debugging continued</p></li></ol>
 
   
== Reference ==
+
<div class="subtitle">Reference</div>
   
 
* [[ThreadScope_Tour/Downloads|Downloads]]: examples used in this tutorial
 
* [[ThreadScope_Tour/Downloads|Downloads]]: examples used in this tutorial
   
== Planned ==
+
''This tutorial was initially written by Well-Typed in the context of the [[Parallel GHC Project]]. [mailto:[email protected] Feedback] would be most appreciated!''
   
# [[ThreadScope_Tour/Trace|Trace]]: custom events
+
[[Category:ThreadScope]]
# [[ThreadScope_Tour/Consolidate|Consolidate]]: tease out the sequential parts of code
 

Latest revision as of 07:47, 17 May 2012

A guided tour of ThreadScope

Have parallel Haskell but not enough performance? Try ThreadScope! It won't fix your program for you, but it may help you to understand what is slowing your program down. We in the ThreadScope team have put together this user guide to help you get started and make the most of this tool.

You can also treat this manual as a tutorial. We'll be working through concrete examples on using ThreadScope to debug the performance of parallel programs. We aim to keep each module in this tutorial self-contained, so you can either follow the progression suggested or jump to just the sections we need.

Software

This tutorial is written with the following software versions in mind.

  • ThreadScope 0.2.1
  • GHC 7.4. (earlier versions work, but lack more advanced features like spark events)
Getting started
ThreadScope-ch8.png
  1. Installation: install ThreadScope and run a sample trace
  2. Hello world: run ThreadScope on a small test program
Basic skills
ThreadScope-sudoku2.png
  1. Initial statistics: collect some simple statistics
  2. Profile: examine the profile for a real program
  3. Profile 2: examine the profile for an improved program
  4. Zoom: zoom in to see performance behaviour at a finer resolution
  5. Bookmark: place a temporary marker in the eventlog
  6. Consolidate: tease out the sequential parts of code
Digging into a program with spark events
Spark-lifecycle.png
  1. Spark overview
  2. Spark rates: study spark creation/conversion
  3. Spark rates 2: spark debugging continued
Reference

This tutorial was initially written by Well-Typed in the context of the Parallel GHC Project. Feedback would be most appreciated!