-Uname

-Uname

name is the symbol name whose definition is removed from the preprocessor.

This option undefines any name that has initially been defined by the preprocessing stage of compilation.

Aname can be a definition set by the compiler. This is displayed when you specify the -voption.

Aname can also be a definition that you have specified with the -Doption on the command line.

The -Doption has lower precedence than the -Uoption. If the same name is used in both, the -Uoption and the -Doption, the name is undefined regardless of the order of the options on the command line.

Profiling Code Options

HP compilers provides the following options for profiling your code.

-G

-G

At compile time, the -Goption produces code that counts the number of times each arc in the call graph is traversed. At link-time, when you are building an executable (but not a shared library) -Gpicks up profiled versions of certain system libraries and picks up the gprof support library.

Example:

aCC -G file.C

The above example compiles file.C and creates the executable file a.out instrumented for use with gprof.

See gprof(1) manpage for more information.

-p

-p

At compile time, the -poption produces code that counts the number of times each routine is called. At link-time, when you are building an executable (but not a shared library) -ppicks up profiled versions of certain system libraries and picks up the prof support library.

Example:

The following example compiles file.C and creates the executable file a.out instrumented for use with prof.

aCC -p file.C

See the prof(1) manpage for more information.

+profilebucketsize

+profilebucketsize=[1632]

This is a link-time option to support prof and gprof when building an executable, but not a shared library. When prof or gprof startup code invokes sprofil, this option specifies the size in bits of the counters used to record sampled values of the program counter.

The effect of this option can be overridden by setting the environment variable

LD_PROFILEBUCKET_SIZE when running the instrumented program. This environment variable has no effect when building the instrumented program. Legal values are 16 (the default), and 32.

See gprof(1) and ld(1) manpages for more details.

74 Command-Line Options