Merge pull request #6379 from y-zeng/debug-logging-fix

debug logging fix
pull/6461/head
Yuchen Zeng 9 years ago
commit 900ed58732
  1. 6
      src/core/ext/lb_policy/round_robin/round_robin.c
  2. 3
      src/core/ext/transport/chttp2/transport/chttp2_transport.c
  3. 6
      src/core/ext/transport/chttp2/transport/hpack_encoder.c
  4. 4
      src/core/ext/transport/chttp2/transport/hpack_table.c

@ -306,8 +306,10 @@ static void start_picking(grpc_exec_ctx *exec_ctx, round_robin_lb_policy *p) {
size_t i;
p->started_picking = 1;
gpr_log(GPR_DEBUG, "LB_POLICY: p=%p num_subchannels=%d", p,
p->num_subchannels);
if (grpc_lb_round_robin_trace) {
gpr_log(GPR_DEBUG, "LB_POLICY: p=%p num_subchannels=%d", p,
p->num_subchannels);
}
for (i = 0; i < p->num_subchannels; i++) {
subchannel_data *sd = p->subchannels[i];

@ -783,7 +783,8 @@ void grpc_chttp2_add_incoming_goaway(
grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *transport_global,
uint32_t goaway_error, gpr_slice goaway_text) {
char *msg = gpr_dump_slice(goaway_text, GPR_DUMP_HEX | GPR_DUMP_ASCII);
gpr_log(GPR_DEBUG, "got goaway [%d]: %s", goaway_error, msg);
GRPC_CHTTP2_IF_TRACING(
gpr_log(GPR_DEBUG, "got goaway [%d]: %s", goaway_error, msg));
gpr_free(msg);
gpr_slice_unref(goaway_text);
transport_global->seen_goaway = 1;

@ -63,6 +63,8 @@
/* don't consider adding anything bigger than this to the hpack table */
#define MAX_DECODER_SPACE_USAGE 512
extern int grpc_http_trace;
typedef struct {
int is_first_frame;
/* number of bytes in 'output' when we started the frame - used to calculate
@ -532,7 +534,9 @@ void grpc_chttp2_hpack_compressor_set_max_table_size(
}
}
c->advertise_table_size_change = 1;
gpr_log(GPR_DEBUG, "set max table size from encoder to %d", max_table_size);
if (grpc_http_trace) {
gpr_log(GPR_DEBUG, "set max table size from encoder to %d", max_table_size);
}
}
void grpc_chttp2_encode_header(grpc_chttp2_hpack_compressor *c,

@ -253,7 +253,9 @@ void grpc_chttp2_hptbl_set_max_bytes(grpc_chttp2_hptbl *tbl,
if (tbl->max_bytes == max_bytes) {
return;
}
gpr_log(GPR_DEBUG, "Update hpack parser max size to %d", max_bytes);
if (grpc_http_trace) {
gpr_log(GPR_DEBUG, "Update hpack parser max size to %d", max_bytes);
}
while (tbl->mem_used > max_bytes) {
evict1(tbl);
}

Loading…
Cancel
Save