From f2aaead7ce18dcd01dd13e9c15d4e60846568f08 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Tue, 12 Jul 2016 09:16:34 -0800 Subject: Bug fix: initialize WorkerCacheLogger::want_logging_count_ to 0. Without this, collection of detailed execution timing information would default to being on all the time quite often, resulting in significant performance and memory allocation overhead. Reduces number of allocations for one benchmark from 120M to 101M. Co-discovered by sanjay@ and myself. Change: 127212900 --- tensorflow/core/distributed_runtime/worker_cache_logger.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorflow/core/distributed_runtime/worker_cache_logger.h b/tensorflow/core/distributed_runtime/worker_cache_logger.h index aed7047203..a92590a176 100644 --- a/tensorflow/core/distributed_runtime/worker_cache_logger.h +++ b/tensorflow/core/distributed_runtime/worker_cache_logger.h @@ -62,7 +62,7 @@ class WorkerCacheLogger { private: mutex count_mu_; - int32 want_logging_count_ GUARDED_BY(count_mu_); + int32 want_logging_count_ GUARDED_BY(count_mu_) = 0; struct StepLog { StepStats step_stats; -- cgit v1.2.3