From f6086b31f050786b0eb2178f8bf33cccd0d408e3 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 12 Oct 2017 22:25:10 -0700 Subject: annotate call combiner --- src/core/lib/iomgr/call_combiner.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/core') diff --git a/src/core/lib/iomgr/call_combiner.cc b/src/core/lib/iomgr/call_combiner.cc index 0ba32a1e46..d45719608b 100644 --- a/src/core/lib/iomgr/call_combiner.cc +++ b/src/core/lib/iomgr/call_combiner.cc @@ -22,6 +22,7 @@ #include #include "src/core/lib/debug/stats.h" +#include "src/core/lib/profiling/timers.h" grpc_tracer_flag grpc_call_combiner_trace = GRPC_TRACER_INITIALIZER(false, "call_combiner"); @@ -61,6 +62,7 @@ void grpc_call_combiner_start(grpc_exec_ctx* exec_ctx, grpc_closure* closure, grpc_error* error DEBUG_ARGS, const char* reason) { + GPR_TIMER_BEGIN("call_combiner_start", 0); if (GRPC_TRACER_ON(grpc_call_combiner_trace)) { gpr_log(GPR_DEBUG, "==> grpc_call_combiner_start() [%p] closure=%p [" DEBUG_FMT_STR @@ -77,6 +79,7 @@ void grpc_call_combiner_start(grpc_exec_ctx* exec_ctx, GRPC_STATS_INC_CALL_COMBINER_LOCKS_SCHEDULED_ITEMS(exec_ctx); if (prev_size == 0) { GRPC_STATS_INC_CALL_COMBINER_LOCKS_INITIATED(exec_ctx); + GPR_TIMER_MARK("call_combiner_initiate", 0); if (GRPC_TRACER_ON(grpc_call_combiner_trace)) { gpr_log(GPR_DEBUG, " EXECUTING IMMEDIATELY"); } @@ -90,11 +93,13 @@ void grpc_call_combiner_start(grpc_exec_ctx* exec_ctx, closure->error_data.error = error; gpr_mpscq_push(&call_combiner->queue, (gpr_mpscq_node*)closure); } + GPR_TIMER_END("call_combiner_start", 0); } void grpc_call_combiner_stop(grpc_exec_ctx* exec_ctx, grpc_call_combiner* call_combiner DEBUG_ARGS, const char* reason) { + GPR_TIMER_BEGIN("call_combiner_stop", 0); if (GRPC_TRACER_ON(grpc_call_combiner_trace)) { gpr_log(GPR_DEBUG, "==> grpc_call_combiner_stop() [%p] [" DEBUG_FMT_STR "%s]", @@ -133,6 +138,7 @@ void grpc_call_combiner_stop(grpc_exec_ctx* exec_ctx, } else if (GRPC_TRACER_ON(grpc_call_combiner_trace)) { gpr_log(GPR_DEBUG, " queue empty"); } + GPR_TIMER_END("call_combiner_stop", 0); } void grpc_call_combiner_set_notify_on_cancel(grpc_exec_ctx* exec_ctx, -- cgit v1.2.3 From f058915a86250af9843ec4cb21cdee69af82e351 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Fri, 13 Oct 2017 09:55:27 -0700 Subject: include port_platform.h for bdp estimator --- src/core/lib/transport/bdp_estimator.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/core') diff --git a/src/core/lib/transport/bdp_estimator.h b/src/core/lib/transport/bdp_estimator.h index 60b9fba083..6447f2d62c 100644 --- a/src/core/lib/transport/bdp_estimator.h +++ b/src/core/lib/transport/bdp_estimator.h @@ -19,6 +19,8 @@ #ifndef GRPC_CORE_LIB_TRANSPORT_BDP_ESTIMATOR_H #define GRPC_CORE_LIB_TRANSPORT_BDP_ESTIMATOR_H +#include + #include #include #include -- cgit v1.2.3