Thread (8 messages) flat view 8 messages, 3 authors, 2006-07-12

Re: [PATCH 0/3] powerpc: Instrument Hypervisor Calls

From: Arnd Bergmann <arnd@arndb.de>
Date: 2006-07-10 20:49:59

On Monday 10 July 2006 22:35, Mike Kravetz wrote:
On Thu, Jun 22, 2006 at 03:56:09PM -0700, Mike Kravetz wrote:
quoted
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 <><
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help