Re: [PATCH 2/2] perf probe: Add PowerPC DWARF register number mappings

From: Masami Hiramatsu
Date: Mon Apr 12 2010 - 08:40:34 EST


Hi Ian,

Ian Munsie wrote:
> From: Ian Munsie <imunsie@xxxxxxxxxx>
>
> This patch adds mappings from the register numbers from DWARF to the
> register names used in the PowerPC Regs and Stack Access API. This
> allows perf probe to be used to record variable contents on PowerPC.
>
> This patch depends on functionality in the powerpc/next tree, though it
> will compile fine without it. Specifically this patch depends on
> 359e4284a3f37aba7fd06d993863de2509d86f54
>
> Signed-off-by: Ian Munsie <imunsie@xxxxxxxxxx>
> ---
> tools/perf/arch/powerpc/Makefile | 1 +
> tools/perf/arch/powerpc/include/arch_dwarf-regs.h | 6 ++
> tools/perf/arch/powerpc/util/dwarf-regs.c | 88 +++++++++++++++++++++
> 3 files changed, 95 insertions(+), 0 deletions(-)
> create mode 100644 tools/perf/arch/powerpc/Makefile
> create mode 100644 tools/perf/arch/powerpc/include/arch_dwarf-regs.h
> create mode 100644 tools/perf/arch/powerpc/util/dwarf-regs.c
>
> diff --git a/tools/perf/arch/powerpc/Makefile b/tools/perf/arch/powerpc/Makefile
> new file mode 100644
> index 0000000..1191403
> --- /dev/null
> +++ b/tools/perf/arch/powerpc/Makefile
> @@ -0,0 +1 @@
> +LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/dwarf-regs.o
> diff --git a/tools/perf/arch/powerpc/include/arch_dwarf-regs.h b/tools/perf/arch/powerpc/include/arch_dwarf-regs.h
> new file mode 100644
> index 0000000..a7fc588
> --- /dev/null
> +++ b/tools/perf/arch/powerpc/include/arch_dwarf-regs.h
> @@ -0,0 +1,6 @@
> +#ifndef _PREF_ARCH_X86_DWARF_REGS_H
> +#define _PREF_ARCH_X86_DWARF_REGS_H

_PREF_ARCH_PPC_DWARF_REGS_H? :)

> +
> +#define get_arch_regstr(n) get_arch_regstr(n)
> +
> +#endif

Thank you,

--
Masami Hiramatsu
e-mail: mhiramat@xxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/