[471b1e]: faq / index.php  Maximize  Restore  History

Download this file

224 lines (189 with data), 8.5 kB

  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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
<?php require("../start_page.php"); start_page("faq/", "OProfile FAQ"); ?>
<h3>How do I build OProfile ?</h3>
<p>
For 2.4 kernels, you must have the kernel source available for the kernel
you want to run OProfile under. Do <tt>./configure --with-linux=/path/to/kernel/source</tt>
then <tt>make install</tt>. For 2.6 kernels, configure OProfile into the
kernel (or as a module), then do <tt>./configure --with-kernel-support</tt>
instead.
</p>
<h3>Where can I get the required libraries ?</h3>
<p>
They should already be installed on your system. You may not have
the binutils development package installed, which provides libiberty
and others. On Debian, this package is not installed by default, and
is named "binutils-dev".
</p>
<h3>How do I get started ?</h3>
<p>
Read <?php rlink("doc/overview.html#getting-started", "Getting started") ?>.
</p>
<h3>How do I reset the profiling data ?</h3>
<p>
Using <tt>opcontrol --reset</tt>, or you can save the session under a name
with <tt>opcontrol --save sessionname</tt>.
</p>
<h3>I get "error: no sample files found: profile specification too strict ?"</h3>
<p>
Read <?php rlink("doc/results.html#no-results", "What to do when you don't get any results") ?>.
</p>
<h3>Can OProfile profile the kernel too ?</h3>
<p>
Yes, it profiles the kernel and all kernel modules by default. Pass
the kernel vmlinux image to the post-profiling tools to get kernel
profiles (or the module .o files). For example, <tt>opreport -l /boot/2.6.0/vmlinux</tt>.
</p>
<h3>I don't have a vmlinux file, but I want to profile the kernel anyway !</h3>
<p>
Use <tt>opcontrol --no-vmlinux</tt> when profiling. Then
<a href="http://marc.info/?l=oprofile-list&m=121514749918466&q=p3">use
this script to list the samples</a>.
</p>
<h3>Why do the profile tools fail to open the vmlinux kernel image ?</h3>
<p>
Probably because you have accidentally specified the vmlinu<em>z</em> not
vmlinu<em>x</em> file. If you don't have a vmlinux file you need to recompile your kernel from source.
If you're not doing kernel profiling, you can use <tt>opcontrol --no-vmlinux</tt>.
</p>
<h3>Why is OProfile ignoring me when I try to change the events to profile ?</h3>
<p>
For OProfile to start profiling using the new events, the daemon must be
restarted. In particular, you must use <tt>--shutdown</tt> not
<tt>--stop</tt>, as the latter does <em>not</em> restart the daemon.
Note that the old profiling data is still kept: use <tt>--reset</tt> or
<tt>--save</tt> if you want to clear out old data.
</p>
<h3>But Red Hat don't ship a <tt>vmlinux</tt></h3>
<p>
Actually they do, but it's not installed by default, because it's
stupidly included the huge <tt>kernel-debuginfo</tt> package. I'm afraid
you have no choice other than downloading this CD-sized package, or
compiling your own.
</p>
<h3>OProfile doesn't work on Red Hat !</h3>
<p>
Red Hat made changes to their kernel, so you cannot use OProfile on Red Hat
kernels unless you use their version (which is not available for 7.3). Any problems
with Red Hat's version of OProfile should be reported to them not us. If you
compile your own kernel from Linus's tarball, OProfile should work. Alternatively,
you can re-compile Red Hat's kernel with <tt>sys_call_table</tt> added.
Alternatively, the latest "bigmem" kernels for 7.3 include the Red Hat OProfile backport.
If you use this version you must use the OProfile userspace RPM
from Red Hat 8.0, not any version from this site.
</p>
<h3>Why is OProfile in timer mode on x86? I have performance counters...</h3>
<p>
Recent 2.6 kernels disable the local APIC by default. You can try
enabling the local APIC (if you do indeed have one) by booting with the
<tt>lapic</tt> boot option.
</p>
<h3>Why does OProfile fail with "can't get RTC I/O ports" ?</h3>
<p>
On some systems, only RTC mode profiling is available, as described
in the documentation. If RTC mode is used, you must <i>not</i> use a kernel
with the RTC driver built-in (that is, <tt>CONFIG_RTC</tt> must not be set to
<tt>y</tt>). Otherwise, OProfile cannot acquire the RTC hardware for its own
use, and you will get this error message. If you have compiled the kernel's
RTC driver as a module, you must unload it before using OProfile.
</p>
<h3>Can I get a summary of the whole system ?</h3>
<p>
Try
</p>
<div class="computeroutput">opreport
</div>
or
<div class="computeroutput">opreport -l
</div>
.
<h3>Can I get top-like output from OProfile ?</h3>
<p>
Sure ! Try something like this :
</p>
<div class="computeroutput">watch --interval=1 "opcontrol --dump &amp;&amp; opreport -l 2&gt;/dev/null | head -30 ; opcontrol --reset"
</div>
<p>
for a symbol-based system-wide summary, or
</p>
<div class="computeroutput">watch --interval=1 "opcontrol --dump &amp;&amp; opreport -l /boot/2.6.0/vmlinux | head -30 ; opcontrol --reset"
</div>
<p>
for an image-specific summary.
</p>
<h3>Oprofile and laptops</h3>
<p>
Users have reported a few problems using OProfile on laptops.
</p>
<ol>
<li>
Many laptops do not have performance counter hardware; in this case OProfile
falls back to RTC mode (read the <? rlink("docs/", "documentation"); ?> for
more details).
</li>
<li>
Users report that power management is not compatible with OProfile
on some laptops. Enabling power management is likely
to hang your box if you are using the performance counters. This
does not apply if you're using a 2.6 kernel.
</li>
</ol>
<h3>What sort of overhead does OProfile have ?</h3>
<p>
It's dependent upon how you set up the counters, but it's typically
lost in the noise (1-3%). <? rlink("performance/", "This graph gives typical examples."); ?>
</p>
<h3>Does OProfile work on any other architectures yet ?</h3>
<p>
OProfile ports for IA-64, AMD64, ARM, Alpha, PA-RISC, sparc64, s390, and ppc64
are all in various stages of support, mostly only on 2.6 kernels.
</p>
<h3>Can OProfile collect call graphs like <tt>gprof</tt>?</h3>
<p>
Yes, starting with OProfile 0.8. You need to be on x86 or ARM, and run a recent 2.6
kernel. Call graph is also supported on PowerPC, beginning with the 2.6.17 kernel.
</p>
<h3>What about the "security hole" <a
href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-0576">CVE-2006-0576</a>?</h3>
<p>
This "problem" only occurs if you actively, and mistakenly, configure
access to OProfile via sudo. OProfile uses shell scripts which have not
been audited (nor is it likely to happen) for use through the broken
sudo facility (anything that lets you alter root's path arbitrarily
counts as horribly broken). <em>Do not use sudo</em>!
</p>
<h3><a id="binutilsbug"/>I get an error from the post-profiling tools referring here?</h3>
<p>
Some binutils versions (at least 2.12) are mis-compiled by gcc 2.95.3,
which causes a crash or hang in <tt>opreport</tt> and the other tools.
See the OProfile <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=717720&group_id=16191&atid=116191"
title="bug 717720 - gcc 2.95.3 post profile tools crash or hangs">bug report</a>
for a patch to work around the problem. This is reported to be a
problem with Slackware 8.1, and probably some other older Linux
distributions.
</p>
<h3>Using the 2.4 kernel module, I get "Failed to open hash map device: Operation not permitted"?</h3>
<p>
This is an intermittent problem we have not yet tracked down. The device
file <tt>/var/lib/oprofile/hashmapdev/</tt> is failing the <tt>capable(CAP_SYS_PTRACE)</tt>
test. The simplest workaround is to remove <em>both</em> of these tests in the source
(<tt>oprofile.c</tt>), recompile and reinstall OProfile, then run <tt>opcontrol --deinit</tt>
and start again.
</p>
<h3>Suse kernel, I get: "May 8 11:05:14 mynode kernel: Unable to handle kernel paging request at virtual address ffffe030"</h3>
<p>
This occur with recent Suse UP kernel when you compile your
kernel with CONFIG_X86_LOCAL_APIC. By default these kernel does
not up the local apic. You must force local apic initialization
by booting with the kernel command line parameter apic.
</p>
<h3>VMware</h3>
<p>
OProfile can't work with VMware when using performance counter interface.
A workaround is to use RTC mode (2.4 kernel) or timer interrupt mode (2.6
kernel)
</p>
<h3>what means "cpu_type 'unset' is not valid"</h3>
<p>
Generally this mean your kernel support your hardware but user space tools are not up to date, you should try to upgrade. You can check if your hardware is supported by looking <tt>/dev/oprofile/cpu_type</tt>.
</p>
<?php require("$top/end_page.php"); end_page("faq/"); ?>

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks