OpenSPARC.net >  Cool Tools >  BIT

Cool Tools - Binary Improvement Tool - BIT

The Sun Binary Improvement Tool (BIT), is a tool for measuring performance or test suite coverage of Solaris® binaries. It can also optimize binaries to improve runtime performance, particularly with respect to instruction cache usage. BIT works on binaries which have been compiled with the Sun® Studio or GCC for Sun Systems compilers, using the ‑xannotate option.

Download and Install

When using BIT on applications compiled with Sun Studio Compilers and Tools, please make sure that the BIT used is from the same level as the Sun Studio. For example, BIT from CMT Devloper Tools for Sun Studio 12 Update 1 is used on application compiled with tools from Sun Studio 12 Update 1.

Starting with CMT Developer Tools for Sun Studio 12 Update 1, BIT (version 1.4) is available on both SPARC and x64 platforms.

To use with Sun Studio 12 Update 1 Compilers and Tools, please install CMT Developer Tools for Sun Studio 12 Update 1.

To use with Sun Studio 12 Compilers and Tools, please install CMT Developer Tools for Sun Studio 12.

To use with Sun Studio 11 Compilers and Tools, please install Add-on Cool Tools for Sun Studio 11 to download and install.

If you are using GCC for Sun Systems, BIT is already installed as part of the distribution. It is invoked as <gcc-install-dir>/gcc/bin/bit. The man page is <gcc-install-dir>/gcc/man/man1/bit.1.

There are some differences in features among these versions of bit. See the Release Notes below for descriptions and compatibility information.

Using BIT

Once you have downloaded and installed BIT, usage is simple. Please refer to the Documentation section for more details on the User's Guide and man pages avaialble for different versions of BIT.

Here is a brief introduction to BIT usage.

First, make sure the binary you are working on has been compiled with ‑xannotate. On Solaris 10 update 5 and above, this option is turned on by default. (If you're using Sun Studio, you must also compile with optimization using ‑O or ‑xO1 or above.) Then, instrument the binary with the command:

   bit instrument target

By default, bit will save the instrumented binary as target.instr. Run the instrumented binary with a typical workload:

   target.instr < typical_input

Then analyze or optimize the binary. To analyze the run, producing a report, for example, of the frequencies of instructions in the run, type:

   bit analyze ‑a ifreq target

Many other analysis reports are available.

To optimize the binary, use a command such as:

   bit optimize ‑O target

For more information on optimization, see the Binary Optimization Guide.

Dependencies

It is recommended that Sun Studio 12 Update 1 Patch 141860-02 (SPARC) or Patch 141858-03 (x64) be installed for BIT 1.4

It is required that Patch 124861-01 for Sun Studio 12 be installed for BIT 1.2.

Known Issues

Because of the way libraries are instrumented at run time when using bit -M, it is possible for code to be undercounted, and in rare instances program execution may be incorrect. See this page for more information and details on workarounds.

This issue has been fixed in BIT 1.3. However, in order for the fix to be effective, the instrumented binary must be run on a machine with one of the following operating systems:

  • Solaris 10 Update 5
  • Solaris 10 with Patch 127111-07 installed
  • Solaris 11 build 70 or above

Documentation

Release Notes

Support

BIT is provided without support. However, CoolTools Forum are available where questions and discussions about installing, using, or improving BIT can be posted. Posting in the forums does not guarantee a response. Please send your feedback to: .