diff options
Diffstat (limited to 'src/core/lib/surface/alarm.cc')
-rw-r--r-- | src/core/lib/surface/alarm.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/lib/surface/alarm.cc b/src/core/lib/surface/alarm.cc index 16a16bfd93..6bab0be849 100644 --- a/src/core/lib/surface/alarm.cc +++ b/src/core/lib/surface/alarm.cc @@ -28,8 +28,7 @@ #include "src/core/lib/surface/completion_queue.h" #ifndef NDEBUG -grpc_tracer_flag grpc_trace_alarm_refcount = - GRPC_TRACER_INITIALIZER(false, "alarm_refcount"); +grpc_core::Tracer grpc_trace_alarm_refcount(false, "alarm_refcount"); #endif struct grpc_alarm { @@ -59,7 +58,7 @@ static void alarm_unref(grpc_alarm *alarm) { #ifndef NDEBUG static void alarm_ref_dbg(grpc_alarm *alarm, const char *reason, const char *file, int line) { - if (GRPC_TRACER_ON(grpc_trace_alarm_refcount)) { + if (grpc_trace_alarm_refcount.enabled()) { gpr_atm val = gpr_atm_no_barrier_load(&alarm->refs.count); gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "Alarm:%p ref %" PRIdPTR " -> %" PRIdPTR " %s", alarm, val, @@ -71,7 +70,7 @@ static void alarm_ref_dbg(grpc_alarm *alarm, const char *reason, static void alarm_unref_dbg(grpc_alarm *alarm, const char *reason, const char *file, int line) { - if (GRPC_TRACER_ON(grpc_trace_alarm_refcount)) { + if (grpc_trace_alarm_refcount.enabled()) { gpr_atm val = gpr_atm_no_barrier_load(&alarm->refs.count); gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "Alarm:%p Unref %" PRIdPTR " -> %" PRIdPTR " %s", alarm, val, @@ -103,7 +102,7 @@ grpc_alarm *grpc_alarm_create(void *reserved) { grpc_alarm *alarm = (grpc_alarm *)gpr_malloc(sizeof(grpc_alarm)); #ifndef NDEBUG - if (GRPC_TRACER_ON(grpc_trace_alarm_refcount)) { + if (grpc_trace_alarm_refcount.enabled()) { gpr_log(GPR_DEBUG, "Alarm:%p created (ref: 1)", alarm); } #endif |