SkySquire

Make a complicated command simple.

Try Now!

SkySquire is a versatile tool, or say a Swiss army knife, to help you revise the default behavior of softwares. For example, you can enable ‘-O3’ as a default option of your gcc/clang. With SkySquire, you don’t need to handle with all details of Makefiles and building system any more.

How It Works

Revising Makefiles and building system is complex and error-prone. You never know what stupid mistakes you will make until things end up as disasters. Skymizer ever spent two full months on figuring out performance issues of an open source project, and found it just simply failed to pass the compiler correct flags. We once made a lot of changes on Ninja of Android just for applying different compiler flags on different source code. What we learned is, fighting with building system is interesting in the beginning but purely painful at last.
Spent your time with your family, not with revising Makefiles. For saving your time and your life, we released SkySquire.

Download

Let SkySquire assists your performance from now.

Ubuntu (.deb) CentOS (.rpm) General Linux (.tar.gz)

Getting Started

The most popular case of using SkySquire is to evaluate the opportunity of compiler flag optimization. To help you to evaluate it, we define two concepts: high watermark (-O3) and low watermark(-O0) to calculate the performance gap. You can use the following commands to change default options of gcc/clang.

Install SkySquire

Install via rpm

sudo rpm -ivh ./squire-1.0-5f.x86_64.rpm

Install via deb

sudo dpkg -i ./squire-1.0-5f.deb

After installment, the executable file of SkySquire will be in /usr/bin. As to README and other files will be in /usr/share/squire . You may validate your install through

squire -h

And below will appear:

Usage:
    squire -mark-high [path of compiler]

    ...

    Skymizer SkySquire
    http://www.skymizer.com

Congrats! It’s done!


Settings

The most popular case of using SkySquire is to evaluate the opportunity of compiler flag optimization. To help you to evaluate it, we define two concepts: high watermark (-O3) and low watermark(-O0) to calculate the performance gap. You can use the following commands to change default options of gcc/clang.

Set high/low watermark on GCC

Supposedly we are going to add `-O3` options to gcc, we can use the following instructions:

* Set High Watermark

squire -mark-high `which gcc`

* Set Low Watermark

squire -mark-low `which gcc`

After each settings, you should see the following message:

------------------------------------------------------------------------------
• high-mark         -O3
------------------------------------------------------------------------------

That means you’ve already set the high watermark.

* List Current Setting

Use -l and -list to list current settings

squire -l -verbose=3

You should see message like these:

           ///                                *///
 ......... ///   .......    ... ... .... ....  ... .........  ......... ... ...
 ///////// ///   //// ///   *//////*////,//// */// /////////  ///////// ///*///
 ///       ///  ////  ///  */// ///  ///  /// *///      ////  ///   /// ////   
 ///////// ///////     ///.///  ///  ///  /// *///    /////   ///////// ///    
       /// ///  ///.   //////   ///  ///  /// *///  .////     ///       ///    
 ///////// ///   ///*   ////    ///  ///  /// */// /////////  ///////// ///    
                      /////                                                    

 Copyright (c) 2017 Skymizer Taiwan, Inc.

 ------------------------------------------------------------------------------
 • high-mark   -O3
              locate in file://usr/bin/gcc
 ------------------------------------------------------------------------------

* Clear All Settings

Simply put -unmark as below:

sudo squire -unmark `which gcc`

Unlike listing all settings, clearing settings will interfere multiple users. Please notify others before execute this step. If you are not sure about the current status, please enter below:

sudo squire -tool `which gcc` -mark -fno-line

* Show more information of SkySquire

If you want SkySquire to show more information such as how to set location or option etc. You can use -verbose and -v to tune verbose level.

sudo squire -verbose=3

The number of occurrences of -v is the verbose level. For example, this sets verbose level to 3.

sudo squire -v -v -v

-quiet will set the verbose level to zero.


“Echo” - A Simple Example

Here, we use echo to explain how SkySquire works internally. The following is our echo script:

#!/bin/bash
echo "I got $*";

This script simply lists all scripts it received. You can add number one! as default options to the echo script like this:

squire -tool ./echo.sh -mark number one!

Then echo.sh is equivalent to echo.sh [original options] number one! as we execute it.

./echo.sh Skymizer
I got Skymizer number one!

We can use squire -list to check all settings on the echo script.

squire -list
           ///                                *///                             
 ......... ///   .......    ... ... .... ....  ... .........  ......... ... ...
 ///////// ///   //// ///   *//////*////,//// */// /////////  ///////// ///*///
 ///       ///  ////  ///  */// ///  ///  /// *///      ////  ///   /// ////   
 ///////// ///////     ///.///  ///  ///  /// *///    /////   ///////// ///    
       /// ///  ///.   //////   ///  ///  /// *///  .////     ///       ///    
 ///////// ///   ///*   ////    ///  ///  /// */// /////////  ///////// ///    
                      /////                                                    
 Copyright (c) 2017 Skymizer Taiwan, Inc.

 ------------------------------------------------------------------------------
 • high-mark   -O3
              locate in file://usr/bin/gcc
 • echo.sh     number one!
              locate in file://home/luba/examine/echo.sh
 ------------------------------------------------------------------------------

FAQ

FAQ

1. What is the difference between using evaluate and alias? Alias can only adds options in front of the command lines while SkySquire adds them behind the command lines. Unfortunately, the options in the front are usually covered by the latter ones. In short, they won’t work well.

Are there any other techniques similar to SkySquire? MPICH MPI CC uses similar techniques to modify compiler options. This approach is actually commonly used in open source projects. We simply release this tool to make it even much easier.

Tutorial

If you want to learn more about the SkySquire, here are some articles that you might be interested in.

How to evaluate Skymizer Intelligent Compiler for your projects

SkySquire tool helps you to evaluate Skymizer Intelligent Compiler for your project. We found a simple truth: the bigger performance gap between O0 to O3 is, the higher performance Skymizer Intelligent Compiler can achieve eventually. SkySquire can change default compiler flags in a very easy way. You can use it to calculate the performance gap between O0 to O3. Moreover, you can use it to manual compiler optimization flags as well.

Read more ...

SkySquire: a very easy way to eable LTO/PGO

With SkySquire, you don’t need to handle with all details of Makefiles and building system any more. All that you need to do is to set -flto and -fprofile-generate/use as a default mark of gcc by using SkySquire.

Read more ...