Re: Announcement: Release Candidate 1 for OProfile 1.0.0

Maynard Johnson <[email protected]>
Newsgroups gmane.linux.oprofile
Message-ID <[email protected]>
On 08/28/2014 08:30 PM, William Cohen wrote:
> On 08/28/2014 04:47 PM, Maynard Johnson wrote:
>> On 08/28/2014 11:11 AM, William Cohen wrote:
>>> On 08/26/2014 11:56 AM, Maynard Johnson wrote:
>>>> On 08/15/2014 10:54 AM, Maynard Johnson wrote:
>>>>> We are pleased to announce OProfile 1.0.0 Release Candidate 1.  You can download this release at:
>>>>> 	http://sourceforge.net/projects/oprofile/files/oprofile/oprofile-1.0.0-rc1/
>>>>>
>>>>> 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.
>>>>
>>>> Fellow oprofile architecture maintainers,
>>>> Please test the oprofile 1.0.0 RC1 and let me know your results. FYI . . . Due to the
>>>> Java profiling bug reported this week by Brian Hall, I will be incorporating a fix into
>>>> the next 1.0.0 tar file I make available.  If more fixes are needed, I will put out an
>>>> RC2, otherwise I'll make it GA.  Either way, I'd like to put out the next tar file by
>>>> the end of the week. Thanks!
>>>>
>>>> -Maynard
>>>>>
>>>>> Thanks.
>>>>> -Maynard Johnson
>>>
>>> Hi Maynard,
>>>
>>> I built a rpm using the latest git repo tarball and have been testing that out on a number of different platforms.
>>>
>>> There are a number of xml failures in the test results (footnotes (1) and (2)).  Have anyone else observed that? Or is this a local build issue?
>>>
>>> I also had some issues with the tests running on arm cortex-a9.  The perf utility works on the machine but operf and ocount are not.  This seems to be specific to the cortex a9 machine things work on a cortex a15 machine.
>>>
>>> # operf --events  INST_RETIRED:500000:0:1:1,CPU_CYCLES:500000:0:1:1, workloads/thread_src/thread_bin
>>> perf_event_open failed with Operation not supported
>>> Caught runtime_error: Internal Error.  Perf event setup failed.
>>> Error running profiler
>>>
>> This smells very familiar.  Looking at kernel code (arch/arm/kernel/perf_event.c), I see the following:
>>
>> 	/*
>> 	 * Check whether we need to exclude the counter from certain modes.
>> 	 */
>> 	if ((!armpmu->set_event_filter ||
>> 	     armpmu->set_event_filter(hwc, &event->attr)) &&
>> 	     event_requires_mode_exclusion(&event->attr)) {
>> 		pr_debug("ARM performance counters do not support "
>> 			 "mode exclusion\n");
>> 		return -EOPNOTSUPP;
>> 	}
>>
>> I've made changes to oprofile recently so that hypervisor events would be excluded by default,
>> since we currently have nothing in our display formats to indicate hypervisor samples and nothing
>> in our event specification (passed to operf and ocount) to either include or exclude hypervisor
>> events. This bit our s390 friends, and we had to add #ifdef __s390__ in
>> libperf_events/operf_counter.cpp:221 and pe_counting/ocount_counter.cpp:72.
>>
>> *Will C*, can you please try to add '#ifdef __arm__' in the same two places and see if the oprofile
>> testsuite works then. Perhaps I should back out the change I made to exclude hypervisor events.
>> The issue is that on systems where mode exclusion *is* supported, and where the system is running
>> on top of a hypervisor, doing something like 'ocount -e CYCLES:0:0:1' ends up counting *both* userspace
>> and hypervisor events and the output of ocount does not separate them.  A similar issue occurs with operf,
>> but the problem is not quite so pronounced, since opreport typically cannot be resolve hypervisor sample
>> addresses symbols.
>>
>>
>> -Maynard
> 
> I did a git bisection and narrowed the problem patch to:
> 
> $ git bisect bad
> 3f93a3b306875ff5591149a23034fed92a0844d7 is the first bad commit
> commit 3f93a3b306875ff5591149a23034fed92a0844d7
> Author: Maynard Johnson <[email protected]>
> Date:   Thu Aug 7 15:58:23 2014 -0500
> 
>     Exclude collecting hypervisor samples for default event

Yeah, as I suspected.  Will, I just posted a patch ("[PATCH] Back out recent change to
exclude hypervisor samples and counts") to fix this.  Can you please try it out.
Hopefully you can give me feedback on it today.  I'd like to put out a release candidate 2
today, since I'll be out of the office all next week.

Thanks!
-Maynard

>     
>     In a July 7 commit, I made the following change:
>     
>         Make sure hypervisor is excluded from ocount and operf
>     
>         Since we have no interface support in the event specification to
>         allow the user to select or de-select counting events in hypervisor,
>         and also since the output of ocount and opreport do not support the
>         concept of hypervisor, we should exclude hypervisor from counting
>         and profiling.  There's a bug in the current code such that the
>         user may or may not get hypervisor events included.  This patch
>         explicitly excludes hypervisor.
>     
>     Apparently, I neglected making the corresponding change for the default event.
>     This patch rectifies that mistake.
>     
>     Signed-off-by: Maynard Johnson <[email protected]>
> 
> 
> 
> One thing to note is that the tests worked on machines that had virtualization support.  All the x86 rhel and fedora support virtualization.  The working arm kernel for the cortex a15 kernel also has virtualization support.  The arm f20 kernel doesn't have the virtualization enabled.
> 
> -Will
> 
> 


------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.