Maynard Johnson | 29 Aug 23:29 2014
Picon

Announcement: Release Candidate 2 for OProfile 1.0.0

We are pleased to announce OProfile 1.0.0 Release Candidate 2.  You can download this release at:
	http://sourceforge.net/projects/oprofile/files/oprofile/oprofile-1.0.0-rc2/

Changes from RC1:
  * Back out recent change to exclude hypervisor samples and counts
  * Fix behavior and documentation for '--threshold' option
  * Fix Java profiling regression bug from Aug 13 Coverity fixes
  * Fix cryptic objdump error message from opannotate for /proc/kallsyms
  * Remove hard-coded timeout for JIT dump conversion

Please download and test this release candidate, and send your feedback by replying to this message. 
Please include your hardware platform and Linux distribution information in your reply.

Thanks.
-Maynard Johnson

-----------------------------------------------------------------

Release Notes
===============
OProfile 1.0.0 has been released. A major change in this release
is the removal of the legacy opcontrol-based profiler. The legacy
profiling tool has been deprecated since release 0.9.8 when operf
was first introduced. The following components and processor types
that were dependent on opcontrol have also been removed:

   - GUI component (i.e., oprof_start)
   - IBS events removed from AMD processors
   - All Alpha processors, except for EV67 (which *is* supported by operf/ocount)
   - Architecture avr32
(Continue reading)

Maynard Johnson | 29 Aug 15:24 2014
Picon

[PATCH] Back out recent change to exclude hypervisor samples and counts

Back out recent change to exclude hypervisor samples and counts

Recent commits, 3f93a3b3 and 9c662bfa, made changes to exclude the
collection of hypervisor samples (for operf) and counts (for ocount).
I learned later that S390 and Alpha architectures do not support mode
exclusion, and so fixes were required to avoid excluding hypervisor
on those architectures. Now it seems that under certain conditions,
the ARM architecture also cannot do mode exclusion, and this exclusion
of hypervisor was causing operf and ocount to fail.

The original changes (in commits 3f93a3b3 and 9c662bfa) were not made
due to a bug report, but because I had noted oprofile had always been
silently collecting hypervisor samples/counts, without ever having a
means of identifying them as such. Additionally, the event specification
(for passing events to operf and ocount) has no support for explicit
inclusion/exclusion of hypervisor data. I thought it would be better to
simply always exclude hypervisor until such time that we expanded the
event specification and operf/ocount interfaces to properly support
hypervisor. But in retrospect, that was a bad decision, causing too
much breakage from various architectures. This patch backs out the
exclusion of hypervisor, as well as the S390 and Alpha architecutre-
specific conditional compilation involving same.

Signed-off-by: Maynard Johnson <maynardj <at> us.ibm.com>
---
 libpe_utils/op_pe_utils.cpp      |   29 ++---------------------------
 libperf_events/operf_counter.cpp |    4 +---
 pe_counting/ocount_counter.cpp   |    3 +--
 3 files changed, 4 insertions(+), 32 deletions(-)

(Continue reading)

William Cohen | 28 Aug 22:39 2014
Picon

Re: Announcement: Release Candidate 1 for OProfile 1.0.0

On 08/28/2014 04:16 PM, Arnaldo Carvalho de Melo wrote:
> Em Thu, Aug 28, 2014 at 03:54:58PM -0400, William Cohen escreveu:
>> On 08/28/2014 02:59 PM, Will Deacon wrote:
>>> On Thu, Aug 28, 2014 at 07:24:07PM +0100, William Cohen wrote:
>>>> On 08/28/2014 02:07 PM, Will Deacon wrote:
>>>>> Thanks for giving this a whirl. Which was the A9 SoC you used? The PMU
>>>>> interrupts are often not described properly on those, so it could simply be
>>>>> that perf hasn't initialised.
>  
>> Hi Will,
>  
>> Yes, there are cases where dtb doesn't descrbibe the performance
>> monitoring hardware/interrupts properly, but in this case a compulab
>> trimslice with nvidia tegra2 process it appears "perf record ls" seems
>> to work correctly and "perf report" provides sane data.
>  
>> Below is before and after of /proc/interrupts of the "perf record".  I
>> suspect that there is some difference in the way that operf and ocount
>> are trying to set up the events when compared to "perf record" and
>> "perf stat.
>  
>> I should use systemtap to look at the various parameters being passed
>> in to set up perf and determine where "perf" and "operf" diverge.
> 
> You can try using perf evlist to see how 'perf record' sets up the event
> attributes:
> 
> [root <at> zoo ~]# perf record usleep 1
> [ perf record: Woken up 1 times to write data ]
> [ perf record: Captured and wrote 0.012 MB perf.data (~525 samples) ]
(Continue reading)

