Subject: Re: [PATCH 1/2] perf: Move arch specific code into separate arch directory

From: Ian Munsie <[email-masked]>
Date: Tue, 13 Apr 2010 18:44:14 +1000

Hi Masami,

Thanks for the feedback

Excerpts from Masami Hiramatsu's message of Mon Apr 12 22:37:03 +1000 2010:
> Could you add a check whether the get_arch_regstr() is defined
> (or dwarf-regs.h is exist) in Makefile?
> If it is not defined, we'd better drop dwarf support(so set NO_DWARF),
> because it means we haven't ported perf probe on that architecture yet. :)

I was a little reluctant to do that when I first read your message
because it felt like adding autoconf stuff into the Makefile and the
code should already fail gracefully on architectures without the
register mappings. But, since the Makefile already has some autoconf
like magic and it would make the code cleaner, I'll play with the idea a
bit more tomorrow.

> > diff --git a/tools/perf/arch/x86/include/arch_dwarf-regs.h b/tools/perf/arch/x86/include/arch_dwarf-regs.h
> > new file mode 100644
> > index 0000000..9e8da6a
> > --- /dev/null
> > +++ b/tools/perf/arch/x86/include/arch_dwarf-regs.h
> > @@ -0,0 +1,6 @@
> > +#ifndef _PREF_ARCH_PPC_DWARF_REGS_H
> > +#define _PREF_ARCH_PPC_DWARF_REGS_H
> 
> _PREF_ARCH_X86_DWARF_REGS_H ?

Nice catch (oops)

Cheers,
-Ian