aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/hvcall.h
diff options
context:
space:
mode:
authorMike Kravetz <kravetz@us.ibm.com>2006-09-06 19:23:12 -0400
committerPaul Mackerras <paulus@samba.org>2006-09-13 04:39:53 -0400
commit57852a853b0d6761f270be0961d5d8387e98c8bb (patch)
treef3c3ff7ec94014a9acba27761dd489fdce1c66db /include/asm-powerpc/hvcall.h
parentab06ff3af34a6288b314862abfebd86ad918c5d9 (diff)
[POWERPC] powerpc: Instrument Hypervisor Calls
Add instrumentation for hypervisor calls on pseries. Call statistics include number of calls, wall time and cpu cycles (if available) and are made available via debugfs. Instrumentation code is behind the HCALL_STATS config option and has no impact if not enabled. Signed-off-by: Mike Kravetz <kravetz@us.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/hvcall.h')
-rw-r--r--include/asm-powerpc/hvcall.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/asm-powerpc/hvcall.h b/include/asm-powerpc/hvcall.h
index 63ce1ac8c1f4..257d1cecb8c9 100644
--- a/include/asm-powerpc/hvcall.h
+++ b/include/asm-powerpc/hvcall.h
@@ -208,7 +208,7 @@
208#define H_JOIN 0x298 208#define H_JOIN 0x298
209#define H_VASI_STATE 0x2A4 209#define H_VASI_STATE 0x2A4
210#define H_ENABLE_CRQ 0x2B0 210#define H_ENABLE_CRQ 0x2B0
211#define MAX_HCALL_OPCODES (H_ENABLE_CRQ >> 2) 211#define MAX_HCALL_OPCODE H_ENABLE_CRQ
212 212
213#ifndef __ASSEMBLY__ 213#ifndef __ASSEMBLY__
214 214
@@ -246,6 +246,16 @@ long plpar_hcall(unsigned long opcode, unsigned long *retbuf, ...);
246#define PLPAR_HCALL9_BUFSIZE 9 246#define PLPAR_HCALL9_BUFSIZE 9
247long plpar_hcall9(unsigned long opcode, unsigned long *retbuf, ...); 247long plpar_hcall9(unsigned long opcode, unsigned long *retbuf, ...);
248 248
249/* For hcall instrumentation. One structure per-hcall, per-CPU */
250struct hcall_stats {
251 unsigned long num_calls; /* number of calls (on this CPU) */
252 unsigned long tb_total; /* total wall time (mftb) of calls. */
253 unsigned long purr_total; /* total cpu time (PURR) of calls. */
254};
255void update_hcall_stats(unsigned long opcode, unsigned long tb_delta,
256 unsigned long purr_delta);
257#define HCALL_STAT_ARRAY_SIZE ((MAX_HCALL_OPCODE >> 2) + 1)
258
249#endif /* __ASSEMBLY__ */ 259#endif /* __ASSEMBLY__ */
250#endif /* __KERNEL__ */ 260#endif /* __KERNEL__ */
251#endif /* _ASM_POWERPC_HVCALL_H */ 261#endif /* _ASM_POWERPC_HVCALL_H */