;**************************************************************** ;* Program: pfm_format ;* Author: Bruce Ellis ;* Synopsis: formats and dumps page fault buffers ;* Notes: data file: pfdata.dat ;**************************************************************** .link /sys$system:sys.stb/ .macro check ?l blbs r0,l $exit_s r0 l: .endm check outfab: $fab fnm=,alq=4096,fac=GET,fop=,- mrs=512,org=SEQ,rfm=FIX block: .blkb 512 ochan: .blkl 1 buffer: .long 80 .address 10$ 10$: .blkb 80 pf_format: .ascid /Faulting virtual address !8XL Faulting PC !8XL/ cpu_format: .ascid /CPU time: !10UL (10ms)/ ;**************************************************************** ; Code to format and dump pagefault buffers ;**************************************************************** .entry pfm_format,^m $open fab=outfab ;open the input file check movw fab$l_stv+outfab,ochan ;save off channel to file movl #1,r10 ;set up virtual block counter dump_loop: ;(((((( For now we dump 1 block at a time better to dump more)))))) $qiow_s chan=ochan,func=#io$_readvblk,p1=block,p2=#512,p3=r10 check incl r10 ;update vbn in file moval block+8,r2 ;skip record count movl block,r3 ;get record count next_entry: tstl (r2) ;if zero done beql done ;get out cmpl #-1,(r2)+ ;CPU time stamp? beql cpu_stamp ;If so dump as such $fao_s ctrstr=pf_format,outlen=buffer,outbuf=buffer,p1=(r2)+,- p2=-4(r2) ;else dump as page fault ; check brb spill_it ;spill it on tube cpu_stamp: ;format the cpu time stamp $fao_s ctrstr=cpu_format,outlen=buffer,outbuf=buffer,p1=(r2)+ ; check spill_it: pushal buffer ;type buffer calls #1,g^lib$put_output ; check movl #80,buffer ;reset buffer size sobgtr r3,next_entry ;;get next record entry in buffer cmpl block,#<512/8> blss done brw dump_loop ; done: ret ;all done sayonara .end pfm_format