Skip to content
This repository was archived by the owner on Mar 24, 2022. It is now read-only.

Profiling Quickstep

Jignesh Patel edited this page Feb 15, 2016 · 1 revision

Steps to install gperftools and using it -

A) Source code change:

  1. Copy commented lines from https://github.com/UWQuickstep/quickstep/blob/numa-aware-execution/cli/QuickstepCli.cpp to cli/QuickstepCli.cpp and uncomment them:

#include <gperftools/profiler.h>

std::size_t query_num = 0;

  if (!query_num) {
    std::string name(HERE_WRITE_YOUR_LOG_NAME);
    cout << "Writing to " << name << '\n';
    ProfilerStart(name.c_str());
  }
  ++query_num;

B) Library requirements and installation

  1. Download libunwind (configure --prefix=.., make, make install)

  2. Go to the quickstep/third_party/gperftools. Install gperftools (configure --prefix=.., make, make install) Provide flags - CC=(gcc compiler path), CXX=(g++ compiler path), CFLAGS=(-I..path to libunwind/include), CXXFLAGS=(-I..path to libunwind/include), LDFLAGS=(-L..path to libunwind/lib), configure --prefix=.., make, make install

  3. Add the gperftools to CMakeLists.txt link_directories(path to gperftools setup's lib directory) set(LIBS ${LIBS} profiler)

Installation is complete. Using gperftools

env CPUPROFILE=path_to_a.prof_file quickstep_cli_shell_with_profiling

//ENV HERE MIGHT BE UNNECESSARY SINCE WE ALREADY GAVE THE NAME OF LOG FILE IN THE CODE

Clone this wiki locally