
                               					20-May-1983 10:19:00	VAX-11 FORTRAN V3.2-37              Page   1
								10-May-1983 10:14:08	CAD$VOLSET:[GARY.STATS.SOURCE]STATLOCK.FOR;7

0001    !
0002    !			  COPYRIGHT (c) 1982 BY
0003    !	      MOSTEK CORPORATION, CARROLLTON TX
0004    !
0005    ! This software is furnished under a license and may be used and  copied
0006    ! only  in  accordance  with  the  terms  of  such  license and with the
0007    ! inclusion of the above copyright notice.  This software or  any  other
0008    ! copies  thereof may not be provided or otherwise made available to any
0009    ! other person.  No title to and ownership of  the  software  is  hereby
0010    ! transferred.
0011    !
0012    ! The information in this software is subject to change  without  notice
0013    ! and  should  not  be  construed  as  a commitment by MOSTEK
0014    ! CORPORATION.
0015    !
0016    ! MOSTEK assumes no responsibility for the use or  reliability  of  its
0017    ! software on equipment which is not supplied by MOSTEK.
0018    !
0019     
0020    !++
0021    ! FACILITY:
0022    !   MOSTEK CORPORATION
0023    !
0024    ! ABSTRACT: STATLOCK gathers the ENQ/DEQ info that is kept by VMS.
0025    !   
0026    !
0027    ! ENVIRONMENT: VAX VMS unprivileged
0028    !   
0029    !
0030    ! AUTHOR: Gary Smith, CREATION DATE: 8/18/1982
0031    !
0032    ! MODIFIED BY:
0033    !
0034    !--
0035    !
0036    ! TABLE OF CONTENTS:
0037    !
0038    !
0039    ! INCLUDE FILES: mousesubs.for
0040    !                defrec.for
0041    !
0042    !
0043    ! MACROS: none
0044    !
0045    !
0046    ! EQUATED SYMBOLS: see mousesubs.for
0047    !
0048    !
0049    ! EXTERNAL REFERENCES:
0050    !
0051    !          PMS$GL_ENQNEW   -> New ENQ's
0052    !          PMS$GL_ENQWAIT  -> ENQ's waiting to complete
0053    !          PMS$GL_DEQ      -> DEQ's
0054    !          PMS$GL_DLCKFND  -> DEQ's locked to find
0055    !          PMS$GL_DLCKSRCH -> DEQ's locked to search
0056    !          PMS$GL_ENQCVT   -> Converted ENQ
0057    !          PMS$GL_ENQNOTQD -> ENQ not queued

                               					20-May-1983 10:19:00	VAX-11 FORTRAN V3.2-37              Page   2
								10-May-1983 10:14:08	CAD$VOLSET:[GARY.STATS.SOURCE]STATLOCK.FOR;7

0058     
0059    !++
0060    ! FUNCTIONAL DESCRIPTION: ENQ/DEQ is now an integral part of VMS with 3.0
0061    !                         and thus the OS keeps stats on it. STATLOCK gathers
0062    !                         these stats with the aid of ML$L_PEEK. These are
0063    !                         kept as a difference measurement.
0064    !
0065    !
0066    ! FORMAL PARAMETERS: none
0067    !
0068    !
0069    !
0070    ! IMPLICIT INPUTS: none
0071    !
0072    !
0073    !
0074    ! IMPLICIT OUTPUTS: lock_modes
0075    !
0076    !
0077    !
0078    ! ROUTINE VALUE and
0079    ! COMPLETION CODES: none
0080    !
0081    !
0082    !
0083    ! SIDE EFFECTS: none to date
0084    !
0085    !
0086    !
0087    !--
0088              SUBROUTINE STATLOCK
0089     
0090              include 'mousesubs.for'
0293              include 'defrec.for'
0395     
0396              external PMS$GL_ENQNEW   
0397              external PMS$GL_ENQWAIT  
0398              external PMS$GL_DEQ      
0399              external PMS$GL_DLCKFND  
0400              external PMS$GL_DLCKSRCH 
0401              external PMS$GL_ENQCVT   
0402              external PMS$GL_ENQNOTQD 
0403     
0404              external ML$L_PEEK
0405     
0406              integer  ML$L_PEEK
0407              integer  last(lock_size), temp
0408     
0409    !++
0410    ! Gather up the ENQ/DEQ stats
0411    !--
0412     
0413              rec_lock_modes(enqnew   ) = 
0414         .                    ML$L_PEEK( %LOC( PMS$GL_ENQNEW ) )
0415              rec_lock_modes(enqwait  ) = 
0416         .                    ML$L_PEEK( %LOC( PMS$GL_ENQWAIT ) )
0417              rec_lock_modes(deq      ) = 

