Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753815AbbDHJse (ORCPT ); Wed, 8 Apr 2015 05:48:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49367 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753447AbbDHJsc (ORCPT ); Wed, 8 Apr 2015 05:48:32 -0400 Date: Wed, 8 Apr 2015 11:46:06 +0200 From: Jiri Olsa To: David Daney Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, Peter Zijlstra , Paul Mackerras , Ingo Molnar , Arnaldo Carvalho de Melo Subject: Re: [PATCH 1/2] perf tools: Add support for MIPS userspace DWARF callchains. Message-ID: <20150408094606.GA14284@krava.redhat.com> References: <2ed9bd678ec4f448c0a312f8a4cdafe5d5caefa2.1428450297.git.ralf@linux-mips.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2ed9bd678ec4f448c0a312f8a4cdafe5d5caefa2.1428450297.git.ralf@linux-mips.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3186 Lines: 105 On Wed, Apr 08, 2015 at 01:58:46AM +0200, David Daney wrote: > From: David Daney > > Hack up the Makefile and add support code for mips unwinding > and dwarf-regs. hi, we changed our build system just recently and this patch is made over the old one.. comments below > > Signed-off-by: David Daney > Cc: linux-mips@linux-mips.org > Cc: Jiri Olsa > Cc: linux-kernel@vger.kernel.org > Cc: Peter Zijlstra > Cc: Paul Mackerras > Cc: Ingo Molnar > Cc: Arnaldo Carvalho de Melo > Patchwork: https://patchwork.linux-mips.org/patch/5249/ > Signed-off-by: Ralf Baechle > --- > tools/perf/Makefile | 3 ++ > tools/perf/arch/mips/Makefile | 7 +++ > tools/perf/arch/mips/include/perf_regs.h | 84 ++++++++++++++++++++++++++++++++ > tools/perf/arch/mips/util/dwarf-regs.c | 37 ++++++++++++++ > tools/perf/arch/mips/util/unwind.c | 20 ++++++++ > 5 files changed, 151 insertions(+) > create mode 100644 tools/perf/arch/mips/Makefile > create mode 100644 tools/perf/arch/mips/include/perf_regs.h > create mode 100644 tools/perf/arch/mips/util/dwarf-regs.c > create mode 100644 tools/perf/arch/mips/util/unwind.c > > diff --git a/tools/perf/Makefile b/tools/perf/Makefile > index cb2e586..c2a089a 100644 > --- a/tools/perf/Makefile > +++ b/tools/perf/Makefile > @@ -28,6 +28,9 @@ ifeq ($(JOBS),) > ifeq ($(JOBS),) > JOBS := 1 > endif > + ifeq ($(ARCH),mips) > + LIB_H += arch/mips/include/perf_regs.h > + endif > endif LIB_H is no longer supported, the build now detects all headers automatically > > # > diff --git a/tools/perf/arch/mips/Makefile b/tools/perf/arch/mips/Makefile > new file mode 100644 > index 0000000..fe9b61e > --- /dev/null > +++ b/tools/perf/arch/mips/Makefile > @@ -0,0 +1,7 @@ > +ifndef NO_DWARF > +PERF_HAVE_DWARF_REGS := 1 > +LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/dwarf-regs.o > +endif > +ifndef NO_LIBUNWIND > +LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/unwind.o > +endif the tools/perf/arch/mips/Makefile now provides make arch's dependent variables setup, so your's should be: --- ifndef NO_DWARF PERF_HAVE_DWARF_REGS := 1 endif --- from building side mips seems similar to arch/powerpc/ setup: --- [jolsa@krava perf]$ cat arch/powerpc/Build libperf-y += util/ [jolsa@krava perf]$ cat arch/powerpc/util/Build libperf-y += header.o libperf-$(CONFIG_DWARF) += dwarf-regs.o libperf-$(CONFIG_DWARF) += skip-callchain-idx.o --- so arch/mips/Build should be identical to arch/powerpc/Build and arch/mips/util/Build should look like: --- libperf-$(CONFIG_DWARF) += dwarf-regs.o libperf-$(CONFIG_LIBUNWIND) += unwind.o --- could you please also rename 'unwind.c' to 'unwind-libunwind.c', cause we have also libdw unwind and we try to keep them separated thanks, jirka -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/