Thread (9 messages) read the whole thread 9 messages, 4 authors, 2006-08-15
DORMANTno replies

[PATCH] powerpc: Instrument Hypervisor Calls

From: Dave Boutcher <hidden>
Date: 2006-08-15 04:16:47

On Mon, 14 Aug 2006 16:21:44 -0700, Mike Kravetz [off-list ref] 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help