Changes between Version 1 and Version 2 of Debugging/LowLevelProfiling/oprofile
- Timestamp:
- 11/03/09 06:38:24 (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Debugging/LowLevelProfiling/oprofile
v1 v2 3 3 = oprofile = 4 4 5 OProfile does a system-wide profile using performance counters. It can also generate annotated source/assembly just like VTune. 5 OProfile 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. 6 6 7 7 It 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`. … … 13 13 $ sudo opcontrol --init 14 14 $ sudo opcontrol --reset 15 $ sudo opcontrol --setup --event=<event> 15 16 $ sudo opcontrol --start 16 17 $ ... run program... … … 18 19 $ sudo opreport 19 20 }}} 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. 21 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. To see a list of possible `<event>`s, use 22 {{{ 23 $ opcontrol --list-events 24 }}} 21 25 22 26 Then to annotate the source:
