Oracle Solaris Studio 12.4 Man Pages

Exit Print View

Updated: January 2015
 
 

er_archive(1)

Name

er_archive - archive the associated application binaries and source for a Performance Analyzer experiment

Synopsis

er_archive  [ -nqF ] [-s option [-m regexp ] ]
     experiment-name

er_archive -V

Description

er_archive copies application binaries and source into a Performance Analyzer experiment to make the experiment self-contained and portable.

When -s all or -s used is specified, sources and object files are archived. Source archives are required to perform experiment comparison when the profiled applications have source-level differences.

Archiving of Application Binaries

By default, binaries are archived automatically when an experiment is created. However, archiving does not occur in the following circumstances:

  • if the profiled application is terminated before it exits normally

  • if you are profiling a running process

  • if you explicitly disabled archiving when profiling (for example by using collect -A off)

In such cases, you must run er_archive explicitly on the same machine where the profiling data was recorded.

Some Java applications store shared objects in jar files. By default, such shared objects are not automatically archived. To archive shared objects contained in jar files, you must include the addpath directive in an .er.rc file. The addpath directive should give the path to the jar file including the jar file itself. The .er.rc file should be saved in the user home directory or experiment parent directory.

Archiving of Application Sources

By default, application source files are not archived into the experiment. Run er_archive -s all or er_archive -s used on each experiment before comparing experiments if you want to examine source-level differences. This also ensures that source files are available in the experiment even if original source files become modified or inaccessible.

er_archive -s reports which source files were not found. To archive files that could not be found, you should add the addpath and pathmap directives to an .er.rc file. See the er_print (1) man page for more details about addpath and pathmap.

Automatic Archiving of Application Sources

You can set the environment variable SP_ARCHIVE_ARGS to cause archiving of sources to be done automatically when the experiment completes. The SP_ARCHIVE_ARGS environment variable can contain -s and -m arguments, as pairs of argument and options separated by one or more blanks. If more than one -s argument appears on the command line, the last one prevails. If -s is both passed on the command line, and set by the environment variable, the option from the environment variable prevails.

Note that if you enable automatic source archiving during data collection using either the SP_ARCHIVE_ARGS variable or using collect -A src or collect -A usedsrc, you should confirm that source files have been correctly resolved by running er_archive -s all or er_archive -s used.

Options

-n

Archive the named experiment only, not any of its descendants.

-q

Do not write any warnings to stderr. Warnings are incorporated into the .archive file, and shown in the analyzer or er_print output.

-F

Force writing or rewriting of .archive files. This argument can be used to run er_archive by hand, to rewrite files that had warnings.

-A

No longer needed, and ignored if used.

-s option

Specify archiving of source files. The allowed values of option are:

no

Do not archive any source files

all

Archive all source, object, and .anc files that can be found.

used[src]

Archive source, object and .anc files for functions against which data was recorded in the experiment, and that can be found.

If more than one -s argument is given on the command line, or specified in the environment variable, the specified option for all must be the same. If not, er_archive will exit with an error.

-m regex

Archive only those source, object, and .anc files as specified by the -s flag, and whose full pathname, as recorded in the executable or shared object, matches the given regex. For more information on regex, see the regex (5) man page.

Multiple -m arguments can be supplied on the command line or in the environment variable. A source file will be archived if it matches the expression from any of them.

-V

Write version number information for er_archive and exit.

COMPATIBILITY

er_archive does not work on experiments recorded with earlier versions of the tools. If invoked on such experiments, a warning is printed. Use the version of er_archive from the release with which the experiment was recorded.

See also

analyzer (1) , collect (1) , collector (1) , er_print (1)

Performance Analyzer manual