COMPILATION LISTING OF SEGMENT instr_speed Compiled by: Multics PL/I Compiler, Release 29, of July 28, 1986 Compiled at: Honeywell Bull, Phoenix AZ, SysM Compiled on: 11/30/87 1325.3 mst Mon Options: optimize map 1 /****^ *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Bull Inc., 1987 * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 6* * * 7* * Copyright (c) 1972 by Massachusetts Institute of * 8* * Technology and Honeywell Information Systems, Inc. * 9* * * 10* *********************************************************** */ 11 12 13 14 15 /****^ HISTORY COMMENTS: 16* 1) change(87-10-08,Martinson), approve(87-10-08,MCR7765), 17* audit(87-11-20,Fawcett), install(87-11-30,MR12.2-1006): 18* Modified to use cu_$arg_(count ptr) when processing control arguments. 19* END HISTORY COMMENTS */ 20 21 22 instr_speed: proc; 23 24 /* " This program test the instructions speeds of several mixes of instructions. 25* 26* */ 27 /* Modified June 81 by J. Bongiovanni to get temp segment for impure code */ 28 29 30 /* */ 31 32 /* DECLARATIONS */ 33 34 dcl (successes, pf_aborts, nanos, ls_aborts, type, histi, bucketmin, bucketmax, pf, ls, maxs, bucket, count, nargs) fixed bin; 35 dcl arg_ptr ptr; 36 dcl arg_len fixed bin (21); 37 dcl arg char (arg_len) unaligned based (arg_ptr); 38 dcl long_report bit(1) unaligned; 39 dcl time fixed bin (71); 40 dcl time_total fixed bin (71); 41 dcl (mips, mips_total, mip_rate) float bin; 42 dcl hist (0:300) fixed bin; 43 dcl code fixed bin (35); 44 dcl error_table_$noarg external fixed bin(35); 45 dcl temp_p ptr; 46 dcl (fixed, float, lbound, hbound, max, min, null, divide) builtin; 47 dcl cu_$arg_count ext entry (fixed bin, fixed bin(35)); 48 dcl cu_$arg_ptr ext entry (fixed bin, ptr, fixed bin(21), fixed bin (35)); 49 dcl ioa_ entry options (variable); 50 dcl com_err_ entry options (variable); 51 dcl date_time_ entry (fixed bin (71), char (*) aligned); 52 dcl clock_ entry (fixed bin (71)); 53 dcl char_time char (24) aligned; 54 dcl test_speed entry (fixed bin, fixed bin (71), fixed bin, fixed bin, fixed bin, fixed bin, ptr); 55 dcl (get_temp_segment_, release_temp_segment_) entry (char (*), ptr, fixed bin (35)); 56 dcl name (15) char (32) aligned static init ( 57 "lda/sta - even/odd", 58 "lda/sta - odd/even", 59 "lda/lda/lda...", 60 "lda/sta - even/odd bit29", 61 "eppbp/spribp - even/odd", 62 "eppbp/spribp - odd/even", 63 "eppbp/spribp - even/odd indirect", 64 "eppbp/spribp - odd/even indirect", 65 "eppbp/spribp - even/odd bit29", 66 "eppbp/spribp - even/odd bit29ind", 67 "eppbp/spribp - odd/even bit29ind", 68 "random mix", 69 "lda 0,du...", 70 "nop 0,du...", 71 "lprpbp/sprpbp - even/odd bit29"); 72 dcl INDEX_FACTOR float bin int static options (constant) init (2e2); 73 dcl MAXHIST fixed bin int static options (constant) init (300); 74 dcl NUMPASSES fixed bin int static options (constant) init (100); 75 dcl MYNAME char (11) int static options (constant) init ("instr_speed"); 76 dcl cleanup condition; 77 78 /* */ 79 80 /* Get a temp segment for the impure code in test_speed to run */ 81 82 temp_p = null (); 83 on cleanup begin; 84 if temp_p ^= null () 85 then call release_temp_segment_ (MYNAME, temp_p, code); 86 end; 87 88 call get_temp_segment_ (MYNAME, temp_p, code); 89 if code^=0 then do; 90 call com_err_ (code, MYNAME, "Getting temp segment"); 91 return; 92 end; 93 /* validate control arguments */ 94 call cu_$arg_count (nargs, code); 95 if code ^= 0 then do; 96 call com_err_ (code, MYNAME); 97 return; 98 end; 99 call cu_$arg_ptr (1, arg_ptr, arg_len, code); 100 if code = error_table_$noarg then long_report = "0"b; 101 else if arg = "-lg" | arg = "-long" then long_report = "1"b; 102 else do; 103 call ioa_ ("instr_speed: Valid control arguments -long or -lg"); 104 return; 105 end; 106 107 108 /* call print_config; */ 109 call clock_ (time); 110 call date_time_ (time, char_time); 111 call ioa_ ("INSTRUCTION SPEED TEST -- ^a^/", char_time); 112 113 /* Now run the test for the 15 possible types of sequences */ 114 115 do type = lbound (name,1) to hbound (name, 1); 116 successes, 117 pf_aborts, 118 ls_aborts, 119 bucketmax = 0; /* initial for this case */ 120 hist = 0; 121 time_total = 0; 122 mips_total = 0e0; 123 bucketmin = MAXHIST; 124 125 do while (successes < NUMPASSES); /* loop until get 100 good runs */ 126 call test_speed (type, time, ls, maxs, pf, count, temp_p); /* run a test for this type */ 127 if pf > 0 then pf_aborts = pf_aborts + 1; /* took a page fault, skip this one */ 128 else if ls > 0 then ls_aborts = ls_aborts + 1; /* took a large sample (probable interrupt) */ 129 else do; 130 successes = successes + 1; /* another successful run */ 131 time_total = time_total + float (time); 132 mips = float (count) / float (time); /* get mips for this run */ 133 bucket = mips * INDEX_FACTOR; /* get the index into hist for this run */ 134 bucket = min (bucket, MAXHIST); /* watch out for overflow */ 135 bucketmax = max (bucketmax, bucket); /* calculate bounds of possible values for this type */ 136 bucketmin = min (bucketmin, bucket); /* .. */ 137 hist (bucket) = hist (bucket) + 1; /* fill in histogram */ 138 mips_total = mips_total + mips; /* keep running total for final ave */ 139 end; 140 end; 141 142 /* Now output the data for this type */ 143 144 call ioa_ ("^/* * * * * * * * * * * * * * * * * * * * * *^/"); 145 call ioa_ ("^/TEST ^d: (^a)", type, name (type)); 146 if long_report then do; 147 call ioa_ ("^/ HITS MIPS^/"); /* output header */ 148 do histi = bucketmin to bucketmax; /* loop through buckets that got hit */ 149 call ioa_ ("^5d ^5.3f", hist (histi), histi*5e-3); 150 end; 151 end; 152 mip_rate = mips_total/float (successes); /* calculate mip_rate */ 153 nanos = fixed (1e3/mip_rate); /* calculate the nanoseconds to do one instruction */ 154 call ioa_ ("^/MIPS AVE = ^5.3f, TIME AVE = ^d, ^d NANOSECONDS", mip_rate, divide (time_total, successes, 17, 0), nanos); 155 if pf_aborts+ls_aborts > 0 then call ioa_ ("PF = ^d, LS = ^d, CUTOFF = ^d", pf_aborts, ls_aborts, maxs); 156 157 end; 158 159 call release_temp_segment_ (MYNAME, temp_p, code); 160 temp_p = null(); 161 162 163 end; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/30/87 1323.6 instr_speed.pl1 >spec>install>1006>instr_speed.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. INDEX_FACTOR constant float bin(27) initial dcl 72 ref 133 MAXHIST constant fixed bin(17,0) initial dcl 73 ref 123 134 MYNAME 000000 constant char(11) initial unaligned dcl 75 set ref 84* 88* 90* 96* 159* NUMPASSES constant fixed bin(17,0) initial dcl 74 ref 125 arg based char unaligned dcl 37 ref 101 101 arg_len 000120 automatic fixed bin(21,0) dcl 36 set ref 99* 101 101 arg_ptr 000116 automatic pointer dcl 35 set ref 99* 101 101 bucket 000113 automatic fixed bin(17,0) dcl 34 set ref 133* 134* 134 135 136 137 137 bucketmax 000107 automatic fixed bin(17,0) dcl 34 set ref 116* 135* 135 148 bucketmin 000106 automatic fixed bin(17,0) dcl 34 set ref 123* 136* 136 148 char_time 000612 automatic char(24) dcl 53 set ref 110* 111* cleanup 000620 stack reference condition dcl 76 ref 83 clock_ 000214 constant entry external dcl 52 ref 109 code 000606 automatic fixed bin(35,0) dcl 43 set ref 84* 88* 89 90* 94* 95 96* 99* 100 159* com_err_ 000210 constant entry external dcl 50 ref 90 96 count 000114 automatic fixed bin(17,0) dcl 34 set ref 126* 132 cu_$arg_count 000202 constant entry external dcl 47 ref 94 cu_$arg_ptr 000204 constant entry external dcl 48 ref 99 date_time_ 000212 constant entry external dcl 51 ref 110 divide builtin function dcl 46 ref 154 154 error_table_$noarg 000200 external static fixed bin(35,0) dcl 44 ref 100 fixed builtin function dcl 46 ref 153 float builtin function dcl 46 ref 131 132 132 152 get_temp_segment_ 000220 constant entry external dcl 55 ref 88 hbound builtin function dcl 46 ref 115 hist 000131 automatic fixed bin(17,0) array dcl 42 set ref 120* 137* 137 149* histi 000105 automatic fixed bin(17,0) dcl 34 set ref 148* 149 149* ioa_ 000206 constant entry external dcl 49 ref 103 111 144 145 147 149 154 155 lbound builtin function dcl 46 ref 115 long_report 000121 automatic bit(1) unaligned dcl 38 set ref 100* 101* 146 ls 000111 automatic fixed bin(17,0) dcl 34 set ref 126* 128 ls_aborts 000103 automatic fixed bin(17,0) dcl 34 set ref 116* 128* 128 155 155* max builtin function dcl 46 ref 135 maxs 000112 automatic fixed bin(17,0) dcl 34 set ref 126* 155* min builtin function dcl 46 ref 134 136 mip_rate 000130 automatic float bin(27) dcl 41 set ref 152* 153 154* mips 000126 automatic float bin(27) dcl 41 set ref 132* 133 138 mips_total 000127 automatic float bin(27) dcl 41 set ref 122* 138* 138 152 name 000010 internal static char(32) initial array dcl 56 set ref 115 115 145* nanos 000102 automatic fixed bin(17,0) dcl 34 set ref 153* 154* nargs 000115 automatic fixed bin(17,0) dcl 34 set ref 94* null builtin function dcl 46 ref 82 84 160 pf 000110 automatic fixed bin(17,0) dcl 34 set ref 126* 127 pf_aborts 000101 automatic fixed bin(17,0) dcl 34 set ref 116* 127* 127 155 155* release_temp_segment_ 000222 constant entry external dcl 55 ref 84 159 successes 000100 automatic fixed bin(17,0) dcl 34 set ref 116* 125 130* 130 152 154 154 temp_p 000610 automatic pointer dcl 45 set ref 82* 84 84* 88* 126* 159* 160* test_speed 000216 constant entry external dcl 54 ref 126 time 000122 automatic fixed bin(71,0) dcl 39 set ref 109* 110* 126* 131 132 time_total 000124 automatic fixed bin(71,0) dcl 40 set ref 121* 131* 131 154 154 type 000104 automatic fixed bin(17,0) dcl 34 set ref 115* 126* 145* 145* NAME DECLARED BY EXPLICIT CONTEXT. instr_speed 000145 constant entry external dcl 22 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1204 1430 1047 1214 Length 1616 1047 224 151 134 170 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME instr_speed 474 external procedure is an external procedure. on unit on line 83 78 on unit STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 name instr_speed STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME instr_speed 000100 successes instr_speed 000101 pf_aborts instr_speed 000102 nanos instr_speed 000103 ls_aborts instr_speed 000104 type instr_speed 000105 histi instr_speed 000106 bucketmin instr_speed 000107 bucketmax instr_speed 000110 pf instr_speed 000111 ls instr_speed 000112 maxs instr_speed 000113 bucket instr_speed 000114 count instr_speed 000115 nargs instr_speed 000116 arg_ptr instr_speed 000120 arg_len instr_speed 000121 long_report instr_speed 000122 time instr_speed 000124 time_total instr_speed 000126 mips instr_speed 000127 mips_total instr_speed 000130 mip_rate instr_speed 000131 hist instr_speed 000606 code instr_speed 000610 temp_p instr_speed 000612 char_time instr_speed THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. fx1_to_fl2 call_ext_out_desc call_ext_out return_mac fl2_to_fx1 fl2_to_fx2 enable_op ext_entry int_entry divide_fx3 THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. clock_ com_err_ cu_$arg_count cu_$arg_ptr date_time_ get_temp_segment_ ioa_ release_temp_segment_ test_speed THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$noarg LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 22 000144 82 000152 83 000154 84 000170 86 000215 88 000216 89 000237 90 000241 91 000265 94 000266 95 000277 96 000301 97 000316 99 000317 100 000336 101 000344 103 000361 104 000374 109 000375 110 000403 111 000420 115 000440 116 000445 120 000451 121 000462 122 000464 123 000466 125 000470 126 000473 127 000516 128 000522 130 000526 131 000527 132 000541 133 000545 134 000550 135 000554 136 000560 137 000565 138 000567 140 000572 144 000573 145 000607 146 000640 147 000642 148 000661 149 000671 150 000723 152 000725 153 000731 154 000734 155 000770 157 001021 159 001023 160 001044 163 001046 ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved