From 1c8698758d79a3d9c20382cd11ed1db1f14463ef Mon Sep 17 00:00:00 2001 From: ncteisen Date: Mon, 1 May 2017 11:37:23 -0700 Subject: [PATCH 01/62] Set frame size to B/us --- .../chttp2/transport/chttp2_transport.c | 40 +++++++++++++------ src/core/lib/transport/bdp_estimator.c | 5 +++ src/core/lib/transport/bdp_estimator.h | 2 + .../microbenchmarks/bm_fullstack_trickle.cc | 5 ++- 4 files changed, 39 insertions(+), 13 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 30738080ee7..8ed34301e67 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -2139,15 +2139,8 @@ static void end_all_the_calls(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, static void update_bdp(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, double bdp_dbl) { - int32_t bdp; - const int32_t kMinBDP = 128; - if (bdp_dbl <= kMinBDP) { - bdp = kMinBDP; - } else if (bdp_dbl > INT32_MAX) { - bdp = INT32_MAX; - } else { - bdp = (int32_t)(bdp_dbl); - } + // initial window size bounded [1,2^31-1], but we set the min to 128. + int32_t bdp = GPR_CLAMP((int32_t)bdp_dbl, 128, INT32_MAX); int64_t delta = (int64_t)bdp - (int64_t)t->settings[GRPC_LOCAL_SETTINGS] @@ -2159,9 +2152,27 @@ static void update_bdp(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, gpr_log(GPR_DEBUG, "%s: update initial window size to %d", t->peer_string, (int)bdp); } - push_setting(exec_ctx, t, GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE, - (uint32_t)bdp); - push_setting(exec_ctx, t, GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE, (uint32_t)bdp); + push_setting(exec_ctx, t, GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE, (uint32_t)bdp); +} + +// TODO(ncteisen): combine this logic with above func +static void update_frame(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, + double bw_dbl) { + int32_t target = (int32_t)bw_dbl / 1000000; + // frame size is bounded [2^14,2^24-1] + int32_t frame_size = GPR_CLAMP(target, 16384, 16777215); + int64_t delta = (int64_t)frame_size - + (int64_t)t->settings[GRPC_LOCAL_SETTINGS] + [GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE]; +// gpr_log(GPR_DEBUG, "delta: %lld, frame_size %u, low: %d, high: %d", delta, frame_size, (uint32_t)(-frame_size / 10), (uint32_t)(frame_size / 10)); + if (delta == 0 || (delta > -frame_size / 10 && delta < frame_size / 10)) { + return; + } + if (grpc_bdp_estimator_trace) { + gpr_log(GPR_DEBUG, "%s: update max_frame size to %d", t->peer_string, + (int)frame_size); + } + push_setting(exec_ctx, t, GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE, (uint32_t)frame_size); } static grpc_error *try_http_parsing(grpc_exec_ctx *exec_ctx, @@ -2300,6 +2311,11 @@ static void read_action_locked(grpc_exec_ctx *exec_ctx, void *tp, update_bdp(exec_ctx, t, pow(2, log2_bdp_guess)); t->last_pid_update = now; } + + double bw = -1; + if (grpc_bdp_estimator_get_bw(&t->bdp_estimator, &bw)) { + update_frame(exec_ctx, t, bw); + } } GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "keep_reading"); } else { diff --git a/src/core/lib/transport/bdp_estimator.c b/src/core/lib/transport/bdp_estimator.c index 536694214e2..ad89dee51a1 100644 --- a/src/core/lib/transport/bdp_estimator.c +++ b/src/core/lib/transport/bdp_estimator.c @@ -53,6 +53,11 @@ bool grpc_bdp_estimator_get_estimate(grpc_bdp_estimator *estimator, return true; } +bool grpc_bdp_estimator_get_bw(grpc_bdp_estimator *estimator, double *bw) { + *bw = estimator->bw_est; + return true; +} + bool grpc_bdp_estimator_add_incoming_bytes(grpc_bdp_estimator *estimator, int64_t num_bytes) { estimator->accumulator += num_bytes; diff --git a/src/core/lib/transport/bdp_estimator.h b/src/core/lib/transport/bdp_estimator.h index 752bee1abda..d1de398acc6 100644 --- a/src/core/lib/transport/bdp_estimator.h +++ b/src/core/lib/transport/bdp_estimator.h @@ -63,6 +63,8 @@ void grpc_bdp_estimator_init(grpc_bdp_estimator *estimator, const char *name); // Returns true if a reasonable estimate could be obtained bool grpc_bdp_estimator_get_estimate(grpc_bdp_estimator *estimator, int64_t *estimate); +// Returns true if a reasonable estimate could be obtained +bool grpc_bdp_estimator_get_bw(grpc_bdp_estimator *estimator, double *bw); // Returns true if the user should schedule a ping bool grpc_bdp_estimator_add_incoming_bytes(grpc_bdp_estimator *estimator, int64_t num_bytes); diff --git a/test/cpp/microbenchmarks/bm_fullstack_trickle.cc b/test/cpp/microbenchmarks/bm_fullstack_trickle.cc index fc99b06dbb2..01d2023fa63 100644 --- a/test/cpp/microbenchmarks/bm_fullstack_trickle.cc +++ b/test/cpp/microbenchmarks/bm_fullstack_trickle.cc @@ -100,6 +100,8 @@ class TrickledCHTTP2 : public EndpointPairFixture { } void AddToLabel(std::ostream& out, benchmark::State& state) { + grpc_chttp2_transport* client = + reinterpret_cast(client_transport_); out << " writes/iter:" << ((double)stats_.num_writes / (double)state.iterations()) << " cli_transport_stalls/iter:" @@ -115,7 +117,8 @@ class TrickledCHTTP2 : public EndpointPairFixture { (double)state.iterations()) << " svr_stream_stalls/iter:" << ((double)server_stats_.streams_stalled_due_to_stream_flow_control / - (double)state.iterations()); + (double)state.iterations()) + << " cli_bw_est:" << (double)client->bdp_estimator.bw_est; } void Log(int64_t iteration) { From 2a7cf878d2e42791ec76b8fd2bca2d385a7636ec Mon Sep 17 00:00:00 2001 From: ncteisen Date: Tue, 2 May 2017 14:59:39 -0700 Subject: [PATCH 02/62] Set frame size to max(bdp, bw in ms) --- .../transport/chttp2/transport/chttp2_transport.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 8ed34301e67..1278fb42a36 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -2155,16 +2155,15 @@ static void update_bdp(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, push_setting(exec_ctx, t, GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE, (uint32_t)bdp); } -// TODO(ncteisen): combine this logic with above func static void update_frame(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, - double bw_dbl) { - int32_t target = (int32_t)bw_dbl / 1000000; + double bw_dbl, double bdp_dbl) { + int32_t bdp = GPR_CLAMP((int32_t)bdp_dbl, 128, INT32_MAX); + int32_t target = GPR_MAX((int32_t)bw_dbl / 1000, bdp); // frame size is bounded [2^14,2^24-1] int32_t frame_size = GPR_CLAMP(target, 16384, 16777215); int64_t delta = (int64_t)frame_size - (int64_t)t->settings[GRPC_LOCAL_SETTINGS] [GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE]; -// gpr_log(GPR_DEBUG, "delta: %lld, frame_size %u, low: %d, high: %d", delta, frame_size, (uint32_t)(-frame_size / 10), (uint32_t)(frame_size / 10)); if (delta == 0 || (delta > -frame_size / 10 && delta < frame_size / 10)) { return; } @@ -2291,6 +2290,7 @@ static void read_action_locked(grpc_exec_ctx *exec_ctx, void *tp, } int64_t estimate = -1; + double bdp_guess = -1; if (grpc_bdp_estimator_get_estimate(&t->bdp_estimator, &estimate)) { double target = 1 + log2((double)estimate); double memory_pressure = grpc_resource_quota_get_memory_pressure( @@ -2308,13 +2308,14 @@ static void read_action_locked(grpc_exec_ctx *exec_ctx, void *tp, } double log2_bdp_guess = grpc_pid_controller_update(&t->pid_controller, bdp_error, dt); - update_bdp(exec_ctx, t, pow(2, log2_bdp_guess)); + bdp_guess = pow(2, log2_bdp_guess); + update_bdp(exec_ctx, t, bdp_guess); t->last_pid_update = now; } double bw = -1; if (grpc_bdp_estimator_get_bw(&t->bdp_estimator, &bw)) { - update_frame(exec_ctx, t, bw); + update_frame(exec_ctx, t, bw, bdp_guess); } } GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "keep_reading"); From 8450876c76f155c2970e0f6e08affb9d336580fd Mon Sep 17 00:00:00 2001 From: ncteisen Date: Mon, 8 May 2017 18:09:05 -0700 Subject: [PATCH 03/62] clang --- src/core/ext/transport/chttp2/transport/chttp2_transport.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 1278fb42a36..49e80aaee93 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -2152,7 +2152,8 @@ static void update_bdp(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, gpr_log(GPR_DEBUG, "%s: update initial window size to %d", t->peer_string, (int)bdp); } - push_setting(exec_ctx, t, GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE, (uint32_t)bdp); + push_setting(exec_ctx, t, GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE, + (uint32_t)bdp); } static void update_frame(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, @@ -2171,7 +2172,8 @@ static void update_frame(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, gpr_log(GPR_DEBUG, "%s: update max_frame size to %d", t->peer_string, (int)frame_size); } - push_setting(exec_ctx, t, GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE, (uint32_t)frame_size); + push_setting(exec_ctx, t, GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE, + (uint32_t)frame_size); } static grpc_error *try_http_parsing(grpc_exec_ctx *exec_ctx, From 716c7c52ba5da2b34241bf893496575a99c1c2f2 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Tue, 9 May 2017 13:04:41 -0700 Subject: [PATCH 04/62] Added a binary trailer test This test validates that ObjC client can receive binary data sent via grpc trailer. --- src/objective-c/tests/GRPCClientTests.m | 29 +++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/objective-c/tests/GRPCClientTests.m b/src/objective-c/tests/GRPCClientTests.m index e36f5c3ee93..deaaf17b07e 100644 --- a/src/objective-c/tests/GRPCClientTests.m +++ b/src/objective-c/tests/GRPCClientTests.m @@ -293,6 +293,35 @@ static GRPCProtoMethod *kUnaryCallMethod; [self waitForExpectationsWithTimeout:TEST_TIMEOUT handler:nil]; } +- (void)testTrailers { + __weak XCTestExpectation *response = [self expectationWithDescription:@"Empty response received."]; + __weak XCTestExpectation *completion = [self expectationWithDescription:@"Empty RPC completed."]; + + GRPCCall *call = [[GRPCCall alloc] initWithHost:kHostAddress + path:kEmptyCallMethod.HTTPPath + requestsWriter:[GRXWriter writerWithValue:[NSData data]]]; + // Setting this special key in the header will cause the interop server to echo back the + // trailer data. + const unsigned char raw_bytes[] = {1,2,3,4}; + NSData *trailer_data = [NSData dataWithBytes:raw_bytes length:sizeof(raw_bytes)]; + call.requestHeaders[@"x-grpc-test-echo-trailing-bin"] = trailer_data; + + id responsesWriteable = [[GRXWriteable alloc] initWithValueHandler:^(NSData *value) { + XCTAssertNotNil(value, @"nil value received as response."); + XCTAssertEqual([value length], 0, @"Non-empty response received: %@", value); + [response fulfill]; + } completionHandler:^(NSError *errorOrNil) { + XCTAssertNil(errorOrNil, @"Finished with unexpected error: %@", errorOrNil); + XCTAssertEqualObjects((NSData *)call.responseTrailers[@"x-grpc-test-echo-trailing-bin"], + trailer_data, + @"Did not receive expected trailer"); + [completion fulfill]; + }]; + + [call startWithWriteable:responsesWriteable]; + [self waitForExpectationsWithTimeout:TEST_TIMEOUT handler:nil]; +} + // TODO(makarandd): Move to a different file that contains only unit tests - (void)testExceptions { // Try to set parameters to nil for GRPCCall. This should cause an exception From e1cc4285b62c57ad1204840ab0e74cdfea4a92a1 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 11 May 2017 13:24:00 -0700 Subject: [PATCH 05/62] Blanket suppress protobuf from ubsan runs --- tools/ubsan_suppressions.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/ubsan_suppressions.txt b/tools/ubsan_suppressions.txt index f87ed185654..3384efcac9b 100644 --- a/tools/ubsan_suppressions.txt +++ b/tools/ubsan_suppressions.txt @@ -4,6 +4,5 @@ nonnull-attribute:CBB_add_bytes nonnull-attribute:rsa_blinding_get nonnull-attribute:ssl_copy_key_material alignment:CRYPTO_cbc128_encrypt -nonnull-attribute:google::protobuf::DescriptorBuilder::BuildFileImpl -nonnull-attribute:google::protobuf::TextFormat::Printer::TextGenerator::Write - +nonnull-attribute:google::protobuf::* +alignment:google::protobuf::* From 61f86d9bd795a65d94df72a47fbd313d9084d8e7 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 11 May 2017 13:36:42 -0700 Subject: [PATCH 06/62] C++ compatibility fixes --- src/core/lib/support/cmdline.c | 6 +++--- src/core/lib/support/histogram.c | 4 ++-- src/core/lib/support/host_port.c | 2 +- src/core/lib/support/string.c | 24 ++++++++++++------------ src/core/lib/support/string_posix.c | 2 +- src/core/lib/support/subprocess_posix.c | 4 ++-- src/core/lib/support/thd_posix.c | 2 +- 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/core/lib/support/cmdline.c b/src/core/lib/support/cmdline.c index 88a65a8e2e1..e5c9f3b84bd 100644 --- a/src/core/lib/support/cmdline.c +++ b/src/core/lib/support/cmdline.c @@ -71,7 +71,7 @@ struct gpr_cmdline { static int normal_state(gpr_cmdline *cl, char *arg); gpr_cmdline *gpr_cmdline_create(const char *description) { - gpr_cmdline *cl = gpr_zalloc(sizeof(gpr_cmdline)); + gpr_cmdline *cl = (gpr_cmdline *)gpr_zalloc(sizeof(gpr_cmdline)); cl->description = description; cl->state = normal_state; @@ -100,7 +100,7 @@ static void add_arg(gpr_cmdline *cl, const char *name, const char *help, GPR_ASSERT(0 != strcmp(a->name, name)); } - a = gpr_zalloc(sizeof(arg)); + a = (arg *)gpr_zalloc(sizeof(arg)); a->name = name; a->help = help; a->type = type; @@ -302,7 +302,7 @@ static int normal_state(gpr_cmdline *cl, char *str) { eq = strchr(str, '='); if (eq != NULL) { /* copy the string into a temp buffer and extract the name */ - tmp = arg_name = gpr_malloc((size_t)(eq - str + 1)); + tmp = arg_name = (char *)gpr_malloc((size_t)(eq - str + 1)); memcpy(arg_name, str, (size_t)(eq - str)); arg_name[eq - str] = 0; } else { diff --git a/src/core/lib/support/histogram.c b/src/core/lib/support/histogram.c index ba8176bb057..c88695409dc 100644 --- a/src/core/lib/support/histogram.c +++ b/src/core/lib/support/histogram.c @@ -88,7 +88,7 @@ static double bucket_start(gpr_histogram *h, double x) { gpr_histogram *gpr_histogram_create(double resolution, double max_bucket_start) { - gpr_histogram *h = gpr_malloc(sizeof(gpr_histogram)); + gpr_histogram *h = (gpr_histogram *)gpr_malloc(sizeof(gpr_histogram)); GPR_ASSERT(resolution > 0.0); GPR_ASSERT(max_bucket_start > resolution); h->sum = 0.0; @@ -102,7 +102,7 @@ gpr_histogram *gpr_histogram_create(double resolution, h->num_buckets = bucket_for_unchecked(h, max_bucket_start) + 1; GPR_ASSERT(h->num_buckets > 1); GPR_ASSERT(h->num_buckets < 100000000); - h->buckets = gpr_zalloc(sizeof(uint32_t) * h->num_buckets); + h->buckets = (uint32_t *)gpr_zalloc(sizeof(uint32_t) * h->num_buckets); return h; } diff --git a/src/core/lib/support/host_port.c b/src/core/lib/support/host_port.c index f19bdbc8357..bbd42c26e08 100644 --- a/src/core/lib/support/host_port.c +++ b/src/core/lib/support/host_port.c @@ -98,7 +98,7 @@ int gpr_split_host_port(const char *name, char **host, char **port) { } /* Allocate return values. */ - *host = gpr_malloc(host_len + 1); + *host = (char *)gpr_malloc(host_len + 1); memcpy(*host, host_start, host_len); (*host)[host_len] = '\0'; diff --git a/src/core/lib/support/string.c b/src/core/lib/support/string.c index d20b86f7cf7..11297c9ddb9 100644 --- a/src/core/lib/support/string.c +++ b/src/core/lib/support/string.c @@ -53,7 +53,7 @@ char *gpr_strdup(const char *src) { } len = strlen(src) + 1; - dst = gpr_malloc(len); + dst = (char *)gpr_malloc(len); memcpy(dst, src, len); @@ -74,13 +74,13 @@ static dump_out dump_out_create(void) { static void dump_out_append(dump_out *out, char c) { if (out->length == out->capacity) { out->capacity = GPR_MAX(8, 2 * out->capacity); - out->data = gpr_realloc(out->data, out->capacity); + out->data = (char *)gpr_realloc(out->data, out->capacity); } out->data[out->length++] = c; } static void hexdump(dump_out *out, const char *buf, size_t len) { - static const char hex[16] = "0123456789abcdef"; + static const char *hex = "0123456789abcdef"; const uint8_t *const beg = (const uint8_t *)buf; const uint8_t *const end = beg + len; @@ -124,16 +124,16 @@ char *gpr_dump(const char *buf, size_t len, uint32_t flags) { int gpr_parse_bytes_to_uint32(const char *buf, size_t len, uint32_t *result) { uint32_t out = 0; - uint32_t new; + uint32_t new_val; size_t i; if (len == 0) return 0; /* must have some bytes */ for (i = 0; i < len; i++) { if (buf[i] < '0' || buf[i] > '9') return 0; /* bad char */ - new = 10 * out + (uint32_t)(buf[i] - '0'); - if (new < out) return 0; /* overflow */ - out = new; + new_val = 10 * out + (uint32_t)(buf[i] - '0'); + if (new_val < out) return 0; /* overflow */ + out = new_val; } *result = out; @@ -201,7 +201,7 @@ int gpr_parse_nonnegative_int(const char *value) { char *gpr_leftpad(const char *str, char flag, size_t length) { const size_t str_length = strlen(str); const size_t out_length = str_length > length ? str_length : length; - char *out = gpr_malloc(out_length + 1); + char *out = (char *)gpr_malloc(out_length + 1); memset(out, flag, out_length - str_length); memcpy(out + out_length - str_length, str, str_length); out[out_length] = 0; @@ -225,7 +225,7 @@ char *gpr_strjoin_sep(const char **strs, size_t nstrs, const char *sep, if (nstrs > 0) { out_length += sep_len * (nstrs - 1); /* separators */ } - out = gpr_malloc(out_length); + out = (char *)gpr_malloc(out_length); out_length = 0; for (i = 0; i < nstrs; i++) { const size_t slen = strlen(strs[i]); @@ -256,7 +256,7 @@ void gpr_strvec_destroy(gpr_strvec *sv) { void gpr_strvec_add(gpr_strvec *sv, char *str) { if (sv->count == sv->capacity) { sv->capacity = GPR_MAX(sv->capacity + 8, sv->capacity * 2); - sv->strs = gpr_realloc(sv->strs, sizeof(char *) * sv->capacity); + sv->strs = (char **)gpr_realloc(sv->strs, sizeof(char *) * sv->capacity); } sv->strs[sv->count++] = str; } @@ -278,12 +278,12 @@ int gpr_stricmp(const char *a, const char *b) { static void add_string_to_split(const char *beg, const char *end, char ***strs, size_t *nstrs, size_t *capstrs) { - char *out = gpr_malloc((size_t)(end - beg) + 1); + char *out = (char *)gpr_malloc((size_t)(end - beg) + 1); memcpy(out, beg, (size_t)(end - beg)); out[end - beg] = 0; if (*nstrs == *capstrs) { *capstrs = GPR_MAX(8, 2 * *capstrs); - *strs = gpr_realloc(*strs, sizeof(*strs) * *capstrs); + *strs = (char **)gpr_realloc(*strs, sizeof(*strs) * *capstrs); } (*strs)[*nstrs] = out; ++*nstrs; diff --git a/src/core/lib/support/string_posix.c b/src/core/lib/support/string_posix.c index c804ed5ded6..2438b18d219 100644 --- a/src/core/lib/support/string_posix.c +++ b/src/core/lib/support/string_posix.c @@ -58,7 +58,7 @@ int gpr_asprintf(char **strp, const char *format, ...) { /* Allocate a new buffer, with space for the NUL terminator. */ strp_buflen = (size_t)ret + 1; - if ((*strp = gpr_malloc(strp_buflen)) == NULL) { + if ((*strp = (char *)gpr_malloc(strp_buflen)) == NULL) { /* This shouldn't happen, because gpr_malloc() calls abort(). */ return -1; } diff --git a/src/core/lib/support/subprocess_posix.c b/src/core/lib/support/subprocess_posix.c index ed653b9c2e2..b9d0796b016 100644 --- a/src/core/lib/support/subprocess_posix.c +++ b/src/core/lib/support/subprocess_posix.c @@ -67,7 +67,7 @@ gpr_subprocess *gpr_subprocess_create(int argc, const char **argv) { if (pid == -1) { return NULL; } else if (pid == 0) { - exec_args = gpr_malloc(((size_t)argc + 1) * sizeof(char *)); + exec_args = (char **)gpr_malloc(((size_t)argc + 1) * sizeof(char *)); memcpy(exec_args, argv, (size_t)argc * sizeof(char *)); exec_args[argc] = NULL; execv(exec_args[0], exec_args); @@ -76,7 +76,7 @@ gpr_subprocess *gpr_subprocess_create(int argc, const char **argv) { _exit(1); return NULL; } else { - r = gpr_zalloc(sizeof(gpr_subprocess)); + r = (gpr_subprocess *)gpr_zalloc(sizeof(gpr_subprocess)); r->pid = pid; return r; } diff --git a/src/core/lib/support/thd_posix.c b/src/core/lib/support/thd_posix.c index 2fc23bffafa..16e645ad91f 100644 --- a/src/core/lib/support/thd_posix.c +++ b/src/core/lib/support/thd_posix.c @@ -65,7 +65,7 @@ int gpr_thd_new(gpr_thd_id *t, void (*thd_body)(void *arg), void *arg, pthread_t p; /* don't use gpr_malloc as we may cause an infinite recursion with * the profiling code */ - struct thd_arg *a = malloc(sizeof(*a)); + struct thd_arg *a = (struct thd_arg *)malloc(sizeof(*a)); GPR_ASSERT(a != NULL); a->body = thd_body; a->arg = arg; From eef382c921685f0b3f0422996df580f1b6235834 Mon Sep 17 00:00:00 2001 From: Ernie Miller Date: Fri, 12 May 2017 16:44:18 -0400 Subject: [PATCH 07/62] Remove unnecessary require_relative `require-relative` breaks Rubygems' ability to use the arch-specific directory in `extensions`. When building grpc extensions from source, we're left with a lot of intermediate object files and a duplicate shared object file as well. This space can be reclaimed by finding these object files inside the `gems` subdirectory of the installation location, while leaving the shared object file in the `extensions` subdirectory. See the comments at https://github.com/rubygems/rubygems/issues/926 for more on this behavior, which has been present in Rubygems for years. By using `require` instead, those of us who build from source can reclaim space consumed by duplicate and intermediate files, which amounts to a savings of 46MB (in a build of 1.3.2 on Alpine Linux). This is helpful when trying to minimize the size of a Docker image. I'm unclear on whether or not the reclaiming of this space can be automated as part of the build process. If so, it may be worth considering as a separate effort. --- src/ruby/lib/grpc/grpc.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ruby/lib/grpc/grpc.rb b/src/ruby/lib/grpc/grpc.rb index f46710dc742..48f2a45d44f 100644 --- a/src/ruby/lib/grpc/grpc.rb +++ b/src/ruby/lib/grpc/grpc.rb @@ -34,6 +34,6 @@ begin if File.directory?(distrib_lib_dir) require_relative "#{distrib_lib_dir}/grpc_c" else - require_relative 'grpc_c' + require 'grpc/grpc_c' end end From 21035da1c9c20b5204ad4e9f2339490b3a3b6c0f Mon Sep 17 00:00:00 2001 From: yang-g Date: Tue, 16 May 2017 11:42:04 -0700 Subject: [PATCH 08/62] Add api to server builder plugin to modify the builder --- include/grpc++/impl/server_builder_plugin.h | 4 ++++ src/cpp/server/server_builder.cc | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/include/grpc++/impl/server_builder_plugin.h b/include/grpc++/impl/server_builder_plugin.h index 61632e32fa4..00d806ddb15 100644 --- a/include/grpc++/impl/server_builder_plugin.h +++ b/include/grpc++/impl/server_builder_plugin.h @@ -40,6 +40,7 @@ namespace grpc { +class ServerBuilder; class ServerInitializer; class ChannelArguments; @@ -48,6 +49,9 @@ class ServerBuilderPlugin { virtual ~ServerBuilderPlugin() {} virtual grpc::string name() = 0; + /// UpdateServerBuilder will be called at the beginning of BuildAndStart. + virtual void UpdateServerBuilder(ServerBuilder* builder) {} + // InitServer will be called in ServerBuilder::BuildAndStart(), after the // Server instance is created. virtual void InitServer(ServerInitializer* si) = 0; diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index 2ead048a1ff..c3de7fee76b 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -180,6 +180,10 @@ ServerBuilder& ServerBuilder::AddListeningPort( } std::unique_ptr ServerBuilder::BuildAndStart() { + for (auto plugin = plugins_.begin(); plugin != plugins_.end(); plugin++) { + (*plugin)->UpdateServerBuilder(this); + } + ChannelArguments args; for (auto option = options_.begin(); option != options_.end(); ++option) { (*option)->UpdateArguments(&args); From c4f73ece94d9247de9d950f0abd51bc0a25b9012 Mon Sep 17 00:00:00 2001 From: Matt Kwong Date: Mon, 15 May 2017 14:55:27 -0700 Subject: [PATCH 09/62] Add MacOS interop and UBSan C to internal CI --- tools/dockerfile/push_testing_images.sh | 2 +- .../helper_scripts/prepare_build_interop_rc | 43 +++++++++++++++++++ .../linux/grpc_interop_badserver_java.cfg | 3 +- .../linux/grpc_interop_badserver_java.sh | 3 +- .../linux/grpc_interop_badserver_python.cfg | 3 +- .../linux/grpc_interop_badserver_python.sh | 3 +- .../internal_ci/linux/grpc_interop_tocloud.sh | 1 + .../linux/sanitizer/grpc_c_ubsan.cfg | 39 +++++++++++++++++ .../linux/sanitizer/grpc_c_ubsan.sh | 38 ++++++++++++++++ tools/internal_ci/macos/grpc_interop.cfg | 40 +++++++++++++++++ tools/internal_ci/macos/grpc_interop.sh | 38 ++++++++++++++++ 11 files changed, 208 insertions(+), 5 deletions(-) create mode 100644 tools/internal_ci/helper_scripts/prepare_build_interop_rc create mode 100644 tools/internal_ci/linux/sanitizer/grpc_c_ubsan.cfg create mode 100755 tools/internal_ci/linux/sanitizer/grpc_c_ubsan.sh create mode 100644 tools/internal_ci/macos/grpc_interop.cfg create mode 100755 tools/internal_ci/macos/grpc_interop.sh diff --git a/tools/dockerfile/push_testing_images.sh b/tools/dockerfile/push_testing_images.sh index 973e045ffe4..21b7d8c1945 100755 --- a/tools/dockerfile/push_testing_images.sh +++ b/tools/dockerfile/push_testing_images.sh @@ -44,7 +44,7 @@ cd - DOCKERHUB_ORGANIZATION=grpctesting -for DOCKERFILE_DIR in tools/dockerfile/test/* +for DOCKERFILE_DIR in tools/dockerfile/test/* tools/dockerfile/interoptest/* do # Generate image name based on Dockerfile checksum. That works well as long # as can count on dockerfiles being written in a way that changing the logical diff --git a/tools/internal_ci/helper_scripts/prepare_build_interop_rc b/tools/internal_ci/helper_scripts/prepare_build_interop_rc new file mode 100644 index 00000000000..c988cadb71e --- /dev/null +++ b/tools/internal_ci/helper_scripts/prepare_build_interop_rc @@ -0,0 +1,43 @@ +#!/bin/bash +# Copyright 2017, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Source this rc script to prepare the environment for interop builds +# This rc script must be used in the root directory of gRPC + +export LANG=en_US.UTF-8 + +# Download Docker images from DockerHub +export DOCKERHUB_ORGANIZATION=grpctesting + +git submodule update --init + +# Set up gRPC-Go and gRPC-Java to test +git clone --recursive https://github.com/grpc/grpc-go ./../grpc-go +git clone --recursive https://github.com/grpc/grpc-java ./../grpc-java diff --git a/tools/internal_ci/linux/grpc_interop_badserver_java.cfg b/tools/internal_ci/linux/grpc_interop_badserver_java.cfg index e521b085c5e..8a149ac20b6 100644 --- a/tools/internal_ci/linux/grpc_interop_badserver_java.cfg +++ b/tools/internal_ci/linux/grpc_interop_badserver_java.cfg @@ -35,6 +35,7 @@ build_file: "grpc/tools/internal_ci/linux/grpc_interop_badserver_java.sh" timeout_mins: 480 action { define_artifacts { - regex: "**/report.xml" + regex: "**/report.xml", + regex: "github/grpc/reports/**" } } diff --git a/tools/internal_ci/linux/grpc_interop_badserver_java.sh b/tools/internal_ci/linux/grpc_interop_badserver_java.sh index 02d7b9d4316..f5f89f35d1b 100755 --- a/tools/internal_ci/linux/grpc_interop_badserver_java.sh +++ b/tools/internal_ci/linux/grpc_interop_badserver_java.sh @@ -36,6 +36,7 @@ export LANG=en_US.UTF-8 cd $(dirname $0)/../../.. source tools/internal_ci/helper_scripts/prepare_build_linux_rc +source tools/internal_ci/helper_scripts/prepare_build_interop_rc -tools/run_tests/run_interop_tests.py -l java --use_docker --http2_server_interop $@ +tools/run_tests/run_interop_tests.py -l java --use_docker --http2_server_interop diff --git a/tools/internal_ci/linux/grpc_interop_badserver_python.cfg b/tools/internal_ci/linux/grpc_interop_badserver_python.cfg index 940f760e973..15aaf046275 100644 --- a/tools/internal_ci/linux/grpc_interop_badserver_python.cfg +++ b/tools/internal_ci/linux/grpc_interop_badserver_python.cfg @@ -35,6 +35,7 @@ build_file: "grpc/tools/internal_ci/linux/grpc_interop_badserver_python.sh" timeout_mins: 480 action { define_artifacts { - regex: "**/report.xml" + regex: "**/report.xml", + regex: "github/grpc/reports/**" } } diff --git a/tools/internal_ci/linux/grpc_interop_badserver_python.sh b/tools/internal_ci/linux/grpc_interop_badserver_python.sh index 3ceb181d904..0a664aca864 100755 --- a/tools/internal_ci/linux/grpc_interop_badserver_python.sh +++ b/tools/internal_ci/linux/grpc_interop_badserver_python.sh @@ -36,6 +36,7 @@ export LANG=en_US.UTF-8 cd $(dirname $0)/../../.. source tools/internal_ci/helper_scripts/prepare_build_linux_rc +source tools/internal_ci/helper_scripts/prepare_build_interop_rc -tools/run_tests/run_interop_tests.py -l python --use_docker --http2_server_interop $@ +tools/run_tests/run_interop_tests.py -l python --use_docker --http2_server_interop diff --git a/tools/internal_ci/linux/grpc_interop_tocloud.sh b/tools/internal_ci/linux/grpc_interop_tocloud.sh index a3067e70e67..3c5f81f6868 100755 --- a/tools/internal_ci/linux/grpc_interop_tocloud.sh +++ b/tools/internal_ci/linux/grpc_interop_tocloud.sh @@ -36,5 +36,6 @@ export LANG=en_US.UTF-8 cd $(dirname $0)/../../.. source tools/internal_ci/helper_scripts/prepare_build_linux_rc +source tools/internal_ci/helper_scripts/prepare_build_interop_rc tools/run_tests/run_interop_tests.py -l all -s all --use_docker --http2_interop -t -j 12 $@ diff --git a/tools/internal_ci/linux/sanitizer/grpc_c_ubsan.cfg b/tools/internal_ci/linux/sanitizer/grpc_c_ubsan.cfg new file mode 100644 index 00000000000..385ec278e69 --- /dev/null +++ b/tools/internal_ci/linux/sanitizer/grpc_c_ubsan.cfg @@ -0,0 +1,39 @@ +# Copyright 2017, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Config file for the internal CI (in protobuf text format) + +# Location of the continuous shell script in repository. +build_file: "grpc/tools/internal_ci/linux/sanitizer/grpc_c_ubsan.sh" +timeout_mins: 1440 +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} diff --git a/tools/internal_ci/linux/sanitizer/grpc_c_ubsan.sh b/tools/internal_ci/linux/sanitizer/grpc_c_ubsan.sh new file mode 100755 index 00000000000..27e4a102822 --- /dev/null +++ b/tools/internal_ci/linux/sanitizer/grpc_c_ubsan.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# Copyright 2017, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +set -ex + +# change to grpc repo root +cd $(dirname $0)/../../../.. + +source tools/internal_ci/helper_scripts/prepare_build_linux_rc + +tools/run_tests/run_tests_matrix.py -f c ubsan --inner_jobs 16 -j 1 --internal_ci diff --git a/tools/internal_ci/macos/grpc_interop.cfg b/tools/internal_ci/macos/grpc_interop.cfg new file mode 100644 index 00000000000..e3e782bfd8d --- /dev/null +++ b/tools/internal_ci/macos/grpc_interop.cfg @@ -0,0 +1,40 @@ +# Copyright 2017, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Config file for the internal CI (in protobuf text format) + +# Location of the continuous shell script in repository. +build_file: "grpc/tools/internal_ci/macos/grpc_interop.sh" +timeout_mins: 240 +action { + define_artifacts { + regex: "**/*sponge_log.xml", + regex: "github/grpc/reports/**" + } +} diff --git a/tools/internal_ci/macos/grpc_interop.sh b/tools/internal_ci/macos/grpc_interop.sh new file mode 100755 index 00000000000..4b68266f743 --- /dev/null +++ b/tools/internal_ci/macos/grpc_interop.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# Copyright 2017, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +set -ex + +# change to grpc repo root +cd $(dirname $0)/../../.. + +source tools/internal_ci/helper_scripts/prepare_build_interop_rc + +tools/run_tests/run_interop_tests.py -l objc -s all --use_docker -t -j 1 From cc44a38580bdeeffcffbaac2262f43e259a8ba25 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 17 May 2017 12:40:37 -0700 Subject: [PATCH 10/62] Make cq_verifier output more readable --- test/core/end2end/cq_verifier.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/core/end2end/cq_verifier.c b/test/core/end2end/cq_verifier.c index 0fafb0c8c99..5c54549674d 100644 --- a/test/core/end2end/cq_verifier.c +++ b/test/core/end2end/cq_verifier.c @@ -189,10 +189,16 @@ int byte_buffer_eq_string(grpc_byte_buffer *bb, const char *str) { return res; } +static bool is_probably_integer(void *p) { return ((uintptr_t)p) < 1000000; } + static void expectation_to_strvec(gpr_strvec *buf, expectation *e) { char *tmp; - gpr_asprintf(&tmp, "%p ", e->tag); + if (is_probably_integer(e->tag)) { + gpr_asprintf(&tmp, "tag(%" PRIdPTR ") ", (intptr_t)e->tag); + } else { + gpr_asprintf(&tmp, "%p ", e->tag); + } gpr_strvec_add(buf, tmp); switch (e->type) { From df31960992dd648f8f794cae52182a82806543b1 Mon Sep 17 00:00:00 2001 From: ncteisen Date: Wed, 17 May 2017 16:48:26 -0700 Subject: [PATCH 11/62] Add unary fullstack trickle to bm json --- tools/profiling/microbenchmarks/bm_json.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/profiling/microbenchmarks/bm_json.py b/tools/profiling/microbenchmarks/bm_json.py index 917269823d0..f4d628e11f0 100644 --- a/tools/profiling/microbenchmarks/bm_json.py +++ b/tools/profiling/microbenchmarks/bm_json.py @@ -54,6 +54,10 @@ _BM_SPECS = { 'tpl': [], 'dyn': ['request_size', 'bandwidth_kilobits'], }, + 'BM_PumpUnbalancedUnary_Trickle': { + 'tpl': [], + 'dyn': ['request_size', 'bandwidth_kilobits'], + }, 'BM_ErrorStringOnNewError': { 'tpl': ['fixture'], 'dyn': [], From a64ea5496d122aca53b9226108a119ab3b06408d Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Thu, 4 May 2017 11:02:17 -0700 Subject: [PATCH 12/62] Corrected spelling --- include/grpc++/impl/codegen/client_context.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grpc++/impl/codegen/client_context.h b/include/grpc++/impl/codegen/client_context.h index b1b9be0fe28..b03715e70c0 100644 --- a/include/grpc++/impl/codegen/client_context.h +++ b/include/grpc++/impl/codegen/client_context.h @@ -307,7 +307,7 @@ class ClientContext { /// Flag whether the initial metadata should be \a corked /// - /// If \a corked is true, then the initial metadata will be colasced with the + /// If \a corked is true, then the initial metadata will be coalesced with the /// write of first message in the stream. /// /// \param corked The flag indicating whether the initial metadata is to be From 7ee630a3d7a95c3718f4e6d623c61ffc506762d1 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Fri, 5 May 2017 10:11:52 -0700 Subject: [PATCH 13/62] Clarified grpc::Server documentation comment Make it clear that the creation of the Server instance is not supposed to happen by using the Server class directly and they are instructed to use ServerBuilder. --- include/grpc++/server.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/grpc++/server.h b/include/grpc++/server.h index 2f7018e95bf..0fbf8414835 100644 --- a/include/grpc++/server.h +++ b/include/grpc++/server.h @@ -60,9 +60,10 @@ class HealthCheckServiceInterface; class ServerContext; class ServerInitializer; -/// Models a gRPC server. +/// Represents a gRPC server. /// -/// Servers are configured and started via \a grpc::ServerBuilder. +/// Use a \a grpc::ServerBuilder to create, configure, and start +/// \a Server instances. class Server final : public ServerInterface, private GrpcLibraryCodegen { public: ~Server(); From 24b6d392125561b73e472dfe954613b6249faf97 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Fri, 5 May 2017 10:18:38 -0700 Subject: [PATCH 14/62] Clarified GlobalCallbacks documentation comment Make it clear that "global" and "per application" means shared among all grpc::Server instances. --- include/grpc++/server.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/include/grpc++/server.h b/include/grpc++/server.h index 0fbf8414835..5da606cf66d 100644 --- a/include/grpc++/server.h +++ b/include/grpc++/server.h @@ -74,10 +74,12 @@ class Server final : public ServerInterface, private GrpcLibraryCodegen { /// call \a Shutdown for this function to ever return. void Wait() override; - /// Global Callbacks - /// - /// Can be set exactly once per application to install hooks whenever - /// a server event occurs + /// Global callbacks are a set of hooks that are called when server + /// events occur. \a SetGlobalCallbacks method is used to register + /// the hooks with gRPC. Note that + /// the \a GlobalCallbacks instance will be shared among all + /// \a Server instances in an application and can be set exactly + /// once per application. class GlobalCallbacks { public: virtual ~GlobalCallbacks() {} @@ -93,9 +95,11 @@ class Server final : public ServerInterface, private GrpcLibraryCodegen { virtual void AddPort(Server* server, const grpc::string& addr, ServerCredentials* creds, int port) {} }; - /// Set the global callback object. Can only be called once. Does not take - /// ownership of callbacks, and expects the pointed to object to be alive - /// until all server objects in the process have been destroyed. + /// Set the global callback object. Can only be called once per application. + /// Does not take ownership of callbacks, and expects the pointed to object + /// to be alive until all server objects in the process have been destroyed. + /// The same \a GlobalCallbacks object will be used throughout the + /// application and is shared among all \a Server objects. static void SetGlobalCallbacks(GlobalCallbacks* callbacks); // Returns a \em raw pointer to the underlying grpc_server instance. From bcd6ca5033c501a92c6d1f2037b41b2c35579a93 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Fri, 5 May 2017 10:35:35 -0700 Subject: [PATCH 15/62] Link to grpc_server symbol --- include/grpc++/server.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grpc++/server.h b/include/grpc++/server.h index 5da606cf66d..1d9f5ac041c 100644 --- a/include/grpc++/server.h +++ b/include/grpc++/server.h @@ -102,7 +102,7 @@ class Server final : public ServerInterface, private GrpcLibraryCodegen { /// application and is shared among all \a Server objects. static void SetGlobalCallbacks(GlobalCallbacks* callbacks); - // Returns a \em raw pointer to the underlying grpc_server instance. + // Returns a \em raw pointer to the underlying \a grpc_server instance. grpc_server* c_server(); /// Returns the health check service. From 3cd6cf4983a5b9f5f713c76041535a0bfce4b99f Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Fri, 5 May 2017 10:38:49 -0700 Subject: [PATCH 16/62] Fix documentation for Server::AddListeningPort Clarify that Port is actually an endpoint. Fix typos Clarify that it should be used before starting the server. --- include/grpc++/server.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/grpc++/server.h b/include/grpc++/server.h index 1d9f5ac041c..ac89b8ca4f0 100644 --- a/include/grpc++/server.h +++ b/include/grpc++/server.h @@ -163,15 +163,17 @@ class Server final : public ServerInterface, private GrpcLibraryCodegen { /// service. The service must exist for the lifetime of the Server instance. void RegisterAsyncGenericService(AsyncGenericService* service) override; - /// Tries to bind \a server to the given \a addr. + /// Try binding the server to the given \a addr endpoint + /// (port, and optionally including IP address to bind to). /// - /// It can be invoked multiple times. + /// It can be invoked multiple times. Should be used before + /// starting the server. /// /// \param addr The address to try to bind to the server (eg, localhost:1234, /// 192.168.1.1:31416, [::1]:27182, etc.). /// \params creds The credentials associated with the server. /// - /// \return bound port number on sucess, 0 on failure. + /// \return bound port number on success, 0 on failure. /// /// \warning It's an error to call this method on an already started server. int AddListeningPort(const grpc::string& addr, From 32abe8a6c2e959445faff6a85c7eb003c3d22dec Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Fri, 5 May 2017 10:43:20 -0700 Subject: [PATCH 17/62] Minor docfixes for AddInsecureChannelFromFd --- include/grpc++/server_posix.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/grpc++/server_posix.h b/include/grpc++/server_posix.h index e6066d4eaab..a8fe8cb3d16 100644 --- a/include/grpc++/server_posix.h +++ b/include/grpc++/server_posix.h @@ -43,9 +43,10 @@ namespace grpc { #ifdef GPR_SUPPORT_CHANNELS_FROM_FD -/// Adds new client to a \a Server communicating over given file descriptor +/// Add a new client to a \a Server communicating over the given +/// file descriptor. /// -/// \param server The server to add a client to. +/// \param server The server to add the client to. /// \param fd The file descriptor representing a socket. void AddInsecureChannelFromFd(Server* server, int fd); From 3475cf72c8d65dea7e2a4694b1f059d5a39824d2 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Fri, 5 May 2017 11:04:42 -0700 Subject: [PATCH 18/62] Corrected the documentation for ServerBuilder::AddListenPort --- include/grpc++/server_builder.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/grpc++/server_builder.h b/include/grpc++/server_builder.h index 2185b283ac2..c5b5cb4a48e 100644 --- a/include/grpc++/server_builder.h +++ b/include/grpc++/server_builder.h @@ -139,15 +139,17 @@ class ServerBuilder { return SetOption(MakeChannelArgumentOption(arg, value)); } - /// Tries to bind \a server to the given \a addr. + /// Enlists an endpoint \a addr (port with an optional IP address) to + /// bind the \a grpc::Server object to be created to. /// /// It can be invoked multiple times. /// /// \param addr The address to try to bind to the server (eg, localhost:1234, /// 192.168.1.1:31416, [::1]:27182, etc.). /// \params creds The credentials associated with the server. - /// \param selected_port[out] Upon success, updated to contain the port - /// number. \a nullptr otherwise. + /// \param selected_port[out] If not `nullptr`, gets populated with the port + /// number bound to the \a grpc::Server for the corresponding endpoint after + /// it is successfully bound, 0 otherwise. /// // TODO(dgq): the "port" part seems to be a misnomer. ServerBuilder& AddListeningPort(const grpc::string& addr, From e456ce080654c41fd2713c3db8a46c806b388619 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Fri, 5 May 2017 11:05:23 -0700 Subject: [PATCH 19/62] minor: Link to GRPC_STATUS_IMPLEMENTED --- include/grpc++/server_builder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grpc++/server_builder.h b/include/grpc++/server_builder.h index c5b5cb4a48e..0eabafb4ff6 100644 --- a/include/grpc++/server_builder.h +++ b/include/grpc++/server_builder.h @@ -110,7 +110,7 @@ class ServerBuilder { /// enabled by default. /// /// Incoming calls compressed with an unsupported algorithm will fail with - /// GRPC_STATUS_UNIMPLEMENTED. + /// \a GRPC_STATUS_UNIMPLEMENTED. ServerBuilder& SetCompressionAlgorithmSupportStatus( grpc_compression_algorithm algorithm, bool enabled); From 493f444c73bd5cd3756779121ed76845bdf215c8 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 22:15:49 -0700 Subject: [PATCH 20/62] minor: prefer more formal 'it is' to it's --- include/grpc++/server.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grpc++/server.h b/include/grpc++/server.h index ac89b8ca4f0..fa3b7def85d 100644 --- a/include/grpc++/server.h +++ b/include/grpc++/server.h @@ -175,7 +175,7 @@ class Server final : public ServerInterface, private GrpcLibraryCodegen { /// /// \return bound port number on success, 0 on failure. /// - /// \warning It's an error to call this method on an already started server. + /// \warning It is an error to call this method on an already started server. int AddListeningPort(const grpc::string& addr, ServerCredentials* creds) override; From 4fea66062dfd441a53e43b45c83dc0570ca8f527 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 22:17:44 -0700 Subject: [PATCH 21/62] minor: GRPC->gRPC --- include/grpc++/server_builder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grpc++/server_builder.h b/include/grpc++/server_builder.h index 0eabafb4ff6..ee64a2a0c9b 100644 --- a/include/grpc++/server_builder.h +++ b/include/grpc++/server_builder.h @@ -171,7 +171,7 @@ class ServerBuilder { /// server_->Shutdown(); /// cq_->Shutdown(); // Always *after* the associated server's Shutdown()! /// - /// \param is_frequently_polled This is an optional parameter to inform GRPC + /// \param is_frequently_polled This is an optional parameter to inform gRPC /// library about whether this completion queue would be frequently polled /// (i.e by calling Next() or AsyncNext()). The default value is 'true' and is /// the recommended setting. Setting this to 'false' (i.e not polling the From c78e59663dcfbae4503160400e0994472ff445d0 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 22:18:16 -0700 Subject: [PATCH 22/62] minor: i.e->i.e. --- include/grpc++/server_builder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grpc++/server_builder.h b/include/grpc++/server_builder.h index ee64a2a0c9b..f28ffcd354e 100644 --- a/include/grpc++/server_builder.h +++ b/include/grpc++/server_builder.h @@ -174,7 +174,7 @@ class ServerBuilder { /// \param is_frequently_polled This is an optional parameter to inform gRPC /// library about whether this completion queue would be frequently polled /// (i.e by calling Next() or AsyncNext()). The default value is 'true' and is - /// the recommended setting. Setting this to 'false' (i.e not polling the + /// the recommended setting. Setting this to 'false' (i.e. not polling the /// completion queue frequently) will have a significantly negative /// performance impact and hence should not be used in production use cases. std::unique_ptr AddCompletionQueue( From dcc36108608b35d08cf50812ce5cc61889126baf Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 22:19:27 -0700 Subject: [PATCH 23/62] link referenced code elements --- include/grpc++/resource_quota.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/grpc++/resource_quota.h b/include/grpc++/resource_quota.h index 1199ae93810..9abfef821b8 100644 --- a/include/grpc++/resource_quota.h +++ b/include/grpc++/resource_quota.h @@ -42,9 +42,10 @@ struct grpc_resource_quota; namespace grpc { /// ResourceQuota represents a bound on memory usage by the gRPC library. -/// A ResourceQuota can be attached to a server (via ServerBuilder), or a client -/// channel (via ChannelArguments). gRPC will attempt to keep memory used by -/// all attached entities below the ResourceQuota bound. +/// A ResourceQuota can be attached to a server (via \a ServerBuilder), +/// or a client channel (via \a ChannelArguments). +/// gRPC will attempt to keep memory used by all attached entities +/// below the ResourceQuota bound. class ResourceQuota final : private GrpcLibraryCodegen { public: /// \param name - a unique name for this ResourceQuota. From ab1277c43389c20d0ed51d18c71f683cd060c7ed Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 22:21:26 -0700 Subject: [PATCH 24/62] Add documentation comment for Version() --- include/grpc++/grpc++.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/grpc++/grpc++.h b/include/grpc++/grpc++.h index 978b172346c..d6c3e2e7683 100644 --- a/include/grpc++/grpc++.h +++ b/include/grpc++/grpc++.h @@ -76,6 +76,7 @@ // IWYU pragma: end_exports namespace grpc { +/// Return gRPC library version. grpc::string Version(); } // namespace grpc From b97bd4a8e72c4a1b06ba58ab26a729097d9cec8b Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 22:24:40 -0700 Subject: [PATCH 25/62] minor: add trailing period --- include/grpc++/create_channel.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/grpc++/create_channel.h b/include/grpc++/create_channel.h index 0537695ed2b..669711531f7 100644 --- a/include/grpc++/create_channel.h +++ b/include/grpc++/create_channel.h @@ -43,7 +43,7 @@ namespace grpc { -/// Create a new \a Channel pointing to \a target +/// Create a new \a Channel pointing to \a target. /// /// \param target The URI of the endpoint to connect to. /// \param creds Credentials to use for the created channel. If it does not hold @@ -52,7 +52,7 @@ std::shared_ptr CreateChannel( const grpc::string& target, const std::shared_ptr& creds); -/// Create a new \em custom \a Channel pointing to \a target +/// Create a new \em custom \a Channel pointing to \a target. /// /// \warning For advanced use and testing ONLY. Override default channel /// arguments only if necessary. From 6f07e3aa42f8f3d61c24d6f7ee314f70c3994e87 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 22:25:39 -0700 Subject: [PATCH 26/62] minor --- include/grpc++/create_channel_posix.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/grpc++/create_channel_posix.h b/include/grpc++/create_channel_posix.h index 2af12e6c366..cb323a2f243 100644 --- a/include/grpc++/create_channel_posix.h +++ b/include/grpc++/create_channel_posix.h @@ -44,7 +44,7 @@ namespace grpc { #ifdef GPR_SUPPORT_CHANNELS_FROM_FD -/// Create a new \a Channel communicating over given file descriptor +/// Create a new \a Channel communicating over the given file descriptor. /// /// \param target The name of the target. /// \param fd The file descriptor representing a socket. @@ -52,7 +52,7 @@ std::shared_ptr CreateInsecureChannelFromFd(const grpc::string& target, int fd); /// Create a new \a Channel communicating over given file descriptor with custom -/// channel arguments +/// channel arguments. /// /// \param target The name of the target. /// \param fd The file descriptor representing a socket. From f0e87f73649f605e5de76c507780a4e441813eb6 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 22:42:59 -0700 Subject: [PATCH 27/62] doxygenize comment --- .../ext/health_check_service_server_builder_option.h | 2 +- include/grpc++/ext/proto_server_reflection_plugin.h | 4 ++-- include/grpc++/security/server_credentials.h | 11 ++++++----- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/include/grpc++/ext/health_check_service_server_builder_option.h b/include/grpc++/ext/health_check_service_server_builder_option.h index a27841af01d..9da8e91cd5a 100644 --- a/include/grpc++/ext/health_check_service_server_builder_option.h +++ b/include/grpc++/ext/health_check_service_server_builder_option.h @@ -44,7 +44,7 @@ namespace grpc { class HealthCheckServiceServerBuilderOption : public ServerBuilderOption { public: - /// The ownership of hc will be taken and transferred to the grpc server. + /// The ownership of \a hc will be taken and transferred to the grpc server. /// To explicitly disable default service, pass in a nullptr. explicit HealthCheckServiceServerBuilderOption( std::unique_ptr hc); diff --git a/include/grpc++/ext/proto_server_reflection_plugin.h b/include/grpc++/ext/proto_server_reflection_plugin.h index 6497bba905c..f4a0eec9868 100644 --- a/include/grpc++/ext/proto_server_reflection_plugin.h +++ b/include/grpc++/ext/proto_server_reflection_plugin.h @@ -59,8 +59,8 @@ class ProtoServerReflectionPlugin : public ::grpc::ServerBuilderPlugin { std::shared_ptr reflection_service_; }; -/// Add proto reflection plugin to ServerBuilder. This function should be called -/// at the static initialization time. +/// Add proto reflection plugin to \a ServerBuilder. +/// This function should be called at the static initialization time. void InitProtoReflectionServerBuilderPlugin(); } // namespace reflection diff --git a/include/grpc++/security/server_credentials.h b/include/grpc++/security/server_credentials.h index 4676b04c5d0..d7720e41e5a 100644 --- a/include/grpc++/security/server_credentials.h +++ b/include/grpc++/security/server_credentials.h @@ -70,7 +70,7 @@ class ServerCredentials { /// Options to create ServerCredentials with SSL struct SslServerCredentialsOptions { - /// Deprecated + /// \warning Deprecated SslServerCredentialsOptions() : force_client_auth(false), client_certificate_request(GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE) {} @@ -84,12 +84,13 @@ struct SslServerCredentialsOptions { }; grpc::string pem_root_certs; std::vector pem_key_cert_pairs; - /// Deprecated + /// \warning Deprecated bool force_client_auth; - /// If both force_client_auth and client_certificate_request fields are set, - /// force_client_auth takes effect i.e - /// REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY will be enforced. + /// If both \a force_client_auth and \a client_certificate_request + /// fields are set, \a force_client_auth takes effect, i.e. + /// \a REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY + /// will be enforced. grpc_ssl_client_certificate_request_type client_certificate_request; }; From a9d5637a37e3ebc557a6a937a661f64e07e205ca Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 23:00:24 -0700 Subject: [PATCH 28/62] minor: doxygenize health_care_service_interface.h comments --- include/grpc++/health_check_service_interface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grpc++/health_check_service_interface.h b/include/grpc++/health_check_service_interface.h index c1b43199a60..bdc4ed76efa 100644 --- a/include/grpc++/health_check_service_interface.h +++ b/include/grpc++/health_check_service_interface.h @@ -47,7 +47,7 @@ class HealthCheckServiceInterface { public: virtual ~HealthCheckServiceInterface() {} - /// Set or change the serving status of the given service_name. + /// Set or change the serving status of the given \a service_name. virtual void SetServingStatus(const grpc::string& service_name, bool serving) = 0; /// Apply to all registered service names. From 3a509ecc5dddf5116859abaabe8e052affe11b77 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 23:01:19 -0700 Subject: [PATCH 29/62] minor: Link code entities in comments --- include/grpc++/resource_quota.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/grpc++/resource_quota.h b/include/grpc++/resource_quota.h index 9abfef821b8..fab2b4c6e4b 100644 --- a/include/grpc++/resource_quota.h +++ b/include/grpc++/resource_quota.h @@ -53,10 +53,10 @@ class ResourceQuota final : private GrpcLibraryCodegen { ResourceQuota(); ~ResourceQuota(); - /// Resize this ResourceQuota to a new size. If new_size is smaller than the - /// current size of the pool, memory usage will be monotonically decreased - /// until it falls under new_size. No time bound is given for this to occur - /// however. + /// Resize this \a ResourceQuota to a new size. If \a new_size is smaller + /// than the current size of the pool, memory usage will be monotonically + /// decreased until it falls under \a new_size. + /// No time bound is given for this to occur however. ResourceQuota& Resize(size_t new_size); grpc_resource_quota* c_resource_quota() const { return impl_; } From 31e9c14e8370aaf25129d7be63ac2ef3285b192b Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 23:02:06 -0700 Subject: [PATCH 30/62] doxygenize auth_metadata_processor.h comments --- include/grpc++/security/auth_metadata_processor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grpc++/security/auth_metadata_processor.h b/include/grpc++/security/auth_metadata_processor.h index 35369231464..18e8a475151 100644 --- a/include/grpc++/security/auth_metadata_processor.h +++ b/include/grpc++/security/auth_metadata_processor.h @@ -49,7 +49,7 @@ class AuthMetadataProcessor { virtual ~AuthMetadataProcessor() {} - /// If this method returns true, the Process function will be scheduled in + /// If this method returns true, the \a Process function will be scheduled in /// a different thread from the one processing the call. virtual bool IsBlocking() const { return true; } From 59cd2d7f661d3de0f7e6244f1fb9da2ee2e9a4a4 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 23:03:08 -0700 Subject: [PATCH 31/62] doxygenize include/grpc++/security/credentials.h comments --- include/grpc++/security/credentials.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grpc++/security/credentials.h b/include/grpc++/security/credentials.h index 8d9d181fde0..46cc96eca39 100644 --- a/include/grpc++/security/credentials.h +++ b/include/grpc++/security/credentials.h @@ -151,7 +151,7 @@ std::shared_ptr GoogleComputeEngineCredentials(); /// json_key is the JSON key string containing the client's private key. /// token_lifetime_seconds is the lifetime in seconds of each Json Web Token /// (JWT) created with this credentials. It should not exceed -/// grpc_max_auth_token_lifetime or will be cropped to this value. +/// \a grpc_max_auth_token_lifetime or will be cropped to this value. std::shared_ptr ServiceAccountJWTAccessCredentials( const grpc::string& json_key, long token_lifetime_seconds); From 4601bc254b5b58c225ce3b16e0a9a4df172c7d05 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 23:03:39 -0700 Subject: [PATCH 32/62] tiny edit and linking entities --- include/grpc++/server.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/grpc++/server.h b/include/grpc++/server.h index fa3b7def85d..85a73008204 100644 --- a/include/grpc++/server.h +++ b/include/grpc++/server.h @@ -201,13 +201,14 @@ class Server final : public ServerInterface, private GrpcLibraryCodegen { const int max_receive_message_size_; - /// The following completion queues are ONLY used in case of Sync API i.e if - /// the server has any services with sync methods. The server uses these - /// completion queues to poll for new RPCs + /// The following completion queues are ONLY used in case of Sync API + /// i.e. if the server has any services with sync methods. The server uses + /// these completion queues to poll for new RPCs std::shared_ptr>> sync_server_cqs_; - /// List of ThreadManager instances (one for each cq in the sync_server_cqs) + /// List of \a ThreadManager instances (one for each cq in + /// the \a sync_server_cqs) std::vector> sync_req_mgrs_; // Sever status From 27da5defc708852962893f3d982abd3e0e6f6cf0 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 23:04:46 -0700 Subject: [PATCH 33/62] Minor edits and doxygenize some comments --- include/grpc++/server_builder.h | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/include/grpc++/server_builder.h b/include/grpc++/server_builder.h index f28ffcd354e..8bedef58995 100644 --- a/include/grpc++/server_builder.h +++ b/include/grpc++/server_builder.h @@ -85,7 +85,7 @@ class ServerBuilder { /// Register a service. This call does not take ownership of the service. /// The service must exist for the lifetime of the \a Server instance returned - /// by BuildAndStart(). + /// by \a BuildAndStart(). /// Only matches requests with :authority \a host ServerBuilder& RegisterService(const grpc::string& host, Service* service); @@ -173,10 +173,11 @@ class ServerBuilder { /// /// \param is_frequently_polled This is an optional parameter to inform gRPC /// library about whether this completion queue would be frequently polled - /// (i.e by calling Next() or AsyncNext()). The default value is 'true' and is - /// the recommended setting. Setting this to 'false' (i.e. not polling the - /// completion queue frequently) will have a significantly negative - /// performance impact and hence should not be used in production use cases. + /// (i.e. by calling \a Next() or \a AsyncNext()). The default value is + /// 'true' and is the recommended setting. Setting this to 'false' (i.e. + /// not polling the completion queue frequently) will have a significantly + /// negative performance impact and hence should not be used in production + /// use cases. std::unique_ptr AddCompletionQueue( bool is_frequently_polled = true); @@ -208,18 +209,18 @@ class ServerBuilder { max_pollers(2), cq_timeout_msec(10000) {} - // Number of server completion queues to create to listen to incoming RPCs. + /// Number of server completion queues to create to listen to incoming RPCs. int num_cqs; - // Minimum number of threads per completion queue that should be listening - // to incoming RPCs. + /// Minimum number of threads per completion queue that should be listening + /// to incoming RPCs. int min_pollers; - // Maximum number of threads per completion queue that can be listening to - // incoming RPCs. + /// Maximum number of threads per completion queue that can be listening to + /// incoming RPCs. int max_pollers; - // The timeout for server completion queue's AsyncNext call. + /// The timeout for server completion queue's AsyncNext call. int cq_timeout_msec; }; @@ -240,7 +241,7 @@ class ServerBuilder { SyncServerSettings sync_server_settings_; - // List of completion queues added via AddCompletionQueue() method + /// List of completion queues added via \a AddCompletionQueue method. std::vector cqs_; std::shared_ptr creds_; From 65942421b4419bf02077a4180671c30c38131012 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 23:05:12 -0700 Subject: [PATCH 34/62] minor edits in channel_arguments.h --- include/grpc++/support/channel_arguments.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/grpc++/support/channel_arguments.h b/include/grpc++/support/channel_arguments.h index 61307d61942..061ab55138c 100644 --- a/include/grpc++/support/channel_arguments.h +++ b/include/grpc++/support/channel_arguments.h @@ -49,7 +49,7 @@ class ChannelArgumentsTest; class ResourceQuota; /// Options for channel creation. The user can use generic setters to pass -/// key value pairs down to c channel creation code. For grpc related options, +/// key value pairs down to C channel creation code. For gRPC related options, /// concrete setters are provided. class ChannelArguments { public: @@ -82,13 +82,13 @@ class ChannelArguments { /// Set the socket mutator for the channel. void SetSocketMutator(grpc_socket_mutator* mutator); - /// The given string will be sent at the front of the user agent string. + /// Set the string to prepend to the user agent. void SetUserAgentPrefix(const grpc::string& user_agent_prefix); - /// The given buffer pool will be attached to the constructed channel + /// Set the buffer pool to be attached to the constructed channel. void SetResourceQuota(const ResourceQuota& resource_quota); - /// Sets the max receive and send message sizes. + /// Set the max receive and send message sizes. void SetMaxReceiveMessageSize(int size); void SetMaxSendMessageSize(int size); @@ -115,8 +115,8 @@ class ChannelArguments { /// Set a textual argument \a value under \a key. void SetString(const grpc::string& key, const grpc::string& value); - /// Return (by value) a c grpc_channel_args structure which points to - /// arguments owned by this ChannelArguments instance + /// Return (by value) a C \a grpc_channel_args structure which points to + /// arguments owned by this \a ChannelArguments instance grpc_channel_args c_channel_args() const { grpc_channel_args out; out.num_args = args_.size(); From 6a6747a9066c96e60515ffc148c33a8c547462b2 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 23:05:32 -0700 Subject: [PATCH 35/62] Link comment code entities --- include/grpc++/support/error_details.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/grpc++/support/error_details.h b/include/grpc++/support/error_details.h index d4324d35cf4..4f5176228c8 100644 --- a/include/grpc++/support/error_details.h +++ b/include/grpc++/support/error_details.h @@ -44,16 +44,16 @@ class Status; namespace grpc { -/// Maps a grpc::Status to a google::rpc::Status. +/// Map a \a grpc::Status to a \a google::rpc::Status. /// The given \a to object will be cleared. /// On success, returns status with OK. -/// Returns status with INVALID_ARGUMENT, if failed to deserialize. -/// Returns status with FAILED_PRECONDITION, if \a to is nullptr. +/// Returns status with \a INVALID_ARGUMENT, if failed to deserialize. +/// Returns status with \a FAILED_PRECONDITION, if \a to is nullptr. Status ExtractErrorDetails(const Status& from, ::google::rpc::Status* to); -/// Maps google::rpc::Status to a grpc::Status. +/// Map \a google::rpc::Status to a \a grpc::Status. /// Returns OK on success. -/// Returns status with FAILED_PRECONDITION if \a to is nullptr. +/// Returns status with \a FAILED_PRECONDITION if \a to is nullptr. Status SetErrorDetails(const ::google::rpc::Status& from, Status* to); } // namespace grpc From d488bbac0255dfd16c19be28b8f99c7e6dab2d80 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 23:06:01 -0700 Subject: [PATCH 36/62] minor: doxygenize comment --- include/grpc++/support/slice.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grpc++/support/slice.h b/include/grpc++/support/slice.h index 3ec0d1af800..e2bd211413f 100644 --- a/include/grpc++/support/slice.h +++ b/include/grpc++/support/slice.h @@ -48,7 +48,7 @@ class Slice final { public: /// Construct an empty slice. Slice(); - // Destructor - drops one reference. + /// Destructor - drops one reference. ~Slice(); enum AddRef { ADD_REF }; From 37718a4fce1d643cff91d56d3344aef03103e45c Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Sun, 7 May 2017 23:06:34 -0700 Subject: [PATCH 37/62] Doxygenize comments in server_context_test_spouse.h --- include/grpc++/test/server_context_test_spouse.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/grpc++/test/server_context_test_spouse.h b/include/grpc++/test/server_context_test_spouse.h index 5bd07e7aec6..80edd5622b9 100644 --- a/include/grpc++/test/server_context_test_spouse.h +++ b/include/grpc++/test/server_context_test_spouse.h @@ -47,7 +47,7 @@ class ServerContextTestSpouse { explicit ServerContextTestSpouse(ServerContext* ctx) : ctx_(ctx) {} /// Inject client metadata to the ServerContext for the test. The test spouse - /// must be alive when ServerContext::client_metadata is called. + /// must be alive when \a ServerContext::client_metadata is called. void AddClientMetadata(const grpc::string& key, const grpc::string& value) { client_metadata_storage_.insert( std::pair(key, value)); @@ -70,7 +70,7 @@ class ServerContextTestSpouse { } private: - ServerContext* ctx_; /// not owned + ServerContext* ctx_; // not owned std::multimap client_metadata_storage_; }; From d7079b20080646a11a4878ab156912777fac3248 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 16 May 2017 19:55:57 +0200 Subject: [PATCH 38/62] cache byteBufRequest for generic C# qps client --- src/csharp/Grpc.IntegrationTesting/ClientRunners.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs b/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs index c9f7c42b71d..85d58ec287e 100644 --- a/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs +++ b/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs @@ -140,6 +140,7 @@ namespace Grpc.IntegrationTesting readonly ClientType clientType; readonly RpcType rpcType; readonly PayloadConfig payloadConfig; + readonly Lazy cachedByteBufferRequest; readonly Histogram histogram; readonly List runnerTasks; @@ -155,6 +156,7 @@ namespace Grpc.IntegrationTesting this.clientType = clientType; this.rpcType = rpcType; this.payloadConfig = payloadConfig; + this.cachedByteBufferRequest = new Lazy(() => new byte[payloadConfig.BytebufParams.ReqSize]); this.histogram = new Histogram(histogramParams.Resolution, histogramParams.MaxPossible); this.runnerTasks = new List(); @@ -286,7 +288,7 @@ namespace Grpc.IntegrationTesting private async Task RunGenericStreamingAsync(Channel channel, IInterarrivalTimer timer) { - var request = CreateByteBufferRequest(); + var request = cachedByteBufferRequest.Value; var stopwatch = new Stopwatch(); var callDetails = new CallInvocationDetails(channel, GenericService.StreamingCallMethod, new CallOptions()); @@ -351,11 +353,6 @@ namespace Grpc.IntegrationTesting }; } - private byte[] CreateByteBufferRequest() - { - return new byte[payloadConfig.BytebufParams.ReqSize]; - } - private static Payload CreateZerosPayload(int size) { return new Payload { Body = ByteString.CopyFrom(new byte[size]) }; From 19e3d3ba9f1c8e71793e2ad4f648c363d85438f2 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 17 May 2017 11:05:06 +0200 Subject: [PATCH 39/62] get rid of Histogram lock contention in qps worker --- .../Grpc.IntegrationTesting/ClientRunners.cs | 19 ++++--- .../Grpc.IntegrationTesting/Histogram.cs | 57 ++++++++++++++----- .../Grpc.IntegrationTesting/HistogramTest.cs | 26 ++++++++- 3 files changed, 79 insertions(+), 23 deletions(-) diff --git a/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs b/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs index 85d58ec287e..8a44f8d68f6 100644 --- a/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs +++ b/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs @@ -141,7 +141,7 @@ namespace Grpc.IntegrationTesting readonly RpcType rpcType; readonly PayloadConfig payloadConfig; readonly Lazy cachedByteBufferRequest; - readonly Histogram histogram; + readonly ThreadLocal threadLocalHistogram; readonly List runnerTasks; readonly CancellationTokenSource stoppedCts = new CancellationTokenSource(); @@ -157,7 +157,7 @@ namespace Grpc.IntegrationTesting this.rpcType = rpcType; this.payloadConfig = payloadConfig; this.cachedByteBufferRequest = new Lazy(() => new byte[payloadConfig.BytebufParams.ReqSize]); - this.histogram = new Histogram(histogramParams.Resolution, histogramParams.MaxPossible); + this.threadLocalHistogram = new ThreadLocal(() => new Histogram(histogramParams.Resolution, histogramParams.MaxPossible), true); this.runnerTasks = new List(); foreach (var channel in this.channels) @@ -173,7 +173,12 @@ namespace Grpc.IntegrationTesting public ClientStats GetStats(bool reset) { - var histogramData = histogram.GetSnapshot(reset); + var histogramData = new HistogramData(); + foreach (var hist in threadLocalHistogram.Values) + { + hist.GetSnapshot(histogramData, reset); + } + var secondsElapsed = wallClockStopwatch.GetElapsedSnapshot(reset).TotalSeconds; if (reset) @@ -234,7 +239,7 @@ namespace Grpc.IntegrationTesting stopwatch.Stop(); // spec requires data point in nanoseconds. - histogram.AddObservation(stopwatch.Elapsed.TotalSeconds * SecondsToNanos); + threadLocalHistogram.Value.AddObservation(stopwatch.Elapsed.TotalSeconds * SecondsToNanos); timer.WaitForNext(); } @@ -253,7 +258,7 @@ namespace Grpc.IntegrationTesting stopwatch.Stop(); // spec requires data point in nanoseconds. - histogram.AddObservation(stopwatch.Elapsed.TotalSeconds * SecondsToNanos); + threadLocalHistogram.Value.AddObservation(stopwatch.Elapsed.TotalSeconds * SecondsToNanos); await timer.WaitForNextAsync(); } @@ -275,7 +280,7 @@ namespace Grpc.IntegrationTesting stopwatch.Stop(); // spec requires data point in nanoseconds. - histogram.AddObservation(stopwatch.Elapsed.TotalSeconds * SecondsToNanos); + threadLocalHistogram.Value.AddObservation(stopwatch.Elapsed.TotalSeconds * SecondsToNanos); await timer.WaitForNextAsync(); } @@ -303,7 +308,7 @@ namespace Grpc.IntegrationTesting stopwatch.Stop(); // spec requires data point in nanoseconds. - histogram.AddObservation(stopwatch.Elapsed.TotalSeconds * SecondsToNanos); + threadLocalHistogram.Value.AddObservation(stopwatch.Elapsed.TotalSeconds * SecondsToNanos); await timer.WaitForNextAsync(); } diff --git a/src/csharp/Grpc.IntegrationTesting/Histogram.cs b/src/csharp/Grpc.IntegrationTesting/Histogram.cs index 28d1f078a93..9d33c497e6b 100644 --- a/src/csharp/Grpc.IntegrationTesting/Histogram.cs +++ b/src/csharp/Grpc.IntegrationTesting/Histogram.cs @@ -84,15 +84,27 @@ namespace Grpc.IntegrationTesting } } - /// - /// Gets snapshot of stats and reset + /// Gets snapshot of stats and optionally resets the histogram. /// public HistogramData GetSnapshot(bool reset = false) { lock (myLock) { - return GetSnapshotUnsafe(reset); + var histogramData = new HistogramData(); + GetSnapshotUnsafe(histogramData, reset); + return histogramData; + } + } + + /// + /// Merges snapshot of stats into mergeTo and optionally resets the histogram. + /// + public void GetSnapshot(HistogramData mergeTo, bool reset) + { + lock (myLock) + { + GetSnapshotUnsafe(mergeTo, reset); } } @@ -117,24 +129,39 @@ namespace Grpc.IntegrationTesting this.buckets[FindBucket(value)]++; } - private HistogramData GetSnapshotUnsafe(bool reset) + private void GetSnapshotUnsafe(HistogramData mergeTo, bool reset) { - var data = new HistogramData + GrpcPreconditions.CheckArgument(mergeTo.Bucket.Count == 0 || mergeTo.Bucket.Count == buckets.Length); + if (mergeTo.Count == 0) { - Count = count, - Sum = sum, - SumOfSquares = sumOfSquares, - MinSeen = min, - MaxSeen = max, - Bucket = { buckets } - }; + mergeTo.MinSeen = min; + mergeTo.MaxSeen = max; + } + else + { + mergeTo.MinSeen = Math.Min(mergeTo.MinSeen, min); + mergeTo.MaxSeen = Math.Max(mergeTo.MaxSeen, max); + } + mergeTo.Count += count; + mergeTo.Sum += sum; + mergeTo.SumOfSquares += sumOfSquares; - if (reset) + if (mergeTo.Bucket.Count == 0) { - ResetUnsafe(); + mergeTo.Bucket.AddRange(buckets); + } + else + { + for (int i = 0; i < buckets.Length; i++) + { + mergeTo.Bucket[i] += buckets[i]; + } } - return data; + if (reset) + { + ResetUnsafe(); + } } private void ResetUnsafe() diff --git a/src/csharp/Grpc.IntegrationTesting/HistogramTest.cs b/src/csharp/Grpc.IntegrationTesting/HistogramTest.cs index fa160cbd15b..e8a2ed0c5b9 100644 --- a/src/csharp/Grpc.IntegrationTesting/HistogramTest.cs +++ b/src/csharp/Grpc.IntegrationTesting/HistogramTest.cs @@ -73,13 +73,37 @@ namespace Grpc.IntegrationTesting { var hist = new Histogram(0.01, 60e9); hist.AddObservation(-0.5); // should be in the first bucket - hist.AddObservation(1e12); // should be in the last bucket + hist.AddObservation(1e12); // should be in the last bucket var data = hist.GetSnapshot(); Assert.AreEqual(1, data.Bucket[0]); Assert.AreEqual(1, data.Bucket[data.Bucket.Count - 1]); } + [Test] + public void MergeSnapshots() + { + var data = new HistogramData(); + + var hist1 = new Histogram(0.01, 60e9); + hist1.AddObservation(-0.5); // should be in the first bucket + hist1.AddObservation(1e12); // should be in the last bucket + hist1.GetSnapshot(data, false); + + var hist2 = new Histogram(0.01, 60e9); + hist2.AddObservation(10000); + hist2.AddObservation(11000); + hist2.GetSnapshot(data, false); + + Assert.AreEqual(4, data.Count); + Assert.AreEqual(-0.5, data.MinSeen); + Assert.AreEqual(1e12, data.MaxSeen); + Assert.AreEqual(1, data.Bucket[0]); + Assert.AreEqual(1, data.Bucket[925]); + Assert.AreEqual(1, data.Bucket[935]); + Assert.AreEqual(1, data.Bucket[data.Bucket.Count - 1]); + } + [Test] public void Reset() { From 049f115c97169042df4cae281c780add697b22d0 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 18 May 2017 10:08:39 -0700 Subject: [PATCH 40/62] clang-format --- test/core/end2end/fixtures/http_proxy_fixture.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/core/end2end/fixtures/http_proxy_fixture.c b/test/core/end2end/fixtures/http_proxy_fixture.c index 708409d8658..b8a53ed113b 100644 --- a/test/core/end2end/fixtures/http_proxy_fixture.c +++ b/test/core/end2end/fixtures/http_proxy_fixture.c @@ -50,6 +50,7 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/closure.h" +#include "src/core/lib/iomgr/combiner.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -60,7 +61,6 @@ #include "src/core/lib/iomgr/tcp_client.h" #include "src/core/lib/iomgr/tcp_server.h" #include "src/core/lib/iomgr/timer.h" -#include "src/core/lib/iomgr/combiner.h" #include "src/core/lib/slice/slice_internal.h" #include "test/core/util/port.h" @@ -73,7 +73,7 @@ struct grpc_end2end_http_proxy { grpc_pollset* pollset; gpr_refcount users; - grpc_combiner *combiner; + grpc_combiner* combiner; }; // @@ -508,7 +508,7 @@ void grpc_end2end_http_proxy_destroy(grpc_end2end_http_proxy* proxy) { grpc_pollset_shutdown(&exec_ctx, proxy->pollset, grpc_closure_create(destroy_pollset, proxy->pollset, grpc_schedule_on_exec_ctx)); - grpc_combiner_unref(&exec_ctx, proxy->combiner); + grpc_combiner_unref(&exec_ctx, proxy->combiner); gpr_free(proxy); grpc_exec_ctx_finish(&exec_ctx); } From 96fc54cf8b37d659acca13297c60ba6e31f94e0c Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 18 May 2017 14:33:07 -0700 Subject: [PATCH 41/62] Allow specifying DNS server to query for c-ares via URI authority. --- .../filters/client_channel/parse_address.c | 129 +++++++++--------- .../filters/client_channel/parse_address.h | 6 + .../resolver/dns/c_ares/dns_resolver_ares.c | 18 ++- .../resolver/dns/c_ares/grpc_ares_wrapper.c | 73 ++++++++-- .../resolver/dns/c_ares/grpc_ares_wrapper.h | 6 + 5 files changed, 147 insertions(+), 85 deletions(-) diff --git a/src/core/ext/filters/client_channel/parse_address.c b/src/core/ext/filters/client_channel/parse_address.c index edc6ce697d8..18381eec552 100644 --- a/src/core/ext/filters/client_channel/parse_address.c +++ b/src/core/ext/filters/client_channel/parse_address.c @@ -57,11 +57,11 @@ bool grpc_parse_unix(const grpc_uri *uri, struct sockaddr_un *un = (struct sockaddr_un *)resolved_addr->addr; const size_t maxlen = sizeof(un->sun_path); const size_t path_len = strnlen(uri->path, maxlen); - if (path_len == maxlen) return 0; + if (path_len == maxlen) return false; un->sun_family = AF_UNIX; strcpy(un->sun_path, uri->path); resolved_addr->len = sizeof(*un); - return 1; + return true; } #else /* GRPC_HAVE_UNIX_SOCKET */ @@ -73,74 +73,65 @@ bool grpc_parse_unix(const grpc_uri *uri, #endif /* GRPC_HAVE_UNIX_SOCKET */ -bool grpc_parse_ipv4(const grpc_uri *uri, - grpc_resolved_address *resolved_addr) { - if (strcmp("ipv4", uri->scheme) != 0) { - gpr_log(GPR_ERROR, "Expected 'ipv4' scheme, got '%s'", uri->scheme); - return false; - } - const char *host_port = uri->path; +bool grpc_parse_ipv4_hostport(const char *hostport, grpc_resolved_address *addr, + bool log_errors) { + bool success = false; + // Split host and port. char *host; char *port; - int port_num; - bool result = false; - struct sockaddr_in *in = (struct sockaddr_in *)resolved_addr->addr; - - if (*host_port == '/') ++host_port; - if (!gpr_split_host_port(host_port, &host, &port)) { - return false; - } - - memset(resolved_addr, 0, sizeof(grpc_resolved_address)); - resolved_addr->len = sizeof(struct sockaddr_in); + if (!gpr_split_host_port(hostport, &host, &port)) return false; + // Parse IP address. + memset(addr, 0, sizeof(*addr)); + addr->len = sizeof(struct sockaddr_in); + struct sockaddr_in *in = (struct sockaddr_in *)addr->addr; in->sin_family = AF_INET; if (inet_pton(AF_INET, host, &in->sin_addr) == 0) { - gpr_log(GPR_ERROR, "invalid ipv4 address: '%s'", host); + if (log_errors) gpr_log(GPR_ERROR, "invalid ipv4 address: '%s'", host); goto done; } - - if (port != NULL) { - if (sscanf(port, "%d", &port_num) != 1 || port_num < 0 || - port_num > 65535) { - gpr_log(GPR_ERROR, "invalid ipv4 port: '%s'", port); - goto done; - } - in->sin_port = htons((uint16_t)port_num); - } else { - gpr_log(GPR_ERROR, "no port given for ipv4 scheme"); + // Parse port. + if (port == NULL) { + if (log_errors) gpr_log(GPR_ERROR, "no port given for ipv4 scheme"); goto done; } - - result = true; + int port_num; + if (sscanf(port, "%d", &port_num) != 1 || port_num < 0 || port_num > 65535) { + if (log_errors) gpr_log(GPR_ERROR, "invalid ipv4 port: '%s'", port); + goto done; + } + in->sin_port = htons((uint16_t)port_num); + success = true; done: gpr_free(host); gpr_free(port); - return result; + return success; } -bool grpc_parse_ipv6(const grpc_uri *uri, +bool grpc_parse_ipv4(const grpc_uri *uri, grpc_resolved_address *resolved_addr) { - if (strcmp("ipv6", uri->scheme) != 0) { - gpr_log(GPR_ERROR, "Expected 'ipv6' scheme, got '%s'", uri->scheme); + if (strcmp("ipv4", uri->scheme) != 0) { + gpr_log(GPR_ERROR, "Expected 'ipv4' scheme, got '%s'", uri->scheme); return false; } const char *host_port = uri->path; - char *host; - char *port; - int port_num; - int result = 0; - struct sockaddr_in6 *in6 = (struct sockaddr_in6 *)resolved_addr->addr; - if (*host_port == '/') ++host_port; - if (!gpr_split_host_port(host_port, &host, &port)) { - return 0; - } + return grpc_parse_ipv4_hostport(host_port, resolved_addr, + true /* log_errors */); +} - memset(in6, 0, sizeof(*in6)); - resolved_addr->len = sizeof(*in6); +bool grpc_parse_ipv6_hostport(const char *hostport, grpc_resolved_address *addr, + bool log_errors) { + bool success = false; + // Split host and port. + char *host; + char *port; + if (!gpr_split_host_port(hostport, &host, &port)) return false; + // Parse IP address. + memset(addr, 0, sizeof(*addr)); + addr->len = sizeof(struct sockaddr_in6); + struct sockaddr_in6 *in6 = (struct sockaddr_in6 *)addr->addr; in6->sin6_family = AF_INET6; - - /* Handle the RFC6874 syntax for IPv6 zone identifiers. */ + // Handle the RFC6874 syntax for IPv6 zone identifiers. char *host_end = (char *)gpr_memrchr(host, '%', strlen(host)); if (host_end != NULL) { GPR_ASSERT(host_end >= host); @@ -159,7 +150,7 @@ bool grpc_parse_ipv6(const grpc_uri *uri, gpr_log(GPR_ERROR, "invalid ipv6 scope id: '%s'", host_end + 1); goto done; } - // Handle "sin6_scope_id" being type "u_long". See grpc issue ##10027. + // Handle "sin6_scope_id" being type "u_long". See grpc issue #10027. in6->sin6_scope_id = sin6_scope_id; } else { if (inet_pton(AF_INET6, host, &in6->sin6_addr) == 0) { @@ -167,24 +158,34 @@ bool grpc_parse_ipv6(const grpc_uri *uri, goto done; } } - - if (port != NULL) { - if (sscanf(port, "%d", &port_num) != 1 || port_num < 0 || - port_num > 65535) { - gpr_log(GPR_ERROR, "invalid ipv6 port: '%s'", port); - goto done; - } - in6->sin6_port = htons((uint16_t)port_num); - } else { - gpr_log(GPR_ERROR, "no port given for ipv6 scheme"); + // Parse port. + if (port == NULL) { + if (log_errors) gpr_log(GPR_ERROR, "no port given for ipv6 scheme"); goto done; } - - result = 1; + int port_num; + if (sscanf(port, "%d", &port_num) != 1 || port_num < 0 || port_num > 65535) { + if (log_errors) gpr_log(GPR_ERROR, "invalid ipv6 port: '%s'", port); + goto done; + } + in6->sin6_port = htons((uint16_t)port_num); + success = true; done: gpr_free(host); gpr_free(port); - return result; + return success; +} + +bool grpc_parse_ipv6(const grpc_uri *uri, + grpc_resolved_address *resolved_addr) { + if (strcmp("ipv6", uri->scheme) != 0) { + gpr_log(GPR_ERROR, "Expected 'ipv6' scheme, got '%s'", uri->scheme); + return false; + } + const char *host_port = uri->path; + if (*host_port == '/') ++host_port; + return grpc_parse_ipv6_hostport(host_port, resolved_addr, + true /* log_errors */); } bool grpc_parse_uri(const grpc_uri *uri, grpc_resolved_address *resolved_addr) { diff --git a/src/core/ext/filters/client_channel/parse_address.h b/src/core/ext/filters/client_channel/parse_address.h index fa7ea33a00b..1a203a3b265 100644 --- a/src/core/ext/filters/client_channel/parse_address.h +++ b/src/core/ext/filters/client_channel/parse_address.h @@ -54,4 +54,10 @@ bool grpc_parse_ipv6(const grpc_uri *uri, grpc_resolved_address *resolved_addr); /** Populate \a resolved_addr from \a uri. Returns true upon success. */ bool grpc_parse_uri(const grpc_uri *uri, grpc_resolved_address *resolved_addr); +/** Parse bare IPv4 or IPv6 "IP:port" strings. */ +bool grpc_parse_ipv4_hostport(const char *hostport, grpc_resolved_address *addr, + bool log_errors); +bool grpc_parse_ipv6_hostport(const char *hostport, grpc_resolved_address *addr, + bool log_errors); + #endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PARSE_ADDRESS_H */ diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c index ffaeeed3242..578e8d697fd 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c +++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.c @@ -61,6 +61,8 @@ typedef struct { /** base class: must be first */ grpc_resolver base; + /** DNS server to use (if not system default) */ + char *dns_server; /** name to resolve (usually the same as target_name) */ char *name_to_resolve; /** default port to use */ @@ -172,6 +174,8 @@ static void dns_ares_on_resolved_locked(grpc_exec_ctx *exec_ctx, void *arg, grpc_resolved_addresses_destroy(r->addresses); grpc_lb_addresses_destroy(exec_ctx, addresses); } else { + const char *msg = grpc_error_string(error); + gpr_log(GPR_DEBUG, "dns resolution failed: %s", msg); gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC); gpr_timespec next_try = gpr_backoff_step(&r->backoff_state, now); gpr_timespec timeout = gpr_time_sub(next_try, now); @@ -221,9 +225,9 @@ static void dns_ares_start_resolving_locked(grpc_exec_ctx *exec_ctx, GPR_ASSERT(!r->resolving); r->resolving = true; r->addresses = NULL; - grpc_resolve_address(exec_ctx, r->name_to_resolve, r->default_port, - r->interested_parties, &r->dns_ares_on_resolved_locked, - &r->addresses); + grpc_dns_lookup_ares(exec_ctx, r->dns_server, r->name_to_resolve, + r->default_port, r->interested_parties, + &r->dns_ares_on_resolved_locked, &r->addresses); } static void dns_ares_maybe_finish_next_locked(grpc_exec_ctx *exec_ctx, @@ -246,6 +250,7 @@ static void dns_ares_destroy(grpc_exec_ctx *exec_ctx, grpc_resolver *gr) { grpc_channel_args_destroy(exec_ctx, r->resolved_result); } grpc_pollset_set_destroy(exec_ctx, r->interested_parties); + gpr_free(r->dns_server); gpr_free(r->name_to_resolve); gpr_free(r->default_port); grpc_channel_args_destroy(exec_ctx, r->channel_args); @@ -257,14 +262,13 @@ static grpc_resolver *dns_ares_create(grpc_exec_ctx *exec_ctx, const char *default_port) { // Get name from args. const char *path = args->uri->path; - if (0 != strcmp(args->uri->authority, "")) { - gpr_log(GPR_ERROR, "authority based dns uri's not supported"); - return NULL; - } if (path[0] == '/') ++path; // Create resolver. ares_dns_resolver *r = gpr_zalloc(sizeof(ares_dns_resolver)); grpc_resolver_init(&r->base, &dns_ares_resolver_vtable, args->combiner); + if (0 != strcmp(args->uri->authority, "")) { + r->dns_server = gpr_strdup(args->uri->authority); + } r->name_to_resolve = gpr_strdup(path); r->default_port = gpr_strdup(default_port); r->channel_args = grpc_channel_args_copy(args->args); diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c index 09c46a66e0b..e0cfd8b6299 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c +++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c @@ -48,7 +48,10 @@ #include #include #include + +#include "src/core/ext/filters/client_channel/parse_address.h" #include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h" +#include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/executor.h" #include "src/core/lib/iomgr/iomgr_internal.h" #include "src/core/lib/iomgr/sockaddr_utils.h" @@ -58,6 +61,8 @@ static gpr_once g_basic_init = GPR_ONCE_INIT; static gpr_mu g_init_mu; typedef struct grpc_ares_request { + /** indicates the DNS server to use, if specified */ + struct ares_addr_port_node dns_server_addr; /** following members are set in grpc_resolve_address_ares_impl */ /** host to resolve, parsed from the name to resolve */ char *host; @@ -192,11 +197,12 @@ static void on_done_cb(void *arg, int status, int timeouts, grpc_ares_request_unref(NULL, r); } -void grpc_resolve_address_ares_impl(grpc_exec_ctx *exec_ctx, const char *name, - const char *default_port, - grpc_pollset_set *interested_parties, - grpc_closure *on_done, - grpc_resolved_addresses **addrs) { +void grpc_dns_lookup_ares(grpc_exec_ctx *exec_ctx, const char *dns_server, + const char *name, const char *default_port, + grpc_pollset_set *interested_parties, + grpc_closure *on_done, + grpc_resolved_addresses **addrs) { + grpc_error *error = GRPC_ERROR_NONE; /* TODO(zyc): Enable tracing after #9603 is checked in */ /* if (grpc_dns_trace) { gpr_log(GPR_DEBUG, "resolve_address (blocking): name=%s, default_port=%s", @@ -208,28 +214,23 @@ void grpc_resolve_address_ares_impl(grpc_exec_ctx *exec_ctx, const char *name, char *port; gpr_split_host_port(name, &host, &port); if (host == NULL) { - grpc_error *err = grpc_error_set_str( + error = grpc_error_set_str( GRPC_ERROR_CREATE_FROM_STATIC_STRING("unparseable host:port"), GRPC_ERROR_STR_TARGET_ADDRESS, grpc_slice_from_copied_string(name)); - grpc_closure_sched(exec_ctx, on_done, err); goto error_cleanup; } else if (port == NULL) { if (default_port == NULL) { - grpc_error *err = grpc_error_set_str( + error = grpc_error_set_str( GRPC_ERROR_CREATE_FROM_STATIC_STRING("no port in name"), GRPC_ERROR_STR_TARGET_ADDRESS, grpc_slice_from_copied_string(name)); - grpc_closure_sched(exec_ctx, on_done, err); goto error_cleanup; } port = gpr_strdup(default_port); } grpc_ares_ev_driver *ev_driver; - grpc_error *err = grpc_ares_ev_driver_create(&ev_driver, interested_parties); - if (err != GRPC_ERROR_NONE) { - GRPC_LOG_IF_ERROR("grpc_ares_ev_driver_create() failed", err); - goto error_cleanup; - } + error = grpc_ares_ev_driver_create(&ev_driver, interested_parties); + if (error != GRPC_ERROR_NONE) goto error_cleanup; grpc_ares_request *r = gpr_malloc(sizeof(grpc_ares_request)); gpr_mu_init(&r->mu); @@ -242,6 +243,40 @@ void grpc_resolve_address_ares_impl(grpc_exec_ctx *exec_ctx, const char *name, r->success = false; r->error = GRPC_ERROR_NONE; ares_channel *channel = grpc_ares_ev_driver_get_channel(r->ev_driver); + + // If dns_server is specified, use it. + if (dns_server != NULL) { + gpr_log(GPR_INFO, "Using DNS server %s", dns_server); + grpc_resolved_address addr; + if (grpc_parse_ipv4_hostport(dns_server, &addr, false /* log_errors */)) { + r->dns_server_addr.family = AF_INET; + memcpy(&r->dns_server_addr.addr.addr4, addr.addr, addr.len); + r->dns_server_addr.tcp_port = grpc_sockaddr_get_port(&addr); + r->dns_server_addr.udp_port = grpc_sockaddr_get_port(&addr); + } else if (grpc_parse_ipv6_hostport(dns_server, &addr, + false /* log_errors */)) { + r->dns_server_addr.family = AF_INET6; + memcpy(&r->dns_server_addr.addr.addr6, addr.addr, addr.len); + r->dns_server_addr.tcp_port = grpc_sockaddr_get_port(&addr); + r->dns_server_addr.udp_port = grpc_sockaddr_get_port(&addr); + } else { + error = grpc_error_set_str( + GRPC_ERROR_CREATE_FROM_STATIC_STRING("cannot parse authority"), + GRPC_ERROR_STR_TARGET_ADDRESS, grpc_slice_from_copied_string(name)); + goto error_cleanup; + } + int status = ares_set_servers_ports(*channel, &r->dns_server_addr); + if (status != ARES_SUCCESS) { + char *error_msg; + gpr_asprintf(&error_msg, "C-ares status is not ARES_SUCCESS: %s", + ares_strerror(status)); + error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(error_msg); + gpr_free(error_msg); + goto error_cleanup; + } + } + // An extra reference is put here to avoid destroying the request in + // on_done_cb before calling grpc_ares_ev_driver_start. gpr_ref_init(&r->pending_queries, 2); if (grpc_ipv6_loopback_available()) { gpr_ref(&r->pending_queries); @@ -254,10 +289,20 @@ void grpc_resolve_address_ares_impl(grpc_exec_ctx *exec_ctx, const char *name, return; error_cleanup: + grpc_closure_sched(exec_ctx, on_done, error); gpr_free(host); gpr_free(port); } +void grpc_resolve_address_ares_impl(grpc_exec_ctx *exec_ctx, const char *name, + const char *default_port, + grpc_pollset_set *interested_parties, + grpc_closure *on_done, + grpc_resolved_addresses **addrs) { + grpc_dns_lookup_ares(exec_ctx, NULL /* dns_server */, name, default_port, + interested_parties, on_done, addrs); +} + void (*grpc_resolve_address_ares)( grpc_exec_ctx *exec_ctx, const char *name, const char *default_port, grpc_pollset_set *interested_parties, grpc_closure *on_done, diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h index 3dd40ea2687..84fd7fcbd6c 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h @@ -51,6 +51,12 @@ extern void (*grpc_resolve_address_ares)(grpc_exec_ctx *exec_ctx, grpc_closure *on_done, grpc_resolved_addresses **addresses); +void grpc_dns_lookup_ares(grpc_exec_ctx *exec_ctx, const char *dns_server, + const char *addr, const char *default_port, + grpc_pollset_set *interested_parties, + grpc_closure *on_done, + grpc_resolved_addresses **addresses); + /* Initialize gRPC ares wrapper. Must be called at least once before grpc_resolve_address_ares(). */ grpc_error *grpc_ares_init(void); From 191f1eb48e1c33a6b07cf3faef565246931c56eb Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Thu, 18 May 2017 15:16:16 -0700 Subject: [PATCH 42/62] Remove loop initial declaration --- test/core/end2end/fixtures/h2_full+workarounds.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/core/end2end/fixtures/h2_full+workarounds.c b/test/core/end2end/fixtures/h2_full+workarounds.c index 2e9264ffa63..fcb2024645b 100644 --- a/test/core/end2end/fixtures/h2_full+workarounds.c +++ b/test/core/end2end/fixtures/h2_full+workarounds.c @@ -83,10 +83,11 @@ void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f, void chttp2_init_server_fullstack(grpc_end2end_test_fixture *f, grpc_channel_args *server_args) { + int i; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; fullstack_fixture_data *ffd = f->fixture_data; grpc_arg args[GRPC_MAX_WORKAROUND_ID]; - for (uint32_t i = 0; i < GRPC_MAX_WORKAROUND_ID; i++) { + for (i = 0; i < GRPC_MAX_WORKAROUND_ID; i++) { args[i].key = workarounds_arg[i]; args[i].type = GRPC_ARG_INTEGER; args[i].value.integer = 1; From 01635d1ea85fec4bec5e1f161a1f2cb56604bd46 Mon Sep 17 00:00:00 2001 From: ncteisen Date: Thu, 18 May 2017 18:00:37 -0700 Subject: [PATCH 43/62] Add trace protector to flag --- src/core/ext/transport/chttp2/transport/chttp2_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index e3fb230069d..f3268bcfcac 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -2168,7 +2168,7 @@ static void update_frame(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, if (delta == 0 || (delta > -frame_size / 10 && delta < frame_size / 10)) { return; } - if (grpc_bdp_estimator_trace) { + if (GRPC_TRACER_ON(grpc_bdp_estimator_trace)) { gpr_log(GPR_DEBUG, "%s: update max_frame size to %d", t->peer_string, (int)frame_size); } From 0408aa85d9ce45485f868ffdc0cfca77d84e4602 Mon Sep 17 00:00:00 2001 From: Wenbo Zhu Date: Thu, 18 May 2017 19:02:42 -0700 Subject: [PATCH 44/62] Update PROTOCOL-WEB.md Clarify the content type requirement (for message formats). --- doc/PROTOCOL-WEB.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/PROTOCOL-WEB.md b/doc/PROTOCOL-WEB.md index 5f37df9b0f3..3fe6deb14f3 100644 --- a/doc/PROTOCOL-WEB.md +++ b/doc/PROTOCOL-WEB.md @@ -37,6 +37,7 @@ Content-Type 1. application/grpc-web * e.g. application/grpc-web+[proto, json, thrift] + * the message format, e.g. +proto, +json, should always be specified by the sender 2. application/grpc-web-text * text-encoded streams of “application/grpc-web” * e.g. application/grpc-web-text+[proto, thrift] From 1de945b378917baebc96eb88f2b36877515faf7c Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 19 May 2017 17:33:21 +0200 Subject: [PATCH 45/62] dont concatenate strings when status is OK --- src/csharp/Grpc.Core/Internal/CallError.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/csharp/Grpc.Core/Internal/CallError.cs b/src/csharp/Grpc.Core/Internal/CallError.cs index 541575f5e64..a46f9b38598 100644 --- a/src/csharp/Grpc.Core/Internal/CallError.cs +++ b/src/csharp/Grpc.Core/Internal/CallError.cs @@ -72,7 +72,10 @@ namespace Grpc.Core.Internal /// public static void CheckOk(this CallError callError) { - GrpcPreconditions.CheckState(callError == CallError.OK, "Call error: " + callError); + if (callError != CallError.OK) + { + throw new InvalidOperationException("Call error: " + callError); + } } } } From b2e4bfa1ef0c10a1ad363c655d2f74f1ab9e5790 Mon Sep 17 00:00:00 2001 From: Yong Ni Date: Tue, 9 May 2017 18:12:10 -0700 Subject: [PATCH 46/62] Merge matrix feature branch into master. Features included in this merge: - Added script to build and upload docker image for matrix test. - Added script to create test cases and created go__master testcases based on it. - Created dictionary for runtimes and gRPC releases for supported languages. - Added go 1.7 and 1.8 Dockerfile/templates. See tools/interop_matrix/README.md for details. --- .../dockerfile/go_build_interop.sh.include | 47 +++ .../build_interop.sh.template | 3 + .../build_interop.sh.template | 3 + third_party/protobuf | 2 +- tools/README.md | 2 + .../grpc_interop_go1.7/build_interop.sh | 48 ++++ .../grpc_interop_go1.8/build_interop.sh | 48 ++++ tools/gcp/utils/gcr_upload.py | 119 -------- tools/interop_matrix/README.md | 40 +++ tools/interop_matrix/client_matrix.py | 48 ++++ tools/interop_matrix/create_matrix_images.py | 272 ++++++++++++++++++ tools/interop_matrix/create_testcases.sh | 81 ++++++ tools/interop_matrix/testcases/go__master | 11 + .../dockerize/build_interop_image.sh | 13 +- tools/run_tests/run_interop_tests.py | 16 +- 15 files changed, 624 insertions(+), 129 deletions(-) create mode 100755 templates/tools/dockerfile/go_build_interop.sh.include create mode 100644 templates/tools/dockerfile/interoptest/grpc_interop_go1.7/build_interop.sh.template create mode 100644 templates/tools/dockerfile/interoptest/grpc_interop_go1.8/build_interop.sh.template create mode 100644 tools/dockerfile/interoptest/grpc_interop_go1.7/build_interop.sh create mode 100644 tools/dockerfile/interoptest/grpc_interop_go1.8/build_interop.sh delete mode 100755 tools/gcp/utils/gcr_upload.py create mode 100644 tools/interop_matrix/README.md create mode 100644 tools/interop_matrix/client_matrix.py create mode 100755 tools/interop_matrix/create_matrix_images.py create mode 100755 tools/interop_matrix/create_testcases.sh create mode 100755 tools/interop_matrix/testcases/go__master diff --git a/templates/tools/dockerfile/go_build_interop.sh.include b/templates/tools/dockerfile/go_build_interop.sh.include new file mode 100755 index 00000000000..46aabc6b384 --- /dev/null +++ b/templates/tools/dockerfile/go_build_interop.sh.include @@ -0,0 +1,47 @@ +#!/bin/bash +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# Builds Go interop server and client in a base image. +set -e + +# Clone just the grpc-go source code without any dependencies. +# We are cloning from a local git repo that contains the right revision +# to test instead of using "go get" to download from Github directly. +git clone --recursive /var/local/jenkins/grpc-go src/google.golang.org/grpc + +# Get all gRPC Go dependencies +(cd src/google.golang.org/grpc && make deps && make testdeps) + +# copy service account keys if available +cp -r /var/local/jenkins/service_account $HOME || true + +# Build the interop client and server +(cd src/google.golang.org/grpc/interop/client && go install) +(cd src/google.golang.org/grpc/interop/server && go install) diff --git a/templates/tools/dockerfile/interoptest/grpc_interop_go1.7/build_interop.sh.template b/templates/tools/dockerfile/interoptest/grpc_interop_go1.7/build_interop.sh.template new file mode 100644 index 00000000000..a08798b1d6b --- /dev/null +++ b/templates/tools/dockerfile/interoptest/grpc_interop_go1.7/build_interop.sh.template @@ -0,0 +1,3 @@ +%YAML 1.2 +--- | + <%include file="../../go_build_interop.sh.include"/> diff --git a/templates/tools/dockerfile/interoptest/grpc_interop_go1.8/build_interop.sh.template b/templates/tools/dockerfile/interoptest/grpc_interop_go1.8/build_interop.sh.template new file mode 100644 index 00000000000..a08798b1d6b --- /dev/null +++ b/templates/tools/dockerfile/interoptest/grpc_interop_go1.8/build_interop.sh.template @@ -0,0 +1,3 @@ +%YAML 1.2 +--- | + <%include file="../../go_build_interop.sh.include"/> diff --git a/third_party/protobuf b/third_party/protobuf index a6189acd18b..593e917c176 160000 --- a/third_party/protobuf +++ b/third_party/protobuf @@ -1 +1 @@ -Subproject commit a6189acd18b00611c1dc7042299ad75486f08a1a +Subproject commit 593e917c176b5bc5aafa57bf9f6030d749d91cd5 diff --git a/tools/README.md b/tools/README.md index 62e91246d0a..3cef618179d 100644 --- a/tools/README.md +++ b/tools/README.md @@ -13,6 +13,8 @@ container engine, BigQuery etc) internal_ci: Support for running tests on an internal CI platform. +interop_matrix: Scripts to build, upload, and run gRPC clients in docker with various language/runtimes. + jenkins: Support for running tests on Jenkins. run_tests: Scripts to run gRPC tests in parallel. diff --git a/tools/dockerfile/interoptest/grpc_interop_go1.7/build_interop.sh b/tools/dockerfile/interoptest/grpc_interop_go1.7/build_interop.sh new file mode 100644 index 00000000000..5eca90cdead --- /dev/null +++ b/tools/dockerfile/interoptest/grpc_interop_go1.7/build_interop.sh @@ -0,0 +1,48 @@ +#!/bin/bash +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# Builds Go interop server and client in a base image. +set -e + +# Clone just the grpc-go source code without any dependencies. +# We are cloning from a local git repo that contains the right revision +# to test instead of using "go get" to download from Github directly. +git clone --recursive /var/local/jenkins/grpc-go src/google.golang.org/grpc + +# Get all gRPC Go dependencies +(cd src/google.golang.org/grpc && make deps && make testdeps) + +# copy service account keys if available +cp -r /var/local/jenkins/service_account $HOME || true + +# Build the interop client and server +(cd src/google.golang.org/grpc/interop/client && go install) +(cd src/google.golang.org/grpc/interop/server && go install) + diff --git a/tools/dockerfile/interoptest/grpc_interop_go1.8/build_interop.sh b/tools/dockerfile/interoptest/grpc_interop_go1.8/build_interop.sh new file mode 100644 index 00000000000..5eca90cdead --- /dev/null +++ b/tools/dockerfile/interoptest/grpc_interop_go1.8/build_interop.sh @@ -0,0 +1,48 @@ +#!/bin/bash +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# Builds Go interop server and client in a base image. +set -e + +# Clone just the grpc-go source code without any dependencies. +# We are cloning from a local git repo that contains the right revision +# to test instead of using "go get" to download from Github directly. +git clone --recursive /var/local/jenkins/grpc-go src/google.golang.org/grpc + +# Get all gRPC Go dependencies +(cd src/google.golang.org/grpc && make deps && make testdeps) + +# copy service account keys if available +cp -r /var/local/jenkins/service_account $HOME || true + +# Build the interop client and server +(cd src/google.golang.org/grpc/interop/client && go install) +(cd src/google.golang.org/grpc/interop/server && go install) + diff --git a/tools/gcp/utils/gcr_upload.py b/tools/gcp/utils/gcr_upload.py deleted file mode 100755 index b22f8731f68..00000000000 --- a/tools/gcp/utils/gcr_upload.py +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/env python2.7 -# Copyright 2017, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Upload docker images to Google Container Registry.""" - -from __future__ import print_function - -import argparse -import atexit -import os -import shutil -import subprocess -import tempfile - -argp = argparse.ArgumentParser(description='Run interop tests.') -argp.add_argument('--gcr_path', - default='gcr.io/grpc-testing', - help='Path of docker images in Google Container Registry') - -argp.add_argument('--gcr_tag', - default='latest', - help='the tag string for the images to upload') - -argp.add_argument('--with_files', - default=[], - nargs='+', - help='additional files to include in the docker image') - -argp.add_argument('--with_file_dest', - default='/var/local/image_info', - help='Destination directory for with_files inside docker image') - -argp.add_argument('--images', - default=[], - nargs='+', - help='local docker images in the form of repo:tag ' + - '(i.e. grpc_interop_java:26328ad8) to upload') - -argp.add_argument('--keep', - action='store_true', - help='keep the created local images after uploading to GCR') - - -args = argp.parse_args() - -def upload_to_gcr(image): - """Tags and Pushes a docker image in Google Containger Registry. - - image: docker image name, i.e. grpc_interop_java:26328ad8 - - A docker image image_foo:tag_old will be uploaded as - /image_foo: - after inserting extra with_files under with_file_dest in the image. The - original image name will be stored as label original_name:"image_foo:tag_old". - """ - tag_idx = image.find(':') - if tag_idx == -1: - print('Failed to parse docker image name %s' % image) - return False - new_tag = '%s/%s:%s' % (args.gcr_path, image[:tag_idx], args.gcr_tag) - - lines = ['FROM ' + image] - lines.append('LABEL original_name="%s"' % image) - - temp_dir = tempfile.mkdtemp() - atexit.register(lambda: subprocess.call(['rm', '-rf', temp_dir])) - - # Copy with_files inside the tmp directory, which will be the docker build - # context. - for f in args.with_files: - shutil.copy(f, temp_dir) - lines.append('COPY %s %s/' % (os.path.basename(f), args.with_file_dest)) - - # Create a Dockerfile. - with open(os.path.join(temp_dir, 'Dockerfile'), 'w') as f: - f.write('\n'.join(lines)) - - build_cmd = ['docker', 'build', '--rm', '--tag', new_tag, temp_dir] - subprocess.check_output(build_cmd) - - if not args.keep: - atexit.register(lambda: subprocess.call(['docker', 'rmi', new_tag])) - - # Upload to GCR. - if args.gcr_path: - subprocess.call(['gcloud', 'docker', '--', 'push', new_tag]) - - return True - - -for image in args.images: - upload_to_gcr(image) diff --git a/tools/interop_matrix/README.md b/tools/interop_matrix/README.md new file mode 100644 index 00000000000..8493099d1a0 --- /dev/null +++ b/tools/interop_matrix/README.md @@ -0,0 +1,40 @@ +# Overview + +This directory contains scripts that facilitate building and running gRPC tests for combinations of language/runtimes (known as matrix). + +The setup builds gRPC docker images for each language/runtime and upload it to Google Container Registry (GCR). These images, encapsulating gRPC stack +from specific releases/tag, are used to test version compatiblity between gRPC release versions. + +## Instructions for creating GCR images +- Edit `./client_matrix.py` to include desired gRPC release. +- Run `tools/interop_matrix/create_matrix_images.py`. Useful options: + - `--git_checkout` enables git checkout grpc release branch/tag. + - `--release` specifies a git release tag. Make sure it is a valid tag in the grpc github rep. + - `--language` specifies a language. + For examle, To build all languages for all gRPC releases across all runtimes, do `tools/interop_matrix/create_matrix_images.py --git_checkout --release=all`. +- Verify the newly created docker images are uploaded to GCR. For example: + - `gcloud beta container images list --repository gcr.io/grpc-testing` shows image repos. + - `gcloud beta container images list-tags gcr.io/grpc-testing/grpc_interop_go1.7` show tags for a image repo. + +## Instructions for adding new language/runtimes* +- Create new `Dockerfile.template`, `build_interop.sh.template` for the language/runtime under `template/tools/dockerfile/`. +- Run `tools/buildgen/generate_projects.sh` to create corresponding files under `tools/dockerfile/`. +- Add language/runtimes to `client_matrix.py` following existing language/runtimes examples. +- Run `tools/interop_matrix/create_matrix_images.py` which will build and upload images to GCR. Unless you are also building images for a gRPC release, make sure not to set `--gcr_tag` (the default tag 'master' is used for testing). + +*: Please delete your docker images at https://pantheon.corp.google.com/gcr/images/grpc-testing?project=grpc-testing afterwards. Permissions to access GrpcTesting project is required for this step. + +## Instructions for creating new test cases +- Create test cases by running `LANG= [RELEASE=] ./create_testcases.sh`. For example, + - `LANG=go ./create_testcases.sh` will generate `./testcases/go__master`, which is also a functional bash script. + - `LANG=go KEEP_IMAGE=1 ./create_testcases.sh` will generate `./testcases/go__master` and keep the local docker image so it can be invoked simply via `./testcases/go__master`. Note: remove local docker images manually afterwards with `docker rmi `. +- Stage and commit the generated test case file `./testcases/__`. + +## Instructions for running test cases against a GCR image +- Run test cases by specifying `docker_image` variable inline with the test case script created above. +For example: + - `docker_image=gcr.io/grpc-testing/grpc_interop_go1.7:master ./testcases/go__master` will run go__master test cases against `go1.7` with gRPC release `master` docker image in GCR. + + +Note: +- File path starting with `tools/` or `template/` are relative to the grpc repo root dir. File path starting with `./` are relative to current directory (`tools/interop_matrix`). diff --git a/tools/interop_matrix/client_matrix.py b/tools/interop_matrix/client_matrix.py new file mode 100644 index 00000000000..b06b0b7205e --- /dev/null +++ b/tools/interop_matrix/client_matrix.py @@ -0,0 +1,48 @@ +#!/usr/bin/env python2.7 +# Copyright 2017, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Dictionaries used for client matrix testing. + +def get_github_repo(lang): + return { + 'go': 'git@github.com:grpc/grpc-go.git', + 'java': 'git@github.com:grpc/grpc-java.git', + }.get(lang, 'git@github.com:grpc/grpc.git') + +# Dictionary of runtimes per language +LANG_RUNTIME_MATRIX = { + 'go': ['go1.7', 'go1.8'], +} + +# Dictionary of releases per language. For each language, we need to provide +# a tuple of release tag (used as the tag for the GCR image) and also github hash. +LANG_RELEASE_MATRIX = { + 'go': ['v1.0.1-GA', 'v1.3.0'], +} diff --git a/tools/interop_matrix/create_matrix_images.py b/tools/interop_matrix/create_matrix_images.py new file mode 100755 index 00000000000..582b4cccfc6 --- /dev/null +++ b/tools/interop_matrix/create_matrix_images.py @@ -0,0 +1,272 @@ +#!/usr/bin/env python2.7 +# Copyright 2017, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +"""Build and upload docker images to Google Container Registry per matrix.""" + +from __future__ import print_function + +import argparse +import atexit +import multiprocessing +import os +import shutil +import subprocess +import sys +import tempfile + +# Langauage Runtime Matrix +import client_matrix + +python_util_dir = os.path.abspath(os.path.join( + os.path.dirname(__file__), '../run_tests/python_utils')) +sys.path.append(python_util_dir) +import dockerjob +import jobset + +_IMAGE_BUILDER = 'tools/run_tests/dockerize/build_interop_image.sh' +_LANGUAGES = client_matrix.LANG_RUNTIME_MATRIX.keys() +# All gRPC release tags, flattened, deduped and sorted. +_RELEASES = sorted(list(set( + i for l in client_matrix.LANG_RELEASE_MATRIX.values() for i in l))) + +# Destination directory inside docker image to keep extra info from build time. +_BUILD_INFO = '/var/local/build_info' + +argp = argparse.ArgumentParser(description='Run interop tests.') +argp.add_argument('--gcr_path', + default='gcr.io/grpc-testing', + help='Path of docker images in Google Container Registry') + +argp.add_argument('--release', + default='master', + choices=['all', 'master'] + _RELEASES, + help='github commit tag to checkout. When building all ' + 'releases defined in client_matrix.py, use "all". Valid only ' + 'with --git_checkout.') + +argp.add_argument('-l', '--language', + choices=['all'] + sorted(_LANGUAGES), + nargs='+', + default=['all'], + help='Test languages to build docker images for.') + +argp.add_argument('--git_checkout', + action='store_true', + help='Use a separate git clone tree for building grpc stack. ' + 'Required when using --release flag. By default, current' + 'tree and the sibling will be used for building grpc stack.') + +argp.add_argument('--git_checkout_root', + default='/export/hda3/tmp/grpc_matrix', + help='Directory under which grpc-go/java/main repo will be ' + 'cloned. Valid only with --git_checkout.') + +argp.add_argument('--keep', + action='store_true', + help='keep the created local images after uploading to GCR') + + +args = argp.parse_args() + +def add_files_to_image(image, with_files, label=None): + """Add files to a docker image. + + image: docker image name, i.e. grpc_interop_java:26328ad8 + with_files: additional files to include in the docker image. + label: label string to attach to the image. + """ + tag_idx = image.find(':') + if tag_idx == -1: + jobset.message('FAILED', 'invalid docker image %s' % image, do_newline=True) + sys.exit(1) + orig_tag = '%s_' % image + subprocess.check_output(['docker', 'tag', image, orig_tag]) + + lines = ['FROM ' + orig_tag] + if label: + lines.append('LABEL %s' % label) + + temp_dir = tempfile.mkdtemp() + atexit.register(lambda: subprocess.call(['rm', '-rf', temp_dir])) + + # Copy with_files inside the tmp directory, which will be the docker build + # context. + for f in with_files: + shutil.copy(f, temp_dir) + lines.append('COPY %s %s/' % (os.path.basename(f), _BUILD_INFO)) + + # Create a Dockerfile. + with open(os.path.join(temp_dir, 'Dockerfile'), 'w') as f: + f.write('\n'.join(lines)) + + jobset.message('START', 'Repackaging %s' % image, do_newline=True) + build_cmd = ['docker', 'build', '--rm', '--tag', image, temp_dir] + subprocess.check_output(build_cmd) + dockerjob.remove_image(orig_tag, skip_nonexistent=True) + +def build_image_jobspec(runtime, env, gcr_tag): + """Build interop docker image for a language with runtime. + + runtime: a string, for example go1.8. + env: dictionary of env to passed to the build script. + gcr_tag: the tag for the docker image (i.e. v1.3.0). + """ + basename = 'grpc_interop_%s' % runtime + tag = '%s/%s:%s' % (args.gcr_path, basename, gcr_tag) + build_env = { + 'INTEROP_IMAGE': tag, + 'BASE_NAME': basename, + 'TTY_FLAG': '-t' + } + build_env.update(env) + build_job = jobset.JobSpec( + cmdline=[_IMAGE_BUILDER], + environ=build_env, + shortname='build_docker_%s' % runtime, + timeout_seconds=30*60) + build_job.tag = tag + return build_job + +def build_all_images_for_lang(lang): + """Build all docker images for a language across releases and runtimes.""" + if not args.git_checkout: + if args.release != 'master': + print('WARNING: --release is set but will be ignored\n') + releases = ['master'] + else: + if args.release == 'all': + releases = client_matrix.LANG_RELEASE_MATRIX[lang] + else: + # Build a particular release. + if args.release not in ['master'] + client_matrix.LANG_RELEASE_MATRIX[lang]: + jobset.message('SKIPPED', + '%s for %s is not defined' % (args.release, lang), + do_newline=True) + return [] + releases = [args.release] + + images = [] + for release in releases: + images += build_all_images_for_release(lang, release) + jobset.message('SUCCESS', + 'All docker images built for %s at %s.' % (lang, releases), + do_newline=True) + return images + +def build_all_images_for_release(lang, release): + """Build all docker images for a release across all runtimes.""" + docker_images = [] + build_jobs = [] + + env = {} + # If we not using current tree or the sibling for grpc stack, do checkout. + if args.git_checkout: + stack_base = checkout_grpc_stack(lang, release) + var ={'go': 'GRPC_GO_ROOT', 'java': 'GRPC_JAVA_ROOT'}.get(lang, 'GRPC_ROOT') + env[var] = stack_base + + for runtime in client_matrix.LANG_RUNTIME_MATRIX[lang]: + job = build_image_jobspec(runtime, env, release) + docker_images.append(job.tag) + build_jobs.append(job) + + jobset.message('START', 'Building interop docker images.', do_newline=True) + print('Jobs to run: \n%s\n' % '\n'.join(str(j) for j in build_jobs)) + + num_failures, _ = jobset.run( + build_jobs, newline_on_success=True, maxjobs=multiprocessing.cpu_count()) + if num_failures: + jobset.message('FAILED', 'Failed to build interop docker images.', + do_newline=True) + docker_images_cleanup.extend(docker_images) + sys.exit(1) + + jobset.message('SUCCESS', + 'All docker images built for %s at %s.' % (lang, release), + do_newline=True) + + if release != 'master': + commit_log = os.path.join(stack_base, 'commit_log') + if os.path.exists(commit_log): + for image in docker_images: + add_files_to_image(image, [commit_log], 'release=%s' % release) + return docker_images + +def cleanup(): + if not args.keep: + for image in docker_images_cleanup: + dockerjob.remove_image(image, skip_nonexistent=True) + +docker_images_cleanup = [] +atexit.register(cleanup) + +def checkout_grpc_stack(lang, release): + """Invokes 'git check' for the lang/release and returns directory created.""" + assert args.git_checkout and args.git_checkout_root + + if not os.path.exists(args.git_checkout_root): + os.makedirs(args.git_checkout_root) + + repo = client_matrix.get_github_repo(lang) + # Get the subdir name part of repo + # For example, 'git@github.com:grpc/grpc-go.git' should use 'grpc-go'. + repo_dir = os.path.splitext(os.path.basename(repo))[0] + stack_base = os.path.join(args.git_checkout_root, repo_dir) + + # Assume the directory is reusable for git checkout. + if not os.path.exists(stack_base): + subprocess.check_call(['git', 'clone', '--recursive', repo], + cwd=os.path.dirname(stack_base)) + + # git checkout. + jobset.message('START', 'git checkout %s from %s' % (release, stack_base), + do_newline=True) + # We should NEVER do checkout on current tree !!! + assert not os.path.dirname(__file__).startswith(stack_base) + output = subprocess.check_output( + ['git', 'checkout', release], cwd=stack_base, stderr=subprocess.STDOUT) + commit_log = subprocess.check_output(['git', 'log', '-1'], cwd=stack_base) + jobset.message('SUCCESS', 'git checkout', output + commit_log, do_newline=True) + + # Write git log to commit_log so it can be packaged with the docker image. + with open(os.path.join(stack_base, 'commit_log'), 'w') as f: + f.write(commit_log) + return stack_base + +languages = args.language if args.language != ['all'] else _LANGUAGES +for lang in languages: + docker_images = build_all_images_for_lang(lang) + for image in docker_images: + jobset.message('START', 'Uploading %s' % image, do_newline=True) + # docker image name must be in the format /: + assert image.startswith(args.gcr_path) and image.find(':') != -1 + + # subprocess.call(['gcloud', 'docker', '--', 'push', image]) + subprocess.call(['gcloud', 'docker', '--', 'push', image]) diff --git a/tools/interop_matrix/create_testcases.sh b/tools/interop_matrix/create_testcases.sh new file mode 100755 index 00000000000..cbdd388306a --- /dev/null +++ b/tools/interop_matrix/create_testcases.sh @@ -0,0 +1,81 @@ +%#!/bin/bash +#% Copyright 2017, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Creates test cases for a language by running run_interop_test in manual mode +# and save the generated output under ./testcases/__. +# +# Params: +# LANG - The language. +# SKIP_TEST - If set, skip running the test cases for sanity. +# RELEASE - Create testcase for specific release, defautl to 'master'. +# KEEP_IMAGE - Do not clean local docker image created for the test cases. + +set -e + +cd $(dirname $0)/../.. +GRPC_ROOT=$(pwd) +CMDS_SH="${GRPC_ROOT}/interop_client_cmds.sh" +TESTCASES_DIR=${GRPC_ROOT}/tools/interop_matrix/testcases + +echo "Create '$LANG' test cases for gRPC release '${RELEASE:=master}'" + +# Invoke run_interop_test in manual mode. +${GRPC_ROOT}/tools/run_tests/run_interop_tests.py -l $LANG --use_docker \ + --cloud_to_prod --manual_run + +# Clean up +function cleanup { + [ -z "$testcase" ] && testcase=$CMDS_SH + echo "testcase: $testcase" + if [ -e $testcase ]; then + # The script should generate a line with "${docker_image:=...}". + eval docker_image=$(grep -oe '${docker_image:=.*}' $testcase) + if [ -z "$KEEP_IMAGE" ]; then + echo "Clean up docker_image $docker_image" + docker rmi -f $docker_image + else + echo "Kept docker_image $docker_image" + fi + fi + [ -e "$CMDS_SH" ] && rm $CMDS_SH +} +trap cleanup EXIT +# Running the testcases as sanity unless we are asked to skip. +[ -z "$SKIP_TEST" ] && (echo "Running test cases: $CMDS_SH"; sh $CMDS_SH) + +mkdir -p $TESTCASES_DIR +testcase=$TESTCASES_DIR/${LANG}__$RELEASE +if [ -e $testcase ]; then + echo "Updating: $testcase" + diff $testcase $CMDS_SH || true +fi +mv $CMDS_SH $testcase +chmod a+x $testcase +echo "Test cases created: $testcase" diff --git a/tools/interop_matrix/testcases/go__master b/tools/interop_matrix/testcases/go__master new file mode 100755 index 00000000000..2624c7f92c5 --- /dev/null +++ b/tools/interop_matrix/testcases/go__master @@ -0,0 +1,11 @@ +#!/bin/bash +echo "Testing ${docker_image:=grpc_interop_go:41fffd01-a6c8-41b6-8136-c0aaa1ec2437}" +docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary" +docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary" +docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong" +docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream" +docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming" +docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming" +docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin" +docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response" +docker run -i --rm=true -w /go/src/google.golang.org/grpc/interop/client --net=host $docker_image bash -c "go run client.go --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server" diff --git a/tools/run_tests/dockerize/build_interop_image.sh b/tools/run_tests/dockerize/build_interop_image.sh index 3385738f9c3..a1c78d7b269 100755 --- a/tools/run_tests/dockerize/build_interop_image.sh +++ b/tools/run_tests/dockerize/build_interop_image.sh @@ -39,21 +39,24 @@ set -x # TTY_FLAG - optional -t flag to make docker allocate tty # BUILD_INTEROP_DOCKER_EXTRA_ARGS - optional args to be passed to the # docker run command +# GRPC_ROOT - grpc base directory, default to top of this tree. +# GRPC_GO_ROOT - grpc-go base directory, default to '$GRPC_ROOT/../grpc-go' +# GRPC_JAVA_ROOT - grpc-java base directory, default to '$GRPC_ROOT/../grpc-java' cd `dirname $0`/../../.. -GRPC_ROOT=`pwd` +echo "GRPC_ROOT: ${GRPC_ROOT:=$(pwd)}" MOUNT_ARGS="-v $GRPC_ROOT:/var/local/jenkins/grpc:ro" -GRPC_JAVA_ROOT=`cd ../grpc-java && pwd` -if [ "$GRPC_JAVA_ROOT" != "" ] +echo "GRPC_JAVA_ROOT: ${GRPC_JAVA_ROOT:=$(cd ../grpc-java && pwd)}" +if [ -n "$GRPC_JAVA_ROOT" ] then MOUNT_ARGS+=" -v $GRPC_JAVA_ROOT:/var/local/jenkins/grpc-java:ro" else echo "WARNING: grpc-java not found, it won't be mounted to the docker container." fi -GRPC_GO_ROOT=`cd ../grpc-go && pwd` -if [ "$GRPC_GO_ROOT" != "" ] +echo "GRPC_GO_ROOT: ${GRPC_GO_ROOT:=$(cd ../grpc-go && pwd)}" +if [ -n "$GRPC_GO_ROOT" ] then MOUNT_ARGS+=" -v $GRPC_GO_ROOT:/var/local/jenkins/grpc-go:ro" else diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py index ae2da26e1ff..6da7b854308 100755 --- a/tools/run_tests/run_interop_tests.py +++ b/tools/run_tests/run_interop_tests.py @@ -544,12 +544,14 @@ def docker_run_cmdline(cmdline, image, docker_args=[], cwd=None, environ=None): return docker_cmdline -def manual_cmdline(docker_cmdline): +def manual_cmdline(docker_cmdline, docker_image): """Returns docker cmdline adjusted for manual invocation.""" print_cmdline = [] for item in docker_cmdline: if item.startswith('--name='): continue + if item == docker_image: + item = "$docker_image" # add quotes when necessary if any(character.isspace() for character in item): item = "\"%s\"" % item @@ -644,7 +646,9 @@ def cloud_to_prod_jobspec(language, test_case, server_host_name, docker_args=['--net=host', '--name=%s' % container_name]) if manual_cmd_log is not None: - manual_cmd_log.append(manual_cmdline(cmdline)) + if manual_cmd_log == []: + manual_cmd_log.append('echo "Testing ${docker_image:=%s}"' % docker_image) + manual_cmd_log.append(manual_cmdline(cmdline, docker_image)) cwd = None environ = None @@ -710,7 +714,9 @@ def cloud_to_cloud_jobspec(language, test_case, server_name, server_host, docker_args=['--net=host', '--name=%s' % container_name]) if manual_cmd_log is not None: - manual_cmd_log.append(manual_cmdline(cmdline)) + if manual_cmd_log == []: + manual_cmd_log.append('echo "Testing ${docker_image:=%s}"' % docker_image) + manual_cmd_log.append(manual_cmdline(cmdline, docker_iamge)) cwd = None test_job = jobset.JobSpec( @@ -770,7 +776,9 @@ def server_jobspec(language, docker_image, insecure=False, manual_cmd_log=None): environ=environ, docker_args=docker_args) if manual_cmd_log is not None: - manual_cmd_log.append(manual_cmdline(docker_cmdline)) + if manual_cmd_log == []: + manual_cmd_log.append('echo "Testing ${docker_image:=%s}"' % docker_image) + manual_cmd_log.append(manual_cmdline(docker_cmdline, docker_iamge)) server_job = jobset.JobSpec( cmdline=docker_cmdline, environ=environ, From f9ca15406613ec9b516acf30a814f2bba260ae11 Mon Sep 17 00:00:00 2001 From: Wenbo Zhu Date: Fri, 19 May 2017 10:33:06 -0700 Subject: [PATCH 47/62] Update PROTOCOL-WEB.md --- doc/PROTOCOL-WEB.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/PROTOCOL-WEB.md b/doc/PROTOCOL-WEB.md index 3fe6deb14f3..b6ea3ecabe7 100644 --- a/doc/PROTOCOL-WEB.md +++ b/doc/PROTOCOL-WEB.md @@ -37,7 +37,8 @@ Content-Type 1. application/grpc-web * e.g. application/grpc-web+[proto, json, thrift] - * the message format, e.g. +proto, +json, should always be specified by the sender + * the sender should always specifiy the message format, e.g. +proto, +json + * the receiver should assume the default is "+proto" when the message format is mssing in the C-T, i.e. "application/grpc-web" 2. application/grpc-web-text * text-encoded streams of “application/grpc-web” * e.g. application/grpc-web-text+[proto, thrift] From 69ac56f7c0332a5c0c17deae54cbc11045c83890 Mon Sep 17 00:00:00 2001 From: Wenbo Zhu Date: Fri, 19 May 2017 12:15:26 -0700 Subject: [PATCH 48/62] Update PROTOCOL-WEB.md --- doc/PROTOCOL-WEB.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/PROTOCOL-WEB.md b/doc/PROTOCOL-WEB.md index b6ea3ecabe7..10998899c43 100644 --- a/doc/PROTOCOL-WEB.md +++ b/doc/PROTOCOL-WEB.md @@ -37,8 +37,8 @@ Content-Type 1. application/grpc-web * e.g. application/grpc-web+[proto, json, thrift] - * the sender should always specifiy the message format, e.g. +proto, +json - * the receiver should assume the default is "+proto" when the message format is mssing in the C-T, i.e. "application/grpc-web" + * the sender should always specify the message format, e.g. +proto, +json + * the receiver should assume the default is "+proto" when the message format is missing in Content-Type (as "application/grpc-web") 2. application/grpc-web-text * text-encoded streams of “application/grpc-web” * e.g. application/grpc-web-text+[proto, thrift] From c97d093a2c7fad64dfa0674f50bf2a0d002b0914 Mon Sep 17 00:00:00 2001 From: yang-g Date: Fri, 19 May 2017 13:04:34 -0700 Subject: [PATCH 49/62] Use deps rather than uses --- build.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.yaml b/build.yaml index ecd9ebe5b7b..30c7a8e5edd 100644 --- a/build.yaml +++ b/build.yaml @@ -960,9 +960,10 @@ filegroups: - src/cpp/util/status.cc - src/cpp/util/string_ref.cc - src/cpp/util/time_cc.cc + deps: + - grpc uses: - grpc++_codegen_base - - grpc_base - nanopb - name: grpc++_codegen_base language: c++ From 75ea6a279cda53114f0a0a0f12895b684803ce6f Mon Sep 17 00:00:00 2001 From: yang-g Date: Fri, 19 May 2017 13:06:37 -0700 Subject: [PATCH 50/62] regenerate project --- CMakeLists.txt | 335 +------- Makefile | 362 +------- tools/doxygen/Doxyfile.c++ | 13 +- tools/doxygen/Doxyfile.c++.internal | 251 ------ .../generated/sources_and_headers.json | 6 +- vsprojects/grpc.sln | 2 +- vsprojects/vcxproj/grpc++/grpc++.vcxproj | 381 --------- .../vcxproj/grpc++/grpc++.vcxproj.filters | 789 ------------------ .../grpc++_unsecure/grpc++_unsecure.vcxproj | 381 +-------- .../grpc++_unsecure.vcxproj.filters | 789 ------------------ 10 files changed, 81 insertions(+), 3228 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d10c0409b69..1a235456021 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2273,133 +2273,6 @@ add_library(grpc++ src/cpp/util/status.cc src/cpp/util/string_ref.cc src/cpp/util/time_cc.cc - src/core/lib/channel/channel_args.c - src/core/lib/channel/channel_stack.c - src/core/lib/channel/channel_stack_builder.c - src/core/lib/channel/connected_channel.c - src/core/lib/channel/handshaker.c - src/core/lib/channel/handshaker_factory.c - src/core/lib/channel/handshaker_registry.c - src/core/lib/compression/compression.c - src/core/lib/compression/message_compress.c - src/core/lib/http/format_request.c - src/core/lib/http/httpcli.c - src/core/lib/http/parser.c - src/core/lib/iomgr/closure.c - src/core/lib/iomgr/combiner.c - src/core/lib/iomgr/endpoint.c - src/core/lib/iomgr/endpoint_pair_posix.c - src/core/lib/iomgr/endpoint_pair_uv.c - src/core/lib/iomgr/endpoint_pair_windows.c - src/core/lib/iomgr/error.c - src/core/lib/iomgr/ev_epoll1_linux.c - src/core/lib/iomgr/ev_epoll_limited_pollers_linux.c - src/core/lib/iomgr/ev_epoll_thread_pool_linux.c - src/core/lib/iomgr/ev_epollex_linux.c - src/core/lib/iomgr/ev_epollsig_linux.c - src/core/lib/iomgr/ev_poll_posix.c - src/core/lib/iomgr/ev_posix.c - src/core/lib/iomgr/ev_windows.c - src/core/lib/iomgr/exec_ctx.c - src/core/lib/iomgr/executor.c - src/core/lib/iomgr/iocp_windows.c - src/core/lib/iomgr/iomgr.c - src/core/lib/iomgr/iomgr_posix.c - src/core/lib/iomgr/iomgr_uv.c - src/core/lib/iomgr/iomgr_windows.c - src/core/lib/iomgr/is_epollexclusive_available.c - src/core/lib/iomgr/load_file.c - src/core/lib/iomgr/lockfree_event.c - src/core/lib/iomgr/network_status_tracker.c - src/core/lib/iomgr/polling_entity.c - src/core/lib/iomgr/pollset_set_uv.c - src/core/lib/iomgr/pollset_set_windows.c - src/core/lib/iomgr/pollset_uv.c - src/core/lib/iomgr/pollset_windows.c - src/core/lib/iomgr/resolve_address_posix.c - src/core/lib/iomgr/resolve_address_uv.c - src/core/lib/iomgr/resolve_address_windows.c - src/core/lib/iomgr/resource_quota.c - src/core/lib/iomgr/sockaddr_utils.c - src/core/lib/iomgr/socket_factory_posix.c - src/core/lib/iomgr/socket_mutator.c - src/core/lib/iomgr/socket_utils_common_posix.c - src/core/lib/iomgr/socket_utils_linux.c - src/core/lib/iomgr/socket_utils_posix.c - src/core/lib/iomgr/socket_utils_uv.c - src/core/lib/iomgr/socket_utils_windows.c - src/core/lib/iomgr/socket_windows.c - src/core/lib/iomgr/tcp_client_posix.c - src/core/lib/iomgr/tcp_client_uv.c - src/core/lib/iomgr/tcp_client_windows.c - src/core/lib/iomgr/tcp_posix.c - src/core/lib/iomgr/tcp_server_posix.c - src/core/lib/iomgr/tcp_server_utils_posix_common.c - src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c - src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c - src/core/lib/iomgr/tcp_server_uv.c - src/core/lib/iomgr/tcp_server_windows.c - src/core/lib/iomgr/tcp_uv.c - src/core/lib/iomgr/tcp_windows.c - src/core/lib/iomgr/time_averaged_stats.c - src/core/lib/iomgr/timer_generic.c - src/core/lib/iomgr/timer_heap.c - src/core/lib/iomgr/timer_manager.c - src/core/lib/iomgr/timer_uv.c - src/core/lib/iomgr/udp_server.c - src/core/lib/iomgr/unix_sockets_posix.c - src/core/lib/iomgr/unix_sockets_posix_noop.c - src/core/lib/iomgr/wakeup_fd_cv.c - src/core/lib/iomgr/wakeup_fd_eventfd.c - src/core/lib/iomgr/wakeup_fd_nospecial.c - src/core/lib/iomgr/wakeup_fd_pipe.c - src/core/lib/iomgr/wakeup_fd_posix.c - src/core/lib/iomgr/workqueue_uv.c - src/core/lib/iomgr/workqueue_windows.c - src/core/lib/json/json.c - src/core/lib/json/json_reader.c - src/core/lib/json/json_string.c - src/core/lib/json/json_writer.c - src/core/lib/slice/b64.c - src/core/lib/slice/percent_encoding.c - src/core/lib/slice/slice.c - src/core/lib/slice/slice_buffer.c - src/core/lib/slice/slice_hash_table.c - src/core/lib/slice/slice_intern.c - src/core/lib/slice/slice_string_helpers.c - src/core/lib/surface/alarm.c - src/core/lib/surface/api_trace.c - src/core/lib/surface/byte_buffer.c - src/core/lib/surface/byte_buffer_reader.c - src/core/lib/surface/call.c - src/core/lib/surface/call_details.c - src/core/lib/surface/call_log_batch.c - src/core/lib/surface/channel.c - src/core/lib/surface/channel_init.c - src/core/lib/surface/channel_ping.c - src/core/lib/surface/channel_stack_type.c - src/core/lib/surface/completion_queue.c - src/core/lib/surface/completion_queue_factory.c - src/core/lib/surface/event_string.c - src/core/lib/surface/lame_client.cc - src/core/lib/surface/metadata_array.c - src/core/lib/surface/server.c - src/core/lib/surface/validate_metadata.c - src/core/lib/surface/version.c - src/core/lib/transport/bdp_estimator.c - src/core/lib/transport/byte_stream.c - src/core/lib/transport/connectivity_state.c - src/core/lib/transport/error_utils.c - src/core/lib/transport/metadata.c - src/core/lib/transport/metadata_batch.c - src/core/lib/transport/pid_controller.c - src/core/lib/transport/service_config.c - src/core/lib/transport/static_metadata.c - src/core/lib/transport/status_conversion.c - src/core/lib/transport/timeout_encoding.c - src/core/lib/transport/transport.c - src/core/lib/transport/transport_op_string.c - src/core/lib/debug/trace.c third_party/nanopb/pb_common.c third_party/nanopb/pb_decode.c third_party/nanopb/pb_encode.c @@ -2440,7 +2313,6 @@ target_link_libraries(grpc++ ${_gRPC_PROTOBUF_LIBRARIES} ${_gRPC_ALLTARGETS_LIBRARIES} grpc - gpr ) foreach(_hdr @@ -2537,17 +2409,6 @@ foreach(_hdr include/grpc/impl/codegen/sync_generic.h include/grpc/impl/codegen/sync_posix.h include/grpc/impl/codegen/sync_windows.h - include/grpc/byte_buffer.h - include/grpc/byte_buffer_reader.h - include/grpc/compression.h - include/grpc/grpc.h - include/grpc/grpc_posix.h - include/grpc/grpc_security_constants.h - include/grpc/load_reporting.h - include/grpc/slice.h - include/grpc/slice_buffer.h - include/grpc/status.h - include/grpc/support/workaround_list.h include/grpc++/impl/codegen/proto_utils.h include/grpc++/impl/codegen/config_protobuf.h ) @@ -2606,6 +2467,34 @@ add_library(grpc++_cronet src/cpp/util/status.cc src/cpp/util/string_ref.cc src/cpp/util/time_cc.cc + third_party/nanopb/pb_common.c + third_party/nanopb/pb_decode.c + third_party/nanopb/pb_encode.c + src/cpp/codegen/codegen_init.cc + src/core/ext/transport/chttp2/client/insecure/channel_create.c + src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c + src/core/ext/transport/chttp2/client/chttp2_connector.c + src/core/ext/transport/chttp2/transport/bin_decoder.c + src/core/ext/transport/chttp2/transport/bin_encoder.c + src/core/ext/transport/chttp2/transport/chttp2_plugin.c + src/core/ext/transport/chttp2/transport/chttp2_transport.c + src/core/ext/transport/chttp2/transport/frame_data.c + src/core/ext/transport/chttp2/transport/frame_goaway.c + src/core/ext/transport/chttp2/transport/frame_ping.c + src/core/ext/transport/chttp2/transport/frame_rst_stream.c + src/core/ext/transport/chttp2/transport/frame_settings.c + src/core/ext/transport/chttp2/transport/frame_window_update.c + src/core/ext/transport/chttp2/transport/hpack_encoder.c + src/core/ext/transport/chttp2/transport/hpack_parser.c + src/core/ext/transport/chttp2/transport/hpack_table.c + src/core/ext/transport/chttp2/transport/http2_settings.c + src/core/ext/transport/chttp2/transport/huffsyms.c + src/core/ext/transport/chttp2/transport/incoming_metadata.c + src/core/ext/transport/chttp2/transport/parsing.c + src/core/ext/transport/chttp2/transport/stream_lists.c + src/core/ext/transport/chttp2/transport/stream_map.c + src/core/ext/transport/chttp2/transport/varint.c + src/core/ext/transport/chttp2/transport/writing.c src/core/lib/channel/channel_args.c src/core/lib/channel/channel_stack.c src/core/lib/channel/channel_stack_builder.c @@ -2733,34 +2622,6 @@ add_library(grpc++_cronet src/core/lib/transport/transport.c src/core/lib/transport/transport_op_string.c src/core/lib/debug/trace.c - third_party/nanopb/pb_common.c - third_party/nanopb/pb_decode.c - third_party/nanopb/pb_encode.c - src/cpp/codegen/codegen_init.cc - src/core/ext/transport/chttp2/client/insecure/channel_create.c - src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c - src/core/ext/transport/chttp2/client/chttp2_connector.c - src/core/ext/transport/chttp2/transport/bin_decoder.c - src/core/ext/transport/chttp2/transport/bin_encoder.c - src/core/ext/transport/chttp2/transport/chttp2_plugin.c - src/core/ext/transport/chttp2/transport/chttp2_transport.c - src/core/ext/transport/chttp2/transport/frame_data.c - src/core/ext/transport/chttp2/transport/frame_goaway.c - src/core/ext/transport/chttp2/transport/frame_ping.c - src/core/ext/transport/chttp2/transport/frame_rst_stream.c - src/core/ext/transport/chttp2/transport/frame_settings.c - src/core/ext/transport/chttp2/transport/frame_window_update.c - src/core/ext/transport/chttp2/transport/hpack_encoder.c - src/core/ext/transport/chttp2/transport/hpack_parser.c - src/core/ext/transport/chttp2/transport/hpack_table.c - src/core/ext/transport/chttp2/transport/http2_settings.c - src/core/ext/transport/chttp2/transport/huffsyms.c - src/core/ext/transport/chttp2/transport/incoming_metadata.c - src/core/ext/transport/chttp2/transport/parsing.c - src/core/ext/transport/chttp2/transport/stream_lists.c - src/core/ext/transport/chttp2/transport/stream_map.c - src/core/ext/transport/chttp2/transport/varint.c - src/core/ext/transport/chttp2/transport/writing.c src/core/ext/transport/chttp2/alpn/alpn.c src/core/ext/filters/http/client/http_client_filter.c src/core/ext/filters/http/http_filters_plugin.c @@ -2841,6 +2702,7 @@ target_link_libraries(grpc++_cronet ${_gRPC_ALLTARGETS_LIBRARIES} gpr grpc_cronet + grpc ) foreach(_hdr @@ -3383,133 +3245,6 @@ add_library(grpc++_unsecure src/cpp/util/status.cc src/cpp/util/string_ref.cc src/cpp/util/time_cc.cc - src/core/lib/channel/channel_args.c - src/core/lib/channel/channel_stack.c - src/core/lib/channel/channel_stack_builder.c - src/core/lib/channel/connected_channel.c - src/core/lib/channel/handshaker.c - src/core/lib/channel/handshaker_factory.c - src/core/lib/channel/handshaker_registry.c - src/core/lib/compression/compression.c - src/core/lib/compression/message_compress.c - src/core/lib/http/format_request.c - src/core/lib/http/httpcli.c - src/core/lib/http/parser.c - src/core/lib/iomgr/closure.c - src/core/lib/iomgr/combiner.c - src/core/lib/iomgr/endpoint.c - src/core/lib/iomgr/endpoint_pair_posix.c - src/core/lib/iomgr/endpoint_pair_uv.c - src/core/lib/iomgr/endpoint_pair_windows.c - src/core/lib/iomgr/error.c - src/core/lib/iomgr/ev_epoll1_linux.c - src/core/lib/iomgr/ev_epoll_limited_pollers_linux.c - src/core/lib/iomgr/ev_epoll_thread_pool_linux.c - src/core/lib/iomgr/ev_epollex_linux.c - src/core/lib/iomgr/ev_epollsig_linux.c - src/core/lib/iomgr/ev_poll_posix.c - src/core/lib/iomgr/ev_posix.c - src/core/lib/iomgr/ev_windows.c - src/core/lib/iomgr/exec_ctx.c - src/core/lib/iomgr/executor.c - src/core/lib/iomgr/iocp_windows.c - src/core/lib/iomgr/iomgr.c - src/core/lib/iomgr/iomgr_posix.c - src/core/lib/iomgr/iomgr_uv.c - src/core/lib/iomgr/iomgr_windows.c - src/core/lib/iomgr/is_epollexclusive_available.c - src/core/lib/iomgr/load_file.c - src/core/lib/iomgr/lockfree_event.c - src/core/lib/iomgr/network_status_tracker.c - src/core/lib/iomgr/polling_entity.c - src/core/lib/iomgr/pollset_set_uv.c - src/core/lib/iomgr/pollset_set_windows.c - src/core/lib/iomgr/pollset_uv.c - src/core/lib/iomgr/pollset_windows.c - src/core/lib/iomgr/resolve_address_posix.c - src/core/lib/iomgr/resolve_address_uv.c - src/core/lib/iomgr/resolve_address_windows.c - src/core/lib/iomgr/resource_quota.c - src/core/lib/iomgr/sockaddr_utils.c - src/core/lib/iomgr/socket_factory_posix.c - src/core/lib/iomgr/socket_mutator.c - src/core/lib/iomgr/socket_utils_common_posix.c - src/core/lib/iomgr/socket_utils_linux.c - src/core/lib/iomgr/socket_utils_posix.c - src/core/lib/iomgr/socket_utils_uv.c - src/core/lib/iomgr/socket_utils_windows.c - src/core/lib/iomgr/socket_windows.c - src/core/lib/iomgr/tcp_client_posix.c - src/core/lib/iomgr/tcp_client_uv.c - src/core/lib/iomgr/tcp_client_windows.c - src/core/lib/iomgr/tcp_posix.c - src/core/lib/iomgr/tcp_server_posix.c - src/core/lib/iomgr/tcp_server_utils_posix_common.c - src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c - src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c - src/core/lib/iomgr/tcp_server_uv.c - src/core/lib/iomgr/tcp_server_windows.c - src/core/lib/iomgr/tcp_uv.c - src/core/lib/iomgr/tcp_windows.c - src/core/lib/iomgr/time_averaged_stats.c - src/core/lib/iomgr/timer_generic.c - src/core/lib/iomgr/timer_heap.c - src/core/lib/iomgr/timer_manager.c - src/core/lib/iomgr/timer_uv.c - src/core/lib/iomgr/udp_server.c - src/core/lib/iomgr/unix_sockets_posix.c - src/core/lib/iomgr/unix_sockets_posix_noop.c - src/core/lib/iomgr/wakeup_fd_cv.c - src/core/lib/iomgr/wakeup_fd_eventfd.c - src/core/lib/iomgr/wakeup_fd_nospecial.c - src/core/lib/iomgr/wakeup_fd_pipe.c - src/core/lib/iomgr/wakeup_fd_posix.c - src/core/lib/iomgr/workqueue_uv.c - src/core/lib/iomgr/workqueue_windows.c - src/core/lib/json/json.c - src/core/lib/json/json_reader.c - src/core/lib/json/json_string.c - src/core/lib/json/json_writer.c - src/core/lib/slice/b64.c - src/core/lib/slice/percent_encoding.c - src/core/lib/slice/slice.c - src/core/lib/slice/slice_buffer.c - src/core/lib/slice/slice_hash_table.c - src/core/lib/slice/slice_intern.c - src/core/lib/slice/slice_string_helpers.c - src/core/lib/surface/alarm.c - src/core/lib/surface/api_trace.c - src/core/lib/surface/byte_buffer.c - src/core/lib/surface/byte_buffer_reader.c - src/core/lib/surface/call.c - src/core/lib/surface/call_details.c - src/core/lib/surface/call_log_batch.c - src/core/lib/surface/channel.c - src/core/lib/surface/channel_init.c - src/core/lib/surface/channel_ping.c - src/core/lib/surface/channel_stack_type.c - src/core/lib/surface/completion_queue.c - src/core/lib/surface/completion_queue_factory.c - src/core/lib/surface/event_string.c - src/core/lib/surface/lame_client.cc - src/core/lib/surface/metadata_array.c - src/core/lib/surface/server.c - src/core/lib/surface/validate_metadata.c - src/core/lib/surface/version.c - src/core/lib/transport/bdp_estimator.c - src/core/lib/transport/byte_stream.c - src/core/lib/transport/connectivity_state.c - src/core/lib/transport/error_utils.c - src/core/lib/transport/metadata.c - src/core/lib/transport/metadata_batch.c - src/core/lib/transport/pid_controller.c - src/core/lib/transport/service_config.c - src/core/lib/transport/static_metadata.c - src/core/lib/transport/status_conversion.c - src/core/lib/transport/timeout_encoding.c - src/core/lib/transport/transport.c - src/core/lib/transport/transport_op_string.c - src/core/lib/debug/trace.c third_party/nanopb/pb_common.c third_party/nanopb/pb_decode.c third_party/nanopb/pb_encode.c @@ -3550,6 +3285,7 @@ target_link_libraries(grpc++_unsecure ${_gRPC_ALLTARGETS_LIBRARIES} gpr grpc_unsecure + grpc ) foreach(_hdr @@ -3646,17 +3382,6 @@ foreach(_hdr include/grpc/impl/codegen/sync_generic.h include/grpc/impl/codegen/sync_posix.h include/grpc/impl/codegen/sync_windows.h - include/grpc/byte_buffer.h - include/grpc/byte_buffer_reader.h - include/grpc/compression.h - include/grpc/grpc.h - include/grpc/grpc_posix.h - include/grpc/grpc_security_constants.h - include/grpc/load_reporting.h - include/grpc/slice.h - include/grpc/slice_buffer.h - include/grpc/status.h - include/grpc/support/workaround_list.h ) string(REPLACE "include/" "" _path ${_hdr}) get_filename_component(_path ${_path} PATH) diff --git a/Makefile b/Makefile index e6dd66e12fa..5e5cd956bb8 100644 --- a/Makefile +++ b/Makefile @@ -4196,133 +4196,6 @@ LIBGRPC++_SRC = \ src/cpp/util/status.cc \ src/cpp/util/string_ref.cc \ src/cpp/util/time_cc.cc \ - src/core/lib/channel/channel_args.c \ - src/core/lib/channel/channel_stack.c \ - src/core/lib/channel/channel_stack_builder.c \ - src/core/lib/channel/connected_channel.c \ - src/core/lib/channel/handshaker.c \ - src/core/lib/channel/handshaker_factory.c \ - src/core/lib/channel/handshaker_registry.c \ - src/core/lib/compression/compression.c \ - src/core/lib/compression/message_compress.c \ - src/core/lib/http/format_request.c \ - src/core/lib/http/httpcli.c \ - src/core/lib/http/parser.c \ - src/core/lib/iomgr/closure.c \ - src/core/lib/iomgr/combiner.c \ - src/core/lib/iomgr/endpoint.c \ - src/core/lib/iomgr/endpoint_pair_posix.c \ - src/core/lib/iomgr/endpoint_pair_uv.c \ - src/core/lib/iomgr/endpoint_pair_windows.c \ - src/core/lib/iomgr/error.c \ - src/core/lib/iomgr/ev_epoll1_linux.c \ - src/core/lib/iomgr/ev_epoll_limited_pollers_linux.c \ - src/core/lib/iomgr/ev_epoll_thread_pool_linux.c \ - src/core/lib/iomgr/ev_epollex_linux.c \ - src/core/lib/iomgr/ev_epollsig_linux.c \ - src/core/lib/iomgr/ev_poll_posix.c \ - src/core/lib/iomgr/ev_posix.c \ - src/core/lib/iomgr/ev_windows.c \ - src/core/lib/iomgr/exec_ctx.c \ - src/core/lib/iomgr/executor.c \ - src/core/lib/iomgr/iocp_windows.c \ - src/core/lib/iomgr/iomgr.c \ - src/core/lib/iomgr/iomgr_posix.c \ - src/core/lib/iomgr/iomgr_uv.c \ - src/core/lib/iomgr/iomgr_windows.c \ - src/core/lib/iomgr/is_epollexclusive_available.c \ - src/core/lib/iomgr/load_file.c \ - src/core/lib/iomgr/lockfree_event.c \ - src/core/lib/iomgr/network_status_tracker.c \ - src/core/lib/iomgr/polling_entity.c \ - src/core/lib/iomgr/pollset_set_uv.c \ - src/core/lib/iomgr/pollset_set_windows.c \ - src/core/lib/iomgr/pollset_uv.c \ - src/core/lib/iomgr/pollset_windows.c \ - src/core/lib/iomgr/resolve_address_posix.c \ - src/core/lib/iomgr/resolve_address_uv.c \ - src/core/lib/iomgr/resolve_address_windows.c \ - src/core/lib/iomgr/resource_quota.c \ - src/core/lib/iomgr/sockaddr_utils.c \ - src/core/lib/iomgr/socket_factory_posix.c \ - src/core/lib/iomgr/socket_mutator.c \ - src/core/lib/iomgr/socket_utils_common_posix.c \ - src/core/lib/iomgr/socket_utils_linux.c \ - src/core/lib/iomgr/socket_utils_posix.c \ - src/core/lib/iomgr/socket_utils_uv.c \ - src/core/lib/iomgr/socket_utils_windows.c \ - src/core/lib/iomgr/socket_windows.c \ - src/core/lib/iomgr/tcp_client_posix.c \ - src/core/lib/iomgr/tcp_client_uv.c \ - src/core/lib/iomgr/tcp_client_windows.c \ - src/core/lib/iomgr/tcp_posix.c \ - src/core/lib/iomgr/tcp_server_posix.c \ - src/core/lib/iomgr/tcp_server_utils_posix_common.c \ - src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c \ - src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c \ - src/core/lib/iomgr/tcp_server_uv.c \ - src/core/lib/iomgr/tcp_server_windows.c \ - src/core/lib/iomgr/tcp_uv.c \ - src/core/lib/iomgr/tcp_windows.c \ - src/core/lib/iomgr/time_averaged_stats.c \ - src/core/lib/iomgr/timer_generic.c \ - src/core/lib/iomgr/timer_heap.c \ - src/core/lib/iomgr/timer_manager.c \ - src/core/lib/iomgr/timer_uv.c \ - src/core/lib/iomgr/udp_server.c \ - src/core/lib/iomgr/unix_sockets_posix.c \ - src/core/lib/iomgr/unix_sockets_posix_noop.c \ - src/core/lib/iomgr/wakeup_fd_cv.c \ - src/core/lib/iomgr/wakeup_fd_eventfd.c \ - src/core/lib/iomgr/wakeup_fd_nospecial.c \ - src/core/lib/iomgr/wakeup_fd_pipe.c \ - src/core/lib/iomgr/wakeup_fd_posix.c \ - src/core/lib/iomgr/workqueue_uv.c \ - src/core/lib/iomgr/workqueue_windows.c \ - src/core/lib/json/json.c \ - src/core/lib/json/json_reader.c \ - src/core/lib/json/json_string.c \ - src/core/lib/json/json_writer.c \ - src/core/lib/slice/b64.c \ - src/core/lib/slice/percent_encoding.c \ - src/core/lib/slice/slice.c \ - src/core/lib/slice/slice_buffer.c \ - src/core/lib/slice/slice_hash_table.c \ - src/core/lib/slice/slice_intern.c \ - src/core/lib/slice/slice_string_helpers.c \ - src/core/lib/surface/alarm.c \ - src/core/lib/surface/api_trace.c \ - src/core/lib/surface/byte_buffer.c \ - src/core/lib/surface/byte_buffer_reader.c \ - src/core/lib/surface/call.c \ - src/core/lib/surface/call_details.c \ - src/core/lib/surface/call_log_batch.c \ - src/core/lib/surface/channel.c \ - src/core/lib/surface/channel_init.c \ - src/core/lib/surface/channel_ping.c \ - src/core/lib/surface/channel_stack_type.c \ - src/core/lib/surface/completion_queue.c \ - src/core/lib/surface/completion_queue_factory.c \ - src/core/lib/surface/event_string.c \ - src/core/lib/surface/lame_client.cc \ - src/core/lib/surface/metadata_array.c \ - src/core/lib/surface/server.c \ - src/core/lib/surface/validate_metadata.c \ - src/core/lib/surface/version.c \ - src/core/lib/transport/bdp_estimator.c \ - src/core/lib/transport/byte_stream.c \ - src/core/lib/transport/connectivity_state.c \ - src/core/lib/transport/error_utils.c \ - src/core/lib/transport/metadata.c \ - src/core/lib/transport/metadata_batch.c \ - src/core/lib/transport/pid_controller.c \ - src/core/lib/transport/service_config.c \ - src/core/lib/transport/static_metadata.c \ - src/core/lib/transport/status_conversion.c \ - src/core/lib/transport/timeout_encoding.c \ - src/core/lib/transport/transport.c \ - src/core/lib/transport/transport_op_string.c \ - src/core/lib/debug/trace.c \ third_party/nanopb/pb_common.c \ third_party/nanopb/pb_decode.c \ third_party/nanopb/pb_encode.c \ @@ -4422,17 +4295,6 @@ PUBLIC_HEADERS_CXX += \ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_windows.h \ - include/grpc/byte_buffer.h \ - include/grpc/byte_buffer_reader.h \ - include/grpc/compression.h \ - include/grpc/grpc.h \ - include/grpc/grpc_posix.h \ - include/grpc/grpc_security_constants.h \ - include/grpc/load_reporting.h \ - include/grpc/slice.h \ - include/grpc/slice_buffer.h \ - include/grpc/status.h \ - include/grpc/support/workaround_list.h \ include/grpc++/impl/codegen/proto_utils.h \ include/grpc++/impl/codegen/config_protobuf.h \ @@ -4471,18 +4333,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION_CPP).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc$(SHARED_VERSION_CORE)-dll -lgpr$(SHARED_VERSION_CORE)-dll + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION_CPP).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc$(SHARED_VERSION_CORE)-dll else -$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT_CORE) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT_CORE) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc -lgpr + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc -lgpr + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP).so.1 $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP).so endif @@ -4537,6 +4399,34 @@ LIBGRPC++_CRONET_SRC = \ src/cpp/util/status.cc \ src/cpp/util/string_ref.cc \ src/cpp/util/time_cc.cc \ + third_party/nanopb/pb_common.c \ + third_party/nanopb/pb_decode.c \ + third_party/nanopb/pb_encode.c \ + src/cpp/codegen/codegen_init.cc \ + src/core/ext/transport/chttp2/client/insecure/channel_create.c \ + src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c \ + src/core/ext/transport/chttp2/client/chttp2_connector.c \ + src/core/ext/transport/chttp2/transport/bin_decoder.c \ + src/core/ext/transport/chttp2/transport/bin_encoder.c \ + src/core/ext/transport/chttp2/transport/chttp2_plugin.c \ + src/core/ext/transport/chttp2/transport/chttp2_transport.c \ + src/core/ext/transport/chttp2/transport/frame_data.c \ + src/core/ext/transport/chttp2/transport/frame_goaway.c \ + src/core/ext/transport/chttp2/transport/frame_ping.c \ + src/core/ext/transport/chttp2/transport/frame_rst_stream.c \ + src/core/ext/transport/chttp2/transport/frame_settings.c \ + src/core/ext/transport/chttp2/transport/frame_window_update.c \ + src/core/ext/transport/chttp2/transport/hpack_encoder.c \ + src/core/ext/transport/chttp2/transport/hpack_parser.c \ + src/core/ext/transport/chttp2/transport/hpack_table.c \ + src/core/ext/transport/chttp2/transport/http2_settings.c \ + src/core/ext/transport/chttp2/transport/huffsyms.c \ + src/core/ext/transport/chttp2/transport/incoming_metadata.c \ + src/core/ext/transport/chttp2/transport/parsing.c \ + src/core/ext/transport/chttp2/transport/stream_lists.c \ + src/core/ext/transport/chttp2/transport/stream_map.c \ + src/core/ext/transport/chttp2/transport/varint.c \ + src/core/ext/transport/chttp2/transport/writing.c \ src/core/lib/channel/channel_args.c \ src/core/lib/channel/channel_stack.c \ src/core/lib/channel/channel_stack_builder.c \ @@ -4664,34 +4554,6 @@ LIBGRPC++_CRONET_SRC = \ src/core/lib/transport/transport.c \ src/core/lib/transport/transport_op_string.c \ src/core/lib/debug/trace.c \ - third_party/nanopb/pb_common.c \ - third_party/nanopb/pb_decode.c \ - third_party/nanopb/pb_encode.c \ - src/cpp/codegen/codegen_init.cc \ - src/core/ext/transport/chttp2/client/insecure/channel_create.c \ - src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c \ - src/core/ext/transport/chttp2/client/chttp2_connector.c \ - src/core/ext/transport/chttp2/transport/bin_decoder.c \ - src/core/ext/transport/chttp2/transport/bin_encoder.c \ - src/core/ext/transport/chttp2/transport/chttp2_plugin.c \ - src/core/ext/transport/chttp2/transport/chttp2_transport.c \ - src/core/ext/transport/chttp2/transport/frame_data.c \ - src/core/ext/transport/chttp2/transport/frame_goaway.c \ - src/core/ext/transport/chttp2/transport/frame_ping.c \ - src/core/ext/transport/chttp2/transport/frame_rst_stream.c \ - src/core/ext/transport/chttp2/transport/frame_settings.c \ - src/core/ext/transport/chttp2/transport/frame_window_update.c \ - src/core/ext/transport/chttp2/transport/hpack_encoder.c \ - src/core/ext/transport/chttp2/transport/hpack_parser.c \ - src/core/ext/transport/chttp2/transport/hpack_table.c \ - src/core/ext/transport/chttp2/transport/http2_settings.c \ - src/core/ext/transport/chttp2/transport/huffsyms.c \ - src/core/ext/transport/chttp2/transport/incoming_metadata.c \ - src/core/ext/transport/chttp2/transport/parsing.c \ - src/core/ext/transport/chttp2/transport/stream_lists.c \ - src/core/ext/transport/chttp2/transport/stream_map.c \ - src/core/ext/transport/chttp2/transport/varint.c \ - src/core/ext/transport/chttp2/transport/writing.c \ src/core/ext/transport/chttp2/alpn/alpn.c \ src/core/ext/filters/http/client/http_client_filter.c \ src/core/ext/filters/http/http_filters_plugin.c \ @@ -4878,18 +4740,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc++_cronet$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_CRONET_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/grpc++_cronet$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_CRONET_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/grpc_cronet$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_cronet$(SHARED_VERSION_CPP).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_cronet$(SHARED_VERSION_CPP)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_cronet$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_CRONET_OBJS) $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgpr$(SHARED_VERSION_CORE)-dll -lgrpc_cronet$(SHARED_VERSION_CORE)-dll + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_cronet$(SHARED_VERSION_CPP).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_cronet$(SHARED_VERSION_CPP)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_cronet$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_CRONET_OBJS) $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgpr$(SHARED_VERSION_CORE)-dll -lgrpc_cronet$(SHARED_VERSION_CORE)-dll -lgrpc$(SHARED_VERSION_CORE)-dll else -$(LIBDIR)/$(CONFIG)/libgrpc++_cronet$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_CRONET_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_cronet.$(SHARED_EXT_CORE) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/libgrpc++_cronet$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_CRONET_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_cronet.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT_CORE) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_cronet$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_CRONET_OBJS) $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgpr -lgrpc_cronet + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_cronet$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_CRONET_OBJS) $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgpr -lgrpc_cronet -lgrpc else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_cronet.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++_cronet$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_CRONET_OBJS) $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgpr -lgrpc_cronet + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_cronet.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++_cronet$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_CRONET_OBJS) $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgpr -lgrpc_cronet -lgrpc $(Q) ln -sf $(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc++_cronet$(SHARED_VERSION_CPP).so.1 $(Q) ln -sf $(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc++_cronet$(SHARED_VERSION_CPP).so endif @@ -5304,133 +5166,6 @@ LIBGRPC++_UNSECURE_SRC = \ src/cpp/util/status.cc \ src/cpp/util/string_ref.cc \ src/cpp/util/time_cc.cc \ - src/core/lib/channel/channel_args.c \ - src/core/lib/channel/channel_stack.c \ - src/core/lib/channel/channel_stack_builder.c \ - src/core/lib/channel/connected_channel.c \ - src/core/lib/channel/handshaker.c \ - src/core/lib/channel/handshaker_factory.c \ - src/core/lib/channel/handshaker_registry.c \ - src/core/lib/compression/compression.c \ - src/core/lib/compression/message_compress.c \ - src/core/lib/http/format_request.c \ - src/core/lib/http/httpcli.c \ - src/core/lib/http/parser.c \ - src/core/lib/iomgr/closure.c \ - src/core/lib/iomgr/combiner.c \ - src/core/lib/iomgr/endpoint.c \ - src/core/lib/iomgr/endpoint_pair_posix.c \ - src/core/lib/iomgr/endpoint_pair_uv.c \ - src/core/lib/iomgr/endpoint_pair_windows.c \ - src/core/lib/iomgr/error.c \ - src/core/lib/iomgr/ev_epoll1_linux.c \ - src/core/lib/iomgr/ev_epoll_limited_pollers_linux.c \ - src/core/lib/iomgr/ev_epoll_thread_pool_linux.c \ - src/core/lib/iomgr/ev_epollex_linux.c \ - src/core/lib/iomgr/ev_epollsig_linux.c \ - src/core/lib/iomgr/ev_poll_posix.c \ - src/core/lib/iomgr/ev_posix.c \ - src/core/lib/iomgr/ev_windows.c \ - src/core/lib/iomgr/exec_ctx.c \ - src/core/lib/iomgr/executor.c \ - src/core/lib/iomgr/iocp_windows.c \ - src/core/lib/iomgr/iomgr.c \ - src/core/lib/iomgr/iomgr_posix.c \ - src/core/lib/iomgr/iomgr_uv.c \ - src/core/lib/iomgr/iomgr_windows.c \ - src/core/lib/iomgr/is_epollexclusive_available.c \ - src/core/lib/iomgr/load_file.c \ - src/core/lib/iomgr/lockfree_event.c \ - src/core/lib/iomgr/network_status_tracker.c \ - src/core/lib/iomgr/polling_entity.c \ - src/core/lib/iomgr/pollset_set_uv.c \ - src/core/lib/iomgr/pollset_set_windows.c \ - src/core/lib/iomgr/pollset_uv.c \ - src/core/lib/iomgr/pollset_windows.c \ - src/core/lib/iomgr/resolve_address_posix.c \ - src/core/lib/iomgr/resolve_address_uv.c \ - src/core/lib/iomgr/resolve_address_windows.c \ - src/core/lib/iomgr/resource_quota.c \ - src/core/lib/iomgr/sockaddr_utils.c \ - src/core/lib/iomgr/socket_factory_posix.c \ - src/core/lib/iomgr/socket_mutator.c \ - src/core/lib/iomgr/socket_utils_common_posix.c \ - src/core/lib/iomgr/socket_utils_linux.c \ - src/core/lib/iomgr/socket_utils_posix.c \ - src/core/lib/iomgr/socket_utils_uv.c \ - src/core/lib/iomgr/socket_utils_windows.c \ - src/core/lib/iomgr/socket_windows.c \ - src/core/lib/iomgr/tcp_client_posix.c \ - src/core/lib/iomgr/tcp_client_uv.c \ - src/core/lib/iomgr/tcp_client_windows.c \ - src/core/lib/iomgr/tcp_posix.c \ - src/core/lib/iomgr/tcp_server_posix.c \ - src/core/lib/iomgr/tcp_server_utils_posix_common.c \ - src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c \ - src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c \ - src/core/lib/iomgr/tcp_server_uv.c \ - src/core/lib/iomgr/tcp_server_windows.c \ - src/core/lib/iomgr/tcp_uv.c \ - src/core/lib/iomgr/tcp_windows.c \ - src/core/lib/iomgr/time_averaged_stats.c \ - src/core/lib/iomgr/timer_generic.c \ - src/core/lib/iomgr/timer_heap.c \ - src/core/lib/iomgr/timer_manager.c \ - src/core/lib/iomgr/timer_uv.c \ - src/core/lib/iomgr/udp_server.c \ - src/core/lib/iomgr/unix_sockets_posix.c \ - src/core/lib/iomgr/unix_sockets_posix_noop.c \ - src/core/lib/iomgr/wakeup_fd_cv.c \ - src/core/lib/iomgr/wakeup_fd_eventfd.c \ - src/core/lib/iomgr/wakeup_fd_nospecial.c \ - src/core/lib/iomgr/wakeup_fd_pipe.c \ - src/core/lib/iomgr/wakeup_fd_posix.c \ - src/core/lib/iomgr/workqueue_uv.c \ - src/core/lib/iomgr/workqueue_windows.c \ - src/core/lib/json/json.c \ - src/core/lib/json/json_reader.c \ - src/core/lib/json/json_string.c \ - src/core/lib/json/json_writer.c \ - src/core/lib/slice/b64.c \ - src/core/lib/slice/percent_encoding.c \ - src/core/lib/slice/slice.c \ - src/core/lib/slice/slice_buffer.c \ - src/core/lib/slice/slice_hash_table.c \ - src/core/lib/slice/slice_intern.c \ - src/core/lib/slice/slice_string_helpers.c \ - src/core/lib/surface/alarm.c \ - src/core/lib/surface/api_trace.c \ - src/core/lib/surface/byte_buffer.c \ - src/core/lib/surface/byte_buffer_reader.c \ - src/core/lib/surface/call.c \ - src/core/lib/surface/call_details.c \ - src/core/lib/surface/call_log_batch.c \ - src/core/lib/surface/channel.c \ - src/core/lib/surface/channel_init.c \ - src/core/lib/surface/channel_ping.c \ - src/core/lib/surface/channel_stack_type.c \ - src/core/lib/surface/completion_queue.c \ - src/core/lib/surface/completion_queue_factory.c \ - src/core/lib/surface/event_string.c \ - src/core/lib/surface/lame_client.cc \ - src/core/lib/surface/metadata_array.c \ - src/core/lib/surface/server.c \ - src/core/lib/surface/validate_metadata.c \ - src/core/lib/surface/version.c \ - src/core/lib/transport/bdp_estimator.c \ - src/core/lib/transport/byte_stream.c \ - src/core/lib/transport/connectivity_state.c \ - src/core/lib/transport/error_utils.c \ - src/core/lib/transport/metadata.c \ - src/core/lib/transport/metadata_batch.c \ - src/core/lib/transport/pid_controller.c \ - src/core/lib/transport/service_config.c \ - src/core/lib/transport/static_metadata.c \ - src/core/lib/transport/status_conversion.c \ - src/core/lib/transport/timeout_encoding.c \ - src/core/lib/transport/transport.c \ - src/core/lib/transport/transport_op_string.c \ - src/core/lib/debug/trace.c \ third_party/nanopb/pb_common.c \ third_party/nanopb/pb_decode.c \ third_party/nanopb/pb_encode.c \ @@ -5530,17 +5265,6 @@ PUBLIC_HEADERS_CXX += \ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_windows.h \ - include/grpc/byte_buffer.h \ - include/grpc/byte_buffer_reader.h \ - include/grpc/compression.h \ - include/grpc/grpc.h \ - include/grpc/grpc_posix.h \ - include/grpc/grpc_security_constants.h \ - include/grpc/load_reporting.h \ - include/grpc/slice.h \ - include/grpc/slice_buffer.h \ - include/grpc/status.h \ - include/grpc/support/workaround_list.h \ LIBGRPC++_UNSECURE_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_UNSECURE_SRC)))) @@ -5567,18 +5291,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) +$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION_CPP).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgpr$(SHARED_VERSION_CORE)-dll -lgrpc_unsecure$(SHARED_VERSION_CORE)-dll + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION_CPP).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgpr$(SHARED_VERSION_CORE)-dll -lgrpc_unsecure$(SHARED_VERSION_CORE)-dll -lgrpc$(SHARED_VERSION_CORE)-dll else -$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.$(SHARED_EXT_CORE) +$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT_CORE) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgpr -lgrpc_unsecure + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgpr -lgrpc_unsecure -lgrpc else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_unsecure.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgpr -lgrpc_unsecure + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_unsecure.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgpr -lgrpc_unsecure -lgrpc $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP).so.1 $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP).so endif diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index b6f2857b391..3861bdb85af 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -871,12 +871,6 @@ include/grpc++/support/string_ref.h \ include/grpc++/support/stub_options.h \ include/grpc++/support/sync_stream.h \ include/grpc++/support/time.h \ -include/grpc/byte_buffer.h \ -include/grpc/byte_buffer_reader.h \ -include/grpc/compression.h \ -include/grpc/grpc.h \ -include/grpc/grpc_posix.h \ -include/grpc/grpc_security_constants.h \ include/grpc/impl/codegen/atm.h \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ @@ -895,12 +889,7 @@ include/grpc/impl/codegen/status.h \ include/grpc/impl/codegen/sync.h \ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ -include/grpc/impl/codegen/sync_windows.h \ -include/grpc/load_reporting.h \ -include/grpc/slice.h \ -include/grpc/slice_buffer.h \ -include/grpc/status.h \ -include/grpc/support/workaround_list.h +include/grpc/impl/codegen/sync_windows.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 5242172f96d..5bab66c7d6a 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -872,12 +872,6 @@ include/grpc++/support/string_ref.h \ include/grpc++/support/stub_options.h \ include/grpc++/support/sync_stream.h \ include/grpc++/support/time.h \ -include/grpc/byte_buffer.h \ -include/grpc/byte_buffer_reader.h \ -include/grpc/compression.h \ -include/grpc/grpc.h \ -include/grpc/grpc_posix.h \ -include/grpc/grpc_security_constants.h \ include/grpc/impl/codegen/atm.h \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ @@ -897,251 +891,6 @@ include/grpc/impl/codegen/sync.h \ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_windows.h \ -include/grpc/load_reporting.h \ -include/grpc/slice.h \ -include/grpc/slice_buffer.h \ -include/grpc/status.h \ -include/grpc/support/workaround_list.h \ -src/core/lib/channel/channel_args.c \ -src/core/lib/channel/channel_args.h \ -src/core/lib/channel/channel_stack.c \ -src/core/lib/channel/channel_stack.h \ -src/core/lib/channel/channel_stack_builder.c \ -src/core/lib/channel/channel_stack_builder.h \ -src/core/lib/channel/connected_channel.c \ -src/core/lib/channel/connected_channel.h \ -src/core/lib/channel/context.h \ -src/core/lib/channel/handshaker.c \ -src/core/lib/channel/handshaker.h \ -src/core/lib/channel/handshaker_factory.c \ -src/core/lib/channel/handshaker_factory.h \ -src/core/lib/channel/handshaker_registry.c \ -src/core/lib/channel/handshaker_registry.h \ -src/core/lib/compression/algorithm_metadata.h \ -src/core/lib/compression/compression.c \ -src/core/lib/compression/message_compress.c \ -src/core/lib/compression/message_compress.h \ -src/core/lib/debug/trace.c \ -src/core/lib/debug/trace.h \ -src/core/lib/http/format_request.c \ -src/core/lib/http/format_request.h \ -src/core/lib/http/httpcli.c \ -src/core/lib/http/httpcli.h \ -src/core/lib/http/parser.c \ -src/core/lib/http/parser.h \ -src/core/lib/iomgr/closure.c \ -src/core/lib/iomgr/closure.h \ -src/core/lib/iomgr/combiner.c \ -src/core/lib/iomgr/combiner.h \ -src/core/lib/iomgr/endpoint.c \ -src/core/lib/iomgr/endpoint.h \ -src/core/lib/iomgr/endpoint_pair.h \ -src/core/lib/iomgr/endpoint_pair_posix.c \ -src/core/lib/iomgr/endpoint_pair_uv.c \ -src/core/lib/iomgr/endpoint_pair_windows.c \ -src/core/lib/iomgr/error.c \ -src/core/lib/iomgr/error.h \ -src/core/lib/iomgr/error_internal.h \ -src/core/lib/iomgr/ev_epoll1_linux.c \ -src/core/lib/iomgr/ev_epoll1_linux.h \ -src/core/lib/iomgr/ev_epoll_limited_pollers_linux.c \ -src/core/lib/iomgr/ev_epoll_limited_pollers_linux.h \ -src/core/lib/iomgr/ev_epoll_thread_pool_linux.c \ -src/core/lib/iomgr/ev_epoll_thread_pool_linux.h \ -src/core/lib/iomgr/ev_epollex_linux.c \ -src/core/lib/iomgr/ev_epollex_linux.h \ -src/core/lib/iomgr/ev_epollsig_linux.c \ -src/core/lib/iomgr/ev_epollsig_linux.h \ -src/core/lib/iomgr/ev_poll_posix.c \ -src/core/lib/iomgr/ev_poll_posix.h \ -src/core/lib/iomgr/ev_posix.c \ -src/core/lib/iomgr/ev_posix.h \ -src/core/lib/iomgr/ev_windows.c \ -src/core/lib/iomgr/exec_ctx.c \ -src/core/lib/iomgr/exec_ctx.h \ -src/core/lib/iomgr/executor.c \ -src/core/lib/iomgr/executor.h \ -src/core/lib/iomgr/iocp_windows.c \ -src/core/lib/iomgr/iocp_windows.h \ -src/core/lib/iomgr/iomgr.c \ -src/core/lib/iomgr/iomgr.h \ -src/core/lib/iomgr/iomgr_internal.h \ -src/core/lib/iomgr/iomgr_posix.c \ -src/core/lib/iomgr/iomgr_posix.h \ -src/core/lib/iomgr/iomgr_uv.c \ -src/core/lib/iomgr/iomgr_windows.c \ -src/core/lib/iomgr/is_epollexclusive_available.c \ -src/core/lib/iomgr/is_epollexclusive_available.h \ -src/core/lib/iomgr/load_file.c \ -src/core/lib/iomgr/load_file.h \ -src/core/lib/iomgr/lockfree_event.c \ -src/core/lib/iomgr/lockfree_event.h \ -src/core/lib/iomgr/network_status_tracker.c \ -src/core/lib/iomgr/network_status_tracker.h \ -src/core/lib/iomgr/polling_entity.c \ -src/core/lib/iomgr/polling_entity.h \ -src/core/lib/iomgr/pollset.h \ -src/core/lib/iomgr/pollset_set.h \ -src/core/lib/iomgr/pollset_set_uv.c \ -src/core/lib/iomgr/pollset_set_windows.c \ -src/core/lib/iomgr/pollset_set_windows.h \ -src/core/lib/iomgr/pollset_uv.c \ -src/core/lib/iomgr/pollset_uv.h \ -src/core/lib/iomgr/pollset_windows.c \ -src/core/lib/iomgr/pollset_windows.h \ -src/core/lib/iomgr/port.h \ -src/core/lib/iomgr/resolve_address.h \ -src/core/lib/iomgr/resolve_address_posix.c \ -src/core/lib/iomgr/resolve_address_uv.c \ -src/core/lib/iomgr/resolve_address_windows.c \ -src/core/lib/iomgr/resource_quota.c \ -src/core/lib/iomgr/resource_quota.h \ -src/core/lib/iomgr/sockaddr.h \ -src/core/lib/iomgr/sockaddr_posix.h \ -src/core/lib/iomgr/sockaddr_utils.c \ -src/core/lib/iomgr/sockaddr_utils.h \ -src/core/lib/iomgr/sockaddr_windows.h \ -src/core/lib/iomgr/socket_factory_posix.c \ -src/core/lib/iomgr/socket_factory_posix.h \ -src/core/lib/iomgr/socket_mutator.c \ -src/core/lib/iomgr/socket_mutator.h \ -src/core/lib/iomgr/socket_utils.h \ -src/core/lib/iomgr/socket_utils_common_posix.c \ -src/core/lib/iomgr/socket_utils_linux.c \ -src/core/lib/iomgr/socket_utils_posix.c \ -src/core/lib/iomgr/socket_utils_posix.h \ -src/core/lib/iomgr/socket_utils_uv.c \ -src/core/lib/iomgr/socket_utils_windows.c \ -src/core/lib/iomgr/socket_windows.c \ -src/core/lib/iomgr/socket_windows.h \ -src/core/lib/iomgr/sys_epoll_wrapper.h \ -src/core/lib/iomgr/tcp_client.h \ -src/core/lib/iomgr/tcp_client_posix.c \ -src/core/lib/iomgr/tcp_client_posix.h \ -src/core/lib/iomgr/tcp_client_uv.c \ -src/core/lib/iomgr/tcp_client_windows.c \ -src/core/lib/iomgr/tcp_posix.c \ -src/core/lib/iomgr/tcp_posix.h \ -src/core/lib/iomgr/tcp_server.h \ -src/core/lib/iomgr/tcp_server_posix.c \ -src/core/lib/iomgr/tcp_server_utils_posix.h \ -src/core/lib/iomgr/tcp_server_utils_posix_common.c \ -src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.c \ -src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.c \ -src/core/lib/iomgr/tcp_server_uv.c \ -src/core/lib/iomgr/tcp_server_windows.c \ -src/core/lib/iomgr/tcp_uv.c \ -src/core/lib/iomgr/tcp_uv.h \ -src/core/lib/iomgr/tcp_windows.c \ -src/core/lib/iomgr/tcp_windows.h \ -src/core/lib/iomgr/time_averaged_stats.c \ -src/core/lib/iomgr/time_averaged_stats.h \ -src/core/lib/iomgr/timer.h \ -src/core/lib/iomgr/timer_generic.c \ -src/core/lib/iomgr/timer_generic.h \ -src/core/lib/iomgr/timer_heap.c \ -src/core/lib/iomgr/timer_heap.h \ -src/core/lib/iomgr/timer_manager.c \ -src/core/lib/iomgr/timer_manager.h \ -src/core/lib/iomgr/timer_uv.c \ -src/core/lib/iomgr/timer_uv.h \ -src/core/lib/iomgr/udp_server.c \ -src/core/lib/iomgr/udp_server.h \ -src/core/lib/iomgr/unix_sockets_posix.c \ -src/core/lib/iomgr/unix_sockets_posix.h \ -src/core/lib/iomgr/unix_sockets_posix_noop.c \ -src/core/lib/iomgr/wakeup_fd_cv.c \ -src/core/lib/iomgr/wakeup_fd_cv.h \ -src/core/lib/iomgr/wakeup_fd_eventfd.c \ -src/core/lib/iomgr/wakeup_fd_nospecial.c \ -src/core/lib/iomgr/wakeup_fd_pipe.c \ -src/core/lib/iomgr/wakeup_fd_pipe.h \ -src/core/lib/iomgr/wakeup_fd_posix.c \ -src/core/lib/iomgr/wakeup_fd_posix.h \ -src/core/lib/iomgr/workqueue.h \ -src/core/lib/iomgr/workqueue_uv.c \ -src/core/lib/iomgr/workqueue_uv.h \ -src/core/lib/iomgr/workqueue_windows.c \ -src/core/lib/iomgr/workqueue_windows.h \ -src/core/lib/json/json.c \ -src/core/lib/json/json.h \ -src/core/lib/json/json_common.h \ -src/core/lib/json/json_reader.c \ -src/core/lib/json/json_reader.h \ -src/core/lib/json/json_string.c \ -src/core/lib/json/json_writer.c \ -src/core/lib/json/json_writer.h \ -src/core/lib/slice/b64.c \ -src/core/lib/slice/b64.h \ -src/core/lib/slice/percent_encoding.c \ -src/core/lib/slice/percent_encoding.h \ -src/core/lib/slice/slice.c \ -src/core/lib/slice/slice_buffer.c \ -src/core/lib/slice/slice_hash_table.c \ -src/core/lib/slice/slice_hash_table.h \ -src/core/lib/slice/slice_intern.c \ -src/core/lib/slice/slice_internal.h \ -src/core/lib/slice/slice_string_helpers.c \ -src/core/lib/slice/slice_string_helpers.h \ -src/core/lib/surface/alarm.c \ -src/core/lib/surface/api_trace.c \ -src/core/lib/surface/api_trace.h \ -src/core/lib/surface/byte_buffer.c \ -src/core/lib/surface/byte_buffer_reader.c \ -src/core/lib/surface/call.c \ -src/core/lib/surface/call.h \ -src/core/lib/surface/call_details.c \ -src/core/lib/surface/call_log_batch.c \ -src/core/lib/surface/call_test_only.h \ -src/core/lib/surface/channel.c \ -src/core/lib/surface/channel.h \ -src/core/lib/surface/channel_init.c \ -src/core/lib/surface/channel_init.h \ -src/core/lib/surface/channel_ping.c \ -src/core/lib/surface/channel_stack_type.c \ -src/core/lib/surface/channel_stack_type.h \ -src/core/lib/surface/completion_queue.c \ -src/core/lib/surface/completion_queue.h \ -src/core/lib/surface/completion_queue_factory.c \ -src/core/lib/surface/completion_queue_factory.h \ -src/core/lib/surface/event_string.c \ -src/core/lib/surface/event_string.h \ -src/core/lib/surface/init.h \ -src/core/lib/surface/lame_client.cc \ -src/core/lib/surface/lame_client.h \ -src/core/lib/surface/metadata_array.c \ -src/core/lib/surface/server.c \ -src/core/lib/surface/server.h \ -src/core/lib/surface/validate_metadata.c \ -src/core/lib/surface/validate_metadata.h \ -src/core/lib/surface/version.c \ -src/core/lib/transport/bdp_estimator.c \ -src/core/lib/transport/bdp_estimator.h \ -src/core/lib/transport/byte_stream.c \ -src/core/lib/transport/byte_stream.h \ -src/core/lib/transport/connectivity_state.c \ -src/core/lib/transport/connectivity_state.h \ -src/core/lib/transport/error_utils.c \ -src/core/lib/transport/error_utils.h \ -src/core/lib/transport/http2_errors.h \ -src/core/lib/transport/metadata.c \ -src/core/lib/transport/metadata.h \ -src/core/lib/transport/metadata_batch.c \ -src/core/lib/transport/metadata_batch.h \ -src/core/lib/transport/pid_controller.c \ -src/core/lib/transport/pid_controller.h \ -src/core/lib/transport/service_config.c \ -src/core/lib/transport/service_config.h \ -src/core/lib/transport/static_metadata.c \ -src/core/lib/transport/static_metadata.h \ -src/core/lib/transport/status_conversion.c \ -src/core/lib/transport/status_conversion.h \ -src/core/lib/transport/timeout_encoding.c \ -src/core/lib/transport/timeout_encoding.h \ -src/core/lib/transport/transport.c \ -src/core/lib/transport/transport.h \ -src/core/lib/transport/transport_impl.h \ -src/core/lib/transport/transport_op_string.c \ src/cpp/README.md \ src/cpp/client/channel_cc.cc \ src/cpp/client/client_context.cc \ diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index a5d7fda9284..ec2836ec429 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -5965,7 +5965,6 @@ }, { "deps": [ - "gpr", "grpc", "grpc++_base", "grpc++_codegen_base", @@ -6002,6 +6001,7 @@ "deps": [ "census", "gpr", + "grpc", "grpc++_base", "grpc++_codegen_base", "grpc++_codegen_base_src", @@ -6149,6 +6149,7 @@ { "deps": [ "gpr", + "grpc", "grpc++_base", "grpc++_codegen_base", "grpc++_codegen_base_src", @@ -8996,9 +8997,8 @@ }, { "deps": [ - "gpr", + "grpc", "grpc++_codegen_base", - "grpc_base", "nanopb" ], "headers": [ diff --git a/vsprojects/grpc.sln b/vsprojects/grpc.sln index 307ae4b5990..d4a84fc20a3 100644 --- a/vsprojects/grpc.sln +++ b/vsprojects/grpc.sln @@ -63,7 +63,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++", "vcxproj\.\grpc++\ EndProjectSection ProjectSection(ProjectDependencies) = postProject {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++_error_details", "vcxproj\.\grpc++_error_details\grpc++_error_details.vcxproj", "{9F58AD72-49E1-4D10-B826-9E190AB0AAC0}" @@ -81,6 +80,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++_unsecure", "vcxproj\ ProjectSection(ProjectDependencies) = postProject {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_create_jwt", "vcxproj\.\grpc_create_jwt\grpc_create_jwt.vcxproj", "{77971F8D-F583-3E77-0E3C-6C1FB6B1749C}" diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index ae51c43b13d..859970920ea 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -351,17 +351,6 @@ - - - - - - - - - - - @@ -377,119 +366,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -578,260 +454,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -845,9 +467,6 @@ {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters index 12eef9494f8..fd52731dac5 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters @@ -124,387 +124,6 @@ src\cpp\util - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\compression - - - src\core\lib\compression - - - src\core\lib\http - - - src\core\lib\http - - - src\core\lib\http - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\debug - third_party\nanopb @@ -798,39 +417,6 @@ include\grpc\impl\codegen - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc\support - include\grpc++\impl\codegen @@ -872,345 +458,6 @@ src\cpp\thread_manager - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\compression - - - src\core\lib\compression - - - src\core\lib\http - - - src\core\lib\http - - - src\core\lib\http - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\debug - third_party\nanopb @@ -1262,45 +509,9 @@ {dc8bfccd-341f-26f0-8ee4-47dde62a6dd1} - - {5ec10a44-9a09-9220-cf3b-b18ce6e4f70f} - {328ff211-2886-406e-56f9-18ba1686f363} - - {d02f1155-7e7e-3736-3c69-dc9146dc523d} - - - {80567a8f-622f-a3ce-c12d-aebb63984b07} - - - {e769265c-8abd-cd64-2cc2-a52da484fe7b} - - - {701b2d46-11c6-3640-b189-45287f00bee3} - - - {ada68fd5-8e51-98cb-71a7-baf7989d8ffa} - - - {e770844e-61d4-555e-59be-81288e21a35f} - - - {04dfa1c8-7ffe-4f06-4a7c-37441dc75764} - - - {a5d5bddf-6f19-b655-a03a-f30ff5c253a5} - - - {afe126ba-52c9-1daa-d174-8ee8aade08c2} - - - {fb2276d7-5a11-f1d9-82c3-e7c7f1155523} - - - {4bd7971a-68f7-0d5a-f502-6dea3099caaa} - {2420a905-e4f1-a5aa-a364-6a112878a39e} diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj index bd105366d35..30e4cf713f7 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -351,17 +351,6 @@ - - - - - - - - - - - @@ -371,119 +360,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -562,260 +438,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -832,6 +454,9 @@ {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters index f1f4f1729ab..3d2c74a0661 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters @@ -109,387 +109,6 @@ src\cpp\util - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\compression - - - src\core\lib\compression - - - src\core\lib\http - - - src\core\lib\http - - - src\core\lib\http - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\debug - third_party\nanopb @@ -783,39 +402,6 @@ include\grpc\impl\codegen - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc\support - @@ -839,345 +425,6 @@ src\cpp\thread_manager - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\compression - - - src\core\lib\compression - - - src\core\lib\http - - - src\core\lib\http - - - src\core\lib\http - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\slice - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\debug - third_party\nanopb @@ -1229,45 +476,9 @@ {adf6b8e3-4a4b-cb35-bb3d-568af97b58d1} - - {9d6d36f2-26e7-a66b-c19d-a958b80878d6} - {cce6a85d-1111-3834-6825-31e170d93cff} - - {595f2ea0-aafb-87e5-c938-db3ff0b0c69a} - - - {cf8fd5d8-ff54-331d-2d20-36d6cae0e14b} - - - {7e0225af-000b-4873-1c16-caffffbfd084} - - - {0bbdbf56-83ad-bb4b-c4e2-a6d38c342179} - - - {3875f7d7-ff11-c91d-0f98-810260cb554b} - - - {4bd405b9-af65-f0a6-d67a-433f75900668} - - - {f4b146e4-8fba-83a6-1cc1-1262ebb785e8} - - - {b83c8e70-e491-f6f9-a08c-85f632bb61d2} - - - {0d6d88e2-8549-5118-8b78-06e8283dadcb} - - - {1d59dcef-3358-d0ab-fa42-64da74065785} - - - {ba865739-5dd9-6731-6772-48c25d45134f} - {1e5fd68c-bd87-e803-42b0-75a7fa19b91d} From 127fdaeace0bd1715ae4e6b8ece6bd838d766819 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 19 May 2017 13:16:13 -0700 Subject: [PATCH 51/62] More Doxygen comment improvements. --- include/grpc++/create_channel.h | 14 ++++++++------ include/grpc++/impl/codegen/client_context.h | 5 +++-- include/grpc++/security/auth_metadata_processor.h | 3 +++ include/grpc++/server.h | 2 +- include/grpc++/server_builder.h | 8 +++++++- 5 files changed, 22 insertions(+), 10 deletions(-) diff --git a/include/grpc++/create_channel.h b/include/grpc++/create_channel.h index 0537695ed2b..11f9bc037cd 100644 --- a/include/grpc++/create_channel.h +++ b/include/grpc++/create_channel.h @@ -43,23 +43,25 @@ namespace grpc { -/// Create a new \a Channel pointing to \a target +/// Create a new \a Channel pointing to \a target. /// /// \param target The URI of the endpoint to connect to. -/// \param creds Credentials to use for the created channel. If it does not hold -/// an object or is invalid, a lame channel is returned. +/// \param creds Credentials to use for the created channel. If it does not +/// hold an object or is invalid, a lame channel (one on which all operations +/// fail) is returned. std::shared_ptr CreateChannel( const grpc::string& target, const std::shared_ptr& creds); -/// Create a new \em custom \a Channel pointing to \a target +/// Create a new \em custom \a Channel pointing to \a target. /// /// \warning For advanced use and testing ONLY. Override default channel /// arguments only if necessary. /// /// \param target The URI of the endpoint to connect to. -/// \param creds Credentials to use for the created channel. If it does not hold -/// an object or is invalid, a lame channel is returned. +/// \param creds Credentials to use for the created channel. If it does not +/// hold an object or is invalid, a lame channel (one on which all operations +/// fail) is returned. /// \param args Options for channel creation. std::shared_ptr CreateCustomChannel( const grpc::string& target, diff --git a/include/grpc++/impl/codegen/client_context.h b/include/grpc++/impl/codegen/client_context.h index b1b9be0fe28..720df8a1dc2 100644 --- a/include/grpc++/impl/codegen/client_context.h +++ b/include/grpc++/impl/codegen/client_context.h @@ -331,8 +331,9 @@ class ClientContext { return census_context_; } - /// Send a best-effort out-of-band cancel. The call could be in any stage. - /// e.g. if it is already finished, it may still return success. + /// Send a best-effort out-of-band cancel on the call associated with + /// this client context. The call could be in any stage; e.g., if it is + /// already finished, it may still return success. /// /// There is no guarantee the call will be cancelled. void TryCancel(); diff --git a/include/grpc++/security/auth_metadata_processor.h b/include/grpc++/security/auth_metadata_processor.h index 35369231464..9d3d41a7a00 100644 --- a/include/grpc++/security/auth_metadata_processor.h +++ b/include/grpc++/security/auth_metadata_processor.h @@ -42,6 +42,9 @@ namespace grpc { +/// Interface allowing custom server-side authorization based on credentials +/// encoded in metadata. Objects of this type can be passed to +/// \a ServerCredentials::SetAuthMetadataProcessor(). class AuthMetadataProcessor { public: typedef std::multimap InputMetadata; diff --git a/include/grpc++/server.h b/include/grpc++/server.h index 2f7018e95bf..976879c9c5b 100644 --- a/include/grpc++/server.h +++ b/include/grpc++/server.h @@ -67,7 +67,7 @@ class Server final : public ServerInterface, private GrpcLibraryCodegen { public: ~Server(); - /// Block waiting for all work to complete. + /// Block until the server shuts down. /// /// \warning The server must be either shutting down or some other thread must /// call \a Shutdown for this function to ever return. diff --git a/include/grpc++/server_builder.h b/include/grpc++/server_builder.h index 2185b283ac2..84ec2eb6edb 100644 --- a/include/grpc++/server_builder.h +++ b/include/grpc++/server_builder.h @@ -71,7 +71,13 @@ class ServerBuilder { ServerBuilder(); ~ServerBuilder(); - enum SyncServerOption { NUM_CQS, MIN_POLLERS, MAX_POLLERS, CQ_TIMEOUT_MSEC }; + /// Options for synchronous servers. + enum SyncServerOption { + NUM_CQS, // Number of completion queues. + MIN_POLLERS, // Minimum number of polling threads. + MAX_POLLERS, // Maximum number of polling threads. + CQ_TIMEOUT_MSEC // Completion queue timeout in milliseconds. + }; /// Register a service. This call does not take ownership of the service. /// The service must exist for the lifetime of the \a Server instance returned From f91eb714c29f4599fda5709278b57a9c5a18e3aa Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 19 May 2017 15:19:14 -0700 Subject: [PATCH 52/62] Change round_robin LB policy to use the addresses in the order given. --- .../lb_policy/round_robin/round_robin.c | 457 +++++++----------- test/cpp/end2end/grpclb_end2end_test.cc | 6 +- test/cpp/end2end/round_robin_end2end_test.cc | 31 +- 3 files changed, 186 insertions(+), 308 deletions(-) diff --git a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c b/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c index 6e7f4106358..2acde70f4c9 100644 --- a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c @@ -99,26 +99,13 @@ typedef struct pending_pick { grpc_closure *on_complete; } pending_pick; -/** List of subchannels in a connectivity READY state */ -typedef struct ready_list { - grpc_subchannel *subchannel; - /* references namesake entry in subchannel_data */ - void *user_data; - struct ready_list *next; - struct ready_list *prev; -} ready_list; - typedef struct { - /** index within policy->subchannels */ - size_t index; /** backpointer to owning policy */ round_robin_lb_policy *policy; /** subchannel itself */ grpc_subchannel *subchannel; /** notification that connectivity has changed on subchannel */ grpc_closure connectivity_changed_closure; - /** this subchannels current position in subchannel->ready_list */ - ready_list *ready_list_node; /** last observed connectivity. Not updated by * \a grpc_subchannel_notify_on_state_change. Used to determine the previous * state while processing the new state in \a rr_connectivity_changed */ @@ -126,6 +113,10 @@ typedef struct { /** current connectivity state. Updated by \a * grpc_subchannel_notify_on_state_change */ grpc_connectivity_state curr_connectivity_state; + /** connectivity state to be updated by the watcher, not guarded by + * the combiner. Will be moved to curr_connectivity_state inside of + * the combiner by rr_connectivity_changed_locked(). */ + grpc_connectivity_state pending_connectivity_state_unsafe; /** the subchannel's target user data */ void *user_data; /** vtable to operate over \a user_data */ @@ -141,182 +132,105 @@ struct round_robin_lb_policy { /** all our subchannels */ size_t num_subchannels; - subchannel_data **subchannels; + subchannel_data *subchannels; - /** how many subchannels are in TRANSIENT_FAILURE */ + /** how many subchannels are in state READY */ + size_t num_ready; + /** how many subchannels are in state TRANSIENT_FAILURE */ size_t num_transient_failures; - /** how many subchannels are IDLE */ + /** how many subchannels are in state IDLE */ size_t num_idle; /** have we started picking? */ - int started_picking; + bool started_picking; /** are we shutting down? */ - int shutdown; + bool shutdown; /** List of picks that are waiting on connectivity */ pending_pick *pending_picks; /** our connectivity state tracker */ grpc_connectivity_state_tracker state_tracker; - /** (Dummy) root of the doubly linked list containing READY subchannels */ - ready_list ready_list; - /** Last pick from the ready list. */ - ready_list *ready_list_last_pick; + // Index into subchannels for last pick. + size_t last_ready_subchannel_index; }; -/** Returns the next subchannel from the connected list or NULL if the list is - * empty. +/** Returns the index into p->subchannels of the next subchannel in + * READY state, or p->num_subchannels if no subchannel is READY. * - * Note that this function does *not* advance p->ready_list_last_pick. Use \a - * advance_last_picked_locked() for that. */ -static ready_list *peek_next_connected_locked(const round_robin_lb_policy *p) { - ready_list *selected; - selected = p->ready_list_last_pick->next; - - while (selected != NULL) { - if (selected == &p->ready_list) { - GPR_ASSERT(selected->subchannel == NULL); - /* skip dummy root */ - selected = selected->next; - } else { - GPR_ASSERT(selected->subchannel != NULL); - return selected; - } + * Note that this function does *not* update p->last_ready_subchannel_index. + * The caller must do that if it returns a pick. */ +static size_t get_next_ready_subchannel_index_locked( + const round_robin_lb_policy *p) { + if (GRPC_TRACER_ON(grpc_lb_round_robin_trace)) { + gpr_log(GPR_INFO, + "[RR: %p] getting next ready subchannel, " + "last_ready_subchannel_index=%zu", + p, p->last_ready_subchannel_index); } - return NULL; -} - -/** Advance the \a ready_list picking head. */ -static void advance_last_picked_locked(round_robin_lb_policy *p) { - if (p->ready_list_last_pick->next != NULL) { /* non-empty list */ - p->ready_list_last_pick = p->ready_list_last_pick->next; - if (p->ready_list_last_pick == &p->ready_list) { - /* skip dummy root */ - p->ready_list_last_pick = p->ready_list_last_pick->next; + for (size_t i = 0; i < p->num_subchannels; ++i) { + const size_t index = + (i + p->last_ready_subchannel_index + 1) % p->num_subchannels; + if (GRPC_TRACER_ON(grpc_lb_round_robin_trace)) { + gpr_log(GPR_DEBUG, "[RR %p] checking index %zu: state=%d", p, index, + p->subchannels[index].curr_connectivity_state); + } + if (p->subchannels[index].curr_connectivity_state == GRPC_CHANNEL_READY) { + if (GRPC_TRACER_ON(grpc_lb_round_robin_trace)) { + gpr_log(GPR_DEBUG, "[RR %p] found next ready subchannel at index %zu", + p, index); + } + return index; } - } else { /* should be an empty list */ - GPR_ASSERT(p->ready_list_last_pick == &p->ready_list); } - if (GRPC_TRACER_ON(grpc_lb_round_robin_trace)) { - gpr_log(GPR_DEBUG, - "[READYLIST, RR: %p] ADVANCED LAST PICK. NOW AT NODE %p (SC %p, " - "CSC %p)", - (void *)p, (void *)p->ready_list_last_pick, - (void *)p->ready_list_last_pick->subchannel, - (void *)grpc_subchannel_get_connected_subchannel( - p->ready_list_last_pick->subchannel)); + gpr_log(GPR_DEBUG, "[RR %p] no subchannels in ready state", p); } + return p->num_subchannels; } -/** Prepends (relative to the root at p->ready_list) the connected subchannel \a - * csc to the list of ready subchannels. */ -static ready_list *add_connected_sc_locked(round_robin_lb_policy *p, - subchannel_data *sd) { - ready_list *new_elem = gpr_zalloc(sizeof(ready_list)); - new_elem->subchannel = sd->subchannel; - new_elem->user_data = sd->user_data; - if (p->ready_list.prev == NULL) { - /* first element */ - new_elem->next = &p->ready_list; - new_elem->prev = &p->ready_list; - p->ready_list.next = new_elem; - p->ready_list.prev = new_elem; - } else { - new_elem->next = &p->ready_list; - new_elem->prev = p->ready_list.prev; - p->ready_list.prev->next = new_elem; - p->ready_list.prev = new_elem; - } +// Sets p->last_ready_subchannel_index to last_ready_index. +static void update_last_ready_subchannel_index_locked(round_robin_lb_policy *p, + size_t last_ready_index) { + GPR_ASSERT(last_ready_index < p->num_subchannels); + p->last_ready_subchannel_index = last_ready_index; if (GRPC_TRACER_ON(grpc_lb_round_robin_trace)) { - gpr_log(GPR_DEBUG, "[READYLIST] ADDING NODE %p (Conn. SC %p)", - (void *)new_elem, (void *)sd->subchannel); - } - return new_elem; -} - -/** Removes \a node from the list of connected subchannels */ -static void remove_disconnected_sc_locked(round_robin_lb_policy *p, - ready_list *node) { - if (node == NULL) { - return; - } - if (node == p->ready_list_last_pick) { - p->ready_list_last_pick = p->ready_list_last_pick->prev; - } - - /* removing last item */ - if (node->next == &p->ready_list && node->prev == &p->ready_list) { - GPR_ASSERT(p->ready_list.next == node); - GPR_ASSERT(p->ready_list.prev == node); - p->ready_list.next = NULL; - p->ready_list.prev = NULL; - } else { - node->prev->next = node->next; - node->next->prev = node->prev; - } - - if (GRPC_TRACER_ON(grpc_lb_round_robin_trace)) { - gpr_log(GPR_DEBUG, "[READYLIST] REMOVED NODE %p (SC %p)", (void *)node, - (void *)node->subchannel); + gpr_log(GPR_DEBUG, + "[RR: %p] setting last_ready_subchannel_index=%zu (SC %p, CSC %p)", + (void *)p, last_ready_index, + (void *)p->subchannels[last_ready_index].subchannel, + (void *)grpc_subchannel_get_connected_subchannel( + p->subchannels[last_ready_index].subchannel)); } - - node->next = NULL; - node->prev = NULL; - node->subchannel = NULL; - - gpr_free(node); -} - -static bool is_ready_list_empty(round_robin_lb_policy *p) { - return p->ready_list.prev == NULL; } static void rr_destroy(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { round_robin_lb_policy *p = (round_robin_lb_policy *)pol; - ready_list *elem; - if (GRPC_TRACER_ON(grpc_lb_round_robin_trace)) { gpr_log(GPR_DEBUG, "Destroying Round Robin policy at %p", (void *)pol); } - for (size_t i = 0; i < p->num_subchannels; i++) { - subchannel_data *sd = p->subchannels[i]; - GRPC_SUBCHANNEL_UNREF(exec_ctx, sd->subchannel, "rr_destroy"); - if (sd->user_data != NULL) { - GPR_ASSERT(sd->user_data_vtable != NULL); - sd->user_data_vtable->destroy(exec_ctx, sd->user_data); + subchannel_data *sd = &p->subchannels[i]; + if (sd->subchannel != NULL) { + GRPC_SUBCHANNEL_UNREF(exec_ctx, sd->subchannel, "rr_destroy"); + if (sd->user_data != NULL) { + GPR_ASSERT(sd->user_data_vtable != NULL); + sd->user_data_vtable->destroy(exec_ctx, sd->user_data); + } } - gpr_free(sd); } - grpc_connectivity_state_destroy(exec_ctx, &p->state_tracker); gpr_free(p->subchannels); - - elem = p->ready_list.next; - while (elem != NULL && elem != &p->ready_list) { - ready_list *tmp; - tmp = elem->next; - elem->next = NULL; - elem->prev = NULL; - elem->subchannel = NULL; - gpr_free(elem); - elem = tmp; - } - gpr_free(p); } static void rr_shutdown_locked(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { round_robin_lb_policy *p = (round_robin_lb_policy *)pol; - pending_pick *pp; - size_t i; - if (GRPC_TRACER_ON(grpc_lb_round_robin_trace)) { gpr_log(GPR_DEBUG, "Shutting down Round Robin policy at %p", (void *)pol); } - - p->shutdown = 1; + p->shutdown = true; + pending_pick *pp; while ((pp = p->pending_picks)) { p->pending_picks = pp->next; *pp->target = NULL; @@ -328,10 +242,13 @@ static void rr_shutdown_locked(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { grpc_connectivity_state_set( exec_ctx, &p->state_tracker, GRPC_CHANNEL_SHUTDOWN, GRPC_ERROR_CREATE_FROM_STATIC_STRING("Channel Shutdown"), "rr_shutdown"); - for (i = 0; i < p->num_subchannels; i++) { - subchannel_data *sd = p->subchannels[i]; - grpc_subchannel_notify_on_state_change(exec_ctx, sd->subchannel, NULL, NULL, - &sd->connectivity_changed_closure); + for (size_t i = 0; i < p->num_subchannels; i++) { + subchannel_data *sd = &p->subchannels[i]; + if (sd->subchannel != NULL) { + grpc_subchannel_notify_on_state_change(exec_ctx, sd->subchannel, NULL, + NULL, + &sd->connectivity_changed_closure); + } } } @@ -339,8 +256,7 @@ static void rr_cancel_pick_locked(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, grpc_connected_subchannel **target, grpc_error *error) { round_robin_lb_policy *p = (round_robin_lb_policy *)pol; - pending_pick *pp; - pp = p->pending_picks; + pending_pick *pp = p->pending_picks; p->pending_picks = NULL; while (pp != NULL) { pending_pick *next = pp->next; @@ -364,8 +280,7 @@ static void rr_cancel_picks_locked(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, uint32_t initial_metadata_flags_eq, grpc_error *error) { round_robin_lb_policy *p = (round_robin_lb_policy *)pol; - pending_pick *pp; - pp = p->pending_picks; + pending_pick *pp = p->pending_picks; p->pending_picks = NULL; while (pp != NULL) { pending_pick *next = pp->next; @@ -387,21 +302,16 @@ static void rr_cancel_picks_locked(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, static void start_picking_locked(grpc_exec_ctx *exec_ctx, round_robin_lb_policy *p) { - size_t i; - p->started_picking = 1; - - for (i = 0; i < p->num_subchannels; i++) { - subchannel_data *sd = p->subchannels[i]; - /* use some sentinel value outside of the range of grpc_connectivity_state - * to signal an undefined previous state. We won't be referring to this - * value again and it'll be overwritten after the first call to - * rr_connectivity_changed */ - sd->prev_connectivity_state = GRPC_CHANNEL_INIT; - sd->curr_connectivity_state = GRPC_CHANNEL_IDLE; - GRPC_LB_POLICY_WEAK_REF(&p->base, "rr_connectivity"); - grpc_subchannel_notify_on_state_change( - exec_ctx, sd->subchannel, p->base.interested_parties, - &sd->curr_connectivity_state, &sd->connectivity_changed_closure); + p->started_picking = true; + for (size_t i = 0; i < p->num_subchannels; i++) { + subchannel_data *sd = &p->subchannels[i]; + if (sd->subchannel != NULL) { + GRPC_LB_POLICY_WEAK_REF(&p->base, "rr_connectivity"); + grpc_subchannel_notify_on_state_change( + exec_ctx, sd->subchannel, p->base.interested_parties, + &sd->pending_connectivity_state_unsafe, + &sd->connectivity_changed_closure); + } } } @@ -418,36 +328,32 @@ static int rr_pick_locked(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, grpc_call_context_element *context, void **user_data, grpc_closure *on_complete) { round_robin_lb_policy *p = (round_robin_lb_policy *)pol; - pending_pick *pp; - ready_list *selected; - if (GRPC_TRACER_ON(grpc_lb_round_robin_trace)) { gpr_log(GPR_INFO, "Round Robin %p trying to pick", (void *)pol); } - - if ((selected = peek_next_connected_locked(p))) { + const size_t next_ready_index = get_next_ready_subchannel_index_locked(p); + if (next_ready_index < p->num_subchannels) { /* readily available, report right away */ + subchannel_data *sd = &p->subchannels[next_ready_index]; *target = GRPC_CONNECTED_SUBCHANNEL_REF( - grpc_subchannel_get_connected_subchannel(selected->subchannel), - "rr_picked"); - + grpc_subchannel_get_connected_subchannel(sd->subchannel), "rr_picked"); if (user_data != NULL) { - *user_data = selected->user_data; + *user_data = sd->user_data; } if (GRPC_TRACER_ON(grpc_lb_round_robin_trace)) { gpr_log(GPR_DEBUG, - "[RR PICK] TARGET <-- CONNECTED SUBCHANNEL %p (NODE %p)", - (void *)*target, (void *)selected); + "[RR PICK] TARGET <-- CONNECTED SUBCHANNEL %p (INDEX %zu)", + (void *)*target, next_ready_index); } /* only advance the last picked pointer if the selection was used */ - advance_last_picked_locked(p); + update_last_ready_subchannel_index_locked(p, next_ready_index); return 1; } else { /* no pick currently available. Save for later in list of pending picks */ if (!p->started_picking) { start_picking_locked(exec_ctx, p); } - pp = gpr_malloc(sizeof(*pp)); + pending_pick *pp = gpr_malloc(sizeof(*pp)); pp->next = p->pending_picks; pp->target = target; pp->on_complete = on_complete; @@ -458,25 +364,31 @@ static int rr_pick_locked(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, } } -static void update_state_counters(subchannel_data *sd) { +static void update_state_counters_locked(subchannel_data *sd) { round_robin_lb_policy *p = sd->policy; - - /* update p->num_transient_failures (resp. p->num_idle): if the previous - * state was TRANSIENT_FAILURE (resp. IDLE), decrement - * p->num_transient_failures (resp. p->num_idle). */ - if (sd->prev_connectivity_state == GRPC_CHANNEL_TRANSIENT_FAILURE) { + if (sd->prev_connectivity_state == GRPC_CHANNEL_READY) { + GPR_ASSERT(p->num_ready > 0); + --p->num_ready; + } else if (sd->prev_connectivity_state == GRPC_CHANNEL_TRANSIENT_FAILURE) { GPR_ASSERT(p->num_transient_failures > 0); --p->num_transient_failures; } else if (sd->prev_connectivity_state == GRPC_CHANNEL_IDLE) { GPR_ASSERT(p->num_idle > 0); --p->num_idle; } + if (sd->curr_connectivity_state == GRPC_CHANNEL_READY) { + ++p->num_ready; + } else if (sd->curr_connectivity_state == GRPC_CHANNEL_TRANSIENT_FAILURE) { + ++p->num_transient_failures; + } else if (sd->curr_connectivity_state == GRPC_CHANNEL_IDLE) { + ++p->num_idle; + } } /* sd is the subchannel_data associted with the updated subchannel. * shutdown_error will only be used upon policy transition to TRANSIENT_FAILURE * or SHUTDOWN */ -static grpc_connectivity_state update_lb_connectivity_status( +static grpc_connectivity_state update_lb_connectivity_status_locked( grpc_exec_ctx *exec_ctx, subchannel_data *sd, grpc_error *error) { /* In priority order. The first rule to match terminates the search (ie, if we * are on rule n, all previous rules were unfulfilled). @@ -498,7 +410,7 @@ static grpc_connectivity_state update_lb_connectivity_status( * CHECK: p->num_idle == p->num_subchannels. */ round_robin_lb_policy *p = sd->policy; - if (!is_ready_list_empty(p)) { /* 1) READY */ + if (p->num_ready > 0) { /* 1) READY */ grpc_connectivity_state_set(exec_ctx, &p->state_tracker, GRPC_CHANNEL_READY, GRPC_ERROR_NONE, "rr_ready"); return GRPC_CHANNEL_READY; @@ -532,32 +444,62 @@ static void rr_connectivity_changed_locked(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { subchannel_data *sd = arg; round_robin_lb_policy *p = sd->policy; - pending_pick *pp; - - GRPC_ERROR_REF(error); - + // Now that we're inside the combiner, copy the pending connectivity + // state (which was set by the connectivity state watcher) to + // curr_connectivity_state, which is what we use inside of the combiner. + sd->curr_connectivity_state = sd->pending_connectivity_state_unsafe; + if (GRPC_TRACER_ON(grpc_lb_round_robin_trace)) { + gpr_log(GPR_DEBUG, + "[RR %p] connectivity changed for subchannel %p: " + "prev_state=%d new_state=%d", + p, sd->subchannel, sd->prev_connectivity_state, + sd->curr_connectivity_state); + } + // If we're shutting down, unref and return. if (p->shutdown) { GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &p->base, "rr_connectivity"); - GRPC_ERROR_UNREF(error); return; } - switch (sd->curr_connectivity_state) { - case GRPC_CHANNEL_INIT: - GPR_UNREACHABLE_CODE(return ); - case GRPC_CHANNEL_READY: - /* add the newly connected subchannel to the list of connected ones. - * Note that it goes to the "end of the line". */ - sd->ready_list_node = add_connected_sc_locked(p, sd); + // Update state counters and determine new overall state. + update_state_counters_locked(sd); + sd->prev_connectivity_state = sd->curr_connectivity_state; + grpc_connectivity_state new_connectivity_state = + update_lb_connectivity_status_locked(exec_ctx, sd, GRPC_ERROR_REF(error)); + // If the new state is SHUTDOWN, unref the subchannel, and if the new + // overall state is SHUTDOWN, clean up. + if (sd->curr_connectivity_state == GRPC_CHANNEL_SHUTDOWN) { + GRPC_SUBCHANNEL_UNREF(exec_ctx, sd->subchannel, "rr_subchannel_shutdown"); + sd->subchannel = NULL; + if (sd->user_data != NULL) { + GPR_ASSERT(sd->user_data_vtable != NULL); + sd->user_data_vtable->destroy(exec_ctx, sd->user_data); + } + if (new_connectivity_state == GRPC_CHANNEL_SHUTDOWN) { + /* the policy is shutting down. Flush all the pending picks... */ + pending_pick *pp; + while ((pp = p->pending_picks)) { + p->pending_picks = pp->next; + *pp->target = NULL; + grpc_closure_sched(exec_ctx, pp->on_complete, GRPC_ERROR_NONE); + gpr_free(pp); + } + } + /* unref the "rr_connectivity" weak ref from start_picking */ + GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &p->base, "rr_connectivity"); + } else { + if (sd->curr_connectivity_state == GRPC_CHANNEL_READY) { /* at this point we know there's at least one suitable subchannel. Go * ahead and pick one and notify the pending suitors in * p->pending_picks. This preemtively replicates rr_pick()'s actions. */ - ready_list *selected = peek_next_connected_locked(p); - GPR_ASSERT(selected != NULL); + const size_t next_ready_index = get_next_ready_subchannel_index_locked(p); + GPR_ASSERT(next_ready_index < p->num_subchannels); + subchannel_data *selected = &p->subchannels[next_ready_index]; if (p->pending_picks != NULL) { /* if the selected subchannel is going to be used for the pending * picks, update the last picked pointer */ - advance_last_picked_locked(p); + update_last_ready_subchannel_index_locked(p, next_ready_index); } + pending_pick *pp; while ((pp = p->pending_picks)) { p->pending_picks = pp->next; *pp->target = GRPC_CONNECTED_SUBCHANNEL_REF( @@ -568,72 +510,19 @@ static void rr_connectivity_changed_locked(grpc_exec_ctx *exec_ctx, void *arg, } if (GRPC_TRACER_ON(grpc_lb_round_robin_trace)) { gpr_log(GPR_DEBUG, - "[RR CONN CHANGED] TARGET <-- SUBCHANNEL %p (NODE %p)", - (void *)selected->subchannel, (void *)selected); + "[RR CONN CHANGED] TARGET <-- SUBCHANNEL %p (INDEX %zu)", + (void *)selected->subchannel, next_ready_index); } grpc_closure_sched(exec_ctx, pp->on_complete, GRPC_ERROR_NONE); gpr_free(pp); } - update_lb_connectivity_status(exec_ctx, sd, error); - sd->prev_connectivity_state = sd->curr_connectivity_state; - /* renew notification: reuses the "rr_connectivity" weak ref */ - grpc_subchannel_notify_on_state_change( - exec_ctx, sd->subchannel, p->base.interested_parties, - &sd->curr_connectivity_state, &sd->connectivity_changed_closure); - break; - case GRPC_CHANNEL_IDLE: - ++p->num_idle; - /* fallthrough */ - case GRPC_CHANNEL_CONNECTING: - update_state_counters(sd); - update_lb_connectivity_status(exec_ctx, sd, error); - sd->prev_connectivity_state = sd->curr_connectivity_state; - /* renew notification: reuses the "rr_connectivity" weak ref */ - grpc_subchannel_notify_on_state_change( - exec_ctx, sd->subchannel, p->base.interested_parties, - &sd->curr_connectivity_state, &sd->connectivity_changed_closure); - break; - case GRPC_CHANNEL_TRANSIENT_FAILURE: - ++p->num_transient_failures; - /* remove from ready list if still present */ - if (sd->ready_list_node != NULL) { - remove_disconnected_sc_locked(p, sd->ready_list_node); - sd->ready_list_node = NULL; - } - update_lb_connectivity_status(exec_ctx, sd, error); - sd->prev_connectivity_state = sd->curr_connectivity_state; - /* renew notification: reuses the "rr_connectivity" weak ref */ - grpc_subchannel_notify_on_state_change( - exec_ctx, sd->subchannel, p->base.interested_parties, - &sd->curr_connectivity_state, &sd->connectivity_changed_closure); - break; - case GRPC_CHANNEL_SHUTDOWN: - update_state_counters(sd); - if (sd->ready_list_node != NULL) { - remove_disconnected_sc_locked(p, sd->ready_list_node); - sd->ready_list_node = NULL; - } - --p->num_subchannels; - GPR_SWAP(subchannel_data *, p->subchannels[sd->index], - p->subchannels[p->num_subchannels]); - GRPC_SUBCHANNEL_UNREF(exec_ctx, sd->subchannel, "rr_subchannel_shutdown"); - p->subchannels[sd->index]->index = sd->index; - if (update_lb_connectivity_status(exec_ctx, sd, error) == - GRPC_CHANNEL_SHUTDOWN) { - /* the policy is shutting down. Flush all the pending picks... */ - while ((pp = p->pending_picks)) { - p->pending_picks = pp->next; - *pp->target = NULL; - grpc_closure_sched(exec_ctx, pp->on_complete, GRPC_ERROR_NONE); - gpr_free(pp); - } - } - gpr_free(sd); - /* unref the "rr_connectivity" weak ref from start_picking */ - GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &p->base, "rr_connectivity"); - break; + } + /* renew notification: reuses the "rr_connectivity" weak ref */ + grpc_subchannel_notify_on_state_change( + exec_ctx, sd->subchannel, p->base.interested_parties, + &sd->pending_connectivity_state_unsafe, + &sd->connectivity_changed_closure); } - GRPC_ERROR_UNREF(error); } static grpc_connectivity_state rr_check_connectivity_locked( @@ -654,10 +543,10 @@ static void rr_notify_on_state_change_locked(grpc_exec_ctx *exec_ctx, static void rr_ping_one_locked(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, grpc_closure *closure) { round_robin_lb_policy *p = (round_robin_lb_policy *)pol; - ready_list *selected; - grpc_connected_subchannel *target; - if ((selected = peek_next_connected_locked(p))) { - target = GRPC_CONNECTED_SUBCHANNEL_REF( + const size_t next_ready_index = get_next_ready_subchannel_index_locked(p); + if (next_ready_index < p->num_subchannels) { + subchannel_data *selected = &p->subchannels[next_ready_index]; + grpc_connected_subchannel *target = GRPC_CONNECTED_SUBCHANNEL_REF( grpc_subchannel_get_connected_subchannel(selected->subchannel), "rr_picked"); grpc_connected_subchannel_ping(exec_ctx, target, closure); @@ -708,7 +597,7 @@ static grpc_lb_policy *round_robin_create(grpc_exec_ctx *exec_ctx, p->subchannels = gpr_zalloc(sizeof(*p->subchannels) * num_addrs); grpc_subchannel_args sc_args; - size_t subchannel_idx = 0; + size_t subchannel_index = 0; for (size_t i = 0; i < addresses->num_addresses; i++) { /* Skip balancer addresses, since we only know how to handle backends. */ if (addresses->addresses[i].is_balancer) continue; @@ -727,42 +616,44 @@ static grpc_lb_policy *round_robin_create(grpc_exec_ctx *exec_ctx, if (GRPC_TRACER_ON(grpc_lb_round_robin_trace)) { char *address_uri = grpc_sockaddr_to_uri(&addresses->addresses[i].address); - gpr_log(GPR_DEBUG, "Created subchannel %p for address uri %s", - (void *)subchannel, address_uri); + gpr_log(GPR_DEBUG, "index %zu: Created subchannel %p for address uri %s", + subchannel_index, (void *)subchannel, address_uri); gpr_free(address_uri); } grpc_channel_args_destroy(exec_ctx, new_args); if (subchannel != NULL) { - subchannel_data *sd = gpr_zalloc(sizeof(*sd)); - p->subchannels[subchannel_idx] = sd; + subchannel_data *sd = &p->subchannels[subchannel_index]; sd->policy = p; - sd->index = subchannel_idx; sd->subchannel = subchannel; + /* use some sentinel value outside of the range of grpc_connectivity_state + * to signal an undefined previous state. We won't be referring to this + * value again and it'll be overwritten after the first call to + * rr_connectivity_changed */ + sd->prev_connectivity_state = GRPC_CHANNEL_INIT; + sd->curr_connectivity_state = GRPC_CHANNEL_IDLE; sd->user_data_vtable = addresses->user_data_vtable; if (sd->user_data_vtable != NULL) { sd->user_data = sd->user_data_vtable->copy(addresses->addresses[i].user_data); } - ++subchannel_idx; grpc_closure_init(&sd->connectivity_changed_closure, rr_connectivity_changed_locked, sd, grpc_combiner_scheduler(args->combiner, false)); + ++subchannel_index; } } - if (subchannel_idx == 0) { + if (subchannel_index == 0) { /* couldn't create any subchannel. Bail out */ gpr_free(p->subchannels); gpr_free(p); return NULL; } - p->num_subchannels = subchannel_idx; + p->num_subchannels = subchannel_index; - /* The (dummy node) root of the ready list */ - p->ready_list.subchannel = NULL; - p->ready_list.prev = NULL; - p->ready_list.next = NULL; - p->ready_list_last_pick = &p->ready_list; + // Initialize the last pick index to the last subchannel, so that the + // first pick will start at the beginning of the list. + p->last_ready_subchannel_index = subchannel_index - 1; grpc_lb_policy_init(&p->base, &round_robin_lb_policy_vtable, args->combiner); grpc_connectivity_state_init(&p->state_tracker, GRPC_CHANNEL_IDLE, diff --git a/test/cpp/end2end/grpclb_end2end_test.cc b/test/cpp/end2end/grpclb_end2end_test.cc index 4e1bcc7a60d..b0d4e2dadf5 100644 --- a/test/cpp/end2end/grpclb_end2end_test.cc +++ b/test/cpp/end2end/grpclb_end2end_test.cc @@ -568,9 +568,11 @@ TEST_F(SingleBalancerTest, RepeatedServerlist) { // only the first half of the backends will receive them. for (size_t i = 0; i < backends_.size(); ++i) { if (i < backends_.size() / 2) - EXPECT_EQ(1U, backend_servers_[i].service_->request_count()); + EXPECT_EQ(1U, backend_servers_[i].service_->request_count()) + << "for backend #" << i; else - EXPECT_EQ(0U, backend_servers_[i].service_->request_count()); + EXPECT_EQ(0U, backend_servers_[i].service_->request_count()) + << "for backend #" << i; } EXPECT_EQ(statuses_and_responses.size(), num_backends_ / 2); for (const auto& status_and_response : statuses_and_responses) { diff --git a/test/cpp/end2end/round_robin_end2end_test.cc b/test/cpp/end2end/round_robin_end2end_test.cc index f8e3cc06c0a..ea7639bc8f0 100644 --- a/test/cpp/end2end/round_robin_end2end_test.cc +++ b/test/cpp/end2end/round_robin_end2end_test.cc @@ -42,7 +42,6 @@ #include #include #include -#include #include #include "src/proto/grpc/testing/echo.grpc.pb.h" @@ -131,22 +130,10 @@ class RoundRobinEnd2endTest : public ::testing::Test { int port_; std::unique_ptr server_; MyTestServiceImpl service_; - std::unique_ptr thread_; explicit ServerData(const grpc::string& server_host) { port_ = grpc_pick_unused_port_or_die(); gpr_log(GPR_INFO, "starting server on port %d", port_); - std::mutex mu; - std::condition_variable cond; - thread_.reset(new std::thread( - std::bind(&ServerData::Start, this, server_host, &mu, &cond))); - std::unique_lock lock(mu); - cond.wait(lock); - gpr_log(GPR_INFO, "server startup complete"); - } - - void Start(const grpc::string& server_host, std::mutex* mu, - std::condition_variable* cond) { std::ostringstream server_address; server_address << server_host << ":" << port_; ServerBuilder builder; @@ -154,18 +141,13 @@ class RoundRobinEnd2endTest : public ::testing::Test { InsecureServerCredentials()); builder.RegisterService(&service_); server_ = builder.BuildAndStart(); - std::lock_guard lock(*mu); - cond->notify_one(); + gpr_log(GPR_INFO, "server startup complete"); } - void Shutdown() { - server_->Shutdown(); - thread_->join(); - } + void Shutdown() { server_->Shutdown(); } }; const grpc::string server_host_; - CompletionQueue cli_cq_; std::shared_ptr channel_; std::unique_ptr stub_; std::vector> servers_; @@ -197,10 +179,13 @@ TEST_F(RoundRobinEnd2endTest, RoundRobin) { const int kNumServers = 3; StartServers(kNumServers); ResetStub(true /* round_robin */); - SendRpc(kNumServers); - // One request should have gone to each server. + // Send one RPC per backend and make sure they are used in order. + // Note: This relies on the fact that the subchannels are reported in + // state READY in the order in which the addresses are specified, + // which is only true because the backends are all local. for (size_t i = 0; i < servers_.size(); ++i) { - EXPECT_EQ(1, servers_[i]->service_.request_count()); + SendRpc(1); + EXPECT_EQ(1, servers_[i]->service_.request_count()) << "for backend #" << i; } // Check LB policy name for the channel. EXPECT_EQ("round_robin", channel_->GetLoadBalancingPolicyName()); From a538fba0ea1a4229d8063ff21e9a8efb8a2f61ad Mon Sep 17 00:00:00 2001 From: Matt Kwong Date: Fri, 19 May 2017 16:09:58 -0700 Subject: [PATCH 53/62] Undo downgrade of Protobuf submodule --- third_party/protobuf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/protobuf b/third_party/protobuf index 593e917c176..a6189acd18b 160000 --- a/third_party/protobuf +++ b/third_party/protobuf @@ -1 +1 @@ -Subproject commit 593e917c176b5bc5aafa57bf9f6030d749d91cd5 +Subproject commit a6189acd18b00611c1dc7042299ad75486f08a1a From af525b3a2691128323c97ab5fde56ba5ab7198f2 Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Fri, 19 May 2017 20:00:06 -0700 Subject: [PATCH 54/62] PHP: windows config.w32 file --- build.yaml | 1 + config.w32 | 642 +++++++++++++++++++++++++++++++++ package.xml | 27 ++ templates/config.m4.template | 4 +- templates/config.w32.template | 31 ++ templates/package.xml.template | 1 + 6 files changed, 704 insertions(+), 2 deletions(-) create mode 100644 config.w32 create mode 100644 templates/config.w32.template diff --git a/build.yaml b/build.yaml index 30c7a8e5edd..98401b84c55 100644 --- a/build.yaml +++ b/build.yaml @@ -4630,6 +4630,7 @@ php_config_m4: - grpc - gpr - boringssl + - z headers: - src/php/ext/grpc/byte_buffer.h - src/php/ext/grpc/call.h diff --git a/config.w32 b/config.w32 new file mode 100644 index 00000000000..0d82f9d757f --- /dev/null +++ b/config.w32 @@ -0,0 +1,642 @@ +// $Id$ +// vim:ft=javascript + +ARG_WITH("grpc", "grpc support", "no"); + +if (PHP_GRPC != "no") { + + grpc_source = + "src\\php\\ext\\grpc\\byte_buffer.c " + + "src\\php\\ext\\grpc\\call.c " + + "src\\php\\ext\\grpc\\call_credentials.c " + + "src\\php\\ext\\grpc\\channel.c " + + "src\\php\\ext\\grpc\\channel_credentials.c " + + "src\\php\\ext\\grpc\\completion_queue.c " + + "src\\php\\ext\\grpc\\php_grpc.c " + + "src\\php\\ext\\grpc\\server.c " + + "src\\php\\ext\\grpc\\server_credentials.c " + + "src\\php\\ext\\grpc\\timeval.c " + + "src\\core\\lib\\profiling\\basic_timers.c " + + "src\\core\\lib\\profiling\\stap_timers.c " + + "src\\core\\lib\\support\\alloc.c " + + "src\\core\\lib\\support\\arena.c " + + "src\\core\\lib\\support\\atm.c " + + "src\\core\\lib\\support\\avl.c " + + "src\\core\\lib\\support\\backoff.c " + + "src\\core\\lib\\support\\cmdline.c " + + "src\\core\\lib\\support\\cpu_iphone.c " + + "src\\core\\lib\\support\\cpu_linux.c " + + "src\\core\\lib\\support\\cpu_posix.c " + + "src\\core\\lib\\support\\cpu_windows.c " + + "src\\core\\lib\\support\\env_linux.c " + + "src\\core\\lib\\support\\env_posix.c " + + "src\\core\\lib\\support\\env_windows.c " + + "src\\core\\lib\\support\\histogram.c " + + "src\\core\\lib\\support\\host_port.c " + + "src\\core\\lib\\support\\log.c " + + "src\\core\\lib\\support\\log_android.c " + + "src\\core\\lib\\support\\log_linux.c " + + "src\\core\\lib\\support\\log_posix.c " + + "src\\core\\lib\\support\\log_windows.c " + + "src\\core\\lib\\support\\mpscq.c " + + "src\\core\\lib\\support\\murmur_hash.c " + + "src\\core\\lib\\support\\stack_lockfree.c " + + "src\\core\\lib\\support\\string.c " + + "src\\core\\lib\\support\\string_posix.c " + + "src\\core\\lib\\support\\string_util_windows.c " + + "src\\core\\lib\\support\\string_windows.c " + + "src\\core\\lib\\support\\subprocess_posix.c " + + "src\\core\\lib\\support\\subprocess_windows.c " + + "src\\core\\lib\\support\\sync.c " + + "src\\core\\lib\\support\\sync_posix.c " + + "src\\core\\lib\\support\\sync_windows.c " + + "src\\core\\lib\\support\\thd.c " + + "src\\core\\lib\\support\\thd_posix.c " + + "src\\core\\lib\\support\\thd_windows.c " + + "src\\core\\lib\\support\\time.c " + + "src\\core\\lib\\support\\time_posix.c " + + "src\\core\\lib\\support\\time_precise.c " + + "src\\core\\lib\\support\\time_windows.c " + + "src\\core\\lib\\support\\tls_pthread.c " + + "src\\core\\lib\\support\\tmpfile_msys.c " + + "src\\core\\lib\\support\\tmpfile_posix.c " + + "src\\core\\lib\\support\\tmpfile_windows.c " + + "src\\core\\lib\\support\\wrap_memcpy.c " + + "src\\core\\lib\\surface\\init.c " + + "src\\core\\lib\\channel\\channel_args.c " + + "src\\core\\lib\\channel\\channel_stack.c " + + "src\\core\\lib\\channel\\channel_stack_builder.c " + + "src\\core\\lib\\channel\\connected_channel.c " + + "src\\core\\lib\\channel\\handshaker.c " + + "src\\core\\lib\\channel\\handshaker_factory.c " + + "src\\core\\lib\\channel\\handshaker_registry.c " + + "src\\core\\lib\\compression\\compression.c " + + "src\\core\\lib\\compression\\message_compress.c " + + "src\\core\\lib\\http\\format_request.c " + + "src\\core\\lib\\http\\httpcli.c " + + "src\\core\\lib\\http\\parser.c " + + "src\\core\\lib\\iomgr\\closure.c " + + "src\\core\\lib\\iomgr\\combiner.c " + + "src\\core\\lib\\iomgr\\endpoint.c " + + "src\\core\\lib\\iomgr\\endpoint_pair_posix.c " + + "src\\core\\lib\\iomgr\\endpoint_pair_uv.c " + + "src\\core\\lib\\iomgr\\endpoint_pair_windows.c " + + "src\\core\\lib\\iomgr\\error.c " + + "src\\core\\lib\\iomgr\\ev_epoll1_linux.c " + + "src\\core\\lib\\iomgr\\ev_epoll_limited_pollers_linux.c " + + "src\\core\\lib\\iomgr\\ev_epoll_thread_pool_linux.c " + + "src\\core\\lib\\iomgr\\ev_epollex_linux.c " + + "src\\core\\lib\\iomgr\\ev_epollsig_linux.c " + + "src\\core\\lib\\iomgr\\ev_poll_posix.c " + + "src\\core\\lib\\iomgr\\ev_posix.c " + + "src\\core\\lib\\iomgr\\ev_windows.c " + + "src\\core\\lib\\iomgr\\exec_ctx.c " + + "src\\core\\lib\\iomgr\\executor.c " + + "src\\core\\lib\\iomgr\\iocp_windows.c " + + "src\\core\\lib\\iomgr\\iomgr.c " + + "src\\core\\lib\\iomgr\\iomgr_posix.c " + + "src\\core\\lib\\iomgr\\iomgr_uv.c " + + "src\\core\\lib\\iomgr\\iomgr_windows.c " + + "src\\core\\lib\\iomgr\\is_epollexclusive_available.c " + + "src\\core\\lib\\iomgr\\load_file.c " + + "src\\core\\lib\\iomgr\\lockfree_event.c " + + "src\\core\\lib\\iomgr\\network_status_tracker.c " + + "src\\core\\lib\\iomgr\\polling_entity.c " + + "src\\core\\lib\\iomgr\\pollset_set_uv.c " + + "src\\core\\lib\\iomgr\\pollset_set_windows.c " + + "src\\core\\lib\\iomgr\\pollset_uv.c " + + "src\\core\\lib\\iomgr\\pollset_windows.c " + + "src\\core\\lib\\iomgr\\resolve_address_posix.c " + + "src\\core\\lib\\iomgr\\resolve_address_uv.c " + + "src\\core\\lib\\iomgr\\resolve_address_windows.c " + + "src\\core\\lib\\iomgr\\resource_quota.c " + + "src\\core\\lib\\iomgr\\sockaddr_utils.c " + + "src\\core\\lib\\iomgr\\socket_factory_posix.c " + + "src\\core\\lib\\iomgr\\socket_mutator.c " + + "src\\core\\lib\\iomgr\\socket_utils_common_posix.c " + + "src\\core\\lib\\iomgr\\socket_utils_linux.c " + + "src\\core\\lib\\iomgr\\socket_utils_posix.c " + + "src\\core\\lib\\iomgr\\socket_utils_uv.c " + + "src\\core\\lib\\iomgr\\socket_utils_windows.c " + + "src\\core\\lib\\iomgr\\socket_windows.c " + + "src\\core\\lib\\iomgr\\tcp_client_posix.c " + + "src\\core\\lib\\iomgr\\tcp_client_uv.c " + + "src\\core\\lib\\iomgr\\tcp_client_windows.c " + + "src\\core\\lib\\iomgr\\tcp_posix.c " + + "src\\core\\lib\\iomgr\\tcp_server_posix.c " + + "src\\core\\lib\\iomgr\\tcp_server_utils_posix_common.c " + + "src\\core\\lib\\iomgr\\tcp_server_utils_posix_ifaddrs.c " + + "src\\core\\lib\\iomgr\\tcp_server_utils_posix_noifaddrs.c " + + "src\\core\\lib\\iomgr\\tcp_server_uv.c " + + "src\\core\\lib\\iomgr\\tcp_server_windows.c " + + "src\\core\\lib\\iomgr\\tcp_uv.c " + + "src\\core\\lib\\iomgr\\tcp_windows.c " + + "src\\core\\lib\\iomgr\\time_averaged_stats.c " + + "src\\core\\lib\\iomgr\\timer_generic.c " + + "src\\core\\lib\\iomgr\\timer_heap.c " + + "src\\core\\lib\\iomgr\\timer_manager.c " + + "src\\core\\lib\\iomgr\\timer_uv.c " + + "src\\core\\lib\\iomgr\\udp_server.c " + + "src\\core\\lib\\iomgr\\unix_sockets_posix.c " + + "src\\core\\lib\\iomgr\\unix_sockets_posix_noop.c " + + "src\\core\\lib\\iomgr\\wakeup_fd_cv.c " + + "src\\core\\lib\\iomgr\\wakeup_fd_eventfd.c " + + "src\\core\\lib\\iomgr\\wakeup_fd_nospecial.c " + + "src\\core\\lib\\iomgr\\wakeup_fd_pipe.c " + + "src\\core\\lib\\iomgr\\wakeup_fd_posix.c " + + "src\\core\\lib\\iomgr\\workqueue_uv.c " + + "src\\core\\lib\\iomgr\\workqueue_windows.c " + + "src\\core\\lib\\json\\json.c " + + "src\\core\\lib\\json\\json_reader.c " + + "src\\core\\lib\\json\\json_string.c " + + "src\\core\\lib\\json\\json_writer.c " + + "src\\core\\lib\\slice\\b64.c " + + "src\\core\\lib\\slice\\percent_encoding.c " + + "src\\core\\lib\\slice\\slice.c " + + "src\\core\\lib\\slice\\slice_buffer.c " + + "src\\core\\lib\\slice\\slice_hash_table.c " + + "src\\core\\lib\\slice\\slice_intern.c " + + "src\\core\\lib\\slice\\slice_string_helpers.c " + + "src\\core\\lib\\surface\\alarm.c " + + "src\\core\\lib\\surface\\api_trace.c " + + "src\\core\\lib\\surface\\byte_buffer.c " + + "src\\core\\lib\\surface\\byte_buffer_reader.c " + + "src\\core\\lib\\surface\\call.c " + + "src\\core\\lib\\surface\\call_details.c " + + "src\\core\\lib\\surface\\call_log_batch.c " + + "src\\core\\lib\\surface\\channel.c " + + "src\\core\\lib\\surface\\channel_init.c " + + "src\\core\\lib\\surface\\channel_ping.c " + + "src\\core\\lib\\surface\\channel_stack_type.c " + + "src\\core\\lib\\surface\\completion_queue.c " + + "src\\core\\lib\\surface\\completion_queue_factory.c " + + "src\\core\\lib\\surface\\event_string.c " + + "src\\core\\lib\\surface\\lame_client.cc " + + "src\\core\\lib\\surface\\metadata_array.c " + + "src\\core\\lib\\surface\\server.c " + + "src\\core\\lib\\surface\\validate_metadata.c " + + "src\\core\\lib\\surface\\version.c " + + "src\\core\\lib\\transport\\bdp_estimator.c " + + "src\\core\\lib\\transport\\byte_stream.c " + + "src\\core\\lib\\transport\\connectivity_state.c " + + "src\\core\\lib\\transport\\error_utils.c " + + "src\\core\\lib\\transport\\metadata.c " + + "src\\core\\lib\\transport\\metadata_batch.c " + + "src\\core\\lib\\transport\\pid_controller.c " + + "src\\core\\lib\\transport\\service_config.c " + + "src\\core\\lib\\transport\\static_metadata.c " + + "src\\core\\lib\\transport\\status_conversion.c " + + "src\\core\\lib\\transport\\timeout_encoding.c " + + "src\\core\\lib\\transport\\transport.c " + + "src\\core\\lib\\transport\\transport_op_string.c " + + "src\\core\\lib\\debug\\trace.c " + + "src\\core\\ext\\transport\\chttp2\\server\\secure\\server_secure_chttp2.c " + + "src\\core\\ext\\transport\\chttp2\\transport\\bin_decoder.c " + + "src\\core\\ext\\transport\\chttp2\\transport\\bin_encoder.c " + + "src\\core\\ext\\transport\\chttp2\\transport\\chttp2_plugin.c " + + "src\\core\\ext\\transport\\chttp2\\transport\\chttp2_transport.c " + + "src\\core\\ext\\transport\\chttp2\\transport\\frame_data.c " + + "src\\core\\ext\\transport\\chttp2\\transport\\frame_goaway.c " + + "src\\core\\ext\\transport\\chttp2\\transport\\frame_ping.c " + + "src\\core\\ext\\transport\\chttp2\\transport\\frame_rst_stream.c " + + "src\\core\\ext\\transport\\chttp2\\transport\\frame_settings.c " + + "src\\core\\ext\\transport\\chttp2\\transport\\frame_window_update.c " + + "src\\core\\ext\\transport\\chttp2\\transport\\hpack_encoder.c " + + "src\\core\\ext\\transport\\chttp2\\transport\\hpack_parser.c " + + "src\\core\\ext\\transport\\chttp2\\transport\\hpack_table.c " + + "src\\core\\ext\\transport\\chttp2\\transport\\http2_settings.c " + + "src\\core\\ext\\transport\\chttp2\\transport\\huffsyms.c " + + "src\\core\\ext\\transport\\chttp2\\transport\\incoming_metadata.c " + + "src\\core\\ext\\transport\\chttp2\\transport\\parsing.c " + + "src\\core\\ext\\transport\\chttp2\\transport\\stream_lists.c " + + "src\\core\\ext\\transport\\chttp2\\transport\\stream_map.c " + + "src\\core\\ext\\transport\\chttp2\\transport\\varint.c " + + "src\\core\\ext\\transport\\chttp2\\transport\\writing.c " + + "src\\core\\ext\\transport\\chttp2\\alpn\\alpn.c " + + "src\\core\\ext\\filters\\http\\client\\http_client_filter.c " + + "src\\core\\ext\\filters\\http\\http_filters_plugin.c " + + "src\\core\\ext\\filters\\http\\message_compress\\message_compress_filter.c " + + "src\\core\\ext\\filters\\http\\server\\http_server_filter.c " + + "src\\core\\lib\\http\\httpcli_security_connector.c " + + "src\\core\\lib\\security\\context\\security_context.c " + + "src\\core\\lib\\security\\credentials\\composite\\composite_credentials.c " + + "src\\core\\lib\\security\\credentials\\credentials.c " + + "src\\core\\lib\\security\\credentials\\credentials_metadata.c " + + "src\\core\\lib\\security\\credentials\\fake\\fake_credentials.c " + + "src\\core\\lib\\security\\credentials\\google_default\\credentials_generic.c " + + "src\\core\\lib\\security\\credentials\\google_default\\google_default_credentials.c " + + "src\\core\\lib\\security\\credentials\\iam\\iam_credentials.c " + + "src\\core\\lib\\security\\credentials\\jwt\\json_token.c " + + "src\\core\\lib\\security\\credentials\\jwt\\jwt_credentials.c " + + "src\\core\\lib\\security\\credentials\\jwt\\jwt_verifier.c " + + "src\\core\\lib\\security\\credentials\\oauth2\\oauth2_credentials.c " + + "src\\core\\lib\\security\\credentials\\plugin\\plugin_credentials.c " + + "src\\core\\lib\\security\\credentials\\ssl\\ssl_credentials.c " + + "src\\core\\lib\\security\\transport\\client_auth_filter.c " + + "src\\core\\lib\\security\\transport\\lb_targets_info.c " + + "src\\core\\lib\\security\\transport\\secure_endpoint.c " + + "src\\core\\lib\\security\\transport\\security_connector.c " + + "src\\core\\lib\\security\\transport\\security_handshaker.c " + + "src\\core\\lib\\security\\transport\\server_auth_filter.c " + + "src\\core\\lib\\security\\transport\\tsi_error.c " + + "src\\core\\lib\\security\\util\\json_util.c " + + "src\\core\\lib\\surface\\init_secure.c " + + "src\\core\\tsi\\fake_transport_security.c " + + "src\\core\\tsi\\ssl_transport_security.c " + + "src\\core\\tsi\\transport_security.c " + + "src\\core\\tsi\\transport_security_adapter.c " + + "src\\core\\ext\\transport\\chttp2\\server\\chttp2_server.c " + + "src\\core\\ext\\transport\\chttp2\\client\\secure\\secure_channel_create.c " + + "src\\core\\ext\\filters\\client_channel\\channel_connectivity.c " + + "src\\core\\ext\\filters\\client_channel\\client_channel.c " + + "src\\core\\ext\\filters\\client_channel\\client_channel_factory.c " + + "src\\core\\ext\\filters\\client_channel\\client_channel_plugin.c " + + "src\\core\\ext\\filters\\client_channel\\connector.c " + + "src\\core\\ext\\filters\\client_channel\\http_connect_handshaker.c " + + "src\\core\\ext\\filters\\client_channel\\http_proxy.c " + + "src\\core\\ext\\filters\\client_channel\\lb_policy.c " + + "src\\core\\ext\\filters\\client_channel\\lb_policy_factory.c " + + "src\\core\\ext\\filters\\client_channel\\lb_policy_registry.c " + + "src\\core\\ext\\filters\\client_channel\\parse_address.c " + + "src\\core\\ext\\filters\\client_channel\\proxy_mapper.c " + + "src\\core\\ext\\filters\\client_channel\\proxy_mapper_registry.c " + + "src\\core\\ext\\filters\\client_channel\\resolver.c " + + "src\\core\\ext\\filters\\client_channel\\resolver_factory.c " + + "src\\core\\ext\\filters\\client_channel\\resolver_registry.c " + + "src\\core\\ext\\filters\\client_channel\\retry_throttle.c " + + "src\\core\\ext\\filters\\client_channel\\subchannel.c " + + "src\\core\\ext\\filters\\client_channel\\subchannel_index.c " + + "src\\core\\ext\\filters\\client_channel\\uri_parser.c " + + "src\\core\\ext\\filters\\deadline\\deadline_filter.c " + + "src\\core\\ext\\transport\\chttp2\\client\\chttp2_connector.c " + + "src\\core\\ext\\transport\\chttp2\\server\\insecure\\server_chttp2.c " + + "src\\core\\ext\\transport\\chttp2\\server\\insecure\\server_chttp2_posix.c " + + "src\\core\\ext\\transport\\chttp2\\client\\insecure\\channel_create.c " + + "src\\core\\ext\\transport\\chttp2\\client\\insecure\\channel_create_posix.c " + + "src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\client_load_reporting_filter.c " + + "src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\grpclb.c " + + "src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\grpclb_channel_secure.c " + + "src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\grpclb_client_stats.c " + + "src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\load_balancer_api.c " + + "src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\proto\\grpc\\lb\\v1\\load_balancer.pb.c " + + "third_party\\nanopb\\pb_common.c " + + "third_party\\nanopb\\pb_decode.c " + + "third_party\\nanopb\\pb_encode.c " + + "src\\core\\ext\\filters\\client_channel\\lb_policy\\pick_first\\pick_first.c " + + "src\\core\\ext\\filters\\client_channel\\lb_policy\\round_robin\\round_robin.c " + + "src\\core\\ext\\filters\\client_channel\\resolver\\dns\\c_ares\\dns_resolver_ares.c " + + "src\\core\\ext\\filters\\client_channel\\resolver\\dns\\c_ares\\grpc_ares_ev_driver_posix.c " + + "src\\core\\ext\\filters\\client_channel\\resolver\\dns\\c_ares\\grpc_ares_wrapper.c " + + "src\\core\\ext\\filters\\client_channel\\resolver\\dns\\native\\dns_resolver.c " + + "src\\core\\ext\\filters\\client_channel\\resolver\\sockaddr\\sockaddr_resolver.c " + + "src\\core\\ext\\filters\\load_reporting\\load_reporting.c " + + "src\\core\\ext\\filters\\load_reporting\\load_reporting_filter.c " + + "src\\core\\ext\\census\\base_resources.c " + + "src\\core\\ext\\census\\context.c " + + "src\\core\\ext\\census\\gen\\census.pb.c " + + "src\\core\\ext\\census\\gen\\trace_context.pb.c " + + "src\\core\\ext\\census\\grpc_context.c " + + "src\\core\\ext\\census\\grpc_filter.c " + + "src\\core\\ext\\census\\grpc_plugin.c " + + "src\\core\\ext\\census\\initialize.c " + + "src\\core\\ext\\census\\mlog.c " + + "src\\core\\ext\\census\\operation.c " + + "src\\core\\ext\\census\\placeholders.c " + + "src\\core\\ext\\census\\resource.c " + + "src\\core\\ext\\census\\trace_context.c " + + "src\\core\\ext\\census\\tracing.c " + + "src\\core\\ext\\filters\\max_age\\max_age_filter.c " + + "src\\core\\ext\\filters\\message_size\\message_size_filter.c " + + "src\\core\\ext\\filters\\workarounds\\workaround_cronet_compression_filter.c " + + "src\\core\\ext\\filters\\workarounds\\workaround_utils.c " + + "src\\core\\plugin_registry\\grpc_plugin_registry.c " + + "src\\boringssl\\err_data.c " + + "third_party\\boringssl\\crypto\\aes\\aes.c " + + "third_party\\boringssl\\crypto\\aes\\mode_wrappers.c " + + "third_party\\boringssl\\crypto\\asn1\\a_bitstr.c " + + "third_party\\boringssl\\crypto\\asn1\\a_bool.c " + + "third_party\\boringssl\\crypto\\asn1\\a_d2i_fp.c " + + "third_party\\boringssl\\crypto\\asn1\\a_dup.c " + + "third_party\\boringssl\\crypto\\asn1\\a_enum.c " + + "third_party\\boringssl\\crypto\\asn1\\a_gentm.c " + + "third_party\\boringssl\\crypto\\asn1\\a_i2d_fp.c " + + "third_party\\boringssl\\crypto\\asn1\\a_int.c " + + "third_party\\boringssl\\crypto\\asn1\\a_mbstr.c " + + "third_party\\boringssl\\crypto\\asn1\\a_object.c " + + "third_party\\boringssl\\crypto\\asn1\\a_octet.c " + + "third_party\\boringssl\\crypto\\asn1\\a_print.c " + + "third_party\\boringssl\\crypto\\asn1\\a_strnid.c " + + "third_party\\boringssl\\crypto\\asn1\\a_time.c " + + "third_party\\boringssl\\crypto\\asn1\\a_type.c " + + "third_party\\boringssl\\crypto\\asn1\\a_utctm.c " + + "third_party\\boringssl\\crypto\\asn1\\a_utf8.c " + + "third_party\\boringssl\\crypto\\asn1\\asn1_lib.c " + + "third_party\\boringssl\\crypto\\asn1\\asn1_par.c " + + "third_party\\boringssl\\crypto\\asn1\\asn_pack.c " + + "third_party\\boringssl\\crypto\\asn1\\f_enum.c " + + "third_party\\boringssl\\crypto\\asn1\\f_int.c " + + "third_party\\boringssl\\crypto\\asn1\\f_string.c " + + "third_party\\boringssl\\crypto\\asn1\\t_bitst.c " + + "third_party\\boringssl\\crypto\\asn1\\tasn_dec.c " + + "third_party\\boringssl\\crypto\\asn1\\tasn_enc.c " + + "third_party\\boringssl\\crypto\\asn1\\tasn_fre.c " + + "third_party\\boringssl\\crypto\\asn1\\tasn_new.c " + + "third_party\\boringssl\\crypto\\asn1\\tasn_typ.c " + + "third_party\\boringssl\\crypto\\asn1\\tasn_utl.c " + + "third_party\\boringssl\\crypto\\asn1\\x_bignum.c " + + "third_party\\boringssl\\crypto\\asn1\\x_long.c " + + "third_party\\boringssl\\crypto\\base64\\base64.c " + + "third_party\\boringssl\\crypto\\bio\\bio.c " + + "third_party\\boringssl\\crypto\\bio\\bio_mem.c " + + "third_party\\boringssl\\crypto\\bio\\buffer.c " + + "third_party\\boringssl\\crypto\\bio\\connect.c " + + "third_party\\boringssl\\crypto\\bio\\fd.c " + + "third_party\\boringssl\\crypto\\bio\\file.c " + + "third_party\\boringssl\\crypto\\bio\\hexdump.c " + + "third_party\\boringssl\\crypto\\bio\\pair.c " + + "third_party\\boringssl\\crypto\\bio\\printf.c " + + "third_party\\boringssl\\crypto\\bio\\socket.c " + + "third_party\\boringssl\\crypto\\bio\\socket_helper.c " + + "third_party\\boringssl\\crypto\\bn\\add.c " + + "third_party\\boringssl\\crypto\\bn\\asm\\x86_64-gcc.c " + + "third_party\\boringssl\\crypto\\bn\\bn.c " + + "third_party\\boringssl\\crypto\\bn\\bn_asn1.c " + + "third_party\\boringssl\\crypto\\bn\\cmp.c " + + "third_party\\boringssl\\crypto\\bn\\convert.c " + + "third_party\\boringssl\\crypto\\bn\\ctx.c " + + "third_party\\boringssl\\crypto\\bn\\div.c " + + "third_party\\boringssl\\crypto\\bn\\exponentiation.c " + + "third_party\\boringssl\\crypto\\bn\\gcd.c " + + "third_party\\boringssl\\crypto\\bn\\generic.c " + + "third_party\\boringssl\\crypto\\bn\\kronecker.c " + + "third_party\\boringssl\\crypto\\bn\\montgomery.c " + + "third_party\\boringssl\\crypto\\bn\\montgomery_inv.c " + + "third_party\\boringssl\\crypto\\bn\\mul.c " + + "third_party\\boringssl\\crypto\\bn\\prime.c " + + "third_party\\boringssl\\crypto\\bn\\random.c " + + "third_party\\boringssl\\crypto\\bn\\rsaz_exp.c " + + "third_party\\boringssl\\crypto\\bn\\shift.c " + + "third_party\\boringssl\\crypto\\bn\\sqrt.c " + + "third_party\\boringssl\\crypto\\buf\\buf.c " + + "third_party\\boringssl\\crypto\\bytestring\\asn1_compat.c " + + "third_party\\boringssl\\crypto\\bytestring\\ber.c " + + "third_party\\boringssl\\crypto\\bytestring\\cbb.c " + + "third_party\\boringssl\\crypto\\bytestring\\cbs.c " + + "third_party\\boringssl\\crypto\\chacha\\chacha.c " + + "third_party\\boringssl\\crypto\\cipher\\aead.c " + + "third_party\\boringssl\\crypto\\cipher\\cipher.c " + + "third_party\\boringssl\\crypto\\cipher\\derive_key.c " + + "third_party\\boringssl\\crypto\\cipher\\e_aes.c " + + "third_party\\boringssl\\crypto\\cipher\\e_chacha20poly1305.c " + + "third_party\\boringssl\\crypto\\cipher\\e_des.c " + + "third_party\\boringssl\\crypto\\cipher\\e_null.c " + + "third_party\\boringssl\\crypto\\cipher\\e_rc2.c " + + "third_party\\boringssl\\crypto\\cipher\\e_rc4.c " + + "third_party\\boringssl\\crypto\\cipher\\e_ssl3.c " + + "third_party\\boringssl\\crypto\\cipher\\e_tls.c " + + "third_party\\boringssl\\crypto\\cipher\\tls_cbc.c " + + "third_party\\boringssl\\crypto\\cmac\\cmac.c " + + "third_party\\boringssl\\crypto\\conf\\conf.c " + + "third_party\\boringssl\\crypto\\cpu-aarch64-linux.c " + + "third_party\\boringssl\\crypto\\cpu-arm-linux.c " + + "third_party\\boringssl\\crypto\\cpu-arm.c " + + "third_party\\boringssl\\crypto\\cpu-intel.c " + + "third_party\\boringssl\\crypto\\cpu-ppc64le.c " + + "third_party\\boringssl\\crypto\\crypto.c " + + "third_party\\boringssl\\crypto\\curve25519\\curve25519.c " + + "third_party\\boringssl\\crypto\\curve25519\\spake25519.c " + + "third_party\\boringssl\\crypto\\curve25519\\x25519-x86_64.c " + + "third_party\\boringssl\\crypto\\des\\des.c " + + "third_party\\boringssl\\crypto\\dh\\check.c " + + "third_party\\boringssl\\crypto\\dh\\dh.c " + + "third_party\\boringssl\\crypto\\dh\\dh_asn1.c " + + "third_party\\boringssl\\crypto\\dh\\params.c " + + "third_party\\boringssl\\crypto\\digest\\digest.c " + + "third_party\\boringssl\\crypto\\digest\\digests.c " + + "third_party\\boringssl\\crypto\\dsa\\dsa.c " + + "third_party\\boringssl\\crypto\\dsa\\dsa_asn1.c " + + "third_party\\boringssl\\crypto\\ec\\ec.c " + + "third_party\\boringssl\\crypto\\ec\\ec_asn1.c " + + "third_party\\boringssl\\crypto\\ec\\ec_key.c " + + "third_party\\boringssl\\crypto\\ec\\ec_montgomery.c " + + "third_party\\boringssl\\crypto\\ec\\oct.c " + + "third_party\\boringssl\\crypto\\ec\\p224-64.c " + + "third_party\\boringssl\\crypto\\ec\\p256-64.c " + + "third_party\\boringssl\\crypto\\ec\\p256-x86_64.c " + + "third_party\\boringssl\\crypto\\ec\\simple.c " + + "third_party\\boringssl\\crypto\\ec\\util-64.c " + + "third_party\\boringssl\\crypto\\ec\\wnaf.c " + + "third_party\\boringssl\\crypto\\ecdh\\ecdh.c " + + "third_party\\boringssl\\crypto\\ecdsa\\ecdsa.c " + + "third_party\\boringssl\\crypto\\ecdsa\\ecdsa_asn1.c " + + "third_party\\boringssl\\crypto\\engine\\engine.c " + + "third_party\\boringssl\\crypto\\err\\err.c " + + "third_party\\boringssl\\crypto\\evp\\digestsign.c " + + "third_party\\boringssl\\crypto\\evp\\evp.c " + + "third_party\\boringssl\\crypto\\evp\\evp_asn1.c " + + "third_party\\boringssl\\crypto\\evp\\evp_ctx.c " + + "third_party\\boringssl\\crypto\\evp\\p_dsa_asn1.c " + + "third_party\\boringssl\\crypto\\evp\\p_ec.c " + + "third_party\\boringssl\\crypto\\evp\\p_ec_asn1.c " + + "third_party\\boringssl\\crypto\\evp\\p_rsa.c " + + "third_party\\boringssl\\crypto\\evp\\p_rsa_asn1.c " + + "third_party\\boringssl\\crypto\\evp\\pbkdf.c " + + "third_party\\boringssl\\crypto\\evp\\print.c " + + "third_party\\boringssl\\crypto\\evp\\sign.c " + + "third_party\\boringssl\\crypto\\ex_data.c " + + "third_party\\boringssl\\crypto\\hkdf\\hkdf.c " + + "third_party\\boringssl\\crypto\\hmac\\hmac.c " + + "third_party\\boringssl\\crypto\\lhash\\lhash.c " + + "third_party\\boringssl\\crypto\\md4\\md4.c " + + "third_party\\boringssl\\crypto\\md5\\md5.c " + + "third_party\\boringssl\\crypto\\mem.c " + + "third_party\\boringssl\\crypto\\modes\\cbc.c " + + "third_party\\boringssl\\crypto\\modes\\cfb.c " + + "third_party\\boringssl\\crypto\\modes\\ctr.c " + + "third_party\\boringssl\\crypto\\modes\\gcm.c " + + "third_party\\boringssl\\crypto\\modes\\ofb.c " + + "third_party\\boringssl\\crypto\\newhope\\error_correction.c " + + "third_party\\boringssl\\crypto\\newhope\\newhope.c " + + "third_party\\boringssl\\crypto\\newhope\\ntt.c " + + "third_party\\boringssl\\crypto\\newhope\\poly.c " + + "third_party\\boringssl\\crypto\\newhope\\precomp.c " + + "third_party\\boringssl\\crypto\\newhope\\reduce.c " + + "third_party\\boringssl\\crypto\\obj\\obj.c " + + "third_party\\boringssl\\crypto\\obj\\obj_xref.c " + + "third_party\\boringssl\\crypto\\pem\\pem_all.c " + + "third_party\\boringssl\\crypto\\pem\\pem_info.c " + + "third_party\\boringssl\\crypto\\pem\\pem_lib.c " + + "third_party\\boringssl\\crypto\\pem\\pem_oth.c " + + "third_party\\boringssl\\crypto\\pem\\pem_pk8.c " + + "third_party\\boringssl\\crypto\\pem\\pem_pkey.c " + + "third_party\\boringssl\\crypto\\pem\\pem_x509.c " + + "third_party\\boringssl\\crypto\\pem\\pem_xaux.c " + + "third_party\\boringssl\\crypto\\pkcs8\\p5_pbe.c " + + "third_party\\boringssl\\crypto\\pkcs8\\p5_pbev2.c " + + "third_party\\boringssl\\crypto\\pkcs8\\p8_pkey.c " + + "third_party\\boringssl\\crypto\\pkcs8\\pkcs8.c " + + "third_party\\boringssl\\crypto\\poly1305\\poly1305.c " + + "third_party\\boringssl\\crypto\\poly1305\\poly1305_arm.c " + + "third_party\\boringssl\\crypto\\poly1305\\poly1305_vec.c " + + "third_party\\boringssl\\crypto\\rand\\deterministic.c " + + "third_party\\boringssl\\crypto\\rand\\rand.c " + + "third_party\\boringssl\\crypto\\rand\\urandom.c " + + "third_party\\boringssl\\crypto\\rand\\windows.c " + + "third_party\\boringssl\\crypto\\rc4\\rc4.c " + + "third_party\\boringssl\\crypto\\refcount_c11.c " + + "third_party\\boringssl\\crypto\\refcount_lock.c " + + "third_party\\boringssl\\crypto\\rsa\\blinding.c " + + "third_party\\boringssl\\crypto\\rsa\\padding.c " + + "third_party\\boringssl\\crypto\\rsa\\rsa.c " + + "third_party\\boringssl\\crypto\\rsa\\rsa_asn1.c " + + "third_party\\boringssl\\crypto\\rsa\\rsa_impl.c " + + "third_party\\boringssl\\crypto\\sha\\sha1.c " + + "third_party\\boringssl\\crypto\\sha\\sha256.c " + + "third_party\\boringssl\\crypto\\sha\\sha512.c " + + "third_party\\boringssl\\crypto\\stack\\stack.c " + + "third_party\\boringssl\\crypto\\thread.c " + + "third_party\\boringssl\\crypto\\thread_none.c " + + "third_party\\boringssl\\crypto\\thread_pthread.c " + + "third_party\\boringssl\\crypto\\thread_win.c " + + "third_party\\boringssl\\crypto\\time_support.c " + + "third_party\\boringssl\\crypto\\x509\\a_digest.c " + + "third_party\\boringssl\\crypto\\x509\\a_sign.c " + + "third_party\\boringssl\\crypto\\x509\\a_strex.c " + + "third_party\\boringssl\\crypto\\x509\\a_verify.c " + + "third_party\\boringssl\\crypto\\x509\\algorithm.c " + + "third_party\\boringssl\\crypto\\x509\\asn1_gen.c " + + "third_party\\boringssl\\crypto\\x509\\by_dir.c " + + "third_party\\boringssl\\crypto\\x509\\by_file.c " + + "third_party\\boringssl\\crypto\\x509\\i2d_pr.c " + + "third_party\\boringssl\\crypto\\x509\\pkcs7.c " + + "third_party\\boringssl\\crypto\\x509\\rsa_pss.c " + + "third_party\\boringssl\\crypto\\x509\\t_crl.c " + + "third_party\\boringssl\\crypto\\x509\\t_req.c " + + "third_party\\boringssl\\crypto\\x509\\t_x509.c " + + "third_party\\boringssl\\crypto\\x509\\t_x509a.c " + + "third_party\\boringssl\\crypto\\x509\\x509.c " + + "third_party\\boringssl\\crypto\\x509\\x509_att.c " + + "third_party\\boringssl\\crypto\\x509\\x509_cmp.c " + + "third_party\\boringssl\\crypto\\x509\\x509_d2.c " + + "third_party\\boringssl\\crypto\\x509\\x509_def.c " + + "third_party\\boringssl\\crypto\\x509\\x509_ext.c " + + "third_party\\boringssl\\crypto\\x509\\x509_lu.c " + + "third_party\\boringssl\\crypto\\x509\\x509_obj.c " + + "third_party\\boringssl\\crypto\\x509\\x509_r2x.c " + + "third_party\\boringssl\\crypto\\x509\\x509_req.c " + + "third_party\\boringssl\\crypto\\x509\\x509_set.c " + + "third_party\\boringssl\\crypto\\x509\\x509_trs.c " + + "third_party\\boringssl\\crypto\\x509\\x509_txt.c " + + "third_party\\boringssl\\crypto\\x509\\x509_v3.c " + + "third_party\\boringssl\\crypto\\x509\\x509_vfy.c " + + "third_party\\boringssl\\crypto\\x509\\x509_vpm.c " + + "third_party\\boringssl\\crypto\\x509\\x509cset.c " + + "third_party\\boringssl\\crypto\\x509\\x509name.c " + + "third_party\\boringssl\\crypto\\x509\\x509rset.c " + + "third_party\\boringssl\\crypto\\x509\\x509spki.c " + + "third_party\\boringssl\\crypto\\x509\\x509type.c " + + "third_party\\boringssl\\crypto\\x509\\x_algor.c " + + "third_party\\boringssl\\crypto\\x509\\x_all.c " + + "third_party\\boringssl\\crypto\\x509\\x_attrib.c " + + "third_party\\boringssl\\crypto\\x509\\x_crl.c " + + "third_party\\boringssl\\crypto\\x509\\x_exten.c " + + "third_party\\boringssl\\crypto\\x509\\x_info.c " + + "third_party\\boringssl\\crypto\\x509\\x_name.c " + + "third_party\\boringssl\\crypto\\x509\\x_pkey.c " + + "third_party\\boringssl\\crypto\\x509\\x_pubkey.c " + + "third_party\\boringssl\\crypto\\x509\\x_req.c " + + "third_party\\boringssl\\crypto\\x509\\x_sig.c " + + "third_party\\boringssl\\crypto\\x509\\x_spki.c " + + "third_party\\boringssl\\crypto\\x509\\x_val.c " + + "third_party\\boringssl\\crypto\\x509\\x_x509.c " + + "third_party\\boringssl\\crypto\\x509\\x_x509a.c " + + "third_party\\boringssl\\crypto\\x509v3\\pcy_cache.c " + + "third_party\\boringssl\\crypto\\x509v3\\pcy_data.c " + + "third_party\\boringssl\\crypto\\x509v3\\pcy_lib.c " + + "third_party\\boringssl\\crypto\\x509v3\\pcy_map.c " + + "third_party\\boringssl\\crypto\\x509v3\\pcy_node.c " + + "third_party\\boringssl\\crypto\\x509v3\\pcy_tree.c " + + "third_party\\boringssl\\crypto\\x509v3\\v3_akey.c " + + "third_party\\boringssl\\crypto\\x509v3\\v3_akeya.c " + + "third_party\\boringssl\\crypto\\x509v3\\v3_alt.c " + + "third_party\\boringssl\\crypto\\x509v3\\v3_bcons.c " + + "third_party\\boringssl\\crypto\\x509v3\\v3_bitst.c " + + "third_party\\boringssl\\crypto\\x509v3\\v3_conf.c " + + "third_party\\boringssl\\crypto\\x509v3\\v3_cpols.c " + + "third_party\\boringssl\\crypto\\x509v3\\v3_crld.c " + + "third_party\\boringssl\\crypto\\x509v3\\v3_enum.c " + + "third_party\\boringssl\\crypto\\x509v3\\v3_extku.c " + + "third_party\\boringssl\\crypto\\x509v3\\v3_genn.c " + + "third_party\\boringssl\\crypto\\x509v3\\v3_ia5.c " + + "third_party\\boringssl\\crypto\\x509v3\\v3_info.c " + + "third_party\\boringssl\\crypto\\x509v3\\v3_int.c " + + "third_party\\boringssl\\crypto\\x509v3\\v3_lib.c " + + "third_party\\boringssl\\crypto\\x509v3\\v3_ncons.c " + + "third_party\\boringssl\\crypto\\x509v3\\v3_pci.c " + + "third_party\\boringssl\\crypto\\x509v3\\v3_pcia.c " + + "third_party\\boringssl\\crypto\\x509v3\\v3_pcons.c " + + "third_party\\boringssl\\crypto\\x509v3\\v3_pku.c " + + "third_party\\boringssl\\crypto\\x509v3\\v3_pmaps.c " + + "third_party\\boringssl\\crypto\\x509v3\\v3_prn.c " + + "third_party\\boringssl\\crypto\\x509v3\\v3_purp.c " + + "third_party\\boringssl\\crypto\\x509v3\\v3_skey.c " + + "third_party\\boringssl\\crypto\\x509v3\\v3_sxnet.c " + + "third_party\\boringssl\\crypto\\x509v3\\v3_utl.c " + + "third_party\\boringssl\\ssl\\custom_extensions.c " + + "third_party\\boringssl\\ssl\\d1_both.c " + + "third_party\\boringssl\\ssl\\d1_lib.c " + + "third_party\\boringssl\\ssl\\d1_pkt.c " + + "third_party\\boringssl\\ssl\\d1_srtp.c " + + "third_party\\boringssl\\ssl\\dtls_method.c " + + "third_party\\boringssl\\ssl\\dtls_record.c " + + "third_party\\boringssl\\ssl\\handshake_client.c " + + "third_party\\boringssl\\ssl\\handshake_server.c " + + "third_party\\boringssl\\ssl\\s3_both.c " + + "third_party\\boringssl\\ssl\\s3_enc.c " + + "third_party\\boringssl\\ssl\\s3_lib.c " + + "third_party\\boringssl\\ssl\\s3_pkt.c " + + "third_party\\boringssl\\ssl\\ssl_aead_ctx.c " + + "third_party\\boringssl\\ssl\\ssl_asn1.c " + + "third_party\\boringssl\\ssl\\ssl_buffer.c " + + "third_party\\boringssl\\ssl\\ssl_cert.c " + + "third_party\\boringssl\\ssl\\ssl_cipher.c " + + "third_party\\boringssl\\ssl\\ssl_ecdh.c " + + "third_party\\boringssl\\ssl\\ssl_file.c " + + "third_party\\boringssl\\ssl\\ssl_lib.c " + + "third_party\\boringssl\\ssl\\ssl_rsa.c " + + "third_party\\boringssl\\ssl\\ssl_session.c " + + "third_party\\boringssl\\ssl\\ssl_stat.c " + + "third_party\\boringssl\\ssl\\t1_enc.c " + + "third_party\\boringssl\\ssl\\t1_lib.c " + + "third_party\\boringssl\\ssl\\tls13_both.c " + + "third_party\\boringssl\\ssl\\tls13_client.c " + + "third_party\\boringssl\\ssl\\tls13_enc.c " + + "third_party\\boringssl\\ssl\\tls13_server.c " + + "third_party\\boringssl\\ssl\\tls_method.c " + + "third_party\\boringssl\\ssl\\tls_record.c " + + "third_party\\zlib\\adler32.c " + + "third_party\\zlib\\compress.c " + + "third_party\\zlib\\crc32.c " + + "third_party\\zlib\\deflate.c " + + "third_party\\zlib\\gzclose.c " + + "third_party\\zlib\\gzlib.c " + + "third_party\\zlib\\gzread.c " + + "third_party\\zlib\\gzwrite.c " + + "third_party\\zlib\\infback.c " + + "third_party\\zlib\\inffast.c " + + "third_party\\zlib\\inflate.c " + + "third_party\\zlib\\inftrees.c " + + "third_party\\zlib\\trees.c " + + "third_party\\zlib\\uncompr.c " + + "third_party\\zlib\\zutil.c " + + ""; + + EXTENSION("grpc", grpc_source, null, + "/DOPENSSL_NO_ASM /D_GNU_SOURCE /DWIN32_LEAN_AND_MEAN "+ + "/D_HAS_EXCEPTIONS=0 /DNOMINMAX /DGRPC_ARES=0 /D_WIN32_WINNT=0x600 "+ + "/I"+configure_module_dirname+" "+ + "/I"+configure_module_dirname+"\\include "+ + "/I"+configure_module_dirname+"\\src\\php\\ext\\grpc "+ + "/I"+configure_module_dirname+"\\third_party\\boringssl\\include "+ + "/I"+configure_module_dirname+"\\third_party\\zlib"); +} diff --git a/package.xml b/package.xml index e560139dcd9..75111e1425b 100644 --- a/package.xml +++ b/package.xml @@ -27,6 +27,7 @@ + @@ -1057,6 +1058,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/config.m4.template b/templates/config.m4.template index a6357b7fb1b..f91893c2bd3 100644 --- a/templates/config.m4.template +++ b/templates/config.m4.template @@ -35,7 +35,7 @@ ${source} ${"\\"} % endfor % for lib in libs: - % if lib.name in php_config_m4.get('deps', []): + % if lib.name in php_config_m4.get('deps', []) and lib.name != 'z': % for source in lib.src: ${source} ${"\\"} % endfor @@ -49,7 +49,7 @@ <% dirs = {} for lib in libs: - if lib.name in php_config_m4.get('deps', []): + if lib.name in php_config_m4.get('deps', []) and lib.name != 'z': for source in lib.src: dirs[source[:source.rfind('/')]] = 1 dirs = dirs.keys() diff --git a/templates/config.w32.template b/templates/config.w32.template new file mode 100644 index 00000000000..c822eae097a --- /dev/null +++ b/templates/config.w32.template @@ -0,0 +1,31 @@ +%YAML 1.2 +--- | + // $Id$ + // vim:ft=javascript + + ARG_WITH("grpc", "grpc support", "no"); + + if (PHP_GRPC != "no") { + + grpc_source = + % for source in php_config_m4.src: + "${source.replace('/','\\\\')} " + + % endfor + % for lib in libs: + % if lib.name in php_config_m4.get('deps', []) and lib.name != 'ares': + % for source in lib.src: + "${source.replace('/','\\\\')} " + + % endfor + % endif + % endfor + ""; + + EXTENSION("grpc", grpc_source, null, + "/DOPENSSL_NO_ASM /D_GNU_SOURCE /DWIN32_LEAN_AND_MEAN "+ + "/D_HAS_EXCEPTIONS=0 /DNOMINMAX /DGRPC_ARES=0 /D_WIN32_WINNT=0x600 "+ + "/I"+configure_module_dirname+" "+ + "/I"+configure_module_dirname+"\\include "+ + "/I"+configure_module_dirname+"\\src\\php\\ext\\grpc "+ + "/I"+configure_module_dirname+"\\third_party\\boringssl\\include "+ + "/I"+configure_module_dirname+"\\third_party\\zlib"); + } diff --git a/templates/package.xml.template b/templates/package.xml.template index 394b8154eea..b1ba5bc750e 100644 --- a/templates/package.xml.template +++ b/templates/package.xml.template @@ -29,6 +29,7 @@ + From fe756340dddb8bd30187069efe406db9be2ca4e9 Mon Sep 17 00:00:00 2001 From: ncteisen Date: Sat, 20 May 2017 09:40:48 -0700 Subject: [PATCH 55/62] Fix sanity --- tools/interop_matrix/create_testcases.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/interop_matrix/create_testcases.sh b/tools/interop_matrix/create_testcases.sh index cbdd388306a..92739a6a3f8 100755 --- a/tools/interop_matrix/create_testcases.sh +++ b/tools/interop_matrix/create_testcases.sh @@ -1,5 +1,5 @@ -%#!/bin/bash -#% Copyright 2017, Google Inc. +#!/bin/bash +# Copyright 2017, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without From 7aa184bb42bf8868bb0c61bd351480e332d3a2a8 Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Sun, 21 May 2017 23:03:11 -0700 Subject: [PATCH 56/62] specify mingw g++ compiler for ruby windows artifact build --- Rakefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Rakefile b/Rakefile index 7f8d3a2f4ac..66870581dd3 100755 --- a/Rakefile +++ b/Rakefile @@ -93,6 +93,7 @@ task 'dlls' do [ w64, w32 ].each do |opt| env_comp = "CC=#{opt[:cross]}-gcc " + env_comp += "CXX=#{opt[:cross]}-g++ " env_comp += "LD=#{opt[:cross]}-gcc " docker_for_windows "gem update --system && #{env} #{env_comp} make -j #{out} && #{opt[:cross]}-strip -x -S #{out} && cp #{out} #{opt[:out]}" end From b046d0f511d9b47f277543479b4610483f54aeab Mon Sep 17 00:00:00 2001 From: Arkady Shapkin Date: Mon, 22 May 2017 14:03:39 +0300 Subject: [PATCH 57/62] Export function gpr_log_severity_string for grpc_csharp_ext --- include/grpc/support/log.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grpc/support/log.h b/include/grpc/support/log.h index 917b01183ac..62324d89279 100644 --- a/include/grpc/support/log.h +++ b/include/grpc/support/log.h @@ -65,7 +65,7 @@ typedef enum gpr_log_severity { #define GPR_LOG_VERBOSITY_UNSET -1 /** Returns a string representation of the log severity */ -const char *gpr_log_severity_string(gpr_log_severity severity); +GPRAPI const char *gpr_log_severity_string(gpr_log_severity severity); /** Macros to build log contexts at various severity levels */ #define GPR_DEBUG __FILE__, __LINE__, GPR_LOG_SEVERITY_DEBUG From a4881ccd5e33ad9d375044bfe86963fb0587a9b8 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 22 May 2017 07:24:55 -0700 Subject: [PATCH 58/62] Fixed Doxygen comment syntax. --- include/grpc++/server_builder.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/grpc++/server_builder.h b/include/grpc++/server_builder.h index 84ec2eb6edb..23939d216e4 100644 --- a/include/grpc++/server_builder.h +++ b/include/grpc++/server_builder.h @@ -73,10 +73,10 @@ class ServerBuilder { /// Options for synchronous servers. enum SyncServerOption { - NUM_CQS, // Number of completion queues. - MIN_POLLERS, // Minimum number of polling threads. - MAX_POLLERS, // Maximum number of polling threads. - CQ_TIMEOUT_MSEC // Completion queue timeout in milliseconds. + NUM_CQS, /// Number of completion queues. + MIN_POLLERS, /// Minimum number of polling threads. + MAX_POLLERS, /// Maximum number of polling threads. + CQ_TIMEOUT_MSEC /// Completion queue timeout in milliseconds. }; /// Register a service. This call does not take ownership of the service. From 98bb6323ae25d8c7a52617b615a6c3b43879e683 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 22 May 2017 08:25:59 -0700 Subject: [PATCH 59/62] Yet another Doxygen comment syntax fix. --- include/grpc++/server_builder.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/grpc++/server_builder.h b/include/grpc++/server_builder.h index 23939d216e4..9e021f9e631 100644 --- a/include/grpc++/server_builder.h +++ b/include/grpc++/server_builder.h @@ -73,10 +73,10 @@ class ServerBuilder { /// Options for synchronous servers. enum SyncServerOption { - NUM_CQS, /// Number of completion queues. - MIN_POLLERS, /// Minimum number of polling threads. - MAX_POLLERS, /// Maximum number of polling threads. - CQ_TIMEOUT_MSEC /// Completion queue timeout in milliseconds. + NUM_CQS, ///< Number of completion queues. + MIN_POLLERS, ///< Minimum number of polling threads. + MAX_POLLERS, ///< Maximum number of polling threads. + CQ_TIMEOUT_MSEC ///< Completion queue timeout in milliseconds. }; /// Register a service. This call does not take ownership of the service. From 9f41c048c5c86f184a260781aaea4256338ac125 Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Sun, 21 May 2017 22:35:59 -0700 Subject: [PATCH 60/62] %z -> %lu for mingw build --- .../lb_policy/round_robin/round_robin.c | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c b/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c index 2acde70f4c9..7ee6ffb7875 100644 --- a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c @@ -165,20 +165,21 @@ static size_t get_next_ready_subchannel_index_locked( if (GRPC_TRACER_ON(grpc_lb_round_robin_trace)) { gpr_log(GPR_INFO, "[RR: %p] getting next ready subchannel, " - "last_ready_subchannel_index=%zu", - p, p->last_ready_subchannel_index); + "last_ready_subchannel_index=%lu", + p, (unsigned long)p->last_ready_subchannel_index); } for (size_t i = 0; i < p->num_subchannels; ++i) { const size_t index = (i + p->last_ready_subchannel_index + 1) % p->num_subchannels; if (GRPC_TRACER_ON(grpc_lb_round_robin_trace)) { - gpr_log(GPR_DEBUG, "[RR %p] checking index %zu: state=%d", p, index, + gpr_log(GPR_DEBUG, "[RR %p] checking index %lu: state=%d", p, + (unsigned long)index, p->subchannels[index].curr_connectivity_state); } if (p->subchannels[index].curr_connectivity_state == GRPC_CHANNEL_READY) { if (GRPC_TRACER_ON(grpc_lb_round_robin_trace)) { - gpr_log(GPR_DEBUG, "[RR %p] found next ready subchannel at index %zu", - p, index); + gpr_log(GPR_DEBUG, "[RR %p] found next ready subchannel at index %lu", + p, (unsigned long)index); } return index; } @@ -196,8 +197,8 @@ static void update_last_ready_subchannel_index_locked(round_robin_lb_policy *p, p->last_ready_subchannel_index = last_ready_index; if (GRPC_TRACER_ON(grpc_lb_round_robin_trace)) { gpr_log(GPR_DEBUG, - "[RR: %p] setting last_ready_subchannel_index=%zu (SC %p, CSC %p)", - (void *)p, last_ready_index, + "[RR: %p] setting last_ready_subchannel_index=%lu (SC %p, CSC %p)", + (void *)p, (unsigned long)last_ready_index, (void *)p->subchannels[last_ready_index].subchannel, (void *)grpc_subchannel_get_connected_subchannel( p->subchannels[last_ready_index].subchannel)); @@ -342,8 +343,8 @@ static int rr_pick_locked(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, } if (GRPC_TRACER_ON(grpc_lb_round_robin_trace)) { gpr_log(GPR_DEBUG, - "[RR PICK] TARGET <-- CONNECTED SUBCHANNEL %p (INDEX %zu)", - (void *)*target, next_ready_index); + "[RR PICK] TARGET <-- CONNECTED SUBCHANNEL %p (INDEX %lu)", + (void *)*target, (unsigned long)next_ready_index); } /* only advance the last picked pointer if the selection was used */ update_last_ready_subchannel_index_locked(p, next_ready_index); @@ -510,8 +511,9 @@ static void rr_connectivity_changed_locked(grpc_exec_ctx *exec_ctx, void *arg, } if (GRPC_TRACER_ON(grpc_lb_round_robin_trace)) { gpr_log(GPR_DEBUG, - "[RR CONN CHANGED] TARGET <-- SUBCHANNEL %p (INDEX %zu)", - (void *)selected->subchannel, next_ready_index); + "[RR CONN CHANGED] TARGET <-- SUBCHANNEL %p (INDEX %lu)", + (void *)selected->subchannel, + (unsigned long)next_ready_index); } grpc_closure_sched(exec_ctx, pp->on_complete, GRPC_ERROR_NONE); gpr_free(pp); @@ -616,8 +618,8 @@ static grpc_lb_policy *round_robin_create(grpc_exec_ctx *exec_ctx, if (GRPC_TRACER_ON(grpc_lb_round_robin_trace)) { char *address_uri = grpc_sockaddr_to_uri(&addresses->addresses[i].address); - gpr_log(GPR_DEBUG, "index %zu: Created subchannel %p for address uri %s", - subchannel_index, (void *)subchannel, address_uri); + gpr_log(GPR_DEBUG, "index %lu: Created subchannel %p for address uri %s", + (unsigned long)subchannel_index, (void *)subchannel, address_uri); gpr_free(address_uri); } grpc_channel_args_destroy(exec_ctx, new_args); From a0e3a870014a6d7b6551af8038a732c1cd820f27 Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Mon, 22 May 2017 14:49:00 -0700 Subject: [PATCH 61/62] PHP: Fixed bug in protoc plugin escaping comments --- package.xml | 10 +++++++--- src/compiler/php_generator.cc | 21 ++++++++++----------- templates/package.xml.template | 10 +++++++--- 3 files changed, 24 insertions(+), 17 deletions(-) diff --git a/package.xml b/package.xml index 75111e1425b..5bcffd6eede 100644 --- a/package.xml +++ b/package.xml @@ -10,7 +10,7 @@ grpc-packages@google.com yes - 2017-05-05 + 2017-05-22 1.4.0dev @@ -23,14 +23,18 @@ BSD - Fixed some memory leaks #9559, #10996 +- Disabled cares dependency from gRPC C Core #10940 +- De-coupled protobuf dependency #11112 +- Fixed extension reported version #10842 +- Added config.w32 for Windows support #8161 +- Fixed PHP distrib test after cc files were added #11193 +- Fixed protoc plugin comment escape bug #11025 - - diff --git a/src/compiler/php_generator.cc b/src/compiler/php_generator.cc index 7d51d403013..67c4c80a7be 100644 --- a/src/compiler/php_generator.cc +++ b/src/compiler/php_generator.cc @@ -67,12 +67,11 @@ void PrintMethod(const MethodDescriptor *method, Printer *out) { vars["input_type_id"] = MessageIdentifierName(input_type->full_name()); vars["output_type_id"] = MessageIdentifierName(output_type->full_name()); - out->Print("/**\n"); - out->Print(GetPHPComments(method, " *").c_str()); + out->Print(GetPHPComments(method, " //").c_str()); if (method->client_streaming()) { out->Print(vars, - " * @param array $$metadata metadata\n" - " * @param array $$options call options\n */\n" + " // @param array $$metadata metadata\n" + " // @param array $$options call options\n" "public function $name$($$metadata = [], " "$$options = []) {\n"); out->Indent(); @@ -87,9 +86,9 @@ void PrintMethod(const MethodDescriptor *method, Printer *out) { "$$metadata, $$options);\n"); } else { out->Print(vars, - " * @param \\$input_type_id$ $$argument input argument\n" - " * @param array $$metadata metadata\n" - " * @param array $$options call options\n */\n" + " // @param \\$input_type_id$ $$argument input argument\n" + " // @param array $$metadata metadata\n" + " // @param array $$options call options\n" "public function $name$(\\$input_type_id$ $$argument,\n" " $$metadata = [], $$options = []) {\n"); out->Indent(); @@ -116,10 +115,10 @@ void PrintService(const ServiceDescriptor *service, Printer *out) { out->Print(vars, "class $name$Client extends \\Grpc\\BaseStub {\n\n"); out->Indent(); out->Print( - "/**\n * @param string $$hostname hostname\n" - " * @param array $$opts channel options\n" - " * @param \\Grpc\\Channel $$channel (optional) re-use channel " - "object\n */\n" + " // @param string $$hostname hostname\n" + " // @param array $$opts channel options\n" + " // @param \\Grpc\\Channel $$channel (optional) re-use channel " + "object\n" "public function __construct($$hostname, $$opts, " "$$channel = null) {\n"); out->Indent(); diff --git a/templates/package.xml.template b/templates/package.xml.template index b1ba5bc750e..6a43ff4e8a4 100644 --- a/templates/package.xml.template +++ b/templates/package.xml.template @@ -12,7 +12,7 @@ grpc-packages@google.com yes - 2017-05-05 + 2017-05-22 ${settings.php_version.php()} @@ -25,14 +25,18 @@ BSD - Fixed some memory leaks #9559, #10996 + - Disabled cares dependency from gRPC C Core #10940 + - De-coupled protobuf dependency #11112 + - Fixed extension reported version #10842 + - Added config.w32 for Windows support #8161 + - Fixed PHP distrib test after cc files were added #11193 + - Fixed protoc plugin comment escape bug #11025 - - % for source in php_config_m4.src + php_config_m4.headers: % endfor From cc919832cd18d1d3e2bf0e6bed9f6d9222bf07d1 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 23 May 2017 13:35:55 -0700 Subject: [PATCH 62/62] Fix sanity --- grpc.def | 1 + src/ruby/ext/grpc/rb_grpc_imports.generated.c | 2 ++ src/ruby/ext/grpc/rb_grpc_imports.generated.h | 3 +++ 3 files changed, 6 insertions(+) diff --git a/grpc.def b/grpc.def index 293f2d892ae..55b27c2c245 100644 --- a/grpc.def +++ b/grpc.def @@ -232,6 +232,7 @@ EXPORTS gpr_histogram_merge_contents gpr_join_host_port gpr_split_host_port + gpr_log_severity_string gpr_log gpr_log_message gpr_set_log_verbosity diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c index 221a1e14ec7..8f76420af6b 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c @@ -270,6 +270,7 @@ gpr_histogram_get_contents_type gpr_histogram_get_contents_import; gpr_histogram_merge_contents_type gpr_histogram_merge_contents_import; gpr_join_host_port_type gpr_join_host_port_import; gpr_split_host_port_type gpr_split_host_port_import; +gpr_log_severity_string_type gpr_log_severity_string_import; gpr_log_type gpr_log_import; gpr_log_message_type gpr_log_message_import; gpr_set_log_verbosity_type gpr_set_log_verbosity_import; @@ -571,6 +572,7 @@ void grpc_rb_load_imports(HMODULE library) { gpr_histogram_merge_contents_import = (gpr_histogram_merge_contents_type) GetProcAddress(library, "gpr_histogram_merge_contents"); gpr_join_host_port_import = (gpr_join_host_port_type) GetProcAddress(library, "gpr_join_host_port"); gpr_split_host_port_import = (gpr_split_host_port_type) GetProcAddress(library, "gpr_split_host_port"); + gpr_log_severity_string_import = (gpr_log_severity_string_type) GetProcAddress(library, "gpr_log_severity_string"); gpr_log_import = (gpr_log_type) GetProcAddress(library, "gpr_log"); gpr_log_message_import = (gpr_log_message_type) GetProcAddress(library, "gpr_log_message"); gpr_set_log_verbosity_import = (gpr_set_log_verbosity_type) GetProcAddress(library, "gpr_set_log_verbosity"); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index f62b31e83d0..58467f97e84 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -761,6 +761,9 @@ extern gpr_join_host_port_type gpr_join_host_port_import; typedef int(*gpr_split_host_port_type)(const char *name, char **host, char **port); extern gpr_split_host_port_type gpr_split_host_port_import; #define gpr_split_host_port gpr_split_host_port_import +typedef const char *(*gpr_log_severity_string_type)(gpr_log_severity severity); +extern gpr_log_severity_string_type gpr_log_severity_string_import; +#define gpr_log_severity_string gpr_log_severity_string_import typedef void(*gpr_log_type)(const char *file, int line, gpr_log_severity severity, const char *format, ...) GPR_PRINT_FORMAT_CHECK(4, 5); extern gpr_log_type gpr_log_import; #define gpr_log gpr_log_import