Index: src/log.cc |
diff --git a/src/log.cc b/src/log.cc |
index 0474ce0c5ad7e996e797aec02da2c3b29111eb5d..298ef6eea70e3c2533ff928833602cfa6fa0f124 100644 |
--- a/src/log.cc |
+++ b/src/log.cc |
@@ -1878,7 +1878,11 @@ bool Logger::Setup() { |
Sampler* Logger::sampler() { |
+#ifdef ENABLE_LOGGING_AND_PROFILING |
return ticker_; |
+#else |
+ return NULL; |
+#endif |
} |
@@ -1955,8 +1959,10 @@ bool SamplerRegistry::IterateActiveSamplers(VisitSampler func, void* param) { |
static void ComputeCpuProfiling(Sampler* sampler, void* flag_ptr) { |
+#ifdef ENABLE_LOGGING_AND_PROFILING |
bool* flag = reinterpret_cast<bool*>(flag_ptr); |
*flag |= sampler->IsProfiling(); |
+#endif |
} |