Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1404101

Re: [PATCH v4 2/6] perf tools: Promote proper messages for cross-platform unwind

From Hekuang <hekuang@huawei.com>
Newsgroups linux.kernel
Subject Re: [PATCH v4 2/6] perf tools: Promote proper messages for cross-platform unwind
Date 2016-05-20 05:10 +0200
Message-ID <rAIZ4-7x-15@gated-at.bofh.it> (permalink)
References <rAuCJ-7Be-7@gated-at.bofh.it> <rAuCJ-7Be-5@gated-at.bofh.it> <rAzj4-2e6-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


hi

在 2016/5/20 0:46, Jiri Olsa 写道:
> On Thu, May 19, 2016 at 11:47:38AM +0000, He Kuang wrote:
>
> SNIP
>
>>   #endif /* ARCH_PERF_COMMON_H */
>> diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
>> index 1e46277..a86b864 100644
>> --- a/tools/perf/config/Makefile
>> +++ b/tools/perf/config/Makefile
>> @@ -345,6 +345,12 @@ ifeq ($(ARCH),powerpc)
>>   endif
>>   
>>   ifndef NO_LIBUNWIND
>> +  ifeq ($(feature-libunwind-x86), 1)
>> +    LIBUNWIND_LIBS += -lunwind-x86
>> +    $(call detected,CONFIG_LIBUNWIND_X86)
>> +    CFLAGS += -DHAVE_LIBUNWIND_X86_SUPPORT
>> +  endif
>> +
> how does one install that lirary?
>
> thanks,
> jirka

My work environment is on an old suse distribution, so it's
difficult to find libunwind-$arch rpm packages, so I build them
from source.

The git repository url is here:
http://git.savannah.gnu.org/r/libunwind.git(master)

Then flow the build step in README, first for i686:

   $ ./autogen.sh
   $ ./configure prefix=/xx/dst_i686 --target=i686-oe-linux 
CC=x86_64-oe-linux-gcc
   $ make && make install

Similar for aarch64:

   $ make clean
   $ ./configure prefix=/xx/dst_aarch64 --target=i686-oe-linux 
CC=x86_64-oe-linux-gcc
   $ make && make install

NOTICE: the contents in '--target' should be like
'i686-oe-linux', only give 'i686' cause strange build errors.

It looks like that libunwind don't support building for multiple
platforms at the same time, so I build them separately into
different directories.

Finally, copy the outputs into /usr/include and /usr/lib64, now
perf can detect them:

   $ make VF=1 ARCH=x86_64 CROSS_COMPILE=x86_64-oe-linux- 
EXTRA_CFLAGS="-m64"
   ...

   ...                 libunwind-x86: [ on  ]
   ...              libunwind-x86_64: [ OFF ]
   ...                 libunwind-arm: [ OFF ]
   ...             libunwind-aarch64: [ on  ]

Thanks.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 2/6] perf tools: Promote proper messages for cross-platform unwind He Kuang <hekuang@huawei.com> - 2016-05-19 13:50 +0200
  Re: [PATCH v4 2/6] perf tools: Promote proper messages for  cross-platform unwind Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-05-19 17:00 +0200
    Re: [PATCH v4 2/6] perf tools: Promote proper messages for  cross-platform unwind Jiri Olsa <jolsa@redhat.com> - 2016-05-19 18:20 +0200
      Re: [PATCH v4 2/6] perf tools: Promote proper messages for  cross-platform unwind Hekuang <hekuang@huawei.com> - 2016-05-20 05:10 +0200
  Re: [PATCH v4 2/6] perf tools: Promote proper messages for  cross-platform unwind Jiri Olsa <jolsa@redhat.com> - 2016-05-19 18:50 +0200
    Re: [PATCH v4 2/6] perf tools: Promote proper messages for  cross-platform unwind Jiri Olsa <jolsa@redhat.com> - 2016-05-19 19:20 +0200
    Re: [PATCH v4 2/6] perf tools: Promote proper messages for  cross-platform unwind Hekuang <hekuang@huawei.com> - 2016-05-20 05:10 +0200
      Re: [PATCH v4 2/6] perf tools: Promote proper messages for  cross-platform unwind Jiri Olsa <jolsa@redhat.com> - 2016-05-20 12:00 +0200

csiph-web