lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 8 Apr 2015 11:46:06 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	David Daney <david.daney@...ium.com>
Cc:	linux-mips@...ux-mips.org, linux-kernel@...r.kernel.org,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>,
	Ingo Molnar <mingo@...hat.com>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Subject: Re: [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@...ium.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@...ium.com>
> Cc: linux-mips@...ux-mips.org
> Cc: Jiri Olsa <jolsa@...hat.com>
> Cc: linux-kernel@...r.kernel.org
> Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> Cc: Paul Mackerras <paulus@...ba.org>
> Cc: Ingo Molnar <mingo@...hat.com>
> Cc: Arnaldo Carvalho de Melo <acme@...stprotocols.net>
> Patchwork: https://patchwork.linux-mips.org/patch/5249/
> Signed-off-by: Ralf Baechle <ralf@...ux-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@...va perf]$ cat arch/powerpc/Build 
libperf-y += util/
[jolsa@...va 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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