-
Notifications
You must be signed in to change notification settings - Fork 13
Profiling Quickstep
Steps to install gperftools and using it -
A) Source code change:
- 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
-
Download libunwind (configure --prefix=.., make, make install)
-
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
-
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