pull/16904/head
Noah Eisen 6 years ago
parent 0a61b6f1cc
commit 8c1670d547
  1. 8
      src/core/lib/channel/channel_trace.cc

@ -108,16 +108,20 @@ void ChannelTrace::AddTraceEventHelper(TraceEvent* new_trace_event) {
}
void ChannelTrace::AddTraceEvent(Severity severity, grpc_slice data) {
if (max_event_memory_ == 0)
if (max_event_memory_ == 0) {
grpc_slice_unref_internal(data);
return; // tracing is disabled if max_event_memory_ == 0
}
AddTraceEventHelper(New<TraceEvent>(severity, data));
}
void ChannelTrace::AddTraceEventWithReference(
Severity severity, grpc_slice data,
RefCountedPtr<BaseNode> referenced_entity) {
if (max_event_memory_ == 0)
if (max_event_memory_ == 0) {
grpc_slice_unref_internal(data);
return; // tracing is disabled if max_event_memory_ == 0
}
// create and fill up the new event
AddTraceEventHelper(
New<TraceEvent>(severity, data, std::move(referenced_entity)));

Loading…
Cancel
Save