Corey,

I haev fixed all the issue you noted. I also updated task.c:print_counts()
to print a warning in case count delta turn negative due to scaling errors
due to multiplexing.

On Wed, May 5, 2010 at 12:16 AM, Corey Ashford
<cjash...@linux.vnet.ibm.com> wrote:
> I just noticed one other thing.  I'm pretty sure the line task.c:239 is 
> extraneous.  The group leader's fd doesn't need to be initialized to -1.
>
> - Corey
>
> On 5/4/2010 2:53 PM, stephane eranian wrote:
>> On Tue, May 4, 2010 at 11:44 PM, Corey Ashford
>> <cjash...@linux.vnet.ibm.com> wrote:
>>> Almost perfect.  It worked correctly for the first test cases I tried, and 
>>> there's a nice touch on the print that separates groups (I like it!).  
>>> However, when I tried adding the -f switch, just to see what would happen, 
>>> I get this:
>>>
>>> % ./task -f -e PM_RUN_CYC,PM_CYC -e 
>>> PM_RUN_CYC,PM_FXU_IDLE,PM_CYC,PM_CYC,PM_CYC md5sum `which gdb`
>>> 825b15d7279ef21d6c9d018d775758ae  /usr/bin/gdb
>>> task: could not read event 0, tried to read 40 bytes, but got 32
>>> task: cannot read values event PM_RUN_CYC: No space left on device
>>>
>> If you run strace, I am sure would will see that ENOSPACE is coming
>> from the kernel, i.e., read().
>> Could be that the read buffer is too small.
>>
>>> From the source code, it looks like maybe the .name string is not getting 
>>> terminated properly, and that ": No space left on device" is left over from 
>>> some other call.
>>>
>>> This wouldn't explain the error, but the fds index being used on 
>>> perf_utilc.s:105 isn't right:
>>>                ret = read(fds[evt].fd, values, sz);
>>>                if (ret != sz) { /* unsigned */
>>>                        if (ret == -1)
>>>                                err(1, "cannot read values event %s", 
>>> fds[0].name);
>>>
>>> That should be fds[evt].name
>>>
>> Yes, will fix that.
>>
>>> Any idea how the string terminator may be getting stomped on?
>>>
>> I doubt think this is the problem.
>>
>>>
>>> - Corey
>>>
>>>
>>> On 5/4/2010 2:21 PM, stephane eranian wrote:
>>>> On Tue, May 4, 2010 at 11:17 PM, Corey Ashford
>>>> <cjash...@linux.vnet.ibm.com> wrote:
>>>>>
>>>>>
>>>>> On 5/4/2010 2:13 PM, stephane eranian wrote:
>>>>>> Corey,
>>>>>>
>>>>>> I have not yet pushed the patch, I wanted to get your opinion first.
>>>>>
>>>>> Push away! it looks good to me.
>>>>>
>>>> Done, try now.
>>>> Thanks for your contribution.
>>>>
>>>>> Thanks,
>>>>>
>>>>> - Corey
>>>>>
>>>>>
>>>
>>> --
>>> Regards,
>>>
>>> - Corey
>>>
>>> Corey Ashford
>>> Software Engineer
>>> IBM Linux Technology Center, Linux Toolchain
>>> Beaverton, OR
>>> 503-578-3507
>>> cjash...@us.ibm.com
>>>
>>>
>
> --
> Regards,
>
> - Corey
>
> Corey Ashford
> Software Engineer
> IBM Linux Technology Center, Linux Toolchain
> Beaverton, OR
> 503-578-3507
> cjash...@us.ibm.com
>
>

------------------------------------------------------------------------------
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to