Patchwork Perf not resolving all symbols, showing 0x7ffffxxx

login
register
mail settings
Submitter Martin Hicks
Date Oct. 16, 2013, 9:16 p.m.
Message ID <CAJUS3Xk6jVHWvWugLGD0LNWgw0+XZeP6z+=U4Xa6_GTGNvObBQ@mail.gmail.com>
Download mbox | patch
Permalink /patch/284030/
State New
Delegated to: Michael Ellerman
Headers show

Comments

Martin Hicks - Oct. 16, 2013, 9:16 p.m.
On Wed, Oct 16, 2013 at 2:42 PM, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
> On Wed, 2013-10-16 at 11:05 -0400, Martin Hicks wrote:
>> Actually, I was wrong, the mpc8379 is an e300c4.
>>
>> So it seems clear to me that we compile in the book3s code because
>> this is an 83xx CPU part.  I also see that Kconfig knows that I have
>> an core-fsl-emb but we don't actually compile the PMU backend for it
>> because there's no support for anything but e500.
>>
>> mort@chinook:~/src/s4v2-glibc/linux-mpc$ grep PERF .config
>> CONFIG_FSL_EMB_PERFMON=y
>> CONFIG_PPC_PERF_CTRS=y
>> CONFIG_HAVE_PERF_EVENTS=y
>> CONFIG_PERF_EVENTS=y
>> # CONFIG_DEBUG_PERF_USE_VMALLOC is not set
>> mort@chinook:~/src/s4v2-glibc/linux-mpc$ grep BOOK3S .config
>> CONFIG_PPC_BOOK3S_32=y
>> CONFIG_PPC_BOOK3S=y
>>
>> more below...
>>
>> On Tue, Oct 15, 2013 at 4:39 PM, Benjamin Herrenschmidt
>> <benh@kernel.crashing.org> wrote:
>> > On Tue, 2013-10-15 at 15:22 -0500, Scott Wood wrote:
>> >> On Tue, 2013-10-15 at 14:53 -0500, Benjamin Herrenschmidt wrote:
>> >> > On Tue, 2013-10-15 at 14:44 -0400, Martin Hicks wrote:
>> >> > > >
>> >> > > > This is an e300 core right ? (603...). Do that have an SIAR at all
>> >> > > > (Scott ?)
>> >> > >
>> >> > > Yes, e300c3.
>> >> >
>> >> > Ok so I have a hard time figuring out how that patch can make a
>> >> > difference since for all I can see, there is no perf backend upstream
>> >> > for e300 at all :-(
>> >> >
>> >> > I must certainly be missing something ... Scott, can you have a look ?
>> >>
>> >> e300c3 has a core-fsl-emb style performance monitor (though Linux
>> >> doesn't support it yet).  If a bug was bisected to a change in
>> >> core-book3s.c, then it's probably a coincidence due to moving code
>> >> around.
>>
>> CONFIG_PPC_PERF_CTRS seems to give the mpc8379 some kind of basic
>> performance measuring.  Is this through dummy_perf() in
>> arch/powerpc/kernel/pmc.c?
>>
>> >
>> > Mort, can you see if just that change is enough to cause the problem ?
>>
>> It is not.  The patch that does get IPs working again in my 3.11 tree
>> is this one:
>>
>> diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c
>> index eeae308..9a3f572 100644
>> --- a/arch/powerpc/perf/core-book3s.c
>> +++ b/arch/powerpc/perf/core-book3s.c
>> @@ -122,10 +122,6 @@ void power_pmu_flush_branch_stack(void) {}
>>  static inline void power_pmu_bhrb_read(struct cpu_hw_events *cpuhw) {}
>>  #endif /* CONFIG_PPC32 */
>>
>> -static bool regs_use_siar(struct pt_regs *regs)
>> -{
>> -       return !!regs->result;
>> -}
>
> Can you try instead just chaning regs_use_siar to return false always ?
> Do that help ?
>

That does fix the problem.  v3.11 with the following:

 /*


mh
Benjamin Herrenschmidt - Oct. 16, 2013, 11:01 p.m.
On Wed, 2013-10-16 at 17:16 -0400, Martin Hicks wrote:

> That does fix the problem.  v3.11 with the following:
> 
> diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c
> index eeae308..e91cf67 100644
> --- a/arch/powerpc/perf/core-book3s.c
> +++ b/arch/powerpc/perf/core-book3s.c
> @@ -124,7 +124,7 @@ static inline void power_pmu_bhrb_read(struct
> cpu_hw_events *cpuhw) {}
> 
>  static bool regs_use_siar(struct pt_regs *regs)
>  {
> -       return !!regs->result;
> +       return 0; //!!regs->result;
>  }

Ok, we probably need that function to do that on machines with no
backend :-) Either that or properly clear regs->result always.


I've had a quick look through perf and I admit I'm not sure of all the
ways perf ends up populating "regs" here and how many holes there is
in that scheme :-)

Anton? How do you know for sure regs is always be cooked by your stuff
(for regs->result) ?

Ben.

Patch

diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c
index eeae308..e91cf67 100644
--- a/arch/powerpc/perf/core-book3s.c
+++ b/arch/powerpc/perf/core-book3s.c
@@ -124,7 +124,7 @@  static inline void power_pmu_bhrb_read(struct
cpu_hw_events *cpuhw) {}

 static bool regs_use_siar(struct pt_regs *regs)
 {
-       return !!regs->result;
+       return 0; //!!regs->result;
 }