From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754798AbcEZR56 (ORCPT ); Thu, 26 May 2016 13:57:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44477 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754225AbcEZR54 (ORCPT ); Thu, 26 May 2016 13:57:56 -0400 Date: Thu, 26 May 2016 19:57:50 +0200 From: Jiri Olsa To: He Kuang Cc: peterz@infradead.org, mingo@redhat.com, acme@kernel.org, alexander.shishkin@linux.intel.com, wangnan0@huawei.com, jpoimboe@redhat.com, ak@linux.intel.com, eranian@google.com, namhyung@kernel.org, adrian.hunter@intel.com, sukadev@linux.vnet.ibm.com, masami.hiramatsu.pt@hitachi.com, tumanova@linux.vnet.ibm.com, kan.liang@intel.com, penberg@kernel.org, dsahern@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 4/5] perf callchain: Support x86 target platform Message-ID: <20160526175750.GC11246@krava> References: <1464081629-137191-1-git-send-email-hekuang@huawei.com> <1464081629-137191-5-git-send-email-hekuang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1464081629-137191-5-git-send-email-hekuang@huawei.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 26 May 2016 17:57:55 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 24, 2016 at 09:20:28AM +0000, He Kuang wrote: > Support x86(32-bit) cross platform callchain unwind. > > Signed-off-by: He Kuang > --- > .../perf/arch/x86/include/libunwind/libunwind-arch.h | 18 ++++++++++++++++++ > tools/perf/arch/x86/util/unwind-libunwind.c | 19 ++++++++++++++----- > tools/perf/util/Build | 6 ++++++ > tools/perf/util/unwind-libunwind_common.c | 6 ++++-- > tools/perf/util/unwind.h | 5 +++++ > 5 files changed, 47 insertions(+), 7 deletions(-) > create mode 100644 tools/perf/arch/x86/include/libunwind/libunwind-arch.h > > diff --git a/tools/perf/arch/x86/include/libunwind/libunwind-arch.h b/tools/perf/arch/x86/include/libunwind/libunwind-arch.h > new file mode 100644 > index 0000000..be8c675 > --- /dev/null > +++ b/tools/perf/arch/x86/include/libunwind/libunwind-arch.h > @@ -0,0 +1,18 @@ > +#ifndef _LIBUNWIND_ARCH_H > +#define _LIBUNWIND_ARCH_H > + > +#include > +#include <../perf_regs.h> > +#include <../../../../../../arch/x86/include/uapi/asm/perf_regs.h> > + > +#define LIBUNWIND_X86_32 > +int libunwind__x86_reg_id(int regnum); > + > +#define LIBUNWIND__ARCH_REG_ID libunwind__x86_reg_id > + > +#include <../../../x86/util/unwind-libunwind.c> > + > +#define UNWT_PREFIX UNW_PASTE(UNW_PASTE(_U, x86), _) > +#define UNWT_OBJ(fn) UNW_PASTE(UNWT_PREFIX, fn) is there a reason for using libunwind define for the symbol prefix? what's the '_U' and all those '__' for? why dont we use simple macro for arch prefix? this explanation would be great to have in those wrapper obects I meantioned in earlier email: util/unwind-libunwind-local.c util/unwind-libunwind-x86_32.c util/unwind-libunwind-arm64.c thanks, jirka