Maynard Johnson | 28 Aug 20:06 2014
Picon

[PATCH] Fix behavior and documentation for '--threshold' option

Fix behavior and documentation for '--threshold' option

A user reported some issues with how the opreport and opannotate
'--threshold' option was working. He was using operf to collect
a profile using mulitiple events (PM_CMPLU_STALL_REJECT_LHS and
PM_MRK_ST_FWD). For a particular symbol in his profile data, he
had 0% for PM_CMPLU_STALL_REJECT_LHS and 12% for PM_MRK_ST_FWD.
But when he ran 'opannotate --assembly -t 1', he was surprised to
see that the function in question was not in the output at all,
even though the ratio of samples for the PM_CMPLU_STALL_REJECT_LHS
was well above the 1% threshold.

The events are stored in alphabetical order in a C++ set. When
applying the threshold level against a symbol, the code was only
looking at the ratio of samples for the first event in the set
(PM_CMPLU_STALL_REJECT_LHS, in this case). This is not the intended
behavior (IMHO), so this patch looks at all ratios for every event
and will only filter out the sample data for a given symbol if none
of the events meets the threshold.

This issue applies to opreport as well, and the same fix works for
both opreport and 'opannotate --assembly'.

On the other hand, 'opannotate --source' applies the threshold to
a given source file (contrary to the man page). The same problem
exists there, where annotation for a given source file was not displayed
if the ratio of samples for the first event in the set did not meet the
specified threshold. This patch fixes that problem as well.

This patch also updates the man pages for opreport and opannotate, as
(Continue reading)

Maynard Johnson | 26 Aug 18:58 2014
Picon

[PATCH] Fix Java profiling regression bug from Aug 13 Coverity fixes

Fix Java profiling regression bug from Aug 13 Coverity fixes

One of the changes made in the Aug 13 commit to fix issues
identified by Coverity caused a regression in oprofile's JIT
support. The libopagent.so (used by libjvm[t|p]i.so) may incorrectly
return an error from the op_write_native_code function. This patch
fixes that issue.

Signed-off-by: Maynard Johnson <maynardj <at> us.ibm.com>
---
 libopagent/opagent.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/libopagent/opagent.c b/libopagent/opagent.c
