aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar ncteisen <ncteisen@gmail.com>2018-03-15 13:54:04 -1000
committerGravatar ncteisen <ncteisen@gmail.com>2018-03-15 13:54:04 -1000
commit78e532a6e584b4b45cd229526d60482f1fa73a06 (patch)
tree09d71ccd3a1f81adf150373d3773f7cf62bbe9f0 /src
parentb93a006d64f071ad0804b00f9b1064411a430092 (diff)
Reviewer comments
Diffstat (limited to 'src')
-rw-r--r--src/core/ext/filters/client_channel/subchannel.cc1
-rw-r--r--src/core/lib/channel/channel_trace.cc6
-rw-r--r--src/core/lib/channel/channel_trace.h9
3 files changed, 12 insertions, 4 deletions
diff --git a/src/core/ext/filters/client_channel/subchannel.cc b/src/core/ext/filters/client_channel/subchannel.cc
index 4c77c8602a..d7815fb7e1 100644
--- a/src/core/ext/filters/client_channel/subchannel.cc
+++ b/src/core/ext/filters/client_channel/subchannel.cc
@@ -35,6 +35,7 @@
#include "src/core/ext/filters/client_channel/subchannel_index.h"
#include "src/core/ext/filters/client_channel/uri_parser.h"
#include "src/core/lib/backoff/backoff.h"
+#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/connected_channel.h"
#include "src/core/lib/debug/stats.h"
#include "src/core/lib/gprpp/debug_location.h"
diff --git a/src/core/lib/channel/channel_trace.cc b/src/core/lib/channel/channel_trace.cc
index 6d85db936d..3c374719e9 100644
--- a/src/core/lib/channel/channel_trace.cc
+++ b/src/core/lib/channel/channel_trace.cc
@@ -152,10 +152,10 @@ char* fmt_time(gpr_timespec tm) {
for (int i = 7; i >= 1; i -= 3) {
if (ns_buffer[i] == '0' && ns_buffer[i + 1] == '0' &&
ns_buffer[i + 2] == '0') {
- ns_buffer[i] = 0;
- // Specially case in which all fractional digits were 0.
+ ns_buffer[i] = '\0';
+ // Edge case in which all fractional digits were 0.
if (i == 1) {
- ns_buffer[0] = 0;
+ ns_buffer[0] = '\0';
}
} else {
break;
diff --git a/src/core/lib/channel/channel_trace.h b/src/core/lib/channel/channel_trace.h
index 7243096617..1df1e585f2 100644
--- a/src/core/lib/channel/channel_trace.h
+++ b/src/core/lib/channel/channel_trace.h
@@ -48,15 +48,22 @@ class ChannelTrace : public RefCounted<ChannelTrace> {
};
// Adds a new trace event to the tracing object
+ //
+ // TODO(ncteisen): as this call is used more and more throughout the gRPC
+ // stack, determine if it makes more sense to accept a char* instead of a
+ // slice.
void AddTraceEvent(Severity severity, grpc_slice data);
// Adds a new trace event to the tracing object. This trace event refers to a
// an event on a child of the channel. For example, if this channel has
// created a new subchannel, then it would record that with a TraceEvent
// referencing the new subchannel.
-
+ //
// TODO(ncteisen): Once channelz is implemented, the events should reference
// the overall channelz object, not just the ChannelTrace object.
+ // TODO(ncteisen): as this call is used more and more throughout the gRPC
+ // stack, determine if it makes more sense to accept a char* instead of a
+ // slice.
void AddTraceEventReferencingChannel(
Severity severity, grpc_slice data,
RefCountedPtr<ChannelTrace> referenced_tracer);