home *** CD-ROM | disk | FTP | other *** search
/ Programmer's ROM - The Computer Language Library / programmersrom.iso / ada / metric / sinstool.doc < prev    next >
Encoding:
Text File  |  1988-05-03  |  245.2 KB  |  9,404 lines

  1. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  2. --testtool.ug
  3. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.         
  14.  
  15.                                     Ada*
  16.  
  17.                             Test and Analysis Tools
  18.  
  19.                                   ( ATEST )
  20.  
  21.                                 Version 1.0
  22.  
  23.                                 User's Guide
  24.  
  25.  
  26.  
  27.  
  28.                                      by
  29.  
  30.                                  Mary Koppes 
  31.  
  32.                              Intermetrics, Inc.
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.         * Ada is a trademark of the U.S. Department of Defense (AJPO)
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.         Ada Test and Evaluation Tools User's Guide        Page: i
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.                                   PREFACE
  79.  
  80.  
  81.               This program was developed by Intermetrics, Inc. 
  82.               under Contract Number N66001-85-C-0032 for:
  83.          
  84.                       Naval Ocean Systems Center
  85.                       271 Catalina Boulevard
  86.                       San Diego, California  92152. 
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.         Ada Test and Evaluation Tools User's Guide        Page: ii
  137.  
  138.  
  139.  
  140.         
  141.                                   CONTENTS
  142.  
  143.  
  144.         1.0  INTRODUCTION ......................................   1
  145.  
  146.  
  147.         2.0  ATEST SYSTEM OVERVIEW .............................   2
  148.  
  149.  
  150.         3.0  USER INTERFACE INFORMATION ........................   3
  151.  
  152.  
  153.         4.0  ATEST TOOL OVERVIEWS ..............................   4
  154.  
  155.         4.1    Source Instrumenter .............................   4 
  156.              
  157.         4.2    Path Analyzer ...................................   5 
  158.          
  159.         4.3    Performance Analyzer ............................   6 
  160.  
  161.         4.4    Self-Metric Analysis and Report Tool ............   7 
  162.  
  163.         4.5    Automatic Path Analyzer .........................   8 
  164.  
  165.         5.0  TEST TOOL EXECUTION ...............................   9
  166.              
  167.         6.0  RESTRICTIONS AND LIMITATIONS ......................  10  
  168.  
  169.  
  170.         APPENDIX A - GLOSSARY .................................. A-1
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.         ATEST User's Guide                                Page: 1
  203.  
  204.  
  205.         
  206.  
  207.                               1.0  INTRODUCTION
  208.         
  209.  
  210.  
  211.              The  purpose of this document is to provide the user of  the 
  212.         Ada  Test  and Evaluation Tools (ATEST) with an overview  of  the 
  213.         entire  system.  This document presents concise instructions to a 
  214.         novice user on the required steps of testing an Ada program using 
  215.         the ATEST system.
  216.  
  217.  
  218.              The ATEST system is intended for the test and evaluation  of 
  219.         Ada programs.  The tools specifically support:  evaluation of Ada 
  220.         program  performance characteristics,  evaluation of logic  paths 
  221.         exercised   during   Ada  program  execution,   analysis  of  the 
  222.         statistical behavior( maximum,  minimum,  and average values ) of 
  223.         specified variables, and symbolic debugging of Ada programs.
  224.  
  225.  
  226.              This  document  describes  each of  these  tools  through  a 
  227.         presentation  of  their capabilities,  their  inputs,  and  their 
  228.         outputs.  This presentation is structured in the following way. A 
  229.         general  overview  of  the entire suite of ATEST tools  is  first 
  230.         presented  in Section 2.0 .  The system overview is  followed  in 
  231.         Section  3.0  by a discussion of the ATEST tools user  interface. 
  232.         This  user   interface  controls access to the  ATEST  tools  and 
  233.         provides  assistance  for the use of the Source Instrumenter  and 
  234.         the remaining tools.  In Section 4.0,  each of the ATEST tools is 
  235.         described.  Information  is  provided  on  both  the  operational 
  236.         sequence of steps required to  effectively use the tools and  the 
  237.         information  produced  by the ATEST tools.  Section 5.0  provides 
  238.         general information on test tool execution.  The restrictions and 
  239.         limitations of the ATEST tools are provided in Section 6.0.
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.         ATEST User's Guide                                Page: 2
  269.  
  270.  
  271.         
  272.                             2.0  ATEST SYSTEM OVERVIEW
  273.         
  274.              The  Ada Test and Evaluation Tools consist of the  following 
  275.         tools:
  276.  
  277.              - Source Instrumenter 
  278.  
  279.              - Path Analyzer 
  280.  
  281.              - Automatic Path Analyzer 
  282.  
  283.              - Performance Analyzer
  284.  
  285.              - Self-Metric Instrumentation and Analysis
  286.  
  287.              - Symbolic Debugger
  288.          
  289.              The first release of the Ada Test Tools will be composed  of 
  290.         the  Source  Instrumenter,  the Path Analyzers,  the  Performance 
  291.         Analyzer  and the Self-Metric Instrumentation and Analysis  Tool. 
  292.         (The  Symbolic  Debugger is scheduled to be released at  a  later 
  293.         date).   The  purpose  of  these tools is to  test  and  evaluate 
  294.         programs  written in the Ada language.   They collect  statistics 
  295.         about a program's run time capabilities and report the results in 
  296.         a  form usable for making decisions about a  program's  execution 
  297.         paths   and  efficiency.    Such  information  can  prove  to  be 
  298.         invaluable to programmers who are debugging their software.  
  299.  
  300.              Each of the Analysis and Report Generators consists of three 
  301.         elements:
  302.  
  303.              1.   The  Source Instrumenter parses the target Ada  program 
  304.         and  inserts  "hooks"  that  transfer control  to  the  Run  Time 
  305.         Monitor.  These hooks are inserted at entry to and exit from each 
  306.         instrumented  Ada  program unit.   The user may  also  choose  to 
  307.         insert  these  "hooks" at each statement in the  target  program.      
  308.  
  309.              2.   The Run Time Monitor gains control of the execution  at 
  310.         each  breakpoint  in each instrumented program unit  and  records 
  311.         execution  information  about the program in a Logfile which  the 
  312.         user specifies.
  313.  
  314.              3.    The  Report Generator analyzes the data in the logfile 
  315.         and  produces  a report which can be used by  the  programmer  to 
  316.         assess the efficiency of the instrumented program.
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.         ATEST User's Guide                                Page: 3
  335.  
  336.  
  337.         
  338.                            3.0  USER INTERFACE INFORMATION
  339.         
  340.  
  341.              The Tool Set components are integrated into a user interface 
  342.         shell  which  is controlled by  a  "shell"  program,  Test_Tools.  
  343.         Test_Tools  provides  information to the Source Instrumenter  and 
  344.         the  Report  Generators.   It  allows the user to  enter  a  Tool 
  345.         Session   during   which  tool  selection  and   tool   parameter 
  346.         specification occur.   The mechanism of the underlying system  is 
  347.         transparent to the user since all user interaction is through the 
  348.         Test_Tools interface.
  349.  
  350.              Test_Tools  will accept and parse a valid Ada command  line. 
  351.         For example:
  352.  
  353.            PATH (Log_File_Name => Test.Log, Report_File_Name => Test.Rpt)
  354.  
  355.         The user may use either positional or named association. However, 
  356.         once named association is used,  all following parameters must be 
  357.         entered using  named association.   The user will be prompted for 
  358.         any  required  parameters that were not included on  the  command 
  359.         line.  Upon completion of any single tool, the user will be asked 
  360.         to select another tool.  This will continue until the user enters 
  361.         'quit', which will end the complete tool session.   
  362.              
  363.         The  Test_Tools shell is executed on a system in the same  manner 
  364.         as  any other Ada program.   On the VAX under DEC Ada and the VMS 
  365.         operating system the user enters:
  366.  
  367.                RUN TEST_TOOLS <cr>
  368.  
  369.              A  menu which lists the possible choices will  be  displayed 
  370.         for the user.  The following options are available: 
  371.            
  372.              PATH              - produce a  path analysis  report from  a 
  373.                                  log file.
  374.            
  375.              PROFILE           - produce a timing report from a log file.
  376.             
  377.              SMART             - produce a self metric report from a  log 
  378.                                  file.
  379.             
  380.              AUTOPATH          - produce  a  path  analysis  report  from 
  381.                                  multiple log files.
  382.              
  383.              SOURCE_INSTRUMENT - insert breakpoints in an Ada program  to 
  384.                                  gather information about the execution.
  385.          
  386.          other possible commands are:
  387.  
  388.              QUIT              - exit to the system.
  389.  
  390.              ?                 - a list of the tools.
  391.         
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.         ATEST User's Guide                                Page: 4
  401.  
  402.  
  403.                        4.0  ATEST TOOL OVERVIEWS
  404.         
  405.  
  406.              In  this section,  each of the ATEST tools is described  and 
  407.         its  operation is outlined.   This section is not intended as  an 
  408.         exhaustive  enumeration of each tool's options and  capabilities.  
  409.         Further  information  on all of these tools can be found  in  the 
  410.         appropriate user's guide.
  411.  
  412.  
  413.         4.1 Source_Instrumenter (SI)
  414.  
  415.              Source_Instrumenter parses a target Ada program and  inserts 
  416.         "hooks"  in the code to allow transfer of control to the Run Time 
  417.         Monitor.    When  the  program  is  executed,  dynamic  run  time 
  418.         statistics  are gathered and placed in a logfile which can  later 
  419.         be  analyzed by the individual report generators.  These  "hooks" 
  420.         will normally be placed at every entry and exit of a program unit 
  421.         as  well as at every decision point.   Optionally,  they  may  be 
  422.         placed  at each Ada statement.    All programs units that need to 
  423.         be   tested  with  the  Test  and  Analysis  Tool  set  must   be 
  424.         instrumented prior to compilation, linkage and execution.
  425.  
  426.              It  is suggested that the user choose to instrument  at  the 
  427.         statement  level  for  the Path Analyzer and the  Automatic  Path 
  428.         Analyzer only.  The default is to instrument at subprogram entry, 
  429.         exit and decision points.
  430.           
  431.              There are three parameters used by Source Instrumenter:
  432.  
  433.          1)  Source_File         - The input Ada program. 
  434.          2)  Source_Listing      - The  output listing of the Ada  source 
  435.                                    code. 
  436.          3)  Instrumented_Source - The output instrumented source file.
  437.  
  438.              If the user doesn't specify the Source_Listing or the
  439.         Instrumented_Source, they will be derived from the Source_File.
  440.  
  441.         Example:
  442.              Source_File = SORT.ADA  --> Source_Listing = SORT.LST
  443.                                          Instrumented_Source = SORT.INS
  444.              Source_File = SORT      --> Source_Listing = SORT.LST
  445.                                          Instrumented_Source = SORT.INS
  446.  
  447.         For  further information about the Source Instrumenter,  refer to 
  448.         the Source Instrumenter User's Guide.
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.         ATEST User's Guide                                Page: 5
  467.  
  468.  
  469.  
  470.         4.2 Path Analyzer (Path)
  471.  
  472.              Path  will  produce a path analysis report which  lists  the 
  473.         history of execution and an execution summary,  from the log file 
  474.         supplied.   This information can be used by the programmer during 
  475.         testing  to  determine  whether  the  program  is  following  the 
  476.         expected  path(s).   These  statistics will make  the  programmer 
  477.         aware of sections of code that have high execution frequencies as 
  478.         well  as  those that are not being executed.   The user can  then 
  479.         optimize his code in the appropriate places.
  480.  
  481.              There are two parameters required by Path:
  482.          
  483.           1)  Log_File_Name    - The input log file.
  484.           2)  Report_File_Name - The output report file.
  485.  
  486.              If the user doesn't specify the Report_File_Name it will  be 
  487.         derived from the Log_File_Name, with '.RPT' appended.
  488.  
  489.         Example:
  490.              Log_File_Name = SORT.LOG  --> Report_File_Name = SORT.RPT
  491.              Log_File_Name = SORT      --> Report_File_Name = SORT.RPT
  492.  
  493.         For  further  information about the Path Analyzer,  refer to  the 
  494.         Path Analyzer User's Guide.
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.         ATEST User's Guide                                Page: 6
  533.  
  534.  
  535.          
  536.         4.3 Performance Analyzer (Profile)
  537.  
  538.              Profile will produce a timing report which lists the  amount 
  539.         of  time  spent in each program unit from the log file  supplied. 
  540.         Net  and  cumulative times are reported for  each  program  unit.  
  541.         This  information enables the user to identify program units that 
  542.         require  a high percentage of total execution time.
  543.  
  544.            There are two parameters required by Profile:
  545.          
  546.           1)  Log_File_Name    - The input log file.
  547.           2)  Report_File_Name - The output report file.
  548.  
  549.              If the user doesn't specify the Report_File_Name it will  be 
  550.         derived from the Log_File_Name, with '.RPT' appended.
  551.  
  552.         Example:
  553.              Log_File_Name = SORT.LOG  --> Report_File_Name = SORT.RPT
  554.              Log_File_Name = SORT      --> Report_File_Name = SORT.RPT
  555.  
  556.         For further information about the Performance Analyzer,  refer to 
  557.         the Performance Analyzer User's Guide.
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.         ATEST User's Guide                                Page: 7
  599.  
  600.  
  601.  
  602.         4.4 Self-Metric Analysis and Report Tool (Smart)
  603.  
  604.              Smart  will  produce a report which provides  the  following 
  605.         dynamic run time statistics about the target program:
  606.  
  607.              1.  Change  of  value trace of  the  user-specified  program          
  608.                  variables.
  609.  
  610.              2.  Program loop execution frequencies.
  611.  
  612.              3.  The  maximum,  minimum  and  average  values  of  user 
  613.                  specified variables.
  614.  
  615.         This  information can then be used by the programmer to  evaluate 
  616.         the  usage  of the program variables and  possibly  optimize  the 
  617.         variable usage.
  618.  
  619.              There are two parameters required by Smart:
  620.          
  621.           1)  Log_File_Name    - The input log file.
  622.           2)  Report_File_Name - The output report file.
  623.  
  624.              If the user doesn't specify the Report_File_Name it will  be 
  625.         derived from the Log_File_Name, with '.RPT' appended.
  626.  
  627.         Example:
  628.              Log_File_Name = SORT.LOG  --> Report_File_Name = SORT.RPT
  629.              Log_File_Name = SORT      --> Report_File_Name = SORT.RPT
  630.  
  631.         For further information about the Self-Metric Analysis and Report 
  632.         Tool, refer to the Smart User's Guide.
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.         ATEST User's Guide                                Page: 8
  665.  
  666.  
  667.  
  668.         4.5  Automatic Path Analyzer (Autopath)
  669.  
  670.              Autopath   will produce a path analysis report which lists a 
  671.         history  of execution and execution summary,  from the log  files 
  672.         supplied.  The user will be prompted for the log files.  At least 
  673.         one  log  file must be entered.   The user will  continue  to  be 
  674.         prompted  for  log file names until a carriage return is  entered 
  675.         with no other input.  
  676.  
  677.              The user will then be prompted for the report file name.  If 
  678.         the  user doesn't specify the Report_File_Name it will default to 
  679.         "AUTOPATH.RPT".
  680.  
  681.         For further information about the Automatic Path Analyzer,  refer 
  682.         to the Autopath User's Guide.
  683.  
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.         ATEST User's Guide                                Page: 9
  731.  
  732.  
  733.         
  734.                        5.0  TEST TOOL EXECUTION
  735.         
  736.  
  737.              To   execute  a  Test  Tool  the  following  tasks  must  be 
  738.         performed:
  739.  
  740.              1.   The  source code for the Ada program targeted  for  the 
  741.                   test must be instrumented.
  742.  
  743.              2.    The  instrumented source must be compiled,  linked and 
  744.                    executed to produce an Execution Logfile.
  745.  
  746.              3.    The  desired  report  generator must  be  executed  to 
  747.                    analyze  the  contents of the logfile  and  produce  a 
  748.                    report which can be inspected by the user.
  749.  
  750.              The  Source  Instrumenter can be executed  from  within  the 
  751.         Test_Tools  "shell".   This will produce a new source file.   The 
  752.         user must leave Test_Tools to compile the new source and link the 
  753.         target  program with the Run Time Monitor.   The  Source  Instru-
  754.         menter  adds  "with"  and  "use" clauses to the  source  file  to 
  755.         include the Run Time Monitor and other library units necessary to 
  756.         collect program execution information.   The Ada Environment will 
  757.         automatically  link  in the required library units  to  form  the 
  758.         executable program.
  759.  
  760.              The  user then executes his program  normally.   During  the 
  761.         execution,  the Run Time Monitor will gain control of the program 
  762.         and prompt the user for the following information:
  763.  
  764.              1.  Tool_Name  :  The  user  must enter a  valid tool  name 
  765.  
  766.              2.  Logfile_Name : The user should  enter a legal filename for 
  767.                  for the computer he is using. 
  768.  
  769.              3.  Test_Identification: The user is asked to enter a unique 
  770.                  test identification which can be any valid Ada string. 
  771.              
  772.         After this input, the target program resumes its normal execution 
  773.         and produces an execution logfile.  For more detailed information 
  774.         about  the Run Time Monitor,  refer to the user's guides for  the 
  775.         report generators.
  776.  
  777.              Next,  the user must re-enter the Test_Tools shell to invoke 
  778.         the  Analysis and Report tool which corresponds to the  Tool_Name 
  779.         that was specified to the Run Time Monitor.   The tool will  ana-
  780.         lyze the logfile data and produce a report. 
  781.              This  report is in a readable format so the user may inspect 
  782.         it  and  use the information to evaluate the performance  of  his 
  783.         program.
  784.           
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.         ATEST User's Guide                                Page: 10
  797.  
  798.  
  799.         
  800.                        6.0  RESTRICTIONS AND LIMITATIONS
  801.         
  802.  
  803.  
  804.         1)  No  specific  limits are imposed either by  the  Runtime 
  805.             Monitor  or  the ATEST report generators on  either  the 
  806.             size  of the target Ada program or the number of program 
  807.             units that can be instrumented.   All arrays and  stacks 
  808.             maintained  by  ATEST that are a function of  the  total 
  809.             number  of program units or the number of program  units 
  810.             active  at  a given time are allocated  dynamically  and 
  811.             deallocated when they are no longer needed. 
  812.  
  813.         2)  Dynamic  execution data may only be reported for program 
  814.             units   that  have  been  instrumented  by  the   source 
  815.             instrumenter.
  816.  
  817.         3)  Regardless  of  whether or not the Ada  compiler  system 
  818.             being used for program development provides an interface 
  819.             to  programming  languages  other  than  Ada,  only  Ada 
  820.             program units may be instrumented.
  821.  
  822.         4)  The  runtime execution monitor imposes a certain  amount 
  823.             of  overhead on the execution time of each  instrumented 
  824.             Ada program unit. This overhead will vary from system to 
  825.             system.  Therfore,  an instrumented program will execute 
  826.             slower  than  the same  program  uninstrumented.   In  a 
  827.             tasking  environment  if the execution of  some  program 
  828.             units  is  time dependent then the  additional  overhead 
  829.             imposed  by the run-time execution monitor may alter the 
  830.             normal flow of control of the program.
  831.  
  832.         5)  When  statement  level breakpoints  are  specified,  all 
  833.             variables being traced that are visible within the scope 
  834.             of   the  executing  breakpoint  are  recorded  in   the 
  835.             execution  log file.  Thus,  depending on the number  of 
  836.             variables  traced,   the  total  number  of  breakpoints 
  837.             executed, and the logic of the instrumented program, the 
  838.             execution log file may become extremely large. 
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.         ATEST User's Guide                               Page: A - 1
  863.  
  864.  
  865.  
  866.  
  867.  
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.         
  875.                                  APPENDIX A
  876.  
  877.                                   GLOSSARY
  878.         
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.         ATEST User's Guide                               Page: A - 2
  929.  
  930.  
  931.  
  932.  
  933.         
  934.         Execution Log File
  935.              A  sequential  file  created by the  Run  Time  Monitor 
  936.              during  execution  of  an Ada  program  that  has  been 
  937.              instrumented  by  the Source  Instrumenter.  The  terms 
  938.              "Execution    Log    File"   and   "Log    File"    are 
  939.              interchangeable.
  940.  
  941.         
  942.         Breakpoint
  943.              A  breakpoint is a transfer of control to the Run  Time 
  944.              Monitor.   Each breakpoint within a compilation unit is 
  945.              assigned  a  unique  breakpoint number  by  the  Source 
  946.              Instrumenter.   In  general,  breakpoints correspond to 
  947.              executable  statements.   However,  not all  executable 
  948.              statements are assigned breakpoints.
  949.  
  950.         
  951.         Log File
  952.              A  sequential  file  created by the  Run  Time  Monitor 
  953.              during  execution  of  an Ada  program  that  has  been 
  954.              instrumented  by  the Source  Instrumenter.  The  terms 
  955.              "Execution    Log    File"   and   "Log    File"    are 
  956.              interchangeable.
  957.  
  958.         
  959.         Overhead
  960.              The term "overhead" refers to the additional  execution 
  961.              time  imposed on the program under test by the Run Time 
  962.              Monitor.   Only  a  portion  of this  overhead  can  be 
  963.              measured with any degree of accuracy.   If the  program 
  964.              under  test  terminates  normally  the  Profile  Report 
  965.              Generator  will,  if  requested  by  the  user,  adjust 
  966.              execution  times for that portion of the overhead  that 
  967.              was measured by the Run Time Monitor. 
  968.  
  969.         
  970.         Program Unit
  971.              Ada  programs  may  contain  four  different  types  of 
  972.              program  units:   procedures,   functions,   tasks  and 
  973.              generics.  However,  the Ada language also provides the 
  974.              ability  to include executeable code within  a  package 
  975.              body  that  is not included within any of  the  program 
  976.              units contained in that package.  This code is executed 
  977.              during  package  initialization  when  the  package  is 
  978.              elaborated. Profile reports timing information for this 
  979.              "initialization"  code  the  same as  for  Ada  program 
  980.              units.     Therefore,     for    reporting    purposes, 
  981.              initialization  code  within  a package  body  is  also 
  982.              treated as a program unit.
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.         ATEST User's Guide                               Page: A - 3
  995.  
  996.  
  997.  
  998.         
  999.         Report Time
  1000.              The   time  that  the  ATEST  Report  Generator   was 
  1001.              executed.
  1002.  
  1003.         
  1004.         Run Time Monitor
  1005.             A  runtime kernel that gains control upon entry  to  and 
  1006.             exit  from  each instrumented Ada program unit and  logs 
  1007.             timing  information about the program's  execution.  The 
  1008.             runtime  execution  monitor  must  be  linked  with  the 
  1009.             instrumented Ada program units.
  1010.  
  1011.         
  1012.         Source Instrumenter
  1013.             An  Ada  program that parses the target Ada program  and 
  1014.             inserts  "hooks" that transfer control to the  Run  Time 
  1015.             Monitor  upon  entry to and exit from each  instrumented 
  1016.             Ada program unit. Each Ada program unit for which timing 
  1017.             information  is to be recorded must be  instrumented  by 
  1018.             the Source Instrumenter prior to compilation.
  1019.  
  1020.         
  1021.         Test ID
  1022.             A  unique test identification specified by the user when 
  1023.             the  program  under test is executed.  The  Test  ID  is 
  1024.             stored  in  the  log file by the Run  Time  Monitor  and 
  1025.             included in the Test Configuration Report by the Profile 
  1026.             report generator.
  1027.  
  1028.         
  1029.         Test Time
  1030.              The  date  and time that the program under  test  began 
  1031.              execution.
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060. 
  1061. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  1062. --autopath.ug
  1063. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  1064.  
  1065.  
  1066.  
  1067.  
  1068.  
  1069.  
  1070.  
  1071.  
  1072.  
  1073.         
  1074.  
  1075.                                     Ada*
  1076.  
  1077.                            Automatic Path Analyzer
  1078.  
  1079.                                 User's Guide
  1080.  
  1081.  
  1082.  
  1083.  
  1084.                                      by
  1085.  
  1086.                                 Julie Trost
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.         * Ada is a trademark of the U.S. Department of Defense (AJPO)
  1120.  
  1121.         
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.  
  1130.                  Ada Automatic Path Analyzer User's Guide
  1131.  
  1132.  
  1133.                                   CONTENTS
  1134.  
  1135.  
  1136.  
  1137.         1.0  DESCRIPTION ....................................... 1
  1138.  
  1139.  
  1140.         2.0  COMMAND FORMAT .................................... 2
  1141.  
  1142.         2.1    Source Program Instrumentation .................. 2
  1143.  
  1144.         2.2    Compilation and Linking ......................... 2
  1145.  
  1146.         2.3    Target Program Execution ........................ 3
  1147.  
  1148.         2.4    Report Generation ............................... 5
  1149.  
  1150.  
  1151.         3.0  OUTPUT FORMAT ..................................... 7
  1152.  
  1153.         3.1    Test Configuration Report ....................... 7
  1154.  
  1155.         3.2    History of Execution Report ..................... 8
  1156.  
  1157.         3.3    Execution Summary Report ........................ 8
  1158.  
  1159.  
  1160.         4.0  RESTRICTIONS AND LIMITATIONS ...................... 9
  1161.  
  1162.  
  1163.         APPENDIX A - SAMPLE REPORT FILE ........................ A-1
  1164.  
  1165.         APPENDIX B - GLOSSARY .................................. B-1
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196.         Automatic Path Analyzer User's Guide                 Page: 1
  1197.  
  1198.  
  1199.         
  1200.                               1.0  DESCRIPTION
  1201.         
  1202.              The Ada Automatic Path Analyzer, Autopath, is one of an 
  1203.         integrated  set  of  five tools  that  provide  testing  and 
  1204.         analysis  aids  for  the development  of  computer  programs 
  1205.         implemented  in the Ada programming language.  Specifically, 
  1206.         Autopath provides execution information on an Ada program to 
  1207.         enable the analyst to identify program units that are  never 
  1208.         executed.  Autopath consists of three elements:
  1209.  
  1210.         1)   A  source  instrumenter  that  parses  the  target  Ada 
  1211.              program  and inserts "hooks" that transfer control to a 
  1212.              runtime  kernal at each statement in each  instrumented 
  1213.              Ada  program  unit.  Each  Ada program unit  for  which 
  1214.              execution  information  is  to  be  recorded  must   be 
  1215.              instrumented prior to compilation.
  1216.  
  1217.         2)   A runtime execution monitor,  or  kernel,   that  gains 
  1218.              control  at  each  statement in each  instrumented  Ada 
  1219.              program  unit and logs information about the  program's 
  1220.              execution. The runtime execution monitor must be linked 
  1221.              with the instrumented Ada program units.
  1222.  
  1223.         3)   A report generator that analyzes the recorded execution     
  1224.              information  and produces a comprehensive report in  an 
  1225.              easily understandable format. Reports generated provide 
  1226.              detailed quantitative information about the history  of 
  1227.              execution  and  a  summary of execution  for  each  Ada 
  1228.              program unit.
  1229.  
  1230.  
  1231.              Autopath is a software development tool. Its purpose is 
  1232.         to  aid the programmer or analyst in identifying  statements 
  1233.         or  blocks  of code that are not executed or are executed  a 
  1234.         large  number of times.  Autopath can aid the programmer  or 
  1235.         analyst:
  1236.          
  1237.           O  during  program development in identifying those  parts 
  1238.              of  the  program that are not being used.
  1239.  
  1240.           O  in   analyzing  existing  programs   with   performance 
  1241.              problems  to identify inefficiencies or areas that  may 
  1242.              benefit  from optimization and result in  significantly 
  1243.              improved overall program performance.
  1244.  
  1245.           O  identify untested areas of code.
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.  
  1262.         Automatic Path Analyzer User's Guide                 Page: 2
  1263.  
  1264.  
  1265.         
  1266.                             2.0  COMMAND FORMAT
  1267.         
  1268.              Operation  of the Ada Automatic Path Analyzer  requires 
  1269.         four steps:
  1270.         
  1271.              1) source program instrumentation
  1272.  
  1273.              2) compilation and linking
  1274.  
  1275.              3) target program execution
  1276.  
  1277.              4) report generation
  1278.         
  1279.              Each  of  these  steps is described in  detail  in  the 
  1280.         following paragraphs.
  1281.  
  1282.         
  1283.         2.1  Source Program Instrumentation
  1284.         
  1285.              Each  Ada compilation unit containing program units for 
  1286.         which  execution  trace  data  is to  be  recorded  must  be 
  1287.         separately  instrumented  by the  source  instrumenter.  The 
  1288.         Automatic  Path  Analyzer  will provide  the  most  accurate 
  1289.         execution information on programs and subprograms that  have 
  1290.         been instrumented at each statement. However, it may also be 
  1291.         used   to   provide  execution  analysis  of  programs   and 
  1292.         subprograms  that have been instrumented at decision  points 
  1293.         or  at  entry/exit  points  for  use  with  the  Performance 
  1294.         Analyzer,  Path Analyzer, or Self Metric Instrumentation and 
  1295.         Analysis Tool.
  1296.  
  1297.              Refer  to  the  Source Instrumenter  User's  Guide  for 
  1298.         detailed information on using the Source Instrumenter.
  1299.  
  1300.         
  1301.         2.2  Compilation and Linking
  1302.         
  1303.              When  the  instrumentation  process  is  completed  the 
  1304.         instrumented  target Ada program must be compiled and linked 
  1305.         to   prepare  it  for  execution.   Each  instrumented   Ada 
  1306.         compilation  unit  must be  separately  compiled.  When  the 
  1307.         compilation  process is completed the target program must be 
  1308.         linked  with  the  Ada  Automatic  Path  Analyzer  Run  Time 
  1309.         Monitor.
  1310.  
  1311.             The   user  should  follow  the  normal  procedures  for 
  1312.         compiling  and  linking with the Ada compiler  system  being 
  1313.         used for program development.
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.         Automatic Path Analyzer User's Guide                 Page: 3
  1329.  
  1330.  
  1331.         
  1332.         2.3  Target Program Execution
  1333.         
  1334.             When linking is completed, the target Ada program may be 
  1335.         executed.  The  user interface and method of  executing  the 
  1336.         target   program  is  not  altered  by  the  instrumentation 
  1337.         process.  Therefore,  the  user  should  follow  the  normal 
  1338.         procedures  for  executing the target program  on  the  host 
  1339.         computer system being used for program development.
  1340.  
  1341.              When  the first unit of the target program is  entered, 
  1342.         the  Run Time Monitor will prompt the user for the following 
  1343.         information:
  1344.  
  1345.           1. Tool_Name  :   The   user  should  enter  AUTOPATH_TOOL 
  1346.              (upper  or  lower  case is acceptable).   If  the  user 
  1347.              should  enter  an  invalid  tool  name,   he  will   be 
  1348.              repeatedly  prompted  until  a  correct  tool  name  is 
  1349.              entered or the program is aborted.
  1350.  
  1351.           2. Logfile_Name :  The user should  enter a legal filename 
  1352.              for the computer he is using.  The default filename may 
  1353.              be  chosen by entering a carriage return.   The default 
  1354.              Logfile_Name is AUTOPATH.LOG.
  1355.  
  1356.                  If the File already exists, the user is asked if he 
  1357.              would  like  to Enter a  new  filename,  Overwrite  the 
  1358.              existing file, or Append to the existing file.
  1359.  
  1360.           3. Test_Identification:  The  user  is  asked to  enter  a 
  1361.              unique  test identification which can be any valid  Ada 
  1362.              string. The default Test ID may be selected by entering 
  1363.              a carriage return.  The default Test ID for Autopath is      
  1364.              "Automatic  Path  Analysis  Report".  The  Test  ID  is 
  1365.              recorded  in  the log file generated by  the  Run  Time 
  1366.              Monitor  and printed on the Test  Configuration  Report 
  1367.              generated by the Autopath Report Generator. 
  1368.  
  1369.         A  sample  session  with  the  Automatic  Path  Analyzer  is 
  1370.         presented on the following page.
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.         Automatic Path Analyzer User's Guide                 Page: 4
  1395.  
  1396.  
  1397.         
  1398.         EXAMPLE SESSION
  1399.         
  1400.         Following  is  a sample session with the Run  Time  Monitor. 
  1401.         (User responses are shown in Bold Face):
  1402.  
  1403.  
  1404.              Enter Tool Type : PATH_TOOL, AUTOPATH_TOOL,
  1405.                                SMART_TOOL, or PROFILE_TOOL
  1406.              -----> AUTOPATH_TOOL <cr>*
  1407.  
  1408.              Enter Logfile Name, Null for Default
  1409.              -----> Testa.log <cr>
  1410.  
  1411.  
  1412.         If  the  Logfile already exists,  the following message  and 
  1413.         prompt are printed:
  1414.  
  1415.              File already exists!!! Do you wish to:
  1416.                   E = Enter a New Filename
  1417.                   O = Overwrite existing file
  1418.                   A = Append to the existing file
  1419.  
  1420.              Enter Option ===> O <cr>
  1421.  
  1422.         The Run Time Monitor will repeatedly prompt the user until a 
  1423.         valid option is entered.
  1424.  
  1425.              Enter a unique Test Identification, Null for default.
  1426.              Log File Test Case # 5 <cr>
  1427.  
  1428.  
  1429.              When the Run Time Monitor input is complete, the target 
  1430.         program resumes its normal execution.     
  1431.  
  1432.         * <cr> represents a carriage return.
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.         Automatic Path Analyzer User's Guide                 Page: 5
  1461.  
  1462.  
  1463.         
  1464.         2.4  Report Generation
  1465.         
  1466.              During execution, the instrumented Ada program will create a 
  1467.         log  file  containing  program  execution  trace  data.  The  Ada 
  1468.         Automatic  Path Analyzer  Report  Generator will analyze the data 
  1469.         from  the  log  files  supplied  and  present  it  in  an  easily 
  1470.         understood format.   The user may include as many log files as he 
  1471.         desires.
  1472.  
  1473.              The  Autopath  report generator is one of  four  report 
  1474.         generators  included  in  the Ada Test and  Analysis  System 
  1475.         Report  Generator.  The  report  generator  is  executed  as 
  1476.         follows:
  1477.  
  1478.         (User input and responses shown in are Bold Face)
  1479.  
  1480.           RUN TEST_TOOLS <cr>
  1481.  
  1482.         The user will be prompted to enter the name of the reporting 
  1483.         tool he wishes to run.  To execute Autopath, the user should 
  1484.         respond with the tool name, Autopath.
  1485.  
  1486.  
  1487.         EXAMPLE
  1488.  
  1489.           Welcome to the Test Tools
  1490.           please enter desired tool
  1491.           enter ? for a list of tools available
  1492.           AUTOPATH <cr>
  1493.  
  1494.  
  1495.  
  1496.         If  an  incorrect  tool  name is entered the  user  will  be 
  1497.         prompted  to reenter the tool name.  When a valid tool  name 
  1498.         has been entered the user will be prompted to enter the name 
  1499.         of  the log file to be processed and the name of the  report 
  1500.         file to be generated.
  1501.  
  1502.  
  1503.         EXAMPLE
  1504.  
  1505.           Enter Log_File_Name => TASKLOG.LOG <cr>
  1506.           Enter Report_File_Name => TASKLOG.RPT <cr>
  1507.  
  1508.         If  the  user  doesn't enter  a  Report_File_Name,  it  will 
  1509.         default to AUTOPATH.RPT. 
  1510.  
  1511.         Autopath  will display the test configuration data that  was 
  1512.         recorded in the first log file at the time the program under 
  1513.         test was executed.   The user is then prompted as to whether 
  1514.         or not he wishes to continue.
  1515.  
  1516.         After  examining the test configuration data,  the user  can 
  1517.         discontinue processing by entering "N".   If the correct log 
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.  
  1526.         Automatic Path Analyzer User's Guide                 Page: 6
  1527.  
  1528.  
  1529.         file  has  been  selected,  the  user should  enter  "Y"  to 
  1530.         continue processing.  
  1531.  
  1532.         EXAMPLE
  1533.  
  1534.           Program Under Test:         Testlog
  1535.           Test Date:                  06/23/85
  1536.           Test Time:                  20:24:59
  1537.           Test ID:                    Log File Test Case #5
  1538.  
  1539.           Do you wish to continue (Y/N) ? Y <cr>
  1540.  
  1541.         If the user enters "N", processing will be discontinued.
  1542.  
  1543.         
  1544.         EXAMPLE SESSION
  1545.         
  1546.         Following is a sample session with the Report Generator
  1547.         (User input and responses shown in are Bold Face):
  1548.  
  1549.         $   RUN TEST_TOOLS <cr>
  1550.  
  1551.         Welcome to the Test Tools
  1552.         please enter desired tool
  1553.         enter ? for a list of tools available
  1554.         ? <cr>
  1555.  
  1556.         The following tools may be executed:
  1557.           path -- the report generator for the path analysis tool
  1558.           profile -- the report generator for the timing tool
  1559.           smart -- the report generator for the self metric tool
  1560.           autopath -- the report generator for the automatic path tool
  1561.           source_instrument -- instrument an Ada source file
  1562.  
  1563.         please enter desired tool
  1564.         Autopath <cr>
  1565.  
  1566.         Enter Log_File_Name => TASKA.LOG <cr>
  1567.         Enter Log_File_Name => TASKB.LOG <cr>
  1568.         Enter Log_File_Name => TASKC.LOG <cr>
  1569.         Enter Log_File_Name => <cr>
  1570.         Enter Report_File_Name => <cr>
  1571.  
  1572.         report_file_name = AUTOPATH.RPT
  1573.  
  1574.         Program Under Test:           Testlog
  1575.         Test Date:                    06/23/85
  1576.         Test Time:                    20:24:59
  1577.         Test ID:                      Log File Test Case #5
  1578.  
  1579.         Do you wish to continue (Y/N) ? Y <cr>
  1580.  
  1581.         please enter desired tool
  1582.         quit <cr>
  1583.         $
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592.         Automatic Path Analyzer User's Guide                 Page: 7
  1593.  
  1594.  
  1595.  
  1596.         
  1597.                              3.0  OUTPUT FORMAT
  1598.         
  1599.              The  report  file generated by Autopath contains  three 
  1600.         reports: a Test Configuration Report, a History Of Execution 
  1601.         Report  and  an  Execution  Summary  Report.    Each  report 
  1602.         provides  the  user  with different  information  about  the 
  1603.         program being tested and is generated in 80 column format to 
  1604.         enable  "browsing"  at a terminal when  hardcopy  is  either 
  1605.         unavailable or not desired. A sample report file is included 
  1606.         in Appendix A.
  1607.  
  1608.              Prior  to  using  the Autopath report generator  it  is 
  1609.         important for the user to understand the information that is 
  1610.         being  presented  and  how to  interpret  it.  Each  of  the 
  1611.         execution reports is described below. 
  1612.  
  1613.         3.1  Test Configuration Report
  1614.         
  1615.  
  1616.              The  Test  Configuration  Report  includes  information 
  1617.         necessary  to correlate the report with a specific  test  or 
  1618.         execution  of  the  target Ada  program.   It  includes  the 
  1619.         following information:
  1620.  
  1621.            1)  Program Under Test:
  1622.                This  is  the name of the main program  unit  of  the 
  1623.                program being analyzed.
  1624.  
  1625.            2)  Test Date:
  1626.                The  calendar  date that the program under  test  was 
  1627.                executed and the execution log file was created.  The 
  1628.                test date is presented in the form MM/DD/YY. 
  1629.  
  1630.            3)  Test Day:
  1631.                The day of the week,  Sunday through  Saturday,  that 
  1632.                the program under test was executed and the execution 
  1633.                log file was created.
  1634.          
  1635.            4)  Test Time:
  1636.                The  time  of  day that the program  under  test  was 
  1637.                executed and the execution log file was created.  The 
  1638.                test time is presented in the form HH:MM:SS.
  1639.  
  1640.            5)  Log File:
  1641.                The  name  of  the  log file that  was  used  in  the 
  1642.                preparation of the execution timing reports.
  1643.  
  1644.            6)  Test ID:
  1645.                The  test  ID specified by the user at the  time  the 
  1646.                program under test was executed. 
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.  
  1656.  
  1657.  
  1658.         Automatic Path Analyzer User's Guide                 Page: 8
  1659.  
  1660.  
  1661.  
  1662.         
  1663.         3.2  History Of Execution Report
  1664.         
  1665.              This  report  lists the order in which  the  statements 
  1666.         executed.   A 'Begin' indicates the program unit was entered 
  1667.         at  the first statement.   A 'Resume' indicates the  program 
  1668.         unit  was  entered  at  a statement  other  than  the  first 
  1669.         statement.   An  'End' indicates the last statement  of  the 
  1670.         program  unit  was  executed.   Consecutive  statements  are 
  1671.         grouped  together in square brackets '[]'.   A backslash '/' 
  1672.         indicates  a  backward  jump  in the  code  (a  decrease  in 
  1673.         statement numbers). 
  1674.         
  1675.         3.3  Execution Summary Report
  1676.         
  1677.              This  report lists the number of times  each  statement 
  1678.         was  executed.  Statements are listed under the  compilation 
  1679.         unit  name.   Consecutive statements that were executed  the 
  1680.         same number of times are grouped together in square brackets 
  1681.         '[]'.
  1682.  
  1683.  
  1684.  
  1685.  
  1686.  
  1687.  
  1688.  
  1689.  
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.  
  1724.         Automatic Path Analyzer User's Guide                 Page: 9
  1725.  
  1726.  
  1727.         
  1728.                        4.0  RESTRICTIONS AND LIMITATIONS
  1729.         
  1730.  
  1731.         1)  No  specific  limits are imposed either by  the  Runtime 
  1732.             Monitor  or  the Profile report generator on either  the 
  1733.             size of the target Ada program or the number of  program 
  1734.             units  that can be instrumented.   All arrays and stacks 
  1735.             maintained  by  Path  that are a function of  the  total 
  1736.             number  of program units or the number of program  units 
  1737.             active  at  a given time are allocated  dynamically  and 
  1738.             deallocated when they are no longer needed. 
  1739.  
  1740.         2)  Execution  data may only be reported for  program  units 
  1741.             that have been instrumented by the source instrumenter.
  1742.  
  1743.         3)  Regardless  of  whether or not the Ada  compiler  system 
  1744.             being used for program development provides an interface 
  1745.             to  programming  languages  other  than  Ada,  only  Ada 
  1746.             program units may be instrumented.
  1747.  
  1748.         4)  Autopath  will not limit the number of log files  to  be 
  1749.             analyzed,  however  a  new log file is created  by  con-
  1750.             catenating the desired log files.  This new file may  be      
  1751.             quite large, and disk space may be a problem.  
  1752.  
  1753.         5)  The  numbers  recorded in the output file represent  the 
  1754.             breakpoint  number,  not  the statement  number.   If  a 
  1755.             program unit is instrumented at entry/exit, it will have 
  1756.             2  breakpoints.   If a program unit is  instrumented  at 
  1757.             entry/exit/decision  points,  it  will have  breakpoints 
  1758.             throughout  the  code but not every  statement  will  be 
  1759.             represented.  If a program unit is instrumented at  each 
  1760.             statement,   breakpoint   numbers  will  correspond   to 
  1761.             statement numbers.
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.  
  1790.         Automatic Path Analyzer User's Guide      Page: A - 1
  1791.  
  1792.  
  1793.  
  1794.  
  1795.  
  1796.  
  1797.  
  1798.  
  1799.  
  1800.  
  1801.  
  1802.         
  1803.                                  APPENDIX A
  1804.  
  1805.                                SAMPLE REPORT
  1806.         
  1807.  
  1808.  
  1809.  
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.  
  1829.  
  1830.  
  1831.  
  1832.  
  1833.  
  1834.  
  1835.  
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.  
  1856.         Automatic Path Analyzer User's Guide                        Page: A - 2
  1857.  
  1858.  
  1859.  
  1860.  
  1861.         Source Instrumenter Output on 07/29/85 at 09:27:03                    1
  1862.         Source File: test_case1.ada
  1863.  
  1864.         Bkpt
  1865.         Number  Source Text
  1866.         ------  -----------
  1867.               procedure TEST_CASE1 is 
  1868.  
  1869.                 type STORAGE_ARRAY is array(INTEGER range <>) of INTEGER; 
  1870.                 STORAGE : STORAGE_ARRAY(1 .. 10) := (15, 12, 14, 10, 2, 5, 
  1871.                   1, 4, 11, 12);
  1872.  
  1873.                 procedure ONE_PASS(S : in out STORAGE_ARRAY) is 
  1874.                   TEMP : INTEGER; 
  1875.                 begin
  1876.         1         for I in S'FIRST .. S'LAST - 1 loop
  1877.         2           if S(I) > S(I + 1) then 
  1878.         3             TEMP := S(I); 
  1879.                       S(I) := S(I + 1); 
  1880.                       S(I + 1) := TEMP; 
  1881.                     end if; 
  1882.                   end loop; 
  1883.         4       end ONE_PASS; 
  1884.  
  1885.               begin
  1886.         5       for J in 1 .. STORAGE'LAST - STORAGE'FIRST - 1 loop
  1887.         6         ONE_PASS(STORAGE); 
  1888.                 end loop; 
  1889.         7     end TEST_CASE1; 
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.  
  1922.         Automatic Path Analyzer User's Guide                        Page: A - 3
  1923.  
  1924.  
  1925.  
  1926.         Source Instrumenter Output on 07/29/85 at 09:27:03                  1
  1927.         Source File: test_case1.ada
  1928.  
  1929.         Bkpt
  1930.         Number  Source Text
  1931.         ------  -----------
  1932.               procedure TEST_CASE1 is 
  1933.  
  1934.                 type STORAGE_ARRAY is array(INTEGER range <>) of INTEGER; 
  1935.                 STORAGE : STORAGE_ARRAY(1 .. 10) := (12, 2, 5, 8, 2, 1, 14, 
  1936.                   10, 3, 12);
  1937.  
  1938.                 procedure ONE_PASS(S : in out STORAGE_ARRAY) is 
  1939.                   TEMP : INTEGER; 
  1940.                 begin
  1941.         1         for I in S'FIRST .. S'LAST - 1 loop
  1942.         2           if S(I) > S(I + 1) then 
  1943.         3             TEMP := S(I); 
  1944.                       S(I) := S(I + 1); 
  1945.                       S(I + 1) := TEMP; 
  1946.                     end if; 
  1947.                   end loop; 
  1948.         4       end ONE_PASS; 
  1949.  
  1950.               begin
  1951.         5       for J in 1 .. STORAGE'LAST - STORAGE'FIRST - 1 loop
  1952.         6         ONE_PASS(STORAGE); 
  1953.                 end loop; 
  1954.         7     end TEST_CASE1; 
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.  
  1988.         Automatic Path Analyzer User's Guide                        Page: A - 4
  1989.  
  1990.  
  1991.  
  1992.         Path Analyzer 01.00   MONDAY     07/29/85    09:36:43    Page:  1
  1993.          
  1994.          
  1995.                          Ada Path Analyzer - Test Configuration Report
  1996.         --------------------------------------------------------------------------------
  1997.  
  1998.          
  1999.          
  2000.                Program Under Test:      TEST_CASE1
  2001.  
  2002.                Test Date:               07/29/85
  2003.  
  2004.                Test Day:                MONDAY
  2005.  
  2006.                Test Time:               09:30:01
  2007.  
  2008.                Log File:                autopath.log
  2009.  
  2010.                Test ID:                 Path Analysis Report          
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018.  
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.  
  2054.  
  2055.         Automatic Path Analyzer User's Guide                        Page: A - 5
  2056.  
  2057.  
  2058.  
  2059.         Path Analyzer 01.00   MONDAY     07/29/85    09:36:43    Page:  2
  2060.         autopath.log
  2061.                 
  2062.         Begin TEST_CASE1                                                                
  2063.               [5-6]                                                                     
  2064.         Begin TEST_CASE1.ONE_PASS                                                       
  2065.               [1-3] \ [2-3] \ [2-3] \ [2-3] \ [2-3] \ [2-3] \ [2-3] \                   
  2066.               [2-3] \ [2-4]                                                             
  2067.         End TEST_CASE1.ONE_PASS                                                         
  2068.         Resume TEST_CASE1                                                               
  2069.               [6]                                                                       
  2070.         Begin TEST_CASE1.ONE_PASS                                                       
  2071.               [1-2] [2-3] \ [2-3] \ [2-3] \ [2-3] \ [2-3] \ [2-3] \                     
  2072.               [2-3] \ [2] [4]                                                           
  2073.         End TEST_CASE1.ONE_PASS                                                         
  2074.         Resume TEST_CASE1                                                               
  2075.               [6]                                                                       
  2076.         Begin TEST_CASE1.ONE_PASS                                                       
  2077.               [1-3] \ [2-3] \ [2-3] \ [2-3] \ [2-3] \ [2-3] \ [2] [2]                   
  2078.               [2] [4]                                                                   
  2079.         End TEST_CASE1.ONE_PASS                                                         
  2080.         Resume TEST_CASE1                                                               
  2081.               [6]                                                                       
  2082.         Begin TEST_CASE1.ONE_PASS                                                       
  2083.               [1-3] \ [2-3] \ [2-3] \ [2-3] \ [2] [2] [2] [2] [2] [4]                   
  2084.         End TEST_CASE1.ONE_PASS                                                         
  2085.         Resume TEST_CASE1                                                               
  2086.               [6]                                                                       
  2087.         Begin TEST_CASE1.ONE_PASS                                                       
  2088.               [1-2] [2-3] \ [2-3] \ [2] [2] [2] [2] [2] [2] [4]                         
  2089.         End TEST_CASE1.ONE_PASS                                                         
  2090.         Resume TEST_CASE1                                                               
  2091.               [6]                                                                       
  2092.         Begin TEST_CASE1.ONE_PASS                                                       
  2093.               [1-3] \ [2] [2] [2] [2] [2] [2] [2] [2] [4]                               
  2094.         End TEST_CASE1.ONE_PASS                                                         
  2095.         Resume TEST_CASE1                                                               
  2096.               [6]                                                                       
  2097.         Begin TEST_CASE1.ONE_PASS                                                       
  2098.               [1-2] [2] [2] [2] [2] [2] [2] [2] [2] [4]                                 
  2099.         End TEST_CASE1.ONE_PASS                                                         
  2100.         Resume TEST_CASE1                                                               
  2101.               [6]                                                                       
  2102.         Begin TEST_CASE1.ONE_PASS                                                       
  2103.               [1-2] [2] [2] [2] [2] [2] [2] [2] [2] [4]                                 
  2104.         End TEST_CASE1.ONE_PASS                                                         
  2105.         Resume TEST_CASE1                                                               
  2106.               [7]                                                                       
  2107.         End TEST_CASE1                                                                  
  2108.         Begin TEST_CASE1                                                                
  2109.               [5-6]                                                                     
  2110.         Begin TEST_CASE1.ONE_PASS                                                       
  2111.               [1-3] \ [2-3] \ [2-3] \ [2-3] \ [2-3] \ [2] [2-3] \ [2-3] \               
  2112.               [2-4]                                                                     
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.  
  2120.  
  2121.         Automatic Path Analyzer User's Guide                        Page: A - 6
  2122.  
  2123.  
  2124.  
  2125.         Path Analyzer 01.00   MONDAY     07/29/85    09:36:43    Page:  3
  2126.         autopath.log
  2127.         End TEST_CASE1.ONE_PASS                                                         
  2128.         Resume TEST_CASE1                                                               
  2129.               [6]                                                                       
  2130.         Begin TEST_CASE1.ONE_PASS                                                       
  2131.               [1-2] [2] [2-3] \ [2-3] \ [2] [2-3] \ [2-3] \ [2] [2]                     
  2132.               [4]                                                                       
  2133.         End TEST_CASE1.ONE_PASS                                                         
  2134.         Resume TEST_CASE1                                                               
  2135.               [6]                                                                       
  2136.         Begin TEST_CASE1.ONE_PASS                                                       
  2137.               [1-2] [2-3] \ [2-3] \ [2] [2] [2-3] \ [2] [2] [2] [4]                     
  2138.         End TEST_CASE1.ONE_PASS                                                         
  2139.         Resume TEST_CASE1                                                               
  2140.               [6]                                                                       
  2141.         Begin TEST_CASE1.ONE_PASS                                                       
  2142.               [1-2] [2-3] \ [2] [2] [2-3] \ [2] [2] [2] [2] [4]                         
  2143.         End TEST_CASE1.ONE_PASS                                                         
  2144.         Resume TEST_CASE1                                                               
  2145.               [6]                                                                       
  2146.         Begin TEST_CASE1.ONE_PASS                                                       
  2147.               [1-3] \ [2] [2] [2-3] \ [2] [2] [2] [2] [2] [4]                           
  2148.         End TEST_CASE1.ONE_PASS                                                         
  2149.         Resume TEST_CASE1                                                               
  2150.               [6]                                                                       
  2151.         Begin TEST_CASE1.ONE_PASS                                                       
  2152.               [1-2] [2] [2] [2] [2] [2] [2] [2] [2] [4]                                 
  2153.         End TEST_CASE1.ONE_PASS                                                         
  2154.         Resume TEST_CASE1                                                               
  2155.               [6]                                                                       
  2156.         Begin TEST_CASE1.ONE_PASS                                                       
  2157.               [1-2] [2] [2] [2] [2] [2] [2] [2] [2] [4]                                 
  2158.         End TEST_CASE1.ONE_PASS                                                         
  2159.         Resume TEST_CASE1                                                               
  2160.               [6]                                                                       
  2161.         Begin TEST_CASE1.ONE_PASS                                                       
  2162.               [1-2] [2] [2] [2] [2] [2] [2] [2] [2] [4]                                 
  2163.         End TEST_CASE1.ONE_PASS                                                         
  2164.         Resume TEST_CASE1                                                               
  2165.               [7]                                                                       
  2166.         End TEST_CASE1                                                                  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.  
  2186.  
  2187.  
  2188.         Automatic Path Analyzer User's Guide                        Page: A - 7
  2189.  
  2190.  
  2191.  
  2192.         Path Analyzer 01.00    MONDAY    07/29/85    09:36:43    Page:  4
  2193.         autopath.log
  2194.                 
  2195.               Statement           Execution Count
  2196.               ---------           ---------------
  2197.          TEST_CASE1                                                                      
  2198.               [1]                        16                                             
  2199.               [2]                       144                                             
  2200.               [3]                        48                                             
  2201.               [4]                        16                                             
  2202.               [5]                         2                                             
  2203.               [6]                        16                                             
  2204.               [7]                         2                                             
  2205.  
  2206.  
  2207.  
  2208.  
  2209.  
  2210.  
  2211.  
  2212.  
  2213.  
  2214.  
  2215.  
  2216.  
  2217.  
  2218.  
  2219.  
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.  
  2252.  
  2253.  
  2254.         Automatic Path Analyzer User's Guide              Page: B - 1
  2255.  
  2256.  
  2257.         
  2258.  
  2259.                                   GLOSSARY
  2260.  
  2261.         Execution Log File
  2262.              A  sequential  file  created by the  Run  Time  Monitor 
  2263.              during  execution  of  an Ada  program  that  has  been 
  2264.              instrumented  by  the Source  Instrumenter.  The  terms 
  2265.              "Execution    Log    File"   and   "Log    File"    are 
  2266.              interchangeable.
  2267.         
  2268.         Log File
  2269.              A  sequential  file  created by the  Run  Time  Monitor 
  2270.              during  execution  of  an Ada  program  that  has  been 
  2271.              instrumented  by  the Source  Instrumenter.  The  terms 
  2272.              "Execution    Log    File"   and   "Log    File"    are 
  2273.              interchangeable.
  2274.         
  2275.         Program Unit
  2276.              Ada  programs  may  contain  four  different  types  of 
  2277.              program  units:   procedures,   functions,   tasks  and 
  2278.              generics.  However,  the Ada language also provides the 
  2279.              ability  to include executeable code within  a  package 
  2280.              body  that  is not included within any of  the  program 
  2281.              units contained in that package.  This code is executed 
  2282.              during  package  initialization  when  the  package  is 
  2283.              elaborated. Profile reports timing information for this 
  2284.              "initialization"  code  the  same as  for  Ada  program 
  2285.              units.     Therefore,     for    reporting    purposes, 
  2286.              initialization  code  within  a package  body  is  also 
  2287.              treated as a program unit.
  2288.         
  2289.         Report Time
  2290.              The   time  that  the  Profile  Report  Generator   was 
  2291.              executed.
  2292.         
  2293.         Run Time Monitor
  2294.             A  runtime kernel that gains control upon entry  to  and 
  2295.             exit  from  each instrumented Ada program unit and  logs 
  2296.             timing  information about the program's  execution.  The 
  2297.             runtime  execution  monitor  must  be  linked  with  the 
  2298.             instrumented Ada program units.
  2299.         
  2300.         Source Instrumenter
  2301.             An  Ada  program that parses the target Ada program  and 
  2302.             inserts  "hooks" that transfer control to the  Run  Time 
  2303.             Monitor  upon  entry to and exit from each  instrumented 
  2304.             Ada program unit. Each Ada program unit for which timing 
  2305.             information  is to be recorded must be  instrumented  by 
  2306.             the Source Instrumenter prior to compilation.
  2307.  
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316.  
  2317.  
  2318.  
  2319.  
  2320.         Automatic Path Analyzer User's Guide              Page: B - 2
  2321.  
  2322.  
  2323.         
  2324.         Test ID
  2325.             A  unique test identification specified by the user when 
  2326.             the  program  under test is executed.  The  Test  ID  is 
  2327.             stored  in  the  log file by the Run  Time  Monitor  and 
  2328.             included in the Test Configuration Report by the Profile 
  2329.             report generator.
  2330.         
  2331.         Test Time
  2332.              The  date  and time that the program under  test  began 
  2333.              execution.
  2334.  
  2335.  
  2336.  
  2337.  
  2338.  
  2339.  
  2340.  
  2341.  
  2342.  
  2343.  
  2344.  
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381.  
  2382.  
  2383.  
  2384.  
  2385.  
  2386. 
  2387. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  2388. --path.ug
  2389. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  2390.  
  2391.  
  2392.  
  2393.  
  2394.  
  2395.  
  2396.  
  2397.  
  2398.  
  2399.         
  2400.  
  2401.                                     Ada*
  2402.  
  2403.                                Path Analyzer
  2404.  
  2405.                                 User's Guide
  2406.  
  2407.  
  2408.  
  2409.  
  2410.                                      by
  2411.  
  2412.                                 Julie Trost
  2413.  
  2414.  
  2415.  
  2416.  
  2417.  
  2418.  
  2419.  
  2420.  
  2421.  
  2422.  
  2423.  
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.         * Ada is a trademark of the U.S. Department of Defense (AJPO)
  2446.  
  2447.         
  2448.  
  2449.  
  2450.  
  2451.  
  2452.  
  2453.  
  2454.  
  2455.  
  2456.                     Ada Path Analyzer User's Guide
  2457.  
  2458.  
  2459.                                   CONTENTS
  2460.  
  2461.  
  2462.  
  2463.         1.0  DESCRIPTION ....................................... 1
  2464.  
  2465.  
  2466.         2.0  COMMAND FORMAT .................................... 2
  2467.  
  2468.         2.1    Source Program Instrumentation .................. 2
  2469.  
  2470.         2.2    Compilation and Linking ......................... 2
  2471.  
  2472.         2.3    Target Program Execution ........................ 3
  2473.  
  2474.         2.4    Report Generation ............................... 5
  2475.  
  2476.  
  2477.         3.0  OUTPUT FORMAT ..................................... 7
  2478.  
  2479.         3.1    Test Configuration Report ....................... 7
  2480.  
  2481.         3.2    History of Execution Report ..................... 8
  2482.  
  2483.         3.3    Execution Summary Report ........................ 8
  2484.  
  2485.  
  2486.         4.0  RESTRICTIONS AND LIMITATIONS ...................... 9
  2487.  
  2488.  
  2489.         APPENDIX A - SAMPLE REPORT FILE ........................ A-1
  2490.  
  2491.         APPENDIX B - GLOSSARY .................................. B-1
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514.  
  2515.  
  2516.  
  2517.  
  2518.  
  2519.  
  2520.  
  2521.  
  2522.         Path Analyzer User's Guide                           Page: 1
  2523.  
  2524.  
  2525.         
  2526.                               1.0  DESCRIPTION
  2527.         
  2528.              The Ada Path Analyzer,  Path,  is one of an  integrated 
  2529.         set of five tools that provide testing and analysis aids for 
  2530.         the  development of computer programs implemented in the Ada 
  2531.         programming language.  Specifically, Path provides execution 
  2532.         information  on  an  Ada program to enable  the  analyst  to 
  2533.         identify  program  units  that  are  never  executed.   Path 
  2534.         consists of three elements:
  2535.  
  2536.         1)   A  source  instrumenter  that  parses  the  target  Ada 
  2537.              program  and inserts "hooks" that transfer control to a 
  2538.              runtime  kernal at each statement in each  instrumented 
  2539.              Ada  program  unit.  Each  Ada program unit  for  which 
  2540.              execution  information  is  to  be  recorded  must   be 
  2541.              instrumented prior to compilation.
  2542.  
  2543.         2)   A runtime execution monitor,  or  kernel,   that  gains 
  2544.              control  at  each  statement in each  instrumented  Ada 
  2545.              program  unit and logs information about the  program's 
  2546.              execution. The runtime execution monitor must be linked 
  2547.              with the instrumented Ada program units.
  2548.  
  2549.         3)   A report generator that analyzes the recorded execution     
  2550.              information  and produces a comprehensive report in  an 
  2551.              easily understandable format. Reports generated provide 
  2552.              detailed quantitative information about the history  of 
  2553.              execution  and  a  summary of execution  for  each  Ada 
  2554.              program unit.
  2555.  
  2556.  
  2557.              Path is a software development tool.  Its purpose is to 
  2558.         aid  the programmer or analyst in identifying statements  or 
  2559.         blocks of code that are not executed or are executed a large 
  2560.         number of times. Path can aid the programmer or analyst:
  2561.          
  2562.           O  during  program development in identifying those  parts 
  2563.              of  the  program that are not being used.
  2564.  
  2565.           O  in   analyzing  existing  programs   with   performance 
  2566.              problems  to identify inefficiencies or areas that  may 
  2567.              benefit  from optimization and result in  significantly 
  2568.              improved overall program performance.
  2569.  
  2570.           O  identify untested areas of code.
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.  
  2581.  
  2582.  
  2583.  
  2584.  
  2585.  
  2586.  
  2587.  
  2588.         Path Analyzer User's Guide                           Page: 2
  2589.  
  2590.  
  2591.         
  2592.                             2.0  COMMAND FORMAT
  2593.         
  2594.              Operation of the Ada Path Analyzer requires four steps:
  2595.         
  2596.              1) source program instrumentation
  2597.  
  2598.              2) compilation and linking
  2599.  
  2600.              3) target program execution
  2601.  
  2602.              4) report generation
  2603.         
  2604.              Each  of  these  steps is described in  detail  in  the 
  2605.         following paragraphs.
  2606.  
  2607.         
  2608.         2.1  Source Program Instrumentation
  2609.         
  2610.              Each Ada compilation unit containing program units  for 
  2611.         which  execution  trace  data  is to  be  recorded  must  be 
  2612.         separately instrumented by the source instrumenter. The Path 
  2613.         Analyzer   will   provide   the  most   accurate   execution 
  2614.         information  on  programs  and subprograms  that  have  been 
  2615.         instrumented at each statement. However, it may also be used 
  2616.         to  provide execution analysis of programs  and  subprograms 
  2617.         that  have  been  instrumented  at  decision  points  or  at 
  2618.         entry/exit  points   for use with the Performance  Analyzer, 
  2619.         Automatic Path Analyzer,  or Self Metric Instrumentation and 
  2620.         Analysis Tool.
  2621.  
  2622.              Refer  to  the  Source Instrumenter  User's  Guide  for 
  2623.         detailed information on using the Source Instrumenter.
  2624.  
  2625.         
  2626.         2.2  Compilation and Linking
  2627.         
  2628.              When  the  instrumentation  process  is  completed  the 
  2629.         instrumented target Ada program must be compiled and  linked 
  2630.         to   prepare  it  for  execution.   Each  instrumented   Ada 
  2631.         compilation  unit  must  be separately  compiled.  When  the 
  2632.         compilation process is completed the target program must  be 
  2633.         linked with the Ada Path Analyzer Run Time Monitor.
  2634.  
  2635.             The   user  should  follow  the  normal  procedures  for 
  2636.         compiling  and  linking with the Ada compiler  system  being 
  2637.         used for program development.
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.  
  2648.  
  2649.  
  2650.  
  2651.  
  2652.  
  2653.  
  2654.         Path Analyzer User's Guide                           Page: 3
  2655.  
  2656.  
  2657.         
  2658.         2.3  Target Program Execution
  2659.         
  2660.             When linking is completed, the target Ada program may be 
  2661.         executed.  The  user interface and method of  executing  the 
  2662.         target   program  is  not  altered  by  the  instrumentation 
  2663.         process.  Therefore,  the  user  should  follow  the  normal 
  2664.         procedures  for  executing the target program  on  the  host 
  2665.         computer system being used for program development.
  2666.  
  2667.              When  the first unit of the target program is  entered, 
  2668.         the  Run Time Monitor will prompt the user for the following 
  2669.         information:
  2670.  
  2671.           1. Tool_Name :  The  user should enter PATH_TOOL (upper or 
  2672.              lower  case is acceptable).   If the user should  enter 
  2673.              an  invalid tool name,  he will be repeatedly  prompted 
  2674.              until  a correct tool name is entered or the program is 
  2675.              aborted.
  2676.  
  2677.           2. Logfile_Name :  The user should  enter a legal filename 
  2678.              for the computer he is using.  The default filename may 
  2679.              be  chosen by entering a carriage return.   The default 
  2680.              Logfile_Name is PATH.LOG.
  2681.  
  2682.                  If the File already exists, the user is asked if he 
  2683.              would  like  to Enter a  new  filename,  Overwrite  the 
  2684.              existing file, or Append to the existing file.
  2685.  
  2686.           3. Test_Identification:  The  user  is  asked to  enter  a 
  2687.              unique  test identification which can be any valid  Ada 
  2688.              string. The default Test ID may be selected by entering 
  2689.              a  carriage return.   The default Test ID for  Path  is 
  2690.              "Path Analysis Report".  The Test ID is recorded in the 
  2691.              log  file generated by the Run Time Monitor and printed 
  2692.              on the Test Configuration Report generated by the  Path 
  2693.              Report Generator. 
  2694.  
  2695.         A  sample session with the Ada Path Analyzer is presented on 
  2696.         the following page.
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711.  
  2712.  
  2713.  
  2714.  
  2715.  
  2716.  
  2717.  
  2718.  
  2719.  
  2720.         Path Analyzer User's Guide                           Page: 4
  2721.  
  2722.  
  2723.         
  2724.         EXAMPLE SESSION
  2725.         
  2726.         Following  is  a sample session with the Run  Time  Monitor. 
  2727.         (User responses are shown in Bold Face):
  2728.  
  2729.  
  2730.              Enter Tool Type : PATH_TOOL, AUTOPATH_TOOL,
  2731.                                SMART_TOOL, or PROFILE_TOOL
  2732.              -----> PATH_TOOL <cr>*
  2733.  
  2734.              Enter Logfile Name, Null for Default
  2735.              -----> Testa.log <cr>
  2736.  
  2737.  
  2738.         If  the  Logfile already exists,  the following message  and 
  2739.         prompt are printed:
  2740.  
  2741.              File already exists!!! Do you wish to:
  2742.                   E = Enter a New Filename
  2743.                   O = Overwrite existing file
  2744.                   A = Append to the existing file
  2745.  
  2746.              Enter Option ===> O <cr>
  2747.  
  2748.         The Run Time Monitor will repeatedly prompt the user until a 
  2749.         valid option is entered.
  2750.  
  2751.              Enter a unique Test Identification, Null for default.
  2752.              Log File Test Case #5 <cr>
  2753.  
  2754.  
  2755.              When the Run Time Monitor input is complete, the target 
  2756.         program resumes its normal execution.     
  2757.  
  2758.         * <cr> represents a carriage return.
  2759.  
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767.  
  2768.  
  2769.  
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.  
  2777.  
  2778.  
  2779.  
  2780.  
  2781.  
  2782.  
  2783.  
  2784.  
  2785.  
  2786.         Path Analyzer User's Guide                           Page: 5
  2787.  
  2788.  
  2789.         
  2790.         2.4  Report Generation
  2791.         
  2792.              During  execution,  the instrumented Ada  program  will 
  2793.         create  a log file containing program execution trace  data. 
  2794.         The  Ada Path Analyzer Report Generator,   analyzes the data 
  2795.         and presents it in an easily understood format.
  2796.  
  2797.              The  Path  report  generator  is  one  of  four  report 
  2798.         generators  included  in the Ada Test  and  Analysis  System 
  2799.         Report  Generator.  The  report  generator  is  executed  as 
  2800.         follows:
  2801.  
  2802.         (User input and responses shown in are Bold Face)
  2803.  
  2804.           RUN TEST_TOOLS <cr>
  2805.  
  2806.         The user will be prompted to enter the name of the reporting 
  2807.         tool  he  wishes to run.  To execute Path,  the user  should 
  2808.         respond with the tool name, Path.
  2809.  
  2810.  
  2811.         EXAMPLE
  2812.  
  2813.           Welcome to the Test Tools
  2814.           please enter desired tool
  2815.           enter ? for a list of tools available
  2816.           PATH <cr>
  2817.  
  2818.  
  2819.  
  2820.         If  an  incorrect  tool  name is entered the  user  will  be 
  2821.         prompted  to reenter the tool name.  When a valid tool  name 
  2822.         has been entered the user will be prompted to enter the name 
  2823.         of  the log file to be processed and the name of the  report 
  2824.         file to be generated.
  2825.  
  2826.  
  2827.         EXAMPLE
  2828.  
  2829.           Enter Log_File_Name => TASKLOG.LOG <cr>
  2830.           Enter Report_File_Name => TASKLOG.RPT <cr>
  2831.  
  2832.         If  the user doesn't enter a Report_File_Name,  it  will  be 
  2833.         derived from the Log_File_Name, with '.RPT' appended.
  2834.  
  2835.         Path  will  display  the test configuration  data  that  was 
  2836.         recorded in the log file at the time the program under  test  
  2837.         was  executed.   The user is then prompted as to whether  or 
  2838.         not he wishes to continue.
  2839.  
  2840.         After  examining the test configuration data,  the user  can 
  2841.         discontinue processing by entering "N".   If the correct log 
  2842.         file  has  been  selected,  the  user should  enter  "Y"  to 
  2843.         continue processing.
  2844.  
  2845.  
  2846.  
  2847.  
  2848.  
  2849.  
  2850.  
  2851.  
  2852.         Path Analyzer User's Guide                           Page: 6
  2853.  
  2854.  
  2855.  
  2856.         EXAMPLE
  2857.  
  2858.           Program Under Test:        Testlog
  2859.           Test Date:                 06/23/85
  2860.           Test Time:                 20:24:59
  2861.           Test ID:                   Log File Test Case #5
  2862.  
  2863.           Do you wish to continue (Y/N) ? Y <cr>
  2864.  
  2865.         If the user enters "N", processing will be discontinued.  
  2866.  
  2867.  
  2868.         
  2869.         EXAMPLE SESSION
  2870.         
  2871.         Following is a sample session with the Report Generator
  2872.         (User input and responses shown in are Bold Face):
  2873.  
  2874.         $   RUN TEST_TOOLS <cr>
  2875.  
  2876.         Welcome to the Test Tools
  2877.         please enter desired tool
  2878.         enter ? for a list of tools available
  2879.         ? <cr>
  2880.  
  2881.         The following tools may be executed:
  2882.           path -- the report generator for the path analysis tool
  2883.           profile -- the report generator for the timing tool
  2884.           smart -- the report generator for the self metric tool
  2885.           autopath -- the report generator for the automatic path tool
  2886.           source_instrument -- instrument an Ada source file
  2887.  
  2888.         please enter desired tool
  2889.         Path <cr>
  2890.  
  2891.         Enter Log_File_Name => TASKLOG.LOG <cr>
  2892.         Enter Report_File_Name => <cr>
  2893.  
  2894.         log_file_name = TASKLOG.LOG
  2895.         report_file_name = TASKLOG.RPT
  2896.  
  2897.         Program Under Test:          Testlog
  2898.         Test Date:                   06/23/85
  2899.         Test Time:                   20:24:59
  2900.         Test ID:                     Log File Test Case #5
  2901.  
  2902.         Do you wish to continue (Y/N) ? Y <cr>
  2903.  
  2904.         please enter desired tool
  2905.         quit <cr>
  2906.         $
  2907.  
  2908.  
  2909.  
  2910.  
  2911.  
  2912.  
  2913.  
  2914.  
  2915.  
  2916.  
  2917.  
  2918.         Path Analyzer User's Guide                           Page: 7
  2919.  
  2920.  
  2921.         
  2922.                              3.0  OUTPUT FORMAT
  2923.         
  2924.              The   report  file  generated  by  PATH  contains three 
  2925.         reports: a Test Configuration Report, a History Of Execution 
  2926.         Report  and  an  Execution  Summary  Report.    Each  report 
  2927.         provides  the  user  with different  information  about  the 
  2928.         program being tested and is generated in 80 column format to 
  2929.         enable  "browsing"  at a terminal when  hardcopy  is  either 
  2930.         unavailable or not desired. A sample report file is included 
  2931.         in Appendix A.
  2932.  
  2933.              Prior   to  using  the  Path  report  generator  it  is 
  2934.         important for the user to understand the information that is 
  2935.         being  presented  and  how to  interpret  it.  Each  of  the 
  2936.         execution  reports  is  described  below.   
  2937.         
  2938.         3.1  Test Configuration Report
  2939.         
  2940.  
  2941.              The  Test  Configuration  Report  includes  information 
  2942.         necessary  to correlate the report with a specific  test  or 
  2943.         execution  of  the  target Ada  program.   It  includes  the 
  2944.         following information:
  2945.  
  2946.            1)  Program Under Test:
  2947.                This  is  the name of the main program  unit  of  the 
  2948.                program being analyzed.
  2949.  
  2950.            2)  Test Date:
  2951.                The  calendar  date that the program under  test  was 
  2952.                executed and the execution log file was created.  The 
  2953.                test date is presented in the form MM/DD/YY. 
  2954.  
  2955.            3)  Test Day:
  2956.                The day of the week,  Sunday through  Saturday,  that 
  2957.                the program under test was executed and the execution 
  2958.                log file was created.
  2959.          
  2960.            4)  Test Time:
  2961.                The  time  of  day that the program  under  test  was 
  2962.                executed and the execution log file was created.  The 
  2963.                test time is presented in the form HH:MM:SS.
  2964.  
  2965.            5)  Log File:
  2966.                The  name  of  the  log file that  was  used  in  the 
  2967.                preparation of the execution timing reports.
  2968.  
  2969.            6)  Test ID:
  2970.                The  test  ID specified by the user at the  time  the 
  2971.                program under test was executed. 
  2972.  
  2973.  
  2974.  
  2975.  
  2976.  
  2977.  
  2978.  
  2979.  
  2980.  
  2981.  
  2982.  
  2983.  
  2984.         Path Analyzer User's Guide                           Page: 8
  2985.  
  2986.  
  2987.  
  2988.         
  2989.         3.2  History Of Execution Report
  2990.         
  2991.              This  report  lists the order in which  the  statements 
  2992.         executed.   A 'Begin' indicates the program unit was entered 
  2993.         at  the first statement.   A 'Resume' indicates the  program 
  2994.         unit  was  entered  at  a statement  other  than  the  first 
  2995.         statement.   An  'End'  indicates the last statement of  the 
  2996.         program  unit  was  executed.   Consecutive  statements  are 
  2997.         grouped together in square brackets '[]'.   A backslash  '/' 
  2998.         indicates  a  backward  jump  in the  code  (a  decrease  in 
  2999.         statement numbers). 
  3000.         
  3001.         3.3  Execution Summary Report
  3002.         
  3003.              This  report lists the number of times  each  statement 
  3004.         was  executed.  Statements are listed under the  compilation 
  3005.         unit  name.   Consecutive statements that were executed  the 
  3006.         same number of times are grouped together in square brackets 
  3007.         '[]'.
  3008.  
  3009.  
  3010.  
  3011.  
  3012.  
  3013.  
  3014.  
  3015.  
  3016.  
  3017.  
  3018.  
  3019.  
  3020.  
  3021.  
  3022.  
  3023.  
  3024.  
  3025.  
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.  
  3032.  
  3033.  
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.  
  3041.  
  3042.  
  3043.  
  3044.  
  3045.  
  3046.  
  3047.  
  3048.  
  3049.  
  3050.         Path Analyzer User's Guide                           Page: 9
  3051.  
  3052.  
  3053.         
  3054.                        4.0  RESTRICTIONS AND LIMITATIONS
  3055.         
  3056.  
  3057.         1)  No  specific  limits are imposed either by  the  Runtime 
  3058.             Monitor  or  the Profile report generator on either  the 
  3059.             size of the target Ada program or the number of  program 
  3060.             units  that can be instrumented.   All arrays and stacks 
  3061.             maintained  by  Path  that are a function of  the  total 
  3062.             number  of program units or the number of program  units 
  3063.             active  at  a given time are allocated  dynamically  and 
  3064.             deallocated when they are no longer needed. 
  3065.  
  3066.         2)  Execution  data may only be reported for  program  units 
  3067.             that have been instrumented by the source instrumenter.
  3068.  
  3069.         3)  Regardless  of  whether or not the Ada  compiler  system 
  3070.             being used for program development provides an interface 
  3071.             to  programming  languages  other  than  Ada,  only  Ada 
  3072.             program units may be instrumented.
  3073.  
  3074.         4)  The  numbers  recorded in the output file represent  the 
  3075.             breakpoint  number  not  the  statement  number.   If  a 
  3076.             program unit is instrumented at entry/exit, it will have 
  3077.             2  breakpoints.   If  a program unit is  instrumented at 
  3078.             entry/exit/decision  points,  it  will have  breakpoints 
  3079.             throughout  the  code but not every  statement  will  be 
  3080.             represented.   If a program unit is instrumented at each 
  3081.             statement,   breakpoint   numbers  will  correspond   to 
  3082.             statement numbers.
  3083.  
  3084.  
  3085.  
  3086.  
  3087.  
  3088.  
  3089.  
  3090.  
  3091.  
  3092.  
  3093.  
  3094.  
  3095.  
  3096.  
  3097.  
  3098.  
  3099.  
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.  
  3108.  
  3109.  
  3110.  
  3111.  
  3112.  
  3113.  
  3114.  
  3115.  
  3116.         Path Analyzer User's Guide                Page: A - 1
  3117.  
  3118.  
  3119.  
  3120.  
  3121.  
  3122.  
  3123.  
  3124.  
  3125.  
  3126.  
  3127.  
  3128.         
  3129.                                  APPENDIX A
  3130.  
  3131.                                SAMPLE REPORT
  3132.         
  3133.  
  3134.  
  3135.  
  3136.  
  3137.  
  3138.  
  3139.  
  3140.  
  3141.  
  3142.  
  3143.  
  3144.  
  3145.  
  3146.  
  3147.  
  3148.  
  3149.  
  3150.  
  3151.  
  3152.  
  3153.  
  3154.  
  3155.  
  3156.  
  3157.  
  3158.  
  3159.  
  3160.  
  3161.  
  3162.  
  3163.  
  3164.  
  3165.  
  3166.  
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.  
  3173.  
  3174.  
  3175.  
  3176.  
  3177.  
  3178.  
  3179.  
  3180.  
  3181.  
  3182.         Path Analyzer User's Guide                                  Page: A - 2
  3183.  
  3184.  
  3185.  
  3186.         Source Instrumenter Output on 07/29/85 at 09:27:03                  1
  3187.         Source File: test_case1.ada
  3188.  
  3189.         Bkpt
  3190.         Number  Source Text
  3191.         ------  -----------
  3192.               procedure TEST_CASE1 is 
  3193.  
  3194.                 type STORAGE_ARRAY is array(INTEGER range <>) of INTEGER; 
  3195.                 STORAGE : STORAGE_ARRAY(1 .. 10) := (15, 12, 14, 10, 2, 5,
  3196.                   1, 4, 11, 12);
  3197.  
  3198.                 procedure ONE_PASS(S : in out STORAGE_ARRAY) is 
  3199.                   TEMP : INTEGER; 
  3200.                 begin
  3201.         1         for I in S'FIRST .. S'LAST - 1 loop
  3202.         2           if S(I) > S(I + 1) then 
  3203.         3             TEMP := S(I); 
  3204.                       S(I) := S(I + 1); 
  3205.                       S(I + 1) := TEMP; 
  3206.                     end if; 
  3207.                   end loop; 
  3208.         4       end ONE_PASS; 
  3209.  
  3210.               begin
  3211.         5       for J in 1 .. STORAGE'LAST - STORAGE'FIRST - 1 loop
  3212.         6         ONE_PASS(STORAGE); 
  3213.                 end loop; 
  3214.         7     end TEST_CASE1; 
  3215.  
  3216.  
  3217.  
  3218.  
  3219.  
  3220.  
  3221.  
  3222.  
  3223.  
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.  
  3231.  
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.  
  3241.  
  3242.  
  3243.  
  3244.  
  3245.  
  3246.  
  3247.         Path Analyzer User's Guide                                  Page: A - 3
  3248.  
  3249.  
  3250.  
  3251.         Path Analyzer 01.00     MONDAY     07/29/85    09:36:10    Page:  1
  3252.          
  3253.          
  3254.                          Ada Path Analyzer - Test Configuration Report
  3255.         --------------------------------------------------------------------------------
  3256.  
  3257.          
  3258.          
  3259.                Program Under Test:      TEST_CASE1
  3260.  
  3261.                Test Date:               07/29/85
  3262.  
  3263.                Test Day:                MONDAY
  3264.  
  3265.                Test Time:               09:30:01
  3266.  
  3267.                Log File:                path1.log
  3268.  
  3269.                Test ID:                 Path Analysis Report          
  3270.  
  3271.  
  3272.  
  3273.  
  3274.  
  3275.  
  3276.  
  3277.  
  3278.  
  3279.  
  3280.  
  3281.  
  3282.  
  3283.  
  3284.  
  3285.  
  3286.  
  3287.  
  3288.  
  3289.  
  3290.  
  3291.  
  3292.  
  3293.  
  3294.  
  3295.  
  3296.  
  3297.  
  3298.  
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304.  
  3305.  
  3306.  
  3307.  
  3308.  
  3309.  
  3310.  
  3311.  
  3312.  
  3313.  
  3314.         Path Analyzer User's Guide                                  Page: A - 4
  3315.  
  3316.  
  3317.  
  3318.         Path Analyzer 01.00     MONDAY   07/29/85    09:36:10    Page:  2
  3319.         path1.log
  3320.                 
  3321.         Begin TEST_CASE1                                                                
  3322.               [5-6]                                                                     
  3323.         Begin TEST_CASE1.ONE_PASS                                                       
  3324.               [1-3] \ [2-3] \ [2-3] \ [2-3] \ [2-3] \ [2-3] \ [2-3] \                   
  3325.               [2-3] \ [2-4]                                                             
  3326.         End TEST_CASE1.ONE_PASS                                                         
  3327.         Resume TEST_CASE1                                                               
  3328.               [6]                                                                       
  3329.         Begin TEST_CASE1.ONE_PASS                                                       
  3330.               [1-2] [2-3] \ [2-3] \ [2-3] \ [2-3] \ [2-3] \ [2-3] \                     
  3331.               [2-3] \ [2] [4]                                                           
  3332.         End TEST_CASE1.ONE_PASS                                                         
  3333.         Resume TEST_CASE1                                                               
  3334.               [6]                                                                       
  3335.         Begin TEST_CASE1.ONE_PASS                                                       
  3336.               [1-3] \ [2-3] \ [2-3] \ [2-3] \ [2-3] \ [2-3] \ [2] [2]                   
  3337.               [2] [4]                                                                   
  3338.         End TEST_CASE1.ONE_PASS                                                         
  3339.         Resume TEST_CASE1                                                               
  3340.               [6]                                                                       
  3341.         Begin TEST_CASE1.ONE_PASS                                                       
  3342.               [1-3] \ [2-3] \ [2-3] \ [2-3] \ [2] [2] [2] [2] [2] [4]                   
  3343.         End TEST_CASE1.ONE_PASS                                                         
  3344.         Resume TEST_CASE1                                                               
  3345.               [6]                                                                       
  3346.         Begin TEST_CASE1.ONE_PASS                                                       
  3347.               [1-2] [2-3] \ [2-3] \ [2] [2] [2] [2] [2] [2] [4]                         
  3348.         End TEST_CASE1.ONE_PASS                                                         
  3349.         Resume TEST_CASE1                                                               
  3350.               [6]                                                                       
  3351.         Begin TEST_CASE1.ONE_PASS                                                       
  3352.               [1-3] \ [2] [2] [2] [2] [2] [2] [2] [2] [4]                               
  3353.         End TEST_CASE1.ONE_PASS                                                         
  3354.         Resume TEST_CASE1                                                               
  3355.               [6]                                                                       
  3356.         Begin TEST_CASE1.ONE_PASS                                                       
  3357.               [1-2] [2] [2] [2] [2] [2] [2] [2] [2] [4]                                 
  3358.         End TEST_CASE1.ONE_PASS                                                         
  3359.         Resume TEST_CASE1                                                               
  3360.               [6]                                                                       
  3361.         Begin TEST_CASE1.ONE_PASS                                                       
  3362.               [1-2] [2] [2] [2] [2] [2] [2] [2] [2] [4]                                 
  3363.         End TEST_CASE1.ONE_PASS                                                         
  3364.         Resume TEST_CASE1                                                               
  3365.               [7]                                                                       
  3366.         End TEST_CASE1                                                                  
  3367.  
  3368.  
  3369.  
  3370.  
  3371.  
  3372.  
  3373.  
  3374.  
  3375.  
  3376.  
  3377.  
  3378.  
  3379.  
  3380.         Path Analyzer User's Guide                                  Page: A - 5
  3381.  
  3382.  
  3383.  
  3384.         Path Analyzer 01.00     MONDAY   07/29/85    09:36:10    Page:  3
  3385.         path1.log
  3386.                 
  3387.               Statement           Execution Count
  3388.               ---------           ---------------
  3389.         TEST_CASE1                                                                      
  3390.               [1]                         1
  3391.               [2]                        72
  3392.               [3]                        29                                             
  3393.               [4]                         8                                             
  3394.               [5]                         1                                             
  3395.               [6]                         8 
  3396.               [7]                         1                                             
  3397.  
  3398.  
  3399.  
  3400.  
  3401.  
  3402.  
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409.  
  3410.  
  3411.  
  3412.  
  3413.  
  3414.  
  3415.  
  3416.  
  3417.  
  3418.  
  3419.  
  3420.  
  3421.  
  3422.  
  3423.  
  3424.  
  3425.  
  3426.  
  3427.  
  3428.  
  3429.  
  3430.  
  3431.  
  3432.  
  3433.  
  3434.  
  3435.  
  3436.  
  3437.  
  3438.  
  3439.  
  3440.  
  3441.  
  3442.  
  3443.  
  3444.  
  3445.  
  3446.  
  3447.         Path Analyzer User's Guide                       Page: B - 1
  3448.  
  3449.  
  3450.         
  3451.  
  3452.                                   GLOSSARY
  3453.  
  3454.         Execution Log File
  3455.              A  sequential  file  created by the  Run  Time  Monitor 
  3456.              during  execution  of  an Ada  program  that  has  been 
  3457.              instrumented  by  the Source  Instrumenter.  The  terms 
  3458.              "Execution    Log    File"   and   "Log    File"    are 
  3459.              interchangeable.
  3460.         
  3461.         Log File
  3462.              A  sequential  file  created by the  Run  Time  Monitor 
  3463.              during  execution  of  an Ada  program  that  has  been 
  3464.              instrumented  by  the Source  Instrumenter.  The  terms 
  3465.              "Execution    Log    File"   and   "Log    File"    are 
  3466.              interchangeable.
  3467.         
  3468.         Program Unit
  3469.              Ada  programs  may  contain  four  different  types  of 
  3470.              program  units:   procedures,   functions,   tasks  and 
  3471.              generics.  However,  the Ada language also provides the 
  3472.              ability  to include executeable code within  a  package 
  3473.              body  that  is not included within any of  the  program 
  3474.              units contained in that package.  This code is executed 
  3475.              during  package  initialization  when  the  package  is 
  3476.              elaborated. Profile reports timing information for this 
  3477.              "initialization"  code  the  same as  for  Ada  program 
  3478.              units.     Therefore,     for    reporting    purposes, 
  3479.              initialization  code  within  a package  body  is  also 
  3480.              treated as a program unit.
  3481.         
  3482.         Report Time
  3483.              The   time  that  the  Profile  Report  Generator   was 
  3484.              executed.
  3485.         
  3486.         Run Time Monitor
  3487.             A  runtime kernel that gains control upon entry  to  and 
  3488.             exit  from  each instrumented Ada program unit and  logs 
  3489.             timing  information about the program's  execution.  The 
  3490.             runtime  execution  monitor  must  be  linked  with  the 
  3491.             instrumented Ada program units.
  3492.         
  3493.         Source Instrumenter
  3494.             An  Ada  program that parses the target Ada program  and 
  3495.             inserts  "hooks" that transfer control to the  Run  Time 
  3496.             Monitor  upon  entry to and exit from each  instrumented 
  3497.             Ada program unit. Each Ada program unit for which timing 
  3498.             information  is to be recorded must be  instrumented  by 
  3499.             the Source Instrumenter prior to compilation.
  3500.  
  3501.  
  3502.  
  3503.  
  3504.  
  3505.  
  3506.  
  3507.  
  3508.  
  3509.  
  3510.  
  3511.  
  3512.  
  3513.         Path Analyzer User's Guide                       Page: B - 2
  3514.  
  3515.  
  3516.         
  3517.         Test ID
  3518.             A  unique test identification specified by the user when 
  3519.             the  program  under test is executed.  The  Test  ID  is 
  3520.             stored  in  the  log file by the Run  Time  Monitor  and 
  3521.             included in the Test Configuration Report by the Profile 
  3522.             report generator.
  3523.         
  3524.         Test Time
  3525.              The  date  and time that the program under  test  began 
  3526.              execution.
  3527.  
  3528.  
  3529.  
  3530.  
  3531.  
  3532.  
  3533.  
  3534.  
  3535.  
  3536.  
  3537.  
  3538.  
  3539.  
  3540.  
  3541.  
  3542.  
  3543.  
  3544.  
  3545.  
  3546.  
  3547.  
  3548.  
  3549.  
  3550.  
  3551.  
  3552.  
  3553.  
  3554.  
  3555.  
  3556.  
  3557.  
  3558.  
  3559.  
  3560.  
  3561.  
  3562.  
  3563.  
  3564.  
  3565.  
  3566.  
  3567.  
  3568.  
  3569.  
  3570.  
  3571.  
  3572.  
  3573.  
  3574.  
  3575.  
  3576.  
  3577.  
  3578.  
  3579. 
  3580. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  3581. --profile.ug
  3582. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  3583.  
  3584.  
  3585.  
  3586.  
  3587.  
  3588.  
  3589.  
  3590.  
  3591.  
  3592.         
  3593.  
  3594.                                     Ada*
  3595.  
  3596.                             Performance Analyzer
  3597.  
  3598.                                 ( PROFILE )
  3599.  
  3600.                                 Version 1.0
  3601.  
  3602.                                 User's Guide
  3603.  
  3604.  
  3605.  
  3606.  
  3607.                                      by
  3608.  
  3609.                                 Jeff England
  3610.  
  3611.                              Intermetrics, Inc.
  3612.  
  3613.  
  3614.  
  3615.  
  3616.  
  3617.  
  3618.  
  3619.  
  3620.  
  3621.  
  3622.  
  3623.  
  3624.  
  3625.  
  3626.  
  3627.  
  3628.  
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634.  
  3635.  
  3636.  
  3637.  
  3638.  
  3639.  
  3640.         * Ada is a trademark of the U.S. Department of Defense (AJPO)
  3641.  
  3642.  
  3643.  
  3644.  
  3645.  
  3646.  
  3647.  
  3648.  
  3649.         Performance Analyzer User's Guide                    Page: i
  3650.  
  3651.  
  3652.  
  3653.  
  3654.  
  3655.  
  3656.  
  3657.                                   PREFACE
  3658.  
  3659.  
  3660.               This program was developed by Intermetrics, Inc. 
  3661.               under Contract Number N66001-85-C-0032 for:
  3662.          
  3663.                       Naval Ocean Systems Center
  3664.                       271 Catalina Boulevard
  3665.                       San Diego, California  92152. 
  3666.  
  3667.  
  3668.  
  3669.  
  3670.  
  3671.  
  3672.  
  3673.  
  3674.  
  3675.  
  3676.  
  3677.  
  3678.  
  3679.  
  3680.  
  3681.  
  3682.  
  3683.  
  3684.  
  3685.  
  3686.  
  3687.  
  3688.  
  3689.  
  3690.  
  3691.  
  3692.  
  3693.  
  3694.  
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700.  
  3701.  
  3702.  
  3703.  
  3704.  
  3705.  
  3706.  
  3707.  
  3708.  
  3709.  
  3710.  
  3711.  
  3712.  
  3713.  
  3714.  
  3715.         Performance Analyzer User's Guide                   Page: ii
  3716.  
  3717.  
  3718.  
  3719.         
  3720.                                   CONTENTS
  3721.  
  3722.  
  3723.         1.0  DESCRIPTION .......................................   1
  3724.  
  3725.  
  3726.         2.0  COMMAND FORMAT ....................................   2
  3727.  
  3728.         2.1    Source Program Instrumentation ..................   2
  3729.  
  3730.         2.2    Compilation and Linking .........................   5
  3731.  
  3732.         2.3    Target Program Execution ........................   6
  3733.  
  3734.         2.4    Report Generation ...............................   8
  3735.  
  3736.  
  3737.         3.0  OUTPUT FORMAT .....................................  11
  3738.  
  3739.         3.1    Test Configuration Report .......................  11
  3740.  
  3741.         3.2    Total Execution Times Report ....................  12
  3742.  
  3743.         3.3    Net Execution Times Report ......................  15
  3744.  
  3745.         3.4    Cumulative Execution Times Report ...............  16
  3746.  
  3747.         3.5    Call Summary Report .............................  17
  3748.  
  3749.  
  3750.         4.0  INTERPRETING THE REPORTS ..........................  19
  3751.  
  3752.         4.1    Execution Times .................................  19
  3753.  
  3754.         4.2    Percent of Total Execution Time .................  19
  3755.          
  3756.         4.2    Tasks ...........................................  20
  3757.  
  3758.         4.3    Net Times vs Cumulative Times ...................  20
  3759.  
  3760.         4.4    Expected Errors .................................  20
  3761.  
  3762.         4.5    Clock Faults ....................................  21
  3763.  
  3764.         4.6    Dangling Units ..................................  22
  3765.  
  3766.              
  3767.         5.0  RESTRICTIONS AND LIMITATIONS ......................  23
  3768.  
  3769.  
  3770.         APPENDIX A - SAMPLE REPORT AND ANALYSIS ................ A-1
  3771.  
  3772.         APPENDIX B - GLOSSARY .................................. B-1
  3773.  
  3774.  
  3775.  
  3776.  
  3777.  
  3778.  
  3779.  
  3780.  
  3781.         Performance Analyzer User's Guide                    Page: 1
  3782.  
  3783.  
  3784.         
  3785.                               1.0  DESCRIPTION
  3786.         
  3787.              The  Ada Performance Analyzer,  Profile,  is one of  an 
  3788.         integrated  set  of  five tools  that  provide  testing  and 
  3789.         analysis  aids  for  the development  of  computer  programs 
  3790.         implemented  in the Ada programming language.  Specifically, 
  3791.         Profile  provides  timing information on an Ada  program  to 
  3792.         enable the analyst to identify program units that require  a 
  3793.         high  percentage  of total system  execution  time.  Profile 
  3794.         consists of three elements:
  3795.  
  3796.         1)  A source instrumenter that parses the target Ada program 
  3797.             and  inserts "hooks" that transfer control to a  runtime 
  3798.             kernal upon entry to and exit from each instrumented Ada 
  3799.             program  unit.  Each  Ada program unit for which  timing 
  3800.             information is to be recorded must be instrumented prior 
  3801.             to compilation.
  3802.  
  3803.         2)  A  runtime  execution monitor,  or  kernel,  that  gains 
  3804.             control upon entry to or exit from each instrumented Ada 
  3805.             program  unit  and  logs timing  information  about  the 
  3806.             program's execution.  The runtime execution monitor must 
  3807.             be linked with the instrumented Ada program units.
  3808.  
  3809.         3)  A  report  generator that analyzes the  recorded  timing 
  3810.             information  and  produces a  comprehensive  timing  and 
  3811.             execution  profile  in an easily understandable  format. 
  3812.             Reports   generated   provide   detailed    quantitative 
  3813.             information   about  the  percentage  of  total  program 
  3814.             execution  time spent in each instrumented  Ada  program 
  3815.             unit.
  3816.  
  3817.  
  3818.              Profile is a software development tool.  Its purpose is 
  3819.         not  so  much  to time the execution of  the  program  being 
  3820.         analyzed,  but  rather  to aid the programmer or analyst  in 
  3821.         identifying   those  program  units  that  require  a   high 
  3822.         percentage  of total program execution time.   It  has  been 
  3823.         said  that  in  most  programs  90%  of  the  total  program 
  3824.         execution  time  is  usually  spent  executing  10%  of  the 
  3825.         program's code. Profile can aid the programmer or analyst:
  3826.          
  3827.           O  during  program development in identifying those  parts 
  3828.              of  the  program that may later result  in  performance 
  3829.              problems. 
  3830.  
  3831.           O  in   analyzing  existing  programs   with   performance 
  3832.              problems  to identify inefficiencies or areas that  may 
  3833.              benefit  from optimization and result in  significantly 
  3834.              improved overall program performance.
  3835.  
  3836.  
  3837.  
  3838.  
  3839.  
  3840.  
  3841.  
  3842.  
  3843.  
  3844.  
  3845.  
  3846.  
  3847.         Performance Analyzer User's Guide                    Page: 2
  3848.  
  3849.  
  3850.         
  3851.                             2.0  COMMAND FORMAT
  3852.         
  3853.              Operation  of the Ada Performance Analyzer consists  of 
  3854.         four steps:
  3855.         
  3856.              1) source program instrumentation
  3857.  
  3858.              2) compilation and linking
  3859.  
  3860.              3) target program execution
  3861.  
  3862.              4) report generation
  3863.         
  3864.              Each  of  these  steps is described in  detail  in  the 
  3865.         following paragraphs.
  3866.  
  3867.         
  3868.         2.1  Source Program Instrumentation
  3869.         
  3870.              Each Ada compilation unit containing program units  for 
  3871.         which execution trace and timing data is to be recorded must 
  3872.         be  separately instrumented by the source instrumenter.  The 
  3873.         Performance  Analyzer will provide the most accurate  timing 
  3874.         information  on  programs  and subprograms  that  have  been 
  3875.         instrumented  at entry/exit only.  However,  it may also  be 
  3876.         used to provide timing analysis of programs and  subprograms 
  3877.         that  have been instrumented at decision points or at  every 
  3878.         statement  for  use with the Path Analyzer,  Automatic  Path 
  3879.         Analyzer, or Self Metric Instrumentation and Analysis Tool.
  3880.  
  3881.              The  Source Instrumenter is one of five tools  included 
  3882.         in the Ada Test and Analysis System shell,  TEST_TOOLS,  and 
  3883.         is executed as follows:
  3884.  
  3885.         (User input and responses are shown in Bold Face)
  3886.  
  3887.           RUN TEST_TOOLS <cr>
  3888.  
  3889.         The  Test_Tools prompt will then be displayed and  the  user 
  3890.         will  be  asked to enter the name of the tool he  wishes  to 
  3891.         run.  To  execute  the Source Instrumenter the  user  should 
  3892.         respond with the tool name, Source_Instrument.
  3893.  
  3894.  
  3895.         EXAMPLE
  3896.  
  3897.           Welcome to the Test Tools
  3898.           please enter desired tool
  3899.           enter ? for a list of tools available
  3900.           SOURCE_INSTRUMENT <cr>
  3901.  
  3902.  
  3903.  
  3904.  
  3905.  
  3906.  
  3907.  
  3908.  
  3909.  
  3910.  
  3911.  
  3912.  
  3913.         Performance Analyzer User's Guide                    Page: 3
  3914.  
  3915.  
  3916.  
  3917.  
  3918.         If "?" is entered then Test_Tools will display a list of the
  3919.         tools   available  for  execution  and  the  user  will   be 
  3920.         reprompted  to  enter a tool name.  If "Q" is  entered  then 
  3921.         execution of the Test_Tools shell will be terminated.
  3922.  
  3923.  
  3924.         EXAMPLE
  3925.  
  3926.           Welcome to the Test Tools
  3927.           please enter desired tool
  3928.           enter ? for a list of tools available
  3929.           ? <cr>
  3930.  
  3931.           The following tools may be executed
  3932.             path -- the report generator for the path analysis tool
  3933.             profile -- the report generator for the timing tool
  3934.             smart -- the report generator for the self metric tool
  3935.             autopath  -- the report generator for the automatic path tool
  3936.             source_instrument -- instrument an Ada source file
  3937.  
  3938.           please enter desired tool
  3939.  
  3940.  
  3941.         It is only necesary to enter the first two characters of the 
  3942.         tool name, i.e., PA, PR, SM, AP or SO.  If an incorrect tool 
  3943.         name  is  entered the user will be prompted to  reenter  the 
  3944.         tool name.  When a valid tool name has been entered the user 
  3945.         will be prompted to enter file names for the Ada source file 
  3946.         to  be instrumented,  the listing file to be generated,  and 
  3947.         the instrumented source file to be generated.
  3948.  
  3949.  
  3950.         EXAMPLE
  3951.  
  3952.           Enter Source_File => Test5.ADA <cr>
  3953.           Enter Source_Listing_File => <cr>
  3954.           Enter Instrumented_Source_File => <cr>
  3955.          
  3956.           source_file = TEST5.ADA 
  3957.           source_listing = TEST5.LST
  3958.           instrumented_source = TEST.INS
  3959.  
  3960.  
  3961.         If  the  user  does not enter a  Source_Listing_File  or  an 
  3962.         Instrumented_Source_File  then  default file names  will  be 
  3963.         derived  from  the first qualifier of  Source_File_Name  and 
  3964.         the extentions ".LST" and ".INS", respectively.
  3965.  
  3966.  
  3967.  
  3968.  
  3969.  
  3970.  
  3971.  
  3972.  
  3973.  
  3974.  
  3975.  
  3976.  
  3977.  
  3978.  
  3979.         Performance Analyzer User's Guide                    Page: 4
  3980.  
  3981.  
  3982.  
  3983.         When   all   file  names  have  been  entered   the   Source 
  3984.         Instrumenter  will  display a menu of instrumenting  options 
  3985.         and  query  the user to select the options to be  used  when 
  3986.         instrumenting the specified source file.   It is recommended 
  3987.         that   the   predefined  instrumenting  defaults   for   the 
  3988.         preformance analyzer, option 2, be selected.
  3989.  
  3990.          
  3991.         EXAMPLE
  3992.  
  3993.                  Source Instrumenter Version 1.0
  3994.  
  3995.  
  3996.           Instrumenting Options are:
  3997.  
  3998.           1 - Path/Autopath Analyzer Defaults
  3999.           2 - Performance Analyzer Defaults
  4000.           3 - Self Metric Defaults
  4001.           4 - User Supplied Options
  4002.  
  4003.           Enter option (1, 2, 3, 4, ?, or <cr> for default of 1): 2 <cr>
  4004.  
  4005.  
  4006.         When instrumenting is completed the Source Instrumenter will 
  4007.         return  control to the TEST_TOOLS shell.  At this point  the 
  4008.         user may instrument another Ada source file or terminate the 
  4009.         shell by entering "Q" or "QUIT".
  4010.  
  4011.         EXAMPLE
  4012.  
  4013.           please enter desired tool
  4014.           Q <cr>
  4015.           $
  4016.  
  4017.              The  Source Instrumenter also provides a capability  to 
  4018.         explicitly   select   specific  program   units   within   a 
  4019.         compilation  unit for instrumentation.  Refer to the  Source 
  4020.         Instrumenter  User's Guide for more detailed information  on 
  4021.         using this option.
  4022.  
  4023.  
  4024.  
  4025.  
  4026.  
  4027.  
  4028.  
  4029.  
  4030.  
  4031.  
  4032.  
  4033.  
  4034.  
  4035.  
  4036.  
  4037.  
  4038.  
  4039.  
  4040.  
  4041.  
  4042.  
  4043.  
  4044.  
  4045.         Performance Analyzer User's Guide                    Page: 5
  4046.  
  4047.  
  4048.  
  4049.         
  4050.         2.2  Compilation and Linking
  4051.         
  4052.              When  the  instrumentation  process  is  completed  the 
  4053.         instrumented target Ada program must be compiled and  linked 
  4054.         to   prepare  it  for  execution.   Each  instrumented   Ada 
  4055.         compilation  unit  must  be separately  compiled.  When  the 
  4056.         compilation process is completed the target program must  be 
  4057.         linked with the Run Time Monitor.
  4058.  
  4059.             The   user  should  follow  the  normal  procedures  for 
  4060.         compiling  and  linking with the Ada compiler  system  being 
  4061.         used for program development. These procedures may vary from 
  4062.         system to system.   The procedures for compiling and linking 
  4063.         the  instrumented  on  a DEC VAX under VMS Version  4.0  and 
  4064.         using the DEC VAX Ada Compiler System Version 1.0 are  shown 
  4065.         below.  However  this  example  assumes that  the  user  has 
  4066.         already performed all operations necessary to set up an  Ada 
  4067.         program library.
  4068.  
  4069.  
  4070.         EXAMPLE
  4071.  
  4072.           $ Ada Test5.INS <cr>
  4073.           $ ACS Link Test5 <cr>
  4074.           %ACS-I-CL_LINKING, Invoking the VAX/VMS Linker
  4075.           $
  4076.  
  4077.  
  4078.  
  4079.  
  4080.  
  4081.  
  4082.  
  4083.  
  4084.  
  4085.  
  4086.  
  4087.  
  4088.  
  4089.  
  4090.  
  4091.  
  4092.  
  4093.  
  4094.  
  4095.  
  4096.  
  4097.  
  4098.  
  4099.  
  4100.  
  4101.  
  4102.  
  4103.  
  4104.  
  4105.  
  4106.  
  4107.  
  4108.  
  4109.  
  4110.  
  4111.         Performance Analyzer User's Guide                    Page: 6
  4112.  
  4113.  
  4114.         
  4115.         2.3  Target Program Execution
  4116.         
  4117.             When linking is completed, the target Ada program may be 
  4118.         executed.  The  user interface and method of  executing  the 
  4119.         target   program  is  not  altered  by  the  instrumentation 
  4120.         process.  Therefore,  the  user  should  follow  the  normal 
  4121.         procedures  for  executing the target program  on  the  host 
  4122.         computer system being used for program development.
  4123.  
  4124.              When  the first unit of the target program is  entered, 
  4125.         the  Run Time Monitor will prompt the user for the following 
  4126.         information:
  4127.  
  4128.           1. Tool_Name :   The user should enter PROFILE_TOOL (upper 
  4129.              or lower case is acceptable).  If the user should enter 
  4130.              an  invalid tool name,  he will be repeatedly  prompted 
  4131.              until  a correct tool name is entered or the program is 
  4132.              aborted.
  4133.  
  4134.           2. Logfile_Name :  The user should  enter a legal filename 
  4135.              for the computer he is using.  The default filename may 
  4136.              be  chosen by entering a carriage return.   The default 
  4137.              Logfile_Name is PROFILE.LOG.
  4138.  
  4139.                  If the File already exists, the user is asked if he 
  4140.              would  like  to Enter a  new  filename,  Overwrite  the 
  4141.              existing file, or Append to the existing file.
  4142.  
  4143.           3. Test_Identification:  The  user  is asked  to  enter  a 
  4144.              unique  test identification which can be any valid  Ada 
  4145.              string. The default Test ID may be selected by entering 
  4146.              a carriage return.   The default Test ID for Profile is 
  4147.              "Performance Analysis Report".  The Test ID is recorded 
  4148.              in  the log file generated by the Run Time Monitor  and 
  4149.              printed  on the Test Configuration Report generated  by 
  4150.              the Profile Report Generator. 
  4151.  
  4152.              An  example  session  with  the  Run  Time  Monitor  is 
  4153.         presented on the following page.
  4154.  
  4155.  
  4156.  
  4157.  
  4158.  
  4159.  
  4160.  
  4161.  
  4162.  
  4163.  
  4164.  
  4165.  
  4166.  
  4167.  
  4168.  
  4169.  
  4170.  
  4171.  
  4172.  
  4173.  
  4174.  
  4175.  
  4176.  
  4177.         Performance Analyzer User's Guide                    Page: 7
  4178.  
  4179.  
  4180.  
  4181.         
  4182.         EXAMPLE SESSION
  4183.         
  4184.         Following  is  a sample session with the Run  Time  Monitor. 
  4185.         (User responses are shown in Bold Face):
  4186.  
  4187.              $ RUN TEST5 <cr>
  4188.  
  4189.              Enter Tool Type : PATH_TOOL, AUTOPATH_TOOL,
  4190.                                SMART_TOOL, or PROFILE_TOOL
  4191.              -----> PROFILE_TOOL <cr>
  4192.  
  4193.              Enter Logfile Name, Null for Default
  4194.              -----> Test5.log <cr>
  4195.  
  4196.  
  4197.         If the Logfile already exists, the following message and prompt 
  4198.         are printed:
  4199.  
  4200.              File already exists!!! Do you wish to:
  4201.                   E = Enter a New Filename
  4202.                   O = Overwrite existing file
  4203.                   A = Append to the existing file
  4204.  
  4205.              Enter Option ===> O <cr>
  4206.  
  4207.  
  4208.         The Run Time Monitor will repeatedly prompt the user until a 
  4209.         valid option is entered.
  4210.  
  4211.              Enter a unique Test Identification, Null for default.
  4212.              5 Disks, 3 Tasks and a Bubble Sort <cr>
  4213.  
  4214.  
  4215.  
  4216.              When the Run Time Monitor input is complete, the target 
  4217.         program resumes its normal execution.     
  4218.  
  4219.  
  4220.  
  4221.  
  4222.  
  4223.  
  4224.  
  4225.  
  4226.  
  4227.  
  4228.  
  4229.  
  4230.  
  4231.  
  4232.  
  4233.  
  4234.  
  4235.  
  4236.  
  4237.  
  4238.  
  4239.  
  4240.  
  4241.  
  4242.  
  4243.         Performance Analyzer User's Guide                    Page: 8
  4244.  
  4245.  
  4246.         
  4247.         2.4  Report Generation
  4248.         
  4249.              During  execution,  the  instrumented Ada program  will 
  4250.         create  a  log file containing program execution  trace  and 
  4251.         timing data.  The Ada Performance Analyzer Report Generator, 
  4252.         Profile,  analyzes  the  data and presents it in  an  easily 
  4253.         understood  format.
  4254.  
  4255.              The  Profile  report  generator is one  of  five  tools 
  4256.         included   in  the  Ada  Test  and  Analysis  System  shell, 
  4257.         TEST_TOOLS. The report generator is executed as follows:
  4258.  
  4259.         (User input and responses are shown in Bold Face)
  4260.  
  4261.           RUN TEST_TOOLS <cr>
  4262.  
  4263.         The  Test_Tools prompt will then be displayed and  the  user 
  4264.         will  be  asked to enter the name of the tool he  wishes  to 
  4265.         run.  To  execute Profile,  the user should respond with the 
  4266.         tool name, Profile.
  4267.  
  4268.  
  4269.         EXAMPLE
  4270.  
  4271.           Welcome to the Test Tools
  4272.           please enter desired tool
  4273.           enter ? for a list of tools available
  4274.           PROFILE <cr>
  4275.  
  4276.  
  4277.         It is only necesary to enter the first two characters of the 
  4278.         tool name, i.e., PA, PR, SM, AP or SO.  If an incorrect tool 
  4279.         name  is  entered the user will be prompted to  reenter  the 
  4280.         tool name.  When a valid tool name has been entered the user 
  4281.         will  be  prompted to enter the name of the log file  to  be 
  4282.         processed and the name of the report file to be generated.
  4283.  
  4284.  
  4285.         EXAMPLE
  4286.  
  4287.           Enter Log_File_Name => TEST5.LOG <cr>
  4288.           Enter Report_File_Name => TEST5.RPT <cr>
  4289.  
  4290.  
  4291.         If  the  user  does not enter  a  Report_File_Name,  then  a 
  4292.         default  file  name be derived from the first  qualifier  of 
  4293.         Log_File_Name and extention ".RPT".
  4294.  
  4295.         When valid log file and report file names have been entered, 
  4296.         Profile  will  display the test configuration data that  was 
  4297.         recorded in the log file at the time the program under  test 
  4298.         was executed. The user is then prompted as to whether or not 
  4299.         he wishes to continue.
  4300.  
  4301.  
  4302.  
  4303.  
  4304.  
  4305.  
  4306.  
  4307.  
  4308.  
  4309.         Performance Analyzer User's Guide                    Page: 9
  4310.  
  4311.  
  4312.  
  4313.         After  examining the test configuration data,  the user  can 
  4314.         discontinue processing by entering "N".   If the correct log 
  4315.         file  has  been selected then the user should enter  "Y"  to 
  4316.         continue processing.
  4317.  
  4318.  
  4319.         EXAMPLE
  4320.  
  4321.           Profile 1.0         Ada Performance Analyzer
  4322.  
  4323.           Program Under Test:        Test5
  4324.           Test Date:                 06/30/85
  4325.           Test Time:                 20:24:59
  4326.           Test ID:                   5 Disks, 3 Tasks and a Sort
  4327.  
  4328.           Do you wish to continue (Y/N)? Y <cr>
  4329.  
  4330.  
  4331.         If the user enters "N" then processing will be discontinued. 
  4332.         If  "Y"  is  entered then processing of the  log  file  will 
  4333.         begin.  When processing is completed,  Profile will  display 
  4334.         the  Test  Progam  Start Time,  Stop Time,  and  Total  Test 
  4335.         Execution Time at the user's console.
  4336.  
  4337.  
  4338.         EXAMPLE
  4339.  
  4340.           Test Program Start Time:      15:52:16.04
  4341.           Test Program Stop Time:       15:53:43.64
  4342.           Total Test Execution Time:    00:01:27.60
  4343.  
  4344.  
  4345.         The  Run Time Monitor automatically adjusts execution  times 
  4346.         for  the overhead it imposes on the program under  test.  If 
  4347.         the  program  terminated abnormally then Test  Program  Stop 
  4348.         Time and Total Test Execution Time will already be  adjusted 
  4349.         for overhead and the message 
  4350.  
  4351.               <program name> terminated abnormally
  4352.  
  4353.         will  be  displayed at the user's console.  If  the  program 
  4354.         terminated  normally then Test Program Stop Time  and  Total 
  4355.         Test  Execution Time will be actual times and the  estimated 
  4356.         Profile  overhead  and adjusted execution time will also  be 
  4357.         displayed at the user's console.
  4358.  
  4359.  
  4360.         EXAMPLE
  4361.  
  4362.           Estimated Profile Overhead:   00:01:03.10
  4363.           Adjusted Test Execution Time: 00:00:24.50
  4364.  
  4365.  
  4366.  
  4367.  
  4368.  
  4369.  
  4370.  
  4371.  
  4372.  
  4373.  
  4374.  
  4375.         Performance Analyzer User's Guide                    Page: 10
  4376.  
  4377.  
  4378.  
  4379.         Shortly  after test program execution times are displayed at 
  4380.         the  user's  console generation of the report file  will  be 
  4381.         completed and ready for analysis by the user.  At this point 
  4382.         control  will be returned to the Test_Tools shell where  the 
  4383.         user  may select another tool for execution or terminate the 
  4384.         shell by entering "Q" for Quit.
  4385.  
  4386.              An example session with the Profile Report Generator is 
  4387.         presented below.
  4388.  
  4389.         
  4390.         EXAMPLE SESSION
  4391.         
  4392.         Following is a sample session with the Report Generator
  4393.         (User input and responses are shown in Bold Face):
  4394.  
  4395.         $   RUN TEST_TOOLS <cr>
  4396.  
  4397.         Welcome to the Test Tools
  4398.         please enter desired tool
  4399.         enter ? for a list of tools available
  4400.         PR <cr>
  4401.  
  4402.         Enter Log_File_Name => TEST5.LOG <cr>
  4403.         Enter Report_File_Name => <cr>
  4404.  
  4405.         log_file_name = TEST5.LOG
  4406.         report_file_name = TEST5.RPT
  4407.  
  4408.         Profile 1.0         Ada Performance Analyzer
  4409.  
  4410.         Program Under Test:        Test5
  4411.         Test Date:                 06/30/85
  4412.         Test Time:                 15:52:16
  4413.         Test ID:                   5 Disks, 3 Tasks and a Sort
  4414.  
  4415.         Do you wish to continue (Y/N)? Y <cr>
  4416.  
  4417.         Test Program Start Time:      15:52:16.04
  4418.         Test Program Stop Time:       15:53:43.64
  4419.         Total Test Execution Time:    00:01:27.60
  4420.         Estimated Profile Overhead:   00:01:03.10
  4421.         Adjusted Test Execution Time: 00:00:24.50
  4422.  
  4423.         please enter desired tool
  4424.         quit <cr>
  4425.         $
  4426.  
  4427.  
  4428.  
  4429.  
  4430.  
  4431.  
  4432.  
  4433.  
  4434.  
  4435.  
  4436.  
  4437.  
  4438.  
  4439.  
  4440.  
  4441.         Performance Analyzer User's Guide                    Page: 11
  4442.  
  4443.  
  4444.  
  4445.         
  4446.                              3.0  OUTPUT FORMAT
  4447.         
  4448.  
  4449.              The  report  file  generated by PROFILE  contains  five 
  4450.         reports:   a  Test  Configuration  Report,  three  different 
  4451.         execution timing reports,  and a Call Summary  Report.  Each 
  4452.         report  provides  the user with different information  about 
  4453.         the  program  being  tested and is generated  in  80  column 
  4454.         format  to enable "browsing" at a terminal when hardcopy  is 
  4455.         either unavailable or not desired.  A sample report file  is 
  4456.         included in Appendix A.
  4457.  
  4458.              Prior  to  using  the Profile report  generator  it  is 
  4459.         important for the user to understand the information that is 
  4460.         being  presented  and  how to  interpret  it.  Each  of  the 
  4461.         execution   timing  reports  is  described  below.   A  more 
  4462.         general  discussion  on evaluating information presented  in 
  4463.         these reports is included in section 4.0.
  4464.         
  4465.         3.1  Test Configuration Report
  4466.         
  4467.              The  Test  Configuration  Report  includes  information 
  4468.         necessary  to correlate the report with a specific  test  or 
  4469.         execution  of  the  target  Ada  program.  It  includes  the 
  4470.         following information:
  4471.         
  4472.            1)  Program Under Test:
  4473.                This  is  the  name of the main program unit  of  the 
  4474.                program being analyzed.
  4475.         
  4476.            2)  Test Date:
  4477.                The  calendar  date that the program under  test  was 
  4478.                executed and the execution log file was created.  The 
  4479.                test date is presented in the form MM/DD/YY. 
  4480.         
  4481.            3)  Test Day:
  4482.                The day of the week,  Sunday through  Saturday,  that 
  4483.                the program under test was executed and the execution 
  4484.                log file was created.
  4485.         
  4486.            4)  Test Time:
  4487.                The  time  of  day that the program  under  test  was 
  4488.                executed and the execution log file was created.  The 
  4489.                test time is presented in the form HH:MM:SS.
  4490.         
  4491.            5)  Log File:
  4492.                The  name  of  the  log file that  was  used  in  the 
  4493.                preparation of the execution timing reports.
  4494.         
  4495.            6)  Test ID:
  4496.                The  test  ID specified by the user at the  time  the 
  4497.                program under test was executed. 
  4498.  
  4499.  
  4500.  
  4501.  
  4502.  
  4503.  
  4504.  
  4505.  
  4506.  
  4507.         Performance Analyzer User's Guide                    Page: 12
  4508.  
  4509.  
  4510.  
  4511.         
  4512.            7)  Test Program Start Time:
  4513.                The time that the first program unit began execution. 
  4514.                Start time is presented in the form HH:MM:SS.SS.
  4515.         
  4516.            8)  Test Program Stop Time:
  4517.                This  is the last time recorded in the log  file.  If 
  4518.                the  program under test terminated normally then this 
  4519.                is the time that the main program unit  ended.   Stop 
  4520.                time is presented in the form HH:MM:SS.SS.
  4521.         
  4522.            9)  Total Test Execution Time:
  4523.                The  total  elapsed test execution time presented  in 
  4524.                the form HH:MM:SS.SS.
  4525.  
  4526.         If  the  program under test terminated abnormally then  Test 
  4527.         Program Stop Time and Total Test Execution Time will already 
  4528.         be adjusted for overhead. If the program terminated normally 
  4529.         then  the  above times will be actual  unadjusted  execution 
  4530.         times  and  the Test Configuration Report will also  include 
  4531.         the following:
  4532.         
  4533.           10)  Estimated Profile Overhead:
  4534.                This  is  the estimated overhead imposed by  the  Run 
  4535.                Time  monitor on the execution of the  program  under 
  4536.                test. The estimated overhead is presented in the form 
  4537.                HH:MM:SS.FF.
  4538.         
  4539.           11)  Adjusted Test Execution Time:
  4540.                This  is  the total test execution adjusted  for  the 
  4541.                estimated overhead imposed by the Run Time Monitor.
  4542.  
  4543.  
  4544.         
  4545.         3.2  Total Execution Times Report
  4546.         
  4547.              This  report  presents  both  "net"  and   "cumulative" 
  4548.         execution  times for each instrumented Ada program unit.  It 
  4549.         is sorted in descending order by cumulative execution time.
  4550.  
  4551.              The  "Net"  execution time for a program  unit  is  the 
  4552.         total  accumulated time spent in that program unit.  It does 
  4553.         not include time spent in other program units called by that 
  4554.         unit  if  they  have also been instrumented  by  the  source 
  4555.         instrumenter.  The "Cumulative" execution time for a program 
  4556.         unit  is  the total accumulated time spent in  that  program 
  4557.         unit and all other program units called by that unit whether 
  4558.         or not the other program units have been instrumented by the 
  4559.         source instrumenter.
  4560.  
  4561.             For Example, assume program A contains the three program 
  4562.         units A,  B,  and C.  The main program unit, A, calls both B 
  4563.         and  C.  Only program units A and B have been  instrumented. 
  4564.  
  4565.  
  4566.  
  4567.  
  4568.  
  4569.  
  4570.  
  4571.  
  4572.  
  4573.         Performance Analyzer User's Guide                    Page: 13
  4574.  
  4575.  
  4576.         The  "net"  execution time reported for A will  include  all 
  4577.         time  spent  in  program  units A and  C,  since  C  is  not 
  4578.         instrumented. The "cumulative" execution time reported for A 
  4579.         will include all time spent in A and all other program units 
  4580.         called  by A ( i.e.,  B and C ).  Since B does not call  any 
  4581.         other  program units,  B's "net" and "cumulative"  execution 
  4582.         times will be equal. No execution times will be reported for 
  4583.         program unit C since C is not instrumented. 
  4584.  
  4585.         
  4586.         REPORT COLUMNS
  4587.         
  4588.         The  Total  Execution  Times Report presents  the  following 
  4589.         information about each instrumented Ada program unit:
  4590.         
  4591.            1)  UNIT NAME  ( Program Unit Name )
  4592.                This  is  the fully qualified name of the  procedure, 
  4593.                function,  task,  generic  or package.  The field  is 
  4594.                limited to 29 characters. If the program unit name is 
  4595.                longer  than  29 characters then multiple  lines  are 
  4596.                used  until  all  characters in the  name  have  been 
  4597.                printed.  Continuation lines are indented two spaces. 
  4598.                If  the program unit name has been overloaded  within 
  4599.                the  same  compilation  unit and cannot  be  uniquely 
  4600.                identified by its name alone then the user must refer 
  4601.                to the program unit number (PU#). 
  4602.            
  4603.            2)  PU#   ( Program Unit Number )
  4604.                Each   instrumented   Ada  program  unit   within   a 
  4605.                compilation  unit  is assigned a unique Program  Unit 
  4606.                Number  by  the Source Instrumenter  to  provide  for 
  4607.                unique  identification  of  overloaded  program  unit 
  4608.                names.   Normally,  it  will not be necessary for the 
  4609.                user  to refer to the listing file generated  by  the 
  4610.                Source  Instrumenter.  However,  if the program under 
  4611.                test makes use of "overloading" of program unit names 
  4612.                it   may  be  necessary  to  refer  to   the   Source 
  4613.                Instrumenter  Listing  in order to  correlate  timing 
  4614.                data  presented in the reports to a specific  program 
  4615.                unit.
  4616.            
  4617.            3)  T  ( Program Unit Type )
  4618.                Ada  programs  may  contain four different  types  of 
  4619.                program  units:   procedures,  functions,  tasks  and 
  4620.                generics. However, the Ada language also provides the 
  4621.                ability to include executeable code within a  package 
  4622.                body  that is not included within any of the  program 
  4623.                units  contained  in  that  package.   This  code  is 
  4624.                executed   during  package  initialization  when  the 
  4625.                package   is  elaborated.   Profile  reports   timing 
  4626.                information  for this "initialization" code the  same 
  4627.                as for Ada program units.  Therefore,  for  reporting 
  4628.                purposes,  initialization  code within a package body 
  4629.                is also treated as a program unit.
  4630.  
  4631.  
  4632.  
  4633.  
  4634.  
  4635.  
  4636.  
  4637.  
  4638.  
  4639.         Performance Analyzer User's Guide                    Page: 14
  4640.  
  4641.  
  4642.  
  4643.                Program unit types are coded as follows:
  4644.  
  4645.                     P  Procedure
  4646.  
  4647.                     F  Function
  4648.  
  4649.                     T  Task
  4650.  
  4651.                     G  Generic
  4652.  
  4653.                     K  pacKage
  4654.  
  4655.         
  4656.            4)  # EXEC  ( Number of Executions )
  4657.                Normally,  this is the number of times a program unit 
  4658.                was executed. However, if the program unit terminated 
  4659.                abnormally then # Exec represents the number of times 
  4660.                the program unit began execution.
  4661.         
  4662.            5)  NET  ( Net Execution Time )
  4663.                This is the accumulated net time that a program  unit 
  4664.                was  active.  It is the sum of the net times for  all 
  4665.                executions of the program unit.
  4666.         
  4667.            6)  CUMULATIVE  ( Cumulative Execution Time )
  4668.                This  is  the  accumulated  cumulative  time  that  a 
  4669.                program  unit  was  active.  It is  the  sum  of  the 
  4670.                cumulative  times  for all executions of the  program 
  4671.                unit  and  all  other program units  called  by  that 
  4672.                program unit.
  4673.         
  4674.            7)  %T  ( Percent of Total Execution Time )
  4675.                This  is  the  program unit's  execution  time  as  a 
  4676.                percentage  of  total program execution time.  It  is 
  4677.                displayed  as a two digit integer in the range  0  to 
  4678.                99.  Special characters, discussed in section 4, are used 
  4679.                to  represent  percentages in excess of  99%.
  4680.         
  4681.            8)  %E  ( Percent of Expected Error )
  4682.                %E  is the expected error in the reported time  as  a 
  4683.                percentage of the reported time.   %E is reported for 
  4684.                both NET and CUMULATIVE execution times. The accuracy 
  4685.                of  the  times  reported is a function of  the  total 
  4686.                length  of execution time of the  program  unit,  the 
  4687.                number  of times the unit executed,  the duration  of 
  4688.                the  test,  and the basic clock period (System.Tick). 
  4689.                In  General,  the  larger  %T for  a  program  unit's 
  4690.                reported execution time, the smaller %E will be.
  4691.  
  4692.  
  4693.  
  4694.  
  4695.  
  4696.  
  4697.  
  4698.  
  4699.  
  4700.  
  4701.  
  4702.  
  4703.  
  4704.  
  4705.         Performance Analyzer User's Guide                    Page: 15
  4706.  
  4707.  
  4708.  
  4709.         
  4710.         3.3  Net Execution Time Report
  4711.         
  4712.              This  report  includes  the "net" time  spent  in  each 
  4713.         instrumented  Ada program unit.  The time reported for  each 
  4714.         unit  does  not include time spent in  other  program  units 
  4715.         called  by that unit if they have also been instrumented  by 
  4716.         the  Source Instrumenter.  The Net Execution Times Report is 
  4717.         sorted by Program Unit Name.
  4718.  
  4719.         
  4720.         REPORT COLUMNS
  4721.         
  4722.         The  Net  Execution Times Report presents the  following 
  4723.         information about each instrumented Ada program unit:
  4724.         
  4725.            1)  UNIT NAME  ( Program Unit Name )
  4726.                This  is the fully qualified name of  the  procedure, 
  4727.                function,  task,  generic  or package.  The field  is 
  4728.                limited to 29 characters. If the program unit name is 
  4729.                longer  than  29 characters then multiple  lines  are 
  4730.                used  until  all  characters in the  name  have  been 
  4731.                printed. Continuation lines are indented two spaces.
  4732.         
  4733.            2)  PU#   ( Program Unit Number )
  4734.                This  is  the  Program Unit Number  assigned  by  the 
  4735.                Source    Instrumenter   to   provide   for    unique 
  4736.                identification of overloaded Ada program unit names.
  4737.         
  4738.            3)  # EXEC  ( Number of Executions )
  4739.                Normally,  this  is  the number of times the  program 
  4740.                unit  was  executed.  However,  if the  program  unit 
  4741.                terminated  abnormally  then #  Exec  represents  the 
  4742.                number if times the program unit began execution.
  4743.         
  4744.            4)  MAXIMUM  ( Maximum Net Execution Time )
  4745.                This is the maximum net execution time reported for a 
  4746.                single execution of the program unit.
  4747.         
  4748.            5)  MINIMUM  ( Minimum Net Execution Time )
  4749.                This is the minimum net execution time reported for a 
  4750.                single execution of the program unit.
  4751.         
  4752.            6)  AVERAGE  ( Average Net Execution Time )
  4753.                This  is the average net execution time reported  for 
  4754.                all executions of the program unit.
  4755.         
  4756.            7)  %E  ( Percent of Expected Error )
  4757.                %E is the expected error in the total accumulated net 
  4758.                execution  time  as a percentage of the unit's  total 
  4759.                accumulated net execution time.  This is the same  %E 
  4760.                reported for NET on the Total Execution Times Report.
  4761.  
  4762.  
  4763.  
  4764.  
  4765.  
  4766.  
  4767.  
  4768.  
  4769.  
  4770.  
  4771.         Performance Analyzer User's Guide                    Page: 16
  4772.  
  4773.  
  4774.         
  4775.         3.4  Cumulative Execution Times Report
  4776.         
  4777.              This  report  includes the "cumulative" time  spent  in 
  4778.         each  instrumented Ada program unit.  The time reported  for 
  4779.         each  unit  also  includes all time spent in  other  program 
  4780.         units  called by that unit whether or not the other  program 
  4781.         units  have  been instrumented by the  source  instrumenter.  
  4782.         The  Cumulative Execution Times Report is sorted by  Program 
  4783.         Unit Name.
  4784.  
  4785.         
  4786.         REPORT COLUMNS
  4787.         
  4788.         The Cumulative Execution Times Report presents the following 
  4789.         information about each instrumented Ada program unit:
  4790.         
  4791.            1)  UNIT NAME  ( Program Unit Name )
  4792.                This  is the fully qualified name of  the  procedure, 
  4793.                function,  task,  generic  or package.  The field  is 
  4794.                limited to 29 characters. If the program unit name is 
  4795.                longer  than  29 characters then multiple  lines  are 
  4796.                used  until  all  characters in the  name  have  been 
  4797.                printed. Continuation lines are indented two spaces.
  4798.         
  4799.            2)  PU#   ( Program Unit Number )
  4800.                This  is  the  Program Unit Number  assigned  by  the 
  4801.                Source    Instrumenter   to   provide   for    unique 
  4802.                identification of overloaded Ada program unit names.
  4803.         
  4804.            3)  # EXEC  ( Number of Executions )
  4805.                Normally,  this  is  the number of times the  program 
  4806.                unit  was  executed.  However,  if the  program  unit 
  4807.                terminated  abnormally  then #  Exec  represents  the 
  4808.                number of times the program unit began execution.
  4809.         
  4810.            4)  MAXIMUM  ( Maximum Cumulative Execution Time )
  4811.                This   is  the  maximum  cumulative  execution   time 
  4812.                reported for a single execution of the program unit.
  4813.         
  4814.            5)  MINIMUM  ( Minimum Cumulative Execution Time )
  4815.                This   is  the  minimum  cumulative  execution   time 
  4816.                reported for a single execution of the program unit.
  4817.         
  4818.            6)  AVERAGE  ( Average Cumulative Execution Time )
  4819.                This   is  the  average  cumulative  execution   time 
  4820.                reported for all executions of the program unit.
  4821.         
  4822.            7)  %E  ( Percent of Expected Error )
  4823.                %E  is  the expected error in the  total  accumulated 
  4824.                cumulative  execution  time as a  percentage  of  the 
  4825.                unit's  total accumulated cumulative execution  time. 
  4826.                This  is  the same %E reported for CUMULATIVE on  the 
  4827.                Total Execution Times Report.
  4828.  
  4829.  
  4830.  
  4831.  
  4832.  
  4833.  
  4834.  
  4835.  
  4836.  
  4837.         Performance Analyzer User's Guide                    Page: 17
  4838.  
  4839.  
  4840.  
  4841.         
  4842.         3.5  Call Summary Report
  4843.         
  4844.              This  report  provides  a  summary  of  all  calls   by 
  4845.         instrumented  Ada  program units to other  instrumented  Ada 
  4846.         program  units.  The call summary report can aid the user in 
  4847.         evaluating program unit timing information presented in  the 
  4848.         execution timing reports.
  4849.  
  4850.         
  4851.         REPORT COLUMNS
  4852.         
  4853.         The  Call Summary Report presents the following  information 
  4854.         about each instrumented Ada program unit:
  4855.         
  4856.            1)  UNIT NAME  ( Program Unit Name )
  4857.                This  is  the fully qualified name of the  procedure, 
  4858.                function,  task,  generic  or package.  The field  is 
  4859.                limited to 29 characters. If the program unit name is 
  4860.                longer  than  29 characters then multiple  lines  are 
  4861.                used  until  all  characters in the  name  have  been 
  4862.                printed. Continuation lines are indented two spaces.
  4863.         
  4864.            2)  PU#   ( Program Unit Number )
  4865.                This  is  the  Program Unit Number  assigned  by  the 
  4866.                Source    Instrumenter   to   provide   for    unique 
  4867.                identification of overloaded Ada program unit names.
  4868.         
  4869.            3)  T  ( Program Unit Type )
  4870.                Ada program unit types are coded as follows:
  4871.  
  4872.                     P  Procedure
  4873.                     F  Function
  4874.                     T  Task
  4875.                     G  Generic
  4876.                     K  pacKage
  4877.         
  4878.            4)  EXECS  ( Number of Executions )
  4879.                Normally,  this is the number of times a program unit 
  4880.                was executed. However, if the program unit terminated 
  4881.                abnormally then # Exec represents the number of times 
  4882.                the program unit began execution.
  4883.         
  4884.            5)  ABEND  ( Abnormal End )
  4885.                ABEND  indicates the recursion level of each  program 
  4886.                unit  at the time the program under  test  terminated 
  4887.                execution.   Normally,  the  recursion level will  be 
  4888.                zero  for  each program unit at the time the  program 
  4889.                terminated.   However,  if  the  program  under  test 
  4890.                terminated  abnormally  then  ABEND can  be  used  to 
  4891.                identify "dangling" program units and their recursion 
  4892.                level at the time execution ended.
  4893.  
  4894.  
  4895.  
  4896.  
  4897.  
  4898.  
  4899.  
  4900.  
  4901.  
  4902.  
  4903.         Performance Analyzer User's Guide                    Page: 18
  4904.  
  4905.  
  4906.  
  4907.         
  4908.            6)  MAX RL  ( Maximum Recursion Level )
  4909.                For  non-task  program units MAX RL  is  the  maximum 
  4910.                level  of recursion that was reached during execution 
  4911.                of  the program.  For tasks,  MAX RL  represents  the 
  4912.                maximum number of tasks of a given type that were  in 
  4913.                execution   concurrently.   Depending   on   compiler 
  4914.                implementation,  it  is  possible  that  a  recursive 
  4915.                procedure  may  require significantly more  execution 
  4916.                time  than  the same  procedure  implemented  without 
  4917.                recursion. This may be significant if both the number 
  4918.                of executions and the recursion level are high. 
  4919.         
  4920.            7)  SONS
  4921.                Sons  represents the number of direct calls to  other 
  4922.                instrumented  Ada program units.  It is the total for 
  4923.                all  executions  of  the program unit  and  does  not 
  4924.                include calls to uninstrumented program units.
  4925.         
  4926.            8)  GRANDSONS
  4927.                Grandsons  represents the number of indirect calls to 
  4928.                other  instrumented  Ada  program  units,  i.e.,  the 
  4929.                number  of  instrumented units called  by  the  units 
  4930.                sons.   It  is  the total for all executions  of  the 
  4931.                program   unit   and  does  not  include   calls   to 
  4932.                uninstrumented program units.
  4933.  
  4934.  
  4935.  
  4936.  
  4937.  
  4938.  
  4939.  
  4940.  
  4941.  
  4942.  
  4943.  
  4944.  
  4945.  
  4946.  
  4947.  
  4948.  
  4949.  
  4950.  
  4951.  
  4952.  
  4953.  
  4954.  
  4955.  
  4956.  
  4957.  
  4958.  
  4959.  
  4960.  
  4961.  
  4962.  
  4963.  
  4964.  
  4965.  
  4966.  
  4967.  
  4968.  
  4969.         Performance Analyzer User's Guide                    Page: 19
  4970.  
  4971.  
  4972.  
  4973.         
  4974.                        4.0  INTERPRETING THE REPORTS
  4975.         
  4976.  
  4977.              It  is important for the user to remember that  Profile 
  4978.         is  not a CPU monitor and to understand how timing estimates 
  4979.         are  calculated in order to properly analyze  and  interpret 
  4980.         data presented in the reports.
  4981.  
  4982.         
  4983.         4.1  Execution Times
  4984.         
  4985.              The  Run Time Monitor records the time of day each time 
  4986.         an instrumented program unit begins and ends  execution.  It 
  4987.         also keeps track of the accumulated time,  or overhead, that 
  4988.         it requires to log this information.  All times that the Run 
  4989.         Time  Monitor  records are automatically adjusted  for  this 
  4990.         overhead.  Although  execution times that have been adjusted 
  4991.         for  overhead are closer to the true execution times of  the 
  4992.         same  program  uninstrumented,   not  all  overhead  can  be 
  4993.         measured  by the Run Time  Monitor.  Consequently,  adjusted 
  4994.         execution  times for an instrumented program will  still  be 
  4995.         greater  than actual execution times for the  uninstrumented 
  4996.         program.
  4997.  
  4998.              However,  the user should keep in mind that the purpose 
  4999.         of  Profile is not to time the actual execution times of the 
  5000.         program being tested.  It is a program development "tool" to 
  5001.         aid  the  user in identifying program units that  require  a 
  5002.         high  percentage of program execution  time.  Therefore, the 
  5003.         greatest  reliance  on timing information presented  in  the 
  5004.         various  execution timing reports should be on Percentage of 
  5005.         Total Execution Time (%T).
  5006.  
  5007.         
  5008.         4.2  Percent of Total Execution Time (%T)
  5009.         
  5010.              Percent  of total execution time is the program  unit's 
  5011.         execution  time as a percentage of total  program  execution 
  5012.         time.  It is displayed as a two digit integer in the range 0 
  5013.         to 99.  Special characters,  as described below, are used to 
  5014.         represent percentages in excess of 99%. %T is calculated and 
  5015.         presented  for  both NET and CUMULATIVE execution times  for 
  5016.         each program unit. Normally, the main program unit will have 
  5017.         a cumulative execution time of 100%. However, if the program 
  5018.         contains  tasks  it is possible that the  tasks  will  begin 
  5019.         execution  prior to the main program unit.  WITH'd  packages 
  5020.         may  also contain code that is executed during  elaboration. 
  5021.         In  both of these situations the main program will have a %T 
  5022.         of less than 100%.
  5023.  
  5024.  
  5025.  
  5026.  
  5027.  
  5028.  
  5029.  
  5030.  
  5031.  
  5032.  
  5033.  
  5034.  
  5035.         Performance Analyzer User's Guide                    Page: 20
  5036.  
  5037.  
  5038.  
  5039.  
  5040.  
  5041.                %T is represented as follows:
  5042.                
  5043.                   Percentage             Represented By
  5044.                  ------------   ------------------------------------
  5045.                   0.0 - 99.49   "nn" where nn is the nearest integer
  5046.                  99.5 - 99.99   " *"
  5047.                       > 99.99   "**"
  5048.  
  5049.         
  5050.         4.3  Tasks
  5051.         
  5052.              Tasks  are  considered to run concurrently  with  other 
  5053.         program units.  Both "net" and "cumulative" execution  times 
  5054.         for  tasks are based solely on when the task begins and when 
  5055.         it  ends  execution.  While there may be some form  of  time 
  5056.         sharing or interleaving of execution,  Profile is not a  CPU 
  5057.         monitor  and  is not able to determine when a task,  or  for 
  5058.         that matter any other program unit,  actually has control of 
  5059.         the CPU.  Therefore,  times are reported for tasks as though 
  5060.         each  task  was  running  in  a  dedicated  processor.   The 
  5061.         execution times for Tasks are not included in the cumulative 
  5062.         execution times of the program units that activate them.
  5063.  
  5064.         
  5065.         4.4  Net Times vs Cumulative Times
  5066.         
  5067.              In   general,   the  sum  of  the  net  times  of   all 
  5068.         instrumented  units  in  a  program will  be  equal  to  the 
  5069.         cumulative execution time of the main program  unit.  Slight 
  5070.         variations may occur due to roundoff  errors.   However,  as 
  5071.         mentioned  before,  Tasks are considered to run concurrently 
  5072.         with other program units.  Consequently,  the net times  for 
  5073.         tasks  are  not  included in the cumulative times  of  their 
  5074.         parent units.
  5075.  
  5076.         
  5077.         4.5  Expected Errors
  5078.         
  5079.              It  is  possible  for  an  Ada  program  unit  with  an 
  5080.         execution time of less than the basic clock period that  has 
  5081.         executed  one  or  more times to  report  maximum,  minimum, 
  5082.         average,  and  total execution times of 00:00:00.00.  It  is 
  5083.         also  possible for the same program unit to report  a  total 
  5084.         execution time equal to the basic clock period multiplied by 
  5085.         the number of times the unit executed.
  5086.  
  5087.  
  5088.  
  5089.  
  5090.  
  5091.  
  5092.  
  5093.  
  5094.  
  5095.  
  5096.  
  5097.  
  5098.  
  5099.  
  5100.  
  5101.         Performance Analyzer User's Guide                    Page: 21
  5102.  
  5103.  
  5104.  
  5105.  
  5106.              Expected error is an estimation of the maximum expected 
  5107.         error in the reported time of a program unit and is given as  
  5108.         as  a  percentage of the reported time.   Expected error  is 
  5109.         reported  for both NET and CUMULATIVE accumulated  execution 
  5110.         times.  The accuracy of the times reported is a function  of 
  5111.         the length of execution time of the program unit, the number 
  5112.         of times the unit executed,  the duration of the  test,  and 
  5113.         the basic clock period (System.Tick).
  5114.  
  5115.             In  general,  the  smaller a unit's percentage of  total 
  5116.         program  execution  time,  the larger  the  expected  error. 
  5117.         However, the maximum error can be no greater than the 50% of 
  5118.         the number of clock accesses,  or starts and stops,  for the 
  5119.         program  unit.
  5120.  
  5121.              No expected errors are reported for "dangling units" or 
  5122.         units that have been flagged for clock faults.  The Expected 
  5123.         Error column of the execution times reports will contain "C" 
  5124.         if  a  clock fault occurs and "D" if the unit is a  dangling 
  5125.         unit.  "CD" indicates that the unit was flagged for a  clock 
  5126.         fault and was also a dangling unit. 
  5127.  
  5128.         
  5129.         4.6  Clock Faults
  5130.         
  5131.              A  Clock Fault is not the result of a program error but 
  5132.         rather and indication of a condition that may result in  the 
  5133.         incorrect  reporting  of  execution times for  one  or  more 
  5134.         program units. A Clock Fault occurs when a program unit ends 
  5135.         execution and its starting time is not found on the "top" of 
  5136.         an  internal stack maintained by the report generator.
  5137.  
  5138.             If a program unit is called by a task, a Clock fault may 
  5139.         or  may  not occur when the program unit  terminates.  If  a 
  5140.         Clock  Fault  occurs  then  all  program  units  that  began 
  5141.         execution  after  the unit in which the fault  occurred  and 
  5142.         were  still  active  when the unit terminated  are  flagged. 
  5143.         Although  execution times for flagged units  will,  in  most 
  5144.         cases, still be reported accurately, the confidence level in 
  5145.         the   accuracy  of  the  times  is  significantly   reduced.  
  5146.         Therefore,  no  Expected Error (%E) is reported for  program 
  5147.         units that have been flagged with a Clock Fault.
  5148.  
  5149.            If a Clock fault occurs then the Expected Error column of 
  5150.         the execution times reports will contain "C". 
  5151.  
  5152.  
  5153.  
  5154.  
  5155.  
  5156.  
  5157.  
  5158.  
  5159.  
  5160.  
  5161.  
  5162.  
  5163.  
  5164.  
  5165.  
  5166.  
  5167.         Performance Analyzer User's Guide                    Page: 22
  5168.  
  5169.  
  5170.  
  5171.         
  5172.         4.7  Dangling Units
  5173.         
  5174.              A  "dangling  unit" is a program unit  that  was  still 
  5175.         "active" when the end of the log file was encountered by the 
  5176.         Profile report generator.  This condition normally indicates 
  5177.         that the program under test terminated abnormally.  However, 
  5178.         it  can also occur if a portion of the log file is destroyed 
  5179.         after  generation  by  the  Run  Time  Monitor  and   before 
  5180.         processing by the report generator.
  5181.  
  5182.              Although execution times for dangling units will  still 
  5183.         be  reported,  the  confidence level in the accuracy of  the 
  5184.         times  is significantly  reduced.   Therefore,  no  Expected 
  5185.         Error (%E) is reported for dangling program units. 
  5186.  
  5187.              The  Expected  Error  column  of  the  execution  times 
  5188.         reports for dangling units will contain "D". 
  5189.  
  5190.  
  5191.  
  5192.  
  5193.  
  5194.  
  5195.  
  5196.  
  5197.  
  5198.  
  5199.  
  5200.  
  5201.  
  5202.  
  5203.  
  5204.  
  5205.  
  5206.  
  5207.  
  5208.  
  5209.  
  5210.  
  5211.  
  5212.  
  5213.  
  5214.  
  5215.  
  5216.  
  5217.  
  5218.  
  5219.  
  5220.  
  5221.  
  5222.  
  5223.  
  5224.  
  5225.  
  5226.  
  5227.  
  5228.  
  5229.  
  5230.  
  5231.  
  5232.  
  5233.         Performance Analyzer User's Guide                    Page: 23
  5234.  
  5235.  
  5236.  
  5237.         
  5238.                        5.0  RESTRICTIONS AND LIMITATIONS
  5239.         
  5240.  
  5241.         1)  No  specific  limits are imposed either by  the  Runtime 
  5242.             Monitor  or  the Profile report generator on either  the 
  5243.             size of the target Ada program or the number of  program 
  5244.             units  that can be instrumented.   All arrays and stacks 
  5245.             maintained  by Profile that are a function of the  total 
  5246.             number  of program units or the number of program  units 
  5247.             active  at  a given time are allocated  dynamically  and 
  5248.             deallocated when they are no longer needed. 
  5249.  
  5250.         2)  Execution  and  timing  data may only  be  reported  for 
  5251.             program  units that have been instrumented by the source 
  5252.             instrumenter.
  5253.  
  5254.         3)  Regardless  of  whether or not the Ada  compiler  system 
  5255.             being used for program development provides an interface 
  5256.             to  programming  languages  other  than  Ada,  only  Ada 
  5257.             program units may be instrumented.
  5258.  
  5259.         4)  The  runtime execution monitor imposes a certain  amount 
  5260.             of  overhead on the execution time of each  instrumented 
  5261.             Ada program unit. This overhead will vary from system to 
  5262.             system.  If  the program under test terminates  normally 
  5263.             then Profile will report the amount of overhead that was 
  5264.             measured and adjusted for the Run Time Monitor. However, 
  5265.             not  all of the overhead can be compensated for  without 
  5266.             greatly reducing the accuracy of the reported times. 
  5267.  
  5268.         5)  In addition to overhead imposed by the Run Time Monitor, 
  5269.             execution time of the program under test is affected  by 
  5270.             many  factors such as process scheduling  algorithms  of 
  5271.             the host computer system,  the output device assigned to 
  5272.             log  files,  virtual  memory schema,  and the number  of 
  5273.             other processes active during the performance  analysis. 
  5274.             Profile is NOT a CPU monitor and cannot determine actual 
  5275.             CPU times for the program under test. All times reported 
  5276.             are  elapsed  wall clock times which are the  result  of 
  5277.             starting  and  ending  times for each  instrumented  Ada 
  5278.             program unit.  Therefore,  the most accurate timing data 
  5279.             will  be obtained when the instrumented test program  is 
  5280.             executed stand alone.
  5281.  
  5282.         6)  Timing  information  reported for Ada program  units  is 
  5283.             limited  by  the real-time clock interval for  the  host 
  5284.             computer. 
  5285.  
  5286.  
  5287.  
  5288.  
  5289.  
  5290.  
  5291.  
  5292.  
  5293.  
  5294.  
  5295.  
  5296.  
  5297.  
  5298.  
  5299.         Performance Analyzer User's Guide                    Page: 24
  5300.  
  5301.  
  5302.  
  5303.         7)  It is not possible to determine the names of objects  of 
  5304.             task types in the Run Time monitor; only the type of the 
  5305.             task  and  the number of times a task of that  type  has 
  5306.             executed.  Therefore,  PROFILE  reports the TOTAL,  MAX, 
  5307.             MIN,  and AVERAGE execution times for all tasks of  each 
  5308.             type.
  5309.  
  5310.         8)  It  is  not  possible  to detect that a  unit  has  been 
  5311.             entered until it actually begins  execution.  Therefore, 
  5312.             any  initialization  time  required for a  program  unit 
  5313.             prior to beginning execution is "charged" to the calling 
  5314.             unit.
  5315.  
  5316.  
  5317.  
  5318.  
  5319.  
  5320.  
  5321.  
  5322.  
  5323.  
  5324.  
  5325.  
  5326.  
  5327.  
  5328.  
  5329.  
  5330.  
  5331.  
  5332.  
  5333.  
  5334.  
  5335.  
  5336.  
  5337.  
  5338.  
  5339.  
  5340.  
  5341.  
  5342.  
  5343.  
  5344.  
  5345.  
  5346.  
  5347.  
  5348.  
  5349.  
  5350.  
  5351.  
  5352.  
  5353.  
  5354.  
  5355.  
  5356.  
  5357.  
  5358.  
  5359.  
  5360.  
  5361.  
  5362.  
  5363.  
  5364.  
  5365.         Performance Analyzer User's Guide                Page: A - 1
  5366.  
  5367.  
  5368.  
  5369.  
  5370.  
  5371.  
  5372.  
  5373.  
  5374.  
  5375.  
  5376.  
  5377.         
  5378.                                  APPENDIX A
  5379.  
  5380.  
  5381.  
  5382.                                SAMPLE REPORT
  5383.  
  5384.                                     AND
  5385.  
  5386.                                   ANALYSIS
  5387.         
  5388.  
  5389.  
  5390.  
  5391.            This  appendix  contains Performance Analysis  Reports 
  5392.            generated  by  Profile during testing of  a  real  Ada 
  5393.            program.  In  addition,  an analysis of each report is 
  5394.            given  in order to guide the user in interpreting  the 
  5395.            information presented.
  5396.  
  5397.  
  5398.  
  5399.  
  5400.  
  5401.  
  5402.  
  5403.  
  5404.  
  5405.  
  5406.  
  5407.  
  5408.  
  5409.  
  5410.  
  5411.  
  5412.  
  5413.  
  5414.  
  5415.  
  5416.  
  5417.  
  5418.  
  5419.  
  5420.  
  5421.  
  5422.  
  5423.  
  5424.  
  5425.  
  5426.  
  5427.  
  5428.  
  5429.  
  5430.  
  5431.         Performance Analyzer User's Guide                Page: A - 2
  5432.  
  5433.  
  5434.  
  5435.  
  5436.  
  5437.              The  reports in this appendix have been prepared  using 
  5438.         the  the  program  Profile  as  an  example.   Profile   was 
  5439.         instrumented  and analyzed while it performed a  performance 
  5440.         analysis of another instrumented program.
  5441.  
  5442.             Before  we  analyze the reports it might be  helpful  to 
  5443.         have  a brief overview of the structure of the program.  The 
  5444.         package  PROFILE_PKG  contains  1  procedure,  PROFILE.  The 
  5445.         procedure PROFILE contains 14 other program units:
  5446.  
  5447.             CALCULATE_EXPECTED_ERROR     PRINT_NET_EXECUTION_TIMES
  5448.             PERCENT_OF_ERROR             PRINT_TOTAL_EXECUTION_TIMES
  5449.             GET_UNIT_CLOCK               PRINT_UNIT_STATS
  5450.             NEW_REPORT_LINE              READ_LOG_FILE
  5451.             PERCENT_OF_TOTAL             SORT
  5452.             PRINT_CALL_SUMMARY_REPORT    ORDER
  5453.             PRINT_CUM_EXECUTION_TIMES    UPDATE_CURRENT_CLOCK
  5454.  
  5455.  
  5456.              In   addition  to  the  predefined   library   packages 
  5457.         STANDARD,  CALENDAR,  and  TEXT_IO,  PROFILE  also  directly 
  5458.         with's the following other packages:
  5459.  
  5460.             CLOCKS               READ_LOG             TIME_LIBRARY_2
  5461.             DYNARRAY_PKG         REPORT_LIBRARY       STACK_PKG
  5462.             HEAP_SORT            TIME_LIBRARY_1       STRING_PKG
  5463.             TYPE_DEFINITIONS
  5464.             IMPLEMENTATION_DEPENDENCIES
  5465.  
  5466.  
  5467.              Although  other  packages  are with'd by  the  packages 
  5468.         above, they are not currently of interest.  For the purposes 
  5469.         of  this analysis two compilation units  were  instrumented: 
  5470.         the  package  body PROFILE_PKG and the package body  CLOCKS. 
  5471.         The  package  clocks  also contains  the  following  program 
  5472.         units:
  5473.  
  5474.             CREATE_CLOCKS        PAUSE_UNIT           START_UNIT
  5475.             DESTROY_CLOCKS       PREVIOUS_UNIT        STOP_UNIT
  5476.             MORE_TASKS           RESTART_UNIT         TASK_OF
  5477.             MORE_UNITS
  5478.  
  5479.  
  5480.              The   Source  Instrumenter  defaults  for   performance 
  5481.         analysis  were  selected  for both  PROFILE_PKG  and  CLOCKS 
  5482.         (instrument  all  program units in the compilation unit  for 
  5483.         entry and exit only). 
  5484.  
  5485.  
  5486.  
  5487.  
  5488.  
  5489.  
  5490.  
  5491.  
  5492.  
  5493.  
  5494.  
  5495.  
  5496.  
  5497.         Performance Analyzer User's Guide                Page: A - 3
  5498.  
  5499.  
  5500.  
  5501.  
  5502.                                   ANALYSIS
  5503.  
  5504.  
  5505.         
  5506.         1. Test Configuration Report
  5507.         
  5508.            This  report tells us the test configuration  information 
  5509.         that  was  recorded  in  the log file at  the  time  it  was 
  5510.         generated.  This  enables us to verify that we have used the 
  5511.         correct log file.  In addition it tells us that the overhead 
  5512.         imposed  by  the Run Time Monitor during  execution  of  the 
  5513.         target  program,  PROFILE,  accounted for nearly 50% of  the 
  5514.         total  execution time.  This is not necessarily typical.  As 
  5515.         discussed earlier overhead is a function of many factors and 
  5516.         execution  time   may vary anywhere from about 1.1:1  up  to 
  5517.         about 20:1, depending on the program being tested.
  5518.  
  5519.  
  5520.  
  5521.  
  5522.  
  5523.  
  5524.  
  5525.  
  5526.  
  5527.  
  5528.  
  5529.  
  5530.  
  5531.  
  5532.  
  5533.  
  5534.  
  5535.  
  5536.  
  5537.  
  5538.  
  5539.  
  5540.  
  5541.  
  5542.  
  5543.  
  5544.  
  5545.  
  5546.  
  5547.  
  5548.  
  5549.  
  5550.  
  5551.  
  5552.  
  5553.  
  5554.  
  5555.  
  5556.  
  5557.  
  5558.  
  5559.  
  5560.  
  5561.  
  5562.  
  5563.         Performance Analyzer User's Guide                Page: A - 4
  5564.  
  5565.  
  5566.  
  5567.  
  5568.         
  5569.         2. Total Execution Times Report
  5570.         
  5571.              This  report  tells us the most about where profile  is 
  5572.         spending  its time.  A quick look at the "Percent  of  Total 
  5573.         Execution  Time" column (%T) for cumulative execution  times 
  5574.         tells  us  something  we already know,  that the  top  level 
  5575.         procedure,  PROFILE,  is  the  main program unit and  had  a 
  5576.         cumulative  execution  time  of  100%  (indicated  by  "*"). 
  5577.         However,  the  line  directly below that tells us  that  the 
  5578.         program unit READ_LOG_FILE,  although it was executed only 1 
  5579.         time,  had a cumulative execution time of 80%.  But, looking 
  5580.         to the left we see that it had a net execution time of  only 
  5581.         23%.
  5582.  
  5583.  
  5584.  
  5585.  
  5586.  
  5587.  
  5588.  
  5589.  
  5590.  
  5591.  
  5592.  
  5593.  
  5594.  
  5595.  
  5596.  
  5597.  
  5598.  
  5599.  
  5600.  
  5601.  
  5602.  
  5603.  
  5604.  
  5605.  
  5606.  
  5607.  
  5608.  
  5609.  
  5610.  
  5611.  
  5612.  
  5613.  
  5614.  
  5615.  
  5616.  
  5617.  
  5618.  
  5619.  
  5620.  
  5621.  
  5622.  
  5623.  
  5624.  
  5625.  
  5626.  
  5627.  
  5628.  
  5629.         Performance Analyzer User's Guide                Page: A - 5
  5630.  
  5631.  
  5632.  
  5633.  
  5634.             Although  23%  is  a  large  portion  of  total  program 
  5635.         execution  time,  remember  that "net" execution  time  also 
  5636.         includes  time spent in other called program units that have 
  5637.         not  been instrumented.  In this case it may not be  out  of 
  5638.         line  since  it includes times for all READ_LOG  procedures, 
  5639.         which performs a great deal of I/O.  The conclusion that  we 
  5640.         draw here is that 57% (80% - 23%) of total program execution 
  5641.         time  is spent in other instrumented program units that  are 
  5642.         called by READ_LOG_FILE.
  5643.  
  5644.              Other  instrumented  program units that are  called  by 
  5645.         READ_LOG_FILE  include the procedures  UPDATE_CURRENT_CLOCK, 
  5646.         GET_UNIT_CLOCK  and   all of the procedures in  the  package 
  5647.         CLOCKS.  Totaling up all of the program units in the package 
  5648.         CLOCKS  we see that together they used approximately 40%  of 
  5649.         total program execution time, but individually the most time 
  5650.         used  by any single unit was only 9%.  Perhaps inspection of 
  5651.         the CLOCKS package would reveal some areas of the code  that 
  5652.         could be more efficient.  Certainly the total amount of time 
  5653.         spent in that package warrants a closer examination. 
  5654.  
  5655.              The   procedure   GET_UNIT_CLOCK  and   the   procedure 
  5656.         UPDATE_CURRENT_CLOCK  together  used  approximately  40%  of 
  5657.         total  program  execution  time  and  also  warrant   closer 
  5658.         investigation.    They  use  the  dynamic  array  management 
  5659.         package DYNARRAY which has not been instrumented.
  5660.  
  5661.              Before  any  definite conclusions are  drawn  from  the 
  5662.         Total  Execution  Times Report,  we will continue on to  the 
  5663.         other  reports to determine whether or not they reveal  more 
  5664.         about the program.
  5665.  
  5666.  
  5667.  
  5668.  
  5669.  
  5670.  
  5671.  
  5672.  
  5673.  
  5674.  
  5675.  
  5676.  
  5677.  
  5678.  
  5679.  
  5680.  
  5681.  
  5682.  
  5683.  
  5684.  
  5685.  
  5686.  
  5687.  
  5688.  
  5689.  
  5690.  
  5691.  
  5692.  
  5693.  
  5694.  
  5695.         Performance Analyzer User's Guide                Page: A - 6
  5696.  
  5697.  
  5698.         
  5699.         3. Net Execution Times Report
  5700.         
  5701.              A  quick  glance at this report shows us  that  several 
  5702.         program  units that have high execution counts also  have  a 
  5703.         wide  variation between maximum and minimum execution times. 
  5704.         Looking  at the code for one of these units that is executed 
  5705.         232  times,  MORE_UNITS,  it  is obvious that a call to  the 
  5706.         uninstrumented function STACK_PKG.IS_EMPTY could be  avoided 
  5707.         on  each  execution  if  a local  counter  were  maintained. 
  5708.         Further investigation could reveal that the search algorithm 
  5709.         used by GET_UNIT_CLOCK could be more efficient to reduce the 
  5710.         number of accesses to the package DYNARRAY.
  5711.  
  5712.  
  5713.  
  5714.  
  5715.  
  5716.  
  5717.  
  5718.  
  5719.  
  5720.  
  5721.  
  5722.  
  5723.  
  5724.  
  5725.  
  5726.  
  5727.  
  5728.  
  5729.  
  5730.  
  5731.  
  5732.  
  5733.  
  5734.  
  5735.  
  5736.  
  5737.  
  5738.  
  5739.  
  5740.  
  5741.  
  5742.  
  5743.  
  5744.  
  5745.  
  5746.  
  5747.  
  5748.  
  5749.  
  5750.  
  5751.  
  5752.  
  5753.  
  5754.  
  5755.  
  5756.  
  5757.  
  5758.  
  5759.  
  5760.  
  5761.         Performance Analyzer User's Guide                Page: A - 7
  5762.  
  5763.  
  5764.  
  5765.         
  5766.         4. Cumulative Execution Times Report
  5767.         
  5768.              This  report confirms what we saw on the Net  Execution 
  5769.         Times  Report:  a wide variation between maximum and minimum 
  5770.         times  for  program  units  that had  a  high  frequency  of 
  5771.         execution.
  5772.  
  5773.  
  5774.  
  5775.  
  5776.  
  5777.  
  5778.  
  5779.  
  5780.  
  5781.  
  5782.  
  5783.  
  5784.  
  5785.  
  5786.  
  5787.  
  5788.  
  5789.  
  5790.  
  5791.  
  5792.  
  5793.  
  5794.  
  5795.  
  5796.  
  5797.  
  5798.  
  5799.  
  5800.  
  5801.  
  5802.  
  5803.  
  5804.  
  5805.  
  5806.  
  5807.  
  5808.  
  5809.  
  5810.  
  5811.  
  5812.  
  5813.  
  5814.  
  5815.  
  5816.  
  5817.  
  5818.  
  5819.  
  5820.  
  5821.  
  5822.  
  5823.  
  5824.  
  5825.  
  5826.  
  5827.         Performance Analyzer User's Guide                Page: A - 8
  5828.  
  5829.  
  5830.         
  5831.         5. Call Summary Report
  5832.  
  5833.              The  first thing we see when we look at this report  is 
  5834.         that  the  program  terminated  normally.  The  Anormal  End 
  5835.         (ABEND)  level of zero for each program unit indicates  that 
  5836.         all  program units had terminated execution and that the log 
  5837.         file  was  properly closed.  If the program  had  terminated 
  5838.         abnormally this field would tell us which program units were 
  5839.         active and their recursion level at the time of termination. 
  5840.         This  could be very important in assessing the  accuracy  of 
  5841.         the information presented.
  5842.  
  5843.  
  5844.  
  5845.  
  5846.  
  5847.  
  5848.  
  5849.  
  5850.  
  5851.  
  5852.  
  5853.  
  5854.  
  5855.  
  5856.  
  5857.  
  5858.  
  5859.  
  5860.  
  5861.  
  5862.  
  5863.  
  5864.  
  5865.  
  5866.  
  5867.  
  5868.  
  5869.  
  5870.  
  5871.  
  5872.  
  5873.  
  5874.  
  5875.  
  5876.  
  5877.  
  5878.  
  5879.  
  5880.  
  5881.  
  5882.  
  5883.  
  5884.  
  5885.  
  5886.  
  5887.  
  5888.  
  5889.  
  5890.  
  5891.  
  5892.  
  5893.         Performance Analyzer User's Guide                Page: A - 9
  5894.  
  5895.  
  5896.  
  5897.  
  5898.              We  also see that the Maximum Recursion Level (MAX  RL) 
  5899.         for  all instrumented program units was 1,  indicating  that 
  5900.         none of the program units instrumented executed recursively. 
  5901.         The main program unit,  PROFILE, called 8 other instrumented 
  5902.         program  units,  which  in  turn made 1109  calls  to  other 
  5903.         instrumented program units. Looking down to READ_LOG_FILE we 
  5904.         see that 1001 of PROFILE's 1109 grandsons were called  while 
  5905.         in Read_Log_File. This is consistent with the statistic that 
  5906.         80% of total program execution time was spent in this unit.
  5907.  
  5908.  
  5909.  
  5910.  
  5911.         
  5912.                                 CONCLUSIONS
  5913.  
  5914.         
  5915.              We  have  been able to draw the  following  conclusions 
  5916.         from the information presented about the program PROFILE.
  5917.  
  5918.         1.  Approximately  80%  of total program execution  time  is 
  5919.         spent in the procedure READ_LOG_FILE and other program units
  5920.         that it calls. This procedure also has the largest number of 
  5921.         direct descendents.   This would be the first place to start 
  5922.         looking for inefficiencies.
  5923.  
  5924.         2.  The program units  PAUSE_UNIT, RESTART_UNIT, MORE_UNITS, 
  5925.         and  GET_UNIT_CLOCK are not only the most frequently  called 
  5926.         units  but  they also all use a substantial amount of  total 
  5927.         program  execution time.   Any optimization in  these  units 
  5928.         should  result  in  a sizeable reduction  in  total  program 
  5929.         execution time.
  5930.  
  5931.         3.   The  next  step  might  be to  instrument  the  package 
  5932.         READ_LOG  to determine how much of READ_LOG_FILE's  time  is 
  5933.         actually spent in READ_LOG program units.  If this were done 
  5934.         it  would reveal that READ_LOG_FILE's net time is only about 
  5935.         10%  of total program execution time.  The other 13%  (23% - 
  5936.         10%) is actually spent performing I/O.  It would also reveal 
  5937.         that READ_LOG contains a recursive function call that  might 
  5938.         warrant  close inspection.  Minor optimizations in recursive 
  5939.         program  units can often result in  significant  performance 
  5940.         improvements if they have a high frequency of execution.
  5941.  
  5942.  
  5943.  
  5944.  
  5945.  
  5946.  
  5947.  
  5948.  
  5949.  
  5950.  
  5951.  
  5952.  
  5953.  
  5954.  
  5955.  
  5956.  
  5957.  
  5958.  
  5959.         Performance Analyzer User's Guide                Page: B - 1
  5960.  
  5961.  
  5962.  
  5963.  
  5964.  
  5965.  
  5966.  
  5967.  
  5968.  
  5969.  
  5970.  
  5971.         
  5972.                                  APPENDIX B
  5973.  
  5974.                                   GLOSSARY
  5975.         
  5976.  
  5977.  
  5978.  
  5979.  
  5980.  
  5981.  
  5982.  
  5983.  
  5984.  
  5985.  
  5986.  
  5987.  
  5988.  
  5989.  
  5990.  
  5991.  
  5992.  
  5993.  
  5994.  
  5995.  
  5996.  
  5997.  
  5998.  
  5999.  
  6000.  
  6001.  
  6002.  
  6003.  
  6004.  
  6005.  
  6006.  
  6007.  
  6008.  
  6009.  
  6010.  
  6011.  
  6012.  
  6013.  
  6014.  
  6015.  
  6016.  
  6017.  
  6018.  
  6019.  
  6020.  
  6021.  
  6022.  
  6023.  
  6024.  
  6025.         Performance Analyzer User's Guide                Page: B - 2
  6026.  
  6027.  
  6028.  
  6029.  
  6030.         
  6031.         Adjusted Execution Time
  6032.              Actual  recorded  execution time adjusted for  measured 
  6033.              overhead  imposed  by the Run Time  Monitor.   Not  all 
  6034.              overhead  can be measured.  No adjustment is  made  for 
  6035.              that portion of overhead that is not measured.
  6036.         
  6037.         Clock Fault
  6038.              A  Clock Fault is an indication of a condition that may 
  6039.              result  in the incorrect reporting of  execution  times 
  6040.              for  one  or more program units.  Execution  times  for 
  6041.              flagged  units will,  in most cases,  still be reported 
  6042.              accurately.  However, confidence levels in the accuracy 
  6043.              of  the  reported times for faulted  units  is  greatly 
  6044.              reduced.
  6045.           
  6046.         Cumulative Execution Time
  6047.              The  "Cumulative" execution time for a program unit  is 
  6048.              the  total accumulated time spent in that program  unit 
  6049.              and all other program units called by that unit whether 
  6050.              or  not the other program units have been  instrumented 
  6051.              by the source instrumenter.
  6052.         
  6053.         Dangling Unit
  6054.              A  "dangling  unit"  is a program unit that  was  still 
  6055.              "active"  when the end of the log file was  encountered 
  6056.              by  the  Profile  report  generator.   This   condition 
  6057.              normally   indicates   that  the  program  under   test 
  6058.              terminated abnormally.  
  6059.         
  6060.         Execution Log File
  6061.              A  sequential  file  created by the  Run  Time  Monitor 
  6062.              during  execution  of  an Ada  program  that  has  been 
  6063.              instrumented  by  the Source  Instrumenter.  The  terms 
  6064.              "Execution    Log    File"   and   "Log    File"    are 
  6065.              interchangeable.
  6066.         
  6067.         Expected Error
  6068.              Expected error is an estimation of the maximum expected 
  6069.              error  in  the reported time of a program unit  and  is 
  6070.              given  as   as  a  percentage  of  the  reported  time.  
  6071.              Expected error is a function of the length of execution 
  6072.              time  of a program unit,  the number of times the  unit 
  6073.              executed, the duration of the test, and the basic clock 
  6074.              period (System.Tick).
  6075.         
  6076.         Log File
  6077.              A  sequential  file  created by the  Run  Time  Monitor 
  6078.              during  execution  of  an Ada  program  that  has  been 
  6079.              instrumented  by  the Source  Instrumenter.  The  terms 
  6080.              "Execution    Log    File"   and   "Log    File"    are 
  6081.              interchangeable.
  6082.  
  6083.  
  6084.  
  6085.  
  6086.  
  6087.  
  6088.  
  6089.  
  6090.  
  6091.         Performance Analyzer User's Guide                Page: B - 3
  6092.  
  6093.  
  6094.  
  6095.  
  6096.         
  6097.         Net Execution Time
  6098.              The  "Net"  execution  time for a program unit  is  the 
  6099.              total accumulated time spent in that program  unit.  It 
  6100.              does  not  include  time spent in other  program  units 
  6101.              called by that unit if they have also been instrumented 
  6102.              by the source instrumenter. 
  6103.         
  6104.         Overhead
  6105.              The term "overhead" refers to the additional  execution 
  6106.              time  imposed on the program under test by the Run Time 
  6107.              Monitor.   Only  a  portion  of this  overhead  can  be 
  6108.              measured with any degree of accuracy.   If the  program 
  6109.              under  test  terminates  normally  the  Profile  Report 
  6110.              Generator  will,  if  requested  by  the  user,  adjust 
  6111.              execution  times for that portion of the overhead  that 
  6112.              was measured by the Run Time Monitor. 
  6113.         
  6114.         Program Unit
  6115.              Ada  programs  may  contain  four  different  types  of 
  6116.              program  units:   procedures,   functions,   tasks  and 
  6117.              generics.  However,  the Ada language also provides the 
  6118.              ability  to include executeable code within  a  package 
  6119.              body  that  is not included within any of  the  program 
  6120.              units contained in that package.  This code is executed 
  6121.              during  package  initialization  when  the  package  is 
  6122.              elaborated. Profile reports timing information for this 
  6123.              "initialization"  code  the  same as  for  Ada  program 
  6124.              units.     Therefore,     for    reporting    purposes, 
  6125.              initialization  code  within  a package  body  is  also 
  6126.              treated as a program unit.
  6127.         
  6128.         Report Time
  6129.              The   time  that  the  Profile  Report  Generator   was 
  6130.              executed.
  6131.         
  6132.         Run Time Monitor
  6133.             A  runtime kernel that gains control upon entry  to  and 
  6134.             exit  from  each instrumented Ada program unit and  logs 
  6135.             timing  information about the program's  execution.  The 
  6136.             runtime  execution  monitor  must  be  linked  with  the 
  6137.             instrumented Ada program units.
  6138.         
  6139.         Source Instrumenter
  6140.             An  Ada  program that parses the target Ada program  and 
  6141.             inserts  "hooks" that transfer control to the  Run  Time 
  6142.             Monitor  upon  entry to and exit from each  instrumented 
  6143.             Ada program unit. Each Ada program unit for which timing 
  6144.             information  is to be recorded must be  instrumented  by 
  6145.             the Source Instrumenter prior to compilation.
  6146.  
  6147.  
  6148.  
  6149.  
  6150.  
  6151.  
  6152.  
  6153.  
  6154.  
  6155.  
  6156.  
  6157.         Performance Analyzer User's Guide                Page: B - 4
  6158.  
  6159.  
  6160.  
  6161.  
  6162.         
  6163.         Test ID
  6164.             A  unique test identification specified by the user when 
  6165.             the  program  under test is executed.  The  Test  ID  is 
  6166.             stored  in  the  log file by the Run  Time  Monitor  and 
  6167.             included in the Test Configuration Report by the Profile 
  6168.             report generator.
  6169.         
  6170.         Test Time
  6171.              The  date  and time that the program under  test  began 
  6172.              execution.
  6173.  
  6174.  
  6175.  
  6176.  
  6177.  
  6178.  
  6179.  
  6180.  
  6181.  
  6182.  
  6183.  
  6184.  
  6185.  
  6186.  
  6187.  
  6188.  
  6189.  
  6190.  
  6191.  
  6192.  
  6193.  
  6194.  
  6195.  
  6196.  
  6197.  
  6198.  
  6199.  
  6200.  
  6201.  
  6202.  
  6203.  
  6204.  
  6205.  
  6206.  
  6207.  
  6208.  
  6209.  
  6210.  
  6211.  
  6212.  
  6213.  
  6214.  
  6215.  
  6216.  
  6217.  
  6218.  
  6219.  
  6220.  
  6221.  
  6222.  
  6223.  
  6224.  
  6225.  
  6226.  
  6227. Profile 1.0                     MONDAY       07/22/85    22:17:50    Page:  1
  6228.  
  6229.  
  6230.               Ada Performance Analyzer - Test Configuration Report
  6231. -------------------------------------------------------------------------------
  6232.  
  6233.  
  6234.        Program Under Test:      PROFILE_PKG
  6235.  
  6236.        Test Date:               07/22/85
  6237.  
  6238.        Test Day:                MONDAY
  6239.  
  6240.        Test Time:               22:11:18
  6241.  
  6242.        Log File:                Profile.Log
  6243.  
  6244.        Test ID:                 Performance Analysis of Profile Version 1.0
  6245.  
  6246.  
  6247. -------------------------------------------------------------------------------
  6248.  
  6249.  
  6250.  
  6251.                    =========================================
  6252.                    Test Program Start Time:      22:11:45.52
  6253.                    Test Program Stop Time:       22:16:44.95
  6254.                    Total Test Execution Time:    00:04:59.43
  6255.                    Estimated Profile Overhead:   00:02:02.86
  6256.                    Adjusted Test Execution Time: 00:02:56.57
  6257.                    =========================================
  6258.  
  6259.  
  6260.  
  6261.  
  6262.  
  6263.  
  6264.  
  6265.  
  6266.  
  6267.  
  6268.  
  6269.  
  6270.  
  6271.  
  6272.  
  6273.  
  6274.  
  6275.  
  6276.  
  6277.  
  6278.  
  6279.  
  6280.  
  6281.  
  6282.  
  6283.  
  6284.  
  6285.  
  6286.  
  6287.  
  6288.  
  6289.  
  6290.  
  6291.  
  6292.  
  6293. Profile 1.0                     MONDAY       07/22/85    22:17:50    Page:  2
  6294.  
  6295.  
  6296.                              TOTAL EXECUTION TIMES
  6297. -------------------------------------------------------------------------------
  6298.           UNIT NAME           PU# T # EXEC     NET     %T %E  CUMULATIVE  %T %E
  6299. ----------------------------- --- - ------ ----------- -- --  ----------- -- --
  6300. PROFILE_PKG.PROFILE           001 P      1 00:00:07.10  4  1  00:02:56.57  *  0
  6301. PROFILE_PKG.PROFILE.
  6302.   READ_LOG_FILE               004 P      1 00:00:40.19 23  2  00:02:20.53 80  0
  6303. PROFILE_PKG.PROFILE.
  6304.   UPDATE_CURRENT_CLOCK        003 P     78 00:00:14.38  8  4  00:00:24.67 14  2
  6305. PROFILE_PKG.PROFILE.
  6306.   GET_UNIT_CLOCK              002 P    156 00:00:16.01  9  3  00:00:16.01  9  3
  6307. CLOCKS.PAUSE_UNIT             007 P    148 00:00:15.80  9  3  00:00:15.80  9  3
  6308. CLOCKS.RESTART_UNIT           005 P    148 00:00:15.72  9  3  00:00:15.72  9  3
  6309. CLOCKS.MORE_UNITS             012 F    232 00:00:15.19  9  3  00:00:15.19  9  3
  6310. CLOCKS.STOP_UNIT              006 P     78 00:00:08.99  5  6  00:00:09.26  5  6
  6311. PROFILE_PKG.PROFILE.SORT      005 P      2 00:00:02.55  1 16  00:00:08.67  5  0
  6312. CLOCKS.START_UNIT             004 P     78 00:00:08.49  5  6  00:00:08.49  5  6
  6313. PROFILE_PKG.PROFILE.
  6314.   PRINT_TOTAL_EXECUTION_TIMES 011 P      1 00:00:05.10  3  4  00:00:06.29  4  0
  6315. PROFILE_PKG.PROFILE.SORT.
  6316.   ORDER                       006 F     38 00:00:06.12  3  6  00:00:06.12  3  6
  6317. PROFILE_PKG.PROFILE.
  6318.   PRINT_UNIT_STATS            012 P     14 00:00:04.41  2  6  00:00:05.18  3  3
  6319. CLOCKS.PREVIOUS_UNIT          011 F     77 00:00:05.14  3  8  00:00:05.14  3  8
  6320. PROFILE_PKG.PROFILE.
  6321.   PRINT_NET_EXECUTION_TIMES   013 P      1 00:00:02.03  1  4  00:00:04.61  3  0
  6322. PROFILE_PKG.PROFILE.
  6323.   PRINT_CUM_EXECUTION_TIMES   014 P      1 00:00:01.93  1  4  00:00:04.53  3  0
  6324. PROFILE_PKG.PROFILE.
  6325.   CALCULATE_EXPECTED_ERROR    007 P      1 00:00:00.92  1 16  00:00:03.02  2  0
  6326. PROFILE_PKG.PROFILE.
  6327.   CALCULATE_EXPECTED_ERROR.
  6328.   PERCENT_OF_ERROR            008 F     14 00:00:02.10  1  7  00:00:02.10  1  7
  6329. PROFILE_PKG.PROFILE.
  6330.   NEW_REPORT_LINE             009 F     28 00:00:01.98  1 14  00:00:01.98  1 14
  6331. PROFILE_PKG.PROFILE.
  6332.   PRINT_CALL_SUMMARY_REPORT   015 P      1 00:00:01.32  1  6  00:00:01.82  1  1
  6333. PROFILE_PKG.PROFILE.
  6334.   PERCENT_OF_TOTAL            010 F     14 00:00:00.48  0 20  00:00:00.48  0 20
  6335. CLOCKS.TASK_OF                001 F      3 00:00:00.27  0 11  00:00:00.27  0 11
  6336. CLOCKS.DESTROY_CLOCKS         003 P      1 00:00:00.15  0  7  00:00:00.15  0  7
  6337. CLOCKS.MORE_TASKS             013 F      1 00:00:00.13  0  8  00:00:00.13  0  8
  6338. CLOCKS.CREATE_CLOCKS          002 P      1 00:00:00.04  0 20  00:00:00.04  0 20
  6339.  
  6340.  
  6341.  
  6342.  
  6343.  
  6344.  
  6345.  
  6346.  
  6347.  
  6348.  
  6349.  
  6350.  
  6351.  
  6352.  
  6353.  
  6354.  
  6355.  
  6356.  
  6357.  
  6358.  
  6359. Profile 1.0                     MONDAY       07/22/85    22:17:50    Page:  3
  6360.  
  6361.  
  6362.                               NET EXECUTION TIMES
  6363. -------------------------------------------------------------------------------
  6364.           UNIT NAME           PU# # EXEC   MAXIMUM     MINIMUM     AVERAGE   %E
  6365. ----------------------------- --- ------ ----------- ----------- ----------- --
  6366. CLOCKS.CREATE_CLOCKS          002      1 00:00:00.04 00:00:00.04 00:00:00.04 20
  6367. CLOCKS.DESTROY_CLOCKS         003      1 00:00:00.15 00:00:00.15 00:00:00.15  7
  6368. CLOCKS.MORE_TASKS             013      1 00:00:00.13 00:00:00.13 00:00:00.13  8
  6369. CLOCKS.MORE_UNITS             012    232 00:00:00.28 00:00:00.02 00:00:00.07  3
  6370. CLOCKS.PAUSE_UNIT             007    148 00:00:00.77 00:00:00.03 00:00:00.11  3
  6371. CLOCKS.PREVIOUS_UNIT          011     77 00:00:00.29 00:00:00.02 00:00:00.07  8
  6372. CLOCKS.RESTART_UNIT           005    148 00:00:00.64 00:00:00.03 00:00:00.11  3
  6373. CLOCKS.START_UNIT             004     78 00:00:00.47 00:00:00.03 00:00:00.11  6
  6374. CLOCKS.STOP_UNIT              006     78 00:00:00.62 00:00:00.03 00:00:00.12  6
  6375. CLOCKS.TASK_OF                001      3 00:00:00.09 00:00:00.09 00:00:00.09 11
  6376. PROFILE_PKG.PROFILE           001      1 00:00:07.10 00:00:07.10 00:00:07.10  1
  6377. PROFILE_PKG.PROFILE.
  6378.   CALCULATE_EXPECTED_ERROR    007      1 00:00:00.92 00:00:00.92 00:00:00.92 16
  6379. PROFILE_PKG.PROFILE.
  6380.   CALCULATE_EXPECTED_ERROR.
  6381.   PERCENT_OF_ERROR            008     14 00:00:00.16 00:00:00.14 00:00:00.15  7
  6382. PROFILE_PKG.PROFILE.
  6383.   GET_UNIT_CLOCK              002    156 00:00:00.34 00:00:00.03 00:00:00.10  3
  6384. PROFILE_PKG.PROFILE.
  6385.   NEW_REPORT_LINE             009     28 00:00:00.17 00:00:00.04 00:00:00.07 14
  6386. PROFILE_PKG.PROFILE.
  6387.   PERCENT_OF_TOTAL            010     14 00:00:00.04 00:00:00.03 00:00:00.03 20
  6388. PROFILE_PKG.PROFILE.
  6389.   PRINT_CALL_SUMMARY_REPORT   015      1 00:00:01.32 00:00:01.32 00:00:01.32  6
  6390. PROFILE_PKG.PROFILE.
  6391.   PRINT_CUM_EXECUTION_TIMES   014      1 00:00:01.93 00:00:01.93 00:00:01.93  4
  6392. PROFILE_PKG.PROFILE.
  6393.   PRINT_NET_EXECUTION_TIMES   013      1 00:00:02.03 00:00:02.03 00:00:02.03  4
  6394. PROFILE_PKG.PROFILE.
  6395.   PRINT_TOTAL_EXECUTION_TIMES 011      1 00:00:05.10 00:00:05.10 00:00:05.10  4
  6396. PROFILE_PKG.PROFILE.
  6397.   PRINT_UNIT_STATS            012     14 00:00:00.43 00:00:00.28 00:00:00.31  6
  6398. PROFILE_PKG.PROFILE.
  6399.   READ_LOG_FILE               004      1 00:00:40.19 00:00:40.19 00:00:40.19  2
  6400. PROFILE_PKG.PROFILE.SORT      005      2 00:00:01.39 00:00:01.16 00:00:01.27 16
  6401. PROFILE_PKG.PROFILE.SORT.
  6402.   ORDER                       006     38 00:00:00.20 00:00:00.14 00:00:00.16  6
  6403. PROFILE_PKG.PROFILE.
  6404.   UPDATE_CURRENT_CLOCK        003     78 00:00:00.79 00:00:00.05 00:00:00.18  4
  6405.  
  6406.  
  6407.  
  6408.  
  6409.  
  6410.  
  6411.  
  6412.  
  6413.  
  6414.  
  6415.  
  6416.  
  6417.  
  6418.  
  6419.  
  6420.  
  6421.  
  6422.  
  6423.  
  6424.  
  6425. Profile 1.0                     MONDAY       07/22/85    22:17:50    Page:  4
  6426.  
  6427.  
  6428.                            CUMULATIVE EXECUTION TIMES
  6429. -------------------------------------------------------------------------------
  6430.           UNIT NAME           PU# # EXEC   MAXIMUM     MINIMUM     AVERAGE   %E
  6431. ----------------------------- --- ------ ----------- ----------- ----------- --
  6432. CLOCKS.CREATE_CLOCKS          002      1 00:00:00.04 00:00:00.04 00:00:00.04 20
  6433. CLOCKS.DESTROY_CLOCKS         003      1 00:00:00.15 00:00:00.15 00:00:00.15  7
  6434. CLOCKS.MORE_TASKS             013      1 00:00:00.13 00:00:00.13 00:00:00.13  8
  6435. CLOCKS.MORE_UNITS             012    232 00:00:00.28 00:00:00.02 00:00:00.07  3
  6436. CLOCKS.PAUSE_UNIT             007    148 00:00:00.77 00:00:00.03 00:00:00.11  3
  6437. CLOCKS.PREVIOUS_UNIT          011     77 00:00:00.29 00:00:00.02 00:00:00.07  8
  6438. CLOCKS.RESTART_UNIT           005    148 00:00:00.64 00:00:00.03 00:00:00.11  3
  6439. CLOCKS.START_UNIT             004     78 00:00:00.47 00:00:00.03 00:00:00.11  6
  6440. CLOCKS.STOP_UNIT              006     78 00:00:00.62 00:00:00.03 00:00:00.12  6
  6441. CLOCKS.TASK_OF                001      3 00:00:00.09 00:00:00.09 00:00:00.09 11
  6442. PROFILE_PKG.PROFILE           001      1 00:02:56.57 00:02:56.57 00:02:56.57  0
  6443. PROFILE_PKG.PROFILE.
  6444.   CALCULATE_EXPECTED_ERROR    007      1 00:00:03.02 00:00:03.02 00:00:03.02  0
  6445. PROFILE_PKG.PROFILE.
  6446.   CALCULATE_EXPECTED_ERROR.
  6447.   PERCENT_OF_ERROR            008     14 00:00:00.16 00:00:00.14 00:00:00.15  7
  6448. PROFILE_PKG.PROFILE.
  6449.   GET_UNIT_CLOCK              002    156 00:00:00.34 00:00:00.03 00:00:00.10  3
  6450. PROFILE_PKG.PROFILE.
  6451.   NEW_REPORT_LINE             009     28 00:00:00.17 00:00:00.04 00:00:00.07 14
  6452. PROFILE_PKG.PROFILE.
  6453.   PERCENT_OF_TOTAL            010     14 00:00:00.04 00:00:00.03 00:00:00.03 20
  6454. PROFILE_PKG.PROFILE.
  6455.   PRINT_CALL_SUMMARY_REPORT   015      1 00:00:01.82 00:00:01.82 00:00:01.82  1
  6456. PROFILE_PKG.PROFILE.
  6457.   PRINT_CUM_EXECUTION_TIMES   014      1 00:00:04.53 00:00:04.53 00:00:04.53  0
  6458. PROFILE_PKG.PROFILE.
  6459.   PRINT_NET_EXECUTION_TIMES   013      1 00:00:04.61 00:00:04.61 00:00:04.61  0
  6460. PROFILE_PKG.PROFILE.
  6461.   PRINT_TOTAL_EXECUTION_TIMES 011      1 00:00:06.29 00:00:06.29 00:00:06.29  0
  6462. PROFILE_PKG.PROFILE.
  6463.   PRINT_UNIT_STATS            012     14 00:00:00.48 00:00:00.32 00:00:00.37  3
  6464. PROFILE_PKG.PROFILE.
  6465.   READ_LOG_FILE               004      1 00:02:20.53 00:02:20.53 00:02:20.53  0
  6466. PROFILE_PKG.PROFILE.SORT      005      2 00:00:04.87 00:00:03.80 00:00:04.33  0
  6467. PROFILE_PKG.PROFILE.SORT.
  6468.   ORDER                       006     38 00:00:00.20 00:00:00.14 00:00:00.16  6
  6469. PROFILE_PKG.PROFILE.
  6470.   UPDATE_CURRENT_CLOCK        003     78 00:00:00.96 00:00:00.09 00:00:00.32  2
  6471.  
  6472.  
  6473.  
  6474.  
  6475.  
  6476.  
  6477.  
  6478.  
  6479.  
  6480.  
  6481.  
  6482.  
  6483.  
  6484.  
  6485.  
  6486.  
  6487.  
  6488.  
  6489.  
  6490.  
  6491. Profile 1.0                     MONDAY       07/22/85    22:17:50    Page:  5
  6492.  
  6493.  
  6494.                               CALL SUMMARY REPORT
  6495. -------------------------------------------------------------------------------
  6496.           UNIT NAME           PU# T  EXECS   ABEND   MAX RL    SONS   GRANDSONS
  6497. ----------------------------- --- - ------- ------- ------- --------- ---------
  6498. CLOCKS.CREATE_CLOCKS          002 P       1       0       1         0         0
  6499. CLOCKS.DESTROY_CLOCKS         003 P       1       0       1         0         0
  6500. CLOCKS.MORE_TASKS             013 F       1       0       1         0         0
  6501. CLOCKS.MORE_UNITS             012 F     232       0       1         0         0
  6502. CLOCKS.PAUSE_UNIT             007 P     148       0       1         0         0
  6503. CLOCKS.PREVIOUS_UNIT          011 F      77       0       1         0         0
  6504. CLOCKS.RESTART_UNIT           005 P     148       0       1         0         0
  6505. CLOCKS.START_UNIT             004 P      78       0       1         0         0
  6506. CLOCKS.STOP_UNIT              006 P      78       0       1         3         0
  6507. CLOCKS.TASK_OF                001 F       3       0       1         0         0
  6508. PROFILE_PKG.PROFILE           001 P       1       0       1         8      1109
  6509. PROFILE_PKG.PROFILE.
  6510.   CALCULATE_EXPECTED_ERROR    007 P       1       0       1        14         0
  6511. PROFILE_PKG.PROFILE.
  6512.   CALCULATE_EXPECTED_ERROR.
  6513.   PERCENT_OF_ERROR            008 F      14       0       1         0         0
  6514. PROFILE_PKG.PROFILE.
  6515.   GET_UNIT_CLOCK              002 P     156       0       1         0         0
  6516. PROFILE_PKG.PROFILE.
  6517.   NEW_REPORT_LINE             009 F      28       0       1         0         0
  6518. PROFILE_PKG.PROFILE.
  6519.   PERCENT_OF_TOTAL            010 F      14       0       1         0         0
  6520. PROFILE_PKG.PROFILE.
  6521.   PRINT_CALL_SUMMARY_REPORT   015 P       1       0       1         7         0
  6522. PROFILE_PKG.PROFILE.
  6523.   PRINT_CUM_EXECUTION_TIMES   014 P       1       0       1         7         7
  6524. PROFILE_PKG.PROFILE.
  6525.   PRINT_NET_EXECUTION_TIMES   013 P       1       0       1         7         7
  6526. PROFILE_PKG.PROFILE.
  6527.   PRINT_TOTAL_EXECUTION_TIMES 011 P       1       0       1        21         0
  6528. PROFILE_PKG.PROFILE.
  6529.   PRINT_UNIT_STATS            012 P      14       0       1        14         0
  6530. PROFILE_PKG.PROFILE.
  6531.   READ_LOG_FILE               004 P       1       0       1       843       158
  6532. PROFILE_PKG.PROFILE.SORT      005 P       2       0       1        38         0
  6533. PROFILE_PKG.PROFILE.SORT.
  6534.   ORDER                       006 F      38       0       1         0         0
  6535. PROFILE_PKG.PROFILE.
  6536.   UPDATE_CURRENT_CLOCK        003 P      78       0       1       155         0
  6537.  
  6538.  
  6539.  
  6540.  
  6541.  
  6542.  
  6543.  
  6544.  
  6545.  
  6546.  
  6547.  
  6548.  
  6549.  
  6550.  
  6551.  
  6552.  
  6553. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  6554. --smart.ug
  6555. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  6556.  
  6557.  
  6558.  
  6559.  
  6560.  
  6561.  
  6562.  
  6563.  
  6564.  
  6565.         
  6566.  
  6567.                                     Ada*
  6568.  
  6569.                   Self Metric Analysis and Reporting Tool
  6570.  
  6571.                                  ( SMART )
  6572.  
  6573.                                 Version 1.0
  6574.  
  6575.                                 User's Guide
  6576.  
  6577.  
  6578.  
  6579.  
  6580.                                      by
  6581.  
  6582.                                  Alexis Wei
  6583.  
  6584.                              Intermetrics, Inc.
  6585.  
  6586.  
  6587.  
  6588.  
  6589.  
  6590.  
  6591.  
  6592.  
  6593.  
  6594.  
  6595.  
  6596.  
  6597.  
  6598.  
  6599.  
  6600.  
  6601.  
  6602.  
  6603.  
  6604.  
  6605.  
  6606.  
  6607.  
  6608.  
  6609.  
  6610.  
  6611.  
  6612.  
  6613.         * Ada is a trademark of the U.S. Department of Defense (AJPO)
  6614.  
  6615.  
  6616.  
  6617.  
  6618.  
  6619.  
  6620.  
  6621.  
  6622.         SMART User's Guide                                   Page: i
  6623.  
  6624.  
  6625.  
  6626.  
  6627.  
  6628.  
  6629.  
  6630.                                   PREFACE
  6631.  
  6632.  
  6633.               This program was developed by Intermetrics, Inc. 
  6634.               under Contract Number N66001-85-C-0032 to:
  6635.          
  6636.                       Naval Ocean Systems Center
  6637.                       271 Catalina Boulevard
  6638.                       San Diego, California  92152. 
  6639.  
  6640.  
  6641.  
  6642.  
  6643.  
  6644.  
  6645.  
  6646.  
  6647.  
  6648.  
  6649.  
  6650.  
  6651.  
  6652.  
  6653.  
  6654.  
  6655.  
  6656.  
  6657.  
  6658.  
  6659.  
  6660.  
  6661.  
  6662.  
  6663.  
  6664.  
  6665.  
  6666.  
  6667.  
  6668.  
  6669.  
  6670.  
  6671.  
  6672.  
  6673.  
  6674.  
  6675.  
  6676.  
  6677.  
  6678.  
  6679.  
  6680.  
  6681.  
  6682.  
  6683.  
  6684.  
  6685.  
  6686.  
  6687.  
  6688.         SMART User's Guide                                  Page: ii
  6689.  
  6690.  
  6691.  
  6692.         
  6693.                                   CONTENTS
  6694.  
  6695.  
  6696.  
  6697.         1.0  DESCRIPTION .......................................   1
  6698.  
  6699.  
  6700.         2.0  COMMAND FORMAT ....................................   2
  6701.  
  6702.         2.1    Source Program Instrumentation ..................   2
  6703.  
  6704.         2.2    Compilation and Linking .........................   5
  6705.  
  6706.         2.3    Target Program Execution ........................   6
  6707.  
  6708.         2.4    Report Generation ...............................   7
  6709.  
  6710.  
  6711.         3.0  OUTPUT FORMAT .....................................  10
  6712.  
  6713.         3.1    Test Configuration Report .......................  10
  6714.  
  6715.         3.2    Variable Trace Report ...........................  11
  6716.  
  6717.         3.3    Loop Summary Report .............................  12
  6718.  
  6719.         3.4    Variable Statistic Report .......................  13
  6720.  
  6721.  
  6722.         4.0  USING SMART .......................................  14
  6723.  
  6724.         4.1    Overhead ........................................  14
  6725.  
  6726.         4.2    Tracing Variables ...............................  14
  6727.  
  6728.         4.3    Report Generation ...............................  14
  6729.  
  6730.         4.4    Maximum, Minimum, and Average Values ............  15
  6731.  
  6732.         4.5    Reporting of Values of Real Types ...............  15
  6733.  
  6734.         4.6    Guidlines for Source Instrumentation ............  15
  6735.  
  6736.              
  6737.         5.0  RESTRICTIONS AND LIMITATIONS ......................  16
  6738.  
  6739.  
  6740.         APPENDIX A - SAMPLE REPORT FILE ........................ A-1
  6741.  
  6742.         APPENDIX B - GLOSSARY .................................. B-1
  6743.  
  6744.  
  6745.  
  6746.  
  6747.  
  6748.  
  6749.  
  6750.  
  6751.  
  6752.  
  6753.  
  6754.         SMART User's Guide                                   Page: 1
  6755.  
  6756.  
  6757.         
  6758.                               1.0  DESCRIPTION
  6759.         
  6760.              The Ada Self Metric Analysis and Reporting Tool, SMART, 
  6761.         is  one  of  an integrated set of five  tools  that  provide 
  6762.         testing  and  analysis aids for the development of  computer 
  6763.         programs  implemented  in  the  Ada  programming   language. 
  6764.         Specifically,  SMART provides the ability to:
  6765.  
  6766.             O  Trace  the  value of specified variables at entry  to 
  6767.                and   exit  from  each  program  unit  or   at   each 
  6768.                "breakpoint", including decision points.
  6769.  
  6770.             O  Determine the number of times loops execute. 
  6771.  
  6772.             O  Determine the maximum, minimum, and average values of 
  6773.                specified variables.
  6774.  
  6775.  
  6776.         SMART consists of three elements:
  6777.  
  6778.         1)  A source instrumenter that parses the target Ada program 
  6779.             and  inserts "hooks" that transfer control to a  runtime 
  6780.             kernal upon entry to and exit from each instrumented Ada 
  6781.             program unit and,  optionally,  at each breakpoint. Each 
  6782.             Ada  program unit for which dynamic run time information 
  6783.             is  to  be  recorded  must  be  instrumented  prior   to 
  6784.             compilation.
  6785.  
  6786.         2)  A  runtime  execution monitor,  or  kernel,  that  gains 
  6787.             control  upon execution of each instrumented  breakpoint 
  6788.             and   logs  dynamic  information  about  the   program's 
  6789.             execution.  The runtime execution monitor must be linked 
  6790.             with the instrumented Ada program units.
  6791.  
  6792.         3)  A   report   generator  that   analyzes   the   recorded 
  6793.             information  and  produces a comprehensive report  about 
  6794.             the  program's  execution in  an  easily  understandable 
  6795.             format.
  6796.  
  6797.  
  6798.              SMART  is a software development tool.  Its purpose  is 
  6799.         to aid the programmer or analyst during program development.
  6800.  
  6801.  
  6802.  
  6803.  
  6804.  
  6805.  
  6806.  
  6807.  
  6808.  
  6809.  
  6810.  
  6811.  
  6812.  
  6813.  
  6814.  
  6815.  
  6816.  
  6817.  
  6818.  
  6819.  
  6820.         SMART User's Guide                                   Page: 2
  6821.  
  6822.  
  6823.  
  6824.  
  6825.         
  6826.                             2.0  COMMAND FORMAT
  6827.         
  6828.  
  6829.              Operation  of  the Self Metric Analysis  and  Reporting 
  6830.         Tool consists of four steps:
  6831.         
  6832.              1) source program instrumentation
  6833.  
  6834.              2) compilation and linking
  6835.  
  6836.              3) target program execution
  6837.  
  6838.              4) report generation
  6839.         
  6840.              Each  of  these  steps is described in  detail  in  the 
  6841.         following paragraphs.
  6842.  
  6843.  
  6844.         
  6845.         2.1  Source Program Instrumentation
  6846.         
  6847.              Each  Ada compilation unit containing program units for 
  6848.         which dynamic runtime information  is to be recorded must be 
  6849.         separately  instrumented by the  source  instrumenter.   The 
  6850.         target  Ada program may be instrumented to log the value  of 
  6851.         each user specified  variable at entry to and exit from each 
  6852.         specified program unit. Optionally, the user may also record 
  6853.         the  value  of each specified variable at  each  breakpoint, 
  6854.         including decision points.
  6855.  
  6856.              The  Source Instrumenter is one of five tools  included 
  6857.         in the Ada Test and Analysis System shell, TEST_TOOLS and is 
  6858.         executed as follows:
  6859.  
  6860.         (User input and responses are shown in Bold Face)
  6861.  
  6862.           RUN TEST_TOOLS <cr>
  6863.  
  6864.         The  Test_Tools prompt will then be displayed and  the  user 
  6865.         will  be  asked to enter the name of the tool he  wishes  to 
  6866.         run.  To  execute  the Source Instrumenter the  user  should 
  6867.         respond with the tool name, Source_Instrument.
  6868.  
  6869.  
  6870.         EXAMPLE
  6871.  
  6872.           Welcome to the Test Tools
  6873.           please enter desired tool
  6874.           enter ? for a list of tools available
  6875.           SOURCE_INSTRUMENT <cr>
  6876.  
  6877.  
  6878.  
  6879.  
  6880.  
  6881.  
  6882.  
  6883.  
  6884.  
  6885.  
  6886.         SMART User's Guide                                   Page: 3
  6887.  
  6888.  
  6889.  
  6890.  
  6891.         If "?" is entered then Test_Tools will display a list of the
  6892.         tools   available  for  execution  and  the  user  will   be 
  6893.         reprompted  to  enter a tool name.  If "Q" is  entered  then 
  6894.         execution of the Test_Tools shell will be terminated.
  6895.  
  6896.  
  6897.         EXAMPLE
  6898.  
  6899.           Welcome to the Test Tools
  6900.           please enter desired tool
  6901.           enter ? for a list of tools available
  6902.           ? <cr>
  6903.  
  6904.           The following tools may be executed
  6905.             path -- the report generator for the path analysis tool
  6906.             profile -- the report generator for the timing tool
  6907.             smart -- the report generator for the self metric tool
  6908.             autopath  -- the report generator for the automatic path tool
  6909.             source_instrument -- instrument an Ada source file
  6910.  
  6911.           please enter desired tool
  6912.  
  6913.  
  6914.         It is only necesary to enter the first two characters of the 
  6915.         tool name, i.e., PA, PR, SM, AP or SO.  If an incorrect tool 
  6916.         name  is  entered the user will be prompted to  reenter  the 
  6917.         tool name.  When a valid tool name has been entered the user 
  6918.         will be prompted to enter file names for the Ada source file 
  6919.         to  be instrumented,  the listing file to be generated,  and 
  6920.         the instrumented source file to be generated.
  6921.  
  6922.  
  6923.         EXAMPLE
  6924.  
  6925.           Enter Source_File => Test5.ADA <cr>
  6926.           Enter Source_Listing_File => <cr>
  6927.           Enter Instrumented_Source_File => <cr>
  6928.          
  6929.           source_file = TEST5.ADA
  6930.           source_listing = TEST5.LST
  6931.           instrumented_source = TEST.INS
  6932.  
  6933.  
  6934.         If  the  user  does not enter a  Source_Listing_File  or  an 
  6935.         Instrumented_Source_File  then  default file names  will  be 
  6936.         derived  from  the first qualifier of  Source_File_Name  and 
  6937.         the extentions ".LST" and ".INS", respectively.
  6938.  
  6939.  
  6940.  
  6941.  
  6942.  
  6943.  
  6944.  
  6945.  
  6946.  
  6947.  
  6948.  
  6949.  
  6950.  
  6951.  
  6952.         SMART User's Guide                                   Page: 4
  6953.  
  6954.  
  6955.  
  6956.         When   all   file  names  have  been  entered   the   Source 
  6957.         Instrumenter  will  display a menu of instrumenting  options 
  6958.         and  query  the user to select the options to be  used  when 
  6959.         instrumenting the specified source file.   It is recommended 
  6960.         that   the   predefined  instrumenting  defaults   for   the 
  6961.         Self Metric tool, option 3, be selected.
  6962.  
  6963.          
  6964.         EXAMPLE
  6965.  
  6966.                  Source Instrumenter Version 1.0
  6967.  
  6968.  
  6969.           Instrumenting Options are:
  6970.  
  6971.           1 - Path/Autopath Analyzer Defaults
  6972.           2 - Performance Analyzer Defaults
  6973.           3 - Self Metric Defaults
  6974.           4 - User Supplied Options
  6975.  
  6976.           Enter option (1, 2, 3, 4, ?, or <cr> for default of 1): 3 <cr>
  6977.  
  6978.  
  6979.         When instrumenting is completed the Source Instrumenter will 
  6980.         return  control to the TEST_TOOLS shell.  At this point  the 
  6981.         user may instrument another Ada source file or terminate the 
  6982.         shell by entering "Q" or "QUIT".
  6983.  
  6984.         EXAMPLE
  6985.  
  6986.           please enter desired tool
  6987.           Q <cr>
  6988.           $
  6989.  
  6990.              The  Source Instrumenter also provides a capability  to 
  6991.         explicitly  select  specific  program  units  and  variables 
  6992.         within a compilation unit for instrumentation.  Refer to the 
  6993.         Source   Instrumenter   User's  Guide  for   more   detailed 
  6994.         information  on  using  this  option.  Some  guidelines  for 
  6995.         determining  the source instrumentation options that  should 
  6996.         be used with SMART are presented in section 4.0.
  6997.  
  6998.  
  6999.  
  7000.  
  7001.  
  7002.  
  7003.  
  7004.  
  7005.  
  7006.  
  7007.  
  7008.  
  7009.  
  7010.  
  7011.  
  7012.  
  7013.  
  7014.  
  7015.  
  7016.  
  7017.  
  7018.         SMART User's Guide                                   Page: 5
  7019.  
  7020.  
  7021.  
  7022.         
  7023.         2.2  Compilation and Linking
  7024.         
  7025.              When  the  instrumentation  process  is  completed  the 
  7026.         instrumented target Ada program must be compiled and  linked 
  7027.         to   prepare  it  for  execution.   Each  instrumented   Ada 
  7028.         compilation  unit  must  be separately  compiled.  When  the 
  7029.         compilation process is completed the target program must  be 
  7030.         linked with the Run Time Monitor.
  7031.  
  7032.             The   user  should  follow  the  normal  procedures  for 
  7033.         compiling  and  linking with the Ada compiler  system  being 
  7034.         used for program development. These procedures may vary from 
  7035.         system to system.   The procedures for compiling and linking 
  7036.         the  instrumented  on  a DEC VAX under VMS Version  4.0  and 
  7037.         using the DEC VAX Ada Compiler System Version 1.0 are  shown 
  7038.         below.  However  this  example  assumes that  the  user  has 
  7039.         already performed all operations necessary to set up an  Ada 
  7040.         program library.
  7041.  
  7042.  
  7043.         EXAMPLE
  7044.  
  7045.           $ Ada Test5.INS <cr>
  7046.           $ ACS Link Test5 <cr>
  7047.           %ACS-I-CL_LINKING, Invoking the VAX/VMS Linker
  7048.           $
  7049.  
  7050.  
  7051.         
  7052.         2.3  Target Program Execution
  7053.         
  7054.             When linking is completed, the target Ada program may be 
  7055.         executed.  The  user interface and method of  executing  the 
  7056.         target   program  is  not  altered  by  the  instrumentation 
  7057.         process.  Therefore,  the  user  should  follow  the  normal 
  7058.         procedures  for  executing the target program  on  the  host 
  7059.         computer system being used for program development.
  7060.  
  7061.              When  the first unit of the target program is  entered, 
  7062.         the  Run Time Monitor will prompt the user for the following 
  7063.         information:
  7064.  
  7065.           1. Tool_Name :  The user should enter SMART_TOOL (upper or 
  7066.              lower case is acceptable).  If the user should enter an 
  7067.              invalid tool name, he will be repeatedly prompted until 
  7068.              a  correct  tool  name  is entered or  the  program  is 
  7069.              aborted.
  7070.  
  7071.  
  7072.  
  7073.  
  7074.  
  7075.  
  7076.  
  7077.  
  7078.  
  7079.  
  7080.  
  7081.  
  7082.  
  7083.  
  7084.         SMART User's Guide                                   Page: 6
  7085.  
  7086.  
  7087.  
  7088.           2. Logfile_Name :  The user should  enter a legal filename 
  7089.              for the computer he is using.  The default filename may 
  7090.              be  chosen by entering a carriage return.   The default 
  7091.              Logfile_Name is SMART.LOG.
  7092.  
  7093.                  If the File already exists, the user is asked if he 
  7094.              would  like  to Enter a  new  filename,  Overwrite  the 
  7095.              existing file, or Append to the existing file.
  7096.  
  7097.           3. Test_Identification:  The  user  is asked  to  enter  a 
  7098.              unique  test identification which can be any valid  Ada 
  7099.              string. The default Test ID may be selected by entering 
  7100.              a  carriage return.   The default Test ID for SMART  is 
  7101.              "Self Metric Analysis Report".  The Test ID is recorded 
  7102.              in  the log file generated by the Run Time Monitor  and 
  7103.              printed  on the Test Configuration Report generated  by 
  7104.              the Smart Report Generator. 
  7105.  
  7106.              A sample session with the Run Time Monitor is presented 
  7107.         below.
  7108.  
  7109.         
  7110.         EXAMPLE SESSION
  7111.         
  7112.         Following  is  a sample session with the Run  Time  Monitor. 
  7113.         (User responses are shown in Bold Face):
  7114.  
  7115.              $ RUN TEST5 <cr>
  7116.  
  7117.              Enter Tool Type : PATH_TOOL, AUTOPATH_TOOL,
  7118.                                SMART_TOOL, or PROFILE_TOOL
  7119.              -----> SMART_TOOL <cr>
  7120.  
  7121.              Enter Logfile Name, Null for Default
  7122.              -----> Test5.log <cr>
  7123.  
  7124.         If the Logfile already exists, the following message and prompt 
  7125.         are printed:
  7126.  
  7127.              File already exists!!! Do you wish to:
  7128.                   E = Enter a New Filename
  7129.                   O = Overwrite existing file
  7130.                   A = Append to the existing file
  7131.  
  7132.              Enter Option ===> O <cr>
  7133.  
  7134.         The Run Time Monitor will repeatedly prompt the user until a 
  7135.         valid option is entered.
  7136.  
  7137.              Enter a unique Test Identification, Null for default.
  7138.              Test Case #5 <cr>
  7139.  
  7140.         When  the  Run Time Monitor input is  complete,  the  target 
  7141.         program will resume its normal execution.     
  7142.  
  7143.  
  7144.  
  7145.  
  7146.  
  7147.  
  7148.  
  7149.  
  7150.         SMART User's Guide                                   Page: 7
  7151.  
  7152.  
  7153.  
  7154.         
  7155.         2.4  Report Generation
  7156.         
  7157.              During  execution,  the  instrumented Ada program  will 
  7158.         create  a log file containing dynamic run time  information. 
  7159.         The SMART Report Generator analyzes the data and presents it 
  7160.         in an easily understood format.
  7161.  
  7162.              The  SMART  report  generator  is  one  of  five  tools 
  7163.         included   in  the  Ada  Test  and  Analysis  System  shell, 
  7164.         TEST_TOOLS. The report generator is executed as follows:
  7165.  
  7166.         (User input and responses are shown in Bold Face)
  7167.  
  7168.           RUN TEST_TOOLS <cr>
  7169.  
  7170.         The  Test_Tools prompt will then be displayed and  the  user 
  7171.         will  be  asked to enter the name of the tool he  wishes  to 
  7172.         run.  To  execute Profile,  the user should respond with the 
  7173.         tool name, SMART.
  7174.  
  7175.  
  7176.         EXAMPLE
  7177.  
  7178.           Welcome to the Test Tools
  7179.           please enter desired tool
  7180.           enter ? for a list of tools available
  7181.           SMART <cr>
  7182.  
  7183.  
  7184.  
  7185.         It  is  only necessary to enter the first two characters  of 
  7186.         the  tool name,  i.e.,  "SM".  If an incorrect tool name  is 
  7187.         entered the user will be prompted to reenter the tool  name. 
  7188.         When  a  valid tool name has been entered the user  will  be 
  7189.         prompted  to enter the name of the log file to be  processed 
  7190.         and the name of the report file to be generated.
  7191.  
  7192.  
  7193.         EXAMPLE
  7194.  
  7195.           Enter Log_File_Name => TEST5.LOG <cr>
  7196.           Enter Report_File_Name => TEST5.RPT <cr>
  7197.  
  7198.         If the user does not enter a Report_File_Name,  then it will 
  7199.         be  derived  from  the  Log_File_Name  and  ".RPT"  will  be 
  7200.         appended.
  7201.  
  7202.         When valid log file and report file names have been entered, 
  7203.         SMART  will  display the test configuration  data  that  was 
  7204.         recorded  in the log file at the time the program under test 
  7205.         was executed. The user is then prompted as to whether or not 
  7206.         he wishes to continue.
  7207.  
  7208.  
  7209.  
  7210.  
  7211.  
  7212.  
  7213.  
  7214.  
  7215.  
  7216.         SMART User's Guide                                   Page: 8
  7217.  
  7218.  
  7219.  
  7220.  
  7221.         After  examining the test configuration data,  the user  can 
  7222.         discontinue  processing  by entering "N"  or  "n".   If  the 
  7223.         correct  log  file  has been selected then the  user  should 
  7224.         enter "Y" or "y" to continue processing.
  7225.  
  7226.  
  7227.         EXAMPLE
  7228.  
  7229.           SMART 1.0          Self Metric Analysis and Reporting Tool
  7230.  
  7231.           Program Under Test:        Test5
  7232.           Test Date:                 06/23/85
  7233.           Test Time:                 20:24:59
  7234.           Test ID:                   Test Case #234
  7235.  
  7236.           Do you wish to continue (Y/N)? Y <cr>
  7237.  
  7238.  
  7239.         When  processing is completed the report file will be  ready 
  7240.         for  analysis  by the user.  At this point control  will  be 
  7241.         returned  to the Test_Tools shell where the user may  select 
  7242.         another  tool  for  execution  or  terminate  the  shell  by 
  7243.         entering "Q" or Quit.
  7244.  
  7245.              An  example session with the SMART Report Generator  is 
  7246.         presented on the following page.
  7247.  
  7248.  
  7249.  
  7250.  
  7251.  
  7252.  
  7253.  
  7254.  
  7255.  
  7256.  
  7257.  
  7258.  
  7259.  
  7260.  
  7261.  
  7262.  
  7263.  
  7264.  
  7265.  
  7266.  
  7267.  
  7268.  
  7269.  
  7270.  
  7271.  
  7272.  
  7273.  
  7274.  
  7275.  
  7276.  
  7277.  
  7278.  
  7279.  
  7280.  
  7281.  
  7282.         SMART User's Guide                                   Page: 9
  7283.  
  7284.  
  7285.  
  7286.  
  7287.         
  7288.         EXAMPLE SESSION
  7289.         
  7290.         Following is a sample session with the Report Generator
  7291.         (User input and responses are shown in Bold Face):
  7292.  
  7293.         $   RUN TEST_TOOLS <cr>
  7294.  
  7295.         Welcome to the Test Tools
  7296.         please enter desired tool
  7297.         enter ? for a list of tools available
  7298.         ? <cr>
  7299.  
  7300.         The following tools may be executed
  7301.           path -- the report generator for the path analysis tool
  7302.           profile -- the report generator for the timing tool
  7303.           smart -- the report generator for the self metric tool
  7304.           autopath  -- the report generator for the automatic path tool
  7305.           source_instrument -- instrument an Ada source file
  7306.  
  7307.         please enter desired tool
  7308.         SM <cr>
  7309.  
  7310.         Enter Log_File_Name => TEST5.LOG <cr>
  7311.         Enter Report_File_Name => <cr>
  7312.  
  7313.         log_file_name = TEST5.LOG
  7314.         report_file_name = TEST5.RPT
  7315.  
  7316.         SMART 1.0          Self Metric Analysis and Reporting Tool
  7317.  
  7318.         Program Under Test:        TEST5
  7319.         Test Date:                 06/23/85
  7320.         Test Time:                 20:24:59
  7321.         Test ID:                   Test Case #234
  7322.  
  7323.         Do you wish to continue (Y/N)? Y <cr>
  7324.  
  7325.         please enter desired tool
  7326.         quit <cr>
  7327.         $
  7328.  
  7329.  
  7330.  
  7331.  
  7332.  
  7333.  
  7334.  
  7335.  
  7336.  
  7337.  
  7338.  
  7339.  
  7340.  
  7341.  
  7342.  
  7343.  
  7344.  
  7345.  
  7346.  
  7347.  
  7348.         SMART User's Guide                                   Page: 10
  7349.  
  7350.  
  7351.  
  7352.         
  7353.                              3.0  OUTPUT FORMAT
  7354.         
  7355.              The  report  file  generated  by  SMART  contains  four 
  7356.         reports:  a  Test  Configuration Report,  a  Variable  Trace 
  7357.         Report,  a  Loop  Summary Report,  and a Variable  Statistic 
  7358.         Report.   Each  report  provides  the  user  with  different 
  7359.         information about the program being tested and is  generated 
  7360.         in  132 column format.  A sample report file is included  in 
  7361.         Appendix A.
  7362.  
  7363.              Prior  to  using  the  SMART  report  generator  it  is 
  7364.         important for the user to understand the information that is 
  7365.         being presented and how to interpret it. Each of the reports 
  7366.         is described below.  A more general discussion on evaluating 
  7367.         information  presented  in  these  reports  is  included  in 
  7368.         section 4.0.
  7369.  
  7370.         
  7371.         3.1  Test Configuration Report
  7372.         
  7373.              The  Test  Configuration  Report  includes  information 
  7374.         necessary  to correlate the report with a specific  test  or 
  7375.         execution  of  the  target  Ada  program.  It  includes  the 
  7376.         following information:
  7377.         
  7378.            1)  Program Under Test:
  7379.                This  is  the  name of the main program unit  of  the 
  7380.                program being analyzed.
  7381.         
  7382.            2)  Test Date:
  7383.                The  calendar  date that the program under  test  was 
  7384.                executed and the execution log file was created.  The 
  7385.                test date is presented in the form MM/DD/YY. 
  7386.         
  7387.            3)  Test Day:
  7388.                The day of the week,  Sunday through  Saturday,  that 
  7389.                the program under test was executed and the execution 
  7390.                log file was created.
  7391.         
  7392.            4)  Test Time:
  7393.                The  time  of  day that the program  under  test  was 
  7394.                executed and the execution log file was created.  The 
  7395.                test time is presented in the form HH:MM:SS.
  7396.         
  7397.            5)  Log File:
  7398.                The  name  of  the  log file that  was  used  in  the 
  7399.                preparation of the execution timing reports.
  7400.         
  7401.            6)  Test ID:
  7402.                The  test  ID specified by the user at the  time  the 
  7403.                program under test was executed. 
  7404.  
  7405.  
  7406.  
  7407.  
  7408.  
  7409.  
  7410.  
  7411.  
  7412.  
  7413.  
  7414.         SMART User's Guide                                   Page: 11
  7415.  
  7416.  
  7417.  
  7418.         
  7419.         3.2  Variable Trace Report
  7420.         
  7421.              This   report  traces  the  values  of  user  specified 
  7422.         variables at each breakpoint.   A breakpoint may be at entry 
  7423.         to  or  exit  from each instrumented Ada  program  unit  or, 
  7424.         optionally,  at each executeable statement.   The  following 
  7425.         types of variables may be traced:
  7426.  
  7427.                Integer
  7428.                Float
  7429.                Fixed Point
  7430.                String
  7431.                Character
  7432.                Enumerated (including Boolean)
  7433.  
  7434.              Tracing of Task Types,  Access Types, Private Types, or 
  7435.         implicit  tracing  of  arrays and records  is  not  allowed. 
  7436.         However,  individual array elements or record components, if 
  7437.         of one of the above types, may be traced explicitly.
  7438.  
  7439.              Tracing  of  variables  whose  types  are  generic   or 
  7440.         variables  that  are  declared  in a  generic  unit  is  not 
  7441.         allowed.
  7442.  
  7443.         
  7444.         REPORT COLUMNS
  7445.         
  7446.              The   Variable  Trace  Report  presents  the  following 
  7447.         information about each variable being traced that is visible 
  7448.         within the scope of of the breakpoint.
  7449.         
  7450.            1)  COMP UNIT NAME  ( Compilation Unit Name )
  7451.                This  is the name of the compilation unit  containing 
  7452.                the  breakpoint.   It may or may not correspond to to 
  7453.                the  compilation  unit in which  the  variable  being 
  7454.                traced is declared.
  7455.         
  7456.            2)  BKPT#  ( Breakpoint Number )
  7457.                This  is  the  number  of  the  breakpoint  that  was 
  7458.                executed.  Breakpoint numbers are assigned by the Ada 
  7459.                Source Instrumenter and are identified in the listing 
  7460.                file   generated  by  the  Source  Instrumenter.   An 
  7461.                asterisk "*" in this column indicates a  continuation 
  7462.                line as described below.
  7463.         
  7464.            3)  VARIABLE NAME
  7465.                This  is the fully qualified name of the Ada variable 
  7466.                being   traced.    This  field  is  limited   to   50 
  7467.                characters.  If  the  fully qualified name is  longer 
  7468.                than   50  characters  then  excess  characters   are 
  7469.                continued  on following lines until the  entire  name 
  7470.                has  been  printed.   Continuation lines  contain  an 
  7471.                asterisk "*" in the BKPT# column.
  7472.  
  7473.  
  7474.  
  7475.  
  7476.  
  7477.  
  7478.  
  7479.  
  7480.         SMART User's Guide                                   Page: 12
  7481.  
  7482.  
  7483.  
  7484.         
  7485.            4)  VALUE
  7486.                This  is the value of the variable being traced prior 
  7487.                to execution of the specified breakpoint.  Values are 
  7488.                left  justified.  Trailing blanks in string variables 
  7489.                are indicated by the notation <<N blanks>> where N is 
  7490.                the number of trailing blanks.  This field is limited 
  7491.                to  50 characters.  If the value of the  variable  is 
  7492.                longer  than 50 characters then excess characters are 
  7493.                continued  on following lines until the  entire value
  7494.                has  been  printed.   Continuation lines  contain  an 
  7495.                asterisk "*" in the BKPT# column.  This field is also 
  7496.                used  to display warning messages such as  "Variables 
  7497.                of type TASK cannot be traced."
  7498.  
  7499.  
  7500.         
  7501.         3.3  Loop Summary Report
  7502.         
  7503.              The  Loop Summary Report identifies the number of times 
  7504.         instrumented loops execute.  Loops that are not executed are 
  7505.         not  reported.   If no instrumented loops are executed  then 
  7506.         this report will not be printed.
  7507.  
  7508.         
  7509.         REPORT COLUMNS
  7510.         
  7511.              The   Loop  Summary  Report  presents   the   following 
  7512.         information about each loop breakpoint executed.
  7513.         
  7514.            1)  LOOP COUNT
  7515.                This  is  the number of times the  instrumented  loop 
  7516.                breakpoint was executed.
  7517.         
  7518.            2)  BKPT#  ( Breakpoint number )
  7519.                This is the number of the loop breakpoint. Breakpoint 
  7520.                numbers  are assigned by the Ada Source  Instrumenter 
  7521.                and  are identified in the listing file generated  by 
  7522.                the  Source  Instrumenter.  An asterisk "*"  in  this 
  7523.                column  indicates  a continuation line  as  described 
  7524.                below.
  7525.         
  7526.            3)  UNIT#  ( Program Unit Number )
  7527.                This  is the program unit number assigned by the  Ada 
  7528.                Source   Instrumenter.   Program  unit  numbers   are 
  7529.                identified  in  the  listing file  generated  by  the 
  7530.                Source  Instrumenter.  If  the program unit  name  is 
  7531.                overloaded  within  the same compilation unit and  at 
  7532.                the  same scoping level then the program unit  number 
  7533.                may be used to uniquely identify the program unit.
  7534.  
  7535.  
  7536.  
  7537.  
  7538.  
  7539.  
  7540.  
  7541.  
  7542.  
  7543.  
  7544.  
  7545.  
  7546.         SMART User's Guide                                   Page: 13
  7547.  
  7548.  
  7549.  
  7550.         
  7551.            4)  UNIT NAME 
  7552.                This  is the fully qualified name of the Ada  program 
  7553.                unit  containing the loop breakpoint.   This field is 
  7554.                limited  to 105 characters.  If the  fully  qualified 
  7555.                unit  name is longer than 105 characters then  excess 
  7556.                characters are continued on following lines until the 
  7557.                entire  name  has been printed.   Continuation  lines 
  7558.                contain an asterisk "*" in the BKPT# column.
  7559.  
  7560.         
  7561.         3.4  Variable Statistic Report
  7562.         
  7563.              The  Variable  Statistic Report  reports  the  maximum, 
  7564.         minimum,  and  average values of all numeric variables  that 
  7565.         are recorded during execution of the target Ada program.  If 
  7566.         no  numeric variables are recorded then this report will not 
  7567.         be printed.
  7568.         
  7569.         REPORT COLUMNS
  7570.         
  7571.              The  Variable  Statistic Report presents the  following 
  7572.         information about each loop breakpoint executed.
  7573.  
  7574.         
  7575.            1)  UNIT#  ( Program Unit Number )
  7576.                This  is the program unit number assigned by the  Ada 
  7577.                Source  Instrumenter and is identified in the listing 
  7578.                file  generated by the Source  Instrumenter.  If  the 
  7579.                program  unit  name and variable name are  overloaded 
  7580.                within  the  same compilation unit and  at  the  same 
  7581.                scoping  level  then the program unit number  may  be 
  7582.                used to uniquely identify the variable.
  7583.         
  7584.            2)  VARIABLE NAME
  7585.                This  is the fully qualified name of the Ada variable 
  7586.                being   traced.    This  field  is  limited   to   58 
  7587.                characters.  If  the  fully qualified name is  longer 
  7588.                than   58  characters  then  excess  characters   are 
  7589.                continued  on following lines until the  entire  name 
  7590.                has  been  printed.
  7591.         
  7592.            3)  MAX VALUE  ( Maximum Value )
  7593.                This  is the maximum value reported for the  variable 
  7594.                being traced.
  7595.         
  7596.            4)  MIN VALUE  ( Minimum Value )
  7597.                This  is the minimum value reported for the  variable 
  7598.                being traced.
  7599.         
  7600.            5)  AVERAGE VALUE
  7601.                This  is the average of all values reported  for  the 
  7602.                variable being traced.
  7603.  
  7604.  
  7605.  
  7606.  
  7607.  
  7608.  
  7609.  
  7610.  
  7611.  
  7612.         SMART User's Guide                                   Page: 14
  7613.  
  7614.  
  7615.  
  7616.         
  7617.                               4.0  USING SMART
  7618.         
  7619.  
  7620.              Although SMART is simple to operate, there are a number 
  7621.         of  things the user should be aware of before attempting  to 
  7622.         use  the  tool.   A user who has a basic  understanding  the 
  7623.         processing  performed by SMART will be able to use the  tool 
  7624.         much more effectively as a software development,  debugging, 
  7625.         and testing aid.
  7626.  
  7627.         
  7628.         4.1  Overhead
  7629.         
  7630.              Smart imposes a great deal of overhead on the execution 
  7631.         of the target Ada program.   The least amount of overhead is 
  7632.         imposed  when the target program is instrumented at entry to 
  7633.         and  exit from each program unit and at each decision  point 
  7634.         rather than at every breakpoint.
  7635.  
  7636.         
  7637.         4.2  Tracing Variables
  7638.         
  7639.              The  more variables that are traced the  more  overhead 
  7640.         will  be  incurred  at each breakpoint and  the  longer  the 
  7641.         execution time of the target program.
  7642.  
  7643.              Tracing  of uninitialized program variables  can  cause 
  7644.         some   unpredictable  results  and  should  be  avoided   if 
  7645.         possible.   For  numeric  types the max,  min,  and  average 
  7646.         values  will be distorted as  discussed  below.  Unitialized 
  7647.         strings generally are of no consequence unless they  contain 
  7648.         certain control characters,  line feeds, or carriage returns 
  7649.         that  may  cause  the log file be unreadable by  the  report 
  7650.         generator.  Uninitialized discrete types may, in some cases, 
  7651.         result  in  an exception during execution of the target  Ada 
  7652.         program.
  7653.  
  7654.         
  7655.         4.3  Report Generation
  7656.         
  7657.              A  tremendous amount of work has to be performed by the 
  7658.         SMART report generator for each breakpoint that is executed.
  7659.         The more variables that are being traced the more work  that 
  7660.         has to be done at each breakpoint.  Therefore, the amount of 
  7661.         time  required to process a logfile and generate the various 
  7662.         reports  is  a  function of the number  of  variables  being 
  7663.         traced  and the number of instrumented breakpoints that  are 
  7664.         executed by the target Ada program.
  7665.  
  7666.  
  7667.  
  7668.  
  7669.  
  7670.  
  7671.  
  7672.  
  7673.  
  7674.  
  7675.  
  7676.  
  7677.  
  7678.         SMART User's Guide                                   Page: 15
  7679.  
  7680.  
  7681.         
  7682.         4.4  Maximum, Minimum, and Average Values
  7683.         
  7684.              MAX,  MIN  and AVERAGE are the  maximum,  minimum,  and 
  7685.         AVERAGE  values  that are recorded during execution  of  the 
  7686.         target  Ada  program.  They  may or may not  be  the  actual 
  7687.         maximum,  minimum, and average values that the variable held 
  7688.         during execution.  For example,  the variable may be visible 
  7689.         to,  and changed by, a program unit that is executed but not 
  7690.         instrumented.
  7691.  
  7692.              MAX,  MIN,  AND  AVERAGE  are  also subject  to  severe 
  7693.         distortion for unitialized variables.   Smart has no way  of 
  7694.         detecting  that  a value recorded for a variable  is  random 
  7695.         garbage.   Therefore,  tracing  of  uninitialized  variables 
  7696.         should be avoided 
  7697.  
  7698.         
  7699.         4.5  Reporting of Values of Real Types
  7700.         
  7701.              All  values of real types are handled internally by the 
  7702.         Run  Time  Monitor and the SMART Report  Generator  as  type 
  7703.         Float.   Real  values  are presented in the  Variable  Trace 
  7704.         Report  and the Variable Statistic Report with the following 
  7705.         attributes:  Fore = 1,  Aft = 13,  Exponent = 3.
  7706.  
  7707.         
  7708.         4.5  Guidelines for Source Instrumentation
  7709.         
  7710.              1. Trace as few variables as possible.
  7711.  
  7712.              2. Instrument as few program units as possible.
  7713.  
  7714.              3. When possible, instrument program units at entry and 
  7715.                 exit only rather than at each statement.
  7716.  
  7717.              4. When  possible,  avoid tracing  "global"  variables.  
  7718.                 They result in large amounts of data.
  7719.  
  7720.              5. If  possible,  avoid  tracing variables  in  program 
  7721.                 units  that  that  are executed a  large  number  of 
  7722.                 times.
  7723.  
  7724.              6. Avoid statement level traces of variables in program 
  7725.                 units with loops that are executed a large number of 
  7726.                 times.
  7727.  
  7728.  
  7729.  
  7730.  
  7731.  
  7732.  
  7733.  
  7734.  
  7735.  
  7736.  
  7737.  
  7738.  
  7739.  
  7740.  
  7741.  
  7742.  
  7743.  
  7744.         SMART User's Guide                                   Page: 16
  7745.  
  7746.  
  7747.         
  7748.                        5.0  RESTRICTIONS AND LIMITATIONS
  7749.         
  7750.  
  7751.         1)  No  specific  limits are imposed either by  the  Runtime 
  7752.             Monitor or the SMART report generator on either the size 
  7753.             of the target Ada program or the number of program units 
  7754.             that  can  be  instrumented.    All  arrays  and  stacks 
  7755.             maintained  by  SMART that are a function of  the  total 
  7756.             number of program units or the number of variables being 
  7757.             traced are allocated dynamically. 
  7758.  
  7759.         2)  Dynamic execution data may only be reported for  program 
  7760.             units   that  have  been  instrumented  by  the   source 
  7761.             instrumenter.
  7762.  
  7763.         3)  Regardless  of  whether or not the Ada  compiler  system 
  7764.             being used for program development provides an interface 
  7765.             to  programming  languages  other  than  Ada,  only  Ada 
  7766.             program units may be instrumented.
  7767.  
  7768.         4)  The  Run  Time  Monitor  imposes  a  certain  amount  of 
  7769.             overhead  on the execution time of each instrumented Ada 
  7770.             program unit.  Therefore,  an instrumented program  will 
  7771.             execute slower than the same program uninstrumented.  In 
  7772.             a  tasking environment if the execution of some  program 
  7773.             units  is  time dependent on the occurrence  of  certain 
  7774.             events,  then the additional overhead imposed by the Run 
  7775.             Time Monitor may alter the normal flow of control of the 
  7776.             program.
  7777.  
  7778.         5)  When  statement  level  breakpoints are  specified,  all 
  7779.             variables being traced that are visible within the scope 
  7780.             of   the  executing  breakpoint  are  recorded  in   the 
  7781.             execution  log file.  This,  depending on the number  of 
  7782.             variables  traced,   the  total  number  of  breakpoints 
  7783.             executed, and the logic of the instrumented program, may 
  7784.             result in a very large log file.
  7785.  
  7786.  
  7787.  
  7788.  
  7789.  
  7790.  
  7791.  
  7792.  
  7793.  
  7794.  
  7795.  
  7796.  
  7797.  
  7798.  
  7799.  
  7800.  
  7801.  
  7802.  
  7803.  
  7804.  
  7805.  
  7806.  
  7807.  
  7808.  
  7809.  
  7810.         Ada Self Metric Analysis and Reporting Tool      Page: A - 1
  7811.  
  7812.  
  7813.  
  7814.  
  7815.  
  7816.  
  7817.  
  7818.  
  7819.  
  7820.  
  7821.  
  7822.  
  7823.                                  APPENDIX A
  7824.          
  7825.  
  7826.                                SAMPLE REPORTS
  7827.  
  7828.  
  7829.  
  7830.  
  7831.  
  7832.  
  7833.  
  7834.  
  7835.  
  7836.  
  7837.  
  7838.  
  7839.  
  7840.  
  7841.  
  7842.  
  7843.  
  7844.  
  7845.  
  7846.  
  7847.  
  7848.  
  7849.  
  7850.  
  7851.  
  7852.  
  7853.  
  7854.  
  7855.  
  7856.  
  7857.  
  7858.  
  7859.  
  7860.  
  7861.  
  7862.  
  7863.  
  7864.  
  7865.  
  7866.  
  7867.  
  7868.  
  7869.  
  7870.  
  7871.  
  7872.  
  7873.  
  7874.  
  7875.  
  7876.         Ada Self Metric Analysis and Reporting Tool      Page: A - 2
  7877.  
  7878.  
  7879.  
  7880.  
  7881.  
  7882.                       Sample Test Configuration Report
  7883.         ------------------------------------------------------------
  7884.  
  7885.  
  7886.  
  7887.  
  7888.  
  7889.  
  7890.  
  7891.  
  7892.  
  7893.  
  7894.  
  7895.  
  7896.  
  7897.  
  7898.  
  7899.  
  7900.  
  7901.  
  7902.  
  7903.  
  7904.  
  7905.  
  7906.  
  7907.  
  7908.  
  7909.  
  7910.  
  7911.  
  7912.  
  7913.  
  7914.  
  7915.  
  7916.  
  7917.  
  7918.  
  7919.  
  7920.  
  7921.  
  7922.  
  7923.  
  7924.  
  7925.  
  7926.  
  7927.  
  7928.  
  7929.  
  7930.  
  7931.  
  7932.  
  7933.  
  7934.  
  7935.  
  7936.  
  7937.  
  7938.  
  7939.  
  7940.  
  7941.  
  7942.         Ada Self Metric Analysis and Reporting Tool      Page: A - 3
  7943.  
  7944.  
  7945.  
  7946.  
  7947.  
  7948.                         Sample Variable Trace Report
  7949.         ------------------------------------------------------------
  7950.  
  7951.  
  7952.  
  7953.  
  7954.  
  7955.  
  7956.  
  7957.  
  7958.  
  7959.  
  7960.  
  7961.  
  7962.  
  7963.  
  7964.  
  7965.  
  7966.  
  7967.  
  7968.  
  7969.  
  7970.  
  7971.  
  7972.  
  7973.  
  7974.  
  7975.  
  7976.  
  7977.  
  7978.  
  7979.  
  7980.  
  7981.  
  7982.  
  7983.  
  7984.  
  7985.  
  7986.  
  7987.  
  7988.  
  7989.  
  7990.  
  7991.  
  7992.  
  7993.  
  7994.  
  7995.  
  7996.  
  7997.  
  7998.  
  7999.  
  8000.  
  8001.  
  8002.  
  8003.  
  8004.  
  8005.  
  8006.  
  8007.  
  8008.         Ada Self Metric Analysis and Reporting Tool      Page: A - 4
  8009.  
  8010.  
  8011.  
  8012.  
  8013.  
  8014.                          Sample Loop Summary Report
  8015.         ------------------------------------------------------------
  8016.  
  8017.  
  8018.  
  8019.  
  8020.  
  8021.  
  8022.  
  8023.  
  8024.  
  8025.  
  8026.  
  8027.  
  8028.  
  8029.  
  8030.  
  8031.  
  8032.  
  8033.  
  8034.  
  8035.  
  8036.  
  8037.  
  8038.  
  8039.  
  8040.  
  8041.  
  8042.  
  8043.  
  8044.  
  8045.  
  8046.  
  8047.  
  8048.  
  8049.  
  8050.  
  8051.  
  8052.  
  8053.  
  8054.  
  8055.  
  8056.  
  8057.  
  8058.  
  8059.  
  8060.  
  8061.  
  8062.  
  8063.  
  8064.  
  8065.  
  8066.  
  8067.  
  8068.  
  8069.  
  8070.  
  8071.  
  8072.  
  8073.  
  8074.         Ada Self Metric Analysis and Reporting Tool      Page: A - 5
  8075.  
  8076.  
  8077.  
  8078.  
  8079.  
  8080.                       Sample Variable Statistic Report
  8081.         ------------------------------------------------------------
  8082.  
  8083.  
  8084.  
  8085.  
  8086.  
  8087.  
  8088.  
  8089.  
  8090.  
  8091.  
  8092.  
  8093.  
  8094.  
  8095.  
  8096.  
  8097.  
  8098.  
  8099.  
  8100.  
  8101.  
  8102.  
  8103.  
  8104.  
  8105.  
  8106.  
  8107.  
  8108.  
  8109.  
  8110.  
  8111.  
  8112.  
  8113.  
  8114.  
  8115.  
  8116.  
  8117.  
  8118.  
  8119.  
  8120.  
  8121.  
  8122.  
  8123.  
  8124.  
  8125.  
  8126.  
  8127.  
  8128.  
  8129.  
  8130.  
  8131.  
  8132.  
  8133.  
  8134.  
  8135.  
  8136.  
  8137.  
  8138.  
  8139.  
  8140.         Ada Self Metric Analysis and Reporting Tool      Page: B - 1
  8141.  
  8142.  
  8143.         
  8144.  
  8145.                                   GLOSSARY
  8146.         
  8147.         
  8148.         Breakpoint
  8149.              A  breakpoint is a transfer of control to the Run  Time 
  8150.              Monitor.  Each breakpoint within a compilation unit  is 
  8151.              assigned  a  unique  breakpoint number  by  the  Source 
  8152.              Instrumenter.  In  general,  breakpoints correspond  to 
  8153.              executeable  statements.  However,  not all executeable 
  8154.              statements are assigned breakpoints.
  8155.         
  8156.         Execution Log File
  8157.              A  sequential  file  created by the  Run  Time  Monitor 
  8158.              during  execution  of  an Ada  program  that  has  been 
  8159.              instrumented  by  the Source  Instrumenter.  The  terms 
  8160.              "Execution    Log    File"   and   "Log    File"    are 
  8161.              interchangeable.
  8162.         
  8163.         Log File
  8164.              A  sequential  file  created by the  Run  Time  Monitor 
  8165.              during  execution  of  an Ada  program  that  has  been 
  8166.              instrumented  by  the Source  Instrumenter.  The  terms 
  8167.              "Execution    Log    File"   and   "Log    File"    are 
  8168.              interchangeable.
  8169.         
  8170.         Overhead
  8171.              The term "overhead" refers to the additional  execution 
  8172.              time  imposed on the program under test by the Run Time 
  8173.              Monitor.
  8174.         
  8175.         Program Unit
  8176.              Ada  programs  may  contain  four  different  types  of 
  8177.              program  units:   procedures,   functions,   tasks  and 
  8178.              generics.  However,  the Ada language also provides the 
  8179.              ability  to include executeable code within  a  package 
  8180.              body  that  is not included within any of  the  program 
  8181.              units contained in that package.  This code is executed 
  8182.              during  package  initialization  when  the  package  is 
  8183.              elaborated.  SMART reports dynamic information for this 
  8184.              "initialization"  code  the  same as  for  Ada  program 
  8185.              units.     Therefore,     for    reporting    purposes, 
  8186.              initialization  code  within  a package  body  is  also 
  8187.              treated as a program unit.
  8188.         
  8189.         Report Time
  8190.              The time that the SMART Report Generator was executed.
  8191.  
  8192.  
  8193.  
  8194.  
  8195.  
  8196.  
  8197.  
  8198.  
  8199.  
  8200.  
  8201.  
  8202.  
  8203.  
  8204.  
  8205.  
  8206.         Ada Self Metric Analysis and Reporting Tool      Page: B - 2
  8207.  
  8208.  
  8209.  
  8210.         
  8211.         Run Time Monitor
  8212.              A  runtime kernel that gains control upon entry to  and 
  8213.              exit  from  each instrumented Ada program unit  and  at 
  8214.              each  user specified breakpoint.  The Run Time  Monitor 
  8215.              logs  information  about the program's execution to  an 
  8216.              execution log file for later processing by one or  more 
  8217.              of   the  Test_Tools  report  generator.   The  runtime 
  8218.              execution monitor must be linked with the  instrumented 
  8219.              Ada program units.
  8220.  
  8221.         
  8222.         Source Instrumenter
  8223.             An  Ada  program that parses the target Ada program  and 
  8224.             inserts  "hooks" that transfer control to the  Run  Time 
  8225.             Monitor  upon  entry to and exit from each  instrumented 
  8226.             Ada  program unit and at each user specified breakpoint. 
  8227.             Each  Ada program unit for which dynamic information  is 
  8228.             to  be  recorded  must  be instrumented  by  the  Source 
  8229.             Instrumenter prior to compilation.
  8230.         
  8231.         Test ID
  8232.             A  unique test identification specified by the user when 
  8233.             the  program  under test is executed.  The  Test  ID  is 
  8234.             stored  in  the  log file by the Run  Time  Monitor  and 
  8235.             included  in the Test Configuration Report by the  SMART 
  8236.             report generator.
  8237.         
  8238.         Test Time
  8239.              The  date  and time that the program under  test  began 
  8240.              execution.
  8241.  
  8242.  
  8243.  
  8244.  
  8245.  
  8246.  
  8247.  
  8248.  
  8249.  
  8250.  
  8251.  
  8252.  
  8253.  
  8254.  
  8255.  
  8256.  
  8257.  
  8258.  
  8259.  
  8260.  
  8261.  
  8262.  
  8263.  
  8264.  
  8265.  
  8266.  
  8267.  
  8268.  
  8269.  
  8270.  
  8271.  
  8272. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  8273. --si.ug
  8274. --::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  8275.  
  8276.  
  8277.  
  8278.  
  8279.  
  8280.  
  8281.  
  8282.  
  8283.  
  8284.         
  8285.  
  8286.  
  8287.                                Source Instrumenter
  8288.  
  8289.                                    Version 1.0
  8290.  
  8291.                                   User's Guide
  8292.  
  8293.  
  8294.  
  8295.                                        by
  8296.  
  8297.                                   Ron Rathgeber
  8298.  
  8299.                                Intermetrics, Inc.
  8300.  
  8301.  
  8302.  
  8303.  
  8304.         
  8305.  
  8306.  
  8307.  
  8308.  
  8309.  
  8310.  
  8311.  
  8312.  
  8313.  
  8314.  
  8315.  
  8316.  
  8317.  
  8318.  
  8319.  
  8320.  
  8321.  
  8322.  
  8323.  
  8324.  
  8325.  
  8326.  
  8327.  
  8328.  
  8329.  
  8330.  
  8331.  
  8332.  
  8333.  
  8334.  
  8335.  
  8336.  
  8337.  
  8338.  
  8339.  
  8340.  
  8341.  
  8342.  
  8343.  
  8344.  
  8345.  
  8346.  
  8347.  
  8348.  
  8349.  
  8350.                                   PREFACE
  8351.  
  8352.  
  8353.               This program was developed by Intermetrics, Inc. 
  8354.               under Contract Number N66001-85-C-0032 to:
  8355.          
  8356.                       Naval Ocean Systems Center
  8357.                       271 Catalina Boulevard
  8358.                       San Diego, California  92152. 
  8359.  
  8360.  
  8361.  
  8362.  
  8363.  
  8364.  
  8365.  
  8366.  
  8367.  
  8368.  
  8369.  
  8370.  
  8371.  
  8372.  
  8373.  
  8374.  
  8375.  
  8376.  
  8377.  
  8378.  
  8379.  
  8380.  
  8381.  
  8382.  
  8383.  
  8384.  
  8385.  
  8386.  
  8387.  
  8388.  
  8389.  
  8390.  
  8391.  
  8392.  
  8393.  
  8394.  
  8395.  
  8396.  
  8397.  
  8398.  
  8399.  
  8400.  
  8401.  
  8402.  
  8403.  
  8404.  
  8405.  
  8406.  
  8407.         Source Instrumenter User's Guide                        Page: ii
  8408.  
  8409.  
  8410.  
  8411.         
  8412.                                   CONTENTS
  8413.  
  8414.         
  8415.  
  8416.         1.0  DESCRIPTION .......................................   1
  8417.  
  8418.  
  8419.         2.0  COMMAND FORMAT ....................................   2
  8420.  
  8421.  
  8422.         3.0  INSTRUMENTING OPTIONS .............................   5
  8423.  
  8424.         3.1    Statement Trace Level ... .......................   5
  8425.  
  8426.         3.2    Variable Tracing .... ...........................   7
  8427.  
  8428.              
  8429.         4.0  RESTRICTIONS AND LIMITATIONS ......................   9
  8430.  
  8431.  
  8432.         APPENDIX A - SAMPLE LISTING FILE ....................... A-1
  8433.  
  8434.         APPENDIX B - GLOSSARY .................................. B-1
  8435.  
  8436.  
  8437.  
  8438.  
  8439.  
  8440.  
  8441.  
  8442.  
  8443.  
  8444.  
  8445.  
  8446.  
  8447.  
  8448.  
  8449.  
  8450.  
  8451.  
  8452.  
  8453.  
  8454.  
  8455.  
  8456.  
  8457.  
  8458.  
  8459.  
  8460.  
  8461.  
  8462.  
  8463.  
  8464.  
  8465.  
  8466.  
  8467.  
  8468.  
  8469.  
  8470.  
  8471.  
  8472.  
  8473.         Source Instrumenter User's Guide                     Page: 1
  8474.  
  8475.  
  8476.         
  8477.                               1.0  DESCRIPTION
  8478.         
  8479.              The  Source Instrumenter is one of an integrated set of five 
  8480.         tools that provide testing and analysis aids for the  development 
  8481.         of computer programs implemented in the Ada* programming language. 
  8482.         The  Source  Instrumenter  instruments the user's source  to  add 
  8483.         calls  to a Run-Time Monitor.   These calls  provide  information 
  8484.         about the program as it runs.  The Source Instrumenter adds calls 
  8485.         to:
  8486.  
  8487.             O    Inform  the Run_Time Monitor of the names and  types  of 
  8488.                  units in the program.
  8489.  
  8490.             O    Inform the Run_Time Monitor when a each unit is  entered
  8491.                  and exited.
  8492.  
  8493.             O    Inform  the  Run-Time Monitor  when a statement  in  the 
  8494.                  source program has executed.
  8495.  
  8496.              Once  a  program has been instrumeted,  it is  compiled  and 
  8497.         linked  through the user's compiler system.   When the program is 
  8498.         run,  the Run-Time Monitor will gather the information about  the 
  8499.         source  program  into  a log file.   This log file  can  then  be 
  8500.         processed  by  one of the report writers which provide  a  report 
  8501.         about the execution of the program.
  8502.  
  8503.              The  Source Instrumeter provides for both tracing  statement 
  8504.         execution  and for tracing variables.   Breakpoints are placed in 
  8505.         the user's source to provide statement tracing information.   The 
  8506.         Source  Instrumenter  can place breakpoints at  Entry/Exit  only, 
  8507.         Entry/Exit  and  Decision Point,  or at  every  statement.   When 
  8508.         variable tracing is being done,  the value of each variable being 
  8509.         traced is written to the log file.
  8510.  
  8511.  
  8512.  
  8513.  
  8514.  
  8515.  
  8516.  
  8517.  
  8518.         * Ada is a registered trademark of the U.S. Government(AJPO)
  8519.  
  8520.  
  8521.  
  8522.  
  8523.  
  8524.  
  8525.  
  8526.  
  8527.  
  8528.  
  8529.  
  8530.  
  8531.  
  8532.  
  8533.  
  8534.  
  8535.  
  8536.  
  8537.  
  8538.  
  8539.         Source Instrumenter User's Guide                     Page: 2
  8540.  
  8541.  
  8542.         
  8543.                             2.0  COMMAND FORMAT
  8544.         
  8545.  
  8546.              The source instrumenter is invoked by running the Test_Tools 
  8547.         shell.  This shell allows the user to run the Source Instrumenter 
  8548.         and the report writers.   Compiling,  Linking, and Running of the 
  8549.         user's program will not be performed by the shell.
  8550.  
  8551.              Once the Test_Tools program has been invoked (on the VAX/VMS 
  8552.         the  command is "RUN TEST_TOOLS",  but on each system this may be 
  8553.         different), the following messages will appear:
  8554.  
  8555.         Welcome to the Test Tools
  8556.         please enter desired tool
  8557.         enter ? for a list of tools available
  8558.         enter quit to exit program
  8559.  
  8560.              At  this point the user can enter a question mark to  get  a 
  8561.         list of the tools that are available,  quit to exit the  program, 
  8562.         or invoke one of the tools.   To invoke one of the tools the user 
  8563.         can  either enter a procedure call to the tool using standard Ada 
  8564.         format including parameters,  or he may just enter the tool  name 
  8565.         and be prompted for each of the input parameters.   The procedure 
  8566.         specification for the Source Instrumenter is as follows:
  8567.  
  8568.         procedure SOURCE_INSTRUMENT(INPUT_FILE              : in FILE_NAME;
  8569.                                     SOURCE_LISTING_FILE     : in FILE_NAME;
  8570.                                     INSTRUMENTED_FILE_SOURCE: in FILE_NAME);
  8571.  
  8572.         where
  8573.  
  8574.         INPUT_FILE is the user's source.
  8575.  
  8576.         SOURCE_LISTING_FILE  is  a pretty printed version of  the  user's 
  8577.         source with breakpoints listed.
  8578.  
  8579.         INSTRUMENTED_SOURCE_FILE is the file containing the  instrumented 
  8580.         source.
  8581.  
  8582.         FILE_NAME is a string.
  8583.  
  8584.  
  8585.              Examples  of  invoking the Source Instrumenter in  both  Ada 
  8586.         format  with  parameters  and  without  parameters  is  shown  in
  8587.         Figure 1.
  8588.  
  8589.              In  the second example of Figure 1 the user is prompted  for 
  8590.         the  inputs.   The user inputs are shown on the lines that  begin 
  8591.         with  enter.   The  source_file must always be  entered  but  the 
  8592.         listing  file  and Instrumented file will default to  the  source 
  8593.         file  name appended by ".lst" and ".ins" respectively if they are 
  8594.         left blank when the user is prompted for their names.
  8595.  
  8596.  
  8597.  
  8598.  
  8599.  
  8600.  
  8601.  
  8602.  
  8603.  
  8604.  
  8605.         Source Instrumenter User's Guide                     Page: 3
  8606.  
  8607.  
  8608.              Note  also that when  the Source Instrumenter is invoked  in 
  8609.         Ada  format,  named association of parameters may be used as well 
  8610.         as positional parameters.   Standard Ada rules for postional  and 
  8611.         named association of parameters are used.
  8612.  
  8613.  
  8614.  
  8615.  
  8616.  
  8617.  
  8618.  
  8619.  
  8620.  
  8621.  
  8622.  
  8623.  
  8624.  
  8625.  
  8626.  
  8627.  
  8628.  
  8629.  
  8630.  
  8631.  
  8632.  
  8633.  
  8634.  
  8635.  
  8636.  
  8637.  
  8638.  
  8639.  
  8640.  
  8641.  
  8642.  
  8643.  
  8644.  
  8645.  
  8646.  
  8647.  
  8648.  
  8649.  
  8650.  
  8651.  
  8652.  
  8653.  
  8654.  
  8655.  
  8656.  
  8657.  
  8658.  
  8659.  
  8660.  
  8661.  
  8662.  
  8663.  
  8664.  
  8665.  
  8666.  
  8667.  
  8668.  
  8669.  
  8670.  
  8671.         Source Instrumenter User's Guide                     Page: 4
  8672.  
  8673.  
  8674.  
  8675.  
  8676.  
  8677.               Figure 1 - Example of Source Instrumenter Invocation
  8678.  
  8679.  
  8680.  
  8681.  
  8682.  
  8683.  
  8684.         Welcome to the Test Tools
  8685.         please enter desired tool
  8686.         enter ? for a list of tools available
  8687.         enter quit to exit
  8688.         source_instrument(count.ada, count.lis, count.si)
  8689.  
  8690.  
  8691.  
  8692.         source_file = count.ada                                                         
  8693.  
  8694.         source_listing = count.lis                                                      
  8695.  
  8696.         instrumented_source = count.si                                                  
  8697.  
  8698.  
  8699.         or
  8700.  
  8701.  
  8702.         please enter desired tool
  8703.         source_instrument
  8704.  
  8705.         Enter Source_File => count.ada
  8706.         Enter Source_Listing_File => count.lis
  8707.         Enter Instrumented_Source_File => count.si
  8708.  
  8709.         source_file = count.ada                                                         
  8710.  
  8711.         source_listing = count.lis                                                      
  8712.  
  8713.         instrumented_source = count.si                                                  
  8714.  
  8715.  
  8716.  
  8717.  
  8718.  
  8719.  
  8720.  
  8721.  
  8722.  
  8723.  
  8724.  
  8725.  
  8726.  
  8727.  
  8728.  
  8729.  
  8730.  
  8731.  
  8732.  
  8733.  
  8734.  
  8735.  
  8736.  
  8737.  
  8738.  
  8739.  
  8740.  
  8741.  
  8742.         Source Instrumenter User's Guide                     Page: 5
  8743.  
  8744.  
  8745.         
  8746.         3.0  INSTRUMENTING OPTIONS
  8747.         
  8748.  
  8749.              Once  the  Source  Instrumenter has  been  entered  it  will 
  8750.         display  a menu of instrumenting options.   This menu allows  the 
  8751.         user to select how the source should be instrumented.   From  the 
  8752.         menu the user can select the defaults for Path/Autopath Analyzer, 
  8753.         Profile,  or Smart.  The user may also select to provide his own 
  8754.         options.  The options menu appears as follows:
  8755.  
  8756.  
  8757.                Source Instrumenter Version 1.0
  8758.  
  8759.  
  8760.         Instrumenting Options are:
  8761.  
  8762.         1 - Path/Autopath Analyzer Defaults
  8763.         2 - Performance Analyzer Defaults
  8764.         3 - Self Metric Defaults
  8765.         4 - User Supplied Options
  8766.  
  8767.         Enter option (1, 2, 3, 4, ?, or <cr> for default of 1): 
  8768.  
  8769.  
  8770.              Normally,  the user will just select the default options for 
  8771.         the tool he plans to use; however, by providing the user with the 
  8772.         ability  to  select  his own options,  the user  can  tailor  the 
  8773.         instrumenting  process to meet his needs.   There are two options 
  8774.         that  the  user  must specify if he decides to  provide  his  own 
  8775.         options.   These  two  options  are  discussed in  the  next  two 
  8776.         sections.
  8777.  
  8778.  
  8779.         3.1  Statement Trace Level
  8780.  
  8781.              The first option that must be entered is the statement trace 
  8782.         level.  If  the  user  selects option 4 on  the  primary  options 
  8783.         menu  (User supplied options),  then the following menu  will  be 
  8784.         displayed:
  8785.  
  8786.  
  8787.         Available trace levels are:
  8788.         1 - Entry/Exit only
  8789.         2 - Entry/Exit and Decision Point
  8790.         3 - Every statement
  8791.         4 - Mixed (Each program unit has its own trace level)
  8792.  
  8793.         Enter option ( default is 2): 
  8794.  
  8795.  
  8796.              If  Entry/Exit only is selected,  then breakpoints (and thus 
  8797.         statement  information) will be provided only at entrance to  and 
  8798.         exit  from  each unit.   Note that there will be a breakpoint  at 
  8799.         each  exit  point.  This means that each  exception  handler  and 
  8800.         return statement will also have a breakpoint.   Also note that if 
  8801.  
  8802.  
  8803.  
  8804.  
  8805.  
  8806.  
  8807.  
  8808.  
  8809.         Source Instrumenter User's Guide                     Page: 6
  8810.  
  8811.  
  8812.         the  user supplies no exception handler,   then one will be added 
  8813.         that  contains an exiting unit breakpoint.   The added  exception 
  8814.         handler  will  then re-raise the exception so that  it  will  not 
  8815.         alter normal execution of the program.
  8816.  
  8817.              If   Entry/Exit   and  Decision  Point  is   selected   then 
  8818.         Breakpoints will also be placed at each decision point.  Decision 
  8819.         Points are defined as:  before each "if",  "case",  "while",  and 
  8820.         "for";  the  first statement of each "then",  and "else"  branch;  
  8821.         the  first  statement of each case statement branch;  and  before 
  8822.         each "exit" statement.
  8823.  
  8824.              If  Every  Statement is selected then a breakpoint  will  be 
  8825.         placed before each statement in the user's program.
  8826.  
  8827.              When  any of the above three options is selected it  applies 
  8828.         to  the  whole file being instrumented.   If the user  wishes  to 
  8829.         instrument some units in the same file differently,  then  option 
  8830.         4 (Mixed) should be selected.   When the mixed option is selected 
  8831.         the  user will be prompted for a trace level for each unit in the 
  8832.         file.  An example of this is given below:
  8833.  
  8834.  
  8835.         Available trace levels are:
  8836.         1 - Entry/Exit only
  8837.         2 - Entry/Exit and Decision Point
  8838.         3 - Every statement
  8839.         4 - Mixed (Each program unit has its own trace level)
  8840.  
  8841.         Enter option ( default is 2): 4
  8842.  
  8843.         Do you want to do type tracing (default is no): no
  8844.  
  8845.         Current Unit Being Instrumented is:
  8846.  
  8847.         procedure count
  8848.  
  8849.         Available trace levels are:
  8850.         1 - Entry/Exit only
  8851.         2 - Entry/Exit and Decision Point
  8852.         3 - Every statement
  8853.  
  8854.         Enter option ( default is 2): 1
  8855.  
  8856.         Current Unit Being Instrumented is:
  8857.  
  8858.         procedure CHECK_IF_COMMENT_ON_LINE( I: in INTEGER)
  8859.  
  8860.         Available trace levels are:
  8861.         1 - Entry/Exit only
  8862.         2 - Entry/Exit and Decision Point
  8863.         3 - Every statement
  8864.  
  8865.         Enter option ( default is 2): 3
  8866.  
  8867.  
  8868.  
  8869.  
  8870.  
  8871.  
  8872.  
  8873.  
  8874.  
  8875.         Source Instrumenter User's Guide                     Page: 7
  8876.  
  8877.  
  8878.              This    file   contains   two   procedures:    COUNT,    and 
  8879.         CHECK_IF_COMMENT_ON_LINE.   The user has selected mixed mode  and 
  8880.         has  decided  to  trace COUNT at Entry/Exit only,  and  to  trace 
  8881.         CHECK_IF_COMMENT_ON_LINE at every statement.
  8882.  
  8883.         3.2  Variable Tracing
  8884.  
  8885.              Variable tracing is done when the SMART tool option has been 
  8886.         selected  or  when  the user selects user  supplied  options  and 
  8887.         answers  yes  to the question of whether type tracing  should  be 
  8888.         done.          
  8889.  
  8890.              When  variable  tracing  is  being done  the  user  will  be 
  8891.         prompted  to specify which variables to trace.   As each unit  is 
  8892.         instrumented,  the  user will be prompted for which variables  in 
  8893.         that  unit to trace.   The user may input the variables  in  that 
  8894.         unit  that  he  wants  traced,  or he can enter  "*all"  and  all 
  8895.         variables in that unit will be traced (including any variables in 
  8896.         nested blocks). Variable names may include selected components or 
  8897.         array  indices.   The  user should include scope names  only  for 
  8898.         variables declared in blocks (only include the block name).   All 
  8899.         other  variables should be specified by using their simple  name. 
  8900.         An  example  of  a unit being instrumented with type  tracing  is 
  8901.         given below:
  8902.  
  8903.                Source Instrumenter Version 1.0
  8904.  
  8905.         Instrumenting Options are:
  8906.  
  8907.         1 - Path/Autopath Analyzer Defaults
  8908.         2 - Performance Analyzer Defaults
  8909.         3 - Self Metric Defaults
  8910.         4 - User Supplied Options
  8911.  
  8912.         Enter option (1, 2, 3, 4, ?, or <cr> for default of 1): 3
  8913.  
  8914.         Current Unit Being Instrumented is:
  8915.         procedure count
  8916.  
  8917.         Enter variables to trace.  Enter one variable per line 
  8918.         or *ALL to trace all variables in the scope.
  8919.         Terminate the list with a blank line
  8920.         >> Number_of_Comments
  8921.         >> last
  8922.         >> 
  8923.  
  8924.         Current Unit Being Instrumented is:
  8925.         procedure CHECK_IF_COMMENT_ON_LINE( I: in INTEGER)
  8926.  
  8927.         Enter variables to trace.  Enter one variable per line 
  8928.         or *ALL to trace all variables in the scope.
  8929.         Terminate the list with a blank line
  8930.         >> *all
  8931.         >> 
  8932.  
  8933.  
  8934.  
  8935.  
  8936.  
  8937.  
  8938.  
  8939.  
  8940.  
  8941.         Source Instrumenter User's Guide                     Page: 8
  8942.  
  8943.  
  8944.              In  this  example,  the unit is being instrumented  for  the 
  8945.         SMART  tool, so variable tracing is being done.   There  are  two 
  8946.         units:  the main procedure COUNT, and a nested procedure.  In the 
  8947.         example, only the variables NUMBER_OF_COMMENTS and LAST are being 
  8948.         traced  in procedure COUNT,  but all variable are being traced in 
  8949.         the nested procedure.
  8950.  
  8951.              Values   for  the  following  types  of  variables  can   be 
  8952.         displayed:   enumerated types (predefined and user defined),  all 
  8953.         numeric  types,  strings,  and subtypes and derived types of  the 
  8954.         above.  All variables being traced will have their values written 
  8955.         to the log file at each breakpoint where they are visible.
  8956.  
  8957.              Variables  contained  in  a  named block can  be  traced  by 
  8958.         including the name of the variable qualified with the block  name 
  8959.         when  the  instrumenter  asks  for  variables  to  trace  in  the 
  8960.         enclosing  unit.   Thus,  if variable TEMP is declared in a block 
  8961.         labeled  BLOCK1,  then  the variable can be traced  by  specifing 
  8962.         BLOCK1.TEMP when the instrumenter asks which variables should  be 
  8963.         traced for the enclosing scope.
  8964.  
  8965.              Variables  in un-labeled blocks cannot be  specified,  since 
  8966.         there  is no way to specify their name;   however,  they  can  be 
  8967.         traced  by  specifing  that all variables in the  enclosing  unit 
  8968.         should be traced.
  8969.  
  8970.              In   order   to  trace  variables  declared  in  a   package 
  8971.         specification  or  variables whose type is defined in  a  package 
  8972.         specification,  the  package specification must  be  instrumented 
  8973.         with   type   tracing  on.   When  a  package  specification   is 
  8974.         instrumented,  it will not be altered; however several files will 
  8975.         be  created  in the current working directory  that  contain  the 
  8976.         information needed from the package specification.  The user will 
  8977.         be  prompted  as to whether the package specification  should  be 
  8978.         included  in the instrumented source file.   If the user does not 
  8979.         want  the package specification to be recompiled then  he  should 
  8980.         reply no.
  8981.  
  8982.              When  a  unit is instrumented that "withs"  a  package,  the 
  8983.         tracing  information for the package (contained in files  created 
  8984.         by  the  souce  instrumenter) will be used to  construct  tracing 
  8985.         routines  for  the variables and types contained in  the  package 
  8986.         specification.    If   these  files  do  not  exist,   then   the 
  8987.         instrumenter assumes that no variables or types from the  package 
  8988.         are  being traced.   
  8989.  
  8990.  
  8991.  
  8992.  
  8993.  
  8994.  
  8995.  
  8996.  
  8997.  
  8998.  
  8999.  
  9000.  
  9001.  
  9002.  
  9003.  
  9004.  
  9005.  
  9006.  
  9007.         Source Instrumenter User's Guide                     Page: 9
  9008.  
  9009.  
  9010.         
  9011.         4.0 RESTRICTIONS AND LIMITATIONS
  9012.         
  9013.         1)  Values of record types,  array types,  access types,  private 
  9014.         types (outside of the package body),  and task types will  result 
  9015.         in  the following message being written to the log file:  "Values 
  9016.         of type <type_mark> cannot be displayed".
  9017.  
  9018.         2)  The following types of variables cannot be traced:  variables 
  9019.         of  generic types,  named numbers,  and variables whose types are 
  9020.         declared  in  a package specification that was  not  instrumented 
  9021.         with type tracing on.   Attempting to trace these variables  will 
  9022.         result  in a compile time error.
  9023.  
  9024.         3)   A  compile time error will also occur when invalid  selected 
  9025.         components or indexed components are specified.
  9026.  
  9027.         4)   Loop  variables cannot be traced.  Attempts  to  trace  loop 
  9028.         variables will result in a message "Variable not found".
  9029.  
  9030.         5)  Variables in un-named blocks can only be traced by  specifing 
  9031.         that all variables in the enclosing unit be traced (*all).
  9032.  
  9033.  
  9034.  
  9035.  
  9036.  
  9037.  
  9038.  
  9039.  
  9040.  
  9041.  
  9042.  
  9043.  
  9044.  
  9045.  
  9046.  
  9047.  
  9048.  
  9049.  
  9050.  
  9051.  
  9052.  
  9053.  
  9054.  
  9055.  
  9056.  
  9057.  
  9058.  
  9059.  
  9060.  
  9061.  
  9062.  
  9063.  
  9064.  
  9065.  
  9066.  
  9067.  
  9068.  
  9069.  
  9070.  
  9071.  
  9072.  
  9073.         Source Instrumenter                              Page: A - 1
  9074.  
  9075.  
  9076.  
  9077.  
  9078.  
  9079.  
  9080.  
  9081.  
  9082.  
  9083.  
  9084.  
  9085.  
  9086.                                    APPENDIX A
  9087.          
  9088.  
  9089.                                  SAMPLE LISTING
  9090.  
  9091.  
  9092.  
  9093.  
  9094.  
  9095.  
  9096.  
  9097.  
  9098.  
  9099.  
  9100.  
  9101.  
  9102.  
  9103.  
  9104.  
  9105.  
  9106.  
  9107.  
  9108.  
  9109.  
  9110.  
  9111.  
  9112.  
  9113.  
  9114.  
  9115.  
  9116.  
  9117.  
  9118.  
  9119.  
  9120.  
  9121.  
  9122.  
  9123.  
  9124.  
  9125.  
  9126.  
  9127.  
  9128.  
  9129.  
  9130.  
  9131.  
  9132.  
  9133.  
  9134.  
  9135.  
  9136.  
  9137.  
  9138.  
  9139.         Source Instrumenter                              Page: A - 2
  9140.  
  9141.  
  9142.         Source Instrumenter Output on 07/27/85 at 15:20:04                    1
  9143.         Source File: count.ada
  9144.  
  9145.         Bkpt
  9146.         Number  Source Text
  9147.         ------  -----------
  9148.               with TEXT_IO; use TEXT_IO; 
  9149.               procedure COUNT is 
  9150.                 MAX_LINE                 : INTEGER := 255; 
  9151.                 CURRENT_LINE             : STRING(1 .. MAX_LINE); 
  9152.                 LAST_CHAR                : NATURAL; 
  9153.                 NUMBER_OF_COMMENTS       : INTEGER := 0; 
  9154.                 NUMBER_OF_CODE           : INTEGER := 0; 
  9155.                 NUMBER_OF_COMMENTED_CODE : INTEGER := 0; 
  9156.                 INPUT_FILE               : FILE_TYPE; 
  9157.                 FILE_NAME                : STRING(1 .. MAX_LINE); 
  9158.                 LAST                     : NATURAL; 
  9159.  
  9160.                 package NUMBER_IO is 
  9161.                   new INTEGER_IO(INTEGER); 
  9162.                 use NUMBER_IO; 
  9163.  
  9164.                 procedure CHECK_IF_COMMENT_ON_LINE(I : in INTEGER) is 
  9165.                 begin
  9166.         1         for J in I .. LAST_CHAR loop
  9167.         2           if CURRENT_LINE(J) = '-' then 
  9168.         3             if J < LAST_CHAR and CURRENT_LINE(J + 1) = '-' then 
  9169.         4               NUMBER_OF_COMMENTED_CODE := NUMBER_OF_COMMENTED_CODE + 1; 
  9170.                       end if; 
  9171.                     end if; 
  9172.                   end loop; 
  9173.         5       end CHECK_IF_COMMENT_ON_LINE; 
  9174.  
  9175.               begin
  9176.         6       PUT("Type name of input file:  "); 
  9177.                 GET_LINE(FILE_NAME, LAST); 
  9178.                 NEW_LINE; 
  9179.                 OPEN(INPUT_FILE, IN_FILE, FILE_NAME(1 .. LAST)); 
  9180.         7       while not END_OF_FILE(INPUT_FILE) loop
  9181.         8         GET_LINE(INPUT_FILE, CURRENT_LINE, LAST_CHAR); 
  9182.         9         for I in 1 .. LAST_CHAR loop
  9183.         10          if CURRENT_LINE(I) /= ' ' then 
  9184.         11            if CURRENT_LINE(I) = '-' and I < LAST_CHAR then 
  9185.         12              if CURRENT_LINE(I + 1) = '-' then 
  9186.         13                NUMBER_OF_COMMENTS := NUMBER_OF_COMMENTS + 1; 
  9187.                         else 
  9188.         14                NUMBER_OF_CODE := NUMBER_OF_CODE + 1; 
  9189.                           CHECK_IF_COMMENT_ON_LINE(I); 
  9190.                         end if; 
  9191.                       else 
  9192.         15              NUMBER_OF_CODE := NUMBER_OF_CODE + 1; 
  9193.                         CHECK_IF_COMMENT_ON_LINE(I); 
  9194.                       end if; 
  9195.         16            exit; 
  9196.                     end if; 
  9197.  
  9198.  
  9199.  
  9200.  
  9201.  
  9202.  
  9203.  
  9204.  
  9205.         Source Instrumenter                              Page: A - 3
  9206.  
  9207.  
  9208.  
  9209.         Source Instrumenter Output on 07/27/85 at 15:20:04                    2
  9210.         Source File: count.ada
  9211.  
  9212.         Bkpt
  9213.         Number  Source Text
  9214.         ------  -----------
  9215.                   end loop; 
  9216.                 end loop; 
  9217.                 PUT("Number of comments is "); 
  9218.                 PUT(NUMBER_OF_COMMENTS); 
  9219.                 NEW_LINE; 
  9220.                 PUT("Number of code lines is "); 
  9221.                 PUT(NUMBER_OF_CODE); 
  9222.                 NEW_LINE; 
  9223.                 PUT("Total lines (non-blank) is "); 
  9224.                 PUT(NUMBER_OF_COMMENTS + NUMBER_OF_CODE); 
  9225.                 NEW_LINE; 
  9226.         17      if NUMBER_OF_CODE /= 0 then 
  9227.         18        PUT("Percent of code lines commented is "); 
  9228.                   PUT(100*NUMBER_OF_COMMENTED_CODE/NUMBER_OF_CODE); 
  9229.                 end if; 
  9230.         19    end COUNT; 
  9231.  
  9232.  
  9233.  
  9234.  
  9235.  
  9236.  
  9237.  
  9238.  
  9239.  
  9240.  
  9241.  
  9242.  
  9243.  
  9244.  
  9245.  
  9246.  
  9247.  
  9248.  
  9249.  
  9250.  
  9251.  
  9252.  
  9253.  
  9254.  
  9255.  
  9256.  
  9257.  
  9258.  
  9259.  
  9260.  
  9261.  
  9262.  
  9263.  
  9264.  
  9265.  
  9266.  
  9267.  
  9268.  
  9269.  
  9270.         Source Instrumenter                              Page: B - 1
  9271.  
  9272.  
  9273.         
  9274.  
  9275.                                   GLOSSARY
  9276.         
  9277.         
  9278.         Breakpoint
  9279.              A  breakpoint is a transfer of control to the Run  Time 
  9280.              Monitor.  Each breakpoint within a compilation unit  is 
  9281.              assigned  a  unique  breakpoint number  by  the  Source 
  9282.              Instrumenter.  In  general,  breakpoints correspond  to 
  9283.              executeable  statements.  However,  not all executeable 
  9284.              statements are assigned breakpoints.
  9285.         
  9286.         Execution Log File
  9287.              A  sequential  file  created by the  Run  Time  Monitor 
  9288.              during  execution  of  an Ada  program  that  has  been 
  9289.              instrumented  by  the Source  Instrumenter.  The  terms 
  9290.              "Execution    Log    File"   and   "Log    File"    are 
  9291.              interchangeable.
  9292.         
  9293.         Log File
  9294.              A  sequential  file  created by the  Run  Time  Monitor 
  9295.              during  execution  of  an Ada  program  that  has  been 
  9296.              instrumented  by  the Source  Instrumenter.  The  terms 
  9297.              "Execution    Log    File"   and   "Log    File"    are 
  9298.              interchangeable.
  9299.         
  9300.         Overhead
  9301.              The term "overhead" refers to the additional  execution 
  9302.              time  imposed on the program under test by the Run Time 
  9303.              Monitor.
  9304.         
  9305.         Program Unit
  9306.              Ada  programs  may  contain  four  different  types  of 
  9307.              program  units:   procedures,   functions,   tasks  and 
  9308.              generics.  However,  the Ada language also provides the 
  9309.              ability  to include executeable code within  a  package 
  9310.              body  that  is not included within any of  the  program 
  9311.              units contained in that package.  This code is executed 
  9312.              during  package  initialization  when  the  package  is 
  9313.              elaborated.  SMART reports dynamic information for this 
  9314.              "initialization"  code  the  same as  for  Ada  program 
  9315.              units.     Therefore,     for    reporting    purposes, 
  9316.              initialization  code  within  a package  body  is  also 
  9317.              treated as a program unit.
  9318.         
  9319.         Report Time
  9320.              The time that the SMART Report Generator was executed.
  9321.  
  9322.  
  9323.  
  9324.  
  9325.  
  9326.  
  9327.  
  9328.  
  9329.  
  9330.  
  9331.  
  9332.  
  9333.  
  9334.  
  9335.  
  9336.         Source Instrumenter                          Page: B - 2
  9337.  
  9338.  
  9339.  
  9340.         
  9341.         Run Time Monitor
  9342.              A  runtime kernel that gains control upon entry to  and 
  9343.              exit  from  each instrumented Ada program unit  and  at 
  9344.              each  user specified breakpoint.  The Run Time  Monitor 
  9345.              logs  information  about the program's execution to  an 
  9346.              execution log file for later processing by one or  more 
  9347.              of   the  Test_Tools  report  generator.   The  runtime 
  9348.              execution monitor must be linked with the  instrumented 
  9349.              Ada program units.
  9350.  
  9351.         
  9352.         Source Instrumenter
  9353.             An  Ada  program that parses the target Ada program  and 
  9354.             inserts  "hooks" that transfer control to the  Run  Time 
  9355.             Monitor  upon  entry to and exit from each  instrumented 
  9356.             Ada  program unit and at each user specified breakpoint. 
  9357.             Each  Ada program unit for which dynamic information  is 
  9358.             to  be  recorded  must  be instrumented  by  the  Source 
  9359.             Instrumenter prior to compilation.
  9360.         
  9361.         Test ID
  9362.             A  unique test identification specified by the user when 
  9363.             the  program  under test is executed.  The  Test  ID  is 
  9364.             stored  in  the  log file by the Run  Time  Monitor  and 
  9365.             included  in the Test Configuration Report by the  SMART 
  9366.             report generator.
  9367.         
  9368.         Test Time
  9369.              The  date  and time that the program under  test  began 
  9370.              execution.
  9371.  
  9372.  
  9373.  
  9374.  
  9375.  
  9376.  
  9377.  
  9378.  
  9379.  
  9380.  
  9381.  
  9382.  
  9383.  
  9384.  
  9385.  
  9386.  
  9387.  
  9388.  
  9389.  
  9390.  
  9391.  
  9392.  
  9393.  
  9394.  
  9395.  
  9396.  
  9397.  
  9398.  
  9399.  
  9400.  
  9401.  
  9402. 
  9403.  
  9404.