[PATCH] powerpc: Instrument Hypervisor Calls
    Dave Boutcher 
    boutcher at cs.umn.edu
       
    Tue Aug 15 13:32:11 EST 2006
    
    
  
On Mon, 14 Aug 2006 16:21:44 -0700, Mike Kravetz <kravetz at us.ibm.com> said:
> Here is an updated version of the patch to instrument hypervisor
> calls.  In this version, all statistic updates are performed in
> assembly code.  Statistics are made available via debugfs.
> Instrumentation is enabled via a config option and there is zero
> cost if not enabled.
...
> +#define HCALL_INST_POSTCALL					\
> +	/* get time and PURR snapshots after hcall */		\
> +	mftb	r7;			/* timebase after */	\
if you just add a "mr r8,r7" here you will get consistent
behaviour (either TB and PURR if PURR is supported, or TB
everywhere.)  The processor will pretty much optimize that
away if the FTR section is not no-op-ed.
> +BEGIN_FTR_SECTION;						\
> +	mfspr	r8,SPRN_PURR;		/* PURR after */	\
> +END_FTR_SECTION_IFSET(CPU_FTR_PURR);				\
Dave B
    
    
More information about the Linuxppc-dev
mailing list