STATLOCK                       					20-May-1983 10:19:00	VAX-11 FORTRAN V3.2-37              Page   3
								10-May-1983 10:14:08	CAD$VOLSET:[GARY.STATS.SOURCE]STATLOCK.FOR;7

0418         .                    ML$L_PEEK( %LOC( PMS$GL_DEQ ) )
0419              rec_lock_modes(dlckfnd  ) = 
0420         .                    ML$L_PEEK( %LOC( PMS$GL_DLCKFND  ) )
0421              rec_lock_modes(dlcksrch ) = 
0422         .                    ML$L_PEEK( %LOC( PMS$GL_DLCKSRCH ) )
0423              rec_lock_modes(enqcvt   ) = 
0424         .                    ML$L_PEEK( %LOC( PMS$GL_ENQCVT   ) )
0425              rec_lock_modes(enqnotqd ) = 
0426         .                    ML$L_PEEK( %LOC( PMS$GL_ENQNOTQD ) )
0427     
0428    !++
0429    ! Compute the delta from the last time
0430    !--
0431     
0432              do i = 1, lock_size
0433                   temp = rec_lock_modes(i)
0434                   rec_lock_modes(i) = rec_lock_modes(i) - last(i)
0435                   last(i) = temp
0436              end do
0437     
0438              return
0439              end




PROGRAM SECTIONS

    Name				 Bytes   Attributes

  0 $CODE                                  250   PIC CON REL LCL   SHR   EXE   RD NOWRT LONG
  2 $LOCAL                                  44   PIC CON REL LCL NOSHR NOEXE   RD   WRT LONG
  3 REC_COMMON                             348   PIC OVR REL GBL   SHR NOEXE   RD   WRT LONG

    Total Space Allocated                  642


ENTRY POINTS

    Address  Type  Name                                        References

  0-00000000       STATLOCK                                       88     


VARIABLES

    Address  Type  Name                            Attributes  References

  2-00000020  I*4  I                                             432=      433       434(3)    435     
  3-00000108  I*4  REC_RESPONSE                    COMM EQUIV    296       353     
  2-0000001C  I*4  TEMP                                          407       433=      435     

STATLOCK                       					20-May-1983 10:19:00	VAX-11 FORTRAN V3.2-37              Page   4
								10-May-1983 10:14:08	CAD$VOLSET:[GARY.STATS.SOURCE]STATLOCK.FOR;7

ARRAYS

    Address  Type  Name                            Attributes        Bytes  Dimensions       References

  2-00000000  I*4  LAST                                                28  (7)                 407       434       435=    
  3-00000000  I*4  REC_CPU_MODES                   COMM EQUIV          36  (9)                 298       310     
  3-00000024  I*4  REC_FCP                         COMM EQUIV          20  (5)                 304       317     
  3-00000120  I*4  REC_LOCK_MODES                  COMM EQUIV          28  (7)                 306       372       413=    
											       415=      417=      419=    
											       421=      423=      425=    
											       433       434(2)= 
  3-00000080  I*4  REC_MEM_MODES                   COMM EQUIV           8  (2)                 299       322     

  3-00000038  I*4  REC_MISC                        COMM EQUIV          72  (18)                301       319     
  3-0000010C  I*4  REC_NET_MODES                   COMM EQUIV          20  (5)                 305       362     
  3-00000088  I*4  REC_PGFLT                       COMM EQUIV          28  (7)                 303       326     
  3-0000013C  I*4  REC_POOL_MODES                  COMM EQUIV          32  (8)                 307       383     
  3-000000A4  I*4  REC_SCH_STATE                   COMM EQUIV          56  (14)                302       331     

  3-000000DC  I*4  REC_SWAP                        COMM EQUIV          36  (9)                 300       337     
  3-00000100  I*4  REC_TIME                        COMM EQUIV           8  (2)                 297       344     
  3-00000000  I*4  STATS_REC                       COMM EQUIV         348  (87)                294       308       310     
											       317       319       322     
											       326       331       337     
											       344       353       362     
											       372       383     


