oprofile Log


Commit Date  
[b9e7ba] by Maynard Johnson Maynard Johnson

Fix warning message about diff in module and symbol sample counts

A commit made recently that printed a debug message when module summary
count differs from total symbols counts was incorrectly printing a
warning message because the patch did not check for the criteria that
the module_summary_count was < sym_count_total. This patch fixes
that problem. Note that the problem was only visible when running
with '--verbose=all'.

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

2013-06-14 16:55:02 Tree
[40c0fa] by Maynard Johnson Maynard Johnson

Print debug message when module summary count differs from total symbols counts

A user who was profiling a Java application was generating various types of
reports with opreport. He noted an anomaly involving module sample counts for
certain binary images that were associated with the JVM (a couple shared libs
and the <PID>.jo file created by opjitconv). The 'opreport' and 'opreport --xml'
commands showed different module-level sample counts for these particular
binary images.

When the '--xml' option is passed to opreport, by default, it outputs
symbol-level sample counts, so there's no way to directly compare a
"no symbols" summary report between XML and flat text. The flat text
summary includes all samples attributed to a binary, but when a
symbols-level report is requested, we may find that some of those samples
are bogus or for some reason, cannot be resolved to a symbol (e.g., the
address lies outside the range of symbol addresses for this binary).
The XML module summary count actually sums up the individual symbols
counts, so that's why it's possible to see a differnce in XML module
summary counts and flat text module summary counts.

This patch adds the capability for opreport to detect a difference in
the module summary count and the total symbols count and to print an
INFO message when the '--verbose=debug' flag is passed. This capability
is documented in the opreport man page.

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

2013-06-10 12:04:51 Tree
[74abfb] by Maynard Johnson Maynard Johnson

Fix Coverity issues identified against oprofile 0.9.8 release

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

2013-05-15 18:14:43 Tree
[ecfbcc] by Maynard Johnson Maynard Johnson

Fix compile error that occurs with some versions of gcc

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

2013-05-06 22:45:08 Tree
[3aa2fe] by Maynard Johnson Maynard Johnson

oprofile pp tools should print messages about lost samples

When operf completes running, it collects statistics about
lost samples, records them in the operf.log, and prints
a warning message if the number of lost samples exceeds
a pre-defined percentage (.01%) of the total number of
samples. However, when opreport or any of the other oprofile
post-processing tools are run, the statistics are not
readily available (only in the operf.log), so there is no
warning about lost samples. This patch persists those
statistics to files in the <session-dir>/samples/current/stats
dir, allowing the pp tools to access them later. These
stats files are also copied by oparchive, so even archived
profile data will have the statistics available.

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

2013-04-19 12:26:32 Tree
[f54488] by Changbin Park Changbin Park , pushed by Maynard Johnson Maynard Johnson

Ensure parsed_filename's jit_dumpfile_exists variable is initialized before use

Signed-off-by: Changbin Park <changbin.park@lge.com>

2013-04-11 15:10:07 Tree
[7cf28f] by Carl Love Carl Love , pushed by Maynard Johnson Maynard Johnson

operf, remove support to report multiplexing.

The multiplexing reporting doesn't work correctly when profiling
multi-threaded apps or apps that do fork/exec. The detection of
multiplexing doesn't work when processes migrate between CPUs.
The event is enabled on all CPUs. The running time stops when the
event migrates to another CPU however, the enabled time does not stop as it
is enabled on each CPU. The issue is that the running time across CPUs
doesn't add up to the enabled time because of the running time is not
increasing while the process is being migrated. This results in the running
time being less then the enabled time. There is no way to detect if the
reason the running time is less then the enabled time was do to migration
or due to multiplexing.

The support is being removed so that the operf tool is not incorrectly
flagging events for multiplexing.

Signed-off-by: Carl Love <cel@us.ibm.com>

2013-03-12 15:52:15 Tree
[b2c445] by Carl Love Carl Love , pushed by Maynard Johnson Maynard Johnson

operf, add throttling and multiplexing stats

This patch checks to see if the event was throttled or multiplexed. The
events are recorded by creating a file with the name of the event in the
stats sub directory throttled or multiplexed respectively.

Functions are added to the post processing to print messages if multiplexing
and/or throttling occurred during the data collection.

The patch has been tested on an Intel Core(TM)2 Duo CPU T9400 2.53GHz
The following are excerpts from the script used to do the testing.

