COMPILATION LISTING OF SEGMENT link_meters Compiled by: Multics PL/I Compiler, Release 27d, of October 11, 1982 Compiled at: Honeywell LISD Phoenix, System M Compiled on: 11/15/82 1718.5 mst Mon Options: optimize map 1 /* *********************************************************** 2* * * 3* * Copyright, (C) Honeywell Information Systems Inc., 1982 * 4* * * 5* * Copyright (c) 1972 by Massachusetts Institute of * 6* * Technology and Honeywell Information Systems, Inc. * 7* * * 8* *********************************************************** */ 9 10 11 /* link_meters 12* Program to print per-process meters on linkage fault 13* processing, which are maintained in the pds by 14* link_snap. 15**/ 16 17 /* Updated by Alan Bier - March 1974. */ 18 /* Cleaned up substantially by J. Bongiovanni - December 80 */ 19 20 link_meters: lkm: proc; 21 22 /* Automatic */ 23 24 dcl argl fixed bin (21); 25 dcl argp ptr; 26 dcl cnt fixed bin (35); 27 dcl code fixed bin (35); 28 dcl cur_buf_ptrs (3) ptr; 29 dcl formatted_meter_time char(10); 30 dcl i fixed bin; 31 dcl meter_time fixed bin (71); 32 dcl nargs fixed bin; 33 dcl prev_buf_ptrs (3) ptr; 34 dcl repsw bit (1) init ("0"b); 35 dcl rsw bit (1) init ("0"b); 36 dcl tcnt fixed bin (35); 37 dcl total_count fixed bin (35); 38 dcl total_page_faults fixed bin (35); 39 dcl total_time fixed bin (35); 40 dcl ttim fixed bin (35); 41 42 /* Static */ 43 44 dcl our_name char (11) init ("link_meters") int static options (constant); 45 dcl slot (0:3) char (10) internal static 46 init ("<25", "25-50", "50-75", ">75") options (constant); 47 dcl unique fixed bin int static init (0); 48 49 /* Based */ 50 51 dcl arg char (argl) based (argp); 52 dcl count (0:3) fixed bin (17) based (cur_buf_ptrs (1)); 53 dcl o_count (0:3) fixed bin (17) based (prev_buf_ptrs (1)); 54 dcl o_page_faults (0:3) fixed bin (35) based (prev_buf_ptrs (3)); 55 dcl o_time (0:3) fixed bin (35) based (prev_buf_ptrs (2)); 56 dcl page_faults (0:3) fixed bin (35) based (cur_buf_ptrs (3)); 57 dcl time (0:3) fixed bin (35) based (cur_buf_ptrs (2)); 58 59 /* External */ 60 61 dcl error_table_$badopt fixed bin (35) external; 62 63 /* Entry */ 64 65 dcl com_err_ entry options (variable); 66 dcl cu_$arg_count entry (fixed bin); 67 dcl cu_$arg_ptr entry (fixed bin, ptr, fixed bin(21), fixed bin(35)); 68 dcl ioa_ entry options (variable); 69 dcl metering_util_$define_regions entry options (variable); 70 dcl metering_util_$fill_buffers entry (fixed bin, fixed bin (71), char (*), 71 (*) ptr, (*) ptr, fixed bin (35)); 72 dcl metering_util_$reset entry (fixed bin, fixed bin (35)); 73 74 /* Builtin */ 75 76 dcl float builtin; 77 78 /* */ 79 call cu_$arg_count (nargs); 80 81 do i = 1 to nargs; 82 call cu_$arg_ptr (i, argp, argl, code); 83 if arg = "-reset" | arg = "-rs" then rsw = "1"b; 84 else if arg = "-report_reset" | arg = "-rr" then repsw, rsw = "1"b; 85 else do; 86 call com_err_ (error_table_$badopt, our_name, arg); 87 return; 88 end; 89 end; 90 91 if ^rsw then repsw = "1"b; /* report is the default */ 92 93 if unique=0 then do; /* not initialized yet */ 94 call metering_util_$define_regions (unique, code, 95 "pds", "link_meters_bins", 4, 96 "pds", "link_meters_times", 4, 97 "pds", "link_meters_pgwaits", 4); 98 if code^=0 then do; 99 init_err: call com_err_ (code, our_name, "Initializing"); 100 return; 101 end; 102 end; 103 104 if repsw then do; /* report option */ 105 call ioa_ ("^/Linkage Meters:^/"); 106 call metering_util_$fill_buffers (unique, meter_time, formatted_meter_time, 107 cur_buf_ptrs, prev_buf_ptrs, code); 108 if code^=0 then do; 109 call com_err_ (code, our_name, "Filling buffers."); 110 return; 111 end; 112 113 total_time = 0; 114 total_count = 0; 115 total_page_faults = 0; 116 do i = 0 to 3; 117 total_time = total_time + time (i) - o_time (i); 118 total_count = total_count + count (i) - o_count (i); 119 total_page_faults = total_page_faults + page_faults (i) 120 - o_page_faults (i); 121 end; 122 123 if total_time = 0 /* set ttim, tcmt to avoid zerodivide problems */ 124 then ttim = 1; 125 else ttim = total_time; 126 if total_count = 0 127 then tcnt = 1; 128 else tcnt = total_count; 129 130 call ioa_ ("^/slot calls avg time avg pf tot time % time^/"); 131 132 do i = 0 to 3; 133 /* Print out one output line for each slot */ 134 cnt = count (i) - o_count (i); /* Necessary to correct for zerodivide condition */ 135 if cnt = 0 then cnt = 1; 136 call ioa_ ("^8a^5d^10.3f^8.1f^10.3f^8.1f", slot (i), count (i)-o_count (i), 137 ((time (i)-o_time (i))*1.0e-3)/cnt, float (page_faults (i)-o_page_faults (i))/cnt, 138 (time (i)-o_time (i))*1.0e-6, ((time (i)-o_time (i))*1.0e2)/ ttim); 139 end; 140 141 /* Print out totals on all relevant figures */ 142 call ioa_ (" ----- -------- ----- -------"); 143 call ioa_ ("Total ^6d^10.3f^8.1f^10.3f^/", total_count, 144 total_time*1.0e-3/tcnt, float (total_page_faults)/tcnt, 145 total_time*1.0e-6); 146 end; 147 148 149 reset: if rsw then call metering_util_$reset (unique, code); 150 151 return; 152 end link_meters; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 11/15/82 1512.5 link_meters.pl1 >dumps>old>recomp>link_meters.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. arg based char unaligned dcl 51 set ref 83 83 84 84 86* argl 000100 automatic fixed bin(21,0) dcl 24 set ref 82* 83 83 84 84 86 86 argp 000102 automatic pointer dcl 25 set ref 82* 83 83 84 84 86 cnt 000104 automatic fixed bin(35,0) dcl 26 set ref 134* 135 135* 136 136 code 000105 automatic fixed bin(35,0) dcl 27 set ref 82* 94* 98 99* 106* 108 109* 149* com_err_ 000014 constant entry external dcl 65 ref 86 99 109 count based fixed bin(17,0) array dcl 52 ref 118 134 136 cu_$arg_count 000016 constant entry external dcl 66 ref 79 cu_$arg_ptr 000020 constant entry external dcl 67 ref 82 cur_buf_ptrs 000106 automatic pointer array dcl 28 set ref 106* 117 118 119 134 136 136 136 136 136 error_table_$badopt 000012 external static fixed bin(35,0) dcl 61 set ref 86* float builtin function dcl 76 ref 136 143 formatted_meter_time 000114 automatic char(10) unaligned dcl 29 set ref 106* i 000117 automatic fixed bin(17,0) dcl 30 set ref 81* 82* 116* 117 117 118 118 119 119* 132* 134 134 136 136 136 136 136 136 136 136 136 136 136* ioa_ 000022 constant entry external dcl 68 ref 105 130 136 142 143 meter_time 000120 automatic fixed bin(71,0) dcl 31 set ref 106* metering_util_$define_regions 000024 constant entry external dcl 69 ref 94 metering_util_$fill_buffers 000026 constant entry external dcl 70 ref 106 metering_util_$reset 000030 constant entry external dcl 72 ref 149 nargs 000122 automatic fixed bin(17,0) dcl 32 set ref 79* 81 o_count based fixed bin(17,0) array dcl 53 ref 118 134 136 o_page_faults based fixed bin(35,0) array dcl 54 ref 119 136 o_time based fixed bin(35,0) array dcl 55 ref 117 136 136 136 our_name 000012 constant char(11) initial unaligned dcl 44 set ref 86* 99* 109* page_faults based fixed bin(35,0) array dcl 56 ref 119 136 prev_buf_ptrs 000124 automatic pointer array dcl 33 set ref 106* 117 118 119 134 136 136 136 136 136 repsw 000132 automatic bit(1) initial unaligned dcl 34 set ref 34* 84* 91* 104 rsw 000133 automatic bit(1) initial unaligned dcl 35 set ref 35* 83* 84* 91 149 slot 000000 constant char(10) initial array unaligned dcl 45 set ref 136* tcnt 000134 automatic fixed bin(35,0) dcl 36 set ref 126* 128* 143 143 time based fixed bin(35,0) array dcl 57 ref 117 136 136 136 total_count 000135 automatic fixed bin(35,0) dcl 37 set ref 114* 118* 118 126 128 143* total_page_faults 000136 automatic fixed bin(35,0) dcl 38 set ref 115* 119* 119 143 total_time 000137 automatic fixed bin(35,0) dcl 39 set ref 113* 117* 117 123 125 143 143 ttim 000140 automatic fixed bin(35,0) dcl 40 set ref 123* 125* 136 unique 000010 internal static fixed bin(17,0) initial dcl 47 set ref 93 94* 106* 149* NAMES DECLARED BY EXPLICIT CONTEXT. init_err 000441 constant label dcl 99 link_meters 000200 constant entry external dcl 20 lkm 000170 constant entry external dcl 20 reset 001076 constant label dcl 149 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 1232 1264 1112 1242 Length 1450 1112 32 147 117 2 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME lkm 190 external procedure is an external procedure. STORAGE FOR INTERNAL STATIC VARIABLES. LOC IDENTIFIER BLOCK NAME 000010 unique lkm STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME lkm 000100 argl lkm 000102 argp lkm 000104 cnt lkm 000105 code lkm 000106 cur_buf_ptrs lkm 000114 formatted_meter_time lkm 000117 i lkm 000120 meter_time lkm 000122 nargs lkm 000124 prev_buf_ptrs lkm 000132 repsw lkm 000133 rsw lkm 000134 tcnt lkm 000135 total_count lkm 000136 total_page_faults lkm 000137 total_time lkm 000140 ttim lkm THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. fx1_to_fl2 call_ext_out_desc call_ext_out return ext_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. com_err_ cu_$arg_count cu_$arg_ptr ioa_ metering_util_$define_regions metering_util_$fill_buffers metering_util_$reset THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. error_table_$badopt LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 34 000163 35 000164 20 000167 79 000206 81 000215 82 000224 83 000241 84 000256 86 000272 87 000316 89 000317 91 000321 93 000325 94 000330 98 000437 99 000441 100 000466 104 000467 105 000471 106 000505 108 000541 109 000543 110 000572 113 000573 114 000574 115 000575 116 000576 117 000602 118 000612 119 000621 121 000630 123 000632 125 000637 126 000640 128 000645 130 000646 132 000662 134 000666 135 000672 136 000675 139 001006 142 001010 143 001024 149 001076 151 001111 ----------------------------------------------------------- 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