Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

oprofile Log


Commit Date  
[6893b5] by Maynard Johnson Maynard Johnson

Merge remote branch 'origin/perf-events'

Conflicts:
libop/op_cpu_type.c
libop/op_cpu_type.h

Merge perf-events branch with master

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>

2012-07-10 14:35:34 Tree
[f6e376] by Maynard Johnson Maynard Johnson

Fix up help text for --with-kernel option

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>

2012-07-06 20:25:47 Tree
[988007] by Maynard Johnson Maynard Johnson

Add --with-kernel configure option to specify location of kernel headers

This new configure option can be useful in cross-compile environments or
other situations where the host system does not support perf_events but
the user wants to build binaries for a target system that does support
perf_events.

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>
Signed-off-by: Balazs Kilvady <kilvadyb@homejinni.com>
Signed-off-by: Gergely Kis <gergely@homejinni.com>

2012-07-06 19:31:49 Tree
[6bc578] by Maynard Johnson Maynard Johnson

Document non-support for event-based profiling in guest environments

Doc fix for bug #3393079.

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>

2012-07-06 15:12:22 Tree
[01c7ce] by Maynard Johnson Maynard Johnson

Make opreport use <cur_dir>/oprofile data for default session-dir

Since operf will be the recommended profiling tool in the future
(instead of opcontrol) and since operf stores the sample data by
default in <cur_dir>/oprofile_data, it makes sense for opreport
and other oprofile post-processing tools to look first in
<cur_dir/oprofile_data; then, if no samples are found there, the
tool should fall back to the "standard" /var/lib/oprofile session-dir.

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>

2012-07-03 19:15:19 Tree
[3f1b50] by Will Deacon Will Deacon , pushed by Maynard Johnson Maynard Johnson

Update support for ARMv7 processors

- update architected ARMv7 event descriptions
- add support for Cortex-A5 ARMv7 PMU implementations
- add support for Cortex-A7 ARMv7 PMU implementations
- add support for Cortex-A15 ARMv7 PMU implementations

The part of this patch that adds support for new ARM PMU
implementations also updates the new function in
libop/op_cpu_type that was added in the perf-events branch
so that these new processors can be used with operf.
For this reason, this patch is currently only being applied
to the perf-events branch, so support for the new ARM processors
won't be available in oprofile "mainline" until we merge the
perf-events branch with the master branch.

Signed-off-by: Will Deacon <will.deacon@arm.com>

2012-07-02 13:47:17 Tree
[6316db] by Suravee Suthikulpanit Suravee Suthikulpanit , pushed by Maynard Johnson Maynard Johnson

Add support for AMD and older Intel processors to operf

Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Signed-off-by: Andi Kleen <andi@firstfloor.org>

2012-06-28 15:50:59 Tree
[4e4178] by Maynard Johnson Maynard Johnson

Make operf use OP_BINDIR when invoking ophelp

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>

2012-06-27 21:01:19 Tree
[e98a05] by Gergely Kis Gergely Kis , pushed by Maynard Johnson Maynard Johnson

Detect MIPS CPUs based on the "cpu model" field of /proc/cpuinfo

Signed-off-by: Gergely Kis <gergely@homejinni.com>

2012-06-26 12:47:28 Tree
[cf8d61] by Maynard Johnson Maynard Johnson

Fix operf handling of invalid options

When using either the "--system-wide" or the "--pid" option,
the operf program was not aborting right away if an invalid
option was also passed. This patch fixes that problem.

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>

2012-06-25 21:29:18 Tree
[589207] by Maynard Johnson Maynard Johnson

Remove unused "--kernel-buffersize-multiplier" option from operf

