[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>
This commit is contained in:
committed by
Paul Mackerras
parent
ab06ff3af3
commit
57852a853b
@@ -137,6 +137,7 @@ int main(void)
|
||||
DEFINE(PACA_USER_TIME, offsetof(struct paca_struct, user_time));
|
||||
DEFINE(PACA_SYSTEM_TIME, offsetof(struct paca_struct, system_time));
|
||||
DEFINE(PACA_SLBSHADOWPTR, offsetof(struct paca_struct, slb_shadow_ptr));
|
||||
DEFINE(PACA_DATA_OFFSET, offsetof(struct paca_struct, data_offset));
|
||||
|
||||
DEFINE(SLBSHADOW_STACKVSID,
|
||||
offsetof(struct slb_shadow, save_area[SLB_NUM_BOLTED - 1].vsid));
|
||||
@@ -165,6 +166,12 @@ int main(void)
|
||||
/* Create extra stack space for SRR0 and SRR1 when calling prom/rtas. */
|
||||
DEFINE(PROM_FRAME_SIZE, STACK_FRAME_OVERHEAD + sizeof(struct pt_regs) + 16);
|
||||
DEFINE(RTAS_FRAME_SIZE, STACK_FRAME_OVERHEAD + sizeof(struct pt_regs) + 16);
|
||||
|
||||
/* hcall statistics */
|
||||
DEFINE(HCALL_STAT_SIZE, sizeof(struct hcall_stats));
|
||||
DEFINE(HCALL_STAT_CALLS, offsetof(struct hcall_stats, num_calls));
|
||||
DEFINE(HCALL_STAT_TB, offsetof(struct hcall_stats, tb_total));
|
||||
DEFINE(HCALL_STAT_PURR, offsetof(struct hcall_stats, purr_total));
|
||||
#endif /* CONFIG_PPC64 */
|
||||
DEFINE(GPR0, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[0]));
|
||||
DEFINE(GPR1, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[1]));
|
||||
|
||||
Reference in New Issue
Block a user