The events tested are as follows:
event1=INST_RETIRED_ANY_P
event2=CPU_CLK_UNHALTED
event3=INST_RETIRED_ANY_P
event4=L2_RQSTS
event5=LLC_REFS
event6=CPU_CLK_UNHALTED
event7=CPU_CLK_UNHALTED

Each of the tests below were run with each of the following frequencies
to test with and without event throttling.

freq=6000

freq=600000

SYSTEM WIDE TESTS
$path/operf --events $event1:$freq:0:1:1 --system-wide

$path/operf -l --events $event1:$freq:0:1:1 --system-wide

$path/operf --events $event1:$freq:0:1:1 --events $event2:$freq:0:1:1 --events
$event4:$freq:0:1:1 --events $event5:$freq:0:1:1 --events $event6:$freq:0:1:1
--events $event7:$freq:0:1:1 --system-wide

$path/operf -l --events $event1:$freq:0:1:1 --events $event2:$freq:0:1:1 --eve
nts $event4:$freq:0:1:1 --events $event5:$freq:0:1:1 --events $event6:$freq:0:
1:1 --events $event7:$freq:0:1:1 --system-wide

WORKLOAD TESTS
$path/operf --events $event1:$freq:0:1:1 dd bs=16 if=/dev/urandom of=/dev/nu
ll count=500000

$path/operf -l --events $event1:$freq:0:1:1 dd bs=16 if=/dev/urandom of=/dev
/null count=500000

$path/operf --events $event1:$freq:0:1:1 --events $event2:$freq:0:1:1 --events
$event4:$freq:0:1:1 --events $event5:$freq:0:1:1 --events $event6:$freq:0:1:1
--events $event7:$freq:0:1:1 dd bs=16 if=/dev/urandom of=/dev/null count=5000
00

$path/operf -l --events $event1:$freq:0:1:1 --events $event2:$freq:0:1:1 --ev
ents $event4:$freq:0:1:1 --events $event5:$freq:0:1:1 --events $event6:$freq:0
:1:1 --events $event7:$freq:0:1:1 dd bs=16 if=/dev/urandom of=/dev/null count
=500000

The tests described above were also performed on an IBM POWER7
3000.000000MHz revision : 2.1 with the the following events.

event1=PM_INST_CMPL_GRP1
event2=PM_INST_DISP_GRP1
event3=PM_CYC_GRP1
event4=PM_THRD_CONC_RUN_INST_GRP225
event5=PM_DATA_FROM_L2_GRP67
event6=PM_BR_TAKEN_GRP4
event7=PM_DATA_FROM_L3_GRP68

And the two sampling frequencies:

freq=10000

Signed-off-by: Carl Love <cel@us.ibm.com>

2013-01-23 15:19:47 Tree
[38e328] by Maynard Johnson Maynard Johnson

Fix opreport seg fault when using "-X -i" options and non-existent symbol

Signed-off-by: Li Wang <li.wang@windriver.com>

2012-09-24 14:10:54 Tree
[b12f64] by Maynard Johnson Maynard Johnson

Change pp tools to abort if <cur_dir>/oprofile_data exists, but no samples found

In commit 01c7ce945cfe835b908c5f4f8c1125e65302b000 on July 3, 2012,
a change was made to the 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. I've come the conclusion that this is not proper
behavior. For example, a user may run operf using some event that
never occurs during the profiling run, and, thus, no samples would
be stored in <cur_dir>/oprofile_data. But if that user then ran
opreport and there happened to be some old profile data in
/var/lib/oprofile, that old profile data would be displayed in
the report.

This new patch changes the behavior as follows:
The post-processing analysis tools will search for samples in
<current_dir>/oprofile_data first. If that directory exists
but has no samples, then the usual "No sample file found"
message is displayed. On the other hand, if that directory
does not exist, the post-processing tools use the standard
session-dir of /var/lib/oprofile. Also, the message that
indicates the session-dir being used will be displayed
whether or not samples are found so that users can see
clearly where the pp tool was looking for samples.

This patch also makes a small change in the "No sample file found"
message relating to the use of 'opcontrol --dump', which is only
appropriate when using legacy profiling versus operf profiling.

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

2012-07-31 17:05:56 Tree
[8f12d5] by Maynard Johnson Maynard Johnson

Fix configure to not alter user variables and remove non-working --with-gcc option

The configure script for oprofile had a few places
where user variables were being altered in contradiction
to the GNU Automake manual. See the following URL for details:

http://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html

