Google
 

Trailing-Edge - PDP-10 Archives - -
There are no other files named in the archive.
(FILECREATED " 5-AUG-79 22:34:51" <LISPUSERS>SIZETABLE.;34 7765   

     changes to:  SIZETABLE

     previous date: "31-JUL-79 09:50:43" <LISPUSERS>SIZETABLE.;31)


(PRETTYCOMPRINT SIZETABLECOMS)

(RPAQQ SIZETABLECOMS [(FNS SIZETABLE SUBFN COUNTLITS LITSIZE)
		      (BLOCKS (SIZETABLE SIZETABLE COUNTLITS LITSIZE SUBFN (LOCALVARS . T)
					 (NOLINKFNS . T)))
		      (P (MOVD? (QUOTE NILL)
				(QUOTE BYTECODEP)))
		      (DECLARE: DOEVAL@COMPILE DONTCOPY (VARS TB TP TL TBS TPS)
				(P (RESETSAVE DWIMIFYCOMPFLG T])
(DEFINEQ

(SIZETABLE
  [LAMBDA (FILES OFILE TITLE)                          (* rmk: " 5-AUG-79 22:32")
    (DECLARE (LOCALVARS . T))
    (RESETLST [if OFILE
		  then (RESETSAVE (OUTFILE OFILE)
				  '(PROGN (CLOSEF (OUTPUT OLDVALUE]
	      (RESETSAVE (LINELENGTH 80))
	      (RESETSAVE (FLTFMT '(FLOAT 8 1)))
	      (if TITLE
		  then (printout NIL T T .CENTER 0 TITLE))
	      (printout NIL 0 .CENTER 0 (DATE)
			T T T)
	      (for F FNS SUBFNS BLKS COMS SIZE TOT #TOT #F_0
		   GB_0
		   GP_0
		   GL_0
		   GBS_0
		   GPS_0
		   G#B_0
		   G#P_0
		   G#BS_0
		   G#PS_0 inside (OR FILES (SORT (REMOVE 'SIZETABLE FILELST)))
		 declare (SPECVARS SUBFNS) when FNS_[if (LISTP F)
							then F
						      else (INFILECOMS? NIL 'FNS COMS_(GETATOMVAL
									  (FILECOMS F]
		 first (printout NIL "  Function" .TAB (CONSTANT TB-4)
				 .CENTER
				 (CONSTANT TL)
				 "Resident" .TAB (CONSTANT TBS-4)
				 .CENTER
				 (CONSTANT TPS)
				 "Swapped" .TAB (CONSTANT TPS+5)
				 "TOTAL" T .FR (CONSTANT TB)
				 "Byte" .FR (CONSTANT TP)
				 "PDP-10" .FR (CONSTANT TL)
				 "Lits" .FR (CONSTANT TBS)
				 "Byte" .FR (CONSTANT TPS)
				 "PDP-10" T)
		 do (add #F 1)                         (* To suppress grand total printing)
		    (if (LITATOM F)
			then (PRINT F))
		    (for BLK in BLKS_(INFILECOMS? NIL 'BLOCKS COMS) when BLK:1
		       do (pushnew FNS BLK:1))
		    (for FN DEF LSIZE B_0
			 P_0
			 L_0
			 BS_0
			 PS_0
			 #B_0
			 #P_0
			 #BS_0
			 #PS_0 in (SORT < ! FNS>)
		       do SUBFNS (printout NIL ,, .P2 FN)
			  (if (ARRAYP DEF_(GETD FN))
			      then (SIZE_(2+(ARRAYSIZE DEF)))
				   (TAB (if (BYTECODEP FN)
					    then (add B SIZE)
						 (add #B 1)
						 (CONSTANT TB)
					  else (add P SIZE)
					       (add #P 1)
					       (CONSTANT TP))
					-(NCHARS SIZE))
				   (printout NIL SIZE)
				   (if LSIZE_(COUNTLITS DEF) gt 0
				       then (printout NIL .FR (CONSTANT TL)
						      LSIZE)
					    (add L LSIZE))
			    elseif (SWPARRAYP DEF)
			      then [SIZE_(2+(ARRAYSIZE (GETD FN]
				   (if LSIZE_(COUNTLITS DEF) gt 0
				       then (printout NIL .FR (CONSTANT TL)
						      LSIZE)
					    (add L LSIZE))
				   (TAB (if (BYTECODEP FN)
					    then (add BS SIZE)
						 (add #BS 1)
						 (CONSTANT TBS)
					  else (add PS SIZE)
					       (add #PS 1)
					       (CONSTANT TPS))
					-(NCHARS SIZE))
				   (printout NIL SIZE)
			    else (for B in BLKS when (AND B:1 (MEMB FN B))
				    do (printout NIL 17 "internal to " B:1)
				       (RETURN)
				    finally (printout NIL 17 "--  no compiled definition")))
			  (TERPRI)
			  (if SUBFNS
			      then (FN_(pop SUBFNS))
				   (GO SUBFNS))
		       finally (printout NIL T "FILE TOTALS" .FR (CONSTANT TB)
					 B .FR (CONSTANT TP)
					 P .FR (CONSTANT TL)
					 L .FR (CONSTANT TBS)
					 BS .FR (CONSTANT TPS)
					 PS .FR -10 (TOT_B+P+L+BS+PS)
					 T "FILE N" .FR (CONSTANT TB)
					 #B .FR (CONSTANT TP)
					 #P .FR (CONSTANT TBS)
					 #BS .FR (CONSTANT TPS)
					 #PS .FR -10 (#TOT_#B+#P+#BS+#PS)
					 T "FILE AVG" .FR (CONSTANT TB+2)
					 (FQUOTIENT B #B)
					 .FR
					 (CONSTANT TP+2)
					 (FQUOTIENT P #P)
					 .FR
					 (CONSTANT TL+2)
					 (FQUOTIENT L #TOT)
					 .FR
					 (CONSTANT TBS+2)
					 (FQUOTIENT BS #BS)
					 .FR
					 (CONSTANT TPS+2)
					 (FQUOTIENT PS #PS)
					 .FR -10 (FQUOTIENT TOT #TOT)
					 T .FR (CONSTANT (TB+TP)/2)
					 (B+P)
					 .FR
					 (CONSTANT (TP+TL)/2)
					 (B+P+L)
					 "**" .FR (CONSTANT (TBS+TPS)/2)
					 (BS+PS)
					 T .FR (CONSTANT (TB+TP)/2)
					 (#B+#P)
					 .FR
					 (CONSTANT (TBS+TPS)/2)
					 (#BS+#PS)
					 T .FR (CONSTANT 2+(TB+TP)/2)
					 (FQUOTIENT B+P #B+#P)
					 .FR
					 (CONSTANT 2+(TBS+TPS)/2)
					 (FQUOTIENT BS+PS #BS+#PS)
					 T T T)
			       (add GB B)
			       (add GL L)
			       (add GP P)
			       (add GBS BS)
			       (add GPS PS)
			       (add G#B #B)
			       (add G#P #P)
			       (add G#BS #BS)
			       (add G#PS #PS))
		 finally (if #F gt 1
			     then (printout NIL T "GRAND TOTALS" .FR (CONSTANT TB)
					    GB .FR (CONSTANT TP)
					    GP .FR (CONSTANT TL)
					    GL .FR (CONSTANT TBS)
					    GBS .FR (CONSTANT TPS)
					    GPS .FR -10 (TOT_GB+GP+GBS+GPS)
					    T "GRAND N" .FR (CONSTANT TB)
					    G#B .FR (CONSTANT TP)
					    G#P .FR (CONSTANT TBS)
					    G#BS .FR (CONSTANT TPS)
					    G#PS .FR -10 (#TOT_G#B+G#P+G#BS+G#PS)
					    T "GRAND AVG" .FR (CONSTANT TB+2)
					    (FQUOTIENT GB G#B)
					    .FR
					    (CONSTANT TP+2)
					    (FQUOTIENT GP G#P)
					    .FR
					    (CONSTANT TL+2)
					    (FQUOTIENT GL #TOT)
					    .FR
					    (CONSTANT TBS+2)
					    (FQUOTIENT GBS G#BS)
					    .FR
					    (CONSTANT TPS+2)
					    (FQUOTIENT GPS G#PS)
					    .FR -10 (FQUOTIENT TOT #TOT)
					    T .FR (CONSTANT (TB+TP)/2)
					    (GB+GP)
					    .FR
					    (CONSTANT (TP+TL)/2)
					    (GB+GL+GP)
					    "**" .FR (CONSTANT (TBS+TPS)/2)
					    (GBS+GPS)
					    T .FR (CONSTANT (TB+TP)/2)
					    (G#B+G#P)
					    .FR
					    (CONSTANT (TBS+TPS)/2)
					    (G#BS+G#PS)
					    T .FR (CONSTANT 2+(TB+TP)/2)
					    (FQUOTIENT GB+GP G#B+G#P)
					    .FR
					    (CONSTANT 2+(TBS+TPS)/2)
					    (FQUOTIENT GBS+GPS G#BS+G#PS)
					    T])

(SUBFN
  [LAMBDA (X)                                          (* rmk: " 5-DEC-77 14:48")
                                                       (* lmm: 29 OCT 75 2256)
    (AND (5 LT (NCHARS X))
	 (NTHCHAR X -5)='A
	 (NTHCHAR X -4)='0 X_(GETD X)
	 (CCODEP X])

(COUNTLITS
  [LAMBDA (DEF)
    [CLISP:(BLOCKRECORD IBOX ((I INTEGER]              (* rmk: " 4-DEC-77 18:12")
    (if (LITATOM DEF)
	then DEF_(GETD DEF))
    (bind (J _(CONSTANT (IPLUS 100000)))
	  (END _(LASTLIT+1 DEF)) first (J:I_(FIRSTLIT DEF)+ -1) while (add J:I 1) LT END
       sum (LITSIZE (FNOPENRA DEF J))+(LITSIZE (FNOPENRD DEF J])

(LITSIZE
  [LAMBDA (LIT)                                        (* rmk: " 5-DEC-77 16:20")
    (DECLARE (USEDFREE SUBFNS))
    (SELECTQ (TYPENAME LIT)
	     ((FIXP FLOATP)
	       1)
	     (LISTP (COUNT LIT))
	     (STRINGP 1+(4+(NCHARS LIT))/5)
	     (LITATOM (if (SUBFN LIT)
			  then (push SUBFNS LIT))
		      0)
	     0])
)
[DECLARE: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY
(BLOCK: SIZETABLE SIZETABLE COUNTLITS LITSIZE SUBFN (LOCALVARS . T)
	(NOLINKFNS . T))
]
(MOVD? (QUOTE NILL)
       (QUOTE BYTECODEP))
(DECLARE: DOEVAL@COMPILE DONTCOPY 

(RPAQQ TB 24)

(RPAQQ TP 35)

(RPAQQ TL 44)

(RPAQQ TBS 52)

(RPAQQ TPS 63)

(RESETSAVE DWIMIFYCOMPFLG T)
)
(DECLARE: DONTCOPY
  (FILEMAP (NIL (543 7375 (SIZETABLE 555 . 6315) (SUBFN 6319 . 6600) (COUNTLITS 6604 . 6999) (LITSIZE 
7003 . 7372)))))
STOP