lkml.org 
[lkml]   [2012]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2 3/4] perf annotate: configure objdump path at compile time
Date
On Thu, 27 Sep 2012 03:51:07 +0300, Irina Tirdea wrote:
> On Tue, Sep 25, 2012 at 4:08 PM, Namhyung Kim <namhyung@kernel.org> wrote:
>> I thought about it twice and confused.
>>
>> For cross-compiling, the resulting perf binary will run on target - say
>> Android - but the toolchain runs on host, right? So with this change
>> the cross-built perf will try to find the arm-eabi-objdump on Android.
>> Is it an intended behavior? Is there an arm-eabi-objdump on Android?
>>
>
> Apparently I got confused about this as well...

:)

>
> There are two perf binaries built for Android: one for the target
> (that will run on Android) and the other one for the host (that can be
> used to analyse data recorded on the target).
>
> As you mentioned, the perf built to run on Android needs to use
> objdump as "objdump" (actually Android does not yet have objdump, but
> this is the naming convention). In this case, objdump should not have
> the CROSS_COMPILE prefix.

Ok.

>
> The perf built to run on the host needs to use arm-eabi-objdump from
> the toolchain so that it can analyse data recorded on Android. This
> patch is targeting this scenario, not the previous one. In this case,
> the CROSS_COMPILE option would be different than arm-eabi- so using
> $(CROSS_COMPILE)objdump would be wrong. objdump should be overridden
> when running make since there is no connection between the toolchain
> used here and the path for objdump. I am always overriding objdump
> when calling make, so I did not catch this.
>
> I think that I should change DEFAULT_OBJDUMP_PATH=objdump in the
> Makefile to handle the first scenario. I'll also explain this in the
> commit message so that it is more clear and make the same change for
> the addr2line patch.
>
> What do you think?

I think the right thing to do is finding a correct objdump at runtime in
some way. Why do you want to make it compile-time configurable?

Thanks,
Namhyung


\
 
 \ /
  Last update: 2012-09-27 04:41    [W:0.097 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site