PARAMETER CONSTANTS

  Type  Name                                                   References

   I*2  ARRLOCPK                                                 237#    
   I*2  ARRTRAPK                                                 238#    
   CHAR ASCII_DELTA_TIME                                          95        96#    
   I*2  BIGHOLE                                                  271#    
   I*2  BJOBCNT                                                  127#    

   I*2  BUFIO                                                    148#    
   I*2  CEF                                                      194#    
   I*2  COLPG                                                    192#    
   I*2  COM                                                      203#    
   I*2  COMO                                                     204#    

   I*2  COMPAT                                                   125#    
   I*2  CPU_SIZE                                                 130#      287       298       317       319       322     
							         326       331       337       344       353       362     
							         372       383     
   I*2  CUR                                                      205#    
   I*2  DEPLOCPK                                                 239#    
   I*2  DEQ                                                      253#      417     

   I*2  DIRHIT                                                   157#    
   I*2  DIRIO                                                    147#    
   I*2  DIRMISS                                                  158#    
   I*2  DLCKFND                                                  254#      419     
   I*2  DLCKSRCH                                                 255#      421     

STATLOCK                       					20-May-1983 10:19:00	VAX-11 FORTRAN V3.2-37              Page   5
								10-May-1983 10:14:08	CAD$VOLSET:[GARY.STATS.SOURCE]STATLOCK.FOR;7


   I*2  DZROFLTS                                                 179#    
   I*2  ENQCVT                                                   256#      423     
   I*2  ENQNEW                                                   251#      413     
   I*2  ENQNOTQD                                                 257#      425     
   I*2  ENQWAIT                                                  252#      415     

   I*2  EXEC                                                     122#    
   I*2  EXTHIT                                                   159#    
   I*2  EXTMISS                                                  160#    
   I*2  FAULTS                                                   180#    
   I*2  FCP_CACHE                                                137#    

   I*2  FCP_CALLS                                                136#    
   I*2  FCP_CPU                                                  138#    
   I*2  FCP_READ                                                 139#    
   I*2  FCP_SIZE                                                 142#      287       304       319       322       326     
							         331       337       344       353       362       372     
							         383     
   I*2  FCP_WRITE                                                140#    

   I*2  FIDHIT                                                   161#    
   I*2  FIDMISS                                                  162#    
   I*2  FPG                                                      202#    
   I*2  FREECNT                                                  171#    
   I*2  GETDVI_EF                                                110#    

   I*2  HIB                                                      198#    
   I*2  HIBO                                                     199#    
   I*2  HISWPCNT                                                 217#    
   I*2  HIT                                                      154#    
   I*2  HOLECNT                                                  270#    

   I*2  HOLESUM                                                  274#    
   I*2  HOSWPCNT                                                 216#    
   I*2  IDLE                                                     126#    
   I*2  IJOBCNT                                                  128#    
   I*2  INT                                                      124#    

   I*2  IRPCNT                                                   269#    
   I*2  ISPAGCNT                                                 212#    
   I*2  ISWPCNT                                                  213#    
   I*2  KERNEL                                                   120#    
   I*2  KEY_SIZE                                                 116#    

   I*2  LEF                                                      196#    
   I*2  LEFO                                                     197#    
   I*2  LOCK_SIZE                                                262#      287       306       383       407       432     
   I*2  LOGNAM                                                   149#    
   I*2  LRPCNT                                                   275#    

   I*2  MBREADS                                                  150#    
   I*2  MBWRITES                                                 151#    
   I*2  MEM_SIZE                                                 174#      287       299       326       331       337     
							         344       353       362       372       383     
   I*2  MFYCNT                                                   172#    
   I*2  MISC_SIZE                                                166#      287       301       322       326       331     

