Changes between Version 1 and Version 2 of Debugging/LowLevelProfiling/oprofile


Ignore:
Timestamp:
Nov 3, 2009 2:38:24 PM (5 years ago)
Author:
guest
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Debugging/LowLevelProfiling/oprofile

    v1 v2  
    33= oprofile = 
    44 
    5 OProfile does a system-wide profile using performance counters.  It can also generate annotated source/assembly just like VTune.   
     5OProfile does a system-wide profile using performance counters.  It can also generate annotated source/assembly just like VTune.  Unfortunately, because GHC can't export source-level debugging symbols, OProfile cannot do source-level annotation of GHC programs. 
    66 
    77It can be installed from a package on Ubuntu, which is cool.  But beware: Ubuntu bug 172495: [[https://bugs.launchpad.net/ubuntu/+source/oprofile/+bug/172495/]] : change the `/bin/sh` to `/bin/bash` at the top of `/usr/bin/opcontrol`. 
     
    1313$ sudo opcontrol --init 
    1414$ sudo opcontrol --reset 
     15$ sudo opcontrol --setup --event=<event> 
    1516$ sudo opcontrol --start 
    1617$ ... run program... 
     
    1819$ sudo opreport 
    1920}}} 
    20 check that the program you ran is at the top of the profile somewhere.  Sometimes for me it doesn't appear, and have to run it again. 
     21check that the program you ran is at the top of the profile somewhere.  Sometimes for me it doesn't appear, and have to run it again.  To see a list of possible `<event>`s, use 
     22{{{ 
     23$ opcontrol --list-events 
     24}}} 
    2125 
    2226Then to annotate the source: