Marss with Google-perftools

From Marss86

We are testing google-perftools with Marss to see if our tool can gain performance with new TCmalloc provided by this library. Note: Currently we are checking this tool for TCmalloc only so you can skip the libunwind installation, as its not required for TCmalloc library.

Contents

Setup

On 64 bit machines google-perftools requires libunwind to be installed before installing google-perftools. These instructions will install these libraries in you $HOME directory.

libunwind

Download the libunwind version 0.99 from here. Unpack the tar and go to the directory of libunwind.

Configure the libunwind as following:

 $ ./configure --prefix=$HOME

After successful configuration, compile and install libunwind with following commands:

 $ make
 $ make install

On successfully compilation and installation, you can find libunwind.a in $HOME/lib directory.

Google-Perftools

Download the google-perftools from here. Untar the package and check the README and INSTALL files first that you do understand the use of this library.

Go to the directory where you untar the package and configure it by following command:

 $ ./configure --prefix=$HOME --enable-minimal

Here we are using '--enable-minimal' option to compile only TCmalloc of google-perftools. To use all other tools, do not use this flag.

On successful configuration it will generate Makefile. Compile, check and install this tool using following commands:

 $ make
 $ make check
 $ make install

Library Path setup

To make sure that you library is visible to all programs when they run, add LD_LIBRARY_PATH environment variable. To do this add following line to your .bashrc file:

 export LD_LIBRARY_PATH=$HOME/lib

After adding above line, source your bashrc file using following command:

 $ . $HOME/.bashrc


Marss with Google-Perftool TCmalloc

Now recompile the Marss with 'gpref' option as shown below:

 $ scons -Q gperf=$HOME/lib

The option is the location where the google-perftool library is installed. After successful compilation, Marss will use google-perftool's TCmalloc for the 'malloc' and 'new' functions.

Personal tools