This source file includes following definitions.
- Stop
- IsProfiling
- Restart
#include "base/allocator/type_profiler_control.h"
namespace base {
namespace type_profiler {
namespace {
#if defined(TYPE_PROFILING)
const bool kTypeProfilingEnabled = true;
#else
const bool kTypeProfilingEnabled = false;
#endif
bool g_enable_intercept = kTypeProfilingEnabled;
}
void Controller::Stop() {
g_enable_intercept = false;
}
bool Controller::IsProfiling() {
return kTypeProfilingEnabled && g_enable_intercept;
}
void Controller::Restart() {
g_enable_intercept = kTypeProfilingEnabled;
}
}
}