COMPILATION LISTING OF SEGMENT meter_oc_log_ Compiled by: Multics PL/I Compiler, Release 28d, of October 4, 1983 Compiled at: Honeywell Multics Op. - System M Compiled on: 07/03/84 1116.0 mst Tue Options: optimize list 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 meter_oc_log_: procedure (arg_ptr, count, len) options (validate(wire_stack$wire_stack)); 12 13 14 /* This procedure is called to meter one of the three wired buffers used 15** by the operator's console software. These three buffers are: 16** 1. wired syserr log buffer 17** 2. operator console syserr write buffer 18** 3. operator console dim write buffer. 19** 20** Created by Bill Silver on 08/11/73 21**/ 22 23 24 25 /* PARAMETER DATA */ 26 27 dcl arg_ptr ptr, /* (I) Pointer to meter area we are to update. */ 28 count fixed bin, /* (I) Current number of entries in the buffer. */ 29 len fixed bin; /* (I) > 0 => num characters in message text. 30* * = 0 => caller deleting message. 31* * < 0 => buffer now full. */ 32 33 34 35 /* AUTOMATIC DATA */ 36 37 dcl elap_time fixed bin(71), /* Time since last metering done. */ 38 work_time fixed bin(71), 39 work_ave fixed bin(71), 40 work_len fixed bin(35); 41 42 43 44 /* EXTERNAL DATA */ 45 46 dcl clock_ entry returns (fixed bin(71)); 47 /* */ 1 1 /* Begin include file ... oc_log_meters.incl.pl1 1 2** 1 3** Created by Bill Silver on 08/11/73 1 4** This include file defines the meter areas used by the operator's console 1 5** software. These meter areas are used to keep statistics about the wired 1 6** buffers listed below. If this include files is changed the size of all 1 7** of these areas may also have to be changed. 1 8** 1 9** METER AREA WIRED BUFFER 1 10** ---------- ------------ 1 11** oc_data$sys_meters syserr write buffer 1 12** oc_data$dim_meters dim write buffer 1 13** wired_log_data$log_meters wired syserr log buffer 1 14**/ 1 15 1 16 dcl olm_ptr ptr; /* Pointer to an oc or log meter area. */ 1 17 1 18 1 19 dcl 1 olm based(olm_ptr) aligned, 1 20 1 21 2 totl_time fixed bin(71), /* Time elapsed since meters initialized. */ 1 22 2 last_time fixed bin(71), /* Time metering last performed. */ 1 23 2 full_time fixed bin(71), /* Total time buffer was full. */ 1 24 2 empt_time fixed bin(71), /* Total time buffer was empty. */ 1 25 1 26 2 tw_ave fixed bin(71), /* Time weighted average number of entries 1 27* * in the buffer. Actually this is just 1 28* * a total. To get the average just divide 1 29* * by olm.totl_time. */ 1 30 2 len_ave fixed bin(71), /* Average length of message texts. Actually 1 31* * this is just the total. To get the average 1 32* * just divide by olm.tot_num. */ 1 33 1 34 2 tot_num fixed bin, /* Total number of entries put into buffer. */ 1 35 2 max_num fixed bin, /* Maximum number of entries ever in buffer. */ 1 36 2 full_num fixed bin, /* Total number of times buffer was full. */ 1 37 2 full_flag bit(1); /* ON => buffer is now full. */ 1 38 1 39 1 40 /* End of include file ... oc_log_meters.incl.pl1 */ 48 49 /* */ 50 /* This procedure is called whenever the status of one of the three wired 51** buffers changes. It will update the statistics kept about these buffers. 52** The "len" parameter describes what type of operation is to be performed on 53** the buffer. The possible operations are: 54** len > 0 Entry added to buffer. 55** len = 0 Entry deleted from buffer. 56** len < 0 Entry not added to buffer because buffer is full. 57** 58** NOTE, in order for these statistics to be valid, this procedure must be called 59** BEFORE the status of the buffer is changed. 60** 61** NOTE, the meter area is assumed to be locked by the caller. 62**/ 63 64 65 olm_ptr = arg_ptr; 66 67 work_time = clock_(); /* Get current time. */ 68 elap_time = work_time - olm.last_time; 69 70 olm.totl_time = olm.totl_time + elap_time; 71 olm.last_time = work_time; 72 73 if olm.full_flag /* Was buffer full before this call? */ 74 then do; /* YES. */ 75 olm.full_time = olm.full_time + elap_time; 76 olm.full_flag = "0"b; /* Don't assume that it is still full. */ 77 end; 78 79 if count = 0 /* Is buffer now empty? */ 80 then olm.empt_time = olm.empt_time + elap_time; 81 82 olm.tw_ave = olm.tw_ave + (elap_time * count); 83 84 if len > 0 /* Was an entry added? */ 85 then do; /* YES. */ 86 olm.len_ave = olm.len_ave + len; 87 olm.tot_num = olm.tot_num + 1; 88 end; 89 90 if count > olm.max_num /* New maximum? */ 91 then olm.max_num = count; 92 93 if len < 0 /* Is buffer full NOW? */ 94 then do; /* YES. */ 95 olm.full_num = olm.full_num + 1; 96 olm.full_flag = "1"b; 97 end; 98 99 100 end meter_oc_log_; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 07/02/84 1136.3 meter_oc_log_.pl1 >dumps>old_dumps>hardcore>meter_oc_log_.pl1 48 1 07/02/74 1712.7 oc_log_meters.incl.pl1 >ldd>include>oc_log_meters.incl.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_ptr parameter pointer dcl 27 ref 11 65 clock_ 000012 constant entry external dcl 46 ref 67 count parameter fixed bin(17,0) dcl 27 ref 11 79 82 90 90 elap_time 000100 automatic fixed bin(71,0) dcl 37 set ref 68* 70 75 79 82 empt_time 6 based fixed bin(71,0) level 2 dcl 1-19 set ref 79* 79 full_flag 17 based bit(1) level 2 dcl 1-19 set ref 73 76* 96* full_num 16 based fixed bin(17,0) level 2 dcl 1-19 set ref 95* 95 full_time 4 based fixed bin(71,0) level 2 dcl 1-19 set ref 75* 75 last_time 2 based fixed bin(71,0) level 2 dcl 1-19 set ref 68 71* len parameter fixed bin(17,0) dcl 27 ref 11 84 86 93 len_ave 12 based fixed bin(71,0) level 2 dcl 1-19 set ref 86* 86 max_num 15 based fixed bin(17,0) level 2 dcl 1-19 set ref 90 90* olm based structure level 1 dcl 1-19 olm_ptr 000104 automatic pointer dcl 1-16 set ref 65* 68 70 70 71 73 75 75 76 79 79 82 82 86 86 87 87 90 90 95 95 96 tot_num 14 based fixed bin(17,0) level 2 dcl 1-19 set ref 87* 87 totl_time based fixed bin(71,0) level 2 dcl 1-19 set ref 70* 70 tw_ave 10 based fixed bin(71,0) level 2 dcl 1-19 set ref 82* 82 work_time 000102 automatic fixed bin(71,0) dcl 37 set ref 67* 68 71 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. work_ave automatic fixed bin(71,0) dcl 37 work_len automatic fixed bin(35,0) dcl 37 NAMES DECLARED BY EXPLICIT CONTEXT. meter_oc_log_ 000007 constant entry external dcl 11 wire_stack$wire_stack 000010 constant entry external ref 11 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 140 154 100 150 Length 342 100 14 151 40 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME meter_oc_log_ 74 external procedure is an external procedure. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME meter_oc_log_ 000100 elap_time meter_oc_log_ 000102 work_time meter_oc_log_ 000104 olm_ptr meter_oc_log_ THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. call_ext_out return mpfx2 val_entry THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. clock_ wire_stack$wire_stack NO EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. CONSTANTS 000000 aa 410000000107 000001 aa 404000000021 000002 aa 464000000000 BEGIN PROCEDURE meter_oc_log_ ENTRY TO meter_oc_log_ STATEMENT 1 ON LINE 11 meter_oc_log_: procedure (arg_ptr, count, len) options (validate(wire_stack$wire_stack)); 000003 at 000003000002 000004 tt 000001000001 000005 ta 000003000000 000006 da 000034300000 000007 aa 000120 6270 00 eax7 80 000010 aa 7 00034 3521 20 epp2 pr7|28,* 000011 aa 2 01051 2721 00 tsp2 pr2|553 val_entry 000012 aa 000006000000 000013 aa 000000000000 000014 2a 000010 0110 07 nop 8,dl STATEMENT 1 ON LINE 65 olm_ptr = arg_ptr; 000015 aa 6 00032 3735 20 epp7 pr6|26,* 000016 aa 7 00002 3715 20 epp5 pr7|2,* arg_ptr 000017 aa 5 00000 3715 20 epp5 pr5|0,* arg_ptr 000020 aa 6 00104 6515 00 spri5 pr6|68 olm_ptr STATEMENT 1 ON LINE 67 work_time = clock_(); 000021 aa 6 00102 3521 00 epp2 pr6|66 work_time 000022 aa 6 00110 2521 00 spri2 pr6|72 000023 aa 6 00106 6211 00 eax1 pr6|70 000024 aa 004000 4310 07 fld 2048,dl 000025 la 4 00012 3521 20 epp2 pr4|10,* clock_ 000026 aa 0 00623 7001 00 tsx0 pr0|403 call_ext_out STATEMENT 1 ON LINE 68 elap_time = work_time - olm.last_time; 000027 aa 6 00102 2371 00 ldaq pr6|66 work_time 000030 aa 6 00104 3735 20 epp7 pr6|68,* olm_ptr 000031 aa 7 00002 1771 00 sbaq pr7|2 olm.last_time 000032 aa 6 00100 7571 00 staq pr6|64 elap_time STATEMENT 1 ON LINE 70 olm.totl_time = olm.totl_time + elap_time; 000033 aa 7 00000 0771 00 adaq pr7|0 olm.totl_time 000034 aa 7 00000 7571 00 staq pr7|0 olm.totl_time STATEMENT 1 ON LINE 71 olm.last_time = work_time; 000035 aa 6 00102 2371 00 ldaq pr6|66 work_time 000036 aa 7 00002 7571 00 staq pr7|2 olm.last_time STATEMENT 1 ON LINE 73 if olm.full_flag /* Was buffer full before this call? */ then do; 000037 aa 7 00017 2351 00 lda pr7|15 olm.full_flag 000040 aa 000005 6000 04 tze 5,ic 000045 STATEMENT 1 ON LINE 75 olm.full_time = olm.full_time + elap_time; 000041 aa 7 00004 2371 00 ldaq pr7|4 olm.full_time 000042 aa 6 00100 0771 00 adaq pr6|64 elap_time 000043 aa 7 00004 7571 00 staq pr7|4 olm.full_time STATEMENT 1 ON LINE 76 olm.full_flag = "0"b; 000044 aa 7 00017 4501 00 stz pr7|15 olm.full_flag STATEMENT 1 ON LINE 77 end; STATEMENT 1 ON LINE 79 if count = 0 /* Is buffer now empty? */ then olm.empt_time = olm.empt_time + elap_time; 000045 aa 6 00032 3715 20 epp5 pr6|26,* 000046 aa 5 00004 2361 20 ldq pr5|4,* count 000047 aa 000004 6010 04 tnz 4,ic 000053 000050 aa 7 00006 2371 00 ldaq pr7|6 olm.empt_time 000051 aa 6 00100 0771 00 adaq pr6|64 elap_time 000052 aa 7 00006 7571 00 staq pr7|6 olm.empt_time STATEMENT 1 ON LINE 82 olm.tw_ave = olm.tw_ave + (elap_time * count); 000053 aa 5 00004 2361 20 ldq pr5|4,* count 000054 aa 6 00100 3521 00 epp2 pr6|64 elap_time 000055 aa 0 00671 7001 00 tsx0 pr0|441 mpfx2 000056 aa 7 00010 0771 00 adaq pr7|8 olm.tw_ave 000057 aa 7 00010 7571 00 staq pr7|8 olm.tw_ave STATEMENT 1 ON LINE 84 if len > 0 /* Was an entry added? */ then do; 000060 aa 5 00006 2361 20 ldq pr5|6,* len 000061 aa 000005 6044 04 tmoz 5,ic 000066 STATEMENT 1 ON LINE 86 olm.len_ave = olm.len_ave + len; 000062 aa 7 00012 2371 00 ldaq pr7|10 olm.len_ave 000063 aa 5 00006 0331 20 adl pr5|6,* len 000064 aa 7 00012 7571 00 staq pr7|10 olm.len_ave STATEMENT 1 ON LINE 87 olm.tot_num = olm.tot_num + 1; 000065 aa 7 00014 0541 00 aos pr7|12 olm.tot_num STATEMENT 1 ON LINE 88 end; STATEMENT 1 ON LINE 90 if count > olm.max_num /* New maximum? */ then olm.max_num = count; 000066 aa 5 00004 2361 20 ldq pr5|4,* count 000067 aa 7 00015 1161 00 cmpq pr7|13 olm.max_num 000070 aa 000002 6044 04 tmoz 2,ic 000072 000071 aa 7 00015 7561 00 stq pr7|13 olm.max_num STATEMENT 1 ON LINE 93 if len < 0 /* Is buffer full NOW? */ then do; 000072 aa 5 00006 2361 20 ldq pr5|6,* len 000073 aa 000004 6050 04 tpl 4,ic 000077 STATEMENT 1 ON LINE 95 olm.full_num = olm.full_num + 1; 000074 aa 7 00016 0541 00 aos pr7|14 olm.full_num STATEMENT 1 ON LINE 96 olm.full_flag = "1"b; 000075 aa 400000 2350 03 lda 131072,du 000076 aa 7 00017 7551 00 sta pr7|15 olm.full_flag STATEMENT 1 ON LINE 97 end; STATEMENT 1 ON LINE 100 end meter_oc_log_; 000077 aa 0 00631 7101 00 tra pr0|409 return END PROCEDURE meter_oc_log_ ----------------------------------------------------------- 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