Re: [PATCH] Remove Powerpc OProfile events the kernel will reject
"Carl E. Love" <[email protected]>
| Newsgroups | gmane.linux.oprofile |
|---|---|
| Message-ID | <1448987711.5188.6.camel@oc3328482554> |
On Thu, 2015-11-26 at 17:52 -0600, 大平怜 wrote:
> Hi Carl,
>
>
> I am using the commit a58c3953a1c5f5fb00b873a5e22c878f9f4d5a2d, which
> was the latest before your patch was applied, in the git repository.
> My machine is bare-metal POWER8, running Linux 3.16.0:
>
>
> cpu : POWER8E (raw), altivec supported
> clock : 2061.000000MHz
> revision : 2.1 (pvr 004b 0201)
>
>
> $ uname -r
> 3.16.0-31-generic
> $ uname -v
> #41-Ubuntu SMP Tue Feb 10 21:05:50 UTC 2015
> $ uname -m
> ppc64le
>
> > > The event code for PM_DATA_ALL_FROM_RL2L3_MOD is
> 0x62c046. Bits 22:20
> > > are 2. According to the note 1 in the patch the kernel
> will reject any
> > > event with non zero bits in 22:20. Hence it was included.
> I tried the
> > > event on my Power 8 machine:
>
>
> The bits 22:20 of 0x62c046 are 6, aren't they? By the way, in my
> understanding,
> any event with non zero bits in 22:20 will be rejected,
> only when unit >= 6 && unit <= 9. The unit (bits 15:12) of 0x62c046
> is 0xc.
> Hence PM_DATA_ALL_FROM_RL2L3_MOD should not be rejected.
>
OK, I checked any yes I agree this should be unit c. The perf code
shouldn't be rejecting it if it is unit 0xc. So there is something else
causing the event to be rejected.
>
>
>
> > > ocount -e PM_DATA_ALL_FROM_RL2L3_MOD ls
> > > Cannot find event PM_DATA_ALL_FROM_RL2L3_MOD
> > > Error retrieving info for event PM_DATA_ALL_FROM_RL2L3_MOD
> > >
> > > and it was rejected.
>
>
> If it was the kernel that rejected the event, the error message should
> have been something like this:
>
>
> $ ./ocount -e PM_L2_LD_MISS ls
> perf_event_open failed with Invalid argument
> Caught runtime error while setting up counters
> Internal Error. Perf event setup failed.
> Error running ocount
>
>
> Your error message simply said there was no such event, like this:
So, I grepped the error messages "Cannot find event" and "Error
retrieving info for event", these are messages in the OProfile source
code. Specifically, libpe_utils/op_pe_utils.cpp. I have started
digging to see why the OProfile code is not finding the info. My first
thought is there is something missing in the libpfm. I haven't chased
that down. I will try and see if I can track down why OProfile is
having an issue with the event. It looks like there are a few others
that also have unit 0xc which I removed because they are not working.
When we figure out why this event is not working it should fix a few of
the other events as well.
Carl Love
------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
_______________________________________________
oprofile-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oprofile-list