index f567f9e..431dfae 100644
--- a/libopagent/opagent.c
+++ b/libopagent/opagent.c
 <at>  <at>  -374,17 +374,22  <at>  <at>  again:
 	 */
 	if (fwrite_unlocked(&rec, sizeof(rec), 1, dumpfile) &&
 	    fwrite_unlocked(symbol_name, sz_symb_name, 1, dumpfile)) {
-		size_t sz = 0;
-		if (code)
+		size_t expected_sz, sz;
+		expected_sz = sz = 0;
+		if (code) {
 			sz = fwrite_unlocked(code, size, 1, dumpfile);
-		if (padding_count)
+			expected_sz++;
+		}
(Continue reading)

C K Kashyap | 26 Aug 17:32 2014
Picon

Help with oprofile on android

Hi,

I have a asus nexus 7 where I need to profile my c++ app. Is there a place where I can see a step by step instruction for enabling/collecting oprofile data on my app. I found this link http://brownydev.blogspot.in/2012/06/android-oprofile.html from the mailing list but it seems its old - I dont see any "CONFIG_OPROFILE_ARMV7" in the kernel source - I am using - https://android.googlesource.com/kernel/msm.git

I'd appreciate any help with this very much. For some reason, googling it does not seem to yield any current links to me. 

Regards,
Kashyap
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
oprofile-list mailing list
oprofile-list <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list
Brian Hall | 25 Aug 20:01 2014
Picon

missing Java method information in operf profile

I'm running the operf from AT 7.0-5 on a POWER8 system:
  # /opt/at7.0/bin/operf -v
  /opt/at7.0/bin/operf: oprofile 1.0.0git compiled on Jul 24 2014 13:49:08
using the command (as root):
  /opt/at7.0/bin/operf --events PM_RUN_CYC:10290000 --separate-thread --separate-cpu --system-wide

There are 14 active JVM processes running on the system that I am trying to profile.  For some reason, the profiles only contain full JIT compiler method information for 2 or 3 of the processes (it varies across different runs).  I have checked that the agentlib option is being correctly passed to the JVMs, and that the JIT dump files for all 14 processes are available in /tmp/.oprofile/jitdump at the time that operf is run.

A casual look at verbose output from operf didn't indicate any problems in accessing the JIT dump files, it just didn't try to process all of them.  I tried adding --lazy-conversion to the operf options, and that run did show an issue at the end of the verbose output:
  add sym: name=Ljava/utilchild received signal 9

Brian

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
oprofile-list mailing list
oprofile-list <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list
Grant Edwards | 19 Aug 18:07 2014
Picon

Using oprofile w/o loadable module support?

I'm trying to get oprofile 0.9.9 running on a system where the kernel
does not support runtime loadable kernel modules. I have oprofile
support enabled in the kernel (2.6.33), but oprofile keeps wanting to
"modprobe" something (I haven't been able to figure out what):

 # opcontrol --init
 modprobe: chdir(/lib/modules): No such file or directory
 modprobe: chdir(/lib/modules): No such file or directory
 Kernel doesn't support oprofile

But I _do_ have oprofile support enabled in the kernel.  What module
is oprofile looking for?

--

-- 
Grant Edwards               grant.b.edwards        Yow! I invented skydiving
                                  at               in 1989!
                              gmail.com            

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
William Cohen | 19 Aug 18:41 2014
Picon

Multiple definitions of INST_RETIRED for processors using i386/arch_perfmon

Hi Andi,

When testing oprofile Michael Petlan noticed there were a number of Intel architectures that include
i386/arch_perfmon.  The Intel architected events set up INST_RETIRED with a unit mask of zero:

event:0xc0 counters:cpuid um:zero minimum:6000 filter:1 name:INST_RETIRED : number of instructions retired

The arch_perfmon/events is included in the following files:

$ grep include:i386/arch_perfmon */events
broadwell/events:include:i386/arch_perfmon
haswell/events:include:i386/arch_perfmon
ivybridge/events:include:i386/arch_perfmon
sandybridge/events:include:i386/arch_perfmon
silvermont/events:include:i386/arch_perfmon
westmere/events:include:i386/arch_perfmon

However, a number of Intel processor events files have have other unit masks being specific (1 or a bit mask
or 1,2, and 4) for INST_RETIRED (0xc0):

$ grep 0xc0 */events |grep -v zero
atom/events:event:0xc0 counters:0,1 um:one minimum:6000 name:INST_RETIRED : number of instructions retired
broadwell/events:event:0xc0 counters:1 um:inst_retired minimum:2000003 name:inst_retired :
core_2/events:event:0xc0 counters:0,1 um:inst_retired minimum:6000 name:INST_RETIRED : number of
instructions retired
haswell/events:event:0xc0 counters:1 um:one minimum:2000003 name:inst_retired_prec_dist :
nehalem/events:event:0xc0 counters:0,1,2,3 um:inst_retired minimum:6000 name:INST_RETIRED :
number of instructions retired
sandybridge/events:event:0xc0 counters:1 um:one minimum:2000000 name:inst_retired : Instructions retired
westmere/events:event:0xc0 counters:0,1,2,3 um:inst_retired minimum:2000000 name:INST_RETIRED :
Instructions retired (Programmable counter and Precise Event)

Notice that the broadwell, haswell, sandybridge, and westmere have multiple definitions of
INST_RETIRED, one from arch_perfmon which has a zero unit mask and another one that has a non-zero unit
masks.  How is the INST_RETIRED event suppose to work for processors that support the Intel architected
performance events?  Always allow a unit mask of 0?  Any suggestions n how the testsuite lib/op_events.exp
should properly exercise INST_RETIRED event to test that things are working?

-Will

------------------------------------------------------------------------------
Grant Edwards | 19 Aug 18:17 2014
Picon

Using oprofile w/o loadable module support?

I'm trying to get oprofile 0.9.9 running on a system where the kernel
does not support runtime loadable kernel modules. I have oprofile
support enabled in the kernel (2.6.33), but oprofile keeps wanting to
"modprobe" something (I haven't been able to figure out what):

 # opcontrol --init
 modprobe: chdir(/lib/modules): No such file or directory
 modprobe: chdir(/lib/modules): No such file or directory
 Kernel doesn't support oprofile

But I _do_ have oprofile support enabled in the kernel.  What module
is oprofile looking for?

--

-- 
Grant Edwards               grant.b.edwards        Yow! Are we THERE yet?
                                  at               
                              gmail.com            

------------------------------------------------------------------------------
Maynard Johnson | 15 Aug 18:09 2014
Picon

Away for the week of Aug 16 - Aug 23

I'll be out of the office, literally in the wilderness, and will not have internet access.  I look forward to
seeing lots of replies from the community regarding test results for the OProfile 1.0.0 RC1 when I return.  :-)

-Maynard

------------------------------------------------------------------------------

Gmane