The "--kernel-buffersize-multiplier" option was not wired in to
perform any actions. In the course of wiring it in to the mmap
call (where the operf record process mmap's the perf_events kernel
data) and performing functional tests, I found that bumping up
the mmap size had little noticeable beneficial effect -- perhaps
even *no* effect at all. I expected that the perf_event_header type
of PERF_RECORD_LOST would be an indication that a larger kernel
buffer (i.e., mmap'ed area) was needed. I was able to force such
"LOST" samples by using a very high sampling rate, yet increasing
the number mmap pages did not eliminate the LOST samples. So I
removed this option from the code and the man page.

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>

2012-06-25 20:54:33 Tree
[a679f7] by Maynard Johnson Maynard Johnson

Make number of mmap pages for perf_events data be based on pagesize

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>

2012-06-25 13:42:54 Tree
[f12513] by Maynard Johnson Maynard Johnson

Handle EINTR of operf read of sample data pipe

When profiling an application with operf's "--pid" option,
the user must stop profiling using ctrl-C. A signal
handler was setup for the operf process that reads
sample data from a pipe (written to by the operf record
process), but when that handler was triggered, the
operf read process was ending before reading the
rest of the sample data from the pipe. In cases
where lots of sample data has already been received,
the little bit that gets left in the pipe may not be
noticeable. But for situations where the samples
are few and far between, this problem can, on some
platforms, result in no profiling data being received
at all.

The fix for the problem is to detect an EINTR when trying
to read the pipe and go back and read it again.

Another symptom of unnecessary stopping due to EINTR is
possible when opening the sample data files to store
the converted sample data. This is a very small window,
and I have not actually seen this symptom, but with this
patch, I plug up that window as well.

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>

2012-06-22 13:11:41 Tree
[98ca57] by Maynard Johnson Maynard Johnson

Set exclude_idle to 0 in operf call to perf_event_open

Not all architectures support exclude_idle, so we should not
set this by default. Also, we should let this decision be
made implicitly by the native event being used for profiling.

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>

2012-06-21 16:51:35 Tree
[8d4b12] by Maynard Johnson Maynard Johnson

Fix opjitconv to not end abnormally when no jit dump directory is found

When operf is run on a system before any other opcontrol commands,
it's likely that the jit dump directory (/var/lib/oprofile/jitdump)
will not exist, since that directory is created by opcontrol.
However, the opjitconv program (which is run at the end of operf
execution) expects to find this directory and will end abnormally
if it does not find it. This patch allows opjitconv to end normally
in either case.

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>

2012-06-20 23:20:33 Tree
[8d93d7] by Paul Guo Paul Guo , pushed by Maynard Johnson Maynard Johnson

Add assembly-level support for TILE in operf

Signed-off-by: Paul Guo <ggang@tilera.com>

2012-06-20 14:45:21 Tree
[177e91] by Maynard Johnson Maynard Johnson

Minor fixups for verbose output for operf

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>

2012-06-19 20:42:51 Tree
[6d652b] by Paul Guo Paul Guo , pushed by Maynard Johnson Maynard Johnson

Add TILE support to operf

Signed-off-by: Paul Guo <ggang@tilera.com>

2012-06-19 20:15:27 Tree
[0fa5fc] by Maynard Johnson Maynard Johnson

Add #include "config.h" before bfd.h for perf-events branch

While building oprofile against a current CVS snapshot of binutils,
I received the following error:

-----------------------------------------
make[2]: Entering directory `/home/cseo/at5.0/at5.0-5/src/oprofile/libopagent'
/bin/sh ../libtool --tag=CC --mode=compile /opt/at5.0-5-rc1/bin/gcc -DHAVE_CONFIG_H -I. -I.. -I/home/cseo/at5.0/at5.0-5/src/oprofile/libopagent -fPIC -I /home/cseo/at5.0/at5.0-5/src/oprofile/libop -I /home/cseo/at5.0/at5.0-5/src/oprofile/libutil -g -MT libopagent_la-opagent.lo -MD -MP -MF .deps/libopagent_la-opagent.Tpo -c -o libopagent_la-opagent.lo `test -f 'opagent.c' || echo '/home/cseo/at5.0/at5.0-5/src/oprofile/libopagent/'`opagent.c
libtool: compile: /opt/at5.0-5-rc1/bin/gcc -DHAVE_CONFIG_H -I. -I.. -I/home/cseo/at5.0/at5.0-5/src/oprofile/libopagent -fPIC -I /home/cseo/at5.0/at5.0-5/src/oprofile/libop -I /home/cseo/at5.0/at5.0-5/src/oprofile/libutil -g -MT libopagent_la-opagent.lo -MD -MP -MF .deps/libopagent_la-opagent.Tpo -c opagent.c -fPIC -DPIC -o .libs/libopagent_la-opagent.o
In file included from opagent.c:63:0:
/opt/at5.0-5-rc1/include/bfd.h:37:2: error: #error config.h must be included before this header
-----------------------------------------

I opened a bug against binutils for this (see http://sourceware.org/bugzilla/show_bug.cgi?id=14243),
but the rationale for this error was explained to me thusly:

"This is a correctness issue. bfd.h and the headers that bfd.h #include test at
least one HAVE_* macro. So you need to include the file that defines those
HAVE_* macros before bfd.h. [sic] It is a really good idea to always include
config.h (or sysdep.h or alloca-conf.h that include config.h) before any other
files, including system headers."

This patch is a minimal patch that addresses the build failure with binutils,
ensuring that our config.h is #include'd before bfd.h

Since my work on the perf-events branch has involved testing on newer
binutils, I want to get this fix committed into the perf-events branch now
so I don't need to be adding a private patch for those times when I build
with new binutils.

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>

2012-06-15 18:55:33 Tree
[69442b] by Will Deacon Will Deacon , pushed by Maynard Johnson Maynard Johnson

Factor out /proc/cpuinfo scanning and add support for ARM to operf

This patch adds support for parsing the cpu type from /proc/cpuinfo on
ARM platforms and hooks this into __get_cpu_type_alt_method so that
perf-events can be used as the backend. The previous /proc/cpuinfo parsing
code used by ppc64 to identify the current CPU type is useful for other
architectures that don't have a userspace cpuid instruction (for example, ARM),
so this patch factors out the /proc/cpuinfo reading code to be usable for
ARM support.

Signed-off-by: Will Deacon <will.deacon@arm.com>

2012-06-15 18:36:21 Tree
[08d917] by Maynard Johnson Maynard Johnson

Add #include "config.h" before bfd.h

While building oprofile against a current CVS snapshot of binutils,
I received the following error:

-----------------------------------------
make[2]: Entering directory `/home/cseo/at5.0/at5.0-5/src/oprofile/libopagent'
/bin/sh ../libtool --tag=CC --mode=compile /opt/at5.0-5-rc1/bin/gcc -DHAVE_CONFIG_H -I. -I.. -I/home/cseo/at5.0/at5.0-5/src/oprofile/libopagent -fPIC -I /home/cseo/at5.0/at5.0-5/src/oprofile/libop -I /home/cseo/at5.0/at5.0-5/src/oprofile/libutil -g -MT libopagent_la-opagent.lo -MD -MP -MF .deps/libopagent_la-opagent.Tpo -c -o libopagent_la-opagent.lo `test -f 'opagent.c' || echo '/home/cseo/at5.0/at5.0-5/src/oprofile/libopagent/'`opagent.c
libtool: compile: /opt/at5.0-5-rc1/bin/gcc -DHAVE_CONFIG_H -I. -I.. -I/home/cseo/at5.0/at5.0-5/src/oprofile/libopagent -fPIC -I /home/cseo/at5.0/at5.0-5/src/oprofile/libop -I /home/cseo/at5.0/at5.0-5/src/oprofile/libutil -g -MT libopagent_la-opagent.lo -MD -MP -MF .deps/libopagent_la-opagent.Tpo -c opagent.c -fPIC -DPIC -o .libs/libopagent_la-opagent.o
In file included from opagent.c:63:0:
/opt/at5.0-5-rc1/include/bfd.h:37:2: error: #error config.h must be included before this header
-----------------------------------------

I opened a bug against binutils for this (see http://sourceware.org/bugzilla/show_bug.cgi?id=14243),
but the rationale for this error was explained to me thusly:

"This is a correctness issue. bfd.h and the headers that bfd.h #include test at
least one HAVE_* macro. So you need to include the file that defines those
HAVE_* macros before bfd.h. [sic] It is a really good idea to always include
config.h (or sysdep.h or alloca-conf.h that include config.h) before any other
files, including system headers."

This patch is a minimal patch that addresses the build failure with binutils,
ensuring that our config.h is #include'd before bfd.h

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>

2012-06-15 15:06:52 Tree
[3d9018] by Maynard Johnson Maynard Johnson

Add comment in operf man page about using ophelp to list available events

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>

2012-06-12 18:56:02 Tree
[d17626] by Maynard Johnson Maynard Johnson

Add reporting of profiling statistics to operf.

This patch adds the recording of the following stats:

OPERF_SAMPLES, /**< nr. samples */
OPERF_KERNEL, /**< nr. kernel samples */
OPERF_PROCESS, /**< nr. userspace samples */
OPERF_INVALID_CTX, /**< nr. samples lost due to sample address not in expected range for domain */
OPERF_LOST_KERNEL, /**< nr. kernel samples lost */
OPERF_LOST_SAMPLEFILE, /**< nr samples for which sample file can't be opened */
OPERF_LOST_NO_MAPPING, /**< nr samples lost due to no mapping */
OPERF_NO_APP_KERNEL_SAMPLE, /**<nr. user ctx kernel samples dropped due to no app context available */
OPERF_NO_APP_USER_SAMPLE, /**<nr. user samples dropped due to no app context available */
OPERF_BT_LOST_NO_MAPPING, /**<nr. backtrace samples dropped due to no mapping */
OPERF_LOST_INVALID_HYPERV_ADDR, /**<nr. hypervisor samples dropped due to address out-of-range */
OPERF_RECORD_LOST_SAMPLE, /**<nr. samples lost reported by perf_events kernel */

At the completion of a profiling run, these stats are written to the
operf.log file (new in this patch) at <session_dir>/samples.

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>

2012-06-12 18:38:47 Tree
[6df901] by Maynard Johnson Maynard Johnson

Build operf man page only when the operf program is also built

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>

2012-06-11 19:18:52 Tree
[88e125] by Maynard Johnson Maynard Johnson

Switch operf from popt to getopt

Using popt to parse command line arguments for operf did not
work properly for cases where an application to profile is
passed in, along with some app arguments that happen to have
option names the same as operf. Therefore, operf has been
changed to use getopt_long. This decision to not use popt
negated the reason for the changes made to oprofile's libopt++
popt_option.[c|h] files back when operf was first introduced;
thus, those changes are reverted with this patch.

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>

2012-06-11 15:10:58 Tree
Older >