Login | Register
Login | Register

My pages Projects SunSource.net openCollabNet
OpenSPARC.net >  Cool Tools >  ATS

Cool Tools - Automatic Tuning and Troubleshooting System - ATS

ATS is a binary reoptimization and recompilation tool that can be used for tuning and troubleshooting applications. ATS works by rebuilding the compiled PEC (Portable Executable Code) binary - the original source code is not required.

Examples of what can be achieved using ATS are:

  • Find the compiler options that give the best performance
  • Find the object file and the optimization flag that is causing a runtime problem
  • Rebuild the application using new compiler options

Download and Install

ATS can be used with either the SunTM Studio 11 and above Compilers and Tools or the GCC for SPARC® Systems compiler.

If you are using the Sun Studio 12 Compilers and Tools, please follow the steps on CMT Developer Tools for Sun Studio 12 to download and install. ATS will work on both the SPARC and the x64 platforms.

If you are using the Sun Studio 11 Compilers and Tools, please follow the steps on Add-on Cool Tools for Sun Studio 11 to download and install.

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

Documents

Please see the man page supplied with the download package for a description of supported features. More details about ATS can be found in the User's Guide.

Using ATS

ATS can work with the Sun Studio 11 and above compilers for C, C++, and FORTRAN, as well as the GCC for SPARC Systems, hereafter referred to as 'gcc'.

Once you have downloaded and installed ATS, usage is simple. First, make sure the binary you are processing is a PEC binary compiled with optimization level 3 or up.

Compile with either 'gcc -O3 -xpec' or 'cc -xO3 -Wd,-pec' to get a PEC binary.

Example #1:   recompile using '-O4' and rerun the executable 'a.out'

    ats -i -O4 a.out


Example #2:   recompile and rerun the executable 'a.out', trying out 30 different combinations of options

    ats -i 'script:autotuning' -stopon runs 30 a.out


Example #3:   compile hello.c as 'cc -xO3 hello.c -o hello', then runs 'hello'

    ats -i '-xO3' -build '$CC $CFLAGS hello.c -o hello' -r hello


Example #4:   runs gmake with steps 'clean' and 'a.out', where $CC is set to 'gcc' and $CFLAGS is set to '-O3' in the make file; when the gmake is done, runs the executable 'a.out'

    ats -build 'gmake CC=$GCC CFLAGS=$GCFLAGS clean a.out' -r a.out -i '-O3'


Example #5:   runs make with steps 'clean' and 'a.out', where $CC is set to 'cc' and $CFLAGS is set to '-xO4 -xipo=2' in the make file; when the make is done, runs the executable 'a.out', then runs the script 'check_result.sh' to verify the result

    ats -i '-xO4 -xipo=2' -build 'make CC=$CC CFLAGS="$CFLAGS" clean a.out' -r a.out -c check_result.sh

See the man page or the User's Guide for more details.

Support

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