STATLOCK                       					20-May-1983 10:19:00	VAX-11 FORTRAN V3.2-37              Page   6
								10-May-1983 10:14:08	CAD$VOLSET:[GARY.STATS.SOURCE]STATLOCK.FOR;7

							         337       344       353       362       372       383     

   I*2  MWAIT                                                    193#    
   I*2  NET_SIZE                                                 246#      287       305       372       383     
   I*2  NUM_MODES                                                131#    
   I*2  OPEN                                                     156#    
   I*2  OPENS                                                    155#    

   I*2  OSWPCNT                                                  215#    
   I*2  PFW                                                      195#    
   I*2  PGFLT_SIZE                                               187#      287       303       331       337       344     
							         353       362       372       383     
   I*2  POOL_SIZE                                                282#      287       307     
   I*2  PREADIO                                                  181#    

   I*2  PREADS                                                   183#    
   I*2  PROCCNT                                                  214#    
   I*2  PWRITES                                                  184#    
   I*2  PWRITIO                                                  182#    
   I*2  QUOHIT                                                   163#    

   I*2  QUOMISS                                                  164#    
   I*2  RCVBUFFL                                                 240#    
   I*2  RDFLTS                                                   185#    
   I*2  REC_SIZE                                                 287#      308     
   I*2  RES                                                      232#    

   I*2  RESPONSE_SIZE                                            231#      287       362       372       383     
   I*2  SCH_SIZE                                                 207#      287       302       337       344       353     
							         362       372       383     
   I*2  SMALLCNT                                                 273#    
   I*2  SMALLHOLE                                                272#    
   I*2  SPLIT                                                    153#    

   I*2  SRPCNT                                                   276#    
   CHAR STANDARD_NEST_FILE                                       102       103#    
   I*2  SUPER                                                    121#    
   I*2  SUSP                                                     200#    
   I*2  SUSPO                                                    201#    

   I*2  SWAP_SIZE                                                219#      287       300       344       353       362     
							         372       383     
   I*2  SWAP_SPARES                                              220#    
   I*2  TIME_SIZE                                                225#      287       297       353       362       372     
							         383     
   I*2  TRCNGLOS                                                 241#    
   I*2  TURN                                                     152#    

   I*2  USER                                                     123#    
   I*2  WAIT_EF                                                  109#    

STATLOCK                       					20-May-1983 10:19:00	VAX-11 FORTRAN V3.2-37              Page   7
								10-May-1983 10:14:08	CAD$VOLSET:[GARY.STATS.SOURCE]STATLOCK.FOR;7

FUNCTIONS AND SUBROUTINES REFERENCED

  Type  Name                                                   References

   I*4  ML$L_PEEK                                                404       406       413       415       417       419     
							         421       423       425     
        PMS$GL_DEQ                                               398       417     
        PMS$GL_DLCKFND                                           399       419     
        PMS$GL_DLCKSRCH                                          400       421     
        PMS$GL_ENQCVT                                            401       423     

        PMS$GL_ENQNEW                                            396       413     
        PMS$GL_ENQNOTQD                                          402       425     
        PMS$GL_ENQWAIT                                           397       415     


  +----------------------------------------------+
  |           KEY TO REFERENCE FLAGS             |
  |   =   - Value Modified                       |
  |   #   - Defining Reference                   |
  |   A   - Actual Argument, possibly modified   |
  |   D   - Data Initialization                  |
  |  (n)  - Number of occurrences on line        |
  +----------------------------------------------+



COMMAND QUALIFIERS

  FORTRAN /DEBUG/OBJECT=OBJ:STATLOCK/LIST=LIS:STATLOCK/CONT=99/CROSS/NOOPT SRC:STATLOCK

  /CHECK=(NOBOUNDS,OVERFLOW,NOUNDERFLOW)
  /DEBUG=(SYMBOLS,TRACEBACK)
  /STANDARD=(NOSYNTAX,NOSOURCE_FORM)
  /SHOW=(NOPREPROCESSOR,NOINCLUDE,MAP)
  /F77  /NOG_FLOATING  /I4  /NOOPTIMIZE  /WARNINGS  /NOD_LINES  /CROSS_REFERENCE  /NOMACHINE_CODE  /CONTINUATIONS=99


COMPILATION STATISTICS

  Run Time:           2.40 seconds
  Elapsed Time:       8.53 seconds
  Page Faults:        462
  Dynamic Memory:     846 pages
