Welcome to mirror list, hosted at ThFree Co, Russian Federation.

pprof.cpp « base - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c33058cef1804b09cea754586a5cb79a30d7b5ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include "base/pprof.hpp"

#include "base/assert.hpp"

#if defined(USE_PPROF)
#include <gperftools/profiler.h>
#endif

namespace base
{
PProf::PProf(std::string const & path)
{
#if defined(USE_PPROF)
  ProfilerStart(path.c_str());
#endif
}

PProf::~PProf()
{
  CHECK(m_checker.CalledOnOriginalThread(), ());

#if defined(USE_PPROF)
  ProfilerStop();
#endif
}
}  // namespace base