From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932923AbcE3IxB (ORCPT ); Mon, 30 May 2016 04:53:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48077 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752648AbcE3Iw7 (ORCPT ); Mon, 30 May 2016 04:52:59 -0400 Date: Mon, 30 May 2016 10:52:54 +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 v6 10/11] perf callchain: Support x86 target platform Message-ID: <20160530085254.GC25607@krava> References: <1464436800-39860-1-git-send-email-hekuang@huawei.com> <1464436800-39860-11-git-send-email-hekuang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1464436800-39860-11-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.26]); Mon, 30 May 2016 08:52:58 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 28, 2016 at 11:59:59AM +0000, He Kuang wrote: SNIP > --- /dev/null > +++ b/tools/perf/arch/x86/util/unwind-libunwind_x86_32.c > @@ -0,0 +1,21 @@ > +#define REMOTE_UNWIND_LIBUNWIND > + > +#define LIBUNWIND__ARCH_REG_ID libunwind__x86_reg_id > + > +#include "unwind.h" > +#include "debug.h" > +#include "libunwind-x86.h" > +#include <../../../../../arch/x86/include/uapi/asm/perf_regs.h> > + > +#undef HAVE_ARCH_X86_64_SUPPORT > +#include "unwind-libunwind.c" > + > +#undef NO_LIBUNWIND_DEBUG_FRAME > +#define NO_LIBUNWIND_DEBUG_FRAME > +#include "util/unwind-libunwind-local.c" > + > +int register_x86_32_unwind_libunwind_ops(struct thread *thread) > +{ > + thread->unwind_libunwind_ops = &_unwind_libunwind_ops; > + return 0; > +} hum, how about export the arch ops: struct unwind_libunwind_ops *x86_32_unwind_libunwind_ops = &_unwind_libunwind_ops; and have single unwind__register_ops(ops) function jirka