aboutsummaryrefslogtreecommitdiffstats
path: root/README
blob: 266fc1e6949d414250f01a4ae320f8abafa3f8b7 (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
OProfileUI
~~~~~~~~~~

OProfileUI is a user-interface both for controlling the capture of OProfile
profiles from remote devices and for displaying the profile in a graphical
manner.

There are the following sections of documentation below: 
  * Building
  * Requirements
  * Usage: Online method
  * Usage: Offline method
  * The view


Building
~~~~~~~~

Please see INSTALL.


Requirements
~~~~~~~~~~~~

OProfile version 0.9.4 of greater is required.

Usage: Online method
~~~~~~ ~~~~~~ ~~~~~~

Ensure you have a working OProfile setup on the device. A useful command to do
this is (as root):

# opcontrol --init; opcontrol --status

The server can then be started using 'oprofile-server':

# oprofile-server

If this is successful no output will be given, it is important to run this as
root. By default it listens on port 4224. This can be changed with the --port
command line option.

The client program is called 'oprofile-viewer'.

The UI is relatively straightforward, the key functionality is accessed
through the buttons on the toolbar (which are duplicated in the menus.)

These buttons are:

Connect - connect to the remote host, the IP address or hostname for the
target can be supplied here
Disconnect - disconnect from the target

Start - start the profiling on the device
Stop - stop the profiling on the device and download the data to the local
host. This will generate the profile and show it in the viewer.

Download - download the data from the target, generate the profile and show it
in the viewer.
Reset - reset the sample data on the device. This will remove the sample
information that was collected on a previous sampling run. Ensure you do this
if you do not want to include old sample information.

Save - save the data downloaded from the target to another directory for later
examination
Open - load data that was previously saved.

The behaviour of the client is to download the complete 'profile archive' from
the target to the host for processing. This archive is a directory containing
the sample data, the object files and the debug information for said object
files. This archive is then converted using a script included in this
distribution ('oparchconv') that uses 'opimport' to convert the archive from
the target to something that can be processed on the host.

Downloaded archives are kept in /tmp and cleared up when they are no longer in
use.


Usage: Offline method
~~~~~~ ~~~~~~~ ~~~~~~

If no network access to the target is available an archive for processing in
'oprofile-viewer' can be generated with the following set of command.

# opcontrol --reset
# opcontrol --start --separate=lib --no-vmlinux

Now do the tasks that you want to be profiled.

# opcontrol --stop
# oparchive -o my_archive

Where my_archive is the name of the archive directory where you would like the
profile archive to be kept. The directory will be created for you. This can
then be copied to another host and loaded using 'oprofile-viewer''s open
functionality. The archive will be converted if necessary.


The view
~~~ ~~~~

The UI has 4 ways to group the profiling information in the viewer. These are
controlled through the options "Group by Application" and "Group by Module" in
the 'View' menu.

These map to various use-cases:

Find the busiest application: use "Group by Application".

Find the busiest module (e.g. library) in an application: use "Group by
Application" and "Group by Module".

Find the busiest symbol for an application across all of the modules: use
"Group by Application" but not "Group by Module".

Find the busiest module: use "Group by Module" but not "Group by Application".

Find the busiest symbol: use neither "Group by Application" nor "Group by
Module".

The panel at the bottom shows useful information about the selected module or
symbol.

For modules it shows details about how busy the module is and which
applications use it.

For symbols it shows the instance for the symbol but also the callees and
callers for the symbol. If "Group by Application" it will show the
callees/callers for the symbol in that application. Otherwise it will show the
aggregation of the callees and callers for all occurances of this symbol.