In brief, user variables are those listed under "Some influential
environment variables" section of the output from 'configure --help'.
These are variables which the user may set prior to invoking configure,
and thus, the configure script should not alter them. This patch
makes use of new internal variables (e.g., OP_LDFLAGS and OP_CPPFLAGS),
which did unfortunately create quite a ripple effect with the Makefile.am
files. But this was unavoidable in order to correct this error.

Additionally, the '--with-gcc' option does not work anymore because
the generated configure script runs the AC_PROG_CC before processing the
"--with-gcc" option, so it fails to find a compiler. Unsure of when
this stopped working (assume it must have worked in 2005 when it was
initially added), but even fairly old distros (e.g., SLES 10) with
autoconf version 2.59 do not process this option as we would want.
If users wish to configure oprofile to use an alternate compiler,
they should pass the compiler pathnames on the configure command line, thusly:
./configure CC=/my-gcc-install/bin/gcc CXX=/my-gcc-instal/g++

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

2012-07-13 17:44:49 Tree
[1be0be] by Maynard Johnson Maynard Johnson

Fix for bug 3309794: Change type for sample header mtime field to u64

See bug #3309794 (https://sourceforge.net/tracker/?func=detail&aid=3309794&group_id=16191&atid=116191)

The size of the mtime field in the op_header is based on whether
oprofile is built 32-bit or 64-bit. So if you have an oparchive
from a system where oprofile was built, say, as 64-bit and try to
run reports on that profile data on a different system where oprofile
was built as 32-bit, you're likely to see strange results and/or error
messages.

The typical error seen when running a 32-bit opreport on sample data from
a 64-bit oprofile is:
"opreport error: Attempt to process a Cell Broadband Engine SPU
profile withoutproper BFD support"

This is because the 32-bit opreport is looking at the "wrong" offset in the
header for the spu_profile field and finding a non-zero number there. Note
that to reproduce this error, I needed to pass an image spec to opreport.

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

2012-07-11 20:38:53 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
[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
[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
[2c53eb] by Maynard Johnson Maynard Johnson

Fix opannotate --assembly to work with prelinked runtime lib and non-prelink debuginfo

The opannotate tool can annotate assembly code as long as the binary file
contains symbol information. For binaries that are completely stripped,
users should install the corresponding debuginfo file and then use
'opannotate --assembly' to obtain annotated assembly output for the binary.
However, in a prelink environment, 'opannotate --assembly' does not produce
any output for stripped binaries, even when it's associated debuginfo file
is installed. This patch fixes that problem by making a 'vma_adj' value
available to the opannotate code. The 'vma_adj' value is set to either:
1) the difference between the runtime load address of the binary and the p_vaddr
of the first PT_LOAD segment of the debuginfo file; or 2) 0, when the runtime
binary *does* have symbol info. The reason for #2 is that if the real binary does
have symbol info, then the VMA values of the samples will already be adjusted
according to the runtime load address of the symbol from which the sample was
taken, prior to the annotation steps.

2012-03-13 15:24:07 Tree
[35b8a5] by Maynard Johnson Maynard Johnson

Update perf-events branch to match patchset posted to oprofile-list on Feb 23

2012-03-01 18:28:14 Tree
[73a0c8] by Maynard Johnson Maynard Johnson

Initial code drop for perf-events branch

2012-01-13 23:27:09 Tree
[710138] by Andreas Krebbel Andreas Krebbel , pushed by Maynard Johnson Maynard Johnson

S/390: Enhance the user space tools for System z hardware sampling

2011-11-03 16:23:53 Tree
[c12d08] by Maynard Johnson Maynard Johnson

Fix opreport -X so total samples for the binary does not include any module counts.

2011-09-16 12:10:36 Tree
[6e6cf5] by Suravee Suthikulpanit Suravee Suthikulpanit

Fix operport error with "-m cpu"

Error caused by typo in the comparison logic

2011-07-20 20:32:39 Tree
[67cefe] by William Cohen William Cohen

Do the close(fd) before doing the throw

The close(fd) was after the throw. A Coverity scan pointed out that the
close(fd) would be unreachable. Reorder the statements to make sure that
close(fd) occurs before the throw.

2011-05-27 20:04:04 Tree
[9529ae] by William Cohen William Cohen

Convert the .cvsignore files into .gitignore files.

2011-02-15 19:50:17 Tree
[b18f60] by William Cohen William Cohen

Do not use mutable for reference variable.

2011-02-09 20:27:47 Tree
[3cb5ed] by Maynard johnson Maynard johnson

Moved the copying of stats to opcontrol to do_dump_data

2010-08-02 21:40:08 Tree
Older >

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

Sign up for the SourceForge newsletter:





No, thanks