diff options
author | 2018-12-10 12:14:24 -0800 | |
---|---|---|
committer | 2018-12-10 12:14:24 -0800 | |
commit | ef7d45d2ab2679ecd1ed08f6ce897063a4f783da (patch) | |
tree | c49e0e5fbab4b6b856f31d6d2956a99876a2d840 /src/core/lib/iomgr/timer_manager.cc | |
parent | 5ebbba543c5be26412eb5ba9493ee242eee2e0ac (diff) |
Add next_value and start_time
Diffstat (limited to 'src/core/lib/iomgr/timer_manager.cc')
-rw-r--r-- | src/core/lib/iomgr/timer_manager.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/lib/iomgr/timer_manager.cc b/src/core/lib/iomgr/timer_manager.cc index ceba79f678..143a96c9bc 100644 --- a/src/core/lib/iomgr/timer_manager.cc +++ b/src/core/lib/iomgr/timer_manager.cc @@ -67,6 +67,7 @@ static void timer_thread(void* completed_thread_ptr); extern int64_t g_timer_manager_init_count; extern int64_t g_timer_manager_shutdown_count; extern int64_t g_fork_count; +extern int64_t g_next_value; #endif // GRPC_DEBUG_TIMER_MANAGER static void gc_completed_threads(void) { @@ -193,6 +194,11 @@ static bool wait_until(grpc_millis next) { gpr_log(GPR_INFO, "sleep until kicked"); } + // For debug of the timer manager crash only. + // TODO (mxyan): remove after bug is fixed. +#ifdef GRPC_DEBUG_TIMER_MANAGER + g_next_value = next; +#endif gpr_cv_wait(&g_cv_wait, &g_mu, grpc_millis_to_timespec(next, GPR_CLOCK_MONOTONIC)); |