[PATCH 0/3] powerpc: Instrument Hypervisor Calls

Arnd Bergmann arnd at arndb.de
Tue Jul 11 06:49:49 EST 2006


On Monday 10 July 2006 22:35, Mike Kravetz wrote:
> On Thu, Jun 22, 2006 at 03:56:09PM -0700, Mike Kravetz wrote:
> > This version addresses all comments received except Arnd's issue
> > with an #ifdef for each function in the assembly file.
> 
> I was thinking of changing the names of all the assembly routines from
> plpar_hcall_*() to plpar_hcall_*_asm().  The instrumented version of the
> routines would be named plpar_hcall_*_inst().  Then, the header file
> would contain definitions such as:
> 
> #ifdef CONFIG_HCALL_STATS
> #define plpar_hcall_*()		plpar_hcall_*_inst()
> .
> #else
> #define plpar_hcall_*()		plpar_hcall_*_asm()
> .
> #endif
> 
> Is that any better than all the individual #ifdefs in the .S file?  Is it
> still too ugly?
> 

I guess it's better to have the #ifdef in the header file, but then
again, you could just as well save some source lines doing

#ifndef CONFIG_HCALL_STATS
#define plpar_hcalldef(x) plpar_call_ ## x ## _asm
#else
#define plpar_hcalldef(x) plpar_call_ ## x ## _inst
#endif

#define plpar_call_foo plpar_hcalldef(foo)

	Arnd <><



More information about the Linuxppc-dev mailing list