Man Page analyzer.1




NAME

     analyzer - GUI interface for analyzing a Forte(TM) Developer
     (Sun WorkShop(TM)) performance experiment


SYNOPSIS

     analyzer   [ -s <sessionID> ] [ -V ] [ {expt ...  exptN} ]


AVAILABILITY

     Part of Forte C, Forte C++, and Forte for  High  Performance
     Computing.


DESCRIPTION

     The Performance Analyzer is a graphical data  analysis  tool
     that helps analyze performance data collected using the col-
     lect command, the Sampling Collector from the  Sun  Workshop
     Debugging  window, or the collector commands in dbx.  During
     the execution of a process with the  collector  enabled,  it
     gathers  performance  information  to  create an experiment.
     The  Performance  Analyzer  reads  in  such  an  experiment,
     analyzes  the  data,  and  displays that data in a graphical
     display.

     To start the Performance Analyzer, type:

          analyzer [ expt ... exptN ]

     on the command line, or click the  Analyzer  button  on  the
     tool  bar in either the Sun WorkShop main window or the Sam-
     pling Collector window.  expt can be either the name  of  an
     experiment,  or  the  name  of  an  experiment group. If the
     experiments or experiment group are  not  specified  on  the
     command  line,  the  Performance  Analyzer displays the Load
     Experiments dialog box in which you can select experiments.

     Multiple experiments or experiment groups can  be  specified
     on the command line. You can also use the Experiment Menu in
     the Analyzer window to add experiments or experiment groups.

     When the Analyzer is looking at multiple  experiments,  how-
     ever  they  were  loaded,  data  from all the experiments is
     aggregated together.

     The Analyzer supports online help in all of  its  menus  and
     dialog boxes.

     The Analyzer accepts an optional -s <sessionID> flag, defin-
     ing the session to which it belongs.  Analyzers in different
     sessions do not share an edit window; analyzers in the  same
     session do.

     The Analyzer can be invoked with a -V flag, in which case it
     prints  out  the  version number of the Performance Analyzer
     and exits.

  Analyzer Main Window
     The Analyzer main window normally shows  the  Function  List
     display.   You  can use the Data list box below the menu bar
     to choose between the Function List  display,  the  Overview
     display,  the  Address  Space  display,  and  the  Execution
     Statistics display.  The rest of  the  main  window  changes
     depending on which display is chosen.

     The Function List Display
          When the Analyzer is invoked on an experiment, it reads
          the experiment data, and presents a function list, with
          metrics for the various functions shown.   Metrics  can
          be  either  exclusive  or inclusive.  Exclusive metrics
          represent usage within the function itself.   Inclusive
          metrics represent usage within the function and all the
          functions it called.  The list of available metrics for
          each  kind  of  data collected is described in the col-
          lect(1) man page.

          The metrics initially shown are based on the data  col-
          lected,  and  on the default settings read from various
          .rc files (See DEFAULTS, below).  For callstack profil-
          ing, the default set consist of inclusive and exclusive
          User CPU time.  For thread synchronization delay  trac-
          ing, the default set consists of inclusive synchroniza-
          tion wait count  and  inclusive  synchronization  time.
          For  hardware  counter  overflow  profiling  data,  the
          default set consists of inclusive and  exclusive  times
          (for  counters  that  count  in cycles) or event counts
          (for other counters).  If more than one  type  of  data
          has  been  collected, the default metrics for each type
          are shown.

          The Analyzer supports data display at the  function  or
          load  object  level.  Selection is made using the radio
          buttons in the center of the function list header.

          You can control which metrics are shown, and the  order
          in which they appear, by clicking on the Metrics button
          in the lower right corner of the Function List display.
          The Function List Metrics dialog box is displayed show-
          ing all of the available metrics.  Each metric has  two
          check boxes, one for the value, and one for the percen-
          tage (where appropriate).  The name of the object  can-
          not  be  turned  off.   For  hardware counter profiling
          experiments where  the  counter  measures  cycles,  the
          metric  is  normally  shown  as  a time, and there is a
          third check box for the metric as a  count  of  events.
          In addition, there is a set of radio buttons to control
          which metric is used to sort the list.
          Time metrics are shown as seconds,  presented  to  mil-
          lisecond  precision.  Percentages are shown to a preci-
          sion of 0.1 %.  If a metric value  is  precisely  zero,
          its  time  and percentage is shown as "0." If the value
          is not exactly zero, but is smaller than the precision,
          its  value  is  shown  as "0.000" and its percentage as
          "0.0".  Count metrics are shown as an integer count.

          The order of metrics shown is left to  right,  matching
          the  top  to bottom list in the metric selection panel.
          To change the Function List display to use a  different
          order,  click  the label for any metric, and drag it up
          or down in the list. When the  ordering,  selection  or
          sorting  are  changed,  and  the  OK or Apply button is
          clicked, the Function List display is updated.

          At the lower right of the Function List display,  three
          buttons  are  shown  in addition to the Metrics button.
          The Disassembly button invokes a disassembly listing of
          the source file containing the selected function, anno-
          tated  with  performance  data.   The   Source   button
          displays  a  listing  of the source file containing the
          selected function,  annotated  with  performance  data.
          The  Callers-Callees  button  invokes  the new Callers-
          Callees window.

          The lower left portion of  the  Function  List  display
          contains  a  progress  bar that is updated during time-
          consuming operations in the Aanalyzer.  It presents  an
          estimate  of  the  percentage of work for the operation
          that is completed.

          At the upper right corner of the Function List  display
          is  the  Filters  button,  which  invokes the filtering
          panel described below.

     The Overview Display
          The Overview display shows the  samples  recorded.  See
          "Sample Selection" below.

     The Execution Statistics Display
          The Execution Statistics display shows totals for vari-
          ous system statistics summed over the selected samples.

     The Address Space Display
          The Address Space  display  shows  the  referenced  and
          modified  information for the various pages in the tar-
          get.  It can show data only if address space  data  was
          selected  during  the  recording  of the experiment. If
          such data was not recorded, the Address  Space  display
          reports that fact.

  Analyzer Auxiliary Windows
     The Callers-Callees Window
          The  Callers-Callees  window  is   invoked   from   the
          Callers-Callees  button  at  the bottom of the Function
          List display. When invoked, it shows the selected func-
          tion  in the center of the screen, with callers of that
          function in a panel above, and callees of that function
          in a panel below.

          In addition to showing the metric values for each func-
          tion,  it also shows Attributed metrics. For the center
          function,  the   attributed   metric   represents   the
          exclusive  metric for that function, while for the cal-
          lees below, it represents the portion of  the  callee's
          metric  that  is  attributable to calls from the center
          function.  The sum of attributed metrics for  the  cal-
          lees  and  the  center  function  should  add up to the
          inclusive metric for the center function.

          For the callers above, the attributed metrics represent
          the  inclusive metric value for the center function, as
          attributed up the callstack to its callers. The sum  of
          the  attributed metrics for all callers should also add
          up to the inclusive metric for the center function.

          The metrics shown in the  Callers-Callees  window,  and
          the  sorting  used,  can  be  changed  by  clicking the
          Metrics button at  the  bottom  left  of  the  Callers-
          Callees window.  Sorting can only be done by attributed
          metrics. The Callers-Callees window only works when the
          Function  List  display  is  set to show functions, not
          when it is set to show load objects.  When the Function
          List  display is set to show load objects, the Callers-
          Callees window does not show any data.

          Clicking on a different function in the  Function  List
          display, or on an entry in the current caller or callee
          list, updates the Callers-Callees window to  center  it
          on the selected function.

     The Source Display
          The Source display shows the  source  of  the  selected
          function,  if  available,  annotated  with  performance
          metrics for each source line.  In the rare  case  where
          the  same  source file is used to compile more than one
          object file, the Source display shows  the  performance
          data  for the object file containing the selected func-
          tion.

          The source display has any selected compiler commentary
          interleaved  within  it.   Lines  with metrics that are
          equal to or exceed a threshold  percentage  within  the
          file   are   highlighted,  and  have  the  string  "##"
          prepended to them, to make it easier to find the impor-
          tant  lines.  The threshold, and the classes of commen-
          tary shown are governed by the preferences setting  for
          source compiler commentary, scc. (See DEFAULTS, below.)

          The source display looks for the  file  containing  the
          selected   function  under  the  absolute  pathname  as
          recorded in the executable.  If it  is  not  there,  it
          tries  to  find  a  file  of  the  same basename in the
          current working directory, and use  it.   If  you  have
          moved  the sources, or the experiment was recorded in a
          different file system, you can put a symbolic link from
          the  current  directory  to the real source location in
          order to see the annotated source.

     The Disassembly Display
          The Disassembly display shows a disassembly listing  of
          the   selected  function,  annotated  with  performance
          metrics for each instruction.  In the rare  case  where
          the  same source file is used to compiler more than one
          object  file,  the  Disassembly   display   shows   the
          disassembly  and  performance  data for the object file
          containing the selected function.

          The Disassembly display has the source,  if  available,
          and any selected compiler commentary interleaved within
          it.  Lines with metrics that are equal to or  exceed  a
          threshold  percentage  within the file are highlighted,
          and have the string "##" prepended to them, to make  it
          easier to find the important lines.  The threshold, and
          the classes of commentary shown  are  governed  by  the
          preferences  setting  for  source  compiler commentary,
          dcc.

          The disassembly display uses the same algorithm to find
          the source file as the source display uses.

     The Summary Metrics Display
          The Summary Metrics display is invoked using  the  Show
          Details  item  on  the  View  menu in the Function List
          display. It shows all  the  recorded  metrics  for  the
          selected  function,  both  as  values  and percentages.
          Selecting a different function from either the function
          list, or the Callers-Callees screen updates the Summary
          Metrics display.  If the Function List display  is  set
          to show load objects, the Summary Metrics display shows
          the data for the selected load object.

  Filtering Data: Experiment, Sample, Thread, LWP and Load-Object
     Selectivity

     Normally, data is shown for all  experiments,  all  samples,
     all  threads  and  all  LWPs.  However, a subset of data can
     also be selected.  Any such selection can be made  from  the
     Filters  dialog  box, invoked by clicking the Filters button
     in the upper  right  of  the  main  display.   In  addition,
     filtering  based on the load object from which the functions
     appear can be done through the Select Load Objects  Included
     dialog box, invoked through the View Menu.  The Filters dia-
     log box consists of an Experiment list and  three  sections,
     each  with  a text field used to enter a selection.  You can
     select one or more experiments from the Experiment  list  by
     clicking  on the experiments or using Select All, Clear All,
     or Reverse buttons. You can  then  use  the  text  boxes  to
     change  what  data  is  displayed for those experiments. The
     three sections are for filtering samples, threads and  LWPs.
     All  three  filters  can be applied simultaneously, although
     care should be taken in interpreting  data  when  simultane-
     ously  filtering  by  threads and LWPs. You can also use the
     Enable All, Enable All Selected, Disable  All,  and  Disable
     All  Selected  buttons to enable or disable data display for
     experiments.

     Similarly, the Function List display usually shows functions
     from  all load objects referenced during the run.  It can be
     filtered to show only those functions which come from a sub-
     set of load objects.

     Experiment Selection
          When more than one experiment has been  loaded,  either
          by naming them individually, or by naming an experiment
          group, the Analyzer allows filtering by experiment.

     Sample Selection
          Samples are numbered from 1-N, and any set  of  samples
          can  be  selected.   The selection consists of a single
          sample number, a range of sample numbers, or  a  comma-
          separated list of sample numbers or ranges.

     Thread Selection
          Threads are numbered from 1-N, and any set  of  threads
          can  be  selected.   The selection consists of a single
          thread number, a range of thread numbers, or  a  comma-
          separated  list  of  thread numbers or ranges.  Profile
          data for threads only covers that part of the run where
          the thread was actually scheduled on an LWP.

     LWP Selection
          LWPs are numbered from 1-N, and any set of LWPs can  be
          selected.   The  selection  consists  of  a  single LWP
          number, a range of LWP numbers,  or  a  comma-separated
          list  of LWP numbers or ranges.  If thread synchroniza-
          tion data is recorded, the LWP reported is the  LWP  at
          entry  to  a synchronization event, which might be dif-
          ferent from the LWP at exit  from  the  synchronization
          event.

     Load Object Selection
          The term load object refers to the  executable  (a.out)
          or  any  shared  objects  it  links with or loads.  The
          displays can be restricted to show only functions  from
          a  subset  of  load  objects.  To do so, use the Select
          Load Objects  Included  item  on  the  View  menu.   It
          displays  the  Select  Load Objects Included dialog box
          with controls  to  allow  you  to  set  or  clear  load
          objectsfrom the list.

  Generating Mapfiles and Function Reordering
     In addition to analyzing the data, the  Analyzer  also  pro-
     vides a function reordering capability.  Based on the exper-
     iment, the Analyzer can generate a mapfile which, when  used
     with  the  static  linker  (ld)  to  relink the application,
     creates an executable  with  a  smaller  working  set  size,
     better I-cache behavior, or both.

     The mapfile is produced ordering the executable by  whatever
     metric is being used for sorting the function list.

  Other Functions
     The Analyzer also provides the ability to add experiments or
     experiment  groups  to  the current set, or drop experiments
     from the set.


DEFAULTS

     analyzer processes directives from an  .er.rc  file  in  the
     current  directory,  if  present;  from a .er.rc file in the
     user's home directory, if present; and  from  a  system-wide
     er.rc  file.   These  files can contain default settings for
     metrics, sorting, and  for  specifying  compiler  commentary
     options  for  source  and disassembly output.  They can also
     specify a path for C++ name demangling for other  compilers.
     See the description of these directives and files, and their
     processing, in the er_print(1) man page.


SEE ALSO

     collect(1), collector(1), dbx(1),  er_archive(1),  er_cp(1),
     er_export(1),  er_mv(1),  er_print(1),  er_rm(1), er_src(1),
     workshop(1), libcollector(3), and
     Analyzing Program Performance With Sun WorkShop.