aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
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 /arch/powerpc/kernel
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 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/asm-offsets.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
index c53acd2a6dfc..c578e7ab8173 100644
--- a/arch/powerpc/kernel/asm-offsets.c
+++ b/arch/powerpc/kernel/asm-offsets.c
@@ -137,6 +137,7 @@ int main(void)
137 DEFINE(PACA_USER_TIME, offsetof(struct paca_struct, user_time)); 137 DEFINE(PACA_USER_TIME, offsetof(struct paca_struct, user_time));
138 DEFINE(PACA_SYSTEM_TIME, offsetof(struct paca_struct, system_time)); 138 DEFINE(PACA_SYSTEM_TIME, offsetof(struct paca_struct, system_time));
139 DEFINE(PACA_SLBSHADOWPTR, offsetof(struct paca_struct, slb_shadow_ptr)); 139 DEFINE(PACA_SLBSHADOWPTR, offsetof(struct paca_struct, slb_shadow_ptr));
140 DEFINE(PACA_DATA_OFFSET, offsetof(struct paca_struct, data_offset));
140 141
141 DEFINE(SLBSHADOW_STACKVSID, 142 DEFINE(SLBSHADOW_STACKVSID,
142 offsetof(struct slb_shadow, save_area[SLB_NUM_BOLTED - 1].vsid)); 143 offsetof(struct slb_shadow, save_area[SLB_NUM_BOLTED - 1].vsid));
@@ -165,6 +166,12 @@ int main(void)
165 /* Create extra stack space for SRR0 and SRR1 when calling prom/rtas. */ 166 /* Create extra stack space for SRR0 and SRR1 when calling prom/rtas. */
166 DEFINE(PROM_FRAME_SIZE, STACK_FRAME_OVERHEAD + sizeof(struct pt_regs) + 16); 167 DEFINE(PROM_FRAME_SIZE, STACK_FRAME_OVERHEAD + sizeof(struct pt_regs) + 16);
167 DEFINE(RTAS_FRAME_SIZE, STACK_FRAME_OVERHEAD + sizeof(struct pt_regs) + 16); 168 DEFINE(RTAS_FRAME_SIZE, STACK_FRAME_OVERHEAD + sizeof(struct pt_regs) + 16);
169
170 /* hcall statistics */
171 DEFINE(HCALL_STAT_SIZE, sizeof(struct hcall_stats));
172 DEFINE(HCALL_STAT_CALLS, offsetof(struct hcall_stats, num_calls));
173 DEFINE(HCALL_STAT_TB, offsetof(struct hcall_stats, tb_total));
174 DEFINE(HCALL_STAT_PURR, offsetof(struct hcall_stats, purr_total));
168#endif /* CONFIG_PPC64 */ 175#endif /* CONFIG_PPC64 */
169 DEFINE(GPR0, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[0])); 176 DEFINE(GPR0, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[0]));
170 DEFINE(GPR1, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[1])); 177 DEFINE(GPR1, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[1]));