Home | History | Annotate | Line # | Download | only in doc
      1  1.1  christos @c ----------------------------------------------------------------------------
      2  1.1  christos @c This is the Texinfo source file for the gprofng-archive man page.
      3  1.1  christos @c
      4  1.1  christos @c Author: Ruud van der Pas
      5  1.1  christos @c ----------------------------------------------------------------------------
      6  1.1  christos @ifset man
      7  1.1  christos \input texinfo @c -*-texinfo-*-
      8  1.1  christos @setfilename gprofng-archive
      9  1.1  christos @settitle Archive gprofng experiment data
     10  1.1  christos @include gp-macros.texi
     11  1.1  christos @end ifset
     12  1.1  christos 
     13  1.1  christos @c ----------------------------------------------------------------------------
     14  1.1  christos @c This is from the man-pages(7) man page
     15  1.1  christos @c
     16  1.1  christos @c "The list below shows conventional or suggested sections.  Most manual pages
     17  1.1  christos @c  should include at least the highlighted sections.  Arrange a new manual
     18  1.1  christos @c  page so that sections are placed in the order shown in the list."
     19  1.1  christos @c
     20  1.1  christos @c              NAME
     21  1.1  christos @c              SYNOPSIS
     22  1.1  christos @c              CONFIGURATION    [Normally only in Section 4]
     23  1.1  christos @c              DESCRIPTION
     24  1.1  christos @c              OPTIONS          [Normally only in Sections 1, 8]
     25  1.1  christos @c              EXIT STATUS      [Normally only in Sections 1, 8]
     26  1.1  christos @c              RETURN VALUE     [Normally only in Sections 2, 3]
     27  1.1  christos @c              ERRORS           [Typically only in Sections 2, 3]
     28  1.1  christos @c              ENVIRONMENT
     29  1.1  christos @c              FILES
     30  1.1  christos @c              VERSIONS         [Normally only in Sections 2, 3]
     31  1.1  christos @c              ATTRIBUTES       [Normally only in Sections 2, 3]
     32  1.1  christos @c              CONFORMING TO
     33  1.1  christos @c              NOTES
     34  1.1  christos @c              BUGS
     35  1.1  christos @c              EXAMPLES
     36  1.1  christos @c              AUTHORS          [Discouraged]
     37  1.1  christos @c              REPORTING BUGS   [Not used in man-pages]
     38  1.1  christos @c              COPYRIGHT        [Not used in man-pages]
     39  1.1  christos @c              SEE ALSO
     40  1.1  christos @c
     41  1.1  christos @c This is what the texi2pod.pl tool recognizes:
     42  1.1  christos @c
     43  1.1  christos @c for $sect (qw(NAME SYNOPSIS TARGET DESCRIPTION OPTIONS ENVIRONMENT FILES
     44  1.1  christos @c               BUGS NOTES FOOTNOTES SEEALSO AUTHOR COPYRIGHT)) {
     45  1.1  christos @c
     46  1.1  christos @c What is interesting is that it places "SEE ALSO" before "COPYRIGHT", which
     47  1.1  christos @c makes sense and adhered to for the other formats.
     48  1.1  christos @c ----------------------------------------------------------------------------
     49  1.1  christos 
     50  1.1  christos @c ----------------------------------------------------------------------------
     51  1.1  christos @c NAME section
     52  1.1  christos @c ----------------------------------------------------------------------------
     53  1.1  christos 
     54  1.1  christos @ManPageStart{NAME}
     55  1.1  christos @c man begin NAME
     56  1.1  christos 
     57  1.1  christos gprofng-archive - Archive the associated application binaries and sources for a
     58  1.1  christos gprofng experiment
     59  1.1  christos 
     60  1.1  christos @c man end
     61  1.1  christos @ManPageEnd{}
     62  1.1  christos 
     63  1.1  christos @c ----------------------------------------------------------------------------
     64  1.1  christos @c SYNOPSIS section
     65  1.1  christos @c ----------------------------------------------------------------------------
     66  1.1  christos 
     67  1.1  christos @ManPageStart{SYNOPSIS}
     68  1.1  christos @c man begin SYNOPSIS
     69  1.1  christos 
     70  1.1  christos @command{gprofng archive} [@var{option(s)}] @var{experiment}
     71  1.1  christos 
     72  1.1  christos @c man end
     73  1.1  christos @ManPageEnd{}
     74  1.1  christos 
     75  1.1  christos @c ----------------------------------------------------------------------------
     76  1.1  christos @c DESCRIPTION section
     77  1.1  christos @c ----------------------------------------------------------------------------
     78  1.1  christos 
     79  1.1  christos @ManPageStart{DESCRIPTION}
     80  1.1  christos @c man begin DESCRIPTION
     81  1.1  christos 
     82  1.1  christos Archive the associated application binaries and source files in a gprofng
     83  1.1  christos experiment to make it self contained and portable.
     84  1.1  christos 
     85  1.1  christos By default, the binaries are archived as part of the data collection, but the
     86  1.1  christos application source files are not archived.  Use this tool to change this and
     87  1.1  christos afterwards archive additional components.
     88  1.1  christos 
     89  1.1  christos This tool has to be executed on the same system where the profiling data was
     90  1.1  christos recorded.
     91  1.1  christos 
     92  1.1  christos @c man end
     93  1.1  christos @ManPageEnd{}
     94  1.1  christos 
     95  1.1  christos @c ----------------------------------------------------------------------------
     96  1.1  christos @c OPTIONS section
     97  1.1  christos @c ----------------------------------------------------------------------------
     98  1.1  christos 
     99  1.1  christos @ManPageStart{OPTIONS}
    100  1.1  christos @c man begin OPTIONS
    101  1.1  christos 
    102  1.1  christos @table @gcctabopt
    103  1.1  christos 
    104  1.1  christos @item --version
    105  1.1  christos @ifclear man
    106  1.1  christos @IndexSubentry{Options, @code{--version}}
    107  1.1  christos @end ifclear
    108  1.1  christos 
    109  1.1  christos Print the version number and exit.
    110  1.1  christos 
    111  1.1  christos @item --help
    112  1.1  christos @ifclear man
    113  1.1  christos @IndexSubentry{Options, @code{--help}}
    114  1.1  christos @end ifclear
    115  1.1  christos 
    116  1.1  christos Print usage information and exit.
    117  1.1  christos 
    118  1.1  christos @item -a @{off | on | ldobjects | src | usedldobjects | used[src]@}
    119  1.1  christos @ifclear man
    120  1.1  christos @IndexSubentry{Options, @code{-a}}
    121  1.1  christos @end ifclear
    122  1.1  christos 
    123  1.1  christos Specify archiving of binaries and other files.  In addition to disable this
    124  1.1  christos feature (@samp{off}), or enable archiving of all loadobjects and sources
    125  1.1  christos (@samp{on}), the other choices support a more refined selection.
    126  1.1  christos 
    127  1.1  christos All of these choices enable archiving, but the keyword controls what exactly
    128  1.1  christos is selected: all load objects (@samp{ldobjects}), all source files
    129  1.1  christos (@samp{src}), the loadobjects associated with a program counter
    130  1.1  christos (@samp{usedldobjects}), or the source files associated with a program counter
    131  1.1  christos (@samp{used[src]}).  The default is @samp{-a ldobjects}.
    132  1.1  christos 
    133  1.1  christos @item -d @var{path}
    134  1.1  christos @ifclear man
    135  1.1  christos @IndexSubentry{Options, @code{-d}}
    136  1.1  christos @end ifclear
    137  1.1  christos 
    138  1.1  christos The @var{path} is the absolute path to a common archive, which is a
    139  1.1  christos directory that contains archived files.  If the directory does not
    140  1.1  christos exist, then it will be created.  Files are saved in the common archive
    141  1.1  christos directory, and a symbolic link is created in the experiment archive.
    142  1.1  christos 
    143  1.1  christos @item -F
    144  1.1  christos @ifclear man
    145  1.1  christos @IndexSubentry{Options, @code{-F}}
    146  1.1  christos @end ifclear
    147  1.1  christos 
    148  1.1  christos Force writing, or rewriting of .archive files.  All archived files will be
    149  1.1  christos removed and recreated, except if the @samp{-n} or @samp{-m} option is used,
    150  1.1  christos or if the experiment is a subexperiment.
    151  1.1  christos 
    152  1.1  christos @item -m @var{regex}
    153  1.1  christos @ifclear man
    154  1.1  christos @IndexSubentry{Options, @code{-m}}
    155  1.1  christos @end ifclear
    156  1.1  christos 
    157  1.1  christos Archive only those source, object, and debug info files whose full path name
    158  1.1  christos matches the given POSIX compliant @var{regex} regular expression.
    159  1.1  christos 
    160  1.1  christos @item -n
    161  1.1  christos @ifclear man
    162  1.1  christos @IndexSubentry{Options, @code{-n}}
    163  1.1  christos @end ifclear
    164  1.1  christos 
    165  1.1  christos Archive the named experiment only, not any of its descendants.
    166  1.1  christos 
    167  1.1  christos @item -q
    168  1.1  christos @ifclear man
    169  1.1  christos @IndexSubentry{Options, @code{-q}}
    170  1.1  christos @end ifclear
    171  1.1  christos 
    172  1.1  christos Do not write any warnings to @file{stderr}.  Warnings are incorporated into
    173  1.1  christos the .archive file in the experiment directory.  They are shown in the output
    174  1.1  christos of the @command{gprofng display text} command.
    175  1.1  christos 
    176  1.1  christos @item -r @var{path}
    177  1.1  christos @ifclear man
    178  1.1  christos @IndexSubentry{Options, @code{-r}}
    179  1.1  christos @end ifclear
    180  1.1  christos 
    181  1.1  christos This option specifies the location of a common archive.  The value is the
    182  1.1  christos relative path to a common archive, which is a directory that contains
    183  1.1  christos archived files.
    184  1.1  christos If the directory does not exist, then it will be created.  Files are saved
    185  1.1  christos in the common archive directory, and a symbolic link is created in the
    186  1.1  christos experiment archive.
    187  1.1  christos 
    188  1.1  christos @item -s @var{selection}
    189  1.1  christos @ifclear man
    190  1.1  christos @IndexSubentry{Options, @code{-s}}
    191  1.1  christos @end ifclear
    192  1.1  christos 
    193  1.1  christos Specify archiving of source files.  The allowed values for @var{selection} are:
    194  1.1  christos 
    195  1.1  christos @table @gcctabopt
    196  1.1  christos 
    197  1.1  christos @item no
    198  1.1  christos 
    199  1.1  christos Do not archive any source files.
    200  1.1  christos 
    201  1.1  christos @item all
    202  1.1  christos 
    203  1.1  christos Archive all source and object files that can be found.
    204  1.1  christos 
    205  1.1  christos @item used[src]
    206  1.1  christos 
    207  1.1  christos Archive source and object files for functions against which data was
    208  1.1  christos recorded in the experiment, and that can be found.
    209  1.1  christos @end table
    210  1.1  christos 
    211  1.1  christos By default, application source files are not archived into the experiment.
    212  1.1  christos If the @samp{-s all}, or @samp{-s used} option is used, sources and object
    213  1.1  christos files are archived.
    214  1.1  christos These options also ensure that source files are available in the experiment,
    215  1.1  christos even if the original source files have been modified, or are inaccessible
    216  1.1  christos afterwards.
    217  1.1  christos 
    218  1.1  christos In case archive files cannot be found, use the @samp{addpath}, or
    219  1.1  christos @samp{pathmap} command, or both, in an @file{.er.rc} file to specify the
    220  1.1  christos location of the missing file(s).
    221  1.1  christos 
    222  1.1  christos @end table
    223  1.1  christos 
    224  1.1  christos @c man end
    225  1.1  christos @ManPageEnd{}
    226  1.1  christos 
    227  1.1  christos @c ----------------------------------------------------------------------------
    228  1.1  christos @c NOTES section
    229  1.1  christos @c ----------------------------------------------------------------------------
    230  1.1  christos 
    231  1.1  christos @ManPageStart{NOTES}
    232  1.1  christos @c man begin NOTES
    233  1.1  christos 
    234  1.1  christos @itemize @minus
    235  1.1  christos 
    236  1.1  christos @c ----------------------------------------------------------------------------
    237  1.1  christos @item
    238  1.1  christos Archiving of application binaries -
    239  1.1  christos By default, binaries are archived automatically when an experiment is
    240  1.1  christos created.  However, archiving does not occur in one or more of the
    241  1.1  christos following circumstances:
    242  1.1  christos 
    243  1.1  christos @itemize @bullet
    244  1.1  christos 
    245  1.1  christos @item
    246  1.1  christos If the profiled application is terminated before it exits normally.
    247  1.1  christos 
    248  1.1  christos @item
    249  1.1  christos If a running process is profiled.
    250  1.1  christos 
    251  1.1  christos @item
    252  1.1  christos If archiving is explicitly disabled when profiling.  For example by using
    253  1.1  christos the @samp{-a off} option on @command{gprofng collect app}.
    254  1.1  christos 
    255  1.1  christos @end itemize
    256  1.1  christos 
    257  1.1  christos In these cases, @command{gprofng archive} must be run manually and on the same
    258  1.1  christos machine where the profiling data was recorded.
    259  1.1  christos 
    260  1.1  christos Archiving of experiment data during the data collection process can be quite
    261  1.1  christos expensive.  Especially if the experiment has many descendant processes.
    262  1.1  christos @ifclear man
    263  1.1  christos @IndexSubentry{Options, @code{-a}}
    264  1.1  christos @end ifclear
    265  1.1  christos In such cases, a more efficient strategy is to use the @samp{-a off} option
    266  1.1  christos when collecting the data.  Once the collection has completed, the data can be
    267  1.1  christos @ifclear man
    268  1.1  christos @IndexSubentry{Options, @code{-s}}
    269  1.1  christos @end ifclear
    270  1.1  christos archived using the @samp{-s all} option.  This saves all executables and
    271  1.1  christos source files in the experiment.
    272  1.1  christos 
    273  1.1  christos If during the archiving there is an error message that an executable, or
    274  1.1  christos @ifclear man
    275  1.1  christos @IndexSubentry{Commands, @code{addpath}}
    276  1.1  christos @end ifclear
    277  1.1  christos source file cannot be found, the @samp{addpath} command to add the path
    278  1.1  christos to the missing file(s) can be included in the @file{.er.rc} file.
    279  1.1  christos After this command has been added, archive the experiment again.  The
    280  1.1  christos archiving archiving can be repeated as many times as necessary to archive all
    281  1.1  christos files.
    282  1.1  christos 
    283  1.1  christos Archiving should be done on the same system as was used to collect the
    284  1.1  christos experiment.  If some files cannot be accessed from this system (e.g.  sources
    285  1.1  christos or object files), then additional archiving can be done using another system
    286  1.1  christos that can access them.  For example, the system where the application was built.
    287  1.1  christos 
    288  1.1  christos Some Java applications store shared objects in jar files.  By default, such
    289  1.1  christos shared objects are not automatically archived.  To archive shared objects
    290  1.1  christos contained in jar files, make sure to include the @samp{addpath} command in
    291  1.1  christos an @file{.er.rc} file.
    292  1.1  christos The @samp{addpath} command should give the path to the jar file, including
    293  1.1  christos the jar file itself.  The @file{.er.rc} file should be saved in the user home
    294  1.1  christos directory, or experiment parent directory.
    295  1.1  christos 
    296  1.1  christos @item
    297  1.1  christos Archiving of application sources -
    298  1.1  christos By default, application source files are not archived in the experiment.
    299  1.1  christos Execute the @command{gprofng archive} command with the @samp{-s all}, or
    300  1.1  christos @samp{-s used} option on each experiment to store source files in the
    301  1.1  christos experiment.
    302  1.1  christos 
    303  1.1  christos @item
    304  1.1  christos Automatic archiving of application sources -
    305  1.1  christos Environment variable @samp{GPROFNG_ARCHIVE} may be set to automatically
    306  1.1  christos archive sources when the experiment has completed.  This environment
    307  1.1  christos variable can contain @samp{-s} and @samp{-m} arguments, as pairs of
    308  1.1  christos argument and options, separated by one or more blanks.
    309  1.1  christos @ifclear man
    310  1.1  christos @IndexSubentry{Environment variables, @code{GPROFNG_ARCHIVE}}
    311  1.1  christos @IndexSubentry{Options, @code{-a}}
    312  1.1  christos @IndexSubentry{Options, @code{-m}}
    313  1.1  christos @IndexSubentry{Options, @code{-s}}
    314  1.1  christos @end ifclear
    315  1.1  christos 
    316  1.1  christos If more than one @samp{-s} argument appears on the command line, the
    317  1.1  christos last one prevails.  If @samp{-s} is both passed on the command line, and
    318  1.1  christos set by the environment variable, the option from the environment variable
    319  1.1  christos prevails.
    320  1.1  christos 
    321  1.1  christos Note that in case automatic source archiving during data collection has
    322  1.1  christos been enabled using either the @samp{GPROFNG_ARCHIVE} variable, or the
    323  1.1  christos @samp{-a src}, or @samp{-a usedsrc} option, it is recommended to confirm that
    324  1.1  christos source files have been correctly resolved by executing the
    325  1.1  christos @command{gprofng archive -s all}, or @command{gprofng archive -s used}
    326  1.1  christos command.
    327  1.1  christos 
    328  1.1  christos @item
    329  1.1  christos The @samp{-d} and @samp{-r} options are mutually exclusive.
    330  1.1  christos @ifclear man
    331  1.1  christos @IndexSubentry{Options, @code{-d}}
    332  1.1  christos @IndexSubentry{Options, @code{-r}}
    333  1.1  christos @end ifclear
    334  1.1  christos 
    335  1.1  christos @item
    336  1.1  christos When using the @samp{-d} or @samp{-r} option, environment variable
    337  1.1  christos @ifclear man
    338  1.1  christos @IndexSubentry{Options, @code{-d}}
    339  1.1  christos @IndexSubentry{Options, @code{-r}}
    340  1.1  christos @IndexSubentry{Environment variables, @code{GPROFNG_ARCHIVE_COMMON_DIR}}
    341  1.1  christos @end ifclear
    342  1.1  christos @samp{GPROFNG_ARCHIVE_COMMON_DIR} can be used to specify the location of
    343  1.1  christos the common archive.  This can be very convenient when using a script to
    344  1.1  christos profile applications.
    345  1.1  christos 
    346  1.1  christos @item
    347  1.1  christos If more than one @samp{-s} option is given on the command line, or
    348  1.1  christos specified in the environment variable, the specified option for all must
    349  1.1  christos be the same.  If not, @command{gprofng archive} exits with an error.
    350  1.1  christos 
    351  1.1  christos @item
    352  1.1  christos This tool does not work on experiments recorded with earlier versions of
    353  1.1  christos the tools.  If invoked on such experiments, a warning is printed.  Use the
    354  1.1  christos version of @command{gprofng archive} from the same release with which the
    355  1.1  christos experiment was recorded.
    356  1.1  christos 
    357  1.1  christos @end itemize
    358  1.1  christos 
    359  1.1  christos @c man end
    360  1.1  christos @ManPageEnd{}
    361  1.1  christos 
    362  1.1  christos @c ----------------------------------------------------------------------------
    363  1.1  christos @c SEEALSO section
    364  1.1  christos @c ----------------------------------------------------------------------------
    365  1.1  christos 
    366  1.1  christos @ManPageStart{SEE ALSO}
    367  1.1  christos @c man begin SEEALSO
    368  1.1  christos 
    369  1.1  christos gprofng(1),
    370  1.1  christos gprofng-collect-app(1),
    371  1.1  christos @c -- gprofng-display-gui(1),
    372  1.1  christos gprofng-display-html(1),
    373  1.1  christos gprofng-display-src(1),
    374  1.1  christos gprofng-display-text(1)
    375  1.1  christos 
    376  1.1  christos @iftex
    377  1.1  christos @vspace{1}
    378  1.1  christos @end iftex
    379  1.1  christos 
    380  1.1  christos The user guide for gprofng is maintained as a Texinfo manual.  If the
    381  1.1  christos @command{info} and @command{gprofng} programs are correctly installed, the
    382  1.1  christos command @command{info gprofng} should give access to this document.
    383  1.1  christos 
    384  1.1  christos @c man end
    385  1.1  christos @ManPageEnd{}
    386  1.1  christos 
    387  1.1  christos @c ----------------------------------------------------------------------------
    388  1.1  christos @c COPYRIGHT section
    389  1.1  christos @c ----------------------------------------------------------------------------
    390  1.1  christos 
    391  1.1  christos @ManPageStart{COPYRIGHT}
    392  1.1  christos @c man begin COPYRIGHT
    393  1.1  christos 
    394  1.1  christos Copyright @copyright{} 2022-2025 Free Software Foundation, Inc.
    395  1.1  christos 
    396  1.1  christos Permission is granted to copy, distribute and/or modify this document
    397  1.1  christos under the terms of the GNU Free Documentation License, Version 1.3
    398  1.1  christos or any later version published by the Free Software Foundation;
    399  1.1  christos with no Invariant Sections, with no Front-Cover Texts, and with no
    400  1.1  christos Back-Cover Texts.  A copy of the license is included in the
    401  1.1  christos section entitled ``GNU Free Documentation License''.
    402  1.1  christos 
    403  1.1  christos @c man end
    404  1.1  christos @ManPageEnd{}
    405  1.1  christos 
    406  1.1  christos @c ----------------------------------------------------------------------------
    407  1.1  christos @c If this text is used for a man page, exit.  Otherwise we need to continue.
    408  1.1  christos @c ----------------------------------------------------------------------------
    409  1.1  christos 
    410  1.1  christos @ifset man
    411  1.1  christos @bye
    412  1.1  christos @end ifset
    413