lkml.org 
[lkml]   [2015]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] perf tools: Add support for MIPS userspace DWARF callchains.
On Wed, Apr 08, 2015 at 01:58:46AM +0200, David Daney wrote:
> From: David Daney <david.daney@cavium.com>
>
> 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 <david.daney@cavium.com>
> Cc: linux-mips@linux-mips.org
> Cc: Jiri Olsa <jolsa@redhat.com>
> Cc: linux-kernel@vger.kernel.org
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
> Patchwork: https://patchwork.linux-mips.org/patch/5249/
> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
> ---
> 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


\
 
 \ /
  Last update: 2015-04-08 12:21    [W:0.074 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site