! Patch to TTDRIVER to enable statistics collection DEFINE PMS$GL_DOSTATS = 80002E84 DEFINE PMS$AL_READTBL = 80002E08 DEFINE PMS$GL_TREADS = 80002DB8 DEFINE PMS$GL_READCNT = 80002E58 DEFINE PMS$AL_WRITETBL = 80002E30 DEFINE PMS$GL_TWRITES = 80002DBC DEFINE PMS$GL_WRTCNT = 80002E5C DEFINE IRP$V_FCODE = 0 DEFINE IRP$S_FCODE = 6 DEFINE IRP$W_FUNC = 20 DEFINE IRP$W_BCNT = 32 DEFINE TTY$C_FC_READ = 0 VERIFY/WORD 8 = 2328 SET PATCH/INIT=87 2328 DEFINE TTYSTRSTP = 7F4 ALIGN/BYTE TT_STAT_PAT DEPOSIT/INST/PATCH TT_STAT_PAT 'MOVL R5,R3' 'BRB PAT_2$' 'PAT_1$: MOVL R4,R3' ! include replaced instruction 'PAT_2$: BLBC @#PMS$GL_DOSTATS,PAT_40$' ! if flag set, bypass stat code 'MOVZWL B^IRP$W_BCNT(R3),R1' 'DIVL3 #5,R1,R0' 'CMPL #9,R0' 'BGEQ PAT_10$' 'MOVL #9,R0' 'PAT_10$: CMPZV #IRP$V_FCODE,#IRP$S_FCODE,B^IRP$W_FUNC(R3),#TTY$C_FC_READ' 'BNEQ PAT_20$' 'INCL @#PMS$AL_READTBL[R0]' 'INCL @#PMS$GL_TREADS' 'ADDL2 R1,@#PMS$GL_READCNT' 'BRB PAT_40$' 'PAT_20$: INCL @#PMS$AL_WRITETBL[R0]' 'INCL @#PMS$GL_TWRITES' 'ADDL2 R1,@#PMS$GL_WRTCNT' 'PAT_40$: RSB' EXIT REPLACE/INST TTYSTRSTP+4C9 'MOVL R5,R3' ! place to include performance monitoring EXIT 'BSBW TT_STAT_PAT' ! branch to new collection code EXIT REPLACE/INST TTYSTRSTP+557 'MOVL R4,R3' ! place to include performance monitoring EXIT 'BSBW PAT_1$' ! branch to new collection code EXIT ALIGN/BYTE TT_STAT_SIZE REPLACE/WORD 8 2328 EXIT TT_STAT_SIZE EXIT UPDATE EXIT