| 72 | } |
| 73 | |
| 74 | Status MemoryProfiler::SetProfiling(bool enabled) { |
| 75 | #ifdef ENABLE_JEMALLOC |
| 76 | if (auto s = CheckIfProfilingEnabled(); !s.IsOK()) { |
| 77 | return s; |
| 78 | } |
| 79 | return SetJemallocOption("prof.active", enabled); |
| 80 | #else |
| 81 | (void)enabled; |
| 82 | return {Status::NotOK, errProfilingUnsupported}; |
| 83 | #endif |
| 84 | } |
| 85 | |
| 86 | StatusOr<bool> MemoryProfiler::GetProfilingStatus() { |
| 87 | #ifdef ENABLE_JEMALLOC |
no test coverage detected