binopt(1) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

binopt(1)

binopt(1)                        User Commands                       binopt(1)



NAME
       binopt - Oracle Solaris Binary Optimizer

SYNOPSIS
       binopt [-binstrument[=on|off]]
            [-bdata=datafile] [-bmt[=on|off]]
            [-o filename] [-V] [-flags] [-Q[y|n]]
            [-xinline=[[,v...]]]   binfile


       binopt [-buse[=on|off]] [-blevel=0|1|2]
            [-bdata=datafile] [-bfinal[=on|off]] [-o filename]
            [-V] [-flags] [-Q[y|n]]
            [-xinline=[[,v...]]]   binfile

DESCRIPTION
       The  binopt  command  is  used  to  optimize (SPARC and x86/x64) Oracle
       Solaris binaries (executables or shared objects). It can optimize bina‐
       ries  irrespective  of  the  source language used. It can also optimize
       mixed source language binaries. To be  able  to  effectively  optimize,
       binaries  must be built with some explicit level of optimization (-xOn)
       and on a newer Oracle Solaris 10 system with patch 127111-07 installed.


       The Binary Optimizer may also be used to instrument a binary  for  pro‐
       file collection. The instrumented binary must then be run with an input
       data training set representing a typical user's data. This training run
       will create a binary file with profile data. This file must then be fed
       back to the Binary Optimizer to create a profile optimized binary.


       The binopt command performs several levels of optimizations. At  higher
       levels  of optimization, more optimizations are performed, leading to a
       potentially more optimal binary. A possible  side-effect  is  increased
       build time.


       By  default,  if  no  output  file name is specified, the input file is
       overwritten with the optimized binary. Unless  the  -bfinal  option  is
       given,  binaries  created  by  the binopt command may be optimized by a
       future invocation of the Binary Optimizer.


       The Binary Optimizer instruments an application binary assuming  single
       threaded  execution.  If the application starts threads, use -bmt=on to
       enable thread safe profile counting.


       binopt is available only on Oracle Solaris platforms.


       binopt should not be used to instrument a binary that was compiled with
       the -xpg flag for gprof profiling. binopt and gprof are incompatible.


       The  binopt command is incompatible with binaries built with any of the
       following flags: -p, -pg, -qp, -xpg, and -xlinkopt.

OPTIONS
       -binstrument[=on|off]

           Instruments the binary for profile  collection.  All  optimizations
           are automatically turned off. The -bdata option may be used to mod‐
           ify the default file used to store the profile data. This cannot be
           used with the -buse flag.


       -buse[=on|off]

           Perform profile guided optimizations using profile data. Again, the
           -bdata flag may be used to modify the default file  location.  This
           cannot be used with the -binstrument flag.


       -blevel=0|1|2

           Performs  different  levels  of optimizations. At level 0, no opti‐
           mizations are performed. At level 1, do code  reordering  optimiza‐
           tions  (this is the default behavior). At level 2, data-flow infor‐
           mation is constructed and more aggressive optimizations like inlin‐
           ing and address related optimizations are performed.


       -bdata=datafile

           Specifies  the  file  where  the  profile data will be stored. This
           option is used only with -binstrument or -buse and is ignored  oth‐
           erwise.  If  this option is not used, the default file name is bin‐
           file.instrdata.


       -bfinal[=on|off]

           Finalizes the output binary so that no future binary  optimizations
           may  be  performed.  This  option is useful in the final build step
           after which no further transformations are  planned.  For  example,
           this  may  be  used with the -buse option when generating the final
           optimal binary. The default is -bfinal=off.


       -bmt[=on|off]

           Enables thread safe profile counting. Use with -binstrument if  the
           executable  starts threads. If the executable is instrumented with‐
           out -bmt=on and starts threads at runtime, the instrumentation will
           terminate  the  application with a message. The default is -bmt=on.
           For example:

             % binopt -binstrument -bmt=on binfile  -o binoutfile



       -o filename

           Names the output file filename, instead of  overwriting  the  input
           binfile file by default.


       -V

           Prints the version number of the tool on the standard error output.


       -flags

           Prints a one-line summary of available options.


       -Q[y|n]

           Emits  or does not emit the Binary Optimizer version identification
           information the output file. If -Qy is used, identification  infor‐
           mation  will  be  added to the output files (the default behavior).
           -Qn suppresses this information.


       -xinline=[[,v...]]

           v can be %auto, func_name, or no%func_name.

           -xinline tries to inline only  those  functions  specified  in  the
           list.  The  list is comprised of a comma-separated list of function
           names, or a comma-separated list of  no%func_name  values,  or  the
           value  %auto.  If  you specify %nofunc_name, the compiler is not to
           inline the named  function.  If  you  specify  %auto,  binopt  will
           attempt  to  automatically  inline functions. By default, automatic
           inlining is enabled at optimization level 2.


OPERAND
       binfile

           Binary file to be optimized.


EXAMPLES
       Example 1 Prepare and
                           Optimize
                           a
                           Binary



       The following entry prepares the created binary for  optimizations  and
       then  optimizes it with the binopt command, overwriting the binary file
       in place.


         % cc -O -xbinopt=prepare *.c -o a.out
         % binopt a.out



       Example 2 Instrument,
                           Run,
                           and
                           Perform
                           Profile
                           Guided
                           Optimizations



       The following example instruments a binary, performs a training run and
       then uses the profile data to perform profile guided optimizations.


         % binopt -binstrument -bdata=a.out.data -o a.out.instr a.out
         % ./a.out.instr
         % binopt -buse -bdata=a.out.data -o a.out.opt a.out



       Example 3 Perform
                           Level
                           2
                           Optimizations
                           and
                           Finalize



       The following example performs binary optimizations at level 2 and then
       finalizes the binary so that the binary may not  be  optimized  in  the
       future.


         % binopt -blevel=2 -bfinal a.out



SEE ALSO
       cc(1), CC(1), f95(1)



Studio 12.6                        May 2017                          binopt(1)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3