oprofile Log


Commit Date  
[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
[5a2a6f] by Maynard johnson Maynard johnson

catch basic_string::erase when parsing an invalid sample file name

2010-03-25 15:05:58 Tree
[bb591f] by Maynard johnson Maynard johnson

Fix regression in XML callgraph output and other XML fixes and schema version bump

2009-10-28 16:43:34 Tree
[06f64c] by Maynard johnson Maynard johnson

Handle bad samples from kernel due to overflows

2009-07-10 20:03:40 Tree
[783bc2] by Maynard johnson Maynard johnson

Fix image-path option to be appended to archive path

2009-06-23 14:17:05 Tree
[752b05] by Maynard johnson Maynard johnson

Make sure that all callgraph symbols are reported, even if 0 samples

2009-06-18 20:38:45 Tree
[18c953] by Maynard johnson Maynard johnson

Fix binary count total in XML output when using --separate=lib

2009-04-15 19:09:45 Tree
[9df981] by Maynard johnson Maynard johnson

Fix regression in arch perfmon code (see bug #2161762)

2008-11-12 23:21:02 Tree
[129c36] by Maynard johnson Maynard johnson

support for Intel arch perfmon

2008-08-28 21:57:46 Tree
[cded60] by Maynard johnson Maynard johnson

Fix compile warning for uninitialized variable when using gcc 4.3.1

2008-06-30 18:11:14 Tree
Older >

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

Sign up for the SourceForge newsletter:





No, thanks