Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


oprofile Log

Commit Date  
[b2b9f2] by William Cohen William Cohen

Add the "--no-header" short form option, "-n", to the opreport man page

Signed-off-by: William Cohen <wcohen@redhat.com>

2013-07-16 15:04:11 Tree
[1081b2] by Maynard Johnson Maynard Johnson

Fix recent regression in opreport --debuginfo output

The '--debuginfo' option of opreport is broken. Output shows
"(no location information)" when it should show source file
and line number. I found that the May 15 commit ("Fix Coverity
issues identified against oprofile 0.9.8 release") was the
culprit. Coverity complained about a file descriptor in
the op_bfd constructor not being closed. My "fix" for that
complaint was wrong. The file descriptor in question is
the one we open for the binary image being processed by op_bfd
and which we pass to fdopen_bfd. Apparently, libbfd caches that
fd internally and makes use of it for certain functions -- in
particular, bfd_find_nearest_line(). This bug also caused
another symptom: when opreport is run with '--xml --details',
the output does not contain the binary code for the symbols.

The fix for this problem was trivial. I put the declaration for
the "fd" into the op_bfd class private section and then closed
the fd in the op_bfd destructor.

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

2013-06-27 15:18:41 Tree
[9ea7fb] by Maynard Johnson Maynard Johnson

Remove invalid '+' character from line 140 of Ivybridge unit_masks

This problem was caught by Suravee running 'make distcheck'.

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

2013-06-25 15:32:49 Tree
[212c10] by Maynard Johnson Maynard Johnson

Make doc changes to reflect changes in behavior for named unit masks

These doc changes correspond to the previous 5 patches contributed
by Suravee, Andi, and Maynard that fixed functional issues with
named unit masks.

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

2013-06-24 14:46:05 Tree
[2e5055] by Maynard Johnson Maynard Johnson

Fix unit mask value for EXTRA_NONE

For named unit masks that do not have real extra values
associated with them, the 'extra' field of the unit mask
description structure is set to EXTRA_NONE, which is not
really a valid value as far as the performance monitoring
hardware goes. In such cases, 'ophelp --extra-mask'
was returning EXTRA_NONE to the operf and opcontrol
profilers, which results in no samples being collected,
since it's not a valid mask value. In such cases, ophelp
should return the simple unit mask value. The operf
and opcontrol tools that use 'ophelp --extra-mask' must
be able to differentiate between a simple mask value
and an "extra" value. Anything greater or equal to
0x40000 is interpreted as a valid "extra" value; otherwise
it's a simple mask value.

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

2013-06-24 14:44:07 Tree
[dfb567] by Andi Kleen Andi Kleen , pushed by Maynard Johnson Maynard Johnson

Use names to make all non-unique Intel default unit masks unique

Signed-off-by: Andi Kleen <ak@linux.intel.com>

2013-06-24 14:24:14 Tree
[93f232] by Suravee Suthikulpanit Suravee Suthikulpanit , pushed by Maynard Johnson Maynard Johnson

Add support for named default unit masks

Current libop does not allow named mask to be used as default mask.
This causes the tools to fail when user does not specify the named
mask of an event and relying on the numerical default unit mask
which could have duplication.

Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>

2013-06-24 14:22:07 Tree
[b60652] by Suravee Suthikulpanit Suravee Suthikulpanit , pushed by Maynard Johnson Maynard Johnson

Remove improper extra field from core_2 unit masks

In the new unit mask parsing scheme, "extra:" should always followed
by named mask. This patch fixes the entries which does not follow
the scheme.

Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>

2013-06-24 14:19:38 Tree
[367228] by Andi Kleen Andi Kleen , pushed by Maynard Johnson Maynard Johnson

Add empty extra: lines to every Intel event with a unique first word

Add empty extra: lines to every Intel event with a unique first word
in the description. This can then be used to specify the unit mask

Haswell already had the empty extra masks.
Core 2 did not have unique words for everything. I only add it there
to the events which had.

Signed-off-by: Andi Kleen <ak@linux.intel.com>

2013-06-24 14:17:14 Tree
[a534bb] by Andi Kleen Andi Kleen , pushed by Maynard Johnson Maynard Johnson

Add EXTRA_NONE flag for use with unit masks empty "extra:" field

Add a dummy extra flag that is set when any extra: (including an empty one)
field is present in a unit mask line.

This can be used to express that the unit mask has a unique name as the
first word of the description.

This is mapped to the x86 enabled flag, as we have to pass it around
as part of the event mask.

Signed-off-by: Andi Kleen <ak@linux.intel.com>

2013-06-24 14:13:18 Tree
[a1f371] by Gilles Allard Gilles Allard , pushed by Maynard Johnson Maynard Johnson

Fix size problem of oprof_start GUI

On oprof_start startup, "unit mask" sub-window sometimes overlaps "event list"
one ( confusing appearance ). On some systems, the symptom is the unit mask
sub-window is too narrow to fit the entire UM description, thus requiring the
user to manually re-size the whole GUI window manually.

To see this problem, select a long event name that also has some long unit
mask descriptions that would entail auto-resizing of the windows. Then save
and quit, and restart the gui. The windows may be overlapped or may not be
sized correctly to accommodate the long event name and/or long unit mask

This problem occurs if oprof_start is built with Qt4 / Qt3Support.

This patch fixes this.

Signed-off-by: Gilles Allard <gilles.allard21@orange.fr>

2013-06-14 18:45:20 Tree
[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
[1b090c] by Gilles Allard Gilles Allard , pushed by Maynard Johnson Maynard Johnson

Don't show irrelevant bits in unit mask sub-window

Check boxes associated to non significant bits in unit mask should not be

This patch prevents from showing irrelevant check boxes in 'Unit mask' sub-

Signed-off-by: Gilles Allard <gilles.allard21@orange.fr>

2013-06-13 12:51:57 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
[2dcd13] by William Cohen William Cohen , pushed by Maynard Johnson Maynard Johnson

Avoid changing the number formatting for cout and cerr streams

Coverity static tool found a number of places where number formatting
was changed and might lead to some oddly formatted output for later
stream output. This patch ensures that the number formatting only
applies to that particular message.

Signed-off-by: William Cohen <wcohen@redhat.com>

2013-06-05 18:14:43 Tree
[85d9b9] by Maynard Johnson Maynard Johnson

Add support for IBM POWER8 processor

The Power ISA 2.07 was recently published at http://power.org/documentation.
The IBM POWER8 processor currently under development is an implementation
of the ISA 2.07. This patch provides the initial support for POWER8
to oprofile. NOTE: Only operf support is included with this patch. The
legacy opcontrol-based profiler and the oprofile kernel module have
not been (and may never be) updated to support this new processor.
Potentially, some future kernel versions may allow timer mode opcontrol
to work for POWER8, but at the time of this commit, the 3.10 kernel did not.

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

2013-05-31 21:34:29 Tree
[4f683a] by Maynard Johnson Maynard Johnson

Fix spelling error and remove obsolete BUGS notation

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

2013-05-31 13:16:14 Tree
[e4db77] by Maynard Johnson Maynard Johnson

Fix breakage in _try_ppc64_arch_generic_cpu caused by Coverity fixes

In the Coverity fixes applied in the previous commit, a resource leak
was plugged incorrectly, which led to operf failing on ppc64 platform
when a non-default event was specified. The failing message was:

NULL returned for one or both of AT_PLATFORM/AT_BASE_PLATFORM

followed by an ugly "double free or corruption" message.
This patch fixes that error.

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

2013-05-28 21:48:58 Tree
[6ee980] by Maynard Johnson Maynard Johnson

Fix Coverity errors found on May 20, 2013 git snapshot

Coverity identified the following errors on scans run from May 7 through
May 20, 2013:

Wrapper object use after free,Memory - illegal accesses,/agents/jvmpi/jvmpi_oprofile.cpp,compiled_method_load(JVMPI_Event *)
Unchecked return value,Error handling issues,/daemon/opd_mangling.c,opd_open_sample_file
Dereference after null check,Null pointer dereferences,/daemon/opd_sfile.c,sfile_hash
Uninitialized scalar field,Uninitialized members,/gui/oprof_start_config.cpp,config_setting::config_setting()
Division or modulo by zero,Integer handling issues,/libdb/db_stat.c,odb_hash_stat
Resource leak,Resource leaks,/libop/op_cpu_type.c,_auxv_fetch
Resource leak,Resource leaks,/libop/op_cpu_type.c,fetch_at_hw_platform
Negative array index read,Memory - illegal accesses,/libop/op_events.c,_is_um_valid_bitmask
Write to pointer after free,Memory - corruptions,/libop/op_events.c,read_events
Read from pointer after free,Memory - illegal accesses,/libop/op_events.c,_is_um_valid_bitmask
Dereference after null check,Null pointer dereferences,/libop/op_mangle.c,op_mangle_filename
Dereference after null check,Null pointer dereferences,/libop/op_mangle.c,op_mangle_filename
Time of check time of use,Security best practices violations,/libopagent/opagent.c,op_open_agent
Improper use of negative value,Integer handling issues,/libperf_events/operf_counter.cpp,operf_record::setup()
Double free,Memory - corruptions,/libperf_events/operf_counter.cpp,operf_record::setup()
Uninitialized pointer read,Memory - illegal accesses,/libperf_events/operf_counter.cpp,<unnamed>::_get_perf_event_from_file(mmap_info &)
Unchecked return value,Error handling issues,/libperf_events/operf_mangling.cpp,"operf_open_sample_file(odb_t *, operf_sfile *, operf_sfile *, int, int)"
Using invalid iterator,API usage errors,/libperf_events/operf_process_info.cpp,operf_process_info::try_disassociate_from_parent(char *)
Non-array delete for scalars,Memory - illegal accesses,/libregex/op_regex.cpp,"<unnamed>::op_regerror(int, const re_pattern_buffer &)"
Resource leak,Resource leaks,/libutil++/op_bfd.cpp,"op_bfd::op_bfd(const std::basic_string<char, std::char_traits<char>, std::allocator<char>>&, const string_filter &, const extra_images &, bool &)"
Explicit null dereferenced,Null pointer dereferences,/opjitconv/create_bfd.c,fill_symtab
Resource leak,Resource leaks,/opjitconv/opjitconv.c,_cleanup_jitdumps
Use of untrusted string value,Insecure data handling,/opjitconv/opjitconv.c,main
Resource leak,Resource leaks,/pe_profiling/operf.cpp,_get_cpu_for_perf_events_cap()
Dereference null return value,Null pointer dereferences,/pe_profiling/operf.cpp,_process_session_dir()
Incorrect deallocator used,API usage errors,/pe_profiling/operf.cpp,_process_events_list()


This patch fixes those errors.

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

2013-05-28 13:19:25 Tree
[3b11e2] by Maynard Johnson Maynard Johnson

Fix recent regression involving unit mask values of '0'

A patch that I wrote and committed on Jan 23, 2013 broke
unit mask handling for mask values of '0'. As far as I
can tell, i386/core_2 is the only cpu type that has unit
masks with values of '0'. So, for example, the following
command will fail as shown below:

operf -e L2_M_LINES_OUT:100000:0 ls
Invalid unit mask 0x0 for event L2_M_LINES_OUT
Error retrieving info for event L2_M_LINES_OUT:100000:0

This patch fixes that problem.

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

2013-05-28 13:05:31 Tree
[00c2ec] by Gilles Allard Gilles Allard , pushed by Maynard Johnson Maynard Johnson

Fix for oprof_start when daemonrc file does not exist

This patch fixes a bug if daemonrc file doesn't exist or doesn't contain a
'BUF_SIZE=' line : initalizes 'buffer_size' to the default value to prevent
unpredictable value.

Signed-off-by: Gilles Allard <gilles.allard21@orange.fr>

2013-05-24 12:01:51 Tree
[068c03] by Maynard Johnson Maynard Johnson

Add support for Intel Netburst (e.g., Pentium P4) to operf

The "legacy" oprofile kernel driver has special "p4" handling. There's
a map of event codes to ESCR/CCCR values. Unfortunately, the P4 event
codes (stored in events/i386/p4/events) that are used by the oprofile
kernel driver don't match what perf_events kernel code expects. This
patch adds some p4-specific event code handling to operf in order to
generate the correct encoding to pass to perf_events kernel subsystem.

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

2013-05-22 13:27:15 Tree
[31ebe9] by Patrik Hagglund Patrik Hagglund , pushed by Maynard Johnson Maynard Johnson

Change /etc/mtab to /proc/mounts to enable running on busybox system

Note: This patch was originally submitted by Patrik in November, 2008.
However, after some review comments were provided back to Patrik, there
was no response, so the patch was never committed. A new request for
this fix arrived on the list on May 21, 2013 from Mark Pearson, so
we revive this patch and commit it now.

Signed-off-by: Patrik Hagglund <patrik.h.hagglund@ericsson.com>

2013-05-22 13:13:13 Tree
[a07eab] by Maynard Johnson Maynard Johnson

Fix IBM architected events to work on IBM POWER7+

In situations where oprofile is running on a kernel that does not
have full native support for an ISA 2.07-based ppc64 processor,
but does have the base level architected support, oprofile userspace
code uses the auxiliary vector of the operf program and compares
AT_PLATFORM and AT_BASE_PLATFORM values to see whether or not it
should use the new ppc64 architected events. However, if
AT_PLATFORM="power7" and AT_BASE_PLATFORM="power7+", the oprofile
code was erroneously identifying this as a situation where the
architected events should be used. This patch fixes that problem.

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

2013-05-20 14:15:53 Tree
[9690fb] by Maynard Johnson Maynard Johnson

Revert "Add support for architected events for IBM ppc64 architecture"

This reverts commit d2ff34dbeb198106a7de6189b467b097736b089a.

Commit ID d2ff34d had an incorrect commit message

Reverting commit d2ff34d. Will re-apply with correct commit

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

2013-05-20 14:12:39 Tree
Older >