oprofile Log


Commit Date  
[4d808a] by Maynard Johnson Maynard Johnson

Defaulted named unit mask does not work

A fix to allow named unit masks to be used as the default was recently
pushed upstream (Jun 24: Add support for named default unit masks), but
unfortunately, we all missed the fact that using a named default
unit mask didn't actually work insofar as counting events.
Here's an example on Sandybridge that should use the default named
unit mask "any":

operf -e uops_issued:2000000 ./my_test
and opreport shows "opreport error: No sample file found".

When the user does not specify a unit mask, the profiling tools
(as well as ocount) will use 'ophelp --unit-mask' to determine
what the default unit mask should be. All of the oprofile
tools -- operf, opcontrol, ocount -- expect a numerical value
to be returned. So, in the case of a named default unit mask,
the unit mask name returned by ophelp was not being handled
properly, and the end result was usually "No samples found"
by opreport (or zero event counts by ocount). This patch
fixes this problem.

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

2013-07-24 17:20:03 Tree
[e38e40] by Maynard Johnson Maynard Johnson

Fix ocount to work on POWER8

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

2013-07-23 19:25:22 Tree
[55cc78] by Maynard Johnson Maynard Johnson

ophelp does not always detect duplicate numerical unit mask values

Some named unit masks have hex values that are duplicates of others in the
same UM entry, thus requiring the use of the name to disambiguate them.
Specifying one of the hex values that are duplicated should result in an
error -- but there are cases where it doesn't. For example:
Here's a properly working example on Sandybridge:
[mpjohn@oc1757000783 test-stuff]$ ophelp --check-events int_misc:2000000:0x3
Unit mask (0x3) is non unique.
Please specify the unit mask using the first word of the description

and here's a failing example:
[mpjohn@oc1757000783 test-stuff]$ ophelp --check-events l1d_pend_miss:2000000:0x1
2

This patch fixes the problem.

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

2013-07-23 11:41:26 Tree
[305a63] by William Cohen William Cohen , pushed by Maynard Johnson Maynard Johnson

Remove unused variable dirstat in op_open_agent function

Coverity reported the variable dirstat as being unused in
op_open_agen(). There did not seem to be much of a point keeping it
around, so go ahead and remove it.

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

2013-07-23 11:36:25 Tree
[961b96] by Maynard Johnson Maynard Johnson

Fix compile error on precise_ip field in early versions of perf_event.h

Early "perf_events" kernels did not yet include the "precise_ip" field
in the perf_event_attr struct (defined in perf_event.h). This patch
makes configure check for the existence of that field, and it defines
a new macro, HAVE_PERF_PRECISE_IP, which will be set to '1' if the
field exists or '0' otherwise. The operf_counter.cpp code that was
failing to compile will now use the precise_ip field conditionally,
based of the HAVE_PERF_PRECISE_IP macro.

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>
Acked by: Andi Kleen andi@firstfloor.org

2013-07-22 15:27:42 Tree
[23c82e] by Maynard Johnson Maynard Johnson

ocount misinterpreted UM value for named UM with EXTRA_NONE

Specifying a named unit mask associated with a dummy extra field
appears to *always* result in zero event counts. This patch
applies the same fix that was committed to operf on Jun 21, 2013.

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

2013-07-19 14:21:49 Tree
[f2af00] by Maynard Johnson Maynard Johnson

Add -lrt flag for clock_gettime call

A last minute change in ocount to use clock_gettime
required linking with '-lrt'. I made the change locally
in testing, but neglected to add that change to my
post-review fixups patch. This patch corrects that.

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

2013-07-18 18:51:43 Tree
[175ed4] by Maynard Johnson Maynard Johnson

Post-review fixups for new ocount feature

This patch fixes the issues raised during the review of the
'ocount' tool. Some of the issues were raised on the
oprofile-list, and some were raised internally by users
within my company. The issues raised internally were:
- Bug: Compile failure with recent gcc
- Request to display total time events were being counted in long output
- Bug: Counting multiple events in a run mode other than 'command [args]'
can result in incorrect output. For example:
ocount -s -e CPU_CLK_UNHALTED,UNHALTED_REFERENCE_CYCLES
Event counts (scaled) for the whole system:
Event Count % time enabled
CPU_CLK_UNHALTED 291,912,262 100.00
CPU_CLK_UNHALTED 27,431,626 100.00
- Bug: On ppc64 systems, event spec returned by _handle_powerpc_event_spec
may contain extra garbage after the event name.
- Request to change the --time-interval option to show counts just for
the interval, not cumulative counts

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

2013-07-18 18:45:02 Tree
[cec825] by Maynard Johnson Maynard Johnson

Add ocount information to user manual

With the introduction of the new ocount tool, some new
sections in the OProfile user manual were needed to describe
its operation. Additionally, some minor changes were
needed elsewhere so as to include event counting (along
with profiling) where appropriate.

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

2013-07-18 18:44:28 Tree
[5bcf38] by Maynard Johnson Maynard Johnson

Fix problems in ocount patch set found by Coverity

I ran Coverity against the oprofile source tree with the "ocount"
patch set applied, and it found several issues. This patch fixes
those.

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

2013-07-18 18:43:54 Tree
[a4cbf9] by Maynard Johnson Maynard Johnson

Add manpage for new ocount tool

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

2013-07-18 18:43:01 Tree
[e83b4f] by Maynard Johnson Maynard Johnson

New ocount tool and associated ocount_counter classes

This patch implements the executable 'ocount' tool, as
well as some classes used for opening and managing the
"perf_events" file descriptors (opened via perf_event_open).

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

2013-07-18 18:42:14 Tree
[884663] by Maynard Johnson Maynard Johnson

Add various utility routines needed by new ocount tool

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

2013-07-18 18:41:02 Tree
[a8ab7e] by Maynard Johnson Maynard Johnson

Add 'check_count' parameter to parse_events function

For profiling, oprofile enforces a 'count' value to be
included in the event specification passed by a user.
It is the parse_events() function in libop/op_parse_event.c
that handles that checking. But for counting events
versus profiling, a 'count' value is meaningless, so this
patch adds support for parse_events() to parse an event
spec from either the profiling tools or the new counting
tool.

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

2013-07-18 18:39:32 Tree
[e4754f] by William Cohen William Cohen

Remove obsolete --note-table-size option from opcontrol

Only the very old kernels (2.4) provided support for --note-table-size option.
Given that other 2.4 support was removed from OProfile there isn't any
reason to keep this around.

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

2013-07-16 15:11:00 Tree
[2046df] by William Cohen William Cohen

Add man page for oprof_start.

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

2013-07-16 15:10:08 Tree
[0f0e42] by William Cohen William Cohen

Add a short man page for op-check-perfevents.

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

2013-07-16 15:08:55 Tree
[043ea9] by William Cohen William Cohen

Document the opcontrol short form options on the man page

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

2013-07-16 15:07:33 Tree
[9371e1] by William Cohen William Cohen

Add the --merge option description to opannotate man page.

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

2013-07-16 15:06:55 Tree
[a5aaae] by William Cohen William Cohen

Document additional ophelp options on the man page

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

2013-07-16 15:05:34 Tree
[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
Older >