From a47563ca8c8cc698f2aea5bf461e039c372df02a Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Sat, 23 Jul 2016 07:56:33 -0700 Subject: progress --- src/core/lib/iomgr/exec_ctx.c | 37 ++++++++++++++++++++++++++++++++++++- src/core/lib/iomgr/exec_ctx.h | 7 ++++++- 2 files changed, 42 insertions(+), 2 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/exec_ctx.c b/src/core/lib/iomgr/exec_ctx.c index ac7785ec13..450cf3aa93 100644 --- a/src/core/lib/iomgr/exec_ctx.c +++ b/src/core/lib/iomgr/exec_ctx.c @@ -74,6 +74,30 @@ bool grpc_exec_ctx_flush(grpc_exec_ctx *exec_ctx) { c = next; } } + if (exec_ctx->stealing_from_workqueue != NULL) { + if (grpc_exec_ctx_ready_to_finish(exec_ctx)) { + grpc_workqueue_enqueue(exec_ctx, exec_ctx->stealing_from_workqueue, + exec_ctx->stolen_closure, + exec_ctx->stolen_closure->error); + GRPC_WORKQUEUE_UNREF(exec_ctx, exec_ctx->stealing_from_workqueue, + "exec_ctx_sched"); + exec_ctx->stealing_from_workqueue = NULL; + exec_ctx->stolen_closure = NULL; + } else { + grpc_closure *c = exec_ctx->stolen_closure; + GRPC_WORKQUEUE_UNREF(exec_ctx, exec_ctx->stealing_from_workqueue, + "exec_ctx_sched"); + exec_ctx->stealing_from_workqueue = NULL; + exec_ctx->stolen_closure = NULL; + grpc_error *error = c->error; + GPR_TIMER_BEGIN("grpc_exec_ctx_flush.stolen_cb", 0); + c->cb(exec_ctx, c->cb_arg, error); + GRPC_ERROR_UNREF(error); + GPR_TIMER_END("grpc_exec_ctx_flush.stolen_cb", 0); + grpc_exec_ctx_flush(exec_ctx); + return true; + } + } GPR_TIMER_END("grpc_exec_ctx_flush", 0); return did_something; } @@ -88,9 +112,20 @@ void grpc_exec_ctx_sched(grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_workqueue *offload_target_or_null) { if (offload_target_or_null == NULL) { grpc_closure_list_append(&exec_ctx->closure_list, closure, error); - } else { + } else if (exec_ctx->stealing_from_workqueue == NULL) { + exec_ctx->stealing_from_workqueue = offload_target_or_null; + closure->error = error; + exec_ctx->stolen_closure = closure; + } else if (exec_ctx->stealing_from_workqueue != offload_target_or_null) { grpc_workqueue_enqueue(exec_ctx, offload_target_or_null, closure, error); GRPC_WORKQUEUE_UNREF(exec_ctx, offload_target_or_null, "exec_ctx_sched"); + } else { /* stealing_from_workqueue == offload_target_or_null */ + grpc_workqueue_enqueue(exec_ctx, offload_target_or_null, + exec_ctx->stolen_closure, + exec_ctx->stolen_closure->error); + closure->error = error; + exec_ctx->stolen_closure = closure; + GRPC_WORKQUEUE_UNREF(exec_ctx, offload_target_or_null, "exec_ctx_sched"); } } diff --git a/src/core/lib/iomgr/exec_ctx.h b/src/core/lib/iomgr/exec_ctx.h index 1895ee6245..8474905396 100644 --- a/src/core/lib/iomgr/exec_ctx.h +++ b/src/core/lib/iomgr/exec_ctx.h @@ -66,6 +66,8 @@ typedef struct grpc_combiner grpc_combiner; */ struct grpc_exec_ctx { grpc_closure_list closure_list; + grpc_workqueue *stealing_from_workqueue; + grpc_closure *stolen_closure; /** currently active combiner: updated only via combiner.c */ grpc_combiner *active_combiner; bool cached_ready_to_finish; @@ -74,7 +76,10 @@ struct grpc_exec_ctx { }; #define GRPC_EXEC_CTX_INIT_WITH_FINISH_CHECK(finish_check, finish_check_arg) \ - { GRPC_CLOSURE_LIST_INIT, NULL, false, finish_check_arg, finish_check } + { \ + GRPC_CLOSURE_LIST_INIT, NULL, NULL, NULL, false, finish_check_arg, \ + finish_check \ + } #else struct grpc_exec_ctx { bool cached_ready_to_finish; -- cgit v1.2.3 From 128d3ff3614a76ac146891cf81b4d8df5c9ea064 Mon Sep 17 00:00:00 2001 From: Robbie Shade Date: Tue, 2 Aug 2016 15:23:20 -0400 Subject: Change udp_server to use linked list of ports --- src/core/lib/iomgr/udp_server.c | 90 ++++++++++++++++++++++++----------------- 1 file changed, 52 insertions(+), 38 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/udp_server.c b/src/core/lib/iomgr/udp_server.c index 48032412a2..90fae6b94f 100644 --- a/src/core/lib/iomgr/udp_server.c +++ b/src/core/lib/iomgr/udp_server.c @@ -67,10 +67,9 @@ #include "src/core/lib/iomgr/socket_utils_posix.h" #include "src/core/lib/support/string.h" -#define INIT_PORT_CAP 2 - /* one listening port */ -typedef struct { +typedef struct grpc_udp_listener grpc_udp_listener; +struct grpc_udp_listener { int fd; grpc_fd *emfd; grpc_udp_server *server; @@ -83,7 +82,9 @@ typedef struct { grpc_closure destroyed_closure; grpc_udp_server_read_cb read_cb; grpc_udp_server_orphan_cb orphan_cb; -} server_port; + + struct grpc_udp_listener *next; +}; /* the overall server */ struct grpc_udp_server { @@ -98,10 +99,10 @@ struct grpc_udp_server { /* is this server shutting down? (boolean) */ int shutdown; - /* all listening ports */ - server_port *ports; - size_t nports; - size_t port_capacity; + /* linked list of server ports */ + grpc_udp_listener *head; + grpc_udp_listener *tail; + unsigned nports; /* shutdown callback */ grpc_closure *shutdown_complete; @@ -121,9 +122,9 @@ grpc_udp_server *grpc_udp_server_create(void) { s->active_ports = 0; s->destroyed_ports = 0; s->shutdown = 0; - s->ports = gpr_malloc(sizeof(server_port) * INIT_PORT_CAP); + s->head = NULL; + s->tail = NULL; s->nports = 0; - s->port_capacity = INIT_PORT_CAP; return s; } @@ -131,10 +132,16 @@ grpc_udp_server *grpc_udp_server_create(void) { static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_udp_server *s) { grpc_exec_ctx_sched(exec_ctx, s->shutdown_complete, GRPC_ERROR_NONE, NULL); - gpr_mu_destroy(&s->mu); gpr_cv_destroy(&s->cv); + gpr_mu_destroy(&s->mu); + + while (s->head) { + grpc_udp_listener *sp = s->head; + s->head = sp->next; + + gpr_free(sp); + } - gpr_free(s->ports); gpr_free(s); } @@ -165,9 +172,9 @@ static void deactivated_all_ports(grpc_exec_ctx *exec_ctx, grpc_udp_server *s) { return; } - if (s->nports) { - for (i = 0; i < s->nports; i++) { - server_port *sp = &s->ports[i]; + if (s->head) { + grpc_udp_listener *sp; + for (sp = s->head; sp; sp = sp->next) { sp->destroyed_closure.cb = destroyed_port; sp->destroyed_closure.cb_arg = s; @@ -187,6 +194,7 @@ static void deactivated_all_ports(grpc_exec_ctx *exec_ctx, grpc_udp_server *s) { void grpc_udp_server_destroy(grpc_exec_ctx *exec_ctx, grpc_udp_server *s, grpc_closure *on_done) { size_t i; + grpc_udp_listener* sp; gpr_mu_lock(&s->mu); GPR_ASSERT(!s->shutdown); @@ -196,8 +204,10 @@ void grpc_udp_server_destroy(grpc_exec_ctx *exec_ctx, grpc_udp_server *s, /* shutdown all fd's */ if (s->active_ports) { - for (i = 0; i < s->nports; i++) { - grpc_fd_shutdown(exec_ctx, s->ports[i].emfd); + for (sp = s->head; sp; sp = sp->next) { + GPR_ASSERT(sp->orphan_cb); + sp->orphan_cb(sp->emfd); + grpc_fd_shutdown(exec_ctx, sp->emfd); } gpr_mu_unlock(&s->mu); } else { @@ -274,10 +284,9 @@ error: /* event manager callback when reads are ready */ static void on_read(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { - server_port *sp = arg; + grpc_udp_listener *sp = arg; if (error != GRPC_ERROR_NONE) { - gpr_mu_lock(&sp->server->mu); if (0 == --sp->server->active_ports) { gpr_mu_unlock(&sp->server->mu); deactivated_all_ports(exec_ctx, sp->server); @@ -299,7 +308,7 @@ static int add_socket_to_server(grpc_udp_server *s, int fd, const struct sockaddr *addr, size_t addr_len, grpc_udp_server_read_cb read_cb, grpc_udp_server_orphan_cb orphan_cb) { - server_port *sp; + grpc_udp_listener *sp; int port; char *addr_str; char *name; @@ -310,12 +319,15 @@ static int add_socket_to_server(grpc_udp_server *s, int fd, gpr_asprintf(&name, "udp-server-listener:%s", addr_str); gpr_free(addr_str); gpr_mu_lock(&s->mu); - /* append it to the list under a lock */ - if (s->nports == s->port_capacity) { - s->port_capacity *= 2; - s->ports = gpr_realloc(s->ports, sizeof(server_port) * s->port_capacity); + s->nports++; + sp = gpr_malloc(sizeof(grpc_udp_listener)); + sp->next = NULL; + if (s->head == NULL) { + s->head = sp; + } else { + s->tail->next = sp; } - sp = &s->ports[s->nports++]; + s->tail = sp; sp->server = s; sp->fd = fd; sp->emfd = grpc_fd_create(fd, name); @@ -334,6 +346,7 @@ static int add_socket_to_server(grpc_udp_server *s, int fd, int grpc_udp_server_add_port(grpc_udp_server *s, const void *addr, size_t addr_len, grpc_udp_server_read_cb read_cb, grpc_udp_server_orphan_cb orphan_cb) { + grpc_udp_listener* sp; int allocated_port1 = -1; int allocated_port2 = -1; unsigned i; @@ -351,9 +364,9 @@ int grpc_udp_server_add_port(grpc_udp_server *s, const void *addr, /* Check if this is a wildcard port, and if so, try to keep the port the same as some previously created listener. */ if (grpc_sockaddr_get_port(addr) == 0) { - for (i = 0; i < s->nports; i++) { + for (sp = s->head; sp; sp = sp->next) { sockname_len = sizeof(sockname_temp); - if (0 == getsockname(s->ports[i].fd, (struct sockaddr *)&sockname_temp, + if (0 == getsockname(sp->fd, (struct sockaddr *)&sockname_temp, &sockname_len)) { port = grpc_sockaddr_get_port((struct sockaddr *)&sockname_temp); if (port > 0) { @@ -413,28 +426,29 @@ done: return allocated_port1 >= 0 ? allocated_port1 : allocated_port2; } -int grpc_udp_server_get_fd(grpc_udp_server *s, unsigned port_index) { - return (port_index < s->nports) ? s->ports[port_index].fd : -1; -} - void grpc_udp_server_start(grpc_exec_ctx *exec_ctx, grpc_udp_server *s, grpc_pollset **pollsets, size_t pollset_count, grpc_server *server) { size_t i, j; gpr_mu_lock(&s->mu); + grpc_udp_listener *sp; GPR_ASSERT(s->active_ports == 0); s->pollsets = pollsets; s->grpc_server = server; - for (i = 0; i < s->nports; i++) { - for (j = 0; j < pollset_count; j++) { - grpc_pollset_add_fd(exec_ctx, pollsets[j], s->ports[i].emfd); + + sp = s->head; + while (sp != NULL) { + for (i = 0; i < pollset_count; i++) { + grpc_pollset_add_fd(exec_ctx, pollsets[i], sp->emfd); } - s->ports[i].read_closure.cb = on_read; - s->ports[i].read_closure.cb_arg = &s->ports[i]; - grpc_fd_notify_on_read(exec_ctx, s->ports[i].emfd, - &s->ports[i].read_closure); + sp->read_closure.cb = on_read; + sp->read_closure.cb_arg = sp; + grpc_fd_notify_on_read(exec_ctx, sp->emfd, &sp->read_closure); + s->active_ports++; + sp = sp->next; } + gpr_mu_unlock(&s->mu); } -- cgit v1.2.3 From 956f1d31690e816cff311e01dac9278cde507785 Mon Sep 17 00:00:00 2001 From: Robbie Shade Date: Tue, 2 Aug 2016 16:55:00 -0400 Subject: Refactor udp_server to use a linked list of ports --- src/core/lib/iomgr/udp_server.c | 30 ++++++++++++++++++++---------- src/core/lib/iomgr/udp_server.h | 2 +- test/core/iomgr/udp_server_test.c | 4 ++-- 3 files changed, 23 insertions(+), 13 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/udp_server.c b/src/core/lib/iomgr/udp_server.c index 90fae6b94f..bdf26d4097 100644 --- a/src/core/lib/iomgr/udp_server.c +++ b/src/core/lib/iomgr/udp_server.c @@ -89,7 +89,6 @@ struct grpc_udp_listener { /* the overall server */ struct grpc_udp_server { gpr_mu mu; - gpr_cv cv; /* active port count: how many ports are actually still listening */ size_t active_ports; @@ -118,7 +117,6 @@ struct grpc_udp_server { grpc_udp_server *grpc_udp_server_create(void) { grpc_udp_server *s = gpr_malloc(sizeof(grpc_udp_server)); gpr_mu_init(&s->mu); - gpr_cv_init(&s->cv); s->active_ports = 0; s->destroyed_ports = 0; s->shutdown = 0; @@ -130,15 +128,15 @@ grpc_udp_server *grpc_udp_server_create(void) { } static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_udp_server *s) { - grpc_exec_ctx_sched(exec_ctx, s->shutdown_complete, GRPC_ERROR_NONE, NULL); + if (s->shutdown_complete != NULL) { + grpc_exec_ctx_sched(exec_ctx, s->shutdown_complete, GRPC_ERROR_NONE, NULL); + } - gpr_cv_destroy(&s->cv); gpr_mu_destroy(&s->mu); while (s->head) { grpc_udp_listener *sp = s->head; s->head = sp->next; - gpr_free(sp); } @@ -162,8 +160,6 @@ static void destroyed_port(grpc_exec_ctx *exec_ctx, void *server, events will be received on them - at this point it's safe to destroy things */ static void deactivated_all_ports(grpc_exec_ctx *exec_ctx, grpc_udp_server *s) { - size_t i; - /* delete ALL the things */ gpr_mu_lock(&s->mu); @@ -175,6 +171,8 @@ static void deactivated_all_ports(grpc_exec_ctx *exec_ctx, grpc_udp_server *s) { if (s->head) { grpc_udp_listener *sp; for (sp = s->head; sp; sp = sp->next) { + // grpc_unlink_if_unix_domain_socket(&sp->addr.sockaddr); + sp->destroyed_closure.cb = destroyed_port; sp->destroyed_closure.cb_arg = s; @@ -193,7 +191,6 @@ static void deactivated_all_ports(grpc_exec_ctx *exec_ctx, grpc_udp_server *s) { void grpc_udp_server_destroy(grpc_exec_ctx *exec_ctx, grpc_udp_server *s, grpc_closure *on_done) { - size_t i; grpc_udp_listener* sp; gpr_mu_lock(&s->mu); @@ -286,6 +283,7 @@ error: static void on_read(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { grpc_udp_listener *sp = arg; + gpr_mu_lock(&sp->server->mu); if (error != GRPC_ERROR_NONE) { if (0 == --sp->server->active_ports) { gpr_mu_unlock(&sp->server->mu); @@ -302,6 +300,7 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { /* Re-arm the notification event so we get another chance to read. */ grpc_fd_notify_on_read(exec_ctx, sp->emfd, &sp->read_closure); + gpr_mu_unlock(&sp->server->mu); } static int add_socket_to_server(grpc_udp_server *s, int fd, @@ -349,7 +348,6 @@ int grpc_udp_server_add_port(grpc_udp_server *s, const void *addr, grpc_udp_listener* sp; int allocated_port1 = -1; int allocated_port2 = -1; - unsigned i; int fd; grpc_dualstack_mode dsmode; struct sockaddr_in6 addr6_v4mapped; @@ -426,10 +424,22 @@ done: return allocated_port1 >= 0 ? allocated_port1 : allocated_port2; } +int grpc_udp_server_get_fd(grpc_udp_server *s, unsigned port_index) { + grpc_udp_listener *sp; + if (port_index >= s->nports) { + return -1; + } + + for (sp = s->head; sp && port_index != 0; sp = sp->next) { + --port_index; + } + return sp->fd; +} + void grpc_udp_server_start(grpc_exec_ctx *exec_ctx, grpc_udp_server *s, grpc_pollset **pollsets, size_t pollset_count, grpc_server *server) { - size_t i, j; + size_t i; gpr_mu_lock(&s->mu); grpc_udp_listener *sp; GPR_ASSERT(s->active_ports == 0); diff --git a/src/core/lib/iomgr/udp_server.h b/src/core/lib/iomgr/udp_server.h index 33c5ce11cd..70d0f19454 100644 --- a/src/core/lib/iomgr/udp_server.h +++ b/src/core/lib/iomgr/udp_server.h @@ -59,7 +59,7 @@ void grpc_udp_server_start(grpc_exec_ctx *exec_ctx, grpc_udp_server *udp_server, grpc_pollset **pollsets, size_t pollset_count, struct grpc_server *server); -int grpc_udp_server_get_fd(grpc_udp_server *s, unsigned index); +int grpc_udp_server_get_fd(grpc_udp_server *s, unsigned port_index); /* Add a port to the server, returning port number on success, or negative on failure. diff --git a/test/core/iomgr/udp_server_test.c b/test/core/iomgr/udp_server_test.c index a959a7e07f..6667581ad1 100644 --- a/test/core/iomgr/udp_server_test.c +++ b/test/core/iomgr/udp_server_test.c @@ -134,7 +134,7 @@ static void test_no_op_with_port_and_start(void) { grpc_exec_ctx_finish(&exec_ctx); /* The server had a single FD, which should have been orphaned. */ - GPR_ASSERT(g_number_of_orphan_calls == 1); + GPR_ASSERT(g_number_of_orphan_calls == 2); } static void test_receive(int number_of_clients) { @@ -199,7 +199,7 @@ static void test_receive(int number_of_clients) { grpc_exec_ctx_finish(&exec_ctx); /* The server had a single FD, which should have been orphaned. */ - GPR_ASSERT(g_number_of_orphan_calls == 1); + GPR_ASSERT(g_number_of_orphan_calls == 2); } static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, -- cgit v1.2.3 From 2f42fdef8e77c2a1e087384a24c135d8912af80a Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 4 Aug 2016 15:13:18 -0700 Subject: Implement is_finished for cqs --- src/core/lib/iomgr/exec_ctx.h | 6 ++- src/core/lib/surface/completion_queue.c | 81 ++++++++++++++++++++++++++++++++- 2 files changed, 84 insertions(+), 3 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/exec_ctx.h b/src/core/lib/iomgr/exec_ctx.h index 8474905396..ac4674bbac 100644 --- a/src/core/lib/iomgr/exec_ctx.h +++ b/src/core/lib/iomgr/exec_ctx.h @@ -75,6 +75,8 @@ struct grpc_exec_ctx { bool (*check_ready_to_finish)(grpc_exec_ctx *exec_ctx, void *arg); }; +/* initializer for grpc_exec_ctx: + prefer to use GRPC_EXEC_CTX_INIT whenever possible */ #define GRPC_EXEC_CTX_INIT_WITH_FINISH_CHECK(finish_check, finish_check_arg) \ { \ GRPC_CLOSURE_LIST_INIT, NULL, NULL, NULL, false, finish_check_arg, \ @@ -90,8 +92,10 @@ struct grpc_exec_ctx { { false, finish_check_arg, finish_check } #endif +/* initialize an execution context at the top level of an API call into grpc + (this is safe to use elsewhere, though possibly not as efficient) */ #define GRPC_EXEC_CTX_INIT \ - GRPC_EXEC_CTX_INIT_WITH_FINISH_CHECK(grpc_never_ready_to_finish, NULL) + GRPC_EXEC_CTX_INIT_WITH_FINISH_CHECK(grpc_always_ready_to_finish, NULL) /** Flush any work that has been enqueued onto this grpc_exec_ctx. * Caller must guarantee that no interfering locks are held. diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c index 5978884db8..9eb4dfc618 100644 --- a/src/core/lib/surface/completion_queue.c +++ b/src/core/lib/surface/completion_queue.c @@ -313,13 +313,37 @@ void grpc_cq_end_op(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cc, GRPC_ERROR_UNREF(error); } +typedef struct { + grpc_completion_queue *cq; + gpr_timespec deadline; + grpc_cq_completion *stolen_completion; + void *tag; /* for pluck */ +} cq_is_finished_arg; + +static bool cq_is_next_finished(grpc_exec_ctx *exec_ctx, void *arg) { + cq_is_finished_arg *a = arg; + grpc_completion_queue *cq = a->cq; + GPR_ASSERT(a->stolen_completion == NULL); + gpr_mu_lock(cq->mu); + if (cq->completed_tail != &cq->completed_head) { + a->stolen_completion = (grpc_cq_completion *)cq->completed_head.next; + cq->completed_head.next = a->stolen_completion->next & ~(uintptr_t)1; + if (a->stolen_completion == cq->completed_tail) { + cq->completed_tail = &cq->completed_head; + } + gpr_mu_unlock(cq->mu); + return true; + } + gpr_mu_unlock(cq->mu); + return gpr_time_cmp(a->deadline, gpr_now(a->deadline.clock_type)) > 0; +} + grpc_event grpc_completion_queue_next(grpc_completion_queue *cc, gpr_timespec deadline, void *reserved) { grpc_event ret; grpc_pollset_worker *worker = NULL; int first_loop = 1; gpr_timespec now; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; GPR_TIMER_BEGIN("grpc_completion_queue_next", 0); @@ -335,9 +359,23 @@ grpc_event grpc_completion_queue_next(grpc_completion_queue *cc, deadline = gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC); + cq_is_finished_arg is_finished_arg = {cc, deadline, NULL, NULL}; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT_WITH_FINISH_CHECK( + cq_is_next_finished, &is_finished_arg); + GRPC_CQ_INTERNAL_REF(cc, "next"); gpr_mu_lock(cc->mu); for (;;) { + if (is_finished_arg.stolen_completion != NULL) { + gpr_mu_unlock(cc->mu); + grpc_cq_completion *c = is_finished_arg.stolen_completion; + is_finished_arg.stolen_completion = NULL; + ret.type = GRPC_OP_COMPLETE; + ret.success = c->next & 1u; + ret.tag = c->tag; + c->done(&exec_ctx, c->done_arg, c); + break; + } if (cc->completed_tail != &cc->completed_head) { grpc_cq_completion *c = (grpc_cq_completion *)cc->completed_head.next; cc->completed_head.next = c->next & ~(uintptr_t)1; @@ -394,6 +432,7 @@ grpc_event grpc_completion_queue_next(grpc_completion_queue *cc, GRPC_SURFACE_TRACE_RETURNED_EVENT(cc, &ret); GRPC_CQ_INTERNAL_UNREF(cc, "next"); grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(is_finished_arg.stolen_completion == NULL); GPR_TIMER_END("grpc_completion_queue_next", 0); @@ -424,6 +463,30 @@ static void del_plucker(grpc_completion_queue *cc, void *tag, GPR_UNREACHABLE_CODE(return ); } +static bool cq_is_pluck_finished(grpc_exec_ctx *exec_ctx, void *arg) { + cq_is_finished_arg *a = arg; + grpc_completion_queue *cq = a->cq; + GPR_ASSERT(a->stolen_completion == NULL); + gpr_mu_lock(cq->mu); + grpc_cq_completion *c; + grpc_cq_completion *prev = &cq->completed_head; + while ((c = (grpc_cq_completion *)(prev->next & ~(uintptr_t)1)) != + &cq->completed_head) { + if (c->tag == a->tag) { + prev->next = (prev->next & (uintptr_t)1) | (c->next & ~(uintptr_t)1); + if (c == cq->completed_tail) { + cq->completed_tail = prev; + } + gpr_mu_unlock(cq->mu); + a->stolen_completion = c; + return true; + } + prev = c; + } + gpr_mu_unlock(cq->mu); + return gpr_time_cmp(a->deadline, gpr_now(a->deadline.clock_type)) > 0; +} + grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag, gpr_timespec deadline, void *reserved) { grpc_event ret; @@ -432,7 +495,6 @@ grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag, grpc_pollset_worker *worker = NULL; gpr_timespec now; int first_loop = 1; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; GPR_TIMER_BEGIN("grpc_completion_queue_pluck", 0); @@ -450,9 +512,23 @@ grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag, deadline = gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC); + cq_is_finished_arg is_finished_arg = {cc, deadline, NULL, tag}; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT_WITH_FINISH_CHECK( + cq_is_pluck_finished, &is_finished_arg); + GRPC_CQ_INTERNAL_REF(cc, "pluck"); gpr_mu_lock(cc->mu); for (;;) { + if (is_finished_arg.stolen_completion != NULL) { + gpr_mu_unlock(cc->mu); + grpc_cq_completion *c = is_finished_arg.stolen_completion; + is_finished_arg.stolen_completion = NULL; + ret.type = GRPC_OP_COMPLETE; + ret.success = c->next & 1u; + ret.tag = c->tag; + c->done(&exec_ctx, c->done_arg, c); + break; + } prev = &cc->completed_head; while ((c = (grpc_cq_completion *)(prev->next & ~(uintptr_t)1)) != &cc->completed_head) { @@ -527,6 +603,7 @@ done: GRPC_SURFACE_TRACE_RETURNED_EVENT(cc, &ret); GRPC_CQ_INTERNAL_UNREF(cc, "pluck"); grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(is_finished_arg.stolen_completion == NULL); GPR_TIMER_END("grpc_completion_queue_pluck", 0); -- cgit v1.2.3 From 5f70fc60f5fbf766aae252a66f5cb447eb6efb0c Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 4 Aug 2016 16:00:00 -0700 Subject: Fixup compilation --- src/core/lib/iomgr/combiner.c | 13 ++++++++++++- src/core/lib/surface/completion_queue.c | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/combiner.c b/src/core/lib/iomgr/combiner.c index eb5ad634bd..1042cd8659 100644 --- a/src/core/lib/iomgr/combiner.c +++ b/src/core/lib/iomgr/combiner.c @@ -171,10 +171,21 @@ static bool start_execute_final(grpc_exec_ctx *exec_ctx, grpc_combiner *lock) { static bool maybe_finish_one(grpc_exec_ctx *exec_ctx, grpc_combiner *lock) { GPR_TIMER_BEGIN("combiner.maybe_finish_one", 0); + GPR_ASSERT(exec_ctx->active_combiner == lock); + if (lock->optional_workqueue != NULL && + grpc_exec_ctx_ready_to_finish(exec_ctx)) { + // this execution context wants to move on, and we have a workqueue (and so + // can help the execution context out): schedule remaining work to be picked + // up on the workqueue + grpc_closure_init(&lock->continue_finishing, continue_finishing_mainline, + lock); + grpc_workqueue_enqueue(exec_ctx, lock->optional_workqueue, + &lock->continue_finishing, GRPC_ERROR_NONE); + return false; + } gpr_mpscq_node *n = gpr_mpscq_pop(&lock->queue); GRPC_COMBINER_TRACE( gpr_log(GPR_DEBUG, "C:%p maybe_finish_one n=%p", lock, n)); - GPR_ASSERT(exec_ctx->active_combiner == lock); if (n == NULL) { // queue is in an inconsistant state: use this as a cue that we should // go off and do something else for a while (and come back later) diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c index 9eb4dfc618..47f53f7ad2 100644 --- a/src/core/lib/surface/completion_queue.c +++ b/src/core/lib/surface/completion_queue.c @@ -521,7 +521,7 @@ grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag, for (;;) { if (is_finished_arg.stolen_completion != NULL) { gpr_mu_unlock(cc->mu); - grpc_cq_completion *c = is_finished_arg.stolen_completion; + c = is_finished_arg.stolen_completion; is_finished_arg.stolen_completion = NULL; ret.type = GRPC_OP_COMPLETE; ret.success = c->next & 1u; -- cgit v1.2.3 From ecfc238a371b4639de9d95b0bf86beaf7e3b57a7 Mon Sep 17 00:00:00 2001 From: Robbie Shade Date: Fri, 5 Aug 2016 11:42:41 -0400 Subject: Add error log for invalid http2 headers --- src/core/lib/channel/http_server_filter.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core/lib') diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c index 5ce51f9016..d0bada77c2 100644 --- a/src/core/lib/channel/http_server_filter.c +++ b/src/core/lib/channel/http_server_filter.c @@ -180,6 +180,9 @@ static void hs_on_recv(grpc_exec_ctx *exec_ctx, void *user_data, err, GRPC_ERROR_CREATE("Missing te: trailers header")); } /* Error this call out */ + const char *error_str = grpc_error_string(err); + gpr_log(GPR_ERROR, "Invalid http2 headers: %s", error_str); + grpc_error_free_string(error_str); grpc_call_element_send_cancel(exec_ctx, elem); } } else { -- cgit v1.2.3 From 79b322751f6b6b0c11599235c5e62375c235783d Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 8 Aug 2016 13:38:30 -0700 Subject: refactor inet_ntop into a portability header --- BUILD | 8 ++++ CMakeLists.txt | 3 ++ Makefile | 4 ++ binding.gyp | 1 + build.yaml | 2 + config.m4 | 1 + gRPC-Core.podspec | 3 ++ grpc.gemspec | 2 + include/grpc/impl/codegen/port_platform.h | 1 + package.xml | 2 + src/core/lib/iomgr/port.h | 43 +++++++++++++++++++ src/core/lib/iomgr/socket_utils.h | 47 +++++++++++++++++++++ src/core/lib/iomgr/socket_utils_common_posix.c | 6 +++ src/core/lib/iomgr/socket_utils_windows.c | 48 ++++++++++++++++++++++ src/core/lib/tsi/ssl_transport_security.c | 12 ++---- src/python/grpcio/grpc_core_dependencies.py | 1 + tools/doxygen/Doxyfile.core.internal | 2 + tools/run_tests/sources_and_headers.json | 3 ++ vsprojects/vcxproj/grpc/grpc.vcxproj | 3 ++ vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 6 +++ .../vcxproj/grpc_test_util/grpc_test_util.vcxproj | 3 ++ .../grpc_test_util/grpc_test_util.vcxproj.filters | 6 +++ .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 3 ++ .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 6 +++ 24 files changed, 207 insertions(+), 9 deletions(-) create mode 100644 src/core/lib/iomgr/port.h create mode 100644 src/core/lib/iomgr/socket_utils.h create mode 100644 src/core/lib/iomgr/socket_utils_windows.c (limited to 'src/core/lib') diff --git a/BUILD b/BUILD index f4ebeba310..e0e70459fd 100644 --- a/BUILD +++ b/BUILD @@ -200,6 +200,7 @@ cc_library( "src/core/lib/iomgr/sockaddr_posix.h", "src/core/lib/iomgr/sockaddr_utils.h", "src/core/lib/iomgr/sockaddr_windows.h", + "src/core/lib/iomgr/socket_utils.h", "src/core/lib/iomgr/socket_utils_posix.h", "src/core/lib/iomgr/socket_windows.h", "src/core/lib/iomgr/tcp_client.h", @@ -355,6 +356,7 @@ cc_library( "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_windows.c", "src/core/lib/iomgr/socket_windows.c", "src/core/lib/iomgr/tcp_client_posix.c", "src/core/lib/iomgr/tcp_client_windows.c", @@ -595,6 +597,7 @@ cc_library( "src/core/lib/iomgr/sockaddr_posix.h", "src/core/lib/iomgr/sockaddr_utils.h", "src/core/lib/iomgr/sockaddr_windows.h", + "src/core/lib/iomgr/socket_utils.h", "src/core/lib/iomgr/socket_utils_posix.h", "src/core/lib/iomgr/socket_windows.h", "src/core/lib/iomgr/tcp_client.h", @@ -737,6 +740,7 @@ cc_library( "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_windows.c", "src/core/lib/iomgr/socket_windows.c", "src/core/lib/iomgr/tcp_client_posix.c", "src/core/lib/iomgr/tcp_client_windows.c", @@ -949,6 +953,7 @@ cc_library( "src/core/lib/iomgr/sockaddr_posix.h", "src/core/lib/iomgr/sockaddr_utils.h", "src/core/lib/iomgr/sockaddr_windows.h", + "src/core/lib/iomgr/socket_utils.h", "src/core/lib/iomgr/socket_utils_posix.h", "src/core/lib/iomgr/socket_windows.h", "src/core/lib/iomgr/tcp_client.h", @@ -1081,6 +1086,7 @@ cc_library( "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_windows.c", "src/core/lib/iomgr/socket_windows.c", "src/core/lib/iomgr/tcp_client_posix.c", "src/core/lib/iomgr/tcp_client_windows.c", @@ -1844,6 +1850,7 @@ objc_library( "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_windows.c", "src/core/lib/iomgr/socket_windows.c", "src/core/lib/iomgr/tcp_client_posix.c", "src/core/lib/iomgr/tcp_client_windows.c", @@ -2063,6 +2070,7 @@ objc_library( "src/core/lib/iomgr/sockaddr_posix.h", "src/core/lib/iomgr/sockaddr_utils.h", "src/core/lib/iomgr/sockaddr_windows.h", + "src/core/lib/iomgr/socket_utils.h", "src/core/lib/iomgr/socket_utils_posix.h", "src/core/lib/iomgr/socket_windows.h", "src/core/lib/iomgr/tcp_client.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index c9d28e6553..fdb730b983 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -318,6 +318,7 @@ add_library(grpc 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_windows.c src/core/lib/iomgr/socket_windows.c src/core/lib/iomgr/tcp_client_posix.c src/core/lib/iomgr/tcp_client_windows.c @@ -574,6 +575,7 @@ add_library(grpc_cronet 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_windows.c src/core/lib/iomgr/socket_windows.c src/core/lib/iomgr/tcp_client_posix.c src/core/lib/iomgr/tcp_client_windows.c @@ -804,6 +806,7 @@ add_library(grpc_unsecure 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_windows.c src/core/lib/iomgr/socket_windows.c src/core/lib/iomgr/tcp_client_posix.c src/core/lib/iomgr/tcp_client_windows.c diff --git a/Makefile b/Makefile index df96a8af29..8b6af559e0 100644 --- a/Makefile +++ b/Makefile @@ -2566,6 +2566,7 @@ LIBGRPC_SRC = \ 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_windows.c \ src/core/lib/iomgr/socket_windows.c \ src/core/lib/iomgr/tcp_client_posix.c \ src/core/lib/iomgr/tcp_client_windows.c \ @@ -2842,6 +2843,7 @@ LIBGRPC_CRONET_SRC = \ 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_windows.c \ src/core/lib/iomgr/socket_windows.c \ src/core/lib/iomgr/tcp_client_posix.c \ src/core/lib/iomgr/tcp_client_windows.c \ @@ -3108,6 +3110,7 @@ LIBGRPC_TEST_UTIL_SRC = \ 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_windows.c \ src/core/lib/iomgr/socket_windows.c \ src/core/lib/iomgr/tcp_client_posix.c \ src/core/lib/iomgr/tcp_client_windows.c \ @@ -3300,6 +3303,7 @@ LIBGRPC_UNSECURE_SRC = \ 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_windows.c \ src/core/lib/iomgr/socket_windows.c \ src/core/lib/iomgr/tcp_client_posix.c \ src/core/lib/iomgr/tcp_client_windows.c \ diff --git a/binding.gyp b/binding.gyp index 17dbfc0d38..a078e5cca8 100644 --- a/binding.gyp +++ b/binding.gyp @@ -603,6 +603,7 @@ '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_windows.c', 'src/core/lib/iomgr/socket_windows.c', 'src/core/lib/iomgr/tcp_client_posix.c', 'src/core/lib/iomgr/tcp_client_windows.c', diff --git a/build.yaml b/build.yaml index 3bb217c088..d0e1fe0b0f 100644 --- a/build.yaml +++ b/build.yaml @@ -195,6 +195,7 @@ filegroups: - src/core/lib/iomgr/sockaddr_posix.h - src/core/lib/iomgr/sockaddr_utils.h - src/core/lib/iomgr/sockaddr_windows.h + - src/core/lib/iomgr/socket_utils.h - src/core/lib/iomgr/socket_utils_posix.h - src/core/lib/iomgr/socket_windows.h - src/core/lib/iomgr/tcp_client.h @@ -275,6 +276,7 @@ filegroups: - 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_windows.c - src/core/lib/iomgr/socket_windows.c - src/core/lib/iomgr/tcp_client_posix.c - src/core/lib/iomgr/tcp_client_windows.c diff --git a/config.m4 b/config.m4 index b37658dc61..69f06274d7 100644 --- a/config.m4 +++ b/config.m4 @@ -122,6 +122,7 @@ if test "$PHP_GRPC" != "no"; then 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_windows.c \ src/core/lib/iomgr/socket_windows.c \ src/core/lib/iomgr/tcp_client_posix.c \ src/core/lib/iomgr/tcp_client_windows.c \ diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 200f9c2125..5a94fa9f1f 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -293,6 +293,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/sockaddr_posix.h', 'src/core/lib/iomgr/sockaddr_utils.h', 'src/core/lib/iomgr/sockaddr_windows.h', + 'src/core/lib/iomgr/socket_utils.h', 'src/core/lib/iomgr/socket_utils_posix.h', 'src/core/lib/iomgr/socket_windows.h', 'src/core/lib/iomgr/tcp_client.h', @@ -452,6 +453,7 @@ Pod::Spec.new do |s| '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_windows.c', 'src/core/lib/iomgr/socket_windows.c', 'src/core/lib/iomgr/tcp_client_posix.c', 'src/core/lib/iomgr/tcp_client_windows.c', @@ -654,6 +656,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/sockaddr_posix.h', 'src/core/lib/iomgr/sockaddr_utils.h', 'src/core/lib/iomgr/sockaddr_windows.h', + 'src/core/lib/iomgr/socket_utils.h', 'src/core/lib/iomgr/socket_utils_posix.h', 'src/core/lib/iomgr/socket_windows.h', 'src/core/lib/iomgr/tcp_client.h', diff --git a/grpc.gemspec b/grpc.gemspec index 29d8afef9b..4593a0a607 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -212,6 +212,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/sockaddr_posix.h ) s.files += %w( src/core/lib/iomgr/sockaddr_utils.h ) s.files += %w( src/core/lib/iomgr/sockaddr_windows.h ) + s.files += %w( src/core/lib/iomgr/socket_utils.h ) s.files += %w( src/core/lib/iomgr/socket_utils_posix.h ) s.files += %w( src/core/lib/iomgr/socket_windows.h ) s.files += %w( src/core/lib/iomgr/tcp_client.h ) @@ -371,6 +372,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/socket_utils_common_posix.c ) s.files += %w( src/core/lib/iomgr/socket_utils_linux.c ) s.files += %w( src/core/lib/iomgr/socket_utils_posix.c ) + s.files += %w( src/core/lib/iomgr/socket_utils_windows.c ) s.files += %w( src/core/lib/iomgr/socket_windows.c ) s.files += %w( src/core/lib/iomgr/tcp_client_posix.c ) s.files += %w( src/core/lib/iomgr/tcp_client_windows.c ) diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h index 7c67bad5ae..e51cc17460 100644 --- a/include/grpc/impl/codegen/port_platform.h +++ b/include/grpc/impl/codegen/port_platform.h @@ -93,6 +93,7 @@ #define GPR_WINSOCK_SOCKET 1 #define GPR_WINDOWS_SUBPROCESS 1 #define GPR_WINDOWS_ENV +#define GPR_WINDOWS_SOCKETUTILS #ifdef __MSYS__ #define GPR_GETPID_IN_UNISTD_H 1 #define GPR_MSYS_TMPFILE diff --git a/package.xml b/package.xml index 38b74f526b..c735498757 100644 --- a/package.xml +++ b/package.xml @@ -220,6 +220,7 @@ + @@ -379,6 +380,7 @@ + diff --git a/src/core/lib/iomgr/port.h b/src/core/lib/iomgr/port.h new file mode 100644 index 0000000000..10b55d7453 --- /dev/null +++ b/src/core/lib/iomgr/port.h @@ -0,0 +1,43 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include + +#ifndef GRPC_CORE_LIB_IOMGR_PORT_H +#define GRPC_CORE_LIB_IOMGR_PORT_H + +#if GPR_WINDOWS +#define GPR_WINSOCK_SOCKET 1 + + +#endif /* GRPC_CORE_LIB_IOMGR_PORT_H */ diff --git a/src/core/lib/iomgr/socket_utils.h b/src/core/lib/iomgr/socket_utils.h new file mode 100644 index 0000000000..69774aac74 --- /dev/null +++ b/src/core/lib/iomgr/socket_utils.h @@ -0,0 +1,47 @@ +/* + * + * 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. + * + */ + +#ifndef GRPC_CORE_LIB_IOMGR_SOCKET_UTILS_H +#define GRPC_CORE_LIB_IOMGR_SOCKET_UTILS_H + +#ifdef GPR_WINSOCK_SOCKET +#include "sockaddr_windows.h" +#else +#include "sockaddr_posix.h" +#endif + +/* A wrapper for inet_ntop on POSIX systems and InetNtop on Windows systems */ +const char *grpc_inet_ntop(int af, const void *src, + char *dst, socklen_t size); + +#endif /* GRPC_CORE_LIB_IOMGR_SOCKET_UTILS_H */ diff --git a/src/core/lib/iomgr/socket_utils_common_posix.c b/src/core/lib/iomgr/socket_utils_common_posix.c index d2f6261e2a..e683ef8f18 100644 --- a/src/core/lib/iomgr/socket_utils_common_posix.c +++ b/src/core/lib/iomgr/socket_utils_common_posix.c @@ -35,6 +35,7 @@ #ifdef GPR_POSIX_SOCKET +#include "src/core/lib/iomgr/socket_utils.h" #include "src/core/lib/iomgr/socket_utils_posix.h" #include @@ -296,4 +297,9 @@ grpc_error *grpc_create_dualstack_socket(const struct sockaddr *addr, int type, return error_for_fd(*newfd, addr); } +const char *grpc_inet_ntop(int af, const void *src, + char *dst, socklen_t size) { + return inet_ntop(af, src, dst, size); +} + #endif diff --git a/src/core/lib/iomgr/socket_utils_windows.c b/src/core/lib/iomgr/socket_utils_windows.c new file mode 100644 index 0000000000..e4f9e2a510 --- /dev/null +++ b/src/core/lib/iomgr/socket_utils_windows.c @@ -0,0 +1,48 @@ +/* + * + * 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. + * + */ + +#include + +#ifdef GPR_WINDOWS_SOCKETUTILS + +#include "src/core/lib/iomgr/socket_utils.h" + +#include + +const char *grpc_inet_ntop(int af, const void *src, + char *dst, socklen_t size) { + GPR_ASSERT(sizeof(socklen_t) <= sizeof(size_t)); + return InetNtop(af, src, dst, (size_t)size); +} + +#endif /* GPR_WINDOWS_SOCKETUTILS */ diff --git a/src/core/lib/tsi/ssl_transport_security.c b/src/core/lib/tsi/ssl_transport_security.c index e91c6316e7..f6e8c518e3 100644 --- a/src/core/lib/tsi/ssl_transport_security.c +++ b/src/core/lib/tsi/ssl_transport_security.c @@ -32,19 +32,13 @@ */ #include "src/core/lib/tsi/ssl_transport_security.h" +#include "src/core/lib/iomgr/socket_utils.h" #include #include #include -/* TODO(jboeuf): refactor inet_ntop into a portability header. */ -#ifdef GPR_WINSOCK_SOCKET -#include -#else -#include -#endif - #include #include #include @@ -353,8 +347,8 @@ static tsi_result add_subject_alt_names_properties_to_peer( result = TSI_INTERNAL_ERROR; break; } - const char *name = inet_ntop(af, subject_alt_name->d.iPAddress->data, - ntop_buf, INET6_ADDRSTRLEN); + const char *name = grpc_inet_ntop(af, subject_alt_name->d.iPAddress->data, + ntop_buf, INET6_ADDRSTRLEN); if (name == NULL) { gpr_log(GPR_ERROR, "Could not get IP string from asn1 octet."); result = TSI_INTERNAL_ERROR; diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 7ae76f52c1..78fa428903 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -116,6 +116,7 @@ CORE_SOURCE_FILES = [ '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_windows.c', 'src/core/lib/iomgr/socket_windows.c', 'src/core/lib/iomgr/tcp_client_posix.c', 'src/core/lib/iomgr/tcp_client_windows.c', diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index dcb11bd933..57aefb4b3c 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -831,6 +831,7 @@ src/core/lib/iomgr/sockaddr.h \ src/core/lib/iomgr/sockaddr_posix.h \ src/core/lib/iomgr/sockaddr_utils.h \ src/core/lib/iomgr/sockaddr_windows.h \ +src/core/lib/iomgr/socket_utils.h \ src/core/lib/iomgr/socket_utils_posix.h \ src/core/lib/iomgr/socket_windows.h \ src/core/lib/iomgr/tcp_client.h \ @@ -990,6 +991,7 @@ src/core/lib/iomgr/sockaddr_utils.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_windows.c \ src/core/lib/iomgr/socket_windows.c \ src/core/lib/iomgr/tcp_client_posix.c \ src/core/lib/iomgr/tcp_client_windows.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 566f41e730..42faca3ee5 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -5806,6 +5806,7 @@ "src/core/lib/iomgr/sockaddr_posix.h", "src/core/lib/iomgr/sockaddr_utils.h", "src/core/lib/iomgr/sockaddr_windows.h", + "src/core/lib/iomgr/socket_utils.h", "src/core/lib/iomgr/socket_utils_posix.h", "src/core/lib/iomgr/socket_windows.h", "src/core/lib/iomgr/tcp_client.h", @@ -5933,10 +5934,12 @@ "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_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_windows.c", "src/core/lib/iomgr/socket_windows.c", "src/core/lib/iomgr/socket_windows.h", "src/core/lib/iomgr/tcp_client.h", diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index ed010c55b5..4166b1b08c 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -340,6 +340,7 @@ + @@ -542,6 +543,8 @@ + + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index b3101728ab..5608139f53 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -124,6 +124,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -788,6 +791,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index 84a71d217d..f7006c81cd 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -230,6 +230,7 @@ + @@ -385,6 +386,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index 18fe926405..22f542bda1 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -172,6 +172,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -566,6 +569,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 7a5f8589ca..c359163412 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -329,6 +329,7 @@ + @@ -509,6 +510,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index 99db98eb7c..cf4e4a0a3c 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -127,6 +127,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -695,6 +698,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr -- cgit v1.2.3 From 5407089b37581b010504171d939f5a3238411027 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 8 Aug 2016 17:01:18 -0700 Subject: Separate out iomgr-specific constants into a separate header --- BUILD | 4 ++ build.yaml | 1 + gRPC-Core.podspec | 2 + grpc.gemspec | 1 + include/grpc/impl/codegen/port_platform.h | 76 +------------------- package.xml | 1 + src/core/lib/iomgr/endpoint_pair_posix.c | 2 +- src/core/lib/iomgr/endpoint_pair_windows.c | 2 +- src/core/lib/iomgr/ev_epoll_linux.c | 2 +- src/core/lib/iomgr/ev_epoll_linux.h | 1 + src/core/lib/iomgr/ev_poll_and_epoll_posix.c | 2 +- src/core/lib/iomgr/ev_poll_posix.c | 2 +- src/core/lib/iomgr/ev_posix.c | 2 +- src/core/lib/iomgr/iocp_windows.c | 2 +- src/core/lib/iomgr/iomgr_posix.c | 2 +- src/core/lib/iomgr/iomgr_windows.c | 2 +- src/core/lib/iomgr/pollset_set_windows.c | 2 +- src/core/lib/iomgr/pollset_windows.c | 2 +- src/core/lib/iomgr/port.h | 83 +++++++++++++++++++++- src/core/lib/iomgr/resolve_address_posix.c | 2 +- src/core/lib/iomgr/resolve_address_windows.c | 2 +- src/core/lib/iomgr/sockaddr.h | 2 +- src/core/lib/iomgr/socket_utils.h | 2 + src/core/lib/iomgr/socket_utils_common_posix.c | 2 +- src/core/lib/iomgr/socket_utils_linux.c | 2 +- src/core/lib/iomgr/socket_utils_posix.c | 2 +- src/core/lib/iomgr/socket_utils_windows.c | 2 +- src/core/lib/iomgr/socket_windows.c | 2 +- src/core/lib/iomgr/tcp_client_posix.c | 2 +- src/core/lib/iomgr/tcp_client_windows.c | 2 +- src/core/lib/iomgr/tcp_posix.c | 2 +- src/core/lib/iomgr/tcp_server_posix.c | 2 +- src/core/lib/iomgr/tcp_server_windows.c | 2 +- src/core/lib/iomgr/tcp_windows.c | 2 +- src/core/lib/iomgr/udp_server.c | 2 +- src/core/lib/iomgr/unix_sockets_posix.c | 5 +- src/core/lib/iomgr/unix_sockets_posix.h | 2 +- src/core/lib/iomgr/wakeup_fd_eventfd.c | 2 +- src/core/lib/iomgr/wakeup_fd_nospecial.c | 2 +- src/core/lib/iomgr/wakeup_fd_pipe.c | 2 +- src/core/lib/iomgr/wakeup_fd_posix.c | 2 +- src/core/lib/iomgr/workqueue.h | 1 + src/core/lib/iomgr/workqueue_posix.c | 2 +- test/core/end2end/fixtures/h2_full+trace.c | 1 + test/core/end2end/fixtures/h2_sockpair+trace.c | 1 + test/core/iomgr/ev_epoll_linux_test.c | 2 +- test/core/util/port_posix.c | 2 +- test/core/util/port_windows.c | 2 +- test/cpp/end2end/async_end2end_test.cc | 1 + tools/doxygen/Doxyfile.core.internal | 1 + tools/run_tests/sources_and_headers.json | 2 + vsprojects/vcxproj/grpc/grpc.vcxproj | 1 + vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 3 + .../vcxproj/grpc_test_util/grpc_test_util.vcxproj | 1 + .../grpc_test_util/grpc_test_util.vcxproj.filters | 3 + .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 1 + .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 3 + 57 files changed, 154 insertions(+), 111 deletions(-) (limited to 'src/core/lib') diff --git a/BUILD b/BUILD index e0e70459fd..c874341a98 100644 --- a/BUILD +++ b/BUILD @@ -195,6 +195,7 @@ cc_library( "src/core/lib/iomgr/pollset_set.h", "src/core/lib/iomgr/pollset_set_windows.h", "src/core/lib/iomgr/pollset_windows.h", + "src/core/lib/iomgr/port.h", "src/core/lib/iomgr/resolve_address.h", "src/core/lib/iomgr/sockaddr.h", "src/core/lib/iomgr/sockaddr_posix.h", @@ -592,6 +593,7 @@ cc_library( "src/core/lib/iomgr/pollset_set.h", "src/core/lib/iomgr/pollset_set_windows.h", "src/core/lib/iomgr/pollset_windows.h", + "src/core/lib/iomgr/port.h", "src/core/lib/iomgr/resolve_address.h", "src/core/lib/iomgr/sockaddr.h", "src/core/lib/iomgr/sockaddr_posix.h", @@ -948,6 +950,7 @@ cc_library( "src/core/lib/iomgr/pollset_set.h", "src/core/lib/iomgr/pollset_set_windows.h", "src/core/lib/iomgr/pollset_windows.h", + "src/core/lib/iomgr/port.h", "src/core/lib/iomgr/resolve_address.h", "src/core/lib/iomgr/sockaddr.h", "src/core/lib/iomgr/sockaddr_posix.h", @@ -2065,6 +2068,7 @@ objc_library( "src/core/lib/iomgr/pollset_set.h", "src/core/lib/iomgr/pollset_set_windows.h", "src/core/lib/iomgr/pollset_windows.h", + "src/core/lib/iomgr/port.h", "src/core/lib/iomgr/resolve_address.h", "src/core/lib/iomgr/sockaddr.h", "src/core/lib/iomgr/sockaddr_posix.h", diff --git a/build.yaml b/build.yaml index d0e1fe0b0f..39514bdef0 100644 --- a/build.yaml +++ b/build.yaml @@ -190,6 +190,7 @@ filegroups: - src/core/lib/iomgr/pollset_set.h - src/core/lib/iomgr/pollset_set_windows.h - src/core/lib/iomgr/pollset_windows.h + - src/core/lib/iomgr/port.h - src/core/lib/iomgr/resolve_address.h - src/core/lib/iomgr/sockaddr.h - src/core/lib/iomgr/sockaddr_posix.h diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 5a94fa9f1f..753dabebe4 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -288,6 +288,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/pollset_set.h', 'src/core/lib/iomgr/pollset_set_windows.h', 'src/core/lib/iomgr/pollset_windows.h', + 'src/core/lib/iomgr/port.h', 'src/core/lib/iomgr/resolve_address.h', 'src/core/lib/iomgr/sockaddr.h', 'src/core/lib/iomgr/sockaddr_posix.h', @@ -651,6 +652,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/pollset_set.h', 'src/core/lib/iomgr/pollset_set_windows.h', 'src/core/lib/iomgr/pollset_windows.h', + 'src/core/lib/iomgr/port.h', 'src/core/lib/iomgr/resolve_address.h', 'src/core/lib/iomgr/sockaddr.h', 'src/core/lib/iomgr/sockaddr_posix.h', diff --git a/grpc.gemspec b/grpc.gemspec index 4593a0a607..bb7913bf66 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -207,6 +207,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/pollset_set.h ) s.files += %w( src/core/lib/iomgr/pollset_set_windows.h ) s.files += %w( src/core/lib/iomgr/pollset_windows.h ) + s.files += %w( src/core/lib/iomgr/port.h ) s.files += %w( src/core/lib/iomgr/resolve_address.h ) s.files += %w( src/core/lib/iomgr/sockaddr.h ) s.files += %w( src/core/lib/iomgr/sockaddr_posix.h ) diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h index e51cc17460..1aeda9b658 100644 --- a/include/grpc/impl/codegen/port_platform.h +++ b/include/grpc/impl/codegen/port_platform.h @@ -90,10 +90,8 @@ #endif #define GPR_PLATFORM_STRING "windows" #define GPR_WINDOWS 1 -#define GPR_WINSOCK_SOCKET 1 #define GPR_WINDOWS_SUBPROCESS 1 #define GPR_WINDOWS_ENV -#define GPR_WINDOWS_SOCKETUTILS #ifdef __MSYS__ #define GPR_GETPID_IN_UNISTD_H 1 #define GPR_MSYS_TMPFILE @@ -125,15 +123,7 @@ #define GPR_GCC_TLS 1 #define GPR_LINUX 1 #define GPR_LINUX_LOG 1 -#define GPR_POSIX_SOCKET 1 -#define GPR_POSIX_WAKEUP_FD 1 -#define GPR_POSIX_SOCKETADDR 1 -#define GPR_POSIX_NO_SPECIAL_WAKEUP_FD 1 -#define GPR_POSIX_SOCKETUTILS 1 #define GPR_SUPPORT_CHANNELS_FROM_FD 1 -#define GPR_HAVE_UNIX_SOCKET 1 -#define GPR_HAVE_IP_PKTINFO 1 -#define GPR_HAVE_IPV6_RECVPKTINFO 1 #define GPR_LINUX_ENV 1 #define GPR_POSIX_FILE 1 #define GPR_POSIX_TMPFILE 1 @@ -142,7 +132,6 @@ #define GPR_POSIX_SYNC 1 #define GPR_POSIX_TIME 1 #define GPR_GETPID_IN_UNISTD_H 1 -#define GPR_HAVE_MSG_NOSIGNAL 1 #ifdef _LP64 #define GPR_ARCH_64 1 #else /* _LP64 */ @@ -159,12 +148,6 @@ #define GPR_CPU_LINUX 1 #define GPR_GCC_SYNC 1 #define GPR_GCC_TLS 1 -#define GPR_POSIX_MULTIPOLL_WITH_POLL 1 -#define GPR_POSIX_WAKEUP_FD 1 -#define GPR_LINUX_EVENTFD 1 -#define GPR_POSIX_SOCKET 1 -#define GPR_POSIX_SOCKETADDR 1 -#define GPR_POSIX_SOCKETUTILS 1 #define GPR_POSIX_ENV 1 #define GPR_POSIX_FILE 1 #define GPR_POSIX_TMPFILE 1 @@ -175,10 +158,6 @@ #define GPR_POSIX_TIME 1 #define GPR_GETPID_IN_UNISTD_H 1 #define GPR_SUPPORT_CHANNELS_FROM_FD 1 -#define GPR_HAVE_MSG_NOSIGNAL 1 -#define GPR_HAVE_UNIX_SOCKET 1 -#define GPR_HAVE_IP_PKTINFO 1 -#define GPR_HAVE_IPV6_RECVPKTINFO 1 #elif defined(__linux__) #define GPR_POSIX_CRASH_HANDLER 1 #define GPR_PLATFORM_STRING "linux" @@ -197,30 +176,11 @@ #define GPR_GCC_TLS 1 #define GPR_LINUX 1 #define GPR_LINUX_LOG -#define GPR_LINUX_MULTIPOLL_WITH_EPOLL 1 -#define GPR_POSIX_WAKEUP_FD 1 -#define GPR_POSIX_SOCKET 1 -#define GPR_POSIX_SOCKETADDR 1 #define GPR_SUPPORT_CHANNELS_FROM_FD 1 -#define GPR_HAVE_UNIX_SOCKET 1 -#define GPR_HAVE_IP_PKTINFO 1 -#define GPR_HAVE_IPV6_RECVPKTINFO 1 -#ifdef __GLIBC_PREREQ -#if __GLIBC_PREREQ(2, 9) -#define GPR_LINUX_EVENTFD 1 -#define GPR_LINUX_EPOLL 1 -#endif -#if __GLIBC_PREREQ(2, 10) -#define GPR_LINUX_SOCKETUTILS 1 -#endif -#endif #define GPR_LINUX_ENV 1 #ifndef GPR_LINUX_EVENTFD #define GPR_POSIX_NO_SPECIAL_WAKEUP_FD 1 #endif -#ifndef GPR_LINUX_SOCKETUTILS -#define GPR_POSIX_SOCKETUTILS -#endif #define GPR_POSIX_FILE 1 #define GPR_POSIX_TMPFILE 1 #define GPR_POSIX_STRING 1 @@ -228,7 +188,6 @@ #define GPR_POSIX_SYNC 1 #define GPR_POSIX_TIME 1 #define GPR_GETPID_IN_UNISTD_H 1 -#define GPR_HAVE_MSG_NOSIGNAL 1 #ifdef _LP64 #define GPR_ARCH_64 1 #else /* _LP64 */ @@ -239,7 +198,6 @@ #ifndef _BSD_SOURCE #define _BSD_SOURCE #endif -#define GPR_MSG_IOVLEN_TYPE int #if TARGET_OS_IPHONE #define GPR_FORBID_UNREACHABLE_CODE 1 #define GPR_PLATFORM_STRING "ios" @@ -251,14 +209,9 @@ #define GPR_GCC_TLS 1 #define GPR_POSIX_CRASH_HANDLER 1 #endif +#define GPR_APPLE 1 #define GPR_GCC_ATOMIC 1 #define GPR_POSIX_LOG 1 -#define GPR_POSIX_MULTIPOLL_WITH_POLL 1 -#define GPR_POSIX_WAKEUP_FD 1 -#define GPR_POSIX_NO_SPECIAL_WAKEUP_FD 1 -#define GPR_POSIX_SOCKET 1 -#define GPR_POSIX_SOCKETADDR 1 -#define GPR_POSIX_SOCKETUTILS 1 #define GPR_POSIX_ENV 1 #define GPR_POSIX_FILE 1 #define GPR_POSIX_TMPFILE 1 @@ -268,9 +221,6 @@ #define GPR_POSIX_TIME 1 #define GPR_GETPID_IN_UNISTD_H 1 #define GPR_SUPPORT_CHANNELS_FROM_FD 1 -#define GPR_HAVE_SO_NOSIGPIPE 1 -#define GPR_HAVE_UNIX_SOCKET 1 -#define GPR_HAVE_IP_PKTINFO 1 #ifdef _LP64 #define GPR_ARCH_64 1 #else /* _LP64 */ @@ -281,16 +231,11 @@ #ifndef _BSD_SOURCE #define _BSD_SOURCE #endif +#define GPR_FREEBSD 1 #define GPR_CPU_POSIX 1 #define GPR_GCC_ATOMIC 1 #define GPR_GCC_TLS 1 #define GPR_POSIX_LOG 1 -#define GPR_POSIX_MULTIPOLL_WITH_POLL 1 -#define GPR_POSIX_WAKEUP_FD 1 -#define GPR_POSIX_NO_SPECIAL_WAKEUP_FD 1 -#define GPR_POSIX_SOCKET 1 -#define GPR_POSIX_SOCKETADDR 1 -#define GPR_POSIX_SOCKETUTILS 1 #define GPR_POSIX_ENV 1 #define GPR_POSIX_FILE 1 #define GPR_POSIX_TMPFILE 1 @@ -300,10 +245,6 @@ #define GPR_POSIX_TIME 1 #define GPR_GETPID_IN_UNISTD_H 1 #define GPR_SUPPORT_CHANNELS_FROM_FD 1 -#define GPR_HAVE_SO_NOSIGPIPE 1 -#define GPR_HAVE_UNIX_SOCKET 1 -#define GPR_HAVE_IP_PKTINFO 1 -#define GPR_HAVE_IPV6_RECVPKTINFO 1 #ifdef _LP64 #define GPR_ARCH_64 1 #else /* _LP64 */ @@ -320,16 +261,11 @@ #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif +#define GPR_NACL 1 #define GPR_CPU_POSIX 1 #define GPR_GCC_ATOMIC 1 #define GPR_GCC_TLS 1 #define GPR_POSIX_LOG 1 -#define GPR_POSIX_MULTIPOLL_WITH_POLL 1 -#define GPR_POSIX_WAKEUP_FD 1 -#define GPR_POSIX_NO_SPECIAL_WAKEUP_FD 1 -#define GPR_POSIX_SOCKET 1 -#define GPR_POSIX_SOCKETADDR 1 -#define GPR_POSIX_SOCKETUTILS 1 #define GPR_POSIX_ENV 1 #define GPR_POSIX_FILE 1 #define GPR_POSIX_TMPFILE 1 @@ -416,12 +352,6 @@ typedef unsigned __int64 uint64_t; #error Must define GPR_POSIX_SOCKET to use GPR_POSIX_MULTIPOLL_WITH_POLL #endif -#if defined(GPR_POSIX_SOCKET) + defined(GPR_WINSOCK_SOCKET) + \ - defined(GPR_CUSTOM_SOCKET) != \ - 1 -#error Must define exactly one of GPR_POSIX_SOCKET, GPR_WINSOCK_SOCKET, GPR_CUSTOM_SOCKET -#endif - #if defined(GPR_MSVC_TLS) + defined(GPR_GCC_TLS) + defined(GPR_PTHREAD_TLS) + \ defined(GPR_CUSTOM_TLS) != \ 1 diff --git a/package.xml b/package.xml index c735498757..3d5a83dc79 100644 --- a/package.xml +++ b/package.xml @@ -215,6 +215,7 @@ + diff --git a/src/core/lib/iomgr/endpoint_pair_posix.c b/src/core/lib/iomgr/endpoint_pair_posix.c index e295fb4867..7437dbf6ab 100644 --- a/src/core/lib/iomgr/endpoint_pair_posix.c +++ b/src/core/lib/iomgr/endpoint_pair_posix.c @@ -31,7 +31,7 @@ * */ -#include +#include "src/core/lib/iomgr/port.h" #ifdef GPR_POSIX_SOCKET diff --git a/src/core/lib/iomgr/endpoint_pair_windows.c b/src/core/lib/iomgr/endpoint_pair_windows.c index 582704e267..0933ba0d57 100644 --- a/src/core/lib/iomgr/endpoint_pair_windows.c +++ b/src/core/lib/iomgr/endpoint_pair_windows.c @@ -31,7 +31,7 @@ * */ -#include +#include "src/core/lib/iomgr/port.h" #ifdef GPR_WINSOCK_SOCKET #include "src/core/lib/iomgr/endpoint_pair.h" diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 6a63c4d1d1..2d9c0e49b2 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -32,7 +32,7 @@ */ #include -#include +#include "src/core/lib/iomgr/port.h" /* This polling engine is only relevant on linux kernels supporting epoll() */ #ifdef GPR_LINUX_EPOLL diff --git a/src/core/lib/iomgr/ev_epoll_linux.h b/src/core/lib/iomgr/ev_epoll_linux.h index 7a494aba19..e2a66555bc 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.h +++ b/src/core/lib/iomgr/ev_epoll_linux.h @@ -34,6 +34,7 @@ #ifndef GRPC_CORE_LIB_IOMGR_EV_EPOLL_LINUX_H #define GRPC_CORE_LIB_IOMGR_EV_EPOLL_LINUX_H +#include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/ev_posix.h" const grpc_event_engine_vtable *grpc_init_epoll_linux(void); diff --git a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c index c2107e5e39..57ae8325e8 100644 --- a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c +++ b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c @@ -42,7 +42,7 @@ * - ev_epoll_posix.{h,c} */ -#include +#include "src/core/lib/iomgr/port.h" #ifdef GPR_POSIX_SOCKET diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.c index 16a5e3083e..7df1b2e3de 100644 --- a/src/core/lib/iomgr/ev_poll_posix.c +++ b/src/core/lib/iomgr/ev_poll_posix.c @@ -31,7 +31,7 @@ * */ -#include +#include "src/core/lib/iomgr/port.h" #ifdef GPR_POSIX_SOCKET diff --git a/src/core/lib/iomgr/ev_posix.c b/src/core/lib/iomgr/ev_posix.c index 6536672685..b510c6fc26 100644 --- a/src/core/lib/iomgr/ev_posix.c +++ b/src/core/lib/iomgr/ev_posix.c @@ -31,7 +31,7 @@ * */ -#include +#include "src/core/lib/iomgr/port.h" #ifdef GPR_POSIX_SOCKET diff --git a/src/core/lib/iomgr/iocp_windows.c b/src/core/lib/iomgr/iocp_windows.c index 2532e52e48..e6915502a4 100644 --- a/src/core/lib/iomgr/iocp_windows.c +++ b/src/core/lib/iomgr/iocp_windows.c @@ -31,7 +31,7 @@ * */ -#include +#include "src/core/lib/iomgr/port.h" #ifdef GPR_WINSOCK_SOCKET diff --git a/src/core/lib/iomgr/iomgr_posix.c b/src/core/lib/iomgr/iomgr_posix.c index cede97f4c6..963684ad7a 100644 --- a/src/core/lib/iomgr/iomgr_posix.c +++ b/src/core/lib/iomgr/iomgr_posix.c @@ -31,7 +31,7 @@ * */ -#include +#include "src/core/lib/iomgr/port.h" #ifdef GPR_POSIX_SOCKET diff --git a/src/core/lib/iomgr/iomgr_windows.c b/src/core/lib/iomgr/iomgr_windows.c index 7653f6e635..e0e307bf81 100644 --- a/src/core/lib/iomgr/iomgr_windows.c +++ b/src/core/lib/iomgr/iomgr_windows.c @@ -31,7 +31,7 @@ * */ -#include +#include "src/core/lib/iomgr/port.h" #ifdef GPR_WINSOCK_SOCKET diff --git a/src/core/lib/iomgr/pollset_set_windows.c b/src/core/lib/iomgr/pollset_set_windows.c index a35a9766fc..4a2563d32e 100644 --- a/src/core/lib/iomgr/pollset_set_windows.c +++ b/src/core/lib/iomgr/pollset_set_windows.c @@ -31,7 +31,7 @@ * */ -#include +#include "src/core/lib/iomgr/port.h" #include #ifdef GPR_WINSOCK_SOCKET diff --git a/src/core/lib/iomgr/pollset_windows.c b/src/core/lib/iomgr/pollset_windows.c index 626dd784b3..bd650d5609 100644 --- a/src/core/lib/iomgr/pollset_windows.c +++ b/src/core/lib/iomgr/pollset_windows.c @@ -31,7 +31,7 @@ * */ -#include +#include "src/core/lib/iomgr/port.h" #ifdef GPR_WINSOCK_SOCKET diff --git a/src/core/lib/iomgr/port.h b/src/core/lib/iomgr/port.h index 10b55d7453..acd68dce79 100644 --- a/src/core/lib/iomgr/port.h +++ b/src/core/lib/iomgr/port.h @@ -36,8 +36,89 @@ #ifndef GRPC_CORE_LIB_IOMGR_PORT_H #define GRPC_CORE_LIB_IOMGR_PORT_H -#if GPR_WINDOWS +#if defined(GPR_WINDOWS) #define GPR_WINSOCK_SOCKET 1 +#define GPR_WINDOWS_SOCKETUTILS 1 +/* #undef GPR_POSIX_SOCKET */ +/* #undef GPR_POSIX_WAKEUP_FD */ +#elif defined(GPR_MANYLINUX1) +#define GPR_HAVE_IPV6_RECVPKTINFO 1 +#define GPR_HAVE_IP_PKTINFO 1 +#define GPR_HAVE_MSG_NOSIGNAL 1 +#define GPR_HAVE_UNIX_SOCKET 1 +#define GPR_POSIX_NO_SPECIAL_WAKEUP_FD 1 +#define GPR_POSIX_SOCKET 1 +#define GPR_POSIX_SOCKETADDR 1 +#define GPR_POSIX_SOCKETUTILS 1 +#define GPR_POSIX_WAKEUP_FD 1 +#elif defined(GPR_ANDROID) +#define GPR_HAVE_IPV6_RECVPKTINFO 1 +#define GPR_HAVE_IP_PKTINFO 1 +#define GPR_HAVE_MSG_NOSIGNAL 1 +#define GPR_HAVE_UNIX_SOCKET 1 +#define GPR_LINUX_EVENTFD 1 +#define GPR_POSIX_SOCKET 1 +#define GPR_POSIX_SOCKETADDR 1 +#define GPR_POSIX_SOCKETUTILS 1 +#define GPR_POSIX_WAKEUP_FD 1 +#elif defined(GPR_LINUX) +#define GPR_HAVE_IPV6_RECVPKTINFO 1 +#define GPR_HAVE_IP_PKTINFO 1 +#define GPR_HAVE_MSG_NOSIGNAL 1 +#define GPR_HAVE_UNIX_SOCKET 1 +#define GPR_LINUX_MULTIPOLL_WITH_EPOLL 1 +#define GPR_POSIX_SOCKET 1 +#define GPR_POSIX_SOCKETADDR 1 +#define GPR_POSIX_WAKEUP_FD 1 +#ifdef __GLIBC_PREREQ +#if __GLIBC_PREREQ(2, 9) +#define GPR_LINUX_EPOLL 1 +#define GPR_LINUX_EVENTFD 1 +#endif +#if __GLIBC_PREREQ(2, 10) +#define GPR_LINUX_SOCKETUTILS 1 +#endif +#endif +#ifndef GPR_LINUX_EVENTFD +#define GPR_POSIX_NO_SPECIAL_WAKEUP_FD 1 +#endif +#ifndef GPR_LINUX_SOCKETUTILS +#define GPR_POSIX_SOCKETUTILS +#endif +#elif defined(GPR_APPLE) +#define GPR_HAVE_IP_PKTINFO 1 +#define GPR_HAVE_SO_NOSIGPIPE 1 +#define GPR_HAVE_UNIX_SOCKET 1 +#define GPR_MSG_IOVLEN_TYPE int +#define GPR_POSIX_NO_SPECIAL_WAKEUP_FD 1 +#define GPR_POSIX_SOCKET 1 +#define GPR_POSIX_SOCKETADDR 1 +#define GPR_POSIX_SOCKETUTILS 1 +#define GPR_POSIX_WAKEUP_FD 1 +#elif defined(GPR_FREEBSD) +#define GPR_HAVE_IPV6_RECVPKTINFO 1 +#define GPR_HAVE_IP_PKTINFO 1 +#define GPR_HAVE_SO_NOSIGPIPE 1 +#define GPR_HAVE_UNIX_SOCKET 1 +#define GPR_POSIX_NO_SPECIAL_WAKEUP_FD 1 +#define GPR_POSIX_SOCKET 1 +#define GPR_POSIX_SOCKETADDR 1 +#define GPR_POSIX_SOCKETUTILS 1 +#define GPR_POSIX_WAKEUP_FD 1 +#elif defined(GPR_NACL) +#define GPR_POSIX_NO_SPECIAL_WAKEUP_FD 1 +#define GPR_POSIX_SOCKET 1 +#define GPR_POSIX_SOCKETADDR 1 +#define GPR_POSIX_SOCKETUTILS 1 +#define GPR_POSIX_WAKEUP_FD 1 +#elif !defined(GPR_NO_AUTODETECT_PLATFORM) +#error "Platform not recognized" +#endif +#if defined(GPR_POSIX_SOCKET) + defined(GPR_WINSOCK_SOCKET) + \ + defined(GPR_CUSTOM_SOCKET) != \ + 1 +#error Must define exactly one of GPR_POSIX_SOCKET, GPR_WINSOCK_SOCKET, GPR_CUSTOM_SOCKET +#endif #endif /* GRPC_CORE_LIB_IOMGR_PORT_H */ diff --git a/src/core/lib/iomgr/resolve_address_posix.c b/src/core/lib/iomgr/resolve_address_posix.c index 4e9f978584..164fe10855 100644 --- a/src/core/lib/iomgr/resolve_address_posix.c +++ b/src/core/lib/iomgr/resolve_address_posix.c @@ -31,7 +31,7 @@ * */ -#include +#include "src/core/lib/iomgr/port.h" #ifdef GPR_POSIX_SOCKET #include "src/core/lib/iomgr/resolve_address.h" diff --git a/src/core/lib/iomgr/resolve_address_windows.c b/src/core/lib/iomgr/resolve_address_windows.c index 2af8af82dc..334473c6bf 100644 --- a/src/core/lib/iomgr/resolve_address_windows.c +++ b/src/core/lib/iomgr/resolve_address_windows.c @@ -31,7 +31,7 @@ * */ -#include +#include "src/core/lib/iomgr/port.h" #ifdef GPR_WINSOCK_SOCKET #include "src/core/lib/iomgr/resolve_address.h" diff --git a/src/core/lib/iomgr/sockaddr.h b/src/core/lib/iomgr/sockaddr.h index 5563d0b8a6..fd85f176da 100644 --- a/src/core/lib/iomgr/sockaddr.h +++ b/src/core/lib/iomgr/sockaddr.h @@ -34,7 +34,7 @@ #ifndef GRPC_CORE_LIB_IOMGR_SOCKADDR_H #define GRPC_CORE_LIB_IOMGR_SOCKADDR_H -#include +#include "src/core/lib/iomgr/port.h" #ifdef GPR_WINDOWS #include "src/core/lib/iomgr/sockaddr_windows.h" diff --git a/src/core/lib/iomgr/socket_utils.h b/src/core/lib/iomgr/socket_utils.h index 69774aac74..1d871a34e6 100644 --- a/src/core/lib/iomgr/socket_utils.h +++ b/src/core/lib/iomgr/socket_utils.h @@ -34,6 +34,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_SOCKET_UTILS_H #define GRPC_CORE_LIB_IOMGR_SOCKET_UTILS_H +#include "src/core/lib/iomgr/port.h" + #ifdef GPR_WINSOCK_SOCKET #include "sockaddr_windows.h" #else diff --git a/src/core/lib/iomgr/socket_utils_common_posix.c b/src/core/lib/iomgr/socket_utils_common_posix.c index e683ef8f18..afd9a7652e 100644 --- a/src/core/lib/iomgr/socket_utils_common_posix.c +++ b/src/core/lib/iomgr/socket_utils_common_posix.c @@ -31,7 +31,7 @@ * */ -#include +#include "src/core/lib/iomgr/port.h" #ifdef GPR_POSIX_SOCKET diff --git a/src/core/lib/iomgr/socket_utils_linux.c b/src/core/lib/iomgr/socket_utils_linux.c index 144e3110c8..defdaf388e 100644 --- a/src/core/lib/iomgr/socket_utils_linux.c +++ b/src/core/lib/iomgr/socket_utils_linux.c @@ -31,7 +31,7 @@ * */ -#include +#include "src/core/lib/iomgr/port.h" #ifdef GPR_LINUX_SOCKETUTILS diff --git a/src/core/lib/iomgr/socket_utils_posix.c b/src/core/lib/iomgr/socket_utils_posix.c index 57ae64c103..a923ff870f 100644 --- a/src/core/lib/iomgr/socket_utils_posix.c +++ b/src/core/lib/iomgr/socket_utils_posix.c @@ -31,7 +31,7 @@ * */ -#include +#include "src/core/lib/iomgr/port.h" #ifdef GPR_POSIX_SOCKETUTILS diff --git a/src/core/lib/iomgr/socket_utils_windows.c b/src/core/lib/iomgr/socket_utils_windows.c index e4f9e2a510..c9ddce156b 100644 --- a/src/core/lib/iomgr/socket_utils_windows.c +++ b/src/core/lib/iomgr/socket_utils_windows.c @@ -31,7 +31,7 @@ * */ -#include +#include "src/core/lib/iomgr/port.h" #ifdef GPR_WINDOWS_SOCKETUTILS diff --git a/src/core/lib/iomgr/socket_windows.c b/src/core/lib/iomgr/socket_windows.c index d7d5f6f157..e9d0cedce5 100644 --- a/src/core/lib/iomgr/socket_windows.c +++ b/src/core/lib/iomgr/socket_windows.c @@ -31,7 +31,7 @@ * */ -#include +#include "src/core/lib/iomgr/port.h" #ifdef GPR_WINSOCK_SOCKET diff --git a/src/core/lib/iomgr/tcp_client_posix.c b/src/core/lib/iomgr/tcp_client_posix.c index 80c7a3f128..84b22d0c33 100644 --- a/src/core/lib/iomgr/tcp_client_posix.c +++ b/src/core/lib/iomgr/tcp_client_posix.c @@ -31,7 +31,7 @@ * */ -#include +#include "src/core/lib/iomgr/port.h" #ifdef GPR_POSIX_SOCKET diff --git a/src/core/lib/iomgr/tcp_client_windows.c b/src/core/lib/iomgr/tcp_client_windows.c index 562cb9c6bf..2ae4834f99 100644 --- a/src/core/lib/iomgr/tcp_client_windows.c +++ b/src/core/lib/iomgr/tcp_client_windows.c @@ -31,7 +31,7 @@ * */ -#include +#include "src/core/lib/iomgr/port.h" #ifdef GPR_WINSOCK_SOCKET diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 974d5ae479..ba4dc75575 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -31,7 +31,7 @@ * */ -#include +#include "src/core/lib/iomgr/port.h" #ifdef GPR_POSIX_SOCKET diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index 38ebd2dbcb..75241bd65d 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -36,7 +36,7 @@ #define _GNU_SOURCE #endif -#include +#include "src/core/lib/iomgr/port.h" #ifdef GPR_POSIX_SOCKET diff --git a/src/core/lib/iomgr/tcp_server_windows.c b/src/core/lib/iomgr/tcp_server_windows.c index 1b125e7005..fd193c3fa2 100644 --- a/src/core/lib/iomgr/tcp_server_windows.c +++ b/src/core/lib/iomgr/tcp_server_windows.c @@ -31,7 +31,7 @@ * */ -#include +#include "src/core/lib/iomgr/port.h" #ifdef GPR_WINSOCK_SOCKET diff --git a/src/core/lib/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.c index 35054c42b5..0eecccb000 100644 --- a/src/core/lib/iomgr/tcp_windows.c +++ b/src/core/lib/iomgr/tcp_windows.c @@ -31,7 +31,7 @@ * */ -#include +#include "src/core/lib/iomgr/port.h" #ifdef GPR_WINSOCK_SOCKET diff --git a/src/core/lib/iomgr/udp_server.c b/src/core/lib/iomgr/udp_server.c index 48032412a2..07eee75e5a 100644 --- a/src/core/lib/iomgr/udp_server.c +++ b/src/core/lib/iomgr/udp_server.c @@ -36,7 +36,7 @@ #define _GNU_SOURCE #endif -#include +#include "src/core/lib/iomgr/port.h" #ifdef GRPC_NEED_UDP #ifdef GPR_POSIX_SOCKET diff --git a/src/core/lib/iomgr/unix_sockets_posix.c b/src/core/lib/iomgr/unix_sockets_posix.c index 0e7670e5a5..c59d38848b 100644 --- a/src/core/lib/iomgr/unix_sockets_posix.c +++ b/src/core/lib/iomgr/unix_sockets_posix.c @@ -30,8 +30,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ - -#include "src/core/lib/iomgr/unix_sockets_posix.h" +#include "src/core/lib/iomgr/port.h" #ifdef GPR_HAVE_UNIX_SOCKET @@ -40,6 +39,8 @@ #include #include +#include "src/core/lib/iomgr/unix_sockets_posix.h" + #include #include diff --git a/src/core/lib/iomgr/unix_sockets_posix.h b/src/core/lib/iomgr/unix_sockets_posix.h index db0516d945..5458f6ab4f 100644 --- a/src/core/lib/iomgr/unix_sockets_posix.h +++ b/src/core/lib/iomgr/unix_sockets_posix.h @@ -34,7 +34,7 @@ #ifndef GRPC_CORE_LIB_IOMGR_UNIX_SOCKETS_POSIX_H #define GRPC_CORE_LIB_IOMGR_UNIX_SOCKETS_POSIX_H -#include +#include "src/core/lib/iomgr/port.h" #include diff --git a/src/core/lib/iomgr/wakeup_fd_eventfd.c b/src/core/lib/iomgr/wakeup_fd_eventfd.c index 95f6102330..3d21d9d1d5 100644 --- a/src/core/lib/iomgr/wakeup_fd_eventfd.c +++ b/src/core/lib/iomgr/wakeup_fd_eventfd.c @@ -31,7 +31,7 @@ * */ -#include +#include "src/core/lib/iomgr/port.h" #ifdef GPR_LINUX_EVENTFD diff --git a/src/core/lib/iomgr/wakeup_fd_nospecial.c b/src/core/lib/iomgr/wakeup_fd_nospecial.c index cb2f707dc5..c2b273d3a6 100644 --- a/src/core/lib/iomgr/wakeup_fd_nospecial.c +++ b/src/core/lib/iomgr/wakeup_fd_nospecial.c @@ -36,7 +36,7 @@ * systems without anything better than pipe. */ -#include +#include "src/core/lib/iomgr/port.h" #ifdef GPR_POSIX_NO_SPECIAL_WAKEUP_FD diff --git a/src/core/lib/iomgr/wakeup_fd_pipe.c b/src/core/lib/iomgr/wakeup_fd_pipe.c index 4e5dbdcb73..8991d17741 100644 --- a/src/core/lib/iomgr/wakeup_fd_pipe.c +++ b/src/core/lib/iomgr/wakeup_fd_pipe.c @@ -31,7 +31,7 @@ * */ -#include +#include "src/core/lib/iomgr/port.h" #ifdef GPR_POSIX_WAKEUP_FD diff --git a/src/core/lib/iomgr/wakeup_fd_posix.c b/src/core/lib/iomgr/wakeup_fd_posix.c index 046208abc8..c5c4eeb62e 100644 --- a/src/core/lib/iomgr/wakeup_fd_posix.c +++ b/src/core/lib/iomgr/wakeup_fd_posix.c @@ -31,7 +31,7 @@ * */ -#include +#include "src/core/lib/iomgr/port.h" #ifdef GPR_POSIX_WAKEUP_FD diff --git a/src/core/lib/iomgr/workqueue.h b/src/core/lib/iomgr/workqueue.h index 7156e490d7..86c7114c31 100644 --- a/src/core/lib/iomgr/workqueue.h +++ b/src/core/lib/iomgr/workqueue.h @@ -39,6 +39,7 @@ #include "src/core/lib/iomgr/iomgr.h" #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/pollset_set.h" +#include "src/core/lib/iomgr/port.h" #ifdef GPR_POSIX_SOCKET #include "src/core/lib/iomgr/workqueue_posix.h" diff --git a/src/core/lib/iomgr/workqueue_posix.c b/src/core/lib/iomgr/workqueue_posix.c index e0d6dac230..2665b9580f 100644 --- a/src/core/lib/iomgr/workqueue_posix.c +++ b/src/core/lib/iomgr/workqueue_posix.c @@ -31,7 +31,7 @@ * */ -#include +#include "src/core/lib/iomgr/port.h" #ifdef GPR_POSIX_SOCKET diff --git a/test/core/end2end/fixtures/h2_full+trace.c b/test/core/end2end/fixtures/h2_full+trace.c index c4dc5b9bc1..ad31d21fef 100644 --- a/test/core/end2end/fixtures/h2_full+trace.c +++ b/test/core/end2end/fixtures/h2_full+trace.c @@ -45,6 +45,7 @@ #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/connected_channel.h" #include "src/core/lib/channel/http_server_filter.h" +#include "src/core/lib/iomgr/port.h" #include "src/core/lib/support/env.h" #include "src/core/lib/surface/channel.h" #include "src/core/lib/surface/server.h" diff --git a/test/core/end2end/fixtures/h2_sockpair+trace.c b/test/core/end2end/fixtures/h2_sockpair+trace.c index 6b0769b608..429c2013d3 100644 --- a/test/core/end2end/fixtures/h2_sockpair+trace.c +++ b/test/core/end2end/fixtures/h2_sockpair+trace.c @@ -48,6 +48,7 @@ #include "src/core/lib/channel/http_server_filter.h" #include "src/core/lib/iomgr/endpoint_pair.h" #include "src/core/lib/iomgr/iomgr.h" +#include "src/core/lib/iomgr/port.h" #include "src/core/lib/support/env.h" #include "src/core/lib/surface/channel.h" #include "src/core/lib/surface/completion_queue.h" diff --git a/test/core/iomgr/ev_epoll_linux_test.c b/test/core/iomgr/ev_epoll_linux_test.c index 2547dc9871..d7ee6da7c6 100644 --- a/test/core/iomgr/ev_epoll_linux_test.c +++ b/test/core/iomgr/ev_epoll_linux_test.c @@ -30,7 +30,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -#include +#include "src/core/lib/iomgr/port.h" /* This test only relevant on linux systems where epoll() is available */ #ifdef GPR_LINUX_EPOLL diff --git a/test/core/util/port_posix.c b/test/core/util/port_posix.c index 265e0acee1..6e3ab64edd 100644 --- a/test/core/util/port_posix.c +++ b/test/core/util/port_posix.c @@ -31,7 +31,7 @@ * */ -#include +#include "src/core/lib/iomgr/port.h" #include "test/core/util/test_config.h" #if defined(GPR_POSIX_SOCKET) && defined(GRPC_TEST_PICK_PORT) diff --git a/test/core/util/port_windows.c b/test/core/util/port_windows.c index 9023719675..4cc0cea0cb 100644 --- a/test/core/util/port_windows.c +++ b/test/core/util/port_windows.c @@ -31,7 +31,7 @@ * */ -#include +#include "src/core/lib/iomgr/port.h" #include "test/core/util/test_config.h" #if defined(GPR_WINSOCK_SOCKET) && defined(GRPC_TEST_PICK_PORT) diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index ac79fe8274..662ccbd1c2 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -47,6 +47,7 @@ #include #include +#include "src/core/lib/iomgr/port.h" #include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/util/port.h" diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 57aefb4b3c..8f2f011eaf 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -826,6 +826,7 @@ src/core/lib/iomgr/pollset.h \ src/core/lib/iomgr/pollset_set.h \ src/core/lib/iomgr/pollset_set_windows.h \ src/core/lib/iomgr/pollset_windows.h \ +src/core/lib/iomgr/port.h \ src/core/lib/iomgr/resolve_address.h \ src/core/lib/iomgr/sockaddr.h \ src/core/lib/iomgr/sockaddr_posix.h \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 42faca3ee5..8c1cd249ba 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -5801,6 +5801,7 @@ "src/core/lib/iomgr/pollset_set.h", "src/core/lib/iomgr/pollset_set_windows.h", "src/core/lib/iomgr/pollset_windows.h", + "src/core/lib/iomgr/port.h", "src/core/lib/iomgr/resolve_address.h", "src/core/lib/iomgr/sockaddr.h", "src/core/lib/iomgr/sockaddr_posix.h", @@ -5926,6 +5927,7 @@ "src/core/lib/iomgr/pollset_set_windows.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_windows.c", diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 4166b1b08c..69ec3c0a08 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -335,6 +335,7 @@ + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 5608139f53..d72c32046a 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -776,6 +776,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index f7006c81cd..84e2a60d58 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -225,6 +225,7 @@ + diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index 22f542bda1..1a2ecf91df 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -554,6 +554,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index c359163412..d053dd9a30 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -324,6 +324,7 @@ + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index cf4e4a0a3c..7edd0db4b6 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -683,6 +683,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr -- cgit v1.2.3 From 623dd4f55624b2fc09848141ab095bf6fe5c6cb2 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 8 Aug 2016 17:31:27 -0700 Subject: Renamed GPR_ constants to GRPC_ in iomgr/port.h --- include/grpc/impl/codegen/port_platform.h | 8 +- src/core/ext/client_config/parse_address.c | 4 +- src/core/ext/client_config/parse_address.h | 2 +- src/core/ext/resolver/sockaddr/sockaddr_resolver.c | 6 +- src/core/lib/iomgr/endpoint_pair_posix.c | 2 +- src/core/lib/iomgr/endpoint_pair_windows.c | 2 +- src/core/lib/iomgr/ev_epoll_linux.c | 12 +- src/core/lib/iomgr/ev_epoll_linux.h | 4 +- src/core/lib/iomgr/ev_poll_and_epoll_posix.c | 14 +-- src/core/lib/iomgr/ev_poll_posix.c | 2 +- src/core/lib/iomgr/ev_posix.c | 4 +- src/core/lib/iomgr/iocp_windows.c | 4 +- src/core/lib/iomgr/iomgr_posix.c | 2 +- src/core/lib/iomgr/iomgr_windows.c | 2 +- src/core/lib/iomgr/pollset_set_windows.c | 4 +- src/core/lib/iomgr/pollset_windows.c | 4 +- src/core/lib/iomgr/port.h | 124 ++++++++++----------- src/core/lib/iomgr/resolve_address_posix.c | 2 +- src/core/lib/iomgr/resolve_address_windows.c | 2 +- src/core/lib/iomgr/sockaddr.h | 2 +- src/core/lib/iomgr/socket_utils.h | 2 +- src/core/lib/iomgr/socket_utils_common_posix.c | 8 +- src/core/lib/iomgr/socket_utils_linux.c | 2 +- src/core/lib/iomgr/socket_utils_posix.c | 4 +- src/core/lib/iomgr/socket_utils_windows.c | 4 +- src/core/lib/iomgr/socket_windows.c | 4 +- src/core/lib/iomgr/tcp_client_posix.c | 2 +- src/core/lib/iomgr/tcp_client_windows.c | 4 +- src/core/lib/iomgr/tcp_posix.c | 8 +- src/core/lib/iomgr/tcp_server_posix.c | 2 +- src/core/lib/iomgr/tcp_server_windows.c | 4 +- src/core/lib/iomgr/tcp_windows.c | 4 +- src/core/lib/iomgr/udp_server.c | 2 +- src/core/lib/iomgr/unix_sockets_posix.c | 2 +- src/core/lib/iomgr/unix_sockets_posix_noop.c | 2 +- src/core/lib/iomgr/wakeup_fd_eventfd.c | 4 +- src/core/lib/iomgr/wakeup_fd_nospecial.c | 4 +- src/core/lib/iomgr/wakeup_fd_pipe.c | 2 +- src/core/lib/iomgr/wakeup_fd_posix.c | 4 +- src/core/lib/iomgr/workqueue.h | 2 +- src/core/lib/iomgr/workqueue_posix.c | 4 +- test/core/end2end/fixtures/h2_full+trace.c | 2 +- test/core/end2end/fixtures/h2_sockpair+trace.c | 2 +- test/core/iomgr/ev_epoll_linux_test.c | 6 +- test/core/util/port_posix.c | 4 +- test/core/util/port_windows.c | 4 +- test/cpp/end2end/async_end2end_test.cc | 4 +- 47 files changed, 148 insertions(+), 154 deletions(-) (limited to 'src/core/lib') diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h index 1aeda9b658..f65f56db87 100644 --- a/include/grpc/impl/codegen/port_platform.h +++ b/include/grpc/impl/codegen/port_platform.h @@ -178,8 +178,8 @@ #define GPR_LINUX_LOG #define GPR_SUPPORT_CHANNELS_FROM_FD 1 #define GPR_LINUX_ENV 1 -#ifndef GPR_LINUX_EVENTFD -#define GPR_POSIX_NO_SPECIAL_WAKEUP_FD 1 +#ifndef GRPC_LINUX_EVENTFD +#define GRPC_POSIX_NO_SPECIAL_WAKEUP_FD 1 #endif #define GPR_POSIX_FILE 1 #define GPR_POSIX_TMPFILE 1 @@ -348,10 +348,6 @@ typedef unsigned __int64 uint64_t; #error Must define exactly one of GPR_CPU_LINUX, GPR_CPU_POSIX, GPR_WINDOWS, GPR_CPU_IPHONE, GPR_CPU_CUSTOM #endif -#if defined(GPR_POSIX_MULTIPOLL_WITH_POLL) && !defined(GPR_POSIX_SOCKET) -#error Must define GPR_POSIX_SOCKET to use GPR_POSIX_MULTIPOLL_WITH_POLL -#endif - #if defined(GPR_MSVC_TLS) + defined(GPR_GCC_TLS) + defined(GPR_PTHREAD_TLS) + \ defined(GPR_CUSTOM_TLS) != \ 1 diff --git a/src/core/ext/client_config/parse_address.c b/src/core/ext/client_config/parse_address.c index 8b4abe24a6..7c548b15ad 100644 --- a/src/core/ext/client_config/parse_address.c +++ b/src/core/ext/client_config/parse_address.c @@ -35,7 +35,7 @@ #include #include -#ifdef GPR_HAVE_UNIX_SOCKET +#ifdef GRPC_HAVE_UNIX_SOCKET #include #endif @@ -44,7 +44,7 @@ #include #include -#ifdef GPR_HAVE_UNIX_SOCKET +#ifdef GRPC_HAVE_UNIX_SOCKET int parse_unix(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len) { struct sockaddr_un *un = (struct sockaddr_un *)addr; diff --git a/src/core/ext/client_config/parse_address.h b/src/core/ext/client_config/parse_address.h index 74c86f4d93..16300de208 100644 --- a/src/core/ext/client_config/parse_address.h +++ b/src/core/ext/client_config/parse_address.h @@ -39,7 +39,7 @@ #include "src/core/ext/client_config/uri_parser.h" #include "src/core/lib/iomgr/sockaddr.h" -#ifdef GPR_HAVE_UNIX_SOCKET +#ifdef GRPC_HAVE_UNIX_SOCKET /** Populate \a addr and \a len from \a uri, whose path is expected to contain a * unix socket path. Returns true upon success. */ int parse_unix(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len); diff --git a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c index 1f7cce2f43..d613c5393e 100644 --- a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c +++ b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c @@ -163,7 +163,7 @@ static char *ipv6_get_default_authority(grpc_resolver_factory *factory, return ip_get_default_authority(uri); } -#ifdef GPR_HAVE_UNIX_SOCKET +#ifdef GRPC_HAVE_UNIX_SOCKET char *unix_get_default_authority(grpc_resolver_factory *factory, grpc_uri *uri) { return gpr_strdup("localhost"); @@ -271,7 +271,7 @@ static void sockaddr_factory_unref(grpc_resolver_factory *factory) {} static grpc_resolver_factory name##_resolver_factory = { \ &name##_factory_vtable} -#ifdef GPR_HAVE_UNIX_SOCKET +#ifdef GRPC_HAVE_UNIX_SOCKET DECL_FACTORY(unix); #endif DECL_FACTORY(ipv4); @@ -280,7 +280,7 @@ DECL_FACTORY(ipv6); void grpc_resolver_sockaddr_init(void) { grpc_register_resolver_type(&ipv4_resolver_factory); grpc_register_resolver_type(&ipv6_resolver_factory); -#ifdef GPR_HAVE_UNIX_SOCKET +#ifdef GRPC_HAVE_UNIX_SOCKET grpc_register_resolver_type(&unix_resolver_factory); #endif } diff --git a/src/core/lib/iomgr/endpoint_pair_posix.c b/src/core/lib/iomgr/endpoint_pair_posix.c index 7437dbf6ab..ec2cd782b1 100644 --- a/src/core/lib/iomgr/endpoint_pair_posix.c +++ b/src/core/lib/iomgr/endpoint_pair_posix.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET #include "src/core/lib/iomgr/endpoint_pair.h" #include "src/core/lib/iomgr/socket_utils_posix.h" diff --git a/src/core/lib/iomgr/endpoint_pair_windows.c b/src/core/lib/iomgr/endpoint_pair_windows.c index 0933ba0d57..5c78c95492 100644 --- a/src/core/lib/iomgr/endpoint_pair_windows.c +++ b/src/core/lib/iomgr/endpoint_pair_windows.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_WINSOCK_SOCKET +#ifdef GRPC_WINSOCK_SOCKET #include "src/core/lib/iomgr/endpoint_pair.h" #include "src/core/lib/iomgr/sockaddr_utils.h" diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 2d9c0e49b2..9837a98692 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -35,7 +35,7 @@ #include "src/core/lib/iomgr/port.h" /* This polling engine is only relevant on linux kernels supporting epoll() */ -#ifdef GPR_LINUX_EPOLL +#ifdef GRPC_LINUX_EPOLL #include "src/core/lib/iomgr/ev_epoll_linux.h" @@ -1905,13 +1905,13 @@ const grpc_event_engine_vtable *grpc_init_epoll_linux(void) { return &vtable; } -#else /* defined(GPR_LINUX_EPOLL) */ -#if defined(GPR_POSIX_SOCKET) +#else /* defined(GRPC_LINUX_EPOLL) */ +#if defined(GRPC_POSIX_SOCKET) #include "src/core/lib/iomgr/ev_posix.h" -/* If GPR_LINUX_EPOLL is not defined, it means epoll is not available. Return +/* If GRPC_LINUX_EPOLL is not defined, it means epoll is not available. Return * NULL */ const grpc_event_engine_vtable *grpc_init_epoll_linux(void) { return NULL; } -#endif /* defined(GPR_POSIX_SOCKET) */ +#endif /* defined(GRPC_POSIX_SOCKET) */ void grpc_use_signal(int signum) {} -#endif /* !defined(GPR_LINUX_EPOLL) */ +#endif /* !defined(GRPC_LINUX_EPOLL) */ diff --git a/src/core/lib/iomgr/ev_epoll_linux.h b/src/core/lib/iomgr/ev_epoll_linux.h index e2a66555bc..e6d5441236 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.h +++ b/src/core/lib/iomgr/ev_epoll_linux.h @@ -39,10 +39,10 @@ const grpc_event_engine_vtable *grpc_init_epoll_linux(void); -#ifdef GPR_LINUX_EPOLL +#ifdef GRPC_LINUX_EPOLL void *grpc_fd_get_polling_island(grpc_fd *fd); void *grpc_pollset_get_polling_island(grpc_pollset *ps); bool grpc_are_polling_islands_equal(void *p, void *q); -#endif /* defined(GPR_LINUX_EPOLL) */ +#endif /* defined(GRPC_LINUX_EPOLL) */ #endif /* GRPC_CORE_LIB_IOMGR_EV_EPOLL_LINUX_H */ diff --git a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c index 57ae8325e8..fb35311d2b 100644 --- a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c +++ b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c @@ -44,7 +44,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET #include "src/core/lib/iomgr/ev_poll_and_epoll_posix.h" @@ -1338,7 +1338,7 @@ static void become_basic_pollset(grpc_pollset *pollset, grpc_fd *fd_or_null) { * pollset_multipoller_with_poll_posix.c */ -#ifndef GPR_LINUX_MULTIPOLL_WITH_EPOLL +#ifndef GRPC_LINUX_MULTIPOLL_WITH_EPOLL typedef struct { /* all polled fds */ @@ -1520,13 +1520,13 @@ static void poll_become_multipoller(grpc_exec_ctx *exec_ctx, } } -#endif /* !GPR_LINUX_MULTIPOLL_WITH_EPOLL */ +#endif /* !GRPC_LINUX_MULTIPOLL_WITH_EPOLL */ /******************************************************************************* * pollset_multipoller_with_epoll_posix.c */ -#ifdef GPR_LINUX_MULTIPOLL_WITH_EPOLL +#ifdef GRPC_LINUX_MULTIPOLL_WITH_EPOLL #include #include @@ -1839,11 +1839,11 @@ static void epoll_become_multipoller(grpc_exec_ctx *exec_ctx, } } -#else /* GPR_LINUX_MULTIPOLL_WITH_EPOLL */ +#else /* GRPC_LINUX_MULTIPOLL_WITH_EPOLL */ static void remove_fd_from_all_epoll_sets(int fd) {} -#endif /* GPR_LINUX_MULTIPOLL_WITH_EPOLL */ +#endif /* GRPC_LINUX_MULTIPOLL_WITH_EPOLL */ /******************************************************************************* * pollset_set_posix.c @@ -2033,7 +2033,7 @@ static const grpc_event_engine_vtable vtable = { }; const grpc_event_engine_vtable *grpc_init_poll_and_epoll_posix(void) { -#ifdef GPR_LINUX_MULTIPOLL_WITH_EPOLL +#ifdef GRPC_LINUX_MULTIPOLL_WITH_EPOLL platform_become_multipoller = epoll_become_multipoller; #else platform_become_multipoller = poll_become_multipoller; diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.c index 7df1b2e3de..52c137b8a3 100644 --- a/src/core/lib/iomgr/ev_poll_posix.c +++ b/src/core/lib/iomgr/ev_poll_posix.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET #include "src/core/lib/iomgr/ev_poll_posix.h" diff --git a/src/core/lib/iomgr/ev_posix.c b/src/core/lib/iomgr/ev_posix.c index b510c6fc26..6079a60b22 100644 --- a/src/core/lib/iomgr/ev_posix.c +++ b/src/core/lib/iomgr/ev_posix.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET #include "src/core/lib/iomgr/ev_posix.h" @@ -258,4 +258,4 @@ void grpc_pollset_set_del_fd(grpc_exec_ctx *exec_ctx, grpc_error *grpc_kick_poller(void) { return g_event_engine->kick_poller(); } -#endif // GPR_POSIX_SOCKET +#endif // GRPC_POSIX_SOCKET diff --git a/src/core/lib/iomgr/iocp_windows.c b/src/core/lib/iomgr/iocp_windows.c index e6915502a4..60ebe43676 100644 --- a/src/core/lib/iomgr/iocp_windows.c +++ b/src/core/lib/iomgr/iocp_windows.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_WINSOCK_SOCKET +#ifdef GRPC_WINSOCK_SOCKET #include @@ -166,4 +166,4 @@ void grpc_iocp_add_socket(grpc_winsocket *socket) { GPR_ASSERT(ret == g_iocp); } -#endif /* GPR_WINSOCK_SOCKET */ +#endif /* GRPC_WINSOCK_SOCKET */ diff --git a/src/core/lib/iomgr/iomgr_posix.c b/src/core/lib/iomgr/iomgr_posix.c index 963684ad7a..f5ee0c9ee4 100644 --- a/src/core/lib/iomgr/iomgr_posix.c +++ b/src/core/lib/iomgr/iomgr_posix.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/ev_posix.h" diff --git a/src/core/lib/iomgr/iomgr_windows.c b/src/core/lib/iomgr/iomgr_windows.c index e0e307bf81..b659264ede 100644 --- a/src/core/lib/iomgr/iomgr_windows.c +++ b/src/core/lib/iomgr/iomgr_windows.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_WINSOCK_SOCKET +#ifdef GRPC_WINSOCK_SOCKET #include "src/core/lib/iomgr/sockaddr_windows.h" diff --git a/src/core/lib/iomgr/pollset_set_windows.c b/src/core/lib/iomgr/pollset_set_windows.c index 4a2563d32e..293893f18e 100644 --- a/src/core/lib/iomgr/pollset_set_windows.c +++ b/src/core/lib/iomgr/pollset_set_windows.c @@ -34,7 +34,7 @@ #include "src/core/lib/iomgr/port.h" #include -#ifdef GPR_WINSOCK_SOCKET +#ifdef GRPC_WINSOCK_SOCKET #include "src/core/lib/iomgr/pollset_set_windows.h" @@ -60,4 +60,4 @@ void grpc_pollset_set_del_pollset_set(grpc_exec_ctx* exec_ctx, grpc_pollset_set* bag, grpc_pollset_set* item) {} -#endif /* GPR_WINSOCK_SOCKET */ +#endif /* GRPC_WINSOCK_SOCKET */ diff --git a/src/core/lib/iomgr/pollset_windows.c b/src/core/lib/iomgr/pollset_windows.c index bd650d5609..5540303e49 100644 --- a/src/core/lib/iomgr/pollset_windows.c +++ b/src/core/lib/iomgr/pollset_windows.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_WINSOCK_SOCKET +#ifdef GRPC_WINSOCK_SOCKET #include #include @@ -241,4 +241,4 @@ grpc_error *grpc_pollset_kick(grpc_pollset *p, void grpc_kick_poller(void) { grpc_iocp_kick(); } -#endif /* GPR_WINSOCK_SOCKET */ +#endif /* GRPC_WINSOCK_SOCKET */ diff --git a/src/core/lib/iomgr/port.h b/src/core/lib/iomgr/port.h index acd68dce79..021bbfff5a 100644 --- a/src/core/lib/iomgr/port.h +++ b/src/core/lib/iomgr/port.h @@ -37,88 +37,86 @@ #define GRPC_CORE_LIB_IOMGR_PORT_H #if defined(GPR_WINDOWS) -#define GPR_WINSOCK_SOCKET 1 -#define GPR_WINDOWS_SOCKETUTILS 1 -/* #undef GPR_POSIX_SOCKET */ -/* #undef GPR_POSIX_WAKEUP_FD */ +#define GRPC_WINSOCK_SOCKET 1 +#define GRPC_WINDOWS_SOCKETUTILS 1 #elif defined(GPR_MANYLINUX1) -#define GPR_HAVE_IPV6_RECVPKTINFO 1 -#define GPR_HAVE_IP_PKTINFO 1 -#define GPR_HAVE_MSG_NOSIGNAL 1 -#define GPR_HAVE_UNIX_SOCKET 1 -#define GPR_POSIX_NO_SPECIAL_WAKEUP_FD 1 -#define GPR_POSIX_SOCKET 1 -#define GPR_POSIX_SOCKETADDR 1 -#define GPR_POSIX_SOCKETUTILS 1 -#define GPR_POSIX_WAKEUP_FD 1 +#define GRPC_HAVE_IPV6_RECVPKTINFO 1 +#define GRPC_HAVE_IP_PKTINFO 1 +#define GRPC_HAVE_MSG_NOSIGNAL 1 +#define GRPC_HAVE_UNIX_SOCKET 1 +#define GRPC_POSIX_NO_SPECIAL_WAKEUP_FD 1 +#define GRPC_POSIX_SOCKET 1 +#define GRPC_POSIX_SOCKETADDR 1 +#define GRPC_POSIX_SOCKETUTILS 1 +#define GRPC_POSIX_WAKEUP_FD 1 #elif defined(GPR_ANDROID) -#define GPR_HAVE_IPV6_RECVPKTINFO 1 -#define GPR_HAVE_IP_PKTINFO 1 -#define GPR_HAVE_MSG_NOSIGNAL 1 -#define GPR_HAVE_UNIX_SOCKET 1 -#define GPR_LINUX_EVENTFD 1 -#define GPR_POSIX_SOCKET 1 -#define GPR_POSIX_SOCKETADDR 1 -#define GPR_POSIX_SOCKETUTILS 1 -#define GPR_POSIX_WAKEUP_FD 1 +#define GRPC_HAVE_IPV6_RECVPKTINFO 1 +#define GRPC_HAVE_IP_PKTINFO 1 +#define GRPC_HAVE_MSG_NOSIGNAL 1 +#define GRPC_HAVE_UNIX_SOCKET 1 +#define GRPC_LINUX_EVENTFD 1 +#define GRPC_POSIX_SOCKET 1 +#define GRPC_POSIX_SOCKETADDR 1 +#define GRPC_POSIX_SOCKETUTILS 1 +#define GRPC_POSIX_WAKEUP_FD 1 #elif defined(GPR_LINUX) -#define GPR_HAVE_IPV6_RECVPKTINFO 1 -#define GPR_HAVE_IP_PKTINFO 1 -#define GPR_HAVE_MSG_NOSIGNAL 1 -#define GPR_HAVE_UNIX_SOCKET 1 -#define GPR_LINUX_MULTIPOLL_WITH_EPOLL 1 -#define GPR_POSIX_SOCKET 1 -#define GPR_POSIX_SOCKETADDR 1 -#define GPR_POSIX_WAKEUP_FD 1 +#define GRPC_HAVE_IPV6_RECVPKTINFO 1 +#define GRPC_HAVE_IP_PKTINFO 1 +#define GRPC_HAVE_MSG_NOSIGNAL 1 +#define GRPC_HAVE_UNIX_SOCKET 1 +#define GRPC_LINUX_MULTIPOLL_WITH_EPOLL 1 +#define GRPC_POSIX_SOCKET 1 +#define GRPC_POSIX_SOCKETADDR 1 +#define GRPC_POSIX_WAKEUP_FD 1 #ifdef __GLIBC_PREREQ #if __GLIBC_PREREQ(2, 9) -#define GPR_LINUX_EPOLL 1 -#define GPR_LINUX_EVENTFD 1 +#define GRPC_LINUX_EPOLL 1 +#define GRPC_LINUX_EVENTFD 1 #endif #if __GLIBC_PREREQ(2, 10) -#define GPR_LINUX_SOCKETUTILS 1 +#define GRPC_LINUX_SOCKETUTILS 1 #endif #endif -#ifndef GPR_LINUX_EVENTFD -#define GPR_POSIX_NO_SPECIAL_WAKEUP_FD 1 +#ifndef GRPC_LINUX_EVENTFD +#define GRPC_POSIX_NO_SPECIAL_WAKEUP_FD 1 #endif -#ifndef GPR_LINUX_SOCKETUTILS -#define GPR_POSIX_SOCKETUTILS +#ifndef GRPC_LINUX_SOCKETUTILS +#define GRPC_POSIX_SOCKETUTILS #endif #elif defined(GPR_APPLE) -#define GPR_HAVE_IP_PKTINFO 1 -#define GPR_HAVE_SO_NOSIGPIPE 1 -#define GPR_HAVE_UNIX_SOCKET 1 -#define GPR_MSG_IOVLEN_TYPE int -#define GPR_POSIX_NO_SPECIAL_WAKEUP_FD 1 -#define GPR_POSIX_SOCKET 1 -#define GPR_POSIX_SOCKETADDR 1 -#define GPR_POSIX_SOCKETUTILS 1 -#define GPR_POSIX_WAKEUP_FD 1 +#define GRPC_HAVE_IP_PKTINFO 1 +#define GRPC_HAVE_SO_NOSIGPIPE 1 +#define GRPC_HAVE_UNIX_SOCKET 1 +#define GRPC_MSG_IOVLEN_TYPE int +#define GRPC_POSIX_NO_SPECIAL_WAKEUP_FD 1 +#define GRPC_POSIX_SOCKET 1 +#define GRPC_POSIX_SOCKETADDR 1 +#define GRPC_POSIX_SOCKETUTILS 1 +#define GRPC_POSIX_WAKEUP_FD 1 #elif defined(GPR_FREEBSD) -#define GPR_HAVE_IPV6_RECVPKTINFO 1 -#define GPR_HAVE_IP_PKTINFO 1 -#define GPR_HAVE_SO_NOSIGPIPE 1 -#define GPR_HAVE_UNIX_SOCKET 1 -#define GPR_POSIX_NO_SPECIAL_WAKEUP_FD 1 -#define GPR_POSIX_SOCKET 1 -#define GPR_POSIX_SOCKETADDR 1 -#define GPR_POSIX_SOCKETUTILS 1 -#define GPR_POSIX_WAKEUP_FD 1 +#define GRPC_HAVE_IPV6_RECVPKTINFO 1 +#define GRPC_HAVE_IP_PKTINFO 1 +#define GRPC_HAVE_SO_NOSIGPIPE 1 +#define GRPC_HAVE_UNIX_SOCKET 1 +#define GRPC_POSIX_NO_SPECIAL_WAKEUP_FD 1 +#define GRPC_POSIX_SOCKET 1 +#define GRPC_POSIX_SOCKETADDR 1 +#define GRPC_POSIX_SOCKETUTILS 1 +#define GRPC_POSIX_WAKEUP_FD 1 #elif defined(GPR_NACL) -#define GPR_POSIX_NO_SPECIAL_WAKEUP_FD 1 -#define GPR_POSIX_SOCKET 1 -#define GPR_POSIX_SOCKETADDR 1 -#define GPR_POSIX_SOCKETUTILS 1 -#define GPR_POSIX_WAKEUP_FD 1 +#define GRPC_POSIX_NO_SPECIAL_WAKEUP_FD 1 +#define GRPC_POSIX_SOCKET 1 +#define GRPC_POSIX_SOCKETADDR 1 +#define GRPC_POSIX_SOCKETUTILS 1 +#define GRPC_POSIX_WAKEUP_FD 1 #elif !defined(GPR_NO_AUTODETECT_PLATFORM) #error "Platform not recognized" #endif -#if defined(GPR_POSIX_SOCKET) + defined(GPR_WINSOCK_SOCKET) + \ - defined(GPR_CUSTOM_SOCKET) != \ +#if defined(GRPC_POSIX_SOCKET) + defined(GRPC_WINSOCK_SOCKET) + \ + defined(GRPC_CUSTOM_SOCKET) != \ 1 -#error Must define exactly one of GPR_POSIX_SOCKET, GPR_WINSOCK_SOCKET, GPR_CUSTOM_SOCKET +#error Must define exactly one of GRPC_POSIX_SOCKET, GRPC_WINSOCK_SOCKET, GPR_CUSTOM_SOCKET #endif #endif /* GRPC_CORE_LIB_IOMGR_PORT_H */ diff --git a/src/core/lib/iomgr/resolve_address_posix.c b/src/core/lib/iomgr/resolve_address_posix.c index 164fe10855..9bc46901b1 100644 --- a/src/core/lib/iomgr/resolve_address_posix.c +++ b/src/core/lib/iomgr/resolve_address_posix.c @@ -32,7 +32,7 @@ */ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/sockaddr.h" diff --git a/src/core/lib/iomgr/resolve_address_windows.c b/src/core/lib/iomgr/resolve_address_windows.c index 334473c6bf..460bd1f2ee 100644 --- a/src/core/lib/iomgr/resolve_address_windows.c +++ b/src/core/lib/iomgr/resolve_address_windows.c @@ -32,7 +32,7 @@ */ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_WINSOCK_SOCKET +#ifdef GRPC_WINSOCK_SOCKET #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/sockaddr.h" diff --git a/src/core/lib/iomgr/sockaddr.h b/src/core/lib/iomgr/sockaddr.h index fd85f176da..58cae6cc01 100644 --- a/src/core/lib/iomgr/sockaddr.h +++ b/src/core/lib/iomgr/sockaddr.h @@ -40,7 +40,7 @@ #include "src/core/lib/iomgr/sockaddr_windows.h" #endif -#ifdef GPR_POSIX_SOCKETADDR +#ifdef GRPC_POSIX_SOCKETADDR #include "src/core/lib/iomgr/sockaddr_posix.h" #endif diff --git a/src/core/lib/iomgr/socket_utils.h b/src/core/lib/iomgr/socket_utils.h index 1d871a34e6..f0b5a33b63 100644 --- a/src/core/lib/iomgr/socket_utils.h +++ b/src/core/lib/iomgr/socket_utils.h @@ -36,7 +36,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_WINSOCK_SOCKET +#ifdef GRPC_WINSOCK_SOCKET #include "sockaddr_windows.h" #else #include "sockaddr_posix.h" diff --git a/src/core/lib/iomgr/socket_utils_common_posix.c b/src/core/lib/iomgr/socket_utils_common_posix.c index afd9a7652e..2143256846 100644 --- a/src/core/lib/iomgr/socket_utils_common_posix.c +++ b/src/core/lib/iomgr/socket_utils_common_posix.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET #include "src/core/lib/iomgr/socket_utils.h" #include "src/core/lib/iomgr/socket_utils_posix.h" @@ -79,7 +79,7 @@ grpc_error *grpc_set_socket_nonblocking(int fd, int non_blocking) { } grpc_error *grpc_set_socket_no_sigpipe_if_possible(int fd) { -#ifdef GPR_HAVE_SO_NOSIGPIPE +#ifdef GRPC_HAVE_SO_NOSIGPIPE int val = 1; int newval; socklen_t intlen = sizeof(newval); @@ -97,7 +97,7 @@ grpc_error *grpc_set_socket_no_sigpipe_if_possible(int fd) { } grpc_error *grpc_set_socket_ip_pktinfo_if_possible(int fd) { -#ifdef GPR_HAVE_IP_PKTINFO +#ifdef GRPC_HAVE_IP_PKTINFO int get_local_ip = 1; if (0 != setsockopt(fd, IPPROTO_IP, IP_PKTINFO, &get_local_ip, sizeof(get_local_ip))) { @@ -108,7 +108,7 @@ grpc_error *grpc_set_socket_ip_pktinfo_if_possible(int fd) { } grpc_error *grpc_set_socket_ipv6_recvpktinfo_if_possible(int fd) { -#ifdef GPR_HAVE_IPV6_RECVPKTINFO +#ifdef GRPC_HAVE_IPV6_RECVPKTINFO int get_local_ip = 1; if (0 != setsockopt(fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, &get_local_ip, sizeof(get_local_ip))) { diff --git a/src/core/lib/iomgr/socket_utils_linux.c b/src/core/lib/iomgr/socket_utils_linux.c index defdaf388e..3ebc3f1ac1 100644 --- a/src/core/lib/iomgr/socket_utils_linux.c +++ b/src/core/lib/iomgr/socket_utils_linux.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_LINUX_SOCKETUTILS +#ifdef GRPC_LINUX_SOCKETUTILS #include "src/core/lib/iomgr/socket_utils_posix.h" diff --git a/src/core/lib/iomgr/socket_utils_posix.c b/src/core/lib/iomgr/socket_utils_posix.c index a923ff870f..4f26773342 100644 --- a/src/core/lib/iomgr/socket_utils_posix.c +++ b/src/core/lib/iomgr/socket_utils_posix.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_SOCKETUTILS +#ifdef GRPC_POSIX_SOCKETUTILS #include "src/core/lib/iomgr/socket_utils_posix.h" @@ -67,4 +67,4 @@ close_and_error: return -1; } -#endif /* GPR_POSIX_SOCKETUTILS */ +#endif /* GRPC_POSIX_SOCKETUTILS */ diff --git a/src/core/lib/iomgr/socket_utils_windows.c b/src/core/lib/iomgr/socket_utils_windows.c index c9ddce156b..74dbd57c7d 100644 --- a/src/core/lib/iomgr/socket_utils_windows.c +++ b/src/core/lib/iomgr/socket_utils_windows.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_WINDOWS_SOCKETUTILS +#ifdef GRPC_WINDOWS_SOCKETUTILS #include "src/core/lib/iomgr/socket_utils.h" @@ -45,4 +45,4 @@ const char *grpc_inet_ntop(int af, const void *src, return InetNtop(af, src, dst, (size_t)size); } -#endif /* GPR_WINDOWS_SOCKETUTILS */ +#endif /* GRPC_WINDOWS_SOCKETUTILS */ diff --git a/src/core/lib/iomgr/socket_windows.c b/src/core/lib/iomgr/socket_windows.c index e9d0cedce5..14bd603d02 100644 --- a/src/core/lib/iomgr/socket_windows.c +++ b/src/core/lib/iomgr/socket_windows.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_WINSOCK_SOCKET +#ifdef GRPC_WINSOCK_SOCKET #include @@ -156,4 +156,4 @@ void grpc_socket_become_ready(grpc_exec_ctx *exec_ctx, grpc_winsocket *socket, if (should_destroy) destroy(socket); } -#endif /* GPR_WINSOCK_SOCKET */ +#endif /* GRPC_WINSOCK_SOCKET */ diff --git a/src/core/lib/iomgr/tcp_client_posix.c b/src/core/lib/iomgr/tcp_client_posix.c index 84b22d0c33..4c1dcd671f 100644 --- a/src/core/lib/iomgr/tcp_client_posix.c +++ b/src/core/lib/iomgr/tcp_client_posix.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET #include "src/core/lib/iomgr/tcp_client.h" diff --git a/src/core/lib/iomgr/tcp_client_windows.c b/src/core/lib/iomgr/tcp_client_windows.c index 2ae4834f99..29775cce21 100644 --- a/src/core/lib/iomgr/tcp_client_windows.c +++ b/src/core/lib/iomgr/tcp_client_windows.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_WINSOCK_SOCKET +#ifdef GRPC_WINSOCK_SOCKET #include "src/core/lib/iomgr/sockaddr_windows.h" @@ -228,4 +228,4 @@ failure: grpc_exec_ctx_sched(exec_ctx, on_done, final_error, NULL); } -#endif /* GPR_WINSOCK_SOCKET */ +#endif /* GRPC_WINSOCK_SOCKET */ diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index ba4dc75575..b3ed0484fd 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET #include "src/core/lib/iomgr/network_status_tracker.h" #include "src/core/lib/iomgr/tcp_posix.h" @@ -58,14 +58,14 @@ #include "src/core/lib/profiling/timers.h" #include "src/core/lib/support/string.h" -#ifdef GPR_HAVE_MSG_NOSIGNAL +#ifdef GRPC_HAVE_MSG_NOSIGNAL #define SENDMSG_FLAGS MSG_NOSIGNAL #else #define SENDMSG_FLAGS 0 #endif -#ifdef GPR_MSG_IOVLEN_TYPE -typedef GPR_MSG_IOVLEN_TYPE msg_iovlen_type; +#ifdef GRPC_MSG_IOVLEN_TYPE +typedef GRPC_MSG_IOVLEN_TYPE msg_iovlen_type; #else typedef size_t msg_iovlen_type; #endif diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index 75241bd65d..0a2c80a6f6 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -38,7 +38,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET #include "src/core/lib/iomgr/tcp_server.h" diff --git a/src/core/lib/iomgr/tcp_server_windows.c b/src/core/lib/iomgr/tcp_server_windows.c index fd193c3fa2..b84a109537 100644 --- a/src/core/lib/iomgr/tcp_server_windows.c +++ b/src/core/lib/iomgr/tcp_server_windows.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_WINSOCK_SOCKET +#ifdef GRPC_WINSOCK_SOCKET #include @@ -543,4 +543,4 @@ void grpc_tcp_server_start(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s, void grpc_tcp_server_shutdown_listeners(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) {} -#endif /* GPR_WINSOCK_SOCKET */ +#endif /* GRPC_WINSOCK_SOCKET */ diff --git a/src/core/lib/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.c index 0eecccb000..533f07abc0 100644 --- a/src/core/lib/iomgr/tcp_windows.c +++ b/src/core/lib/iomgr/tcp_windows.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_WINSOCK_SOCKET +#ifdef GRPC_WINSOCK_SOCKET #include @@ -416,4 +416,4 @@ grpc_endpoint *grpc_tcp_create(grpc_winsocket *socket, char *peer_string) { return &tcp->base; } -#endif /* GPR_WINSOCK_SOCKET */ +#endif /* GRPC_WINSOCK_SOCKET */ diff --git a/src/core/lib/iomgr/udp_server.c b/src/core/lib/iomgr/udp_server.c index 07eee75e5a..b8076c965c 100644 --- a/src/core/lib/iomgr/udp_server.c +++ b/src/core/lib/iomgr/udp_server.c @@ -39,7 +39,7 @@ #include "src/core/lib/iomgr/port.h" #ifdef GRPC_NEED_UDP -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET #include "src/core/lib/iomgr/udp_server.h" diff --git a/src/core/lib/iomgr/unix_sockets_posix.c b/src/core/lib/iomgr/unix_sockets_posix.c index c59d38848b..33082a2e99 100644 --- a/src/core/lib/iomgr/unix_sockets_posix.c +++ b/src/core/lib/iomgr/unix_sockets_posix.c @@ -32,7 +32,7 @@ */ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_HAVE_UNIX_SOCKET +#ifdef GRPC_HAVE_UNIX_SOCKET #include #include diff --git a/src/core/lib/iomgr/unix_sockets_posix_noop.c b/src/core/lib/iomgr/unix_sockets_posix_noop.c index 56b47c3daf..82f008d599 100644 --- a/src/core/lib/iomgr/unix_sockets_posix_noop.c +++ b/src/core/lib/iomgr/unix_sockets_posix_noop.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/unix_sockets_posix.h" -#ifndef GPR_HAVE_UNIX_SOCKET +#ifndef GRPC_HAVE_UNIX_SOCKET #include diff --git a/src/core/lib/iomgr/wakeup_fd_eventfd.c b/src/core/lib/iomgr/wakeup_fd_eventfd.c index 3d21d9d1d5..373e21d3e1 100644 --- a/src/core/lib/iomgr/wakeup_fd_eventfd.c +++ b/src/core/lib/iomgr/wakeup_fd_eventfd.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_LINUX_EVENTFD +#ifdef GRPC_LINUX_EVENTFD #include #include @@ -94,4 +94,4 @@ const grpc_wakeup_fd_vtable grpc_specialized_wakeup_fd_vtable = { eventfd_create, eventfd_consume, eventfd_wakeup, eventfd_destroy, eventfd_check_availability}; -#endif /* GPR_LINUX_EVENTFD */ +#endif /* GRPC_LINUX_EVENTFD */ diff --git a/src/core/lib/iomgr/wakeup_fd_nospecial.c b/src/core/lib/iomgr/wakeup_fd_nospecial.c index c2b273d3a6..611bced029 100644 --- a/src/core/lib/iomgr/wakeup_fd_nospecial.c +++ b/src/core/lib/iomgr/wakeup_fd_nospecial.c @@ -38,7 +38,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_NO_SPECIAL_WAKEUP_FD +#ifdef GRPC_POSIX_NO_SPECIAL_WAKEUP_FD #include #include "src/core/lib/iomgr/wakeup_fd_posix.h" @@ -48,4 +48,4 @@ static int check_availability_invalid(void) { return 0; } const grpc_wakeup_fd_vtable grpc_specialized_wakeup_fd_vtable = { NULL, NULL, NULL, NULL, check_availability_invalid}; -#endif /* GPR_POSIX_NO_SPECIAL_WAKEUP_FD */ +#endif /* GRPC_POSIX_NO_SPECIAL_WAKEUP_FD */ diff --git a/src/core/lib/iomgr/wakeup_fd_pipe.c b/src/core/lib/iomgr/wakeup_fd_pipe.c index 8991d17741..b9754228b1 100644 --- a/src/core/lib/iomgr/wakeup_fd_pipe.c +++ b/src/core/lib/iomgr/wakeup_fd_pipe.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_WAKEUP_FD +#ifdef GRPC_POSIX_WAKEUP_FD #include "src/core/lib/iomgr/wakeup_fd_posix.h" diff --git a/src/core/lib/iomgr/wakeup_fd_posix.c b/src/core/lib/iomgr/wakeup_fd_posix.c index c5c4eeb62e..dc51a08ca2 100644 --- a/src/core/lib/iomgr/wakeup_fd_posix.c +++ b/src/core/lib/iomgr/wakeup_fd_posix.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_WAKEUP_FD +#ifdef GRPC_POSIX_WAKEUP_FD #include #include "src/core/lib/iomgr/wakeup_fd_pipe.h" @@ -69,4 +69,4 @@ void grpc_wakeup_fd_destroy(grpc_wakeup_fd *fd_info) { wakeup_fd_vtable->destroy(fd_info); } -#endif /* GPR_POSIX_WAKEUP_FD */ +#endif /* GRPC_POSIX_WAKEUP_FD */ diff --git a/src/core/lib/iomgr/workqueue.h b/src/core/lib/iomgr/workqueue.h index 86c7114c31..3edba4b305 100644 --- a/src/core/lib/iomgr/workqueue.h +++ b/src/core/lib/iomgr/workqueue.h @@ -41,7 +41,7 @@ #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET #include "src/core/lib/iomgr/workqueue_posix.h" #endif diff --git a/src/core/lib/iomgr/workqueue_posix.c b/src/core/lib/iomgr/workqueue_posix.c index 2665b9580f..f28a442718 100644 --- a/src/core/lib/iomgr/workqueue_posix.c +++ b/src/core/lib/iomgr/workqueue_posix.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET #include "src/core/lib/iomgr/workqueue.h" @@ -148,4 +148,4 @@ void grpc_workqueue_enqueue(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, gpr_mu_unlock(&workqueue->mu); } -#endif /* GPR_POSIX_SOCKET */ +#endif /* GRPC_POSIX_SOCKET */ diff --git a/test/core/end2end/fixtures/h2_full+trace.c b/test/core/end2end/fixtures/h2_full+trace.c index ad31d21fef..e25b5e3347 100644 --- a/test/core/end2end/fixtures/h2_full+trace.c +++ b/test/core/end2end/fixtures/h2_full+trace.c @@ -110,7 +110,7 @@ int main(int argc, char **argv) { code paths in trace.c to be taken */ gpr_setenv("GRPC_TRACE", "doesnt-exist,http,all"); -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET g_fixture_slowdown_factor = isatty(STDOUT_FILENO) ? 10.0 : 1.0; #else g_fixture_slowdown_factor = 10.0; diff --git a/test/core/end2end/fixtures/h2_sockpair+trace.c b/test/core/end2end/fixtures/h2_sockpair+trace.c index 429c2013d3..90f815077c 100644 --- a/test/core/end2end/fixtures/h2_sockpair+trace.c +++ b/test/core/end2end/fixtures/h2_sockpair+trace.c @@ -147,7 +147,7 @@ int main(int argc, char **argv) { /* force tracing on, with a value to force many code paths in trace.c to be taken */ gpr_setenv("GRPC_TRACE", "doesnt-exist,http,all"); -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET g_fixture_slowdown_factor = isatty(STDOUT_FILENO) ? 10.0 : 1.0; #else g_fixture_slowdown_factor = 10.0; diff --git a/test/core/iomgr/ev_epoll_linux_test.c b/test/core/iomgr/ev_epoll_linux_test.c index d7ee6da7c6..564b05d7f4 100644 --- a/test/core/iomgr/ev_epoll_linux_test.c +++ b/test/core/iomgr/ev_epoll_linux_test.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" /* This test only relevant on linux systems where epoll() is available */ -#ifdef GPR_LINUX_EPOLL +#ifdef GRPC_LINUX_EPOLL #include "src/core/lib/iomgr/ev_epoll_linux.h" #include "src/core/lib/iomgr/ev_posix.h" @@ -239,6 +239,6 @@ int main(int argc, char **argv) { grpc_iomgr_shutdown(); return 0; } -#else /* defined(GPR_LINUX_EPOLL) */ +#else /* defined(GRPC_LINUX_EPOLL) */ int main(int argc, char **argv) { return 0; } -#endif /* !defined(GPR_LINUX_EPOLL) */ +#endif /* !defined(GRPC_LINUX_EPOLL) */ diff --git a/test/core/util/port_posix.c b/test/core/util/port_posix.c index 6e3ab64edd..60537b4946 100644 --- a/test/core/util/port_posix.c +++ b/test/core/util/port_posix.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" #include "test/core/util/test_config.h" -#if defined(GPR_POSIX_SOCKET) && defined(GRPC_TEST_PICK_PORT) +#if defined(GRPC_POSIX_SOCKET) && defined(GRPC_TEST_PICK_PORT) #include "test/core/util/port.h" @@ -237,4 +237,4 @@ int grpc_pick_unused_port_or_die(void) { void grpc_recycle_unused_port(int port) { GPR_ASSERT(free_chosen_port(port)); } -#endif /* GPR_POSIX_SOCKET && GRPC_TEST_PICK_PORT */ +#endif /* GRPC_POSIX_SOCKET && GRPC_TEST_PICK_PORT */ diff --git a/test/core/util/port_windows.c b/test/core/util/port_windows.c index 4cc0cea0cb..db9787dec6 100644 --- a/test/core/util/port_windows.c +++ b/test/core/util/port_windows.c @@ -33,7 +33,7 @@ #include "src/core/lib/iomgr/port.h" #include "test/core/util/test_config.h" -#if defined(GPR_WINSOCK_SOCKET) && defined(GRPC_TEST_PICK_PORT) +#if defined(GRPC_WINSOCK_SOCKET) && defined(GRPC_TEST_PICK_PORT) #include "test/core/util/port.h" @@ -242,4 +242,4 @@ int grpc_pick_unused_port_or_die(void) { void grpc_recycle_unused_port(int port) { GPR_ASSERT(free_chosen_port(port)); } -#endif /* GPR_WINSOCK_SOCKET && GRPC_TEST_PICK_PORT */ +#endif /* GRPC_WINSOCK_SOCKET && GRPC_TEST_PICK_PORT */ diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index 662ccbd1c2..b5c95bca86 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -55,7 +55,7 @@ #include "test/cpp/util/string_ref_helper.h" #include "test/cpp/util/test_credentials_provider.h" -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET #include "src/core/lib/iomgr/ev_posix.h" #endif @@ -74,7 +74,7 @@ namespace { void* tag(int i) { return (void*)(intptr_t)i; } int detag(void* p) { return static_cast(reinterpret_cast(p)); } -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET static int maybe_assert_non_blocking_poll(struct pollfd* pfds, nfds_t nfds, int timeout) { if (gpr_tls_get(&g_is_async_end2end_test)) { -- cgit v1.2.3 From ca045622867d4b26ebcd72d85a113ad5d6edd670 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 9 Aug 2016 08:38:03 -0700 Subject: Timing nuances --- src/core/lib/iomgr/combiner.c | 1 + src/core/lib/iomgr/exec_ctx.c | 3 +++ src/core/lib/iomgr/tcp_posix.c | 4 ++-- src/core/lib/profiling/basic_timers.c | 11 ++++++++++- src/core/lib/profiling/timers.h | 2 ++ src/core/lib/surface/completion_queue.c | 4 ++-- test/cpp/qps/driver.cc | 3 +++ 7 files changed, 23 insertions(+), 5 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/combiner.c b/src/core/lib/iomgr/combiner.c index 1042cd8659..946cfc65fc 100644 --- a/src/core/lib/iomgr/combiner.c +++ b/src/core/lib/iomgr/combiner.c @@ -181,6 +181,7 @@ static bool maybe_finish_one(grpc_exec_ctx *exec_ctx, grpc_combiner *lock) { lock); grpc_workqueue_enqueue(exec_ctx, lock->optional_workqueue, &lock->continue_finishing, GRPC_ERROR_NONE); + GPR_TIMER_END("combiner.maybe_finish_one", 0); return false; } gpr_mpscq_node *n = gpr_mpscq_pop(&lock->queue); diff --git a/src/core/lib/iomgr/exec_ctx.c b/src/core/lib/iomgr/exec_ctx.c index 450cf3aa93..12e51ac092 100644 --- a/src/core/lib/iomgr/exec_ctx.c +++ b/src/core/lib/iomgr/exec_ctx.c @@ -95,6 +95,7 @@ bool grpc_exec_ctx_flush(grpc_exec_ctx *exec_ctx) { GRPC_ERROR_UNREF(error); GPR_TIMER_END("grpc_exec_ctx_flush.stolen_cb", 0); grpc_exec_ctx_flush(exec_ctx); + GPR_TIMER_END("grpc_exec_ctx_flush", 0); return true; } } @@ -110,6 +111,7 @@ void grpc_exec_ctx_finish(grpc_exec_ctx *exec_ctx) { void grpc_exec_ctx_sched(grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_error *error, grpc_workqueue *offload_target_or_null) { + GPR_TIMER_BEGIN("grpc_exec_ctx_sched", 0); if (offload_target_or_null == NULL) { grpc_closure_list_append(&exec_ctx->closure_list, closure, error); } else if (exec_ctx->stealing_from_workqueue == NULL) { @@ -127,6 +129,7 @@ void grpc_exec_ctx_sched(grpc_exec_ctx *exec_ctx, grpc_closure *closure, exec_ctx->stolen_closure = closure; GRPC_WORKQUEUE_UNREF(exec_ctx, offload_target_or_null, "exec_ctx_sched"); } + GPR_TIMER_END("grpc_exec_ctx_sched", 0); } void grpc_exec_ctx_enqueue_list(grpc_exec_ctx *exec_ctx, diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 92767721d5..caaed23212 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -209,11 +209,11 @@ static void tcp_continue_read(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { msg.msg_controllen = 0; msg.msg_flags = 0; - GPR_TIMER_BEGIN("recvmsg", 1); + GPR_TIMER_BEGIN("recvmsg", 0); do { read_bytes = recvmsg(tcp->fd, &msg, 0); } while (read_bytes < 0 && errno == EINTR); - GPR_TIMER_END("recvmsg", 0); + GPR_TIMER_END("recvmsg", read_bytes >= 0); if (read_bytes < 0) { /* NB: After calling call_read_cb a parallel call of the read handler may diff --git a/src/core/lib/profiling/basic_timers.c b/src/core/lib/profiling/basic_timers.c index 51813d0461..bdf9af2339 100644 --- a/src/core/lib/profiling/basic_timers.c +++ b/src/core/lib/profiling/basic_timers.c @@ -83,6 +83,7 @@ static int g_shutdown; static gpr_thd_id g_writing_thread; static __thread int g_thread_id; static int g_next_thread_id; +static int g_writing_enabled = 1; static int timer_log_push_back(gpr_timer_log_list *list, gpr_timer_log *log) { if (list->head == NULL) { @@ -177,7 +178,7 @@ static void flush_logs(gpr_timer_log_list *list) { } } -static void finish_writing() { +static void finish_writing(void) { pthread_mutex_lock(&g_mu); g_shutdown = 1; pthread_cond_signal(&g_cv); @@ -230,6 +231,10 @@ static void gpr_timers_log_add(const char *tagstr, marker_type type, int important, const char *file, int line) { gpr_timer_entry *entry; + if (!g_writing_enabled) { + return; + } + if (g_thread_log == NULL || g_thread_log->num_entries == MAX_COUNT) { rotate_log(); } @@ -261,6 +266,8 @@ void gpr_timer_end(const char *tagstr, int important, const char *file, gpr_timers_log_add(tagstr, END, important, file, line); } +void gpr_timer_set_enabled(int enabled) { g_writing_enabled = enabled; } + /* Basic profiler specific API functions. */ void gpr_timers_global_init(void) {} @@ -272,4 +279,6 @@ void gpr_timers_global_init(void) {} void gpr_timers_global_destroy(void) {} void gpr_timers_set_log_filename(const char *filename) {} + +void gpr_timer_set_enabled(int enabled) {} #endif /* GRPC_BASIC_PROFILER */ diff --git a/src/core/lib/profiling/timers.h b/src/core/lib/profiling/timers.h index c8567e8137..621cdbf656 100644 --- a/src/core/lib/profiling/timers.h +++ b/src/core/lib/profiling/timers.h @@ -50,6 +50,8 @@ void gpr_timer_end(const char *tagstr, int important, const char *file, void gpr_timers_set_log_filename(const char *filename); +void gpr_timer_set_enabled(int enabled); + #if !(defined(GRPC_STAP_PROFILER) + defined(GRPC_BASIC_PROFILER)) /* No profiling. No-op all the things. */ #define GPR_TIMER_MARK(tag, important) \ diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c index 47f53f7ad2..2412f78a06 100644 --- a/src/core/lib/surface/completion_queue.c +++ b/src/core/lib/surface/completion_queue.c @@ -335,7 +335,7 @@ static bool cq_is_next_finished(grpc_exec_ctx *exec_ctx, void *arg) { return true; } gpr_mu_unlock(cq->mu); - return gpr_time_cmp(a->deadline, gpr_now(a->deadline.clock_type)) > 0; + return gpr_time_cmp(a->deadline, gpr_now(a->deadline.clock_type)) < 0; } grpc_event grpc_completion_queue_next(grpc_completion_queue *cc, @@ -484,7 +484,7 @@ static bool cq_is_pluck_finished(grpc_exec_ctx *exec_ctx, void *arg) { prev = c; } gpr_mu_unlock(cq->mu); - return gpr_time_cmp(a->deadline, gpr_now(a->deadline.clock_type)) > 0; + return gpr_time_cmp(a->deadline, gpr_now(a->deadline.clock_type)) < 0; } grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag, diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc index 2aeaea51f2..7db99629d4 100644 --- a/test/cpp/qps/driver.cc +++ b/test/cpp/qps/driver.cc @@ -45,6 +45,7 @@ #include #include +#include "src/core/lib/profiling/timers.h" #include "src/core/lib/support/env.h" #include "src/proto/grpc/testing/services.grpc.pb.h" #include "test/core/util/port.h" @@ -405,6 +406,8 @@ std::unique_ptr RunScenario( start, gpr_time_from_seconds(warmup_seconds + benchmark_seconds, GPR_TIMESPAN))); + gpr_timer_set_enabled(0); + // Finish a run std::unique_ptr result(new ScenarioResult); Histogram merged_latencies; -- cgit v1.2.3 From 7c205906d5d47cfaa9a7e4729bbd71821e3bb5bd Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 9 Aug 2016 10:07:42 -0700 Subject: Removed GPR_POSIX_FILE, and changed the files that used it --- BUILD | 9 ++-- CMakeLists.txt | 6 +-- Makefile | 9 ++-- binding.gyp | 3 +- build.yaml | 3 +- config.m4 | 3 +- gRPC-Core.podspec | 3 +- grpc.gemspec | 3 +- include/grpc/impl/codegen/port_platform.h | 6 --- package.xml | 3 +- .../google_default/credentials_generic.c | 59 +++++++++++++++++++++ .../credentials/google_default/credentials_posix.c | 61 ---------------------- .../google_default/credentials_windows.c | 61 ---------------------- .../google_default/google_default_credentials.h | 12 +++++ src/python/grpcio/grpc_core_dependencies.py | 3 +- test/core/security/credentials_test.c | 22 +++----- tools/doxygen/Doxyfile.core.internal | 3 +- tools/run_tests/sources_and_headers.json | 3 +- vsprojects/vcxproj/grpc/grpc.vcxproj | 4 +- vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 5 +- 20 files changed, 97 insertions(+), 184 deletions(-) create mode 100644 src/core/lib/security/credentials/google_default/credentials_generic.c delete mode 100644 src/core/lib/security/credentials/google_default/credentials_posix.c delete mode 100644 src/core/lib/security/credentials/google_default/credentials_windows.c (limited to 'src/core/lib') diff --git a/BUILD b/BUILD index c874341a98..056e91a9e2 100644 --- a/BUILD +++ b/BUILD @@ -436,8 +436,7 @@ cc_library( "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_posix.c", - "src/core/lib/security/credentials/google_default/credentials_windows.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", @@ -843,8 +842,7 @@ cc_library( "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_posix.c", - "src/core/lib/security/credentials/google_default/credentials_windows.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", @@ -1932,8 +1930,7 @@ objc_library( "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_posix.c", - "src/core/lib/security/credentials/google_default/credentials_windows.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", diff --git a/CMakeLists.txt b/CMakeLists.txt index fdb730b983..ac7218236e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -397,8 +397,7 @@ add_library(grpc 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_posix.c - src/core/lib/security/credentials/google_default/credentials_windows.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 @@ -676,8 +675,7 @@ add_library(grpc_cronet 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_posix.c - src/core/lib/security/credentials/google_default/credentials_windows.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 diff --git a/Makefile b/Makefile index 8b6af559e0..e85633f8eb 100644 --- a/Makefile +++ b/Makefile @@ -2645,8 +2645,7 @@ LIBGRPC_SRC = \ 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_posix.c \ - src/core/lib/security/credentials/google_default/credentials_windows.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 \ @@ -2944,8 +2943,7 @@ LIBGRPC_CRONET_SRC = \ 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_posix.c \ - src/core/lib/security/credentials/google_default/credentials_windows.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 \ @@ -15188,8 +15186,7 @@ src/core/lib/security/credentials/composite/composite_credentials.c: $(OPENSSL_D src/core/lib/security/credentials/credentials.c: $(OPENSSL_DEP) src/core/lib/security/credentials/credentials_metadata.c: $(OPENSSL_DEP) src/core/lib/security/credentials/fake/fake_credentials.c: $(OPENSSL_DEP) -src/core/lib/security/credentials/google_default/credentials_posix.c: $(OPENSSL_DEP) -src/core/lib/security/credentials/google_default/credentials_windows.c: $(OPENSSL_DEP) +src/core/lib/security/credentials/google_default/credentials_generic.c: $(OPENSSL_DEP) src/core/lib/security/credentials/google_default/google_default_credentials.c: $(OPENSSL_DEP) src/core/lib/security/credentials/iam/iam_credentials.c: $(OPENSSL_DEP) src/core/lib/security/credentials/jwt/json_token.c: $(OPENSSL_DEP) diff --git a/binding.gyp b/binding.gyp index a078e5cca8..b03da7cb58 100644 --- a/binding.gyp +++ b/binding.gyp @@ -682,8 +682,7 @@ '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_posix.c', - 'src/core/lib/security/credentials/google_default/credentials_windows.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', diff --git a/build.yaml b/build.yaml index 39514bdef0..e3afcd643b 100644 --- a/build.yaml +++ b/build.yaml @@ -466,8 +466,7 @@ filegroups: - 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_posix.c - - src/core/lib/security/credentials/google_default/credentials_windows.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 diff --git a/config.m4 b/config.m4 index 69f06274d7..7a06923e59 100644 --- a/config.m4 +++ b/config.m4 @@ -201,8 +201,7 @@ if test "$PHP_GRPC" != "no"; then 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_posix.c \ - src/core/lib/security/credentials/google_default/credentials_windows.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 \ diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 753dabebe4..b7a5e72a2a 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -533,8 +533,7 @@ Pod::Spec.new do |s| '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_posix.c', - 'src/core/lib/security/credentials/google_default/credentials_windows.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', diff --git a/grpc.gemspec b/grpc.gemspec index bb7913bf66..d231bf1db9 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -452,8 +452,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/security/credentials/credentials.c ) s.files += %w( src/core/lib/security/credentials/credentials_metadata.c ) s.files += %w( src/core/lib/security/credentials/fake/fake_credentials.c ) - s.files += %w( src/core/lib/security/credentials/google_default/credentials_posix.c ) - s.files += %w( src/core/lib/security/credentials/google_default/credentials_windows.c ) + s.files += %w( src/core/lib/security/credentials/google_default/credentials_generic.c ) s.files += %w( src/core/lib/security/credentials/google_default/google_default_credentials.c ) s.files += %w( src/core/lib/security/credentials/iam/iam_credentials.c ) s.files += %w( src/core/lib/security/credentials/jwt/json_token.c ) diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h index f65f56db87..c2b467a1bc 100644 --- a/include/grpc/impl/codegen/port_platform.h +++ b/include/grpc/impl/codegen/port_platform.h @@ -125,7 +125,6 @@ #define GPR_LINUX_LOG 1 #define GPR_SUPPORT_CHANNELS_FROM_FD 1 #define GPR_LINUX_ENV 1 -#define GPR_POSIX_FILE 1 #define GPR_POSIX_TMPFILE 1 #define GPR_POSIX_STRING 1 #define GPR_POSIX_SUBPROCESS 1 @@ -149,7 +148,6 @@ #define GPR_GCC_SYNC 1 #define GPR_GCC_TLS 1 #define GPR_POSIX_ENV 1 -#define GPR_POSIX_FILE 1 #define GPR_POSIX_TMPFILE 1 #define GPR_POSIX_LOG #define GPR_POSIX_STRING 1 @@ -181,7 +179,6 @@ #ifndef GRPC_LINUX_EVENTFD #define GRPC_POSIX_NO_SPECIAL_WAKEUP_FD 1 #endif -#define GPR_POSIX_FILE 1 #define GPR_POSIX_TMPFILE 1 #define GPR_POSIX_STRING 1 #define GPR_POSIX_SUBPROCESS 1 @@ -213,7 +210,6 @@ #define GPR_GCC_ATOMIC 1 #define GPR_POSIX_LOG 1 #define GPR_POSIX_ENV 1 -#define GPR_POSIX_FILE 1 #define GPR_POSIX_TMPFILE 1 #define GPR_POSIX_STRING 1 #define GPR_POSIX_SUBPROCESS 1 @@ -237,7 +233,6 @@ #define GPR_GCC_TLS 1 #define GPR_POSIX_LOG 1 #define GPR_POSIX_ENV 1 -#define GPR_POSIX_FILE 1 #define GPR_POSIX_TMPFILE 1 #define GPR_POSIX_STRING 1 #define GPR_POSIX_SUBPROCESS 1 @@ -267,7 +262,6 @@ #define GPR_GCC_TLS 1 #define GPR_POSIX_LOG 1 #define GPR_POSIX_ENV 1 -#define GPR_POSIX_FILE 1 #define GPR_POSIX_TMPFILE 1 #define GPR_POSIX_STRING 1 #define GPR_POSIX_SUBPROCESS 1 diff --git a/package.xml b/package.xml index 3d5a83dc79..dd59cfd330 100644 --- a/package.xml +++ b/package.xml @@ -460,8 +460,7 @@ - - + diff --git a/src/core/lib/security/credentials/google_default/credentials_generic.c b/src/core/lib/security/credentials/google_default/credentials_generic.c new file mode 100644 index 0000000000..02a6e9e9dd --- /dev/null +++ b/src/core/lib/security/credentials/google_default/credentials_generic.c @@ -0,0 +1,59 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include "src/core/lib/security/credentials/google_default/google_default_credentials.h" + +#ifdef GRPC_GOOGLE_CREDENTIALS_GENERIC + +#include +#include +#include + +#include "src/core/lib/support/env.h" +#include "src/core/lib/support/string.h" + +char *grpc_get_well_known_google_credentials_file_path_impl(void) { + char *result = NULL; + char *base = gpr_getenv(GRPC_GOOGLE_CREDENTIALS_PATH_ENV_VAR); + if (base == NULL) { + gpr_log(GPR_ERROR, "Could not get " GRPC_GOOGLE_CREDENTIALS_ENV_VAR + " environment variable."); + return NULL; + } + gpr_asprintf(&result, "%s/%s", base, + GRPC_GOOGLE_CREDENTIALS_PATH_SUFFIX); + gpr_free(base); + return result; +} + +#endif /* GRPC_GOOGLE_CREDENTIALS_GENERIC */ diff --git a/src/core/lib/security/credentials/google_default/credentials_posix.c b/src/core/lib/security/credentials/google_default/credentials_posix.c deleted file mode 100644 index 42c9d7f997..0000000000 --- a/src/core/lib/security/credentials/google_default/credentials_posix.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * - * 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. - * - */ - -#include - -#ifdef GPR_POSIX_FILE - -#include "src/core/lib/security/credentials/google_default/google_default_credentials.h" - -#include -#include -#include - -#include "src/core/lib/support/env.h" -#include "src/core/lib/support/string.h" - -char *grpc_get_well_known_google_credentials_file_path_impl(void) { - char *result = NULL; - char *home = gpr_getenv("HOME"); - if (home == NULL) { - gpr_log(GPR_ERROR, "Could not get HOME environment variable."); - return NULL; - } - gpr_asprintf(&result, "%s/.config/%s/%s", home, - GRPC_GOOGLE_CLOUD_SDK_CONFIG_DIRECTORY, - GRPC_GOOGLE_WELL_KNOWN_CREDENTIALS_FILE); - gpr_free(home); - return result; -} - -#endif /* GPR_POSIX_FILE */ diff --git a/src/core/lib/security/credentials/google_default/credentials_windows.c b/src/core/lib/security/credentials/google_default/credentials_windows.c deleted file mode 100644 index 208b8fd9ad..0000000000 --- a/src/core/lib/security/credentials/google_default/credentials_windows.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * - * 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. - * - */ - -#include - -#ifdef GPR_WINDOWS - -#include "src/core/lib/security/credentials/google_default/google_default_credentials.h" - -#include -#include -#include - -#include "src/core/lib/support/env.h" -#include "src/core/lib/support/string.h" - -char *grpc_get_well_known_google_credentials_file_path_impl(void) { - char *result = NULL; - char *appdata_path = gpr_getenv("APPDATA"); - if (appdata_path == NULL) { - gpr_log(GPR_ERROR, "Could not get APPDATA environment variable."); - return NULL; - } - gpr_asprintf(&result, "%s/%s/%s", appdata_path, - GRPC_GOOGLE_CLOUD_SDK_CONFIG_DIRECTORY, - GRPC_GOOGLE_WELL_KNOWN_CREDENTIALS_FILE); - gpr_free(appdata_path); - return result; -} - -#endif /* GPR_WINDOWS */ diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.h b/src/core/lib/security/credentials/google_default/google_default_credentials.h index fac4377e2c..bc816bcb77 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.h +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.h @@ -34,12 +34,24 @@ #ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_GOOGLE_DEFAULT_GOOGLE_DEFAULT_CREDENTIALS_H #define GRPC_CORE_LIB_SECURITY_CREDENTIALS_GOOGLE_DEFAULT_GOOGLE_DEFAULT_CREDENTIALS_H +#include + #include "src/core/lib/security/credentials/credentials.h" #define GRPC_GOOGLE_CLOUD_SDK_CONFIG_DIRECTORY "gcloud" #define GRPC_GOOGLE_WELL_KNOWN_CREDENTIALS_FILE \ "application_default_credentials.json" +#ifdef GPR_WINDOWS +#define GRPC_GOOGLE_CREDENTIALS_PATH_ENV_VAR "APPDATA" +#define GRPC_GOOGLE_CREDENTIALS_PATH_SUFFIX GRPC_GOOGLE_CLOUD_SDK_CONFIG_DIRECTORY "/" GRPC_GOOGLE_WELL_KNOWN_CREDENTIALS_FILE +#define GRPC_GOOGLE_CREDENTIALS_GENERIC 1 +#else +#define GRPC_GOOGLE_CREDENTIALS_PATH_ENV_VAR "HOME" +#define GRPC_GOOGLE_CREDENTIALS_PATH_SUFFIX ".config/" GRPC_GOOGLE_CLOUD_SDK_CONFIG_DIRECTORY "/" GRPC_GOOGLE_WELL_KNOWN_CREDENTIALS_FILE +#define GRPC_GOOGLE_CREDENTIALS_GENERIC 1 +#endif + void grpc_flush_cached_google_default_credentials(void); #endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_GOOGLE_DEFAULT_GOOGLE_DEFAULT_CREDENTIALS_H \ diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 78fa428903..ab7b461178 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -195,8 +195,7 @@ CORE_SOURCE_FILES = [ '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_posix.c', - 'src/core/lib/security/credentials/google_default/credentials_windows.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', diff --git a/test/core/security/credentials_test.c b/test/core/security/credentials_test.c index 7043953154..d4dd500580 100644 --- a/test/core/security/credentials_test.c +++ b/test/core/security/credentials_test.c @@ -1124,28 +1124,20 @@ static void test_metadata_plugin_failure(void) { } static void test_get_well_known_google_credentials_file_path(void) { -#ifdef GPR_POSIX_FILE char *path; - char *old_home = gpr_getenv("HOME"); - gpr_setenv("HOME", "/tmp"); + char *home = gpr_getenv("HOME"); + char *appdata = gpr_getenv("APPDATA"); path = grpc_get_well_known_google_credentials_file_path(); GPR_ASSERT(path != NULL); - GPR_ASSERT(0 == strcmp("/tmp/.config/" GRPC_GOOGLE_CLOUD_SDK_CONFIG_DIRECTORY - "/" GRPC_GOOGLE_WELL_KNOWN_CREDENTIALS_FILE, - path)); - gpr_free(path); -#if defined(GPR_POSIX_ENV) || defined(GPR_LINUX_ENV) unsetenv("HOME"); + unsetenv("APPDATA"); path = grpc_get_well_known_google_credentials_file_path(); GPR_ASSERT(path == NULL); -#endif /* GPR_POSIX_ENV || GPR_LINUX_ENV */ - gpr_setenv("HOME", old_home); - gpr_free(old_home); -#else /* GPR_POSIX_FILE */ - char *path = grpc_get_well_known_google_credentials_file_path(); - GPR_ASSERT(path != NULL); + gpr_setenv("HOME", home); + gpr_setenv("APPDATA", appdata); + gpr_free(home); + gpr_free(appdata); gpr_free(path); -#endif } int main(int argc, char **argv) { diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 8f2f011eaf..24c78091c7 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -1071,8 +1071,7 @@ 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_posix.c \ -src/core/lib/security/credentials/google_default/credentials_windows.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 \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 8c1cd249ba..534abdda09 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -6275,8 +6275,7 @@ "src/core/lib/security/credentials/credentials_metadata.c", "src/core/lib/security/credentials/fake/fake_credentials.c", "src/core/lib/security/credentials/fake/fake_credentials.h", - "src/core/lib/security/credentials/google_default/credentials_posix.c", - "src/core/lib/security/credentials/google_default/credentials_windows.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/google_default/google_default_credentials.h", "src/core/lib/security/credentials/iam/iam_credentials.c", diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 69ec3c0a08..d09c07d0cb 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -702,9 +702,7 @@ - - - + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index d72c32046a..d5ac3d4422 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -361,10 +361,7 @@ src\core\lib\security\credentials\fake - - src\core\lib\security\credentials\google_default - - + src\core\lib\security\credentials\google_default -- cgit v1.2.3 From 192293d64bc957e149539bd846c7f2e7cb0ca795 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 9 Aug 2016 10:24:22 -0700 Subject: Move GPR_MANYLINUX1 to top of port.h checks --- src/core/lib/iomgr/port.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/port.h b/src/core/lib/iomgr/port.h index 021bbfff5a..1cd0a29ee2 100644 --- a/src/core/lib/iomgr/port.h +++ b/src/core/lib/iomgr/port.h @@ -36,10 +36,7 @@ #ifndef GRPC_CORE_LIB_IOMGR_PORT_H #define GRPC_CORE_LIB_IOMGR_PORT_H -#if defined(GPR_WINDOWS) -#define GRPC_WINSOCK_SOCKET 1 -#define GRPC_WINDOWS_SOCKETUTILS 1 -#elif defined(GPR_MANYLINUX1) +#if defined(GPR_MANYLINUX1) #define GRPC_HAVE_IPV6_RECVPKTINFO 1 #define GRPC_HAVE_IP_PKTINFO 1 #define GRPC_HAVE_MSG_NOSIGNAL 1 @@ -49,6 +46,9 @@ #define GRPC_POSIX_SOCKETADDR 1 #define GRPC_POSIX_SOCKETUTILS 1 #define GRPC_POSIX_WAKEUP_FD 1 +#elif defined(GPR_WINDOWS) +#define GRPC_WINSOCK_SOCKET 1 +#define GRPC_WINDOWS_SOCKETUTILS 1 #elif defined(GPR_ANDROID) #define GRPC_HAVE_IPV6_RECVPKTINFO 1 #define GRPC_HAVE_IP_PKTINFO 1 -- cgit v1.2.3 From 3c2c6c15d9facefbb826c47136107ad7b0aaaa4c Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 9 Aug 2016 11:16:42 -0700 Subject: Fixed InetNtop function call --- src/core/lib/iomgr/socket_utils_windows.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/socket_utils_windows.c b/src/core/lib/iomgr/socket_utils_windows.c index 74dbd57c7d..17f43e4c87 100644 --- a/src/core/lib/iomgr/socket_utils_windows.c +++ b/src/core/lib/iomgr/socket_utils_windows.c @@ -42,7 +42,7 @@ const char *grpc_inet_ntop(int af, const void *src, char *dst, socklen_t size) { GPR_ASSERT(sizeof(socklen_t) <= sizeof(size_t)); - return InetNtop(af, src, dst, (size_t)size); + return InetNtopA(af, src, dst, (size_t)size); } #endif /* GRPC_WINDOWS_SOCKETUTILS */ -- cgit v1.2.3 From cb6ce70b5a580ece86746a7a48708134a1fd478b Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 9 Aug 2016 11:18:35 -0700 Subject: Fixed copyright year in new file --- src/core/lib/iomgr/socket_utils_windows.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/socket_utils_windows.c b/src/core/lib/iomgr/socket_utils_windows.c index 17f43e4c87..c65812fec6 100644 --- a/src/core/lib/iomgr/socket_utils_windows.c +++ b/src/core/lib/iomgr/socket_utils_windows.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without -- cgit v1.2.3 From 0b110dd28d7a03a8f28cdbd112baf5998369d893 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 9 Aug 2016 13:19:58 -0700 Subject: Changed grpc_inet_ntop signature to match Windows function --- src/core/lib/iomgr/socket_utils.h | 2 +- src/core/lib/iomgr/socket_utils_common_posix.c | 4 ++-- src/core/lib/iomgr/socket_utils_windows.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/socket_utils.h b/src/core/lib/iomgr/socket_utils.h index f0b5a33b63..79903571a0 100644 --- a/src/core/lib/iomgr/socket_utils.h +++ b/src/core/lib/iomgr/socket_utils.h @@ -43,7 +43,7 @@ #endif /* A wrapper for inet_ntop on POSIX systems and InetNtop on Windows systems */ -const char *grpc_inet_ntop(int af, const void *src, +const char *grpc_inet_ntop(int af, void *src, char *dst, socklen_t size); #endif /* GRPC_CORE_LIB_IOMGR_SOCKET_UTILS_H */ diff --git a/src/core/lib/iomgr/socket_utils_common_posix.c b/src/core/lib/iomgr/socket_utils_common_posix.c index 2143256846..42ee76d2fe 100644 --- a/src/core/lib/iomgr/socket_utils_common_posix.c +++ b/src/core/lib/iomgr/socket_utils_common_posix.c @@ -297,9 +297,9 @@ grpc_error *grpc_create_dualstack_socket(const struct sockaddr *addr, int type, return error_for_fd(*newfd, addr); } -const char *grpc_inet_ntop(int af, const void *src, +const char *grpc_inet_ntop(int af, void *src, char *dst, socklen_t size) { - return inet_ntop(af, src, dst, size); + return inet_ntop(af, (const void*)src, dst, size); } #endif diff --git a/src/core/lib/iomgr/socket_utils_windows.c b/src/core/lib/iomgr/socket_utils_windows.c index c65812fec6..c1dfc6e96f 100644 --- a/src/core/lib/iomgr/socket_utils_windows.c +++ b/src/core/lib/iomgr/socket_utils_windows.c @@ -39,7 +39,7 @@ #include -const char *grpc_inet_ntop(int af, const void *src, +const char *grpc_inet_ntop(int af, void *src, char *dst, socklen_t size) { GPR_ASSERT(sizeof(socklen_t) <= sizeof(size_t)); return InetNtopA(af, src, dst, (size_t)size); -- cgit v1.2.3 From 31963632dc048d18f31d63101c0e5a6636aa98d7 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 9 Aug 2016 14:00:41 -0700 Subject: Make usage of grpc_inet_ntop consistent --- src/core/lib/iomgr/sockaddr_utils.c | 4 ++-- src/core/lib/iomgr/socket_utils.h | 2 +- src/core/lib/iomgr/socket_utils_common_posix.c | 4 ++-- src/core/lib/iomgr/socket_utils_windows.c | 5 +++-- 4 files changed, 8 insertions(+), 7 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/sockaddr_utils.c b/src/core/lib/iomgr/sockaddr_utils.c index 127d95c618..7f8e6ea3c3 100644 --- a/src/core/lib/iomgr/sockaddr_utils.c +++ b/src/core/lib/iomgr/sockaddr_utils.c @@ -42,6 +42,7 @@ #include #include +#include "src/core/lib/iomgr/socket_utils.h" #include "src/core/lib/iomgr/unix_sockets_posix.h" #include "src/core/lib/support/string.h" @@ -155,9 +156,8 @@ int grpc_sockaddr_to_string(char **out, const struct sockaddr *addr, ip = &addr6->sin6_addr; port = ntohs(addr6->sin6_port); } - /* Windows inet_ntop wants a mutable ip pointer */ if (ip != NULL && - inet_ntop(addr->sa_family, (void *)ip, ntop_buf, sizeof(ntop_buf)) != + grpc_inet_ntop(addr->sa_family, ip, ntop_buf, sizeof(ntop_buf)) != NULL) { ret = gpr_join_host_port(out, ntop_buf, port); } else { diff --git a/src/core/lib/iomgr/socket_utils.h b/src/core/lib/iomgr/socket_utils.h index 79903571a0..f0b5a33b63 100644 --- a/src/core/lib/iomgr/socket_utils.h +++ b/src/core/lib/iomgr/socket_utils.h @@ -43,7 +43,7 @@ #endif /* A wrapper for inet_ntop on POSIX systems and InetNtop on Windows systems */ -const char *grpc_inet_ntop(int af, void *src, +const char *grpc_inet_ntop(int af, const void *src, char *dst, socklen_t size); #endif /* GRPC_CORE_LIB_IOMGR_SOCKET_UTILS_H */ diff --git a/src/core/lib/iomgr/socket_utils_common_posix.c b/src/core/lib/iomgr/socket_utils_common_posix.c index 42ee76d2fe..2143256846 100644 --- a/src/core/lib/iomgr/socket_utils_common_posix.c +++ b/src/core/lib/iomgr/socket_utils_common_posix.c @@ -297,9 +297,9 @@ grpc_error *grpc_create_dualstack_socket(const struct sockaddr *addr, int type, return error_for_fd(*newfd, addr); } -const char *grpc_inet_ntop(int af, void *src, +const char *grpc_inet_ntop(int af, const void *src, char *dst, socklen_t size) { - return inet_ntop(af, (const void*)src, dst, size); + return inet_ntop(af, src, dst, size); } #endif diff --git a/src/core/lib/iomgr/socket_utils_windows.c b/src/core/lib/iomgr/socket_utils_windows.c index c1dfc6e96f..41e53bd812 100644 --- a/src/core/lib/iomgr/socket_utils_windows.c +++ b/src/core/lib/iomgr/socket_utils_windows.c @@ -39,10 +39,11 @@ #include -const char *grpc_inet_ntop(int af, void *src, +const char *grpc_inet_ntop(int af, const void *src, char *dst, socklen_t size) { GPR_ASSERT(sizeof(socklen_t) <= sizeof(size_t)); - return InetNtopA(af, src, dst, (size_t)size); + /* Windows InetNtopA wants a mutable ip pointer */ + return InetNtopA(af, (void*)src, dst, (size_t)size); } #endif /* GRPC_WINDOWS_SOCKETUTILS */ -- cgit v1.2.3 From 7e924a0dd4dfc98c7ef00e79a651d28c56ca3907 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 10 Aug 2016 10:06:43 -0700 Subject: Clang format --- src/core/lib/iomgr/ev_epoll_linux.h | 2 +- src/core/lib/iomgr/pollset_set_windows.c | 2 +- src/core/lib/iomgr/port.h | 2 +- src/core/lib/iomgr/sockaddr_utils.c | 3 +-- src/core/lib/iomgr/socket_utils.h | 3 +-- src/core/lib/iomgr/socket_utils_common_posix.c | 3 +-- src/core/lib/iomgr/socket_utils_windows.c | 5 ++--- .../lib/security/credentials/google_default/credentials_generic.c | 5 ++--- .../credentials/google_default/google_default_credentials.h | 8 ++++++-- 9 files changed, 16 insertions(+), 17 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/ev_epoll_linux.h b/src/core/lib/iomgr/ev_epoll_linux.h index e6d5441236..8fc3ff59a3 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.h +++ b/src/core/lib/iomgr/ev_epoll_linux.h @@ -34,8 +34,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_EV_EPOLL_LINUX_H #define GRPC_CORE_LIB_IOMGR_EV_EPOLL_LINUX_H -#include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/ev_posix.h" +#include "src/core/lib/iomgr/port.h" const grpc_event_engine_vtable *grpc_init_epoll_linux(void); diff --git a/src/core/lib/iomgr/pollset_set_windows.c b/src/core/lib/iomgr/pollset_set_windows.c index 293893f18e..645650db9b 100644 --- a/src/core/lib/iomgr/pollset_set_windows.c +++ b/src/core/lib/iomgr/pollset_set_windows.c @@ -31,8 +31,8 @@ * */ -#include "src/core/lib/iomgr/port.h" #include +#include "src/core/lib/iomgr/port.h" #ifdef GRPC_WINSOCK_SOCKET diff --git a/src/core/lib/iomgr/port.h b/src/core/lib/iomgr/port.h index 1cd0a29ee2..e6f01802ed 100644 --- a/src/core/lib/iomgr/port.h +++ b/src/core/lib/iomgr/port.h @@ -119,4 +119,4 @@ #error Must define exactly one of GRPC_POSIX_SOCKET, GRPC_WINSOCK_SOCKET, GPR_CUSTOM_SOCKET #endif -#endif /* GRPC_CORE_LIB_IOMGR_PORT_H */ +#endif /* GRPC_CORE_LIB_IOMGR_PORT_H */ diff --git a/src/core/lib/iomgr/sockaddr_utils.c b/src/core/lib/iomgr/sockaddr_utils.c index 7f8e6ea3c3..ed1dac5622 100644 --- a/src/core/lib/iomgr/sockaddr_utils.c +++ b/src/core/lib/iomgr/sockaddr_utils.c @@ -157,8 +157,7 @@ int grpc_sockaddr_to_string(char **out, const struct sockaddr *addr, port = ntohs(addr6->sin6_port); } if (ip != NULL && - grpc_inet_ntop(addr->sa_family, ip, ntop_buf, sizeof(ntop_buf)) != - NULL) { + grpc_inet_ntop(addr->sa_family, ip, ntop_buf, sizeof(ntop_buf)) != NULL) { ret = gpr_join_host_port(out, ntop_buf, port); } else { ret = gpr_asprintf(out, "(sockaddr family=%d)", addr->sa_family); diff --git a/src/core/lib/iomgr/socket_utils.h b/src/core/lib/iomgr/socket_utils.h index f0b5a33b63..238061ea5a 100644 --- a/src/core/lib/iomgr/socket_utils.h +++ b/src/core/lib/iomgr/socket_utils.h @@ -43,7 +43,6 @@ #endif /* A wrapper for inet_ntop on POSIX systems and InetNtop on Windows systems */ -const char *grpc_inet_ntop(int af, const void *src, - char *dst, socklen_t size); +const char *grpc_inet_ntop(int af, const void *src, char *dst, socklen_t size); #endif /* GRPC_CORE_LIB_IOMGR_SOCKET_UTILS_H */ diff --git a/src/core/lib/iomgr/socket_utils_common_posix.c b/src/core/lib/iomgr/socket_utils_common_posix.c index 2143256846..aa844da078 100644 --- a/src/core/lib/iomgr/socket_utils_common_posix.c +++ b/src/core/lib/iomgr/socket_utils_common_posix.c @@ -297,8 +297,7 @@ grpc_error *grpc_create_dualstack_socket(const struct sockaddr *addr, int type, return error_for_fd(*newfd, addr); } -const char *grpc_inet_ntop(int af, const void *src, - char *dst, socklen_t size) { +const char *grpc_inet_ntop(int af, const void *src, char *dst, socklen_t size) { return inet_ntop(af, src, dst, size); } diff --git a/src/core/lib/iomgr/socket_utils_windows.c b/src/core/lib/iomgr/socket_utils_windows.c index 41e53bd812..09dabd7a73 100644 --- a/src/core/lib/iomgr/socket_utils_windows.c +++ b/src/core/lib/iomgr/socket_utils_windows.c @@ -39,11 +39,10 @@ #include -const char *grpc_inet_ntop(int af, const void *src, - char *dst, socklen_t size) { +const char *grpc_inet_ntop(int af, const void *src, char *dst, socklen_t size) { GPR_ASSERT(sizeof(socklen_t) <= sizeof(size_t)); /* Windows InetNtopA wants a mutable ip pointer */ - return InetNtopA(af, (void*)src, dst, (size_t)size); + return InetNtopA(af, (void *)src, dst, (size_t)size); } #endif /* GRPC_WINDOWS_SOCKETUTILS */ diff --git a/src/core/lib/security/credentials/google_default/credentials_generic.c b/src/core/lib/security/credentials/google_default/credentials_generic.c index 02a6e9e9dd..013e3b5451 100644 --- a/src/core/lib/security/credentials/google_default/credentials_generic.c +++ b/src/core/lib/security/credentials/google_default/credentials_generic.c @@ -47,11 +47,10 @@ char *grpc_get_well_known_google_credentials_file_path_impl(void) { char *base = gpr_getenv(GRPC_GOOGLE_CREDENTIALS_PATH_ENV_VAR); if (base == NULL) { gpr_log(GPR_ERROR, "Could not get " GRPC_GOOGLE_CREDENTIALS_ENV_VAR - " environment variable."); + " environment variable."); return NULL; } - gpr_asprintf(&result, "%s/%s", base, - GRPC_GOOGLE_CREDENTIALS_PATH_SUFFIX); + gpr_asprintf(&result, "%s/%s", base, GRPC_GOOGLE_CREDENTIALS_PATH_SUFFIX); gpr_free(base); return result; } diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.h b/src/core/lib/security/credentials/google_default/google_default_credentials.h index bc816bcb77..476e1839ca 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.h +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.h @@ -44,11 +44,15 @@ #ifdef GPR_WINDOWS #define GRPC_GOOGLE_CREDENTIALS_PATH_ENV_VAR "APPDATA" -#define GRPC_GOOGLE_CREDENTIALS_PATH_SUFFIX GRPC_GOOGLE_CLOUD_SDK_CONFIG_DIRECTORY "/" GRPC_GOOGLE_WELL_KNOWN_CREDENTIALS_FILE +#define GRPC_GOOGLE_CREDENTIALS_PATH_SUFFIX \ + GRPC_GOOGLE_CLOUD_SDK_CONFIG_DIRECTORY \ + "/" GRPC_GOOGLE_WELL_KNOWN_CREDENTIALS_FILE #define GRPC_GOOGLE_CREDENTIALS_GENERIC 1 #else #define GRPC_GOOGLE_CREDENTIALS_PATH_ENV_VAR "HOME" -#define GRPC_GOOGLE_CREDENTIALS_PATH_SUFFIX ".config/" GRPC_GOOGLE_CLOUD_SDK_CONFIG_DIRECTORY "/" GRPC_GOOGLE_WELL_KNOWN_CREDENTIALS_FILE +#define GRPC_GOOGLE_CREDENTIALS_PATH_SUFFIX \ + ".config/" GRPC_GOOGLE_CLOUD_SDK_CONFIG_DIRECTORY \ + "/" GRPC_GOOGLE_WELL_KNOWN_CREDENTIALS_FILE #define GRPC_GOOGLE_CREDENTIALS_GENERIC 1 #endif -- cgit v1.2.3 From 32ee4a66e2c66f58ba56976541fd6183e656dbf0 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 10 Aug 2016 10:56:35 -0700 Subject: Clang format again --- .../security/credentials/google_default/google_default_credentials.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/lib') diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.h b/src/core/lib/security/credentials/google_default/google_default_credentials.h index 476e1839ca..0a5a6605e5 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.h +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.h @@ -46,7 +46,7 @@ #define GRPC_GOOGLE_CREDENTIALS_PATH_ENV_VAR "APPDATA" #define GRPC_GOOGLE_CREDENTIALS_PATH_SUFFIX \ GRPC_GOOGLE_CLOUD_SDK_CONFIG_DIRECTORY \ - "/" GRPC_GOOGLE_WELL_KNOWN_CREDENTIALS_FILE + "/" GRPC_GOOGLE_WELL_KNOWN_CREDENTIALS_FILE #define GRPC_GOOGLE_CREDENTIALS_GENERIC 1 #else #define GRPC_GOOGLE_CREDENTIALS_PATH_ENV_VAR "HOME" -- cgit v1.2.3 From 2f320cac223d9b4c72e9e2d6eb8d194a6d73d4bf Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 10 Aug 2016 13:35:53 -0700 Subject: Fix some #include statements and add one dependency in build.yaml --- build.yaml | 2 ++ src/core/lib/iomgr/socket_utils.h | 4 ++-- tools/run_tests/sources_and_headers.json | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src/core/lib') diff --git a/build.yaml b/build.yaml index e3afcd643b..72e48c0ec8 100644 --- a/build.yaml +++ b/build.yaml @@ -642,6 +642,8 @@ filegroups: deps: - gpr secure: true + uses: + - grpc_base - name: grpc++_base language: c++ public_headers: diff --git a/src/core/lib/iomgr/socket_utils.h b/src/core/lib/iomgr/socket_utils.h index 238061ea5a..6ce9a6859c 100644 --- a/src/core/lib/iomgr/socket_utils.h +++ b/src/core/lib/iomgr/socket_utils.h @@ -37,9 +37,9 @@ #include "src/core/lib/iomgr/port.h" #ifdef GRPC_WINSOCK_SOCKET -#include "sockaddr_windows.h" +#include "src/core/lib/iomgr/sockaddr_windows.h" #else -#include "sockaddr_posix.h" +#include "src/core/lib/iomgr/sockaddr_posix.h" #endif /* A wrapper for inet_ntop on POSIX systems and InetNtop on Windows systems */ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 534abdda09..3b337d0c35 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -6558,7 +6558,8 @@ }, { "deps": [ - "gpr" + "gpr", + "grpc_base" ], "headers": [ "src/core/lib/tsi/fake_transport_security.h", -- cgit v1.2.3 From 8e21465a76b1b806237c66775c5d485da4d739ad Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 19 Aug 2016 09:54:31 -0700 Subject: Make failure to initialize a filter cause the server to silently swallow that request --- src/core/lib/surface/call.c | 97 +++++++++++++++++++++--------------------- src/core/lib/surface/call.h | 32 ++++++++++---- src/core/lib/surface/channel.c | 18 ++++++-- src/core/lib/surface/server.c | 15 +++++-- 4 files changed, 99 insertions(+), 63 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 119f5e82ab..ae9424256c 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -230,33 +230,33 @@ static void destroy_call(grpc_exec_ctx *exec_ctx, void *call_stack, static void receiving_slice_ready(grpc_exec_ctx *exec_ctx, void *bctlp, grpc_error *error); -grpc_call *grpc_call_create( - grpc_channel *channel, grpc_call *parent_call, uint32_t propagation_mask, - grpc_completion_queue *cq, grpc_pollset_set *pollset_set_alternative, - const void *server_transport_data, grpc_mdelem **add_initial_metadata, - size_t add_initial_metadata_count, gpr_timespec send_deadline) { +grpc_error *grpc_call_create(const grpc_call_create_args *args, + grpc_call **out_call) { size_t i, j; - grpc_channel_stack *channel_stack = grpc_channel_get_channel_stack(channel); + grpc_channel_stack *channel_stack = + grpc_channel_get_channel_stack(args->channel); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_call *call; GPR_TIMER_BEGIN("grpc_call_create", 0); - call = gpr_malloc(sizeof(grpc_call) + channel_stack->call_stack_size); + *out_call = call = + gpr_malloc(sizeof(grpc_call) + channel_stack->call_stack_size); memset(call, 0, sizeof(grpc_call)); gpr_mu_init(&call->mu); - call->channel = channel; - call->cq = cq; - call->parent = parent_call; + call->channel = args->channel; + call->cq = args->cq; + call->parent = args->parent_call; /* Always support no compression */ GPR_BITSET(&call->encodings_accepted_by_peer, GRPC_COMPRESS_NONE); - call->is_client = server_transport_data == NULL; + call->is_client = args->server_transport_data == NULL; if (call->is_client) { - GPR_ASSERT(add_initial_metadata_count < MAX_SEND_EXTRA_METADATA_COUNT); - for (i = 0; i < add_initial_metadata_count; i++) { - call->send_extra_metadata[i].md = add_initial_metadata[i]; + GPR_ASSERT(args->add_initial_metadata_count < + MAX_SEND_EXTRA_METADATA_COUNT); + for (i = 0; i < args->add_initial_metadata_count; i++) { + call->send_extra_metadata[i].md = args->add_initial_metadata[i]; } - call->send_extra_metadata_count = (int)add_initial_metadata_count; + call->send_extra_metadata_count = (int)args->add_initial_metadata_count; } else { - GPR_ASSERT(add_initial_metadata_count == 0); + GPR_ASSERT(args->add_initial_metadata_count == 0); call->send_extra_metadata_count = 0; } for (i = 0; i < 2; i++) { @@ -265,78 +265,79 @@ grpc_call *grpc_call_create( } } call->send_deadline = - gpr_convert_clock_type(send_deadline, GPR_CLOCK_MONOTONIC); - GRPC_CHANNEL_INTERNAL_REF(channel, "call"); + gpr_convert_clock_type(args->send_deadline, GPR_CLOCK_MONOTONIC); + GRPC_CHANNEL_INTERNAL_REF(args->channel, "call"); /* initial refcount dropped by grpc_call_destroy */ grpc_error *error = grpc_call_stack_init( &exec_ctx, channel_stack, 1, destroy_call, call, call->context, - server_transport_data, CALL_STACK_FROM_CALL(call)); + args->server_transport_data, CALL_STACK_FROM_CALL(call)); if (error != GRPC_ERROR_NONE) { intptr_t status; - if (!grpc_error_get_int(error, GRPC_ERROR_INT_GRPC_STATUS, &status)) + if (!grpc_error_get_int(error, GRPC_ERROR_INT_GRPC_STATUS, &status)) { status = GRPC_STATUS_UNKNOWN; + } const char *error_str = grpc_error_get_str(error, GRPC_ERROR_STR_DESCRIPTION); close_with_status(&exec_ctx, call, (grpc_status_code)status, error_str == NULL ? "unknown error" : error_str); - GRPC_ERROR_UNREF(error); } - if (cq != NULL) { + if (args->cq != NULL) { GPR_ASSERT( - pollset_set_alternative == NULL && + args->pollset_set_alternative == NULL && "Only one of 'cq' and 'pollset_set_alternative' should be non-NULL."); - GRPC_CQ_INTERNAL_REF(cq, "bind"); + GRPC_CQ_INTERNAL_REF(args->cq, "bind"); call->pollent = - grpc_polling_entity_create_from_pollset(grpc_cq_pollset(cq)); + grpc_polling_entity_create_from_pollset(grpc_cq_pollset(args->cq)); } - if (pollset_set_alternative != NULL) { - call->pollent = - grpc_polling_entity_create_from_pollset_set(pollset_set_alternative); + if (args->pollset_set_alternative != NULL) { + call->pollent = grpc_polling_entity_create_from_pollset_set( + args->pollset_set_alternative); } if (!grpc_polling_entity_is_empty(&call->pollent)) { grpc_call_stack_set_pollset_or_pollset_set( &exec_ctx, CALL_STACK_FROM_CALL(call), &call->pollent); } - if (parent_call != NULL) { - GRPC_CALL_INTERNAL_REF(parent_call, "child"); + gpr_timespec send_deadline = args->send_deadline; + if (args->parent_call != NULL) { + GRPC_CALL_INTERNAL_REF(args->parent_call, "child"); GPR_ASSERT(call->is_client); - GPR_ASSERT(!parent_call->is_client); + GPR_ASSERT(!args->parent_call->is_client); - gpr_mu_lock(&parent_call->mu); + gpr_mu_lock(&args->parent_call->mu); - if (propagation_mask & GRPC_PROPAGATE_DEADLINE) { + if (args->propagation_mask & GRPC_PROPAGATE_DEADLINE) { send_deadline = gpr_time_min( gpr_convert_clock_type(send_deadline, - parent_call->send_deadline.clock_type), - parent_call->send_deadline); + args->parent_call->send_deadline.clock_type), + args->parent_call->send_deadline); } /* for now GRPC_PROPAGATE_TRACING_CONTEXT *MUST* be passed with * GRPC_PROPAGATE_STATS_CONTEXT */ /* TODO(ctiller): This should change to use the appropriate census start_op * call. */ - if (propagation_mask & GRPC_PROPAGATE_CENSUS_TRACING_CONTEXT) { - GPR_ASSERT(propagation_mask & GRPC_PROPAGATE_CENSUS_STATS_CONTEXT); - grpc_call_context_set(call, GRPC_CONTEXT_TRACING, - parent_call->context[GRPC_CONTEXT_TRACING].value, - NULL); + if (args->propagation_mask & GRPC_PROPAGATE_CENSUS_TRACING_CONTEXT) { + GPR_ASSERT(args->propagation_mask & GRPC_PROPAGATE_CENSUS_STATS_CONTEXT); + grpc_call_context_set( + call, GRPC_CONTEXT_TRACING, + args->parent_call->context[GRPC_CONTEXT_TRACING].value, NULL); } else { - GPR_ASSERT(propagation_mask & GRPC_PROPAGATE_CENSUS_STATS_CONTEXT); + GPR_ASSERT(args->propagation_mask & GRPC_PROPAGATE_CENSUS_STATS_CONTEXT); } - if (propagation_mask & GRPC_PROPAGATE_CANCELLATION) { + if (args->propagation_mask & GRPC_PROPAGATE_CANCELLATION) { call->cancellation_is_inherited = 1; } - if (parent_call->first_child == NULL) { - parent_call->first_child = call; + if (args->parent_call->first_child == NULL) { + args->parent_call->first_child = call; call->sibling_next = call->sibling_prev = call; } else { - call->sibling_next = parent_call->first_child; - call->sibling_prev = parent_call->first_child->sibling_prev; + call->sibling_next = args->parent_call->first_child; + call->sibling_prev = args->parent_call->first_child->sibling_prev; call->sibling_next->sibling_prev = call->sibling_prev->sibling_next = call; } - gpr_mu_unlock(&parent_call->mu); + gpr_mu_unlock(&args->parent_call->mu); } if (gpr_time_cmp(send_deadline, gpr_inf_future(send_deadline.clock_type)) != 0) { @@ -344,7 +345,7 @@ grpc_call *grpc_call_create( } grpc_exec_ctx_finish(&exec_ctx); GPR_TIMER_END("grpc_call_create", 0); - return call; + return error; } void grpc_call_set_completion_queue(grpc_exec_ctx *exec_ctx, grpc_call *call, diff --git a/src/core/lib/surface/call.h b/src/core/lib/surface/call.h index 3a78fe3aa3..18af41b7fb 100644 --- a/src/core/lib/surface/call.h +++ b/src/core/lib/surface/call.h @@ -49,15 +49,29 @@ typedef void (*grpc_ioreq_completion_func)(grpc_exec_ctx *exec_ctx, grpc_call *call, int success, void *user_data); -grpc_call *grpc_call_create(grpc_channel *channel, grpc_call *parent_call, - uint32_t propagation_mask, - grpc_completion_queue *cq, - /* if not NULL, it'll be used in lieu of \a cq */ - grpc_pollset_set *pollset_set_alternative, - const void *server_transport_data, - grpc_mdelem **add_initial_metadata, - size_t add_initial_metadata_count, - gpr_timespec send_deadline); +typedef struct grpc_call_create_args { + grpc_channel *channel; + + grpc_call *parent_call; + uint32_t propagation_mask; + + grpc_completion_queue *cq; + /* if not NULL, it'll be used in lieu of cq */ + grpc_pollset_set *pollset_set_alternative; + + const void *server_transport_data; + + grpc_mdelem **add_initial_metadata; + size_t add_initial_metadata_count; + + gpr_timespec send_deadline; +} grpc_call_create_args; + +/* Create a new call based on \a args. + Regardless of success or failure, always returns a valid new call into *call + */ +grpc_error *grpc_call_create(const grpc_call_create_args *args, + grpc_call **call); void grpc_call_set_completion_queue(grpc_exec_ctx *exec_ctx, grpc_call *call, grpc_completion_queue *cq); diff --git a/src/core/lib/surface/channel.c b/src/core/lib/surface/channel.c index 52e78567bd..aa8c052b41 100644 --- a/src/core/lib/surface/channel.c +++ b/src/core/lib/surface/channel.c @@ -208,9 +208,21 @@ static grpc_call *grpc_channel_create_call_internal( send_metadata[num_metadata++] = GRPC_MDELEM_REF(channel->default_authority); } - return grpc_call_create(channel, parent_call, propagation_mask, cq, - pollset_set_alternative, NULL, send_metadata, - num_metadata, deadline); + grpc_call_create_args args; + memset(&args, 0, sizeof(args)); + args.channel = channel; + args.parent_call = parent_call; + args.propagation_mask = propagation_mask; + args.cq = cq; + args.pollset_set_alternative = pollset_set_alternative; + args.server_transport_data = NULL; + args.add_initial_metadata = send_metadata; + args.add_initial_metadata_count = num_metadata; + args.send_deadline = deadline; + + grpc_call *call; + GRPC_LOG_IF_ERROR("call_create", grpc_call_create(&args, &call)); + return call; } grpc_call *grpc_channel_create_call(grpc_channel *channel, diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index 0827a1e181..fa48764a1c 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -824,11 +824,20 @@ static void accept_stream(grpc_exec_ctx *exec_ctx, void *cd, const void *transport_server_data) { channel_data *chand = cd; /* create a call */ - grpc_call *call = grpc_call_create(chand->channel, NULL, 0, NULL, NULL, - transport_server_data, NULL, 0, - gpr_inf_future(GPR_CLOCK_MONOTONIC)); + grpc_call_create_args args; + memset(&args, 0, sizeof(args)); + args.channel = chand->channel; + args.server_transport_data = transport_server_data; + args.send_deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC); + grpc_call *call; + grpc_error *error = grpc_call_create(&args, &call); grpc_call_element *elem = grpc_call_stack_element(grpc_call_get_call_stack(call), 0); + if (error != GRPC_ERROR_NONE) { + got_initial_metadata(exec_ctx, elem, error); + GRPC_ERROR_UNREF(error); + return; + } call_data *calld = elem->call_data; grpc_op op; memset(&op, 0, sizeof(op)); -- cgit v1.2.3 From 13e4bf8e6a1ef4b1a952c449b576f6c0f7e127b0 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 19 Aug 2016 10:24:34 -0700 Subject: Simplifications --- src/core/ext/client_config/subchannel.c | 4 +- .../transport/chttp2/transport/chttp2_transport.c | 51 +++------------------- src/core/ext/transport/chttp2/transport/internal.h | 15 ------- .../ext/transport/chttp2/transport/stream_lists.c | 20 --------- src/core/lib/iomgr/error.c | 2 +- src/core/lib/transport/transport.c | 10 +++-- src/core/lib/transport/transport.h | 2 +- 7 files changed, 16 insertions(+), 88 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/client_config/subchannel.c b/src/core/ext/client_config/subchannel.c index 2c4364b259..e622862fc9 100644 --- a/src/core/ext/client_config/subchannel.c +++ b/src/core/ext/client_config/subchannel.c @@ -219,8 +219,8 @@ static gpr_atm ref_mutate(grpc_subchannel *c, gpr_atm delta, : gpr_atm_no_barrier_fetch_add(&c->ref_pair, delta); #ifdef GRPC_STREAM_REFCOUNT_DEBUG gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, - "SUBCHANNEL: %p % 12s 0x%08x -> 0x%08x [%s]", c, purpose, old_val, - old_val + delta, reason); + "SUBCHANNEL: %p %s 0x%08" PRIxPTR " -> 0x%08" PRIxPTR " [%s]", c, + purpose, old_val, old_val + delta, reason); #endif return old_val; } diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 0be00a78d4..82c040b186 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -501,7 +501,6 @@ static int init_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, REF_TRANSPORT(t, "stream"); if (server_data) { - GPR_ASSERT(t->executor.parsing_active); s->global.id = (uint32_t)(uintptr_t)server_data; s->global.outgoing_window = t->global.settings[GRPC_PEER_SETTINGS] @@ -540,7 +539,7 @@ static void destroy_stream_locked(grpc_exec_ctx *exec_ctx, void *sp, exec_ctx, t, GRPC_ERROR_CREATE("Last stream closed after sending goaway")); } - if (!t->executor.parsing_active && s->global.id) { + if (s->global.id != 0) { GPR_ASSERT(grpc_chttp2_stream_map_find(&t->parsing_stream_map, s->global.id) == NULL); } @@ -1246,15 +1245,6 @@ static void perform_transport_op_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t = op->transport_private.args[0]; grpc_error *close_transport = op->disconnect_with_error; - /* If there's a set_accept_stream ensure that we're not parsing - to avoid changing things out from underneath */ - if (t->executor.parsing_active && op->set_accept_stream) { - GPR_ASSERT(t->post_parsing_op == NULL); - t->post_parsing_op = gpr_malloc(sizeof(*op)); - memcpy(t->post_parsing_op, op, sizeof(*op)); - return; - } - if (op->on_connectivity_state_change != NULL) { grpc_connectivity_state_notify_on_state_change( exec_ctx, &t->channel_callback.state_tracker, op->connectivity_state, @@ -1627,18 +1617,12 @@ void grpc_chttp2_mark_stream_closed( } } if (stream_global->read_closed && stream_global->write_closed) { - if (stream_global->id != 0 && - TRANSPORT_FROM_GLOBAL(transport_global)->executor.parsing_active) { - grpc_chttp2_list_add_closed_waiting_for_parsing(transport_global, - stream_global); - } else { - if (stream_global->id != 0) { - remove_stream(exec_ctx, TRANSPORT_FROM_GLOBAL(transport_global), - stream_global->id, - removal_error(GRPC_ERROR_REF(error), stream_global)); - } - GRPC_CHTTP2_STREAM_UNREF(exec_ctx, stream_global, "chttp2"); + if (stream_global->id != 0) { + remove_stream(exec_ctx, TRANSPORT_FROM_GLOBAL(transport_global), + stream_global->id, + removal_error(GRPC_ERROR_REF(error), stream_global)); } + GRPC_CHTTP2_STREAM_UNREF(exec_ctx, stream_global, "chttp2"); } GRPC_ERROR_UNREF(error); } @@ -1874,9 +1858,7 @@ static void reading_action_locked(grpc_exec_ctx *exec_ctx, void *tp, GRPC_ERROR_REF(error); - GPR_ASSERT(!t->executor.parsing_active); if (!t->closed) { - t->executor.parsing_active = 1; /* merge stream lists */ grpc_chttp2_stream_map_move_into(&t->new_stream_map, &t->parsing_stream_map); @@ -1919,27 +1901,6 @@ static void reading_action_locked(grpc_exec_ctx *exec_ctx, void *tp, grpc_chttp2_initiate_write(exec_ctx, transport_global, false, "global incoming window"); } - t->executor.parsing_active = 0; - /* handle delayed transport ops (if there is one) */ - if (t->post_parsing_op) { - grpc_transport_op *op = t->post_parsing_op; - t->post_parsing_op = NULL; - perform_transport_op_locked(exec_ctx, op, GRPC_ERROR_NONE); - gpr_free(op); - } - /* if a stream is in the stream map, and gets cancelled, we need to - * ensure we are not parsing before continuing the cancellation to keep - * things in a sane state */ - grpc_chttp2_stream_global *stream_global; - while (grpc_chttp2_list_pop_closed_waiting_for_parsing(transport_global, - &stream_global)) { - GPR_ASSERT(stream_global->in_stream_map); - GPR_ASSERT(stream_global->write_closed); - GPR_ASSERT(stream_global->read_closed); - remove_stream(exec_ctx, t, stream_global->id, - removal_error(GRPC_ERROR_NONE, stream_global)); - GRPC_CHTTP2_STREAM_UNREF(exec_ctx, stream_global, "chttp2"); - } GPR_TIMER_END("post_parse_locked", 0); } diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 517b21c5d3..da90464400 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -64,7 +64,6 @@ typedef enum { GRPC_CHTTP2_LIST_WRITABLE, GRPC_CHTTP2_LIST_WRITING, GRPC_CHTTP2_LIST_WRITTEN, - GRPC_CHTTP2_LIST_CLOSED_WAITING_FOR_PARSING, GRPC_CHTTP2_LIST_CLOSED_WAITING_FOR_WRITING, GRPC_CHTTP2_LIST_STALLED_BY_TRANSPORT, /* streams waiting for the outgoing window in the writing path, they will be @@ -308,10 +307,6 @@ struct grpc_chttp2_transport { struct { grpc_combiner *combiner; - /** is a thread currently in the global lock */ - bool global_active; - /** is a thread currently parsing */ - bool parsing_active; /** write execution state of the transport */ grpc_chttp2_write_state write_state; /** has a check_read_ops been scheduled */ @@ -374,9 +369,6 @@ struct grpc_chttp2_transport { /** connectivity tracking */ grpc_connectivity_state_tracker state_tracker; } channel_callback; - - /** Transport op to be applied post-parsing */ - grpc_transport_op *post_parsing_op; }; struct grpc_chttp2_stream_global { @@ -602,13 +594,6 @@ void grpc_chttp2_list_remove_stalled_by_transport( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global); -void grpc_chttp2_list_add_closed_waiting_for_parsing( - grpc_chttp2_transport_global *transport_global, - grpc_chttp2_stream_global *stream_global); -int grpc_chttp2_list_pop_closed_waiting_for_parsing( - grpc_chttp2_transport_global *transport_global, - grpc_chttp2_stream_global **stream_global); - void grpc_chttp2_list_add_closed_waiting_for_writing( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global); diff --git a/src/core/ext/transport/chttp2/transport/stream_lists.c b/src/core/ext/transport/chttp2/transport/stream_lists.c index 7c31466c80..0805551b64 100644 --- a/src/core/ext/transport/chttp2/transport/stream_lists.c +++ b/src/core/ext/transport/chttp2/transport/stream_lists.c @@ -334,26 +334,6 @@ void grpc_chttp2_list_remove_stalled_by_transport( GRPC_CHTTP2_LIST_STALLED_BY_TRANSPORT); } -void grpc_chttp2_list_add_closed_waiting_for_parsing( - grpc_chttp2_transport_global *transport_global, - grpc_chttp2_stream_global *stream_global) { - stream_list_add(TRANSPORT_FROM_GLOBAL(transport_global), - STREAM_FROM_GLOBAL(stream_global), - GRPC_CHTTP2_LIST_CLOSED_WAITING_FOR_PARSING); -} - -int grpc_chttp2_list_pop_closed_waiting_for_parsing( - grpc_chttp2_transport_global *transport_global, - grpc_chttp2_stream_global **stream_global) { - grpc_chttp2_stream *stream; - int r = stream_list_pop(TRANSPORT_FROM_GLOBAL(transport_global), &stream, - GRPC_CHTTP2_LIST_CLOSED_WAITING_FOR_PARSING); - if (r != 0) { - *stream_global = &stream->global; - } - return r; -} - void grpc_chttp2_list_add_closed_waiting_for_writing( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global) { diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c index e366961936..45ef75e04d 100644 --- a/src/core/lib/iomgr/error.c +++ b/src/core/lib/iomgr/error.c @@ -265,7 +265,7 @@ static grpc_error *copy_error_and_unref(grpc_error *in) { } else { out = gpr_malloc(sizeof(*out)); #ifdef GRPC_ERROR_REFCOUNT_DEBUG - gpr_log(GPR_DEBUG, "%p create copying", out); + gpr_log(GPR_DEBUG, "%p create copying %p", out, in); #endif out->ints = gpr_avl_ref(in->ints); out->strs = gpr_avl_ref(in->strs); diff --git a/src/core/lib/transport/transport.c b/src/core/lib/transport/transport.c index 08f9d7e8d9..a78ad4349a 100644 --- a/src/core/lib/transport/transport.c +++ b/src/core/lib/transport/transport.c @@ -46,8 +46,9 @@ #ifdef GRPC_STREAM_REFCOUNT_DEBUG void grpc_stream_ref(grpc_stream_refcount *refcount, const char *reason) { gpr_atm val = gpr_atm_no_barrier_load(&refcount->refs.count); - gpr_log(GPR_DEBUG, "%s %p:%p REF %d->%d %s", refcount->object_type, - refcount, refcount->destroy.cb_arg, val, val + 1, reason); + gpr_log(GPR_DEBUG, "%s %p:%p REF %" PRIdPTR "->%" PRIdPTR " %s", + refcount->object_type, refcount, refcount->destroy.cb_arg, val, + val + 1, reason); #else void grpc_stream_ref(grpc_stream_refcount *refcount) { #endif @@ -58,8 +59,9 @@ void grpc_stream_ref(grpc_stream_refcount *refcount) { void grpc_stream_unref(grpc_exec_ctx *exec_ctx, grpc_stream_refcount *refcount, const char *reason) { gpr_atm val = gpr_atm_no_barrier_load(&refcount->refs.count); - gpr_log(GPR_DEBUG, "%s %p:%p UNREF %d->%d %s", refcount->object_type, - refcount, refcount->destroy.cb_arg, val, val - 1, reason); + gpr_log(GPR_DEBUG, "%s %p:%p UNREF %" PRIdPTR "->%" PRIdPTR " %s", + refcount->object_type, refcount, refcount->destroy.cb_arg, val, + val - 1, reason); #else void grpc_stream_unref(grpc_exec_ctx *exec_ctx, grpc_stream_refcount *refcount) { diff --git a/src/core/lib/transport/transport.h b/src/core/lib/transport/transport.h index d0d0c2a461..392a7ca422 100644 --- a/src/core/lib/transport/transport.h +++ b/src/core/lib/transport/transport.h @@ -55,7 +55,7 @@ typedef struct grpc_transport grpc_transport; for a stream. */ typedef struct grpc_stream grpc_stream; -//#define GRPC_STREAM_REFCOUNT_DEBUG +#define GRPC_STREAM_REFCOUNT_DEBUG typedef struct grpc_stream_refcount { gpr_refcount refs; -- cgit v1.2.3 From f0e1119996b549dcb5e3013f805cd2cd066ed2c9 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 19 Aug 2016 11:32:28 -0700 Subject: Fix refcounting bugs --- src/core/ext/transport/chttp2/transport/frame_data.c | 1 + src/core/ext/transport/chttp2/transport/parsing.c | 2 +- src/core/lib/iomgr/error.h | 2 +- src/core/lib/transport/transport.h | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/transport/chttp2/transport/frame_data.c b/src/core/ext/transport/chttp2/transport/frame_data.c index 18e55b2916..388a5aba2b 100644 --- a/src/core/ext/transport/chttp2/transport/frame_data.c +++ b/src/core/ext/transport/chttp2/transport/frame_data.c @@ -56,6 +56,7 @@ void grpc_chttp2_data_parser_destroy(grpc_exec_ctx *exec_ctx, exec_ctx, parser->parsing_frame, GRPC_ERROR_CREATE("Parser destroyed"), 1); } + GRPC_ERROR_UNREF(parser->error); } grpc_error *grpc_chttp2_data_parser_begin_frame(grpc_chttp2_data_parser *parser, diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index ee01d3beb7..4d9e25d985 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -444,7 +444,7 @@ static grpc_error *init_data_frame_parser( } else if (grpc_error_get_int(err, GRPC_ERROR_INT_STREAM_ID, NULL)) { /* handle stream errors by closing the stream */ grpc_chttp2_mark_stream_closed(exec_ctx, transport_global, stream_global, - true, false, GRPC_ERROR_REF(err)); + true, false, err); gpr_slice_buffer_add( &transport_global->qbuf, grpc_chttp2_rst_stream_create(transport_global->incoming_stream_id, diff --git a/src/core/lib/iomgr/error.h b/src/core/lib/iomgr/error.h index bc7781250e..e02b12f2f4 100644 --- a/src/core/lib/iomgr/error.h +++ b/src/core/lib/iomgr/error.h @@ -148,7 +148,7 @@ grpc_error *grpc_error_create(const char *file, int line, const char *desc, #define GRPC_ERROR_CREATE_REFERENCING(desc, errs, count) \ grpc_error_create(__FILE__, __LINE__, desc, errs, count) -//#define GRPC_ERROR_REFCOUNT_DEBUG +#define GRPC_ERROR_REFCOUNT_DEBUG #ifdef GRPC_ERROR_REFCOUNT_DEBUG grpc_error *grpc_error_ref(grpc_error *err, const char *file, int line, const char *func); diff --git a/src/core/lib/transport/transport.h b/src/core/lib/transport/transport.h index 392a7ca422..d0d0c2a461 100644 --- a/src/core/lib/transport/transport.h +++ b/src/core/lib/transport/transport.h @@ -55,7 +55,7 @@ typedef struct grpc_transport grpc_transport; for a stream. */ typedef struct grpc_stream grpc_stream; -#define GRPC_STREAM_REFCOUNT_DEBUG +//#define GRPC_STREAM_REFCOUNT_DEBUG typedef struct grpc_stream_refcount { gpr_refcount refs; -- cgit v1.2.3 From 4e41e360d31e71b933e0f8fadfc8995d3d01f8db Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 19 Aug 2016 13:12:54 -0700 Subject: Add tracer for pending tags --- src/core/lib/iomgr/error.h | 2 +- src/core/lib/surface/completion_queue.c | 31 +++++++++++++++++++++++++++++++ src/core/lib/surface/completion_queue.h | 3 +++ src/core/lib/surface/init.c | 3 +++ 4 files changed, 38 insertions(+), 1 deletion(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/error.h b/src/core/lib/iomgr/error.h index e02b12f2f4..bc7781250e 100644 --- a/src/core/lib/iomgr/error.h +++ b/src/core/lib/iomgr/error.h @@ -148,7 +148,7 @@ grpc_error *grpc_error_create(const char *file, int line, const char *desc, #define GRPC_ERROR_CREATE_REFERENCING(desc, errs, count) \ grpc_error_create(__FILE__, __LINE__, desc, errs, count) -#define GRPC_ERROR_REFCOUNT_DEBUG +//#define GRPC_ERROR_REFCOUNT_DEBUG #ifdef GRPC_ERROR_REFCOUNT_DEBUG grpc_error *grpc_error_ref(grpc_error *err, const char *file, int line, const char *func); diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c index 2412f78a06..5654b86d8b 100644 --- a/src/core/lib/surface/completion_queue.c +++ b/src/core/lib/surface/completion_queue.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include "src/core/lib/iomgr/pollset.h" @@ -50,6 +51,9 @@ #include "src/core/lib/surface/event_string.h" int grpc_trace_operation_failures; +#ifndef NDEBUG +int grpc_trace_pending_tags; +#endif typedef struct { grpc_pollset_worker **worker; @@ -338,6 +342,25 @@ static bool cq_is_next_finished(grpc_exec_ctx *exec_ctx, void *arg) { return gpr_time_cmp(a->deadline, gpr_now(a->deadline.clock_type)) < 0; } +#ifndef NDEBUG +static void dump_pending_tags(grpc_completion_queue *cc) { + if (!grpc_trace_pending_tags) return; + + gpr_strvec v; + gpr_strvec_init(&v); + gpr_strvec_add(&v, gpr_strdup("PENDING TAGS:")); + for (size_t i = 0; i < cc->outstanding_tag_count; i++) { + char *s; + gpr_asprintf(&s, " %p", cc->outstanding_tags[i]); + gpr_strvec_add(&v, s); + } + char *out = gpr_strvec_flatten(&v, NULL); + gpr_strvec_destroy(&v); + gpr_log(GPR_DEBUG, "%s", out); + gpr_free(out); +} +#endif + grpc_event grpc_completion_queue_next(grpc_completion_queue *cc, gpr_timespec deadline, void *reserved) { grpc_event ret; @@ -357,6 +380,10 @@ grpc_event grpc_completion_queue_next(grpc_completion_queue *cc, reserved)); GPR_ASSERT(!reserved); +#ifndef NDEBUG + dump_pending_tags(cc); +#endif + deadline = gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC); cq_is_finished_arg is_finished_arg = {cc, deadline, NULL, NULL}; @@ -510,6 +537,10 @@ grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag, } GPR_ASSERT(!reserved); +#ifndef NDEBUG + dump_pending_tags(cc); +#endif + deadline = gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC); cq_is_finished_arg is_finished_arg = {cc, deadline, NULL, tag}; diff --git a/src/core/lib/surface/completion_queue.h b/src/core/lib/surface/completion_queue.h index 3049284f68..e9d840df77 100644 --- a/src/core/lib/surface/completion_queue.h +++ b/src/core/lib/surface/completion_queue.h @@ -44,6 +44,9 @@ extern int grpc_cq_pluck_trace; extern int grpc_cq_event_timeout_trace; extern int grpc_trace_operation_failures; +#ifndef NDEBUG +extern int grpc_trace_pending_tags; +#endif typedef struct grpc_cq_completion { /** user supplied tag */ diff --git a/src/core/lib/surface/init.c b/src/core/lib/surface/init.c index edda0c85fa..ac111253ef 100644 --- a/src/core/lib/surface/init.c +++ b/src/core/lib/surface/init.c @@ -173,6 +173,9 @@ void grpc_init(void) { // Default timeout trace to 1 grpc_cq_event_timeout_trace = 1; grpc_register_tracer("op_failure", &grpc_trace_operation_failures); +#ifndef NDEBUG + grpc_register_tracer("pending_tags", &grpc_trace_pending_tags); +#endif grpc_security_pre_init(); grpc_iomgr_init(); grpc_executor_init(); -- cgit v1.2.3 From 49c644ca6a382e69f7c85b486601784aff94b81e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 19 Aug 2016 13:52:23 -0700 Subject: Fix bugs, make it easier to find them --- src/core/ext/transport/chttp2/transport/chttp2_transport.c | 2 +- src/core/lib/surface/completion_queue.c | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 2ca76b5153..161f26b39f 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -1587,7 +1587,7 @@ void grpc_chttp2_mark_stream_closed( stream_global->read_closed_error = GRPC_ERROR_REF(error); stream_global->read_closed = true; stream_global->published_metadata[0] = true; - stream_global->published_metadata[0] = true; + stream_global->published_metadata[1] = true; decrement_active_streams_locked(exec_ctx, transport_global, stream_global); } if (close_writes && !stream_global->write_closed) { diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c index 5654b86d8b..28450d966c 100644 --- a/src/core/lib/surface/completion_queue.c +++ b/src/core/lib/surface/completion_queue.c @@ -359,6 +359,8 @@ static void dump_pending_tags(grpc_completion_queue *cc) { gpr_log(GPR_DEBUG, "%s", out); gpr_free(out); } +#else +static void dump_pending_tags(grpc_completion_queue *cc) {} #endif grpc_event grpc_completion_queue_next(grpc_completion_queue *cc, @@ -380,9 +382,7 @@ grpc_event grpc_completion_queue_next(grpc_completion_queue *cc, reserved)); GPR_ASSERT(!reserved); -#ifndef NDEBUG dump_pending_tags(cc); -#endif deadline = gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC); @@ -427,6 +427,7 @@ grpc_event grpc_completion_queue_next(grpc_completion_queue *cc, gpr_mu_unlock(cc->mu); memset(&ret, 0, sizeof(ret)); ret.type = GRPC_QUEUE_TIMEOUT; + dump_pending_tags(cc); break; } first_loop = 0; @@ -452,6 +453,7 @@ grpc_event grpc_completion_queue_next(grpc_completion_queue *cc, GRPC_ERROR_UNREF(err); memset(&ret, 0, sizeof(ret)); ret.type = GRPC_QUEUE_TIMEOUT; + dump_pending_tags(cc); break; } } @@ -537,9 +539,7 @@ grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag, } GPR_ASSERT(!reserved); -#ifndef NDEBUG dump_pending_tags(cc); -#endif deadline = gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC); @@ -592,6 +592,7 @@ grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag, memset(&ret, 0, sizeof(ret)); /* TODO(ctiller): should we use a different result here */ ret.type = GRPC_QUEUE_TIMEOUT; + dump_pending_tags(cc); break; } now = gpr_now(GPR_CLOCK_MONOTONIC); @@ -600,6 +601,7 @@ grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag, gpr_mu_unlock(cc->mu); memset(&ret, 0, sizeof(ret)); ret.type = GRPC_QUEUE_TIMEOUT; + dump_pending_tags(cc); break; } first_loop = 0; @@ -625,6 +627,7 @@ grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag, GRPC_ERROR_UNREF(err); memset(&ret, 0, sizeof(ret)); ret.type = GRPC_QUEUE_TIMEOUT; + dump_pending_tags(cc); break; } } -- cgit v1.2.3 From dfd3a8f7a566aaf59b676caf583d4048b8e9ab5b Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 24 Aug 2016 09:43:45 -0700 Subject: Merge combiner and exec_ctx execution better Allows exec_ctx callbacks to be called while a combiner is executing. Also allows guaranteeing direct execution of callbacks from combiners, which should allow reducing cpu burn for up/down stack interactions in the future. --- .../transport/chttp2/transport/chttp2_transport.c | 59 +++-- src/core/ext/transport/chttp2/transport/internal.h | 19 ++ .../ext/transport/chttp2/transport/stream_lists.c | 2 + src/core/lib/iomgr/combiner.c | 278 ++++++++++----------- src/core/lib/iomgr/combiner.h | 2 + src/core/lib/iomgr/exec_ctx.c | 33 ++- src/core/lib/iomgr/exec_ctx.h | 3 +- src/core/lib/profiling/timers.h | 5 + src/core/lib/transport/transport.c | 25 ++ src/core/lib/transport/transport.h | 4 + test/core/end2end/tests/filter_causes_close.c | 7 +- 11 files changed, 243 insertions(+), 194 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 520fa57c35..19e988670c 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -179,33 +179,30 @@ static void destruct_transport(grpc_exec_ctx *exec_ctx, gpr_free(t); } -/*#define REFCOUNTING_DEBUG 1*/ -#ifdef REFCOUNTING_DEBUG -#define REF_TRANSPORT(t, r) ref_transport(t, r, __FILE__, __LINE__) -#define UNREF_TRANSPORT(cl, t, r) unref_transport(cl, t, r, __FILE__, __LINE__) -static void unref_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, - const char *reason, const char *file, int line) { - gpr_log(GPR_DEBUG, "chttp2:unref:%p %d->%d %s [%s:%d]", t, t->refs.count, - t->refs.count - 1, reason, file, line); +#ifdef GRPC_CHTTP2_REFCOUNTING_DEBUG +void grpc_chttp2_unref_transport(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport *t, const char *reason, + const char *file, int line) { + gpr_log(GPR_DEBUG, "chttp2:unref:%p %" PRIdPTR "->%" PRIdPTR " %s [%s:%d]", t, + t->refs.count, t->refs.count - 1, reason, file, line); if (!gpr_unref(&t->refs)) return; destruct_transport(exec_ctx, t); } -static void ref_transport(grpc_chttp2_transport *t, const char *reason, - const char *file, int line) { - gpr_log(GPR_DEBUG, "chttp2: ref:%p %d->%d %s [%s:%d]", t, t->refs.count, - t->refs.count + 1, reason, file, line); +void grpc_chttp2_ref_transport(grpc_chttp2_transport *t, const char *reason, + const char *file, int line) { + gpr_log(GPR_DEBUG, "chttp2: ref:%p %" PRIdPTR "->%" PRIdPTR " %s [%s:%d]", t, + t->refs.count, t->refs.count + 1, reason, file, line); gpr_ref(&t->refs); } #else -#define REF_TRANSPORT(t, r) ref_transport(t) -#define UNREF_TRANSPORT(cl, t, r) unref_transport(cl, t) -static void unref_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t) { +void grpc_chttp2_unref_transport(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport *t) { if (!gpr_unref(&t->refs)) return; destruct_transport(exec_ctx, t); } -static void ref_transport(grpc_chttp2_transport *t) { gpr_ref(&t->refs); } +void grpc_chttp2_ref_transport(grpc_chttp2_transport *t) { gpr_ref(&t->refs); } #endif static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, @@ -392,7 +389,7 @@ static void destroy_transport_locked(grpc_exec_ctx *exec_ctx, void *tp, grpc_chttp2_transport *t = tp; t->destroying = 1; drop_connection(exec_ctx, t, GRPC_ERROR_CREATE("Transport destroyed")); - UNREF_TRANSPORT(exec_ctx, t, "destroy"); + GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "destroy"); } static void destroy_transport(grpc_exec_ctx *exec_ctx, grpc_transport *gt) { @@ -482,7 +479,7 @@ static int init_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, gpr_slice_buffer_init(&s->writing.flow_controlled_buffer); s->global.deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC); - REF_TRANSPORT(t, "stream"); + GRPC_CHTTP2_REF_TRANSPORT(t, "stream"); if (server_data) { s->global.id = (uint32_t)(uintptr_t)server_data; @@ -547,7 +544,7 @@ static void destroy_stream_locked(grpc_exec_ctx *exec_ctx, void *sp, GRPC_ERROR_UNREF(s->global.read_closed_error); GRPC_ERROR_UNREF(s->global.write_closed_error); - UNREF_TRANSPORT(exec_ctx, t, "stream"); + GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "stream"); GPR_TIMER_END("destroy_stream", 0); @@ -632,6 +629,7 @@ static void initiate_read_flush_locked(grpc_exec_ctx *exec_ctx, void *tp, grpc_chttp2_transport *t = tp; t->executor.check_read_ops_scheduled = false; check_read_ops(exec_ctx, &t->global); + GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "initiate_read_flush_locked"); } /******************************************************************************* @@ -667,7 +665,7 @@ void grpc_chttp2_initiate_write(grpc_exec_ctx *exec_ctx, break; case GRPC_CHTTP2_WRITING_INACTIVE: set_write_state(t, GRPC_CHTTP2_WRITE_SCHEDULED, reason); - REF_TRANSPORT(t, "writing"); + GRPC_CHTTP2_REF_TRANSPORT(t, "writing"); grpc_combiner_execute_finally(exec_ctx, t->executor.combiner, &t->initiate_writing, GRPC_ERROR_NONE, covered_by_poller); @@ -714,7 +712,7 @@ static void start_writing(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t) { "start_writing:nothing_to_write"); } end_waiting_for_write(exec_ctx, t, GRPC_ERROR_NONE); - UNREF_TRANSPORT(exec_ctx, t, "writing"); + GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "writing"); } GPR_TIMER_END("start_writing", 0); } @@ -787,7 +785,7 @@ static void terminate_writing_with_lock(grpc_exec_ctx *exec_ctx, void *tp, case GRPC_CHTTP2_WRITING_STALE_WITH_POLLER: GPR_TIMER_MARK("state=writing_stale_with_poller", 0); set_write_state(t, GRPC_CHTTP2_WRITE_SCHEDULED, "terminate_writing"); - REF_TRANSPORT(t, "writing"); + GRPC_CHTTP2_REF_TRANSPORT(t, "writing"); grpc_combiner_execute_finally(exec_ctx, t->executor.combiner, &t->initiate_writing, GRPC_ERROR_NONE, true); @@ -795,14 +793,14 @@ static void terminate_writing_with_lock(grpc_exec_ctx *exec_ctx, void *tp, case GRPC_CHTTP2_WRITING_STALE_NO_POLLER: GPR_TIMER_MARK("state=writing_stale_no_poller", 0); set_write_state(t, GRPC_CHTTP2_WRITE_SCHEDULED, "terminate_writing"); - REF_TRANSPORT(t, "writing"); + GRPC_CHTTP2_REF_TRANSPORT(t, "writing"); grpc_combiner_execute_finally(exec_ctx, t->executor.combiner, &t->initiate_writing, GRPC_ERROR_NONE, false); break; } - UNREF_TRANSPORT(exec_ctx, t, "writing"); + GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "writing"); GPR_TIMER_END("terminate_writing_with_lock", 0); } @@ -1261,7 +1259,7 @@ static void perform_transport_op_locked(grpc_exec_ctx *exec_ctx, grpc_exec_ctx_sched(exec_ctx, op->on_consumed, GRPC_ERROR_NONE, NULL); - UNREF_TRANSPORT(exec_ctx, t, "transport_op"); + GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "transport_op"); } static void perform_transport_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, @@ -1270,7 +1268,7 @@ static void perform_transport_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, op->transport_private.args[0] = gt; grpc_closure_init(&op->transport_private.closure, perform_transport_op_locked, op); - REF_TRANSPORT(t, "transport_op"); + GRPC_CHTTP2_REF_TRANSPORT(t, "transport_op"); grpc_combiner_execute(exec_ctx, t->executor.combiner, &op->transport_private.closure, GRPC_ERROR_NONE); } @@ -1864,7 +1862,7 @@ static void reading_action_locked(grpc_exec_ctx *exec_ctx, void *tp, } } else if (!t->closed) { keep_reading = true; - REF_TRANSPORT(t, "keep_reading"); + GRPC_CHTTP2_REF_TRANSPORT(t, "keep_reading"); prevent_endpoint_shutdown(t); } gpr_slice_buffer_reset_and_unref(&t->read_buffer); @@ -1872,9 +1870,9 @@ static void reading_action_locked(grpc_exec_ctx *exec_ctx, void *tp, if (keep_reading) { grpc_endpoint_read(exec_ctx, t->ep, &t->read_buffer, &t->reading_action); allow_endpoint_shutdown_locked(exec_ctx, t); - UNREF_TRANSPORT(exec_ctx, t, "keep_reading"); + GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "keep_reading"); } else { - UNREF_TRANSPORT(exec_ctx, t, "reading_action"); + GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "reading_action"); } GPR_TIMER_END("post_reading_action_locked", 0); @@ -2247,7 +2245,8 @@ void grpc_chttp2_transport_start_reading(grpc_exec_ctx *exec_ctx, grpc_transport *transport, gpr_slice_buffer *read_buffer) { grpc_chttp2_transport *t = (grpc_chttp2_transport *)transport; - REF_TRANSPORT(t, "reading_action"); /* matches unref inside reading_action */ + GRPC_CHTTP2_REF_TRANSPORT( + t, "reading_action"); /* matches unref inside reading_action */ if (read_buffer != NULL) { gpr_slice_buffer_move_into(read_buffer, &t->read_buffer); gpr_free(read_buffer); diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 1b48b82f4f..761ed2dad1 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -726,6 +726,25 @@ void grpc_chttp2_stream_unref(grpc_exec_ctx *exec_ctx, grpc_chttp2_stream_global *stream_global); #endif +//#define GRPC_CHTTP2_REFCOUNTING_DEBUG 1 +#ifdef GRPC_CHTTP2_REFCOUNTING_DEBUG +#define GRPC_CHTTP2_REF_TRANSPORT(t, r) \ + grpc_chttp2_ref_transport(t, r, __FILE__, __LINE__) +#define GRPC_CHTTP2_UNREF_TRANSPORT(cl, t, r) \ + grpc_chttp2_unref_transport(cl, t, r, __FILE__, __LINE__) +void grpc_chttp2_unref_transport(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport *t, const char *reason, + const char *file, int line); +void grpc_chttp2_ref_transport(grpc_chttp2_transport *t, const char *reason, + const char *file, int line); +#else +#define GRPC_CHTTP2_REF_TRANSPORT(t, r) grpc_chttp2_ref_transport(t) +#define GRPC_CHTTP2_UNREF_TRANSPORT(cl, t, r) grpc_chttp2_unref_transport(cl, t) +void grpc_chttp2_unref_transport(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport *t); +void grpc_chttp2_ref_transport(grpc_chttp2_transport *t); +#endif + grpc_chttp2_incoming_byte_stream *grpc_chttp2_incoming_byte_stream_create( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global, uint32_t frame_size, diff --git a/src/core/ext/transport/chttp2/transport/stream_lists.c b/src/core/ext/transport/chttp2/transport/stream_lists.c index 4ba09087f9..6d4863c4aa 100644 --- a/src/core/ext/transport/chttp2/transport/stream_lists.c +++ b/src/core/ext/transport/chttp2/transport/stream_lists.c @@ -245,6 +245,8 @@ void grpc_chttp2_list_add_check_read_ops( grpc_chttp2_stream_global *stream_global) { grpc_chttp2_transport *t = TRANSPORT_FROM_GLOBAL(transport_global); if (!t->executor.check_read_ops_scheduled) { + GRPC_CHTTP2_REF_TRANSPORT(TRANSPORT_FROM_GLOBAL(transport_global), + "initiate_read_flush_locked"); grpc_combiner_execute_finally(exec_ctx, t->executor.combiner, &t->initiate_read_flush_locked, GRPC_ERROR_NONE, false); diff --git a/src/core/lib/iomgr/combiner.c b/src/core/lib/iomgr/combiner.c index 946cfc65fc..f1a2b29519 100644 --- a/src/core/lib/iomgr/combiner.c +++ b/src/core/lib/iomgr/combiner.c @@ -51,6 +51,7 @@ int grpc_combiner_trace = 0; } while (0) struct grpc_combiner { + grpc_combiner *next_combiner_on_this_exec_ctx; grpc_workqueue *optional_workqueue; gpr_mpscq queue; // state is: @@ -58,17 +59,23 @@ struct grpc_combiner { // other bits - number of items queued on the lock gpr_atm state; bool take_async_break_before_final_list; + bool time_to_execute_final_list; grpc_closure_list final_list; - grpc_closure continue_finishing; + grpc_closure offload; }; +static void offload(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error); + grpc_combiner *grpc_combiner_create(grpc_workqueue *optional_workqueue) { grpc_combiner *lock = gpr_malloc(sizeof(*lock)); + lock->next_combiner_on_this_exec_ctx = NULL; + lock->time_to_execute_final_list = false; lock->optional_workqueue = optional_workqueue; gpr_atm_no_barrier_store(&lock->state, 1); gpr_mpscq_init(&lock->queue); lock->take_async_break_before_final_list = false; grpc_closure_list_init(&lock->final_list); + grpc_closure_init(&lock->offload, offload, lock); GRPC_COMBINER_TRACE(gpr_log(GPR_DEBUG, "C:%p create", lock)); return lock; } @@ -90,177 +97,154 @@ void grpc_combiner_destroy(grpc_exec_ctx *exec_ctx, grpc_combiner *lock) { } } -static bool maybe_finish_one(grpc_exec_ctx *exec_ctx, grpc_combiner *lock); -static void finish(grpc_exec_ctx *exec_ctx, grpc_combiner *lock); +static void queue_on_exec_ctx(grpc_exec_ctx *exec_ctx, grpc_combiner *lock) { + lock->next_combiner_on_this_exec_ctx = NULL; + if (exec_ctx->active_combiner == NULL) { + exec_ctx->active_combiner = exec_ctx->last_combiner = lock; + } else { + exec_ctx->last_combiner->next_combiner_on_this_exec_ctx = lock; + exec_ctx->last_combiner = lock; + } +} -static void continue_finishing_mainline(grpc_exec_ctx *exec_ctx, void *arg, - grpc_error *error) { - GPR_TIMER_BEGIN("combiner.continue_executing_mainline", 0); - grpc_combiner *lock = arg; +void grpc_combiner_execute(grpc_exec_ctx *exec_ctx, grpc_combiner *lock, + grpc_closure *cl, grpc_error *error) { GRPC_COMBINER_TRACE( - gpr_log(GPR_DEBUG, "C:%p continue_finishing_mainline", lock)); - GPR_ASSERT(exec_ctx->active_combiner == NULL); - exec_ctx->active_combiner = lock; - if (maybe_finish_one(exec_ctx, lock)) finish(exec_ctx, lock); - GPR_ASSERT(exec_ctx->active_combiner == lock); - exec_ctx->active_combiner = NULL; - GPR_TIMER_END("combiner.continue_executing_mainline", 0); + gpr_log(GPR_DEBUG, "C:%p grpc_combiner_execute c=%p", lock, cl)); + GPR_TIMER_BEGIN("combiner.execute", 0); + gpr_atm last = gpr_atm_full_fetch_add(&lock->state, 2); + GPR_ASSERT(last & 1); // ensure lock has not been destroyed + cl->error = error; + gpr_mpscq_push(&lock->queue, &cl->next_data.atm_next); + if (last == 1) { + // code will be written when the exec_ctx calls + // grpc_combiner_continue_exec_ctx + queue_on_exec_ctx(exec_ctx, lock); + } + GPR_TIMER_END("combiner.execute", 0); } -static void execute_final(grpc_exec_ctx *exec_ctx, grpc_combiner *lock) { - GPR_TIMER_BEGIN("combiner.execute_final", 0); - grpc_closure *c = lock->final_list.head; - GPR_ASSERT(c != NULL); - grpc_closure_list_init(&lock->final_list); - lock->take_async_break_before_final_list = false; - int loops = 0; - while (c != NULL) { - GRPC_COMBINER_TRACE( - gpr_log(GPR_DEBUG, "C:%p execute_final[%d] c=%p", lock, loops, c)); - grpc_closure *next = c->next_data.next; - grpc_error *error = c->error; - c->cb(exec_ctx, c->cb_arg, error); - GRPC_ERROR_UNREF(error); - c = next; - loops++; +static void move_next(grpc_exec_ctx *exec_ctx) { + exec_ctx->active_combiner = + exec_ctx->active_combiner->next_combiner_on_this_exec_ctx; + if (exec_ctx->active_combiner == NULL) { + exec_ctx->last_combiner = NULL; } - GPR_TIMER_END("combiner.execute_final", 0); } -static void continue_executing_final(grpc_exec_ctx *exec_ctx, void *arg, - grpc_error *error) { - GPR_TIMER_BEGIN("combiner.continue_executing_final", 0); +static void offload(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { grpc_combiner *lock = arg; - GRPC_COMBINER_TRACE( - gpr_log(GPR_DEBUG, "C:%p continue_executing_final", lock)); - GPR_ASSERT(exec_ctx->active_combiner == NULL); - exec_ctx->active_combiner = lock; - // quick peek to see if new things have turned up on the queue: if so, go back - // to executing them before the final list - if ((gpr_atm_acq_load(&lock->state) >> 1) > 1) { - if (maybe_finish_one(exec_ctx, lock)) finish(exec_ctx, lock); - } else { - execute_final(exec_ctx, lock); - finish(exec_ctx, lock); - } - GPR_ASSERT(exec_ctx->active_combiner == lock); - exec_ctx->active_combiner = NULL; - GPR_TIMER_END("combiner.continue_executing_final", 0); + queue_on_exec_ctx(exec_ctx, lock); } -static bool start_execute_final(grpc_exec_ctx *exec_ctx, grpc_combiner *lock) { - GPR_TIMER_BEGIN("combiner.start_execute_final", 0); - GPR_ASSERT(exec_ctx->active_combiner == lock); - GRPC_COMBINER_TRACE( - gpr_log(GPR_DEBUG, - "C:%p start_execute_final take_async_break_before_final_list=%d", - lock, lock->take_async_break_before_final_list)); - if (lock->take_async_break_before_final_list) { - grpc_closure_init(&lock->continue_finishing, continue_executing_final, - lock); - grpc_exec_ctx_sched(exec_ctx, &lock->continue_finishing, GRPC_ERROR_NONE, - GRPC_WORKQUEUE_REF(lock->optional_workqueue, "sched")); - GPR_TIMER_END("combiner.start_execute_final", 0); +static void queue_offload(grpc_exec_ctx *exec_ctx, grpc_combiner *lock) { + move_next(exec_ctx); + grpc_workqueue_enqueue(exec_ctx, lock->optional_workqueue, &lock->offload, + GRPC_ERROR_NONE); +} + +bool grpc_combiner_continue_exec_ctx(grpc_exec_ctx *exec_ctx) { + GPR_TIMER_BEGIN("combiner.continue_exec_ctx", 0); + grpc_combiner *lock = exec_ctx->active_combiner; + if (lock == NULL) { + GPR_TIMER_END("combiner.continue_exec_ctx", 0); return false; - } else { - execute_final(exec_ctx, lock); - GPR_TIMER_END("combiner.start_execute_final", 0); - return true; } -} -static bool maybe_finish_one(grpc_exec_ctx *exec_ctx, grpc_combiner *lock) { - GPR_TIMER_BEGIN("combiner.maybe_finish_one", 0); - GPR_ASSERT(exec_ctx->active_combiner == lock); if (lock->optional_workqueue != NULL && grpc_exec_ctx_ready_to_finish(exec_ctx)) { + GPR_TIMER_MARK("offload_from_finished_exec_ctx", 0); // this execution context wants to move on, and we have a workqueue (and so // can help the execution context out): schedule remaining work to be picked // up on the workqueue - grpc_closure_init(&lock->continue_finishing, continue_finishing_mainline, - lock); - grpc_workqueue_enqueue(exec_ctx, lock->optional_workqueue, - &lock->continue_finishing, GRPC_ERROR_NONE); - GPR_TIMER_END("combiner.maybe_finish_one", 0); - return false; - } - gpr_mpscq_node *n = gpr_mpscq_pop(&lock->queue); - GRPC_COMBINER_TRACE( - gpr_log(GPR_DEBUG, "C:%p maybe_finish_one n=%p", lock, n)); - if (n == NULL) { - // queue is in an inconsistant state: use this as a cue that we should - // go off and do something else for a while (and come back later) - grpc_closure_init(&lock->continue_finishing, continue_finishing_mainline, - lock); - grpc_exec_ctx_sched(exec_ctx, &lock->continue_finishing, GRPC_ERROR_NONE, - GRPC_WORKQUEUE_REF(lock->optional_workqueue, "sched")); - GPR_TIMER_END("combiner.maybe_finish_one", 0); - return false; + queue_offload(exec_ctx, lock); + GPR_TIMER_END("combiner.continue_exec_ctx", 0); + return true; } - grpc_closure *cl = (grpc_closure *)n; - grpc_error *error = cl->error; - cl->cb(exec_ctx, cl->cb_arg, error); - GRPC_ERROR_UNREF(error); - GPR_TIMER_END("combiner.maybe_finish_one", 0); - return true; -} -static void finish(grpc_exec_ctx *exec_ctx, grpc_combiner *lock) { - bool (*executor)(grpc_exec_ctx * exec_ctx, grpc_combiner * lock); - GPR_TIMER_BEGIN("combiner.finish", 0); - int loops = 0; - do { - executor = maybe_finish_one; - gpr_atm old_state = gpr_atm_full_fetch_add(&lock->state, -2); - GRPC_COMBINER_TRACE(gpr_log(GPR_DEBUG, - "C:%p finish[%d] old_state=%" PRIdPTR, lock, - loops, old_state)); - switch (old_state) { - case 5: // we're down to one queued item: if it's the final list we - case 4: // should do that - if (!grpc_closure_list_empty(lock->final_list)) { - executor = start_execute_final; - } - break; - case 3: // had one count, one unorphaned --> unlocked unorphaned - GPR_TIMER_END("combiner.finish", 0); - return; - case 2: // and one count, one orphaned --> unlocked and orphaned - really_destroy(exec_ctx, lock); - GPR_TIMER_END("combiner.finish", 0); - return; - case 1: - case 0: - // these values are illegal - representing an already unlocked or - // deleted lock - GPR_UNREACHABLE_CODE(return ); + if (!lock->time_to_execute_final_list || + // peek to see if something new has shown up, and execute that with + // priority + (gpr_atm_acq_load(&lock->state) >> 1) > 1) { + gpr_mpscq_node *n = gpr_mpscq_pop(&lock->queue); + GRPC_COMBINER_TRACE( + gpr_log(GPR_DEBUG, "C:%p maybe_finish_one n=%p", lock, n)); + if (n == NULL) { + // queue is in an inconsistant state: use this as a cue that we should + // go off and do something else for a while (and come back later) + GPR_TIMER_MARK("delay_busy", 0); + if (lock->optional_workqueue != NULL) { + queue_offload(exec_ctx, lock); + } + GPR_TIMER_END("combiner.continue_exec_ctx", 0); + return true; } - loops++; - } while (executor(exec_ctx, lock)); - GPR_TIMER_END("combiner.finish", 0); -} - -void grpc_combiner_execute(grpc_exec_ctx *exec_ctx, grpc_combiner *lock, - grpc_closure *cl, grpc_error *error) { - GRPC_COMBINER_TRACE( - gpr_log(GPR_DEBUG, "C:%p grpc_combiner_execute c=%p", lock, cl)); - GPR_TIMER_BEGIN("combiner.execute", 0); - gpr_atm last = gpr_atm_full_fetch_add(&lock->state, 2); - GPR_ASSERT(last & 1); // ensure lock has not been destroyed - if (last == 1) { - exec_ctx->active_combiner = lock; - GPR_TIMER_BEGIN("combiner.execute_first_cb", 0); + GPR_TIMER_BEGIN("combiner.exec1", 0); + grpc_closure *cl = (grpc_closure *)n; + grpc_error *error = cl->error; cl->cb(exec_ctx, cl->cb_arg, error); - GPR_TIMER_END("combiner.execute_first_cb", 0); GRPC_ERROR_UNREF(error); - finish(exec_ctx, lock); - GPR_ASSERT(exec_ctx->active_combiner == lock); - exec_ctx->active_combiner = NULL; + GPR_TIMER_END("combiner.exec1", 0); } else { - cl->error = error; - gpr_mpscq_push(&lock->queue, &cl->next_data.atm_next); + if (lock->take_async_break_before_final_list) { + GPR_TIMER_MARK("async_break", 0); + GRPC_COMBINER_TRACE(gpr_log(GPR_DEBUG, "C:%p take async break", lock)); + lock->take_async_break_before_final_list = false; + if (lock->optional_workqueue != NULL) { + queue_offload(exec_ctx, lock); + } + GPR_TIMER_END("combiner.continue_exec_ctx", 0); + return true; + } else { + grpc_closure *c = lock->final_list.head; + GPR_ASSERT(c != NULL); + grpc_closure_list_init(&lock->final_list); + lock->take_async_break_before_final_list = false; + int loops = 0; + while (c != NULL) { + GPR_TIMER_BEGIN("combiner.exec_1final", 0); + GRPC_COMBINER_TRACE( + gpr_log(GPR_DEBUG, "C:%p execute_final[%d] c=%p", lock, loops, c)); + grpc_closure *next = c->next_data.next; + grpc_error *error = c->error; + c->cb(exec_ctx, c->cb_arg, error); + GRPC_ERROR_UNREF(error); + c = next; + GPR_TIMER_END("combiner.exec_1final", 0); + } + } } - GPR_TIMER_END("combiner.execute", 0); + + GPR_TIMER_MARK("unref", 0); + gpr_atm old_state = gpr_atm_full_fetch_add(&lock->state, -2); + GRPC_COMBINER_TRACE( + gpr_log(GPR_DEBUG, "C:%p finish old_state=%" PRIdPTR, lock, old_state)); + lock->time_to_execute_final_list = false; + switch (old_state) { + case 5: // we're down to one queued item: if it's the final list we + case 4: // should do that + if (!grpc_closure_list_empty(lock->final_list)) { + lock->time_to_execute_final_list = true; + } + break; + case 3: // had one count, one unorphaned --> unlocked unorphaned + move_next(exec_ctx); + GPR_TIMER_END("combiner.continue_exec_ctx", 0); + return true; + case 2: // and one count, one orphaned --> unlocked and orphaned + move_next(exec_ctx); + really_destroy(exec_ctx, lock); + GPR_TIMER_END("combiner.continue_exec_ctx", 0); + return true; + case 1: + case 0: + // these values are illegal - representing an already unlocked or + // deleted lock + GPR_TIMER_END("combiner.continue_exec_ctx", 0); + GPR_UNREACHABLE_CODE(return true); + } + GPR_TIMER_END("combiner.continue_exec_ctx", 0); + return true; } static void enqueue_finally(grpc_exec_ctx *exec_ctx, void *closure, diff --git a/src/core/lib/iomgr/combiner.h b/src/core/lib/iomgr/combiner.h index 3eb9f34638..28f548b2f5 100644 --- a/src/core/lib/iomgr/combiner.h +++ b/src/core/lib/iomgr/combiner.h @@ -64,6 +64,8 @@ void grpc_combiner_execute_finally(grpc_exec_ctx *exec_ctx, grpc_combiner *lock, bool hint_async_break); void grpc_combiner_force_async_finally(grpc_combiner *lock); +bool grpc_combiner_continue_exec_ctx(grpc_exec_ctx *exec_ctx); + extern int grpc_combiner_trace; #endif /* GRPC_CORE_LIB_IOMGR_COMBINER_H */ diff --git a/src/core/lib/iomgr/exec_ctx.c b/src/core/lib/iomgr/exec_ctx.c index 12e51ac092..747b462a6e 100644 --- a/src/core/lib/iomgr/exec_ctx.c +++ b/src/core/lib/iomgr/exec_ctx.c @@ -37,6 +37,7 @@ #include #include +#include "src/core/lib/iomgr/combiner.h" #include "src/core/lib/iomgr/workqueue.h" #include "src/core/lib/profiling/timers.h" @@ -60,20 +61,28 @@ bool grpc_always_ready_to_finish(grpc_exec_ctx *exec_ctx, void *arg_ignored) { bool grpc_exec_ctx_flush(grpc_exec_ctx *exec_ctx) { bool did_something = 0; GPR_TIMER_BEGIN("grpc_exec_ctx_flush", 0); - while (!grpc_closure_list_empty(exec_ctx->closure_list)) { - grpc_closure *c = exec_ctx->closure_list.head; - exec_ctx->closure_list.head = exec_ctx->closure_list.tail = NULL; - while (c != NULL) { - grpc_closure *next = c->next_data.next; - grpc_error *error = c->error; - did_something = true; - GPR_TIMER_BEGIN("grpc_exec_ctx_flush.cb", 0); - c->cb(exec_ctx, c->cb_arg, error); - GRPC_ERROR_UNREF(error); - GPR_TIMER_END("grpc_exec_ctx_flush.cb", 0); - c = next; + for (;;) { + if (!grpc_closure_list_empty(exec_ctx->closure_list)) { + grpc_closure *c = exec_ctx->closure_list.head; + exec_ctx->closure_list.head = exec_ctx->closure_list.tail = NULL; + while (c != NULL) { + grpc_closure *next = c->next_data.next; + grpc_error *error = c->error; + did_something = true; + GPR_TIMER_BEGIN("grpc_exec_ctx_flush.cb", 0); + c->cb(exec_ctx, c->cb_arg, error); + GRPC_ERROR_UNREF(error); + GPR_TIMER_END("grpc_exec_ctx_flush.cb", 0); + c = next; + } + continue; + } + if (grpc_combiner_continue_exec_ctx(exec_ctx)) { + continue; } + break; } + GPR_ASSERT(exec_ctx->active_combiner == NULL); if (exec_ctx->stealing_from_workqueue != NULL) { if (grpc_exec_ctx_ready_to_finish(exec_ctx)) { grpc_workqueue_enqueue(exec_ctx, exec_ctx->stealing_from_workqueue, diff --git a/src/core/lib/iomgr/exec_ctx.h b/src/core/lib/iomgr/exec_ctx.h index ac4674bbac..91029f5fba 100644 --- a/src/core/lib/iomgr/exec_ctx.h +++ b/src/core/lib/iomgr/exec_ctx.h @@ -70,6 +70,7 @@ struct grpc_exec_ctx { grpc_closure *stolen_closure; /** currently active combiner: updated only via combiner.c */ grpc_combiner *active_combiner; + grpc_combiner *last_combiner; bool cached_ready_to_finish; void *check_ready_to_finish_arg; bool (*check_ready_to_finish)(grpc_exec_ctx *exec_ctx, void *arg); @@ -79,7 +80,7 @@ struct grpc_exec_ctx { prefer to use GRPC_EXEC_CTX_INIT whenever possible */ #define GRPC_EXEC_CTX_INIT_WITH_FINISH_CHECK(finish_check, finish_check_arg) \ { \ - GRPC_CLOSURE_LIST_INIT, NULL, NULL, NULL, false, finish_check_arg, \ + GRPC_CLOSURE_LIST_INIT, NULL, NULL, NULL, NULL, false, finish_check_arg, \ finish_check \ } #else diff --git a/src/core/lib/profiling/timers.h b/src/core/lib/profiling/timers.h index 621cdbf656..ea0cbca977 100644 --- a/src/core/lib/profiling/timers.h +++ b/src/core/lib/profiling/timers.h @@ -34,6 +34,8 @@ #ifndef GRPC_CORE_LIB_PROFILING_TIMERS_H #define GRPC_CORE_LIB_PROFILING_TIMERS_H +#include + #ifdef __cplusplus extern "C" { #endif @@ -56,14 +58,17 @@ void gpr_timer_set_enabled(int enabled); /* No profiling. No-op all the things. */ #define GPR_TIMER_MARK(tag, important) \ do { \ + /*printf("- %s\n", tag);*/ \ } while (0) #define GPR_TIMER_BEGIN(tag, important) \ do { \ + /*printf("%s {\n", tag);*/ \ } while (0) #define GPR_TIMER_END(tag, important) \ do { \ + /*printf("} // %s\n", tag);*/ \ } while (0) #else /* at least one profiler requested... */ diff --git a/src/core/lib/transport/transport.c b/src/core/lib/transport/transport.c index a78ad4349a..b951218130 100644 --- a/src/core/lib/transport/transport.c +++ b/src/core/lib/transport/transport.c @@ -276,3 +276,28 @@ grpc_transport_op *grpc_make_transport_op(grpc_closure *on_complete) { op->op.on_consumed = &op->outer_on_complete; return &op->op; } + +typedef struct { + grpc_closure outer_on_complete; + grpc_closure *inner_on_complete; + grpc_transport_stream_op op; +} made_transport_stream_op; + +static void destroy_made_transport_stream_op(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { + made_transport_stream_op *op = arg; + grpc_exec_ctx_sched(exec_ctx, op->inner_on_complete, GRPC_ERROR_REF(error), + NULL); + gpr_free(op); +} + +grpc_transport_stream_op *grpc_make_transport_stream_op( + grpc_closure *on_complete) { + made_transport_stream_op *op = gpr_malloc(sizeof(*op)); + grpc_closure_init(&op->outer_on_complete, destroy_made_transport_stream_op, + op); + op->inner_on_complete = on_complete; + memset(&op->op, 0, sizeof(op->op)); + op->op.on_complete = &op->outer_on_complete; + return &op->op; +} diff --git a/src/core/lib/transport/transport.h b/src/core/lib/transport/transport.h index d0d0c2a461..2c1cc3ee42 100644 --- a/src/core/lib/transport/transport.h +++ b/src/core/lib/transport/transport.h @@ -292,6 +292,10 @@ char *grpc_transport_get_peer(grpc_exec_ctx *exec_ctx, /* Allocate a grpc_transport_op, and preconfigure the on_consumed closure to \a on_consumed and then delete the returned transport op */ grpc_transport_op *grpc_make_transport_op(grpc_closure *on_consumed); +/* Allocate a grpc_transport_stream_op, and preconfigure the on_consumed closure + to \a on_consumed and then delete the returned transport op */ +grpc_transport_stream_op *grpc_make_transport_stream_op( + grpc_closure *on_consumed); #ifdef __cplusplus } diff --git a/test/core/end2end/tests/filter_causes_close.c b/test/core/end2end/tests/filter_causes_close.c index c6c36d668b..ef1a9c4edb 100644 --- a/test/core/end2end/tests/filter_causes_close.c +++ b/test/core/end2end/tests/filter_causes_close.c @@ -211,11 +211,10 @@ static void recv_im_ready(grpc_exec_ctx *exec_ctx, void *arg, // close the stream with an error. gpr_slice message = gpr_slice_from_copied_string("Failure that's not preventable."); - grpc_transport_stream_op op; - memset(&op, 0, sizeof(op)); - grpc_transport_stream_op_add_close(&op, GRPC_STATUS_PERMISSION_DENIED, + grpc_transport_stream_op *op = grpc_make_transport_stream_op(NULL); + grpc_transport_stream_op_add_close(op, GRPC_STATUS_PERMISSION_DENIED, &message); - grpc_call_next_op(exec_ctx, elem, &op); + grpc_call_next_op(exec_ctx, elem, op); } grpc_exec_ctx_sched( exec_ctx, calld->recv_im_ready, -- cgit v1.2.3 From aef3a79ae4cfa7236673407e09aff001a8d2e02f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 24 Aug 2016 15:13:53 -0700 Subject: Remove extraneous locks on cq checks --- src/core/lib/surface/completion_queue.c | 89 ++++++++++++++++++--------------- 1 file changed, 50 insertions(+), 39 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c index 28450d966c..1124290699 100644 --- a/src/core/lib/surface/completion_queue.c +++ b/src/core/lib/surface/completion_queue.c @@ -71,6 +71,9 @@ struct grpc_completion_queue { gpr_refcount pending_events; /** Once owning_refs drops to zero, we will destroy the cq */ gpr_refcount owning_refs; + /** counter of how many things have ever been queued on this completion queue + useful for avoiding locks to check the queue */ + gpr_atm things_queued_ever; /** 0 initially, 1 once we've begun shutting down */ int shutdown; int shutdown_called; @@ -125,15 +128,6 @@ void grpc_cq_global_shutdown(void) { } } -struct grpc_cq_alarm { - grpc_timer alarm; - grpc_cq_completion completion; - /** completion queue where events about this alarm will be posted */ - grpc_completion_queue *cq; - /** user supplied tag */ - void *tag; -}; - grpc_completion_queue *grpc_completion_queue_create(void *reserved) { grpc_completion_queue *cc; GPR_ASSERT(!reserved); @@ -170,6 +164,7 @@ grpc_completion_queue *grpc_completion_queue_create(void *reserved) { cc->is_server_cq = 0; cc->is_non_listening_server_cq = 0; cc->num_pluckers = 0; + gpr_atm_no_barrier_store(&cc->things_queued_ever, 0); #ifndef NDEBUG cc->outstanding_tag_count = 0; #endif @@ -280,6 +275,7 @@ void grpc_cq_end_op(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cc, GPR_ASSERT(found); #endif shutdown = gpr_unref(&cc->pending_events); + gpr_atm_no_barrier_fetch_add(&cc->things_queued_ever, 1); if (!shutdown) { cc->completed_tail->next = ((uintptr_t)storage) | (1u & (uintptr_t)cc->completed_tail->next); @@ -318,6 +314,7 @@ void grpc_cq_end_op(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cc, } typedef struct { + gpr_atm last_seen_things_queued_ever; grpc_completion_queue *cq; gpr_timespec deadline; grpc_cq_completion *stolen_completion; @@ -328,17 +325,23 @@ static bool cq_is_next_finished(grpc_exec_ctx *exec_ctx, void *arg) { cq_is_finished_arg *a = arg; grpc_completion_queue *cq = a->cq; GPR_ASSERT(a->stolen_completion == NULL); - gpr_mu_lock(cq->mu); - if (cq->completed_tail != &cq->completed_head) { - a->stolen_completion = (grpc_cq_completion *)cq->completed_head.next; - cq->completed_head.next = a->stolen_completion->next & ~(uintptr_t)1; - if (a->stolen_completion == cq->completed_tail) { - cq->completed_tail = &cq->completed_head; + gpr_atm current_last_seen_things_queued_ever = + gpr_atm_no_barrier_load(&cq->things_queued_ever); + if (current_last_seen_things_queued_ever != a->last_seen_things_queued_ever) { + gpr_mu_lock(cq->mu); + a->last_seen_things_queued_ever = + gpr_atm_no_barrier_load(&cq->things_queued_ever); + if (cq->completed_tail != &cq->completed_head) { + a->stolen_completion = (grpc_cq_completion *)cq->completed_head.next; + cq->completed_head.next = a->stolen_completion->next & ~(uintptr_t)1; + if (a->stolen_completion == cq->completed_tail) { + cq->completed_tail = &cq->completed_head; + } + gpr_mu_unlock(cq->mu); + return true; } gpr_mu_unlock(cq->mu); - return true; } - gpr_mu_unlock(cq->mu); return gpr_time_cmp(a->deadline, gpr_now(a->deadline.clock_type)) < 0; } @@ -386,12 +389,13 @@ grpc_event grpc_completion_queue_next(grpc_completion_queue *cc, deadline = gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC); - cq_is_finished_arg is_finished_arg = {cc, deadline, NULL, NULL}; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT_WITH_FINISH_CHECK( - cq_is_next_finished, &is_finished_arg); - GRPC_CQ_INTERNAL_REF(cc, "next"); gpr_mu_lock(cc->mu); + cq_is_finished_arg is_finished_arg = { + gpr_atm_no_barrier_load(&cc->things_queued_ever), cc, deadline, NULL, + NULL}; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT_WITH_FINISH_CHECK( + cq_is_next_finished, &is_finished_arg); for (;;) { if (is_finished_arg.stolen_completion != NULL) { gpr_mu_unlock(cc->mu); @@ -496,23 +500,29 @@ static bool cq_is_pluck_finished(grpc_exec_ctx *exec_ctx, void *arg) { cq_is_finished_arg *a = arg; grpc_completion_queue *cq = a->cq; GPR_ASSERT(a->stolen_completion == NULL); - gpr_mu_lock(cq->mu); - grpc_cq_completion *c; - grpc_cq_completion *prev = &cq->completed_head; - while ((c = (grpc_cq_completion *)(prev->next & ~(uintptr_t)1)) != - &cq->completed_head) { - if (c->tag == a->tag) { - prev->next = (prev->next & (uintptr_t)1) | (c->next & ~(uintptr_t)1); - if (c == cq->completed_tail) { - cq->completed_tail = prev; + gpr_atm current_last_seen_things_queued_ever = + gpr_atm_no_barrier_load(&cq->things_queued_ever); + if (current_last_seen_things_queued_ever != a->last_seen_things_queued_ever) { + gpr_mu_lock(cq->mu); + a->last_seen_things_queued_ever = + gpr_atm_no_barrier_load(&cq->things_queued_ever); + grpc_cq_completion *c; + grpc_cq_completion *prev = &cq->completed_head; + while ((c = (grpc_cq_completion *)(prev->next & ~(uintptr_t)1)) != + &cq->completed_head) { + if (c->tag == a->tag) { + prev->next = (prev->next & (uintptr_t)1) | (c->next & ~(uintptr_t)1); + if (c == cq->completed_tail) { + cq->completed_tail = prev; + } + gpr_mu_unlock(cq->mu); + a->stolen_completion = c; + return true; } - gpr_mu_unlock(cq->mu); - a->stolen_completion = c; - return true; + prev = c; } - prev = c; + gpr_mu_unlock(cq->mu); } - gpr_mu_unlock(cq->mu); return gpr_time_cmp(a->deadline, gpr_now(a->deadline.clock_type)) < 0; } @@ -543,12 +553,13 @@ grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag, deadline = gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC); - cq_is_finished_arg is_finished_arg = {cc, deadline, NULL, tag}; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT_WITH_FINISH_CHECK( - cq_is_pluck_finished, &is_finished_arg); - GRPC_CQ_INTERNAL_REF(cc, "pluck"); gpr_mu_lock(cc->mu); + cq_is_finished_arg is_finished_arg = { + gpr_atm_no_barrier_load(&cc->things_queued_ever), cc, deadline, NULL, + tag}; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT_WITH_FINISH_CHECK( + cq_is_pluck_finished, &is_finished_arg); for (;;) { if (is_finished_arg.stolen_completion != NULL) { gpr_mu_unlock(cc->mu); -- cgit v1.2.3 From e194ff010691458bc300b59f957e38740bd188c3 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 29 Aug 2016 15:48:41 -0700 Subject: Add transport op debugging, coalesce set_accept_stream & send_goaway calls --- .../transport/chttp2/transport/chttp2_transport.c | 7 ++ src/core/lib/surface/server.c | 9 +-- src/core/lib/transport/transport.h | 1 + src/core/lib/transport/transport_op_string.c | 77 ++++++++++++++++++++++ 4 files changed, 86 insertions(+), 8 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 3fbfc277e0..03b313ff4c 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -1095,6 +1095,10 @@ static void perform_transport_op_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t = op->transport_private.args[0]; grpc_error *close_transport = op->disconnect_with_error; + char *msg = grpc_transport_op_string(op); + gpr_log(GPR_DEBUG, "run:%p: %s", t, msg); + gpr_free(msg); + if (op->on_connectivity_state_change != NULL) { grpc_connectivity_state_notify_on_state_change( exec_ctx, &t->channel_callback.state_tracker, op->connectivity_state, @@ -1143,6 +1147,9 @@ static void perform_transport_op_locked(grpc_exec_ctx *exec_ctx, static void perform_transport_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, grpc_transport_op *op) { grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; + char *msg = grpc_transport_op_string(op); + gpr_log(GPR_DEBUG, "scd:%p: %s", t, msg); + gpr_free(msg); op->transport_private.args[0] = gt; grpc_closure_init(&op->transport_private.closure, perform_transport_op_locked, op); diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index fa48764a1c..dbeda55435 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -279,6 +279,7 @@ static void send_shutdown(grpc_exec_ctx *exec_ctx, grpc_channel *channel, grpc_channel_element *elem; op->send_goaway = send_goaway; + op->set_accept_stream = true; sc->slice = gpr_slice_from_copied_string("Server shutdown"); op->goaway_message = &sc->slice; op->goaway_status = GRPC_STATUS_OK; @@ -438,14 +439,6 @@ static void destroy_channel(grpc_exec_ctx *exec_ctx, channel_data *chand, chand->finish_destroy_channel_closure.cb = finish_destroy_channel; chand->finish_destroy_channel_closure.cb_arg = chand; - grpc_transport_op *op = - grpc_make_transport_op(&chand->finish_destroy_channel_closure); - op->set_accept_stream = true; - grpc_channel_next_op(exec_ctx, - grpc_channel_stack_element( - grpc_channel_get_channel_stack(chand->channel), 0), - op); - if (error != GRPC_ERROR_NONE) { const char *msg = grpc_error_string(error); gpr_log(GPR_INFO, "Disconnected client: %s", msg); diff --git a/src/core/lib/transport/transport.h b/src/core/lib/transport/transport.h index 2c1cc3ee42..fe47fea306 100644 --- a/src/core/lib/transport/transport.h +++ b/src/core/lib/transport/transport.h @@ -251,6 +251,7 @@ void grpc_transport_stream_op_add_close(grpc_transport_stream_op *op, gpr_slice *optional_message); char *grpc_transport_stream_op_string(grpc_transport_stream_op *op); +char *grpc_transport_op_string(grpc_transport_op *op); /* Send a batch of operations on a transport diff --git a/src/core/lib/transport/transport_op_string.c b/src/core/lib/transport/transport_op_string.c index 138591db2a..f4e758f83b 100644 --- a/src/core/lib/transport/transport_op_string.c +++ b/src/core/lib/transport/transport_op_string.c @@ -41,6 +41,7 @@ #include #include #include "src/core/lib/support/string.h" +#include "src/core/lib/transport/connectivity_state.h" /* These routines are here to facilitate debugging - they produce string representations of various transport data structures */ @@ -143,6 +144,82 @@ char *grpc_transport_stream_op_string(grpc_transport_stream_op *op) { return out; } +char *grpc_transport_op_string(grpc_transport_op *op) { + char *tmp; + char *out; + int first = 1; + + gpr_strvec b; + gpr_strvec_init(&b); + + if (op->on_connectivity_state_change != NULL) { + if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); + first = 0; + if (op->connectivity_state != NULL) { + gpr_asprintf(&tmp, "ON_CONNECTIVITY_STATE_CHANGE:p=%p:from=%s", + op->on_connectivity_state_change, + grpc_connectivity_state_name(*op->connectivity_state)); + gpr_strvec_add(&b, tmp); + } else { + gpr_asprintf(&tmp, "ON_CONNECTIVITY_STATE_CHANGE[p=%p]", + op->on_connectivity_state_change); + gpr_strvec_add(&b, tmp); + } + } + + if (op->disconnect_with_error != GRPC_ERROR_NONE) { + if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); + first = 0; + const char *err = grpc_error_string(op->disconnect_with_error); + gpr_asprintf(&tmp, "DISCONNECT:%s", err); + gpr_strvec_add(&b, tmp); + grpc_error_free_string(err); + } + + if (op->send_goaway) { + if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); + first = 0; + char *msg = op->goaway_message == NULL + ? "null" + : gpr_dump_slice(*op->goaway_message, + GPR_DUMP_ASCII | GPR_DUMP_HEX); + gpr_asprintf(&tmp, "SEND_GOAWAY:status=%d:msg=%s", op->goaway_status, msg); + if (op->goaway_message != NULL) gpr_free(msg); + gpr_strvec_add(&b, tmp); + } + + if (op->set_accept_stream) { + if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); + first = 0; + gpr_asprintf(&tmp, "SET_ACCEPT_STREAM:%p(%p,...)", op->set_accept_stream_fn, + op->set_accept_stream_user_data); + gpr_strvec_add(&b, tmp); + } + + if (op->bind_pollset != NULL) { + if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); + first = 0; + gpr_strvec_add(&b, gpr_strdup("BIND_POLLSET")); + } + + if (op->bind_pollset_set != NULL) { + if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); + first = 0; + gpr_strvec_add(&b, gpr_strdup("BIND_POLLSET_SET")); + } + + if (op->send_ping != NULL) { + if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); + first = 0; + gpr_strvec_add(&b, gpr_strdup("SEND_PING")); + } + + out = gpr_strvec_flatten(&b, NULL); + gpr_strvec_destroy(&b); + + return out; +} + void grpc_call_log_op(char *file, int line, gpr_log_severity severity, grpc_call_element *elem, grpc_transport_stream_op *op) { char *str = grpc_transport_stream_op_string(op); -- cgit v1.2.3 From c3e940177cfe8536d5a24fa0a00426c101af30f8 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 29 Aug 2016 16:34:03 -0700 Subject: Improve debug --- src/core/lib/transport/connectivity_state.c | 3 ++- src/core/lib/transport/transport_op_string.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/transport/connectivity_state.c b/src/core/lib/transport/connectivity_state.c index 68d05e3a85..fdb5307814 100644 --- a/src/core/lib/transport/connectivity_state.c +++ b/src/core/lib/transport/connectivity_state.c @@ -180,7 +180,8 @@ void grpc_connectivity_state_set(grpc_exec_ctx *exec_ctx, *w->current = tracker->current_state; tracker->watchers = w->next; if (grpc_connectivity_state_trace) { - gpr_log(GPR_DEBUG, "NOTIFY: %p", w->notify); + gpr_log(GPR_DEBUG, "NOTIFY: %p %s: %p", tracker, tracker->name, + w->notify); } grpc_exec_ctx_sched(exec_ctx, w->notify, GRPC_ERROR_REF(tracker->current_error), NULL); diff --git a/src/core/lib/transport/transport_op_string.c b/src/core/lib/transport/transport_op_string.c index f4e758f83b..8a687d8cd3 100644 --- a/src/core/lib/transport/transport_op_string.c +++ b/src/core/lib/transport/transport_op_string.c @@ -161,7 +161,7 @@ char *grpc_transport_op_string(grpc_transport_op *op) { grpc_connectivity_state_name(*op->connectivity_state)); gpr_strvec_add(&b, tmp); } else { - gpr_asprintf(&tmp, "ON_CONNECTIVITY_STATE_CHANGE[p=%p]", + gpr_asprintf(&tmp, "ON_CONNECTIVITY_STATE_CHANGE:p=%p:unsubscribe", op->on_connectivity_state_change); gpr_strvec_add(&b, tmp); } -- cgit v1.2.3 From c8db73c419f61668aac6908835125b1ad0880c76 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 30 Aug 2016 14:00:48 -0700 Subject: expand debug --- .../transport/chttp2/transport/chttp2_transport.c | 88 +++++++++++----------- src/core/ext/transport/chttp2/transport/internal.h | 2 +- .../ext/transport/chttp2/transport/stream_lists.c | 4 +- src/core/ext/transport/chttp2/transport/writing.c | 6 +- src/core/lib/surface/call.c | 8 ++ 5 files changed, 58 insertions(+), 50 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index f375288577..239c2f8f2e 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -720,6 +720,9 @@ static void maybe_start_some_streams(grpc_exec_ctx *exec_ctx, #define CLOSURE_BARRIER_FIRST_REF_BIT (1 << 16) static grpc_closure *add_closure_barrier(grpc_closure *closure) { + gpr_log(GPR_DEBUG, "add_closure_barrier: %p | %" PRIdPTR " -> %" PRIdPTR, + closure, closure->next_data.scratch, + closure->next_data.scratch + CLOSURE_BARRIER_FIRST_REF_BIT); closure->next_data.scratch += CLOSURE_BARRIER_FIRST_REF_BIT; return closure; } @@ -734,6 +737,9 @@ void grpc_chttp2_complete_closure_step(grpc_exec_ctx *exec_ctx, GRPC_ERROR_UNREF(error); return; } + gpr_log(GPR_DEBUG, "complete_closure_step: %p | %" PRIdPTR " -> %" PRIdPTR, + closure, closure->next_data.scratch, + closure->next_data.scratch - CLOSURE_BARRIER_FIRST_REF_BIT); closure->next_data.scratch -= CLOSURE_BARRIER_FIRST_REF_BIT; if (error != GRPC_ERROR_NONE) { if (closure->error == GRPC_ERROR_NONE) { @@ -859,6 +865,11 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, void *stream_op, if (on_complete == NULL) { on_complete = grpc_closure_create(do_nothing, NULL); } + + if (grpc_http_trace) { + gpr_log(GPR_DEBUG, " on_complete = %p", on_complete); + } + /* use final_data as a barrier until enqueue time; the inital counter is dropped at the end of this function */ on_complete->next_data.scratch = CLOSURE_BARRIER_FIRST_REF_BIT; @@ -1039,6 +1050,13 @@ static void perform_stream_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, GPR_TIMER_BEGIN("perform_stream_op", 0); grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; grpc_chttp2_stream *s = (grpc_chttp2_stream *)gs; + + if (grpc_http_trace) { + char *str = grpc_transport_stream_op_string(op); + gpr_log(GPR_DEBUG, "perform_stream_op: %s", str); + gpr_free(str); + } + grpc_closure_init(&op->transport_private.closure, perform_stream_op_locked, op); op->transport_private.args[0] = gt; @@ -1961,40 +1979,30 @@ grpc_chttp2_incoming_byte_stream *grpc_chttp2_incoming_byte_stream_create( */ static char *format_flowctl_context_var(const char *context, const char *var, - int64_t val, uint32_t id, - char **scope) { - char *underscore_pos; - char *buf; - char *result; + int64_t val, uint32_t id) { + char *name; if (context == NULL) { - *scope = NULL; - gpr_asprintf(&buf, "%s(%" PRId64 ")", var, val); - result = gpr_leftpad(buf, ' ', 60); - gpr_free(buf); - return result; - } - underscore_pos = strchr(context, '_'); - *scope = gpr_strdup(context); - (*scope)[underscore_pos - context] = 0; - if (id != 0) { - char *tmp = *scope; - gpr_asprintf(scope, "%s[%d]", tmp, id); - gpr_free(tmp); - } - gpr_asprintf(&buf, "%s.%s(%" PRId64 ")", underscore_pos + 1, var, val); - result = gpr_leftpad(buf, ' ', 60); - gpr_free(buf); - return result; -} - -static int samestr(char *a, char *b) { - if (a == NULL) { - return b == NULL; - } - if (b == NULL) { - return 0; + name = gpr_strdup(var); + } else if (0 == strcmp(context, "t")) { + GPR_ASSERT(id == 0); + gpr_asprintf(&name, "TRANSPORT:%s", var); + } else if (0 == strcmp(context, "s")) { + GPR_ASSERT(id != 0); + gpr_asprintf(&name, "STREAM[%d]:%s", id, var); + } else { + gpr_asprintf(&name, "BAD_CONTEXT[%s][%d]:%s", context, id, var); } - return 0 == strcmp(a, b); + char *name_fld = gpr_leftpad(name, ' ', 64); + char *value; + gpr_asprintf(&value, "%" PRId64, val); + char *value_fld = gpr_leftpad(value, ' ', 8); + char *result; + gpr_asprintf(&result, "%s %s", name_fld, value_fld); + gpr_free(name); + gpr_free(name_fld); + gpr_free(value); + gpr_free(value_fld); + return result; } void grpc_chttp2_flowctl_trace(const char *file, int line, const char *phase, @@ -2002,26 +2010,18 @@ void grpc_chttp2_flowctl_trace(const char *file, int line, const char *phase, const char *var1, const char *context2, const char *var2, int is_client, uint32_t stream_id, int64_t val1, int64_t val2) { - char *scope1; - char *scope2; char *tmp_phase; - char *tmp_scope1; - char *label1 = - format_flowctl_context_var(context1, var1, val1, stream_id, &scope1); - char *label2 = - format_flowctl_context_var(context2, var2, val2, stream_id, &scope2); + char *label1 = format_flowctl_context_var(context1, var1, val1, stream_id); + char *label2 = format_flowctl_context_var(context2, var2, val2, stream_id); char *clisvr = is_client ? "client" : "server"; char *prefix; tmp_phase = gpr_leftpad(phase, ' ', 8); - tmp_scope1 = gpr_leftpad(scope1, ' ', 11); - gpr_asprintf(&prefix, "FLOW %s: %s %s ", tmp_phase, clisvr, scope1); + gpr_asprintf(&prefix, "FLOW %s: %s ", tmp_phase, clisvr); gpr_free(tmp_phase); - gpr_free(tmp_scope1); switch (op) { case GRPC_CHTTP2_FLOWCTL_MOVE: - GPR_ASSERT(samestr(scope1, scope2)); if (val2 != 0) { gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "%sMOVE %s <- %s giving %" PRId64, prefix, label1, label2, @@ -2046,8 +2046,6 @@ void grpc_chttp2_flowctl_trace(const char *file, int line, const char *phase, break; } - gpr_free(scope1); - gpr_free(scope2); gpr_free(label1); gpr_free(label2); gpr_free(prefix); diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index c599c31162..e684c424a2 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -457,7 +457,7 @@ int grpc_chttp2_list_pop_writable_stream(grpc_chttp2_transport *t, bool grpc_chttp2_list_remove_writable_stream( grpc_chttp2_transport *t, grpc_chttp2_stream *s) GRPC_MUST_USE_RESULT; -void grpc_chttp2_list_add_writing_stream(grpc_chttp2_transport *t, +bool grpc_chttp2_list_add_writing_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s); int grpc_chttp2_list_have_writing_streams(grpc_chttp2_transport *t); int grpc_chttp2_list_pop_writing_stream(grpc_chttp2_transport *t, diff --git a/src/core/ext/transport/chttp2/transport/stream_lists.c b/src/core/ext/transport/chttp2/transport/stream_lists.c index a6b4a4e1d9..7a42c2a58a 100644 --- a/src/core/ext/transport/chttp2/transport/stream_lists.c +++ b/src/core/ext/transport/chttp2/transport/stream_lists.c @@ -134,9 +134,9 @@ bool grpc_chttp2_list_remove_writable_stream(grpc_chttp2_transport *t, return stream_list_maybe_remove(t, s, GRPC_CHTTP2_LIST_WRITABLE); } -void grpc_chttp2_list_add_writing_stream(grpc_chttp2_transport *t, +bool grpc_chttp2_list_add_writing_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s) { - GPR_ASSERT(stream_list_add(t, s, GRPC_CHTTP2_LIST_WRITING)); + return stream_list_add(t, s, GRPC_CHTTP2_LIST_WRITING); } int grpc_chttp2_list_have_writing_streams(grpc_chttp2_transport *t) { diff --git a/src/core/ext/transport/chttp2/transport/writing.c b/src/core/ext/transport/chttp2/transport/writing.c index e4cd14d6d5..84e5f634c3 100644 --- a/src/core/ext/transport/chttp2/transport/writing.c +++ b/src/core/ext/transport/chttp2/transport/writing.c @@ -109,6 +109,8 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx, bool sent_initial_metadata = s->sent_initial_metadata; bool now_writing = false; + gpr_log(GPR_DEBUG, "W:%d: sim=%d ann=%d fcb_len=%d (t,s)-win=%d,%d", (int)s->id,sent_initial_metadata, (int) s->announce_window, (int)s->flow_controlled_buffer.length, (int)t->outgoing_window,(int)s->outgoing_window); + /* send initial metadata if it's available */ if (!sent_initial_metadata && s->send_initial_metadata) { grpc_chttp2_encode_header(&t->hpack_compressor, s->id, @@ -120,7 +122,7 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx, now_writing = true; } /* send any window updates */ - if (s->announce_window > 0 && s->sent_initial_metadata) { + if (s->announce_window > 0 && sent_initial_metadata) { uint32_t announce = s->announce_window; gpr_slice_buffer_add(&t->outbuf, grpc_chttp2_window_update_create( @@ -159,7 +161,7 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx, now_writing = true; if (s->flow_controlled_buffer.length > 0) { GRPC_CHTTP2_STREAM_REF(s, "chttp2_writing"); - grpc_chttp2_list_add_writing_stream(t, s); + grpc_chttp2_list_add_writable_stream(t, s); } } else if (t->outgoing_window == 0) { grpc_chttp2_list_add_stalled_by_transport(t, s); diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index ae9424256c..8ed33bee5f 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -1197,6 +1197,10 @@ static void receiving_stream_ready(grpc_exec_ctx *exec_ctx, void *bctlp, batch_control *bctl = bctlp; grpc_call *call = bctl->call; + char *msg = grpc_transport_stream_op_string(&bctl->op); + gpr_log(GPR_DEBUG, "receiving_stream_ready: %s", msg); + gpr_free(msg); + gpr_mu_lock(&bctl->call->mu); if (bctl->call->has_initial_md_been_received || error != GRPC_ERROR_NONE || call->receiving_stream == NULL) { @@ -1307,6 +1311,10 @@ static void finish_batch(grpc_exec_ctx *exec_ctx, void *bctlp, grpc_call *child_call; grpc_call *next_child_call; + char *msg = grpc_transport_stream_op_string(&bctl->op); + gpr_log(GPR_DEBUG, "finish_batch: %s", msg); + gpr_free(msg); + GRPC_ERROR_REF(error); gpr_mu_lock(&call->mu); -- cgit v1.2.3 From a7cd41cc46bf60aed17dea8ea2d3787814c45475 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 31 Aug 2016 12:59:24 -0700 Subject: Note polling coverage when taking combiner locks: resolves offload issues --- .../transport/chttp2/transport/chttp2_transport.c | 72 +++++++------ .../ext/transport/chttp2/transport/frame_data.c | 7 +- src/core/ext/transport/chttp2/transport/internal.h | 3 +- .../ext/transport/chttp2/transport/stream_lists.c | 5 +- src/core/lib/iomgr/closure.c | 6 +- src/core/lib/iomgr/closure.h | 5 +- src/core/lib/iomgr/combiner.c | 112 +++++++++++---------- src/core/lib/iomgr/combiner.h | 7 +- src/core/lib/iomgr/exec_ctx.c | 12 +-- src/core/lib/iomgr/workqueue_posix.c | 4 +- src/core/lib/surface/call.c | 1 + src/core/lib/transport/transport.h | 4 + test/core/iomgr/combiner_test.c | 12 +-- 13 files changed, 128 insertions(+), 122 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index f774cce690..fb72fd693a 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -372,7 +372,7 @@ static void destroy_transport(grpc_exec_ctx *exec_ctx, grpc_transport *gt) { grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; grpc_combiner_execute(exec_ctx, t->combiner, grpc_closure_create(destroy_transport_locked, t), - GRPC_ERROR_NONE); + GRPC_ERROR_NONE, false); } static void close_transport_locked(grpc_exec_ctx *exec_ctx, @@ -512,7 +512,7 @@ static void destroy_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, s->destroy_stream_arg = and_free_memory; grpc_closure_init(&s->destroy_stream, destroy_stream_locked, s); grpc_combiner_execute(exec_ctx, t->combiner, &s->destroy_stream, - GRPC_ERROR_NONE); + GRPC_ERROR_NONE, false); GPR_TIMER_END("destroy_stream", 0); } @@ -546,13 +546,15 @@ void grpc_chttp2_initiate_write(grpc_exec_ctx *exec_ctx, switch (t->write_state) { case GRPC_CHTTP2_WRITE_STATE_IDLE: t->write_state = GRPC_CHTTP2_WRITE_STATE_WRITING; + gpr_log(GPR_DEBUG, "W:%s:%p: IDLE -> WRITING", t->is_client ? "CLIENT" : "SERVER", t); GRPC_CHTTP2_REF_TRANSPORT(t, "writing"); grpc_combiner_execute_finally(exec_ctx, t->combiner, &t->write_action_begin_locked, - GRPC_ERROR_NONE, false); + GRPC_ERROR_NONE); break; case GRPC_CHTTP2_WRITE_STATE_WRITING: t->write_state = GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE_TO_COME; + gpr_log(GPR_DEBUG, "W:%s:%p: WRITING -> WRITING_MORE", t->is_client ? "CLIENT" : "SERVER", t); break; case GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE_TO_COME: break; @@ -576,8 +578,11 @@ static void write_action_begin_locked(grpc_exec_ctx *exec_ctx, void *gt, grpc_chttp2_transport *t = gt; GPR_ASSERT(t->write_state != GRPC_CHTTP2_WRITE_STATE_IDLE); if (!t->closed && grpc_chttp2_begin_write(exec_ctx, t)) { + t->write_state = GRPC_CHTTP2_WRITE_STATE_WRITING; + gpr_log(GPR_DEBUG, "W:%s:%p: WRITING|WRITING_MORE -> WRITING", t->is_client ? "CLIENT" : "SERVER", t); grpc_exec_ctx_sched(exec_ctx, &t->write_action, GRPC_ERROR_NONE, NULL); } else { + gpr_log(GPR_DEBUG, "W:%s:%p: WRITING|WRITING_MORE -> IDLE", t->is_client ? "CLIENT" : "SERVER", t); t->write_state = GRPC_CHTTP2_WRITE_STATE_IDLE; GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "writing"); } @@ -596,7 +601,7 @@ static void write_action_end(grpc_exec_ctx *exec_ctx, void *gt, grpc_chttp2_transport *t = gt; GPR_TIMER_BEGIN("write_action_end", 0); grpc_combiner_execute(exec_ctx, t->combiner, &t->write_action_end_locked, - GRPC_ERROR_REF(error)); + GRPC_ERROR_REF(error), false); GPR_TIMER_END("write_action_end", 0); } @@ -617,13 +622,15 @@ static void write_action_end_locked(grpc_exec_ctx *exec_ctx, void *tp, case GRPC_CHTTP2_WRITE_STATE_WRITING: GPR_TIMER_MARK("state=writing", 0); t->write_state = GRPC_CHTTP2_WRITE_STATE_IDLE; + gpr_log(GPR_DEBUG, "W:%s:%p: WRITING -> IDLE", t->is_client ? "CLIENT" : "SERVER", t); break; case GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE_TO_COME: GPR_TIMER_MARK("state=writing_stale_with_poller", 0); t->write_state = GRPC_CHTTP2_WRITE_STATE_WRITING; + gpr_log(GPR_DEBUG, "W:%s:%p: WRITING_MORE -> WRITING", t->is_client ? "CLIENT" : "SERVER", t); GRPC_CHTTP2_REF_TRANSPORT(t, "writing"); - grpc_combiner_execute_finally(exec_ctx, t->combiner, &t->write_action, - GRPC_ERROR_NONE, false); + grpc_combiner_execute_finally(exec_ctx, t->combiner, &t->write_action_begin_locked, + GRPC_ERROR_NONE); break; } @@ -742,20 +749,22 @@ void grpc_chttp2_complete_closure_step(grpc_exec_ctx *exec_ctx, closure->next_data.scratch - CLOSURE_BARRIER_FIRST_REF_BIT); closure->next_data.scratch -= CLOSURE_BARRIER_FIRST_REF_BIT; if (error != GRPC_ERROR_NONE) { - if (closure->error == GRPC_ERROR_NONE) { - closure->error = + if (closure->error_data.error == GRPC_ERROR_NONE) { + closure->error_data.error = GRPC_ERROR_CREATE("Error in HTTP transport completing operation"); - closure->error = grpc_error_set_str( - closure->error, GRPC_ERROR_STR_TARGET_ADDRESS, t->peer_string); + closure->error_data.error = + grpc_error_set_str(closure->error_data.error, + GRPC_ERROR_STR_TARGET_ADDRESS, t->peer_string); } - closure->error = grpc_error_add_child(closure->error, error); + closure->error_data.error = + grpc_error_add_child(closure->error_data.error, error); } if (closure->next_data.scratch < CLOSURE_BARRIER_FIRST_REF_BIT) { if (closure->next_data.scratch & CLOSURE_BARRIER_STATS_BIT) { grpc_transport_move_stats(&s->stats, s->collecting_stats); s->collecting_stats = NULL; } - grpc_exec_ctx_sched(exec_ctx, closure, closure->error, NULL); + grpc_exec_ctx_sched(exec_ctx, closure, closure->error_data.error, NULL); } *pclosure = NULL; } @@ -842,7 +851,8 @@ static void complete_fetch(grpc_exec_ctx *exec_ctx, void *gs, grpc_chttp2_stream *s = gs; grpc_chttp2_transport *t = s->t; grpc_combiner_execute(exec_ctx, t->combiner, &s->complete_fetch_locked, - GRPC_ERROR_REF(error)); + GRPC_ERROR_REF(error), + s->complete_fetch_covered_by_poller); } static void do_nothing(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {} @@ -873,7 +883,7 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, void *stream_op, /* use final_data as a barrier until enqueue time; the inital counter is dropped at the end of this function */ on_complete->next_data.scratch = CLOSURE_BARRIER_FIRST_REF_BIT; - on_complete->error = GRPC_ERROR_NONE; + on_complete->error_data.error = GRPC_ERROR_NONE; if (op->collect_stats != NULL) { GPR_ASSERT(s->collecting_stats == NULL); @@ -959,6 +969,7 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, void *stream_op, s->fetched_send_message_length = 0; s->fetching_slice_end_offset = (ssize_t)s->flow_controlled_buffer.length + (ssize_t)len; + s->complete_fetch_covered_by_poller = op->covered_by_poller; if (flags & GRPC_WRITE_BUFFER_HINT) { s->fetching_slice_end_offset -= 65536; } @@ -1063,7 +1074,7 @@ static void perform_stream_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, op->transport_private.args[1] = gs; GRPC_CHTTP2_STREAM_REF(s, "perform_stream_op"); grpc_combiner_execute(exec_ctx, t->combiner, &op->transport_private.closure, - GRPC_ERROR_NONE); + GRPC_ERROR_NONE, op->covered_by_poller); GPR_TIMER_END("perform_stream_op", 0); } @@ -1173,7 +1184,7 @@ static void perform_transport_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, op); GRPC_CHTTP2_REF_TRANSPORT(t, "transport_op"); grpc_combiner_execute(exec_ctx, t->combiner, &op->transport_private.closure, - GRPC_ERROR_NONE); + GRPC_ERROR_NONE, false); } /******************************************************************************* @@ -1265,7 +1276,7 @@ static void remove_stream(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, } if (s->data_parser.parsing_frame != NULL) { grpc_chttp2_incoming_byte_stream_finished( - exec_ctx, s->data_parser.parsing_frame, GRPC_ERROR_REF(error), 0); + exec_ctx, s->data_parser.parsing_frame, GRPC_ERROR_REF(error)); s->data_parser.parsing_frame = NULL; } @@ -1637,7 +1648,7 @@ static void read_action_begin(grpc_exec_ctx *exec_ctx, void *tp, GPR_TIMER_BEGIN("reading_action", 0); grpc_chttp2_transport *t = tp; grpc_combiner_execute(exec_ctx, t->combiner, &t->read_action_locked, - GRPC_ERROR_REF(error)); + GRPC_ERROR_REF(error), false); GPR_TIMER_END("reading_action", 0); } @@ -1868,7 +1879,7 @@ static int incoming_byte_stream_next(grpc_exec_ctx *exec_ctx, grpc_closure_init(&bs->next_action.closure, incoming_byte_stream_next_locked, bs); grpc_combiner_execute(exec_ctx, bs->transport->combiner, - &bs->next_action.closure, GRPC_ERROR_NONE); + &bs->next_action.closure, GRPC_ERROR_NONE, false); GPR_TIMER_END("incoming_byte_stream_next", 0); return 0; } @@ -1893,7 +1904,7 @@ static void incoming_byte_stream_destroy(grpc_exec_ctx *exec_ctx, grpc_closure_init(&bs->destroy_action, incoming_byte_stream_destroy_locked, bs); grpc_combiner_execute(exec_ctx, bs->transport->combiner, &bs->destroy_action, - GRPC_ERROR_NONE); + GRPC_ERROR_NONE, false); GPR_TIMER_END("incoming_byte_stream_destroy", 0); } @@ -1916,9 +1927,9 @@ void grpc_chttp2_incoming_byte_stream_push(grpc_exec_ctx *exec_ctx, gpr_mu_unlock(&bs->slice_mu); } -static void incoming_byte_stream_finished_locked(grpc_exec_ctx *exec_ctx, - void *bsp, grpc_error *error) { - grpc_chttp2_incoming_byte_stream *bs = bsp; +void grpc_chttp2_incoming_byte_stream_finished( + grpc_exec_ctx *exec_ctx, grpc_chttp2_incoming_byte_stream *bs, + grpc_error *error) { if (error != GRPC_ERROR_NONE) { grpc_exec_ctx_sched(exec_ctx, bs->on_next, GRPC_ERROR_REF(error), NULL); bs->on_next = NULL; @@ -1928,21 +1939,6 @@ static void incoming_byte_stream_finished_locked(grpc_exec_ctx *exec_ctx, incoming_byte_stream_unref(exec_ctx, bs); } -void grpc_chttp2_incoming_byte_stream_finished( - grpc_exec_ctx *exec_ctx, grpc_chttp2_incoming_byte_stream *bs, - grpc_error *error, int from_parsing_thread) { - GPR_TIMER_BEGIN("grpc_chttp2_incoming_byte_stream_finished", 0); - if (from_parsing_thread) { - grpc_closure_init(&bs->finished_action, - incoming_byte_stream_finished_locked, bs); - grpc_combiner_execute(exec_ctx, bs->transport->combiner, - &bs->finished_action, GRPC_ERROR_REF(error)); - } else { - incoming_byte_stream_finished_locked(exec_ctx, bs, error); - } - GPR_TIMER_END("grpc_chttp2_incoming_byte_stream_finished", 0); -} - grpc_chttp2_incoming_byte_stream *grpc_chttp2_incoming_byte_stream_create( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s, uint32_t frame_size, uint32_t flags) { diff --git a/src/core/ext/transport/chttp2/transport/frame_data.c b/src/core/ext/transport/chttp2/transport/frame_data.c index e340b2fb06..bcb0ab0f99 100644 --- a/src/core/ext/transport/chttp2/transport/frame_data.c +++ b/src/core/ext/transport/chttp2/transport/frame_data.c @@ -53,8 +53,7 @@ void grpc_chttp2_data_parser_destroy(grpc_exec_ctx *exec_ctx, grpc_chttp2_data_parser *parser) { if (parser->parsing_frame != NULL) { grpc_chttp2_incoming_byte_stream_finished( - exec_ctx, parser->parsing_frame, GRPC_ERROR_CREATE("Parser destroyed"), - 1); + exec_ctx, parser->parsing_frame, GRPC_ERROR_CREATE("Parser destroyed")); } GRPC_ERROR_UNREF(parser->error); } @@ -245,7 +244,7 @@ grpc_error *grpc_chttp2_data_parser_parse(grpc_exec_ctx *exec_ctx, void *parser, exec_ctx, p->parsing_frame, gpr_slice_sub(slice, (size_t)(cur - beg), (size_t)(end - beg))); grpc_chttp2_incoming_byte_stream_finished(exec_ctx, p->parsing_frame, - GRPC_ERROR_NONE, 1); + GRPC_ERROR_NONE); p->parsing_frame = NULL; p->state = GRPC_CHTTP2_DATA_FH_0; return GRPC_ERROR_NONE; @@ -256,7 +255,7 @@ grpc_error *grpc_chttp2_data_parser_parse(grpc_exec_ctx *exec_ctx, void *parser, gpr_slice_sub(slice, (size_t)(cur - beg), (size_t)(cur + p->frame_size - beg))); grpc_chttp2_incoming_byte_stream_finished(exec_ctx, p->parsing_frame, - GRPC_ERROR_NONE, 1); + GRPC_ERROR_NONE); p->parsing_frame = NULL; cur += p->frame_size; goto fh_0; /* loop */ diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 0c218b79de..0d15a56951 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -349,6 +349,7 @@ struct grpc_chttp2_stream { uint32_t fetched_send_message_length; gpr_slice fetching_slice; int64_t fetching_slice_end_offset; + bool complete_fetch_covered_by_poller; grpc_closure complete_fetch; grpc_closure complete_fetch_locked; grpc_closure *fetching_send_message_finished; @@ -643,7 +644,7 @@ void grpc_chttp2_incoming_byte_stream_push(grpc_exec_ctx *exec_ctx, gpr_slice slice); void grpc_chttp2_incoming_byte_stream_finished( grpc_exec_ctx *exec_ctx, grpc_chttp2_incoming_byte_stream *bs, - grpc_error *error, int from_parsing_thread); + grpc_error *error); void grpc_chttp2_ack_ping(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, const uint8_t *opaque_8bytes); diff --git a/src/core/ext/transport/chttp2/transport/stream_lists.c b/src/core/ext/transport/chttp2/transport/stream_lists.c index 7a42c2a58a..9d09e0c7c2 100644 --- a/src/core/ext/transport/chttp2/transport/stream_lists.c +++ b/src/core/ext/transport/chttp2/transport/stream_lists.c @@ -163,9 +163,8 @@ void grpc_chttp2_list_add_check_read_ops(grpc_exec_ctx *exec_ctx, grpc_chttp2_stream *s) { if (!t->check_read_ops_scheduled) { GRPC_CHTTP2_REF_TRANSPORT(t, "initiate_read_flush_locked"); - grpc_combiner_execute_finally(exec_ctx, t->combiner, - &t->read_action_flush_locked, GRPC_ERROR_NONE, - false); + grpc_combiner_execute_finally( + exec_ctx, t->combiner, &t->read_action_flush_locked, GRPC_ERROR_NONE); t->check_read_ops_scheduled = true; } stream_list_add(t, s, GRPC_CHTTP2_LIST_CHECK_READ_OPS); diff --git a/src/core/lib/iomgr/closure.c b/src/core/lib/iomgr/closure.c index 1ba0a5c141..6200cda5dc 100644 --- a/src/core/lib/iomgr/closure.c +++ b/src/core/lib/iomgr/closure.c @@ -51,7 +51,7 @@ void grpc_closure_list_append(grpc_closure_list *closure_list, GRPC_ERROR_UNREF(error); return; } - closure->error = error; + closure->error_data.error = error; closure->next_data.next = NULL; if (closure_list->head == NULL) { closure_list->head = closure; @@ -64,8 +64,8 @@ void grpc_closure_list_append(grpc_closure_list *closure_list, void grpc_closure_list_fail_all(grpc_closure_list *list, grpc_error *forced_failure) { for (grpc_closure *c = list->head; c != NULL; c = c->next_data.next) { - if (c->error == GRPC_ERROR_NONE) { - c->error = GRPC_ERROR_REF(forced_failure); + if (c->error_data.error == GRPC_ERROR_NONE) { + c->error_data.error = GRPC_ERROR_REF(forced_failure); } } GRPC_ERROR_UNREF(forced_failure); diff --git a/src/core/lib/iomgr/closure.h b/src/core/lib/iomgr/closure.h index c1a22b6021..bf7c006097 100644 --- a/src/core/lib/iomgr/closure.h +++ b/src/core/lib/iomgr/closure.h @@ -76,7 +76,10 @@ struct grpc_closure { void *cb_arg; /** Once queued, the result of the closure. Before then: scratch space */ - grpc_error *error; + union { + grpc_error *error; + uintptr_t scratch; + } error_data; }; /** Initializes \a closure with \a cb and \a cb_arg. */ diff --git a/src/core/lib/iomgr/combiner.c b/src/core/lib/iomgr/combiner.c index f1a2b29519..40be4dea7b 100644 --- a/src/core/lib/iomgr/combiner.c +++ b/src/core/lib/iomgr/combiner.c @@ -58,7 +58,9 @@ struct grpc_combiner { // lower bit - zero if orphaned // other bits - number of items queued on the lock gpr_atm state; - bool take_async_break_before_final_list; + // number of elements in the list that are covered by a poller: if >0, we can + // offload safely + gpr_atm covered_by_poller; bool time_to_execute_final_list; grpc_closure_list final_list; grpc_closure offload; @@ -66,14 +68,27 @@ struct grpc_combiner { static void offload(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error); +typedef struct { + grpc_error *error; + bool covered_by_poller; +} error_data; + +static uintptr_t pack_error_data(error_data d) { + return ((uintptr_t)d.error) | (d.covered_by_poller ? 1 : 0); +} + +static error_data unpack_error_data(uintptr_t p) { + return (error_data){(grpc_error *)(p & ~(uintptr_t)1), p & 1}; +} + grpc_combiner *grpc_combiner_create(grpc_workqueue *optional_workqueue) { grpc_combiner *lock = gpr_malloc(sizeof(*lock)); lock->next_combiner_on_this_exec_ctx = NULL; lock->time_to_execute_final_list = false; lock->optional_workqueue = optional_workqueue; gpr_atm_no_barrier_store(&lock->state, 1); + gpr_atm_no_barrier_store(&lock->covered_by_poller, 0); gpr_mpscq_init(&lock->queue); - lock->take_async_break_before_final_list = false; grpc_closure_list_init(&lock->final_list); grpc_closure_init(&lock->offload, offload, lock); GRPC_COMBINER_TRACE(gpr_log(GPR_DEBUG, "C:%p create", lock)); @@ -108,13 +123,18 @@ static void queue_on_exec_ctx(grpc_exec_ctx *exec_ctx, grpc_combiner *lock) { } void grpc_combiner_execute(grpc_exec_ctx *exec_ctx, grpc_combiner *lock, - grpc_closure *cl, grpc_error *error) { + grpc_closure *cl, grpc_error *error, + bool covered_by_poller) { GRPC_COMBINER_TRACE( - gpr_log(GPR_DEBUG, "C:%p grpc_combiner_execute c=%p", lock, cl)); + gpr_log(GPR_DEBUG, "C:%p grpc_combiner_execute c=%p cov=%d", lock, cl, covered_by_poller)); GPR_TIMER_BEGIN("combiner.execute", 0); gpr_atm last = gpr_atm_full_fetch_add(&lock->state, 2); GPR_ASSERT(last & 1); // ensure lock has not been destroyed - cl->error = error; + cl->error_data.scratch = + pack_error_data((error_data){error, covered_by_poller}); + if (covered_by_poller) { + gpr_atm_no_barrier_fetch_add(&lock->covered_by_poller, 1); + } gpr_mpscq_push(&lock->queue, &cl->next_data.atm_next); if (last == 1) { // code will be written when the exec_ctx calls @@ -152,11 +172,12 @@ bool grpc_combiner_continue_exec_ctx(grpc_exec_ctx *exec_ctx) { } if (lock->optional_workqueue != NULL && - grpc_exec_ctx_ready_to_finish(exec_ctx)) { + grpc_exec_ctx_ready_to_finish(exec_ctx) && + gpr_atm_acq_load(&lock->covered_by_poller) > 0) { GPR_TIMER_MARK("offload_from_finished_exec_ctx", 0); - // this execution context wants to move on, and we have a workqueue (and so - // can help the execution context out): schedule remaining work to be picked - // up on the workqueue + // this execution context wants to move on, and we have a workqueue (and + // so can help the execution context out): schedule remaining work to be + // picked up on the workqueue queue_offload(exec_ctx, lock); GPR_TIMER_END("combiner.continue_exec_ctx", 0); return true; @@ -173,7 +194,7 @@ bool grpc_combiner_continue_exec_ctx(grpc_exec_ctx *exec_ctx) { // queue is in an inconsistant state: use this as a cue that we should // go off and do something else for a while (and come back later) GPR_TIMER_MARK("delay_busy", 0); - if (lock->optional_workqueue != NULL) { + if (lock->optional_workqueue != NULL && gpr_atm_acq_load(&lock->covered_by_poller) > 0) { queue_offload(exec_ctx, lock); } GPR_TIMER_END("combiner.continue_exec_ctx", 0); @@ -181,37 +202,28 @@ bool grpc_combiner_continue_exec_ctx(grpc_exec_ctx *exec_ctx) { } GPR_TIMER_BEGIN("combiner.exec1", 0); grpc_closure *cl = (grpc_closure *)n; - grpc_error *error = cl->error; - cl->cb(exec_ctx, cl->cb_arg, error); - GRPC_ERROR_UNREF(error); + error_data err = unpack_error_data(cl->error_data.scratch); + cl->cb(exec_ctx, cl->cb_arg, err.error); + if (err.covered_by_poller) { + gpr_atm_no_barrier_fetch_add(&lock->covered_by_poller, -1); + } + GRPC_ERROR_UNREF(err.error); GPR_TIMER_END("combiner.exec1", 0); } else { - if (lock->take_async_break_before_final_list) { - GPR_TIMER_MARK("async_break", 0); - GRPC_COMBINER_TRACE(gpr_log(GPR_DEBUG, "C:%p take async break", lock)); - lock->take_async_break_before_final_list = false; - if (lock->optional_workqueue != NULL) { - queue_offload(exec_ctx, lock); - } - GPR_TIMER_END("combiner.continue_exec_ctx", 0); - return true; - } else { - grpc_closure *c = lock->final_list.head; - GPR_ASSERT(c != NULL); - grpc_closure_list_init(&lock->final_list); - lock->take_async_break_before_final_list = false; - int loops = 0; - while (c != NULL) { - GPR_TIMER_BEGIN("combiner.exec_1final", 0); - GRPC_COMBINER_TRACE( - gpr_log(GPR_DEBUG, "C:%p execute_final[%d] c=%p", lock, loops, c)); - grpc_closure *next = c->next_data.next; - grpc_error *error = c->error; - c->cb(exec_ctx, c->cb_arg, error); - GRPC_ERROR_UNREF(error); - c = next; - GPR_TIMER_END("combiner.exec_1final", 0); - } + grpc_closure *c = lock->final_list.head; + GPR_ASSERT(c != NULL); + grpc_closure_list_init(&lock->final_list); + int loops = 0; + while (c != NULL) { + GPR_TIMER_BEGIN("combiner.exec_1final", 0); + GRPC_COMBINER_TRACE( + gpr_log(GPR_DEBUG, "C:%p execute_final[%d] c=%p", lock, loops, c)); + grpc_closure *next = c->next_data.next; + grpc_error *error = c->error_data.error; + c->cb(exec_ctx, c->cb_arg, error); + GRPC_ERROR_UNREF(error); + c = next; + GPR_TIMER_END("combiner.exec_1final", 0); } } @@ -250,35 +262,27 @@ bool grpc_combiner_continue_exec_ctx(grpc_exec_ctx *exec_ctx) { static void enqueue_finally(grpc_exec_ctx *exec_ctx, void *closure, grpc_error *error) { grpc_combiner_execute_finally(exec_ctx, exec_ctx->active_combiner, closure, - GRPC_ERROR_REF(error), false); + GRPC_ERROR_REF(error)); } void grpc_combiner_execute_finally(grpc_exec_ctx *exec_ctx, grpc_combiner *lock, - grpc_closure *closure, grpc_error *error, - bool force_async_break) { - GRPC_COMBINER_TRACE(gpr_log( - GPR_DEBUG, - "C:%p grpc_combiner_execute_finally c=%p force_async_break=%d; ac=%p", - lock, closure, force_async_break, exec_ctx->active_combiner)); + grpc_closure *closure, grpc_error *error) { + GRPC_COMBINER_TRACE(gpr_log(GPR_DEBUG, + "C:%p grpc_combiner_execute_finally c=%p; ac=%p", + lock, closure, exec_ctx->active_combiner)); GPR_TIMER_BEGIN("combiner.execute_finally", 0); if (exec_ctx->active_combiner != lock) { GPR_TIMER_MARK("slowpath", 0); grpc_combiner_execute(exec_ctx, lock, - grpc_closure_create(enqueue_finally, closure), error); + grpc_closure_create(enqueue_finally, closure), error, + false); GPR_TIMER_END("combiner.execute_finally", 0); return; } - if (force_async_break) { - lock->take_async_break_before_final_list = true; - } if (grpc_closure_list_empty(lock->final_list)) { gpr_atm_full_fetch_add(&lock->state, 2); } grpc_closure_list_append(&lock->final_list, closure, error); GPR_TIMER_END("combiner.execute_finally", 0); } - -void grpc_combiner_force_async_finally(grpc_combiner *lock) { - lock->take_async_break_before_final_list = true; -} diff --git a/src/core/lib/iomgr/combiner.h b/src/core/lib/iomgr/combiner.h index 28f548b2f5..80ed33c2a7 100644 --- a/src/core/lib/iomgr/combiner.h +++ b/src/core/lib/iomgr/combiner.h @@ -52,7 +52,8 @@ grpc_combiner *grpc_combiner_create(grpc_workqueue *optional_workqueue); void grpc_combiner_destroy(grpc_exec_ctx *exec_ctx, grpc_combiner *lock); // Execute \a action within the lock. void grpc_combiner_execute(grpc_exec_ctx *exec_ctx, grpc_combiner *lock, - grpc_closure *closure, grpc_error *error); + grpc_closure *closure, grpc_error *error, + bool covered_by_poller); // Execute \a action within the lock just prior to unlocking. // if \a hint_async_break is additionally set, the combiner is tries to trip // through the workqueue between finishing the primary queue of combined @@ -60,9 +61,7 @@ void grpc_combiner_execute(grpc_exec_ctx *exec_ctx, grpc_combiner *lock, // Takes a very slow and round-about path if not called from a // grpc_combiner_execute closure void grpc_combiner_execute_finally(grpc_exec_ctx *exec_ctx, grpc_combiner *lock, - grpc_closure *closure, grpc_error *error, - bool hint_async_break); -void grpc_combiner_force_async_finally(grpc_combiner *lock); + grpc_closure *closure, grpc_error *error); bool grpc_combiner_continue_exec_ctx(grpc_exec_ctx *exec_ctx); diff --git a/src/core/lib/iomgr/exec_ctx.c b/src/core/lib/iomgr/exec_ctx.c index 747b462a6e..eec32a4f26 100644 --- a/src/core/lib/iomgr/exec_ctx.c +++ b/src/core/lib/iomgr/exec_ctx.c @@ -67,7 +67,7 @@ bool grpc_exec_ctx_flush(grpc_exec_ctx *exec_ctx) { exec_ctx->closure_list.head = exec_ctx->closure_list.tail = NULL; while (c != NULL) { grpc_closure *next = c->next_data.next; - grpc_error *error = c->error; + grpc_error *error = c->error_data.error; did_something = true; GPR_TIMER_BEGIN("grpc_exec_ctx_flush.cb", 0); c->cb(exec_ctx, c->cb_arg, error); @@ -87,7 +87,7 @@ bool grpc_exec_ctx_flush(grpc_exec_ctx *exec_ctx) { if (grpc_exec_ctx_ready_to_finish(exec_ctx)) { grpc_workqueue_enqueue(exec_ctx, exec_ctx->stealing_from_workqueue, exec_ctx->stolen_closure, - exec_ctx->stolen_closure->error); + exec_ctx->stolen_closure->error_data.error); GRPC_WORKQUEUE_UNREF(exec_ctx, exec_ctx->stealing_from_workqueue, "exec_ctx_sched"); exec_ctx->stealing_from_workqueue = NULL; @@ -98,7 +98,7 @@ bool grpc_exec_ctx_flush(grpc_exec_ctx *exec_ctx) { "exec_ctx_sched"); exec_ctx->stealing_from_workqueue = NULL; exec_ctx->stolen_closure = NULL; - grpc_error *error = c->error; + grpc_error *error = c->error_data.error; GPR_TIMER_BEGIN("grpc_exec_ctx_flush.stolen_cb", 0); c->cb(exec_ctx, c->cb_arg, error); GRPC_ERROR_UNREF(error); @@ -125,7 +125,7 @@ void grpc_exec_ctx_sched(grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_closure_list_append(&exec_ctx->closure_list, closure, error); } else if (exec_ctx->stealing_from_workqueue == NULL) { exec_ctx->stealing_from_workqueue = offload_target_or_null; - closure->error = error; + closure->error_data.error = error; exec_ctx->stolen_closure = closure; } else if (exec_ctx->stealing_from_workqueue != offload_target_or_null) { grpc_workqueue_enqueue(exec_ctx, offload_target_or_null, closure, error); @@ -133,8 +133,8 @@ void grpc_exec_ctx_sched(grpc_exec_ctx *exec_ctx, grpc_closure *closure, } else { /* stealing_from_workqueue == offload_target_or_null */ grpc_workqueue_enqueue(exec_ctx, offload_target_or_null, exec_ctx->stolen_closure, - exec_ctx->stolen_closure->error); - closure->error = error; + exec_ctx->stolen_closure->error_data.error); + closure->error_data.error = error; exec_ctx->stolen_closure = closure; GRPC_WORKQUEUE_UNREF(exec_ctx, offload_target_or_null, "exec_ctx_sched"); } diff --git a/src/core/lib/iomgr/workqueue_posix.c b/src/core/lib/iomgr/workqueue_posix.c index ecfea68f56..6c27c3b41e 100644 --- a/src/core/lib/iomgr/workqueue_posix.c +++ b/src/core/lib/iomgr/workqueue_posix.c @@ -171,7 +171,7 @@ static void on_readable(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { wakeup(exec_ctx, workqueue); } grpc_closure *cl = (grpc_closure *)n; - grpc_error *clerr = cl->error; + grpc_error *clerr = cl->error_data.error; cl->cb(exec_ctx, cl->cb_arg, clerr); GRPC_ERROR_UNREF(clerr); } @@ -185,7 +185,7 @@ void grpc_workqueue_enqueue(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, GPR_TIMER_BEGIN("workqueue.enqueue", 0); gpr_atm last = gpr_atm_full_fetch_add(&workqueue->state, 2); GPR_ASSERT(last & 1); - closure->error = error; + closure->error_data.error = error; gpr_mpscq_push(&workqueue->queue, &closure->next_data.atm_next); if (last == 1) { wakeup(exec_ctx, workqueue); diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 8ed33bee5f..5f120a69c3 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -1405,6 +1405,7 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx, grpc_transport_stream_op *stream_op = &bctl->op; memset(stream_op, 0, sizeof(*stream_op)); + stream_op->covered_by_poller = true; if (nops == 0) { GRPC_CALL_INTERNAL_REF(call, "completion"); diff --git a/src/core/lib/transport/transport.h b/src/core/lib/transport/transport.h index fe47fea306..42f51c9ce4 100644 --- a/src/core/lib/transport/transport.h +++ b/src/core/lib/transport/transport.h @@ -113,6 +113,10 @@ typedef struct grpc_transport_stream_op { have been completed. */ grpc_closure *on_complete; + /** Is the completion of this op covered by a poller (if false: the op should + complete independently of some pollset being polled) */ + bool covered_by_poller; + /** Send initial metadata to the peer, from the provided metadata batch. idempotent_request MUST be set if this is non-null */ grpc_metadata_batch *send_initial_metadata; diff --git a/test/core/iomgr/combiner_test.c b/test/core/iomgr/combiner_test.c index 7cf016d82c..cfb6159b17 100644 --- a/test/core/iomgr/combiner_test.c +++ b/test/core/iomgr/combiner_test.c @@ -61,7 +61,7 @@ static void test_execute_one(void) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_combiner_execute(&exec_ctx, lock, grpc_closure_create(set_bool_to_true, &done), - GRPC_ERROR_NONE); + GRPC_ERROR_NONE, false); grpc_exec_ctx_flush(&exec_ctx); GPR_ASSERT(done); grpc_combiner_destroy(&exec_ctx, lock); @@ -96,7 +96,8 @@ static void execute_many_loop(void *a) { c->ctr = &args->ctr; c->value = n++; grpc_combiner_execute(&exec_ctx, args->lock, - grpc_closure_create(check_one, c), GRPC_ERROR_NONE); + grpc_closure_create(check_one, c), GRPC_ERROR_NONE, + false); grpc_exec_ctx_flush(&exec_ctx); } gpr_sleep_until(GRPC_TIMEOUT_MILLIS_TO_DEADLINE(100)); @@ -132,9 +133,8 @@ static void in_finally(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { } static void add_finally(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { - grpc_combiner_execute_finally(exec_ctx, arg, - grpc_closure_create(in_finally, NULL), - GRPC_ERROR_NONE, false); + grpc_combiner_execute_finally( + exec_ctx, arg, grpc_closure_create(in_finally, NULL), GRPC_ERROR_NONE); } static void test_execute_finally(void) { @@ -143,7 +143,7 @@ static void test_execute_finally(void) { grpc_combiner *lock = grpc_combiner_create(NULL); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_combiner_execute(&exec_ctx, lock, grpc_closure_create(add_finally, lock), - GRPC_ERROR_NONE); + GRPC_ERROR_NONE, false); grpc_exec_ctx_flush(&exec_ctx); GPR_ASSERT(got_in_finally); grpc_combiner_destroy(&exec_ctx, lock); -- cgit v1.2.3 From eae090a67a02c81487e601e86fb9ef957de9407b Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 1 Sep 2016 10:16:51 -0700 Subject: Reinstate RST_STREAM at EOS --- src/core/ext/transport/chttp2/transport/chttp2_transport.c | 2 +- src/core/ext/transport/chttp2/transport/writing.c | 10 ++++++++++ src/core/lib/iomgr/combiner.c | 8 +++++--- src/core/lib/support/log.c | 6 +++--- src/core/lib/support/string.c | 11 +++++++++++ src/core/lib/support/string.h | 2 ++ test/core/support/string_test.c | 8 ++++++++ 7 files changed, 40 insertions(+), 7 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index ecb2b12eb0..b7dc91fda7 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -1948,7 +1948,7 @@ void grpc_chttp2_incoming_byte_stream_push(grpc_exec_ctx *exec_ctx, incoming_byte_stream_publish_error( exec_ctx, bs, GRPC_ERROR_CREATE("Too many bytes in stream")); } else { - bs->remaining_bytes -= GPR_SLICE_LENGTH(slice); + bs->remaining_bytes -= (uint32_t)GPR_SLICE_LENGTH(slice); if (bs->on_next != NULL) { *bs->next = slice; grpc_exec_ctx_sched(exec_ctx, bs->on_next, GRPC_ERROR_NONE, NULL); diff --git a/src/core/ext/transport/chttp2/transport/writing.c b/src/core/ext/transport/chttp2/transport/writing.c index ecb3e49c98..805a66a003 100644 --- a/src/core/ext/transport/chttp2/transport/writing.c +++ b/src/core/ext/transport/chttp2/transport/writing.c @@ -158,6 +158,11 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx, if (is_last_frame) { s->send_trailing_metadata = NULL; s->sent_trailing_metadata = true; + if (!t->is_client && !s->read_closed) { + gpr_slice_buffer_add(&t->outbuf, grpc_chttp2_rst_stream_create( + s->id, GRPC_CHTTP2_NO_ERROR, + &s->stats.outgoing)); + } } s->sending_bytes += send_bytes; now_writing = true; @@ -178,6 +183,11 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx, &s->stats.outgoing, &t->outbuf); s->send_trailing_metadata = NULL; s->sent_trailing_metadata = true; + if (!t->is_client && !s->read_closed) { + gpr_slice_buffer_add( + &t->outbuf, grpc_chttp2_rst_stream_create( + s->id, GRPC_CHTTP2_NO_ERROR, &s->stats.outgoing)); + } now_writing = true; } } diff --git a/src/core/lib/iomgr/combiner.c b/src/core/lib/iomgr/combiner.c index 40be4dea7b..a3def8affb 100644 --- a/src/core/lib/iomgr/combiner.c +++ b/src/core/lib/iomgr/combiner.c @@ -125,8 +125,9 @@ static void queue_on_exec_ctx(grpc_exec_ctx *exec_ctx, grpc_combiner *lock) { void grpc_combiner_execute(grpc_exec_ctx *exec_ctx, grpc_combiner *lock, grpc_closure *cl, grpc_error *error, bool covered_by_poller) { - GRPC_COMBINER_TRACE( - gpr_log(GPR_DEBUG, "C:%p grpc_combiner_execute c=%p cov=%d", lock, cl, covered_by_poller)); + GRPC_COMBINER_TRACE(gpr_log(GPR_DEBUG, + "C:%p grpc_combiner_execute c=%p cov=%d", lock, + cl, covered_by_poller)); GPR_TIMER_BEGIN("combiner.execute", 0); gpr_atm last = gpr_atm_full_fetch_add(&lock->state, 2); GPR_ASSERT(last & 1); // ensure lock has not been destroyed @@ -194,7 +195,8 @@ bool grpc_combiner_continue_exec_ctx(grpc_exec_ctx *exec_ctx) { // queue is in an inconsistant state: use this as a cue that we should // go off and do something else for a while (and come back later) GPR_TIMER_MARK("delay_busy", 0); - if (lock->optional_workqueue != NULL && gpr_atm_acq_load(&lock->covered_by_poller) > 0) { + if (lock->optional_workqueue != NULL && + gpr_atm_acq_load(&lock->covered_by_poller) > 0) { queue_offload(exec_ctx, lock); } GPR_TIMER_END("combiner.continue_exec_ctx", 0); diff --git a/src/core/lib/support/log.c b/src/core/lib/support/log.c index 899f1218b6..6fbd947f4b 100644 --- a/src/core/lib/support/log.c +++ b/src/core/lib/support/log.c @@ -82,11 +82,11 @@ void gpr_log_verbosity_init() { gpr_atm min_severity_to_print = GPR_LOG_SEVERITY_ERROR; if (verbosity != NULL) { - if (strcmp(verbosity, "DEBUG") == 0) { + if (gpr_stricmp(verbosity, "DEBUG") == 0) { min_severity_to_print = (gpr_atm)GPR_LOG_SEVERITY_DEBUG; - } else if (strcmp(verbosity, "INFO") == 0) { + } else if (gpr_stricmp(verbosity, "INFO") == 0) { min_severity_to_print = (gpr_atm)GPR_LOG_SEVERITY_INFO; - } else if (strcmp(verbosity, "ERROR") == 0) { + } else if (gpr_stricmp(verbosity, "ERROR") == 0) { min_severity_to_print = (gpr_atm)GPR_LOG_SEVERITY_ERROR; } gpr_free(verbosity); diff --git a/src/core/lib/support/string.c b/src/core/lib/support/string.c index 30c1e67647..d17fb9da4b 100644 --- a/src/core/lib/support/string.c +++ b/src/core/lib/support/string.c @@ -304,3 +304,14 @@ void gpr_strvec_add(gpr_strvec *sv, char *str) { char *gpr_strvec_flatten(gpr_strvec *sv, size_t *final_length) { return gpr_strjoin((const char **)sv->strs, sv->count, final_length); } + +int gpr_stricmp(const char *a, const char *b) { + int ca, cb; + do { + ca = tolower(*a); + cb = tolower(*b); + ++a; + ++b; + } while (ca == cb && ca && cb); + return ca - cb; +} diff --git a/src/core/lib/support/string.h b/src/core/lib/support/string.h index 2b6bb3eec6..3aebc083ac 100644 --- a/src/core/lib/support/string.h +++ b/src/core/lib/support/string.h @@ -118,6 +118,8 @@ void gpr_strvec_add(gpr_strvec *strs, char *add); total_length as per gpr_strjoin */ char *gpr_strvec_flatten(gpr_strvec *strs, size_t *total_length); +int gpr_stricmp(const char *a, const char *b); + #ifdef __cplusplus } #endif diff --git a/test/core/support/string_test.c b/test/core/support/string_test.c index 553a824b3f..378e45a942 100644 --- a/test/core/support/string_test.c +++ b/test/core/support/string_test.c @@ -366,6 +366,13 @@ static void test_leftpad() { gpr_free(padded); } +static void test_stricmp(void) { + GPR_ASSERT(0 == gpr_stricmp("hello", "hello")); + GPR_ASSERT(0 == gpr_stricmp("HELLO", "hello")); + GPR_ASSERT(gpr_stricmp("a", "b") < 0); + GPR_ASSERT(gpr_stricmp("b", "a") > 0); +} + int main(int argc, char **argv) { grpc_test_init(argc, argv); test_strdup(); @@ -379,5 +386,6 @@ int main(int argc, char **argv) { test_ltoa(); test_int64toa(); test_leftpad(); + test_stricmp(); return 0; } -- cgit v1.2.3 From cd6add30221ba752a725a25abd755b330025121e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 1 Sep 2016 10:56:01 -0700 Subject: Spam cleanup --- .../transport/chttp2/transport/chttp2_transport.c | 27 ---------------------- src/core/ext/transport/chttp2/transport/writing.c | 6 ----- src/core/lib/surface/call.c | 4 ---- test/core/end2end/tests/no_logging.c | 1 + 4 files changed, 1 insertion(+), 37 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index b7dc91fda7..ba2bf91b92 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -546,8 +546,6 @@ void grpc_chttp2_initiate_write(grpc_exec_ctx *exec_ctx, switch (t->write_state) { case GRPC_CHTTP2_WRITE_STATE_IDLE: t->write_state = GRPC_CHTTP2_WRITE_STATE_WRITING; - gpr_log(GPR_DEBUG, "W:%s:%p: IDLE -> WRITING", - t->is_client ? "CLIENT" : "SERVER", t); GRPC_CHTTP2_REF_TRANSPORT(t, "writing"); grpc_combiner_execute_finally(exec_ctx, t->combiner, &t->write_action_begin_locked, @@ -555,8 +553,6 @@ void grpc_chttp2_initiate_write(grpc_exec_ctx *exec_ctx, break; case GRPC_CHTTP2_WRITE_STATE_WRITING: t->write_state = GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE_TO_COME; - gpr_log(GPR_DEBUG, "W:%s:%p: WRITING -> WRITING_MORE", - t->is_client ? "CLIENT" : "SERVER", t); break; case GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE_TO_COME: break; @@ -581,12 +577,8 @@ static void write_action_begin_locked(grpc_exec_ctx *exec_ctx, void *gt, GPR_ASSERT(t->write_state != GRPC_CHTTP2_WRITE_STATE_IDLE); if (!t->closed && grpc_chttp2_begin_write(exec_ctx, t)) { t->write_state = GRPC_CHTTP2_WRITE_STATE_WRITING; - gpr_log(GPR_DEBUG, "W:%s:%p: WRITING|WRITING_MORE -> WRITING", - t->is_client ? "CLIENT" : "SERVER", t); grpc_exec_ctx_sched(exec_ctx, &t->write_action, GRPC_ERROR_NONE, NULL); } else { - gpr_log(GPR_DEBUG, "W:%s:%p: WRITING|WRITING_MORE -> IDLE", - t->is_client ? "CLIENT" : "SERVER", t); t->write_state = GRPC_CHTTP2_WRITE_STATE_IDLE; GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "writing"); } @@ -626,14 +618,10 @@ static void write_action_end_locked(grpc_exec_ctx *exec_ctx, void *tp, case GRPC_CHTTP2_WRITE_STATE_WRITING: GPR_TIMER_MARK("state=writing", 0); t->write_state = GRPC_CHTTP2_WRITE_STATE_IDLE; - gpr_log(GPR_DEBUG, "W:%s:%p: WRITING -> IDLE", - t->is_client ? "CLIENT" : "SERVER", t); break; case GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE_TO_COME: GPR_TIMER_MARK("state=writing_stale_with_poller", 0); t->write_state = GRPC_CHTTP2_WRITE_STATE_WRITING; - gpr_log(GPR_DEBUG, "W:%s:%p: WRITING_MORE -> WRITING", - t->is_client ? "CLIENT" : "SERVER", t); GRPC_CHTTP2_REF_TRANSPORT(t, "writing"); grpc_combiner_execute_finally(exec_ctx, t->combiner, &t->write_action_begin_locked, @@ -734,9 +722,6 @@ static void maybe_start_some_streams(grpc_exec_ctx *exec_ctx, #define CLOSURE_BARRIER_FIRST_REF_BIT (1 << 16) static grpc_closure *add_closure_barrier(grpc_closure *closure) { - gpr_log(GPR_DEBUG, "add_closure_barrier: %p | %" PRIdPTR " -> %" PRIdPTR, - closure, closure->next_data.scratch, - closure->next_data.scratch + CLOSURE_BARRIER_FIRST_REF_BIT); closure->next_data.scratch += CLOSURE_BARRIER_FIRST_REF_BIT; return closure; } @@ -751,9 +736,6 @@ void grpc_chttp2_complete_closure_step(grpc_exec_ctx *exec_ctx, GRPC_ERROR_UNREF(error); return; } - gpr_log(GPR_DEBUG, "complete_closure_step: %p | %" PRIdPTR " -> %" PRIdPTR, - closure, closure->next_data.scratch, - closure->next_data.scratch - CLOSURE_BARRIER_FIRST_REF_BIT); closure->next_data.scratch -= CLOSURE_BARRIER_FIRST_REF_BIT; if (error != GRPC_ERROR_NONE) { if (closure->error_data.error == GRPC_ERROR_NONE) { @@ -794,10 +776,6 @@ static void add_fetched_slice_locked(grpc_exec_ctx *exec_ctx, static void continue_fetching_send_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s) { - gpr_log(GPR_DEBUG, - "continue_fetching_send_locked[%d]: fsm=%p fetched=%d tgt=%d", s->id, - s->fetching_send_message, s->fetched_send_message_length, - s->fetching_send_message->length); if (s->fetching_send_message == NULL) { /* Stream was cancelled before message fetch completed */ abort(); /* TODO(ctiller): what cleanup here? */ @@ -1131,10 +1109,6 @@ static void perform_transport_op_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t = op->transport_private.args[0]; grpc_error *close_transport = op->disconnect_with_error; - char *msg = grpc_transport_op_string(op); - gpr_log(GPR_DEBUG, "run:%p: %s", t, msg); - gpr_free(msg); - if (op->on_connectivity_state_change != NULL) { grpc_connectivity_state_notify_on_state_change( exec_ctx, &t->channel_callback.state_tracker, op->connectivity_state, @@ -1184,7 +1158,6 @@ static void perform_transport_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, grpc_transport_op *op) { grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; char *msg = grpc_transport_op_string(op); - gpr_log(GPR_DEBUG, "scd:%p: %s", t, msg); gpr_free(msg); op->transport_private.args[0] = gt; grpc_closure_init(&op->transport_private.closure, perform_transport_op_locked, diff --git a/src/core/ext/transport/chttp2/transport/writing.c b/src/core/ext/transport/chttp2/transport/writing.c index 805a66a003..6f14e7226b 100644 --- a/src/core/ext/transport/chttp2/transport/writing.c +++ b/src/core/ext/transport/chttp2/transport/writing.c @@ -109,12 +109,6 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx, bool sent_initial_metadata = s->sent_initial_metadata; bool now_writing = false; - gpr_log(GPR_DEBUG, "W:%d:%s: sim=%d ann=%d fcb_len=%d (t,s)-win=%d,%d", - (int)s->id, t->is_client ? "client" : "server", - sent_initial_metadata, (int)s->announce_window, - (int)s->flow_controlled_buffer.length, (int)t->outgoing_window, - (int)s->outgoing_window); - /* send initial metadata if it's available */ if (!sent_initial_metadata && s->send_initial_metadata) { grpc_chttp2_encode_header(&t->hpack_compressor, s->id, diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 5f120a69c3..814baf3fc9 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -1311,10 +1311,6 @@ static void finish_batch(grpc_exec_ctx *exec_ctx, void *bctlp, grpc_call *child_call; grpc_call *next_child_call; - char *msg = grpc_transport_stream_op_string(&bctl->op); - gpr_log(GPR_DEBUG, "finish_batch: %s", msg); - gpr_free(msg); - GRPC_ERROR_REF(error); gpr_mu_lock(&call->mu); diff --git a/test/core/end2end/tests/no_logging.c b/test/core/end2end/tests/no_logging.c index 3c40e5dbac..afa98decc5 100644 --- a/test/core/end2end/tests/no_logging.c +++ b/test/core/end2end/tests/no_logging.c @@ -286,6 +286,7 @@ static void test_no_logging_in_one_request(grpc_end2end_test_config config) { } void no_logging(grpc_end2end_test_config config) { + gpr_set_log_verbosity(GPR_LOG_SEVERITY_DEBUG); test_no_logging_in_one_request(config); test_no_error_logging_in_entire_process(config); } -- cgit v1.2.3 From e0f25604562754f0290f92e34892ee5000f3da43 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 1 Sep 2016 11:40:07 -0700 Subject: Remove spam --- src/core/lib/surface/call.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 814baf3fc9..858c7f5b88 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -1197,10 +1197,6 @@ static void receiving_stream_ready(grpc_exec_ctx *exec_ctx, void *bctlp, batch_control *bctl = bctlp; grpc_call *call = bctl->call; - char *msg = grpc_transport_stream_op_string(&bctl->op); - gpr_log(GPR_DEBUG, "receiving_stream_ready: %s", msg); - gpr_free(msg); - gpr_mu_lock(&bctl->call->mu); if (bctl->call->has_initial_md_been_received || error != GRPC_ERROR_NONE || call->receiving_stream == NULL) { -- cgit v1.2.3 From df1d3da924a746cebce263ce3aa37027a13f55ce Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 1 Sep 2016 13:51:42 -0700 Subject: Fix leaks --- src/core/ext/transport/chttp2/transport/chttp2_transport.c | 6 ++++++ src/core/lib/surface/server.c | 7 +++++++ 2 files changed, 13 insertions(+) (limited to 'src/core/lib') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index ba2bf91b92..94440a9539 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -162,6 +162,12 @@ static void destruct_transport(grpc_exec_ctx *exec_ctx, gpr_free(ping); } + while (t->write_cb_pool) { + grpc_chttp2_write_cb *next = t->write_cb_pool->next; + gpr_free(t->write_cb_pool); + t->write_cb_pool = next; + } + gpr_free(t->peer_string); gpr_free(t); } diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index 041fd234ba..9a517b0a7a 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -446,6 +446,13 @@ static void destroy_channel(grpc_exec_ctx *exec_ctx, channel_data *chand, grpc_error_free_string(msg); } GRPC_ERROR_UNREF(error); + + grpc_transport_op *op = grpc_make_transport_op(&chand->finish_destroy_channel_closure); + op->set_accept_stream = true; + grpc_channel_next_op(exec_ctx, + grpc_channel_stack_element( + grpc_channel_get_channel_stack(chand->channel), 0), + op); } static void cpstr(char **dest, size_t *capacity, grpc_mdstr *value) { -- cgit v1.2.3 From de2c41c394770fd87f5e406af5dfe70ba6656b4c Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 1 Sep 2016 15:08:08 -0700 Subject: Call closures directly where safe --- .../ext/transport/chttp2/transport/chttp2_transport.c | 19 +++++++------------ src/core/lib/iomgr/closure.c | 10 ++++++++++ src/core/lib/iomgr/closure.h | 5 +++++ src/core/lib/iomgr/exec_ctx.c | 6 +----- src/core/lib/iomgr/tcp_posix.c | 9 +++------ src/core/lib/surface/server.c | 3 +-- 6 files changed, 27 insertions(+), 25 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 94440a9539..13fc8ab374 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -759,7 +759,7 @@ void grpc_chttp2_complete_closure_step(grpc_exec_ctx *exec_ctx, grpc_transport_move_stats(&s->stats, s->collecting_stats); s->collecting_stats = NULL; } - grpc_exec_ctx_sched(exec_ctx, closure, closure->error_data.error, NULL); + grpc_closure_run(exec_ctx, closure, closure->error_data.error); } *pclosure = NULL; } @@ -1155,7 +1155,7 @@ static void perform_transport_op_locked(grpc_exec_ctx *exec_ctx, close_transport_locked(exec_ctx, t, close_transport); } - grpc_exec_ctx_sched(exec_ctx, op->on_consumed, GRPC_ERROR_NONE, NULL); + grpc_closure_run(exec_ctx, op->on_consumed, GRPC_ERROR_NONE); GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "transport_op"); } @@ -1199,8 +1199,7 @@ static void check_read_ops(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t) { } grpc_chttp2_incoming_metadata_buffer_publish(&s->metadata_buffer[0], s->recv_initial_metadata); - grpc_exec_ctx_sched(exec_ctx, s->recv_initial_metadata_ready, - GRPC_ERROR_NONE, NULL); + grpc_closure_run(exec_ctx, s->recv_initial_metadata_ready, GRPC_ERROR_NONE); s->recv_initial_metadata_ready = NULL; } if (s->recv_message_ready != NULL) { @@ -1213,13 +1212,11 @@ static void check_read_ops(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t) { *s->recv_message = grpc_chttp2_incoming_frame_queue_pop(&s->incoming_frames); GPR_ASSERT(*s->recv_message != NULL); - grpc_exec_ctx_sched(exec_ctx, s->recv_message_ready, GRPC_ERROR_NONE, - NULL); + grpc_closure_run(exec_ctx, s->recv_message_ready, GRPC_ERROR_NONE); s->recv_message_ready = NULL; } else if (s->published_metadata[1]) { *s->recv_message = NULL; - grpc_exec_ctx_sched(exec_ctx, s->recv_message_ready, GRPC_ERROR_NONE, - NULL); + grpc_closure_run(exec_ctx, s->recv_message_ready, GRPC_ERROR_NONE); s->recv_message_ready = NULL; } } @@ -1853,11 +1850,9 @@ static void incoming_byte_stream_next_locked(grpc_exec_ctx *exec_ctx, gpr_mu_lock(&bs->slice_mu); if (bs->slices.count > 0) { *bs->next_action.slice = gpr_slice_buffer_take_first(&bs->slices); - grpc_exec_ctx_sched(exec_ctx, bs->next_action.on_complete, GRPC_ERROR_NONE, - NULL); + grpc_closure_run(exec_ctx, bs->next_action.on_complete, GRPC_ERROR_NONE); } else if (bs->error != GRPC_ERROR_NONE) { - grpc_exec_ctx_sched(exec_ctx, bs->next_action.on_complete, - GRPC_ERROR_REF(bs->error), NULL); + grpc_closure_run(exec_ctx, bs->next_action.on_complete, GRPC_ERROR_REF(bs->error)); } else { bs->on_next = bs->next_action.on_complete; bs->next = bs->next_action.slice; diff --git a/src/core/lib/iomgr/closure.c b/src/core/lib/iomgr/closure.c index 6200cda5dc..5cbd6bd7a5 100644 --- a/src/core/lib/iomgr/closure.c +++ b/src/core/lib/iomgr/closure.c @@ -35,6 +35,8 @@ #include +#include "src/core/lib/profiling/timers.h" + void grpc_closure_init(grpc_closure *closure, grpc_iomgr_cb_func cb, void *cb_arg) { closure->cb = cb; @@ -110,3 +112,11 @@ grpc_closure *grpc_closure_create(grpc_iomgr_cb_func cb, void *cb_arg) { grpc_closure_init(&wc->wrapper, closure_wrapper, wc); return &wc->wrapper; } + +void grpc_closure_run(grpc_exec_ctx *exec_ctx, grpc_closure *c, grpc_error *error) { + GPR_TIMER_BEGIN("grpc_closure_run", 0); + c->cb(exec_ctx, c->cb_arg, error); + GRPC_ERROR_UNREF(error); + GPR_TIMER_END("grpc_closure_run", 0); +} + diff --git a/src/core/lib/iomgr/closure.h b/src/core/lib/iomgr/closure.h index bf7c006097..29ed19cb4f 100644 --- a/src/core/lib/iomgr/closure.h +++ b/src/core/lib/iomgr/closure.h @@ -109,4 +109,9 @@ void grpc_closure_list_move(grpc_closure_list *src, grpc_closure_list *dst); /** return whether \a list is empty. */ bool grpc_closure_list_empty(grpc_closure_list list); +/** Run a closure directly. Caller ensures that no locks are being held above. + * Note that calling this at the end of a closure callback function itself is + * by definition safe. */ +void grpc_closure_run(grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_error *error); + #endif /* GRPC_CORE_LIB_IOMGR_CLOSURE_H */ diff --git a/src/core/lib/iomgr/exec_ctx.c b/src/core/lib/iomgr/exec_ctx.c index eec32a4f26..a3c40e8092 100644 --- a/src/core/lib/iomgr/exec_ctx.c +++ b/src/core/lib/iomgr/exec_ctx.c @@ -67,12 +67,8 @@ bool grpc_exec_ctx_flush(grpc_exec_ctx *exec_ctx) { exec_ctx->closure_list.head = exec_ctx->closure_list.tail = NULL; while (c != NULL) { grpc_closure *next = c->next_data.next; - grpc_error *error = c->error_data.error; did_something = true; - GPR_TIMER_BEGIN("grpc_exec_ctx_flush.cb", 0); - c->cb(exec_ctx, c->cb_arg, error); - GRPC_ERROR_UNREF(error); - GPR_TIMER_END("grpc_exec_ctx_flush.cb", 0); + grpc_closure_run(exec_ctx, c, c->error_data.error); c = next; } continue; diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index caaed23212..ffdc7c7b42 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -177,7 +177,7 @@ static void call_read_cb(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp, tcp->read_cb = NULL; tcp->incoming_buffer = NULL; - grpc_exec_ctx_sched(exec_ctx, cb, error, NULL); + grpc_closure_run(exec_ctx, cb, error); } #define MAX_READ_IOVEC 4 @@ -279,7 +279,7 @@ static void tcp_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, tcp->finished_edge = false; grpc_fd_notify_on_read(exec_ctx, tcp->em_fd, &tcp->read_closure); } else { - grpc_exec_ctx_sched(exec_ctx, &tcp->read_closure, GRPC_ERROR_NONE, NULL); + grpc_exec_ctx_sched(exec_ctx, &tcp->read_closure, GRPC_ERROR_NONE, grpc_fd_get_workqueue(tcp->em_fd)); } } @@ -392,11 +392,8 @@ static void tcp_handle_write(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, grpc_error_free_string(str); } - GPR_TIMER_BEGIN("tcp_handle_write.cb", 0); - cb->cb(exec_ctx, cb->cb_arg, error); - GPR_TIMER_END("tcp_handle_write.cb", 0); + grpc_closure_run(exec_ctx, cb, error); TCP_UNREF(exec_ctx, tcp, "write"); - GRPC_ERROR_UNREF(error); } } diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index 9a517b0a7a..8f9b995265 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -773,8 +773,7 @@ static void server_on_recv_initial_metadata(grpc_exec_ctx *exec_ctx, void *ptr, GRPC_ERROR_CREATE_REFERENCING("Missing :authority or :path", &error, 1); } - grpc_exec_ctx_sched(exec_ctx, calld->on_done_recv_initial_metadata, error, - NULL); + grpc_closure_run(exec_ctx, calld->on_done_recv_initial_metadata, error); } static void server_mutate_op(grpc_call_element *elem, -- cgit v1.2.3 From 452422e09ffd40dda56d672bd4a23cb8efdb4b31 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 1 Sep 2016 15:54:56 -0700 Subject: Fix some tests --- .../ext/transport/chttp2/transport/chttp2_transport.c | 15 +++++++++------ src/core/lib/surface/call.c | 18 ++++++++++++------ 2 files changed, 21 insertions(+), 12 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index e7d1a84420..a1e1e55f98 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -1169,6 +1169,12 @@ static void perform_transport_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, * INPUT PROCESSING - GENERAL */ +static void run_closure_and_null(grpc_exec_ctx *exec_ctx, grpc_closure **closure, grpc_error *error) { + grpc_closure *c = *closure; + *closure = NULL; + grpc_closure_run(exec_ctx, c, error); +} + void grpc_chttp2_maybe_complete_recv_initial_metadata(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s) { @@ -1182,8 +1188,7 @@ void grpc_chttp2_maybe_complete_recv_initial_metadata(grpc_exec_ctx *exec_ctx, } grpc_chttp2_incoming_metadata_buffer_publish(&s->metadata_buffer[0], s->recv_initial_metadata); - grpc_closure_run(exec_ctx, s->recv_initial_metadata_ready, GRPC_ERROR_NONE); - s->recv_initial_metadata_ready = NULL; + run_closure_and_null(exec_ctx, &s->recv_initial_metadata_ready, GRPC_ERROR_NONE); } } @@ -1201,12 +1206,10 @@ void grpc_chttp2_maybe_complete_recv_message(grpc_exec_ctx *exec_ctx, *s->recv_message = grpc_chttp2_incoming_frame_queue_pop(&s->incoming_frames); GPR_ASSERT(*s->recv_message != NULL); - grpc_closure_run(exec_ctx, s->recv_message_ready, GRPC_ERROR_NONE); - s->recv_message_ready = NULL; + run_closure_and_null(exec_ctx, &s->recv_message_ready, GRPC_ERROR_NONE); } else if (s->published_metadata[1]) { *s->recv_message = NULL; - grpc_closure_run(exec_ctx, s->recv_message_ready, GRPC_ERROR_NONE); - s->recv_message_ready = NULL; + run_closure_and_null(exec_ctx, &s->recv_message_ready, GRPC_ERROR_NONE); } } } diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 858c7f5b88..df07b96f28 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -1092,7 +1092,7 @@ static void post_batch_completion(grpc_exec_ctx *exec_ctx, grpc_call *call = bctl->call; if (bctl->is_notify_tag_closure) { /* unrefs bctl->error */ - grpc_exec_ctx_sched(exec_ctx, bctl->notify_tag, bctl->error, NULL); + grpc_closure_run(exec_ctx, bctl->notify_tag, bctl->error); gpr_mu_lock(&call->mu); bctl->call->used_batches = (uint8_t)(bctl->call->used_batches & @@ -1258,6 +1258,14 @@ static void validate_filtered_metadata(grpc_exec_ctx *exec_ctx, } } +static void add_batch_error(batch_control *bctl, grpc_error *error) { + if (error == GRPC_ERROR_NONE) return; + if (bctl->error == GRPC_ERROR_NONE) { + bctl->error = GRPC_ERROR_CREATE("Call batch operation failed"); + } + bctl->error = grpc_error_add_child(bctl->error, error); +} + static void receiving_initial_metadata_ready(grpc_exec_ctx *exec_ctx, void *bctlp, grpc_error *error) { batch_control *bctl = bctlp; @@ -1265,9 +1273,8 @@ static void receiving_initial_metadata_ready(grpc_exec_ctx *exec_ctx, gpr_mu_lock(&call->mu); - if (error != GRPC_ERROR_NONE) { - bctl->error = GRPC_ERROR_REF(error); - } else { + add_batch_error(bctl, GRPC_ERROR_REF(error)); + if (error == GRPC_ERROR_NONE) { grpc_metadata_batch *md = &call->metadata_batch[1 /* is_receiving */][0 /* is_trailing */]; grpc_metadata_batch_filter(md, recv_initial_filter, call); @@ -1360,8 +1367,7 @@ static void finish_batch(grpc_exec_ctx *exec_ctx, void *bctlp, GRPC_ERROR_UNREF(error); error = GRPC_ERROR_NONE; } - GRPC_ERROR_UNREF(bctl->error); - bctl->error = GRPC_ERROR_REF(error); + add_batch_error(bctl, GRPC_ERROR_REF(error)); gpr_mu_unlock(&call->mu); if (gpr_unref(&bctl->steps_to_complete)) { post_batch_completion(exec_ctx, bctl); -- cgit v1.2.3 From 02b87cdacb68bdda78df345d7cfdecceaf13a1ec Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 2 Sep 2016 09:50:08 -0700 Subject: Small fixes --- src/core/lib/surface/call.c | 13 +++++++++---- test/core/end2end/tests/no_logging.c | 1 + 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index df07b96f28..97bfd587d2 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -1090,9 +1090,14 @@ static void finish_batch_completion(grpc_exec_ctx *exec_ctx, void *user_data, static void post_batch_completion(grpc_exec_ctx *exec_ctx, batch_control *bctl) { grpc_call *call = bctl->call; + grpc_error *error = bctl->error; + if (bctl->recv_final_op) { + GRPC_ERROR_UNREF(error); + error = GRPC_ERROR_NONE; + } if (bctl->is_notify_tag_closure) { /* unrefs bctl->error */ - grpc_closure_run(exec_ctx, bctl->notify_tag, bctl->error); + grpc_closure_run(exec_ctx, bctl->notify_tag, error); gpr_mu_lock(&call->mu); bctl->call->used_batches = (uint8_t)(bctl->call->used_batches & @@ -1101,7 +1106,7 @@ static void post_batch_completion(grpc_exec_ctx *exec_ctx, GRPC_CALL_INTERNAL_UNREF(exec_ctx, call, "completion"); } else { /* unrefs bctl->error */ - grpc_cq_end_op(exec_ctx, bctl->call->cq, bctl->notify_tag, bctl->error, + grpc_cq_end_op(exec_ctx, bctl->call->cq, bctl->notify_tag, error, finish_batch_completion, bctl, &bctl->cq_completion); } } @@ -1273,7 +1278,7 @@ static void receiving_initial_metadata_ready(grpc_exec_ctx *exec_ctx, gpr_mu_lock(&call->mu); - add_batch_error(bctl, GRPC_ERROR_REF(error)); + add_batch_error(bctl, GRPC_ERROR_REF(error)); if (error == GRPC_ERROR_NONE) { grpc_metadata_batch *md = &call->metadata_batch[1 /* is_receiving */][0 /* is_trailing */]; @@ -1367,7 +1372,7 @@ static void finish_batch(grpc_exec_ctx *exec_ctx, void *bctlp, GRPC_ERROR_UNREF(error); error = GRPC_ERROR_NONE; } - add_batch_error(bctl, GRPC_ERROR_REF(error)); + add_batch_error(bctl, GRPC_ERROR_REF(error)); gpr_mu_unlock(&call->mu); if (gpr_unref(&bctl->steps_to_complete)) { post_batch_completion(exec_ctx, bctl); diff --git a/test/core/end2end/tests/no_logging.c b/test/core/end2end/tests/no_logging.c index afa98decc5..d03d336329 100644 --- a/test/core/end2end/tests/no_logging.c +++ b/test/core/end2end/tests/no_logging.c @@ -287,6 +287,7 @@ static void test_no_logging_in_one_request(grpc_end2end_test_config config) { void no_logging(grpc_end2end_test_config config) { gpr_set_log_verbosity(GPR_LOG_SEVERITY_DEBUG); + grpc_tracer_set_enabled("all", 0); test_no_logging_in_one_request(config); test_no_error_logging_in_entire_process(config); } -- cgit v1.2.3 From 86037cd0e7a1e26d77be46bedc45d6d6167d98a7 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 2 Sep 2016 19:58:43 -0700 Subject: fixes --- src/core/lib/iomgr/combiner.c | 22 +++++++++---- src/core/lib/iomgr/error.h | 8 +++-- src/core/lib/iomgr/tcp_posix.c | 2 +- src/core/lib/iomgr/workqueue_posix.c | 62 ++++++++++++++++++++---------------- 4 files changed, 57 insertions(+), 37 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/combiner.c b/src/core/lib/iomgr/combiner.c index 981d3348ce..721db6337e 100644 --- a/src/core/lib/iomgr/combiner.c +++ b/src/core/lib/iomgr/combiner.c @@ -112,7 +112,8 @@ void grpc_combiner_destroy(grpc_exec_ctx *exec_ctx, grpc_combiner *lock) { } } -static void queue_on_exec_ctx(grpc_exec_ctx *exec_ctx, grpc_combiner *lock) { +static void push_last_on_exec_ctx(grpc_exec_ctx *exec_ctx, + grpc_combiner *lock) { lock->next_combiner_on_this_exec_ctx = NULL; if (exec_ctx->active_combiner == NULL) { exec_ctx->active_combiner = exec_ctx->last_combiner = lock; @@ -122,6 +123,15 @@ static void queue_on_exec_ctx(grpc_exec_ctx *exec_ctx, grpc_combiner *lock) { } } +static void push_first_on_exec_ctx(grpc_exec_ctx *exec_ctx, + grpc_combiner *lock) { + lock->next_combiner_on_this_exec_ctx = exec_ctx->active_combiner; + exec_ctx->active_combiner = lock; + if (lock->next_combiner_on_this_exec_ctx == NULL) { + exec_ctx->last_combiner = lock; + } +} + void grpc_combiner_execute(grpc_exec_ctx *exec_ctx, grpc_combiner *lock, grpc_closure *cl, grpc_error *error, bool covered_by_poller) { @@ -140,7 +150,7 @@ void grpc_combiner_execute(grpc_exec_ctx *exec_ctx, grpc_combiner *lock, if (last == 1) { // code will be written when the exec_ctx calls // grpc_combiner_continue_exec_ctx - queue_on_exec_ctx(exec_ctx, lock); + push_last_on_exec_ctx(exec_ctx, lock); } GPR_TIMER_END("combiner.execute", 0); } @@ -155,7 +165,7 @@ static void move_next(grpc_exec_ctx *exec_ctx) { static void offload(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { grpc_combiner *lock = arg; - queue_on_exec_ctx(exec_ctx, lock); + push_last_on_exec_ctx(exec_ctx, lock); } static void queue_offload(grpc_exec_ctx *exec_ctx, grpc_combiner *lock) { @@ -230,10 +240,11 @@ bool grpc_combiner_continue_exec_ctx(grpc_exec_ctx *exec_ctx) { } GPR_TIMER_MARK("unref", 0); + move_next(exec_ctx); + lock->time_to_execute_final_list = false; gpr_atm old_state = gpr_atm_full_fetch_add(&lock->state, -2); GRPC_COMBINER_TRACE( gpr_log(GPR_DEBUG, "C:%p finish old_state=%" PRIdPTR, lock, old_state)); - lock->time_to_execute_final_list = false; switch (old_state) { default: // we have multiple queued work items: just continue executing them @@ -245,11 +256,9 @@ bool grpc_combiner_continue_exec_ctx(grpc_exec_ctx *exec_ctx) { } break; case 3: // had one count, one unorphaned --> unlocked unorphaned - move_next(exec_ctx); GPR_TIMER_END("combiner.continue_exec_ctx", 0); return true; case 2: // and one count, one orphaned --> unlocked and orphaned - move_next(exec_ctx); really_destroy(exec_ctx, lock); GPR_TIMER_END("combiner.continue_exec_ctx", 0); return true; @@ -260,6 +269,7 @@ bool grpc_combiner_continue_exec_ctx(grpc_exec_ctx *exec_ctx) { GPR_TIMER_END("combiner.continue_exec_ctx", 0); GPR_UNREACHABLE_CODE(return true); } + push_first_on_exec_ctx(exec_ctx, lock); GPR_TIMER_END("combiner.continue_exec_ctx", 0); return true; } diff --git a/src/core/lib/iomgr/error.h b/src/core/lib/iomgr/error.h index 6c769accdb..2ab3ef9f40 100644 --- a/src/core/lib/iomgr/error.h +++ b/src/core/lib/iomgr/error.h @@ -123,9 +123,13 @@ typedef enum { GRPC_ERROR_TIME_CREATED, } grpc_error_times; +/// The following "special" errors can be propagated without allocating memory. +/// They are always even so that other code (particularly combiner locks) can +/// safely use the lower bit for themselves. + #define GRPC_ERROR_NONE ((grpc_error *)NULL) -#define GRPC_ERROR_OOM ((grpc_error *)1) -#define GRPC_ERROR_CANCELLED ((grpc_error *)2) +#define GRPC_ERROR_OOM ((grpc_error *)2) +#define GRPC_ERROR_CANCELLED ((grpc_error *)4) const char *grpc_error_string(grpc_error *error); void grpc_error_free_string(const char *str); diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index ffdc7c7b42..00fd77679a 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -279,7 +279,7 @@ static void tcp_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, tcp->finished_edge = false; grpc_fd_notify_on_read(exec_ctx, tcp->em_fd, &tcp->read_closure); } else { - grpc_exec_ctx_sched(exec_ctx, &tcp->read_closure, GRPC_ERROR_NONE, grpc_fd_get_workqueue(tcp->em_fd)); + grpc_exec_ctx_sched(exec_ctx, &tcp->read_closure, GRPC_ERROR_NONE, NULL); } } diff --git a/src/core/lib/iomgr/workqueue_posix.c b/src/core/lib/iomgr/workqueue_posix.c index 6c27c3b41e..c7d4fc6423 100644 --- a/src/core/lib/iomgr/workqueue_posix.c +++ b/src/core/lib/iomgr/workqueue_posix.c @@ -76,7 +76,8 @@ static void workqueue_destroy(grpc_exec_ctx *exec_ctx, static void workqueue_orphan(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue) { - if (gpr_atm_full_fetch_add(&workqueue->state, -1) == 1) { + gpr_atm last = gpr_atm_full_fetch_add(&workqueue->state, -1); + if (last == 1) { workqueue_destroy(exec_ctx, workqueue); } } @@ -143,37 +144,40 @@ static void on_readable(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { gpr_free(workqueue); } else { error = grpc_wakeup_fd_consume_wakeup(&workqueue->wakeup_fd); - gpr_mpscq_node *n = gpr_mpscq_pop(&workqueue->queue); - if (error == GRPC_ERROR_NONE) { - grpc_fd_notify_on_read(exec_ctx, workqueue->wakeup_read_fd, - &workqueue->read_closure); - } else { + if (error != GRPC_ERROR_NONE) { /* recurse to get error handling */ on_readable(exec_ctx, arg, error); - } - if (n == NULL) { - /* try again - queue in an inconsistant state */ - wakeup(exec_ctx, workqueue); } else { - switch (gpr_atm_full_fetch_add(&workqueue->state, -2)) { - case 3: // had one count, one unorphaned --> done, unorphaned - break; - case 2: // had one count, one orphaned --> done, orphaned - workqueue_destroy(exec_ctx, workqueue); - break; - case 1: - case 0: - // these values are illegal - representing an already done or - // deleted workqueue - GPR_UNREACHABLE_CODE(break); - default: - // schedule a wakeup since there's more to do - wakeup(exec_ctx, workqueue); + gpr_mpscq_node *n = gpr_mpscq_pop(&workqueue->queue); + if (n == NULL) { + /* try again - queue in an ephemerally inconsistent state */ + wakeup(exec_ctx, workqueue); + grpc_fd_notify_on_read(exec_ctx, workqueue->wakeup_read_fd, + &workqueue->read_closure); + } else { + gpr_atm last = gpr_atm_full_fetch_add(&workqueue->state, -2); + switch (last) { + default: + // schedule a wakeup since there's more to do + wakeup(exec_ctx, workqueue); + break; + case 3: // had one count, one unorphaned --> done, unorphaned + break; + case 2: // had one count, one orphaned --> done, orphaned + workqueue_destroy(exec_ctx, workqueue); + break; + case 1: + case 0: + // these values are illegal - representing an already done or + // deleted workqueue + GPR_UNREACHABLE_CODE(break); + } + grpc_fd_notify_on_read(exec_ctx, workqueue->wakeup_read_fd, + &workqueue->read_closure); + grpc_closure *cl = (grpc_closure *)n; + grpc_error *clerr = cl->error_data.error; + grpc_closure_run(exec_ctx, cl, clerr); } - grpc_closure *cl = (grpc_closure *)n; - grpc_error *clerr = cl->error_data.error; - cl->cb(exec_ctx, cl->cb_arg, clerr); - GRPC_ERROR_UNREF(clerr); } } @@ -183,6 +187,7 @@ static void on_readable(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { void grpc_workqueue_enqueue(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, grpc_closure *closure, grpc_error *error) { GPR_TIMER_BEGIN("workqueue.enqueue", 0); + GRPC_WORKQUEUE_REF(workqueue, "enqueue"); gpr_atm last = gpr_atm_full_fetch_add(&workqueue->state, 2); GPR_ASSERT(last & 1); closure->error_data.error = error; @@ -190,6 +195,7 @@ void grpc_workqueue_enqueue(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, if (last == 1) { wakeup(exec_ctx, workqueue); } + GRPC_WORKQUEUE_UNREF(exec_ctx, workqueue, "enqueue"); GPR_TIMER_END("workqueue.enqueue", 0); } -- cgit v1.2.3 From 2c4043bd8a822beb07b9cd2feff759302237966f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 5 Sep 2016 14:50:16 -0700 Subject: fixes --- .../transport/chttp2/transport/chttp2_transport.c | 26 ++++++++++++---- src/core/ext/transport/chttp2/transport/writing.c | 4 ++- src/core/lib/surface/completion_queue.c | 35 ++++++++++++++-------- 3 files changed, 46 insertions(+), 19 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 49fff80370..03e1ce0ab7 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -538,6 +538,20 @@ grpc_chttp2_stream *grpc_chttp2_parsing_accept_stream(grpc_exec_ctx *exec_ctx, * OUTPUT PROCESSING */ +static const char *write_state_name(grpc_chttp2_write_state st) { + switch (st) { + case GRPC_CHTTP2_WRITE_STATE_IDLE: return "IDLE"; + case GRPC_CHTTP2_WRITE_STATE_WRITING: return "WRITING"; + case GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE_TO_COME: return "WRITING+MORE"; + } + GPR_UNREACHABLE_CODE(return "UNKNOWN"); +} + +static void set_write_state(grpc_chttp2_transport *t, grpc_chttp2_write_state st) { + GRPC_CHTTP2_IF_TRACING(gpr_log(GPR_DEBUG, "W:%p %s state %s -> %s", t, t->is_client ? "CLIENT" : "SERVER", write_state_name(t->write_state), write_state_name(st))); + t->write_state = st; +} + void grpc_chttp2_initiate_write(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, bool covered_by_poller, const char *reason) { @@ -545,14 +559,14 @@ void grpc_chttp2_initiate_write(grpc_exec_ctx *exec_ctx, switch (t->write_state) { case GRPC_CHTTP2_WRITE_STATE_IDLE: - t->write_state = GRPC_CHTTP2_WRITE_STATE_WRITING; + set_write_state(t, GRPC_CHTTP2_WRITE_STATE_WRITING); GRPC_CHTTP2_REF_TRANSPORT(t, "writing"); grpc_combiner_execute_finally(exec_ctx, t->combiner, &t->write_action_begin_locked, GRPC_ERROR_NONE); break; case GRPC_CHTTP2_WRITE_STATE_WRITING: - t->write_state = GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE_TO_COME; + set_write_state(t, GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE_TO_COME); break; case GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE_TO_COME: break; @@ -576,10 +590,10 @@ static void write_action_begin_locked(grpc_exec_ctx *exec_ctx, void *gt, grpc_chttp2_transport *t = gt; GPR_ASSERT(t->write_state != GRPC_CHTTP2_WRITE_STATE_IDLE); if (!t->closed && grpc_chttp2_begin_write(exec_ctx, t)) { - t->write_state = GRPC_CHTTP2_WRITE_STATE_WRITING; + set_write_state(t, GRPC_CHTTP2_WRITE_STATE_WRITING); grpc_exec_ctx_sched(exec_ctx, &t->write_action, GRPC_ERROR_NONE, NULL); } else { - t->write_state = GRPC_CHTTP2_WRITE_STATE_IDLE; + set_write_state(t, GRPC_CHTTP2_WRITE_STATE_IDLE); GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "writing"); } GPR_TIMER_END("write_action_begin_locked", 0); @@ -617,11 +631,11 @@ static void write_action_end_locked(grpc_exec_ctx *exec_ctx, void *tp, GPR_UNREACHABLE_CODE(break); case GRPC_CHTTP2_WRITE_STATE_WRITING: GPR_TIMER_MARK("state=writing", 0); - t->write_state = GRPC_CHTTP2_WRITE_STATE_IDLE; + set_write_state(t, GRPC_CHTTP2_WRITE_STATE_IDLE); break; case GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE_TO_COME: GPR_TIMER_MARK("state=writing_stale_with_poller", 0); - t->write_state = GRPC_CHTTP2_WRITE_STATE_WRITING; + set_write_state(t, GRPC_CHTTP2_WRITE_STATE_WRITING); GRPC_CHTTP2_REF_TRANSPORT(t, "writing"); grpc_combiner_execute_finally(exec_ctx, t->combiner, &t->write_action_begin_locked, diff --git a/src/core/ext/transport/chttp2/transport/writing.c b/src/core/ext/transport/chttp2/transport/writing.c index c73360ec9c..e34d2991fb 100644 --- a/src/core/ext/transport/chttp2/transport/writing.c +++ b/src/core/ext/transport/chttp2/transport/writing.c @@ -109,6 +109,8 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx, bool sent_initial_metadata = s->sent_initial_metadata; bool now_writing = false; + GRPC_CHTTP2_IF_TRACING(gpr_log(GPR_DEBUG, "W:%p %s[%d] im-(sent,send)=(%d,%d) announce=%d", t, t->is_client?"CLIENT":"SERVER", s->id, sent_initial_metadata, s->send_initial_metadata!=NULL, s->announce_window)); + /* send initial metadata if it's available */ if (!sent_initial_metadata && s->send_initial_metadata) { grpc_chttp2_encode_header(&t->hpack_compressor, s->id, @@ -120,7 +122,7 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx, now_writing = true; } /* send any window updates */ - if (s->announce_window > 0 && sent_initial_metadata) { + if (s->announce_window > 0) { uint32_t announce = s->announce_window; gpr_slice_buffer_add(&t->outbuf, grpc_chttp2_window_update_create( diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c index 1124290699..4e0feb56ac 100644 --- a/src/core/lib/surface/completion_queue.c +++ b/src/core/lib/surface/completion_queue.c @@ -319,6 +319,7 @@ typedef struct { gpr_timespec deadline; grpc_cq_completion *stolen_completion; void *tag; /* for pluck */ + bool first_loop; } cq_is_finished_arg; static bool cq_is_next_finished(grpc_exec_ctx *exec_ctx, void *arg) { @@ -342,7 +343,8 @@ static bool cq_is_next_finished(grpc_exec_ctx *exec_ctx, void *arg) { } gpr_mu_unlock(cq->mu); } - return gpr_time_cmp(a->deadline, gpr_now(a->deadline.clock_type)) < 0; + return !a->first_loop && + gpr_time_cmp(a->deadline, gpr_now(a->deadline.clock_type)) < 0; } #ifndef NDEBUG @@ -370,7 +372,6 @@ grpc_event grpc_completion_queue_next(grpc_completion_queue *cc, gpr_timespec deadline, void *reserved) { grpc_event ret; grpc_pollset_worker *worker = NULL; - int first_loop = 1; gpr_timespec now; GPR_TIMER_BEGIN("grpc_completion_queue_next", 0); @@ -392,8 +393,13 @@ grpc_event grpc_completion_queue_next(grpc_completion_queue *cc, GRPC_CQ_INTERNAL_REF(cc, "next"); gpr_mu_lock(cc->mu); cq_is_finished_arg is_finished_arg = { - gpr_atm_no_barrier_load(&cc->things_queued_ever), cc, deadline, NULL, - NULL}; + .last_seen_things_queued_ever = + gpr_atm_no_barrier_load(&cc->things_queued_ever), + .cq = cc, + .deadline = deadline, + .stolen_completion = NULL, + .tag = NULL, + .first_loop = true}; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT_WITH_FINISH_CHECK( cq_is_next_finished, &is_finished_arg); for (;;) { @@ -427,14 +433,13 @@ grpc_event grpc_completion_queue_next(grpc_completion_queue *cc, break; } now = gpr_now(GPR_CLOCK_MONOTONIC); - if (!first_loop && gpr_time_cmp(now, deadline) >= 0) { + if (!is_finished_arg.first_loop && gpr_time_cmp(now, deadline) >= 0) { gpr_mu_unlock(cc->mu); memset(&ret, 0, sizeof(ret)); ret.type = GRPC_QUEUE_TIMEOUT; dump_pending_tags(cc); break; } - first_loop = 0; /* Check alarms - these are a global resource so we just ping each time through on every pollset. May update deadline to ensure timely wakeups. @@ -461,6 +466,7 @@ grpc_event grpc_completion_queue_next(grpc_completion_queue *cc, break; } } + is_finished_arg.first_loop = false; } GRPC_SURFACE_TRACE_RETURNED_EVENT(cc, &ret); GRPC_CQ_INTERNAL_UNREF(cc, "next"); @@ -523,7 +529,8 @@ static bool cq_is_pluck_finished(grpc_exec_ctx *exec_ctx, void *arg) { } gpr_mu_unlock(cq->mu); } - return gpr_time_cmp(a->deadline, gpr_now(a->deadline.clock_type)) < 0; + return !a->first_loop && + gpr_time_cmp(a->deadline, gpr_now(a->deadline.clock_type)) < 0; } grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag, @@ -533,7 +540,6 @@ grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag, grpc_cq_completion *prev; grpc_pollset_worker *worker = NULL; gpr_timespec now; - int first_loop = 1; GPR_TIMER_BEGIN("grpc_completion_queue_pluck", 0); @@ -556,8 +562,13 @@ grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag, GRPC_CQ_INTERNAL_REF(cc, "pluck"); gpr_mu_lock(cc->mu); cq_is_finished_arg is_finished_arg = { - gpr_atm_no_barrier_load(&cc->things_queued_ever), cc, deadline, NULL, - tag}; + .last_seen_things_queued_ever = + gpr_atm_no_barrier_load(&cc->things_queued_ever), + .cq = cc, + .deadline = deadline, + .stolen_completion = NULL, + .tag = tag, + .first_loop = true}; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT_WITH_FINISH_CHECK( cq_is_pluck_finished, &is_finished_arg); for (;;) { @@ -607,7 +618,7 @@ grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag, break; } now = gpr_now(GPR_CLOCK_MONOTONIC); - if (!first_loop && gpr_time_cmp(now, deadline) >= 0) { + if (!is_finished_arg.first_loop && gpr_time_cmp(now, deadline) >= 0) { del_plucker(cc, tag, &worker); gpr_mu_unlock(cc->mu); memset(&ret, 0, sizeof(ret)); @@ -615,7 +626,6 @@ grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag, dump_pending_tags(cc); break; } - first_loop = 0; /* Check alarms - these are a global resource so we just ping each time through on every pollset. May update deadline to ensure timely wakeups. @@ -642,6 +652,7 @@ grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag, break; } } + is_finished_arg.first_loop = false; del_plucker(cc, tag, &worker); } done: -- cgit v1.2.3 From 09b05fd3fd91a473c42b99cc9636c1634eeb327e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 7 Sep 2016 13:02:05 -0700 Subject: Get write batching working again --- .../transport/chttp2/transport/chttp2_transport.c | 34 +++++++++++++++++----- src/core/ext/transport/chttp2/transport/internal.h | 3 +- src/core/lib/iomgr/combiner.c | 21 +++++++++---- src/core/lib/iomgr/combiner.h | 9 ++---- test/core/iomgr/combiner_test.c | 5 ++-- 5 files changed, 49 insertions(+), 23 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 7adbd66923..986f089397 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -542,8 +542,10 @@ static const char *write_state_name(grpc_chttp2_write_state st) { return "IDLE"; case GRPC_CHTTP2_WRITE_STATE_WRITING: return "WRITING"; - case GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE_TO_COME: + case GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE: return "WRITING+MORE"; + case GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE_AND_COVERED_BY_POLLER: + return "WRITING+MORE+COVERED"; } GPR_UNREACHABLE_CODE(return "UNKNOWN"); } @@ -568,12 +570,22 @@ void grpc_chttp2_initiate_write(grpc_exec_ctx *exec_ctx, GRPC_CHTTP2_REF_TRANSPORT(t, "writing"); grpc_combiner_execute_finally(exec_ctx, t->combiner, &t->write_action_begin_locked, - GRPC_ERROR_NONE); + GRPC_ERROR_NONE, covered_by_poller); break; case GRPC_CHTTP2_WRITE_STATE_WRITING: - set_write_state(t, GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE_TO_COME); + set_write_state( + t, + covered_by_poller + ? GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE_AND_COVERED_BY_POLLER + : GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE); break; - case GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE_TO_COME: + case GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE: + if (covered_by_poller) { + set_write_state( + t, GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE_AND_COVERED_BY_POLLER); + } + break; + case GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE_AND_COVERED_BY_POLLER: break; } GPR_TIMER_END("grpc_chttp2_initiate_write", 0); @@ -638,13 +650,21 @@ static void write_action_end_locked(grpc_exec_ctx *exec_ctx, void *tp, GPR_TIMER_MARK("state=writing", 0); set_write_state(t, GRPC_CHTTP2_WRITE_STATE_IDLE); break; - case GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE_TO_COME: + case GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE: + GPR_TIMER_MARK("state=writing_stale_no_poller", 0); + set_write_state(t, GRPC_CHTTP2_WRITE_STATE_WRITING); + GRPC_CHTTP2_REF_TRANSPORT(t, "writing"); + grpc_combiner_execute_finally(exec_ctx, t->combiner, + &t->write_action_begin_locked, + GRPC_ERROR_NONE, false); + break; + case GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE_AND_COVERED_BY_POLLER: GPR_TIMER_MARK("state=writing_stale_with_poller", 0); set_write_state(t, GRPC_CHTTP2_WRITE_STATE_WRITING); GRPC_CHTTP2_REF_TRANSPORT(t, "writing"); grpc_combiner_execute_finally(exec_ctx, t->combiner, &t->write_action_begin_locked, - GRPC_ERROR_NONE); + GRPC_ERROR_NONE, true); break; } @@ -1861,7 +1881,7 @@ static void incoming_byte_stream_update_flow_control(grpc_exec_ctx *exec_ctx, add_max_recv_bytes); GRPC_CHTTP2_FLOW_CREDIT_STREAM("op", t, s, announce_window, add_max_recv_bytes); - grpc_chttp2_become_writable(exec_ctx, t, s, false, "read_incoming_stream"); + grpc_chttp2_become_writable(exec_ctx, t, s, true, "read_incoming_stream"); } } diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 27acf6321b..6b3e2edd54 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -68,7 +68,8 @@ typedef enum { typedef enum { GRPC_CHTTP2_WRITE_STATE_IDLE, GRPC_CHTTP2_WRITE_STATE_WRITING, - GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE_TO_COME, + GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE, + GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE_AND_COVERED_BY_POLLER, } grpc_chttp2_write_state; /* deframer state for the overall http2 stream of bytes */ diff --git a/src/core/lib/iomgr/combiner.c b/src/core/lib/iomgr/combiner.c index 721db6337e..b2d6559751 100644 --- a/src/core/lib/iomgr/combiner.c +++ b/src/core/lib/iomgr/combiner.c @@ -62,6 +62,7 @@ struct grpc_combiner { // offload safely gpr_atm covered_by_poller; bool time_to_execute_final_list; + bool final_list_covered_by_poller; grpc_closure_list final_list; grpc_closure offload; }; @@ -81,6 +82,11 @@ static error_data unpack_error_data(uintptr_t p) { return (error_data){(grpc_error *)(p & ~(uintptr_t)1), p & 1}; } +static bool is_covered_by_poller(grpc_combiner *lock) { + return lock->final_list_covered_by_poller || + gpr_atm_acq_load(&lock->covered_by_poller) > 0; +} + grpc_combiner *grpc_combiner_create(grpc_workqueue *optional_workqueue) { grpc_combiner *lock = gpr_malloc(sizeof(*lock)); lock->next_combiner_on_this_exec_ctx = NULL; @@ -183,8 +189,7 @@ bool grpc_combiner_continue_exec_ctx(grpc_exec_ctx *exec_ctx) { } if (lock->optional_workqueue != NULL && - grpc_exec_ctx_ready_to_finish(exec_ctx) && - gpr_atm_acq_load(&lock->covered_by_poller) > 0) { + grpc_exec_ctx_ready_to_finish(exec_ctx) && is_covered_by_poller(lock)) { GPR_TIMER_MARK("offload_from_finished_exec_ctx", 0); // this execution context wants to move on, and we have a workqueue (and // so can help the execution context out): schedule remaining work to be @@ -205,8 +210,7 @@ bool grpc_combiner_continue_exec_ctx(grpc_exec_ctx *exec_ctx) { // queue is in an inconsistant state: use this as a cue that we should // go off and do something else for a while (and come back later) GPR_TIMER_MARK("delay_busy", 0); - if (lock->optional_workqueue != NULL && - gpr_atm_acq_load(&lock->covered_by_poller) > 0) { + if (lock->optional_workqueue != NULL && is_covered_by_poller(lock)) { queue_offload(exec_ctx, lock); } GPR_TIMER_END("combiner.continue_exec_ctx", 0); @@ -225,6 +229,7 @@ bool grpc_combiner_continue_exec_ctx(grpc_exec_ctx *exec_ctx) { grpc_closure *c = lock->final_list.head; GPR_ASSERT(c != NULL); grpc_closure_list_init(&lock->final_list); + lock->final_list_covered_by_poller = false; int loops = 0; while (c != NULL) { GPR_TIMER_BEGIN("combiner.exec_1final", 0); @@ -277,11 +282,12 @@ bool grpc_combiner_continue_exec_ctx(grpc_exec_ctx *exec_ctx) { static void enqueue_finally(grpc_exec_ctx *exec_ctx, void *closure, grpc_error *error) { grpc_combiner_execute_finally(exec_ctx, exec_ctx->active_combiner, closure, - GRPC_ERROR_REF(error)); + GRPC_ERROR_REF(error), false); } void grpc_combiner_execute_finally(grpc_exec_ctx *exec_ctx, grpc_combiner *lock, - grpc_closure *closure, grpc_error *error) { + grpc_closure *closure, grpc_error *error, + bool covered_by_poller) { GRPC_COMBINER_TRACE(gpr_log(GPR_DEBUG, "C:%p grpc_combiner_execute_finally c=%p; ac=%p", lock, closure, exec_ctx->active_combiner)); @@ -298,6 +304,9 @@ void grpc_combiner_execute_finally(grpc_exec_ctx *exec_ctx, grpc_combiner *lock, if (grpc_closure_list_empty(lock->final_list)) { gpr_atm_full_fetch_add(&lock->state, 2); } + if (covered_by_poller) { + lock->final_list_covered_by_poller = true; + } grpc_closure_list_append(&lock->final_list, closure, error); GPR_TIMER_END("combiner.execute_finally", 0); } diff --git a/src/core/lib/iomgr/combiner.h b/src/core/lib/iomgr/combiner.h index fa9c143d3c..d04eeed83a 100644 --- a/src/core/lib/iomgr/combiner.h +++ b/src/core/lib/iomgr/combiner.h @@ -55,14 +55,9 @@ void grpc_combiner_execute(grpc_exec_ctx *exec_ctx, grpc_combiner *lock, grpc_closure *closure, grpc_error *error, bool covered_by_poller); // Execute \a action within the lock just prior to unlocking. -// if \a hint_async_break is true, the combiner tries to hand execution to -// another thread before finishing the primary queue of combined closures and -// executing the finally list. -// Deprecation warning: \a hint_async_break will be removed in a future version -// Takes a very slow and round-about path if not called from a -// grpc_combiner_execute closure. void grpc_combiner_execute_finally(grpc_exec_ctx *exec_ctx, grpc_combiner *lock, - grpc_closure *closure, grpc_error *error); + grpc_closure *closure, grpc_error *error, + bool covered_by_poller); bool grpc_combiner_continue_exec_ctx(grpc_exec_ctx *exec_ctx); diff --git a/test/core/iomgr/combiner_test.c b/test/core/iomgr/combiner_test.c index 2ea4e5dd14..f7d5809be7 100644 --- a/test/core/iomgr/combiner_test.c +++ b/test/core/iomgr/combiner_test.c @@ -134,8 +134,9 @@ static void in_finally(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { } static void add_finally(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { - grpc_combiner_execute_finally( - exec_ctx, arg, grpc_closure_create(in_finally, NULL), GRPC_ERROR_NONE); + grpc_combiner_execute_finally(exec_ctx, arg, + grpc_closure_create(in_finally, NULL), + GRPC_ERROR_NONE, false); } static void test_execute_finally(void) { -- cgit v1.2.3 From 0b834b3bd557ffac6991d3c283354f73d780c452 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 7 Sep 2016 14:03:29 -0700 Subject: Fix compiler warning --- src/core/lib/iomgr/workqueue.h | 10 +++++----- src/core/lib/iomgr/workqueue_posix.c | 15 +++++++++------ src/core/lib/iomgr/workqueue_windows.c | 10 +++++++--- 3 files changed, 21 insertions(+), 14 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/workqueue.h b/src/core/lib/iomgr/workqueue.h index b2805dc66c..9f95562fab 100644 --- a/src/core/lib/iomgr/workqueue.h +++ b/src/core/lib/iomgr/workqueue.h @@ -61,17 +61,17 @@ //#define GRPC_WORKQUEUE_REFCOUNT_DEBUG #ifdef GRPC_WORKQUEUE_REFCOUNT_DEBUG #define GRPC_WORKQUEUE_REF(p, r) \ - (grpc_workqueue_ref((p), __FILE__, __LINE__, (r)), (p)) + grpc_workqueue_ref((p), __FILE__, __LINE__, (r)) #define GRPC_WORKQUEUE_UNREF(exec_ctx, p, r) \ grpc_workqueue_unref((exec_ctx), (p), __FILE__, __LINE__, (r)) -void grpc_workqueue_ref(grpc_workqueue *workqueue, const char *file, int line, - const char *reason); +grpc_workqueue *grpc_workqueue_ref(grpc_workqueue *workqueue, const char *file, + int line, const char *reason); void grpc_workqueue_unref(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, const char *file, int line, const char *reason); #else -#define GRPC_WORKQUEUE_REF(p, r) (grpc_workqueue_ref((p)), (p)) +#define GRPC_WORKQUEUE_REF(p, r) grpc_workqueue_ref((p)) #define GRPC_WORKQUEUE_UNREF(cl, p, r) grpc_workqueue_unref((cl), (p)) -void grpc_workqueue_ref(grpc_workqueue *workqueue); +grpc_workqueue *grpc_workqueue_ref(grpc_workqueue *workqueue); void grpc_workqueue_unref(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue); #endif diff --git a/src/core/lib/iomgr/workqueue_posix.c b/src/core/lib/iomgr/workqueue_posix.c index c7d4fc6423..836bb8b6e0 100644 --- a/src/core/lib/iomgr/workqueue_posix.c +++ b/src/core/lib/iomgr/workqueue_posix.c @@ -83,18 +83,21 @@ static void workqueue_orphan(grpc_exec_ctx *exec_ctx, } #ifdef GRPC_WORKQUEUE_REFCOUNT_DEBUG -void grpc_workqueue_ref(grpc_workqueue *workqueue, const char *file, int line, - const char *reason) { - if (workqueue == NULL) return; +grpc_workqueue *grpc_workqueue_ref(grpc_workqueue *workqueue, const char *file, + int line, const char *reason) { + if (workqueue == NULL) return NULL; gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "WORKQUEUE:%p ref %d -> %d %s", workqueue, (int)workqueue->refs.count, (int)workqueue->refs.count + 1, reason); gpr_ref(&workqueue->refs); + return workqueue; } #else -void grpc_workqueue_ref(grpc_workqueue *workqueue) { - if (workqueue == NULL) return; - gpr_ref(&workqueue->refs); +grpc_workqueue *grpc_workqueue_ref(grpc_workqueue *workqueue) { + if (workqueue != NULL) { + gpr_ref(&workqueue->refs); + } + return workqueue; } #endif diff --git a/src/core/lib/iomgr/workqueue_windows.c b/src/core/lib/iomgr/workqueue_windows.c index ee81dc248e..5c93d3c59e 100644 --- a/src/core/lib/iomgr/workqueue_windows.c +++ b/src/core/lib/iomgr/workqueue_windows.c @@ -43,12 +43,16 @@ // workqueues. #ifdef GRPC_WORKQUEUE_REFCOUNT_DEBUG -void grpc_workqueue_ref(grpc_workqueue *workqueue, const char *file, int line, - const char *reason) {} +grpc_workqueue *grpc_workqueue_ref(grpc_workqueue *workqueue, const char *file, + int line, const char *reason) { + return workqueue; +} void grpc_workqueue_unref(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, const char *file, int line, const char *reason) {} #else -void grpc_workqueue_ref(grpc_workqueue *workqueue) {} +grpc_workqueue *grpc_workqueue_ref(grpc_workqueue *workqueue) { + return workqueue; +} void grpc_workqueue_unref(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue) {} #endif -- cgit v1.2.3 From 44b12f9e23cbdb5f5f1be0681b81aeded481debf Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 8 Sep 2016 10:06:14 -0700 Subject: clang-format --- src/core/ext/transport/chttp2/transport/writing.c | 41 +++++++++++++---------- src/core/lib/iomgr/closure.c | 4 +-- src/core/lib/iomgr/closure.h | 3 +- src/core/lib/surface/server.c | 3 +- test/cpp/end2end/thread_stress_test.cc | 3 +- test/cpp/qps/client_sync.cc | 3 +- 6 files changed, 33 insertions(+), 24 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/transport/chttp2/transport/writing.c b/src/core/ext/transport/chttp2/transport/writing.c index 87f4e1e836..bc490569b7 100644 --- a/src/core/ext/transport/chttp2/transport/writing.c +++ b/src/core/ext/transport/chttp2/transport/writing.c @@ -49,7 +49,8 @@ static void add_to_write_list(grpc_chttp2_write_cb **list, static void finish_write_cb(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_chttp2_write_cb *cb, grpc_error *error) { - grpc_chttp2_complete_closure_step(exec_ctx, t, s, &cb->closure, error, "finish_write_cb"); + grpc_chttp2_complete_closure_step(exec_ctx, t, s, &cb->closure, error, + "finish_write_cb"); cb->next = t->write_cb_pool; t->write_cb_pool = cb; } @@ -109,15 +110,17 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx, bool sent_initial_metadata = s->sent_initial_metadata; bool now_writing = false; - GRPC_CHTTP2_IF_TRACING(gpr_log(GPR_DEBUG, "W:%p %s[%d] im-(sent,send)=(%d,%d) announce=%d", t, t->is_client?"CLIENT":"SERVER", s->id, sent_initial_metadata, s->send_initial_metadata!=NULL, s->announce_window)); + GRPC_CHTTP2_IF_TRACING(gpr_log( + GPR_DEBUG, "W:%p %s[%d] im-(sent,send)=(%d,%d) announce=%d", t, + t->is_client ? "CLIENT" : "SERVER", s->id, sent_initial_metadata, + s->send_initial_metadata != NULL, s->announce_window)); /* send initial metadata if it's available */ if (!sent_initial_metadata && s->send_initial_metadata) { - grpc_chttp2_encode_header(&t->hpack_compressor, s->id, - s->send_initial_metadata, 0, -t->settings[GRPC_ACKED_SETTINGS][GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE], - &s->stats.outgoing, - &t->outbuf); + grpc_chttp2_encode_header( + &t->hpack_compressor, s->id, s->send_initial_metadata, 0, + t->settings[GRPC_ACKED_SETTINGS][GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE], + &s->stats.outgoing, &t->outbuf); s->send_initial_metadata = NULL; s->sent_initial_metadata = true; sent_initial_metadata = true; @@ -135,7 +138,8 @@ t->settings[GRPC_ACKED_SETTINGS][GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE], /* send any body bytes, if allowed by flow control */ if (s->flow_controlled_buffer.length > 0) { uint32_t max_outgoing = - (uint32_t)GPR_MIN(t->settings[GRPC_ACKED_SETTINGS][GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE], + (uint32_t)GPR_MIN(t->settings[GRPC_ACKED_SETTINGS] + [GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE], GPR_MIN(s->outgoing_window, t->outgoing_window)); if (max_outgoing > 0) { uint32_t send_bytes = @@ -176,10 +180,11 @@ t->settings[GRPC_ACKED_SETTINGS][GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE], if (s->send_trailing_metadata != NULL && s->fetching_send_message == NULL && s->flow_controlled_buffer.length == 0) { - grpc_chttp2_encode_header(&t->hpack_compressor, s->id, - s->send_trailing_metadata, true, -t->settings[GRPC_ACKED_SETTINGS][GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE], - &s->stats.outgoing, &t->outbuf); + grpc_chttp2_encode_header( + &t->hpack_compressor, s->id, s->send_trailing_metadata, true, + t->settings[GRPC_ACKED_SETTINGS] + [GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE], + &s->stats.outgoing, &t->outbuf); s->send_trailing_metadata = NULL; s->sent_trailing_metadata = true; if (!t->is_client && !s->read_closed) { @@ -225,9 +230,9 @@ void grpc_chttp2_end_write(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, while (grpc_chttp2_list_pop_writing_stream(t, &s)) { if (s->sent_initial_metadata) { - grpc_chttp2_complete_closure_step(exec_ctx, t, s, - &s->send_initial_metadata_finished, - GRPC_ERROR_REF(error), "send_initial_metadata_finished"); + grpc_chttp2_complete_closure_step( + exec_ctx, t, s, &s->send_initial_metadata_finished, + GRPC_ERROR_REF(error), "send_initial_metadata_finished"); } if (s->sending_bytes != 0) { update_list(exec_ctx, t, s, s->sending_bytes, &s->on_write_finished_cbs, @@ -235,9 +240,9 @@ void grpc_chttp2_end_write(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, s->sending_bytes = 0; } if (s->sent_trailing_metadata) { - grpc_chttp2_complete_closure_step(exec_ctx, t, s, - &s->send_trailing_metadata_finished, - GRPC_ERROR_REF(error), "send_trailing_metadata_finished"); + grpc_chttp2_complete_closure_step( + exec_ctx, t, s, &s->send_trailing_metadata_finished, + GRPC_ERROR_REF(error), "send_trailing_metadata_finished"); grpc_chttp2_mark_stream_closed(exec_ctx, t, s, !t->is_client, 1, GRPC_ERROR_REF(error)); } diff --git a/src/core/lib/iomgr/closure.c b/src/core/lib/iomgr/closure.c index 5cbd6bd7a5..2c84e82aca 100644 --- a/src/core/lib/iomgr/closure.c +++ b/src/core/lib/iomgr/closure.c @@ -113,10 +113,10 @@ grpc_closure *grpc_closure_create(grpc_iomgr_cb_func cb, void *cb_arg) { return &wc->wrapper; } -void grpc_closure_run(grpc_exec_ctx *exec_ctx, grpc_closure *c, grpc_error *error) { +void grpc_closure_run(grpc_exec_ctx *exec_ctx, grpc_closure *c, + grpc_error *error) { GPR_TIMER_BEGIN("grpc_closure_run", 0); c->cb(exec_ctx, c->cb_arg, error); GRPC_ERROR_UNREF(error); GPR_TIMER_END("grpc_closure_run", 0); } - diff --git a/src/core/lib/iomgr/closure.h b/src/core/lib/iomgr/closure.h index 29ed19cb4f..2b4b271eaa 100644 --- a/src/core/lib/iomgr/closure.h +++ b/src/core/lib/iomgr/closure.h @@ -112,6 +112,7 @@ bool grpc_closure_list_empty(grpc_closure_list list); /** Run a closure directly. Caller ensures that no locks are being held above. * Note that calling this at the end of a closure callback function itself is * by definition safe. */ -void grpc_closure_run(grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_error *error); +void grpc_closure_run(grpc_exec_ctx *exec_ctx, grpc_closure *closure, + grpc_error *error); #endif /* GRPC_CORE_LIB_IOMGR_CLOSURE_H */ diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index 8f9b995265..9a9fcddb6e 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -447,7 +447,8 @@ static void destroy_channel(grpc_exec_ctx *exec_ctx, channel_data *chand, } GRPC_ERROR_UNREF(error); - grpc_transport_op *op = grpc_make_transport_op(&chand->finish_destroy_channel_closure); + grpc_transport_op *op = + grpc_make_transport_op(&chand->finish_destroy_channel_closure); op->set_accept_stream = true; grpc_channel_next_op(exec_ctx, grpc_channel_stack_element( diff --git a/test/cpp/end2end/thread_stress_test.cc b/test/cpp/end2end/thread_stress_test.cc index ebede19a7f..0b9d4cda9f 100644 --- a/test/cpp/end2end/thread_stress_test.cc +++ b/test/cpp/end2end/thread_stress_test.cc @@ -340,7 +340,8 @@ static void SendRpc(grpc::testing::EchoTestService::Stub* stub, int num_rpcs) { Status s = stub->Echo(&context, request, &response); EXPECT_EQ(response.message(), request.message()); if (!s.ok()) { - gpr_log(GPR_ERROR, "RPC error: %d: %s", s.error_code(), s.error_message().c_str()); + gpr_log(GPR_ERROR, "RPC error: %d: %s", s.error_code(), + s.error_message().c_str()); } ASSERT_TRUE(s.ok()); } diff --git a/test/cpp/qps/client_sync.cc b/test/cpp/qps/client_sync.cc index ef54b4b766..0ccf4e270b 100644 --- a/test/cpp/qps/client_sync.cc +++ b/test/cpp/qps/client_sync.cc @@ -131,7 +131,8 @@ class SynchronousUnaryClient GRPC_FINAL : public SynchronousClient { stub->UnaryCall(&context, request_, &responses_[thread_idx]); entry->set_value((UsageTimer::Now() - start) * 1e9); if (!s.ok()) { - gpr_log(GPR_ERROR, "RPC error: %d: %s", s.error_code(), s.error_message().c_str()); + gpr_log(GPR_ERROR, "RPC error: %d: %s", s.error_code(), + s.error_message().c_str()); } return s.ok(); } -- cgit v1.2.3 From 84ea341aa3c1435182d8f2e0a687fa45bd4a8d1c Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 8 Sep 2016 14:57:56 -0700 Subject: Minor perf improvements --- src/core/lib/iomgr/combiner.c | 2 +- src/core/lib/iomgr/ev_epoll_linux.c | 2 +- src/core/lib/iomgr/workqueue_posix.c | 71 ++++++++++++++++++++++++------------ 3 files changed, 50 insertions(+), 25 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/combiner.c b/src/core/lib/iomgr/combiner.c index b2d6559751..273505f8b8 100644 --- a/src/core/lib/iomgr/combiner.c +++ b/src/core/lib/iomgr/combiner.c @@ -189,7 +189,7 @@ bool grpc_combiner_continue_exec_ctx(grpc_exec_ctx *exec_ctx) { } if (lock->optional_workqueue != NULL && - grpc_exec_ctx_ready_to_finish(exec_ctx) && is_covered_by_poller(lock)) { + is_covered_by_poller(lock) && grpc_exec_ctx_ready_to_finish(exec_ctx)) { GPR_TIMER_MARK("offload_from_finished_exec_ctx", 0); // this execution context wants to move on, and we have a workqueue (and // so can help the execution context out): schedule remaining work to be diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 740920d760..f473e4765c 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -1299,7 +1299,7 @@ static void pollset_reset(grpc_pollset *pollset) { GPR_ASSERT(pollset->polling_island == NULL); } -#define GRPC_EPOLL_MAX_EVENTS 1000 +#define GRPC_EPOLL_MAX_EVENTS 100 /* Note: sig_mask contains the signal mask to use *during* epoll_wait() */ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, diff --git a/src/core/lib/iomgr/workqueue_posix.c b/src/core/lib/iomgr/workqueue_posix.c index 836bb8b6e0..6f8a26684a 100644 --- a/src/core/lib/iomgr/workqueue_posix.c +++ b/src/core/lib/iomgr/workqueue_posix.c @@ -146,42 +146,67 @@ static void on_readable(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { GPR_ASSERT(gpr_atm_no_barrier_load(&workqueue->state) == 0); gpr_free(workqueue); } else { - error = grpc_wakeup_fd_consume_wakeup(&workqueue->wakeup_fd); - if (error != GRPC_ERROR_NONE) { - /* recurse to get error handling */ - on_readable(exec_ctx, arg, error); - } else { - gpr_mpscq_node *n = gpr_mpscq_pop(&workqueue->queue); - if (n == NULL) { - /* try again - queue in an ephemerally inconsistent state */ - wakeup(exec_ctx, workqueue); - grpc_fd_notify_on_read(exec_ctx, workqueue->wakeup_read_fd, - &workqueue->read_closure); - } else { + gpr_mpscq_node *n = NULL; + for (int i = 0; i < 100; i++) { + n = gpr_mpscq_pop(&workqueue->queue); + if (n != NULL) { + grpc_closure *c = (grpc_closure *)n; + grpc_closure_run(exec_ctx, c, c->error_data.error); + grpc_exec_ctx_flush(exec_ctx); gpr_atm last = gpr_atm_full_fetch_add(&workqueue->state, -2); switch (last) { default: - // schedule a wakeup since there's more to do - wakeup(exec_ctx, workqueue); - break; + // there's more to do, keep going + goto keep_going; case 3: // had one count, one unorphaned --> done, unorphaned - break; + goto switch_to_idle; case 2: // had one count, one orphaned --> done, orphaned - workqueue_destroy(exec_ctx, workqueue); - break; + goto destroy; case 1: case 0: // these values are illegal - representing an already done or // deleted workqueue GPR_UNREACHABLE_CODE(break); } - grpc_fd_notify_on_read(exec_ctx, workqueue->wakeup_read_fd, - &workqueue->read_closure); - grpc_closure *cl = (grpc_closure *)n; - grpc_error *clerr = cl->error_data.error; - grpc_closure_run(exec_ctx, cl, clerr); } } + /* fall through to wakeup_next -- we tried a bunch of times to pull a node + * but failed */ +wakeup_next: + error = grpc_wakeup_fd_consume_wakeup(&workqueue->wakeup_fd); + if (error != GRPC_ERROR_NONE) { + /* recurse to get error handling */ + on_readable(exec_ctx, arg, error); + } else { + grpc_fd_notify_on_read(exec_ctx, workqueue->wakeup_read_fd, + &workqueue->read_closure); + wakeup(exec_ctx, workqueue); + } + return; + +keep_going: + if (grpc_exec_ctx_ready_to_finish(exec_ctx)) { + goto wakeup_next; + } else { + /* recurse to continue */ + on_readable(exec_ctx, arg, GRPC_ERROR_NONE); + } + return; + +switch_to_idle: + error = grpc_wakeup_fd_consume_wakeup(&workqueue->wakeup_fd); + if (error != GRPC_ERROR_NONE) { + /* recurse to get error handling */ + on_readable(exec_ctx, arg, error); + } else { + grpc_fd_notify_on_read(exec_ctx, workqueue->wakeup_read_fd, + &workqueue->read_closure); + } + return; + +destroy: + workqueue_destroy(exec_ctx, workqueue); + return; } GPR_TIMER_END("workqueue.on_readable", 0); -- cgit v1.2.3 From d8a3c048e25f141a19a60e7f2439d699a21cdcc7 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 9 Sep 2016 12:42:37 -0700 Subject: Tie workqueue implementation to event engine --- BUILD | 12 -- CMakeLists.txt | 5 - Makefile | 6 - binding.gyp | 1 - build.yaml | 2 - config.m4 | 1 - gRPC-Core.podspec | 3 - grpc.gemspec | 2 - package.xml | 2 - src/core/lib/iomgr/combiner.c | 5 +- src/core/lib/iomgr/ev_epoll_linux.c | 194 +++++++++++++---- src/core/lib/iomgr/ev_poll_and_epoll_posix.c | 30 +++ src/core/lib/iomgr/ev_poll_posix.c | 30 +++ src/core/lib/iomgr/ev_posix.c | 23 +++ src/core/lib/iomgr/ev_posix.h | 12 ++ src/core/lib/iomgr/workqueue.h | 4 - src/core/lib/iomgr/workqueue_posix.c | 230 --------------------- src/core/lib/iomgr/workqueue_posix.h | 61 ------ src/python/grpcio/grpc_core_dependencies.py | 1 - tools/doxygen/Doxyfile.c++.internal | 2 - tools/doxygen/Doxyfile.core.internal | 2 - tools/profiling/perf/run_perf_unconstrained.sh | 97 +++++++++ tools/run_tests/sources_and_headers.json | 3 - vsprojects/vcxproj/grpc++/grpc++.vcxproj | 3 - vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters | 6 - .../grpc++_unsecure/grpc++_unsecure.vcxproj | 3 - .../grpc++_unsecure.vcxproj.filters | 6 - vsprojects/vcxproj/grpc/grpc.vcxproj | 3 - vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 6 - .../vcxproj/grpc_test_util/grpc_test_util.vcxproj | 3 - .../grpc_test_util/grpc_test_util.vcxproj.filters | 6 - .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 3 - .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 6 - 33 files changed, 345 insertions(+), 428 deletions(-) delete mode 100644 src/core/lib/iomgr/workqueue_posix.c delete mode 100644 src/core/lib/iomgr/workqueue_posix.h create mode 100755 tools/profiling/perf/run_perf_unconstrained.sh (limited to 'src/core/lib') diff --git a/BUILD b/BUILD index 7db1c1d2f6..e03bce72c6 100644 --- a/BUILD +++ b/BUILD @@ -221,7 +221,6 @@ cc_library( "src/core/lib/iomgr/wakeup_fd_pipe.h", "src/core/lib/iomgr/wakeup_fd_posix.h", "src/core/lib/iomgr/workqueue.h", - "src/core/lib/iomgr/workqueue_posix.h", "src/core/lib/iomgr/workqueue_windows.h", "src/core/lib/json/json.h", "src/core/lib/json/json_common.h", @@ -380,7 +379,6 @@ cc_library( "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_posix.c", "src/core/lib/iomgr/workqueue_windows.c", "src/core/lib/json/json.c", "src/core/lib/json/json_reader.c", @@ -618,7 +616,6 @@ cc_library( "src/core/lib/iomgr/wakeup_fd_pipe.h", "src/core/lib/iomgr/wakeup_fd_posix.h", "src/core/lib/iomgr/workqueue.h", - "src/core/lib/iomgr/workqueue_posix.h", "src/core/lib/iomgr/workqueue_windows.h", "src/core/lib/json/json.h", "src/core/lib/json/json_common.h", @@ -763,7 +760,6 @@ cc_library( "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_posix.c", "src/core/lib/iomgr/workqueue_windows.c", "src/core/lib/json/json.c", "src/core/lib/json/json_reader.c", @@ -972,7 +968,6 @@ cc_library( "src/core/lib/iomgr/wakeup_fd_pipe.h", "src/core/lib/iomgr/wakeup_fd_posix.h", "src/core/lib/iomgr/workqueue.h", - "src/core/lib/iomgr/workqueue_posix.h", "src/core/lib/iomgr/workqueue_windows.h", "src/core/lib/json/json.h", "src/core/lib/json/json_common.h", @@ -1108,7 +1103,6 @@ cc_library( "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_posix.c", "src/core/lib/iomgr/workqueue_windows.c", "src/core/lib/json/json.c", "src/core/lib/json/json_reader.c", @@ -1321,7 +1315,6 @@ cc_library( "src/core/lib/iomgr/wakeup_fd_pipe.h", "src/core/lib/iomgr/wakeup_fd_posix.h", "src/core/lib/iomgr/workqueue.h", - "src/core/lib/iomgr/workqueue_posix.h", "src/core/lib/iomgr/workqueue_windows.h", "src/core/lib/json/json.h", "src/core/lib/json/json_common.h", @@ -1437,7 +1430,6 @@ cc_library( "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_posix.c", "src/core/lib/iomgr/workqueue_windows.c", "src/core/lib/json/json.c", "src/core/lib/json/json_reader.c", @@ -1733,7 +1725,6 @@ cc_library( "src/core/lib/iomgr/wakeup_fd_pipe.h", "src/core/lib/iomgr/wakeup_fd_posix.h", "src/core/lib/iomgr/workqueue.h", - "src/core/lib/iomgr/workqueue_posix.h", "src/core/lib/iomgr/workqueue_windows.h", "src/core/lib/json/json.h", "src/core/lib/json/json_common.h", @@ -1844,7 +1835,6 @@ cc_library( "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_posix.c", "src/core/lib/iomgr/workqueue_windows.c", "src/core/lib/json/json.c", "src/core/lib/json/json_reader.c", @@ -2237,7 +2227,6 @@ objc_library( "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_posix.c", "src/core/lib/iomgr/workqueue_windows.c", "src/core/lib/json/json.c", "src/core/lib/json/json_reader.c", @@ -2454,7 +2443,6 @@ objc_library( "src/core/lib/iomgr/wakeup_fd_pipe.h", "src/core/lib/iomgr/wakeup_fd_posix.h", "src/core/lib/iomgr/workqueue.h", - "src/core/lib/iomgr/workqueue_posix.h", "src/core/lib/iomgr/workqueue_windows.h", "src/core/lib/json/json.h", "src/core/lib/json/json_common.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 915c406c9a..0495cafe54 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -351,7 +351,6 @@ add_library(grpc 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_posix.c src/core/lib/iomgr/workqueue_windows.c src/core/lib/json/json.c src/core/lib/json/json_reader.c @@ -610,7 +609,6 @@ add_library(grpc_cronet 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_posix.c src/core/lib/iomgr/workqueue_windows.c src/core/lib/json/json.c src/core/lib/json/json_reader.c @@ -842,7 +840,6 @@ add_library(grpc_unsecure 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_posix.c src/core/lib/iomgr/workqueue_windows.c src/core/lib/json/json.c src/core/lib/json/json_reader.c @@ -1100,7 +1097,6 @@ add_library(grpc++ 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_posix.c src/core/lib/iomgr/workqueue_windows.c src/core/lib/json/json.c src/core/lib/json/json_reader.c @@ -1458,7 +1454,6 @@ add_library(grpc++_unsecure 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_posix.c src/core/lib/iomgr/workqueue_windows.c src/core/lib/json/json.c src/core/lib/json/json_reader.c diff --git a/Makefile b/Makefile index 219c0e4a43..e2338e9b40 100644 --- a/Makefile +++ b/Makefile @@ -2580,7 +2580,6 @@ LIBGRPC_SRC = \ 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_posix.c \ src/core/lib/iomgr/workqueue_windows.c \ src/core/lib/json/json.c \ src/core/lib/json/json_reader.c \ @@ -2857,7 +2856,6 @@ LIBGRPC_CRONET_SRC = \ 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_posix.c \ src/core/lib/iomgr/workqueue_windows.c \ src/core/lib/json/json.c \ src/core/lib/json/json_reader.c \ @@ -3123,7 +3121,6 @@ LIBGRPC_TEST_UTIL_SRC = \ 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_posix.c \ src/core/lib/iomgr/workqueue_windows.c \ src/core/lib/json/json.c \ src/core/lib/json/json_reader.c \ @@ -3317,7 +3314,6 @@ LIBGRPC_UNSECURE_SRC = \ 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_posix.c \ src/core/lib/iomgr/workqueue_windows.c \ src/core/lib/json/json.c \ src/core/lib/json/json_reader.c \ @@ -3658,7 +3654,6 @@ LIBGRPC++_SRC = \ 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_posix.c \ src/core/lib/iomgr/workqueue_windows.c \ src/core/lib/json/json.c \ src/core/lib/json/json_reader.c \ @@ -4294,7 +4289,6 @@ LIBGRPC++_UNSECURE_SRC = \ 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_posix.c \ src/core/lib/iomgr/workqueue_windows.c \ src/core/lib/json/json.c \ src/core/lib/json/json_reader.c \ diff --git a/binding.gyp b/binding.gyp index b4f182c4b7..15ee99ae1c 100644 --- a/binding.gyp +++ b/binding.gyp @@ -623,7 +623,6 @@ '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_posix.c', 'src/core/lib/iomgr/workqueue_windows.c', 'src/core/lib/json/json.c', 'src/core/lib/json/json_reader.c', diff --git a/build.yaml b/build.yaml index ee459ea3f5..1350af0b11 100644 --- a/build.yaml +++ b/build.yaml @@ -223,7 +223,6 @@ filegroups: - src/core/lib/iomgr/wakeup_fd_pipe.h - src/core/lib/iomgr/wakeup_fd_posix.h - src/core/lib/iomgr/workqueue.h - - src/core/lib/iomgr/workqueue_posix.h - src/core/lib/iomgr/workqueue_windows.h - src/core/lib/json/json.h - src/core/lib/json/json_common.h @@ -307,7 +306,6 @@ filegroups: - 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_posix.c - src/core/lib/iomgr/workqueue_windows.c - src/core/lib/json/json.c - src/core/lib/json/json_reader.c diff --git a/config.m4 b/config.m4 index 5947306c39..01b448e593 100644 --- a/config.m4 +++ b/config.m4 @@ -142,7 +142,6 @@ if test "$PHP_GRPC" != "no"; then 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_posix.c \ src/core/lib/iomgr/workqueue_windows.c \ src/core/lib/json/json.c \ src/core/lib/json/json_reader.c \ diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 895e39b2a7..3746e2d2ff 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -312,7 +312,6 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/wakeup_fd_pipe.h', 'src/core/lib/iomgr/wakeup_fd_posix.h', 'src/core/lib/iomgr/workqueue.h', - 'src/core/lib/iomgr/workqueue_posix.h', 'src/core/lib/iomgr/workqueue_windows.h', 'src/core/lib/json/json.h', 'src/core/lib/json/json_common.h', @@ -475,7 +474,6 @@ Pod::Spec.new do |s| '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_posix.c', 'src/core/lib/iomgr/workqueue_windows.c', 'src/core/lib/json/json.c', 'src/core/lib/json/json_reader.c', @@ -677,7 +675,6 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/wakeup_fd_pipe.h', 'src/core/lib/iomgr/wakeup_fd_posix.h', 'src/core/lib/iomgr/workqueue.h', - 'src/core/lib/iomgr/workqueue_posix.h', 'src/core/lib/iomgr/workqueue_windows.h', 'src/core/lib/json/json.h', 'src/core/lib/json/json_common.h', diff --git a/grpc.gemspec b/grpc.gemspec index 2a27492cfe..b5bd5eb102 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -232,7 +232,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/wakeup_fd_pipe.h ) s.files += %w( src/core/lib/iomgr/wakeup_fd_posix.h ) s.files += %w( src/core/lib/iomgr/workqueue.h ) - s.files += %w( src/core/lib/iomgr/workqueue_posix.h ) s.files += %w( src/core/lib/iomgr/workqueue_windows.h ) s.files += %w( src/core/lib/json/json.h ) s.files += %w( src/core/lib/json/json_common.h ) @@ -395,7 +394,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/wakeup_fd_nospecial.c ) s.files += %w( src/core/lib/iomgr/wakeup_fd_pipe.c ) s.files += %w( src/core/lib/iomgr/wakeup_fd_posix.c ) - s.files += %w( src/core/lib/iomgr/workqueue_posix.c ) s.files += %w( src/core/lib/iomgr/workqueue_windows.c ) s.files += %w( src/core/lib/json/json.c ) s.files += %w( src/core/lib/json/json_reader.c ) diff --git a/package.xml b/package.xml index 4f596e0e8f..2b2045a563 100644 --- a/package.xml +++ b/package.xml @@ -239,7 +239,6 @@ - @@ -402,7 +401,6 @@ - diff --git a/src/core/lib/iomgr/combiner.c b/src/core/lib/iomgr/combiner.c index 273505f8b8..2b68240a15 100644 --- a/src/core/lib/iomgr/combiner.c +++ b/src/core/lib/iomgr/combiner.c @@ -92,6 +92,7 @@ grpc_combiner *grpc_combiner_create(grpc_workqueue *optional_workqueue) { lock->next_combiner_on_this_exec_ctx = NULL; lock->time_to_execute_final_list = false; lock->optional_workqueue = optional_workqueue; + lock->final_list_covered_by_poller = false; gpr_atm_no_barrier_store(&lock->state, 1); gpr_atm_no_barrier_store(&lock->covered_by_poller, 0); gpr_mpscq_init(&lock->queue); @@ -188,8 +189,8 @@ bool grpc_combiner_continue_exec_ctx(grpc_exec_ctx *exec_ctx) { return false; } - if (lock->optional_workqueue != NULL && - is_covered_by_poller(lock) && grpc_exec_ctx_ready_to_finish(exec_ctx)) { + if (lock->optional_workqueue != NULL && is_covered_by_poller(lock) && + grpc_exec_ctx_ready_to_finish(exec_ctx)) { GPR_TIMER_MARK("offload_from_finished_exec_ctx", 0); // this execution context wants to move on, and we have a workqueue (and // so can help the execution context out): schedule remaining work to be diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index f473e4765c..864fe62cb6 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -152,14 +152,13 @@ static void fd_global_shutdown(void); * Polling island Declarations */ -//#define GRPC_PI_REF_COUNT_DEBUG -#ifdef GRPC_PI_REF_COUNT_DEBUG +#ifdef GRPC_WORKQUEUE_REFCOUNT_DEBUG #define PI_ADD_REF(p, r) pi_add_ref_dbg((p), (r), __FILE__, __LINE__) #define PI_UNREF(exec_ctx, p, r) \ pi_unref_dbg((exec_ctx), (p), (r), __FILE__, __LINE__) -#else /* defined(GRPC_PI_REF_COUNT_DEBUG) */ +#else /* defined(GRPC_WORKQUEUE_REFCOUNT_DEBUG) */ #define PI_ADD_REF(p, r) pi_add_ref((p)) #define PI_UNREF(exec_ctx, p, r) pi_unref((exec_ctx), (p)) @@ -185,8 +184,11 @@ typedef struct polling_island { * (except mu and ref_count) are invalid and must be ignored. */ gpr_atm merged_to; - /* The workqueue associated with this polling island */ - grpc_workqueue *workqueue; + gpr_atm poller_count; + gpr_mu workqueue_read_mu; + gpr_mpscq workqueue_items; + gpr_atm workqueue_item_count; + grpc_wakeup_fd workqueue_wakeup_fd; /* The fd of the underlying epoll set */ int epoll_fd; @@ -275,6 +277,8 @@ static bool append_error(grpc_error **composite, grpc_error *error, threads that woke up MUST NOT call grpc_wakeup_fd_consume_wakeup() */ static grpc_wakeup_fd polling_island_wakeup_fd; +static __thread polling_island *g_current_thread_polling_island; + /* Forward declaration */ static void polling_island_delete(grpc_exec_ctx *exec_ctx, polling_island *pi); @@ -289,10 +293,10 @@ static void polling_island_delete(grpc_exec_ctx *exec_ctx, polling_island *pi); gpr_atm g_epoll_sync; #endif /* defined(GRPC_TSAN) */ -#ifdef GRPC_PI_REF_COUNT_DEBUG static void pi_add_ref(polling_island *pi); static void pi_unref(grpc_exec_ctx *exec_ctx, polling_island *pi); +#ifdef GRPC_WORKQUEUE_REFCOUNT_DEBUG static void pi_add_ref_dbg(polling_island *pi, char *reason, char *file, int line) { long old_cnt = gpr_atm_acq_load(&pi->ref_count); @@ -308,6 +312,36 @@ static void pi_unref_dbg(grpc_exec_ctx *exec_ctx, polling_island *pi, gpr_log(GPR_DEBUG, "Unref pi: %p, old:%ld -> new:%ld (%s) - (%s, %d)", (void *)pi, old_cnt, (old_cnt - 1), reason, file, line); } + +static grpc_workqueue *workqueue_ref(grpc_workqueue *workqueue, + const char *file, int line, + const char *reason) { + if (workqueue != NULL) { + pi_add_ref_debug((polling_island *)workqueue, reason, file, line); + } + return workqueue; +} + +static void workqueue_unref(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, + const char *file, int line, const char *reason) { + if (workqueue != NULL) { + pi_unref_dbg((polling_island *)workqueue, reason, file, line); + } +} +#else +static grpc_workqueue *workqueue_ref(grpc_workqueue *workqueue) { + if (workqueue != NULL) { + pi_add_ref((polling_island *)workqueue); + } + return workqueue; +} + +static void workqueue_unref(grpc_exec_ctx *exec_ctx, + grpc_workqueue *workqueue) { + if (workqueue != NULL) { + pi_unref(exec_ctx, (polling_island *)workqueue); + } +} #endif static void pi_add_ref(polling_island *pi) { @@ -315,10 +349,7 @@ static void pi_add_ref(polling_island *pi) { } static void pi_unref(grpc_exec_ctx *exec_ctx, polling_island *pi) { - /* If ref count went to one, we're back to just the workqueue owning a ref. - Unref the workqueue to break the loop. - - If ref count went to zero, delete the polling island. + /* If ref count went to zero, delete the polling island. Note that this deletion not be done under a lock. Once the ref count goes to zero, we are guaranteed that no one else holds a reference to the polling island (and that there is no racing pi_add_ref() call either). @@ -326,20 +357,12 @@ static void pi_unref(grpc_exec_ctx *exec_ctx, polling_island *pi) { Also, if we are deleting the polling island and the merged_to field is non-empty, we should remove a ref to the merged_to polling island */ - switch (gpr_atm_full_fetch_add(&pi->ref_count, -1)) { - case 2: /* last external ref: the only one now owned is by the workqueue */ - GRPC_WORKQUEUE_UNREF(exec_ctx, pi->workqueue, "polling_island"); - break; - case 1: { - polling_island *next = (polling_island *)gpr_atm_acq_load(&pi->merged_to); - polling_island_delete(exec_ctx, pi); - if (next != NULL) { - PI_UNREF(exec_ctx, next, "pi_delete"); /* Recursive call */ - } - break; + if (1 == gpr_atm_full_fetch_add(&pi->ref_count, -1)) { + polling_island *next = (polling_island *)gpr_atm_acq_load(&pi->merged_to); + polling_island_delete(exec_ctx, pi); + if (next != NULL) { + PI_UNREF(exec_ctx, next, "pi_delete"); /* Recursive call */ } - case 0: - GPR_UNREACHABLE_CODE(return ); } } @@ -488,11 +511,20 @@ static polling_island *polling_island_create(grpc_exec_ctx *exec_ctx, pi->fd_capacity = 0; pi->fds = NULL; pi->epoll_fd = -1; - pi->workqueue = NULL; + + gpr_mu_init(&pi->workqueue_read_mu); + gpr_mpscq_init(&pi->workqueue_items); + gpr_atm_rel_store(&pi->workqueue_item_count, 0); gpr_atm_rel_store(&pi->ref_count, 0); + gpr_atm_rel_store(&pi->poller_count, 0); gpr_atm_rel_store(&pi->merged_to, (gpr_atm)NULL); + if (!append_error(error, grpc_wakeup_fd_init(&pi->workqueue_wakeup_fd), + err_desc)) { + goto done; + } + pi->epoll_fd = epoll_create1(EPOLL_CLOEXEC); if (pi->epoll_fd < 0) { @@ -501,26 +533,14 @@ static polling_island *polling_island_create(grpc_exec_ctx *exec_ctx, } polling_island_add_wakeup_fd_locked(pi, &grpc_global_wakeup_fd, error); + polling_island_add_wakeup_fd_locked(pi, &pi->workqueue_wakeup_fd, error); if (initial_fd != NULL) { polling_island_add_fds_locked(pi, &initial_fd, 1, true, error); } - if (append_error(error, grpc_workqueue_create(exec_ctx, &pi->workqueue), - err_desc) && - *error == GRPC_ERROR_NONE) { - polling_island_add_fds_locked(pi, &pi->workqueue->wakeup_read_fd, 1, true, - error); - GPR_ASSERT(pi->workqueue->wakeup_read_fd->polling_island == NULL); - pi->workqueue->wakeup_read_fd->polling_island = pi; - PI_ADD_REF(pi, "fd"); - } - done: if (*error != GRPC_ERROR_NONE) { - if (pi->workqueue != NULL) { - GRPC_WORKQUEUE_UNREF(exec_ctx, pi->workqueue, "polling_island"); - } polling_island_delete(exec_ctx, pi); pi = NULL; } @@ -533,7 +553,11 @@ static void polling_island_delete(grpc_exec_ctx *exec_ctx, polling_island *pi) { if (pi->epoll_fd >= 0) { close(pi->epoll_fd); } + GPR_ASSERT(gpr_atm_no_barrier_load(&pi->workqueue_item_count) == 0); + gpr_mu_destroy(&pi->workqueue_read_mu); + gpr_mpscq_destroy(&pi->workqueue_items); gpr_mu_destroy(&pi->mu); + grpc_wakeup_fd_destroy(&pi->workqueue_wakeup_fd); gpr_free(pi->fds); gpr_free(pi); } @@ -678,6 +702,40 @@ static void polling_island_unlock_pair(polling_island *p, polling_island *q) { } } +static void workqueue_maybe_wakeup(polling_island *pi) { + bool force_wakeup = false; + bool is_current_poller = (g_current_thread_polling_island == pi); + gpr_atm min_current_pollers_for_wakeup = is_current_poller ? 1 : 0; + gpr_atm current_pollers = gpr_atm_no_barrier_load(&pi->poller_count); + if (force_wakeup || current_pollers > min_current_pollers_for_wakeup) { + GRPC_LOG_IF_ERROR("workqueue_wakeup_fd", + grpc_wakeup_fd_wakeup(&pi->workqueue_wakeup_fd)); + } +} + +static void workqueue_move_items_to_parent(polling_island *q) { + polling_island *p = (polling_island *)gpr_atm_no_barrier_load(&q->merged_to); + if (p == NULL) { + return; + } + gpr_mu_lock(&q->workqueue_read_mu); + int num_added = 0; + while (gpr_atm_no_barrier_load(&q->workqueue_item_count) > 0) { + gpr_mpscq_node *n = gpr_mpscq_pop(&q->workqueue_items); + if (n != NULL) { + gpr_atm_no_barrier_fetch_add(&q->workqueue_item_count, -1); + gpr_atm_no_barrier_fetch_add(&p->workqueue_item_count, 1); + gpr_mpscq_push(&p->workqueue_items, n); + num_added++; + } + } + gpr_mu_unlock(&q->workqueue_read_mu); + if (num_added > 0) { + workqueue_maybe_wakeup(p); + } + workqueue_move_items_to_parent(p); +} + static polling_island *polling_island_merge(polling_island *p, polling_island *q, grpc_error **error) { @@ -702,6 +760,8 @@ static polling_island *polling_island_merge(polling_island *p, /* Add the 'merged_to' link from p --> q */ gpr_atm_rel_store(&p->merged_to, (gpr_atm)q); PI_ADD_REF(q, "pi_merge"); /* To account for the new incoming ref from p */ + + workqueue_move_items_to_parent(q); } /* else if p == q, nothing needs to be done */ @@ -712,6 +772,21 @@ static polling_island *polling_island_merge(polling_island *p, return q; } +static void workqueue_enqueue(grpc_exec_ctx *exec_ctx, + grpc_workqueue *workqueue, grpc_closure *closure, + grpc_error *error) { + polling_island *pi = (polling_island *)workqueue; + GPR_TIMER_BEGIN("workqueue.enqueue", 0); + gpr_atm last = gpr_atm_no_barrier_fetch_add(&pi->workqueue_item_count, 1); + closure->error_data.error = error; + gpr_mpscq_push(&pi->workqueue_items, &closure->next_data.atm_next); + if (last == 0) { + workqueue_maybe_wakeup(pi); + } + GPR_TIMER_END("workqueue.enqueue", 0); + workqueue_move_items_to_parent(pi); +} + static grpc_error *polling_island_global_init() { grpc_error *error = GRPC_ERROR_NONE; @@ -1042,11 +1117,8 @@ static void fd_notify_on_write(grpc_exec_ctx *exec_ctx, grpc_fd *fd, static grpc_workqueue *fd_get_workqueue(grpc_fd *fd) { gpr_mu_lock(&fd->mu); - grpc_workqueue *workqueue = NULL; - if (fd->polling_island != NULL) { - workqueue = - GRPC_WORKQUEUE_REF(fd->polling_island->workqueue, "get_workqueue"); - } + grpc_workqueue *workqueue = + grpc_workqueue_ref((grpc_workqueue *)fd->polling_island); gpr_mu_unlock(&fd->mu); return workqueue; } @@ -1299,6 +1371,25 @@ static void pollset_reset(grpc_pollset *pollset) { GPR_ASSERT(pollset->polling_island == NULL); } +static bool maybe_do_workqueue_work(grpc_exec_ctx *exec_ctx, + polling_island *pi) { + if (gpr_mu_trylock(&pi->workqueue_read_mu)) { + gpr_mpscq_node *n = gpr_mpscq_pop(&pi->workqueue_items); + gpr_mu_unlock(&pi->workqueue_read_mu); + if (n != NULL) { + if (gpr_atm_full_fetch_add(&pi->workqueue_item_count, -1) > 1) { + workqueue_maybe_wakeup(pi); + } + grpc_closure *c = (grpc_closure *)n; + grpc_closure_run(exec_ctx, c, c->error_data.error); + return true; + } else if (gpr_atm_no_barrier_load(&pi->workqueue_item_count) > 0) { + workqueue_maybe_wakeup(pi); + } + } + return false; +} + #define GRPC_EPOLL_MAX_EVENTS 100 /* Note: sig_mask contains the signal mask to use *during* epoll_wait() */ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, @@ -1354,7 +1445,10 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, PI_ADD_REF(pi, "ps_work"); gpr_mu_unlock(&pollset->mu); - do { + if (!maybe_do_workqueue_work(exec_ctx, pi)) { + gpr_atm_no_barrier_fetch_add(&pi->poller_count, 1); + g_current_thread_polling_island = pi; + GRPC_SCHEDULING_START_BLOCKING_REGION; ep_rv = epoll_pwait(epoll_fd, ep_ev, GRPC_EPOLL_MAX_EVENTS, timeout_ms, sig_mask); @@ -1386,6 +1480,11 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, append_error(error, grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd), err_desc); + } else if (data_ptr == &pi->workqueue_wakeup_fd) { + append_error(error, + grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd), + err_desc); + maybe_do_workqueue_work(exec_ctx, pi); } else if (data_ptr == &polling_island_wakeup_fd) { GRPC_POLLING_TRACE( "pollset_work: pollset: %p, worker: %p polling island (epoll_fd: " @@ -1408,7 +1507,10 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, } } } - } while (ep_rv == GRPC_EPOLL_MAX_EVENTS); + + g_current_thread_polling_island = NULL; + gpr_atm_no_barrier_fetch_add(&pi->poller_count, -1); + } GPR_ASSERT(pi != NULL); @@ -1868,6 +1970,10 @@ static const grpc_event_engine_vtable vtable = { .kick_poller = kick_poller, + .workqueue_ref = workqueue_ref, + .workqueue_unref = workqueue_unref, + .workqueue_enqueue = workqueue_enqueue, + .shutdown_engine = shutdown_engine, }; diff --git a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c index c2107e5e39..1829440a6e 100644 --- a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c +++ b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c @@ -1988,6 +1988,32 @@ static void pollset_set_del_fd(grpc_exec_ctx *exec_ctx, gpr_mu_unlock(&pollset_set->mu); } +/******************************************************************************* + * workqueue stubs + */ + +#ifdef GRPC_WORKQUEUE_REFCOUNT_DEBUG +static grpc_workqueue *workqueue_ref(grpc_workqueue *workqueue, + const char *file, int line, + const char *reason) { + return workqueue; +} +static void workqueue_unref(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, + const char *file, int line, const char *reason) {} +#else +static grpc_workqueue *workqueue_ref(grpc_workqueue *workqueue) { + return workqueue; +} +static void workqueue_unref(grpc_exec_ctx *exec_ctx, + grpc_workqueue *workqueue) {} +#endif + +static void workqueue_enqueue(grpc_exec_ctx *exec_ctx, + grpc_workqueue *workqueue, grpc_closure *closure, + grpc_error *error) { + grpc_exec_ctx_sched(exec_ctx, closure, error, NULL); +} + /******************************************************************************* * event engine binding */ @@ -2029,6 +2055,10 @@ static const grpc_event_engine_vtable vtable = { .kick_poller = kick_poller, + .workqueue_ref = workqueue_ref, + .workqueue_unref = workqueue_unref, + .workqueue_enqueue = workqueue_enqueue, + .shutdown_engine = shutdown_engine, }; diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.c index 16a5e3083e..b84a56018f 100644 --- a/src/core/lib/iomgr/ev_poll_posix.c +++ b/src/core/lib/iomgr/ev_poll_posix.c @@ -1235,6 +1235,32 @@ static void pollset_set_del_fd(grpc_exec_ctx *exec_ctx, gpr_mu_unlock(&pollset_set->mu); } +/******************************************************************************* + * workqueue stubs + */ + +#ifdef GRPC_WORKQUEUE_REFCOUNT_DEBUG +static grpc_workqueue *workqueue_ref(grpc_workqueue *workqueue, + const char *file, int line, + const char *reason) { + return workqueue; +} +static void workqueue_unref(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, + const char *file, int line, const char *reason) {} +#else +static grpc_workqueue *workqueue_ref(grpc_workqueue *workqueue) { + return workqueue; +} +static void workqueue_unref(grpc_exec_ctx *exec_ctx, + grpc_workqueue *workqueue) {} +#endif + +static void workqueue_enqueue(grpc_exec_ctx *exec_ctx, + grpc_workqueue *workqueue, grpc_closure *closure, + grpc_error *error) { + grpc_exec_ctx_sched(exec_ctx, closure, error, NULL); +} + /******************************************************************************* * event engine binding */ @@ -1273,6 +1299,10 @@ static const grpc_event_engine_vtable vtable = { .kick_poller = kick_poller, + .workqueue_ref = workqueue_ref, + .workqueue_unref = workqueue_unref, + .workqueue_enqueue = workqueue_enqueue, + .shutdown_engine = shutdown_engine, }; diff --git a/src/core/lib/iomgr/ev_posix.c b/src/core/lib/iomgr/ev_posix.c index 6536672685..26618f8d55 100644 --- a/src/core/lib/iomgr/ev_posix.c +++ b/src/core/lib/iomgr/ev_posix.c @@ -258,4 +258,27 @@ void grpc_pollset_set_del_fd(grpc_exec_ctx *exec_ctx, grpc_error *grpc_kick_poller(void) { return g_event_engine->kick_poller(); } +#ifdef GRPC_WORKQUEUE_REFCOUNT_DEBUG +grpc_workqueue *grpc_workqueue_ref(grpc_workqueue *workqueue, const char *file, + int line, const char *reason) { + return g_event_engine->workqueue_ref(workqueue, file, line, reason); +} +void grpc_workqueue_unref(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, + const char *file, int line, const char *reason) { + g_event_engine->workqueue_unref(exec_ctx, workqueue, file, line, reason); +} +#else +grpc_workqueue *grpc_workqueue_ref(grpc_workqueue *workqueue) { + return g_event_engine->workqueue_ref(workqueue); +} +void grpc_workqueue_unref(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue) { + g_event_engine->workqueue_unref(exec_ctx, workqueue); +} +#endif + +void grpc_workqueue_enqueue(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, + grpc_closure *closure, grpc_error *error) { + g_event_engine->workqueue_enqueue(exec_ctx, workqueue, closure, error); +} + #endif // GPR_POSIX_SOCKET diff --git a/src/core/lib/iomgr/ev_posix.h b/src/core/lib/iomgr/ev_posix.h index c2aa1756ea..9666fe5e86 100644 --- a/src/core/lib/iomgr/ev_posix.h +++ b/src/core/lib/iomgr/ev_posix.h @@ -95,6 +95,18 @@ typedef struct grpc_event_engine_vtable { grpc_error *(*kick_poller)(void); void (*shutdown_engine)(void); + +#ifdef GRPC_WORKQUEUE_REFCOUNT_DEBUG + grpc_workqueue *(*workqueue_ref)(grpc_workqueue *workqueue, const char *file, + int line, const char *reason); + void (*workqueue_unref)(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, + const char *file, int line, const char *reason); +#else + grpc_workqueue *(*workqueue_ref)(grpc_workqueue *workqueue); + void (*workqueue_unref)(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue); +#endif + void (*workqueue_enqueue)(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, + grpc_closure *closure, grpc_error *error); } grpc_event_engine_vtable; void grpc_event_engine_init(void); diff --git a/src/core/lib/iomgr/workqueue.h b/src/core/lib/iomgr/workqueue.h index 9f95562fab..e1902a36d2 100644 --- a/src/core/lib/iomgr/workqueue.h +++ b/src/core/lib/iomgr/workqueue.h @@ -40,10 +40,6 @@ #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/pollset_set.h" -#ifdef GPR_POSIX_SOCKET -#include "src/core/lib/iomgr/workqueue_posix.h" -#endif - #ifdef GPR_WINDOWS #include "src/core/lib/iomgr/workqueue_windows.h" #endif diff --git a/src/core/lib/iomgr/workqueue_posix.c b/src/core/lib/iomgr/workqueue_posix.c deleted file mode 100644 index 6f8a26684a..0000000000 --- a/src/core/lib/iomgr/workqueue_posix.c +++ /dev/null @@ -1,230 +0,0 @@ -/* - * - * 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. - * - */ - -#include - -#ifdef GPR_POSIX_SOCKET - -#include "src/core/lib/iomgr/workqueue.h" - -#include - -#include -#include -#include - -#include "src/core/lib/iomgr/ev_posix.h" -#include "src/core/lib/profiling/timers.h" - -static void on_readable(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error); - -grpc_error *grpc_workqueue_create(grpc_exec_ctx *exec_ctx, - grpc_workqueue **workqueue) { - char name[32]; - *workqueue = gpr_malloc(sizeof(grpc_workqueue)); - gpr_ref_init(&(*workqueue)->refs, 1); - gpr_atm_no_barrier_store(&(*workqueue)->state, 1); - grpc_error *err = grpc_wakeup_fd_init(&(*workqueue)->wakeup_fd); - if (err != GRPC_ERROR_NONE) { - gpr_free(*workqueue); - return err; - } - sprintf(name, "workqueue:%p", (void *)(*workqueue)); - (*workqueue)->wakeup_read_fd = grpc_fd_create( - GRPC_WAKEUP_FD_GET_READ_FD(&(*workqueue)->wakeup_fd), name); - gpr_mpscq_init(&(*workqueue)->queue); - grpc_closure_init(&(*workqueue)->read_closure, on_readable, *workqueue); - grpc_fd_notify_on_read(exec_ctx, (*workqueue)->wakeup_read_fd, - &(*workqueue)->read_closure); - return GRPC_ERROR_NONE; -} - -static void workqueue_destroy(grpc_exec_ctx *exec_ctx, - grpc_workqueue *workqueue) { - grpc_fd_shutdown(exec_ctx, workqueue->wakeup_read_fd); -} - -static void workqueue_orphan(grpc_exec_ctx *exec_ctx, - grpc_workqueue *workqueue) { - gpr_atm last = gpr_atm_full_fetch_add(&workqueue->state, -1); - if (last == 1) { - workqueue_destroy(exec_ctx, workqueue); - } -} - -#ifdef GRPC_WORKQUEUE_REFCOUNT_DEBUG -grpc_workqueue *grpc_workqueue_ref(grpc_workqueue *workqueue, const char *file, - int line, const char *reason) { - if (workqueue == NULL) return NULL; - gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "WORKQUEUE:%p ref %d -> %d %s", - workqueue, (int)workqueue->refs.count, (int)workqueue->refs.count + 1, - reason); - gpr_ref(&workqueue->refs); - return workqueue; -} -#else -grpc_workqueue *grpc_workqueue_ref(grpc_workqueue *workqueue) { - if (workqueue != NULL) { - gpr_ref(&workqueue->refs); - } - return workqueue; -} -#endif - -#ifdef GRPC_WORKQUEUE_REFCOUNT_DEBUG -void grpc_workqueue_unref(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, - const char *file, int line, const char *reason) { - if (workqueue == NULL) return; - gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "WORKQUEUE:%p unref %d -> %d %s", - workqueue, (int)workqueue->refs.count, (int)workqueue->refs.count - 1, - reason); - if (gpr_unref(&workqueue->refs)) { - workqueue_orphan(exec_ctx, workqueue); - } -} -#else -void grpc_workqueue_unref(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue) { - if (workqueue == NULL) return; - if (gpr_unref(&workqueue->refs)) { - workqueue_orphan(exec_ctx, workqueue); - } -} -#endif - -static void drain(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue) { - abort(); -} - -static void wakeup(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue) { - GPR_TIMER_MARK("workqueue.wakeup", 0); - grpc_error *err = grpc_wakeup_fd_wakeup(&workqueue->wakeup_fd); - if (!GRPC_LOG_IF_ERROR("wakeupfd_wakeup", err)) { - drain(exec_ctx, workqueue); - } -} - -static void on_readable(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { - GPR_TIMER_BEGIN("workqueue.on_readable", 0); - - grpc_workqueue *workqueue = arg; - - if (error != GRPC_ERROR_NONE) { - /* HACK: let wakeup_fd code know that we stole the fd */ - workqueue->wakeup_fd.read_fd = 0; - grpc_wakeup_fd_destroy(&workqueue->wakeup_fd); - grpc_fd_orphan(exec_ctx, workqueue->wakeup_read_fd, NULL, NULL, "destroy"); - GPR_ASSERT(gpr_atm_no_barrier_load(&workqueue->state) == 0); - gpr_free(workqueue); - } else { - gpr_mpscq_node *n = NULL; - for (int i = 0; i < 100; i++) { - n = gpr_mpscq_pop(&workqueue->queue); - if (n != NULL) { - grpc_closure *c = (grpc_closure *)n; - grpc_closure_run(exec_ctx, c, c->error_data.error); - grpc_exec_ctx_flush(exec_ctx); - gpr_atm last = gpr_atm_full_fetch_add(&workqueue->state, -2); - switch (last) { - default: - // there's more to do, keep going - goto keep_going; - case 3: // had one count, one unorphaned --> done, unorphaned - goto switch_to_idle; - case 2: // had one count, one orphaned --> done, orphaned - goto destroy; - case 1: - case 0: - // these values are illegal - representing an already done or - // deleted workqueue - GPR_UNREACHABLE_CODE(break); - } - } - } - /* fall through to wakeup_next -- we tried a bunch of times to pull a node - * but failed */ -wakeup_next: - error = grpc_wakeup_fd_consume_wakeup(&workqueue->wakeup_fd); - if (error != GRPC_ERROR_NONE) { - /* recurse to get error handling */ - on_readable(exec_ctx, arg, error); - } else { - grpc_fd_notify_on_read(exec_ctx, workqueue->wakeup_read_fd, - &workqueue->read_closure); - wakeup(exec_ctx, workqueue); - } - return; - -keep_going: - if (grpc_exec_ctx_ready_to_finish(exec_ctx)) { - goto wakeup_next; - } else { - /* recurse to continue */ - on_readable(exec_ctx, arg, GRPC_ERROR_NONE); - } - return; - -switch_to_idle: - error = grpc_wakeup_fd_consume_wakeup(&workqueue->wakeup_fd); - if (error != GRPC_ERROR_NONE) { - /* recurse to get error handling */ - on_readable(exec_ctx, arg, error); - } else { - grpc_fd_notify_on_read(exec_ctx, workqueue->wakeup_read_fd, - &workqueue->read_closure); - } - return; - -destroy: - workqueue_destroy(exec_ctx, workqueue); - return; - } - - GPR_TIMER_END("workqueue.on_readable", 0); -} - -void grpc_workqueue_enqueue(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, - grpc_closure *closure, grpc_error *error) { - GPR_TIMER_BEGIN("workqueue.enqueue", 0); - GRPC_WORKQUEUE_REF(workqueue, "enqueue"); - gpr_atm last = gpr_atm_full_fetch_add(&workqueue->state, 2); - GPR_ASSERT(last & 1); - closure->error_data.error = error; - gpr_mpscq_push(&workqueue->queue, &closure->next_data.atm_next); - if (last == 1) { - wakeup(exec_ctx, workqueue); - } - GRPC_WORKQUEUE_UNREF(exec_ctx, workqueue, "enqueue"); - GPR_TIMER_END("workqueue.enqueue", 0); -} - -#endif /* GPR_POSIX_SOCKET */ diff --git a/src/core/lib/iomgr/workqueue_posix.h b/src/core/lib/iomgr/workqueue_posix.h deleted file mode 100644 index 03ee21cef7..0000000000 --- a/src/core/lib/iomgr/workqueue_posix.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * - * 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. - * - */ - -#ifndef GRPC_CORE_LIB_IOMGR_WORKQUEUE_POSIX_H -#define GRPC_CORE_LIB_IOMGR_WORKQUEUE_POSIX_H - -#include "src/core/lib/iomgr/wakeup_fd_posix.h" -#include "src/core/lib/support/mpscq.h" - -struct grpc_fd; - -struct grpc_workqueue { - gpr_refcount refs; - gpr_mpscq queue; - // state is: - // lower bit - zero if orphaned - // other bits - number of items enqueued - gpr_atm state; - - grpc_wakeup_fd wakeup_fd; - struct grpc_fd *wakeup_read_fd; - - grpc_closure read_closure; -}; - -/** Create a work queue. Returns an error if creation fails. If creation - succeeds, sets *workqueue to point to it. */ -grpc_error *grpc_workqueue_create(grpc_exec_ctx *exec_ctx, - grpc_workqueue **workqueue); - -#endif /* GRPC_CORE_LIB_IOMGR_WORKQUEUE_POSIX_H */ diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index d53f46b18b..15a8a10fca 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -136,7 +136,6 @@ CORE_SOURCE_FILES = [ '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_posix.c', 'src/core/lib/iomgr/workqueue_windows.c', 'src/core/lib/json/json.c', 'src/core/lib/json/json_reader.c', diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 0a412dd706..e95f0de8c8 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -929,7 +929,6 @@ src/core/lib/iomgr/unix_sockets_posix.h \ src/core/lib/iomgr/wakeup_fd_pipe.h \ src/core/lib/iomgr/wakeup_fd_posix.h \ src/core/lib/iomgr/workqueue.h \ -src/core/lib/iomgr/workqueue_posix.h \ src/core/lib/iomgr/workqueue_windows.h \ src/core/lib/json/json.h \ src/core/lib/json/json_common.h \ @@ -1045,7 +1044,6 @@ 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_posix.c \ src/core/lib/iomgr/workqueue_windows.c \ src/core/lib/json/json.c \ src/core/lib/json/json_reader.c \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 1c55859d26..25b047b51f 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -846,7 +846,6 @@ src/core/lib/iomgr/unix_sockets_posix.h \ src/core/lib/iomgr/wakeup_fd_pipe.h \ src/core/lib/iomgr/wakeup_fd_posix.h \ src/core/lib/iomgr/workqueue.h \ -src/core/lib/iomgr/workqueue_posix.h \ src/core/lib/iomgr/workqueue_windows.h \ src/core/lib/json/json.h \ src/core/lib/json/json_common.h \ @@ -1009,7 +1008,6 @@ 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_posix.c \ src/core/lib/iomgr/workqueue_windows.c \ src/core/lib/json/json.c \ src/core/lib/json/json_reader.c \ diff --git a/tools/profiling/perf/run_perf_unconstrained.sh b/tools/profiling/perf/run_perf_unconstrained.sh new file mode 100755 index 0000000000..a4c2dfa7fd --- /dev/null +++ b/tools/profiling/perf/run_perf_unconstrained.sh @@ -0,0 +1,97 @@ +#!/bin/bash +# Copyright 2016, 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. + +# format argument via +# $ echo '{...}' | python -mjson.tool +read -r -d '' SCENARIOS_JSON_ARG <<'EOF' +{ + "scenarios": [ + { + "benchmark_seconds": 60, + "warmup_seconds": 5, + "client_config": { + "client_channels": 100, + "client_type": "ASYNC_CLIENT", + "histogram_params": { + "max_possible": 60000000000.0, + "resolution": 0.01 + }, + "load_params": { + "closed_loop": {} + }, + "outstanding_rpcs_per_channel": 100, + "payload_config": { + "simple_params": { + "req_size": 0, + "resp_size": 0 + } + }, + "rpc_type": "UNARY", + "security_params": null + }, + "name": "name_goes_here", + "num_clients": 1, + "num_servers": 1, + "server_config": { + "security_params": null, + "server_type": "ASYNC_SERVER" + }, + "spawn_local_worker_count": -2 + } + ] +} + +EOF + +set -ex + +cd $(dirname $0)/../../.. + +CPUS=`python -c 'import multiprocessing; print multiprocessing.cpu_count()'` + +# try to use pypy for generating reports +# each trace dumps 7-8gig of text to disk, and processing this into a report is +# heavyweight - so any speed boost is worthwhile +# TODO(ctiller): consider rewriting report generation in C++ for performance +if which pypy >/dev/null; then + PYTHON=pypy +else + PYTHON=python2.7 +fi + +export config=mutrace + +make CONFIG=$config -j$CPUS qps_json_driver + +bins/$config/qps_json_driver --scenarios_json="$SCENARIOS_JSON_ARG" + +#sudo perf record -F 997 -g bins/$config/qps_json_driver --scenarios_json="$SCENARIOS_JSON_ARG" +#sudo perf report + diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 37355c7e11..980328c82a 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -5978,7 +5978,6 @@ "src/core/lib/iomgr/wakeup_fd_pipe.h", "src/core/lib/iomgr/wakeup_fd_posix.h", "src/core/lib/iomgr/workqueue.h", - "src/core/lib/iomgr/workqueue_posix.h", "src/core/lib/iomgr/workqueue_windows.h", "src/core/lib/json/json.h", "src/core/lib/json/json_common.h", @@ -6128,8 +6127,6 @@ "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_posix.c", - "src/core/lib/iomgr/workqueue_posix.h", "src/core/lib/iomgr/workqueue_windows.c", "src/core/lib/iomgr/workqueue_windows.h", "src/core/lib/json/json.c", diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index 354351364e..79139f6e51 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -429,7 +429,6 @@ - @@ -638,8 +637,6 @@ - - diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters index e284e3f7f3..f78fe62fed 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters @@ -274,9 +274,6 @@ src\core\lib\iomgr - - src\core\lib\iomgr - src\core\lib\iomgr @@ -884,9 +881,6 @@ src\core\lib\iomgr - - src\core\lib\iomgr - src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj index ac1593464f..118b4ddf4b 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -425,7 +425,6 @@ - @@ -624,8 +623,6 @@ - - diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters index 9352918fb0..be1ea64396 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters @@ -259,9 +259,6 @@ src\core\lib\iomgr - - src\core\lib\iomgr - src\core\lib\iomgr @@ -857,9 +854,6 @@ src\core\lib\iomgr - - src\core\lib\iomgr - src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 98873ca8d7..ff49d6c6b2 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -355,7 +355,6 @@ - @@ -579,8 +578,6 @@ - - diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index f3d7958f7c..a7a9266a7d 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -178,9 +178,6 @@ src\core\lib\iomgr - - src\core\lib\iomgr - src\core\lib\iomgr @@ -836,9 +833,6 @@ src\core\lib\iomgr - - src\core\lib\iomgr - src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index b1bdde584d..6e15f249a6 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -246,7 +246,6 @@ - @@ -423,8 +422,6 @@ - - diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index b78c7bfb36..2cef219892 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -226,9 +226,6 @@ src\core\lib\iomgr - - src\core\lib\iomgr - src\core\lib\iomgr @@ -617,9 +614,6 @@ src\core\lib\iomgr - - src\core\lib\iomgr - src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 0ea880833a..2d8b04c7cd 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -345,7 +345,6 @@ - @@ -547,8 +546,6 @@ - - diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index 7549a9609d..a3429b351f 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -181,9 +181,6 @@ src\core\lib\iomgr - - src\core\lib\iomgr - src\core\lib\iomgr @@ -746,9 +743,6 @@ src\core\lib\iomgr - - src\core\lib\iomgr - src\core\lib\iomgr -- cgit v1.2.3 From a10b0b102012e11d43e1b6337accee4b6986bdf2 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 9 Sep 2016 16:20:07 -0700 Subject: Fix refcount debug --- src/core/lib/iomgr/ev_epoll_linux.c | 14 +++++++------- src/core/lib/iomgr/ev_posix.h | 1 + src/core/lib/iomgr/workqueue.h | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 864fe62cb6..5a69c088cd 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -297,8 +297,8 @@ static void pi_add_ref(polling_island *pi); static void pi_unref(grpc_exec_ctx *exec_ctx, polling_island *pi); #ifdef GRPC_WORKQUEUE_REFCOUNT_DEBUG -static void pi_add_ref_dbg(polling_island *pi, char *reason, char *file, - int line) { +static void pi_add_ref_dbg(polling_island *pi, const char *reason, + const char *file, int line) { long old_cnt = gpr_atm_acq_load(&pi->ref_count); pi_add_ref(pi); gpr_log(GPR_DEBUG, "Add ref pi: %p, old: %ld -> new:%ld (%s) - (%s, %d)", @@ -306,7 +306,7 @@ static void pi_add_ref_dbg(polling_island *pi, char *reason, char *file, } static void pi_unref_dbg(grpc_exec_ctx *exec_ctx, polling_island *pi, - char *reason, char *file, int line) { + const char *reason, const char *file, int line) { long old_cnt = gpr_atm_acq_load(&pi->ref_count); pi_unref(exec_ctx, pi); gpr_log(GPR_DEBUG, "Unref pi: %p, old:%ld -> new:%ld (%s) - (%s, %d)", @@ -317,7 +317,7 @@ static grpc_workqueue *workqueue_ref(grpc_workqueue *workqueue, const char *file, int line, const char *reason) { if (workqueue != NULL) { - pi_add_ref_debug((polling_island *)workqueue, reason, file, line); + pi_add_ref_dbg((polling_island *)workqueue, reason, file, line); } return workqueue; } @@ -325,7 +325,7 @@ static grpc_workqueue *workqueue_ref(grpc_workqueue *workqueue, static void workqueue_unref(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, const char *file, int line, const char *reason) { if (workqueue != NULL) { - pi_unref_dbg((polling_island *)workqueue, reason, file, line); + pi_unref_dbg(exec_ctx, (polling_island *)workqueue, reason, file, line); } } #else @@ -1117,8 +1117,8 @@ static void fd_notify_on_write(grpc_exec_ctx *exec_ctx, grpc_fd *fd, static grpc_workqueue *fd_get_workqueue(grpc_fd *fd) { gpr_mu_lock(&fd->mu); - grpc_workqueue *workqueue = - grpc_workqueue_ref((grpc_workqueue *)fd->polling_island); + grpc_workqueue *workqueue = GRPC_WORKQUEUE_REF( + (grpc_workqueue *)fd->polling_island, "fd_get_workqueue"); gpr_mu_unlock(&fd->mu); return workqueue; } diff --git a/src/core/lib/iomgr/ev_posix.h b/src/core/lib/iomgr/ev_posix.h index 9666fe5e86..2fdef06838 100644 --- a/src/core/lib/iomgr/ev_posix.h +++ b/src/core/lib/iomgr/ev_posix.h @@ -40,6 +40,7 @@ #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/iomgr/wakeup_fd_posix.h" +#include "src/core/lib/iomgr/workqueue.h" typedef struct grpc_fd grpc_fd; diff --git a/src/core/lib/iomgr/workqueue.h b/src/core/lib/iomgr/workqueue.h index e1902a36d2..703ea7819e 100644 --- a/src/core/lib/iomgr/workqueue.h +++ b/src/core/lib/iomgr/workqueue.h @@ -54,7 +54,7 @@ string will be printed alongside the refcount. When it is not defined, the string will be discarded at compilation time. */ -//#define GRPC_WORKQUEUE_REFCOUNT_DEBUG +#define GRPC_WORKQUEUE_REFCOUNT_DEBUG #ifdef GRPC_WORKQUEUE_REFCOUNT_DEBUG #define GRPC_WORKQUEUE_REF(p, r) \ grpc_workqueue_ref((p), __FILE__, __LINE__, (r)) -- cgit v1.2.3 From 1dc5dbb78628dc95c125fd46319930db52191ffc Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 9 Sep 2016 17:09:39 -0700 Subject: Fix refcount bug --- src/core/lib/iomgr/ev_epoll_linux.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 5a69c088cd..42c0ae2dcd 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -775,16 +775,21 @@ static polling_island *polling_island_merge(polling_island *p, static void workqueue_enqueue(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, grpc_closure *closure, grpc_error *error) { - polling_island *pi = (polling_island *)workqueue; GPR_TIMER_BEGIN("workqueue.enqueue", 0); + /* take a ref to the workqueue: otherwise it can happen that whatever events + * this kicks off ends up destroying the workqueue before this function + * completes */ + GRPC_WORKQUEUE_REF(workqueue, "enqueue"); + polling_island *pi = (polling_island *)workqueue; gpr_atm last = gpr_atm_no_barrier_fetch_add(&pi->workqueue_item_count, 1); closure->error_data.error = error; gpr_mpscq_push(&pi->workqueue_items, &closure->next_data.atm_next); if (last == 0) { workqueue_maybe_wakeup(pi); } - GPR_TIMER_END("workqueue.enqueue", 0); workqueue_move_items_to_parent(pi); + GRPC_WORKQUEUE_UNREF(exec_ctx, workqueue, "enqueue"); + GPR_TIMER_END("workqueue.enqueue", 0); } static grpc_error *polling_island_global_init() { -- cgit v1.2.3 From 39cfffaed42c30270e8a492d58377416f6ac697d Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Sat, 10 Sep 2016 10:00:17 -0700 Subject: Disable debug --- src/core/lib/iomgr/workqueue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/workqueue.h b/src/core/lib/iomgr/workqueue.h index 703ea7819e..5b96d1d851 100644 --- a/src/core/lib/iomgr/workqueue.h +++ b/src/core/lib/iomgr/workqueue.h @@ -54,7 +54,7 @@ string will be printed alongside the refcount. When it is not defined, the string will be discarded at compilation time. */ -#define GRPC_WORKQUEUE_REFCOUNT_DEBUG +/*#define GRPC_WORKQUEUE_REFCOUNT_DEBUG*/ #ifdef GRPC_WORKQUEUE_REFCOUNT_DEBUG #define GRPC_WORKQUEUE_REF(p, r) \ grpc_workqueue_ref((p), __FILE__, __LINE__, (r)) -- cgit v1.2.3 From fc2636d7a66cc39596dbaebb1813adc93191290d Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 12 Sep 2016 09:57:07 -0700 Subject: Fix resource leak --- .../transport/chttp2/transport/chttp2_transport.c | 32 ++++++++++++++-------- src/core/lib/iomgr/combiner.c | 23 ++++++++++++---- src/core/lib/iomgr/iomgr.c | 11 ++++++-- src/core/lib/support/log.c | 3 +- test/core/end2end/tests/payload.c | 6 ++-- 5 files changed, 50 insertions(+), 25 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index ff883dbd76..88ae81a35d 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -564,11 +564,11 @@ static const char *write_state_name(grpc_chttp2_write_state st) { } static void set_write_state(grpc_chttp2_transport *t, - grpc_chttp2_write_state st) { - GRPC_CHTTP2_IF_TRACING(gpr_log(GPR_DEBUG, "W:%p %s state %s -> %s", t, + grpc_chttp2_write_state st, const char *reason) { + GRPC_CHTTP2_IF_TRACING(gpr_log(GPR_DEBUG, "W:%p %s state %s -> %s [%s]", t, t->is_client ? "CLIENT" : "SERVER", write_state_name(t->write_state), - write_state_name(st))); + write_state_name(st), reason)); t->write_state = st; } @@ -579,7 +579,7 @@ void grpc_chttp2_initiate_write(grpc_exec_ctx *exec_ctx, switch (t->write_state) { case GRPC_CHTTP2_WRITE_STATE_IDLE: - set_write_state(t, GRPC_CHTTP2_WRITE_STATE_WRITING); + set_write_state(t, GRPC_CHTTP2_WRITE_STATE_WRITING, reason); GRPC_CHTTP2_REF_TRANSPORT(t, "writing"); grpc_combiner_execute_finally(exec_ctx, t->combiner, &t->write_action_begin_locked, @@ -590,12 +590,14 @@ void grpc_chttp2_initiate_write(grpc_exec_ctx *exec_ctx, t, covered_by_poller ? GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE_AND_COVERED_BY_POLLER - : GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE); + : GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE, + reason); break; case GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE: if (covered_by_poller) { set_write_state( - t, GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE_AND_COVERED_BY_POLLER); + t, GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE_AND_COVERED_BY_POLLER, + reason); } break; case GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE_AND_COVERED_BY_POLLER: @@ -620,10 +622,10 @@ static void write_action_begin_locked(grpc_exec_ctx *exec_ctx, void *gt, grpc_chttp2_transport *t = gt; GPR_ASSERT(t->write_state != GRPC_CHTTP2_WRITE_STATE_IDLE); if (!t->closed && grpc_chttp2_begin_write(exec_ctx, t)) { - set_write_state(t, GRPC_CHTTP2_WRITE_STATE_WRITING); + set_write_state(t, GRPC_CHTTP2_WRITE_STATE_WRITING, "begin writing"); grpc_exec_ctx_sched(exec_ctx, &t->write_action, GRPC_ERROR_NONE, NULL); } else { - set_write_state(t, GRPC_CHTTP2_WRITE_STATE_IDLE); + set_write_state(t, GRPC_CHTTP2_WRITE_STATE_IDLE, "begin writing nothing"); GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "writing"); } GPR_TIMER_END("write_action_begin_locked", 0); @@ -661,11 +663,12 @@ static void write_action_end_locked(grpc_exec_ctx *exec_ctx, void *tp, GPR_UNREACHABLE_CODE(break); case GRPC_CHTTP2_WRITE_STATE_WRITING: GPR_TIMER_MARK("state=writing", 0); - set_write_state(t, GRPC_CHTTP2_WRITE_STATE_IDLE); + set_write_state(t, GRPC_CHTTP2_WRITE_STATE_IDLE, "finish writing"); break; case GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE: GPR_TIMER_MARK("state=writing_stale_no_poller", 0); - set_write_state(t, GRPC_CHTTP2_WRITE_STATE_WRITING); + set_write_state(t, GRPC_CHTTP2_WRITE_STATE_WRITING, + "continue writing [!covered]"); GRPC_CHTTP2_REF_TRANSPORT(t, "writing"); grpc_combiner_execute_finally(exec_ctx, t->combiner, &t->write_action_begin_locked, @@ -673,7 +676,8 @@ static void write_action_end_locked(grpc_exec_ctx *exec_ctx, void *tp, break; case GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE_AND_COVERED_BY_POLLER: GPR_TIMER_MARK("state=writing_stale_with_poller", 0); - set_write_state(t, GRPC_CHTTP2_WRITE_STATE_WRITING); + set_write_state(t, GRPC_CHTTP2_WRITE_STATE_WRITING, + "continue writing [covered]"); GRPC_CHTTP2_REF_TRANSPORT(t, "writing"); grpc_combiner_execute_finally(exec_ctx, t->combiner, &t->write_action_begin_locked, @@ -1887,13 +1891,17 @@ static void incoming_byte_stream_update_flow_control(grpc_exec_ctx *exec_ctx, max_recv_bytes += t->stream_lookahead; if (s->max_recv_bytes < max_recv_bytes) { uint32_t add_max_recv_bytes = max_recv_bytes - s->max_recv_bytes; + bool new_window_write_is_covered_by_poller = + s->max_recv_bytes < have_already; GRPC_CHTTP2_FLOW_CREDIT_STREAM("op", t, s, max_recv_bytes, add_max_recv_bytes); GRPC_CHTTP2_FLOW_CREDIT_STREAM("op", t, s, incoming_window, add_max_recv_bytes); GRPC_CHTTP2_FLOW_CREDIT_STREAM("op", t, s, announce_window, add_max_recv_bytes); - grpc_chttp2_become_writable(exec_ctx, t, s, true, "read_incoming_stream"); + grpc_chttp2_become_writable(exec_ctx, t, s, + new_window_write_is_covered_by_poller, + "read_incoming_stream"); } } diff --git a/src/core/lib/iomgr/combiner.c b/src/core/lib/iomgr/combiner.c index 2b68240a15..48806abc38 100644 --- a/src/core/lib/iomgr/combiner.c +++ b/src/core/lib/iomgr/combiner.c @@ -142,11 +142,11 @@ static void push_first_on_exec_ctx(grpc_exec_ctx *exec_ctx, void grpc_combiner_execute(grpc_exec_ctx *exec_ctx, grpc_combiner *lock, grpc_closure *cl, grpc_error *error, bool covered_by_poller) { - GRPC_COMBINER_TRACE(gpr_log(GPR_DEBUG, - "C:%p grpc_combiner_execute c=%p cov=%d", lock, - cl, covered_by_poller)); GPR_TIMER_BEGIN("combiner.execute", 0); gpr_atm last = gpr_atm_full_fetch_add(&lock->state, 2); + GRPC_COMBINER_TRACE(gpr_log( + GPR_DEBUG, "C:%p grpc_combiner_execute c=%p cov=%d last=%" PRIdPTR, lock, + cl, covered_by_poller, last)); GPR_ASSERT(last & 1); // ensure lock has not been destroyed cl->error_data.scratch = pack_error_data((error_data){error, covered_by_poller}); @@ -177,6 +177,8 @@ static void offload(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { static void queue_offload(grpc_exec_ctx *exec_ctx, grpc_combiner *lock) { move_next(exec_ctx); + GRPC_COMBINER_TRACE(gpr_log(GPR_DEBUG, "C:%p queue_offload --> %p", lock, + lock->optional_workqueue)); grpc_workqueue_enqueue(exec_ctx, lock->optional_workqueue, &lock->offload, GRPC_ERROR_NONE); } @@ -189,6 +191,15 @@ bool grpc_combiner_continue_exec_ctx(grpc_exec_ctx *exec_ctx) { return false; } + GRPC_COMBINER_TRACE( + gpr_log(GPR_DEBUG, + "C:%p grpc_combiner_continue_exec_ctx workqueue=%p " + "is_covered_by_poller=%d exec_ctx_ready_to_finish=%d " + "time_to_execute_final_list=%d", + lock, lock->optional_workqueue, is_covered_by_poller(lock), + grpc_exec_ctx_ready_to_finish(exec_ctx), + lock->time_to_execute_final_list)); + if (lock->optional_workqueue != NULL && is_covered_by_poller(lock) && grpc_exec_ctx_ready_to_finish(exec_ctx)) { GPR_TIMER_MARK("offload_from_finished_exec_ctx", 0); @@ -289,9 +300,9 @@ static void enqueue_finally(grpc_exec_ctx *exec_ctx, void *closure, void grpc_combiner_execute_finally(grpc_exec_ctx *exec_ctx, grpc_combiner *lock, grpc_closure *closure, grpc_error *error, bool covered_by_poller) { - GRPC_COMBINER_TRACE(gpr_log(GPR_DEBUG, - "C:%p grpc_combiner_execute_finally c=%p; ac=%p", - lock, closure, exec_ctx->active_combiner)); + GRPC_COMBINER_TRACE(gpr_log( + GPR_DEBUG, "C:%p grpc_combiner_execute_finally c=%p; ac=%p; cov=%d", lock, + closure, exec_ctx->active_combiner, covered_by_poller)); GPR_TIMER_BEGIN("combiner.execute_finally", 0); if (exec_ctx->active_combiner != lock) { GPR_TIMER_MARK("slowpath", 0); diff --git a/src/core/lib/iomgr/iomgr.c b/src/core/lib/iomgr/iomgr.c index d67d388b8c..4fd83e0b22 100644 --- a/src/core/lib/iomgr/iomgr.c +++ b/src/core/lib/iomgr/iomgr.c @@ -112,6 +112,14 @@ void grpc_iomgr_shutdown(void) { continue; } if (g_root_object.next != &g_root_object) { + if (grpc_iomgr_abort_on_leaks()) { + gpr_log(GPR_DEBUG, "Failed to free %" PRIuPTR + " iomgr objects before shutdown deadline: " + "memory leaks are likely", + count_objects()); + dump_objects("LEAKED"); + abort(); + } gpr_timespec short_deadline = gpr_time_add( gpr_now(GPR_CLOCK_REALTIME), gpr_time_from_millis(100, GPR_TIMESPAN)); if (gpr_cv_wait(&g_rcv, &g_mu, short_deadline)) { @@ -122,9 +130,6 @@ void grpc_iomgr_shutdown(void) { "memory leaks are likely", count_objects()); dump_objects("LEAKED"); - if (grpc_iomgr_abort_on_leaks()) { - abort(); - } } break; } diff --git a/src/core/lib/support/log.c b/src/core/lib/support/log.c index 6fbd947f4b..af1651dae5 100644 --- a/src/core/lib/support/log.c +++ b/src/core/lib/support/log.c @@ -60,8 +60,9 @@ const char *gpr_log_severity_string(gpr_log_severity severity) { void gpr_log_message(const char *file, int line, gpr_log_severity severity, const char *message) { - if ((gpr_atm)severity < gpr_atm_no_barrier_load(&g_min_severity_to_print)) + if ((gpr_atm)severity < gpr_atm_no_barrier_load(&g_min_severity_to_print)) { return; + } gpr_log_func_args lfargs; memset(&lfargs, 0, sizeof(lfargs)); diff --git a/test/core/end2end/tests/payload.c b/test/core/end2end/tests/payload.c index c37d7fe41a..ed1c719ef8 100644 --- a/test/core/end2end/tests/payload.c +++ b/test/core/end2end/tests/payload.c @@ -99,11 +99,11 @@ static void end_test(grpc_end2end_test_fixture *f) { static gpr_slice generate_random_slice() { size_t i; static const char chars[] = "abcdefghijklmnopqrstuvwxyz1234567890"; - char output[1024 * 1024]; /* 1 MB */ - for (i = 0; i < 1024 * 1024 - 1; ++i) { + char output[1024 * 1024]; + for (i = 0; i < GPR_ARRAY_SIZE(output) - 1; ++i) { output[i] = chars[rand() % (int)(sizeof(chars) - 1)]; } - output[1024 * 1024 - 1] = '\0'; + output[GPR_ARRAY_SIZE(output) - 1] = '\0'; return gpr_slice_from_copied_string(output); } -- cgit v1.2.3 From 930c2983d34507765305a56c329c2e354168184b Mon Sep 17 00:00:00 2001 From: Dan Born Date: Thu, 8 Sep 2016 19:12:18 -0700 Subject: Safe server shutdown. --- .../chttp2/server/secure/server_secure_chttp2.c | 196 +++++++++++---------- src/core/lib/iomgr/tcp_server_posix.c | 36 ++-- test/core/iomgr/tcp_server_posix_test.c | 3 +- 3 files changed, 131 insertions(+), 104 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index da3e284fcf..563271f4f8 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -61,13 +61,12 @@ typedef struct server_secure_state { grpc_server_credentials *creds; bool is_shutdown; gpr_mu mu; - gpr_refcount refcount; - grpc_closure destroy_closure; - grpc_closure *destroy_callback; + grpc_closure tcp_server_shutdown_complete; + grpc_closure *server_destroy_listener_done; } server_secure_state; typedef struct server_secure_connect { - server_secure_state *state; + server_secure_state *server_state; grpc_pollset *accepting_pollset; grpc_tcp_server_acceptor *acceptor; grpc_handshake_manager *handshake_mgr; @@ -77,39 +76,28 @@ typedef struct server_secure_connect { grpc_channel_args *args; } server_secure_connect; -static void state_ref(server_secure_state *state) { gpr_ref(&state->refcount); } - -static void state_unref(server_secure_state *state) { - if (gpr_unref(&state->refcount)) { - /* ensure all threads have unlocked */ - gpr_mu_lock(&state->mu); - gpr_mu_unlock(&state->mu); - /* clean up */ - GRPC_SECURITY_CONNECTOR_UNREF(&state->sc->base, "server"); - grpc_server_credentials_unref(state->creds); - gpr_free(state); - } -} - static void on_secure_handshake_done(grpc_exec_ctx *exec_ctx, void *statep, grpc_security_status status, grpc_endpoint *secure_endpoint, grpc_auth_context *auth_context) { - server_secure_connect *state = statep; + server_secure_connect *connection_state = statep; if (status == GRPC_SECURITY_OK) { if (secure_endpoint) { - gpr_mu_lock(&state->state->mu); - if (!state->state->is_shutdown) { + gpr_mu_lock(&connection_state->server_state->mu); + if (!connection_state->server_state->is_shutdown) { grpc_transport *transport = grpc_create_chttp2_transport( - exec_ctx, grpc_server_get_channel_args(state->state->server), + exec_ctx, grpc_server_get_channel_args( + connection_state->server_state->server), secure_endpoint, 0); grpc_arg args_to_add[2]; - args_to_add[0] = grpc_server_credentials_to_arg(state->state->creds); + args_to_add[0] = grpc_server_credentials_to_arg( + connection_state->server_state->creds); args_to_add[1] = grpc_auth_context_to_arg(auth_context); grpc_channel_args *args_copy = grpc_channel_args_copy_and_add( - state->args, args_to_add, GPR_ARRAY_SIZE(args_to_add)); - grpc_server_setup_transport(exec_ctx, state->state->server, transport, - state->accepting_pollset, args_copy); + connection_state->args, args_to_add, GPR_ARRAY_SIZE(args_to_add)); + grpc_server_setup_transport( + exec_ctx, connection_state->server_state->server, transport, + connection_state->accepting_pollset, args_copy); grpc_channel_args_destroy(args_copy); grpc_chttp2_transport_start_reading(exec_ctx, transport, NULL); } else { @@ -117,21 +105,21 @@ static void on_secure_handshake_done(grpc_exec_ctx *exec_ctx, void *statep, * gone away. */ grpc_endpoint_destroy(exec_ctx, secure_endpoint); } - gpr_mu_unlock(&state->state->mu); + gpr_mu_unlock(&connection_state->server_state->mu); } } else { gpr_log(GPR_ERROR, "Secure transport failed with error %d", status); } - grpc_channel_args_destroy(state->args); - state_unref(state->state); - gpr_free(state); + grpc_channel_args_destroy(connection_state->args); + grpc_tcp_server_unref(exec_ctx, connection_state->server_state->tcp); + gpr_free(connection_state); } static void on_handshake_done(grpc_exec_ctx *exec_ctx, grpc_endpoint *endpoint, grpc_channel_args *args, gpr_slice_buffer *read_buffer, void *user_data, grpc_error *error) { - server_secure_connect *state = user_data; + server_secure_connect *connection_state = user_data; if (error != GRPC_ERROR_NONE) { const char *error_str = grpc_error_string(error); gpr_log(GPR_ERROR, "Handshaking failed: %s", error_str); @@ -139,81 +127,107 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, grpc_endpoint *endpoint, GRPC_ERROR_UNREF(error); grpc_channel_args_destroy(args); gpr_free(read_buffer); - grpc_handshake_manager_shutdown(exec_ctx, state->handshake_mgr); - grpc_handshake_manager_destroy(exec_ctx, state->handshake_mgr); - state_unref(state->state); - gpr_free(state); + grpc_handshake_manager_shutdown(exec_ctx, connection_state->handshake_mgr); + grpc_handshake_manager_destroy(exec_ctx, connection_state->handshake_mgr); + grpc_tcp_server_unref(exec_ctx, connection_state->server_state->tcp); + gpr_free(connection_state); return; } - grpc_handshake_manager_destroy(exec_ctx, state->handshake_mgr); - state->handshake_mgr = NULL; + grpc_handshake_manager_destroy(exec_ctx, connection_state->handshake_mgr); + connection_state->handshake_mgr = NULL; // TODO(roth, jboeuf): Convert security connector handshaking to use new // handshake API, and then move the code from on_secure_handshake_done() // into this function. - state->args = args; + connection_state->args = args; grpc_server_security_connector_do_handshake( - exec_ctx, state->state->sc, state->acceptor, endpoint, read_buffer, - state->deadline, on_secure_handshake_done, state); + exec_ctx, connection_state->server_state->sc, connection_state->acceptor, + endpoint, read_buffer, connection_state->deadline, + on_secure_handshake_done, connection_state); } static void on_accept(grpc_exec_ctx *exec_ctx, void *statep, grpc_endpoint *tcp, grpc_pollset *accepting_pollset, grpc_tcp_server_acceptor *acceptor) { - server_secure_connect *state = gpr_malloc(sizeof(*state)); - state->state = statep; - state_ref(state->state); - state->accepting_pollset = accepting_pollset; - state->acceptor = acceptor; - state->handshake_mgr = grpc_handshake_manager_create(); + server_secure_state *server_state = statep; + server_secure_connect *connection_state = NULL; + gpr_mu_lock(&server_state->mu); + if (server_state->is_shutdown) { + gpr_mu_unlock(&server_state->mu); + grpc_endpoint_destroy(exec_ctx, tcp); + return; + } + gpr_mu_unlock(&server_state->mu); + grpc_tcp_server_ref(server_state->tcp); + connection_state = gpr_malloc(sizeof(*connection_state)); + connection_state->server_state = server_state; + connection_state->accepting_pollset = accepting_pollset; + connection_state->acceptor = acceptor; + connection_state->handshake_mgr = grpc_handshake_manager_create(); // TODO(roth): We should really get this timeout value from channel // args instead of hard-coding it. - state->deadline = gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), - gpr_time_from_seconds(120, GPR_TIMESPAN)); + connection_state->deadline = gpr_time_add( + gpr_now(GPR_CLOCK_MONOTONIC), gpr_time_from_seconds(120, GPR_TIMESPAN)); grpc_handshake_manager_do_handshake( - exec_ctx, state->handshake_mgr, tcp, - grpc_server_get_channel_args(state->state->server), state->deadline, - acceptor, on_handshake_done, state); + exec_ctx, connection_state->handshake_mgr, tcp, + grpc_server_get_channel_args(connection_state->server_state->server), + connection_state->deadline, acceptor, on_handshake_done, + connection_state); } /* Server callback: start listening on our ports */ -static void start(grpc_exec_ctx *exec_ctx, grpc_server *server, void *statep, - grpc_pollset **pollsets, size_t pollset_count) { - server_secure_state *state = statep; - grpc_tcp_server_start(exec_ctx, state->tcp, pollsets, pollset_count, - on_accept, state); +static void server_start_listener(grpc_exec_ctx *exec_ctx, grpc_server *server, + void *statep, grpc_pollset **pollsets, + size_t pollset_count) { + server_secure_state *server_state = statep; + gpr_mu_lock(&server_state->mu); + server_state->is_shutdown = false; + gpr_mu_unlock(&server_state->mu); + grpc_tcp_server_start(exec_ctx, server_state->tcp, pollsets, pollset_count, + on_accept, server_state); } -static void destroy_done(grpc_exec_ctx *exec_ctx, void *statep, - grpc_error *error) { - server_secure_state *state = statep; - if (state->destroy_callback != NULL) { - state->destroy_callback->cb(exec_ctx, state->destroy_callback->cb_arg, - GRPC_ERROR_REF(error)); +static void tcp_server_shutdown_complete(grpc_exec_ctx *exec_ctx, void *statep, + grpc_error *error) { + server_secure_state *server_state = statep; + /* ensure all threads have unlocked */ + gpr_mu_lock(&server_state->mu); + grpc_closure *destroy_done = server_state->server_destroy_listener_done; + GPR_ASSERT(server_state->is_shutdown); + gpr_mu_unlock(&server_state->mu); + /* clean up */ + grpc_server_security_connector_shutdown(exec_ctx, server_state->sc); + + /* Flush queued work before a synchronous unref. */ + grpc_exec_ctx_flush(exec_ctx); + GRPC_SECURITY_CONNECTOR_UNREF(&server_state->sc->base, "server"); + grpc_server_credentials_unref(server_state->creds); + + if (destroy_done != NULL) { + destroy_done->cb(exec_ctx, destroy_done->cb_arg, GRPC_ERROR_REF(error)); + grpc_exec_ctx_flush(exec_ctx); } - grpc_server_security_connector_shutdown(exec_ctx, state->sc); - state_unref(state); + gpr_free(server_state); } -/* Server callback: destroy the tcp listener (so we don't generate further - callbacks) */ -static void destroy(grpc_exec_ctx *exec_ctx, grpc_server *server, void *statep, - grpc_closure *callback) { - server_secure_state *state = statep; +static void server_destroy_listener(grpc_exec_ctx *exec_ctx, + grpc_server *server, void *statep, + grpc_closure *callback) { + server_secure_state *server_state = statep; grpc_tcp_server *tcp; - gpr_mu_lock(&state->mu); - state->is_shutdown = true; - state->destroy_callback = callback; - tcp = state->tcp; - gpr_mu_unlock(&state->mu); + gpr_mu_lock(&server_state->mu); + server_state->is_shutdown = true; + server_state->server_destroy_listener_done = callback; + tcp = server_state->tcp; + gpr_mu_unlock(&server_state->mu); grpc_tcp_server_shutdown_listeners(exec_ctx, tcp); - grpc_tcp_server_unref(exec_ctx, tcp); + grpc_tcp_server_unref(exec_ctx, server_state->tcp); } int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, grpc_server_credentials *creds) { grpc_resolved_addresses *resolved = NULL; grpc_tcp_server *tcp = NULL; - server_secure_state *state = NULL; + server_secure_state *server_state = NULL; size_t i; size_t count = 0; int port_num = -1; @@ -253,22 +267,22 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, if (err != GRPC_ERROR_NONE) { goto error; } - state = gpr_malloc(sizeof(*state)); - memset(state, 0, sizeof(*state)); - grpc_closure_init(&state->destroy_closure, destroy_done, state); - err = grpc_tcp_server_create(&state->destroy_closure, + server_state = gpr_malloc(sizeof(*server_state)); + memset(server_state, 0, sizeof(*server_state)); + grpc_closure_init(&server_state->tcp_server_shutdown_complete, + tcp_server_shutdown_complete, server_state); + err = grpc_tcp_server_create(&server_state->tcp_server_shutdown_complete, grpc_server_get_channel_args(server), &tcp); if (err != GRPC_ERROR_NONE) { goto error; } - state->server = server; - state->tcp = tcp; - state->sc = sc; - state->creds = grpc_server_credentials_ref(creds); - state->is_shutdown = false; - gpr_mu_init(&state->mu); - gpr_ref_init(&state->refcount, 1); + server_state->server = server; + server_state->tcp = tcp; + server_state->sc = sc; + server_state->creds = grpc_server_credentials_ref(creds); + server_state->is_shutdown = true; + gpr_mu_init(&server_state->mu); errors = gpr_malloc(sizeof(*errors) * resolved->naddrs); for (i = 0; i < resolved->naddrs; i++) { @@ -313,7 +327,8 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, grpc_resolved_addresses_destroy(resolved); /* Register with the server only upon success */ - grpc_server_add_listener(&exec_ctx, server, state, start, destroy); + grpc_server_add_listener(&exec_ctx, server, server_state, + server_start_listener, server_destroy_listener); grpc_exec_ctx_finish(&exec_ctx); return port_num; @@ -334,10 +349,11 @@ error: grpc_tcp_server_unref(&exec_ctx, tcp); } else { if (sc) { + grpc_exec_ctx_flush(&exec_ctx); GRPC_SECURITY_CONNECTOR_UNREF(&sc->base, "server"); } - if (state) { - gpr_free(state); + if (server_state) { + gpr_free(server_state); } } grpc_exec_ctx_finish(&exec_ctx); diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index 2d3f6cf9a7..5f846c8afb 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -191,6 +191,9 @@ grpc_error *grpc_tcp_server_create(grpc_closure *shutdown_complete, } static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { + gpr_mu_lock(&s->mu); + GPR_ASSERT(s->shutdown); + gpr_mu_unlock(&s->mu); if (s->shutdown_complete != NULL) { grpc_exec_ctx_sched(exec_ctx, s->shutdown_complete, GRPC_ERROR_NONE, NULL); } @@ -652,6 +655,7 @@ unsigned grpc_tcp_server_port_fd_count(grpc_tcp_server *s, unsigned port_index) { unsigned num_fds = 0; grpc_tcp_listener *sp; + gpr_mu_lock(&s->mu); for (sp = s->head; sp && port_index != 0; sp = sp->next) { if (!sp->is_sibling) { --port_index; @@ -659,12 +663,15 @@ unsigned grpc_tcp_server_port_fd_count(grpc_tcp_server *s, } for (; sp; sp = sp->sibling, ++num_fds) ; + gpr_mu_unlock(&s->mu); return num_fds; } int grpc_tcp_server_port_fd(grpc_tcp_server *s, unsigned port_index, unsigned fd_index) { grpc_tcp_listener *sp; + int fd; + gpr_mu_lock(&s->mu); for (sp = s->head; sp && port_index != 0; sp = sp->next) { if (!sp->is_sibling) { --port_index; @@ -673,10 +680,12 @@ int grpc_tcp_server_port_fd(grpc_tcp_server *s, unsigned port_index, for (; sp && fd_index != 0; sp = sp->sibling, --fd_index) ; if (sp) { - return sp->fd; + fd = sp->fd; } else { - return -1; + fd = -1; } + gpr_mu_unlock(&s->mu); + return fd; } void grpc_tcp_server_start(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s, @@ -722,7 +731,7 @@ void grpc_tcp_server_start(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s, } grpc_tcp_server *grpc_tcp_server_ref(grpc_tcp_server *s) { - gpr_ref(&s->refs); + gpr_ref_non_zero(&s->refs); return s; } @@ -736,18 +745,21 @@ void grpc_tcp_server_shutdown_starting_add(grpc_tcp_server *s, void grpc_tcp_server_unref(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { if (gpr_unref(&s->refs)) { - /* Complete shutdown_starting work before destroying. */ grpc_exec_ctx local_exec_ctx = GRPC_EXEC_CTX_INIT; + bool finish_ctx = false; + /* FIXME: API allows a NULL exec_ctx, although this might cause us to delete + ourself before some enqueued work in some other exec_ctx runs. */ + if (exec_ctx == NULL) { + exec_ctx = &local_exec_ctx; + finish_ctx = true; + } + grpc_tcp_server_shutdown_listeners(exec_ctx, s); gpr_mu_lock(&s->mu); - grpc_exec_ctx_enqueue_list(&local_exec_ctx, &s->shutdown_starting, NULL); + grpc_exec_ctx_enqueue_list(exec_ctx, &s->shutdown_starting, NULL); gpr_mu_unlock(&s->mu); - if (exec_ctx == NULL) { - grpc_exec_ctx_flush(&local_exec_ctx); - tcp_server_destroy(&local_exec_ctx, s); - grpc_exec_ctx_finish(&local_exec_ctx); - } else { - grpc_exec_ctx_finish(&local_exec_ctx); - tcp_server_destroy(exec_ctx, s); + tcp_server_destroy(exec_ctx, s); + if (finish_ctx) { + grpc_exec_ctx_finish(exec_ctx); } } } diff --git a/test/core/iomgr/tcp_server_posix_test.c b/test/core/iomgr/tcp_server_posix_test.c index 6e2d1d0fc9..6b1dd428a1 100644 --- a/test/core/iomgr/tcp_server_posix_test.c +++ b/test/core/iomgr/tcp_server_posix_test.c @@ -314,11 +314,10 @@ static void test_connect(unsigned n) { GPR_ASSERT(grpc_tcp_server_port_fd(s, 0, 0) >= 0); grpc_tcp_server_unref(&exec_ctx, s); + grpc_exec_ctx_finish(&exec_ctx); /* Weak ref lost. */ GPR_ASSERT(weak_ref.server == NULL); - - grpc_exec_ctx_finish(&exec_ctx); } static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, -- cgit v1.2.3 From df09570add3fbe72086f02557d4f74e498cc6f84 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 13 Sep 2016 11:06:40 -0700 Subject: Allow decoupling core version number from wrapper version numbers --- CMakeLists.txt | 2 +- Makefile | 52 ++++++++++++++++----------------- build.yaml | 1 + src/core/lib/surface/version.c | 2 +- tools/doxygen/Doxyfile.core | 2 +- tools/doxygen/Doxyfile.core.internal | 2 +- tools/run_tests/sanity/check_version.py | 2 +- 7 files changed, 32 insertions(+), 31 deletions(-) (limited to 'src/core/lib') diff --git a/CMakeLists.txt b/CMakeLists.txt index 05aa323ca9..ef5bf919c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,7 +42,7 @@ cmake_minimum_required(VERSION 2.8) set(PACKAGE_NAME "grpc") -set(PACKAGE_VERSION "1.1.0-dev") +set(PACKAGE_VERSION "2.0.0-dev") set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") set(PACKAGE_TARNAME "${PACKAGE_NAME}-${PACKAGE_VERSION}") set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/") diff --git a/Makefile b/Makefile index e454ad6cd7..3a0ff524f7 100644 --- a/Makefile +++ b/Makefile @@ -438,7 +438,7 @@ E = @echo Q = @ endif -VERSION = 1.1.0-dev +VERSION = 2.0.0-dev CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES)) CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS) @@ -471,7 +471,7 @@ PC_TEMPLATE = prefix=$(prefix),exec_prefix=\$${prefix},includedir=\$${prefix}/in ifeq ($(SYSTEM),MINGW32) SHARED_EXT = dll SHARED_PREFIX = -SHARED_VERSION = -1 +SHARED_VERSION = -2 else ifeq ($(SYSTEM),Darwin) SHARED_EXT = dylib SHARED_PREFIX = lib @@ -2224,7 +2224,7 @@ install-shared_c: shared_c strip-shared_c install-pkg-config_c ifeq ($(SYSTEM),MINGW32) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgpr-imp.a $(prefix)/lib/libgpr-imp.a else ifneq ($(SYSTEM),Darwin) - $(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgpr.so.1 + $(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgpr.so.2 $(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgpr.so endif $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT)" @@ -2233,7 +2233,7 @@ endif ifeq ($(SYSTEM),MINGW32) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc-imp.a $(prefix)/lib/libgrpc-imp.a else ifneq ($(SYSTEM),Darwin) - $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc.so.1 + $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc.so.2 $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc.so endif $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT)" @@ -2242,7 +2242,7 @@ endif ifeq ($(SYSTEM),MINGW32) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc_cronet-imp.a $(prefix)/lib/libgrpc_cronet-imp.a else ifneq ($(SYSTEM),Darwin) - $(Q) ln -sf $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc_cronet.so.1 + $(Q) ln -sf $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc_cronet.so.2 $(Q) ln -sf $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc_cronet.so endif $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT)" @@ -2251,7 +2251,7 @@ endif ifeq ($(SYSTEM),MINGW32) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure-imp.a $(prefix)/lib/libgrpc_unsecure-imp.a else ifneq ($(SYSTEM),Darwin) - $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc_unsecure.so.1 + $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc_unsecure.so.2 $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc_unsecure.so endif ifneq ($(SYSTEM),MINGW32) @@ -2268,7 +2268,7 @@ install-shared_cxx: shared_cxx strip-shared_cxx install-shared_c install-pkg-con ifeq ($(SYSTEM),MINGW32) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++-imp.a $(prefix)/lib/libgrpc++-imp.a else ifneq ($(SYSTEM),Darwin) - $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++.so.1 + $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++.so.2 $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++.so endif $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT)" @@ -2277,7 +2277,7 @@ endif ifeq ($(SYSTEM),MINGW32) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection-imp.a $(prefix)/lib/libgrpc++_reflection-imp.a else ifneq ($(SYSTEM),Darwin) - $(Q) ln -sf $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++_reflection.so.1 + $(Q) ln -sf $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++_reflection.so.2 $(Q) ln -sf $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++_reflection.so endif $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT)" @@ -2286,7 +2286,7 @@ endif ifeq ($(SYSTEM),MINGW32) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure-imp.a $(prefix)/lib/libgrpc++_unsecure-imp.a else ifneq ($(SYSTEM),Darwin) - $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++_unsecure.so.1 + $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++_unsecure.so.2 $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++_unsecure.so endif ifneq ($(SYSTEM),MINGW32) @@ -2303,7 +2303,7 @@ install-shared_csharp: shared_csharp strip-shared_csharp ifeq ($(SYSTEM),MINGW32) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext-imp.a $(prefix)/lib/libgrpc_csharp_ext-imp.a else ifneq ($(SYSTEM),Darwin) - $(Q) ln -sf $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc_csharp_ext.so.1 + $(Q) ln -sf $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc_csharp_ext.so.2 $(Q) ln -sf $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc_csharp_ext.so endif ifneq ($(SYSTEM),MINGW32) @@ -2475,8 +2475,8 @@ $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION).$(SHARED_EXT): $(LIBGPR_OBJS) $(ZLI ifeq ($(SYSTEM),Darwin) $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION).$(SHARED_EXT) $(LIBGPR_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) else - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgpr.so.1 -o $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION).$(SHARED_EXT) $(LIBGPR_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) - $(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION).so.1 + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgpr.so.2 -o $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION).$(SHARED_EXT) $(LIBGPR_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) + $(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION).so.2 $(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION).so endif endif @@ -2772,8 +2772,8 @@ $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_OBJS) $(Z ifeq ($(SYSTEM),Darwin) $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) else - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) - $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).so.1 + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc.so.2 -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) + $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).so.2 $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION).so endif endif @@ -3021,8 +3021,8 @@ $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_CRO ifeq ($(SYSTEM),Darwin) $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_CRONET_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) else - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_cronet.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_CRONET_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) - $(Q) ln -sf $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION).so.1 + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_cronet.so.2 -o $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_CRONET_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) + $(Q) ln -sf $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION).so.2 $(Q) ln -sf $(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_cronet$(SHARED_VERSION).so endif endif @@ -3464,8 +3464,8 @@ $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC_U ifeq ($(SYSTEM),Darwin) $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) else - $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_unsecure.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) - $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).so.1 + $(Q) $(LD) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_unsecure.so.2 -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_UNSECURE_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) + $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).so.2 $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION).so endif endif @@ -3831,8 +3831,8 @@ $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc -lgpr else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc -lgpr - $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).so.1 + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++.so.2 -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc -lgpr + $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).so.2 $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).so endif endif @@ -3958,8 +3958,8 @@ $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).$(SHARED_EXT): $(LIBGR ifeq ($(SYSTEM),Darwin) $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_REFLECTION_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc++ else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_reflection.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_REFLECTION_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc++ - $(Q) ln -sf $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).so.1 + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_reflection.so.2 -o $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_REFLECTION_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc++ + $(Q) ln -sf $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).so.2 $(Q) ln -sf $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).so endif endif @@ -4456,8 +4456,8 @@ $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC ifeq ($(SYSTEM),Darwin) $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc_unsecure else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_unsecure.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc_unsecure - $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).so.1 + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_unsecure.so.2 -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc_unsecure + $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).so.2 $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).so endif endif @@ -4938,8 +4938,8 @@ $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC ifeq ($(SYSTEM),Darwin) $(Q) $(LD) $(LDFLAGS) $(if $(subst Linux,,$(SYSTEM)),,-Wl$(comma)-wrap$(comma)memcpy) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_CSHARP_EXT_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) else - $(Q) $(LD) $(LDFLAGS) $(if $(subst Linux,,$(SYSTEM)),,-Wl$(comma)-wrap$(comma)memcpy) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_csharp_ext.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_CSHARP_EXT_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) - $(Q) ln -sf $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION).so.1 + $(Q) $(LD) $(LDFLAGS) $(if $(subst Linux,,$(SYSTEM)),,-Wl$(comma)-wrap$(comma)memcpy) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_csharp_ext.so.2 -o $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC_CSHARP_EXT_OBJS) $(LDLIBS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(ZLIB_MERGE_LIBS) + $(Q) ln -sf $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION).so.2 $(Q) ln -sf $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION).so endif endif diff --git a/build.yaml b/build.yaml index 6eb23d6fb7..04c031da1d 100644 --- a/build.yaml +++ b/build.yaml @@ -12,6 +12,7 @@ settings: '#08': Use "-preN" suffixes to identify pre-release versions '#09': Per-language overrides are possible with (eg) ruby_version tag here '#10': See the expand_version.py for all the quirks here + core_version: 2.0.0-dev g_stands_for: good version: 1.1.0-dev filegroups: diff --git a/src/core/lib/surface/version.c b/src/core/lib/surface/version.c index 41242684da..0db8b41aa9 100644 --- a/src/core/lib/surface/version.c +++ b/src/core/lib/surface/version.c @@ -36,6 +36,6 @@ #include -const char *grpc_version_string(void) { return "1.1.0-dev"; } +const char *grpc_version_string(void) { return "2.0.0-dev"; } const char *grpc_g_stands_for(void) { return "good"; } diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index 27f878e8ab..a274f57eb0 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 1.1.0-dev +PROJECT_NUMBER = 2.0.0-dev # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 02590db421..d5ba50549f 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 1.1.0-dev +PROJECT_NUMBER = 2.0.0-dev # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/run_tests/sanity/check_version.py b/tools/run_tests/sanity/check_version.py index 41dd5efe38..745d64ae37 100755 --- a/tools/run_tests/sanity/check_version.py +++ b/tools/run_tests/sanity/check_version.py @@ -81,6 +81,7 @@ if not check_version(top_version): print warning % ('version', top_version) for tag, value in settings.iteritems(): + if tag == 'core_version': continue if re.match(r'^[a-z]+_version$', tag): value = Version(value) if value.major != top_version.major: @@ -94,4 +95,3 @@ for tag, value in settings.iteritems(): print warning % (tag, value) sys.exit(errors) - -- cgit v1.2.3 From 31caabdead52000354c4fdd88b68bb3041ca8c4a Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Sat, 6 Aug 2016 21:27:29 -0700 Subject: Add shim to support condition variable wakeup fds where pipe/eventfd is not available --- BUILD | 12 + CMakeLists.txt | 5 + Makefile | 42 +++ binding.gyp | 1 + build.yaml | 16 + config.m4 | 1 + gRPC-Core.podspec | 3 + grpc.gemspec | 2 + package.xml | 2 + src/core/lib/iomgr/wakeup_fd_cv.c | 328 +++++++++++++++++++++ src/core/lib/iomgr/wakeup_fd_cv.h | 58 ++++ src/core/lib/iomgr/wakeup_fd_pipe.c | 9 +- src/core/lib/iomgr/wakeup_fd_posix.c | 15 +- src/core/lib/iomgr/wakeup_fd_posix.h | 1 + src/python/grpcio/grpc_core_dependencies.py | 1 + test/core/iomgr/wakeup_fd_cv_test.c | 246 ++++++++++++++++ tools/doxygen/Doxyfile.c++.internal | 2 + tools/doxygen/Doxyfile.core.internal | 2 + tools/run_tests/sources_and_headers.json | 19 ++ tools/run_tests/tests.json | 19 ++ vsprojects/vcxproj/grpc++/grpc++.vcxproj | 3 + vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters | 6 + .../grpc++_unsecure/grpc++_unsecure.vcxproj | 3 + .../grpc++_unsecure.vcxproj.filters | 6 + vsprojects/vcxproj/grpc/grpc.vcxproj | 3 + vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 6 + .../vcxproj/grpc_test_util/grpc_test_util.vcxproj | 3 + .../grpc_test_util/grpc_test_util.vcxproj.filters | 6 + .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 3 + .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 6 + 30 files changed, 825 insertions(+), 4 deletions(-) create mode 100644 src/core/lib/iomgr/wakeup_fd_cv.c create mode 100644 src/core/lib/iomgr/wakeup_fd_cv.h create mode 100644 test/core/iomgr/wakeup_fd_cv_test.c (limited to 'src/core/lib') diff --git a/BUILD b/BUILD index ee41d1ab21..67e481e0d2 100644 --- a/BUILD +++ b/BUILD @@ -215,6 +215,7 @@ cc_library( "src/core/lib/iomgr/timer_heap.h", "src/core/lib/iomgr/udp_server.h", "src/core/lib/iomgr/unix_sockets_posix.h", + "src/core/lib/iomgr/wakeup_fd_cv.h", "src/core/lib/iomgr/wakeup_fd_pipe.h", "src/core/lib/iomgr/wakeup_fd_posix.h", "src/core/lib/iomgr/workqueue.h", @@ -372,6 +373,7 @@ cc_library( "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", @@ -610,6 +612,7 @@ cc_library( "src/core/lib/iomgr/timer_heap.h", "src/core/lib/iomgr/udp_server.h", "src/core/lib/iomgr/unix_sockets_posix.h", + "src/core/lib/iomgr/wakeup_fd_cv.h", "src/core/lib/iomgr/wakeup_fd_pipe.h", "src/core/lib/iomgr/wakeup_fd_posix.h", "src/core/lib/iomgr/workqueue.h", @@ -753,6 +756,7 @@ cc_library( "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", @@ -962,6 +966,7 @@ cc_library( "src/core/lib/iomgr/timer_heap.h", "src/core/lib/iomgr/udp_server.h", "src/core/lib/iomgr/unix_sockets_posix.h", + "src/core/lib/iomgr/wakeup_fd_cv.h", "src/core/lib/iomgr/wakeup_fd_pipe.h", "src/core/lib/iomgr/wakeup_fd_posix.h", "src/core/lib/iomgr/workqueue.h", @@ -1096,6 +1101,7 @@ cc_library( "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", @@ -1309,6 +1315,7 @@ cc_library( "src/core/lib/iomgr/timer_heap.h", "src/core/lib/iomgr/udp_server.h", "src/core/lib/iomgr/unix_sockets_posix.h", + "src/core/lib/iomgr/wakeup_fd_cv.h", "src/core/lib/iomgr/wakeup_fd_pipe.h", "src/core/lib/iomgr/wakeup_fd_posix.h", "src/core/lib/iomgr/workqueue.h", @@ -1423,6 +1430,7 @@ cc_library( "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", @@ -1719,6 +1727,7 @@ cc_library( "src/core/lib/iomgr/timer_heap.h", "src/core/lib/iomgr/udp_server.h", "src/core/lib/iomgr/unix_sockets_posix.h", + "src/core/lib/iomgr/wakeup_fd_cv.h", "src/core/lib/iomgr/wakeup_fd_pipe.h", "src/core/lib/iomgr/wakeup_fd_posix.h", "src/core/lib/iomgr/workqueue.h", @@ -1828,6 +1837,7 @@ cc_library( "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", @@ -2218,6 +2228,7 @@ objc_library( "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", @@ -2435,6 +2446,7 @@ objc_library( "src/core/lib/iomgr/timer_heap.h", "src/core/lib/iomgr/udp_server.h", "src/core/lib/iomgr/unix_sockets_posix.h", + "src/core/lib/iomgr/wakeup_fd_cv.h", "src/core/lib/iomgr/wakeup_fd_pipe.h", "src/core/lib/iomgr/wakeup_fd_posix.h", "src/core/lib/iomgr/workqueue.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 05aa323ca9..f07fa26e63 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -345,6 +345,7 @@ add_library(grpc 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 @@ -603,6 +604,7 @@ add_library(grpc_cronet 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 @@ -834,6 +836,7 @@ add_library(grpc_unsecure 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 @@ -1091,6 +1094,7 @@ add_library(grpc++ 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 @@ -1448,6 +1452,7 @@ add_library(grpc++_unsecure 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 diff --git a/Makefile b/Makefile index e454ad6cd7..a23e12687d 100644 --- a/Makefile +++ b/Makefile @@ -1021,6 +1021,7 @@ transport_security_test: $(BINDIR)/$(CONFIG)/transport_security_test udp_server_test: $(BINDIR)/$(CONFIG)/udp_server_test uri_fuzzer_test: $(BINDIR)/$(CONFIG)/uri_fuzzer_test uri_parser_test: $(BINDIR)/$(CONFIG)/uri_parser_test +wakeup_fd_cv_test: $(BINDIR)/$(CONFIG)/wakeup_fd_cv_test alarm_cpp_test: $(BINDIR)/$(CONFIG)/alarm_cpp_test async_end2end_test: $(BINDIR)/$(CONFIG)/async_end2end_test auth_property_iterator_test: $(BINDIR)/$(CONFIG)/auth_property_iterator_test @@ -1329,6 +1330,7 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/transport_security_test \ $(BINDIR)/$(CONFIG)/udp_server_test \ $(BINDIR)/$(CONFIG)/uri_parser_test \ + $(BINDIR)/$(CONFIG)/wakeup_fd_cv_test \ $(BINDIR)/$(CONFIG)/public_headers_must_be_c89 \ $(BINDIR)/$(CONFIG)/badreq_bad_client_test \ $(BINDIR)/$(CONFIG)/connection_prefix_bad_client_test \ @@ -1717,6 +1719,8 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/udp_server_test || ( echo test udp_server_test failed ; exit 1 ) $(E) "[RUN] Testing uri_parser_test" $(Q) $(BINDIR)/$(CONFIG)/uri_parser_test || ( echo test uri_parser_test failed ; exit 1 ) + $(E) "[RUN] Testing wakeup_fd_cv_test" + $(Q) $(BINDIR)/$(CONFIG)/wakeup_fd_cv_test || ( echo test wakeup_fd_cv_test failed ; exit 1 ) $(E) "[RUN] Testing public_headers_must_be_c89" $(Q) $(BINDIR)/$(CONFIG)/public_headers_must_be_c89 || ( echo test public_headers_must_be_c89 failed ; exit 1 ) $(E) "[RUN] Testing badreq_bad_client_test" @@ -2566,6 +2570,7 @@ LIBGRPC_SRC = \ 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 \ @@ -2842,6 +2847,7 @@ LIBGRPC_CRONET_SRC = \ 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 \ @@ -3107,6 +3113,7 @@ LIBGRPC_TEST_UTIL_SRC = \ 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 \ @@ -3300,6 +3307,7 @@ LIBGRPC_UNSECURE_SRC = \ 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 \ @@ -3640,6 +3648,7 @@ LIBGRPC++_SRC = \ 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 \ @@ -4275,6 +4284,7 @@ LIBGRPC++_UNSECURE_SRC = \ 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 \ @@ -10805,6 +10815,38 @@ endif endif +WAKEUP_FD_CV_TEST_SRC = \ + test/core/iomgr/wakeup_fd_cv_test.c \ + +WAKEUP_FD_CV_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(WAKEUP_FD_CV_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/wakeup_fd_cv_test: openssl_dep_error + +else + + + +$(BINDIR)/$(CONFIG)/wakeup_fd_cv_test: $(WAKEUP_FD_CV_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(WAKEUP_FD_CV_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/wakeup_fd_cv_test + +endif + +$(OBJDIR)/$(CONFIG)/test/core/iomgr/wakeup_fd_cv_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_wakeup_fd_cv_test: $(WAKEUP_FD_CV_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(WAKEUP_FD_CV_TEST_OBJS:.o=.dep) +endif +endif + + ALARM_CPP_TEST_SRC = \ test/cpp/common/alarm_cpp_test.cc \ diff --git a/binding.gyp b/binding.gyp index 7cc8a58c01..1b68b63d22 100644 --- a/binding.gyp +++ b/binding.gyp @@ -617,6 +617,7 @@ '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', diff --git a/build.yaml b/build.yaml index 6eb23d6fb7..d4f731e85f 100644 --- a/build.yaml +++ b/build.yaml @@ -217,6 +217,7 @@ filegroups: - src/core/lib/iomgr/timer_heap.h - src/core/lib/iomgr/udp_server.h - src/core/lib/iomgr/unix_sockets_posix.h + - src/core/lib/iomgr/wakeup_fd_cv.h - src/core/lib/iomgr/wakeup_fd_pipe.h - src/core/lib/iomgr/wakeup_fd_posix.h - src/core/lib/iomgr/workqueue.h @@ -299,6 +300,7 @@ filegroups: - 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 @@ -2535,6 +2537,20 @@ targets: - grpc - gpr_test_util - gpr +- name: wakeup_fd_cv_test + build: test + language: c + src: + - test/core/iomgr/wakeup_fd_cv_test.c + deps: + - grpc_test_util + - grpc + - gpr_test_util + - gpr + platforms: + - mac + - linux + - posix - name: alarm_cpp_test gtest: true build: test diff --git a/config.m4 b/config.m4 index 5384585dd6..6b605fbcd6 100644 --- a/config.m4 +++ b/config.m4 @@ -136,6 +136,7 @@ if test "$PHP_GRPC" != "no"; then 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 \ diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index deffa1653e..92b3022cf7 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -306,6 +306,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/timer_heap.h', 'src/core/lib/iomgr/udp_server.h', 'src/core/lib/iomgr/unix_sockets_posix.h', + 'src/core/lib/iomgr/wakeup_fd_cv.h', 'src/core/lib/iomgr/wakeup_fd_pipe.h', 'src/core/lib/iomgr/wakeup_fd_posix.h', 'src/core/lib/iomgr/workqueue.h', @@ -467,6 +468,7 @@ Pod::Spec.new do |s| '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', @@ -668,6 +670,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/timer_heap.h', 'src/core/lib/iomgr/udp_server.h', 'src/core/lib/iomgr/unix_sockets_posix.h', + 'src/core/lib/iomgr/wakeup_fd_cv.h', 'src/core/lib/iomgr/wakeup_fd_pipe.h', 'src/core/lib/iomgr/wakeup_fd_posix.h', 'src/core/lib/iomgr/workqueue.h', diff --git a/grpc.gemspec b/grpc.gemspec index f249006065..d672bb1284 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -226,6 +226,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/timer_heap.h ) s.files += %w( src/core/lib/iomgr/udp_server.h ) s.files += %w( src/core/lib/iomgr/unix_sockets_posix.h ) + s.files += %w( src/core/lib/iomgr/wakeup_fd_cv.h ) s.files += %w( src/core/lib/iomgr/wakeup_fd_pipe.h ) s.files += %w( src/core/lib/iomgr/wakeup_fd_posix.h ) s.files += %w( src/core/lib/iomgr/workqueue.h ) @@ -387,6 +388,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/udp_server.c ) s.files += %w( src/core/lib/iomgr/unix_sockets_posix.c ) s.files += %w( src/core/lib/iomgr/unix_sockets_posix_noop.c ) + s.files += %w( src/core/lib/iomgr/wakeup_fd_cv.c ) s.files += %w( src/core/lib/iomgr/wakeup_fd_eventfd.c ) s.files += %w( src/core/lib/iomgr/wakeup_fd_nospecial.c ) s.files += %w( src/core/lib/iomgr/wakeup_fd_pipe.c ) diff --git a/package.xml b/package.xml index 93210ee47b..02cc271fe5 100644 --- a/package.xml +++ b/package.xml @@ -233,6 +233,7 @@ + @@ -394,6 +395,7 @@ + diff --git a/src/core/lib/iomgr/wakeup_fd_cv.c b/src/core/lib/iomgr/wakeup_fd_cv.c new file mode 100644 index 0000000000..bfdc2cb422 --- /dev/null +++ b/src/core/lib/iomgr/wakeup_fd_cv.c @@ -0,0 +1,328 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include + +#ifdef GPR_POSIX_WAKEUP_FD + +#include "src/core/lib/iomgr/wakeup_fd_posix.h" + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "src/core/lib/iomgr/ev_posix.h" + +#define MAX_TABLE_RESIZE 256 +#define DEFAULT_TABLE_SIZE 16 +#define POLL_PERIOD_MS 1000 + +#define FD_TO_IDX(fd) (-(fd)-1) +#define IDX_TO_FD(idx) (-(idx)-1) + +typedef struct cv_node { + gpr_cv* cv; + struct cv_node* next; +} cv_node; + +typedef struct fd_node { + int is_set; + cv_node* cvs; + struct fd_node* next_free; +} fd_node; + +typedef struct cv_fd_table { + fd_node* cvfds; + fd_node* free_fds; + unsigned int size; + grpc_poll_function_type poll; +} cv_fd_table; + +typedef struct poll_result { + struct pollfd* fds; + gpr_cv* cv; + int completed; + int res; + int err; +} poll_result; + +typedef struct poll_args { + struct pollfd* fds; + nfds_t nfds; + int timeout; + poll_result* result; +} poll_args; + +static gpr_mu g_mu = PTHREAD_MUTEX_INITIALIZER; +static cv_fd_table g_cvfds; + +// Some environments do not implement pthread_cancel(), so we run +// this poll in a detached thread, and wake up periodically and +// check if the calling thread is still waiting on a result +static void run_poll(void* arg) { + int result, timeout; + poll_args* pargs = (poll_args*)arg; + gpr_mu_lock(&g_mu); + if (pargs->result != NULL) { + while (pargs->result != NULL) { + if (pargs->timeout < 0) { + timeout = POLL_PERIOD_MS; + } else { + timeout = GPR_MIN(POLL_PERIOD_MS, pargs->timeout); + pargs->timeout -= timeout; + } + gpr_mu_unlock(&g_mu); + result = g_cvfds.poll(pargs->fds, pargs->nfds, timeout); + gpr_mu_lock(&g_mu); + if (pargs->result != NULL) { + if (result != 0 || pargs->timeout == 0) { + memcpy(pargs->result->fds, pargs->fds, + sizeof(struct pollfd) * pargs->nfds); + pargs->result->res = result; + pargs->result->err = errno; + pargs->result->completed = 1; + gpr_cv_signal(pargs->result->cv); + break; + } + } + } + } + gpr_free(pargs->fds); + gpr_free(pargs); + gpr_mu_unlock(&g_mu); +} + +int cvfd_poll(struct pollfd* fds, nfds_t nfds, int timeout) { + unsigned int i; + int res, idx; + cv_node *cvn, *prev; + struct pollfd* sockfds; + nfds_t nsockfds = 0; + gpr_cv pollcv; + gpr_thd_id t_id; + gpr_thd_options opt; + poll_args* pargs; + poll_result* pres; + gpr_mu_lock(&g_mu); + gpr_cv_init(&pollcv); + for (i = 0; i < nfds; i++) { + fds[i].revents = 0; + if (fds[i].fd < 0 && (fds[i].events & POLLIN)) { + idx = FD_TO_IDX(fds[i].fd); + cvn = gpr_malloc(sizeof(cv_node)); + cvn->cv = &pollcv; + cvn->next = g_cvfds.cvfds[idx].cvs; + g_cvfds.cvfds[idx].cvs = cvn; + // We should return immediately if there are pending events, + // but we still need to call poll() to check for socket events + if (g_cvfds.cvfds[idx].is_set) { + timeout = 0; + } + } else if (fds[i].fd >= 0) { + nsockfds++; + } + } + sockfds = gpr_malloc(sizeof(struct pollfd) * nsockfds); + idx = 0; + for (i = 0; i < nfds; i++) { + if (fds[i].fd >= 0) { + sockfds[idx].fd = fds[i].fd; + sockfds[idx].events = fds[i].events; + sockfds[idx].revents = 0; + idx++; + } + } + + errno = 0; + if (nsockfds > 0) { + pres = gpr_malloc(sizeof(struct poll_result)); + pargs = gpr_malloc(sizeof(struct poll_args)); + + pargs->fds = gpr_malloc(sizeof(struct pollfd) * nsockfds); + memcpy(pargs->fds, sockfds, sizeof(struct pollfd) * nsockfds); + pargs->nfds = nsockfds; + pargs->timeout = timeout; + pargs->result = pres; + + pres->fds = sockfds; + pres->cv = &pollcv; + pres->completed = 0; + pres->res = 0; + pres->err = 0; + + opt = gpr_thd_options_default(); + gpr_thd_options_set_detached(&opt); + gpr_thd_new(&t_id, &run_poll, pargs, &opt); + // We want the poll() thread to trigger the deadline, so wait forever here + gpr_cv_wait(&pollcv, &g_mu, gpr_inf_future(GPR_CLOCK_MONOTONIC)); + if (!pres->completed) { + pargs->result = NULL; + } + res = pres->res; + errno = pres->err; + gpr_free(pres); + } else { + gpr_timespec deadline = gpr_now(GPR_CLOCK_REALTIME); + deadline = + gpr_time_add(deadline, gpr_time_from_millis(timeout, GPR_TIMESPAN)); + gpr_cv_wait(&pollcv, &g_mu, deadline); + res = 0; + } + idx = 0; + for (i = 0; i < nfds; i++) { + if (fds[i].fd < 0 && (fds[i].events & POLLIN)) { + cvn = g_cvfds.cvfds[FD_TO_IDX(fds[i].fd)].cvs; + prev = NULL; + while (cvn->cv != &pollcv) { + prev = cvn; + cvn = cvn->next; + GPR_ASSERT(cvn); + } + if (!prev) { + g_cvfds.cvfds[FD_TO_IDX(fds[i].fd)].cvs = cvn->next; + } else { + prev->next = cvn->next; + } + gpr_free(cvn); + + if (g_cvfds.cvfds[FD_TO_IDX(fds[i].fd)].is_set) { + fds[i].revents = POLLIN; + if (res >= 0) res++; + } + } else if (fds[i].fd >= 0) { + fds[i].revents = sockfds[idx].revents; + idx++; + } + } + gpr_free(sockfds); + gpr_cv_destroy(&pollcv); + gpr_mu_unlock(&g_mu); + + return res; +} + +static grpc_error* cv_fd_init(grpc_wakeup_fd* fd_info) { + unsigned int i, newsize; + int idx; + gpr_mu_lock(&g_mu); + if (!g_cvfds.free_fds) { + newsize = GPR_MIN(g_cvfds.size * 2, g_cvfds.size + MAX_TABLE_RESIZE); + g_cvfds.cvfds = gpr_realloc(g_cvfds.cvfds, sizeof(fd_node) * newsize); + for (i = g_cvfds.size; i < newsize; i++) { + g_cvfds.cvfds[i].is_set = 0; + g_cvfds.cvfds[i].cvs = NULL; + g_cvfds.cvfds[i].next_free = g_cvfds.free_fds; + g_cvfds.free_fds = &g_cvfds.cvfds[i]; + } + g_cvfds.size = newsize; + } + + idx = (int)(g_cvfds.free_fds - g_cvfds.cvfds); + g_cvfds.free_fds = g_cvfds.free_fds->next_free; + g_cvfds.cvfds[idx].cvs = NULL; + g_cvfds.cvfds[idx].is_set = 0; + fd_info->read_fd = IDX_TO_FD(idx); + fd_info->write_fd = -1; + gpr_mu_unlock(&g_mu); + return GRPC_ERROR_NONE; +} + +void grpc_global_cv_fd_table_init() { + gpr_mu_lock(&g_mu); + g_cvfds.size = DEFAULT_TABLE_SIZE; + g_cvfds.cvfds = gpr_malloc(sizeof(fd_node) * DEFAULT_TABLE_SIZE); + g_cvfds.free_fds = NULL; + for (int i = 0; i < DEFAULT_TABLE_SIZE; i++) { + g_cvfds.cvfds[i].is_set = 0; + g_cvfds.cvfds[i].cvs = NULL; + g_cvfds.cvfds[i].next_free = g_cvfds.free_fds; + g_cvfds.free_fds = &g_cvfds.cvfds[i]; + } + // Override the poll function with one that supports cvfds + g_cvfds.poll = grpc_poll_function; + grpc_poll_function = &cvfd_poll; + gpr_mu_unlock(&g_mu); +} + +void grpc_global_cv_fd_table_shutdown() { + gpr_mu_lock(&g_mu); + grpc_poll_function = g_cvfds.poll; + gpr_free(g_cvfds.cvfds); + gpr_mu_unlock(&g_mu); +} + +static grpc_error* cv_fd_wakeup(grpc_wakeup_fd* fd_info) { + cv_node* cvn; + gpr_mu_lock(&g_mu); + g_cvfds.cvfds[FD_TO_IDX(fd_info->read_fd)].is_set = 1; + cvn = g_cvfds.cvfds[FD_TO_IDX(fd_info->read_fd)].cvs; + while (cvn) { + gpr_cv_signal(cvn->cv); + cvn = cvn->next; + } + gpr_mu_unlock(&g_mu); + return GRPC_ERROR_NONE; +} + +static grpc_error* cv_fd_consume(grpc_wakeup_fd* fd_info) { + gpr_mu_lock(&g_mu); + g_cvfds.cvfds[FD_TO_IDX(fd_info->read_fd)].is_set = 0; + gpr_mu_unlock(&g_mu); + return GRPC_ERROR_NONE; +} + +static void cv_fd_destroy(grpc_wakeup_fd* fd_info) { + if (fd_info->read_fd == 0) { + return; + } + gpr_mu_lock(&g_mu); + // Assert that there are no active pollers + GPR_ASSERT(!g_cvfds.cvfds[FD_TO_IDX(fd_info->read_fd)].cvs); + g_cvfds.cvfds[FD_TO_IDX(fd_info->read_fd)].next_free = g_cvfds.free_fds; + g_cvfds.free_fds = &g_cvfds.cvfds[FD_TO_IDX(fd_info->read_fd)]; + gpr_mu_unlock(&g_mu); +} + +static int cv_check_availability(void) { return 1; } + +const grpc_wakeup_fd_vtable grpc_cv_wakeup_fd_vtable = { + cv_fd_init, cv_fd_consume, cv_fd_wakeup, cv_fd_destroy, + cv_check_availability}; + +#endif /* GPR_POSIX_WAKUP_FD */ diff --git a/src/core/lib/iomgr/wakeup_fd_cv.h b/src/core/lib/iomgr/wakeup_fd_cv.h new file mode 100644 index 0000000000..22ee6c0bbe --- /dev/null +++ b/src/core/lib/iomgr/wakeup_fd_cv.h @@ -0,0 +1,58 @@ +/* + * + * Copyright 2016, 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. + * + */ + +/* + * wakeup_fd_cv uses condition variables to implement wakeup fds. + * + * It is intended for use only in cases when eventfd() and pipe() are not + * available. It can only be used with the "poll" engine. + * + * Implementation: + * A global table of cv wakeup fds is mantained. A cv wakeup fd is a negative + * file descriptor. poll() is then run in a background thread with only the + * real socket fds while we wait on a condition variable trigged by either the + * poll() called or a wakeup_fd() call. + * + */ + +#ifndef GRPC_CORE_LIB_IOMGR_WAKEUP_FD_CV_H +#define GRPC_CORE_LIB_IOMGR_WAKEUP_FD_CV_H + +#include "src/core/lib/iomgr/wakeup_fd_posix.h" + +void grpc_global_cv_fd_table_init(); +void grpc_global_cv_fd_table_shutdown(); + +extern grpc_wakeup_fd_vtable grpc_cv_wakeup_fd_vtable; + +#endif /* GRPC_CORE_LIB_IOMGR_WAKEUP_FD_CV_H */ diff --git a/src/core/lib/iomgr/wakeup_fd_pipe.c b/src/core/lib/iomgr/wakeup_fd_pipe.c index 4e5dbdcb73..3dc94c94ba 100644 --- a/src/core/lib/iomgr/wakeup_fd_pipe.c +++ b/src/core/lib/iomgr/wakeup_fd_pipe.c @@ -95,8 +95,13 @@ static void pipe_destroy(grpc_wakeup_fd* fd_info) { } static int pipe_check_availability(void) { - /* Assume that pipes are always available. */ - return 1; + grpc_wakeup_fd fd; + if (pipe_init(&fd) == GRPC_ERROR_NONE) { + pipe_destroy(&fd); + return 1; + } else { + return 0; + } } const grpc_wakeup_fd_vtable grpc_pipe_wakeup_fd_vtable = { diff --git a/src/core/lib/iomgr/wakeup_fd_posix.c b/src/core/lib/iomgr/wakeup_fd_posix.c index 046208abc8..564b836154 100644 --- a/src/core/lib/iomgr/wakeup_fd_posix.c +++ b/src/core/lib/iomgr/wakeup_fd_posix.c @@ -36,22 +36,33 @@ #ifdef GPR_POSIX_WAKEUP_FD #include +#include "src/core/lib/iomgr/wakeup_fd_cv.h" #include "src/core/lib/iomgr/wakeup_fd_pipe.h" #include "src/core/lib/iomgr/wakeup_fd_posix.h" static const grpc_wakeup_fd_vtable *wakeup_fd_vtable = NULL; int grpc_allow_specialized_wakeup_fd = 1; +int grpc_allow_pipe_wakeup_fd = 1; void grpc_wakeup_fd_global_init(void) { if (grpc_allow_specialized_wakeup_fd && grpc_specialized_wakeup_fd_vtable.check_availability()) { wakeup_fd_vtable = &grpc_specialized_wakeup_fd_vtable; - } else { + } else if (grpc_allow_pipe_wakeup_fd && + grpc_pipe_wakeup_fd_vtable.check_availability()) { wakeup_fd_vtable = &grpc_pipe_wakeup_fd_vtable; + } else { + wakeup_fd_vtable = &grpc_cv_wakeup_fd_vtable; + grpc_global_cv_fd_table_init(); } } -void grpc_wakeup_fd_global_destroy(void) { wakeup_fd_vtable = NULL; } +void grpc_wakeup_fd_global_destroy(void) { + if (wakeup_fd_vtable == &grpc_cv_wakeup_fd_vtable) { + grpc_global_cv_fd_table_shutdown(); + } + wakeup_fd_vtable = NULL; +} grpc_error *grpc_wakeup_fd_init(grpc_wakeup_fd *fd_info) { return wakeup_fd_vtable->init(fd_info); diff --git a/src/core/lib/iomgr/wakeup_fd_posix.h b/src/core/lib/iomgr/wakeup_fd_posix.h index e269f242d8..a9f902bc9f 100644 --- a/src/core/lib/iomgr/wakeup_fd_posix.h +++ b/src/core/lib/iomgr/wakeup_fd_posix.h @@ -88,6 +88,7 @@ struct grpc_wakeup_fd { }; extern int grpc_allow_specialized_wakeup_fd; +extern int grpc_allow_pipe_wakeup_fd; #define GRPC_WAKEUP_FD_GET_READ_FD(fd_info) ((fd_info)->read_fd) diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index be7f30c29b..dc2ce46979 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -130,6 +130,7 @@ CORE_SOURCE_FILES = [ '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', diff --git a/test/core/iomgr/wakeup_fd_cv_test.c b/test/core/iomgr/wakeup_fd_cv_test.c new file mode 100644 index 0000000000..2cd777536d --- /dev/null +++ b/test/core/iomgr/wakeup_fd_cv_test.c @@ -0,0 +1,246 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include + +#include +#include +#include +#include + +#include "src/core/lib/iomgr/ev_posix.h" +#include "src/core/lib/iomgr/wakeup_fd_posix.h" +#include "src/core/lib/support/env.h" + +typedef struct poll_args { + struct pollfd *fds; + nfds_t nfds; + int timeout; + int result; +} poll_args; + +gpr_cv poll_cv; +gpr_mu poll_mu; +static int socket_event = 0; + +// Trigger a "socket" POLLIN in mock_poll() +void trigger_socket_event() { + gpr_mu_lock(&poll_mu); + socket_event = 1; + gpr_cv_broadcast(&poll_cv); + gpr_mu_unlock(&poll_mu); +} + +void reset_socket_event() { + gpr_mu_lock(&poll_mu); + socket_event = 0; + gpr_mu_unlock(&poll_mu); +} + +// Mocks posix poll() function +int mock_poll(struct pollfd *fds, nfds_t nfds, int timeout) { + int res = 0; + gpr_timespec poll_time; + gpr_mu_lock(&poll_mu); + GPR_ASSERT(nfds == 3); + GPR_ASSERT(fds[0].fd == 20); + GPR_ASSERT(fds[1].fd == 30); + GPR_ASSERT(fds[2].fd == 50); + GPR_ASSERT(fds[0].events == (POLLIN | POLLHUP)); + GPR_ASSERT(fds[1].events == (POLLIN | POLLHUP)); + GPR_ASSERT(fds[2].events == POLLIN); + + if (timeout < 0) { + poll_time = gpr_inf_future(GPR_CLOCK_REALTIME); + } else { + poll_time = gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), + gpr_time_from_millis(timeout, GPR_TIMESPAN)); + } + + if (socket_event || !gpr_cv_wait(&poll_cv, &poll_mu, poll_time)) { + fds[0].revents = POLLIN; + res = 1; + } + gpr_mu_unlock(&poll_mu); + return res; +} + +void background_poll(void *args) { + poll_args *pargs = (poll_args *)args; + pargs->result = grpc_poll_function(pargs->fds, pargs->nfds, pargs->timeout); +} + +void test_many_fds(void) { + int i; + grpc_wakeup_fd_global_init(); + grpc_wakeup_fd fd[1000]; + for (i = 0; i < 1000; i++) { + GPR_ASSERT(grpc_wakeup_fd_init(&fd[i]) == GRPC_ERROR_NONE); + } + for (i = 0; i < 1000; i++) { + grpc_wakeup_fd_destroy(&fd[i]); + } + grpc_wakeup_fd_global_destroy(); +} + +void test_poll_cv_trigger(void) { + grpc_wakeup_fd cvfd1, cvfd2, cvfd3; + struct pollfd pfds[6]; + poll_args pargs; + gpr_thd_id t_id; + gpr_thd_options opt; + grpc_poll_function = &mock_poll; + grpc_wakeup_fd_global_init(); + + GPR_ASSERT(grpc_wakeup_fd_init(&cvfd1) == GRPC_ERROR_NONE); + GPR_ASSERT(grpc_wakeup_fd_init(&cvfd2) == GRPC_ERROR_NONE); + GPR_ASSERT(grpc_wakeup_fd_init(&cvfd3) == GRPC_ERROR_NONE); + GPR_ASSERT(cvfd1.read_fd < 0); + GPR_ASSERT(cvfd2.read_fd < 0); + GPR_ASSERT(cvfd3.read_fd < 0); + GPR_ASSERT(cvfd1.read_fd != cvfd2.read_fd); + GPR_ASSERT(cvfd2.read_fd != cvfd3.read_fd); + GPR_ASSERT(cvfd1.read_fd != cvfd3.read_fd); + + pfds[0].fd = cvfd1.read_fd; + pfds[1].fd = cvfd2.read_fd; + pfds[2].fd = 20; + pfds[3].fd = 30; + pfds[4].fd = cvfd3.read_fd; + pfds[5].fd = 50; + + pfds[0].events = 0; + pfds[1].events = POLLIN; + pfds[2].events = POLLIN | POLLHUP; + pfds[3].events = POLLIN | POLLHUP; + pfds[4].events = POLLIN; + pfds[5].events = POLLIN; + + pargs.fds = pfds; + pargs.nfds = 6; + pargs.timeout = 1000; + pargs.result = -2; + + opt = gpr_thd_options_default(); + gpr_thd_options_set_joinable(&opt); + gpr_thd_new(&t_id, &background_poll, &pargs, &opt); + + // Wakeup wakeup_fd not listening for events + GPR_ASSERT(grpc_wakeup_fd_wakeup(&cvfd1) == GRPC_ERROR_NONE); + gpr_thd_join(t_id); + GPR_ASSERT(pargs.result == 0); + GPR_ASSERT(pfds[0].revents == 0); + GPR_ASSERT(pfds[1].revents == 0); + GPR_ASSERT(pfds[2].revents == 0); + GPR_ASSERT(pfds[3].revents == 0); + GPR_ASSERT(pfds[4].revents == 0); + GPR_ASSERT(pfds[5].revents == 0); + + // Pollin on socket fd + pargs.timeout = -1; + pargs.result = -2; + gpr_thd_new(&t_id, &background_poll, &pargs, &opt); + trigger_socket_event(); + gpr_thd_join(t_id); + GPR_ASSERT(pargs.result == 1); + GPR_ASSERT(pfds[0].revents == 0); + GPR_ASSERT(pfds[1].revents == 0); + GPR_ASSERT(pfds[2].revents == POLLIN); + GPR_ASSERT(pfds[3].revents == 0); + GPR_ASSERT(pfds[4].revents == 0); + GPR_ASSERT(pfds[5].revents == 0); + + // Pollin on wakeup fd + reset_socket_event(); + pargs.result = -2; + gpr_thd_new(&t_id, &background_poll, &pargs, &opt); + GPR_ASSERT(grpc_wakeup_fd_wakeup(&cvfd2) == GRPC_ERROR_NONE); + gpr_thd_join(t_id); + + GPR_ASSERT(pargs.result == 1); + GPR_ASSERT(pfds[0].revents == 0); + GPR_ASSERT(pfds[1].revents == POLLIN); + GPR_ASSERT(pfds[2].revents == 0); + GPR_ASSERT(pfds[3].revents == 0); + GPR_ASSERT(pfds[4].revents == 0); + GPR_ASSERT(pfds[5].revents == 0); + + // Pollin on wakeup fd + socket fd + trigger_socket_event(); + pargs.result = -2; + gpr_thd_new(&t_id, &background_poll, &pargs, &opt); + gpr_thd_join(t_id); + + GPR_ASSERT(pargs.result == 2); + GPR_ASSERT(pfds[0].revents == 0); + GPR_ASSERT(pfds[1].revents == POLLIN); + GPR_ASSERT(pfds[2].revents == POLLIN); + GPR_ASSERT(pfds[3].revents == 0); + GPR_ASSERT(pfds[4].revents == 0); + GPR_ASSERT(pfds[5].revents == 0); + + // No Events + pargs.result = -2; + pargs.timeout = 1000; + reset_socket_event(); + GPR_ASSERT(grpc_wakeup_fd_consume_wakeup(&cvfd1) == GRPC_ERROR_NONE); + GPR_ASSERT(grpc_wakeup_fd_consume_wakeup(&cvfd2) == GRPC_ERROR_NONE); + gpr_thd_new(&t_id, &background_poll, &pargs, &opt); + gpr_thd_join(t_id); + + GPR_ASSERT(pargs.result == 0); + GPR_ASSERT(pfds[0].revents == 0); + GPR_ASSERT(pfds[1].revents == 0); + GPR_ASSERT(pfds[2].revents == 0); + GPR_ASSERT(pfds[3].revents == 0); + GPR_ASSERT(pfds[4].revents == 0); + GPR_ASSERT(pfds[5].revents == 0); + + grpc_wakeup_fd_global_destroy(); +} + +int main(int argc, char **argv) { + gpr_setenv("GRPC_POLL_STRATEGY", "poll"); + grpc_allow_specialized_wakeup_fd = 0; + grpc_allow_pipe_wakeup_fd = 0; + gpr_mu_init(&poll_mu); + gpr_cv_init(&poll_cv); + test_many_fds(); + test_poll_cv_trigger(); + // Make sure detached polling threads have chance + // to exit and clean up memory. pthread_exit() causes tsan/msan + // issues, so we just wait an ample amount of time + gpr_sleep_until(gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), + gpr_time_from_seconds(5, GPR_TIMESPAN))); + return 0; +} diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 06b68c3b74..6e08a1977c 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -925,6 +925,7 @@ src/core/lib/iomgr/timer.h \ src/core/lib/iomgr/timer_heap.h \ src/core/lib/iomgr/udp_server.h \ src/core/lib/iomgr/unix_sockets_posix.h \ +src/core/lib/iomgr/wakeup_fd_cv.h \ src/core/lib/iomgr/wakeup_fd_pipe.h \ src/core/lib/iomgr/wakeup_fd_posix.h \ src/core/lib/iomgr/workqueue.h \ @@ -1039,6 +1040,7 @@ src/core/lib/iomgr/timer_heap.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 \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 02590db421..2328194c3a 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -842,6 +842,7 @@ src/core/lib/iomgr/timer.h \ src/core/lib/iomgr/timer_heap.h \ src/core/lib/iomgr/udp_server.h \ src/core/lib/iomgr/unix_sockets_posix.h \ +src/core/lib/iomgr/wakeup_fd_cv.h \ src/core/lib/iomgr/wakeup_fd_pipe.h \ src/core/lib/iomgr/wakeup_fd_posix.h \ src/core/lib/iomgr/workqueue.h \ @@ -1003,6 +1004,7 @@ src/core/lib/iomgr/timer_heap.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 \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index db84f21968..2ce0e3b05c 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -1891,6 +1891,22 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "wakeup_fd_cv_test", + "src": [ + "test/core/iomgr/wakeup_fd_cv_test.c" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "gpr", @@ -5941,6 +5957,7 @@ "src/core/lib/iomgr/timer_heap.h", "src/core/lib/iomgr/udp_server.h", "src/core/lib/iomgr/unix_sockets_posix.h", + "src/core/lib/iomgr/wakeup_fd_cv.h", "src/core/lib/iomgr/wakeup_fd_pipe.h", "src/core/lib/iomgr/wakeup_fd_posix.h", "src/core/lib/iomgr/workqueue.h", @@ -6085,6 +6102,8 @@ "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", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index f97ee835c1..de9c3d1053 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -1977,6 +1977,25 @@ "windows" ] }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "gtest": false, + "language": "c", + "name": "wakeup_fd_cv_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "args": [], "ci_platforms": [ diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index 1bcb263911..2afda35d34 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -425,6 +425,7 @@ + @@ -627,6 +628,8 @@ + + diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters index 7343c80cc4..1f88ae0e93 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters @@ -259,6 +259,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -869,6 +872,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj index 3241bafa6b..be20aef6dc 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -421,6 +421,7 @@ + @@ -613,6 +614,8 @@ + + diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters index 3df26646fc..628173dbbe 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters @@ -244,6 +244,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -842,6 +845,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 7c120bcf02..ae24e8f066 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -351,6 +351,7 @@ + @@ -568,6 +569,8 @@ + + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 9cbb2ce45b..a849795dc9 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -163,6 +163,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -821,6 +824,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index 80dd6b2dcb..3c3fae370f 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -242,6 +242,7 @@ + @@ -412,6 +413,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index 8dc28d1cb9..b81431cafa 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -211,6 +211,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -602,6 +605,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index d4a85768c3..69d631e452 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -341,6 +341,7 @@ + @@ -536,6 +537,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index fba5a02099..36e80b4a13 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -166,6 +166,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -731,6 +734,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr -- cgit v1.2.3 From 9030c81f20c3721e7b0a92564f6e4d772a78ffcb Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 16 Sep 2016 13:25:08 -0700 Subject: Add a libuv endpoint to the C core, for use in the Node library --- BUILD | 68 +++- CMakeLists.txt | 36 +- Makefile | 48 ++- binding.gyp | 16 +- build.yaml | 19 +- config.m4 | 12 +- gRPC-Core.podspec | 22 +- grpc.gemspec | 17 +- package.xml | 17 +- src/core/ext/client_config/client_config_plugin.c | 5 + src/core/ext/client_config/connector.h | 5 + src/core/ext/lb_policy/grpclb/grpclb.c | 5 + src/core/ext/lb_policy/pick_first/pick_first.c | 5 + src/core/ext/lb_policy/round_robin/round_robin.c | 5 + src/core/ext/resolver/dns/native/dns_resolver.c | 5 + src/core/ext/resolver/sockaddr/sockaddr_resolver.c | 5 + src/core/lib/http/httpcli.h | 5 + src/core/lib/iomgr/iomgr.h | 2 + src/core/lib/iomgr/iomgr_uv.c | 51 +++ src/core/lib/iomgr/pollset_set_uv.c | 62 ++++ src/core/lib/iomgr/pollset_set_windows.c | 2 +- src/core/lib/iomgr/pollset_uv.c | 84 +++++ src/core/lib/iomgr/pollset_uv.h | 35 ++ src/core/lib/iomgr/port.h | 13 +- src/core/lib/iomgr/resolve_address_uv.c | 234 +++++++++++++ src/core/lib/iomgr/sockaddr.h | 4 + src/core/lib/iomgr/socket_utils.h | 6 +- src/core/lib/iomgr/socket_utils_uv.c | 50 +++ src/core/lib/iomgr/tcp_client_uv.c | 142 ++++++++ src/core/lib/iomgr/tcp_server_uv.c | 358 +++++++++++++++++++ src/core/lib/iomgr/tcp_uv.c | 336 ++++++++++++++++++ src/core/lib/iomgr/tcp_uv.h | 57 +++ src/core/lib/iomgr/timer.c | 384 -------------------- src/core/lib/iomgr/timer.h | 17 +- src/core/lib/iomgr/timer_generic.c | 390 +++++++++++++++++++++ src/core/lib/iomgr/timer_generic.h | 49 +++ src/core/lib/iomgr/timer_heap.c | 6 + src/core/lib/iomgr/timer_uv.c | 103 ++++++ src/core/lib/iomgr/timer_uv.h | 47 +++ src/core/lib/iomgr/workqueue_uv.c | 62 ++++ src/core/lib/iomgr/workqueue_uv.h | 37 ++ src/core/lib/security/context/security_context.c | 5 + src/core/lib/security/context/security_context.h | 5 + src/core/lib/security/credentials/credentials.h | 5 + .../credentials/oauth2/oauth2_credentials.c | 5 + .../lib/security/transport/server_auth_filter.c | 5 + src/core/lib/surface/call.c | 6 + src/core/lib/surface/init_secure.c | 5 + src/core/lib/tsi/ssl_transport_security.c | 5 + src/node/ext/call.cc | 73 +++- src/node/ext/call.h | 68 ++-- src/node/ext/channel.cc | 8 +- src/node/ext/completion_queue.cc | 114 ++++++ src/node/ext/completion_queue.h | 46 +++ src/node/ext/completion_queue_async_worker.cc | 2 + src/node/ext/node_grpc.cc | 19 +- src/node/ext/server.cc | 91 ++++- src/node/ext/server.h | 1 - src/node/ext/server_credentials.cc | 8 +- src/node/index.js | 4 + src/node/src/client.js | 1 + src/node/src/grpc_extension.js | 2 +- src/node/test/async_test.js | 1 + src/python/grpcio/grpc_core_dependencies.py | 12 +- templates/binding.gyp.template | 3 + tools/doxygen/Doxyfile.core.internal | 17 +- tools/run_tests/performance/scenario_config.py | 15 +- tools/run_tests/sources_and_headers.json | 22 +- vsprojects/vcxproj/grpc/grpc.vcxproj | 27 +- vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 47 ++- .../vcxproj/grpc_test_util/grpc_test_util.vcxproj | 27 +- .../grpc_test_util/grpc_test_util.vcxproj.filters | 47 ++- .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 27 +- .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 47 ++- 74 files changed, 3103 insertions(+), 493 deletions(-) create mode 100644 src/core/lib/iomgr/iomgr_uv.c create mode 100644 src/core/lib/iomgr/pollset_set_uv.c create mode 100644 src/core/lib/iomgr/pollset_uv.c create mode 100644 src/core/lib/iomgr/pollset_uv.h create mode 100644 src/core/lib/iomgr/resolve_address_uv.c create mode 100644 src/core/lib/iomgr/socket_utils_uv.c create mode 100644 src/core/lib/iomgr/tcp_client_uv.c create mode 100644 src/core/lib/iomgr/tcp_server_uv.c create mode 100644 src/core/lib/iomgr/tcp_uv.c create mode 100644 src/core/lib/iomgr/tcp_uv.h delete mode 100644 src/core/lib/iomgr/timer.c create mode 100644 src/core/lib/iomgr/timer_generic.c create mode 100644 src/core/lib/iomgr/timer_generic.h create mode 100644 src/core/lib/iomgr/timer_uv.c create mode 100644 src/core/lib/iomgr/timer_uv.h create mode 100644 src/core/lib/iomgr/workqueue_uv.c create mode 100644 src/core/lib/iomgr/workqueue_uv.h create mode 100644 src/node/ext/completion_queue.cc create mode 100644 src/node/ext/completion_queue.h (limited to 'src/core/lib') diff --git a/BUILD b/BUILD index cf81163832..57f0e0d7bf 100644 --- a/BUILD +++ b/BUILD @@ -194,6 +194,7 @@ cc_library( "src/core/lib/iomgr/pollset.h", "src/core/lib/iomgr/pollset_set.h", "src/core/lib/iomgr/pollset_set_windows.h", + "src/core/lib/iomgr/pollset_uv.h", "src/core/lib/iomgr/pollset_windows.h", "src/core/lib/iomgr/port.h", "src/core/lib/iomgr/resolve_address.h", @@ -207,16 +208,20 @@ cc_library( "src/core/lib/iomgr/tcp_client.h", "src/core/lib/iomgr/tcp_posix.h", "src/core/lib/iomgr/tcp_server.h", + "src/core/lib/iomgr/tcp_uv.h", "src/core/lib/iomgr/tcp_windows.h", "src/core/lib/iomgr/time_averaged_stats.h", "src/core/lib/iomgr/timer.h", + "src/core/lib/iomgr/timer_generic.h", "src/core/lib/iomgr/timer_heap.h", + "src/core/lib/iomgr/timer_uv.h", "src/core/lib/iomgr/udp_server.h", "src/core/lib/iomgr/unix_sockets_posix.h", "src/core/lib/iomgr/wakeup_fd_pipe.h", "src/core/lib/iomgr/wakeup_fd_posix.h", "src/core/lib/iomgr/workqueue.h", "src/core/lib/iomgr/workqueue_posix.h", + "src/core/lib/iomgr/workqueue_uv.h", "src/core/lib/iomgr/workqueue_windows.h", "src/core/lib/json/json.h", "src/core/lib/json/json_common.h", @@ -345,29 +350,38 @@ cc_library( "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/load_file.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/sockaddr_utils.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_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.c", + "src/core/lib/iomgr/timer_generic.c", "src/core/lib/iomgr/timer_heap.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", @@ -376,6 +390,7 @@ cc_library( "src/core/lib/iomgr/wakeup_fd_pipe.c", "src/core/lib/iomgr/wakeup_fd_posix.c", "src/core/lib/iomgr/workqueue_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", @@ -591,6 +606,7 @@ cc_library( "src/core/lib/iomgr/pollset.h", "src/core/lib/iomgr/pollset_set.h", "src/core/lib/iomgr/pollset_set_windows.h", + "src/core/lib/iomgr/pollset_uv.h", "src/core/lib/iomgr/pollset_windows.h", "src/core/lib/iomgr/port.h", "src/core/lib/iomgr/resolve_address.h", @@ -604,16 +620,20 @@ cc_library( "src/core/lib/iomgr/tcp_client.h", "src/core/lib/iomgr/tcp_posix.h", "src/core/lib/iomgr/tcp_server.h", + "src/core/lib/iomgr/tcp_uv.h", "src/core/lib/iomgr/tcp_windows.h", "src/core/lib/iomgr/time_averaged_stats.h", "src/core/lib/iomgr/timer.h", + "src/core/lib/iomgr/timer_generic.h", "src/core/lib/iomgr/timer_heap.h", + "src/core/lib/iomgr/timer_uv.h", "src/core/lib/iomgr/udp_server.h", "src/core/lib/iomgr/unix_sockets_posix.h", "src/core/lib/iomgr/wakeup_fd_pipe.h", "src/core/lib/iomgr/wakeup_fd_posix.h", "src/core/lib/iomgr/workqueue.h", "src/core/lib/iomgr/workqueue_posix.h", + "src/core/lib/iomgr/workqueue_uv.h", "src/core/lib/iomgr/workqueue_windows.h", "src/core/lib/json/json.h", "src/core/lib/json/json_common.h", @@ -729,29 +749,38 @@ cc_library( "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/load_file.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/sockaddr_utils.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_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.c", + "src/core/lib/iomgr/timer_generic.c", "src/core/lib/iomgr/timer_heap.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", @@ -760,6 +789,7 @@ cc_library( "src/core/lib/iomgr/wakeup_fd_pipe.c", "src/core/lib/iomgr/wakeup_fd_posix.c", "src/core/lib/iomgr/workqueue_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", @@ -947,6 +977,7 @@ cc_library( "src/core/lib/iomgr/pollset.h", "src/core/lib/iomgr/pollset_set.h", "src/core/lib/iomgr/pollset_set_windows.h", + "src/core/lib/iomgr/pollset_uv.h", "src/core/lib/iomgr/pollset_windows.h", "src/core/lib/iomgr/port.h", "src/core/lib/iomgr/resolve_address.h", @@ -960,16 +991,20 @@ cc_library( "src/core/lib/iomgr/tcp_client.h", "src/core/lib/iomgr/tcp_posix.h", "src/core/lib/iomgr/tcp_server.h", + "src/core/lib/iomgr/tcp_uv.h", "src/core/lib/iomgr/tcp_windows.h", "src/core/lib/iomgr/time_averaged_stats.h", "src/core/lib/iomgr/timer.h", + "src/core/lib/iomgr/timer_generic.h", "src/core/lib/iomgr/timer_heap.h", + "src/core/lib/iomgr/timer_uv.h", "src/core/lib/iomgr/udp_server.h", "src/core/lib/iomgr/unix_sockets_posix.h", "src/core/lib/iomgr/wakeup_fd_pipe.h", "src/core/lib/iomgr/wakeup_fd_posix.h", "src/core/lib/iomgr/workqueue.h", "src/core/lib/iomgr/workqueue_posix.h", + "src/core/lib/iomgr/workqueue_uv.h", "src/core/lib/iomgr/workqueue_windows.h", "src/core/lib/json/json.h", "src/core/lib/json/json_common.h", @@ -1075,29 +1110,38 @@ cc_library( "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/load_file.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/sockaddr_utils.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_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.c", + "src/core/lib/iomgr/timer_generic.c", "src/core/lib/iomgr/timer_heap.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", @@ -1106,6 +1150,7 @@ cc_library( "src/core/lib/iomgr/wakeup_fd_pipe.c", "src/core/lib/iomgr/wakeup_fd_posix.c", "src/core/lib/iomgr/workqueue_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", @@ -1843,29 +1888,38 @@ objc_library( "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/load_file.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/sockaddr_utils.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_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.c", + "src/core/lib/iomgr/timer_generic.c", "src/core/lib/iomgr/timer_heap.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", @@ -1874,6 +1928,7 @@ objc_library( "src/core/lib/iomgr/wakeup_fd_pipe.c", "src/core/lib/iomgr/wakeup_fd_posix.c", "src/core/lib/iomgr/workqueue_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", @@ -2068,6 +2123,7 @@ objc_library( "src/core/lib/iomgr/pollset.h", "src/core/lib/iomgr/pollset_set.h", "src/core/lib/iomgr/pollset_set_windows.h", + "src/core/lib/iomgr/pollset_uv.h", "src/core/lib/iomgr/pollset_windows.h", "src/core/lib/iomgr/port.h", "src/core/lib/iomgr/resolve_address.h", @@ -2081,16 +2137,20 @@ objc_library( "src/core/lib/iomgr/tcp_client.h", "src/core/lib/iomgr/tcp_posix.h", "src/core/lib/iomgr/tcp_server.h", + "src/core/lib/iomgr/tcp_uv.h", "src/core/lib/iomgr/tcp_windows.h", "src/core/lib/iomgr/time_averaged_stats.h", "src/core/lib/iomgr/timer.h", + "src/core/lib/iomgr/timer_generic.h", "src/core/lib/iomgr/timer_heap.h", + "src/core/lib/iomgr/timer_uv.h", "src/core/lib/iomgr/udp_server.h", "src/core/lib/iomgr/unix_sockets_posix.h", "src/core/lib/iomgr/wakeup_fd_pipe.h", "src/core/lib/iomgr/wakeup_fd_posix.h", "src/core/lib/iomgr/workqueue.h", "src/core/lib/iomgr/workqueue_posix.h", + "src/core/lib/iomgr/workqueue_uv.h", "src/core/lib/iomgr/workqueue_windows.h", "src/core/lib/json/json.h", "src/core/lib/json/json_common.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ba714465e..722051e749 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -319,29 +319,38 @@ add_library(grpc 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/load_file.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/sockaddr_utils.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_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.c + src/core/lib/iomgr/timer_generic.c src/core/lib/iomgr/timer_heap.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 @@ -350,6 +359,7 @@ add_library(grpc src/core/lib/iomgr/wakeup_fd_pipe.c src/core/lib/iomgr/wakeup_fd_posix.c src/core/lib/iomgr/workqueue_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 @@ -577,29 +587,38 @@ add_library(grpc_cronet 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/load_file.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/sockaddr_utils.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_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.c + src/core/lib/iomgr/timer_generic.c src/core/lib/iomgr/timer_heap.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 @@ -608,6 +627,7 @@ add_library(grpc_cronet src/core/lib/iomgr/wakeup_fd_pipe.c src/core/lib/iomgr/wakeup_fd_posix.c src/core/lib/iomgr/workqueue_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 @@ -809,29 +829,38 @@ add_library(grpc_unsecure 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/load_file.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/sockaddr_utils.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_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.c + src/core/lib/iomgr/timer_generic.c src/core/lib/iomgr/timer_heap.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 @@ -840,6 +869,7 @@ add_library(grpc_unsecure src/core/lib/iomgr/wakeup_fd_pipe.c src/core/lib/iomgr/wakeup_fd_posix.c src/core/lib/iomgr/workqueue_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 diff --git a/Makefile b/Makefile index c87c35962a..4abce94e51 100644 --- a/Makefile +++ b/Makefile @@ -2535,29 +2535,38 @@ LIBGRPC_SRC = \ 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/load_file.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/sockaddr_utils.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_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.c \ + src/core/lib/iomgr/timer_generic.c \ src/core/lib/iomgr/timer_heap.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 \ @@ -2566,6 +2575,7 @@ LIBGRPC_SRC = \ src/core/lib/iomgr/wakeup_fd_pipe.c \ src/core/lib/iomgr/wakeup_fd_posix.c \ src/core/lib/iomgr/workqueue_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 \ @@ -2811,29 +2821,38 @@ LIBGRPC_CRONET_SRC = \ 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/load_file.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/sockaddr_utils.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_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.c \ + src/core/lib/iomgr/timer_generic.c \ src/core/lib/iomgr/timer_heap.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 \ @@ -2842,6 +2861,7 @@ LIBGRPC_CRONET_SRC = \ src/core/lib/iomgr/wakeup_fd_pipe.c \ src/core/lib/iomgr/wakeup_fd_posix.c \ src/core/lib/iomgr/workqueue_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 \ @@ -3077,29 +3097,38 @@ LIBGRPC_TEST_UTIL_SRC = \ 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/load_file.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/sockaddr_utils.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_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.c \ + src/core/lib/iomgr/timer_generic.c \ src/core/lib/iomgr/timer_heap.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 \ @@ -3108,6 +3137,7 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/lib/iomgr/wakeup_fd_pipe.c \ src/core/lib/iomgr/wakeup_fd_posix.c \ src/core/lib/iomgr/workqueue_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 \ @@ -3270,29 +3300,38 @@ LIBGRPC_UNSECURE_SRC = \ 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/load_file.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/sockaddr_utils.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_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.c \ + src/core/lib/iomgr/timer_generic.c \ src/core/lib/iomgr/timer_heap.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 \ @@ -3301,6 +3340,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/iomgr/wakeup_fd_pipe.c \ src/core/lib/iomgr/wakeup_fd_posix.c \ src/core/lib/iomgr/workqueue_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 \ diff --git a/binding.gyp b/binding.gyp index b03da7cb58..ea585464c3 100644 --- a/binding.gyp +++ b/binding.gyp @@ -42,6 +42,9 @@ '.', 'include' ], + 'defines': [ + 'GRPC_UV' + ], 'conditions': [ ['OS == "win"', { "include_dirs": [ @@ -591,29 +594,38 @@ '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/load_file.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/sockaddr_utils.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_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.c', + 'src/core/lib/iomgr/timer_generic.c', 'src/core/lib/iomgr/timer_heap.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', @@ -622,6 +634,7 @@ 'src/core/lib/iomgr/wakeup_fd_pipe.c', 'src/core/lib/iomgr/wakeup_fd_posix.c', 'src/core/lib/iomgr/workqueue_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', @@ -806,6 +819,7 @@ "src/node/ext/call_credentials.cc", "src/node/ext/channel.cc", "src/node/ext/channel_credentials.cc", + "src/node/ext/completion_queue.cc", "src/node/ext/completion_queue_async_worker.cc", "src/node/ext/node_grpc.cc", "src/node/ext/server.cc", diff --git a/build.yaml b/build.yaml index e1e3a8c0bb..562dff1565 100644 --- a/build.yaml +++ b/build.yaml @@ -189,6 +189,7 @@ filegroups: - src/core/lib/iomgr/pollset.h - src/core/lib/iomgr/pollset_set.h - src/core/lib/iomgr/pollset_set_windows.h + - src/core/lib/iomgr/pollset_uv.h - src/core/lib/iomgr/pollset_windows.h - src/core/lib/iomgr/port.h - src/core/lib/iomgr/resolve_address.h @@ -202,16 +203,20 @@ filegroups: - src/core/lib/iomgr/tcp_client.h - src/core/lib/iomgr/tcp_posix.h - src/core/lib/iomgr/tcp_server.h + - src/core/lib/iomgr/tcp_uv.h - src/core/lib/iomgr/tcp_windows.h - src/core/lib/iomgr/time_averaged_stats.h - src/core/lib/iomgr/timer.h + - src/core/lib/iomgr/timer_generic.h - src/core/lib/iomgr/timer_heap.h + - src/core/lib/iomgr/timer_uv.h - src/core/lib/iomgr/udp_server.h - src/core/lib/iomgr/unix_sockets_posix.h - src/core/lib/iomgr/wakeup_fd_pipe.h - src/core/lib/iomgr/wakeup_fd_posix.h - src/core/lib/iomgr/workqueue.h - src/core/lib/iomgr/workqueue_posix.h + - src/core/lib/iomgr/workqueue_uv.h - src/core/lib/iomgr/workqueue_windows.h - src/core/lib/json/json.h - src/core/lib/json/json_common.h @@ -265,29 +270,38 @@ filegroups: - 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/load_file.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/sockaddr_utils.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_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.c + - src/core/lib/iomgr/timer_generic.c - src/core/lib/iomgr/timer_heap.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 @@ -296,6 +310,7 @@ filegroups: - src/core/lib/iomgr/wakeup_fd_pipe.c - src/core/lib/iomgr/wakeup_fd_posix.c - src/core/lib/iomgr/workqueue_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 @@ -3421,6 +3436,7 @@ node_modules: - src/node/ext/call_credentials.h - src/node/ext/channel.h - src/node/ext/channel_credentials.h + - src/node/ext/completion_queue.h - src/node/ext/completion_queue_async_worker.h - src/node/ext/server.h - src/node/ext/server_credentials.h @@ -3440,6 +3456,7 @@ node_modules: - src/node/ext/call_credentials.cc - src/node/ext/channel.cc - src/node/ext/channel_credentials.cc + - src/node/ext/completion_queue.cc - src/node/ext/completion_queue_async_worker.cc - src/node/ext/node_grpc.cc - src/node/ext/server.cc diff --git a/config.m4 b/config.m4 index 7a06923e59..4df7b1a8dc 100644 --- a/config.m4 +++ b/config.m4 @@ -110,29 +110,38 @@ if test "$PHP_GRPC" != "no"; then 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/load_file.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/sockaddr_utils.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_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.c \ + src/core/lib/iomgr/timer_generic.c \ src/core/lib/iomgr/timer_heap.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 \ @@ -141,6 +150,7 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/iomgr/wakeup_fd_pipe.c \ src/core/lib/iomgr/wakeup_fd_posix.c \ src/core/lib/iomgr/workqueue_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 \ diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index b7a5e72a2a..f11fc5c6c5 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -287,6 +287,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/pollset.h', 'src/core/lib/iomgr/pollset_set.h', 'src/core/lib/iomgr/pollset_set_windows.h', + 'src/core/lib/iomgr/pollset_uv.h', 'src/core/lib/iomgr/pollset_windows.h', 'src/core/lib/iomgr/port.h', 'src/core/lib/iomgr/resolve_address.h', @@ -300,16 +301,20 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/tcp_client.h', 'src/core/lib/iomgr/tcp_posix.h', 'src/core/lib/iomgr/tcp_server.h', + 'src/core/lib/iomgr/tcp_uv.h', 'src/core/lib/iomgr/tcp_windows.h', 'src/core/lib/iomgr/time_averaged_stats.h', 'src/core/lib/iomgr/timer.h', + 'src/core/lib/iomgr/timer_generic.h', 'src/core/lib/iomgr/timer_heap.h', + 'src/core/lib/iomgr/timer_uv.h', 'src/core/lib/iomgr/udp_server.h', 'src/core/lib/iomgr/unix_sockets_posix.h', 'src/core/lib/iomgr/wakeup_fd_pipe.h', 'src/core/lib/iomgr/wakeup_fd_posix.h', 'src/core/lib/iomgr/workqueue.h', 'src/core/lib/iomgr/workqueue_posix.h', + 'src/core/lib/iomgr/workqueue_uv.h', 'src/core/lib/iomgr/workqueue_windows.h', 'src/core/lib/json/json.h', 'src/core/lib/json/json_common.h', @@ -442,29 +447,38 @@ Pod::Spec.new do |s| '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/load_file.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/sockaddr_utils.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_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.c', + 'src/core/lib/iomgr/timer_generic.c', 'src/core/lib/iomgr/timer_heap.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', @@ -473,6 +487,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/wakeup_fd_pipe.c', 'src/core/lib/iomgr/wakeup_fd_posix.c', 'src/core/lib/iomgr/workqueue_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', @@ -650,6 +665,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/pollset.h', 'src/core/lib/iomgr/pollset_set.h', 'src/core/lib/iomgr/pollset_set_windows.h', + 'src/core/lib/iomgr/pollset_uv.h', 'src/core/lib/iomgr/pollset_windows.h', 'src/core/lib/iomgr/port.h', 'src/core/lib/iomgr/resolve_address.h', @@ -663,16 +679,20 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/tcp_client.h', 'src/core/lib/iomgr/tcp_posix.h', 'src/core/lib/iomgr/tcp_server.h', + 'src/core/lib/iomgr/tcp_uv.h', 'src/core/lib/iomgr/tcp_windows.h', 'src/core/lib/iomgr/time_averaged_stats.h', 'src/core/lib/iomgr/timer.h', + 'src/core/lib/iomgr/timer_generic.h', 'src/core/lib/iomgr/timer_heap.h', + 'src/core/lib/iomgr/timer_uv.h', 'src/core/lib/iomgr/udp_server.h', 'src/core/lib/iomgr/unix_sockets_posix.h', 'src/core/lib/iomgr/wakeup_fd_pipe.h', 'src/core/lib/iomgr/wakeup_fd_posix.h', 'src/core/lib/iomgr/workqueue.h', 'src/core/lib/iomgr/workqueue_posix.h', + 'src/core/lib/iomgr/workqueue_uv.h', 'src/core/lib/iomgr/workqueue_windows.h', 'src/core/lib/json/json.h', 'src/core/lib/json/json_common.h', diff --git a/grpc.gemspec b/grpc.gemspec index 60701d1288..5ab3f91301 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -206,6 +206,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/pollset.h ) s.files += %w( src/core/lib/iomgr/pollset_set.h ) s.files += %w( src/core/lib/iomgr/pollset_set_windows.h ) + s.files += %w( src/core/lib/iomgr/pollset_uv.h ) s.files += %w( src/core/lib/iomgr/pollset_windows.h ) s.files += %w( src/core/lib/iomgr/port.h ) s.files += %w( src/core/lib/iomgr/resolve_address.h ) @@ -219,16 +220,20 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/tcp_client.h ) s.files += %w( src/core/lib/iomgr/tcp_posix.h ) s.files += %w( src/core/lib/iomgr/tcp_server.h ) + s.files += %w( src/core/lib/iomgr/tcp_uv.h ) s.files += %w( src/core/lib/iomgr/tcp_windows.h ) s.files += %w( src/core/lib/iomgr/time_averaged_stats.h ) s.files += %w( src/core/lib/iomgr/timer.h ) + s.files += %w( src/core/lib/iomgr/timer_generic.h ) s.files += %w( src/core/lib/iomgr/timer_heap.h ) + s.files += %w( src/core/lib/iomgr/timer_uv.h ) s.files += %w( src/core/lib/iomgr/udp_server.h ) s.files += %w( src/core/lib/iomgr/unix_sockets_posix.h ) s.files += %w( src/core/lib/iomgr/wakeup_fd_pipe.h ) s.files += %w( src/core/lib/iomgr/wakeup_fd_posix.h ) s.files += %w( src/core/lib/iomgr/workqueue.h ) s.files += %w( src/core/lib/iomgr/workqueue_posix.h ) + s.files += %w( src/core/lib/iomgr/workqueue_uv.h ) s.files += %w( src/core/lib/iomgr/workqueue_windows.h ) s.files += %w( src/core/lib/json/json.h ) s.files += %w( src/core/lib/json/json_common.h ) @@ -361,29 +366,38 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/iocp_windows.c ) s.files += %w( src/core/lib/iomgr/iomgr.c ) s.files += %w( src/core/lib/iomgr/iomgr_posix.c ) + s.files += %w( src/core/lib/iomgr/iomgr_uv.c ) s.files += %w( src/core/lib/iomgr/iomgr_windows.c ) s.files += %w( src/core/lib/iomgr/load_file.c ) s.files += %w( src/core/lib/iomgr/network_status_tracker.c ) s.files += %w( src/core/lib/iomgr/polling_entity.c ) + s.files += %w( src/core/lib/iomgr/pollset_set_uv.c ) s.files += %w( src/core/lib/iomgr/pollset_set_windows.c ) + s.files += %w( src/core/lib/iomgr/pollset_uv.c ) s.files += %w( src/core/lib/iomgr/pollset_windows.c ) s.files += %w( src/core/lib/iomgr/resolve_address_posix.c ) + s.files += %w( src/core/lib/iomgr/resolve_address_uv.c ) s.files += %w( src/core/lib/iomgr/resolve_address_windows.c ) s.files += %w( src/core/lib/iomgr/sockaddr_utils.c ) s.files += %w( src/core/lib/iomgr/socket_utils_common_posix.c ) s.files += %w( src/core/lib/iomgr/socket_utils_linux.c ) s.files += %w( src/core/lib/iomgr/socket_utils_posix.c ) + s.files += %w( src/core/lib/iomgr/socket_utils_uv.c ) s.files += %w( src/core/lib/iomgr/socket_utils_windows.c ) s.files += %w( src/core/lib/iomgr/socket_windows.c ) s.files += %w( src/core/lib/iomgr/tcp_client_posix.c ) + s.files += %w( src/core/lib/iomgr/tcp_client_uv.c ) s.files += %w( src/core/lib/iomgr/tcp_client_windows.c ) s.files += %w( src/core/lib/iomgr/tcp_posix.c ) s.files += %w( src/core/lib/iomgr/tcp_server_posix.c ) + s.files += %w( src/core/lib/iomgr/tcp_server_uv.c ) s.files += %w( src/core/lib/iomgr/tcp_server_windows.c ) + s.files += %w( src/core/lib/iomgr/tcp_uv.c ) s.files += %w( src/core/lib/iomgr/tcp_windows.c ) s.files += %w( src/core/lib/iomgr/time_averaged_stats.c ) - s.files += %w( src/core/lib/iomgr/timer.c ) + s.files += %w( src/core/lib/iomgr/timer_generic.c ) s.files += %w( src/core/lib/iomgr/timer_heap.c ) + s.files += %w( src/core/lib/iomgr/timer_uv.c ) s.files += %w( src/core/lib/iomgr/udp_server.c ) s.files += %w( src/core/lib/iomgr/unix_sockets_posix.c ) s.files += %w( src/core/lib/iomgr/unix_sockets_posix_noop.c ) @@ -392,6 +406,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/wakeup_fd_pipe.c ) s.files += %w( src/core/lib/iomgr/wakeup_fd_posix.c ) s.files += %w( src/core/lib/iomgr/workqueue_posix.c ) + s.files += %w( src/core/lib/iomgr/workqueue_uv.c ) s.files += %w( src/core/lib/iomgr/workqueue_windows.c ) s.files += %w( src/core/lib/json/json.c ) s.files += %w( src/core/lib/json/json_reader.c ) diff --git a/package.xml b/package.xml index d49c124314..9493d01ba2 100644 --- a/package.xml +++ b/package.xml @@ -214,6 +214,7 @@ + @@ -227,16 +228,20 @@ + + + + @@ -369,29 +374,38 @@ + + + + + + + + - + + @@ -400,6 +414,7 @@ + diff --git a/src/core/ext/client_config/client_config_plugin.c b/src/core/ext/client_config/client_config_plugin.c index 5e31613420..e065d06be9 100644 --- a/src/core/ext/client_config/client_config_plugin.c +++ b/src/core/ext/client_config/client_config_plugin.c @@ -31,6 +31,11 @@ * */ +/* We currently need this at the top of the file if we import some iomgr + headers because if we are building with libuv, those headers will include + uv.h, which needs to be included before other system headers */ +#include "src/core/lib/iomgr/port.h" + #include #include #include diff --git a/src/core/ext/client_config/connector.h b/src/core/ext/client_config/connector.h index ea9d23706e..5cf8f14721 100644 --- a/src/core/ext/client_config/connector.h +++ b/src/core/ext/client_config/connector.h @@ -34,6 +34,11 @@ #ifndef GRPC_CORE_EXT_CLIENT_CONFIG_CONNECTOR_H #define GRPC_CORE_EXT_CLIENT_CONFIG_CONNECTOR_H +/* We currently need this at the top of the file if we import some iomgr + headers because if we are building with libuv, those headers will include + uv.h, which needs to be included before other system headers */ +#include "src/core/lib/iomgr/port.h" + #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/transport/transport.h" diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index af913d8a9d..a390daec01 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -96,6 +96,11 @@ * - Implement LB service forwarding (point 2c. in the doc's diagram). */ +/* We currently need this at the top of the file if we import some iomgr + headers because if we are building with libuv, those headers will include + uv.h, which needs to be included before other system headers */ +#include "src/core/lib/iomgr/port.h" + #include #include diff --git a/src/core/ext/lb_policy/pick_first/pick_first.c b/src/core/ext/lb_policy/pick_first/pick_first.c index 9decf70692..61b637fe7d 100644 --- a/src/core/ext/lb_policy/pick_first/pick_first.c +++ b/src/core/ext/lb_policy/pick_first/pick_first.c @@ -31,6 +31,11 @@ * */ +/* We currently need this at the top of the file if we import some iomgr + headers because if we are building with libuv, those headers will include + uv.h, which needs to be included before other system headers */ +#include "src/core/lib/iomgr/port.h" + #include #include diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c index 7bcf608ab9..da53143948 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -59,6 +59,11 @@ * the subchannel by the caller. */ +/* We currently need this at the top of the file if we import some iomgr + headers because if we are building with libuv, those headers will include + uv.h, which needs to be included before other system headers */ +#include "src/core/lib/iomgr/port.h" + #include #include diff --git a/src/core/ext/resolver/dns/native/dns_resolver.c b/src/core/ext/resolver/dns/native/dns_resolver.c index 31ac968670..6a699804fe 100644 --- a/src/core/ext/resolver/dns/native/dns_resolver.c +++ b/src/core/ext/resolver/dns/native/dns_resolver.c @@ -31,6 +31,11 @@ * */ +/* We currently need this at the top of the file if we import some iomgr + headers because if we are building with libuv, those headers will include + uv.h, which needs to be included before other system headers */ +#include "src/core/lib/iomgr/port.h" + #include #include diff --git a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c index d613c5393e..46d185a984 100644 --- a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c +++ b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c @@ -31,6 +31,11 @@ * */ +/* We currently need this at the top of the file if we import some iomgr + headers because if we are building with libuv, those headers will include + uv.h, which needs to be included before other system headers */ +#include "src/core/lib/iomgr/port.h" + #include #include #include diff --git a/src/core/lib/http/httpcli.h b/src/core/lib/http/httpcli.h index 662e176f4c..eba6ecb9ab 100644 --- a/src/core/lib/http/httpcli.h +++ b/src/core/lib/http/httpcli.h @@ -34,6 +34,11 @@ #ifndef GRPC_CORE_LIB_HTTP_HTTPCLI_H #define GRPC_CORE_LIB_HTTP_HTTPCLI_H +/* We currently need this at the top of the file if we import some iomgr + headers because if we are building with libuv, those headers will include + uv.h, which needs to be included before other system headers */ +#include "src/core/lib/iomgr/port.h" + #include #include diff --git a/src/core/lib/iomgr/iomgr.h b/src/core/lib/iomgr/iomgr.h index 6c82de78ac..c1cfaf302e 100644 --- a/src/core/lib/iomgr/iomgr.h +++ b/src/core/lib/iomgr/iomgr.h @@ -34,6 +34,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_IOMGR_H #define GRPC_CORE_LIB_IOMGR_IOMGR_H +#include "src/core/lib/iomgr/port.h" + /** Initializes the iomgr. */ void grpc_iomgr_init(void); diff --git a/src/core/lib/iomgr/iomgr_uv.c b/src/core/lib/iomgr/iomgr_uv.c new file mode 100644 index 0000000000..4c8acfbd96 --- /dev/null +++ b/src/core/lib/iomgr/iomgr_uv.c @@ -0,0 +1,51 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include "src/core/lib/iomgr/port.h" + +#ifdef GRPC_UV + +#include "src/core/lib/debug/trace.h" +#include "src/core/lib/iomgr/pollset_uv.h" +#include "src/core/lib/iomgr/tcp_uv.h" + +void grpc_iomgr_platform_init(void) { + grpc_pollset_global_init(); + grpc_register_tracer("tcp", &grpc_tcp_trace); +} +void grpc_iomgr_platform_flush(void) {} +void grpc_iomgr_platform_shutdown(void) { + grpc_pollset_global_shutdown(); +} + +#endif /* GRPC_UV */ diff --git a/src/core/lib/iomgr/pollset_set_uv.c b/src/core/lib/iomgr/pollset_set_uv.c new file mode 100644 index 0000000000..e5ef8b29e0 --- /dev/null +++ b/src/core/lib/iomgr/pollset_set_uv.c @@ -0,0 +1,62 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include "src/core/lib/iomgr/port.h" + +#ifdef GRPC_UV + +#include "src/core/lib/iomgr/pollset_set.h" + +grpc_pollset_set* grpc_pollset_set_create(void) { + return (grpc_pollset_set*)((intptr_t)0xdeafbeef); +} + +void grpc_pollset_set_destroy(grpc_pollset_set* pollset_set) {} + +void grpc_pollset_set_add_pollset(grpc_exec_ctx* exec_ctx, + grpc_pollset_set* pollset_set, + grpc_pollset* pollset) {} + +void grpc_pollset_set_del_pollset(grpc_exec_ctx* exec_ctx, + grpc_pollset_set* pollset_set, + grpc_pollset* pollset) {} + +void grpc_pollset_set_add_pollset_set(grpc_exec_ctx* exec_ctx, + grpc_pollset_set* bag, + grpc_pollset_set* item) {} + +void grpc_pollset_set_del_pollset_set(grpc_exec_ctx* exec_ctx, + grpc_pollset_set* bag, + grpc_pollset_set* item) {} + +#endif /* GRPC_UV */ diff --git a/src/core/lib/iomgr/pollset_set_windows.c b/src/core/lib/iomgr/pollset_set_windows.c index 645650db9b..293893f18e 100644 --- a/src/core/lib/iomgr/pollset_set_windows.c +++ b/src/core/lib/iomgr/pollset_set_windows.c @@ -31,8 +31,8 @@ * */ -#include #include "src/core/lib/iomgr/port.h" +#include #ifdef GRPC_WINSOCK_SOCKET diff --git a/src/core/lib/iomgr/pollset_uv.c b/src/core/lib/iomgr/pollset_uv.c new file mode 100644 index 0000000000..2c41a58c30 --- /dev/null +++ b/src/core/lib/iomgr/pollset_uv.c @@ -0,0 +1,84 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include "src/core/lib/iomgr/port.h" + +#ifdef GRPC_UV + +#include + +#include "src/core/lib/iomgr/pollset.h" +#include "src/core/lib/iomgr/pollset_uv.h" + +gpr_mu grpc_polling_mu; + +size_t grpc_pollset_size() { + return 1; +} + +void grpc_pollset_global_init(void) { + gpr_mu_init(&grpc_polling_mu); +} + +void grpc_pollset_global_shutdown(void) { gpr_mu_destroy(&grpc_polling_mu); } + +void grpc_pollset_init(grpc_pollset *pollset, gpr_mu **mu) { + *mu = &grpc_polling_mu; +} + +void grpc_pollset_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, + grpc_closure *closure) { + grpc_exec_ctx_sched(exec_ctx, closure, GRPC_ERROR_NONE, NULL); +} + +void grpc_pollset_destroy(grpc_pollset *pollset) {} + +void grpc_pollset_reset(grpc_pollset *pollset) {} + +grpc_error *grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, + grpc_pollset_worker **worker_hdl, + gpr_timespec now, gpr_timespec deadline) { + if (!grpc_closure_list_empty(exec_ctx->closure_list)) { + gpr_mu_unlock(&grpc_polling_mu); + grpc_exec_ctx_flush(exec_ctx); + gpr_mu_lock(&grpc_polling_mu); + } + return GRPC_ERROR_NONE; +} + +grpc_error *grpc_pollset_kick(grpc_pollset *pollset, + grpc_pollset_worker *specific_worker) { + return GRPC_ERROR_NONE; +} + +#endif /* GRPC_UV */ diff --git a/src/core/lib/iomgr/pollset_uv.h b/src/core/lib/iomgr/pollset_uv.h new file mode 100644 index 0000000000..5cbc83e991 --- /dev/null +++ b/src/core/lib/iomgr/pollset_uv.h @@ -0,0 +1,35 @@ +/* + * + * Copyright 2016, 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. + * + */ + +void grpc_pollset_global_init(void); +void grpc_pollset_global_shutdown(void); diff --git a/src/core/lib/iomgr/port.h b/src/core/lib/iomgr/port.h index e6f01802ed..60bb16a423 100644 --- a/src/core/lib/iomgr/port.h +++ b/src/core/lib/iomgr/port.h @@ -36,7 +36,9 @@ #ifndef GRPC_CORE_LIB_IOMGR_PORT_H #define GRPC_CORE_LIB_IOMGR_PORT_H -#if defined(GPR_MANYLINUX1) +#if defined(GRPC_UV) +#include +#elif defined(GPR_MANYLINUX1) #define GRPC_HAVE_IPV6_RECVPKTINFO 1 #define GRPC_HAVE_IP_PKTINFO 1 #define GRPC_HAVE_MSG_NOSIGNAL 1 @@ -46,7 +48,9 @@ #define GRPC_POSIX_SOCKETADDR 1 #define GRPC_POSIX_SOCKETUTILS 1 #define GRPC_POSIX_WAKEUP_FD 1 +#define GRPC_TIMER_USE_GENERIC 1 #elif defined(GPR_WINDOWS) +#define GRPC_TIMER_USE_GENERIC 1 #define GRPC_WINSOCK_SOCKET 1 #define GRPC_WINDOWS_SOCKETUTILS 1 #elif defined(GPR_ANDROID) @@ -59,6 +63,7 @@ #define GRPC_POSIX_SOCKETADDR 1 #define GRPC_POSIX_SOCKETUTILS 1 #define GRPC_POSIX_WAKEUP_FD 1 +#define GRPC_TIMER_USE_GENERIC 1 #elif defined(GPR_LINUX) #define GRPC_HAVE_IPV6_RECVPKTINFO 1 #define GRPC_HAVE_IP_PKTINFO 1 @@ -68,6 +73,7 @@ #define GRPC_POSIX_SOCKET 1 #define GRPC_POSIX_SOCKETADDR 1 #define GRPC_POSIX_WAKEUP_FD 1 +#define GRPC_TIMER_USE_GENERIC 1 #ifdef __GLIBC_PREREQ #if __GLIBC_PREREQ(2, 9) #define GRPC_LINUX_EPOLL 1 @@ -93,6 +99,7 @@ #define GRPC_POSIX_SOCKETADDR 1 #define GRPC_POSIX_SOCKETUTILS 1 #define GRPC_POSIX_WAKEUP_FD 1 +#define GRPC_TIMER_USE_GENERIC 1 #elif defined(GPR_FREEBSD) #define GRPC_HAVE_IPV6_RECVPKTINFO 1 #define GRPC_HAVE_IP_PKTINFO 1 @@ -103,18 +110,20 @@ #define GRPC_POSIX_SOCKETADDR 1 #define GRPC_POSIX_SOCKETUTILS 1 #define GRPC_POSIX_WAKEUP_FD 1 +#define GRPC_TIMER_USE_GENERIC 1 #elif defined(GPR_NACL) #define GRPC_POSIX_NO_SPECIAL_WAKEUP_FD 1 #define GRPC_POSIX_SOCKET 1 #define GRPC_POSIX_SOCKETADDR 1 #define GRPC_POSIX_SOCKETUTILS 1 #define GRPC_POSIX_WAKEUP_FD 1 +#define GRPC_TIMER_USE_GENERIC 1 #elif !defined(GPR_NO_AUTODETECT_PLATFORM) #error "Platform not recognized" #endif #if defined(GRPC_POSIX_SOCKET) + defined(GRPC_WINSOCK_SOCKET) + \ - defined(GRPC_CUSTOM_SOCKET) != \ + defined(GRPC_CUSTOM_SOCKET) + defined(GRPC_UV) != \ 1 #error Must define exactly one of GRPC_POSIX_SOCKET, GRPC_WINSOCK_SOCKET, GPR_CUSTOM_SOCKET #endif diff --git a/src/core/lib/iomgr/resolve_address_uv.c b/src/core/lib/iomgr/resolve_address_uv.c new file mode 100644 index 0000000000..550047b4d2 --- /dev/null +++ b/src/core/lib/iomgr/resolve_address_uv.c @@ -0,0 +1,234 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include "src/core/lib/iomgr/port.h" +#ifdef GRPC_UV + +#include + +#include +#include +#include +#include + +#include "src/core/lib/iomgr/closure.h" +#include "src/core/lib/iomgr/error.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/iomgr/resolve_address.h" +#include "src/core/lib/iomgr/sockaddr_utils.h" + +#include + +typedef struct request { + grpc_closure *on_done; + grpc_resolved_addresses **addresses; + struct addrinfo *hints; +} request; + +static grpc_error *handle_addrinfo_result(int status, + struct addrinfo *result, + grpc_resolved_addresses **addresses) { + + struct addrinfo *resp; + size_t i; + if (status != 0) { + grpc_error *error; + *addresses = NULL; + error = GRPC_ERROR_CREATE("getaddrinfo failed"); + error = grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR, + uv_strerror(status)); + return error; + } + (*addresses) = gpr_malloc(sizeof(grpc_resolved_addresses)); + (*addresses)->naddrs = 0; + for (resp = result; resp != NULL; resp = resp->ai_next) { + (*addresses)->naddrs++; + } + (*addresses)->addrs = + gpr_malloc(sizeof(grpc_resolved_address) * (*addresses)->naddrs); + i = 0; + for (resp = result; resp != NULL; resp = resp->ai_next) { + memcpy(&(*addresses)->addrs[i].addr, resp->ai_addr, resp->ai_addrlen); + (*addresses)->addrs[i].len = resp->ai_addrlen; + i++; + } + + { + for (i = 0; i < (*addresses)->naddrs; i++) { + char *buf; + grpc_sockaddr_to_string( + &buf, (struct sockaddr *)&(*addresses)->addrs[i].addr, 0); + gpr_free(buf); + } + } + return GRPC_ERROR_NONE; +} + +static void getaddrinfo_callback(uv_getaddrinfo_t *req, int status, + struct addrinfo *res) { + request *r = (request *)req->data; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_error *error; + error = handle_addrinfo_result(status, res, r->addresses); + grpc_exec_ctx_sched(&exec_ctx, r->on_done, error, NULL); + grpc_exec_ctx_finish(&exec_ctx); + + gpr_free(r->hints); + gpr_free(r); + gpr_free(req); + uv_freeaddrinfo(res); +} + +static grpc_error *try_split_host_port(const char *name, + const char *default_port, char **host, + char **port) { + /* parse name, splitting it into host and port parts */ + grpc_error *error; + gpr_split_host_port(name, host, port); + if (host == NULL) { + char *msg; + gpr_asprintf(&msg, "unparseable host:port: '%s'", name); + error = GRPC_ERROR_CREATE(msg); + gpr_free(msg); + return error; + } + if (port == NULL) { + if (default_port == NULL) { + char *msg; + gpr_asprintf(&msg, "no port in name '%s'", name); + error = GRPC_ERROR_CREATE(msg); + gpr_free(msg); + return error; + } + *port = gpr_strdup(default_port); + } + return GRPC_ERROR_NONE; +} + +static grpc_error *blocking_resolve_address_impl( + const char *name, const char *default_port, + grpc_resolved_addresses **addresses) { + char *host; + char *port; + struct addrinfo hints; + uv_getaddrinfo_t req; + int s; + grpc_error *err; + + err = try_split_host_port(name, default_port, &host, &port); + if (err != GRPC_ERROR_NONE) { + goto done; + } + + /* Call getaddrinfo */ + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_UNSPEC; /* ipv4 or ipv6 */ + hints.ai_socktype = SOCK_STREAM; /* stream socket */ + hints.ai_flags = AI_PASSIVE; /* for wildcard IP address */ + + s = uv_getaddrinfo(uv_default_loop(), &req, NULL, host, port, &hints); + err = handle_addrinfo_result(s, req.addrinfo, addresses); + +done: + gpr_free(host); + gpr_free(port); + if (req.addrinfo) { + uv_freeaddrinfo(req.addrinfo); + } + return err; +} + + + +grpc_error *(*grpc_blocking_resolve_address)( + const char *name, const char *default_port, + grpc_resolved_addresses **addresses) = blocking_resolve_address_impl; + +void grpc_resolved_addresses_destroy(grpc_resolved_addresses *addrs) { + if (addrs != NULL) { + gpr_free(addrs->addrs); + } + gpr_free(addrs); +} + +static void resolve_address_impl(grpc_exec_ctx *exec_ctx, const char *name, + const char *default_port, + grpc_closure *on_done, + grpc_resolved_addresses **addrs) { + uv_getaddrinfo_t *req; + request *r; + struct addrinfo *hints; + char *host; + char *port; + grpc_error *err; + int s; + err = try_split_host_port(name, default_port, &host, &port); + if (err != GRPC_ERROR_NONE) { + grpc_exec_ctx_sched(exec_ctx, on_done, err, NULL); + return; + } + r = gpr_malloc(sizeof(request)); + r->on_done = on_done; + r->addresses = addrs; + req = gpr_malloc(sizeof(uv_getaddrinfo_t)); + req->data = r; + + /* Call getaddrinfo */ + hints = gpr_malloc(sizeof(struct addrinfo)); + memset(hints, 0, sizeof(struct addrinfo)); + hints->ai_family = AF_UNSPEC; /* ipv4 or ipv6 */ + hints->ai_socktype = SOCK_STREAM; /* stream socket */ + hints->ai_flags = AI_PASSIVE; /* for wildcard IP address */ + r->hints = hints; + + s = uv_getaddrinfo(uv_default_loop(), req, getaddrinfo_callback, host, port, + hints); + + if (s != 0) { + *addrs = NULL; + err = GRPC_ERROR_CREATE("getaddrinfo failed"); + err = grpc_error_set_str(err, GRPC_ERROR_STR_OS_ERROR, + uv_strerror(s)); + grpc_exec_ctx_sched(exec_ctx, on_done, err, NULL); + gpr_free(r); + gpr_free(req); + gpr_free(hints); + } +} + +void (*grpc_resolve_address)(grpc_exec_ctx *exec_ctx, const char *name, + const char *default_port, grpc_closure *on_done, + grpc_resolved_addresses **addrs) = + resolve_address_impl; + +#endif /* GRPC_UV */ diff --git a/src/core/lib/iomgr/sockaddr.h b/src/core/lib/iomgr/sockaddr.h index 58cae6cc01..418488a0ea 100644 --- a/src/core/lib/iomgr/sockaddr.h +++ b/src/core/lib/iomgr/sockaddr.h @@ -36,6 +36,10 @@ #include "src/core/lib/iomgr/port.h" +#ifdef GRPC_UV +#include +#endif + #ifdef GPR_WINDOWS #include "src/core/lib/iomgr/sockaddr_windows.h" #endif diff --git a/src/core/lib/iomgr/socket_utils.h b/src/core/lib/iomgr/socket_utils.h index 6ce9a6859c..b01197ad18 100644 --- a/src/core/lib/iomgr/socket_utils.h +++ b/src/core/lib/iomgr/socket_utils.h @@ -36,10 +36,12 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GRPC_WINSOCK_SOCKET +#if defined(GRPC_WINSOCK_SOCKET) #include "src/core/lib/iomgr/sockaddr_windows.h" -#else +#elif defined(GRPC_POSIX_SOCKET) #include "src/core/lib/iomgr/sockaddr_posix.h" +#elif defined(GRPC_UV) +#include #endif /* A wrapper for inet_ntop on POSIX systems and InetNtop on Windows systems */ diff --git a/src/core/lib/iomgr/socket_utils_uv.c b/src/core/lib/iomgr/socket_utils_uv.c new file mode 100644 index 0000000000..7f61384e74 --- /dev/null +++ b/src/core/lib/iomgr/socket_utils_uv.c @@ -0,0 +1,50 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include "src/core/lib/iomgr/port.h" + +#ifdef GRPC_UV + +#include + +#include "src/core/lib/iomgr/socket_utils.h" + +#include + +const char *grpc_inet_ntop(int af, const void *src, char *dst, socklen_t size) { + GPR_ASSERT(sizeof(socklen_t) <= sizeof(size_t)); + uv_inet_ntop(af, src, dst, (size_t)size); + return dst; +} + +#endif /* GRPC_UV */ diff --git a/src/core/lib/iomgr/tcp_client_uv.c b/src/core/lib/iomgr/tcp_client_uv.c new file mode 100644 index 0000000000..7823a1d873 --- /dev/null +++ b/src/core/lib/iomgr/tcp_client_uv.c @@ -0,0 +1,142 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include "src/core/lib/iomgr/port.h" + +#ifdef GRPC_UV + +#include + +#include +#include + +#include "src/core/lib/iomgr/error.h" +#include "src/core/lib/iomgr/sockaddr_utils.h" +#include "src/core/lib/iomgr/tcp_client.h" +#include "src/core/lib/iomgr/tcp_uv.h" +#include "src/core/lib/iomgr/timer.h" + +typedef struct grpc_uv_tcp_connect { + uv_connect_t connect_req; + grpc_timer alarm; + uv_tcp_t *tcp_handle; + grpc_closure *closure; + grpc_endpoint **endpoint; + int refs; + char *addr_name; +} grpc_uv_tcp_connect; + +static void uv_tcp_connect_cleanup(grpc_uv_tcp_connect *connect) { + gpr_free(connect); +} + +static void tcp_close_callback(uv_handle_t *handle) { + gpr_log(GPR_DEBUG, "Freeing uv_tcp_t handle %p", handle); + gpr_free(handle); +} + +static void uv_tc_on_alarm(grpc_exec_ctx *exec_ctx, void *acp, grpc_error *error) { + int done; + grpc_uv_tcp_connect *connect = acp; + if (error == GRPC_ERROR_NONE) { + /* error == NONE implies that the timer ran out, and wasn't cancelled. If + it was cancelled, then the handler that cancelled it also should close + the handle, if applicable */ + gpr_log(GPR_DEBUG, "Closing uv_tcp_t handle %p", connect->tcp_handle); + uv_close((uv_handle_t *)connect->tcp_handle, tcp_close_callback); + } + done = (--connect->refs == 0); + if (done) { + uv_tcp_connect_cleanup(connect); + } +} + +static void uv_tc_on_connect(uv_connect_t *req, int status) { + grpc_uv_tcp_connect *connect = req->data; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_error *error = GRPC_ERROR_NONE; + int done; + grpc_closure *closure = connect->closure; + grpc_timer_cancel(&exec_ctx, &connect->alarm); + if (status == 0) { + *connect->endpoint = grpc_tcp_create(connect->tcp_handle, + connect->addr_name); + } else { + error = GRPC_ERROR_CREATE("Failed to connect to remote host"); + error = grpc_error_set_int(error, GRPC_ERROR_INT_ERRNO, -status); + error = grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR, + uv_strerror(status)); + if (status == UV_ECANCELED) { + error = grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR, + "Timeout occurred"); + // This should only happen if the handle is already closed + } else { + error = grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR, + uv_strerror(status)); + gpr_log(GPR_DEBUG, "Closing uv_tcp_t handle %p", connect->tcp_handle); + uv_close((uv_handle_t *)connect->tcp_handle, tcp_close_callback); + } + } + done = (--connect->refs == 0); + if (done) { + uv_tcp_connect_cleanup(connect); + } + grpc_exec_ctx_sched(&exec_ctx, closure, error, NULL); + grpc_exec_ctx_finish(&exec_ctx); +} + +void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, + grpc_closure *closure, grpc_endpoint **ep, + grpc_pollset_set *interested_parties, + const struct sockaddr *addr, + size_t addr_len, gpr_timespec deadline) { + grpc_uv_tcp_connect *connect; + (void)interested_parties; + connect = gpr_malloc(sizeof(grpc_uv_tcp_connect)); + memset(connect, 0, sizeof(grpc_uv_tcp_connect)); + connect->closure = closure; + connect->endpoint = ep; + connect->tcp_handle = gpr_malloc(sizeof(uv_tcp_t)); + gpr_log(GPR_DEBUG, "Allocated uv_tcp_t handle %p", connect->tcp_handle); + connect->addr_name = grpc_sockaddr_to_uri(addr); + uv_tcp_init(uv_default_loop(), connect->tcp_handle); + connect->connect_req.data = connect; + // TODO(murgatroid99): figure out what the return value here means + uv_tcp_connect(&connect->connect_req, connect->tcp_handle, addr, + uv_tc_on_connect); + grpc_timer_init(exec_ctx, &connect->alarm, + gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC), + uv_tc_on_alarm, connect, gpr_now(GPR_CLOCK_MONOTONIC)); +} + +#endif /* GRPC_UV */ diff --git a/src/core/lib/iomgr/tcp_server_uv.c b/src/core/lib/iomgr/tcp_server_uv.c new file mode 100644 index 0000000000..b69e70881f --- /dev/null +++ b/src/core/lib/iomgr/tcp_server_uv.c @@ -0,0 +1,358 @@ +/* + * + * 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. + * + */ + +#include "src/core/lib/iomgr/port.h" + +#ifdef GRPC_UV + +#include + +#include +#include + +#include "src/core/lib/iomgr/error.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/iomgr/sockaddr_utils.h" +#include "src/core/lib/iomgr/tcp_server.h" +#include "src/core/lib/iomgr/tcp_uv.h" + +/* one listening port */ +typedef struct grpc_tcp_listener grpc_tcp_listener; +struct grpc_tcp_listener { + uv_tcp_t *handle; + grpc_tcp_server *server; + unsigned port_index; + int port; + /* linked list */ + struct grpc_tcp_listener *next; +}; + +struct grpc_tcp_server { + gpr_refcount refs; + + /* Called whenever accept() succeeds on a server port. */ + grpc_tcp_server_cb on_accept_cb; + void *on_accept_cb_arg; + + int open_ports; + + /* linked list of server ports */ + grpc_tcp_listener *head; + grpc_tcp_listener *tail; + + /* List of closures passed to shutdown_starting_add(). */ + grpc_closure_list shutdown_starting; + + /* shutdown callback */ + grpc_closure *shutdown_complete; +}; + +grpc_error *grpc_tcp_server_create(grpc_closure *shutdown_complete, + const grpc_channel_args *args, + grpc_tcp_server **server) { + grpc_tcp_server *s = gpr_malloc(sizeof(grpc_tcp_server)); + (void)args; + gpr_ref_init(&s->refs, 1); + s->on_accept_cb = NULL; + s->on_accept_cb_arg = NULL; + s->open_ports = 0; + s->head = NULL; + s->tail = NULL; + s->shutdown_starting.head = NULL; + s->shutdown_starting.tail = NULL; + s->shutdown_complete = shutdown_complete; + *server = s; + return GRPC_ERROR_NONE; +} + +grpc_tcp_server *grpc_tcp_server_ref(grpc_tcp_server *s) { + gpr_ref(&s->refs); + return s; +} + +void grpc_tcp_server_shutdown_starting_add(grpc_tcp_server *s, + grpc_closure *shutdown_starting) { + grpc_closure_list_append(&s->shutdown_starting, shutdown_starting, + GRPC_ERROR_NONE); +} + +static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { + if (s->shutdown_complete != NULL) { + grpc_exec_ctx_sched(exec_ctx, s->shutdown_complete, GRPC_ERROR_NONE, NULL); + } + + while (s->head) { + grpc_tcp_listener *sp = s->head; + s->head = sp->next; + sp->next = NULL; + gpr_log(GPR_DEBUG, "Freeing uv_tcp_t handle %p", sp->handle); + gpr_free(sp->handle); + gpr_free(sp); + } + gpr_free(s); +} + +static void handle_close_callback(uv_handle_t *handle) { + grpc_tcp_listener *sp = (grpc_tcp_listener *)handle->data; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + sp->server->open_ports--; + if (sp->server->open_ports == 0) { + finish_shutdown(&exec_ctx, sp->server); + } + grpc_exec_ctx_finish(&exec_ctx); +} + +static void tcp_server_destroy(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { + int immediately_done = 0; + grpc_tcp_listener *sp; + + if (s->open_ports == 0) { + immediately_done = 1; + } + for (sp = s->head; sp; sp = sp->next){ + gpr_log(GPR_DEBUG, "Closing uv_tcp_t handle %p", sp->handle); + uv_close((uv_handle_t *)sp->handle, handle_close_callback); + } + + if (immediately_done) { + finish_shutdown(exec_ctx, s); + } +} + +void grpc_tcp_server_unref(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { + if (gpr_unref(&s->refs)) { + /* Complete shutdown_starting work before destroying. */ + grpc_exec_ctx local_exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_exec_ctx_enqueue_list(&local_exec_ctx, &s->shutdown_starting, NULL); + if (exec_ctx == NULL) { + grpc_exec_ctx_flush(&local_exec_ctx); + tcp_server_destroy(&local_exec_ctx, s); + grpc_exec_ctx_finish(&local_exec_ctx); + } else { + grpc_exec_ctx_finish(&local_exec_ctx); + tcp_server_destroy(exec_ctx, s); + } + } +} + +static void on_connect(uv_stream_t *server, int status) { + grpc_tcp_listener *sp = (grpc_tcp_listener *)server->data; + grpc_tcp_server_acceptor acceptor = {sp->server, sp->port_index, 0}; + uv_tcp_t *client; + grpc_endpoint *ep = NULL; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + struct sockaddr_storage peer_name; + int peer_name_len = sizeof(peer_name); + char *peer_name_string; + int err; + + gpr_log(GPR_DEBUG, "Server %p received a connection", sp->server); + + if (status < 0) { + gpr_log(GPR_INFO, "Skipping on_accept due to error: %s", + uv_strerror(status)); + return; + } + client = gpr_malloc(sizeof(uv_tcp_t)); + gpr_log(GPR_DEBUG, "Allocated uv_tcp_t handle %p", client); + uv_tcp_init(uv_default_loop(), client); + // UV documentation says this is guaranteed to succeed + uv_accept((uv_stream_t *)server, (uv_stream_t *)client); + peer_name_string = NULL; + err = uv_tcp_getpeername(client, (struct sockaddr *)&peer_name, + &peer_name_len); + if (err == 0) { + peer_name_string = grpc_sockaddr_to_uri((struct sockaddr *)&peer_name); + } else { + gpr_log(GPR_INFO, "uv_tcp_getpeername error: %s", + uv_strerror(status)); + } + ep = grpc_tcp_create(client, peer_name_string); + gpr_log(GPR_DEBUG, "Calling on_accept_cb for server %p", sp->server); + sp->server->on_accept_cb(&exec_ctx, sp->server->on_accept_cb_arg, ep, NULL, + &acceptor); + grpc_exec_ctx_finish(&exec_ctx); +} + +static grpc_error *add_socket_to_server(grpc_tcp_server *s, + uv_tcp_t *handle, + struct sockaddr *addr, + size_t addr_len, unsigned port_index, + grpc_tcp_listener **listener) { + grpc_tcp_listener *sp = NULL; + int port = -1; + int status; + grpc_error *error; + struct sockaddr_storage sockname_temp; + int sockname_len; + + // The last argument to uv_tcp_bind is flags + status = uv_tcp_bind(handle, addr, 0); + if (status != 0) { + error = GRPC_ERROR_CREATE("Failed to bind to port"); + error = grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR, + uv_strerror(status)); + return error; + } + + sockname_len = (int)sizeof(sockname_temp); + status = uv_tcp_getsockname(handle, (struct sockaddr *)&sockname_temp, + &sockname_len); + if (status != 0) { + error = GRPC_ERROR_CREATE("getsockname failed"); + error = grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR, + uv_strerror(status)); + return error; + } + + port = grpc_sockaddr_get_port((struct sockaddr *)&sockname_temp); + + GPR_ASSERT(port >= 0); + GPR_ASSERT(!s->on_accept_cb && "must add ports before starting server"); + sp = gpr_malloc(sizeof(grpc_tcp_listener)); + sp->next = NULL; + if (s->head == NULL) { + s->head = sp; + } else { + s->tail->next = sp; + } + s->tail = sp; + sp->server = s; + sp->handle = handle; + sp->port = port; + sp->port_index = port_index; + handle->data = sp; + s->open_ports++; + GPR_ASSERT(sp->handle); + *listener = sp; + + return GRPC_ERROR_NONE; +} + +grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, + size_t addr_len, int *port) { + // This function is mostly copied from tcp_server_windows.c + grpc_tcp_listener *sp = NULL; + uv_tcp_t *handle; + struct sockaddr_in6 addr6_v4mapped; + struct sockaddr_in6 wildcard; + struct sockaddr *allocated_addr = NULL; + struct sockaddr_storage sockname_temp; + int sockname_len; + unsigned port_index = 0; + int status; + grpc_error *error = GRPC_ERROR_NONE; + + if (s->tail != NULL) { + port_index = s->tail->port_index + 1; + } + + /* Check if this is a wildcard port, and if so, try to keep the port the same + as some previously created listener. */ + if (grpc_sockaddr_get_port(addr) == 0) { + for (sp = s->head; sp; sp = sp->next) { + sockname_len = sizeof(sockname_temp); + if (0 == uv_tcp_getsockname(sp->handle, (struct sockaddr *)&sockname_temp, + &sockname_len)) { + *port = grpc_sockaddr_get_port((struct sockaddr *)&sockname_temp); + if (*port > 0) { + allocated_addr = gpr_malloc(addr_len); + memcpy(allocated_addr, addr, addr_len); + grpc_sockaddr_set_port(allocated_addr, *port); + addr = allocated_addr; + break; + } + } + } + } + + if (grpc_sockaddr_to_v4mapped(addr, &addr6_v4mapped)) { + addr = (const struct sockaddr *)&addr6_v4mapped; + addr_len = sizeof(addr6_v4mapped); + } + + /* Treat :: or 0.0.0.0 as a family-agnostic wildcard. */ + if (grpc_sockaddr_is_wildcard(addr, port)) { + grpc_sockaddr_make_wildcard6(*port, &wildcard); + + addr = (struct sockaddr *)&wildcard; + addr_len = sizeof(wildcard); + } + + handle = gpr_malloc(sizeof(uv_tcp_t)); + gpr_log(GPR_DEBUG, "Allocating uv_tcp_t handle %p", handle); + status = uv_tcp_init(uv_default_loop(), handle); + if (status == 0) { + error = add_socket_to_server(s, handle, (struct sockaddr *)addr, addr_len, + port_index, &sp); + } else { + error = GRPC_ERROR_CREATE("Failed to initialize UV tcp handle"); + error = grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR, + uv_strerror(status)); + } + + gpr_free(allocated_addr); + + if (error != GRPC_ERROR_NONE) { + grpc_error *error_out = GRPC_ERROR_CREATE_REFERENCING( + "Failed to add port to server", &error, 1); + GRPC_ERROR_UNREF(error); + error = error_out; + *port = -1; + } else { + GPR_ASSERT(sp != NULL); + *port = sp->port; + } + return error; +} + +void grpc_tcp_server_start(grpc_exec_ctx *exec_ctx, grpc_tcp_server *server, + grpc_pollset **pollsets, size_t pollset_count, + grpc_tcp_server_cb on_accept_cb, void *cb_arg) { + grpc_tcp_listener *sp; + (void)pollsets; + (void)pollset_count; + GPR_ASSERT(on_accept_cb); + GPR_ASSERT(!server->on_accept_cb); + server->on_accept_cb = on_accept_cb; + server->on_accept_cb_arg = cb_arg; + for(sp = server->head; sp; sp = sp->next) { + GPR_ASSERT(uv_listen((uv_stream_t *) sp->handle, SOMAXCONN, on_connect) == 0); + } +} + +void grpc_tcp_server_shutdown_listeners(grpc_exec_ctx *exec_ctx, + grpc_tcp_server *s) {} + + +#endif /* GRPC_UV */ diff --git a/src/core/lib/iomgr/tcp_uv.c b/src/core/lib/iomgr/tcp_uv.c new file mode 100644 index 0000000000..fa198fd8e1 --- /dev/null +++ b/src/core/lib/iomgr/tcp_uv.c @@ -0,0 +1,336 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include "src/core/lib/iomgr/port.h" + +#ifdef GRPC_UV + +#include +#include + +#include +#include +#include +#include + +#include "src/core/lib/iomgr/error.h" +#include "src/core/lib/iomgr/network_status_tracker.h" +#include "src/core/lib/iomgr/tcp_uv.h" +#include "src/core/lib/support/string.h" + +int grpc_tcp_trace = 0; + +typedef struct { + grpc_endpoint base; + gpr_refcount refcount; + + uv_tcp_t *handle; + + grpc_closure *read_cb; + grpc_closure *write_cb; + + gpr_slice read_slice; + gpr_slice_buffer *read_slices; + gpr_slice_buffer *write_slices; + uv_buf_t *write_buffers; + + int shutting_down; + char *peer_string; + grpc_pollset *pollset; +} grpc_tcp; + +static void uv_close_callback(uv_handle_t *handle) { + gpr_log(GPR_DEBUG, "Freeing uv_tcp_t handle %p", handle); + gpr_free(handle); +} + +static void tcp_free(grpc_tcp *tcp) { + gpr_free(tcp); +} + +/*#define GRPC_TCP_REFCOUNT_DEBUG*/ +#ifdef GRPC_TCP_REFCOUNT_DEBUG +#define TCP_UNREF(tcp, reason) \ + tcp_unref((tcp), (reason), __FILE__, __LINE__) +#define TCP_REF(tcp, reason) tcp_ref((tcp), (reason), __FILE__, __LINE__) +static void tcp_unref(grpc_tcp *tcp, const char *reason, const char *file, + int line) { + gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "TCP unref %p : %s %d -> %d", tcp, + reason, tcp->refcount.count, tcp->refcount.count - 1); + if (gpr_unref(&tcp->refcount)) { + tcp_free(tcp); + } +} + +static void tcp_ref(grpc_tcp *tcp, const char *reason, const char *file, + int line) { + gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "TCP ref %p : %s %d -> %d", tcp, + reason, tcp->refcount.count, tcp->refcount.count + 1); + gpr_ref(&tcp->refcount); +} +#else +#define TCP_UNREF(tcp, reason) tcp_unref((tcp)) +#define TCP_REF(tcp, reason) tcp_ref((tcp)) +static void tcp_unref(grpc_tcp *tcp) { + if (gpr_unref(&tcp->refcount)) { + tcp_free(tcp); + } +} + +static void tcp_ref(grpc_tcp *tcp) { gpr_ref(&tcp->refcount); } +#endif + +static void alloc_uv_buf(uv_handle_t *handle, size_t suggested_size, uv_buf_t *buf) { + grpc_tcp *tcp = handle->data; + (void)suggested_size; + tcp->read_slice = gpr_slice_malloc(GRPC_TCP_DEFAULT_READ_SLICE_SIZE); + buf->base = (char *)GPR_SLICE_START_PTR(tcp->read_slice); + buf->len = GPR_SLICE_LENGTH(tcp->read_slice); +} + +static void read_callback(uv_stream_t *stream, ssize_t nread, const uv_buf_t *buf) { + gpr_slice sub; + grpc_error *error; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_tcp *tcp = stream->data; + grpc_closure *cb = tcp->read_cb; + if (nread == 0) { + // Nothing happened. Wait for the next callback + return; + } + TCP_UNREF(tcp, "read"); + tcp->read_cb = NULL; + // TODO(murgatroid99): figure out what the return value here means + uv_read_stop(stream); + if (nread == UV_EOF) { + error = GRPC_ERROR_CREATE("EOF"); + } else if (nread > 0) { + // Successful read + sub = gpr_slice_sub_no_ref(tcp->read_slice, 0, nread); + gpr_slice_buffer_add(tcp->read_slices, sub); + error = GRPC_ERROR_NONE; + if (grpc_tcp_trace) { + size_t i; + const char *str = grpc_error_string(error); + gpr_log(GPR_DEBUG, "read: error=%s", str); + grpc_error_free_string(str); + for (i = 0; i < tcp->read_slices->count; i++) { + char *dump = gpr_dump_slice(tcp->read_slices->slices[i], + GPR_DUMP_HEX | GPR_DUMP_ASCII); + gpr_log(GPR_DEBUG, "READ %p (peer=%s): %s", tcp, tcp->peer_string, dump); + gpr_free(dump); + } + } + } else { + // nread < 0: Error + error = GRPC_ERROR_CREATE("TCP Read failed"); + } + grpc_exec_ctx_sched(&exec_ctx, cb, error, NULL); + grpc_exec_ctx_finish(&exec_ctx); +} + +static void uv_endpoint_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, + gpr_slice_buffer *read_slices, grpc_closure *cb) { + grpc_tcp *tcp = (grpc_tcp *)ep; + int status; + grpc_error *error = GRPC_ERROR_NONE; + GPR_ASSERT(tcp->read_cb == NULL); + tcp->read_cb = cb; + tcp->read_slices = read_slices; + gpr_slice_buffer_reset_and_unref(read_slices); + TCP_REF(tcp, "read"); + // TODO(murgatroid99): figure out what the return value here means + status = uv_read_start((uv_stream_t *)tcp->handle, alloc_uv_buf, read_callback); + if (status != 0) { + error = GRPC_ERROR_CREATE("TCP Read failed at start"); + error = grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR, + uv_strerror(status)); + grpc_exec_ctx_sched(exec_ctx, cb, error, NULL); + } + if (grpc_tcp_trace) { + const char *str = grpc_error_string(error); + gpr_log(GPR_DEBUG, "Initiating read on %p: error=%s", tcp, str); + } +} + +static void write_callback(uv_write_t *req, int status) { + grpc_tcp *tcp = req->data; + grpc_error *error; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_closure *cb = tcp->write_cb; + tcp->write_cb = NULL; + TCP_UNREF(tcp, "write"); + if (status == 0) { + error = GRPC_ERROR_NONE; + } else { + error = GRPC_ERROR_CREATE("TCP Write failed"); + } + if (grpc_tcp_trace) { + const char *str = grpc_error_string(error); + gpr_log(GPR_DEBUG, "write complete on %p: error=%s", tcp, str); + } + gpr_free(tcp->write_buffers); + gpr_free(req); + grpc_exec_ctx_sched(&exec_ctx, cb, error, NULL); + grpc_exec_ctx_finish(&exec_ctx); +} + +static void uv_endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, + gpr_slice_buffer *write_slices, + grpc_closure *cb) { + grpc_tcp *tcp = (grpc_tcp *)ep; + uv_buf_t *buffers; + unsigned int buffer_count; + unsigned int i; + gpr_slice *slice; + uv_write_t *write_req; + + if (grpc_tcp_trace) { + size_t i; + + for (i = 0; i < write_slices->count; i++) { + char *data = + gpr_dump_slice(write_slices->slices[i], GPR_DUMP_HEX | GPR_DUMP_ASCII); + gpr_log(GPR_DEBUG, "WRITE %p (peer=%s): %s", tcp, tcp->peer_string, data); + gpr_free(data); + } + } + + if (tcp->shutting_down) { + grpc_exec_ctx_sched(exec_ctx, cb, + GRPC_ERROR_CREATE("TCP socket is shutting down"), NULL); + return; + } + + GPR_ASSERT(tcp->write_cb == NULL); + tcp->write_slices = write_slices; + GPR_ASSERT(tcp->write_slices->count <= UINT_MAX); + if (tcp->write_slices->count == 0) { + // No slices means we don't have to do anything, + // and libuv doesn't like empty writes + grpc_exec_ctx_sched(exec_ctx, cb, GRPC_ERROR_NONE, NULL); + return; + } + + tcp->write_cb = cb; + buffer_count = (unsigned int)tcp->write_slices->count; + buffers = gpr_malloc(sizeof(uv_buf_t) * buffer_count); + for (i = 0; i < buffer_count; i++) { + slice = &tcp->write_slices->slices[i]; + buffers[i].base = (char *)GPR_SLICE_START_PTR(*slice); + buffers[i].len = GPR_SLICE_LENGTH(*slice); + } + write_req = gpr_malloc(sizeof(uv_write_t)); + write_req->data = tcp; + TCP_REF(tcp, "write"); + // TODO(murgatroid99): figure out what the return value here means + uv_write(write_req, (uv_stream_t *)tcp->handle, buffers, buffer_count, + write_callback); +} + +static void uv_add_to_pollset(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, + grpc_pollset *pollset) { + // No-op. We're ignoring pollsets currently + (void) exec_ctx; + (void) ep; + (void) pollset; + grpc_tcp *tcp = (grpc_tcp *) ep; + tcp->pollset = pollset; +} + +static void uv_add_to_pollset_set(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, + grpc_pollset_set *pollset) { + // No-op. We're ignoring pollsets currently + (void) exec_ctx; + (void) ep; + (void) pollset; +} + +static void shutdown_callback(uv_shutdown_t *req, int status) { + gpr_free(req); +} + +static void uv_endpoint_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { + grpc_tcp *tcp = (grpc_tcp *)ep; + uv_shutdown_t *req = gpr_malloc(sizeof(uv_shutdown_t)); + uv_shutdown(req, (uv_stream_t *)tcp->handle, shutdown_callback); +} + +static void uv_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { + grpc_network_status_unregister_endpoint(ep); + grpc_tcp *tcp = (grpc_tcp *)ep; + gpr_log(GPR_DEBUG, "Closing uv_tcp_t handle %p", tcp->handle); + uv_close((uv_handle_t *)tcp->handle, uv_close_callback); + TCP_UNREF(tcp, "destroy"); +} + +static char *uv_get_peer(grpc_endpoint *ep) { + grpc_tcp *tcp = (grpc_tcp *)ep; + return gpr_strdup(tcp->peer_string); +} + +static grpc_workqueue *uv_get_workqueue(grpc_endpoint *ep) {return NULL; } + +static grpc_endpoint_vtable vtable = {uv_endpoint_read, + uv_endpoint_write, + uv_get_workqueue, + uv_add_to_pollset, + uv_add_to_pollset_set, + uv_endpoint_shutdown, + uv_destroy, + uv_get_peer}; + +grpc_endpoint *grpc_tcp_create(uv_tcp_t *handle, char *peer_string) { + grpc_tcp *tcp = (grpc_tcp *)gpr_malloc(sizeof(grpc_tcp)); + + if (grpc_tcp_trace) { + gpr_log(GPR_DEBUG, "Creating TCP endpoint %p", tcp); + } + + memset(tcp, 0, sizeof(grpc_tcp)); + tcp->base.vtable = &vtable; + tcp->handle = handle; + handle->data = tcp; + gpr_ref_init(&tcp->refcount, 1); + tcp->peer_string = gpr_strdup(peer_string); + /* Tell network status tracking code about the new endpoint */ + grpc_network_status_register_endpoint(&tcp->base); + +#ifndef GRPC_UV_TCP_HOLD_LOOP + uv_unref((uv_handle_t *)handle); +#endif + + return &tcp->base; +} + +#endif /* GRPC_UV */ diff --git a/src/core/lib/iomgr/tcp_uv.h b/src/core/lib/iomgr/tcp_uv.h new file mode 100644 index 0000000000..eed41151ea --- /dev/null +++ b/src/core/lib/iomgr/tcp_uv.h @@ -0,0 +1,57 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#ifndef GRPC_CORE_LIB_IOMGR_TCP_UV_H +#define GRPC_CORE_LIB_IOMGR_TCP_UV_H +/* + Low level TCP "bottom half" implementation, for use by transports built on + top of a TCP connection. + + Note that this file does not (yet) include APIs for creating the socket in + the first place. + + All calls passing slice transfer ownership of a slice refcount unless + otherwise specified. +*/ + +#include "src/core/lib/iomgr/endpoint.h" + +#include + +extern int grpc_tcp_trace; + +#define GRPC_TCP_DEFAULT_READ_SLICE_SIZE 8192 + +grpc_endpoint *grpc_tcp_create(uv_tcp_t *handle, char *peer_string); + +#endif /* GRPC_CORE_LIB_IOMGR_TCP_UV_H */ diff --git a/src/core/lib/iomgr/timer.c b/src/core/lib/iomgr/timer.c deleted file mode 100644 index 9975fa1671..0000000000 --- a/src/core/lib/iomgr/timer.c +++ /dev/null @@ -1,384 +0,0 @@ -/* - * - * 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. - * - */ - -#include "src/core/lib/iomgr/timer.h" - -#include -#include -#include -#include "src/core/lib/iomgr/time_averaged_stats.h" -#include "src/core/lib/iomgr/timer_heap.h" - -#define INVALID_HEAP_INDEX 0xffffffffu - -#define LOG2_NUM_SHARDS 5 -#define NUM_SHARDS (1 << LOG2_NUM_SHARDS) -#define ADD_DEADLINE_SCALE 0.33 -#define MIN_QUEUE_WINDOW_DURATION 0.01 -#define MAX_QUEUE_WINDOW_DURATION 1 - -typedef struct { - gpr_mu mu; - grpc_time_averaged_stats stats; - /* All and only timers with deadlines <= this will be in the heap. */ - gpr_timespec queue_deadline_cap; - gpr_timespec min_deadline; - /* Index in the g_shard_queue */ - uint32_t shard_queue_index; - /* This holds all timers with deadlines < queue_deadline_cap. Timers in this - list have the top bit of their deadline set to 0. */ - grpc_timer_heap heap; - /* This holds timers whose deadline is >= queue_deadline_cap. */ - grpc_timer list; -} shard_type; - -/* Protects g_shard_queue */ -static gpr_mu g_mu; -/* Allow only one run_some_expired_timers at once */ -static gpr_mu g_checker_mu; -static gpr_clock_type g_clock_type; -static shard_type g_shards[NUM_SHARDS]; -/* Protected by g_mu */ -static shard_type *g_shard_queue[NUM_SHARDS]; -static bool g_initialized = false; - -static int run_some_expired_timers(grpc_exec_ctx *exec_ctx, gpr_timespec now, - gpr_timespec *next, grpc_error *error); - -static gpr_timespec compute_min_deadline(shard_type *shard) { - return grpc_timer_heap_is_empty(&shard->heap) - ? shard->queue_deadline_cap - : grpc_timer_heap_top(&shard->heap)->deadline; -} - -void grpc_timer_list_init(gpr_timespec now) { - uint32_t i; - - g_initialized = true; - gpr_mu_init(&g_mu); - gpr_mu_init(&g_checker_mu); - g_clock_type = now.clock_type; - - for (i = 0; i < NUM_SHARDS; i++) { - shard_type *shard = &g_shards[i]; - gpr_mu_init(&shard->mu); - grpc_time_averaged_stats_init(&shard->stats, 1.0 / ADD_DEADLINE_SCALE, 0.1, - 0.5); - shard->queue_deadline_cap = now; - shard->shard_queue_index = i; - grpc_timer_heap_init(&shard->heap); - shard->list.next = shard->list.prev = &shard->list; - shard->min_deadline = compute_min_deadline(shard); - g_shard_queue[i] = shard; - } -} - -void grpc_timer_list_shutdown(grpc_exec_ctx *exec_ctx) { - int i; - run_some_expired_timers(exec_ctx, gpr_inf_future(g_clock_type), NULL, - GRPC_ERROR_CREATE("Timer list shutdown")); - for (i = 0; i < NUM_SHARDS; i++) { - shard_type *shard = &g_shards[i]; - gpr_mu_destroy(&shard->mu); - grpc_timer_heap_destroy(&shard->heap); - } - gpr_mu_destroy(&g_mu); - gpr_mu_destroy(&g_checker_mu); - g_initialized = false; -} - -/* This is a cheap, but good enough, pointer hash for sharding the tasks: */ -static size_t shard_idx(const grpc_timer *info) { - size_t x = (size_t)info; - return ((x >> 4) ^ (x >> 9) ^ (x >> 14)) & (NUM_SHARDS - 1); -} - -static double ts_to_dbl(gpr_timespec ts) { - return (double)ts.tv_sec + 1e-9 * ts.tv_nsec; -} - -static gpr_timespec dbl_to_ts(double d) { - gpr_timespec ts; - ts.tv_sec = (int64_t)d; - ts.tv_nsec = (int32_t)(1e9 * (d - (double)ts.tv_sec)); - ts.clock_type = GPR_TIMESPAN; - return ts; -} - -static void list_join(grpc_timer *head, grpc_timer *timer) { - timer->next = head; - timer->prev = head->prev; - timer->next->prev = timer->prev->next = timer; -} - -static void list_remove(grpc_timer *timer) { - timer->next->prev = timer->prev; - timer->prev->next = timer->next; -} - -static void swap_adjacent_shards_in_queue(uint32_t first_shard_queue_index) { - shard_type *temp; - temp = g_shard_queue[first_shard_queue_index]; - g_shard_queue[first_shard_queue_index] = - g_shard_queue[first_shard_queue_index + 1]; - g_shard_queue[first_shard_queue_index + 1] = temp; - g_shard_queue[first_shard_queue_index]->shard_queue_index = - first_shard_queue_index; - g_shard_queue[first_shard_queue_index + 1]->shard_queue_index = - first_shard_queue_index + 1; -} - -static void note_deadline_change(shard_type *shard) { - while (shard->shard_queue_index > 0 && - gpr_time_cmp( - shard->min_deadline, - g_shard_queue[shard->shard_queue_index - 1]->min_deadline) < 0) { - swap_adjacent_shards_in_queue(shard->shard_queue_index - 1); - } - while (shard->shard_queue_index < NUM_SHARDS - 1 && - gpr_time_cmp( - shard->min_deadline, - g_shard_queue[shard->shard_queue_index + 1]->min_deadline) > 0) { - swap_adjacent_shards_in_queue(shard->shard_queue_index); - } -} - -void grpc_timer_init(grpc_exec_ctx *exec_ctx, grpc_timer *timer, - gpr_timespec deadline, grpc_iomgr_cb_func timer_cb, - void *timer_cb_arg, gpr_timespec now) { - int is_first_timer = 0; - shard_type *shard = &g_shards[shard_idx(timer)]; - GPR_ASSERT(deadline.clock_type == g_clock_type); - GPR_ASSERT(now.clock_type == g_clock_type); - grpc_closure_init(&timer->closure, timer_cb, timer_cb_arg); - timer->deadline = deadline; - timer->triggered = 0; - - if (!g_initialized) { - timer->triggered = 1; - grpc_exec_ctx_sched( - exec_ctx, &timer->closure, - GRPC_ERROR_CREATE("Attempt to create timer before initialization"), - NULL); - return; - } - - if (gpr_time_cmp(deadline, now) <= 0) { - timer->triggered = 1; - grpc_exec_ctx_sched(exec_ctx, &timer->closure, GRPC_ERROR_NONE, NULL); - return; - } - - /* TODO(ctiller): check deadline expired */ - - gpr_mu_lock(&shard->mu); - grpc_time_averaged_stats_add_sample(&shard->stats, - ts_to_dbl(gpr_time_sub(deadline, now))); - if (gpr_time_cmp(deadline, shard->queue_deadline_cap) < 0) { - is_first_timer = grpc_timer_heap_add(&shard->heap, timer); - } else { - timer->heap_index = INVALID_HEAP_INDEX; - list_join(&shard->list, timer); - } - gpr_mu_unlock(&shard->mu); - - /* Deadline may have decreased, we need to adjust the master queue. Note - that there is a potential racy unlocked region here. There could be a - reordering of multiple grpc_timer_init calls, at this point, but the < test - below should ensure that we err on the side of caution. There could - also be a race with grpc_timer_check, which might beat us to the lock. In - that case, it is possible that the timer that we added will have already - run by the time we hold the lock, but that too is a safe error. - Finally, it's possible that the grpc_timer_check that intervened failed to - trigger the new timer because the min_deadline hadn't yet been reduced. - In that case, the timer will simply have to wait for the next - grpc_timer_check. */ - if (is_first_timer) { - gpr_mu_lock(&g_mu); - if (gpr_time_cmp(deadline, shard->min_deadline) < 0) { - gpr_timespec old_min_deadline = g_shard_queue[0]->min_deadline; - shard->min_deadline = deadline; - note_deadline_change(shard); - if (shard->shard_queue_index == 0 && - gpr_time_cmp(deadline, old_min_deadline) < 0) { - grpc_kick_poller(); - } - } - gpr_mu_unlock(&g_mu); - } -} - -void grpc_timer_cancel(grpc_exec_ctx *exec_ctx, grpc_timer *timer) { - if (!g_initialized) { - /* must have already been cancelled, also the shard mutex is invalid */ - return; - } - - shard_type *shard = &g_shards[shard_idx(timer)]; - gpr_mu_lock(&shard->mu); - if (!timer->triggered) { - grpc_exec_ctx_sched(exec_ctx, &timer->closure, GRPC_ERROR_CANCELLED, NULL); - timer->triggered = 1; - if (timer->heap_index == INVALID_HEAP_INDEX) { - list_remove(timer); - } else { - grpc_timer_heap_remove(&shard->heap, timer); - } - } - gpr_mu_unlock(&shard->mu); -} - -/* This is called when the queue is empty and "now" has reached the - queue_deadline_cap. We compute a new queue deadline and then scan the map - for timers that fall at or under it. Returns true if the queue is no - longer empty. - REQUIRES: shard->mu locked */ -static int refill_queue(shard_type *shard, gpr_timespec now) { - /* Compute the new queue window width and bound by the limits: */ - double computed_deadline_delta = - grpc_time_averaged_stats_update_average(&shard->stats) * - ADD_DEADLINE_SCALE; - double deadline_delta = - GPR_CLAMP(computed_deadline_delta, MIN_QUEUE_WINDOW_DURATION, - MAX_QUEUE_WINDOW_DURATION); - grpc_timer *timer, *next; - - /* Compute the new cap and put all timers under it into the queue: */ - shard->queue_deadline_cap = gpr_time_add( - gpr_time_max(now, shard->queue_deadline_cap), dbl_to_ts(deadline_delta)); - for (timer = shard->list.next; timer != &shard->list; timer = next) { - next = timer->next; - - if (gpr_time_cmp(timer->deadline, shard->queue_deadline_cap) < 0) { - list_remove(timer); - grpc_timer_heap_add(&shard->heap, timer); - } - } - return !grpc_timer_heap_is_empty(&shard->heap); -} - -/* This pops the next non-cancelled timer with deadline <= now from the - queue, or returns NULL if there isn't one. - REQUIRES: shard->mu locked */ -static grpc_timer *pop_one(shard_type *shard, gpr_timespec now) { - grpc_timer *timer; - for (;;) { - if (grpc_timer_heap_is_empty(&shard->heap)) { - if (gpr_time_cmp(now, shard->queue_deadline_cap) < 0) return NULL; - if (!refill_queue(shard, now)) return NULL; - } - timer = grpc_timer_heap_top(&shard->heap); - if (gpr_time_cmp(timer->deadline, now) > 0) return NULL; - timer->triggered = 1; - grpc_timer_heap_pop(&shard->heap); - return timer; - } -} - -/* REQUIRES: shard->mu unlocked */ -static size_t pop_timers(grpc_exec_ctx *exec_ctx, shard_type *shard, - gpr_timespec now, gpr_timespec *new_min_deadline, - grpc_error *error) { - size_t n = 0; - grpc_timer *timer; - gpr_mu_lock(&shard->mu); - while ((timer = pop_one(shard, now))) { - grpc_exec_ctx_sched(exec_ctx, &timer->closure, GRPC_ERROR_REF(error), NULL); - n++; - } - *new_min_deadline = compute_min_deadline(shard); - gpr_mu_unlock(&shard->mu); - return n; -} - -static int run_some_expired_timers(grpc_exec_ctx *exec_ctx, gpr_timespec now, - gpr_timespec *next, grpc_error *error) { - size_t n = 0; - - /* TODO(ctiller): verify that there are any timers (atomically) here */ - - if (gpr_mu_trylock(&g_checker_mu)) { - gpr_mu_lock(&g_mu); - - while (gpr_time_cmp(g_shard_queue[0]->min_deadline, now) < 0) { - gpr_timespec new_min_deadline; - - /* For efficiency, we pop as many available timers as we can from the - shard. This may violate perfect timer deadline ordering, but that - shouldn't be a big deal because we don't make ordering guarantees. */ - n += - pop_timers(exec_ctx, g_shard_queue[0], now, &new_min_deadline, error); - - /* An grpc_timer_init() on the shard could intervene here, adding a new - timer that is earlier than new_min_deadline. However, - grpc_timer_init() will block on the master_lock before it can call - set_min_deadline, so this one will complete first and then the Addtimer - will reduce the min_deadline (perhaps unnecessarily). */ - g_shard_queue[0]->min_deadline = new_min_deadline; - note_deadline_change(g_shard_queue[0]); - } - - if (next) { - *next = gpr_time_min(*next, g_shard_queue[0]->min_deadline); - } - - gpr_mu_unlock(&g_mu); - gpr_mu_unlock(&g_checker_mu); - } else if (next != NULL) { - /* TODO(ctiller): this forces calling code to do an short poll, and - then retry the timer check (because this time through the timer list was - contended). - - We could reduce the cost here dramatically by keeping a count of how many - currently active pollers got through the uncontended case above - successfully, and waking up other pollers IFF that count drops to zero. - - Once that count is in place, this entire else branch could disappear. */ - *next = gpr_time_min( - *next, gpr_time_add(now, gpr_time_from_millis(1, GPR_TIMESPAN))); - } - - GRPC_ERROR_UNREF(error); - - return (int)n; -} - -bool grpc_timer_check(grpc_exec_ctx *exec_ctx, gpr_timespec now, - gpr_timespec *next) { - GPR_ASSERT(now.clock_type == g_clock_type); - return run_some_expired_timers( - exec_ctx, now, next, - gpr_time_cmp(now, gpr_inf_future(now.clock_type)) != 0 - ? GRPC_ERROR_NONE - : GRPC_ERROR_CREATE("Shutting down timer system")); -} diff --git a/src/core/lib/iomgr/timer.h b/src/core/lib/iomgr/timer.h index a825d2a28b..b76ba079c4 100644 --- a/src/core/lib/iomgr/timer.h +++ b/src/core/lib/iomgr/timer.h @@ -34,19 +34,20 @@ #ifndef GRPC_CORE_LIB_IOMGR_TIMER_H #define GRPC_CORE_LIB_IOMGR_TIMER_H +#include "src/core/lib/iomgr/port.h" + +#ifdef GRPC_UV +#include "src/core/lib/iomgr/timer_uv.h" +#else +#include "src/core/lib/iomgr/timer_generic.h" +#endif /* GRPC_UV */ + #include #include #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/iomgr.h" -typedef struct grpc_timer { - gpr_timespec deadline; - uint32_t heap_index; /* INVALID_HEAP_INDEX if not in heap */ - int triggered; - struct grpc_timer *next; - struct grpc_timer *prev; - grpc_closure closure; -} grpc_timer; +typedef struct grpc_timer grpc_timer; /* Initialize *timer. When expired or canceled, timer_cb will be called with *timer_cb_arg and status to indicate if it expired (SUCCESS) or was diff --git a/src/core/lib/iomgr/timer_generic.c b/src/core/lib/iomgr/timer_generic.c new file mode 100644 index 0000000000..00058f9d86 --- /dev/null +++ b/src/core/lib/iomgr/timer_generic.c @@ -0,0 +1,390 @@ +/* + * + * 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. + * + */ + +#include "src/core/lib/iomgr/port.h" + +#ifdef GRPC_TIMER_USE_GENERIC + +#include "src/core/lib/iomgr/timer.h" + +#include +#include +#include +#include "src/core/lib/iomgr/time_averaged_stats.h" +#include "src/core/lib/iomgr/timer_heap.h" + +#define INVALID_HEAP_INDEX 0xffffffffu + +#define LOG2_NUM_SHARDS 5 +#define NUM_SHARDS (1 << LOG2_NUM_SHARDS) +#define ADD_DEADLINE_SCALE 0.33 +#define MIN_QUEUE_WINDOW_DURATION 0.01 +#define MAX_QUEUE_WINDOW_DURATION 1 + +typedef struct { + gpr_mu mu; + grpc_time_averaged_stats stats; + /* All and only timers with deadlines <= this will be in the heap. */ + gpr_timespec queue_deadline_cap; + gpr_timespec min_deadline; + /* Index in the g_shard_queue */ + uint32_t shard_queue_index; + /* This holds all timers with deadlines < queue_deadline_cap. Timers in this + list have the top bit of their deadline set to 0. */ + grpc_timer_heap heap; + /* This holds timers whose deadline is >= queue_deadline_cap. */ + grpc_timer list; +} shard_type; + +/* Protects g_shard_queue */ +static gpr_mu g_mu; +/* Allow only one run_some_expired_timers at once */ +static gpr_mu g_checker_mu; +static gpr_clock_type g_clock_type; +static shard_type g_shards[NUM_SHARDS]; +/* Protected by g_mu */ +static shard_type *g_shard_queue[NUM_SHARDS]; +static bool g_initialized = false; + +static int run_some_expired_timers(grpc_exec_ctx *exec_ctx, gpr_timespec now, + gpr_timespec *next, grpc_error *error); + +static gpr_timespec compute_min_deadline(shard_type *shard) { + return grpc_timer_heap_is_empty(&shard->heap) + ? shard->queue_deadline_cap + : grpc_timer_heap_top(&shard->heap)->deadline; +} + +void grpc_timer_list_init(gpr_timespec now) { + uint32_t i; + + g_initialized = true; + gpr_mu_init(&g_mu); + gpr_mu_init(&g_checker_mu); + g_clock_type = now.clock_type; + + for (i = 0; i < NUM_SHARDS; i++) { + shard_type *shard = &g_shards[i]; + gpr_mu_init(&shard->mu); + grpc_time_averaged_stats_init(&shard->stats, 1.0 / ADD_DEADLINE_SCALE, 0.1, + 0.5); + shard->queue_deadline_cap = now; + shard->shard_queue_index = i; + grpc_timer_heap_init(&shard->heap); + shard->list.next = shard->list.prev = &shard->list; + shard->min_deadline = compute_min_deadline(shard); + g_shard_queue[i] = shard; + } +} + +void grpc_timer_list_shutdown(grpc_exec_ctx *exec_ctx) { + int i; + run_some_expired_timers(exec_ctx, gpr_inf_future(g_clock_type), NULL, + GRPC_ERROR_CREATE("Timer list shutdown")); + for (i = 0; i < NUM_SHARDS; i++) { + shard_type *shard = &g_shards[i]; + gpr_mu_destroy(&shard->mu); + grpc_timer_heap_destroy(&shard->heap); + } + gpr_mu_destroy(&g_mu); + gpr_mu_destroy(&g_checker_mu); + g_initialized = false; +} + +/* This is a cheap, but good enough, pointer hash for sharding the tasks: */ +static size_t shard_idx(const grpc_timer *info) { + size_t x = (size_t)info; + return ((x >> 4) ^ (x >> 9) ^ (x >> 14)) & (NUM_SHARDS - 1); +} + +static double ts_to_dbl(gpr_timespec ts) { + return (double)ts.tv_sec + 1e-9 * ts.tv_nsec; +} + +static gpr_timespec dbl_to_ts(double d) { + gpr_timespec ts; + ts.tv_sec = (int64_t)d; + ts.tv_nsec = (int32_t)(1e9 * (d - (double)ts.tv_sec)); + ts.clock_type = GPR_TIMESPAN; + return ts; +} + +static void list_join(grpc_timer *head, grpc_timer *timer) { + timer->next = head; + timer->prev = head->prev; + timer->next->prev = timer->prev->next = timer; +} + +static void list_remove(grpc_timer *timer) { + timer->next->prev = timer->prev; + timer->prev->next = timer->next; +} + +static void swap_adjacent_shards_in_queue(uint32_t first_shard_queue_index) { + shard_type *temp; + temp = g_shard_queue[first_shard_queue_index]; + g_shard_queue[first_shard_queue_index] = + g_shard_queue[first_shard_queue_index + 1]; + g_shard_queue[first_shard_queue_index + 1] = temp; + g_shard_queue[first_shard_queue_index]->shard_queue_index = + first_shard_queue_index; + g_shard_queue[first_shard_queue_index + 1]->shard_queue_index = + first_shard_queue_index + 1; +} + +static void note_deadline_change(shard_type *shard) { + while (shard->shard_queue_index > 0 && + gpr_time_cmp( + shard->min_deadline, + g_shard_queue[shard->shard_queue_index - 1]->min_deadline) < 0) { + swap_adjacent_shards_in_queue(shard->shard_queue_index - 1); + } + while (shard->shard_queue_index < NUM_SHARDS - 1 && + gpr_time_cmp( + shard->min_deadline, + g_shard_queue[shard->shard_queue_index + 1]->min_deadline) > 0) { + swap_adjacent_shards_in_queue(shard->shard_queue_index); + } +} + +void grpc_timer_init(grpc_exec_ctx *exec_ctx, grpc_timer *timer, + gpr_timespec deadline, grpc_iomgr_cb_func timer_cb, + void *timer_cb_arg, gpr_timespec now) { + int is_first_timer = 0; + shard_type *shard = &g_shards[shard_idx(timer)]; + GPR_ASSERT(deadline.clock_type == g_clock_type); + GPR_ASSERT(now.clock_type == g_clock_type); + grpc_closure_init(&timer->closure, timer_cb, timer_cb_arg); + timer->deadline = deadline; + timer->triggered = 0; + + if (!g_initialized) { + timer->triggered = 1; + grpc_exec_ctx_sched( + exec_ctx, &timer->closure, + GRPC_ERROR_CREATE("Attempt to create timer before initialization"), + NULL); + return; + } + + if (gpr_time_cmp(deadline, now) <= 0) { + timer->triggered = 1; + grpc_exec_ctx_sched(exec_ctx, &timer->closure, GRPC_ERROR_NONE, NULL); + return; + } + + /* TODO(ctiller): check deadline expired */ + + gpr_mu_lock(&shard->mu); + grpc_time_averaged_stats_add_sample(&shard->stats, + ts_to_dbl(gpr_time_sub(deadline, now))); + if (gpr_time_cmp(deadline, shard->queue_deadline_cap) < 0) { + is_first_timer = grpc_timer_heap_add(&shard->heap, timer); + } else { + timer->heap_index = INVALID_HEAP_INDEX; + list_join(&shard->list, timer); + } + gpr_mu_unlock(&shard->mu); + + /* Deadline may have decreased, we need to adjust the master queue. Note + that there is a potential racy unlocked region here. There could be a + reordering of multiple grpc_timer_init calls, at this point, but the < test + below should ensure that we err on the side of caution. There could + also be a race with grpc_timer_check, which might beat us to the lock. In + that case, it is possible that the timer that we added will have already + run by the time we hold the lock, but that too is a safe error. + Finally, it's possible that the grpc_timer_check that intervened failed to + trigger the new timer because the min_deadline hadn't yet been reduced. + In that case, the timer will simply have to wait for the next + grpc_timer_check. */ + if (is_first_timer) { + gpr_mu_lock(&g_mu); + if (gpr_time_cmp(deadline, shard->min_deadline) < 0) { + gpr_timespec old_min_deadline = g_shard_queue[0]->min_deadline; + shard->min_deadline = deadline; + note_deadline_change(shard); + if (shard->shard_queue_index == 0 && + gpr_time_cmp(deadline, old_min_deadline) < 0) { + grpc_kick_poller(); + } + } + gpr_mu_unlock(&g_mu); + } +} + +void grpc_timer_cancel(grpc_exec_ctx *exec_ctx, grpc_timer *timer) { + if (!g_initialized) { + /* must have already been cancelled, also the shard mutex is invalid */ + return; + } + + shard_type *shard = &g_shards[shard_idx(timer)]; + gpr_mu_lock(&shard->mu); + if (!timer->triggered) { + grpc_exec_ctx_sched(exec_ctx, &timer->closure, GRPC_ERROR_CANCELLED, NULL); + timer->triggered = 1; + if (timer->heap_index == INVALID_HEAP_INDEX) { + list_remove(timer); + } else { + grpc_timer_heap_remove(&shard->heap, timer); + } + } + gpr_mu_unlock(&shard->mu); +} + +/* This is called when the queue is empty and "now" has reached the + queue_deadline_cap. We compute a new queue deadline and then scan the map + for timers that fall at or under it. Returns true if the queue is no + longer empty. + REQUIRES: shard->mu locked */ +static int refill_queue(shard_type *shard, gpr_timespec now) { + /* Compute the new queue window width and bound by the limits: */ + double computed_deadline_delta = + grpc_time_averaged_stats_update_average(&shard->stats) * + ADD_DEADLINE_SCALE; + double deadline_delta = + GPR_CLAMP(computed_deadline_delta, MIN_QUEUE_WINDOW_DURATION, + MAX_QUEUE_WINDOW_DURATION); + grpc_timer *timer, *next; + + /* Compute the new cap and put all timers under it into the queue: */ + shard->queue_deadline_cap = gpr_time_add( + gpr_time_max(now, shard->queue_deadline_cap), dbl_to_ts(deadline_delta)); + for (timer = shard->list.next; timer != &shard->list; timer = next) { + next = timer->next; + + if (gpr_time_cmp(timer->deadline, shard->queue_deadline_cap) < 0) { + list_remove(timer); + grpc_timer_heap_add(&shard->heap, timer); + } + } + return !grpc_timer_heap_is_empty(&shard->heap); +} + +/* This pops the next non-cancelled timer with deadline <= now from the + queue, or returns NULL if there isn't one. + REQUIRES: shard->mu locked */ +static grpc_timer *pop_one(shard_type *shard, gpr_timespec now) { + grpc_timer *timer; + for (;;) { + if (grpc_timer_heap_is_empty(&shard->heap)) { + if (gpr_time_cmp(now, shard->queue_deadline_cap) < 0) return NULL; + if (!refill_queue(shard, now)) return NULL; + } + timer = grpc_timer_heap_top(&shard->heap); + if (gpr_time_cmp(timer->deadline, now) > 0) return NULL; + timer->triggered = 1; + grpc_timer_heap_pop(&shard->heap); + return timer; + } +} + +/* REQUIRES: shard->mu unlocked */ +static size_t pop_timers(grpc_exec_ctx *exec_ctx, shard_type *shard, + gpr_timespec now, gpr_timespec *new_min_deadline, + grpc_error *error) { + size_t n = 0; + grpc_timer *timer; + gpr_mu_lock(&shard->mu); + while ((timer = pop_one(shard, now))) { + grpc_exec_ctx_sched(exec_ctx, &timer->closure, GRPC_ERROR_REF(error), NULL); + n++; + } + *new_min_deadline = compute_min_deadline(shard); + gpr_mu_unlock(&shard->mu); + return n; +} + +static int run_some_expired_timers(grpc_exec_ctx *exec_ctx, gpr_timespec now, + gpr_timespec *next, grpc_error *error) { + size_t n = 0; + + /* TODO(ctiller): verify that there are any timers (atomically) here */ + + if (gpr_mu_trylock(&g_checker_mu)) { + gpr_mu_lock(&g_mu); + + while (gpr_time_cmp(g_shard_queue[0]->min_deadline, now) < 0) { + gpr_timespec new_min_deadline; + + /* For efficiency, we pop as many available timers as we can from the + shard. This may violate perfect timer deadline ordering, but that + shouldn't be a big deal because we don't make ordering guarantees. */ + n += + pop_timers(exec_ctx, g_shard_queue[0], now, &new_min_deadline, error); + + /* An grpc_timer_init() on the shard could intervene here, adding a new + timer that is earlier than new_min_deadline. However, + grpc_timer_init() will block on the master_lock before it can call + set_min_deadline, so this one will complete first and then the Addtimer + will reduce the min_deadline (perhaps unnecessarily). */ + g_shard_queue[0]->min_deadline = new_min_deadline; + note_deadline_change(g_shard_queue[0]); + } + + if (next) { + *next = gpr_time_min(*next, g_shard_queue[0]->min_deadline); + } + + gpr_mu_unlock(&g_mu); + gpr_mu_unlock(&g_checker_mu); + } else if (next != NULL) { + /* TODO(ctiller): this forces calling code to do an short poll, and + then retry the timer check (because this time through the timer list was + contended). + + We could reduce the cost here dramatically by keeping a count of how many + currently active pollers got through the uncontended case above + successfully, and waking up other pollers IFF that count drops to zero. + + Once that count is in place, this entire else branch could disappear. */ + *next = gpr_time_min( + *next, gpr_time_add(now, gpr_time_from_millis(1, GPR_TIMESPAN))); + } + + GRPC_ERROR_UNREF(error); + + return (int)n; +} + +bool grpc_timer_check(grpc_exec_ctx *exec_ctx, gpr_timespec now, + gpr_timespec *next) { + GPR_ASSERT(now.clock_type == g_clock_type); + return run_some_expired_timers( + exec_ctx, now, next, + gpr_time_cmp(now, gpr_inf_future(now.clock_type)) != 0 + ? GRPC_ERROR_NONE + : GRPC_ERROR_CREATE("Shutting down timer system")); +} + +#endif /* GRPC_TIMER_USE_GENERIC */ diff --git a/src/core/lib/iomgr/timer_generic.h b/src/core/lib/iomgr/timer_generic.h new file mode 100644 index 0000000000..e4494adb5f --- /dev/null +++ b/src/core/lib/iomgr/timer_generic.h @@ -0,0 +1,49 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#ifndef GRPC_CORE_LIB_IOMGR_TIMER_GENERIC_H +#define GRPC_CORE_LIB_IOMGR_TIMER_GENERIC_H + +#include +#include "src/core/lib/iomgr/exec_ctx.h" + +struct grpc_timer { + gpr_timespec deadline; + uint32_t heap_index; /* INVALID_HEAP_INDEX if not in heap */ + int triggered; + struct grpc_timer *next; + struct grpc_timer *prev; + grpc_closure closure; +}; + +#endif /* GRPC_CORE_LIB_IOMGR_TIMER_GENERIC_H */ diff --git a/src/core/lib/iomgr/timer_heap.c b/src/core/lib/iomgr/timer_heap.c index 2ad9bb9cd2..f736d335e6 100644 --- a/src/core/lib/iomgr/timer_heap.c +++ b/src/core/lib/iomgr/timer_heap.c @@ -31,6 +31,10 @@ * */ +#include "src/core/lib/iomgr/port.h" + +#ifdef GRPC_TIMER_USE_GENERIC + #include "src/core/lib/iomgr/timer_heap.h" #include @@ -144,3 +148,5 @@ grpc_timer *grpc_timer_heap_top(grpc_timer_heap *heap) { void grpc_timer_heap_pop(grpc_timer_heap *heap) { grpc_timer_heap_remove(heap, grpc_timer_heap_top(heap)); } + +#endif /* GRPC_TIMER_USE_GENERIC */ diff --git a/src/core/lib/iomgr/timer_uv.c b/src/core/lib/iomgr/timer_uv.c new file mode 100644 index 0000000000..ffeb08cb79 --- /dev/null +++ b/src/core/lib/iomgr/timer_uv.c @@ -0,0 +1,103 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include "src/core/lib/iomgr/port.h" + +#if GRPC_UV + +#include +#include + +#include "src/core/lib/iomgr/timer.h" + +#include + +static void timer_close_callback(uv_handle_t *handle) { + gpr_free(handle); +} + +static void stop_uv_timer(uv_timer_t *handle) { + uv_timer_stop(handle); + uv_unref((uv_handle_t*) handle); + gpr_log(GPR_DEBUG, "Closing uv_timer_t handle %p", handle); + uv_close((uv_handle_t*) handle, timer_close_callback); +} + +void run_expired_timer(uv_timer_t *handle) { + grpc_timer *timer = (grpc_timer*)handle->data; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + gpr_log(GPR_DEBUG, "Timer callback: %p", timer); + GPR_ASSERT(!timer->triggered); + timer->triggered = 1; + grpc_exec_ctx_sched(&exec_ctx, &timer->closure, GRPC_ERROR_NONE, NULL); + stop_uv_timer(handle); + grpc_exec_ctx_finish(&exec_ctx); +} + +void grpc_timer_init(grpc_exec_ctx *exec_ctx, grpc_timer *timer, + gpr_timespec deadline, grpc_iomgr_cb_func timer_cb, + void *timer_cb_arg, gpr_timespec now) { + uint64_t timeout; + grpc_closure_init(&timer->closure, timer_cb, timer_cb_arg); + if (gpr_time_cmp(deadline, now) <= 0) { + timer->triggered = 1; + grpc_exec_ctx_sched(exec_ctx, &timer->closure, GRPC_ERROR_NONE, NULL); + return; + } + timer->triggered = 0; + timeout = (uint64_t)gpr_time_to_millis(gpr_time_sub(deadline, now)); + gpr_log(GPR_DEBUG, "Setting timer %p: %lu", timer, timeout); + timer->uv_timer = gpr_malloc(sizeof(uv_timer_t)); + uv_timer_init(uv_default_loop(), timer->uv_timer); + timer->uv_timer->data = timer; + uv_timer_start(timer->uv_timer, run_expired_timer, timeout, 0); +} + +void grpc_timer_cancel(grpc_exec_ctx *exec_ctx, grpc_timer *timer) { + if (!timer->triggered) { + gpr_log(GPR_DEBUG, "Running cancelled timer callback"); + timer->triggered = 1; + grpc_exec_ctx_sched(exec_ctx, &timer->closure, GRPC_ERROR_CANCELLED, NULL); + stop_uv_timer(timer->uv_timer); + } +} + +bool grpc_timer_check(grpc_exec_ctx *exec_ctx, gpr_timespec now, + gpr_timespec *next) { + return false; +} + +void grpc_timer_list_init(gpr_timespec now) {} +void grpc_timer_list_shutdown(grpc_exec_ctx *exec_ctx) {} + +#endif /* GRPC_UV */ diff --git a/src/core/lib/iomgr/timer_uv.h b/src/core/lib/iomgr/timer_uv.h new file mode 100644 index 0000000000..d78d6a6ca2 --- /dev/null +++ b/src/core/lib/iomgr/timer_uv.h @@ -0,0 +1,47 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#ifndef GRPC_CORE_LIB_IOMGR_TIMER_GENERIC_H +#define GRPC_CORE_LIB_IOMGR_TIMER_GENERIC_H + +#include + +#include "src/core/lib/iomgr/exec_ctx.h" + +struct grpc_timer { + grpc_closure closure; + uv_timer_t *uv_timer; + int triggered; +}; + +#endif /* GRPC_CORE_LIB_IOMGR_TIMER_GENERIC_H */ diff --git a/src/core/lib/iomgr/workqueue_uv.c b/src/core/lib/iomgr/workqueue_uv.c new file mode 100644 index 0000000000..5e4eb504ac --- /dev/null +++ b/src/core/lib/iomgr/workqueue_uv.c @@ -0,0 +1,62 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include "src/core/lib/iomgr/port.h" + +#ifdef GRPC_UV + +#include "src/core/lib/iomgr/workqueue.h" + +// Minimal implementation of grpc_workqueue for libuv +// Works by directly enqueuing workqueue items onto the current execution +// context, which is at least correct, if not performant or in the spirit of +// workqueues. + +void grpc_workqueue_flush(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue) {} + +#ifdef GRPC_WORKQUEUE_REFCOUNT_DEBUG +void grpc_workqueue_ref(grpc_workqueue *workqueue, const char *file, int line, + const char *reason) {} +void grpc_workqueue_unref(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, + const char *file, int line, const char *reason) {} +#else +void grpc_workqueue_ref(grpc_workqueue *workqueue) {} +void grpc_workqueue_unref(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue) {} +#endif + +void grpc_workqueue_enqueue(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, + grpc_closure *closure, grpc_error *error) { + grpc_exec_ctx_sched(exec_ctx, closure, error, NULL); +} + +#endif /* GPR_UV */ diff --git a/src/core/lib/iomgr/workqueue_uv.h b/src/core/lib/iomgr/workqueue_uv.h new file mode 100644 index 0000000000..be3f8e4d93 --- /dev/null +++ b/src/core/lib/iomgr/workqueue_uv.h @@ -0,0 +1,37 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#ifndef GRPC_CORE_LIB_IOMGR_WORKQUEUE_UV_H +#define GRPC_CORE_LIB_IOMGR_WORKQUEUE_UV_H + +#endif /* GRPC_CORE_LIB_IOMGR_WORKQUEUE_UV_H */ diff --git a/src/core/lib/security/context/security_context.c b/src/core/lib/security/context/security_context.c index 127b13ee50..874cc05455 100644 --- a/src/core/lib/security/context/security_context.c +++ b/src/core/lib/security/context/security_context.c @@ -31,6 +31,11 @@ * */ +/* We currently need this at the top of the file if we import some iomgr + headers because if we are building with libuv, those headers will include + uv.h, which needs to be included before other system headers */ +#include "src/core/lib/iomgr/port.h" + #include #include "src/core/lib/security/context/security_context.h" diff --git a/src/core/lib/security/context/security_context.h b/src/core/lib/security/context/security_context.h index 4e7666dfe3..b48d1d0ab7 100644 --- a/src/core/lib/security/context/security_context.h +++ b/src/core/lib/security/context/security_context.h @@ -34,6 +34,11 @@ #ifndef GRPC_CORE_LIB_SECURITY_CONTEXT_SECURITY_CONTEXT_H #define GRPC_CORE_LIB_SECURITY_CONTEXT_SECURITY_CONTEXT_H +/* We currently need this at the top of the file if we import some iomgr + headers because if we are building with libuv, those headers will include + uv.h, which needs to be included before other system headers */ +#include "src/core/lib/iomgr/port.h" + #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/security/credentials/credentials.h" diff --git a/src/core/lib/security/credentials/credentials.h b/src/core/lib/security/credentials/credentials.h index 8e9d842ead..bfdfcb6761 100644 --- a/src/core/lib/security/credentials/credentials.h +++ b/src/core/lib/security/credentials/credentials.h @@ -34,6 +34,11 @@ #ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_CREDENTIALS_H #define GRPC_CORE_LIB_SECURITY_CREDENTIALS_CREDENTIALS_H +/* We currently need this at the top of the file if we import some iomgr + headers because if we are building with libuv, those headers will include + uv.h, which needs to be included before other system headers */ +#include "src/core/lib/iomgr/port.h" + #include #include #include diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.c b/src/core/lib/security/credentials/oauth2/oauth2_credentials.c index c22ea5c468..e9638c5a22 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.c +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.c @@ -31,6 +31,11 @@ * */ +/* We currently need this at the top of the file if we import some iomgr + headers because if we are building with libuv, those headers will include + uv.h, which needs to be included before other system headers */ +#include "src/core/lib/iomgr/port.h" + #include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h" #include diff --git a/src/core/lib/security/transport/server_auth_filter.c b/src/core/lib/security/transport/server_auth_filter.c index def16c8229..3339c0a3be 100644 --- a/src/core/lib/security/transport/server_auth_filter.c +++ b/src/core/lib/security/transport/server_auth_filter.c @@ -31,6 +31,11 @@ * */ +/* We currently need this at the top of the file if we import some iomgr + headers because if we are building with libuv, those headers will include + uv.h, which needs to be included before other system headers */ +#include "src/core/lib/iomgr/port.h" + #include #include "src/core/lib/security/context/security_context.h" diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 772681109a..6a38b4b427 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -30,6 +30,12 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ + +/* We currently need this at the top of the file if we import some iomgr + headers because if we are building with libuv, those headers will include + uv.h, which needs to be included before other system headers */ +#include "src/core/lib/iomgr/port.h" + #include #include #include diff --git a/src/core/lib/surface/init_secure.c b/src/core/lib/surface/init_secure.c index 7ee7b51568..9a9342ff2c 100644 --- a/src/core/lib/surface/init_secure.c +++ b/src/core/lib/surface/init_secure.c @@ -31,6 +31,11 @@ * */ +/* We currently need this at the top of the file if we import some iomgr + headers because if we are building with libuv, those headers will include + uv.h, which needs to be included before other system headers */ +#include "src/core/lib/iomgr/port.h" + #include "src/core/lib/surface/init.h" #include diff --git a/src/core/lib/tsi/ssl_transport_security.c b/src/core/lib/tsi/ssl_transport_security.c index f6e8c518e3..116b66a179 100644 --- a/src/core/lib/tsi/ssl_transport_security.c +++ b/src/core/lib/tsi/ssl_transport_security.c @@ -31,6 +31,11 @@ * */ +/* We currently need this at the top of the file if we import some iomgr + headers because if we are building with libuv, those headers will include + uv.h, which needs to be included before other system headers */ +#include "src/core/lib/iomgr/port.h" + #include "src/core/lib/tsi/ssl_transport_security.h" #include "src/core/lib/iomgr/socket_utils.h" diff --git a/src/node/ext/call.cc b/src/node/ext/call.cc index 9f023b5883..b48a7bd698 100644 --- a/src/node/ext/call.cc +++ b/src/node/ext/call.cc @@ -45,6 +45,7 @@ #include "byte_buffer.h" #include "call.h" #include "channel.h" +#include "completion_queue.h" #include "completion_queue_async_worker.h" #include "call_credentials.h" #include "timeval.h" @@ -222,6 +223,9 @@ class SendMetadataOp : public Op { out->data.send_initial_metadata.metadata = array.metadata; return true; } + bool IsFinalOp() { + return false; + } protected: std::string GetTypeString() const { return "send_metadata"; @@ -263,6 +267,9 @@ class SendMessageOp : public Op { resources->handles.push_back(unique_ptr(handle)); return true; } + bool IsFinalOp() { + return false; + } protected: std::string GetTypeString() const { return "send_message"; @@ -281,6 +288,9 @@ class SendClientCloseOp : public Op { shared_ptr resources) { return true; } + bool IsFinalOp() { + return false; + } protected: std::string GetTypeString() const { return "client_close"; @@ -341,6 +351,9 @@ class SendServerStatusOp : public Op { out->data.send_status_from_server.status_details = **str; return true; } + bool IsFinalOp() { + return true; + } protected: std::string GetTypeString() const { return "send_status"; @@ -367,6 +380,9 @@ class GetMetadataOp : public Op { out->data.recv_initial_metadata = &recv_metadata; return true; } + bool IsFinalOp() { + return false; + } protected: std::string GetTypeString() const { @@ -397,6 +413,9 @@ class ReadMessageOp : public Op { out->data.recv_message = &recv_message; return true; } + bool IsFinalOp() { + return false; + } protected: std::string GetTypeString() const { @@ -442,6 +461,9 @@ class ClientStatusOp : public Op { ParseMetadata(&metadata_array)); return scope.Escape(status_obj); } + bool IsFinalOp() { + return true; + } protected: std::string GetTypeString() const { return "status"; @@ -465,6 +487,9 @@ class ServerCloseResponseOp : public Op { out->data.recv_close_on_server.cancelled = &cancelled; return true; } + bool IsFinalOp() { + return false; + } protected: std::string GetTypeString() const { @@ -476,8 +501,8 @@ class ServerCloseResponseOp : public Op { }; tag::tag(Callback *callback, OpVec *ops, - shared_ptr resources) : - callback(callback), ops(ops), resources(resources){ + shared_ptr resources, Call *call) : + callback(callback), ops(ops), resources(resources), call(call){ } tag::~tag() { @@ -502,16 +527,36 @@ Callback *GetTagCallback(void *tag) { return tag_struct->callback; } +void CompleteTag(void *tag) { + struct tag *tag_struct = reinterpret_cast(tag); + bool is_final_op = false; + if (tag_struct->call == NULL) { + return; + } + for (vector >::iterator it = tag_struct->ops->begin(); + it != tag_struct->ops->end(); ++it) { + Op *op_ptr = it->get(); + if (op_ptr->IsFinalOp()) { + is_final_op = true; + } + } + tag_struct->call->CompleteBatch(is_final_op); +} + void DestroyTag(void *tag) { struct tag *tag_struct = reinterpret_cast(tag); delete tag_struct; } -Call::Call(grpc_call *call) : wrapped_call(call) { +Call::Call(grpc_call *call) : wrapped_call(call), + pending_batches(0), + has_final_op_completed(false) { } Call::~Call() { - grpc_call_destroy(wrapped_call); + if (wrapped_call != NULL) { + grpc_call_destroy(wrapped_call); + } } void Call::Init(Local exports) { @@ -552,6 +597,17 @@ Local Call::WrapStruct(grpc_call *call) { } } +void Call::CompleteBatch(bool is_final_op) { + if (is_final_op) { + this->has_final_op_completed = true; + } + this->pending_batches--; + if (this->has_final_op_completed && this->pending_batches == 0) { + grpc_call_destroy(this->wrapped_call); + this->wrapped_call = NULL; + } +} + NAN_METHOD(Call::New) { if (info.IsConstructCall()) { Call *call; @@ -602,12 +658,12 @@ NAN_METHOD(Call::New) { Utf8String host_override(info[3]); wrapped_call = grpc_channel_create_call( wrapped_channel, parent_call, propagate_flags, - CompletionQueueAsyncWorker::GetQueue(), *method, + GetCompletionQueue(), *method, *host_override, MillisecondsToTimespec(deadline), NULL); } else if (info[3]->IsUndefined() || info[3]->IsNull()) { wrapped_call = grpc_channel_create_call( wrapped_channel, parent_call, propagate_flags, - CompletionQueueAsyncWorker::GetQueue(), *method, + GetCompletionQueue(), *method, NULL, MillisecondsToTimespec(deadline), NULL); } else { return Nan::ThrowTypeError("Call's fourth argument must be a string"); @@ -697,11 +753,12 @@ NAN_METHOD(Call::StartBatch) { Callback *callback = new Callback(callback_func); grpc_call_error error = grpc_call_start_batch( call->wrapped_call, &ops[0], nops, new struct tag( - callback, op_vector.release(), resources), NULL); + callback, op_vector.release(), resources, call), NULL); if (error != GRPC_CALL_OK) { return Nan::ThrowError(nanErrorWithCode("startBatch failed", error)); } - CompletionQueueAsyncWorker::Next(); + call->pending_batches++; + CompletionQueueNext(); } NAN_METHOD(Call::Cancel) { diff --git a/src/node/ext/call.h b/src/node/ext/call.h index 1e3c3ba18d..31c6566d14 100644 --- a/src/node/ext/call.h +++ b/src/node/ext/call.h @@ -66,34 +66,6 @@ bool CreateMetadataArray(v8::Local metadata, grpc_metadata_array *array, shared_ptr resources); -class Op { - public: - virtual v8::Local GetNodeValue() const = 0; - virtual bool ParseOp(v8::Local value, grpc_op *out, - shared_ptr resources) = 0; - virtual ~Op(); - v8::Local GetOpType() const; - - protected: - virtual std::string GetTypeString() const = 0; -}; - -typedef std::vector> OpVec; -struct tag { - tag(Nan::Callback *callback, OpVec *ops, - shared_ptr resources); - ~tag(); - Nan::Callback *callback; - OpVec *ops; - shared_ptr resources; -}; - -v8::Local GetTagNodeValue(void *tag); - -Nan::Callback *GetTagCallback(void *tag); - -void DestroyTag(void *tag); - /* Wrapper class for grpc_call structs. */ class Call : public Nan::ObjectWrap { public: @@ -102,6 +74,8 @@ class Call : public Nan::ObjectWrap { /* Wrap a grpc_call struct in a javascript object */ static v8::Local WrapStruct(grpc_call *call); + void CompleteBatch(bool is_final_op); + private: explicit Call(grpc_call *call); ~Call(); @@ -121,8 +95,46 @@ class Call : public Nan::ObjectWrap { static Nan::Persistent fun_tpl; grpc_call *wrapped_call; + // The number of ops that were started but not completed on this call + int pending_batches; + /* Indicates whether the "final" op on a call has completed. For a client + call, this is GRPC_OP_RECV_STATUS_ON_CLIENT and for a server call, this + is GRPC_OP_SEND_STATUS_FROM_SERVER */ + bool has_final_op_completed; }; +class Op { + public: + virtual v8::Local GetNodeValue() const = 0; + virtual bool ParseOp(v8::Local value, grpc_op *out, + shared_ptr resources) = 0; + virtual ~Op(); + v8::Local GetOpType() const; + virtual bool IsFinalOp() = 0; + + protected: + virtual std::string GetTypeString() const = 0; +}; + +typedef std::vector> OpVec; +struct tag { + tag(Nan::Callback *callback, OpVec *ops, + shared_ptr resources, Call *call); + ~tag(); + Nan::Callback *callback; + OpVec *ops; + shared_ptr resources; + Call *call; +}; + +v8::Local GetTagNodeValue(void *tag); + +Nan::Callback *GetTagCallback(void *tag); + +void DestroyTag(void *tag); + +void CompleteTag(void *tag); + } // namespace node } // namespace grpc diff --git a/src/node/ext/channel.cc b/src/node/ext/channel.cc index 00fcca6dc8..c4028170e7 100644 --- a/src/node/ext/channel.cc +++ b/src/node/ext/channel.cc @@ -41,6 +41,7 @@ #include "grpc/grpc_security.h" #include "call.h" #include "channel.h" +#include "completion_queue.h" #include "completion_queue_async_worker.h" #include "channel_credentials.h" #include "timeval.h" @@ -140,6 +141,7 @@ void DeallocateChannelArgs(grpc_channel_args *channel_args) { Channel::Channel(grpc_channel *channel) : wrapped_channel(channel) {} Channel::~Channel() { + gpr_log(GPR_DEBUG, "Destroying channel"); if (wrapped_channel != NULL) { grpc_channel_destroy(wrapped_channel); } @@ -276,11 +278,11 @@ NAN_METHOD(Channel::WatchConnectivityState) { unique_ptr ops(new OpVec()); grpc_channel_watch_connectivity_state( channel->wrapped_channel, last_state, MillisecondsToTimespec(deadline), - CompletionQueueAsyncWorker::GetQueue(), + GetCompletionQueue(), new struct tag(callback, ops.release(), - shared_ptr(nullptr))); - CompletionQueueAsyncWorker::Next(); + shared_ptr(nullptr), NULL)); + CompletionQueueNext(); } } // namespace node diff --git a/src/node/ext/completion_queue.cc b/src/node/ext/completion_queue.cc new file mode 100644 index 0000000000..fcfa77b39c --- /dev/null +++ b/src/node/ext/completion_queue.cc @@ -0,0 +1,114 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include +#include +#include +#include + +#include "call.h" +#include "completion_queue.h" +#include "completion_queue_async_worker.h" + +namespace grpc { +namespace node { + +using v8::Local; +using v8::Object; +using v8::Value; + +grpc_completion_queue *queue; +uv_prepare_t prepare; +int pending_batches; + +void drain_completion_queue(uv_prepare_t *handle) { + Nan::HandleScope scope; + grpc_event event; + (void)handle; + do { + event = grpc_completion_queue_next( + queue, gpr_inf_past(GPR_CLOCK_MONOTONIC), NULL); + + if (event.type == GRPC_OP_COMPLETE) { + Nan::Callback *callback = grpc::node::GetTagCallback(event.tag); + if (event.success) { + Local argv[] = {Nan::Null(), + grpc::node::GetTagNodeValue(event.tag)}; + callback->Call(2, argv); + } else { + Local argv[] = {Nan::Error( + "The async function encountered an error")}; + callback->Call(1, argv); + } + grpc::node::CompleteTag(event.tag); + grpc::node::DestroyTag(event.tag); + pending_batches--; + if (pending_batches == 0) { + uv_prepare_stop(&prepare); + } + } + } while (event.type != GRPC_QUEUE_TIMEOUT); +} + +grpc_completion_queue *GetCompletionQueue() { +#ifdef GRPC_UV + return queue; +#else + return CompletionQueueAsyncWorker::GetQueue(); +#endif +} + +void CompletionQueueNext() { +#ifdef GRPC_UV + if (pending_batches == 0) { + GPR_ASSERT(!uv_is_active((uv_handle_t *)&prepare)); + uv_prepare_start(&prepare, drain_completion_queue); + } + pending_batches++; +#else + CompletionQueueAsyncWorker::Next(); +#endif +} + +void CompletionQueueInit(Local exports) { +#ifdef GRPC_UV + queue = grpc_completion_queue_create(NULL); + uv_prepare_init(uv_default_loop(), &prepare); + pending_batches = 0; +#else + CompletionQueueAsyncWorker::Init(exports); +#endif +} + +} // namespace node +} // namespace grpc diff --git a/src/node/ext/completion_queue.h b/src/node/ext/completion_queue.h new file mode 100644 index 0000000000..bf280f768b --- /dev/null +++ b/src/node/ext/completion_queue.h @@ -0,0 +1,46 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include + +namespace grpc { +namespace node { + +grpc_completion_queue *GetCompletionQueue(); + +void CompletionQueueNext(); + +void CompletionQueueInit(v8::Local exports); + +} // namespace node +} // namespace grpc diff --git a/src/node/ext/completion_queue_async_worker.cc b/src/node/ext/completion_queue_async_worker.cc index 619ea41515..f5e03b277b 100644 --- a/src/node/ext/completion_queue_async_worker.cc +++ b/src/node/ext/completion_queue_async_worker.cc @@ -74,6 +74,7 @@ void CompletionQueueAsyncWorker::Execute() { grpc_completion_queue *CompletionQueueAsyncWorker::GetQueue() { return queue; } void CompletionQueueAsyncWorker::Next() { +#ifndef GRPC_UV Nan::HandleScope scope; if (current_threads < max_queue_threads) { current_threads += 1; @@ -85,6 +86,7 @@ void CompletionQueueAsyncWorker::Next() { GPR_ASSERT(current_threads <= max_queue_threads); GPR_ASSERT((current_threads == max_queue_threads) || (waiting_next_calls == 0)); +#endif } void CompletionQueueAsyncWorker::Init(Local exports) { diff --git a/src/node/ext/node_grpc.cc b/src/node/ext/node_grpc.cc index 745b5023d5..a246a8c678 100644 --- a/src/node/ext/node_grpc.cc +++ b/src/node/ext/node_grpc.cc @@ -50,6 +50,7 @@ #include "completion_queue_async_worker.h" #include "server_credentials.h" #include "timeval.h" +#include "completion_queue.h" using v8::FunctionTemplate; using v8::Local; @@ -261,8 +262,8 @@ void InitLogConstants(Local exports) { Nan::HandleScope scope; Local log_verbosity = Nan::New(); Nan::Set(exports, Nan::New("logVerbosity").ToLocalChecked(), log_verbosity); - Local DEBUG(Nan::New(GPR_LOG_SEVERITY_DEBUG)); - Nan::Set(log_verbosity, Nan::New("DEBUG").ToLocalChecked(), DEBUG); + Local DEBUG_LOG(Nan::New(GPR_LOG_SEVERITY_DEBUG)); + Nan::Set(log_verbosity, Nan::New("DEBUG").ToLocalChecked(), DEBUG_LOG); Local INFO(Nan::New(GPR_LOG_SEVERITY_INFO)); Nan::Set(log_verbosity, Nan::New("INFO").ToLocalChecked(), INFO); Local LOG_ERROR(Nan::New(GPR_LOG_SEVERITY_ERROR)); @@ -414,6 +415,12 @@ NAN_METHOD(SetLogVerbosity) { gpr_set_log_verbosity(severity); } +uv_signal_t signal_handle; + +void signal_callback(uv_signal_t *handle, int signum) { + uv_print_all_handles(uv_default_loop(), stderr); +} + void init(Local exports) { Nan::HandleScope scope; grpc_init(); @@ -428,14 +435,20 @@ void init(Local exports) { InitWriteFlags(exports); InitLogConstants(exports); + uv_signal_init(uv_default_loop(), &signal_handle); + uv_signal_start(&signal_handle, signal_callback, SIGUSR2); + uv_unref((uv_handle_t *)&signal_handle); + + grpc::node::Call::Init(exports); grpc::node::CallCredentials::Init(exports); grpc::node::Channel::Init(exports); grpc::node::ChannelCredentials::Init(exports); grpc::node::Server::Init(exports); - grpc::node::CompletionQueueAsyncWorker::Init(exports); grpc::node::ServerCredentials::Init(exports); + grpc::node::CompletionQueueInit(exports); + // Attach a few utility functions directly to the module Nan::Set(exports, Nan::New("metadataKeyIsLegal").ToLocalChecked(), Nan::GetFunction( diff --git a/src/node/ext/server.cc b/src/node/ext/server.cc index dd1b777ac8..29f31ff15e 100644 --- a/src/node/ext/server.cc +++ b/src/node/ext/server.cc @@ -40,6 +40,7 @@ #include #include "call.h" +#include "completion_queue.h" #include "completion_queue_async_worker.h" #include "grpc/grpc.h" #include "grpc/grpc_security.h" @@ -64,6 +65,7 @@ using v8::Array; using v8::Boolean; using v8::Date; using v8::Exception; +using v8::External; using v8::Function; using v8::FunctionTemplate; using v8::Local; @@ -75,6 +77,8 @@ using v8::Value; Nan::Callback *Server::constructor; Persistent Server::fun_tpl; +static Callback *shutdown_callback; + class NewCallOp : public Op { public: NewCallOp() { @@ -111,6 +115,9 @@ class NewCallOp : public Op { shared_ptr resources) { return true; } + bool IsFinalOp() { + return false; + } grpc_call *call; grpc_call_details details; @@ -120,17 +127,50 @@ class NewCallOp : public Op { std::string GetTypeString() const { return "new_call"; } }; +class ServerShutdownOp : public Op { + public: + ServerShutdownOp(grpc_server *server): server(server) { + } + + ~ServerShutdownOp() { + } + + Local GetNodeValue() const { + return Nan::New(reinterpret_cast(server)); + } + + bool ParseOp(Local value, grpc_op *out, + shared_ptr resources) { + return true; + } + bool IsFinalOp() { + return false; + } + + grpc_server *server; + + protected: + std::string GetTypeString() const { return "shutdown"; } +}; + +NAN_METHOD(ServerShutdownCallback) { + if (!info[0]->IsNull()) { + return Nan::ThrowError("forceShutdown failed somehow"); + } + MaybeLocal maybe_result = Nan::To(info[1]); + Local result = maybe_result.ToLocalChecked(); + Local server_val = Nan::Get( + result, Nan::New("shutdown").ToLocalChecked()).ToLocalChecked(); + Local server_extern = server_val.As(); + grpc_server *server = reinterpret_cast(server_extern->Value()); + grpc_server_destroy(server); +} + Server::Server(grpc_server *server) : wrapped_server(server) { - shutdown_queue = grpc_completion_queue_create(NULL); - grpc_server_register_non_listening_completion_queue(server, shutdown_queue, - NULL); } Server::~Server() { this->ShutdownServer(); - grpc_completion_queue_shutdown(this->shutdown_queue); - grpc_server_destroy(this->wrapped_server); - grpc_completion_queue_destroy(this->shutdown_queue); } void Server::Init(Local exports) { @@ -147,6 +187,11 @@ void Server::Init(Local exports) { Local ctr = Nan::GetFunction(tpl).ToLocalChecked(); Nan::Set(exports, Nan::New("Server").ToLocalChecked(), ctr); constructor = new Callback(ctr); + + Localcallback_tpl = + Nan::New(ServerShutdownCallback); + shutdown_callback = new Callback( + Nan::GetFunction(callback_tpl).ToLocalChecked()); } bool Server::HasInstance(Local val) { @@ -155,11 +200,19 @@ bool Server::HasInstance(Local val) { } void Server::ShutdownServer() { - grpc_server_shutdown_and_notify(this->wrapped_server, this->shutdown_queue, - NULL); - grpc_server_cancel_all_calls(this->wrapped_server); - grpc_completion_queue_pluck(this->shutdown_queue, NULL, - gpr_inf_future(GPR_CLOCK_REALTIME), NULL); + if (this->wrapped_server != NULL) { + ServerShutdownOp *op = new ServerShutdownOp(this->wrapped_server); + unique_ptr ops(new OpVec()); + ops->push_back(unique_ptr(op)); + + grpc_server_shutdown_and_notify( + this->wrapped_server, GetCompletionQueue(), + new struct tag(new Callback(**shutdown_callback), ops.release(), + shared_ptr(nullptr), NULL)); + grpc_server_cancel_all_calls(this->wrapped_server); + CompletionQueueNext(); + this->wrapped_server = NULL; + } } NAN_METHOD(Server::New) { @@ -179,7 +232,7 @@ NAN_METHOD(Server::New) { } } grpc_server *wrapped_server; - grpc_completion_queue *queue = CompletionQueueAsyncWorker::GetQueue(); + grpc_completion_queue *queue = GetCompletionQueue(); grpc_channel_args *channel_args; if (!ParseChannelArgs(info[0], &channel_args)) { DeallocateChannelArgs(channel_args); @@ -205,14 +258,14 @@ NAN_METHOD(Server::RequestCall) { ops->push_back(unique_ptr(op)); grpc_call_error error = grpc_server_request_call( server->wrapped_server, &op->call, &op->details, &op->request_metadata, - CompletionQueueAsyncWorker::GetQueue(), - CompletionQueueAsyncWorker::GetQueue(), + GetCompletionQueue(), + GetCompletionQueue(), new struct tag(new Callback(info[0].As()), ops.release(), - shared_ptr(nullptr))); + shared_ptr(nullptr), NULL)); if (error != GRPC_CALL_OK) { return Nan::ThrowError(nanErrorWithCode("requestCall failed", error)); } - CompletionQueueAsyncWorker::Next(); + CompletionQueueNext(); } NAN_METHOD(Server::AddHttp2Port) { @@ -259,10 +312,10 @@ NAN_METHOD(Server::TryShutdown) { Server *server = ObjectWrap::Unwrap(info.This()); unique_ptr ops(new OpVec()); grpc_server_shutdown_and_notify( - server->wrapped_server, CompletionQueueAsyncWorker::GetQueue(), + server->wrapped_server, GetCompletionQueue(), new struct tag(new Nan::Callback(info[0].As()), ops.release(), - shared_ptr(nullptr))); - CompletionQueueAsyncWorker::Next(); + shared_ptr(nullptr), NULL)); + CompletionQueueNext(); } NAN_METHOD(Server::ForceShutdown) { diff --git a/src/node/ext/server.h b/src/node/ext/server.h index ab5fc210e8..9e6a7bd1e0 100644 --- a/src/node/ext/server.h +++ b/src/node/ext/server.h @@ -73,7 +73,6 @@ class Server : public Nan::ObjectWrap { static Nan::Persistent fun_tpl; grpc_server *wrapped_server; - grpc_completion_queue *shutdown_queue; }; } // namespace node diff --git a/src/node/ext/server_credentials.cc b/src/node/ext/server_credentials.cc index a817ade518..0ff58bb209 100644 --- a/src/node/ext/server_credentials.cc +++ b/src/node/ext/server_credentials.cc @@ -169,18 +169,18 @@ NAN_METHOD(ServerCredentials::CreateSsl) { for(uint32_t i = 0; i < key_cert_pair_count; i++) { Local pair_val = Nan::Get(pair_list, i).ToLocalChecked(); if (!pair_val->IsObject()) { - delete key_cert_pairs; + delete[] key_cert_pairs; return Nan::ThrowTypeError("Key/cert pairs must be objects"); } Local pair_obj = Nan::To(pair_val).ToLocalChecked(); Local maybe_key = Nan::Get(pair_obj, key_key).ToLocalChecked(); Local maybe_cert = Nan::Get(pair_obj, cert_key).ToLocalChecked(); if (!::node::Buffer::HasInstance(maybe_key)) { - delete key_cert_pairs; + delete[] key_cert_pairs; return Nan::ThrowTypeError("private_key must be a Buffer"); } if (!::node::Buffer::HasInstance(maybe_cert)) { - delete key_cert_pairs; + delete[] key_cert_pairs; return Nan::ThrowTypeError("cert_chain must be a Buffer"); } key_cert_pairs[i].private_key = ::node::Buffer::Data(maybe_key); @@ -189,7 +189,7 @@ NAN_METHOD(ServerCredentials::CreateSsl) { grpc_server_credentials *creds = grpc_ssl_server_credentials_create_ex( root_certs, key_cert_pairs, key_cert_pair_count, client_certificate_request, NULL); - delete key_cert_pairs; + delete[] key_cert_pairs; if (creds == NULL) { info.GetReturnValue().SetNull(); } else { diff --git a/src/node/index.js b/src/node/index.js index 9fb6faa5d7..a294aad8ee 100644 --- a/src/node/index.js +++ b/src/node/index.js @@ -219,3 +219,7 @@ exports.getClientChannel = client.getClientChannel; * @see module:src/client.waitForClientReady */ exports.waitForClientReady = client.waitForClientReady; + +exports.closeClient = function closeClient(client_obj) { + client.getClientChannel(client_obj).close(); +}; diff --git a/src/node/src/client.js b/src/node/src/client.js index f75f951eb8..9c1562e8b8 100644 --- a/src/node/src/client.js +++ b/src/node/src/client.js @@ -382,6 +382,7 @@ function makeUnaryRequestFunction(method, serialize, deserialize) { if (args.options) { message.grpcWriteFlags = args.options.flags; } + client_batch[grpc.opType.SEND_INITIAL_METADATA] = metadata._getCoreRepresentation(); client_batch[grpc.opType.SEND_MESSAGE] = message; diff --git a/src/node/src/grpc_extension.js b/src/node/src/grpc_extension.js index 6a8fe2c03c..63a281ddbc 100644 --- a/src/node/src/grpc_extension.js +++ b/src/node/src/grpc_extension.js @@ -31,7 +31,7 @@ * */ -var binary = require('node-pre-gyp'); +var binary = require('node-pre-gyp/lib/pre-binding'); var path = require('path'); var binding_path = binary.find(path.resolve(path.join(__dirname, '../../../package.json'))); diff --git a/src/node/test/async_test.js b/src/node/test/async_test.js index c46e745116..7b467e5475 100644 --- a/src/node/test/async_test.js +++ b/src/node/test/async_test.js @@ -61,6 +61,7 @@ describe('Async functionality', function() { done(); }); after(function() { + grpc.closeClient(math_client); server.forceShutdown(); }); it('should not hang', function(done) { diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index ab7b461178..9fe0ef3c00 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -104,29 +104,38 @@ CORE_SOURCE_FILES = [ '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/load_file.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/sockaddr_utils.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_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.c', + 'src/core/lib/iomgr/timer_generic.c', 'src/core/lib/iomgr/timer_heap.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', @@ -135,6 +144,7 @@ CORE_SOURCE_FILES = [ 'src/core/lib/iomgr/wakeup_fd_pipe.c', 'src/core/lib/iomgr/wakeup_fd_posix.c', 'src/core/lib/iomgr/workqueue_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', diff --git a/templates/binding.gyp.template b/templates/binding.gyp.template index 40d430f792..e6592acebb 100644 --- a/templates/binding.gyp.template +++ b/templates/binding.gyp.template @@ -44,6 +44,9 @@ '.', 'include' ], + 'defines': [ + 'GRPC_UV' + ], 'conditions': [ ['OS == "win"', { "include_dirs": [ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 24c78091c7..fdda3c0a38 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -825,6 +825,7 @@ 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_windows.h \ +src/core/lib/iomgr/pollset_uv.h \ src/core/lib/iomgr/pollset_windows.h \ src/core/lib/iomgr/port.h \ src/core/lib/iomgr/resolve_address.h \ @@ -838,16 +839,20 @@ src/core/lib/iomgr/socket_windows.h \ src/core/lib/iomgr/tcp_client.h \ src/core/lib/iomgr/tcp_posix.h \ src/core/lib/iomgr/tcp_server.h \ +src/core/lib/iomgr/tcp_uv.h \ src/core/lib/iomgr/tcp_windows.h \ src/core/lib/iomgr/time_averaged_stats.h \ src/core/lib/iomgr/timer.h \ +src/core/lib/iomgr/timer_generic.h \ src/core/lib/iomgr/timer_heap.h \ +src/core/lib/iomgr/timer_uv.h \ src/core/lib/iomgr/udp_server.h \ src/core/lib/iomgr/unix_sockets_posix.h \ src/core/lib/iomgr/wakeup_fd_pipe.h \ src/core/lib/iomgr/wakeup_fd_posix.h \ src/core/lib/iomgr/workqueue.h \ src/core/lib/iomgr/workqueue_posix.h \ +src/core/lib/iomgr/workqueue_uv.h \ src/core/lib/iomgr/workqueue_windows.h \ src/core/lib/json/json.h \ src/core/lib/json/json_common.h \ @@ -980,29 +985,38 @@ 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/load_file.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/sockaddr_utils.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_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.c \ +src/core/lib/iomgr/timer_generic.c \ src/core/lib/iomgr/timer_heap.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 \ @@ -1011,6 +1025,7 @@ 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_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 \ diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py index 4dfd01fc66..6fa3abaece 100644 --- a/tools/run_tests/performance/scenario_config.py +++ b/tools/run_tests/performance/scenario_config.py @@ -343,11 +343,20 @@ class NodeLanguage: # 'node_protobuf_async_streaming_ping_pong', rpc_type='STREAMING', # client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER') + + # 50 | 90 | 95 | 99 | 99.9 + # 323834.797877769 | 432510.52549709007 | 458703.85481928807 | 507691.6539182514 | 3826148.8700816636 + # 272716.21113941644 | 307298.29139655043 | 329730.74530904385 | 413965.4319992619 | 2518204.1519497186 yield _ping_pong_scenario( 'node_protobuf_unary_ping_pong', rpc_type='UNARY', client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', categories=[SMOKETEST]) + yield _ping_pong_scenario( + 'cpp_to_node_unary_ping_pong', rpc_type='UNARY', + client_type='ASYNC_CLIENT', server_type='async_server', + client_language='c++') + yield _ping_pong_scenario( 'node_protobuf_async_unary_qps_unconstrained', rpc_type='UNARY', client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', @@ -548,7 +557,7 @@ class JavaLanguage: async_server_threads=1, secure=secure, warmup_seconds=JAVA_WARMUP_SECONDS) - # TODO(jtattermusch): add scenarios java vs C++ + # TODO(jtattermusch): add scenarios java vs C++ def __str__(self): return 'java' @@ -572,7 +581,7 @@ class GoLanguage: smoketest_categories = [SMOKETEST] if secure else [] # ASYNC_GENERIC_SERVER for Go actually uses a sync streaming server, - # but that's mostly because of lack of better name of the enum value. + # but that's mostly because of lack of better name of the enum value. yield _ping_pong_scenario( 'go_generic_sync_streaming_ping_pong_%s' % secstr, rpc_type='STREAMING', client_type='SYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER', @@ -619,7 +628,7 @@ class GoLanguage: secure=secure, categories=[SCALABLE]) - # TODO(jtattermusch): add scenarios go vs C++ + # TODO(jtattermusch): add scenarios go vs C++ def __str__(self): return 'go' diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index b3c217196b..01cd177c3d 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -5851,6 +5851,7 @@ "src/core/lib/iomgr/pollset.h", "src/core/lib/iomgr/pollset_set.h", "src/core/lib/iomgr/pollset_set_windows.h", + "src/core/lib/iomgr/pollset_uv.h", "src/core/lib/iomgr/pollset_windows.h", "src/core/lib/iomgr/port.h", "src/core/lib/iomgr/resolve_address.h", @@ -5864,16 +5865,20 @@ "src/core/lib/iomgr/tcp_client.h", "src/core/lib/iomgr/tcp_posix.h", "src/core/lib/iomgr/tcp_server.h", + "src/core/lib/iomgr/tcp_uv.h", "src/core/lib/iomgr/tcp_windows.h", "src/core/lib/iomgr/time_averaged_stats.h", "src/core/lib/iomgr/timer.h", + "src/core/lib/iomgr/timer_generic.h", "src/core/lib/iomgr/timer_heap.h", + "src/core/lib/iomgr/timer_uv.h", "src/core/lib/iomgr/udp_server.h", "src/core/lib/iomgr/unix_sockets_posix.h", "src/core/lib/iomgr/wakeup_fd_pipe.h", "src/core/lib/iomgr/wakeup_fd_posix.h", "src/core/lib/iomgr/workqueue.h", "src/core/lib/iomgr/workqueue_posix.h", + "src/core/lib/iomgr/workqueue_uv.h", "src/core/lib/iomgr/workqueue_windows.h", "src/core/lib/json/json.h", "src/core/lib/json/json_common.h", @@ -5965,6 +5970,7 @@ "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/load_file.c", "src/core/lib/iomgr/load_file.h", @@ -5974,13 +5980,17 @@ "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/sockaddr.h", "src/core/lib/iomgr/sockaddr_posix.h", @@ -5992,25 +6002,33 @@ "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/tcp_client.h", "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_posix.h", "src/core/lib/iomgr/tcp_server.h", "src/core/lib/iomgr/tcp_server_posix.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.c", "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_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", @@ -6025,6 +6043,8 @@ "src/core/lib/iomgr/workqueue.h", "src/core/lib/iomgr/workqueue_posix.c", "src/core/lib/iomgr/workqueue_posix.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", diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index d09c07d0cb..32f03824cc 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -334,6 +334,7 @@ + @@ -347,16 +348,20 @@ + + + + @@ -520,6 +525,8 @@ + + @@ -528,12 +535,18 @@ + + + + + + @@ -544,28 +557,38 @@ + + + + + + + + - + + + @@ -582,6 +605,8 @@ + + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index d5ac3d4422..c04b13c313 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -88,6 +88,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -100,15 +103,24 @@ 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 @@ -124,6 +136,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -133,6 +148,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -142,21 +160,30 @@ 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 @@ -181,6 +208,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -770,6 +800,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -809,6 +842,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -818,9 +854,15 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -839,6 +881,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index 84e2a60d58..6a6a61e108 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -224,6 +224,7 @@ + @@ -237,16 +238,20 @@ + + + + @@ -363,6 +368,8 @@ + + @@ -371,12 +378,18 @@ + + + + + + @@ -387,28 +400,38 @@ + + + + + + + + - + + + @@ -425,6 +448,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index 1a2ecf91df..cc114e9455 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -136,6 +136,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -148,15 +151,24 @@ 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 @@ -172,6 +184,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -181,6 +196,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -190,21 +208,30 @@ 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 @@ -229,6 +256,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -551,6 +581,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -590,6 +623,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -599,9 +635,15 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -620,6 +662,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index d053dd9a30..1ba32f28c1 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -323,6 +323,7 @@ + @@ -336,16 +337,20 @@ + + + + @@ -487,6 +492,8 @@ + + @@ -495,12 +502,18 @@ + + + + + + @@ -511,28 +524,38 @@ + + + + + + + + - + + + @@ -549,6 +572,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index 7edd0db4b6..8cb8d4ca98 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -91,6 +91,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -103,15 +106,24 @@ 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 @@ -127,6 +139,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -136,6 +151,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -145,21 +163,30 @@ 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 @@ -184,6 +211,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -680,6 +710,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -719,6 +752,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -728,9 +764,15 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -749,6 +791,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr -- cgit v1.2.3 From 0786490eb4378876ea2b4e7b3500bcf9d1781abe Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 21 Sep 2016 10:40:45 -0700 Subject: Rollback changes to timer.h --- src/core/lib/profiling/timers.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/profiling/timers.h b/src/core/lib/profiling/timers.h index ea0cbca977..621cdbf656 100644 --- a/src/core/lib/profiling/timers.h +++ b/src/core/lib/profiling/timers.h @@ -34,8 +34,6 @@ #ifndef GRPC_CORE_LIB_PROFILING_TIMERS_H #define GRPC_CORE_LIB_PROFILING_TIMERS_H -#include - #ifdef __cplusplus extern "C" { #endif @@ -58,17 +56,14 @@ void gpr_timer_set_enabled(int enabled); /* No profiling. No-op all the things. */ #define GPR_TIMER_MARK(tag, important) \ do { \ - /*printf("- %s\n", tag);*/ \ } while (0) #define GPR_TIMER_BEGIN(tag, important) \ do { \ - /*printf("%s {\n", tag);*/ \ } while (0) #define GPR_TIMER_END(tag, important) \ do { \ - /*printf("} // %s\n", tag);*/ \ } while (0) #else /* at least one profiler requested... */ -- cgit v1.2.3 From d533613a63431865e92ffa245fe463f072425196 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 21 Sep 2016 10:43:08 -0700 Subject: Add documentation --- src/core/lib/support/string.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/core/lib') diff --git a/src/core/lib/support/string.h b/src/core/lib/support/string.h index 3aebc083ac..9a94e9471c 100644 --- a/src/core/lib/support/string.h +++ b/src/core/lib/support/string.h @@ -118,6 +118,8 @@ void gpr_strvec_add(gpr_strvec *strs, char *add); total_length as per gpr_strjoin */ char *gpr_strvec_flatten(gpr_strvec *strs, size_t *total_length); +/** Case insensitive string comparison... return <0 if lower(a)0 if lower(a)>lower(b) */ int gpr_stricmp(const char *a, const char *b); #ifdef __cplusplus -- cgit v1.2.3 From 47b5f0aeb598d588d651842ee4f30c7229898df6 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 21 Sep 2016 10:43:26 -0700 Subject: Use bool --- src/core/lib/transport/transport_op_string.c | 34 ++++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/transport/transport_op_string.c b/src/core/lib/transport/transport_op_string.c index 8a687d8cd3..f350e55b34 100644 --- a/src/core/lib/transport/transport_op_string.c +++ b/src/core/lib/transport/transport_op_string.c @@ -73,14 +73,14 @@ static void put_metadata_list(gpr_strvec *b, grpc_metadata_batch md) { char *grpc_transport_stream_op_string(grpc_transport_stream_op *op) { char *tmp; char *out; - int first = 1; + bool first = true; gpr_strvec b; gpr_strvec_init(&b); if (op->send_initial_metadata != NULL) { if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); - first = 0; + first = false; gpr_strvec_add(&b, gpr_strdup("SEND_INITIAL_METADATA{")); put_metadata_list(&b, *op->send_initial_metadata); gpr_strvec_add(&b, gpr_strdup("}")); @@ -88,7 +88,7 @@ char *grpc_transport_stream_op_string(grpc_transport_stream_op *op) { if (op->send_message != NULL) { if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); - first = 0; + first = false; gpr_asprintf(&tmp, "SEND_MESSAGE:flags=0x%08x:len=%d", op->send_message->flags, op->send_message->length); gpr_strvec_add(&b, tmp); @@ -96,7 +96,7 @@ char *grpc_transport_stream_op_string(grpc_transport_stream_op *op) { if (op->send_trailing_metadata != NULL) { if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); - first = 0; + first = false; gpr_strvec_add(&b, gpr_strdup("SEND_TRAILING_METADATA{")); put_metadata_list(&b, *op->send_trailing_metadata); gpr_strvec_add(&b, gpr_strdup("}")); @@ -104,25 +104,25 @@ char *grpc_transport_stream_op_string(grpc_transport_stream_op *op) { if (op->recv_initial_metadata != NULL) { if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); - first = 0; + first = false; gpr_strvec_add(&b, gpr_strdup("RECV_INITIAL_METADATA")); } if (op->recv_message != NULL) { if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); - first = 0; + first = false; gpr_strvec_add(&b, gpr_strdup("RECV_MESSAGE")); } if (op->recv_trailing_metadata != NULL) { if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); - first = 0; + first = false; gpr_strvec_add(&b, gpr_strdup("RECV_TRAILING_METADATA")); } if (op->cancel_error != GRPC_ERROR_NONE) { if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); - first = 0; + first = false; const char *msg = grpc_error_string(op->cancel_error); gpr_asprintf(&tmp, "CANCEL:%s", msg); grpc_error_free_string(msg); @@ -131,7 +131,7 @@ char *grpc_transport_stream_op_string(grpc_transport_stream_op *op) { if (op->close_error != GRPC_ERROR_NONE) { if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); - first = 0; + first = false; const char *msg = grpc_error_string(op->close_error); gpr_asprintf(&tmp, "CLOSE:%s", msg); grpc_error_free_string(msg); @@ -147,14 +147,14 @@ char *grpc_transport_stream_op_string(grpc_transport_stream_op *op) { char *grpc_transport_op_string(grpc_transport_op *op) { char *tmp; char *out; - int first = 1; + bool first = true; gpr_strvec b; gpr_strvec_init(&b); if (op->on_connectivity_state_change != NULL) { if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); - first = 0; + first = false; if (op->connectivity_state != NULL) { gpr_asprintf(&tmp, "ON_CONNECTIVITY_STATE_CHANGE:p=%p:from=%s", op->on_connectivity_state_change, @@ -169,7 +169,7 @@ char *grpc_transport_op_string(grpc_transport_op *op) { if (op->disconnect_with_error != GRPC_ERROR_NONE) { if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); - first = 0; + first = false; const char *err = grpc_error_string(op->disconnect_with_error); gpr_asprintf(&tmp, "DISCONNECT:%s", err); gpr_strvec_add(&b, tmp); @@ -178,7 +178,7 @@ char *grpc_transport_op_string(grpc_transport_op *op) { if (op->send_goaway) { if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); - first = 0; + first = false; char *msg = op->goaway_message == NULL ? "null" : gpr_dump_slice(*op->goaway_message, @@ -190,7 +190,7 @@ char *grpc_transport_op_string(grpc_transport_op *op) { if (op->set_accept_stream) { if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); - first = 0; + first = false; gpr_asprintf(&tmp, "SET_ACCEPT_STREAM:%p(%p,...)", op->set_accept_stream_fn, op->set_accept_stream_user_data); gpr_strvec_add(&b, tmp); @@ -198,19 +198,19 @@ char *grpc_transport_op_string(grpc_transport_op *op) { if (op->bind_pollset != NULL) { if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); - first = 0; + first = false; gpr_strvec_add(&b, gpr_strdup("BIND_POLLSET")); } if (op->bind_pollset_set != NULL) { if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); - first = 0; + first = false; gpr_strvec_add(&b, gpr_strdup("BIND_POLLSET_SET")); } if (op->send_ping != NULL) { if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); - first = 0; + first = false; gpr_strvec_add(&b, gpr_strdup("SEND_PING")); } -- cgit v1.2.3 From 0eaed7224dea18738950ef8135c76453ac91d4d7 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 21 Sep 2016 10:44:18 -0700 Subject: Readability fix --- src/core/lib/surface/call.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 2438885ae9..6b2badf71b 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -238,8 +238,8 @@ grpc_error *grpc_call_create(const grpc_call_create_args *args, grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_call *call; GPR_TIMER_BEGIN("grpc_call_create", 0); - *out_call = call = - gpr_malloc(sizeof(grpc_call) + channel_stack->call_stack_size); + call = gpr_malloc(sizeof(grpc_call) + channel_stack->call_stack_size); + *out_call = call; memset(call, 0, sizeof(grpc_call)); gpr_mu_init(&call->mu); call->channel = args->channel; -- cgit v1.2.3 From 687a0e641057d42394e1574629df6368cc6e5322 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 21 Sep 2016 10:48:59 -0700 Subject: Add trace for server channel events --- doc/environment_variables.md | 2 +- src/core/lib/surface/init.c | 1 + src/core/lib/surface/server.c | 4 +++- src/core/lib/surface/server.h | 3 +++ 4 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src/core/lib') diff --git a/doc/environment_variables.md b/doc/environment_variables.md index 578bfe7eb7..b790f627ea 100644 --- a/doc/environment_variables.md +++ b/doc/environment_variables.md @@ -48,6 +48,7 @@ some configuration as environment variables that can be set. - glb - traces the grpclb load balancer - queue_pluck - queue_timeout + - server_channel - lightweight trace of significant server channel events - secure_endpoint - traces bytes flowing through encrypted channels - transport_security - traces metadata about secure channel establishment - tcp - traces bytes in and out of a channel @@ -61,4 +62,3 @@ some configuration as environment variables that can be set. - DEBUG - log all gRPC messages - INFO - log INFO and ERROR message - ERROR - log only errors - diff --git a/src/core/lib/surface/init.c b/src/core/lib/surface/init.c index 2135507b7a..3cbbaa7b0c 100644 --- a/src/core/lib/surface/init.c +++ b/src/core/lib/surface/init.c @@ -177,6 +177,7 @@ void grpc_init(void) { grpc_register_tracer("compression", &grpc_compression_trace); grpc_register_tracer("queue_pluck", &grpc_cq_pluck_trace); grpc_register_tracer("combiner", &grpc_combiner_trace); + grpc_register_tracer("server_channel", &grpc_server_channel_trace); // Default pluck trace to 1 grpc_cq_pluck_trace = 1; grpc_register_tracer("queue_timeout", &grpc_cq_event_timeout_trace); diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index 9a9fcddb6e..cec3e3ce97 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -71,6 +71,8 @@ typedef struct registered_method registered_method; typedef enum { BATCH_CALL, REGISTERED_CALL } requested_call_type; +int grpc_server_channel_trace = 0; + typedef struct requested_call { requested_call_type type; size_t cq_idx; @@ -440,7 +442,7 @@ static void destroy_channel(grpc_exec_ctx *exec_ctx, channel_data *chand, chand->finish_destroy_channel_closure.cb = finish_destroy_channel; chand->finish_destroy_channel_closure.cb_arg = chand; - if (error != GRPC_ERROR_NONE) { + if (grpc_server_channel_trace && error != GRPC_ERROR_NONE) { const char *msg = grpc_error_string(error); gpr_log(GPR_INFO, "Disconnected client: %s", msg); grpc_error_free_string(msg); diff --git a/src/core/lib/surface/server.h b/src/core/lib/surface/server.h index fb6e4d60c5..2a4e65c7ce 100644 --- a/src/core/lib/surface/server.h +++ b/src/core/lib/surface/server.h @@ -40,6 +40,9 @@ extern const grpc_channel_filter grpc_server_top_filter; +/** Lightweight tracing of server channel state */ +extern int grpc_server_channel_trace; + /* Add a listener to the server: when the server starts, it will call start, and when it shuts down, it will call destroy */ void grpc_server_add_listener( -- cgit v1.2.3 From 7e9371b08e3a6e2e37a1cf63e5bfee6cf836ff68 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 22 Sep 2016 13:47:22 -0700 Subject: Initial buffer pool implementation --- src/core/lib/iomgr/buffer_pool.c | 279 +++++++++++++++++++++++++++++++++++++++ src/core/lib/iomgr/buffer_pool.h | 82 ++++++++++++ 2 files changed, 361 insertions(+) create mode 100644 src/core/lib/iomgr/buffer_pool.c create mode 100644 src/core/lib/iomgr/buffer_pool.h (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/buffer_pool.c b/src/core/lib/iomgr/buffer_pool.c new file mode 100644 index 0000000000..a6604a23fc --- /dev/null +++ b/src/core/lib/iomgr/buffer_pool.c @@ -0,0 +1,279 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include "src/core/lib/iomgr/buffer_pool.h" + +#include +#include + +#include "src/core/lib/iomgr/combiner.h" + +typedef bool (*bpstate_func)(grpc_exec_ctx *exec_ctx, + grpc_buffer_pool *buffer_pool); + +struct grpc_buffer_pool { + grpc_combiner *combiner; + int64_t size; + int64_t free_pool; + + bool step_scheduled; + bool reclaiming; + grpc_closure bpstep_closure; +}; + +/******************************************************************************* + * list management + */ + +void bulist_add(grpc_buffer_user *buffer_user, grpc_bulist list); +bool bulist_empty(grpc_buffer_pool *buffer_pool, grpc_bulist list); +grpc_buffer_user *bulist_head(grpc_buffer_pool *buffer_pool, grpc_bulist list); +grpc_buffer_user *bulist_pop(grpc_buffer_pool *buffer_pool, grpc_bulist list); +void bulist_remove(grpc_buffer_user *buffer_pool, grpc_bulist list); + +/******************************************************************************* + * buffer pool state machine + */ + +static bool bpalloc(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool); +static bool bpscavenge(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool); +static bool bpreclaim(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool, + bool destructive); + +static void bpstep(grpc_exec_ctx *exec_ctx, void *bp, grpc_error *error) { + grpc_buffer_pool *buffer_pool = bp; + buffer_pool->step_scheduled = false; + do { + if (bpalloc(exec_ctx, buffer_pool)) return; + } while (bpscavenge(exec_ctx, buffer_pool)); + bpreclaim(exec_ctx, buffer_pool, false) || + bpreclaim(exec_ctx, buffer_pool, true); +} + +static void bpstep_sched(grpc_exec_ctx *exec_ctx, + grpc_buffer_pool *buffer_pool) { + if (buffer_pool->step_scheduled) return; + buffer_pool->step_scheduled = true; + grpc_combiner_execute_finally(exec_ctx, buffer_pool->combiner, + &buffer_pool->bpstep_closure, GRPC_ERROR_NONE, + false); +} + +/* returns true if all allocations are completed */ +static bool bpalloc(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool) { + grpc_buffer_user *buffer_user; + while ((buffer_user = + bulist_head(buffer_pool, GRPC_BULIST_AWAITING_ALLOCATION))) { + gpr_mu_lock(&buffer_user->mu); + if (buffer_user->free_pool < 0 && + -buffer_user->free_pool < buffer_pool->free_pool) { + buffer_pool->free_pool += buffer_user->free_pool; + buffer_user->free_pool = 0; + } + if (buffer_user->free_pool >= 0) { + buffer_user->allocating = false; + grpc_exec_ctx_enqueue_list(exec_ctx, &buffer_user->on_allocated, NULL); + bulist_remove(buffer_user, GRPC_BULIST_AWAITING_ALLOCATION); + gpr_mu_unlock(&buffer_user->mu); + } else { + gpr_mu_unlock(&buffer_user->mu); + return false; + } + } + return true; +} + +/* returns true if any memory could be reclaimed from buffers */ +static bool bpscavenge(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool) { + grpc_buffer_user *buffer_user; + while ((buffer_user = + bulist_pop(buffer_pool, GRPC_BULIST_NON_EMPTY_FREE_POOL))) { + gpr_mu_lock(&buffer_user->mu); + if (buffer_pool->free_pool > 0) { + buffer_pool->free_pool += buffer_user->free_pool; + buffer_user->free_pool = 0; + gpr_mu_unlock(&buffer_user->mu); + return true; + } else { + gpr_mu_unlock(&buffer_user->mu); + } + } + return false; +} + +/* returns true if reclaimation is proceeding */ +static bool bpreclaim(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool, + bool destructive) { + if (buffer_pool->reclaiming) return true; + grpc_bulist list = destructive ? GRPC_BULIST_RECLAIMER_BENIGN + : GRPC_BULIST_RECLAIMER_DESTRUCTIVE; + grpc_buffer_user *buffer_user = bulist_pop(buffer_pool, list); + if (buffer_user == NULL) return false; + buffer_pool->reclaiming = true; + grpc_exec_ctx_sched(exec_ctx, buffer_user->reclaimers[destructive], + GRPC_ERROR_NONE, NULL); + buffer_user->reclaimers[destructive] = NULL; + return true; +} + +/******************************************************************************* + * grpc_buffer_pool internal implementation + */ + +static void bu_allocate(grpc_exec_ctx *exec_ctx, void *bu, grpc_error *error) { + grpc_buffer_user *buffer_user = bu; + if (bulist_empty(buffer_user->buffer_pool, GRPC_BULIST_AWAITING_ALLOCATION)) { + bpstep_sched(exec_ctx, buffer_user->buffer_pool); + } + bulist_add(buffer_user, GRPC_BULIST_AWAITING_ALLOCATION); +} + +static void bu_add_to_free_pool(grpc_exec_ctx *exec_ctx, void *bu, + grpc_error *error) { + grpc_buffer_user *buffer_user = bu; + if (!bulist_empty(buffer_user->buffer_pool, + GRPC_BULIST_AWAITING_ALLOCATION) && + bulist_empty(buffer_user->buffer_pool, GRPC_BULIST_NON_EMPTY_FREE_POOL)) { + bpstep_sched(exec_ctx, buffer_user->buffer_pool); + } + bulist_add(buffer_user, GRPC_BULIST_AWAITING_ALLOCATION); +} + +static void bu_post_benign_reclaimer(grpc_exec_ctx *exec_ctx, void *bu, + grpc_error *error) { + grpc_buffer_user *buffer_user = bu; + if (!bulist_empty(buffer_user->buffer_pool, + GRPC_BULIST_AWAITING_ALLOCATION) && + bulist_empty(buffer_user->buffer_pool, GRPC_BULIST_NON_EMPTY_FREE_POOL) && + bulist_empty(buffer_user->buffer_pool, GRPC_BULIST_RECLAIMER_BENIGN)) { + bpstep_sched(exec_ctx, buffer_user->buffer_pool); + } + bulist_add(buffer_user, GRPC_BULIST_RECLAIMER_BENIGN); +} + +static void bu_post_destructive_reclaimer(grpc_exec_ctx *exec_ctx, void *bu, + grpc_error *error) { + grpc_buffer_user *buffer_user = bu; + if (!bulist_empty(buffer_user->buffer_pool, + GRPC_BULIST_AWAITING_ALLOCATION) && + bulist_empty(buffer_user->buffer_pool, GRPC_BULIST_NON_EMPTY_FREE_POOL) && + bulist_empty(buffer_user->buffer_pool, GRPC_BULIST_RECLAIMER_BENIGN) && + bulist_empty(buffer_user->buffer_pool, + GRPC_BULIST_RECLAIMER_DESTRUCTIVE)) { + bpstep_sched(exec_ctx, buffer_user->buffer_pool); + } + bulist_add(buffer_user, GRPC_BULIST_RECLAIMER_DESTRUCTIVE); +} + +/******************************************************************************* + * grpc_buffer_pool api + */ + +grpc_buffer_pool *grpc_buffer_pool_create(void) { + grpc_buffer_pool *buffer_pool = gpr_malloc(sizeof(*buffer_pool)); + buffer_pool->combiner = grpc_combiner_create(NULL); + buffer_pool->free_pool = INT64_MAX; + buffer_pool->size = INT64_MAX; + grpc_closure_init(&buffer_pool->bpstep_closure, bpstep, buffer_pool); + return buffer_pool; +} + +/******************************************************************************* + * grpc_buffer_user api + */ + +void grpc_buffer_user_init(grpc_buffer_user *buffer_user, + grpc_buffer_pool *buffer_pool) { + buffer_user->buffer_pool = buffer_pool; + grpc_closure_init(&buffer_user->allocate_closure, &bu_allocate, buffer_user); + grpc_closure_init(&buffer_user->add_to_free_pool_closure, + &bu_add_to_free_pool, buffer_user); + grpc_closure_init(&buffer_user->post_reclaimer_closure[0], + &bu_post_benign_reclaimer, buffer_user); + grpc_closure_init(&buffer_user->post_reclaimer_closure[1], + &bu_post_destructive_reclaimer, buffer_user); + gpr_mu_init(&buffer_user->mu); + buffer_user->allocated = 0; + buffer_user->free_pool = 0; + grpc_closure_list_init(&buffer_user->on_allocated); + buffer_user->allocating = false; + buffer_user->added_to_free_pool = false; +} + +void grpc_buffer_user_alloc(grpc_exec_ctx *exec_ctx, + grpc_buffer_user *buffer_user, size_t size, + grpc_closure *optional_on_done) { + gpr_mu_lock(&buffer_user->mu); + buffer_user->allocated += size; + buffer_user->free_pool -= size; + if (buffer_user->free_pool < 0) { + grpc_closure_list_append(&buffer_user->on_allocated, optional_on_done, + GRPC_ERROR_NONE); + if (!buffer_user->allocating) { + buffer_user->allocating = true; + grpc_combiner_execute(exec_ctx, buffer_user->buffer_pool->combiner, + &buffer_user->allocate_closure, GRPC_ERROR_NONE); + } + } else { + grpc_exec_ctx_sched(exec_ctx, optional_on_done, GRPC_ERROR_NONE, NULL); + } + gpr_mu_unlock(&buffer_user->mu); +} + +void grpc_buffer_user_free(grpc_exec_ctx *exec_ctx, + grpc_buffer_user *buffer_user, size_t size) { + gpr_mu_lock(&buffer_user->mu); + GPR_ASSERT(buffer_user->allocated >= size); + bool was_zero_or_negative = buffer_user->free_pool <= 0; + buffer_user->free_pool += size; + buffer_user->allocated -= size; + bool is_bigger_than_zero = buffer_user->free_pool > 0; + if (is_bigger_than_zero && was_zero_or_negative && + !buffer_user->added_to_free_pool) { + buffer_user->added_to_free_pool = true; + grpc_combiner_execute(exec_ctx, buffer_user->buffer_pool->combiner, + &buffer_user->add_to_free_pool_closure, + GRPC_ERROR_NONE); + } + gpr_mu_unlock(&buffer_user->mu); +} + +void grpc_buffer_user_post_reclaimer(grpc_exec_ctx *exec_ctx, + grpc_buffer_user *buffer_user, + bool destructive, grpc_closure *closure) { + GPR_ASSERT(buffer_user->reclaimers[destructive] == NULL); + buffer_user->reclaimers[destructive] = closure; + grpc_combiner_execute(exec_ctx, buffer_user->buffer_pool->combiner, + &buffer_user->post_reclaimer_closure[destructive], + GRPC_ERROR_NONE); +} diff --git a/src/core/lib/iomgr/buffer_pool.h b/src/core/lib/iomgr/buffer_pool.h new file mode 100644 index 0000000000..eec3d4c1e0 --- /dev/null +++ b/src/core/lib/iomgr/buffer_pool.h @@ -0,0 +1,82 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#ifndef GRPC_CORE_LIB_IOMGR_BUFFER_POOL_H +#define GRPC_CORE_LIB_IOMGR_BUFFER_POOL_H + +#include + +#include "src/core/lib/iomgr/exec_ctx.h" + +typedef enum { + GRPC_BULIST_AWAITING_ALLOCATION, + GRPC_BULIST_NON_EMPTY_FREE_POOL, + GRPC_BULIST_RECLAIMER_BENIGN, + GRPC_BULIST_RECLAIMER_DESTRUCTIVE, +} grpc_bulist; + +typedef struct grpc_buffer_user { + grpc_buffer_pool *buffer_pool; + + grpc_closure allocate_closure; + grpc_closure add_to_free_pool_closure; + + gpr_mu mu; + int64_t allocated; + int64_t free_pool; + grpc_closure_list on_allocated; + bool allocating; + bool added_to_free_pool; + + grpc_closure *reclaimers[2]; + grpc_closure post_reclaimer_closure[2]; +} grpc_buffer_user; + +void grpc_buffer_user_init(grpc_buffer_user *buffer_user, + grpc_buffer_pool *buffer_pool); +void grpc_buffer_user_destroy(grpc_exec_ctx *exec_ctx, + grpc_buffer_user *buffer_user, + grpc_closure *on_done); + +void grpc_buffer_user_alloc(grpc_exec_ctx *exec_ctx, + grpc_buffer_user *buffer_user, size_t size, + grpc_closure *optional_on_done); +void grpc_buffer_user_free(grpc_exec_ctx *exec_ctx, + grpc_buffer_user *buffer_user, size_t size); +void grpc_buffer_user_post_reclaimer(grpc_exec_ctx *exec_ctx, + grpc_buffer_user *buffer_user, + bool destructive, grpc_closure *closure); +void grpc_buffer_user_finish_reclaimation(grpc_exec_ctx *exec_ctx, + grpc_buffer_user *buffer_user); + +#endif /* GRPC_CORE_LIB_IOMGR_BUFFER_POOL_H */ -- cgit v1.2.3 From ca30eb9931aa84056382c7bd3acf7edd3eb3f5d0 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 22 Sep 2016 15:04:04 -0700 Subject: Add (empty) buffer pool test --- Makefile | 36 ++++ build.yaml | 11 ++ src/core/lib/iomgr/buffer_pool.c | 2 +- test/core/iomgr/buffer_pool_test.c | 43 +++++ tools/run_tests/sources_and_headers.json | 16 ++ tools/run_tests/tests.json | 21 +++ vsprojects/buildtests_c.sln | 27 +++ .../test/buffer_pool_test/buffer_pool_test.vcxproj | 199 +++++++++++++++++++++ .../buffer_pool_test.vcxproj.filters | 21 +++ 9 files changed, 375 insertions(+), 1 deletion(-) create mode 100644 test/core/iomgr/buffer_pool_test.c create mode 100644 vsprojects/vcxproj/test/buffer_pool_test/buffer_pool_test.vcxproj create mode 100644 vsprojects/vcxproj/test/buffer_pool_test/buffer_pool_test.vcxproj.filters (limited to 'src/core/lib') diff --git a/Makefile b/Makefile index fa75a286aa..3373b18a26 100644 --- a/Makefile +++ b/Makefile @@ -907,6 +907,7 @@ api_fuzzer: $(BINDIR)/$(CONFIG)/api_fuzzer bad_server_response_test: $(BINDIR)/$(CONFIG)/bad_server_response_test bin_decoder_test: $(BINDIR)/$(CONFIG)/bin_decoder_test bin_encoder_test: $(BINDIR)/$(CONFIG)/bin_encoder_test +buffer_pool_test: $(BINDIR)/$(CONFIG)/buffer_pool_test census_context_test: $(BINDIR)/$(CONFIG)/census_context_test census_resource_test: $(BINDIR)/$(CONFIG)/census_resource_test census_trace_context_test: $(BINDIR)/$(CONFIG)/census_trace_context_test @@ -1236,6 +1237,7 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/bad_server_response_test \ $(BINDIR)/$(CONFIG)/bin_decoder_test \ $(BINDIR)/$(CONFIG)/bin_encoder_test \ + $(BINDIR)/$(CONFIG)/buffer_pool_test \ $(BINDIR)/$(CONFIG)/census_context_test \ $(BINDIR)/$(CONFIG)/census_resource_test \ $(BINDIR)/$(CONFIG)/census_trace_context_test \ @@ -1549,6 +1551,8 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/bin_decoder_test || ( echo test bin_decoder_test failed ; exit 1 ) $(E) "[RUN] Testing bin_encoder_test" $(Q) $(BINDIR)/$(CONFIG)/bin_encoder_test || ( echo test bin_encoder_test failed ; exit 1 ) + $(E) "[RUN] Testing buffer_pool_test" + $(Q) $(BINDIR)/$(CONFIG)/buffer_pool_test || ( echo test buffer_pool_test failed ; exit 1 ) $(E) "[RUN] Testing census_context_test" $(Q) $(BINDIR)/$(CONFIG)/census_context_test || ( echo test census_context_test failed ; exit 1 ) $(E) "[RUN] Testing census_resource_test" @@ -7159,6 +7163,38 @@ endif endif +BUFFER_POOL_TEST_SRC = \ + test/core/iomgr/buffer_pool_test.c \ + +BUFFER_POOL_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(BUFFER_POOL_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/buffer_pool_test: openssl_dep_error + +else + + + +$(BINDIR)/$(CONFIG)/buffer_pool_test: $(BUFFER_POOL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(BUFFER_POOL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/buffer_pool_test + +endif + +$(OBJDIR)/$(CONFIG)/test/core/iomgr/buffer_pool_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_buffer_pool_test: $(BUFFER_POOL_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(BUFFER_POOL_TEST_OBJS:.o=.dep) +endif +endif + + CENSUS_CONTEXT_TEST_SRC = \ test/core/census/context_test.c \ diff --git a/build.yaml b/build.yaml index 640f5c82ed..080f3f8568 100644 --- a/build.yaml +++ b/build.yaml @@ -1331,6 +1331,17 @@ targets: deps: - grpc_test_util - grpc +- name: buffer_pool_test + cpu_cost: 30 + build: test + language: c + src: + - test/core/iomgr/buffer_pool_test.c + deps: + - grpc_test_util + - grpc + - gpr_test_util + - gpr - name: census_context_test build: test language: c diff --git a/src/core/lib/iomgr/buffer_pool.c b/src/core/lib/iomgr/buffer_pool.c index a6604a23fc..8ba6f822f8 100644 --- a/src/core/lib/iomgr/buffer_pool.c +++ b/src/core/lib/iomgr/buffer_pool.c @@ -253,7 +253,7 @@ void grpc_buffer_user_alloc(grpc_exec_ctx *exec_ctx, void grpc_buffer_user_free(grpc_exec_ctx *exec_ctx, grpc_buffer_user *buffer_user, size_t size) { gpr_mu_lock(&buffer_user->mu); - GPR_ASSERT(buffer_user->allocated >= size); + GPR_ASSERT(buffer_user->allocated >= (int64_t)size); bool was_zero_or_negative = buffer_user->free_pool <= 0; buffer_user->free_pool += size; buffer_user->allocated -= size; diff --git a/test/core/iomgr/buffer_pool_test.c b/test/core/iomgr/buffer_pool_test.c new file mode 100644 index 0000000000..306612f775 --- /dev/null +++ b/test/core/iomgr/buffer_pool_test.c @@ -0,0 +1,43 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include "src/core/lib/iomgr/buffer_pool.h" + +#include "test/core/util/test_config.h" + +int main(int argc, char **argv) { + grpc_test_init(argc, argv); + grpc_init(); + grpc_shutdown(); + return 0; +} diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index bf03b761ea..383e203522 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -124,6 +124,22 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "buffer_pool_test", + "src": [ + "test/core/iomgr/buffer_pool_test.c" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "gpr", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 3e3bfd503e..935c8304b1 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -148,6 +148,27 @@ "windows" ] }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 30, + "exclude_configs": [], + "flaky": false, + "gtest": false, + "language": "c", + "name": "buffer_pool_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "args": [], "ci_platforms": [ diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index c46e86d78b..51708651ca 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -98,6 +98,17 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bin_encoder_test", "vcxproj {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "buffer_pool_test", "vcxproj\test\buffer_pool_test\buffer_pool_test.vcxproj", "{46480473-88FC-8C53-3509-FC7F4DC3A8CD}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "census_context_test", "vcxproj\test\census_context_test\census_context_test.vcxproj", "{5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}" ProjectSection(myProperties) = preProject lib = "False" @@ -1639,6 +1650,22 @@ Global {D5C70922-D68E-0E9D-9988-995E0F9A79AE}.Release-DLL|Win32.Build.0 = Release|Win32 {D5C70922-D68E-0E9D-9988-995E0F9A79AE}.Release-DLL|x64.ActiveCfg = Release|x64 {D5C70922-D68E-0E9D-9988-995E0F9A79AE}.Release-DLL|x64.Build.0 = Release|x64 + {46480473-88FC-8C53-3509-FC7F4DC3A8CD}.Debug|Win32.ActiveCfg = Debug|Win32 + {46480473-88FC-8C53-3509-FC7F4DC3A8CD}.Debug|x64.ActiveCfg = Debug|x64 + {46480473-88FC-8C53-3509-FC7F4DC3A8CD}.Release|Win32.ActiveCfg = Release|Win32 + {46480473-88FC-8C53-3509-FC7F4DC3A8CD}.Release|x64.ActiveCfg = Release|x64 + {46480473-88FC-8C53-3509-FC7F4DC3A8CD}.Debug|Win32.Build.0 = Debug|Win32 + {46480473-88FC-8C53-3509-FC7F4DC3A8CD}.Debug|x64.Build.0 = Debug|x64 + {46480473-88FC-8C53-3509-FC7F4DC3A8CD}.Release|Win32.Build.0 = Release|Win32 + {46480473-88FC-8C53-3509-FC7F4DC3A8CD}.Release|x64.Build.0 = Release|x64 + {46480473-88FC-8C53-3509-FC7F4DC3A8CD}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {46480473-88FC-8C53-3509-FC7F4DC3A8CD}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {46480473-88FC-8C53-3509-FC7F4DC3A8CD}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {46480473-88FC-8C53-3509-FC7F4DC3A8CD}.Debug-DLL|x64.Build.0 = Debug|x64 + {46480473-88FC-8C53-3509-FC7F4DC3A8CD}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {46480473-88FC-8C53-3509-FC7F4DC3A8CD}.Release-DLL|Win32.Build.0 = Release|Win32 + {46480473-88FC-8C53-3509-FC7F4DC3A8CD}.Release-DLL|x64.ActiveCfg = Release|x64 + {46480473-88FC-8C53-3509-FC7F4DC3A8CD}.Release-DLL|x64.Build.0 = Release|x64 {5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}.Debug|Win32.ActiveCfg = Debug|Win32 {5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}.Debug|x64.ActiveCfg = Debug|x64 {5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/vcxproj/test/buffer_pool_test/buffer_pool_test.vcxproj b/vsprojects/vcxproj/test/buffer_pool_test/buffer_pool_test.vcxproj new file mode 100644 index 0000000000..d11d063f9d --- /dev/null +++ b/vsprojects/vcxproj/test/buffer_pool_test/buffer_pool_test.vcxproj @@ -0,0 +1,199 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {46480473-88FC-8C53-3509-FC7F4DC3A8CD} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + buffer_pool_test + static + Debug + static + Debug + + + buffer_pool_test + static + Release + static + Release + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + + + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/buffer_pool_test/buffer_pool_test.vcxproj.filters b/vsprojects/vcxproj/test/buffer_pool_test/buffer_pool_test.vcxproj.filters new file mode 100644 index 0000000000..ecbf91ec6e --- /dev/null +++ b/vsprojects/vcxproj/test/buffer_pool_test/buffer_pool_test.vcxproj.filters @@ -0,0 +1,21 @@ + + + + + test\core\iomgr + + + + + + {94e599c3-a059-4581-0cac-d15361ec8a7d} + + + {6d25d413-0043-5a1c-52f7-7d25809be372} + + + {64b38e90-4497-be2e-cee1-402590cbea8a} + + + + -- cgit v1.2.3 From e26ab6c5610b9cc4878f6db77700b918272dfc80 Mon Sep 17 00:00:00 2001 From: Julien Boeuf Date: Thu, 22 Sep 2016 15:13:07 -0700 Subject: Adding a method in channel creds to remove any attached call creds. This will be useful when talking to non-trusted load balancer (balancers which are not able to impersonate real backends) as these balancers should not receive bearer tokens. --- .../credentials/composite/composite_credentials.c | 11 +++++++- .../credentials/composite/composite_credentials.h | 4 +-- src/core/lib/security/credentials/credentials.c | 12 +++++++++ src/core/lib/security/credentials/credentials.h | 10 +++++++ .../security/credentials/fake/fake_credentials.c | 2 +- .../lib/security/credentials/ssl/ssl_credentials.c | 2 +- test/core/security/credentials_test.c | 31 ++++++++++++++++++++-- 7 files changed, 65 insertions(+), 7 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/security/credentials/composite/composite_credentials.c b/src/core/lib/security/credentials/composite/composite_credentials.c index 850e41e646..d55d00b7b6 100644 --- a/src/core/lib/security/credentials/composite/composite_credentials.c +++ b/src/core/lib/security/credentials/composite/composite_credentials.c @@ -242,8 +242,17 @@ static grpc_security_status composite_channel_create_security_connector( return status; } +static grpc_channel_credentials * +composite_channel_duplicate_without_call_credentials( + grpc_channel_credentials *creds) { + grpc_composite_channel_credentials *c = + (grpc_composite_channel_credentials *)creds; + return grpc_channel_credentials_ref(c->inner_creds); +} + static grpc_channel_credentials_vtable composite_channel_credentials_vtable = { - composite_channel_destruct, composite_channel_create_security_connector}; + composite_channel_destruct, composite_channel_create_security_connector, + composite_channel_duplicate_without_call_credentials}; grpc_channel_credentials *grpc_composite_channel_credentials_create( grpc_channel_credentials *channel_creds, grpc_call_credentials *call_creds, diff --git a/src/core/lib/security/credentials/composite/composite_credentials.h b/src/core/lib/security/credentials/composite/composite_credentials.h index 0d8966f464..f8425c2b76 100644 --- a/src/core/lib/security/credentials/composite/composite_credentials.h +++ b/src/core/lib/security/credentials/composite/composite_credentials.h @@ -53,7 +53,7 @@ grpc_call_credentials *grpc_credentials_contains_type( grpc_call_credentials *creds, const char *type, grpc_call_credentials **composite_creds); -/* -- Channel composite credentials. -- */ +/* -- Composite channel credentials. -- */ typedef struct { grpc_channel_credentials base; @@ -61,7 +61,7 @@ typedef struct { grpc_call_credentials *call_creds; } grpc_composite_channel_credentials; -/* -- Composite credentials. -- */ +/* -- Composite call credentials. -- */ typedef struct { grpc_call_credentials base; diff --git a/src/core/lib/security/credentials/credentials.c b/src/core/lib/security/credentials/credentials.c index 029a357261..1149e5c2ed 100644 --- a/src/core/lib/security/credentials/credentials.c +++ b/src/core/lib/security/credentials/credentials.c @@ -138,6 +138,18 @@ grpc_security_status grpc_channel_credentials_create_security_connector( channel_creds, NULL, target, args, sc, new_args); } +grpc_channel_credentials * +grpc_channel_credentials_duplicate_without_call_credentials( + grpc_channel_credentials *channel_creds) { + if (channel_creds != NULL && channel_creds->vtable != NULL && + channel_creds->vtable->duplicate_without_call_credentials != NULL) { + return channel_creds->vtable->duplicate_without_call_credentials( + channel_creds); + } else { + return grpc_channel_credentials_ref(channel_creds); + } +} + grpc_server_credentials *grpc_server_credentials_ref( grpc_server_credentials *creds) { if (creds == NULL) return NULL; diff --git a/src/core/lib/security/credentials/credentials.h b/src/core/lib/security/credentials/credentials.h index 8e9d842ead..6fb5b5b15a 100644 --- a/src/core/lib/security/credentials/credentials.h +++ b/src/core/lib/security/credentials/credentials.h @@ -107,6 +107,9 @@ typedef struct { grpc_channel_credentials *c, grpc_call_credentials *call_creds, const char *target, const grpc_channel_args *args, grpc_channel_security_connector **sc, grpc_channel_args **new_args); + + grpc_channel_credentials *(*duplicate_without_call_credentials)( + grpc_channel_credentials *c); } grpc_channel_credentials_vtable; struct grpc_channel_credentials { @@ -128,6 +131,13 @@ grpc_security_status grpc_channel_credentials_create_security_connector( const grpc_channel_args *args, grpc_channel_security_connector **sc, grpc_channel_args **new_args); +/* Creates a version of the channel credentials without any attached call + credentials. This can be used in order to open a channel to a non-trusted + gRPC load balancer. */ +grpc_channel_credentials * +grpc_channel_credentials_duplicate_without_call_credentials( + grpc_channel_credentials *creds); + /* --- grpc_credentials_md. --- */ typedef struct { diff --git a/src/core/lib/security/credentials/fake/fake_credentials.c b/src/core/lib/security/credentials/fake/fake_credentials.c index 51cafd986f..ea4cb76fb9 100644 --- a/src/core/lib/security/credentials/fake/fake_credentials.c +++ b/src/core/lib/security/credentials/fake/fake_credentials.c @@ -61,7 +61,7 @@ fake_transport_security_server_create_security_connector( static grpc_channel_credentials_vtable fake_transport_security_credentials_vtable = { - NULL, fake_transport_security_create_security_connector}; + NULL, fake_transport_security_create_security_connector, NULL}; static grpc_server_credentials_vtable fake_transport_security_server_credentials_vtable = { diff --git a/src/core/lib/security/credentials/ssl/ssl_credentials.c b/src/core/lib/security/credentials/ssl/ssl_credentials.c index 545bca9d98..0dc1fccec4 100644 --- a/src/core/lib/security/credentials/ssl/ssl_credentials.c +++ b/src/core/lib/security/credentials/ssl/ssl_credentials.c @@ -95,7 +95,7 @@ static grpc_security_status ssl_create_security_connector( } static grpc_channel_credentials_vtable ssl_vtable = { - ssl_destruct, ssl_create_security_connector}; + ssl_destruct, ssl_create_security_connector, NULL}; static void ssl_build_config(const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pair, diff --git a/test/core/security/credentials_test.c b/test/core/security/credentials_test.c index 7043953154..2f8ffe4da6 100644 --- a/test/core/security/credentials_test.c +++ b/test/core/security/credentials_test.c @@ -46,6 +46,7 @@ #include "src/core/lib/http/httpcli.h" #include "src/core/lib/security/credentials/composite/composite_credentials.h" +#include "src/core/lib/security/credentials/fake/fake_credentials.h" #include "src/core/lib/security/credentials/google_default/google_default_credentials.h" #include "src/core/lib/security/credentials/jwt/jwt_credentials.h" #include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h" @@ -411,7 +412,7 @@ static grpc_security_status check_channel_oauth2_create_security_connector( static void test_channel_oauth2_composite_creds(void) { grpc_channel_args *new_args; grpc_channel_credentials_vtable vtable = { - NULL, check_channel_oauth2_create_security_connector}; + NULL, check_channel_oauth2_create_security_connector, NULL}; grpc_channel_credentials *channel_creds = grpc_mock_channel_credentials_create(&vtable); grpc_call_credentials *oauth2_creds = @@ -495,7 +496,7 @@ check_channel_oauth2_google_iam_create_security_connector( static void test_channel_oauth2_google_iam_composite_creds(void) { grpc_channel_args *new_args; grpc_channel_credentials_vtable vtable = { - NULL, check_channel_oauth2_google_iam_create_security_connector}; + NULL, check_channel_oauth2_google_iam_create_security_connector, NULL}; grpc_channel_credentials *channel_creds = grpc_mock_channel_credentials_create(&vtable); grpc_call_credentials *oauth2_creds = @@ -1148,6 +1149,31 @@ static void test_get_well_known_google_credentials_file_path(void) { #endif } +static void test_channel_creds_duplicate_without_call_creds(void) { + grpc_channel_credentials *channel_creds = + grpc_fake_transport_security_credentials_create(); + + grpc_channel_credentials *dup = + grpc_channel_credentials_duplicate_without_call_credentials( + channel_creds); + GPR_ASSERT(dup == channel_creds); + grpc_channel_credentials_unref(dup); + + grpc_call_credentials *call_creds = + grpc_access_token_credentials_create("blah", NULL); + grpc_channel_credentials *composite_creds = + grpc_composite_channel_credentials_create(channel_creds, call_creds, + NULL); + grpc_call_credentials_unref(call_creds); + dup = grpc_channel_credentials_duplicate_without_call_credentials( + composite_creds); + GPR_ASSERT(dup == channel_creds); + grpc_channel_credentials_unref(dup); + + grpc_channel_credentials_unref(channel_creds); + grpc_channel_credentials_unref(composite_creds); +} + int main(int argc, char **argv) { grpc_test_init(argc, argv); grpc_init(); @@ -1182,6 +1208,7 @@ int main(int argc, char **argv) { test_metadata_plugin_success(); test_metadata_plugin_failure(); test_get_well_known_google_credentials_file_path(); + test_channel_creds_duplicate_without_call_creds(); grpc_shutdown(); return 0; } -- cgit v1.2.3 From 0b13fcdab2a387cdd87018d1b25aa3c1ee471acf Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 22 Sep 2016 15:26:47 -0700 Subject: no op test passes --- src/core/lib/iomgr/buffer_pool.c | 95 +++++++++++++++++++++++++++++++++----- src/core/lib/iomgr/buffer_pool.h | 9 +++- test/core/iomgr/buffer_pool_test.c | 8 ++++ 3 files changed, 98 insertions(+), 14 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/buffer_pool.c b/src/core/lib/iomgr/buffer_pool.c index 8ba6f822f8..31ca08cc94 100644 --- a/src/core/lib/iomgr/buffer_pool.c +++ b/src/core/lib/iomgr/buffer_pool.c @@ -41,7 +41,14 @@ typedef bool (*bpstate_func)(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool); +typedef struct { + grpc_buffer_user *head; + grpc_buffer_user *tail; +} grpc_buffer_user_list; + struct grpc_buffer_pool { + gpr_refcount refs; + grpc_combiner *combiner; int64_t size; int64_t free_pool; @@ -49,17 +56,57 @@ struct grpc_buffer_pool { bool step_scheduled; bool reclaiming; grpc_closure bpstep_closure; + + grpc_buffer_user_list lists[GRPC_BULIST_COUNT]; }; /******************************************************************************* * list management */ -void bulist_add(grpc_buffer_user *buffer_user, grpc_bulist list); -bool bulist_empty(grpc_buffer_pool *buffer_pool, grpc_bulist list); -grpc_buffer_user *bulist_head(grpc_buffer_pool *buffer_pool, grpc_bulist list); -grpc_buffer_user *bulist_pop(grpc_buffer_pool *buffer_pool, grpc_bulist list); -void bulist_remove(grpc_buffer_user *buffer_pool, grpc_bulist list); +static void bulist_add_tail(grpc_buffer_user *buffer_user, grpc_bulist list) { + grpc_buffer_pool *buffer_pool = buffer_user->buffer_pool; + grpc_buffer_user_list *lst = &buffer_pool->lists[list]; + if (lst->head == NULL) { + lst->head = lst->tail = buffer_user; + } else { + lst->tail->next[list] = buffer_user; + lst->tail = buffer_user; + } + buffer_user->next[list] = NULL; +} + +static void bulist_add_head(grpc_buffer_user *buffer_user, grpc_bulist list) { + grpc_buffer_pool *buffer_pool = buffer_user->buffer_pool; + grpc_buffer_user_list *lst = &buffer_pool->lists[list]; + if (lst->head == NULL) { + lst->head = lst->tail = buffer_user; + buffer_user->next[list] = NULL; + } else { + buffer_user->next[list] = lst->head; + lst->head = buffer_user; + } +} + +static bool bulist_empty(grpc_buffer_pool *buffer_pool, grpc_bulist list) { + return buffer_pool->lists[list].head == NULL; +} + +static grpc_buffer_user *bulist_pop(grpc_buffer_pool *buffer_pool, + grpc_bulist list) { + grpc_buffer_user_list *lst = &buffer_pool->lists[list]; + grpc_buffer_user *buffer_user = lst->head; + if (buffer_user == NULL) { + return NULL; + } + if (buffer_user == lst->tail) { + lst->head = lst->tail = NULL; + } else { + lst->head = buffer_user->next[list]; + } + buffer_user->next[list] = NULL; + return buffer_user; +} /******************************************************************************* * buffer pool state machine @@ -93,7 +140,7 @@ static void bpstep_sched(grpc_exec_ctx *exec_ctx, static bool bpalloc(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool) { grpc_buffer_user *buffer_user; while ((buffer_user = - bulist_head(buffer_pool, GRPC_BULIST_AWAITING_ALLOCATION))) { + bulist_pop(buffer_pool, GRPC_BULIST_AWAITING_ALLOCATION))) { gpr_mu_lock(&buffer_user->mu); if (buffer_user->free_pool < 0 && -buffer_user->free_pool < buffer_pool->free_pool) { @@ -103,9 +150,9 @@ static bool bpalloc(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool) { if (buffer_user->free_pool >= 0) { buffer_user->allocating = false; grpc_exec_ctx_enqueue_list(exec_ctx, &buffer_user->on_allocated, NULL); - bulist_remove(buffer_user, GRPC_BULIST_AWAITING_ALLOCATION); gpr_mu_unlock(&buffer_user->mu); } else { + bulist_add_head(buffer_user, GRPC_BULIST_AWAITING_ALLOCATION); gpr_mu_unlock(&buffer_user->mu); return false; } @@ -155,7 +202,7 @@ static void bu_allocate(grpc_exec_ctx *exec_ctx, void *bu, grpc_error *error) { if (bulist_empty(buffer_user->buffer_pool, GRPC_BULIST_AWAITING_ALLOCATION)) { bpstep_sched(exec_ctx, buffer_user->buffer_pool); } - bulist_add(buffer_user, GRPC_BULIST_AWAITING_ALLOCATION); + bulist_add_tail(buffer_user, GRPC_BULIST_AWAITING_ALLOCATION); } static void bu_add_to_free_pool(grpc_exec_ctx *exec_ctx, void *bu, @@ -166,7 +213,7 @@ static void bu_add_to_free_pool(grpc_exec_ctx *exec_ctx, void *bu, bulist_empty(buffer_user->buffer_pool, GRPC_BULIST_NON_EMPTY_FREE_POOL)) { bpstep_sched(exec_ctx, buffer_user->buffer_pool); } - bulist_add(buffer_user, GRPC_BULIST_AWAITING_ALLOCATION); + bulist_add_tail(buffer_user, GRPC_BULIST_AWAITING_ALLOCATION); } static void bu_post_benign_reclaimer(grpc_exec_ctx *exec_ctx, void *bu, @@ -178,7 +225,7 @@ static void bu_post_benign_reclaimer(grpc_exec_ctx *exec_ctx, void *bu, bulist_empty(buffer_user->buffer_pool, GRPC_BULIST_RECLAIMER_BENIGN)) { bpstep_sched(exec_ctx, buffer_user->buffer_pool); } - bulist_add(buffer_user, GRPC_BULIST_RECLAIMER_BENIGN); + bulist_add_tail(buffer_user, GRPC_BULIST_RECLAIMER_BENIGN); } static void bu_post_destructive_reclaimer(grpc_exec_ctx *exec_ctx, void *bu, @@ -192,7 +239,7 @@ static void bu_post_destructive_reclaimer(grpc_exec_ctx *exec_ctx, void *bu, GRPC_BULIST_RECLAIMER_DESTRUCTIVE)) { bpstep_sched(exec_ctx, buffer_user->buffer_pool); } - bulist_add(buffer_user, GRPC_BULIST_RECLAIMER_DESTRUCTIVE); + bulist_add_tail(buffer_user, GRPC_BULIST_RECLAIMER_DESTRUCTIVE); } /******************************************************************************* @@ -201,6 +248,7 @@ static void bu_post_destructive_reclaimer(grpc_exec_ctx *exec_ctx, void *bu, grpc_buffer_pool *grpc_buffer_pool_create(void) { grpc_buffer_pool *buffer_pool = gpr_malloc(sizeof(*buffer_pool)); + gpr_ref_init(&buffer_pool->refs, 1); buffer_pool->combiner = grpc_combiner_create(NULL); buffer_pool->free_pool = INT64_MAX; buffer_pool->size = INT64_MAX; @@ -208,13 +256,36 @@ grpc_buffer_pool *grpc_buffer_pool_create(void) { return buffer_pool; } +void grpc_buffer_pool_internal_unref(grpc_exec_ctx *exec_ctx, + grpc_buffer_pool *buffer_pool) { + if (gpr_unref(&buffer_pool->refs)) { + grpc_combiner_destroy(exec_ctx, buffer_pool->combiner); + gpr_free(buffer_pool); + } +} + +void grpc_buffer_pool_unref(grpc_buffer_pool *buffer_pool) { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); + grpc_exec_ctx_finish(&exec_ctx); +} + +grpc_buffer_pool *grpc_buffer_pool_internal_ref(grpc_buffer_pool *buffer_pool) { + gpr_ref(&buffer_pool->refs); + return buffer_pool; +} + +void grpc_buffer_pool_ref(grpc_buffer_pool *buffer_pool) { + grpc_buffer_pool_internal_ref(buffer_pool); +} + /******************************************************************************* * grpc_buffer_user api */ void grpc_buffer_user_init(grpc_buffer_user *buffer_user, grpc_buffer_pool *buffer_pool) { - buffer_user->buffer_pool = buffer_pool; + buffer_user->buffer_pool = grpc_buffer_pool_internal_ref(buffer_pool); grpc_closure_init(&buffer_user->allocate_closure, &bu_allocate, buffer_user); grpc_closure_init(&buffer_user->add_to_free_pool_closure, &bu_add_to_free_pool, buffer_user); diff --git a/src/core/lib/iomgr/buffer_pool.h b/src/core/lib/iomgr/buffer_pool.h index eec3d4c1e0..087d9a167f 100644 --- a/src/core/lib/iomgr/buffer_pool.h +++ b/src/core/lib/iomgr/buffer_pool.h @@ -43,9 +43,12 @@ typedef enum { GRPC_BULIST_NON_EMPTY_FREE_POOL, GRPC_BULIST_RECLAIMER_BENIGN, GRPC_BULIST_RECLAIMER_DESTRUCTIVE, + GRPC_BULIST_COUNT } grpc_bulist; -typedef struct grpc_buffer_user { +typedef struct grpc_buffer_user grpc_buffer_user; + +struct grpc_buffer_user { grpc_buffer_pool *buffer_pool; grpc_closure allocate_closure; @@ -60,7 +63,9 @@ typedef struct grpc_buffer_user { grpc_closure *reclaimers[2]; grpc_closure post_reclaimer_closure[2]; -} grpc_buffer_user; + + grpc_buffer_user *next[GRPC_BULIST_COUNT]; +}; void grpc_buffer_user_init(grpc_buffer_user *buffer_user, grpc_buffer_pool *buffer_pool); diff --git a/test/core/iomgr/buffer_pool_test.c b/test/core/iomgr/buffer_pool_test.c index 306612f775..670ca0acfa 100644 --- a/test/core/iomgr/buffer_pool_test.c +++ b/test/core/iomgr/buffer_pool_test.c @@ -33,11 +33,19 @@ #include "src/core/lib/iomgr/buffer_pool.h" +#include + #include "test/core/util/test_config.h" +static void test_no_op(void) { + gpr_log(GPR_DEBUG, "** test_no_op **"); + grpc_buffer_pool_unref(grpc_buffer_pool_create()); +} + int main(int argc, char **argv) { grpc_test_init(argc, argv); grpc_init(); + test_no_op(); grpc_shutdown(); return 0; } -- cgit v1.2.3 From fe4f0012c641f5d4322e7afb098a731dd81aa467 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 22 Sep 2016 15:39:40 -0700 Subject: Add resize test --- src/core/lib/iomgr/buffer_pool.c | 34 ++++++++++++++++++++++++++++++++++ test/core/iomgr/buffer_pool_test.c | 8 ++++++++ 2 files changed, 42 insertions(+) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/buffer_pool.c b/src/core/lib/iomgr/buffer_pool.c index 31ca08cc94..17f8893aad 100644 --- a/src/core/lib/iomgr/buffer_pool.c +++ b/src/core/lib/iomgr/buffer_pool.c @@ -138,6 +138,10 @@ static void bpstep_sched(grpc_exec_ctx *exec_ctx, /* returns true if all allocations are completed */ static bool bpalloc(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool) { + if (buffer_pool->free_pool <= 0) { + return false; + } + grpc_buffer_user *buffer_user; while ((buffer_user = bulist_pop(buffer_pool, GRPC_BULIST_AWAITING_ALLOCATION))) { @@ -242,6 +246,25 @@ static void bu_post_destructive_reclaimer(grpc_exec_ctx *exec_ctx, void *bu, bulist_add_tail(buffer_user, GRPC_BULIST_RECLAIMER_DESTRUCTIVE); } +typedef struct { + int64_t size; + grpc_buffer_pool *buffer_pool; + grpc_closure closure; +} bp_resize_args; + +static void bp_resize(grpc_exec_ctx *exec_ctx, void *args, grpc_error *error) { + bp_resize_args *a = args; + int64_t delta = a->size - a->buffer_pool->size; + a->buffer_pool->size += delta; + a->buffer_pool->free_pool += delta; + if (delta < 0 && a->buffer_pool->free_pool < 0) { + bpstep_sched(exec_ctx, a->buffer_pool); + } else if (delta > 0 && + !bulist_empty(a->buffer_pool, GRPC_BULIST_AWAITING_ALLOCATION)) { + bpstep_sched(exec_ctx, a->buffer_pool); + } +} + /******************************************************************************* * grpc_buffer_pool api */ @@ -279,6 +302,17 @@ void grpc_buffer_pool_ref(grpc_buffer_pool *buffer_pool) { grpc_buffer_pool_internal_ref(buffer_pool); } +void grpc_buffer_pool_resize(grpc_buffer_pool *buffer_pool, size_t size) { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + bp_resize_args *a = gpr_malloc(sizeof(*a)); + a->buffer_pool = grpc_buffer_pool_internal_ref(buffer_pool); + a->size = (int64_t)size; + grpc_closure_init(&a->closure, bp_resize, a); + grpc_combiner_execute(&exec_ctx, buffer_pool->combiner, &a->closure, + GRPC_ERROR_NONE); + grpc_exec_ctx_finish(&exec_ctx); +} + /******************************************************************************* * grpc_buffer_user api */ diff --git a/test/core/iomgr/buffer_pool_test.c b/test/core/iomgr/buffer_pool_test.c index 670ca0acfa..8855fe3ab3 100644 --- a/test/core/iomgr/buffer_pool_test.c +++ b/test/core/iomgr/buffer_pool_test.c @@ -42,10 +42,18 @@ static void test_no_op(void) { grpc_buffer_pool_unref(grpc_buffer_pool_create()); } +static void test_resize_then_destroy(void) { + gpr_log(GPR_DEBUG, "** test_resize_then_destroy **"); + grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool_resize(p, 1024 * 1024); + grpc_buffer_pool_unref(p); +} + int main(int argc, char **argv) { grpc_test_init(argc, argv); grpc_init(); test_no_op(); + test_resize_then_destroy(); grpc_shutdown(); return 0; } -- cgit v1.2.3 From 6c9b53e893b01951a2c795abfd38419239ed0e2e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 22 Sep 2016 15:41:06 -0700 Subject: Fix leak --- src/core/lib/iomgr/buffer_pool.c | 2 ++ src/core/lib/iomgr/buffer_pool.h | 4 ++++ 2 files changed, 6 insertions(+) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/buffer_pool.c b/src/core/lib/iomgr/buffer_pool.c index 17f8893aad..8aabd7ab68 100644 --- a/src/core/lib/iomgr/buffer_pool.c +++ b/src/core/lib/iomgr/buffer_pool.c @@ -263,6 +263,8 @@ static void bp_resize(grpc_exec_ctx *exec_ctx, void *args, grpc_error *error) { !bulist_empty(a->buffer_pool, GRPC_BULIST_AWAITING_ALLOCATION)) { bpstep_sched(exec_ctx, a->buffer_pool); } + grpc_buffer_pool_internal_unref(exec_ctx, a->buffer_pool); + gpr_free(a); } /******************************************************************************* diff --git a/src/core/lib/iomgr/buffer_pool.h b/src/core/lib/iomgr/buffer_pool.h index 087d9a167f..290f328b6b 100644 --- a/src/core/lib/iomgr/buffer_pool.h +++ b/src/core/lib/iomgr/buffer_pool.h @@ -38,6 +38,10 @@ #include "src/core/lib/iomgr/exec_ctx.h" +grpc_buffer_pool *grpc_buffer_pool_internal_ref(grpc_buffer_pool *buffer_pool); +void grpc_buffer_pool_internal_unref(grpc_exec_ctx *exec_ctx, + grpc_buffer_pool *buffer_pool); + typedef enum { GRPC_BULIST_AWAITING_ALLOCATION, GRPC_BULIST_NON_EMPTY_FREE_POOL, -- cgit v1.2.3 From d3cfb5ee0e72bdc4b0926a5388bb86e8db5e895b Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 22 Sep 2016 16:05:07 -0700 Subject: Add buffer user no-op test --- src/core/lib/iomgr/buffer_pool.c | 92 +++++++++++++++++++++++++++++--------- src/core/lib/iomgr/buffer_pool.h | 10 ++++- test/core/iomgr/buffer_pool_test.c | 27 ++++++++++- 3 files changed, 106 insertions(+), 23 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/buffer_pool.c b/src/core/lib/iomgr/buffer_pool.c index 8aabd7ab68..8e3cd1608e 100644 --- a/src/core/lib/iomgr/buffer_pool.c +++ b/src/core/lib/iomgr/buffer_pool.c @@ -57,7 +57,7 @@ struct grpc_buffer_pool { bool reclaiming; grpc_closure bpstep_closure; - grpc_buffer_user_list lists[GRPC_BULIST_COUNT]; + grpc_buffer_user *roots[GRPC_BULIST_COUNT]; }; /******************************************************************************* @@ -66,48 +66,71 @@ struct grpc_buffer_pool { static void bulist_add_tail(grpc_buffer_user *buffer_user, grpc_bulist list) { grpc_buffer_pool *buffer_pool = buffer_user->buffer_pool; - grpc_buffer_user_list *lst = &buffer_pool->lists[list]; - if (lst->head == NULL) { - lst->head = lst->tail = buffer_user; + grpc_buffer_user **root = &buffer_pool->roots[list]; + if (*root == NULL) { + *root = buffer_user; + buffer_user->links[list].next = buffer_user->links[list].prev = buffer_user; } else { - lst->tail->next[list] = buffer_user; - lst->tail = buffer_user; + buffer_user->links[list].next = *root; + buffer_user->links[list].prev = (*root)->links[list].prev; + buffer_user->links[list].next->links[list].prev = + buffer_user->links[list].prev->links[list].next = buffer_user; } - buffer_user->next[list] = NULL; } static void bulist_add_head(grpc_buffer_user *buffer_user, grpc_bulist list) { grpc_buffer_pool *buffer_pool = buffer_user->buffer_pool; - grpc_buffer_user_list *lst = &buffer_pool->lists[list]; - if (lst->head == NULL) { - lst->head = lst->tail = buffer_user; - buffer_user->next[list] = NULL; + grpc_buffer_user **root = &buffer_pool->roots[list]; + if (*root == NULL) { + *root = buffer_user; + buffer_user->links[list].next = buffer_user->links[list].prev = buffer_user; } else { - buffer_user->next[list] = lst->head; - lst->head = buffer_user; + buffer_user->links[list].next = (*root)->links[list].next; + buffer_user->links[list].prev = *root; + buffer_user->links[list].next->links[list].prev = + buffer_user->links[list].prev->links[list].next = buffer_user; + *root = buffer_user; } } static bool bulist_empty(grpc_buffer_pool *buffer_pool, grpc_bulist list) { - return buffer_pool->lists[list].head == NULL; + return buffer_pool->roots[list] == NULL; } static grpc_buffer_user *bulist_pop(grpc_buffer_pool *buffer_pool, grpc_bulist list) { - grpc_buffer_user_list *lst = &buffer_pool->lists[list]; - grpc_buffer_user *buffer_user = lst->head; + grpc_buffer_user **root = &buffer_pool->roots[list]; + grpc_buffer_user *buffer_user = *root; if (buffer_user == NULL) { return NULL; } - if (buffer_user == lst->tail) { - lst->head = lst->tail = NULL; + if (buffer_user->links[list].next == buffer_user) { + *root = NULL; } else { - lst->head = buffer_user->next[list]; + buffer_user->links[list].next->links[list].prev = + buffer_user->links[list].prev; + buffer_user->links[list].prev->links[list].next = + buffer_user->links[list].next; } - buffer_user->next[list] = NULL; + buffer_user->links[list].next = buffer_user->links[list].prev = NULL; return buffer_user; } +static void bulist_remove(grpc_buffer_user *buffer_user, grpc_bulist list) { + if (buffer_user->links[list].next == NULL) return; + grpc_buffer_pool *buffer_pool = buffer_user->buffer_pool; + if (buffer_pool->roots[list] == buffer_user) { + buffer_pool->roots[list] = buffer_user->links[list].next; + if (buffer_pool->roots[list] == buffer_user) { + buffer_pool->roots[list] = NULL; + } + } + buffer_user->links[list].next->links[list].prev = + buffer_user->links[list].prev; + buffer_user->links[list].prev->links[list].next = + buffer_user->links[list].next; +} + /******************************************************************************* * buffer pool state machine */ @@ -246,6 +269,20 @@ static void bu_post_destructive_reclaimer(grpc_exec_ctx *exec_ctx, void *bu, bulist_add_tail(buffer_user, GRPC_BULIST_RECLAIMER_DESTRUCTIVE); } +static void bu_destroy(grpc_exec_ctx *exec_ctx, void *bu, grpc_error *error) { + grpc_buffer_user *buffer_user = bu; + GPR_ASSERT(buffer_user->allocated == 0); + for (int i = 0; i < GRPC_BULIST_COUNT; i++) { + bulist_remove(buffer_user, (grpc_bulist)i); + } + grpc_exec_ctx_sched(exec_ctx, buffer_user->reclaimers[0], + GRPC_ERROR_CANCELLED, NULL); + grpc_exec_ctx_sched(exec_ctx, buffer_user->reclaimers[1], + GRPC_ERROR_CANCELLED, NULL); + grpc_exec_ctx_sched(exec_ctx, buffer_user->on_done_destroy, GRPC_ERROR_NONE, + NULL); +} + typedef struct { int64_t size; grpc_buffer_pool *buffer_pool; @@ -278,6 +315,9 @@ grpc_buffer_pool *grpc_buffer_pool_create(void) { buffer_pool->free_pool = INT64_MAX; buffer_pool->size = INT64_MAX; grpc_closure_init(&buffer_pool->bpstep_closure, bpstep, buffer_pool); + for (int i = 0; i < GRPC_BULIST_COUNT; i++) { + buffer_pool->roots[i] = NULL; + } return buffer_pool; } @@ -329,12 +369,24 @@ void grpc_buffer_user_init(grpc_buffer_user *buffer_user, &bu_post_benign_reclaimer, buffer_user); grpc_closure_init(&buffer_user->post_reclaimer_closure[1], &bu_post_destructive_reclaimer, buffer_user); + grpc_closure_init(&buffer_user->destroy_closure, &bu_destroy, buffer_user); gpr_mu_init(&buffer_user->mu); buffer_user->allocated = 0; buffer_user->free_pool = 0; grpc_closure_list_init(&buffer_user->on_allocated); buffer_user->allocating = false; buffer_user->added_to_free_pool = false; + for (int i = 0; i < GRPC_BULIST_COUNT; i++) { + buffer_user->links[i].next = buffer_user->links[i].prev = NULL; + } +} + +void grpc_buffer_user_destroy(grpc_exec_ctx *exec_ctx, + grpc_buffer_user *buffer_user, + grpc_closure *on_done) { + buffer_user->on_done_destroy = on_done; + grpc_combiner_execute(exec_ctx, buffer_user->buffer_pool->combiner, + &buffer_user->destroy_closure, GRPC_ERROR_NONE); } void grpc_buffer_user_alloc(grpc_exec_ctx *exec_ctx, diff --git a/src/core/lib/iomgr/buffer_pool.h b/src/core/lib/iomgr/buffer_pool.h index 290f328b6b..2774a445e3 100644 --- a/src/core/lib/iomgr/buffer_pool.h +++ b/src/core/lib/iomgr/buffer_pool.h @@ -52,6 +52,11 @@ typedef enum { typedef struct grpc_buffer_user grpc_buffer_user; +typedef struct { + grpc_buffer_user *next; + grpc_buffer_user *prev; +} grpc_buffer_user_link; + struct grpc_buffer_user { grpc_buffer_pool *buffer_pool; @@ -68,7 +73,10 @@ struct grpc_buffer_user { grpc_closure *reclaimers[2]; grpc_closure post_reclaimer_closure[2]; - grpc_buffer_user *next[GRPC_BULIST_COUNT]; + grpc_closure destroy_closure; + grpc_closure *on_done_destroy; + + grpc_buffer_user_link links[GRPC_BULIST_COUNT]; }; void grpc_buffer_user_init(grpc_buffer_user *buffer_user, diff --git a/test/core/iomgr/buffer_pool_test.c b/test/core/iomgr/buffer_pool_test.c index 8855fe3ab3..d28b557f7d 100644 --- a/test/core/iomgr/buffer_pool_test.c +++ b/test/core/iomgr/buffer_pool_test.c @@ -37,23 +37,46 @@ #include "test/core/util/test_config.h" +static void set_bool_cb(grpc_exec_ctx *exec_ctx, void *a, grpc_error *error) { + *(bool *)a = true; +} +grpc_closure *set_bool(bool *p) { return grpc_closure_create(set_bool_cb, p); } + +static void destroy_user(grpc_buffer_user *usr) { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + bool done = false; + grpc_buffer_user_destroy(&exec_ctx, usr, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(done); +} + static void test_no_op(void) { - gpr_log(GPR_DEBUG, "** test_no_op **"); + gpr_log(GPR_INFO, "** test_no_op **"); grpc_buffer_pool_unref(grpc_buffer_pool_create()); } static void test_resize_then_destroy(void) { - gpr_log(GPR_DEBUG, "** test_resize_then_destroy **"); + gpr_log(GPR_INFO, "** test_resize_then_destroy **"); grpc_buffer_pool *p = grpc_buffer_pool_create(); grpc_buffer_pool_resize(p, 1024 * 1024); grpc_buffer_pool_unref(p); } +static void test_buffer_user_no_op(void) { + gpr_log(GPR_INFO, "** test_buffer_user_no_op **"); + grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_user usr; + grpc_buffer_user_init(&usr, p); + grpc_buffer_pool_unref(p); + destroy_user(&usr); +} + int main(int argc, char **argv) { grpc_test_init(argc, argv); grpc_init(); test_no_op(); test_resize_then_destroy(); + test_buffer_user_no_op(); grpc_shutdown(); return 0; } -- cgit v1.2.3 From 959d6541d15081cf758b7513ddba9bcb4711b9ea Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 22 Sep 2016 16:15:27 -0700 Subject: Fix tests to run --- src/core/lib/iomgr/buffer_pool.c | 14 +++++++++----- test/core/iomgr/buffer_pool_test.c | 2 ++ 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/buffer_pool.c b/src/core/lib/iomgr/buffer_pool.c index 8e3cd1608e..b0d617bf7e 100644 --- a/src/core/lib/iomgr/buffer_pool.c +++ b/src/core/lib/iomgr/buffer_pool.c @@ -281,6 +281,7 @@ static void bu_destroy(grpc_exec_ctx *exec_ctx, void *bu, grpc_error *error) { GRPC_ERROR_CANCELLED, NULL); grpc_exec_ctx_sched(exec_ctx, buffer_user->on_done_destroy, GRPC_ERROR_NONE, NULL); + grpc_buffer_pool_internal_unref(exec_ctx, buffer_user->buffer_pool); } typedef struct { @@ -351,7 +352,7 @@ void grpc_buffer_pool_resize(grpc_buffer_pool *buffer_pool, size_t size) { a->size = (int64_t)size; grpc_closure_init(&a->closure, bp_resize, a); grpc_combiner_execute(&exec_ctx, buffer_pool->combiner, &a->closure, - GRPC_ERROR_NONE); + GRPC_ERROR_NONE, false); grpc_exec_ctx_finish(&exec_ctx); } @@ -376,6 +377,8 @@ void grpc_buffer_user_init(grpc_buffer_user *buffer_user, grpc_closure_list_init(&buffer_user->on_allocated); buffer_user->allocating = false; buffer_user->added_to_free_pool = false; + buffer_user->reclaimers[0] = NULL; + buffer_user->reclaimers[1] = NULL; for (int i = 0; i < GRPC_BULIST_COUNT; i++) { buffer_user->links[i].next = buffer_user->links[i].prev = NULL; } @@ -386,7 +389,7 @@ void grpc_buffer_user_destroy(grpc_exec_ctx *exec_ctx, grpc_closure *on_done) { buffer_user->on_done_destroy = on_done; grpc_combiner_execute(exec_ctx, buffer_user->buffer_pool->combiner, - &buffer_user->destroy_closure, GRPC_ERROR_NONE); + &buffer_user->destroy_closure, GRPC_ERROR_NONE, false); } void grpc_buffer_user_alloc(grpc_exec_ctx *exec_ctx, @@ -401,7 +404,8 @@ void grpc_buffer_user_alloc(grpc_exec_ctx *exec_ctx, if (!buffer_user->allocating) { buffer_user->allocating = true; grpc_combiner_execute(exec_ctx, buffer_user->buffer_pool->combiner, - &buffer_user->allocate_closure, GRPC_ERROR_NONE); + &buffer_user->allocate_closure, GRPC_ERROR_NONE, + false); } } else { grpc_exec_ctx_sched(exec_ctx, optional_on_done, GRPC_ERROR_NONE, NULL); @@ -422,7 +426,7 @@ void grpc_buffer_user_free(grpc_exec_ctx *exec_ctx, buffer_user->added_to_free_pool = true; grpc_combiner_execute(exec_ctx, buffer_user->buffer_pool->combiner, &buffer_user->add_to_free_pool_closure, - GRPC_ERROR_NONE); + GRPC_ERROR_NONE, false); } gpr_mu_unlock(&buffer_user->mu); } @@ -434,5 +438,5 @@ void grpc_buffer_user_post_reclaimer(grpc_exec_ctx *exec_ctx, buffer_user->reclaimers[destructive] = closure; grpc_combiner_execute(exec_ctx, buffer_user->buffer_pool->combiner, &buffer_user->post_reclaimer_closure[destructive], - GRPC_ERROR_NONE); + GRPC_ERROR_NONE, false); } diff --git a/test/core/iomgr/buffer_pool_test.c b/test/core/iomgr/buffer_pool_test.c index 7993d94100..689f8c2c31 100644 --- a/test/core/iomgr/buffer_pool_test.c +++ b/test/core/iomgr/buffer_pool_test.c @@ -74,6 +74,7 @@ static void test_buffer_user_no_op(void) { static void test_instant_alloc_then_free(void) { gpr_log(GPR_INFO, "** test_instant_alloc_then_free **"); grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool_resize(p, 1024 * 1024); grpc_buffer_user usr; grpc_buffer_user_init(&usr, p); { @@ -93,6 +94,7 @@ static void test_instant_alloc_then_free(void) { static void test_instant_alloc_free_pair(void) { gpr_log(GPR_INFO, "** test_instant_alloc_free_pair **"); grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool_resize(p, 1024 * 1024); grpc_buffer_user usr; grpc_buffer_user_init(&usr, p); { -- cgit v1.2.3 From b7810a14b9bdece46a05763890af199dd5426e6a Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 22 Sep 2016 16:27:12 -0700 Subject: Add a blocked async alloc test --- src/core/lib/iomgr/buffer_pool.c | 2 +- test/core/iomgr/buffer_pool_test.c | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/buffer_pool.c b/src/core/lib/iomgr/buffer_pool.c index b0d617bf7e..98b3289af9 100644 --- a/src/core/lib/iomgr/buffer_pool.c +++ b/src/core/lib/iomgr/buffer_pool.c @@ -170,7 +170,7 @@ static bool bpalloc(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool) { bulist_pop(buffer_pool, GRPC_BULIST_AWAITING_ALLOCATION))) { gpr_mu_lock(&buffer_user->mu); if (buffer_user->free_pool < 0 && - -buffer_user->free_pool < buffer_pool->free_pool) { + -buffer_user->free_pool <= buffer_pool->free_pool) { buffer_pool->free_pool += buffer_user->free_pool; buffer_user->free_pool = 0; } diff --git a/test/core/iomgr/buffer_pool_test.c b/test/core/iomgr/buffer_pool_test.c index 10565be3c2..5ec15cca80 100644 --- a/test/core/iomgr/buffer_pool_test.c +++ b/test/core/iomgr/buffer_pool_test.c @@ -129,6 +129,30 @@ static void test_simple_async_alloc(void) { destroy_user(&usr); } +static void test_async_alloc_blocked_by_size(void) { + gpr_log(GPR_INFO, "** test_async_alloc_blocked_by_size **"); + grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool_resize(p, 1); + grpc_buffer_user usr; + grpc_buffer_user_init(&usr, p); + bool done = false; + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(!done); + } + grpc_buffer_pool_resize(p, 1024); + GPR_ASSERT(done); + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_free(&exec_ctx, &usr, 1024); + grpc_exec_ctx_finish(&exec_ctx); + } + grpc_buffer_pool_unref(p); + destroy_user(&usr); +} + int main(int argc, char **argv) { grpc_test_init(argc, argv); grpc_init(); @@ -138,6 +162,7 @@ int main(int argc, char **argv) { test_instant_alloc_then_free(); test_instant_alloc_free_pair(); test_simple_async_alloc(); + test_async_alloc_blocked_by_size(); grpc_shutdown(); return 0; } -- cgit v1.2.3 From 12b925d2bb05309a54cdcb896ae53a6868b0a010 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 22 Sep 2016 16:41:09 -0700 Subject: Made scavenging work --- src/core/lib/iomgr/buffer_pool.c | 4 ++-- test/core/iomgr/buffer_pool_test.c | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 2 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/buffer_pool.c b/src/core/lib/iomgr/buffer_pool.c index 98b3289af9..26578e83cc 100644 --- a/src/core/lib/iomgr/buffer_pool.c +++ b/src/core/lib/iomgr/buffer_pool.c @@ -193,7 +193,7 @@ static bool bpscavenge(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool) { while ((buffer_user = bulist_pop(buffer_pool, GRPC_BULIST_NON_EMPTY_FREE_POOL))) { gpr_mu_lock(&buffer_user->mu); - if (buffer_pool->free_pool > 0) { + if (buffer_user->free_pool > 0) { buffer_pool->free_pool += buffer_user->free_pool; buffer_user->free_pool = 0; gpr_mu_unlock(&buffer_user->mu); @@ -240,7 +240,7 @@ static void bu_add_to_free_pool(grpc_exec_ctx *exec_ctx, void *bu, bulist_empty(buffer_user->buffer_pool, GRPC_BULIST_NON_EMPTY_FREE_POOL)) { bpstep_sched(exec_ctx, buffer_user->buffer_pool); } - bulist_add_tail(buffer_user, GRPC_BULIST_AWAITING_ALLOCATION); + bulist_add_tail(buffer_user, GRPC_BULIST_NON_EMPTY_FREE_POOL); } static void bu_post_benign_reclaimer(grpc_exec_ctx *exec_ctx, void *bu, diff --git a/test/core/iomgr/buffer_pool_test.c b/test/core/iomgr/buffer_pool_test.c index 5ec15cca80..aec3869a94 100644 --- a/test/core/iomgr/buffer_pool_test.c +++ b/test/core/iomgr/buffer_pool_test.c @@ -153,6 +153,43 @@ static void test_async_alloc_blocked_by_size(void) { destroy_user(&usr); } +static void test_scavenge(void) { + gpr_log(GPR_INFO, "** test_scavenge **"); + grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool_resize(p, 1024); + grpc_buffer_user usr1; + grpc_buffer_user usr2; + grpc_buffer_user_init(&usr1, p); + grpc_buffer_user_init(&usr2, p); + { + bool done = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_alloc(&exec_ctx, &usr1, 1024, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(done); + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_free(&exec_ctx, &usr1, 1024); + grpc_exec_ctx_finish(&exec_ctx); + } + { + bool done = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_alloc(&exec_ctx, &usr2, 1024, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(done); + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_free(&exec_ctx, &usr2, 1024); + grpc_exec_ctx_finish(&exec_ctx); + } + grpc_buffer_pool_unref(p); + destroy_user(&usr1); + destroy_user(&usr2); +} + int main(int argc, char **argv) { grpc_test_init(argc, argv); grpc_init(); @@ -163,6 +200,7 @@ int main(int argc, char **argv) { test_instant_alloc_free_pair(); test_simple_async_alloc(); test_async_alloc_blocked_by_size(); + test_scavenge(); grpc_shutdown(); return 0; } -- cgit v1.2.3 From 3fe56b52de02079eea98590adcc852dc9e3aaffd Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 22 Sep 2016 17:04:53 -0700 Subject: Add a test of reclaimation --- src/core/lib/iomgr/buffer_pool.c | 15 +++++++++ test/core/iomgr/buffer_pool_test.c | 62 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/buffer_pool.c b/src/core/lib/iomgr/buffer_pool.c index 26578e83cc..a6824f9432 100644 --- a/src/core/lib/iomgr/buffer_pool.c +++ b/src/core/lib/iomgr/buffer_pool.c @@ -56,6 +56,7 @@ struct grpc_buffer_pool { bool step_scheduled; bool reclaiming; grpc_closure bpstep_closure; + grpc_closure bpreclaimation_done_closure; grpc_buffer_user *roots[GRPC_BULIST_COUNT]; }; @@ -305,6 +306,11 @@ static void bp_resize(grpc_exec_ctx *exec_ctx, void *args, grpc_error *error) { gpr_free(a); } +static void bpreclaimation_done_closure(grpc_exec_ctx *exec_ctx, void *bp, + grpc_error *error) { + bpstep_sched(exec_ctx, bp); +} + /******************************************************************************* * grpc_buffer_pool api */ @@ -316,6 +322,8 @@ grpc_buffer_pool *grpc_buffer_pool_create(void) { buffer_pool->free_pool = INT64_MAX; buffer_pool->size = INT64_MAX; grpc_closure_init(&buffer_pool->bpstep_closure, bpstep, buffer_pool); + grpc_closure_init(&buffer_pool->bpreclaimation_done_closure, + bpreclaimation_done_closure, buffer_pool); for (int i = 0; i < GRPC_BULIST_COUNT; i++) { buffer_pool->roots[i] = NULL; } @@ -440,3 +448,10 @@ void grpc_buffer_user_post_reclaimer(grpc_exec_ctx *exec_ctx, &buffer_user->post_reclaimer_closure[destructive], GRPC_ERROR_NONE, false); } + +void grpc_buffer_user_finish_reclaimation(grpc_exec_ctx *exec_ctx, + grpc_buffer_user *buffer_user) { + grpc_combiner_execute(exec_ctx, buffer_user->buffer_pool->combiner, + &buffer_user->buffer_pool->bpreclaimation_done_closure, + GRPC_ERROR_NONE, false); +} diff --git a/test/core/iomgr/buffer_pool_test.c b/test/core/iomgr/buffer_pool_test.c index f659c5c5b4..ba44af5144 100644 --- a/test/core/iomgr/buffer_pool_test.c +++ b/test/core/iomgr/buffer_pool_test.c @@ -33,6 +33,7 @@ #include "src/core/lib/iomgr/buffer_pool.h" +#include #include #include "test/core/util/test_config.h" @@ -42,6 +43,28 @@ static void set_bool_cb(grpc_exec_ctx *exec_ctx, void *a, grpc_error *error) { } grpc_closure *set_bool(bool *p) { return grpc_closure_create(set_bool_cb, p); } +typedef struct { + size_t size; + grpc_buffer_user *buffer_user; + grpc_closure *then; +} reclaimer_args; +static void reclaimer_cb(grpc_exec_ctx *exec_ctx, void *args, + grpc_error *error) { + reclaimer_args *a = args; + grpc_buffer_user_free(exec_ctx, a->buffer_user, a->size); + grpc_buffer_user_finish_reclaimation(exec_ctx, a->buffer_user); + grpc_closure_run(exec_ctx, a->then, GRPC_ERROR_NONE); + gpr_free(a); +} +grpc_closure *make_reclaimer(grpc_buffer_user *buffer_user, size_t size, + grpc_closure *then) { + reclaimer_args *a = gpr_malloc(sizeof(*a)); + a->size = size; + a->buffer_user = buffer_user; + a->then = then; + return grpc_closure_create(reclaimer_cb, a); +} + static void destroy_user(grpc_buffer_user *usr) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; bool done = false; @@ -229,6 +252,44 @@ static void test_scavenge_blocked(void) { destroy_user(&usr2); } +static void test_blocked_until_scheduled_reclaim(void) { + gpr_log(GPR_INFO, "** test_blocked_until_scheduled_reclaim **"); + grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool_resize(p, 1024); + grpc_buffer_user usr; + grpc_buffer_user_init(&usr, p); + { + bool done = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(done); + } + bool reclaim_done = false; + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_post_reclaimer( + &exec_ctx, &usr, false, + make_reclaimer(&usr, 1024, set_bool(&reclaim_done))); + grpc_exec_ctx_finish(&exec_ctx); + } + { + bool done = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(reclaim_done); + GPR_ASSERT(done); + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_free(&exec_ctx, &usr, 1024); + grpc_exec_ctx_finish(&exec_ctx); + } + grpc_buffer_pool_unref(p); + destroy_user(&usr); +} + int main(int argc, char **argv) { grpc_test_init(argc, argv); grpc_init(); @@ -241,6 +302,7 @@ int main(int argc, char **argv) { test_async_alloc_blocked_by_size(); test_scavenge(); test_scavenge_blocked(); + test_blocked_until_scheduled_reclaim(); grpc_shutdown(); return 0; } -- cgit v1.2.3 From ee70ca67c15b7b36fbd12a492d5094adc1344fb6 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 23 Sep 2016 08:35:58 -0700 Subject: Fix list mixup --- src/core/lib/iomgr/buffer_pool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/buffer_pool.c b/src/core/lib/iomgr/buffer_pool.c index a6824f9432..46dd6d9ce1 100644 --- a/src/core/lib/iomgr/buffer_pool.c +++ b/src/core/lib/iomgr/buffer_pool.c @@ -210,8 +210,8 @@ static bool bpscavenge(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool) { static bool bpreclaim(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool, bool destructive) { if (buffer_pool->reclaiming) return true; - grpc_bulist list = destructive ? GRPC_BULIST_RECLAIMER_BENIGN - : GRPC_BULIST_RECLAIMER_DESTRUCTIVE; + grpc_bulist list = destructive ? GRPC_BULIST_RECLAIMER_DESTRUCTIVE + : GRPC_BULIST_RECLAIMER_BENIGN; grpc_buffer_user *buffer_user = bulist_pop(buffer_pool, list); if (buffer_user == NULL) return false; buffer_pool->reclaiming = true; -- cgit v1.2.3 From 6b72834c8aa215e90e8f4d47bbe4e4a65521b8c8 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 23 Sep 2016 08:44:43 -0700 Subject: Compilation, initialization fixes --- src/core/lib/iomgr/buffer_pool.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/buffer_pool.c b/src/core/lib/iomgr/buffer_pool.c index 46dd6d9ce1..d2464ff079 100644 --- a/src/core/lib/iomgr/buffer_pool.c +++ b/src/core/lib/iomgr/buffer_pool.c @@ -321,6 +321,8 @@ grpc_buffer_pool *grpc_buffer_pool_create(void) { buffer_pool->combiner = grpc_combiner_create(NULL); buffer_pool->free_pool = INT64_MAX; buffer_pool->size = INT64_MAX; + buffer_pool->step_scheduled = false; + buffer_pool->reclaiming = false; grpc_closure_init(&buffer_pool->bpstep_closure, bpstep, buffer_pool); grpc_closure_init(&buffer_pool->bpreclaimation_done_closure, bpreclaimation_done_closure, buffer_pool); @@ -404,8 +406,8 @@ void grpc_buffer_user_alloc(grpc_exec_ctx *exec_ctx, grpc_buffer_user *buffer_user, size_t size, grpc_closure *optional_on_done) { gpr_mu_lock(&buffer_user->mu); - buffer_user->allocated += size; - buffer_user->free_pool -= size; + buffer_user->allocated += (int64_t)size; + buffer_user->free_pool -= (int64_t)size; if (buffer_user->free_pool < 0) { grpc_closure_list_append(&buffer_user->on_allocated, optional_on_done, GRPC_ERROR_NONE); @@ -426,8 +428,8 @@ void grpc_buffer_user_free(grpc_exec_ctx *exec_ctx, gpr_mu_lock(&buffer_user->mu); GPR_ASSERT(buffer_user->allocated >= (int64_t)size); bool was_zero_or_negative = buffer_user->free_pool <= 0; - buffer_user->free_pool += size; - buffer_user->allocated -= size; + buffer_user->free_pool += (int64_t)size; + buffer_user->allocated -= (int64_t)size; bool is_bigger_than_zero = buffer_user->free_pool > 0; if (is_bigger_than_zero && was_zero_or_negative && !buffer_user->added_to_free_pool) { -- cgit v1.2.3 From 9cf0cec74c81e122864a0a11109c787fe8b452cd Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 23 Sep 2016 09:10:08 -0700 Subject: Fairly complete set of tests for buffer pools in place --- src/core/lib/iomgr/buffer_pool.c | 8 +- test/core/iomgr/buffer_pool_test.c | 213 +++++++++++++++++++++++++++++++++++++ 2 files changed, 216 insertions(+), 5 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/buffer_pool.c b/src/core/lib/iomgr/buffer_pool.c index d2464ff079..c7e1fcbf4a 100644 --- a/src/core/lib/iomgr/buffer_pool.c +++ b/src/core/lib/iomgr/buffer_pool.c @@ -162,10 +162,6 @@ static void bpstep_sched(grpc_exec_ctx *exec_ctx, /* returns true if all allocations are completed */ static bool bpalloc(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool) { - if (buffer_pool->free_pool <= 0) { - return false; - } - grpc_buffer_user *buffer_user; while ((buffer_user = bulist_pop(buffer_pool, GRPC_BULIST_AWAITING_ALLOCATION))) { @@ -308,7 +304,9 @@ static void bp_resize(grpc_exec_ctx *exec_ctx, void *args, grpc_error *error) { static void bpreclaimation_done_closure(grpc_exec_ctx *exec_ctx, void *bp, grpc_error *error) { - bpstep_sched(exec_ctx, bp); + grpc_buffer_pool *buffer_pool = bp; + buffer_pool->reclaiming = false; + bpstep_sched(exec_ctx, buffer_pool); } /******************************************************************************* diff --git a/test/core/iomgr/buffer_pool_test.c b/test/core/iomgr/buffer_pool_test.c index ba44af5144..7438d088ac 100644 --- a/test/core/iomgr/buffer_pool_test.c +++ b/test/core/iomgr/buffer_pool_test.c @@ -50,6 +50,7 @@ typedef struct { } reclaimer_args; static void reclaimer_cb(grpc_exec_ctx *exec_ctx, void *args, grpc_error *error) { + GPR_ASSERT(error == GRPC_ERROR_NONE); reclaimer_args *a = args; grpc_buffer_user_free(exec_ctx, a->buffer_user, a->size); grpc_buffer_user_finish_reclaimation(exec_ctx, a->buffer_user); @@ -65,6 +66,15 @@ grpc_closure *make_reclaimer(grpc_buffer_user *buffer_user, size_t size, return grpc_closure_create(reclaimer_cb, a); } +static void unused_reclaimer_cb(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { + GPR_ASSERT(error == GRPC_ERROR_CANCELLED); + grpc_closure_run(exec_ctx, arg, GRPC_ERROR_NONE); +} +grpc_closure *make_unused_reclaimer(grpc_closure *then) { + return grpc_closure_create(unused_reclaimer_cb, then); +} + static void destroy_user(grpc_buffer_user *usr) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; bool done = false; @@ -290,6 +300,204 @@ static void test_blocked_until_scheduled_reclaim(void) { destroy_user(&usr); } +static void test_blocked_until_scheduled_reclaim_and_scavenge(void) { + gpr_log(GPR_INFO, "** test_blocked_until_scheduled_reclaim_and_scavenge **"); + grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool_resize(p, 1024); + grpc_buffer_user usr1; + grpc_buffer_user usr2; + grpc_buffer_user_init(&usr1, p); + grpc_buffer_user_init(&usr2, p); + { + bool done = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_alloc(&exec_ctx, &usr1, 1024, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(done); + } + bool reclaim_done = false; + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_post_reclaimer( + &exec_ctx, &usr1, false, + make_reclaimer(&usr1, 1024, set_bool(&reclaim_done))); + grpc_exec_ctx_finish(&exec_ctx); + } + { + bool done = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_alloc(&exec_ctx, &usr2, 1024, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(reclaim_done); + GPR_ASSERT(done); + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_free(&exec_ctx, &usr2, 1024); + grpc_exec_ctx_finish(&exec_ctx); + } + grpc_buffer_pool_unref(p); + destroy_user(&usr1); + destroy_user(&usr2); +} + +static void test_blocked_until_scheduled_destructive_reclaim(void) { + gpr_log(GPR_INFO, "** test_blocked_until_scheduled_destructive_reclaim **"); + grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool_resize(p, 1024); + grpc_buffer_user usr; + grpc_buffer_user_init(&usr, p); + { + bool done = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(done); + } + bool reclaim_done = false; + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_post_reclaimer( + &exec_ctx, &usr, true, + make_reclaimer(&usr, 1024, set_bool(&reclaim_done))); + grpc_exec_ctx_finish(&exec_ctx); + } + { + bool done = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(reclaim_done); + GPR_ASSERT(done); + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_free(&exec_ctx, &usr, 1024); + grpc_exec_ctx_finish(&exec_ctx); + } + grpc_buffer_pool_unref(p); + destroy_user(&usr); +} + +static void test_unused_reclaim_is_cancelled(void) { + gpr_log(GPR_INFO, "** test_unused_reclaim_is_cancelled **"); + grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool_resize(p, 1024); + grpc_buffer_user usr; + grpc_buffer_user_init(&usr, p); + bool benign_done = false; + bool destructive_done = false; + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_post_reclaimer( + &exec_ctx, &usr, false, make_unused_reclaimer(set_bool(&benign_done))); + grpc_buffer_user_post_reclaimer( + &exec_ctx, &usr, true, + make_unused_reclaimer(set_bool(&destructive_done))); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(!benign_done); + GPR_ASSERT(!destructive_done); + } + grpc_buffer_pool_unref(p); + destroy_user(&usr); + GPR_ASSERT(benign_done); + GPR_ASSERT(destructive_done); +} + +static void test_benign_reclaim_is_preferred(void) { + gpr_log(GPR_INFO, "** test_benign_reclaim_is_preferred **"); + grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool_resize(p, 1024); + grpc_buffer_user usr; + grpc_buffer_user_init(&usr, p); + bool benign_done = false; + bool destructive_done = false; + { + bool done = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(done); + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_post_reclaimer( + &exec_ctx, &usr, false, + make_reclaimer(&usr, 1024, set_bool(&benign_done))); + grpc_buffer_user_post_reclaimer( + &exec_ctx, &usr, true, + make_unused_reclaimer(set_bool(&destructive_done))); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(!benign_done); + GPR_ASSERT(!destructive_done); + } + { + bool done = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(benign_done); + GPR_ASSERT(!destructive_done); + GPR_ASSERT(done); + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_free(&exec_ctx, &usr, 1024); + grpc_exec_ctx_finish(&exec_ctx); + } + grpc_buffer_pool_unref(p); + destroy_user(&usr); + GPR_ASSERT(benign_done); + GPR_ASSERT(destructive_done); +} + +static void test_multiple_reclaims_can_be_triggered(void) { + gpr_log(GPR_INFO, "** test_multiple_reclaims_can_be_triggered **"); + grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool_resize(p, 1024); + grpc_buffer_user usr; + grpc_buffer_user_init(&usr, p); + bool benign_done = false; + bool destructive_done = false; + { + bool done = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(done); + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_post_reclaimer( + &exec_ctx, &usr, false, + make_reclaimer(&usr, 512, set_bool(&benign_done))); + grpc_buffer_user_post_reclaimer( + &exec_ctx, &usr, true, + make_reclaimer(&usr, 512, set_bool(&destructive_done))); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(!benign_done); + GPR_ASSERT(!destructive_done); + } + { + bool done = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(benign_done); + GPR_ASSERT(destructive_done); + GPR_ASSERT(done); + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_free(&exec_ctx, &usr, 1024); + grpc_exec_ctx_finish(&exec_ctx); + } + grpc_buffer_pool_unref(p); + destroy_user(&usr); + GPR_ASSERT(benign_done); + GPR_ASSERT(destructive_done); +} + int main(int argc, char **argv) { grpc_test_init(argc, argv); grpc_init(); @@ -303,6 +511,11 @@ int main(int argc, char **argv) { test_scavenge(); test_scavenge_blocked(); test_blocked_until_scheduled_reclaim(); + test_blocked_until_scheduled_reclaim_and_scavenge(); + test_blocked_until_scheduled_destructive_reclaim(); + test_unused_reclaim_is_cancelled(); + test_benign_reclaim_is_preferred(); + test_multiple_reclaims_can_be_triggered(); grpc_shutdown(); return 0; } -- cgit v1.2.3 From e34c285ac94892cb21bd6fa50d4ecdc49e85cd85 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 23 Sep 2016 09:43:32 -0700 Subject: Buffer pool integration progress --- .../chttp2/server/secure/server_secure_chttp2.c | 2 +- src/core/lib/http/httpcli.c | 20 +++++++++++++------ src/core/lib/http/httpcli.h | 2 ++ src/core/lib/iomgr/endpoint.h | 4 ++++ src/core/lib/iomgr/endpoint_pair.h | 4 ++-- src/core/lib/iomgr/endpoint_pair_posix.c | 12 +++++------ src/core/lib/iomgr/tcp_client.h | 1 + src/core/lib/iomgr/tcp_client_posix.c | 20 +++++++++++++------ src/core/lib/iomgr/tcp_posix.c | 13 ++++++++++-- src/core/lib/iomgr/tcp_posix.h | 4 ++-- src/core/lib/iomgr/tcp_server.h | 3 ++- src/core/lib/iomgr/tcp_server_posix.c | 23 ++++++++++++++++++++-- .../google_default/google_default_credentials.c | 4 +++- 13 files changed, 83 insertions(+), 29 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index da3e284fcf..947e68f3f2 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -256,7 +256,7 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, state = gpr_malloc(sizeof(*state)); memset(state, 0, sizeof(*state)); grpc_closure_init(&state->destroy_closure, destroy_done, state); - err = grpc_tcp_server_create(&state->destroy_closure, + err = grpc_tcp_server_create(&exec_ctx, &state->destroy_closure, grpc_server_get_channel_args(server), &tcp); if (err != GRPC_ERROR_NONE) { goto error; diff --git a/src/core/lib/http/httpcli.c b/src/core/lib/http/httpcli.c index 18135bcb58..593da734f2 100644 --- a/src/core/lib/http/httpcli.c +++ b/src/core/lib/http/httpcli.c @@ -71,6 +71,7 @@ typedef struct { grpc_closure done_write; grpc_closure connected; grpc_error *overall_error; + grpc_buffer_pool *buffer_pool; } internal_request; static grpc_httpcli_get_override g_get_override = NULL; @@ -118,6 +119,7 @@ static void finish(grpc_exec_ctx *exec_ctx, internal_request *req, gpr_slice_buffer_destroy(&req->incoming); gpr_slice_buffer_destroy(&req->outgoing); GRPC_ERROR_UNREF(req->overall_error); + grpc_buffer_pool_internal_unref(exec_ctx, req->buffer_pool); gpr_free(req); } @@ -224,9 +226,10 @@ static void next_address(grpc_exec_ctx *exec_ctx, internal_request *req, } addr = &req->addresses->addrs[req->next_address++]; grpc_closure_init(&req->connected, on_connected, req); - grpc_tcp_client_connect( - exec_ctx, &req->connected, &req->ep, req->context->pollset_set, - (struct sockaddr *)&addr->addr, addr->len, req->deadline); + grpc_tcp_client_connect(exec_ctx, &req->connected, &req->ep, + req->context->pollset_set, req->buffer_pool, + (struct sockaddr *)&addr->addr, addr->len, + req->deadline); } static void on_resolved(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { @@ -242,6 +245,7 @@ static void on_resolved(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { static void internal_request_begin(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, grpc_polling_entity *pollent, + grpc_buffer_pool *buffer_pool, const grpc_httpcli_request *request, gpr_timespec deadline, grpc_closure *on_done, grpc_httpcli_response *response, @@ -257,6 +261,7 @@ static void internal_request_begin(grpc_exec_ctx *exec_ctx, req->context = context; req->pollent = pollent; req->overall_error = GRPC_ERROR_NONE; + req->buffer_pool = grpc_buffer_pool_internal_ref(buffer_pool); grpc_closure_init(&req->on_read, on_read, req); grpc_closure_init(&req->done_write, done_write, req); gpr_slice_buffer_init(&req->incoming); @@ -274,6 +279,7 @@ static void internal_request_begin(grpc_exec_ctx *exec_ctx, void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, grpc_polling_entity *pollent, + grpc_buffer_pool *buffer_pool, const grpc_httpcli_request *request, gpr_timespec deadline, grpc_closure *on_done, grpc_httpcli_response *response) { @@ -283,14 +289,15 @@ void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, return; } gpr_asprintf(&name, "HTTP:GET:%s:%s", request->host, request->http.path); - internal_request_begin(exec_ctx, context, pollent, request, deadline, on_done, - response, name, + internal_request_begin(exec_ctx, context, pollent, buffer_pool, request, + deadline, on_done, response, name, grpc_httpcli_format_get_request(request)); gpr_free(name); } void grpc_httpcli_post(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, grpc_polling_entity *pollent, + grpc_buffer_pool *buffer_pool, const grpc_httpcli_request *request, const char *body_bytes, size_t body_size, gpr_timespec deadline, grpc_closure *on_done, @@ -303,7 +310,8 @@ void grpc_httpcli_post(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, } gpr_asprintf(&name, "HTTP:POST:%s:%s", request->host, request->http.path); internal_request_begin( - exec_ctx, context, pollent, request, deadline, on_done, response, name, + exec_ctx, context, pollent, buffer_pool, request, deadline, on_done, + response, name, grpc_httpcli_format_post_request(request, body_bytes, body_size)); gpr_free(name); } diff --git a/src/core/lib/http/httpcli.h b/src/core/lib/http/httpcli.h index 662e176f4c..7c7b20433e 100644 --- a/src/core/lib/http/httpcli.h +++ b/src/core/lib/http/httpcli.h @@ -97,6 +97,7 @@ void grpc_httpcli_context_destroy(grpc_httpcli_context *context); supplied pointer to pass to said call) */ void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, grpc_polling_entity *pollent, + grpc_buffer_pool *buffer_pool, const grpc_httpcli_request *request, gpr_timespec deadline, grpc_closure *on_complete, grpc_httpcli_response *response); @@ -118,6 +119,7 @@ void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, Does not support ?var1=val1&var2=val2 in the path. */ void grpc_httpcli_post(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, grpc_polling_entity *pollent, + grpc_buffer_pool *buffer_pool, const grpc_httpcli_request *request, const char *body_bytes, size_t body_size, gpr_timespec deadline, grpc_closure *on_complete, diff --git a/src/core/lib/iomgr/endpoint.h b/src/core/lib/iomgr/endpoint.h index 894efc0b23..453bfd1d56 100644 --- a/src/core/lib/iomgr/endpoint.h +++ b/src/core/lib/iomgr/endpoint.h @@ -37,6 +37,7 @@ #include #include #include +#include "src/core/lib/iomgr/buffer_pool.h" #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/pollset_set.h" @@ -58,6 +59,7 @@ struct grpc_endpoint_vtable { grpc_pollset_set *pollset); void (*shutdown)(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep); void (*destroy)(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep); + grpc_buffer_user *(*get_buffer_user)(grpc_endpoint *ep); char *(*get_peer)(grpc_endpoint *ep); }; @@ -99,6 +101,8 @@ void grpc_endpoint_add_to_pollset_set(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, grpc_pollset_set *pollset_set); +grpc_buffer_user *grpc_endpoint_get_buffer_user(grpc_endpoint *endpoint); + struct grpc_endpoint { const grpc_endpoint_vtable *vtable; }; diff --git a/src/core/lib/iomgr/endpoint_pair.h b/src/core/lib/iomgr/endpoint_pair.h index 5cd78051bd..4938cf8599 100644 --- a/src/core/lib/iomgr/endpoint_pair.h +++ b/src/core/lib/iomgr/endpoint_pair.h @@ -41,7 +41,7 @@ typedef struct { grpc_endpoint *server; } grpc_endpoint_pair; -grpc_endpoint_pair grpc_iomgr_create_endpoint_pair(const char *name, - size_t read_slice_size); +grpc_endpoint_pair grpc_iomgr_create_endpoint_pair( + const char *name, grpc_buffer_pool *buffer_pool, size_t read_slice_size); #endif /* GRPC_CORE_LIB_IOMGR_ENDPOINT_PAIR_H */ diff --git a/src/core/lib/iomgr/endpoint_pair_posix.c b/src/core/lib/iomgr/endpoint_pair_posix.c index e295fb4867..64c161675f 100644 --- a/src/core/lib/iomgr/endpoint_pair_posix.c +++ b/src/core/lib/iomgr/endpoint_pair_posix.c @@ -62,20 +62,20 @@ static void create_sockets(int sv[2]) { GPR_ASSERT(grpc_set_socket_no_sigpipe_if_possible(sv[1]) == GRPC_ERROR_NONE); } -grpc_endpoint_pair grpc_iomgr_create_endpoint_pair(const char *name, - size_t read_slice_size) { +grpc_endpoint_pair grpc_iomgr_create_endpoint_pair( + const char *name, grpc_buffer_pool *buffer_pool, size_t read_slice_size) { int sv[2]; grpc_endpoint_pair p; char *final_name; create_sockets(sv); gpr_asprintf(&final_name, "%s:client", name); - p.client = grpc_tcp_create(grpc_fd_create(sv[1], final_name), read_slice_size, - "socketpair-server"); + p.client = grpc_tcp_create(grpc_fd_create(sv[1], final_name), buffer_pool, + read_slice_size, "socketpair-server"); gpr_free(final_name); gpr_asprintf(&final_name, "%s:server", name); - p.server = grpc_tcp_create(grpc_fd_create(sv[0], final_name), read_slice_size, - "socketpair-client"); + p.server = grpc_tcp_create(grpc_fd_create(sv[0], final_name), buffer_pool, + read_slice_size, "socketpair-client"); gpr_free(final_name); return p; } diff --git a/src/core/lib/iomgr/tcp_client.h b/src/core/lib/iomgr/tcp_client.h index a07e0b9f0c..04e4108b35 100644 --- a/src/core/lib/iomgr/tcp_client.h +++ b/src/core/lib/iomgr/tcp_client.h @@ -47,6 +47,7 @@ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_connect, grpc_endpoint **endpoint, grpc_pollset_set *interested_parties, + grpc_buffer_pool *buffer_pool, const struct sockaddr *addr, size_t addr_len, gpr_timespec deadline); diff --git a/src/core/lib/iomgr/tcp_client_posix.c b/src/core/lib/iomgr/tcp_client_posix.c index 80c7a3f128..42ceb33933 100644 --- a/src/core/lib/iomgr/tcp_client_posix.c +++ b/src/core/lib/iomgr/tcp_client_posix.c @@ -69,6 +69,7 @@ typedef struct { char *addr_str; grpc_endpoint **ep; grpc_closure *closure; + grpc_buffer_pool *buffer_pool; } async_connect; static grpc_error *prepare_socket(const struct sockaddr *addr, int fd) { @@ -114,6 +115,7 @@ static void tc_on_alarm(grpc_exec_ctx *exec_ctx, void *acp, grpc_error *error) { if (done) { gpr_mu_destroy(&ac->mu); gpr_free(ac->addr_str); + grpc_buffer_pool_internal_unref(exec_ctx, ac->buffer_pool); gpr_free(ac); } } @@ -190,7 +192,8 @@ static void on_writable(grpc_exec_ctx *exec_ctx, void *acp, grpc_error *error) { } } else { grpc_pollset_set_del_fd(exec_ctx, ac->interested_parties, fd); - *ep = grpc_tcp_create(fd, GRPC_TCP_DEFAULT_READ_SLICE_SIZE, ac->addr_str); + *ep = grpc_tcp_create(fd, ac->buffer_pool, + GRPC_TCP_DEFAULT_READ_SLICE_SIZE, ac->addr_str); fd = NULL; goto finish; } @@ -227,6 +230,7 @@ finish: static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, grpc_pollset_set *interested_parties, + grpc_buffer_pool *buffer_pool, const struct sockaddr *addr, size_t addr_len, gpr_timespec deadline) { int fd; @@ -275,7 +279,8 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, fdobj = grpc_fd_create(fd, name); if (err >= 0) { - *ep = grpc_tcp_create(fdobj, GRPC_TCP_DEFAULT_READ_SLICE_SIZE, addr_str); + *ep = grpc_tcp_create(fdobj, buffer_pool, GRPC_TCP_DEFAULT_READ_SLICE_SIZE, + addr_str); grpc_exec_ctx_sched(exec_ctx, closure, GRPC_ERROR_NONE, NULL); goto done; } @@ -300,6 +305,7 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, ac->refs = 2; ac->write_closure.cb = on_writable; ac->write_closure.cb_arg = ac; + ac->buffer_pool = grpc_buffer_pool_internal_ref(buffer_pool); if (grpc_tcp_trace) { gpr_log(GPR_DEBUG, "CLIENT_CONNECT: %s: asynchronously connecting", @@ -321,16 +327,18 @@ done: // overridden by api_fuzzer.c void (*grpc_tcp_client_connect_impl)( grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, - grpc_pollset_set *interested_parties, const struct sockaddr *addr, - size_t addr_len, gpr_timespec deadline) = tcp_client_connect_impl; + grpc_pollset_set *interested_parties, grpc_buffer_pool *buffer_pool, + const struct sockaddr *addr, size_t addr_len, + gpr_timespec deadline) = tcp_client_connect_impl; void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, grpc_pollset_set *interested_parties, + grpc_buffer_pool *buffer_pool, const struct sockaddr *addr, size_t addr_len, gpr_timespec deadline) { - grpc_tcp_client_connect_impl(exec_ctx, closure, ep, interested_parties, addr, - addr_len, deadline); + grpc_tcp_client_connect_impl(exec_ctx, closure, ep, interested_parties, + buffer_pool, addr, addr_len, deadline); } #endif diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 00fd77679a..fd8fcb05c3 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -100,6 +100,8 @@ typedef struct { grpc_closure write_closure; char *peer_string; + + grpc_buffer_user buffer_user; } grpc_tcp; static void tcp_handle_read(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, @@ -469,6 +471,11 @@ static grpc_workqueue *tcp_get_workqueue(grpc_endpoint *ep) { return grpc_fd_get_workqueue(tcp->em_fd); } +static grpc_buffer_user *tcp_get_buffer_user(grpc_endpoint *ep) { + grpc_tcp *tcp = (grpc_tcp *)ep; + return &tcp->buffer_user; +} + static const grpc_endpoint_vtable vtable = {tcp_read, tcp_write, tcp_get_workqueue, @@ -476,10 +483,11 @@ static const grpc_endpoint_vtable vtable = {tcp_read, tcp_add_to_pollset_set, tcp_shutdown, tcp_destroy, + tcp_get_buffer_user, tcp_get_peer}; -grpc_endpoint *grpc_tcp_create(grpc_fd *em_fd, size_t slice_size, - const char *peer_string) { +grpc_endpoint *grpc_tcp_create(grpc_fd *em_fd, grpc_buffer_pool *buffer_pool, + size_t slice_size, const char *peer_string) { grpc_tcp *tcp = (grpc_tcp *)gpr_malloc(sizeof(grpc_tcp)); tcp->base.vtable = &vtable; tcp->peer_string = gpr_strdup(peer_string); @@ -500,6 +508,7 @@ grpc_endpoint *grpc_tcp_create(grpc_fd *em_fd, size_t slice_size, tcp->write_closure.cb = tcp_handle_write; tcp->write_closure.cb_arg = tcp; gpr_slice_buffer_init(&tcp->last_read_buffer); + grpc_buffer_user_init(&tcp->buffer_user, buffer_pool); /* Tell network status tracker about new endpoint */ grpc_network_status_register_endpoint(&tcp->base); diff --git a/src/core/lib/iomgr/tcp_posix.h b/src/core/lib/iomgr/tcp_posix.h index 99125836d6..768355cf0c 100644 --- a/src/core/lib/iomgr/tcp_posix.h +++ b/src/core/lib/iomgr/tcp_posix.h @@ -53,8 +53,8 @@ extern int grpc_tcp_trace; /* Create a tcp endpoint given a file desciptor and a read slice size. Takes ownership of fd. */ -grpc_endpoint *grpc_tcp_create(grpc_fd *fd, size_t read_slice_size, - const char *peer_string); +grpc_endpoint *grpc_tcp_create(grpc_fd *fd, grpc_buffer_pool *buffer_pool, + size_t read_slice_size, const char *peer_string); /* Return the tcp endpoint's fd, or -1 if this is not available. Does not release the fd. diff --git a/src/core/lib/iomgr/tcp_server.h b/src/core/lib/iomgr/tcp_server.h index 5a25d39a0c..409d1a8e96 100644 --- a/src/core/lib/iomgr/tcp_server.h +++ b/src/core/lib/iomgr/tcp_server.h @@ -60,7 +60,8 @@ typedef void (*grpc_tcp_server_cb)(grpc_exec_ctx *exec_ctx, void *arg, /* Create a server, initially not bound to any ports. The caller owns one ref. If shutdown_complete is not NULL, it will be used by grpc_tcp_server_unref() when the ref count reaches zero. */ -grpc_error *grpc_tcp_server_create(grpc_closure *shutdown_complete, +grpc_error *grpc_tcp_server_create(grpc_exec_ctx *exec_ctx, + grpc_closure *shutdown_complete, const grpc_channel_args *args, grpc_tcp_server **server); diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index 2d3f6cf9a7..3304152385 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -137,6 +137,8 @@ struct grpc_tcp_server { /* next pollset to assign a channel to */ gpr_atm next_pollset_to_assign; + + grpc_buffer_pool *buffer_pool; }; static gpr_once check_init = GPR_ONCE_INIT; @@ -153,23 +155,37 @@ static void init(void) { #endif } -grpc_error *grpc_tcp_server_create(grpc_closure *shutdown_complete, +grpc_error *grpc_tcp_server_create(grpc_exec_ctx *exec_ctx, + grpc_closure *shutdown_complete, const grpc_channel_args *args, grpc_tcp_server **server) { gpr_once_init(&check_init, init); grpc_tcp_server *s = gpr_malloc(sizeof(grpc_tcp_server)); s->so_reuseport = has_so_reuseport; + s->buffer_pool = grpc_buffer_pool_create(); for (size_t i = 0; i < (args == NULL ? 0 : args->num_args); i++) { if (0 == strcmp(GRPC_ARG_ALLOW_REUSEPORT, args->args[i].key)) { if (args->args[i].type == GRPC_ARG_INTEGER) { s->so_reuseport = has_so_reuseport && (args->args[i].value.integer != 0); } else { + grpc_buffer_pool_internal_unref(exec_ctx, s->buffer_pool); gpr_free(s); return GRPC_ERROR_CREATE(GRPC_ARG_ALLOW_REUSEPORT " must be an integer"); } + } else if (0 == strcmp(GRPC_ARG_BUFFER_POOL, args->args[i].key)) { + if (args->args[i].type == GRPC_ARG_POINTER) { + grpc_buffer_pool_internal_unref(exec_ctx, s->buffer_pool); + s->buffer_pool = + grpc_buffer_pool_internal_ref(args->args[i].value.pointer.p); + } else { + grpc_buffer_pool_internal_unref(exec_ctx, s->buffer_pool); + gpr_free(s); + return GRPC_ERROR_CREATE(GRPC_ARG_BUFFER_POOL + " must be a pointer to a buffer pool"); + } } } gpr_ref_init(&s->refs, 1); @@ -203,6 +219,8 @@ static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { gpr_free(sp); } + grpc_buffer_pool_internal_unref(exec_ctx, s->buffer_pool); + gpr_free(s); } @@ -419,7 +437,8 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *err) { sp->server->on_accept_cb( exec_ctx, sp->server->on_accept_cb_arg, - grpc_tcp_create(fdobj, GRPC_TCP_DEFAULT_READ_SLICE_SIZE, addr_str), + grpc_tcp_create(fdobj, sp->server->buffer_pool, + GRPC_TCP_DEFAULT_READ_SLICE_SIZE, addr_str), read_notifier_pollset, &acceptor); gpr_free(name); diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.c b/src/core/lib/security/credentials/google_default/google_default_credentials.c index 312a3d4f90..3bcde3da8b 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.c +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.c @@ -124,11 +124,13 @@ static int is_stack_running_on_compute_engine(void) { grpc_httpcli_context_init(&context); + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); grpc_httpcli_get( - &exec_ctx, &context, &detector.pollent, &request, + &exec_ctx, &context, &detector.pollent, buffer_pool, &request, gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), max_detection_delay), grpc_closure_create(on_compute_engine_detection_http_response, &detector), &detector.response); + grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); grpc_exec_ctx_flush(&exec_ctx); -- cgit v1.2.3 From 45881861dc6336b4387ebd894fa7193de475e594 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 23 Sep 2016 10:48:53 -0700 Subject: Integration progress --- src/core/lib/security/credentials/jwt/jwt_verifier.c | 14 ++++++++++++-- .../security/credentials/oauth2/oauth2_credentials.c | 18 ++++++++++++++---- src/core/lib/security/transport/secure_endpoint.c | 6 ++++++ 3 files changed, 32 insertions(+), 6 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.c b/src/core/lib/security/credentials/jwt/jwt_verifier.c index 73eb2e3258..c1a3eb7eab 100644 --- a/src/core/lib/security/credentials/jwt/jwt_verifier.c +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.c @@ -657,11 +657,16 @@ static void on_openid_config_retrieved(grpc_exec_ctx *exec_ctx, void *user_data, *(req.host + (req.http.path - jwks_uri)) = '\0'; } + /* TODO(ctiller): Carry the buffer_pool in ctx and share it with the host + channel. This would allow us to cancel an authentication query when under + extreme memory pressure. */ + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); grpc_httpcli_get( - exec_ctx, &ctx->verifier->http_ctx, &ctx->pollent, &req, + exec_ctx, &ctx->verifier->http_ctx, &ctx->pollent, buffer_pool, &req, gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), grpc_jwt_verifier_max_delay), grpc_closure_create(on_keys_retrieved, ctx), &ctx->responses[HTTP_RESPONSE_KEYS]); + grpc_buffer_pool_internal_unref(exec_ctx, buffer_pool); grpc_json_destroy(json); gpr_free(req.host); return; @@ -764,10 +769,15 @@ static void retrieve_key_and_verify(grpc_exec_ctx *exec_ctx, rsp_idx = HTTP_RESPONSE_OPENID; } + /* TODO(ctiller): Carry the buffer_pool in ctx and share it with the host + channel. This would allow us to cancel an authentication query when under + extreme memory pressure. */ + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); grpc_httpcli_get( - exec_ctx, &ctx->verifier->http_ctx, &ctx->pollent, &req, + exec_ctx, &ctx->verifier->http_ctx, &ctx->pollent, buffer_pool, &req, gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), grpc_jwt_verifier_max_delay), http_cb, &ctx->responses[rsp_idx]); + grpc_buffer_pool_internal_unref(exec_ctx, buffer_pool); gpr_free(req.host); gpr_free(req.http.path); return; diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.c b/src/core/lib/security/credentials/oauth2/oauth2_credentials.c index c22ea5c468..e9e83d1468 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.c +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.c @@ -307,9 +307,14 @@ static void compute_engine_fetch_oauth2( request.http.path = GRPC_COMPUTE_ENGINE_METADATA_TOKEN_PATH; request.http.hdr_count = 1; request.http.hdrs = &header; - grpc_httpcli_get(exec_ctx, httpcli_context, pollent, &request, deadline, - grpc_closure_create(response_cb, metadata_req), + /* TODO(ctiller): Carry the buffer_pool in ctx and share it with the host + channel. This would allow us to cancel an authentication query when under + extreme memory pressure. */ + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_httpcli_get(exec_ctx, httpcli_context, pollent, buffer_pool, &request, + deadline, grpc_closure_create(response_cb, metadata_req), &metadata_req->response); + grpc_buffer_pool_internal_unref(exec_ctx, buffer_pool); } grpc_call_credentials *grpc_google_compute_engine_credentials_create( @@ -357,10 +362,15 @@ static void refresh_token_fetch_oauth2( request.http.hdr_count = 1; request.http.hdrs = &header; request.handshaker = &grpc_httpcli_ssl; - grpc_httpcli_post(exec_ctx, httpcli_context, pollent, &request, body, - strlen(body), deadline, + /* TODO(ctiller): Carry the buffer_pool in ctx and share it with the host + channel. This would allow us to cancel an authentication query when under + extreme memory pressure. */ + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_httpcli_post(exec_ctx, httpcli_context, pollent, buffer_pool, &request, + body, strlen(body), deadline, grpc_closure_create(response_cb, metadata_req), &metadata_req->response); + grpc_buffer_pool_internal_unref(exec_ctx, buffer_pool); gpr_free(body); } diff --git a/src/core/lib/security/transport/secure_endpoint.c b/src/core/lib/security/transport/secure_endpoint.c index acb0113ea8..ee6b9f97e8 100644 --- a/src/core/lib/security/transport/secure_endpoint.c +++ b/src/core/lib/security/transport/secure_endpoint.c @@ -370,6 +370,11 @@ static grpc_workqueue *endpoint_get_workqueue(grpc_endpoint *secure_ep) { return grpc_endpoint_get_workqueue(ep->wrapped_ep); } +static grpc_buffer_user *endpoint_get_buffer_user(grpc_endpoint *secure_ep) { + secure_endpoint *ep = (secure_endpoint *)secure_ep; + return grpc_endpoint_get_buffer_user(ep->wrapped_ep); +} + static const grpc_endpoint_vtable vtable = {endpoint_read, endpoint_write, endpoint_get_workqueue, @@ -377,6 +382,7 @@ static const grpc_endpoint_vtable vtable = {endpoint_read, endpoint_add_to_pollset_set, endpoint_shutdown, endpoint_destroy, + endpoint_get_buffer_user, endpoint_get_peer}; grpc_endpoint *grpc_secure_endpoint_create( -- cgit v1.2.3 From 86958768b462c5428cf6607508895d3a44cd3d16 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 23 Sep 2016 12:05:34 -0700 Subject: Buffer pools compile --- BUILD | 6 +++ build.yaml | 1 + gRPC-Core.podspec | 2 + grpc.gemspec | 1 + package.xml | 1 + .../chttp2/client/insecure/channel_create.c | 4 +- .../chttp2/client/insecure/channel_create_posix.c | 6 +-- .../chttp2/client/secure/secure_channel_create.c | 7 +-- .../chttp2/server/insecure/server_chttp2.c | 4 +- .../chttp2/server/insecure/server_chttp2_posix.c | 2 +- src/core/lib/http/httpcli.c | 13 ++++-- src/core/lib/iomgr/buffer_pool.c | 17 +++++++ src/core/lib/iomgr/buffer_pool.h | 2 + src/core/lib/iomgr/tcp_client.h | 4 +- src/core/lib/iomgr/tcp_client_posix.c | 52 +++++++++++++++++----- src/core/lib/iomgr/tcp_client_posix.h | 45 +++++++++++++++++++ tools/doxygen/Doxyfile.c++.internal | 1 + tools/doxygen/Doxyfile.core.internal | 1 + tools/run_tests/sources_and_headers.json | 2 + vsprojects/vcxproj/grpc++/grpc++.vcxproj | 1 + vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters | 3 ++ .../grpc++_unsecure/grpc++_unsecure.vcxproj | 1 + .../grpc++_unsecure.vcxproj.filters | 3 ++ vsprojects/vcxproj/grpc/grpc.vcxproj | 1 + vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 3 ++ .../vcxproj/grpc_test_util/grpc_test_util.vcxproj | 1 + .../grpc_test_util/grpc_test_util.vcxproj.filters | 3 ++ .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 1 + .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 3 ++ 29 files changed, 163 insertions(+), 28 deletions(-) create mode 100644 src/core/lib/iomgr/tcp_client_posix.h (limited to 'src/core/lib') diff --git a/BUILD b/BUILD index ceba225dd5..01aa817116 100644 --- a/BUILD +++ b/BUILD @@ -209,6 +209,7 @@ cc_library( "src/core/lib/iomgr/socket_utils_posix.h", "src/core/lib/iomgr/socket_windows.h", "src/core/lib/iomgr/tcp_client.h", + "src/core/lib/iomgr/tcp_client_posix.h", "src/core/lib/iomgr/tcp_posix.h", "src/core/lib/iomgr/tcp_server.h", "src/core/lib/iomgr/tcp_windows.h", @@ -606,6 +607,7 @@ cc_library( "src/core/lib/iomgr/socket_utils_posix.h", "src/core/lib/iomgr/socket_windows.h", "src/core/lib/iomgr/tcp_client.h", + "src/core/lib/iomgr/tcp_client_posix.h", "src/core/lib/iomgr/tcp_posix.h", "src/core/lib/iomgr/tcp_server.h", "src/core/lib/iomgr/tcp_windows.h", @@ -958,6 +960,7 @@ cc_library( "src/core/lib/iomgr/socket_utils_posix.h", "src/core/lib/iomgr/socket_windows.h", "src/core/lib/iomgr/tcp_client.h", + "src/core/lib/iomgr/tcp_client_posix.h", "src/core/lib/iomgr/tcp_posix.h", "src/core/lib/iomgr/tcp_server.h", "src/core/lib/iomgr/tcp_windows.h", @@ -1307,6 +1310,7 @@ cc_library( "src/core/lib/iomgr/socket_utils_posix.h", "src/core/lib/iomgr/socket_windows.h", "src/core/lib/iomgr/tcp_client.h", + "src/core/lib/iomgr/tcp_client_posix.h", "src/core/lib/iomgr/tcp_posix.h", "src/core/lib/iomgr/tcp_server.h", "src/core/lib/iomgr/tcp_windows.h", @@ -1715,6 +1719,7 @@ cc_library( "src/core/lib/iomgr/socket_utils_posix.h", "src/core/lib/iomgr/socket_windows.h", "src/core/lib/iomgr/tcp_client.h", + "src/core/lib/iomgr/tcp_client_posix.h", "src/core/lib/iomgr/tcp_posix.h", "src/core/lib/iomgr/tcp_server.h", "src/core/lib/iomgr/tcp_windows.h", @@ -2430,6 +2435,7 @@ objc_library( "src/core/lib/iomgr/socket_utils_posix.h", "src/core/lib/iomgr/socket_windows.h", "src/core/lib/iomgr/tcp_client.h", + "src/core/lib/iomgr/tcp_client_posix.h", "src/core/lib/iomgr/tcp_posix.h", "src/core/lib/iomgr/tcp_server.h", "src/core/lib/iomgr/tcp_windows.h", diff --git a/build.yaml b/build.yaml index 3088214c40..8c9906469c 100644 --- a/build.yaml +++ b/build.yaml @@ -213,6 +213,7 @@ filegroups: - src/core/lib/iomgr/socket_utils_posix.h - src/core/lib/iomgr/socket_windows.h - src/core/lib/iomgr/tcp_client.h + - src/core/lib/iomgr/tcp_client_posix.h - src/core/lib/iomgr/tcp_posix.h - src/core/lib/iomgr/tcp_server.h - src/core/lib/iomgr/tcp_windows.h diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 40ce020aff..23639dce38 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -296,6 +296,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/socket_utils_posix.h', 'src/core/lib/iomgr/socket_windows.h', 'src/core/lib/iomgr/tcp_client.h', + 'src/core/lib/iomgr/tcp_client_posix.h', 'src/core/lib/iomgr/tcp_posix.h', 'src/core/lib/iomgr/tcp_server.h', 'src/core/lib/iomgr/tcp_windows.h', @@ -665,6 +666,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/socket_utils_posix.h', 'src/core/lib/iomgr/socket_windows.h', 'src/core/lib/iomgr/tcp_client.h', + 'src/core/lib/iomgr/tcp_client_posix.h', 'src/core/lib/iomgr/tcp_posix.h', 'src/core/lib/iomgr/tcp_server.h', 'src/core/lib/iomgr/tcp_windows.h', diff --git a/grpc.gemspec b/grpc.gemspec index 6c64dc7322..0aefd51248 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -216,6 +216,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/socket_utils_posix.h ) s.files += %w( src/core/lib/iomgr/socket_windows.h ) s.files += %w( src/core/lib/iomgr/tcp_client.h ) + s.files += %w( src/core/lib/iomgr/tcp_client_posix.h ) s.files += %w( src/core/lib/iomgr/tcp_posix.h ) s.files += %w( src/core/lib/iomgr/tcp_server.h ) s.files += %w( src/core/lib/iomgr/tcp_windows.h ) diff --git a/package.xml b/package.xml index 7d613d7fc6..f3a7c6a277 100644 --- a/package.xml +++ b/package.xml @@ -223,6 +223,7 @@ + diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index ddc00bd79f..f8654804e4 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -149,8 +149,8 @@ static void connector_connect(grpc_exec_ctx *exec_ctx, grpc_connector *con, c->tcp = NULL; grpc_closure_init(&c->connected, connected, c); grpc_tcp_client_connect(exec_ctx, &c->connected, &c->tcp, - args->interested_parties, args->addr, args->addr_len, - args->deadline); + args->interested_parties, args->channel_args, + args->addr, args->addr_len, args->deadline); } static const grpc_connector_vtable connector_vtable = { diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c b/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c index b2c5e5b088..1e5b1c22e3 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c @@ -44,6 +44,7 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/iomgr/tcp_client_posix.h" #include "src/core/lib/iomgr/tcp_posix.h" #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/channel.h" @@ -65,9 +66,8 @@ grpc_channel *grpc_insecure_channel_create_from_fd( int flags = fcntl(fd, F_GETFL, 0); GPR_ASSERT(fcntl(fd, F_SETFL, flags | O_NONBLOCK) == 0); - grpc_endpoint *client = - grpc_tcp_create(grpc_fd_create(fd, "client"), - GRPC_TCP_DEFAULT_READ_SLICE_SIZE, "fd-client"); + grpc_endpoint *client = grpc_tcp_client_create_from_fd( + &exec_ctx, grpc_fd_create(fd, "client"), args, "fd-client"); grpc_transport *transport = grpc_create_chttp2_transport(&exec_ctx, final_args, client, 1); diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index f36fbbfc57..2fbe03ad24 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -207,9 +207,10 @@ static void connector_connect(grpc_exec_ctx *exec_ctx, grpc_connector *con, GPR_ASSERT(c->connecting_endpoint == NULL); gpr_mu_unlock(&c->mu); grpc_closure_init(&c->connected_closure, connected, c); - grpc_tcp_client_connect( - exec_ctx, &c->connected_closure, &c->newly_connecting_endpoint, - args->interested_parties, args->addr, args->addr_len, args->deadline); + grpc_tcp_client_connect(exec_ctx, &c->connected_closure, + &c->newly_connecting_endpoint, + args->interested_parties, args->channel_args, + args->addr, args->addr_len, args->deadline); } static const grpc_connector_vtable connector_vtable = { diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c index f0e07429fa..2c64878c0c 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c @@ -139,8 +139,8 @@ int grpc_server_add_insecure_http2_port(grpc_server *server, const char *addr) { goto error; } - err = - grpc_tcp_server_create(NULL, grpc_server_get_channel_args(server), &tcp); + err = grpc_tcp_server_create(&exec_ctx, NULL, + grpc_server_get_channel_args(server), &tcp); if (err != GRPC_ERROR_NONE) { goto error; } diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c index 4350543c27..020f67edd2 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c @@ -58,7 +58,7 @@ void grpc_server_add_insecure_channel_from_fd(grpc_server *server, gpr_asprintf(&name, "fd:%d", fd); grpc_endpoint *server_endpoint = grpc_tcp_create( - grpc_fd_create(fd, name), GRPC_TCP_DEFAULT_READ_SLICE_SIZE, name); + grpc_fd_create(fd, name), NULL, GRPC_TCP_DEFAULT_READ_SLICE_SIZE, name); gpr_free(name); diff --git a/src/core/lib/http/httpcli.c b/src/core/lib/http/httpcli.c index 593da734f2..2f6f7e37dc 100644 --- a/src/core/lib/http/httpcli.c +++ b/src/core/lib/http/httpcli.c @@ -226,10 +226,15 @@ static void next_address(grpc_exec_ctx *exec_ctx, internal_request *req, } addr = &req->addresses->addrs[req->next_address++]; grpc_closure_init(&req->connected, on_connected, req); - grpc_tcp_client_connect(exec_ctx, &req->connected, &req->ep, - req->context->pollset_set, req->buffer_pool, - (struct sockaddr *)&addr->addr, addr->len, - req->deadline); + grpc_arg arg; + arg.key = GRPC_ARG_BUFFER_POOL; + arg.type = GRPC_ARG_POINTER; + arg.value.pointer.p = req->buffer_pool; + arg.value.pointer.vtable = grpc_buffer_pool_arg_vtable(); + grpc_channel_args args = {1, &arg}; + grpc_tcp_client_connect( + exec_ctx, &req->connected, &req->ep, req->context->pollset_set, &args, + (struct sockaddr *)&addr->addr, addr->len, req->deadline); } static void on_resolved(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { diff --git a/src/core/lib/iomgr/buffer_pool.c b/src/core/lib/iomgr/buffer_pool.c index c7e1fcbf4a..0153bce203 100644 --- a/src/core/lib/iomgr/buffer_pool.c +++ b/src/core/lib/iomgr/buffer_pool.c @@ -33,6 +33,8 @@ #include "src/core/lib/iomgr/buffer_pool.h" +#include + #include #include @@ -364,6 +366,21 @@ void grpc_buffer_pool_resize(grpc_buffer_pool *buffer_pool, size_t size) { grpc_exec_ctx_finish(&exec_ctx); } +grpc_buffer_pool *grpc_buffer_pool_from_channel_args( + grpc_channel_args *channel_args) { + for (size_t i = 0; i < channel_args->num_args; i++) { + if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_BUFFER_POOL)) { + if (channel_args->args[i].type == GRPC_ARG_POINTER) { + return grpc_buffer_pool_internal_ref( + channel_args->args[i].value.pointer.p); + } else { + gpr_log(GPR_DEBUG, GRPC_ARG_BUFFER_POOL " should be a pointer"); + } + } + } + return grpc_buffer_pool_create(); +} + /******************************************************************************* * grpc_buffer_user api */ diff --git a/src/core/lib/iomgr/buffer_pool.h b/src/core/lib/iomgr/buffer_pool.h index 2774a445e3..2ffc5b6b75 100644 --- a/src/core/lib/iomgr/buffer_pool.h +++ b/src/core/lib/iomgr/buffer_pool.h @@ -41,6 +41,8 @@ grpc_buffer_pool *grpc_buffer_pool_internal_ref(grpc_buffer_pool *buffer_pool); void grpc_buffer_pool_internal_unref(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool); +grpc_buffer_pool *grpc_buffer_pool_from_channel_args( + grpc_channel_args *channel_args); typedef enum { GRPC_BULIST_AWAITING_ALLOCATION, diff --git a/src/core/lib/iomgr/tcp_client.h b/src/core/lib/iomgr/tcp_client.h index 04e4108b35..b854e5aadc 100644 --- a/src/core/lib/iomgr/tcp_client.h +++ b/src/core/lib/iomgr/tcp_client.h @@ -39,6 +39,8 @@ #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/iomgr/sockaddr.h" +#define GRPC_ARG_TCP_READ_CHUNK_SIZE "grpc.experimental.tcp_read_chunk_size" + /* Asynchronously connect to an address (specified as (addr, len)), and call cb with arg and the completed connection when done (or call cb with arg and NULL on failure). @@ -47,7 +49,7 @@ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_connect, grpc_endpoint **endpoint, grpc_pollset_set *interested_parties, - grpc_buffer_pool *buffer_pool, + const grpc_channel_args *channel_args, const struct sockaddr *addr, size_t addr_len, gpr_timespec deadline); diff --git a/src/core/lib/iomgr/tcp_client_posix.c b/src/core/lib/iomgr/tcp_client_posix.c index 42ceb33933..860a4f8436 100644 --- a/src/core/lib/iomgr/tcp_client_posix.c +++ b/src/core/lib/iomgr/tcp_client_posix.c @@ -35,7 +35,7 @@ #ifdef GPR_POSIX_SOCKET -#include "src/core/lib/iomgr/tcp_client.h" +#include "src/core/lib/iomgr/tcp_client_posix.h" #include #include @@ -47,6 +47,7 @@ #include #include +#include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/iomgr/iomgr_posix.h" #include "src/core/lib/iomgr/sockaddr_utils.h" @@ -69,7 +70,7 @@ typedef struct { char *addr_str; grpc_endpoint **ep; grpc_closure *closure; - grpc_buffer_pool *buffer_pool; + grpc_channel_args *channel_args; } async_connect; static grpc_error *prepare_socket(const struct sockaddr *addr, int fd) { @@ -115,11 +116,38 @@ static void tc_on_alarm(grpc_exec_ctx *exec_ctx, void *acp, grpc_error *error) { if (done) { gpr_mu_destroy(&ac->mu); gpr_free(ac->addr_str); - grpc_buffer_pool_internal_unref(exec_ctx, ac->buffer_pool); + grpc_channel_args_destroy(ac->channel_args); gpr_free(ac); } } +grpc_endpoint *grpc_tcp_client_create_from_fd( + grpc_exec_ctx *exec_ctx, grpc_fd *fd, const grpc_channel_args *channel_args, + const char *addr_str) { + size_t tcp_read_chunk_size = GRPC_TCP_DEFAULT_READ_SLICE_SIZE; + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + if (channel_args != NULL) { + for (size_t i = 0; i < channel_args->num_args; i++) { + if (0 == + strcmp(channel_args->args[i].key, GRPC_ARG_TCP_READ_CHUNK_SIZE)) { + grpc_integer_options options = {(int)tcp_read_chunk_size, 1, + 8 * 1024 * 1024}; + tcp_read_chunk_size = (size_t)grpc_channel_arg_get_integer( + &channel_args->args[i], options); + } else if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_BUFFER_POOL)) { + grpc_buffer_pool_internal_unref(exec_ctx, buffer_pool); + buffer_pool = grpc_buffer_pool_internal_ref( + channel_args->args[i].value.pointer.p); + } + } + } + + grpc_endpoint *ep = + grpc_tcp_create(fd, buffer_pool, tcp_read_chunk_size, addr_str); + grpc_buffer_pool_internal_unref(exec_ctx, buffer_pool); + return ep; +} + static void on_writable(grpc_exec_ctx *exec_ctx, void *acp, grpc_error *error) { async_connect *ac = acp; int so_error = 0; @@ -192,8 +220,8 @@ static void on_writable(grpc_exec_ctx *exec_ctx, void *acp, grpc_error *error) { } } else { grpc_pollset_set_del_fd(exec_ctx, ac->interested_parties, fd); - *ep = grpc_tcp_create(fd, ac->buffer_pool, - GRPC_TCP_DEFAULT_READ_SLICE_SIZE, ac->addr_str); + *ep = grpc_tcp_client_create_from_fd(exec_ctx, fd, ac->channel_args, + ac->addr_str); fd = NULL; goto finish; } @@ -230,7 +258,7 @@ finish: static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, grpc_pollset_set *interested_parties, - grpc_buffer_pool *buffer_pool, + const grpc_channel_args *channel_args, const struct sockaddr *addr, size_t addr_len, gpr_timespec deadline) { int fd; @@ -279,8 +307,8 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, fdobj = grpc_fd_create(fd, name); if (err >= 0) { - *ep = grpc_tcp_create(fdobj, buffer_pool, GRPC_TCP_DEFAULT_READ_SLICE_SIZE, - addr_str); + *ep = + grpc_tcp_client_create_from_fd(exec_ctx, fdobj, channel_args, addr_str); grpc_exec_ctx_sched(exec_ctx, closure, GRPC_ERROR_NONE, NULL); goto done; } @@ -305,7 +333,7 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, ac->refs = 2; ac->write_closure.cb = on_writable; ac->write_closure.cb_arg = ac; - ac->buffer_pool = grpc_buffer_pool_internal_ref(buffer_pool); + ac->channel_args = grpc_channel_args_copy(channel_args); if (grpc_tcp_trace) { gpr_log(GPR_DEBUG, "CLIENT_CONNECT: %s: asynchronously connecting", @@ -327,18 +355,18 @@ done: // overridden by api_fuzzer.c void (*grpc_tcp_client_connect_impl)( grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, - grpc_pollset_set *interested_parties, grpc_buffer_pool *buffer_pool, + grpc_pollset_set *interested_parties, const grpc_channel_args *channel_args, const struct sockaddr *addr, size_t addr_len, gpr_timespec deadline) = tcp_client_connect_impl; void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, grpc_pollset_set *interested_parties, - grpc_buffer_pool *buffer_pool, + const grpc_channel_args *channel_args, const struct sockaddr *addr, size_t addr_len, gpr_timespec deadline) { grpc_tcp_client_connect_impl(exec_ctx, closure, ep, interested_parties, - buffer_pool, addr, addr_len, deadline); + channel_args, addr, addr_len, deadline); } #endif diff --git a/src/core/lib/iomgr/tcp_client_posix.h b/src/core/lib/iomgr/tcp_client_posix.h new file mode 100644 index 0000000000..d8108b8359 --- /dev/null +++ b/src/core/lib/iomgr/tcp_client_posix.h @@ -0,0 +1,45 @@ +/* + * + * 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. + * + */ + +#ifndef GRPC_CORE_LIB_IOMGR_TCP_CLIENT_POSIX_H +#define GRPC_CORE_LIB_IOMGR_TCP_CLIENT_POSIX_H + +#include "src/core/lib/iomgr/endpoint.h" +#include "src/core/lib/iomgr/ev_posix.h" +#include "src/core/lib/iomgr/tcp_client.h" + +grpc_endpoint *grpc_tcp_client_create_from_fd( + grpc_exec_ctx *exec_ctx, grpc_fd *fd, const grpc_channel_args *channel_args, + const char *addr_str); + +#endif diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index b14ca64920..19ceb16375 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -917,6 +917,7 @@ src/core/lib/iomgr/sockaddr_windows.h \ src/core/lib/iomgr/socket_utils_posix.h \ src/core/lib/iomgr/socket_windows.h \ src/core/lib/iomgr/tcp_client.h \ +src/core/lib/iomgr/tcp_client_posix.h \ src/core/lib/iomgr/tcp_posix.h \ src/core/lib/iomgr/tcp_server.h \ src/core/lib/iomgr/tcp_windows.h \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 9d53f4d560..8ed3c02776 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -833,6 +833,7 @@ src/core/lib/iomgr/sockaddr_windows.h \ src/core/lib/iomgr/socket_utils_posix.h \ src/core/lib/iomgr/socket_windows.h \ src/core/lib/iomgr/tcp_client.h \ +src/core/lib/iomgr/tcp_client_posix.h \ src/core/lib/iomgr/tcp_posix.h \ src/core/lib/iomgr/tcp_server.h \ src/core/lib/iomgr/tcp_windows.h \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 681e2f5f97..6f7b48dd87 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -5998,6 +5998,7 @@ "src/core/lib/iomgr/socket_utils_posix.h", "src/core/lib/iomgr/socket_windows.h", "src/core/lib/iomgr/tcp_client.h", + "src/core/lib/iomgr/tcp_client_posix.h", "src/core/lib/iomgr/tcp_posix.h", "src/core/lib/iomgr/tcp_server.h", "src/core/lib/iomgr/tcp_windows.h", @@ -6136,6 +6137,7 @@ "src/core/lib/iomgr/socket_windows.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_windows.c", "src/core/lib/iomgr/tcp_posix.c", "src/core/lib/iomgr/tcp_posix.h", diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index d9587cbea2..497e370a5e 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -417,6 +417,7 @@ + diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters index 54f47d41bb..e26f3853cb 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters @@ -851,6 +851,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj index d8a31f9755..19e8438f28 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -413,6 +413,7 @@ + diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters index d88c7c54d8..5b978fcb0b 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters @@ -824,6 +824,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 8a6f2f2389..e8776df255 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -342,6 +342,7 @@ + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index ce0e8a6ae0..7ba7f33783 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -803,6 +803,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index 29feafa8ef..296cd507f7 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -233,6 +233,7 @@ + diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index 1ab09ae492..9abbaef1dc 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -581,6 +581,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 02738560a7..c843306241 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -332,6 +332,7 @@ + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index a4cdabcc7b..3dda160f53 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -713,6 +713,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr -- cgit v1.2.3 From 7871f736ce62e74559602f928b25bea7389f57fb Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 23 Sep 2016 13:49:05 -0700 Subject: Remove sockaddr type structs and socklen_t from internal core APIs, update POSIX tests --- src/core/ext/client_config/client_config_plugin.c | 5 - src/core/ext/client_config/connector.h | 9 +- .../client_config/default_initial_connect_string.c | 5 +- .../ext/client_config/initial_connect_string.c | 7 +- .../ext/client_config/initial_connect_string.h | 8 +- src/core/ext/client_config/parse_address.c | 31 +++-- src/core/ext/client_config/parse_address.h | 10 +- src/core/ext/client_config/subchannel.c | 12 +- src/core/ext/client_config/subchannel.h | 3 +- src/core/ext/client_config/subchannel_index.c | 14 +- src/core/ext/lb_policy/grpclb/grpclb.c | 14 +- src/core/ext/lb_policy/pick_first/pick_first.c | 9 +- src/core/ext/lb_policy/round_robin/round_robin.c | 8 +- src/core/ext/resolver/dns/native/dns_resolver.c | 5 - src/core/ext/resolver/sockaddr/sockaddr_resolver.c | 11 +- .../chttp2/client/insecure/channel_create.c | 2 +- .../chttp2/client/secure/secure_channel_create.c | 2 +- .../chttp2/server/insecure/server_chttp2.c | 4 +- .../chttp2/server/secure/server_secure_chttp2.c | 4 +- src/core/lib/http/httpcli.c | 5 +- src/core/lib/http/httpcli.h | 5 - src/core/lib/iomgr/port.h | 2 +- src/core/lib/iomgr/resolve_address_posix.c | 4 +- src/core/lib/iomgr/resolve_address_uv.c | 4 +- src/core/lib/iomgr/resolve_address_windows.c | 6 +- src/core/lib/iomgr/sockaddr.h | 3 + src/core/lib/iomgr/sockaddr_utils.c | 86 +++++++----- src/core/lib/iomgr/sockaddr_utils.h | 28 ++-- src/core/lib/iomgr/socket_utils.h | 12 +- src/core/lib/iomgr/socket_utils_common_posix.c | 17 ++- src/core/lib/iomgr/socket_utils_linux.c | 9 +- src/core/lib/iomgr/socket_utils_posix.c | 8 +- src/core/lib/iomgr/socket_utils_posix.h | 6 +- src/core/lib/iomgr/socket_utils_uv.c | 5 +- src/core/lib/iomgr/socket_utils_windows.c | 6 +- src/core/lib/iomgr/tcp_client.h | 3 +- src/core/lib/iomgr/tcp_client_posix.c | 28 ++-- src/core/lib/iomgr/tcp_client_uv.c | 9 +- src/core/lib/iomgr/tcp_client_windows.c | 13 +- src/core/lib/iomgr/tcp_server.h | 6 +- src/core/lib/iomgr/tcp_server_posix.c | 108 +++++++------- src/core/lib/iomgr/tcp_server_uv.c | 64 +++++---- src/core/lib/iomgr/timer_uv.c | 12 +- src/core/lib/iomgr/timer_uv.h | 6 +- src/core/lib/iomgr/unix_sockets_posix.c | 16 ++- src/core/lib/iomgr/unix_sockets_posix.h | 7 +- src/core/lib/iomgr/unix_sockets_posix_noop.c | 6 +- src/core/lib/security/context/security_context.c | 5 - src/core/lib/security/context/security_context.h | 5 - src/core/lib/security/credentials/credentials.h | 5 - .../credentials/oauth2/oauth2_credentials.c | 5 - .../lib/security/transport/server_auth_filter.c | 5 - src/core/lib/surface/call.c | 5 - src/core/lib/surface/init_secure.c | 5 - src/core/lib/tsi/ssl_transport_security.c | 5 +- .../set_initial_connect_string_test.c | 13 +- test/core/end2end/fixtures/h2_full+trace.c | 1 + test/core/end2end/fixtures/h2_sockpair+trace.c | 1 + test/core/iomgr/sockaddr_utils_test.c | 155 +++++++++++---------- test/core/iomgr/tcp_client_posix_test.c | 32 ++--- test/core/iomgr/tcp_server_posix_test.c | 55 ++++---- test/core/surface/concurrent_connectivity_test.c | 13 +- test/core/util/test_tcp_server.c | 15 +- 63 files changed, 464 insertions(+), 508 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/client_config/client_config_plugin.c b/src/core/ext/client_config/client_config_plugin.c index e065d06be9..5e31613420 100644 --- a/src/core/ext/client_config/client_config_plugin.c +++ b/src/core/ext/client_config/client_config_plugin.c @@ -31,11 +31,6 @@ * */ -/* We currently need this at the top of the file if we import some iomgr - headers because if we are building with libuv, those headers will include - uv.h, which needs to be included before other system headers */ -#include "src/core/lib/iomgr/port.h" - #include #include #include diff --git a/src/core/ext/client_config/connector.h b/src/core/ext/client_config/connector.h index 5cf8f14721..18e660586f 100644 --- a/src/core/ext/client_config/connector.h +++ b/src/core/ext/client_config/connector.h @@ -34,13 +34,8 @@ #ifndef GRPC_CORE_EXT_CLIENT_CONFIG_CONNECTOR_H #define GRPC_CORE_EXT_CLIENT_CONFIG_CONNECTOR_H -/* We currently need this at the top of the file if we import some iomgr - headers because if we are building with libuv, those headers will include - uv.h, which needs to be included before other system headers */ -#include "src/core/lib/iomgr/port.h" - #include "src/core/lib/channel/channel_stack.h" -#include "src/core/lib/iomgr/sockaddr.h" +#include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/transport/transport.h" typedef struct grpc_connector grpc_connector; @@ -54,7 +49,7 @@ typedef struct { /** set of pollsets interested in this connection */ grpc_pollset_set *interested_parties; /** address to connect to */ - const struct sockaddr *addr; + const grpc_resolved_address *addr; size_t addr_len; /** initial connect string to send */ gpr_slice initial_connect_string; diff --git a/src/core/ext/client_config/default_initial_connect_string.c b/src/core/ext/client_config/default_initial_connect_string.c index a70da4a84a..0b251372fd 100644 --- a/src/core/ext/client_config/default_initial_connect_string.c +++ b/src/core/ext/client_config/default_initial_connect_string.c @@ -32,8 +32,7 @@ */ #include -#include "src/core/lib/iomgr/sockaddr.h" +#include "src/core/lib/iomgr/resolve_address.h" -void grpc_set_default_initial_connect_string(struct sockaddr **addr, - size_t *addr_len, +void grpc_set_default_initial_connect_string(grpc_resolved_address **addr, gpr_slice *initial_str) {} diff --git a/src/core/ext/client_config/initial_connect_string.c b/src/core/ext/client_config/initial_connect_string.c index 41580d2106..61683dd635 100644 --- a/src/core/ext/client_config/initial_connect_string.c +++ b/src/core/ext/client_config/initial_connect_string.c @@ -35,8 +35,7 @@ #include -extern void grpc_set_default_initial_connect_string(struct sockaddr **addr, - size_t *addr_len, +extern void grpc_set_default_initial_connect_string(grpc_resolved_address **addr, gpr_slice *initial_str); static grpc_set_initial_connect_string_func g_set_initial_connect_string_func = @@ -47,7 +46,7 @@ void grpc_test_set_initial_connect_string_function( g_set_initial_connect_string_func = func; } -void grpc_set_initial_connect_string(struct sockaddr **addr, size_t *addr_len, +void grpc_set_initial_connect_string(grpc_resolved_address **addr, gpr_slice *initial_str) { - g_set_initial_connect_string_func(addr, addr_len, initial_str); + g_set_initial_connect_string_func(addr, initial_str); } diff --git a/src/core/ext/client_config/initial_connect_string.h b/src/core/ext/client_config/initial_connect_string.h index 06f0767832..6d5301fde5 100644 --- a/src/core/ext/client_config/initial_connect_string.h +++ b/src/core/ext/client_config/initial_connect_string.h @@ -35,16 +35,16 @@ #define GRPC_CORE_EXT_CLIENT_CONFIG_INITIAL_CONNECT_STRING_H #include -#include "src/core/lib/iomgr/sockaddr.h" -typedef void (*grpc_set_initial_connect_string_func)(struct sockaddr **addr, - size_t *addr_len, +#include "src/core/lib/iomgr/resolve_address.h" + +typedef void (*grpc_set_initial_connect_string_func)(grpc_resolved_address **addr, gpr_slice *initial_str); void grpc_test_set_initial_connect_string_function( grpc_set_initial_connect_string_func func); /** Set a string to be sent once connected. Optionally reset addr. */ -void grpc_set_initial_connect_string(struct sockaddr **addr, size_t *addr_len, +void grpc_set_initial_connect_string(grpc_resolved_address **addr, gpr_slice *connect_string); #endif /* GRPC_CORE_EXT_CLIENT_CONFIG_INITIAL_CONNECT_STRING_H */ diff --git a/src/core/ext/client_config/parse_address.c b/src/core/ext/client_config/parse_address.c index 7c548b15ad..13f1f4da97 100644 --- a/src/core/ext/client_config/parse_address.c +++ b/src/core/ext/client_config/parse_address.c @@ -31,6 +31,7 @@ * */ +#include "src/core/lib/iomgr/sockaddr.h" #include "src/core/ext/client_config/parse_address.h" #include @@ -45,32 +46,40 @@ #include #ifdef GRPC_HAVE_UNIX_SOCKET -int parse_unix(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len) { - struct sockaddr_un *un = (struct sockaddr_un *)addr; + +int parse_unix(grpc_uri *uri, grpc_resolved_address *resolved_addr) { + struct sockaddr_un *un = (struct sockaddr_un *)resolved_addr->addr; un->sun_family = AF_UNIX; strcpy(un->sun_path, uri->path); - *len = strlen(un->sun_path) + sizeof(un->sun_family) + 1; + resolved_addr->len = strlen(un->sun_path) + sizeof(un->sun_family) + 1; return 1; } -#endif -int parse_ipv4(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len) { +#else /* GRPC_HAVE_UNIX_SOCKET */ + +int parse_unix(grpc_uri *uri, grpc_resolved_address *resolved_addr) { + abort(); +} + +#endif /* GRPC_HAVE_UNIX_SOCKET */ + +int parse_ipv4(grpc_uri *uri, grpc_resolved_address *resolved_addr) { const char *host_port = uri->path; char *host; char *port; int port_num; int result = 0; - struct sockaddr_in *in = (struct sockaddr_in *)addr; + 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 0; } - memset(in, 0, sizeof(*in)); - *len = sizeof(*in); + memset(resolved_addr, 0, sizeof(grpc_resolved_address)); + resolved_addr->len = sizeof(struct sockaddr_in); in->sin_family = AF_INET; if (inet_pton(AF_INET, host, &in->sin_addr) == 0) { gpr_log(GPR_ERROR, "invalid ipv4 address: '%s'", host); @@ -96,13 +105,13 @@ done: return result; } -int parse_ipv6(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len) { +int parse_ipv6(grpc_uri *uri, grpc_resolved_address *resolved_addr) { const char *host_port = uri->path; char *host; char *port; int port_num; int result = 0; - struct sockaddr_in6 *in6 = (struct sockaddr_in6 *)addr; + struct sockaddr_in6 *in6 = (struct sockaddr_in6 *)resolved_addr->addr; if (*host_port == '/') ++host_port; if (!gpr_split_host_port(host_port, &host, &port)) { @@ -110,7 +119,7 @@ int parse_ipv6(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len) { } memset(in6, 0, sizeof(*in6)); - *len = sizeof(*in6); + resolved_addr->len = sizeof(*in6); in6->sin6_family = AF_INET6; if (inet_pton(AF_INET6, host, &in6->sin6_addr) == 0) { gpr_log(GPR_ERROR, "invalid ipv6 address: '%s'", host); diff --git a/src/core/ext/client_config/parse_address.h b/src/core/ext/client_config/parse_address.h index 16300de208..a309c030de 100644 --- a/src/core/ext/client_config/parse_address.h +++ b/src/core/ext/client_config/parse_address.h @@ -37,20 +37,18 @@ #include #include "src/core/ext/client_config/uri_parser.h" -#include "src/core/lib/iomgr/sockaddr.h" +#include "src/core/lib/iomgr/resolve_address.h" -#ifdef GRPC_HAVE_UNIX_SOCKET /** Populate \a addr and \a len from \a uri, whose path is expected to contain a * unix socket path. Returns true upon success. */ -int parse_unix(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len); -#endif +int parse_unix(grpc_uri *uri, grpc_resolved_address *resolved_addr); /** Populate /a addr and \a len from \a uri, whose path is expected to contain a * host:port pair. Returns true upon success. */ -int parse_ipv4(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len); +int parse_ipv4(grpc_uri *uri, grpc_resolved_address *resolved_addr); /** Populate /a addr and \a len from \a uri, whose path is expected to contain a * host:port pair. Returns true upon success. */ -int parse_ipv6(grpc_uri *uri, struct sockaddr_storage *addr, size_t *len); +int parse_ipv6(grpc_uri *uri, grpc_resolved_address *resolved_addr); #endif /* GRPC_CORE_EXT_CLIENT_CONFIG_PARSE_ADDRESS_H */ diff --git a/src/core/ext/client_config/subchannel.c b/src/core/ext/client_config/subchannel.c index 2c4364b259..4acc750fac 100644 --- a/src/core/ext/client_config/subchannel.c +++ b/src/core/ext/client_config/subchannel.c @@ -94,8 +94,7 @@ struct grpc_subchannel { /** channel arguments */ grpc_channel_args *args; /** address to connect to */ - struct sockaddr *addr; - size_t addr_len; + grpc_resolved_address *addr; grpc_subchannel_key *key; @@ -319,12 +318,10 @@ grpc_subchannel *grpc_subchannel_create(grpc_exec_ctx *exec_ctx, } else { c->filters = NULL; } - c->addr = gpr_malloc(args->addr_len); - if (args->addr_len) memcpy(c->addr, args->addr, args->addr_len); + c->addr = gpr_malloc(sizeof(grpc_resolved_address)); + if (args->addr->len) memcpy(c->addr, args->addr, sizeof(grpc_resolved_address)); c->pollset_set = grpc_pollset_set_create(); - c->addr_len = args->addr_len; - grpc_set_initial_connect_string(&c->addr, &c->addr_len, - &c->initial_connect_string); + grpc_set_initial_connect_string(&c->addr, &c->initial_connect_string); c->args = grpc_channel_args_copy(args->args); c->root_external_state_watcher.next = c->root_external_state_watcher.prev = &c->root_external_state_watcher; @@ -376,7 +373,6 @@ static void continue_connect(grpc_exec_ctx *exec_ctx, grpc_subchannel *c) { args.interested_parties = c->pollset_set; args.addr = c->addr; - args.addr_len = c->addr_len; args.deadline = c->next_attempt; args.channel_args = c->args; args.initial_connect_string = c->initial_connect_string; diff --git a/src/core/ext/client_config/subchannel.h b/src/core/ext/client_config/subchannel.h index ae1d96e640..c51e96bc6b 100644 --- a/src/core/ext/client_config/subchannel.h +++ b/src/core/ext/client_config/subchannel.h @@ -163,8 +163,7 @@ struct grpc_subchannel_args { /** Channel arguments to be supplied to the newly created channel */ const grpc_channel_args *args; /** Address to connect to */ - struct sockaddr *addr; - size_t addr_len; + grpc_resolved_address *addr; }; /** create a subchannel given a connector */ diff --git a/src/core/ext/client_config/subchannel_index.c b/src/core/ext/client_config/subchannel_index.c index 690cb16b96..0ec83fb0ad 100644 --- a/src/core/ext/client_config/subchannel_index.c +++ b/src/core/ext/client_config/subchannel_index.c @@ -85,10 +85,10 @@ static grpc_subchannel_key *create_key( } else { k->args.filters = NULL; } - k->args.addr_len = args->addr_len; - k->args.addr = gpr_malloc(args->addr_len); - if (k->args.addr_len > 0) { - memcpy(k->args.addr, args->addr, k->args.addr_len); + k->args.addr = gpr_malloc(sizeof(grpc_resolved_address)); + k->args.addr->len = args->addr->len; + if (k->args.addr->len > 0) { + memcpy(k->args.addr, args->addr, sizeof(grpc_resolved_address)); } k->args.args = copy_channel_args(args->args); return k; @@ -107,12 +107,12 @@ static int subchannel_key_compare(grpc_subchannel_key *a, grpc_subchannel_key *b) { int c = GPR_ICMP(a->connector, b->connector); if (c != 0) return c; - c = GPR_ICMP(a->args.addr_len, b->args.addr_len); + c = GPR_ICMP(a->args.addr->len, b->args.addr->len); if (c != 0) return c; c = GPR_ICMP(a->args.filter_count, b->args.filter_count); if (c != 0) return c; - if (a->args.addr_len) { - c = memcmp(a->args.addr, b->args.addr, a->args.addr_len); + if (a->args.addr->len) { + c = memcmp(a->args.addr->addr, b->args.addr->addr, a->args.addr->len); if (c != 0) return c; } if (a->args.filter_count > 0) { diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index a5ab42ba88..7f3c4613c6 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -96,10 +96,8 @@ * - Implement LB service forwarding (point 2c. in the doc's diagram). */ -/* We currently need this at the top of the file if we import some iomgr - headers because if we are building with libuv, those headers will include - uv.h, which needs to be included before other system headers */ -#include "src/core/lib/iomgr/port.h" +#include "src/core/lib/iomgr/sockaddr.h" + #include #include @@ -115,7 +113,6 @@ #include "src/core/ext/client_config/parse_address.h" #include "src/core/ext/lb_policy/grpclb/grpclb.h" #include "src/core/ext/lb_policy/grpclb/load_balancer_api.h" -#include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/sockaddr_utils.h" #include "src/core/lib/support/string.h" #include "src/core/lib/surface/call.h" @@ -445,7 +442,7 @@ static size_t process_serverlist(const grpc_grpclb_serverlist *serverlist, gpr_log(GPR_ERROR, "Missing LB token for backend address '%s'. The empty token will " "be used instead", - grpc_sockaddr_to_uri((struct sockaddr *)sa)); + grpc_sockaddr_to_uri(lb_addr->resolved_address)); lb_addr->user_data = GRPC_MDELEM_LOAD_REPORTING_INITIAL_EMPTY; } ++addr_idx; @@ -593,8 +590,7 @@ static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx, * ipvX://ip1:port1,ip2:port2,... * TODO(dgq): support mixed ip version */ char **addr_strs = gpr_malloc(sizeof(char *) * args->num_addresses); - addr_strs[0] = grpc_sockaddr_to_uri( - (const struct sockaddr *)&args->addresses[0].resolved_address->addr); + addr_strs[0] = grpc_sockaddr_to_uri(args->addresses[0].resolved_address); for (size_t i = 1; i < args->num_addresses; i++) { if (args->addresses[i].user_data != NULL) { gpr_log(GPR_ERROR, @@ -604,7 +600,7 @@ static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx, GPR_ASSERT( grpc_sockaddr_to_string( &addr_strs[i], - (const struct sockaddr *)&args->addresses[i].resolved_address->addr, + args->addresses[i].resolved_address, true) == 0); } size_t uri_path_len; diff --git a/src/core/ext/lb_policy/pick_first/pick_first.c b/src/core/ext/lb_policy/pick_first/pick_first.c index e847464581..00b9660049 100644 --- a/src/core/ext/lb_policy/pick_first/pick_first.c +++ b/src/core/ext/lb_policy/pick_first/pick_first.c @@ -31,11 +31,6 @@ * */ -/* We currently need this at the top of the file if we import some iomgr - headers because if we are building with libuv, those headers will include - uv.h, which needs to be included before other system headers */ -#include "src/core/lib/iomgr/port.h" - #include #include @@ -462,9 +457,7 @@ static grpc_lb_policy *create_pick_first(grpc_exec_ctx *exec_ctx, } memset(&sc_args, 0, sizeof(grpc_subchannel_args)); - sc_args.addr = - (struct sockaddr *)(args->addresses[i].resolved_address->addr); - sc_args.addr_len = (size_t)args->addresses[i].resolved_address->len; + sc_args.addr = args->addresses[i].resolved_address; grpc_subchannel *subchannel = grpc_client_channel_factory_create_subchannel( exec_ctx, args->client_channel_factory, &sc_args); diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c index b81df97c7f..eee3dce249 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -59,11 +59,6 @@ * the subchannel by the caller. */ -/* We currently need this at the top of the file if we import some iomgr - headers because if we are building with libuv, those headers will include - uv.h, which needs to be included before other system headers */ -#include "src/core/lib/iomgr/port.h" - #include #include @@ -631,8 +626,7 @@ static grpc_lb_policy *round_robin_create(grpc_exec_ctx *exec_ctx, size_t subchannel_idx = 0; for (size_t i = 0; i < p->num_addresses; i++) { memset(&sc_args, 0, sizeof(grpc_subchannel_args)); - sc_args.addr = (struct sockaddr *)args->addresses[i].resolved_address->addr; - sc_args.addr_len = args->addresses[i].resolved_address->len; + sc_args.addr = args->addresses[i].resolved_address; p->user_data_pointers[i] = args->addresses[i].user_data; diff --git a/src/core/ext/resolver/dns/native/dns_resolver.c b/src/core/ext/resolver/dns/native/dns_resolver.c index 462f78d696..32e9de69a6 100644 --- a/src/core/ext/resolver/dns/native/dns_resolver.c +++ b/src/core/ext/resolver/dns/native/dns_resolver.c @@ -31,11 +31,6 @@ * */ -/* We currently need this at the top of the file if we import some iomgr - headers because if we are building with libuv, those headers will include - uv.h, which needs to be included before other system headers */ -#include "src/core/lib/iomgr/port.h" - #include #include diff --git a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c index 23ad1ce477..8229c29a92 100644 --- a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c +++ b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c @@ -31,11 +31,6 @@ * */ -/* We currently need this at the top of the file if we import some iomgr - headers because if we are building with libuv, those headers will include - uv.h, which needs to be included before other system headers */ -#include "src/core/lib/iomgr/port.h" - #include #include #include @@ -187,7 +182,7 @@ static void do_nothing(void *ignored) {} static grpc_resolver *sockaddr_create( grpc_resolver_args *args, const char *default_lb_policy_name, - int parse(grpc_uri *uri, struct sockaddr_storage *dst, size_t *len)) { + int parse(grpc_uri *uri, grpc_resolved_address *dst)) { int errors_found = 0; /* GPR_FALSE */ sockaddr_resolver *r; gpr_slice path_slice; @@ -238,9 +233,7 @@ static grpc_resolver *sockaddr_create( grpc_uri ith_uri = *args->uri; char *part_str = gpr_dump_slice(path_parts.slices[i], GPR_DUMP_ASCII); ith_uri.path = part_str; - if (!parse(&ith_uri, - (struct sockaddr_storage *)(&r->addresses->addrs[i].addr), - &r->addresses->addrs[i].len)) { + if (!parse(&ith_uri, &r->addresses->addrs[i])) { errors_found = 1; /* GPR_TRUE */ } gpr_free(part_str); diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index cbaa75a90a..acbc81370d 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -149,7 +149,7 @@ static void connector_connect(grpc_exec_ctx *exec_ctx, grpc_connector *con, c->tcp = NULL; grpc_closure_init(&c->connected, connected, c); grpc_tcp_client_connect(exec_ctx, &c->connected, &c->tcp, - args->interested_parties, args->addr, args->addr_len, + args->interested_parties, args->addr, args->deadline); } diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index 9e2bdd758f..344d56ff86 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -209,7 +209,7 @@ static void connector_connect(grpc_exec_ctx *exec_ctx, grpc_connector *con, grpc_closure_init(&c->connected_closure, connected, c); grpc_tcp_client_connect( exec_ctx, &c->connected_closure, &c->newly_connecting_endpoint, - args->interested_parties, args->addr, args->addr_len, args->deadline); + args->interested_parties, args->addr, args->deadline); } static const grpc_connector_vtable connector_vtable = { diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c index f0e07429fa..e4967c2f08 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c @@ -148,9 +148,7 @@ int grpc_server_add_insecure_http2_port(grpc_server *server, const char *addr) { const size_t naddrs = resolved->naddrs; errors = gpr_malloc(sizeof(*errors) * naddrs); for (i = 0; i < naddrs; i++) { - errors[i] = grpc_tcp_server_add_port( - tcp, (struct sockaddr *)&resolved->addrs[i].addr, - resolved->addrs[i].len, &port_temp); + errors[i] = grpc_tcp_server_add_port(tcp, &resolved->addrs[i], &port_temp); if (errors[i] == GRPC_ERROR_NONE) { if (port_num == -1) { port_num = port_temp; diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index da3e284fcf..3b0e9c1811 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -272,9 +272,7 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, errors = gpr_malloc(sizeof(*errors) * resolved->naddrs); for (i = 0; i < resolved->naddrs; i++) { - errors[i] = grpc_tcp_server_add_port( - tcp, (struct sockaddr *)&resolved->addrs[i].addr, - resolved->addrs[i].len, &port_temp); + errors[i] = grpc_tcp_server_add_port(tcp, &resolved->addrs[i], &port_temp); if (errors[i] == GRPC_ERROR_NONE) { if (port_num == -1) { port_num = port_temp; diff --git a/src/core/lib/http/httpcli.c b/src/core/lib/http/httpcli.c index 18135bcb58..09bdc2e3d9 100644 --- a/src/core/lib/http/httpcli.c +++ b/src/core/lib/http/httpcli.c @@ -32,7 +32,6 @@ */ #include "src/core/lib/http/httpcli.h" -#include "src/core/lib/iomgr/sockaddr.h" #include @@ -126,7 +125,7 @@ static void append_error(internal_request *req, grpc_error *error) { req->overall_error = GRPC_ERROR_CREATE("Failed HTTP/1 client request"); } grpc_resolved_address *addr = &req->addresses->addrs[req->next_address - 1]; - char *addr_text = grpc_sockaddr_to_uri((struct sockaddr *)addr->addr); + char *addr_text = grpc_sockaddr_to_uri(addr); req->overall_error = grpc_error_add_child( req->overall_error, grpc_error_set_str(error, GRPC_ERROR_STR_TARGET_ADDRESS, addr_text)); @@ -226,7 +225,7 @@ static void next_address(grpc_exec_ctx *exec_ctx, internal_request *req, grpc_closure_init(&req->connected, on_connected, req); grpc_tcp_client_connect( exec_ctx, &req->connected, &req->ep, req->context->pollset_set, - (struct sockaddr *)&addr->addr, addr->len, req->deadline); + addr, req->deadline); } static void on_resolved(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { diff --git a/src/core/lib/http/httpcli.h b/src/core/lib/http/httpcli.h index eba6ecb9ab..662e176f4c 100644 --- a/src/core/lib/http/httpcli.h +++ b/src/core/lib/http/httpcli.h @@ -34,11 +34,6 @@ #ifndef GRPC_CORE_LIB_HTTP_HTTPCLI_H #define GRPC_CORE_LIB_HTTP_HTTPCLI_H -/* We currently need this at the top of the file if we import some iomgr - headers because if we are building with libuv, those headers will include - uv.h, which needs to be included before other system headers */ -#include "src/core/lib/iomgr/port.h" - #include #include diff --git a/src/core/lib/iomgr/port.h b/src/core/lib/iomgr/port.h index 60bb16a423..fd300082d7 100644 --- a/src/core/lib/iomgr/port.h +++ b/src/core/lib/iomgr/port.h @@ -37,7 +37,7 @@ #define GRPC_CORE_LIB_IOMGR_PORT_H #if defined(GRPC_UV) -#include +// Do nothing #elif defined(GPR_MANYLINUX1) #define GRPC_HAVE_IPV6_RECVPKTINFO 1 #define GRPC_HAVE_IP_PKTINFO 1 diff --git a/src/core/lib/iomgr/resolve_address_posix.c b/src/core/lib/iomgr/resolve_address_posix.c index 9bc46901b1..de791b2b67 100644 --- a/src/core/lib/iomgr/resolve_address_posix.c +++ b/src/core/lib/iomgr/resolve_address_posix.c @@ -34,9 +34,10 @@ #include "src/core/lib/iomgr/port.h" #ifdef GRPC_POSIX_SOCKET -#include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/sockaddr.h" +#include "src/core/lib/iomgr/resolve_address.h" + #include #include @@ -49,7 +50,6 @@ #include #include "src/core/lib/iomgr/executor.h" #include "src/core/lib/iomgr/iomgr_internal.h" -#include "src/core/lib/iomgr/sockaddr_utils.h" #include "src/core/lib/iomgr/unix_sockets_posix.h" #include "src/core/lib/support/block_annotate.h" #include "src/core/lib/support/string.h" diff --git a/src/core/lib/iomgr/resolve_address_uv.c b/src/core/lib/iomgr/resolve_address_uv.c index 550047b4d2..f206c63d79 100644 --- a/src/core/lib/iomgr/resolve_address_uv.c +++ b/src/core/lib/iomgr/resolve_address_uv.c @@ -45,6 +45,7 @@ #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/resolve_address.h" +#include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/sockaddr_utils.h" #include @@ -86,8 +87,7 @@ static grpc_error *handle_addrinfo_result(int status, { for (i = 0; i < (*addresses)->naddrs; i++) { char *buf; - grpc_sockaddr_to_string( - &buf, (struct sockaddr *)&(*addresses)->addrs[i].addr, 0); + grpc_sockaddr_to_string(&buf, &(*addresses)->addrs[i], 0); gpr_free(buf); } } diff --git a/src/core/lib/iomgr/resolve_address_windows.c b/src/core/lib/iomgr/resolve_address_windows.c index 460bd1f2ee..6e94269d28 100644 --- a/src/core/lib/iomgr/resolve_address_windows.c +++ b/src/core/lib/iomgr/resolve_address_windows.c @@ -34,9 +34,10 @@ #include "src/core/lib/iomgr/port.h" #ifdef GRPC_WINSOCK_SOCKET -#include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/sockaddr.h" +#include "src/core/lib/iomgr/resolve_address.h" + #include #include @@ -124,8 +125,7 @@ static grpc_error *blocking_resolve_address_impl( { for (i = 0; i < (*addresses)->naddrs; i++) { char *buf; - grpc_sockaddr_to_string( - &buf, (struct sockaddr *)&(*addresses)->addrs[i].addr, 0); + grpc_sockaddr_to_string(&buf, (*addresses)->addrs[i], 0); gpr_free(buf); } } diff --git a/src/core/lib/iomgr/sockaddr.h b/src/core/lib/iomgr/sockaddr.h index 418488a0ea..75dc532d6c 100644 --- a/src/core/lib/iomgr/sockaddr.h +++ b/src/core/lib/iomgr/sockaddr.h @@ -31,6 +31,9 @@ * */ +/* This header transitively includes other headers that care about include + * order, so it should be included first */ + #ifndef GRPC_CORE_LIB_IOMGR_SOCKADDR_H #define GRPC_CORE_LIB_IOMGR_SOCKADDR_H diff --git a/src/core/lib/iomgr/sockaddr_utils.c b/src/core/lib/iomgr/sockaddr_utils.c index ed1dac5622..0333e7aaf5 100644 --- a/src/core/lib/iomgr/sockaddr_utils.c +++ b/src/core/lib/iomgr/sockaddr_utils.c @@ -42,6 +42,7 @@ #include #include +#include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/socket_utils.h" #include "src/core/lib/iomgr/unix_sockets_posix.h" #include "src/core/lib/support/string.h" @@ -49,20 +50,23 @@ static const uint8_t kV4MappedPrefix[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff}; -int grpc_sockaddr_is_v4mapped(const struct sockaddr *addr, - struct sockaddr_in *addr4_out) { - GPR_ASSERT(addr != (struct sockaddr *)addr4_out); +int grpc_sockaddr_is_v4mapped(const grpc_resolved_address *resolved_addr, + grpc_resolved_address *resolved_addr4_out) { + GPR_ASSERT(resolved_addr != resolved_addr4_out); + const struct sockaddr *addr = (const struct sockaddr *)resolved_addr->addr; + struct sockaddr_in *addr4_out = (struct sockaddr_in *)resolved_addr4_out->addr; if (addr->sa_family == AF_INET6) { const struct sockaddr_in6 *addr6 = (const struct sockaddr_in6 *)addr; if (memcmp(addr6->sin6_addr.s6_addr, kV4MappedPrefix, sizeof(kV4MappedPrefix)) == 0) { - if (addr4_out != NULL) { + if (resolved_addr4_out != NULL) { /* Normalize ::ffff:0.0.0.0/96 to IPv4. */ - memset(addr4_out, 0, sizeof(*addr4_out)); + memset(resolved_addr4_out, 0, sizeof(*resolved_addr4_out)); addr4_out->sin_family = AF_INET; /* s6_addr32 would be nice, but it's non-standard. */ memcpy(&addr4_out->sin_addr, &addr6->sin6_addr.s6_addr[12], 4); addr4_out->sin_port = addr6->sin6_port; + resolved_addr4_out->len = sizeof(struct sockaddr_in); } return 1; } @@ -70,26 +74,31 @@ int grpc_sockaddr_is_v4mapped(const struct sockaddr *addr, return 0; } -int grpc_sockaddr_to_v4mapped(const struct sockaddr *addr, - struct sockaddr_in6 *addr6_out) { - GPR_ASSERT(addr != (struct sockaddr *)addr6_out); +int grpc_sockaddr_to_v4mapped(const grpc_resolved_address *resolved_addr, + grpc_resolved_address *resolved_addr6_out) { + GPR_ASSERT(resolved_addr != resolved_addr6_out); + const struct sockaddr *addr = (const struct sockaddr *)resolved_addr->addr; + struct sockaddr_in6 *addr6_out = (struct sockaddr_in6 *)resolved_addr6_out->addr; if (addr->sa_family == AF_INET) { const struct sockaddr_in *addr4 = (const struct sockaddr_in *)addr; - memset(addr6_out, 0, sizeof(*addr6_out)); + memset(resolved_addr6_out, 0, sizeof(*resolved_addr6_out)); addr6_out->sin6_family = AF_INET6; memcpy(&addr6_out->sin6_addr.s6_addr[0], kV4MappedPrefix, 12); memcpy(&addr6_out->sin6_addr.s6_addr[12], &addr4->sin_addr, 4); addr6_out->sin6_port = addr4->sin_port; + resolved_addr6_out->len = sizeof(struct sockaddr_in6); return 1; } return 0; } -int grpc_sockaddr_is_wildcard(const struct sockaddr *addr, int *port_out) { - struct sockaddr_in addr4_normalized; - if (grpc_sockaddr_is_v4mapped(addr, &addr4_normalized)) { - addr = (struct sockaddr *)&addr4_normalized; +int grpc_sockaddr_is_wildcard(const grpc_resolved_address *resolved_addr, int *port_out) { + const struct sockaddr *addr; + grpc_resolved_address addr4_normalized; + if (grpc_sockaddr_is_v4mapped(resolved_addr, &addr4_normalized)) { + resolved_addr = &addr4_normalized; } + addr = (const struct sockaddr *)resolved_addr->addr; if (addr->sa_family == AF_INET) { /* Check for 0.0.0.0 */ const struct sockaddr_in *addr4 = (const struct sockaddr_in *)addr; @@ -114,39 +123,45 @@ int grpc_sockaddr_is_wildcard(const struct sockaddr *addr, int *port_out) { } } -void grpc_sockaddr_make_wildcards(int port, struct sockaddr_in *wild4_out, - struct sockaddr_in6 *wild6_out) { +void grpc_sockaddr_make_wildcards(int port, grpc_resolved_address *wild4_out, + grpc_resolved_address *wild6_out) { grpc_sockaddr_make_wildcard4(port, wild4_out); grpc_sockaddr_make_wildcard6(port, wild6_out); } -void grpc_sockaddr_make_wildcard4(int port, struct sockaddr_in *wild_out) { +void grpc_sockaddr_make_wildcard4(int port, grpc_resolved_address *resolved_wild_out) { + struct sockaddr_in *wild_out = (struct sockaddr_in *)resolved_wild_out->addr; GPR_ASSERT(port >= 0 && port < 65536); - memset(wild_out, 0, sizeof(*wild_out)); + memset(resolved_wild_out, 0, sizeof(*resolved_wild_out)); wild_out->sin_family = AF_INET; wild_out->sin_port = htons((uint16_t)port); + resolved_wild_out->len = sizeof(struct sockaddr_in); } -void grpc_sockaddr_make_wildcard6(int port, struct sockaddr_in6 *wild_out) { +void grpc_sockaddr_make_wildcard6(int port, grpc_resolved_address *resolved_wild_out) { + struct sockaddr_in6 *wild_out = (struct sockaddr_in6 *)resolved_wild_out->addr; GPR_ASSERT(port >= 0 && port < 65536); - memset(wild_out, 0, sizeof(*wild_out)); + memset(resolved_wild_out, 0, sizeof(*resolved_wild_out)); wild_out->sin6_family = AF_INET6; wild_out->sin6_port = htons((uint16_t)port); + resolved_wild_out->len = sizeof(struct sockaddr_in6); } -int grpc_sockaddr_to_string(char **out, const struct sockaddr *addr, +int grpc_sockaddr_to_string(char **out, const grpc_resolved_address *resolved_addr, int normalize) { + const struct sockaddr *addr; const int save_errno = errno; - struct sockaddr_in addr_normalized; + grpc_resolved_address addr_normalized; char ntop_buf[INET6_ADDRSTRLEN]; const void *ip = NULL; int port; int ret; *out = NULL; - if (normalize && grpc_sockaddr_is_v4mapped(addr, &addr_normalized)) { - addr = (const struct sockaddr *)&addr_normalized; + if (normalize && grpc_sockaddr_is_v4mapped(resolved_addr, &addr_normalized)) { + resolved_addr = &addr_normalized; } + addr = (const struct sockaddr *)resolved_addr->addr; if (addr->sa_family == AF_INET) { const struct sockaddr_in *addr4 = (const struct sockaddr_in *)addr; ip = &addr4->sin_addr; @@ -167,39 +182,43 @@ int grpc_sockaddr_to_string(char **out, const struct sockaddr *addr, return ret; } -char *grpc_sockaddr_to_uri(const struct sockaddr *addr) { +char *grpc_sockaddr_to_uri(const grpc_resolved_address *resolved_addr) { char *temp; char *result; - struct sockaddr_in addr_normalized; + grpc_resolved_address addr_normalized; + const struct sockaddr *addr; - if (grpc_sockaddr_is_v4mapped(addr, &addr_normalized)) { - addr = (const struct sockaddr *)&addr_normalized; + if (grpc_sockaddr_is_v4mapped(resolved_addr, &addr_normalized)) { + resolved_addr = &addr_normalized; } + addr = (const struct sockaddr *)resolved_addr->addr; + switch (addr->sa_family) { case AF_INET: - grpc_sockaddr_to_string(&temp, addr, 0); + grpc_sockaddr_to_string(&temp, resolved_addr, 0); gpr_asprintf(&result, "ipv4:%s", temp); gpr_free(temp); return result; case AF_INET6: - grpc_sockaddr_to_string(&temp, addr, 0); + grpc_sockaddr_to_string(&temp, resolved_addr, 0); gpr_asprintf(&result, "ipv6:%s", temp); gpr_free(temp); return result; default: - return grpc_sockaddr_to_uri_unix_if_possible(addr); + return grpc_sockaddr_to_uri_unix_if_possible(resolved_addr); } } -int grpc_sockaddr_get_port(const struct sockaddr *addr) { +int grpc_sockaddr_get_port(const grpc_resolved_address *resolved_addr) { + const struct sockaddr *addr = (const struct sockaddr *)resolved_addr->addr; switch (addr->sa_family) { case AF_INET: return ntohs(((struct sockaddr_in *)addr)->sin_port); case AF_INET6: return ntohs(((struct sockaddr_in6 *)addr)->sin6_port); default: - if (grpc_is_unix_socket(addr)) { + if (grpc_is_unix_socket(resolved_addr)) { return 1; } gpr_log(GPR_ERROR, "Unknown socket family %d in grpc_sockaddr_get_port", @@ -208,7 +227,8 @@ int grpc_sockaddr_get_port(const struct sockaddr *addr) { } } -int grpc_sockaddr_set_port(const struct sockaddr *addr, int port) { +int grpc_sockaddr_set_port(const grpc_resolved_address *resolved_addr, int port) { + const struct sockaddr *addr = (const struct sockaddr *)resolved_addr->addr; switch (addr->sa_family) { case AF_INET: GPR_ASSERT(port >= 0 && port < 65536); diff --git a/src/core/lib/iomgr/sockaddr_utils.h b/src/core/lib/iomgr/sockaddr_utils.h index 9f81992e6b..5371e360c5 100644 --- a/src/core/lib/iomgr/sockaddr_utils.h +++ b/src/core/lib/iomgr/sockaddr_utils.h @@ -34,40 +34,40 @@ #ifndef GRPC_CORE_LIB_IOMGR_SOCKADDR_UTILS_H #define GRPC_CORE_LIB_IOMGR_SOCKADDR_UTILS_H -#include "src/core/lib/iomgr/sockaddr.h" +#include "src/core/lib/iomgr/resolve_address.h" /* Returns true if addr is an IPv4-mapped IPv6 address within the ::ffff:0.0.0.0/96 range, or false otherwise. If addr4_out is non-NULL, the inner IPv4 address will be copied here when returning true. */ -int grpc_sockaddr_is_v4mapped(const struct sockaddr *addr, - struct sockaddr_in *addr4_out); +int grpc_sockaddr_is_v4mapped(const grpc_resolved_address *addr, + grpc_resolved_address *addr4_out); /* If addr is an AF_INET address, writes the corresponding ::ffff:0.0.0.0/96 address to addr6_out and returns true. Otherwise returns false. */ -int grpc_sockaddr_to_v4mapped(const struct sockaddr *addr, - struct sockaddr_in6 *addr6_out); +int grpc_sockaddr_to_v4mapped(const grpc_resolved_address *addr, + grpc_resolved_address *addr6_out); /* If addr is ::, 0.0.0.0, or ::ffff:0.0.0.0, writes the port number to *port_out (if not NULL) and returns true, otherwise returns false. */ -int grpc_sockaddr_is_wildcard(const struct sockaddr *addr, int *port_out); +int grpc_sockaddr_is_wildcard(const grpc_resolved_address *addr, int *port_out); /* Writes 0.0.0.0:port and [::]:port to separate sockaddrs. */ -void grpc_sockaddr_make_wildcards(int port, struct sockaddr_in *wild4_out, - struct sockaddr_in6 *wild6_out); +void grpc_sockaddr_make_wildcards(int port, grpc_resolved_address *wild4_out, + grpc_resolved_address *wild6_out); /* Writes 0.0.0.0:port. */ -void grpc_sockaddr_make_wildcard4(int port, struct sockaddr_in *wild_out); +void grpc_sockaddr_make_wildcard4(int port, grpc_resolved_address *wild_out); /* Writes [::]:port. */ -void grpc_sockaddr_make_wildcard6(int port, struct sockaddr_in6 *wild_out); +void grpc_sockaddr_make_wildcard6(int port, grpc_resolved_address *wild_out); /* Return the IP port number of a sockaddr */ -int grpc_sockaddr_get_port(const struct sockaddr *addr); +int grpc_sockaddr_get_port(const grpc_resolved_address *addr); /* Set IP port number of a sockaddr */ -int grpc_sockaddr_set_port(const struct sockaddr *addr, int port); +int grpc_sockaddr_set_port(const grpc_resolved_address *addr, int port); /* Converts a sockaddr into a newly-allocated human-readable string. @@ -81,9 +81,9 @@ int grpc_sockaddr_set_port(const struct sockaddr *addr, int port); In the unlikely event of an error, returns -1 and sets *out to NULL. The existing value of errno is always preserved. */ -int grpc_sockaddr_to_string(char **out, const struct sockaddr *addr, +int grpc_sockaddr_to_string(char **out, const grpc_resolved_address *addr, int normalize); -char *grpc_sockaddr_to_uri(const struct sockaddr *addr); +char *grpc_sockaddr_to_uri(const grpc_resolved_address *addr); #endif /* GRPC_CORE_LIB_IOMGR_SOCKADDR_UTILS_H */ diff --git a/src/core/lib/iomgr/socket_utils.h b/src/core/lib/iomgr/socket_utils.h index b01197ad18..cc3ee2e30c 100644 --- a/src/core/lib/iomgr/socket_utils.h +++ b/src/core/lib/iomgr/socket_utils.h @@ -34,17 +34,9 @@ #ifndef GRPC_CORE_LIB_IOMGR_SOCKET_UTILS_H #define GRPC_CORE_LIB_IOMGR_SOCKET_UTILS_H -#include "src/core/lib/iomgr/port.h" - -#if defined(GRPC_WINSOCK_SOCKET) -#include "src/core/lib/iomgr/sockaddr_windows.h" -#elif defined(GRPC_POSIX_SOCKET) -#include "src/core/lib/iomgr/sockaddr_posix.h" -#elif defined(GRPC_UV) -#include -#endif +#include /* A wrapper for inet_ntop on POSIX systems and InetNtop on Windows systems */ -const char *grpc_inet_ntop(int af, const void *src, char *dst, socklen_t size); +const char *grpc_inet_ntop(int af, const void *src, char *dst, size_t size); #endif /* GRPC_CORE_LIB_IOMGR_SOCKET_UTILS_H */ diff --git a/src/core/lib/iomgr/socket_utils_common_posix.c b/src/core/lib/iomgr/socket_utils_common_posix.c index aa844da078..239b9b8876 100644 --- a/src/core/lib/iomgr/socket_utils_common_posix.c +++ b/src/core/lib/iomgr/socket_utils_common_posix.c @@ -254,7 +254,7 @@ static int set_socket_dualstack(int fd) { } } -static grpc_error *error_for_fd(int fd, const struct sockaddr *addr) { +static grpc_error *error_for_fd(int fd, const grpc_resolved_address *addr) { if (fd >= 0) return GRPC_ERROR_NONE; char *addr_str; grpc_sockaddr_to_string(&addr_str, addr, 0); @@ -264,10 +264,12 @@ static grpc_error *error_for_fd(int fd, const struct sockaddr *addr) { return err; } -grpc_error *grpc_create_dualstack_socket(const struct sockaddr *addr, int type, +grpc_error *grpc_create_dualstack_socket(const grpc_resolved_address *resolved_addr, + int type, int protocol, grpc_dualstack_mode *dsmode, int *newfd) { + const struct sockaddr *addr = (const struct sockaddr *)resolved_addr->addr; int family = addr->sa_family; if (family == AF_INET6) { if (grpc_ipv6_loopback_available()) { @@ -282,9 +284,9 @@ grpc_error *grpc_create_dualstack_socket(const struct sockaddr *addr, int type, return GRPC_ERROR_NONE; } /* If this isn't an IPv4 address, then return whatever we've got. */ - if (!grpc_sockaddr_is_v4mapped(addr, NULL)) { + if (!grpc_sockaddr_is_v4mapped(resolved_addr, NULL)) { *dsmode = GRPC_DSMODE_IPV6; - return error_for_fd(*newfd, addr); + return error_for_fd(*newfd, resolved_addr); } /* Fall back to AF_INET. */ if (*newfd >= 0) { @@ -294,11 +296,12 @@ grpc_error *grpc_create_dualstack_socket(const struct sockaddr *addr, int type, } *dsmode = family == AF_INET ? GRPC_DSMODE_IPV4 : GRPC_DSMODE_NONE; *newfd = socket(family, type, protocol); - return error_for_fd(*newfd, addr); + return error_for_fd(*newfd, resolved_addr); } -const char *grpc_inet_ntop(int af, const void *src, char *dst, socklen_t size) { - return inet_ntop(af, src, dst, size); +const char *grpc_inet_ntop(int af, const void *src, char *dst, size_t size) { + GPR_ASSERT(size <= (socklen_t)-1); + return inet_ntop(af, src, dst, (socklen_t)size); } #endif diff --git a/src/core/lib/iomgr/socket_utils_linux.c b/src/core/lib/iomgr/socket_utils_linux.c index 3ebc3f1ac1..627b9d6f9c 100644 --- a/src/core/lib/iomgr/socket_utils_linux.c +++ b/src/core/lib/iomgr/socket_utils_linux.c @@ -35,17 +35,22 @@ #ifdef GRPC_LINUX_SOCKETUTILS +#include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/socket_utils_posix.h" +#include + #include #include -int grpc_accept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, +int grpc_accept4(int sockfd, grpc_resolved_address *resolved_addr, int nonblock, int cloexec) { int flags = 0; + GPR_ASSERT(sizeof(socklen_t) <= sizeof(size_t)); + GPR_ASSERT(resolved_addr->len <= (socklen_t)-1); flags |= nonblock ? SOCK_NONBLOCK : 0; flags |= cloexec ? SOCK_CLOEXEC : 0; - return accept4(sockfd, addr, addrlen, flags); + return accept4(sockfd, (struct sockaddr *)resolved_addr->addr, (socklen_t *)&resolved_addr->len, flags); } #endif diff --git a/src/core/lib/iomgr/socket_utils_posix.c b/src/core/lib/iomgr/socket_utils_posix.c index 4f26773342..0f2622eed6 100644 --- a/src/core/lib/iomgr/socket_utils_posix.c +++ b/src/core/lib/iomgr/socket_utils_posix.c @@ -42,12 +42,14 @@ #include #include +#include "src/core/lib/iomgr/sockaddr.h" -int grpc_accept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, +int grpc_accept4(int sockfd, grpc_resolved_address *resolved_addr, int nonblock, int cloexec) { int fd, flags; - - fd = accept(sockfd, addr, addrlen); + GPR_ASSERT(sizeof(socklen_t) <= sizeof(size_t)); + GPR_ASSERT(resolved_addr->len <= (socklen_t)-1); + fd = accept(sockfd, (struct sockaddr *)resolved_addr->addr, (socklen_t)resolved_addr->len); if (fd >= 0) { if (nonblock) { flags = fcntl(fd, F_GETFL, 0); diff --git a/src/core/lib/iomgr/socket_utils_posix.h b/src/core/lib/iomgr/socket_utils_posix.h index 7bcc2219ae..432cba452d 100644 --- a/src/core/lib/iomgr/socket_utils_posix.h +++ b/src/core/lib/iomgr/socket_utils_posix.h @@ -34,13 +34,15 @@ #ifndef GRPC_CORE_LIB_IOMGR_SOCKET_UTILS_POSIX_H #define GRPC_CORE_LIB_IOMGR_SOCKET_UTILS_POSIX_H +#include "src/core/lib/iomgr/resolve_address.h" + #include #include #include "src/core/lib/iomgr/error.h" /* a wrapper for accept or accept4 */ -int grpc_accept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, +int grpc_accept4(int sockfd, grpc_resolved_address *resolved_addr, int nonblock, int cloexec); /* set a socket to non blocking mode */ @@ -125,7 +127,7 @@ extern int grpc_forbid_dualstack_sockets_for_testing; IPv4, so that bind() or connect() see the correct family. Also, it's important to distinguish between DUALSTACK and IPV6 when listening on the [::] wildcard address. */ -grpc_error *grpc_create_dualstack_socket(const struct sockaddr *addr, int type, +grpc_error *grpc_create_dualstack_socket(const grpc_resolved_address *addr, int type, int protocol, grpc_dualstack_mode *dsmode, int *newfd); diff --git a/src/core/lib/iomgr/socket_utils_uv.c b/src/core/lib/iomgr/socket_utils_uv.c index 7f61384e74..741bf28969 100644 --- a/src/core/lib/iomgr/socket_utils_uv.c +++ b/src/core/lib/iomgr/socket_utils_uv.c @@ -41,9 +41,8 @@ #include -const char *grpc_inet_ntop(int af, const void *src, char *dst, socklen_t size) { - GPR_ASSERT(sizeof(socklen_t) <= sizeof(size_t)); - uv_inet_ntop(af, src, dst, (size_t)size); +const char *grpc_inet_ntop(int af, const void *src, char *dst, size_t size) { + uv_inet_ntop(af, src, dst, size); return dst; } diff --git a/src/core/lib/iomgr/socket_utils_windows.c b/src/core/lib/iomgr/socket_utils_windows.c index 09dabd7a73..628ad4a45b 100644 --- a/src/core/lib/iomgr/socket_utils_windows.c +++ b/src/core/lib/iomgr/socket_utils_windows.c @@ -35,14 +35,14 @@ #ifdef GRPC_WINDOWS_SOCKETUTILS +#include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/socket_utils.h" #include -const char *grpc_inet_ntop(int af, const void *src, char *dst, socklen_t size) { - GPR_ASSERT(sizeof(socklen_t) <= sizeof(size_t)); +const char *grpc_inet_ntop(int af, const void *src, char *dst, size_t size) { /* Windows InetNtopA wants a mutable ip pointer */ - return InetNtopA(af, (void *)src, dst, (size_t)size); + return InetNtopA(af, (void *)src, dst, size); } #endif /* GRPC_WINDOWS_SOCKETUTILS */ diff --git a/src/core/lib/iomgr/tcp_client.h b/src/core/lib/iomgr/tcp_client.h index a07e0b9f0c..83e69003f5 100644 --- a/src/core/lib/iomgr/tcp_client.h +++ b/src/core/lib/iomgr/tcp_client.h @@ -37,6 +37,7 @@ #include #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/pollset_set.h" +#include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/sockaddr.h" /* Asynchronously connect to an address (specified as (addr, len)), and call @@ -47,7 +48,7 @@ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_connect, grpc_endpoint **endpoint, grpc_pollset_set *interested_parties, - const struct sockaddr *addr, size_t addr_len, + const grpc_resolved_address *addr, gpr_timespec deadline); #endif /* GRPC_CORE_LIB_IOMGR_TCP_CLIENT_H */ diff --git a/src/core/lib/iomgr/tcp_client_posix.c b/src/core/lib/iomgr/tcp_client_posix.c index 4c1dcd671f..eda3279659 100644 --- a/src/core/lib/iomgr/tcp_client_posix.c +++ b/src/core/lib/iomgr/tcp_client_posix.c @@ -71,7 +71,7 @@ typedef struct { grpc_closure *closure; } async_connect; -static grpc_error *prepare_socket(const struct sockaddr *addr, int fd) { +static grpc_error *prepare_socket(const grpc_resolved_address *addr, int fd) { grpc_error *err = GRPC_ERROR_NONE; GPR_ASSERT(fd >= 0); @@ -227,14 +227,14 @@ finish: static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, grpc_pollset_set *interested_parties, - const struct sockaddr *addr, - size_t addr_len, gpr_timespec deadline) { + const grpc_resolved_address *addr, + gpr_timespec deadline) { int fd; grpc_dualstack_mode dsmode; int err; async_connect *ac; - struct sockaddr_in6 addr6_v4mapped; - struct sockaddr_in addr4_copy; + grpc_resolved_address addr6_v4mapped; + grpc_resolved_address addr4_copy; grpc_fd *fdobj; char *name; char *addr_str; @@ -244,8 +244,7 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, /* Use dualstack sockets where available. */ if (grpc_sockaddr_to_v4mapped(addr, &addr6_v4mapped)) { - addr = (const struct sockaddr *)&addr6_v4mapped; - addr_len = sizeof(addr6_v4mapped); + addr = &addr6_v4mapped; } error = grpc_create_dualstack_socket(addr, SOCK_STREAM, 0, &dsmode, &fd); @@ -256,8 +255,7 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, if (dsmode == GRPC_DSMODE_IPV4) { /* If we got an AF_INET socket, map the address back to IPv4. */ GPR_ASSERT(grpc_sockaddr_is_v4mapped(addr, &addr4_copy)); - addr = (struct sockaddr *)&addr4_copy; - addr_len = sizeof(addr4_copy); + addr = &addr4_copy; } if ((error = prepare_socket(addr, fd)) != GRPC_ERROR_NONE) { grpc_exec_ctx_sched(exec_ctx, closure, error, NULL); @@ -265,8 +263,8 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, } do { - GPR_ASSERT(addr_len < ~(socklen_t)0); - err = connect(fd, addr, (socklen_t)addr_len); + GPR_ASSERT(addr->len < ~(socklen_t)0); + err = connect(fd, (const struct sockaddr *)addr->addr, (socklen_t)addr->len); } while (err < 0 && errno == EINTR); addr_str = grpc_sockaddr_to_uri(addr); @@ -321,16 +319,16 @@ done: // overridden by api_fuzzer.c void (*grpc_tcp_client_connect_impl)( grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, - grpc_pollset_set *interested_parties, const struct sockaddr *addr, - size_t addr_len, gpr_timespec deadline) = tcp_client_connect_impl; + grpc_pollset_set *interested_parties, const grpc_resolved_address *addr, + gpr_timespec deadline) = tcp_client_connect_impl; void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, grpc_pollset_set *interested_parties, - const struct sockaddr *addr, size_t addr_len, + const grpc_resolved_address *addr, gpr_timespec deadline) { grpc_tcp_client_connect_impl(exec_ctx, closure, ep, interested_parties, addr, - addr_len, deadline); + deadline); } #endif diff --git a/src/core/lib/iomgr/tcp_client_uv.c b/src/core/lib/iomgr/tcp_client_uv.c index 7823a1d873..bed64ebe0b 100644 --- a/src/core/lib/iomgr/tcp_client_uv.c +++ b/src/core/lib/iomgr/tcp_client_uv.c @@ -118,8 +118,8 @@ static void uv_tc_on_connect(uv_connect_t *req, int status) { void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, grpc_pollset_set *interested_parties, - const struct sockaddr *addr, - size_t addr_len, gpr_timespec deadline) { + const grpc_resolved_address *resolved_addr, + gpr_timespec deadline) { grpc_uv_tcp_connect *connect; (void)interested_parties; connect = gpr_malloc(sizeof(grpc_uv_tcp_connect)); @@ -128,11 +128,12 @@ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, connect->endpoint = ep; connect->tcp_handle = gpr_malloc(sizeof(uv_tcp_t)); gpr_log(GPR_DEBUG, "Allocated uv_tcp_t handle %p", connect->tcp_handle); - connect->addr_name = grpc_sockaddr_to_uri(addr); + connect->addr_name = grpc_sockaddr_to_uri(resolved_addr); uv_tcp_init(uv_default_loop(), connect->tcp_handle); connect->connect_req.data = connect; // TODO(murgatroid99): figure out what the return value here means - uv_tcp_connect(&connect->connect_req, connect->tcp_handle, addr, + uv_tcp_connect(&connect->connect_req, connect->tcp_handle, + (const struct sockaddr *)resolved_addr->addr, uv_tc_on_connect); grpc_timer_init(exec_ctx, &connect->alarm, gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC), diff --git a/src/core/lib/iomgr/tcp_client_windows.c b/src/core/lib/iomgr/tcp_client_windows.c index 29775cce21..c987a3c0c5 100644 --- a/src/core/lib/iomgr/tcp_client_windows.c +++ b/src/core/lib/iomgr/tcp_client_windows.c @@ -129,13 +129,13 @@ static void on_connect(grpc_exec_ctx *exec_ctx, void *acp, grpc_error *error) { void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_done, grpc_endpoint **endpoint, grpc_pollset_set *interested_parties, - const struct sockaddr *addr, size_t addr_len, + const grpc_resolved_address *addr, gpr_timespec deadline) { SOCKET sock = INVALID_SOCKET; BOOL success; int status; - struct sockaddr_in6 addr6_v4mapped; - struct sockaddr_in6 local_address; + grpc_resolved_address addr6_v4mapped; + grpc_resolved_address local_address; async_connect *ac; grpc_winsocket *socket = NULL; LPFN_CONNECTEX ConnectEx; @@ -148,8 +148,7 @@ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_done, /* Use dualstack sockets where available. */ if (grpc_sockaddr_to_v4mapped(addr, &addr6_v4mapped)) { - addr = (const struct sockaddr *)&addr6_v4mapped; - addr_len = sizeof(addr6_v4mapped); + addr = &addr6_v4mapped; } sock = WSASocket(AF_INET6, SOCK_STREAM, IPPROTO_TCP, NULL, 0, @@ -178,7 +177,7 @@ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_done, grpc_sockaddr_make_wildcard6(0, &local_address); - status = bind(sock, (struct sockaddr *)&local_address, sizeof(local_address)); + status = bind(sock, (struct sockaddr *)&local_address.addr, local_address.len); if (status != 0) { error = GRPC_WSA_ERROR(WSAGetLastError(), "bind"); goto failure; @@ -187,7 +186,7 @@ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_done, socket = grpc_winsocket_create(sock, "client"); info = &socket->write_info; success = - ConnectEx(sock, addr, (int)addr_len, NULL, 0, NULL, &info->overlapped); + ConnectEx(sock, (struct sockaddr *)&addr->addr, (int)addr->len, NULL, 0, NULL, &info->overlapped); /* It wouldn't be unusual to get a success immediately. But we'll still get an IOCP notification, so let's ignore it. */ diff --git a/src/core/lib/iomgr/tcp_server.h b/src/core/lib/iomgr/tcp_server.h index 5a25d39a0c..20495e8a77 100644 --- a/src/core/lib/iomgr/tcp_server.h +++ b/src/core/lib/iomgr/tcp_server.h @@ -38,6 +38,7 @@ #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" +#include "src/core/lib/iomgr/resolve_address.h" /* Forward decl of grpc_tcp_server */ typedef struct grpc_tcp_server grpc_tcp_server; @@ -78,8 +79,9 @@ void grpc_tcp_server_start(grpc_exec_ctx *exec_ctx, grpc_tcp_server *server, but not dualstack sockets. */ /* TODO(ctiller): deprecate this, and make grpc_tcp_server_add_ports to handle all of the multiple socket port matching logic in one place */ -grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, - size_t addr_len, int *out_port); +grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s, + const grpc_resolved_address *addr, + int *out_port); /* Number of fds at the given port_index, or 0 if port_index is out of bounds. */ diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index c1254d49d3..6ef7a719c4 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -62,6 +62,7 @@ #include #include "src/core/lib/iomgr/resolve_address.h" +#include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/sockaddr_utils.h" #include "src/core/lib/iomgr/socket_utils_posix.h" #include "src/core/lib/iomgr/tcp_posix.h" @@ -79,11 +80,14 @@ struct grpc_tcp_listener { int fd; grpc_fd *emfd; grpc_tcp_server *server; + grpc_resolved_address addr; + /* union { uint8_t untyped[GRPC_MAX_SOCKADDR_SIZE]; struct sockaddr sockaddr; } addr; size_t addr_len; + */ int port; unsigned port_index; unsigned fd_index; @@ -235,7 +239,7 @@ static void deactivated_all_ports(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { if (s->head) { grpc_tcp_listener *sp; for (sp = s->head; sp; sp = sp->next) { - grpc_unlink_if_unix_domain_socket(&sp->addr.sockaddr); + grpc_unlink_if_unix_domain_socket(&sp->addr); sp->destroyed_closure.cb = destroyed_port; sp->destroyed_closure.cb_arg = s; grpc_fd_orphan(exec_ctx, sp->emfd, &sp->destroyed_closure, NULL, @@ -301,11 +305,9 @@ static int get_max_accept_queue_size(void) { } /* Prepare a recently-created socket for listening. */ -static grpc_error *prepare_socket(int fd, const struct sockaddr *addr, - size_t addr_len, bool so_reuseport, - int *port) { - struct sockaddr_storage sockname_temp; - socklen_t sockname_len; +static grpc_error *prepare_socket(int fd, const grpc_resolved_address *addr, + bool so_reuseport, int *port) { + grpc_resolved_address sockname_temp; grpc_error *err = GRPC_ERROR_NONE; GPR_ASSERT(fd >= 0); @@ -328,8 +330,8 @@ static grpc_error *prepare_socket(int fd, const struct sockaddr *addr, err = grpc_set_socket_no_sigpipe_if_possible(fd); if (err != GRPC_ERROR_NONE) goto error; - GPR_ASSERT(addr_len < ~(socklen_t)0); - if (bind(fd, addr, (socklen_t)addr_len) < 0) { + GPR_ASSERT(addr->len < ~(socklen_t)0); + if (bind(fd, (struct sockaddr *)addr->addr, (socklen_t)addr->len) < 0) { err = GRPC_OS_ERROR(errno, "bind"); goto error; } @@ -339,13 +341,14 @@ static grpc_error *prepare_socket(int fd, const struct sockaddr *addr, goto error; } - sockname_len = sizeof(sockname_temp); - if (getsockname(fd, (struct sockaddr *)&sockname_temp, &sockname_len) < 0) { + sockname_temp.len = sizeof(struct sockaddr_storage); + + if (getsockname(fd, (struct sockaddr *)sockname_temp.addr, (socklen_t *)&sockname_temp.len) < 0) { err = GRPC_OS_ERROR(errno, "getsockname"); goto error; } - *port = grpc_sockaddr_get_port((struct sockaddr *)&sockname_temp); + *port = grpc_sockaddr_get_port(&sockname_temp); return GRPC_ERROR_NONE; error: @@ -379,13 +382,13 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *err) { /* loop until accept4 returns EAGAIN, and then re-arm notification */ for (;;) { - struct sockaddr_storage addr; - socklen_t addrlen = sizeof(addr); + grpc_resolved_address addr; char *addr_str; char *name; + addr.len = sizeof(struct sockaddr_storage); /* Note: If we ever decide to return this address to the user, remember to strip off the ::ffff:0.0.0.0/96 prefix first. */ - int fd = grpc_accept4(sp->fd, (struct sockaddr *)&addr, &addrlen, 1, 1); + int fd = grpc_accept4(sp->fd, &addr, 1, 1); if (fd < 0) { switch (errno) { case EINTR: @@ -401,7 +404,7 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *err) { grpc_set_socket_no_sigpipe_if_possible(fd); - addr_str = grpc_sockaddr_to_uri((struct sockaddr *)&addr); + addr_str = grpc_sockaddr_to_uri(&addr); gpr_asprintf(&name, "tcp-server-connection:%s", addr_str); if (grpc_tcp_trace) { @@ -439,8 +442,8 @@ error: } static grpc_error *add_socket_to_server(grpc_tcp_server *s, int fd, - const struct sockaddr *addr, - size_t addr_len, unsigned port_index, + const grpc_resolved_address *addr, + unsigned port_index, unsigned fd_index, grpc_tcp_listener **listener) { grpc_tcp_listener *sp = NULL; @@ -448,10 +451,10 @@ static grpc_error *add_socket_to_server(grpc_tcp_server *s, int fd, char *addr_str; char *name; - grpc_error *err = prepare_socket(fd, addr, addr_len, s->so_reuseport, &port); + grpc_error *err = prepare_socket(fd, addr, s->so_reuseport, &port); if (err == GRPC_ERROR_NONE) { GPR_ASSERT(port > 0); - grpc_sockaddr_to_string(&addr_str, (struct sockaddr *)&addr, 1); + grpc_sockaddr_to_string(&addr_str, addr, 1); gpr_asprintf(&name, "tcp-server-listener:%s", addr_str); gpr_mu_lock(&s->mu); s->nports++; @@ -467,8 +470,7 @@ static grpc_error *add_socket_to_server(grpc_tcp_server *s, int fd, sp->server = s; sp->fd = fd; sp->emfd = grpc_fd_create(fd, name); - memcpy(sp->addr.untyped, addr, addr_len); - sp->addr_len = addr_len; + memcpy(&sp->addr, addr, sizeof(grpc_resolved_address)); sp->port = port; sp->port_index = port_index; sp->fd_index = fd_index; @@ -501,14 +503,13 @@ static grpc_error *clone_port(grpc_tcp_listener *listener, unsigned count) { int fd = -1; int port = -1; grpc_dualstack_mode dsmode; - err = grpc_create_dualstack_socket(&listener->addr.sockaddr, SOCK_STREAM, 0, + err = grpc_create_dualstack_socket(&listener->addr, SOCK_STREAM, 0, &dsmode, &fd); if (err != GRPC_ERROR_NONE) return err; - err = prepare_socket(fd, &listener->addr.sockaddr, listener->addr_len, true, - &port); + err = prepare_socket(fd, &listener->addr, true, &port); if (err != GRPC_ERROR_NONE) return err; listener->server->nports++; - grpc_sockaddr_to_string(&addr_str, &listener->addr.sockaddr, 1); + grpc_sockaddr_to_string(&addr_str, &listener->addr, 1); gpr_asprintf(&name, "tcp-server-listener:%s/clone-%d", addr_str, i); sp = gpr_malloc(sizeof(grpc_tcp_listener)); sp->next = listener->next; @@ -521,8 +522,7 @@ static grpc_error *clone_port(grpc_tcp_listener *listener, unsigned count) { sp->server = listener->server; sp->fd = fd; sp->emfd = grpc_fd_create(fd, name); - memcpy(sp->addr.untyped, listener->addr.untyped, listener->addr_len); - sp->addr_len = listener->addr_len; + memcpy(&sp->addr, &listener->addr, sizeof(grpc_resolved_address)); sp->port = port; sp->port_index = listener->port_index; sp->fd_index = listener->fd_index + count - i; @@ -537,19 +537,19 @@ static grpc_error *clone_port(grpc_tcp_listener *listener, unsigned count) { return GRPC_ERROR_NONE; } -grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, - size_t addr_len, int *out_port) { +grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s, + const grpc_resolved_address *addr, + int *out_port) { grpc_tcp_listener *sp; grpc_tcp_listener *sp2 = NULL; int fd; grpc_dualstack_mode dsmode; - struct sockaddr_in6 addr6_v4mapped; - struct sockaddr_in wild4; - struct sockaddr_in6 wild6; - struct sockaddr_in addr4_copy; - struct sockaddr *allocated_addr = NULL; - struct sockaddr_storage sockname_temp; - socklen_t sockname_len; + grpc_resolved_address addr6_v4mapped; + grpc_resolved_address wild4; + grpc_resolved_address wild6; + grpc_resolved_address addr4_copy; + grpc_resolved_address *allocated_addr = NULL; + grpc_resolved_address sockname_temp; int port; unsigned port_index = 0; unsigned fd_index = 0; @@ -557,19 +557,19 @@ grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, if (s->tail != NULL) { port_index = s->tail->port_index + 1; } - grpc_unlink_if_unix_domain_socket((struct sockaddr *)addr); + grpc_unlink_if_unix_domain_socket(addr); /* Check if this is a wildcard port, and if so, try to keep the port the same as some previously created listener. */ if (grpc_sockaddr_get_port(addr) == 0) { for (sp = s->head; sp; sp = sp->next) { - sockname_len = sizeof(sockname_temp); - if (0 == getsockname(sp->fd, (struct sockaddr *)&sockname_temp, - &sockname_len)) { - port = grpc_sockaddr_get_port((struct sockaddr *)&sockname_temp); + sockname_temp.len = sizeof(struct sockaddr_storage); + if (0 == getsockname(sp->fd, (struct sockaddr *)sockname_temp.addr, + (socklen_t *)&sockname_temp.len)) { + port = grpc_sockaddr_get_port(&sockname_temp); if (port > 0) { - allocated_addr = gpr_malloc(addr_len); - memcpy(allocated_addr, addr, addr_len); + allocated_addr = gpr_malloc(sizeof(grpc_resolved_address)); + memcpy(allocated_addr, addr, addr->len); grpc_sockaddr_set_port(allocated_addr, port); addr = allocated_addr; break; @@ -581,8 +581,7 @@ grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, sp = NULL; if (grpc_sockaddr_to_v4mapped(addr, &addr6_v4mapped)) { - addr = (const struct sockaddr *)&addr6_v4mapped; - addr_len = sizeof(addr6_v4mapped); + addr = &addr6_v4mapped; } /* Treat :: or 0.0.0.0 as a family-agnostic wildcard. */ @@ -590,12 +589,10 @@ grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, grpc_sockaddr_make_wildcards(port, &wild4, &wild6); /* Try listening on IPv6 first. */ - addr = (struct sockaddr *)&wild6; - addr_len = sizeof(wild6); + addr = &wild6; errs[0] = grpc_create_dualstack_socket(addr, SOCK_STREAM, 0, &dsmode, &fd); if (errs[0] == GRPC_ERROR_NONE) { - errs[0] = add_socket_to_server(s, fd, addr, addr_len, port_index, - fd_index, &sp); + errs[0] = add_socket_to_server(s, fd, addr, port_index, fd_index, &sp); if (fd >= 0 && dsmode == GRPC_DSMODE_DUALSTACK) { goto done; } @@ -604,23 +601,20 @@ grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, } /* If we didn't get a dualstack socket, also listen on 0.0.0.0. */ if (port == 0 && sp != NULL) { - grpc_sockaddr_set_port((struct sockaddr *)&wild4, sp->port); + grpc_sockaddr_set_port(&wild4, sp->port); } } - addr = (struct sockaddr *)&wild4; - addr_len = sizeof(wild4); + addr = &wild4; } errs[1] = grpc_create_dualstack_socket(addr, SOCK_STREAM, 0, &dsmode, &fd); if (errs[1] == GRPC_ERROR_NONE) { if (dsmode == GRPC_DSMODE_IPV4 && grpc_sockaddr_is_v4mapped(addr, &addr4_copy)) { - addr = (struct sockaddr *)&addr4_copy; - addr_len = sizeof(addr4_copy); + addr = &addr4_copy; } sp2 = sp; - errs[1] = - add_socket_to_server(s, fd, addr, addr_len, port_index, fd_index, &sp); + errs[1] = add_socket_to_server(s, fd, addr, port_index, fd_index, &sp); if (sp2 != NULL && sp != NULL) { sp2->sibling = sp; sp->is_sibling = 1; @@ -695,7 +689,7 @@ void grpc_tcp_server_start(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s, s->pollset_count = pollset_count; sp = s->head; while (sp != NULL) { - if (s->so_reuseport && !grpc_is_unix_socket(&sp->addr.sockaddr) && + if (s->so_reuseport && !grpc_is_unix_socket(&sp->addr) && pollset_count > 1) { GPR_ASSERT(GRPC_LOG_IF_ERROR( "clone_port", clone_port(sp, (unsigned)(pollset_count - 1)))); diff --git a/src/core/lib/iomgr/tcp_server_uv.c b/src/core/lib/iomgr/tcp_server_uv.c index b69e70881f..2d57715ba2 100644 --- a/src/core/lib/iomgr/tcp_server_uv.c +++ b/src/core/lib/iomgr/tcp_server_uv.c @@ -42,6 +42,7 @@ #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/sockaddr_utils.h" #include "src/core/lib/iomgr/tcp_server.h" #include "src/core/lib/iomgr/tcp_uv.h" @@ -171,8 +172,7 @@ static void on_connect(uv_stream_t *server, int status) { uv_tcp_t *client; grpc_endpoint *ep = NULL; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - struct sockaddr_storage peer_name; - int peer_name_len = sizeof(peer_name); + grpc_resolved_address peer_name; char *peer_name_string; int err; @@ -189,10 +189,12 @@ static void on_connect(uv_stream_t *server, int status) { // UV documentation says this is guaranteed to succeed uv_accept((uv_stream_t *)server, (uv_stream_t *)client); peer_name_string = NULL; - err = uv_tcp_getpeername(client, (struct sockaddr *)&peer_name, - &peer_name_len); + memset(&peer_name, 0, sizeof(grpc_resolved_address)); + peer_name.len = sizeof(struct sockaddr_storage); + err = uv_tcp_getpeername(client, (struct sockaddr *)&peer_name.addr, + (int*)&peer_name.len); if (err == 0) { - peer_name_string = grpc_sockaddr_to_uri((struct sockaddr *)&peer_name); + peer_name_string = grpc_sockaddr_to_uri(&peer_name); } else { gpr_log(GPR_INFO, "uv_tcp_getpeername error: %s", uv_strerror(status)); @@ -206,18 +208,17 @@ static void on_connect(uv_stream_t *server, int status) { static grpc_error *add_socket_to_server(grpc_tcp_server *s, uv_tcp_t *handle, - struct sockaddr *addr, - size_t addr_len, unsigned port_index, + const grpc_resolved_address *addr, + unsigned port_index, grpc_tcp_listener **listener) { grpc_tcp_listener *sp = NULL; int port = -1; int status; grpc_error *error; - struct sockaddr_storage sockname_temp; - int sockname_len; + grpc_resolved_address sockname_temp; // The last argument to uv_tcp_bind is flags - status = uv_tcp_bind(handle, addr, 0); + status = uv_tcp_bind(handle, (struct sockaddr *)addr->addr, 0); if (status != 0) { error = GRPC_ERROR_CREATE("Failed to bind to port"); error = grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR, @@ -225,9 +226,9 @@ static grpc_error *add_socket_to_server(grpc_tcp_server *s, return error; } - sockname_len = (int)sizeof(sockname_temp); - status = uv_tcp_getsockname(handle, (struct sockaddr *)&sockname_temp, - &sockname_len); + sockname_temp.len = (int)sizeof(struct sockaddr_storage); + status = uv_tcp_getsockname(handle, (struct sockaddr *)&sockname_temp.addr, + (int *)&sockname_temp.len); if (status != 0) { error = GRPC_ERROR_CREATE("getsockname failed"); error = grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR, @@ -235,7 +236,7 @@ static grpc_error *add_socket_to_server(grpc_tcp_server *s, return error; } - port = grpc_sockaddr_get_port((struct sockaddr *)&sockname_temp); + port = grpc_sockaddr_get_port(&sockname_temp); GPR_ASSERT(port >= 0); GPR_ASSERT(!s->on_accept_cb && "must add ports before starting server"); @@ -259,16 +260,16 @@ static grpc_error *add_socket_to_server(grpc_tcp_server *s, return GRPC_ERROR_NONE; } -grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, - size_t addr_len, int *port) { +grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s, + const grpc_resolved_address *addr, + int *port) { // This function is mostly copied from tcp_server_windows.c grpc_tcp_listener *sp = NULL; uv_tcp_t *handle; - struct sockaddr_in6 addr6_v4mapped; - struct sockaddr_in6 wildcard; - struct sockaddr *allocated_addr = NULL; - struct sockaddr_storage sockname_temp; - int sockname_len; + grpc_resolved_address addr6_v4mapped; + grpc_resolved_address wildcard; + grpc_resolved_address *allocated_addr = NULL; + grpc_resolved_address sockname_temp; unsigned port_index = 0; int status; grpc_error *error = GRPC_ERROR_NONE; @@ -281,13 +282,13 @@ grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, as some previously created listener. */ if (grpc_sockaddr_get_port(addr) == 0) { for (sp = s->head; sp; sp = sp->next) { - sockname_len = sizeof(sockname_temp); - if (0 == uv_tcp_getsockname(sp->handle, (struct sockaddr *)&sockname_temp, - &sockname_len)) { - *port = grpc_sockaddr_get_port((struct sockaddr *)&sockname_temp); + sockname_temp.len = sizeof(struct sockaddr_storage); + if (0 == uv_tcp_getsockname(sp->handle, (struct sockaddr *)&sockname_temp.addr, + (int *)&sockname_temp.len)) { + *port = grpc_sockaddr_get_port(&sockname_temp); if (*port > 0) { - allocated_addr = gpr_malloc(addr_len); - memcpy(allocated_addr, addr, addr_len); + allocated_addr = gpr_malloc(sizeof(grpc_resolved_address)); + memcpy(allocated_addr, addr, sizeof(grpc_resolved_address)); grpc_sockaddr_set_port(allocated_addr, *port); addr = allocated_addr; break; @@ -297,24 +298,21 @@ grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, } if (grpc_sockaddr_to_v4mapped(addr, &addr6_v4mapped)) { - addr = (const struct sockaddr *)&addr6_v4mapped; - addr_len = sizeof(addr6_v4mapped); + addr = &addr6_v4mapped; } /* Treat :: or 0.0.0.0 as a family-agnostic wildcard. */ if (grpc_sockaddr_is_wildcard(addr, port)) { grpc_sockaddr_make_wildcard6(*port, &wildcard); - addr = (struct sockaddr *)&wildcard; - addr_len = sizeof(wildcard); + addr = &wildcard; } handle = gpr_malloc(sizeof(uv_tcp_t)); gpr_log(GPR_DEBUG, "Allocating uv_tcp_t handle %p", handle); status = uv_tcp_init(uv_default_loop(), handle); if (status == 0) { - error = add_socket_to_server(s, handle, (struct sockaddr *)addr, addr_len, - port_index, &sp); + error = add_socket_to_server(s, handle, addr, port_index, &sp); } else { error = GRPC_ERROR_CREATE("Failed to initialize UV tcp handle"); error = grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR, diff --git a/src/core/lib/iomgr/timer_uv.c b/src/core/lib/iomgr/timer_uv.c index ffeb08cb79..d280c8b2c8 100644 --- a/src/core/lib/iomgr/timer_uv.c +++ b/src/core/lib/iomgr/timer_uv.c @@ -68,6 +68,7 @@ void grpc_timer_init(grpc_exec_ctx *exec_ctx, grpc_timer *timer, gpr_timespec deadline, grpc_iomgr_cb_func timer_cb, void *timer_cb_arg, gpr_timespec now) { uint64_t timeout; + uv_timer_t *uv_timer; grpc_closure_init(&timer->closure, timer_cb, timer_cb_arg); if (gpr_time_cmp(deadline, now) <= 0) { timer->triggered = 1; @@ -77,10 +78,11 @@ void grpc_timer_init(grpc_exec_ctx *exec_ctx, grpc_timer *timer, timer->triggered = 0; timeout = (uint64_t)gpr_time_to_millis(gpr_time_sub(deadline, now)); gpr_log(GPR_DEBUG, "Setting timer %p: %lu", timer, timeout); - timer->uv_timer = gpr_malloc(sizeof(uv_timer_t)); - uv_timer_init(uv_default_loop(), timer->uv_timer); - timer->uv_timer->data = timer; - uv_timer_start(timer->uv_timer, run_expired_timer, timeout, 0); + uv_timer = gpr_malloc(sizeof(uv_timer_t)); + uv_timer_init(uv_default_loop(), uv_timer); + uv_timer->data = timer; + timer->uv_timer = uv_timer; + uv_timer_start(uv_timer, run_expired_timer, timeout, 0); } void grpc_timer_cancel(grpc_exec_ctx *exec_ctx, grpc_timer *timer) { @@ -88,7 +90,7 @@ void grpc_timer_cancel(grpc_exec_ctx *exec_ctx, grpc_timer *timer) { gpr_log(GPR_DEBUG, "Running cancelled timer callback"); timer->triggered = 1; grpc_exec_ctx_sched(exec_ctx, &timer->closure, GRPC_ERROR_CANCELLED, NULL); - stop_uv_timer(timer->uv_timer); + stop_uv_timer((uv_timer_t*)timer->uv_timer); } } diff --git a/src/core/lib/iomgr/timer_uv.h b/src/core/lib/iomgr/timer_uv.h index d78d6a6ca2..b64291b036 100644 --- a/src/core/lib/iomgr/timer_uv.h +++ b/src/core/lib/iomgr/timer_uv.h @@ -34,13 +34,13 @@ #ifndef GRPC_CORE_LIB_IOMGR_TIMER_GENERIC_H #define GRPC_CORE_LIB_IOMGR_TIMER_GENERIC_H -#include - #include "src/core/lib/iomgr/exec_ctx.h" struct grpc_timer { grpc_closure closure; - uv_timer_t *uv_timer; + /* This is actually a uv_timer_t*, but we want to keep platform-specific + types out of headers */ + void *uv_timer; int triggered; }; diff --git a/src/core/lib/iomgr/unix_sockets_posix.c b/src/core/lib/iomgr/unix_sockets_posix.c index 33082a2e99..830a0c96ff 100644 --- a/src/core/lib/iomgr/unix_sockets_posix.c +++ b/src/core/lib/iomgr/unix_sockets_posix.c @@ -34,6 +34,8 @@ #ifdef GRPC_HAVE_UNIX_SOCKET +#include "src/core/lib/iomgr/sockaddr.h" + #include #include #include @@ -62,15 +64,17 @@ grpc_error *grpc_resolve_unix_domain_address(const char *name, return GRPC_ERROR_NONE; } -int grpc_is_unix_socket(const struct sockaddr *addr) { +int grpc_is_unix_socket(const grpc_resolved_address *resolved_addr) { + const struct sockaddr *addr = (const struct sockaddr *)resolved_addr->addr; return addr->sa_family == AF_UNIX; } -void grpc_unlink_if_unix_domain_socket(const struct sockaddr *addr) { +void grpc_unlink_if_unix_domain_socket(const grpc_resolved_address *resolved_addr) { + const struct sockaddr *addr = (const struct sockaddr *)resolved_addr->addr; if (addr->sa_family != AF_UNIX) { return; } - struct sockaddr_un *un = (struct sockaddr_un *)addr; + struct sockaddr_un *un = (struct sockaddr_un *)resolved_addr->addr; struct stat st; if (stat(un->sun_path, &st) == 0 && (st.st_mode & S_IFMT) == S_IFSOCK) { @@ -78,13 +82,15 @@ void grpc_unlink_if_unix_domain_socket(const struct sockaddr *addr) { } } -char *grpc_sockaddr_to_uri_unix_if_possible(const struct sockaddr *addr) { +char *grpc_sockaddr_to_uri_unix_if_possible(const grpc_resolved_address *resolved_addr) { + const struct sockaddr *addr = (const struct sockaddr *)resolved_addr->addr; if (addr->sa_family != AF_UNIX) { return NULL; } char *result; - gpr_asprintf(&result, "unix:%s", ((struct sockaddr_un *)addr)->sun_path); + gpr_asprintf(&result, "unix:%s", + ((struct sockaddr_un *)addr)->sun_path); return result; } diff --git a/src/core/lib/iomgr/unix_sockets_posix.h b/src/core/lib/iomgr/unix_sockets_posix.h index 5458f6ab4f..0ce483119c 100644 --- a/src/core/lib/iomgr/unix_sockets_posix.h +++ b/src/core/lib/iomgr/unix_sockets_posix.h @@ -39,17 +39,16 @@ #include #include "src/core/lib/iomgr/resolve_address.h" -#include "src/core/lib/iomgr/sockaddr.h" void grpc_create_socketpair_if_unix(int sv[2]); grpc_error *grpc_resolve_unix_domain_address( const char *name, grpc_resolved_addresses **addresses); -int grpc_is_unix_socket(const struct sockaddr *addr); +int grpc_is_unix_socket(const grpc_resolved_address *resolved_addr); -void grpc_unlink_if_unix_domain_socket(const struct sockaddr *addr); +void grpc_unlink_if_unix_domain_socket(const grpc_resolved_address *resolved_addr); -char *grpc_sockaddr_to_uri_unix_if_possible(const struct sockaddr *addr); +char *grpc_sockaddr_to_uri_unix_if_possible(const grpc_resolved_address *resolved_addr); #endif /* GRPC_CORE_LIB_IOMGR_UNIX_SOCKETS_POSIX_H */ diff --git a/src/core/lib/iomgr/unix_sockets_posix_noop.c b/src/core/lib/iomgr/unix_sockets_posix_noop.c index 82f008d599..1daf5152c1 100644 --- a/src/core/lib/iomgr/unix_sockets_posix_noop.c +++ b/src/core/lib/iomgr/unix_sockets_posix_noop.c @@ -50,11 +50,11 @@ grpc_error *grpc_resolve_unix_domain_address( return GRPC_ERROR_CREATE("Unix domain sockets are not supported on Windows"); } -int grpc_is_unix_socket(const struct sockaddr *addr) { return false; } +int grpc_is_unix_socket(const grpc_resolved_address *addr) { return false; } -void grpc_unlink_if_unix_domain_socket(const struct sockaddr *addr) {} +void grpc_unlink_if_unix_domain_socket(const grpc_resolved_address *addr) {} -char *grpc_sockaddr_to_uri_unix_if_possible(const struct sockaddr *addr) { +char *grpc_sockaddr_to_uri_unix_if_possible(const grpc_resolved_address *addr) { return NULL; } diff --git a/src/core/lib/security/context/security_context.c b/src/core/lib/security/context/security_context.c index 45e259e0ca..2204fadf54 100644 --- a/src/core/lib/security/context/security_context.c +++ b/src/core/lib/security/context/security_context.c @@ -31,11 +31,6 @@ * */ -/* We currently need this at the top of the file if we import some iomgr - headers because if we are building with libuv, those headers will include - uv.h, which needs to be included before other system headers */ -#include "src/core/lib/iomgr/port.h" - #include #include "src/core/lib/security/context/security_context.h" diff --git a/src/core/lib/security/context/security_context.h b/src/core/lib/security/context/security_context.h index a55153b28c..1e131a0c23 100644 --- a/src/core/lib/security/context/security_context.h +++ b/src/core/lib/security/context/security_context.h @@ -34,11 +34,6 @@ #ifndef GRPC_CORE_LIB_SECURITY_CONTEXT_SECURITY_CONTEXT_H #define GRPC_CORE_LIB_SECURITY_CONTEXT_SECURITY_CONTEXT_H -/* We currently need this at the top of the file if we import some iomgr - headers because if we are building with libuv, those headers will include - uv.h, which needs to be included before other system headers */ -#include "src/core/lib/iomgr/port.h" - #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/security/credentials/credentials.h" diff --git a/src/core/lib/security/credentials/credentials.h b/src/core/lib/security/credentials/credentials.h index bfdfcb6761..8e9d842ead 100644 --- a/src/core/lib/security/credentials/credentials.h +++ b/src/core/lib/security/credentials/credentials.h @@ -34,11 +34,6 @@ #ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_CREDENTIALS_H #define GRPC_CORE_LIB_SECURITY_CREDENTIALS_CREDENTIALS_H -/* We currently need this at the top of the file if we import some iomgr - headers because if we are building with libuv, those headers will include - uv.h, which needs to be included before other system headers */ -#include "src/core/lib/iomgr/port.h" - #include #include #include diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.c b/src/core/lib/security/credentials/oauth2/oauth2_credentials.c index e9638c5a22..c22ea5c468 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.c +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.c @@ -31,11 +31,6 @@ * */ -/* We currently need this at the top of the file if we import some iomgr - headers because if we are building with libuv, those headers will include - uv.h, which needs to be included before other system headers */ -#include "src/core/lib/iomgr/port.h" - #include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h" #include diff --git a/src/core/lib/security/transport/server_auth_filter.c b/src/core/lib/security/transport/server_auth_filter.c index 34d8a132c5..b2c6815af8 100644 --- a/src/core/lib/security/transport/server_auth_filter.c +++ b/src/core/lib/security/transport/server_auth_filter.c @@ -31,11 +31,6 @@ * */ -/* We currently need this at the top of the file if we import some iomgr - headers because if we are building with libuv, those headers will include - uv.h, which needs to be included before other system headers */ -#include "src/core/lib/iomgr/port.h" - #include #include "src/core/lib/security/context/security_context.h" diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 65a982266a..3f093598f9 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -31,11 +31,6 @@ * */ -/* We currently need this at the top of the file if we import some iomgr - headers because if we are building with libuv, those headers will include - uv.h, which needs to be included before other system headers */ -#include "src/core/lib/iomgr/port.h" - #include #include #include diff --git a/src/core/lib/surface/init_secure.c b/src/core/lib/surface/init_secure.c index 9a9342ff2c..7ee7b51568 100644 --- a/src/core/lib/surface/init_secure.c +++ b/src/core/lib/surface/init_secure.c @@ -31,11 +31,6 @@ * */ -/* We currently need this at the top of the file if we import some iomgr - headers because if we are building with libuv, those headers will include - uv.h, which needs to be included before other system headers */ -#include "src/core/lib/iomgr/port.h" - #include "src/core/lib/surface/init.h" #include diff --git a/src/core/lib/tsi/ssl_transport_security.c b/src/core/lib/tsi/ssl_transport_security.c index 116b66a179..e59b661fa7 100644 --- a/src/core/lib/tsi/ssl_transport_security.c +++ b/src/core/lib/tsi/ssl_transport_security.c @@ -31,10 +31,7 @@ * */ -/* We currently need this at the top of the file if we import some iomgr - headers because if we are building with libuv, those headers will include - uv.h, which needs to be included before other system headers */ -#include "src/core/lib/iomgr/port.h" +#include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/tsi/ssl_transport_security.h" #include "src/core/lib/iomgr/socket_utils.h" diff --git a/test/core/client_config/set_initial_connect_string_test.c b/test/core/client_config/set_initial_connect_string_test.c index 1b51424f7e..dcff859e4b 100644 --- a/test/core/client_config/set_initial_connect_string_test.c +++ b/test/core/client_config/set_initial_connect_string_test.c @@ -93,15 +93,14 @@ static void on_connect(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp, grpc_endpoint_read(exec_ctx, tcp, &state.temp_incoming_buffer, &on_read); } -static void set_magic_initial_string(struct sockaddr **addr, size_t *addr_len, +static void set_magic_initial_string(grpc_resolved_address **addr, gpr_slice *connect_string) { GPR_ASSERT(addr); - GPR_ASSERT(addr_len); + GPR_ASSERT((*addr)->len); *connect_string = gpr_slice_from_copied_string(magic_connect_string); } -static void reset_addr_and_set_magic_string(struct sockaddr **addr, - size_t *addr_len, +static void reset_addr_and_set_magic_string(grpc_resolved_address **addr, gpr_slice *connect_string) { struct sockaddr_in target; *connect_string = gpr_slice_from_copied_string(magic_connect_string); @@ -109,9 +108,9 @@ static void reset_addr_and_set_magic_string(struct sockaddr **addr, target.sin_family = AF_INET; target.sin_addr.s_addr = htonl(INADDR_LOOPBACK); target.sin_port = htons((uint16_t)server_port); - *addr_len = sizeof(target); - *addr = (struct sockaddr *)gpr_malloc(sizeof(target)); - memcpy(*addr, &target, sizeof(target)); + (*addr)->len = sizeof(target); + *addr = (grpc_resolved_address *)gpr_malloc(sizeof(grpc_resolved_address)); + memcpy((*addr)->addr, &target, sizeof(target)); } static gpr_timespec n_sec_deadline(int seconds) { diff --git a/test/core/end2end/fixtures/h2_full+trace.c b/test/core/end2end/fixtures/h2_full+trace.c index e25b5e3347..46582e3190 100644 --- a/test/core/end2end/fixtures/h2_full+trace.c +++ b/test/core/end2end/fixtures/h2_full+trace.c @@ -34,6 +34,7 @@ #include "test/core/end2end/end2end_tests.h" #include +#include #include #include diff --git a/test/core/end2end/fixtures/h2_sockpair+trace.c b/test/core/end2end/fixtures/h2_sockpair+trace.c index d0925e5109..356a359784 100644 --- a/test/core/end2end/fixtures/h2_sockpair+trace.c +++ b/test/core/end2end/fixtures/h2_sockpair+trace.c @@ -34,6 +34,7 @@ #include "test/core/end2end/end2end_tests.h" #include +#include #include #include diff --git a/test/core/iomgr/sockaddr_utils_test.c b/test/core/iomgr/sockaddr_utils_test.c index a330314443..1f89f59ef2 100644 --- a/test/core/iomgr/sockaddr_utils_test.c +++ b/test/core/iomgr/sockaddr_utils_test.c @@ -31,6 +31,7 @@ * */ +#include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/sockaddr_utils.h" #include @@ -41,24 +42,28 @@ #include #include "test/core/util/test_config.h" -static struct sockaddr_in make_addr4(const uint8_t *data, size_t data_len) { - struct sockaddr_in addr4; - memset(&addr4, 0, sizeof(addr4)); - addr4.sin_family = AF_INET; - GPR_ASSERT(data_len == sizeof(addr4.sin_addr.s_addr)); - memcpy(&addr4.sin_addr.s_addr, data, data_len); - addr4.sin_port = htons(12345); - return addr4; +static grpc_resolved_address make_addr4(const uint8_t *data, size_t data_len) { + grpc_resolved_address resolved_addr4; + struct sockaddr_in *addr4 = (struct sockaddr_in *)resolved_addr4.addr; + memset(&resolved_addr4, 0, sizeof(resolved_addr4)); + addr4->sin_family = AF_INET; + GPR_ASSERT(data_len == sizeof(addr4->sin_addr.s_addr)); + memcpy(&addr4->sin_addr.s_addr, data, data_len); + addr4->sin_port = htons(12345); + resolved_addr4.len = sizeof(struct sockaddr_in); + return resolved_addr4; } -static struct sockaddr_in6 make_addr6(const uint8_t *data, size_t data_len) { - struct sockaddr_in6 addr6; - memset(&addr6, 0, sizeof(addr6)); - addr6.sin6_family = AF_INET6; - GPR_ASSERT(data_len == sizeof(addr6.sin6_addr.s6_addr)); - memcpy(&addr6.sin6_addr.s6_addr, data, data_len); - addr6.sin6_port = htons(12345); - return addr6; +static grpc_resolved_address make_addr6(const uint8_t *data, size_t data_len) { + grpc_resolved_address resolved_addr6; + struct sockaddr_in6 *addr6 = (struct sockaddr_in6 *)resolved_addr6.addr; + memset(&resolved_addr6, 0, sizeof(resolved_addr6)); + addr6->sin6_family = AF_INET6; + GPR_ASSERT(data_len == sizeof(addr6->sin6_addr.s6_addr)); + memcpy(&addr6->sin6_addr.s6_addr, data, data_len); + addr6->sin6_port = htons(12345); + resolved_addr6.len = sizeof(struct sockaddr_in6); + return resolved_addr6; } static const uint8_t kMapped[] = {0, 0, 0, 0, 0, 0, 0, 0, @@ -72,102 +77,96 @@ static const uint8_t kIPv6[] = {0x20, 0x01, 0x0d, 0xb8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}; static void test_sockaddr_is_v4mapped(void) { - struct sockaddr_in input4; - struct sockaddr_in6 input6; - struct sockaddr_in output4; - struct sockaddr_in expect4; + grpc_resolved_address input4; + grpc_resolved_address input6; + grpc_resolved_address output4; + grpc_resolved_address expect4; gpr_log(GPR_INFO, "%s", "test_sockaddr_is_v4mapped"); /* v4mapped input should succeed. */ input6 = make_addr6(kMapped, sizeof(kMapped)); - GPR_ASSERT(grpc_sockaddr_is_v4mapped((const struct sockaddr *)&input6, NULL)); - GPR_ASSERT( - grpc_sockaddr_is_v4mapped((const struct sockaddr *)&input6, &output4)); + GPR_ASSERT(grpc_sockaddr_is_v4mapped(&input6, NULL)); + GPR_ASSERT(grpc_sockaddr_is_v4mapped(&input6, &output4)); expect4 = make_addr4(kIPv4, sizeof(kIPv4)); GPR_ASSERT(memcmp(&expect4, &output4, sizeof(expect4)) == 0); /* Non-v4mapped input should fail. */ input6 = make_addr6(kNotQuiteMapped, sizeof(kNotQuiteMapped)); - GPR_ASSERT( - !grpc_sockaddr_is_v4mapped((const struct sockaddr *)&input6, NULL)); - GPR_ASSERT( - !grpc_sockaddr_is_v4mapped((const struct sockaddr *)&input6, &output4)); + GPR_ASSERT(!grpc_sockaddr_is_v4mapped(&input6, NULL)); + GPR_ASSERT(!grpc_sockaddr_is_v4mapped(&input6, &output4)); /* Output is unchanged. */ GPR_ASSERT(memcmp(&expect4, &output4, sizeof(expect4)) == 0); /* Plain IPv4 input should also fail. */ input4 = make_addr4(kIPv4, sizeof(kIPv4)); - GPR_ASSERT( - !grpc_sockaddr_is_v4mapped((const struct sockaddr *)&input4, NULL)); + GPR_ASSERT(!grpc_sockaddr_is_v4mapped(&input4, NULL)); } static void test_sockaddr_to_v4mapped(void) { - struct sockaddr_in input4; - struct sockaddr_in6 input6; - struct sockaddr_in6 output6; - struct sockaddr_in6 expect6; + grpc_resolved_address input4; + grpc_resolved_address input6; + grpc_resolved_address output6; + grpc_resolved_address expect6; gpr_log(GPR_INFO, "%s", "test_sockaddr_to_v4mapped"); /* IPv4 input should succeed. */ input4 = make_addr4(kIPv4, sizeof(kIPv4)); - GPR_ASSERT( - grpc_sockaddr_to_v4mapped((const struct sockaddr *)&input4, &output6)); + GPR_ASSERT(grpc_sockaddr_to_v4mapped(&input4, &output6)); expect6 = make_addr6(kMapped, sizeof(kMapped)); GPR_ASSERT(memcmp(&expect6, &output6, sizeof(output6)) == 0); /* IPv6 input should fail. */ input6 = make_addr6(kIPv6, sizeof(kIPv6)); - GPR_ASSERT( - !grpc_sockaddr_to_v4mapped((const struct sockaddr *)&input6, &output6)); + GPR_ASSERT(!grpc_sockaddr_to_v4mapped(&input6, &output6)); /* Output is unchanged. */ GPR_ASSERT(memcmp(&expect6, &output6, sizeof(output6)) == 0); /* Already-v4mapped input should also fail. */ input6 = make_addr6(kMapped, sizeof(kMapped)); - GPR_ASSERT( - !grpc_sockaddr_to_v4mapped((const struct sockaddr *)&input6, &output6)); + GPR_ASSERT(!grpc_sockaddr_to_v4mapped(&input6, &output6)); } static void test_sockaddr_is_wildcard(void) { - struct sockaddr_in wild4; - struct sockaddr_in6 wild6; - struct sockaddr_in6 wild_mapped; - struct sockaddr dummy; + grpc_resolved_address wild4; + grpc_resolved_address wild6; + grpc_resolved_address wild_mapped; + grpc_resolved_address dummy; + struct sockaddr_in *wild4_addr; + struct sockaddr_in6 *wild6_addr; + struct sockaddr_in6 *wild_mapped_addr; int port; gpr_log(GPR_INFO, "%s", "test_sockaddr_is_wildcard"); /* Generate wildcards. */ grpc_sockaddr_make_wildcards(555, &wild4, &wild6); - GPR_ASSERT( - grpc_sockaddr_to_v4mapped((const struct sockaddr *)&wild4, &wild_mapped)); + GPR_ASSERT(grpc_sockaddr_to_v4mapped(&wild4, &wild_mapped)); /* Test 0.0.0.0:555 */ port = -1; - GPR_ASSERT(grpc_sockaddr_is_wildcard((const struct sockaddr *)&wild4, &port)); + GPR_ASSERT(grpc_sockaddr_is_wildcard(&wild4, &port)); GPR_ASSERT(port == 555); - memset(&wild4.sin_addr.s_addr, 0xbd, 1); - GPR_ASSERT( - !grpc_sockaddr_is_wildcard((const struct sockaddr *)&wild4, &port)); + wild4_addr = (struct sockaddr_in *)&wild4.addr; + memset(&wild4_addr->sin_addr.s_addr, 0xbd, 1); + GPR_ASSERT(!grpc_sockaddr_is_wildcard(&wild4, &port)); /* Test [::]:555 */ port = -1; - GPR_ASSERT(grpc_sockaddr_is_wildcard((const struct sockaddr *)&wild6, &port)); + GPR_ASSERT(grpc_sockaddr_is_wildcard(&wild6, &port)); GPR_ASSERT(port == 555); - memset(&wild6.sin6_addr.s6_addr, 0xbd, 1); - GPR_ASSERT( - !grpc_sockaddr_is_wildcard((const struct sockaddr *)&wild6, &port)); + wild6_addr = (struct sockaddr_in6 *)&wild6.addr; + memset(&wild6_addr->sin6_addr.s6_addr, 0xbd, 1); + GPR_ASSERT(!grpc_sockaddr_is_wildcard(&wild6, &port)); /* Test [::ffff:0.0.0.0]:555 */ port = -1; - GPR_ASSERT( - grpc_sockaddr_is_wildcard((const struct sockaddr *)&wild_mapped, &port)); + GPR_ASSERT(grpc_sockaddr_is_wildcard(&wild_mapped, &port)); GPR_ASSERT(port == 555); - memset(&wild_mapped.sin6_addr.s6_addr, 0xbd, 1); - GPR_ASSERT( - !grpc_sockaddr_is_wildcard((const struct sockaddr *)&wild_mapped, &port)); + wild_mapped_addr = (struct sockaddr_in6 *)&wild_mapped.addr; + memset(&wild_mapped_addr->sin6_addr.s6_addr, 0xbd, 1); + GPR_ASSERT(!grpc_sockaddr_is_wildcard(&wild_mapped, &port)); /* Test AF_UNSPEC. */ port = -1; @@ -176,12 +175,12 @@ static void test_sockaddr_is_wildcard(void) { GPR_ASSERT(port == -1); } -static void expect_sockaddr_str(const char *expected, void *addr, +static void expect_sockaddr_str(const char *expected, grpc_resolved_address *addr, int normalize) { int result; char *str; gpr_log(GPR_INFO, " expect_sockaddr_str(%s)", expected); - result = grpc_sockaddr_to_string(&str, (struct sockaddr *)addr, normalize); + result = grpc_sockaddr_to_string(&str, addr, normalize); GPR_ASSERT(str != NULL); GPR_ASSERT(result >= 0); GPR_ASSERT((size_t)result == strlen(str)); @@ -189,19 +188,20 @@ static void expect_sockaddr_str(const char *expected, void *addr, gpr_free(str); } -static void expect_sockaddr_uri(const char *expected, void *addr) { +static void expect_sockaddr_uri(const char *expected, grpc_resolved_address *addr) { char *str; gpr_log(GPR_INFO, " expect_sockaddr_uri(%s)", expected); - str = grpc_sockaddr_to_uri((struct sockaddr *)addr); + str = grpc_sockaddr_to_uri(addr); GPR_ASSERT(str != NULL); GPR_ASSERT(strcmp(expected, str) == 0); gpr_free(str); } static void test_sockaddr_to_string(void) { - struct sockaddr_in input4; - struct sockaddr_in6 input6; - struct sockaddr dummy; + grpc_resolved_address input4; + grpc_resolved_address input6; + grpc_resolved_address dummy; + struct sockaddr *dummy_addr; gpr_log(GPR_INFO, "%s", "test_sockaddr_to_string"); @@ -228,7 +228,8 @@ static void test_sockaddr_to_string(void) { expect_sockaddr_uri("ipv6:[::fffe:c000:263]:12345", &input6); memset(&dummy, 0, sizeof(dummy)); - dummy.sa_family = 123; + dummy_addr = (struct sockaddr *)dummy.addr; + dummy_addr->sa_family = 123; expect_sockaddr_str("(sockaddr family=123)", &dummy, 0); expect_sockaddr_str("(sockaddr family=123)", &dummy, 1); GPR_ASSERT(grpc_sockaddr_to_uri(&dummy) == NULL); @@ -237,24 +238,26 @@ static void test_sockaddr_to_string(void) { } static void test_sockaddr_set_get_port(void) { - struct sockaddr_in input4; - struct sockaddr_in6 input6; - struct sockaddr dummy; + grpc_resolved_address input4; + grpc_resolved_address input6; + grpc_resolved_address dummy; + struct sockaddr *dummy_addr; gpr_log(GPR_DEBUG, "test_sockaddr_set_get_port"); input4 = make_addr4(kIPv4, sizeof(kIPv4)); - GPR_ASSERT(grpc_sockaddr_get_port((struct sockaddr *)&input4) == 12345); - GPR_ASSERT(grpc_sockaddr_set_port((struct sockaddr *)&input4, 54321)); - GPR_ASSERT(grpc_sockaddr_get_port((struct sockaddr *)&input4) == 54321); + GPR_ASSERT(grpc_sockaddr_get_port(&input4) == 12345); + GPR_ASSERT(grpc_sockaddr_set_port(&input4, 54321)); + GPR_ASSERT(grpc_sockaddr_get_port(&input4) == 54321); input6 = make_addr6(kIPv6, sizeof(kIPv6)); - GPR_ASSERT(grpc_sockaddr_get_port((struct sockaddr *)&input6) == 12345); - GPR_ASSERT(grpc_sockaddr_set_port((struct sockaddr *)&input6, 54321)); - GPR_ASSERT(grpc_sockaddr_get_port((struct sockaddr *)&input6) == 54321); + GPR_ASSERT(grpc_sockaddr_get_port(&input6) == 12345); + GPR_ASSERT(grpc_sockaddr_set_port(&input6, 54321)); + GPR_ASSERT(grpc_sockaddr_get_port(&input6) == 54321); memset(&dummy, 0, sizeof(dummy)); - dummy.sa_family = 123; + dummy_addr = (struct sockaddr *)dummy.addr; + dummy_addr->sa_family = 123; GPR_ASSERT(grpc_sockaddr_get_port(&dummy) == 0); GPR_ASSERT(grpc_sockaddr_set_port(&dummy, 1234) == 0); } diff --git a/test/core/iomgr/tcp_client_posix_test.c b/test/core/iomgr/tcp_client_posix_test.c index d0c1047423..07aa55b145 100644 --- a/test/core/iomgr/tcp_client_posix_test.c +++ b/test/core/iomgr/tcp_client_posix_test.c @@ -85,8 +85,8 @@ static void must_fail(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { } void test_succeeds(void) { - struct sockaddr_in addr; - socklen_t addr_len = sizeof(addr); + grpc_resolved_address resolved_addr; + struct sockaddr_in *addr = (struct sockaddr_in *)resolved_addr.addr; int svr_fd; int r; int connections_complete_before; @@ -95,13 +95,14 @@ void test_succeeds(void) { gpr_log(GPR_DEBUG, "test_succeeds"); - memset(&addr, 0, sizeof(addr)); - addr.sin_family = AF_INET; + memset(&resolved_addr, 0, sizeof(resolved_addr)); + resolved_addr.len = sizeof(struct sockaddr_in); + addr->sin_family = AF_INET; /* create a dummy server */ svr_fd = socket(AF_INET, SOCK_STREAM, 0); GPR_ASSERT(svr_fd >= 0); - GPR_ASSERT(0 == bind(svr_fd, (struct sockaddr *)&addr, addr_len)); + GPR_ASSERT(0 == bind(svr_fd, (struct sockaddr *)addr, (socklen_t)resolved_addr.len)); GPR_ASSERT(0 == listen(svr_fd, 1)); gpr_mu_lock(g_mu); @@ -109,16 +110,15 @@ void test_succeeds(void) { gpr_mu_unlock(g_mu); /* connect to it */ - GPR_ASSERT(getsockname(svr_fd, (struct sockaddr *)&addr, &addr_len) == 0); + GPR_ASSERT(getsockname(svr_fd, (struct sockaddr *)addr, (socklen_t *)&resolved_addr.len) == 0); grpc_closure_init(&done, must_succeed, NULL); grpc_tcp_client_connect(&exec_ctx, &done, &g_connecting, g_pollset_set, - (struct sockaddr *)&addr, addr_len, - gpr_inf_future(GPR_CLOCK_REALTIME)); + &resolved_addr, gpr_inf_future(GPR_CLOCK_REALTIME)); /* await the connection */ do { - addr_len = sizeof(addr); - r = accept(svr_fd, (struct sockaddr *)&addr, &addr_len); + resolved_addr.len = sizeof(addr); + r = accept(svr_fd, addr, (socklen_t *)&resolved_addr.len); } while (r == -1 && errno == EINTR); GPR_ASSERT(r >= 0); close(r); @@ -143,16 +143,17 @@ void test_succeeds(void) { } void test_fails(void) { - struct sockaddr_in addr; - socklen_t addr_len = sizeof(addr); + grpc_resolved_address resolved_addr; + struct sockaddr_in *addr = (struct sockaddr_in *)resolved_addr.addr; int connections_complete_before; grpc_closure done; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; gpr_log(GPR_DEBUG, "test_fails"); - memset(&addr, 0, sizeof(addr)); - addr.sin_family = AF_INET; + memset(&resolved_addr, 0, sizeof(resolved_addr)); + resolved_addr.len = sizeof(struct sockaddr_in); + addr->sin_family = AF_INET; gpr_mu_lock(g_mu); connections_complete_before = g_connections_complete; @@ -161,8 +162,7 @@ void test_fails(void) { /* connect to a broken address */ grpc_closure_init(&done, must_fail, NULL); grpc_tcp_client_connect(&exec_ctx, &done, &g_connecting, g_pollset_set, - (struct sockaddr *)&addr, addr_len, - gpr_inf_future(GPR_CLOCK_REALTIME)); + &resolved_addr, gpr_inf_future(GPR_CLOCK_REALTIME)); gpr_mu_lock(g_mu); diff --git a/test/core/iomgr/tcp_server_posix_test.c b/test/core/iomgr/tcp_server_posix_test.c index 6e2d1d0fc9..9e8dff61ff 100644 --- a/test/core/iomgr/tcp_server_posix_test.c +++ b/test/core/iomgr/tcp_server_posix_test.c @@ -46,6 +46,7 @@ #include #include "src/core/lib/iomgr/iomgr.h" +#include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/sockaddr_utils.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" @@ -146,15 +147,17 @@ static void test_no_op_with_start(void) { static void test_no_op_with_port(void) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - struct sockaddr_in addr; + grpc_resolved_address resolved_addr; + struct sockaddr_in *addr = (struct sockaddr_in *)resolved_addr.addr; grpc_tcp_server *s; GPR_ASSERT(GRPC_ERROR_NONE == grpc_tcp_server_create(NULL, NULL, &s)); LOG_TEST("test_no_op_with_port"); - memset(&addr, 0, sizeof(addr)); - addr.sin_family = AF_INET; + memset(&resolved_addr, 0, sizeof(resolved_addr)); + resolved_addr.len = sizeof(struct sockaddr_in); + addr->sin_family = AF_INET; int port; - GPR_ASSERT(grpc_tcp_server_add_port(s, (struct sockaddr *)&addr, sizeof(addr), + GPR_ASSERT(grpc_tcp_server_add_port(s, &resolved_addr, &port) == GRPC_ERROR_NONE && port > 0); @@ -164,15 +167,17 @@ static void test_no_op_with_port(void) { static void test_no_op_with_port_and_start(void) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - struct sockaddr_in addr; + grpc_resolved_address resolved_addr; + struct sockaddr_in *addr = (struct sockaddr_in *)resolved_addr.addr; grpc_tcp_server *s; GPR_ASSERT(GRPC_ERROR_NONE == grpc_tcp_server_create(NULL, NULL, &s)); LOG_TEST("test_no_op_with_port_and_start"); int port; - memset(&addr, 0, sizeof(addr)); - addr.sin_family = AF_INET; - GPR_ASSERT(grpc_tcp_server_add_port(s, (struct sockaddr *)&addr, sizeof(addr), + memset(&resolved_addr, 0, sizeof(resolved_addr)); + resolved_addr.len = sizeof(struct sockaddr_in); + addr->sin_family = AF_INET; + GPR_ASSERT(grpc_tcp_server_add_port(s, &resolved_addr, &port) == GRPC_ERROR_NONE && port > 0); @@ -218,9 +223,10 @@ static void tcp_connect(grpc_exec_ctx *exec_ctx, const struct sockaddr *remote, the same port should be tested. */ static void test_connect(unsigned n) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - struct sockaddr_storage addr; - struct sockaddr_storage addr1; - socklen_t addr_len = sizeof(addr); + grpc_resolved_address resolved_addr; + grpc_resolved_address resolved_addr1; + struct sockaddr_storage *addr = (struct sockaddr_storage *)resolved_addr.addr; + struct sockaddr_storage *addr1 = (struct sockaddr_storage *)resolved_addr1.addr; unsigned svr_fd_count; int svr_port; unsigned svr1_fd_count; @@ -232,18 +238,19 @@ static void test_connect(unsigned n) { server_weak_ref_init(&weak_ref); LOG_TEST("test_connect"); gpr_log(GPR_INFO, "clients=%d", n); - memset(&addr, 0, sizeof(addr)); - memset(&addr1, 0, sizeof(addr1)); - addr.ss_family = addr1.ss_family = AF_INET; + memset(&resolved_addr, 0, sizeof(resolved_addr)); + memset(&resolved_addr1, 0, sizeof(resolved_addr1)); + resolved_addr.len = sizeof(struct sockaddr_storage); + resolved_addr1.len = sizeof(struct sockaddr_storage); + addr->ss_family = addr1->ss_family = AF_INET; GPR_ASSERT(GRPC_ERROR_NONE == - grpc_tcp_server_add_port(s, (struct sockaddr *)&addr, addr_len, - &svr_port)); + grpc_tcp_server_add_port(s, &resolved_addr, &svr_port)); GPR_ASSERT(svr_port > 0); /* Cannot use wildcard (port==0), because add_port() will try to reuse the same port as a previous add_port(). */ svr1_port = grpc_pick_unused_port_or_die(); - grpc_sockaddr_set_port((struct sockaddr *)&addr1, svr1_port); - GPR_ASSERT(grpc_tcp_server_add_port(s, (struct sockaddr *)&addr1, addr_len, + grpc_sockaddr_set_port(&resolved_addr1, svr1_port); + GPR_ASSERT(grpc_tcp_server_add_port(s, &resolved_addr1, &svr_port) == GRPC_ERROR_NONE && svr_port == svr1_port); @@ -265,16 +272,16 @@ static void test_connect(unsigned n) { int fd = grpc_tcp_server_port_fd(s, 0, i); GPR_ASSERT(fd >= 0); if (i == 0) { - GPR_ASSERT(getsockname(fd, (struct sockaddr *)&addr, &addr_len) == 0); - GPR_ASSERT(addr_len <= sizeof(addr)); + GPR_ASSERT(getsockname(fd, (struct sockaddr *)addr, (socklen_t *)&resolved_addr.len) == 0); + GPR_ASSERT(resolved_addr.len <= sizeof(*addr)); } } for (i = 0; i < svr1_fd_count; ++i) { int fd = grpc_tcp_server_port_fd(s, 1, i); GPR_ASSERT(fd >= 0); if (i == 0) { - GPR_ASSERT(getsockname(fd, (struct sockaddr *)&addr1, &addr_len) == 0); - GPR_ASSERT(addr_len <= sizeof(addr1)); + GPR_ASSERT(getsockname(fd, (struct sockaddr *)addr1, (socklen_t *)&resolved_addr1.len) == 0); + GPR_ASSERT(resolved_addr1.len <= sizeof(*addr1)); } } @@ -284,7 +291,7 @@ static void test_connect(unsigned n) { on_connect_result result; int svr_fd; on_connect_result_init(&result); - tcp_connect(&exec_ctx, (struct sockaddr *)&addr, addr_len, &result); + tcp_connect(&exec_ctx, (struct sockaddr *)addr, (socklen_t)resolved_addr.len, &result); GPR_ASSERT(result.server_fd >= 0); svr_fd = result.server_fd; GPR_ASSERT(grpc_tcp_server_port_fd(s, result.port_index, result.fd_index) == @@ -298,7 +305,7 @@ static void test_connect(unsigned n) { grpc_tcp_server_unref(&exec_ctx, result.server); on_connect_result_init(&result); - tcp_connect(&exec_ctx, (struct sockaddr *)&addr1, addr_len, &result); + tcp_connect(&exec_ctx, (struct sockaddr *)addr1, (socklen_t)resolved_addr1.len, &result); GPR_ASSERT(result.server_fd >= 0); GPR_ASSERT(result.server_fd != svr_fd); GPR_ASSERT(grpc_tcp_server_port_fd(s, result.port_index, result.fd_index) == diff --git a/test/core/surface/concurrent_connectivity_test.c b/test/core/surface/concurrent_connectivity_test.c index f7567f350d..537fdf71a1 100644 --- a/test/core/surface/concurrent_connectivity_test.c +++ b/test/core/surface/concurrent_connectivity_test.c @@ -31,6 +31,8 @@ * */ +#include "src/core/lib/iomgr/sockaddr.h" + #include #include @@ -42,6 +44,7 @@ #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/iomgr.h" +#include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/sockaddr_utils.h" #include "src/core/lib/iomgr/tcp_server.h" @@ -109,16 +112,16 @@ void bad_server_thread(void *vargs) { struct server_thread_args *args = (struct server_thread_args *)vargs; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - struct sockaddr_storage addr; - socklen_t addr_len = sizeof(addr); + grpc_resolved_address resolved_addr; + struct sockaddr_storage *addr = (struct sockaddr_storage *)resolved_addr.addr; int port; grpc_tcp_server *s; grpc_error *error = grpc_tcp_server_create(NULL, NULL, &s); GPR_ASSERT(error == GRPC_ERROR_NONE); - memset(&addr, 0, sizeof(addr)); - addr.ss_family = AF_INET; + memset(&resolved_addr, 0, sizeof(resolved_addr)); + addr->ss_family = AF_INET; error = - grpc_tcp_server_add_port(s, (struct sockaddr *)&addr, addr_len, &port); + grpc_tcp_server_add_port(s, &resolved_addr, &port); GPR_ASSERT(GRPC_LOG_IF_ERROR("grpc_tcp_server_add_port", error)); GPR_ASSERT(port > 0); gpr_asprintf(&args->addr, "localhost:%d", port); diff --git a/test/core/util/test_tcp_server.c b/test/core/util/test_tcp_server.c index 8a0b3932d8..ee2de563e8 100644 --- a/test/core/util/test_tcp_server.c +++ b/test/core/util/test_tcp_server.c @@ -31,6 +31,8 @@ * */ +#include "src/core/lib/iomgr/sockaddr.h" + #include "test/core/util/test_tcp_server.h" #include @@ -41,7 +43,7 @@ #include #include #include "src/core/lib/iomgr/endpoint.h" -#include "src/core/lib/iomgr/sockaddr.h" +#include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/tcp_server.h" #include "test/core/util/port.h" @@ -64,18 +66,19 @@ void test_tcp_server_init(test_tcp_server *server, } void test_tcp_server_start(test_tcp_server *server, int port) { - struct sockaddr_in addr; + grpc_resolved_address resolved_addr; + struct sockaddr_in *addr = (struct sockaddr_in *)resolved_addr.addr; int port_added; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - addr.sin_family = AF_INET; - addr.sin_port = htons((uint16_t)port); - memset(&addr.sin_addr, 0, sizeof(addr.sin_addr)); + addr->sin_family = AF_INET; + addr->sin_port = htons((uint16_t)port); + memset(&addr->sin_addr, 0, sizeof(addr->sin_addr)); grpc_error *error = grpc_tcp_server_create(&server->shutdown_complete, NULL, &server->tcp_server); GPR_ASSERT(error == GRPC_ERROR_NONE); - error = grpc_tcp_server_add_port(server->tcp_server, &addr, sizeof(addr), + error = grpc_tcp_server_add_port(server->tcp_server, &resolved_addr, &port_added); GPR_ASSERT(error == GRPC_ERROR_NONE); GPR_ASSERT(port_added == port); -- cgit v1.2.3 From d4673484c73c68f956c1bd6b9583048a124fe925 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 23 Sep 2016 13:50:04 -0700 Subject: Update tests --- include/grpc/grpc.h | 2 +- src/core/lib/iomgr/buffer_pool.c | 19 +++++++++++++++++ src/core/lib/iomgr/endpoint.c | 4 ++++ test/core/bad_client/bad_client.c | 4 +++- test/core/http/httpcli_test.c | 11 +++++++--- test/core/http/httpscli_test.c | 11 +++++++--- test/core/internal_api_canaries/iomgr.c | 1 + test/core/iomgr/endpoint_pair_test.c | 5 ++++- test/core/iomgr/fd_conservation_posix_test.c | 5 ++++- test/core/surface/concurrent_connectivity_test.c | 2 +- test/core/util/mock_endpoint.c | 22 ++++++++++++++++--- test/core/util/mock_endpoint.h | 3 ++- test/core/util/passthru_endpoint.c | 27 +++++++++++++++++++----- test/core/util/passthru_endpoint.h | 3 ++- test/core/util/port_server_client.c | 17 ++++++++++----- test/core/util/test_tcp_server.c | 4 ++-- 16 files changed, 112 insertions(+), 28 deletions(-) (limited to 'src/core/lib') diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index a893367a9c..a6e02cd072 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -415,7 +415,7 @@ GRPCAPI void grpc_buffer_pool_resize(grpc_buffer_pool *buffer_pool, size_t new_size); /** Fetch a vtable for a grpc_channel_arg that points to a grpc_buffer_pool */ -GRPCAPI grpc_arg_pointer_vtable *grpc_buffer_pool_arg_vtable(void); +GRPCAPI const grpc_arg_pointer_vtable *grpc_buffer_pool_arg_vtable(void); #ifdef __cplusplus } diff --git a/src/core/lib/iomgr/buffer_pool.c b/src/core/lib/iomgr/buffer_pool.c index 0153bce203..78a98027f5 100644 --- a/src/core/lib/iomgr/buffer_pool.c +++ b/src/core/lib/iomgr/buffer_pool.c @@ -37,6 +37,7 @@ #include #include +#include #include "src/core/lib/iomgr/combiner.h" @@ -366,6 +367,10 @@ void grpc_buffer_pool_resize(grpc_buffer_pool *buffer_pool, size_t size) { grpc_exec_ctx_finish(&exec_ctx); } +/******************************************************************************* + * grpc_buffer_user channel args api + */ + grpc_buffer_pool *grpc_buffer_pool_from_channel_args( grpc_channel_args *channel_args) { for (size_t i = 0; i < channel_args->num_args; i++) { @@ -381,6 +386,20 @@ grpc_buffer_pool *grpc_buffer_pool_from_channel_args( return grpc_buffer_pool_create(); } +static void *bp_copy(void *bp) { + grpc_buffer_pool_ref(bp); + return bp; +} + +static void bp_destroy(void *bp) { grpc_buffer_pool_unref(bp); } + +static int bp_cmp(void *a, void *b) { return GPR_ICMP(a, b); } + +const grpc_arg_pointer_vtable *grpc_buffer_pool_arg_vtable(void) { + static const grpc_arg_pointer_vtable vtable = {bp_copy, bp_destroy, bp_cmp}; + return &vtable; +} + /******************************************************************************* * grpc_buffer_user api */ diff --git a/src/core/lib/iomgr/endpoint.c b/src/core/lib/iomgr/endpoint.c index f901fcf962..f3548a1d74 100644 --- a/src/core/lib/iomgr/endpoint.c +++ b/src/core/lib/iomgr/endpoint.c @@ -69,3 +69,7 @@ char* grpc_endpoint_get_peer(grpc_endpoint* ep) { grpc_workqueue* grpc_endpoint_get_workqueue(grpc_endpoint* ep) { return ep->vtable->get_workqueue(ep); } + +grpc_buffer_user* grpc_endpoint_get_buffer_user(grpc_endpoint* ep) { + return ep->vtable->get_buffer_user(ep); +} diff --git a/test/core/bad_client/bad_client.c b/test/core/bad_client/bad_client.c index be88d4a69a..06692fe969 100644 --- a/test/core/bad_client/bad_client.c +++ b/test/core/bad_client/bad_client.c @@ -114,7 +114,9 @@ void grpc_run_bad_client_test( grpc_init(); /* Create endpoints */ - sfd = grpc_iomgr_create_endpoint_pair("fixture", 65536); + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + sfd = grpc_iomgr_create_endpoint_pair("fixture", buffer_pool, 65536); + grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); /* Create server, completion events */ a.server = grpc_server_create(NULL, NULL); diff --git a/test/core/http/httpcli_test.c b/test/core/http/httpcli_test.c index 38b32a3867..d1c6805b03 100644 --- a/test/core/http/httpcli_test.c +++ b/test/core/http/httpcli_test.c @@ -89,8 +89,11 @@ static void test_get(int port) { grpc_http_response response; memset(&response, 0, sizeof(response)); - grpc_httpcli_get(&exec_ctx, &g_context, &g_pops, &req, n_seconds_time(15), + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_httpcli_get(&exec_ctx, &g_context, &g_pops, buffer_pool, &req, + n_seconds_time(15), grpc_closure_create(on_finish, &response), &response); + grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; @@ -126,9 +129,11 @@ static void test_post(int port) { grpc_http_response response; memset(&response, 0, sizeof(response)); - grpc_httpcli_post(&exec_ctx, &g_context, &g_pops, &req, "hello", 5, - n_seconds_time(15), + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_httpcli_post(&exec_ctx, &g_context, &g_pops, buffer_pool, &req, "hello", + 5, n_seconds_time(15), grpc_closure_create(on_finish, &response), &response); + grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; diff --git a/test/core/http/httpscli_test.c b/test/core/http/httpscli_test.c index 359e557689..09ceec7208 100644 --- a/test/core/http/httpscli_test.c +++ b/test/core/http/httpscli_test.c @@ -90,8 +90,11 @@ static void test_get(int port) { grpc_http_response response; memset(&response, 0, sizeof(response)); - grpc_httpcli_get(&exec_ctx, &g_context, &g_pops, &req, n_seconds_time(15), + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_httpcli_get(&exec_ctx, &g_context, &g_pops, buffer_pool, &req, + n_seconds_time(15), grpc_closure_create(on_finish, &response), &response); + grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; @@ -128,9 +131,11 @@ static void test_post(int port) { grpc_http_response response; memset(&response, 0, sizeof(response)); - grpc_httpcli_post(&exec_ctx, &g_context, &g_pops, &req, "hello", 5, - n_seconds_time(15), + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_httpcli_post(&exec_ctx, &g_context, &g_pops, buffer_pool, &req, "hello", + 5, n_seconds_time(15), grpc_closure_create(on_finish, &response), &response); + grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; diff --git a/test/core/internal_api_canaries/iomgr.c b/test/core/internal_api_canaries/iomgr.c index 27d630623e..4f967ce751 100644 --- a/test/core/internal_api_canaries/iomgr.c +++ b/test/core/internal_api_canaries/iomgr.c @@ -84,6 +84,7 @@ static void test_code(void) { grpc_endpoint_add_to_pollset_set, grpc_endpoint_shutdown, grpc_endpoint_destroy, + grpc_endpoint_get_buffer_user, grpc_endpoint_get_peer}; endpoint.vtable = &vtable; diff --git a/test/core/iomgr/endpoint_pair_test.c b/test/core/iomgr/endpoint_pair_test.c index 99b86b6213..a7f00230c2 100644 --- a/test/core/iomgr/endpoint_pair_test.c +++ b/test/core/iomgr/endpoint_pair_test.c @@ -49,7 +49,10 @@ static grpc_endpoint_test_fixture create_fixture_endpoint_pair( size_t slice_size) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_endpoint_test_fixture f; - grpc_endpoint_pair p = grpc_iomgr_create_endpoint_pair("test", slice_size); + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_endpoint_pair p = + grpc_iomgr_create_endpoint_pair("test", buffer_pool, slice_size); + grpc_buffer_pool_unref(buffer_pool); f.client_ep = p.client; f.server_ep = p.server; diff --git a/test/core/iomgr/fd_conservation_posix_test.c b/test/core/iomgr/fd_conservation_posix_test.c index bbb3f46497..4612ff7dc4 100644 --- a/test/core/iomgr/fd_conservation_posix_test.c +++ b/test/core/iomgr/fd_conservation_posix_test.c @@ -52,15 +52,18 @@ int main(int argc, char **argv) { of descriptors */ rlim.rlim_cur = rlim.rlim_max = 10; GPR_ASSERT(0 == setrlimit(RLIMIT_NOFILE, &rlim)); + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); for (i = 0; i < 100; i++) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - p = grpc_iomgr_create_endpoint_pair("test", 1); + p = grpc_iomgr_create_endpoint_pair("test", buffer_pool, 1); grpc_endpoint_destroy(&exec_ctx, p.client); grpc_endpoint_destroy(&exec_ctx, p.server); grpc_exec_ctx_finish(&exec_ctx); } + grpc_buffer_pool_unref(buffer_pool); + grpc_iomgr_shutdown(); return 0; } diff --git a/test/core/surface/concurrent_connectivity_test.c b/test/core/surface/concurrent_connectivity_test.c index f7567f350d..c34ea2c8cb 100644 --- a/test/core/surface/concurrent_connectivity_test.c +++ b/test/core/surface/concurrent_connectivity_test.c @@ -113,7 +113,7 @@ void bad_server_thread(void *vargs) { socklen_t addr_len = sizeof(addr); int port; grpc_tcp_server *s; - grpc_error *error = grpc_tcp_server_create(NULL, NULL, &s); + grpc_error *error = grpc_tcp_server_create(&exec_ctx, NULL, NULL, &s); GPR_ASSERT(error == GRPC_ERROR_NONE); memset(&addr, 0, sizeof(addr)); addr.ss_family = AF_INET; diff --git a/test/core/util/mock_endpoint.c b/test/core/util/mock_endpoint.c index 13e0e918fb..173a2d8963 100644 --- a/test/core/util/mock_endpoint.c +++ b/test/core/util/mock_endpoint.c @@ -43,6 +43,7 @@ typedef struct grpc_mock_endpoint { gpr_slice_buffer read_buffer; gpr_slice_buffer *on_read_out; grpc_closure *on_read; + grpc_buffer_user buffer_user; } grpc_mock_endpoint; static void me_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, @@ -85,16 +86,28 @@ static void me_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { gpr_mu_unlock(&m->mu); } -static void me_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { - grpc_mock_endpoint *m = (grpc_mock_endpoint *)ep; +static void me_really_destroy(grpc_exec_ctx *exec_ctx, void *mp, + grpc_error *error) { + grpc_mock_endpoint *m = mp; gpr_slice_buffer_destroy(&m->read_buffer); gpr_free(m); } +static void me_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { + grpc_mock_endpoint *m = (grpc_mock_endpoint *)ep; + grpc_buffer_user_destroy(exec_ctx, &m->buffer_user, + grpc_closure_create(me_really_destroy, m)); +} + static char *me_get_peer(grpc_endpoint *ep) { return gpr_strdup("fake:mock_endpoint"); } +static grpc_buffer_user *me_get_buffer_user(grpc_endpoint *ep) { + grpc_mock_endpoint *m = (grpc_mock_endpoint *)ep; + return &m->buffer_user; +} + static grpc_workqueue *me_get_workqueue(grpc_endpoint *ep) { return NULL; } static const grpc_endpoint_vtable vtable = { @@ -105,12 +118,15 @@ static const grpc_endpoint_vtable vtable = { me_add_to_pollset_set, me_shutdown, me_destroy, + me_get_buffer_user, me_get_peer, }; -grpc_endpoint *grpc_mock_endpoint_create(void (*on_write)(gpr_slice slice)) { +grpc_endpoint *grpc_mock_endpoint_create(void (*on_write)(gpr_slice slice), + grpc_buffer_pool *buffer_pool) { grpc_mock_endpoint *m = gpr_malloc(sizeof(*m)); m->base.vtable = &vtable; + grpc_buffer_user_init(&m->buffer_user, buffer_pool); gpr_slice_buffer_init(&m->read_buffer); gpr_mu_init(&m->mu); m->on_write = on_write; diff --git a/test/core/util/mock_endpoint.h b/test/core/util/mock_endpoint.h index 051af9866b..bb59a16f7a 100644 --- a/test/core/util/mock_endpoint.h +++ b/test/core/util/mock_endpoint.h @@ -36,7 +36,8 @@ #include "src/core/lib/iomgr/endpoint.h" -grpc_endpoint *grpc_mock_endpoint_create(void (*on_write)(gpr_slice slice)); +grpc_endpoint *grpc_mock_endpoint_create(void (*on_write)(gpr_slice slice), + grpc_buffer_pool *buffer_pool); void grpc_mock_endpoint_put_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *mock_endpoint, gpr_slice slice); diff --git a/test/core/util/passthru_endpoint.c b/test/core/util/passthru_endpoint.c index 7ed9e97bd6..239cd3e275 100644 --- a/test/core/util/passthru_endpoint.c +++ b/test/core/util/passthru_endpoint.c @@ -44,6 +44,7 @@ typedef struct { gpr_slice_buffer read_buffer; gpr_slice_buffer *on_read_out; grpc_closure *on_read; + grpc_buffer_user buffer_user; } half; struct passthru_endpoint { @@ -122,7 +123,8 @@ static void me_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { gpr_mu_unlock(&m->parent->mu); } -static void me_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { +static void me_really_destroy(grpc_exec_ctx *exec_ctx, void *ep, + grpc_error *error) { passthru_endpoint *p = ((half *)ep)->parent; gpr_mu_lock(&p->mu); if (0 == --p->halves) { @@ -136,12 +138,23 @@ static void me_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { } } +static void me_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { + half *m = (half *)ep; + grpc_buffer_user_destroy(exec_ctx, &m->buffer_user, + grpc_closure_create(me_really_destroy, m)); +} + static char *me_get_peer(grpc_endpoint *ep) { return gpr_strdup("fake:mock_endpoint"); } static grpc_workqueue *me_get_workqueue(grpc_endpoint *ep) { return NULL; } +static grpc_buffer_user *me_get_buffer_user(grpc_endpoint *ep) { + half *m = (half *)ep; + return &m->buffer_user; +} + static const grpc_endpoint_vtable vtable = { me_read, me_write, @@ -150,23 +163,27 @@ static const grpc_endpoint_vtable vtable = { me_add_to_pollset_set, me_shutdown, me_destroy, + me_get_buffer_user, me_get_peer, }; -static void half_init(half *m, passthru_endpoint *parent) { +static void half_init(half *m, passthru_endpoint *parent, + grpc_buffer_pool *buffer_pool) { m->base.vtable = &vtable; m->parent = parent; gpr_slice_buffer_init(&m->read_buffer); m->on_read = NULL; + grpc_buffer_user_init(&m->buffer_user, buffer_pool); } void grpc_passthru_endpoint_create(grpc_endpoint **client, - grpc_endpoint **server) { + grpc_endpoint **server, + grpc_buffer_pool *buffer_pool) { passthru_endpoint *m = gpr_malloc(sizeof(*m)); m->halves = 2; m->shutdown = 0; - half_init(&m->client, m); - half_init(&m->server, m); + half_init(&m->client, m, buffer_pool); + half_init(&m->server, m, buffer_pool); gpr_mu_init(&m->mu); *client = &m->client.base; *server = &m->server.base; diff --git a/test/core/util/passthru_endpoint.h b/test/core/util/passthru_endpoint.h index aa1d3a1763..9756315084 100644 --- a/test/core/util/passthru_endpoint.h +++ b/test/core/util/passthru_endpoint.h @@ -37,6 +37,7 @@ #include "src/core/lib/iomgr/endpoint.h" void grpc_passthru_endpoint_create(grpc_endpoint **client, - grpc_endpoint **server); + grpc_endpoint **server, + grpc_buffer_pool *buffer_pool); #endif diff --git a/test/core/util/port_server_client.c b/test/core/util/port_server_client.c index a5c8c49650..dd444236e9 100644 --- a/test/core/util/port_server_client.c +++ b/test/core/util/port_server_client.c @@ -99,9 +99,11 @@ void grpc_free_port_using_server(char *server, int port) { req.http.path = path; grpc_httpcli_context_init(&context); - grpc_httpcli_get(&exec_ctx, &context, &pr.pops, &req, + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_httpcli_get(&exec_ctx, &context, &pr.pops, buffer_pool, &req, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), grpc_closure_create(freed_port_from_server, &pr), &rsp); + grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); gpr_mu_lock(pr.mu); while (!pr.done) { grpc_pollset_worker *worker = NULL; @@ -167,10 +169,12 @@ static void got_port_from_server(grpc_exec_ctx *exec_ctx, void *arg, req.http.path = "/get"; grpc_http_response_destroy(&pr->response); memset(&pr->response, 0, sizeof(pr->response)); - grpc_httpcli_get(exec_ctx, pr->ctx, &pr->pops, &req, + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_httpcli_get(exec_ctx, pr->ctx, &pr->pops, buffer_pool, &req, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), grpc_closure_create(got_port_from_server, pr), &pr->response); + grpc_buffer_pool_internal_unref(exec_ctx, buffer_pool); return; } GPR_ASSERT(response); @@ -211,9 +215,12 @@ int grpc_pick_port_using_server(char *server) { req.http.path = "/get"; grpc_httpcli_context_init(&context); - grpc_httpcli_get( - &exec_ctx, &context, &pr.pops, &req, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), - grpc_closure_create(got_port_from_server, &pr), &pr.response); + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_httpcli_get(&exec_ctx, &context, &pr.pops, buffer_pool, &req, + GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), + grpc_closure_create(got_port_from_server, &pr), + &pr.response); + grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); grpc_exec_ctx_finish(&exec_ctx); gpr_mu_lock(pr.mu); while (pr.port == -1) { diff --git a/test/core/util/test_tcp_server.c b/test/core/util/test_tcp_server.c index 8a0b3932d8..6890da4730 100644 --- a/test/core/util/test_tcp_server.c +++ b/test/core/util/test_tcp_server.c @@ -72,8 +72,8 @@ void test_tcp_server_start(test_tcp_server *server, int port) { addr.sin_port = htons((uint16_t)port); memset(&addr.sin_addr, 0, sizeof(addr.sin_addr)); - grpc_error *error = grpc_tcp_server_create(&server->shutdown_complete, NULL, - &server->tcp_server); + grpc_error *error = grpc_tcp_server_create( + &exec_ctx, &server->shutdown_complete, NULL, &server->tcp_server); GPR_ASSERT(error == GRPC_ERROR_NONE); error = grpc_tcp_server_add_port(server->tcp_server, &addr, sizeof(addr), &port_added); -- cgit v1.2.3 From d1253a3ae4e093c02001120af1a50d8d68800aad Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 23 Sep 2016 15:45:05 -0700 Subject: Tests pass with buffer pools plumbed in --- .../ext/transport/chttp2/server/insecure/server_chttp2_posix.c | 8 ++++++-- src/core/lib/iomgr/buffer_pool.c | 2 +- src/core/lib/iomgr/buffer_pool.h | 2 +- test/core/end2end/fuzzers/api_fuzzer.c | 5 +++-- 4 files changed, 11 insertions(+), 6 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c index 020f67edd2..f120e7cf8d 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c @@ -57,8 +57,12 @@ void grpc_server_add_insecure_channel_from_fd(grpc_server *server, char *name; gpr_asprintf(&name, "fd:%d", fd); - grpc_endpoint *server_endpoint = grpc_tcp_create( - grpc_fd_create(fd, name), NULL, GRPC_TCP_DEFAULT_READ_SLICE_SIZE, name); + grpc_buffer_pool *buffer_pool = + grpc_buffer_pool_from_channel_args(grpc_server_get_channel_args(server)); + grpc_endpoint *server_endpoint = + grpc_tcp_create(grpc_fd_create(fd, name), buffer_pool, + GRPC_TCP_DEFAULT_READ_SLICE_SIZE, name); + grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); gpr_free(name); diff --git a/src/core/lib/iomgr/buffer_pool.c b/src/core/lib/iomgr/buffer_pool.c index 78a98027f5..766de44bf4 100644 --- a/src/core/lib/iomgr/buffer_pool.c +++ b/src/core/lib/iomgr/buffer_pool.c @@ -372,7 +372,7 @@ void grpc_buffer_pool_resize(grpc_buffer_pool *buffer_pool, size_t size) { */ grpc_buffer_pool *grpc_buffer_pool_from_channel_args( - grpc_channel_args *channel_args) { + const grpc_channel_args *channel_args) { for (size_t i = 0; i < channel_args->num_args; i++) { if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_BUFFER_POOL)) { if (channel_args->args[i].type == GRPC_ARG_POINTER) { diff --git a/src/core/lib/iomgr/buffer_pool.h b/src/core/lib/iomgr/buffer_pool.h index 2ffc5b6b75..8b202de5cd 100644 --- a/src/core/lib/iomgr/buffer_pool.h +++ b/src/core/lib/iomgr/buffer_pool.h @@ -42,7 +42,7 @@ grpc_buffer_pool *grpc_buffer_pool_internal_ref(grpc_buffer_pool *buffer_pool); void grpc_buffer_pool_internal_unref(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool); grpc_buffer_pool *grpc_buffer_pool_from_channel_args( - grpc_channel_args *channel_args); + const grpc_channel_args *channel_args); typedef enum { GRPC_BULIST_AWAITING_ALLOCATION, diff --git a/test/core/end2end/fuzzers/api_fuzzer.c b/test/core/end2end/fuzzers/api_fuzzer.c index 6d676dd02e..2d46989d11 100644 --- a/test/core/end2end/fuzzers/api_fuzzer.c +++ b/test/core/end2end/fuzzers/api_fuzzer.c @@ -232,8 +232,8 @@ void my_resolve_address(grpc_exec_ctx *exec_ctx, const char *addr, // defined in tcp_client_posix.c extern void (*grpc_tcp_client_connect_impl)( grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, - grpc_pollset_set *interested_parties, const struct sockaddr *addr, - size_t addr_len, gpr_timespec deadline); + grpc_pollset_set *interested_parties, const grpc_channel_args *channel_args, + const struct sockaddr *addr, size_t addr_len, gpr_timespec deadline); static void sched_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, gpr_timespec deadline); @@ -290,6 +290,7 @@ static void sched_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure, static void my_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, grpc_pollset_set *interested_parties, + const grpc_channel_args *channel_args, const struct sockaddr *addr, size_t addr_len, gpr_timespec deadline) { sched_connect(exec_ctx, closure, ep, deadline); -- cgit v1.2.3 From 287928c69c72cdce84dc987369d38d2f0b064a77 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 23 Sep 2016 16:04:30 -0700 Subject: Fix memory leaks --- src/core/lib/iomgr/tcp_client_posix.c | 1 + src/core/lib/iomgr/tcp_posix.c | 14 ++++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/tcp_client_posix.c b/src/core/lib/iomgr/tcp_client_posix.c index 860a4f8436..cf01623f09 100644 --- a/src/core/lib/iomgr/tcp_client_posix.c +++ b/src/core/lib/iomgr/tcp_client_posix.c @@ -250,6 +250,7 @@ finish: if (done) { gpr_mu_destroy(&ac->mu); gpr_free(ac->addr_str); + grpc_channel_args_destroy(ac->channel_args); gpr_free(ac); } grpc_exec_ctx_sched(exec_ctx, closure, error, NULL); diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index fd8fcb05c3..b4c53ee070 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -114,12 +114,18 @@ static void tcp_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_fd_shutdown(exec_ctx, tcp->em_fd); } -static void tcp_free(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { +static void tcp_end_free(grpc_exec_ctx *exec_ctx, void *tcp, + grpc_error *error) { + gpr_free(tcp); +} + +static void tcp_begin_free(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { grpc_fd_orphan(exec_ctx, tcp->em_fd, tcp->release_fd_cb, tcp->release_fd, "tcp_unref_orphan"); gpr_slice_buffer_destroy(&tcp->last_read_buffer); gpr_free(tcp->peer_string); - gpr_free(tcp); + grpc_buffer_user_destroy(exec_ctx, &tcp->buffer_user, + grpc_closure_create(tcp_end_free, tcp)); } /*#define GRPC_TCP_REFCOUNT_DEBUG*/ @@ -132,7 +138,7 @@ static void tcp_unref(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp, gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "TCP unref %p : %s %d -> %d", tcp, reason, tcp->refcount.count, tcp->refcount.count - 1); if (gpr_unref(&tcp->refcount)) { - tcp_free(exec_ctx, tcp); + tcp_begin_free(exec_ctx, tcp); } } @@ -147,7 +153,7 @@ static void tcp_ref(grpc_tcp *tcp, const char *reason, const char *file, #define TCP_REF(tcp, reason) tcp_ref((tcp)) static void tcp_unref(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { if (gpr_unref(&tcp->refcount)) { - tcp_free(exec_ctx, tcp); + tcp_begin_free(exec_ctx, tcp); } } -- cgit v1.2.3 From b635c61e04843261729c121343cdca38fd03b3a5 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 26 Sep 2016 08:42:04 -0700 Subject: Add a slice allocation scheme --- src/core/lib/iomgr/buffer_pool.c | 75 ++++++++++++++++++++++++++++++++++++++++ src/core/lib/iomgr/buffer_pool.h | 14 ++++++++ 2 files changed, 89 insertions(+) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/buffer_pool.c b/src/core/lib/iomgr/buffer_pool.c index 766de44bf4..bd6559ad4b 100644 --- a/src/core/lib/iomgr/buffer_pool.c +++ b/src/core/lib/iomgr/buffer_pool.c @@ -220,6 +220,52 @@ static bool bpreclaim(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool, return true; } +/******************************************************************************* + * bu_slice: a slice implementation that is backed by a grpc_buffer_user + */ + +typedef struct { + gpr_slice_refcount base; + gpr_refcount refs; + grpc_buffer_user *buffer_user; + size_t size; +} bu_slice_refcount; + +static void bu_slice_ref(void *p) { + bu_slice_refcount *rc = p; + gpr_ref(&rc->refs); +} + +static void bu_slice_unref(void *p) { + bu_slice_refcount *rc = p; + if (gpr_unref(&rc->refs)) { + /* TODO(ctiller): this is dangerous, but I think safe for now: + we have no guarantee here that we're at a safe point for creating an + execution context, but we have no way of writing this code otherwise. + In the future: consider lifting gpr_slice to grpc, and offering an + internal_{ref,unref} pair that is execution context aware. Alternatively, + make exec_ctx be thread local and 'do the right thing' (whatever that is) + if NULL */ + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_free(&exec_ctx, rc->buffer_user, rc->size); + grpc_exec_ctx_finish(&exec_ctx); + } +} + +static gpr_slice bu_slice_create(grpc_buffer_user *buffer_user, size_t size) { + bu_slice_refcount *rc = gpr_malloc(sizeof(bu_slice_refcount) + size); + rc->base.ref = bu_slice_ref; + rc->base.unref = bu_slice_unref; + gpr_ref_init(&rc->refs, 1); + rc->buffer_user = buffer_user; + rc->size = size; + gpr_slice slice; + slice.refcount = &rc->base; + slice.data.refcounted.bytes = (uint8_t *)(rc + 1); + slice.data.refcounted.length = size; + return slice; +} + /******************************************************************************* * grpc_buffer_pool internal implementation */ @@ -284,6 +330,20 @@ static void bu_destroy(grpc_exec_ctx *exec_ctx, void *bu, grpc_error *error) { grpc_buffer_pool_internal_unref(exec_ctx, buffer_user->buffer_pool); } +static void bu_allocated_slices(grpc_exec_ctx *exec_ctx, void *ts, + grpc_error *error) { + grpc_buffer_user_slice_allocator *alloc_temp_storage = ts; + if (error == GRPC_ERROR_NONE) { + for (size_t i = 0; i < alloc_temp_storage->count; i++) { + gpr_slice_buffer_add(alloc_temp_storage->dest, + bu_slice_create(alloc_temp_storage->buffer_user, + alloc_temp_storage->length)); + } + } + grpc_closure_run(exec_ctx, alloc_temp_storage->on_done, + GRPC_ERROR_REF(error)); +} + typedef struct { int64_t size; grpc_buffer_pool *buffer_pool; @@ -491,3 +551,18 @@ void grpc_buffer_user_finish_reclaimation(grpc_exec_ctx *exec_ctx, &buffer_user->buffer_pool->bpreclaimation_done_closure, GRPC_ERROR_NONE, false); } + +void grpc_buffer_user_alloc_slices( + grpc_exec_ctx *exec_ctx, grpc_buffer_user *buffer_user, + grpc_buffer_user_slice_allocator *alloc_temp_storage, size_t length, + size_t count, gpr_slice_buffer *dest, grpc_closure *on_done) { + grpc_closure_init(&alloc_temp_storage->on_allocated, bu_allocated_slices, + alloc_temp_storage); + alloc_temp_storage->on_done = on_done; + alloc_temp_storage->length = length; + alloc_temp_storage->count = count; + alloc_temp_storage->dest = dest; + alloc_temp_storage->buffer_user = buffer_user; + grpc_buffer_user_alloc(exec_ctx, buffer_user, count * length, + &alloc_temp_storage->on_allocated); +} diff --git a/src/core/lib/iomgr/buffer_pool.h b/src/core/lib/iomgr/buffer_pool.h index 8b202de5cd..1ac9b62906 100644 --- a/src/core/lib/iomgr/buffer_pool.h +++ b/src/core/lib/iomgr/buffer_pool.h @@ -98,4 +98,18 @@ void grpc_buffer_user_post_reclaimer(grpc_exec_ctx *exec_ctx, void grpc_buffer_user_finish_reclaimation(grpc_exec_ctx *exec_ctx, grpc_buffer_user *buffer_user); +typedef struct grpc_buffer_user_slice_allocator { + grpc_closure on_allocated; + grpc_closure *on_done; + size_t length; + size_t count; + gpr_slice_buffer *dest; + grpc_buffer_user *buffer_user; +} grpc_buffer_user_slice_allocator; + +void grpc_buffer_user_alloc_slices( + grpc_exec_ctx *exec_ctx, grpc_buffer_user *buffer_user, + grpc_buffer_user_slice_allocator *alloc_temp_storage, size_t length, + size_t count, gpr_slice_buffer *dest, grpc_closure *on_done); + #endif /* GRPC_CORE_LIB_IOMGR_BUFFER_POOL_H */ -- cgit v1.2.3 From 1f8d1d5afde35c05bb20f024c4af932a6199e362 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 26 Sep 2016 10:16:14 -0700 Subject: Fixes --- src/core/lib/iomgr/buffer_pool.c | 42 ++++++++++++++++++++++------------------ src/core/lib/iomgr/buffer_pool.h | 11 +++++++---- src/core/lib/iomgr/tcp_posix.c | 25 +++++++++++++++++++----- 3 files changed, 50 insertions(+), 28 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/buffer_pool.c b/src/core/lib/iomgr/buffer_pool.c index bd6559ad4b..837642f3bc 100644 --- a/src/core/lib/iomgr/buffer_pool.c +++ b/src/core/lib/iomgr/buffer_pool.c @@ -249,6 +249,7 @@ static void bu_slice_unref(void *p) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_buffer_user_free(&exec_ctx, rc->buffer_user, rc->size); grpc_exec_ctx_finish(&exec_ctx); + gpr_free(rc); } } @@ -332,16 +333,15 @@ static void bu_destroy(grpc_exec_ctx *exec_ctx, void *bu, grpc_error *error) { static void bu_allocated_slices(grpc_exec_ctx *exec_ctx, void *ts, grpc_error *error) { - grpc_buffer_user_slice_allocator *alloc_temp_storage = ts; + grpc_buffer_user_slice_allocator *slice_allocator = ts; if (error == GRPC_ERROR_NONE) { - for (size_t i = 0; i < alloc_temp_storage->count; i++) { - gpr_slice_buffer_add(alloc_temp_storage->dest, - bu_slice_create(alloc_temp_storage->buffer_user, - alloc_temp_storage->length)); + for (size_t i = 0; i < slice_allocator->count; i++) { + gpr_slice_buffer_add_indexed(slice_allocator->dest, + bu_slice_create(slice_allocator->buffer_user, + slice_allocator->length)); } } - grpc_closure_run(exec_ctx, alloc_temp_storage->on_done, - GRPC_ERROR_REF(error)); + grpc_closure_run(exec_ctx, &slice_allocator->on_done, GRPC_ERROR_REF(error)); } typedef struct { @@ -552,17 +552,21 @@ void grpc_buffer_user_finish_reclaimation(grpc_exec_ctx *exec_ctx, GRPC_ERROR_NONE, false); } +void grpc_buffer_user_slice_allocator_init( + grpc_buffer_user_slice_allocator *slice_allocator, + grpc_buffer_user *buffer_user, grpc_iomgr_cb_func cb, void *p) { + grpc_closure_init(&slice_allocator->on_allocated, bu_allocated_slices, + slice_allocator); + grpc_closure_init(&slice_allocator->on_done, cb, p); + slice_allocator->buffer_user = buffer_user; +} + void grpc_buffer_user_alloc_slices( - grpc_exec_ctx *exec_ctx, grpc_buffer_user *buffer_user, - grpc_buffer_user_slice_allocator *alloc_temp_storage, size_t length, - size_t count, gpr_slice_buffer *dest, grpc_closure *on_done) { - grpc_closure_init(&alloc_temp_storage->on_allocated, bu_allocated_slices, - alloc_temp_storage); - alloc_temp_storage->on_done = on_done; - alloc_temp_storage->length = length; - alloc_temp_storage->count = count; - alloc_temp_storage->dest = dest; - alloc_temp_storage->buffer_user = buffer_user; - grpc_buffer_user_alloc(exec_ctx, buffer_user, count * length, - &alloc_temp_storage->on_allocated); + grpc_exec_ctx *exec_ctx, grpc_buffer_user_slice_allocator *slice_allocator, + size_t length, size_t count, gpr_slice_buffer *dest) { + slice_allocator->length = length; + slice_allocator->count = count; + slice_allocator->dest = dest; + grpc_buffer_user_alloc(exec_ctx, slice_allocator->buffer_user, count * length, + &slice_allocator->on_allocated); } diff --git a/src/core/lib/iomgr/buffer_pool.h b/src/core/lib/iomgr/buffer_pool.h index 1ac9b62906..968454ec94 100644 --- a/src/core/lib/iomgr/buffer_pool.h +++ b/src/core/lib/iomgr/buffer_pool.h @@ -100,16 +100,19 @@ void grpc_buffer_user_finish_reclaimation(grpc_exec_ctx *exec_ctx, typedef struct grpc_buffer_user_slice_allocator { grpc_closure on_allocated; - grpc_closure *on_done; + grpc_closure on_done; size_t length; size_t count; gpr_slice_buffer *dest; grpc_buffer_user *buffer_user; } grpc_buffer_user_slice_allocator; +void grpc_buffer_user_slice_allocator_init( + grpc_buffer_user_slice_allocator *slice_allocator, + grpc_buffer_user *buffer_user, grpc_iomgr_cb_func cb, void *p); + void grpc_buffer_user_alloc_slices( - grpc_exec_ctx *exec_ctx, grpc_buffer_user *buffer_user, - grpc_buffer_user_slice_allocator *alloc_temp_storage, size_t length, - size_t count, gpr_slice_buffer *dest, grpc_closure *on_done); + grpc_exec_ctx *exec_ctx, grpc_buffer_user_slice_allocator *slice_allocator, + size_t length, size_t count, gpr_slice_buffer *dest); #endif /* GRPC_CORE_LIB_IOMGR_BUFFER_POOL_H */ diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index b4c53ee070..27a7f83b4d 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -102,6 +102,7 @@ typedef struct { char *peer_string; grpc_buffer_user buffer_user; + grpc_buffer_user_slice_allocator slice_allocator; } grpc_tcp; static void tcp_handle_read(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, @@ -189,7 +190,7 @@ static void call_read_cb(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp, } #define MAX_READ_IOVEC 4 -static void tcp_continue_read(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { +static void tcp_do_read(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { struct msghdr msg; struct iovec iov[MAX_READ_IOVEC]; ssize_t read_bytes; @@ -200,10 +201,6 @@ static void tcp_continue_read(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { GPR_ASSERT(tcp->incoming_buffer->count <= MAX_READ_IOVEC); GPR_TIMER_BEGIN("tcp_continue_read", 0); - while (tcp->incoming_buffer->count < (size_t)tcp->iov_size) { - gpr_slice_buffer_add_indexed(tcp->incoming_buffer, - gpr_slice_malloc(tcp->slice_size)); - } for (i = 0; i < tcp->incoming_buffer->count; i++) { iov[i].iov_base = GPR_SLICE_START_PTR(tcp->incoming_buffer->slices[i]); iov[i].iov_len = GPR_SLICE_LENGTH(tcp->incoming_buffer->slices[i]); @@ -260,6 +257,22 @@ static void tcp_continue_read(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { GPR_TIMER_END("tcp_continue_read", 0); } +static void tcp_read_allocation_done(grpc_exec_ctx *exec_ctx, void *tcp, + grpc_error *error) { + tcp_do_read(exec_ctx, tcp); +} + +static void tcp_continue_read(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { + if (tcp->incoming_buffer->count < (size_t)tcp->iov_size) { + grpc_buffer_user_alloc_slices( + exec_ctx, &tcp->slice_allocator, tcp->slice_size, + (size_t)tcp->iov_size - tcp->incoming_buffer->count, + tcp->incoming_buffer); + } else { + tcp_do_read(exec_ctx, tcp); + } +} + static void tcp_handle_read(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, grpc_error *error) { grpc_tcp *tcp = (grpc_tcp *)arg; @@ -515,6 +528,8 @@ grpc_endpoint *grpc_tcp_create(grpc_fd *em_fd, grpc_buffer_pool *buffer_pool, tcp->write_closure.cb_arg = tcp; gpr_slice_buffer_init(&tcp->last_read_buffer); grpc_buffer_user_init(&tcp->buffer_user, buffer_pool); + grpc_buffer_user_slice_allocator_init( + &tcp->slice_allocator, &tcp->buffer_user, tcp_read_allocation_done, tcp); /* Tell network status tracker about new endpoint */ grpc_network_status_register_endpoint(&tcp->base); -- cgit v1.2.3 From 046cf7646918b19a8956e20f7e28e7422a6f29cd Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 26 Sep 2016 11:13:51 -0700 Subject: Encode method config table in channel args instead of in resolver result. --- src/core/ext/client_config/client_channel.c | 65 ++++++++++---------- src/core/ext/client_config/method_config.c | 71 ++++++++++++++++++++++ src/core/ext/client_config/method_config.h | 5 ++ src/core/ext/client_config/resolver_result.c | 11 +--- src/core/ext/client_config/resolver_result.h | 6 +- src/core/ext/lb_policy/grpclb/grpclb.c | 5 ++ src/core/ext/lb_policy/pick_first/pick_first.c | 1 + src/core/ext/lb_policy/round_robin/round_robin.c | 1 + src/core/ext/resolver/dns/native/dns_resolver.c | 2 +- src/core/ext/resolver/sockaddr/sockaddr_resolver.c | 2 +- src/core/lib/channel/channel_args.c | 10 +++ src/core/lib/channel/channel_args.h | 6 ++ 12 files changed, 137 insertions(+), 48 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/client_config/client_channel.c b/src/core/ext/client_config/client_channel.c index 73e62fcbbf..96c8c62c04 100644 --- a/src/core/ext/client_config/client_channel.c +++ b/src/core/ext/client_config/client_channel.c @@ -43,6 +43,7 @@ #include #include "src/core/ext/client_config/lb_policy_registry.h" +#include "src/core/ext/client_config/method_config.h" #include "src/core/ext/client_config/subchannel.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/connected_channel.h" @@ -70,15 +71,14 @@ typedef struct client_channel_channel_data { /** client channel factory */ grpc_client_channel_factory *client_channel_factory; - /** mutex protecting client configuration, including all - variables below in this data structure */ + /** mutex protecting all variables below in this data structure */ gpr_mu mu; - /** currently active load balancer - guarded by mu */ + /** currently active load balancer */ grpc_lb_policy *lb_policy; - /** incoming resolver result - set by resolver.next(), guarded by mu */ - grpc_resolver_result *incoming_resolver_result; - /** current resolver result */ - grpc_resolver_result *current_resolver_result; + /** method config table */ + grpc_method_config_table *method_config_table; + /** incoming resolver result - set by resolver.next() */ + grpc_resolver_result *resolver_result; /** a list of closures that are all waiting for config to come in */ grpc_closure_list waiting_for_config_closures; /** resolver callback */ @@ -176,23 +176,23 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, channel_data *chand = arg; grpc_lb_policy *lb_policy = NULL; grpc_lb_policy *old_lb_policy; + grpc_method_config_table *method_config_table = NULL; grpc_connectivity_state state = GRPC_CHANNEL_TRANSIENT_FAILURE; bool exit_idle = false; grpc_error *state_error = GRPC_ERROR_CREATE("No load balancing policy"); - if (chand->incoming_resolver_result != NULL) { + if (chand->resolver_result != NULL) { grpc_lb_policy_args lb_policy_args; lb_policy_args.server_name = - grpc_resolver_result_get_server_name(chand->incoming_resolver_result); + grpc_resolver_result_get_server_name(chand->resolver_result); lb_policy_args.addresses = - grpc_resolver_result_get_addresses(chand->incoming_resolver_result); - lb_policy_args.additional_args = grpc_resolver_result_get_lb_policy_args( - chand->incoming_resolver_result); + grpc_resolver_result_get_addresses(chand->resolver_result); + lb_policy_args.additional_args = + grpc_resolver_result_get_lb_policy_args(chand->resolver_result); lb_policy_args.client_channel_factory = chand->client_channel_factory; lb_policy = grpc_lb_policy_create( exec_ctx, - grpc_resolver_result_get_lb_policy_name( - chand->incoming_resolver_result), + grpc_resolver_result_get_lb_policy_name(chand->resolver_result), &lb_policy_args); if (lb_policy != NULL) { GRPC_LB_POLICY_REF(lb_policy, "config_change"); @@ -200,11 +200,15 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, state = grpc_lb_policy_check_connectivity(exec_ctx, lb_policy, &state_error); } - if (chand->current_resolver_result != NULL) { - grpc_resolver_result_unref(exec_ctx, chand->current_resolver_result); + const grpc_arg *channel_arg = grpc_channel_args_find( + lb_policy_args.additional_args, GRPC_ARG_SERVICE_CONFIG); + if (channel_arg != NULL) { + GPR_ASSERT(channel_arg->type == GRPC_ARG_POINTER); + method_config_table = grpc_method_config_table_ref( + (grpc_method_config_table *)channel_arg->value.pointer.p); } - chand->current_resolver_result = chand->incoming_resolver_result; - chand->incoming_resolver_result = NULL; + grpc_resolver_result_unref(exec_ctx, chand->resolver_result); + chand->resolver_result = NULL; } if (lb_policy != NULL) { @@ -215,6 +219,10 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, gpr_mu_lock(&chand->mu); old_lb_policy = chand->lb_policy; chand->lb_policy = lb_policy; + if (chand->method_config_table != NULL) { + grpc_method_config_table_unref(chand->method_config_table); + } + chand->method_config_table = method_config_table; if (lb_policy != NULL) { grpc_exec_ctx_enqueue_list(exec_ctx, &chand->waiting_for_config_closures, NULL); @@ -238,8 +246,7 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, watch_lb_policy(exec_ctx, chand, lb_policy, state); } GRPC_CHANNEL_STACK_REF(chand->owning_stack, "resolver"); - grpc_resolver_next(exec_ctx, chand->resolver, - &chand->incoming_resolver_result, + grpc_resolver_next(exec_ctx, chand->resolver, &chand->resolver_result, &chand->on_resolver_result_changed); gpr_mu_unlock(&chand->mu); } else { @@ -376,8 +383,8 @@ static void cc_destroy_channel_elem(grpc_exec_ctx *exec_ctx, chand->interested_parties); GRPC_LB_POLICY_UNREF(exec_ctx, chand->lb_policy, "channel"); } - if (chand->current_resolver_result != NULL) { - grpc_resolver_result_unref(exec_ctx, chand->current_resolver_result); + if (chand->method_config_table != NULL) { + grpc_method_config_table_unref(chand->method_config_table); } grpc_connectivity_state_destroy(exec_ctx, &chand->state_tracker); grpc_pollset_set_destroy(chand->interested_parties); @@ -512,11 +519,9 @@ static void subchannel_ready(grpc_exec_ctx *exec_ctx, void *arg, /* Get method config. */ // FIXME: need to actually use the config data! // FIXME: think about refcounting vs. atomicity here - grpc_method_config_table* table = grpc_resolver_result_get_method_configs( - chand->current_resolver_result); - if (table != NULL) { + if (chand->method_config_table != NULL) { calld->method_config = grpc_method_config_table_get_method_config( - table, calld->path); + chand->method_config_table, calld->path); } /* Create call on subchannel. */ grpc_subchannel_call *subchannel_call = NULL; @@ -626,8 +631,7 @@ static bool pick_subchannel(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, if (chand->resolver != NULL && !chand->started_resolving) { chand->started_resolving = true; GRPC_CHANNEL_STACK_REF(chand->owning_stack, "resolver"); - grpc_resolver_next(exec_ctx, chand->resolver, - &chand->incoming_resolver_result, + grpc_resolver_next(exec_ctx, chand->resolver, &chand->resolver_result, &chand->on_resolver_result_changed); } if (chand->resolver != NULL) { @@ -836,7 +840,7 @@ void grpc_client_channel_finish_initialization( chand->exit_idle_when_lb_policy_arrives) { chand->started_resolving = true; GRPC_CHANNEL_STACK_REF(chand->owning_stack, "resolver"); - grpc_resolver_next(exec_ctx, resolver, &chand->incoming_resolver_result, + grpc_resolver_next(exec_ctx, resolver, &chand->resolver_result, &chand->on_resolver_result_changed); } chand->client_channel_factory = client_channel_factory; @@ -858,8 +862,7 @@ grpc_connectivity_state grpc_client_channel_check_connectivity_state( if (!chand->started_resolving && chand->resolver != NULL) { GRPC_CHANNEL_STACK_REF(chand->owning_stack, "resolver"); chand->started_resolving = true; - grpc_resolver_next(exec_ctx, chand->resolver, - &chand->incoming_resolver_result, + grpc_resolver_next(exec_ctx, chand->resolver, &chand->resolver_result, &chand->on_resolver_result_changed); } } diff --git a/src/core/ext/client_config/method_config.c b/src/core/ext/client_config/method_config.c index e3589153fb..989f776967 100644 --- a/src/core/ext/client_config/method_config.c +++ b/src/core/ext/client_config/method_config.c @@ -33,9 +33,11 @@ #include +#include #include #include #include +#include #include "src/core/lib/transport/metadata.h" @@ -212,3 +214,72 @@ grpc_method_config* grpc_method_config_table_get_method_config( } return grpc_method_config_ref(method_config); } + +static void* copy_arg(void* p) { + return grpc_method_config_table_ref(p); +} + +static void destroy_arg(void* p) { + grpc_method_config_table_unref(p); +} + +static int cmp_arg(void* p1, void* p2) { + grpc_method_config_table* t1 = p1; + grpc_method_config_table* t2 = p2; + for (size_t i = 0; i < GPR_ARRAY_SIZE(t1->entries); ++i) { + grpc_method_config_table_entry* e1 = &t1->entries[i]; + grpc_method_config_table_entry* e2 = &t2->entries[i]; + // Compare paths by hash value. + if (e1->path->hash < e2->path->hash) return -1; + if (e1->path->hash > e2->path->hash) return 1; + // Compare wait_for_ready. + const bool wait_for_ready1 = + e1->method_config->wait_for_ready == NULL + ? false : *e1->method_config->wait_for_ready; + const bool wait_for_ready2 = + e2->method_config->wait_for_ready == NULL + ? false : *e2->method_config->wait_for_ready; + if (wait_for_ready1 < wait_for_ready2) return -1; + if (wait_for_ready1 > wait_for_ready2) return 1; + // Compare timeout. + const gpr_timespec timeout1 = + e1->method_config->timeout == NULL + ? gpr_inf_past(GPR_CLOCK_MONOTONIC) : *e1->method_config->timeout; + const gpr_timespec timeout2 = + e2->method_config->timeout == NULL + ? gpr_inf_past(GPR_CLOCK_MONOTONIC) : *e2->method_config->timeout; + const int timeout_result = gpr_time_cmp(timeout1, timeout2); + if (timeout_result != 0) return timeout_result; + // Compare max_request_message_bytes. + const int32_t max_request_message_bytes1 = + e1->method_config->max_request_message_bytes == NULL + ? -1 : *e1->method_config->max_request_message_bytes; + const int32_t max_request_message_bytes2 = + e2->method_config->max_request_message_bytes == NULL + ? -1 : *e2->method_config->max_request_message_bytes; + if (max_request_message_bytes1 < max_request_message_bytes2) return -1; + if (max_request_message_bytes1 > max_request_message_bytes2) return 1; + // Compare max_response_message_bytes. + const int32_t max_response_message_bytes1 = + e1->method_config->max_response_message_bytes == NULL + ? -1 : *e1->method_config->max_response_message_bytes; + const int32_t max_response_message_bytes2 = + e2->method_config->max_response_message_bytes == NULL + ? -1 : *e2->method_config->max_response_message_bytes; + if (max_response_message_bytes1 < max_response_message_bytes2) return -1; + if (max_response_message_bytes1 > max_response_message_bytes2) return 1; + } + return 0; +} + +static grpc_arg_pointer_vtable arg_vtable = {copy_arg, destroy_arg, cmp_arg}; + +grpc_arg grpc_method_config_table_create_channel_arg( + grpc_method_config_table* table) { + grpc_arg arg; + arg.type = GRPC_ARG_POINTER; + arg.key = GRPC_ARG_SERVICE_CONFIG; + arg.value.pointer.p = grpc_method_config_table_ref(table); + arg.value.pointer.vtable = &arg_vtable; + return arg; +} diff --git a/src/core/ext/client_config/method_config.h b/src/core/ext/client_config/method_config.h index 9490e296b2..2be0cd1006 100644 --- a/src/core/ext/client_config/method_config.h +++ b/src/core/ext/client_config/method_config.h @@ -35,6 +35,7 @@ #include #include +#include #include "src/core/lib/transport/metadata.h" @@ -82,4 +83,8 @@ void grpc_method_config_table_add_method_config( grpc_method_config* grpc_method_config_table_get_method_config( grpc_method_config_table* table, grpc_mdstr* path); +/// Returns a channel arg containing \a table. +grpc_arg grpc_method_config_table_create_channel_arg( + grpc_method_config_table* table); + #endif /* GRPC_CORE_EXT_CLIENT_CONFIG_METHOD_CONFIG_H */ diff --git a/src/core/ext/client_config/resolver_result.c b/src/core/ext/client_config/resolver_result.c index 5c5ffb2635..16d124d205 100644 --- a/src/core/ext/client_config/resolver_result.c +++ b/src/core/ext/client_config/resolver_result.c @@ -49,13 +49,11 @@ struct grpc_resolver_result { grpc_lb_addresses* addresses; char* lb_policy_name; grpc_channel_args* lb_policy_args; - grpc_method_config_table* method_configs; }; grpc_resolver_result* grpc_resolver_result_create( const char* server_name, grpc_lb_addresses* addresses, - const char* lb_policy_name, grpc_channel_args* lb_policy_args, - grpc_method_config_table* method_configs) { + const char* lb_policy_name, grpc_channel_args* lb_policy_args) { grpc_resolver_result* result = gpr_malloc(sizeof(*result)); memset(result, 0, sizeof(*result)); gpr_ref_init(&result->refs, 1); @@ -63,7 +61,6 @@ grpc_resolver_result* grpc_resolver_result_create( result->addresses = addresses; result->lb_policy_name = gpr_strdup(lb_policy_name); result->lb_policy_args = lb_policy_args; - result->method_configs = grpc_method_config_table_ref(method_configs); return result; } @@ -78,7 +75,6 @@ void grpc_resolver_result_unref(grpc_exec_ctx* exec_ctx, grpc_lb_addresses_destroy(result->addresses, NULL /* user_data_destroy */); gpr_free(result->lb_policy_name); grpc_channel_args_destroy(result->lb_policy_args); - grpc_method_config_table_unref(result->method_configs); gpr_free(result); } } @@ -101,8 +97,3 @@ grpc_channel_args* grpc_resolver_result_get_lb_policy_args( grpc_resolver_result* result) { return result->lb_policy_args; } - -grpc_method_config_table* grpc_resolver_result_get_method_configs( - grpc_resolver_result* result) { - return result->method_configs; -} diff --git a/src/core/ext/client_config/resolver_result.h b/src/core/ext/client_config/resolver_result.h index e6127f1d6d..707c8c2cf5 100644 --- a/src/core/ext/client_config/resolver_result.h +++ b/src/core/ext/client_config/resolver_result.h @@ -33,7 +33,6 @@ #define GRPC_CORE_EXT_CLIENT_CONFIG_RESOLVER_RESULT_H #include "src/core/ext/client_config/lb_policy_factory.h" -#include "src/core/ext/client_config/method_config.h" #include "src/core/lib/iomgr/resolve_address.h" // TODO(roth, ctiller): In the long term, we are considering replacing @@ -52,8 +51,7 @@ typedef struct grpc_resolver_result grpc_resolver_result; /// Takes ownership of \a addresses, \a lb_policy_args. grpc_resolver_result* grpc_resolver_result_create( const char* server_name, grpc_lb_addresses* addresses, - const char* lb_policy_name, grpc_channel_args* lb_policy_args, - grpc_method_config_table* method_configs); + const char* lb_policy_name, grpc_channel_args* lb_policy_args); void grpc_resolver_result_ref(grpc_resolver_result* result); void grpc_resolver_result_unref(grpc_exec_ctx* exec_ctx, @@ -67,7 +65,5 @@ const char* grpc_resolver_result_get_lb_policy_name( grpc_resolver_result* result); grpc_channel_args* grpc_resolver_result_get_lb_policy_args( grpc_resolver_result* result); -grpc_method_config_table* grpc_resolver_result_get_method_configs( - grpc_resolver_result* result); #endif /* GRPC_CORE_EXT_CLIENT_CONFIG_RESOLVER_RESULT_H */ diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index 8105c4415d..de3438be81 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -112,6 +112,7 @@ #include "src/core/ext/client_config/parse_address.h" #include "src/core/ext/lb_policy/grpclb/grpclb.h" #include "src/core/ext/lb_policy/grpclb/load_balancer_api.h" +#include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/sockaddr_utils.h" #include "src/core/lib/support/string.h" @@ -285,6 +286,7 @@ typedef struct glb_lb_policy { const char *server_name; grpc_client_channel_factory *cc_factory; + grpc_channel_args *args; /** for communicating with the LB server */ grpc_channel *lb_channel; @@ -442,6 +444,7 @@ static grpc_lb_policy *create_rr(grpc_exec_ctx *exec_ctx, args.server_name = glb_policy->server_name; args.client_channel_factory = glb_policy->cc_factory; args.addresses = process_serverlist(serverlist); + args.additional_args = glb_policy->args; grpc_lb_policy *rr = grpc_lb_policy_create(exec_ctx, "round_robin", &args); @@ -567,6 +570,7 @@ static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx, * Create a client channel over them to communicate with a LB service */ glb_policy->server_name = gpr_strdup(args->server_name); glb_policy->cc_factory = args->client_channel_factory; + glb_policy->args = grpc_channel_args_copy(args->additional_args); GPR_ASSERT(glb_policy->cc_factory != NULL); /* construct a target from the addresses in args, given in the form @@ -633,6 +637,7 @@ static void glb_destroy(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { GPR_ASSERT(glb_policy->pending_picks == NULL); GPR_ASSERT(glb_policy->pending_pings == NULL); gpr_free((void *)glb_policy->server_name); + grpc_channel_args_destroy(glb_policy->args); grpc_channel_destroy(glb_policy->lb_channel); glb_policy->lb_channel = NULL; grpc_connectivity_state_destroy(exec_ctx, &glb_policy->state_tracker); diff --git a/src/core/ext/lb_policy/pick_first/pick_first.c b/src/core/ext/lb_policy/pick_first/pick_first.c index 466a0fdede..10030ef18b 100644 --- a/src/core/ext/lb_policy/pick_first/pick_first.c +++ b/src/core/ext/lb_policy/pick_first/pick_first.c @@ -470,6 +470,7 @@ static grpc_lb_policy *create_pick_first(grpc_exec_ctx *exec_ctx, sc_args.addr = (struct sockaddr *)(&args->addresses->addresses[i].address.addr); sc_args.addr_len = args->addresses->addresses[i].address.len; + sc_args.args = args->additional_args; grpc_subchannel *subchannel = grpc_client_channel_factory_create_subchannel( exec_ctx, args->client_channel_factory, &sc_args); diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c index 037f180a9e..b6cfe8994d 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -633,6 +633,7 @@ static grpc_lb_policy *round_robin_create(grpc_exec_ctx *exec_ctx, sc_args.addr = (struct sockaddr *)(&args->addresses->addresses[i].address.addr); sc_args.addr_len = args->addresses->addresses[i].address.len; + sc_args.args = args->additional_args; grpc_subchannel *subchannel = grpc_client_channel_factory_create_subchannel( exec_ctx, args->client_channel_factory, &sc_args); diff --git a/src/core/ext/resolver/dns/native/dns_resolver.c b/src/core/ext/resolver/dns/native/dns_resolver.c index 879e26f7d9..e8ac1b12ae 100644 --- a/src/core/ext/resolver/dns/native/dns_resolver.c +++ b/src/core/ext/resolver/dns/native/dns_resolver.c @@ -181,7 +181,7 @@ static void dns_on_resolved(grpc_exec_ctx *exec_ctx, void *arg, } grpc_resolved_addresses_destroy(r->addresses); result = grpc_resolver_result_create(r->target_name, addresses, - r->lb_policy_name, NULL, NULL); + r->lb_policy_name, NULL); } else { gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC); gpr_timespec next_try = gpr_backoff_step(&r->backoff_state, now); diff --git a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c index 61be1b3c25..74d2015e5c 100644 --- a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c +++ b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c @@ -122,7 +122,7 @@ static void sockaddr_maybe_finish_next_locked(grpc_exec_ctx *exec_ctx, r->published = true; *r->target_result = grpc_resolver_result_create( "", grpc_lb_addresses_copy(r->addresses, NULL /* user_data_copy */), - r->lb_policy_name, NULL, NULL); + r->lb_policy_name, NULL); grpc_exec_ctx_sched(exec_ctx, r->next_completion, GRPC_ERROR_NONE, NULL); r->next_completion = NULL; } diff --git a/src/core/lib/channel/channel_args.c b/src/core/lib/channel/channel_args.c index 3a56b1ff20..bab6fcd9fa 100644 --- a/src/core/lib/channel/channel_args.c +++ b/src/core/lib/channel/channel_args.c @@ -272,6 +272,16 @@ int grpc_channel_args_compare(const grpc_channel_args *a, return 0; } +const grpc_arg *grpc_channel_args_find(const grpc_channel_args *args, + const char *name) { + if (args != NULL) { + for (size_t i = 0; i < args->num_args; ++i) { + if (args->args[i].key == name) return &args->args[i]; + } + } + return NULL; +} + int grpc_channel_arg_get_integer(grpc_arg *arg, grpc_integer_options options) { if (arg->type != GRPC_ARG_INTEGER) { gpr_log(GPR_ERROR, "%s ignored: it must be an integer", arg->key); diff --git a/src/core/lib/channel/channel_args.h b/src/core/lib/channel/channel_args.h index 586a296d1f..38fb4c55d4 100644 --- a/src/core/lib/channel/channel_args.h +++ b/src/core/lib/channel/channel_args.h @@ -89,6 +89,12 @@ uint32_t grpc_channel_args_compression_algorithm_get_states( int grpc_channel_args_compare(const grpc_channel_args *a, const grpc_channel_args *b); +/** Returns the value of argument \a name from \a args, or NULL if not found. + Note: \a name is matched using pointer equality, so it must be the + same instance of the string used to create the grpc_arg key. */ +const grpc_arg *grpc_channel_args_find(const grpc_channel_args *args, + const char *name); + typedef struct grpc_integer_options { int default_value; // Return this if value is outside of expected bounds. int min_value; -- cgit v1.2.3 From 61ecb9259b0a9e09d1b4f29ea8ee9ba57af0e7c7 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 26 Sep 2016 13:22:12 -0700 Subject: TCP buffer pool integration done --- src/core/lib/iomgr/buffer_pool.c | 30 ++++++++++++++++++++++-------- src/core/lib/iomgr/buffer_pool.h | 6 +++--- src/core/lib/iomgr/tcp_posix.c | 4 ++-- test/core/iomgr/buffer_pool_test.c | 31 ++++++++++++++++++++++++++++++- test/core/util/mock_endpoint.c | 2 +- test/core/util/passthru_endpoint.c | 2 +- 6 files changed, 59 insertions(+), 16 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/buffer_pool.c b/src/core/lib/iomgr/buffer_pool.c index 837642f3bc..16445a4265 100644 --- a/src/core/lib/iomgr/buffer_pool.c +++ b/src/core/lib/iomgr/buffer_pool.c @@ -115,6 +115,7 @@ static grpc_buffer_user *bulist_pop(grpc_buffer_pool *buffer_pool, buffer_user->links[list].prev; buffer_user->links[list].prev->links[list].next = buffer_user->links[list].next; + *root = buffer_user->links[list].next; } buffer_user->links[list].next = buffer_user->links[list].prev = NULL; return buffer_user; @@ -365,8 +366,8 @@ static void bp_resize(grpc_exec_ctx *exec_ctx, void *args, grpc_error *error) { gpr_free(a); } -static void bpreclaimation_done_closure(grpc_exec_ctx *exec_ctx, void *bp, - grpc_error *error) { +static void bp_reclaimation_done(grpc_exec_ctx *exec_ctx, void *bp, + grpc_error *error) { grpc_buffer_pool *buffer_pool = bp; buffer_pool->reclaiming = false; bpstep_sched(exec_ctx, buffer_pool); @@ -386,7 +387,7 @@ grpc_buffer_pool *grpc_buffer_pool_create(void) { buffer_pool->reclaiming = false; grpc_closure_init(&buffer_pool->bpstep_closure, bpstep, buffer_pool); grpc_closure_init(&buffer_pool->bpreclaimation_done_closure, - bpreclaimation_done_closure, buffer_pool); + bp_reclaimation_done, buffer_pool); for (int i = 0; i < GRPC_BULIST_COUNT; i++) { buffer_pool->roots[i] = NULL; } @@ -481,6 +482,7 @@ void grpc_buffer_user_init(grpc_buffer_user *buffer_user, grpc_closure_list_init(&buffer_user->on_allocated); buffer_user->allocating = false; buffer_user->added_to_free_pool = false; + buffer_user->on_done_destroy = NULL; buffer_user->reclaimers[0] = NULL; buffer_user->reclaimers[1] = NULL; for (int i = 0; i < GRPC_BULIST_COUNT; i++) { @@ -488,18 +490,25 @@ void grpc_buffer_user_init(grpc_buffer_user *buffer_user, } } -void grpc_buffer_user_destroy(grpc_exec_ctx *exec_ctx, - grpc_buffer_user *buffer_user, - grpc_closure *on_done) { +void grpc_buffer_user_shutdown(grpc_exec_ctx *exec_ctx, + grpc_buffer_user *buffer_user, + grpc_closure *on_done) { + gpr_mu_lock(&buffer_user->mu); + GPR_ASSERT(buffer_user->on_done_destroy == NULL); buffer_user->on_done_destroy = on_done; - grpc_combiner_execute(exec_ctx, buffer_user->buffer_pool->combiner, - &buffer_user->destroy_closure, GRPC_ERROR_NONE, false); + if (buffer_user->allocated == 0) { + grpc_combiner_execute(exec_ctx, buffer_user->buffer_pool->combiner, + &buffer_user->destroy_closure, GRPC_ERROR_NONE, + false); + } + gpr_mu_unlock(&buffer_user->mu); } void grpc_buffer_user_alloc(grpc_exec_ctx *exec_ctx, grpc_buffer_user *buffer_user, size_t size, grpc_closure *optional_on_done) { gpr_mu_lock(&buffer_user->mu); + GPR_ASSERT(buffer_user->on_done_destroy == NULL); buffer_user->allocated += (int64_t)size; buffer_user->free_pool -= (int64_t)size; if (buffer_user->free_pool < 0) { @@ -532,6 +541,11 @@ void grpc_buffer_user_free(grpc_exec_ctx *exec_ctx, &buffer_user->add_to_free_pool_closure, GRPC_ERROR_NONE, false); } + if (buffer_user->on_done_destroy != NULL && buffer_user->allocated == 0) { + grpc_combiner_execute(exec_ctx, buffer_user->buffer_pool->combiner, + &buffer_user->destroy_closure, GRPC_ERROR_NONE, + false); + } gpr_mu_unlock(&buffer_user->mu); } diff --git a/src/core/lib/iomgr/buffer_pool.h b/src/core/lib/iomgr/buffer_pool.h index 968454ec94..317eb6b458 100644 --- a/src/core/lib/iomgr/buffer_pool.h +++ b/src/core/lib/iomgr/buffer_pool.h @@ -83,9 +83,9 @@ struct grpc_buffer_user { void grpc_buffer_user_init(grpc_buffer_user *buffer_user, grpc_buffer_pool *buffer_pool); -void grpc_buffer_user_destroy(grpc_exec_ctx *exec_ctx, - grpc_buffer_user *buffer_user, - grpc_closure *on_done); +void grpc_buffer_user_shutdown(grpc_exec_ctx *exec_ctx, + grpc_buffer_user *buffer_user, + grpc_closure *on_done); void grpc_buffer_user_alloc(grpc_exec_ctx *exec_ctx, grpc_buffer_user *buffer_user, size_t size, diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 27a7f83b4d..8b0841cacc 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -125,8 +125,8 @@ static void tcp_begin_free(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { "tcp_unref_orphan"); gpr_slice_buffer_destroy(&tcp->last_read_buffer); gpr_free(tcp->peer_string); - grpc_buffer_user_destroy(exec_ctx, &tcp->buffer_user, - grpc_closure_create(tcp_end_free, tcp)); + grpc_buffer_user_shutdown(exec_ctx, &tcp->buffer_user, + grpc_closure_create(tcp_end_free, tcp)); } /*#define GRPC_TCP_REFCOUNT_DEBUG*/ diff --git a/test/core/iomgr/buffer_pool_test.c b/test/core/iomgr/buffer_pool_test.c index 7438d088ac..265ece72ac 100644 --- a/test/core/iomgr/buffer_pool_test.c +++ b/test/core/iomgr/buffer_pool_test.c @@ -78,7 +78,7 @@ grpc_closure *make_unused_reclaimer(grpc_closure *then) { static void destroy_user(grpc_buffer_user *usr) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; bool done = false; - grpc_buffer_user_destroy(&exec_ctx, usr, set_bool(&done)); + grpc_buffer_user_shutdown(&exec_ctx, usr, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(done); } @@ -498,6 +498,34 @@ static void test_multiple_reclaims_can_be_triggered(void) { GPR_ASSERT(destructive_done); } +static void test_buffer_user_stays_allocated_until_memory_released(void) { + gpr_log(GPR_INFO, + "** test_buffer_user_stays_allocated_until_memory_released **"); + grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool_resize(p, 1024 * 1024); + grpc_buffer_user usr; + grpc_buffer_user_init(&usr, p); + bool done = false; + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_alloc(&exec_ctx, &usr, 1024, NULL); + grpc_exec_ctx_finish(&exec_ctx); + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_pool_unref(p); + grpc_buffer_user_shutdown(&exec_ctx, &usr, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(!done); + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_free(&exec_ctx, &usr, 1024); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(done); + } +} + int main(int argc, char **argv) { grpc_test_init(argc, argv); grpc_init(); @@ -516,6 +544,7 @@ int main(int argc, char **argv) { test_unused_reclaim_is_cancelled(); test_benign_reclaim_is_preferred(); test_multiple_reclaims_can_be_triggered(); + test_buffer_user_stays_allocated_until_memory_released(); grpc_shutdown(); return 0; } diff --git a/test/core/util/mock_endpoint.c b/test/core/util/mock_endpoint.c index 173a2d8963..e4c478281f 100644 --- a/test/core/util/mock_endpoint.c +++ b/test/core/util/mock_endpoint.c @@ -95,7 +95,7 @@ static void me_really_destroy(grpc_exec_ctx *exec_ctx, void *mp, static void me_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_mock_endpoint *m = (grpc_mock_endpoint *)ep; - grpc_buffer_user_destroy(exec_ctx, &m->buffer_user, + grpc_buffer_user_shutdown(exec_ctx, &m->buffer_user, grpc_closure_create(me_really_destroy, m)); } diff --git a/test/core/util/passthru_endpoint.c b/test/core/util/passthru_endpoint.c index 239cd3e275..bdf75ce587 100644 --- a/test/core/util/passthru_endpoint.c +++ b/test/core/util/passthru_endpoint.c @@ -140,7 +140,7 @@ static void me_really_destroy(grpc_exec_ctx *exec_ctx, void *ep, static void me_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { half *m = (half *)ep; - grpc_buffer_user_destroy(exec_ctx, &m->buffer_user, + grpc_buffer_user_shutdown(exec_ctx, &m->buffer_user, grpc_closure_create(me_really_destroy, m)); } -- cgit v1.2.3 From 579acc351b3329da7d23b05cc87d979551c08689 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 26 Sep 2016 13:31:26 -0700 Subject: Ensure all memory is released back to the buffer pool --- src/core/lib/iomgr/buffer_pool.c | 6 +++++ test/core/iomgr/buffer_pool_test.c | 46 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/buffer_pool.c b/src/core/lib/iomgr/buffer_pool.c index 16445a4265..699e7078db 100644 --- a/src/core/lib/iomgr/buffer_pool.c +++ b/src/core/lib/iomgr/buffer_pool.c @@ -153,12 +153,14 @@ static void bpstep(grpc_exec_ctx *exec_ctx, void *bp, grpc_error *error) { } while (bpscavenge(exec_ctx, buffer_pool)); bpreclaim(exec_ctx, buffer_pool, false) || bpreclaim(exec_ctx, buffer_pool, true); + grpc_buffer_pool_internal_unref(exec_ctx, buffer_pool); } static void bpstep_sched(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool) { if (buffer_pool->step_scheduled) return; buffer_pool->step_scheduled = true; + grpc_buffer_pool_internal_ref(buffer_pool); grpc_combiner_execute_finally(exec_ctx, buffer_pool->combiner, &buffer_pool->bpstep_closure, GRPC_ERROR_NONE, false); @@ -329,6 +331,10 @@ static void bu_destroy(grpc_exec_ctx *exec_ctx, void *bu, grpc_error *error) { GRPC_ERROR_CANCELLED, NULL); grpc_exec_ctx_sched(exec_ctx, buffer_user->on_done_destroy, GRPC_ERROR_NONE, NULL); + if (buffer_user->free_pool != 0) { + buffer_user->buffer_pool->free_pool += buffer_user->free_pool; + bpstep_sched(exec_ctx, buffer_user->buffer_pool); + } grpc_buffer_pool_internal_unref(exec_ctx, buffer_user->buffer_pool); } diff --git a/test/core/iomgr/buffer_pool_test.c b/test/core/iomgr/buffer_pool_test.c index 265ece72ac..9d30781c31 100644 --- a/test/core/iomgr/buffer_pool_test.c +++ b/test/core/iomgr/buffer_pool_test.c @@ -524,6 +524,51 @@ static void test_buffer_user_stays_allocated_until_memory_released(void) { grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(done); } + grpc_buffer_pool_unref(p); +} + +static void test_pools_merged_on_buffer_user_deletion(void) { + gpr_log(GPR_INFO, "** test_pools_merged_on_buffer_user_deletion **"); + grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool_resize(p, 1024); + for (int i = 0; i < 10; i++) { + grpc_buffer_user usr; + grpc_buffer_user_init(&usr, p); + bool done = false; + bool reclaimer_cancelled = false; + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_post_reclaimer( + &exec_ctx, &usr, false, + make_unused_reclaimer(set_bool(&reclaimer_cancelled))); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(!reclaimer_cancelled); + } + { + bool allocated = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_alloc(&exec_ctx, &usr, 1024, set_bool(&allocated)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(allocated); + GPR_ASSERT(!reclaimer_cancelled); + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_pool_unref(p); + grpc_buffer_user_shutdown(&exec_ctx, &usr, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(!done); + GPR_ASSERT(!reclaimer_cancelled); + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_free(&exec_ctx, &usr, 1024); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(done); + GPR_ASSERT(reclaimer_cancelled); + } + } + grpc_buffer_pool_unref(p); } int main(int argc, char **argv) { @@ -545,6 +590,7 @@ int main(int argc, char **argv) { test_benign_reclaim_is_preferred(); test_multiple_reclaims_can_be_triggered(); test_buffer_user_stays_allocated_until_memory_released(); + test_pools_merged_on_buffer_user_deletion(); grpc_shutdown(); return 0; } -- cgit v1.2.3 From aa850a7b48ac78f9b86e036b448519ec579c440b Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 26 Sep 2016 13:38:02 -0700 Subject: Pass path into init_call_elem() for use in looking up method config. --- src/core/ext/client_config/client_channel.c | 52 +++++++++++------------------ src/core/ext/client_config/subchannel.c | 4 +-- src/core/ext/client_config/subchannel.h | 3 +- src/core/lib/channel/channel_stack.c | 3 +- src/core/lib/channel/channel_stack.h | 3 +- src/core/lib/channel/deadline_filter.c | 20 +++++++++-- src/core/lib/channel/deadline_filter.h | 5 ++- src/core/lib/surface/call.c | 8 ++++- 8 files changed, 56 insertions(+), 42 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/client_config/client_channel.c b/src/core/ext/client_config/client_channel.c index 87e3a1a63a..e61d253480 100644 --- a/src/core/ext/client_config/client_channel.c +++ b/src/core/ext/client_config/client_channel.c @@ -421,6 +421,9 @@ typedef struct client_channel_call_data { grpc_deadline_state deadline_state; gpr_timespec deadline; + // Request path. + grpc_mdstr *path; + grpc_error *cancel_error; /** either 0 for no call, 1 for cancelled, or a pointer to a @@ -433,9 +436,6 @@ typedef struct client_channel_call_data { grpc_connected_subchannel *connected_subchannel; grpc_polling_entity *pollent; - grpc_mdstr *path; - grpc_method_config *method_config; - grpc_transport_stream_op **waiting_ops; size_t waiting_ops_count; size_t waiting_ops_capacity; @@ -511,9 +511,7 @@ static void retry_waiting_locked(grpc_exec_ctx *exec_ctx, call_data *calld) { static void subchannel_ready(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { - grpc_call_element *elem = arg; - call_data *calld = elem->call_data; - channel_data *chand = elem->channel_data; + call_data *calld = arg; gpr_mu_lock(&calld->mu); GPR_ASSERT(calld->creation_phase == GRPC_SUBCHANNEL_CALL_HOLDER_PICKING_SUBCHANNEL); @@ -528,18 +526,11 @@ static void subchannel_ready(grpc_exec_ctx *exec_ctx, void *arg, GRPC_ERROR_CREATE_REFERENCING( "Cancelled before creating subchannel", &error, 1)); } else { - /* Get method config. */ -// FIXME: need to actually use the config data! -// FIXME: think about refcounting vs. atomicity here - if (chand->method_config_table != NULL) { - calld->method_config = grpc_method_config_table_get_method_config( - chand->method_config_table, calld->path); - } /* Create call on subchannel. */ grpc_subchannel_call *subchannel_call = NULL; grpc_error *new_error = grpc_connected_subchannel_create_call( - exec_ctx, calld->connected_subchannel, calld->pollent, calld->deadline, - &subchannel_call); + exec_ctx, calld->connected_subchannel, calld->pollent, calld->path, + calld->deadline, &subchannel_call); if (new_error != GRPC_ERROR_NONE) { new_error = grpc_error_add_child(new_error, error); subchannel_call = CANCELLED_CALL; @@ -745,15 +736,8 @@ retry: if (calld->creation_phase == GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING && calld->connected_subchannel == NULL && op->send_initial_metadata != NULL) { - for (grpc_linked_mdelem *mdelem = op->send_initial_metadata->list.head; - mdelem != NULL; mdelem = mdelem->next) { - if (mdelem->md->key == GRPC_MDSTR_PATH) { - calld->path = GRPC_MDSTR_REF(mdelem->md->value); - break; - } - } calld->creation_phase = GRPC_SUBCHANNEL_CALL_HOLDER_PICKING_SUBCHANNEL; - grpc_closure_init(&calld->next_step, subchannel_ready, elem); + grpc_closure_init(&calld->next_step, subchannel_ready, calld); GRPC_CALL_STACK_REF(calld->owning_call, "pick_subchannel"); if (pick_subchannel(exec_ctx, elem, op->send_initial_metadata, op->send_initial_metadata_flags, @@ -768,8 +752,8 @@ retry: calld->connected_subchannel != NULL) { grpc_subchannel_call *subchannel_call = NULL; grpc_error *error = grpc_connected_subchannel_create_call( - exec_ctx, calld->connected_subchannel, calld->pollent, calld->deadline, - &subchannel_call); + exec_ctx, calld->connected_subchannel, calld->pollent, calld->path, + calld->deadline, &subchannel_call); if (error != GRPC_ERROR_NONE) { subchannel_call = CANCELLED_CALL; fail_locked(exec_ctx, calld, GRPC_ERROR_REF(error)); @@ -790,15 +774,22 @@ retry: static grpc_error *cc_init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_call_element_args *args) { + channel_data *chand = elem->channel_data; call_data *calld = elem->call_data; - grpc_deadline_state_init(exec_ctx, elem, args); + gpr_mu_lock(&chand->mu); + grpc_method_config_table *method_config_table = + chand->method_config_table == NULL + ? NULL + : grpc_method_config_table_ref(chand->method_config_table); + gpr_mu_unlock(&chand->mu); + grpc_deadline_state_init(exec_ctx, elem, args, method_config_table); + grpc_method_config_table_unref(chand->method_config_table); calld->deadline = args->deadline; + calld->path = GRPC_MDSTR_REF(args->path); calld->cancel_error = GRPC_ERROR_NONE; gpr_atm_rel_store(&calld->subchannel_call, 0); gpr_mu_init(&calld->mu); calld->connected_subchannel = NULL; - calld->path = NULL; - calld->method_config = NULL; calld->waiting_ops = NULL; calld->waiting_ops_count = 0; calld->waiting_ops_capacity = 0; @@ -815,11 +806,8 @@ static void cc_destroy_call_elem(grpc_exec_ctx *exec_ctx, void *and_free_memory) { call_data *calld = elem->call_data; grpc_deadline_state_destroy(exec_ctx, elem); + GRPC_MDSTR_UNREF(calld->path); GRPC_ERROR_UNREF(calld->cancel_error); - -// FIXME: remove - if (calld->path != NULL) GRPC_MDSTR_UNREF(calld->path); - grpc_subchannel_call *call = GET_CALL(calld); if (call != NULL && call != CANCELLED_CALL) { GRPC_SUBCHANNEL_CALL_UNREF(exec_ctx, call, "client_channel_destroy_call"); diff --git a/src/core/ext/client_config/subchannel.c b/src/core/ext/client_config/subchannel.c index f2b860807f..6674dbbe68 100644 --- a/src/core/ext/client_config/subchannel.c +++ b/src/core/ext/client_config/subchannel.c @@ -700,7 +700,7 @@ grpc_connected_subchannel *grpc_subchannel_get_connected_subchannel( grpc_error *grpc_connected_subchannel_create_call( grpc_exec_ctx *exec_ctx, grpc_connected_subchannel *con, - grpc_polling_entity *pollent, gpr_timespec deadline, + grpc_polling_entity *pollent, grpc_mdstr *path, gpr_timespec deadline, grpc_subchannel_call **call) { grpc_channel_stack *chanstk = CHANNEL_STACK_FROM_CONNECTION(con); *call = gpr_malloc(sizeof(grpc_subchannel_call) + chanstk->call_stack_size); @@ -708,7 +708,7 @@ grpc_error *grpc_connected_subchannel_create_call( (*call)->connection = con; // Ref is added below. grpc_error *error = grpc_call_stack_init(exec_ctx, chanstk, 1, subchannel_call_destroy, *call, - NULL, NULL, deadline, callstk); + NULL, NULL, path, deadline, callstk); if (error != GRPC_ERROR_NONE) { const char *error_string = grpc_error_string(error); gpr_log(GPR_ERROR, "error: %s", error_string); diff --git a/src/core/ext/client_config/subchannel.h b/src/core/ext/client_config/subchannel.h index 3330621071..f8de26dfd5 100644 --- a/src/core/ext/client_config/subchannel.h +++ b/src/core/ext/client_config/subchannel.h @@ -38,6 +38,7 @@ #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/iomgr/polling_entity.h" #include "src/core/lib/transport/connectivity_state.h" +#include "src/core/lib/transport/metadata.h" /** A (sub-)channel that knows how to connect to exactly one target address. Provides a target for load balancing. */ @@ -110,7 +111,7 @@ void grpc_subchannel_call_unref(grpc_exec_ctx *exec_ctx, /** construct a subchannel call */ grpc_error *grpc_connected_subchannel_create_call( grpc_exec_ctx *exec_ctx, grpc_connected_subchannel *connected_subchannel, - grpc_polling_entity *pollent, gpr_timespec deadline, + grpc_polling_entity *pollent, grpc_mdstr *path, gpr_timespec deadline, grpc_subchannel_call **subchannel_call); /** process a transport level op */ diff --git a/src/core/lib/channel/channel_stack.c b/src/core/lib/channel/channel_stack.c index 57d34d9e9a..205496f2f2 100644 --- a/src/core/lib/channel/channel_stack.c +++ b/src/core/lib/channel/channel_stack.c @@ -162,7 +162,7 @@ grpc_error *grpc_call_stack_init( grpc_exec_ctx *exec_ctx, grpc_channel_stack *channel_stack, int initial_refs, grpc_iomgr_cb_func destroy, void *destroy_arg, grpc_call_context_element *context, const void *transport_server_data, - gpr_timespec deadline, grpc_call_stack *call_stack) { + grpc_mdstr *path, gpr_timespec deadline, grpc_call_stack *call_stack) { grpc_channel_element *channel_elems = CHANNEL_ELEMS_FROM_STACK(channel_stack); grpc_call_element_args args; size_t count = channel_stack->count; @@ -183,6 +183,7 @@ grpc_error *grpc_call_stack_init( args.call_stack = call_stack; args.server_transport_data = transport_server_data; args.context = context; + args.path = path; args.deadline = deadline; call_elems[i].filter = channel_elems[i].filter; call_elems[i].channel_data = channel_elems[i].channel_data; diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h index 1cfe2885d8..5b46cd32a3 100644 --- a/src/core/lib/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -74,6 +74,7 @@ typedef struct { grpc_call_stack *call_stack; const void *server_transport_data; grpc_call_context_element *context; + grpc_mdstr *path; gpr_timespec deadline; } grpc_call_element_args; @@ -225,7 +226,7 @@ grpc_error *grpc_call_stack_init( grpc_exec_ctx *exec_ctx, grpc_channel_stack *channel_stack, int initial_refs, grpc_iomgr_cb_func destroy, void *destroy_arg, grpc_call_context_element *context, const void *transport_server_data, - gpr_timespec deadline, grpc_call_stack *call_stack); + grpc_mdstr *path, gpr_timespec deadline, grpc_call_stack *call_stack); /* Set a pollset or a pollset_set for a call stack: must occur before the first * op is started */ void grpc_call_stack_set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx, diff --git a/src/core/lib/channel/deadline_filter.c b/src/core/lib/channel/deadline_filter.c index 079b98a2f8..89dc8dd6e8 100644 --- a/src/core/lib/channel/deadline_filter.c +++ b/src/core/lib/channel/deadline_filter.c @@ -123,15 +123,28 @@ static void start_timer_after_init(grpc_exec_ctx* exec_ctx, void* arg, } void grpc_deadline_state_init(grpc_exec_ctx* exec_ctx, grpc_call_element* elem, - grpc_call_element_args* args) { + grpc_call_element_args* args, + grpc_method_config_table* method_config_table) { grpc_deadline_state* deadline_state = elem->call_data; memset(deadline_state, 0, sizeof(*deadline_state)); deadline_state->call_stack = args->call_stack; gpr_mu_init(&deadline_state->timer_mu); // Deadline will always be infinite on servers, so the timer will only be // set on clients with a finite deadline. - const gpr_timespec deadline = + gpr_timespec deadline = gpr_convert_clock_type(args->deadline, GPR_CLOCK_MONOTONIC); + if (method_config_table != NULL) { + grpc_method_config* method_config = + grpc_method_config_table_get_method_config(method_config_table, + args->path); + if (method_config != NULL) { + gpr_timespec* per_method_deadline = + grpc_method_config_get_timeout(method_config); + if (per_method_deadline != NULL) { + deadline = gpr_time_min(deadline, *per_method_deadline); + } + } + } if (gpr_time_cmp(deadline, gpr_inf_future(GPR_CLOCK_MONOTONIC)) != 0) { // When the deadline passes, we indicate the failure by sending down // an op with cancel_error set. However, we can't send down any ops @@ -209,7 +222,8 @@ static grpc_error* init_call_elem(grpc_exec_ctx* exec_ctx, grpc_call_element_args* args) { // Note: size of call data is different between client and server. memset(elem->call_data, 0, elem->filter->sizeof_call_data); - grpc_deadline_state_init(exec_ctx, elem, args); + grpc_deadline_state_init(exec_ctx, elem, args, + NULL /* method_config_table */); return GRPC_ERROR_NONE; } diff --git a/src/core/lib/channel/deadline_filter.h b/src/core/lib/channel/deadline_filter.h index 685df87761..2fcee0b9ef 100644 --- a/src/core/lib/channel/deadline_filter.h +++ b/src/core/lib/channel/deadline_filter.h @@ -35,6 +35,8 @@ #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/iomgr/timer.h" +#include "src/core/ext/client_config/method_config.h" + // State used for filters that enforce call deadlines. // Must be the first field in the filter's call_data. typedef struct grpc_deadline_state { @@ -63,7 +65,8 @@ typedef struct grpc_deadline_state { // caller's responsibility to chain to the next filter if necessary // after the function returns. void grpc_deadline_state_init(grpc_exec_ctx* exec_ctx, grpc_call_element* elem, - grpc_call_element_args* args); + grpc_call_element_args* args, + grpc_method_config_table* method_config_table); void grpc_deadline_state_destroy(grpc_exec_ctx* exec_ctx, grpc_call_element* elem); void grpc_deadline_state_client_start_transport_stream_op( diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 5690bcab1e..0af72547e3 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -242,10 +242,14 @@ grpc_call *grpc_call_create( /* Always support no compression */ GPR_BITSET(&call->encodings_accepted_by_peer, GRPC_COMPRESS_NONE); call->is_client = server_transport_data == NULL; + grpc_mdstr *path = NULL; if (call->is_client) { GPR_ASSERT(add_initial_metadata_count < MAX_SEND_EXTRA_METADATA_COUNT); for (i = 0; i < add_initial_metadata_count; i++) { call->send_extra_metadata[i].md = add_initial_metadata[i]; + if (add_initial_metadata[i]->key == GRPC_MDSTR_PATH) { + path = GRPC_MDSTR_REF(add_initial_metadata[i]->value); + } } call->send_extra_metadata_count = (int)add_initial_metadata_count; } else { @@ -307,7 +311,7 @@ grpc_call *grpc_call_create( /* initial refcount dropped by grpc_call_destroy */ grpc_error *error = grpc_call_stack_init( &exec_ctx, channel_stack, 1, destroy_call, call, call->context, - server_transport_data, send_deadline, CALL_STACK_FROM_CALL(call)); + server_transport_data, path, send_deadline, CALL_STACK_FROM_CALL(call)); if (error != GRPC_ERROR_NONE) { grpc_status_code status; const char *error_str; @@ -332,6 +336,8 @@ grpc_call *grpc_call_create( &exec_ctx, CALL_STACK_FROM_CALL(call), &call->pollent); } + if (path != NULL) GRPC_MDSTR_UNREF(path); + grpc_exec_ctx_finish(&exec_ctx); GPR_TIMER_END("grpc_call_create", 0); return call; -- cgit v1.2.3 From 77c6ccef18b43812fd15ebe21e942fefe6b17f08 Mon Sep 17 00:00:00 2001 From: Michael Lumish Date: Mon, 26 Sep 2016 13:51:57 -0700 Subject: Updated changes for Windows, removed unistd.h from test files --- src/core/lib/iomgr/resolve_address_windows.c | 2 +- src/core/lib/iomgr/tcp_server_windows.c | 69 +++++++++++++------------- test/core/end2end/fixtures/h2_full+trace.c | 1 - test/core/end2end/fixtures/h2_sockpair+trace.c | 1 - test/core/util/port_windows.c | 2 + 5 files changed, 38 insertions(+), 37 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/resolve_address_windows.c b/src/core/lib/iomgr/resolve_address_windows.c index 6e94269d28..e139293c03 100644 --- a/src/core/lib/iomgr/resolve_address_windows.c +++ b/src/core/lib/iomgr/resolve_address_windows.c @@ -125,7 +125,7 @@ static grpc_error *blocking_resolve_address_impl( { for (i = 0; i < (*addresses)->naddrs; i++) { char *buf; - grpc_sockaddr_to_string(&buf, (*addresses)->addrs[i], 0); + grpc_sockaddr_to_string(&buf, &(*addresses)->addrs[i], 0); gpr_free(buf); } } diff --git a/src/core/lib/iomgr/tcp_server_windows.c b/src/core/lib/iomgr/tcp_server_windows.c index b84a109537..0e2a52bdfc 100644 --- a/src/core/lib/iomgr/tcp_server_windows.c +++ b/src/core/lib/iomgr/tcp_server_windows.c @@ -35,9 +35,9 @@ #ifdef GRPC_WINSOCK_SOCKET -#include +#include "src/core/lib/iomgr/sockaddr.h" -#include "src/core/lib/iomgr/sockaddr_utils.h" +#include #include #include @@ -48,6 +48,8 @@ #include "src/core/lib/iomgr/iocp_windows.h" #include "src/core/lib/iomgr/pollset_windows.h" +#include "src/core/lib/iomgr/resolve_address.h" +#include "src/core/lib/iomgr/sockaddr_utils.h" #include "src/core/lib/iomgr/socket_windows.h" #include "src/core/lib/iomgr/tcp_server.h" #include "src/core/lib/iomgr/tcp_windows.h" @@ -191,10 +193,10 @@ void grpc_tcp_server_unref(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { } /* Prepare (bind) a recently-created socket for listening. */ -static grpc_error *prepare_socket(SOCKET sock, const struct sockaddr *addr, - size_t addr_len, int *port) { - struct sockaddr_storage sockname_temp; - socklen_t sockname_len; +static grpc_error *prepare_socket(SOCKET sock, const grpc_resolved_address *addr, + int *port) { + + grpc_resolved_address sockname_temp; grpc_error *error = GRPC_ERROR_NONE; error = grpc_tcp_prepare_socket(sock); @@ -202,7 +204,7 @@ static grpc_error *prepare_socket(SOCKET sock, const struct sockaddr *addr, goto failure; } - if (bind(sock, addr, (int)addr_len) == SOCKET_ERROR) { + if (bind(sock, (const struct sockaddr *)addr->addr, (int)addr->len) == SOCKET_ERROR) { error = GRPC_WSA_ERROR(WSAGetLastError(), "bind"); goto failure; } @@ -212,14 +214,14 @@ static grpc_error *prepare_socket(SOCKET sock, const struct sockaddr *addr, goto failure; } - sockname_len = sizeof(sockname_temp); - if (getsockname(sock, (struct sockaddr *)&sockname_temp, &sockname_len) == + sockname_temp.len = sizeof(struct sockaddr_storage); + if (getsockname(sock, (struct sockaddr *)sockname_temp.addr, &sockname_temp.len) == SOCKET_ERROR) { error = GRPC_WSA_ERROR(WSAGetLastError(), "getsockname"); goto failure; } - *port = grpc_sockaddr_get_port((struct sockaddr *)&sockname_temp); + *port = grpc_sockaddr_get_port(&sockname_temp); return GRPC_ERROR_NONE; failure: @@ -315,15 +317,16 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { SOCKET sock = sp->new_socket; grpc_winsocket_callback_info *info = &sp->socket->read_info; grpc_endpoint *ep = NULL; - struct sockaddr_storage peer_name; + grpc_resolved_address peer_name; char *peer_name_string; char *fd_name; - int peer_name_len = sizeof(peer_name); DWORD transfered_bytes; DWORD flags; BOOL wsa_success; int err; + peer_name.len = sizeof(struct sockaddr_storage); + /* The general mechanism for shutting down is to queue abortion calls. While this is necessary in the read/write case, it's useless for the accept case. We only need to adjust the pending callback count */ @@ -361,9 +364,9 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { gpr_log(GPR_ERROR, "setsockopt error: %s", utf8_message); gpr_free(utf8_message); } - err = getpeername(sock, (struct sockaddr *)&peer_name, &peer_name_len); + err = getpeername(sock, (struct sockaddr *)peer_name.addr, &peer_name.len); if (!err) { - peer_name_string = grpc_sockaddr_to_uri((struct sockaddr *)&peer_name); + peer_name_string = grpc_sockaddr_to_uri(&peer_name); } else { char *utf8_message = gpr_format_message(WSAGetLastError()); gpr_log(GPR_ERROR, "getpeername error: %s", utf8_message); @@ -393,8 +396,8 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { } static grpc_error *add_socket_to_server(grpc_tcp_server *s, SOCKET sock, - const struct sockaddr *addr, - size_t addr_len, unsigned port_index, + const grpc_resolved_address *addr, + unsigned port_index, grpc_tcp_listener **listener) { grpc_tcp_listener *sp = NULL; int port = -1; @@ -418,7 +421,7 @@ static grpc_error *add_socket_to_server(grpc_tcp_server *s, SOCKET sock, return NULL; } - error = prepare_socket(sock, addr, addr_len, &port); + error = prepare_socket(sock, addr, &port); if (error != GRPC_ERROR_NONE) { return error; } @@ -449,15 +452,15 @@ static grpc_error *add_socket_to_server(grpc_tcp_server *s, SOCKET sock, return GRPC_ERROR_NONE; } -grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, - size_t addr_len, int *port) { +grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s, + const grpc_resolved_address *addr, + int *port) { grpc_tcp_listener *sp = NULL; SOCKET sock; - struct sockaddr_in6 addr6_v4mapped; - struct sockaddr_in6 wildcard; - struct sockaddr *allocated_addr = NULL; - struct sockaddr_storage sockname_temp; - socklen_t sockname_len; + grpc_resolved_address addr6_v4mapped; + grpc_resolved_address wildcard; + grpc_resolved_address *allocated_addr = NULL; + grpc_resolved_address sockname_temp; unsigned port_index = 0; grpc_error *error = GRPC_ERROR_NONE; @@ -469,13 +472,13 @@ grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, as some previously created listener. */ if (grpc_sockaddr_get_port(addr) == 0) { for (sp = s->head; sp; sp = sp->next) { - sockname_len = sizeof(sockname_temp); + sockname_temp.len = sizeof(struct sockaddr_storage); if (0 == getsockname(sp->socket->socket, - (struct sockaddr *)&sockname_temp, &sockname_len)) { - *port = grpc_sockaddr_get_port((struct sockaddr *)&sockname_temp); + (struct sockaddr *)sockname_temp.addr, &sockname_temp.len)) { + *port = grpc_sockaddr_get_port(&sockname_temp); if (*port > 0) { - allocated_addr = gpr_malloc(addr_len); - memcpy(allocated_addr, addr, addr_len); + allocated_addr = gpr_malloc(sizeof(grpc_resolved_address)); + memcpy(allocated_addr, addr, sizeof(grpc_resolved_address)); grpc_sockaddr_set_port(allocated_addr, *port); addr = allocated_addr; break; @@ -485,16 +488,14 @@ grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, } if (grpc_sockaddr_to_v4mapped(addr, &addr6_v4mapped)) { - addr = (const struct sockaddr *)&addr6_v4mapped; - addr_len = sizeof(addr6_v4mapped); + addr = &addr6_v4mapped; } /* Treat :: or 0.0.0.0 as a family-agnostic wildcard. */ if (grpc_sockaddr_is_wildcard(addr, port)) { grpc_sockaddr_make_wildcard6(*port, &wildcard); - addr = (struct sockaddr *)&wildcard; - addr_len = sizeof(wildcard); + addr = &wildcard; } sock = WSASocket(AF_INET6, SOCK_STREAM, IPPROTO_TCP, NULL, 0, @@ -504,7 +505,7 @@ grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, goto done; } - error = add_socket_to_server(s, sock, addr, addr_len, port_index, &sp); + error = add_socket_to_server(s, sock, addr, port_index, &sp); done: gpr_free(allocated_addr); diff --git a/test/core/end2end/fixtures/h2_full+trace.c b/test/core/end2end/fixtures/h2_full+trace.c index 46582e3190..e25b5e3347 100644 --- a/test/core/end2end/fixtures/h2_full+trace.c +++ b/test/core/end2end/fixtures/h2_full+trace.c @@ -34,7 +34,6 @@ #include "test/core/end2end/end2end_tests.h" #include -#include #include #include diff --git a/test/core/end2end/fixtures/h2_sockpair+trace.c b/test/core/end2end/fixtures/h2_sockpair+trace.c index 356a359784..d0925e5109 100644 --- a/test/core/end2end/fixtures/h2_sockpair+trace.c +++ b/test/core/end2end/fixtures/h2_sockpair+trace.c @@ -34,7 +34,6 @@ #include "test/core/end2end/end2end_tests.h" #include -#include #include #include diff --git a/test/core/util/port_windows.c b/test/core/util/port_windows.c index db9787dec6..0c50a46644 100644 --- a/test/core/util/port_windows.c +++ b/test/core/util/port_windows.c @@ -35,6 +35,8 @@ #include "test/core/util/test_config.h" #if defined(GRPC_WINSOCK_SOCKET) && defined(GRPC_TEST_PICK_PORT) +#include "src/core/lib/iomgr/sockaddr.h" + #include "test/core/util/port.h" #include -- cgit v1.2.3 From dedb923b6e8c5dc01cf711df4901b7bceb427789 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 26 Sep 2016 13:54:04 -0700 Subject: Clang format --- .../ext/client_config/initial_connect_string.c | 4 +- .../ext/client_config/initial_connect_string.h | 4 +- src/core/ext/client_config/parse_address.c | 6 +-- src/core/ext/client_config/subchannel.c | 3 +- src/core/ext/lb_policy/grpclb/grpclb.c | 7 ++-- src/core/ext/resolver/sockaddr/sockaddr_resolver.c | 7 ++-- .../chttp2/client/insecure/channel_create.c | 3 +- .../chttp2/client/secure/secure_channel_create.c | 6 +-- src/core/lib/http/httpcli.c | 5 +-- src/core/lib/iomgr/iomgr_uv.c | 4 +- src/core/lib/iomgr/pollset_set_windows.c | 2 +- src/core/lib/iomgr/pollset_uv.c | 10 ++--- src/core/lib/iomgr/port.h | 2 +- src/core/lib/iomgr/resolve_address_uv.c | 13 ++---- src/core/lib/iomgr/sockaddr_utils.c | 24 +++++++---- src/core/lib/iomgr/socket_utils_common_posix.c | 8 ++-- src/core/lib/iomgr/socket_utils_linux.c | 7 ++-- src/core/lib/iomgr/socket_utils_posix.c | 7 ++-- src/core/lib/iomgr/socket_utils_posix.h | 8 ++-- src/core/lib/iomgr/tcp_client_posix.c | 3 +- src/core/lib/iomgr/tcp_client_uv.c | 15 +++---- src/core/lib/iomgr/tcp_client_windows.c | 7 ++-- src/core/lib/iomgr/tcp_server_posix.c | 10 ++--- src/core/lib/iomgr/tcp_server_uv.c | 31 +++++++------- src/core/lib/iomgr/tcp_server_windows.c | 19 +++++---- src/core/lib/iomgr/tcp_uv.c | 47 +++++++++++----------- src/core/lib/iomgr/timer_uv.c | 12 +++--- src/core/lib/iomgr/unix_sockets_posix.c | 9 +++-- src/core/lib/iomgr/unix_sockets_posix.h | 6 ++- src/core/lib/tsi/ssl_transport_security.c | 2 +- test/core/end2end/fixtures/http_proxy.c | 2 +- test/core/iomgr/sockaddr_utils_test.c | 7 ++-- test/core/iomgr/tcp_client_posix_test.c | 6 ++- test/core/iomgr/tcp_server_posix_test.c | 27 ++++++++----- test/core/surface/concurrent_connectivity_test.c | 3 +- test/core/util/test_tcp_server.c | 4 +- 36 files changed, 173 insertions(+), 167 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/client_config/initial_connect_string.c b/src/core/ext/client_config/initial_connect_string.c index 61683dd635..ae54e2d016 100644 --- a/src/core/ext/client_config/initial_connect_string.c +++ b/src/core/ext/client_config/initial_connect_string.c @@ -35,8 +35,8 @@ #include -extern void grpc_set_default_initial_connect_string(grpc_resolved_address **addr, - gpr_slice *initial_str); +extern void grpc_set_default_initial_connect_string( + grpc_resolved_address **addr, gpr_slice *initial_str); static grpc_set_initial_connect_string_func g_set_initial_connect_string_func = grpc_set_default_initial_connect_string; diff --git a/src/core/ext/client_config/initial_connect_string.h b/src/core/ext/client_config/initial_connect_string.h index 6d5301fde5..44ddc3af9d 100644 --- a/src/core/ext/client_config/initial_connect_string.h +++ b/src/core/ext/client_config/initial_connect_string.h @@ -38,8 +38,8 @@ #include "src/core/lib/iomgr/resolve_address.h" -typedef void (*grpc_set_initial_connect_string_func)(grpc_resolved_address **addr, - gpr_slice *initial_str); +typedef void (*grpc_set_initial_connect_string_func)( + grpc_resolved_address **addr, gpr_slice *initial_str); void grpc_test_set_initial_connect_string_function( grpc_set_initial_connect_string_func func); diff --git a/src/core/ext/client_config/parse_address.c b/src/core/ext/client_config/parse_address.c index 13f1f4da97..785e6bec51 100644 --- a/src/core/ext/client_config/parse_address.c +++ b/src/core/ext/client_config/parse_address.c @@ -31,8 +31,8 @@ * */ -#include "src/core/lib/iomgr/sockaddr.h" #include "src/core/ext/client_config/parse_address.h" +#include "src/core/lib/iomgr/sockaddr.h" #include #include @@ -59,9 +59,7 @@ int parse_unix(grpc_uri *uri, grpc_resolved_address *resolved_addr) { #else /* GRPC_HAVE_UNIX_SOCKET */ -int parse_unix(grpc_uri *uri, grpc_resolved_address *resolved_addr) { - abort(); -} +int parse_unix(grpc_uri *uri, grpc_resolved_address *resolved_addr) { abort(); } #endif /* GRPC_HAVE_UNIX_SOCKET */ diff --git a/src/core/ext/client_config/subchannel.c b/src/core/ext/client_config/subchannel.c index 66feac65c3..6818e92404 100644 --- a/src/core/ext/client_config/subchannel.c +++ b/src/core/ext/client_config/subchannel.c @@ -320,7 +320,8 @@ grpc_subchannel *grpc_subchannel_create(grpc_exec_ctx *exec_ctx, c->filters = NULL; } c->addr = gpr_malloc(sizeof(grpc_resolved_address)); - if (args->addr->len) memcpy(c->addr, args->addr, sizeof(grpc_resolved_address)); + if (args->addr->len) + memcpy(c->addr, args->addr, sizeof(grpc_resolved_address)); c->pollset_set = grpc_pollset_set_create(); grpc_set_initial_connect_string(&c->addr, &c->initial_connect_string); c->args = grpc_channel_args_copy(args->args); diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index 8a2fe6d72e..8f8eaffcb4 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -582,13 +582,12 @@ static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx, } if (args->addresses->addresses[i].is_balancer) { if (addr_index == 0) { - addr_strs[addr_index++] = grpc_sockaddr_to_uri( - &args->addresses->addresses[i].address); + addr_strs[addr_index++] = + grpc_sockaddr_to_uri(&args->addresses->addresses[i].address); } else { GPR_ASSERT(grpc_sockaddr_to_string( &addr_strs[addr_index++], - &args->addresses->addresses[i].address, - true) == 0); + &args->addresses->addresses[i].address, true) == 0); } } } diff --git a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c index 446586e33b..a58dab10fc 100644 --- a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c +++ b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c @@ -161,9 +161,10 @@ char *unix_get_default_authority(grpc_resolver_factory *factory, static void do_nothing(void *ignored) {} -static grpc_resolver *sockaddr_create( - grpc_resolver_args *args, const char *default_lb_policy_name, - int parse(grpc_uri *uri, grpc_resolved_address *dst)) { +static grpc_resolver *sockaddr_create(grpc_resolver_args *args, + const char *default_lb_policy_name, + int parse(grpc_uri *uri, + grpc_resolved_address *dst)) { bool errors_found = false; sockaddr_resolver *r; gpr_slice path_slice; diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index 0d34247ae3..e3c68f6c00 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -150,8 +150,7 @@ static void connector_connect(grpc_exec_ctx *exec_ctx, grpc_connector *con, c->tcp = NULL; grpc_closure_init(&c->connected, connected, c); grpc_tcp_client_connect(exec_ctx, &c->connected, &c->tcp, - args->interested_parties, args->addr, - args->deadline); + args->interested_parties, args->addr, args->deadline); } static const grpc_connector_vtable connector_vtable = { diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index 4240827c29..1285eb3f8b 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -208,9 +208,9 @@ static void connector_connect(grpc_exec_ctx *exec_ctx, grpc_connector *con, GPR_ASSERT(c->connecting_endpoint == NULL); gpr_mu_unlock(&c->mu); grpc_closure_init(&c->connected_closure, connected, c); - grpc_tcp_client_connect( - exec_ctx, &c->connected_closure, &c->newly_connecting_endpoint, - args->interested_parties, args->addr, args->deadline); + grpc_tcp_client_connect(exec_ctx, &c->connected_closure, + &c->newly_connecting_endpoint, + args->interested_parties, args->addr, args->deadline); } static const grpc_connector_vtable connector_vtable = { diff --git a/src/core/lib/http/httpcli.c b/src/core/lib/http/httpcli.c index a7c70e2091..55de1b5990 100644 --- a/src/core/lib/http/httpcli.c +++ b/src/core/lib/http/httpcli.c @@ -223,9 +223,8 @@ static void next_address(grpc_exec_ctx *exec_ctx, internal_request *req, } addr = &req->addresses->addrs[req->next_address++]; grpc_closure_init(&req->connected, on_connected, req); - grpc_tcp_client_connect( - exec_ctx, &req->connected, &req->ep, req->context->pollset_set, - addr, req->deadline); + grpc_tcp_client_connect(exec_ctx, &req->connected, &req->ep, + req->context->pollset_set, addr, req->deadline); } static void on_resolved(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { diff --git a/src/core/lib/iomgr/iomgr_uv.c b/src/core/lib/iomgr/iomgr_uv.c index 4c8acfbd96..96516ff167 100644 --- a/src/core/lib/iomgr/iomgr_uv.c +++ b/src/core/lib/iomgr/iomgr_uv.c @@ -44,8 +44,6 @@ void grpc_iomgr_platform_init(void) { grpc_register_tracer("tcp", &grpc_tcp_trace); } void grpc_iomgr_platform_flush(void) {} -void grpc_iomgr_platform_shutdown(void) { - grpc_pollset_global_shutdown(); -} +void grpc_iomgr_platform_shutdown(void) { grpc_pollset_global_shutdown(); } #endif /* GRPC_UV */ diff --git a/src/core/lib/iomgr/pollset_set_windows.c b/src/core/lib/iomgr/pollset_set_windows.c index 293893f18e..645650db9b 100644 --- a/src/core/lib/iomgr/pollset_set_windows.c +++ b/src/core/lib/iomgr/pollset_set_windows.c @@ -31,8 +31,8 @@ * */ -#include "src/core/lib/iomgr/port.h" #include +#include "src/core/lib/iomgr/port.h" #ifdef GRPC_WINSOCK_SOCKET diff --git a/src/core/lib/iomgr/pollset_uv.c b/src/core/lib/iomgr/pollset_uv.c index 2c41a58c30..b304eb64de 100644 --- a/src/core/lib/iomgr/pollset_uv.c +++ b/src/core/lib/iomgr/pollset_uv.c @@ -42,13 +42,9 @@ gpr_mu grpc_polling_mu; -size_t grpc_pollset_size() { - return 1; -} +size_t grpc_pollset_size() { return 1; } -void grpc_pollset_global_init(void) { - gpr_mu_init(&grpc_polling_mu); -} +void grpc_pollset_global_init(void) { gpr_mu_init(&grpc_polling_mu); } void grpc_pollset_global_shutdown(void) { gpr_mu_destroy(&grpc_polling_mu); } @@ -57,7 +53,7 @@ void grpc_pollset_init(grpc_pollset *pollset, gpr_mu **mu) { } void grpc_pollset_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, - grpc_closure *closure) { + grpc_closure *closure) { grpc_exec_ctx_sched(exec_ctx, closure, GRPC_ERROR_NONE, NULL); } diff --git a/src/core/lib/iomgr/port.h b/src/core/lib/iomgr/port.h index fd300082d7..c0bb3b5a23 100644 --- a/src/core/lib/iomgr/port.h +++ b/src/core/lib/iomgr/port.h @@ -123,7 +123,7 @@ #endif #if defined(GRPC_POSIX_SOCKET) + defined(GRPC_WINSOCK_SOCKET) + \ - defined(GRPC_CUSTOM_SOCKET) + defined(GRPC_UV) != \ + defined(GRPC_CUSTOM_SOCKET) + defined(GRPC_UV) != \ 1 #error Must define exactly one of GRPC_POSIX_SOCKET, GRPC_WINSOCK_SOCKET, GPR_CUSTOM_SOCKET #endif diff --git a/src/core/lib/iomgr/resolve_address_uv.c b/src/core/lib/iomgr/resolve_address_uv.c index f206c63d79..76170722f2 100644 --- a/src/core/lib/iomgr/resolve_address_uv.c +++ b/src/core/lib/iomgr/resolve_address_uv.c @@ -56,18 +56,16 @@ typedef struct request { struct addrinfo *hints; } request; -static grpc_error *handle_addrinfo_result(int status, - struct addrinfo *result, +static grpc_error *handle_addrinfo_result(int status, struct addrinfo *result, grpc_resolved_addresses **addresses) { - struct addrinfo *resp; size_t i; if (status != 0) { grpc_error *error; *addresses = NULL; error = GRPC_ERROR_CREATE("getaddrinfo failed"); - error = grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR, - uv_strerror(status)); + error = + grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR, uv_strerror(status)); return error; } (*addresses) = gpr_malloc(sizeof(grpc_resolved_addresses)); @@ -168,8 +166,6 @@ done: return err; } - - grpc_error *(*grpc_blocking_resolve_address)( const char *name, const char *default_port, grpc_resolved_addresses **addresses) = blocking_resolve_address_impl; @@ -217,8 +213,7 @@ static void resolve_address_impl(grpc_exec_ctx *exec_ctx, const char *name, if (s != 0) { *addrs = NULL; err = GRPC_ERROR_CREATE("getaddrinfo failed"); - err = grpc_error_set_str(err, GRPC_ERROR_STR_OS_ERROR, - uv_strerror(s)); + err = grpc_error_set_str(err, GRPC_ERROR_STR_OS_ERROR, uv_strerror(s)); grpc_exec_ctx_sched(exec_ctx, on_done, err, NULL); gpr_free(r); gpr_free(req); diff --git a/src/core/lib/iomgr/sockaddr_utils.c b/src/core/lib/iomgr/sockaddr_utils.c index 0333e7aaf5..44bc2f968b 100644 --- a/src/core/lib/iomgr/sockaddr_utils.c +++ b/src/core/lib/iomgr/sockaddr_utils.c @@ -54,7 +54,8 @@ int grpc_sockaddr_is_v4mapped(const grpc_resolved_address *resolved_addr, grpc_resolved_address *resolved_addr4_out) { GPR_ASSERT(resolved_addr != resolved_addr4_out); const struct sockaddr *addr = (const struct sockaddr *)resolved_addr->addr; - struct sockaddr_in *addr4_out = (struct sockaddr_in *)resolved_addr4_out->addr; + struct sockaddr_in *addr4_out = + (struct sockaddr_in *)resolved_addr4_out->addr; if (addr->sa_family == AF_INET6) { const struct sockaddr_in6 *addr6 = (const struct sockaddr_in6 *)addr; if (memcmp(addr6->sin6_addr.s6_addr, kV4MappedPrefix, @@ -78,7 +79,8 @@ int grpc_sockaddr_to_v4mapped(const grpc_resolved_address *resolved_addr, grpc_resolved_address *resolved_addr6_out) { GPR_ASSERT(resolved_addr != resolved_addr6_out); const struct sockaddr *addr = (const struct sockaddr *)resolved_addr->addr; - struct sockaddr_in6 *addr6_out = (struct sockaddr_in6 *)resolved_addr6_out->addr; + struct sockaddr_in6 *addr6_out = + (struct sockaddr_in6 *)resolved_addr6_out->addr; if (addr->sa_family == AF_INET) { const struct sockaddr_in *addr4 = (const struct sockaddr_in *)addr; memset(resolved_addr6_out, 0, sizeof(*resolved_addr6_out)); @@ -92,7 +94,8 @@ int grpc_sockaddr_to_v4mapped(const grpc_resolved_address *resolved_addr, return 0; } -int grpc_sockaddr_is_wildcard(const grpc_resolved_address *resolved_addr, int *port_out) { +int grpc_sockaddr_is_wildcard(const grpc_resolved_address *resolved_addr, + int *port_out) { const struct sockaddr *addr; grpc_resolved_address addr4_normalized; if (grpc_sockaddr_is_v4mapped(resolved_addr, &addr4_normalized)) { @@ -129,7 +132,8 @@ void grpc_sockaddr_make_wildcards(int port, grpc_resolved_address *wild4_out, grpc_sockaddr_make_wildcard6(port, wild6_out); } -void grpc_sockaddr_make_wildcard4(int port, grpc_resolved_address *resolved_wild_out) { +void grpc_sockaddr_make_wildcard4(int port, + grpc_resolved_address *resolved_wild_out) { struct sockaddr_in *wild_out = (struct sockaddr_in *)resolved_wild_out->addr; GPR_ASSERT(port >= 0 && port < 65536); memset(resolved_wild_out, 0, sizeof(*resolved_wild_out)); @@ -138,8 +142,10 @@ void grpc_sockaddr_make_wildcard4(int port, grpc_resolved_address *resolved_wild resolved_wild_out->len = sizeof(struct sockaddr_in); } -void grpc_sockaddr_make_wildcard6(int port, grpc_resolved_address *resolved_wild_out) { - struct sockaddr_in6 *wild_out = (struct sockaddr_in6 *)resolved_wild_out->addr; +void grpc_sockaddr_make_wildcard6(int port, + grpc_resolved_address *resolved_wild_out) { + struct sockaddr_in6 *wild_out = + (struct sockaddr_in6 *)resolved_wild_out->addr; GPR_ASSERT(port >= 0 && port < 65536); memset(resolved_wild_out, 0, sizeof(*resolved_wild_out)); wild_out->sin6_family = AF_INET6; @@ -147,7 +153,8 @@ void grpc_sockaddr_make_wildcard6(int port, grpc_resolved_address *resolved_wild resolved_wild_out->len = sizeof(struct sockaddr_in6); } -int grpc_sockaddr_to_string(char **out, const grpc_resolved_address *resolved_addr, +int grpc_sockaddr_to_string(char **out, + const grpc_resolved_address *resolved_addr, int normalize) { const struct sockaddr *addr; const int save_errno = errno; @@ -227,7 +234,8 @@ int grpc_sockaddr_get_port(const grpc_resolved_address *resolved_addr) { } } -int grpc_sockaddr_set_port(const grpc_resolved_address *resolved_addr, int port) { +int grpc_sockaddr_set_port(const grpc_resolved_address *resolved_addr, + int port) { const struct sockaddr *addr = (const struct sockaddr *)resolved_addr->addr; switch (addr->sa_family) { case AF_INET: diff --git a/src/core/lib/iomgr/socket_utils_common_posix.c b/src/core/lib/iomgr/socket_utils_common_posix.c index 239b9b8876..bc28bbe316 100644 --- a/src/core/lib/iomgr/socket_utils_common_posix.c +++ b/src/core/lib/iomgr/socket_utils_common_posix.c @@ -264,11 +264,9 @@ static grpc_error *error_for_fd(int fd, const grpc_resolved_address *addr) { return err; } -grpc_error *grpc_create_dualstack_socket(const grpc_resolved_address *resolved_addr, - int type, - int protocol, - grpc_dualstack_mode *dsmode, - int *newfd) { +grpc_error *grpc_create_dualstack_socket( + const grpc_resolved_address *resolved_addr, int type, int protocol, + grpc_dualstack_mode *dsmode, int *newfd) { const struct sockaddr *addr = (const struct sockaddr *)resolved_addr->addr; int family = addr->sa_family; if (family == AF_INET6) { diff --git a/src/core/lib/iomgr/socket_utils_linux.c b/src/core/lib/iomgr/socket_utils_linux.c index 627b9d6f9c..bf6e9e4f55 100644 --- a/src/core/lib/iomgr/socket_utils_linux.c +++ b/src/core/lib/iomgr/socket_utils_linux.c @@ -43,14 +43,15 @@ #include #include -int grpc_accept4(int sockfd, grpc_resolved_address *resolved_addr, - int nonblock, int cloexec) { +int grpc_accept4(int sockfd, grpc_resolved_address *resolved_addr, int nonblock, + int cloexec) { int flags = 0; GPR_ASSERT(sizeof(socklen_t) <= sizeof(size_t)); GPR_ASSERT(resolved_addr->len <= (socklen_t)-1); flags |= nonblock ? SOCK_NONBLOCK : 0; flags |= cloexec ? SOCK_CLOEXEC : 0; - return accept4(sockfd, (struct sockaddr *)resolved_addr->addr, (socklen_t *)&resolved_addr->len, flags); + return accept4(sockfd, (struct sockaddr *)resolved_addr->addr, + (socklen_t *)&resolved_addr->len, flags); } #endif diff --git a/src/core/lib/iomgr/socket_utils_posix.c b/src/core/lib/iomgr/socket_utils_posix.c index 0f2622eed6..9e95c276da 100644 --- a/src/core/lib/iomgr/socket_utils_posix.c +++ b/src/core/lib/iomgr/socket_utils_posix.c @@ -44,12 +44,13 @@ #include #include "src/core/lib/iomgr/sockaddr.h" -int grpc_accept4(int sockfd, grpc_resolved_address *resolved_addr, - int nonblock, int cloexec) { +int grpc_accept4(int sockfd, grpc_resolved_address *resolved_addr, int nonblock, + int cloexec) { int fd, flags; GPR_ASSERT(sizeof(socklen_t) <= sizeof(size_t)); GPR_ASSERT(resolved_addr->len <= (socklen_t)-1); - fd = accept(sockfd, (struct sockaddr *)resolved_addr->addr, (socklen_t)resolved_addr->len); + fd = accept(sockfd, (struct sockaddr *)resolved_addr->addr, + (socklen_t)resolved_addr->len); if (fd >= 0) { if (nonblock) { flags = fcntl(fd, F_GETFL, 0); diff --git a/src/core/lib/iomgr/socket_utils_posix.h b/src/core/lib/iomgr/socket_utils_posix.h index 432cba452d..175fb2b717 100644 --- a/src/core/lib/iomgr/socket_utils_posix.h +++ b/src/core/lib/iomgr/socket_utils_posix.h @@ -42,8 +42,8 @@ #include "src/core/lib/iomgr/error.h" /* a wrapper for accept or accept4 */ -int grpc_accept4(int sockfd, grpc_resolved_address *resolved_addr, - int nonblock, int cloexec); +int grpc_accept4(int sockfd, grpc_resolved_address *resolved_addr, int nonblock, + int cloexec); /* set a socket to non blocking mode */ grpc_error *grpc_set_socket_nonblocking(int fd, int non_blocking); @@ -127,8 +127,8 @@ extern int grpc_forbid_dualstack_sockets_for_testing; IPv4, so that bind() or connect() see the correct family. Also, it's important to distinguish between DUALSTACK and IPV6 when listening on the [::] wildcard address. */ -grpc_error *grpc_create_dualstack_socket(const grpc_resolved_address *addr, int type, - int protocol, +grpc_error *grpc_create_dualstack_socket(const grpc_resolved_address *addr, + int type, int protocol, grpc_dualstack_mode *dsmode, int *newfd); diff --git a/src/core/lib/iomgr/tcp_client_posix.c b/src/core/lib/iomgr/tcp_client_posix.c index eda3279659..0c04e23bca 100644 --- a/src/core/lib/iomgr/tcp_client_posix.c +++ b/src/core/lib/iomgr/tcp_client_posix.c @@ -264,7 +264,8 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, do { GPR_ASSERT(addr->len < ~(socklen_t)0); - err = connect(fd, (const struct sockaddr *)addr->addr, (socklen_t)addr->len); + err = + connect(fd, (const struct sockaddr *)addr->addr, (socklen_t)addr->len); } while (err < 0 && errno == EINTR); addr_str = grpc_sockaddr_to_uri(addr); diff --git a/src/core/lib/iomgr/tcp_client_uv.c b/src/core/lib/iomgr/tcp_client_uv.c index bed64ebe0b..3a2cca5392 100644 --- a/src/core/lib/iomgr/tcp_client_uv.c +++ b/src/core/lib/iomgr/tcp_client_uv.c @@ -65,7 +65,8 @@ static void tcp_close_callback(uv_handle_t *handle) { gpr_free(handle); } -static void uv_tc_on_alarm(grpc_exec_ctx *exec_ctx, void *acp, grpc_error *error) { +static void uv_tc_on_alarm(grpc_exec_ctx *exec_ctx, void *acp, + grpc_error *error) { int done; grpc_uv_tcp_connect *connect = acp; if (error == GRPC_ERROR_NONE) { @@ -89,13 +90,13 @@ static void uv_tc_on_connect(uv_connect_t *req, int status) { grpc_closure *closure = connect->closure; grpc_timer_cancel(&exec_ctx, &connect->alarm); if (status == 0) { - *connect->endpoint = grpc_tcp_create(connect->tcp_handle, - connect->addr_name); + *connect->endpoint = + grpc_tcp_create(connect->tcp_handle, connect->addr_name); } else { error = GRPC_ERROR_CREATE("Failed to connect to remote host"); error = grpc_error_set_int(error, GRPC_ERROR_INT_ERRNO, -status); - error = grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR, - uv_strerror(status)); + error = + grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR, uv_strerror(status)); if (status == UV_ECANCELED) { error = grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR, "Timeout occurred"); @@ -115,8 +116,8 @@ static void uv_tc_on_connect(uv_connect_t *req, int status) { grpc_exec_ctx_finish(&exec_ctx); } -void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, - grpc_closure *closure, grpc_endpoint **ep, +void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure, + grpc_endpoint **ep, grpc_pollset_set *interested_parties, const grpc_resolved_address *resolved_addr, gpr_timespec deadline) { diff --git a/src/core/lib/iomgr/tcp_client_windows.c b/src/core/lib/iomgr/tcp_client_windows.c index c987a3c0c5..fdd8c1a1f8 100644 --- a/src/core/lib/iomgr/tcp_client_windows.c +++ b/src/core/lib/iomgr/tcp_client_windows.c @@ -177,7 +177,8 @@ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_done, grpc_sockaddr_make_wildcard6(0, &local_address); - status = bind(sock, (struct sockaddr *)&local_address.addr, local_address.len); + status = + bind(sock, (struct sockaddr *)&local_address.addr, local_address.len); if (status != 0) { error = GRPC_WSA_ERROR(WSAGetLastError(), "bind"); goto failure; @@ -185,8 +186,8 @@ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_done, socket = grpc_winsocket_create(sock, "client"); info = &socket->write_info; - success = - ConnectEx(sock, (struct sockaddr *)&addr->addr, (int)addr->len, NULL, 0, NULL, &info->overlapped); + success = ConnectEx(sock, (struct sockaddr *)&addr->addr, (int)addr->len, + NULL, 0, NULL, &info->overlapped); /* It wouldn't be unusual to get a success immediately. But we'll still get an IOCP notification, so let's ignore it. */ diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index 6ef7a719c4..3be70726b7 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -343,7 +343,8 @@ static grpc_error *prepare_socket(int fd, const grpc_resolved_address *addr, sockname_temp.len = sizeof(struct sockaddr_storage); - if (getsockname(fd, (struct sockaddr *)sockname_temp.addr, (socklen_t *)&sockname_temp.len) < 0) { + if (getsockname(fd, (struct sockaddr *)sockname_temp.addr, + (socklen_t *)&sockname_temp.len) < 0) { err = GRPC_OS_ERROR(errno, "getsockname"); goto error; } @@ -443,8 +444,7 @@ error: static grpc_error *add_socket_to_server(grpc_tcp_server *s, int fd, const grpc_resolved_address *addr, - unsigned port_index, - unsigned fd_index, + unsigned port_index, unsigned fd_index, grpc_tcp_listener **listener) { grpc_tcp_listener *sp = NULL; int port = -1; @@ -503,8 +503,8 @@ static grpc_error *clone_port(grpc_tcp_listener *listener, unsigned count) { int fd = -1; int port = -1; grpc_dualstack_mode dsmode; - err = grpc_create_dualstack_socket(&listener->addr, SOCK_STREAM, 0, - &dsmode, &fd); + err = grpc_create_dualstack_socket(&listener->addr, SOCK_STREAM, 0, &dsmode, + &fd); if (err != GRPC_ERROR_NONE) return err; err = prepare_socket(fd, &listener->addr, true, &port); if (err != GRPC_ERROR_NONE) return err; diff --git a/src/core/lib/iomgr/tcp_server_uv.c b/src/core/lib/iomgr/tcp_server_uv.c index 2d57715ba2..a9eaf206d0 100644 --- a/src/core/lib/iomgr/tcp_server_uv.c +++ b/src/core/lib/iomgr/tcp_server_uv.c @@ -140,7 +140,7 @@ static void tcp_server_destroy(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { if (s->open_ports == 0) { immediately_done = 1; } - for (sp = s->head; sp; sp = sp->next){ + for (sp = s->head; sp; sp = sp->next) { gpr_log(GPR_DEBUG, "Closing uv_tcp_t handle %p", sp->handle); uv_close((uv_handle_t *)sp->handle, handle_close_callback); } @@ -192,12 +192,11 @@ static void on_connect(uv_stream_t *server, int status) { memset(&peer_name, 0, sizeof(grpc_resolved_address)); peer_name.len = sizeof(struct sockaddr_storage); err = uv_tcp_getpeername(client, (struct sockaddr *)&peer_name.addr, - (int*)&peer_name.len); + (int *)&peer_name.len); if (err == 0) { peer_name_string = grpc_sockaddr_to_uri(&peer_name); } else { - gpr_log(GPR_INFO, "uv_tcp_getpeername error: %s", - uv_strerror(status)); + gpr_log(GPR_INFO, "uv_tcp_getpeername error: %s", uv_strerror(status)); } ep = grpc_tcp_create(client, peer_name_string); gpr_log(GPR_DEBUG, "Calling on_accept_cb for server %p", sp->server); @@ -206,8 +205,7 @@ static void on_connect(uv_stream_t *server, int status) { grpc_exec_ctx_finish(&exec_ctx); } -static grpc_error *add_socket_to_server(grpc_tcp_server *s, - uv_tcp_t *handle, +static grpc_error *add_socket_to_server(grpc_tcp_server *s, uv_tcp_t *handle, const grpc_resolved_address *addr, unsigned port_index, grpc_tcp_listener **listener) { @@ -221,8 +219,8 @@ static grpc_error *add_socket_to_server(grpc_tcp_server *s, status = uv_tcp_bind(handle, (struct sockaddr *)addr->addr, 0); if (status != 0) { error = GRPC_ERROR_CREATE("Failed to bind to port"); - error = grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR, - uv_strerror(status)); + error = + grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR, uv_strerror(status)); return error; } @@ -231,8 +229,8 @@ static grpc_error *add_socket_to_server(grpc_tcp_server *s, (int *)&sockname_temp.len); if (status != 0) { error = GRPC_ERROR_CREATE("getsockname failed"); - error = grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR, - uv_strerror(status)); + error = + grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR, uv_strerror(status)); return error; } @@ -283,7 +281,8 @@ grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s, if (grpc_sockaddr_get_port(addr) == 0) { for (sp = s->head; sp; sp = sp->next) { sockname_temp.len = sizeof(struct sockaddr_storage); - if (0 == uv_tcp_getsockname(sp->handle, (struct sockaddr *)&sockname_temp.addr, + if (0 == uv_tcp_getsockname(sp->handle, + (struct sockaddr *)&sockname_temp.addr, (int *)&sockname_temp.len)) { *port = grpc_sockaddr_get_port(&sockname_temp); if (*port > 0) { @@ -315,8 +314,8 @@ grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s, error = add_socket_to_server(s, handle, addr, port_index, &sp); } else { error = GRPC_ERROR_CREATE("Failed to initialize UV tcp handle"); - error = grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR, - uv_strerror(status)); + error = + grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR, uv_strerror(status)); } gpr_free(allocated_addr); @@ -344,13 +343,13 @@ void grpc_tcp_server_start(grpc_exec_ctx *exec_ctx, grpc_tcp_server *server, GPR_ASSERT(!server->on_accept_cb); server->on_accept_cb = on_accept_cb; server->on_accept_cb_arg = cb_arg; - for(sp = server->head; sp; sp = sp->next) { - GPR_ASSERT(uv_listen((uv_stream_t *) sp->handle, SOMAXCONN, on_connect) == 0); + for (sp = server->head; sp; sp = sp->next) { + GPR_ASSERT(uv_listen((uv_stream_t *)sp->handle, SOMAXCONN, on_connect) == + 0); } } void grpc_tcp_server_shutdown_listeners(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) {} - #endif /* GRPC_UV */ diff --git a/src/core/lib/iomgr/tcp_server_windows.c b/src/core/lib/iomgr/tcp_server_windows.c index 0e2a52bdfc..3de720168b 100644 --- a/src/core/lib/iomgr/tcp_server_windows.c +++ b/src/core/lib/iomgr/tcp_server_windows.c @@ -193,9 +193,9 @@ void grpc_tcp_server_unref(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { } /* Prepare (bind) a recently-created socket for listening. */ -static grpc_error *prepare_socket(SOCKET sock, const grpc_resolved_address *addr, +static grpc_error *prepare_socket(SOCKET sock, + const grpc_resolved_address *addr, int *port) { - grpc_resolved_address sockname_temp; grpc_error *error = GRPC_ERROR_NONE; @@ -204,7 +204,8 @@ static grpc_error *prepare_socket(SOCKET sock, const grpc_resolved_address *addr goto failure; } - if (bind(sock, (const struct sockaddr *)addr->addr, (int)addr->len) == SOCKET_ERROR) { + if (bind(sock, (const struct sockaddr *)addr->addr, (int)addr->len) == + SOCKET_ERROR) { error = GRPC_WSA_ERROR(WSAGetLastError(), "bind"); goto failure; } @@ -215,8 +216,8 @@ static grpc_error *prepare_socket(SOCKET sock, const grpc_resolved_address *addr } sockname_temp.len = sizeof(struct sockaddr_storage); - if (getsockname(sock, (struct sockaddr *)sockname_temp.addr, &sockname_temp.len) == - SOCKET_ERROR) { + if (getsockname(sock, (struct sockaddr *)sockname_temp.addr, + &sockname_temp.len) == SOCKET_ERROR) { error = GRPC_WSA_ERROR(WSAGetLastError(), "getsockname"); goto failure; } @@ -364,7 +365,8 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { gpr_log(GPR_ERROR, "setsockopt error: %s", utf8_message); gpr_free(utf8_message); } - err = getpeername(sock, (struct sockaddr *)peer_name.addr, &peer_name.len); + err = + getpeername(sock, (struct sockaddr *)peer_name.addr, &peer_name.len); if (!err) { peer_name_string = grpc_sockaddr_to_uri(&peer_name); } else { @@ -453,7 +455,7 @@ static grpc_error *add_socket_to_server(grpc_tcp_server *s, SOCKET sock, } grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s, - const grpc_resolved_address *addr, + const grpc_resolved_address *addr, int *port) { grpc_tcp_listener *sp = NULL; SOCKET sock; @@ -474,7 +476,8 @@ grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s, for (sp = s->head; sp; sp = sp->next) { sockname_temp.len = sizeof(struct sockaddr_storage); if (0 == getsockname(sp->socket->socket, - (struct sockaddr *)sockname_temp.addr, &sockname_temp.len)) { + (struct sockaddr *)sockname_temp.addr, + &sockname_temp.len)) { *port = grpc_sockaddr_get_port(&sockname_temp); if (*port > 0) { allocated_addr = gpr_malloc(sizeof(grpc_resolved_address)); diff --git a/src/core/lib/iomgr/tcp_uv.c b/src/core/lib/iomgr/tcp_uv.c index fa198fd8e1..270708bd29 100644 --- a/src/core/lib/iomgr/tcp_uv.c +++ b/src/core/lib/iomgr/tcp_uv.c @@ -74,14 +74,11 @@ static void uv_close_callback(uv_handle_t *handle) { gpr_free(handle); } -static void tcp_free(grpc_tcp *tcp) { - gpr_free(tcp); -} +static void tcp_free(grpc_tcp *tcp) { gpr_free(tcp); } /*#define GRPC_TCP_REFCOUNT_DEBUG*/ #ifdef GRPC_TCP_REFCOUNT_DEBUG -#define TCP_UNREF(tcp, reason) \ - tcp_unref((tcp), (reason), __FILE__, __LINE__) +#define TCP_UNREF(tcp, reason) tcp_unref((tcp), (reason), __FILE__, __LINE__) #define TCP_REF(tcp, reason) tcp_ref((tcp), (reason), __FILE__, __LINE__) static void tcp_unref(grpc_tcp *tcp, const char *reason, const char *file, int line) { @@ -110,7 +107,8 @@ static void tcp_unref(grpc_tcp *tcp) { static void tcp_ref(grpc_tcp *tcp) { gpr_ref(&tcp->refcount); } #endif -static void alloc_uv_buf(uv_handle_t *handle, size_t suggested_size, uv_buf_t *buf) { +static void alloc_uv_buf(uv_handle_t *handle, size_t suggested_size, + uv_buf_t *buf) { grpc_tcp *tcp = handle->data; (void)suggested_size; tcp->read_slice = gpr_slice_malloc(GRPC_TCP_DEFAULT_READ_SLICE_SIZE); @@ -118,7 +116,8 @@ static void alloc_uv_buf(uv_handle_t *handle, size_t suggested_size, uv_buf_t *b buf->len = GPR_SLICE_LENGTH(tcp->read_slice); } -static void read_callback(uv_stream_t *stream, ssize_t nread, const uv_buf_t *buf) { +static void read_callback(uv_stream_t *stream, ssize_t nread, + const uv_buf_t *buf) { gpr_slice sub; grpc_error *error; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -147,7 +146,8 @@ static void read_callback(uv_stream_t *stream, ssize_t nread, const uv_buf_t *bu for (i = 0; i < tcp->read_slices->count; i++) { char *dump = gpr_dump_slice(tcp->read_slices->slices[i], GPR_DUMP_HEX | GPR_DUMP_ASCII); - gpr_log(GPR_DEBUG, "READ %p (peer=%s): %s", tcp, tcp->peer_string, dump); + gpr_log(GPR_DEBUG, "READ %p (peer=%s): %s", tcp, tcp->peer_string, + dump); gpr_free(dump); } } @@ -170,11 +170,12 @@ static void uv_endpoint_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, gpr_slice_buffer_reset_and_unref(read_slices); TCP_REF(tcp, "read"); // TODO(murgatroid99): figure out what the return value here means - status = uv_read_start((uv_stream_t *)tcp->handle, alloc_uv_buf, read_callback); + status = + uv_read_start((uv_stream_t *)tcp->handle, alloc_uv_buf, read_callback); if (status != 0) { error = GRPC_ERROR_CREATE("TCP Read failed at start"); - error = grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR, - uv_strerror(status)); + error = + grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR, uv_strerror(status)); grpc_exec_ctx_sched(exec_ctx, cb, error, NULL); } if (grpc_tcp_trace) { @@ -219,8 +220,8 @@ static void uv_endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, size_t i; for (i = 0; i < write_slices->count; i++) { - char *data = - gpr_dump_slice(write_slices->slices[i], GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *data = gpr_dump_slice(write_slices->slices[i], + GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_DEBUG, "WRITE %p (peer=%s): %s", tcp, tcp->peer_string, data); gpr_free(data); } @@ -261,24 +262,22 @@ static void uv_endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, static void uv_add_to_pollset(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, grpc_pollset *pollset) { // No-op. We're ignoring pollsets currently - (void) exec_ctx; - (void) ep; - (void) pollset; - grpc_tcp *tcp = (grpc_tcp *) ep; + (void)exec_ctx; + (void)ep; + (void)pollset; + grpc_tcp *tcp = (grpc_tcp *)ep; tcp->pollset = pollset; } static void uv_add_to_pollset_set(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, grpc_pollset_set *pollset) { // No-op. We're ignoring pollsets currently - (void) exec_ctx; - (void) ep; - (void) pollset; + (void)exec_ctx; + (void)ep; + (void)pollset; } -static void shutdown_callback(uv_shutdown_t *req, int status) { - gpr_free(req); -} +static void shutdown_callback(uv_shutdown_t *req, int status) { gpr_free(req); } static void uv_endpoint_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_tcp *tcp = (grpc_tcp *)ep; @@ -299,7 +298,7 @@ static char *uv_get_peer(grpc_endpoint *ep) { return gpr_strdup(tcp->peer_string); } -static grpc_workqueue *uv_get_workqueue(grpc_endpoint *ep) {return NULL; } +static grpc_workqueue *uv_get_workqueue(grpc_endpoint *ep) { return NULL; } static grpc_endpoint_vtable vtable = {uv_endpoint_read, uv_endpoint_write, diff --git a/src/core/lib/iomgr/timer_uv.c b/src/core/lib/iomgr/timer_uv.c index d280c8b2c8..222f1554a3 100644 --- a/src/core/lib/iomgr/timer_uv.c +++ b/src/core/lib/iomgr/timer_uv.c @@ -42,19 +42,17 @@ #include -static void timer_close_callback(uv_handle_t *handle) { - gpr_free(handle); -} +static void timer_close_callback(uv_handle_t *handle) { gpr_free(handle); } static void stop_uv_timer(uv_timer_t *handle) { uv_timer_stop(handle); - uv_unref((uv_handle_t*) handle); + uv_unref((uv_handle_t *)handle); gpr_log(GPR_DEBUG, "Closing uv_timer_t handle %p", handle); - uv_close((uv_handle_t*) handle, timer_close_callback); + uv_close((uv_handle_t *)handle, timer_close_callback); } void run_expired_timer(uv_timer_t *handle) { - grpc_timer *timer = (grpc_timer*)handle->data; + grpc_timer *timer = (grpc_timer *)handle->data; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; gpr_log(GPR_DEBUG, "Timer callback: %p", timer); GPR_ASSERT(!timer->triggered); @@ -90,7 +88,7 @@ void grpc_timer_cancel(grpc_exec_ctx *exec_ctx, grpc_timer *timer) { gpr_log(GPR_DEBUG, "Running cancelled timer callback"); timer->triggered = 1; grpc_exec_ctx_sched(exec_ctx, &timer->closure, GRPC_ERROR_CANCELLED, NULL); - stop_uv_timer((uv_timer_t*)timer->uv_timer); + stop_uv_timer((uv_timer_t *)timer->uv_timer); } } diff --git a/src/core/lib/iomgr/unix_sockets_posix.c b/src/core/lib/iomgr/unix_sockets_posix.c index 830a0c96ff..030acd9811 100644 --- a/src/core/lib/iomgr/unix_sockets_posix.c +++ b/src/core/lib/iomgr/unix_sockets_posix.c @@ -69,7 +69,8 @@ int grpc_is_unix_socket(const grpc_resolved_address *resolved_addr) { return addr->sa_family == AF_UNIX; } -void grpc_unlink_if_unix_domain_socket(const grpc_resolved_address *resolved_addr) { +void grpc_unlink_if_unix_domain_socket( + const grpc_resolved_address *resolved_addr) { const struct sockaddr *addr = (const struct sockaddr *)resolved_addr->addr; if (addr->sa_family != AF_UNIX) { return; @@ -82,15 +83,15 @@ void grpc_unlink_if_unix_domain_socket(const grpc_resolved_address *resolved_add } } -char *grpc_sockaddr_to_uri_unix_if_possible(const grpc_resolved_address *resolved_addr) { +char *grpc_sockaddr_to_uri_unix_if_possible( + const grpc_resolved_address *resolved_addr) { const struct sockaddr *addr = (const struct sockaddr *)resolved_addr->addr; if (addr->sa_family != AF_UNIX) { return NULL; } char *result; - gpr_asprintf(&result, "unix:%s", - ((struct sockaddr_un *)addr)->sun_path); + gpr_asprintf(&result, "unix:%s", ((struct sockaddr_un *)addr)->sun_path); return result; } diff --git a/src/core/lib/iomgr/unix_sockets_posix.h b/src/core/lib/iomgr/unix_sockets_posix.h index 0ce483119c..21afd3aa15 100644 --- a/src/core/lib/iomgr/unix_sockets_posix.h +++ b/src/core/lib/iomgr/unix_sockets_posix.h @@ -47,8 +47,10 @@ grpc_error *grpc_resolve_unix_domain_address( int grpc_is_unix_socket(const grpc_resolved_address *resolved_addr); -void grpc_unlink_if_unix_domain_socket(const grpc_resolved_address *resolved_addr); +void grpc_unlink_if_unix_domain_socket( + const grpc_resolved_address *resolved_addr); -char *grpc_sockaddr_to_uri_unix_if_possible(const grpc_resolved_address *resolved_addr); +char *grpc_sockaddr_to_uri_unix_if_possible( + const grpc_resolved_address *resolved_addr); #endif /* GRPC_CORE_LIB_IOMGR_UNIX_SOCKETS_POSIX_H */ diff --git a/src/core/lib/tsi/ssl_transport_security.c b/src/core/lib/tsi/ssl_transport_security.c index e59b661fa7..749b46e19f 100644 --- a/src/core/lib/tsi/ssl_transport_security.c +++ b/src/core/lib/tsi/ssl_transport_security.c @@ -33,8 +33,8 @@ #include "src/core/lib/iomgr/sockaddr.h" -#include "src/core/lib/tsi/ssl_transport_security.h" #include "src/core/lib/iomgr/socket_utils.h" +#include "src/core/lib/tsi/ssl_transport_security.h" #include diff --git a/test/core/end2end/fixtures/http_proxy.c b/test/core/end2end/fixtures/http_proxy.c index 8dd4d7fc18..eeaafe49f2 100644 --- a/test/core/end2end/fixtures/http_proxy.c +++ b/test/core/end2end/fixtures/http_proxy.c @@ -430,7 +430,7 @@ grpc_end2end_http_proxy* grpc_end2end_http_proxy_create() { GPR_ASSERT(error == GRPC_ERROR_NONE); // Bind to port. grpc_resolved_address resolved_addr; - struct sockaddr_in *addr = (struct sockaddr_in *)resolved_addr.addr; + struct sockaddr_in* addr = (struct sockaddr_in*)resolved_addr.addr; memset(&resolved_addr, 0, sizeof(resolved_addr)); addr->sin_family = AF_INET; grpc_sockaddr_set_port(&resolved_addr, proxy_port); diff --git a/test/core/iomgr/sockaddr_utils_test.c b/test/core/iomgr/sockaddr_utils_test.c index 1f89f59ef2..bb81ebe575 100644 --- a/test/core/iomgr/sockaddr_utils_test.c +++ b/test/core/iomgr/sockaddr_utils_test.c @@ -175,8 +175,8 @@ static void test_sockaddr_is_wildcard(void) { GPR_ASSERT(port == -1); } -static void expect_sockaddr_str(const char *expected, grpc_resolved_address *addr, - int normalize) { +static void expect_sockaddr_str(const char *expected, + grpc_resolved_address *addr, int normalize) { int result; char *str; gpr_log(GPR_INFO, " expect_sockaddr_str(%s)", expected); @@ -188,7 +188,8 @@ static void expect_sockaddr_str(const char *expected, grpc_resolved_address *add gpr_free(str); } -static void expect_sockaddr_uri(const char *expected, grpc_resolved_address *addr) { +static void expect_sockaddr_uri(const char *expected, + grpc_resolved_address *addr) { char *str; gpr_log(GPR_INFO, " expect_sockaddr_uri(%s)", expected); str = grpc_sockaddr_to_uri(addr); diff --git a/test/core/iomgr/tcp_client_posix_test.c b/test/core/iomgr/tcp_client_posix_test.c index 07aa55b145..b544f5b21b 100644 --- a/test/core/iomgr/tcp_client_posix_test.c +++ b/test/core/iomgr/tcp_client_posix_test.c @@ -102,7 +102,8 @@ void test_succeeds(void) { /* create a dummy server */ svr_fd = socket(AF_INET, SOCK_STREAM, 0); GPR_ASSERT(svr_fd >= 0); - GPR_ASSERT(0 == bind(svr_fd, (struct sockaddr *)addr, (socklen_t)resolved_addr.len)); + GPR_ASSERT( + 0 == bind(svr_fd, (struct sockaddr *)addr, (socklen_t)resolved_addr.len)); GPR_ASSERT(0 == listen(svr_fd, 1)); gpr_mu_lock(g_mu); @@ -110,7 +111,8 @@ void test_succeeds(void) { gpr_mu_unlock(g_mu); /* connect to it */ - GPR_ASSERT(getsockname(svr_fd, (struct sockaddr *)addr, (socklen_t *)&resolved_addr.len) == 0); + GPR_ASSERT(getsockname(svr_fd, (struct sockaddr *)addr, + (socklen_t *)&resolved_addr.len) == 0); grpc_closure_init(&done, must_succeed, NULL); grpc_tcp_client_connect(&exec_ctx, &done, &g_connecting, g_pollset_set, &resolved_addr, gpr_inf_future(GPR_CLOCK_REALTIME)); diff --git a/test/core/iomgr/tcp_server_posix_test.c b/test/core/iomgr/tcp_server_posix_test.c index 9e8dff61ff..b44ab89775 100644 --- a/test/core/iomgr/tcp_server_posix_test.c +++ b/test/core/iomgr/tcp_server_posix_test.c @@ -157,8 +157,8 @@ static void test_no_op_with_port(void) { resolved_addr.len = sizeof(struct sockaddr_in); addr->sin_family = AF_INET; int port; - GPR_ASSERT(grpc_tcp_server_add_port(s, &resolved_addr, - &port) == GRPC_ERROR_NONE && + GPR_ASSERT(grpc_tcp_server_add_port(s, &resolved_addr, &port) == + GRPC_ERROR_NONE && port > 0); grpc_tcp_server_unref(&exec_ctx, s); @@ -177,8 +177,8 @@ static void test_no_op_with_port_and_start(void) { memset(&resolved_addr, 0, sizeof(resolved_addr)); resolved_addr.len = sizeof(struct sockaddr_in); addr->sin_family = AF_INET; - GPR_ASSERT(grpc_tcp_server_add_port(s, &resolved_addr, - &port) == GRPC_ERROR_NONE && + GPR_ASSERT(grpc_tcp_server_add_port(s, &resolved_addr, &port) == + GRPC_ERROR_NONE && port > 0); grpc_tcp_server_start(&exec_ctx, s, NULL, 0, on_connect, NULL); @@ -226,7 +226,8 @@ static void test_connect(unsigned n) { grpc_resolved_address resolved_addr; grpc_resolved_address resolved_addr1; struct sockaddr_storage *addr = (struct sockaddr_storage *)resolved_addr.addr; - struct sockaddr_storage *addr1 = (struct sockaddr_storage *)resolved_addr1.addr; + struct sockaddr_storage *addr1 = + (struct sockaddr_storage *)resolved_addr1.addr; unsigned svr_fd_count; int svr_port; unsigned svr1_fd_count; @@ -250,8 +251,8 @@ static void test_connect(unsigned n) { same port as a previous add_port(). */ svr1_port = grpc_pick_unused_port_or_die(); grpc_sockaddr_set_port(&resolved_addr1, svr1_port); - GPR_ASSERT(grpc_tcp_server_add_port(s, &resolved_addr1, - &svr_port) == GRPC_ERROR_NONE && + GPR_ASSERT(grpc_tcp_server_add_port(s, &resolved_addr1, &svr_port) == + GRPC_ERROR_NONE && svr_port == svr1_port); /* Bad port_index. */ @@ -272,7 +273,8 @@ static void test_connect(unsigned n) { int fd = grpc_tcp_server_port_fd(s, 0, i); GPR_ASSERT(fd >= 0); if (i == 0) { - GPR_ASSERT(getsockname(fd, (struct sockaddr *)addr, (socklen_t *)&resolved_addr.len) == 0); + GPR_ASSERT(getsockname(fd, (struct sockaddr *)addr, + (socklen_t *)&resolved_addr.len) == 0); GPR_ASSERT(resolved_addr.len <= sizeof(*addr)); } } @@ -280,7 +282,8 @@ static void test_connect(unsigned n) { int fd = grpc_tcp_server_port_fd(s, 1, i); GPR_ASSERT(fd >= 0); if (i == 0) { - GPR_ASSERT(getsockname(fd, (struct sockaddr *)addr1, (socklen_t *)&resolved_addr1.len) == 0); + GPR_ASSERT(getsockname(fd, (struct sockaddr *)addr1, + (socklen_t *)&resolved_addr1.len) == 0); GPR_ASSERT(resolved_addr1.len <= sizeof(*addr1)); } } @@ -291,7 +294,8 @@ static void test_connect(unsigned n) { on_connect_result result; int svr_fd; on_connect_result_init(&result); - tcp_connect(&exec_ctx, (struct sockaddr *)addr, (socklen_t)resolved_addr.len, &result); + tcp_connect(&exec_ctx, (struct sockaddr *)addr, + (socklen_t)resolved_addr.len, &result); GPR_ASSERT(result.server_fd >= 0); svr_fd = result.server_fd; GPR_ASSERT(grpc_tcp_server_port_fd(s, result.port_index, result.fd_index) == @@ -305,7 +309,8 @@ static void test_connect(unsigned n) { grpc_tcp_server_unref(&exec_ctx, result.server); on_connect_result_init(&result); - tcp_connect(&exec_ctx, (struct sockaddr *)addr1, (socklen_t)resolved_addr1.len, &result); + tcp_connect(&exec_ctx, (struct sockaddr *)addr1, + (socklen_t)resolved_addr1.len, &result); GPR_ASSERT(result.server_fd >= 0); GPR_ASSERT(result.server_fd != svr_fd); GPR_ASSERT(grpc_tcp_server_port_fd(s, result.port_index, result.fd_index) == diff --git a/test/core/surface/concurrent_connectivity_test.c b/test/core/surface/concurrent_connectivity_test.c index 537fdf71a1..a2470a5a57 100644 --- a/test/core/surface/concurrent_connectivity_test.c +++ b/test/core/surface/concurrent_connectivity_test.c @@ -120,8 +120,7 @@ void bad_server_thread(void *vargs) { GPR_ASSERT(error == GRPC_ERROR_NONE); memset(&resolved_addr, 0, sizeof(resolved_addr)); addr->ss_family = AF_INET; - error = - grpc_tcp_server_add_port(s, &resolved_addr, &port); + error = grpc_tcp_server_add_port(s, &resolved_addr, &port); GPR_ASSERT(GRPC_LOG_IF_ERROR("grpc_tcp_server_add_port", error)); GPR_ASSERT(port > 0); gpr_asprintf(&args->addr, "localhost:%d", port); diff --git a/test/core/util/test_tcp_server.c b/test/core/util/test_tcp_server.c index ee2de563e8..9ac97413d4 100644 --- a/test/core/util/test_tcp_server.c +++ b/test/core/util/test_tcp_server.c @@ -78,8 +78,8 @@ void test_tcp_server_start(test_tcp_server *server, int port) { grpc_error *error = grpc_tcp_server_create(&server->shutdown_complete, NULL, &server->tcp_server); GPR_ASSERT(error == GRPC_ERROR_NONE); - error = grpc_tcp_server_add_port(server->tcp_server, &resolved_addr, - &port_added); + error = + grpc_tcp_server_add_port(server->tcp_server, &resolved_addr, &port_added); GPR_ASSERT(error == GRPC_ERROR_NONE); GPR_ASSERT(port_added == port); -- cgit v1.2.3 From e9f385acdfa719bfe5c4b543c6dbfec2b9f8f552 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 26 Sep 2016 14:54:43 -0700 Subject: Fixes, more tests --- src/core/lib/iomgr/buffer_pool.c | 18 ++++++++-- src/core/lib/iomgr/buffer_pool.h | 4 +++ src/core/lib/iomgr/tcp_posix.c | 38 +++++++++++++------- test/core/iomgr/buffer_pool_test.c | 74 ++++++++++++++++++++++++++++++++++++-- 4 files changed, 118 insertions(+), 16 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/buffer_pool.c b/src/core/lib/iomgr/buffer_pool.c index 699e7078db..cb9a76b3dc 100644 --- a/src/core/lib/iomgr/buffer_pool.c +++ b/src/core/lib/iomgr/buffer_pool.c @@ -149,10 +149,11 @@ static void bpstep(grpc_exec_ctx *exec_ctx, void *bp, grpc_error *error) { grpc_buffer_pool *buffer_pool = bp; buffer_pool->step_scheduled = false; do { - if (bpalloc(exec_ctx, buffer_pool)) return; + if (bpalloc(exec_ctx, buffer_pool)) goto done; } while (bpscavenge(exec_ctx, buffer_pool)); bpreclaim(exec_ctx, buffer_pool, false) || bpreclaim(exec_ctx, buffer_pool, true); +done: grpc_buffer_pool_internal_unref(exec_ctx, buffer_pool); } @@ -335,6 +336,9 @@ static void bu_destroy(grpc_exec_ctx *exec_ctx, void *bu, grpc_error *error) { buffer_user->buffer_pool->free_pool += buffer_user->free_pool; bpstep_sched(exec_ctx, buffer_user->buffer_pool); } +#ifndef NDEBUG + gpr_free(buffer_user->asan_canary); +#endif grpc_buffer_pool_internal_unref(exec_ctx, buffer_user->buffer_pool); } @@ -494,6 +498,9 @@ void grpc_buffer_user_init(grpc_buffer_user *buffer_user, for (int i = 0; i < GRPC_BULIST_COUNT; i++) { buffer_user->links[i].next = buffer_user->links[i].prev = NULL; } +#ifndef NDEBUG + buffer_user->asan_canary = gpr_malloc(1); +#endif } void grpc_buffer_user_shutdown(grpc_exec_ctx *exec_ctx, @@ -514,7 +521,14 @@ void grpc_buffer_user_alloc(grpc_exec_ctx *exec_ctx, grpc_buffer_user *buffer_user, size_t size, grpc_closure *optional_on_done) { gpr_mu_lock(&buffer_user->mu); - GPR_ASSERT(buffer_user->on_done_destroy == NULL); + if (buffer_user->on_done_destroy != NULL) { + /* already shutdown */ + grpc_exec_ctx_sched( + exec_ctx, optional_on_done, + GRPC_ERROR_CREATE("Buffer pool user is already shutdown"), NULL); + gpr_mu_unlock(&buffer_user->mu); + return; + } buffer_user->allocated += (int64_t)size; buffer_user->free_pool -= (int64_t)size; if (buffer_user->free_pool < 0) { diff --git a/src/core/lib/iomgr/buffer_pool.h b/src/core/lib/iomgr/buffer_pool.h index 317eb6b458..2095be05d8 100644 --- a/src/core/lib/iomgr/buffer_pool.h +++ b/src/core/lib/iomgr/buffer_pool.h @@ -65,6 +65,10 @@ struct grpc_buffer_user { grpc_closure allocate_closure; grpc_closure add_to_free_pool_closure; +#ifndef NDEBUG + void *asan_canary; +#endif + gpr_mu mu; int64_t allocated; int64_t free_pool; diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 8b0841cacc..de12215bb2 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -80,6 +80,7 @@ typedef struct { msg_iovlen_type iov_size; /* Number of slices to allocate per read attempt */ size_t slice_size; gpr_refcount refcount; + gpr_atm shutdown_count; /* garbage after the last read */ gpr_slice_buffer last_read_buffer; @@ -109,24 +110,29 @@ static void tcp_handle_read(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, grpc_error *error); static void tcp_handle_write(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, grpc_error *error); +static void tcp_unref_closure(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, + grpc_error *error); + +static void tcp_maybe_shutdown_buffer_user(grpc_exec_ctx *exec_ctx, + grpc_tcp *tcp) { + if (gpr_atm_full_fetch_add(&tcp->shutdown_count, 1) == 0) { + grpc_buffer_user_shutdown(exec_ctx, &tcp->buffer_user, + grpc_closure_create(tcp_unref_closure, tcp)); + } +} static void tcp_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_tcp *tcp = (grpc_tcp *)ep; + tcp_maybe_shutdown_buffer_user(exec_ctx, tcp); grpc_fd_shutdown(exec_ctx, tcp->em_fd); } -static void tcp_end_free(grpc_exec_ctx *exec_ctx, void *tcp, - grpc_error *error) { - gpr_free(tcp); -} - -static void tcp_begin_free(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { +static void tcp_free(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { grpc_fd_orphan(exec_ctx, tcp->em_fd, tcp->release_fd_cb, tcp->release_fd, "tcp_unref_orphan"); gpr_slice_buffer_destroy(&tcp->last_read_buffer); gpr_free(tcp->peer_string); - grpc_buffer_user_shutdown(exec_ctx, &tcp->buffer_user, - grpc_closure_create(tcp_end_free, tcp)); + gpr_free(tcp); } /*#define GRPC_TCP_REFCOUNT_DEBUG*/ @@ -139,7 +145,7 @@ static void tcp_unref(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp, gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "TCP unref %p : %s %d -> %d", tcp, reason, tcp->refcount.count, tcp->refcount.count - 1); if (gpr_unref(&tcp->refcount)) { - tcp_begin_free(exec_ctx, tcp); + tcp_free(exec_ctx, tcp); } } @@ -154,16 +160,22 @@ static void tcp_ref(grpc_tcp *tcp, const char *reason, const char *file, #define TCP_REF(tcp, reason) tcp_ref((tcp)) static void tcp_unref(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { if (gpr_unref(&tcp->refcount)) { - tcp_begin_free(exec_ctx, tcp); + tcp_free(exec_ctx, tcp); } } static void tcp_ref(grpc_tcp *tcp) { gpr_ref(&tcp->refcount); } #endif +static void tcp_unref_closure(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { + TCP_UNREF(exec_ctx, arg, "buffer_user"); +} + static void tcp_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_network_status_unregister_endpoint(ep); grpc_tcp *tcp = (grpc_tcp *)ep; + tcp_maybe_shutdown_buffer_user(exec_ctx, tcp); TCP_UNREF(exec_ctx, tcp, "destroy"); } @@ -519,8 +531,10 @@ grpc_endpoint *grpc_tcp_create(grpc_fd *em_fd, grpc_buffer_pool *buffer_pool, tcp->slice_size = slice_size; tcp->iov_size = 1; tcp->finished_edge = true; - /* paired with unref in grpc_tcp_destroy */ - gpr_ref_init(&tcp->refcount, 1); + /* paired with unref in grpc_tcp_destroy, and with the shutdown for our + * buffer_user */ + gpr_ref_init(&tcp->refcount, 2); + gpr_atm_no_barrier_store(&tcp->shutdown_count, 0); tcp->em_fd = em_fd; tcp->read_closure.cb = tcp_handle_read; tcp->read_closure.cb_arg = tcp; diff --git a/test/core/iomgr/buffer_pool_test.c b/test/core/iomgr/buffer_pool_test.c index 9d30781c31..23fac2f70d 100644 --- a/test/core/iomgr/buffer_pool_test.c +++ b/test/core/iomgr/buffer_pool_test.c @@ -38,6 +38,10 @@ #include "test/core/util/test_config.h" +static void inc_int_cb(grpc_exec_ctx *exec_ctx, void *a, grpc_error *error) { + ++*(int *)a; +} + static void set_bool_cb(grpc_exec_ctx *exec_ctx, void *a, grpc_error *error) { *(bool *)a = true; } @@ -524,7 +528,6 @@ static void test_buffer_user_stays_allocated_until_memory_released(void) { grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(done); } - grpc_buffer_pool_unref(p); } static void test_pools_merged_on_buffer_user_deletion(void) { @@ -554,7 +557,6 @@ static void test_pools_merged_on_buffer_user_deletion(void) { } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_pool_unref(p); grpc_buffer_user_shutdown(&exec_ctx, &usr, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(!done); @@ -571,6 +573,72 @@ static void test_pools_merged_on_buffer_user_deletion(void) { grpc_buffer_pool_unref(p); } +static void test_one_slice(void) { + gpr_log(GPR_INFO, "** test_one_slice **"); + + grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool_resize(p, 1024); + + grpc_buffer_user usr; + grpc_buffer_user_init(&usr, p); + + grpc_buffer_user_slice_allocator alloc; + int num_allocs = 0; + grpc_buffer_user_slice_allocator_init(&alloc, &usr, inc_int_cb, &num_allocs); + + gpr_slice_buffer buffer; + gpr_slice_buffer_init(&buffer); + + { + const int start_allocs = num_allocs; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_alloc_slices(&exec_ctx, &alloc, 1024, 1, &buffer); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(num_allocs == start_allocs + 1); + } + + gpr_slice_buffer_destroy(&buffer); + destroy_user(&usr); + grpc_buffer_pool_unref(p); +} + +static void test_one_slice_deleted_late(void) { + gpr_log(GPR_INFO, "** test_one_slice_deleted_late **"); + + grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool_resize(p, 1024); + + grpc_buffer_user usr; + grpc_buffer_user_init(&usr, p); + + grpc_buffer_user_slice_allocator alloc; + int num_allocs = 0; + grpc_buffer_user_slice_allocator_init(&alloc, &usr, inc_int_cb, &num_allocs); + + gpr_slice_buffer buffer; + gpr_slice_buffer_init(&buffer); + + { + const int start_allocs = num_allocs; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_alloc_slices(&exec_ctx, &alloc, 1024, 1, &buffer); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(num_allocs == start_allocs + 1); + } + + bool done = false; + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_shutdown(&exec_ctx, &usr, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(!done); + } + + grpc_buffer_pool_unref(p); + gpr_slice_buffer_destroy(&buffer); + GPR_ASSERT(done); +} + int main(int argc, char **argv) { grpc_test_init(argc, argv); grpc_init(); @@ -591,6 +659,8 @@ int main(int argc, char **argv) { test_multiple_reclaims_can_be_triggered(); test_buffer_user_stays_allocated_until_memory_released(); test_pools_merged_on_buffer_user_deletion(); + test_one_slice(); + test_one_slice_deleted_late(); grpc_shutdown(); return 0; } -- cgit v1.2.3 From ce2ff3c0719d242fd00411f0526fe38df0282c38 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 26 Sep 2016 15:34:20 -0700 Subject: Fixes --- src/core/lib/iomgr/tcp_posix.c | 5 +++++ test/core/iomgr/tcp_posix_test.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index de12215bb2..4397890c93 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -176,6 +176,7 @@ static void tcp_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_network_status_unregister_endpoint(ep); grpc_tcp *tcp = (grpc_tcp *)ep; tcp_maybe_shutdown_buffer_user(exec_ctx, tcp); + gpr_slice_buffer_reset_and_unref(&tcp->last_read_buffer); TCP_UNREF(exec_ctx, tcp, "destroy"); } @@ -292,6 +293,7 @@ static void tcp_handle_read(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, if (error != GRPC_ERROR_NONE) { gpr_slice_buffer_reset_and_unref(tcp->incoming_buffer); + gpr_slice_buffer_reset_and_unref(&tcp->last_read_buffer); call_read_cb(exec_ctx, tcp, GRPC_ERROR_REF(error)); TCP_UNREF(exec_ctx, tcp, "read"); } else { @@ -558,10 +560,13 @@ int grpc_tcp_fd(grpc_endpoint *ep) { void grpc_tcp_destroy_and_release_fd(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, int *fd, grpc_closure *done) { + grpc_network_status_unregister_endpoint(ep); grpc_tcp *tcp = (grpc_tcp *)ep; GPR_ASSERT(ep->vtable == &vtable); tcp->release_fd = fd; tcp->release_fd_cb = done; + tcp_maybe_shutdown_buffer_user(exec_ctx, tcp); + gpr_slice_buffer_reset_and_unref(&tcp->last_read_buffer); TCP_UNREF(exec_ctx, tcp, "destroy"); } diff --git a/test/core/iomgr/tcp_posix_test.c b/test/core/iomgr/tcp_posix_test.c index c2f857020a..1c56ed0507 100644 --- a/test/core/iomgr/tcp_posix_test.c +++ b/test/core/iomgr/tcp_posix_test.c @@ -455,8 +455,10 @@ static void release_fd_test(size_t num_bytes, size_t slice_size) { "pollset_work", grpc_pollset_work(&exec_ctx, g_pollset, &worker, gpr_now(GPR_CLOCK_MONOTONIC), deadline))); + gpr_log(GPR_DEBUG, "wakeup: read=%" PRIdPTR " target=%" PRIdPTR, + state.read_bytes, state.target_read_bytes); gpr_mu_unlock(g_mu); - grpc_exec_ctx_finish(&exec_ctx); + grpc_exec_ctx_flush(&exec_ctx); gpr_mu_lock(g_mu); } GPR_ASSERT(state.read_bytes == state.target_read_bytes); @@ -464,6 +466,7 @@ static void release_fd_test(size_t num_bytes, size_t slice_size) { gpr_slice_buffer_destroy(&state.incoming); grpc_tcp_destroy_and_release_fd(&exec_ctx, ep, &fd, &fd_released_cb); + grpc_exec_ctx_flush(&exec_ctx); gpr_mu_lock(g_mu); while (!fd_released_done) { grpc_pollset_worker *worker = NULL; @@ -471,6 +474,7 @@ static void release_fd_test(size_t num_bytes, size_t slice_size) { "pollset_work", grpc_pollset_work(&exec_ctx, g_pollset, &worker, gpr_now(GPR_CLOCK_MONOTONIC), deadline))); + gpr_log(GPR_DEBUG, "wakeup: fd_released_done=%d", fd_released_done); } gpr_mu_unlock(g_mu); GPR_ASSERT(fd_released_done == 1); -- cgit v1.2.3 From 966a448a55fa64a5c4654b8cd9656b79cc4b5ba8 Mon Sep 17 00:00:00 2001 From: Dan Born Date: Mon, 26 Sep 2016 15:51:42 -0700 Subject: Require non-NULL exec_ctx to unref. --- src/core/lib/iomgr/tcp_server.h | 4 ++-- src/core/lib/iomgr/tcp_server_posix.c | 11 ----------- src/core/lib/iomgr/tcp_server_windows.c | 19 +++++++------------ 3 files changed, 9 insertions(+), 25 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/tcp_server.h b/src/core/lib/iomgr/tcp_server.h index 5a25d39a0c..9a390699b4 100644 --- a/src/core/lib/iomgr/tcp_server.h +++ b/src/core/lib/iomgr/tcp_server.h @@ -101,8 +101,8 @@ grpc_tcp_server *grpc_tcp_server_ref(grpc_tcp_server *s); void grpc_tcp_server_shutdown_starting_add(grpc_tcp_server *s, grpc_closure *shutdown_starting); -/* If the refcount drops to zero, delete s, and call (exec_ctx==NULL) or enqueue - a call (exec_ctx!=NULL) to shutdown_complete. */ +/* If the refcount drops to zero, enqueue calls on exec_ctx to + shutdown_listeners and delete s. */ void grpc_tcp_server_unref(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s); /* Shutdown the fds of listeners. */ diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index 5f846c8afb..73df5477e6 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -745,22 +745,11 @@ void grpc_tcp_server_shutdown_starting_add(grpc_tcp_server *s, void grpc_tcp_server_unref(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { if (gpr_unref(&s->refs)) { - grpc_exec_ctx local_exec_ctx = GRPC_EXEC_CTX_INIT; - bool finish_ctx = false; - /* FIXME: API allows a NULL exec_ctx, although this might cause us to delete - ourself before some enqueued work in some other exec_ctx runs. */ - if (exec_ctx == NULL) { - exec_ctx = &local_exec_ctx; - finish_ctx = true; - } grpc_tcp_server_shutdown_listeners(exec_ctx, s); gpr_mu_lock(&s->mu); grpc_exec_ctx_enqueue_list(exec_ctx, &s->shutdown_starting, NULL); gpr_mu_unlock(&s->mu); tcp_server_destroy(exec_ctx, s); - if (finish_ctx) { - grpc_exec_ctx_finish(exec_ctx); - } } } diff --git a/src/core/lib/iomgr/tcp_server_windows.c b/src/core/lib/iomgr/tcp_server_windows.c index 1b125e7005..35faded993 100644 --- a/src/core/lib/iomgr/tcp_server_windows.c +++ b/src/core/lib/iomgr/tcp_server_windows.c @@ -121,6 +121,9 @@ grpc_error *grpc_tcp_server_create(grpc_closure *shutdown_complete, } static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { + gpr_mu_lock(&s->mu); + GPR_ASSERT(s->shutdown); + gpr_mu_unlock(&s->mu); if (s->shutdown_complete != NULL) { grpc_exec_ctx_sched(exec_ctx, s->shutdown_complete, GRPC_ERROR_NONE, NULL); } @@ -139,7 +142,7 @@ static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { } grpc_tcp_server *grpc_tcp_server_ref(grpc_tcp_server *s) { - gpr_ref(&s->refs); + gpr_ref_non_zero(&s->refs); return s; } @@ -174,19 +177,11 @@ static void tcp_server_destroy(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { void grpc_tcp_server_unref(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { if (gpr_unref(&s->refs)) { - /* Complete shutdown_starting work before destroying. */ - grpc_exec_ctx local_exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_tcp_server_shutdown_listeners(exec_ctx, s); gpr_mu_lock(&s->mu); - grpc_exec_ctx_enqueue_list(&local_exec_ctx, &s->shutdown_starting, NULL); + grpc_exec_ctx_enqueue_list(exec_ctx, &s->shutdown_starting, NULL); gpr_mu_unlock(&s->mu); - if (exec_ctx == NULL) { - grpc_exec_ctx_flush(&local_exec_ctx); - tcp_server_destroy(&local_exec_ctx, s); - grpc_exec_ctx_finish(&local_exec_ctx); - } else { - grpc_exec_ctx_finish(&local_exec_ctx); - tcp_server_destroy(exec_ctx, s); - } + tcp_server_destroy(exec_ctx, s); } } -- cgit v1.2.3 From 3c9728fa247dc9294a423311f50f55463af93b33 Mon Sep 17 00:00:00 2001 From: Robbie Shade Date: Tue, 27 Sep 2016 12:02:03 -0400 Subject: Wrapped logs in grpc_http_trace --- src/core/lib/channel/http_server_filter.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c index 607fc48105..f2221fb0fb 100644 --- a/src/core/lib/channel/http_server_filter.c +++ b/src/core/lib/channel/http_server_filter.c @@ -42,6 +42,8 @@ #define EXPECTED_CONTENT_TYPE "application/grpc" #define EXPECTED_CONTENT_TYPE_LENGTH sizeof(EXPECTED_CONTENT_TYPE) - 1 +extern int grpc_http_trace; + typedef struct call_data { uint8_t seen_path; uint8_t seen_method; @@ -209,9 +211,11 @@ static void hs_on_recv(grpc_exec_ctx *exec_ctx, void *user_data, err, GRPC_ERROR_CREATE("Missing te: trailers header")); } /* Error this call out */ - const char *error_str = grpc_error_string(err); - gpr_log(GPR_ERROR, "Invalid http2 headers: %s", error_str); - grpc_error_free_string(error_str); + if (grpc_http_trace) { + const char *error_str = grpc_error_string(err); + gpr_log(GPR_ERROR, "Invalid http2 headers: %s", error_str); + grpc_error_free_string(error_str); + } grpc_call_element_send_cancel(exec_ctx, elem); } } else { -- cgit v1.2.3 From 6600645135597fec4feaae81ca64fb02694d5f60 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 27 Sep 2016 10:13:56 -0700 Subject: Refactor hash table code into its own module and use it for method_config as well as method_config_table. --- BUILD | 12 + CMakeLists.txt | 5 + Makefile | 6 + binding.gyp | 1 + build.yaml | 2 + config.m4 | 1 + gRPC-Core.podspec | 3 + grpc.gemspec | 2 + package.xml | 2 + src/core/ext/client_config/method_config.c | 284 +++++++++++---------- src/core/ext/client_config/method_config.h | 29 ++- src/core/lib/transport/hashtable.c | 139 ++++++++++ src/core/lib/transport/hashtable.h | 82 ++++++ src/python/grpcio/grpc_core_dependencies.py | 1 + tools/doxygen/Doxyfile.c++.internal | 2 + tools/doxygen/Doxyfile.core.internal | 2 + tools/run_tests/sources_and_headers.json | 3 + vsprojects/vcxproj/grpc++/grpc++.vcxproj | 3 + vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters | 6 + .../grpc++_unsecure/grpc++_unsecure.vcxproj | 3 + .../grpc++_unsecure.vcxproj.filters | 6 + vsprojects/vcxproj/grpc/grpc.vcxproj | 3 + vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 6 + .../vcxproj/grpc_test_util/grpc_test_util.vcxproj | 3 + .../grpc_test_util/grpc_test_util.vcxproj.filters | 6 + .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 3 + .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 6 + 27 files changed, 470 insertions(+), 151 deletions(-) create mode 100644 src/core/lib/transport/hashtable.c create mode 100644 src/core/lib/transport/hashtable.h (limited to 'src/core/lib') diff --git a/BUILD b/BUILD index d542561ec8..46adf28f29 100644 --- a/BUILD +++ b/BUILD @@ -239,6 +239,7 @@ cc_library( "src/core/lib/surface/server.h", "src/core/lib/transport/byte_stream.h", "src/core/lib/transport/connectivity_state.h", + "src/core/lib/transport/hashtable.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", "src/core/lib/transport/static_metadata.h", @@ -410,6 +411,7 @@ cc_library( "src/core/lib/surface/version.c", "src/core/lib/transport/byte_stream.c", "src/core/lib/transport/connectivity_state.c", + "src/core/lib/transport/hashtable.c", "src/core/lib/transport/metadata.c", "src/core/lib/transport/metadata_batch.c", "src/core/lib/transport/static_metadata.c", @@ -642,6 +644,7 @@ cc_library( "src/core/lib/surface/server.h", "src/core/lib/transport/byte_stream.h", "src/core/lib/transport/connectivity_state.h", + "src/core/lib/transport/hashtable.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", "src/core/lib/transport/static_metadata.h", @@ -798,6 +801,7 @@ cc_library( "src/core/lib/surface/version.c", "src/core/lib/transport/byte_stream.c", "src/core/lib/transport/connectivity_state.c", + "src/core/lib/transport/hashtable.c", "src/core/lib/transport/metadata.c", "src/core/lib/transport/metadata_batch.c", "src/core/lib/transport/static_metadata.c", @@ -1000,6 +1004,7 @@ cc_library( "src/core/lib/surface/server.h", "src/core/lib/transport/byte_stream.h", "src/core/lib/transport/connectivity_state.h", + "src/core/lib/transport/hashtable.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", "src/core/lib/transport/static_metadata.h", @@ -1148,6 +1153,7 @@ cc_library( "src/core/lib/surface/version.c", "src/core/lib/transport/byte_stream.c", "src/core/lib/transport/connectivity_state.c", + "src/core/lib/transport/hashtable.c", "src/core/lib/transport/metadata.c", "src/core/lib/transport/metadata_batch.c", "src/core/lib/transport/static_metadata.c", @@ -1355,6 +1361,7 @@ cc_library( "src/core/lib/surface/server.h", "src/core/lib/transport/byte_stream.h", "src/core/lib/transport/connectivity_state.h", + "src/core/lib/transport/hashtable.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", "src/core/lib/transport/static_metadata.h", @@ -1480,6 +1487,7 @@ cc_library( "src/core/lib/surface/version.c", "src/core/lib/transport/byte_stream.c", "src/core/lib/transport/connectivity_state.c", + "src/core/lib/transport/hashtable.c", "src/core/lib/transport/metadata.c", "src/core/lib/transport/metadata_batch.c", "src/core/lib/transport/static_metadata.c", @@ -1765,6 +1773,7 @@ cc_library( "src/core/lib/surface/server.h", "src/core/lib/transport/byte_stream.h", "src/core/lib/transport/connectivity_state.h", + "src/core/lib/transport/hashtable.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", "src/core/lib/transport/static_metadata.h", @@ -1885,6 +1894,7 @@ cc_library( "src/core/lib/surface/version.c", "src/core/lib/transport/byte_stream.c", "src/core/lib/transport/connectivity_state.c", + "src/core/lib/transport/hashtable.c", "src/core/lib/transport/metadata.c", "src/core/lib/transport/metadata_batch.c", "src/core/lib/transport/static_metadata.c", @@ -2274,6 +2284,7 @@ objc_library( "src/core/lib/surface/version.c", "src/core/lib/transport/byte_stream.c", "src/core/lib/transport/connectivity_state.c", + "src/core/lib/transport/hashtable.c", "src/core/lib/transport/metadata.c", "src/core/lib/transport/metadata_batch.c", "src/core/lib/transport/static_metadata.c", @@ -2485,6 +2496,7 @@ objc_library( "src/core/lib/surface/server.h", "src/core/lib/transport/byte_stream.h", "src/core/lib/transport/connectivity_state.h", + "src/core/lib/transport/hashtable.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", "src/core/lib/transport/static_metadata.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 65a94bb995..39ea8906bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -376,6 +376,7 @@ add_library(grpc src/core/lib/surface/version.c src/core/lib/transport/byte_stream.c src/core/lib/transport/connectivity_state.c + src/core/lib/transport/hashtable.c src/core/lib/transport/metadata.c src/core/lib/transport/metadata_batch.c src/core/lib/transport/static_metadata.c @@ -636,6 +637,7 @@ add_library(grpc_cronet src/core/lib/surface/version.c src/core/lib/transport/byte_stream.c src/core/lib/transport/connectivity_state.c + src/core/lib/transport/hashtable.c src/core/lib/transport/metadata.c src/core/lib/transport/metadata_batch.c src/core/lib/transport/static_metadata.c @@ -868,6 +870,7 @@ add_library(grpc_unsecure src/core/lib/surface/version.c src/core/lib/transport/byte_stream.c src/core/lib/transport/connectivity_state.c + src/core/lib/transport/hashtable.c src/core/lib/transport/metadata.c src/core/lib/transport/metadata_batch.c src/core/lib/transport/static_metadata.c @@ -1127,6 +1130,7 @@ add_library(grpc++ src/core/lib/surface/version.c src/core/lib/transport/byte_stream.c src/core/lib/transport/connectivity_state.c + src/core/lib/transport/hashtable.c src/core/lib/transport/metadata.c src/core/lib/transport/metadata_batch.c src/core/lib/transport/static_metadata.c @@ -1481,6 +1485,7 @@ add_library(grpc++_unsecure src/core/lib/surface/version.c src/core/lib/transport/byte_stream.c src/core/lib/transport/connectivity_state.c + src/core/lib/transport/hashtable.c src/core/lib/transport/metadata.c src/core/lib/transport/metadata_batch.c src/core/lib/transport/static_metadata.c diff --git a/Makefile b/Makefile index 2a22923442..674fe91ee7 100644 --- a/Makefile +++ b/Makefile @@ -2613,6 +2613,7 @@ LIBGRPC_SRC = \ src/core/lib/surface/version.c \ src/core/lib/transport/byte_stream.c \ src/core/lib/transport/connectivity_state.c \ + src/core/lib/transport/hashtable.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ src/core/lib/transport/static_metadata.c \ @@ -2891,6 +2892,7 @@ LIBGRPC_CRONET_SRC = \ src/core/lib/surface/version.c \ src/core/lib/transport/byte_stream.c \ src/core/lib/transport/connectivity_state.c \ + src/core/lib/transport/hashtable.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ src/core/lib/transport/static_metadata.c \ @@ -3158,6 +3160,7 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/lib/surface/version.c \ src/core/lib/transport/byte_stream.c \ src/core/lib/transport/connectivity_state.c \ + src/core/lib/transport/hashtable.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ src/core/lib/transport/static_metadata.c \ @@ -3351,6 +3354,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/surface/version.c \ src/core/lib/transport/byte_stream.c \ src/core/lib/transport/connectivity_state.c \ + src/core/lib/transport/hashtable.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ src/core/lib/transport/static_metadata.c \ @@ -3693,6 +3697,7 @@ LIBGRPC++_SRC = \ src/core/lib/surface/version.c \ src/core/lib/transport/byte_stream.c \ src/core/lib/transport/connectivity_state.c \ + src/core/lib/transport/hashtable.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ src/core/lib/transport/static_metadata.c \ @@ -4322,6 +4327,7 @@ LIBGRPC++_UNSECURE_SRC = \ src/core/lib/surface/version.c \ src/core/lib/transport/byte_stream.c \ src/core/lib/transport/connectivity_state.c \ + src/core/lib/transport/hashtable.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ src/core/lib/transport/static_metadata.c \ diff --git a/binding.gyp b/binding.gyp index 8aa153b878..88acd1786b 100644 --- a/binding.gyp +++ b/binding.gyp @@ -651,6 +651,7 @@ 'src/core/lib/surface/version.c', 'src/core/lib/transport/byte_stream.c', 'src/core/lib/transport/connectivity_state.c', + 'src/core/lib/transport/hashtable.c', 'src/core/lib/transport/metadata.c', 'src/core/lib/transport/metadata_batch.c', 'src/core/lib/transport/static_metadata.c', diff --git a/build.yaml b/build.yaml index fe2558eed3..7e95837ee9 100644 --- a/build.yaml +++ b/build.yaml @@ -243,6 +243,7 @@ filegroups: - src/core/lib/surface/server.h - src/core/lib/transport/byte_stream.h - src/core/lib/transport/connectivity_state.h + - src/core/lib/transport/hashtable.h - src/core/lib/transport/metadata.h - src/core/lib/transport/metadata_batch.h - src/core/lib/transport/static_metadata.h @@ -336,6 +337,7 @@ filegroups: - src/core/lib/surface/version.c - src/core/lib/transport/byte_stream.c - src/core/lib/transport/connectivity_state.c + - src/core/lib/transport/hashtable.c - src/core/lib/transport/metadata.c - src/core/lib/transport/metadata_batch.c - src/core/lib/transport/static_metadata.c diff --git a/config.m4 b/config.m4 index 6ee121df4e..f65f617f9a 100644 --- a/config.m4 +++ b/config.m4 @@ -170,6 +170,7 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/surface/version.c \ src/core/lib/transport/byte_stream.c \ src/core/lib/transport/connectivity_state.c \ + src/core/lib/transport/hashtable.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ src/core/lib/transport/static_metadata.c \ diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 4581762bdf..ffa7ca0825 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -326,6 +326,7 @@ Pod::Spec.new do |s| 'src/core/lib/surface/server.h', 'src/core/lib/transport/byte_stream.h', 'src/core/lib/transport/connectivity_state.h', + 'src/core/lib/transport/hashtable.h', 'src/core/lib/transport/metadata.h', 'src/core/lib/transport/metadata_batch.h', 'src/core/lib/transport/static_metadata.h', @@ -501,6 +502,7 @@ Pod::Spec.new do |s| 'src/core/lib/surface/version.c', 'src/core/lib/transport/byte_stream.c', 'src/core/lib/transport/connectivity_state.c', + 'src/core/lib/transport/hashtable.c', 'src/core/lib/transport/metadata.c', 'src/core/lib/transport/metadata_batch.c', 'src/core/lib/transport/static_metadata.c', @@ -701,6 +703,7 @@ Pod::Spec.new do |s| 'src/core/lib/surface/server.h', 'src/core/lib/transport/byte_stream.h', 'src/core/lib/transport/connectivity_state.h', + 'src/core/lib/transport/hashtable.h', 'src/core/lib/transport/metadata.h', 'src/core/lib/transport/metadata_batch.h', 'src/core/lib/transport/static_metadata.h', diff --git a/grpc.gemspec b/grpc.gemspec index 2d4a8ddbcf..44cd7dd7f7 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -246,6 +246,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/surface/server.h ) s.files += %w( src/core/lib/transport/byte_stream.h ) s.files += %w( src/core/lib/transport/connectivity_state.h ) + s.files += %w( src/core/lib/transport/hashtable.h ) s.files += %w( src/core/lib/transport/metadata.h ) s.files += %w( src/core/lib/transport/metadata_batch.h ) s.files += %w( src/core/lib/transport/static_metadata.h ) @@ -421,6 +422,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/surface/version.c ) s.files += %w( src/core/lib/transport/byte_stream.c ) s.files += %w( src/core/lib/transport/connectivity_state.c ) + s.files += %w( src/core/lib/transport/hashtable.c ) s.files += %w( src/core/lib/transport/metadata.c ) s.files += %w( src/core/lib/transport/metadata_batch.c ) s.files += %w( src/core/lib/transport/static_metadata.c ) diff --git a/package.xml b/package.xml index 8720216260..bf452c3b16 100644 --- a/package.xml +++ b/package.xml @@ -253,6 +253,7 @@ + @@ -428,6 +429,7 @@ + diff --git a/src/core/ext/client_config/method_config.c b/src/core/ext/client_config/method_config.c index 989f776967..553a7be496 100644 --- a/src/core/ext/client_config/method_config.c +++ b/src/core/ext/client_config/method_config.c @@ -39,165 +39,214 @@ #include #include +#include "src/core/lib/transport/hashtable.h" #include "src/core/lib/transport/metadata.h" // // grpc_method_config // +// bool vtable + +static void* bool_copy(void* valuep) { + bool value = *(bool*)valuep; + bool* new_value = gpr_malloc(sizeof(bool)); + *new_value = value; + return new_value; +} + +static int bool_cmp(void* v1, void* v2) { + bool b1 = *(bool*)v1; + bool b2 = *(bool*)v2; + if (!b1 && b2) return -1; + if (b1 && !b2) return 1; + return 0; +} + +static grpc_hash_table_vtable bool_vtable = {gpr_free, bool_copy, bool_cmp}; + +// timespec vtable + +static void* timespec_copy(void* valuep) { + gpr_timespec value = *(gpr_timespec*)valuep; + gpr_timespec* new_value = gpr_malloc(sizeof(gpr_timespec)); + *new_value = value; + return new_value; +} + +static int timespec_cmp(void* v1, void* v2) { + return gpr_time_cmp(*(gpr_timespec*)v1, *(gpr_timespec*)v2); +} + +static grpc_hash_table_vtable timespec_vtable = { + gpr_free, timespec_copy, timespec_cmp}; + +// int32 vtable + +static void* int32_copy(void* valuep) { + int32_t value = *(int32_t*)valuep; + int32_t* new_value = gpr_malloc(sizeof(int32_t)); + *new_value = value; + return new_value; +} + +static int int32_cmp(void* v1, void* v2) { + int32_t i1 = *(int32_t*)v1; + int32_t i2 = *(int32_t*)v2; + if (i1 < i2) return -1; + if (i1 > i2) return 1; + return 0; +} + +static grpc_hash_table_vtable int32_vtable = {gpr_free, int32_copy, int32_cmp}; + +// Hash table keys. +#define GRPC_METHOD_CONFIG_WAIT_FOR_READY "grpc.wait_for_ready" // bool +#define GRPC_METHOD_CONFIG_TIMEOUT "grpc.timeout" // gpr_timespec +#define GRPC_METHOD_CONFIG_MAX_REQUEST_MESSAGE_BYTES \ + "grpc.max_request_message_bytes" // int32 +#define GRPC_METHOD_CONFIG_MAX_RESPONSE_MESSAGE_BYTES \ + "grpc.max_response_message_bytes" // int32 + struct grpc_method_config { - gpr_refcount refs; - bool* wait_for_ready; - gpr_timespec* timeout; - int32_t* max_request_message_bytes; - int32_t* max_response_message_bytes; + grpc_hash_table* table; + grpc_mdstr* wait_for_ready_key; + grpc_mdstr* timeout_key; + grpc_mdstr* max_request_message_bytes_key; + grpc_mdstr* max_response_message_bytes_key; }; grpc_method_config* grpc_method_config_create( bool* wait_for_ready, gpr_timespec* timeout, int32_t* max_request_message_bytes, int32_t* max_response_message_bytes) { - grpc_method_config* config = gpr_malloc(sizeof(*config)); - memset(config, 0, sizeof(*config)); - gpr_ref_init(&config->refs, 1); + grpc_method_config* method_config = gpr_malloc(sizeof(grpc_method_config)); + memset(method_config, 0, sizeof(grpc_method_config)); + grpc_hash_table_entry entries[4]; + size_t num_entries = 0; if (wait_for_ready != NULL) { - config->wait_for_ready = gpr_malloc(sizeof(*wait_for_ready)); - *config->wait_for_ready = *wait_for_ready; + method_config->wait_for_ready_key = + grpc_mdstr_from_string(GRPC_METHOD_CONFIG_WAIT_FOR_READY); + entries[num_entries].key = method_config->wait_for_ready_key; + entries[num_entries].value = wait_for_ready; + entries[num_entries].vtable = &bool_vtable; + ++num_entries; } if (timeout != NULL) { - config->timeout = gpr_malloc(sizeof(*timeout)); - *config->timeout = *timeout; + method_config->timeout_key = + grpc_mdstr_from_string(GRPC_METHOD_CONFIG_TIMEOUT); + entries[num_entries].key = method_config->timeout_key; + entries[num_entries].value = timeout; + entries[num_entries].vtable = ×pec_vtable; + ++num_entries; } if (max_request_message_bytes != NULL) { - config->max_request_message_bytes = - gpr_malloc(sizeof(*max_request_message_bytes)); - *config->max_request_message_bytes = *max_request_message_bytes; + method_config->max_request_message_bytes_key = + grpc_mdstr_from_string(GRPC_METHOD_CONFIG_MAX_REQUEST_MESSAGE_BYTES); + entries[num_entries].key = method_config->max_request_message_bytes_key; + entries[num_entries].value = max_request_message_bytes; + entries[num_entries].vtable = &int32_vtable; + ++num_entries; } if (max_response_message_bytes != NULL) { - config->max_response_message_bytes = - gpr_malloc(sizeof(*max_response_message_bytes)); - *config->max_response_message_bytes = *max_response_message_bytes; + method_config->max_response_message_bytes_key = + grpc_mdstr_from_string(GRPC_METHOD_CONFIG_MAX_RESPONSE_MESSAGE_BYTES); + entries[num_entries].key = method_config->max_response_message_bytes_key; + entries[num_entries].value = max_response_message_bytes; + entries[num_entries].vtable = &int32_vtable; + ++num_entries; } - return config; + method_config->table = grpc_hash_table_create(num_entries, entries); + return method_config; } grpc_method_config* grpc_method_config_ref(grpc_method_config* method_config) { - gpr_ref(&method_config->refs); + grpc_hash_table_ref(method_config->table); return method_config; } void grpc_method_config_unref(grpc_method_config* method_config) { - if (gpr_unref(&method_config->refs)) { - gpr_free(method_config->wait_for_ready); - gpr_free(method_config->timeout); - gpr_free(method_config->max_request_message_bytes); - gpr_free(method_config->max_response_message_bytes); - gpr_free(method_config); + if (grpc_hash_table_unref(method_config->table)) { + GRPC_MDSTR_UNREF(method_config->wait_for_ready_key); + GRPC_MDSTR_UNREF(method_config->timeout_key); + GRPC_MDSTR_UNREF(method_config->max_request_message_bytes_key); + GRPC_MDSTR_UNREF(method_config->max_response_message_bytes_key); } } +int grpc_method_config_cmp(grpc_method_config* method_config1, + grpc_method_config* method_config2) { + return grpc_hash_table_cmp(method_config1->table, method_config2->table); +} + bool* grpc_method_config_get_wait_for_ready(grpc_method_config* method_config) { - return method_config->wait_for_ready; + return grpc_hash_table_get(method_config->table, + method_config->wait_for_ready_key); } gpr_timespec* grpc_method_config_get_timeout( grpc_method_config* method_config) { - return method_config->timeout; + return grpc_hash_table_get(method_config->table, method_config->timeout_key); } int32_t* grpc_method_config_get_max_request_message_bytes( grpc_method_config* method_config) { - return method_config->max_request_message_bytes; + return grpc_hash_table_get(method_config->table, + method_config->max_request_message_bytes_key); } int32_t* grpc_method_config_get_max_response_message_bytes( grpc_method_config* method_config) { - return method_config->max_response_message_bytes; + return grpc_hash_table_get(method_config->table, + method_config->max_response_message_bytes_key); } // // grpc_method_config_table // -typedef struct grpc_method_config_table_entry { - grpc_mdstr* path; - grpc_method_config* method_config; -} grpc_method_config_table_entry; - -#define METHOD_CONFIG_TABLE_SIZE 128 -struct grpc_method_config_table { - gpr_refcount refs; - grpc_method_config_table_entry entries[METHOD_CONFIG_TABLE_SIZE]; -}; - -grpc_method_config_table* grpc_method_config_table_create() { - grpc_method_config_table* table = gpr_malloc(sizeof(*table)); - memset(table, 0, sizeof(*table)); - gpr_ref_init(&table->refs, 1); - return table; +static void method_config_unref(void* valuep) { + grpc_method_config_unref(valuep); } -grpc_method_config_table* grpc_method_config_table_ref( - grpc_method_config_table* table) { - if (table != NULL) gpr_ref(&table->refs); - return table; +static void* method_config_ref(void* valuep) { + return grpc_method_config_ref(valuep); } -void grpc_method_config_table_unref(grpc_method_config_table* table) { - if (table != NULL && gpr_unref(&table->refs)) { - for (size_t i = 0; i < GPR_ARRAY_SIZE(table->entries); ++i) { - grpc_method_config_table_entry* entry = &table->entries[i]; - if (entry->path != NULL) { - GRPC_MDSTR_UNREF(entry->path); - grpc_method_config_unref(entry->method_config); - } - } - } +static int method_config_cmp(void* valuep1, void* valuep2) { + return grpc_method_config_cmp(valuep1, valuep2); } -// Helper function for insert and get operations that performs quadratic -// probing (https://en.wikipedia.org/wiki/Quadratic_probing). -static size_t grpc_method_config_table_find_index( - grpc_method_config_table* table, grpc_mdstr* path, bool find_empty) { - for (size_t i = 0; i < GPR_ARRAY_SIZE(table->entries); ++i) { - const size_t idx = (path->hash + i * i) % GPR_ARRAY_SIZE(table->entries); - if (table->entries[idx].path == NULL) - return find_empty ? idx : GPR_ARRAY_SIZE(table->entries); - if (table->entries[idx].path == path) return idx; +static const grpc_hash_table_vtable method_config_table_vtable = { + method_config_unref, method_config_ref, method_config_cmp}; + +grpc_method_config_table* grpc_method_config_table_create( + size_t num_entries, grpc_method_config_table_entry* entries) { + grpc_hash_table_entry hash_table_entries[num_entries]; + for (size_t i = 0; i < num_entries; ++i) { + hash_table_entries[i].key = entries[i].method_name; + hash_table_entries[i].value = entries[i].method_config; + hash_table_entries[i].vtable = &method_config_table_vtable; } - return GPR_ARRAY_SIZE(table->entries) + 1; // Not found. + return grpc_hash_table_create(num_entries, hash_table_entries); } -static void grpc_method_config_table_insert(grpc_method_config_table* table, - grpc_mdstr* path, - grpc_method_config* config) { - const size_t idx = - grpc_method_config_table_find_index(table, path, true /* find_empty */); - // This can happen if the table is full. - GPR_ASSERT(idx != GPR_ARRAY_SIZE(table->entries)); - grpc_method_config_table_entry* entry = &table->entries[idx]; - entry->path = GRPC_MDSTR_REF(path); - entry->method_config = grpc_method_config_ref(config); +grpc_method_config_table* grpc_method_config_table_ref( + grpc_method_config_table* table) { + return grpc_hash_table_ref(table); } -static grpc_method_config* grpc_method_config_table_get( - grpc_method_config_table* table, grpc_mdstr* path) { - const size_t idx = - grpc_method_config_table_find_index(table, path, false /* find_empty */); - if (idx == GPR_ARRAY_SIZE(table->entries)) return NULL; // Not found. - return table->entries[idx].method_config; +void grpc_method_config_table_unref(grpc_method_config_table* table) { + grpc_hash_table_unref(table); } -void grpc_method_config_table_add_method_config( - grpc_method_config_table* table, grpc_mdstr** paths, size_t num_paths, - grpc_method_config* method_config) { - for (size_t i = 0; i < num_paths; ++i) { - grpc_method_config_table_insert(table, paths[i], method_config); - } +int grpc_method_config_table_cmp(grpc_method_config_table* table1, + grpc_method_config_table* table2) { + return grpc_hash_table_cmp(table1, table2); } grpc_method_config* grpc_method_config_table_get_method_config( grpc_method_config_table* table, grpc_mdstr* path) { - grpc_method_config* method_config = grpc_method_config_table_get(table, path); + grpc_method_config* method_config = grpc_hash_table_get(table, path); // If we didn't find a match for the path, try looking for a wildcard // entry (i.e., change "/service/method" to "/service/*"). if (method_config == NULL) { @@ -209,7 +258,7 @@ grpc_method_config* grpc_method_config_table_get_method_config( buf[len] = '*'; buf[len + 1] = '\0'; grpc_mdstr* wildcard_path = grpc_mdstr_from_string(buf); - method_config = grpc_method_config_table_get(table, wildcard_path); + method_config = grpc_hash_table_get(table, wildcard_path); GRPC_MDSTR_UNREF(wildcard_path); } return grpc_method_config_ref(method_config); @@ -224,52 +273,7 @@ static void destroy_arg(void* p) { } static int cmp_arg(void* p1, void* p2) { - grpc_method_config_table* t1 = p1; - grpc_method_config_table* t2 = p2; - for (size_t i = 0; i < GPR_ARRAY_SIZE(t1->entries); ++i) { - grpc_method_config_table_entry* e1 = &t1->entries[i]; - grpc_method_config_table_entry* e2 = &t2->entries[i]; - // Compare paths by hash value. - if (e1->path->hash < e2->path->hash) return -1; - if (e1->path->hash > e2->path->hash) return 1; - // Compare wait_for_ready. - const bool wait_for_ready1 = - e1->method_config->wait_for_ready == NULL - ? false : *e1->method_config->wait_for_ready; - const bool wait_for_ready2 = - e2->method_config->wait_for_ready == NULL - ? false : *e2->method_config->wait_for_ready; - if (wait_for_ready1 < wait_for_ready2) return -1; - if (wait_for_ready1 > wait_for_ready2) return 1; - // Compare timeout. - const gpr_timespec timeout1 = - e1->method_config->timeout == NULL - ? gpr_inf_past(GPR_CLOCK_MONOTONIC) : *e1->method_config->timeout; - const gpr_timespec timeout2 = - e2->method_config->timeout == NULL - ? gpr_inf_past(GPR_CLOCK_MONOTONIC) : *e2->method_config->timeout; - const int timeout_result = gpr_time_cmp(timeout1, timeout2); - if (timeout_result != 0) return timeout_result; - // Compare max_request_message_bytes. - const int32_t max_request_message_bytes1 = - e1->method_config->max_request_message_bytes == NULL - ? -1 : *e1->method_config->max_request_message_bytes; - const int32_t max_request_message_bytes2 = - e2->method_config->max_request_message_bytes == NULL - ? -1 : *e2->method_config->max_request_message_bytes; - if (max_request_message_bytes1 < max_request_message_bytes2) return -1; - if (max_request_message_bytes1 > max_request_message_bytes2) return 1; - // Compare max_response_message_bytes. - const int32_t max_response_message_bytes1 = - e1->method_config->max_response_message_bytes == NULL - ? -1 : *e1->method_config->max_response_message_bytes; - const int32_t max_response_message_bytes2 = - e2->method_config->max_response_message_bytes == NULL - ? -1 : *e2->method_config->max_response_message_bytes; - if (max_response_message_bytes1 < max_response_message_bytes2) return -1; - if (max_response_message_bytes1 > max_response_message_bytes2) return 1; - } - return 0; + return grpc_method_config_table_cmp(p1, p2); } static grpc_arg_pointer_vtable arg_vtable = {copy_arg, destroy_arg, cmp_arg}; diff --git a/src/core/ext/client_config/method_config.h b/src/core/ext/client_config/method_config.h index 2be0cd1006..e95a5583be 100644 --- a/src/core/ext/client_config/method_config.h +++ b/src/core/ext/client_config/method_config.h @@ -37,6 +37,7 @@ #include #include +#include "src/core/lib/transport/hashtable.h" #include "src/core/lib/transport/metadata.h" /// Per-method configuration. @@ -50,6 +51,9 @@ grpc_method_config* grpc_method_config_create( grpc_method_config* grpc_method_config_ref(grpc_method_config* method_config); void grpc_method_config_unref(grpc_method_config* method_config); +int grpc_method_config_cmp(grpc_method_config* method_config1, + grpc_method_config* method_config2); + /// These methods return NULL if the requested field is unset. /// The caller does NOT take ownership of the result. bool* grpc_method_config_get_wait_for_ready(grpc_method_config* method_config); @@ -60,23 +64,26 @@ int32_t* grpc_method_config_get_max_response_message_bytes( grpc_method_config* method_config); /// A table of method configs. -typedef struct grpc_method_config_table grpc_method_config_table; +typedef grpc_hash_table grpc_method_config_table; + +typedef struct grpc_method_config_table_entry { + /// The name is of one of the following forms: + /// service/method -- specifies exact service and method name + /// service/* -- matches all methods for the specified service + grpc_mdstr* method_name; + grpc_method_config* method_config; +} grpc_method_config_table_entry; -grpc_method_config_table* grpc_method_config_table_create(); +/// Takes new references to all keys and values in \a entries. +grpc_method_config_table* grpc_method_config_table_create( + size_t num_entries, grpc_method_config_table_entry* entries); grpc_method_config_table* grpc_method_config_table_ref( grpc_method_config_table* table); void grpc_method_config_table_unref(grpc_method_config_table* table); -/// Adds \a method_config to \a table. \a paths indicates the set of path -/// names for which this config applies. Each name is of one of the -/// following forms: -/// service/method -- specifies exact service and method name -/// service/* -- matches all methods for the specified service -/// Takes new references to all elements of \a paths and to \a method_config. -void grpc_method_config_table_add_method_config( - grpc_method_config_table* table, grpc_mdstr** paths, size_t num_paths, - grpc_method_config* method_config); +int grpc_method_config_table_cmp(grpc_method_config_table* table1, + grpc_method_config_table* table2); /// Returns NULL if the method has no config. /// Caller owns a reference to result. diff --git a/src/core/lib/transport/hashtable.c b/src/core/lib/transport/hashtable.c new file mode 100644 index 0000000000..89e2640969 --- /dev/null +++ b/src/core/lib/transport/hashtable.c @@ -0,0 +1,139 @@ +// +// Copyright 2016, 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. +// + +#include "src/core/lib/transport/hashtable.h" + +#include +#include + +#include +#include + +#include "src/core/lib/transport/metadata.h" + +struct grpc_hash_table { + gpr_refcount refs; + size_t num_entries; + grpc_hash_table_entry* entries; +}; + +// Helper function for insert and get operations that performs quadratic +// probing (https://en.wikipedia.org/wiki/Quadratic_probing). +static size_t grpc_hash_table_find_index( + grpc_hash_table* table, grpc_mdstr* key, bool find_empty) { + for (size_t i = 0; i < table->num_entries; ++i) { + const size_t idx = (key->hash + i * i) % table->num_entries; + if (table->entries[idx].key == NULL) + return find_empty ? idx : table->num_entries; + if (table->entries[idx].key == key) return idx; + } + return table->num_entries; // Not found. +} + +static void grpc_hash_table_add(grpc_hash_table* table, grpc_mdstr* key, + void* value, + const grpc_hash_table_vtable* vtable) { + GPR_ASSERT(value != NULL); + const size_t idx = + grpc_hash_table_find_index(table, key, true /* find_empty */); + // This can happen if the table is full. + GPR_ASSERT(idx != table->num_entries); + grpc_hash_table_entry* entry = &table->entries[idx]; + entry->key = GRPC_MDSTR_REF(key); + entry->value = vtable->copy_value(value); + entry->vtable = vtable; +} + +grpc_hash_table* grpc_hash_table_create(size_t num_entries, + grpc_hash_table_entry* entries) { + grpc_hash_table* table = gpr_malloc(sizeof(*table)); + memset(table, 0, sizeof(*table)); + gpr_ref_init(&table->refs, 1); + // Quadratic chaining gets best performance when the table is no more + // than half full. + table->num_entries = num_entries * 2; + const size_t entry_size = sizeof(grpc_hash_table_entry) * table->num_entries; + table->entries = gpr_malloc(entry_size); + memset(table->entries, 0, entry_size); + for (size_t i = 0; i < num_entries; ++i) { + grpc_hash_table_entry* entry = &entries[i]; + grpc_hash_table_add(table, entry->key, entry->value, entry->vtable); + } + return table; +} + +grpc_hash_table* grpc_hash_table_ref(grpc_hash_table* table) { + if (table != NULL) gpr_ref(&table->refs); + return table; +} + +int grpc_hash_table_unref(grpc_hash_table* table) { + if (table != NULL && gpr_unref(&table->refs)) { + for (size_t i = 0; i < table->num_entries; ++i) { + grpc_hash_table_entry* entry = &table->entries[i]; + if (entry->key != NULL) { + GRPC_MDSTR_UNREF(entry->key); + entry->vtable->destroy_value(entry->value); + } + } + gpr_free(table->entries); + gpr_free(table); + return 1; + } + return 0; +} + +void* grpc_hash_table_get(grpc_hash_table* table, grpc_mdstr* key) { + const size_t idx = + grpc_hash_table_find_index(table, key, false /* find_empty */); + if (idx == table->num_entries) return NULL; // Not found. + return table->entries[idx].value; +} + +int grpc_hash_table_cmp(grpc_hash_table* table1, grpc_hash_table* table2) { + // Compare by num_entries. + if (table1->num_entries < table2->num_entries) return -1; + if (table1->num_entries > table2->num_entries) return 1; + for (size_t i = 0; i < table1->num_entries; ++i) { + grpc_hash_table_entry* e1 = &table1->entries[i]; + grpc_hash_table_entry* e2 = &table2->entries[i]; + // Compare keys by hash value. + if (e1->key->hash < e2->key->hash) return -1; + if (e1->key->hash > e2->key->hash) return 1; + // Compare by vtable (pointer equality). + if (e1->vtable < e2->vtable) return -1; + if (e1->vtable > e2->vtable) return 1; + // Compare values via vtable. + const int value_result = e1->vtable->compare_value(e1->value, e2->value); + if (value_result != 0) return value_result; + } + return 0; +} diff --git a/src/core/lib/transport/hashtable.h b/src/core/lib/transport/hashtable.h new file mode 100644 index 0000000000..93f0642c17 --- /dev/null +++ b/src/core/lib/transport/hashtable.h @@ -0,0 +1,82 @@ +/* + * Copyright 2016, 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. + */ + +#ifndef GRPC_CORE_LIB_TRANSPORT_HASHTABLE_H +#define GRPC_CORE_LIB_TRANSPORT_HASHTABLE_H + +#include "src/core/lib/transport/metadata.h" + +/** Hash table implementation. + * + * This implementation uses open addressing + * (https://en.wikipedia.org/wiki/Open_addressing) with quadratic + * probing (https://en.wikipedia.org/wiki/Quadratic_probing). + * This means that the hash table is of fixed size and cannot contain + * more than that number of elements. + * + * The keys are grpc_mdstr objects. The values are arbitrary pointers + * with a common vtable. + * + * Hash tables are intentionally immutable, to avoid the need for locking. + */ + +typedef struct grpc_hash_table grpc_hash_table; + +typedef struct grpc_hash_table_vtable { + void (*destroy_value)(void* value); + void* (*copy_value)(void* value); + int (*compare_value)(void* value1, void* value2); +} grpc_hash_table_vtable; + +typedef struct grpc_hash_table_entry { + grpc_mdstr* key; + void* value; /* Must not be NULL. */ + const grpc_hash_table_vtable* vtable; +} grpc_hash_table_entry; + +/** Creates a new hash table of containing \a entries, which is an array + of length \a num_entries. + Creates its own copy of all keys and values from \a entries. */ +grpc_hash_table* grpc_hash_table_create(size_t num_entries, + grpc_hash_table_entry* entries); + +grpc_hash_table* grpc_hash_table_ref(grpc_hash_table* table); +/** Returns 1 when \a table is destroyed. */ +int grpc_hash_table_unref(grpc_hash_table* table); + +/** Returns the value from \a table associated with \a key. + Returns NULL if \a key is not found. */ +void* grpc_hash_table_get(grpc_hash_table* table, grpc_mdstr* key); + +/** Compares two hash tables. */ +int grpc_hash_table_cmp(grpc_hash_table* table1, grpc_hash_table* table2); + +#endif /* GRPC_CORE_LIB_TRANSPORT_HASHTABLE_H */ diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index f9308ba7a5..315d469a15 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -164,6 +164,7 @@ CORE_SOURCE_FILES = [ 'src/core/lib/surface/version.c', 'src/core/lib/transport/byte_stream.c', 'src/core/lib/transport/connectivity_state.c', + 'src/core/lib/transport/hashtable.c', 'src/core/lib/transport/metadata.c', 'src/core/lib/transport/metadata_batch.c', 'src/core/lib/transport/static_metadata.c', diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index ce21a4ea00..1619194d4a 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -947,6 +947,7 @@ src/core/lib/surface/lame_client.h \ src/core/lib/surface/server.h \ src/core/lib/transport/byte_stream.h \ src/core/lib/transport/connectivity_state.h \ +src/core/lib/transport/hashtable.h \ src/core/lib/transport/metadata.h \ src/core/lib/transport/metadata_batch.h \ src/core/lib/transport/static_metadata.h \ @@ -1072,6 +1073,7 @@ src/core/lib/surface/validate_metadata.c \ src/core/lib/surface/version.c \ src/core/lib/transport/byte_stream.c \ src/core/lib/transport/connectivity_state.c \ +src/core/lib/transport/hashtable.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ src/core/lib/transport/static_metadata.c \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 9ea6695f24..c9317396f6 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -863,6 +863,7 @@ src/core/lib/surface/lame_client.h \ src/core/lib/surface/server.h \ src/core/lib/transport/byte_stream.h \ src/core/lib/transport/connectivity_state.h \ +src/core/lib/transport/hashtable.h \ src/core/lib/transport/metadata.h \ src/core/lib/transport/metadata_batch.h \ src/core/lib/transport/static_metadata.h \ @@ -1038,6 +1039,7 @@ src/core/lib/surface/validate_metadata.c \ src/core/lib/surface/version.c \ src/core/lib/transport/byte_stream.c \ src/core/lib/transport/connectivity_state.c \ +src/core/lib/transport/hashtable.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ src/core/lib/transport/static_metadata.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index f6889c8f3a..0fe6cdf6b9 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -6049,6 +6049,7 @@ "src/core/lib/surface/server.h", "src/core/lib/transport/byte_stream.h", "src/core/lib/transport/connectivity_state.h", + "src/core/lib/transport/hashtable.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", "src/core/lib/transport/static_metadata.h", @@ -6229,6 +6230,8 @@ "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/hashtable.c", + "src/core/lib/transport/hashtable.h", "src/core/lib/transport/metadata.c", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.c", diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index 88ddecf426..92a7e02e52 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -447,6 +447,7 @@ + @@ -693,6 +694,8 @@ + + diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters index a6616449d3..9282b52eef 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters @@ -358,6 +358,9 @@ src\core\lib\transport + + src\core\lib\transport + src\core\lib\transport @@ -944,6 +947,9 @@ src\core\lib\transport + + src\core\lib\transport + src\core\lib\transport diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj index 99cee2830a..0270fe4836 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -443,6 +443,7 @@ + @@ -679,6 +680,8 @@ + + diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters index e1b6b2f327..8863237f43 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters @@ -343,6 +343,9 @@ src\core\lib\transport + + src\core\lib\transport + src\core\lib\transport @@ -917,6 +920,9 @@ src\core\lib\transport + + src\core\lib\transport + src\core\lib\transport diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index ba2174f429..b2352d74f4 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -372,6 +372,7 @@ + @@ -636,6 +637,8 @@ + + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index ee3e7a85d3..ee7825ae88 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -262,6 +262,9 @@ src\core\lib\transport + + src\core\lib\transport + src\core\lib\transport @@ -902,6 +905,9 @@ src\core\lib\transport + + src\core\lib\transport + src\core\lib\transport diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index 21d9fc9529..f09be1528b 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -264,6 +264,7 @@ + @@ -480,6 +481,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index 09a32482cd..7be3b76d23 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -313,6 +313,9 @@ src\core\lib\transport + + src\core\lib\transport + src\core\lib\transport @@ -680,6 +683,9 @@ src\core\lib\transport + + src\core\lib\transport + src\core\lib\transport diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index be02a4fa92..09a1e2386d 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -362,6 +362,7 @@ + @@ -604,6 +605,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index 482da9b984..df7a9b9b43 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -265,6 +265,9 @@ src\core\lib\transport + + src\core\lib\transport + src\core\lib\transport @@ -812,6 +815,9 @@ src\core\lib\transport + + src\core\lib\transport + src\core\lib\transport -- cgit v1.2.3 From 996e95b4ad4e401dc8b04ae9cc092bd167307e10 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 27 Sep 2016 10:55:37 -0700 Subject: Use per-method max message size limits. --- src/core/lib/channel/message_size_filter.c | 68 ++++++++++++++++++++++++------ 1 file changed, 55 insertions(+), 13 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/channel/message_size_filter.c b/src/core/lib/channel/message_size_filter.c index a254fe3997..e34e365d2c 100644 --- a/src/core/lib/channel/message_size_filter.c +++ b/src/core/lib/channel/message_size_filter.c @@ -39,11 +39,14 @@ #include #include "src/core/lib/channel/channel_args.h" +#include "src/core/ext/client_config/method_config.h" // The protobuf library will (by default) start warning at 100 megs. #define DEFAULT_MAX_MESSAGE_LENGTH (4 * 1024 * 1024) typedef struct call_data { + int max_send_size; + int max_recv_size; // Receive closures are chained: we inject this closure as the // recv_message_ready up-call on transport_stream_op, and remember to // call our next_recv_message_ready member after handling it. @@ -55,8 +58,10 @@ typedef struct call_data { } call_data; typedef struct channel_data { - size_t max_send_size; - size_t max_recv_size; + int max_send_size; + int max_recv_size; + // Method config table. + grpc_method_config_table* method_config_table; } channel_data; // Callback invoked when we receive a message. Here we check the max @@ -65,13 +70,12 @@ static void recv_message_ready(grpc_exec_ctx* exec_ctx, void* user_data, grpc_error* error) { grpc_call_element* elem = user_data; call_data* calld = elem->call_data; - channel_data* chand = elem->channel_data; - if (*calld->recv_message != NULL && - (*calld->recv_message)->length > chand->max_recv_size) { + if (*calld->recv_message != NULL && calld->max_recv_size >= 0 && + (*calld->recv_message)->length > (size_t)calld->max_recv_size) { char* message_string; gpr_asprintf( - &message_string, "Received message larger than max (%u vs. %lu)", - (*calld->recv_message)->length, (unsigned long)chand->max_recv_size); + &message_string, "Received message larger than max (%u vs. %d)", + (*calld->recv_message)->length, calld->max_recv_size); gpr_slice message = gpr_slice_from_copied_string(message_string); gpr_free(message_string); grpc_call_element_send_close_with_message( @@ -86,13 +90,12 @@ static void start_transport_stream_op(grpc_exec_ctx* exec_ctx, grpc_call_element* elem, grpc_transport_stream_op* op) { call_data* calld = elem->call_data; - channel_data* chand = elem->channel_data; // Check max send message size. - if (op->send_message != NULL && - op->send_message->length > chand->max_send_size) { + if (op->send_message != NULL && calld->max_send_size >= 0 && + op->send_message->length > (size_t)calld->max_send_size) { char* message_string; - gpr_asprintf(&message_string, "Sent message larger than max (%u vs. %lu)", - op->send_message->length, (unsigned long)chand->max_send_size); + gpr_asprintf(&message_string, "Sent message larger than max (%u vs. %d)", + op->send_message->length, calld->max_send_size); gpr_slice message = gpr_slice_from_copied_string(message_string); gpr_free(message_string); grpc_call_element_send_close_with_message( @@ -112,9 +115,37 @@ static void start_transport_stream_op(grpc_exec_ctx* exec_ctx, static grpc_error* init_call_elem(grpc_exec_ctx* exec_ctx, grpc_call_element* elem, grpc_call_element_args* args) { + channel_data* chand = elem->channel_data; call_data* calld = elem->call_data; calld->next_recv_message_ready = NULL; grpc_closure_init(&calld->recv_message_ready, recv_message_ready, elem); + // Get max sizes from channel data, then merge in per-method config values. + // Note: Per-method config is only available on the client, so we + // apply the max request size to the send limit and the max response + // size to the receive limit. + calld->max_send_size = chand->max_send_size; + calld->max_recv_size = chand->max_recv_size; + if (chand->method_config_table != NULL) { + grpc_method_config* method_config = + grpc_method_config_table_get_method_config(chand->method_config_table, + args->path); + if (method_config != NULL) { + int32_t* max_request_message_bytes = + grpc_method_config_get_max_request_message_bytes(method_config); + if (max_request_message_bytes != NULL && + (*max_request_message_bytes < calld->max_send_size || + calld->max_send_size < 0)) { + calld->max_send_size = *max_request_message_bytes; + } + int32_t* max_response_message_bytes = + grpc_method_config_get_max_response_message_bytes(method_config); + if (max_response_message_bytes != NULL && + (*max_response_message_bytes < calld->max_recv_size || + calld->max_recv_size < 0)) { + calld->max_recv_size = *max_response_message_bytes; + } + } + } return GRPC_ERROR_NONE; } @@ -145,11 +176,22 @@ static void init_channel_elem(grpc_exec_ctx* exec_ctx, &args->channel_args->args[i], options); } } + // Get method config table from channel args. + const grpc_arg *channel_arg = grpc_channel_args_find( + args->channel_args, GRPC_ARG_SERVICE_CONFIG); + if (channel_arg != NULL) { + GPR_ASSERT(channel_arg->type == GRPC_ARG_POINTER); + chand->method_config_table = grpc_method_config_table_ref( + (grpc_method_config_table *)channel_arg->value.pointer.p); + } } // Destructor for channel_data. static void destroy_channel_elem(grpc_exec_ctx* exec_ctx, - grpc_channel_element* elem) {} + grpc_channel_element* elem) { + channel_data* chand = elem->channel_data; + grpc_method_config_table_unref(chand->method_config_table); +} const grpc_channel_filter grpc_message_size_filter = { start_transport_stream_op, -- cgit v1.2.3 From dd339ea915ca62950659aa1e9924077f127a75b6 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 27 Sep 2016 13:21:31 -0700 Subject: Cleanup of some buffer pool implementation --- .../transport/chttp2/transport/chttp2_transport.c | 5 +-- src/core/lib/iomgr/buffer_pool.c | 40 +++++++++++++-------- src/core/lib/iomgr/buffer_pool.h | 2 +- test/core/iomgr/buffer_pool_test.c | 42 ++++++++++++++++++++++ 4 files changed, 72 insertions(+), 17 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index e5bc89c030..3ebb467332 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -256,8 +256,8 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_closure_init(&t->read_action_locked, read_action_locked, t); grpc_closure_init(&t->benign_reclaimer, benign_reclaimer, t); grpc_closure_init(&t->destructive_reclaimer, destructive_reclaimer, t); - grpc_closure_init(&t->benign_reclaimer, benign_reclaimer_locked, t); - grpc_closure_init(&t->destructive_reclaimer, destructive_reclaimer_locked, t); + grpc_closure_init(&t->benign_reclaimer_locked, benign_reclaimer_locked, t); + grpc_closure_init(&t->destructive_reclaimer_locked, destructive_reclaimer_locked, t); grpc_chttp2_goaway_parser_init(&t->goaway_parser); grpc_chttp2_hpack_parser_init(&t->hpack_parser); @@ -379,6 +379,7 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, } grpc_chttp2_initiate_write(exec_ctx, t, false, "init"); + post_benign_reclaimer(exec_ctx, t); } static void destroy_transport_locked(grpc_exec_ctx *exec_ctx, void *tp, diff --git a/src/core/lib/iomgr/buffer_pool.c b/src/core/lib/iomgr/buffer_pool.c index cb9a76b3dc..c0fd7cc45f 100644 --- a/src/core/lib/iomgr/buffer_pool.c +++ b/src/core/lib/iomgr/buffer_pool.c @@ -218,9 +218,9 @@ static bool bpreclaim(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool, grpc_buffer_user *buffer_user = bulist_pop(buffer_pool, list); if (buffer_user == NULL) return false; buffer_pool->reclaiming = true; - grpc_exec_ctx_sched(exec_ctx, buffer_user->reclaimers[destructive], - GRPC_ERROR_NONE, NULL); + grpc_closure *c = buffer_user->reclaimers[destructive]; buffer_user->reclaimers[destructive] = NULL; + grpc_closure_run(exec_ctx, c, GRPC_ERROR_NONE); return true; } @@ -330,8 +330,9 @@ static void bu_destroy(grpc_exec_ctx *exec_ctx, void *bu, grpc_error *error) { GRPC_ERROR_CANCELLED, NULL); grpc_exec_ctx_sched(exec_ctx, buffer_user->reclaimers[1], GRPC_ERROR_CANCELLED, NULL); - grpc_exec_ctx_sched(exec_ctx, buffer_user->on_done_destroy, GRPC_ERROR_NONE, - NULL); + grpc_exec_ctx_sched(exec_ctx, (grpc_closure *)gpr_atm_no_barrier_load( + &buffer_user->on_done_destroy_closure), + GRPC_ERROR_NONE, NULL); if (buffer_user->free_pool != 0) { buffer_user->buffer_pool->free_pool += buffer_user->free_pool; bpstep_sched(exec_ctx, buffer_user->buffer_pool); @@ -340,6 +341,7 @@ static void bu_destroy(grpc_exec_ctx *exec_ctx, void *bu, grpc_error *error) { gpr_free(buffer_user->asan_canary); #endif grpc_buffer_pool_internal_unref(exec_ctx, buffer_user->buffer_pool); + gpr_mu_destroy(&buffer_user->mu); } static void bu_allocated_slices(grpc_exec_ctx *exec_ctx, void *ts, @@ -492,7 +494,7 @@ void grpc_buffer_user_init(grpc_buffer_user *buffer_user, grpc_closure_list_init(&buffer_user->on_allocated); buffer_user->allocating = false; buffer_user->added_to_free_pool = false; - buffer_user->on_done_destroy = NULL; + gpr_atm_no_barrier_store(&buffer_user->on_done_destroy_closure, 0); buffer_user->reclaimers[0] = NULL; buffer_user->reclaimers[1] = NULL; for (int i = 0; i < GRPC_BULIST_COUNT; i++) { @@ -507,8 +509,10 @@ void grpc_buffer_user_shutdown(grpc_exec_ctx *exec_ctx, grpc_buffer_user *buffer_user, grpc_closure *on_done) { gpr_mu_lock(&buffer_user->mu); - GPR_ASSERT(buffer_user->on_done_destroy == NULL); - buffer_user->on_done_destroy = on_done; + GPR_ASSERT(gpr_atm_no_barrier_load(&buffer_user->on_done_destroy_closure) == + 0); + gpr_atm_no_barrier_store(&buffer_user->on_done_destroy_closure, + (gpr_atm)on_done); if (buffer_user->allocated == 0) { grpc_combiner_execute(exec_ctx, buffer_user->buffer_pool->combiner, &buffer_user->destroy_closure, GRPC_ERROR_NONE, @@ -521,7 +525,9 @@ void grpc_buffer_user_alloc(grpc_exec_ctx *exec_ctx, grpc_buffer_user *buffer_user, size_t size, grpc_closure *optional_on_done) { gpr_mu_lock(&buffer_user->mu); - if (buffer_user->on_done_destroy != NULL) { + grpc_closure *on_done_destroy = (grpc_closure *)gpr_atm_no_barrier_load( + &buffer_user->on_done_destroy_closure); + if (on_done_destroy != NULL) { /* already shutdown */ grpc_exec_ctx_sched( exec_ctx, optional_on_done, @@ -561,7 +567,9 @@ void grpc_buffer_user_free(grpc_exec_ctx *exec_ctx, &buffer_user->add_to_free_pool_closure, GRPC_ERROR_NONE, false); } - if (buffer_user->on_done_destroy != NULL && buffer_user->allocated == 0) { + grpc_closure *on_done_destroy = (grpc_closure *)gpr_atm_no_barrier_load( + &buffer_user->on_done_destroy_closure); + if (on_done_destroy != NULL && buffer_user->allocated == 0) { grpc_combiner_execute(exec_ctx, buffer_user->buffer_pool->combiner, &buffer_user->destroy_closure, GRPC_ERROR_NONE, false); @@ -572,11 +580,15 @@ void grpc_buffer_user_free(grpc_exec_ctx *exec_ctx, void grpc_buffer_user_post_reclaimer(grpc_exec_ctx *exec_ctx, grpc_buffer_user *buffer_user, bool destructive, grpc_closure *closure) { - GPR_ASSERT(buffer_user->reclaimers[destructive] == NULL); - buffer_user->reclaimers[destructive] = closure; - grpc_combiner_execute(exec_ctx, buffer_user->buffer_pool->combiner, - &buffer_user->post_reclaimer_closure[destructive], - GRPC_ERROR_NONE, false); + if (gpr_atm_acq_load(&buffer_user->on_done_destroy_closure) != 0) { + GPR_ASSERT(buffer_user->reclaimers[destructive] == NULL); + buffer_user->reclaimers[destructive] = closure; + grpc_combiner_execute(exec_ctx, buffer_user->buffer_pool->combiner, + &buffer_user->post_reclaimer_closure[destructive], + GRPC_ERROR_NONE, false); + } else { + grpc_exec_ctx_sched(exec_ctx, closure, GRPC_ERROR_CANCELLED, NULL); + } } void grpc_buffer_user_finish_reclaimation(grpc_exec_ctx *exec_ctx, diff --git a/src/core/lib/iomgr/buffer_pool.h b/src/core/lib/iomgr/buffer_pool.h index 2095be05d8..ca4c39f76d 100644 --- a/src/core/lib/iomgr/buffer_pool.h +++ b/src/core/lib/iomgr/buffer_pool.h @@ -80,7 +80,7 @@ struct grpc_buffer_user { grpc_closure post_reclaimer_closure[2]; grpc_closure destroy_closure; - grpc_closure *on_done_destroy; + gpr_atm on_done_destroy_closure; grpc_buffer_user_link links[GRPC_BULIST_COUNT]; }; diff --git a/test/core/iomgr/buffer_pool_test.c b/test/core/iomgr/buffer_pool_test.c index 23fac2f70d..a15e02e3c6 100644 --- a/test/core/iomgr/buffer_pool_test.c +++ b/test/core/iomgr/buffer_pool_test.c @@ -573,6 +573,47 @@ static void test_pools_merged_on_buffer_user_deletion(void) { grpc_buffer_pool_unref(p); } +static void test_reclaimers_can_be_posted_repeatedly(void) { + gpr_log(GPR_INFO, "** test_reclaimers_can_be_posted_repeatedly **"); + grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool_resize(p, 1024); + grpc_buffer_user usr; + grpc_buffer_user_init(&usr, p); + { + bool allocated = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_alloc(&exec_ctx, &usr, 1024, set_bool(&allocated)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(allocated); + } + for (int i = 0; i < 10; i++) { + bool reclaimer_done = false; + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_post_reclaimer( + &exec_ctx, &usr, false, + make_reclaimer(&usr, 1024, set_bool(&reclaimer_done))); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(!reclaimer_done); + } + { + bool allocated = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_alloc(&exec_ctx, &usr, 1024, set_bool(&allocated)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(allocated); + GPR_ASSERT(reclaimer_done); + } + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_free(&exec_ctx, &usr, 1024); + grpc_exec_ctx_finish(&exec_ctx); + } + destroy_user(&usr); + grpc_buffer_pool_unref(p); +} + static void test_one_slice(void) { gpr_log(GPR_INFO, "** test_one_slice **"); @@ -659,6 +700,7 @@ int main(int argc, char **argv) { test_multiple_reclaims_can_be_triggered(); test_buffer_user_stays_allocated_until_memory_released(); test_pools_merged_on_buffer_user_deletion(); + test_reclaimers_can_be_posted_repeatedly(); test_one_slice(); test_one_slice_deleted_late(); grpc_shutdown(); -- cgit v1.2.3 From 32c804e6a76d37460f34dc7154431b2c38d86c99 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 27 Sep 2016 13:40:03 -0700 Subject: Fix a conditional that got flipped --- src/core/lib/iomgr/buffer_pool.c | 16 ++++++++++------ src/core/lib/iomgr/buffer_pool.h | 2 ++ test/core/iomgr/buffer_pool_test.c | 19 ++++++++++++++++++- 3 files changed, 30 insertions(+), 7 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/buffer_pool.c b/src/core/lib/iomgr/buffer_pool.c index c0fd7cc45f..88f37c9fc1 100644 --- a/src/core/lib/iomgr/buffer_pool.c +++ b/src/core/lib/iomgr/buffer_pool.c @@ -337,11 +337,6 @@ static void bu_destroy(grpc_exec_ctx *exec_ctx, void *bu, grpc_error *error) { buffer_user->buffer_pool->free_pool += buffer_user->free_pool; bpstep_sched(exec_ctx, buffer_user->buffer_pool); } -#ifndef NDEBUG - gpr_free(buffer_user->asan_canary); -#endif - grpc_buffer_pool_internal_unref(exec_ctx, buffer_user->buffer_pool); - gpr_mu_destroy(&buffer_user->mu); } static void bu_allocated_slices(grpc_exec_ctx *exec_ctx, void *ts, @@ -521,6 +516,15 @@ void grpc_buffer_user_shutdown(grpc_exec_ctx *exec_ctx, gpr_mu_unlock(&buffer_user->mu); } +void grpc_buffer_user_destroy(grpc_exec_ctx *exec_ctx, + grpc_buffer_user *buffer_user) { +#ifndef NDEBUG + gpr_free(buffer_user->asan_canary); +#endif + grpc_buffer_pool_internal_unref(exec_ctx, buffer_user->buffer_pool); + gpr_mu_destroy(&buffer_user->mu); +} + void grpc_buffer_user_alloc(grpc_exec_ctx *exec_ctx, grpc_buffer_user *buffer_user, size_t size, grpc_closure *optional_on_done) { @@ -580,7 +584,7 @@ void grpc_buffer_user_free(grpc_exec_ctx *exec_ctx, void grpc_buffer_user_post_reclaimer(grpc_exec_ctx *exec_ctx, grpc_buffer_user *buffer_user, bool destructive, grpc_closure *closure) { - if (gpr_atm_acq_load(&buffer_user->on_done_destroy_closure) != 0) { + if (gpr_atm_acq_load(&buffer_user->on_done_destroy_closure) == 0) { GPR_ASSERT(buffer_user->reclaimers[destructive] == NULL); buffer_user->reclaimers[destructive] = closure; grpc_combiner_execute(exec_ctx, buffer_user->buffer_pool->combiner, diff --git a/src/core/lib/iomgr/buffer_pool.h b/src/core/lib/iomgr/buffer_pool.h index ca4c39f76d..301e059c18 100644 --- a/src/core/lib/iomgr/buffer_pool.h +++ b/src/core/lib/iomgr/buffer_pool.h @@ -90,6 +90,8 @@ void grpc_buffer_user_init(grpc_buffer_user *buffer_user, void grpc_buffer_user_shutdown(grpc_exec_ctx *exec_ctx, grpc_buffer_user *buffer_user, grpc_closure *on_done); +void grpc_buffer_user_destroy(grpc_exec_ctx *exec_ctx, + grpc_buffer_user *buffer_user); void grpc_buffer_user_alloc(grpc_exec_ctx *exec_ctx, grpc_buffer_user *buffer_user, size_t size, diff --git a/test/core/iomgr/buffer_pool_test.c b/test/core/iomgr/buffer_pool_test.c index a15e02e3c6..5bc619b478 100644 --- a/test/core/iomgr/buffer_pool_test.c +++ b/test/core/iomgr/buffer_pool_test.c @@ -83,8 +83,10 @@ static void destroy_user(grpc_buffer_user *usr) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; bool done = false; grpc_buffer_user_shutdown(&exec_ctx, usr, set_bool(&done)); - grpc_exec_ctx_finish(&exec_ctx); + grpc_exec_ctx_flush(&exec_ctx); GPR_ASSERT(done); + grpc_buffer_user_destroy(&exec_ctx, usr); + grpc_exec_ctx_finish(&exec_ctx); } static void test_no_op(void) { @@ -528,6 +530,11 @@ static void test_buffer_user_stays_allocated_until_memory_released(void) { grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(done); } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_destroy(&exec_ctx, &usr); + grpc_exec_ctx_finish(&exec_ctx); + } } static void test_pools_merged_on_buffer_user_deletion(void) { @@ -569,6 +576,11 @@ static void test_pools_merged_on_buffer_user_deletion(void) { GPR_ASSERT(done); GPR_ASSERT(reclaimer_cancelled); } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_destroy(&exec_ctx, &usr); + grpc_exec_ctx_finish(&exec_ctx); + } } grpc_buffer_pool_unref(p); } @@ -678,6 +690,11 @@ static void test_one_slice_deleted_late(void) { grpc_buffer_pool_unref(p); gpr_slice_buffer_destroy(&buffer); GPR_ASSERT(done); + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_buffer_user_destroy(&exec_ctx, &usr); + grpc_exec_ctx_finish(&exec_ctx); + } } int main(int argc, char **argv) { -- cgit v1.2.3 From 4b3b5d0e82e883c8632e50604f2cde30e4e056d0 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 27 Sep 2016 13:55:24 -0700 Subject: Fixes for destruction --- src/core/lib/iomgr/tcp_posix.c | 1 + test/core/util/mock_endpoint.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 4397890c93..812c39235b 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -131,6 +131,7 @@ static void tcp_free(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { grpc_fd_orphan(exec_ctx, tcp->em_fd, tcp->release_fd_cb, tcp->release_fd, "tcp_unref_orphan"); gpr_slice_buffer_destroy(&tcp->last_read_buffer); + grpc_buffer_user_destroy(exec_ctx, &tcp->buffer_user); gpr_free(tcp->peer_string); gpr_free(tcp); } diff --git a/test/core/util/mock_endpoint.c b/test/core/util/mock_endpoint.c index e4c478281f..29428ff390 100644 --- a/test/core/util/mock_endpoint.c +++ b/test/core/util/mock_endpoint.c @@ -90,13 +90,14 @@ static void me_really_destroy(grpc_exec_ctx *exec_ctx, void *mp, grpc_error *error) { grpc_mock_endpoint *m = mp; gpr_slice_buffer_destroy(&m->read_buffer); + grpc_buffer_user_destroy(exec_ctx, &m->buffer_user); gpr_free(m); } static void me_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_mock_endpoint *m = (grpc_mock_endpoint *)ep; grpc_buffer_user_shutdown(exec_ctx, &m->buffer_user, - grpc_closure_create(me_really_destroy, m)); + grpc_closure_create(me_really_destroy, m)); } static char *me_get_peer(grpc_endpoint *ep) { -- cgit v1.2.3 From ef6b97659edb575a002d574db89d90f7ebf4b979 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 28 Sep 2016 08:37:51 -0700 Subject: Add tracing, fix some transport bugs wrt buffer_pools --- include/grpc/grpc.h | 2 +- .../transport/chttp2/transport/chttp2_transport.c | 24 ++- src/core/lib/iomgr/buffer_pool.c | 66 +++++- src/core/lib/iomgr/buffer_pool.h | 6 +- src/core/lib/iomgr/tcp_client_posix.c | 2 +- src/core/lib/iomgr/tcp_posix.c | 2 +- src/core/lib/iomgr/tcp_server_posix.c | 2 +- .../google_default/google_default_credentials.c | 3 +- .../lib/security/credentials/jwt/jwt_verifier.c | 4 +- .../credentials/oauth2/oauth2_credentials.c | 5 +- src/core/lib/surface/init.c | 2 + src/ruby/ext/grpc/rb_grpc_imports.generated.h | 2 +- test/core/end2end/tests/buffer_pool_server.c | 228 ++++++++++++++++++++- test/core/util/mock_endpoint.c | 12 +- test/core/util/passthru_endpoint.c | 16 +- test/core/util/port_server_client.c | 11 +- 16 files changed, 354 insertions(+), 33 deletions(-) (limited to 'src/core/lib') diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index a6e02cd072..4bdf744d91 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -402,7 +402,7 @@ GRPCAPI int grpc_is_binary_header(const char *key, size_t length); GRPCAPI const char *grpc_call_error_to_string(grpc_call_error error); /** Create a buffer pool */ -GRPCAPI grpc_buffer_pool *grpc_buffer_pool_create(void); +GRPCAPI grpc_buffer_pool *grpc_buffer_pool_create(const char *trace_name); /** Add a reference to a buffer pool */ GRPCAPI void grpc_buffer_pool_ref(grpc_buffer_pool *buffer_pool); diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 3ebb467332..13241f6abe 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -257,7 +257,8 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_closure_init(&t->benign_reclaimer, benign_reclaimer, t); grpc_closure_init(&t->destructive_reclaimer, destructive_reclaimer, t); grpc_closure_init(&t->benign_reclaimer_locked, benign_reclaimer_locked, t); - grpc_closure_init(&t->destructive_reclaimer_locked, destructive_reclaimer_locked, t); + grpc_closure_init(&t->destructive_reclaimer_locked, + destructive_reclaimer_locked, t); grpc_chttp2_goaway_parser_init(&t->goaway_parser); grpc_chttp2_hpack_parser_init(&t->hpack_parser); @@ -2124,10 +2125,21 @@ static void benign_reclaimer_locked(grpc_exec_ctx *exec_ctx, void *arg, grpc_chttp2_transport *t = arg; if (error == GRPC_ERROR_NONE && grpc_chttp2_stream_map_size(&t->stream_map) == 0) { + if (grpc_buffer_pool_trace) { + gpr_log(GPR_DEBUG, "HTTP2: %s - send goaway to free memory", + t->peer_string); + } send_goaway(exec_ctx, t, GRPC_CHTTP2_ENHANCE_YOUR_CALM, gpr_slice_from_static_string("Buffers full")); + } else if (grpc_buffer_pool_trace) { + gpr_log(GPR_DEBUG, + "HTTP2: %s - skip benign reclaimation, there are still %" PRIdPTR + " streams", + t->peer_string, grpc_chttp2_stream_map_size(&t->stream_map)); } t->benign_reclaimer_registered = false; + grpc_buffer_user_finish_reclaimation(exec_ctx, + grpc_endpoint_get_buffer_user(t->ep)); GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "benign_reclaimer"); } @@ -2138,18 +2150,20 @@ static void destructive_reclaimer_locked(grpc_exec_ctx *exec_ctx, void *arg, t->destructive_reclaimer_registered = false; if (error == GRPC_ERROR_NONE && n > 0) { grpc_chttp2_stream *s = grpc_chttp2_stream_map_rand(&t->stream_map); + if (grpc_buffer_pool_trace) { + gpr_log(GPR_DEBUG, "HTTP2: %s - abandon stream id %d", t->peer_string, + s->id); + } grpc_chttp2_cancel_stream( exec_ctx, t, s, grpc_error_set_int(GRPC_ERROR_CREATE("Buffers full"), GRPC_ERROR_INT_HTTP2_ERROR, GRPC_CHTTP2_ENHANCE_YOUR_CALM)); if (n > 1) { post_destructive_reclaimer(exec_ctx, t); - t->destructive_reclaimer_registered = true; - grpc_buffer_user_post_reclaimer(exec_ctx, - grpc_endpoint_get_buffer_user(t->ep), - true, &t->destructive_reclaimer); } } + grpc_buffer_user_finish_reclaimation(exec_ctx, + grpc_endpoint_get_buffer_user(t->ep)); GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "destructive_reclaimer"); } diff --git a/src/core/lib/iomgr/buffer_pool.c b/src/core/lib/iomgr/buffer_pool.c index 88f37c9fc1..cfa171684b 100644 --- a/src/core/lib/iomgr/buffer_pool.c +++ b/src/core/lib/iomgr/buffer_pool.c @@ -37,6 +37,7 @@ #include #include +#include #include #include "src/core/lib/iomgr/combiner.h" @@ -62,6 +63,8 @@ struct grpc_buffer_pool { grpc_closure bpreclaimation_done_closure; grpc_buffer_user *roots[GRPC_BULIST_COUNT]; + + char *name; }; /******************************************************************************* @@ -175,8 +178,18 @@ static bool bpalloc(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool) { gpr_mu_lock(&buffer_user->mu); if (buffer_user->free_pool < 0 && -buffer_user->free_pool <= buffer_pool->free_pool) { - buffer_pool->free_pool += buffer_user->free_pool; + int64_t amt = -buffer_user->free_pool; buffer_user->free_pool = 0; + buffer_pool->free_pool -= amt; + if (grpc_buffer_pool_trace) { + gpr_log(GPR_DEBUG, "BP %s %s: grant alloc %" PRId64 + " bytes; bp_free_pool -> %" PRId64, + buffer_pool->name, buffer_user->name, amt, + buffer_pool->free_pool); + } + } else if (grpc_buffer_pool_trace && buffer_user->free_pool >= 0) { + gpr_log(GPR_DEBUG, "BP %s %s: discard already satisfied alloc request", + buffer_pool->name, buffer_user->name); } if (buffer_user->free_pool >= 0) { buffer_user->allocating = false; @@ -198,8 +211,15 @@ static bool bpscavenge(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool) { bulist_pop(buffer_pool, GRPC_BULIST_NON_EMPTY_FREE_POOL))) { gpr_mu_lock(&buffer_user->mu); if (buffer_user->free_pool > 0) { - buffer_pool->free_pool += buffer_user->free_pool; + int64_t amt = buffer_user->free_pool; buffer_user->free_pool = 0; + buffer_pool->free_pool += amt; + if (grpc_buffer_pool_trace) { + gpr_log(GPR_DEBUG, "BP %s %s: scavenge %" PRId64 + " bytes; bp_free_pool -> %" PRId64, + buffer_pool->name, buffer_user->name, amt, + buffer_pool->free_pool); + } gpr_mu_unlock(&buffer_user->mu); return true; } else { @@ -217,6 +237,10 @@ static bool bpreclaim(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool, : GRPC_BULIST_RECLAIMER_BENIGN; grpc_buffer_user *buffer_user = bulist_pop(buffer_pool, list); if (buffer_user == NULL) return false; + if (grpc_buffer_pool_trace) { + gpr_log(GPR_DEBUG, "BP %s %s: initiate %s reclaimation", buffer_pool->name, + buffer_user->name, destructive ? "destructive" : "benign"); + } buffer_pool->reclaiming = true; grpc_closure *c = buffer_user->reclaimers[destructive]; buffer_user->reclaimers[destructive] = NULL; @@ -384,7 +408,7 @@ static void bp_reclaimation_done(grpc_exec_ctx *exec_ctx, void *bp, * grpc_buffer_pool api */ -grpc_buffer_pool *grpc_buffer_pool_create(void) { +grpc_buffer_pool *grpc_buffer_pool_create(const char *name) { grpc_buffer_pool *buffer_pool = gpr_malloc(sizeof(*buffer_pool)); gpr_ref_init(&buffer_pool->refs, 1); buffer_pool->combiner = grpc_combiner_create(NULL); @@ -392,6 +416,12 @@ grpc_buffer_pool *grpc_buffer_pool_create(void) { buffer_pool->size = INT64_MAX; buffer_pool->step_scheduled = false; buffer_pool->reclaiming = false; + if (name != NULL) { + buffer_pool->name = gpr_strdup(name); + } else { + gpr_asprintf(&buffer_pool->name, "anonymous_pool_%" PRIxPTR, + (intptr_t)buffer_pool); + } grpc_closure_init(&buffer_pool->bpstep_closure, bpstep, buffer_pool); grpc_closure_init(&buffer_pool->bpreclaimation_done_closure, bp_reclaimation_done, buffer_pool); @@ -451,7 +481,7 @@ grpc_buffer_pool *grpc_buffer_pool_from_channel_args( } } } - return grpc_buffer_pool_create(); + return grpc_buffer_pool_create(NULL); } static void *bp_copy(void *bp) { @@ -473,7 +503,7 @@ const grpc_arg_pointer_vtable *grpc_buffer_pool_arg_vtable(void) { */ void grpc_buffer_user_init(grpc_buffer_user *buffer_user, - grpc_buffer_pool *buffer_pool) { + grpc_buffer_pool *buffer_pool, const char *name) { buffer_user->buffer_pool = grpc_buffer_pool_internal_ref(buffer_pool); grpc_closure_init(&buffer_user->allocate_closure, &bu_allocate, buffer_user); grpc_closure_init(&buffer_user->add_to_free_pool_closure, @@ -498,6 +528,12 @@ void grpc_buffer_user_init(grpc_buffer_user *buffer_user, #ifndef NDEBUG buffer_user->asan_canary = gpr_malloc(1); #endif + if (name != NULL) { + buffer_user->name = gpr_strdup(name); + } else { + gpr_asprintf(&buffer_user->name, "anonymous_buffer_user_%" PRIxPTR, + (intptr_t)buffer_user); + } } void grpc_buffer_user_shutdown(grpc_exec_ctx *exec_ctx, @@ -533,6 +569,10 @@ void grpc_buffer_user_alloc(grpc_exec_ctx *exec_ctx, &buffer_user->on_done_destroy_closure); if (on_done_destroy != NULL) { /* already shutdown */ + if (grpc_buffer_pool_trace) { + gpr_log(GPR_DEBUG, "BP %s %s: alloc %" PRIdPTR " after shutdown", + buffer_user->buffer_pool->name, buffer_user->name, size); + } grpc_exec_ctx_sched( exec_ctx, optional_on_done, GRPC_ERROR_CREATE("Buffer pool user is already shutdown"), NULL); @@ -541,6 +581,12 @@ void grpc_buffer_user_alloc(grpc_exec_ctx *exec_ctx, } buffer_user->allocated += (int64_t)size; buffer_user->free_pool -= (int64_t)size; + if (grpc_buffer_pool_trace) { + gpr_log(GPR_DEBUG, "BP %s %s: alloc %" PRIdPTR "; allocated -> %" PRId64 + ", free_pool -> %" PRId64, + buffer_user->buffer_pool->name, buffer_user->name, size, + buffer_user->allocated, buffer_user->free_pool); + } if (buffer_user->free_pool < 0) { grpc_closure_list_append(&buffer_user->on_allocated, optional_on_done, GRPC_ERROR_NONE); @@ -563,6 +609,12 @@ void grpc_buffer_user_free(grpc_exec_ctx *exec_ctx, bool was_zero_or_negative = buffer_user->free_pool <= 0; buffer_user->free_pool += (int64_t)size; buffer_user->allocated -= (int64_t)size; + if (grpc_buffer_pool_trace) { + gpr_log(GPR_DEBUG, "BP %s %s: free %" PRIdPTR "; allocated -> %" PRId64 + ", free_pool -> %" PRId64, + buffer_user->buffer_pool->name, buffer_user->name, size, + buffer_user->allocated, buffer_user->free_pool); + } bool is_bigger_than_zero = buffer_user->free_pool > 0; if (is_bigger_than_zero && was_zero_or_negative && !buffer_user->added_to_free_pool) { @@ -597,6 +649,10 @@ void grpc_buffer_user_post_reclaimer(grpc_exec_ctx *exec_ctx, void grpc_buffer_user_finish_reclaimation(grpc_exec_ctx *exec_ctx, grpc_buffer_user *buffer_user) { + if (grpc_buffer_pool_trace) { + gpr_log(GPR_DEBUG, "BP %s %s: reclaimation complete", + buffer_user->buffer_pool->name, buffer_user->name); + } grpc_combiner_execute(exec_ctx, buffer_user->buffer_pool->combiner, &buffer_user->buffer_pool->bpreclaimation_done_closure, GRPC_ERROR_NONE, false); diff --git a/src/core/lib/iomgr/buffer_pool.h b/src/core/lib/iomgr/buffer_pool.h index 301e059c18..1564872b5d 100644 --- a/src/core/lib/iomgr/buffer_pool.h +++ b/src/core/lib/iomgr/buffer_pool.h @@ -38,6 +38,8 @@ #include "src/core/lib/iomgr/exec_ctx.h" +extern int grpc_buffer_pool_trace; + grpc_buffer_pool *grpc_buffer_pool_internal_ref(grpc_buffer_pool *buffer_pool); void grpc_buffer_pool_internal_unref(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool); @@ -83,10 +85,12 @@ struct grpc_buffer_user { gpr_atm on_done_destroy_closure; grpc_buffer_user_link links[GRPC_BULIST_COUNT]; + + char *name; }; void grpc_buffer_user_init(grpc_buffer_user *buffer_user, - grpc_buffer_pool *buffer_pool); + grpc_buffer_pool *buffer_pool, const char *name); void grpc_buffer_user_shutdown(grpc_exec_ctx *exec_ctx, grpc_buffer_user *buffer_user, grpc_closure *on_done); diff --git a/src/core/lib/iomgr/tcp_client_posix.c b/src/core/lib/iomgr/tcp_client_posix.c index cf01623f09..4e8f9e53bb 100644 --- a/src/core/lib/iomgr/tcp_client_posix.c +++ b/src/core/lib/iomgr/tcp_client_posix.c @@ -125,7 +125,7 @@ grpc_endpoint *grpc_tcp_client_create_from_fd( grpc_exec_ctx *exec_ctx, grpc_fd *fd, const grpc_channel_args *channel_args, const char *addr_str) { size_t tcp_read_chunk_size = GRPC_TCP_DEFAULT_READ_SLICE_SIZE; - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(NULL); if (channel_args != NULL) { for (size_t i = 0; i < channel_args->num_args; i++) { if (0 == diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 812c39235b..120622e817 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -544,7 +544,7 @@ grpc_endpoint *grpc_tcp_create(grpc_fd *em_fd, grpc_buffer_pool *buffer_pool, tcp->write_closure.cb = tcp_handle_write; tcp->write_closure.cb_arg = tcp; gpr_slice_buffer_init(&tcp->last_read_buffer); - grpc_buffer_user_init(&tcp->buffer_user, buffer_pool); + grpc_buffer_user_init(&tcp->buffer_user, buffer_pool, peer_string); grpc_buffer_user_slice_allocator_init( &tcp->slice_allocator, &tcp->buffer_user, tcp_read_allocation_done, tcp); /* Tell network status tracker about new endpoint */ diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index 3304152385..4d36fd4caf 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -163,7 +163,7 @@ grpc_error *grpc_tcp_server_create(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s = gpr_malloc(sizeof(grpc_tcp_server)); s->so_reuseport = has_so_reuseport; - s->buffer_pool = grpc_buffer_pool_create(); + s->buffer_pool = grpc_buffer_pool_create(NULL); for (size_t i = 0; i < (args == NULL ? 0 : args->num_args); i++) { if (0 == strcmp(GRPC_ARG_ALLOW_REUSEPORT, args->args[i].key)) { if (args->args[i].type == GRPC_ARG_INTEGER) { diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.c b/src/core/lib/security/credentials/google_default/google_default_credentials.c index 3bcde3da8b..4e703aa9f4 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.c +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.c @@ -124,7 +124,8 @@ static int is_stack_running_on_compute_engine(void) { grpc_httpcli_context_init(&context); - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_buffer_pool *buffer_pool = + grpc_buffer_pool_create("google_default_credentials"); grpc_httpcli_get( &exec_ctx, &context, &detector.pollent, buffer_pool, &request, gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), max_detection_delay), diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.c b/src/core/lib/security/credentials/jwt/jwt_verifier.c index c1a3eb7eab..ffcd0b3910 100644 --- a/src/core/lib/security/credentials/jwt/jwt_verifier.c +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.c @@ -660,7 +660,7 @@ static void on_openid_config_retrieved(grpc_exec_ctx *exec_ctx, void *user_data, /* TODO(ctiller): Carry the buffer_pool in ctx and share it with the host channel. This would allow us to cancel an authentication query when under extreme memory pressure. */ - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("jwt_verifier"); grpc_httpcli_get( exec_ctx, &ctx->verifier->http_ctx, &ctx->pollent, buffer_pool, &req, gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), grpc_jwt_verifier_max_delay), @@ -772,7 +772,7 @@ static void retrieve_key_and_verify(grpc_exec_ctx *exec_ctx, /* TODO(ctiller): Carry the buffer_pool in ctx and share it with the host channel. This would allow us to cancel an authentication query when under extreme memory pressure. */ - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("jwt_verifier"); grpc_httpcli_get( exec_ctx, &ctx->verifier->http_ctx, &ctx->pollent, buffer_pool, &req, gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), grpc_jwt_verifier_max_delay), diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.c b/src/core/lib/security/credentials/oauth2/oauth2_credentials.c index e9e83d1468..61c0815b2a 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.c +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.c @@ -310,7 +310,7 @@ static void compute_engine_fetch_oauth2( /* TODO(ctiller): Carry the buffer_pool in ctx and share it with the host channel. This would allow us to cancel an authentication query when under extreme memory pressure. */ - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("oauth2_credentials"); grpc_httpcli_get(exec_ctx, httpcli_context, pollent, buffer_pool, &request, deadline, grpc_closure_create(response_cb, metadata_req), &metadata_req->response); @@ -365,7 +365,8 @@ static void refresh_token_fetch_oauth2( /* TODO(ctiller): Carry the buffer_pool in ctx and share it with the host channel. This would allow us to cancel an authentication query when under extreme memory pressure. */ - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_buffer_pool *buffer_pool = + grpc_buffer_pool_create("oauth2_credentials_refresh"); grpc_httpcli_post(exec_ctx, httpcli_context, pollent, buffer_pool, &request, body, strlen(body), deadline, grpc_closure_create(response_cb, metadata_req), diff --git a/src/core/lib/surface/init.c b/src/core/lib/surface/init.c index 3cbbaa7b0c..de913af4ee 100644 --- a/src/core/lib/surface/init.c +++ b/src/core/lib/surface/init.c @@ -48,6 +48,7 @@ #include "src/core/lib/channel/message_size_filter.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/http/parser.h" +#include "src/core/lib/iomgr/buffer_pool.h" #include "src/core/lib/iomgr/combiner.h" #include "src/core/lib/iomgr/executor.h" #include "src/core/lib/iomgr/iomgr.h" @@ -184,6 +185,7 @@ void grpc_init(void) { // Default timeout trace to 1 grpc_cq_event_timeout_trace = 1; grpc_register_tracer("op_failure", &grpc_trace_operation_failures); + grpc_register_tracer("buffer_pool", &grpc_buffer_pool_trace); #ifndef NDEBUG grpc_register_tracer("pending_tags", &grpc_trace_pending_tags); #endif diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index 4926275fa2..703ea59e6e 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -347,7 +347,7 @@ extern grpc_is_binary_header_type grpc_is_binary_header_import; typedef const char *(*grpc_call_error_to_string_type)(grpc_call_error error); extern grpc_call_error_to_string_type grpc_call_error_to_string_import; #define grpc_call_error_to_string grpc_call_error_to_string_import -typedef grpc_buffer_pool *(*grpc_buffer_pool_create_type)(void); +typedef grpc_buffer_pool *(*grpc_buffer_pool_create_type)(const char *trace_name); extern grpc_buffer_pool_create_type grpc_buffer_pool_create_import; #define grpc_buffer_pool_create grpc_buffer_pool_create_import typedef void(*grpc_buffer_pool_ref_type)(grpc_buffer_pool *buffer_pool); diff --git a/test/core/end2end/tests/buffer_pool_server.c b/test/core/end2end/tests/buffer_pool_server.c index 0b06efd02e..7f07ec79d5 100644 --- a/test/core/end2end/tests/buffer_pool_server.c +++ b/test/core/end2end/tests/buffer_pool_server.c @@ -95,9 +95,235 @@ static void end_test(grpc_end2end_test_fixture *f) { grpc_completion_queue_destroy(f->cq); } +/* Creates and returns a gpr_slice containing random alphanumeric characters. */ +static gpr_slice generate_random_slice() { + size_t i; + static const char chars[] = "abcdefghijklmnopqrstuvwxyz1234567890"; + char output[1024 * 1024]; + for (i = 0; i < GPR_ARRAY_SIZE(output) - 1; ++i) { + output[i] = chars[rand() % (int)(sizeof(chars) - 1)]; + } + output[GPR_ARRAY_SIZE(output) - 1] = '\0'; + return gpr_slice_from_copied_string(output); +} + void buffer_pool_server(grpc_end2end_test_config config) { + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("test_server"); + grpc_buffer_pool_resize(buffer_pool, 5 * 1024 * 1024); + +#define NUM_CALLS 100 +#define CLIENT_BASE_TAG 1000 +#define SERVER_START_BASE_TAG 2000 +#define SERVER_RECV_BASE_TAG 3000 +#define SERVER_END_BASE_TAG 4000 + + grpc_arg arg; + arg.key = GRPC_ARG_BUFFER_POOL; + arg.type = GRPC_ARG_POINTER; + arg.value.pointer.p = buffer_pool; + arg.value.pointer.vtable = grpc_buffer_pool_arg_vtable(); + grpc_channel_args args = {1, &arg}; + grpc_end2end_test_fixture f = - begin_test(config, "buffer_pool_server", NULL, NULL); + begin_test(config, "buffer_pool_server", NULL, &args); + + /* Create large request and response bodies. These are big enough to require + * multiple round trips to deliver to the peer, and their exact contents of + * will be verified on completion. */ + gpr_slice request_payload_slice = generate_random_slice(); + + grpc_call *client_calls[NUM_CALLS]; + grpc_call *server_calls[NUM_CALLS]; + grpc_metadata_array initial_metadata_recv[NUM_CALLS]; + grpc_metadata_array trailing_metadata_recv[NUM_CALLS]; + grpc_metadata_array request_metadata_recv[NUM_CALLS]; + grpc_call_details call_details[NUM_CALLS]; + grpc_status_code status[NUM_CALLS]; + char *details[NUM_CALLS]; + size_t details_capacity[NUM_CALLS]; + grpc_byte_buffer *request_payload_recv[NUM_CALLS]; + int was_cancelled[NUM_CALLS]; + grpc_call_error error; + int pending_client_calls = 0; + int pending_server_start_calls = 0; + int pending_server_recv_calls = 0; + int pending_server_end_calls = 0; + int cancelled_calls_on_client = 0; + int cancelled_calls_on_server = 0; + + grpc_byte_buffer *request_payload = + grpc_raw_byte_buffer_create(&request_payload_slice, 1); + + grpc_op ops[6]; + grpc_op *op; + + for (int i = 0; i < NUM_CALLS; i++) { + grpc_metadata_array_init(&initial_metadata_recv[i]); + grpc_metadata_array_init(&trailing_metadata_recv[i]); + grpc_metadata_array_init(&request_metadata_recv[i]); + grpc_call_details_init(&call_details[i]); + details[i] = NULL; + details_capacity[i] = 0; + request_payload_recv[i] = NULL; + was_cancelled[i] = 0; + } + + for (int i = 0; i < NUM_CALLS; i++) { + error = grpc_server_request_call( + f.server, &server_calls[i], &call_details[i], &request_metadata_recv[i], + f.cq, f.cq, tag(SERVER_START_BASE_TAG + i)); + GPR_ASSERT(GRPC_CALL_OK == error); + + pending_server_start_calls++; + } + + for (int i = 0; i < NUM_CALLS; i++) { + client_calls[i] = grpc_channel_create_call( + f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo", + "foo.test.google.fr", n_seconds_time(60), NULL); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message = request_payload; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata = &initial_metadata_recv[i]; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; + op->data.recv_status_on_client.trailing_metadata = + &trailing_metadata_recv[i]; + op->data.recv_status_on_client.status = &status[i]; + op->data.recv_status_on_client.status_details = &details[i]; + op->data.recv_status_on_client.status_details_capacity = + &details_capacity[i]; + op->flags = 0; + op->reserved = NULL; + op++; + error = grpc_call_start_batch(client_calls[i], ops, (size_t)(op - ops), + tag(CLIENT_BASE_TAG + i), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + + pending_client_calls++; + } + + while (pending_client_calls + pending_server_recv_calls + + pending_server_end_calls > + 0) { + gpr_log(GPR_DEBUG, + "pending: client_calls=%d server_start_calls=%d " + "server_recv_calls=%d server_end_calls=%d", + pending_client_calls, pending_server_start_calls, + pending_server_recv_calls, pending_server_end_calls); + + grpc_event ev = grpc_completion_queue_next(f.cq, n_seconds_time(10), NULL); + GPR_ASSERT(ev.type == GRPC_OP_COMPLETE); + + int ev_tag = (int)(intptr_t)ev.tag; + if (ev_tag < CLIENT_BASE_TAG) { + abort(); /* illegal tag */ + } else if (ev_tag < SERVER_START_BASE_TAG) { + /* client call finished */ + int call_id = ev_tag - CLIENT_BASE_TAG; + GPR_ASSERT(call_id >= 0); + GPR_ASSERT(call_id < NUM_CALLS); + switch (status[call_id]) { + case GRPC_STATUS_RESOURCE_EXHAUSTED: + cancelled_calls_on_client++; + break; + case GRPC_STATUS_OK: + break; + default: + gpr_log(GPR_ERROR, "Unexpected status code: %d", status[call_id]); + abort(); + } + GPR_ASSERT(pending_client_calls > 0); + pending_client_calls--; + } else if (ev_tag < SERVER_RECV_BASE_TAG) { + /* new incoming call to the server */ + int call_id = ev_tag - SERVER_START_BASE_TAG; + GPR_ASSERT(call_id >= 0); + GPR_ASSERT(call_id < NUM_CALLS); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message = &request_payload_recv[call_id]; + op->flags = 0; + op->reserved = NULL; + op++; + error = + grpc_call_start_batch(server_calls[call_id], ops, (size_t)(op - ops), + tag(SERVER_RECV_BASE_TAG + call_id), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + + GPR_ASSERT(pending_server_start_calls > 0); + pending_server_start_calls--; + pending_server_recv_calls++; + } else if (ev_tag < SERVER_END_BASE_TAG) { + /* finished read on the server */ + int call_id = ev_tag - SERVER_RECV_BASE_TAG; + GPR_ASSERT(call_id >= 0); + GPR_ASSERT(call_id < NUM_CALLS); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled[call_id]; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + op->data.send_status_from_server.status = GRPC_STATUS_OK; + op->data.send_status_from_server.status_details = "xyz"; + op->flags = 0; + op->reserved = NULL; + op++; + error = + grpc_call_start_batch(server_calls[call_id], ops, (size_t)(op - ops), + tag(SERVER_END_BASE_TAG + call_id), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + + GPR_ASSERT(pending_server_recv_calls > 0); + pending_server_recv_calls--; + pending_server_end_calls++; + } else { + int call_id = ev_tag - SERVER_END_BASE_TAG; + GPR_ASSERT(call_id >= 0); + GPR_ASSERT(call_id < NUM_CALLS); + + if (was_cancelled[call_id]) { + cancelled_calls_on_server++; + } + GPR_ASSERT(pending_server_end_calls > 0); + pending_server_end_calls--; + } + } + + gpr_log( + GPR_INFO, + "Done. %d total calls: %d cancelled at server, %d cancelled at client.", + NUM_CALLS, cancelled_calls_on_server, cancelled_calls_on_client); + end_test(&f); config.tear_down_data(&f); } diff --git a/test/core/util/mock_endpoint.c b/test/core/util/mock_endpoint.c index dcb4e5896f..a70de7678c 100644 --- a/test/core/util/mock_endpoint.c +++ b/test/core/util/mock_endpoint.c @@ -33,6 +33,8 @@ #include "test/core/util/mock_endpoint.h" +#include + #include #include @@ -88,7 +90,8 @@ static void unref(grpc_exec_ctx *exec_ctx, grpc_mock_endpoint *m) { } } -static void me_finish_shutdown(grpc_exec_ctx *exec_ctx, void *me, grpc_error *error) { +static void me_finish_shutdown(grpc_exec_ctx *exec_ctx, void *me, + grpc_error *error) { grpc_mock_endpoint *m = me; unref(exec_ctx, m); } @@ -108,7 +111,7 @@ static void me_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { static void me_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_mock_endpoint *m = (grpc_mock_endpoint *)ep; - unref(exec_ctx,m); + unref(exec_ctx, m); } static char *me_get_peer(grpc_endpoint *ep) { @@ -139,7 +142,10 @@ grpc_endpoint *grpc_mock_endpoint_create(void (*on_write)(gpr_slice slice), grpc_mock_endpoint *m = gpr_malloc(sizeof(*m)); m->base.vtable = &vtable; m->refs = 2; - grpc_buffer_user_init(&m->buffer_user, buffer_pool); + char *name; + gpr_asprintf(&name, "mock_endpoint_%" PRIxPTR, (intptr_t)m); + grpc_buffer_user_init(&m->buffer_user, buffer_pool, name); + gpr_free(name); gpr_slice_buffer_init(&m->read_buffer); gpr_mu_init(&m->mu); m->on_write = on_write; diff --git a/test/core/util/passthru_endpoint.c b/test/core/util/passthru_endpoint.c index bdf75ce587..a1aaeda916 100644 --- a/test/core/util/passthru_endpoint.c +++ b/test/core/util/passthru_endpoint.c @@ -33,6 +33,8 @@ #include "test/core/util/passthru_endpoint.h" +#include + #include #include @@ -141,7 +143,7 @@ static void me_really_destroy(grpc_exec_ctx *exec_ctx, void *ep, static void me_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { half *m = (half *)ep; grpc_buffer_user_shutdown(exec_ctx, &m->buffer_user, - grpc_closure_create(me_really_destroy, m)); + grpc_closure_create(me_really_destroy, m)); } static char *me_get_peer(grpc_endpoint *ep) { @@ -168,12 +170,16 @@ static const grpc_endpoint_vtable vtable = { }; static void half_init(half *m, passthru_endpoint *parent, - grpc_buffer_pool *buffer_pool) { + grpc_buffer_pool *buffer_pool, const char *half_name) { m->base.vtable = &vtable; m->parent = parent; gpr_slice_buffer_init(&m->read_buffer); m->on_read = NULL; - grpc_buffer_user_init(&m->buffer_user, buffer_pool); + char *name; + gpr_asprintf(&name, "passthru_endpoint_%s_%" PRIxPTR, half_name, + (intptr_t)parent); + grpc_buffer_user_init(&m->buffer_user, buffer_pool, name); + gpr_free(name); } void grpc_passthru_endpoint_create(grpc_endpoint **client, @@ -182,8 +188,8 @@ void grpc_passthru_endpoint_create(grpc_endpoint **client, passthru_endpoint *m = gpr_malloc(sizeof(*m)); m->halves = 2; m->shutdown = 0; - half_init(&m->client, m, buffer_pool); - half_init(&m->server, m, buffer_pool); + half_init(&m->client, m, buffer_pool, "client"); + half_init(&m->server, m, buffer_pool, "server"); gpr_mu_init(&m->mu); *client = &m->client.base; *server = &m->server.base; diff --git a/test/core/util/port_server_client.c b/test/core/util/port_server_client.c index dd444236e9..9bd34677cb 100644 --- a/test/core/util/port_server_client.c +++ b/test/core/util/port_server_client.c @@ -49,6 +49,8 @@ #include "src/core/lib/http/httpcli.h" +int grpc_buffer_pool_trace = 0; + typedef struct freereq { gpr_mu *mu; grpc_polling_entity pops; @@ -99,7 +101,8 @@ void grpc_free_port_using_server(char *server, int port) { req.http.path = path; grpc_httpcli_context_init(&context); - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_buffer_pool *buffer_pool = + grpc_buffer_pool_create("port_server_client/free"); grpc_httpcli_get(&exec_ctx, &context, &pr.pops, buffer_pool, &req, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), grpc_closure_create(freed_port_from_server, &pr), &rsp); @@ -169,7 +172,8 @@ static void got_port_from_server(grpc_exec_ctx *exec_ctx, void *arg, req.http.path = "/get"; grpc_http_response_destroy(&pr->response); memset(&pr->response, 0, sizeof(pr->response)); - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_buffer_pool *buffer_pool = + grpc_buffer_pool_create("port_server_client/pick_retry"); grpc_httpcli_get(exec_ctx, pr->ctx, &pr->pops, buffer_pool, &req, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), grpc_closure_create(got_port_from_server, pr), @@ -215,7 +219,8 @@ int grpc_pick_port_using_server(char *server) { req.http.path = "/get"; grpc_httpcli_context_init(&context); - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_buffer_pool *buffer_pool = + grpc_buffer_pool_create("port_server_client/pick"); grpc_httpcli_get(&exec_ctx, &context, &pr.pops, buffer_pool, &req, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), grpc_closure_create(got_port_from_server, &pr), -- cgit v1.2.3 From 69a1f6600534bda7d7d9f35222740e49746aed11 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 28 Sep 2016 10:24:21 -0700 Subject: Complete integration test for buffer pools --- Makefile | 2 - .../transport/chttp2/transport/chttp2_transport.c | 14 +- src/core/lib/iomgr/buffer_pool.c | 2 + src/core/lib/surface/call.c | 6 +- test/core/end2end/end2end_nosec_tests.c | 8 - test/core/end2end/end2end_tests.c | 8 - test/core/end2end/gen_build_yaml.py | 1 - test/core/end2end/tests/buffer_pool_client.c | 105 ---- test/core/end2end/tests/buffer_pool_server.c | 20 + tools/run_tests/sources_and_headers.json | 2 - tools/run_tests/tests.json | 669 +-------------------- .../end2end_nosec_tests.vcxproj | 2 - .../end2end_nosec_tests.vcxproj.filters | 3 - .../tests/end2end_tests/end2end_tests.vcxproj | 2 - .../end2end_tests/end2end_tests.vcxproj.filters | 3 - 15 files changed, 44 insertions(+), 803 deletions(-) delete mode 100644 test/core/end2end/tests/buffer_pool_client.c (limited to 'src/core/lib') diff --git a/Makefile b/Makefile index 92bcc104ee..305066816e 100644 --- a/Makefile +++ b/Makefile @@ -6760,7 +6760,6 @@ LIBEND2END_TESTS_SRC = \ test/core/end2end/end2end_tests.c \ test/core/end2end/tests/bad_hostname.c \ test/core/end2end/tests/binary_metadata.c \ - test/core/end2end/tests/buffer_pool_client.c \ test/core/end2end/tests/buffer_pool_server.c \ test/core/end2end/tests/call_creds.c \ test/core/end2end/tests/cancel_after_accept.c \ @@ -6845,7 +6844,6 @@ LIBEND2END_NOSEC_TESTS_SRC = \ test/core/end2end/end2end_nosec_tests.c \ test/core/end2end/tests/bad_hostname.c \ test/core/end2end/tests/binary_metadata.c \ - test/core/end2end/tests/buffer_pool_client.c \ test/core/end2end/tests/buffer_pool_server.c \ test/core/end2end/tests/cancel_after_accept.c \ test/core/end2end/tests/cancel_after_client_done.c \ diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 13241f6abe..74dab8b588 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -2131,15 +2131,17 @@ static void benign_reclaimer_locked(grpc_exec_ctx *exec_ctx, void *arg, } send_goaway(exec_ctx, t, GRPC_CHTTP2_ENHANCE_YOUR_CALM, gpr_slice_from_static_string("Buffers full")); - } else if (grpc_buffer_pool_trace) { + } else if (error == GRPC_ERROR_NONE && grpc_buffer_pool_trace) { gpr_log(GPR_DEBUG, "HTTP2: %s - skip benign reclaimation, there are still %" PRIdPTR " streams", t->peer_string, grpc_chttp2_stream_map_size(&t->stream_map)); } t->benign_reclaimer_registered = false; - grpc_buffer_user_finish_reclaimation(exec_ctx, - grpc_endpoint_get_buffer_user(t->ep)); + if (error != GRPC_ERROR_CANCELLED) { + grpc_buffer_user_finish_reclaimation(exec_ctx, + grpc_endpoint_get_buffer_user(t->ep)); + } GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "benign_reclaimer"); } @@ -2162,8 +2164,10 @@ static void destructive_reclaimer_locked(grpc_exec_ctx *exec_ctx, void *arg, post_destructive_reclaimer(exec_ctx, t); } } - grpc_buffer_user_finish_reclaimation(exec_ctx, - grpc_endpoint_get_buffer_user(t->ep)); + if (error != GRPC_ERROR_CANCELLED) { + grpc_buffer_user_finish_reclaimation(exec_ctx, + grpc_endpoint_get_buffer_user(t->ep)); + } GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "destructive_reclaimer"); } diff --git a/src/core/lib/iomgr/buffer_pool.c b/src/core/lib/iomgr/buffer_pool.c index cfa171684b..1809d2120e 100644 --- a/src/core/lib/iomgr/buffer_pool.c +++ b/src/core/lib/iomgr/buffer_pool.c @@ -242,6 +242,7 @@ static bool bpreclaim(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool, buffer_user->name, destructive ? "destructive" : "benign"); } buffer_pool->reclaiming = true; + grpc_buffer_pool_internal_ref(buffer_pool); grpc_closure *c = buffer_user->reclaimers[destructive]; buffer_user->reclaimers[destructive] = NULL; grpc_closure_run(exec_ctx, c, GRPC_ERROR_NONE); @@ -402,6 +403,7 @@ static void bp_reclaimation_done(grpc_exec_ctx *exec_ctx, void *bp, grpc_buffer_pool *buffer_pool = bp; buffer_pool->reclaiming = false; bpstep_sched(exec_ctx, buffer_pool); + grpc_buffer_pool_internal_unref(exec_ctx, buffer_pool); } /******************************************************************************* diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 6b2badf71b..ed5546270b 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -1553,8 +1553,10 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx, call, STATUS_FROM_API_OVERRIDE, GRPC_MDSTR_REF(call->send_extra_metadata[1].md->value)); } - set_status_code(call, STATUS_FROM_API_OVERRIDE, - (uint32_t)op->data.send_status_from_server.status); + if (op->data.send_status_from_server.status != GRPC_STATUS_OK) { + set_status_code(call, STATUS_FROM_API_OVERRIDE, + (uint32_t)op->data.send_status_from_server.status); + } if (!prepare_application_metadata( call, (int)op->data.send_status_from_server.trailing_metadata_count, diff --git a/test/core/end2end/end2end_nosec_tests.c b/test/core/end2end/end2end_nosec_tests.c index aa38641a84..1c9332acc1 100644 --- a/test/core/end2end/end2end_nosec_tests.c +++ b/test/core/end2end/end2end_nosec_tests.c @@ -47,8 +47,6 @@ extern void bad_hostname(grpc_end2end_test_config config); extern void bad_hostname_pre_init(void); extern void binary_metadata(grpc_end2end_test_config config); extern void binary_metadata_pre_init(void); -extern void buffer_pool_client(grpc_end2end_test_config config); -extern void buffer_pool_client_pre_init(void); extern void buffer_pool_server(grpc_end2end_test_config config); extern void buffer_pool_server_pre_init(void); extern void cancel_after_accept(grpc_end2end_test_config config); @@ -139,7 +137,6 @@ void grpc_end2end_tests_pre_init(void) { g_pre_init_called = true; bad_hostname_pre_init(); binary_metadata_pre_init(); - buffer_pool_client_pre_init(); buffer_pool_server_pre_init(); cancel_after_accept_pre_init(); cancel_after_client_done_pre_init(); @@ -193,7 +190,6 @@ void grpc_end2end_tests(int argc, char **argv, if (argc <= 1) { bad_hostname(config); binary_metadata(config); - buffer_pool_client(config); buffer_pool_server(config); cancel_after_accept(config); cancel_after_client_done(config); @@ -248,10 +244,6 @@ void grpc_end2end_tests(int argc, char **argv, binary_metadata(config); continue; } - if (0 == strcmp("buffer_pool_client", argv[i])) { - buffer_pool_client(config); - continue; - } if (0 == strcmp("buffer_pool_server", argv[i])) { buffer_pool_server(config); continue; diff --git a/test/core/end2end/end2end_tests.c b/test/core/end2end/end2end_tests.c index cbd194dee1..cf0e4c8316 100644 --- a/test/core/end2end/end2end_tests.c +++ b/test/core/end2end/end2end_tests.c @@ -47,8 +47,6 @@ extern void bad_hostname(grpc_end2end_test_config config); extern void bad_hostname_pre_init(void); extern void binary_metadata(grpc_end2end_test_config config); extern void binary_metadata_pre_init(void); -extern void buffer_pool_client(grpc_end2end_test_config config); -extern void buffer_pool_client_pre_init(void); extern void buffer_pool_server(grpc_end2end_test_config config); extern void buffer_pool_server_pre_init(void); extern void call_creds(grpc_end2end_test_config config); @@ -141,7 +139,6 @@ void grpc_end2end_tests_pre_init(void) { g_pre_init_called = true; bad_hostname_pre_init(); binary_metadata_pre_init(); - buffer_pool_client_pre_init(); buffer_pool_server_pre_init(); call_creds_pre_init(); cancel_after_accept_pre_init(); @@ -196,7 +193,6 @@ void grpc_end2end_tests(int argc, char **argv, if (argc <= 1) { bad_hostname(config); binary_metadata(config); - buffer_pool_client(config); buffer_pool_server(config); call_creds(config); cancel_after_accept(config); @@ -252,10 +248,6 @@ void grpc_end2end_tests(int argc, char **argv, binary_metadata(config); continue; } - if (0 == strcmp("buffer_pool_client", argv[i])) { - buffer_pool_client(config); - continue; - } if (0 == strcmp("buffer_pool_server", argv[i])) { buffer_pool_server(config); continue; diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py index 4675b02edb..fef82a1619 100755 --- a/test/core/end2end/gen_build_yaml.py +++ b/test/core/end2end/gen_build_yaml.py @@ -88,7 +88,6 @@ LOWCPU = 0.1 END2END_TESTS = { 'bad_hostname': default_test_options, 'binary_metadata': default_test_options, - 'buffer_pool_client': default_test_options, 'buffer_pool_server': default_test_options, 'call_creds': default_test_options._replace(secure=True), 'cancel_after_accept': default_test_options._replace(cpu_cost=LOWCPU), diff --git a/test/core/end2end/tests/buffer_pool_client.c b/test/core/end2end/tests/buffer_pool_client.c deleted file mode 100644 index 27753d7d56..0000000000 --- a/test/core/end2end/tests/buffer_pool_client.c +++ /dev/null @@ -1,105 +0,0 @@ -/* - * - * Copyright 2016, 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. - * - */ - -#include "test/core/end2end/end2end_tests.h" - -#include -#include - -#include -#include -#include -#include -#include -#include "test/core/end2end/cq_verifier.h" - -static void *tag(intptr_t t) { return (void *)t; } - -static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, - const char *test_name, - grpc_channel_args *client_args, - grpc_channel_args *server_args) { - grpc_end2end_test_fixture f; - gpr_log(GPR_INFO, "%s/%s", test_name, config.name); - f = config.create_fixture(client_args, server_args); - config.init_server(&f, server_args); - config.init_client(&f, client_args); - return f; -} - -static gpr_timespec n_seconds_time(int n) { - return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(n); -} - -static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); } - -static void drain_cq(grpc_completion_queue *cq) { - grpc_event ev; - do { - ev = grpc_completion_queue_next(cq, five_seconds_time(), NULL); - } while (ev.type != GRPC_QUEUE_SHUTDOWN); -} - -static void shutdown_server(grpc_end2end_test_fixture *f) { - if (!f->server) return; - grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck( - f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) - .type == GRPC_OP_COMPLETE); - grpc_server_destroy(f->server); - f->server = NULL; -} - -static void shutdown_client(grpc_end2end_test_fixture *f) { - if (!f->client) return; - grpc_channel_destroy(f->client); - f->client = NULL; -} - -static void end_test(grpc_end2end_test_fixture *f) { - shutdown_server(f); - shutdown_client(f); - - grpc_completion_queue_shutdown(f->cq); - drain_cq(f->cq); - grpc_completion_queue_destroy(f->cq); -} - -void buffer_pool_client(grpc_end2end_test_config config) { - grpc_end2end_test_fixture f = - begin_test(config, "buffer_pool_client", NULL, NULL); - end_test(&f); - config.tear_down_data(&f); -} - -void buffer_pool_client_pre_init(void) {} diff --git a/test/core/end2end/tests/buffer_pool_server.c b/test/core/end2end/tests/buffer_pool_server.c index 70e42d28f4..40117c99b1 100644 --- a/test/core/end2end/tests/buffer_pool_server.c +++ b/test/core/end2end/tests/buffer_pool_server.c @@ -253,6 +253,11 @@ void buffer_pool_server(grpc_end2end_test_config config) { abort(); } GPR_ASSERT(pending_client_calls > 0); + + grpc_metadata_array_destroy(&initial_metadata_recv[call_id]); + grpc_metadata_array_destroy(&trailing_metadata_recv[call_id]); + grpc_call_destroy(client_calls[call_id]); + pending_client_calls--; } else if (ev_tag < SERVER_RECV_BASE_TAG) { /* new incoming call to the server */ @@ -280,12 +285,23 @@ void buffer_pool_server(grpc_end2end_test_config config) { GPR_ASSERT(pending_server_start_calls > 0); pending_server_start_calls--; pending_server_recv_calls++; + + grpc_call_details_destroy(&call_details[call_id]); } else if (ev_tag < SERVER_END_BASE_TAG) { /* finished read on the server */ int call_id = ev_tag - SERVER_RECV_BASE_TAG; GPR_ASSERT(call_id >= 0); GPR_ASSERT(call_id < NUM_CALLS); + if (ev.success) { + if (request_payload_recv[call_id] != NULL) { + grpc_byte_buffer_destroy(request_payload_recv[call_id]); + request_payload_recv[call_id] = NULL; + } + } else { + GPR_ASSERT(request_payload_recv[call_id] == NULL); + } + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; @@ -318,6 +334,8 @@ void buffer_pool_server(grpc_end2end_test_config config) { } GPR_ASSERT(pending_server_end_calls > 0); pending_server_end_calls--; + + grpc_call_destroy(server_calls[call_id]); } } @@ -326,6 +344,8 @@ void buffer_pool_server(grpc_end2end_test_config config) { "Done. %d total calls: %d cancelled at server, %d cancelled at client.", NUM_CALLS, cancelled_calls_on_server, cancelled_calls_on_client); + GPR_ASSERT(cancelled_calls_on_client == cancelled_calls_on_server); + end_test(&f); config.tear_down_data(&f); } diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 99d6e0bcd2..fd888f9abb 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -5636,7 +5636,6 @@ "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/bad_hostname.c", "test/core/end2end/tests/binary_metadata.c", - "test/core/end2end/tests/buffer_pool_client.c", "test/core/end2end/tests/buffer_pool_server.c", "test/core/end2end/tests/call_creds.c", "test/core/end2end/tests/cancel_after_accept.c", @@ -5703,7 +5702,6 @@ "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/bad_hostname.c", "test/core/end2end/tests/binary_metadata.c", - "test/core/end2end/tests/buffer_pool_client.c", "test/core/end2end/tests/buffer_pool_server.c", "test/core/end2end/tests/cancel_after_accept.c", "test/core/end2end/tests/cancel_after_client_done.c", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index cc7b98168a..b68966eac7 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -4582,28 +4582,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_client" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_census_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "buffer_pool_server" @@ -5594,28 +5572,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_client" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "buffer_pool_server" @@ -6604,27 +6560,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_client" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "buffer_pool_server" @@ -7568,26 +7503,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_client" - ], - "ci_platforms": [ - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fd_test", - "platforms": [ - "linux", - "mac", - "posix" - ] - }, { "args": [ "buffer_pool_server" @@ -8392,28 +8307,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_client" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "buffer_pool_server" @@ -9392,22 +9285,6 @@ "linux" ] }, - { - "args": [ - "buffer_pool_client" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, { "args": [ "buffer_pool_server" @@ -10140,28 +10017,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_client" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+trace_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "buffer_pool_server" @@ -11106,27 +10961,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_client" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_http_proxy_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "buffer_pool_server" @@ -12074,28 +11908,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_client" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_load_reporting_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "buffer_pool_server" @@ -13084,27 +12896,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_client" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "buffer_pool_server" @@ -14050,27 +13841,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_client" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "buffer_pool_server" @@ -14890,27 +14660,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_client" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "buffer_pool_server" @@ -15753,7 +15502,7 @@ }, { "args": [ - "buffer_pool_client" + "buffer_pool_server" ], "ci_platforms": [ "windows", @@ -15774,7 +15523,7 @@ }, { "args": [ - "buffer_pool_server" + "call_creds" ], "ci_platforms": [ "windows", @@ -15795,14 +15544,14 @@ }, { "args": [ - "call_creds" + "cancel_after_accept" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -15816,14 +15565,14 @@ }, { "args": [ - "cancel_after_accept" + "cancel_after_client_done" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -15837,14 +15586,14 @@ }, { "args": [ - "cancel_after_client_done" + "cancel_after_invoke" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -15858,28 +15607,7 @@ }, { "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "cancel_before_invoke" + "cancel_before_invoke" ], "ci_platforms": [ "windows", @@ -16570,27 +16298,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_client" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "buffer_pool_server" @@ -17433,28 +17140,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_client" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "buffer_pool_server" @@ -18445,28 +18130,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_client" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_cert_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "buffer_pool_server" @@ -19455,27 +19118,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_client" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "buffer_pool_server" @@ -20293,26 +19935,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_client" - ], - "ci_platforms": [ - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_uds_test", - "platforms": [ - "linux", - "mac", - "posix" - ] - }, { "args": [ "buffer_pool_server" @@ -21197,28 +20819,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_client" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_census_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "buffer_pool_server" @@ -22187,28 +21787,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_client" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "buffer_pool_server" @@ -23173,26 +22751,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_client" - ], - "ci_platforms": [ - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fd_nosec_test", - "platforms": [ - "linux", - "mac", - "posix" - ] - }, { "args": [ "buffer_pool_server" @@ -23977,28 +23535,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_client" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "buffer_pool_server" @@ -24955,22 +24491,6 @@ "linux" ] }, - { - "args": [ - "buffer_pool_client" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_nosec_test", - "platforms": [ - "linux" - ] - }, { "args": [ "buffer_pool_server" @@ -25687,28 +25207,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_client" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+trace_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "buffer_pool_server" @@ -26631,27 +26129,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_client" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_http_proxy_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "buffer_pool_server" @@ -27578,28 +27055,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_client" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_load_reporting_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "buffer_pool_server" @@ -28566,27 +28021,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_client" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "buffer_pool_server" @@ -29385,27 +28819,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_client" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "buffer_pool_server" @@ -30225,27 +29638,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_client" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "buffer_pool_server" @@ -31027,29 +30419,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_client" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [ - "msan" - ], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "buffer_pool_server" @@ -31941,26 +31310,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_client" - ], - "ci_platforms": [ - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_uds_nosec_test", - "platforms": [ - "linux", - "mac", - "posix" - ] - }, { "args": [ "buffer_pool_server" diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj index c9b6c35900..f2665cc39f 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj @@ -157,8 +157,6 @@ - - diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters index 828a4a7f81..a1ea12173d 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters @@ -10,9 +10,6 @@ test\core\end2end\tests - - test\core\end2end\tests - test\core\end2end\tests diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj index 5ab1d84132..0b8c1666ae 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj @@ -157,8 +157,6 @@ - - diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters index 34abc5e7fc..8577b1652a 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters @@ -10,9 +10,6 @@ test\core\end2end\tests - - test\core\end2end\tests - test\core\end2end\tests -- cgit v1.2.3 From 08d297e375dc207e1b90285dc859907c5a36b277 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 28 Sep 2016 10:35:53 -0700 Subject: Make all tests build again --- src/core/lib/iomgr/buffer_pool.c | 2 + test/core/bad_client/bad_client.c | 2 +- test/core/end2end/fixtures/h2_sockpair+trace.c | 2 +- test/core/end2end/fixtures/h2_sockpair.c | 2 +- test/core/end2end/fixtures/h2_sockpair_1byte.c | 2 +- test/core/end2end/fuzzers/api_fuzzer.c | 2 +- test/core/end2end/fuzzers/client_fuzzer.c | 2 +- test/core/end2end/fuzzers/server_fuzzer.c | 2 +- test/core/http/httpcli_test.c | 4 +- test/core/http/httpscli_test.c | 4 +- test/core/iomgr/buffer_pool_test.c | 92 ++++++++++++++------------ test/core/iomgr/endpoint_pair_test.c | 2 +- test/core/iomgr/fd_conservation_posix_test.c | 3 +- test/core/iomgr/tcp_posix_test.c | 11 +-- test/core/security/secure_endpoint_test.c | 3 +- test/core/util/port_server_client.c | 2 - 16 files changed, 75 insertions(+), 62 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/buffer_pool.c b/src/core/lib/iomgr/buffer_pool.c index 1809d2120e..f8e9e8ed6e 100644 --- a/src/core/lib/iomgr/buffer_pool.c +++ b/src/core/lib/iomgr/buffer_pool.c @@ -42,6 +42,8 @@ #include "src/core/lib/iomgr/combiner.h" +int grpc_buffer_pool_trace = 0; + typedef bool (*bpstate_func)(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool); diff --git a/test/core/bad_client/bad_client.c b/test/core/bad_client/bad_client.c index 06692fe969..60f0ab2106 100644 --- a/test/core/bad_client/bad_client.c +++ b/test/core/bad_client/bad_client.c @@ -114,7 +114,7 @@ void grpc_run_bad_client_test( grpc_init(); /* Create endpoints */ - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("bad_client_test"); sfd = grpc_iomgr_create_endpoint_pair("fixture", buffer_pool, 65536); grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); diff --git a/test/core/end2end/fixtures/h2_sockpair+trace.c b/test/core/end2end/fixtures/h2_sockpair+trace.c index fe16d05651..4a546e710e 100644 --- a/test/core/end2end/fixtures/h2_sockpair+trace.c +++ b/test/core/end2end/fixtures/h2_sockpair+trace.c @@ -91,7 +91,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair( f.fixture_data = sfd; f.cq = grpc_completion_queue_create(NULL); - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("fixture"); *sfd = grpc_iomgr_create_endpoint_pair("fixture", buffer_pool, 65536); grpc_buffer_pool_unref(buffer_pool); diff --git a/test/core/end2end/fixtures/h2_sockpair.c b/test/core/end2end/fixtures/h2_sockpair.c index 77847adb9c..f528f0b0b2 100644 --- a/test/core/end2end/fixtures/h2_sockpair.c +++ b/test/core/end2end/fixtures/h2_sockpair.c @@ -90,7 +90,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair( f.fixture_data = sfd; f.cq = grpc_completion_queue_create(NULL); - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("fixture"); *sfd = grpc_iomgr_create_endpoint_pair("fixture", buffer_pool, 65536); grpc_buffer_pool_unref(buffer_pool); diff --git a/test/core/end2end/fixtures/h2_sockpair_1byte.c b/test/core/end2end/fixtures/h2_sockpair_1byte.c index 04678f168a..293cdf278e 100644 --- a/test/core/end2end/fixtures/h2_sockpair_1byte.c +++ b/test/core/end2end/fixtures/h2_sockpair_1byte.c @@ -90,7 +90,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair( f.fixture_data = sfd; f.cq = grpc_completion_queue_create(NULL); - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("fixture"); *sfd = grpc_iomgr_create_endpoint_pair("fixture", buffer_pool, 1); grpc_buffer_pool_unref(buffer_pool); diff --git a/test/core/end2end/fuzzers/api_fuzzer.c b/test/core/end2end/fuzzers/api_fuzzer.c index 2d46989d11..f39a79ca19 100644 --- a/test/core/end2end/fuzzers/api_fuzzer.c +++ b/test/core/end2end/fuzzers/api_fuzzer.c @@ -522,7 +522,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { int pending_pings = 0; g_active_call = new_call(NULL, ROOT); - g_buffer_pool = grpc_buffer_pool_create(); + g_buffer_pool = grpc_buffer_pool_create("api_fuzzer"); grpc_completion_queue *cq = grpc_completion_queue_create(NULL); diff --git a/test/core/end2end/fuzzers/client_fuzzer.c b/test/core/end2end/fuzzers/client_fuzzer.c index 90c35e6ad9..55d04ec28a 100644 --- a/test/core/end2end/fuzzers/client_fuzzer.c +++ b/test/core/end2end/fuzzers/client_fuzzer.c @@ -58,7 +58,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_init(); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("client_fuzzer"); grpc_endpoint *mock_endpoint = grpc_mock_endpoint_create(discard_write, buffer_pool); grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); diff --git a/test/core/end2end/fuzzers/server_fuzzer.c b/test/core/end2end/fuzzers/server_fuzzer.c index cb34927c96..dd093e51ec 100644 --- a/test/core/end2end/fuzzers/server_fuzzer.c +++ b/test/core/end2end/fuzzers/server_fuzzer.c @@ -56,7 +56,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_init(); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("server_fuzzer"); grpc_endpoint *mock_endpoint = grpc_mock_endpoint_create(discard_write, buffer_pool); grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); diff --git a/test/core/http/httpcli_test.c b/test/core/http/httpcli_test.c index d1c6805b03..1ecfe219d4 100644 --- a/test/core/http/httpcli_test.c +++ b/test/core/http/httpcli_test.c @@ -89,7 +89,7 @@ static void test_get(int port) { grpc_http_response response; memset(&response, 0, sizeof(response)); - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("test_get"); grpc_httpcli_get(&exec_ctx, &g_context, &g_pops, buffer_pool, &req, n_seconds_time(15), grpc_closure_create(on_finish, &response), &response); @@ -129,7 +129,7 @@ static void test_post(int port) { grpc_http_response response; memset(&response, 0, sizeof(response)); - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("test_post"); grpc_httpcli_post(&exec_ctx, &g_context, &g_pops, buffer_pool, &req, "hello", 5, n_seconds_time(15), grpc_closure_create(on_finish, &response), &response); diff --git a/test/core/http/httpscli_test.c b/test/core/http/httpscli_test.c index 09ceec7208..51ca73fdc6 100644 --- a/test/core/http/httpscli_test.c +++ b/test/core/http/httpscli_test.c @@ -90,7 +90,7 @@ static void test_get(int port) { grpc_http_response response; memset(&response, 0, sizeof(response)); - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("test_get"); grpc_httpcli_get(&exec_ctx, &g_context, &g_pops, buffer_pool, &req, n_seconds_time(15), grpc_closure_create(on_finish, &response), &response); @@ -131,7 +131,7 @@ static void test_post(int port) { grpc_http_response response; memset(&response, 0, sizeof(response)); - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("test_post"); grpc_httpcli_post(&exec_ctx, &g_context, &g_pops, buffer_pool, &req, "hello", 5, n_seconds_time(15), grpc_closure_create(on_finish, &response), &response); diff --git a/test/core/iomgr/buffer_pool_test.c b/test/core/iomgr/buffer_pool_test.c index 5bc619b478..3a58fc73ae 100644 --- a/test/core/iomgr/buffer_pool_test.c +++ b/test/core/iomgr/buffer_pool_test.c @@ -91,31 +91,31 @@ static void destroy_user(grpc_buffer_user *usr) { static void test_no_op(void) { gpr_log(GPR_INFO, "** test_no_op **"); - grpc_buffer_pool_unref(grpc_buffer_pool_create()); + grpc_buffer_pool_unref(grpc_buffer_pool_create("test_no_op")); } static void test_resize_then_destroy(void) { gpr_log(GPR_INFO, "** test_resize_then_destroy **"); - grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool *p = grpc_buffer_pool_create("test_resize_then_destroy"); grpc_buffer_pool_resize(p, 1024 * 1024); grpc_buffer_pool_unref(p); } static void test_buffer_user_no_op(void) { gpr_log(GPR_INFO, "** test_buffer_user_no_op **"); - grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool *p = grpc_buffer_pool_create("test_buffer_user_no_op"); grpc_buffer_user usr; - grpc_buffer_user_init(&usr, p); + grpc_buffer_user_init(&usr, p, "usr"); grpc_buffer_pool_unref(p); destroy_user(&usr); } static void test_instant_alloc_then_free(void) { gpr_log(GPR_INFO, "** test_instant_alloc_then_free **"); - grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool *p = grpc_buffer_pool_create("test_instant_alloc_then_free"); grpc_buffer_pool_resize(p, 1024 * 1024); grpc_buffer_user usr; - grpc_buffer_user_init(&usr, p); + grpc_buffer_user_init(&usr, p, "usr"); { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_buffer_user_alloc(&exec_ctx, &usr, 1024, NULL); @@ -132,10 +132,10 @@ static void test_instant_alloc_then_free(void) { static void test_instant_alloc_free_pair(void) { gpr_log(GPR_INFO, "** test_instant_alloc_free_pair **"); - grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool *p = grpc_buffer_pool_create("test_instant_alloc_free_pair"); grpc_buffer_pool_resize(p, 1024 * 1024); grpc_buffer_user usr; - grpc_buffer_user_init(&usr, p); + grpc_buffer_user_init(&usr, p, "usr"); { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_buffer_user_alloc(&exec_ctx, &usr, 1024, NULL); @@ -148,10 +148,10 @@ static void test_instant_alloc_free_pair(void) { static void test_simple_async_alloc(void) { gpr_log(GPR_INFO, "** test_simple_async_alloc **"); - grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool *p = grpc_buffer_pool_create("test_simple_async_alloc"); grpc_buffer_pool_resize(p, 1024 * 1024); grpc_buffer_user usr; - grpc_buffer_user_init(&usr, p); + grpc_buffer_user_init(&usr, p, "usr"); { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -170,10 +170,11 @@ static void test_simple_async_alloc(void) { static void test_async_alloc_blocked_by_size(void) { gpr_log(GPR_INFO, "** test_async_alloc_blocked_by_size **"); - grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool *p = + grpc_buffer_pool_create("test_async_alloc_blocked_by_size"); grpc_buffer_pool_resize(p, 1); grpc_buffer_user usr; - grpc_buffer_user_init(&usr, p); + grpc_buffer_user_init(&usr, p, "usr"); bool done = false; { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -194,12 +195,12 @@ static void test_async_alloc_blocked_by_size(void) { static void test_scavenge(void) { gpr_log(GPR_INFO, "** test_scavenge **"); - grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool *p = grpc_buffer_pool_create("test_scavenge"); grpc_buffer_pool_resize(p, 1024); grpc_buffer_user usr1; grpc_buffer_user usr2; - grpc_buffer_user_init(&usr1, p); - grpc_buffer_user_init(&usr2, p); + grpc_buffer_user_init(&usr1, p, "usr1"); + grpc_buffer_user_init(&usr2, p, "usr2"); { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -231,12 +232,12 @@ static void test_scavenge(void) { static void test_scavenge_blocked(void) { gpr_log(GPR_INFO, "** test_scavenge_blocked **"); - grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool *p = grpc_buffer_pool_create("test_scavenge_blocked"); grpc_buffer_pool_resize(p, 1024); grpc_buffer_user usr1; grpc_buffer_user usr2; - grpc_buffer_user_init(&usr1, p); - grpc_buffer_user_init(&usr2, p); + grpc_buffer_user_init(&usr1, p, "usr1"); + grpc_buffer_user_init(&usr2, p, "usr2"); bool done; { done = false; @@ -270,10 +271,11 @@ static void test_scavenge_blocked(void) { static void test_blocked_until_scheduled_reclaim(void) { gpr_log(GPR_INFO, "** test_blocked_until_scheduled_reclaim **"); - grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool *p = + grpc_buffer_pool_create("test_blocked_until_scheduled_reclaim"); grpc_buffer_pool_resize(p, 1024); grpc_buffer_user usr; - grpc_buffer_user_init(&usr, p); + grpc_buffer_user_init(&usr, p, "usr"); { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -308,12 +310,13 @@ static void test_blocked_until_scheduled_reclaim(void) { static void test_blocked_until_scheduled_reclaim_and_scavenge(void) { gpr_log(GPR_INFO, "** test_blocked_until_scheduled_reclaim_and_scavenge **"); - grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool *p = grpc_buffer_pool_create( + "test_blocked_until_scheduled_reclaim_and_scavenge"); grpc_buffer_pool_resize(p, 1024); grpc_buffer_user usr1; grpc_buffer_user usr2; - grpc_buffer_user_init(&usr1, p); - grpc_buffer_user_init(&usr2, p); + grpc_buffer_user_init(&usr1, p, "usr1"); + grpc_buffer_user_init(&usr2, p, "usr2"); { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -349,10 +352,11 @@ static void test_blocked_until_scheduled_reclaim_and_scavenge(void) { static void test_blocked_until_scheduled_destructive_reclaim(void) { gpr_log(GPR_INFO, "** test_blocked_until_scheduled_destructive_reclaim **"); - grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool *p = grpc_buffer_pool_create( + "test_blocked_until_scheduled_destructive_reclaim"); grpc_buffer_pool_resize(p, 1024); grpc_buffer_user usr; - grpc_buffer_user_init(&usr, p); + grpc_buffer_user_init(&usr, p, "usr"); { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -387,10 +391,11 @@ static void test_blocked_until_scheduled_destructive_reclaim(void) { static void test_unused_reclaim_is_cancelled(void) { gpr_log(GPR_INFO, "** test_unused_reclaim_is_cancelled **"); - grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool *p = + grpc_buffer_pool_create("test_unused_reclaim_is_cancelled"); grpc_buffer_pool_resize(p, 1024); grpc_buffer_user usr; - grpc_buffer_user_init(&usr, p); + grpc_buffer_user_init(&usr, p, "usr"); bool benign_done = false; bool destructive_done = false; { @@ -412,10 +417,11 @@ static void test_unused_reclaim_is_cancelled(void) { static void test_benign_reclaim_is_preferred(void) { gpr_log(GPR_INFO, "** test_benign_reclaim_is_preferred **"); - grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool *p = + grpc_buffer_pool_create("test_benign_reclaim_is_preferred"); grpc_buffer_pool_resize(p, 1024); grpc_buffer_user usr; - grpc_buffer_user_init(&usr, p); + grpc_buffer_user_init(&usr, p, "usr"); bool benign_done = false; bool destructive_done = false; { @@ -459,10 +465,11 @@ static void test_benign_reclaim_is_preferred(void) { static void test_multiple_reclaims_can_be_triggered(void) { gpr_log(GPR_INFO, "** test_multiple_reclaims_can_be_triggered **"); - grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool *p = + grpc_buffer_pool_create("test_multiple_reclaims_can_be_triggered"); grpc_buffer_pool_resize(p, 1024); grpc_buffer_user usr; - grpc_buffer_user_init(&usr, p); + grpc_buffer_user_init(&usr, p, "usr"); bool benign_done = false; bool destructive_done = false; { @@ -507,10 +514,11 @@ static void test_multiple_reclaims_can_be_triggered(void) { static void test_buffer_user_stays_allocated_until_memory_released(void) { gpr_log(GPR_INFO, "** test_buffer_user_stays_allocated_until_memory_released **"); - grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool *p = grpc_buffer_pool_create( + "test_buffer_user_stays_allocated_until_memory_released"); grpc_buffer_pool_resize(p, 1024 * 1024); grpc_buffer_user usr; - grpc_buffer_user_init(&usr, p); + grpc_buffer_user_init(&usr, p, "usr"); bool done = false; { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -539,11 +547,12 @@ static void test_buffer_user_stays_allocated_until_memory_released(void) { static void test_pools_merged_on_buffer_user_deletion(void) { gpr_log(GPR_INFO, "** test_pools_merged_on_buffer_user_deletion **"); - grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool *p = + grpc_buffer_pool_create("test_pools_merged_on_buffer_user_deletion"); grpc_buffer_pool_resize(p, 1024); for (int i = 0; i < 10; i++) { grpc_buffer_user usr; - grpc_buffer_user_init(&usr, p); + grpc_buffer_user_init(&usr, p, "usr"); bool done = false; bool reclaimer_cancelled = false; { @@ -587,10 +596,11 @@ static void test_pools_merged_on_buffer_user_deletion(void) { static void test_reclaimers_can_be_posted_repeatedly(void) { gpr_log(GPR_INFO, "** test_reclaimers_can_be_posted_repeatedly **"); - grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool *p = + grpc_buffer_pool_create("test_reclaimers_can_be_posted_repeatedly"); grpc_buffer_pool_resize(p, 1024); grpc_buffer_user usr; - grpc_buffer_user_init(&usr, p); + grpc_buffer_user_init(&usr, p, "usr"); { bool allocated = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -629,11 +639,11 @@ static void test_reclaimers_can_be_posted_repeatedly(void) { static void test_one_slice(void) { gpr_log(GPR_INFO, "** test_one_slice **"); - grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool *p = grpc_buffer_pool_create("test_one_slice"); grpc_buffer_pool_resize(p, 1024); grpc_buffer_user usr; - grpc_buffer_user_init(&usr, p); + grpc_buffer_user_init(&usr, p, "usr"); grpc_buffer_user_slice_allocator alloc; int num_allocs = 0; @@ -658,11 +668,11 @@ static void test_one_slice(void) { static void test_one_slice_deleted_late(void) { gpr_log(GPR_INFO, "** test_one_slice_deleted_late **"); - grpc_buffer_pool *p = grpc_buffer_pool_create(); + grpc_buffer_pool *p = grpc_buffer_pool_create("test_one_slice_deleted_late"); grpc_buffer_pool_resize(p, 1024); grpc_buffer_user usr; - grpc_buffer_user_init(&usr, p); + grpc_buffer_user_init(&usr, p, "usr"); grpc_buffer_user_slice_allocator alloc; int num_allocs = 0; diff --git a/test/core/iomgr/endpoint_pair_test.c b/test/core/iomgr/endpoint_pair_test.c index a7f00230c2..4f8aab8323 100644 --- a/test/core/iomgr/endpoint_pair_test.c +++ b/test/core/iomgr/endpoint_pair_test.c @@ -49,7 +49,7 @@ static grpc_endpoint_test_fixture create_fixture_endpoint_pair( size_t slice_size) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_endpoint_test_fixture f; - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("endpoint_pair_test"); grpc_endpoint_pair p = grpc_iomgr_create_endpoint_pair("test", buffer_pool, slice_size); grpc_buffer_pool_unref(buffer_pool); diff --git a/test/core/iomgr/fd_conservation_posix_test.c b/test/core/iomgr/fd_conservation_posix_test.c index 4612ff7dc4..f3a36c78e4 100644 --- a/test/core/iomgr/fd_conservation_posix_test.c +++ b/test/core/iomgr/fd_conservation_posix_test.c @@ -52,7 +52,8 @@ int main(int argc, char **argv) { of descriptors */ rlim.rlim_cur = rlim.rlim_max = 10; GPR_ASSERT(0 == setrlimit(RLIMIT_NOFILE, &rlim)); - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_buffer_pool *buffer_pool = + grpc_buffer_pool_create("fd_conservation_posix_test"); for (i = 0; i < 100; i++) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; diff --git a/test/core/iomgr/tcp_posix_test.c b/test/core/iomgr/tcp_posix_test.c index 1c56ed0507..04522b8ddf 100644 --- a/test/core/iomgr/tcp_posix_test.c +++ b/test/core/iomgr/tcp_posix_test.c @@ -176,7 +176,7 @@ static void read_test(size_t num_bytes, size_t slice_size) { create_sockets(sv); - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("read_test"); ep = grpc_tcp_create(grpc_fd_create(sv[1], "read_test"), buffer_pool, slice_size, "test"); grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); @@ -226,7 +226,7 @@ static void large_read_test(size_t slice_size) { create_sockets(sv); - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("large_read_test"); ep = grpc_tcp_create(grpc_fd_create(sv[1], "large_read_test"), buffer_pool, slice_size, "test"); grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); @@ -364,7 +364,7 @@ static void write_test(size_t num_bytes, size_t slice_size) { create_sockets(sv); - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("write_test"); ep = grpc_tcp_create(grpc_fd_create(sv[1], "write_test"), buffer_pool, GRPC_TCP_DEFAULT_READ_SLICE_SIZE, "test"); grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); @@ -430,7 +430,7 @@ static void release_fd_test(size_t num_bytes, size_t slice_size) { create_sockets(sv); - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("release_fd_test"); ep = grpc_tcp_create(grpc_fd_create(sv[1], "read_test"), buffer_pool, slice_size, "test"); GPR_ASSERT(grpc_tcp_fd(ep) == sv[1] && sv[1] >= 0); @@ -520,7 +520,8 @@ static grpc_endpoint_test_fixture create_fixture_tcp_socketpair( grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; create_sockets(sv); - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_buffer_pool *buffer_pool = + grpc_buffer_pool_create("tcp_posix_test_socketpair"); f.client_ep = grpc_tcp_create(grpc_fd_create(sv[0], "fixture:client"), buffer_pool, slice_size, "test"); f.server_ep = grpc_tcp_create(grpc_fd_create(sv[1], "fixture:server"), diff --git a/test/core/security/secure_endpoint_test.c b/test/core/security/secure_endpoint_test.c index abc59f0b3d..3397c9563e 100644 --- a/test/core/security/secure_endpoint_test.c +++ b/test/core/security/secure_endpoint_test.c @@ -56,7 +56,8 @@ static grpc_endpoint_test_fixture secure_endpoint_create_fixture_tcp_socketpair( grpc_endpoint_test_fixture f; grpc_endpoint_pair tcp; - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(); + grpc_buffer_pool *buffer_pool = + grpc_buffer_pool_create("secure_endpoint_test"); tcp = grpc_iomgr_create_endpoint_pair("fixture", buffer_pool, slice_size); grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); grpc_endpoint_add_to_pollset(&exec_ctx, tcp.client, g_pollset); diff --git a/test/core/util/port_server_client.c b/test/core/util/port_server_client.c index 9bd34677cb..f9e16ca407 100644 --- a/test/core/util/port_server_client.c +++ b/test/core/util/port_server_client.c @@ -49,8 +49,6 @@ #include "src/core/lib/http/httpcli.h" -int grpc_buffer_pool_trace = 0; - typedef struct freereq { gpr_mu *mu; grpc_polling_entity pops; -- cgit v1.2.3 From e035cadaa4bc3313d4658c2994eadd00ef242fed Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 28 Sep 2016 10:50:04 -0700 Subject: Fix memory leak --- src/core/lib/iomgr/buffer_pool.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/buffer_pool.c b/src/core/lib/iomgr/buffer_pool.c index f8e9e8ed6e..8fbf75cbe4 100644 --- a/src/core/lib/iomgr/buffer_pool.c +++ b/src/core/lib/iomgr/buffer_pool.c @@ -439,6 +439,7 @@ void grpc_buffer_pool_internal_unref(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool) { if (gpr_unref(&buffer_pool->refs)) { grpc_combiner_destroy(exec_ctx, buffer_pool->combiner); + gpr_free(buffer_pool->name); gpr_free(buffer_pool); } } @@ -563,6 +564,7 @@ void grpc_buffer_user_destroy(grpc_exec_ctx *exec_ctx, #endif grpc_buffer_pool_internal_unref(exec_ctx, buffer_user->buffer_pool); gpr_mu_destroy(&buffer_user->mu); + gpr_free(buffer_user->name); } void grpc_buffer_user_alloc(grpc_exec_ctx *exec_ctx, -- cgit v1.2.3 From 6336ef7bad13fbadddcfc12a7b253db6e6dfdbe7 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 28 Sep 2016 14:23:05 -0700 Subject: Use per-method wait_until_ready value. --- src/core/ext/client_config/client_channel.c | 36 +++++++++++++++++++++++++---- src/core/lib/channel/deadline_filter.c | 20 ++++++---------- src/core/lib/channel/deadline_filter.h | 2 +- 3 files changed, 40 insertions(+), 18 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/client_config/client_channel.c b/src/core/ext/client_config/client_channel.c index 7a80975278..3860f65f95 100644 --- a/src/core/ext/client_config/client_channel.c +++ b/src/core/ext/client_config/client_channel.c @@ -421,6 +421,9 @@ typedef struct client_channel_call_data { grpc_deadline_state deadline_state; gpr_timespec deadline; + enum { WAIT_FOR_READY_UNSET, WAIT_FOR_READY_FALSE, WAIT_FOR_READY_TRUE } + wait_for_ready_from_service_config; + // Request path. grpc_mdstr *path; @@ -737,12 +740,24 @@ retry: calld->connected_subchannel == NULL && op->send_initial_metadata != NULL) { calld->creation_phase = GRPC_SUBCHANNEL_CALL_HOLDER_PICKING_SUBCHANNEL; + // If the application explicitly set wait_for_ready, use that. + // Otherwise, if the service config specified a value for this + // method, use that. + uint32_t initial_metadata_flags = op->send_initial_metadata_flags; + if ((initial_metadata_flags & + GRPC_INITIAL_METADATA_WAIT_FOR_READY_EXPLICITLY_SET) == 0 && + calld->wait_for_ready_from_service_config != WAIT_FOR_READY_UNSET) { + if (calld->wait_for_ready_from_service_config == WAIT_FOR_READY_TRUE) { + initial_metadata_flags |= GRPC_INITIAL_METADATA_WAIT_FOR_READY; + } else { + initial_metadata_flags &= ~GRPC_INITIAL_METADATA_WAIT_FOR_READY; + } + } grpc_closure_init(&calld->next_step, subchannel_ready, calld); GRPC_CALL_STACK_REF(calld->owning_call, "pick_subchannel"); if (pick_subchannel(exec_ctx, elem, op->send_initial_metadata, - op->send_initial_metadata_flags, - &calld->connected_subchannel, &calld->next_step, - GRPC_ERROR_NONE)) { + initial_metadata_flags, &calld->connected_subchannel, + &calld->next_step, GRPC_ERROR_NONE)) { calld->creation_phase = GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING; GRPC_CALL_STACK_UNREF(exec_ctx, calld->owning_call, "pick_subchannel"); } @@ -782,7 +797,20 @@ static grpc_error *cc_init_call_elem(grpc_exec_ctx *exec_ctx, ? NULL : grpc_method_config_table_ref(chand->method_config_table); gpr_mu_unlock(&chand->mu); - grpc_deadline_state_init(exec_ctx, elem, args, method_config_table); + grpc_method_config *method_config = + method_config_table == NULL + ? NULL + : grpc_method_config_table_get_method_config(method_config_table, + args->path); + grpc_deadline_state_init(exec_ctx, elem, args, method_config); + calld->wait_for_ready_from_service_config = WAIT_FOR_READY_UNSET; + if (method_config != NULL) { + bool* wait_for_ready = grpc_method_config_get_wait_for_ready(method_config); + if (wait_for_ready != NULL) { + calld->wait_for_ready_from_service_config = + *wait_for_ready ? WAIT_FOR_READY_TRUE : WAIT_FOR_READY_FALSE; + } + } grpc_method_config_table_unref(chand->method_config_table); calld->deadline = args->deadline; calld->path = GRPC_MDSTR_REF(args->path); diff --git a/src/core/lib/channel/deadline_filter.c b/src/core/lib/channel/deadline_filter.c index 89dc8dd6e8..5216338833 100644 --- a/src/core/lib/channel/deadline_filter.c +++ b/src/core/lib/channel/deadline_filter.c @@ -124,7 +124,7 @@ static void start_timer_after_init(grpc_exec_ctx* exec_ctx, void* arg, void grpc_deadline_state_init(grpc_exec_ctx* exec_ctx, grpc_call_element* elem, grpc_call_element_args* args, - grpc_method_config_table* method_config_table) { + grpc_method_config* method_config) { grpc_deadline_state* deadline_state = elem->call_data; memset(deadline_state, 0, sizeof(*deadline_state)); deadline_state->call_stack = args->call_stack; @@ -133,16 +133,11 @@ void grpc_deadline_state_init(grpc_exec_ctx* exec_ctx, grpc_call_element* elem, // set on clients with a finite deadline. gpr_timespec deadline = gpr_convert_clock_type(args->deadline, GPR_CLOCK_MONOTONIC); - if (method_config_table != NULL) { - grpc_method_config* method_config = - grpc_method_config_table_get_method_config(method_config_table, - args->path); - if (method_config != NULL) { - gpr_timespec* per_method_deadline = - grpc_method_config_get_timeout(method_config); - if (per_method_deadline != NULL) { - deadline = gpr_time_min(deadline, *per_method_deadline); - } + if (method_config != NULL) { + gpr_timespec* per_method_deadline = + grpc_method_config_get_timeout(method_config); + if (per_method_deadline != NULL) { + deadline = gpr_time_min(deadline, *per_method_deadline); } } if (gpr_time_cmp(deadline, gpr_inf_future(GPR_CLOCK_MONOTONIC)) != 0) { @@ -222,8 +217,7 @@ static grpc_error* init_call_elem(grpc_exec_ctx* exec_ctx, grpc_call_element_args* args) { // Note: size of call data is different between client and server. memset(elem->call_data, 0, elem->filter->sizeof_call_data); - grpc_deadline_state_init(exec_ctx, elem, args, - NULL /* method_config_table */); + grpc_deadline_state_init(exec_ctx, elem, args, NULL /* method_config */); return GRPC_ERROR_NONE; } diff --git a/src/core/lib/channel/deadline_filter.h b/src/core/lib/channel/deadline_filter.h index 2fcee0b9ef..ce6e8ea974 100644 --- a/src/core/lib/channel/deadline_filter.h +++ b/src/core/lib/channel/deadline_filter.h @@ -66,7 +66,7 @@ typedef struct grpc_deadline_state { // after the function returns. void grpc_deadline_state_init(grpc_exec_ctx* exec_ctx, grpc_call_element* elem, grpc_call_element_args* args, - grpc_method_config_table* method_config_table); + grpc_method_config* method_config); void grpc_deadline_state_destroy(grpc_exec_ctx* exec_ctx, grpc_call_element* elem); void grpc_deadline_state_client_start_transport_stream_op( -- cgit v1.2.3 From e02c7ed37b1f98ed95b8f47e053d4a617fd7c530 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Thu, 29 Sep 2016 09:15:49 -0700 Subject: Broke cv polling into seperate engine --- BUILD | 12 + CMakeLists.txt | 5 + Makefile | 6 + binding.gyp | 1 + build.yaml | 2 + config.m4 | 1 + gRPC-Core.podspec | 3 + grpc.gemspec | 2 + package.xml | 2 + src/core/lib/iomgr/ev_poll_cv_posix.c | 282 +++++++++++++++++++++ src/core/lib/iomgr/ev_poll_cv_posix.h | 65 +++++ src/core/lib/iomgr/ev_posix.c | 2 + src/core/lib/iomgr/wakeup_fd_cv.c | 230 +---------------- src/core/lib/iomgr/wakeup_fd_cv.h | 5 +- src/core/lib/iomgr/wakeup_fd_posix.c | 9 +- src/core/lib/iomgr/wakeup_fd_posix.h | 1 + src/python/grpcio/grpc_core_dependencies.py | 1 + test/core/iomgr/wakeup_fd_cv_test.c | 19 +- tools/doxygen/Doxyfile.c++.internal | 2 + tools/doxygen/Doxyfile.core.internal | 2 + tools/run_tests/run_tests.py | 2 +- tools/run_tests/sources_and_headers.json | 3 + vsprojects/vcxproj/grpc++/grpc++.vcxproj | 3 + vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters | 6 + .../grpc++_unsecure/grpc++_unsecure.vcxproj | 3 + .../grpc++_unsecure.vcxproj.filters | 6 + vsprojects/vcxproj/grpc/grpc.vcxproj | 3 + vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 6 + .../vcxproj/grpc_test_util/grpc_test_util.vcxproj | 3 + .../grpc_test_util/grpc_test_util.vcxproj.filters | 6 + .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 3 + .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 6 + 32 files changed, 463 insertions(+), 239 deletions(-) create mode 100644 src/core/lib/iomgr/ev_poll_cv_posix.c create mode 100644 src/core/lib/iomgr/ev_poll_cv_posix.h (limited to 'src/core/lib') diff --git a/BUILD b/BUILD index 67e481e0d2..a8d1b4a5b9 100644 --- a/BUILD +++ b/BUILD @@ -184,6 +184,7 @@ cc_library( "src/core/lib/iomgr/error.h", "src/core/lib/iomgr/ev_epoll_linux.h", "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", + "src/core/lib/iomgr/ev_poll_cv_posix.h", "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/exec_ctx.h", @@ -341,6 +342,7 @@ cc_library( "src/core/lib/iomgr/error.c", "src/core/lib/iomgr/ev_epoll_linux.c", "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", + "src/core/lib/iomgr/ev_poll_cv_posix.c", "src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/exec_ctx.c", @@ -581,6 +583,7 @@ cc_library( "src/core/lib/iomgr/error.h", "src/core/lib/iomgr/ev_epoll_linux.h", "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", + "src/core/lib/iomgr/ev_poll_cv_posix.h", "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/exec_ctx.h", @@ -724,6 +727,7 @@ cc_library( "src/core/lib/iomgr/error.c", "src/core/lib/iomgr/ev_epoll_linux.c", "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", + "src/core/lib/iomgr/ev_poll_cv_posix.c", "src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/exec_ctx.c", @@ -935,6 +939,7 @@ cc_library( "src/core/lib/iomgr/error.h", "src/core/lib/iomgr/ev_epoll_linux.h", "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", + "src/core/lib/iomgr/ev_poll_cv_posix.h", "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/exec_ctx.h", @@ -1069,6 +1074,7 @@ cc_library( "src/core/lib/iomgr/error.c", "src/core/lib/iomgr/ev_epoll_linux.c", "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", + "src/core/lib/iomgr/ev_poll_cv_posix.c", "src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/exec_ctx.c", @@ -1284,6 +1290,7 @@ cc_library( "src/core/lib/iomgr/error.h", "src/core/lib/iomgr/ev_epoll_linux.h", "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", + "src/core/lib/iomgr/ev_poll_cv_posix.h", "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/exec_ctx.h", @@ -1398,6 +1405,7 @@ cc_library( "src/core/lib/iomgr/error.c", "src/core/lib/iomgr/ev_epoll_linux.c", "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", + "src/core/lib/iomgr/ev_poll_cv_posix.c", "src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/exec_ctx.c", @@ -1696,6 +1704,7 @@ cc_library( "src/core/lib/iomgr/error.h", "src/core/lib/iomgr/ev_epoll_linux.h", "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", + "src/core/lib/iomgr/ev_poll_cv_posix.h", "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/exec_ctx.h", @@ -1805,6 +1814,7 @@ cc_library( "src/core/lib/iomgr/error.c", "src/core/lib/iomgr/ev_epoll_linux.c", "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", + "src/core/lib/iomgr/ev_poll_cv_posix.c", "src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/exec_ctx.c", @@ -2196,6 +2206,7 @@ objc_library( "src/core/lib/iomgr/error.c", "src/core/lib/iomgr/ev_epoll_linux.c", "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", + "src/core/lib/iomgr/ev_poll_cv_posix.c", "src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/exec_ctx.c", @@ -2415,6 +2426,7 @@ objc_library( "src/core/lib/iomgr/error.h", "src/core/lib/iomgr/ev_epoll_linux.h", "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", + "src/core/lib/iomgr/ev_poll_cv_posix.h", "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/exec_ctx.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index f07fa26e63..1f8c4ca0f0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -313,6 +313,7 @@ add_library(grpc src/core/lib/iomgr/error.c src/core/lib/iomgr/ev_epoll_linux.c src/core/lib/iomgr/ev_poll_and_epoll_posix.c + src/core/lib/iomgr/ev_poll_cv_posix.c src/core/lib/iomgr/ev_poll_posix.c src/core/lib/iomgr/ev_posix.c src/core/lib/iomgr/exec_ctx.c @@ -572,6 +573,7 @@ add_library(grpc_cronet src/core/lib/iomgr/error.c src/core/lib/iomgr/ev_epoll_linux.c src/core/lib/iomgr/ev_poll_and_epoll_posix.c + src/core/lib/iomgr/ev_poll_cv_posix.c src/core/lib/iomgr/ev_poll_posix.c src/core/lib/iomgr/ev_posix.c src/core/lib/iomgr/exec_ctx.c @@ -804,6 +806,7 @@ add_library(grpc_unsecure src/core/lib/iomgr/error.c src/core/lib/iomgr/ev_epoll_linux.c src/core/lib/iomgr/ev_poll_and_epoll_posix.c + src/core/lib/iomgr/ev_poll_cv_posix.c src/core/lib/iomgr/ev_poll_posix.c src/core/lib/iomgr/ev_posix.c src/core/lib/iomgr/exec_ctx.c @@ -1062,6 +1065,7 @@ add_library(grpc++ src/core/lib/iomgr/error.c src/core/lib/iomgr/ev_epoll_linux.c src/core/lib/iomgr/ev_poll_and_epoll_posix.c + src/core/lib/iomgr/ev_poll_cv_posix.c src/core/lib/iomgr/ev_poll_posix.c src/core/lib/iomgr/ev_posix.c src/core/lib/iomgr/exec_ctx.c @@ -1420,6 +1424,7 @@ add_library(grpc++_unsecure src/core/lib/iomgr/error.c src/core/lib/iomgr/ev_epoll_linux.c src/core/lib/iomgr/ev_poll_and_epoll_posix.c + src/core/lib/iomgr/ev_poll_cv_posix.c src/core/lib/iomgr/ev_poll_posix.c src/core/lib/iomgr/ev_posix.c src/core/lib/iomgr/exec_ctx.c diff --git a/Makefile b/Makefile index a23e12687d..0b23fc44bc 100644 --- a/Makefile +++ b/Makefile @@ -2538,6 +2538,7 @@ LIBGRPC_SRC = \ src/core/lib/iomgr/error.c \ src/core/lib/iomgr/ev_epoll_linux.c \ src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ + src/core/lib/iomgr/ev_poll_cv_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ @@ -2815,6 +2816,7 @@ LIBGRPC_CRONET_SRC = \ src/core/lib/iomgr/error.c \ src/core/lib/iomgr/ev_epoll_linux.c \ src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ + src/core/lib/iomgr/ev_poll_cv_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ @@ -3081,6 +3083,7 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/lib/iomgr/error.c \ src/core/lib/iomgr/ev_epoll_linux.c \ src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ + src/core/lib/iomgr/ev_poll_cv_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ @@ -3275,6 +3278,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/iomgr/error.c \ src/core/lib/iomgr/ev_epoll_linux.c \ src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ + src/core/lib/iomgr/ev_poll_cv_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ @@ -3616,6 +3620,7 @@ LIBGRPC++_SRC = \ src/core/lib/iomgr/error.c \ src/core/lib/iomgr/ev_epoll_linux.c \ src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ + src/core/lib/iomgr/ev_poll_cv_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ @@ -4252,6 +4257,7 @@ LIBGRPC++_UNSECURE_SRC = \ src/core/lib/iomgr/error.c \ src/core/lib/iomgr/ev_epoll_linux.c \ src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ + src/core/lib/iomgr/ev_poll_cv_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ diff --git a/binding.gyp b/binding.gyp index 1b68b63d22..d97b1410e1 100644 --- a/binding.gyp +++ b/binding.gyp @@ -585,6 +585,7 @@ 'src/core/lib/iomgr/error.c', 'src/core/lib/iomgr/ev_epoll_linux.c', 'src/core/lib/iomgr/ev_poll_and_epoll_posix.c', + 'src/core/lib/iomgr/ev_poll_cv_posix.c', 'src/core/lib/iomgr/ev_poll_posix.c', 'src/core/lib/iomgr/ev_posix.c', 'src/core/lib/iomgr/exec_ctx.c', diff --git a/build.yaml b/build.yaml index d4f731e85f..7693c911f9 100644 --- a/build.yaml +++ b/build.yaml @@ -186,6 +186,7 @@ filegroups: - src/core/lib/iomgr/error.h - src/core/lib/iomgr/ev_epoll_linux.h - src/core/lib/iomgr/ev_poll_and_epoll_posix.h + - src/core/lib/iomgr/ev_poll_cv_posix.h - src/core/lib/iomgr/ev_poll_posix.h - src/core/lib/iomgr/ev_posix.h - src/core/lib/iomgr/exec_ctx.h @@ -268,6 +269,7 @@ filegroups: - src/core/lib/iomgr/error.c - src/core/lib/iomgr/ev_epoll_linux.c - src/core/lib/iomgr/ev_poll_and_epoll_posix.c + - src/core/lib/iomgr/ev_poll_cv_posix.c - src/core/lib/iomgr/ev_poll_posix.c - src/core/lib/iomgr/ev_posix.c - src/core/lib/iomgr/exec_ctx.c diff --git a/config.m4 b/config.m4 index 6b605fbcd6..bebcab601a 100644 --- a/config.m4 +++ b/config.m4 @@ -104,6 +104,7 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/iomgr/error.c \ src/core/lib/iomgr/ev_epoll_linux.c \ src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ + src/core/lib/iomgr/ev_poll_cv_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 92b3022cf7..73953cc8bd 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -275,6 +275,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/error.h', 'src/core/lib/iomgr/ev_epoll_linux.h', 'src/core/lib/iomgr/ev_poll_and_epoll_posix.h', + 'src/core/lib/iomgr/ev_poll_cv_posix.h', 'src/core/lib/iomgr/ev_poll_posix.h', 'src/core/lib/iomgr/ev_posix.h', 'src/core/lib/iomgr/exec_ctx.h', @@ -436,6 +437,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/error.c', 'src/core/lib/iomgr/ev_epoll_linux.c', 'src/core/lib/iomgr/ev_poll_and_epoll_posix.c', + 'src/core/lib/iomgr/ev_poll_cv_posix.c', 'src/core/lib/iomgr/ev_poll_posix.c', 'src/core/lib/iomgr/ev_posix.c', 'src/core/lib/iomgr/exec_ctx.c', @@ -639,6 +641,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/error.h', 'src/core/lib/iomgr/ev_epoll_linux.h', 'src/core/lib/iomgr/ev_poll_and_epoll_posix.h', + 'src/core/lib/iomgr/ev_poll_cv_posix.h', 'src/core/lib/iomgr/ev_poll_posix.h', 'src/core/lib/iomgr/ev_posix.h', 'src/core/lib/iomgr/exec_ctx.h', diff --git a/grpc.gemspec b/grpc.gemspec index d672bb1284..64441ead59 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -195,6 +195,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/error.h ) s.files += %w( src/core/lib/iomgr/ev_epoll_linux.h ) s.files += %w( src/core/lib/iomgr/ev_poll_and_epoll_posix.h ) + s.files += %w( src/core/lib/iomgr/ev_poll_cv_posix.h ) s.files += %w( src/core/lib/iomgr/ev_poll_posix.h ) s.files += %w( src/core/lib/iomgr/ev_posix.h ) s.files += %w( src/core/lib/iomgr/exec_ctx.h ) @@ -356,6 +357,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/error.c ) s.files += %w( src/core/lib/iomgr/ev_epoll_linux.c ) s.files += %w( src/core/lib/iomgr/ev_poll_and_epoll_posix.c ) + s.files += %w( src/core/lib/iomgr/ev_poll_cv_posix.c ) s.files += %w( src/core/lib/iomgr/ev_poll_posix.c ) s.files += %w( src/core/lib/iomgr/ev_posix.c ) s.files += %w( src/core/lib/iomgr/exec_ctx.c ) diff --git a/package.xml b/package.xml index 02cc271fe5..3e2d9d278c 100644 --- a/package.xml +++ b/package.xml @@ -202,6 +202,7 @@ + @@ -363,6 +364,7 @@ + diff --git a/src/core/lib/iomgr/ev_poll_cv_posix.c b/src/core/lib/iomgr/ev_poll_cv_posix.c new file mode 100644 index 0000000000..596a3025eb --- /dev/null +++ b/src/core/lib/iomgr/ev_poll_cv_posix.c @@ -0,0 +1,282 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include + +#ifdef GPR_POSIX_SOCKET + +#include "src/core/lib/iomgr/ev_poll_cv_posix.h" + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "src/core/lib/iomgr/ev_poll_posix.h" +#include "src/core/lib/iomgr/wakeup_fd_posix.h" + +#define POLL_PERIOD_MS 1000 +#define DEFAULT_TABLE_SIZE 16 + +// poll_result is owned by parent thread +typedef struct poll_result { + struct pollfd* fds; + gpr_cv* cv; + int completed; + int res; + int err; +} poll_result; + +// poll_args is owned by spawned thread +typedef struct poll_args { + struct pollfd* fds; + nfds_t nfds; + int timeout; + poll_result* result; +} poll_args; + +cv_fd_table g_cvfds; + +// Poll in a background thread +static void run_poll(void* arg) { + int result, timeout; + poll_args* pargs = (poll_args*)arg; + gpr_mu_lock(&g_cvfds.mu); + if (pargs->result != NULL) { + while (pargs->result != NULL) { + if (pargs->timeout < 0) { + timeout = POLL_PERIOD_MS; + } else { + timeout = GPR_MIN(POLL_PERIOD_MS, pargs->timeout); + pargs->timeout -= timeout; + } + gpr_mu_unlock(&g_cvfds.mu); + result = g_cvfds.poll(pargs->fds, pargs->nfds, timeout); + gpr_mu_lock(&g_cvfds.mu); + if (pargs->result != NULL) { + if (result != 0 || pargs->timeout == 0) { + memcpy(pargs->result->fds, pargs->fds, + sizeof(struct pollfd) * pargs->nfds); + pargs->result->res = result; + pargs->result->err = errno; + pargs->result->completed = 1; + gpr_cv_signal(pargs->result->cv); + break; + } + } + } + } + gpr_free(pargs->fds); + gpr_free(pargs); + gpr_mu_unlock(&g_cvfds.mu); +} + +// This function overrides poll() to handle condition variable wakeup fds +static int cvfd_poll(struct pollfd* fds, nfds_t nfds, int timeout) { + unsigned int i; + int res, idx; + cv_node *cvn, *prev; + struct pollfd* sockfds; + nfds_t nsockfds = 0; + gpr_cv pollcv; + gpr_thd_id t_id; + gpr_thd_options opt; + poll_args* pargs; + poll_result* pres; + gpr_mu_lock(&g_cvfds.mu); + gpr_cv_init(&pollcv); + for (i = 0; i < nfds; i++) { + fds[i].revents = 0; + if (fds[i].fd < 0 && (fds[i].events & POLLIN)) { + idx = FD_TO_IDX(fds[i].fd); + cvn = gpr_malloc(sizeof(cv_node)); + cvn->cv = &pollcv; + cvn->next = g_cvfds.cvfds[idx].cvs; + g_cvfds.cvfds[idx].cvs = cvn; + // We should return immediately if there are pending events, + // but we still need to call poll() to check for socket events + if (g_cvfds.cvfds[idx].is_set) { + timeout = 0; + } + } else if (fds[i].fd >= 0) { + nsockfds++; + } + } + sockfds = gpr_malloc(sizeof(struct pollfd) * nsockfds); + idx = 0; + for (i = 0; i < nfds; i++) { + if (fds[i].fd >= 0) { + sockfds[idx].fd = fds[i].fd; + sockfds[idx].events = fds[i].events; + sockfds[idx].revents = 0; + idx++; + } + } + + errno = 0; + if (nsockfds > 0) { + pres = gpr_malloc(sizeof(struct poll_result)); + pargs = gpr_malloc(sizeof(struct poll_args)); + + pargs->fds = gpr_malloc(sizeof(struct pollfd) * nsockfds); + memcpy(pargs->fds, sockfds, sizeof(struct pollfd) * nsockfds); + pargs->nfds = nsockfds; + pargs->timeout = timeout; + pargs->result = pres; + + pres->fds = sockfds; + pres->cv = &pollcv; + pres->completed = 0; + pres->res = 0; + pres->err = 0; + + opt = gpr_thd_options_default(); + gpr_thd_options_set_detached(&opt); + gpr_thd_new(&t_id, &run_poll, pargs, &opt); + // We want the poll() thread to trigger the deadline, so wait forever here + gpr_cv_wait(&pollcv, &g_cvfds.mu, gpr_inf_future(GPR_CLOCK_MONOTONIC)); + if (!pres->completed) { + pargs->result = NULL; + } + res = pres->res; + errno = pres->err; + gpr_free(pres); + } else { + gpr_timespec deadline = gpr_now(GPR_CLOCK_REALTIME); + deadline = + gpr_time_add(deadline, gpr_time_from_millis(timeout, GPR_TIMESPAN)); + gpr_cv_wait(&pollcv, &g_cvfds.mu, deadline); + res = 0; + } + idx = 0; + for (i = 0; i < nfds; i++) { + if (fds[i].fd < 0 && (fds[i].events & POLLIN)) { + cvn = g_cvfds.cvfds[FD_TO_IDX(fds[i].fd)].cvs; + prev = NULL; + while (cvn->cv != &pollcv) { + prev = cvn; + cvn = cvn->next; + GPR_ASSERT(cvn); + } + if (!prev) { + g_cvfds.cvfds[FD_TO_IDX(fds[i].fd)].cvs = cvn->next; + } else { + prev->next = cvn->next; + } + gpr_free(cvn); + + if (g_cvfds.cvfds[FD_TO_IDX(fds[i].fd)].is_set) { + fds[i].revents = POLLIN; + if (res >= 0) res++; + } + } else if (fds[i].fd >= 0) { + fds[i].revents = sockfds[idx].revents; + idx++; + } + } + gpr_free(sockfds); + gpr_cv_destroy(&pollcv); + gpr_mu_unlock(&g_cvfds.mu); + + return res; +} + +static void grpc_global_cv_fd_table_init() { + gpr_mu_init(&g_cvfds.mu); + gpr_mu_lock(&g_cvfds.mu); + g_cvfds.size = DEFAULT_TABLE_SIZE; + g_cvfds.cvfds = gpr_malloc(sizeof(fd_node) * DEFAULT_TABLE_SIZE); + g_cvfds.free_fds = NULL; + for (int i = 0; i < DEFAULT_TABLE_SIZE; i++) { + g_cvfds.cvfds[i].is_set = 0; + g_cvfds.cvfds[i].cvs = NULL; + g_cvfds.cvfds[i].next_free = g_cvfds.free_fds; + g_cvfds.free_fds = &g_cvfds.cvfds[i]; + } + // Override the poll function with one that supports cvfds + g_cvfds.poll = grpc_poll_function; + grpc_poll_function = &cvfd_poll; + gpr_mu_unlock(&g_cvfds.mu); +} + +static void grpc_global_cv_fd_table_shutdown() { + gpr_mu_lock(&g_cvfds.mu); + grpc_poll_function = g_cvfds.poll; + gpr_free(g_cvfds.cvfds); + gpr_mu_unlock(&g_cvfds.mu); + gpr_mu_destroy(&g_cvfds.mu); +} + +/******************************************************************************* + * event engine binding + */ + +static const grpc_event_engine_vtable* ev_poll_vtable; +static grpc_event_engine_vtable vtable; + +static void shutdown_engine(void) { + ev_poll_vtable->shutdown_engine(); + grpc_global_cv_fd_table_shutdown(); +} + +const grpc_event_engine_vtable* grpc_init_poll_cv_posix(void) { + int has_wakeup_fd = grpc_has_wakeup_fd; + int allow_specialized_wakeup_fd = grpc_allow_specialized_wakeup_fd; + int allow_pipe_wakeup_fd = grpc_allow_pipe_wakeup_fd; + grpc_global_cv_fd_table_init(); + grpc_has_wakeup_fd = 1; + grpc_allow_specialized_wakeup_fd = 0; + grpc_allow_pipe_wakeup_fd = 0; + grpc_wakeup_fd_global_init(); + ev_poll_vtable = grpc_init_poll_posix(); + if (!ev_poll_vtable) { + grpc_global_cv_fd_table_shutdown(); + grpc_has_wakeup_fd = has_standard_wakeup_fd; + grpc_allow_specialized_wakeup_fd = allow_specialized_wakeup_fd; + grpc_allow_pipe_wakeup_fd = allow_pipe_wakeup_fd; + grpc_has_wakeup_fd = has_standard_wakeup_fd; + grpc_global_cv_fd_table_init(); + return NULL; + } + + vtable = *ev_poll_vtable; + vtable.shutdown_engine = shutdown_engine; + return &vtable; +} + +#endif /* GPR_POSIX_SOCKET */ diff --git a/src/core/lib/iomgr/ev_poll_cv_posix.h b/src/core/lib/iomgr/ev_poll_cv_posix.h new file mode 100644 index 0000000000..0fd3e5bbb4 --- /dev/null +++ b/src/core/lib/iomgr/ev_poll_cv_posix.h @@ -0,0 +1,65 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#ifndef GRPC_CORE_LIB_IOMGR_EV_POLL_CV_POSIX_H +#define GRPC_CORE_LIB_IOMGR_EV_POLL_CV_POSIX_H + +#include + +#include "src/core/lib/iomgr/ev_posix.h" + +#define FD_TO_IDX(fd) (-(fd)-1) +#define IDX_TO_FD(idx) (-(idx)-1) + +typedef struct cv_node { + gpr_cv* cv; + struct cv_node* next; +} cv_node; + +typedef struct fd_node { + int is_set; + cv_node* cvs; + struct fd_node* next_free; +} fd_node; + +typedef struct cv_fd_table { + gpr_mu mu; + fd_node* cvfds; + fd_node* free_fds; + unsigned int size; + grpc_poll_function_type poll; +} cv_fd_table; + +const grpc_event_engine_vtable* grpc_init_poll_cv_posix(void); + +#endif /* GRPC_CORE_LIB_IOMGR_EV_POLL_POSIX_H */ diff --git a/src/core/lib/iomgr/ev_posix.c b/src/core/lib/iomgr/ev_posix.c index 6536672685..2fc8ccfa91 100644 --- a/src/core/lib/iomgr/ev_posix.c +++ b/src/core/lib/iomgr/ev_posix.c @@ -46,6 +46,7 @@ #include "src/core/lib/iomgr/ev_epoll_linux.h" #include "src/core/lib/iomgr/ev_poll_and_epoll_posix.h" +#include "src/core/lib/iomgr/ev_poll_cv_posix.h" #include "src/core/lib/iomgr/ev_poll_posix.h" #include "src/core/lib/support/env.h" @@ -66,6 +67,7 @@ typedef struct { static const event_engine_factory g_factories[] = { {"epoll", grpc_init_epoll_linux}, {"poll", grpc_init_poll_posix}, + {"poll-cv", grpc_init_poll_cv_posix}, {"legacy", grpc_init_poll_and_epoll_posix}, }; diff --git a/src/core/lib/iomgr/wakeup_fd_cv.c b/src/core/lib/iomgr/wakeup_fd_cv.c index bfdc2cb422..651e2f663d 100644 --- a/src/core/lib/iomgr/wakeup_fd_cv.c +++ b/src/core/lib/iomgr/wakeup_fd_cv.c @@ -35,8 +35,6 @@ #ifdef GPR_POSIX_WAKEUP_FD -#include "src/core/lib/iomgr/wakeup_fd_posix.h" - #include #include @@ -47,200 +45,16 @@ #include #include -#include "src/core/lib/iomgr/ev_posix.h" +#include "src/core/lib/iomgr/ev_poll_cv_posix.h" #define MAX_TABLE_RESIZE 256 -#define DEFAULT_TABLE_SIZE 16 -#define POLL_PERIOD_MS 1000 - -#define FD_TO_IDX(fd) (-(fd)-1) -#define IDX_TO_FD(idx) (-(idx)-1) - -typedef struct cv_node { - gpr_cv* cv; - struct cv_node* next; -} cv_node; - -typedef struct fd_node { - int is_set; - cv_node* cvs; - struct fd_node* next_free; -} fd_node; - -typedef struct cv_fd_table { - fd_node* cvfds; - fd_node* free_fds; - unsigned int size; - grpc_poll_function_type poll; -} cv_fd_table; - -typedef struct poll_result { - struct pollfd* fds; - gpr_cv* cv; - int completed; - int res; - int err; -} poll_result; - -typedef struct poll_args { - struct pollfd* fds; - nfds_t nfds; - int timeout; - poll_result* result; -} poll_args; - -static gpr_mu g_mu = PTHREAD_MUTEX_INITIALIZER; -static cv_fd_table g_cvfds; - -// Some environments do not implement pthread_cancel(), so we run -// this poll in a detached thread, and wake up periodically and -// check if the calling thread is still waiting on a result -static void run_poll(void* arg) { - int result, timeout; - poll_args* pargs = (poll_args*)arg; - gpr_mu_lock(&g_mu); - if (pargs->result != NULL) { - while (pargs->result != NULL) { - if (pargs->timeout < 0) { - timeout = POLL_PERIOD_MS; - } else { - timeout = GPR_MIN(POLL_PERIOD_MS, pargs->timeout); - pargs->timeout -= timeout; - } - gpr_mu_unlock(&g_mu); - result = g_cvfds.poll(pargs->fds, pargs->nfds, timeout); - gpr_mu_lock(&g_mu); - if (pargs->result != NULL) { - if (result != 0 || pargs->timeout == 0) { - memcpy(pargs->result->fds, pargs->fds, - sizeof(struct pollfd) * pargs->nfds); - pargs->result->res = result; - pargs->result->err = errno; - pargs->result->completed = 1; - gpr_cv_signal(pargs->result->cv); - break; - } - } - } - } - gpr_free(pargs->fds); - gpr_free(pargs); - gpr_mu_unlock(&g_mu); -} - -int cvfd_poll(struct pollfd* fds, nfds_t nfds, int timeout) { - unsigned int i; - int res, idx; - cv_node *cvn, *prev; - struct pollfd* sockfds; - nfds_t nsockfds = 0; - gpr_cv pollcv; - gpr_thd_id t_id; - gpr_thd_options opt; - poll_args* pargs; - poll_result* pres; - gpr_mu_lock(&g_mu); - gpr_cv_init(&pollcv); - for (i = 0; i < nfds; i++) { - fds[i].revents = 0; - if (fds[i].fd < 0 && (fds[i].events & POLLIN)) { - idx = FD_TO_IDX(fds[i].fd); - cvn = gpr_malloc(sizeof(cv_node)); - cvn->cv = &pollcv; - cvn->next = g_cvfds.cvfds[idx].cvs; - g_cvfds.cvfds[idx].cvs = cvn; - // We should return immediately if there are pending events, - // but we still need to call poll() to check for socket events - if (g_cvfds.cvfds[idx].is_set) { - timeout = 0; - } - } else if (fds[i].fd >= 0) { - nsockfds++; - } - } - sockfds = gpr_malloc(sizeof(struct pollfd) * nsockfds); - idx = 0; - for (i = 0; i < nfds; i++) { - if (fds[i].fd >= 0) { - sockfds[idx].fd = fds[i].fd; - sockfds[idx].events = fds[i].events; - sockfds[idx].revents = 0; - idx++; - } - } - - errno = 0; - if (nsockfds > 0) { - pres = gpr_malloc(sizeof(struct poll_result)); - pargs = gpr_malloc(sizeof(struct poll_args)); - - pargs->fds = gpr_malloc(sizeof(struct pollfd) * nsockfds); - memcpy(pargs->fds, sockfds, sizeof(struct pollfd) * nsockfds); - pargs->nfds = nsockfds; - pargs->timeout = timeout; - pargs->result = pres; - - pres->fds = sockfds; - pres->cv = &pollcv; - pres->completed = 0; - pres->res = 0; - pres->err = 0; - - opt = gpr_thd_options_default(); - gpr_thd_options_set_detached(&opt); - gpr_thd_new(&t_id, &run_poll, pargs, &opt); - // We want the poll() thread to trigger the deadline, so wait forever here - gpr_cv_wait(&pollcv, &g_mu, gpr_inf_future(GPR_CLOCK_MONOTONIC)); - if (!pres->completed) { - pargs->result = NULL; - } - res = pres->res; - errno = pres->err; - gpr_free(pres); - } else { - gpr_timespec deadline = gpr_now(GPR_CLOCK_REALTIME); - deadline = - gpr_time_add(deadline, gpr_time_from_millis(timeout, GPR_TIMESPAN)); - gpr_cv_wait(&pollcv, &g_mu, deadline); - res = 0; - } - idx = 0; - for (i = 0; i < nfds; i++) { - if (fds[i].fd < 0 && (fds[i].events & POLLIN)) { - cvn = g_cvfds.cvfds[FD_TO_IDX(fds[i].fd)].cvs; - prev = NULL; - while (cvn->cv != &pollcv) { - prev = cvn; - cvn = cvn->next; - GPR_ASSERT(cvn); - } - if (!prev) { - g_cvfds.cvfds[FD_TO_IDX(fds[i].fd)].cvs = cvn->next; - } else { - prev->next = cvn->next; - } - gpr_free(cvn); - - if (g_cvfds.cvfds[FD_TO_IDX(fds[i].fd)].is_set) { - fds[i].revents = POLLIN; - if (res >= 0) res++; - } - } else if (fds[i].fd >= 0) { - fds[i].revents = sockfds[idx].revents; - idx++; - } - } - gpr_free(sockfds); - gpr_cv_destroy(&pollcv); - gpr_mu_unlock(&g_mu); - return res; -} +extern cv_fd_table g_cvfds; static grpc_error* cv_fd_init(grpc_wakeup_fd* fd_info) { unsigned int i, newsize; int idx; - gpr_mu_lock(&g_mu); + gpr_mu_lock(&g_cvfds.mu); if (!g_cvfds.free_fds) { newsize = GPR_MIN(g_cvfds.size * 2, g_cvfds.size + MAX_TABLE_RESIZE); g_cvfds.cvfds = gpr_realloc(g_cvfds.cvfds, sizeof(fd_node) * newsize); @@ -259,51 +73,27 @@ static grpc_error* cv_fd_init(grpc_wakeup_fd* fd_info) { g_cvfds.cvfds[idx].is_set = 0; fd_info->read_fd = IDX_TO_FD(idx); fd_info->write_fd = -1; - gpr_mu_unlock(&g_mu); + gpr_mu_unlock(&g_cvfds.mu); return GRPC_ERROR_NONE; } -void grpc_global_cv_fd_table_init() { - gpr_mu_lock(&g_mu); - g_cvfds.size = DEFAULT_TABLE_SIZE; - g_cvfds.cvfds = gpr_malloc(sizeof(fd_node) * DEFAULT_TABLE_SIZE); - g_cvfds.free_fds = NULL; - for (int i = 0; i < DEFAULT_TABLE_SIZE; i++) { - g_cvfds.cvfds[i].is_set = 0; - g_cvfds.cvfds[i].cvs = NULL; - g_cvfds.cvfds[i].next_free = g_cvfds.free_fds; - g_cvfds.free_fds = &g_cvfds.cvfds[i]; - } - // Override the poll function with one that supports cvfds - g_cvfds.poll = grpc_poll_function; - grpc_poll_function = &cvfd_poll; - gpr_mu_unlock(&g_mu); -} - -void grpc_global_cv_fd_table_shutdown() { - gpr_mu_lock(&g_mu); - grpc_poll_function = g_cvfds.poll; - gpr_free(g_cvfds.cvfds); - gpr_mu_unlock(&g_mu); -} - static grpc_error* cv_fd_wakeup(grpc_wakeup_fd* fd_info) { cv_node* cvn; - gpr_mu_lock(&g_mu); + gpr_mu_lock(&g_cvfds.mu); g_cvfds.cvfds[FD_TO_IDX(fd_info->read_fd)].is_set = 1; cvn = g_cvfds.cvfds[FD_TO_IDX(fd_info->read_fd)].cvs; while (cvn) { gpr_cv_signal(cvn->cv); cvn = cvn->next; } - gpr_mu_unlock(&g_mu); + gpr_mu_unlock(&g_cvfds.mu); return GRPC_ERROR_NONE; } static grpc_error* cv_fd_consume(grpc_wakeup_fd* fd_info) { - gpr_mu_lock(&g_mu); + gpr_mu_lock(&g_cvfds.mu); g_cvfds.cvfds[FD_TO_IDX(fd_info->read_fd)].is_set = 0; - gpr_mu_unlock(&g_mu); + gpr_mu_unlock(&g_cvfds.mu); return GRPC_ERROR_NONE; } @@ -311,12 +101,12 @@ static void cv_fd_destroy(grpc_wakeup_fd* fd_info) { if (fd_info->read_fd == 0) { return; } - gpr_mu_lock(&g_mu); + gpr_mu_lock(&g_cvfds.mu); // Assert that there are no active pollers GPR_ASSERT(!g_cvfds.cvfds[FD_TO_IDX(fd_info->read_fd)].cvs); g_cvfds.cvfds[FD_TO_IDX(fd_info->read_fd)].next_free = g_cvfds.free_fds; g_cvfds.free_fds = &g_cvfds.cvfds[FD_TO_IDX(fd_info->read_fd)]; - gpr_mu_unlock(&g_mu); + gpr_mu_unlock(&g_cvfds.mu); } static int cv_check_availability(void) { return 1; } diff --git a/src/core/lib/iomgr/wakeup_fd_cv.h b/src/core/lib/iomgr/wakeup_fd_cv.h index 22ee6c0bbe..e57fc28363 100644 --- a/src/core/lib/iomgr/wakeup_fd_cv.h +++ b/src/core/lib/iomgr/wakeup_fd_cv.h @@ -41,7 +41,7 @@ * A global table of cv wakeup fds is mantained. A cv wakeup fd is a negative * file descriptor. poll() is then run in a background thread with only the * real socket fds while we wait on a condition variable trigged by either the - * poll() called or a wakeup_fd() call. + * poll() completion or a wakeup_fd() call. * */ @@ -50,9 +50,6 @@ #include "src/core/lib/iomgr/wakeup_fd_posix.h" -void grpc_global_cv_fd_table_init(); -void grpc_global_cv_fd_table_shutdown(); - extern grpc_wakeup_fd_vtable grpc_cv_wakeup_fd_vtable; #endif /* GRPC_CORE_LIB_IOMGR_WAKEUP_FD_CV_H */ diff --git a/src/core/lib/iomgr/wakeup_fd_posix.c b/src/core/lib/iomgr/wakeup_fd_posix.c index 564b836154..48ed92abe8 100644 --- a/src/core/lib/iomgr/wakeup_fd_posix.c +++ b/src/core/lib/iomgr/wakeup_fd_posix.c @@ -33,7 +33,7 @@ #include -#ifdef GPR_POSIX_WAKEUP_FD +#ifdef GPR_POSIX_SOCKET #include #include "src/core/lib/iomgr/wakeup_fd_cv.h" @@ -43,6 +43,8 @@ static const grpc_wakeup_fd_vtable *wakeup_fd_vtable = NULL; int grpc_allow_specialized_wakeup_fd = 1; int grpc_allow_pipe_wakeup_fd = 1; +int grpc_has_wakeup_fd = 1; + void grpc_wakeup_fd_global_init(void) { if (grpc_allow_specialized_wakeup_fd && @@ -52,15 +54,12 @@ void grpc_wakeup_fd_global_init(void) { grpc_pipe_wakeup_fd_vtable.check_availability()) { wakeup_fd_vtable = &grpc_pipe_wakeup_fd_vtable; } else { + grpc_has_wakeup_fd = 0; wakeup_fd_vtable = &grpc_cv_wakeup_fd_vtable; - grpc_global_cv_fd_table_init(); } } void grpc_wakeup_fd_global_destroy(void) { - if (wakeup_fd_vtable == &grpc_cv_wakeup_fd_vtable) { - grpc_global_cv_fd_table_shutdown(); - } wakeup_fd_vtable = NULL; } diff --git a/src/core/lib/iomgr/wakeup_fd_posix.h b/src/core/lib/iomgr/wakeup_fd_posix.h index a9f902bc9f..bd0fb46da1 100644 --- a/src/core/lib/iomgr/wakeup_fd_posix.h +++ b/src/core/lib/iomgr/wakeup_fd_posix.h @@ -89,6 +89,7 @@ struct grpc_wakeup_fd { extern int grpc_allow_specialized_wakeup_fd; extern int grpc_allow_pipe_wakeup_fd; +extern int grpc_has_wakeup_fd; #define GRPC_WAKEUP_FD_GET_READ_FD(fd_info) ((fd_info)->read_fd) diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index dc2ce46979..0d4c7d1c0e 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -98,6 +98,7 @@ CORE_SOURCE_FILES = [ 'src/core/lib/iomgr/error.c', 'src/core/lib/iomgr/ev_epoll_linux.c', 'src/core/lib/iomgr/ev_poll_and_epoll_posix.c', + 'src/core/lib/iomgr/ev_poll_cv_posix.c', 'src/core/lib/iomgr/ev_poll_posix.c', 'src/core/lib/iomgr/ev_posix.c', 'src/core/lib/iomgr/exec_ctx.c', diff --git a/test/core/iomgr/wakeup_fd_cv_test.c b/test/core/iomgr/wakeup_fd_cv_test.c index 2cd777536d..8ac78a2f41 100644 --- a/test/core/iomgr/wakeup_fd_cv_test.c +++ b/test/core/iomgr/wakeup_fd_cv_test.c @@ -39,7 +39,7 @@ #include #include "src/core/lib/iomgr/ev_posix.h" -#include "src/core/lib/iomgr/wakeup_fd_posix.h" +#include "src/core/lib/iomgr/iomgr_posix.h" #include "src/core/lib/support/env.h" typedef struct poll_args { @@ -102,7 +102,6 @@ void background_poll(void *args) { void test_many_fds(void) { int i; - grpc_wakeup_fd_global_init(); grpc_wakeup_fd fd[1000]; for (i = 0; i < 1000; i++) { GPR_ASSERT(grpc_wakeup_fd_init(&fd[i]) == GRPC_ERROR_NONE); @@ -110,7 +109,6 @@ void test_many_fds(void) { for (i = 0; i < 1000; i++) { grpc_wakeup_fd_destroy(&fd[i]); } - grpc_wakeup_fd_global_destroy(); } void test_poll_cv_trigger(void) { @@ -119,8 +117,6 @@ void test_poll_cv_trigger(void) { poll_args pargs; gpr_thd_id t_id; gpr_thd_options opt; - grpc_poll_function = &mock_poll; - grpc_wakeup_fd_global_init(); GPR_ASSERT(grpc_wakeup_fd_init(&cvfd1) == GRPC_ERROR_NONE); GPR_ASSERT(grpc_wakeup_fd_init(&cvfd2) == GRPC_ERROR_NONE); @@ -226,17 +222,22 @@ void test_poll_cv_trigger(void) { GPR_ASSERT(pfds[4].revents == 0); GPR_ASSERT(pfds[5].revents == 0); - grpc_wakeup_fd_global_destroy(); } int main(int argc, char **argv) { - gpr_setenv("GRPC_POLL_STRATEGY", "poll"); - grpc_allow_specialized_wakeup_fd = 0; - grpc_allow_pipe_wakeup_fd = 0; + gpr_setenv("GRPC_POLL_STRATEGY", "poll-cv"); + grpc_poll_function = &mock_poll; gpr_mu_init(&poll_mu); gpr_cv_init(&poll_cv); + + grpc_iomgr_platform_init(); test_many_fds(); + grpc_iomgr_platform_shutdown(); + + grpc_iomgr_platform_init(); test_poll_cv_trigger(); + grpc_iomgr_platform_shutdown(); + // Make sure detached polling threads have chance // to exit and clean up memory. pthread_exit() causes tsan/msan // issues, so we just wait an ample amount of time diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 6e08a1977c..2ea042a4f4 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -894,6 +894,7 @@ src/core/lib/iomgr/endpoint_pair.h \ src/core/lib/iomgr/error.h \ src/core/lib/iomgr/ev_epoll_linux.h \ src/core/lib/iomgr/ev_poll_and_epoll_posix.h \ +src/core/lib/iomgr/ev_poll_cv_posix.h \ src/core/lib/iomgr/ev_poll_posix.h \ src/core/lib/iomgr/ev_posix.h \ src/core/lib/iomgr/exec_ctx.h \ @@ -1008,6 +1009,7 @@ src/core/lib/iomgr/endpoint_pair_windows.c \ src/core/lib/iomgr/error.c \ src/core/lib/iomgr/ev_epoll_linux.c \ src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ +src/core/lib/iomgr/ev_poll_cv_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 2328194c3a..a59ff043b1 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -811,6 +811,7 @@ src/core/lib/iomgr/endpoint_pair.h \ src/core/lib/iomgr/error.h \ src/core/lib/iomgr/ev_epoll_linux.h \ src/core/lib/iomgr/ev_poll_and_epoll_posix.h \ +src/core/lib/iomgr/ev_poll_cv_posix.h \ src/core/lib/iomgr/ev_poll_posix.h \ src/core/lib/iomgr/ev_posix.h \ src/core/lib/iomgr/exec_ctx.h \ @@ -972,6 +973,7 @@ src/core/lib/iomgr/endpoint_pair_windows.c \ src/core/lib/iomgr/error.c \ src/core/lib/iomgr/ev_epoll_linux.c \ src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ +src/core/lib/iomgr/ev_poll_cv_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 146018ba3a..7d8a18d8fe 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -69,7 +69,7 @@ _FORCE_ENVIRON_FOR_WRAPPERS = { _POLLING_STRATEGIES = { - 'linux': ['epoll', 'poll', 'legacy'] + 'linux': ['epoll', 'poll', 'poll-cv', 'legacy'] } diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 2ce0e3b05c..f6abb4641f 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -5926,6 +5926,7 @@ "src/core/lib/iomgr/error.h", "src/core/lib/iomgr/ev_epoll_linux.h", "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", + "src/core/lib/iomgr/ev_poll_cv_posix.h", "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/exec_ctx.h", @@ -6039,6 +6040,8 @@ "src/core/lib/iomgr/ev_epoll_linux.h", "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", + "src/core/lib/iomgr/ev_poll_cv_posix.c", + "src/core/lib/iomgr/ev_poll_cv_posix.h", "src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.c", diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index 2afda35d34..eb830eb45d 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -394,6 +394,7 @@ + @@ -564,6 +565,8 @@ + + diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters index 1f88ae0e93..acee5ed3c9 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters @@ -163,6 +163,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -779,6 +782,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj index be20aef6dc..fbdc6c3bdf 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -390,6 +390,7 @@ + @@ -550,6 +551,8 @@ + + diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters index 628173dbbe..600e6475a4 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters @@ -148,6 +148,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -752,6 +755,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index ae24e8f066..3ae2ade070 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -320,6 +320,7 @@ + @@ -505,6 +506,8 @@ + + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index a849795dc9..2a401e1695 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -67,6 +67,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -731,6 +734,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index 3c3fae370f..e54b369ec6 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -211,6 +211,7 @@ + @@ -349,6 +350,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index b81431cafa..f391f29729 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -115,6 +115,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -512,6 +515,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 69d631e452..3eaae7fe18 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -310,6 +310,7 @@ + @@ -473,6 +474,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index 36e80b4a13..31ba6e97bf 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -70,6 +70,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -641,6 +644,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr -- cgit v1.2.3 From 84a4bdd5d8c0d20d6cdc93ce09167adc24431ada Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Thu, 29 Sep 2016 09:24:09 -0700 Subject: Fix Typo --- src/core/lib/iomgr/ev_poll_cv_posix.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/ev_poll_cv_posix.c b/src/core/lib/iomgr/ev_poll_cv_posix.c index 596a3025eb..cb2c2ba824 100644 --- a/src/core/lib/iomgr/ev_poll_cv_posix.c +++ b/src/core/lib/iomgr/ev_poll_cv_posix.c @@ -266,10 +266,9 @@ const grpc_event_engine_vtable* grpc_init_poll_cv_posix(void) { ev_poll_vtable = grpc_init_poll_posix(); if (!ev_poll_vtable) { grpc_global_cv_fd_table_shutdown(); - grpc_has_wakeup_fd = has_standard_wakeup_fd; + grpc_has_wakeup_fd = has_wakeup_fd; grpc_allow_specialized_wakeup_fd = allow_specialized_wakeup_fd; grpc_allow_pipe_wakeup_fd = allow_pipe_wakeup_fd; - grpc_has_wakeup_fd = has_standard_wakeup_fd; grpc_global_cv_fd_table_init(); return NULL; } -- cgit v1.2.3 From 091e4f0ef83cdd1115f0a799a5c0dccfae03316c Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 29 Sep 2016 09:57:35 -0700 Subject: Handle failed allocations --- src/core/lib/iomgr/tcp_posix.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 120622e817..648ca52818 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -251,7 +251,7 @@ static void tcp_do_read(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { } else if (read_bytes == 0) { /* 0 read size ==> end of stream */ gpr_slice_buffer_reset_and_unref(tcp->incoming_buffer); - call_read_cb(exec_ctx, tcp, GRPC_ERROR_CREATE("EOF")); + call_read_cb(exec_ctx, tcp, GRPC_ERROR_CREATE("Socket closed")); TCP_UNREF(exec_ctx, tcp, "read"); } else { GPR_ASSERT((size_t)read_bytes <= tcp->incoming_buffer->length); @@ -271,9 +271,17 @@ static void tcp_do_read(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { GPR_TIMER_END("tcp_continue_read", 0); } -static void tcp_read_allocation_done(grpc_exec_ctx *exec_ctx, void *tcp, +static void tcp_read_allocation_done(grpc_exec_ctx *exec_ctx, void *tcpp, grpc_error *error) { - tcp_do_read(exec_ctx, tcp); + grpc_tcp *tcp = tcpp; + if (error != GRPC_ERROR_NONE) { + gpr_slice_buffer_reset_and_unref(tcp->incoming_buffer); + gpr_slice_buffer_reset_and_unref(&tcp->last_read_buffer); + call_read_cb(exec_ctx, tcp, GRPC_ERROR_REF(error)); + TCP_UNREF(exec_ctx, tcp, "read"); + } else { + tcp_do_read(exec_ctx, tcp); + } } static void tcp_continue_read(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { -- cgit v1.2.3 From 9c7f4f7028130058ef9dc690f56554f91832ba41 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 29 Sep 2016 10:36:20 -0700 Subject: Fix merge error --- src/core/lib/iomgr/tcp_client_posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/tcp_client_posix.c b/src/core/lib/iomgr/tcp_client_posix.c index 6c82f47d71..dadd4cc2eb 100644 --- a/src/core/lib/iomgr/tcp_client_posix.c +++ b/src/core/lib/iomgr/tcp_client_posix.c @@ -196,7 +196,7 @@ static void on_writable(grpc_exec_ctx *exec_ctx, void *acp, grpc_error *error) { case 0: grpc_pollset_set_del_fd(exec_ctx, ac->interested_parties, fd); *ep = grpc_tcp_client_create_from_fd(exec_ctx, fd, ac->channel_args, - +ac->addr_str); + ac->addr_str); fd = NULL; break; case ENOBUFS: -- cgit v1.2.3 From 65818729dc871e991c452738c221bf3f0f28812b Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Thu, 29 Sep 2016 11:28:23 -0700 Subject: Clang format --- src/core/lib/iomgr/ev_poll_cv_posix.h | 2 +- src/core/lib/iomgr/wakeup_fd_posix.c | 5 +---- tools/run_tests/run_tests.py | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/ev_poll_cv_posix.h b/src/core/lib/iomgr/ev_poll_cv_posix.h index 0fd3e5bbb4..89e4929fbb 100644 --- a/src/core/lib/iomgr/ev_poll_cv_posix.h +++ b/src/core/lib/iomgr/ev_poll_cv_posix.h @@ -62,4 +62,4 @@ typedef struct cv_fd_table { const grpc_event_engine_vtable* grpc_init_poll_cv_posix(void); -#endif /* GRPC_CORE_LIB_IOMGR_EV_POLL_POSIX_H */ +#endif /* GRPC_CORE_LIB_IOMGR_EV_POLL_CV_POSIX_H */ diff --git a/src/core/lib/iomgr/wakeup_fd_posix.c b/src/core/lib/iomgr/wakeup_fd_posix.c index 48ed92abe8..d8eafc4192 100644 --- a/src/core/lib/iomgr/wakeup_fd_posix.c +++ b/src/core/lib/iomgr/wakeup_fd_posix.c @@ -45,7 +45,6 @@ int grpc_allow_specialized_wakeup_fd = 1; int grpc_allow_pipe_wakeup_fd = 1; int grpc_has_wakeup_fd = 1; - void grpc_wakeup_fd_global_init(void) { if (grpc_allow_specialized_wakeup_fd && grpc_specialized_wakeup_fd_vtable.check_availability()) { @@ -59,9 +58,7 @@ void grpc_wakeup_fd_global_init(void) { } } -void grpc_wakeup_fd_global_destroy(void) { - wakeup_fd_vtable = NULL; -} +void grpc_wakeup_fd_global_destroy(void) { wakeup_fd_vtable = NULL; } grpc_error *grpc_wakeup_fd_init(grpc_wakeup_fd *fd_info) { return wakeup_fd_vtable->init(fd_info); diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 7d8a18d8fe..0777274694 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -1027,7 +1027,7 @@ argp.add_argument('--force_default_poller', default=False, action='store_const', args = argp.parse_args() if args.force_default_poller: - _POLLING_STRATEGIES = {} + _POLLING_STRATEGIES = {'linux': ['poll-cv']} jobset.measure_cpu_costs = args.measure_cpu_costs -- cgit v1.2.3 From 3a32f98653b7f626c4417f3f44a623e0e5e4a51d Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 29 Sep 2016 11:37:06 -0700 Subject: Fix double-free --- src/core/lib/surface/server.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/core/lib') diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index cec3e3ce97..87364a8a05 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -842,7 +842,6 @@ static void accept_stream(grpc_exec_ctx *exec_ctx, void *cd, grpc_call_stack_element(grpc_call_get_call_stack(call), 0); if (error != GRPC_ERROR_NONE) { got_initial_metadata(exec_ctx, elem, error); - GRPC_ERROR_UNREF(error); return; } call_data *calld = elem->call_data; -- cgit v1.2.3 From d51e0352c5460a0c050a026dd4d2c1b498ddb57f Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 30 Sep 2016 08:23:30 -0700 Subject: Various fixes and clean-ups. --- src/core/ext/client_config/client_channel.c | 4 +++- src/core/ext/client_config/method_config.c | 19 ++++++++++--------- src/core/ext/client_config/method_config.h | 2 +- src/core/ext/client_config/resolver_result.c | 5 ----- src/core/ext/client_config/resolver_result.h | 2 +- src/core/lib/channel/channel_args.c | 4 +++- src/core/lib/channel/channel_args.h | 4 +--- src/core/lib/transport/hashtable.c | 2 +- 8 files changed, 20 insertions(+), 22 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/client_config/client_channel.c b/src/core/ext/client_config/client_channel.c index 3860f65f95..026d3a51b8 100644 --- a/src/core/ext/client_config/client_channel.c +++ b/src/core/ext/client_config/client_channel.c @@ -811,7 +811,9 @@ static grpc_error *cc_init_call_elem(grpc_exec_ctx *exec_ctx, *wait_for_ready ? WAIT_FOR_READY_TRUE : WAIT_FOR_READY_FALSE; } } - grpc_method_config_table_unref(chand->method_config_table); + if (method_config_table != NULL) { + grpc_method_config_table_unref(method_config_table); + } calld->deadline = args->deadline; calld->path = GRPC_MDSTR_REF(args->path); calld->cancel_error = GRPC_ERROR_NONE; diff --git a/src/core/ext/client_config/method_config.c b/src/core/ext/client_config/method_config.c index 553a7be496..95efe492a9 100644 --- a/src/core/ext/client_config/method_config.c +++ b/src/core/ext/client_config/method_config.c @@ -121,35 +121,35 @@ grpc_method_config* grpc_method_config_create( int32_t* max_request_message_bytes, int32_t* max_response_message_bytes) { grpc_method_config* method_config = gpr_malloc(sizeof(grpc_method_config)); memset(method_config, 0, sizeof(grpc_method_config)); + method_config->wait_for_ready_key = + grpc_mdstr_from_string(GRPC_METHOD_CONFIG_WAIT_FOR_READY); + method_config->timeout_key = + grpc_mdstr_from_string(GRPC_METHOD_CONFIG_TIMEOUT); + method_config->max_request_message_bytes_key = + grpc_mdstr_from_string(GRPC_METHOD_CONFIG_MAX_REQUEST_MESSAGE_BYTES); + method_config->max_response_message_bytes_key = + grpc_mdstr_from_string(GRPC_METHOD_CONFIG_MAX_RESPONSE_MESSAGE_BYTES); grpc_hash_table_entry entries[4]; size_t num_entries = 0; if (wait_for_ready != NULL) { - method_config->wait_for_ready_key = - grpc_mdstr_from_string(GRPC_METHOD_CONFIG_WAIT_FOR_READY); entries[num_entries].key = method_config->wait_for_ready_key; entries[num_entries].value = wait_for_ready; entries[num_entries].vtable = &bool_vtable; ++num_entries; } if (timeout != NULL) { - method_config->timeout_key = - grpc_mdstr_from_string(GRPC_METHOD_CONFIG_TIMEOUT); entries[num_entries].key = method_config->timeout_key; entries[num_entries].value = timeout; entries[num_entries].vtable = ×pec_vtable; ++num_entries; } if (max_request_message_bytes != NULL) { - method_config->max_request_message_bytes_key = - grpc_mdstr_from_string(GRPC_METHOD_CONFIG_MAX_REQUEST_MESSAGE_BYTES); entries[num_entries].key = method_config->max_request_message_bytes_key; entries[num_entries].value = max_request_message_bytes; entries[num_entries].vtable = &int32_vtable; ++num_entries; } if (max_response_message_bytes != NULL) { - method_config->max_response_message_bytes_key = - grpc_mdstr_from_string(GRPC_METHOD_CONFIG_MAX_RESPONSE_MESSAGE_BYTES); entries[num_entries].key = method_config->max_response_message_bytes_key; entries[num_entries].value = max_response_message_bytes; entries[num_entries].vtable = &int32_vtable; @@ -170,6 +170,7 @@ void grpc_method_config_unref(grpc_method_config* method_config) { GRPC_MDSTR_UNREF(method_config->timeout_key); GRPC_MDSTR_UNREF(method_config->max_request_message_bytes_key); GRPC_MDSTR_UNREF(method_config->max_response_message_bytes_key); + gpr_free(method_config); } } @@ -261,7 +262,7 @@ grpc_method_config* grpc_method_config_table_get_method_config( method_config = grpc_hash_table_get(table, wildcard_path); GRPC_MDSTR_UNREF(wildcard_path); } - return grpc_method_config_ref(method_config); + return method_config; } static void* copy_arg(void* p) { diff --git a/src/core/ext/client_config/method_config.h b/src/core/ext/client_config/method_config.h index e95a5583be..65b34a768a 100644 --- a/src/core/ext/client_config/method_config.h +++ b/src/core/ext/client_config/method_config.h @@ -86,7 +86,7 @@ int grpc_method_config_table_cmp(grpc_method_config_table* table1, grpc_method_config_table* table2); /// Returns NULL if the method has no config. -/// Caller owns a reference to result. +/// Caller does NOT own a reference to the result. grpc_method_config* grpc_method_config_table_get_method_config( grpc_method_config_table* table, grpc_mdstr* path); diff --git a/src/core/ext/client_config/resolver_result.c b/src/core/ext/client_config/resolver_result.c index 16d124d205..63480d152b 100644 --- a/src/core/ext/client_config/resolver_result.c +++ b/src/core/ext/client_config/resolver_result.c @@ -36,13 +36,8 @@ #include #include -#include "src/core/lib/transport/metadata.h" #include "src/core/lib/channel/channel_args.h" -// -// grpc_resolver_result -// - struct grpc_resolver_result { gpr_refcount refs; char* server_name; diff --git a/src/core/ext/client_config/resolver_result.h b/src/core/ext/client_config/resolver_result.h index 707c8c2cf5..a7ea7c0f4b 100644 --- a/src/core/ext/client_config/resolver_result.h +++ b/src/core/ext/client_config/resolver_result.h @@ -48,7 +48,7 @@ /// Results reported from a grpc_resolver. typedef struct grpc_resolver_result grpc_resolver_result; -/// Takes ownership of \a addresses, \a lb_policy_args. +/// Takes ownership of \a addresses and \a lb_policy_args. grpc_resolver_result* grpc_resolver_result_create( const char* server_name, grpc_lb_addresses* addresses, const char* lb_policy_name, grpc_channel_args* lb_policy_args); diff --git a/src/core/lib/channel/channel_args.c b/src/core/lib/channel/channel_args.c index bab6fcd9fa..2957d2c818 100644 --- a/src/core/lib/channel/channel_args.c +++ b/src/core/lib/channel/channel_args.c @@ -276,7 +276,9 @@ const grpc_arg *grpc_channel_args_find(const grpc_channel_args *args, const char *name) { if (args != NULL) { for (size_t i = 0; i < args->num_args; ++i) { - if (args->args[i].key == name) return &args->args[i]; + if (strcmp(args->args[i].key, name) == 0) { + return &args->args[i]; + } } } return NULL; diff --git a/src/core/lib/channel/channel_args.h b/src/core/lib/channel/channel_args.h index 38fb4c55d4..a80340c0fa 100644 --- a/src/core/lib/channel/channel_args.h +++ b/src/core/lib/channel/channel_args.h @@ -89,9 +89,7 @@ uint32_t grpc_channel_args_compression_algorithm_get_states( int grpc_channel_args_compare(const grpc_channel_args *a, const grpc_channel_args *b); -/** Returns the value of argument \a name from \a args, or NULL if not found. - Note: \a name is matched using pointer equality, so it must be the - same instance of the string used to create the grpc_arg key. */ +/** Returns the value of argument \a name from \a args, or NULL if not found. */ const grpc_arg *grpc_channel_args_find(const grpc_channel_args *args, const char *name); diff --git a/src/core/lib/transport/hashtable.c b/src/core/lib/transport/hashtable.c index 89e2640969..3e0e0bd6c6 100644 --- a/src/core/lib/transport/hashtable.c +++ b/src/core/lib/transport/hashtable.c @@ -77,7 +77,7 @@ grpc_hash_table* grpc_hash_table_create(size_t num_entries, grpc_hash_table* table = gpr_malloc(sizeof(*table)); memset(table, 0, sizeof(*table)); gpr_ref_init(&table->refs, 1); - // Quadratic chaining gets best performance when the table is no more + // Quadratic probing gets best performance when the table is no more // than half full. table->num_entries = num_entries * 2; const size_t entry_size = sizeof(grpc_hash_table_entry) * table->num_entries; -- cgit v1.2.3 From afa8c1051ec585222e0bb02a63c6c25a4a3b4d3c Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 30 Sep 2016 10:56:53 -0700 Subject: clang-format --- include/grpc/impl/codegen/grpc_types.h | 10 +++---- src/core/ext/client_config/client_channel.c | 16 ++++++----- src/core/ext/client_config/method_config.c | 18 +++++------- src/core/ext/resolver/sockaddr/sockaddr_resolver.c | 32 ++++++++++++---------- src/core/lib/channel/message_size_filter.c | 8 +++--- src/core/lib/transport/hashtable.c | 4 +-- src/core/lib/transport/hashtable.h | 2 +- .../resolvers/sockaddr_resolver_test.c | 16 +++++------ 8 files changed, 53 insertions(+), 53 deletions(-) (limited to 'src/core/lib') diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index 43b6a73faa..a3fc683e57 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -263,7 +263,7 @@ typedef enum grpc_call_error { #define GRPC_INITIAL_METADATA_WAIT_FOR_READY (0x00000020u) /** DEPRECATED: for backward compatibility */ #define GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY \ - GRPC_INITIAL_METADATA_WAIT_FOR_READY + GRPC_INITIAL_METADATA_WAIT_FOR_READY /** Signal that the call is cacheable. GRPC is free to use GET verb */ #define GRPC_INITIAL_METADATA_CACHEABLE_REQUEST (0x00000040u) /** Signal that GRPC_INITIAL_METADATA_WAIT_FOR_READY was explicitly set @@ -271,10 +271,10 @@ typedef enum grpc_call_error { #define GRPC_INITIAL_METADATA_WAIT_FOR_READY_EXPLICITLY_SET (0x00000080u) /** Mask of all valid flags */ -#define GRPC_INITIAL_METADATA_USED_MASK \ - (GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST | \ - GRPC_INITIAL_METADATA_WAIT_FOR_READY | \ - GRPC_INITIAL_METADATA_CACHEABLE_REQUEST | \ +#define GRPC_INITIAL_METADATA_USED_MASK \ + (GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST | \ + GRPC_INITIAL_METADATA_WAIT_FOR_READY | \ + GRPC_INITIAL_METADATA_CACHEABLE_REQUEST | \ GRPC_INITIAL_METADATA_WAIT_FOR_READY_EXPLICITLY_SET) /** A single metadata element */ diff --git a/src/core/ext/client_config/client_channel.c b/src/core/ext/client_config/client_channel.c index 026d3a51b8..00567cc32a 100644 --- a/src/core/ext/client_config/client_channel.c +++ b/src/core/ext/client_config/client_channel.c @@ -421,8 +421,11 @@ typedef struct client_channel_call_data { grpc_deadline_state deadline_state; gpr_timespec deadline; - enum { WAIT_FOR_READY_UNSET, WAIT_FOR_READY_FALSE, WAIT_FOR_READY_TRUE } - wait_for_ready_from_service_config; + enum { + WAIT_FOR_READY_UNSET, + WAIT_FOR_READY_FALSE, + WAIT_FOR_READY_TRUE + } wait_for_ready_from_service_config; // Request path. grpc_mdstr *path; @@ -798,14 +801,13 @@ static grpc_error *cc_init_call_elem(grpc_exec_ctx *exec_ctx, : grpc_method_config_table_ref(chand->method_config_table); gpr_mu_unlock(&chand->mu); grpc_method_config *method_config = - method_config_table == NULL - ? NULL - : grpc_method_config_table_get_method_config(method_config_table, - args->path); + method_config_table == NULL ? NULL + : grpc_method_config_table_get_method_config( + method_config_table, args->path); grpc_deadline_state_init(exec_ctx, elem, args, method_config); calld->wait_for_ready_from_service_config = WAIT_FOR_READY_UNSET; if (method_config != NULL) { - bool* wait_for_ready = grpc_method_config_get_wait_for_ready(method_config); + bool *wait_for_ready = grpc_method_config_get_wait_for_ready(method_config); if (wait_for_ready != NULL) { calld->wait_for_ready_from_service_config = *wait_for_ready ? WAIT_FOR_READY_TRUE : WAIT_FOR_READY_FALSE; diff --git a/src/core/ext/client_config/method_config.c b/src/core/ext/client_config/method_config.c index 1135a1c4c4..888b32c7f1 100644 --- a/src/core/ext/client_config/method_config.c +++ b/src/core/ext/client_config/method_config.c @@ -78,8 +78,8 @@ static int timespec_cmp(void* v1, void* v2) { return gpr_time_cmp(*(gpr_timespec*)v1, *(gpr_timespec*)v2); } -static grpc_hash_table_vtable timespec_vtable = { - gpr_free, timespec_copy, timespec_cmp}; +static grpc_hash_table_vtable timespec_vtable = {gpr_free, timespec_copy, + timespec_cmp}; // int32 vtable @@ -102,11 +102,11 @@ static grpc_hash_table_vtable int32_vtable = {gpr_free, int32_copy, int32_cmp}; // Hash table keys. #define GRPC_METHOD_CONFIG_WAIT_FOR_READY "grpc.wait_for_ready" // bool -#define GRPC_METHOD_CONFIG_TIMEOUT "grpc.timeout" // gpr_timespec +#define GRPC_METHOD_CONFIG_TIMEOUT "grpc.timeout" // gpr_timespec #define GRPC_METHOD_CONFIG_MAX_REQUEST_MESSAGE_BYTES \ - "grpc.max_request_message_bytes" // int32 + "grpc.max_request_message_bytes" // int32 #define GRPC_METHOD_CONFIG_MAX_RESPONSE_MESSAGE_BYTES \ - "grpc.max_response_message_bytes" // int32 + "grpc.max_response_message_bytes" // int32 struct grpc_method_config { grpc_hash_table* table; @@ -265,13 +265,9 @@ grpc_method_config* grpc_method_config_table_get_method_config( return method_config; } -static void* copy_arg(void* p) { - return grpc_method_config_table_ref(p); -} +static void* copy_arg(void* p) { return grpc_method_config_table_ref(p); } -static void destroy_arg(void* p) { - grpc_method_config_table_unref(p); -} +static void destroy_arg(void* p) { grpc_method_config_table_unref(p); } static int cmp_arg(void* p1, void* p2) { return grpc_method_config_table_cmp(p1, p2); diff --git a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c index 98e22f0f63..aea57f9912 100644 --- a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c +++ b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c @@ -127,8 +127,8 @@ static void sockaddr_maybe_finish_next_locked(grpc_exec_ctx *exec_ctx, r->published = true; grpc_channel_args *lb_policy_args = NULL; if (r->method_config_table != NULL) { - const grpc_arg arg = grpc_method_config_table_create_channel_arg( - r->method_config_table); + const grpc_arg arg = + grpc_method_config_table_create_channel_arg(r->method_config_table); lb_policy_args = grpc_channel_args_copy_and_add(NULL /* src */, &arg, 1); } *r->target_result = grpc_resolver_result_create( @@ -246,29 +246,31 @@ static grpc_resolver *sockaddr_create( // Anything other than "0" is interpreted as true. bool wait_for_ready = wait_for_ready_str != NULL && strcmp("0", wait_for_ready_str) != 0; - const char* timeout_str = + const char *timeout_str = grpc_uri_get_query_arg(args->uri, "timeout_seconds"); - gpr_timespec timeout = { - timeout_str == NULL ? 0 : atoi(timeout_str), 0, GPR_CLOCK_MONOTONIC}; - const char* max_request_message_bytes_str = + gpr_timespec timeout = {timeout_str == NULL ? 0 : atoi(timeout_str), 0, + GPR_CLOCK_MONOTONIC}; + const char *max_request_message_bytes_str = grpc_uri_get_query_arg(args->uri, "max_request_message_bytes"); int32_t max_request_message_bytes = max_request_message_bytes_str == NULL - ? 0 : atoi(max_request_message_bytes_str); - const char* max_response_message_bytes_str = + ? 0 + : atoi(max_request_message_bytes_str); + const char *max_response_message_bytes_str = grpc_uri_get_query_arg(args->uri, "max_response_message_bytes"); int32_t max_response_message_bytes = max_response_message_bytes_str == NULL - ? 0 : atoi(max_response_message_bytes_str); + ? 0 + : atoi(max_response_message_bytes_str); grpc_method_config *method_config = grpc_method_config_create( wait_for_ready_str == NULL ? NULL : &wait_for_ready, timeout_str == NULL ? NULL : &timeout, - max_request_message_bytes_str == NULL - ? NULL : &max_request_message_bytes, - max_response_message_bytes_str == NULL - ? NULL : &max_response_message_bytes); - grpc_method_config_table_entry entry = { - grpc_mdstr_from_string(method_name), method_config}; + max_request_message_bytes_str == NULL ? NULL + : &max_request_message_bytes, + max_response_message_bytes_str == NULL ? NULL + : &max_response_message_bytes); + grpc_method_config_table_entry entry = {grpc_mdstr_from_string(method_name), + method_config}; r->method_config_table = grpc_method_config_table_create(1, &entry); GRPC_MDSTR_UNREF(entry.method_name); grpc_method_config_unref(method_config); diff --git a/src/core/lib/channel/message_size_filter.c b/src/core/lib/channel/message_size_filter.c index 4efa6f07be..a54c424e1b 100644 --- a/src/core/lib/channel/message_size_filter.c +++ b/src/core/lib/channel/message_size_filter.c @@ -38,8 +38,8 @@ #include #include -#include "src/core/lib/channel/channel_args.h" #include "src/core/ext/client_config/method_config.h" +#include "src/core/lib/channel/channel_args.h" #define DEFAULT_MAX_SEND_MESSAGE_LENGTH -1 // Unlimited. // The protobuf library will (by default) start warning at 100 megs. @@ -181,12 +181,12 @@ static void init_channel_elem(grpc_exec_ctx* exec_ctx, } } // Get method config table from channel args. - const grpc_arg *channel_arg = grpc_channel_args_find( - args->channel_args, GRPC_ARG_SERVICE_CONFIG); + const grpc_arg* channel_arg = + grpc_channel_args_find(args->channel_args, GRPC_ARG_SERVICE_CONFIG); if (channel_arg != NULL) { GPR_ASSERT(channel_arg->type == GRPC_ARG_POINTER); chand->method_config_table = grpc_method_config_table_ref( - (grpc_method_config_table *)channel_arg->value.pointer.p); + (grpc_method_config_table*)channel_arg->value.pointer.p); } } diff --git a/src/core/lib/transport/hashtable.c b/src/core/lib/transport/hashtable.c index 3e0e0bd6c6..838fe1026e 100644 --- a/src/core/lib/transport/hashtable.c +++ b/src/core/lib/transport/hashtable.c @@ -47,8 +47,8 @@ struct grpc_hash_table { // Helper function for insert and get operations that performs quadratic // probing (https://en.wikipedia.org/wiki/Quadratic_probing). -static size_t grpc_hash_table_find_index( - grpc_hash_table* table, grpc_mdstr* key, bool find_empty) { +static size_t grpc_hash_table_find_index(grpc_hash_table* table, + grpc_mdstr* key, bool find_empty) { for (size_t i = 0; i < table->num_entries; ++i) { const size_t idx = (key->hash + i * i) % table->num_entries; if (table->entries[idx].key == NULL) diff --git a/src/core/lib/transport/hashtable.h b/src/core/lib/transport/hashtable.h index 93f0642c17..3ec48dce3a 100644 --- a/src/core/lib/transport/hashtable.h +++ b/src/core/lib/transport/hashtable.h @@ -58,7 +58,7 @@ typedef struct grpc_hash_table_vtable { typedef struct grpc_hash_table_entry { grpc_mdstr* key; - void* value; /* Must not be NULL. */ + void* value; /* Must not be NULL. */ const grpc_hash_table_vtable* vtable; } grpc_hash_table_entry; diff --git a/test/core/client_config/resolvers/sockaddr_resolver_test.c b/test/core/client_config/resolvers/sockaddr_resolver_test.c index d7dac9848a..6d475f4797 100644 --- a/test/core/client_config/resolvers/sockaddr_resolver_test.c +++ b/test/core/client_config/resolvers/sockaddr_resolver_test.c @@ -61,8 +61,8 @@ void on_resolution_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { if (res->expected_method_name == NULL) { GPR_ASSERT(lb_policy_args == NULL); } else { - const grpc_arg *channel_arg = grpc_channel_args_find( - lb_policy_args, GRPC_ARG_SERVICE_CONFIG); + const grpc_arg *channel_arg = + grpc_channel_args_find(lb_policy_args, GRPC_ARG_SERVICE_CONFIG); GPR_ASSERT(channel_arg != NULL); GPR_ASSERT(channel_arg->type == GRPC_ARG_POINTER); grpc_method_config_table *method_config_table = @@ -73,18 +73,18 @@ void on_resolution_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { grpc_method_config_table_get_method_config(method_config_table, path); GRPC_MDSTR_UNREF(path); GPR_ASSERT(method_config != NULL); - bool* wait_for_ready = grpc_method_config_get_wait_for_ready(method_config); + bool *wait_for_ready = grpc_method_config_get_wait_for_ready(method_config); GPR_ASSERT(wait_for_ready != NULL); GPR_ASSERT(*wait_for_ready == res->expected_wait_for_ready); - gpr_timespec* timeout = grpc_method_config_get_timeout(method_config); + gpr_timespec *timeout = grpc_method_config_get_timeout(method_config); GPR_ASSERT(timeout != NULL); GPR_ASSERT(gpr_time_cmp(*timeout, res->expected_timeout) == 0); - int32_t* max_request_message_bytes = + int32_t *max_request_message_bytes = grpc_method_config_get_max_request_message_bytes(method_config); GPR_ASSERT(max_request_message_bytes != NULL); GPR_ASSERT(*max_request_message_bytes == res->expected_max_request_message_bytes); - int32_t* max_response_message_bytes = + int32_t *max_response_message_bytes = grpc_method_config_get_max_response_message_bytes(method_config); GPR_ASSERT(max_response_message_bytes != NULL); GPR_ASSERT(*max_response_message_bytes == @@ -117,8 +117,8 @@ static void test_succeeds(grpc_resolver_factory *factory, const char *string) { } static void test_succeeds_with_service_config( - grpc_resolver_factory *factory, const char *string, - const char *method_name, bool wait_for_ready, gpr_timespec timeout, + grpc_resolver_factory *factory, const char *string, const char *method_name, + bool wait_for_ready, gpr_timespec timeout, int32_t max_request_message_bytes, int32_t max_response_message_bytes) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_uri *uri = grpc_uri_parse(string, 0); -- cgit v1.2.3 From c36f6ea7457e05a55f282c06f565c289750c0768 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 3 Oct 2016 09:24:09 -0700 Subject: Compile and link core tests with libuv --- BUILD | 6 + CMakeLists.txt | 5 + Makefile | 24 +++- binding.gyp | 1 + build.yaml | 17 +++ config.m4 | 1 + gRPC-Core.podspec | 1 + grpc.gemspec | 1 + package.xml | 1 + src/boringssl/gen_build_yaml.py | 2 +- src/core/lib/iomgr/endpoint_pair_uv.c | 50 +++++++ src/core/lib/iomgr/sockaddr.h | 3 +- src/core/lib/iomgr/tcp_client.h | 1 - src/core/lib/iomgr/tcp_client_uv.c | 25 +++- src/core/lib/iomgr/tcp_uv.c | 8 +- src/python/grpcio/grpc_core_dependencies.py | 1 + templates/Makefile.template | 9 +- templates/tools/run_tests/tests.json.template | 1 + .../set_initial_connect_string_test.c | 3 +- test/core/end2end/bad_server_response_test.c | 3 +- test/core/end2end/cq_verifier.c | 46 ++---- test/core/end2end/cq_verifier_internal.h | 47 +++++++ test/core/end2end/cq_verifier_native.c | 73 ++++++++++ test/core/end2end/cq_verifier_uv.c | 108 ++++++++++++++ test/core/end2end/dualstack_socket_test.c | 13 ++ test/core/end2end/fixtures/h2_fd.c | 13 ++ test/core/end2end/fixtures/h2_full+pipe.c | 13 ++ test/core/end2end/fixtures/http_proxy.c | 2 + test/core/end2end/fuzzers/api_fuzzer.c | 6 +- test/core/end2end/gen_build_yaml.py | 8 +- test/core/iomgr/fd_posix_test.c | 13 ++ test/core/iomgr/socket_utils_test.c | 14 +- test/core/iomgr/tcp_posix_test.c | 13 ++ test/core/iomgr/tcp_server_posix_test.c | 13 ++ test/core/iomgr/timer_heap_test.c | 13 ++ test/core/util/port_server_client.c | 2 +- test/core/util/port_uv.c | 58 ++++++++ tools/doxygen/Doxyfile.c++.internal | 1 + tools/doxygen/Doxyfile.core.internal | 1 + tools/run_tests/run_tests.py | 21 ++- tools/run_tests/sources_and_headers.json | 6 + tools/run_tests/tests.json | 156 +++++++++++++++++++++ vsprojects/vcxproj/grpc++/grpc++.vcxproj | 2 + vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters | 3 + .../grpc++_unsecure/grpc++_unsecure.vcxproj | 2 + .../grpc++_unsecure.vcxproj.filters | 3 + vsprojects/vcxproj/grpc/grpc.vcxproj | 2 + vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 3 + .../vcxproj/grpc_test_util/grpc_test_util.vcxproj | 9 ++ .../grpc_test_util/grpc_test_util.vcxproj.filters | 15 ++ .../grpc_test_util_unsecure.vcxproj | 7 + .../grpc_test_util_unsecure.vcxproj.filters | 12 ++ .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 2 + .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 3 + 54 files changed, 800 insertions(+), 66 deletions(-) create mode 100644 src/core/lib/iomgr/endpoint_pair_uv.c create mode 100644 test/core/end2end/cq_verifier_internal.h create mode 100644 test/core/end2end/cq_verifier_native.c create mode 100644 test/core/end2end/cq_verifier_uv.c create mode 100644 test/core/util/port_uv.c (limited to 'src/core/lib') diff --git a/BUILD b/BUILD index 0a0af3491c..e4a79b29fc 100644 --- a/BUILD +++ b/BUILD @@ -348,6 +348,7 @@ cc_library( "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_epoll_linux.c", @@ -749,6 +750,7 @@ cc_library( "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_epoll_linux.c", @@ -1112,6 +1114,7 @@ cc_library( "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_epoll_linux.c", @@ -1459,6 +1462,7 @@ cc_library( "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_epoll_linux.c", @@ -1880,6 +1884,7 @@ cc_library( "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_epoll_linux.c", @@ -2279,6 +2284,7 @@ objc_library( "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_epoll_linux.c", diff --git a/CMakeLists.txt b/CMakeLists.txt index 916c83f6fb..7dec554f68 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -309,6 +309,7 @@ add_library(grpc 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_epoll_linux.c @@ -577,6 +578,7 @@ add_library(grpc_cronet 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_epoll_linux.c @@ -817,6 +819,7 @@ add_library(grpc_unsecure 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_epoll_linux.c @@ -1085,6 +1088,7 @@ add_library(grpc++ 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_epoll_linux.c @@ -1449,6 +1453,7 @@ add_library(grpc++_unsecure 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_epoll_linux.c diff --git a/Makefile b/Makefile index 6929046ee5..66a7450376 100644 --- a/Makefile +++ b/Makefile @@ -345,10 +345,6 @@ HOST_CXX ?= $(CXX) HOST_LD ?= $(LD) HOST_LDXX ?= $(LDXX) -ifdef EXTRA_DEFINES -DEFINES += $(EXTRA_DEFINES) -endif - CFLAGS += -std=c99 -Wsign-conversion -Wconversion $(W_SHADOW) $(W_EXTRA_SEMI) ifeq ($(HAS_CXX11),true) CXXFLAGS += -std=c++11 @@ -447,6 +443,14 @@ LDFLAGS += $(ARCH_FLAGS) LDLIBS += $(addprefix -l, $(LIBS)) LDLIBSXX += $(addprefix -l, $(LIBSXX)) + +CFLAGS += $(EXTRA_CFLAGS) +CXXFLAGS += $(EXTRA_CXXFLAGS) +CPPFLAGS += $(EXTRA_CPPFLAGS) +LDFLAGS += $(EXTRA_LDFLAGS) +DEFINES += $(EXTRA_DEFINES) +LDLIBS += $(EXTRA_LDLIBS) + HOST_CPPFLAGS = $(CPPFLAGS) HOST_CFLAGS = $(CFLAGS) HOST_CXXFLAGS = $(CXXFLAGS) @@ -2546,6 +2550,7 @@ LIBGRPC_SRC = \ 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_epoll_linux.c \ @@ -2832,6 +2837,7 @@ LIBGRPC_CRONET_SRC = \ 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_epoll_linux.c \ @@ -3076,6 +3082,8 @@ LIBGRPC_TEST_UTIL_SRC = \ test/core/end2end/data/test_root_cert.c \ test/core/security/oauth2_utils.c \ test/core/end2end/cq_verifier.c \ + test/core/end2end/cq_verifier_native.c \ + test/core/end2end/cq_verifier_uv.c \ test/core/end2end/fixtures/http_proxy.c \ test/core/end2end/fixtures/proxy.c \ test/core/iomgr/endpoint_tests.c \ @@ -3086,6 +3094,7 @@ LIBGRPC_TEST_UTIL_SRC = \ test/core/util/passthru_endpoint.c \ test/core/util/port_posix.c \ test/core/util/port_server_client.c \ + test/core/util/port_uv.c \ test/core/util/port_windows.c \ test/core/util/slice_splitter.c \ src/core/lib/channel/channel_args.c \ @@ -3107,6 +3116,7 @@ LIBGRPC_TEST_UTIL_SRC = \ 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_epoll_linux.c \ @@ -3253,6 +3263,8 @@ endif LIBGRPC_TEST_UTIL_UNSECURE_SRC = \ test/core/end2end/cq_verifier.c \ + test/core/end2end/cq_verifier_native.c \ + test/core/end2end/cq_verifier_uv.c \ test/core/end2end/fixtures/http_proxy.c \ test/core/end2end/fixtures/proxy.c \ test/core/iomgr/endpoint_tests.c \ @@ -3263,6 +3275,7 @@ LIBGRPC_TEST_UTIL_UNSECURE_SRC = \ test/core/util/passthru_endpoint.c \ test/core/util/port_posix.c \ test/core/util/port_server_client.c \ + test/core/util/port_uv.c \ test/core/util/port_windows.c \ test/core/util/slice_splitter.c \ @@ -3310,6 +3323,7 @@ LIBGRPC_UNSECURE_SRC = \ 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_epoll_linux.c \ @@ -3661,6 +3675,7 @@ LIBGRPC++_SRC = \ 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_epoll_linux.c \ @@ -4300,6 +4315,7 @@ LIBGRPC++_UNSECURE_SRC = \ 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_epoll_linux.c \ diff --git a/binding.gyp b/binding.gyp index 3e63f73095..82ab51b71d 100644 --- a/binding.gyp +++ b/binding.gyp @@ -587,6 +587,7 @@ '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_epoll_linux.c', diff --git a/build.yaml b/build.yaml index 86ede36fff..042b48fc9b 100644 --- a/build.yaml +++ b/build.yaml @@ -275,6 +275,7 @@ filegroups: - 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_epoll_linux.c @@ -522,6 +523,7 @@ filegroups: build: test headers: - test/core/end2end/cq_verifier.h + - test/core/end2end/cq_verifier_internal.h - test/core/end2end/fixtures/http_proxy.h - test/core/end2end/fixtures/proxy.h - test/core/iomgr/endpoint_tests.h @@ -535,6 +537,8 @@ filegroups: - test/core/util/slice_splitter.h src: - test/core/end2end/cq_verifier.c + - test/core/end2end/cq_verifier_native.c + - test/core/end2end/cq_verifier_uv.c - test/core/end2end/fixtures/http_proxy.c - test/core/end2end/fixtures/proxy.c - test/core/iomgr/endpoint_tests.c @@ -545,6 +549,7 @@ filegroups: - test/core/util/passthru_endpoint.c - test/core/util/port_posix.c - test/core/util/port_server_client.c + - test/core/util/port_uv.c - test/core/util/port_windows.c - test/core/util/slice_splitter.c deps: @@ -1511,6 +1516,8 @@ targets: - grpc - gpr_test_util - gpr + exclude_iomgrs: + - uv platforms: - mac - linux @@ -2451,6 +2458,8 @@ targets: - grpc - gpr_test_util - gpr + exclude_iomgrs: + - uv platforms: - mac - linux @@ -2466,6 +2475,8 @@ targets: - grpc - gpr_test_util - gpr + exclude_iomgrs: + - uv platforms: - mac - linux @@ -2480,6 +2491,8 @@ targets: - grpc - gpr_test_util - gpr + exclude_iomgrs: + - uv platforms: - mac - linux @@ -2514,6 +2527,8 @@ targets: - grpc - gpr_test_util - gpr + exclude_iomgrs: + - uv - name: timer_list_test build: test language: c @@ -2524,6 +2539,8 @@ targets: - grpc - gpr_test_util - gpr + exclude_iomgrs: + - uv - name: transport_connectivity_state_test build: test language: c diff --git a/config.m4 b/config.m4 index 915c178289..275f176cbc 100644 --- a/config.m4 +++ b/config.m4 @@ -103,6 +103,7 @@ if test "$PHP_GRPC" != "no"; then 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_epoll_linux.c \ diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 479045d930..7ce0a0de23 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -439,6 +439,7 @@ Pod::Spec.new do |s| '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_epoll_linux.c', diff --git a/grpc.gemspec b/grpc.gemspec index ae4c3926e7..a290751322 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -359,6 +359,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/combiner.c ) s.files += %w( src/core/lib/iomgr/endpoint.c ) s.files += %w( src/core/lib/iomgr/endpoint_pair_posix.c ) + s.files += %w( src/core/lib/iomgr/endpoint_pair_uv.c ) s.files += %w( src/core/lib/iomgr/endpoint_pair_windows.c ) s.files += %w( src/core/lib/iomgr/error.c ) s.files += %w( src/core/lib/iomgr/ev_epoll_linux.c ) diff --git a/package.xml b/package.xml index 55b5933f62..4e0dad9b3b 100644 --- a/package.xml +++ b/package.xml @@ -366,6 +366,7 @@ + diff --git a/src/boringssl/gen_build_yaml.py b/src/boringssl/gen_build_yaml.py index 20f6413adf..c53beb0da5 100755 --- a/src/boringssl/gen_build_yaml.py +++ b/src/boringssl/gen_build_yaml.py @@ -36,7 +36,7 @@ import yaml sys.dont_write_bytecode = True boring_ssl_root = os.path.abspath(os.path.join( - os.path.dirname(sys.argv[0]), + os.path.dirname(sys.argv[0]), '../../third_party/boringssl')) sys.path.append(os.path.join(boring_ssl_root, 'util')) diff --git a/src/core/lib/iomgr/endpoint_pair_uv.c b/src/core/lib/iomgr/endpoint_pair_uv.c new file mode 100644 index 0000000000..eeca8070b5 --- /dev/null +++ b/src/core/lib/iomgr/endpoint_pair_uv.c @@ -0,0 +1,50 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include "src/core/lib/iomgr/port.h" + +#ifdef GRPC_UV + +#include + +#include "src/core/lib/iomgr/endpoint_pair.h" + +grpc_endpoint_pair grpc_iomgr_create_endpoint_pair(const char *name, + size_t read_slice_size) { + grpc_endpoint_pair endpoint_pair; + // TODO(mlumish): implement this properly under libuv + abort(); + return endpoint_pair; +} + +#endif /* GRPC_UV */ diff --git a/src/core/lib/iomgr/sockaddr.h b/src/core/lib/iomgr/sockaddr.h index 75dc532d6c..52b504390d 100644 --- a/src/core/lib/iomgr/sockaddr.h +++ b/src/core/lib/iomgr/sockaddr.h @@ -32,7 +32,8 @@ */ /* This header transitively includes other headers that care about include - * order, so it should be included first */ + * order, so it should be included first. As a consequence, it should not be + * included in any other header. */ #ifndef GRPC_CORE_LIB_IOMGR_SOCKADDR_H #define GRPC_CORE_LIB_IOMGR_SOCKADDR_H diff --git a/src/core/lib/iomgr/tcp_client.h b/src/core/lib/iomgr/tcp_client.h index 83e69003f5..fe1e7f4d3e 100644 --- a/src/core/lib/iomgr/tcp_client.h +++ b/src/core/lib/iomgr/tcp_client.h @@ -38,7 +38,6 @@ #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/iomgr/resolve_address.h" -#include "src/core/lib/iomgr/sockaddr.h" /* Asynchronously connect to an address (specified as (addr, len)), and call cb with arg and the completed connection when done (or call cb with arg and diff --git a/src/core/lib/iomgr/tcp_client_uv.c b/src/core/lib/iomgr/tcp_client_uv.c index 3a2cca5392..50e3615aad 100644 --- a/src/core/lib/iomgr/tcp_client_uv.c +++ b/src/core/lib/iomgr/tcp_client_uv.c @@ -116,11 +116,11 @@ static void uv_tc_on_connect(uv_connect_t *req, int status) { grpc_exec_ctx_finish(&exec_ctx); } -void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure, - grpc_endpoint **ep, - grpc_pollset_set *interested_parties, - const grpc_resolved_address *resolved_addr, - gpr_timespec deadline) { +static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, + grpc_closure *closure, grpc_endpoint **ep, + grpc_pollset_set *interested_parties, + const grpc_resolved_address *resolved_addr, + gpr_timespec deadline) { grpc_uv_tcp_connect *connect; (void)interested_parties; connect = gpr_malloc(sizeof(grpc_uv_tcp_connect)); @@ -141,4 +141,19 @@ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure, uv_tc_on_alarm, connect, gpr_now(GPR_CLOCK_MONOTONIC)); } +// overridden by api_fuzzer.c +void (*grpc_tcp_client_connect_impl)( + grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, + grpc_pollset_set *interested_parties, const grpc_resolved_address *addr, + gpr_timespec deadline) = tcp_client_connect_impl; + +void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure, + grpc_endpoint **ep, + grpc_pollset_set *interested_parties, + const grpc_resolved_address *addr, + gpr_timespec deadline) { + grpc_tcp_client_connect_impl(exec_ctx, closure, ep, interested_parties, addr, + deadline); +} + #endif /* GRPC_UV */ diff --git a/src/core/lib/iomgr/tcp_uv.c b/src/core/lib/iomgr/tcp_uv.c index 270708bd29..88c4195c2b 100644 --- a/src/core/lib/iomgr/tcp_uv.c +++ b/src/core/lib/iomgr/tcp_uv.c @@ -135,7 +135,7 @@ static void read_callback(uv_stream_t *stream, ssize_t nread, error = GRPC_ERROR_CREATE("EOF"); } else if (nread > 0) { // Successful read - sub = gpr_slice_sub_no_ref(tcp->read_slice, 0, nread); + sub = gpr_slice_sub_no_ref(tcp->read_slice, 0, (size_t)nread); gpr_slice_buffer_add(tcp->read_slices, sub); error = GRPC_ERROR_NONE; if (grpc_tcp_trace) { @@ -217,10 +217,10 @@ static void uv_endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, uv_write_t *write_req; if (grpc_tcp_trace) { - size_t i; + size_t j; - for (i = 0; i < write_slices->count; i++) { - char *data = gpr_dump_slice(write_slices->slices[i], + for (j = 0; j < write_slices->count; j++) { + char *data = gpr_dump_slice(write_slices->slices[j], GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_DEBUG, "WRITE %p (peer=%s): %s", tcp, tcp->peer_string, data); gpr_free(data); diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 997efe6b84..dd142c5a2e 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -97,6 +97,7 @@ CORE_SOURCE_FILES = [ '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_epoll_linux.c', diff --git a/templates/Makefile.template b/templates/Makefile.template index e6a28d16bc..3b76ded95d 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -219,10 +219,6 @@ HOST_LD ?= $(LD) HOST_LDXX ?= $(LDXX) - ifdef EXTRA_DEFINES - DEFINES += $(EXTRA_DEFINES) - endif - CFLAGS += -std=c99 -Wsign-conversion -Wconversion ${' '.join(warning_var('$(W_%s)', warning) for warning in PREFERRED_WARNINGS)} ifeq ($(HAS_CXX11),true) CXXFLAGS += -std=c++11 @@ -324,6 +320,11 @@ LDLIBS += $(addprefix -l, $(LIBS)) LDLIBSXX += $(addprefix -l, $(LIBSXX)) + + % for arg in ['CFLAGS', 'CXXFLAGS', 'CPPFLAGS', 'LDFLAGS', 'DEFINES', 'LDLIBS']: + ${arg} += $(EXTRA_${arg}) + % endfor + HOST_CPPFLAGS = $(CPPFLAGS) HOST_CFLAGS = $(CFLAGS) HOST_CXXFLAGS = $(CXXFLAGS) diff --git a/templates/tools/run_tests/tests.json.template b/templates/tools/run_tests/tests.json.template index 5690874415..1e21465dd2 100644 --- a/templates/tools/run_tests/tests.json.template +++ b/templates/tools/run_tests/tests.json.template @@ -10,6 +10,7 @@ "ci_platforms": tgt.ci_platforms, "gtest": tgt.gtest, "exclude_configs": tgt.get("exclude_configs", []), + "exclude_iomgrs": tgt.get("exclude_iomgrs", []), "args": [], "flaky": tgt.flaky, "cpu_cost": tgt.get("cpu_cost", 1.0)} diff --git a/test/core/client_config/set_initial_connect_string_test.c b/test/core/client_config/set_initial_connect_string_test.c index dcff859e4b..d79579aa71 100644 --- a/test/core/client_config/set_initial_connect_string_test.c +++ b/test/core/client_config/set_initial_connect_string_test.c @@ -30,6 +30,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ +#include "src/core/lib/iomgr/sockaddr.h" + #include #include @@ -40,7 +42,6 @@ #include #include "src/core/ext/client_config/initial_connect_string.h" -#include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/security/credentials/fake/fake_credentials.h" #include "src/core/lib/support/string.h" #include "test/core/util/port.h" diff --git a/test/core/end2end/bad_server_response_test.c b/test/core/end2end/bad_server_response_test.c index 5ed0eb64d2..2fe3963b40 100644 --- a/test/core/end2end/bad_server_response_test.c +++ b/test/core/end2end/bad_server_response_test.c @@ -30,6 +30,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ +#include "src/core/lib/iomgr/sockaddr.h" + #include #include @@ -40,7 +42,6 @@ #include // #include "src/core/ext/transport/chttp2/transport/internal.h" -#include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/support/string.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/util/port.h" diff --git a/test/core/end2end/cq_verifier.c b/test/core/end2end/cq_verifier.c index 1f42d3457e..9e6c0a4f4c 100644 --- a/test/core/end2end/cq_verifier.c +++ b/test/core/end2end/cq_verifier.c @@ -32,6 +32,7 @@ */ #include "test/core/end2end/cq_verifier.h" +#include "test/core/end2end/cq_verifier_internal.h" #include #include @@ -59,35 +60,15 @@ typedef struct metadata { /* details what we expect to find on a single event - and forms a linked list to detail other expectations */ -typedef struct expectation { +struct expectation { struct expectation *next; const char *file; int line; grpc_completion_type type; void *tag; int success; -} expectation; - -/* the verifier itself */ -struct cq_verifier { - /* bound completion queue */ - grpc_completion_queue *cq; - /* start of expectation list */ - expectation *first_expectation; }; -cq_verifier *cq_verifier_create(grpc_completion_queue *cq) { - cq_verifier *v = gpr_malloc(sizeof(cq_verifier)); - v->cq = cq; - v->first_expectation = NULL; - return v; -} - -void cq_verifier_destroy(cq_verifier *v) { - cq_verify(v); - gpr_free(v); -} - static int has_metadata(const grpc_metadata *md, size_t count, const char *key, const char *value) { size_t i; @@ -197,7 +178,7 @@ static void expectation_to_strvec(gpr_strvec *buf, expectation *e) { static void expectations_to_strvec(gpr_strvec *buf, cq_verifier *v) { expectation *e; - for (e = v->first_expectation; e != NULL; e = e->next) { + for (e = cq_verifier_get_first_expectation(v); e != NULL; e = e->next) { expectation_to_strvec(buf, e); gpr_strvec_add(buf, gpr_strdup("\n")); } @@ -217,19 +198,19 @@ static void fail_no_event_received(cq_verifier *v) { } void cq_verify(cq_verifier *v) { - const gpr_timespec deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10); - while (v->first_expectation != NULL) { - grpc_event ev = grpc_completion_queue_next(v->cq, deadline, NULL); + int timeout_seconds = 10; + while (cq_verifier_get_first_expectation(v) != NULL) { + grpc_event ev = cq_verifier_next_event(v, timeout_seconds); if (ev.type == GRPC_QUEUE_TIMEOUT) { fail_no_event_received(v); break; } expectation *e; expectation *prev = NULL; - for (e = v->first_expectation; e != NULL; e = e->next) { + for (e = cq_verifier_get_first_expectation(v); e != NULL; e = e->next) { if (e->tag == ev.tag) { verify_matches(e, &ev); - if (e == v->first_expectation) v->first_expectation = e->next; + if (e == cq_verifier_get_first_expectation(v)) cq_verifier_set_first_expectation(v, e->next); if (prev != NULL) prev->next = e->next; gpr_free(e); break; @@ -253,14 +234,11 @@ void cq_verify(cq_verifier *v) { } void cq_verify_empty_timeout(cq_verifier *v, int timeout_sec) { - gpr_timespec deadline = - gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), - gpr_time_from_seconds(timeout_sec, GPR_TIMESPAN)); grpc_event ev; - GPR_ASSERT(v->first_expectation == NULL && "expectation queue must be empty"); + GPR_ASSERT(cq_verifier_get_first_expectation(v) == NULL && "expectation queue must be empty"); - ev = grpc_completion_queue_next(v->cq, deadline, NULL); + ev = cq_verifier_next_event(v, timeout_sec); if (ev.type != GRPC_QUEUE_TIMEOUT) { char *s = grpc_event_string(&ev); gpr_log(GPR_ERROR, "unexpected event (expected nothing): %s", s); @@ -279,8 +257,8 @@ static void add(cq_verifier *v, const char *file, int line, e->line = line; e->tag = tag; e->success = success; - e->next = v->first_expectation; - v->first_expectation = e; + e->next = cq_verifier_get_first_expectation(v); + cq_verifier_set_first_expectation(v, e); } void cq_expect_completion(cq_verifier *v, const char *file, int line, void *tag, diff --git a/test/core/end2end/cq_verifier_internal.h b/test/core/end2end/cq_verifier_internal.h new file mode 100644 index 0000000000..1549608469 --- /dev/null +++ b/test/core/end2end/cq_verifier_internal.h @@ -0,0 +1,47 @@ +/* + * + * 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. + * + */ + +#ifndef GRPC_TEST_CORE_END2END_CQ_VERIFIER_INTERNAL_H +#define GRPC_TEST_CORE_END2END_CQ_VERIFIER_INTERNAL_H + +#include "test/core/end2end/cq_verifier.h" + +typedef struct expectation expectation; + +expectation *cq_verifier_get_first_expectation(cq_verifier *v); + +void cq_verifier_set_first_expectation(cq_verifier *v, expectation *e); + +grpc_event cq_verifier_next_event(cq_verifier *v, int timeout_seconds); + +#endif /* GRPC_TEST_CORE_END2END_CQ_VERIFIER_INTERNAL_H */ diff --git a/test/core/end2end/cq_verifier_native.c b/test/core/end2end/cq_verifier_native.c new file mode 100644 index 0000000000..fa9a87d6e4 --- /dev/null +++ b/test/core/end2end/cq_verifier_native.c @@ -0,0 +1,73 @@ +/* + * + * Copyright 2016, 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. + * + */ + +/* This check is for testing only. */ +#ifndef GRPC_UV + +#include "test/core/end2end/cq_verifier_internal.h" + +/* the verifier itself */ +struct cq_verifier { + /* bound completion queue */ + grpc_completion_queue *cq; + /* start of expectation list */ + expectation *first_expectation; + uv_timer_t timer; +}; + +cq_verifier *cq_verifier_create(grpc_completion_queue *cq) { + cq_verifier *v = gpr_malloc(sizeof(cq_verifier)); + v->cq = cq; + cq_verifier_set_first_expectation(v,NULL); + return v; +} + +void cq_verifier_destroy(cq_verifier *v) { + cq_verify(v); + gpr_free(v); +} + +expectation *cq_verifier_get_first_expectation(cq_verifier *v) { + return v->first_expectation; +} + +void cq_verifier_set_first_expectation(cq_verifier *v, expectation *e) { + v->first_expectation = e; +} + +grpc_event cq_verifier_next_event(cq_verifier *v, int timeout_seconds) { + const gpr_timespec deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(timeout_seconds); + return grpc_completion_queue_next(v->cq, deadline, NULL); +} + +#endif /* GRPC_UV */ diff --git a/test/core/end2end/cq_verifier_uv.c b/test/core/end2end/cq_verifier_uv.c new file mode 100644 index 0000000000..329dacf97e --- /dev/null +++ b/test/core/end2end/cq_verifier_uv.c @@ -0,0 +1,108 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include + +#ifdef GRPC_UV + +#include + +#include + +#include "test/core/end2end/cq_verifier_internal.h" + +typedef enum timer_state { + TIMER_STARTED, + TIMER_TRIGGERED, + TIMER_CLOSED +} timer_state; + +/* the verifier itself */ +struct cq_verifier { + /* bound completion queue */ + grpc_completion_queue *cq; + /* start of expectation list */ + expectation *first_expectation; + uv_timer_t timer; +}; + +cq_verifier *cq_verifier_create(grpc_completion_queue *cq) { + cq_verifier *v = gpr_malloc(sizeof(cq_verifier)); + v->cq = cq; + v->first_expectation = NULL; + uv_timer_init(uv_default_loop(), &v->timer); + v->timer.data = (void *)TIMER_STARTED; + return v; +} + +void timer_close_cb(uv_handle_t *handle) { + handle->data = (void *)TIMER_CLOSED; +} + +void cq_verifier_destroy(cq_verifier *v) { + cq_verify(v); + uv_close((uv_handle_t *)&v->timer, timer_close_cb); + while ((timer_state)v->timer.data != TIMER_CLOSED) { + uv_run(uv_default_loop(), UV_RUN_NOWAIT); + } + gpr_free(v); +} + +expectation *cq_verifier_get_first_expectation(cq_verifier *v) { + return v->first_expectation; +} + +void cq_verifier_set_first_expectation(cq_verifier *v, expectation *e) { + v->first_expectation = e; +} + +void timer_run_cb(uv_timer_t *timer) { + timer->data = (void *)TIMER_TRIGGERED; +} + +grpc_event cq_verifier_next_event(cq_verifier *v, int timeout_seconds) { +uint64_t timeout_ms = timeout_seconds < 0 ? 0 : (uint64_t)timeout_seconds * 1000; + grpc_event ev; + v->timer.data = (void *)TIMER_STARTED; + uv_timer_start(&v->timer, timer_run_cb, timeout_ms, 0); + ev = grpc_completion_queue_next(v->cq, gpr_inf_past(GPR_CLOCK_MONOTONIC), NULL); + // Stop the loop if the timer goes off or we get a non-timeout event + while (((timer_state)v->timer.data != TIMER_TRIGGERED) && + ev.type == GRPC_QUEUE_TIMEOUT){ + uv_run(uv_default_loop(), UV_RUN_ONCE); + ev = grpc_completion_queue_next(v->cq, gpr_inf_past(GPR_CLOCK_MONOTONIC), NULL); + } + return ev; +} + +#endif /* GRPC_UV */ diff --git a/test/core/end2end/dualstack_socket_test.c b/test/core/end2end/dualstack_socket_test.c index 8abb81c803..e66c52132b 100644 --- a/test/core/end2end/dualstack_socket_test.c +++ b/test/core/end2end/dualstack_socket_test.c @@ -31,6 +31,11 @@ * */ +#include "src/core/lib/iomgr/port.h" + +// This test won't work except with posix sockets enabled +#ifdef GRPC_POSIX_SOCKET + #include #include @@ -353,3 +358,11 @@ int main(int argc, char **argv) { return 0; } + +#else /* GRPC_POSIX_SOCKET */ + +int main(int argc, char **argv) { + return 1; +} + +#endif /* GRPC_POSIX_SOCKET */ diff --git a/test/core/end2end/fixtures/h2_fd.c b/test/core/end2end/fixtures/h2_fd.c index 89fa02517d..85be079062 100644 --- a/test/core/end2end/fixtures/h2_fd.c +++ b/test/core/end2end/fixtures/h2_fd.c @@ -31,6 +31,11 @@ * */ +#include "src/core/lib/iomgr/port.h" + +// This test won't work except with posix sockets enabled +#ifdef GRPC_POSIX_SOCKET + #include "test/core/end2end/end2end_tests.h" #include @@ -126,3 +131,11 @@ int main(int argc, char **argv) { return 0; } + +#else /* GRPC_POSIX_SOCKET */ + +int main(int argc, char **argv) { + return 1; +} + +#endif /* GRPC_POSIX_SOCKET */ diff --git a/test/core/end2end/fixtures/h2_full+pipe.c b/test/core/end2end/fixtures/h2_full+pipe.c index e7dfc561a1..11619b099e 100644 --- a/test/core/end2end/fixtures/h2_full+pipe.c +++ b/test/core/end2end/fixtures/h2_full+pipe.c @@ -31,6 +31,11 @@ * */ +#include "src/core/lib/iomgr/port.h" + +// This test requires posix wakeup fds +#ifdef GRPC_POSIX_WAKEUP_FD + #include "test/core/end2end/end2end_tests.h" #include @@ -119,3 +124,11 @@ int main(int argc, char **argv) { return 0; } + +#else /* GRPC_POSIX_WAKEUP_FD */ + +int main(int argc, char **argv) { + return 1; +} + +#endif /* GRPC_POSIX_WAKEUP_FD */ diff --git a/test/core/end2end/fixtures/http_proxy.c b/test/core/end2end/fixtures/http_proxy.c index eeaafe49f2..b8f046c7df 100644 --- a/test/core/end2end/fixtures/http_proxy.c +++ b/test/core/end2end/fixtures/http_proxy.c @@ -33,6 +33,8 @@ #include "test/core/end2end/fixtures/http_proxy.h" +#include "src/core/lib/iomgr/sockaddr.h" + #include #include diff --git a/test/core/end2end/fuzzers/api_fuzzer.c b/test/core/end2end/fuzzers/api_fuzzer.c index 96ea82d95e..4e19b76014 100644 --- a/test/core/end2end/fuzzers/api_fuzzer.c +++ b/test/core/end2end/fuzzers/api_fuzzer.c @@ -231,8 +231,8 @@ void my_resolve_address(grpc_exec_ctx *exec_ctx, const char *addr, // defined in tcp_client_posix.c extern void (*grpc_tcp_client_connect_impl)( grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, - grpc_pollset_set *interested_parties, const struct sockaddr *addr, - size_t addr_len, gpr_timespec deadline); + grpc_pollset_set *interested_parties, const grpc_resolved_address *addr, + gpr_timespec deadline); static void sched_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, gpr_timespec deadline); @@ -289,7 +289,7 @@ static void sched_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure, static void my_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, grpc_pollset_set *interested_parties, - const struct sockaddr *addr, size_t addr_len, + const grpc_resolved_address *addr, gpr_timespec deadline) { sched_connect(exec_ctx, closure, ep, deadline); } diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py index 78b37efd37..71fe18453c 100755 --- a/test/core/end2end/gen_build_yaml.py +++ b/test/core/end2end/gen_build_yaml.py @@ -39,9 +39,9 @@ import hashlib FixtureOptions = collections.namedtuple( 'FixtureOptions', - 'fullstack includes_proxy dns_resolver secure platforms ci_mac tracing exclude_configs') + 'fullstack includes_proxy dns_resolver secure platforms ci_mac tracing exclude_configs exclude_iomgrs') default_unsecure_fixture_options = FixtureOptions( - True, False, True, False, ['windows', 'linux', 'mac', 'posix'], True, False, []) + True, False, True, False, ['windows', 'linux', 'mac', 'posix'], True, False, [], []) socketpair_unsecure_fixture_options = default_unsecure_fixture_options._replace(fullstack=False, dns_resolver=False) default_secure_fixture_options = default_unsecure_fixture_options._replace(secure=True) uds_fixture_options = default_unsecure_fixture_options._replace(dns_resolver=False, platforms=['linux', 'mac', 'posix']) @@ -58,7 +58,7 @@ END2END_FIXTURES = { 'h2_fd': fd_unsecure_fixture_options, 'h2_full': default_unsecure_fixture_options, 'h2_full+pipe': default_unsecure_fixture_options._replace( - platforms=['linux']), + platforms=['linux'], exclude_iomgrs=['uv']), 'h2_full+trace': default_unsecure_fixture_options._replace(tracing=True), 'h2_http_proxy': default_unsecure_fixture_options._replace(ci_mac=False), 'h2_oauth2': default_secure_fixture_options._replace(ci_mac=False), @@ -280,7 +280,7 @@ def main(): ) } print yaml.dump(json) - +p if __name__ == '__main__': main() diff --git a/test/core/iomgr/fd_posix_test.c b/test/core/iomgr/fd_posix_test.c index 62dc24d85a..bf6d5377a6 100644 --- a/test/core/iomgr/fd_posix_test.c +++ b/test/core/iomgr/fd_posix_test.c @@ -31,6 +31,11 @@ * */ +#include "src/core/lib/iomgr/port.h" + +// This test won't work except with posix sockets enabled +#ifdef GRPC_POSIX_SOCKET + #include "src/core/lib/iomgr/ev_posix.h" #include @@ -548,3 +553,11 @@ int main(int argc, char **argv) { grpc_iomgr_shutdown(); return 0; } + +#else /* GRPC_POSIX_SOCKET */ + +int main(int argc, char **argv) { + return 1; +} + +#endif /* GRPC_POSIX_SOCKET */ diff --git a/test/core/iomgr/socket_utils_test.c b/test/core/iomgr/socket_utils_test.c index 297531c44d..bb789e4c5a 100644 --- a/test/core/iomgr/socket_utils_test.c +++ b/test/core/iomgr/socket_utils_test.c @@ -31,7 +31,11 @@ * */ -#include +#include "src/core/lib/iomgr/port.h" + +// This test won't work except with posix sockets enabled +#ifdef GRPC_POSIX_SOCKET + #include "src/core/lib/iomgr/socket_utils_posix.h" #include @@ -68,3 +72,11 @@ int main(int argc, char **argv) { return 0; } + +#else /* GRPC_POSIX_SOCKET */ + +int main(int argc, char **argv) { + return 1; +} + +#endif /* GRPC_POSIX_SOCKET */ diff --git a/test/core/iomgr/tcp_posix_test.c b/test/core/iomgr/tcp_posix_test.c index 42614567ca..495e648090 100644 --- a/test/core/iomgr/tcp_posix_test.c +++ b/test/core/iomgr/tcp_posix_test.c @@ -31,6 +31,11 @@ * */ +#include "src/core/lib/iomgr/port.h" + +// This test won't work except with posix sockets enabled +#ifdef GRPC_POSIX_SOCKET + #include "src/core/lib/iomgr/tcp_posix.h" #include @@ -544,3 +549,11 @@ int main(int argc, char **argv) { return 0; } + +#else /* GRPC_POSIX_SOCKET */ + +int main(int argc, char **argv) { + return 1; +} + +#endif /* GRPC_POSIX_SOCKET */ diff --git a/test/core/iomgr/tcp_server_posix_test.c b/test/core/iomgr/tcp_server_posix_test.c index b44ab89775..d1c0af55fe 100644 --- a/test/core/iomgr/tcp_server_posix_test.c +++ b/test/core/iomgr/tcp_server_posix_test.c @@ -31,6 +31,11 @@ * */ +#include "src/core/lib/iomgr/port.h" + +// This test won't work except with posix sockets enabled +#ifdef GRPC_POSIX_SOCKET + #include "src/core/lib/iomgr/tcp_server.h" #include @@ -360,3 +365,11 @@ int main(int argc, char **argv) { gpr_free(g_pollset); return 0; } + +#else /* GRPC_POSIX_SOCKET */ + +int main(int argc, char **argv) { + return 1; +} + +#endif /* GRPC_POSIX_SOCKET */ diff --git a/test/core/iomgr/timer_heap_test.c b/test/core/iomgr/timer_heap_test.c index d1cb0047f2..a68988df77 100644 --- a/test/core/iomgr/timer_heap_test.c +++ b/test/core/iomgr/timer_heap_test.c @@ -31,6 +31,11 @@ * */ +#include "src/core/lib/iomgr/port.h" + +// This test only works with the generic timer implementation +#ifdef GRPC_TIMER_USE_GENERIC + #include "src/core/lib/iomgr/timer_heap.h" #include @@ -315,3 +320,11 @@ int main(int argc, char **argv) { return 0; } + +#else /* GRPC_TIMER_USE_GENERIC */ + +int main(int argc, char **argv) { + return 1; +} + +#endif /* GRPC_TIMER_USE_GENERIC */ diff --git a/test/core/util/port_server_client.c b/test/core/util/port_server_client.c index a5c8c49650..d4a11c1e93 100644 --- a/test/core/util/port_server_client.c +++ b/test/core/util/port_server_client.c @@ -80,7 +80,7 @@ void grpc_free_port_using_server(char *server, int port) { grpc_httpcli_response rsp; freereq pr; char *path; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_RUN_INNER_LOOP; grpc_closure *shutdown_closure; grpc_init(); diff --git a/test/core/util/port_uv.c b/test/core/util/port_uv.c new file mode 100644 index 0000000000..e6d37caf98 --- /dev/null +++ b/test/core/util/port_uv.c @@ -0,0 +1,58 @@ +/* + * + * 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. + * + */ + +#include "src/core/lib/iomgr/port.h" +#include "test/core/util/test_config.h" +#if defined(GRPC_UV) && defined(GRPC_TEST_PICK_PORT) + +#include + +#include "test/core/util/port.h" + +int grpc_pick_unused_port(void) { + // Temporary implementation + return 4242; +} + +int grpc_pick_unused_port_or_die(void) { + int port = grpc_pick_unused_port(); + GPR_ASSERT(port > 0); + return port; +} + +void grpc_recycle_unused_port(int port) { + // Temporary implementation + (void)port; +} + +#endif /* GRPC_UV && GRPC_TEST_PICK_PORT */ diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 645985d8e1..6ef586f5a5 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -1011,6 +1011,7 @@ 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_epoll_linux.c \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index f63ff9eb3b..19d01cd325 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -976,6 +976,7 @@ 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_epoll_linux.c \ diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 19931246cc..87325d244d 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -83,7 +83,7 @@ _DEFAULT_TIMEOUT_SECONDS = 5 * 60 # SimpleConfig: just compile with CONFIG=config, and run the binary to test class Config(object): - def __init__(self, config, environ=None, timeout_multiplier=1, tool_prefix=[]): + def __init__(self, config, environ=None, timeout_multiplier=1, tool_prefix=[], iomgr_platform='native'): if environ is None: environ = {} self.build_config = config @@ -91,6 +91,7 @@ class Config(object): self.environ['CONFIG'] = config self.tool_prefix = tool_prefix self.timeout_multiplier = timeout_multiplier + self.iomgr_platform = iomgr_platform def job_spec(self, cmdline, timeout_seconds=_DEFAULT_TIMEOUT_SECONDS, shortname=None, environ={}, cpu_cost=1.0, flaky=False): @@ -202,6 +203,18 @@ class CLanguage(object): else: self._docker_distro, self._make_options = self._compiler_options(self.args.use_docker, self.args.compiler) + if args.iomgr_platform == "uv": + cflags = '-DGRPC_UV ' + try: + cflags += subprocess.check_output(['pkg-config', '--cflags', 'libuv']).strip() + ' ' + except subprocess.CalledProcessError: + pass + try: + ldflags = subprocess.check_output(['pkg-config', '--libs', 'libuv']).strip() + ' ' + except subprocess.CalledProcessError: + ldflags = '-luv ' + self._make_options += ['EXTRA_CPPFLAGS={}'.format(cflags), + 'EXTRA_LDLIBS={}'.format(ldflags)] def test_specs(self): out = [] @@ -218,6 +231,8 @@ class CLanguage(object): shortname_ext = '' if polling_strategy=='all' else ' GRPC_POLL_STRATEGY=%s' % polling_strategy if self.config.build_config in target['exclude_configs']: continue + if self.args.iomgr_platform in target.get('exclude_iomgrs', []): + continue if self.platform == 'windows': binary = 'vsprojects/%s%s/%s.exe' % ( 'x64/' if self.args.arch == 'x64' else '', @@ -1003,6 +1018,10 @@ argp.add_argument('--compiler', 'coreclr'], default='default', help='Selects compiler to use. Allowed values depend on the platform and language.') +argp.add_argument('--iomgr_platform', + choices=['native', 'uv'], + default='native', + help='Selects iomgr platform to build on') argp.add_argument('--build_only', default=False, action='store_const', diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index c268971937..8fe9440992 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -6111,6 +6111,7 @@ "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", @@ -6549,6 +6550,7 @@ ], "headers": [ "test/core/end2end/cq_verifier.h", + "test/core/end2end/cq_verifier_internal.h", "test/core/end2end/fixtures/http_proxy.h", "test/core/end2end/fixtures/proxy.h", "test/core/iomgr/endpoint_tests.h", @@ -6566,6 +6568,9 @@ "src": [ "test/core/end2end/cq_verifier.c", "test/core/end2end/cq_verifier.h", + "test/core/end2end/cq_verifier_internal.h", + "test/core/end2end/cq_verifier_native.c", + "test/core/end2end/cq_verifier_uv.c", "test/core/end2end/fixtures/http_proxy.c", "test/core/end2end/fixtures/http_proxy.h", "test/core/end2end/fixtures/proxy.c", @@ -6586,6 +6591,7 @@ "test/core/util/port_posix.c", "test/core/util/port_server_client.c", "test/core/util/port_server_client.h", + "test/core/util/port_uv.c", "test/core/util/port_windows.c", "test/core/util/slice_splitter.c", "test/core/util/slice_splitter.h" diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 6500c4aac3..3d80d013ca 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -11,6 +11,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -32,6 +33,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -53,6 +55,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -74,6 +77,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -95,6 +99,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -116,6 +121,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -137,6 +143,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -158,6 +165,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -179,6 +187,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -200,6 +209,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -221,6 +231,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -242,6 +253,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -263,6 +275,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -284,6 +297,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -305,6 +319,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -326,6 +341,7 @@ ], "cpu_cost": 30, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -347,6 +363,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -368,6 +385,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -389,6 +407,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -410,6 +429,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -430,6 +450,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "gtest": false, "language": "c", @@ -450,6 +473,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -468,6 +492,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -485,6 +510,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -504,6 +530,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -523,6 +550,7 @@ ], "cpu_cost": 1.5, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -542,6 +570,7 @@ ], "cpu_cost": 1.5, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -561,6 +590,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -581,6 +611,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -602,6 +633,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -623,6 +655,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -644,6 +677,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -665,6 +699,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -686,6 +721,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -707,6 +743,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -728,6 +765,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -749,6 +787,7 @@ ], "cpu_cost": 30, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -770,6 +809,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -791,6 +831,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -812,6 +853,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -833,6 +875,7 @@ ], "cpu_cost": 7, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -854,6 +897,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -875,6 +919,7 @@ ], "cpu_cost": 10, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -896,6 +941,7 @@ ], "cpu_cost": 10, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -917,6 +963,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -938,6 +985,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -959,6 +1007,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -980,6 +1029,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1001,6 +1051,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1022,6 +1073,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1043,6 +1095,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1064,6 +1117,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1085,6 +1139,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1106,6 +1161,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1127,6 +1183,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1147,6 +1204,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1167,6 +1225,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1188,6 +1247,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1209,6 +1269,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1230,6 +1291,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1251,6 +1313,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1272,6 +1335,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1292,6 +1356,7 @@ ], "cpu_cost": 0.5, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1309,6 +1374,7 @@ ], "cpu_cost": 0.5, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1327,6 +1393,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1348,6 +1415,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1369,6 +1437,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1390,6 +1459,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1411,6 +1481,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1432,6 +1503,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1453,6 +1525,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": true, "gtest": false, "language": "c", @@ -1474,6 +1547,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1495,6 +1569,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1516,6 +1591,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": true, "gtest": false, "language": "c", @@ -1537,6 +1613,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1558,6 +1635,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1579,6 +1657,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1600,6 +1679,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1621,6 +1701,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1642,6 +1723,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1663,6 +1745,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1684,6 +1767,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1705,6 +1789,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1726,6 +1811,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1747,6 +1833,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1768,6 +1855,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1788,6 +1876,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1807,6 +1896,9 @@ ], "cpu_cost": 0.5, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "gtest": false, "language": "c", @@ -1826,6 +1918,9 @@ ], "cpu_cost": 0.2, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "gtest": false, "language": "c", @@ -1845,6 +1940,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "gtest": false, "language": "c", @@ -1865,6 +1963,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1886,6 +1985,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1907,6 +2007,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "gtest": false, "language": "c", @@ -1928,6 +2031,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "gtest": false, "language": "c", @@ -1949,6 +2055,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1970,6 +2077,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1990,6 +2098,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -2009,6 +2118,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -2029,6 +2139,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -2050,6 +2161,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": true, "language": "c++", @@ -2071,6 +2183,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": true, "language": "c++", @@ -2092,6 +2205,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": true, "language": "c++", @@ -2113,6 +2227,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": true, "language": "c++", @@ -2134,6 +2249,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": true, "language": "c++", @@ -2154,6 +2270,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": true, "language": "c++", @@ -2174,6 +2291,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": true, "language": "c++", @@ -2195,6 +2313,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": true, "language": "c++", @@ -2216,6 +2335,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": true, "language": "c++", @@ -2237,6 +2357,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": true, "language": "c++", @@ -2258,6 +2379,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": true, "language": "c++", @@ -2279,6 +2401,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": true, "language": "c++", @@ -2300,6 +2423,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": true, "language": "c++", @@ -2321,6 +2445,7 @@ ], "cpu_cost": 0.5, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": true, "language": "c++", @@ -2342,6 +2467,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": true, "language": "c++", @@ -2363,6 +2489,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": true, "language": "c++", @@ -2384,6 +2511,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": true, "language": "c++", @@ -2405,6 +2533,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": true, "language": "c++", @@ -2426,6 +2555,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": true, "language": "c++", @@ -2447,6 +2577,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c++", @@ -2468,6 +2599,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": true, "language": "c++", @@ -2488,6 +2620,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c++", @@ -2508,6 +2641,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": true, "language": "c++", @@ -2529,6 +2663,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": true, "language": "c++", @@ -2549,6 +2684,7 @@ ], "cpu_cost": 0.5, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c++", @@ -2569,6 +2705,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": true, "language": "c++", @@ -2589,6 +2726,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c++", @@ -2609,6 +2747,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": true, "language": "c++", @@ -2629,6 +2768,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": true, "language": "c++", @@ -2649,6 +2789,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": true, "language": "c++", @@ -2670,6 +2811,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c++", @@ -2690,6 +2832,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": true, "language": "c++", @@ -2710,6 +2853,7 @@ ], "cpu_cost": 100, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": true, "language": "c++", @@ -2731,6 +2875,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c89", @@ -2752,6 +2897,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -2773,6 +2919,7 @@ ], "cpu_cost": 0.2, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -2794,6 +2941,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -2815,6 +2963,7 @@ ], "cpu_cost": 0.2, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -2836,6 +2985,7 @@ ], "cpu_cost": 0.2, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -2857,6 +3007,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -2878,6 +3029,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -2899,6 +3051,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -2920,6 +3073,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -2941,6 +3095,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -2961,6 +3116,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index 9a70cd4bb2..b62d50e6e0 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -565,6 +565,8 @@ + + diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters index 0d2f0cc600..85520c090f 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters @@ -157,6 +157,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj index 3f9eb3530e..fca3bbf5a3 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -551,6 +551,8 @@ + + diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters index dbcfba91b9..587eb38ee9 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters @@ -142,6 +142,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 927e2028b6..8b62411204 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -507,6 +507,8 @@ + + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 1c05f6b3f1..e2b52e1ae1 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -61,6 +61,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index d58264654d..8397b3b16f 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -176,6 +176,7 @@ + @@ -290,6 +291,10 @@ + + + + @@ -310,6 +315,8 @@ + + @@ -352,6 +359,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index baa37f91b9..8eb177911e 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -19,6 +19,12 @@ test\core\end2end + + test\core\end2end + + + test\core\end2end + test\core\end2end\fixtures @@ -49,6 +55,9 @@ test\core\util + + test\core\util + test\core\util @@ -112,6 +121,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -446,6 +458,9 @@ test\core\end2end + + test\core\end2end + test\core\end2end\fixtures diff --git a/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj b/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj index 04d1e584b5..d38045db91 100644 --- a/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj @@ -148,6 +148,7 @@ + @@ -163,6 +164,10 @@ + + + + @@ -183,6 +188,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj.filters index 0f7072aa61..00615fbf9e 100644 --- a/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj.filters @@ -4,6 +4,12 @@ test\core\end2end + + test\core\end2end + + + test\core\end2end + test\core\end2end\fixtures @@ -34,6 +40,9 @@ test\core\util + + test\core\util + test\core\util @@ -45,6 +54,9 @@ test\core\end2end + + test\core\end2end + test\core\end2end\fixtures diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 5d8b99013f..d3b3f1895d 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -475,6 +475,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index dfe01382c0..422833190c 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -64,6 +64,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr -- cgit v1.2.3 From 8725870c5822a8d2f96e275e46475594567d5ccd Mon Sep 17 00:00:00 2001 From: Dan Born Date: Mon, 3 Oct 2016 12:46:16 -0700 Subject: Fix Windows server --- src/core/lib/iomgr/tcp_server_windows.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/tcp_server_windows.c b/src/core/lib/iomgr/tcp_server_windows.c index 35faded993..4ff05601fa 100644 --- a/src/core/lib/iomgr/tcp_server_windows.c +++ b/src/core/lib/iomgr/tcp_server_windows.c @@ -121,9 +121,6 @@ grpc_error *grpc_tcp_server_create(grpc_closure *shutdown_complete, } static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { - gpr_mu_lock(&s->mu); - GPR_ASSERT(s->shutdown); - gpr_mu_unlock(&s->mu); if (s->shutdown_complete != NULL) { grpc_exec_ctx_sched(exec_ctx, s->shutdown_complete, GRPC_ERROR_NONE, NULL); } -- cgit v1.2.3 From ec393343eebbd8a32f05e9d90d92d7325d986b9d Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 3 Oct 2016 13:14:56 -0700 Subject: Add h2_fake_resolver end2end test fixture. --- Makefile | 56 + src/core/lib/channel/message_size_filter.c | 2 +- test/core/end2end/end2end_tests.h | 4 +- test/core/end2end/fixtures/h2_census.c | 6 +- test/core/end2end/fixtures/h2_compress.c | 4 +- test/core/end2end/fixtures/h2_fake_resolver.c | 128 + test/core/end2end/fixtures/h2_fakesec.c | 4 +- test/core/end2end/fixtures/h2_fd.c | 5 +- test/core/end2end/fixtures/h2_full+pipe.c | 4 +- test/core/end2end/fixtures/h2_full+trace.c | 4 +- test/core/end2end/fixtures/h2_full.c | 4 +- test/core/end2end/fixtures/h2_http_proxy.c | 4 +- test/core/end2end/fixtures/h2_load_reporting.c | 4 +- test/core/end2end/fixtures/h2_oauth2.c | 4 +- test/core/end2end/fixtures/h2_proxy.c | 4 +- test/core/end2end/fixtures/h2_sockpair+trace.c | 4 +- test/core/end2end/fixtures/h2_sockpair.c | 4 +- test/core/end2end/fixtures/h2_sockpair_1byte.c | 4 +- test/core/end2end/fixtures/h2_ssl.c | 4 +- test/core/end2end/fixtures/h2_ssl_cert.c | 4 +- test/core/end2end/fixtures/h2_ssl_proxy.c | 4 +- test/core/end2end/fixtures/h2_uds.c | 4 +- test/core/end2end/gen_build_yaml.py | 1 + test/core/end2end/tests/bad_hostname.c | 2 +- test/core/end2end/tests/binary_metadata.c | 2 +- test/core/end2end/tests/call_creds.c | 2 +- test/core/end2end/tests/cancel_after_accept.c | 2 +- test/core/end2end/tests/cancel_after_client_done.c | 2 +- test/core/end2end/tests/cancel_after_invoke.c | 2 +- test/core/end2end/tests/cancel_before_invoke.c | 2 +- test/core/end2end/tests/cancel_in_a_vacuum.c | 2 +- test/core/end2end/tests/cancel_with_status.c | 2 +- test/core/end2end/tests/compressed_payload.c | 2 +- test/core/end2end/tests/connectivity.c | 2 +- test/core/end2end/tests/default_host.c | 2 +- test/core/end2end/tests/disappearing_server.c | 2 +- test/core/end2end/tests/empty_batch.c | 2 +- test/core/end2end/tests/filter_call_init_fails.c | 2 +- test/core/end2end/tests/filter_causes_close.c | 2 +- test/core/end2end/tests/graceful_server_shutdown.c | 2 +- test/core/end2end/tests/high_initial_seqno.c | 2 +- test/core/end2end/tests/hpack_size.c | 2 +- test/core/end2end/tests/idempotent_request.c | 2 +- test/core/end2end/tests/invoke_large_request.c | 2 +- test/core/end2end/tests/large_metadata.c | 2 +- test/core/end2end/tests/load_reporting_hook.c | 2 +- test/core/end2end/tests/max_concurrent_streams.c | 2 +- test/core/end2end/tests/max_message_length.c | 2 +- test/core/end2end/tests/negative_deadline.c | 2 +- test/core/end2end/tests/network_status_change.c | 2 +- test/core/end2end/tests/no_logging.c | 2 +- test/core/end2end/tests/no_op.c | 2 +- test/core/end2end/tests/payload.c | 2 +- test/core/end2end/tests/ping.c | 2 +- test/core/end2end/tests/ping_pong_streaming.c | 2 +- test/core/end2end/tests/registered_call.c | 2 +- test/core/end2end/tests/request_with_flags.c | 2 +- test/core/end2end/tests/request_with_payload.c | 2 +- test/core/end2end/tests/server_finishes_request.c | 2 +- test/core/end2end/tests/shutdown_finishes_calls.c | 2 +- test/core/end2end/tests/shutdown_finishes_tags.c | 2 +- test/core/end2end/tests/simple_cacheable_request.c | 2 +- test/core/end2end/tests/simple_delayed_request.c | 2 +- test/core/end2end/tests/simple_metadata.c | 2 +- test/core/end2end/tests/simple_request.c | 2 +- test/core/end2end/tests/streaming_error_response.c | 2 +- test/core/end2end/tests/trailing_metadata.c | 2 +- tools/run_tests/sources_and_headers.json | 36 + tools/run_tests/tests.json | 5024 ++++++++++++++------ vsprojects/buildtests_c.sln | 56 + .../h2_fake_resolver_nosec_test.vcxproj | 191 + .../h2_fake_resolver_nosec_test.vcxproj.filters | 24 + .../h2_fake_resolver_test.vcxproj | 202 + .../h2_fake_resolver_test.vcxproj.filters | 24 + 74 files changed, 4291 insertions(+), 1620 deletions(-) create mode 100644 test/core/end2end/fixtures/h2_fake_resolver.c create mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_fake_resolver_nosec_test/h2_fake_resolver_nosec_test.vcxproj create mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_fake_resolver_nosec_test/h2_fake_resolver_nosec_test.vcxproj.filters create mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_fake_resolver_test/h2_fake_resolver_test.vcxproj create mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_fake_resolver_test/h2_fake_resolver_test.vcxproj.filters (limited to 'src/core/lib') diff --git a/Makefile b/Makefile index 4a35aacd21..53df9cb28d 100644 --- a/Makefile +++ b/Makefile @@ -1129,6 +1129,7 @@ bad_ssl_cert_server: $(BINDIR)/$(CONFIG)/bad_ssl_cert_server bad_ssl_cert_test: $(BINDIR)/$(CONFIG)/bad_ssl_cert_test h2_census_test: $(BINDIR)/$(CONFIG)/h2_census_test h2_compress_test: $(BINDIR)/$(CONFIG)/h2_compress_test +h2_fake_resolver_test: $(BINDIR)/$(CONFIG)/h2_fake_resolver_test h2_fakesec_test: $(BINDIR)/$(CONFIG)/h2_fakesec_test h2_fd_test: $(BINDIR)/$(CONFIG)/h2_fd_test h2_full_test: $(BINDIR)/$(CONFIG)/h2_full_test @@ -1147,6 +1148,7 @@ h2_ssl_proxy_test: $(BINDIR)/$(CONFIG)/h2_ssl_proxy_test h2_uds_test: $(BINDIR)/$(CONFIG)/h2_uds_test h2_census_nosec_test: $(BINDIR)/$(CONFIG)/h2_census_nosec_test h2_compress_nosec_test: $(BINDIR)/$(CONFIG)/h2_compress_nosec_test +h2_fake_resolver_nosec_test: $(BINDIR)/$(CONFIG)/h2_fake_resolver_nosec_test h2_fd_nosec_test: $(BINDIR)/$(CONFIG)/h2_fd_nosec_test h2_full_nosec_test: $(BINDIR)/$(CONFIG)/h2_full_nosec_test h2_full+pipe_nosec_test: $(BINDIR)/$(CONFIG)/h2_full+pipe_nosec_test @@ -1352,6 +1354,7 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/bad_ssl_cert_test \ $(BINDIR)/$(CONFIG)/h2_census_test \ $(BINDIR)/$(CONFIG)/h2_compress_test \ + $(BINDIR)/$(CONFIG)/h2_fake_resolver_test \ $(BINDIR)/$(CONFIG)/h2_fakesec_test \ $(BINDIR)/$(CONFIG)/h2_fd_test \ $(BINDIR)/$(CONFIG)/h2_full_test \ @@ -1370,6 +1373,7 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/h2_uds_test \ $(BINDIR)/$(CONFIG)/h2_census_nosec_test \ $(BINDIR)/$(CONFIG)/h2_compress_nosec_test \ + $(BINDIR)/$(CONFIG)/h2_fake_resolver_nosec_test \ $(BINDIR)/$(CONFIG)/h2_fd_nosec_test \ $(BINDIR)/$(CONFIG)/h2_full_nosec_test \ $(BINDIR)/$(CONFIG)/h2_full+pipe_nosec_test \ @@ -14365,6 +14369,38 @@ endif endif +H2_FAKE_RESOLVER_TEST_SRC = \ + test/core/end2end/fixtures/h2_fake_resolver.c \ + +H2_FAKE_RESOLVER_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(H2_FAKE_RESOLVER_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/h2_fake_resolver_test: openssl_dep_error + +else + + + +$(BINDIR)/$(CONFIG)/h2_fake_resolver_test: $(H2_FAKE_RESOLVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(H2_FAKE_RESOLVER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_fake_resolver_test + +endif + +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_fake_resolver.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_h2_fake_resolver_test: $(H2_FAKE_RESOLVER_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(H2_FAKE_RESOLVER_TEST_OBJS:.o=.dep) +endif +endif + + H2_FAKESEC_TEST_SRC = \ test/core/end2end/fixtures/h2_fakesec.c \ @@ -14917,6 +14953,26 @@ ifneq ($(NO_DEPS),true) endif +H2_FAKE_RESOLVER_NOSEC_TEST_SRC = \ + test/core/end2end/fixtures/h2_fake_resolver.c \ + +H2_FAKE_RESOLVER_NOSEC_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(H2_FAKE_RESOLVER_NOSEC_TEST_SRC)))) + + +$(BINDIR)/$(CONFIG)/h2_fake_resolver_nosec_test: $(H2_FAKE_RESOLVER_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(H2_FAKE_RESOLVER_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_fake_resolver_nosec_test + +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_fake_resolver.o: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_h2_fake_resolver_nosec_test: $(H2_FAKE_RESOLVER_NOSEC_TEST_OBJS:.o=.dep) + +ifneq ($(NO_DEPS),true) +-include $(H2_FAKE_RESOLVER_NOSEC_TEST_OBJS:.o=.dep) +endif + + H2_FD_NOSEC_TEST_SRC = \ test/core/end2end/fixtures/h2_fd.c \ diff --git a/src/core/lib/channel/message_size_filter.c b/src/core/lib/channel/message_size_filter.c index a54c424e1b..8a32b63449 100644 --- a/src/core/lib/channel/message_size_filter.c +++ b/src/core/lib/channel/message_size_filter.c @@ -86,7 +86,7 @@ static void recv_message_ready(grpc_exec_ctx* exec_ctx, void* user_data, grpc_exec_ctx_sched(exec_ctx, calld->next_recv_message_ready, error, NULL); } -// Start transport op. +// Start transport stream op. static void start_transport_stream_op(grpc_exec_ctx* exec_ctx, grpc_call_element* elem, grpc_transport_stream_op* op) { diff --git a/test/core/end2end/end2end_tests.h b/test/core/end2end/end2end_tests.h index 34af0936cd..2230027a45 100644 --- a/test/core/end2end/end2end_tests.h +++ b/test/core/end2end/end2end_tests.h @@ -43,6 +43,7 @@ typedef struct grpc_end2end_test_config grpc_end2end_test_config; #define FEATURE_MASK_SUPPORTS_HOSTNAME_VERIFICATION 2 #define FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS 4 #define FEATURE_MASK_SUPPORTS_REQUEST_PROXYING 8 +#define FEATURE_MASK_SUPPORTS_QUERY_ARGS 16 #define FAIL_AUTH_CHECK_SERVER_ARG_NAME "fail_auth_check" @@ -59,7 +60,8 @@ struct grpc_end2end_test_config { grpc_end2end_test_fixture (*create_fixture)(grpc_channel_args *client_args, grpc_channel_args *server_args); void (*init_client)(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args); + grpc_channel_args *client_args, + const char *query_args); void (*init_server)(grpc_end2end_test_fixture *f, grpc_channel_args *server_args); void (*tear_down_data)(grpc_end2end_test_fixture *f); diff --git a/test/core/end2end/fixtures/h2_census.c b/test/core/end2end/fixtures/h2_census.c index e46b39e476..36c2d24329 100644 --- a/test/core/end2end/fixtures/h2_census.c +++ b/test/core/end2end/fixtures/h2_census.c @@ -79,13 +79,15 @@ static grpc_arg make_census_enable_arg(void) { } void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args) { + grpc_channel_args *client_args, + const char *query_args) { + GPR_ASSERT(query_args == NULL); fullstack_fixture_data *ffd = f->fixture_data; grpc_arg arg = make_census_enable_arg(); client_args = grpc_channel_args_copy_and_add(client_args, &arg, 1); f->client = grpc_insecure_channel_create(ffd->localaddr, client_args, NULL); - grpc_channel_args_destroy(client_args); GPR_ASSERT(f->client); + grpc_channel_args_destroy(client_args); } void chttp2_init_server_fullstack(grpc_end2end_test_fixture *f, diff --git a/test/core/end2end/fixtures/h2_compress.c b/test/core/end2end/fixtures/h2_compress.c index 8f9b7c9cd9..0e84588517 100644 --- a/test/core/end2end/fixtures/h2_compress.c +++ b/test/core/end2end/fixtures/h2_compress.c @@ -75,7 +75,9 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack_compression( } void chttp2_init_client_fullstack_compression(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args) { + grpc_channel_args *client_args, + const char *query_args) { + GPR_ASSERT(query_args == NULL); fullstack_compression_fixture_data *ffd = f->fixture_data; if (ffd->client_args_compression != NULL) { grpc_channel_args_destroy(ffd->client_args_compression); diff --git a/test/core/end2end/fixtures/h2_fake_resolver.c b/test/core/end2end/fixtures/h2_fake_resolver.c new file mode 100644 index 0000000000..89debddb04 --- /dev/null +++ b/test/core/end2end/fixtures/h2_fake_resolver.c @@ -0,0 +1,128 @@ +// +// Copyright 2016, 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. +// + +#include "test/core/end2end/end2end_tests.h" + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "src/core/ext/client_config/client_channel.h" +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include "src/core/lib/channel/connected_channel.h" +#include "src/core/lib/channel/http_server_filter.h" +#include "src/core/lib/surface/channel.h" +#include "src/core/lib/surface/server.h" +#include "test/core/end2end/fake_resolver.h" +#include "test/core/util/port.h" +#include "test/core/util/test_config.h" + +typedef struct fullstack_fixture_data { + char *localaddr; +} fullstack_fixture_data; + +static grpc_end2end_test_fixture chttp2_create_fixture_fullstack( + grpc_channel_args *client_args, grpc_channel_args *server_args) { + grpc_end2end_test_fixture f; + int port = grpc_pick_unused_port_or_die(); + fullstack_fixture_data *ffd = gpr_malloc(sizeof(fullstack_fixture_data)); + memset(&f, 0, sizeof(f)); + + gpr_join_host_port(&ffd->localaddr, "127.0.0.1", port); + + f.fixture_data = ffd; + f.cq = grpc_completion_queue_create(NULL); + + return f; +} + +void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f, + grpc_channel_args *client_args, + const char *query_args) { + fullstack_fixture_data *ffd = f->fixture_data; + char *server_uri; + gpr_asprintf(&server_uri, "test:%s%s%s", ffd->localaddr, + (query_args == NULL ? "" : "?"), + (query_args == NULL ? "" : query_args)); + gpr_log(GPR_INFO, "server_uri: %s", server_uri); + f->client = grpc_insecure_channel_create(server_uri, client_args, NULL); + GPR_ASSERT(f->client); + gpr_free(server_uri); +} + +void chttp2_init_server_fullstack(grpc_end2end_test_fixture *f, + grpc_channel_args *server_args) { + fullstack_fixture_data *ffd = f->fixture_data; + if (f->server) { + grpc_server_destroy(f->server); + } + f->server = grpc_server_create(server_args, NULL); + grpc_server_register_completion_queue(f->server, f->cq, NULL); + GPR_ASSERT(grpc_server_add_insecure_http2_port(f->server, ffd->localaddr)); + grpc_server_start(f->server); +} + +void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) { + fullstack_fixture_data *ffd = f->fixture_data; + gpr_free(ffd->localaddr); + gpr_free(ffd); +} + +/* All test configurations */ +static grpc_end2end_test_config configs[] = { + {"chttp2/fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION | + FEATURE_MASK_SUPPORTS_QUERY_ARGS, + chttp2_create_fixture_fullstack, chttp2_init_client_fullstack, + chttp2_init_server_fullstack, chttp2_tear_down_fullstack}, +}; + +int main(int argc, char **argv) { + size_t i; + + grpc_test_init(argc, argv); + grpc_end2end_tests_pre_init(); + grpc_fake_resolver_init(); + grpc_init(); + + for (i = 0; i < sizeof(configs) / sizeof(*configs); i++) { + grpc_end2end_tests(argc, argv, configs[i]); + } + + grpc_shutdown(); + + return 0; +} diff --git a/test/core/end2end/fixtures/h2_fakesec.c b/test/core/end2end/fixtures/h2_fakesec.c index 44408b28af..dbe9011dcf 100644 --- a/test/core/end2end/fixtures/h2_fakesec.c +++ b/test/core/end2end/fixtures/h2_fakesec.c @@ -105,7 +105,9 @@ void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture *f) { } static void chttp2_init_client_fake_secure_fullstack( - grpc_end2end_test_fixture *f, grpc_channel_args *client_args) { + grpc_end2end_test_fixture *f, grpc_channel_args *client_args, + const char *query_args) { + GPR_ASSERT(query_args == NULL); grpc_channel_credentials *fake_ts_creds = grpc_fake_transport_security_credentials_create(); chttp2_init_client_secure_fullstack(f, client_args, fake_ts_creds); diff --git a/test/core/end2end/fixtures/h2_fd.c b/test/core/end2end/fixtures/h2_fd.c index 8561feed70..5a58fe34cd 100644 --- a/test/core/end2end/fixtures/h2_fd.c +++ b/test/core/end2end/fixtures/h2_fd.c @@ -73,7 +73,10 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair( } static void chttp2_init_client_socketpair(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args) { + grpc_channel_args *client_args, + const char *query_args) { + GPR_ASSERT(query_args == NULL); + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; sp_fixture_data *sfd = f->fixture_data; diff --git a/test/core/end2end/fixtures/h2_full+pipe.c b/test/core/end2end/fixtures/h2_full+pipe.c index e7dfc561a1..359af1aaf8 100644 --- a/test/core/end2end/fixtures/h2_full+pipe.c +++ b/test/core/end2end/fixtures/h2_full+pipe.c @@ -71,7 +71,9 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack( } void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args) { + grpc_channel_args *client_args, + const char *query_args) { + GPR_ASSERT(query_args == NULL); fullstack_fixture_data *ffd = f->fixture_data; f->client = grpc_insecure_channel_create(ffd->localaddr, client_args, NULL); GPR_ASSERT(f->client); diff --git a/test/core/end2end/fixtures/h2_full+trace.c b/test/core/end2end/fixtures/h2_full+trace.c index c4dc5b9bc1..ac997b05ab 100644 --- a/test/core/end2end/fixtures/h2_full+trace.c +++ b/test/core/end2end/fixtures/h2_full+trace.c @@ -71,7 +71,9 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack( } void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args) { + grpc_channel_args *client_args, + const char *query_args) { + GPR_ASSERT(query_args == NULL); fullstack_fixture_data *ffd = f->fixture_data; f->client = grpc_insecure_channel_create(ffd->localaddr, client_args, NULL); GPR_ASSERT(f->client); diff --git a/test/core/end2end/fixtures/h2_full.c b/test/core/end2end/fixtures/h2_full.c index 4a2f17eb91..a72ab3aedd 100644 --- a/test/core/end2end/fixtures/h2_full.c +++ b/test/core/end2end/fixtures/h2_full.c @@ -70,7 +70,9 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack( } void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args) { + grpc_channel_args *client_args, + const char *query_args) { + GPR_ASSERT(query_args == NULL); fullstack_fixture_data *ffd = f->fixture_data; f->client = grpc_insecure_channel_create(ffd->localaddr, client_args, NULL); GPR_ASSERT(f->client); diff --git a/test/core/end2end/fixtures/h2_http_proxy.c b/test/core/end2end/fixtures/h2_http_proxy.c index a675a11f66..f616da9ed5 100644 --- a/test/core/end2end/fixtures/h2_http_proxy.c +++ b/test/core/end2end/fixtures/h2_http_proxy.c @@ -75,7 +75,9 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack( } void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args) { + grpc_channel_args *client_args, + const char *query_args) { + GPR_ASSERT(query_args == NULL); fullstack_fixture_data *ffd = f->fixture_data; char *proxy_uri; gpr_asprintf(&proxy_uri, "http://%s", diff --git a/test/core/end2end/fixtures/h2_load_reporting.c b/test/core/end2end/fixtures/h2_load_reporting.c index f6d3923db9..fc4db27e3c 100644 --- a/test/core/end2end/fixtures/h2_load_reporting.c +++ b/test/core/end2end/fixtures/h2_load_reporting.c @@ -73,7 +73,9 @@ static grpc_end2end_test_fixture chttp2_create_fixture_load_reporting( } void chttp2_init_client_load_reporting(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args) { + grpc_channel_args *client_args, + const char *query_args) { + GPR_ASSERT(query_args == NULL); load_reporting_fixture_data *ffd = f->fixture_data; f->client = grpc_insecure_channel_create(ffd->localaddr, client_args, NULL); GPR_ASSERT(f->client); diff --git a/test/core/end2end/fixtures/h2_oauth2.c b/test/core/end2end/fixtures/h2_oauth2.c index fc56998cdb..dd636cfff6 100644 --- a/test/core/end2end/fixtures/h2_oauth2.c +++ b/test/core/end2end/fixtures/h2_oauth2.c @@ -150,7 +150,9 @@ void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture *f) { } static void chttp2_init_client_simple_ssl_with_oauth2_secure_fullstack( - grpc_end2end_test_fixture *f, grpc_channel_args *client_args) { + grpc_end2end_test_fixture *f, grpc_channel_args *client_args, + const char *query_args) { + GPR_ASSERT(query_args == NULL); grpc_channel_credentials *ssl_creds = grpc_ssl_credentials_create(test_root_cert, NULL, NULL); grpc_call_credentials *oauth2_creds = diff --git a/test/core/end2end/fixtures/h2_proxy.c b/test/core/end2end/fixtures/h2_proxy.c index c7b99863f0..ea1da2abc1 100644 --- a/test/core/end2end/fixtures/h2_proxy.c +++ b/test/core/end2end/fixtures/h2_proxy.c @@ -85,7 +85,9 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack( } void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args) { + grpc_channel_args *client_args, + const char *query_args) { + GPR_ASSERT(query_args == NULL); fullstack_fixture_data *ffd = f->fixture_data; f->client = grpc_insecure_channel_create( grpc_end2end_proxy_get_client_target(ffd->proxy), client_args, NULL); diff --git a/test/core/end2end/fixtures/h2_sockpair+trace.c b/test/core/end2end/fixtures/h2_sockpair+trace.c index b8a5257ab2..1ca1185309 100644 --- a/test/core/end2end/fixtures/h2_sockpair+trace.c +++ b/test/core/end2end/fixtures/h2_sockpair+trace.c @@ -97,7 +97,9 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair( } static void chttp2_init_client_socketpair(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args) { + grpc_channel_args *client_args, + const char *query_args) { + GPR_ASSERT(query_args == NULL); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_endpoint_pair *sfd = f->fixture_data; grpc_transport *transport; diff --git a/test/core/end2end/fixtures/h2_sockpair.c b/test/core/end2end/fixtures/h2_sockpair.c index a57990d6e7..265491b56d 100644 --- a/test/core/end2end/fixtures/h2_sockpair.c +++ b/test/core/end2end/fixtures/h2_sockpair.c @@ -96,7 +96,9 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair( } static void chttp2_init_client_socketpair(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args) { + grpc_channel_args *client_args, + const char *query_args) { + GPR_ASSERT(query_args == NULL); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_endpoint_pair *sfd = f->fixture_data; grpc_transport *transport; diff --git a/test/core/end2end/fixtures/h2_sockpair_1byte.c b/test/core/end2end/fixtures/h2_sockpair_1byte.c index 50aac8045a..647585d46c 100644 --- a/test/core/end2end/fixtures/h2_sockpair_1byte.c +++ b/test/core/end2end/fixtures/h2_sockpair_1byte.c @@ -96,7 +96,9 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair( } static void chttp2_init_client_socketpair(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args) { + grpc_channel_args *client_args, + const char *query_args) { + GPR_ASSERT(query_args == NULL); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_endpoint_pair *sfd = f->fixture_data; grpc_transport *transport; diff --git a/test/core/end2end/fixtures/h2_ssl.c b/test/core/end2end/fixtures/h2_ssl.c index eb28623264..63282ae081 100644 --- a/test/core/end2end/fixtures/h2_ssl.c +++ b/test/core/end2end/fixtures/h2_ssl.c @@ -109,7 +109,9 @@ void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture *f) { } static void chttp2_init_client_simple_ssl_secure_fullstack( - grpc_end2end_test_fixture *f, grpc_channel_args *client_args) { + grpc_end2end_test_fixture *f, grpc_channel_args *client_args, + const char *query_args) { + GPR_ASSERT(query_args == NULL); grpc_channel_credentials *ssl_creds = grpc_ssl_credentials_create(NULL, NULL, NULL); grpc_arg ssl_name_override = {GRPC_ARG_STRING, diff --git a/test/core/end2end/fixtures/h2_ssl_cert.c b/test/core/end2end/fixtures/h2_ssl_cert.c index ae2604dfb5..c92464cd8b 100644 --- a/test/core/end2end/fixtures/h2_ssl_cert.c +++ b/test/core/end2end/fixtures/h2_ssl_cert.c @@ -156,7 +156,9 @@ typedef enum { NONE, SELF_SIGNED, SIGNED, BAD_CERT_PAIR } certtype; #define CLIENT_INIT(cert_type) \ static void CLIENT_INIT_NAME(cert_type)(grpc_end2end_test_fixture * f, \ - grpc_channel_args * client_args) { \ + grpc_channel_args * client_args, \ + const char *query_args) { \ + GPR_ASSERT(query_args == NULL); \ grpc_channel_credentials *ssl_creds = NULL; \ grpc_ssl_pem_key_cert_pair self_signed_client_key_cert_pair = { \ test_self_signed_client_key, test_self_signed_client_cert}; \ diff --git a/test/core/end2end/fixtures/h2_ssl_proxy.c b/test/core/end2end/fixtures/h2_ssl_proxy.c index eeb54b8b88..7d39fb2055 100644 --- a/test/core/end2end/fixtures/h2_ssl_proxy.c +++ b/test/core/end2end/fixtures/h2_ssl_proxy.c @@ -142,7 +142,9 @@ void chttp2_tear_down_secure_fullstack(grpc_end2end_test_fixture *f) { } static void chttp2_init_client_simple_ssl_secure_fullstack( - grpc_end2end_test_fixture *f, grpc_channel_args *client_args) { + grpc_end2end_test_fixture *f, grpc_channel_args *client_args, + const char *query_args) { + GPR_ASSERT(query_args == NULL); grpc_channel_credentials *ssl_creds = grpc_ssl_credentials_create(NULL, NULL, NULL); grpc_arg ssl_name_override = {GRPC_ARG_STRING, diff --git a/test/core/end2end/fixtures/h2_uds.c b/test/core/end2end/fixtures/h2_uds.c index cffbeaf045..e280bb8c29 100644 --- a/test/core/end2end/fixtures/h2_uds.c +++ b/test/core/end2end/fixtures/h2_uds.c @@ -76,7 +76,9 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack( } void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args) { + grpc_channel_args *client_args, + const char *query_args) { + GPR_ASSERT(query_args == NULL); fullstack_fixture_data *ffd = f->fixture_data; f->client = grpc_insecure_channel_create(ffd->localaddr, client_args, NULL); } diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py index 78b37efd37..23b4eda98b 100755 --- a/test/core/end2end/gen_build_yaml.py +++ b/test/core/end2end/gen_build_yaml.py @@ -55,6 +55,7 @@ END2END_FIXTURES = { 'h2_census': default_unsecure_fixture_options, 'h2_load_reporting': default_unsecure_fixture_options, 'h2_fakesec': default_secure_fixture_options._replace(ci_mac=False), + 'h2_fake_resolver': default_unsecure_fixture_options, 'h2_fd': fd_unsecure_fixture_options, 'h2_full': default_unsecure_fixture_options, 'h2_full+pipe': default_unsecure_fixture_options._replace( diff --git a/test/core/end2end/tests/bad_hostname.c b/test/core/end2end/tests/bad_hostname.c index e0c7ac7c02..85258dd288 100644 --- a/test/core/end2end/tests/bad_hostname.c +++ b/test/core/end2end/tests/bad_hostname.c @@ -54,7 +54,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, grpc_end2end_test_fixture f; gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); config.init_server(&f, server_args); return f; } diff --git a/test/core/end2end/tests/binary_metadata.c b/test/core/end2end/tests/binary_metadata.c index 6b105def33..73b0f17c24 100644 --- a/test/core/end2end/tests/binary_metadata.c +++ b/test/core/end2end/tests/binary_metadata.c @@ -53,7 +53,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/call_creds.c b/test/core/end2end/tests/call_creds.c index 981c0fcc8c..99c5d94e39 100644 --- a/test/core/end2end/tests/call_creds.c +++ b/test/core/end2end/tests/call_creds.c @@ -61,7 +61,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, grpc_end2end_test_fixture f; gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(NULL, NULL); - config.init_client(&f, NULL); + config.init_client(&f, NULL, NULL); if (fail_server_auth_check) { grpc_arg fail_auth_arg = { GRPC_ARG_STRING, FAIL_AUTH_CHECK_SERVER_ARG_NAME, {NULL}}; diff --git a/test/core/end2end/tests/cancel_after_accept.c b/test/core/end2end/tests/cancel_after_accept.c index b4ac3b3249..8e2c9a0aa4 100644 --- a/test/core/end2end/tests/cancel_after_accept.c +++ b/test/core/end2end/tests/cancel_after_accept.c @@ -54,7 +54,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/cancel_after_client_done.c b/test/core/end2end/tests/cancel_after_client_done.c index 5adc71e255..f61a404b2d 100644 --- a/test/core/end2end/tests/cancel_after_client_done.c +++ b/test/core/end2end/tests/cancel_after_client_done.c @@ -54,7 +54,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/cancel_after_invoke.c b/test/core/end2end/tests/cancel_after_invoke.c index 85d8799f36..c31582bf2e 100644 --- a/test/core/end2end/tests/cancel_after_invoke.c +++ b/test/core/end2end/tests/cancel_after_invoke.c @@ -55,7 +55,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s/%s", test_name, config.name, mode.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/cancel_before_invoke.c b/test/core/end2end/tests/cancel_before_invoke.c index c57091476e..5dcd44e7b4 100644 --- a/test/core/end2end/tests/cancel_before_invoke.c +++ b/test/core/end2end/tests/cancel_before_invoke.c @@ -53,7 +53,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/cancel_in_a_vacuum.c b/test/core/end2end/tests/cancel_in_a_vacuum.c index 3b03616b3b..7f75a92e4a 100644 --- a/test/core/end2end/tests/cancel_in_a_vacuum.c +++ b/test/core/end2end/tests/cancel_in_a_vacuum.c @@ -54,7 +54,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/cancel_with_status.c b/test/core/end2end/tests/cancel_with_status.c index e65390ac4a..5cf3eb6be6 100644 --- a/test/core/end2end/tests/cancel_with_status.c +++ b/test/core/end2end/tests/cancel_with_status.c @@ -55,7 +55,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/compressed_payload.c b/test/core/end2end/tests/compressed_payload.c index 1724da4d0c..f598a3812b 100644 --- a/test/core/end2end/tests/compressed_payload.c +++ b/test/core/end2end/tests/compressed_payload.c @@ -60,7 +60,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/connectivity.c b/test/core/end2end/tests/connectivity.c index 260297ebd4..4a99165666 100644 --- a/test/core/end2end/tests/connectivity.c +++ b/test/core/end2end/tests/connectivity.c @@ -68,7 +68,7 @@ static void test_connectivity(grpc_end2end_test_config config) { gpr_thd_options thdopt = gpr_thd_options_default(); gpr_thd_id thdid; - config.init_client(&f, NULL); + config.init_client(&f, NULL, NULL); ce.channel = f.client; ce.cq = f.cq; diff --git a/test/core/end2end/tests/default_host.c b/test/core/end2end/tests/default_host.c index 208e31697e..5b32b50c03 100644 --- a/test/core/end2end/tests/default_host.c +++ b/test/core/end2end/tests/default_host.c @@ -54,7 +54,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, grpc_end2end_test_fixture f; gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); config.init_server(&f, server_args); return f; } diff --git a/test/core/end2end/tests/disappearing_server.c b/test/core/end2end/tests/disappearing_server.c index a0059b9ad5..d8d76f8c38 100644 --- a/test/core/end2end/tests/disappearing_server.c +++ b/test/core/end2end/tests/disappearing_server.c @@ -193,7 +193,7 @@ static void disappearing_server_test(grpc_end2end_test_config config) { gpr_log(GPR_INFO, "%s/%s", "disappearing_server_test", config.name); - config.init_client(&f, NULL); + config.init_client(&f, NULL, NULL); config.init_server(&f, NULL); do_request_and_shutdown_server(&f, cqv); diff --git a/test/core/end2end/tests/empty_batch.c b/test/core/end2end/tests/empty_batch.c index ac53e1839b..bc27b1ac14 100644 --- a/test/core/end2end/tests/empty_batch.c +++ b/test/core/end2end/tests/empty_batch.c @@ -55,7 +55,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/filter_call_init_fails.c b/test/core/end2end/tests/filter_call_init_fails.c index a70f50af98..0e5692f4c9 100644 --- a/test/core/end2end/tests/filter_call_init_fails.c +++ b/test/core/end2end/tests/filter_call_init_fails.c @@ -61,7 +61,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/filter_causes_close.c b/test/core/end2end/tests/filter_causes_close.c index cdf868377a..adc1e3c408 100644 --- a/test/core/end2end/tests/filter_causes_close.c +++ b/test/core/end2end/tests/filter_causes_close.c @@ -58,7 +58,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/graceful_server_shutdown.c b/test/core/end2end/tests/graceful_server_shutdown.c index 29347a068a..e098a63f8b 100644 --- a/test/core/end2end/tests/graceful_server_shutdown.c +++ b/test/core/end2end/tests/graceful_server_shutdown.c @@ -53,7 +53,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/high_initial_seqno.c b/test/core/end2end/tests/high_initial_seqno.c index dab527005c..193706b8cf 100644 --- a/test/core/end2end/tests/high_initial_seqno.c +++ b/test/core/end2end/tests/high_initial_seqno.c @@ -57,7 +57,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/hpack_size.c b/test/core/end2end/tests/hpack_size.c index fb00ae4eaa..78afdb5594 100644 --- a/test/core/end2end/tests/hpack_size.c +++ b/test/core/end2end/tests/hpack_size.c @@ -197,7 +197,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/idempotent_request.c b/test/core/end2end/tests/idempotent_request.c index 65f6dd08c5..b53e00386b 100644 --- a/test/core/end2end/tests/idempotent_request.c +++ b/test/core/end2end/tests/idempotent_request.c @@ -55,7 +55,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/invoke_large_request.c b/test/core/end2end/tests/invoke_large_request.c index 1df237cb6c..3820504e11 100644 --- a/test/core/end2end/tests/invoke_large_request.c +++ b/test/core/end2end/tests/invoke_large_request.c @@ -54,7 +54,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/large_metadata.c b/test/core/end2end/tests/large_metadata.c index eb174a2dbb..6107836b12 100644 --- a/test/core/end2end/tests/large_metadata.c +++ b/test/core/end2end/tests/large_metadata.c @@ -53,7 +53,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/load_reporting_hook.c b/test/core/end2end/tests/load_reporting_hook.c index 59d054cf87..9fdaa6dfcf 100644 --- a/test/core/end2end/tests/load_reporting_hook.c +++ b/test/core/end2end/tests/load_reporting_hook.c @@ -78,7 +78,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/max_concurrent_streams.c b/test/core/end2end/tests/max_concurrent_streams.c index 65fa946838..6c7bf9f531 100644 --- a/test/core/end2end/tests/max_concurrent_streams.c +++ b/test/core/end2end/tests/max_concurrent_streams.c @@ -53,7 +53,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/max_message_length.c b/test/core/end2end/tests/max_message_length.c index cdca3e6748..72e28fb032 100644 --- a/test/core/end2end/tests/max_message_length.c +++ b/test/core/end2end/tests/max_message_length.c @@ -56,7 +56,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, // proxy, only on the backend server. f = config.create_fixture(NULL, NULL); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/negative_deadline.c b/test/core/end2end/tests/negative_deadline.c index c999ac116a..12c6a0f2bd 100644 --- a/test/core/end2end/tests/negative_deadline.c +++ b/test/core/end2end/tests/negative_deadline.c @@ -55,7 +55,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/network_status_change.c b/test/core/end2end/tests/network_status_change.c index 1d4b6dbb18..8d6b8f8784 100644 --- a/test/core/end2end/tests/network_status_change.c +++ b/test/core/end2end/tests/network_status_change.c @@ -56,7 +56,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/no_logging.c b/test/core/end2end/tests/no_logging.c index 430bfdc797..f512c1cca8 100644 --- a/test/core/end2end/tests/no_logging.c +++ b/test/core/end2end/tests/no_logging.c @@ -83,7 +83,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/no_op.c b/test/core/end2end/tests/no_op.c index 8b29c219dc..a1c61cb8d1 100644 --- a/test/core/end2end/tests/no_op.c +++ b/test/core/end2end/tests/no_op.c @@ -53,7 +53,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/payload.c b/test/core/end2end/tests/payload.c index c71704ff61..c1db274476 100644 --- a/test/core/end2end/tests/payload.c +++ b/test/core/end2end/tests/payload.c @@ -53,7 +53,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/ping.c b/test/core/end2end/tests/ping.c index 5e5169dedc..f7e119cc2f 100644 --- a/test/core/end2end/tests/ping.c +++ b/test/core/end2end/tests/ping.c @@ -48,7 +48,7 @@ static void test_ping(grpc_end2end_test_config config) { grpc_connectivity_state state = GRPC_CHANNEL_IDLE; int i; - config.init_client(&f, NULL); + config.init_client(&f, NULL, NULL); config.init_server(&f, NULL); grpc_channel_ping(f.client, f.cq, tag(0), NULL); diff --git a/test/core/end2end/tests/ping_pong_streaming.c b/test/core/end2end/tests/ping_pong_streaming.c index 7e360c415b..30ea80043b 100644 --- a/test/core/end2end/tests/ping_pong_streaming.c +++ b/test/core/end2end/tests/ping_pong_streaming.c @@ -53,7 +53,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/registered_call.c b/test/core/end2end/tests/registered_call.c index 9b2b42b558..4c094e1b8b 100644 --- a/test/core/end2end/tests/registered_call.c +++ b/test/core/end2end/tests/registered_call.c @@ -55,7 +55,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/request_with_flags.c b/test/core/end2end/tests/request_with_flags.c index 25150e6f2d..69ad69af66 100644 --- a/test/core/end2end/tests/request_with_flags.c +++ b/test/core/end2end/tests/request_with_flags.c @@ -54,7 +54,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/request_with_payload.c b/test/core/end2end/tests/request_with_payload.c index 67208c050c..56ff83cdb4 100644 --- a/test/core/end2end/tests/request_with_payload.c +++ b/test/core/end2end/tests/request_with_payload.c @@ -53,7 +53,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/server_finishes_request.c b/test/core/end2end/tests/server_finishes_request.c index 7fb9025aa3..c23b7581f4 100644 --- a/test/core/end2end/tests/server_finishes_request.c +++ b/test/core/end2end/tests/server_finishes_request.c @@ -55,7 +55,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/shutdown_finishes_calls.c b/test/core/end2end/tests/shutdown_finishes_calls.c index dff2e6f280..a21a63ad78 100644 --- a/test/core/end2end/tests/shutdown_finishes_calls.c +++ b/test/core/end2end/tests/shutdown_finishes_calls.c @@ -53,7 +53,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/shutdown_finishes_tags.c b/test/core/end2end/tests/shutdown_finishes_tags.c index 1d110a74ea..aca7c55b9f 100644 --- a/test/core/end2end/tests/shutdown_finishes_tags.c +++ b/test/core/end2end/tests/shutdown_finishes_tags.c @@ -53,7 +53,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/simple_cacheable_request.c b/test/core/end2end/tests/simple_cacheable_request.c index b52eb19315..29ba41bd8b 100644 --- a/test/core/end2end/tests/simple_cacheable_request.c +++ b/test/core/end2end/tests/simple_cacheable_request.c @@ -55,7 +55,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/simple_delayed_request.c b/test/core/end2end/tests/simple_delayed_request.c index 74f1232d78..e1a1b8c585 100644 --- a/test/core/end2end/tests/simple_delayed_request.c +++ b/test/core/end2end/tests/simple_delayed_request.c @@ -104,7 +104,7 @@ static void simple_delayed_request_body(grpc_end2end_test_config config, size_t details_capacity = 0; int was_cancelled = 2; - config.init_client(f, client_args); + config.init_client(f, client_args, NULL); c = grpc_channel_create_call(f->client, NULL, GRPC_PROPAGATE_DEFAULTS, f->cq, "/foo", "foo.test.google.fr", deadline, NULL); diff --git a/test/core/end2end/tests/simple_metadata.c b/test/core/end2end/tests/simple_metadata.c index 13c77c033e..304af9c3fa 100644 --- a/test/core/end2end/tests/simple_metadata.c +++ b/test/core/end2end/tests/simple_metadata.c @@ -53,7 +53,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/simple_request.c b/test/core/end2end/tests/simple_request.c index ed7b850808..65a3710c14 100644 --- a/test/core/end2end/tests/simple_request.c +++ b/test/core/end2end/tests/simple_request.c @@ -55,7 +55,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/streaming_error_response.c b/test/core/end2end/tests/streaming_error_response.c index 8285468321..fe63c6f7bb 100644 --- a/test/core/end2end/tests/streaming_error_response.c +++ b/test/core/end2end/tests/streaming_error_response.c @@ -55,7 +55,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, request_status_early ? "true" : "false"); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/test/core/end2end/tests/trailing_metadata.c b/test/core/end2end/tests/trailing_metadata.c index d7093ae723..e6bfc7c9f1 100644 --- a/test/core/end2end/tests/trailing_metadata.c +++ b/test/core/end2end/tests/trailing_metadata.c @@ -53,7 +53,7 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args); + config.init_client(&f, client_args, NULL); return f; } diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 18d27220cc..125e7cbe24 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -3897,6 +3897,24 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "end2end_tests", + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "is_filegroup": false, + "language": "c", + "name": "h2_fake_resolver_test", + "src": [ + "test/core/end2end/fixtures/h2_fake_resolver.c" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "end2end_tests", @@ -4221,6 +4239,24 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "end2end_nosec_tests", + "gpr", + "gpr_test_util", + "grpc_test_util_unsecure", + "grpc_unsecure" + ], + "headers": [], + "is_filegroup": false, + "language": "c", + "name": "h2_fake_resolver_nosec_test", + "src": [ + "test/core/end2end/fixtures/h2_fake_resolver.c" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "end2end_nosec_tests", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 355fea5d5f..eaa892c421 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -6460,13 +6460,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -6481,13 +6482,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -6502,13 +6504,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -6523,13 +6526,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -6544,13 +6548,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -6565,13 +6570,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -6586,13 +6592,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -6607,13 +6614,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -6628,13 +6636,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -6649,13 +6658,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -6670,13 +6680,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -6691,13 +6702,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -6712,13 +6724,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -6733,13 +6746,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -6754,13 +6768,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -6775,13 +6790,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -6796,13 +6812,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -6817,13 +6834,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -6838,13 +6856,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -6859,13 +6878,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -6880,13 +6900,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -6901,13 +6922,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -6922,13 +6944,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -6943,13 +6966,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -6964,13 +6988,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -6985,13 +7010,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -7006,13 +7032,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -7027,13 +7054,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -7048,13 +7076,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -7069,13 +7098,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -7090,13 +7120,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -7111,13 +7142,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -7132,13 +7164,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -7153,13 +7186,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -7174,13 +7208,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -7195,13 +7230,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -7216,13 +7252,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -7237,13 +7274,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -7258,13 +7296,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -7279,13 +7318,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -7300,13 +7340,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -7321,13 +7362,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -7342,13 +7384,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -7363,13 +7406,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_fake_resolver_test", "platforms": [ "windows", "linux", @@ -7382,16 +7426,17 @@ "bad_hostname" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -7402,16 +7447,17 @@ "binary_metadata" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -7422,16 +7468,17 @@ "call_creds" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -7442,16 +7489,17 @@ "cancel_after_accept" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -7462,16 +7510,17 @@ "cancel_after_client_done" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -7482,16 +7531,17 @@ "cancel_after_invoke" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -7502,16 +7552,17 @@ "cancel_before_invoke" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -7522,16 +7573,17 @@ "cancel_in_a_vacuum" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -7542,16 +7594,17 @@ "cancel_with_status" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -7562,16 +7615,17 @@ "compressed_payload" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -7579,19 +7633,20 @@ }, { "args": [ - "empty_batch" + "connectivity" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -7599,19 +7654,20 @@ }, { "args": [ - "filter_call_init_fails" + "default_host" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -7619,19 +7675,20 @@ }, { "args": [ - "filter_causes_close" + "disappearing_server" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -7639,19 +7696,20 @@ }, { "args": [ - "graceful_server_shutdown" + "empty_batch" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -7659,19 +7717,20 @@ }, { "args": [ - "high_initial_seqno" + "filter_call_init_fails" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -7679,19 +7738,20 @@ }, { "args": [ - "hpack_size" + "filter_causes_close" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -7699,19 +7759,20 @@ }, { "args": [ - "idempotent_request" + "graceful_server_shutdown" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -7719,19 +7780,20 @@ }, { "args": [ - "invoke_large_request" + "high_initial_seqno" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -7739,19 +7801,20 @@ }, { "args": [ - "large_metadata" + "hpack_size" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -7759,19 +7822,20 @@ }, { "args": [ - "load_reporting_hook" + "idempotent_request" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -7779,19 +7843,20 @@ }, { "args": [ - "max_concurrent_streams" + "invoke_large_request" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -7799,19 +7864,20 @@ }, { "args": [ - "max_message_length" + "large_metadata" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -7819,19 +7885,20 @@ }, { "args": [ - "negative_deadline" + "load_reporting_hook" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -7839,19 +7906,20 @@ }, { "args": [ - "network_status_change" + "max_concurrent_streams" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -7859,19 +7927,20 @@ }, { "args": [ - "no_logging" + "max_message_length" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -7879,19 +7948,20 @@ }, { "args": [ - "no_op" + "negative_deadline" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -7899,19 +7969,20 @@ }, { "args": [ - "payload" + "network_status_change" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -7919,19 +7990,20 @@ }, { "args": [ - "ping_pong_streaming" + "no_logging" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -7939,19 +8011,20 @@ }, { "args": [ - "registered_call" + "no_op" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -7959,19 +8032,20 @@ }, { "args": [ - "request_with_flags" + "payload" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -7979,19 +8053,20 @@ }, { "args": [ - "request_with_payload" + "ping" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -7999,19 +8074,20 @@ }, { "args": [ - "server_finishes_request" + "ping_pong_streaming" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -8019,19 +8095,20 @@ }, { "args": [ - "shutdown_finishes_calls" + "registered_call" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -8039,19 +8116,20 @@ }, { "args": [ - "shutdown_finishes_tags" + "request_with_flags" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -8059,19 +8137,20 @@ }, { "args": [ - "simple_cacheable_request" + "request_with_payload" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -8079,19 +8158,20 @@ }, { "args": [ - "simple_metadata" + "server_finishes_request" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -8099,19 +8179,20 @@ }, { "args": [ - "simple_request" + "shutdown_finishes_calls" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -8119,19 +8200,20 @@ }, { "args": [ - "streaming_error_response" + "shutdown_finishes_tags" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -8139,19 +8221,20 @@ }, { "args": [ - "trailing_metadata" + "simple_cacheable_request" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -8159,19 +8242,18 @@ }, { "args": [ - "bad_hostname" + "simple_delayed_request" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fakesec_test", "platforms": [ "windows", "linux", @@ -8181,19 +8263,18 @@ }, { "args": [ - "binary_metadata" + "simple_metadata" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fakesec_test", "platforms": [ "windows", "linux", @@ -8203,19 +8284,18 @@ }, { "args": [ - "call_creds" + "simple_request" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fakesec_test", "platforms": [ "windows", "linux", @@ -8225,19 +8305,18 @@ }, { "args": [ - "cancel_after_accept" + "streaming_error_response" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fakesec_test", "platforms": [ "windows", "linux", @@ -8247,19 +8326,18 @@ }, { "args": [ - "cancel_after_client_done" + "trailing_metadata" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fakesec_test", "platforms": [ "windows", "linux", @@ -8269,21 +8347,19 @@ }, { "args": [ - "cancel_after_invoke" + "bad_hostname" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8291,21 +8367,19 @@ }, { "args": [ - "cancel_before_invoke" + "binary_metadata" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8313,21 +8387,19 @@ }, { "args": [ - "cancel_in_a_vacuum" + "call_creds" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8335,10 +8407,9 @@ }, { "args": [ - "cancel_with_status" + "cancel_after_accept" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -8347,9 +8418,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8357,10 +8427,9 @@ }, { "args": [ - "compressed_payload" + "cancel_after_client_done" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -8369,9 +8438,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8379,10 +8447,9 @@ }, { "args": [ - "connectivity" + "cancel_after_invoke" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -8391,9 +8458,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8401,21 +8467,19 @@ }, { "args": [ - "default_host" + "cancel_before_invoke" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8423,21 +8487,19 @@ }, { "args": [ - "disappearing_server" + "cancel_in_a_vacuum" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8445,21 +8507,19 @@ }, { "args": [ - "empty_batch" + "cancel_with_status" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8467,10 +8527,9 @@ }, { "args": [ - "filter_call_init_fails" + "compressed_payload" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -8479,9 +8538,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8489,10 +8547,9 @@ }, { "args": [ - "filter_causes_close" + "empty_batch" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -8501,9 +8558,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8511,21 +8567,19 @@ }, { "args": [ - "graceful_server_shutdown" + "filter_call_init_fails" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8533,10 +8587,9 @@ }, { "args": [ - "high_initial_seqno" + "filter_causes_close" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -8545,9 +8598,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8555,21 +8607,19 @@ }, { "args": [ - "hpack_size" + "graceful_server_shutdown" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8577,10 +8627,9 @@ }, { "args": [ - "idempotent_request" + "high_initial_seqno" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -8589,9 +8638,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8599,10 +8647,9 @@ }, { "args": [ - "invoke_large_request" + "hpack_size" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -8611,9 +8658,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8621,10 +8667,9 @@ }, { "args": [ - "large_metadata" + "idempotent_request" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -8633,9 +8678,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8643,10 +8687,9 @@ }, { "args": [ - "load_reporting_hook" + "invoke_large_request" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -8655,9 +8698,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8665,10 +8707,9 @@ }, { "args": [ - "max_concurrent_streams" + "large_metadata" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -8677,9 +8718,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8687,10 +8727,9 @@ }, { "args": [ - "max_message_length" + "load_reporting_hook" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -8699,9 +8738,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8709,10 +8747,9 @@ }, { "args": [ - "negative_deadline" + "max_concurrent_streams" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -8721,9 +8758,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8731,10 +8767,9 @@ }, { "args": [ - "network_status_change" + "max_message_length" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -8743,9 +8778,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8753,10 +8787,9 @@ }, { "args": [ - "no_logging" + "negative_deadline" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -8765,9 +8798,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8775,10 +8807,9 @@ }, { "args": [ - "no_op" + "network_status_change" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -8787,9 +8818,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8797,10 +8827,9 @@ }, { "args": [ - "payload" + "no_logging" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -8809,9 +8838,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8819,10 +8847,9 @@ }, { "args": [ - "ping" + "no_op" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -8831,9 +8858,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8841,10 +8867,9 @@ }, { "args": [ - "ping_pong_streaming" + "payload" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -8853,9 +8878,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8863,10 +8887,9 @@ }, { "args": [ - "registered_call" + "ping_pong_streaming" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -8875,9 +8898,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8885,21 +8907,19 @@ }, { "args": [ - "request_with_flags" + "registered_call" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8907,21 +8927,19 @@ }, { "args": [ - "request_with_payload" + "request_with_flags" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8929,10 +8947,9 @@ }, { "args": [ - "server_finishes_request" + "request_with_payload" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -8941,9 +8958,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8951,10 +8967,9 @@ }, { "args": [ - "shutdown_finishes_calls" + "server_finishes_request" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -8963,9 +8978,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8973,10 +8987,9 @@ }, { "args": [ - "shutdown_finishes_tags" + "shutdown_finishes_calls" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -8985,9 +8998,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8995,10 +9007,9 @@ }, { "args": [ - "simple_cacheable_request" + "shutdown_finishes_tags" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -9007,9 +9018,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -9017,10 +9027,9 @@ }, { "args": [ - "simple_delayed_request" + "simple_cacheable_request" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -9029,9 +9038,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -9042,7 +9050,6 @@ "simple_metadata" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -9051,9 +9058,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -9064,7 +9070,6 @@ "simple_request" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -9073,9 +9078,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -9086,7 +9090,6 @@ "streaming_error_response" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -9095,9 +9098,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -9108,7 +9110,6 @@ "trailing_metadata" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -9117,9 +9118,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -9130,15 +9130,21 @@ "bad_hostname" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9146,15 +9152,21 @@ "binary_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9162,15 +9174,21 @@ "call_creds" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9178,15 +9196,21 @@ "cancel_after_accept" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9194,15 +9218,21 @@ "cancel_after_client_done" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9210,15 +9240,21 @@ "cancel_after_invoke" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9226,15 +9262,21 @@ "cancel_before_invoke" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9242,15 +9284,21 @@ "cancel_in_a_vacuum" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9258,15 +9306,21 @@ "cancel_with_status" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9274,15 +9328,21 @@ "compressed_payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9290,15 +9350,21 @@ "connectivity" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9306,15 +9372,21 @@ "default_host" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9322,15 +9394,21 @@ "disappearing_server" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9338,15 +9416,21 @@ "empty_batch" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9354,15 +9438,21 @@ "filter_call_init_fails" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9370,15 +9460,21 @@ "filter_causes_close" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9386,15 +9482,21 @@ "graceful_server_shutdown" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9402,15 +9504,21 @@ "high_initial_seqno" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9418,15 +9526,21 @@ "hpack_size" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9434,15 +9548,21 @@ "idempotent_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9450,15 +9570,21 @@ "invoke_large_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9466,15 +9592,21 @@ "large_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9482,15 +9614,21 @@ "load_reporting_hook" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9498,15 +9636,21 @@ "max_concurrent_streams" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9514,15 +9658,21 @@ "max_message_length" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9530,15 +9680,21 @@ "negative_deadline" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9546,15 +9702,21 @@ "network_status_change" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9562,15 +9724,21 @@ "no_logging" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9578,15 +9746,21 @@ "no_op" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9594,15 +9768,21 @@ "payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9610,15 +9790,21 @@ "ping" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9626,15 +9812,1649 @@ "ping_pong_streaming" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_cacheable_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "filter_causes_close" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "idempotent_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "load_reporting_hook" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "no_logging" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_cacheable_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "filter_causes_close" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "idempotent_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "load_reporting_hook" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9642,15 +11462,21 @@ "registered_call" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9658,15 +11484,21 @@ "request_with_flags" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9674,15 +11506,21 @@ "request_with_payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9690,15 +11528,21 @@ "server_finishes_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9706,15 +11550,21 @@ "shutdown_finishes_calls" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9722,15 +11572,21 @@ "shutdown_finishes_tags" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9738,15 +11594,21 @@ "simple_cacheable_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9754,15 +11616,21 @@ "simple_delayed_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9770,15 +11638,21 @@ "simple_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9786,15 +11660,21 @@ "simple_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9802,15 +11682,21 @@ "streaming_error_response" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9818,15 +11704,21 @@ "trailing_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -9836,14 +11728,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -9858,14 +11749,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -9880,14 +11770,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -9902,14 +11791,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -9924,14 +11812,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -9946,14 +11833,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -9968,14 +11854,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -9990,14 +11875,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10012,14 +11896,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10034,14 +11917,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10056,14 +11938,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10078,14 +11959,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10100,14 +11980,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10122,14 +12001,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10144,14 +12022,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10166,14 +12043,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10188,14 +12064,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10208,16 +12083,36 @@ "high_initial_seqno" ], "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_http_proxy_test", + "platforms": [ "windows", "linux", "mac", "posix" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10232,14 +12127,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10254,14 +12148,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10276,14 +12169,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10298,14 +12190,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10320,14 +12211,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10340,16 +12230,36 @@ "max_message_length" ], "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_http_proxy_test", + "platforms": [ "windows", "linux", "mac", "posix" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10359,19 +12269,18 @@ }, { "args": [ - "negative_deadline" + "network_status_change" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10381,19 +12290,18 @@ }, { "args": [ - "network_status_change" + "no_logging" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10408,14 +12316,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10430,14 +12337,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10452,14 +12358,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10474,14 +12379,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10496,14 +12400,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10518,14 +12421,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10540,14 +12442,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10562,14 +12463,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10584,14 +12484,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10606,14 +12505,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10628,14 +12526,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10650,14 +12547,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10672,14 +12568,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10694,14 +12589,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10716,14 +12610,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10738,14 +12631,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -10760,13 +12652,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -10781,13 +12674,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -10802,13 +12696,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -10823,13 +12718,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -10844,13 +12740,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -10865,13 +12762,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -10886,13 +12784,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -10907,13 +12806,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -10928,13 +12828,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -10949,13 +12850,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -10970,13 +12872,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -10991,13 +12894,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11012,13 +12916,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11033,13 +12938,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11054,13 +12960,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11075,13 +12982,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11096,13 +13004,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11117,13 +13026,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11138,13 +13048,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11159,13 +13070,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11180,13 +13092,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11201,13 +13114,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11222,13 +13136,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11243,13 +13158,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11264,13 +13180,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11285,13 +13202,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11306,13 +13224,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11327,13 +13246,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11348,13 +13268,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11369,13 +13290,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11390,13 +13312,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11411,13 +13334,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11432,13 +13356,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11453,13 +13378,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11474,13 +13400,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11495,13 +13422,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11516,13 +13444,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11537,13 +13466,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11558,13 +13488,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11579,13 +13510,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11600,13 +13532,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11621,13 +13554,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11642,13 +13576,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11663,13 +13598,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -11684,14 +13620,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -11706,14 +13641,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -11728,14 +13662,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -11750,14 +13683,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -11772,14 +13704,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -11794,14 +13725,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -11816,14 +13746,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -11838,14 +13767,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -11860,14 +13788,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -11882,14 +13809,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -11904,14 +13830,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -11926,14 +13851,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -11948,14 +13872,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -11970,14 +13893,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -11992,14 +13914,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -12014,14 +13935,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -12036,14 +13956,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -12058,14 +13977,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -12080,14 +13998,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -12102,14 +14019,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -12124,14 +14040,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -12146,14 +14061,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -12168,14 +14082,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -12190,14 +14103,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -12212,14 +14124,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -12234,14 +14145,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -12256,14 +14166,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -12278,14 +14187,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -12300,14 +14208,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -12322,14 +14229,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -12344,14 +14250,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -12366,14 +14271,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -12388,14 +14292,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -12410,14 +14313,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -12432,14 +14334,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -12454,14 +14355,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -12476,14 +14376,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -12498,14 +14397,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -12520,14 +14418,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -12542,14 +14439,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -12564,14 +14460,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -12586,14 +14481,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -12608,14 +14502,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -12630,14 +14523,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -12658,7 +14550,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -12679,7 +14571,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -12700,7 +14592,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -12721,7 +14613,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -12742,7 +14634,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -12763,7 +14655,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -12784,7 +14676,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -12805,7 +14697,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -12826,49 +14718,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -12889,7 +14739,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -12910,7 +14760,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -12931,7 +14781,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -12952,7 +14802,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -12973,7 +14823,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -12994,7 +14844,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -13015,28 +14865,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -13057,7 +14886,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -13078,7 +14907,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -13099,7 +14928,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -13120,28 +14949,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -13162,7 +14970,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -13183,7 +14991,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -13204,7 +15012,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -13225,7 +15033,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -13246,7 +15054,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -13267,28 +15075,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "ping" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -13309,7 +15096,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -13330,28 +15117,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -13372,7 +15138,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -13393,7 +15159,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -13414,7 +15180,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -13435,7 +15201,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -13456,7 +15222,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -13477,7 +15243,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -13498,7 +15264,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -13519,7 +15285,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -13540,7 +15306,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -13561,7 +15327,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -13582,7 +15348,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -13603,7 +15369,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -13624,7 +15390,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -13645,7 +15411,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -13666,7 +15432,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -13687,7 +15453,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -13708,7 +15474,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -13729,7 +15495,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -13750,7 +15516,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -13760,7 +15526,7 @@ }, { "args": [ - "default_host" + "compressed_payload" ], "ci_platforms": [ "windows", @@ -13771,7 +15537,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -13781,7 +15547,7 @@ }, { "args": [ - "disappearing_server" + "empty_batch" ], "ci_platforms": [ "windows", @@ -13792,7 +15558,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -13802,7 +15568,7 @@ }, { "args": [ - "empty_batch" + "filter_call_init_fails" ], "ci_platforms": [ "windows", @@ -13813,7 +15579,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -13823,7 +15589,7 @@ }, { "args": [ - "filter_call_init_fails" + "filter_causes_close" ], "ci_platforms": [ "windows", @@ -13834,7 +15600,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -13844,18 +15610,18 @@ }, { "args": [ - "filter_causes_close" + "graceful_server_shutdown" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -13865,18 +15631,18 @@ }, { "args": [ - "graceful_server_shutdown" + "high_initial_seqno" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -13886,7 +15652,7 @@ }, { "args": [ - "high_initial_seqno" + "hpack_size" ], "ci_platforms": [ "windows", @@ -13897,7 +15663,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -13918,7 +15684,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -13939,7 +15705,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -13960,7 +15726,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -13981,7 +15747,28 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -14002,7 +15789,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -14023,7 +15810,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -14044,7 +15831,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -14065,7 +15852,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -14086,7 +15873,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -14107,7 +15894,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -14128,7 +15915,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -14149,7 +15936,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -14159,18 +15946,18 @@ }, { "args": [ - "request_with_payload" + "request_with_flags" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -14180,7 +15967,7 @@ }, { "args": [ - "server_finishes_request" + "request_with_payload" ], "ci_platforms": [ "windows", @@ -14191,7 +15978,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -14201,7 +15988,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -14212,7 +15999,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -14222,7 +16009,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -14233,7 +16020,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -14243,7 +16030,7 @@ }, { "args": [ - "simple_cacheable_request" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", @@ -14254,7 +16041,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -14264,7 +16051,7 @@ }, { "args": [ - "simple_delayed_request" + "simple_cacheable_request" ], "ci_platforms": [ "windows", @@ -14275,7 +16062,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -14296,7 +16083,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -14317,7 +16104,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -14338,7 +16125,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -14359,7 +16146,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -14380,7 +16167,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -14401,7 +16188,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -14422,7 +16209,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -14443,7 +16230,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -14464,7 +16251,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -14485,7 +16272,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -14506,7 +16293,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -14527,7 +16314,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -14548,7 +16335,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -14569,7 +16356,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -14590,7 +16377,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -14611,7 +16398,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -14632,7 +16419,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -14653,7 +16440,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -14674,28 +16461,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -14716,7 +16482,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -14737,7 +16503,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -14758,7 +16524,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -14779,7 +16545,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -14800,7 +16566,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -14821,7 +16587,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -14842,7 +16608,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -14863,28 +16629,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "no_logging" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -14905,7 +16650,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -14926,7 +16671,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -14947,7 +16692,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -14968,7 +16713,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -14989,7 +16734,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -15010,7 +16755,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -15031,7 +16776,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -15052,7 +16797,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -15073,7 +16818,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -15094,7 +16839,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -15115,7 +16860,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -15136,7 +16881,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -15157,7 +16902,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -15178,7 +16923,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -15199,7 +16944,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15220,7 +16965,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15241,7 +16986,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15262,7 +17007,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15283,7 +17028,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15304,7 +17049,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15325,7 +17070,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15346,7 +17091,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15367,7 +17112,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15388,7 +17133,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15409,7 +17154,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15430,7 +17175,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15451,7 +17196,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15472,7 +17217,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15493,7 +17238,28 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15514,7 +17280,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15535,7 +17301,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15556,7 +17322,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15577,7 +17343,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15598,7 +17364,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15619,7 +17385,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15640,7 +17406,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15661,7 +17427,28 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "no_logging" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15682,7 +17469,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15703,7 +17490,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15724,7 +17511,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15745,7 +17532,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15766,7 +17553,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15787,7 +17574,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15808,7 +17595,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15829,7 +17616,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15850,7 +17637,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15871,7 +17658,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15892,7 +17679,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15913,7 +17700,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15934,7 +17721,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15955,7 +17742,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -15970,13 +17757,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -15991,13 +17779,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16012,13 +17801,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16033,13 +17823,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16054,13 +17845,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16075,13 +17867,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16096,13 +17889,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16117,13 +17911,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16138,13 +17933,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16159,13 +17955,80 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16180,13 +18043,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16201,13 +18065,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16222,13 +18087,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16243,13 +18109,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16264,13 +18131,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16285,13 +18153,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16306,13 +18175,36 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16322,18 +18214,19 @@ }, { "args": [ - "invoke_large_request" + "large_metadata" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16343,18 +18236,19 @@ }, { "args": [ - "large_metadata" + "load_reporting_hook" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16364,18 +18258,19 @@ }, { "args": [ - "load_reporting_hook" + "max_concurrent_streams" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16385,18 +18280,19 @@ }, { "args": [ - "max_concurrent_streams" + "max_message_length" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16406,18 +18302,19 @@ }, { "args": [ - "max_message_length" + "negative_deadline" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16427,18 +18324,19 @@ }, { "args": [ - "negative_deadline" + "network_status_change" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16448,18 +18346,19 @@ }, { "args": [ - "network_status_change" + "no_logging" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16469,18 +18368,19 @@ }, { "args": [ - "no_logging" + "no_op" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16490,18 +18390,19 @@ }, { "args": [ - "no_op" + "payload" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16511,18 +18412,19 @@ }, { "args": [ - "payload" + "ping" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16537,13 +18439,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16558,13 +18461,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16579,13 +18483,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16600,13 +18505,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16621,13 +18527,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16642,13 +18549,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16663,13 +18571,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16684,13 +18593,36 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16705,13 +18637,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16726,13 +18659,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16747,13 +18681,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16768,13 +18703,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -16796,7 +18732,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -16818,7 +18754,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -16840,7 +18776,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -16862,7 +18798,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -16884,7 +18820,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -16906,7 +18842,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -16928,7 +18864,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -16950,7 +18886,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -16972,7 +18908,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -16994,7 +18930,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17016,7 +18952,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17038,7 +18974,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17060,7 +18996,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17082,7 +19018,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17104,7 +19040,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17126,7 +19062,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17148,7 +19084,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17170,7 +19106,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17192,7 +19128,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17214,7 +19150,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17236,7 +19172,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17258,7 +19194,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17280,7 +19216,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17302,7 +19238,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17324,7 +19260,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17346,7 +19282,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17368,7 +19304,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17390,7 +19326,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17412,7 +19348,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17434,7 +19370,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17456,7 +19392,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17478,7 +19414,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17500,7 +19436,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17522,7 +19458,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17544,7 +19480,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17566,7 +19502,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17588,7 +19524,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17610,7 +19546,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17632,7 +19568,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17654,7 +19590,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17676,7 +19612,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17698,7 +19634,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17720,7 +19656,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17742,7 +19678,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -17757,14 +19693,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -17779,14 +19714,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -17801,14 +19735,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -17823,14 +19756,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -17845,14 +19777,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -17867,14 +19798,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -17889,14 +19819,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -17911,14 +19840,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -17933,14 +19861,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -17950,41 +19877,18 @@ }, { "args": [ - "compressed_payload" + "default_host" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -17994,19 +19898,18 @@ }, { "args": [ - "default_host" + "disappearing_server" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -18016,19 +19919,18 @@ }, { "args": [ - "disappearing_server" + "empty_batch" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -18038,19 +19940,18 @@ }, { "args": [ - "empty_batch" + "filter_call_init_fails" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -18060,19 +19961,18 @@ }, { "args": [ - "filter_call_init_fails" + "filter_causes_close" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -18082,19 +19982,18 @@ }, { "args": [ - "filter_causes_close" + "graceful_server_shutdown" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -18104,19 +20003,18 @@ }, { "args": [ - "graceful_server_shutdown" + "high_initial_seqno" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -18126,19 +20024,18 @@ }, { "args": [ - "high_initial_seqno" + "idempotent_request" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -18148,19 +20045,18 @@ }, { "args": [ - "hpack_size" + "invoke_large_request" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -18170,19 +20066,18 @@ }, { "args": [ - "idempotent_request" + "large_metadata" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -18192,19 +20087,18 @@ }, { "args": [ - "invoke_large_request" + "load_reporting_hook" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -18214,19 +20108,18 @@ }, { "args": [ - "large_metadata" + "max_message_length" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -18236,19 +20129,18 @@ }, { "args": [ - "load_reporting_hook" + "negative_deadline" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -18258,19 +20150,18 @@ }, { "args": [ - "max_concurrent_streams" + "network_status_change" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -18280,19 +20171,18 @@ }, { "args": [ - "max_message_length" + "no_logging" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -18302,19 +20192,18 @@ }, { "args": [ - "negative_deadline" + "no_op" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -18324,19 +20213,18 @@ }, { "args": [ - "network_status_change" + "payload" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -18346,19 +20234,18 @@ }, { "args": [ - "no_logging" + "ping_pong_streaming" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -18368,19 +20255,18 @@ }, { "args": [ - "no_op" + "registered_call" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -18390,19 +20276,18 @@ }, { "args": [ - "payload" + "request_with_payload" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -18412,19 +20297,18 @@ }, { "args": [ - "ping" + "server_finishes_request" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -18434,19 +20318,18 @@ }, { "args": [ - "ping_pong_streaming" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -18456,19 +20339,18 @@ }, { "args": [ - "registered_call" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -18478,19 +20360,18 @@ }, { "args": [ - "request_with_flags" + "simple_cacheable_request" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -18500,19 +20381,18 @@ }, { "args": [ - "request_with_payload" + "simple_delayed_request" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -18522,19 +20402,18 @@ }, { "args": [ - "server_finishes_request" + "simple_metadata" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -18544,19 +20423,18 @@ }, { "args": [ - "shutdown_finishes_calls" + "simple_request" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -18566,19 +20444,18 @@ }, { "args": [ - "shutdown_finishes_tags" + "streaming_error_response" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -18588,19 +20465,18 @@ }, { "args": [ - "simple_cacheable_request" + "trailing_metadata" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -18610,10 +20486,9 @@ }, { "args": [ - "simple_delayed_request" + "bad_hostname" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -18622,9 +20497,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -18632,10 +20506,9 @@ }, { "args": [ - "simple_metadata" + "binary_metadata" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -18644,9 +20517,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -18654,10 +20526,9 @@ }, { "args": [ - "simple_request" + "call_creds" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -18666,9 +20537,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -18676,21 +20546,19 @@ }, { "args": [ - "streaming_error_response" + "cancel_after_accept" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -18698,10 +20566,9 @@ }, { "args": [ - "trailing_metadata" + "cancel_after_client_done" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -18710,9 +20577,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -18720,20 +20586,19 @@ }, { "args": [ - "bad_hostname" + "cancel_after_invoke" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -18741,20 +20606,19 @@ }, { "args": [ - "binary_metadata" + "cancel_before_invoke" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -18762,20 +20626,19 @@ }, { "args": [ - "call_creds" + "cancel_in_a_vacuum" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -18783,20 +20646,19 @@ }, { "args": [ - "cancel_after_accept" + "cancel_with_status" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -18804,20 +20666,19 @@ }, { "args": [ - "cancel_after_client_done" + "compressed_payload" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -18825,20 +20686,19 @@ }, { "args": [ - "cancel_after_invoke" + "connectivity" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -18846,20 +20706,19 @@ }, { "args": [ - "cancel_before_invoke" + "disappearing_server" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -18867,20 +20726,19 @@ }, { "args": [ - "cancel_in_a_vacuum" + "empty_batch" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -18888,20 +20746,19 @@ }, { "args": [ - "cancel_with_status" + "filter_call_init_fails" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -18909,20 +20766,19 @@ }, { "args": [ - "default_host" + "filter_causes_close" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -18930,20 +20786,19 @@ }, { "args": [ - "disappearing_server" + "graceful_server_shutdown" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -18951,20 +20806,19 @@ }, { "args": [ - "empty_batch" + "high_initial_seqno" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -18972,20 +20826,19 @@ }, { "args": [ - "filter_call_init_fails" + "hpack_size" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -18993,20 +20846,19 @@ }, { "args": [ - "filter_causes_close" + "idempotent_request" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -19014,20 +20866,19 @@ }, { "args": [ - "graceful_server_shutdown" + "invoke_large_request" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -19035,20 +20886,19 @@ }, { "args": [ - "high_initial_seqno" + "large_metadata" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -19056,20 +20906,19 @@ }, { "args": [ - "idempotent_request" + "load_reporting_hook" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -19077,20 +20926,19 @@ }, { "args": [ - "invoke_large_request" + "max_concurrent_streams" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -19098,20 +20946,19 @@ }, { "args": [ - "large_metadata" + "max_message_length" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -19119,20 +20966,19 @@ }, { "args": [ - "load_reporting_hook" + "negative_deadline" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -19140,20 +20986,19 @@ }, { "args": [ - "max_message_length" + "network_status_change" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -19161,20 +21006,19 @@ }, { "args": [ - "negative_deadline" + "no_logging" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -19182,20 +21026,19 @@ }, { "args": [ - "network_status_change" + "no_op" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -19203,20 +21046,19 @@ }, { "args": [ - "no_logging" + "payload" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -19224,20 +21066,19 @@ }, { "args": [ - "no_op" + "ping" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -19245,20 +21086,19 @@ }, { "args": [ - "payload" + "ping_pong_streaming" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -19266,20 +21106,19 @@ }, { "args": [ - "ping_pong_streaming" + "registered_call" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -19287,20 +21126,19 @@ }, { "args": [ - "registered_call" + "request_with_flags" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -19311,17 +21149,16 @@ "request_with_payload" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -19332,17 +21169,16 @@ "server_finishes_request" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -19353,17 +21189,16 @@ "shutdown_finishes_calls" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -19374,17 +21209,16 @@ "shutdown_finishes_tags" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -19395,17 +21229,16 @@ "simple_cacheable_request" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -19416,17 +21249,16 @@ "simple_delayed_request" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -19437,17 +21269,16 @@ "simple_metadata" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -19458,17 +21289,16 @@ "simple_request" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -19479,17 +21309,16 @@ "streaming_error_response" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -19500,17 +21329,16 @@ "trailing_metadata" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -19521,6 +21349,7 @@ "bad_hostname" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -19529,8 +21358,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -19541,6 +21371,7 @@ "binary_metadata" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -19549,8 +21380,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -19558,19 +21390,21 @@ }, { "args": [ - "call_creds" + "cancel_after_accept" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -19578,19 +21412,21 @@ }, { "args": [ - "cancel_after_accept" + "cancel_after_client_done" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -19598,19 +21434,21 @@ }, { "args": [ - "cancel_after_client_done" + "cancel_after_invoke" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -19618,9 +21456,10 @@ }, { "args": [ - "cancel_after_invoke" + "cancel_before_invoke" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -19629,8 +21468,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -19638,9 +21478,10 @@ }, { "args": [ - "cancel_before_invoke" + "cancel_in_a_vacuum" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -19649,8 +21490,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -19658,9 +21500,10 @@ }, { "args": [ - "cancel_in_a_vacuum" + "cancel_with_status" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -19669,8 +21512,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -19678,19 +21522,21 @@ }, { "args": [ - "cancel_with_status" + "compressed_payload" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -19698,19 +21544,21 @@ }, { "args": [ - "compressed_payload" + "connectivity" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -19718,19 +21566,21 @@ }, { "args": [ - "connectivity" + "default_host" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -19741,6 +21591,7 @@ "disappearing_server" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -19749,8 +21600,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -19761,6 +21613,7 @@ "empty_batch" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -19769,8 +21622,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -19781,6 +21635,7 @@ "filter_call_init_fails" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -19789,8 +21644,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -19801,6 +21657,7 @@ "filter_causes_close" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -19809,8 +21666,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -19821,6 +21679,7 @@ "graceful_server_shutdown" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -19829,8 +21688,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -19841,6 +21701,7 @@ "high_initial_seqno" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -19849,8 +21710,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -19861,6 +21723,7 @@ "hpack_size" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -19869,8 +21732,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -19881,6 +21745,7 @@ "idempotent_request" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -19889,8 +21754,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -19901,6 +21767,7 @@ "invoke_large_request" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -19909,8 +21776,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -19921,6 +21789,7 @@ "large_metadata" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -19929,8 +21798,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -19941,6 +21811,7 @@ "load_reporting_hook" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -19949,8 +21820,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -19961,6 +21833,7 @@ "max_concurrent_streams" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -19969,8 +21842,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -19981,6 +21855,7 @@ "max_message_length" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -19989,8 +21864,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -20001,6 +21877,7 @@ "negative_deadline" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -20009,8 +21886,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -20021,6 +21899,7 @@ "network_status_change" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -20029,8 +21908,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -20041,6 +21921,7 @@ "no_logging" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -20049,8 +21930,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -20061,6 +21943,7 @@ "no_op" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -20069,8 +21952,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -20081,6 +21965,7 @@ "payload" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -20089,8 +21974,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -20101,6 +21987,7 @@ "ping" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -20109,8 +21996,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -20121,6 +22009,7 @@ "ping_pong_streaming" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -20129,8 +22018,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -20141,6 +22031,7 @@ "registered_call" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -20149,8 +22040,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -20161,6 +22053,7 @@ "request_with_flags" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -20169,8 +22062,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -20181,6 +22075,7 @@ "request_with_payload" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -20189,8 +22084,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -20201,6 +22097,7 @@ "server_finishes_request" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -20209,8 +22106,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -20221,6 +22119,7 @@ "shutdown_finishes_calls" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -20229,8 +22128,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -20241,6 +22141,7 @@ "shutdown_finishes_tags" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -20249,8 +22150,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -20261,6 +22163,7 @@ "simple_cacheable_request" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -20269,8 +22172,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -20281,6 +22185,7 @@ "simple_delayed_request" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -20289,8 +22194,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -20301,6 +22207,7 @@ "simple_metadata" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -20309,8 +22216,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -20321,6 +22229,7 @@ "simple_request" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -20329,8 +22238,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -20341,6 +22251,7 @@ "streaming_error_response" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -20349,8 +22260,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -20361,6 +22273,7 @@ "trailing_metadata" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -20369,8 +22282,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -20390,7 +22304,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -20412,7 +22326,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -20434,7 +22348,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -20456,7 +22370,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -20478,7 +22392,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -20500,7 +22414,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -20522,7 +22436,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -20544,7 +22458,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -20566,7 +22480,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -20588,7 +22502,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -20610,7 +22524,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -20632,7 +22546,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -20654,7 +22568,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -20676,7 +22590,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -20698,7 +22612,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -20720,7 +22634,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -20742,7 +22656,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -20764,7 +22678,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -20786,7 +22700,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -20808,7 +22722,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -20830,7 +22744,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -20852,7 +22766,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -20874,7 +22788,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -20896,7 +22810,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -20918,7 +22832,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -20940,7 +22854,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -20962,7 +22876,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -20984,7 +22898,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -21006,7 +22920,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -21028,7 +22942,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -21050,7 +22964,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -21072,7 +22986,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -21094,7 +23008,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -21116,7 +23030,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -21138,7 +23052,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -21160,7 +23074,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -21182,7 +23096,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -21204,7 +23118,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -21226,7 +23140,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -21248,7 +23162,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -21270,7 +23184,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -21292,7 +23206,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -21314,7 +23228,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -21336,7 +23250,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -21358,7 +23272,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -21380,7 +23294,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -21402,7 +23316,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -21424,7 +23338,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -21446,7 +23360,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -21468,7 +23382,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -21490,7 +23404,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -21512,7 +23426,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -21534,7 +23448,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -21556,7 +23470,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -21578,7 +23492,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -21600,7 +23514,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -21622,7 +23536,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -21644,7 +23558,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -21666,7 +23580,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -21688,7 +23602,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -21710,7 +23624,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -21732,7 +23646,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -21754,7 +23668,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -21776,7 +23690,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -21798,7 +23712,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -21820,7 +23734,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -21842,7 +23756,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -21864,7 +23778,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -21886,7 +23800,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -21908,7 +23822,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -21930,7 +23844,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -21952,7 +23866,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -21974,7 +23888,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -21996,7 +23910,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -22018,7 +23932,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -22040,7 +23954,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -22062,7 +23976,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -22084,7 +23998,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -22106,7 +24020,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -22128,7 +24042,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -22150,7 +24064,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -22172,7 +24086,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -22194,7 +24108,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -22216,7 +24130,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -22238,7 +24152,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", @@ -22260,7 +24174,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fake_resolver_nosec_test", "platforms": [ "windows", "linux", diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index 4345b9134d..54a3f7a622 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -744,6 +744,30 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_compress_test", "vcxproj {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_fake_resolver_nosec_test", "vcxproj\test/end2end/fixtures\h2_fake_resolver_nosec_test\h2_fake_resolver_nosec_test.vcxproj", "{5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} = {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} + {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} = {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} + {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_fake_resolver_test", "vcxproj\test/end2end/fixtures\h2_fake_resolver_test\h2_fake_resolver_test.vcxproj", "{085ACF7D-D7CE-A9F1-576D-1AF901409FA4}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_fakesec_test", "vcxproj\test/end2end/fixtures\h2_fakesec_test\h2_fakesec_test.vcxproj", "{0E980562-3AA0-91B1-C590-85C9A899BE44}" ProjectSection(myProperties) = preProject lib = "False" @@ -2703,6 +2727,38 @@ Global {C7E516E9-B80F-4BC1-A617-095FC6E14BC9}.Release-DLL|Win32.Build.0 = Release|Win32 {C7E516E9-B80F-4BC1-A617-095FC6E14BC9}.Release-DLL|x64.ActiveCfg = Release|x64 {C7E516E9-B80F-4BC1-A617-095FC6E14BC9}.Release-DLL|x64.Build.0 = Release|x64 + {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}.Debug|Win32.ActiveCfg = Debug|Win32 + {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}.Debug|x64.ActiveCfg = Debug|x64 + {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}.Release|Win32.ActiveCfg = Release|Win32 + {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}.Release|x64.ActiveCfg = Release|x64 + {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}.Debug|Win32.Build.0 = Debug|Win32 + {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}.Debug|x64.Build.0 = Debug|x64 + {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}.Release|Win32.Build.0 = Release|Win32 + {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}.Release|x64.Build.0 = Release|x64 + {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}.Debug-DLL|x64.Build.0 = Debug|x64 + {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}.Release-DLL|Win32.Build.0 = Release|Win32 + {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}.Release-DLL|x64.ActiveCfg = Release|x64 + {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F}.Release-DLL|x64.Build.0 = Release|x64 + {085ACF7D-D7CE-A9F1-576D-1AF901409FA4}.Debug|Win32.ActiveCfg = Debug|Win32 + {085ACF7D-D7CE-A9F1-576D-1AF901409FA4}.Debug|x64.ActiveCfg = Debug|x64 + {085ACF7D-D7CE-A9F1-576D-1AF901409FA4}.Release|Win32.ActiveCfg = Release|Win32 + {085ACF7D-D7CE-A9F1-576D-1AF901409FA4}.Release|x64.ActiveCfg = Release|x64 + {085ACF7D-D7CE-A9F1-576D-1AF901409FA4}.Debug|Win32.Build.0 = Debug|Win32 + {085ACF7D-D7CE-A9F1-576D-1AF901409FA4}.Debug|x64.Build.0 = Debug|x64 + {085ACF7D-D7CE-A9F1-576D-1AF901409FA4}.Release|Win32.Build.0 = Release|Win32 + {085ACF7D-D7CE-A9F1-576D-1AF901409FA4}.Release|x64.Build.0 = Release|x64 + {085ACF7D-D7CE-A9F1-576D-1AF901409FA4}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {085ACF7D-D7CE-A9F1-576D-1AF901409FA4}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {085ACF7D-D7CE-A9F1-576D-1AF901409FA4}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {085ACF7D-D7CE-A9F1-576D-1AF901409FA4}.Debug-DLL|x64.Build.0 = Debug|x64 + {085ACF7D-D7CE-A9F1-576D-1AF901409FA4}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {085ACF7D-D7CE-A9F1-576D-1AF901409FA4}.Release-DLL|Win32.Build.0 = Release|Win32 + {085ACF7D-D7CE-A9F1-576D-1AF901409FA4}.Release-DLL|x64.ActiveCfg = Release|x64 + {085ACF7D-D7CE-A9F1-576D-1AF901409FA4}.Release-DLL|x64.Build.0 = Release|x64 {0E980562-3AA0-91B1-C590-85C9A899BE44}.Debug|Win32.ActiveCfg = Debug|Win32 {0E980562-3AA0-91B1-C590-85C9A899BE44}.Debug|x64.ActiveCfg = Debug|x64 {0E980562-3AA0-91B1-C590-85C9A899BE44}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_fake_resolver_nosec_test/h2_fake_resolver_nosec_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_fake_resolver_nosec_test/h2_fake_resolver_nosec_test.vcxproj new file mode 100644 index 0000000000..3e5f60dcba --- /dev/null +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_fake_resolver_nosec_test/h2_fake_resolver_nosec_test.vcxproj @@ -0,0 +1,191 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {5C8F9B15-B0D0-54FE-1E54-A53F963D2B2F} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + h2_fake_resolver_nosec_test + static + Debug + + + h2_fake_resolver_nosec_test + static + Release + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + + + + + {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} + + + {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} + + + {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_fake_resolver_nosec_test/h2_fake_resolver_nosec_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_fake_resolver_nosec_test/h2_fake_resolver_nosec_test.vcxproj.filters new file mode 100644 index 0000000000..fa77558c9b --- /dev/null +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_fake_resolver_nosec_test/h2_fake_resolver_nosec_test.vcxproj.filters @@ -0,0 +1,24 @@ + + + + + test\core\end2end\fixtures + + + + + + {d16c806f-b9ed-2fc4-d125-d2f213d24e94} + + + {35eb96d1-e1d6-7d4f-1b67-58c90bbafc08} + + + {c8a16f5b-264e-c0f0-122b-295477b396f0} + + + {cd25af84-98e8-39f6-6af3-c1a852a54156} + + + + diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_fake_resolver_test/h2_fake_resolver_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_fake_resolver_test/h2_fake_resolver_test.vcxproj new file mode 100644 index 0000000000..a3977f1740 --- /dev/null +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_fake_resolver_test/h2_fake_resolver_test.vcxproj @@ -0,0 +1,202 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {085ACF7D-D7CE-A9F1-576D-1AF901409FA4} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + h2_fake_resolver_test + static + Debug + static + Debug + + + h2_fake_resolver_test + static + Release + static + Release + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + + + + + {1F1F9084-2A93-B80E-364F-5754894AFAB4} + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_fake_resolver_test/h2_fake_resolver_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_fake_resolver_test/h2_fake_resolver_test.vcxproj.filters new file mode 100644 index 0000000000..cb68d336f8 --- /dev/null +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_fake_resolver_test/h2_fake_resolver_test.vcxproj.filters @@ -0,0 +1,24 @@ + + + + + test\core\end2end\fixtures + + + + + + {3bb40091-0d52-0156-cc55-ce5f69e612a8} + + + {cac8fdf8-f489-f1ff-2812-79c47527b524} + + + {2fe5cc8d-2908-878f-3b45-50f8c2cfadea} + + + {f07f474f-9277-9b94-38b7-3f7d0c846fdb} + + + + -- cgit v1.2.3 From 4e826be32ee6d67f3e71971e3475fdd8d2f6176c Mon Sep 17 00:00:00 2001 From: Dan Born Date: Mon, 3 Oct 2016 20:33:25 -0700 Subject: Correctly count port indices and siblings --- src/core/lib/iomgr/tcp_server_posix.c | 41 ++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 18 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index 2d3f6cf9a7..596f8280d4 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -648,35 +648,40 @@ done: } } -unsigned grpc_tcp_server_port_fd_count(grpc_tcp_server *s, - unsigned port_index) { - unsigned num_fds = 0; +/* Return listener at port_index or NULL. */ +static grpc_tcp_listener *get_port_index(grpc_tcp_server *s, + unsigned port_index) { + unsigned num_ports = 0; grpc_tcp_listener *sp; - for (sp = s->head; sp && port_index != 0; sp = sp->next) { + for (sp = s->head; sp; sp = sp->next) { if (!sp->is_sibling) { - --port_index; + if (++num_ports > port_index) { + return sp; + } } } - for (; sp; sp = sp->sibling, ++num_fds) - ; + return NULL; +} + +unsigned grpc_tcp_server_port_fd_count(grpc_tcp_server *s, + unsigned port_index) { + unsigned num_fds = 0; + grpc_tcp_listener *sp = get_port_index(s, port_index); + for (; sp; sp = sp->sibling) { + ++num_fds; + } return num_fds; } int grpc_tcp_server_port_fd(grpc_tcp_server *s, unsigned port_index, unsigned fd_index) { - grpc_tcp_listener *sp; - for (sp = s->head; sp && port_index != 0; sp = sp->next) { - if (!sp->is_sibling) { - --port_index; + grpc_tcp_listener *sp = get_port_index(s, port_index); + for (; sp; sp = sp->sibling, --fd_index) { + if (fd_index == 0) { + return sp->fd; } } - for (; sp && fd_index != 0; sp = sp->sibling, --fd_index) - ; - if (sp) { - return sp->fd; - } else { - return -1; - } + return -1; } void grpc_tcp_server_start(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s, -- cgit v1.2.3 From 7c8b7564fc52d031bb9bc2700ea3135802f84bb8 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 5 Oct 2016 07:34:01 -0700 Subject: Update documentation for timer API. --- src/core/lib/iomgr/timer.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/timer.h b/src/core/lib/iomgr/timer.h index a825d2a28b..5a9a177963 100644 --- a/src/core/lib/iomgr/timer.h +++ b/src/core/lib/iomgr/timer.h @@ -49,11 +49,11 @@ typedef struct grpc_timer { } grpc_timer; /* Initialize *timer. When expired or canceled, timer_cb will be called with - *timer_cb_arg and status to indicate if it expired (SUCCESS) or was - canceled (CANCELLED). timer_cb is guaranteed to be called exactly once, - and application code should check the status to determine how it was - invoked. The application callback is also responsible for maintaining - information about when to free up any user-level state. */ + *timer_cb_arg and error set to indicate if it expired (GRPC_ERROR_NONE) or + was canceled (GRPC_ERROR_CANCELLED). timer_cb is guaranteed to be called + exactly once, and application code should check the error to determine + how it was invoked. The application callback is also responsible for + maintaining information about when to free up any user-level state. */ void grpc_timer_init(grpc_exec_ctx *exec_ctx, grpc_timer *timer, gpr_timespec deadline, grpc_iomgr_cb_func timer_cb, void *timer_cb_arg, gpr_timespec now); @@ -74,8 +74,8 @@ void grpc_timer_init(grpc_exec_ctx *exec_ctx, grpc_timer *timer, In all of these cases, the cancellation is still considered successful. They are essentially distinguished in that the timer_cb will be run - exactly once from either the cancellation (with status CANCELLED) - or from the activation (with status SUCCESS) + exactly once from either the cancellation (with error GRPC_ERROR_CANCELLED) + or from the activation (with error GRPC_ERROR_NONE). Note carefully that the callback function MAY occur in the same callstack as grpc_timer_cancel. It's expected that most timers will be cancelled (their @@ -83,14 +83,13 @@ void grpc_timer_init(grpc_exec_ctx *exec_ctx, grpc_timer *timer, that cancellation costs as little as possible. Making callbacks run inline matches this aim. - Requires: cancel() must happen after add() on a given timer */ + Requires: cancel() must happen after init() on a given timer */ void grpc_timer_cancel(grpc_exec_ctx *exec_ctx, grpc_timer *timer); /* iomgr internal api for dealing with timers */ /* Check for timers to be run, and run them. Return true if timer callbacks were executed. - Drops drop_mu if it is non-null before executing callbacks. If next is non-null, TRY to update *next with the next running timer IF that timer occurs before *next current value. *next is never guaranteed to be updated on any given execution; however, -- cgit v1.2.3 From e40dd29db6ceae42bd6dd68427d76ffa608bd404 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 5 Oct 2016 14:58:37 -0700 Subject: Handle the case where the resolver returns after the call is initialized. --- src/core/ext/client_config/client_channel.c | 164 +++++++++++++++++++------- src/core/lib/channel/deadline_filter.c | 84 ++++++++----- src/core/lib/channel/deadline_filter.h | 34 ++++-- test/core/end2end/fake_resolver.c | 2 +- test/core/end2end/tests/cancel_after_accept.c | 41 +++++-- 5 files changed, 236 insertions(+), 89 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/client_config/client_channel.c b/src/core/ext/client_config/client_channel.c index fbe5a33f15..3178929239 100644 --- a/src/core/ext/client_config/client_channel.c +++ b/src/core/ext/client_config/client_channel.c @@ -444,16 +444,16 @@ typedef struct client_channel_call_data { // stack and each has its own mutex. If/when we have time, find a way // to avoid this without breaking the grpc_deadline_state abstraction. grpc_deadline_state deadline_state; - gpr_timespec deadline; + grpc_mdstr *path; // Request path. + gpr_timespec call_start_time; + gpr_timespec deadline; enum { WAIT_FOR_READY_UNSET, WAIT_FOR_READY_FALSE, WAIT_FOR_READY_TRUE } wait_for_ready_from_service_config; - - // Request path. - grpc_mdstr *path; + grpc_closure read_service_config; grpc_error *cancel_error; @@ -657,6 +657,20 @@ static bool pick_subchannel(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, int r; GRPC_LB_POLICY_REF(lb_policy, "pick_subchannel"); gpr_mu_unlock(&chand->mu); + // If the application explicitly set wait_for_ready, use that. + // Otherwise, if the service config specified a value for this + // method, use that. + gpr_mu_lock(&calld->mu); + if ((initial_metadata_flags & + GRPC_INITIAL_METADATA_WAIT_FOR_READY_EXPLICITLY_SET) == 0 && + calld->wait_for_ready_from_service_config != WAIT_FOR_READY_UNSET) { + if (calld->wait_for_ready_from_service_config == WAIT_FOR_READY_TRUE) { + initial_metadata_flags |= GRPC_INITIAL_METADATA_WAIT_FOR_READY; + } else { + initial_metadata_flags &= ~GRPC_INITIAL_METADATA_WAIT_FOR_READY; + } + } + gpr_mu_unlock(&calld->mu); // TODO(dgq): make this deadline configurable somehow. const grpc_lb_policy_pick_args inputs = { calld->pollent, initial_metadata, initial_metadata_flags, @@ -769,24 +783,12 @@ retry: calld->connected_subchannel == NULL && op->send_initial_metadata != NULL) { calld->creation_phase = GRPC_SUBCHANNEL_CALL_HOLDER_PICKING_SUBCHANNEL; - // If the application explicitly set wait_for_ready, use that. - // Otherwise, if the service config specified a value for this - // method, use that. - uint32_t initial_metadata_flags = op->send_initial_metadata_flags; - if ((initial_metadata_flags & - GRPC_INITIAL_METADATA_WAIT_FOR_READY_EXPLICITLY_SET) == 0 && - calld->wait_for_ready_from_service_config != WAIT_FOR_READY_UNSET) { - if (calld->wait_for_ready_from_service_config == WAIT_FOR_READY_TRUE) { - initial_metadata_flags |= GRPC_INITIAL_METADATA_WAIT_FOR_READY; - } else { - initial_metadata_flags &= ~GRPC_INITIAL_METADATA_WAIT_FOR_READY; - } - } grpc_closure_init(&calld->next_step, subchannel_ready, calld); GRPC_CALL_STACK_REF(calld->owning_call, "pick_subchannel"); if (pick_subchannel(exec_ctx, elem, op->send_initial_metadata, - initial_metadata_flags, &calld->connected_subchannel, - &calld->next_step, GRPC_ERROR_NONE)) { + op->send_initial_metadata_flags, + &calld->connected_subchannel, &calld->next_step, + GRPC_ERROR_NONE)) { calld->creation_phase = GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING; GRPC_CALL_STACK_UNREF(exec_ctx, calld->owning_call, "pick_subchannel"); } @@ -814,36 +816,69 @@ retry: GPR_TIMER_END("cc_start_transport_stream_op", 0); } -/* Constructor for call_data */ -static grpc_error *cc_init_call_elem(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem, - grpc_call_element_args *args) { +// Gets data from the service config. Invoked when the resolver returns +// its initial result. +static void read_service_config(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { + grpc_call_element *elem = arg; channel_data *chand = elem->channel_data; call_data *calld = elem->call_data; + // If this is an error, there's no point in looking at the service config. + if (error != GRPC_ERROR_NONE) return; + // Get the method config table from channel data. gpr_mu_lock(&chand->mu); - grpc_method_config_table *method_config_table = - chand->method_config_table == NULL - ? NULL - : grpc_method_config_table_ref(chand->method_config_table); - gpr_mu_unlock(&chand->mu); - grpc_method_config *method_config = - method_config_table == NULL ? NULL - : grpc_method_config_table_get_method_config( - method_config_table, args->path); - grpc_deadline_state_init(exec_ctx, elem, args, method_config); - calld->wait_for_ready_from_service_config = WAIT_FOR_READY_UNSET; - if (method_config != NULL) { - bool *wait_for_ready = grpc_method_config_get_wait_for_ready(method_config); - if (wait_for_ready != NULL) { - calld->wait_for_ready_from_service_config = - *wait_for_ready ? WAIT_FOR_READY_TRUE : WAIT_FOR_READY_FALSE; - } + grpc_method_config_table *method_config_table = NULL; + if (chand->method_config_table != NULL) { + method_config_table = + grpc_method_config_table_ref(chand->method_config_table); } + gpr_mu_unlock(&chand->mu); + // If the method config table was present, use it. if (method_config_table != NULL) { + grpc_method_config *method_config = + grpc_method_config_table_get_method_config(method_config_table, + calld->path); + if (method_config != NULL) { + gpr_timespec *per_method_timeout = + grpc_method_config_get_timeout(method_config); + bool *wait_for_ready = + grpc_method_config_get_wait_for_ready(method_config); + if (per_method_timeout != NULL || wait_for_ready != NULL) { + gpr_mu_lock(&calld->mu); + if (per_method_timeout != NULL) { + gpr_timespec per_method_deadline = + gpr_time_add(calld->call_start_time, *per_method_timeout); + if (gpr_time_cmp(per_method_deadline, calld->deadline) < 0) { + calld->deadline = per_method_deadline; + // Reset deadline timer. + grpc_deadline_state_reset(exec_ctx, elem, calld->deadline); + } + } + if (wait_for_ready != NULL) { + calld->wait_for_ready_from_service_config = + *wait_for_ready ? WAIT_FOR_READY_TRUE : WAIT_FOR_READY_FALSE; + } + gpr_mu_unlock(&calld->mu); + } + } grpc_method_config_table_unref(method_config_table); } - calld->deadline = args->deadline; +} + +/* Constructor for call_data */ +static grpc_error *cc_init_call_elem(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_call_element_args *args) { + channel_data *chand = elem->channel_data; + call_data *calld = elem->call_data; + // Initialize data members. + grpc_deadline_state_init(exec_ctx, elem, args->call_stack); calld->path = GRPC_MDSTR_REF(args->path); + // TODO(roth): Is there a better value to use here for the actual start + // time of the call (i.e., something initialized at the surface layer)? + calld->call_start_time = gpr_now(GPR_CLOCK_MONOTONIC); + calld->deadline = gpr_convert_clock_type(args->deadline, GPR_CLOCK_MONOTONIC); + calld->wait_for_ready_from_service_config = WAIT_FOR_READY_UNSET; calld->cancel_error = GRPC_ERROR_NONE; gpr_atm_rel_store(&calld->subchannel_call, 0); gpr_mu_init(&calld->mu); @@ -854,6 +889,53 @@ static grpc_error *cc_init_call_elem(grpc_exec_ctx *exec_ctx, calld->creation_phase = GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING; calld->owning_call = args->call_stack; calld->pollent = NULL; + // If the resolver has already returned results, then we can access + // the service config parameters immediately. Otherwise, we need to + // defer that work until the resolver returns an initial result. + // TODO(roth): This code is almost but not quite identical to the code + // in read_service_config() above. It would be nice to find a way to + // combine them, to avoid having to maintain it twice. + gpr_mu_lock(&chand->mu); + if (chand->lb_policy != NULL) { + // We already have a resolver result, so check for service config. + if (chand->method_config_table != NULL) { + grpc_method_config_table *method_config_table = + grpc_method_config_table_ref(chand->method_config_table); + gpr_mu_unlock(&chand->mu); + grpc_method_config *method_config = + grpc_method_config_table_get_method_config(method_config_table, + args->path); + if (method_config != NULL) { + gpr_timespec *per_method_timeout = + grpc_method_config_get_timeout(method_config); + if (per_method_timeout != NULL) { + gpr_timespec per_method_deadline = + gpr_time_add(calld->call_start_time, *per_method_timeout); + calld->deadline = gpr_time_min(calld->deadline, per_method_deadline); + } + bool *wait_for_ready = + grpc_method_config_get_wait_for_ready(method_config); + if (wait_for_ready != NULL) { + calld->wait_for_ready_from_service_config = + *wait_for_ready ? WAIT_FOR_READY_TRUE : WAIT_FOR_READY_FALSE; + } + } + grpc_method_config_table_unref(method_config_table); + } else { + gpr_mu_unlock(&chand->mu); + } + } else { + // We don't yet have a resolver result, so register a callback to + // get the service config data once the resolver returns. + grpc_closure_init(&calld->read_service_config, read_service_config, elem); + grpc_closure_list_append(&chand->waiting_for_config_closures, + &calld->read_service_config, GRPC_ERROR_NONE); + gpr_mu_unlock(&chand->mu); + } + // Start the deadline timer with the current deadline value. If we + // do not yet have service config data, then the timer may be reset + // later. + grpc_deadline_state_start(exec_ctx, elem, calld->deadline); return GRPC_ERROR_NONE; } diff --git a/src/core/lib/channel/deadline_filter.c b/src/core/lib/channel/deadline_filter.c index 5216338833..d2ea5250f6 100644 --- a/src/core/lib/channel/deadline_filter.c +++ b/src/core/lib/channel/deadline_filter.c @@ -64,30 +64,49 @@ static void timer_callback(grpc_exec_ctx* exec_ctx, void* arg, } // Starts the deadline timer. -static void start_timer_if_needed(grpc_exec_ctx* exec_ctx, - grpc_call_element* elem, - gpr_timespec deadline) { +static void start_timer_if_needed_locked(grpc_exec_ctx* exec_ctx, + grpc_call_element* elem, + gpr_timespec deadline) { grpc_deadline_state* deadline_state = elem->call_data; deadline = gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC); - if (gpr_time_cmp(deadline, gpr_inf_future(GPR_CLOCK_MONOTONIC)) != 0) { + // Note: We do not start the timer if there is already a timer + // pending. This should be okay, because this is only called from two + // functions exported by this module: grpc_deadline_state_start(), which + // starts the initial timer, and grpc_deadline_state_reset(), which + // cancels any pre-existing timer before starting a new one. In + // particular, we want to ensure that if grpc_deadline_state_start() + // winds up trying to start the timer after grpc_deadline_state_reset() + // has already done so, we ignore the value from the former. + if (!deadline_state->timer_pending && + gpr_time_cmp(deadline, gpr_inf_future(GPR_CLOCK_MONOTONIC)) != 0) { // Take a reference to the call stack, to be owned by the timer. GRPC_CALL_STACK_REF(deadline_state->call_stack, "deadline_timer"); - gpr_mu_lock(&deadline_state->timer_mu); deadline_state->timer_pending = true; grpc_timer_init(exec_ctx, &deadline_state->timer, deadline, timer_callback, elem, gpr_now(GPR_CLOCK_MONOTONIC)); - gpr_mu_unlock(&deadline_state->timer_mu); } } +static void start_timer_if_needed(grpc_exec_ctx* exec_ctx, + grpc_call_element* elem, + gpr_timespec deadline) { + grpc_deadline_state* deadline_state = elem->call_data; + gpr_mu_lock(&deadline_state->timer_mu); + start_timer_if_needed_locked(exec_ctx, elem, deadline); + gpr_mu_unlock(&deadline_state->timer_mu); +} // Cancels the deadline timer. -static void cancel_timer_if_needed(grpc_exec_ctx* exec_ctx, - grpc_deadline_state* deadline_state) { - gpr_mu_lock(&deadline_state->timer_mu); +static void cancel_timer_if_needed_locked(grpc_exec_ctx* exec_ctx, + grpc_deadline_state* deadline_state) { if (deadline_state->timer_pending) { grpc_timer_cancel(exec_ctx, &deadline_state->timer); deadline_state->timer_pending = false; } +} +static void cancel_timer_if_needed(grpc_exec_ctx* exec_ctx, + grpc_deadline_state* deadline_state) { + gpr_mu_lock(&deadline_state->timer_mu); + cancel_timer_if_needed_locked(exec_ctx, deadline_state); gpr_mu_unlock(&deadline_state->timer_mu); } @@ -108,6 +127,21 @@ static void inject_on_complete_cb(grpc_deadline_state* deadline_state, op->on_complete = &deadline_state->on_complete; } +void grpc_deadline_state_init(grpc_exec_ctx* exec_ctx, grpc_call_element* elem, + grpc_call_stack* call_stack) { + grpc_deadline_state* deadline_state = elem->call_data; + memset(deadline_state, 0, sizeof(*deadline_state)); + deadline_state->call_stack = call_stack; + gpr_mu_init(&deadline_state->timer_mu); +} + +void grpc_deadline_state_destroy(grpc_exec_ctx* exec_ctx, + grpc_call_element* elem) { + grpc_deadline_state* deadline_state = elem->call_data; + cancel_timer_if_needed(exec_ctx, deadline_state); + gpr_mu_destroy(&deadline_state->timer_mu); +} + // Callback and associated state for starting the timer after call stack // initialization has been completed. struct start_timer_after_init_state { @@ -122,24 +156,11 @@ static void start_timer_after_init(grpc_exec_ctx* exec_ctx, void* arg, gpr_free(state); } -void grpc_deadline_state_init(grpc_exec_ctx* exec_ctx, grpc_call_element* elem, - grpc_call_element_args* args, - grpc_method_config* method_config) { - grpc_deadline_state* deadline_state = elem->call_data; - memset(deadline_state, 0, sizeof(*deadline_state)); - deadline_state->call_stack = args->call_stack; - gpr_mu_init(&deadline_state->timer_mu); +void grpc_deadline_state_start(grpc_exec_ctx* exec_ctx, grpc_call_element* elem, + gpr_timespec deadline) { // Deadline will always be infinite on servers, so the timer will only be // set on clients with a finite deadline. - gpr_timespec deadline = - gpr_convert_clock_type(args->deadline, GPR_CLOCK_MONOTONIC); - if (method_config != NULL) { - gpr_timespec* per_method_deadline = - grpc_method_config_get_timeout(method_config); - if (per_method_deadline != NULL) { - deadline = gpr_time_min(deadline, *per_method_deadline); - } - } + deadline = gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC); if (gpr_time_cmp(deadline, gpr_inf_future(GPR_CLOCK_MONOTONIC)) != 0) { // When the deadline passes, we indicate the failure by sending down // an op with cancel_error set. However, we can't send down any ops @@ -156,11 +177,13 @@ void grpc_deadline_state_init(grpc_exec_ctx* exec_ctx, grpc_call_element* elem, } } -void grpc_deadline_state_destroy(grpc_exec_ctx* exec_ctx, - grpc_call_element* elem) { +void grpc_deadline_state_reset(grpc_exec_ctx* exec_ctx, grpc_call_element* elem, + gpr_timespec new_deadline) { grpc_deadline_state* deadline_state = elem->call_data; - cancel_timer_if_needed(exec_ctx, deadline_state); - gpr_mu_destroy(&deadline_state->timer_mu); + gpr_mu_lock(&deadline_state->timer_mu); + cancel_timer_if_needed_locked(exec_ctx, deadline_state); + start_timer_if_needed_locked(exec_ctx, elem, new_deadline); + gpr_mu_unlock(&deadline_state->timer_mu); } void grpc_deadline_state_client_start_transport_stream_op( @@ -217,7 +240,8 @@ static grpc_error* init_call_elem(grpc_exec_ctx* exec_ctx, grpc_call_element_args* args) { // Note: size of call data is different between client and server. memset(elem->call_data, 0, elem->filter->sizeof_call_data); - grpc_deadline_state_init(exec_ctx, elem, args, NULL /* method_config */); + grpc_deadline_state_init(exec_ctx, elem, args->call_stack); + grpc_deadline_state_start(exec_ctx, elem, args->deadline); return GRPC_ERROR_NONE; } diff --git a/src/core/lib/channel/deadline_filter.h b/src/core/lib/channel/deadline_filter.h index ce6e8ea974..9fd3802721 100644 --- a/src/core/lib/channel/deadline_filter.h +++ b/src/core/lib/channel/deadline_filter.h @@ -56,19 +56,37 @@ typedef struct grpc_deadline_state { grpc_closure* next_on_complete; } grpc_deadline_state; -// To be used in a filter's init_call_elem(), destroy_call_elem(), and -// start_transport_stream_op() methods to enforce call deadlines. // -// REQUIRES: The first field in elem->call_data is a grpc_deadline_state. +// NOTE: All of these functions require that the first field in +// elem->call_data is a grpc_deadline_state. // -// For grpc_deadline_state_client_start_transport_stream_op(), it is the -// caller's responsibility to chain to the next filter if necessary -// after the function returns. + void grpc_deadline_state_init(grpc_exec_ctx* exec_ctx, grpc_call_element* elem, - grpc_call_element_args* args, - grpc_method_config* method_config); + grpc_call_stack* call_stack); void grpc_deadline_state_destroy(grpc_exec_ctx* exec_ctx, grpc_call_element* elem); + +// Starts the timer with the specified deadline. +// Should be called from the filter's init_call_elem() method. +void grpc_deadline_state_start(grpc_exec_ctx* exec_ctx, grpc_call_element* elem, + gpr_timespec deadline); + +// Cancels the existing timer and starts a new one with new_deadline. +// +// Note: It is generally safe to call this with an earlier deadline +// value than the current one, but not the reverse. No checks are done +// to ensure that the timer callback is not invoked while it is in the +// process of being reset, which means that attempting to increase the +// deadline may result in the timer being called twice. +void grpc_deadline_state_reset(grpc_exec_ctx* exec_ctx, grpc_call_element* elem, + gpr_timespec new_deadline); + +// To be called from the client-side filter's start_transport_stream_op() +// method. Ensures that the deadline timer is cancelled when the call +// is completed. +// +// Note: It is the caller's responsibility to chain to the next filter if +// necessary after this function returns. void grpc_deadline_state_client_start_transport_stream_op( grpc_exec_ctx* exec_ctx, grpc_call_element* elem, grpc_transport_stream_op* op); diff --git a/test/core/end2end/fake_resolver.c b/test/core/end2end/fake_resolver.c index cb5b9e52b7..32dc9e2711 100644 --- a/test/core/end2end/fake_resolver.c +++ b/test/core/end2end/fake_resolver.c @@ -203,7 +203,7 @@ static grpc_resolver* fake_resolver_create(grpc_resolver_factory* factory, const char* timeout_str = grpc_uri_get_query_arg(args->uri, "timeout_seconds"); gpr_timespec timeout = {timeout_str == NULL ? 0 : atoi(timeout_str), 0, - GPR_CLOCK_MONOTONIC}; + GPR_TIMESPAN}; const char* max_request_message_bytes_str = grpc_uri_get_query_arg(args->uri, "max_request_message_bytes"); int32_t max_request_message_bytes = diff --git a/test/core/end2end/tests/cancel_after_accept.c b/test/core/end2end/tests/cancel_after_accept.c index 8e2c9a0aa4..9f49815527 100644 --- a/test/core/end2end/tests/cancel_after_accept.c +++ b/test/core/end2end/tests/cancel_after_accept.c @@ -49,12 +49,13 @@ static void *tag(intptr_t t) { return (void *)t; } static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, const char *test_name, grpc_channel_args *client_args, - grpc_channel_args *server_args) { + grpc_channel_args *server_args, + const char *query_args) { grpc_end2end_test_fixture f; gpr_log(GPR_INFO, "%s/%s", test_name, config.name); f = config.create_fixture(client_args, server_args); config.init_server(&f, server_args); - config.init_client(&f, client_args, NULL); + config.init_client(&f, client_args, query_args); return f; } @@ -98,15 +99,15 @@ static void end_test(grpc_end2end_test_fixture *f) { /* Cancel after accept, no payload */ static void test_cancel_after_accept(grpc_end2end_test_config config, - cancellation_mode mode) { + cancellation_mode mode, + bool use_service_config) { grpc_op ops[6]; grpc_op *op; grpc_call *c; grpc_call *s; - grpc_end2end_test_fixture f = - begin_test(config, "cancel_after_accept", NULL, NULL); - gpr_timespec deadline = five_seconds_time(); - cq_verifier *cqv = cq_verifier_create(f.cq); + gpr_timespec deadline = use_service_config + ? gpr_inf_future(GPR_CLOCK_MONOTONIC) + : five_seconds_time(); grpc_metadata_array initial_metadata_recv; grpc_metadata_array trailing_metadata_recv; grpc_metadata_array request_metadata_recv; @@ -125,8 +126,19 @@ static void test_cancel_after_accept(grpc_end2end_test_config config, grpc_raw_byte_buffer_create(&response_payload_slice, 1); int was_cancelled = 2; + const char *query_args = NULL; + if (use_service_config) { + query_args = + "method_name=/service/method" + "&timeout_seconds=5"; + } + grpc_end2end_test_fixture f = + begin_test(config, "cancel_after_accept", NULL, NULL, query_args); + cq_verifier *cqv = cq_verifier_create(f.cq); + c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, - "/foo", "foo.test.google.fr", deadline, NULL); + "/service/method", "foo.test.google.fr", + deadline, NULL); GPR_ASSERT(c); grpc_metadata_array_init(&initial_metadata_recv); @@ -230,7 +242,18 @@ void cancel_after_accept(grpc_end2end_test_config config) { unsigned i; for (i = 0; i < GPR_ARRAY_SIZE(cancellation_modes); i++) { - test_cancel_after_accept(config, cancellation_modes[i]); + test_cancel_after_accept(config, cancellation_modes[i], + false /* use_service_config */); + } + + if (config.feature_mask & FEATURE_MASK_SUPPORTS_QUERY_ARGS) { + for (i = 0; i < GPR_ARRAY_SIZE(cancellation_modes); i++) { + if (cancellation_modes[i].expect_status == + GRPC_STATUS_DEADLINE_EXCEEDED) { + test_cancel_after_accept(config, cancellation_modes[i], + true /* use_service_config */); + } + } } } -- cgit v1.2.3 From 2623728cae4729b1059aed2c2b7cf4f49e8df22a Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 6 Oct 2016 08:54:59 -0700 Subject: Remove unnecessary include. --- src/core/lib/channel/deadline_filter.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/channel/deadline_filter.h b/src/core/lib/channel/deadline_filter.h index 9fd3802721..716a852565 100644 --- a/src/core/lib/channel/deadline_filter.h +++ b/src/core/lib/channel/deadline_filter.h @@ -35,8 +35,6 @@ #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/iomgr/timer.h" -#include "src/core/ext/client_config/method_config.h" - // State used for filters that enforce call deadlines. // Must be the first field in the filter's call_data. typedef struct grpc_deadline_state { -- cgit v1.2.3 From bc544be002b864e808cbca54ea64fa9b68262302 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Thu, 6 Oct 2016 19:23:47 -0700 Subject: Fix platform detection --- src/core/lib/iomgr/ev_epoll_linux.c | 4 ++++ src/core/lib/iomgr/ev_poll_posix.c | 3 +++ src/core/lib/iomgr/ev_posix.c | 1 + src/core/lib/iomgr/wakeup_fd_pipe.c | 3 +-- 4 files changed, 9 insertions(+), 2 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index ab77ebc78b..249bc98735 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -1892,6 +1892,10 @@ const grpc_event_engine_vtable *grpc_init_epoll_linux(void) { return NULL; } + if (!grpc_has_wakeup_fd) { + return NULL; + } + if (!is_epoll_available()) { return NULL; } diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.c index 16a5e3083e..97e71d968e 100644 --- a/src/core/lib/iomgr/ev_poll_posix.c +++ b/src/core/lib/iomgr/ev_poll_posix.c @@ -1277,6 +1277,9 @@ static const grpc_event_engine_vtable vtable = { }; const grpc_event_engine_vtable *grpc_init_poll_posix(void) { + if (!grpc_has_wakeup_fd) { + return NULL; + } if (!GRPC_LOG_IF_ERROR("pollset_global_init", pollset_global_init())) { return NULL; } diff --git a/src/core/lib/iomgr/ev_posix.c b/src/core/lib/iomgr/ev_posix.c index 2fc8ccfa91..a4102b429f 100644 --- a/src/core/lib/iomgr/ev_posix.c +++ b/src/core/lib/iomgr/ev_posix.c @@ -65,6 +65,7 @@ typedef struct { } event_engine_factory; static const event_engine_factory g_factories[] = { + {"poll-cv", grpc_init_poll_cv_posix}, {"epoll", grpc_init_epoll_linux}, {"poll", grpc_init_poll_posix}, {"poll-cv", grpc_init_poll_cv_posix}, diff --git a/src/core/lib/iomgr/wakeup_fd_pipe.c b/src/core/lib/iomgr/wakeup_fd_pipe.c index 3dc94c94ba..d0ea216aa0 100644 --- a/src/core/lib/iomgr/wakeup_fd_pipe.c +++ b/src/core/lib/iomgr/wakeup_fd_pipe.c @@ -47,11 +47,10 @@ static grpc_error* pipe_init(grpc_wakeup_fd* fd_info) { int pipefd[2]; - /* TODO(klempner): Make this nonfatal */ int r = pipe(pipefd); if (0 != r) { gpr_log(GPR_ERROR, "pipe creation failed (%d): %s", errno, strerror(errno)); - abort(); + return GRPC_OS_ERROR(errno, "pipe"); } grpc_error* err; err = grpc_set_socket_nonblocking(pipefd[0], 1); -- cgit v1.2.3 From 46db0d29061d49d68c3a0e490e036d2a076d59f9 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 7 Oct 2016 07:27:05 -0700 Subject: Fix refcount bug --- src/core/lib/surface/call.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/core/lib') diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 601b0c8580..d723711c55 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -314,7 +314,6 @@ grpc_error *grpc_call_create(const grpc_call_create_args *args, const char *error_str; grpc_error_get_status(error, &status, &error_str); close_with_status(&exec_ctx, call, status, error_str); - GRPC_ERROR_UNREF(error); } if (args->cq != NULL) { GPR_ASSERT( -- cgit v1.2.3 From 2c287ca750c114c7230e57a1231d7e22863ab53d Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 7 Oct 2016 09:55:35 -0700 Subject: UV tests pass on linux --- Makefile | 4 - build.yaml | 31 +- src/core/lib/iomgr/endpoint_pair_uv.c | 4 +- src/core/lib/iomgr/pollset_uv.c | 77 +- src/core/lib/iomgr/pollset_uv.h | 2 + src/core/lib/iomgr/resolve_address_uv.c | 2 + src/core/lib/iomgr/tcp_client_uv.c | 4 - src/core/lib/iomgr/tcp_server_uv.c | 47 +- src/core/lib/iomgr/tcp_uv.c | 12 +- src/core/lib/iomgr/timer_uv.c | 4 - src/node/ext/node_grpc.cc | 7 + test/core/bad_client/gen_build_yaml.py | 1 + test/core/end2end/cq_verifier.c | 46 +- test/core/end2end/cq_verifier_uv.c | 7 +- test/core/end2end/gen_build_yaml.py | 38 +- test/core/util/port_server_client.c | 2 +- test/core/util/port_uv.c | 69 +- tools/buildgen/plugins/make_fuzzer_tests.py | 1 + tools/run_tests/run_tests.py | 2 + tools/run_tests/sources_and_headers.json | 4 - tools/run_tests/tests.json | 13719 ++++++++++++++++++- .../vcxproj/grpc_test_util/grpc_test_util.vcxproj | 5 - .../grpc_test_util/grpc_test_util.vcxproj.filters | 9 - .../grpc_test_util_unsecure.vcxproj | 5 - .../grpc_test_util_unsecure.vcxproj.filters | 9 - 25 files changed, 13641 insertions(+), 470 deletions(-) (limited to 'src/core/lib') diff --git a/Makefile b/Makefile index 18dc6151cb..ea5d346c92 100644 --- a/Makefile +++ b/Makefile @@ -3084,8 +3084,6 @@ LIBGRPC_TEST_UTIL_SRC = \ test/core/end2end/data/test_root_cert.c \ test/core/security/oauth2_utils.c \ test/core/end2end/cq_verifier.c \ - test/core/end2end/cq_verifier_native.c \ - test/core/end2end/cq_verifier_uv.c \ test/core/end2end/fixtures/http_proxy.c \ test/core/end2end/fixtures/proxy.c \ test/core/iomgr/endpoint_tests.c \ @@ -3266,8 +3264,6 @@ endif LIBGRPC_TEST_UTIL_UNSECURE_SRC = \ test/core/end2end/cq_verifier.c \ - test/core/end2end/cq_verifier_native.c \ - test/core/end2end/cq_verifier_uv.c \ test/core/end2end/fixtures/http_proxy.c \ test/core/end2end/fixtures/proxy.c \ test/core/iomgr/endpoint_tests.c \ diff --git a/build.yaml b/build.yaml index f539ddba0b..913ce7f8e5 100644 --- a/build.yaml +++ b/build.yaml @@ -525,7 +525,6 @@ filegroups: build: test headers: - test/core/end2end/cq_verifier.h - - test/core/end2end/cq_verifier_internal.h - test/core/end2end/fixtures/http_proxy.h - test/core/end2end/fixtures/proxy.h - test/core/iomgr/endpoint_tests.h @@ -539,8 +538,6 @@ filegroups: - test/core/util/slice_splitter.h src: - test/core/end2end/cq_verifier.c - - test/core/end2end/cq_verifier_native.c - - test/core/end2end/cq_verifier_uv.c - test/core/end2end/fixtures/http_proxy.c - test/core/end2end/fixtures/proxy.c - test/core/iomgr/endpoint_tests.c @@ -1344,6 +1341,8 @@ targets: - grpc - gpr_test_util - gpr + exclude_iomgrs: + - uv - name: bin_decoder_test build: test language: c @@ -1485,6 +1484,8 @@ targets: - grpc - gpr_test_util - gpr + exclude_iomgrs: + - uv - name: dns_resolver_connectivity_test cpu_cost: 0.1 build: test @@ -1496,6 +1497,8 @@ targets: - grpc - gpr_test_util - gpr + exclude_iomgrs: + - uv - name: dns_resolver_test build: test language: c @@ -1533,6 +1536,8 @@ targets: - grpc - gpr_test_util - gpr + exclude_iomgrs: + - uv - name: ev_epoll_linux_test build: test language: c @@ -1543,6 +1548,8 @@ targets: - grpc - gpr_test_util - gpr + exclude_iomgrs: + - uv platforms: - linux - name: fd_conservation_posix_test @@ -1555,6 +1562,8 @@ targets: - grpc - gpr_test_util - gpr + exclude_iomgrs: + - uv platforms: - mac - linux @@ -1569,6 +1578,8 @@ targets: - grpc - gpr_test_util - gpr + exclude_iomgrs: + - uv platforms: - mac - linux @@ -1656,6 +1667,8 @@ targets: - grpc - gpr_test_util - gpr + exclude_iomgrs: + - uv platforms: - mac - linux @@ -1876,6 +1889,8 @@ targets: - grpc - gpr_test_util - gpr + exclude_iomgrs: + - uv - name: grpc_create_jwt build: tool language: c @@ -2338,6 +2353,8 @@ targets: - grpc - gpr_test_util - gpr + exclude_iomgrs: + - uv - name: secure_channel_create_test build: test language: c @@ -2358,6 +2375,8 @@ targets: - grpc - gpr_test_util - gpr + exclude_iomgrs: + - uv - name: sequential_connectivity_test build: test language: c @@ -2368,6 +2387,8 @@ targets: - grpc - gpr_test_util - gpr + exclude_iomgrs: + - uv - name: server_chttp2_test build: test language: c @@ -2414,6 +2435,8 @@ targets: - grpc - gpr_test_util - gpr + exclude_iomgrs: + - uv - name: sockaddr_resolver_test build: test language: c @@ -2444,6 +2467,8 @@ targets: - grpc - gpr_test_util - gpr + exclude_iomgrs: + - uv platforms: - mac - linux diff --git a/src/core/lib/iomgr/endpoint_pair_uv.c b/src/core/lib/iomgr/endpoint_pair_uv.c index eeca8070b5..4f769901ae 100644 --- a/src/core/lib/iomgr/endpoint_pair_uv.c +++ b/src/core/lib/iomgr/endpoint_pair_uv.c @@ -37,13 +37,15 @@ #include +#include + #include "src/core/lib/iomgr/endpoint_pair.h" grpc_endpoint_pair grpc_iomgr_create_endpoint_pair(const char *name, size_t read_slice_size) { grpc_endpoint_pair endpoint_pair; // TODO(mlumish): implement this properly under libuv - abort(); + GPR_ASSERT(false && "grpc_iomgr_create_endpoint_pair is not suppoted with libuv"); return endpoint_pair; } diff --git a/src/core/lib/iomgr/pollset_uv.c b/src/core/lib/iomgr/pollset_uv.c index b304eb64de..8f4e20f296 100644 --- a/src/core/lib/iomgr/pollset_uv.c +++ b/src/core/lib/iomgr/pollset_uv.c @@ -35,40 +35,105 @@ #ifdef GRPC_UV +#include + +#include + +#include #include #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/pollset_uv.h" +struct grpc_pollset { + uv_timer_t timer; + int shutting_down; +}; + +/* Indicates that grpc_pollset_work should run an iteration of the UV loop + before running callbacks. This defaults to 1, and should be disabled if + grpc_pollset_work will be called within the callstack of uv_run */ +int grpc_pollset_work_run_loop; + gpr_mu grpc_polling_mu; -size_t grpc_pollset_size() { return 1; } +size_t grpc_pollset_size() { return sizeof(grpc_pollset); } -void grpc_pollset_global_init(void) { gpr_mu_init(&grpc_polling_mu); } +void grpc_pollset_global_init(void) { + gpr_mu_init(&grpc_polling_mu); + grpc_pollset_work_run_loop = 1; +} void grpc_pollset_global_shutdown(void) { gpr_mu_destroy(&grpc_polling_mu); } void grpc_pollset_init(grpc_pollset *pollset, gpr_mu **mu) { *mu = &grpc_polling_mu; + memset(pollset, 0, sizeof(grpc_pollset)); + uv_timer_init(uv_default_loop(), &pollset->timer); + pollset->shutting_down = 0; +} + +static void timer_close_cb(uv_handle_t *handle) { + handle->data = (void *)1; } void grpc_pollset_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_closure *closure) { + GPR_ASSERT(!pollset->shutting_down); + pollset->shutting_down = 1; + if (grpc_pollset_work_run_loop) { + // Drain any pending UV callbacks without blocking + uv_run(uv_default_loop(), UV_RUN_NOWAIT); + } grpc_exec_ctx_sched(exec_ctx, closure, GRPC_ERROR_NONE, NULL); } -void grpc_pollset_destroy(grpc_pollset *pollset) {} +void grpc_pollset_destroy(grpc_pollset *pollset) { + uv_close((uv_handle_t*)&pollset->timer, timer_close_cb); + // timer.data is a boolean indicating that the timer has finished closing + pollset->timer.data = (void *)0; + if (grpc_pollset_work_run_loop) { + while (!pollset->timer.data) { + uv_run(uv_default_loop(), UV_RUN_NOWAIT); + } + } +} -void grpc_pollset_reset(grpc_pollset *pollset) {} +void grpc_pollset_reset(grpc_pollset *pollset) { + GPR_ASSERT(pollset->shutting_down); + pollset->shutting_down = 0; +} + +static void timer_run_cb(uv_timer_t *timer) { +} grpc_error *grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_pollset_worker **worker_hdl, gpr_timespec now, gpr_timespec deadline) { + uint64_t timeout; + gpr_mu_unlock(&grpc_polling_mu); + if (grpc_pollset_work_run_loop) { + if (gpr_time_cmp(deadline, now) >= 0) { + timeout = (uint64_t)gpr_time_to_millis(gpr_time_sub(deadline, now)); + } else { + timeout = 0; + } + /* We special-case timeout=0 so that we don't bother with the timer when + the loop won't block anyway */ + if (timeout > 0) { + uv_timer_start(&pollset->timer, timer_run_cb, timeout, 0); + /* Run until there is some I/O activity or the timer triggers. It doesn't + matter which happens */ + uv_run(uv_default_loop(), UV_RUN_ONCE); + uv_timer_stop(&pollset->timer); + } else { + uv_run(uv_default_loop(), UV_RUN_NOWAIT); + } + } if (!grpc_closure_list_empty(exec_ctx->closure_list)) { - gpr_mu_unlock(&grpc_polling_mu); grpc_exec_ctx_flush(exec_ctx); - gpr_mu_lock(&grpc_polling_mu); } + gpr_mu_lock(&grpc_polling_mu); return GRPC_ERROR_NONE; } diff --git a/src/core/lib/iomgr/pollset_uv.h b/src/core/lib/iomgr/pollset_uv.h index 5cbc83e991..9f1d1442b2 100644 --- a/src/core/lib/iomgr/pollset_uv.h +++ b/src/core/lib/iomgr/pollset_uv.h @@ -31,5 +31,7 @@ * */ +extern int grpc_pollset_work_run_loop; + void grpc_pollset_global_init(void); void grpc_pollset_global_shutdown(void); diff --git a/src/core/lib/iomgr/resolve_address_uv.c b/src/core/lib/iomgr/resolve_address_uv.c index 76170722f2..b8295acfa1 100644 --- a/src/core/lib/iomgr/resolve_address_uv.c +++ b/src/core/lib/iomgr/resolve_address_uv.c @@ -143,6 +143,8 @@ static grpc_error *blocking_resolve_address_impl( int s; grpc_error *err; + req.addrinfo = NULL; + err = try_split_host_port(name, default_port, &host, &port); if (err != GRPC_ERROR_NONE) { goto done; diff --git a/src/core/lib/iomgr/tcp_client_uv.c b/src/core/lib/iomgr/tcp_client_uv.c index 50e3615aad..d48147ce6e 100644 --- a/src/core/lib/iomgr/tcp_client_uv.c +++ b/src/core/lib/iomgr/tcp_client_uv.c @@ -61,7 +61,6 @@ static void uv_tcp_connect_cleanup(grpc_uv_tcp_connect *connect) { } static void tcp_close_callback(uv_handle_t *handle) { - gpr_log(GPR_DEBUG, "Freeing uv_tcp_t handle %p", handle); gpr_free(handle); } @@ -73,7 +72,6 @@ static void uv_tc_on_alarm(grpc_exec_ctx *exec_ctx, void *acp, /* error == NONE implies that the timer ran out, and wasn't cancelled. If it was cancelled, then the handler that cancelled it also should close the handle, if applicable */ - gpr_log(GPR_DEBUG, "Closing uv_tcp_t handle %p", connect->tcp_handle); uv_close((uv_handle_t *)connect->tcp_handle, tcp_close_callback); } done = (--connect->refs == 0); @@ -104,7 +102,6 @@ static void uv_tc_on_connect(uv_connect_t *req, int status) { } else { error = grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR, uv_strerror(status)); - gpr_log(GPR_DEBUG, "Closing uv_tcp_t handle %p", connect->tcp_handle); uv_close((uv_handle_t *)connect->tcp_handle, tcp_close_callback); } } @@ -128,7 +125,6 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, connect->closure = closure; connect->endpoint = ep; connect->tcp_handle = gpr_malloc(sizeof(uv_tcp_t)); - gpr_log(GPR_DEBUG, "Allocated uv_tcp_t handle %p", connect->tcp_handle); connect->addr_name = grpc_sockaddr_to_uri(resolved_addr); uv_tcp_init(uv_default_loop(), connect->tcp_handle); connect->connect_req.data = connect; diff --git a/src/core/lib/iomgr/tcp_server_uv.c b/src/core/lib/iomgr/tcp_server_uv.c index a9eaf206d0..e1eee2d460 100644 --- a/src/core/lib/iomgr/tcp_server_uv.c +++ b/src/core/lib/iomgr/tcp_server_uv.c @@ -116,7 +116,6 @@ static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { grpc_tcp_listener *sp = s->head; s->head = sp->next; sp->next = NULL; - gpr_log(GPR_DEBUG, "Freeing uv_tcp_t handle %p", sp->handle); gpr_free(sp->handle); gpr_free(sp); } @@ -141,7 +140,6 @@ static void tcp_server_destroy(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { immediately_done = 1; } for (sp = s->head; sp; sp = sp->next) { - gpr_log(GPR_DEBUG, "Closing uv_tcp_t handle %p", sp->handle); uv_close((uv_handle_t *)sp->handle, handle_close_callback); } @@ -166,6 +164,10 @@ void grpc_tcp_server_unref(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { } } +static void accepted_connection_close_cb(uv_handle_t *handle) { + gpr_free(handle); +} + static void on_connect(uv_stream_t *server, int status) { grpc_tcp_listener *sp = (grpc_tcp_listener *)server->data; grpc_tcp_server_acceptor acceptor = {sp->server, sp->port_index, 0}; @@ -176,7 +178,6 @@ static void on_connect(uv_stream_t *server, int status) { char *peer_name_string; int err; - gpr_log(GPR_DEBUG, "Server %p received a connection", sp->server); if (status < 0) { gpr_log(GPR_INFO, "Skipping on_accept due to error: %s", @@ -184,25 +185,28 @@ static void on_connect(uv_stream_t *server, int status) { return; } client = gpr_malloc(sizeof(uv_tcp_t)); - gpr_log(GPR_DEBUG, "Allocated uv_tcp_t handle %p", client); uv_tcp_init(uv_default_loop(), client); // UV documentation says this is guaranteed to succeed uv_accept((uv_stream_t *)server, (uv_stream_t *)client); - peer_name_string = NULL; - memset(&peer_name, 0, sizeof(grpc_resolved_address)); - peer_name.len = sizeof(struct sockaddr_storage); - err = uv_tcp_getpeername(client, (struct sockaddr *)&peer_name.addr, - (int *)&peer_name.len); - if (err == 0) { - peer_name_string = grpc_sockaddr_to_uri(&peer_name); + // If the server has not been started, we discard incoming connections + if (sp->server->on_accept_cb == NULL) { + uv_close((uv_handle_t *)client, accepted_connection_close_cb); } else { - gpr_log(GPR_INFO, "uv_tcp_getpeername error: %s", uv_strerror(status)); + peer_name_string = NULL; + memset(&peer_name, 0, sizeof(grpc_resolved_address)); + peer_name.len = sizeof(struct sockaddr_storage); + err = uv_tcp_getpeername(client, (struct sockaddr *)&peer_name.addr, + (int *)&peer_name.len); + if (err == 0) { + peer_name_string = grpc_sockaddr_to_uri(&peer_name); + } else { + gpr_log(GPR_INFO, "uv_tcp_getpeername error: %s", uv_strerror(status)); + } + ep = grpc_tcp_create(client, peer_name_string); + sp->server->on_accept_cb(&exec_ctx, sp->server->on_accept_cb_arg, ep, NULL, + &acceptor); + grpc_exec_ctx_finish(&exec_ctx); } - ep = grpc_tcp_create(client, peer_name_string); - gpr_log(GPR_DEBUG, "Calling on_accept_cb for server %p", sp->server); - sp->server->on_accept_cb(&exec_ctx, sp->server->on_accept_cb_arg, ep, NULL, - &acceptor); - grpc_exec_ctx_finish(&exec_ctx); } static grpc_error *add_socket_to_server(grpc_tcp_server *s, uv_tcp_t *handle, @@ -224,6 +228,14 @@ static grpc_error *add_socket_to_server(grpc_tcp_server *s, uv_tcp_t *handle, return error; } + status = uv_listen((uv_stream_t *)handle, SOMAXCONN, on_connect); + if (status != 0) { + error = GRPC_ERROR_CREATE("Failed to listen to port"); + error = + grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR, uv_strerror(status)); + return error; + } + sockname_temp.len = (int)sizeof(struct sockaddr_storage); status = uv_tcp_getsockname(handle, (struct sockaddr *)&sockname_temp.addr, (int *)&sockname_temp.len); @@ -308,7 +320,6 @@ grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s, } handle = gpr_malloc(sizeof(uv_tcp_t)); - gpr_log(GPR_DEBUG, "Allocating uv_tcp_t handle %p", handle); status = uv_tcp_init(uv_default_loop(), handle); if (status == 0) { error = add_socket_to_server(s, handle, addr, port_index, &sp); diff --git a/src/core/lib/iomgr/tcp_uv.c b/src/core/lib/iomgr/tcp_uv.c index 88c4195c2b..a78a40d261 100644 --- a/src/core/lib/iomgr/tcp_uv.c +++ b/src/core/lib/iomgr/tcp_uv.c @@ -64,13 +64,12 @@ typedef struct { gpr_slice_buffer *write_slices; uv_buf_t *write_buffers; - int shutting_down; + bool shutting_down; char *peer_string; grpc_pollset *pollset; } grpc_tcp; static void uv_close_callback(uv_handle_t *handle) { - gpr_log(GPR_DEBUG, "Freeing uv_tcp_t handle %p", handle); gpr_free(handle); } @@ -281,14 +280,16 @@ static void shutdown_callback(uv_shutdown_t *req, int status) { gpr_free(req); } static void uv_endpoint_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_tcp *tcp = (grpc_tcp *)ep; - uv_shutdown_t *req = gpr_malloc(sizeof(uv_shutdown_t)); - uv_shutdown(req, (uv_stream_t *)tcp->handle, shutdown_callback); + if (!tcp->shutting_down) { + tcp->shutting_down = true; + uv_shutdown_t *req = gpr_malloc(sizeof(uv_shutdown_t)); + uv_shutdown(req, (uv_stream_t *)tcp->handle, shutdown_callback); + } } static void uv_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_network_status_unregister_endpoint(ep); grpc_tcp *tcp = (grpc_tcp *)ep; - gpr_log(GPR_DEBUG, "Closing uv_tcp_t handle %p", tcp->handle); uv_close((uv_handle_t *)tcp->handle, uv_close_callback); TCP_UNREF(tcp, "destroy"); } @@ -322,6 +323,7 @@ grpc_endpoint *grpc_tcp_create(uv_tcp_t *handle, char *peer_string) { handle->data = tcp; gpr_ref_init(&tcp->refcount, 1); tcp->peer_string = gpr_strdup(peer_string); + tcp->shutting_down = false; /* Tell network status tracking code about the new endpoint */ grpc_network_status_register_endpoint(&tcp->base); diff --git a/src/core/lib/iomgr/timer_uv.c b/src/core/lib/iomgr/timer_uv.c index 222f1554a3..cfcb89268b 100644 --- a/src/core/lib/iomgr/timer_uv.c +++ b/src/core/lib/iomgr/timer_uv.c @@ -47,14 +47,12 @@ static void timer_close_callback(uv_handle_t *handle) { gpr_free(handle); } static void stop_uv_timer(uv_timer_t *handle) { uv_timer_stop(handle); uv_unref((uv_handle_t *)handle); - gpr_log(GPR_DEBUG, "Closing uv_timer_t handle %p", handle); uv_close((uv_handle_t *)handle, timer_close_callback); } void run_expired_timer(uv_timer_t *handle) { grpc_timer *timer = (grpc_timer *)handle->data; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - gpr_log(GPR_DEBUG, "Timer callback: %p", timer); GPR_ASSERT(!timer->triggered); timer->triggered = 1; grpc_exec_ctx_sched(&exec_ctx, &timer->closure, GRPC_ERROR_NONE, NULL); @@ -75,7 +73,6 @@ void grpc_timer_init(grpc_exec_ctx *exec_ctx, grpc_timer *timer, } timer->triggered = 0; timeout = (uint64_t)gpr_time_to_millis(gpr_time_sub(deadline, now)); - gpr_log(GPR_DEBUG, "Setting timer %p: %lu", timer, timeout); uv_timer = gpr_malloc(sizeof(uv_timer_t)); uv_timer_init(uv_default_loop(), uv_timer); uv_timer->data = timer; @@ -85,7 +82,6 @@ void grpc_timer_init(grpc_exec_ctx *exec_ctx, grpc_timer *timer, void grpc_timer_cancel(grpc_exec_ctx *exec_ctx, grpc_timer *timer) { if (!timer->triggered) { - gpr_log(GPR_DEBUG, "Running cancelled timer callback"); timer->triggered = 1; grpc_exec_ctx_sched(exec_ctx, &timer->closure, GRPC_ERROR_CANCELLED, NULL); stop_uv_timer((uv_timer_t *)timer->uv_timer); diff --git a/src/node/ext/node_grpc.cc b/src/node/ext/node_grpc.cc index a246a8c678..b8013c4193 100644 --- a/src/node/ext/node_grpc.cc +++ b/src/node/ext/node_grpc.cc @@ -42,6 +42,10 @@ #include "grpc/support/log.h" #include "grpc/support/time.h" +#ifdef GRPC_UV +#include "src/core/lib/iomgr/pollset_uv.h" +#endif + #include "call.h" #include "call_credentials.h" #include "channel.h" @@ -439,6 +443,9 @@ void init(Local exports) { uv_signal_start(&signal_handle, signal_callback, SIGUSR2); uv_unref((uv_handle_t *)&signal_handle); +#ifdef GRPC_UV + grpc_pollset_work_run_loop = 0; +#endif grpc::node::Call::Init(exports); grpc::node::CallCredentials::Init(exports); diff --git a/test/core/bad_client/gen_build_yaml.py b/test/core/bad_client/gen_build_yaml.py index fb86525b1a..32ab3f2137 100755 --- a/test/core/bad_client/gen_build_yaml.py +++ b/test/core/bad_client/gen_build_yaml.py @@ -83,6 +83,7 @@ def main(): 'secure': 'no', 'src': ['test/core/bad_client/tests/%s.c' % t], 'vs_proj_dir': 'test', + 'exclude_iomgrs': ['uv'], 'deps': [ 'bad_client_test', 'grpc_test_util_unsecure', diff --git a/test/core/end2end/cq_verifier.c b/test/core/end2end/cq_verifier.c index 9e6c0a4f4c..1f42d3457e 100644 --- a/test/core/end2end/cq_verifier.c +++ b/test/core/end2end/cq_verifier.c @@ -32,7 +32,6 @@ */ #include "test/core/end2end/cq_verifier.h" -#include "test/core/end2end/cq_verifier_internal.h" #include #include @@ -60,15 +59,35 @@ typedef struct metadata { /* details what we expect to find on a single event - and forms a linked list to detail other expectations */ -struct expectation { +typedef struct expectation { struct expectation *next; const char *file; int line; grpc_completion_type type; void *tag; int success; +} expectation; + +/* the verifier itself */ +struct cq_verifier { + /* bound completion queue */ + grpc_completion_queue *cq; + /* start of expectation list */ + expectation *first_expectation; }; +cq_verifier *cq_verifier_create(grpc_completion_queue *cq) { + cq_verifier *v = gpr_malloc(sizeof(cq_verifier)); + v->cq = cq; + v->first_expectation = NULL; + return v; +} + +void cq_verifier_destroy(cq_verifier *v) { + cq_verify(v); + gpr_free(v); +} + static int has_metadata(const grpc_metadata *md, size_t count, const char *key, const char *value) { size_t i; @@ -178,7 +197,7 @@ static void expectation_to_strvec(gpr_strvec *buf, expectation *e) { static void expectations_to_strvec(gpr_strvec *buf, cq_verifier *v) { expectation *e; - for (e = cq_verifier_get_first_expectation(v); e != NULL; e = e->next) { + for (e = v->first_expectation; e != NULL; e = e->next) { expectation_to_strvec(buf, e); gpr_strvec_add(buf, gpr_strdup("\n")); } @@ -198,19 +217,19 @@ static void fail_no_event_received(cq_verifier *v) { } void cq_verify(cq_verifier *v) { - int timeout_seconds = 10; - while (cq_verifier_get_first_expectation(v) != NULL) { - grpc_event ev = cq_verifier_next_event(v, timeout_seconds); + const gpr_timespec deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10); + while (v->first_expectation != NULL) { + grpc_event ev = grpc_completion_queue_next(v->cq, deadline, NULL); if (ev.type == GRPC_QUEUE_TIMEOUT) { fail_no_event_received(v); break; } expectation *e; expectation *prev = NULL; - for (e = cq_verifier_get_first_expectation(v); e != NULL; e = e->next) { + for (e = v->first_expectation; e != NULL; e = e->next) { if (e->tag == ev.tag) { verify_matches(e, &ev); - if (e == cq_verifier_get_first_expectation(v)) cq_verifier_set_first_expectation(v, e->next); + if (e == v->first_expectation) v->first_expectation = e->next; if (prev != NULL) prev->next = e->next; gpr_free(e); break; @@ -234,11 +253,14 @@ void cq_verify(cq_verifier *v) { } void cq_verify_empty_timeout(cq_verifier *v, int timeout_sec) { + gpr_timespec deadline = + gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), + gpr_time_from_seconds(timeout_sec, GPR_TIMESPAN)); grpc_event ev; - GPR_ASSERT(cq_verifier_get_first_expectation(v) == NULL && "expectation queue must be empty"); + GPR_ASSERT(v->first_expectation == NULL && "expectation queue must be empty"); - ev = cq_verifier_next_event(v, timeout_sec); + ev = grpc_completion_queue_next(v->cq, deadline, NULL); if (ev.type != GRPC_QUEUE_TIMEOUT) { char *s = grpc_event_string(&ev); gpr_log(GPR_ERROR, "unexpected event (expected nothing): %s", s); @@ -257,8 +279,8 @@ static void add(cq_verifier *v, const char *file, int line, e->line = line; e->tag = tag; e->success = success; - e->next = cq_verifier_get_first_expectation(v); - cq_verifier_set_first_expectation(v, e); + e->next = v->first_expectation; + v->first_expectation = e; } void cq_expect_completion(cq_verifier *v, const char *file, int line, void *tag, diff --git a/test/core/end2end/cq_verifier_uv.c b/test/core/end2end/cq_verifier_uv.c index 329dacf97e..74ac673f20 100644 --- a/test/core/end2end/cq_verifier_uv.c +++ b/test/core/end2end/cq_verifier_uv.c @@ -38,6 +38,7 @@ #include #include +#include #include "test/core/end2end/cq_verifier_internal.h" @@ -65,7 +66,7 @@ cq_verifier *cq_verifier_create(grpc_completion_queue *cq) { return v; } -void timer_close_cb(uv_handle_t *handle) { +static void timer_close_cb(uv_handle_t *handle) { handle->data = (void *)TIMER_CLOSED; } @@ -86,12 +87,12 @@ void cq_verifier_set_first_expectation(cq_verifier *v, expectation *e) { v->first_expectation = e; } -void timer_run_cb(uv_timer_t *timer) { +static void timer_run_cb(uv_timer_t *timer) { timer->data = (void *)TIMER_TRIGGERED; } grpc_event cq_verifier_next_event(cq_verifier *v, int timeout_seconds) { -uint64_t timeout_ms = timeout_seconds < 0 ? 0 : (uint64_t)timeout_seconds * 1000; + uint64_t timeout_ms = timeout_seconds < 0 ? 0 : (uint64_t)timeout_seconds * 1000; grpc_event ev; v->timer.data = (void *)TIMER_STARTED; uv_timer_start(&v->timer, timer_run_cb, timeout_ms, 0); diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py index c2040c00d8..3ea827f67e 100755 --- a/test/core/end2end/gen_build_yaml.py +++ b/test/core/end2end/gen_build_yaml.py @@ -44,14 +44,15 @@ default_unsecure_fixture_options = FixtureOptions( True, False, True, False, ['windows', 'linux', 'mac', 'posix'], True, False, [], []) socketpair_unsecure_fixture_options = default_unsecure_fixture_options._replace(fullstack=False, dns_resolver=False) default_secure_fixture_options = default_unsecure_fixture_options._replace(secure=True) -uds_fixture_options = default_unsecure_fixture_options._replace(dns_resolver=False, platforms=['linux', 'mac', 'posix']) +uds_fixture_options = default_unsecure_fixture_options._replace(dns_resolver=False, platforms=['linux', 'mac', 'posix'], exclude_iomgrs=['uv']) fd_unsecure_fixture_options = default_unsecure_fixture_options._replace( - dns_resolver=False, fullstack=False, platforms=['linux', 'mac', 'posix']) + dns_resolver=False, fullstack=False, platforms=['linux', 'mac', 'posix'], exclude_iomgrs=['uv']) # maps fixture name to whether it requires the security library END2END_FIXTURES = { 'h2_compress': default_unsecure_fixture_options, + 'h2_census': default_unsecure_fixture_options, 'h2_load_reporting': default_unsecure_fixture_options, 'h2_fakesec': default_secure_fixture_options._replace(ci_mac=False), @@ -60,26 +61,29 @@ END2END_FIXTURES = { 'h2_full+pipe': default_unsecure_fixture_options._replace( platforms=['linux'], exclude_iomgrs=['uv']), 'h2_full+trace': default_unsecure_fixture_options._replace(tracing=True), - 'h2_http_proxy': default_unsecure_fixture_options._replace(ci_mac=False), - 'h2_oauth2': default_secure_fixture_options._replace(ci_mac=False), - 'h2_proxy': default_unsecure_fixture_options._replace(includes_proxy=True, - ci_mac=False), + 'h2_http_proxy': default_unsecure_fixture_options._replace( + ci_mac=False, exclude_iomgrs=['uv']), + 'h2_oauth2': default_secure_fixture_options._replace( + ci_mac=False, exclude_iomgrs=['uv']), + 'h2_proxy': default_unsecure_fixture_options._replace( + includes_proxy=True, ci_mac=False, exclude_iomgrs=['uv']), 'h2_sockpair_1byte': socketpair_unsecure_fixture_options._replace( - ci_mac=False, exclude_configs=['msan']), - 'h2_sockpair': socketpair_unsecure_fixture_options._replace(ci_mac=False), + ci_mac=False, exclude_configs=['msan'], exclude_iomgrs=['uv']), + 'h2_sockpair': socketpair_unsecure_fixture_options._replace( + ci_mac=False, exclude_iomgrs=['uv']), 'h2_sockpair+trace': socketpair_unsecure_fixture_options._replace( - ci_mac=False, tracing=True), + ci_mac=False, tracing=True, exclude_iomgrs=['uv']), 'h2_ssl': default_secure_fixture_options, 'h2_ssl_cert': default_secure_fixture_options, - 'h2_ssl_proxy': default_secure_fixture_options._replace(includes_proxy=True, - ci_mac=False), + 'h2_ssl_proxy': default_secure_fixture_options._replace( + includes_proxy=True, ci_mac=False, exclude_iomgrs=['uv']), 'h2_uds': uds_fixture_options, } TestOptions = collections.namedtuple( 'TestOptions', - 'needs_fullstack needs_dns proxyable secure traceable cpu_cost') -default_test_options = TestOptions(False, False, True, False, True, 1.0) + 'needs_fullstack needs_dns proxyable secure traceable cpu_cost exclude_iomgrs') +default_test_options = TestOptions(False, False, True, False, True, 1.0, []) connectivity_test_options = default_test_options._replace(needs_fullstack=True) LOWCPU = 0.1 @@ -96,8 +100,8 @@ END2END_TESTS = { 'cancel_in_a_vacuum': default_test_options._replace(cpu_cost=LOWCPU), 'cancel_with_status': default_test_options._replace(cpu_cost=LOWCPU), 'compressed_payload': default_test_options._replace(proxyable=False), - 'connectivity': connectivity_test_options._replace(proxyable=False, - cpu_cost=LOWCPU), + 'connectivity': connectivity_test_options._replace( + proxyable=False, cpu_cost=LOWCPU, exclude_iomgrs=['uv']), 'default_host': default_test_options._replace(needs_fullstack=True, needs_dns=True), 'disappearing_server': connectivity_test_options, @@ -246,6 +250,8 @@ def main(): 'name': '%s_test' % f, 'args': [t], 'exclude_configs': [], + 'exclude_iomgrs': list(set(END2END_FIXTURES[f].exclude_iomgrs) | + set(END2END_TESTS[t].exclude_iomgrs)), 'platforms': END2END_FIXTURES[f].platforms, 'ci_platforms': (END2END_FIXTURES[f].platforms if END2END_FIXTURES[f].ci_mac else without( @@ -261,6 +267,8 @@ def main(): 'name': '%s_nosec_test' % f, 'args': [t], 'exclude_configs': END2END_FIXTURES[f].exclude_configs, + 'exclude_iomgrs': list(set(END2END_FIXTURES[f].exclude_iomgrs) | + set(END2END_TESTS[t].exclude_iomgrs)), 'platforms': END2END_FIXTURES[f].platforms, 'ci_platforms': (END2END_FIXTURES[f].platforms if END2END_FIXTURES[f].ci_mac else without( diff --git a/test/core/util/port_server_client.c b/test/core/util/port_server_client.c index d4a11c1e93..a5c8c49650 100644 --- a/test/core/util/port_server_client.c +++ b/test/core/util/port_server_client.c @@ -80,7 +80,7 @@ void grpc_free_port_using_server(char *server, int port) { grpc_httpcli_response rsp; freereq pr; char *path; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_RUN_INNER_LOOP; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_closure *shutdown_closure; grpc_init(); diff --git a/test/core/util/port_uv.c b/test/core/util/port_uv.c index e6d37caf98..cab31b3f4e 100644 --- a/test/core/util/port_uv.c +++ b/test/core/util/port_uv.c @@ -35,13 +35,75 @@ #include "test/core/util/test_config.h" #if defined(GRPC_UV) && defined(GRPC_TEST_PICK_PORT) +#include #include +#include "src/core/lib/support/env.h" #include "test/core/util/port.h" +#include "test/core/util/port_server_client.h" + +// Almost everything in this file has been copied from port_posix.c + +static int *chosen_ports = NULL; +static size_t num_chosen_ports = 0; + +static int free_chosen_port(int port) { + size_t i; + int found = 0; + size_t found_at = 0; + char *env = gpr_getenv("GRPC_TEST_PORT_SERVER"); + /* Find the port and erase it from the list, then tell the server it can be + freed. */ + for (i = 0; i < num_chosen_ports; i++) { + if (chosen_ports[i] == port) { + GPR_ASSERT(found == 0); + found = 1; + found_at = i; + } + } + if (found) { + chosen_ports[found_at] = chosen_ports[num_chosen_ports - 1]; + num_chosen_ports--; + if (env) { + grpc_free_port_using_server(env, port); + } + } + gpr_free(env); + return found; +} + +static void free_chosen_ports(void) { + char *env = gpr_getenv("GRPC_TEST_PORT_SERVER"); + if (env != NULL) { + size_t i; + for (i = 0; i < num_chosen_ports; i++) { + grpc_free_port_using_server(env, chosen_ports[i]); + } + gpr_free(env); + } + + gpr_free(chosen_ports); +} + +static void chose_port(int port) { + if (chosen_ports == NULL) { + atexit(free_chosen_ports); + } + num_chosen_ports++; + chosen_ports = gpr_realloc(chosen_ports, sizeof(int) * num_chosen_ports); + chosen_ports[num_chosen_ports - 1] = port; +} int grpc_pick_unused_port(void) { - // Temporary implementation - return 4242; + // Currently only works with the port server + char *env = gpr_getenv("GRPC_TEST_PORT_SERVER"); + GPR_ASSERT(env); + int port = grpc_pick_port_using_server(env); + gpr_free(env); + if (port != 0) { + chose_port(port); + } + return port; } int grpc_pick_unused_port_or_die(void) { @@ -51,8 +113,7 @@ int grpc_pick_unused_port_or_die(void) { } void grpc_recycle_unused_port(int port) { - // Temporary implementation - (void)port; + GPR_ASSERT(free_chosen_port(port)); } #endif /* GRPC_UV && GRPC_TEST_PICK_PORT */ diff --git a/tools/buildgen/plugins/make_fuzzer_tests.py b/tools/buildgen/plugins/make_fuzzer_tests.py index 1d215e9fe0..ba9825acb9 100644 --- a/tools/buildgen/plugins/make_fuzzer_tests.py +++ b/tools/buildgen/plugins/make_fuzzer_tests.py @@ -49,6 +49,7 @@ def mako_plugin(dictionary): tests.append({ 'name': new_target['name'], 'args': [fn], + 'exclude_iomgrs': ['uv'], 'exclude_configs': ['tsan'], 'uses_polling': False, 'platforms': ['linux'], diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 56aa7bbb65..cebff5f537 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -223,6 +223,8 @@ class CLanguage(object): polling_strategies = (_POLLING_STRATEGIES.get(self.platform, ['all']) if target.get('uses_polling', True) else ['all']) + if self.args.iomgr_platform == 'uv': + polling_strategies = ['all'] for polling_strategy in polling_strategies: env={'GRPC_DEFAULT_SSL_ROOTS_FILE_PATH': _ROOT + '/src/core/lib/tsi/test_creds/ca.pem', diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index f02967e676..8128807299 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -6906,7 +6906,6 @@ ], "headers": [ "test/core/end2end/cq_verifier.h", - "test/core/end2end/cq_verifier_internal.h", "test/core/end2end/fixtures/http_proxy.h", "test/core/end2end/fixtures/proxy.h", "test/core/iomgr/endpoint_tests.h", @@ -6925,9 +6924,6 @@ "src": [ "test/core/end2end/cq_verifier.c", "test/core/end2end/cq_verifier.h", - "test/core/end2end/cq_verifier_internal.h", - "test/core/end2end/cq_verifier_native.c", - "test/core/end2end/cq_verifier_uv.c", "test/core/end2end/fixtures/http_proxy.c", "test/core/end2end/fixtures/http_proxy.h", "test/core/end2end/fixtures/proxy.c", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 41af421b26..6e7226a50a 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -99,7 +99,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "gtest": false, "language": "c", @@ -385,7 +387,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "gtest": false, "language": "c", @@ -407,7 +411,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "gtest": false, "language": "c", @@ -473,7 +479,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "gtest": false, "language": "c", @@ -492,7 +500,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "gtest": false, "language": "c", @@ -510,7 +520,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "gtest": false, "language": "c", @@ -530,7 +542,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "gtest": false, "language": "c", @@ -590,7 +604,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "gtest": false, "language": "c", @@ -1139,7 +1155,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "gtest": false, "language": "c", @@ -1679,7 +1697,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "gtest": false, "language": "c", @@ -1723,273 +1743,13 @@ ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "gtest": false, - "language": "c", - "name": "secure_endpoint_test", - "platforms": [ - "linux", - "mac", - "posix", - "windows" - ] - }, - { - "args": [], - "ci_platforms": [ - "linux", - "mac", - "posix", - "windows" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "gtest": false, - "language": "c", - "name": "sequential_connectivity_test", - "platforms": [ - "linux", - "mac", - "posix", - "windows" - ] - }, - { - "args": [], - "ci_platforms": [ - "linux", - "mac", - "posix", - "windows" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "gtest": false, - "language": "c", - "name": "server_chttp2_test", - "platforms": [ - "linux", - "mac", - "posix", - "windows" - ] - }, - { - "args": [], - "ci_platforms": [ - "linux", - "mac", - "posix", - "windows" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "gtest": false, - "language": "c", - "name": "server_test", - "platforms": [ - "linux", - "mac", - "posix", - "windows" - ] - }, - { - "args": [], - "ci_platforms": [ - "linux", - "mac", - "posix", - "windows" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "gtest": false, - "language": "c", - "name": "set_initial_connect_string_test", - "platforms": [ - "linux", - "mac", - "posix", - "windows" - ] - }, - { - "args": [], - "ci_platforms": [ - "linux", - "mac", - "posix", - "windows" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "gtest": false, - "language": "c", - "name": "sockaddr_resolver_test", - "platforms": [ - "linux", - "mac", - "posix", - "windows" - ] - }, - { - "args": [], - "ci_platforms": [ - "linux", - "mac", - "posix", - "windows" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "gtest": false, - "language": "c", - "name": "sockaddr_utils_test", - "platforms": [ - "linux", - "mac", - "posix", - "windows" - ] - }, - { - "args": [], - "ci_platforms": [ - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "gtest": false, - "language": "c", - "name": "socket_utils_test", - "platforms": [ - "linux", - "mac", - "posix" - ] - }, - { - "args": [], - "ci_platforms": [ - "linux", - "mac", - "posix" - ], - "cpu_cost": 0.5, - "exclude_configs": [], "exclude_iomgrs": [ "uv" ], "flaky": false, "gtest": false, "language": "c", - "name": "tcp_client_posix_test", - "platforms": [ - "linux", - "mac", - "posix" - ] - }, - { - "args": [], - "ci_platforms": [ - "linux", - "mac", - "posix" - ], - "cpu_cost": 0.2, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "gtest": false, - "language": "c", - "name": "tcp_posix_test", - "platforms": [ - "linux", - "mac", - "posix" - ] - }, - { - "args": [], - "ci_platforms": [ - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], - "flaky": false, - "gtest": false, - "language": "c", - "name": "tcp_server_posix_test", - "platforms": [ - "linux", - "mac", - "posix" - ] - }, - { - "args": [], - "ci_platforms": [ - "linux", - "mac", - "posix", - "windows" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "gtest": false, - "language": "c", - "name": "time_averaged_stats_test", - "platforms": [ - "linux", - "mac", - "posix", - "windows" - ] - }, - { - "args": [], - "ci_platforms": [ - "linux", - "mac", - "posix", - "windows" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "gtest": false, - "language": "c", - "name": "timeout_encoding_test", + "name": "secure_endpoint_test", "platforms": [ "linux", "mac", @@ -2013,7 +1773,7 @@ "flaky": false, "gtest": false, "language": "c", - "name": "timer_heap_test", + "name": "sequential_connectivity_test", "platforms": [ "linux", "mac", @@ -2031,13 +1791,11 @@ ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", - "name": "timer_list_test", + "name": "server_chttp2_test", "platforms": [ "linux", "mac", @@ -2059,7 +1817,31 @@ "flaky": false, "gtest": false, "language": "c", - "name": "transport_connectivity_state_test", + "name": "server_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "gtest": false, + "language": "c", + "name": "set_initial_connect_string_test", "platforms": [ "linux", "mac", @@ -2081,7 +1863,7 @@ "flaky": false, "gtest": false, "language": "c", - "name": "transport_metadata_test", + "name": "sockaddr_resolver_test", "platforms": [ "linux", "mac", @@ -2094,7 +1876,8 @@ "ci_platforms": [ "linux", "mac", - "posix" + "posix", + "windows" ], "cpu_cost": 1.0, "exclude_configs": [], @@ -2102,7 +1885,74 @@ "flaky": false, "gtest": false, "language": "c", - "name": "transport_security_test", + "name": "sockaddr_utils_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "gtest": false, + "language": "c", + "name": "socket_utils_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.5, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "gtest": false, + "language": "c", + "name": "tcp_client_posix_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.2, + "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], + "flaky": false, + "gtest": false, + "language": "c", + "name": "tcp_posix_test", "platforms": [ "linux", "mac", @@ -2118,11 +1968,13 @@ ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "gtest": false, "language": "c", - "name": "udp_server_test", + "name": "tcp_server_posix_test", "platforms": [ "linux", "mac", @@ -2143,7 +1995,7 @@ "flaky": false, "gtest": false, "language": "c", - "name": "uri_parser_test", + "name": "time_averaged_stats_test", "platforms": [ "linux", "mac", @@ -2163,9 +2015,9 @@ "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, - "gtest": true, - "language": "c++", - "name": "alarm_cpp_test", + "gtest": false, + "language": "c", + "name": "timeout_encoding_test", "platforms": [ "linux", "mac", @@ -2183,11 +2035,13 @@ ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, - "gtest": true, - "language": "c++", - "name": "async_end2end_test", + "gtest": false, + "language": "c", + "name": "timer_heap_test", "platforms": [ "linux", "mac", @@ -2205,11 +2059,13 @@ ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, - "gtest": true, - "language": "c++", - "name": "auth_property_iterator_test", + "gtest": false, + "language": "c", + "name": "timer_list_test", "platforms": [ "linux", "mac", @@ -2229,9 +2085,9 @@ "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, - "gtest": true, - "language": "c++", - "name": "channel_arguments_test", + "gtest": false, + "language": "c", + "name": "transport_connectivity_state_test", "platforms": [ "linux", "mac", @@ -2251,9 +2107,9 @@ "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, - "gtest": true, - "language": "c++", - "name": "cli_call_test", + "gtest": false, + "language": "c", + "name": "transport_metadata_test", "platforms": [ "linux", "mac", @@ -2268,13 +2124,33 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, - "gtest": true, - "language": "c++", - "name": "client_crash_test", + "gtest": false, + "language": "c", + "name": "transport_security_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "gtest": false, + "language": "c", + "name": "udp_server_test", "platforms": [ "linux", "mac", @@ -2293,9 +2169,9 @@ "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, - "gtest": true, - "language": "c++", - "name": "codegen_test_full", + "gtest": false, + "language": "c", + "name": "uri_parser_test", "platforms": [ "linux", "mac", @@ -2317,7 +2193,7 @@ "flaky": false, "gtest": true, "language": "c++", - "name": "codegen_test_minimal", + "name": "alarm_cpp_test", "platforms": [ "linux", "mac", @@ -2339,7 +2215,7 @@ "flaky": false, "gtest": true, "language": "c++", - "name": "credentials_test", + "name": "async_end2end_test", "platforms": [ "linux", "mac", @@ -2361,7 +2237,7 @@ "flaky": false, "gtest": true, "language": "c++", - "name": "cxx_byte_buffer_test", + "name": "auth_property_iterator_test", "platforms": [ "linux", "mac", @@ -2383,7 +2259,7 @@ "flaky": false, "gtest": true, "language": "c++", - "name": "cxx_slice_test", + "name": "channel_arguments_test", "platforms": [ "linux", "mac", @@ -2405,7 +2281,7 @@ "flaky": false, "gtest": true, "language": "c++", - "name": "cxx_string_ref_test", + "name": "cli_call_test", "platforms": [ "linux", "mac", @@ -2418,21 +2294,19 @@ "ci_platforms": [ "linux", "mac", - "posix", - "windows" + "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "gtest": true, "language": "c++", - "name": "cxx_time_test", + "name": "client_crash_test", "platforms": [ "linux", "mac", - "posix", - "windows" + "posix" ] }, { @@ -2443,13 +2317,13 @@ "posix", "windows" ], - "cpu_cost": 0.5, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "gtest": true, "language": "c++", - "name": "end2end_test", + "name": "codegen_test_full", "platforms": [ "linux", "mac", @@ -2471,7 +2345,7 @@ "flaky": false, "gtest": true, "language": "c++", - "name": "filter_end2end_test", + "name": "codegen_test_minimal", "platforms": [ "linux", "mac", @@ -2493,7 +2367,7 @@ "flaky": false, "gtest": true, "language": "c++", - "name": "generic_end2end_test", + "name": "credentials_test", "platforms": [ "linux", "mac", @@ -2515,7 +2389,7 @@ "flaky": false, "gtest": true, "language": "c++", - "name": "golden_file_test", + "name": "cxx_byte_buffer_test", "platforms": [ "linux", "mac", @@ -2537,7 +2411,7 @@ "flaky": false, "gtest": true, "language": "c++", - "name": "grpc_tool_test", + "name": "cxx_slice_test", "platforms": [ "linux", "mac", @@ -2559,7 +2433,7 @@ "flaky": false, "gtest": true, "language": "c++", - "name": "grpclb_api_test", + "name": "cxx_string_ref_test", "platforms": [ "linux", "mac", @@ -2579,9 +2453,9 @@ "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, - "gtest": false, + "gtest": true, "language": "c++", - "name": "grpclb_test", + "name": "cxx_time_test", "platforms": [ "linux", "mac", @@ -2597,13 +2471,13 @@ "posix", "windows" ], - "cpu_cost": 1.0, + "cpu_cost": 0.5, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, "gtest": true, "language": "c++", - "name": "hybrid_end2end_test", + "name": "end2end_test", "platforms": [ "linux", "mac", @@ -2616,19 +2490,21 @@ "ci_platforms": [ "linux", "mac", - "posix" + "posix", + "windows" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, - "gtest": false, + "gtest": true, "language": "c++", - "name": "interop_test", + "name": "filter_end2end_test", "platforms": [ "linux", "mac", - "posix" + "posix", + "windows" ] }, { @@ -2645,7 +2521,7 @@ "flaky": false, "gtest": true, "language": "c++", - "name": "mock_test", + "name": "generic_end2end_test", "platforms": [ "linux", "mac", @@ -2667,7 +2543,7 @@ "flaky": false, "gtest": true, "language": "c++", - "name": "proto_server_reflection_test", + "name": "golden_file_test", "platforms": [ "linux", "mac", @@ -2680,19 +2556,21 @@ "ci_platforms": [ "linux", "mac", - "posix" + "posix", + "windows" ], - "cpu_cost": 0.5, + "cpu_cost": 1.0, "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, - "gtest": false, + "gtest": true, "language": "c++", - "name": "qps_openloop_test", + "name": "grpc_tool_test", "platforms": [ "linux", "mac", - "posix" + "posix", + "windows" ] }, { @@ -2709,7 +2587,7 @@ "flaky": false, "gtest": true, "language": "c++", - "name": "secure_auth_context_test", + "name": "grpclb_api_test", "platforms": [ "linux", "mac", @@ -2722,7 +2600,8 @@ "ci_platforms": [ "linux", "mac", - "posix" + "posix", + "windows" ], "cpu_cost": 1.0, "exclude_configs": [], @@ -2730,11 +2609,12 @@ "flaky": false, "gtest": false, "language": "c++", - "name": "secure_sync_unary_ping_pong_test", + "name": "grpclb_test", "platforms": [ "linux", "mac", - "posix" + "posix", + "windows" ] }, { @@ -2751,7 +2631,7 @@ "flaky": false, "gtest": true, "language": "c++", - "name": "server_builder_plugin_test", + "name": "hybrid_end2end_test", "platforms": [ "linux", "mac", @@ -2770,9 +2650,157 @@ "exclude_configs": [], "exclude_iomgrs": [], "flaky": false, - "gtest": true, + "gtest": false, "language": "c++", - "name": "server_crash_test", + "name": "interop_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "gtest": true, + "language": "c++", + "name": "mock_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "gtest": true, + "language": "c++", + "name": "proto_server_reflection_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.5, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "gtest": false, + "language": "c++", + "name": "qps_openloop_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "gtest": true, + "language": "c++", + "name": "secure_auth_context_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "gtest": false, + "language": "c++", + "name": "secure_sync_unary_ping_pong_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "gtest": true, + "language": "c++", + "name": "server_builder_plugin_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "gtest": true, + "language": "c++", + "name": "server_crash_test", "platforms": [ "linux", "mac", @@ -2897,7 +2925,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "gtest": false, "language": "c", @@ -2919,7 +2949,9 @@ ], "cpu_cost": 0.2, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "gtest": false, "language": "c", @@ -2941,7 +2973,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "gtest": false, "language": "c", @@ -2963,7 +2997,9 @@ ], "cpu_cost": 0.2, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "gtest": false, "language": "c", @@ -2985,7 +3021,9 @@ ], "cpu_cost": 0.2, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "gtest": false, "language": "c", @@ -3007,7 +3045,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "gtest": false, "language": "c", @@ -3029,7 +3069,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "gtest": false, "language": "c", @@ -3051,7 +3093,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "gtest": false, "language": "c", @@ -3073,7 +3117,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "gtest": false, "language": "c", @@ -3095,7 +3141,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "gtest": false, "language": "c", @@ -4685,6 +4733,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -4707,6 +4756,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -4729,6 +4779,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -4751,6 +4802,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -4773,6 +4825,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -4795,6 +4848,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -4817,6 +4871,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -4839,6 +4894,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -4861,6 +4917,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -4883,6 +4940,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -4905,6 +4963,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_census_test", @@ -4927,6 +4988,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -4949,6 +5011,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -4971,6 +5034,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -4993,6 +5057,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -5015,6 +5080,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -5037,6 +5103,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -5059,6 +5126,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -5081,6 +5149,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -5103,6 +5172,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -5125,6 +5195,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -5147,6 +5218,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -5169,6 +5241,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -5191,6 +5264,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -5213,6 +5287,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -5235,6 +5310,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -5257,6 +5333,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -5279,6 +5356,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -5301,6 +5379,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -5323,6 +5402,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -5345,6 +5425,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -5367,6 +5448,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -5389,6 +5471,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -5411,6 +5494,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -5433,6 +5517,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -5455,6 +5540,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -5477,6 +5563,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -5499,6 +5586,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -5521,6 +5609,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -5543,6 +5632,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -5565,6 +5655,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -5587,6 +5678,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -5609,6 +5701,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -5631,6 +5724,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_test", @@ -5653,6 +5747,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -5675,6 +5770,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -5697,6 +5793,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -5719,6 +5816,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -5741,6 +5839,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -5763,6 +5862,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -5785,6 +5885,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -5807,6 +5908,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -5829,6 +5931,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -5851,6 +5954,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -5873,6 +5977,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -5895,6 +6002,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -5917,6 +6025,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -5939,6 +6048,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -5961,6 +6071,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -5983,6 +6094,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -6005,6 +6117,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -6027,6 +6140,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -6049,6 +6163,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -6071,6 +6186,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -6093,6 +6209,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -6115,6 +6232,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -6137,6 +6255,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -6159,6 +6278,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -6181,6 +6301,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -6203,6 +6324,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -6225,6 +6347,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -6247,6 +6370,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -6269,6 +6393,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -6291,6 +6416,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -6313,6 +6439,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -6335,6 +6462,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -6357,6 +6485,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -6379,6 +6508,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -6401,6 +6531,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -6423,6 +6554,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -6445,6 +6577,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -6467,6 +6600,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -6489,6 +6623,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -6511,6 +6646,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -6533,6 +6669,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -6555,6 +6692,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -6577,6 +6715,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -6599,6 +6738,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_test", @@ -6620,6 +6760,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -6641,6 +6782,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -6662,6 +6804,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -6683,6 +6826,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -6704,6 +6848,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -6725,6 +6870,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -6746,6 +6892,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -6767,6 +6914,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -6788,6 +6936,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -6809,6 +6958,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -6830,6 +6980,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -6851,6 +7004,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -6872,6 +7026,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -6893,6 +7048,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -6914,6 +7070,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -6935,6 +7092,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -6956,6 +7114,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -6977,6 +7136,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -6998,6 +7158,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -7019,6 +7180,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -7040,6 +7202,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -7061,6 +7224,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -7082,6 +7246,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -7103,6 +7268,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -7124,6 +7290,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -7145,6 +7312,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -7166,6 +7334,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -7187,6 +7356,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -7208,6 +7378,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -7229,6 +7400,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -7250,6 +7422,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -7271,6 +7444,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -7292,6 +7466,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -7313,6 +7488,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -7334,6 +7510,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -7355,6 +7532,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -7376,6 +7554,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -7397,6 +7576,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -7418,6 +7598,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -7439,6 +7620,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -7460,6 +7642,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -7481,6 +7664,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -7502,6 +7686,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -7523,6 +7708,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_fakesec_test", @@ -7544,6 +7730,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -7564,6 +7753,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -7584,6 +7776,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -7604,6 +7799,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -7624,6 +7822,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -7644,6 +7845,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -7664,6 +7868,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -7684,6 +7891,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -7704,6 +7914,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -7724,6 +7937,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -7744,6 +7960,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -7764,6 +7983,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -7784,6 +8006,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -7804,6 +8029,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -7824,6 +8052,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -7844,6 +8075,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -7864,6 +8098,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -7884,6 +8121,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -7904,6 +8144,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -7924,6 +8167,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -7944,6 +8190,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -7964,6 +8213,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -7984,6 +8236,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -8004,6 +8259,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -8024,6 +8282,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -8044,6 +8305,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -8064,6 +8328,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -8084,6 +8351,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -8104,6 +8374,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -8124,6 +8397,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -8144,6 +8420,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -8164,6 +8443,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -8184,6 +8466,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -8204,6 +8489,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -8224,6 +8512,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -8244,6 +8535,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -8264,6 +8558,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -8284,6 +8581,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -8304,6 +8604,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_test", @@ -8325,6 +8628,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -8347,6 +8651,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -8369,6 +8674,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -8391,6 +8697,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -8413,6 +8720,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -8435,6 +8743,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -8457,6 +8766,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -8479,6 +8789,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -8501,6 +8812,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -8523,6 +8835,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -8545,6 +8858,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full_test", @@ -8567,6 +8883,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -8589,6 +8906,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -8611,6 +8929,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -8633,6 +8952,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -8655,6 +8975,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -8677,6 +8998,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -8699,6 +9021,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -8721,6 +9044,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -8743,6 +9067,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -8765,6 +9090,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -8787,6 +9113,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -8809,6 +9136,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -8831,6 +9159,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -8853,6 +9182,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -8875,6 +9205,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -8897,6 +9228,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -8919,6 +9251,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -8941,6 +9274,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -8963,6 +9297,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -8985,6 +9320,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -9007,6 +9343,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -9029,6 +9366,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -9051,6 +9389,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -9073,6 +9412,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -9095,6 +9435,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -9117,6 +9458,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -9139,6 +9481,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -9161,6 +9504,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -9183,6 +9527,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -9205,6 +9550,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -9227,6 +9573,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -9249,6 +9596,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -9271,6 +9619,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_test", @@ -9290,6 +9639,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9306,6 +9658,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9322,6 +9677,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9338,6 +9696,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9354,6 +9715,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9370,6 +9734,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9386,6 +9753,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9402,6 +9772,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9418,6 +9791,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9434,6 +9810,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9450,6 +9829,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9466,6 +9848,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9482,6 +9867,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9498,6 +9886,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9514,6 +9905,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9530,6 +9924,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9546,6 +9943,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9562,6 +9962,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9578,6 +9981,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9594,6 +10000,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9610,6 +10019,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9626,6 +10038,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9642,6 +10057,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9658,6 +10076,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9674,6 +10095,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9690,6 +10114,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9706,6 +10133,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9722,6 +10152,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9738,6 +10171,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9754,6 +10190,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9770,6 +10209,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9786,6 +10228,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9802,6 +10247,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9818,6 +10266,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9834,6 +10285,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9850,6 +10304,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9866,6 +10323,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9882,6 +10342,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9898,6 +10361,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9914,6 +10380,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9930,6 +10399,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9946,6 +10418,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9962,6 +10437,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9978,6 +10456,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_test", @@ -9997,6 +10478,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10019,6 +10501,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10041,6 +10524,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10063,6 +10547,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10085,6 +10570,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10107,6 +10593,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10129,6 +10616,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10151,6 +10639,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10173,6 +10662,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10195,6 +10685,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10217,6 +10708,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10239,6 +10733,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10261,6 +10756,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10283,6 +10779,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10305,6 +10802,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10327,6 +10825,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10349,6 +10848,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10371,6 +10871,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10393,6 +10894,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10415,6 +10917,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10437,6 +10940,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10459,6 +10963,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10481,6 +10986,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10503,6 +11009,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10525,6 +11032,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10547,6 +11055,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10569,6 +11078,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10591,6 +11101,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10613,6 +11124,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10635,6 +11147,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10657,6 +11170,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10679,6 +11193,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10701,6 +11216,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10723,6 +11239,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10745,6 +11262,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10767,6 +11285,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10789,6 +11308,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10811,6 +11331,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10833,6 +11354,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10855,6 +11377,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10877,6 +11400,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10899,6 +11423,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_test", @@ -10920,6 +11445,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -10941,6 +11469,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -10962,6 +11493,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -10983,6 +11517,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11004,6 +11541,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11025,6 +11565,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11046,6 +11589,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11067,6 +11613,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11088,6 +11637,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11109,6 +11661,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11130,6 +11685,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11151,6 +11709,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11172,6 +11733,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11193,6 +11757,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11214,6 +11781,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11235,6 +11805,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11256,6 +11829,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11277,6 +11853,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11298,6 +11877,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11319,6 +11901,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11340,6 +11925,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11361,6 +11949,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11382,6 +11973,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11403,6 +11997,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11424,6 +12021,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11445,6 +12045,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11466,6 +12069,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11487,6 +12093,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11508,6 +12117,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11529,6 +12141,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11550,6 +12165,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11571,6 +12189,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11592,6 +12213,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11613,6 +12237,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11634,6 +12261,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11655,6 +12285,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11676,6 +12309,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11697,6 +12333,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11718,6 +12357,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11739,6 +12381,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11760,6 +12405,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11781,6 +12429,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11802,6 +12453,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11823,6 +12477,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_test", @@ -11845,6 +12502,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -11867,6 +12525,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -11889,6 +12548,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -11911,6 +12571,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -11933,6 +12594,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -11955,6 +12617,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -11977,6 +12640,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -11999,6 +12663,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12021,6 +12686,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12043,6 +12709,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12065,6 +12732,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12087,6 +12757,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12109,6 +12780,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12131,6 +12803,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12153,6 +12826,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12175,6 +12849,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12197,6 +12872,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12219,6 +12895,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12241,6 +12918,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12263,6 +12941,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12285,6 +12964,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12307,6 +12987,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12329,6 +13010,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12351,6 +13033,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12373,6 +13056,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12395,6 +13079,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12417,6 +13102,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12439,6 +13125,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12461,6 +13148,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12483,6 +13171,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12505,6 +13194,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12527,6 +13217,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12549,6 +13240,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12571,6 +13263,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12593,6 +13286,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12615,6 +13309,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12637,6 +13332,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12659,6 +13355,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12681,6 +13378,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12703,6 +13401,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12725,6 +13424,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12747,6 +13447,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12769,6 +13470,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12791,6 +13493,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_test", @@ -12812,6 +13515,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -12833,6 +13539,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -12854,6 +13563,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -12875,6 +13587,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -12896,6 +13611,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -12917,6 +13635,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -12938,6 +13659,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -12959,6 +13683,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -12980,6 +13707,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13001,6 +13731,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13022,6 +13755,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13043,6 +13779,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13064,6 +13803,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13085,6 +13827,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13106,6 +13851,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13127,6 +13875,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13148,6 +13899,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13169,6 +13923,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13190,6 +13947,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13211,6 +13971,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13232,6 +13995,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13253,6 +14019,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13274,6 +14043,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13295,6 +14067,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13316,6 +14091,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13337,6 +14115,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13358,6 +14139,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13379,6 +14163,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13400,6 +14187,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13421,6 +14211,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13442,6 +14235,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13463,6 +14259,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13484,6 +14283,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13505,6 +14307,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13526,6 +14331,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13547,6 +14355,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13568,6 +14379,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13589,6 +14403,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13610,6 +14427,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13631,6 +14451,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13652,6 +14475,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13673,6 +14499,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13694,6 +14523,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13715,6 +14547,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_oauth2_test", @@ -13736,6 +14571,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -13757,6 +14595,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -13778,6 +14619,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -13799,6 +14643,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -13820,6 +14667,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -13841,6 +14691,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -13862,6 +14715,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -13883,6 +14739,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -13904,6 +14763,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -13925,6 +14787,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -13946,6 +14811,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -13967,6 +14835,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -13988,6 +14859,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -14009,6 +14883,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -14030,6 +14907,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -14051,6 +14931,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -14072,6 +14955,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -14093,6 +14979,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -14114,6 +15003,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -14135,6 +15027,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -14156,6 +15051,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -14177,6 +15075,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -14198,6 +15099,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -14219,6 +15123,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -14240,6 +15147,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -14261,6 +15171,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -14282,6 +15195,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -14303,6 +15219,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -14324,6 +15243,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -14345,6 +15267,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -14366,6 +15291,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -14387,6 +15315,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -14408,6 +15339,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -14429,6 +15363,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -14450,6 +15387,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -14471,6 +15411,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -14492,6 +15435,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -14513,6 +15459,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_test", @@ -14534,6 +15483,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -14555,6 +15507,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -14576,6 +15531,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -14597,6 +15555,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -14618,6 +15579,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -14639,6 +15603,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -14660,6 +15627,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -14681,6 +15651,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -14702,6 +15675,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -14723,6 +15699,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -14744,6 +15723,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -14765,6 +15747,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -14786,6 +15771,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -14807,6 +15795,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -14828,6 +15819,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -14849,6 +15843,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -14870,6 +15867,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -14891,6 +15891,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -14912,6 +15915,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -14933,6 +15939,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -14954,6 +15963,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -14975,6 +15987,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -14996,6 +16011,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -15017,6 +16035,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -15038,6 +16059,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -15059,6 +16083,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -15080,6 +16107,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -15101,6 +16131,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -15122,6 +16155,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -15143,6 +16179,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -15164,6 +16203,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -15185,6 +16227,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -15206,6 +16251,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -15227,6 +16275,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -15248,6 +16299,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -15269,6 +16323,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -15290,6 +16347,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -15311,6 +16371,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -15332,6 +16395,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_test", @@ -15353,6 +16419,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -15374,6 +16443,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -15395,6 +16467,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -15416,6 +16491,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -15437,6 +16515,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -15458,6 +16539,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -15479,6 +16563,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -15500,6 +16587,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -15521,6 +16611,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -15542,6 +16635,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -15563,6 +16659,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -15584,6 +16683,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -15605,6 +16707,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -15626,6 +16731,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -15647,6 +16755,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -15668,6 +16779,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -15689,6 +16803,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -15710,6 +16827,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -15731,6 +16851,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -15752,6 +16875,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -15773,6 +16899,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -15794,6 +16923,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -15815,6 +16947,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -15836,6 +16971,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -15857,6 +16995,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -15878,6 +17019,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -15899,6 +17043,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -15920,6 +17067,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -15941,6 +17091,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -15962,6 +17115,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -15983,6 +17139,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -16004,6 +17163,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -16025,6 +17187,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -16046,6 +17211,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -16067,6 +17235,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -16088,6 +17259,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -16109,6 +17283,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_test", @@ -16130,6 +17307,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16151,6 +17331,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16172,6 +17355,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16193,6 +17379,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16214,6 +17403,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16235,6 +17427,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16256,6 +17451,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16277,6 +17475,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16298,6 +17499,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16319,6 +17523,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16340,6 +17547,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16361,6 +17571,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16382,6 +17595,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16403,6 +17619,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16424,6 +17643,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16445,6 +17667,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16466,6 +17691,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16487,6 +17715,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16508,6 +17739,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16529,6 +17763,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16550,6 +17787,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16571,6 +17811,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16592,6 +17835,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16613,6 +17859,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16634,6 +17883,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16655,6 +17907,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16676,6 +17931,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16697,6 +17955,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16718,6 +17979,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16739,6 +18003,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16760,6 +18027,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16781,6 +18051,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16802,6 +18075,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16823,6 +18099,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16844,6 +18123,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16865,6 +18147,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16886,6 +18171,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16907,6 +18195,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16928,6 +18219,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_test", @@ -16950,6 +18244,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -16972,6 +18267,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -16994,6 +18290,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17016,6 +18313,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17038,6 +18336,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17060,6 +18359,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17082,6 +18382,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17104,6 +18405,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17126,6 +18428,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17148,6 +18451,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17170,6 +18474,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17192,6 +18499,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17214,6 +18522,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17236,6 +18545,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17258,6 +18568,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17280,6 +18591,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17302,6 +18614,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17324,6 +18637,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17346,6 +18660,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17368,6 +18683,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17390,6 +18706,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17412,6 +18729,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17434,6 +18752,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17456,6 +18775,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17478,6 +18798,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17500,6 +18821,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17522,6 +18844,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17544,6 +18867,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17566,6 +18890,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17588,6 +18913,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17610,6 +18936,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17632,6 +18959,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17654,6 +18982,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17676,6 +19005,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17698,6 +19028,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17720,6 +19051,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17742,6 +19074,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17764,6 +19097,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17786,6 +19120,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17808,6 +19143,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17830,6 +19166,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17852,6 +19189,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17874,6 +19212,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17896,6 +19235,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_test", @@ -17918,6 +19258,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -17940,6 +19281,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -17962,6 +19304,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -17984,6 +19327,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18006,6 +19350,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18028,6 +19373,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18050,6 +19396,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18072,6 +19419,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18094,6 +19442,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18116,6 +19465,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18138,6 +19488,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18160,6 +19513,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18182,6 +19536,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18204,6 +19559,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18226,6 +19582,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18248,6 +19605,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18270,6 +19628,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18292,6 +19651,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18314,6 +19674,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18336,6 +19697,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18358,6 +19720,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18380,6 +19743,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18402,6 +19766,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18424,6 +19789,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18446,6 +19812,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18468,6 +19835,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18490,6 +19858,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18512,6 +19881,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18534,6 +19904,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18556,6 +19927,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18578,6 +19950,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18600,6 +19973,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18622,6 +19996,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18644,6 +20019,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18666,6 +20042,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18688,6 +20065,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18710,6 +20088,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18732,6 +20111,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18754,6 +20134,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18776,6 +20157,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18798,6 +20180,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18820,6 +20203,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18842,6 +20226,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18864,6 +20249,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_ssl_cert_test", @@ -18885,6 +20271,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -18906,6 +20295,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -18927,6 +20319,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -18948,6 +20343,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -18969,6 +20367,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -18990,6 +20391,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19011,6 +20415,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19032,6 +20439,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19053,6 +20463,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19074,6 +20487,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19095,6 +20511,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19116,6 +20535,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19137,6 +20559,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19158,6 +20583,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19179,6 +20607,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19200,6 +20631,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19221,6 +20655,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19242,6 +20679,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19263,6 +20703,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19284,6 +20727,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19305,6 +20751,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19326,6 +20775,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19347,6 +20799,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19368,6 +20823,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19389,6 +20847,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19410,6 +20871,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19431,6 +20895,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19452,6 +20919,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19473,6 +20943,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19494,6 +20967,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19515,6 +20991,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19536,6 +21015,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19557,6 +21039,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19578,6 +21063,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19599,6 +21087,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19620,6 +21111,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19641,6 +21135,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19662,6 +21159,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", @@ -19683,6 +21183,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -19703,6 +21206,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -19723,6 +21229,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -19743,6 +21252,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -19763,6 +21275,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -19783,6 +21298,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -19803,6 +21321,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -19823,6 +21344,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -19843,6 +21367,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -19863,6 +21390,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -19883,6 +21413,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -19903,6 +21436,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -19923,6 +21459,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -19943,6 +21482,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -19963,6 +21505,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -19983,6 +21528,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -20003,6 +21551,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -20023,6 +21574,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -20043,6 +21597,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -20063,6 +21620,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -20083,6 +21643,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -20103,6 +21666,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -20123,6 +21689,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -20143,6 +21712,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -20163,6 +21735,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -20183,6 +21758,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -20203,6 +21781,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -20223,6 +21804,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -20243,6 +21827,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -20263,6 +21850,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -20283,6 +21873,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -20303,6 +21896,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -20323,6 +21919,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -20343,6 +21942,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -20363,6 +21965,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -20383,6 +21988,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -20403,6 +22011,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -20423,6 +22034,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -20443,6 +22057,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -20463,6 +22080,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -20483,6 +22103,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -20503,6 +22126,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -20523,6 +22149,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_test", @@ -20544,6 +22173,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -20566,6 +22196,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -20588,6 +22219,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -20610,6 +22242,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -20632,6 +22265,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -20654,6 +22288,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -20676,6 +22311,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -20698,6 +22334,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -20720,6 +22357,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -20742,6 +22380,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -20764,6 +22405,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -20786,6 +22428,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -20808,6 +22451,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -20830,6 +22474,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -20852,6 +22497,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -20874,6 +22520,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -20896,6 +22543,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -20918,6 +22566,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -20940,6 +22589,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -20962,6 +22612,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -20984,6 +22635,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -21006,6 +22658,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -21028,6 +22681,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -21050,6 +22704,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -21072,6 +22727,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -21094,6 +22750,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -21116,6 +22773,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -21138,6 +22796,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -21160,6 +22819,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -21182,6 +22842,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -21204,6 +22865,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -21226,6 +22888,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -21248,6 +22911,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -21270,6 +22934,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -21292,6 +22957,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -21314,6 +22980,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -21336,6 +23003,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -21358,6 +23026,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -21380,6 +23049,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -21402,6 +23072,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -21424,6 +23095,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -21446,6 +23118,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -21468,6 +23141,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_census_nosec_test", @@ -21490,6 +23164,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -21512,6 +23187,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -21534,6 +23210,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -21556,6 +23233,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -21578,6 +23256,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -21600,6 +23279,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -21622,6 +23302,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -21644,6 +23325,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -21666,6 +23348,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -21688,6 +23371,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -21710,6 +23396,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -21732,6 +23419,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -21754,6 +23442,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -21776,6 +23465,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -21798,6 +23488,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -21820,6 +23511,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -21842,6 +23534,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -21864,6 +23557,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -21886,6 +23580,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -21908,6 +23603,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -21930,6 +23626,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -21952,6 +23649,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -21974,6 +23672,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -21996,6 +23695,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -22018,6 +23718,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -22040,6 +23741,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -22062,6 +23764,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -22084,6 +23787,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -22106,6 +23810,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -22128,6 +23833,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -22150,6 +23856,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -22172,6 +23879,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -22194,6 +23902,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -22216,6 +23925,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -22238,6 +23948,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -22260,6 +23971,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -22282,6 +23994,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -22304,6 +24017,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -22326,6 +24040,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -22348,6 +24063,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -22370,6 +24086,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -22392,6 +24109,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -22414,6 +24132,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_compress_nosec_test", @@ -22435,6 +24154,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -22455,6 +24177,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -22475,6 +24200,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -22495,6 +24223,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -22515,6 +24246,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -22535,6 +24269,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -22555,6 +24292,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -22575,6 +24315,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -22595,6 +24338,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -22615,6 +24361,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -22635,6 +24384,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -22655,6 +24407,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -22675,6 +24430,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -22695,6 +24453,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -22715,6 +24476,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -22735,6 +24499,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -22755,6 +24522,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -22775,6 +24545,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -22795,6 +24568,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -22815,6 +24591,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -22835,6 +24614,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -22855,6 +24637,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -22875,6 +24660,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -22895,6 +24683,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -22915,6 +24706,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -22935,6 +24729,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -22955,6 +24752,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -22975,6 +24775,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -22995,6 +24798,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -23015,6 +24821,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -23035,6 +24844,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -23055,6 +24867,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -23075,6 +24890,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -23095,6 +24913,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -23115,6 +24936,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -23135,6 +24959,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -23155,6 +24982,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -23175,6 +25005,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_fd_nosec_test", @@ -23196,6 +25029,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23218,6 +25052,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23240,6 +25075,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23262,6 +25098,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23284,6 +25121,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23306,6 +25144,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23328,6 +25167,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23350,6 +25190,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23372,6 +25213,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23394,6 +25236,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23416,6 +25261,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23438,6 +25284,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23460,6 +25307,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23482,6 +25330,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23504,6 +25353,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23526,6 +25376,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23548,6 +25399,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23570,6 +25422,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23592,6 +25445,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23614,6 +25468,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23636,6 +25491,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23658,6 +25514,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23680,6 +25537,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23702,6 +25560,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23724,6 +25583,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23746,6 +25606,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23768,6 +25629,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23790,6 +25652,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23812,6 +25675,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23834,6 +25698,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23856,6 +25721,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23878,6 +25744,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23900,6 +25767,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23922,6 +25790,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23944,6 +25813,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23966,6 +25836,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -23988,6 +25859,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -24010,6 +25882,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -24032,6 +25905,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -24054,6 +25928,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -24076,6 +25951,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -24098,6 +25974,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -24120,6 +25997,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full_nosec_test", @@ -24139,6 +26017,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24155,6 +26036,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24171,6 +26055,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24187,6 +26074,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24203,6 +26093,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24219,6 +26112,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24235,6 +26131,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24251,6 +26150,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24267,6 +26169,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24283,6 +26188,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24299,6 +26207,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24315,6 +26226,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24331,6 +26245,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24347,6 +26264,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24363,6 +26283,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24379,6 +26302,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24395,6 +26321,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24411,6 +26340,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24427,6 +26359,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24443,6 +26378,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24459,6 +26397,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24475,6 +26416,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24491,6 +26435,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24507,6 +26454,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24523,6 +26473,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24539,6 +26492,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24555,6 +26511,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24571,6 +26530,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24587,6 +26549,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24603,6 +26568,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24619,6 +26587,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24635,6 +26606,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24651,6 +26625,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24667,6 +26644,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24683,6 +26663,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24699,6 +26682,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24715,6 +26701,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24731,6 +26720,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24747,6 +26739,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24763,6 +26758,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24779,6 +26777,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24795,6 +26796,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24811,6 +26815,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+pipe_nosec_test", @@ -24830,6 +26837,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -24852,6 +26860,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -24874,6 +26883,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -24896,6 +26906,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -24918,6 +26929,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -24940,6 +26952,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -24962,6 +26975,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -24984,6 +26998,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25006,6 +27021,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25028,6 +27044,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25050,6 +27069,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25072,6 +27092,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25094,6 +27115,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25116,6 +27138,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25138,6 +27161,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25160,6 +27184,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25182,6 +27207,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25204,6 +27230,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25226,6 +27253,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25248,6 +27276,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25270,6 +27299,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25292,6 +27322,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25314,6 +27345,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25336,6 +27368,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25358,6 +27391,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25380,6 +27414,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25402,6 +27437,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25424,6 +27460,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25446,6 +27483,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25468,6 +27506,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25490,6 +27529,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25512,6 +27552,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25534,6 +27575,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25556,6 +27598,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25578,6 +27621,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25600,6 +27644,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25622,6 +27667,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25644,6 +27690,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25666,6 +27713,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25688,6 +27736,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25710,6 +27759,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_full+trace_nosec_test", @@ -25731,6 +27781,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -25752,6 +27805,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -25773,6 +27829,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -25794,6 +27853,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -25815,6 +27877,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -25836,6 +27901,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -25857,6 +27925,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -25878,6 +27949,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -25899,6 +27973,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -25920,6 +27997,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -25941,6 +28021,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -25962,6 +28045,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -25983,6 +28069,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -26004,6 +28093,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -26025,6 +28117,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -26046,6 +28141,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -26067,6 +28165,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -26088,6 +28189,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -26109,6 +28213,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -26130,6 +28237,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -26151,6 +28261,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -26172,6 +28285,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -26193,6 +28309,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -26214,6 +28333,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -26235,6 +28357,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -26256,6 +28381,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -26277,6 +28405,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -26298,6 +28429,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -26319,6 +28453,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -26340,6 +28477,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -26361,6 +28501,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -26382,6 +28525,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -26403,6 +28549,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -26424,6 +28573,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -26445,6 +28597,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -26466,6 +28621,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -26487,6 +28645,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -26508,6 +28669,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -26529,6 +28693,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -26550,6 +28717,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -26571,6 +28741,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -26592,6 +28765,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -26613,6 +28789,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_http_proxy_nosec_test", @@ -26635,6 +28814,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -26657,6 +28837,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -26679,6 +28860,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -26701,6 +28883,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -26723,6 +28906,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -26745,6 +28929,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -26767,6 +28952,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -26789,6 +28975,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -26811,6 +28998,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -26833,6 +29021,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -26855,6 +29046,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -26877,6 +29069,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -26899,6 +29092,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -26921,6 +29115,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -26943,6 +29138,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -26965,6 +29161,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -26987,6 +29184,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -27009,6 +29207,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -27031,6 +29230,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -27053,6 +29253,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -27075,6 +29276,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -27097,6 +29299,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -27119,6 +29322,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -27141,6 +29345,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -27163,6 +29368,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -27185,6 +29391,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -27207,6 +29414,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -27229,6 +29437,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -27251,6 +29460,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -27273,6 +29483,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -27295,6 +29506,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -27317,6 +29529,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -27339,6 +29552,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -27361,6 +29575,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -27383,6 +29598,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -27405,6 +29621,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -27427,6 +29644,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -27449,6 +29667,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -27471,6 +29690,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -27493,6 +29713,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -27515,6 +29736,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -27537,6 +29759,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -27559,6 +29782,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "language": "c", "name": "h2_load_reporting_nosec_test", @@ -27580,6 +29804,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -27601,6 +29828,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -27622,6 +29852,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -27643,6 +29876,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -27664,6 +29900,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -27685,6 +29924,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -27706,6 +29948,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -27727,6 +29972,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -27748,6 +29996,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -27769,6 +30020,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -27790,6 +30044,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -27811,6 +30068,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -27832,6 +30092,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -27853,6 +30116,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -27874,6 +30140,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -27895,6 +30164,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -27916,6 +30188,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -27937,6 +30212,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -27958,6 +30236,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -27979,6 +30260,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -28000,6 +30284,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -28021,6 +30308,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -28042,6 +30332,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -28063,6 +30356,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -28084,6 +30380,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -28105,6 +30404,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -28126,6 +30428,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -28147,6 +30452,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -28168,6 +30476,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -28189,6 +30500,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -28210,6 +30524,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -28231,6 +30548,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -28252,6 +30572,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -28273,6 +30596,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -28294,6 +30620,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -28315,6 +30644,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -28336,6 +30668,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_proxy_nosec_test", @@ -28357,6 +30692,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -28378,6 +30716,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -28399,6 +30740,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -28420,6 +30764,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -28441,6 +30788,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -28462,6 +30812,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -28483,6 +30836,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -28504,6 +30860,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -28525,6 +30884,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -28546,6 +30908,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -28567,6 +30932,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -28588,6 +30956,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -28609,6 +30980,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -28630,6 +31004,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -28651,6 +31028,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -28672,6 +31052,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -28693,6 +31076,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -28714,6 +31100,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -28735,6 +31124,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -28756,6 +31148,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -28777,6 +31172,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -28798,6 +31196,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -28819,6 +31220,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -28840,6 +31244,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -28861,6 +31268,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -28882,6 +31292,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -28903,6 +31316,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -28924,6 +31340,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -28945,6 +31364,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -28966,6 +31388,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -28987,6 +31412,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -29008,6 +31436,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -29029,6 +31460,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -29050,6 +31484,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -29071,6 +31508,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -29092,6 +31532,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -29113,6 +31556,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -29134,6 +31580,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_nosec_test", @@ -29155,6 +31604,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29176,6 +31628,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29197,6 +31652,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29218,6 +31676,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29239,6 +31700,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29260,6 +31724,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29281,6 +31748,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29302,6 +31772,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29323,6 +31796,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29344,6 +31820,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29365,6 +31844,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29386,6 +31868,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29407,6 +31892,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29428,6 +31916,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29449,6 +31940,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29470,6 +31964,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29491,6 +31988,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29512,6 +32012,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29533,6 +32036,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29554,6 +32060,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29575,6 +32084,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29596,6 +32108,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29617,6 +32132,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29638,6 +32156,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29659,6 +32180,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29680,6 +32204,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29701,6 +32228,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29722,6 +32252,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29743,6 +32276,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29764,6 +32300,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29785,6 +32324,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29806,6 +32348,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29827,6 +32372,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29848,6 +32396,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29869,6 +32420,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29890,6 +32444,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair+trace_nosec_test", @@ -29913,6 +32470,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -29936,6 +32496,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -29959,6 +32522,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -29982,6 +32548,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30005,6 +32574,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30028,6 +32600,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30051,6 +32626,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30074,6 +32652,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30097,6 +32678,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30120,6 +32704,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30143,6 +32730,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30166,6 +32756,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30189,6 +32782,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30212,6 +32808,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30235,6 +32834,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30258,6 +32860,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30281,6 +32886,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30304,6 +32912,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30327,6 +32938,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30350,6 +32964,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30373,6 +32990,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30396,6 +33016,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30419,6 +33042,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30442,6 +33068,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30465,6 +33094,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30488,6 +33120,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30511,6 +33146,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30534,6 +33172,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30557,6 +33198,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30580,6 +33224,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30603,6 +33250,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30626,6 +33276,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30649,6 +33302,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30672,6 +33328,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30695,6 +33354,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30718,6 +33380,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30741,6 +33406,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30764,6 +33432,9 @@ "exclude_configs": [ "msan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -30785,6 +33456,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -30805,6 +33479,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -30825,6 +33502,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -30845,6 +33525,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -30865,6 +33548,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -30885,6 +33571,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -30905,6 +33594,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -30925,6 +33617,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -30945,6 +33640,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -30965,6 +33663,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -30985,6 +33686,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -31005,6 +33709,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -31025,6 +33732,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -31045,6 +33755,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -31065,6 +33778,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -31085,6 +33801,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -31105,6 +33824,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -31125,6 +33847,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -31145,6 +33870,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -31165,6 +33893,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -31185,6 +33916,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -31205,6 +33939,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -31225,6 +33962,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -31245,6 +33985,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -31265,6 +34008,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -31285,6 +34031,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -31305,6 +34054,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -31325,6 +34077,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -31345,6 +34100,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -31365,6 +34123,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -31385,6 +34146,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -31405,6 +34169,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -31425,6 +34192,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -31445,6 +34215,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -31465,6 +34238,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -31485,6 +34261,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -31505,6 +34284,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -31525,6 +34307,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -31545,6 +34330,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -31565,6 +34353,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -31585,6 +34376,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -31605,6 +34399,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "h2_uds_nosec_test", @@ -32045,6 +34842,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32064,6 +34864,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32083,6 +34886,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32102,6 +34908,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32121,6 +34930,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32140,6 +34952,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32159,6 +34974,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32178,6 +34996,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32197,6 +35018,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32216,6 +35040,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32235,6 +35062,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32254,6 +35084,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32273,6 +35106,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32292,6 +35128,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32311,6 +35150,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32330,6 +35172,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32349,6 +35194,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32368,6 +35216,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32387,6 +35238,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32406,6 +35260,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32425,6 +35282,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32444,6 +35304,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32463,6 +35326,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32482,6 +35348,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32501,6 +35370,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32520,6 +35392,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32539,6 +35414,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32558,6 +35436,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32577,6 +35458,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32596,6 +35480,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32615,6 +35502,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32634,6 +35524,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32653,6 +35546,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32672,6 +35568,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32691,6 +35590,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32710,6 +35612,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32729,6 +35634,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32748,6 +35656,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32767,6 +35678,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32786,6 +35700,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32805,6 +35722,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32824,6 +35744,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32843,6 +35766,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32862,6 +35788,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32881,6 +35810,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32900,6 +35832,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32919,6 +35854,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32938,6 +35876,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32957,6 +35898,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32976,6 +35920,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32995,6 +35942,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33014,6 +35964,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33033,6 +35986,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33052,6 +36008,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33071,6 +36030,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33090,6 +36052,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33109,6 +36074,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33128,6 +36096,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33147,6 +36118,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33166,6 +36140,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33185,6 +36162,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33204,6 +36184,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33223,6 +36206,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33242,6 +36228,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33261,6 +36250,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33280,6 +36272,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33299,6 +36294,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33318,6 +36316,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33337,6 +36338,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33356,6 +36360,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33375,6 +36382,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33394,6 +36404,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33413,6 +36426,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33432,6 +36448,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33451,6 +36470,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33470,6 +36492,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33489,6 +36514,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33508,6 +36536,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33527,6 +36558,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33546,6 +36580,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33565,6 +36602,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33584,6 +36624,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33603,6 +36646,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33622,6 +36668,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33641,6 +36690,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33660,6 +36712,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33679,6 +36734,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33698,6 +36756,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33717,6 +36778,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33736,6 +36800,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33755,6 +36822,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33774,6 +36844,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33793,6 +36866,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33812,6 +36888,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33831,6 +36910,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33850,6 +36932,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33869,6 +36954,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33888,6 +36976,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33907,6 +36998,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33926,6 +37020,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33945,6 +37042,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33964,6 +37064,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33983,6 +37086,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34002,6 +37108,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34021,6 +37130,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34040,6 +37152,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34059,6 +37174,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34078,6 +37196,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34097,6 +37218,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34116,6 +37240,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34135,6 +37262,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34154,6 +37284,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34173,6 +37306,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34192,6 +37328,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34211,6 +37350,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34230,6 +37372,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34249,6 +37394,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34268,6 +37416,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34287,6 +37438,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34306,6 +37460,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34325,6 +37482,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34344,6 +37504,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34363,6 +37526,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34382,6 +37548,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34401,6 +37570,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34420,6 +37592,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34439,6 +37614,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34458,6 +37636,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34477,6 +37658,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34496,6 +37680,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34515,6 +37702,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34534,6 +37724,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34553,6 +37746,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34572,6 +37768,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34591,6 +37790,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34610,6 +37812,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34629,6 +37834,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34648,6 +37856,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34667,6 +37878,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34686,6 +37900,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34705,6 +37922,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34724,6 +37944,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34743,6 +37966,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34762,6 +37988,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34781,6 +38010,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34800,6 +38032,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34819,6 +38054,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34838,6 +38076,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34857,6 +38098,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34876,6 +38120,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34895,6 +38142,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34914,6 +38164,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34933,6 +38186,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34952,6 +38208,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34971,6 +38230,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34990,6 +38252,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35009,6 +38274,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35028,6 +38296,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35047,6 +38318,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35066,6 +38340,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35085,6 +38362,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35104,6 +38384,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35123,6 +38406,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35142,6 +38428,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35161,6 +38450,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35180,6 +38472,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35199,6 +38494,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35218,6 +38516,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35237,6 +38538,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35256,6 +38560,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35275,6 +38582,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35294,6 +38604,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35313,6 +38626,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35332,6 +38648,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35351,6 +38670,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35370,6 +38692,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35389,6 +38714,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35408,6 +38736,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35427,6 +38758,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35446,6 +38780,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35465,6 +38802,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35484,6 +38824,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35503,6 +38846,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35522,6 +38868,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35541,6 +38890,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35560,6 +38912,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35579,6 +38934,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35598,6 +38956,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35617,6 +38978,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35636,6 +39000,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35655,6 +39022,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35674,6 +39044,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35693,6 +39066,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35712,6 +39088,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35731,6 +39110,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35750,6 +39132,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35769,6 +39154,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35788,6 +39176,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35807,6 +39198,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35826,6 +39220,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35845,6 +39242,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35864,6 +39264,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35883,6 +39286,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35902,6 +39308,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35921,6 +39330,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35940,6 +39352,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35959,6 +39374,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35978,6 +39396,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35997,6 +39418,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36016,6 +39440,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36035,6 +39462,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36054,6 +39484,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36073,6 +39506,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36092,6 +39528,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36111,6 +39550,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36130,6 +39572,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36149,6 +39594,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36168,6 +39616,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36187,6 +39638,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36206,6 +39660,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36225,6 +39682,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36244,6 +39704,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36263,6 +39726,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36282,6 +39748,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36301,6 +39770,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36320,6 +39792,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36339,6 +39814,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36358,6 +39836,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36377,6 +39858,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36396,6 +39880,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36415,6 +39902,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36434,6 +39924,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36453,6 +39946,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36472,6 +39968,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36491,6 +39990,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36510,6 +40012,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36529,6 +40034,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36548,6 +40056,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36567,6 +40078,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36586,6 +40100,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36605,6 +40122,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36624,6 +40144,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36643,6 +40166,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36662,6 +40188,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36681,6 +40210,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36700,6 +40232,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36719,6 +40254,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36738,6 +40276,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36757,6 +40298,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36776,6 +40320,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36795,6 +40342,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36814,6 +40364,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36833,6 +40386,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36852,6 +40408,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36871,6 +40430,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36890,6 +40452,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36909,6 +40474,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36928,6 +40496,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36947,6 +40518,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36966,6 +40540,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36985,6 +40562,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37004,6 +40584,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37023,6 +40606,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37042,6 +40628,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37061,6 +40650,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37080,6 +40672,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37099,6 +40694,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37118,6 +40716,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37137,6 +40738,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37156,6 +40760,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37175,6 +40782,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37194,6 +40804,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37213,6 +40826,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37232,6 +40848,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37251,6 +40870,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37270,6 +40892,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37289,6 +40914,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37308,6 +40936,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37327,6 +40958,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37346,6 +40980,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37365,6 +41002,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37384,6 +41024,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37403,6 +41046,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37422,6 +41068,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37441,6 +41090,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37460,6 +41112,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37479,6 +41134,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37498,6 +41156,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37517,6 +41178,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37536,6 +41200,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37555,6 +41222,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37574,6 +41244,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37593,6 +41266,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37612,6 +41288,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37631,6 +41310,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37650,6 +41332,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37669,6 +41354,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37688,6 +41376,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37707,6 +41398,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37726,6 +41420,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37745,6 +41442,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37764,6 +41464,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37783,6 +41486,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37802,6 +41508,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37821,6 +41530,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37840,6 +41552,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37859,6 +41574,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37878,6 +41596,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37897,6 +41618,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37916,6 +41640,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37935,6 +41662,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37954,6 +41684,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37973,6 +41706,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37992,6 +41728,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38011,6 +41750,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38030,6 +41772,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38049,6 +41794,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38068,6 +41816,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38087,6 +41838,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38106,6 +41860,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38125,6 +41882,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38144,6 +41904,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38163,6 +41926,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38182,6 +41948,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38201,6 +41970,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38220,6 +41992,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38239,6 +42014,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38258,6 +42036,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38277,6 +42058,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38296,6 +42080,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38315,6 +42102,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38334,6 +42124,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38353,6 +42146,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38372,6 +42168,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38391,6 +42190,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38410,6 +42212,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38429,6 +42234,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38448,6 +42256,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38467,6 +42278,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38486,6 +42300,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38505,6 +42322,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38524,6 +42344,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38543,6 +42366,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38562,6 +42388,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38581,6 +42410,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38600,6 +42432,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38619,6 +42454,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38638,6 +42476,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38657,6 +42498,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38676,6 +42520,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38695,6 +42542,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38714,6 +42564,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38733,6 +42586,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38752,6 +42608,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38771,6 +42630,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38790,6 +42652,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38809,6 +42674,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38828,6 +42696,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38847,6 +42718,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38866,6 +42740,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38885,6 +42762,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38904,6 +42784,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38923,6 +42806,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38942,6 +42828,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38961,6 +42850,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38980,6 +42872,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38999,6 +42894,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39018,6 +42916,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39037,6 +42938,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39056,6 +42960,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39075,6 +42982,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39094,6 +43004,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39113,6 +43026,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39132,6 +43048,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39151,6 +43070,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39170,6 +43092,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39189,6 +43114,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39208,6 +43136,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39227,6 +43158,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39246,6 +43180,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39265,6 +43202,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39284,6 +43224,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39303,6 +43246,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39322,6 +43268,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39341,6 +43290,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39360,6 +43312,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39379,6 +43334,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39398,6 +43356,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39417,6 +43378,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39436,6 +43400,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39455,6 +43422,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39474,6 +43444,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39493,6 +43466,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39512,6 +43488,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39531,6 +43510,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39550,6 +43532,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39569,6 +43554,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39588,6 +43576,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39607,6 +43598,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39626,6 +43620,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39645,6 +43642,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39664,6 +43664,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39683,6 +43686,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39702,6 +43708,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39721,6 +43730,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39740,6 +43752,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39759,6 +43774,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39778,6 +43796,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39797,6 +43818,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39816,6 +43840,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39835,6 +43862,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39854,6 +43884,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39873,6 +43906,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39892,6 +43928,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39911,6 +43950,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39930,6 +43972,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39949,6 +43994,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39968,6 +44016,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39987,6 +44038,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40006,6 +44060,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40025,6 +44082,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40044,6 +44104,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40063,6 +44126,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40082,6 +44148,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40101,6 +44170,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40120,6 +44192,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40139,6 +44214,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40158,6 +44236,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40177,6 +44258,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40196,6 +44280,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40215,6 +44302,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40234,6 +44324,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40253,6 +44346,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40272,6 +44368,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40291,6 +44390,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40310,6 +44412,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40329,6 +44434,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40348,6 +44456,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40367,6 +44478,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40386,6 +44500,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40405,6 +44522,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40424,6 +44544,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40443,6 +44566,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40462,6 +44588,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40481,6 +44610,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40500,6 +44632,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40519,6 +44654,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40538,6 +44676,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40557,6 +44698,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40576,6 +44720,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40595,6 +44742,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40614,6 +44764,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40633,6 +44786,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40652,6 +44808,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40671,6 +44830,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40690,6 +44852,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40709,6 +44874,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40728,6 +44896,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40747,6 +44918,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40766,6 +44940,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40785,6 +44962,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40804,6 +44984,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40823,6 +45006,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40842,6 +45028,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40861,6 +45050,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40880,6 +45072,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40899,6 +45094,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40918,6 +45116,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40937,6 +45138,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40956,6 +45160,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40975,6 +45182,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40994,6 +45204,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41013,6 +45226,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41032,6 +45248,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41051,6 +45270,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41070,6 +45292,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41089,6 +45314,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41108,6 +45336,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41127,6 +45358,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41146,6 +45380,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41165,6 +45402,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41184,6 +45424,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41203,6 +45446,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41222,6 +45468,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41241,6 +45490,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41260,6 +45512,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41279,6 +45534,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41298,6 +45556,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41317,6 +45578,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41336,6 +45600,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41355,6 +45622,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41374,6 +45644,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41393,6 +45666,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41412,6 +45688,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41431,6 +45710,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41450,6 +45732,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41469,6 +45754,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41488,6 +45776,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41507,6 +45798,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41526,6 +45820,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41545,6 +45842,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41564,6 +45864,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41583,6 +45886,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41602,6 +45908,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41621,6 +45930,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41640,6 +45952,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41659,6 +45974,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41678,6 +45996,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41697,6 +46018,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41716,6 +46040,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41735,6 +46062,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41754,6 +46084,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41773,6 +46106,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41792,6 +46128,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41811,6 +46150,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41830,6 +46172,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41849,6 +46194,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41868,6 +46216,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41887,6 +46238,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41906,6 +46260,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41925,6 +46282,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41944,6 +46304,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41963,6 +46326,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41982,6 +46348,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42001,6 +46370,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42020,6 +46392,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42039,6 +46414,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42058,6 +46436,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42077,6 +46458,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42096,6 +46480,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42115,6 +46502,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42134,6 +46524,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42153,6 +46546,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42172,6 +46568,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42191,6 +46590,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42210,6 +46612,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42229,6 +46634,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42248,6 +46656,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42267,6 +46678,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42286,6 +46700,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42305,6 +46722,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42324,6 +46744,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42343,6 +46766,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42362,6 +46788,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42381,6 +46810,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42400,6 +46832,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42419,6 +46854,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42438,6 +46876,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42457,6 +46898,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42476,6 +46920,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42495,6 +46942,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42514,6 +46964,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42533,6 +46986,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42552,6 +47008,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42571,6 +47030,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42590,6 +47052,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42609,6 +47074,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42628,6 +47096,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42647,6 +47118,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42666,6 +47140,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42685,6 +47162,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42704,6 +47184,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42723,6 +47206,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42742,6 +47228,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42761,6 +47250,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42780,6 +47272,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42799,6 +47294,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42818,6 +47316,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42837,6 +47338,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42856,6 +47360,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42875,6 +47382,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42894,6 +47404,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42913,6 +47426,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42932,6 +47448,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42951,6 +47470,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42970,6 +47492,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42989,6 +47514,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43008,6 +47536,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43027,6 +47558,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43046,6 +47580,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43065,6 +47602,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43084,6 +47624,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43103,6 +47646,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43122,6 +47668,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43141,6 +47690,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43160,6 +47712,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43179,6 +47734,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43198,6 +47756,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43217,6 +47778,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43236,6 +47800,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43255,6 +47822,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43274,6 +47844,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43293,6 +47866,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43312,6 +47888,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43331,6 +47910,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43350,6 +47932,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43369,6 +47954,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43388,6 +47976,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43407,6 +47998,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43426,6 +48020,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43445,6 +48042,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43464,6 +48064,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43483,6 +48086,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43502,6 +48108,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43521,6 +48130,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43540,6 +48152,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43559,6 +48174,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43578,6 +48196,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43597,6 +48218,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43616,6 +48240,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43635,6 +48262,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43654,6 +48284,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43673,6 +48306,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43692,6 +48328,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43711,6 +48350,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43730,6 +48372,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43749,6 +48394,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43768,6 +48416,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43787,6 +48438,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43806,6 +48460,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43825,6 +48482,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43844,6 +48504,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43863,6 +48526,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43882,6 +48548,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43901,6 +48570,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43920,6 +48592,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43939,6 +48614,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43958,6 +48636,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43977,6 +48658,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43996,6 +48680,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44015,6 +48702,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44034,6 +48724,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44053,6 +48746,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44072,6 +48768,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44091,6 +48790,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44110,6 +48812,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44129,6 +48834,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44148,6 +48856,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44167,6 +48878,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44186,6 +48900,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44205,6 +48922,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44224,6 +48944,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44243,6 +48966,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44262,6 +48988,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44281,6 +49010,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44300,6 +49032,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44319,6 +49054,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44338,6 +49076,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44357,6 +49098,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44376,6 +49120,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44395,6 +49142,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44414,6 +49164,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44433,6 +49186,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44452,6 +49208,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44471,6 +49230,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44490,6 +49252,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44509,6 +49274,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44528,6 +49296,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44547,6 +49318,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44566,6 +49340,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44585,6 +49362,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44604,6 +49384,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44623,6 +49406,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44642,6 +49428,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44661,6 +49450,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44680,6 +49472,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44699,6 +49494,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44718,6 +49516,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44737,6 +49538,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44756,6 +49560,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44775,6 +49582,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44794,6 +49604,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44813,6 +49626,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44832,6 +49648,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44851,6 +49670,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44870,6 +49692,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44889,6 +49714,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44908,6 +49736,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44927,6 +49758,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44946,6 +49780,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44965,6 +49802,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44984,6 +49824,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45003,6 +49846,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45022,6 +49868,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45041,6 +49890,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45060,6 +49912,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45079,6 +49934,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45098,6 +49956,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45117,6 +49978,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45136,6 +50000,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45155,6 +50022,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45174,6 +50044,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45193,6 +50066,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45212,6 +50088,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45231,6 +50110,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45250,6 +50132,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45269,6 +50154,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45288,6 +50176,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45307,6 +50198,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45326,6 +50220,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45345,6 +50242,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45364,6 +50264,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45383,6 +50286,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45402,6 +50308,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45421,6 +50330,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45440,6 +50352,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45459,6 +50374,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45478,6 +50396,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45497,6 +50418,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45516,6 +50440,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45535,6 +50462,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45554,6 +50484,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45573,6 +50506,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45592,6 +50528,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45611,6 +50550,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45630,6 +50572,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45649,6 +50594,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45668,6 +50616,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45687,6 +50638,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45706,6 +50660,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45725,6 +50682,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45744,6 +50704,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45763,6 +50726,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45782,6 +50748,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45801,6 +50770,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45820,6 +50792,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45839,6 +50814,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45858,6 +50836,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45877,6 +50858,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45896,6 +50880,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45915,6 +50902,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45934,6 +50924,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45953,6 +50946,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45972,6 +50968,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45991,6 +50990,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46010,6 +51012,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46029,6 +51034,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46048,6 +51056,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46067,6 +51078,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46086,6 +51100,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46105,6 +51122,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46124,6 +51144,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46143,6 +51166,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46162,6 +51188,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46181,6 +51210,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46200,6 +51232,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46219,6 +51254,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46238,6 +51276,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46257,6 +51298,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46276,6 +51320,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46295,6 +51342,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46314,6 +51364,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46333,6 +51386,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46352,6 +51408,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46371,6 +51430,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46390,6 +51452,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46409,6 +51474,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46428,6 +51496,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46447,6 +51518,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46466,6 +51540,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46485,6 +51562,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46504,6 +51584,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46523,6 +51606,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46542,6 +51628,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46561,6 +51650,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46580,6 +51672,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46599,6 +51694,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46618,6 +51716,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46637,6 +51738,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46656,6 +51760,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46675,6 +51782,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46694,6 +51804,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46713,6 +51826,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46732,6 +51848,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46751,6 +51870,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46770,6 +51892,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46789,6 +51914,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46808,6 +51936,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46827,6 +51958,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46846,6 +51980,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46865,6 +52002,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46884,6 +52024,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46903,6 +52046,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46922,6 +52068,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46941,6 +52090,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46960,6 +52112,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46979,6 +52134,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46998,6 +52156,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47017,6 +52178,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47036,6 +52200,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47055,6 +52222,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47074,6 +52244,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47093,6 +52266,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47112,6 +52288,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47131,6 +52310,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47150,6 +52332,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47169,6 +52354,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47188,6 +52376,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47207,6 +52398,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47226,6 +52420,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47245,6 +52442,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47264,6 +52464,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47283,6 +52486,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47302,6 +52508,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47321,6 +52530,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47340,6 +52552,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47359,6 +52574,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47378,6 +52596,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47397,6 +52618,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47416,6 +52640,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47435,6 +52662,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47454,6 +52684,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47473,6 +52706,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47492,6 +52728,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47511,6 +52750,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47530,6 +52772,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47549,6 +52794,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47568,6 +52816,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47587,6 +52838,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47606,6 +52860,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47625,6 +52882,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47644,6 +52904,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47663,6 +52926,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47682,6 +52948,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47701,6 +52970,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47720,6 +52992,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47739,6 +53014,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47758,6 +53036,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47777,6 +53058,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47796,6 +53080,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47815,6 +53102,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47834,6 +53124,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47853,6 +53146,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47872,6 +53168,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47891,6 +53190,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47910,6 +53212,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47929,6 +53234,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47948,6 +53256,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47967,6 +53278,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -47986,6 +53300,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48005,6 +53322,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48024,6 +53344,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48043,6 +53366,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48062,6 +53388,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48081,6 +53410,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48100,6 +53432,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48119,6 +53454,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48138,6 +53476,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48157,6 +53498,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48176,6 +53520,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48195,6 +53542,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48214,6 +53564,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48233,6 +53586,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48252,6 +53608,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48271,6 +53630,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48290,6 +53652,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48309,6 +53674,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48328,6 +53696,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48347,6 +53718,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48366,6 +53740,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48385,6 +53762,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48404,6 +53784,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48423,6 +53806,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48442,6 +53828,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48461,6 +53850,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48480,6 +53872,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48499,6 +53894,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48518,6 +53916,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48537,6 +53938,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48556,6 +53960,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48575,6 +53982,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48594,6 +54004,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48613,6 +54026,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48632,6 +54048,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48651,6 +54070,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48670,6 +54092,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48689,6 +54114,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48708,6 +54136,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48727,6 +54158,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48746,6 +54180,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48765,6 +54202,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48784,6 +54224,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48803,6 +54246,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48822,6 +54268,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48841,6 +54290,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48860,6 +54312,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48879,6 +54334,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48898,6 +54356,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48917,6 +54378,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48936,6 +54400,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48955,6 +54422,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48974,6 +54444,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -48993,6 +54466,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49012,6 +54488,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49031,6 +54510,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49050,6 +54532,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49069,6 +54554,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49088,6 +54576,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49107,6 +54598,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49126,6 +54620,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49145,6 +54642,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49164,6 +54664,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49183,6 +54686,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49202,6 +54708,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49221,6 +54730,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49240,6 +54752,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49259,6 +54774,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49278,6 +54796,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49297,6 +54818,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49316,6 +54840,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49335,6 +54862,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49354,6 +54884,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49373,6 +54906,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49392,6 +54928,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49411,6 +54950,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49430,6 +54972,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49449,6 +54994,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49468,6 +55016,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49487,6 +55038,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49506,6 +55060,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49525,6 +55082,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49544,6 +55104,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49563,6 +55126,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49582,6 +55148,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49601,6 +55170,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49620,6 +55192,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49639,6 +55214,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49658,6 +55236,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49677,6 +55258,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49696,6 +55280,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49715,6 +55302,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49734,6 +55324,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49753,6 +55346,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49772,6 +55368,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49791,6 +55390,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49810,6 +55412,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49829,6 +55434,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49848,6 +55456,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49867,6 +55478,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49886,6 +55500,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49905,6 +55522,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49924,6 +55544,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49943,6 +55566,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49962,6 +55588,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -49981,6 +55610,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50000,6 +55632,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50019,6 +55654,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50038,6 +55676,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50057,6 +55698,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50076,6 +55720,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50095,6 +55742,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50114,6 +55764,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50133,6 +55786,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50152,6 +55808,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50171,6 +55830,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50190,6 +55852,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50209,6 +55874,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50228,6 +55896,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50247,6 +55918,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50266,6 +55940,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50285,6 +55962,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50304,6 +55984,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50323,6 +56006,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50342,6 +56028,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50361,6 +56050,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50380,6 +56072,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50399,6 +56094,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50418,6 +56116,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50437,6 +56138,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50456,6 +56160,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50475,6 +56182,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50494,6 +56204,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50513,6 +56226,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50532,6 +56248,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50551,6 +56270,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50570,6 +56292,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50589,6 +56314,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50608,6 +56336,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50627,6 +56358,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50646,6 +56380,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50665,6 +56402,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50684,6 +56424,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50703,6 +56446,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50722,6 +56468,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50741,6 +56490,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50760,6 +56512,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50779,6 +56534,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50798,6 +56556,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50817,6 +56578,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50836,6 +56600,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50855,6 +56622,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50874,6 +56644,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50893,6 +56666,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50912,6 +56688,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50931,6 +56710,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50950,6 +56732,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50969,6 +56754,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -50988,6 +56776,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51007,6 +56798,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51026,6 +56820,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51045,6 +56842,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51064,6 +56864,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51083,6 +56886,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51102,6 +56908,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51121,6 +56930,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51140,6 +56952,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51159,6 +56974,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51178,6 +56996,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51197,6 +57018,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51216,6 +57040,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51235,6 +57062,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51254,6 +57084,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51273,6 +57106,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51292,6 +57128,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51311,6 +57150,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51330,6 +57172,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51349,6 +57194,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51368,6 +57216,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51387,6 +57238,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51406,6 +57260,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51425,6 +57282,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51444,6 +57304,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51463,6 +57326,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51482,6 +57348,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51501,6 +57370,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51520,6 +57392,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51539,6 +57414,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51558,6 +57436,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51577,6 +57458,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51596,6 +57480,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51615,6 +57502,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51634,6 +57524,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51653,6 +57546,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51672,6 +57568,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51691,6 +57590,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51710,6 +57612,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51729,6 +57634,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51748,6 +57656,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51767,6 +57678,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51786,6 +57700,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51805,6 +57722,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51824,6 +57744,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51843,6 +57766,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51862,6 +57788,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51881,6 +57810,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51900,6 +57832,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51919,6 +57854,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51938,6 +57876,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51957,6 +57898,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51976,6 +57920,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -51995,6 +57942,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52014,6 +57964,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52033,6 +57986,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52052,6 +58008,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52071,6 +58030,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52090,6 +58052,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52109,6 +58074,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52128,6 +58096,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52147,6 +58118,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52166,6 +58140,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52185,6 +58162,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52204,6 +58184,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52223,6 +58206,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52242,6 +58228,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52261,6 +58250,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52280,6 +58272,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52299,6 +58294,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52318,6 +58316,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52337,6 +58338,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52356,6 +58360,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52375,6 +58382,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52394,6 +58404,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52413,6 +58426,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52432,6 +58448,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52451,6 +58470,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52470,6 +58492,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52489,6 +58514,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52508,6 +58536,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52527,6 +58558,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52546,6 +58580,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52565,6 +58602,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52584,6 +58624,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52603,6 +58646,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52622,6 +58668,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52641,6 +58690,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52660,6 +58712,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52679,6 +58734,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52698,6 +58756,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52717,6 +58778,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52736,6 +58800,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52755,6 +58822,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52774,6 +58844,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52793,6 +58866,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52812,6 +58888,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52831,6 +58910,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52850,6 +58932,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52869,6 +58954,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52888,6 +58976,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52907,6 +58998,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52926,6 +59020,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52945,6 +59042,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52964,6 +59064,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -52983,6 +59086,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53002,6 +59108,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53021,6 +59130,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53040,6 +59152,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53059,6 +59174,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53078,6 +59196,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53097,6 +59218,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53116,6 +59240,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53135,6 +59262,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53154,6 +59284,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53173,6 +59306,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53192,6 +59328,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53211,6 +59350,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53230,6 +59372,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53249,6 +59394,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53268,6 +59416,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53287,6 +59438,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53306,6 +59460,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53325,6 +59482,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53344,6 +59504,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53363,6 +59526,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53382,6 +59548,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53401,6 +59570,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53420,6 +59592,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53439,6 +59614,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53458,6 +59636,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53477,6 +59658,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53496,6 +59680,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53515,6 +59702,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53534,6 +59724,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53553,6 +59746,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53572,6 +59768,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53591,6 +59790,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53610,6 +59812,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53629,6 +59834,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53648,6 +59856,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53667,6 +59878,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53686,6 +59900,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53705,6 +59922,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53724,6 +59944,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53743,6 +59966,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53762,6 +59988,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53781,6 +60010,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53800,6 +60032,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53819,6 +60054,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53838,6 +60076,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53857,6 +60098,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53876,6 +60120,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53895,6 +60142,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53914,6 +60164,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53933,6 +60186,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53952,6 +60208,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53971,6 +60230,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -53990,6 +60252,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54009,6 +60274,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54028,6 +60296,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54047,6 +60318,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54066,6 +60340,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54085,6 +60362,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54104,6 +60384,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54123,6 +60406,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54142,6 +60428,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54161,6 +60450,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54180,6 +60472,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54199,6 +60494,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54218,6 +60516,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54237,6 +60538,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54256,6 +60560,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54275,6 +60582,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54294,6 +60604,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54313,6 +60626,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54332,6 +60648,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54351,6 +60670,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54370,6 +60692,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54389,6 +60714,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54408,6 +60736,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54427,6 +60758,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54446,6 +60780,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54465,6 +60802,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54484,6 +60824,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54503,6 +60846,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54522,6 +60868,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54541,6 +60890,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54560,6 +60912,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54579,6 +60934,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54598,6 +60956,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54617,6 +60978,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54636,6 +61000,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54655,6 +61022,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54674,6 +61044,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54693,6 +61066,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54712,6 +61088,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54731,6 +61110,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54750,6 +61132,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54769,6 +61154,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54788,6 +61176,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54807,6 +61198,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54826,6 +61220,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54845,6 +61242,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54864,6 +61264,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54883,6 +61286,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54902,6 +61308,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54921,6 +61330,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54940,6 +61352,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54959,6 +61374,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54978,6 +61396,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -54997,6 +61418,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55016,6 +61440,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55035,6 +61462,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55054,6 +61484,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55073,6 +61506,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55092,6 +61528,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55111,6 +61550,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55130,6 +61572,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55149,6 +61594,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55168,6 +61616,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55187,6 +61638,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55206,6 +61660,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55225,6 +61682,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55244,6 +61704,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55263,6 +61726,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55282,6 +61748,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55301,6 +61770,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55320,6 +61792,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55339,6 +61814,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55358,6 +61836,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55377,6 +61858,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55396,6 +61880,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55415,6 +61902,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55434,6 +61924,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55453,6 +61946,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55472,6 +61968,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55491,6 +61990,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55510,6 +62012,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55529,6 +62034,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55548,6 +62056,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55567,6 +62078,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55586,6 +62100,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55605,6 +62122,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55624,6 +62144,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55643,6 +62166,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55662,6 +62188,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55681,6 +62210,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55700,6 +62232,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55719,6 +62254,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55738,6 +62276,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55757,6 +62298,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55776,6 +62320,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55795,6 +62342,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55814,6 +62364,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55833,6 +62386,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55852,6 +62408,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55871,6 +62430,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55890,6 +62452,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55909,6 +62474,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55928,6 +62496,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55947,6 +62518,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55966,6 +62540,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -55985,6 +62562,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56004,6 +62584,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56023,6 +62606,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56042,6 +62628,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56061,6 +62650,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56080,6 +62672,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56099,6 +62694,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56118,6 +62716,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56137,6 +62738,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56156,6 +62760,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56175,6 +62782,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56194,6 +62804,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56213,6 +62826,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56232,6 +62848,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56251,6 +62870,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56270,6 +62892,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56289,6 +62914,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56308,6 +62936,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56327,6 +62958,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56346,6 +62980,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56365,6 +63002,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56384,6 +63024,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56403,6 +63046,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56422,6 +63068,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56441,6 +63090,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56460,6 +63112,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56479,6 +63134,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56498,6 +63156,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56517,6 +63178,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56536,6 +63200,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56555,6 +63222,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56574,6 +63244,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56593,6 +63266,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56612,6 +63288,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56631,6 +63310,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56650,6 +63332,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56669,6 +63354,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56688,6 +63376,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56707,6 +63398,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56726,6 +63420,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56745,6 +63442,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56764,6 +63464,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56783,6 +63486,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56802,6 +63508,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56821,6 +63530,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56840,6 +63552,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56859,6 +63574,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56878,6 +63596,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56897,6 +63618,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56916,6 +63640,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56935,6 +63662,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56954,6 +63684,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56973,6 +63706,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -56992,6 +63728,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57011,6 +63750,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57030,6 +63772,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57049,6 +63794,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57068,6 +63816,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57087,6 +63838,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57106,6 +63860,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57125,6 +63882,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57144,6 +63904,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57163,6 +63926,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57182,6 +63948,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57201,6 +63970,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57220,6 +63992,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57239,6 +64014,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57258,6 +64036,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57277,6 +64058,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57296,6 +64080,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57315,6 +64102,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57334,6 +64124,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57353,6 +64146,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57372,6 +64168,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57391,6 +64190,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57410,6 +64212,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57429,6 +64234,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57448,6 +64256,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57467,6 +64278,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57486,6 +64300,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57505,6 +64322,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57524,6 +64344,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57543,6 +64366,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57562,6 +64388,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57581,6 +64410,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57600,6 +64432,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57619,6 +64454,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57638,6 +64476,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57657,6 +64498,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57676,6 +64520,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57695,6 +64542,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57714,6 +64564,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57733,6 +64586,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57752,6 +64608,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57771,6 +64630,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57790,6 +64652,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57809,6 +64674,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57828,6 +64696,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57847,6 +64718,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57866,6 +64740,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57885,6 +64762,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57904,6 +64784,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57923,6 +64806,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57942,6 +64828,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57961,6 +64850,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57980,6 +64872,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -57999,6 +64894,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -58018,6 +64916,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -58037,6 +64938,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -58056,6 +64960,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -58075,6 +64982,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58094,6 +65004,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58113,6 +65026,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58132,6 +65048,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58151,6 +65070,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58170,6 +65092,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58189,6 +65114,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58208,6 +65136,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58227,6 +65158,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58246,6 +65180,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58265,6 +65202,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58284,6 +65224,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58303,6 +65246,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58322,6 +65268,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58341,6 +65290,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58360,6 +65312,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58379,6 +65334,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58398,6 +65356,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58417,6 +65378,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58436,6 +65400,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58455,6 +65422,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58474,6 +65444,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58493,6 +65466,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58512,6 +65488,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58531,6 +65510,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58550,6 +65532,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58569,6 +65554,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58588,6 +65576,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58607,6 +65598,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58626,6 +65620,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58645,6 +65642,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58664,6 +65664,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58683,6 +65686,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58702,6 +65708,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58721,6 +65730,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58740,6 +65752,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58759,6 +65774,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58778,6 +65796,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58797,6 +65818,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58816,6 +65840,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58835,6 +65862,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58854,6 +65884,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58873,6 +65906,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58892,6 +65928,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58911,6 +65950,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58930,6 +65972,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58949,6 +65994,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58968,6 +66016,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -58987,6 +66038,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59006,6 +66060,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59025,6 +66082,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59044,6 +66104,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59063,6 +66126,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59082,6 +66148,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59101,6 +66170,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59120,6 +66192,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59139,6 +66214,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59158,6 +66236,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59177,6 +66258,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59196,6 +66280,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59215,6 +66302,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59234,6 +66324,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59253,6 +66346,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59272,6 +66368,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59291,6 +66390,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59310,6 +66412,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59329,6 +66434,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59348,6 +66456,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59367,6 +66478,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59386,6 +66500,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59405,6 +66522,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59424,6 +66544,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59443,6 +66566,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59462,6 +66588,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59481,6 +66610,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59500,6 +66632,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59519,6 +66654,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59538,6 +66676,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59557,6 +66698,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59576,6 +66720,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59595,6 +66742,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59614,6 +66764,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59633,6 +66786,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59652,6 +66808,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59671,6 +66830,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59690,6 +66852,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59709,6 +66874,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59728,6 +66896,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59747,6 +66918,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59766,6 +66940,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59785,6 +66962,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59804,6 +66984,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59823,6 +67006,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59842,6 +67028,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59861,6 +67050,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59880,6 +67072,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59899,6 +67094,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59918,6 +67116,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59937,6 +67138,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59956,6 +67160,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59975,6 +67182,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -59994,6 +67204,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60013,6 +67226,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60032,6 +67248,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60051,6 +67270,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60070,6 +67292,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60089,6 +67314,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60108,6 +67336,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60127,6 +67358,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60146,6 +67380,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60165,6 +67402,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60184,6 +67424,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60203,6 +67446,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60222,6 +67468,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60241,6 +67490,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60260,6 +67512,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60279,6 +67534,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60298,6 +67556,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60317,6 +67578,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60336,6 +67600,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60355,6 +67622,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60374,6 +67644,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60393,6 +67666,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60412,6 +67688,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60431,6 +67710,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60450,6 +67732,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60469,6 +67754,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60488,6 +67776,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60507,6 +67798,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60526,6 +67820,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60545,6 +67842,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60564,6 +67864,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60583,6 +67886,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60602,6 +67908,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60621,6 +67930,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60640,6 +67952,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60659,6 +67974,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60678,6 +67996,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60697,6 +68018,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60716,6 +68040,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60735,6 +68062,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60754,6 +68084,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60773,6 +68106,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60792,6 +68128,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60811,6 +68150,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60830,6 +68172,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60849,6 +68194,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60868,6 +68216,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60887,6 +68238,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60906,6 +68260,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60925,6 +68282,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60944,6 +68304,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60963,6 +68326,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -60982,6 +68348,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61001,6 +68370,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61020,6 +68392,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61039,6 +68414,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61058,6 +68436,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61077,6 +68458,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61096,6 +68480,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61115,6 +68502,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61134,6 +68524,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61153,6 +68546,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61172,6 +68568,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61191,6 +68590,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61210,6 +68612,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61229,6 +68634,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61248,6 +68656,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61267,6 +68678,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61286,6 +68700,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61305,6 +68722,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61324,6 +68744,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61343,6 +68766,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61362,6 +68788,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61381,6 +68810,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61400,6 +68832,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61419,6 +68854,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61438,6 +68876,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61457,6 +68898,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61476,6 +68920,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61495,6 +68942,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61514,6 +68964,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61533,6 +68986,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61552,6 +69008,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61571,6 +69030,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61590,6 +69052,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61609,6 +69074,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61628,6 +69096,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61647,6 +69118,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61666,6 +69140,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61685,6 +69162,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61704,6 +69184,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61723,6 +69206,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61742,6 +69228,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61761,6 +69250,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61780,6 +69272,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61799,6 +69294,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61818,6 +69316,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61837,6 +69338,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61856,6 +69360,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61875,6 +69382,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61894,6 +69404,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61913,6 +69426,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61932,6 +69448,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61951,6 +69470,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61970,6 +69492,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -61989,6 +69514,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62008,6 +69536,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62027,6 +69558,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62046,6 +69580,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62065,6 +69602,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62084,6 +69624,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62103,6 +69646,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62122,6 +69668,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62141,6 +69690,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62160,6 +69712,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62179,6 +69734,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62198,6 +69756,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62217,6 +69778,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62236,6 +69800,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62255,6 +69822,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62274,6 +69844,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62293,6 +69866,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62312,6 +69888,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62331,6 +69910,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62350,6 +69932,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62369,6 +69954,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62388,6 +69976,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62407,6 +69998,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62426,6 +70020,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62445,6 +70042,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62464,6 +70064,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62483,6 +70086,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62502,6 +70108,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62521,6 +70130,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62540,6 +70152,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62559,6 +70174,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62578,6 +70196,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62597,6 +70218,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62616,6 +70240,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62635,6 +70262,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62654,6 +70284,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62673,6 +70306,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62692,6 +70328,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62711,6 +70350,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62730,6 +70372,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62749,6 +70394,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62768,6 +70416,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62787,6 +70438,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62806,6 +70460,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62825,6 +70482,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62844,6 +70504,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62863,6 +70526,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62882,6 +70548,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62901,6 +70570,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62920,6 +70592,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62939,6 +70614,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62958,6 +70636,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62977,6 +70658,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -62996,6 +70680,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63015,6 +70702,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63034,6 +70724,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63053,6 +70746,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63072,6 +70768,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63091,6 +70790,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63110,6 +70812,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63129,6 +70834,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63148,6 +70856,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63167,6 +70878,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63186,6 +70900,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63205,6 +70922,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63224,6 +70944,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63243,6 +70966,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63262,6 +70988,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63281,6 +71010,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63300,6 +71032,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63319,6 +71054,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63338,6 +71076,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63357,6 +71098,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63376,6 +71120,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63395,6 +71142,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63414,6 +71164,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63433,6 +71186,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63452,6 +71208,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63471,6 +71230,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63490,6 +71252,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63509,6 +71274,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63528,6 +71296,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63547,6 +71318,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63566,6 +71340,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63585,6 +71362,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63604,6 +71384,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63623,6 +71406,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63642,6 +71428,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63661,6 +71450,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63680,6 +71472,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63699,6 +71494,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63718,6 +71516,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63737,6 +71538,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63756,6 +71560,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63775,6 +71582,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63794,6 +71604,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63813,6 +71626,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63832,6 +71648,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63851,6 +71670,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63870,6 +71692,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63889,6 +71714,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63908,6 +71736,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63927,6 +71758,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63946,6 +71780,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63965,6 +71802,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -63984,6 +71824,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64003,6 +71846,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64022,6 +71868,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64041,6 +71890,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64060,6 +71912,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64079,6 +71934,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64098,6 +71956,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64117,6 +71978,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64136,6 +72000,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64155,6 +72022,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64174,6 +72044,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64193,6 +72066,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64212,6 +72088,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64231,6 +72110,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64250,6 +72132,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64269,6 +72154,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64288,6 +72176,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64307,6 +72198,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64326,6 +72220,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64345,6 +72242,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64364,6 +72264,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64383,6 +72286,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64402,6 +72308,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64421,6 +72330,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64440,6 +72352,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64459,6 +72374,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64478,6 +72396,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64497,6 +72418,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64516,6 +72440,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64535,6 +72462,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64554,6 +72484,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64573,6 +72506,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64592,6 +72528,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64611,6 +72550,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64630,6 +72572,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64649,6 +72594,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64668,6 +72616,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64687,6 +72638,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64706,6 +72660,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64725,6 +72682,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64744,6 +72704,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64763,6 +72726,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64782,6 +72748,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64801,6 +72770,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64820,6 +72792,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64839,6 +72814,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64858,6 +72836,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64877,6 +72858,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64896,6 +72880,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64915,6 +72902,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64934,6 +72924,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64953,6 +72946,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64972,6 +72968,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -64991,6 +72990,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65010,6 +73012,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65029,6 +73034,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65048,6 +73056,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65067,6 +73078,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65086,6 +73100,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65105,6 +73122,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65124,6 +73144,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65143,6 +73166,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65162,6 +73188,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65181,6 +73210,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65200,6 +73232,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65219,6 +73254,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65238,6 +73276,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65257,6 +73298,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65276,6 +73320,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65295,6 +73342,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65314,6 +73364,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65333,6 +73386,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65352,6 +73408,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65371,6 +73430,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65390,6 +73452,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65409,6 +73474,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65428,6 +73496,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65447,6 +73518,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65466,6 +73540,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65485,6 +73562,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65504,6 +73584,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65523,6 +73606,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65542,6 +73628,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65561,6 +73650,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65580,6 +73672,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65599,6 +73694,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65618,6 +73716,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65637,6 +73738,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65656,6 +73760,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65675,6 +73782,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65694,6 +73804,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65713,6 +73826,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65732,6 +73848,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65751,6 +73870,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65770,6 +73892,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65789,6 +73914,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65808,6 +73936,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65827,6 +73958,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65846,6 +73980,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65865,6 +74002,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65884,6 +74024,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65903,6 +74046,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65922,6 +74068,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65941,6 +74090,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65960,6 +74112,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65979,6 +74134,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -65998,6 +74156,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66017,6 +74178,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66036,6 +74200,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66055,6 +74222,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66074,6 +74244,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66093,6 +74266,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66112,6 +74288,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66131,6 +74310,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66150,6 +74332,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66169,6 +74354,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66188,6 +74376,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66207,6 +74398,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66226,6 +74420,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66245,6 +74442,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66264,6 +74464,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66283,6 +74486,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66302,6 +74508,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66321,6 +74530,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66340,6 +74552,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66359,6 +74574,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66378,6 +74596,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66397,6 +74618,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66416,6 +74640,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66435,6 +74662,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66454,6 +74684,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66473,6 +74706,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66492,6 +74728,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66511,6 +74750,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66530,6 +74772,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66549,6 +74794,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66568,6 +74816,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66587,6 +74838,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66606,6 +74860,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66625,6 +74882,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66644,6 +74904,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66663,6 +74926,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66682,6 +74948,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66701,6 +74970,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66720,6 +74992,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66739,6 +75014,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66758,6 +75036,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66777,6 +75058,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66796,6 +75080,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66815,6 +75102,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66834,6 +75124,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66853,6 +75146,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66872,6 +75168,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66891,6 +75190,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66910,6 +75212,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66929,6 +75234,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66948,6 +75256,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66967,6 +75278,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -66986,6 +75300,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -67005,6 +75322,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -67024,6 +75344,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -67043,6 +75366,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -67062,6 +75388,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -67081,6 +75410,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -67100,6 +75432,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -67119,6 +75454,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -67138,6 +75476,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -67157,6 +75498,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -67176,6 +75520,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -67195,6 +75542,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -67214,6 +75564,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -67233,6 +75586,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -67252,6 +75608,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -67271,6 +75630,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -67290,6 +75652,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -67309,6 +75674,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67328,6 +75696,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67347,6 +75718,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67366,6 +75740,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67385,6 +75762,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67404,6 +75784,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67423,6 +75806,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67442,6 +75828,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67461,6 +75850,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67480,6 +75872,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67499,6 +75894,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67518,6 +75916,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67537,6 +75938,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67556,6 +75960,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67575,6 +75982,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67594,6 +76004,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67613,6 +76026,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67632,6 +76048,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67651,6 +76070,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67670,6 +76092,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67689,6 +76114,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67708,6 +76136,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67727,6 +76158,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67746,6 +76180,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67765,6 +76202,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67784,6 +76224,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67803,6 +76246,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67822,6 +76268,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67841,6 +76290,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67860,6 +76312,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67879,6 +76334,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67898,6 +76356,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67917,6 +76378,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67936,6 +76400,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67955,6 +76422,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67974,6 +76444,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -67993,6 +76466,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68012,6 +76488,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68031,6 +76510,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68050,6 +76532,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68069,6 +76554,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68088,6 +76576,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68107,6 +76598,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68126,6 +76620,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68145,6 +76642,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68164,6 +76664,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68183,6 +76686,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68202,6 +76708,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68221,6 +76730,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68240,6 +76752,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68259,6 +76774,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68278,6 +76796,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68297,6 +76818,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68316,6 +76840,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68335,6 +76862,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68354,6 +76884,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68373,6 +76906,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68392,6 +76928,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68411,6 +76950,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68430,6 +76972,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68449,6 +76994,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68468,6 +77016,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68487,6 +77038,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68506,6 +77060,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68525,6 +77082,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68544,6 +77104,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68563,6 +77126,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68582,6 +77148,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68601,6 +77170,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68620,6 +77192,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68639,6 +77214,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68658,6 +77236,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68677,6 +77258,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68696,6 +77280,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68715,6 +77302,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68734,6 +77324,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68753,6 +77346,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68772,6 +77368,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68791,6 +77390,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68810,6 +77412,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68829,6 +77434,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68848,6 +77456,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68867,6 +77478,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68886,6 +77500,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68905,6 +77522,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68924,6 +77544,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68943,6 +77566,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68962,6 +77588,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -68981,6 +77610,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69000,6 +77632,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69019,6 +77654,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69038,6 +77676,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69057,6 +77698,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69076,6 +77720,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69095,6 +77742,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69114,6 +77764,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69133,6 +77786,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69152,6 +77808,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69171,6 +77830,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69190,6 +77852,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69209,6 +77874,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69228,6 +77896,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69247,6 +77918,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69266,6 +77940,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69285,6 +77962,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69304,6 +77984,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69323,6 +78006,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69342,6 +78028,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69361,6 +78050,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69380,6 +78072,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69399,6 +78094,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69418,6 +78116,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69437,6 +78138,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69456,6 +78160,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69475,6 +78182,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69494,6 +78204,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69513,6 +78226,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69532,6 +78248,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69551,6 +78270,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69570,6 +78292,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69589,6 +78314,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69608,6 +78336,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69627,6 +78358,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69646,6 +78380,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69665,6 +78402,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69684,6 +78424,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69703,6 +78446,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69722,6 +78468,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69741,6 +78490,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69760,6 +78512,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69779,6 +78534,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69798,6 +78556,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69817,6 +78578,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69836,6 +78600,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69855,6 +78622,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69874,6 +78644,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69893,6 +78666,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69912,6 +78688,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69931,6 +78710,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69950,6 +78732,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69969,6 +78754,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -69988,6 +78776,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70007,6 +78798,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70026,6 +78820,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70045,6 +78842,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70064,6 +78864,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70083,6 +78886,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70102,6 +78908,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70121,6 +78930,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70140,6 +78952,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70159,6 +78974,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70178,6 +78996,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70197,6 +79018,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70216,6 +79040,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70235,6 +79062,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70254,6 +79084,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70273,6 +79106,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70292,6 +79128,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70311,6 +79150,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70330,6 +79172,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70349,6 +79194,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70368,6 +79216,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70387,6 +79238,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70406,6 +79260,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70425,6 +79282,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70444,6 +79304,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70463,6 +79326,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70482,6 +79348,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70501,6 +79370,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70520,6 +79392,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70539,6 +79414,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70558,6 +79436,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70577,6 +79458,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70596,6 +79480,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70615,6 +79502,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70634,6 +79524,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70653,6 +79546,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70672,6 +79568,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70691,6 +79590,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70710,6 +79612,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70729,6 +79634,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70748,6 +79656,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70767,6 +79678,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70786,6 +79700,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70805,6 +79722,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70824,6 +79744,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70843,6 +79766,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70862,6 +79788,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70881,6 +79810,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70900,6 +79832,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70919,6 +79854,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70938,6 +79876,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70957,6 +79898,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70976,6 +79920,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -70995,6 +79942,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71014,6 +79964,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71033,6 +79986,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71052,6 +80008,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71071,6 +80030,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71090,6 +80052,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71109,6 +80074,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71128,6 +80096,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71147,6 +80118,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71166,6 +80140,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71185,6 +80162,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71204,6 +80184,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71223,6 +80206,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71242,6 +80228,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71261,6 +80250,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71280,6 +80272,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71299,6 +80294,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71318,6 +80316,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71337,6 +80338,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71356,6 +80360,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71375,6 +80382,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71394,6 +80404,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71413,6 +80426,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71432,6 +80448,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71451,6 +80470,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71470,6 +80492,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71489,6 +80514,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71508,6 +80536,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71527,6 +80558,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71546,6 +80580,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71565,6 +80602,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71584,6 +80624,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71603,6 +80646,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71622,6 +80668,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71641,6 +80690,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71660,6 +80712,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71679,6 +80734,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71698,6 +80756,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71717,6 +80778,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71736,6 +80800,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71755,6 +80822,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71774,6 +80844,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71793,6 +80866,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71812,6 +80888,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71831,6 +80910,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71850,6 +80932,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71869,6 +80954,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71888,6 +80976,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71907,6 +80998,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71926,6 +81020,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71945,6 +81042,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71964,6 +81064,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -71983,6 +81086,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72002,6 +81108,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72021,6 +81130,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72040,6 +81152,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72059,6 +81174,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72078,6 +81196,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72097,6 +81218,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72116,6 +81240,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72135,6 +81262,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72154,6 +81284,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72173,6 +81306,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72192,6 +81328,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72211,6 +81350,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72230,6 +81372,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72249,6 +81394,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72268,6 +81416,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72287,6 +81438,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72306,6 +81460,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72325,6 +81482,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72344,6 +81504,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72363,6 +81526,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72382,6 +81548,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72401,6 +81570,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72420,6 +81592,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72439,6 +81614,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72458,6 +81636,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72477,6 +81658,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72496,6 +81680,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72515,6 +81702,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72534,6 +81724,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72553,6 +81746,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72572,6 +81768,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72591,6 +81790,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72610,6 +81812,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72629,6 +81834,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72648,6 +81856,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72667,6 +81878,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72686,6 +81900,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72705,6 +81922,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72724,6 +81944,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72743,6 +81966,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72762,6 +81988,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72781,6 +82010,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72800,6 +82032,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72819,6 +82054,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72838,6 +82076,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72857,6 +82098,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72876,6 +82120,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72895,6 +82142,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72914,6 +82164,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72933,6 +82186,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72952,6 +82208,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72971,6 +82230,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -72990,6 +82252,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -73009,6 +82274,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -73028,6 +82296,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -73047,6 +82318,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -73066,6 +82340,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -73085,6 +82362,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -73104,6 +82384,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -73123,6 +82406,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -73142,6 +82428,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -73161,6 +82450,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -73180,6 +82472,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -73199,6 +82494,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -73218,6 +82516,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -73237,6 +82538,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -73256,6 +82560,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -73275,6 +82582,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -73294,6 +82604,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -73313,6 +82626,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -73332,6 +82648,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -73351,6 +82670,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -73370,6 +82692,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -73389,6 +82714,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -73408,6 +82736,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -73427,6 +82758,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -73446,6 +82780,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -73465,6 +82802,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -73484,6 +82824,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -73503,6 +82846,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -73522,6 +82868,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -73541,6 +82890,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -73560,6 +82912,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -73579,6 +82934,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -73598,6 +82956,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -73617,6 +82978,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -73636,6 +83000,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -73655,6 +83022,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -73674,6 +83044,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -73693,6 +83066,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -73712,6 +83088,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -73731,6 +83110,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -73750,6 +83132,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -73769,6 +83154,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -73788,6 +83176,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -73807,6 +83198,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -73826,6 +83220,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -73845,6 +83242,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -73864,6 +83264,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -73883,6 +83286,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -73902,6 +83308,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -73921,6 +83330,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -73940,6 +83352,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -73959,6 +83374,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -73978,6 +83396,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -73997,6 +83418,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74016,6 +83440,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74035,6 +83462,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74054,6 +83484,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74073,6 +83506,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74092,6 +83528,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74111,6 +83550,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74130,6 +83572,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74149,6 +83594,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74168,6 +83616,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74187,6 +83638,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74206,6 +83660,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74225,6 +83682,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74244,6 +83704,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74263,6 +83726,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74282,6 +83748,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74301,6 +83770,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74320,6 +83792,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74339,6 +83814,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74358,6 +83836,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74377,6 +83858,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74396,6 +83880,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74415,6 +83902,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74434,6 +83924,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74453,6 +83946,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74472,6 +83968,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74491,6 +83990,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74510,6 +84012,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74529,6 +84034,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74548,6 +84056,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74567,6 +84078,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74586,6 +84100,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74605,6 +84122,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74624,6 +84144,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74643,6 +84166,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74662,6 +84188,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74681,6 +84210,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74700,6 +84232,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74719,6 +84254,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74738,6 +84276,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74757,6 +84298,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74776,6 +84320,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74795,6 +84342,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74814,6 +84364,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74833,6 +84386,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74852,6 +84408,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74871,6 +84430,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74890,6 +84452,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74909,6 +84474,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74928,6 +84496,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74947,6 +84518,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74966,6 +84540,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -74985,6 +84562,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75004,6 +84584,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75023,6 +84606,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75042,6 +84628,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75061,6 +84650,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75080,6 +84672,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75099,6 +84694,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75118,6 +84716,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75137,6 +84738,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75156,6 +84760,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75175,6 +84782,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75194,6 +84804,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75213,6 +84826,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75232,6 +84848,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75251,6 +84870,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75270,6 +84892,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75289,6 +84914,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75308,6 +84936,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75327,6 +84958,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75346,6 +84980,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75365,6 +85002,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75384,6 +85024,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75403,6 +85046,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75422,6 +85068,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75441,6 +85090,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75460,6 +85112,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75479,6 +85134,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75498,6 +85156,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75517,6 +85178,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75536,6 +85200,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75555,6 +85222,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75574,6 +85244,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75593,6 +85266,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75612,6 +85288,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75631,6 +85310,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75650,6 +85332,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75669,6 +85354,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75688,6 +85376,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75707,6 +85398,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75726,6 +85420,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75745,6 +85442,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75764,6 +85464,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75783,6 +85486,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75802,6 +85508,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75821,6 +85530,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75840,6 +85552,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75859,6 +85574,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75878,6 +85596,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75897,6 +85618,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75916,6 +85640,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75935,6 +85662,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75954,6 +85684,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75973,6 +85706,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -75992,6 +85728,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76011,6 +85750,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76030,6 +85772,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76049,6 +85794,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76068,6 +85816,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76087,6 +85838,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76106,6 +85860,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76125,6 +85882,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76144,6 +85904,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76163,6 +85926,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76182,6 +85948,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76201,6 +85970,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76220,6 +85992,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76239,6 +86014,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76258,6 +86036,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76277,6 +86058,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76296,6 +86080,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76315,6 +86102,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76334,6 +86124,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76353,6 +86146,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76372,6 +86168,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76391,6 +86190,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76410,6 +86212,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76429,6 +86234,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76448,6 +86256,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76467,6 +86278,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76486,6 +86300,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76505,6 +86322,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76524,6 +86344,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76543,6 +86366,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76562,6 +86388,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76581,6 +86410,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76600,6 +86432,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76619,6 +86454,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76638,6 +86476,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76657,6 +86498,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76676,6 +86520,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76695,6 +86542,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76714,6 +86564,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76733,6 +86586,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76752,6 +86608,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76771,6 +86630,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76790,6 +86652,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76809,6 +86674,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76828,6 +86696,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76847,6 +86718,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76866,6 +86740,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76885,6 +86762,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76904,6 +86784,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76923,6 +86806,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76942,6 +86828,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76961,6 +86850,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76980,6 +86872,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -76999,6 +86894,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77018,6 +86916,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77037,6 +86938,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77056,6 +86960,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77075,6 +86982,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77094,6 +87004,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77113,6 +87026,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77132,6 +87048,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77151,6 +87070,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77170,6 +87092,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77189,6 +87114,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77208,6 +87136,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77227,6 +87158,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77246,6 +87180,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77265,6 +87202,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77284,6 +87224,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77303,6 +87246,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77322,6 +87268,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77341,6 +87290,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77360,6 +87312,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77379,6 +87334,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77398,6 +87356,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77417,6 +87378,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77436,6 +87400,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77455,6 +87422,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77474,6 +87444,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77493,6 +87466,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77512,6 +87488,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77531,6 +87510,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77550,6 +87532,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77569,6 +87554,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77588,6 +87576,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77607,6 +87598,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77626,6 +87620,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77645,6 +87642,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77664,6 +87664,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77683,6 +87686,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77702,6 +87708,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77721,6 +87730,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77740,6 +87752,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77759,6 +87774,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77778,6 +87796,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77797,6 +87818,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77816,6 +87840,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77835,6 +87862,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77854,6 +87884,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77873,6 +87906,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77892,6 +87928,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77911,6 +87950,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77930,6 +87972,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77949,6 +87994,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77968,6 +88016,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -77987,6 +88038,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78006,6 +88060,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78025,6 +88082,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78044,6 +88104,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78063,6 +88126,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78082,6 +88148,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78101,6 +88170,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78120,6 +88192,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78139,6 +88214,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78158,6 +88236,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78177,6 +88258,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78196,6 +88280,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78215,6 +88302,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78234,6 +88324,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78253,6 +88346,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78272,6 +88368,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78291,6 +88390,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78310,6 +88412,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78329,6 +88434,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78348,6 +88456,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78367,6 +88478,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78386,6 +88500,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78405,6 +88522,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78424,6 +88544,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78443,6 +88566,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78462,6 +88588,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78481,6 +88610,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78500,6 +88632,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78519,6 +88654,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78538,6 +88676,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78557,6 +88698,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78576,6 +88720,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78595,6 +88742,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78614,6 +88764,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78633,6 +88786,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78652,6 +88808,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78671,6 +88830,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78690,6 +88852,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78709,6 +88874,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78728,6 +88896,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78747,6 +88918,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78766,6 +88940,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78785,6 +88962,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78804,6 +88984,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78823,6 +89006,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78842,6 +89028,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78861,6 +89050,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78880,6 +89072,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78899,6 +89094,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78918,6 +89116,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78937,6 +89138,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78956,6 +89160,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78975,6 +89182,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -78994,6 +89204,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79013,6 +89226,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79032,6 +89248,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79051,6 +89270,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79070,6 +89292,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79089,6 +89314,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79108,6 +89336,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79127,6 +89358,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79146,6 +89380,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79165,6 +89402,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79184,6 +89424,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79203,6 +89446,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79222,6 +89468,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79241,6 +89490,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79260,6 +89512,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79279,6 +89534,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79298,6 +89556,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79317,6 +89578,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79336,6 +89600,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79355,6 +89622,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79374,6 +89644,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79393,6 +89666,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79412,6 +89688,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79431,6 +89710,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79450,6 +89732,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79469,6 +89754,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79488,6 +89776,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79507,6 +89798,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79526,6 +89820,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79545,6 +89842,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79564,6 +89864,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79583,6 +89886,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79602,6 +89908,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79621,6 +89930,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79640,6 +89952,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79659,6 +89974,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79678,6 +89996,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79697,6 +90018,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79716,6 +90040,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79735,6 +90062,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79754,6 +90084,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79773,6 +90106,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79792,6 +90128,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79811,6 +90150,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79830,6 +90172,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79849,6 +90194,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79868,6 +90216,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79887,6 +90238,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79906,6 +90260,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79925,6 +90282,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79944,6 +90304,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79963,6 +90326,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -79982,6 +90348,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -80001,6 +90370,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -80020,6 +90392,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -80039,6 +90414,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -80058,6 +90436,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -80077,6 +90458,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -80096,6 +90480,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -80115,6 +90502,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -80134,6 +90524,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -80153,6 +90546,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80172,6 +90568,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80191,6 +90590,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80210,6 +90612,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80229,6 +90634,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80248,6 +90656,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80267,6 +90678,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80286,6 +90700,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80305,6 +90722,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80324,6 +90744,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80343,6 +90766,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80362,6 +90788,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80381,6 +90810,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80400,6 +90832,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80419,6 +90854,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80438,6 +90876,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80457,6 +90898,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80476,6 +90920,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80495,6 +90942,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80514,6 +90964,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80533,6 +90986,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80552,6 +91008,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80571,6 +91030,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80590,6 +91052,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80609,6 +91074,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80628,6 +91096,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80647,6 +91118,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80666,6 +91140,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80685,6 +91162,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80704,6 +91184,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80723,6 +91206,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80742,6 +91228,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80761,6 +91250,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80780,6 +91272,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80799,6 +91294,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80818,6 +91316,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80837,6 +91338,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80856,6 +91360,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80875,6 +91382,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80894,6 +91404,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80913,6 +91426,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80932,6 +91448,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80951,6 +91470,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80970,6 +91492,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -80989,6 +91514,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -81008,6 +91536,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -81027,6 +91558,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -81046,6 +91580,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -81065,6 +91602,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -81084,6 +91624,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -81103,6 +91646,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -81122,6 +91668,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -81141,6 +91690,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -81160,6 +91712,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -81179,6 +91734,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -81198,6 +91756,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -81217,6 +91778,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -81236,6 +91800,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -81255,6 +91822,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -81274,6 +91844,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -81293,6 +91866,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -81312,6 +91888,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -81331,6 +91910,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -81350,6 +91932,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81369,6 +91954,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81388,6 +91976,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81407,6 +91998,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81426,6 +92020,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81445,6 +92042,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81464,6 +92064,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81483,6 +92086,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81502,6 +92108,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81521,6 +92130,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81540,6 +92152,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81559,6 +92174,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81578,6 +92196,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81597,6 +92218,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81616,6 +92240,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81635,6 +92262,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81654,6 +92284,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81673,6 +92306,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81692,6 +92328,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81711,6 +92350,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81730,6 +92372,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81749,6 +92394,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81768,6 +92416,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81787,6 +92438,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81806,6 +92460,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81825,6 +92482,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81844,6 +92504,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81863,6 +92526,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81882,6 +92548,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81901,6 +92570,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81920,6 +92592,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81939,6 +92614,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81958,6 +92636,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81977,6 +92658,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -81996,6 +92680,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82015,6 +92702,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82034,6 +92724,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82053,6 +92746,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82072,6 +92768,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82091,6 +92790,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82110,6 +92812,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82129,6 +92834,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82148,6 +92856,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82167,6 +92878,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82186,6 +92900,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82205,6 +92922,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82224,6 +92944,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82243,6 +92966,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82262,6 +92988,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82281,6 +93010,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82300,6 +93032,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82319,6 +93054,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82338,6 +93076,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82357,6 +93098,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82376,6 +93120,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82395,6 +93142,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82414,6 +93164,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82433,6 +93186,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82452,6 +93208,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82471,6 +93230,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82490,6 +93252,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82509,6 +93274,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82528,6 +93296,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82547,6 +93318,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82566,6 +93340,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82585,6 +93362,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82604,6 +93384,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82623,6 +93406,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82642,6 +93428,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82661,6 +93450,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82680,6 +93472,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82699,6 +93494,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82718,6 +93516,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82737,6 +93538,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82756,6 +93560,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82775,6 +93582,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82794,6 +93604,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82813,6 +93626,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82832,6 +93648,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82851,6 +93670,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82870,6 +93692,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82889,6 +93714,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82908,6 +93736,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82927,6 +93758,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82946,6 +93780,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82965,6 +93802,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -82984,6 +93824,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83003,6 +93846,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83022,6 +93868,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83041,6 +93890,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83060,6 +93912,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83079,6 +93934,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83098,6 +93956,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83117,6 +93978,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83136,6 +94000,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83155,6 +94022,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83174,6 +94044,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83193,6 +94066,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83212,6 +94088,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83231,6 +94110,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83250,6 +94132,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83269,6 +94154,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83288,6 +94176,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83307,6 +94198,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83326,6 +94220,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83345,6 +94242,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83364,6 +94264,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83383,6 +94286,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83402,6 +94308,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83421,6 +94330,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83440,6 +94352,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83459,6 +94374,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83478,6 +94396,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83497,6 +94418,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83516,6 +94440,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83535,6 +94462,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83554,6 +94484,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83573,6 +94506,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83592,6 +94528,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83611,6 +94550,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83630,6 +94572,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83649,6 +94594,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83668,6 +94616,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83687,6 +94638,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83706,6 +94660,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83725,6 +94682,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83744,6 +94704,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83763,6 +94726,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83782,6 +94748,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83801,6 +94770,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83820,6 +94792,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83839,6 +94814,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83858,6 +94836,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83877,6 +94858,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83896,6 +94880,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83915,6 +94902,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83934,6 +94924,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83953,6 +94946,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83972,6 +94968,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -83991,6 +94990,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84010,6 +95012,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84029,6 +95034,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84048,6 +95056,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84067,6 +95078,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84086,6 +95100,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84105,6 +95122,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84124,6 +95144,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84143,6 +95166,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84162,6 +95188,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84181,6 +95210,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84200,6 +95232,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84219,6 +95254,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84238,6 +95276,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84257,6 +95298,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84276,6 +95320,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84295,6 +95342,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84314,6 +95364,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84333,6 +95386,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84352,6 +95408,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84371,6 +95430,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84390,6 +95452,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84409,6 +95474,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84428,6 +95496,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84447,6 +95518,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84466,6 +95540,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84485,6 +95562,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84504,6 +95584,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84523,6 +95606,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84542,6 +95628,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84561,6 +95650,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84580,6 +95672,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84599,6 +95694,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84618,6 +95716,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84637,6 +95738,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84656,6 +95760,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84675,6 +95782,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84694,6 +95804,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84713,6 +95826,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84732,6 +95848,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84751,6 +95870,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84770,6 +95892,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84789,6 +95914,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84808,6 +95936,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84827,6 +95958,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84846,6 +95980,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84865,6 +96002,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84884,6 +96024,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84903,6 +96046,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84922,6 +96068,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84941,6 +96090,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84960,6 +96112,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84979,6 +96134,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -84998,6 +96156,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85017,6 +96178,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85036,6 +96200,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85055,6 +96222,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85074,6 +96244,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85093,6 +96266,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85112,6 +96288,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85131,6 +96310,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85150,6 +96332,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85169,6 +96354,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85188,6 +96376,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85207,6 +96398,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85226,6 +96420,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85245,6 +96442,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85264,6 +96464,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85283,6 +96486,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85302,6 +96508,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85321,6 +96530,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85340,6 +96552,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85359,6 +96574,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85378,6 +96596,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85397,6 +96618,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85416,6 +96640,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85435,6 +96662,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85454,6 +96684,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85473,6 +96706,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85492,6 +96728,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85511,6 +96750,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85530,6 +96772,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85549,6 +96794,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85568,6 +96816,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85587,6 +96838,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85606,6 +96860,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85625,6 +96882,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85644,6 +96904,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85663,6 +96926,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85682,6 +96948,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85701,6 +96970,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85720,6 +96992,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85739,6 +97014,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85758,6 +97036,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85777,6 +97058,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85796,6 +97080,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85815,6 +97102,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85834,6 +97124,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85853,6 +97146,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85872,6 +97168,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85891,6 +97190,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85910,6 +97212,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85929,6 +97234,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85948,6 +97256,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85967,6 +97278,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -85986,6 +97300,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -86005,6 +97322,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -86024,6 +97344,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -86043,6 +97366,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -86062,6 +97388,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -86081,6 +97410,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -86100,6 +97432,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -86119,6 +97454,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -86138,6 +97476,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -86157,6 +97498,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -86176,6 +97520,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -86195,6 +97542,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -86214,6 +97564,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -86233,6 +97586,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -86252,6 +97608,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -86271,6 +97630,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -86290,6 +97652,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -86309,6 +97674,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -86328,6 +97696,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -86347,6 +97718,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -86366,6 +97740,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -86385,6 +97762,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -86404,6 +97784,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -86423,6 +97806,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -86442,6 +97828,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -86461,6 +97850,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -86480,6 +97872,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -86499,6 +97894,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -86518,6 +97916,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_decode_fuzzer_one_entry", @@ -86537,6 +97938,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_decode_fuzzer_one_entry", @@ -86556,6 +97960,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_decode_fuzzer_one_entry", @@ -86575,6 +97982,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_decode_fuzzer_one_entry", @@ -86594,6 +98004,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_decode_fuzzer_one_entry", @@ -86613,6 +98026,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_decode_fuzzer_one_entry", @@ -86632,6 +98048,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_decode_fuzzer_one_entry", @@ -86651,6 +98070,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_decode_fuzzer_one_entry", @@ -86670,6 +98092,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_decode_fuzzer_one_entry", @@ -86689,6 +98114,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_decode_fuzzer_one_entry", @@ -86708,6 +98136,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_decode_fuzzer_one_entry", @@ -86727,6 +98158,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_decode_fuzzer_one_entry", @@ -86746,6 +98180,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_decode_fuzzer_one_entry", @@ -86765,6 +98202,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_decode_fuzzer_one_entry", @@ -86784,6 +98224,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_decode_fuzzer_one_entry", @@ -86803,6 +98246,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_decode_fuzzer_one_entry", @@ -86822,6 +98268,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_decode_fuzzer_one_entry", @@ -86841,6 +98290,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_decode_fuzzer_one_entry", @@ -86860,6 +98312,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_decode_fuzzer_one_entry", @@ -86879,6 +98334,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_decode_fuzzer_one_entry", @@ -86898,6 +98356,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_decode_fuzzer_one_entry", @@ -86917,6 +98378,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_decode_fuzzer_one_entry", @@ -86936,6 +98400,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_decode_fuzzer_one_entry", @@ -86955,6 +98422,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_decode_fuzzer_one_entry", @@ -86974,6 +98444,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_decode_fuzzer_one_entry", @@ -86993,6 +98466,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_decode_fuzzer_one_entry", @@ -87012,6 +98488,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_encode_fuzzer_one_entry", @@ -87031,6 +98510,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_encode_fuzzer_one_entry", @@ -87050,6 +98532,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_encode_fuzzer_one_entry", @@ -87069,6 +98554,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_encode_fuzzer_one_entry", @@ -87088,6 +98576,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_encode_fuzzer_one_entry", @@ -87107,6 +98598,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_encode_fuzzer_one_entry", @@ -87126,6 +98620,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_encode_fuzzer_one_entry", @@ -87145,6 +98642,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_encode_fuzzer_one_entry", @@ -87164,6 +98664,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_encode_fuzzer_one_entry", @@ -87183,6 +98686,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_encode_fuzzer_one_entry", @@ -87202,6 +98708,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_encode_fuzzer_one_entry", @@ -87221,6 +98730,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_encode_fuzzer_one_entry", @@ -87240,6 +98752,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_encode_fuzzer_one_entry", @@ -87259,6 +98774,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_encode_fuzzer_one_entry", @@ -87278,6 +98796,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_encode_fuzzer_one_entry", @@ -87297,6 +98818,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "percent_encode_fuzzer_one_entry", @@ -87316,6 +98840,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87335,6 +98862,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87354,6 +98884,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87373,6 +98906,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87392,6 +98928,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87411,6 +98950,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87430,6 +98972,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87449,6 +98994,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87468,6 +99016,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87487,6 +99038,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87506,6 +99060,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87525,6 +99082,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87544,6 +99104,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87563,6 +99126,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87582,6 +99148,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87601,6 +99170,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87620,6 +99192,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87639,6 +99214,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87658,6 +99236,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87677,6 +99258,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87696,6 +99280,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87715,6 +99302,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87734,6 +99324,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87753,6 +99346,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87772,6 +99368,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87791,6 +99390,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87810,6 +99412,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87829,6 +99434,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87848,6 +99456,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87867,6 +99478,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87886,6 +99500,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87905,6 +99522,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87924,6 +99544,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87943,6 +99566,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87962,6 +99588,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -87981,6 +99610,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88000,6 +99632,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88019,6 +99654,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88038,6 +99676,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88057,6 +99698,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88076,6 +99720,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88095,6 +99742,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88114,6 +99764,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88133,6 +99786,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88152,6 +99808,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88171,6 +99830,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88190,6 +99852,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88209,6 +99874,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88228,6 +99896,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88247,6 +99918,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88266,6 +99940,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88285,6 +99962,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88304,6 +99984,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88323,6 +100006,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88342,6 +100028,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88361,6 +100050,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88380,6 +100072,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88399,6 +100094,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88418,6 +100116,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88437,6 +100138,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88456,6 +100160,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88475,6 +100182,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88494,6 +100204,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88513,6 +100226,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88532,6 +100248,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88551,6 +100270,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88570,6 +100292,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88589,6 +100314,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88608,6 +100336,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88627,6 +100358,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88646,6 +100380,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88665,6 +100402,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88684,6 +100424,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88703,6 +100446,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88722,6 +100468,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88741,6 +100490,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88760,6 +100512,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88779,6 +100534,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88798,6 +100556,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88817,6 +100578,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88836,6 +100600,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88855,6 +100622,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88874,6 +100644,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88893,6 +100666,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88912,6 +100688,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88931,6 +100710,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88950,6 +100732,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88969,6 +100754,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -88988,6 +100776,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89007,6 +100798,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89026,6 +100820,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89045,6 +100842,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89064,6 +100864,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89083,6 +100886,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89102,6 +100908,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89121,6 +100930,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89140,6 +100952,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89159,6 +100974,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89178,6 +100996,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89197,6 +101018,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89216,6 +101040,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89235,6 +101062,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89254,6 +101084,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89273,6 +101106,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89292,6 +101128,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89311,6 +101150,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89330,6 +101172,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89349,6 +101194,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89368,6 +101216,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89387,6 +101238,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89406,6 +101260,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89425,6 +101282,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89444,6 +101304,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89463,6 +101326,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89482,6 +101348,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89501,6 +101370,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89520,6 +101392,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89539,6 +101414,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89558,6 +101436,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89577,6 +101458,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89596,6 +101480,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89615,6 +101502,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89634,6 +101524,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89653,6 +101546,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89672,6 +101568,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89691,6 +101590,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89710,6 +101612,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89729,6 +101634,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89748,6 +101656,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89767,6 +101678,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89786,6 +101700,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89805,6 +101722,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89824,6 +101744,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89843,6 +101766,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89862,6 +101788,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89881,6 +101810,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89900,6 +101832,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89919,6 +101854,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89938,6 +101876,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89957,6 +101898,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89976,6 +101920,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -89995,6 +101942,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90014,6 +101964,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90033,6 +101986,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90052,6 +102008,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90071,6 +102030,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90090,6 +102052,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90109,6 +102074,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90128,6 +102096,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90147,6 +102118,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90166,6 +102140,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90185,6 +102162,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90204,6 +102184,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90223,6 +102206,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90242,6 +102228,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90261,6 +102250,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90280,6 +102272,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90299,6 +102294,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90318,6 +102316,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90337,6 +102338,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90356,6 +102360,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90375,6 +102382,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90394,6 +102404,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90413,6 +102426,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90432,6 +102448,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90451,6 +102470,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90470,6 +102492,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90489,6 +102514,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90508,6 +102536,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90527,6 +102558,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90546,6 +102580,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90565,6 +102602,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90584,6 +102624,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90603,6 +102646,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90622,6 +102668,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90641,6 +102690,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90660,6 +102712,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90679,6 +102734,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90698,6 +102756,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90717,6 +102778,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90736,6 +102800,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90755,6 +102822,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90774,6 +102844,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90793,6 +102866,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90812,6 +102888,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90831,6 +102910,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90850,6 +102932,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90869,6 +102954,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90888,6 +102976,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90907,6 +102998,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90926,6 +103020,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90945,6 +103042,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90964,6 +103064,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -90983,6 +103086,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91002,6 +103108,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91021,6 +103130,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91040,6 +103152,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91059,6 +103174,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91078,6 +103196,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91097,6 +103218,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91116,6 +103240,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91135,6 +103262,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91154,6 +103284,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91173,6 +103306,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91192,6 +103328,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91211,6 +103350,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91230,6 +103372,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91249,6 +103394,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91268,6 +103416,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91287,6 +103438,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91306,6 +103460,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91325,6 +103482,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91344,6 +103504,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91363,6 +103526,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91382,6 +103548,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91401,6 +103570,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91420,6 +103592,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91439,6 +103614,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91458,6 +103636,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91477,6 +103658,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91496,6 +103680,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91515,6 +103702,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91534,6 +103724,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91553,6 +103746,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91572,6 +103768,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91591,6 +103790,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91610,6 +103812,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91629,6 +103834,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91648,6 +103856,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91667,6 +103878,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91686,6 +103900,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91705,6 +103922,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91724,6 +103944,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91743,6 +103966,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91762,6 +103988,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91781,6 +104010,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91800,6 +104032,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91819,6 +104054,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91838,6 +104076,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91857,6 +104098,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91876,6 +104120,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91895,6 +104142,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91914,6 +104164,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91933,6 +104186,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91952,6 +104208,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91971,6 +104230,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -91990,6 +104252,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92009,6 +104274,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92028,6 +104296,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92047,6 +104318,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92066,6 +104340,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92085,6 +104362,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92104,6 +104384,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92123,6 +104406,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92142,6 +104428,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92161,6 +104450,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92180,6 +104472,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92199,6 +104494,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92218,6 +104516,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92237,6 +104538,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92256,6 +104560,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92275,6 +104582,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92294,6 +104604,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92313,6 +104626,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92332,6 +104648,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92351,6 +104670,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92370,6 +104692,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92389,6 +104714,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92408,6 +104736,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92427,6 +104758,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92446,6 +104780,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92465,6 +104802,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92484,6 +104824,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92503,6 +104846,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92522,6 +104868,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92541,6 +104890,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92560,6 +104912,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92579,6 +104934,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92598,6 +104956,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92617,6 +104978,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92636,6 +105000,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92655,6 +105022,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92674,6 +105044,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92693,6 +105066,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92712,6 +105088,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92731,6 +105110,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92750,6 +105132,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92769,6 +105154,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92788,6 +105176,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92807,6 +105198,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92826,6 +105220,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92845,6 +105242,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92864,6 +105264,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92883,6 +105286,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92902,6 +105308,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92921,6 +105330,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92940,6 +105352,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92959,6 +105374,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92978,6 +105396,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -92997,6 +105418,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93016,6 +105440,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93035,6 +105462,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93054,6 +105484,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93073,6 +105506,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93092,6 +105528,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93111,6 +105550,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93130,6 +105572,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93149,6 +105594,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93168,6 +105616,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93187,6 +105638,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93206,6 +105660,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93225,6 +105682,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93244,6 +105704,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93263,6 +105726,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93282,6 +105748,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93301,6 +105770,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93320,6 +105792,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93339,6 +105814,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93358,6 +105836,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93377,6 +105858,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93396,6 +105880,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93415,6 +105902,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93434,6 +105924,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93453,6 +105946,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93472,6 +105968,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93491,6 +105990,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93510,6 +106012,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93529,6 +106034,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93548,6 +106056,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93567,6 +106078,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93586,6 +106100,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93605,6 +106122,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93624,6 +106144,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93643,6 +106166,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93662,6 +106188,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93681,6 +106210,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93700,6 +106232,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93719,6 +106254,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93738,6 +106276,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93757,6 +106298,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93776,6 +106320,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93795,6 +106342,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93814,6 +106364,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93833,6 +106386,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93852,6 +106408,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93871,6 +106430,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93890,6 +106452,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93909,6 +106474,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93928,6 +106496,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93947,6 +106518,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93966,6 +106540,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -93985,6 +106562,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94004,6 +106584,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94023,6 +106606,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94042,6 +106628,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94061,6 +106650,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94080,6 +106672,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94099,6 +106694,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94118,6 +106716,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94137,6 +106738,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94156,6 +106760,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94175,6 +106782,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94194,6 +106804,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94213,6 +106826,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94232,6 +106848,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94251,6 +106870,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94270,6 +106892,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94289,6 +106914,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94308,6 +106936,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94327,6 +106958,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94346,6 +106980,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94365,6 +107002,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94384,6 +107024,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94403,6 +107046,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94422,6 +107068,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94441,6 +107090,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94460,6 +107112,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94479,6 +107134,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94498,6 +107156,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94517,6 +107178,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94536,6 +107200,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94555,6 +107222,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94574,6 +107244,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94593,6 +107266,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94612,6 +107288,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94631,6 +107310,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94650,6 +107332,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94669,6 +107354,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94688,6 +107376,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94707,6 +107398,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94726,6 +107420,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94745,6 +107442,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94764,6 +107464,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94783,6 +107486,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94802,6 +107508,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94821,6 +107530,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94840,6 +107552,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94859,6 +107574,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94878,6 +107596,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94897,6 +107618,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94916,6 +107640,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94935,6 +107662,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94954,6 +107684,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94973,6 +107706,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -94992,6 +107728,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -95011,6 +107750,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -95030,6 +107772,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -95049,6 +107794,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -95068,6 +107816,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -95087,6 +107838,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -95106,6 +107860,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -95125,6 +107882,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -95144,6 +107904,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -95163,6 +107926,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -95182,6 +107948,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -95201,6 +107970,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -95220,6 +107992,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -95239,6 +108014,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -95258,6 +108036,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -95277,6 +108058,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -95296,6 +108080,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -95315,6 +108102,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -95334,6 +108124,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -95353,6 +108146,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -95372,6 +108168,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -95391,6 +108190,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -95410,6 +108212,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -95429,6 +108234,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -95448,6 +108256,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -95467,6 +108278,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -95486,6 +108300,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -95505,6 +108322,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -95524,6 +108344,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -95543,6 +108366,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -95562,6 +108388,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -95581,6 +108410,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -95600,6 +108432,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -95619,6 +108454,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -95638,6 +108476,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -95657,6 +108498,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -95676,6 +108520,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -95695,6 +108542,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -95714,6 +108564,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -95733,6 +108586,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -95752,6 +108608,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -95771,6 +108630,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -95790,6 +108652,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -95809,6 +108674,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -95828,6 +108696,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -95847,6 +108718,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -95866,6 +108740,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -95885,6 +108762,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -95904,6 +108784,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -95923,6 +108806,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -95942,6 +108828,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -95961,6 +108850,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -95980,6 +108872,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -95999,6 +108894,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96018,6 +108916,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96037,6 +108938,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96056,6 +108960,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96075,6 +108982,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96094,6 +109004,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96113,6 +109026,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96132,6 +109048,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96151,6 +109070,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96170,6 +109092,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96189,6 +109114,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96208,6 +109136,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96227,6 +109158,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96246,6 +109180,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96265,6 +109202,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96284,6 +109224,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96303,6 +109246,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96322,6 +109268,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96341,6 +109290,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96360,6 +109312,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96379,6 +109334,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96398,6 +109356,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96417,6 +109378,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96436,6 +109400,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96455,6 +109422,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96474,6 +109444,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96493,6 +109466,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96512,6 +109488,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96531,6 +109510,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96550,6 +109532,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96569,6 +109554,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96588,6 +109576,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96607,6 +109598,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96626,6 +109620,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96645,6 +109642,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -96664,6 +109664,9 @@ "exclude_configs": [ "tsan" ], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index 724b792191..bf5742075f 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -176,7 +176,6 @@ - @@ -292,10 +291,6 @@ - - - - diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index 6eb20bc81e..3c7a7d28be 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -19,12 +19,6 @@ test\core\end2end - - test\core\end2end - - - test\core\end2end - test\core\end2end\fixtures @@ -461,9 +455,6 @@ test\core\end2end - - test\core\end2end - test\core\end2end\fixtures diff --git a/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj b/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj index d38045db91..2ba2d9fd3d 100644 --- a/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj @@ -148,7 +148,6 @@ - @@ -164,10 +163,6 @@ - - - - diff --git a/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj.filters index 00615fbf9e..2aeb896901 100644 --- a/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util_unsecure/grpc_test_util_unsecure.vcxproj.filters @@ -4,12 +4,6 @@ test\core\end2end - - test\core\end2end - - - test\core\end2end - test\core\end2end\fixtures @@ -54,9 +48,6 @@ test\core\end2end - - test\core\end2end - test\core\end2end\fixtures -- cgit v1.2.3 From d526e82a8340c5ad169a6bbb770cee23e1c0a441 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Fri, 7 Oct 2016 10:17:01 -0700 Subject: fix small bug --- src/core/lib/iomgr/ev_poll_cv_posix.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/ev_poll_cv_posix.c b/src/core/lib/iomgr/ev_poll_cv_posix.c index cb2c2ba824..1ea811e445 100644 --- a/src/core/lib/iomgr/ev_poll_cv_posix.c +++ b/src/core/lib/iomgr/ev_poll_cv_posix.c @@ -259,10 +259,10 @@ const grpc_event_engine_vtable* grpc_init_poll_cv_posix(void) { int allow_specialized_wakeup_fd = grpc_allow_specialized_wakeup_fd; int allow_pipe_wakeup_fd = grpc_allow_pipe_wakeup_fd; grpc_global_cv_fd_table_init(); - grpc_has_wakeup_fd = 1; grpc_allow_specialized_wakeup_fd = 0; grpc_allow_pipe_wakeup_fd = 0; grpc_wakeup_fd_global_init(); + grpc_has_wakeup_fd = 1; ev_poll_vtable = grpc_init_poll_posix(); if (!ev_poll_vtable) { grpc_global_cv_fd_table_shutdown(); @@ -272,7 +272,6 @@ const grpc_event_engine_vtable* grpc_init_poll_cv_posix(void) { grpc_global_cv_fd_table_init(); return NULL; } - vtable = *ev_poll_vtable; vtable.shutdown_engine = shutdown_engine; return &vtable; -- cgit v1.2.3 From 131a1065fb23d9fd4be60361dffb9f8a0042f0cc Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Fri, 7 Oct 2016 14:03:30 -0700 Subject: Remove test-forcing hack --- src/core/lib/iomgr/ev_posix.c | 1 - src/core/lib/iomgr/wakeup_fd_posix.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/ev_posix.c b/src/core/lib/iomgr/ev_posix.c index a4102b429f..2fc8ccfa91 100644 --- a/src/core/lib/iomgr/ev_posix.c +++ b/src/core/lib/iomgr/ev_posix.c @@ -65,7 +65,6 @@ typedef struct { } event_engine_factory; static const event_engine_factory g_factories[] = { - {"poll-cv", grpc_init_poll_cv_posix}, {"epoll", grpc_init_epoll_linux}, {"poll", grpc_init_poll_posix}, {"poll-cv", grpc_init_poll_cv_posix}, diff --git a/src/core/lib/iomgr/wakeup_fd_posix.c b/src/core/lib/iomgr/wakeup_fd_posix.c index d8eafc4192..041c221de3 100644 --- a/src/core/lib/iomgr/wakeup_fd_posix.c +++ b/src/core/lib/iomgr/wakeup_fd_posix.c @@ -33,7 +33,7 @@ #include -#ifdef GPR_POSIX_SOCKET +#ifdef GPR_POSIX_WAKEUP_FD #include #include "src/core/lib/iomgr/wakeup_fd_cv.h" -- cgit v1.2.3 From 668a842c1b7beed375989a5988583533017abae1 Mon Sep 17 00:00:00 2001 From: kpayson64 Date: Mon, 10 Oct 2016 01:40:09 -0700 Subject: Wakeup fds on bad poll --- src/core/lib/iomgr/ev_poll_posix.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.c index 16a5e3083e..3de329c645 100644 --- a/src/core/lib/iomgr/ev_poll_posix.c +++ b/src/core/lib/iomgr/ev_poll_posix.c @@ -961,8 +961,16 @@ static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, if (errno != EINTR) { work_combine_error(&error, GRPC_OS_ERROR(errno, "poll")); } + for (i = 2; i < pfd_count; i++) { - fd_end_poll(exec_ctx, &watchers[i], 0, 0, NULL); + if (watchers[i].fd == NULL) { + fd_end_poll(exec_ctx, &watchers[i], 0, 0, NULL); + } else { + // Wake up all the file descriptors, if we have an invalid one + // we can identify it on the next pollset_work() + fd_end_poll(exec_ctx, &watchers[i], POLLIN_CHECK, POLLOUT_CHECK, + pollset); + } } } else if (r == 0) { for (i = 2; i < pfd_count; i++) { -- cgit v1.2.3 From d195cf589d3f03b4f08017f3e2885c2c2fff125b Mon Sep 17 00:00:00 2001 From: kpayson64 Date: Sun, 9 Oct 2016 18:04:00 -0700 Subject: Add condition variable polling engine --- BUILD | 16 ++ CMakeLists.txt | 6 + Makefile | 44 +++ binding.gyp | 2 + build.yaml | 18 ++ config.m4 | 2 + gRPC-Core.podspec | 6 + grpc.gemspec | 4 + package.xml | 4 + src/core/lib/iomgr/ev_epoll_linux.c | 4 + src/core/lib/iomgr/ev_poll_cv_posix.c | 297 +++++++++++++++++++++ src/core/lib/iomgr/ev_poll_cv_posix.h | 68 +++++ src/core/lib/iomgr/ev_poll_posix.c | 3 + src/core/lib/iomgr/ev_posix.c | 2 + src/core/lib/iomgr/wakeup_fd_cv.c | 118 ++++++++ src/core/lib/iomgr/wakeup_fd_cv.h | 55 ++++ src/core/lib/iomgr/wakeup_fd_pipe.c | 12 +- src/core/lib/iomgr/wakeup_fd_posix.c | 9 +- src/core/lib/iomgr/wakeup_fd_posix.h | 2 + src/python/grpcio/grpc_core_dependencies.py | 2 + test/core/iomgr/wakeup_fd_cv_test.c | 240 +++++++++++++++++ tools/doxygen/Doxyfile.core.internal | 4 + tools/run_tests/run_tests.py | 2 +- tools/run_tests/sources_and_headers.json | 23 ++ tools/run_tests/tests.json | 19 ++ vsprojects/vcxproj/grpc/grpc.vcxproj | 6 + vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 12 + .../vcxproj/grpc_test_util/grpc_test_util.vcxproj | 6 + .../grpc_test_util/grpc_test_util.vcxproj.filters | 12 + .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 6 + .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 12 + 31 files changed, 1010 insertions(+), 6 deletions(-) create mode 100644 src/core/lib/iomgr/ev_poll_cv_posix.c create mode 100644 src/core/lib/iomgr/ev_poll_cv_posix.h create mode 100644 src/core/lib/iomgr/wakeup_fd_cv.c create mode 100644 src/core/lib/iomgr/wakeup_fd_cv.h create mode 100644 test/core/iomgr/wakeup_fd_cv_test.c (limited to 'src/core/lib') diff --git a/BUILD b/BUILD index bad6f3f075..ba44367dbb 100644 --- a/BUILD +++ b/BUILD @@ -186,6 +186,7 @@ cc_library( "src/core/lib/iomgr/error.h", "src/core/lib/iomgr/ev_epoll_linux.h", "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", + "src/core/lib/iomgr/ev_poll_cv_posix.h", "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/exec_ctx.h", @@ -217,6 +218,7 @@ cc_library( "src/core/lib/iomgr/timer_heap.h", "src/core/lib/iomgr/udp_server.h", "src/core/lib/iomgr/unix_sockets_posix.h", + "src/core/lib/iomgr/wakeup_fd_cv.h", "src/core/lib/iomgr/wakeup_fd_pipe.h", "src/core/lib/iomgr/wakeup_fd_posix.h", "src/core/lib/iomgr/workqueue.h", @@ -347,6 +349,7 @@ cc_library( "src/core/lib/iomgr/error.c", "src/core/lib/iomgr/ev_epoll_linux.c", "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", + "src/core/lib/iomgr/ev_poll_cv_posix.c", "src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/exec_ctx.c", @@ -379,6 +382,7 @@ cc_library( "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", @@ -587,6 +591,7 @@ cc_library( "src/core/lib/iomgr/error.h", "src/core/lib/iomgr/ev_epoll_linux.h", "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", + "src/core/lib/iomgr/ev_poll_cv_posix.h", "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/exec_ctx.h", @@ -618,6 +623,7 @@ cc_library( "src/core/lib/iomgr/timer_heap.h", "src/core/lib/iomgr/udp_server.h", "src/core/lib/iomgr/unix_sockets_posix.h", + "src/core/lib/iomgr/wakeup_fd_cv.h", "src/core/lib/iomgr/wakeup_fd_pipe.h", "src/core/lib/iomgr/wakeup_fd_posix.h", "src/core/lib/iomgr/workqueue.h", @@ -733,6 +739,7 @@ cc_library( "src/core/lib/iomgr/error.c", "src/core/lib/iomgr/ev_epoll_linux.c", "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", + "src/core/lib/iomgr/ev_poll_cv_posix.c", "src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/exec_ctx.c", @@ -765,6 +772,7 @@ cc_library( "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", @@ -943,6 +951,7 @@ cc_library( "src/core/lib/iomgr/error.h", "src/core/lib/iomgr/ev_epoll_linux.h", "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", + "src/core/lib/iomgr/ev_poll_cv_posix.h", "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/exec_ctx.h", @@ -974,6 +983,7 @@ cc_library( "src/core/lib/iomgr/timer_heap.h", "src/core/lib/iomgr/udp_server.h", "src/core/lib/iomgr/unix_sockets_posix.h", + "src/core/lib/iomgr/wakeup_fd_cv.h", "src/core/lib/iomgr/wakeup_fd_pipe.h", "src/core/lib/iomgr/wakeup_fd_posix.h", "src/core/lib/iomgr/workqueue.h", @@ -1081,6 +1091,7 @@ cc_library( "src/core/lib/iomgr/error.c", "src/core/lib/iomgr/ev_epoll_linux.c", "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", + "src/core/lib/iomgr/ev_poll_cv_posix.c", "src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/exec_ctx.c", @@ -1113,6 +1124,7 @@ cc_library( "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", @@ -1844,6 +1856,7 @@ objc_library( "src/core/lib/iomgr/error.c", "src/core/lib/iomgr/ev_epoll_linux.c", "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", + "src/core/lib/iomgr/ev_poll_cv_posix.c", "src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/exec_ctx.c", @@ -1876,6 +1889,7 @@ objc_library( "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", @@ -2063,6 +2077,7 @@ objc_library( "src/core/lib/iomgr/error.h", "src/core/lib/iomgr/ev_epoll_linux.h", "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", + "src/core/lib/iomgr/ev_poll_cv_posix.h", "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/exec_ctx.h", @@ -2094,6 +2109,7 @@ objc_library( "src/core/lib/iomgr/timer_heap.h", "src/core/lib/iomgr/udp_server.h", "src/core/lib/iomgr/unix_sockets_posix.h", + "src/core/lib/iomgr/wakeup_fd_cv.h", "src/core/lib/iomgr/wakeup_fd_pipe.h", "src/core/lib/iomgr/wakeup_fd_posix.h", "src/core/lib/iomgr/workqueue.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index c4191521bd..747d1fab4d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -314,6 +314,7 @@ add_library(grpc src/core/lib/iomgr/error.c src/core/lib/iomgr/ev_epoll_linux.c src/core/lib/iomgr/ev_poll_and_epoll_posix.c + src/core/lib/iomgr/ev_poll_cv_posix.c src/core/lib/iomgr/ev_poll_posix.c src/core/lib/iomgr/ev_posix.c src/core/lib/iomgr/exec_ctx.c @@ -346,6 +347,7 @@ add_library(grpc 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 @@ -573,6 +575,7 @@ add_library(grpc_cronet src/core/lib/iomgr/error.c src/core/lib/iomgr/ev_epoll_linux.c src/core/lib/iomgr/ev_poll_and_epoll_posix.c + src/core/lib/iomgr/ev_poll_cv_posix.c src/core/lib/iomgr/ev_poll_posix.c src/core/lib/iomgr/ev_posix.c src/core/lib/iomgr/exec_ctx.c @@ -605,6 +608,7 @@ add_library(grpc_cronet 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 @@ -804,6 +808,7 @@ add_library(grpc_unsecure src/core/lib/iomgr/error.c src/core/lib/iomgr/ev_epoll_linux.c src/core/lib/iomgr/ev_poll_and_epoll_posix.c + src/core/lib/iomgr/ev_poll_cv_posix.c src/core/lib/iomgr/ev_poll_posix.c src/core/lib/iomgr/ev_posix.c src/core/lib/iomgr/exec_ctx.c @@ -836,6 +841,7 @@ add_library(grpc_unsecure 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 diff --git a/Makefile b/Makefile index 62c65822b0..1f4c9b5c32 100644 --- a/Makefile +++ b/Makefile @@ -1025,6 +1025,7 @@ transport_security_test: $(BINDIR)/$(CONFIG)/transport_security_test udp_server_test: $(BINDIR)/$(CONFIG)/udp_server_test uri_fuzzer_test: $(BINDIR)/$(CONFIG)/uri_fuzzer_test uri_parser_test: $(BINDIR)/$(CONFIG)/uri_parser_test +wakeup_fd_cv_test: $(BINDIR)/$(CONFIG)/wakeup_fd_cv_test alarm_cpp_test: $(BINDIR)/$(CONFIG)/alarm_cpp_test async_end2end_test: $(BINDIR)/$(CONFIG)/async_end2end_test auth_property_iterator_test: $(BINDIR)/$(CONFIG)/auth_property_iterator_test @@ -1340,6 +1341,7 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/transport_security_test \ $(BINDIR)/$(CONFIG)/udp_server_test \ $(BINDIR)/$(CONFIG)/uri_parser_test \ + $(BINDIR)/$(CONFIG)/wakeup_fd_cv_test \ $(BINDIR)/$(CONFIG)/public_headers_must_be_c89 \ $(BINDIR)/$(CONFIG)/badreq_bad_client_test \ $(BINDIR)/$(CONFIG)/connection_prefix_bad_client_test \ @@ -1738,6 +1740,8 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/udp_server_test || ( echo test udp_server_test failed ; exit 1 ) $(E) "[RUN] Testing uri_parser_test" $(Q) $(BINDIR)/$(CONFIG)/uri_parser_test || ( echo test uri_parser_test failed ; exit 1 ) + $(E) "[RUN] Testing wakeup_fd_cv_test" + $(Q) $(BINDIR)/$(CONFIG)/wakeup_fd_cv_test || ( echo test wakeup_fd_cv_test failed ; exit 1 ) $(E) "[RUN] Testing public_headers_must_be_c89" $(Q) $(BINDIR)/$(CONFIG)/public_headers_must_be_c89 || ( echo test public_headers_must_be_c89 failed ; exit 1 ) $(E) "[RUN] Testing badreq_bad_client_test" @@ -2558,6 +2562,7 @@ LIBGRPC_SRC = \ src/core/lib/iomgr/error.c \ src/core/lib/iomgr/ev_epoll_linux.c \ src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ + src/core/lib/iomgr/ev_poll_cv_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ @@ -2590,6 +2595,7 @@ LIBGRPC_SRC = \ 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 \ @@ -2835,6 +2841,7 @@ LIBGRPC_CRONET_SRC = \ src/core/lib/iomgr/error.c \ src/core/lib/iomgr/ev_epoll_linux.c \ src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ + src/core/lib/iomgr/ev_poll_cv_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ @@ -2867,6 +2874,7 @@ LIBGRPC_CRONET_SRC = \ 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 \ @@ -3102,6 +3110,7 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/lib/iomgr/error.c \ src/core/lib/iomgr/ev_epoll_linux.c \ src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ + src/core/lib/iomgr/ev_poll_cv_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ @@ -3134,6 +3143,7 @@ LIBGRPC_TEST_UTIL_SRC = \ 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 \ @@ -3296,6 +3306,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/iomgr/error.c \ src/core/lib/iomgr/ev_epoll_linux.c \ src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ + src/core/lib/iomgr/ev_poll_cv_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ @@ -3328,6 +3339,7 @@ LIBGRPC_UNSECURE_SRC = \ 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 \ @@ -10757,6 +10769,38 @@ endif endif +WAKEUP_FD_CV_TEST_SRC = \ + test/core/iomgr/wakeup_fd_cv_test.c \ + +WAKEUP_FD_CV_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(WAKEUP_FD_CV_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/wakeup_fd_cv_test: openssl_dep_error + +else + + + +$(BINDIR)/$(CONFIG)/wakeup_fd_cv_test: $(WAKEUP_FD_CV_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(WAKEUP_FD_CV_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/wakeup_fd_cv_test + +endif + +$(OBJDIR)/$(CONFIG)/test/core/iomgr/wakeup_fd_cv_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_wakeup_fd_cv_test: $(WAKEUP_FD_CV_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(WAKEUP_FD_CV_TEST_OBJS:.o=.dep) +endif +endif + + ALARM_CPP_TEST_SRC = \ test/cpp/common/alarm_cpp_test.cc \ diff --git a/binding.gyp b/binding.gyp index 58edda2e63..85070e5cac 100644 --- a/binding.gyp +++ b/binding.gyp @@ -589,6 +589,7 @@ 'src/core/lib/iomgr/error.c', 'src/core/lib/iomgr/ev_epoll_linux.c', 'src/core/lib/iomgr/ev_poll_and_epoll_posix.c', + 'src/core/lib/iomgr/ev_poll_cv_posix.c', 'src/core/lib/iomgr/ev_poll_posix.c', 'src/core/lib/iomgr/ev_posix.c', 'src/core/lib/iomgr/exec_ctx.c', @@ -621,6 +622,7 @@ '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', diff --git a/build.yaml b/build.yaml index 584084ff86..3e64ce8f37 100644 --- a/build.yaml +++ b/build.yaml @@ -190,6 +190,7 @@ filegroups: - src/core/lib/iomgr/error.h - src/core/lib/iomgr/ev_epoll_linux.h - src/core/lib/iomgr/ev_poll_and_epoll_posix.h + - src/core/lib/iomgr/ev_poll_cv_posix.h - src/core/lib/iomgr/ev_poll_posix.h - src/core/lib/iomgr/ev_posix.h - src/core/lib/iomgr/exec_ctx.h @@ -221,6 +222,7 @@ filegroups: - src/core/lib/iomgr/timer_heap.h - src/core/lib/iomgr/udp_server.h - src/core/lib/iomgr/unix_sockets_posix.h + - src/core/lib/iomgr/wakeup_fd_cv.h - src/core/lib/iomgr/wakeup_fd_pipe.h - src/core/lib/iomgr/wakeup_fd_posix.h - src/core/lib/iomgr/workqueue.h @@ -274,6 +276,7 @@ filegroups: - src/core/lib/iomgr/error.c - src/core/lib/iomgr/ev_epoll_linux.c - src/core/lib/iomgr/ev_poll_and_epoll_posix.c + - src/core/lib/iomgr/ev_poll_cv_posix.c - src/core/lib/iomgr/ev_poll_posix.c - src/core/lib/iomgr/ev_posix.c - src/core/lib/iomgr/exec_ctx.c @@ -306,6 +309,7 @@ filegroups: - 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 @@ -2592,6 +2596,20 @@ targets: - grpc - gpr_test_util - gpr +- name: wakeup_fd_cv_test + build: test + language: c + src: + - test/core/iomgr/wakeup_fd_cv_test.c + deps: + - grpc_test_util + - grpc + - gpr_test_util + - gpr + platforms: + - mac + - linux + - posix - name: alarm_cpp_test gtest: true build: test diff --git a/config.m4 b/config.m4 index 0f103655a8..1452798897 100644 --- a/config.m4 +++ b/config.m4 @@ -108,6 +108,7 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/iomgr/error.c \ src/core/lib/iomgr/ev_epoll_linux.c \ src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ + src/core/lib/iomgr/ev_poll_cv_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ @@ -140,6 +141,7 @@ if test "$PHP_GRPC" != "no"; then 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 \ diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 6886bdfb5a..3ac0b841cf 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -273,6 +273,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/error.h', 'src/core/lib/iomgr/ev_epoll_linux.h', 'src/core/lib/iomgr/ev_poll_and_epoll_posix.h', + 'src/core/lib/iomgr/ev_poll_cv_posix.h', 'src/core/lib/iomgr/ev_poll_posix.h', 'src/core/lib/iomgr/ev_posix.h', 'src/core/lib/iomgr/exec_ctx.h', @@ -304,6 +305,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/timer_heap.h', 'src/core/lib/iomgr/udp_server.h', 'src/core/lib/iomgr/unix_sockets_posix.h', + 'src/core/lib/iomgr/wakeup_fd_cv.h', 'src/core/lib/iomgr/wakeup_fd_pipe.h', 'src/core/lib/iomgr/wakeup_fd_posix.h', 'src/core/lib/iomgr/workqueue.h', @@ -438,6 +440,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/error.c', 'src/core/lib/iomgr/ev_epoll_linux.c', 'src/core/lib/iomgr/ev_poll_and_epoll_posix.c', + 'src/core/lib/iomgr/ev_poll_cv_posix.c', 'src/core/lib/iomgr/ev_poll_posix.c', 'src/core/lib/iomgr/ev_posix.c', 'src/core/lib/iomgr/exec_ctx.c', @@ -470,6 +473,7 @@ Pod::Spec.new do |s| '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', @@ -646,6 +650,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/error.h', 'src/core/lib/iomgr/ev_epoll_linux.h', 'src/core/lib/iomgr/ev_poll_and_epoll_posix.h', + 'src/core/lib/iomgr/ev_poll_cv_posix.h', 'src/core/lib/iomgr/ev_poll_posix.h', 'src/core/lib/iomgr/ev_posix.h', 'src/core/lib/iomgr/exec_ctx.h', @@ -677,6 +682,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/timer_heap.h', 'src/core/lib/iomgr/udp_server.h', 'src/core/lib/iomgr/unix_sockets_posix.h', + 'src/core/lib/iomgr/wakeup_fd_cv.h', 'src/core/lib/iomgr/wakeup_fd_pipe.h', 'src/core/lib/iomgr/wakeup_fd_posix.h', 'src/core/lib/iomgr/workqueue.h', diff --git a/grpc.gemspec b/grpc.gemspec index 6079ea2aef..85135a5327 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -193,6 +193,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/error.h ) s.files += %w( src/core/lib/iomgr/ev_epoll_linux.h ) s.files += %w( src/core/lib/iomgr/ev_poll_and_epoll_posix.h ) + s.files += %w( src/core/lib/iomgr/ev_poll_cv_posix.h ) s.files += %w( src/core/lib/iomgr/ev_poll_posix.h ) s.files += %w( src/core/lib/iomgr/ev_posix.h ) s.files += %w( src/core/lib/iomgr/exec_ctx.h ) @@ -224,6 +225,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/timer_heap.h ) s.files += %w( src/core/lib/iomgr/udp_server.h ) s.files += %w( src/core/lib/iomgr/unix_sockets_posix.h ) + s.files += %w( src/core/lib/iomgr/wakeup_fd_cv.h ) s.files += %w( src/core/lib/iomgr/wakeup_fd_pipe.h ) s.files += %w( src/core/lib/iomgr/wakeup_fd_posix.h ) s.files += %w( src/core/lib/iomgr/workqueue.h ) @@ -358,6 +360,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/error.c ) s.files += %w( src/core/lib/iomgr/ev_epoll_linux.c ) s.files += %w( src/core/lib/iomgr/ev_poll_and_epoll_posix.c ) + s.files += %w( src/core/lib/iomgr/ev_poll_cv_posix.c ) s.files += %w( src/core/lib/iomgr/ev_poll_posix.c ) s.files += %w( src/core/lib/iomgr/ev_posix.c ) s.files += %w( src/core/lib/iomgr/exec_ctx.c ) @@ -390,6 +393,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/udp_server.c ) s.files += %w( src/core/lib/iomgr/unix_sockets_posix.c ) s.files += %w( src/core/lib/iomgr/unix_sockets_posix_noop.c ) + s.files += %w( src/core/lib/iomgr/wakeup_fd_cv.c ) s.files += %w( src/core/lib/iomgr/wakeup_fd_eventfd.c ) s.files += %w( src/core/lib/iomgr/wakeup_fd_nospecial.c ) s.files += %w( src/core/lib/iomgr/wakeup_fd_pipe.c ) diff --git a/package.xml b/package.xml index 7bac695787..4631fc1c39 100644 --- a/package.xml +++ b/package.xml @@ -200,6 +200,7 @@ + @@ -231,6 +232,7 @@ + @@ -365,6 +367,7 @@ + @@ -397,6 +400,7 @@ + diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index ab77ebc78b..249bc98735 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -1892,6 +1892,10 @@ const grpc_event_engine_vtable *grpc_init_epoll_linux(void) { return NULL; } + if (!grpc_has_wakeup_fd) { + return NULL; + } + if (!is_epoll_available()) { return NULL; } diff --git a/src/core/lib/iomgr/ev_poll_cv_posix.c b/src/core/lib/iomgr/ev_poll_cv_posix.c new file mode 100644 index 0000000000..dd1bbedcc1 --- /dev/null +++ b/src/core/lib/iomgr/ev_poll_cv_posix.c @@ -0,0 +1,297 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include + +#ifdef GPR_POSIX_SOCKET + +#include "src/core/lib/iomgr/ev_poll_cv_posix.h" + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "src/core/lib/iomgr/ev_poll_posix.h" +#include "src/core/lib/iomgr/wakeup_fd_posix.h" + +#define POLL_PERIOD_MS 1000 +#define DEFAULT_TABLE_SIZE 16 + +typedef enum status_t { INPROGRESS, COMPLETED, CANCELLED } status_t; + +typedef struct poll_args { + gpr_refcount refcount; + gpr_cv* cv; + struct pollfd* fds; + nfds_t nfds; + int timeout; + int retval; + int err; + status_t status; +} poll_args; + +cv_fd_table g_cvfds; + +static void decref_poll_args(poll_args* args) { + if (gpr_unref(&args->refcount)) { + gpr_free(args->fds); + gpr_cv_destroy(args->cv); + gpr_free(args->cv); + gpr_free(args); + } +} + +// Poll in a background thread +static void run_poll(void* arg) { + int timeout, retval; + poll_args* pargs = (poll_args*)arg; + while (pargs->status == INPROGRESS) { + if (pargs->timeout < 0) { + timeout = POLL_PERIOD_MS; + } else { + timeout = GPR_MIN(POLL_PERIOD_MS, pargs->timeout); + pargs->timeout -= timeout; + } + retval = g_cvfds.poll(pargs->fds, pargs->nfds, timeout); + if (retval != 0 || pargs->timeout == 0) { + pargs->retval = retval; + pargs->err = errno; + break; + } + } + gpr_mu_lock(&g_cvfds.mu); + if (pargs->status == INPROGRESS) { + // Signal main thread that the poll completed + pargs->status = COMPLETED; + gpr_cv_signal(pargs->cv); + } + decref_poll_args(pargs); + g_cvfds.pollcount--; + if (g_cvfds.shutdown && g_cvfds.pollcount == 0) { + gpr_cv_signal(&g_cvfds.shutdown_complete); + } + gpr_mu_unlock(&g_cvfds.mu); +} + +// This function overrides poll() to handle condition variable wakeup fds +static int cvfd_poll(struct pollfd* fds, nfds_t nfds, int timeout) { + unsigned int i; + int res, idx; + gpr_cv* pollcv; + cv_node *cvn, *prev; + nfds_t nsockfds = 0; + gpr_thd_id t_id; + gpr_thd_options opt; + poll_args* pargs = NULL; + gpr_mu_lock(&g_cvfds.mu); + pollcv = gpr_malloc(sizeof(gpr_cv)); + gpr_cv_init(pollcv); + for (i = 0; i < nfds; i++) { + fds[i].revents = 0; + if (fds[i].fd < 0 && (fds[i].events & POLLIN)) { + idx = FD_TO_IDX(fds[i].fd); + cvn = gpr_malloc(sizeof(cv_node)); + cvn->cv = pollcv; + cvn->next = g_cvfds.cvfds[idx].cvs; + g_cvfds.cvfds[idx].cvs = cvn; + // We should return immediately if there are pending events, + // but we still need to call poll() to check for socket events + if (g_cvfds.cvfds[idx].is_set) { + timeout = 0; + } + } else if (fds[i].fd >= 0) { + nsockfds++; + } + } + + if (nsockfds > 0) { + pargs = gpr_malloc(sizeof(struct poll_args)); + // Both the main thread and calling thread get a reference + gpr_ref_init(&pargs->refcount, 2); + pargs->cv = pollcv; + pargs->fds = gpr_malloc(sizeof(struct pollfd) * nsockfds); + pargs->nfds = nsockfds; + pargs->timeout = timeout; + pargs->retval = 0; + pargs->err = 0; + pargs->status = INPROGRESS; + idx = 0; + for (i = 0; i < nfds; i++) { + if (fds[i].fd >= 0) { + pargs->fds[idx].fd = fds[i].fd; + pargs->fds[idx].events = fds[i].events; + pargs->fds[idx].revents = 0; + idx++; + } + } + g_cvfds.pollcount++; + opt = gpr_thd_options_default(); + gpr_thd_options_set_detached(&opt); + gpr_thd_new(&t_id, &run_poll, pargs, &opt); + // We want the poll() thread to trigger the deadline, so wait forever here + gpr_cv_wait(pollcv, &g_cvfds.mu, gpr_inf_future(GPR_CLOCK_MONOTONIC)); + if (pargs->status == COMPLETED) { + res = pargs->retval; + errno = pargs->err; + } else { + res = 0; + errno = 0; + pargs->status = CANCELLED; + } + } else { + gpr_timespec deadline = gpr_now(GPR_CLOCK_REALTIME); + deadline = + gpr_time_add(deadline, gpr_time_from_millis(timeout, GPR_TIMESPAN)); + gpr_cv_wait(pollcv, &g_cvfds.mu, deadline); + res = 0; + } + + idx = 0; + for (i = 0; i < nfds; i++) { + if (fds[i].fd < 0 && (fds[i].events & POLLIN)) { + cvn = g_cvfds.cvfds[FD_TO_IDX(fds[i].fd)].cvs; + prev = NULL; + while (cvn->cv != pollcv) { + prev = cvn; + cvn = cvn->next; + GPR_ASSERT(cvn); + } + if (!prev) { + g_cvfds.cvfds[FD_TO_IDX(fds[i].fd)].cvs = cvn->next; + } else { + prev->next = cvn->next; + } + gpr_free(cvn); + + if (g_cvfds.cvfds[FD_TO_IDX(fds[i].fd)].is_set) { + fds[i].revents = POLLIN; + if (res >= 0) res++; + } + } else if (fds[i].fd >= 0 && pargs->status == COMPLETED) { + fds[i].revents = pargs->fds[idx].revents; + idx++; + } + } + + if (pargs) { + decref_poll_args(pargs); + } else { + gpr_cv_destroy(pollcv); + gpr_free(pollcv); + } + gpr_mu_unlock(&g_cvfds.mu); + + return res; +} + +static void grpc_global_cv_fd_table_init() { + gpr_mu_init(&g_cvfds.mu); + gpr_mu_lock(&g_cvfds.mu); + gpr_cv_init(&g_cvfds.shutdown_complete); + g_cvfds.shutdown = 0; + g_cvfds.pollcount = 0; + g_cvfds.size = DEFAULT_TABLE_SIZE; + g_cvfds.cvfds = gpr_malloc(sizeof(fd_node) * DEFAULT_TABLE_SIZE); + g_cvfds.free_fds = NULL; + for (int i = 0; i < DEFAULT_TABLE_SIZE; i++) { + g_cvfds.cvfds[i].is_set = 0; + g_cvfds.cvfds[i].cvs = NULL; + g_cvfds.cvfds[i].next_free = g_cvfds.free_fds; + g_cvfds.free_fds = &g_cvfds.cvfds[i]; + } + // Override the poll function with one that supports cvfds + g_cvfds.poll = grpc_poll_function; + grpc_poll_function = &cvfd_poll; + gpr_mu_unlock(&g_cvfds.mu); +} + +static void grpc_global_cv_fd_table_shutdown() { + gpr_mu_lock(&g_cvfds.mu); + g_cvfds.shutdown = 1; + // Attempt to wait for all abandoned poll() threads to terminate + // Not doing so will result in reported memory leaks + if (g_cvfds.pollcount > 0) { + int res = gpr_cv_wait(&g_cvfds.shutdown_complete, &g_cvfds.mu, + gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), + gpr_time_from_seconds(3, GPR_TIMESPAN))); + GPR_ASSERT(res == 0); + } + gpr_cv_destroy(&g_cvfds.shutdown_complete); + grpc_poll_function = g_cvfds.poll; + gpr_free(g_cvfds.cvfds); + gpr_mu_unlock(&g_cvfds.mu); + gpr_mu_destroy(&g_cvfds.mu); +} + +/******************************************************************************* + * event engine binding + */ + +static const grpc_event_engine_vtable* ev_poll_vtable; +static grpc_event_engine_vtable vtable; + +static void shutdown_engine(void) { + ev_poll_vtable->shutdown_engine(); + grpc_global_cv_fd_table_shutdown(); +} + +const grpc_event_engine_vtable* grpc_init_poll_cv_posix(void) { + int has_wakeup_fd = grpc_has_wakeup_fd; + int allow_specialized_wakeup_fd = grpc_allow_specialized_wakeup_fd; + int allow_pipe_wakeup_fd = grpc_allow_pipe_wakeup_fd; + grpc_global_cv_fd_table_init(); + grpc_allow_specialized_wakeup_fd = 0; + grpc_allow_pipe_wakeup_fd = 0; + grpc_wakeup_fd_global_init(); + grpc_has_wakeup_fd = 1; + ev_poll_vtable = grpc_init_poll_posix(); + if (!ev_poll_vtable) { + grpc_global_cv_fd_table_shutdown(); + grpc_has_wakeup_fd = has_wakeup_fd; + grpc_allow_specialized_wakeup_fd = allow_specialized_wakeup_fd; + grpc_allow_pipe_wakeup_fd = allow_pipe_wakeup_fd; + grpc_global_cv_fd_table_init(); + return NULL; + } + vtable = *ev_poll_vtable; + vtable.shutdown_engine = shutdown_engine; + return &vtable; +} + +#endif /* GPR_POSIX_SOCKET */ diff --git a/src/core/lib/iomgr/ev_poll_cv_posix.h b/src/core/lib/iomgr/ev_poll_cv_posix.h new file mode 100644 index 0000000000..885711d1c5 --- /dev/null +++ b/src/core/lib/iomgr/ev_poll_cv_posix.h @@ -0,0 +1,68 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#ifndef GRPC_CORE_LIB_IOMGR_EV_POLL_CV_POSIX_H +#define GRPC_CORE_LIB_IOMGR_EV_POLL_CV_POSIX_H + +#include + +#include "src/core/lib/iomgr/ev_posix.h" + +#define FD_TO_IDX(fd) (-(fd)-1) +#define IDX_TO_FD(idx) (-(idx)-1) + +typedef struct cv_node { + gpr_cv* cv; + struct cv_node* next; +} cv_node; + +typedef struct fd_node { + int is_set; + cv_node* cvs; + struct fd_node* next_free; +} fd_node; + +typedef struct cv_fd_table { + gpr_mu mu; + int pollcount; + int shutdown; + gpr_cv shutdown_complete; + fd_node* cvfds; + fd_node* free_fds; + unsigned int size; + grpc_poll_function_type poll; +} cv_fd_table; + +const grpc_event_engine_vtable* grpc_init_poll_cv_posix(void); + +#endif /* GRPC_CORE_LIB_IOMGR_EV_POLL_CV_POSIX_H */ diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.c index 16a5e3083e..97e71d968e 100644 --- a/src/core/lib/iomgr/ev_poll_posix.c +++ b/src/core/lib/iomgr/ev_poll_posix.c @@ -1277,6 +1277,9 @@ static const grpc_event_engine_vtable vtable = { }; const grpc_event_engine_vtable *grpc_init_poll_posix(void) { + if (!grpc_has_wakeup_fd) { + return NULL; + } if (!GRPC_LOG_IF_ERROR("pollset_global_init", pollset_global_init())) { return NULL; } diff --git a/src/core/lib/iomgr/ev_posix.c b/src/core/lib/iomgr/ev_posix.c index 6536672685..2fc8ccfa91 100644 --- a/src/core/lib/iomgr/ev_posix.c +++ b/src/core/lib/iomgr/ev_posix.c @@ -46,6 +46,7 @@ #include "src/core/lib/iomgr/ev_epoll_linux.h" #include "src/core/lib/iomgr/ev_poll_and_epoll_posix.h" +#include "src/core/lib/iomgr/ev_poll_cv_posix.h" #include "src/core/lib/iomgr/ev_poll_posix.h" #include "src/core/lib/support/env.h" @@ -66,6 +67,7 @@ typedef struct { static const event_engine_factory g_factories[] = { {"epoll", grpc_init_epoll_linux}, {"poll", grpc_init_poll_posix}, + {"poll-cv", grpc_init_poll_cv_posix}, {"legacy", grpc_init_poll_and_epoll_posix}, }; diff --git a/src/core/lib/iomgr/wakeup_fd_cv.c b/src/core/lib/iomgr/wakeup_fd_cv.c new file mode 100644 index 0000000000..651e2f663d --- /dev/null +++ b/src/core/lib/iomgr/wakeup_fd_cv.c @@ -0,0 +1,118 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include + +#ifdef GPR_POSIX_WAKEUP_FD + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "src/core/lib/iomgr/ev_poll_cv_posix.h" + +#define MAX_TABLE_RESIZE 256 + +extern cv_fd_table g_cvfds; + +static grpc_error* cv_fd_init(grpc_wakeup_fd* fd_info) { + unsigned int i, newsize; + int idx; + gpr_mu_lock(&g_cvfds.mu); + if (!g_cvfds.free_fds) { + newsize = GPR_MIN(g_cvfds.size * 2, g_cvfds.size + MAX_TABLE_RESIZE); + g_cvfds.cvfds = gpr_realloc(g_cvfds.cvfds, sizeof(fd_node) * newsize); + for (i = g_cvfds.size; i < newsize; i++) { + g_cvfds.cvfds[i].is_set = 0; + g_cvfds.cvfds[i].cvs = NULL; + g_cvfds.cvfds[i].next_free = g_cvfds.free_fds; + g_cvfds.free_fds = &g_cvfds.cvfds[i]; + } + g_cvfds.size = newsize; + } + + idx = (int)(g_cvfds.free_fds - g_cvfds.cvfds); + g_cvfds.free_fds = g_cvfds.free_fds->next_free; + g_cvfds.cvfds[idx].cvs = NULL; + g_cvfds.cvfds[idx].is_set = 0; + fd_info->read_fd = IDX_TO_FD(idx); + fd_info->write_fd = -1; + gpr_mu_unlock(&g_cvfds.mu); + return GRPC_ERROR_NONE; +} + +static grpc_error* cv_fd_wakeup(grpc_wakeup_fd* fd_info) { + cv_node* cvn; + gpr_mu_lock(&g_cvfds.mu); + g_cvfds.cvfds[FD_TO_IDX(fd_info->read_fd)].is_set = 1; + cvn = g_cvfds.cvfds[FD_TO_IDX(fd_info->read_fd)].cvs; + while (cvn) { + gpr_cv_signal(cvn->cv); + cvn = cvn->next; + } + gpr_mu_unlock(&g_cvfds.mu); + return GRPC_ERROR_NONE; +} + +static grpc_error* cv_fd_consume(grpc_wakeup_fd* fd_info) { + gpr_mu_lock(&g_cvfds.mu); + g_cvfds.cvfds[FD_TO_IDX(fd_info->read_fd)].is_set = 0; + gpr_mu_unlock(&g_cvfds.mu); + return GRPC_ERROR_NONE; +} + +static void cv_fd_destroy(grpc_wakeup_fd* fd_info) { + if (fd_info->read_fd == 0) { + return; + } + gpr_mu_lock(&g_cvfds.mu); + // Assert that there are no active pollers + GPR_ASSERT(!g_cvfds.cvfds[FD_TO_IDX(fd_info->read_fd)].cvs); + g_cvfds.cvfds[FD_TO_IDX(fd_info->read_fd)].next_free = g_cvfds.free_fds; + g_cvfds.free_fds = &g_cvfds.cvfds[FD_TO_IDX(fd_info->read_fd)]; + gpr_mu_unlock(&g_cvfds.mu); +} + +static int cv_check_availability(void) { return 1; } + +const grpc_wakeup_fd_vtable grpc_cv_wakeup_fd_vtable = { + cv_fd_init, cv_fd_consume, cv_fd_wakeup, cv_fd_destroy, + cv_check_availability}; + +#endif /* GPR_POSIX_WAKUP_FD */ diff --git a/src/core/lib/iomgr/wakeup_fd_cv.h b/src/core/lib/iomgr/wakeup_fd_cv.h new file mode 100644 index 0000000000..e57fc28363 --- /dev/null +++ b/src/core/lib/iomgr/wakeup_fd_cv.h @@ -0,0 +1,55 @@ +/* + * + * Copyright 2016, 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. + * + */ + +/* + * wakeup_fd_cv uses condition variables to implement wakeup fds. + * + * It is intended for use only in cases when eventfd() and pipe() are not + * available. It can only be used with the "poll" engine. + * + * Implementation: + * A global table of cv wakeup fds is mantained. A cv wakeup fd is a negative + * file descriptor. poll() is then run in a background thread with only the + * real socket fds while we wait on a condition variable trigged by either the + * poll() completion or a wakeup_fd() call. + * + */ + +#ifndef GRPC_CORE_LIB_IOMGR_WAKEUP_FD_CV_H +#define GRPC_CORE_LIB_IOMGR_WAKEUP_FD_CV_H + +#include "src/core/lib/iomgr/wakeup_fd_posix.h" + +extern grpc_wakeup_fd_vtable grpc_cv_wakeup_fd_vtable; + +#endif /* GRPC_CORE_LIB_IOMGR_WAKEUP_FD_CV_H */ diff --git a/src/core/lib/iomgr/wakeup_fd_pipe.c b/src/core/lib/iomgr/wakeup_fd_pipe.c index 4e5dbdcb73..d0ea216aa0 100644 --- a/src/core/lib/iomgr/wakeup_fd_pipe.c +++ b/src/core/lib/iomgr/wakeup_fd_pipe.c @@ -47,11 +47,10 @@ static grpc_error* pipe_init(grpc_wakeup_fd* fd_info) { int pipefd[2]; - /* TODO(klempner): Make this nonfatal */ int r = pipe(pipefd); if (0 != r) { gpr_log(GPR_ERROR, "pipe creation failed (%d): %s", errno, strerror(errno)); - abort(); + return GRPC_OS_ERROR(errno, "pipe"); } grpc_error* err; err = grpc_set_socket_nonblocking(pipefd[0], 1); @@ -95,8 +94,13 @@ static void pipe_destroy(grpc_wakeup_fd* fd_info) { } static int pipe_check_availability(void) { - /* Assume that pipes are always available. */ - return 1; + grpc_wakeup_fd fd; + if (pipe_init(&fd) == GRPC_ERROR_NONE) { + pipe_destroy(&fd); + return 1; + } else { + return 0; + } } const grpc_wakeup_fd_vtable grpc_pipe_wakeup_fd_vtable = { diff --git a/src/core/lib/iomgr/wakeup_fd_posix.c b/src/core/lib/iomgr/wakeup_fd_posix.c index 046208abc8..041c221de3 100644 --- a/src/core/lib/iomgr/wakeup_fd_posix.c +++ b/src/core/lib/iomgr/wakeup_fd_posix.c @@ -36,18 +36,25 @@ #ifdef GPR_POSIX_WAKEUP_FD #include +#include "src/core/lib/iomgr/wakeup_fd_cv.h" #include "src/core/lib/iomgr/wakeup_fd_pipe.h" #include "src/core/lib/iomgr/wakeup_fd_posix.h" static const grpc_wakeup_fd_vtable *wakeup_fd_vtable = NULL; int grpc_allow_specialized_wakeup_fd = 1; +int grpc_allow_pipe_wakeup_fd = 1; +int grpc_has_wakeup_fd = 1; void grpc_wakeup_fd_global_init(void) { if (grpc_allow_specialized_wakeup_fd && grpc_specialized_wakeup_fd_vtable.check_availability()) { wakeup_fd_vtable = &grpc_specialized_wakeup_fd_vtable; - } else { + } else if (grpc_allow_pipe_wakeup_fd && + grpc_pipe_wakeup_fd_vtable.check_availability()) { wakeup_fd_vtable = &grpc_pipe_wakeup_fd_vtable; + } else { + grpc_has_wakeup_fd = 0; + wakeup_fd_vtable = &grpc_cv_wakeup_fd_vtable; } } diff --git a/src/core/lib/iomgr/wakeup_fd_posix.h b/src/core/lib/iomgr/wakeup_fd_posix.h index e269f242d8..bd0fb46da1 100644 --- a/src/core/lib/iomgr/wakeup_fd_posix.h +++ b/src/core/lib/iomgr/wakeup_fd_posix.h @@ -88,6 +88,8 @@ struct grpc_wakeup_fd { }; extern int grpc_allow_specialized_wakeup_fd; +extern int grpc_allow_pipe_wakeup_fd; +extern int grpc_has_wakeup_fd; #define GRPC_WAKEUP_FD_GET_READ_FD(fd_info) ((fd_info)->read_fd) diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 2bebf48c70..62d9729e13 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -102,6 +102,7 @@ CORE_SOURCE_FILES = [ 'src/core/lib/iomgr/error.c', 'src/core/lib/iomgr/ev_epoll_linux.c', 'src/core/lib/iomgr/ev_poll_and_epoll_posix.c', + 'src/core/lib/iomgr/ev_poll_cv_posix.c', 'src/core/lib/iomgr/ev_poll_posix.c', 'src/core/lib/iomgr/ev_posix.c', 'src/core/lib/iomgr/exec_ctx.c', @@ -134,6 +135,7 @@ CORE_SOURCE_FILES = [ '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', diff --git a/test/core/iomgr/wakeup_fd_cv_test.c b/test/core/iomgr/wakeup_fd_cv_test.c new file mode 100644 index 0000000000..952985ed7e --- /dev/null +++ b/test/core/iomgr/wakeup_fd_cv_test.c @@ -0,0 +1,240 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include + +#include +#include +#include +#include + +#include "src/core/lib/iomgr/ev_posix.h" +#include "src/core/lib/iomgr/iomgr_posix.h" +#include "src/core/lib/support/env.h" + +typedef struct poll_args { + struct pollfd *fds; + nfds_t nfds; + int timeout; + int result; +} poll_args; + +gpr_cv poll_cv; +gpr_mu poll_mu; +static int socket_event = 0; + +// Trigger a "socket" POLLIN in mock_poll() +void trigger_socket_event() { + gpr_mu_lock(&poll_mu); + socket_event = 1; + gpr_cv_broadcast(&poll_cv); + gpr_mu_unlock(&poll_mu); +} + +void reset_socket_event() { + gpr_mu_lock(&poll_mu); + socket_event = 0; + gpr_mu_unlock(&poll_mu); +} + +// Mocks posix poll() function +int mock_poll(struct pollfd *fds, nfds_t nfds, int timeout) { + int res = 0; + gpr_timespec poll_time; + gpr_mu_lock(&poll_mu); + GPR_ASSERT(nfds == 3); + GPR_ASSERT(fds[0].fd == 20); + GPR_ASSERT(fds[1].fd == 30); + GPR_ASSERT(fds[2].fd == 50); + GPR_ASSERT(fds[0].events == (POLLIN | POLLHUP)); + GPR_ASSERT(fds[1].events == (POLLIN | POLLHUP)); + GPR_ASSERT(fds[2].events == POLLIN); + + if (timeout < 0) { + poll_time = gpr_inf_future(GPR_CLOCK_REALTIME); + } else { + poll_time = gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), + gpr_time_from_millis(timeout, GPR_TIMESPAN)); + } + + if (socket_event || !gpr_cv_wait(&poll_cv, &poll_mu, poll_time)) { + fds[0].revents = POLLIN; + res = 1; + } + gpr_mu_unlock(&poll_mu); + return res; +} + +void background_poll(void *args) { + poll_args *pargs = (poll_args *)args; + pargs->result = grpc_poll_function(pargs->fds, pargs->nfds, pargs->timeout); +} + +void test_many_fds(void) { + int i; + grpc_wakeup_fd fd[1000]; + for (i = 0; i < 1000; i++) { + GPR_ASSERT(grpc_wakeup_fd_init(&fd[i]) == GRPC_ERROR_NONE); + } + for (i = 0; i < 1000; i++) { + grpc_wakeup_fd_destroy(&fd[i]); + } +} + +void test_poll_cv_trigger(void) { + grpc_wakeup_fd cvfd1, cvfd2, cvfd3; + struct pollfd pfds[6]; + poll_args pargs; + gpr_thd_id t_id; + gpr_thd_options opt; + + GPR_ASSERT(grpc_wakeup_fd_init(&cvfd1) == GRPC_ERROR_NONE); + GPR_ASSERT(grpc_wakeup_fd_init(&cvfd2) == GRPC_ERROR_NONE); + GPR_ASSERT(grpc_wakeup_fd_init(&cvfd3) == GRPC_ERROR_NONE); + GPR_ASSERT(cvfd1.read_fd < 0); + GPR_ASSERT(cvfd2.read_fd < 0); + GPR_ASSERT(cvfd3.read_fd < 0); + GPR_ASSERT(cvfd1.read_fd != cvfd2.read_fd); + GPR_ASSERT(cvfd2.read_fd != cvfd3.read_fd); + GPR_ASSERT(cvfd1.read_fd != cvfd3.read_fd); + + pfds[0].fd = cvfd1.read_fd; + pfds[1].fd = cvfd2.read_fd; + pfds[2].fd = 20; + pfds[3].fd = 30; + pfds[4].fd = cvfd3.read_fd; + pfds[5].fd = 50; + + pfds[0].events = 0; + pfds[1].events = POLLIN; + pfds[2].events = POLLIN | POLLHUP; + pfds[3].events = POLLIN | POLLHUP; + pfds[4].events = POLLIN; + pfds[5].events = POLLIN; + + pargs.fds = pfds; + pargs.nfds = 6; + pargs.timeout = 1000; + pargs.result = -2; + + opt = gpr_thd_options_default(); + gpr_thd_options_set_joinable(&opt); + gpr_thd_new(&t_id, &background_poll, &pargs, &opt); + + // Wakeup wakeup_fd not listening for events + GPR_ASSERT(grpc_wakeup_fd_wakeup(&cvfd1) == GRPC_ERROR_NONE); + gpr_thd_join(t_id); + GPR_ASSERT(pargs.result == 0); + GPR_ASSERT(pfds[0].revents == 0); + GPR_ASSERT(pfds[1].revents == 0); + GPR_ASSERT(pfds[2].revents == 0); + GPR_ASSERT(pfds[3].revents == 0); + GPR_ASSERT(pfds[4].revents == 0); + GPR_ASSERT(pfds[5].revents == 0); + + // Pollin on socket fd + pargs.timeout = -1; + pargs.result = -2; + gpr_thd_new(&t_id, &background_poll, &pargs, &opt); + trigger_socket_event(); + gpr_thd_join(t_id); + GPR_ASSERT(pargs.result == 1); + GPR_ASSERT(pfds[0].revents == 0); + GPR_ASSERT(pfds[1].revents == 0); + GPR_ASSERT(pfds[2].revents == POLLIN); + GPR_ASSERT(pfds[3].revents == 0); + GPR_ASSERT(pfds[4].revents == 0); + GPR_ASSERT(pfds[5].revents == 0); + + // Pollin on wakeup fd + reset_socket_event(); + pargs.result = -2; + gpr_thd_new(&t_id, &background_poll, &pargs, &opt); + GPR_ASSERT(grpc_wakeup_fd_wakeup(&cvfd2) == GRPC_ERROR_NONE); + gpr_thd_join(t_id); + + GPR_ASSERT(pargs.result == 1); + GPR_ASSERT(pfds[0].revents == 0); + GPR_ASSERT(pfds[1].revents == POLLIN); + GPR_ASSERT(pfds[2].revents == 0); + GPR_ASSERT(pfds[3].revents == 0); + GPR_ASSERT(pfds[4].revents == 0); + GPR_ASSERT(pfds[5].revents == 0); + + // Pollin on wakeup fd + socket fd + trigger_socket_event(); + pargs.result = -2; + gpr_thd_new(&t_id, &background_poll, &pargs, &opt); + gpr_thd_join(t_id); + + GPR_ASSERT(pargs.result == 2); + GPR_ASSERT(pfds[0].revents == 0); + GPR_ASSERT(pfds[1].revents == POLLIN); + GPR_ASSERT(pfds[2].revents == POLLIN); + GPR_ASSERT(pfds[3].revents == 0); + GPR_ASSERT(pfds[4].revents == 0); + GPR_ASSERT(pfds[5].revents == 0); + + // No Events + pargs.result = -2; + pargs.timeout = 1000; + reset_socket_event(); + GPR_ASSERT(grpc_wakeup_fd_consume_wakeup(&cvfd1) == GRPC_ERROR_NONE); + GPR_ASSERT(grpc_wakeup_fd_consume_wakeup(&cvfd2) == GRPC_ERROR_NONE); + gpr_thd_new(&t_id, &background_poll, &pargs, &opt); + gpr_thd_join(t_id); + + GPR_ASSERT(pargs.result == 0); + GPR_ASSERT(pfds[0].revents == 0); + GPR_ASSERT(pfds[1].revents == 0); + GPR_ASSERT(pfds[2].revents == 0); + GPR_ASSERT(pfds[3].revents == 0); + GPR_ASSERT(pfds[4].revents == 0); + GPR_ASSERT(pfds[5].revents == 0); +} + +int main(int argc, char **argv) { + gpr_setenv("GRPC_POLL_STRATEGY", "poll-cv"); + grpc_poll_function = &mock_poll; + gpr_mu_init(&poll_mu); + gpr_cv_init(&poll_cv); + + grpc_iomgr_platform_init(); + test_many_fds(); + grpc_iomgr_platform_shutdown(); + + grpc_iomgr_platform_init(); + test_poll_cv_trigger(); + grpc_iomgr_platform_shutdown(); + return 0; +} diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 44f147aeb1..1ec177cdf3 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -810,6 +810,7 @@ src/core/lib/iomgr/endpoint_pair.h \ src/core/lib/iomgr/error.h \ src/core/lib/iomgr/ev_epoll_linux.h \ src/core/lib/iomgr/ev_poll_and_epoll_posix.h \ +src/core/lib/iomgr/ev_poll_cv_posix.h \ src/core/lib/iomgr/ev_poll_posix.h \ src/core/lib/iomgr/ev_posix.h \ src/core/lib/iomgr/exec_ctx.h \ @@ -841,6 +842,7 @@ src/core/lib/iomgr/timer.h \ src/core/lib/iomgr/timer_heap.h \ src/core/lib/iomgr/udp_server.h \ src/core/lib/iomgr/unix_sockets_posix.h \ +src/core/lib/iomgr/wakeup_fd_cv.h \ src/core/lib/iomgr/wakeup_fd_pipe.h \ src/core/lib/iomgr/wakeup_fd_posix.h \ src/core/lib/iomgr/workqueue.h \ @@ -975,6 +977,7 @@ src/core/lib/iomgr/endpoint_pair_windows.c \ src/core/lib/iomgr/error.c \ src/core/lib/iomgr/ev_epoll_linux.c \ src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ +src/core/lib/iomgr/ev_poll_cv_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ @@ -1007,6 +1010,7 @@ src/core/lib/iomgr/timer_heap.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 \ diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index a6f3d405dc..a9925ed976 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -69,7 +69,7 @@ _FORCE_ENVIRON_FOR_WRAPPERS = { _POLLING_STRATEGIES = { - 'linux': ['epoll', 'poll', 'legacy'] + 'linux': ['epoll', 'poll', 'poll-cv', 'legacy'] } diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index c05d194e19..35b21d4e20 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -2079,6 +2079,23 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "is_filegroup": false, + "language": "c", + "name": "wakeup_fd_cv_test", + "src": [ + "test/core/iomgr/wakeup_fd_cv_test.c" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "gpr", @@ -6374,6 +6391,7 @@ "src/core/lib/iomgr/error.h", "src/core/lib/iomgr/ev_epoll_linux.h", "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", + "src/core/lib/iomgr/ev_poll_cv_posix.h", "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/exec_ctx.h", @@ -6405,6 +6423,7 @@ "src/core/lib/iomgr/timer_heap.h", "src/core/lib/iomgr/udp_server.h", "src/core/lib/iomgr/unix_sockets_posix.h", + "src/core/lib/iomgr/wakeup_fd_cv.h", "src/core/lib/iomgr/wakeup_fd_pipe.h", "src/core/lib/iomgr/wakeup_fd_posix.h", "src/core/lib/iomgr/workqueue.h", @@ -6493,6 +6512,8 @@ "src/core/lib/iomgr/ev_epoll_linux.h", "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", + "src/core/lib/iomgr/ev_poll_cv_posix.c", + "src/core/lib/iomgr/ev_poll_cv_posix.h", "src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.c", @@ -6556,6 +6577,8 @@ "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", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index c3395067c9..323c09c77f 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -2061,6 +2061,25 @@ "windows" ] }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "gtest": false, + "language": "c", + "name": "wakeup_fd_cv_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "args": [], "ci_platforms": [ diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 965d06d1d5..7d5e0ee56f 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -319,6 +319,7 @@ + @@ -350,6 +351,7 @@ + @@ -511,6 +513,8 @@ + + @@ -575,6 +579,8 @@ + + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index dddd4ecce5..72bf449c3e 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -76,6 +76,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -172,6 +175,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -740,6 +746,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -833,6 +842,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index b724c217ed..44cbe8bf0c 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -212,6 +212,7 @@ + @@ -243,6 +244,7 @@ + @@ -359,6 +361,8 @@ + + @@ -423,6 +427,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index 92806fa04a..57466022f4 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -130,6 +130,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -226,6 +229,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -527,6 +533,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -620,6 +629,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index b46773632c..aa47cc800d 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -309,6 +309,7 @@ + @@ -340,6 +341,7 @@ + @@ -479,6 +481,8 @@ + + @@ -543,6 +547,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index 6ffc1eab70..4706c90af2 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -79,6 +79,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -175,6 +178,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -650,6 +656,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -743,6 +752,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr -- cgit v1.2.3 From d80a8c947c3491ea1491bc16b4f0479add3461f5 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 10 Oct 2016 13:19:56 -0700 Subject: Cleanup --- src/core/lib/iomgr/combiner.c | 49 ++++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 21 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/combiner.c b/src/core/lib/iomgr/combiner.c index 48806abc38..24ffe41d99 100644 --- a/src/core/lib/iomgr/combiner.c +++ b/src/core/lib/iomgr/combiner.c @@ -50,17 +50,20 @@ int grpc_combiner_trace = 0; } \ } while (0) +#define STATE_UNORPHANED 1 +#define STATE_ELEM_COUNT_LOW_BIT 2 + struct grpc_combiner { grpc_combiner *next_combiner_on_this_exec_ctx; grpc_workqueue *optional_workqueue; gpr_mpscq queue; // state is: - // lower bit - zero if orphaned - // other bits - number of items queued on the lock + // lower bit - zero if orphaned (STATE_UNORPHANED) + // other bits - number of items queued on the lock (STATE_ELEM_COUNT_LOW_BIT) gpr_atm state; // number of elements in the list that are covered by a poller: if >0, we can // offload safely - gpr_atm covered_by_poller; + gpr_atm elements_covered_by_poller; bool time_to_execute_final_list; bool final_list_covered_by_poller; grpc_closure_list final_list; @@ -84,7 +87,7 @@ static error_data unpack_error_data(uintptr_t p) { static bool is_covered_by_poller(grpc_combiner *lock) { return lock->final_list_covered_by_poller || - gpr_atm_acq_load(&lock->covered_by_poller) > 0; + gpr_atm_acq_load(&lock->elements_covered_by_poller) > 0; } grpc_combiner *grpc_combiner_create(grpc_workqueue *optional_workqueue) { @@ -93,8 +96,8 @@ grpc_combiner *grpc_combiner_create(grpc_workqueue *optional_workqueue) { lock->time_to_execute_final_list = false; lock->optional_workqueue = optional_workqueue; lock->final_list_covered_by_poller = false; - gpr_atm_no_barrier_store(&lock->state, 1); - gpr_atm_no_barrier_store(&lock->covered_by_poller, 0); + gpr_atm_no_barrier_store(&lock->state, STATE_UNORPHANED); + gpr_atm_no_barrier_store(&lock->elements_covered_by_poller, 0); gpr_mpscq_init(&lock->queue); grpc_closure_list_init(&lock->final_list); grpc_closure_init(&lock->offload, offload, lock); @@ -111,7 +114,7 @@ static void really_destroy(grpc_exec_ctx *exec_ctx, grpc_combiner *lock) { } void grpc_combiner_destroy(grpc_exec_ctx *exec_ctx, grpc_combiner *lock) { - gpr_atm old_state = gpr_atm_full_fetch_add(&lock->state, -1); + gpr_atm old_state = gpr_atm_full_fetch_add(&lock->state, -STATE_UNORPHANED); GRPC_COMBINER_TRACE(gpr_log( GPR_DEBUG, "C:%p really_destroy old_state=%" PRIdPTR, lock, old_state)); if (old_state == 1) { @@ -143,20 +146,20 @@ void grpc_combiner_execute(grpc_exec_ctx *exec_ctx, grpc_combiner *lock, grpc_closure *cl, grpc_error *error, bool covered_by_poller) { GPR_TIMER_BEGIN("combiner.execute", 0); - gpr_atm last = gpr_atm_full_fetch_add(&lock->state, 2); + gpr_atm last = gpr_atm_full_fetch_add(&lock->state, STATE_ELEM_COUNT_LOW_BIT); GRPC_COMBINER_TRACE(gpr_log( GPR_DEBUG, "C:%p grpc_combiner_execute c=%p cov=%d last=%" PRIdPTR, lock, cl, covered_by_poller, last)); - GPR_ASSERT(last & 1); // ensure lock has not been destroyed + GPR_ASSERT(last & STATE_UNORPHANED); // ensure lock has not been destroyed cl->error_data.scratch = pack_error_data((error_data){error, covered_by_poller}); if (covered_by_poller) { - gpr_atm_no_barrier_fetch_add(&lock->covered_by_poller, 1); + gpr_atm_no_barrier_fetch_add(&lock->elements_covered_by_poller, 1); } gpr_mpscq_push(&lock->queue, &cl->next_data.atm_next); if (last == 1) { - // code will be written when the exec_ctx calls - // grpc_combiner_continue_exec_ctx + // first element on this list: add it to the list of combiner locks + // executing within this exec_ctx push_last_on_exec_ctx(exec_ctx, lock); } GPR_TIMER_END("combiner.execute", 0); @@ -219,7 +222,7 @@ bool grpc_combiner_continue_exec_ctx(grpc_exec_ctx *exec_ctx) { GRPC_COMBINER_TRACE( gpr_log(GPR_DEBUG, "C:%p maybe_finish_one n=%p", lock, n)); if (n == NULL) { - // queue is in an inconsistant state: use this as a cue that we should + // queue is in an inconsistent state: use this as a cue that we should // go off and do something else for a while (and come back later) GPR_TIMER_MARK("delay_busy", 0); if (lock->optional_workqueue != NULL && is_covered_by_poller(lock)) { @@ -233,7 +236,7 @@ bool grpc_combiner_continue_exec_ctx(grpc_exec_ctx *exec_ctx) { error_data err = unpack_error_data(cl->error_data.scratch); cl->cb(exec_ctx, cl->cb_arg, err.error); if (err.covered_by_poller) { - gpr_atm_no_barrier_fetch_add(&lock->covered_by_poller, -1); + gpr_atm_no_barrier_fetch_add(&lock->elements_covered_by_poller, -1); } GRPC_ERROR_UNREF(err.error); GPR_TIMER_END("combiner.exec1", 0); @@ -259,27 +262,31 @@ bool grpc_combiner_continue_exec_ctx(grpc_exec_ctx *exec_ctx) { GPR_TIMER_MARK("unref", 0); move_next(exec_ctx); lock->time_to_execute_final_list = false; - gpr_atm old_state = gpr_atm_full_fetch_add(&lock->state, -2); + gpr_atm old_state = + gpr_atm_full_fetch_add(&lock->state, -STATE_ELEM_COUNT_LOW_BIT); GRPC_COMBINER_TRACE( gpr_log(GPR_DEBUG, "C:%p finish old_state=%" PRIdPTR, lock, old_state)); switch (old_state) { default: // we have multiple queued work items: just continue executing them break; - case 5: // we're down to one queued item: if it's the final list we - case 4: // should do that + case STATE_UNORPHANED | (2 * STATE_ELEM_COUNT_LOW_BIT): + case 0 | (2 * STATE_ELEM_COUNT_LOW_BIT): + // we're down to one queued item: if it's the final list we should do that if (!grpc_closure_list_empty(lock->final_list)) { lock->time_to_execute_final_list = true; } break; - case 3: // had one count, one unorphaned --> unlocked unorphaned + case STATE_UNORPHANED | STATE_ELEM_COUNT_LOW_BIT: + // had one count, one unorphaned --> unlocked unorphaned GPR_TIMER_END("combiner.continue_exec_ctx", 0); return true; - case 2: // and one count, one orphaned --> unlocked and orphaned + case 0 | STATE_ELEM_COUNT_LOW_BIT: + // and one count, one orphaned --> unlocked and orphaned really_destroy(exec_ctx, lock); GPR_TIMER_END("combiner.continue_exec_ctx", 0); return true; - case 1: + case STATE_UNORPHANED: case 0: // these values are illegal - representing an already unlocked or // deleted lock @@ -314,7 +321,7 @@ void grpc_combiner_execute_finally(grpc_exec_ctx *exec_ctx, grpc_combiner *lock, } if (grpc_closure_list_empty(lock->final_list)) { - gpr_atm_full_fetch_add(&lock->state, 2); + gpr_atm_full_fetch_add(&lock->state, STATE_ELEM_COUNT_LOW_BIT); } if (covered_by_poller) { lock->final_list_covered_by_poller = true; -- cgit v1.2.3 From 686d7a7b7f22b08043414aa7651f89af06f176b8 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 10 Oct 2016 14:02:29 -0700 Subject: Simplifications --- src/core/lib/iomgr/exec_ctx.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/exec_ctx.c b/src/core/lib/iomgr/exec_ctx.c index a3c40e8092..604713e578 100644 --- a/src/core/lib/iomgr/exec_ctx.c +++ b/src/core/lib/iomgr/exec_ctx.c @@ -71,12 +71,9 @@ bool grpc_exec_ctx_flush(grpc_exec_ctx *exec_ctx) { grpc_closure_run(exec_ctx, c, c->error_data.error); c = next; } - continue; + } else if (!grpc_combiner_continue_exec_ctx(exec_ctx)) { + break; } - if (grpc_combiner_continue_exec_ctx(exec_ctx)) { - continue; - } - break; } GPR_ASSERT(exec_ctx->active_combiner == NULL); if (exec_ctx->stealing_from_workqueue != NULL) { @@ -100,8 +97,7 @@ bool grpc_exec_ctx_flush(grpc_exec_ctx *exec_ctx) { GRPC_ERROR_UNREF(error); GPR_TIMER_END("grpc_exec_ctx_flush.stolen_cb", 0); grpc_exec_ctx_flush(exec_ctx); - GPR_TIMER_END("grpc_exec_ctx_flush", 0); - return true; + did_something = true; } } GPR_TIMER_END("grpc_exec_ctx_flush", 0); -- cgit v1.2.3 From d3ee0d5c76626849756e1bff9ffb23de30706c7e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 10 Oct 2016 14:09:18 -0700 Subject: Better readability --- src/core/lib/iomgr/combiner.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/combiner.c b/src/core/lib/iomgr/combiner.c index 24ffe41d99..60ee14eb23 100644 --- a/src/core/lib/iomgr/combiner.c +++ b/src/core/lib/iomgr/combiner.c @@ -266,28 +266,34 @@ bool grpc_combiner_continue_exec_ctx(grpc_exec_ctx *exec_ctx) { gpr_atm_full_fetch_add(&lock->state, -STATE_ELEM_COUNT_LOW_BIT); GRPC_COMBINER_TRACE( gpr_log(GPR_DEBUG, "C:%p finish old_state=%" PRIdPTR, lock, old_state)); +// Define a macro to ease readability of the following switch statement. +#define OLD_STATE_WAS(orphaned, elem_count) \ + (((orphaned) ? 0 : STATE_UNORPHANED) | \ + ((elem_count)*STATE_ELEM_COUNT_LOW_BIT)) + // Depending on what the previous state was, we need to perform different + // actions. switch (old_state) { default: // we have multiple queued work items: just continue executing them break; - case STATE_UNORPHANED | (2 * STATE_ELEM_COUNT_LOW_BIT): - case 0 | (2 * STATE_ELEM_COUNT_LOW_BIT): + case OLD_STATE_WAS(false, 2): + case OLD_STATE_WAS(true, 2): // we're down to one queued item: if it's the final list we should do that if (!grpc_closure_list_empty(lock->final_list)) { lock->time_to_execute_final_list = true; } break; - case STATE_UNORPHANED | STATE_ELEM_COUNT_LOW_BIT: + case OLD_STATE_WAS(false, 1): // had one count, one unorphaned --> unlocked unorphaned GPR_TIMER_END("combiner.continue_exec_ctx", 0); return true; - case 0 | STATE_ELEM_COUNT_LOW_BIT: + case OLD_STATE_WAS(true, 1): // and one count, one orphaned --> unlocked and orphaned really_destroy(exec_ctx, lock); GPR_TIMER_END("combiner.continue_exec_ctx", 0); return true; - case STATE_UNORPHANED: - case 0: + case OLD_STATE_WAS(false, 0): + case OLD_STATE_WAS(true, 0): // these values are illegal - representing an already unlocked or // deleted lock GPR_TIMER_END("combiner.continue_exec_ctx", 0); -- cgit v1.2.3 From 2e62013f578e55ade82c5d93ac5598d307d97b21 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 10 Oct 2016 15:27:44 -0700 Subject: Add some comments --- src/core/lib/iomgr/ev_epoll_linux.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 496b2d9255..98fe2defea 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -277,6 +277,8 @@ static bool append_error(grpc_error **composite, grpc_error *error, threads that woke up MUST NOT call grpc_wakeup_fd_consume_wakeup() */ static grpc_wakeup_fd polling_island_wakeup_fd; +/* The polling island being polled right now. + See comments in workqueue_maybe_wakeup for why this is tracked. */ static __thread polling_island *g_current_thread_polling_island; /* Forward declaration */ @@ -703,11 +705,16 @@ static void polling_island_unlock_pair(polling_island *p, polling_island *q) { } static void workqueue_maybe_wakeup(polling_island *pi) { - bool force_wakeup = false; + /* If this thread is the current poller, then it may be that it's about to + decrement the current poller count, so we need to look past this thread */ bool is_current_poller = (g_current_thread_polling_island == pi); gpr_atm min_current_pollers_for_wakeup = is_current_poller ? 1 : 0; gpr_atm current_pollers = gpr_atm_no_barrier_load(&pi->poller_count); - if (force_wakeup || current_pollers > min_current_pollers_for_wakeup) { + /* Only issue a wakeup if it's likely that some poller could come in and take + it right now. Note that since we do an anticipatory mpscq_pop every poll + loop, it's ok if we miss the wakeup here, as we'll get the work item when + the next poller enters anyway. */ + if (current_pollers > min_current_pollers_for_wakeup) { GRPC_LOG_IF_ERROR("workqueue_wakeup_fd", grpc_wakeup_fd_wakeup(&pi->workqueue_wakeup_fd)); } -- cgit v1.2.3 From aa9c578b074ce06ac1bf2765971924cdf5246290 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 10 Oct 2016 12:16:13 -0700 Subject: Clean up code after merge with master --- build.yaml | 2 + src/core/lib/iomgr/endpoint_pair_uv.c | 3 +- src/core/lib/iomgr/pollset_uv.c | 9 +-- src/core/lib/iomgr/pollset_uv.h | 5 ++ src/core/lib/iomgr/tcp_client_uv.c | 4 +- src/core/lib/iomgr/tcp_server_uv.c | 1 - src/core/lib/iomgr/tcp_uv.c | 4 +- src/core/lib/iomgr/udp_server.c | 88 ++++++++++++-------------- src/core/lib/iomgr/udp_server.h | 5 +- test/core/end2end/cq_verifier_native.c | 5 +- test/core/end2end/cq_verifier_uv.c | 11 ++-- test/core/end2end/dualstack_socket_test.c | 4 +- test/core/end2end/fake_resolver.c | 5 +- test/core/end2end/fixtures/h2_fd.c | 4 +- test/core/end2end/fixtures/h2_full+pipe.c | 4 +- test/core/end2end/fixtures/h2_full+trace.c | 6 +- test/core/end2end/fixtures/h2_sockpair+trace.c | 6 +- test/core/iomgr/fd_posix_test.c | 4 +- test/core/iomgr/socket_utils_test.c | 4 +- test/core/iomgr/tcp_posix_test.c | 4 +- test/core/iomgr/tcp_server_posix_test.c | 4 +- test/core/iomgr/timer_heap_test.c | 4 +- test/core/iomgr/udp_server_test.c | 50 ++++++++++----- test/core/util/port_uv.c | 4 +- tools/run_tests/tests.json | 11 ++-- 25 files changed, 127 insertions(+), 124 deletions(-) (limited to 'src/core/lib') diff --git a/build.yaml b/build.yaml index 12051ea89c..14e73b7c12 100644 --- a/build.yaml +++ b/build.yaml @@ -2626,6 +2626,8 @@ targets: - grpc - gpr_test_util - gpr + exclude_iomgrs: + - uv platforms: - mac - linux diff --git a/src/core/lib/iomgr/endpoint_pair_uv.c b/src/core/lib/iomgr/endpoint_pair_uv.c index 4f769901ae..7941e20388 100644 --- a/src/core/lib/iomgr/endpoint_pair_uv.c +++ b/src/core/lib/iomgr/endpoint_pair_uv.c @@ -45,7 +45,8 @@ grpc_endpoint_pair grpc_iomgr_create_endpoint_pair(const char *name, size_t read_slice_size) { grpc_endpoint_pair endpoint_pair; // TODO(mlumish): implement this properly under libuv - GPR_ASSERT(false && "grpc_iomgr_create_endpoint_pair is not suppoted with libuv"); + GPR_ASSERT(false && + "grpc_iomgr_create_endpoint_pair is not suppoted with libuv"); return endpoint_pair; } diff --git a/src/core/lib/iomgr/pollset_uv.c b/src/core/lib/iomgr/pollset_uv.c index 8f4e20f296..3a74b842b6 100644 --- a/src/core/lib/iomgr/pollset_uv.c +++ b/src/core/lib/iomgr/pollset_uv.c @@ -73,9 +73,7 @@ void grpc_pollset_init(grpc_pollset *pollset, gpr_mu **mu) { pollset->shutting_down = 0; } -static void timer_close_cb(uv_handle_t *handle) { - handle->data = (void *)1; -} +static void timer_close_cb(uv_handle_t *handle) { handle->data = (void *)1; } void grpc_pollset_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_closure *closure) { @@ -89,7 +87,7 @@ void grpc_pollset_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, } void grpc_pollset_destroy(grpc_pollset *pollset) { - uv_close((uv_handle_t*)&pollset->timer, timer_close_cb); + uv_close((uv_handle_t *)&pollset->timer, timer_close_cb); // timer.data is a boolean indicating that the timer has finished closing pollset->timer.data = (void *)0; if (grpc_pollset_work_run_loop) { @@ -104,8 +102,7 @@ void grpc_pollset_reset(grpc_pollset *pollset) { pollset->shutting_down = 0; } -static void timer_run_cb(uv_timer_t *timer) { -} +static void timer_run_cb(uv_timer_t *timer) {} grpc_error *grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_pollset_worker **worker_hdl, diff --git a/src/core/lib/iomgr/pollset_uv.h b/src/core/lib/iomgr/pollset_uv.h index 9f1d1442b2..0715eb4295 100644 --- a/src/core/lib/iomgr/pollset_uv.h +++ b/src/core/lib/iomgr/pollset_uv.h @@ -31,7 +31,12 @@ * */ +#ifndef GRPC_CORE_LIB_IOMGR_POLLSET_UV_H +#define GRPC_CORE_LIB_IOMGR_POLLSET_UV_H + extern int grpc_pollset_work_run_loop; void grpc_pollset_global_init(void); void grpc_pollset_global_shutdown(void); + +#endif /* GRPC_CORE_LIB_IOMGR_POLLSET_UV_H */ diff --git a/src/core/lib/iomgr/tcp_client_uv.c b/src/core/lib/iomgr/tcp_client_uv.c index d48147ce6e..6274667042 100644 --- a/src/core/lib/iomgr/tcp_client_uv.c +++ b/src/core/lib/iomgr/tcp_client_uv.c @@ -60,9 +60,7 @@ static void uv_tcp_connect_cleanup(grpc_uv_tcp_connect *connect) { gpr_free(connect); } -static void tcp_close_callback(uv_handle_t *handle) { - gpr_free(handle); -} +static void tcp_close_callback(uv_handle_t *handle) { gpr_free(handle); } static void uv_tc_on_alarm(grpc_exec_ctx *exec_ctx, void *acp, grpc_error *error) { diff --git a/src/core/lib/iomgr/tcp_server_uv.c b/src/core/lib/iomgr/tcp_server_uv.c index e1eee2d460..73e4db3d65 100644 --- a/src/core/lib/iomgr/tcp_server_uv.c +++ b/src/core/lib/iomgr/tcp_server_uv.c @@ -178,7 +178,6 @@ static void on_connect(uv_stream_t *server, int status) { char *peer_name_string; int err; - if (status < 0) { gpr_log(GPR_INFO, "Skipping on_accept due to error: %s", uv_strerror(status)); diff --git a/src/core/lib/iomgr/tcp_uv.c b/src/core/lib/iomgr/tcp_uv.c index a78a40d261..05d6eeb240 100644 --- a/src/core/lib/iomgr/tcp_uv.c +++ b/src/core/lib/iomgr/tcp_uv.c @@ -69,9 +69,7 @@ typedef struct { grpc_pollset *pollset; } grpc_tcp; -static void uv_close_callback(uv_handle_t *handle) { - gpr_free(handle); -} +static void uv_close_callback(uv_handle_t *handle) { gpr_free(handle); } static void tcp_free(grpc_tcp *tcp) { gpr_free(tcp); } diff --git a/src/core/lib/iomgr/udp_server.c b/src/core/lib/iomgr/udp_server.c index c4884d0231..273f607192 100644 --- a/src/core/lib/iomgr/udp_server.c +++ b/src/core/lib/iomgr/udp_server.c @@ -38,7 +38,7 @@ #include "src/core/lib/iomgr/port.h" -#ifdef GPR_POSIX_SOCKET +#ifdef GRPC_POSIX_SOCKET #include "src/core/lib/iomgr/udp_server.h" @@ -62,6 +62,7 @@ #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/iomgr/resolve_address.h" +#include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/sockaddr_utils.h" #include "src/core/lib/iomgr/socket_utils_posix.h" #include "src/core/lib/support/string.h" @@ -73,11 +74,7 @@ typedef struct { int fd; grpc_fd *emfd; grpc_udp_server *server; - union { - uint8_t untyped[GRPC_MAX_SOCKADDR_SIZE]; - struct sockaddr sockaddr; - } addr; - size_t addr_len; + grpc_resolved_address addr; grpc_closure read_closure; grpc_closure destroyed_closure; grpc_udp_server_read_cb read_cb; @@ -214,10 +211,9 @@ void grpc_udp_server_destroy(grpc_exec_ctx *exec_ctx, grpc_udp_server *s, } /* Prepare a recently-created socket for listening. */ -static int prepare_socket(int fd, const struct sockaddr *addr, - size_t addr_len) { - struct sockaddr_storage sockname_temp; - socklen_t sockname_len; +static int prepare_socket(int fd, const grpc_resolved_address *addr) { + grpc_resolved_address sockname_temp; + struct sockaddr *addr_ptr = (struct sockaddr *)addr->addr; /* Set send/receive socket buffers to 1 MB */ int buffer_size_bytes = 1024 * 1024; @@ -237,15 +233,15 @@ static int prepare_socket(int fd, const struct sockaddr *addr, if (grpc_set_socket_ip_pktinfo_if_possible(fd) != GRPC_ERROR_NONE) { gpr_log(GPR_ERROR, "Unable to set ip_pktinfo."); goto error; - } else if (addr->sa_family == AF_INET6) { + } else if (addr_ptr->sa_family == AF_INET6) { if (grpc_set_socket_ipv6_recvpktinfo_if_possible(fd) != GRPC_ERROR_NONE) { gpr_log(GPR_ERROR, "Unable to set ipv6_recvpktinfo."); goto error; } } - GPR_ASSERT(addr_len < ~(socklen_t)0); - if (bind(fd, addr, (socklen_t)addr_len) < 0) { + GPR_ASSERT(addr->len < ~(socklen_t)0); + if (bind(fd, (struct sockaddr *)addr, (socklen_t)addr->len) < 0) { char *addr_str; grpc_sockaddr_to_string(&addr_str, addr, 0); gpr_log(GPR_ERROR, "bind addr=%s: %s", addr_str, strerror(errno)); @@ -253,8 +249,10 @@ static int prepare_socket(int fd, const struct sockaddr *addr, goto error; } - sockname_len = sizeof(sockname_temp); - if (getsockname(fd, (struct sockaddr *)&sockname_temp, &sockname_len) < 0) { + sockname_temp.len = sizeof(struct sockaddr_storage); + + if (getsockname(fd, (struct sockaddr *)sockname_temp.addr, + (socklen_t *)&sockname_temp.len) < 0) { goto error; } @@ -270,7 +268,7 @@ static int prepare_socket(int fd, const struct sockaddr *addr, goto error; } - return grpc_sockaddr_get_port((struct sockaddr *)&sockname_temp); + return grpc_sockaddr_get_port(&sockname_temp); error: if (fd >= 0) { @@ -303,7 +301,7 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { } static int add_socket_to_server(grpc_udp_server *s, int fd, - const struct sockaddr *addr, size_t addr_len, + const grpc_resolved_address *addr, grpc_udp_server_read_cb read_cb, grpc_udp_server_orphan_cb orphan_cb) { server_port *sp; @@ -311,9 +309,9 @@ static int add_socket_to_server(grpc_udp_server *s, int fd, char *addr_str; char *name; - port = prepare_socket(fd, addr, addr_len); + port = prepare_socket(fd, addr); if (port >= 0) { - grpc_sockaddr_to_string(&addr_str, (struct sockaddr *)&addr, 1); + grpc_sockaddr_to_string(&addr_str, addr, 1); gpr_asprintf(&name, "udp-server-listener:%s", addr_str); gpr_free(addr_str); gpr_mu_lock(&s->mu); @@ -326,8 +324,7 @@ static int add_socket_to_server(grpc_udp_server *s, int fd, sp->server = s; sp->fd = fd; sp->emfd = grpc_fd_create(fd, name); - memcpy(sp->addr.untyped, addr, addr_len); - sp->addr_len = addr_len; + memcpy(&sp->addr, addr, sizeof(grpc_resolved_address)); sp->read_cb = read_cb; sp->orphan_cb = orphan_cb; GPR_ASSERT(sp->emfd); @@ -338,34 +335,34 @@ static int add_socket_to_server(grpc_udp_server *s, int fd, return port; } -int grpc_udp_server_add_port(grpc_udp_server *s, const void *addr, - size_t addr_len, grpc_udp_server_read_cb read_cb, +int grpc_udp_server_add_port(grpc_udp_server *s, + const grpc_resolved_address *addr, + grpc_udp_server_read_cb read_cb, grpc_udp_server_orphan_cb orphan_cb) { int allocated_port1 = -1; int allocated_port2 = -1; unsigned i; int fd; grpc_dualstack_mode dsmode; - struct sockaddr_in6 addr6_v4mapped; - struct sockaddr_in wild4; - struct sockaddr_in6 wild6; - struct sockaddr_in addr4_copy; - struct sockaddr *allocated_addr = NULL; - struct sockaddr_storage sockname_temp; - socklen_t sockname_len; + grpc_resolved_address addr6_v4mapped; + grpc_resolved_address wild4; + grpc_resolved_address wild6; + grpc_resolved_address addr4_copy; + grpc_resolved_address *allocated_addr = NULL; + grpc_resolved_address sockname_temp; int port; /* Check if this is a wildcard port, and if so, try to keep the port the same as some previously created listener. */ if (grpc_sockaddr_get_port(addr) == 0) { for (i = 0; i < s->nports; i++) { - sockname_len = sizeof(sockname_temp); - if (0 == getsockname(s->ports[i].fd, (struct sockaddr *)&sockname_temp, - &sockname_len)) { - port = grpc_sockaddr_get_port((struct sockaddr *)&sockname_temp); + sockname_temp.len = sizeof(struct sockaddr_storage); + if (0 == getsockname(s->ports[i].fd, (struct sockaddr *)sockname_temp.addr, + (socklen_t *)&sockname_temp.len)) { + port = grpc_sockaddr_get_port(&sockname_temp); if (port > 0) { - allocated_addr = gpr_malloc(addr_len); - memcpy(allocated_addr, addr, addr_len); + allocated_addr = gpr_malloc(sizeof(grpc_resolved_address)); + memcpy(allocated_addr, addr, sizeof(grpc_resolved_address)); grpc_sockaddr_set_port(allocated_addr, port); addr = allocated_addr; break; @@ -375,8 +372,7 @@ int grpc_udp_server_add_port(grpc_udp_server *s, const void *addr, } if (grpc_sockaddr_to_v4mapped(addr, &addr6_v4mapped)) { - addr = (const struct sockaddr *)&addr6_v4mapped; - addr_len = sizeof(addr6_v4mapped); + addr = &addr6_v4mapped; } /* Treat :: or 0.0.0.0 as a family-agnostic wildcard. */ @@ -384,22 +380,20 @@ int grpc_udp_server_add_port(grpc_udp_server *s, const void *addr, grpc_sockaddr_make_wildcards(port, &wild4, &wild6); /* Try listening on IPv6 first. */ - addr = (struct sockaddr *)&wild6; - addr_len = sizeof(wild6); + addr = &wild6; // TODO(rjshade): Test and propagate the returned grpc_error*: grpc_create_dualstack_socket(addr, SOCK_DGRAM, IPPROTO_UDP, &dsmode, &fd); allocated_port1 = - add_socket_to_server(s, fd, addr, addr_len, read_cb, orphan_cb); + add_socket_to_server(s, fd, addr, read_cb, orphan_cb); if (fd >= 0 && dsmode == GRPC_DSMODE_DUALSTACK) { goto done; } /* If we didn't get a dualstack socket, also listen on 0.0.0.0. */ if (port == 0 && allocated_port1 > 0) { - grpc_sockaddr_set_port((struct sockaddr *)&wild4, allocated_port1); + grpc_sockaddr_set_port(&wild4, allocated_port1); } - addr = (struct sockaddr *)&wild4; - addr_len = sizeof(wild4); + addr = &wild4; } // TODO(rjshade): Test and propagate the returned grpc_error*: @@ -409,11 +403,9 @@ int grpc_udp_server_add_port(grpc_udp_server *s, const void *addr, } if (dsmode == GRPC_DSMODE_IPV4 && grpc_sockaddr_is_v4mapped(addr, &addr4_copy)) { - addr = (struct sockaddr *)&addr4_copy; - addr_len = sizeof(addr4_copy); + addr = &addr4_copy; } - allocated_port2 = - add_socket_to_server(s, fd, addr, addr_len, read_cb, orphan_cb); + allocated_port2 = add_socket_to_server(s, fd, addr, read_cb, orphan_cb); done: gpr_free(allocated_addr); diff --git a/src/core/lib/iomgr/udp_server.h b/src/core/lib/iomgr/udp_server.h index 33c5ce11cd..e8129be46c 100644 --- a/src/core/lib/iomgr/udp_server.h +++ b/src/core/lib/iomgr/udp_server.h @@ -36,6 +36,7 @@ #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/ev_posix.h" +#include "src/core/lib/iomgr/resolve_address.h" /* Forward decl of struct grpc_server */ /* This is not typedef'ed to avoid a typedef-redefinition error */ @@ -71,8 +72,8 @@ int grpc_udp_server_get_fd(grpc_udp_server *s, unsigned index); /* TODO(ctiller): deprecate this, and make grpc_udp_server_add_ports to handle all of the multiple socket port matching logic in one place */ -int grpc_udp_server_add_port(grpc_udp_server *s, const void *addr, - size_t addr_len, grpc_udp_server_read_cb read_cb, +int grpc_udp_server_add_port(grpc_udp_server *s, const grpc_resolved_address *addr, + grpc_udp_server_read_cb read_cb, grpc_udp_server_orphan_cb orphan_cb); void grpc_udp_server_destroy(grpc_exec_ctx *exec_ctx, grpc_udp_server *server, diff --git a/test/core/end2end/cq_verifier_native.c b/test/core/end2end/cq_verifier_native.c index fa9a87d6e4..b1fcb4beed 100644 --- a/test/core/end2end/cq_verifier_native.c +++ b/test/core/end2end/cq_verifier_native.c @@ -48,7 +48,7 @@ struct cq_verifier { cq_verifier *cq_verifier_create(grpc_completion_queue *cq) { cq_verifier *v = gpr_malloc(sizeof(cq_verifier)); v->cq = cq; - cq_verifier_set_first_expectation(v,NULL); + cq_verifier_set_first_expectation(v, NULL); return v; } @@ -66,7 +66,8 @@ void cq_verifier_set_first_expectation(cq_verifier *v, expectation *e) { } grpc_event cq_verifier_next_event(cq_verifier *v, int timeout_seconds) { - const gpr_timespec deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(timeout_seconds); + const gpr_timespec deadline = + GRPC_TIMEOUT_SECONDS_TO_DEADLINE(timeout_seconds); return grpc_completion_queue_next(v->cq, deadline, NULL); } diff --git a/test/core/end2end/cq_verifier_uv.c b/test/core/end2end/cq_verifier_uv.c index 74ac673f20..2b5a2ca495 100644 --- a/test/core/end2end/cq_verifier_uv.c +++ b/test/core/end2end/cq_verifier_uv.c @@ -92,16 +92,19 @@ static void timer_run_cb(uv_timer_t *timer) { } grpc_event cq_verifier_next_event(cq_verifier *v, int timeout_seconds) { - uint64_t timeout_ms = timeout_seconds < 0 ? 0 : (uint64_t)timeout_seconds * 1000; + uint64_t timeout_ms = + timeout_seconds < 0 ? 0 : (uint64_t)timeout_seconds * 1000; grpc_event ev; v->timer.data = (void *)TIMER_STARTED; uv_timer_start(&v->timer, timer_run_cb, timeout_ms, 0); - ev = grpc_completion_queue_next(v->cq, gpr_inf_past(GPR_CLOCK_MONOTONIC), NULL); + ev = grpc_completion_queue_next(v->cq, gpr_inf_past(GPR_CLOCK_MONOTONIC), + NULL); // Stop the loop if the timer goes off or we get a non-timeout event while (((timer_state)v->timer.data != TIMER_TRIGGERED) && - ev.type == GRPC_QUEUE_TIMEOUT){ + ev.type == GRPC_QUEUE_TIMEOUT) { uv_run(uv_default_loop(), UV_RUN_ONCE); - ev = grpc_completion_queue_next(v->cq, gpr_inf_past(GPR_CLOCK_MONOTONIC), NULL); + ev = grpc_completion_queue_next(v->cq, gpr_inf_past(GPR_CLOCK_MONOTONIC), + NULL); } return ev; } diff --git a/test/core/end2end/dualstack_socket_test.c b/test/core/end2end/dualstack_socket_test.c index 3fb25360fe..f427202a7b 100644 --- a/test/core/end2end/dualstack_socket_test.c +++ b/test/core/end2end/dualstack_socket_test.c @@ -361,8 +361,6 @@ int main(int argc, char **argv) { #else /* GRPC_POSIX_SOCKET */ -int main(int argc, char **argv) { - return 1; -} +int main(int argc, char **argv) { return 1; } #endif /* GRPC_POSIX_SOCKET */ diff --git a/test/core/end2end/fake_resolver.c b/test/core/end2end/fake_resolver.c index 8a6624a49a..350cd4a36b 100644 --- a/test/core/end2end/fake_resolver.c +++ b/test/core/end2end/fake_resolver.c @@ -165,10 +165,7 @@ static grpc_resolver* fake_resolver_create(grpc_resolver_factory* factory, grpc_uri ith_uri = *args->uri; char* part_str = gpr_dump_slice(path_parts.slices[i], GPR_DUMP_ASCII); ith_uri.path = part_str; - if (!parse_ipv4( - &ith_uri, - (struct sockaddr_storage*)(&addresses->addresses[i].address.addr), - &addresses->addresses[i].address.len)) { + if (!parse_ipv4(&ith_uri, &addresses->addresses[i].address)) { errors_found = true; } gpr_free(part_str); diff --git a/test/core/end2end/fixtures/h2_fd.c b/test/core/end2end/fixtures/h2_fd.c index 0eaf042aa2..e9fd6668ed 100644 --- a/test/core/end2end/fixtures/h2_fd.c +++ b/test/core/end2end/fixtures/h2_fd.c @@ -134,8 +134,6 @@ int main(int argc, char **argv) { #else /* GRPC_POSIX_SOCKET */ -int main(int argc, char **argv) { - return 1; -} +int main(int argc, char **argv) { return 1; } #endif /* GRPC_POSIX_SOCKET */ diff --git a/test/core/end2end/fixtures/h2_full+pipe.c b/test/core/end2end/fixtures/h2_full+pipe.c index 11619b099e..0a9a5f4dd3 100644 --- a/test/core/end2end/fixtures/h2_full+pipe.c +++ b/test/core/end2end/fixtures/h2_full+pipe.c @@ -127,8 +127,6 @@ int main(int argc, char **argv) { #else /* GRPC_POSIX_WAKEUP_FD */ -int main(int argc, char **argv) { - return 1; -} +int main(int argc, char **argv) { return 1; } #endif /* GRPC_POSIX_WAKEUP_FD */ diff --git a/test/core/end2end/fixtures/h2_full+trace.c b/test/core/end2end/fixtures/h2_full+trace.c index e25b5e3347..78a33c7e9a 100644 --- a/test/core/end2end/fixtures/h2_full+trace.c +++ b/test/core/end2end/fixtures/h2_full+trace.c @@ -31,9 +31,14 @@ * */ +#include "src/core/lib/iomgr/port.h" + #include "test/core/end2end/end2end_tests.h" #include +#ifdef GRPC_POSIX_SOCKET +#include +#endif #include #include @@ -45,7 +50,6 @@ #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/connected_channel.h" #include "src/core/lib/channel/http_server_filter.h" -#include "src/core/lib/iomgr/port.h" #include "src/core/lib/support/env.h" #include "src/core/lib/surface/channel.h" #include "src/core/lib/surface/server.h" diff --git a/test/core/end2end/fixtures/h2_sockpair+trace.c b/test/core/end2end/fixtures/h2_sockpair+trace.c index d0925e5109..4f3fbf22bf 100644 --- a/test/core/end2end/fixtures/h2_sockpair+trace.c +++ b/test/core/end2end/fixtures/h2_sockpair+trace.c @@ -31,9 +31,14 @@ * */ +#include "src/core/lib/iomgr/port.h" + #include "test/core/end2end/end2end_tests.h" #include +#ifdef GRPC_POSIX_SOCKET +#include +#endif #include #include @@ -48,7 +53,6 @@ #include "src/core/lib/channel/http_server_filter.h" #include "src/core/lib/iomgr/endpoint_pair.h" #include "src/core/lib/iomgr/iomgr.h" -#include "src/core/lib/iomgr/port.h" #include "src/core/lib/support/env.h" #include "src/core/lib/surface/channel.h" #include "src/core/lib/surface/completion_queue.h" diff --git a/test/core/iomgr/fd_posix_test.c b/test/core/iomgr/fd_posix_test.c index bf6d5377a6..6166699fe6 100644 --- a/test/core/iomgr/fd_posix_test.c +++ b/test/core/iomgr/fd_posix_test.c @@ -556,8 +556,6 @@ int main(int argc, char **argv) { #else /* GRPC_POSIX_SOCKET */ -int main(int argc, char **argv) { - return 1; -} +int main(int argc, char **argv) { return 1; } #endif /* GRPC_POSIX_SOCKET */ diff --git a/test/core/iomgr/socket_utils_test.c b/test/core/iomgr/socket_utils_test.c index bb789e4c5a..67bc914c15 100644 --- a/test/core/iomgr/socket_utils_test.c +++ b/test/core/iomgr/socket_utils_test.c @@ -75,8 +75,6 @@ int main(int argc, char **argv) { #else /* GRPC_POSIX_SOCKET */ -int main(int argc, char **argv) { - return 1; -} +int main(int argc, char **argv) { return 1; } #endif /* GRPC_POSIX_SOCKET */ diff --git a/test/core/iomgr/tcp_posix_test.c b/test/core/iomgr/tcp_posix_test.c index 495e648090..d998958744 100644 --- a/test/core/iomgr/tcp_posix_test.c +++ b/test/core/iomgr/tcp_posix_test.c @@ -552,8 +552,6 @@ int main(int argc, char **argv) { #else /* GRPC_POSIX_SOCKET */ -int main(int argc, char **argv) { - return 1; -} +int main(int argc, char **argv) { return 1; } #endif /* GRPC_POSIX_SOCKET */ diff --git a/test/core/iomgr/tcp_server_posix_test.c b/test/core/iomgr/tcp_server_posix_test.c index d1c0af55fe..e246816435 100644 --- a/test/core/iomgr/tcp_server_posix_test.c +++ b/test/core/iomgr/tcp_server_posix_test.c @@ -368,8 +368,6 @@ int main(int argc, char **argv) { #else /* GRPC_POSIX_SOCKET */ -int main(int argc, char **argv) { - return 1; -} +int main(int argc, char **argv) { return 1; } #endif /* GRPC_POSIX_SOCKET */ diff --git a/test/core/iomgr/timer_heap_test.c b/test/core/iomgr/timer_heap_test.c index a68988df77..410d972313 100644 --- a/test/core/iomgr/timer_heap_test.c +++ b/test/core/iomgr/timer_heap_test.c @@ -323,8 +323,6 @@ int main(int argc, char **argv) { #else /* GRPC_TIMER_USE_GENERIC */ -int main(int argc, char **argv) { - return 1; -} +int main(int argc, char **argv) { return 1; } #endif /* GRPC_TIMER_USE_GENERIC */ diff --git a/test/core/iomgr/udp_server_test.c b/test/core/iomgr/udp_server_test.c index 2a30427504..ac92f53f51 100644 --- a/test/core/iomgr/udp_server_test.c +++ b/test/core/iomgr/udp_server_test.c @@ -31,6 +31,11 @@ * */ +#include "src/core/lib/iomgr/port.h" + +// This test won't work except with posix sockets enabled +#ifdef GRPC_POSIX_SOCKET + #include "src/core/lib/iomgr/udp_server.h" #include @@ -98,13 +103,15 @@ static void test_no_op_with_start(void) { static void test_no_op_with_port(void) { g_number_of_orphan_calls = 0; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - struct sockaddr_in addr; + grpc_resolved_address resolved_addr; + struct sockaddr_in *addr = (struct sockaddr_in *)resolved_addr.addr; grpc_udp_server *s = grpc_udp_server_create(); LOG_TEST("test_no_op_with_port"); - memset(&addr, 0, sizeof(addr)); - addr.sin_family = AF_INET; - GPR_ASSERT(grpc_udp_server_add_port(s, (struct sockaddr *)&addr, sizeof(addr), + memset(&resolved_addr, 0, sizeof(resolved_addr)); + resolved_addr.len = sizeof(struct sockaddr_in); + addr->sin_family = AF_INET; + GPR_ASSERT(grpc_udp_server_add_port(s, &resolved_addr, on_read, on_fd_orphaned)); grpc_udp_server_destroy(&exec_ctx, s, NULL); @@ -117,13 +124,15 @@ static void test_no_op_with_port(void) { static void test_no_op_with_port_and_start(void) { g_number_of_orphan_calls = 0; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - struct sockaddr_in addr; + grpc_resolved_address resolved_addr; + struct sockaddr_in *addr = (struct sockaddr_in *)resolved_addr.addr; grpc_udp_server *s = grpc_udp_server_create(); LOG_TEST("test_no_op_with_port_and_start"); - memset(&addr, 0, sizeof(addr)); - addr.sin_family = AF_INET; - GPR_ASSERT(grpc_udp_server_add_port(s, (struct sockaddr *)&addr, sizeof(addr), + memset(&resolved_addr, 0, sizeof(resolved_addr)); + resolved_addr.len = sizeof(struct sockaddr_in); + addr->sin_family = AF_INET; + GPR_ASSERT(grpc_udp_server_add_port(s, &resolved_addr, on_read, on_fd_orphaned)); grpc_udp_server_start(&exec_ctx, s, NULL, 0, NULL); @@ -137,8 +146,8 @@ static void test_no_op_with_port_and_start(void) { static void test_receive(int number_of_clients) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - struct sockaddr_storage addr; - socklen_t addr_len = sizeof(addr); + grpc_resolved_address resolved_addr; + struct sockaddr_storage *addr = (struct sockaddr_storage *)resolved_addr.addr; int clifd, svrfd; grpc_udp_server *s = grpc_udp_server_create(); int i; @@ -151,15 +160,16 @@ static void test_receive(int number_of_clients) { g_number_of_bytes_read = 0; g_number_of_orphan_calls = 0; - memset(&addr, 0, sizeof(addr)); - addr.ss_family = AF_INET; - GPR_ASSERT(grpc_udp_server_add_port(s, (struct sockaddr *)&addr, addr_len, + memset(&resolved_addr, 0, sizeof(resolved_addr)); + resolved_addr.len = sizeof(struct sockaddr_storage); + addr->ss_family = AF_INET; + GPR_ASSERT(grpc_udp_server_add_port(s, &resolved_addr, on_read, on_fd_orphaned)); svrfd = grpc_udp_server_get_fd(s, 0); GPR_ASSERT(svrfd >= 0); - GPR_ASSERT(getsockname(svrfd, (struct sockaddr *)&addr, &addr_len) == 0); - GPR_ASSERT(addr_len <= sizeof(addr)); + GPR_ASSERT(getsockname(svrfd, (struct sockaddr *)addr, (socklen_t *)&resolved_addr.len) == 0); + GPR_ASSERT(resolved_addr.len <= sizeof(struct sockaddr_storage)); pollsets[0] = g_pollset; grpc_udp_server_start(&exec_ctx, s, pollsets, 1, NULL); @@ -171,9 +181,9 @@ static void test_receive(int number_of_clients) { number_of_reads_before = g_number_of_reads; /* Create a socket, send a packet to the UDP server. */ - clifd = socket(addr.ss_family, SOCK_DGRAM, 0); + clifd = socket(addr->ss_family, SOCK_DGRAM, 0); GPR_ASSERT(clifd >= 0); - GPR_ASSERT(connect(clifd, (struct sockaddr *)&addr, addr_len) == 0); + GPR_ASSERT(connect(clifd, (struct sockaddr *)&addr, (socklen_t)resolved_addr.len) == 0); GPR_ASSERT(5 == write(clifd, "hello", 5)); while (g_number_of_reads == number_of_reads_before && gpr_time_cmp(deadline, gpr_now(deadline.clock_type)) > 0) { @@ -227,3 +237,9 @@ int main(int argc, char **argv) { grpc_iomgr_shutdown(); return 0; } + +#else /* GRPC_POSIX_SOCKET */ + +int main(int argc, char **argv) { return 1; } + +#endif /* GRPC_POSIX_SOCKET */ diff --git a/test/core/util/port_uv.c b/test/core/util/port_uv.c index cab31b3f4e..0c9c0d87d6 100644 --- a/test/core/util/port_uv.c +++ b/test/core/util/port_uv.c @@ -112,8 +112,6 @@ int grpc_pick_unused_port_or_die(void) { return port; } -void grpc_recycle_unused_port(int port) { - GPR_ASSERT(free_chosen_port(port)); -} +void grpc_recycle_unused_port(int port) { GPR_ASSERT(free_chosen_port(port)); } #endif /* GRPC_UV && GRPC_TEST_PICK_PORT */ diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 4930e07b0c..740a991db6 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -411,9 +411,7 @@ ], "cpu_cost": 0.1, "exclude_configs": [], - "exclude_iomgrs": [ - "uv" - ], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -435,6 +433,9 @@ ], "cpu_cost": 0.1, "exclude_configs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "gtest": false, "language": "c", @@ -2167,7 +2168,9 @@ ], "cpu_cost": 1.0, "exclude_configs": [], - "exclude_iomgrs": [], + "exclude_iomgrs": [ + "uv" + ], "flaky": false, "gtest": false, "language": "c", -- cgit v1.2.3 From c1c38586dedfb4368372a2de03df1645a2a9ee7f Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 11 Oct 2016 11:03:27 -0700 Subject: Code review changes. --- src/core/ext/client_config/client_channel.c | 25 +++++++++++++++---------- src/core/ext/client_config/method_config.c | 25 +++++++++++++------------ src/core/ext/client_config/method_config.h | 24 +++++++++++++----------- src/core/lib/channel/message_size_filter.c | 4 ++-- src/core/lib/transport/hashtable.c | 9 +++++---- src/core/lib/transport/hashtable.h | 5 +++-- 6 files changed, 51 insertions(+), 41 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/client_config/client_channel.c b/src/core/ext/client_config/client_channel.c index 0d243768ef..0594c0b3ac 100644 --- a/src/core/ext/client_config/client_channel.c +++ b/src/core/ext/client_config/client_channel.c @@ -663,9 +663,13 @@ static bool pick_subchannel(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, // If the application explicitly set wait_for_ready, use that. // Otherwise, if the service config specified a value for this // method, use that. - if ((initial_metadata_flags & - GRPC_INITIAL_METADATA_WAIT_FOR_READY_EXPLICITLY_SET) == 0 && - calld->wait_for_ready_from_service_config != WAIT_FOR_READY_UNSET) { + const bool wait_for_ready_set_from_api = + initial_metadata_flags & + GRPC_INITIAL_METADATA_WAIT_FOR_READY_EXPLICITLY_SET; + const bool wait_for_ready_set_from_service_config = + calld->wait_for_ready_from_service_config != WAIT_FOR_READY_UNSET; + if (!wait_for_ready_set_from_api && + wait_for_ready_set_from_service_config) { if (calld->wait_for_ready_from_service_config == WAIT_FOR_READY_TRUE) { initial_metadata_flags |= GRPC_INITIAL_METADATA_WAIT_FOR_READY; } else { @@ -676,8 +680,9 @@ static bool pick_subchannel(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, const grpc_lb_policy_pick_args inputs = { calld->pollent, initial_metadata, initial_metadata_flags, &calld->lb_token_mdelem, gpr_inf_future(GPR_CLOCK_MONOTONIC)}; - bool result = grpc_lb_policy_pick(exec_ctx, lb_policy, &inputs, - connected_subchannel, NULL, on_ready); + const bool result = + grpc_lb_policy_pick(exec_ctx, lb_policy, &inputs, + connected_subchannel, NULL, on_ready); GRPC_LB_POLICY_UNREF(exec_ctx, lb_policy, "pick_subchannel"); GPR_TIMER_END("pick_subchannel", 0); return result; @@ -836,13 +841,13 @@ static void read_service_config(grpc_exec_ctx *exec_ctx, void *arg, gpr_mu_unlock(&chand->mu); // If the method config table was present, use it. if (method_config_table != NULL) { - grpc_method_config *method_config = + const grpc_method_config *method_config = grpc_method_config_table_get_method_config(method_config_table, calld->path); if (method_config != NULL) { - gpr_timespec *per_method_timeout = + const gpr_timespec *per_method_timeout = grpc_method_config_get_timeout(method_config); - bool *wait_for_ready = + const bool *wait_for_ready = grpc_method_config_get_wait_for_ready(method_config); if (per_method_timeout != NULL || wait_for_ready != NULL) { gpr_mu_lock(&calld->mu); @@ -907,14 +912,14 @@ static grpc_error *cc_init_call_elem(grpc_exec_ctx *exec_ctx, grpc_method_config_table_get_method_config(method_config_table, args->path); if (method_config != NULL) { - gpr_timespec *per_method_timeout = + const gpr_timespec *per_method_timeout = grpc_method_config_get_timeout(method_config); if (per_method_timeout != NULL) { gpr_timespec per_method_deadline = gpr_time_add(calld->call_start_time, *per_method_timeout); calld->deadline = gpr_time_min(calld->deadline, per_method_deadline); } - bool *wait_for_ready = + const bool *wait_for_ready = grpc_method_config_get_wait_for_ready(method_config); if (wait_for_ready != NULL) { calld->wait_for_ready_from_service_config = diff --git a/src/core/ext/client_config/method_config.c b/src/core/ext/client_config/method_config.c index a112355ff5..3699c22810 100644 --- a/src/core/ext/client_config/method_config.c +++ b/src/core/ext/client_config/method_config.c @@ -174,29 +174,30 @@ void grpc_method_config_unref(grpc_method_config* method_config) { } } -int grpc_method_config_cmp(grpc_method_config* method_config1, - grpc_method_config* method_config2) { +int grpc_method_config_cmp(const grpc_method_config* method_config1, + const grpc_method_config* method_config2) { return grpc_hash_table_cmp(method_config1->table, method_config2->table); } -bool* grpc_method_config_get_wait_for_ready(grpc_method_config* method_config) { +const bool* grpc_method_config_get_wait_for_ready( + const grpc_method_config* method_config) { return grpc_hash_table_get(method_config->table, method_config->wait_for_ready_key); } -gpr_timespec* grpc_method_config_get_timeout( - grpc_method_config* method_config) { +const gpr_timespec* grpc_method_config_get_timeout( + const grpc_method_config* method_config) { return grpc_hash_table_get(method_config->table, method_config->timeout_key); } -int32_t* grpc_method_config_get_max_request_message_bytes( - grpc_method_config* method_config) { +const int32_t* grpc_method_config_get_max_request_message_bytes( + const grpc_method_config* method_config) { return grpc_hash_table_get(method_config->table, method_config->max_request_message_bytes_key); } -int32_t* grpc_method_config_get_max_response_message_bytes( - grpc_method_config* method_config) { +const int32_t* grpc_method_config_get_max_response_message_bytes( + const grpc_method_config* method_config) { return grpc_hash_table_get(method_config->table, method_config->max_response_message_bytes_key); } @@ -244,13 +245,13 @@ void grpc_method_config_table_unref(grpc_method_config_table* table) { grpc_hash_table_unref(table); } -int grpc_method_config_table_cmp(grpc_method_config_table* table1, - grpc_method_config_table* table2) { +int grpc_method_config_table_cmp(const grpc_method_config_table* table1, + const grpc_method_config_table* table2) { return grpc_hash_table_cmp(table1, table2); } grpc_method_config* grpc_method_config_table_get_method_config( - grpc_method_config_table* table, grpc_mdstr* path) { + const grpc_method_config_table* table, const grpc_mdstr* path) { grpc_method_config* method_config = grpc_hash_table_get(table, path); // If we didn't find a match for the path, try looking for a wildcard // entry (i.e., change "/service/method" to "/service/*"). diff --git a/src/core/ext/client_config/method_config.h b/src/core/ext/client_config/method_config.h index 65b34a768a..04e6bc8141 100644 --- a/src/core/ext/client_config/method_config.h +++ b/src/core/ext/client_config/method_config.h @@ -51,17 +51,19 @@ grpc_method_config* grpc_method_config_create( grpc_method_config* grpc_method_config_ref(grpc_method_config* method_config); void grpc_method_config_unref(grpc_method_config* method_config); -int grpc_method_config_cmp(grpc_method_config* method_config1, - grpc_method_config* method_config2); +int grpc_method_config_cmp(const grpc_method_config* method_config1, + const grpc_method_config* method_config2); /// These methods return NULL if the requested field is unset. /// The caller does NOT take ownership of the result. -bool* grpc_method_config_get_wait_for_ready(grpc_method_config* method_config); -gpr_timespec* grpc_method_config_get_timeout(grpc_method_config* method_config); -int32_t* grpc_method_config_get_max_request_message_bytes( - grpc_method_config* method_config); -int32_t* grpc_method_config_get_max_response_message_bytes( - grpc_method_config* method_config); +const bool* grpc_method_config_get_wait_for_ready( + const grpc_method_config* method_config); +const gpr_timespec* grpc_method_config_get_timeout( + const grpc_method_config* method_config); +const int32_t* grpc_method_config_get_max_request_message_bytes( + const grpc_method_config* method_config); +const int32_t* grpc_method_config_get_max_response_message_bytes( + const grpc_method_config* method_config); /// A table of method configs. typedef grpc_hash_table grpc_method_config_table; @@ -82,13 +84,13 @@ grpc_method_config_table* grpc_method_config_table_ref( grpc_method_config_table* table); void grpc_method_config_table_unref(grpc_method_config_table* table); -int grpc_method_config_table_cmp(grpc_method_config_table* table1, - grpc_method_config_table* table2); +int grpc_method_config_table_cmp(const grpc_method_config_table* table1, + const grpc_method_config_table* table2); /// Returns NULL if the method has no config. /// Caller does NOT own a reference to the result. grpc_method_config* grpc_method_config_table_get_method_config( - grpc_method_config_table* table, grpc_mdstr* path); + const grpc_method_config_table* table, const grpc_mdstr* path); /// Returns a channel arg containing \a table. grpc_arg grpc_method_config_table_create_channel_arg( diff --git a/src/core/lib/channel/message_size_filter.c b/src/core/lib/channel/message_size_filter.c index dbd8afd465..1382f19945 100644 --- a/src/core/lib/channel/message_size_filter.c +++ b/src/core/lib/channel/message_size_filter.c @@ -137,14 +137,14 @@ static grpc_error* init_call_elem(grpc_exec_ctx* exec_ctx, grpc_method_config_table_get_method_config(chand->method_config_table, args->path); if (method_config != NULL) { - int32_t* max_request_message_bytes = + const int32_t* max_request_message_bytes = grpc_method_config_get_max_request_message_bytes(method_config); if (max_request_message_bytes != NULL && (*max_request_message_bytes < calld->max_send_size || calld->max_send_size < 0)) { calld->max_send_size = *max_request_message_bytes; } - int32_t* max_response_message_bytes = + const int32_t* max_response_message_bytes = grpc_method_config_get_max_response_message_bytes(method_config); if (max_response_message_bytes != NULL && (*max_response_message_bytes < calld->max_recv_size || diff --git a/src/core/lib/transport/hashtable.c b/src/core/lib/transport/hashtable.c index 838fe1026e..d127f17a37 100644 --- a/src/core/lib/transport/hashtable.c +++ b/src/core/lib/transport/hashtable.c @@ -47,8 +47,8 @@ struct grpc_hash_table { // Helper function for insert and get operations that performs quadratic // probing (https://en.wikipedia.org/wiki/Quadratic_probing). -static size_t grpc_hash_table_find_index(grpc_hash_table* table, - grpc_mdstr* key, bool find_empty) { +static size_t grpc_hash_table_find_index( + const grpc_hash_table* table, const grpc_mdstr* key, bool find_empty) { for (size_t i = 0; i < table->num_entries; ++i) { const size_t idx = (key->hash + i * i) % table->num_entries; if (table->entries[idx].key == NULL) @@ -111,14 +111,15 @@ int grpc_hash_table_unref(grpc_hash_table* table) { return 0; } -void* grpc_hash_table_get(grpc_hash_table* table, grpc_mdstr* key) { +void* grpc_hash_table_get(const grpc_hash_table* table, const grpc_mdstr* key) { const size_t idx = grpc_hash_table_find_index(table, key, false /* find_empty */); if (idx == table->num_entries) return NULL; // Not found. return table->entries[idx].value; } -int grpc_hash_table_cmp(grpc_hash_table* table1, grpc_hash_table* table2) { +int grpc_hash_table_cmp(const grpc_hash_table* table1, + const grpc_hash_table* table2) { // Compare by num_entries. if (table1->num_entries < table2->num_entries) return -1; if (table1->num_entries > table2->num_entries) return 1; diff --git a/src/core/lib/transport/hashtable.h b/src/core/lib/transport/hashtable.h index 3ec48dce3a..0ce51383c7 100644 --- a/src/core/lib/transport/hashtable.h +++ b/src/core/lib/transport/hashtable.h @@ -74,9 +74,10 @@ int grpc_hash_table_unref(grpc_hash_table* table); /** Returns the value from \a table associated with \a key. Returns NULL if \a key is not found. */ -void* grpc_hash_table_get(grpc_hash_table* table, grpc_mdstr* key); +void* grpc_hash_table_get(const grpc_hash_table* table, const grpc_mdstr* key); /** Compares two hash tables. */ -int grpc_hash_table_cmp(grpc_hash_table* table1, grpc_hash_table* table2); +int grpc_hash_table_cmp(const grpc_hash_table* table1, + const grpc_hash_table* table2); #endif /* GRPC_CORE_LIB_TRANSPORT_HASHTABLE_H */ -- cgit v1.2.3 From 7347ad8fe07b7a288572dd5543019440112f61b1 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Tue, 11 Oct 2016 11:12:29 -0700 Subject: Use booleans instead of bitmask args --- src/core/lib/iomgr/ev_poll_posix.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.c index 3de329c645..1fead8a895 100644 --- a/src/core/lib/iomgr/ev_poll_posix.c +++ b/src/core/lib/iomgr/ev_poll_posix.c @@ -968,8 +968,7 @@ static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, } else { // Wake up all the file descriptors, if we have an invalid one // we can identify it on the next pollset_work() - fd_end_poll(exec_ctx, &watchers[i], POLLIN_CHECK, POLLOUT_CHECK, - pollset); + fd_end_poll(exec_ctx, &watchers[i], 1, 1, pollset); } } } else if (r == 0) { -- cgit v1.2.3 From cd7d0479a2aa51166ca251ed0f460f1c2ea5d1e7 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Tue, 11 Oct 2016 12:24:20 -0700 Subject: Cleanup poll-cv setup --- src/core/lib/iomgr/ev_epoll_linux.c | 2 +- src/core/lib/iomgr/ev_poll_cv_posix.c | 13 ++----------- src/core/lib/iomgr/ev_poll_posix.c | 2 +- src/core/lib/iomgr/wakeup_fd_posix.c | 30 ++++++++++++++++++++++++++---- src/core/lib/iomgr/wakeup_fd_posix.h | 5 ++++- 5 files changed, 34 insertions(+), 18 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 249bc98735..ad1cfc2031 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -1892,7 +1892,7 @@ const grpc_event_engine_vtable *grpc_init_epoll_linux(void) { return NULL; } - if (!grpc_has_wakeup_fd) { + if (!grpc_has_wakeup_fd()) { return NULL; } diff --git a/src/core/lib/iomgr/ev_poll_cv_posix.c b/src/core/lib/iomgr/ev_poll_cv_posix.c index 1ea811e445..0cb414ba88 100644 --- a/src/core/lib/iomgr/ev_poll_cv_posix.c +++ b/src/core/lib/iomgr/ev_poll_cv_posix.c @@ -255,21 +255,12 @@ static void shutdown_engine(void) { } const grpc_event_engine_vtable* grpc_init_poll_cv_posix(void) { - int has_wakeup_fd = grpc_has_wakeup_fd; - int allow_specialized_wakeup_fd = grpc_allow_specialized_wakeup_fd; - int allow_pipe_wakeup_fd = grpc_allow_pipe_wakeup_fd; grpc_global_cv_fd_table_init(); - grpc_allow_specialized_wakeup_fd = 0; - grpc_allow_pipe_wakeup_fd = 0; - grpc_wakeup_fd_global_init(); - grpc_has_wakeup_fd = 1; + grpc_enable_cv_wakeup_fds(1); ev_poll_vtable = grpc_init_poll_posix(); if (!ev_poll_vtable) { grpc_global_cv_fd_table_shutdown(); - grpc_has_wakeup_fd = has_wakeup_fd; - grpc_allow_specialized_wakeup_fd = allow_specialized_wakeup_fd; - grpc_allow_pipe_wakeup_fd = allow_pipe_wakeup_fd; - grpc_global_cv_fd_table_init(); + grpc_enable_cv_wakeup_fds(0); return NULL; } vtable = *ev_poll_vtable; diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.c index 97e71d968e..0dca51bc78 100644 --- a/src/core/lib/iomgr/ev_poll_posix.c +++ b/src/core/lib/iomgr/ev_poll_posix.c @@ -1277,7 +1277,7 @@ static const grpc_event_engine_vtable vtable = { }; const grpc_event_engine_vtable *grpc_init_poll_posix(void) { - if (!grpc_has_wakeup_fd) { + if (!grpc_has_wakeup_fd()) { return NULL; } if (!GRPC_LOG_IF_ERROR("pollset_global_init", pollset_global_init())) { diff --git a/src/core/lib/iomgr/wakeup_fd_posix.c b/src/core/lib/iomgr/wakeup_fd_posix.c index 041c221de3..f75ae78c22 100644 --- a/src/core/lib/iomgr/wakeup_fd_posix.c +++ b/src/core/lib/iomgr/wakeup_fd_posix.c @@ -41,9 +41,11 @@ #include "src/core/lib/iomgr/wakeup_fd_posix.h" static const grpc_wakeup_fd_vtable *wakeup_fd_vtable = NULL; + int grpc_allow_specialized_wakeup_fd = 1; int grpc_allow_pipe_wakeup_fd = 1; -int grpc_has_wakeup_fd = 1; +int grpc_has_real_wakeup_fd = 1; +int grpc_cv_wakeup_fds_enabled = 0; void grpc_wakeup_fd_global_init(void) { if (grpc_allow_specialized_wakeup_fd && @@ -53,27 +55,47 @@ void grpc_wakeup_fd_global_init(void) { grpc_pipe_wakeup_fd_vtable.check_availability()) { wakeup_fd_vtable = &grpc_pipe_wakeup_fd_vtable; } else { - grpc_has_wakeup_fd = 0; - wakeup_fd_vtable = &grpc_cv_wakeup_fd_vtable; + grpc_has_real_wakeup_fd = 0; } } void grpc_wakeup_fd_global_destroy(void) { wakeup_fd_vtable = NULL; } +int grpc_has_wakeup_fd(void) { + return grpc_has_real_wakeup_fd || grpc_cv_wakeup_fds_enabled; +} + +void grpc_enable_cv_wakeup_fds(int enable) { + grpc_cv_wakeup_fds_enabled = enable; +} + grpc_error *grpc_wakeup_fd_init(grpc_wakeup_fd *fd_info) { + if (grpc_cv_wakeup_fds_enabled) { + return grpc_cv_wakeup_fd_vtable.init(fd_info); + } return wakeup_fd_vtable->init(fd_info); } grpc_error *grpc_wakeup_fd_consume_wakeup(grpc_wakeup_fd *fd_info) { + if (grpc_cv_wakeup_fds_enabled) { + return grpc_cv_wakeup_fd_vtable.consume(fd_info); + } return wakeup_fd_vtable->consume(fd_info); } grpc_error *grpc_wakeup_fd_wakeup(grpc_wakeup_fd *fd_info) { + if (grpc_cv_wakeup_fds_enabled) { + return grpc_cv_wakeup_fd_vtable.wakeup(fd_info); + } return wakeup_fd_vtable->wakeup(fd_info); } void grpc_wakeup_fd_destroy(grpc_wakeup_fd *fd_info) { - wakeup_fd_vtable->destroy(fd_info); + if (grpc_cv_wakeup_fds_enabled) { + grpc_cv_wakeup_fd_vtable.destroy(fd_info); + } else { + wakeup_fd_vtable->destroy(fd_info); + } } #endif /* GPR_POSIX_WAKEUP_FD */ diff --git a/src/core/lib/iomgr/wakeup_fd_posix.h b/src/core/lib/iomgr/wakeup_fd_posix.h index bd0fb46da1..243c452751 100644 --- a/src/core/lib/iomgr/wakeup_fd_posix.h +++ b/src/core/lib/iomgr/wakeup_fd_posix.h @@ -71,6 +71,9 @@ void grpc_wakeup_fd_global_destroy(void); * purposes only.*/ void grpc_wakeup_fd_global_init_force_fallback(void); +int grpc_has_wakeup_fd(void); +void grpc_enable_cv_wakeup_fds(int enable); + typedef struct grpc_wakeup_fd grpc_wakeup_fd; typedef struct grpc_wakeup_fd_vtable { @@ -89,7 +92,7 @@ struct grpc_wakeup_fd { extern int grpc_allow_specialized_wakeup_fd; extern int grpc_allow_pipe_wakeup_fd; -extern int grpc_has_wakeup_fd; +extern int grpc_has_real_wakeup_fd; #define GRPC_WAKEUP_FD_GET_READ_FD(fd_info) ((fd_info)->read_fd) -- cgit v1.2.3 From 7e73f8c2d8f46f9ea3491a897345047bed7a0ea0 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Tue, 11 Oct 2016 12:55:40 -0700 Subject: Changes --- src/core/lib/iomgr/ev_poll_cv_posix.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/ev_poll_cv_posix.h b/src/core/lib/iomgr/ev_poll_cv_posix.h index ff667a54c2..885711d1c5 100644 --- a/src/core/lib/iomgr/ev_poll_cv_posix.h +++ b/src/core/lib/iomgr/ev_poll_cv_posix.h @@ -54,12 +54,9 @@ typedef struct fd_node { typedef struct cv_fd_table { gpr_mu mu; -<<<<<<< HEAD -======= int pollcount; int shutdown; gpr_cv shutdown_complete; ->>>>>>> d195cf589d3f03b4f08017f3e2885c2c2fff125b fd_node* cvfds; fd_node* free_fds; unsigned int size; -- cgit v1.2.3 From a3654db631f02eb7f566ea775d78f3ff2b27830a Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 11 Oct 2016 15:52:39 -0700 Subject: Renamed LB-related metadata keys --- src/core/ext/lb_policy/grpclb/grpclb.c | 6 +++--- src/core/ext/load_reporting/load_reporting.h | 4 ++-- src/core/ext/load_reporting/load_reporting_filter.c | 4 ++-- src/core/lib/transport/static_metadata.c | 4 ++-- src/core/lib/transport/static_metadata.h | 21 ++++++++++----------- test/core/end2end/fuzzers/hpack.dictionary | 8 ++++---- test/core/end2end/tests/load_reporting_hook.c | 4 ++-- test/cpp/grpclb/grpclb_test.cc | 3 +-- tools/codegen/core/gen_static_metadata.py | 4 ++-- 9 files changed, 28 insertions(+), 30 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index ae1f2a3b4c..0442c864f5 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -399,14 +399,14 @@ static grpc_lb_addresses *process_serverlist( GPR_ARRAY_SIZE(server->load_balance_token) - 1; grpc_mdstr *lb_token_mdstr = grpc_mdstr_from_buffer( (uint8_t *)server->load_balance_token, lb_token_size); - user_data = grpc_mdelem_from_metadata_strings( - GRPC_MDSTR_LOAD_REPORTING_INITIAL, lb_token_mdstr); + user_data = grpc_mdelem_from_metadata_strings(GRPC_MDSTR_LB_TOKEN, + lb_token_mdstr); } else { gpr_log(GPR_ERROR, "Missing LB token for backend address '%s'. The empty token will " "be used instead", grpc_sockaddr_to_uri((struct sockaddr *)&addr.addr)); - user_data = GRPC_MDELEM_LOAD_REPORTING_INITIAL_EMPTY; + user_data = GRPC_MDELEM_LB_TOKEN_EMPTY; } grpc_lb_addresses_set_address(lb_addresses, addr_idx, &addr.addr, addr.len, diff --git a/src/core/ext/load_reporting/load_reporting.h b/src/core/ext/load_reporting/load_reporting.h index e37817d8c2..a0db780c3a 100644 --- a/src/core/ext/load_reporting/load_reporting.h +++ b/src/core/ext/load_reporting/load_reporting.h @@ -39,11 +39,11 @@ /** Metadata key for initial metadata coming from clients */ /* TODO(dgq): change to the final value TBD */ -#define GRPC_LOAD_REPORTING_INITIAL_MD_KEY "load-reporting-initial" +#define GRPC_LB_TOKEN_MD_KEY "lb-token" /** Metadata key for trailing metadata from servers */ /* TODO(dgq): change to the final value TBD */ -#define GRPC_LOAD_REPORTING_TRAILING_MD_KEY "load-reporting-trailing" +#define GRPC_LB_COST_MD_KEY "lb-cost" /** Identifiers for the invocation point of the users LR callback */ typedef enum grpc_load_reporting_source { diff --git a/src/core/ext/load_reporting/load_reporting_filter.c b/src/core/ext/load_reporting/load_reporting_filter.c index 394f0cb832..22bf36367f 100644 --- a/src/core/ext/load_reporting/load_reporting_filter.c +++ b/src/core/ext/load_reporting/load_reporting_filter.c @@ -75,7 +75,7 @@ static grpc_mdelem *recv_md_filter(void *user_data, grpc_mdelem *md) { if (md->key == GRPC_MDSTR_PATH) { calld->service_method = grpc_mdstr_as_c_string(md->value); - } else if (md->key == GRPC_MDSTR_LOAD_REPORTING_INITIAL) { + } else if (md->key == GRPC_MDSTR_LB_TOKEN) { calld->initial_md_string = gpr_strdup(grpc_mdstr_as_c_string(md->value)); return NULL; } @@ -193,7 +193,7 @@ static grpc_mdelem *lr_trailing_md_filter(void *user_data, grpc_mdelem *md) { grpc_call_element *elem = user_data; call_data *calld = elem->call_data; - if (md->key == GRPC_MDSTR_LOAD_REPORTING_TRAILING) { + if (md->key == GRPC_MDSTR_LB_COST) { calld->trailing_md_string = gpr_strdup(grpc_mdstr_as_c_string(md->value)); return NULL; } diff --git a/src/core/lib/transport/static_metadata.c b/src/core/lib/transport/static_metadata.c index 5e0352a467..f019ef156a 100644 --- a/src/core/lib/transport/static_metadata.c +++ b/src/core/lib/transport/static_metadata.c @@ -126,9 +126,9 @@ const char *const grpc_static_metadata_strings[GRPC_STATIC_MDSTR_COUNT] = { "if-range", "if-unmodified-since", "last-modified", + "lb-cost", + "lb-token", "link", - "load-reporting-initial", - "load-reporting-trailing", "location", "max-forwards", ":method", diff --git a/src/core/lib/transport/static_metadata.h b/src/core/lib/transport/static_metadata.h index 5b9ee1a60a..e0a8196419 100644 --- a/src/core/lib/transport/static_metadata.h +++ b/src/core/lib/transport/static_metadata.h @@ -175,12 +175,12 @@ extern grpc_mdstr grpc_static_mdstr_table[GRPC_STATIC_MDSTR_COUNT]; #define GRPC_MDSTR_IF_UNMODIFIED_SINCE (&grpc_static_mdstr_table[62]) /* "last-modified" */ #define GRPC_MDSTR_LAST_MODIFIED (&grpc_static_mdstr_table[63]) +/* "lb-cost" */ +#define GRPC_MDSTR_LB_COST (&grpc_static_mdstr_table[64]) +/* "lb-token" */ +#define GRPC_MDSTR_LB_TOKEN (&grpc_static_mdstr_table[65]) /* "link" */ -#define GRPC_MDSTR_LINK (&grpc_static_mdstr_table[64]) -/* "load-reporting-initial" */ -#define GRPC_MDSTR_LOAD_REPORTING_INITIAL (&grpc_static_mdstr_table[65]) -/* "load-reporting-trailing" */ -#define GRPC_MDSTR_LOAD_REPORTING_TRAILING (&grpc_static_mdstr_table[66]) +#define GRPC_MDSTR_LINK (&grpc_static_mdstr_table[66]) /* "location" */ #define GRPC_MDSTR_LOCATION (&grpc_static_mdstr_table[67]) /* "max-forwards" */ @@ -337,13 +337,12 @@ extern uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT]; #define GRPC_MDELEM_IF_UNMODIFIED_SINCE_EMPTY (&grpc_static_mdelem_table[44]) /* "last-modified": "" */ #define GRPC_MDELEM_LAST_MODIFIED_EMPTY (&grpc_static_mdelem_table[45]) +/* "lb-cost": "" */ +#define GRPC_MDELEM_LB_COST_EMPTY (&grpc_static_mdelem_table[46]) +/* "lb-token": "" */ +#define GRPC_MDELEM_LB_TOKEN_EMPTY (&grpc_static_mdelem_table[47]) /* "link": "" */ -#define GRPC_MDELEM_LINK_EMPTY (&grpc_static_mdelem_table[46]) -/* "load-reporting-initial": "" */ -#define GRPC_MDELEM_LOAD_REPORTING_INITIAL_EMPTY (&grpc_static_mdelem_table[47]) -/* "load-reporting-trailing": "" */ -#define GRPC_MDELEM_LOAD_REPORTING_TRAILING_EMPTY \ - (&grpc_static_mdelem_table[48]) +#define GRPC_MDELEM_LINK_EMPTY (&grpc_static_mdelem_table[48]) /* "location": "" */ #define GRPC_MDELEM_LOCATION_EMPTY (&grpc_static_mdelem_table[49]) /* "max-forwards": "" */ diff --git a/test/core/end2end/fuzzers/hpack.dictionary b/test/core/end2end/fuzzers/hpack.dictionary index a93bccfa0d..181bbe845e 100644 --- a/test/core/end2end/fuzzers/hpack.dictionary +++ b/test/core/end2end/fuzzers/hpack.dictionary @@ -63,9 +63,9 @@ "\x08if-range" "\x13if-unmodified-since" "\x0Dlast-modified" +"\x07lb-cost" +"\x08lb-token" "\x04link" -"\x16load-reporting-initial" -"\x17load-reporting-trailing" "\x08location" "\x0Cmax-forwards" "\x07:method" @@ -138,9 +138,9 @@ "\x00\x08if-range\x00" "\x00\x13if-unmodified-since\x00" "\x00\x0Dlast-modified\x00" +"\x00\x07lb-cost\x00" +"\x00\x08lb-token\x00" "\x00\x04link\x00" -"\x00\x16load-reporting-initial\x00" -"\x00\x17load-reporting-trailing\x00" "\x00\x08location\x00" "\x00\x0Cmax-forwards\x00" "\x00\x07:method\x03GET" diff --git a/test/core/end2end/tests/load_reporting_hook.c b/test/core/end2end/tests/load_reporting_hook.c index 59d054cf87..7f95dfd949 100644 --- a/test/core/end2end/tests/load_reporting_hook.c +++ b/test/core/end2end/tests/load_reporting_hook.c @@ -295,13 +295,13 @@ static void test_load_reporting_hook(grpc_end2end_test_config config) { grpc_metadata initial_lr_metadata; grpc_metadata trailing_lr_metadata; - initial_lr_metadata.key = GRPC_LOAD_REPORTING_INITIAL_MD_KEY; + initial_lr_metadata.key = GRPC_LB_TOKEN_MD_KEY; initial_lr_metadata.value = "client-token"; initial_lr_metadata.value_length = strlen(initial_lr_metadata.value); memset(&initial_lr_metadata.internal_data, 0, sizeof(initial_lr_metadata.internal_data)); - trailing_lr_metadata.key = GRPC_LOAD_REPORTING_TRAILING_MD_KEY; + trailing_lr_metadata.key = GRPC_LB_COST_MD_KEY; trailing_lr_metadata.value = "server-token"; trailing_lr_metadata.value_length = strlen(trailing_lr_metadata.value); memset(&trailing_lr_metadata.internal_data, 0, diff --git a/test/cpp/grpclb/grpclb_test.cc b/test/cpp/grpclb/grpclb_test.cc index 7666c4e60b..80f2fa4f4d 100644 --- a/test/cpp/grpclb/grpclb_test.cc +++ b/test/cpp/grpclb/grpclb_test.cc @@ -334,8 +334,7 @@ static void start_backend_server(server_fixture *sf) { // have a version for int but does have one for long long int. string expected_token = "token" + std::to_string((long long int)sf->port); expected_token.resize(64, '-'); - GPR_ASSERT(contains_metadata(&request_metadata_recv, - "load-reporting-initial", + GPR_ASSERT(contains_metadata(&request_metadata_recv, "lb-token", expected_token.c_str())); gpr_log(GPR_INFO, "Server[%s] after tag 100", sf->servers_hostport); diff --git a/tools/codegen/core/gen_static_metadata.py b/tools/codegen/core/gen_static_metadata.py index 6f400102e4..6f8cad279c 100755 --- a/tools/codegen/core/gen_static_metadata.py +++ b/tools/codegen/core/gen_static_metadata.py @@ -109,8 +109,8 @@ CONFIG = [ ('if-range', ''), ('if-unmodified-since', ''), ('last-modified', ''), - ('load-reporting-initial', ''), - ('load-reporting-trailing', ''), + ('lb-token', ''), + ('lb-cost', ''), ('link', ''), ('location', ''), ('max-forwards', ''), -- cgit v1.2.3 From fff290d88b1d6f45aaf48f3f17df1f97bb8a0890 Mon Sep 17 00:00:00 2001 From: Robbie Shade Date: Wed, 12 Oct 2016 11:49:44 -0400 Subject: Uncomment accidentally commented line --- src/core/lib/iomgr/udp_server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/udp_server.c b/src/core/lib/iomgr/udp_server.c index e84a13b338..6216715a79 100644 --- a/src/core/lib/iomgr/udp_server.c +++ b/src/core/lib/iomgr/udp_server.c @@ -170,7 +170,7 @@ static void deactivated_all_ports(grpc_exec_ctx *exec_ctx, grpc_udp_server *s) { if (s->head) { grpc_udp_listener *sp; for (sp = s->head; sp; sp = sp->next) { - // grpc_unlink_if_unix_domain_socket(&sp->addr.sockaddr); + grpc_unlink_if_unix_domain_socket(&sp->addr.sockaddr); sp->destroyed_closure.cb = destroyed_port; sp->destroyed_closure.cb_arg = s; -- cgit v1.2.3 From cbd1b9758779110ecf8057611f652fbf4d519101 Mon Sep 17 00:00:00 2001 From: Robbie Shade Date: Wed, 12 Oct 2016 11:54:10 -0400 Subject: Add needed include --- src/core/lib/iomgr/udp_server.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/udp_server.c b/src/core/lib/iomgr/udp_server.c index 6216715a79..9c842db04b 100644 --- a/src/core/lib/iomgr/udp_server.c +++ b/src/core/lib/iomgr/udp_server.c @@ -64,6 +64,7 @@ #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/sockaddr_utils.h" #include "src/core/lib/iomgr/socket_utils_posix.h" +#include "src/core/lib/iomgr/unix_sockets_posix.h" #include "src/core/lib/support/string.h" /* one listening port */ -- cgit v1.2.3 From 22d50e98d8dbff93a7221cd705130b1192c34ffa Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 12 Oct 2016 09:54:49 -0700 Subject: Fix sanity and move a header include --- src/core/lib/iomgr/resolve_address.h | 1 - src/core/lib/iomgr/timer_uv.h | 6 +++--- src/core/lib/iomgr/udp_server.c | 6 +++--- src/core/lib/iomgr/udp_server.h | 3 ++- templates/tools/dockerfile/libuv_install.include | 7 +++++++ .../dockerfile/test/cxx_jessie_x64/Dockerfile.template | 5 +++-- test/core/iomgr/resolve_address_test.c | 1 + test/core/iomgr/udp_server_test.c | 18 ++++++++++-------- tools/dockerfile/test/cxx_jessie_x64/Dockerfile | 11 +++-------- 9 files changed, 32 insertions(+), 26 deletions(-) create mode 100644 templates/tools/dockerfile/libuv_install.include (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/resolve_address.h b/src/core/lib/iomgr/resolve_address.h index ddbe375755..275924448a 100644 --- a/src/core/lib/iomgr/resolve_address.h +++ b/src/core/lib/iomgr/resolve_address.h @@ -36,7 +36,6 @@ #include #include "src/core/lib/iomgr/exec_ctx.h" -#include "src/core/lib/iomgr/iomgr.h" #define GRPC_MAX_SOCKADDR_SIZE 128 diff --git a/src/core/lib/iomgr/timer_uv.h b/src/core/lib/iomgr/timer_uv.h index b64291b036..3de383ebd5 100644 --- a/src/core/lib/iomgr/timer_uv.h +++ b/src/core/lib/iomgr/timer_uv.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_LIB_IOMGR_TIMER_GENERIC_H -#define GRPC_CORE_LIB_IOMGR_TIMER_GENERIC_H +#ifndef GRPC_CORE_LIB_IOMGR_TIMER_UV_H +#define GRPC_CORE_LIB_IOMGR_TIMER_UV_H #include "src/core/lib/iomgr/exec_ctx.h" @@ -44,4 +44,4 @@ struct grpc_timer { int triggered; }; -#endif /* GRPC_CORE_LIB_IOMGR_TIMER_GENERIC_H */ +#endif /* GRPC_CORE_LIB_IOMGR_TIMER_UV_H */ diff --git a/src/core/lib/iomgr/udp_server.c b/src/core/lib/iomgr/udp_server.c index 273f607192..0d31b255e9 100644 --- a/src/core/lib/iomgr/udp_server.c +++ b/src/core/lib/iomgr/udp_server.c @@ -357,7 +357,8 @@ int grpc_udp_server_add_port(grpc_udp_server *s, if (grpc_sockaddr_get_port(addr) == 0) { for (i = 0; i < s->nports; i++) { sockname_temp.len = sizeof(struct sockaddr_storage); - if (0 == getsockname(s->ports[i].fd, (struct sockaddr *)sockname_temp.addr, + if (0 == getsockname(s->ports[i].fd, + (struct sockaddr *)sockname_temp.addr, (socklen_t *)&sockname_temp.len)) { port = grpc_sockaddr_get_port(&sockname_temp); if (port > 0) { @@ -383,8 +384,7 @@ int grpc_udp_server_add_port(grpc_udp_server *s, addr = &wild6; // TODO(rjshade): Test and propagate the returned grpc_error*: grpc_create_dualstack_socket(addr, SOCK_DGRAM, IPPROTO_UDP, &dsmode, &fd); - allocated_port1 = - add_socket_to_server(s, fd, addr, read_cb, orphan_cb); + allocated_port1 = add_socket_to_server(s, fd, addr, read_cb, orphan_cb); if (fd >= 0 && dsmode == GRPC_DSMODE_DUALSTACK) { goto done; } diff --git a/src/core/lib/iomgr/udp_server.h b/src/core/lib/iomgr/udp_server.h index e8129be46c..a95086e9ae 100644 --- a/src/core/lib/iomgr/udp_server.h +++ b/src/core/lib/iomgr/udp_server.h @@ -72,7 +72,8 @@ int grpc_udp_server_get_fd(grpc_udp_server *s, unsigned index); /* TODO(ctiller): deprecate this, and make grpc_udp_server_add_ports to handle all of the multiple socket port matching logic in one place */ -int grpc_udp_server_add_port(grpc_udp_server *s, const grpc_resolved_address *addr, +int grpc_udp_server_add_port(grpc_udp_server *s, + const grpc_resolved_address *addr, grpc_udp_server_read_cb read_cb, grpc_udp_server_orphan_cb orphan_cb); diff --git a/templates/tools/dockerfile/libuv_install.include b/templates/tools/dockerfile/libuv_install.include new file mode 100644 index 0000000000..a249c095db --- /dev/null +++ b/templates/tools/dockerfile/libuv_install.include @@ -0,0 +1,7 @@ +#================ +# libuv +RUN cd /tmp \ + && wget http://dist.libuv.org/dist/v1.9.1/libuv-v1.9.1.tar.gz \ + && tar -xf libuv-v1.9.1.tar.gz \ + && cd libuv-v1.9.1 \ + && sh autogen.sh && ./configure --prefix=/usr && make && make install \ No newline at end of file diff --git a/templates/tools/dockerfile/test/cxx_jessie_x64/Dockerfile.template b/templates/tools/dockerfile/test/cxx_jessie_x64/Dockerfile.template index 04767248b8..211baff2d1 100644 --- a/templates/tools/dockerfile/test/cxx_jessie_x64/Dockerfile.template +++ b/templates/tools/dockerfile/test/cxx_jessie_x64/Dockerfile.template @@ -28,13 +28,14 @@ # 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. - + FROM debian:jessie - + <%include file="../../apt_get_basic.include"/> <%include file="../../python_deps.include"/> <%include file="../../cxx_deps.include"/> <%include file="../../clang_update.include"/> <%include file="../../run_tests_addons.include"/> + <%include file="../../libuv_install.include"/> # Define the default command. CMD ["bash"] diff --git a/test/core/iomgr/resolve_address_test.c b/test/core/iomgr/resolve_address_test.c index 4417d96043..2dd0d88b3f 100644 --- a/test/core/iomgr/resolve_address_test.c +++ b/test/core/iomgr/resolve_address_test.c @@ -36,6 +36,7 @@ #include #include #include "src/core/lib/iomgr/executor.h" +#include "src/core/lib/iomgr/iomgr.h" #include "test/core/util/test_config.h" static gpr_timespec test_deadline(void) { diff --git a/test/core/iomgr/udp_server_test.c b/test/core/iomgr/udp_server_test.c index ac92f53f51..026584bf53 100644 --- a/test/core/iomgr/udp_server_test.c +++ b/test/core/iomgr/udp_server_test.c @@ -111,8 +111,8 @@ static void test_no_op_with_port(void) { memset(&resolved_addr, 0, sizeof(resolved_addr)); resolved_addr.len = sizeof(struct sockaddr_in); addr->sin_family = AF_INET; - GPR_ASSERT(grpc_udp_server_add_port(s, &resolved_addr, - on_read, on_fd_orphaned)); + GPR_ASSERT( + grpc_udp_server_add_port(s, &resolved_addr, on_read, on_fd_orphaned)); grpc_udp_server_destroy(&exec_ctx, s, NULL); grpc_exec_ctx_finish(&exec_ctx); @@ -132,8 +132,8 @@ static void test_no_op_with_port_and_start(void) { memset(&resolved_addr, 0, sizeof(resolved_addr)); resolved_addr.len = sizeof(struct sockaddr_in); addr->sin_family = AF_INET; - GPR_ASSERT(grpc_udp_server_add_port(s, &resolved_addr, - on_read, on_fd_orphaned)); + GPR_ASSERT( + grpc_udp_server_add_port(s, &resolved_addr, on_read, on_fd_orphaned)); grpc_udp_server_start(&exec_ctx, s, NULL, 0, NULL); @@ -163,12 +163,13 @@ static void test_receive(int number_of_clients) { memset(&resolved_addr, 0, sizeof(resolved_addr)); resolved_addr.len = sizeof(struct sockaddr_storage); addr->ss_family = AF_INET; - GPR_ASSERT(grpc_udp_server_add_port(s, &resolved_addr, - on_read, on_fd_orphaned)); + GPR_ASSERT( + grpc_udp_server_add_port(s, &resolved_addr, on_read, on_fd_orphaned)); svrfd = grpc_udp_server_get_fd(s, 0); GPR_ASSERT(svrfd >= 0); - GPR_ASSERT(getsockname(svrfd, (struct sockaddr *)addr, (socklen_t *)&resolved_addr.len) == 0); + GPR_ASSERT(getsockname(svrfd, (struct sockaddr *)addr, + (socklen_t *)&resolved_addr.len) == 0); GPR_ASSERT(resolved_addr.len <= sizeof(struct sockaddr_storage)); pollsets[0] = g_pollset; @@ -183,7 +184,8 @@ static void test_receive(int number_of_clients) { /* Create a socket, send a packet to the UDP server. */ clifd = socket(addr->ss_family, SOCK_DGRAM, 0); GPR_ASSERT(clifd >= 0); - GPR_ASSERT(connect(clifd, (struct sockaddr *)&addr, (socklen_t)resolved_addr.len) == 0); + GPR_ASSERT(connect(clifd, (struct sockaddr *)&addr, + (socklen_t)resolved_addr.len) == 0); GPR_ASSERT(5 == write(clifd, "hello", 5)); while (g_number_of_reads == number_of_reads_before && gpr_time_cmp(deadline, gpr_now(deadline.clock_type)) > 0) { diff --git a/tools/dockerfile/test/cxx_jessie_x64/Dockerfile b/tools/dockerfile/test/cxx_jessie_x64/Dockerfile index b9216571ef..1f6641ac42 100644 --- a/tools/dockerfile/test/cxx_jessie_x64/Dockerfile +++ b/tools/dockerfile/test/cxx_jessie_x64/Dockerfile @@ -115,14 +115,6 @@ RUN cd llvm-build && cmake \ ../llvm RUN make -C llvm-build -j 12 && make -C llvm-build install && rm -rf llvm-build -#================ -# libuv -RUN cd /tmp \ - && wget http://dist.libuv.org/dist/v1.9.1/libuv-v1.9.1.tar.gz \ - && tar -xf libuv-v1.9.1.tar.gz \ - && cd libuv-v1.9.1 \ - && sh autogen.sh && ./configure --prefix=/usr && make && make install - # Prepare ccache RUN ln -s /usr/bin/ccache /usr/local/bin/gcc RUN ln -s /usr/bin/ccache /usr/local/bin/g++ @@ -134,5 +126,8 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ RUN mkdir /var/local/jenkins +#================ +# libuv +RUN cd /tmp && wget http://dist.libuv.org/dist/v1.9.1/libuv-v1.9.1.tar.gz && tar -xf libuv-v1.9.1.tar.gz && cd libuv-v1.9.1 && sh autogen.sh && ./configure --prefix=/usr && make && make install # Define the default command. CMD ["bash"] -- cgit v1.2.3 From 624997a24da31a7f4955701b37b9612a440b1296 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 12 Oct 2016 11:35:09 -0700 Subject: Code review changes. --- src/core/lib/transport/hashtable.c | 3 +-- src/core/lib/transport/hashtable.h | 7 +++---- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/transport/hashtable.c b/src/core/lib/transport/hashtable.c index d127f17a37..a1bae147cc 100644 --- a/src/core/lib/transport/hashtable.c +++ b/src/core/lib/transport/hashtable.c @@ -64,8 +64,7 @@ static void grpc_hash_table_add(grpc_hash_table* table, grpc_mdstr* key, GPR_ASSERT(value != NULL); const size_t idx = grpc_hash_table_find_index(table, key, true /* find_empty */); - // This can happen if the table is full. - GPR_ASSERT(idx != table->num_entries); + GPR_ASSERT(idx != table->num_entries); // Table should never be full. grpc_hash_table_entry* entry = &table->entries[idx]; entry->key = GRPC_MDSTR_REF(key); entry->value = vtable->copy_value(value); diff --git a/src/core/lib/transport/hashtable.h b/src/core/lib/transport/hashtable.h index 0ce51383c7..d5f40a2cf7 100644 --- a/src/core/lib/transport/hashtable.h +++ b/src/core/lib/transport/hashtable.h @@ -39,10 +39,8 @@ * This implementation uses open addressing * (https://en.wikipedia.org/wiki/Open_addressing) with quadratic * probing (https://en.wikipedia.org/wiki/Quadratic_probing). - * This means that the hash table is of fixed size and cannot contain - * more than that number of elements. * - * The keys are grpc_mdstr objects. The values are arbitrary pointers + * The keys are \a grpc_mdstr objects. The values are arbitrary pointers * with a common vtable. * * Hash tables are intentionally immutable, to avoid the need for locking. @@ -76,7 +74,8 @@ int grpc_hash_table_unref(grpc_hash_table* table); Returns NULL if \a key is not found. */ void* grpc_hash_table_get(const grpc_hash_table* table, const grpc_mdstr* key); -/** Compares two hash tables. */ +/** Compares two hash tables. + The sort order is stable but undefined. */ int grpc_hash_table_cmp(const grpc_hash_table* table1, const grpc_hash_table* table2); -- cgit v1.2.3 From 55f25b6c27b42b81ccb9bd9c7adf9a87cadd6da0 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 12 Oct 2016 14:55:20 -0700 Subject: clang-format --- src/core/ext/client_config/client_channel.c | 5 ++--- src/core/lib/transport/hashtable.c | 5 +++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/client_config/client_channel.c b/src/core/ext/client_config/client_channel.c index de0d42f474..fb3e17a7d9 100644 --- a/src/core/ext/client_config/client_channel.c +++ b/src/core/ext/client_config/client_channel.c @@ -680,9 +680,8 @@ static bool pick_subchannel(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, const grpc_lb_policy_pick_args inputs = { calld->pollent, initial_metadata, initial_metadata_flags, &calld->lb_token_mdelem, gpr_inf_future(GPR_CLOCK_MONOTONIC)}; - const bool result = - grpc_lb_policy_pick(exec_ctx, lb_policy, &inputs, - connected_subchannel, NULL, on_ready); + const bool result = grpc_lb_policy_pick( + exec_ctx, lb_policy, &inputs, connected_subchannel, NULL, on_ready); GRPC_LB_POLICY_UNREF(exec_ctx, lb_policy, "pick_subchannel"); GPR_TIMER_END("pick_subchannel", 0); return result; diff --git a/src/core/lib/transport/hashtable.c b/src/core/lib/transport/hashtable.c index a1bae147cc..a016daa0ec 100644 --- a/src/core/lib/transport/hashtable.c +++ b/src/core/lib/transport/hashtable.c @@ -47,8 +47,9 @@ struct grpc_hash_table { // Helper function for insert and get operations that performs quadratic // probing (https://en.wikipedia.org/wiki/Quadratic_probing). -static size_t grpc_hash_table_find_index( - const grpc_hash_table* table, const grpc_mdstr* key, bool find_empty) { +static size_t grpc_hash_table_find_index(const grpc_hash_table* table, + const grpc_mdstr* key, + bool find_empty) { for (size_t i = 0; i < table->num_entries; ++i) { const size_t idx = (key->hash + i * i) % table->num_entries; if (table->entries[idx].key == NULL) -- cgit v1.2.3 From a460192d926d9d4adf76ef35d8ef1521623e2123 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 12 Oct 2016 13:19:40 -0700 Subject: Minor fixes to sockaddr changes --- src/core/lib/iomgr/socket_utils_posix.c | 2 +- test/core/iomgr/tcp_client_posix_test.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/socket_utils_posix.c b/src/core/lib/iomgr/socket_utils_posix.c index 9e95c276da..9dea0c0cd8 100644 --- a/src/core/lib/iomgr/socket_utils_posix.c +++ b/src/core/lib/iomgr/socket_utils_posix.c @@ -50,7 +50,7 @@ int grpc_accept4(int sockfd, grpc_resolved_address *resolved_addr, int nonblock, GPR_ASSERT(sizeof(socklen_t) <= sizeof(size_t)); GPR_ASSERT(resolved_addr->len <= (socklen_t)-1); fd = accept(sockfd, (struct sockaddr *)resolved_addr->addr, - (socklen_t)resolved_addr->len); + (socklen_t *)&resolved_addr->len); if (fd >= 0) { if (nonblock) { flags = fcntl(fd, F_GETFL, 0); diff --git a/test/core/iomgr/tcp_client_posix_test.c b/test/core/iomgr/tcp_client_posix_test.c index b544f5b21b..6c6962ed7a 100644 --- a/test/core/iomgr/tcp_client_posix_test.c +++ b/test/core/iomgr/tcp_client_posix_test.c @@ -120,7 +120,8 @@ void test_succeeds(void) { /* await the connection */ do { resolved_addr.len = sizeof(addr); - r = accept(svr_fd, addr, (socklen_t *)&resolved_addr.len); + r = accept(svr_fd, (struct sockaddr *)addr, + (socklen_t *)&resolved_addr.len); } while (r == -1 && errno == EINTR); GPR_ASSERT(r >= 0); close(r); -- cgit v1.2.3 From 460502e5ce71cb132e3be4e932b63cfd4e7f2349 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 13 Oct 2016 10:02:08 -0700 Subject: Expand documentation --- src/core/lib/iomgr/ev_epoll_linux.c | 13 +++++++++++++ src/core/lib/iomgr/exec_ctx.h | 10 ++++++++++ 2 files changed, 23 insertions(+) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 98fe2defea..8de42bb7a9 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -165,6 +165,7 @@ static void fd_global_shutdown(void); #endif /* !defined(GPRC_PI_REF_COUNT_DEBUG) */ +/* This is also used as grpc_workqueue (by directly casing it) */ typedef struct polling_island { gpr_mu mu; /* Ref count. Use PI_ADD_REF() and PI_UNREF() macros to increment/decrement @@ -184,10 +185,16 @@ typedef struct polling_island { * (except mu and ref_count) are invalid and must be ignored. */ gpr_atm merged_to; + /* Number of threads currently polling on this island */ gpr_atm poller_count; + /* Mutex guarding the read end of the workqueue (must be held to pop from + * workqueue_items) */ gpr_mu workqueue_read_mu; + /* Queue of closures to be executed */ gpr_mpscq workqueue_items; + /* Count of items in workqueue_items */ gpr_atm workqueue_item_count; + /* Wakeup fd used to wake pollers to check the contents of workqueue_items */ grpc_wakeup_fd workqueue_wakeup_fd; /* The fd of the underlying epoll set */ @@ -1396,6 +1403,9 @@ static bool maybe_do_workqueue_work(grpc_exec_ctx *exec_ctx, grpc_closure_run(exec_ctx, c, c->error_data.error); return true; } else if (gpr_atm_no_barrier_load(&pi->workqueue_item_count) > 0) { + /* n == NULL might mean there's work but it's not available to be popped + * yet - try to ensure another workqueue wakes up to check shortly if so + */ workqueue_maybe_wakeup(pi); } } @@ -1457,6 +1467,9 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, PI_ADD_REF(pi, "ps_work"); gpr_mu_unlock(&pollset->mu); + /* If we get some workqueue work to do, it might end up completing an item on + the completion queue, so there's no need to poll... so we skip that and + redo the complete loop to verify */ if (!maybe_do_workqueue_work(exec_ctx, pi)) { gpr_atm_no_barrier_fetch_add(&pi->poller_count, 1); g_current_thread_polling_island = pi; diff --git a/src/core/lib/iomgr/exec_ctx.h b/src/core/lib/iomgr/exec_ctx.h index 4744e21c5e..7e50cb9825 100644 --- a/src/core/lib/iomgr/exec_ctx.h +++ b/src/core/lib/iomgr/exec_ctx.h @@ -66,10 +66,20 @@ typedef struct grpc_combiner grpc_combiner; #ifndef GRPC_EXECUTION_CONTEXT_SANITIZER struct grpc_exec_ctx { grpc_closure_list closure_list; + /** The workqueue we're stealing work from. + As items are queued to the execution context, we try to steal one + workqueue item and execute it inline (assuming the exec_ctx is not + finished) - doing so does not invalidate the workqueue's contract, and + provides a small latency win in cases where we get a hit */ grpc_workqueue *stealing_from_workqueue; + /** The workqueue item that was stolen from the workqueue above. When new + items are scheduled to be offloaded to that workqueue, we need to update + this like a 1-deep fifo to maintain the invariant that workqueue items + queued by one thread are started in order */ grpc_closure *stolen_closure; /** currently active combiner: updated only via combiner.c */ grpc_combiner *active_combiner; + /** last active combiner in the active combiner list */ grpc_combiner *last_combiner; bool cached_ready_to_finish; void *check_ready_to_finish_arg; -- cgit v1.2.3 From 82e4ec741ba3e564d1223f0f20355a6e27e70136 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Thu, 13 Oct 2016 12:26:01 -0700 Subject: Moved cv polling into ev_poll_posix.c --- BUILD | 8 - CMakeLists.txt | 3 - Makefile | 4 - binding.gyp | 1 - build.yaml | 2 - config.m4 | 1 - gRPC-Core.podspec | 3 - grpc.gemspec | 2 - package.xml | 2 - src/core/lib/iomgr/ev_poll_cv_posix.c | 288 --------------------- src/core/lib/iomgr/ev_poll_cv_posix.h | 68 ----- src/core/lib/iomgr/ev_poll_posix.c | 237 ++++++++++++++++- src/core/lib/iomgr/ev_poll_posix.h | 1 + src/core/lib/iomgr/ev_posix.c | 1 - src/core/lib/iomgr/wakeup_fd_cv.c | 4 +- src/core/lib/iomgr/wakeup_fd_cv.h | 29 ++- src/core/lib/iomgr/wakeup_fd_posix.c | 26 +- src/core/lib/iomgr/wakeup_fd_posix.h | 2 +- src/python/grpcio/grpc_core_dependencies.py | 1 - tools/doxygen/Doxyfile.core.internal | 2 - tools/run_tests/sources_and_headers.json | 3 - vsprojects/vcxproj/grpc/grpc.vcxproj | 3 - vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 6 - .../vcxproj/grpc_test_util/grpc_test_util.vcxproj | 3 - .../grpc_test_util/grpc_test_util.vcxproj.filters | 6 - .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 3 - .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 6 - 27 files changed, 280 insertions(+), 435 deletions(-) delete mode 100644 src/core/lib/iomgr/ev_poll_cv_posix.c delete mode 100644 src/core/lib/iomgr/ev_poll_cv_posix.h (limited to 'src/core/lib') diff --git a/BUILD b/BUILD index ba44367dbb..72cb046a60 100644 --- a/BUILD +++ b/BUILD @@ -186,7 +186,6 @@ cc_library( "src/core/lib/iomgr/error.h", "src/core/lib/iomgr/ev_epoll_linux.h", "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", - "src/core/lib/iomgr/ev_poll_cv_posix.h", "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/exec_ctx.h", @@ -349,7 +348,6 @@ cc_library( "src/core/lib/iomgr/error.c", "src/core/lib/iomgr/ev_epoll_linux.c", "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", - "src/core/lib/iomgr/ev_poll_cv_posix.c", "src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/exec_ctx.c", @@ -591,7 +589,6 @@ cc_library( "src/core/lib/iomgr/error.h", "src/core/lib/iomgr/ev_epoll_linux.h", "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", - "src/core/lib/iomgr/ev_poll_cv_posix.h", "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/exec_ctx.h", @@ -739,7 +736,6 @@ cc_library( "src/core/lib/iomgr/error.c", "src/core/lib/iomgr/ev_epoll_linux.c", "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", - "src/core/lib/iomgr/ev_poll_cv_posix.c", "src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/exec_ctx.c", @@ -951,7 +947,6 @@ cc_library( "src/core/lib/iomgr/error.h", "src/core/lib/iomgr/ev_epoll_linux.h", "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", - "src/core/lib/iomgr/ev_poll_cv_posix.h", "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/exec_ctx.h", @@ -1091,7 +1086,6 @@ cc_library( "src/core/lib/iomgr/error.c", "src/core/lib/iomgr/ev_epoll_linux.c", "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", - "src/core/lib/iomgr/ev_poll_cv_posix.c", "src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/exec_ctx.c", @@ -1856,7 +1850,6 @@ objc_library( "src/core/lib/iomgr/error.c", "src/core/lib/iomgr/ev_epoll_linux.c", "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", - "src/core/lib/iomgr/ev_poll_cv_posix.c", "src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/exec_ctx.c", @@ -2077,7 +2070,6 @@ objc_library( "src/core/lib/iomgr/error.h", "src/core/lib/iomgr/ev_epoll_linux.h", "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", - "src/core/lib/iomgr/ev_poll_cv_posix.h", "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/exec_ctx.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 747d1fab4d..9ba5135593 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -314,7 +314,6 @@ add_library(grpc src/core/lib/iomgr/error.c src/core/lib/iomgr/ev_epoll_linux.c src/core/lib/iomgr/ev_poll_and_epoll_posix.c - src/core/lib/iomgr/ev_poll_cv_posix.c src/core/lib/iomgr/ev_poll_posix.c src/core/lib/iomgr/ev_posix.c src/core/lib/iomgr/exec_ctx.c @@ -575,7 +574,6 @@ add_library(grpc_cronet src/core/lib/iomgr/error.c src/core/lib/iomgr/ev_epoll_linux.c src/core/lib/iomgr/ev_poll_and_epoll_posix.c - src/core/lib/iomgr/ev_poll_cv_posix.c src/core/lib/iomgr/ev_poll_posix.c src/core/lib/iomgr/ev_posix.c src/core/lib/iomgr/exec_ctx.c @@ -808,7 +806,6 @@ add_library(grpc_unsecure src/core/lib/iomgr/error.c src/core/lib/iomgr/ev_epoll_linux.c src/core/lib/iomgr/ev_poll_and_epoll_posix.c - src/core/lib/iomgr/ev_poll_cv_posix.c src/core/lib/iomgr/ev_poll_posix.c src/core/lib/iomgr/ev_posix.c src/core/lib/iomgr/exec_ctx.c diff --git a/Makefile b/Makefile index 1f4c9b5c32..65d715c67c 100644 --- a/Makefile +++ b/Makefile @@ -2562,7 +2562,6 @@ LIBGRPC_SRC = \ src/core/lib/iomgr/error.c \ src/core/lib/iomgr/ev_epoll_linux.c \ src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ - src/core/lib/iomgr/ev_poll_cv_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ @@ -2841,7 +2840,6 @@ LIBGRPC_CRONET_SRC = \ src/core/lib/iomgr/error.c \ src/core/lib/iomgr/ev_epoll_linux.c \ src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ - src/core/lib/iomgr/ev_poll_cv_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ @@ -3110,7 +3108,6 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/lib/iomgr/error.c \ src/core/lib/iomgr/ev_epoll_linux.c \ src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ - src/core/lib/iomgr/ev_poll_cv_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ @@ -3306,7 +3303,6 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/iomgr/error.c \ src/core/lib/iomgr/ev_epoll_linux.c \ src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ - src/core/lib/iomgr/ev_poll_cv_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ diff --git a/binding.gyp b/binding.gyp index 85070e5cac..6dfae41860 100644 --- a/binding.gyp +++ b/binding.gyp @@ -589,7 +589,6 @@ 'src/core/lib/iomgr/error.c', 'src/core/lib/iomgr/ev_epoll_linux.c', 'src/core/lib/iomgr/ev_poll_and_epoll_posix.c', - 'src/core/lib/iomgr/ev_poll_cv_posix.c', 'src/core/lib/iomgr/ev_poll_posix.c', 'src/core/lib/iomgr/ev_posix.c', 'src/core/lib/iomgr/exec_ctx.c', diff --git a/build.yaml b/build.yaml index 3e64ce8f37..93ebf44ef8 100644 --- a/build.yaml +++ b/build.yaml @@ -190,7 +190,6 @@ filegroups: - src/core/lib/iomgr/error.h - src/core/lib/iomgr/ev_epoll_linux.h - src/core/lib/iomgr/ev_poll_and_epoll_posix.h - - src/core/lib/iomgr/ev_poll_cv_posix.h - src/core/lib/iomgr/ev_poll_posix.h - src/core/lib/iomgr/ev_posix.h - src/core/lib/iomgr/exec_ctx.h @@ -276,7 +275,6 @@ filegroups: - src/core/lib/iomgr/error.c - src/core/lib/iomgr/ev_epoll_linux.c - src/core/lib/iomgr/ev_poll_and_epoll_posix.c - - src/core/lib/iomgr/ev_poll_cv_posix.c - src/core/lib/iomgr/ev_poll_posix.c - src/core/lib/iomgr/ev_posix.c - src/core/lib/iomgr/exec_ctx.c diff --git a/config.m4 b/config.m4 index 1452798897..347686bd11 100644 --- a/config.m4 +++ b/config.m4 @@ -108,7 +108,6 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/iomgr/error.c \ src/core/lib/iomgr/ev_epoll_linux.c \ src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ - src/core/lib/iomgr/ev_poll_cv_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 3ac0b841cf..6becf4c608 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -273,7 +273,6 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/error.h', 'src/core/lib/iomgr/ev_epoll_linux.h', 'src/core/lib/iomgr/ev_poll_and_epoll_posix.h', - 'src/core/lib/iomgr/ev_poll_cv_posix.h', 'src/core/lib/iomgr/ev_poll_posix.h', 'src/core/lib/iomgr/ev_posix.h', 'src/core/lib/iomgr/exec_ctx.h', @@ -440,7 +439,6 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/error.c', 'src/core/lib/iomgr/ev_epoll_linux.c', 'src/core/lib/iomgr/ev_poll_and_epoll_posix.c', - 'src/core/lib/iomgr/ev_poll_cv_posix.c', 'src/core/lib/iomgr/ev_poll_posix.c', 'src/core/lib/iomgr/ev_posix.c', 'src/core/lib/iomgr/exec_ctx.c', @@ -650,7 +648,6 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/error.h', 'src/core/lib/iomgr/ev_epoll_linux.h', 'src/core/lib/iomgr/ev_poll_and_epoll_posix.h', - 'src/core/lib/iomgr/ev_poll_cv_posix.h', 'src/core/lib/iomgr/ev_poll_posix.h', 'src/core/lib/iomgr/ev_posix.h', 'src/core/lib/iomgr/exec_ctx.h', diff --git a/grpc.gemspec b/grpc.gemspec index 85135a5327..6a898b85ff 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -193,7 +193,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/error.h ) s.files += %w( src/core/lib/iomgr/ev_epoll_linux.h ) s.files += %w( src/core/lib/iomgr/ev_poll_and_epoll_posix.h ) - s.files += %w( src/core/lib/iomgr/ev_poll_cv_posix.h ) s.files += %w( src/core/lib/iomgr/ev_poll_posix.h ) s.files += %w( src/core/lib/iomgr/ev_posix.h ) s.files += %w( src/core/lib/iomgr/exec_ctx.h ) @@ -360,7 +359,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/error.c ) s.files += %w( src/core/lib/iomgr/ev_epoll_linux.c ) s.files += %w( src/core/lib/iomgr/ev_poll_and_epoll_posix.c ) - s.files += %w( src/core/lib/iomgr/ev_poll_cv_posix.c ) s.files += %w( src/core/lib/iomgr/ev_poll_posix.c ) s.files += %w( src/core/lib/iomgr/ev_posix.c ) s.files += %w( src/core/lib/iomgr/exec_ctx.c ) diff --git a/package.xml b/package.xml index 4631fc1c39..1f9846a516 100644 --- a/package.xml +++ b/package.xml @@ -200,7 +200,6 @@ - @@ -367,7 +366,6 @@ - diff --git a/src/core/lib/iomgr/ev_poll_cv_posix.c b/src/core/lib/iomgr/ev_poll_cv_posix.c deleted file mode 100644 index ed4c9e9143..0000000000 --- a/src/core/lib/iomgr/ev_poll_cv_posix.c +++ /dev/null @@ -1,288 +0,0 @@ -/* - * - * Copyright 2016, 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. - * - */ - -#include - -#ifdef GPR_POSIX_SOCKET - -#include "src/core/lib/iomgr/ev_poll_cv_posix.h" - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "src/core/lib/iomgr/ev_poll_posix.h" -#include "src/core/lib/iomgr/wakeup_fd_posix.h" - -#define POLL_PERIOD_MS 1000 -#define DEFAULT_TABLE_SIZE 16 - -typedef enum status_t { INPROGRESS, COMPLETED, CANCELLED } status_t; - -typedef struct poll_args { - gpr_refcount refcount; - gpr_cv* cv; - struct pollfd* fds; - nfds_t nfds; - int timeout; - int retval; - int err; - status_t status; -} poll_args; - -cv_fd_table g_cvfds; - -static void decref_poll_args(poll_args* args) { - if (gpr_unref(&args->refcount)) { - gpr_free(args->fds); - gpr_cv_destroy(args->cv); - gpr_free(args->cv); - gpr_free(args); - } -} - -// Poll in a background thread -static void run_poll(void* arg) { - int timeout, retval; - poll_args* pargs = (poll_args*)arg; - while (pargs->status == INPROGRESS) { - if (pargs->timeout < 0) { - timeout = POLL_PERIOD_MS; - } else { - timeout = GPR_MIN(POLL_PERIOD_MS, pargs->timeout); - pargs->timeout -= timeout; - } - retval = g_cvfds.poll(pargs->fds, pargs->nfds, timeout); - if (retval != 0 || pargs->timeout == 0) { - pargs->retval = retval; - pargs->err = errno; - break; - } - } - gpr_mu_lock(&g_cvfds.mu); - if (pargs->status == INPROGRESS) { - // Signal main thread that the poll completed - pargs->status = COMPLETED; - gpr_cv_signal(pargs->cv); - } - decref_poll_args(pargs); - g_cvfds.pollcount--; - if (g_cvfds.shutdown && g_cvfds.pollcount == 0) { - gpr_cv_signal(&g_cvfds.shutdown_complete); - } - gpr_mu_unlock(&g_cvfds.mu); -} - -// This function overrides poll() to handle condition variable wakeup fds -static int cvfd_poll(struct pollfd* fds, nfds_t nfds, int timeout) { - unsigned int i; - int res, idx; - gpr_cv* pollcv; - cv_node *cvn, *prev; - nfds_t nsockfds = 0; - gpr_thd_id t_id; - gpr_thd_options opt; - poll_args* pargs = NULL; - gpr_mu_lock(&g_cvfds.mu); - pollcv = gpr_malloc(sizeof(gpr_cv)); - gpr_cv_init(pollcv); - for (i = 0; i < nfds; i++) { - fds[i].revents = 0; - if (fds[i].fd < 0 && (fds[i].events & POLLIN)) { - idx = FD_TO_IDX(fds[i].fd); - cvn = gpr_malloc(sizeof(cv_node)); - cvn->cv = pollcv; - cvn->next = g_cvfds.cvfds[idx].cvs; - g_cvfds.cvfds[idx].cvs = cvn; - // We should return immediately if there are pending events, - // but we still need to call poll() to check for socket events - if (g_cvfds.cvfds[idx].is_set) { - timeout = 0; - } - } else if (fds[i].fd >= 0) { - nsockfds++; - } - } - - if (nsockfds > 0) { - pargs = gpr_malloc(sizeof(struct poll_args)); - // Both the main thread and calling thread get a reference - gpr_ref_init(&pargs->refcount, 2); - pargs->cv = pollcv; - pargs->fds = gpr_malloc(sizeof(struct pollfd) * nsockfds); - pargs->nfds = nsockfds; - pargs->timeout = timeout; - pargs->retval = 0; - pargs->err = 0; - pargs->status = INPROGRESS; - idx = 0; - for (i = 0; i < nfds; i++) { - if (fds[i].fd >= 0) { - pargs->fds[idx].fd = fds[i].fd; - pargs->fds[idx].events = fds[i].events; - pargs->fds[idx].revents = 0; - idx++; - } - } - g_cvfds.pollcount++; - opt = gpr_thd_options_default(); - gpr_thd_options_set_detached(&opt); - gpr_thd_new(&t_id, &run_poll, pargs, &opt); - // We want the poll() thread to trigger the deadline, so wait forever here - gpr_cv_wait(pollcv, &g_cvfds.mu, gpr_inf_future(GPR_CLOCK_MONOTONIC)); - if (pargs->status == COMPLETED) { - res = pargs->retval; - errno = pargs->err; - } else { - res = 0; - errno = 0; - pargs->status = CANCELLED; - } - } else { - gpr_timespec deadline = gpr_now(GPR_CLOCK_REALTIME); - deadline = - gpr_time_add(deadline, gpr_time_from_millis(timeout, GPR_TIMESPAN)); - gpr_cv_wait(pollcv, &g_cvfds.mu, deadline); - res = 0; - } - - idx = 0; - for (i = 0; i < nfds; i++) { - if (fds[i].fd < 0 && (fds[i].events & POLLIN)) { - cvn = g_cvfds.cvfds[FD_TO_IDX(fds[i].fd)].cvs; - prev = NULL; - while (cvn->cv != pollcv) { - prev = cvn; - cvn = cvn->next; - GPR_ASSERT(cvn); - } - if (!prev) { - g_cvfds.cvfds[FD_TO_IDX(fds[i].fd)].cvs = cvn->next; - } else { - prev->next = cvn->next; - } - gpr_free(cvn); - - if (g_cvfds.cvfds[FD_TO_IDX(fds[i].fd)].is_set) { - fds[i].revents = POLLIN; - if (res >= 0) res++; - } - } else if (fds[i].fd >= 0 && pargs->status == COMPLETED) { - fds[i].revents = pargs->fds[idx].revents; - idx++; - } - } - - if (pargs) { - decref_poll_args(pargs); - } else { - gpr_cv_destroy(pollcv); - gpr_free(pollcv); - } - gpr_mu_unlock(&g_cvfds.mu); - - return res; -} - -static void grpc_global_cv_fd_table_init() { - gpr_mu_init(&g_cvfds.mu); - gpr_mu_lock(&g_cvfds.mu); - gpr_cv_init(&g_cvfds.shutdown_complete); - g_cvfds.shutdown = 0; - g_cvfds.pollcount = 0; - g_cvfds.size = DEFAULT_TABLE_SIZE; - g_cvfds.cvfds = gpr_malloc(sizeof(fd_node) * DEFAULT_TABLE_SIZE); - g_cvfds.free_fds = NULL; - for (int i = 0; i < DEFAULT_TABLE_SIZE; i++) { - g_cvfds.cvfds[i].is_set = 0; - g_cvfds.cvfds[i].cvs = NULL; - g_cvfds.cvfds[i].next_free = g_cvfds.free_fds; - g_cvfds.free_fds = &g_cvfds.cvfds[i]; - } - // Override the poll function with one that supports cvfds - g_cvfds.poll = grpc_poll_function; - grpc_poll_function = &cvfd_poll; - gpr_mu_unlock(&g_cvfds.mu); -} - -static void grpc_global_cv_fd_table_shutdown() { - gpr_mu_lock(&g_cvfds.mu); - g_cvfds.shutdown = 1; - // Attempt to wait for all abandoned poll() threads to terminate - // Not doing so will result in reported memory leaks - if (g_cvfds.pollcount > 0) { - int res = gpr_cv_wait(&g_cvfds.shutdown_complete, &g_cvfds.mu, - gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), - gpr_time_from_seconds(3, GPR_TIMESPAN))); - GPR_ASSERT(res == 0); - } - gpr_cv_destroy(&g_cvfds.shutdown_complete); - grpc_poll_function = g_cvfds.poll; - gpr_free(g_cvfds.cvfds); - gpr_mu_unlock(&g_cvfds.mu); - gpr_mu_destroy(&g_cvfds.mu); -} - -/******************************************************************************* - * event engine binding - */ - -static const grpc_event_engine_vtable* ev_poll_vtable; -static grpc_event_engine_vtable vtable; - -static void shutdown_engine(void) { - ev_poll_vtable->shutdown_engine(); - grpc_global_cv_fd_table_shutdown(); -} - -const grpc_event_engine_vtable* grpc_init_poll_cv_posix(void) { - grpc_global_cv_fd_table_init(); - grpc_enable_cv_wakeup_fds(1); - ev_poll_vtable = grpc_init_poll_posix(); - if (!ev_poll_vtable) { - grpc_global_cv_fd_table_shutdown(); - grpc_enable_cv_wakeup_fds(0); - return NULL; - } - vtable = *ev_poll_vtable; - vtable.shutdown_engine = shutdown_engine; - return &vtable; -} - -#endif /* GPR_POSIX_SOCKET */ diff --git a/src/core/lib/iomgr/ev_poll_cv_posix.h b/src/core/lib/iomgr/ev_poll_cv_posix.h deleted file mode 100644 index 885711d1c5..0000000000 --- a/src/core/lib/iomgr/ev_poll_cv_posix.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * - * Copyright 2016, 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. - * - */ - -#ifndef GRPC_CORE_LIB_IOMGR_EV_POLL_CV_POSIX_H -#define GRPC_CORE_LIB_IOMGR_EV_POLL_CV_POSIX_H - -#include - -#include "src/core/lib/iomgr/ev_posix.h" - -#define FD_TO_IDX(fd) (-(fd)-1) -#define IDX_TO_FD(idx) (-(idx)-1) - -typedef struct cv_node { - gpr_cv* cv; - struct cv_node* next; -} cv_node; - -typedef struct fd_node { - int is_set; - cv_node* cvs; - struct fd_node* next_free; -} fd_node; - -typedef struct cv_fd_table { - gpr_mu mu; - int pollcount; - int shutdown; - gpr_cv shutdown_complete; - fd_node* cvfds; - fd_node* free_fds; - unsigned int size; - grpc_poll_function_type poll; -} cv_fd_table; - -const grpc_event_engine_vtable* grpc_init_poll_cv_posix(void); - -#endif /* GRPC_CORE_LIB_IOMGR_EV_POLL_CV_POSIX_H */ diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.c index 0dca51bc78..d9e5255ddc 100644 --- a/src/core/lib/iomgr/ev_poll_posix.c +++ b/src/core/lib/iomgr/ev_poll_posix.c @@ -47,10 +47,12 @@ #include #include #include +#include #include #include #include "src/core/lib/iomgr/iomgr_internal.h" +#include "src/core/lib/iomgr/wakeup_fd_cv.h" #include "src/core/lib/iomgr/wakeup_fd_posix.h" #include "src/core/lib/profiling/timers.h" #include "src/core/lib/support/block_annotate.h" @@ -245,6 +247,28 @@ struct grpc_pollset_set { grpc_fd **fds; }; +/******************************************************************************* + * condition variable polling definitions + */ + +#define CV_POLL_PERIOD_MS 1000 +#define CV_DEFAULT_TABLE_SIZE 16 + +typedef enum status_t { INPROGRESS, COMPLETED, CANCELLED } status_t; + +typedef struct poll_args { + gpr_refcount refcount; + gpr_cv *cv; + struct pollfd *fds; + nfds_t nfds; + int timeout; + int retval; + int err; + status_t status; +} poll_args; + +cv_fd_table g_cvfds; + /******************************************************************************* * fd_posix.c */ @@ -1235,11 +1259,211 @@ static void pollset_set_del_fd(grpc_exec_ctx *exec_ctx, gpr_mu_unlock(&pollset_set->mu); } +/******************************************************************************* + * Condition Variable polling extensions + */ + +static void decref_poll_args(poll_args *args) { + if (gpr_unref(&args->refcount)) { + gpr_free(args->fds); + gpr_cv_destroy(args->cv); + gpr_free(args->cv); + gpr_free(args); + } +} + +// Poll in a background thread +static void run_poll(void *arg) { + int timeout, retval; + poll_args *pargs = (poll_args *)arg; + while (pargs->status == INPROGRESS) { + if (pargs->timeout < 0) { + timeout = CV_POLL_PERIOD_MS; + } else { + timeout = GPR_MIN(CV_POLL_PERIOD_MS, pargs->timeout); + pargs->timeout -= timeout; + } + retval = g_cvfds.poll(pargs->fds, pargs->nfds, timeout); + if (retval != 0 || pargs->timeout == 0) { + pargs->retval = retval; + pargs->err = errno; + break; + } + } + gpr_mu_lock(&g_cvfds.mu); + if (pargs->status == INPROGRESS) { + // Signal main thread that the poll completed + pargs->status = COMPLETED; + gpr_cv_signal(pargs->cv); + } + decref_poll_args(pargs); + g_cvfds.pollcount--; + if (g_cvfds.shutdown && g_cvfds.pollcount == 0) { + gpr_cv_signal(&g_cvfds.shutdown_complete); + } + gpr_mu_unlock(&g_cvfds.mu); +} + +// This function overrides poll() to handle condition variable wakeup fds +static int cvfd_poll(struct pollfd *fds, nfds_t nfds, int timeout) { + unsigned int i; + int res, idx; + gpr_cv *pollcv; + cv_node *cvn, *prev; + nfds_t nsockfds = 0; + gpr_thd_id t_id; + gpr_thd_options opt; + poll_args *pargs = NULL; + gpr_mu_lock(&g_cvfds.mu); + pollcv = gpr_malloc(sizeof(gpr_cv)); + gpr_cv_init(pollcv); + for (i = 0; i < nfds; i++) { + fds[i].revents = 0; + if (fds[i].fd < 0 && (fds[i].events & POLLIN)) { + idx = FD_TO_IDX(fds[i].fd); + cvn = gpr_malloc(sizeof(cv_node)); + cvn->cv = pollcv; + cvn->next = g_cvfds.cvfds[idx].cvs; + g_cvfds.cvfds[idx].cvs = cvn; + // We should return immediately if there are pending events, + // but we still need to call poll() to check for socket events + if (g_cvfds.cvfds[idx].is_set) { + timeout = 0; + } + } else if (fds[i].fd >= 0) { + nsockfds++; + } + } + + if (nsockfds > 0) { + pargs = gpr_malloc(sizeof(struct poll_args)); + // Both the main thread and calling thread get a reference + gpr_ref_init(&pargs->refcount, 2); + pargs->cv = pollcv; + pargs->fds = gpr_malloc(sizeof(struct pollfd) * nsockfds); + pargs->nfds = nsockfds; + pargs->timeout = timeout; + pargs->retval = 0; + pargs->err = 0; + pargs->status = INPROGRESS; + idx = 0; + for (i = 0; i < nfds; i++) { + if (fds[i].fd >= 0) { + pargs->fds[idx].fd = fds[i].fd; + pargs->fds[idx].events = fds[i].events; + pargs->fds[idx].revents = 0; + idx++; + } + } + g_cvfds.pollcount++; + opt = gpr_thd_options_default(); + gpr_thd_options_set_detached(&opt); + gpr_thd_new(&t_id, &run_poll, pargs, &opt); + // We want the poll() thread to trigger the deadline, so wait forever here + gpr_cv_wait(pollcv, &g_cvfds.mu, gpr_inf_future(GPR_CLOCK_MONOTONIC)); + if (pargs->status == COMPLETED) { + res = pargs->retval; + errno = pargs->err; + } else { + res = 0; + errno = 0; + pargs->status = CANCELLED; + } + } else { + gpr_timespec deadline = gpr_now(GPR_CLOCK_REALTIME); + deadline = + gpr_time_add(deadline, gpr_time_from_millis(timeout, GPR_TIMESPAN)); + gpr_cv_wait(pollcv, &g_cvfds.mu, deadline); + res = 0; + } + + idx = 0; + for (i = 0; i < nfds; i++) { + if (fds[i].fd < 0 && (fds[i].events & POLLIN)) { + cvn = g_cvfds.cvfds[FD_TO_IDX(fds[i].fd)].cvs; + prev = NULL; + while (cvn->cv != pollcv) { + prev = cvn; + cvn = cvn->next; + GPR_ASSERT(cvn); + } + if (!prev) { + g_cvfds.cvfds[FD_TO_IDX(fds[i].fd)].cvs = cvn->next; + } else { + prev->next = cvn->next; + } + gpr_free(cvn); + + if (g_cvfds.cvfds[FD_TO_IDX(fds[i].fd)].is_set) { + fds[i].revents = POLLIN; + if (res >= 0) res++; + } + } else if (fds[i].fd >= 0 && pargs->status == COMPLETED) { + fds[i].revents = pargs->fds[idx].revents; + idx++; + } + } + + if (pargs) { + decref_poll_args(pargs); + } else { + gpr_cv_destroy(pollcv); + gpr_free(pollcv); + } + gpr_mu_unlock(&g_cvfds.mu); + + return res; +} + +static void global_cv_fd_table_init() { + gpr_mu_init(&g_cvfds.mu); + gpr_mu_lock(&g_cvfds.mu); + gpr_cv_init(&g_cvfds.shutdown_complete); + g_cvfds.shutdown = 0; + g_cvfds.pollcount = 0; + g_cvfds.size = CV_DEFAULT_TABLE_SIZE; + g_cvfds.cvfds = gpr_malloc(sizeof(fd_node) * CV_DEFAULT_TABLE_SIZE); + g_cvfds.free_fds = NULL; + for (int i = 0; i < CV_DEFAULT_TABLE_SIZE; i++) { + g_cvfds.cvfds[i].is_set = 0; + g_cvfds.cvfds[i].cvs = NULL; + g_cvfds.cvfds[i].next_free = g_cvfds.free_fds; + g_cvfds.free_fds = &g_cvfds.cvfds[i]; + } + // Override the poll function with one that supports cvfds + g_cvfds.poll = grpc_poll_function; + grpc_poll_function = &cvfd_poll; + gpr_mu_unlock(&g_cvfds.mu); +} + +static void global_cv_fd_table_shutdown() { + gpr_mu_lock(&g_cvfds.mu); + g_cvfds.shutdown = 1; + // Attempt to wait for all abandoned poll() threads to terminate + // Not doing so will result in reported memory leaks + if (g_cvfds.pollcount > 0) { + int res = gpr_cv_wait(&g_cvfds.shutdown_complete, &g_cvfds.mu, + gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), + gpr_time_from_seconds(3, GPR_TIMESPAN))); + GPR_ASSERT(res == 0); + } + gpr_cv_destroy(&g_cvfds.shutdown_complete); + grpc_poll_function = g_cvfds.poll; + gpr_free(g_cvfds.cvfds); + gpr_mu_unlock(&g_cvfds.mu); + gpr_mu_destroy(&g_cvfds.mu); +} + /******************************************************************************* * event engine binding */ -static void shutdown_engine(void) { pollset_global_shutdown(); } +static void shutdown_engine(void) { + pollset_global_shutdown(); + if (grpc_cv_wakeup_fds_enabled()) { + global_cv_fd_table_shutdown(); + } +} static const grpc_event_engine_vtable vtable = { .pollset_size = sizeof(grpc_pollset), @@ -1286,4 +1510,15 @@ const grpc_event_engine_vtable *grpc_init_poll_posix(void) { return &vtable; } +const grpc_event_engine_vtable *grpc_init_poll_cv_posix(void) { + global_cv_fd_table_init(); + grpc_enable_cv_wakeup_fds(1); + if (!GRPC_LOG_IF_ERROR("pollset_global_init", pollset_global_init())) { + global_cv_fd_table_shutdown(); + grpc_enable_cv_wakeup_fds(0); + return NULL; + } + return &vtable; +} + #endif diff --git a/src/core/lib/iomgr/ev_poll_posix.h b/src/core/lib/iomgr/ev_poll_posix.h index 291736a2db..202ffca14c 100644 --- a/src/core/lib/iomgr/ev_poll_posix.h +++ b/src/core/lib/iomgr/ev_poll_posix.h @@ -37,5 +37,6 @@ #include "src/core/lib/iomgr/ev_posix.h" const grpc_event_engine_vtable *grpc_init_poll_posix(void); +const grpc_event_engine_vtable *grpc_init_poll_cv_posix(void); #endif /* GRPC_CORE_LIB_IOMGR_EV_POLL_POSIX_H */ diff --git a/src/core/lib/iomgr/ev_posix.c b/src/core/lib/iomgr/ev_posix.c index 2fc8ccfa91..0637f80421 100644 --- a/src/core/lib/iomgr/ev_posix.c +++ b/src/core/lib/iomgr/ev_posix.c @@ -46,7 +46,6 @@ #include "src/core/lib/iomgr/ev_epoll_linux.h" #include "src/core/lib/iomgr/ev_poll_and_epoll_posix.h" -#include "src/core/lib/iomgr/ev_poll_cv_posix.h" #include "src/core/lib/iomgr/ev_poll_posix.h" #include "src/core/lib/support/env.h" diff --git a/src/core/lib/iomgr/wakeup_fd_cv.c b/src/core/lib/iomgr/wakeup_fd_cv.c index 651e2f663d..b4165208ed 100644 --- a/src/core/lib/iomgr/wakeup_fd_cv.c +++ b/src/core/lib/iomgr/wakeup_fd_cv.c @@ -35,6 +35,8 @@ #ifdef GPR_POSIX_WAKEUP_FD +#include "src/core/lib/iomgr/wakeup_fd_cv.h" + #include #include @@ -45,8 +47,6 @@ #include #include -#include "src/core/lib/iomgr/ev_poll_cv_posix.h" - #define MAX_TABLE_RESIZE 256 extern cv_fd_table g_cvfds; diff --git a/src/core/lib/iomgr/wakeup_fd_cv.h b/src/core/lib/iomgr/wakeup_fd_cv.h index e57fc28363..ac16be1750 100644 --- a/src/core/lib/iomgr/wakeup_fd_cv.h +++ b/src/core/lib/iomgr/wakeup_fd_cv.h @@ -48,8 +48,33 @@ #ifndef GRPC_CORE_LIB_IOMGR_WAKEUP_FD_CV_H #define GRPC_CORE_LIB_IOMGR_WAKEUP_FD_CV_H -#include "src/core/lib/iomgr/wakeup_fd_posix.h" +#include -extern grpc_wakeup_fd_vtable grpc_cv_wakeup_fd_vtable; +#include "src/core/lib/iomgr/ev_posix.h" + +#define FD_TO_IDX(fd) (-(fd)-1) +#define IDX_TO_FD(idx) (-(idx)-1) + +typedef struct cv_node { + gpr_cv* cv; + struct cv_node* next; +} cv_node; + +typedef struct fd_node { + int is_set; + cv_node* cvs; + struct fd_node* next_free; +} fd_node; + +typedef struct cv_fd_table { + gpr_mu mu; + int pollcount; + int shutdown; + gpr_cv shutdown_complete; + fd_node* cvfds; + fd_node* free_fds; + unsigned int size; + grpc_poll_function_type poll; +} cv_fd_table; #endif /* GRPC_CORE_LIB_IOMGR_WAKEUP_FD_CV_H */ diff --git a/src/core/lib/iomgr/wakeup_fd_posix.c b/src/core/lib/iomgr/wakeup_fd_posix.c index f75ae78c22..5c894bef37 100644 --- a/src/core/lib/iomgr/wakeup_fd_posix.c +++ b/src/core/lib/iomgr/wakeup_fd_posix.c @@ -40,12 +40,14 @@ #include "src/core/lib/iomgr/wakeup_fd_pipe.h" #include "src/core/lib/iomgr/wakeup_fd_posix.h" +extern grpc_wakeup_fd_vtable grpc_cv_wakeup_fd_vtable; static const grpc_wakeup_fd_vtable *wakeup_fd_vtable = NULL; int grpc_allow_specialized_wakeup_fd = 1; int grpc_allow_pipe_wakeup_fd = 1; -int grpc_has_real_wakeup_fd = 1; -int grpc_cv_wakeup_fds_enabled = 0; + +int has_real_wakeup_fd = 1; +int cv_wakeup_fds_enabled = 0; void grpc_wakeup_fd_global_init(void) { if (grpc_allow_specialized_wakeup_fd && @@ -55,43 +57,41 @@ void grpc_wakeup_fd_global_init(void) { grpc_pipe_wakeup_fd_vtable.check_availability()) { wakeup_fd_vtable = &grpc_pipe_wakeup_fd_vtable; } else { - grpc_has_real_wakeup_fd = 0; + has_real_wakeup_fd = 0; } } void grpc_wakeup_fd_global_destroy(void) { wakeup_fd_vtable = NULL; } -int grpc_has_wakeup_fd(void) { - return grpc_has_real_wakeup_fd || grpc_cv_wakeup_fds_enabled; -} +int grpc_has_wakeup_fd(void) { return has_real_wakeup_fd; } -void grpc_enable_cv_wakeup_fds(int enable) { - grpc_cv_wakeup_fds_enabled = enable; -} +int grpc_cv_wakeup_fds_enabled(void) { return cv_wakeup_fds_enabled; } + +void grpc_enable_cv_wakeup_fds(int enable) { cv_wakeup_fds_enabled = enable; } grpc_error *grpc_wakeup_fd_init(grpc_wakeup_fd *fd_info) { - if (grpc_cv_wakeup_fds_enabled) { + if (cv_wakeup_fds_enabled) { return grpc_cv_wakeup_fd_vtable.init(fd_info); } return wakeup_fd_vtable->init(fd_info); } grpc_error *grpc_wakeup_fd_consume_wakeup(grpc_wakeup_fd *fd_info) { - if (grpc_cv_wakeup_fds_enabled) { + if (cv_wakeup_fds_enabled) { return grpc_cv_wakeup_fd_vtable.consume(fd_info); } return wakeup_fd_vtable->consume(fd_info); } grpc_error *grpc_wakeup_fd_wakeup(grpc_wakeup_fd *fd_info) { - if (grpc_cv_wakeup_fds_enabled) { + if (cv_wakeup_fds_enabled) { return grpc_cv_wakeup_fd_vtable.wakeup(fd_info); } return wakeup_fd_vtable->wakeup(fd_info); } void grpc_wakeup_fd_destroy(grpc_wakeup_fd *fd_info) { - if (grpc_cv_wakeup_fds_enabled) { + if (cv_wakeup_fds_enabled) { grpc_cv_wakeup_fd_vtable.destroy(fd_info); } else { wakeup_fd_vtable->destroy(fd_info); diff --git a/src/core/lib/iomgr/wakeup_fd_posix.h b/src/core/lib/iomgr/wakeup_fd_posix.h index 243c452751..71d32d97ba 100644 --- a/src/core/lib/iomgr/wakeup_fd_posix.h +++ b/src/core/lib/iomgr/wakeup_fd_posix.h @@ -72,6 +72,7 @@ void grpc_wakeup_fd_global_destroy(void); void grpc_wakeup_fd_global_init_force_fallback(void); int grpc_has_wakeup_fd(void); +int grpc_cv_wakeup_fds_enabled(void); void grpc_enable_cv_wakeup_fds(int enable); typedef struct grpc_wakeup_fd grpc_wakeup_fd; @@ -92,7 +93,6 @@ struct grpc_wakeup_fd { extern int grpc_allow_specialized_wakeup_fd; extern int grpc_allow_pipe_wakeup_fd; -extern int grpc_has_real_wakeup_fd; #define GRPC_WAKEUP_FD_GET_READ_FD(fd_info) ((fd_info)->read_fd) diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 62d9729e13..98974878fc 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -102,7 +102,6 @@ CORE_SOURCE_FILES = [ 'src/core/lib/iomgr/error.c', 'src/core/lib/iomgr/ev_epoll_linux.c', 'src/core/lib/iomgr/ev_poll_and_epoll_posix.c', - 'src/core/lib/iomgr/ev_poll_cv_posix.c', 'src/core/lib/iomgr/ev_poll_posix.c', 'src/core/lib/iomgr/ev_posix.c', 'src/core/lib/iomgr/exec_ctx.c', diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 1ec177cdf3..0c92e270c8 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -810,7 +810,6 @@ src/core/lib/iomgr/endpoint_pair.h \ src/core/lib/iomgr/error.h \ src/core/lib/iomgr/ev_epoll_linux.h \ src/core/lib/iomgr/ev_poll_and_epoll_posix.h \ -src/core/lib/iomgr/ev_poll_cv_posix.h \ src/core/lib/iomgr/ev_poll_posix.h \ src/core/lib/iomgr/ev_posix.h \ src/core/lib/iomgr/exec_ctx.h \ @@ -977,7 +976,6 @@ src/core/lib/iomgr/endpoint_pair_windows.c \ src/core/lib/iomgr/error.c \ src/core/lib/iomgr/ev_epoll_linux.c \ src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ -src/core/lib/iomgr/ev_poll_cv_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 35b21d4e20..c9ded1ff58 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -6391,7 +6391,6 @@ "src/core/lib/iomgr/error.h", "src/core/lib/iomgr/ev_epoll_linux.h", "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", - "src/core/lib/iomgr/ev_poll_cv_posix.h", "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/exec_ctx.h", @@ -6512,8 +6511,6 @@ "src/core/lib/iomgr/ev_epoll_linux.h", "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", - "src/core/lib/iomgr/ev_poll_cv_posix.c", - "src/core/lib/iomgr/ev_poll_cv_posix.h", "src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.c", diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 7d5e0ee56f..4a62af0276 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -319,7 +319,6 @@ - @@ -513,8 +512,6 @@ - - diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 72bf449c3e..dacdcd7608 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -76,9 +76,6 @@ src\core\lib\iomgr - - src\core\lib\iomgr - src\core\lib\iomgr @@ -746,9 +743,6 @@ src\core\lib\iomgr - - src\core\lib\iomgr - src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index 44cbe8bf0c..cb5963d0e8 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -212,7 +212,6 @@ - @@ -361,8 +360,6 @@ - - diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index 57466022f4..362284339f 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -130,9 +130,6 @@ src\core\lib\iomgr - - src\core\lib\iomgr - src\core\lib\iomgr @@ -533,9 +530,6 @@ src\core\lib\iomgr - - src\core\lib\iomgr - src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index aa47cc800d..b7b72a05df 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -309,7 +309,6 @@ - @@ -481,8 +480,6 @@ - - diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index 4706c90af2..ca32c0b4b4 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -79,9 +79,6 @@ src\core\lib\iomgr - - src\core\lib\iomgr - src\core\lib\iomgr @@ -656,9 +653,6 @@ src\core\lib\iomgr - - src\core\lib\iomgr - src\core\lib\iomgr -- cgit v1.2.3 From f635fb90cad8f5dc534afda09fb4eb19f06a6e4a Mon Sep 17 00:00:00 2001 From: Yuxuan Li Date: Thu, 13 Oct 2016 14:56:20 -0700 Subject: change from malloc to gpr_malloc --- src/core/lib/channel/handshaker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/lib') diff --git a/src/core/lib/channel/handshaker.c b/src/core/lib/channel/handshaker.c index 8f9fb17a31..0d759887bc 100644 --- a/src/core/lib/channel/handshaker.c +++ b/src/core/lib/channel/handshaker.c @@ -183,7 +183,7 @@ void grpc_handshake_manager_do_handshake( gpr_timespec deadline, grpc_tcp_server_acceptor* acceptor, grpc_handshaker_done_cb cb, void* user_data) { grpc_channel_args* args_copy = grpc_channel_args_copy(args); - gpr_slice_buffer* read_buffer = malloc(sizeof(*read_buffer)); + gpr_slice_buffer* read_buffer = gpr_malloc(sizeof(*read_buffer)); gpr_slice_buffer_init(read_buffer); if (mgr->count == 0) { // No handshakers registered, so we just immediately call the done -- cgit v1.2.3 From b97cbd7acc3107f8cbd5fcf2d07ad48e1431513b Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Thu, 13 Oct 2016 15:06:01 -0700 Subject: Use atomics for poll status to prevent tsan race complaints --- src/core/lib/iomgr/ev_poll_posix.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.c index d9e5255ddc..f137e4dacc 100644 --- a/src/core/lib/iomgr/ev_poll_posix.c +++ b/src/core/lib/iomgr/ev_poll_posix.c @@ -254,7 +254,7 @@ struct grpc_pollset_set { #define CV_POLL_PERIOD_MS 1000 #define CV_DEFAULT_TABLE_SIZE 16 -typedef enum status_t { INPROGRESS, COMPLETED, CANCELLED } status_t; +typedef enum poll_status_t { INPROGRESS, COMPLETED, CANCELLED } poll_status_t; typedef struct poll_args { gpr_refcount refcount; @@ -264,7 +264,7 @@ typedef struct poll_args { int timeout; int retval; int err; - status_t status; + gpr_atm status; } poll_args; cv_fd_table g_cvfds; @@ -1276,7 +1276,7 @@ static void decref_poll_args(poll_args *args) { static void run_poll(void *arg) { int timeout, retval; poll_args *pargs = (poll_args *)arg; - while (pargs->status == INPROGRESS) { + while (gpr_atm_no_barrier_load(&pargs->status) == INPROGRESS) { if (pargs->timeout < 0) { timeout = CV_POLL_PERIOD_MS; } else { @@ -1291,9 +1291,9 @@ static void run_poll(void *arg) { } } gpr_mu_lock(&g_cvfds.mu); - if (pargs->status == INPROGRESS) { + if (gpr_atm_no_barrier_load(&pargs->status) == INPROGRESS) { // Signal main thread that the poll completed - pargs->status = COMPLETED; + gpr_atm_no_barrier_store(&pargs->status, COMPLETED); gpr_cv_signal(pargs->cv); } decref_poll_args(pargs); @@ -1345,7 +1345,7 @@ static int cvfd_poll(struct pollfd *fds, nfds_t nfds, int timeout) { pargs->timeout = timeout; pargs->retval = 0; pargs->err = 0; - pargs->status = INPROGRESS; + gpr_atm_no_barrier_store(&pargs->status, INPROGRESS); idx = 0; for (i = 0; i < nfds; i++) { if (fds[i].fd >= 0) { @@ -1361,13 +1361,13 @@ static int cvfd_poll(struct pollfd *fds, nfds_t nfds, int timeout) { gpr_thd_new(&t_id, &run_poll, pargs, &opt); // We want the poll() thread to trigger the deadline, so wait forever here gpr_cv_wait(pollcv, &g_cvfds.mu, gpr_inf_future(GPR_CLOCK_MONOTONIC)); - if (pargs->status == COMPLETED) { + if (gpr_atm_no_barrier_load(&pargs->status) == COMPLETED) { res = pargs->retval; errno = pargs->err; } else { res = 0; errno = 0; - pargs->status = CANCELLED; + gpr_atm_no_barrier_store(&pargs->status, CANCELLED); } } else { gpr_timespec deadline = gpr_now(GPR_CLOCK_REALTIME); @@ -1398,7 +1398,8 @@ static int cvfd_poll(struct pollfd *fds, nfds_t nfds, int timeout) { fds[i].revents = POLLIN; if (res >= 0) res++; } - } else if (fds[i].fd >= 0 && pargs->status == COMPLETED) { + } else if (fds[i].fd >= 0 && + gpr_atm_no_barrier_load(&pargs->status) == COMPLETED) { fds[i].revents = pargs->fds[idx].revents; idx++; } -- cgit v1.2.3 From c2dd2a2be965d3d12a43313aa530fa1455fd4724 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 14 Oct 2016 07:54:23 -0700 Subject: Fix potential crash --- src/core/lib/iomgr/closure.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/closure.c b/src/core/lib/iomgr/closure.c index 2c84e82aca..c6ddc76732 100644 --- a/src/core/lib/iomgr/closure.c +++ b/src/core/lib/iomgr/closure.c @@ -116,7 +116,9 @@ grpc_closure *grpc_closure_create(grpc_iomgr_cb_func cb, void *cb_arg) { void grpc_closure_run(grpc_exec_ctx *exec_ctx, grpc_closure *c, grpc_error *error) { GPR_TIMER_BEGIN("grpc_closure_run", 0); - c->cb(exec_ctx, c->cb_arg, error); + if (c != NULL) { + c->cb(exec_ctx, c->cb_arg, error); + } GRPC_ERROR_UNREF(error); GPR_TIMER_END("grpc_closure_run", 0); } -- cgit v1.2.3 From 6a721b5b3f253b86eac3f34c66e6b2d47bb08c9e Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 14 Oct 2016 12:43:34 -0700 Subject: Rename grpc_hash_table to grpc_mdstr_hash_table. --- BUILD | 16 +-- CMakeLists.txt | 6 +- Makefile | 8 +- binding.gyp | 2 +- build.yaml | 4 +- config.m4 | 2 +- gRPC-Core.podspec | 6 +- grpc.gemspec | 4 +- package.xml | 4 +- src/core/ext/client_config/method_config.c | 58 +++++---- src/core/ext/client_config/method_config.h | 4 +- src/core/lib/transport/hashtable.c | 140 -------------------- src/core/lib/transport/hashtable.h | 82 ------------ src/core/lib/transport/mdstr_hash_table.c | 142 +++++++++++++++++++++ src/core/lib/transport/mdstr_hash_table.h | 83 ++++++++++++ src/python/grpcio/grpc_core_dependencies.py | 2 +- tools/doxygen/Doxyfile.core.internal | 4 +- tools/run_tests/sources_and_headers.json | 6 +- vsprojects/vcxproj/grpc/grpc.vcxproj | 4 +- vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 4 +- .../vcxproj/grpc_test_util/grpc_test_util.vcxproj | 4 +- .../grpc_test_util/grpc_test_util.vcxproj.filters | 4 +- .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 4 +- .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 4 +- 24 files changed, 302 insertions(+), 295 deletions(-) delete mode 100644 src/core/lib/transport/hashtable.c delete mode 100644 src/core/lib/transport/hashtable.h create mode 100644 src/core/lib/transport/mdstr_hash_table.c create mode 100644 src/core/lib/transport/mdstr_hash_table.h (limited to 'src/core/lib') diff --git a/BUILD b/BUILD index a1be967ee4..4128ea6bf6 100644 --- a/BUILD +++ b/BUILD @@ -239,7 +239,7 @@ cc_library( "src/core/lib/surface/server.h", "src/core/lib/transport/byte_stream.h", "src/core/lib/transport/connectivity_state.h", - "src/core/lib/transport/hashtable.h", + "src/core/lib/transport/mdstr_hash_table.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", "src/core/lib/transport/static_metadata.h", @@ -411,7 +411,7 @@ cc_library( "src/core/lib/surface/version.c", "src/core/lib/transport/byte_stream.c", "src/core/lib/transport/connectivity_state.c", - "src/core/lib/transport/hashtable.c", + "src/core/lib/transport/mdstr_hash_table.c", "src/core/lib/transport/metadata.c", "src/core/lib/transport/metadata_batch.c", "src/core/lib/transport/static_metadata.c", @@ -644,7 +644,7 @@ cc_library( "src/core/lib/surface/server.h", "src/core/lib/transport/byte_stream.h", "src/core/lib/transport/connectivity_state.h", - "src/core/lib/transport/hashtable.h", + "src/core/lib/transport/mdstr_hash_table.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", "src/core/lib/transport/static_metadata.h", @@ -801,7 +801,7 @@ cc_library( "src/core/lib/surface/version.c", "src/core/lib/transport/byte_stream.c", "src/core/lib/transport/connectivity_state.c", - "src/core/lib/transport/hashtable.c", + "src/core/lib/transport/mdstr_hash_table.c", "src/core/lib/transport/metadata.c", "src/core/lib/transport/metadata_batch.c", "src/core/lib/transport/static_metadata.c", @@ -1004,7 +1004,7 @@ cc_library( "src/core/lib/surface/server.h", "src/core/lib/transport/byte_stream.h", "src/core/lib/transport/connectivity_state.h", - "src/core/lib/transport/hashtable.h", + "src/core/lib/transport/mdstr_hash_table.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", "src/core/lib/transport/static_metadata.h", @@ -1153,7 +1153,7 @@ cc_library( "src/core/lib/surface/version.c", "src/core/lib/transport/byte_stream.c", "src/core/lib/transport/connectivity_state.c", - "src/core/lib/transport/hashtable.c", + "src/core/lib/transport/mdstr_hash_table.c", "src/core/lib/transport/metadata.c", "src/core/lib/transport/metadata_batch.c", "src/core/lib/transport/static_metadata.c", @@ -1918,7 +1918,7 @@ objc_library( "src/core/lib/surface/version.c", "src/core/lib/transport/byte_stream.c", "src/core/lib/transport/connectivity_state.c", - "src/core/lib/transport/hashtable.c", + "src/core/lib/transport/mdstr_hash_table.c", "src/core/lib/transport/metadata.c", "src/core/lib/transport/metadata_batch.c", "src/core/lib/transport/static_metadata.c", @@ -2130,7 +2130,7 @@ objc_library( "src/core/lib/surface/server.h", "src/core/lib/transport/byte_stream.h", "src/core/lib/transport/connectivity_state.h", - "src/core/lib/transport/hashtable.h", + "src/core/lib/transport/mdstr_hash_table.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", "src/core/lib/transport/static_metadata.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 21c38baba3..366480eb00 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -376,7 +376,7 @@ add_library(grpc src/core/lib/surface/version.c src/core/lib/transport/byte_stream.c src/core/lib/transport/connectivity_state.c - src/core/lib/transport/hashtable.c + src/core/lib/transport/mdstr_hash_table.c src/core/lib/transport/metadata.c src/core/lib/transport/metadata_batch.c src/core/lib/transport/static_metadata.c @@ -637,7 +637,7 @@ add_library(grpc_cronet src/core/lib/surface/version.c src/core/lib/transport/byte_stream.c src/core/lib/transport/connectivity_state.c - src/core/lib/transport/hashtable.c + src/core/lib/transport/mdstr_hash_table.c src/core/lib/transport/metadata.c src/core/lib/transport/metadata_batch.c src/core/lib/transport/static_metadata.c @@ -870,7 +870,7 @@ add_library(grpc_unsecure src/core/lib/surface/version.c src/core/lib/transport/byte_stream.c src/core/lib/transport/connectivity_state.c - src/core/lib/transport/hashtable.c + src/core/lib/transport/mdstr_hash_table.c src/core/lib/transport/metadata.c src/core/lib/transport/metadata_batch.c src/core/lib/transport/static_metadata.c diff --git a/Makefile b/Makefile index 44738bd20c..4892ae98fb 100644 --- a/Makefile +++ b/Makefile @@ -2624,7 +2624,7 @@ LIBGRPC_SRC = \ src/core/lib/surface/version.c \ src/core/lib/transport/byte_stream.c \ src/core/lib/transport/connectivity_state.c \ - src/core/lib/transport/hashtable.c \ + src/core/lib/transport/mdstr_hash_table.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ src/core/lib/transport/static_metadata.c \ @@ -2903,7 +2903,7 @@ LIBGRPC_CRONET_SRC = \ src/core/lib/surface/version.c \ src/core/lib/transport/byte_stream.c \ src/core/lib/transport/connectivity_state.c \ - src/core/lib/transport/hashtable.c \ + src/core/lib/transport/mdstr_hash_table.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ src/core/lib/transport/static_metadata.c \ @@ -3172,7 +3172,7 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/lib/surface/version.c \ src/core/lib/transport/byte_stream.c \ src/core/lib/transport/connectivity_state.c \ - src/core/lib/transport/hashtable.c \ + src/core/lib/transport/mdstr_hash_table.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ src/core/lib/transport/static_metadata.c \ @@ -3367,7 +3367,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/surface/version.c \ src/core/lib/transport/byte_stream.c \ src/core/lib/transport/connectivity_state.c \ - src/core/lib/transport/hashtable.c \ + src/core/lib/transport/mdstr_hash_table.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ src/core/lib/transport/static_metadata.c \ diff --git a/binding.gyp b/binding.gyp index 88acd1786b..60e2278cd9 100644 --- a/binding.gyp +++ b/binding.gyp @@ -651,7 +651,7 @@ 'src/core/lib/surface/version.c', 'src/core/lib/transport/byte_stream.c', 'src/core/lib/transport/connectivity_state.c', - 'src/core/lib/transport/hashtable.c', + 'src/core/lib/transport/mdstr_hash_table.c', 'src/core/lib/transport/metadata.c', 'src/core/lib/transport/metadata_batch.c', 'src/core/lib/transport/static_metadata.c', diff --git a/build.yaml b/build.yaml index 9cec3aeab4..c167ebf990 100644 --- a/build.yaml +++ b/build.yaml @@ -243,7 +243,7 @@ filegroups: - src/core/lib/surface/server.h - src/core/lib/transport/byte_stream.h - src/core/lib/transport/connectivity_state.h - - src/core/lib/transport/hashtable.h + - src/core/lib/transport/mdstr_hash_table.h - src/core/lib/transport/metadata.h - src/core/lib/transport/metadata_batch.h - src/core/lib/transport/static_metadata.h @@ -337,7 +337,7 @@ filegroups: - src/core/lib/surface/version.c - src/core/lib/transport/byte_stream.c - src/core/lib/transport/connectivity_state.c - - src/core/lib/transport/hashtable.c + - src/core/lib/transport/mdstr_hash_table.c - src/core/lib/transport/metadata.c - src/core/lib/transport/metadata_batch.c - src/core/lib/transport/static_metadata.c diff --git a/config.m4 b/config.m4 index f65f617f9a..c3f2e20c20 100644 --- a/config.m4 +++ b/config.m4 @@ -170,7 +170,7 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/surface/version.c \ src/core/lib/transport/byte_stream.c \ src/core/lib/transport/connectivity_state.c \ - src/core/lib/transport/hashtable.c \ + src/core/lib/transport/mdstr_hash_table.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ src/core/lib/transport/static_metadata.c \ diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index ffa7ca0825..0712e6de9f 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -326,7 +326,7 @@ Pod::Spec.new do |s| 'src/core/lib/surface/server.h', 'src/core/lib/transport/byte_stream.h', 'src/core/lib/transport/connectivity_state.h', - 'src/core/lib/transport/hashtable.h', + 'src/core/lib/transport/mdstr_hash_table.h', 'src/core/lib/transport/metadata.h', 'src/core/lib/transport/metadata_batch.h', 'src/core/lib/transport/static_metadata.h', @@ -502,7 +502,7 @@ Pod::Spec.new do |s| 'src/core/lib/surface/version.c', 'src/core/lib/transport/byte_stream.c', 'src/core/lib/transport/connectivity_state.c', - 'src/core/lib/transport/hashtable.c', + 'src/core/lib/transport/mdstr_hash_table.c', 'src/core/lib/transport/metadata.c', 'src/core/lib/transport/metadata_batch.c', 'src/core/lib/transport/static_metadata.c', @@ -703,7 +703,7 @@ Pod::Spec.new do |s| 'src/core/lib/surface/server.h', 'src/core/lib/transport/byte_stream.h', 'src/core/lib/transport/connectivity_state.h', - 'src/core/lib/transport/hashtable.h', + 'src/core/lib/transport/mdstr_hash_table.h', 'src/core/lib/transport/metadata.h', 'src/core/lib/transport/metadata_batch.h', 'src/core/lib/transport/static_metadata.h', diff --git a/grpc.gemspec b/grpc.gemspec index e547811332..e3834f2127 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -246,7 +246,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/surface/server.h ) s.files += %w( src/core/lib/transport/byte_stream.h ) s.files += %w( src/core/lib/transport/connectivity_state.h ) - s.files += %w( src/core/lib/transport/hashtable.h ) + s.files += %w( src/core/lib/transport/mdstr_hash_table.h ) s.files += %w( src/core/lib/transport/metadata.h ) s.files += %w( src/core/lib/transport/metadata_batch.h ) s.files += %w( src/core/lib/transport/static_metadata.h ) @@ -422,7 +422,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/surface/version.c ) s.files += %w( src/core/lib/transport/byte_stream.c ) s.files += %w( src/core/lib/transport/connectivity_state.c ) - s.files += %w( src/core/lib/transport/hashtable.c ) + s.files += %w( src/core/lib/transport/mdstr_hash_table.c ) s.files += %w( src/core/lib/transport/metadata.c ) s.files += %w( src/core/lib/transport/metadata_batch.c ) s.files += %w( src/core/lib/transport/static_metadata.c ) diff --git a/package.xml b/package.xml index bf452c3b16..49b71eef0f 100644 --- a/package.xml +++ b/package.xml @@ -253,7 +253,7 @@ - + @@ -429,7 +429,7 @@ - + diff --git a/src/core/ext/client_config/method_config.c b/src/core/ext/client_config/method_config.c index 3699c22810..f8a82323e7 100644 --- a/src/core/ext/client_config/method_config.c +++ b/src/core/ext/client_config/method_config.c @@ -39,7 +39,7 @@ #include #include -#include "src/core/lib/transport/hashtable.h" +#include "src/core/lib/transport/mdstr_hash_table.h" #include "src/core/lib/transport/metadata.h" // @@ -63,7 +63,8 @@ static int bool_cmp(void* v1, void* v2) { return 0; } -static grpc_hash_table_vtable bool_vtable = {gpr_free, bool_copy, bool_cmp}; +static grpc_mdstr_hash_table_vtable bool_vtable = {gpr_free, bool_copy, + bool_cmp}; // timespec vtable @@ -78,8 +79,8 @@ static int timespec_cmp(void* v1, void* v2) { return gpr_time_cmp(*(gpr_timespec*)v1, *(gpr_timespec*)v2); } -static grpc_hash_table_vtable timespec_vtable = {gpr_free, timespec_copy, - timespec_cmp}; +static grpc_mdstr_hash_table_vtable timespec_vtable = {gpr_free, timespec_copy, + timespec_cmp}; // int32 vtable @@ -98,7 +99,8 @@ static int int32_cmp(void* v1, void* v2) { return 0; } -static grpc_hash_table_vtable int32_vtable = {gpr_free, int32_copy, int32_cmp}; +static grpc_mdstr_hash_table_vtable int32_vtable = {gpr_free, int32_copy, + int32_cmp}; // Hash table keys. #define GRPC_METHOD_CONFIG_WAIT_FOR_READY "grpc.wait_for_ready" // bool @@ -109,7 +111,7 @@ static grpc_hash_table_vtable int32_vtable = {gpr_free, int32_copy, int32_cmp}; "grpc.max_response_message_bytes" // int32 struct grpc_method_config { - grpc_hash_table* table; + grpc_mdstr_hash_table* table; grpc_mdstr* wait_for_ready_key; grpc_mdstr* timeout_key; grpc_mdstr* max_request_message_bytes_key; @@ -129,7 +131,7 @@ grpc_method_config* grpc_method_config_create( grpc_mdstr_from_string(GRPC_METHOD_CONFIG_MAX_REQUEST_MESSAGE_BYTES); method_config->max_response_message_bytes_key = grpc_mdstr_from_string(GRPC_METHOD_CONFIG_MAX_RESPONSE_MESSAGE_BYTES); - grpc_hash_table_entry entries[4]; + grpc_mdstr_hash_table_entry entries[4]; size_t num_entries = 0; if (wait_for_ready != NULL) { entries[num_entries].key = method_config->wait_for_ready_key; @@ -155,17 +157,17 @@ grpc_method_config* grpc_method_config_create( entries[num_entries].vtable = &int32_vtable; ++num_entries; } - method_config->table = grpc_hash_table_create(num_entries, entries); + method_config->table = grpc_mdstr_hash_table_create(num_entries, entries); return method_config; } grpc_method_config* grpc_method_config_ref(grpc_method_config* method_config) { - grpc_hash_table_ref(method_config->table); + grpc_mdstr_hash_table_ref(method_config->table); return method_config; } void grpc_method_config_unref(grpc_method_config* method_config) { - if (grpc_hash_table_unref(method_config->table)) { + if (grpc_mdstr_hash_table_unref(method_config->table)) { GRPC_MDSTR_UNREF(method_config->wait_for_ready_key); GRPC_MDSTR_UNREF(method_config->timeout_key); GRPC_MDSTR_UNREF(method_config->max_request_message_bytes_key); @@ -176,30 +178,32 @@ void grpc_method_config_unref(grpc_method_config* method_config) { int grpc_method_config_cmp(const grpc_method_config* method_config1, const grpc_method_config* method_config2) { - return grpc_hash_table_cmp(method_config1->table, method_config2->table); + return grpc_mdstr_hash_table_cmp(method_config1->table, + method_config2->table); } const bool* grpc_method_config_get_wait_for_ready( const grpc_method_config* method_config) { - return grpc_hash_table_get(method_config->table, - method_config->wait_for_ready_key); + return grpc_mdstr_hash_table_get(method_config->table, + method_config->wait_for_ready_key); } const gpr_timespec* grpc_method_config_get_timeout( const grpc_method_config* method_config) { - return grpc_hash_table_get(method_config->table, method_config->timeout_key); + return grpc_mdstr_hash_table_get(method_config->table, + method_config->timeout_key); } const int32_t* grpc_method_config_get_max_request_message_bytes( const grpc_method_config* method_config) { - return grpc_hash_table_get(method_config->table, - method_config->max_request_message_bytes_key); + return grpc_mdstr_hash_table_get( + method_config->table, method_config->max_request_message_bytes_key); } const int32_t* grpc_method_config_get_max_response_message_bytes( const grpc_method_config* method_config) { - return grpc_hash_table_get(method_config->table, - method_config->max_response_message_bytes_key); + return grpc_mdstr_hash_table_get( + method_config->table, method_config->max_response_message_bytes_key); } // @@ -218,41 +222,41 @@ static int method_config_cmp(void* valuep1, void* valuep2) { return grpc_method_config_cmp(valuep1, valuep2); } -static const grpc_hash_table_vtable method_config_table_vtable = { +static const grpc_mdstr_hash_table_vtable method_config_table_vtable = { method_config_unref, method_config_ref, method_config_cmp}; grpc_method_config_table* grpc_method_config_table_create( size_t num_entries, grpc_method_config_table_entry* entries) { - grpc_hash_table_entry* hash_table_entries = - gpr_malloc(sizeof(grpc_hash_table_entry) * num_entries); + grpc_mdstr_hash_table_entry* hash_table_entries = + gpr_malloc(sizeof(grpc_mdstr_hash_table_entry) * num_entries); for (size_t i = 0; i < num_entries; ++i) { hash_table_entries[i].key = entries[i].method_name; hash_table_entries[i].value = entries[i].method_config; hash_table_entries[i].vtable = &method_config_table_vtable; } grpc_method_config_table* method_config_table = - grpc_hash_table_create(num_entries, hash_table_entries); + grpc_mdstr_hash_table_create(num_entries, hash_table_entries); gpr_free(hash_table_entries); return method_config_table; } grpc_method_config_table* grpc_method_config_table_ref( grpc_method_config_table* table) { - return grpc_hash_table_ref(table); + return grpc_mdstr_hash_table_ref(table); } void grpc_method_config_table_unref(grpc_method_config_table* table) { - grpc_hash_table_unref(table); + grpc_mdstr_hash_table_unref(table); } int grpc_method_config_table_cmp(const grpc_method_config_table* table1, const grpc_method_config_table* table2) { - return grpc_hash_table_cmp(table1, table2); + return grpc_mdstr_hash_table_cmp(table1, table2); } grpc_method_config* grpc_method_config_table_get_method_config( const grpc_method_config_table* table, const grpc_mdstr* path) { - grpc_method_config* method_config = grpc_hash_table_get(table, path); + grpc_method_config* method_config = grpc_mdstr_hash_table_get(table, path); // If we didn't find a match for the path, try looking for a wildcard // entry (i.e., change "/service/method" to "/service/*"). if (method_config == NULL) { @@ -265,7 +269,7 @@ grpc_method_config* grpc_method_config_table_get_method_config( buf[len + 1] = '\0'; grpc_mdstr* wildcard_path = grpc_mdstr_from_string(buf); gpr_free(buf); - method_config = grpc_hash_table_get(table, wildcard_path); + method_config = grpc_mdstr_hash_table_get(table, wildcard_path); GRPC_MDSTR_UNREF(wildcard_path); } return method_config; diff --git a/src/core/ext/client_config/method_config.h b/src/core/ext/client_config/method_config.h index d228b97948..1302ac425d 100644 --- a/src/core/ext/client_config/method_config.h +++ b/src/core/ext/client_config/method_config.h @@ -37,7 +37,7 @@ #include #include -#include "src/core/lib/transport/hashtable.h" +#include "src/core/lib/transport/mdstr_hash_table.h" #include "src/core/lib/transport/metadata.h" /// Per-method configuration. @@ -79,7 +79,7 @@ const int32_t* grpc_method_config_get_max_response_message_bytes( const grpc_method_config* method_config); /// A table of method configs. -typedef grpc_hash_table grpc_method_config_table; +typedef grpc_mdstr_hash_table grpc_method_config_table; typedef struct grpc_method_config_table_entry { /// The name is of one of the following forms: diff --git a/src/core/lib/transport/hashtable.c b/src/core/lib/transport/hashtable.c deleted file mode 100644 index a016daa0ec..0000000000 --- a/src/core/lib/transport/hashtable.c +++ /dev/null @@ -1,140 +0,0 @@ -// -// Copyright 2016, 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. -// - -#include "src/core/lib/transport/hashtable.h" - -#include -#include - -#include -#include - -#include "src/core/lib/transport/metadata.h" - -struct grpc_hash_table { - gpr_refcount refs; - size_t num_entries; - grpc_hash_table_entry* entries; -}; - -// Helper function for insert and get operations that performs quadratic -// probing (https://en.wikipedia.org/wiki/Quadratic_probing). -static size_t grpc_hash_table_find_index(const grpc_hash_table* table, - const grpc_mdstr* key, - bool find_empty) { - for (size_t i = 0; i < table->num_entries; ++i) { - const size_t idx = (key->hash + i * i) % table->num_entries; - if (table->entries[idx].key == NULL) - return find_empty ? idx : table->num_entries; - if (table->entries[idx].key == key) return idx; - } - return table->num_entries; // Not found. -} - -static void grpc_hash_table_add(grpc_hash_table* table, grpc_mdstr* key, - void* value, - const grpc_hash_table_vtable* vtable) { - GPR_ASSERT(value != NULL); - const size_t idx = - grpc_hash_table_find_index(table, key, true /* find_empty */); - GPR_ASSERT(idx != table->num_entries); // Table should never be full. - grpc_hash_table_entry* entry = &table->entries[idx]; - entry->key = GRPC_MDSTR_REF(key); - entry->value = vtable->copy_value(value); - entry->vtable = vtable; -} - -grpc_hash_table* grpc_hash_table_create(size_t num_entries, - grpc_hash_table_entry* entries) { - grpc_hash_table* table = gpr_malloc(sizeof(*table)); - memset(table, 0, sizeof(*table)); - gpr_ref_init(&table->refs, 1); - // Quadratic probing gets best performance when the table is no more - // than half full. - table->num_entries = num_entries * 2; - const size_t entry_size = sizeof(grpc_hash_table_entry) * table->num_entries; - table->entries = gpr_malloc(entry_size); - memset(table->entries, 0, entry_size); - for (size_t i = 0; i < num_entries; ++i) { - grpc_hash_table_entry* entry = &entries[i]; - grpc_hash_table_add(table, entry->key, entry->value, entry->vtable); - } - return table; -} - -grpc_hash_table* grpc_hash_table_ref(grpc_hash_table* table) { - if (table != NULL) gpr_ref(&table->refs); - return table; -} - -int grpc_hash_table_unref(grpc_hash_table* table) { - if (table != NULL && gpr_unref(&table->refs)) { - for (size_t i = 0; i < table->num_entries; ++i) { - grpc_hash_table_entry* entry = &table->entries[i]; - if (entry->key != NULL) { - GRPC_MDSTR_UNREF(entry->key); - entry->vtable->destroy_value(entry->value); - } - } - gpr_free(table->entries); - gpr_free(table); - return 1; - } - return 0; -} - -void* grpc_hash_table_get(const grpc_hash_table* table, const grpc_mdstr* key) { - const size_t idx = - grpc_hash_table_find_index(table, key, false /* find_empty */); - if (idx == table->num_entries) return NULL; // Not found. - return table->entries[idx].value; -} - -int grpc_hash_table_cmp(const grpc_hash_table* table1, - const grpc_hash_table* table2) { - // Compare by num_entries. - if (table1->num_entries < table2->num_entries) return -1; - if (table1->num_entries > table2->num_entries) return 1; - for (size_t i = 0; i < table1->num_entries; ++i) { - grpc_hash_table_entry* e1 = &table1->entries[i]; - grpc_hash_table_entry* e2 = &table2->entries[i]; - // Compare keys by hash value. - if (e1->key->hash < e2->key->hash) return -1; - if (e1->key->hash > e2->key->hash) return 1; - // Compare by vtable (pointer equality). - if (e1->vtable < e2->vtable) return -1; - if (e1->vtable > e2->vtable) return 1; - // Compare values via vtable. - const int value_result = e1->vtable->compare_value(e1->value, e2->value); - if (value_result != 0) return value_result; - } - return 0; -} diff --git a/src/core/lib/transport/hashtable.h b/src/core/lib/transport/hashtable.h deleted file mode 100644 index d5f40a2cf7..0000000000 --- a/src/core/lib/transport/hashtable.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2016, 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. - */ - -#ifndef GRPC_CORE_LIB_TRANSPORT_HASHTABLE_H -#define GRPC_CORE_LIB_TRANSPORT_HASHTABLE_H - -#include "src/core/lib/transport/metadata.h" - -/** Hash table implementation. - * - * This implementation uses open addressing - * (https://en.wikipedia.org/wiki/Open_addressing) with quadratic - * probing (https://en.wikipedia.org/wiki/Quadratic_probing). - * - * The keys are \a grpc_mdstr objects. The values are arbitrary pointers - * with a common vtable. - * - * Hash tables are intentionally immutable, to avoid the need for locking. - */ - -typedef struct grpc_hash_table grpc_hash_table; - -typedef struct grpc_hash_table_vtable { - void (*destroy_value)(void* value); - void* (*copy_value)(void* value); - int (*compare_value)(void* value1, void* value2); -} grpc_hash_table_vtable; - -typedef struct grpc_hash_table_entry { - grpc_mdstr* key; - void* value; /* Must not be NULL. */ - const grpc_hash_table_vtable* vtable; -} grpc_hash_table_entry; - -/** Creates a new hash table of containing \a entries, which is an array - of length \a num_entries. - Creates its own copy of all keys and values from \a entries. */ -grpc_hash_table* grpc_hash_table_create(size_t num_entries, - grpc_hash_table_entry* entries); - -grpc_hash_table* grpc_hash_table_ref(grpc_hash_table* table); -/** Returns 1 when \a table is destroyed. */ -int grpc_hash_table_unref(grpc_hash_table* table); - -/** Returns the value from \a table associated with \a key. - Returns NULL if \a key is not found. */ -void* grpc_hash_table_get(const grpc_hash_table* table, const grpc_mdstr* key); - -/** Compares two hash tables. - The sort order is stable but undefined. */ -int grpc_hash_table_cmp(const grpc_hash_table* table1, - const grpc_hash_table* table2); - -#endif /* GRPC_CORE_LIB_TRANSPORT_HASHTABLE_H */ diff --git a/src/core/lib/transport/mdstr_hash_table.c b/src/core/lib/transport/mdstr_hash_table.c new file mode 100644 index 0000000000..4be0536dd7 --- /dev/null +++ b/src/core/lib/transport/mdstr_hash_table.c @@ -0,0 +1,142 @@ +// +// Copyright 2016, 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. +// + +#include "src/core/lib/transport/mdstr_hash_table.h" + +#include +#include + +#include +#include + +#include "src/core/lib/transport/metadata.h" + +struct grpc_mdstr_hash_table { + gpr_refcount refs; + size_t num_entries; + grpc_mdstr_hash_table_entry* entries; +}; + +// Helper function for insert and get operations that performs quadratic +// probing (https://en.wikipedia.org/wiki/Quadratic_probing). +static size_t grpc_mdstr_hash_table_find_index( + const grpc_mdstr_hash_table* table, const grpc_mdstr* key, + bool find_empty) { + for (size_t i = 0; i < table->num_entries; ++i) { + const size_t idx = (key->hash + i * i) % table->num_entries; + if (table->entries[idx].key == NULL) + return find_empty ? idx : table->num_entries; + if (table->entries[idx].key == key) return idx; + } + return table->num_entries; // Not found. +} + +static void grpc_mdstr_hash_table_add( + grpc_mdstr_hash_table* table, grpc_mdstr* key, void* value, + const grpc_mdstr_hash_table_vtable* vtable) { + GPR_ASSERT(value != NULL); + const size_t idx = + grpc_mdstr_hash_table_find_index(table, key, true /* find_empty */); + GPR_ASSERT(idx != table->num_entries); // Table should never be full. + grpc_mdstr_hash_table_entry* entry = &table->entries[idx]; + entry->key = GRPC_MDSTR_REF(key); + entry->value = vtable->copy_value(value); + entry->vtable = vtable; +} + +grpc_mdstr_hash_table* grpc_mdstr_hash_table_create( + size_t num_entries, grpc_mdstr_hash_table_entry* entries) { + grpc_mdstr_hash_table* table = gpr_malloc(sizeof(*table)); + memset(table, 0, sizeof(*table)); + gpr_ref_init(&table->refs, 1); + // Quadratic probing gets best performance when the table is no more + // than half full. + table->num_entries = num_entries * 2; + const size_t entry_size = + sizeof(grpc_mdstr_hash_table_entry) * table->num_entries; + table->entries = gpr_malloc(entry_size); + memset(table->entries, 0, entry_size); + for (size_t i = 0; i < num_entries; ++i) { + grpc_mdstr_hash_table_entry* entry = &entries[i]; + grpc_mdstr_hash_table_add(table, entry->key, entry->value, entry->vtable); + } + return table; +} + +grpc_mdstr_hash_table* grpc_mdstr_hash_table_ref(grpc_mdstr_hash_table* table) { + if (table != NULL) gpr_ref(&table->refs); + return table; +} + +int grpc_mdstr_hash_table_unref(grpc_mdstr_hash_table* table) { + if (table != NULL && gpr_unref(&table->refs)) { + for (size_t i = 0; i < table->num_entries; ++i) { + grpc_mdstr_hash_table_entry* entry = &table->entries[i]; + if (entry->key != NULL) { + GRPC_MDSTR_UNREF(entry->key); + entry->vtable->destroy_value(entry->value); + } + } + gpr_free(table->entries); + gpr_free(table); + return 1; + } + return 0; +} + +void* grpc_mdstr_hash_table_get(const grpc_mdstr_hash_table* table, + const grpc_mdstr* key) { + const size_t idx = + grpc_mdstr_hash_table_find_index(table, key, false /* find_empty */); + if (idx == table->num_entries) return NULL; // Not found. + return table->entries[idx].value; +} + +int grpc_mdstr_hash_table_cmp(const grpc_mdstr_hash_table* table1, + const grpc_mdstr_hash_table* table2) { + // Compare by num_entries. + if (table1->num_entries < table2->num_entries) return -1; + if (table1->num_entries > table2->num_entries) return 1; + for (size_t i = 0; i < table1->num_entries; ++i) { + grpc_mdstr_hash_table_entry* e1 = &table1->entries[i]; + grpc_mdstr_hash_table_entry* e2 = &table2->entries[i]; + // Compare keys by hash value. + if (e1->key->hash < e2->key->hash) return -1; + if (e1->key->hash > e2->key->hash) return 1; + // Compare by vtable (pointer equality). + if (e1->vtable < e2->vtable) return -1; + if (e1->vtable > e2->vtable) return 1; + // Compare values via vtable. + const int value_result = e1->vtable->compare_value(e1->value, e2->value); + if (value_result != 0) return value_result; + } + return 0; +} diff --git a/src/core/lib/transport/mdstr_hash_table.h b/src/core/lib/transport/mdstr_hash_table.h new file mode 100644 index 0000000000..52e5b023db --- /dev/null +++ b/src/core/lib/transport/mdstr_hash_table.h @@ -0,0 +1,83 @@ +/* + * Copyright 2016, 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. + */ + +#ifndef GRPC_CORE_LIB_TRANSPORT_MDSTR_HASH_TABLE_H +#define GRPC_CORE_LIB_TRANSPORT_MDSTR_HASH_TABLE_H + +#include "src/core/lib/transport/metadata.h" + +/** Hash table implementation. + * + * This implementation uses open addressing + * (https://en.wikipedia.org/wiki/Open_addressing) with quadratic + * probing (https://en.wikipedia.org/wiki/Quadratic_probing). + * + * The keys are \a grpc_mdstr objects. The values are arbitrary pointers + * with a common vtable. + * + * Hash tables are intentionally immutable, to avoid the need for locking. + */ + +typedef struct grpc_mdstr_hash_table grpc_mdstr_hash_table; + +typedef struct grpc_mdstr_hash_table_vtable { + void (*destroy_value)(void* value); + void* (*copy_value)(void* value); + int (*compare_value)(void* value1, void* value2); +} grpc_mdstr_hash_table_vtable; + +typedef struct grpc_mdstr_hash_table_entry { + grpc_mdstr* key; + void* value; /* Must not be NULL. */ + const grpc_mdstr_hash_table_vtable* vtable; +} grpc_mdstr_hash_table_entry; + +/** Creates a new hash table of containing \a entries, which is an array + of length \a num_entries. + Creates its own copy of all keys and values from \a entries. */ +grpc_mdstr_hash_table* grpc_mdstr_hash_table_create( + size_t num_entries, grpc_mdstr_hash_table_entry* entries); + +grpc_mdstr_hash_table* grpc_mdstr_hash_table_ref(grpc_mdstr_hash_table* table); +/** Returns 1 when \a table is destroyed. */ +int grpc_mdstr_hash_table_unref(grpc_mdstr_hash_table* table); + +/** Returns the value from \a table associated with \a key. + Returns NULL if \a key is not found. */ +void* grpc_mdstr_hash_table_get(const grpc_mdstr_hash_table* table, + const grpc_mdstr* key); + +/** Compares two hash tables. + The sort order is stable but undefined. */ +int grpc_mdstr_hash_table_cmp(const grpc_mdstr_hash_table* table1, + const grpc_mdstr_hash_table* table2); + +#endif /* GRPC_CORE_LIB_TRANSPORT_MDSTR_HASH_TABLE_H */ diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 315d469a15..98bbe6f742 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -164,7 +164,7 @@ CORE_SOURCE_FILES = [ 'src/core/lib/surface/version.c', 'src/core/lib/transport/byte_stream.c', 'src/core/lib/transport/connectivity_state.c', - 'src/core/lib/transport/hashtable.c', + 'src/core/lib/transport/mdstr_hash_table.c', 'src/core/lib/transport/metadata.c', 'src/core/lib/transport/metadata_batch.c', 'src/core/lib/transport/static_metadata.c', diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index c9317396f6..0a2a3456f1 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -863,7 +863,7 @@ src/core/lib/surface/lame_client.h \ src/core/lib/surface/server.h \ src/core/lib/transport/byte_stream.h \ src/core/lib/transport/connectivity_state.h \ -src/core/lib/transport/hashtable.h \ +src/core/lib/transport/mdstr_hash_table.h \ src/core/lib/transport/metadata.h \ src/core/lib/transport/metadata_batch.h \ src/core/lib/transport/static_metadata.h \ @@ -1039,7 +1039,7 @@ src/core/lib/surface/validate_metadata.c \ src/core/lib/surface/version.c \ src/core/lib/transport/byte_stream.c \ src/core/lib/transport/connectivity_state.c \ -src/core/lib/transport/hashtable.c \ +src/core/lib/transport/mdstr_hash_table.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ src/core/lib/transport/static_metadata.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 2ca9ed6000..e0b8a0902a 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -6463,7 +6463,7 @@ "src/core/lib/surface/server.h", "src/core/lib/transport/byte_stream.h", "src/core/lib/transport/connectivity_state.h", - "src/core/lib/transport/hashtable.h", + "src/core/lib/transport/mdstr_hash_table.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", "src/core/lib/transport/static_metadata.h", @@ -6645,8 +6645,8 @@ "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/hashtable.c", - "src/core/lib/transport/hashtable.h", + "src/core/lib/transport/mdstr_hash_table.c", + "src/core/lib/transport/mdstr_hash_table.h", "src/core/lib/transport/metadata.c", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.c", diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index b2352d74f4..2297e81fbf 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -372,7 +372,7 @@ - + @@ -637,7 +637,7 @@ - + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index ee7825ae88..3e8632daa5 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -262,7 +262,7 @@ src\core\lib\transport - + src\core\lib\transport @@ -905,7 +905,7 @@ src\core\lib\transport - + src\core\lib\transport diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index c7375431c8..f9602d0349 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -265,7 +265,7 @@ - + @@ -484,7 +484,7 @@ - + diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index 18cdaa5819..412af4d5af 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -316,7 +316,7 @@ src\core\lib\transport - + src\core\lib\transport @@ -689,7 +689,7 @@ src\core\lib\transport - + src\core\lib\transport diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 09a1e2386d..730d17beee 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -362,7 +362,7 @@ - + @@ -605,7 +605,7 @@ - + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index df7a9b9b43..235dc993f1 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -265,7 +265,7 @@ src\core\lib\transport - + src\core\lib\transport @@ -815,7 +815,7 @@ src\core\lib\transport - + src\core\lib\transport -- cgit v1.2.3 From ff08f33e094640caf8e8ce5d8d2a2f82c3cc4f3b Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 14 Oct 2016 13:01:01 -0700 Subject: Pass call start time into the call stack via grpc_call_element_args. --- src/core/ext/census/grpc_filter.c | 4 ++-- src/core/ext/client_config/client_channel.c | 4 +--- src/core/lib/channel/channel_stack.c | 1 + src/core/lib/channel/channel_stack.h | 1 + 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/census/grpc_filter.c b/src/core/ext/census/grpc_filter.c index 9dacc17eb4..a4cf6f37bd 100644 --- a/src/core/ext/census/grpc_filter.c +++ b/src/core/ext/census/grpc_filter.c @@ -133,7 +133,7 @@ static grpc_error *client_init_call_elem(grpc_exec_ctx *exec_ctx, call_data *d = elem->call_data; GPR_ASSERT(d != NULL); memset(d, 0, sizeof(*d)); - d->start_ts = gpr_now(GPR_CLOCK_REALTIME); + d->start_ts = args->start_time; return GRPC_ERROR_NONE; } @@ -152,7 +152,7 @@ static grpc_error *server_init_call_elem(grpc_exec_ctx *exec_ctx, call_data *d = elem->call_data; GPR_ASSERT(d != NULL); memset(d, 0, sizeof(*d)); - d->start_ts = gpr_now(GPR_CLOCK_REALTIME); + d->start_ts = args->start_time; /* TODO(hongyu): call census_tracing_start_op here. */ grpc_closure_init(&d->finish_recv, server_on_done_recv, elem); return GRPC_ERROR_NONE; diff --git a/src/core/ext/client_config/client_channel.c b/src/core/ext/client_config/client_channel.c index fb3e17a7d9..0ad9278d4f 100644 --- a/src/core/ext/client_config/client_channel.c +++ b/src/core/ext/client_config/client_channel.c @@ -881,9 +881,7 @@ static grpc_error *cc_init_call_elem(grpc_exec_ctx *exec_ctx, // Initialize data members. grpc_deadline_state_init(exec_ctx, elem, args->call_stack); calld->path = GRPC_MDSTR_REF(args->path); - // TODO(roth): Is there a better value to use here for the actual start - // time of the call (i.e., something initialized at the surface layer)? - calld->call_start_time = gpr_now(GPR_CLOCK_MONOTONIC); + calld->call_start_time = args->start_time; calld->deadline = gpr_convert_clock_type(args->deadline, GPR_CLOCK_MONOTONIC); calld->wait_for_ready_from_service_config = WAIT_FOR_READY_UNSET; calld->cancel_error = GRPC_ERROR_NONE; diff --git a/src/core/lib/channel/channel_stack.c b/src/core/lib/channel/channel_stack.c index 205496f2f2..2c5367901d 100644 --- a/src/core/lib/channel/channel_stack.c +++ b/src/core/lib/channel/channel_stack.c @@ -179,6 +179,7 @@ grpc_error *grpc_call_stack_init( /* init per-filter data */ grpc_error *first_error = GRPC_ERROR_NONE; + args.start_time = gpr_now(GPR_CLOCK_MONOTONIC); for (i = 0; i < count; i++) { args.call_stack = call_stack; args.server_transport_data = transport_server_data; diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h index 5b46cd32a3..27f3be7b29 100644 --- a/src/core/lib/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -75,6 +75,7 @@ typedef struct { const void *server_transport_data; grpc_call_context_element *context; grpc_mdstr *path; + gpr_timespec start_time; gpr_timespec deadline; } grpc_call_element_args; -- cgit v1.2.3 From 936f1ea9ac37965a6cbe22a04f4fedc9d7facc01 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 14 Oct 2016 15:15:19 -0700 Subject: Fix some test failures --- .../transport/chttp2/transport/chttp2_transport.c | 90 ++++++++++++++-------- src/core/ext/transport/chttp2/transport/internal.h | 6 +- src/core/lib/iomgr/error.c | 16 +++- src/core/lib/iomgr/error.h | 4 + 4 files changed, 79 insertions(+), 37 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 8ab26e512d..b1dd974011 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -90,10 +90,6 @@ static void complete_fetch(grpc_exec_ctx *exec_ctx, void *gs, static void push_setting(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_setting_id id, uint32_t value); -/** Start disconnection chain */ -static void drop_connection(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, - grpc_error *error); - static void close_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_error *error); @@ -118,6 +114,11 @@ static void fail_pending_writes(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_error *error); +static void close_transport_locked(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport *t, grpc_error *error); +static void end_all_the_calls(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, + grpc_error *error); + /******************************************************************************* * CONSTRUCTION/DESTRUCTION/REFCOUNTING */ @@ -367,7 +368,10 @@ static void destroy_transport_locked(grpc_exec_ctx *exec_ctx, void *tp, grpc_error *error) { grpc_chttp2_transport *t = tp; t->destroying = 1; - drop_connection(exec_ctx, t, GRPC_ERROR_CREATE("Transport destroyed")); + close_transport_locked( + exec_ctx, t, + grpc_error_set_int(GRPC_ERROR_CREATE("Transport destroyed"), + GRPC_ERROR_INT_OCCURRED_DURING_WRITE, t->write_state)); GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "destroy"); } @@ -382,6 +386,19 @@ static void close_transport_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_error *error) { if (!t->closed) { + if (t->write_state != GRPC_CHTTP2_WRITE_STATE_IDLE) { + if (t->close_transport_on_writes_finished == NULL) { + t->close_transport_on_writes_finished = + GRPC_ERROR_CREATE("Delayed close due to in-progress write"); + } + t->close_transport_on_writes_finished = + grpc_error_add_child(t->close_transport_on_writes_finished, error); + return; + } + if (!grpc_error_get_int(error, GRPC_ERROR_INT_GRPC_STATUS, NULL)) { + error = grpc_error_set_int(error, GRPC_ERROR_INT_GRPC_STATUS, + GRPC_STATUS_UNAVAILABLE); + } t->closed = 1; connectivity_state_set(exec_ctx, t, GRPC_CHANNEL_SHUTDOWN, GRPC_ERROR_REF(error), "close_transport"); @@ -392,6 +409,7 @@ static void close_transport_locked(grpc_exec_ctx *exec_ctx, while (grpc_chttp2_list_pop_writable_stream(t, &s)) { GRPC_CHTTP2_STREAM_UNREF(exec_ctx, s, "chttp2_writing:close"); } + end_all_the_calls(exec_ctx, t, GRPC_ERROR_REF(error)); } GRPC_ERROR_UNREF(error); } @@ -555,13 +573,19 @@ static const char *write_state_name(grpc_chttp2_write_state st) { GPR_UNREACHABLE_CODE(return "UNKNOWN"); } -static void set_write_state(grpc_chttp2_transport *t, +static void set_write_state(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_write_state st, const char *reason) { GRPC_CHTTP2_IF_TRACING(gpr_log(GPR_DEBUG, "W:%p %s state %s -> %s [%s]", t, t->is_client ? "CLIENT" : "SERVER", write_state_name(t->write_state), write_state_name(st), reason)); t->write_state = st; + if (st == GRPC_CHTTP2_WRITE_STATE_IDLE && + t->close_transport_on_writes_finished != NULL) { + grpc_error *err = t->close_transport_on_writes_finished; + t->close_transport_on_writes_finished = NULL; + close_transport_locked(exec_ctx, t, err); + } } void grpc_chttp2_initiate_write(grpc_exec_ctx *exec_ctx, @@ -571,7 +595,7 @@ void grpc_chttp2_initiate_write(grpc_exec_ctx *exec_ctx, switch (t->write_state) { case GRPC_CHTTP2_WRITE_STATE_IDLE: - set_write_state(t, GRPC_CHTTP2_WRITE_STATE_WRITING, reason); + set_write_state(exec_ctx, t, GRPC_CHTTP2_WRITE_STATE_WRITING, reason); GRPC_CHTTP2_REF_TRANSPORT(t, "writing"); grpc_combiner_execute_finally(exec_ctx, t->combiner, &t->write_action_begin_locked, @@ -579,7 +603,7 @@ void grpc_chttp2_initiate_write(grpc_exec_ctx *exec_ctx, break; case GRPC_CHTTP2_WRITE_STATE_WRITING: set_write_state( - t, + exec_ctx, t, covered_by_poller ? GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE_AND_COVERED_BY_POLLER : GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE, @@ -588,7 +612,8 @@ void grpc_chttp2_initiate_write(grpc_exec_ctx *exec_ctx, case GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE: if (covered_by_poller) { set_write_state( - t, GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE_AND_COVERED_BY_POLLER, + exec_ctx, t, + GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE_AND_COVERED_BY_POLLER, reason); } break; @@ -614,10 +639,12 @@ static void write_action_begin_locked(grpc_exec_ctx *exec_ctx, void *gt, grpc_chttp2_transport *t = gt; GPR_ASSERT(t->write_state != GRPC_CHTTP2_WRITE_STATE_IDLE); if (!t->closed && grpc_chttp2_begin_write(exec_ctx, t)) { - set_write_state(t, GRPC_CHTTP2_WRITE_STATE_WRITING, "begin writing"); + set_write_state(exec_ctx, t, GRPC_CHTTP2_WRITE_STATE_WRITING, + "begin writing"); grpc_exec_ctx_sched(exec_ctx, &t->write_action, GRPC_ERROR_NONE, NULL); } else { - set_write_state(t, GRPC_CHTTP2_WRITE_STATE_IDLE, "begin writing nothing"); + set_write_state(exec_ctx, t, GRPC_CHTTP2_WRITE_STATE_IDLE, + "begin writing nothing"); GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "writing"); } GPR_TIMER_END("write_action_begin_locked", 0); @@ -645,7 +672,7 @@ static void write_action_end_locked(grpc_exec_ctx *exec_ctx, void *tp, grpc_chttp2_transport *t = tp; if (error != GRPC_ERROR_NONE) { - drop_connection(exec_ctx, t, GRPC_ERROR_REF(error)); + close_transport_locked(exec_ctx, t, GRPC_ERROR_REF(error)); } grpc_chttp2_end_write(exec_ctx, t, GRPC_ERROR_REF(error)); @@ -655,11 +682,12 @@ static void write_action_end_locked(grpc_exec_ctx *exec_ctx, void *tp, GPR_UNREACHABLE_CODE(break); case GRPC_CHTTP2_WRITE_STATE_WRITING: GPR_TIMER_MARK("state=writing", 0); - set_write_state(t, GRPC_CHTTP2_WRITE_STATE_IDLE, "finish writing"); + set_write_state(exec_ctx, t, GRPC_CHTTP2_WRITE_STATE_IDLE, + "finish writing"); break; case GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE: GPR_TIMER_MARK("state=writing_stale_no_poller", 0); - set_write_state(t, GRPC_CHTTP2_WRITE_STATE_WRITING, + set_write_state(exec_ctx, t, GRPC_CHTTP2_WRITE_STATE_WRITING, "continue writing [!covered]"); GRPC_CHTTP2_REF_TRANSPORT(t, "writing"); grpc_combiner_execute_finally(exec_ctx, t->combiner, @@ -668,7 +696,7 @@ static void write_action_end_locked(grpc_exec_ctx *exec_ctx, void *tp, break; case GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE_AND_COVERED_BY_POLLER: GPR_TIMER_MARK("state=writing_stale_with_poller", 0); - set_write_state(t, GRPC_CHTTP2_WRITE_STATE_WRITING, + set_write_state(exec_ctx, t, GRPC_CHTTP2_WRITE_STATE_WRITING, "continue writing [covered]"); GRPC_CHTTP2_REF_TRANSPORT(t, "writing"); grpc_combiner_execute_finally(exec_ctx, t->combiner, @@ -1434,8 +1462,8 @@ static void add_error(grpc_error *error, grpc_error **refs, size_t *nrefs) { ++*nrefs; } -static grpc_error *removal_error(grpc_error *extra_error, - grpc_chttp2_stream *s) { +static grpc_error *removal_error(grpc_error *extra_error, grpc_chttp2_stream *s, + const char *master_error_msg) { grpc_error *refs[3]; size_t nrefs = 0; add_error(s->read_closed_error, refs, &nrefs); @@ -1443,8 +1471,7 @@ static grpc_error *removal_error(grpc_error *extra_error, add_error(extra_error, refs, &nrefs); grpc_error *error = GRPC_ERROR_NONE; if (nrefs > 0) { - error = GRPC_ERROR_CREATE_REFERENCING("Failed due to stream removal", refs, - nrefs); + error = GRPC_ERROR_CREATE_REFERENCING(master_error_msg, refs, nrefs); } GRPC_ERROR_UNREF(extra_error); return error; @@ -1453,7 +1480,8 @@ static grpc_error *removal_error(grpc_error *extra_error, static void fail_pending_writes(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_error *error) { - error = removal_error(error, s); + error = + removal_error(error, s, "Pending writes failed due to stream closure"); s->fetching_send_message = NULL; grpc_chttp2_complete_closure_step( exec_ctx, t, s, &s->send_initial_metadata_finished, GRPC_ERROR_REF(error), @@ -1507,7 +1535,7 @@ void grpc_chttp2_mark_stream_closed(grpc_exec_ctx *exec_ctx, if (s->read_closed && s->write_closed) { if (s->id != 0) { remove_stream(exec_ctx, t, s->id, - removal_error(GRPC_ERROR_REF(error), s)); + removal_error(GRPC_ERROR_REF(error), s, "Stream removed")); } GRPC_CHTTP2_STREAM_UNREF(exec_ctx, s, "chttp2"); } @@ -1650,16 +1678,6 @@ static void end_all_the_calls(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, GRPC_ERROR_UNREF(error); } -static void drop_connection(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, - grpc_error *error) { - if (!grpc_error_get_int(error, GRPC_ERROR_INT_GRPC_STATUS, NULL)) { - error = grpc_error_set_int(error, GRPC_ERROR_INT_GRPC_STATUS, - GRPC_STATUS_UNAVAILABLE); - } - close_transport_locked(exec_ctx, t, GRPC_ERROR_REF(error)); - end_all_the_calls(exec_ctx, t, error); -} - /** update window from a settings change */ typedef struct { grpc_chttp2_transport *t; @@ -1743,6 +1761,14 @@ static void read_action_locked(grpc_exec_ctx *exec_ctx, void *tp, GRPC_ERROR_REF(error); + grpc_error *err = error; + if (err != GRPC_ERROR_NONE) { + err = grpc_error_set_int( + GRPC_ERROR_CREATE_REFERENCING("Endpoint read failed", &err, 1), + GRPC_ERROR_INT_OCCURRED_DURING_WRITE, t->write_state); + } + GPR_SWAP(grpc_error *, err, error); + GRPC_ERROR_UNREF(err); if (!t->closed) { GPR_TIMER_BEGIN("reading_action.parse", 0); size_t i = 0; @@ -1789,7 +1815,7 @@ static void read_action_locked(grpc_exec_ctx *exec_ctx, void *tp, error = GRPC_ERROR_CREATE("Transport closed"); } if (error != GRPC_ERROR_NONE) { - drop_connection(exec_ctx, t, GRPC_ERROR_REF(error)); + close_transport_locked(exec_ctx, t, GRPC_ERROR_REF(error)); t->endpoint_reading = 0; } else if (!t->closed) { keep_reading = true; diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 774fed0722..008dda8043 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -316,6 +316,10 @@ struct grpc_chttp2_transport { gpr_slice goaway_text; grpc_chttp2_write_cb *write_cb_pool; + + /* if non-NULL, close the transport with this error when writes are finished + */ + grpc_error *close_transport_on_writes_finished; }; typedef enum { @@ -509,7 +513,7 @@ extern int grpc_flowctl_trace; if (!(grpc_http_trace)) \ ; \ else \ - stmt + stmt typedef enum { GRPC_CHTTP2_FLOWCTL_MOVE, diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c index 38fd1e0960..f6bb3a0477 100644 --- a/src/core/lib/iomgr/error.c +++ b/src/core/lib/iomgr/error.c @@ -120,6 +120,8 @@ static const char *error_int_name(grpc_error_ints key) { return "http_status"; case GRPC_ERROR_INT_LIMIT: return "limit"; + case GRPC_ERROR_INT_OCCURRED_DURING_WRITE: + return "occurred_during_write"; } GPR_UNREACHABLE_CODE(return "unknown"); } @@ -144,6 +146,8 @@ static const char *error_str_name(grpc_error_strs key) { return "tsi_error"; case GRPC_ERROR_STR_FILENAME: return "filename"; + case GRPC_ERROR_STR_QUEUED_BUFFERS: + return "queued_buffers"; } GPR_UNREACHABLE_CODE(return "unknown"); } @@ -523,21 +527,25 @@ static char *fmt_time(void *p) { return out; } -static void add_errs(gpr_avl_node *n, char **s, size_t *sz, size_t *cap) { +static void add_errs(gpr_avl_node *n, char **s, size_t *sz, size_t *cap, + bool *first) { if (n == NULL) return; - add_errs(n->left, s, sz, cap); + add_errs(n->left, s, sz, cap, first); + if (!*first) append_chr(',', s, sz, cap); + *first = false; const char *e = grpc_error_string(n->value); append_str(e, s, sz, cap); grpc_error_free_string(e); - add_errs(n->right, s, sz, cap); + add_errs(n->right, s, sz, cap, first); } static char *errs_string(grpc_error *err) { char *s = NULL; size_t sz = 0; size_t cap = 0; + bool first = true; append_chr('[', &s, &sz, &cap); - add_errs(err->errs.root, &s, &sz, &cap); + add_errs(err->errs.root, &s, &sz, &cap, &first); append_chr(']', &s, &sz, &cap); append_chr(0, &s, &sz, &cap); return s; diff --git a/src/core/lib/iomgr/error.h b/src/core/lib/iomgr/error.h index ae6a6cb35e..f3f3b80a09 100644 --- a/src/core/lib/iomgr/error.h +++ b/src/core/lib/iomgr/error.h @@ -100,6 +100,8 @@ typedef enum { GRPC_ERROR_INT_HTTP_STATUS, /// context sensitive limit associated with the error GRPC_ERROR_INT_LIMIT, + /// chttp2: did the error occur while a write was in progress + GRPC_ERROR_INT_OCCURRED_DURING_WRITE, } grpc_error_ints; typedef enum { @@ -121,6 +123,8 @@ typedef enum { GRPC_ERROR_STR_TSI_ERROR, /// filename that we were trying to read/write when this error occurred GRPC_ERROR_STR_FILENAME, + /// which data was queued for writing when the error occurred + GRPC_ERROR_STR_QUEUED_BUFFERS } grpc_error_strs; typedef enum { -- cgit v1.2.3 From d8fe334d5b92ef50e44c75ac19d8dced53efc476 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Sat, 15 Oct 2016 15:25:51 -0700 Subject: s/lb-cost/lb-cost-bin --- src/core/ext/load_reporting/load_reporting.h | 2 +- src/core/lib/transport/static_metadata.c | 2 +- src/core/lib/transport/static_metadata.h | 8 ++++---- test/core/end2end/fuzzers/hpack.dictionary | 4 ++-- tools/codegen/core/gen_static_metadata.py | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/load_reporting/load_reporting.h b/src/core/ext/load_reporting/load_reporting.h index e13097654d..a157844734 100644 --- a/src/core/ext/load_reporting/load_reporting.h +++ b/src/core/ext/load_reporting/load_reporting.h @@ -51,7 +51,7 @@ * The value corresponding to this key is an opaque binary blob reported by the * backend as part of its trailing metadata containing cost information for the * call. */ -#define GRPC_LB_COST_MD_KEY "lb-cost" +#define GRPC_LB_COST_MD_KEY "lb-cost-bin" /** Identifiers for the invocation point of the users LR callback */ typedef enum grpc_load_reporting_source { diff --git a/src/core/lib/transport/static_metadata.c b/src/core/lib/transport/static_metadata.c index f019ef156a..8b22592b45 100644 --- a/src/core/lib/transport/static_metadata.c +++ b/src/core/lib/transport/static_metadata.c @@ -126,7 +126,7 @@ const char *const grpc_static_metadata_strings[GRPC_STATIC_MDSTR_COUNT] = { "if-range", "if-unmodified-since", "last-modified", - "lb-cost", + "lb-cost-bin", "lb-token", "link", "location", diff --git a/src/core/lib/transport/static_metadata.h b/src/core/lib/transport/static_metadata.h index e0a8196419..28ad6f2961 100644 --- a/src/core/lib/transport/static_metadata.h +++ b/src/core/lib/transport/static_metadata.h @@ -175,8 +175,8 @@ extern grpc_mdstr grpc_static_mdstr_table[GRPC_STATIC_MDSTR_COUNT]; #define GRPC_MDSTR_IF_UNMODIFIED_SINCE (&grpc_static_mdstr_table[62]) /* "last-modified" */ #define GRPC_MDSTR_LAST_MODIFIED (&grpc_static_mdstr_table[63]) -/* "lb-cost" */ -#define GRPC_MDSTR_LB_COST (&grpc_static_mdstr_table[64]) +/* "lb-cost-bin" */ +#define GRPC_MDSTR_LB_COST_BIN (&grpc_static_mdstr_table[64]) /* "lb-token" */ #define GRPC_MDSTR_LB_TOKEN (&grpc_static_mdstr_table[65]) /* "link" */ @@ -337,8 +337,8 @@ extern uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT]; #define GRPC_MDELEM_IF_UNMODIFIED_SINCE_EMPTY (&grpc_static_mdelem_table[44]) /* "last-modified": "" */ #define GRPC_MDELEM_LAST_MODIFIED_EMPTY (&grpc_static_mdelem_table[45]) -/* "lb-cost": "" */ -#define GRPC_MDELEM_LB_COST_EMPTY (&grpc_static_mdelem_table[46]) +/* "lb-cost-bin": "" */ +#define GRPC_MDELEM_LB_COST_BIN_EMPTY (&grpc_static_mdelem_table[46]) /* "lb-token": "" */ #define GRPC_MDELEM_LB_TOKEN_EMPTY (&grpc_static_mdelem_table[47]) /* "link": "" */ diff --git a/test/core/end2end/fuzzers/hpack.dictionary b/test/core/end2end/fuzzers/hpack.dictionary index 181bbe845e..12db0ff024 100644 --- a/test/core/end2end/fuzzers/hpack.dictionary +++ b/test/core/end2end/fuzzers/hpack.dictionary @@ -63,7 +63,7 @@ "\x08if-range" "\x13if-unmodified-since" "\x0Dlast-modified" -"\x07lb-cost" +"\x0Blb-cost-bin" "\x08lb-token" "\x04link" "\x08location" @@ -138,7 +138,7 @@ "\x00\x08if-range\x00" "\x00\x13if-unmodified-since\x00" "\x00\x0Dlast-modified\x00" -"\x00\x07lb-cost\x00" +"\x00\x0Blb-cost-bin\x00" "\x00\x08lb-token\x00" "\x00\x04link\x00" "\x00\x08location\x00" diff --git a/tools/codegen/core/gen_static_metadata.py b/tools/codegen/core/gen_static_metadata.py index 6f8cad279c..cf3762dbb8 100755 --- a/tools/codegen/core/gen_static_metadata.py +++ b/tools/codegen/core/gen_static_metadata.py @@ -110,7 +110,7 @@ CONFIG = [ ('if-unmodified-since', ''), ('last-modified', ''), ('lb-token', ''), - ('lb-cost', ''), + ('lb-cost-bin', ''), ('link', ''), ('location', ''), ('max-forwards', ''), -- cgit v1.2.3 From 1409dbf5efaf5e9eb9d98e6eefeac460ee3ca2d4 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 17 Oct 2016 13:11:53 -0700 Subject: Better debug strings --- src/core/lib/transport/transport_op_string.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/transport/transport_op_string.c b/src/core/lib/transport/transport_op_string.c index f350e55b34..533ec52077 100644 --- a/src/core/lib/transport/transport_op_string.c +++ b/src/core/lib/transport/transport_op_string.c @@ -73,56 +73,51 @@ static void put_metadata_list(gpr_strvec *b, grpc_metadata_batch md) { char *grpc_transport_stream_op_string(grpc_transport_stream_op *op) { char *tmp; char *out; - bool first = true; gpr_strvec b; gpr_strvec_init(&b); + gpr_strvec_add( + &b, gpr_strdup(op->covered_by_poller ? "[COVERED]" : "[UNCOVERED]")); + if (op->send_initial_metadata != NULL) { - if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); - first = false; + gpr_strvec_add(&b, gpr_strdup(" ")); gpr_strvec_add(&b, gpr_strdup("SEND_INITIAL_METADATA{")); put_metadata_list(&b, *op->send_initial_metadata); gpr_strvec_add(&b, gpr_strdup("}")); } if (op->send_message != NULL) { - if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); - first = false; + gpr_strvec_add(&b, gpr_strdup(" ")); gpr_asprintf(&tmp, "SEND_MESSAGE:flags=0x%08x:len=%d", op->send_message->flags, op->send_message->length); gpr_strvec_add(&b, tmp); } if (op->send_trailing_metadata != NULL) { - if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); - first = false; + gpr_strvec_add(&b, gpr_strdup(" ")); gpr_strvec_add(&b, gpr_strdup("SEND_TRAILING_METADATA{")); put_metadata_list(&b, *op->send_trailing_metadata); gpr_strvec_add(&b, gpr_strdup("}")); } if (op->recv_initial_metadata != NULL) { - if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); - first = false; + gpr_strvec_add(&b, gpr_strdup(" ")); gpr_strvec_add(&b, gpr_strdup("RECV_INITIAL_METADATA")); } if (op->recv_message != NULL) { - if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); - first = false; + gpr_strvec_add(&b, gpr_strdup(" ")); gpr_strvec_add(&b, gpr_strdup("RECV_MESSAGE")); } if (op->recv_trailing_metadata != NULL) { - if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); - first = false; + gpr_strvec_add(&b, gpr_strdup(" ")); gpr_strvec_add(&b, gpr_strdup("RECV_TRAILING_METADATA")); } if (op->cancel_error != GRPC_ERROR_NONE) { - if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); - first = false; + gpr_strvec_add(&b, gpr_strdup(" ")); const char *msg = grpc_error_string(op->cancel_error); gpr_asprintf(&tmp, "CANCEL:%s", msg); grpc_error_free_string(msg); @@ -130,8 +125,7 @@ char *grpc_transport_stream_op_string(grpc_transport_stream_op *op) { } if (op->close_error != GRPC_ERROR_NONE) { - if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); - first = false; + gpr_strvec_add(&b, gpr_strdup(" ")); const char *msg = grpc_error_string(op->close_error); gpr_asprintf(&tmp, "CLOSE:%s", msg); grpc_error_free_string(msg); -- cgit v1.2.3 From 20afa3d7c933207c548ed11928c47b552b5b2f80 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 17 Oct 2016 14:52:14 -0700 Subject: BufferPool --> ResourceQuota --- BUILD | 24 +- CMakeLists.txt | 14 +- Makefile | 92 +-- binding.gyp | 2 +- build.yaml | 30 +- config.m4 | 2 +- gRPC-Core.podspec | 6 +- grpc.def | 10 +- grpc.gemspec | 4 +- include/grpc++/buffer_pool.h | 70 -- include/grpc++/resource_quota.h | 70 ++ include/grpc++/server_builder.h | 8 +- include/grpc++/support/channel_arguments.h | 4 +- include/grpc/grpc.h | 15 +- include/grpc/impl/codegen/grpc_types.h | 7 +- package.xml | 4 +- .../chttp2/server/insecure/server_chttp2_posix.c | 8 +- .../transport/chttp2/transport/chttp2_transport.c | 26 +- src/core/lib/http/httpcli.c | 20 +- src/core/lib/http/httpcli.h | 4 +- src/core/lib/iomgr/buffer_pool.c | 684 ----------------- src/core/lib/iomgr/buffer_pool.h | 128 ---- src/core/lib/iomgr/endpoint.c | 4 +- src/core/lib/iomgr/endpoint.h | 6 +- src/core/lib/iomgr/endpoint_pair.h | 2 +- src/core/lib/iomgr/endpoint_pair_posix.c | 6 +- src/core/lib/iomgr/resource_quota.c | 684 +++++++++++++++++ src/core/lib/iomgr/resource_quota.h | 131 ++++ src/core/lib/iomgr/tcp_client_posix.c | 10 +- src/core/lib/iomgr/tcp_posix.c | 42 +- src/core/lib/iomgr/tcp_posix.h | 2 +- src/core/lib/iomgr/tcp_server_posix.c | 18 +- .../google_default/google_default_credentials.c | 8 +- .../lib/security/credentials/jwt/jwt_verifier.c | 16 +- .../credentials/oauth2/oauth2_credentials.c | 18 +- src/core/lib/security/transport/secure_endpoint.c | 6 +- src/core/lib/surface/init.c | 4 +- src/cpp/common/buffer_pool_cc.cc | 51 -- src/cpp/common/channel_arguments.cc | 8 +- src/cpp/common/resource_quota_cc.cc | 51 ++ src/cpp/server/server_builder.cc | 26 +- src/proto/grpc/testing/control.proto | 2 +- src/python/grpcio/grpc_core_dependencies.py | 2 +- src/ruby/ext/grpc/rb_grpc_imports.generated.c | 20 +- src/ruby/ext/grpc/rb_grpc_imports.generated.h | 30 +- test/core/bad_client/bad_client.c | 6 +- test/core/end2end/end2end_nosec_tests.c | 16 +- test/core/end2end/end2end_tests.c | 16 +- test/core/end2end/fixtures/h2_sockpair+trace.c | 6 +- test/core/end2end/fixtures/h2_sockpair.c | 6 +- test/core/end2end/fixtures/h2_sockpair_1byte.c | 6 +- test/core/end2end/fuzzers/api_fuzzer.c | 10 +- test/core/end2end/fuzzers/client_fuzzer.c | 6 +- test/core/end2end/fuzzers/server_fuzzer.c | 6 +- test/core/end2end/gen_build_yaml.py | 2 +- test/core/end2end/tests/buffer_pool_server.c | 17 +- test/core/end2end/tests/resource_quota_server.c | 352 +++++++++ test/core/http/httpcli_test.c | 12 +- test/core/http/httpscli_test.c | 12 +- test/core/internal_api_canaries/iomgr.c | 2 +- test/core/iomgr/buffer_pool_test.c | 735 ------------------ test/core/iomgr/endpoint_pair_test.c | 6 +- test/core/iomgr/fd_conservation_posix_test.c | 8 +- test/core/iomgr/resource_quota_test.c | 743 ++++++++++++++++++ test/core/iomgr/tcp_posix_test.c | 37 +- test/core/security/secure_endpoint_test.c | 8 +- test/core/util/mock_endpoint.c | 18 +- test/core/util/mock_endpoint.h | 2 +- test/core/util/passthru_endpoint.c | 20 +- test/core/util/passthru_endpoint.h | 2 +- test/core/util/port_server_client.c | 24 +- test/cpp/end2end/end2end_test.cc | 15 +- test/cpp/qps/server_async.cc | 8 +- test/cpp/qps/server_sync.cc | 8 +- tools/doxygen/Doxyfile.c++ | 2 +- tools/doxygen/Doxyfile.c++.internal | 4 +- tools/doxygen/Doxyfile.core.internal | 4 +- tools/run_tests/performance/scenario_config.py | 10 +- tools/run_tests/sources_and_headers.json | 50 +- tools/run_tests/tests.json | 848 ++++++++++----------- vsprojects/buildtests_c.sln | 54 +- vsprojects/vcxproj/grpc++/grpc++.vcxproj | 6 +- vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters | 12 +- .../grpc++_unsecure/grpc++_unsecure.vcxproj | 6 +- .../grpc++_unsecure.vcxproj.filters | 12 +- vsprojects/vcxproj/grpc/grpc.vcxproj | 6 +- vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 12 +- .../vcxproj/grpc_test_util/grpc_test_util.vcxproj | 6 +- .../grpc_test_util/grpc_test_util.vcxproj.filters | 12 +- .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 6 +- .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 12 +- .../test/buffer_pool_test/buffer_pool_test.vcxproj | 199 ----- .../buffer_pool_test.vcxproj.filters | 21 - .../end2end_nosec_tests.vcxproj | 4 +- .../end2end_nosec_tests.vcxproj.filters | 6 +- .../tests/end2end_tests/end2end_tests.vcxproj | 4 +- .../end2end_tests/end2end_tests.vcxproj.filters | 6 +- .../resource_quota_test.vcxproj | 199 +++++ .../resource_quota_test.vcxproj.filters | 21 + 99 files changed, 3191 insertions(+), 2819 deletions(-) delete mode 100644 include/grpc++/buffer_pool.h create mode 100644 include/grpc++/resource_quota.h delete mode 100644 src/core/lib/iomgr/buffer_pool.c delete mode 100644 src/core/lib/iomgr/buffer_pool.h create mode 100644 src/core/lib/iomgr/resource_quota.c create mode 100644 src/core/lib/iomgr/resource_quota.h delete mode 100644 src/cpp/common/buffer_pool_cc.cc create mode 100644 src/cpp/common/resource_quota_cc.cc create mode 100644 test/core/end2end/tests/resource_quota_server.c delete mode 100644 test/core/iomgr/buffer_pool_test.c create mode 100644 test/core/iomgr/resource_quota_test.c delete mode 100644 vsprojects/vcxproj/test/buffer_pool_test/buffer_pool_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/buffer_pool_test/buffer_pool_test.vcxproj.filters create mode 100644 vsprojects/vcxproj/test/resource_quota_test/resource_quota_test.vcxproj create mode 100644 vsprojects/vcxproj/test/resource_quota_test/resource_quota_test.vcxproj.filters (limited to 'src/core/lib') diff --git a/BUILD b/BUILD index 2604060414..4f8bed11b6 100644 --- a/BUILD +++ b/BUILD @@ -179,7 +179,6 @@ cc_library( "src/core/lib/http/format_request.h", "src/core/lib/http/httpcli.h", "src/core/lib/http/parser.h", - "src/core/lib/iomgr/buffer_pool.h", "src/core/lib/iomgr/closure.h", "src/core/lib/iomgr/combiner.h", "src/core/lib/iomgr/endpoint.h", @@ -203,6 +202,7 @@ cc_library( "src/core/lib/iomgr/pollset_set_windows.h", "src/core/lib/iomgr/pollset_windows.h", "src/core/lib/iomgr/resolve_address.h", + "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.h", @@ -341,7 +341,6 @@ cc_library( "src/core/lib/http/format_request.c", "src/core/lib/http/httpcli.c", "src/core/lib/http/parser.c", - "src/core/lib/iomgr/buffer_pool.c", "src/core/lib/iomgr/closure.c", "src/core/lib/iomgr/combiner.c", "src/core/lib/iomgr/endpoint.c", @@ -365,6 +364,7 @@ cc_library( "src/core/lib/iomgr/pollset_windows.c", "src/core/lib/iomgr/resolve_address_posix.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_utils_common_posix.c", "src/core/lib/iomgr/socket_utils_linux.c", @@ -583,7 +583,6 @@ cc_library( "src/core/lib/http/format_request.h", "src/core/lib/http/httpcli.h", "src/core/lib/http/parser.h", - "src/core/lib/iomgr/buffer_pool.h", "src/core/lib/iomgr/closure.h", "src/core/lib/iomgr/combiner.h", "src/core/lib/iomgr/endpoint.h", @@ -607,6 +606,7 @@ cc_library( "src/core/lib/iomgr/pollset_set_windows.h", "src/core/lib/iomgr/pollset_windows.h", "src/core/lib/iomgr/resolve_address.h", + "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.h", @@ -730,7 +730,6 @@ cc_library( "src/core/lib/http/format_request.c", "src/core/lib/http/httpcli.c", "src/core/lib/http/parser.c", - "src/core/lib/iomgr/buffer_pool.c", "src/core/lib/iomgr/closure.c", "src/core/lib/iomgr/combiner.c", "src/core/lib/iomgr/endpoint.c", @@ -754,6 +753,7 @@ cc_library( "src/core/lib/iomgr/pollset_windows.c", "src/core/lib/iomgr/resolve_address_posix.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_utils_common_posix.c", "src/core/lib/iomgr/socket_utils_linux.c", @@ -942,7 +942,6 @@ cc_library( "src/core/lib/http/format_request.h", "src/core/lib/http/httpcli.h", "src/core/lib/http/parser.h", - "src/core/lib/iomgr/buffer_pool.h", "src/core/lib/iomgr/closure.h", "src/core/lib/iomgr/combiner.h", "src/core/lib/iomgr/endpoint.h", @@ -966,6 +965,7 @@ cc_library( "src/core/lib/iomgr/pollset_set_windows.h", "src/core/lib/iomgr/pollset_windows.h", "src/core/lib/iomgr/resolve_address.h", + "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.h", @@ -1081,7 +1081,6 @@ cc_library( "src/core/lib/http/format_request.c", "src/core/lib/http/httpcli.c", "src/core/lib/http/parser.c", - "src/core/lib/iomgr/buffer_pool.c", "src/core/lib/iomgr/closure.c", "src/core/lib/iomgr/combiner.c", "src/core/lib/iomgr/endpoint.c", @@ -1105,6 +1104,7 @@ cc_library( "src/core/lib/iomgr/pollset_windows.c", "src/core/lib/iomgr/resolve_address_posix.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_utils_common_posix.c", "src/core/lib/iomgr/socket_utils_linux.c", @@ -1296,11 +1296,11 @@ cc_library( "src/cpp/client/create_channel_posix.cc", "src/cpp/client/credentials_cc.cc", "src/cpp/client/generic_stub.cc", - "src/cpp/common/buffer_pool_cc.cc", "src/cpp/common/channel_arguments.cc", "src/cpp/common/channel_filter.cc", "src/cpp/common/completion_queue_cc.cc", "src/cpp/common/core_codegen.cc", + "src/cpp/common/resource_quota_cc.cc", "src/cpp/common/rpc_method.cc", "src/cpp/server/async_generic_service.cc", "src/cpp/server/create_default_thread_pool.cc", @@ -1319,7 +1319,6 @@ cc_library( ], hdrs = [ "include/grpc++/alarm.h", - "include/grpc++/buffer_pool.h", "include/grpc++/channel.h", "include/grpc++/client_context.h", "include/grpc++/completion_queue.h", @@ -1346,6 +1345,7 @@ cc_library( "include/grpc++/impl/thd.h", "include/grpc++/impl/thd_cxx11.h", "include/grpc++/impl/thd_no_cxx11.h", + "include/grpc++/resource_quota.h", "include/grpc++/security/auth_context.h", "include/grpc++/security/auth_metadata_processor.h", "include/grpc++/security/credentials.h", @@ -1520,11 +1520,11 @@ cc_library( "src/cpp/client/create_channel_posix.cc", "src/cpp/client/credentials_cc.cc", "src/cpp/client/generic_stub.cc", - "src/cpp/common/buffer_pool_cc.cc", "src/cpp/common/channel_arguments.cc", "src/cpp/common/channel_filter.cc", "src/cpp/common/completion_queue_cc.cc", "src/cpp/common/core_codegen.cc", + "src/cpp/common/resource_quota_cc.cc", "src/cpp/common/rpc_method.cc", "src/cpp/server/async_generic_service.cc", "src/cpp/server/create_default_thread_pool.cc", @@ -1543,7 +1543,6 @@ cc_library( ], hdrs = [ "include/grpc++/alarm.h", - "include/grpc++/buffer_pool.h", "include/grpc++/channel.h", "include/grpc++/client_context.h", "include/grpc++/completion_queue.h", @@ -1570,6 +1569,7 @@ cc_library( "include/grpc++/impl/thd.h", "include/grpc++/impl/thd_cxx11.h", "include/grpc++/impl/thd_no_cxx11.h", + "include/grpc++/resource_quota.h", "include/grpc++/security/auth_context.h", "include/grpc++/security/auth_metadata_processor.h", "include/grpc++/security/credentials.h", @@ -1849,7 +1849,6 @@ objc_library( "src/core/lib/http/format_request.c", "src/core/lib/http/httpcli.c", "src/core/lib/http/parser.c", - "src/core/lib/iomgr/buffer_pool.c", "src/core/lib/iomgr/closure.c", "src/core/lib/iomgr/combiner.c", "src/core/lib/iomgr/endpoint.c", @@ -1873,6 +1872,7 @@ objc_library( "src/core/lib/iomgr/pollset_windows.c", "src/core/lib/iomgr/resolve_address_posix.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_utils_common_posix.c", "src/core/lib/iomgr/socket_utils_linux.c", @@ -2070,7 +2070,6 @@ objc_library( "src/core/lib/http/format_request.h", "src/core/lib/http/httpcli.h", "src/core/lib/http/parser.h", - "src/core/lib/iomgr/buffer_pool.h", "src/core/lib/iomgr/closure.h", "src/core/lib/iomgr/combiner.h", "src/core/lib/iomgr/endpoint.h", @@ -2094,6 +2093,7 @@ objc_library( "src/core/lib/iomgr/pollset_set_windows.h", "src/core/lib/iomgr/pollset_windows.h", "src/core/lib/iomgr/resolve_address.h", + "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.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 59b661101e..203c7d70f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -306,7 +306,6 @@ add_library(grpc src/core/lib/http/format_request.c src/core/lib/http/httpcli.c src/core/lib/http/parser.c - src/core/lib/iomgr/buffer_pool.c src/core/lib/iomgr/closure.c src/core/lib/iomgr/combiner.c src/core/lib/iomgr/endpoint.c @@ -330,6 +329,7 @@ add_library(grpc src/core/lib/iomgr/pollset_windows.c src/core/lib/iomgr/resolve_address_posix.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_utils_common_posix.c src/core/lib/iomgr/socket_utils_linux.c @@ -566,7 +566,6 @@ add_library(grpc_cronet src/core/lib/http/format_request.c src/core/lib/http/httpcli.c src/core/lib/http/parser.c - src/core/lib/iomgr/buffer_pool.c src/core/lib/iomgr/closure.c src/core/lib/iomgr/combiner.c src/core/lib/iomgr/endpoint.c @@ -590,6 +589,7 @@ add_library(grpc_cronet src/core/lib/iomgr/pollset_windows.c src/core/lib/iomgr/resolve_address_posix.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_utils_common_posix.c src/core/lib/iomgr/socket_utils_linux.c @@ -798,7 +798,6 @@ add_library(grpc_unsecure src/core/lib/http/format_request.c src/core/lib/http/httpcli.c src/core/lib/http/parser.c - src/core/lib/iomgr/buffer_pool.c src/core/lib/iomgr/closure.c src/core/lib/iomgr/combiner.c src/core/lib/iomgr/endpoint.c @@ -822,6 +821,7 @@ add_library(grpc_unsecure src/core/lib/iomgr/pollset_windows.c src/core/lib/iomgr/resolve_address_posix.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_utils_common_posix.c src/core/lib/iomgr/socket_utils_linux.c @@ -1023,11 +1023,11 @@ add_library(grpc++ src/cpp/client/create_channel_posix.cc src/cpp/client/credentials_cc.cc src/cpp/client/generic_stub.cc - src/cpp/common/buffer_pool_cc.cc src/cpp/common/channel_arguments.cc src/cpp/common/channel_filter.cc src/cpp/common/completion_queue_cc.cc src/cpp/common/core_codegen.cc + src/cpp/common/resource_quota_cc.cc src/cpp/common/rpc_method.cc src/cpp/server/async_generic_service.cc src/cpp/server/create_default_thread_pool.cc @@ -1063,7 +1063,6 @@ target_link_libraries(grpc++ foreach(_hdr include/grpc++/alarm.h - include/grpc++/buffer_pool.h include/grpc++/channel.h include/grpc++/client_context.h include/grpc++/completion_queue.h @@ -1090,6 +1089,7 @@ foreach(_hdr include/grpc++/impl/thd.h include/grpc++/impl/thd_cxx11.h include/grpc++/impl/thd_no_cxx11.h + include/grpc++/resource_quota.h include/grpc++/security/auth_context.h include/grpc++/security/auth_metadata_processor.h include/grpc++/security/credentials.h @@ -1279,11 +1279,11 @@ add_library(grpc++_unsecure src/cpp/client/create_channel_posix.cc src/cpp/client/credentials_cc.cc src/cpp/client/generic_stub.cc - src/cpp/common/buffer_pool_cc.cc src/cpp/common/channel_arguments.cc src/cpp/common/channel_filter.cc src/cpp/common/completion_queue_cc.cc src/cpp/common/core_codegen.cc + src/cpp/common/resource_quota_cc.cc src/cpp/common/rpc_method.cc src/cpp/server/async_generic_service.cc src/cpp/server/create_default_thread_pool.cc @@ -1319,7 +1319,6 @@ target_link_libraries(grpc++_unsecure foreach(_hdr include/grpc++/alarm.h - include/grpc++/buffer_pool.h include/grpc++/channel.h include/grpc++/client_context.h include/grpc++/completion_queue.h @@ -1346,6 +1345,7 @@ foreach(_hdr include/grpc++/impl/thd.h include/grpc++/impl/thd_cxx11.h include/grpc++/impl/thd_no_cxx11.h + include/grpc++/resource_quota.h include/grpc++/security/auth_context.h include/grpc++/security/auth_metadata_processor.h include/grpc++/security/credentials.h diff --git a/Makefile b/Makefile index a274642a7a..8fea5859f6 100644 --- a/Makefile +++ b/Makefile @@ -907,7 +907,6 @@ api_fuzzer: $(BINDIR)/$(CONFIG)/api_fuzzer bad_server_response_test: $(BINDIR)/$(CONFIG)/bad_server_response_test bin_decoder_test: $(BINDIR)/$(CONFIG)/bin_decoder_test bin_encoder_test: $(BINDIR)/$(CONFIG)/bin_encoder_test -buffer_pool_test: $(BINDIR)/$(CONFIG)/buffer_pool_test census_context_test: $(BINDIR)/$(CONFIG)/census_context_test census_resource_test: $(BINDIR)/$(CONFIG)/census_resource_test census_trace_context_test: $(BINDIR)/$(CONFIG)/census_trace_context_test @@ -1003,6 +1002,7 @@ no_server_test: $(BINDIR)/$(CONFIG)/no_server_test percent_decode_fuzzer: $(BINDIR)/$(CONFIG)/percent_decode_fuzzer percent_encode_fuzzer: $(BINDIR)/$(CONFIG)/percent_encode_fuzzer resolve_address_test: $(BINDIR)/$(CONFIG)/resolve_address_test +resource_quota_test: $(BINDIR)/$(CONFIG)/resource_quota_test secure_channel_create_test: $(BINDIR)/$(CONFIG)/secure_channel_create_test secure_endpoint_test: $(BINDIR)/$(CONFIG)/secure_endpoint_test sequential_connectivity_test: $(BINDIR)/$(CONFIG)/sequential_connectivity_test @@ -1242,7 +1242,6 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/bad_server_response_test \ $(BINDIR)/$(CONFIG)/bin_decoder_test \ $(BINDIR)/$(CONFIG)/bin_encoder_test \ - $(BINDIR)/$(CONFIG)/buffer_pool_test \ $(BINDIR)/$(CONFIG)/census_context_test \ $(BINDIR)/$(CONFIG)/census_resource_test \ $(BINDIR)/$(CONFIG)/census_trace_context_test \ @@ -1322,6 +1321,7 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/murmur_hash_test \ $(BINDIR)/$(CONFIG)/no_server_test \ $(BINDIR)/$(CONFIG)/resolve_address_test \ + $(BINDIR)/$(CONFIG)/resource_quota_test \ $(BINDIR)/$(CONFIG)/secure_channel_create_test \ $(BINDIR)/$(CONFIG)/secure_endpoint_test \ $(BINDIR)/$(CONFIG)/sequential_connectivity_test \ @@ -1560,8 +1560,6 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/bin_decoder_test || ( echo test bin_decoder_test failed ; exit 1 ) $(E) "[RUN] Testing bin_encoder_test" $(Q) $(BINDIR)/$(CONFIG)/bin_encoder_test || ( echo test bin_encoder_test failed ; exit 1 ) - $(E) "[RUN] Testing buffer_pool_test" - $(Q) $(BINDIR)/$(CONFIG)/buffer_pool_test || ( echo test buffer_pool_test failed ; exit 1 ) $(E) "[RUN] Testing census_context_test" $(Q) $(BINDIR)/$(CONFIG)/census_context_test || ( echo test census_context_test failed ; exit 1 ) $(E) "[RUN] Testing census_resource_test" @@ -1702,6 +1700,8 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/no_server_test || ( echo test no_server_test failed ; exit 1 ) $(E) "[RUN] Testing resolve_address_test" $(Q) $(BINDIR)/$(CONFIG)/resolve_address_test || ( echo test resolve_address_test failed ; exit 1 ) + $(E) "[RUN] Testing resource_quota_test" + $(Q) $(BINDIR)/$(CONFIG)/resource_quota_test || ( echo test resource_quota_test failed ; exit 1 ) $(E) "[RUN] Testing secure_channel_create_test" $(Q) $(BINDIR)/$(CONFIG)/secure_channel_create_test || ( echo test secure_channel_create_test failed ; exit 1 ) $(E) "[RUN] Testing secure_endpoint_test" @@ -2558,7 +2558,6 @@ LIBGRPC_SRC = \ src/core/lib/http/format_request.c \ src/core/lib/http/httpcli.c \ src/core/lib/http/parser.c \ - src/core/lib/iomgr/buffer_pool.c \ src/core/lib/iomgr/closure.c \ src/core/lib/iomgr/combiner.c \ src/core/lib/iomgr/endpoint.c \ @@ -2582,6 +2581,7 @@ LIBGRPC_SRC = \ src/core/lib/iomgr/pollset_windows.c \ src/core/lib/iomgr/resolve_address_posix.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_utils_common_posix.c \ src/core/lib/iomgr/socket_utils_linux.c \ @@ -2836,7 +2836,6 @@ LIBGRPC_CRONET_SRC = \ src/core/lib/http/format_request.c \ src/core/lib/http/httpcli.c \ src/core/lib/http/parser.c \ - src/core/lib/iomgr/buffer_pool.c \ src/core/lib/iomgr/closure.c \ src/core/lib/iomgr/combiner.c \ src/core/lib/iomgr/endpoint.c \ @@ -2860,6 +2859,7 @@ LIBGRPC_CRONET_SRC = \ src/core/lib/iomgr/pollset_windows.c \ src/core/lib/iomgr/resolve_address_posix.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_utils_common_posix.c \ src/core/lib/iomgr/socket_utils_linux.c \ @@ -3104,7 +3104,6 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/lib/http/format_request.c \ src/core/lib/http/httpcli.c \ src/core/lib/http/parser.c \ - src/core/lib/iomgr/buffer_pool.c \ src/core/lib/iomgr/closure.c \ src/core/lib/iomgr/combiner.c \ src/core/lib/iomgr/endpoint.c \ @@ -3128,6 +3127,7 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/lib/iomgr/pollset_windows.c \ src/core/lib/iomgr/resolve_address_posix.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_utils_common_posix.c \ src/core/lib/iomgr/socket_utils_linux.c \ @@ -3299,7 +3299,6 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/http/format_request.c \ src/core/lib/http/httpcli.c \ src/core/lib/http/parser.c \ - src/core/lib/iomgr/buffer_pool.c \ src/core/lib/iomgr/closure.c \ src/core/lib/iomgr/combiner.c \ src/core/lib/iomgr/endpoint.c \ @@ -3323,6 +3322,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/iomgr/pollset_windows.c \ src/core/lib/iomgr/resolve_address_posix.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_utils_common_posix.c \ src/core/lib/iomgr/socket_utils_linux.c \ @@ -3607,11 +3607,11 @@ LIBGRPC++_SRC = \ src/cpp/client/create_channel_posix.cc \ src/cpp/client/credentials_cc.cc \ src/cpp/client/generic_stub.cc \ - src/cpp/common/buffer_pool_cc.cc \ src/cpp/common/channel_arguments.cc \ src/cpp/common/channel_filter.cc \ src/cpp/common/completion_queue_cc.cc \ src/cpp/common/core_codegen.cc \ + src/cpp/common/resource_quota_cc.cc \ src/cpp/common/rpc_method.cc \ src/cpp/server/async_generic_service.cc \ src/cpp/server/create_default_thread_pool.cc \ @@ -3630,7 +3630,6 @@ LIBGRPC++_SRC = \ PUBLIC_HEADERS_CXX += \ include/grpc++/alarm.h \ - include/grpc++/buffer_pool.h \ include/grpc++/channel.h \ include/grpc++/client_context.h \ include/grpc++/completion_queue.h \ @@ -3657,6 +3656,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/impl/thd.h \ include/grpc++/impl/thd_cxx11.h \ include/grpc++/impl/thd_no_cxx11.h \ + include/grpc++/resource_quota.h \ include/grpc++/security/auth_context.h \ include/grpc++/security/auth_metadata_processor.h \ include/grpc++/security/credentials.h \ @@ -4139,11 +4139,11 @@ LIBGRPC++_UNSECURE_SRC = \ src/cpp/client/create_channel_posix.cc \ src/cpp/client/credentials_cc.cc \ src/cpp/client/generic_stub.cc \ - src/cpp/common/buffer_pool_cc.cc \ src/cpp/common/channel_arguments.cc \ src/cpp/common/channel_filter.cc \ src/cpp/common/completion_queue_cc.cc \ src/cpp/common/core_codegen.cc \ + src/cpp/common/resource_quota_cc.cc \ src/cpp/common/rpc_method.cc \ src/cpp/server/async_generic_service.cc \ src/cpp/server/create_default_thread_pool.cc \ @@ -4162,7 +4162,6 @@ LIBGRPC++_UNSECURE_SRC = \ PUBLIC_HEADERS_CXX += \ include/grpc++/alarm.h \ - include/grpc++/buffer_pool.h \ include/grpc++/channel.h \ include/grpc++/client_context.h \ include/grpc++/completion_queue.h \ @@ -4189,6 +4188,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/impl/thd.h \ include/grpc++/impl/thd_cxx11.h \ include/grpc++/impl/thd_no_cxx11.h \ + include/grpc++/resource_quota.h \ include/grpc++/security/auth_context.h \ include/grpc++/security/auth_metadata_processor.h \ include/grpc++/security/credentials.h \ @@ -6590,7 +6590,6 @@ LIBEND2END_TESTS_SRC = \ test/core/end2end/end2end_tests.c \ test/core/end2end/tests/bad_hostname.c \ test/core/end2end/tests/binary_metadata.c \ - test/core/end2end/tests/buffer_pool_server.c \ test/core/end2end/tests/call_creds.c \ test/core/end2end/tests/cancel_after_accept.c \ test/core/end2end/tests/cancel_after_client_done.c \ @@ -6624,6 +6623,7 @@ LIBEND2END_TESTS_SRC = \ test/core/end2end/tests/registered_call.c \ test/core/end2end/tests/request_with_flags.c \ test/core/end2end/tests/request_with_payload.c \ + test/core/end2end/tests/resource_quota_server.c \ test/core/end2end/tests/server_finishes_request.c \ test/core/end2end/tests/shutdown_finishes_calls.c \ test/core/end2end/tests/shutdown_finishes_tags.c \ @@ -6674,7 +6674,6 @@ LIBEND2END_NOSEC_TESTS_SRC = \ test/core/end2end/end2end_nosec_tests.c \ test/core/end2end/tests/bad_hostname.c \ test/core/end2end/tests/binary_metadata.c \ - test/core/end2end/tests/buffer_pool_server.c \ test/core/end2end/tests/cancel_after_accept.c \ test/core/end2end/tests/cancel_after_client_done.c \ test/core/end2end/tests/cancel_after_invoke.c \ @@ -6707,6 +6706,7 @@ LIBEND2END_NOSEC_TESTS_SRC = \ test/core/end2end/tests/registered_call.c \ test/core/end2end/tests/request_with_flags.c \ test/core/end2end/tests/request_with_payload.c \ + test/core/end2end/tests/resource_quota_server.c \ test/core/end2end/tests/server_finishes_request.c \ test/core/end2end/tests/shutdown_finishes_calls.c \ test/core/end2end/tests/shutdown_finishes_tags.c \ @@ -6999,38 +6999,6 @@ endif endif -BUFFER_POOL_TEST_SRC = \ - test/core/iomgr/buffer_pool_test.c \ - -BUFFER_POOL_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(BUFFER_POOL_TEST_SRC)))) -ifeq ($(NO_SECURE),true) - -# You can't build secure targets if you don't have OpenSSL. - -$(BINDIR)/$(CONFIG)/buffer_pool_test: openssl_dep_error - -else - - - -$(BINDIR)/$(CONFIG)/buffer_pool_test: $(BUFFER_POOL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a - $(E) "[LD] Linking $@" - $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(BUFFER_POOL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/buffer_pool_test - -endif - -$(OBJDIR)/$(CONFIG)/test/core/iomgr/buffer_pool_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a - -deps_buffer_pool_test: $(BUFFER_POOL_TEST_OBJS:.o=.dep) - -ifneq ($(NO_SECURE),true) -ifneq ($(NO_DEPS),true) --include $(BUFFER_POOL_TEST_OBJS:.o=.dep) -endif -endif - - CENSUS_CONTEXT_TEST_SRC = \ test/core/census/context_test.c \ @@ -10071,6 +10039,38 @@ endif endif +RESOURCE_QUOTA_TEST_SRC = \ + test/core/iomgr/resource_quota_test.c \ + +RESOURCE_QUOTA_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(RESOURCE_QUOTA_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/resource_quota_test: openssl_dep_error + +else + + + +$(BINDIR)/$(CONFIG)/resource_quota_test: $(RESOURCE_QUOTA_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(RESOURCE_QUOTA_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/resource_quota_test + +endif + +$(OBJDIR)/$(CONFIG)/test/core/iomgr/resource_quota_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_resource_quota_test: $(RESOURCE_QUOTA_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(RESOURCE_QUOTA_TEST_OBJS:.o=.dep) +endif +endif + + SECURE_CHANNEL_CREATE_TEST_SRC = \ test/core/surface/secure_channel_create_test.c \ diff --git a/binding.gyp b/binding.gyp index c767241fde..390a18d3f7 100644 --- a/binding.gyp +++ b/binding.gyp @@ -581,7 +581,6 @@ 'src/core/lib/http/format_request.c', 'src/core/lib/http/httpcli.c', 'src/core/lib/http/parser.c', - 'src/core/lib/iomgr/buffer_pool.c', 'src/core/lib/iomgr/closure.c', 'src/core/lib/iomgr/combiner.c', 'src/core/lib/iomgr/endpoint.c', @@ -605,6 +604,7 @@ 'src/core/lib/iomgr/pollset_windows.c', 'src/core/lib/iomgr/resolve_address_posix.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_utils_common_posix.c', 'src/core/lib/iomgr/socket_utils_linux.c', diff --git a/build.yaml b/build.yaml index f76f925517..bafa4440d9 100644 --- a/build.yaml +++ b/build.yaml @@ -183,7 +183,6 @@ filegroups: - src/core/lib/http/format_request.h - src/core/lib/http/httpcli.h - src/core/lib/http/parser.h - - src/core/lib/iomgr/buffer_pool.h - src/core/lib/iomgr/closure.h - src/core/lib/iomgr/combiner.h - src/core/lib/iomgr/endpoint.h @@ -207,6 +206,7 @@ filegroups: - src/core/lib/iomgr/pollset_set_windows.h - src/core/lib/iomgr/pollset_windows.h - src/core/lib/iomgr/resolve_address.h + - 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.h @@ -268,7 +268,6 @@ filegroups: - src/core/lib/http/format_request.c - src/core/lib/http/httpcli.c - src/core/lib/http/parser.c - - src/core/lib/iomgr/buffer_pool.c - src/core/lib/iomgr/closure.c - src/core/lib/iomgr/combiner.c - src/core/lib/iomgr/endpoint.c @@ -292,6 +291,7 @@ filegroups: - src/core/lib/iomgr/pollset_windows.c - src/core/lib/iomgr/resolve_address_posix.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_utils_common_posix.c - src/core/lib/iomgr/socket_utils_linux.c @@ -667,7 +667,6 @@ filegroups: language: c++ public_headers: - include/grpc++/alarm.h - - include/grpc++/buffer_pool.h - include/grpc++/channel.h - include/grpc++/client_context.h - include/grpc++/completion_queue.h @@ -694,6 +693,7 @@ filegroups: - include/grpc++/impl/thd.h - include/grpc++/impl/thd_cxx11.h - include/grpc++/impl/thd_no_cxx11.h + - include/grpc++/resource_quota.h - include/grpc++/security/auth_context.h - include/grpc++/security/auth_metadata_processor.h - include/grpc++/security/credentials.h @@ -727,11 +727,11 @@ filegroups: - src/cpp/client/create_channel_posix.cc - src/cpp/client/credentials_cc.cc - src/cpp/client/generic_stub.cc - - src/cpp/common/buffer_pool_cc.cc - src/cpp/common/channel_arguments.cc - src/cpp/common/channel_filter.cc - src/cpp/common/completion_queue_cc.cc - src/cpp/common/core_codegen.cc + - src/cpp/common/resource_quota_cc.cc - src/cpp/common/rpc_method.cc - src/cpp/server/async_generic_service.cc - src/cpp/server/create_default_thread_pool.cc @@ -1345,17 +1345,6 @@ targets: deps: - grpc_test_util - grpc -- name: buffer_pool_test - cpu_cost: 30 - build: test - language: c - src: - - test/core/iomgr/buffer_pool_test.c - deps: - - grpc_test_util - - grpc - - gpr_test_util - - gpr - name: census_context_test build: test language: c @@ -2343,6 +2332,17 @@ targets: - grpc - gpr_test_util - gpr +- name: resource_quota_test + cpu_cost: 30 + build: test + language: c + src: + - test/core/iomgr/resource_quota_test.c + deps: + - grpc_test_util + - grpc + - gpr_test_util + - gpr - name: secure_channel_create_test build: test language: c diff --git a/config.m4 b/config.m4 index 70f0923837..601e7f5a74 100644 --- a/config.m4 +++ b/config.m4 @@ -100,7 +100,6 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/http/format_request.c \ src/core/lib/http/httpcli.c \ src/core/lib/http/parser.c \ - src/core/lib/iomgr/buffer_pool.c \ src/core/lib/iomgr/closure.c \ src/core/lib/iomgr/combiner.c \ src/core/lib/iomgr/endpoint.c \ @@ -124,6 +123,7 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/iomgr/pollset_windows.c \ src/core/lib/iomgr/resolve_address_posix.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_utils_common_posix.c \ src/core/lib/iomgr/socket_utils_linux.c \ diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 19bd8ac42a..25e1ccf5fd 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -266,7 +266,6 @@ Pod::Spec.new do |s| 'src/core/lib/http/format_request.h', 'src/core/lib/http/httpcli.h', 'src/core/lib/http/parser.h', - 'src/core/lib/iomgr/buffer_pool.h', 'src/core/lib/iomgr/closure.h', 'src/core/lib/iomgr/combiner.h', 'src/core/lib/iomgr/endpoint.h', @@ -290,6 +289,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/pollset_set_windows.h', 'src/core/lib/iomgr/pollset_windows.h', 'src/core/lib/iomgr/resolve_address.h', + '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.h', @@ -432,7 +432,6 @@ Pod::Spec.new do |s| 'src/core/lib/http/format_request.c', 'src/core/lib/http/httpcli.c', 'src/core/lib/http/parser.c', - 'src/core/lib/iomgr/buffer_pool.c', 'src/core/lib/iomgr/closure.c', 'src/core/lib/iomgr/combiner.c', 'src/core/lib/iomgr/endpoint.c', @@ -456,6 +455,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/pollset_windows.c', 'src/core/lib/iomgr/resolve_address_posix.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_utils_common_posix.c', 'src/core/lib/iomgr/socket_utils_linux.c', @@ -642,7 +642,6 @@ Pod::Spec.new do |s| 'src/core/lib/http/format_request.h', 'src/core/lib/http/httpcli.h', 'src/core/lib/http/parser.h', - 'src/core/lib/iomgr/buffer_pool.h', 'src/core/lib/iomgr/closure.h', 'src/core/lib/iomgr/combiner.h', 'src/core/lib/iomgr/endpoint.h', @@ -666,6 +665,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/pollset_set_windows.h', 'src/core/lib/iomgr/pollset_windows.h', 'src/core/lib/iomgr/resolve_address.h', + '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.h', diff --git a/grpc.def b/grpc.def index 644a5886f2..0b6db801d8 100644 --- a/grpc.def +++ b/grpc.def @@ -94,11 +94,11 @@ EXPORTS grpc_header_nonbin_value_is_legal grpc_is_binary_header grpc_call_error_to_string - grpc_buffer_pool_create - grpc_buffer_pool_ref - grpc_buffer_pool_unref - grpc_buffer_pool_resize - grpc_buffer_pool_arg_vtable + grpc_resource_quota_create + grpc_resource_quota_ref + grpc_resource_quota_unref + grpc_resource_quota_resize + grpc_resource_quota_arg_vtable grpc_insecure_channel_create_from_fd grpc_server_add_insecure_channel_from_fd grpc_use_signal diff --git a/grpc.gemspec b/grpc.gemspec index 004e937109..25aa70965b 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -186,7 +186,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/http/format_request.h ) s.files += %w( src/core/lib/http/httpcli.h ) s.files += %w( src/core/lib/http/parser.h ) - s.files += %w( src/core/lib/iomgr/buffer_pool.h ) s.files += %w( src/core/lib/iomgr/closure.h ) s.files += %w( src/core/lib/iomgr/combiner.h ) s.files += %w( src/core/lib/iomgr/endpoint.h ) @@ -210,6 +209,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/pollset_set_windows.h ) s.files += %w( src/core/lib/iomgr/pollset_windows.h ) s.files += %w( src/core/lib/iomgr/resolve_address.h ) + s.files += %w( src/core/lib/iomgr/resource_quota.h ) s.files += %w( src/core/lib/iomgr/sockaddr.h ) s.files += %w( src/core/lib/iomgr/sockaddr_posix.h ) s.files += %w( src/core/lib/iomgr/sockaddr_utils.h ) @@ -352,7 +352,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/http/format_request.c ) s.files += %w( src/core/lib/http/httpcli.c ) s.files += %w( src/core/lib/http/parser.c ) - s.files += %w( src/core/lib/iomgr/buffer_pool.c ) s.files += %w( src/core/lib/iomgr/closure.c ) s.files += %w( src/core/lib/iomgr/combiner.c ) s.files += %w( src/core/lib/iomgr/endpoint.c ) @@ -376,6 +375,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/pollset_windows.c ) s.files += %w( src/core/lib/iomgr/resolve_address_posix.c ) s.files += %w( src/core/lib/iomgr/resolve_address_windows.c ) + s.files += %w( src/core/lib/iomgr/resource_quota.c ) s.files += %w( src/core/lib/iomgr/sockaddr_utils.c ) s.files += %w( src/core/lib/iomgr/socket_utils_common_posix.c ) s.files += %w( src/core/lib/iomgr/socket_utils_linux.c ) diff --git a/include/grpc++/buffer_pool.h b/include/grpc++/buffer_pool.h deleted file mode 100644 index 900213ca6d..0000000000 --- a/include/grpc++/buffer_pool.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * - * Copyright 2016, 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. - * - */ - -#ifndef GRPCXX_BUFFER_POOL_H -#define GRPCXX_BUFFER_POOL_H - -struct grpc_buffer_pool; - -#include - -namespace grpc { - -/// BufferPool represents a bound on memory usage by the gRPC library. -/// A BufferPool 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 BufferPool bound. -class BufferPool GRPC_FINAL { - public: - explicit BufferPool(const grpc::string& name); - BufferPool(); - ~BufferPool(); - - /// Resize this BufferPool 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. - BufferPool& Resize(size_t new_size); - - grpc_buffer_pool* c_buffer_pool() const { return impl_; } - - private: - BufferPool(const BufferPool& rhs); - BufferPool& operator=(const BufferPool& rhs); - - grpc_buffer_pool* const impl_; -}; - -} // namespace grpc - -#endif diff --git a/include/grpc++/resource_quota.h b/include/grpc++/resource_quota.h new file mode 100644 index 0000000000..e45fe98974 --- /dev/null +++ b/include/grpc++/resource_quota.h @@ -0,0 +1,70 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#ifndef GRPCXX_BUFFER_POOL_H +#define GRPCXX_BUFFER_POOL_H + +struct grpc_resource_quota; + +#include + +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. +class ResourceQuota GRPC_FINAL { + public: + explicit ResourceQuota(const grpc::string& name); + 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. + ResourceQuota& Resize(size_t new_size); + + grpc_resource_quota* c_resource_quota() const { return impl_; } + + private: + ResourceQuota(const ResourceQuota& rhs); + ResourceQuota& operator=(const ResourceQuota& rhs); + + grpc_resource_quota* const impl_; +}; + +} // namespace grpc + +#endif diff --git a/include/grpc++/server_builder.h b/include/grpc++/server_builder.h index 282d49c643..15333df60e 100644 --- a/include/grpc++/server_builder.h +++ b/include/grpc++/server_builder.h @@ -43,12 +43,12 @@ #include #include -struct grpc_buffer_pool; +struct grpc_resource_quota; namespace grpc { class AsyncGenericService; -class BufferPool; +class ResourceQuota; class CompletionQueue; class RpcService; class Server; @@ -118,7 +118,7 @@ class ServerBuilder { grpc_compression_algorithm algorithm); /// Set the attached buffer pool for this server - ServerBuilder& SetBufferPool(const BufferPool& buffer_pool); + ServerBuilder& SetResourceQuota(const ResourceQuota& resource_quota); ServerBuilder& SetOption(std::unique_ptr option); @@ -194,7 +194,7 @@ class ServerBuilder { std::vector cqs_; std::shared_ptr creds_; std::vector> plugins_; - grpc_buffer_pool* buffer_pool_; + grpc_resource_quota* resource_quota_; AsyncGenericService* generic_service_; struct { bool is_set; diff --git a/include/grpc++/support/channel_arguments.h b/include/grpc++/support/channel_arguments.h index e6fdc3bf17..ba203f85bd 100644 --- a/include/grpc++/support/channel_arguments.h +++ b/include/grpc++/support/channel_arguments.h @@ -46,7 +46,7 @@ namespace testing { class ChannelArgumentsTest; } // namespace testing -class BufferPool; +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, @@ -83,7 +83,7 @@ class ChannelArguments { void SetUserAgentPrefix(const grpc::string& user_agent_prefix); /// The given buffer pool will be attached to the constructed channel - void SetBufferPool(const BufferPool& buffer_pool); + void SetResourceQuota(const ResourceQuota& resource_quota); // Generic channel argument setters. Only for advanced use cases. /// Set an integer argument \a value under \a key. diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index 4bdf744d91..f8e442274e 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -402,20 +402,21 @@ GRPCAPI int grpc_is_binary_header(const char *key, size_t length); GRPCAPI const char *grpc_call_error_to_string(grpc_call_error error); /** Create a buffer pool */ -GRPCAPI grpc_buffer_pool *grpc_buffer_pool_create(const char *trace_name); +GRPCAPI grpc_resource_quota *grpc_resource_quota_create(const char *trace_name); /** Add a reference to a buffer pool */ -GRPCAPI void grpc_buffer_pool_ref(grpc_buffer_pool *buffer_pool); +GRPCAPI void grpc_resource_quota_ref(grpc_resource_quota *resource_quota); /** Drop a reference to a buffer pool */ -GRPCAPI void grpc_buffer_pool_unref(grpc_buffer_pool *buffer_pool); +GRPCAPI void grpc_resource_quota_unref(grpc_resource_quota *resource_quota); /** Update the size of a buffer pool */ -GRPCAPI void grpc_buffer_pool_resize(grpc_buffer_pool *buffer_pool, - size_t new_size); +GRPCAPI void grpc_resource_quota_resize(grpc_resource_quota *resource_quota, + size_t new_size); -/** Fetch a vtable for a grpc_channel_arg that points to a grpc_buffer_pool */ -GRPCAPI const grpc_arg_pointer_vtable *grpc_buffer_pool_arg_vtable(void); +/** Fetch a vtable for a grpc_channel_arg that points to a grpc_resource_quota + */ +GRPCAPI const grpc_arg_pointer_vtable *grpc_resource_quota_arg_vtable(void); #ifdef __cplusplus } diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index 5f25f57304..3492bf741c 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -201,9 +201,10 @@ typedef struct { #define GRPC_ARG_MAX_METADATA_SIZE "grpc.max_metadata_size" /** If non-zero, allow the use of SO_REUSEPORT if it's available (default 1) */ #define GRPC_ARG_ALLOW_REUSEPORT "grpc.so_reuseport" -/** If non-zero, a pointer to a buffer pool (use grpc_buffer_pool_arg_vtable to +/** If non-zero, a pointer to a buffer pool (use grpc_resource_quota_arg_vtable + to fetch an appropriate pointer arg vtable */ -#define GRPC_ARG_BUFFER_POOL "grpc.buffer_pool" +#define GRPC_ARG_BUFFER_POOL "grpc.resource_quota" /** \} */ /** Result of a grpc call. If the caller satisfies the prerequisites of a @@ -460,7 +461,7 @@ typedef struct grpc_op { } data; } grpc_op; -typedef struct grpc_buffer_pool grpc_buffer_pool; +typedef struct grpc_resource_quota grpc_resource_quota; #ifdef __cplusplus } diff --git a/package.xml b/package.xml index 19e23b9e74..54509c99fa 100644 --- a/package.xml +++ b/package.xml @@ -193,7 +193,6 @@ - @@ -217,6 +216,7 @@ + @@ -359,7 +359,6 @@ - @@ -383,6 +382,7 @@ + diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c index e5a156a59e..b760fea2fa 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c @@ -57,12 +57,12 @@ void grpc_server_add_insecure_channel_from_fd(grpc_server *server, char *name; gpr_asprintf(&name, "fd:%d", fd); - grpc_buffer_pool *buffer_pool = - grpc_buffer_pool_from_channel_args(grpc_server_get_channel_args(server)); + grpc_resource_quota *resource_quota = + grpc_resource_quota_from_channel_args(grpc_server_get_channel_args(server)); grpc_endpoint *server_endpoint = - grpc_tcp_create(grpc_fd_create(fd, name), buffer_pool, + grpc_tcp_create(grpc_fd_create(fd, name), resource_quota, GRPC_TCP_DEFAULT_READ_SLICE_SIZE, name); - grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); + grpc_resource_quota_internal_unref(&exec_ctx, resource_quota); gpr_free(name); diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index a7137bc944..612852cb16 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -2115,9 +2115,9 @@ static void post_benign_reclaimer(grpc_exec_ctx *exec_ctx, if (!t->benign_reclaimer_registered) { t->benign_reclaimer_registered = true; GRPC_CHTTP2_REF_TRANSPORT(t, "benign_reclaimer"); - grpc_buffer_user_post_reclaimer(exec_ctx, - grpc_endpoint_get_buffer_user(t->ep), false, - &t->benign_reclaimer); + grpc_resource_user_post_reclaimer(exec_ctx, + grpc_endpoint_get_resource_user(t->ep), + false, &t->benign_reclaimer); } } @@ -2126,9 +2126,9 @@ static void post_destructive_reclaimer(grpc_exec_ctx *exec_ctx, if (!t->destructive_reclaimer_registered) { t->destructive_reclaimer_registered = true; GRPC_CHTTP2_REF_TRANSPORT(t, "destructive_reclaimer"); - grpc_buffer_user_post_reclaimer(exec_ctx, - grpc_endpoint_get_buffer_user(t->ep), true, - &t->destructive_reclaimer); + grpc_resource_user_post_reclaimer(exec_ctx, + grpc_endpoint_get_resource_user(t->ep), + true, &t->destructive_reclaimer); } } @@ -2151,13 +2151,13 @@ static void benign_reclaimer_locked(grpc_exec_ctx *exec_ctx, void *arg, grpc_chttp2_transport *t = arg; if (error == GRPC_ERROR_NONE && grpc_chttp2_stream_map_size(&t->stream_map) == 0) { - if (grpc_buffer_pool_trace) { + if (grpc_resource_quota_trace) { gpr_log(GPR_DEBUG, "HTTP2: %s - send goaway to free memory", t->peer_string); } send_goaway(exec_ctx, t, GRPC_CHTTP2_ENHANCE_YOUR_CALM, gpr_slice_from_static_string("Buffers full")); - } else if (error == GRPC_ERROR_NONE && grpc_buffer_pool_trace) { + } else if (error == GRPC_ERROR_NONE && grpc_resource_quota_trace) { gpr_log(GPR_DEBUG, "HTTP2: %s - skip benign reclaimation, there are still %" PRIdPTR " streams", @@ -2165,8 +2165,8 @@ static void benign_reclaimer_locked(grpc_exec_ctx *exec_ctx, void *arg, } t->benign_reclaimer_registered = false; if (error != GRPC_ERROR_CANCELLED) { - grpc_buffer_user_finish_reclaimation(exec_ctx, - grpc_endpoint_get_buffer_user(t->ep)); + grpc_resource_user_finish_reclaimation( + exec_ctx, grpc_endpoint_get_resource_user(t->ep)); } GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "benign_reclaimer"); } @@ -2178,7 +2178,7 @@ static void destructive_reclaimer_locked(grpc_exec_ctx *exec_ctx, void *arg, t->destructive_reclaimer_registered = false; if (error == GRPC_ERROR_NONE && n > 0) { grpc_chttp2_stream *s = grpc_chttp2_stream_map_rand(&t->stream_map); - if (grpc_buffer_pool_trace) { + if (grpc_resource_quota_trace) { gpr_log(GPR_DEBUG, "HTTP2: %s - abandon stream id %d", t->peer_string, s->id); } @@ -2191,8 +2191,8 @@ static void destructive_reclaimer_locked(grpc_exec_ctx *exec_ctx, void *arg, } } if (error != GRPC_ERROR_CANCELLED) { - grpc_buffer_user_finish_reclaimation(exec_ctx, - grpc_endpoint_get_buffer_user(t->ep)); + grpc_resource_user_finish_reclaimation( + exec_ctx, grpc_endpoint_get_resource_user(t->ep)); } GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "destructive_reclaimer"); } diff --git a/src/core/lib/http/httpcli.c b/src/core/lib/http/httpcli.c index a4ce8a1e73..bdc18ac4bf 100644 --- a/src/core/lib/http/httpcli.c +++ b/src/core/lib/http/httpcli.c @@ -71,7 +71,7 @@ typedef struct { grpc_closure done_write; grpc_closure connected; grpc_error *overall_error; - grpc_buffer_pool *buffer_pool; + grpc_resource_quota *resource_quota; } internal_request; static grpc_httpcli_get_override g_get_override = NULL; @@ -119,7 +119,7 @@ static void finish(grpc_exec_ctx *exec_ctx, internal_request *req, gpr_slice_buffer_destroy(&req->incoming); gpr_slice_buffer_destroy(&req->outgoing); GRPC_ERROR_UNREF(req->overall_error); - grpc_buffer_pool_internal_unref(exec_ctx, req->buffer_pool); + grpc_resource_quota_internal_unref(exec_ctx, req->resource_quota); gpr_free(req); } @@ -229,8 +229,8 @@ static void next_address(grpc_exec_ctx *exec_ctx, internal_request *req, grpc_arg arg; arg.key = GRPC_ARG_BUFFER_POOL; arg.type = GRPC_ARG_POINTER; - arg.value.pointer.p = req->buffer_pool; - arg.value.pointer.vtable = grpc_buffer_pool_arg_vtable(); + arg.value.pointer.p = req->resource_quota; + arg.value.pointer.vtable = grpc_resource_quota_arg_vtable(); grpc_channel_args args = {1, &arg}; grpc_tcp_client_connect( exec_ctx, &req->connected, &req->ep, req->context->pollset_set, &args, @@ -250,7 +250,7 @@ static void on_resolved(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { static void internal_request_begin(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, grpc_polling_entity *pollent, - grpc_buffer_pool *buffer_pool, + grpc_resource_quota *resource_quota, const grpc_httpcli_request *request, gpr_timespec deadline, grpc_closure *on_done, grpc_httpcli_response *response, @@ -266,7 +266,7 @@ static void internal_request_begin(grpc_exec_ctx *exec_ctx, req->context = context; req->pollent = pollent; req->overall_error = GRPC_ERROR_NONE; - req->buffer_pool = grpc_buffer_pool_internal_ref(buffer_pool); + req->resource_quota = grpc_resource_quota_internal_ref(resource_quota); grpc_closure_init(&req->on_read, on_read, req); grpc_closure_init(&req->done_write, done_write, req); gpr_slice_buffer_init(&req->incoming); @@ -284,7 +284,7 @@ static void internal_request_begin(grpc_exec_ctx *exec_ctx, void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, grpc_polling_entity *pollent, - grpc_buffer_pool *buffer_pool, + grpc_resource_quota *resource_quota, const grpc_httpcli_request *request, gpr_timespec deadline, grpc_closure *on_done, grpc_httpcli_response *response) { @@ -294,7 +294,7 @@ void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, return; } gpr_asprintf(&name, "HTTP:GET:%s:%s", request->host, request->http.path); - internal_request_begin(exec_ctx, context, pollent, buffer_pool, request, + internal_request_begin(exec_ctx, context, pollent, resource_quota, request, deadline, on_done, response, name, grpc_httpcli_format_get_request(request)); gpr_free(name); @@ -302,7 +302,7 @@ void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, void grpc_httpcli_post(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, grpc_polling_entity *pollent, - grpc_buffer_pool *buffer_pool, + grpc_resource_quota *resource_quota, const grpc_httpcli_request *request, const char *body_bytes, size_t body_size, gpr_timespec deadline, grpc_closure *on_done, @@ -315,7 +315,7 @@ void grpc_httpcli_post(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, } gpr_asprintf(&name, "HTTP:POST:%s:%s", request->host, request->http.path); internal_request_begin( - exec_ctx, context, pollent, buffer_pool, request, deadline, on_done, + exec_ctx, context, pollent, resource_quota, request, deadline, on_done, response, name, grpc_httpcli_format_post_request(request, body_bytes, body_size)); gpr_free(name); diff --git a/src/core/lib/http/httpcli.h b/src/core/lib/http/httpcli.h index 0c053c1d70..11e03b44df 100644 --- a/src/core/lib/http/httpcli.h +++ b/src/core/lib/http/httpcli.h @@ -96,7 +96,7 @@ void grpc_httpcli_context_destroy(grpc_httpcli_context *context); 'on_response' is a callback to report results to */ void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, grpc_polling_entity *pollent, - grpc_buffer_pool *buffer_pool, + grpc_resource_quota *resource_quota, const grpc_httpcli_request *request, gpr_timespec deadline, grpc_closure *on_complete, grpc_httpcli_response *response); @@ -117,7 +117,7 @@ void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, Does not support ?var1=val1&var2=val2 in the path. */ void grpc_httpcli_post(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, grpc_polling_entity *pollent, - grpc_buffer_pool *buffer_pool, + grpc_resource_quota *resource_quota, const grpc_httpcli_request *request, const char *body_bytes, size_t body_size, gpr_timespec deadline, grpc_closure *on_complete, diff --git a/src/core/lib/iomgr/buffer_pool.c b/src/core/lib/iomgr/buffer_pool.c deleted file mode 100644 index 8fbf75cbe4..0000000000 --- a/src/core/lib/iomgr/buffer_pool.c +++ /dev/null @@ -1,684 +0,0 @@ -/* - * - * Copyright 2016, 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. - * - */ - -#include "src/core/lib/iomgr/buffer_pool.h" - -#include - -#include -#include -#include -#include - -#include "src/core/lib/iomgr/combiner.h" - -int grpc_buffer_pool_trace = 0; - -typedef bool (*bpstate_func)(grpc_exec_ctx *exec_ctx, - grpc_buffer_pool *buffer_pool); - -typedef struct { - grpc_buffer_user *head; - grpc_buffer_user *tail; -} grpc_buffer_user_list; - -struct grpc_buffer_pool { - gpr_refcount refs; - - grpc_combiner *combiner; - int64_t size; - int64_t free_pool; - - bool step_scheduled; - bool reclaiming; - grpc_closure bpstep_closure; - grpc_closure bpreclaimation_done_closure; - - grpc_buffer_user *roots[GRPC_BULIST_COUNT]; - - char *name; -}; - -/******************************************************************************* - * list management - */ - -static void bulist_add_tail(grpc_buffer_user *buffer_user, grpc_bulist list) { - grpc_buffer_pool *buffer_pool = buffer_user->buffer_pool; - grpc_buffer_user **root = &buffer_pool->roots[list]; - if (*root == NULL) { - *root = buffer_user; - buffer_user->links[list].next = buffer_user->links[list].prev = buffer_user; - } else { - buffer_user->links[list].next = *root; - buffer_user->links[list].prev = (*root)->links[list].prev; - buffer_user->links[list].next->links[list].prev = - buffer_user->links[list].prev->links[list].next = buffer_user; - } -} - -static void bulist_add_head(grpc_buffer_user *buffer_user, grpc_bulist list) { - grpc_buffer_pool *buffer_pool = buffer_user->buffer_pool; - grpc_buffer_user **root = &buffer_pool->roots[list]; - if (*root == NULL) { - *root = buffer_user; - buffer_user->links[list].next = buffer_user->links[list].prev = buffer_user; - } else { - buffer_user->links[list].next = (*root)->links[list].next; - buffer_user->links[list].prev = *root; - buffer_user->links[list].next->links[list].prev = - buffer_user->links[list].prev->links[list].next = buffer_user; - *root = buffer_user; - } -} - -static bool bulist_empty(grpc_buffer_pool *buffer_pool, grpc_bulist list) { - return buffer_pool->roots[list] == NULL; -} - -static grpc_buffer_user *bulist_pop(grpc_buffer_pool *buffer_pool, - grpc_bulist list) { - grpc_buffer_user **root = &buffer_pool->roots[list]; - grpc_buffer_user *buffer_user = *root; - if (buffer_user == NULL) { - return NULL; - } - if (buffer_user->links[list].next == buffer_user) { - *root = NULL; - } else { - buffer_user->links[list].next->links[list].prev = - buffer_user->links[list].prev; - buffer_user->links[list].prev->links[list].next = - buffer_user->links[list].next; - *root = buffer_user->links[list].next; - } - buffer_user->links[list].next = buffer_user->links[list].prev = NULL; - return buffer_user; -} - -static void bulist_remove(grpc_buffer_user *buffer_user, grpc_bulist list) { - if (buffer_user->links[list].next == NULL) return; - grpc_buffer_pool *buffer_pool = buffer_user->buffer_pool; - if (buffer_pool->roots[list] == buffer_user) { - buffer_pool->roots[list] = buffer_user->links[list].next; - if (buffer_pool->roots[list] == buffer_user) { - buffer_pool->roots[list] = NULL; - } - } - buffer_user->links[list].next->links[list].prev = - buffer_user->links[list].prev; - buffer_user->links[list].prev->links[list].next = - buffer_user->links[list].next; -} - -/******************************************************************************* - * buffer pool state machine - */ - -static bool bpalloc(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool); -static bool bpscavenge(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool); -static bool bpreclaim(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool, - bool destructive); - -static void bpstep(grpc_exec_ctx *exec_ctx, void *bp, grpc_error *error) { - grpc_buffer_pool *buffer_pool = bp; - buffer_pool->step_scheduled = false; - do { - if (bpalloc(exec_ctx, buffer_pool)) goto done; - } while (bpscavenge(exec_ctx, buffer_pool)); - bpreclaim(exec_ctx, buffer_pool, false) || - bpreclaim(exec_ctx, buffer_pool, true); -done: - grpc_buffer_pool_internal_unref(exec_ctx, buffer_pool); -} - -static void bpstep_sched(grpc_exec_ctx *exec_ctx, - grpc_buffer_pool *buffer_pool) { - if (buffer_pool->step_scheduled) return; - buffer_pool->step_scheduled = true; - grpc_buffer_pool_internal_ref(buffer_pool); - grpc_combiner_execute_finally(exec_ctx, buffer_pool->combiner, - &buffer_pool->bpstep_closure, GRPC_ERROR_NONE, - false); -} - -/* returns true if all allocations are completed */ -static bool bpalloc(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool) { - grpc_buffer_user *buffer_user; - while ((buffer_user = - bulist_pop(buffer_pool, GRPC_BULIST_AWAITING_ALLOCATION))) { - gpr_mu_lock(&buffer_user->mu); - if (buffer_user->free_pool < 0 && - -buffer_user->free_pool <= buffer_pool->free_pool) { - int64_t amt = -buffer_user->free_pool; - buffer_user->free_pool = 0; - buffer_pool->free_pool -= amt; - if (grpc_buffer_pool_trace) { - gpr_log(GPR_DEBUG, "BP %s %s: grant alloc %" PRId64 - " bytes; bp_free_pool -> %" PRId64, - buffer_pool->name, buffer_user->name, amt, - buffer_pool->free_pool); - } - } else if (grpc_buffer_pool_trace && buffer_user->free_pool >= 0) { - gpr_log(GPR_DEBUG, "BP %s %s: discard already satisfied alloc request", - buffer_pool->name, buffer_user->name); - } - if (buffer_user->free_pool >= 0) { - buffer_user->allocating = false; - grpc_exec_ctx_enqueue_list(exec_ctx, &buffer_user->on_allocated, NULL); - gpr_mu_unlock(&buffer_user->mu); - } else { - bulist_add_head(buffer_user, GRPC_BULIST_AWAITING_ALLOCATION); - gpr_mu_unlock(&buffer_user->mu); - return false; - } - } - return true; -} - -/* returns true if any memory could be reclaimed from buffers */ -static bool bpscavenge(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool) { - grpc_buffer_user *buffer_user; - while ((buffer_user = - bulist_pop(buffer_pool, GRPC_BULIST_NON_EMPTY_FREE_POOL))) { - gpr_mu_lock(&buffer_user->mu); - if (buffer_user->free_pool > 0) { - int64_t amt = buffer_user->free_pool; - buffer_user->free_pool = 0; - buffer_pool->free_pool += amt; - if (grpc_buffer_pool_trace) { - gpr_log(GPR_DEBUG, "BP %s %s: scavenge %" PRId64 - " bytes; bp_free_pool -> %" PRId64, - buffer_pool->name, buffer_user->name, amt, - buffer_pool->free_pool); - } - gpr_mu_unlock(&buffer_user->mu); - return true; - } else { - gpr_mu_unlock(&buffer_user->mu); - } - } - return false; -} - -/* returns true if reclaimation is proceeding */ -static bool bpreclaim(grpc_exec_ctx *exec_ctx, grpc_buffer_pool *buffer_pool, - bool destructive) { - if (buffer_pool->reclaiming) return true; - grpc_bulist list = destructive ? GRPC_BULIST_RECLAIMER_DESTRUCTIVE - : GRPC_BULIST_RECLAIMER_BENIGN; - grpc_buffer_user *buffer_user = bulist_pop(buffer_pool, list); - if (buffer_user == NULL) return false; - if (grpc_buffer_pool_trace) { - gpr_log(GPR_DEBUG, "BP %s %s: initiate %s reclaimation", buffer_pool->name, - buffer_user->name, destructive ? "destructive" : "benign"); - } - buffer_pool->reclaiming = true; - grpc_buffer_pool_internal_ref(buffer_pool); - grpc_closure *c = buffer_user->reclaimers[destructive]; - buffer_user->reclaimers[destructive] = NULL; - grpc_closure_run(exec_ctx, c, GRPC_ERROR_NONE); - return true; -} - -/******************************************************************************* - * bu_slice: a slice implementation that is backed by a grpc_buffer_user - */ - -typedef struct { - gpr_slice_refcount base; - gpr_refcount refs; - grpc_buffer_user *buffer_user; - size_t size; -} bu_slice_refcount; - -static void bu_slice_ref(void *p) { - bu_slice_refcount *rc = p; - gpr_ref(&rc->refs); -} - -static void bu_slice_unref(void *p) { - bu_slice_refcount *rc = p; - if (gpr_unref(&rc->refs)) { - /* TODO(ctiller): this is dangerous, but I think safe for now: - we have no guarantee here that we're at a safe point for creating an - execution context, but we have no way of writing this code otherwise. - In the future: consider lifting gpr_slice to grpc, and offering an - internal_{ref,unref} pair that is execution context aware. Alternatively, - make exec_ctx be thread local and 'do the right thing' (whatever that is) - if NULL */ - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_free(&exec_ctx, rc->buffer_user, rc->size); - grpc_exec_ctx_finish(&exec_ctx); - gpr_free(rc); - } -} - -static gpr_slice bu_slice_create(grpc_buffer_user *buffer_user, size_t size) { - bu_slice_refcount *rc = gpr_malloc(sizeof(bu_slice_refcount) + size); - rc->base.ref = bu_slice_ref; - rc->base.unref = bu_slice_unref; - gpr_ref_init(&rc->refs, 1); - rc->buffer_user = buffer_user; - rc->size = size; - gpr_slice slice; - slice.refcount = &rc->base; - slice.data.refcounted.bytes = (uint8_t *)(rc + 1); - slice.data.refcounted.length = size; - return slice; -} - -/******************************************************************************* - * grpc_buffer_pool internal implementation - */ - -static void bu_allocate(grpc_exec_ctx *exec_ctx, void *bu, grpc_error *error) { - grpc_buffer_user *buffer_user = bu; - if (bulist_empty(buffer_user->buffer_pool, GRPC_BULIST_AWAITING_ALLOCATION)) { - bpstep_sched(exec_ctx, buffer_user->buffer_pool); - } - bulist_add_tail(buffer_user, GRPC_BULIST_AWAITING_ALLOCATION); -} - -static void bu_add_to_free_pool(grpc_exec_ctx *exec_ctx, void *bu, - grpc_error *error) { - grpc_buffer_user *buffer_user = bu; - if (!bulist_empty(buffer_user->buffer_pool, - GRPC_BULIST_AWAITING_ALLOCATION) && - bulist_empty(buffer_user->buffer_pool, GRPC_BULIST_NON_EMPTY_FREE_POOL)) { - bpstep_sched(exec_ctx, buffer_user->buffer_pool); - } - bulist_add_tail(buffer_user, GRPC_BULIST_NON_EMPTY_FREE_POOL); -} - -static void bu_post_benign_reclaimer(grpc_exec_ctx *exec_ctx, void *bu, - grpc_error *error) { - grpc_buffer_user *buffer_user = bu; - if (!bulist_empty(buffer_user->buffer_pool, - GRPC_BULIST_AWAITING_ALLOCATION) && - bulist_empty(buffer_user->buffer_pool, GRPC_BULIST_NON_EMPTY_FREE_POOL) && - bulist_empty(buffer_user->buffer_pool, GRPC_BULIST_RECLAIMER_BENIGN)) { - bpstep_sched(exec_ctx, buffer_user->buffer_pool); - } - bulist_add_tail(buffer_user, GRPC_BULIST_RECLAIMER_BENIGN); -} - -static void bu_post_destructive_reclaimer(grpc_exec_ctx *exec_ctx, void *bu, - grpc_error *error) { - grpc_buffer_user *buffer_user = bu; - if (!bulist_empty(buffer_user->buffer_pool, - GRPC_BULIST_AWAITING_ALLOCATION) && - bulist_empty(buffer_user->buffer_pool, GRPC_BULIST_NON_EMPTY_FREE_POOL) && - bulist_empty(buffer_user->buffer_pool, GRPC_BULIST_RECLAIMER_BENIGN) && - bulist_empty(buffer_user->buffer_pool, - GRPC_BULIST_RECLAIMER_DESTRUCTIVE)) { - bpstep_sched(exec_ctx, buffer_user->buffer_pool); - } - bulist_add_tail(buffer_user, GRPC_BULIST_RECLAIMER_DESTRUCTIVE); -} - -static void bu_destroy(grpc_exec_ctx *exec_ctx, void *bu, grpc_error *error) { - grpc_buffer_user *buffer_user = bu; - GPR_ASSERT(buffer_user->allocated == 0); - for (int i = 0; i < GRPC_BULIST_COUNT; i++) { - bulist_remove(buffer_user, (grpc_bulist)i); - } - grpc_exec_ctx_sched(exec_ctx, buffer_user->reclaimers[0], - GRPC_ERROR_CANCELLED, NULL); - grpc_exec_ctx_sched(exec_ctx, buffer_user->reclaimers[1], - GRPC_ERROR_CANCELLED, NULL); - grpc_exec_ctx_sched(exec_ctx, (grpc_closure *)gpr_atm_no_barrier_load( - &buffer_user->on_done_destroy_closure), - GRPC_ERROR_NONE, NULL); - if (buffer_user->free_pool != 0) { - buffer_user->buffer_pool->free_pool += buffer_user->free_pool; - bpstep_sched(exec_ctx, buffer_user->buffer_pool); - } -} - -static void bu_allocated_slices(grpc_exec_ctx *exec_ctx, void *ts, - grpc_error *error) { - grpc_buffer_user_slice_allocator *slice_allocator = ts; - if (error == GRPC_ERROR_NONE) { - for (size_t i = 0; i < slice_allocator->count; i++) { - gpr_slice_buffer_add_indexed(slice_allocator->dest, - bu_slice_create(slice_allocator->buffer_user, - slice_allocator->length)); - } - } - grpc_closure_run(exec_ctx, &slice_allocator->on_done, GRPC_ERROR_REF(error)); -} - -typedef struct { - int64_t size; - grpc_buffer_pool *buffer_pool; - grpc_closure closure; -} bp_resize_args; - -static void bp_resize(grpc_exec_ctx *exec_ctx, void *args, grpc_error *error) { - bp_resize_args *a = args; - int64_t delta = a->size - a->buffer_pool->size; - a->buffer_pool->size += delta; - a->buffer_pool->free_pool += delta; - if (delta < 0 && a->buffer_pool->free_pool < 0) { - bpstep_sched(exec_ctx, a->buffer_pool); - } else if (delta > 0 && - !bulist_empty(a->buffer_pool, GRPC_BULIST_AWAITING_ALLOCATION)) { - bpstep_sched(exec_ctx, a->buffer_pool); - } - grpc_buffer_pool_internal_unref(exec_ctx, a->buffer_pool); - gpr_free(a); -} - -static void bp_reclaimation_done(grpc_exec_ctx *exec_ctx, void *bp, - grpc_error *error) { - grpc_buffer_pool *buffer_pool = bp; - buffer_pool->reclaiming = false; - bpstep_sched(exec_ctx, buffer_pool); - grpc_buffer_pool_internal_unref(exec_ctx, buffer_pool); -} - -/******************************************************************************* - * grpc_buffer_pool api - */ - -grpc_buffer_pool *grpc_buffer_pool_create(const char *name) { - grpc_buffer_pool *buffer_pool = gpr_malloc(sizeof(*buffer_pool)); - gpr_ref_init(&buffer_pool->refs, 1); - buffer_pool->combiner = grpc_combiner_create(NULL); - buffer_pool->free_pool = INT64_MAX; - buffer_pool->size = INT64_MAX; - buffer_pool->step_scheduled = false; - buffer_pool->reclaiming = false; - if (name != NULL) { - buffer_pool->name = gpr_strdup(name); - } else { - gpr_asprintf(&buffer_pool->name, "anonymous_pool_%" PRIxPTR, - (intptr_t)buffer_pool); - } - grpc_closure_init(&buffer_pool->bpstep_closure, bpstep, buffer_pool); - grpc_closure_init(&buffer_pool->bpreclaimation_done_closure, - bp_reclaimation_done, buffer_pool); - for (int i = 0; i < GRPC_BULIST_COUNT; i++) { - buffer_pool->roots[i] = NULL; - } - return buffer_pool; -} - -void grpc_buffer_pool_internal_unref(grpc_exec_ctx *exec_ctx, - grpc_buffer_pool *buffer_pool) { - if (gpr_unref(&buffer_pool->refs)) { - grpc_combiner_destroy(exec_ctx, buffer_pool->combiner); - gpr_free(buffer_pool->name); - gpr_free(buffer_pool); - } -} - -void grpc_buffer_pool_unref(grpc_buffer_pool *buffer_pool) { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); - grpc_exec_ctx_finish(&exec_ctx); -} - -grpc_buffer_pool *grpc_buffer_pool_internal_ref(grpc_buffer_pool *buffer_pool) { - gpr_ref(&buffer_pool->refs); - return buffer_pool; -} - -void grpc_buffer_pool_ref(grpc_buffer_pool *buffer_pool) { - grpc_buffer_pool_internal_ref(buffer_pool); -} - -void grpc_buffer_pool_resize(grpc_buffer_pool *buffer_pool, size_t size) { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - bp_resize_args *a = gpr_malloc(sizeof(*a)); - a->buffer_pool = grpc_buffer_pool_internal_ref(buffer_pool); - a->size = (int64_t)size; - grpc_closure_init(&a->closure, bp_resize, a); - grpc_combiner_execute(&exec_ctx, buffer_pool->combiner, &a->closure, - GRPC_ERROR_NONE, false); - grpc_exec_ctx_finish(&exec_ctx); -} - -/******************************************************************************* - * grpc_buffer_user channel args api - */ - -grpc_buffer_pool *grpc_buffer_pool_from_channel_args( - const grpc_channel_args *channel_args) { - for (size_t i = 0; i < channel_args->num_args; i++) { - if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_BUFFER_POOL)) { - if (channel_args->args[i].type == GRPC_ARG_POINTER) { - return grpc_buffer_pool_internal_ref( - channel_args->args[i].value.pointer.p); - } else { - gpr_log(GPR_DEBUG, GRPC_ARG_BUFFER_POOL " should be a pointer"); - } - } - } - return grpc_buffer_pool_create(NULL); -} - -static void *bp_copy(void *bp) { - grpc_buffer_pool_ref(bp); - return bp; -} - -static void bp_destroy(void *bp) { grpc_buffer_pool_unref(bp); } - -static int bp_cmp(void *a, void *b) { return GPR_ICMP(a, b); } - -const grpc_arg_pointer_vtable *grpc_buffer_pool_arg_vtable(void) { - static const grpc_arg_pointer_vtable vtable = {bp_copy, bp_destroy, bp_cmp}; - return &vtable; -} - -/******************************************************************************* - * grpc_buffer_user api - */ - -void grpc_buffer_user_init(grpc_buffer_user *buffer_user, - grpc_buffer_pool *buffer_pool, const char *name) { - buffer_user->buffer_pool = grpc_buffer_pool_internal_ref(buffer_pool); - grpc_closure_init(&buffer_user->allocate_closure, &bu_allocate, buffer_user); - grpc_closure_init(&buffer_user->add_to_free_pool_closure, - &bu_add_to_free_pool, buffer_user); - grpc_closure_init(&buffer_user->post_reclaimer_closure[0], - &bu_post_benign_reclaimer, buffer_user); - grpc_closure_init(&buffer_user->post_reclaimer_closure[1], - &bu_post_destructive_reclaimer, buffer_user); - grpc_closure_init(&buffer_user->destroy_closure, &bu_destroy, buffer_user); - gpr_mu_init(&buffer_user->mu); - buffer_user->allocated = 0; - buffer_user->free_pool = 0; - grpc_closure_list_init(&buffer_user->on_allocated); - buffer_user->allocating = false; - buffer_user->added_to_free_pool = false; - gpr_atm_no_barrier_store(&buffer_user->on_done_destroy_closure, 0); - buffer_user->reclaimers[0] = NULL; - buffer_user->reclaimers[1] = NULL; - for (int i = 0; i < GRPC_BULIST_COUNT; i++) { - buffer_user->links[i].next = buffer_user->links[i].prev = NULL; - } -#ifndef NDEBUG - buffer_user->asan_canary = gpr_malloc(1); -#endif - if (name != NULL) { - buffer_user->name = gpr_strdup(name); - } else { - gpr_asprintf(&buffer_user->name, "anonymous_buffer_user_%" PRIxPTR, - (intptr_t)buffer_user); - } -} - -void grpc_buffer_user_shutdown(grpc_exec_ctx *exec_ctx, - grpc_buffer_user *buffer_user, - grpc_closure *on_done) { - gpr_mu_lock(&buffer_user->mu); - GPR_ASSERT(gpr_atm_no_barrier_load(&buffer_user->on_done_destroy_closure) == - 0); - gpr_atm_no_barrier_store(&buffer_user->on_done_destroy_closure, - (gpr_atm)on_done); - if (buffer_user->allocated == 0) { - grpc_combiner_execute(exec_ctx, buffer_user->buffer_pool->combiner, - &buffer_user->destroy_closure, GRPC_ERROR_NONE, - false); - } - gpr_mu_unlock(&buffer_user->mu); -} - -void grpc_buffer_user_destroy(grpc_exec_ctx *exec_ctx, - grpc_buffer_user *buffer_user) { -#ifndef NDEBUG - gpr_free(buffer_user->asan_canary); -#endif - grpc_buffer_pool_internal_unref(exec_ctx, buffer_user->buffer_pool); - gpr_mu_destroy(&buffer_user->mu); - gpr_free(buffer_user->name); -} - -void grpc_buffer_user_alloc(grpc_exec_ctx *exec_ctx, - grpc_buffer_user *buffer_user, size_t size, - grpc_closure *optional_on_done) { - gpr_mu_lock(&buffer_user->mu); - grpc_closure *on_done_destroy = (grpc_closure *)gpr_atm_no_barrier_load( - &buffer_user->on_done_destroy_closure); - if (on_done_destroy != NULL) { - /* already shutdown */ - if (grpc_buffer_pool_trace) { - gpr_log(GPR_DEBUG, "BP %s %s: alloc %" PRIdPTR " after shutdown", - buffer_user->buffer_pool->name, buffer_user->name, size); - } - grpc_exec_ctx_sched( - exec_ctx, optional_on_done, - GRPC_ERROR_CREATE("Buffer pool user is already shutdown"), NULL); - gpr_mu_unlock(&buffer_user->mu); - return; - } - buffer_user->allocated += (int64_t)size; - buffer_user->free_pool -= (int64_t)size; - if (grpc_buffer_pool_trace) { - gpr_log(GPR_DEBUG, "BP %s %s: alloc %" PRIdPTR "; allocated -> %" PRId64 - ", free_pool -> %" PRId64, - buffer_user->buffer_pool->name, buffer_user->name, size, - buffer_user->allocated, buffer_user->free_pool); - } - if (buffer_user->free_pool < 0) { - grpc_closure_list_append(&buffer_user->on_allocated, optional_on_done, - GRPC_ERROR_NONE); - if (!buffer_user->allocating) { - buffer_user->allocating = true; - grpc_combiner_execute(exec_ctx, buffer_user->buffer_pool->combiner, - &buffer_user->allocate_closure, GRPC_ERROR_NONE, - false); - } - } else { - grpc_exec_ctx_sched(exec_ctx, optional_on_done, GRPC_ERROR_NONE, NULL); - } - gpr_mu_unlock(&buffer_user->mu); -} - -void grpc_buffer_user_free(grpc_exec_ctx *exec_ctx, - grpc_buffer_user *buffer_user, size_t size) { - gpr_mu_lock(&buffer_user->mu); - GPR_ASSERT(buffer_user->allocated >= (int64_t)size); - bool was_zero_or_negative = buffer_user->free_pool <= 0; - buffer_user->free_pool += (int64_t)size; - buffer_user->allocated -= (int64_t)size; - if (grpc_buffer_pool_trace) { - gpr_log(GPR_DEBUG, "BP %s %s: free %" PRIdPTR "; allocated -> %" PRId64 - ", free_pool -> %" PRId64, - buffer_user->buffer_pool->name, buffer_user->name, size, - buffer_user->allocated, buffer_user->free_pool); - } - bool is_bigger_than_zero = buffer_user->free_pool > 0; - if (is_bigger_than_zero && was_zero_or_negative && - !buffer_user->added_to_free_pool) { - buffer_user->added_to_free_pool = true; - grpc_combiner_execute(exec_ctx, buffer_user->buffer_pool->combiner, - &buffer_user->add_to_free_pool_closure, - GRPC_ERROR_NONE, false); - } - grpc_closure *on_done_destroy = (grpc_closure *)gpr_atm_no_barrier_load( - &buffer_user->on_done_destroy_closure); - if (on_done_destroy != NULL && buffer_user->allocated == 0) { - grpc_combiner_execute(exec_ctx, buffer_user->buffer_pool->combiner, - &buffer_user->destroy_closure, GRPC_ERROR_NONE, - false); - } - gpr_mu_unlock(&buffer_user->mu); -} - -void grpc_buffer_user_post_reclaimer(grpc_exec_ctx *exec_ctx, - grpc_buffer_user *buffer_user, - bool destructive, grpc_closure *closure) { - if (gpr_atm_acq_load(&buffer_user->on_done_destroy_closure) == 0) { - GPR_ASSERT(buffer_user->reclaimers[destructive] == NULL); - buffer_user->reclaimers[destructive] = closure; - grpc_combiner_execute(exec_ctx, buffer_user->buffer_pool->combiner, - &buffer_user->post_reclaimer_closure[destructive], - GRPC_ERROR_NONE, false); - } else { - grpc_exec_ctx_sched(exec_ctx, closure, GRPC_ERROR_CANCELLED, NULL); - } -} - -void grpc_buffer_user_finish_reclaimation(grpc_exec_ctx *exec_ctx, - grpc_buffer_user *buffer_user) { - if (grpc_buffer_pool_trace) { - gpr_log(GPR_DEBUG, "BP %s %s: reclaimation complete", - buffer_user->buffer_pool->name, buffer_user->name); - } - grpc_combiner_execute(exec_ctx, buffer_user->buffer_pool->combiner, - &buffer_user->buffer_pool->bpreclaimation_done_closure, - GRPC_ERROR_NONE, false); -} - -void grpc_buffer_user_slice_allocator_init( - grpc_buffer_user_slice_allocator *slice_allocator, - grpc_buffer_user *buffer_user, grpc_iomgr_cb_func cb, void *p) { - grpc_closure_init(&slice_allocator->on_allocated, bu_allocated_slices, - slice_allocator); - grpc_closure_init(&slice_allocator->on_done, cb, p); - slice_allocator->buffer_user = buffer_user; -} - -void grpc_buffer_user_alloc_slices( - grpc_exec_ctx *exec_ctx, grpc_buffer_user_slice_allocator *slice_allocator, - size_t length, size_t count, gpr_slice_buffer *dest) { - slice_allocator->length = length; - slice_allocator->count = count; - slice_allocator->dest = dest; - grpc_buffer_user_alloc(exec_ctx, slice_allocator->buffer_user, count * length, - &slice_allocator->on_allocated); -} diff --git a/src/core/lib/iomgr/buffer_pool.h b/src/core/lib/iomgr/buffer_pool.h deleted file mode 100644 index 1564872b5d..0000000000 --- a/src/core/lib/iomgr/buffer_pool.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - * - * Copyright 2016, 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. - * - */ - -#ifndef GRPC_CORE_LIB_IOMGR_BUFFER_POOL_H -#define GRPC_CORE_LIB_IOMGR_BUFFER_POOL_H - -#include - -#include "src/core/lib/iomgr/exec_ctx.h" - -extern int grpc_buffer_pool_trace; - -grpc_buffer_pool *grpc_buffer_pool_internal_ref(grpc_buffer_pool *buffer_pool); -void grpc_buffer_pool_internal_unref(grpc_exec_ctx *exec_ctx, - grpc_buffer_pool *buffer_pool); -grpc_buffer_pool *grpc_buffer_pool_from_channel_args( - const grpc_channel_args *channel_args); - -typedef enum { - GRPC_BULIST_AWAITING_ALLOCATION, - GRPC_BULIST_NON_EMPTY_FREE_POOL, - GRPC_BULIST_RECLAIMER_BENIGN, - GRPC_BULIST_RECLAIMER_DESTRUCTIVE, - GRPC_BULIST_COUNT -} grpc_bulist; - -typedef struct grpc_buffer_user grpc_buffer_user; - -typedef struct { - grpc_buffer_user *next; - grpc_buffer_user *prev; -} grpc_buffer_user_link; - -struct grpc_buffer_user { - grpc_buffer_pool *buffer_pool; - - grpc_closure allocate_closure; - grpc_closure add_to_free_pool_closure; - -#ifndef NDEBUG - void *asan_canary; -#endif - - gpr_mu mu; - int64_t allocated; - int64_t free_pool; - grpc_closure_list on_allocated; - bool allocating; - bool added_to_free_pool; - - grpc_closure *reclaimers[2]; - grpc_closure post_reclaimer_closure[2]; - - grpc_closure destroy_closure; - gpr_atm on_done_destroy_closure; - - grpc_buffer_user_link links[GRPC_BULIST_COUNT]; - - char *name; -}; - -void grpc_buffer_user_init(grpc_buffer_user *buffer_user, - grpc_buffer_pool *buffer_pool, const char *name); -void grpc_buffer_user_shutdown(grpc_exec_ctx *exec_ctx, - grpc_buffer_user *buffer_user, - grpc_closure *on_done); -void grpc_buffer_user_destroy(grpc_exec_ctx *exec_ctx, - grpc_buffer_user *buffer_user); - -void grpc_buffer_user_alloc(grpc_exec_ctx *exec_ctx, - grpc_buffer_user *buffer_user, size_t size, - grpc_closure *optional_on_done); -void grpc_buffer_user_free(grpc_exec_ctx *exec_ctx, - grpc_buffer_user *buffer_user, size_t size); -void grpc_buffer_user_post_reclaimer(grpc_exec_ctx *exec_ctx, - grpc_buffer_user *buffer_user, - bool destructive, grpc_closure *closure); -void grpc_buffer_user_finish_reclaimation(grpc_exec_ctx *exec_ctx, - grpc_buffer_user *buffer_user); - -typedef struct grpc_buffer_user_slice_allocator { - grpc_closure on_allocated; - grpc_closure on_done; - size_t length; - size_t count; - gpr_slice_buffer *dest; - grpc_buffer_user *buffer_user; -} grpc_buffer_user_slice_allocator; - -void grpc_buffer_user_slice_allocator_init( - grpc_buffer_user_slice_allocator *slice_allocator, - grpc_buffer_user *buffer_user, grpc_iomgr_cb_func cb, void *p); - -void grpc_buffer_user_alloc_slices( - grpc_exec_ctx *exec_ctx, grpc_buffer_user_slice_allocator *slice_allocator, - size_t length, size_t count, gpr_slice_buffer *dest); - -#endif /* GRPC_CORE_LIB_IOMGR_BUFFER_POOL_H */ diff --git a/src/core/lib/iomgr/endpoint.c b/src/core/lib/iomgr/endpoint.c index f3548a1d74..74fa9c45df 100644 --- a/src/core/lib/iomgr/endpoint.c +++ b/src/core/lib/iomgr/endpoint.c @@ -70,6 +70,6 @@ grpc_workqueue* grpc_endpoint_get_workqueue(grpc_endpoint* ep) { return ep->vtable->get_workqueue(ep); } -grpc_buffer_user* grpc_endpoint_get_buffer_user(grpc_endpoint* ep) { - return ep->vtable->get_buffer_user(ep); +grpc_resource_user* grpc_endpoint_get_resource_user(grpc_endpoint* ep) { + return ep->vtable->get_resource_user(ep); } diff --git a/src/core/lib/iomgr/endpoint.h b/src/core/lib/iomgr/endpoint.h index df6b899e39..819fcdda1a 100644 --- a/src/core/lib/iomgr/endpoint.h +++ b/src/core/lib/iomgr/endpoint.h @@ -37,7 +37,7 @@ #include #include #include -#include "src/core/lib/iomgr/buffer_pool.h" +#include "src/core/lib/iomgr/resource_quota.h" #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/pollset_set.h" @@ -59,7 +59,7 @@ struct grpc_endpoint_vtable { grpc_pollset_set *pollset); void (*shutdown)(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep); void (*destroy)(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep); - grpc_buffer_user *(*get_buffer_user)(grpc_endpoint *ep); + grpc_resource_user *(*get_resource_user)(grpc_endpoint *ep); char *(*get_peer)(grpc_endpoint *ep); }; @@ -102,7 +102,7 @@ void grpc_endpoint_add_to_pollset_set(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, grpc_pollset_set *pollset_set); -grpc_buffer_user *grpc_endpoint_get_buffer_user(grpc_endpoint *endpoint); +grpc_resource_user *grpc_endpoint_get_resource_user(grpc_endpoint *endpoint); struct grpc_endpoint { const grpc_endpoint_vtable *vtable; diff --git a/src/core/lib/iomgr/endpoint_pair.h b/src/core/lib/iomgr/endpoint_pair.h index 4938cf8599..27c17a0e97 100644 --- a/src/core/lib/iomgr/endpoint_pair.h +++ b/src/core/lib/iomgr/endpoint_pair.h @@ -42,6 +42,6 @@ typedef struct { } grpc_endpoint_pair; grpc_endpoint_pair grpc_iomgr_create_endpoint_pair( - const char *name, grpc_buffer_pool *buffer_pool, size_t read_slice_size); + const char *name, grpc_resource_quota *resource_quota, size_t read_slice_size); #endif /* GRPC_CORE_LIB_IOMGR_ENDPOINT_PAIR_H */ diff --git a/src/core/lib/iomgr/endpoint_pair_posix.c b/src/core/lib/iomgr/endpoint_pair_posix.c index 64c161675f..c1437bcf17 100644 --- a/src/core/lib/iomgr/endpoint_pair_posix.c +++ b/src/core/lib/iomgr/endpoint_pair_posix.c @@ -63,18 +63,18 @@ static void create_sockets(int sv[2]) { } grpc_endpoint_pair grpc_iomgr_create_endpoint_pair( - const char *name, grpc_buffer_pool *buffer_pool, size_t read_slice_size) { + const char *name, grpc_resource_quota *resource_quota, size_t read_slice_size) { int sv[2]; grpc_endpoint_pair p; char *final_name; create_sockets(sv); gpr_asprintf(&final_name, "%s:client", name); - p.client = grpc_tcp_create(grpc_fd_create(sv[1], final_name), buffer_pool, + p.client = grpc_tcp_create(grpc_fd_create(sv[1], final_name), resource_quota, read_slice_size, "socketpair-server"); gpr_free(final_name); gpr_asprintf(&final_name, "%s:server", name); - p.server = grpc_tcp_create(grpc_fd_create(sv[0], final_name), buffer_pool, + p.server = grpc_tcp_create(grpc_fd_create(sv[0], final_name), resource_quota, read_slice_size, "socketpair-client"); gpr_free(final_name); return p; diff --git a/src/core/lib/iomgr/resource_quota.c b/src/core/lib/iomgr/resource_quota.c new file mode 100644 index 0000000000..c4e6e5482a --- /dev/null +++ b/src/core/lib/iomgr/resource_quota.c @@ -0,0 +1,684 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include "src/core/lib/iomgr/resource_quota.h" + +#include + +#include +#include +#include +#include + +#include "src/core/lib/iomgr/combiner.h" + +int grpc_resource_quota_trace = 0; + +typedef bool (*bpstate_func)(grpc_exec_ctx *exec_ctx, + grpc_resource_quota *resource_quota); + +typedef struct { + grpc_resource_user *head; + grpc_resource_user *tail; +} grpc_resource_user_list; + +struct grpc_resource_quota { + gpr_refcount refs; + + grpc_combiner *combiner; + int64_t size; + int64_t free_pool; + + bool step_scheduled; + bool reclaiming; + grpc_closure bpstep_closure; + grpc_closure bpreclaimation_done_closure; + + grpc_resource_user *roots[GRPC_BULIST_COUNT]; + + char *name; +}; + +/******************************************************************************* + * list management + */ + +static void bulist_add_tail(grpc_resource_user *resource_user, grpc_bulist list) { + grpc_resource_quota *resource_quota = resource_user->resource_quota; + grpc_resource_user **root = &resource_quota->roots[list]; + if (*root == NULL) { + *root = resource_user; + resource_user->links[list].next = resource_user->links[list].prev = resource_user; + } else { + resource_user->links[list].next = *root; + resource_user->links[list].prev = (*root)->links[list].prev; + resource_user->links[list].next->links[list].prev = + resource_user->links[list].prev->links[list].next = resource_user; + } +} + +static void bulist_add_head(grpc_resource_user *resource_user, grpc_bulist list) { + grpc_resource_quota *resource_quota = resource_user->resource_quota; + grpc_resource_user **root = &resource_quota->roots[list]; + if (*root == NULL) { + *root = resource_user; + resource_user->links[list].next = resource_user->links[list].prev = resource_user; + } else { + resource_user->links[list].next = (*root)->links[list].next; + resource_user->links[list].prev = *root; + resource_user->links[list].next->links[list].prev = + resource_user->links[list].prev->links[list].next = resource_user; + *root = resource_user; + } +} + +static bool bulist_empty(grpc_resource_quota *resource_quota, grpc_bulist list) { + return resource_quota->roots[list] == NULL; +} + +static grpc_resource_user *bulist_pop(grpc_resource_quota *resource_quota, + grpc_bulist list) { + grpc_resource_user **root = &resource_quota->roots[list]; + grpc_resource_user *resource_user = *root; + if (resource_user == NULL) { + return NULL; + } + if (resource_user->links[list].next == resource_user) { + *root = NULL; + } else { + resource_user->links[list].next->links[list].prev = + resource_user->links[list].prev; + resource_user->links[list].prev->links[list].next = + resource_user->links[list].next; + *root = resource_user->links[list].next; + } + resource_user->links[list].next = resource_user->links[list].prev = NULL; + return resource_user; +} + +static void bulist_remove(grpc_resource_user *resource_user, grpc_bulist list) { + if (resource_user->links[list].next == NULL) return; + grpc_resource_quota *resource_quota = resource_user->resource_quota; + if (resource_quota->roots[list] == resource_user) { + resource_quota->roots[list] = resource_user->links[list].next; + if (resource_quota->roots[list] == resource_user) { + resource_quota->roots[list] = NULL; + } + } + resource_user->links[list].next->links[list].prev = + resource_user->links[list].prev; + resource_user->links[list].prev->links[list].next = + resource_user->links[list].next; +} + +/******************************************************************************* + * buffer pool state machine + */ + +static bool bpalloc(grpc_exec_ctx *exec_ctx, grpc_resource_quota *resource_quota); +static bool bpscavenge(grpc_exec_ctx *exec_ctx, grpc_resource_quota *resource_quota); +static bool bpreclaim(grpc_exec_ctx *exec_ctx, grpc_resource_quota *resource_quota, + bool destructive); + +static void bpstep(grpc_exec_ctx *exec_ctx, void *bp, grpc_error *error) { + grpc_resource_quota *resource_quota = bp; + resource_quota->step_scheduled = false; + do { + if (bpalloc(exec_ctx, resource_quota)) goto done; + } while (bpscavenge(exec_ctx, resource_quota)); + bpreclaim(exec_ctx, resource_quota, false) || + bpreclaim(exec_ctx, resource_quota, true); +done: + grpc_resource_quota_internal_unref(exec_ctx, resource_quota); +} + +static void bpstep_sched(grpc_exec_ctx *exec_ctx, + grpc_resource_quota *resource_quota) { + if (resource_quota->step_scheduled) return; + resource_quota->step_scheduled = true; + grpc_resource_quota_internal_ref(resource_quota); + grpc_combiner_execute_finally(exec_ctx, resource_quota->combiner, + &resource_quota->bpstep_closure, GRPC_ERROR_NONE, + false); +} + +/* returns true if all allocations are completed */ +static bool bpalloc(grpc_exec_ctx *exec_ctx, grpc_resource_quota *resource_quota) { + grpc_resource_user *resource_user; + while ((resource_user = + bulist_pop(resource_quota, GRPC_BULIST_AWAITING_ALLOCATION))) { + gpr_mu_lock(&resource_user->mu); + if (resource_user->free_pool < 0 && + -resource_user->free_pool <= resource_quota->free_pool) { + int64_t amt = -resource_user->free_pool; + resource_user->free_pool = 0; + resource_quota->free_pool -= amt; + if (grpc_resource_quota_trace) { + gpr_log(GPR_DEBUG, "BP %s %s: grant alloc %" PRId64 + " bytes; bp_free_pool -> %" PRId64, + resource_quota->name, resource_user->name, amt, + resource_quota->free_pool); + } + } else if (grpc_resource_quota_trace && resource_user->free_pool >= 0) { + gpr_log(GPR_DEBUG, "BP %s %s: discard already satisfied alloc request", + resource_quota->name, resource_user->name); + } + if (resource_user->free_pool >= 0) { + resource_user->allocating = false; + grpc_exec_ctx_enqueue_list(exec_ctx, &resource_user->on_allocated, NULL); + gpr_mu_unlock(&resource_user->mu); + } else { + bulist_add_head(resource_user, GRPC_BULIST_AWAITING_ALLOCATION); + gpr_mu_unlock(&resource_user->mu); + return false; + } + } + return true; +} + +/* returns true if any memory could be reclaimed from buffers */ +static bool bpscavenge(grpc_exec_ctx *exec_ctx, grpc_resource_quota *resource_quota) { + grpc_resource_user *resource_user; + while ((resource_user = + bulist_pop(resource_quota, GRPC_BULIST_NON_EMPTY_FREE_POOL))) { + gpr_mu_lock(&resource_user->mu); + if (resource_user->free_pool > 0) { + int64_t amt = resource_user->free_pool; + resource_user->free_pool = 0; + resource_quota->free_pool += amt; + if (grpc_resource_quota_trace) { + gpr_log(GPR_DEBUG, "BP %s %s: scavenge %" PRId64 + " bytes; bp_free_pool -> %" PRId64, + resource_quota->name, resource_user->name, amt, + resource_quota->free_pool); + } + gpr_mu_unlock(&resource_user->mu); + return true; + } else { + gpr_mu_unlock(&resource_user->mu); + } + } + return false; +} + +/* returns true if reclaimation is proceeding */ +static bool bpreclaim(grpc_exec_ctx *exec_ctx, grpc_resource_quota *resource_quota, + bool destructive) { + if (resource_quota->reclaiming) return true; + grpc_bulist list = destructive ? GRPC_BULIST_RECLAIMER_DESTRUCTIVE + : GRPC_BULIST_RECLAIMER_BENIGN; + grpc_resource_user *resource_user = bulist_pop(resource_quota, list); + if (resource_user == NULL) return false; + if (grpc_resource_quota_trace) { + gpr_log(GPR_DEBUG, "BP %s %s: initiate %s reclaimation", resource_quota->name, + resource_user->name, destructive ? "destructive" : "benign"); + } + resource_quota->reclaiming = true; + grpc_resource_quota_internal_ref(resource_quota); + grpc_closure *c = resource_user->reclaimers[destructive]; + resource_user->reclaimers[destructive] = NULL; + grpc_closure_run(exec_ctx, c, GRPC_ERROR_NONE); + return true; +} + +/******************************************************************************* + * bu_slice: a slice implementation that is backed by a grpc_resource_user + */ + +typedef struct { + gpr_slice_refcount base; + gpr_refcount refs; + grpc_resource_user *resource_user; + size_t size; +} bu_slice_refcount; + +static void bu_slice_ref(void *p) { + bu_slice_refcount *rc = p; + gpr_ref(&rc->refs); +} + +static void bu_slice_unref(void *p) { + bu_slice_refcount *rc = p; + if (gpr_unref(&rc->refs)) { + /* TODO(ctiller): this is dangerous, but I think safe for now: + we have no guarantee here that we're at a safe point for creating an + execution context, but we have no way of writing this code otherwise. + In the future: consider lifting gpr_slice to grpc, and offering an + internal_{ref,unref} pair that is execution context aware. Alternatively, + make exec_ctx be thread local and 'do the right thing' (whatever that is) + if NULL */ + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_free(&exec_ctx, rc->resource_user, rc->size); + grpc_exec_ctx_finish(&exec_ctx); + gpr_free(rc); + } +} + +static gpr_slice bu_slice_create(grpc_resource_user *resource_user, size_t size) { + bu_slice_refcount *rc = gpr_malloc(sizeof(bu_slice_refcount) + size); + rc->base.ref = bu_slice_ref; + rc->base.unref = bu_slice_unref; + gpr_ref_init(&rc->refs, 1); + rc->resource_user = resource_user; + rc->size = size; + gpr_slice slice; + slice.refcount = &rc->base; + slice.data.refcounted.bytes = (uint8_t *)(rc + 1); + slice.data.refcounted.length = size; + return slice; +} + +/******************************************************************************* + * grpc_resource_quota internal implementation + */ + +static void bu_allocate(grpc_exec_ctx *exec_ctx, void *bu, grpc_error *error) { + grpc_resource_user *resource_user = bu; + if (bulist_empty(resource_user->resource_quota, GRPC_BULIST_AWAITING_ALLOCATION)) { + bpstep_sched(exec_ctx, resource_user->resource_quota); + } + bulist_add_tail(resource_user, GRPC_BULIST_AWAITING_ALLOCATION); +} + +static void bu_add_to_free_pool(grpc_exec_ctx *exec_ctx, void *bu, + grpc_error *error) { + grpc_resource_user *resource_user = bu; + if (!bulist_empty(resource_user->resource_quota, + GRPC_BULIST_AWAITING_ALLOCATION) && + bulist_empty(resource_user->resource_quota, GRPC_BULIST_NON_EMPTY_FREE_POOL)) { + bpstep_sched(exec_ctx, resource_user->resource_quota); + } + bulist_add_tail(resource_user, GRPC_BULIST_NON_EMPTY_FREE_POOL); +} + +static void bu_post_benign_reclaimer(grpc_exec_ctx *exec_ctx, void *bu, + grpc_error *error) { + grpc_resource_user *resource_user = bu; + if (!bulist_empty(resource_user->resource_quota, + GRPC_BULIST_AWAITING_ALLOCATION) && + bulist_empty(resource_user->resource_quota, GRPC_BULIST_NON_EMPTY_FREE_POOL) && + bulist_empty(resource_user->resource_quota, GRPC_BULIST_RECLAIMER_BENIGN)) { + bpstep_sched(exec_ctx, resource_user->resource_quota); + } + bulist_add_tail(resource_user, GRPC_BULIST_RECLAIMER_BENIGN); +} + +static void bu_post_destructive_reclaimer(grpc_exec_ctx *exec_ctx, void *bu, + grpc_error *error) { + grpc_resource_user *resource_user = bu; + if (!bulist_empty(resource_user->resource_quota, + GRPC_BULIST_AWAITING_ALLOCATION) && + bulist_empty(resource_user->resource_quota, GRPC_BULIST_NON_EMPTY_FREE_POOL) && + bulist_empty(resource_user->resource_quota, GRPC_BULIST_RECLAIMER_BENIGN) && + bulist_empty(resource_user->resource_quota, + GRPC_BULIST_RECLAIMER_DESTRUCTIVE)) { + bpstep_sched(exec_ctx, resource_user->resource_quota); + } + bulist_add_tail(resource_user, GRPC_BULIST_RECLAIMER_DESTRUCTIVE); +} + +static void bu_destroy(grpc_exec_ctx *exec_ctx, void *bu, grpc_error *error) { + grpc_resource_user *resource_user = bu; + GPR_ASSERT(resource_user->allocated == 0); + for (int i = 0; i < GRPC_BULIST_COUNT; i++) { + bulist_remove(resource_user, (grpc_bulist)i); + } + grpc_exec_ctx_sched(exec_ctx, resource_user->reclaimers[0], + GRPC_ERROR_CANCELLED, NULL); + grpc_exec_ctx_sched(exec_ctx, resource_user->reclaimers[1], + GRPC_ERROR_CANCELLED, NULL); + grpc_exec_ctx_sched(exec_ctx, (grpc_closure *)gpr_atm_no_barrier_load( + &resource_user->on_done_destroy_closure), + GRPC_ERROR_NONE, NULL); + if (resource_user->free_pool != 0) { + resource_user->resource_quota->free_pool += resource_user->free_pool; + bpstep_sched(exec_ctx, resource_user->resource_quota); + } +} + +static void bu_allocated_slices(grpc_exec_ctx *exec_ctx, void *ts, + grpc_error *error) { + grpc_resource_user_slice_allocator *slice_allocator = ts; + if (error == GRPC_ERROR_NONE) { + for (size_t i = 0; i < slice_allocator->count; i++) { + gpr_slice_buffer_add_indexed(slice_allocator->dest, + bu_slice_create(slice_allocator->resource_user, + slice_allocator->length)); + } + } + grpc_closure_run(exec_ctx, &slice_allocator->on_done, GRPC_ERROR_REF(error)); +} + +typedef struct { + int64_t size; + grpc_resource_quota *resource_quota; + grpc_closure closure; +} bp_resize_args; + +static void bp_resize(grpc_exec_ctx *exec_ctx, void *args, grpc_error *error) { + bp_resize_args *a = args; + int64_t delta = a->size - a->resource_quota->size; + a->resource_quota->size += delta; + a->resource_quota->free_pool += delta; + if (delta < 0 && a->resource_quota->free_pool < 0) { + bpstep_sched(exec_ctx, a->resource_quota); + } else if (delta > 0 && + !bulist_empty(a->resource_quota, GRPC_BULIST_AWAITING_ALLOCATION)) { + bpstep_sched(exec_ctx, a->resource_quota); + } + grpc_resource_quota_internal_unref(exec_ctx, a->resource_quota); + gpr_free(a); +} + +static void bp_reclaimation_done(grpc_exec_ctx *exec_ctx, void *bp, + grpc_error *error) { + grpc_resource_quota *resource_quota = bp; + resource_quota->reclaiming = false; + bpstep_sched(exec_ctx, resource_quota); + grpc_resource_quota_internal_unref(exec_ctx, resource_quota); +} + +/******************************************************************************* + * grpc_resource_quota api + */ + +grpc_resource_quota *grpc_resource_quota_create(const char *name) { + grpc_resource_quota *resource_quota = gpr_malloc(sizeof(*resource_quota)); + gpr_ref_init(&resource_quota->refs, 1); + resource_quota->combiner = grpc_combiner_create(NULL); + resource_quota->free_pool = INT64_MAX; + resource_quota->size = INT64_MAX; + resource_quota->step_scheduled = false; + resource_quota->reclaiming = false; + if (name != NULL) { + resource_quota->name = gpr_strdup(name); + } else { + gpr_asprintf(&resource_quota->name, "anonymous_pool_%" PRIxPTR, + (intptr_t)resource_quota); + } + grpc_closure_init(&resource_quota->bpstep_closure, bpstep, resource_quota); + grpc_closure_init(&resource_quota->bpreclaimation_done_closure, + bp_reclaimation_done, resource_quota); + for (int i = 0; i < GRPC_BULIST_COUNT; i++) { + resource_quota->roots[i] = NULL; + } + return resource_quota; +} + +void grpc_resource_quota_internal_unref(grpc_exec_ctx *exec_ctx, + grpc_resource_quota *resource_quota) { + if (gpr_unref(&resource_quota->refs)) { + grpc_combiner_destroy(exec_ctx, resource_quota->combiner); + gpr_free(resource_quota->name); + gpr_free(resource_quota); + } +} + +void grpc_resource_quota_unref(grpc_resource_quota *resource_quota) { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_quota_internal_unref(&exec_ctx, resource_quota); + grpc_exec_ctx_finish(&exec_ctx); +} + +grpc_resource_quota *grpc_resource_quota_internal_ref(grpc_resource_quota *resource_quota) { + gpr_ref(&resource_quota->refs); + return resource_quota; +} + +void grpc_resource_quota_ref(grpc_resource_quota *resource_quota) { + grpc_resource_quota_internal_ref(resource_quota); +} + +void grpc_resource_quota_resize(grpc_resource_quota *resource_quota, size_t size) { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + bp_resize_args *a = gpr_malloc(sizeof(*a)); + a->resource_quota = grpc_resource_quota_internal_ref(resource_quota); + a->size = (int64_t)size; + grpc_closure_init(&a->closure, bp_resize, a); + grpc_combiner_execute(&exec_ctx, resource_quota->combiner, &a->closure, + GRPC_ERROR_NONE, false); + grpc_exec_ctx_finish(&exec_ctx); +} + +/******************************************************************************* + * grpc_resource_user channel args api + */ + +grpc_resource_quota *grpc_resource_quota_from_channel_args( + const grpc_channel_args *channel_args) { + for (size_t i = 0; i < channel_args->num_args; i++) { + if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_BUFFER_POOL)) { + if (channel_args->args[i].type == GRPC_ARG_POINTER) { + return grpc_resource_quota_internal_ref( + channel_args->args[i].value.pointer.p); + } else { + gpr_log(GPR_DEBUG, GRPC_ARG_BUFFER_POOL " should be a pointer"); + } + } + } + return grpc_resource_quota_create(NULL); +} + +static void *bp_copy(void *bp) { + grpc_resource_quota_ref(bp); + return bp; +} + +static void bp_destroy(void *bp) { grpc_resource_quota_unref(bp); } + +static int bp_cmp(void *a, void *b) { return GPR_ICMP(a, b); } + +const grpc_arg_pointer_vtable *grpc_resource_quota_arg_vtable(void) { + static const grpc_arg_pointer_vtable vtable = {bp_copy, bp_destroy, bp_cmp}; + return &vtable; +} + +/******************************************************************************* + * grpc_resource_user api + */ + +void grpc_resource_user_init(grpc_resource_user *resource_user, + grpc_resource_quota *resource_quota, const char *name) { + resource_user->resource_quota = grpc_resource_quota_internal_ref(resource_quota); + grpc_closure_init(&resource_user->allocate_closure, &bu_allocate, resource_user); + grpc_closure_init(&resource_user->add_to_free_pool_closure, + &bu_add_to_free_pool, resource_user); + grpc_closure_init(&resource_user->post_reclaimer_closure[0], + &bu_post_benign_reclaimer, resource_user); + grpc_closure_init(&resource_user->post_reclaimer_closure[1], + &bu_post_destructive_reclaimer, resource_user); + grpc_closure_init(&resource_user->destroy_closure, &bu_destroy, resource_user); + gpr_mu_init(&resource_user->mu); + resource_user->allocated = 0; + resource_user->free_pool = 0; + grpc_closure_list_init(&resource_user->on_allocated); + resource_user->allocating = false; + resource_user->added_to_free_pool = false; + gpr_atm_no_barrier_store(&resource_user->on_done_destroy_closure, 0); + resource_user->reclaimers[0] = NULL; + resource_user->reclaimers[1] = NULL; + for (int i = 0; i < GRPC_BULIST_COUNT; i++) { + resource_user->links[i].next = resource_user->links[i].prev = NULL; + } +#ifndef NDEBUG + resource_user->asan_canary = gpr_malloc(1); +#endif + if (name != NULL) { + resource_user->name = gpr_strdup(name); + } else { + gpr_asprintf(&resource_user->name, "anonymous_resource_user_%" PRIxPTR, + (intptr_t)resource_user); + } +} + +void grpc_resource_user_shutdown(grpc_exec_ctx *exec_ctx, + grpc_resource_user *resource_user, + grpc_closure *on_done) { + gpr_mu_lock(&resource_user->mu); + GPR_ASSERT(gpr_atm_no_barrier_load(&resource_user->on_done_destroy_closure) == + 0); + gpr_atm_no_barrier_store(&resource_user->on_done_destroy_closure, + (gpr_atm)on_done); + if (resource_user->allocated == 0) { + grpc_combiner_execute(exec_ctx, resource_user->resource_quota->combiner, + &resource_user->destroy_closure, GRPC_ERROR_NONE, + false); + } + gpr_mu_unlock(&resource_user->mu); +} + +void grpc_resource_user_destroy(grpc_exec_ctx *exec_ctx, + grpc_resource_user *resource_user) { +#ifndef NDEBUG + gpr_free(resource_user->asan_canary); +#endif + grpc_resource_quota_internal_unref(exec_ctx, resource_user->resource_quota); + gpr_mu_destroy(&resource_user->mu); + gpr_free(resource_user->name); +} + +void grpc_resource_user_alloc(grpc_exec_ctx *exec_ctx, + grpc_resource_user *resource_user, size_t size, + grpc_closure *optional_on_done) { + gpr_mu_lock(&resource_user->mu); + grpc_closure *on_done_destroy = (grpc_closure *)gpr_atm_no_barrier_load( + &resource_user->on_done_destroy_closure); + if (on_done_destroy != NULL) { + /* already shutdown */ + if (grpc_resource_quota_trace) { + gpr_log(GPR_DEBUG, "BP %s %s: alloc %" PRIdPTR " after shutdown", + resource_user->resource_quota->name, resource_user->name, size); + } + grpc_exec_ctx_sched( + exec_ctx, optional_on_done, + GRPC_ERROR_CREATE("Buffer pool user is already shutdown"), NULL); + gpr_mu_unlock(&resource_user->mu); + return; + } + resource_user->allocated += (int64_t)size; + resource_user->free_pool -= (int64_t)size; + if (grpc_resource_quota_trace) { + gpr_log(GPR_DEBUG, "BP %s %s: alloc %" PRIdPTR "; allocated -> %" PRId64 + ", free_pool -> %" PRId64, + resource_user->resource_quota->name, resource_user->name, size, + resource_user->allocated, resource_user->free_pool); + } + if (resource_user->free_pool < 0) { + grpc_closure_list_append(&resource_user->on_allocated, optional_on_done, + GRPC_ERROR_NONE); + if (!resource_user->allocating) { + resource_user->allocating = true; + grpc_combiner_execute(exec_ctx, resource_user->resource_quota->combiner, + &resource_user->allocate_closure, GRPC_ERROR_NONE, + false); + } + } else { + grpc_exec_ctx_sched(exec_ctx, optional_on_done, GRPC_ERROR_NONE, NULL); + } + gpr_mu_unlock(&resource_user->mu); +} + +void grpc_resource_user_free(grpc_exec_ctx *exec_ctx, + grpc_resource_user *resource_user, size_t size) { + gpr_mu_lock(&resource_user->mu); + GPR_ASSERT(resource_user->allocated >= (int64_t)size); + bool was_zero_or_negative = resource_user->free_pool <= 0; + resource_user->free_pool += (int64_t)size; + resource_user->allocated -= (int64_t)size; + if (grpc_resource_quota_trace) { + gpr_log(GPR_DEBUG, "BP %s %s: free %" PRIdPTR "; allocated -> %" PRId64 + ", free_pool -> %" PRId64, + resource_user->resource_quota->name, resource_user->name, size, + resource_user->allocated, resource_user->free_pool); + } + bool is_bigger_than_zero = resource_user->free_pool > 0; + if (is_bigger_than_zero && was_zero_or_negative && + !resource_user->added_to_free_pool) { + resource_user->added_to_free_pool = true; + grpc_combiner_execute(exec_ctx, resource_user->resource_quota->combiner, + &resource_user->add_to_free_pool_closure, + GRPC_ERROR_NONE, false); + } + grpc_closure *on_done_destroy = (grpc_closure *)gpr_atm_no_barrier_load( + &resource_user->on_done_destroy_closure); + if (on_done_destroy != NULL && resource_user->allocated == 0) { + grpc_combiner_execute(exec_ctx, resource_user->resource_quota->combiner, + &resource_user->destroy_closure, GRPC_ERROR_NONE, + false); + } + gpr_mu_unlock(&resource_user->mu); +} + +void grpc_resource_user_post_reclaimer(grpc_exec_ctx *exec_ctx, + grpc_resource_user *resource_user, + bool destructive, grpc_closure *closure) { + if (gpr_atm_acq_load(&resource_user->on_done_destroy_closure) == 0) { + GPR_ASSERT(resource_user->reclaimers[destructive] == NULL); + resource_user->reclaimers[destructive] = closure; + grpc_combiner_execute(exec_ctx, resource_user->resource_quota->combiner, + &resource_user->post_reclaimer_closure[destructive], + GRPC_ERROR_NONE, false); + } else { + grpc_exec_ctx_sched(exec_ctx, closure, GRPC_ERROR_CANCELLED, NULL); + } +} + +void grpc_resource_user_finish_reclaimation(grpc_exec_ctx *exec_ctx, + grpc_resource_user *resource_user) { + if (grpc_resource_quota_trace) { + gpr_log(GPR_DEBUG, "BP %s %s: reclaimation complete", + resource_user->resource_quota->name, resource_user->name); + } + grpc_combiner_execute(exec_ctx, resource_user->resource_quota->combiner, + &resource_user->resource_quota->bpreclaimation_done_closure, + GRPC_ERROR_NONE, false); +} + +void grpc_resource_user_slice_allocator_init( + grpc_resource_user_slice_allocator *slice_allocator, + grpc_resource_user *resource_user, grpc_iomgr_cb_func cb, void *p) { + grpc_closure_init(&slice_allocator->on_allocated, bu_allocated_slices, + slice_allocator); + grpc_closure_init(&slice_allocator->on_done, cb, p); + slice_allocator->resource_user = resource_user; +} + +void grpc_resource_user_alloc_slices( + grpc_exec_ctx *exec_ctx, grpc_resource_user_slice_allocator *slice_allocator, + size_t length, size_t count, gpr_slice_buffer *dest) { + slice_allocator->length = length; + slice_allocator->count = count; + slice_allocator->dest = dest; + grpc_resource_user_alloc(exec_ctx, slice_allocator->resource_user, count * length, + &slice_allocator->on_allocated); +} diff --git a/src/core/lib/iomgr/resource_quota.h b/src/core/lib/iomgr/resource_quota.h new file mode 100644 index 0000000000..5c566e492c --- /dev/null +++ b/src/core/lib/iomgr/resource_quota.h @@ -0,0 +1,131 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#ifndef GRPC_CORE_LIB_IOMGR_BUFFER_POOL_H +#define GRPC_CORE_LIB_IOMGR_BUFFER_POOL_H + +#include + +#include "src/core/lib/iomgr/exec_ctx.h" + +extern int grpc_resource_quota_trace; + +grpc_resource_quota *grpc_resource_quota_internal_ref( + grpc_resource_quota *resource_quota); +void grpc_resource_quota_internal_unref(grpc_exec_ctx *exec_ctx, + grpc_resource_quota *resource_quota); +grpc_resource_quota *grpc_resource_quota_from_channel_args( + const grpc_channel_args *channel_args); + +typedef enum { + GRPC_BULIST_AWAITING_ALLOCATION, + GRPC_BULIST_NON_EMPTY_FREE_POOL, + GRPC_BULIST_RECLAIMER_BENIGN, + GRPC_BULIST_RECLAIMER_DESTRUCTIVE, + GRPC_BULIST_COUNT +} grpc_bulist; + +typedef struct grpc_resource_user grpc_resource_user; + +typedef struct { + grpc_resource_user *next; + grpc_resource_user *prev; +} grpc_resource_user_link; + +struct grpc_resource_user { + grpc_resource_quota *resource_quota; + + grpc_closure allocate_closure; + grpc_closure add_to_free_pool_closure; + +#ifndef NDEBUG + void *asan_canary; +#endif + + gpr_mu mu; + int64_t allocated; + int64_t free_pool; + grpc_closure_list on_allocated; + bool allocating; + bool added_to_free_pool; + + grpc_closure *reclaimers[2]; + grpc_closure post_reclaimer_closure[2]; + + grpc_closure destroy_closure; + gpr_atm on_done_destroy_closure; + + grpc_resource_user_link links[GRPC_BULIST_COUNT]; + + char *name; +}; + +void grpc_resource_user_init(grpc_resource_user *resource_user, + grpc_resource_quota *resource_quota, + const char *name); +void grpc_resource_user_shutdown(grpc_exec_ctx *exec_ctx, + grpc_resource_user *resource_user, + grpc_closure *on_done); +void grpc_resource_user_destroy(grpc_exec_ctx *exec_ctx, + grpc_resource_user *resource_user); + +void grpc_resource_user_alloc(grpc_exec_ctx *exec_ctx, + grpc_resource_user *resource_user, size_t size, + grpc_closure *optional_on_done); +void grpc_resource_user_free(grpc_exec_ctx *exec_ctx, + grpc_resource_user *resource_user, size_t size); +void grpc_resource_user_post_reclaimer(grpc_exec_ctx *exec_ctx, + grpc_resource_user *resource_user, + bool destructive, grpc_closure *closure); +void grpc_resource_user_finish_reclaimation(grpc_exec_ctx *exec_ctx, + grpc_resource_user *resource_user); + +typedef struct grpc_resource_user_slice_allocator { + grpc_closure on_allocated; + grpc_closure on_done; + size_t length; + size_t count; + gpr_slice_buffer *dest; + grpc_resource_user *resource_user; +} grpc_resource_user_slice_allocator; + +void grpc_resource_user_slice_allocator_init( + grpc_resource_user_slice_allocator *slice_allocator, + grpc_resource_user *resource_user, grpc_iomgr_cb_func cb, void *p); + +void grpc_resource_user_alloc_slices( + grpc_exec_ctx *exec_ctx, + grpc_resource_user_slice_allocator *slice_allocator, size_t length, + size_t count, gpr_slice_buffer *dest); + +#endif /* GRPC_CORE_LIB_IOMGR_BUFFER_POOL_H */ diff --git a/src/core/lib/iomgr/tcp_client_posix.c b/src/core/lib/iomgr/tcp_client_posix.c index dadd4cc2eb..e74a696c2f 100644 --- a/src/core/lib/iomgr/tcp_client_posix.c +++ b/src/core/lib/iomgr/tcp_client_posix.c @@ -125,7 +125,7 @@ grpc_endpoint *grpc_tcp_client_create_from_fd( grpc_exec_ctx *exec_ctx, grpc_fd *fd, const grpc_channel_args *channel_args, const char *addr_str) { size_t tcp_read_chunk_size = GRPC_TCP_DEFAULT_READ_SLICE_SIZE; - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create(NULL); + grpc_resource_quota *resource_quota = grpc_resource_quota_create(NULL); if (channel_args != NULL) { for (size_t i = 0; i < channel_args->num_args; i++) { if (0 == @@ -135,16 +135,16 @@ grpc_endpoint *grpc_tcp_client_create_from_fd( tcp_read_chunk_size = (size_t)grpc_channel_arg_get_integer( &channel_args->args[i], options); } else if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_BUFFER_POOL)) { - grpc_buffer_pool_internal_unref(exec_ctx, buffer_pool); - buffer_pool = grpc_buffer_pool_internal_ref( + grpc_resource_quota_internal_unref(exec_ctx, resource_quota); + resource_quota = grpc_resource_quota_internal_ref( channel_args->args[i].value.pointer.p); } } } grpc_endpoint *ep = - grpc_tcp_create(fd, buffer_pool, tcp_read_chunk_size, addr_str); - grpc_buffer_pool_internal_unref(exec_ctx, buffer_pool); + grpc_tcp_create(fd, resource_quota, tcp_read_chunk_size, addr_str); + grpc_resource_quota_internal_unref(exec_ctx, resource_quota); return ep; } diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 648ca52818..27b6677545 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -102,8 +102,8 @@ typedef struct { char *peer_string; - grpc_buffer_user buffer_user; - grpc_buffer_user_slice_allocator slice_allocator; + grpc_resource_user resource_user; + grpc_resource_user_slice_allocator slice_allocator; } grpc_tcp; static void tcp_handle_read(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, @@ -113,17 +113,17 @@ static void tcp_handle_write(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, static void tcp_unref_closure(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, grpc_error *error); -static void tcp_maybe_shutdown_buffer_user(grpc_exec_ctx *exec_ctx, - grpc_tcp *tcp) { +static void tcp_maybe_shutdown_resource_user(grpc_exec_ctx *exec_ctx, + grpc_tcp *tcp) { if (gpr_atm_full_fetch_add(&tcp->shutdown_count, 1) == 0) { - grpc_buffer_user_shutdown(exec_ctx, &tcp->buffer_user, - grpc_closure_create(tcp_unref_closure, tcp)); + grpc_resource_user_shutdown(exec_ctx, &tcp->resource_user, + grpc_closure_create(tcp_unref_closure, tcp)); } } static void tcp_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_tcp *tcp = (grpc_tcp *)ep; - tcp_maybe_shutdown_buffer_user(exec_ctx, tcp); + tcp_maybe_shutdown_resource_user(exec_ctx, tcp); grpc_fd_shutdown(exec_ctx, tcp->em_fd); } @@ -131,7 +131,7 @@ static void tcp_free(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { grpc_fd_orphan(exec_ctx, tcp->em_fd, tcp->release_fd_cb, tcp->release_fd, "tcp_unref_orphan"); gpr_slice_buffer_destroy(&tcp->last_read_buffer); - grpc_buffer_user_destroy(exec_ctx, &tcp->buffer_user); + grpc_resource_user_destroy(exec_ctx, &tcp->resource_user); gpr_free(tcp->peer_string); gpr_free(tcp); } @@ -170,13 +170,13 @@ static void tcp_ref(grpc_tcp *tcp) { gpr_ref(&tcp->refcount); } static void tcp_unref_closure(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { - TCP_UNREF(exec_ctx, arg, "buffer_user"); + TCP_UNREF(exec_ctx, arg, "resource_user"); } static void tcp_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_network_status_unregister_endpoint(ep); grpc_tcp *tcp = (grpc_tcp *)ep; - tcp_maybe_shutdown_buffer_user(exec_ctx, tcp); + tcp_maybe_shutdown_resource_user(exec_ctx, tcp); gpr_slice_buffer_reset_and_unref(&tcp->last_read_buffer); TCP_UNREF(exec_ctx, tcp, "destroy"); } @@ -286,7 +286,7 @@ static void tcp_read_allocation_done(grpc_exec_ctx *exec_ctx, void *tcpp, static void tcp_continue_read(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { if (tcp->incoming_buffer->count < (size_t)tcp->iov_size) { - grpc_buffer_user_alloc_slices( + grpc_resource_user_alloc_slices( exec_ctx, &tcp->slice_allocator, tcp->slice_size, (size_t)tcp->iov_size - tcp->incoming_buffer->count, tcp->incoming_buffer); @@ -513,9 +513,9 @@ static grpc_workqueue *tcp_get_workqueue(grpc_endpoint *ep) { return grpc_fd_get_workqueue(tcp->em_fd); } -static grpc_buffer_user *tcp_get_buffer_user(grpc_endpoint *ep) { +static grpc_resource_user *tcp_get_resource_user(grpc_endpoint *ep) { grpc_tcp *tcp = (grpc_tcp *)ep; - return &tcp->buffer_user; + return &tcp->resource_user; } static const grpc_endpoint_vtable vtable = {tcp_read, @@ -525,10 +525,11 @@ static const grpc_endpoint_vtable vtable = {tcp_read, tcp_add_to_pollset_set, tcp_shutdown, tcp_destroy, - tcp_get_buffer_user, + tcp_get_resource_user, tcp_get_peer}; -grpc_endpoint *grpc_tcp_create(grpc_fd *em_fd, grpc_buffer_pool *buffer_pool, +grpc_endpoint *grpc_tcp_create(grpc_fd *em_fd, + grpc_resource_quota *resource_quota, size_t slice_size, const char *peer_string) { grpc_tcp *tcp = (grpc_tcp *)gpr_malloc(sizeof(grpc_tcp)); tcp->base.vtable = &vtable; @@ -543,7 +544,7 @@ grpc_endpoint *grpc_tcp_create(grpc_fd *em_fd, grpc_buffer_pool *buffer_pool, tcp->iov_size = 1; tcp->finished_edge = true; /* paired with unref in grpc_tcp_destroy, and with the shutdown for our - * buffer_user */ + * resource_user */ gpr_ref_init(&tcp->refcount, 2); gpr_atm_no_barrier_store(&tcp->shutdown_count, 0); tcp->em_fd = em_fd; @@ -552,9 +553,10 @@ grpc_endpoint *grpc_tcp_create(grpc_fd *em_fd, grpc_buffer_pool *buffer_pool, tcp->write_closure.cb = tcp_handle_write; tcp->write_closure.cb_arg = tcp; gpr_slice_buffer_init(&tcp->last_read_buffer); - grpc_buffer_user_init(&tcp->buffer_user, buffer_pool, peer_string); - grpc_buffer_user_slice_allocator_init( - &tcp->slice_allocator, &tcp->buffer_user, tcp_read_allocation_done, tcp); + grpc_resource_user_init(&tcp->resource_user, resource_quota, peer_string); + grpc_resource_user_slice_allocator_init(&tcp->slice_allocator, + &tcp->resource_user, + tcp_read_allocation_done, tcp); /* Tell network status tracker about new endpoint */ grpc_network_status_register_endpoint(&tcp->base); @@ -574,7 +576,7 @@ void grpc_tcp_destroy_and_release_fd(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, GPR_ASSERT(ep->vtable == &vtable); tcp->release_fd = fd; tcp->release_fd_cb = done; - tcp_maybe_shutdown_buffer_user(exec_ctx, tcp); + tcp_maybe_shutdown_resource_user(exec_ctx, tcp); gpr_slice_buffer_reset_and_unref(&tcp->last_read_buffer); TCP_UNREF(exec_ctx, tcp, "destroy"); } diff --git a/src/core/lib/iomgr/tcp_posix.h b/src/core/lib/iomgr/tcp_posix.h index 768355cf0c..1c0d13f96e 100644 --- a/src/core/lib/iomgr/tcp_posix.h +++ b/src/core/lib/iomgr/tcp_posix.h @@ -53,7 +53,7 @@ extern int grpc_tcp_trace; /* Create a tcp endpoint given a file desciptor and a read slice size. Takes ownership of fd. */ -grpc_endpoint *grpc_tcp_create(grpc_fd *fd, grpc_buffer_pool *buffer_pool, +grpc_endpoint *grpc_tcp_create(grpc_fd *fd, grpc_resource_quota *resource_quota, size_t read_slice_size, const char *peer_string); /* Return the tcp endpoint's fd, or -1 if this is not available. Does not diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index 2afce529ef..b2eb89f429 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -138,7 +138,7 @@ struct grpc_tcp_server { /* next pollset to assign a channel to */ gpr_atm next_pollset_to_assign; - grpc_buffer_pool *buffer_pool; + grpc_resource_quota *resource_quota; }; static gpr_once check_init = GPR_ONCE_INIT; @@ -163,25 +163,25 @@ grpc_error *grpc_tcp_server_create(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s = gpr_malloc(sizeof(grpc_tcp_server)); s->so_reuseport = has_so_reuseport; - s->buffer_pool = grpc_buffer_pool_create(NULL); + s->resource_quota = grpc_resource_quota_create(NULL); for (size_t i = 0; i < (args == NULL ? 0 : args->num_args); i++) { if (0 == strcmp(GRPC_ARG_ALLOW_REUSEPORT, args->args[i].key)) { if (args->args[i].type == GRPC_ARG_INTEGER) { s->so_reuseport = has_so_reuseport && (args->args[i].value.integer != 0); } else { - grpc_buffer_pool_internal_unref(exec_ctx, s->buffer_pool); + grpc_resource_quota_internal_unref(exec_ctx, s->resource_quota); gpr_free(s); return GRPC_ERROR_CREATE(GRPC_ARG_ALLOW_REUSEPORT " must be an integer"); } } else if (0 == strcmp(GRPC_ARG_BUFFER_POOL, args->args[i].key)) { if (args->args[i].type == GRPC_ARG_POINTER) { - grpc_buffer_pool_internal_unref(exec_ctx, s->buffer_pool); - s->buffer_pool = - grpc_buffer_pool_internal_ref(args->args[i].value.pointer.p); + grpc_resource_quota_internal_unref(exec_ctx, s->resource_quota); + s->resource_quota = + grpc_resource_quota_internal_ref(args->args[i].value.pointer.p); } else { - grpc_buffer_pool_internal_unref(exec_ctx, s->buffer_pool); + grpc_resource_quota_internal_unref(exec_ctx, s->resource_quota); gpr_free(s); return GRPC_ERROR_CREATE(GRPC_ARG_BUFFER_POOL " must be a pointer to a buffer pool"); @@ -222,7 +222,7 @@ static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { gpr_free(sp); } - grpc_buffer_pool_internal_unref(exec_ctx, s->buffer_pool); + grpc_resource_quota_internal_unref(exec_ctx, s->resource_quota); gpr_free(s); } @@ -440,7 +440,7 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *err) { sp->server->on_accept_cb( exec_ctx, sp->server->on_accept_cb_arg, - grpc_tcp_create(fdobj, sp->server->buffer_pool, + grpc_tcp_create(fdobj, sp->server->resource_quota, GRPC_TCP_DEFAULT_READ_SLICE_SIZE, addr_str), read_notifier_pollset, &acceptor); diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.c b/src/core/lib/security/credentials/google_default/google_default_credentials.c index 4e703aa9f4..cb5ba554b0 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.c +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.c @@ -124,14 +124,14 @@ static int is_stack_running_on_compute_engine(void) { grpc_httpcli_context_init(&context); - grpc_buffer_pool *buffer_pool = - grpc_buffer_pool_create("google_default_credentials"); + grpc_resource_quota *resource_quota = + grpc_resource_quota_create("google_default_credentials"); grpc_httpcli_get( - &exec_ctx, &context, &detector.pollent, buffer_pool, &request, + &exec_ctx, &context, &detector.pollent, resource_quota, &request, gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), max_detection_delay), grpc_closure_create(on_compute_engine_detection_http_response, &detector), &detector.response); - grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); + grpc_resource_quota_internal_unref(&exec_ctx, resource_quota); grpc_exec_ctx_flush(&exec_ctx); diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.c b/src/core/lib/security/credentials/jwt/jwt_verifier.c index ffcd0b3910..0339fd5d61 100644 --- a/src/core/lib/security/credentials/jwt/jwt_verifier.c +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.c @@ -657,16 +657,16 @@ static void on_openid_config_retrieved(grpc_exec_ctx *exec_ctx, void *user_data, *(req.host + (req.http.path - jwks_uri)) = '\0'; } - /* TODO(ctiller): Carry the buffer_pool in ctx and share it with the host + /* TODO(ctiller): Carry the resource_quota in ctx and share it with the host channel. This would allow us to cancel an authentication query when under extreme memory pressure. */ - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("jwt_verifier"); + grpc_resource_quota *resource_quota = grpc_resource_quota_create("jwt_verifier"); grpc_httpcli_get( - exec_ctx, &ctx->verifier->http_ctx, &ctx->pollent, buffer_pool, &req, + exec_ctx, &ctx->verifier->http_ctx, &ctx->pollent, resource_quota, &req, gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), grpc_jwt_verifier_max_delay), grpc_closure_create(on_keys_retrieved, ctx), &ctx->responses[HTTP_RESPONSE_KEYS]); - grpc_buffer_pool_internal_unref(exec_ctx, buffer_pool); + grpc_resource_quota_internal_unref(exec_ctx, resource_quota); grpc_json_destroy(json); gpr_free(req.host); return; @@ -769,15 +769,15 @@ static void retrieve_key_and_verify(grpc_exec_ctx *exec_ctx, rsp_idx = HTTP_RESPONSE_OPENID; } - /* TODO(ctiller): Carry the buffer_pool in ctx and share it with the host + /* TODO(ctiller): Carry the resource_quota in ctx and share it with the host channel. This would allow us to cancel an authentication query when under extreme memory pressure. */ - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("jwt_verifier"); + grpc_resource_quota *resource_quota = grpc_resource_quota_create("jwt_verifier"); grpc_httpcli_get( - exec_ctx, &ctx->verifier->http_ctx, &ctx->pollent, buffer_pool, &req, + exec_ctx, &ctx->verifier->http_ctx, &ctx->pollent, resource_quota, &req, gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), grpc_jwt_verifier_max_delay), http_cb, &ctx->responses[rsp_idx]); - grpc_buffer_pool_internal_unref(exec_ctx, buffer_pool); + grpc_resource_quota_internal_unref(exec_ctx, resource_quota); gpr_free(req.host); gpr_free(req.http.path); return; diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.c b/src/core/lib/security/credentials/oauth2/oauth2_credentials.c index 61c0815b2a..102831637b 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.c +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.c @@ -307,14 +307,14 @@ static void compute_engine_fetch_oauth2( request.http.path = GRPC_COMPUTE_ENGINE_METADATA_TOKEN_PATH; request.http.hdr_count = 1; request.http.hdrs = &header; - /* TODO(ctiller): Carry the buffer_pool in ctx and share it with the host + /* TODO(ctiller): Carry the resource_quota in ctx and share it with the host channel. This would allow us to cancel an authentication query when under extreme memory pressure. */ - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("oauth2_credentials"); - grpc_httpcli_get(exec_ctx, httpcli_context, pollent, buffer_pool, &request, + grpc_resource_quota *resource_quota = grpc_resource_quota_create("oauth2_credentials"); + grpc_httpcli_get(exec_ctx, httpcli_context, pollent, resource_quota, &request, deadline, grpc_closure_create(response_cb, metadata_req), &metadata_req->response); - grpc_buffer_pool_internal_unref(exec_ctx, buffer_pool); + grpc_resource_quota_internal_unref(exec_ctx, resource_quota); } grpc_call_credentials *grpc_google_compute_engine_credentials_create( @@ -362,16 +362,16 @@ static void refresh_token_fetch_oauth2( request.http.hdr_count = 1; request.http.hdrs = &header; request.handshaker = &grpc_httpcli_ssl; - /* TODO(ctiller): Carry the buffer_pool in ctx and share it with the host + /* TODO(ctiller): Carry the resource_quota in ctx and share it with the host channel. This would allow us to cancel an authentication query when under extreme memory pressure. */ - grpc_buffer_pool *buffer_pool = - grpc_buffer_pool_create("oauth2_credentials_refresh"); - grpc_httpcli_post(exec_ctx, httpcli_context, pollent, buffer_pool, &request, + grpc_resource_quota *resource_quota = + grpc_resource_quota_create("oauth2_credentials_refresh"); + grpc_httpcli_post(exec_ctx, httpcli_context, pollent, resource_quota, &request, body, strlen(body), deadline, grpc_closure_create(response_cb, metadata_req), &metadata_req->response); - grpc_buffer_pool_internal_unref(exec_ctx, buffer_pool); + grpc_resource_quota_internal_unref(exec_ctx, resource_quota); gpr_free(body); } diff --git a/src/core/lib/security/transport/secure_endpoint.c b/src/core/lib/security/transport/secure_endpoint.c index ee6b9f97e8..9f84237171 100644 --- a/src/core/lib/security/transport/secure_endpoint.c +++ b/src/core/lib/security/transport/secure_endpoint.c @@ -370,9 +370,9 @@ static grpc_workqueue *endpoint_get_workqueue(grpc_endpoint *secure_ep) { return grpc_endpoint_get_workqueue(ep->wrapped_ep); } -static grpc_buffer_user *endpoint_get_buffer_user(grpc_endpoint *secure_ep) { +static grpc_resource_user *endpoint_get_resource_user(grpc_endpoint *secure_ep) { secure_endpoint *ep = (secure_endpoint *)secure_ep; - return grpc_endpoint_get_buffer_user(ep->wrapped_ep); + return grpc_endpoint_get_resource_user(ep->wrapped_ep); } static const grpc_endpoint_vtable vtable = {endpoint_read, @@ -382,7 +382,7 @@ static const grpc_endpoint_vtable vtable = {endpoint_read, endpoint_add_to_pollset_set, endpoint_shutdown, endpoint_destroy, - endpoint_get_buffer_user, + endpoint_get_resource_user, endpoint_get_peer}; grpc_endpoint *grpc_secure_endpoint_create( diff --git a/src/core/lib/surface/init.c b/src/core/lib/surface/init.c index 39cab0cc5f..7903f57a68 100644 --- a/src/core/lib/surface/init.c +++ b/src/core/lib/surface/init.c @@ -49,10 +49,10 @@ #include "src/core/lib/channel/message_size_filter.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/http/parser.h" -#include "src/core/lib/iomgr/buffer_pool.h" #include "src/core/lib/iomgr/combiner.h" #include "src/core/lib/iomgr/executor.h" #include "src/core/lib/iomgr/iomgr.h" +#include "src/core/lib/iomgr/resource_quota.h" #include "src/core/lib/profiling/timers.h" #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/call.h" @@ -192,7 +192,7 @@ void grpc_init(void) { // Default timeout trace to 1 grpc_cq_event_timeout_trace = 1; grpc_register_tracer("op_failure", &grpc_trace_operation_failures); - grpc_register_tracer("buffer_pool", &grpc_buffer_pool_trace); + grpc_register_tracer("resource_quota", &grpc_resource_quota_trace); #ifndef NDEBUG grpc_register_tracer("pending_tags", &grpc_trace_pending_tags); #endif diff --git a/src/cpp/common/buffer_pool_cc.cc b/src/cpp/common/buffer_pool_cc.cc deleted file mode 100644 index fe5704d661..0000000000 --- a/src/cpp/common/buffer_pool_cc.cc +++ /dev/null @@ -1,51 +0,0 @@ -/* - * - * Copyright 2016, 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. - * - */ - -#include -#include - -namespace grpc { - -BufferPool::BufferPool() : impl_(grpc_buffer_pool_create(nullptr)) {} - -BufferPool::BufferPool(const grpc::string& name) - : impl_(grpc_buffer_pool_create(name.c_str())) {} - -BufferPool::~BufferPool() { grpc_buffer_pool_unref(impl_); } - -BufferPool& BufferPool::Resize(size_t new_size) { - grpc_buffer_pool_resize(impl_, new_size); - return *this; -} - -} // namespace grpc diff --git a/src/cpp/common/channel_arguments.cc b/src/cpp/common/channel_arguments.cc index afde513e1e..6e84170d97 100644 --- a/src/cpp/common/channel_arguments.cc +++ b/src/cpp/common/channel_arguments.cc @@ -34,7 +34,7 @@ #include -#include +#include #include #include #include "src/core/lib/channel/channel_args.h" @@ -114,9 +114,9 @@ void ChannelArguments::SetUserAgentPrefix( } } -void ChannelArguments::SetBufferPool(const grpc::BufferPool& buffer_pool) { - SetPointerWithVtable(GRPC_ARG_BUFFER_POOL, buffer_pool.c_buffer_pool(), - grpc_buffer_pool_arg_vtable()); +void ChannelArguments::SetResourceQuota(const grpc::ResourceQuota& resource_quota) { + SetPointerWithVtable(GRPC_ARG_BUFFER_POOL, resource_quota.c_resource_quota(), + grpc_resource_quota_arg_vtable()); } void ChannelArguments::SetInt(const grpc::string& key, int value) { diff --git a/src/cpp/common/resource_quota_cc.cc b/src/cpp/common/resource_quota_cc.cc new file mode 100644 index 0000000000..335896ab91 --- /dev/null +++ b/src/cpp/common/resource_quota_cc.cc @@ -0,0 +1,51 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include +#include + +namespace grpc { + +ResourceQuota::ResourceQuota() : impl_(grpc_resource_quota_create(nullptr)) {} + +ResourceQuota::ResourceQuota(const grpc::string& name) + : impl_(grpc_resource_quota_create(name.c_str())) {} + +ResourceQuota::~ResourceQuota() { grpc_resource_quota_unref(impl_); } + +ResourceQuota& ResourceQuota::Resize(size_t new_size) { + grpc_resource_quota_resize(impl_, new_size); + return *this; +} + +} // namespace grpc diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index be5b97846a..a4cf4063ee 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -33,7 +33,7 @@ #include -#include +#include #include #include #include @@ -55,7 +55,7 @@ static void do_plugin_list_init(void) { ServerBuilder::ServerBuilder() : max_receive_message_size_(-1), max_send_message_size_(-1), - buffer_pool_(nullptr), + resource_quota_(nullptr), generic_service_(nullptr) { gpr_once_init(&once_init_plugin_list, do_plugin_list_init); for (auto it = g_plugin_factory_list->begin(); @@ -73,8 +73,8 @@ ServerBuilder::ServerBuilder() } ServerBuilder::~ServerBuilder() { - if (buffer_pool_ != nullptr) { - grpc_buffer_pool_unref(buffer_pool_); + if (resource_quota_ != nullptr) { + grpc_resource_quota_unref(resource_quota_); } } @@ -138,13 +138,13 @@ ServerBuilder& ServerBuilder::SetDefaultCompressionAlgorithm( return *this; } -ServerBuilder& ServerBuilder::SetBufferPool( - const grpc::BufferPool& buffer_pool) { - if (buffer_pool_ != nullptr) { - grpc_buffer_pool_unref(buffer_pool_); +ServerBuilder& ServerBuilder::SetResourceQuota( + const grpc::ResourceQuota& resource_quota) { + if (resource_quota_ != nullptr) { + grpc_resource_quota_unref(resource_quota_); } - buffer_pool_ = buffer_pool.c_buffer_pool(); - grpc_buffer_pool_ref(buffer_pool_); + resource_quota_ = resource_quota.c_resource_quota(); + grpc_resource_quota_ref(resource_quota_); return *this; } @@ -196,9 +196,9 @@ std::unique_ptr ServerBuilder::BuildAndStart() { args.SetInt(GRPC_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM, maybe_default_compression_algorithm_.algorithm); } - if (buffer_pool_ != nullptr) { - args.SetPointerWithVtable(GRPC_ARG_BUFFER_POOL, buffer_pool_, - grpc_buffer_pool_arg_vtable()); + if (resource_quota_ != nullptr) { + args.SetPointerWithVtable(GRPC_ARG_BUFFER_POOL, resource_quota_, + grpc_resource_quota_arg_vtable()); } std::unique_ptr server(new Server(thread_pool.release(), true, max_receive_message_size_, &args)); diff --git a/src/proto/grpc/testing/control.proto b/src/proto/grpc/testing/control.proto index 4adf235f61..918f5fa3e3 100644 --- a/src/proto/grpc/testing/control.proto +++ b/src/proto/grpc/testing/control.proto @@ -141,7 +141,7 @@ message ServerConfig { // c++-only options (for now) -------------------------------- // Buffer pool size (no buffer pool specified if unset) - int32 buffer_pool_size = 1001; + int32 resource_quota_size = 1001; } message ServerArgs { diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index eeb30135e2..c480d81514 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -94,7 +94,6 @@ CORE_SOURCE_FILES = [ 'src/core/lib/http/format_request.c', 'src/core/lib/http/httpcli.c', 'src/core/lib/http/parser.c', - 'src/core/lib/iomgr/buffer_pool.c', 'src/core/lib/iomgr/closure.c', 'src/core/lib/iomgr/combiner.c', 'src/core/lib/iomgr/endpoint.c', @@ -118,6 +117,7 @@ CORE_SOURCE_FILES = [ 'src/core/lib/iomgr/pollset_windows.c', 'src/core/lib/iomgr/resolve_address_posix.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_utils_common_posix.c', 'src/core/lib/iomgr/socket_utils_linux.c', diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c index 6c352554f9..fd73cc7970 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c @@ -132,11 +132,11 @@ grpc_header_key_is_legal_type grpc_header_key_is_legal_import; grpc_header_nonbin_value_is_legal_type grpc_header_nonbin_value_is_legal_import; grpc_is_binary_header_type grpc_is_binary_header_import; grpc_call_error_to_string_type grpc_call_error_to_string_import; -grpc_buffer_pool_create_type grpc_buffer_pool_create_import; -grpc_buffer_pool_ref_type grpc_buffer_pool_ref_import; -grpc_buffer_pool_unref_type grpc_buffer_pool_unref_import; -grpc_buffer_pool_resize_type grpc_buffer_pool_resize_import; -grpc_buffer_pool_arg_vtable_type grpc_buffer_pool_arg_vtable_import; +grpc_resource_quota_create_type grpc_resource_quota_create_import; +grpc_resource_quota_ref_type grpc_resource_quota_ref_import; +grpc_resource_quota_unref_type grpc_resource_quota_unref_import; +grpc_resource_quota_resize_type grpc_resource_quota_resize_import; +grpc_resource_quota_arg_vtable_type grpc_resource_quota_arg_vtable_import; grpc_insecure_channel_create_from_fd_type grpc_insecure_channel_create_from_fd_import; grpc_server_add_insecure_channel_from_fd_type grpc_server_add_insecure_channel_from_fd_import; grpc_use_signal_type grpc_use_signal_import; @@ -406,11 +406,11 @@ void grpc_rb_load_imports(HMODULE library) { grpc_header_nonbin_value_is_legal_import = (grpc_header_nonbin_value_is_legal_type) GetProcAddress(library, "grpc_header_nonbin_value_is_legal"); grpc_is_binary_header_import = (grpc_is_binary_header_type) GetProcAddress(library, "grpc_is_binary_header"); grpc_call_error_to_string_import = (grpc_call_error_to_string_type) GetProcAddress(library, "grpc_call_error_to_string"); - grpc_buffer_pool_create_import = (grpc_buffer_pool_create_type) GetProcAddress(library, "grpc_buffer_pool_create"); - grpc_buffer_pool_ref_import = (grpc_buffer_pool_ref_type) GetProcAddress(library, "grpc_buffer_pool_ref"); - grpc_buffer_pool_unref_import = (grpc_buffer_pool_unref_type) GetProcAddress(library, "grpc_buffer_pool_unref"); - grpc_buffer_pool_resize_import = (grpc_buffer_pool_resize_type) GetProcAddress(library, "grpc_buffer_pool_resize"); - grpc_buffer_pool_arg_vtable_import = (grpc_buffer_pool_arg_vtable_type) GetProcAddress(library, "grpc_buffer_pool_arg_vtable"); + grpc_resource_quota_create_import = (grpc_resource_quota_create_type) GetProcAddress(library, "grpc_resource_quota_create"); + grpc_resource_quota_ref_import = (grpc_resource_quota_ref_type) GetProcAddress(library, "grpc_resource_quota_ref"); + grpc_resource_quota_unref_import = (grpc_resource_quota_unref_type) GetProcAddress(library, "grpc_resource_quota_unref"); + grpc_resource_quota_resize_import = (grpc_resource_quota_resize_type) GetProcAddress(library, "grpc_resource_quota_resize"); + grpc_resource_quota_arg_vtable_import = (grpc_resource_quota_arg_vtable_type) GetProcAddress(library, "grpc_resource_quota_arg_vtable"); grpc_insecure_channel_create_from_fd_import = (grpc_insecure_channel_create_from_fd_type) GetProcAddress(library, "grpc_insecure_channel_create_from_fd"); grpc_server_add_insecure_channel_from_fd_import = (grpc_server_add_insecure_channel_from_fd_type) GetProcAddress(library, "grpc_server_add_insecure_channel_from_fd"); grpc_use_signal_import = (grpc_use_signal_type) GetProcAddress(library, "grpc_use_signal"); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index b118ba3c78..c2244150f2 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -347,21 +347,21 @@ extern grpc_is_binary_header_type grpc_is_binary_header_import; typedef const char *(*grpc_call_error_to_string_type)(grpc_call_error error); extern grpc_call_error_to_string_type grpc_call_error_to_string_import; #define grpc_call_error_to_string grpc_call_error_to_string_import -typedef grpc_buffer_pool *(*grpc_buffer_pool_create_type)(const char *trace_name); -extern grpc_buffer_pool_create_type grpc_buffer_pool_create_import; -#define grpc_buffer_pool_create grpc_buffer_pool_create_import -typedef void(*grpc_buffer_pool_ref_type)(grpc_buffer_pool *buffer_pool); -extern grpc_buffer_pool_ref_type grpc_buffer_pool_ref_import; -#define grpc_buffer_pool_ref grpc_buffer_pool_ref_import -typedef void(*grpc_buffer_pool_unref_type)(grpc_buffer_pool *buffer_pool); -extern grpc_buffer_pool_unref_type grpc_buffer_pool_unref_import; -#define grpc_buffer_pool_unref grpc_buffer_pool_unref_import -typedef void(*grpc_buffer_pool_resize_type)(grpc_buffer_pool *buffer_pool, size_t new_size); -extern grpc_buffer_pool_resize_type grpc_buffer_pool_resize_import; -#define grpc_buffer_pool_resize grpc_buffer_pool_resize_import -typedef const grpc_arg_pointer_vtable *(*grpc_buffer_pool_arg_vtable_type)(void); -extern grpc_buffer_pool_arg_vtable_type grpc_buffer_pool_arg_vtable_import; -#define grpc_buffer_pool_arg_vtable grpc_buffer_pool_arg_vtable_import +typedef grpc_resource_quota *(*grpc_resource_quota_create_type)(const char *trace_name); +extern grpc_resource_quota_create_type grpc_resource_quota_create_import; +#define grpc_resource_quota_create grpc_resource_quota_create_import +typedef void(*grpc_resource_quota_ref_type)(grpc_resource_quota *resource_quota); +extern grpc_resource_quota_ref_type grpc_resource_quota_ref_import; +#define grpc_resource_quota_ref grpc_resource_quota_ref_import +typedef void(*grpc_resource_quota_unref_type)(grpc_resource_quota *resource_quota); +extern grpc_resource_quota_unref_type grpc_resource_quota_unref_import; +#define grpc_resource_quota_unref grpc_resource_quota_unref_import +typedef void(*grpc_resource_quota_resize_type)(grpc_resource_quota *resource_quota, size_t new_size); +extern grpc_resource_quota_resize_type grpc_resource_quota_resize_import; +#define grpc_resource_quota_resize grpc_resource_quota_resize_import +typedef const grpc_arg_pointer_vtable *(*grpc_resource_quota_arg_vtable_type)(void); +extern grpc_resource_quota_arg_vtable_type grpc_resource_quota_arg_vtable_import; +#define grpc_resource_quota_arg_vtable grpc_resource_quota_arg_vtable_import typedef grpc_channel *(*grpc_insecure_channel_create_from_fd_type)(const char *target, int fd, const grpc_channel_args *args); extern grpc_insecure_channel_create_from_fd_type grpc_insecure_channel_create_from_fd_import; #define grpc_insecure_channel_create_from_fd grpc_insecure_channel_create_from_fd_import diff --git a/test/core/bad_client/bad_client.c b/test/core/bad_client/bad_client.c index 60f0ab2106..8a4a17ea93 100644 --- a/test/core/bad_client/bad_client.c +++ b/test/core/bad_client/bad_client.c @@ -114,9 +114,9 @@ void grpc_run_bad_client_test( grpc_init(); /* Create endpoints */ - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("bad_client_test"); - sfd = grpc_iomgr_create_endpoint_pair("fixture", buffer_pool, 65536); - grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); + grpc_resource_quota *resource_quota = grpc_resource_quota_create("bad_client_test"); + sfd = grpc_iomgr_create_endpoint_pair("fixture", resource_quota, 65536); + grpc_resource_quota_internal_unref(&exec_ctx, resource_quota); /* Create server, completion events */ a.server = grpc_server_create(NULL, NULL); diff --git a/test/core/end2end/end2end_nosec_tests.c b/test/core/end2end/end2end_nosec_tests.c index 1c9332acc1..caaa97c215 100644 --- a/test/core/end2end/end2end_nosec_tests.c +++ b/test/core/end2end/end2end_nosec_tests.c @@ -47,8 +47,6 @@ extern void bad_hostname(grpc_end2end_test_config config); extern void bad_hostname_pre_init(void); extern void binary_metadata(grpc_end2end_test_config config); extern void binary_metadata_pre_init(void); -extern void buffer_pool_server(grpc_end2end_test_config config); -extern void buffer_pool_server_pre_init(void); extern void cancel_after_accept(grpc_end2end_test_config config); extern void cancel_after_accept_pre_init(void); extern void cancel_after_client_done(grpc_end2end_test_config config); @@ -113,6 +111,8 @@ extern void request_with_flags(grpc_end2end_test_config config); extern void request_with_flags_pre_init(void); extern void request_with_payload(grpc_end2end_test_config config); extern void request_with_payload_pre_init(void); +extern void resource_quota_server(grpc_end2end_test_config config); +extern void resource_quota_server_pre_init(void); extern void server_finishes_request(grpc_end2end_test_config config); extern void server_finishes_request_pre_init(void); extern void shutdown_finishes_calls(grpc_end2end_test_config config); @@ -137,7 +137,6 @@ void grpc_end2end_tests_pre_init(void) { g_pre_init_called = true; bad_hostname_pre_init(); binary_metadata_pre_init(); - buffer_pool_server_pre_init(); cancel_after_accept_pre_init(); cancel_after_client_done_pre_init(); cancel_after_invoke_pre_init(); @@ -170,6 +169,7 @@ void grpc_end2end_tests_pre_init(void) { registered_call_pre_init(); request_with_flags_pre_init(); request_with_payload_pre_init(); + resource_quota_server_pre_init(); server_finishes_request_pre_init(); shutdown_finishes_calls_pre_init(); shutdown_finishes_tags_pre_init(); @@ -190,7 +190,6 @@ void grpc_end2end_tests(int argc, char **argv, if (argc <= 1) { bad_hostname(config); binary_metadata(config); - buffer_pool_server(config); cancel_after_accept(config); cancel_after_client_done(config); cancel_after_invoke(config); @@ -223,6 +222,7 @@ void grpc_end2end_tests(int argc, char **argv, registered_call(config); request_with_flags(config); request_with_payload(config); + resource_quota_server(config); server_finishes_request(config); shutdown_finishes_calls(config); shutdown_finishes_tags(config); @@ -244,10 +244,6 @@ void grpc_end2end_tests(int argc, char **argv, binary_metadata(config); continue; } - if (0 == strcmp("buffer_pool_server", argv[i])) { - buffer_pool_server(config); - continue; - } if (0 == strcmp("cancel_after_accept", argv[i])) { cancel_after_accept(config); continue; @@ -376,6 +372,10 @@ void grpc_end2end_tests(int argc, char **argv, request_with_payload(config); continue; } + if (0 == strcmp("resource_quota_server", argv[i])) { + resource_quota_server(config); + continue; + } if (0 == strcmp("server_finishes_request", argv[i])) { server_finishes_request(config); continue; diff --git a/test/core/end2end/end2end_tests.c b/test/core/end2end/end2end_tests.c index cf0e4c8316..6d17e686e6 100644 --- a/test/core/end2end/end2end_tests.c +++ b/test/core/end2end/end2end_tests.c @@ -47,8 +47,6 @@ extern void bad_hostname(grpc_end2end_test_config config); extern void bad_hostname_pre_init(void); extern void binary_metadata(grpc_end2end_test_config config); extern void binary_metadata_pre_init(void); -extern void buffer_pool_server(grpc_end2end_test_config config); -extern void buffer_pool_server_pre_init(void); extern void call_creds(grpc_end2end_test_config config); extern void call_creds_pre_init(void); extern void cancel_after_accept(grpc_end2end_test_config config); @@ -115,6 +113,8 @@ extern void request_with_flags(grpc_end2end_test_config config); extern void request_with_flags_pre_init(void); extern void request_with_payload(grpc_end2end_test_config config); extern void request_with_payload_pre_init(void); +extern void resource_quota_server(grpc_end2end_test_config config); +extern void resource_quota_server_pre_init(void); extern void server_finishes_request(grpc_end2end_test_config config); extern void server_finishes_request_pre_init(void); extern void shutdown_finishes_calls(grpc_end2end_test_config config); @@ -139,7 +139,6 @@ void grpc_end2end_tests_pre_init(void) { g_pre_init_called = true; bad_hostname_pre_init(); binary_metadata_pre_init(); - buffer_pool_server_pre_init(); call_creds_pre_init(); cancel_after_accept_pre_init(); cancel_after_client_done_pre_init(); @@ -173,6 +172,7 @@ void grpc_end2end_tests_pre_init(void) { registered_call_pre_init(); request_with_flags_pre_init(); request_with_payload_pre_init(); + resource_quota_server_pre_init(); server_finishes_request_pre_init(); shutdown_finishes_calls_pre_init(); shutdown_finishes_tags_pre_init(); @@ -193,7 +193,6 @@ void grpc_end2end_tests(int argc, char **argv, if (argc <= 1) { bad_hostname(config); binary_metadata(config); - buffer_pool_server(config); call_creds(config); cancel_after_accept(config); cancel_after_client_done(config); @@ -227,6 +226,7 @@ void grpc_end2end_tests(int argc, char **argv, registered_call(config); request_with_flags(config); request_with_payload(config); + resource_quota_server(config); server_finishes_request(config); shutdown_finishes_calls(config); shutdown_finishes_tags(config); @@ -248,10 +248,6 @@ void grpc_end2end_tests(int argc, char **argv, binary_metadata(config); continue; } - if (0 == strcmp("buffer_pool_server", argv[i])) { - buffer_pool_server(config); - continue; - } if (0 == strcmp("call_creds", argv[i])) { call_creds(config); continue; @@ -384,6 +380,10 @@ void grpc_end2end_tests(int argc, char **argv, request_with_payload(config); continue; } + if (0 == strcmp("resource_quota_server", argv[i])) { + resource_quota_server(config); + continue; + } if (0 == strcmp("server_finishes_request", argv[i])) { server_finishes_request(config); continue; diff --git a/test/core/end2end/fixtures/h2_sockpair+trace.c b/test/core/end2end/fixtures/h2_sockpair+trace.c index 4a546e710e..f7dbfdf2e3 100644 --- a/test/core/end2end/fixtures/h2_sockpair+trace.c +++ b/test/core/end2end/fixtures/h2_sockpair+trace.c @@ -91,9 +91,9 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair( f.fixture_data = sfd; f.cq = grpc_completion_queue_create(NULL); - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("fixture"); - *sfd = grpc_iomgr_create_endpoint_pair("fixture", buffer_pool, 65536); - grpc_buffer_pool_unref(buffer_pool); + grpc_resource_quota *resource_quota = grpc_resource_quota_create("fixture"); + *sfd = grpc_iomgr_create_endpoint_pair("fixture", resource_quota, 65536); + grpc_resource_quota_unref(resource_quota); return f; } diff --git a/test/core/end2end/fixtures/h2_sockpair.c b/test/core/end2end/fixtures/h2_sockpair.c index f528f0b0b2..c571b12e4a 100644 --- a/test/core/end2end/fixtures/h2_sockpair.c +++ b/test/core/end2end/fixtures/h2_sockpair.c @@ -90,9 +90,9 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair( f.fixture_data = sfd; f.cq = grpc_completion_queue_create(NULL); - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("fixture"); - *sfd = grpc_iomgr_create_endpoint_pair("fixture", buffer_pool, 65536); - grpc_buffer_pool_unref(buffer_pool); + grpc_resource_quota *resource_quota = grpc_resource_quota_create("fixture"); + *sfd = grpc_iomgr_create_endpoint_pair("fixture", resource_quota, 65536); + grpc_resource_quota_unref(resource_quota); return f; } diff --git a/test/core/end2end/fixtures/h2_sockpair_1byte.c b/test/core/end2end/fixtures/h2_sockpair_1byte.c index 293cdf278e..c3d2d5decc 100644 --- a/test/core/end2end/fixtures/h2_sockpair_1byte.c +++ b/test/core/end2end/fixtures/h2_sockpair_1byte.c @@ -90,9 +90,9 @@ static grpc_end2end_test_fixture chttp2_create_fixture_socketpair( f.fixture_data = sfd; f.cq = grpc_completion_queue_create(NULL); - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("fixture"); - *sfd = grpc_iomgr_create_endpoint_pair("fixture", buffer_pool, 1); - grpc_buffer_pool_unref(buffer_pool); + grpc_resource_quota *resource_quota = grpc_resource_quota_create("fixture"); + *sfd = grpc_iomgr_create_endpoint_pair("fixture", resource_quota, 1); + grpc_resource_quota_unref(resource_quota); return f; } diff --git a/test/core/end2end/fuzzers/api_fuzzer.c b/test/core/end2end/fuzzers/api_fuzzer.c index f39a79ca19..945cc960e9 100644 --- a/test/core/end2end/fuzzers/api_fuzzer.c +++ b/test/core/end2end/fuzzers/api_fuzzer.c @@ -173,7 +173,7 @@ static bool is_eof(input_stream *inp) { return inp->cur == inp->end; } static gpr_timespec g_now; static grpc_server *g_server; static grpc_channel *g_channel; -static grpc_buffer_pool *g_buffer_pool; +static grpc_resource_quota *g_resource_quota; extern gpr_timespec (*gpr_now_impl)(gpr_clock_type clock_type); @@ -253,7 +253,7 @@ static void do_connect(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { } else if (g_server != NULL) { grpc_endpoint *client; grpc_endpoint *server; - grpc_passthru_endpoint_create(&client, &server, g_buffer_pool); + grpc_passthru_endpoint_create(&client, &server, g_resource_quota); *fc->ep = client; grpc_transport *transport = @@ -522,7 +522,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { int pending_pings = 0; g_active_call = new_call(NULL, ROOT); - g_buffer_pool = grpc_buffer_pool_create("api_fuzzer"); + g_resource_quota = grpc_resource_quota_create("api_fuzzer"); grpc_completion_queue *cq = grpc_completion_queue_create(NULL); @@ -944,7 +944,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { } // resize the buffer pool case 21: { - grpc_buffer_pool_resize(g_buffer_pool, read_uint22(&inp)); + grpc_resource_quota_resize(g_resource_quota, read_uint22(&inp)); break; } } @@ -962,7 +962,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { .type == GRPC_QUEUE_SHUTDOWN); grpc_completion_queue_destroy(cq); - grpc_buffer_pool_unref(g_buffer_pool); + grpc_resource_quota_unref(g_resource_quota); grpc_shutdown(); return 0; diff --git a/test/core/end2end/fuzzers/client_fuzzer.c b/test/core/end2end/fuzzers/client_fuzzer.c index 55d04ec28a..b57c8c95fd 100644 --- a/test/core/end2end/fuzzers/client_fuzzer.c +++ b/test/core/end2end/fuzzers/client_fuzzer.c @@ -58,10 +58,10 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_init(); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("client_fuzzer"); + grpc_resource_quota *resource_quota = grpc_resource_quota_create("client_fuzzer"); grpc_endpoint *mock_endpoint = - grpc_mock_endpoint_create(discard_write, buffer_pool); - grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); + grpc_mock_endpoint_create(discard_write, resource_quota); + grpc_resource_quota_internal_unref(&exec_ctx, resource_quota); grpc_completion_queue *cq = grpc_completion_queue_create(NULL); grpc_transport *transport = diff --git a/test/core/end2end/fuzzers/server_fuzzer.c b/test/core/end2end/fuzzers/server_fuzzer.c index dd093e51ec..58c2a9d483 100644 --- a/test/core/end2end/fuzzers/server_fuzzer.c +++ b/test/core/end2end/fuzzers/server_fuzzer.c @@ -56,10 +56,10 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_init(); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("server_fuzzer"); + grpc_resource_quota *resource_quota = grpc_resource_quota_create("server_fuzzer"); grpc_endpoint *mock_endpoint = - grpc_mock_endpoint_create(discard_write, buffer_pool); - grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); + grpc_mock_endpoint_create(discard_write, resource_quota); + grpc_resource_quota_internal_unref(&exec_ctx, resource_quota); grpc_mock_endpoint_put_read( &exec_ctx, mock_endpoint, gpr_slice_from_copied_buffer((const char *)data, size)); diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py index 3fc827fc7d..0ae70ce308 100755 --- a/test/core/end2end/gen_build_yaml.py +++ b/test/core/end2end/gen_build_yaml.py @@ -88,7 +88,7 @@ LOWCPU = 0.1 END2END_TESTS = { 'bad_hostname': default_test_options, 'binary_metadata': default_test_options, - 'buffer_pool_server': default_test_options._replace(large_writes=True, + 'resource_quota_server': default_test_options._replace(large_writes=True, proxyable=False), 'call_creds': default_test_options._replace(secure=True), 'cancel_after_accept': default_test_options._replace(cpu_cost=LOWCPU), diff --git a/test/core/end2end/tests/buffer_pool_server.c b/test/core/end2end/tests/buffer_pool_server.c index daa971ccfc..81850aea58 100644 --- a/test/core/end2end/tests/buffer_pool_server.c +++ b/test/core/end2end/tests/buffer_pool_server.c @@ -107,9 +107,10 @@ static gpr_slice generate_random_slice() { return gpr_slice_from_copied_string(output); } -void buffer_pool_server(grpc_end2end_test_config config) { - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("test_server"); - grpc_buffer_pool_resize(buffer_pool, 5 * 1024 * 1024); +void resource_quota_server(grpc_end2end_test_config config) { + grpc_resource_quota *resource_quota = + grpc_resource_quota_create("test_server"); + grpc_resource_quota_resize(resource_quota, 5 * 1024 * 1024); #define NUM_CALLS 100 #define CLIENT_BASE_TAG 1000 @@ -120,12 +121,12 @@ void buffer_pool_server(grpc_end2end_test_config config) { grpc_arg arg; arg.key = GRPC_ARG_BUFFER_POOL; arg.type = GRPC_ARG_POINTER; - arg.value.pointer.p = buffer_pool; - arg.value.pointer.vtable = grpc_buffer_pool_arg_vtable(); + arg.value.pointer.p = resource_quota; + arg.value.pointer.vtable = grpc_resource_quota_arg_vtable(); grpc_channel_args args = {1, &arg}; grpc_end2end_test_fixture f = - begin_test(config, "buffer_pool_server", NULL, &args); + begin_test(config, "resource_quota_server", NULL, &args); /* Create large request and response bodies. These are big enough to require * multiple round trips to deliver to the peer, and their exact contents of @@ -343,10 +344,10 @@ void buffer_pool_server(grpc_end2end_test_config config) { grpc_byte_buffer_destroy(request_payload); gpr_slice_unref(request_payload_slice); - grpc_buffer_pool_unref(buffer_pool); + grpc_resource_quota_unref(resource_quota); end_test(&f); config.tear_down_data(&f); } -void buffer_pool_server_pre_init(void) {} +void resource_quota_server_pre_init(void) {} diff --git a/test/core/end2end/tests/resource_quota_server.c b/test/core/end2end/tests/resource_quota_server.c new file mode 100644 index 0000000000..c658776cba --- /dev/null +++ b/test/core/end2end/tests/resource_quota_server.c @@ -0,0 +1,352 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include "test/core/end2end/end2end_tests.h" + +#include +#include + +#include +#include +#include +#include +#include +#include "test/core/end2end/cq_verifier.h" + +static void *tag(intptr_t t) { return (void *)t; } + +static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, + const char *test_name, + grpc_channel_args *client_args, + grpc_channel_args *server_args) { + grpc_end2end_test_fixture f; + gpr_log(GPR_INFO, "%s/%s", test_name, config.name); + f = config.create_fixture(client_args, server_args); + config.init_server(&f, server_args); + config.init_client(&f, client_args); + return f; +} + +static gpr_timespec n_seconds_time(int n) { + return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(n); +} + +static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); } + +static void drain_cq(grpc_completion_queue *cq) { + grpc_event ev; + do { + ev = grpc_completion_queue_next(cq, five_seconds_time(), NULL); + } while (ev.type != GRPC_QUEUE_SHUTDOWN); +} + +static void shutdown_server(grpc_end2end_test_fixture *f) { + if (!f->server) return; + grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); + grpc_server_destroy(f->server); + f->server = NULL; +} + +static void shutdown_client(grpc_end2end_test_fixture *f) { + if (!f->client) return; + grpc_channel_destroy(f->client); + f->client = NULL; +} + +static void end_test(grpc_end2end_test_fixture *f) { + shutdown_server(f); + shutdown_client(f); + + grpc_completion_queue_shutdown(f->cq); + drain_cq(f->cq); + grpc_completion_queue_destroy(f->cq); +} + +/* Creates and returns a gpr_slice containing random alphanumeric characters. */ +static gpr_slice generate_random_slice() { + size_t i; + static const char chars[] = "abcdefghijklmnopqrstuvwxyz1234567890"; + char output[1024 * 1024]; + for (i = 0; i < GPR_ARRAY_SIZE(output) - 1; ++i) { + output[i] = chars[rand() % (int)(sizeof(chars) - 1)]; + } + output[GPR_ARRAY_SIZE(output) - 1] = '\0'; + return gpr_slice_from_copied_string(output); +} + +void resource_quota_server(grpc_end2end_test_config config) { + grpc_resource_quota *resource_quota = grpc_resource_quota_create("test_server"); + grpc_resource_quota_resize(resource_quota, 5 * 1024 * 1024); + +#define NUM_CALLS 100 +#define CLIENT_BASE_TAG 1000 +#define SERVER_START_BASE_TAG 2000 +#define SERVER_RECV_BASE_TAG 3000 +#define SERVER_END_BASE_TAG 4000 + + grpc_arg arg; + arg.key = GRPC_ARG_BUFFER_POOL; + arg.type = GRPC_ARG_POINTER; + arg.value.pointer.p = resource_quota; + arg.value.pointer.vtable = grpc_resource_quota_arg_vtable(); + grpc_channel_args args = {1, &arg}; + + grpc_end2end_test_fixture f = + begin_test(config, "resource_quota_server", NULL, &args); + + /* Create large request and response bodies. These are big enough to require + * multiple round trips to deliver to the peer, and their exact contents of + * will be verified on completion. */ + gpr_slice request_payload_slice = generate_random_slice(); + + grpc_call *client_calls[NUM_CALLS]; + grpc_call *server_calls[NUM_CALLS]; + grpc_metadata_array initial_metadata_recv[NUM_CALLS]; + grpc_metadata_array trailing_metadata_recv[NUM_CALLS]; + grpc_metadata_array request_metadata_recv[NUM_CALLS]; + grpc_call_details call_details[NUM_CALLS]; + grpc_status_code status[NUM_CALLS]; + char *details[NUM_CALLS]; + size_t details_capacity[NUM_CALLS]; + grpc_byte_buffer *request_payload_recv[NUM_CALLS]; + int was_cancelled[NUM_CALLS]; + grpc_call_error error; + int pending_client_calls = 0; + int pending_server_start_calls = 0; + int pending_server_recv_calls = 0; + int pending_server_end_calls = 0; + int cancelled_calls_on_client = 0; + int cancelled_calls_on_server = 0; + + grpc_byte_buffer *request_payload = + grpc_raw_byte_buffer_create(&request_payload_slice, 1); + + grpc_op ops[6]; + grpc_op *op; + + for (int i = 0; i < NUM_CALLS; i++) { + grpc_metadata_array_init(&initial_metadata_recv[i]); + grpc_metadata_array_init(&trailing_metadata_recv[i]); + grpc_metadata_array_init(&request_metadata_recv[i]); + grpc_call_details_init(&call_details[i]); + details[i] = NULL; + details_capacity[i] = 0; + request_payload_recv[i] = NULL; + was_cancelled[i] = 0; + } + + for (int i = 0; i < NUM_CALLS; i++) { + error = grpc_server_request_call( + f.server, &server_calls[i], &call_details[i], &request_metadata_recv[i], + f.cq, f.cq, tag(SERVER_START_BASE_TAG + i)); + GPR_ASSERT(GRPC_CALL_OK == error); + + pending_server_start_calls++; + } + + for (int i = 0; i < NUM_CALLS; i++) { + client_calls[i] = grpc_channel_create_call( + f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo", + "foo.test.google.fr", n_seconds_time(60), NULL); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message = request_payload; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata = &initial_metadata_recv[i]; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; + op->data.recv_status_on_client.trailing_metadata = + &trailing_metadata_recv[i]; + op->data.recv_status_on_client.status = &status[i]; + op->data.recv_status_on_client.status_details = &details[i]; + op->data.recv_status_on_client.status_details_capacity = + &details_capacity[i]; + op->flags = 0; + op->reserved = NULL; + op++; + error = grpc_call_start_batch(client_calls[i], ops, (size_t)(op - ops), + tag(CLIENT_BASE_TAG + i), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + + pending_client_calls++; + } + + while (pending_client_calls + pending_server_recv_calls + + pending_server_end_calls > + 0) { + grpc_event ev = grpc_completion_queue_next(f.cq, n_seconds_time(10), NULL); + GPR_ASSERT(ev.type == GRPC_OP_COMPLETE); + + int ev_tag = (int)(intptr_t)ev.tag; + if (ev_tag < CLIENT_BASE_TAG) { + abort(); /* illegal tag */ + } else if (ev_tag < SERVER_START_BASE_TAG) { + /* client call finished */ + int call_id = ev_tag - CLIENT_BASE_TAG; + GPR_ASSERT(call_id >= 0); + GPR_ASSERT(call_id < NUM_CALLS); + switch (status[call_id]) { + case GRPC_STATUS_RESOURCE_EXHAUSTED: + cancelled_calls_on_client++; + break; + case GRPC_STATUS_OK: + break; + default: + gpr_log(GPR_ERROR, "Unexpected status code: %d", status[call_id]); + abort(); + } + GPR_ASSERT(pending_client_calls > 0); + + grpc_metadata_array_destroy(&initial_metadata_recv[call_id]); + grpc_metadata_array_destroy(&trailing_metadata_recv[call_id]); + grpc_call_destroy(client_calls[call_id]); + gpr_free(details[call_id]); + + pending_client_calls--; + } else if (ev_tag < SERVER_RECV_BASE_TAG) { + /* new incoming call to the server */ + int call_id = ev_tag - SERVER_START_BASE_TAG; + GPR_ASSERT(call_id >= 0); + GPR_ASSERT(call_id < NUM_CALLS); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message = &request_payload_recv[call_id]; + op->flags = 0; + op->reserved = NULL; + op++; + error = + grpc_call_start_batch(server_calls[call_id], ops, (size_t)(op - ops), + tag(SERVER_RECV_BASE_TAG + call_id), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + + GPR_ASSERT(pending_server_start_calls > 0); + pending_server_start_calls--; + pending_server_recv_calls++; + + grpc_call_details_destroy(&call_details[call_id]); + grpc_metadata_array_destroy(&request_metadata_recv[call_id]); + } else if (ev_tag < SERVER_END_BASE_TAG) { + /* finished read on the server */ + int call_id = ev_tag - SERVER_RECV_BASE_TAG; + GPR_ASSERT(call_id >= 0); + GPR_ASSERT(call_id < NUM_CALLS); + + if (ev.success) { + if (request_payload_recv[call_id] != NULL) { + grpc_byte_buffer_destroy(request_payload_recv[call_id]); + request_payload_recv[call_id] = NULL; + } + } else { + GPR_ASSERT(request_payload_recv[call_id] == NULL); + } + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled[call_id]; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + op->data.send_status_from_server.status = GRPC_STATUS_OK; + op->data.send_status_from_server.status_details = "xyz"; + op->flags = 0; + op->reserved = NULL; + op++; + error = + grpc_call_start_batch(server_calls[call_id], ops, (size_t)(op - ops), + tag(SERVER_END_BASE_TAG + call_id), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + + GPR_ASSERT(pending_server_recv_calls > 0); + pending_server_recv_calls--; + pending_server_end_calls++; + } else { + int call_id = ev_tag - SERVER_END_BASE_TAG; + GPR_ASSERT(call_id >= 0); + GPR_ASSERT(call_id < NUM_CALLS); + + if (was_cancelled[call_id]) { + cancelled_calls_on_server++; + } + GPR_ASSERT(pending_server_end_calls > 0); + pending_server_end_calls--; + + grpc_call_destroy(server_calls[call_id]); + } + } + + gpr_log( + GPR_INFO, + "Done. %d total calls: %d cancelled at server, %d cancelled at client.", + NUM_CALLS, cancelled_calls_on_server, cancelled_calls_on_client); + + GPR_ASSERT(cancelled_calls_on_client >= cancelled_calls_on_server); + GPR_ASSERT(cancelled_calls_on_server >= 0.9 * cancelled_calls_on_client); + + grpc_byte_buffer_destroy(request_payload); + gpr_slice_unref(request_payload_slice); + grpc_resource_quota_unref(resource_quota); + + end_test(&f); + config.tear_down_data(&f); +} + +void resource_quota_server_pre_init(void) {} diff --git a/test/core/http/httpcli_test.c b/test/core/http/httpcli_test.c index 1ecfe219d4..14318ae184 100644 --- a/test/core/http/httpcli_test.c +++ b/test/core/http/httpcli_test.c @@ -89,11 +89,11 @@ static void test_get(int port) { grpc_http_response response; memset(&response, 0, sizeof(response)); - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("test_get"); - grpc_httpcli_get(&exec_ctx, &g_context, &g_pops, buffer_pool, &req, + grpc_resource_quota *resource_quota = grpc_resource_quota_create("test_get"); + grpc_httpcli_get(&exec_ctx, &g_context, &g_pops, resource_quota, &req, n_seconds_time(15), grpc_closure_create(on_finish, &response), &response); - grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); + grpc_resource_quota_internal_unref(&exec_ctx, resource_quota); gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; @@ -129,11 +129,11 @@ static void test_post(int port) { grpc_http_response response; memset(&response, 0, sizeof(response)); - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("test_post"); - grpc_httpcli_post(&exec_ctx, &g_context, &g_pops, buffer_pool, &req, "hello", + grpc_resource_quota *resource_quota = grpc_resource_quota_create("test_post"); + grpc_httpcli_post(&exec_ctx, &g_context, &g_pops, resource_quota, &req, "hello", 5, n_seconds_time(15), grpc_closure_create(on_finish, &response), &response); - grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); + grpc_resource_quota_internal_unref(&exec_ctx, resource_quota); gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; diff --git a/test/core/http/httpscli_test.c b/test/core/http/httpscli_test.c index 51ca73fdc6..966d5e4062 100644 --- a/test/core/http/httpscli_test.c +++ b/test/core/http/httpscli_test.c @@ -90,11 +90,11 @@ static void test_get(int port) { grpc_http_response response; memset(&response, 0, sizeof(response)); - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("test_get"); - grpc_httpcli_get(&exec_ctx, &g_context, &g_pops, buffer_pool, &req, + grpc_resource_quota *resource_quota = grpc_resource_quota_create("test_get"); + grpc_httpcli_get(&exec_ctx, &g_context, &g_pops, resource_quota, &req, n_seconds_time(15), grpc_closure_create(on_finish, &response), &response); - grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); + grpc_resource_quota_internal_unref(&exec_ctx, resource_quota); gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; @@ -131,11 +131,11 @@ static void test_post(int port) { grpc_http_response response; memset(&response, 0, sizeof(response)); - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("test_post"); - grpc_httpcli_post(&exec_ctx, &g_context, &g_pops, buffer_pool, &req, "hello", + grpc_resource_quota *resource_quota = grpc_resource_quota_create("test_post"); + grpc_httpcli_post(&exec_ctx, &g_context, &g_pops, resource_quota, &req, "hello", 5, n_seconds_time(15), grpc_closure_create(on_finish, &response), &response); - grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); + grpc_resource_quota_internal_unref(&exec_ctx, resource_quota); gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; diff --git a/test/core/internal_api_canaries/iomgr.c b/test/core/internal_api_canaries/iomgr.c index 4f967ce751..f1efa87a69 100644 --- a/test/core/internal_api_canaries/iomgr.c +++ b/test/core/internal_api_canaries/iomgr.c @@ -84,7 +84,7 @@ static void test_code(void) { grpc_endpoint_add_to_pollset_set, grpc_endpoint_shutdown, grpc_endpoint_destroy, - grpc_endpoint_get_buffer_user, + grpc_endpoint_get_resource_user, grpc_endpoint_get_peer}; endpoint.vtable = &vtable; diff --git a/test/core/iomgr/buffer_pool_test.c b/test/core/iomgr/buffer_pool_test.c deleted file mode 100644 index 3a58fc73ae..0000000000 --- a/test/core/iomgr/buffer_pool_test.c +++ /dev/null @@ -1,735 +0,0 @@ -/* - * - * Copyright 2016, 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. - * - */ - -#include "src/core/lib/iomgr/buffer_pool.h" - -#include -#include - -#include "test/core/util/test_config.h" - -static void inc_int_cb(grpc_exec_ctx *exec_ctx, void *a, grpc_error *error) { - ++*(int *)a; -} - -static void set_bool_cb(grpc_exec_ctx *exec_ctx, void *a, grpc_error *error) { - *(bool *)a = true; -} -grpc_closure *set_bool(bool *p) { return grpc_closure_create(set_bool_cb, p); } - -typedef struct { - size_t size; - grpc_buffer_user *buffer_user; - grpc_closure *then; -} reclaimer_args; -static void reclaimer_cb(grpc_exec_ctx *exec_ctx, void *args, - grpc_error *error) { - GPR_ASSERT(error == GRPC_ERROR_NONE); - reclaimer_args *a = args; - grpc_buffer_user_free(exec_ctx, a->buffer_user, a->size); - grpc_buffer_user_finish_reclaimation(exec_ctx, a->buffer_user); - grpc_closure_run(exec_ctx, a->then, GRPC_ERROR_NONE); - gpr_free(a); -} -grpc_closure *make_reclaimer(grpc_buffer_user *buffer_user, size_t size, - grpc_closure *then) { - reclaimer_args *a = gpr_malloc(sizeof(*a)); - a->size = size; - a->buffer_user = buffer_user; - a->then = then; - return grpc_closure_create(reclaimer_cb, a); -} - -static void unused_reclaimer_cb(grpc_exec_ctx *exec_ctx, void *arg, - grpc_error *error) { - GPR_ASSERT(error == GRPC_ERROR_CANCELLED); - grpc_closure_run(exec_ctx, arg, GRPC_ERROR_NONE); -} -grpc_closure *make_unused_reclaimer(grpc_closure *then) { - return grpc_closure_create(unused_reclaimer_cb, then); -} - -static void destroy_user(grpc_buffer_user *usr) { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - bool done = false; - grpc_buffer_user_shutdown(&exec_ctx, usr, set_bool(&done)); - grpc_exec_ctx_flush(&exec_ctx); - GPR_ASSERT(done); - grpc_buffer_user_destroy(&exec_ctx, usr); - grpc_exec_ctx_finish(&exec_ctx); -} - -static void test_no_op(void) { - gpr_log(GPR_INFO, "** test_no_op **"); - grpc_buffer_pool_unref(grpc_buffer_pool_create("test_no_op")); -} - -static void test_resize_then_destroy(void) { - gpr_log(GPR_INFO, "** test_resize_then_destroy **"); - grpc_buffer_pool *p = grpc_buffer_pool_create("test_resize_then_destroy"); - grpc_buffer_pool_resize(p, 1024 * 1024); - grpc_buffer_pool_unref(p); -} - -static void test_buffer_user_no_op(void) { - gpr_log(GPR_INFO, "** test_buffer_user_no_op **"); - grpc_buffer_pool *p = grpc_buffer_pool_create("test_buffer_user_no_op"); - grpc_buffer_user usr; - grpc_buffer_user_init(&usr, p, "usr"); - grpc_buffer_pool_unref(p); - destroy_user(&usr); -} - -static void test_instant_alloc_then_free(void) { - gpr_log(GPR_INFO, "** test_instant_alloc_then_free **"); - grpc_buffer_pool *p = grpc_buffer_pool_create("test_instant_alloc_then_free"); - grpc_buffer_pool_resize(p, 1024 * 1024); - grpc_buffer_user usr; - grpc_buffer_user_init(&usr, p, "usr"); - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_alloc(&exec_ctx, &usr, 1024, NULL); - grpc_exec_ctx_finish(&exec_ctx); - } - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_free(&exec_ctx, &usr, 1024); - grpc_exec_ctx_finish(&exec_ctx); - } - grpc_buffer_pool_unref(p); - destroy_user(&usr); -} - -static void test_instant_alloc_free_pair(void) { - gpr_log(GPR_INFO, "** test_instant_alloc_free_pair **"); - grpc_buffer_pool *p = grpc_buffer_pool_create("test_instant_alloc_free_pair"); - grpc_buffer_pool_resize(p, 1024 * 1024); - grpc_buffer_user usr; - grpc_buffer_user_init(&usr, p, "usr"); - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_alloc(&exec_ctx, &usr, 1024, NULL); - grpc_buffer_user_free(&exec_ctx, &usr, 1024); - grpc_exec_ctx_finish(&exec_ctx); - } - grpc_buffer_pool_unref(p); - destroy_user(&usr); -} - -static void test_simple_async_alloc(void) { - gpr_log(GPR_INFO, "** test_simple_async_alloc **"); - grpc_buffer_pool *p = grpc_buffer_pool_create("test_simple_async_alloc"); - grpc_buffer_pool_resize(p, 1024 * 1024); - grpc_buffer_user usr; - grpc_buffer_user_init(&usr, p, "usr"); - { - bool done = false; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(done); - } - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_free(&exec_ctx, &usr, 1024); - grpc_exec_ctx_finish(&exec_ctx); - } - grpc_buffer_pool_unref(p); - destroy_user(&usr); -} - -static void test_async_alloc_blocked_by_size(void) { - gpr_log(GPR_INFO, "** test_async_alloc_blocked_by_size **"); - grpc_buffer_pool *p = - grpc_buffer_pool_create("test_async_alloc_blocked_by_size"); - grpc_buffer_pool_resize(p, 1); - grpc_buffer_user usr; - grpc_buffer_user_init(&usr, p, "usr"); - bool done = false; - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(!done); - } - grpc_buffer_pool_resize(p, 1024); - GPR_ASSERT(done); - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_free(&exec_ctx, &usr, 1024); - grpc_exec_ctx_finish(&exec_ctx); - } - grpc_buffer_pool_unref(p); - destroy_user(&usr); -} - -static void test_scavenge(void) { - gpr_log(GPR_INFO, "** test_scavenge **"); - grpc_buffer_pool *p = grpc_buffer_pool_create("test_scavenge"); - grpc_buffer_pool_resize(p, 1024); - grpc_buffer_user usr1; - grpc_buffer_user usr2; - grpc_buffer_user_init(&usr1, p, "usr1"); - grpc_buffer_user_init(&usr2, p, "usr2"); - { - bool done = false; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_alloc(&exec_ctx, &usr1, 1024, set_bool(&done)); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(done); - } - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_free(&exec_ctx, &usr1, 1024); - grpc_exec_ctx_finish(&exec_ctx); - } - { - bool done = false; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_alloc(&exec_ctx, &usr2, 1024, set_bool(&done)); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(done); - } - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_free(&exec_ctx, &usr2, 1024); - grpc_exec_ctx_finish(&exec_ctx); - } - grpc_buffer_pool_unref(p); - destroy_user(&usr1); - destroy_user(&usr2); -} - -static void test_scavenge_blocked(void) { - gpr_log(GPR_INFO, "** test_scavenge_blocked **"); - grpc_buffer_pool *p = grpc_buffer_pool_create("test_scavenge_blocked"); - grpc_buffer_pool_resize(p, 1024); - grpc_buffer_user usr1; - grpc_buffer_user usr2; - grpc_buffer_user_init(&usr1, p, "usr1"); - grpc_buffer_user_init(&usr2, p, "usr2"); - bool done; - { - done = false; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_alloc(&exec_ctx, &usr1, 1024, set_bool(&done)); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(done); - } - { - done = false; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_alloc(&exec_ctx, &usr2, 1024, set_bool(&done)); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(!done); - } - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_free(&exec_ctx, &usr1, 1024); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(done); - } - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_free(&exec_ctx, &usr2, 1024); - grpc_exec_ctx_finish(&exec_ctx); - } - grpc_buffer_pool_unref(p); - destroy_user(&usr1); - destroy_user(&usr2); -} - -static void test_blocked_until_scheduled_reclaim(void) { - gpr_log(GPR_INFO, "** test_blocked_until_scheduled_reclaim **"); - grpc_buffer_pool *p = - grpc_buffer_pool_create("test_blocked_until_scheduled_reclaim"); - grpc_buffer_pool_resize(p, 1024); - grpc_buffer_user usr; - grpc_buffer_user_init(&usr, p, "usr"); - { - bool done = false; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(done); - } - bool reclaim_done = false; - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_post_reclaimer( - &exec_ctx, &usr, false, - make_reclaimer(&usr, 1024, set_bool(&reclaim_done))); - grpc_exec_ctx_finish(&exec_ctx); - } - { - bool done = false; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(reclaim_done); - GPR_ASSERT(done); - } - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_free(&exec_ctx, &usr, 1024); - grpc_exec_ctx_finish(&exec_ctx); - } - grpc_buffer_pool_unref(p); - destroy_user(&usr); -} - -static void test_blocked_until_scheduled_reclaim_and_scavenge(void) { - gpr_log(GPR_INFO, "** test_blocked_until_scheduled_reclaim_and_scavenge **"); - grpc_buffer_pool *p = grpc_buffer_pool_create( - "test_blocked_until_scheduled_reclaim_and_scavenge"); - grpc_buffer_pool_resize(p, 1024); - grpc_buffer_user usr1; - grpc_buffer_user usr2; - grpc_buffer_user_init(&usr1, p, "usr1"); - grpc_buffer_user_init(&usr2, p, "usr2"); - { - bool done = false; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_alloc(&exec_ctx, &usr1, 1024, set_bool(&done)); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(done); - } - bool reclaim_done = false; - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_post_reclaimer( - &exec_ctx, &usr1, false, - make_reclaimer(&usr1, 1024, set_bool(&reclaim_done))); - grpc_exec_ctx_finish(&exec_ctx); - } - { - bool done = false; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_alloc(&exec_ctx, &usr2, 1024, set_bool(&done)); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(reclaim_done); - GPR_ASSERT(done); - } - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_free(&exec_ctx, &usr2, 1024); - grpc_exec_ctx_finish(&exec_ctx); - } - grpc_buffer_pool_unref(p); - destroy_user(&usr1); - destroy_user(&usr2); -} - -static void test_blocked_until_scheduled_destructive_reclaim(void) { - gpr_log(GPR_INFO, "** test_blocked_until_scheduled_destructive_reclaim **"); - grpc_buffer_pool *p = grpc_buffer_pool_create( - "test_blocked_until_scheduled_destructive_reclaim"); - grpc_buffer_pool_resize(p, 1024); - grpc_buffer_user usr; - grpc_buffer_user_init(&usr, p, "usr"); - { - bool done = false; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(done); - } - bool reclaim_done = false; - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_post_reclaimer( - &exec_ctx, &usr, true, - make_reclaimer(&usr, 1024, set_bool(&reclaim_done))); - grpc_exec_ctx_finish(&exec_ctx); - } - { - bool done = false; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(reclaim_done); - GPR_ASSERT(done); - } - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_free(&exec_ctx, &usr, 1024); - grpc_exec_ctx_finish(&exec_ctx); - } - grpc_buffer_pool_unref(p); - destroy_user(&usr); -} - -static void test_unused_reclaim_is_cancelled(void) { - gpr_log(GPR_INFO, "** test_unused_reclaim_is_cancelled **"); - grpc_buffer_pool *p = - grpc_buffer_pool_create("test_unused_reclaim_is_cancelled"); - grpc_buffer_pool_resize(p, 1024); - grpc_buffer_user usr; - grpc_buffer_user_init(&usr, p, "usr"); - bool benign_done = false; - bool destructive_done = false; - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_post_reclaimer( - &exec_ctx, &usr, false, make_unused_reclaimer(set_bool(&benign_done))); - grpc_buffer_user_post_reclaimer( - &exec_ctx, &usr, true, - make_unused_reclaimer(set_bool(&destructive_done))); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(!benign_done); - GPR_ASSERT(!destructive_done); - } - grpc_buffer_pool_unref(p); - destroy_user(&usr); - GPR_ASSERT(benign_done); - GPR_ASSERT(destructive_done); -} - -static void test_benign_reclaim_is_preferred(void) { - gpr_log(GPR_INFO, "** test_benign_reclaim_is_preferred **"); - grpc_buffer_pool *p = - grpc_buffer_pool_create("test_benign_reclaim_is_preferred"); - grpc_buffer_pool_resize(p, 1024); - grpc_buffer_user usr; - grpc_buffer_user_init(&usr, p, "usr"); - bool benign_done = false; - bool destructive_done = false; - { - bool done = false; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(done); - } - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_post_reclaimer( - &exec_ctx, &usr, false, - make_reclaimer(&usr, 1024, set_bool(&benign_done))); - grpc_buffer_user_post_reclaimer( - &exec_ctx, &usr, true, - make_unused_reclaimer(set_bool(&destructive_done))); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(!benign_done); - GPR_ASSERT(!destructive_done); - } - { - bool done = false; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(benign_done); - GPR_ASSERT(!destructive_done); - GPR_ASSERT(done); - } - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_free(&exec_ctx, &usr, 1024); - grpc_exec_ctx_finish(&exec_ctx); - } - grpc_buffer_pool_unref(p); - destroy_user(&usr); - GPR_ASSERT(benign_done); - GPR_ASSERT(destructive_done); -} - -static void test_multiple_reclaims_can_be_triggered(void) { - gpr_log(GPR_INFO, "** test_multiple_reclaims_can_be_triggered **"); - grpc_buffer_pool *p = - grpc_buffer_pool_create("test_multiple_reclaims_can_be_triggered"); - grpc_buffer_pool_resize(p, 1024); - grpc_buffer_user usr; - grpc_buffer_user_init(&usr, p, "usr"); - bool benign_done = false; - bool destructive_done = false; - { - bool done = false; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(done); - } - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_post_reclaimer( - &exec_ctx, &usr, false, - make_reclaimer(&usr, 512, set_bool(&benign_done))); - grpc_buffer_user_post_reclaimer( - &exec_ctx, &usr, true, - make_reclaimer(&usr, 512, set_bool(&destructive_done))); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(!benign_done); - GPR_ASSERT(!destructive_done); - } - { - bool done = false; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(benign_done); - GPR_ASSERT(destructive_done); - GPR_ASSERT(done); - } - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_free(&exec_ctx, &usr, 1024); - grpc_exec_ctx_finish(&exec_ctx); - } - grpc_buffer_pool_unref(p); - destroy_user(&usr); - GPR_ASSERT(benign_done); - GPR_ASSERT(destructive_done); -} - -static void test_buffer_user_stays_allocated_until_memory_released(void) { - gpr_log(GPR_INFO, - "** test_buffer_user_stays_allocated_until_memory_released **"); - grpc_buffer_pool *p = grpc_buffer_pool_create( - "test_buffer_user_stays_allocated_until_memory_released"); - grpc_buffer_pool_resize(p, 1024 * 1024); - grpc_buffer_user usr; - grpc_buffer_user_init(&usr, p, "usr"); - bool done = false; - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_alloc(&exec_ctx, &usr, 1024, NULL); - grpc_exec_ctx_finish(&exec_ctx); - } - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_pool_unref(p); - grpc_buffer_user_shutdown(&exec_ctx, &usr, set_bool(&done)); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(!done); - } - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_free(&exec_ctx, &usr, 1024); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(done); - } - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_destroy(&exec_ctx, &usr); - grpc_exec_ctx_finish(&exec_ctx); - } -} - -static void test_pools_merged_on_buffer_user_deletion(void) { - gpr_log(GPR_INFO, "** test_pools_merged_on_buffer_user_deletion **"); - grpc_buffer_pool *p = - grpc_buffer_pool_create("test_pools_merged_on_buffer_user_deletion"); - grpc_buffer_pool_resize(p, 1024); - for (int i = 0; i < 10; i++) { - grpc_buffer_user usr; - grpc_buffer_user_init(&usr, p, "usr"); - bool done = false; - bool reclaimer_cancelled = false; - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_post_reclaimer( - &exec_ctx, &usr, false, - make_unused_reclaimer(set_bool(&reclaimer_cancelled))); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(!reclaimer_cancelled); - } - { - bool allocated = false; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_alloc(&exec_ctx, &usr, 1024, set_bool(&allocated)); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(allocated); - GPR_ASSERT(!reclaimer_cancelled); - } - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_shutdown(&exec_ctx, &usr, set_bool(&done)); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(!done); - GPR_ASSERT(!reclaimer_cancelled); - } - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_free(&exec_ctx, &usr, 1024); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(done); - GPR_ASSERT(reclaimer_cancelled); - } - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_destroy(&exec_ctx, &usr); - grpc_exec_ctx_finish(&exec_ctx); - } - } - grpc_buffer_pool_unref(p); -} - -static void test_reclaimers_can_be_posted_repeatedly(void) { - gpr_log(GPR_INFO, "** test_reclaimers_can_be_posted_repeatedly **"); - grpc_buffer_pool *p = - grpc_buffer_pool_create("test_reclaimers_can_be_posted_repeatedly"); - grpc_buffer_pool_resize(p, 1024); - grpc_buffer_user usr; - grpc_buffer_user_init(&usr, p, "usr"); - { - bool allocated = false; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_alloc(&exec_ctx, &usr, 1024, set_bool(&allocated)); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(allocated); - } - for (int i = 0; i < 10; i++) { - bool reclaimer_done = false; - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_post_reclaimer( - &exec_ctx, &usr, false, - make_reclaimer(&usr, 1024, set_bool(&reclaimer_done))); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(!reclaimer_done); - } - { - bool allocated = false; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_alloc(&exec_ctx, &usr, 1024, set_bool(&allocated)); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(allocated); - GPR_ASSERT(reclaimer_done); - } - } - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_free(&exec_ctx, &usr, 1024); - grpc_exec_ctx_finish(&exec_ctx); - } - destroy_user(&usr); - grpc_buffer_pool_unref(p); -} - -static void test_one_slice(void) { - gpr_log(GPR_INFO, "** test_one_slice **"); - - grpc_buffer_pool *p = grpc_buffer_pool_create("test_one_slice"); - grpc_buffer_pool_resize(p, 1024); - - grpc_buffer_user usr; - grpc_buffer_user_init(&usr, p, "usr"); - - grpc_buffer_user_slice_allocator alloc; - int num_allocs = 0; - grpc_buffer_user_slice_allocator_init(&alloc, &usr, inc_int_cb, &num_allocs); - - gpr_slice_buffer buffer; - gpr_slice_buffer_init(&buffer); - - { - const int start_allocs = num_allocs; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_alloc_slices(&exec_ctx, &alloc, 1024, 1, &buffer); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(num_allocs == start_allocs + 1); - } - - gpr_slice_buffer_destroy(&buffer); - destroy_user(&usr); - grpc_buffer_pool_unref(p); -} - -static void test_one_slice_deleted_late(void) { - gpr_log(GPR_INFO, "** test_one_slice_deleted_late **"); - - grpc_buffer_pool *p = grpc_buffer_pool_create("test_one_slice_deleted_late"); - grpc_buffer_pool_resize(p, 1024); - - grpc_buffer_user usr; - grpc_buffer_user_init(&usr, p, "usr"); - - grpc_buffer_user_slice_allocator alloc; - int num_allocs = 0; - grpc_buffer_user_slice_allocator_init(&alloc, &usr, inc_int_cb, &num_allocs); - - gpr_slice_buffer buffer; - gpr_slice_buffer_init(&buffer); - - { - const int start_allocs = num_allocs; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_alloc_slices(&exec_ctx, &alloc, 1024, 1, &buffer); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(num_allocs == start_allocs + 1); - } - - bool done = false; - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_shutdown(&exec_ctx, &usr, set_bool(&done)); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(!done); - } - - grpc_buffer_pool_unref(p); - gpr_slice_buffer_destroy(&buffer); - GPR_ASSERT(done); - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_buffer_user_destroy(&exec_ctx, &usr); - grpc_exec_ctx_finish(&exec_ctx); - } -} - -int main(int argc, char **argv) { - grpc_test_init(argc, argv); - grpc_init(); - test_no_op(); - test_resize_then_destroy(); - test_buffer_user_no_op(); - test_instant_alloc_then_free(); - test_instant_alloc_free_pair(); - test_simple_async_alloc(); - test_async_alloc_blocked_by_size(); - test_scavenge(); - test_scavenge_blocked(); - test_blocked_until_scheduled_reclaim(); - test_blocked_until_scheduled_reclaim_and_scavenge(); - test_blocked_until_scheduled_destructive_reclaim(); - test_unused_reclaim_is_cancelled(); - test_benign_reclaim_is_preferred(); - test_multiple_reclaims_can_be_triggered(); - test_buffer_user_stays_allocated_until_memory_released(); - test_pools_merged_on_buffer_user_deletion(); - test_reclaimers_can_be_posted_repeatedly(); - test_one_slice(); - test_one_slice_deleted_late(); - grpc_shutdown(); - return 0; -} diff --git a/test/core/iomgr/endpoint_pair_test.c b/test/core/iomgr/endpoint_pair_test.c index 4f8aab8323..53fb865e4b 100644 --- a/test/core/iomgr/endpoint_pair_test.c +++ b/test/core/iomgr/endpoint_pair_test.c @@ -49,10 +49,10 @@ static grpc_endpoint_test_fixture create_fixture_endpoint_pair( size_t slice_size) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_endpoint_test_fixture f; - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("endpoint_pair_test"); + grpc_resource_quota *resource_quota = grpc_resource_quota_create("endpoint_pair_test"); grpc_endpoint_pair p = - grpc_iomgr_create_endpoint_pair("test", buffer_pool, slice_size); - grpc_buffer_pool_unref(buffer_pool); + grpc_iomgr_create_endpoint_pair("test", resource_quota, slice_size); + grpc_resource_quota_unref(resource_quota); f.client_ep = p.client; f.server_ep = p.server; diff --git a/test/core/iomgr/fd_conservation_posix_test.c b/test/core/iomgr/fd_conservation_posix_test.c index f3a36c78e4..652b37eb6f 100644 --- a/test/core/iomgr/fd_conservation_posix_test.c +++ b/test/core/iomgr/fd_conservation_posix_test.c @@ -52,18 +52,18 @@ int main(int argc, char **argv) { of descriptors */ rlim.rlim_cur = rlim.rlim_max = 10; GPR_ASSERT(0 == setrlimit(RLIMIT_NOFILE, &rlim)); - grpc_buffer_pool *buffer_pool = - grpc_buffer_pool_create("fd_conservation_posix_test"); + grpc_resource_quota *resource_quota = + grpc_resource_quota_create("fd_conservation_posix_test"); for (i = 0; i < 100; i++) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - p = grpc_iomgr_create_endpoint_pair("test", buffer_pool, 1); + p = grpc_iomgr_create_endpoint_pair("test", resource_quota, 1); grpc_endpoint_destroy(&exec_ctx, p.client); grpc_endpoint_destroy(&exec_ctx, p.server); grpc_exec_ctx_finish(&exec_ctx); } - grpc_buffer_pool_unref(buffer_pool); + grpc_resource_quota_unref(resource_quota); grpc_iomgr_shutdown(); return 0; diff --git a/test/core/iomgr/resource_quota_test.c b/test/core/iomgr/resource_quota_test.c new file mode 100644 index 0000000000..5963ed089b --- /dev/null +++ b/test/core/iomgr/resource_quota_test.c @@ -0,0 +1,743 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include "src/core/lib/iomgr/resource_quota.h" + +#include +#include + +#include "test/core/util/test_config.h" + +static void inc_int_cb(grpc_exec_ctx *exec_ctx, void *a, grpc_error *error) { + ++*(int *)a; +} + +static void set_bool_cb(grpc_exec_ctx *exec_ctx, void *a, grpc_error *error) { + *(bool *)a = true; +} +grpc_closure *set_bool(bool *p) { return grpc_closure_create(set_bool_cb, p); } + +typedef struct { + size_t size; + grpc_resource_user *resource_user; + grpc_closure *then; +} reclaimer_args; +static void reclaimer_cb(grpc_exec_ctx *exec_ctx, void *args, + grpc_error *error) { + GPR_ASSERT(error == GRPC_ERROR_NONE); + reclaimer_args *a = args; + grpc_resource_user_free(exec_ctx, a->resource_user, a->size); + grpc_resource_user_finish_reclaimation(exec_ctx, a->resource_user); + grpc_closure_run(exec_ctx, a->then, GRPC_ERROR_NONE); + gpr_free(a); +} +grpc_closure *make_reclaimer(grpc_resource_user *resource_user, size_t size, + grpc_closure *then) { + reclaimer_args *a = gpr_malloc(sizeof(*a)); + a->size = size; + a->resource_user = resource_user; + a->then = then; + return grpc_closure_create(reclaimer_cb, a); +} + +static void unused_reclaimer_cb(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { + GPR_ASSERT(error == GRPC_ERROR_CANCELLED); + grpc_closure_run(exec_ctx, arg, GRPC_ERROR_NONE); +} +grpc_closure *make_unused_reclaimer(grpc_closure *then) { + return grpc_closure_create(unused_reclaimer_cb, then); +} + +static void destroy_user(grpc_resource_user *usr) { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + bool done = false; + grpc_resource_user_shutdown(&exec_ctx, usr, set_bool(&done)); + grpc_exec_ctx_flush(&exec_ctx); + GPR_ASSERT(done); + grpc_resource_user_destroy(&exec_ctx, usr); + grpc_exec_ctx_finish(&exec_ctx); +} + +static void test_no_op(void) { + gpr_log(GPR_INFO, "** test_no_op **"); + grpc_resource_quota_unref(grpc_resource_quota_create("test_no_op")); +} + +static void test_resize_then_destroy(void) { + gpr_log(GPR_INFO, "** test_resize_then_destroy **"); + grpc_resource_quota *p = + grpc_resource_quota_create("test_resize_then_destroy"); + grpc_resource_quota_resize(p, 1024 * 1024); + grpc_resource_quota_unref(p); +} + +static void test_resource_user_no_op(void) { + gpr_log(GPR_INFO, "** test_resource_user_no_op **"); + grpc_resource_quota *p = + grpc_resource_quota_create("test_resource_user_no_op"); + grpc_resource_user usr; + grpc_resource_user_init(&usr, p, "usr"); + grpc_resource_quota_unref(p); + destroy_user(&usr); +} + +static void test_instant_alloc_then_free(void) { + gpr_log(GPR_INFO, "** test_instant_alloc_then_free **"); + grpc_resource_quota *p = + grpc_resource_quota_create("test_instant_alloc_then_free"); + grpc_resource_quota_resize(p, 1024 * 1024); + grpc_resource_user usr; + grpc_resource_user_init(&usr, p, "usr"); + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_alloc(&exec_ctx, &usr, 1024, NULL); + grpc_exec_ctx_finish(&exec_ctx); + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_free(&exec_ctx, &usr, 1024); + grpc_exec_ctx_finish(&exec_ctx); + } + grpc_resource_quota_unref(p); + destroy_user(&usr); +} + +static void test_instant_alloc_free_pair(void) { + gpr_log(GPR_INFO, "** test_instant_alloc_free_pair **"); + grpc_resource_quota *p = + grpc_resource_quota_create("test_instant_alloc_free_pair"); + grpc_resource_quota_resize(p, 1024 * 1024); + grpc_resource_user usr; + grpc_resource_user_init(&usr, p, "usr"); + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_alloc(&exec_ctx, &usr, 1024, NULL); + grpc_resource_user_free(&exec_ctx, &usr, 1024); + grpc_exec_ctx_finish(&exec_ctx); + } + grpc_resource_quota_unref(p); + destroy_user(&usr); +} + +static void test_simple_async_alloc(void) { + gpr_log(GPR_INFO, "** test_simple_async_alloc **"); + grpc_resource_quota *p = + grpc_resource_quota_create("test_simple_async_alloc"); + grpc_resource_quota_resize(p, 1024 * 1024); + grpc_resource_user usr; + grpc_resource_user_init(&usr, p, "usr"); + { + bool done = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(done); + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_free(&exec_ctx, &usr, 1024); + grpc_exec_ctx_finish(&exec_ctx); + } + grpc_resource_quota_unref(p); + destroy_user(&usr); +} + +static void test_async_alloc_blocked_by_size(void) { + gpr_log(GPR_INFO, "** test_async_alloc_blocked_by_size **"); + grpc_resource_quota *p = + grpc_resource_quota_create("test_async_alloc_blocked_by_size"); + grpc_resource_quota_resize(p, 1); + grpc_resource_user usr; + grpc_resource_user_init(&usr, p, "usr"); + bool done = false; + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(!done); + } + grpc_resource_quota_resize(p, 1024); + GPR_ASSERT(done); + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_free(&exec_ctx, &usr, 1024); + grpc_exec_ctx_finish(&exec_ctx); + } + grpc_resource_quota_unref(p); + destroy_user(&usr); +} + +static void test_scavenge(void) { + gpr_log(GPR_INFO, "** test_scavenge **"); + grpc_resource_quota *p = grpc_resource_quota_create("test_scavenge"); + grpc_resource_quota_resize(p, 1024); + grpc_resource_user usr1; + grpc_resource_user usr2; + grpc_resource_user_init(&usr1, p, "usr1"); + grpc_resource_user_init(&usr2, p, "usr2"); + { + bool done = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_alloc(&exec_ctx, &usr1, 1024, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(done); + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_free(&exec_ctx, &usr1, 1024); + grpc_exec_ctx_finish(&exec_ctx); + } + { + bool done = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_alloc(&exec_ctx, &usr2, 1024, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(done); + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_free(&exec_ctx, &usr2, 1024); + grpc_exec_ctx_finish(&exec_ctx); + } + grpc_resource_quota_unref(p); + destroy_user(&usr1); + destroy_user(&usr2); +} + +static void test_scavenge_blocked(void) { + gpr_log(GPR_INFO, "** test_scavenge_blocked **"); + grpc_resource_quota *p = grpc_resource_quota_create("test_scavenge_blocked"); + grpc_resource_quota_resize(p, 1024); + grpc_resource_user usr1; + grpc_resource_user usr2; + grpc_resource_user_init(&usr1, p, "usr1"); + grpc_resource_user_init(&usr2, p, "usr2"); + bool done; + { + done = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_alloc(&exec_ctx, &usr1, 1024, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(done); + } + { + done = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_alloc(&exec_ctx, &usr2, 1024, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(!done); + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_free(&exec_ctx, &usr1, 1024); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(done); + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_free(&exec_ctx, &usr2, 1024); + grpc_exec_ctx_finish(&exec_ctx); + } + grpc_resource_quota_unref(p); + destroy_user(&usr1); + destroy_user(&usr2); +} + +static void test_blocked_until_scheduled_reclaim(void) { + gpr_log(GPR_INFO, "** test_blocked_until_scheduled_reclaim **"); + grpc_resource_quota *p = + grpc_resource_quota_create("test_blocked_until_scheduled_reclaim"); + grpc_resource_quota_resize(p, 1024); + grpc_resource_user usr; + grpc_resource_user_init(&usr, p, "usr"); + { + bool done = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(done); + } + bool reclaim_done = false; + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_post_reclaimer( + &exec_ctx, &usr, false, + make_reclaimer(&usr, 1024, set_bool(&reclaim_done))); + grpc_exec_ctx_finish(&exec_ctx); + } + { + bool done = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(reclaim_done); + GPR_ASSERT(done); + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_free(&exec_ctx, &usr, 1024); + grpc_exec_ctx_finish(&exec_ctx); + } + grpc_resource_quota_unref(p); + destroy_user(&usr); +} + +static void test_blocked_until_scheduled_reclaim_and_scavenge(void) { + gpr_log(GPR_INFO, "** test_blocked_until_scheduled_reclaim_and_scavenge **"); + grpc_resource_quota *p = grpc_resource_quota_create( + "test_blocked_until_scheduled_reclaim_and_scavenge"); + grpc_resource_quota_resize(p, 1024); + grpc_resource_user usr1; + grpc_resource_user usr2; + grpc_resource_user_init(&usr1, p, "usr1"); + grpc_resource_user_init(&usr2, p, "usr2"); + { + bool done = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_alloc(&exec_ctx, &usr1, 1024, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(done); + } + bool reclaim_done = false; + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_post_reclaimer( + &exec_ctx, &usr1, false, + make_reclaimer(&usr1, 1024, set_bool(&reclaim_done))); + grpc_exec_ctx_finish(&exec_ctx); + } + { + bool done = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_alloc(&exec_ctx, &usr2, 1024, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(reclaim_done); + GPR_ASSERT(done); + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_free(&exec_ctx, &usr2, 1024); + grpc_exec_ctx_finish(&exec_ctx); + } + grpc_resource_quota_unref(p); + destroy_user(&usr1); + destroy_user(&usr2); +} + +static void test_blocked_until_scheduled_destructive_reclaim(void) { + gpr_log(GPR_INFO, "** test_blocked_until_scheduled_destructive_reclaim **"); + grpc_resource_quota *p = grpc_resource_quota_create( + "test_blocked_until_scheduled_destructive_reclaim"); + grpc_resource_quota_resize(p, 1024); + grpc_resource_user usr; + grpc_resource_user_init(&usr, p, "usr"); + { + bool done = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(done); + } + bool reclaim_done = false; + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_post_reclaimer( + &exec_ctx, &usr, true, + make_reclaimer(&usr, 1024, set_bool(&reclaim_done))); + grpc_exec_ctx_finish(&exec_ctx); + } + { + bool done = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(reclaim_done); + GPR_ASSERT(done); + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_free(&exec_ctx, &usr, 1024); + grpc_exec_ctx_finish(&exec_ctx); + } + grpc_resource_quota_unref(p); + destroy_user(&usr); +} + +static void test_unused_reclaim_is_cancelled(void) { + gpr_log(GPR_INFO, "** test_unused_reclaim_is_cancelled **"); + grpc_resource_quota *p = + grpc_resource_quota_create("test_unused_reclaim_is_cancelled"); + grpc_resource_quota_resize(p, 1024); + grpc_resource_user usr; + grpc_resource_user_init(&usr, p, "usr"); + bool benign_done = false; + bool destructive_done = false; + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_post_reclaimer( + &exec_ctx, &usr, false, make_unused_reclaimer(set_bool(&benign_done))); + grpc_resource_user_post_reclaimer( + &exec_ctx, &usr, true, + make_unused_reclaimer(set_bool(&destructive_done))); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(!benign_done); + GPR_ASSERT(!destructive_done); + } + grpc_resource_quota_unref(p); + destroy_user(&usr); + GPR_ASSERT(benign_done); + GPR_ASSERT(destructive_done); +} + +static void test_benign_reclaim_is_preferred(void) { + gpr_log(GPR_INFO, "** test_benign_reclaim_is_preferred **"); + grpc_resource_quota *p = + grpc_resource_quota_create("test_benign_reclaim_is_preferred"); + grpc_resource_quota_resize(p, 1024); + grpc_resource_user usr; + grpc_resource_user_init(&usr, p, "usr"); + bool benign_done = false; + bool destructive_done = false; + { + bool done = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(done); + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_post_reclaimer( + &exec_ctx, &usr, false, + make_reclaimer(&usr, 1024, set_bool(&benign_done))); + grpc_resource_user_post_reclaimer( + &exec_ctx, &usr, true, + make_unused_reclaimer(set_bool(&destructive_done))); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(!benign_done); + GPR_ASSERT(!destructive_done); + } + { + bool done = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(benign_done); + GPR_ASSERT(!destructive_done); + GPR_ASSERT(done); + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_free(&exec_ctx, &usr, 1024); + grpc_exec_ctx_finish(&exec_ctx); + } + grpc_resource_quota_unref(p); + destroy_user(&usr); + GPR_ASSERT(benign_done); + GPR_ASSERT(destructive_done); +} + +static void test_multiple_reclaims_can_be_triggered(void) { + gpr_log(GPR_INFO, "** test_multiple_reclaims_can_be_triggered **"); + grpc_resource_quota *p = + grpc_resource_quota_create("test_multiple_reclaims_can_be_triggered"); + grpc_resource_quota_resize(p, 1024); + grpc_resource_user usr; + grpc_resource_user_init(&usr, p, "usr"); + bool benign_done = false; + bool destructive_done = false; + { + bool done = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(done); + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_post_reclaimer( + &exec_ctx, &usr, false, + make_reclaimer(&usr, 512, set_bool(&benign_done))); + grpc_resource_user_post_reclaimer( + &exec_ctx, &usr, true, + make_reclaimer(&usr, 512, set_bool(&destructive_done))); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(!benign_done); + GPR_ASSERT(!destructive_done); + } + { + bool done = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(benign_done); + GPR_ASSERT(destructive_done); + GPR_ASSERT(done); + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_free(&exec_ctx, &usr, 1024); + grpc_exec_ctx_finish(&exec_ctx); + } + grpc_resource_quota_unref(p); + destroy_user(&usr); + GPR_ASSERT(benign_done); + GPR_ASSERT(destructive_done); +} + +static void test_resource_user_stays_allocated_until_memory_released(void) { + gpr_log(GPR_INFO, + "** test_resource_user_stays_allocated_until_memory_released **"); + grpc_resource_quota *p = grpc_resource_quota_create( + "test_resource_user_stays_allocated_until_memory_released"); + grpc_resource_quota_resize(p, 1024 * 1024); + grpc_resource_user usr; + grpc_resource_user_init(&usr, p, "usr"); + bool done = false; + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_alloc(&exec_ctx, &usr, 1024, NULL); + grpc_exec_ctx_finish(&exec_ctx); + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_quota_unref(p); + grpc_resource_user_shutdown(&exec_ctx, &usr, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(!done); + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_free(&exec_ctx, &usr, 1024); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(done); + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_destroy(&exec_ctx, &usr); + grpc_exec_ctx_finish(&exec_ctx); + } +} + +static void test_pools_merged_on_resource_user_deletion(void) { + gpr_log(GPR_INFO, "** test_pools_merged_on_resource_user_deletion **"); + grpc_resource_quota *p = + grpc_resource_quota_create("test_pools_merged_on_resource_user_deletion"); + grpc_resource_quota_resize(p, 1024); + for (int i = 0; i < 10; i++) { + grpc_resource_user usr; + grpc_resource_user_init(&usr, p, "usr"); + bool done = false; + bool reclaimer_cancelled = false; + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_post_reclaimer( + &exec_ctx, &usr, false, + make_unused_reclaimer(set_bool(&reclaimer_cancelled))); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(!reclaimer_cancelled); + } + { + bool allocated = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&allocated)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(allocated); + GPR_ASSERT(!reclaimer_cancelled); + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_shutdown(&exec_ctx, &usr, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(!done); + GPR_ASSERT(!reclaimer_cancelled); + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_free(&exec_ctx, &usr, 1024); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(done); + GPR_ASSERT(reclaimer_cancelled); + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_destroy(&exec_ctx, &usr); + grpc_exec_ctx_finish(&exec_ctx); + } + } + grpc_resource_quota_unref(p); +} + +static void test_reclaimers_can_be_posted_repeatedly(void) { + gpr_log(GPR_INFO, "** test_reclaimers_can_be_posted_repeatedly **"); + grpc_resource_quota *p = + grpc_resource_quota_create("test_reclaimers_can_be_posted_repeatedly"); + grpc_resource_quota_resize(p, 1024); + grpc_resource_user usr; + grpc_resource_user_init(&usr, p, "usr"); + { + bool allocated = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&allocated)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(allocated); + } + for (int i = 0; i < 10; i++) { + bool reclaimer_done = false; + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_post_reclaimer( + &exec_ctx, &usr, false, + make_reclaimer(&usr, 1024, set_bool(&reclaimer_done))); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(!reclaimer_done); + } + { + bool allocated = false; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&allocated)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(allocated); + GPR_ASSERT(reclaimer_done); + } + } + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_free(&exec_ctx, &usr, 1024); + grpc_exec_ctx_finish(&exec_ctx); + } + destroy_user(&usr); + grpc_resource_quota_unref(p); +} + +static void test_one_slice(void) { + gpr_log(GPR_INFO, "** test_one_slice **"); + + grpc_resource_quota *p = grpc_resource_quota_create("test_one_slice"); + grpc_resource_quota_resize(p, 1024); + + grpc_resource_user usr; + grpc_resource_user_init(&usr, p, "usr"); + + grpc_resource_user_slice_allocator alloc; + int num_allocs = 0; + grpc_resource_user_slice_allocator_init(&alloc, &usr, inc_int_cb, + &num_allocs); + + gpr_slice_buffer buffer; + gpr_slice_buffer_init(&buffer); + + { + const int start_allocs = num_allocs; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_alloc_slices(&exec_ctx, &alloc, 1024, 1, &buffer); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(num_allocs == start_allocs + 1); + } + + gpr_slice_buffer_destroy(&buffer); + destroy_user(&usr); + grpc_resource_quota_unref(p); +} + +static void test_one_slice_deleted_late(void) { + gpr_log(GPR_INFO, "** test_one_slice_deleted_late **"); + + grpc_resource_quota *p = + grpc_resource_quota_create("test_one_slice_deleted_late"); + grpc_resource_quota_resize(p, 1024); + + grpc_resource_user usr; + grpc_resource_user_init(&usr, p, "usr"); + + grpc_resource_user_slice_allocator alloc; + int num_allocs = 0; + grpc_resource_user_slice_allocator_init(&alloc, &usr, inc_int_cb, + &num_allocs); + + gpr_slice_buffer buffer; + gpr_slice_buffer_init(&buffer); + + { + const int start_allocs = num_allocs; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_alloc_slices(&exec_ctx, &alloc, 1024, 1, &buffer); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(num_allocs == start_allocs + 1); + } + + bool done = false; + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_shutdown(&exec_ctx, &usr, set_bool(&done)); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(!done); + } + + grpc_resource_quota_unref(p); + gpr_slice_buffer_destroy(&buffer); + GPR_ASSERT(done); + { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_destroy(&exec_ctx, &usr); + grpc_exec_ctx_finish(&exec_ctx); + } +} + +int main(int argc, char **argv) { + grpc_test_init(argc, argv); + grpc_init(); + test_no_op(); + test_resize_then_destroy(); + test_resource_user_no_op(); + test_instant_alloc_then_free(); + test_instant_alloc_free_pair(); + test_simple_async_alloc(); + test_async_alloc_blocked_by_size(); + test_scavenge(); + test_scavenge_blocked(); + test_blocked_until_scheduled_reclaim(); + test_blocked_until_scheduled_reclaim_and_scavenge(); + test_blocked_until_scheduled_destructive_reclaim(); + test_unused_reclaim_is_cancelled(); + test_benign_reclaim_is_preferred(); + test_multiple_reclaims_can_be_triggered(); + test_resource_user_stays_allocated_until_memory_released(); + test_pools_merged_on_resource_user_deletion(); + test_reclaimers_can_be_posted_repeatedly(); + test_one_slice(); + test_one_slice_deleted_late(); + grpc_shutdown(); + return 0; +} diff --git a/test/core/iomgr/tcp_posix_test.c b/test/core/iomgr/tcp_posix_test.c index 04522b8ddf..3f2e19ffd8 100644 --- a/test/core/iomgr/tcp_posix_test.c +++ b/test/core/iomgr/tcp_posix_test.c @@ -176,10 +176,10 @@ static void read_test(size_t num_bytes, size_t slice_size) { create_sockets(sv); - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("read_test"); - ep = grpc_tcp_create(grpc_fd_create(sv[1], "read_test"), buffer_pool, + grpc_resource_quota *resource_quota = grpc_resource_quota_create("read_test"); + ep = grpc_tcp_create(grpc_fd_create(sv[1], "read_test"), resource_quota, slice_size, "test"); - grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); + grpc_resource_quota_internal_unref(&exec_ctx, resource_quota); grpc_endpoint_add_to_pollset(&exec_ctx, ep, g_pollset); written_bytes = fill_socket_partial(sv[0], num_bytes); @@ -226,10 +226,11 @@ static void large_read_test(size_t slice_size) { create_sockets(sv); - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("large_read_test"); - ep = grpc_tcp_create(grpc_fd_create(sv[1], "large_read_test"), buffer_pool, + grpc_resource_quota *resource_quota = + grpc_resource_quota_create("large_read_test"); + ep = grpc_tcp_create(grpc_fd_create(sv[1], "large_read_test"), resource_quota, slice_size, "test"); - grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); + grpc_resource_quota_internal_unref(&exec_ctx, resource_quota); grpc_endpoint_add_to_pollset(&exec_ctx, ep, g_pollset); written_bytes = fill_socket(sv[0]); @@ -364,10 +365,11 @@ static void write_test(size_t num_bytes, size_t slice_size) { create_sockets(sv); - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("write_test"); - ep = grpc_tcp_create(grpc_fd_create(sv[1], "write_test"), buffer_pool, + grpc_resource_quota *resource_quota = + grpc_resource_quota_create("write_test"); + ep = grpc_tcp_create(grpc_fd_create(sv[1], "write_test"), resource_quota, GRPC_TCP_DEFAULT_READ_SLICE_SIZE, "test"); - grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); + grpc_resource_quota_internal_unref(&exec_ctx, resource_quota); grpc_endpoint_add_to_pollset(&exec_ctx, ep, g_pollset); state.ep = ep; @@ -430,11 +432,12 @@ static void release_fd_test(size_t num_bytes, size_t slice_size) { create_sockets(sv); - grpc_buffer_pool *buffer_pool = grpc_buffer_pool_create("release_fd_test"); - ep = grpc_tcp_create(grpc_fd_create(sv[1], "read_test"), buffer_pool, + grpc_resource_quota *resource_quota = + grpc_resource_quota_create("release_fd_test"); + ep = grpc_tcp_create(grpc_fd_create(sv[1], "read_test"), resource_quota, slice_size, "test"); GPR_ASSERT(grpc_tcp_fd(ep) == sv[1] && sv[1] >= 0); - grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); + grpc_resource_quota_internal_unref(&exec_ctx, resource_quota); grpc_endpoint_add_to_pollset(&exec_ctx, ep, g_pollset); written_bytes = fill_socket_partial(sv[0], num_bytes); @@ -520,13 +523,13 @@ static grpc_endpoint_test_fixture create_fixture_tcp_socketpair( grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; create_sockets(sv); - grpc_buffer_pool *buffer_pool = - grpc_buffer_pool_create("tcp_posix_test_socketpair"); + grpc_resource_quota *resource_quota = + grpc_resource_quota_create("tcp_posix_test_socketpair"); f.client_ep = grpc_tcp_create(grpc_fd_create(sv[0], "fixture:client"), - buffer_pool, slice_size, "test"); + resource_quota, slice_size, "test"); f.server_ep = grpc_tcp_create(grpc_fd_create(sv[1], "fixture:server"), - buffer_pool, slice_size, "test"); - grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); + resource_quota, slice_size, "test"); + grpc_resource_quota_internal_unref(&exec_ctx, resource_quota); grpc_endpoint_add_to_pollset(&exec_ctx, f.client_ep, g_pollset); grpc_endpoint_add_to_pollset(&exec_ctx, f.server_ep, g_pollset); diff --git a/test/core/security/secure_endpoint_test.c b/test/core/security/secure_endpoint_test.c index 3397c9563e..2262fde98d 100644 --- a/test/core/security/secure_endpoint_test.c +++ b/test/core/security/secure_endpoint_test.c @@ -56,10 +56,10 @@ static grpc_endpoint_test_fixture secure_endpoint_create_fixture_tcp_socketpair( grpc_endpoint_test_fixture f; grpc_endpoint_pair tcp; - grpc_buffer_pool *buffer_pool = - grpc_buffer_pool_create("secure_endpoint_test"); - tcp = grpc_iomgr_create_endpoint_pair("fixture", buffer_pool, slice_size); - grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); + grpc_resource_quota *resource_quota = + grpc_resource_quota_create("secure_endpoint_test"); + tcp = grpc_iomgr_create_endpoint_pair("fixture", resource_quota, slice_size); + grpc_resource_quota_internal_unref(&exec_ctx, resource_quota); grpc_endpoint_add_to_pollset(&exec_ctx, tcp.client, g_pollset); grpc_endpoint_add_to_pollset(&exec_ctx, tcp.server, g_pollset); diff --git a/test/core/util/mock_endpoint.c b/test/core/util/mock_endpoint.c index a70de7678c..2b041a4484 100644 --- a/test/core/util/mock_endpoint.c +++ b/test/core/util/mock_endpoint.c @@ -46,7 +46,7 @@ typedef struct grpc_mock_endpoint { gpr_slice_buffer read_buffer; gpr_slice_buffer *on_read_out; grpc_closure *on_read; - grpc_buffer_user buffer_user; + grpc_resource_user resource_user; } grpc_mock_endpoint; static void me_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, @@ -83,7 +83,7 @@ static void unref(grpc_exec_ctx *exec_ctx, grpc_mock_endpoint *m) { if (0 == --m->refs) { gpr_mu_unlock(&m->mu); gpr_slice_buffer_destroy(&m->read_buffer); - grpc_buffer_user_destroy(exec_ctx, &m->buffer_user); + grpc_resource_user_destroy(exec_ctx, &m->resource_user); gpr_free(m); } else { gpr_mu_unlock(&m->mu); @@ -104,8 +104,8 @@ static void me_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { GRPC_ERROR_CREATE("Endpoint Shutdown"), NULL); m->on_read = NULL; } - grpc_buffer_user_shutdown(exec_ctx, &m->buffer_user, - grpc_closure_create(me_finish_shutdown, m)); + grpc_resource_user_shutdown(exec_ctx, &m->resource_user, + grpc_closure_create(me_finish_shutdown, m)); gpr_mu_unlock(&m->mu); } @@ -118,9 +118,9 @@ static char *me_get_peer(grpc_endpoint *ep) { return gpr_strdup("fake:mock_endpoint"); } -static grpc_buffer_user *me_get_buffer_user(grpc_endpoint *ep) { +static grpc_resource_user *me_get_resource_user(grpc_endpoint *ep) { grpc_mock_endpoint *m = (grpc_mock_endpoint *)ep; - return &m->buffer_user; + return &m->resource_user; } static grpc_workqueue *me_get_workqueue(grpc_endpoint *ep) { return NULL; } @@ -133,18 +133,18 @@ static const grpc_endpoint_vtable vtable = { me_add_to_pollset_set, me_shutdown, me_destroy, - me_get_buffer_user, + me_get_resource_user, me_get_peer, }; grpc_endpoint *grpc_mock_endpoint_create(void (*on_write)(gpr_slice slice), - grpc_buffer_pool *buffer_pool) { + grpc_resource_quota *resource_quota) { grpc_mock_endpoint *m = gpr_malloc(sizeof(*m)); m->base.vtable = &vtable; m->refs = 2; char *name; gpr_asprintf(&name, "mock_endpoint_%" PRIxPTR, (intptr_t)m); - grpc_buffer_user_init(&m->buffer_user, buffer_pool, name); + grpc_resource_user_init(&m->resource_user, resource_quota, name); gpr_free(name); gpr_slice_buffer_init(&m->read_buffer); gpr_mu_init(&m->mu); diff --git a/test/core/util/mock_endpoint.h b/test/core/util/mock_endpoint.h index bb59a16f7a..b3a464ca01 100644 --- a/test/core/util/mock_endpoint.h +++ b/test/core/util/mock_endpoint.h @@ -37,7 +37,7 @@ #include "src/core/lib/iomgr/endpoint.h" grpc_endpoint *grpc_mock_endpoint_create(void (*on_write)(gpr_slice slice), - grpc_buffer_pool *buffer_pool); + grpc_resource_quota *resource_quota); void grpc_mock_endpoint_put_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *mock_endpoint, gpr_slice slice); diff --git a/test/core/util/passthru_endpoint.c b/test/core/util/passthru_endpoint.c index a1aaeda916..85ed1c824c 100644 --- a/test/core/util/passthru_endpoint.c +++ b/test/core/util/passthru_endpoint.c @@ -46,7 +46,7 @@ typedef struct { gpr_slice_buffer read_buffer; gpr_slice_buffer *on_read_out; grpc_closure *on_read; - grpc_buffer_user buffer_user; + grpc_resource_user resource_user; } half; struct passthru_endpoint { @@ -142,7 +142,7 @@ static void me_really_destroy(grpc_exec_ctx *exec_ctx, void *ep, static void me_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { half *m = (half *)ep; - grpc_buffer_user_shutdown(exec_ctx, &m->buffer_user, + grpc_resource_user_shutdown(exec_ctx, &m->resource_user, grpc_closure_create(me_really_destroy, m)); } @@ -152,9 +152,9 @@ static char *me_get_peer(grpc_endpoint *ep) { static grpc_workqueue *me_get_workqueue(grpc_endpoint *ep) { return NULL; } -static grpc_buffer_user *me_get_buffer_user(grpc_endpoint *ep) { +static grpc_resource_user *me_get_resource_user(grpc_endpoint *ep) { half *m = (half *)ep; - return &m->buffer_user; + return &m->resource_user; } static const grpc_endpoint_vtable vtable = { @@ -165,12 +165,12 @@ static const grpc_endpoint_vtable vtable = { me_add_to_pollset_set, me_shutdown, me_destroy, - me_get_buffer_user, + me_get_resource_user, me_get_peer, }; static void half_init(half *m, passthru_endpoint *parent, - grpc_buffer_pool *buffer_pool, const char *half_name) { + grpc_resource_quota *resource_quota, const char *half_name) { m->base.vtable = &vtable; m->parent = parent; gpr_slice_buffer_init(&m->read_buffer); @@ -178,18 +178,18 @@ static void half_init(half *m, passthru_endpoint *parent, char *name; gpr_asprintf(&name, "passthru_endpoint_%s_%" PRIxPTR, half_name, (intptr_t)parent); - grpc_buffer_user_init(&m->buffer_user, buffer_pool, name); + grpc_resource_user_init(&m->resource_user, resource_quota, name); gpr_free(name); } void grpc_passthru_endpoint_create(grpc_endpoint **client, grpc_endpoint **server, - grpc_buffer_pool *buffer_pool) { + grpc_resource_quota *resource_quota) { passthru_endpoint *m = gpr_malloc(sizeof(*m)); m->halves = 2; m->shutdown = 0; - half_init(&m->client, m, buffer_pool, "client"); - half_init(&m->server, m, buffer_pool, "server"); + half_init(&m->client, m, resource_quota, "client"); + half_init(&m->server, m, resource_quota, "server"); gpr_mu_init(&m->mu); *client = &m->client.base; *server = &m->server.base; diff --git a/test/core/util/passthru_endpoint.h b/test/core/util/passthru_endpoint.h index 9756315084..b81ac5571c 100644 --- a/test/core/util/passthru_endpoint.h +++ b/test/core/util/passthru_endpoint.h @@ -38,6 +38,6 @@ void grpc_passthru_endpoint_create(grpc_endpoint **client, grpc_endpoint **server, - grpc_buffer_pool *buffer_pool); + grpc_resource_quota *resource_quota); #endif diff --git a/test/core/util/port_server_client.c b/test/core/util/port_server_client.c index f9e16ca407..b2342feeb4 100644 --- a/test/core/util/port_server_client.c +++ b/test/core/util/port_server_client.c @@ -99,12 +99,12 @@ void grpc_free_port_using_server(char *server, int port) { req.http.path = path; grpc_httpcli_context_init(&context); - grpc_buffer_pool *buffer_pool = - grpc_buffer_pool_create("port_server_client/free"); - grpc_httpcli_get(&exec_ctx, &context, &pr.pops, buffer_pool, &req, + grpc_resource_quota *resource_quota = + grpc_resource_quota_create("port_server_client/free"); + grpc_httpcli_get(&exec_ctx, &context, &pr.pops, resource_quota, &req, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), grpc_closure_create(freed_port_from_server, &pr), &rsp); - grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); + grpc_resource_quota_internal_unref(&exec_ctx, resource_quota); gpr_mu_lock(pr.mu); while (!pr.done) { grpc_pollset_worker *worker = NULL; @@ -170,13 +170,13 @@ static void got_port_from_server(grpc_exec_ctx *exec_ctx, void *arg, req.http.path = "/get"; grpc_http_response_destroy(&pr->response); memset(&pr->response, 0, sizeof(pr->response)); - grpc_buffer_pool *buffer_pool = - grpc_buffer_pool_create("port_server_client/pick_retry"); - grpc_httpcli_get(exec_ctx, pr->ctx, &pr->pops, buffer_pool, &req, + grpc_resource_quota *resource_quota = + grpc_resource_quota_create("port_server_client/pick_retry"); + grpc_httpcli_get(exec_ctx, pr->ctx, &pr->pops, resource_quota, &req, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), grpc_closure_create(got_port_from_server, pr), &pr->response); - grpc_buffer_pool_internal_unref(exec_ctx, buffer_pool); + grpc_resource_quota_internal_unref(exec_ctx, resource_quota); return; } GPR_ASSERT(response); @@ -217,13 +217,13 @@ int grpc_pick_port_using_server(char *server) { req.http.path = "/get"; grpc_httpcli_context_init(&context); - grpc_buffer_pool *buffer_pool = - grpc_buffer_pool_create("port_server_client/pick"); - grpc_httpcli_get(&exec_ctx, &context, &pr.pops, buffer_pool, &req, + grpc_resource_quota *resource_quota = + grpc_resource_quota_create("port_server_client/pick"); + grpc_httpcli_get(&exec_ctx, &context, &pr.pops, resource_quota, &req, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), grpc_closure_create(got_port_from_server, &pr), &pr.response); - grpc_buffer_pool_internal_unref(&exec_ctx, buffer_pool); + grpc_resource_quota_internal_unref(&exec_ctx, resource_quota); grpc_exec_ctx_finish(&exec_ctx); gpr_mu_lock(pr.mu); while (pr.port == -1) { diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index 17e6d248b5..a94ed4d8da 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -34,10 +34,10 @@ #include #include -#include #include #include #include +#include #include #include #include @@ -1481,19 +1481,20 @@ TEST_P(SecureEnd2endTest, ClientAuthContext) { } } -class BufferPoolEnd2endTest : public End2endTest { +class ResourceQuotaEnd2endTest : public End2endTest { public: - BufferPoolEnd2endTest() : server_buffer_pool_("server_buffer_pool") {} + ResourceQuotaEnd2endTest() + : server_resource_quota_("server_resource_quota") {} virtual void ConfigureServerBuilder(ServerBuilder* builder) GRPC_OVERRIDE { - builder->SetBufferPool(server_buffer_pool_); + builder->SetResourceQuota(server_resource_quota_); } private: - BufferPool server_buffer_pool_; + ResourceQuota server_resource_quota_; }; -TEST_P(BufferPoolEnd2endTest, SimpleRequest) { +TEST_P(ResourceQuotaEnd2endTest, SimpleRequest) { ResetStub(); EchoRequest request; @@ -1543,7 +1544,7 @@ INSTANTIATE_TEST_CASE_P(SecureEnd2end, SecureEnd2endTest, ::testing::ValuesIn(CreateTestScenarios(false, false, true))); -INSTANTIATE_TEST_CASE_P(BufferPoolEnd2end, BufferPoolEnd2endTest, +INSTANTIATE_TEST_CASE_P(ResourceQuotaEnd2end, ResourceQuotaEnd2endTest, ::testing::ValuesIn(CreateTestScenarios(false, true, true))); diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc index 3d2ac78868..b2529a1121 100644 --- a/test/cpp/qps/server_async.cc +++ b/test/cpp/qps/server_async.cc @@ -37,8 +37,8 @@ #include #include -#include #include +#include #include #include #include @@ -96,9 +96,9 @@ class AsyncQpsServerTest : public Server { srv_cqs_.emplace_back(builder.AddCompletionQueue()); } - if (config.buffer_pool_size() > 0) { - builder.SetBufferPool( - BufferPool("AsyncQpsServerTest").Resize(config.buffer_pool_size())); + if (config.resource_quota_size() > 0) { + builder.SetResourceQuota(ResourceQuota("AsyncQpsServerTest") + .Resize(config.resource_quota_size())); } server_ = builder.BuildAndStart(); diff --git a/test/cpp/qps/server_sync.cc b/test/cpp/qps/server_sync.cc index 97f709b714..96f50a35ac 100644 --- a/test/cpp/qps/server_sync.cc +++ b/test/cpp/qps/server_sync.cc @@ -33,7 +33,7 @@ #include -#include +#include #include #include #include @@ -94,9 +94,9 @@ class SynchronousServer GRPC_FINAL : public grpc::testing::Server { Server::CreateServerCredentials(config)); gpr_free(server_address); - if (config.buffer_pool_size() > 0) { - builder.SetBufferPool( - BufferPool("AsyncQpsServerTest").Resize(config.buffer_pool_size())); + if (config.resource_quota_size() > 0) { + builder.SetResourceQuota(ResourceQuota("AsyncQpsServerTest") + .Resize(config.resource_quota_size())); } builder.RegisterService(&service_); diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 6ad0db0fca..00f970a4cb 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -761,7 +761,6 @@ WARN_LOGFILE = # Note: If this tag is empty the current directory is searched. INPUT = include/grpc++/alarm.h \ -include/grpc++/buffer_pool.h \ include/grpc++/channel.h \ include/grpc++/client_context.h \ include/grpc++/completion_queue.h \ @@ -788,6 +787,7 @@ include/grpc++/impl/sync_no_cxx11.h \ include/grpc++/impl/thd.h \ include/grpc++/impl/thd_cxx11.h \ include/grpc++/impl/thd_no_cxx11.h \ +include/grpc++/resource_quota.h \ include/grpc++/security/auth_context.h \ include/grpc++/security/auth_metadata_processor.h \ include/grpc++/security/credentials.h \ diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index cb9868e68d..252bdb7ed1 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -761,7 +761,6 @@ WARN_LOGFILE = # Note: If this tag is empty the current directory is searched. INPUT = include/grpc++/alarm.h \ -include/grpc++/buffer_pool.h \ include/grpc++/channel.h \ include/grpc++/client_context.h \ include/grpc++/completion_queue.h \ @@ -788,6 +787,7 @@ include/grpc++/impl/sync_no_cxx11.h \ include/grpc++/impl/thd.h \ include/grpc++/impl/thd_cxx11.h \ include/grpc++/impl/thd_no_cxx11.h \ +include/grpc++/resource_quota.h \ include/grpc++/security/auth_context.h \ include/grpc++/security/auth_metadata_processor.h \ include/grpc++/security/credentials.h \ @@ -879,11 +879,11 @@ src/cpp/client/create_channel_internal.cc \ src/cpp/client/create_channel_posix.cc \ src/cpp/client/credentials_cc.cc \ src/cpp/client/generic_stub.cc \ -src/cpp/common/buffer_pool_cc.cc \ src/cpp/common/channel_arguments.cc \ src/cpp/common/channel_filter.cc \ src/cpp/common/completion_queue_cc.cc \ src/cpp/common/core_codegen.cc \ +src/cpp/common/resource_quota_cc.cc \ src/cpp/common/rpc_method.cc \ src/cpp/server/async_generic_service.cc \ src/cpp/server/create_default_thread_pool.cc \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 71a33e67c7..a8dc616186 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -803,7 +803,6 @@ src/core/lib/debug/trace.h \ src/core/lib/http/format_request.h \ src/core/lib/http/httpcli.h \ src/core/lib/http/parser.h \ -src/core/lib/iomgr/buffer_pool.h \ src/core/lib/iomgr/closure.h \ src/core/lib/iomgr/combiner.h \ src/core/lib/iomgr/endpoint.h \ @@ -827,6 +826,7 @@ src/core/lib/iomgr/pollset_set.h \ src/core/lib/iomgr/pollset_set_windows.h \ src/core/lib/iomgr/pollset_windows.h \ src/core/lib/iomgr/resolve_address.h \ +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.h \ @@ -969,7 +969,6 @@ src/core/lib/debug/trace.c \ src/core/lib/http/format_request.c \ src/core/lib/http/httpcli.c \ src/core/lib/http/parser.c \ -src/core/lib/iomgr/buffer_pool.c \ src/core/lib/iomgr/closure.c \ src/core/lib/iomgr/combiner.c \ src/core/lib/iomgr/endpoint.c \ @@ -993,6 +992,7 @@ src/core/lib/iomgr/pollset_set_windows.c \ src/core/lib/iomgr/pollset_windows.c \ src/core/lib/iomgr/resolve_address_posix.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_utils_common_posix.c \ src/core/lib/iomgr/socket_utils_linux.c \ diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py index 3d7c90066e..13bd629523 100644 --- a/tools/run_tests/performance/scenario_config.py +++ b/tools/run_tests/performance/scenario_config.py @@ -115,7 +115,7 @@ def _ping_pong_scenario(name, rpc_type, categories=DEFAULT_CATEGORIES, channels=None, outstanding=None, - buffer_pool_size=None): + resource_quota_size=None): """Creates a basic ping pong scenario.""" scenario = { 'name': name, @@ -142,8 +142,8 @@ def _ping_pong_scenario(name, rpc_type, 'warmup_seconds': warmup_seconds, 'benchmark_seconds': BENCHMARK_SECONDS } - if buffer_pool_size: - scenario['server_config']['buffer_pool_size'] = buffer_pool_size + if resource_quota_size: + scenario['server_config']['resource_quota_size'] = resource_quota_size if use_generic_payload: if server_type != 'ASYNC_GENERIC_SERVER': raise Exception('Use ASYNC_GENERIC_SERVER for generic payload.') @@ -242,14 +242,14 @@ class CXXLanguage: categories=smoketest_categories+[SCALABLE]) yield _ping_pong_scenario( - 'cpp_protobuf_%s_%s_qps_unconstrained_%s_500kib_buffer_pool' % (synchronicity, rpc_type, secstr), + 'cpp_protobuf_%s_%s_qps_unconstrained_%s_500kib_resource_quota' % (synchronicity, rpc_type, secstr), rpc_type=rpc_type.upper(), client_type='%s_CLIENT' % synchronicity.upper(), server_type='%s_SERVER' % synchronicity.upper(), unconstrained_client=synchronicity, secure=secure, categories=smoketest_categories+[SCALABLE], - buffer_pool_size=500*1024) + resource_quota_size=500*1024) for channels in geometric_progression(1, 20000, math.sqrt(10)): for outstanding in geometric_progression(1, 200000, math.sqrt(10)): diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index e84ee7eb5d..afdc49d67b 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -132,23 +132,6 @@ "third_party": false, "type": "target" }, - { - "deps": [ - "gpr", - "gpr_test_util", - "grpc", - "grpc_test_util" - ], - "headers": [], - "is_filegroup": false, - "language": "c", - "name": "buffer_pool_test", - "src": [ - "test/core/iomgr/buffer_pool_test.c" - ], - "third_party": false, - "type": "target" - }, { "deps": [ "gpr", @@ -1704,6 +1687,23 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "is_filegroup": false, + "language": "c", + "name": "resource_quota_test", + "src": [ + "test/core/iomgr/resource_quota_test.c" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "gpr", @@ -6028,7 +6028,6 @@ "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/bad_hostname.c", "test/core/end2end/tests/binary_metadata.c", - "test/core/end2end/tests/buffer_pool_server.c", "test/core/end2end/tests/call_creds.c", "test/core/end2end/tests/cancel_after_accept.c", "test/core/end2end/tests/cancel_after_client_done.c", @@ -6063,6 +6062,7 @@ "test/core/end2end/tests/registered_call.c", "test/core/end2end/tests/request_with_flags.c", "test/core/end2end/tests/request_with_payload.c", + "test/core/end2end/tests/resource_quota_server.c", "test/core/end2end/tests/server_finishes_request.c", "test/core/end2end/tests/shutdown_finishes_calls.c", "test/core/end2end/tests/shutdown_finishes_tags.c", @@ -6095,7 +6095,6 @@ "test/core/end2end/end2end_tests.h", "test/core/end2end/tests/bad_hostname.c", "test/core/end2end/tests/binary_metadata.c", - "test/core/end2end/tests/buffer_pool_server.c", "test/core/end2end/tests/cancel_after_accept.c", "test/core/end2end/tests/cancel_after_client_done.c", "test/core/end2end/tests/cancel_after_invoke.c", @@ -6129,6 +6128,7 @@ "test/core/end2end/tests/registered_call.c", "test/core/end2end/tests/request_with_flags.c", "test/core/end2end/tests/request_with_payload.c", + "test/core/end2end/tests/resource_quota_server.c", "test/core/end2end/tests/server_finishes_request.c", "test/core/end2end/tests/shutdown_finishes_calls.c", "test/core/end2end/tests/shutdown_finishes_tags.c", @@ -6403,7 +6403,6 @@ "src/core/lib/http/format_request.h", "src/core/lib/http/httpcli.h", "src/core/lib/http/parser.h", - "src/core/lib/iomgr/buffer_pool.h", "src/core/lib/iomgr/closure.h", "src/core/lib/iomgr/combiner.h", "src/core/lib/iomgr/endpoint.h", @@ -6427,6 +6426,7 @@ "src/core/lib/iomgr/pollset_set_windows.h", "src/core/lib/iomgr/pollset_windows.h", "src/core/lib/iomgr/resolve_address.h", + "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.h", @@ -6516,8 +6516,6 @@ "src/core/lib/http/httpcli.h", "src/core/lib/http/parser.c", "src/core/lib/http/parser.h", - "src/core/lib/iomgr/buffer_pool.c", - "src/core/lib/iomgr/buffer_pool.h", "src/core/lib/iomgr/closure.c", "src/core/lib/iomgr/closure.h", "src/core/lib/iomgr/combiner.c", @@ -6564,6 +6562,8 @@ "src/core/lib/iomgr/resolve_address.h", "src/core/lib/iomgr/resolve_address_posix.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", @@ -7242,7 +7242,6 @@ ], "headers": [ "include/grpc++/alarm.h", - "include/grpc++/buffer_pool.h", "include/grpc++/channel.h", "include/grpc++/client_context.h", "include/grpc++/completion_queue.h", @@ -7269,6 +7268,7 @@ "include/grpc++/impl/thd.h", "include/grpc++/impl/thd_cxx11.h", "include/grpc++/impl/thd_no_cxx11.h", + "include/grpc++/resource_quota.h", "include/grpc++/security/auth_context.h", "include/grpc++/security/auth_metadata_processor.h", "include/grpc++/security/credentials.h", @@ -7299,7 +7299,6 @@ "name": "grpc++_base", "src": [ "include/grpc++/alarm.h", - "include/grpc++/buffer_pool.h", "include/grpc++/channel.h", "include/grpc++/client_context.h", "include/grpc++/completion_queue.h", @@ -7326,6 +7325,7 @@ "include/grpc++/impl/thd.h", "include/grpc++/impl/thd_cxx11.h", "include/grpc++/impl/thd_no_cxx11.h", + "include/grpc++/resource_quota.h", "include/grpc++/security/auth_context.h", "include/grpc++/security/auth_metadata_processor.h", "include/grpc++/security/credentials.h", @@ -7354,12 +7354,12 @@ "src/cpp/client/create_channel_posix.cc", "src/cpp/client/credentials_cc.cc", "src/cpp/client/generic_stub.cc", - "src/cpp/common/buffer_pool_cc.cc", "src/cpp/common/channel_arguments.cc", "src/cpp/common/channel_filter.cc", "src/cpp/common/channel_filter.h", "src/cpp/common/completion_queue_cc.cc", "src/cpp/common/core_codegen.cc", + "src/cpp/common/resource_quota_cc.cc", "src/cpp/common/rpc_method.cc", "src/cpp/server/async_generic_service.cc", "src/cpp/server/create_default_thread_pool.cc", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index a8f4ca8269..ecca9fea63 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -148,27 +148,6 @@ "windows" ] }, - { - "args": [], - "ci_platforms": [ - "linux", - "mac", - "posix", - "windows" - ], - "cpu_cost": 30, - "exclude_configs": [], - "flaky": false, - "gtest": false, - "language": "c", - "name": "buffer_pool_test", - "platforms": [ - "linux", - "mac", - "posix", - "windows" - ] - }, { "args": [], "ci_platforms": [ @@ -1653,6 +1632,27 @@ "windows" ] }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 30, + "exclude_configs": [], + "flaky": false, + "gtest": false, + "language": "c", + "name": "resource_quota_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "args": [], "ci_platforms": [ @@ -4622,28 +4622,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_server" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_census_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "call_creds" @@ -5372,7 +5350,7 @@ }, { "args": [ - "server_finishes_request" + "resource_quota_server" ], "ci_platforms": [ "windows", @@ -5394,7 +5372,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -5416,7 +5394,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -5438,7 +5416,7 @@ }, { "args": [ - "simple_cacheable_request" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", @@ -5460,7 +5438,7 @@ }, { "args": [ - "simple_delayed_request" + "simple_cacheable_request" ], "ci_platforms": [ "windows", @@ -5482,7 +5460,7 @@ }, { "args": [ - "simple_metadata" + "simple_delayed_request" ], "ci_platforms": [ "windows", @@ -5504,7 +5482,7 @@ }, { "args": [ - "simple_request" + "simple_metadata" ], "ci_platforms": [ "windows", @@ -5526,7 +5504,7 @@ }, { "args": [ - "streaming_error_response" + "simple_request" ], "ci_platforms": [ "windows", @@ -5548,7 +5526,7 @@ }, { "args": [ - "trailing_metadata" + "streaming_error_response" ], "ci_platforms": [ "windows", @@ -5570,7 +5548,7 @@ }, { "args": [ - "bad_hostname" + "trailing_metadata" ], "ci_platforms": [ "windows", @@ -5582,7 +5560,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ "windows", "linux", @@ -5592,7 +5570,7 @@ }, { "args": [ - "binary_metadata" + "bad_hostname" ], "ci_platforms": [ "windows", @@ -5614,7 +5592,7 @@ }, { "args": [ - "buffer_pool_server" + "binary_metadata" ], "ci_platforms": [ "windows", @@ -6362,7 +6340,7 @@ }, { "args": [ - "server_finishes_request" + "resource_quota_server" ], "ci_platforms": [ "windows", @@ -6384,7 +6362,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -6406,7 +6384,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -6428,7 +6406,7 @@ }, { "args": [ - "simple_cacheable_request" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", @@ -6450,7 +6428,7 @@ }, { "args": [ - "simple_delayed_request" + "simple_cacheable_request" ], "ci_platforms": [ "windows", @@ -6472,7 +6450,7 @@ }, { "args": [ - "simple_metadata" + "simple_delayed_request" ], "ci_platforms": [ "windows", @@ -6494,7 +6472,7 @@ }, { "args": [ - "simple_request" + "simple_metadata" ], "ci_platforms": [ "windows", @@ -6516,7 +6494,7 @@ }, { "args": [ - "streaming_error_response" + "simple_request" ], "ci_platforms": [ "windows", @@ -6538,7 +6516,7 @@ }, { "args": [ - "trailing_metadata" + "streaming_error_response" ], "ci_platforms": [ "windows", @@ -6560,18 +6538,19 @@ }, { "args": [ - "bad_hostname" + "trailing_metadata" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_compress_test", "platforms": [ "windows", "linux", @@ -6581,7 +6560,7 @@ }, { "args": [ - "binary_metadata" + "bad_hostname" ], "ci_platforms": [ "windows", @@ -6602,7 +6581,7 @@ }, { "args": [ - "buffer_pool_server" + "binary_metadata" ], "ci_platforms": [ "windows", @@ -7316,7 +7295,7 @@ }, { "args": [ - "server_finishes_request" + "resource_quota_server" ], "ci_platforms": [ "windows", @@ -7337,7 +7316,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -7358,7 +7337,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -7379,7 +7358,7 @@ }, { "args": [ - "simple_cacheable_request" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", @@ -7400,7 +7379,7 @@ }, { "args": [ - "simple_delayed_request" + "simple_cacheable_request" ], "ci_platforms": [ "windows", @@ -7421,7 +7400,7 @@ }, { "args": [ - "simple_metadata" + "simple_delayed_request" ], "ci_platforms": [ "windows", @@ -7442,7 +7421,7 @@ }, { "args": [ - "simple_request" + "simple_metadata" ], "ci_platforms": [ "windows", @@ -7463,7 +7442,7 @@ }, { "args": [ - "streaming_error_response" + "simple_request" ], "ci_platforms": [ "windows", @@ -7484,7 +7463,7 @@ }, { "args": [ - "trailing_metadata" + "streaming_error_response" ], "ci_platforms": [ "windows", @@ -7505,19 +7484,20 @@ }, { "args": [ - "bad_hostname" + "trailing_metadata" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -7525,7 +7505,7 @@ }, { "args": [ - "binary_metadata" + "bad_hostname" ], "ci_platforms": [ "linux", @@ -7545,7 +7525,7 @@ }, { "args": [ - "buffer_pool_server" + "binary_metadata" ], "ci_platforms": [ "linux", @@ -8145,7 +8125,7 @@ }, { "args": [ - "server_finishes_request" + "resource_quota_server" ], "ci_platforms": [ "linux", @@ -8165,7 +8145,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "server_finishes_request" ], "ci_platforms": [ "linux", @@ -8185,7 +8165,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "shutdown_finishes_calls" ], "ci_platforms": [ "linux", @@ -8205,7 +8185,7 @@ }, { "args": [ - "simple_cacheable_request" + "shutdown_finishes_tags" ], "ci_platforms": [ "linux", @@ -8225,7 +8205,7 @@ }, { "args": [ - "simple_metadata" + "simple_cacheable_request" ], "ci_platforms": [ "linux", @@ -8245,7 +8225,7 @@ }, { "args": [ - "simple_request" + "simple_metadata" ], "ci_platforms": [ "linux", @@ -8265,7 +8245,7 @@ }, { "args": [ - "streaming_error_response" + "simple_request" ], "ci_platforms": [ "linux", @@ -8285,7 +8265,7 @@ }, { "args": [ - "trailing_metadata" + "streaming_error_response" ], "ci_platforms": [ "linux", @@ -8305,10 +8285,9 @@ }, { "args": [ - "bad_hostname" + "trailing_metadata" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -8317,9 +8296,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -8327,7 +8305,7 @@ }, { "args": [ - "binary_metadata" + "bad_hostname" ], "ci_platforms": [ "windows", @@ -8349,7 +8327,7 @@ }, { "args": [ - "buffer_pool_server" + "binary_metadata" ], "ci_platforms": [ "windows", @@ -9097,7 +9075,7 @@ }, { "args": [ - "server_finishes_request" + "resource_quota_server" ], "ci_platforms": [ "windows", @@ -9119,7 +9097,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -9141,7 +9119,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -9163,7 +9141,7 @@ }, { "args": [ - "simple_cacheable_request" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", @@ -9185,7 +9163,7 @@ }, { "args": [ - "simple_delayed_request" + "simple_cacheable_request" ], "ci_platforms": [ "windows", @@ -9207,7 +9185,7 @@ }, { "args": [ - "simple_metadata" + "simple_delayed_request" ], "ci_platforms": [ "windows", @@ -9229,7 +9207,7 @@ }, { "args": [ - "simple_request" + "simple_metadata" ], "ci_platforms": [ "windows", @@ -9251,7 +9229,7 @@ }, { "args": [ - "streaming_error_response" + "simple_request" ], "ci_platforms": [ "windows", @@ -9273,7 +9251,7 @@ }, { "args": [ - "trailing_metadata" + "streaming_error_response" ], "ci_platforms": [ "windows", @@ -9295,23 +9273,29 @@ }, { "args": [ - "bad_hostname" + "trailing_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "binary_metadata" + "bad_hostname" ], "ci_platforms": [ "linux" @@ -9327,7 +9311,7 @@ }, { "args": [ - "buffer_pool_server" + "binary_metadata" ], "ci_platforms": [ "linux" @@ -9871,7 +9855,7 @@ }, { "args": [ - "server_finishes_request" + "resource_quota_server" ], "ci_platforms": [ "linux" @@ -9887,7 +9871,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "server_finishes_request" ], "ci_platforms": [ "linux" @@ -9903,7 +9887,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "shutdown_finishes_calls" ], "ci_platforms": [ "linux" @@ -9919,7 +9903,7 @@ }, { "args": [ - "simple_cacheable_request" + "shutdown_finishes_tags" ], "ci_platforms": [ "linux" @@ -9935,7 +9919,7 @@ }, { "args": [ - "simple_delayed_request" + "simple_cacheable_request" ], "ci_platforms": [ "linux" @@ -9951,7 +9935,7 @@ }, { "args": [ - "simple_metadata" + "simple_delayed_request" ], "ci_platforms": [ "linux" @@ -9967,7 +9951,7 @@ }, { "args": [ - "simple_request" + "simple_metadata" ], "ci_platforms": [ "linux" @@ -9983,7 +9967,7 @@ }, { "args": [ - "streaming_error_response" + "simple_request" ], "ci_platforms": [ "linux" @@ -9999,7 +9983,7 @@ }, { "args": [ - "trailing_metadata" + "streaming_error_response" ], "ci_platforms": [ "linux" @@ -10015,29 +9999,23 @@ }, { "args": [ - "bad_hostname" + "trailing_metadata" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "binary_metadata" + "bad_hostname" ], "ci_platforms": [ "windows", @@ -10059,7 +10037,7 @@ }, { "args": [ - "buffer_pool_server" + "binary_metadata" ], "ci_platforms": [ "windows", @@ -10763,7 +10741,7 @@ }, { "args": [ - "server_finishes_request" + "resource_quota_server" ], "ci_platforms": [ "windows", @@ -10785,7 +10763,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -10807,7 +10785,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -10829,7 +10807,7 @@ }, { "args": [ - "simple_cacheable_request" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", @@ -10851,7 +10829,7 @@ }, { "args": [ - "simple_delayed_request" + "simple_cacheable_request" ], "ci_platforms": [ "windows", @@ -10873,7 +10851,7 @@ }, { "args": [ - "simple_metadata" + "simple_delayed_request" ], "ci_platforms": [ "windows", @@ -10895,7 +10873,7 @@ }, { "args": [ - "simple_request" + "simple_metadata" ], "ci_platforms": [ "windows", @@ -10917,7 +10895,7 @@ }, { "args": [ - "streaming_error_response" + "simple_request" ], "ci_platforms": [ "windows", @@ -10939,7 +10917,7 @@ }, { "args": [ - "trailing_metadata" + "streaming_error_response" ], "ci_platforms": [ "windows", @@ -10961,18 +10939,19 @@ }, { "args": [ - "bad_hostname" + "trailing_metadata" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_test", + "name": "h2_full+trace_test", "platforms": [ "windows", "linux", @@ -10982,7 +10961,7 @@ }, { "args": [ - "binary_metadata" + "bad_hostname" ], "ci_platforms": [ "windows", @@ -11003,7 +10982,7 @@ }, { "args": [ - "buffer_pool_server" + "binary_metadata" ], "ci_platforms": [ "windows", @@ -11717,7 +11696,7 @@ }, { "args": [ - "server_finishes_request" + "resource_quota_server" ], "ci_platforms": [ "windows", @@ -11738,7 +11717,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -11759,7 +11738,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -11780,7 +11759,7 @@ }, { "args": [ - "simple_cacheable_request" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", @@ -11801,7 +11780,7 @@ }, { "args": [ - "simple_delayed_request" + "simple_cacheable_request" ], "ci_platforms": [ "windows", @@ -11822,7 +11801,7 @@ }, { "args": [ - "simple_metadata" + "simple_delayed_request" ], "ci_platforms": [ "windows", @@ -11843,7 +11822,7 @@ }, { "args": [ - "simple_request" + "simple_metadata" ], "ci_platforms": [ "windows", @@ -11864,7 +11843,7 @@ }, { "args": [ - "streaming_error_response" + "simple_request" ], "ci_platforms": [ "windows", @@ -11885,7 +11864,7 @@ }, { "args": [ - "trailing_metadata" + "streaming_error_response" ], "ci_platforms": [ "windows", @@ -11906,19 +11885,18 @@ }, { "args": [ - "bad_hostname" + "trailing_metadata" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_test", + "name": "h2_http_proxy_test", "platforms": [ "windows", "linux", @@ -11928,7 +11906,7 @@ }, { "args": [ - "binary_metadata" + "bad_hostname" ], "ci_platforms": [ "windows", @@ -11950,7 +11928,7 @@ }, { "args": [ - "buffer_pool_server" + "binary_metadata" ], "ci_platforms": [ "windows", @@ -12698,7 +12676,7 @@ }, { "args": [ - "server_finishes_request" + "resource_quota_server" ], "ci_platforms": [ "windows", @@ -12720,7 +12698,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -12742,7 +12720,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -12764,7 +12742,7 @@ }, { "args": [ - "simple_cacheable_request" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", @@ -12786,7 +12764,7 @@ }, { "args": [ - "simple_delayed_request" + "simple_cacheable_request" ], "ci_platforms": [ "windows", @@ -12808,7 +12786,7 @@ }, { "args": [ - "simple_metadata" + "simple_delayed_request" ], "ci_platforms": [ "windows", @@ -12830,7 +12808,7 @@ }, { "args": [ - "simple_request" + "simple_metadata" ], "ci_platforms": [ "windows", @@ -12852,7 +12830,7 @@ }, { "args": [ - "streaming_error_response" + "simple_request" ], "ci_platforms": [ "windows", @@ -12874,7 +12852,7 @@ }, { "args": [ - "trailing_metadata" + "streaming_error_response" ], "ci_platforms": [ "windows", @@ -12896,18 +12874,19 @@ }, { "args": [ - "bad_hostname" + "trailing_metadata" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_load_reporting_test", "platforms": [ "windows", "linux", @@ -12917,7 +12896,7 @@ }, { "args": [ - "binary_metadata" + "bad_hostname" ], "ci_platforms": [ "windows", @@ -12938,7 +12917,7 @@ }, { "args": [ - "buffer_pool_server" + "binary_metadata" ], "ci_platforms": [ "windows", @@ -13650,6 +13629,27 @@ "posix" ] }, + { + "args": [ + "resource_quota_server" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "server_finishes_request" @@ -14679,27 +14679,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_server" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "call_creds" @@ -15309,6 +15288,27 @@ "posix" ] }, + { + "args": [ + "resource_quota_server" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "server_finishes_request" @@ -17117,28 +17117,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_server" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "call_creds" @@ -17867,7 +17845,7 @@ }, { "args": [ - "server_finishes_request" + "resource_quota_server" ], "ci_platforms": [ "windows", @@ -17889,7 +17867,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -17911,7 +17889,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -17933,7 +17911,7 @@ }, { "args": [ - "simple_cacheable_request" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", @@ -17955,7 +17933,7 @@ }, { "args": [ - "simple_delayed_request" + "simple_cacheable_request" ], "ci_platforms": [ "windows", @@ -17977,7 +17955,7 @@ }, { "args": [ - "simple_metadata" + "simple_delayed_request" ], "ci_platforms": [ "windows", @@ -17999,7 +17977,7 @@ }, { "args": [ - "simple_request" + "simple_metadata" ], "ci_platforms": [ "windows", @@ -18021,7 +17999,7 @@ }, { "args": [ - "streaming_error_response" + "simple_request" ], "ci_platforms": [ "windows", @@ -18043,7 +18021,7 @@ }, { "args": [ - "trailing_metadata" + "streaming_error_response" ], "ci_platforms": [ "windows", @@ -18065,7 +18043,7 @@ }, { "args": [ - "bad_hostname" + "trailing_metadata" ], "ci_platforms": [ "windows", @@ -18077,7 +18055,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -18087,7 +18065,7 @@ }, { "args": [ - "binary_metadata" + "bad_hostname" ], "ci_platforms": [ "windows", @@ -18109,7 +18087,7 @@ }, { "args": [ - "buffer_pool_server" + "binary_metadata" ], "ci_platforms": [ "windows", @@ -18855,6 +18833,28 @@ "posix" ] }, + { + "args": [ + "resource_quota_server" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "server_finishes_request" @@ -19891,26 +19891,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_server" - ], - "ci_platforms": [ - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_uds_test", - "platforms": [ - "linux", - "mac", - "posix" - ] - }, { "args": [ "call_creds" @@ -20553,7 +20533,7 @@ }, { "args": [ - "server_finishes_request" + "resource_quota_server" ], "ci_platforms": [ "linux", @@ -20573,7 +20553,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "server_finishes_request" ], "ci_platforms": [ "linux", @@ -20593,7 +20573,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "shutdown_finishes_calls" ], "ci_platforms": [ "linux", @@ -20613,7 +20593,7 @@ }, { "args": [ - "simple_cacheable_request" + "shutdown_finishes_tags" ], "ci_platforms": [ "linux", @@ -20633,7 +20613,7 @@ }, { "args": [ - "simple_delayed_request" + "simple_cacheable_request" ], "ci_platforms": [ "linux", @@ -20653,7 +20633,7 @@ }, { "args": [ - "simple_metadata" + "simple_delayed_request" ], "ci_platforms": [ "linux", @@ -20673,7 +20653,7 @@ }, { "args": [ - "simple_request" + "simple_metadata" ], "ci_platforms": [ "linux", @@ -20693,7 +20673,7 @@ }, { "args": [ - "streaming_error_response" + "simple_request" ], "ci_platforms": [ "linux", @@ -20713,7 +20693,7 @@ }, { "args": [ - "trailing_metadata" + "streaming_error_response" ], "ci_platforms": [ "linux", @@ -20733,10 +20713,9 @@ }, { "args": [ - "bad_hostname" + "trailing_metadata" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -20745,9 +20724,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -20755,7 +20733,7 @@ }, { "args": [ - "binary_metadata" + "bad_hostname" ], "ci_platforms": [ "windows", @@ -20777,7 +20755,7 @@ }, { "args": [ - "buffer_pool_server" + "binary_metadata" ], "ci_platforms": [ "windows", @@ -21503,7 +21481,7 @@ }, { "args": [ - "server_finishes_request" + "resource_quota_server" ], "ci_platforms": [ "windows", @@ -21525,7 +21503,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -21547,7 +21525,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -21569,7 +21547,7 @@ }, { "args": [ - "simple_cacheable_request" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", @@ -21591,7 +21569,7 @@ }, { "args": [ - "simple_delayed_request" + "simple_cacheable_request" ], "ci_platforms": [ "windows", @@ -21613,7 +21591,7 @@ }, { "args": [ - "simple_metadata" + "simple_delayed_request" ], "ci_platforms": [ "windows", @@ -21635,7 +21613,7 @@ }, { "args": [ - "simple_request" + "simple_metadata" ], "ci_platforms": [ "windows", @@ -21657,7 +21635,7 @@ }, { "args": [ - "streaming_error_response" + "simple_request" ], "ci_platforms": [ "windows", @@ -21679,7 +21657,7 @@ }, { "args": [ - "trailing_metadata" + "streaming_error_response" ], "ci_platforms": [ "windows", @@ -21701,7 +21679,7 @@ }, { "args": [ - "bad_hostname" + "trailing_metadata" ], "ci_platforms": [ "windows", @@ -21713,7 +21691,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -21723,7 +21701,7 @@ }, { "args": [ - "binary_metadata" + "bad_hostname" ], "ci_platforms": [ "windows", @@ -21745,7 +21723,7 @@ }, { "args": [ - "buffer_pool_server" + "binary_metadata" ], "ci_platforms": [ "windows", @@ -22471,7 +22449,7 @@ }, { "args": [ - "server_finishes_request" + "resource_quota_server" ], "ci_platforms": [ "windows", @@ -22493,7 +22471,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -22515,7 +22493,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -22537,7 +22515,7 @@ }, { "args": [ - "simple_cacheable_request" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", @@ -22559,7 +22537,7 @@ }, { "args": [ - "simple_delayed_request" + "simple_cacheable_request" ], "ci_platforms": [ "windows", @@ -22581,7 +22559,7 @@ }, { "args": [ - "simple_metadata" + "simple_delayed_request" ], "ci_platforms": [ "windows", @@ -22603,7 +22581,7 @@ }, { "args": [ - "simple_request" + "simple_metadata" ], "ci_platforms": [ "windows", @@ -22625,7 +22603,7 @@ }, { "args": [ - "streaming_error_response" + "simple_request" ], "ci_platforms": [ "windows", @@ -22647,7 +22625,7 @@ }, { "args": [ - "trailing_metadata" + "streaming_error_response" ], "ci_platforms": [ "windows", @@ -22669,9 +22647,10 @@ }, { "args": [ - "bad_hostname" + "trailing_metadata" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -22680,8 +22659,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fd_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -22689,7 +22669,7 @@ }, { "args": [ - "binary_metadata" + "bad_hostname" ], "ci_platforms": [ "linux", @@ -22709,7 +22689,7 @@ }, { "args": [ - "buffer_pool_server" + "binary_metadata" ], "ci_platforms": [ "linux", @@ -23289,7 +23269,7 @@ }, { "args": [ - "server_finishes_request" + "resource_quota_server" ], "ci_platforms": [ "linux", @@ -23309,7 +23289,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "server_finishes_request" ], "ci_platforms": [ "linux", @@ -23329,7 +23309,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "shutdown_finishes_calls" ], "ci_platforms": [ "linux", @@ -23349,7 +23329,7 @@ }, { "args": [ - "simple_cacheable_request" + "shutdown_finishes_tags" ], "ci_platforms": [ "linux", @@ -23369,7 +23349,7 @@ }, { "args": [ - "simple_metadata" + "simple_cacheable_request" ], "ci_platforms": [ "linux", @@ -23389,7 +23369,7 @@ }, { "args": [ - "simple_request" + "simple_metadata" ], "ci_platforms": [ "linux", @@ -23409,7 +23389,7 @@ }, { "args": [ - "streaming_error_response" + "simple_request" ], "ci_platforms": [ "linux", @@ -23429,7 +23409,7 @@ }, { "args": [ - "trailing_metadata" + "streaming_error_response" ], "ci_platforms": [ "linux", @@ -23449,10 +23429,9 @@ }, { "args": [ - "bad_hostname" + "trailing_metadata" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -23461,9 +23440,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -23471,7 +23449,7 @@ }, { "args": [ - "binary_metadata" + "bad_hostname" ], "ci_platforms": [ "windows", @@ -23493,7 +23471,7 @@ }, { "args": [ - "buffer_pool_server" + "binary_metadata" ], "ci_platforms": [ "windows", @@ -24219,7 +24197,7 @@ }, { "args": [ - "server_finishes_request" + "resource_quota_server" ], "ci_platforms": [ "windows", @@ -24241,7 +24219,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -24263,7 +24241,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -24285,7 +24263,7 @@ }, { "args": [ - "simple_cacheable_request" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", @@ -24307,7 +24285,7 @@ }, { "args": [ - "simple_delayed_request" + "simple_cacheable_request" ], "ci_platforms": [ "windows", @@ -24329,7 +24307,7 @@ }, { "args": [ - "simple_metadata" + "simple_delayed_request" ], "ci_platforms": [ "windows", @@ -24351,7 +24329,7 @@ }, { "args": [ - "simple_request" + "simple_metadata" ], "ci_platforms": [ "windows", @@ -24373,7 +24351,7 @@ }, { "args": [ - "streaming_error_response" + "simple_request" ], "ci_platforms": [ "windows", @@ -24395,7 +24373,7 @@ }, { "args": [ - "trailing_metadata" + "streaming_error_response" ], "ci_platforms": [ "windows", @@ -24417,23 +24395,29 @@ }, { "args": [ - "bad_hostname" + "trailing_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "binary_metadata" + "bad_hostname" ], "ci_platforms": [ "linux" @@ -24449,7 +24433,7 @@ }, { "args": [ - "buffer_pool_server" + "binary_metadata" ], "ci_platforms": [ "linux" @@ -24977,7 +24961,7 @@ }, { "args": [ - "server_finishes_request" + "resource_quota_server" ], "ci_platforms": [ "linux" @@ -24993,7 +24977,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "server_finishes_request" ], "ci_platforms": [ "linux" @@ -25009,7 +24993,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "shutdown_finishes_calls" ], "ci_platforms": [ "linux" @@ -25025,7 +25009,7 @@ }, { "args": [ - "simple_cacheable_request" + "shutdown_finishes_tags" ], "ci_platforms": [ "linux" @@ -25041,7 +25025,7 @@ }, { "args": [ - "simple_delayed_request" + "simple_cacheable_request" ], "ci_platforms": [ "linux" @@ -25057,7 +25041,7 @@ }, { "args": [ - "simple_metadata" + "simple_delayed_request" ], "ci_platforms": [ "linux" @@ -25073,7 +25057,7 @@ }, { "args": [ - "simple_request" + "simple_metadata" ], "ci_platforms": [ "linux" @@ -25089,7 +25073,7 @@ }, { "args": [ - "streaming_error_response" + "simple_request" ], "ci_platforms": [ "linux" @@ -25105,7 +25089,7 @@ }, { "args": [ - "trailing_metadata" + "streaming_error_response" ], "ci_platforms": [ "linux" @@ -25121,29 +25105,23 @@ }, { "args": [ - "bad_hostname" + "trailing_metadata" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_full+pipe_nosec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "binary_metadata" + "bad_hostname" ], "ci_platforms": [ "windows", @@ -25165,7 +25143,7 @@ }, { "args": [ - "buffer_pool_server" + "binary_metadata" ], "ci_platforms": [ "windows", @@ -25847,7 +25825,7 @@ }, { "args": [ - "server_finishes_request" + "resource_quota_server" ], "ci_platforms": [ "windows", @@ -25869,7 +25847,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -25891,7 +25869,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -25913,7 +25891,7 @@ }, { "args": [ - "simple_cacheable_request" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", @@ -25935,7 +25913,7 @@ }, { "args": [ - "simple_delayed_request" + "simple_cacheable_request" ], "ci_platforms": [ "windows", @@ -25957,7 +25935,7 @@ }, { "args": [ - "simple_metadata" + "simple_delayed_request" ], "ci_platforms": [ "windows", @@ -25979,7 +25957,7 @@ }, { "args": [ - "simple_request" + "simple_metadata" ], "ci_platforms": [ "windows", @@ -26001,7 +25979,7 @@ }, { "args": [ - "streaming_error_response" + "simple_request" ], "ci_platforms": [ "windows", @@ -26023,7 +26001,7 @@ }, { "args": [ - "trailing_metadata" + "streaming_error_response" ], "ci_platforms": [ "windows", @@ -26045,18 +26023,19 @@ }, { "args": [ - "bad_hostname" + "trailing_metadata" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_http_proxy_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ "windows", "linux", @@ -26066,7 +26045,7 @@ }, { "args": [ - "binary_metadata" + "bad_hostname" ], "ci_platforms": [ "windows", @@ -26087,7 +26066,7 @@ }, { "args": [ - "buffer_pool_server" + "binary_metadata" ], "ci_platforms": [ "windows", @@ -26780,7 +26759,7 @@ }, { "args": [ - "server_finishes_request" + "resource_quota_server" ], "ci_platforms": [ "windows", @@ -26801,7 +26780,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -26822,7 +26801,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -26843,7 +26822,7 @@ }, { "args": [ - "simple_cacheable_request" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", @@ -26864,7 +26843,7 @@ }, { "args": [ - "simple_delayed_request" + "simple_cacheable_request" ], "ci_platforms": [ "windows", @@ -26885,7 +26864,7 @@ }, { "args": [ - "simple_metadata" + "simple_delayed_request" ], "ci_platforms": [ "windows", @@ -26906,7 +26885,7 @@ }, { "args": [ - "simple_request" + "simple_metadata" ], "ci_platforms": [ "windows", @@ -26927,7 +26906,7 @@ }, { "args": [ - "streaming_error_response" + "simple_request" ], "ci_platforms": [ "windows", @@ -26948,7 +26927,7 @@ }, { "args": [ - "trailing_metadata" + "streaming_error_response" ], "ci_platforms": [ "windows", @@ -26969,19 +26948,18 @@ }, { "args": [ - "bad_hostname" + "trailing_metadata" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_load_reporting_nosec_test", + "name": "h2_http_proxy_nosec_test", "platforms": [ "windows", "linux", @@ -26991,7 +26969,7 @@ }, { "args": [ - "binary_metadata" + "bad_hostname" ], "ci_platforms": [ "windows", @@ -27013,7 +26991,7 @@ }, { "args": [ - "buffer_pool_server" + "binary_metadata" ], "ci_platforms": [ "windows", @@ -27737,6 +27715,28 @@ "posix" ] }, + { + "args": [ + "resource_quota_server" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_load_reporting_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "server_finishes_request" @@ -28754,27 +28754,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_server" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, { "args": [ "cancel_after_accept" @@ -29363,6 +29342,27 @@ "posix" ] }, + { + "args": [ + "resource_quota_server" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "server_finishes_request" @@ -31201,26 +31201,6 @@ "posix" ] }, - { - "args": [ - "buffer_pool_server" - ], - "ci_platforms": [ - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_uds_nosec_test", - "platforms": [ - "linux", - "mac", - "posix" - ] - }, { "args": [ "cancel_after_accept" @@ -31841,6 +31821,26 @@ "posix" ] }, + { + "args": [ + "resource_quota_server" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "args": [ "server_finishes_request" @@ -32129,7 +32129,7 @@ { "args": [ "--scenarios_json", - "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_unary_qps_unconstrained_secure_500kib_buffer_pool\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"buffer_pool_size\": 512000, \"server_type\": \"SYNC_SERVER\"}, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 16, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}" + "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_unary_qps_unconstrained_secure_500kib_resource_quota\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"resource_quota_size\": 512000, \"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"SYNC_SERVER\"}, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 16, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}" ], "boringssl": true, "ci_platforms": [ @@ -32144,7 +32144,7 @@ "platforms": [ "linux" ], - "shortname": "json_run_localhost:cpp_protobuf_sync_unary_qps_unconstrained_secure_500kib_buffer_pool", + "shortname": "json_run_localhost:cpp_protobuf_sync_unary_qps_unconstrained_secure_500kib_resource_quota", "timeout_seconds": 180 }, { @@ -32192,7 +32192,7 @@ { "args": [ "--scenarios_json", - "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_secure_500kib_buffer_pool\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"buffer_pool_size\": 512000, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}" + "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_secure_500kib_resource_quota\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"resource_quota_size\": 512000, \"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}" ], "boringssl": true, "ci_platforms": [ @@ -32207,7 +32207,7 @@ "platforms": [ "linux" ], - "shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_secure_500kib_buffer_pool", + "shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_secure_500kib_resource_quota", "timeout_seconds": 180 }, { @@ -32255,7 +32255,7 @@ { "args": [ "--scenarios_json", - "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_streaming_qps_unconstrained_secure_500kib_buffer_pool\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"buffer_pool_size\": 512000, \"server_type\": \"SYNC_SERVER\"}, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 16, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}" + "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_streaming_qps_unconstrained_secure_500kib_resource_quota\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"resource_quota_size\": 512000, \"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"SYNC_SERVER\"}, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 16, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}" ], "boringssl": true, "ci_platforms": [ @@ -32270,7 +32270,7 @@ "platforms": [ "linux" ], - "shortname": "json_run_localhost:cpp_protobuf_sync_streaming_qps_unconstrained_secure_500kib_buffer_pool", + "shortname": "json_run_localhost:cpp_protobuf_sync_streaming_qps_unconstrained_secure_500kib_resource_quota", "timeout_seconds": 180 }, { @@ -32318,7 +32318,7 @@ { "args": [ "--scenarios_json", - "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_secure_500kib_buffer_pool\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"buffer_pool_size\": 512000, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}" + "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_secure_500kib_resource_quota\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"resource_quota_size\": 512000, \"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}" ], "boringssl": true, "ci_platforms": [ @@ -32333,7 +32333,7 @@ "platforms": [ "linux" ], - "shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_secure_500kib_buffer_pool", + "shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_secure_500kib_resource_quota", "timeout_seconds": 180 }, { @@ -32444,7 +32444,7 @@ { "args": [ "--scenarios_json", - "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_unary_qps_unconstrained_insecure_500kib_buffer_pool\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"buffer_pool_size\": 512000, \"server_type\": \"SYNC_SERVER\"}, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 16, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}" + "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_unary_qps_unconstrained_insecure_500kib_resource_quota\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"resource_quota_size\": 512000, \"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"server_type\": \"SYNC_SERVER\"}, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 16, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}" ], "boringssl": true, "ci_platforms": [ @@ -32459,7 +32459,7 @@ "platforms": [ "linux" ], - "shortname": "json_run_localhost:cpp_protobuf_sync_unary_qps_unconstrained_insecure_500kib_buffer_pool", + "shortname": "json_run_localhost:cpp_protobuf_sync_unary_qps_unconstrained_insecure_500kib_resource_quota", "timeout_seconds": 180 }, { @@ -32507,7 +32507,7 @@ { "args": [ "--scenarios_json", - "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_insecure_500kib_buffer_pool\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"buffer_pool_size\": 512000, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}" + "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_insecure_500kib_resource_quota\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"resource_quota_size\": 512000, \"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}" ], "boringssl": true, "ci_platforms": [ @@ -32522,7 +32522,7 @@ "platforms": [ "linux" ], - "shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_insecure_500kib_buffer_pool", + "shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_insecure_500kib_resource_quota", "timeout_seconds": 180 }, { @@ -32570,7 +32570,7 @@ { "args": [ "--scenarios_json", - "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_streaming_qps_unconstrained_insecure_500kib_buffer_pool\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"buffer_pool_size\": 512000, \"server_type\": \"SYNC_SERVER\"}, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 16, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}" + "{\"scenarios\": [{\"name\": \"cpp_protobuf_sync_streaming_qps_unconstrained_insecure_500kib_resource_quota\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"resource_quota_size\": 512000, \"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"server_type\": \"SYNC_SERVER\"}, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 16, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}" ], "boringssl": true, "ci_platforms": [ @@ -32585,7 +32585,7 @@ "platforms": [ "linux" ], - "shortname": "json_run_localhost:cpp_protobuf_sync_streaming_qps_unconstrained_insecure_500kib_buffer_pool", + "shortname": "json_run_localhost:cpp_protobuf_sync_streaming_qps_unconstrained_insecure_500kib_resource_quota", "timeout_seconds": 180 }, { @@ -32633,7 +32633,7 @@ { "args": [ "--scenarios_json", - "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_insecure_500kib_buffer_pool\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"buffer_pool_size\": 512000, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}" + "{\"scenarios\": [{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_insecure_500kib_resource_quota\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"resource_quota_size\": 512000, \"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}" ], "boringssl": true, "ci_platforms": [ @@ -32648,7 +32648,7 @@ "platforms": [ "linux" ], - "shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_insecure_500kib_buffer_pool", + "shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_insecure_500kib_resource_quota", "timeout_seconds": 180 }, { diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index 34c3d7a1f2..c84f149657 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -98,17 +98,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bin_encoder_test", "vcxproj {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "buffer_pool_test", "vcxproj\test\buffer_pool_test\buffer_pool_test.vcxproj", "{46480473-88FC-8C53-3509-FC7F4DC3A8CD}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "census_context_test", "vcxproj\test\census_context_test\census_context_test.vcxproj", "{5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}" ProjectSection(myProperties) = preProject lib = "False" @@ -1304,6 +1293,17 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "resolve_address_test", "vcx {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "resource_quota_test", "vcxproj\test\resource_quota_test\resource_quota_test.vcxproj", "{6084F546-5D66-5CB5-63CF-DC960F14B545}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "secure_channel_create_test", "vcxproj\test\secure_channel_create_test\secure_channel_create_test.vcxproj", "{62B25398-7173-928E-689E-53860B0ACFC4}" ProjectSection(myProperties) = preProject lib = "False" @@ -1685,22 +1685,6 @@ Global {D5C70922-D68E-0E9D-9988-995E0F9A79AE}.Release-DLL|Win32.Build.0 = Release|Win32 {D5C70922-D68E-0E9D-9988-995E0F9A79AE}.Release-DLL|x64.ActiveCfg = Release|x64 {D5C70922-D68E-0E9D-9988-995E0F9A79AE}.Release-DLL|x64.Build.0 = Release|x64 - {46480473-88FC-8C53-3509-FC7F4DC3A8CD}.Debug|Win32.ActiveCfg = Debug|Win32 - {46480473-88FC-8C53-3509-FC7F4DC3A8CD}.Debug|x64.ActiveCfg = Debug|x64 - {46480473-88FC-8C53-3509-FC7F4DC3A8CD}.Release|Win32.ActiveCfg = Release|Win32 - {46480473-88FC-8C53-3509-FC7F4DC3A8CD}.Release|x64.ActiveCfg = Release|x64 - {46480473-88FC-8C53-3509-FC7F4DC3A8CD}.Debug|Win32.Build.0 = Debug|Win32 - {46480473-88FC-8C53-3509-FC7F4DC3A8CD}.Debug|x64.Build.0 = Debug|x64 - {46480473-88FC-8C53-3509-FC7F4DC3A8CD}.Release|Win32.Build.0 = Release|Win32 - {46480473-88FC-8C53-3509-FC7F4DC3A8CD}.Release|x64.Build.0 = Release|x64 - {46480473-88FC-8C53-3509-FC7F4DC3A8CD}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {46480473-88FC-8C53-3509-FC7F4DC3A8CD}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {46480473-88FC-8C53-3509-FC7F4DC3A8CD}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {46480473-88FC-8C53-3509-FC7F4DC3A8CD}.Debug-DLL|x64.Build.0 = Debug|x64 - {46480473-88FC-8C53-3509-FC7F4DC3A8CD}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {46480473-88FC-8C53-3509-FC7F4DC3A8CD}.Release-DLL|Win32.Build.0 = Release|Win32 - {46480473-88FC-8C53-3509-FC7F4DC3A8CD}.Release-DLL|x64.ActiveCfg = Release|x64 - {46480473-88FC-8C53-3509-FC7F4DC3A8CD}.Release-DLL|x64.Build.0 = Release|x64 {5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}.Debug|Win32.ActiveCfg = Debug|Win32 {5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}.Debug|x64.ActiveCfg = Debug|x64 {5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}.Release|Win32.ActiveCfg = Release|Win32 @@ -3509,6 +3493,22 @@ Global {8279AF6C-9584-67F3-1547-B204864FCCA7}.Release-DLL|Win32.Build.0 = Release|Win32 {8279AF6C-9584-67F3-1547-B204864FCCA7}.Release-DLL|x64.ActiveCfg = Release|x64 {8279AF6C-9584-67F3-1547-B204864FCCA7}.Release-DLL|x64.Build.0 = Release|x64 + {6084F546-5D66-5CB5-63CF-DC960F14B545}.Debug|Win32.ActiveCfg = Debug|Win32 + {6084F546-5D66-5CB5-63CF-DC960F14B545}.Debug|x64.ActiveCfg = Debug|x64 + {6084F546-5D66-5CB5-63CF-DC960F14B545}.Release|Win32.ActiveCfg = Release|Win32 + {6084F546-5D66-5CB5-63CF-DC960F14B545}.Release|x64.ActiveCfg = Release|x64 + {6084F546-5D66-5CB5-63CF-DC960F14B545}.Debug|Win32.Build.0 = Debug|Win32 + {6084F546-5D66-5CB5-63CF-DC960F14B545}.Debug|x64.Build.0 = Debug|x64 + {6084F546-5D66-5CB5-63CF-DC960F14B545}.Release|Win32.Build.0 = Release|Win32 + {6084F546-5D66-5CB5-63CF-DC960F14B545}.Release|x64.Build.0 = Release|x64 + {6084F546-5D66-5CB5-63CF-DC960F14B545}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {6084F546-5D66-5CB5-63CF-DC960F14B545}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {6084F546-5D66-5CB5-63CF-DC960F14B545}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {6084F546-5D66-5CB5-63CF-DC960F14B545}.Debug-DLL|x64.Build.0 = Debug|x64 + {6084F546-5D66-5CB5-63CF-DC960F14B545}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {6084F546-5D66-5CB5-63CF-DC960F14B545}.Release-DLL|Win32.Build.0 = Release|Win32 + {6084F546-5D66-5CB5-63CF-DC960F14B545}.Release-DLL|x64.ActiveCfg = Release|x64 + {6084F546-5D66-5CB5-63CF-DC960F14B545}.Release-DLL|x64.Build.0 = Release|x64 {62B25398-7173-928E-689E-53860B0ACFC4}.Debug|Win32.ActiveCfg = Debug|Win32 {62B25398-7173-928E-689E-53860B0ACFC4}.Debug|x64.ActiveCfg = Debug|x64 {62B25398-7173-928E-689E-53860B0ACFC4}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index 6c2d33bf63..43c5281a02 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -259,7 +259,6 @@ - @@ -286,6 +285,7 @@ + @@ -396,8 +396,6 @@ - - @@ -406,6 +404,8 @@ + + diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters index 974371dc85..6ad212a125 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters @@ -46,9 +46,6 @@ src\cpp\client - - src\cpp\common - src\cpp\common @@ -61,6 +58,9 @@ src\cpp\common + + src\cpp\common + src\cpp\common @@ -111,9 +111,6 @@ include\grpc++ - - include\grpc++ - include\grpc++ @@ -192,6 +189,9 @@ include\grpc++\impl + + include\grpc++ + include\grpc++\security diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj index 5bfe4375f4..9e6f2c0d0f 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -259,7 +259,6 @@ - @@ -286,6 +285,7 @@ + @@ -382,8 +382,6 @@ - - @@ -392,6 +390,8 @@ + + diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters index 805b8609c9..c73be4e63f 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters @@ -31,9 +31,6 @@ src\cpp\client - - src\cpp\common - src\cpp\common @@ -46,6 +43,9 @@ src\cpp\common + + src\cpp\common + src\cpp\common @@ -96,9 +96,6 @@ include\grpc++ - - include\grpc++ - include\grpc++ @@ -177,6 +174,9 @@ include\grpc++\impl + + include\grpc++ + include\grpc++\security diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 31fdbe4f44..8c9056ea14 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -312,7 +312,6 @@ - @@ -336,6 +335,7 @@ + @@ -497,8 +497,6 @@ - - @@ -545,6 +543,8 @@ + + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 0dcb848cd9..f37c1ed8ce 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -52,9 +52,6 @@ src\core\lib\http - - src\core\lib\iomgr - src\core\lib\iomgr @@ -124,6 +121,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -722,9 +722,6 @@ src\core\lib\http - - src\core\lib\iomgr - src\core\lib\iomgr @@ -794,6 +791,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index ed74ef0f0b..03b86c134d 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -205,7 +205,6 @@ - @@ -229,6 +228,7 @@ + @@ -345,8 +345,6 @@ - - @@ -393,6 +391,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index 9a6ad72611..d383970da4 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -106,9 +106,6 @@ src\core\lib\http - - src\core\lib\iomgr - src\core\lib\iomgr @@ -178,6 +175,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -509,9 +509,6 @@ src\core\lib\http - - src\core\lib\iomgr - src\core\lib\iomgr @@ -581,6 +578,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 8d007329b6..9edaa0ec23 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -302,7 +302,6 @@ - @@ -326,6 +325,7 @@ + @@ -465,8 +465,6 @@ - - @@ -513,6 +511,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index 1a28d41bbf..c4be5b7af7 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -55,9 +55,6 @@ src\core\lib\http - - src\core\lib\iomgr - src\core\lib\iomgr @@ -127,6 +124,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -632,9 +632,6 @@ src\core\lib\http - - src\core\lib\iomgr - src\core\lib\iomgr @@ -704,6 +701,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/test/buffer_pool_test/buffer_pool_test.vcxproj b/vsprojects/vcxproj/test/buffer_pool_test/buffer_pool_test.vcxproj deleted file mode 100644 index d11d063f9d..0000000000 --- a/vsprojects/vcxproj/test/buffer_pool_test/buffer_pool_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {46480473-88FC-8C53-3509-FC7F4DC3A8CD} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - buffer_pool_test - static - Debug - static - Debug - - - buffer_pool_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/buffer_pool_test/buffer_pool_test.vcxproj.filters b/vsprojects/vcxproj/test/buffer_pool_test/buffer_pool_test.vcxproj.filters deleted file mode 100644 index ecbf91ec6e..0000000000 --- a/vsprojects/vcxproj/test/buffer_pool_test/buffer_pool_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\iomgr - - - - - - {94e599c3-a059-4581-0cac-d15361ec8a7d} - - - {6d25d413-0043-5a1c-52f7-7d25809be372} - - - {64b38e90-4497-be2e-cee1-402590cbea8a} - - - - diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj index f2665cc39f..a47c40f0f7 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj @@ -157,8 +157,6 @@ - - @@ -223,6 +221,8 @@ + + diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters index a1ea12173d..71cf6838fe 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters @@ -10,9 +10,6 @@ test\core\end2end\tests - - test\core\end2end\tests - test\core\end2end\tests @@ -109,6 +106,9 @@ test\core\end2end\tests + + test\core\end2end\tests + test\core\end2end\tests diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj index 0b8c1666ae..68ff5f1ebd 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj @@ -157,8 +157,6 @@ - - @@ -225,6 +223,8 @@ + + diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters index 8577b1652a..7a620f61a5 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters @@ -10,9 +10,6 @@ test\core\end2end\tests - - test\core\end2end\tests - test\core\end2end\tests @@ -112,6 +109,9 @@ test\core\end2end\tests + + test\core\end2end\tests + test\core\end2end\tests diff --git a/vsprojects/vcxproj/test/resource_quota_test/resource_quota_test.vcxproj b/vsprojects/vcxproj/test/resource_quota_test/resource_quota_test.vcxproj new file mode 100644 index 0000000000..389340e9a0 --- /dev/null +++ b/vsprojects/vcxproj/test/resource_quota_test/resource_quota_test.vcxproj @@ -0,0 +1,199 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {6084F546-5D66-5CB5-63CF-DC960F14B545} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + resource_quota_test + static + Debug + static + Debug + + + resource_quota_test + static + Release + static + Release + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + + + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/resource_quota_test/resource_quota_test.vcxproj.filters b/vsprojects/vcxproj/test/resource_quota_test/resource_quota_test.vcxproj.filters new file mode 100644 index 0000000000..d76c8aed5d --- /dev/null +++ b/vsprojects/vcxproj/test/resource_quota_test/resource_quota_test.vcxproj.filters @@ -0,0 +1,21 @@ + + + + + test\core\iomgr + + + + + + {06783e32-dbf0-7e7c-7b50-12b278f9cc12} + + + {c4f432b6-577b-e3ed-fec9-a915af5ebbd5} + + + {fcc82d68-ffb2-0843-83aa-175006c43aeb} + + + + -- cgit v1.2.3 From f88c92b4f2e62c506b69188485012288ed70c43d Mon Sep 17 00:00:00 2001 From: Dan Born Date: Mon, 17 Oct 2016 15:07:05 -0700 Subject: Merge fixup --- src/core/lib/iomgr/tcp_server_posix.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index 4f49dad815..242388bd17 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -191,9 +191,6 @@ grpc_error *grpc_tcp_server_create(grpc_closure *shutdown_complete, } static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { - gpr_mu_lock(&s->mu); - GPR_ASSERT(s->shutdown); - gpr_mu_unlock(&s->mu); if (s->shutdown_complete != NULL) { grpc_exec_ctx_sched(exec_ctx, s->shutdown_complete, GRPC_ERROR_NONE, NULL); } -- cgit v1.2.3 From a983dc7fc2689e4f7e0fbd25ef7a6e84f7374cb9 Mon Sep 17 00:00:00 2001 From: Dan Born Date: Mon, 17 Oct 2016 15:11:17 -0700 Subject: Merge fixups --- src/core/lib/iomgr/tcp_server_posix.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index 242388bd17..4f49dad815 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -191,6 +191,9 @@ grpc_error *grpc_tcp_server_create(grpc_closure *shutdown_complete, } static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { + gpr_mu_lock(&s->mu); + GPR_ASSERT(s->shutdown); + gpr_mu_unlock(&s->mu); if (s->shutdown_complete != NULL) { grpc_exec_ctx_sched(exec_ctx, s->shutdown_complete, GRPC_ERROR_NONE, NULL); } -- cgit v1.2.3 From 19e01fdc326b73c15d977657c23e4bf6e7e25988 Mon Sep 17 00:00:00 2001 From: Dan Born Date: Tue, 18 Oct 2016 11:49:45 -0700 Subject: clang-format --- src/core/lib/iomgr/tcp_server_posix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index 4f49dad815..d8eb24b861 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -651,7 +651,8 @@ done: } } -/* Return listener at port_index or NULL. Should only be called with s->mu locked. */ +/* Return listener at port_index or NULL. Should only be called with s->mu + locked. */ static grpc_tcp_listener *get_port_index(grpc_tcp_server *s, unsigned port_index) { unsigned num_ports = 0; -- cgit v1.2.3 From 2f1d8708e52614ec4b221c710801ca77d3df18d3 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 18 Oct 2016 16:09:26 -0700 Subject: Header fixes --- include/grpc++/resource_quota.h | 6 +++--- src/core/lib/iomgr/resource_quota.h | 6 +++--- src/core/lib/iomgr/tcp_client_posix.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/core/lib') diff --git a/include/grpc++/resource_quota.h b/include/grpc++/resource_quota.h index e45fe98974..db5bc8e7be 100644 --- a/include/grpc++/resource_quota.h +++ b/include/grpc++/resource_quota.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPCXX_BUFFER_POOL_H -#define GRPCXX_BUFFER_POOL_H +#ifndef GRPCXX_RESOURCE_QUOTA_H +#define GRPCXX_RESOURCE_QUOTA_H struct grpc_resource_quota; @@ -67,4 +67,4 @@ class ResourceQuota GRPC_FINAL { } // namespace grpc -#endif +#endif // GRPCXX_RESOURCE_QUOTA_H diff --git a/src/core/lib/iomgr/resource_quota.h b/src/core/lib/iomgr/resource_quota.h index 5c566e492c..c4015b42cc 100644 --- a/src/core/lib/iomgr/resource_quota.h +++ b/src/core/lib/iomgr/resource_quota.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_LIB_IOMGR_BUFFER_POOL_H -#define GRPC_CORE_LIB_IOMGR_BUFFER_POOL_H +#ifndef GRPC_CORE_LIB_IOMGR_RESOURCE_QUOTA_H +#define GRPC_CORE_LIB_IOMGR_RESOURCE_QUOTA_H #include @@ -128,4 +128,4 @@ void grpc_resource_user_alloc_slices( grpc_resource_user_slice_allocator *slice_allocator, size_t length, size_t count, gpr_slice_buffer *dest); -#endif /* GRPC_CORE_LIB_IOMGR_BUFFER_POOL_H */ +#endif /* GRPC_CORE_LIB_IOMGR_RESOURCE_QUOTA_H */ diff --git a/src/core/lib/iomgr/tcp_client_posix.h b/src/core/lib/iomgr/tcp_client_posix.h index d8108b8359..efc5fcd5bb 100644 --- a/src/core/lib/iomgr/tcp_client_posix.h +++ b/src/core/lib/iomgr/tcp_client_posix.h @@ -42,4 +42,4 @@ grpc_endpoint *grpc_tcp_client_create_from_fd( grpc_exec_ctx *exec_ctx, grpc_fd *fd, const grpc_channel_args *channel_args, const char *addr_str); -#endif +#endif /* GRPC_CORE_LIB_IOMGR_TCP_CLIENT_POSIX_H */ -- cgit v1.2.3 From afcc8752f3a39d67831d03a810e85150765fa587 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 18 Oct 2016 16:10:06 -0700 Subject: clang-format --- .../chttp2/server/insecure/server_chttp2_posix.c | 4 +- src/core/lib/iomgr/endpoint.h | 2 +- src/core/lib/iomgr/endpoint_pair.h | 3 +- src/core/lib/iomgr/endpoint_pair_posix.c | 3 +- src/core/lib/iomgr/resource_quota.c | 131 +++++++++++++-------- .../lib/security/credentials/jwt/jwt_verifier.c | 6 +- .../credentials/oauth2/oauth2_credentials.c | 7 +- src/core/lib/security/transport/secure_endpoint.c | 3 +- src/cpp/common/channel_arguments.cc | 3 +- src/cpp/server/server_builder.cc | 2 +- test/core/bad_client/bad_client.c | 3 +- test/core/end2end/fuzzers/client_fuzzer.c | 3 +- test/core/end2end/fuzzers/server_fuzzer.c | 3 +- test/core/end2end/tests/resource_quota_server.c | 3 +- test/core/http/httpcli_test.c | 4 +- test/core/http/httpscli_test.c | 4 +- test/core/iomgr/endpoint_pair_test.c | 3 +- test/core/util/passthru_endpoint.c | 5 +- test/cpp/qps/driver.cc | 6 +- 19 files changed, 120 insertions(+), 78 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c index b760fea2fa..aa2ecf5743 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c @@ -57,8 +57,8 @@ void grpc_server_add_insecure_channel_from_fd(grpc_server *server, char *name; gpr_asprintf(&name, "fd:%d", fd); - grpc_resource_quota *resource_quota = - grpc_resource_quota_from_channel_args(grpc_server_get_channel_args(server)); + grpc_resource_quota *resource_quota = grpc_resource_quota_from_channel_args( + grpc_server_get_channel_args(server)); grpc_endpoint *server_endpoint = grpc_tcp_create(grpc_fd_create(fd, name), resource_quota, GRPC_TCP_DEFAULT_READ_SLICE_SIZE, name); diff --git a/src/core/lib/iomgr/endpoint.h b/src/core/lib/iomgr/endpoint.h index 819fcdda1a..0ac5486ff5 100644 --- a/src/core/lib/iomgr/endpoint.h +++ b/src/core/lib/iomgr/endpoint.h @@ -37,9 +37,9 @@ #include #include #include -#include "src/core/lib/iomgr/resource_quota.h" #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/pollset_set.h" +#include "src/core/lib/iomgr/resource_quota.h" /* An endpoint caps a streaming channel between two communicating processes. Examples may be: a tcp socket, , or some shared memory. */ diff --git a/src/core/lib/iomgr/endpoint_pair.h b/src/core/lib/iomgr/endpoint_pair.h index 27c17a0e97..f9de0c715e 100644 --- a/src/core/lib/iomgr/endpoint_pair.h +++ b/src/core/lib/iomgr/endpoint_pair.h @@ -42,6 +42,7 @@ typedef struct { } grpc_endpoint_pair; grpc_endpoint_pair grpc_iomgr_create_endpoint_pair( - const char *name, grpc_resource_quota *resource_quota, size_t read_slice_size); + const char *name, grpc_resource_quota *resource_quota, + size_t read_slice_size); #endif /* GRPC_CORE_LIB_IOMGR_ENDPOINT_PAIR_H */ diff --git a/src/core/lib/iomgr/endpoint_pair_posix.c b/src/core/lib/iomgr/endpoint_pair_posix.c index c1437bcf17..fc80064a60 100644 --- a/src/core/lib/iomgr/endpoint_pair_posix.c +++ b/src/core/lib/iomgr/endpoint_pair_posix.c @@ -63,7 +63,8 @@ static void create_sockets(int sv[2]) { } grpc_endpoint_pair grpc_iomgr_create_endpoint_pair( - const char *name, grpc_resource_quota *resource_quota, size_t read_slice_size) { + const char *name, grpc_resource_quota *resource_quota, + size_t read_slice_size) { int sv[2]; grpc_endpoint_pair p; char *final_name; diff --git a/src/core/lib/iomgr/resource_quota.c b/src/core/lib/iomgr/resource_quota.c index c4e6e5482a..89c795c0ec 100644 --- a/src/core/lib/iomgr/resource_quota.c +++ b/src/core/lib/iomgr/resource_quota.c @@ -73,12 +73,14 @@ struct grpc_resource_quota { * list management */ -static void bulist_add_tail(grpc_resource_user *resource_user, grpc_bulist list) { +static void bulist_add_tail(grpc_resource_user *resource_user, + grpc_bulist list) { grpc_resource_quota *resource_quota = resource_user->resource_quota; grpc_resource_user **root = &resource_quota->roots[list]; if (*root == NULL) { *root = resource_user; - resource_user->links[list].next = resource_user->links[list].prev = resource_user; + resource_user->links[list].next = resource_user->links[list].prev = + resource_user; } else { resource_user->links[list].next = *root; resource_user->links[list].prev = (*root)->links[list].prev; @@ -87,12 +89,14 @@ static void bulist_add_tail(grpc_resource_user *resource_user, grpc_bulist list) } } -static void bulist_add_head(grpc_resource_user *resource_user, grpc_bulist list) { +static void bulist_add_head(grpc_resource_user *resource_user, + grpc_bulist list) { grpc_resource_quota *resource_quota = resource_user->resource_quota; grpc_resource_user **root = &resource_quota->roots[list]; if (*root == NULL) { *root = resource_user; - resource_user->links[list].next = resource_user->links[list].prev = resource_user; + resource_user->links[list].next = resource_user->links[list].prev = + resource_user; } else { resource_user->links[list].next = (*root)->links[list].next; resource_user->links[list].prev = *root; @@ -102,12 +106,13 @@ static void bulist_add_head(grpc_resource_user *resource_user, grpc_bulist list) } } -static bool bulist_empty(grpc_resource_quota *resource_quota, grpc_bulist list) { +static bool bulist_empty(grpc_resource_quota *resource_quota, + grpc_bulist list) { return resource_quota->roots[list] == NULL; } static grpc_resource_user *bulist_pop(grpc_resource_quota *resource_quota, - grpc_bulist list) { + grpc_bulist list) { grpc_resource_user **root = &resource_quota->roots[list]; grpc_resource_user *resource_user = *root; if (resource_user == NULL) { @@ -145,10 +150,12 @@ static void bulist_remove(grpc_resource_user *resource_user, grpc_bulist list) { * buffer pool state machine */ -static bool bpalloc(grpc_exec_ctx *exec_ctx, grpc_resource_quota *resource_quota); -static bool bpscavenge(grpc_exec_ctx *exec_ctx, grpc_resource_quota *resource_quota); -static bool bpreclaim(grpc_exec_ctx *exec_ctx, grpc_resource_quota *resource_quota, - bool destructive); +static bool bpalloc(grpc_exec_ctx *exec_ctx, + grpc_resource_quota *resource_quota); +static bool bpscavenge(grpc_exec_ctx *exec_ctx, + grpc_resource_quota *resource_quota); +static bool bpreclaim(grpc_exec_ctx *exec_ctx, + grpc_resource_quota *resource_quota, bool destructive); static void bpstep(grpc_exec_ctx *exec_ctx, void *bp, grpc_error *error) { grpc_resource_quota *resource_quota = bp; @@ -168,12 +175,13 @@ static void bpstep_sched(grpc_exec_ctx *exec_ctx, resource_quota->step_scheduled = true; grpc_resource_quota_internal_ref(resource_quota); grpc_combiner_execute_finally(exec_ctx, resource_quota->combiner, - &resource_quota->bpstep_closure, GRPC_ERROR_NONE, - false); + &resource_quota->bpstep_closure, + GRPC_ERROR_NONE, false); } /* returns true if all allocations are completed */ -static bool bpalloc(grpc_exec_ctx *exec_ctx, grpc_resource_quota *resource_quota) { +static bool bpalloc(grpc_exec_ctx *exec_ctx, + grpc_resource_quota *resource_quota) { grpc_resource_user *resource_user; while ((resource_user = bulist_pop(resource_quota, GRPC_BULIST_AWAITING_ALLOCATION))) { @@ -207,7 +215,8 @@ static bool bpalloc(grpc_exec_ctx *exec_ctx, grpc_resource_quota *resource_quota } /* returns true if any memory could be reclaimed from buffers */ -static bool bpscavenge(grpc_exec_ctx *exec_ctx, grpc_resource_quota *resource_quota) { +static bool bpscavenge(grpc_exec_ctx *exec_ctx, + grpc_resource_quota *resource_quota) { grpc_resource_user *resource_user; while ((resource_user = bulist_pop(resource_quota, GRPC_BULIST_NON_EMPTY_FREE_POOL))) { @@ -232,16 +241,17 @@ static bool bpscavenge(grpc_exec_ctx *exec_ctx, grpc_resource_quota *resource_qu } /* returns true if reclaimation is proceeding */ -static bool bpreclaim(grpc_exec_ctx *exec_ctx, grpc_resource_quota *resource_quota, - bool destructive) { +static bool bpreclaim(grpc_exec_ctx *exec_ctx, + grpc_resource_quota *resource_quota, bool destructive) { if (resource_quota->reclaiming) return true; grpc_bulist list = destructive ? GRPC_BULIST_RECLAIMER_DESTRUCTIVE : GRPC_BULIST_RECLAIMER_BENIGN; grpc_resource_user *resource_user = bulist_pop(resource_quota, list); if (resource_user == NULL) return false; if (grpc_resource_quota_trace) { - gpr_log(GPR_DEBUG, "BP %s %s: initiate %s reclaimation", resource_quota->name, - resource_user->name, destructive ? "destructive" : "benign"); + gpr_log(GPR_DEBUG, "BP %s %s: initiate %s reclaimation", + resource_quota->name, resource_user->name, + destructive ? "destructive" : "benign"); } resource_quota->reclaiming = true; grpc_resource_quota_internal_ref(resource_quota); @@ -284,7 +294,8 @@ static void bu_slice_unref(void *p) { } } -static gpr_slice bu_slice_create(grpc_resource_user *resource_user, size_t size) { +static gpr_slice bu_slice_create(grpc_resource_user *resource_user, + size_t size) { bu_slice_refcount *rc = gpr_malloc(sizeof(bu_slice_refcount) + size); rc->base.ref = bu_slice_ref; rc->base.unref = bu_slice_unref; @@ -304,7 +315,8 @@ static gpr_slice bu_slice_create(grpc_resource_user *resource_user, size_t size) static void bu_allocate(grpc_exec_ctx *exec_ctx, void *bu, grpc_error *error) { grpc_resource_user *resource_user = bu; - if (bulist_empty(resource_user->resource_quota, GRPC_BULIST_AWAITING_ALLOCATION)) { + if (bulist_empty(resource_user->resource_quota, + GRPC_BULIST_AWAITING_ALLOCATION)) { bpstep_sched(exec_ctx, resource_user->resource_quota); } bulist_add_tail(resource_user, GRPC_BULIST_AWAITING_ALLOCATION); @@ -315,7 +327,8 @@ static void bu_add_to_free_pool(grpc_exec_ctx *exec_ctx, void *bu, grpc_resource_user *resource_user = bu; if (!bulist_empty(resource_user->resource_quota, GRPC_BULIST_AWAITING_ALLOCATION) && - bulist_empty(resource_user->resource_quota, GRPC_BULIST_NON_EMPTY_FREE_POOL)) { + bulist_empty(resource_user->resource_quota, + GRPC_BULIST_NON_EMPTY_FREE_POOL)) { bpstep_sched(exec_ctx, resource_user->resource_quota); } bulist_add_tail(resource_user, GRPC_BULIST_NON_EMPTY_FREE_POOL); @@ -326,8 +339,10 @@ static void bu_post_benign_reclaimer(grpc_exec_ctx *exec_ctx, void *bu, grpc_resource_user *resource_user = bu; if (!bulist_empty(resource_user->resource_quota, GRPC_BULIST_AWAITING_ALLOCATION) && - bulist_empty(resource_user->resource_quota, GRPC_BULIST_NON_EMPTY_FREE_POOL) && - bulist_empty(resource_user->resource_quota, GRPC_BULIST_RECLAIMER_BENIGN)) { + bulist_empty(resource_user->resource_quota, + GRPC_BULIST_NON_EMPTY_FREE_POOL) && + bulist_empty(resource_user->resource_quota, + GRPC_BULIST_RECLAIMER_BENIGN)) { bpstep_sched(exec_ctx, resource_user->resource_quota); } bulist_add_tail(resource_user, GRPC_BULIST_RECLAIMER_BENIGN); @@ -338,8 +353,10 @@ static void bu_post_destructive_reclaimer(grpc_exec_ctx *exec_ctx, void *bu, grpc_resource_user *resource_user = bu; if (!bulist_empty(resource_user->resource_quota, GRPC_BULIST_AWAITING_ALLOCATION) && - bulist_empty(resource_user->resource_quota, GRPC_BULIST_NON_EMPTY_FREE_POOL) && - bulist_empty(resource_user->resource_quota, GRPC_BULIST_RECLAIMER_BENIGN) && + bulist_empty(resource_user->resource_quota, + GRPC_BULIST_NON_EMPTY_FREE_POOL) && + bulist_empty(resource_user->resource_quota, + GRPC_BULIST_RECLAIMER_BENIGN) && bulist_empty(resource_user->resource_quota, GRPC_BULIST_RECLAIMER_DESTRUCTIVE)) { bpstep_sched(exec_ctx, resource_user->resource_quota); @@ -371,9 +388,9 @@ static void bu_allocated_slices(grpc_exec_ctx *exec_ctx, void *ts, grpc_resource_user_slice_allocator *slice_allocator = ts; if (error == GRPC_ERROR_NONE) { for (size_t i = 0; i < slice_allocator->count; i++) { - gpr_slice_buffer_add_indexed(slice_allocator->dest, - bu_slice_create(slice_allocator->resource_user, - slice_allocator->length)); + gpr_slice_buffer_add_indexed( + slice_allocator->dest, bu_slice_create(slice_allocator->resource_user, + slice_allocator->length)); } } grpc_closure_run(exec_ctx, &slice_allocator->on_done, GRPC_ERROR_REF(error)); @@ -393,7 +410,8 @@ static void bp_resize(grpc_exec_ctx *exec_ctx, void *args, grpc_error *error) { if (delta < 0 && a->resource_quota->free_pool < 0) { bpstep_sched(exec_ctx, a->resource_quota); } else if (delta > 0 && - !bulist_empty(a->resource_quota, GRPC_BULIST_AWAITING_ALLOCATION)) { + !bulist_empty(a->resource_quota, + GRPC_BULIST_AWAITING_ALLOCATION)) { bpstep_sched(exec_ctx, a->resource_quota); } grpc_resource_quota_internal_unref(exec_ctx, a->resource_quota); @@ -436,7 +454,7 @@ grpc_resource_quota *grpc_resource_quota_create(const char *name) { } void grpc_resource_quota_internal_unref(grpc_exec_ctx *exec_ctx, - grpc_resource_quota *resource_quota) { + grpc_resource_quota *resource_quota) { if (gpr_unref(&resource_quota->refs)) { grpc_combiner_destroy(exec_ctx, resource_quota->combiner); gpr_free(resource_quota->name); @@ -450,7 +468,8 @@ void grpc_resource_quota_unref(grpc_resource_quota *resource_quota) { grpc_exec_ctx_finish(&exec_ctx); } -grpc_resource_quota *grpc_resource_quota_internal_ref(grpc_resource_quota *resource_quota) { +grpc_resource_quota *grpc_resource_quota_internal_ref( + grpc_resource_quota *resource_quota) { gpr_ref(&resource_quota->refs); return resource_quota; } @@ -459,7 +478,8 @@ void grpc_resource_quota_ref(grpc_resource_quota *resource_quota) { grpc_resource_quota_internal_ref(resource_quota); } -void grpc_resource_quota_resize(grpc_resource_quota *resource_quota, size_t size) { +void grpc_resource_quota_resize(grpc_resource_quota *resource_quota, + size_t size) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; bp_resize_args *a = gpr_malloc(sizeof(*a)); a->resource_quota = grpc_resource_quota_internal_ref(resource_quota); @@ -508,16 +528,20 @@ const grpc_arg_pointer_vtable *grpc_resource_quota_arg_vtable(void) { */ void grpc_resource_user_init(grpc_resource_user *resource_user, - grpc_resource_quota *resource_quota, const char *name) { - resource_user->resource_quota = grpc_resource_quota_internal_ref(resource_quota); - grpc_closure_init(&resource_user->allocate_closure, &bu_allocate, resource_user); + grpc_resource_quota *resource_quota, + const char *name) { + resource_user->resource_quota = + grpc_resource_quota_internal_ref(resource_quota); + grpc_closure_init(&resource_user->allocate_closure, &bu_allocate, + resource_user); grpc_closure_init(&resource_user->add_to_free_pool_closure, &bu_add_to_free_pool, resource_user); grpc_closure_init(&resource_user->post_reclaimer_closure[0], &bu_post_benign_reclaimer, resource_user); grpc_closure_init(&resource_user->post_reclaimer_closure[1], &bu_post_destructive_reclaimer, resource_user); - grpc_closure_init(&resource_user->destroy_closure, &bu_destroy, resource_user); + grpc_closure_init(&resource_user->destroy_closure, &bu_destroy, + resource_user); gpr_mu_init(&resource_user->mu); resource_user->allocated = 0; resource_user->free_pool = 0; @@ -542,8 +566,8 @@ void grpc_resource_user_init(grpc_resource_user *resource_user, } void grpc_resource_user_shutdown(grpc_exec_ctx *exec_ctx, - grpc_resource_user *resource_user, - grpc_closure *on_done) { + grpc_resource_user *resource_user, + grpc_closure *on_done) { gpr_mu_lock(&resource_user->mu); GPR_ASSERT(gpr_atm_no_barrier_load(&resource_user->on_done_destroy_closure) == 0); @@ -558,7 +582,7 @@ void grpc_resource_user_shutdown(grpc_exec_ctx *exec_ctx, } void grpc_resource_user_destroy(grpc_exec_ctx *exec_ctx, - grpc_resource_user *resource_user) { + grpc_resource_user *resource_user) { #ifndef NDEBUG gpr_free(resource_user->asan_canary); #endif @@ -568,8 +592,8 @@ void grpc_resource_user_destroy(grpc_exec_ctx *exec_ctx, } void grpc_resource_user_alloc(grpc_exec_ctx *exec_ctx, - grpc_resource_user *resource_user, size_t size, - grpc_closure *optional_on_done) { + grpc_resource_user *resource_user, size_t size, + grpc_closure *optional_on_done) { gpr_mu_lock(&resource_user->mu); grpc_closure *on_done_destroy = (grpc_closure *)gpr_atm_no_barrier_load( &resource_user->on_done_destroy_closure); @@ -609,7 +633,7 @@ void grpc_resource_user_alloc(grpc_exec_ctx *exec_ctx, } void grpc_resource_user_free(grpc_exec_ctx *exec_ctx, - grpc_resource_user *resource_user, size_t size) { + grpc_resource_user *resource_user, size_t size) { gpr_mu_lock(&resource_user->mu); GPR_ASSERT(resource_user->allocated >= (int64_t)size); bool was_zero_or_negative = resource_user->free_pool <= 0; @@ -640,8 +664,9 @@ void grpc_resource_user_free(grpc_exec_ctx *exec_ctx, } void grpc_resource_user_post_reclaimer(grpc_exec_ctx *exec_ctx, - grpc_resource_user *resource_user, - bool destructive, grpc_closure *closure) { + grpc_resource_user *resource_user, + bool destructive, + grpc_closure *closure) { if (gpr_atm_acq_load(&resource_user->on_done_destroy_closure) == 0) { GPR_ASSERT(resource_user->reclaimers[destructive] == NULL); resource_user->reclaimers[destructive] = closure; @@ -654,14 +679,15 @@ void grpc_resource_user_post_reclaimer(grpc_exec_ctx *exec_ctx, } void grpc_resource_user_finish_reclaimation(grpc_exec_ctx *exec_ctx, - grpc_resource_user *resource_user) { + grpc_resource_user *resource_user) { if (grpc_resource_quota_trace) { gpr_log(GPR_DEBUG, "BP %s %s: reclaimation complete", resource_user->resource_quota->name, resource_user->name); } - grpc_combiner_execute(exec_ctx, resource_user->resource_quota->combiner, - &resource_user->resource_quota->bpreclaimation_done_closure, - GRPC_ERROR_NONE, false); + grpc_combiner_execute( + exec_ctx, resource_user->resource_quota->combiner, + &resource_user->resource_quota->bpreclaimation_done_closure, + GRPC_ERROR_NONE, false); } void grpc_resource_user_slice_allocator_init( @@ -674,11 +700,12 @@ void grpc_resource_user_slice_allocator_init( } void grpc_resource_user_alloc_slices( - grpc_exec_ctx *exec_ctx, grpc_resource_user_slice_allocator *slice_allocator, - size_t length, size_t count, gpr_slice_buffer *dest) { + grpc_exec_ctx *exec_ctx, + grpc_resource_user_slice_allocator *slice_allocator, size_t length, + size_t count, gpr_slice_buffer *dest) { slice_allocator->length = length; slice_allocator->count = count; slice_allocator->dest = dest; - grpc_resource_user_alloc(exec_ctx, slice_allocator->resource_user, count * length, - &slice_allocator->on_allocated); + grpc_resource_user_alloc(exec_ctx, slice_allocator->resource_user, + count * length, &slice_allocator->on_allocated); } diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.c b/src/core/lib/security/credentials/jwt/jwt_verifier.c index 0339fd5d61..43eb642515 100644 --- a/src/core/lib/security/credentials/jwt/jwt_verifier.c +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.c @@ -660,7 +660,8 @@ static void on_openid_config_retrieved(grpc_exec_ctx *exec_ctx, void *user_data, /* TODO(ctiller): Carry the resource_quota in ctx and share it with the host channel. This would allow us to cancel an authentication query when under extreme memory pressure. */ - grpc_resource_quota *resource_quota = grpc_resource_quota_create("jwt_verifier"); + grpc_resource_quota *resource_quota = + grpc_resource_quota_create("jwt_verifier"); grpc_httpcli_get( exec_ctx, &ctx->verifier->http_ctx, &ctx->pollent, resource_quota, &req, gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), grpc_jwt_verifier_max_delay), @@ -772,7 +773,8 @@ static void retrieve_key_and_verify(grpc_exec_ctx *exec_ctx, /* TODO(ctiller): Carry the resource_quota in ctx and share it with the host channel. This would allow us to cancel an authentication query when under extreme memory pressure. */ - grpc_resource_quota *resource_quota = grpc_resource_quota_create("jwt_verifier"); + grpc_resource_quota *resource_quota = + grpc_resource_quota_create("jwt_verifier"); grpc_httpcli_get( exec_ctx, &ctx->verifier->http_ctx, &ctx->pollent, resource_quota, &req, gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), grpc_jwt_verifier_max_delay), diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.c b/src/core/lib/security/credentials/oauth2/oauth2_credentials.c index 102831637b..d980577c46 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.c +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.c @@ -310,7 +310,8 @@ static void compute_engine_fetch_oauth2( /* TODO(ctiller): Carry the resource_quota in ctx and share it with the host channel. This would allow us to cancel an authentication query when under extreme memory pressure. */ - grpc_resource_quota *resource_quota = grpc_resource_quota_create("oauth2_credentials"); + grpc_resource_quota *resource_quota = + grpc_resource_quota_create("oauth2_credentials"); grpc_httpcli_get(exec_ctx, httpcli_context, pollent, resource_quota, &request, deadline, grpc_closure_create(response_cb, metadata_req), &metadata_req->response); @@ -367,8 +368,8 @@ static void refresh_token_fetch_oauth2( extreme memory pressure. */ grpc_resource_quota *resource_quota = grpc_resource_quota_create("oauth2_credentials_refresh"); - grpc_httpcli_post(exec_ctx, httpcli_context, pollent, resource_quota, &request, - body, strlen(body), deadline, + grpc_httpcli_post(exec_ctx, httpcli_context, pollent, resource_quota, + &request, body, strlen(body), deadline, grpc_closure_create(response_cb, metadata_req), &metadata_req->response); grpc_resource_quota_internal_unref(exec_ctx, resource_quota); diff --git a/src/core/lib/security/transport/secure_endpoint.c b/src/core/lib/security/transport/secure_endpoint.c index 9f84237171..3924997d31 100644 --- a/src/core/lib/security/transport/secure_endpoint.c +++ b/src/core/lib/security/transport/secure_endpoint.c @@ -370,7 +370,8 @@ static grpc_workqueue *endpoint_get_workqueue(grpc_endpoint *secure_ep) { return grpc_endpoint_get_workqueue(ep->wrapped_ep); } -static grpc_resource_user *endpoint_get_resource_user(grpc_endpoint *secure_ep) { +static grpc_resource_user *endpoint_get_resource_user( + grpc_endpoint *secure_ep) { secure_endpoint *ep = (secure_endpoint *)secure_ep; return grpc_endpoint_get_resource_user(ep->wrapped_ep); } diff --git a/src/cpp/common/channel_arguments.cc b/src/cpp/common/channel_arguments.cc index 6e84170d97..5462e0d72a 100644 --- a/src/cpp/common/channel_arguments.cc +++ b/src/cpp/common/channel_arguments.cc @@ -114,7 +114,8 @@ void ChannelArguments::SetUserAgentPrefix( } } -void ChannelArguments::SetResourceQuota(const grpc::ResourceQuota& resource_quota) { +void ChannelArguments::SetResourceQuota( + const grpc::ResourceQuota& resource_quota) { SetPointerWithVtable(GRPC_ARG_BUFFER_POOL, resource_quota.c_resource_quota(), grpc_resource_quota_arg_vtable()); } diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index a4cf4063ee..68df1d11e1 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -33,8 +33,8 @@ #include -#include #include +#include #include #include #include diff --git a/test/core/bad_client/bad_client.c b/test/core/bad_client/bad_client.c index 8a4a17ea93..a9638500b7 100644 --- a/test/core/bad_client/bad_client.c +++ b/test/core/bad_client/bad_client.c @@ -114,7 +114,8 @@ void grpc_run_bad_client_test( grpc_init(); /* Create endpoints */ - grpc_resource_quota *resource_quota = grpc_resource_quota_create("bad_client_test"); + grpc_resource_quota *resource_quota = + grpc_resource_quota_create("bad_client_test"); sfd = grpc_iomgr_create_endpoint_pair("fixture", resource_quota, 65536); grpc_resource_quota_internal_unref(&exec_ctx, resource_quota); diff --git a/test/core/end2end/fuzzers/client_fuzzer.c b/test/core/end2end/fuzzers/client_fuzzer.c index b57c8c95fd..d104fe55e5 100644 --- a/test/core/end2end/fuzzers/client_fuzzer.c +++ b/test/core/end2end/fuzzers/client_fuzzer.c @@ -58,7 +58,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_init(); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_quota *resource_quota = grpc_resource_quota_create("client_fuzzer"); + grpc_resource_quota *resource_quota = + grpc_resource_quota_create("client_fuzzer"); grpc_endpoint *mock_endpoint = grpc_mock_endpoint_create(discard_write, resource_quota); grpc_resource_quota_internal_unref(&exec_ctx, resource_quota); diff --git a/test/core/end2end/fuzzers/server_fuzzer.c b/test/core/end2end/fuzzers/server_fuzzer.c index 58c2a9d483..ae4c8e658d 100644 --- a/test/core/end2end/fuzzers/server_fuzzer.c +++ b/test/core/end2end/fuzzers/server_fuzzer.c @@ -56,7 +56,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_init(); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_quota *resource_quota = grpc_resource_quota_create("server_fuzzer"); + grpc_resource_quota *resource_quota = + grpc_resource_quota_create("server_fuzzer"); grpc_endpoint *mock_endpoint = grpc_mock_endpoint_create(discard_write, resource_quota); grpc_resource_quota_internal_unref(&exec_ctx, resource_quota); diff --git a/test/core/end2end/tests/resource_quota_server.c b/test/core/end2end/tests/resource_quota_server.c index c658776cba..81850aea58 100644 --- a/test/core/end2end/tests/resource_quota_server.c +++ b/test/core/end2end/tests/resource_quota_server.c @@ -108,7 +108,8 @@ static gpr_slice generate_random_slice() { } void resource_quota_server(grpc_end2end_test_config config) { - grpc_resource_quota *resource_quota = grpc_resource_quota_create("test_server"); + grpc_resource_quota *resource_quota = + grpc_resource_quota_create("test_server"); grpc_resource_quota_resize(resource_quota, 5 * 1024 * 1024); #define NUM_CALLS 100 diff --git a/test/core/http/httpcli_test.c b/test/core/http/httpcli_test.c index 14318ae184..3e312c1dde 100644 --- a/test/core/http/httpcli_test.c +++ b/test/core/http/httpcli_test.c @@ -130,8 +130,8 @@ static void test_post(int port) { grpc_http_response response; memset(&response, 0, sizeof(response)); grpc_resource_quota *resource_quota = grpc_resource_quota_create("test_post"); - grpc_httpcli_post(&exec_ctx, &g_context, &g_pops, resource_quota, &req, "hello", - 5, n_seconds_time(15), + grpc_httpcli_post(&exec_ctx, &g_context, &g_pops, resource_quota, &req, + "hello", 5, n_seconds_time(15), grpc_closure_create(on_finish, &response), &response); grpc_resource_quota_internal_unref(&exec_ctx, resource_quota); gpr_mu_lock(g_mu); diff --git a/test/core/http/httpscli_test.c b/test/core/http/httpscli_test.c index 966d5e4062..d06035149e 100644 --- a/test/core/http/httpscli_test.c +++ b/test/core/http/httpscli_test.c @@ -132,8 +132,8 @@ static void test_post(int port) { grpc_http_response response; memset(&response, 0, sizeof(response)); grpc_resource_quota *resource_quota = grpc_resource_quota_create("test_post"); - grpc_httpcli_post(&exec_ctx, &g_context, &g_pops, resource_quota, &req, "hello", - 5, n_seconds_time(15), + grpc_httpcli_post(&exec_ctx, &g_context, &g_pops, resource_quota, &req, + "hello", 5, n_seconds_time(15), grpc_closure_create(on_finish, &response), &response); grpc_resource_quota_internal_unref(&exec_ctx, resource_quota); gpr_mu_lock(g_mu); diff --git a/test/core/iomgr/endpoint_pair_test.c b/test/core/iomgr/endpoint_pair_test.c index 53fb865e4b..2a257a7cea 100644 --- a/test/core/iomgr/endpoint_pair_test.c +++ b/test/core/iomgr/endpoint_pair_test.c @@ -49,7 +49,8 @@ static grpc_endpoint_test_fixture create_fixture_endpoint_pair( size_t slice_size) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_endpoint_test_fixture f; - grpc_resource_quota *resource_quota = grpc_resource_quota_create("endpoint_pair_test"); + grpc_resource_quota *resource_quota = + grpc_resource_quota_create("endpoint_pair_test"); grpc_endpoint_pair p = grpc_iomgr_create_endpoint_pair("test", resource_quota, slice_size); grpc_resource_quota_unref(resource_quota); diff --git a/test/core/util/passthru_endpoint.c b/test/core/util/passthru_endpoint.c index 85ed1c824c..ee6ef7da60 100644 --- a/test/core/util/passthru_endpoint.c +++ b/test/core/util/passthru_endpoint.c @@ -143,7 +143,7 @@ static void me_really_destroy(grpc_exec_ctx *exec_ctx, void *ep, static void me_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { half *m = (half *)ep; grpc_resource_user_shutdown(exec_ctx, &m->resource_user, - grpc_closure_create(me_really_destroy, m)); + grpc_closure_create(me_really_destroy, m)); } static char *me_get_peer(grpc_endpoint *ep) { @@ -170,7 +170,8 @@ static const grpc_endpoint_vtable vtable = { }; static void half_init(half *m, passthru_endpoint *parent, - grpc_resource_quota *resource_quota, const char *half_name) { + grpc_resource_quota *resource_quota, + const char *half_name) { m->base.vtable = &vtable; m->parent = parent; gpr_slice_buffer_init(&m->read_buffer); diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc index 89739ad562..a440341ccf 100644 --- a/test/cpp/qps/driver.cc +++ b/test/cpp/qps/driver.cc @@ -170,8 +170,10 @@ static void postprocess_scenario_result(ScenarioResult* result) { failures += rrc.count(); } } - result->mutable_summary()->set_successful_requests_per_second(successes / time_estimate); - result->mutable_summary()->set_failed_requests_per_second(failures / time_estimate); + result->mutable_summary()->set_successful_requests_per_second( + successes / time_estimate); + result->mutable_summary()->set_failed_requests_per_second(failures / + time_estimate); } } -- cgit v1.2.3 From f222593de2ddf4afe9dbcfc4fdb32d03b2692ae7 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 19 Oct 2016 07:45:22 -0700 Subject: clang-format --- src/core/lib/surface/call.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 24534104d3..30559304c6 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -310,10 +310,10 @@ grpc_error *grpc_call_create(const grpc_call_create_args *args, GRPC_CHANNEL_INTERNAL_REF(args->channel, "call"); /* initial refcount dropped by grpc_call_destroy */ - grpc_error *error = grpc_call_stack_init( - &exec_ctx, channel_stack, 1, destroy_call, call, call->context, - args->server_transport_data, path, send_deadline, - CALL_STACK_FROM_CALL(call)); + grpc_error *error = + grpc_call_stack_init(&exec_ctx, channel_stack, 1, destroy_call, call, + call->context, args->server_transport_data, path, + send_deadline, CALL_STACK_FROM_CALL(call)); if (error != GRPC_ERROR_NONE) { grpc_status_code status; const char *error_str; -- cgit v1.2.3 From 29a7f40af3d08c70ab8ba23fe33eb073a3da7b7f Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 19 Oct 2016 13:46:38 -0700 Subject: Convert method config to a struct for use in the fast path. --- src/core/ext/client_config/client_channel.c | 6 +-- src/core/ext/client_config/method_config.c | 56 +++++++++++++++++++--- src/core/ext/client_config/method_config.h | 16 ++++++- src/core/lib/channel/message_size_filter.c | 74 +++++++++++++++++++++-------- src/core/lib/transport/mdstr_hash_table.c | 35 ++++++++++---- src/core/lib/transport/mdstr_hash_table.h | 9 ++++ 6 files changed, 155 insertions(+), 41 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/client_config/client_channel.c b/src/core/ext/client_config/client_channel.c index beaa9637c3..613e98922b 100644 --- a/src/core/ext/client_config/client_channel.c +++ b/src/core/ext/client_config/client_channel.c @@ -855,8 +855,7 @@ static void read_service_config(grpc_exec_ctx *exec_ctx, void *arg, // If the method config table was present, use it. if (method_config_table != NULL) { const grpc_method_config *method_config = - grpc_method_config_table_get_method_config(method_config_table, - calld->path); + grpc_method_config_table_get(method_config_table, calld->path); if (method_config != NULL) { const gpr_timespec *per_method_timeout = grpc_method_config_get_timeout(method_config); @@ -922,8 +921,7 @@ static grpc_error *cc_init_call_elem(grpc_exec_ctx *exec_ctx, grpc_method_config_table_ref(chand->method_config_table); gpr_mu_unlock(&chand->mu); grpc_method_config *method_config = - grpc_method_config_table_get_method_config(method_config_table, - args->path); + grpc_method_config_table_get(method_config_table, args->path); if (method_config != NULL) { const gpr_timespec *per_method_timeout = grpc_method_config_get_timeout(method_config); diff --git a/src/core/ext/client_config/method_config.c b/src/core/ext/client_config/method_config.c index f8a82323e7..a42fe2bfd9 100644 --- a/src/core/ext/client_config/method_config.c +++ b/src/core/ext/client_config/method_config.c @@ -254,12 +254,12 @@ int grpc_method_config_table_cmp(const grpc_method_config_table* table1, return grpc_mdstr_hash_table_cmp(table1, table2); } -grpc_method_config* grpc_method_config_table_get_method_config( - const grpc_method_config_table* table, const grpc_mdstr* path) { - grpc_method_config* method_config = grpc_mdstr_hash_table_get(table, path); +void* grpc_method_config_table_get(const grpc_mdstr_hash_table* table, + const grpc_mdstr* path) { + void* value = grpc_mdstr_hash_table_get(table, path); // If we didn't find a match for the path, try looking for a wildcard // entry (i.e., change "/service/method" to "/service/*"). - if (method_config == NULL) { + if (value == NULL) { const char* path_str = grpc_mdstr_as_c_string(path); const char* sep = strrchr(path_str, '/') + 1; const size_t len = (size_t)(sep - path_str); @@ -269,10 +269,10 @@ grpc_method_config* grpc_method_config_table_get_method_config( buf[len + 1] = '\0'; grpc_mdstr* wildcard_path = grpc_mdstr_from_string(buf); gpr_free(buf); - method_config = grpc_mdstr_hash_table_get(table, wildcard_path); + value = grpc_mdstr_hash_table_get(table, wildcard_path); GRPC_MDSTR_UNREF(wildcard_path); } - return method_config; + return value; } static void* copy_arg(void* p) { return grpc_method_config_table_ref(p); } @@ -294,3 +294,47 @@ grpc_arg grpc_method_config_table_create_channel_arg( arg.value.pointer.vtable = &arg_vtable; return arg; } + +// State used by convert_entry() below. +typedef struct conversion_state { + void* (*convert_value)(const grpc_method_config* method_config); + const grpc_mdstr_hash_table_vtable* vtable; + size_t num_entries; + grpc_mdstr_hash_table_entry* entries; +} conversion_state; + +// A function to be passed to grpc_mdstr_hash_table_iterate() to create +// a copy of the entries. +static void convert_entry(const grpc_mdstr_hash_table_entry* entry, + void* user_data) { + conversion_state* state = user_data; + state->entries[state->num_entries].key = GRPC_MDSTR_REF(entry->key); + state->entries[state->num_entries].value = state->convert_value(entry->value); + state->entries[state->num_entries].vtable = state->vtable; + ++state->num_entries; +} + +grpc_mdstr_hash_table* grpc_method_config_table_convert( + const grpc_method_config_table* table, + void* (*convert_value)(const grpc_method_config* method_config), + const grpc_mdstr_hash_table_vtable* vtable) { + // Create an array of the entries in the table with converted values. + conversion_state state; + state.convert_value = convert_value; + state.vtable = vtable; + state.num_entries = 0; + state.entries = gpr_malloc(sizeof(grpc_mdstr_hash_table_entry) * + grpc_mdstr_hash_table_num_entries(table)); + grpc_mdstr_hash_table_iterate(table, convert_entry, &state); + // Create a new table based on the array we just constructed. + grpc_mdstr_hash_table* new_table = + grpc_mdstr_hash_table_create(state.num_entries, state.entries); + // Clean up the array. + for (size_t i = 0; i < state.num_entries; ++i) { + GRPC_MDSTR_UNREF(state.entries[i].key); + vtable->destroy_value(state.entries[i].value); + } + gpr_free(state.entries); + // Return the new table. + return new_table; +} diff --git a/src/core/ext/client_config/method_config.h b/src/core/ext/client_config/method_config.h index 1302ac425d..87c72ec064 100644 --- a/src/core/ext/client_config/method_config.h +++ b/src/core/ext/client_config/method_config.h @@ -106,11 +106,23 @@ int grpc_method_config_table_cmp(const grpc_method_config_table* table1, /// the form "/service/method". /// Returns NULL if the method has no config. /// Caller does NOT own a reference to the result. -grpc_method_config* grpc_method_config_table_get_method_config( - const grpc_method_config_table* table, const grpc_mdstr* path); +/// +/// Note: This returns a void* instead of a grpc_method_config* so that +/// it can also be used for tables constructed via +/// grpc_method_config_table_convert(). +void* grpc_method_config_table_get(const grpc_mdstr_hash_table* table, + const grpc_mdstr* path); /// Returns a channel arg containing \a table. grpc_arg grpc_method_config_table_create_channel_arg( grpc_method_config_table* table); +/// Generates a new table from \a table whose values are converted to a +/// new form via the \a convert_value function. The new table will use +/// \a vtable for its values. +grpc_mdstr_hash_table* grpc_method_config_table_convert( + const grpc_method_config_table* table, + void* (*convert_value)(const grpc_method_config* method_config), + const grpc_mdstr_hash_table_vtable* vtable); + #endif /* GRPC_CORE_EXT_CLIENT_CONFIG_METHOD_CONFIG_H */ diff --git a/src/core/lib/channel/message_size_filter.c b/src/core/lib/channel/message_size_filter.c index 1382f19945..c402cf78a3 100644 --- a/src/core/lib/channel/message_size_filter.c +++ b/src/core/lib/channel/message_size_filter.c @@ -45,6 +45,44 @@ // The protobuf library will (by default) start warning at 100 megs. #define DEFAULT_MAX_RECV_MESSAGE_LENGTH (4 * 1024 * 1024) +typedef struct message_size_limits { + int max_send_size; + int max_recv_size; +} message_size_limits; + +static void* message_size_limits_copy(void* value) { + void* new_value = gpr_malloc(sizeof(message_size_limits)); + memcpy(new_value, value, sizeof(message_size_limits)); + return new_value; +} + +static int message_size_limits_cmp(void* value1, void* value2) { + const message_size_limits* v1 = value1; + const message_size_limits* v2 = value2; + if (v1->max_send_size > v2->max_send_size) return 1; + if (v1->max_send_size < v2->max_send_size) return -1; + if (v1->max_recv_size > v2->max_recv_size) return 1; + if (v1->max_recv_size < v2->max_recv_size) return -1; + return 0; +} + +static const grpc_mdstr_hash_table_vtable message_size_limits_vtable = { + gpr_free, message_size_limits_copy, message_size_limits_cmp}; + +static void* method_config_convert_value( + const grpc_method_config* method_config) { + message_size_limits* value = gpr_malloc(sizeof(message_size_limits)); + const int32_t* max_request_message_bytes = + grpc_method_config_get_max_request_message_bytes(method_config); + value->max_send_size = + max_request_message_bytes != NULL ? *max_request_message_bytes : -1; + const int32_t* max_response_message_bytes = + grpc_method_config_get_max_response_message_bytes(method_config); + value->max_recv_size = + max_response_message_bytes != NULL ? *max_response_message_bytes : -1; + return value; +} + typedef struct call_data { int max_send_size; int max_recv_size; @@ -61,8 +99,8 @@ typedef struct call_data { typedef struct channel_data { int max_send_size; int max_recv_size; - // Method config table. - grpc_method_config_table* method_config_table; + // Maps path names to message_size_limits structs. + grpc_mdstr_hash_table* method_limit_table; } channel_data; // Callback invoked when we receive a message. Here we check the max @@ -132,24 +170,19 @@ static grpc_error* init_call_elem(grpc_exec_ctx* exec_ctx, // size to the receive limit. calld->max_send_size = chand->max_send_size; calld->max_recv_size = chand->max_recv_size; - if (chand->method_config_table != NULL) { - grpc_method_config* method_config = - grpc_method_config_table_get_method_config(chand->method_config_table, - args->path); - if (method_config != NULL) { - const int32_t* max_request_message_bytes = - grpc_method_config_get_max_request_message_bytes(method_config); - if (max_request_message_bytes != NULL && - (*max_request_message_bytes < calld->max_send_size || + if (chand->method_limit_table != NULL) { + message_size_limits* limits = + grpc_method_config_table_get(chand->method_limit_table, args->path); + if (limits != NULL) { + if (limits->max_send_size >= 0 && + (limits->max_send_size < calld->max_send_size || calld->max_send_size < 0)) { - calld->max_send_size = *max_request_message_bytes; + calld->max_send_size = limits->max_send_size; } - const int32_t* max_response_message_bytes = - grpc_method_config_get_max_response_message_bytes(method_config); - if (max_response_message_bytes != NULL && - (*max_response_message_bytes < calld->max_recv_size || + if (limits->max_recv_size >= 0 && + (limits->max_recv_size < calld->max_recv_size || calld->max_recv_size < 0)) { - calld->max_recv_size = *max_response_message_bytes; + calld->max_recv_size = limits->max_recv_size; } } } @@ -191,8 +224,9 @@ static void init_channel_elem(grpc_exec_ctx* exec_ctx, grpc_channel_args_find(args->channel_args, GRPC_ARG_SERVICE_CONFIG); if (channel_arg != NULL) { GPR_ASSERT(channel_arg->type == GRPC_ARG_POINTER); - chand->method_config_table = grpc_method_config_table_ref( - (grpc_method_config_table*)channel_arg->value.pointer.p); + chand->method_limit_table = grpc_method_config_table_convert( + (grpc_method_config_table*)channel_arg->value.pointer.p, + method_config_convert_value, &message_size_limits_vtable); } } @@ -200,7 +234,7 @@ static void init_channel_elem(grpc_exec_ctx* exec_ctx, static void destroy_channel_elem(grpc_exec_ctx* exec_ctx, grpc_channel_element* elem) { channel_data* chand = elem->channel_data; - grpc_method_config_table_unref(chand->method_config_table); + grpc_mdstr_hash_table_unref(chand->method_limit_table); } const grpc_channel_filter grpc_message_size_filter = { diff --git a/src/core/lib/transport/mdstr_hash_table.c b/src/core/lib/transport/mdstr_hash_table.c index 4be0536dd7..30968e91ff 100644 --- a/src/core/lib/transport/mdstr_hash_table.c +++ b/src/core/lib/transport/mdstr_hash_table.c @@ -42,6 +42,7 @@ struct grpc_mdstr_hash_table { gpr_refcount refs; size_t num_entries; + size_t size; grpc_mdstr_hash_table_entry* entries; }; @@ -50,13 +51,13 @@ struct grpc_mdstr_hash_table { static size_t grpc_mdstr_hash_table_find_index( const grpc_mdstr_hash_table* table, const grpc_mdstr* key, bool find_empty) { - for (size_t i = 0; i < table->num_entries; ++i) { - const size_t idx = (key->hash + i * i) % table->num_entries; + for (size_t i = 0; i < table->size; ++i) { + const size_t idx = (key->hash + i * i) % table->size; if (table->entries[idx].key == NULL) - return find_empty ? idx : table->num_entries; + return find_empty ? idx : table->size; if (table->entries[idx].key == key) return idx; } - return table->num_entries; // Not found. + return table->size; // Not found. } static void grpc_mdstr_hash_table_add( @@ -65,7 +66,7 @@ static void grpc_mdstr_hash_table_add( GPR_ASSERT(value != NULL); const size_t idx = grpc_mdstr_hash_table_find_index(table, key, true /* find_empty */); - GPR_ASSERT(idx != table->num_entries); // Table should never be full. + GPR_ASSERT(idx != table->size); // Table should never be full. grpc_mdstr_hash_table_entry* entry = &table->entries[idx]; entry->key = GRPC_MDSTR_REF(key); entry->value = vtable->copy_value(value); @@ -77,11 +78,12 @@ grpc_mdstr_hash_table* grpc_mdstr_hash_table_create( grpc_mdstr_hash_table* table = gpr_malloc(sizeof(*table)); memset(table, 0, sizeof(*table)); gpr_ref_init(&table->refs, 1); + table->num_entries = num_entries; // Quadratic probing gets best performance when the table is no more // than half full. - table->num_entries = num_entries * 2; + table->size = num_entries * 2; const size_t entry_size = - sizeof(grpc_mdstr_hash_table_entry) * table->num_entries; + sizeof(grpc_mdstr_hash_table_entry) * table->size; table->entries = gpr_malloc(entry_size); memset(table->entries, 0, entry_size); for (size_t i = 0; i < num_entries; ++i) { @@ -98,7 +100,7 @@ grpc_mdstr_hash_table* grpc_mdstr_hash_table_ref(grpc_mdstr_hash_table* table) { int grpc_mdstr_hash_table_unref(grpc_mdstr_hash_table* table) { if (table != NULL && gpr_unref(&table->refs)) { - for (size_t i = 0; i < table->num_entries; ++i) { + for (size_t i = 0; i < table->size; ++i) { grpc_mdstr_hash_table_entry* entry = &table->entries[i]; if (entry->key != NULL) { GRPC_MDSTR_UNREF(entry->key); @@ -112,11 +114,15 @@ int grpc_mdstr_hash_table_unref(grpc_mdstr_hash_table* table) { return 0; } +size_t grpc_mdstr_hash_table_num_entries(const grpc_mdstr_hash_table* table) { + return table->num_entries; +} + void* grpc_mdstr_hash_table_get(const grpc_mdstr_hash_table* table, const grpc_mdstr* key) { const size_t idx = grpc_mdstr_hash_table_find_index(table, key, false /* find_empty */); - if (idx == table->num_entries) return NULL; // Not found. + if (idx == table->size) return NULL; // Not found. return table->entries[idx].value; } @@ -140,3 +146,14 @@ int grpc_mdstr_hash_table_cmp(const grpc_mdstr_hash_table* table1, } return 0; } + +void grpc_mdstr_hash_table_iterate( + const grpc_mdstr_hash_table* table, + void (*func)(const grpc_mdstr_hash_table_entry* entry, void* user_data), + void* user_data) { + for (size_t i = 0; i < table->size; ++i) { + if (table->entries[i].key != NULL) { + func(&table->entries[i], user_data); + } + } +} diff --git a/src/core/lib/transport/mdstr_hash_table.h b/src/core/lib/transport/mdstr_hash_table.h index 52e5b023db..bceb4df93d 100644 --- a/src/core/lib/transport/mdstr_hash_table.h +++ b/src/core/lib/transport/mdstr_hash_table.h @@ -70,6 +70,9 @@ grpc_mdstr_hash_table* grpc_mdstr_hash_table_ref(grpc_mdstr_hash_table* table); /** Returns 1 when \a table is destroyed. */ int grpc_mdstr_hash_table_unref(grpc_mdstr_hash_table* table); +/** Returns the number of entries in \a table. */ +size_t grpc_mdstr_hash_table_num_entries(const grpc_mdstr_hash_table* table); + /** Returns the value from \a table associated with \a key. Returns NULL if \a key is not found. */ void* grpc_mdstr_hash_table_get(const grpc_mdstr_hash_table* table, @@ -80,4 +83,10 @@ void* grpc_mdstr_hash_table_get(const grpc_mdstr_hash_table* table, int grpc_mdstr_hash_table_cmp(const grpc_mdstr_hash_table* table1, const grpc_mdstr_hash_table* table2); +/** Iterates over the entries in \a table, calling \a func for each entry. */ +void grpc_mdstr_hash_table_iterate( + const grpc_mdstr_hash_table* table, + void (*func)(const grpc_mdstr_hash_table_entry* entry, void* user_data), + void* user_data); + #endif /* GRPC_CORE_LIB_TRANSPORT_MDSTR_HASH_TABLE_H */ -- cgit v1.2.3 From 7433e5d12c3d9697ef2bf401fe52e7c7af7c5ca8 Mon Sep 17 00:00:00 2001 From: Robbie Shade Date: Thu, 20 Oct 2016 16:23:16 -0400 Subject: clang format --- src/core/lib/iomgr/udp_server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/udp_server.c b/src/core/lib/iomgr/udp_server.c index 9c842db04b..20eae7cbdd 100644 --- a/src/core/lib/iomgr/udp_server.c +++ b/src/core/lib/iomgr/udp_server.c @@ -193,7 +193,7 @@ static void deactivated_all_ports(grpc_exec_ctx *exec_ctx, grpc_udp_server *s) { void grpc_udp_server_destroy(grpc_exec_ctx *exec_ctx, grpc_udp_server *s, grpc_closure *on_done) { - grpc_udp_listener* sp; + grpc_udp_listener *sp; gpr_mu_lock(&s->mu); GPR_ASSERT(!s->shutdown); @@ -347,7 +347,7 @@ static int add_socket_to_server(grpc_udp_server *s, int fd, int grpc_udp_server_add_port(grpc_udp_server *s, const void *addr, size_t addr_len, grpc_udp_server_read_cb read_cb, grpc_udp_server_orphan_cb orphan_cb) { - grpc_udp_listener* sp; + grpc_udp_listener *sp; int allocated_port1 = -1; int allocated_port2 = -1; int fd; -- cgit v1.2.3 From 6c7b6bfff1937f1be0d0d49fc67d03fc408059b0 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 20 Oct 2016 15:03:38 -0700 Subject: Add pid controller --- src/core/lib/transport/pid_controller.c | 57 +++++++++++++++++++++++++++++++++ src/core/lib/transport/pid_controller.h | 53 ++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+) create mode 100644 src/core/lib/transport/pid_controller.c create mode 100644 src/core/lib/transport/pid_controller.h (limited to 'src/core/lib') diff --git a/src/core/lib/transport/pid_controller.c b/src/core/lib/transport/pid_controller.c new file mode 100644 index 0000000000..a661116916 --- /dev/null +++ b/src/core/lib/transport/pid_controller.c @@ -0,0 +1,57 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include "src/core/lib/transport/pid_controller.h" + +void grpc_pid_controller_init(grpc_pid_controller *pid_controller, + double gain_p, double gain_i, double gain_d) { + pid_controller->gain_p = gain_p; + pid_controller->gain_i = gain_i; + pid_controller->gain_d = gain_d; + grpc_pid_controller_reset(pid_controller); +} + +void grpc_pid_controller_reset(grpc_pid_controller *pid_controller) { + pid_controller->last_error = 0.0; + pid_controller->error_integral = 0.0; +} + +double grpc_pid_controller_update(grpc_pid_controller *pid_controller, + double error, double dt) { + pid_controller->error_integral += error * dt; + double diff_error = (error - pid_controller->last_error) / dt; + pid_controller->last_error = error; + return pid_controller->gain_p * error + + pid_controller->gain_i * pid_controller->error_integral + + pid_controller->gain_d * diff_error; +} diff --git a/src/core/lib/transport/pid_controller.h b/src/core/lib/transport/pid_controller.h new file mode 100644 index 0000000000..aa3d0a77f7 --- /dev/null +++ b/src/core/lib/transport/pid_controller.h @@ -0,0 +1,53 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#ifndef GRPC_CORE_LIB_TRANSPORT_PID_CONTROLLER_H +#define GRPC_CORE_LIB_TRANSPORT_PID_CONTROLLER_H + +typedef struct { + double gain_p; + double gain_i; + double gain_d; + double last_error; + double error_integral; +} grpc_pid_controller; + +void grpc_pid_controller_init(grpc_pid_controller *pid_controller, + double gain_p, double gain_i, double gain_d); + +void grpc_pid_controller_reset(grpc_pid_controller *pid_controller); + +double grpc_pid_controller_update(grpc_pid_controller *pid_controller, + double error, double dt); + +#endif -- cgit v1.2.3 From dd2fa6482a945c17eba4c37ff42a8af0e9c4fa26 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 20 Oct 2016 15:46:32 -0700 Subject: Add pid controller test --- BUILD | 8 + CMakeLists.txt | 3 + Makefile | 40 +++++ binding.gyp | 1 + build.yaml | 12 ++ config.m4 | 1 + gRPC-Core.podspec | 3 + grpc.gemspec | 2 + package.xml | 2 + src/core/lib/transport/pid_controller.c | 6 +- src/python/grpcio/grpc_core_dependencies.py | 1 + test/core/transport/pid_controller_test.c | 77 ++++++++ tools/doxygen/Doxyfile.core.internal | 2 + tools/run_tests/sources_and_headers.json | 20 +++ tools/run_tests/tests.json | 21 +++ vsprojects/buildtests_c.sln | 27 +++ vsprojects/vcxproj/grpc/grpc.vcxproj | 3 + vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 6 + .../vcxproj/grpc_test_util/grpc_test_util.vcxproj | 3 + .../grpc_test_util/grpc_test_util.vcxproj.filters | 6 + .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 3 + .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 6 + .../transport_pid_controller_test.vcxproj | 199 +++++++++++++++++++++ .../transport_pid_controller_test.vcxproj.filters | 21 +++ 24 files changed, 470 insertions(+), 3 deletions(-) create mode 100644 test/core/transport/pid_controller_test.c create mode 100644 vsprojects/vcxproj/test/transport_pid_controller_test/transport_pid_controller_test.vcxproj create mode 100644 vsprojects/vcxproj/test/transport_pid_controller_test/transport_pid_controller_test.vcxproj.filters (limited to 'src/core/lib') diff --git a/BUILD b/BUILD index 5c4333463c..fc436fde10 100644 --- a/BUILD +++ b/BUILD @@ -242,6 +242,7 @@ cc_library( "src/core/lib/transport/mdstr_hash_table.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/pid_controller.h", "src/core/lib/transport/static_metadata.h", "src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/transport.h", @@ -414,6 +415,7 @@ cc_library( "src/core/lib/transport/mdstr_hash_table.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/static_metadata.c", "src/core/lib/transport/timeout_encoding.c", "src/core/lib/transport/transport.c", @@ -647,6 +649,7 @@ cc_library( "src/core/lib/transport/mdstr_hash_table.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/pid_controller.h", "src/core/lib/transport/static_metadata.h", "src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/transport.h", @@ -804,6 +807,7 @@ cc_library( "src/core/lib/transport/mdstr_hash_table.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/static_metadata.c", "src/core/lib/transport/timeout_encoding.c", "src/core/lib/transport/transport.c", @@ -1007,6 +1011,7 @@ cc_library( "src/core/lib/transport/mdstr_hash_table.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/pid_controller.h", "src/core/lib/transport/static_metadata.h", "src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/transport.h", @@ -1156,6 +1161,7 @@ cc_library( "src/core/lib/transport/mdstr_hash_table.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/static_metadata.c", "src/core/lib/transport/timeout_encoding.c", "src/core/lib/transport/transport.c", @@ -1921,6 +1927,7 @@ objc_library( "src/core/lib/transport/mdstr_hash_table.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/static_metadata.c", "src/core/lib/transport/timeout_encoding.c", "src/core/lib/transport/transport.c", @@ -2133,6 +2140,7 @@ objc_library( "src/core/lib/transport/mdstr_hash_table.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/pid_controller.h", "src/core/lib/transport/static_metadata.h", "src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/transport.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 893aac36fb..95505a68df 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -379,6 +379,7 @@ add_library(grpc src/core/lib/transport/mdstr_hash_table.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/static_metadata.c src/core/lib/transport/timeout_encoding.c src/core/lib/transport/transport.c @@ -640,6 +641,7 @@ add_library(grpc_cronet src/core/lib/transport/mdstr_hash_table.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/static_metadata.c src/core/lib/transport/timeout_encoding.c src/core/lib/transport/transport.c @@ -873,6 +875,7 @@ add_library(grpc_unsecure src/core/lib/transport/mdstr_hash_table.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/static_metadata.c src/core/lib/transport/timeout_encoding.c src/core/lib/transport/transport.c diff --git a/Makefile b/Makefile index 38be9e658c..7325a970e4 100644 --- a/Makefile +++ b/Makefile @@ -1021,6 +1021,7 @@ timer_heap_test: $(BINDIR)/$(CONFIG)/timer_heap_test timer_list_test: $(BINDIR)/$(CONFIG)/timer_list_test transport_connectivity_state_test: $(BINDIR)/$(CONFIG)/transport_connectivity_state_test transport_metadata_test: $(BINDIR)/$(CONFIG)/transport_metadata_test +transport_pid_controller_test: $(BINDIR)/$(CONFIG)/transport_pid_controller_test transport_security_test: $(BINDIR)/$(CONFIG)/transport_security_test udp_server_test: $(BINDIR)/$(CONFIG)/udp_server_test uri_fuzzer_test: $(BINDIR)/$(CONFIG)/uri_fuzzer_test @@ -1341,6 +1342,7 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/timer_list_test \ $(BINDIR)/$(CONFIG)/transport_connectivity_state_test \ $(BINDIR)/$(CONFIG)/transport_metadata_test \ + $(BINDIR)/$(CONFIG)/transport_pid_controller_test \ $(BINDIR)/$(CONFIG)/transport_security_test \ $(BINDIR)/$(CONFIG)/udp_server_test \ $(BINDIR)/$(CONFIG)/uri_parser_test \ @@ -1741,6 +1743,8 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/transport_connectivity_state_test || ( echo test transport_connectivity_state_test failed ; exit 1 ) $(E) "[RUN] Testing transport_metadata_test" $(Q) $(BINDIR)/$(CONFIG)/transport_metadata_test || ( echo test transport_metadata_test failed ; exit 1 ) + $(E) "[RUN] Testing transport_pid_controller_test" + $(Q) $(BINDIR)/$(CONFIG)/transport_pid_controller_test || ( echo test transport_pid_controller_test failed ; exit 1 ) $(E) "[RUN] Testing transport_security_test" $(Q) $(BINDIR)/$(CONFIG)/transport_security_test || ( echo test transport_security_test failed ; exit 1 ) $(E) "[RUN] Testing udp_server_test" @@ -2636,6 +2640,7 @@ LIBGRPC_SRC = \ src/core/lib/transport/mdstr_hash_table.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/static_metadata.c \ src/core/lib/transport/timeout_encoding.c \ src/core/lib/transport/transport.c \ @@ -2915,6 +2920,7 @@ LIBGRPC_CRONET_SRC = \ src/core/lib/transport/mdstr_hash_table.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/static_metadata.c \ src/core/lib/transport/timeout_encoding.c \ src/core/lib/transport/transport.c \ @@ -3184,6 +3190,7 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/lib/transport/mdstr_hash_table.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/static_metadata.c \ src/core/lib/transport/timeout_encoding.c \ src/core/lib/transport/transport.c \ @@ -3379,6 +3386,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/transport/mdstr_hash_table.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/static_metadata.c \ src/core/lib/transport/timeout_encoding.c \ src/core/lib/transport/transport.c \ @@ -10698,6 +10706,38 @@ endif endif +TRANSPORT_PID_CONTROLLER_TEST_SRC = \ + test/core/transport/pid_controller_test.c \ + +TRANSPORT_PID_CONTROLLER_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(TRANSPORT_PID_CONTROLLER_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/transport_pid_controller_test: openssl_dep_error + +else + + + +$(BINDIR)/$(CONFIG)/transport_pid_controller_test: $(TRANSPORT_PID_CONTROLLER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(TRANSPORT_PID_CONTROLLER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/transport_pid_controller_test + +endif + +$(OBJDIR)/$(CONFIG)/test/core/transport/pid_controller_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_transport_pid_controller_test: $(TRANSPORT_PID_CONTROLLER_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(TRANSPORT_PID_CONTROLLER_TEST_OBJS:.o=.dep) +endif +endif + + TRANSPORT_SECURITY_TEST_SRC = \ test/core/tsi/transport_security_test.c \ diff --git a/binding.gyp b/binding.gyp index 397bb1b639..c6c08e260b 100644 --- a/binding.gyp +++ b/binding.gyp @@ -654,6 +654,7 @@ 'src/core/lib/transport/mdstr_hash_table.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/static_metadata.c', 'src/core/lib/transport/timeout_encoding.c', 'src/core/lib/transport/transport.c', diff --git a/build.yaml b/build.yaml index 2a06653103..73fb2b0bab 100644 --- a/build.yaml +++ b/build.yaml @@ -246,6 +246,7 @@ filegroups: - src/core/lib/transport/mdstr_hash_table.h - src/core/lib/transport/metadata.h - src/core/lib/transport/metadata_batch.h + - src/core/lib/transport/pid_controller.h - src/core/lib/transport/static_metadata.h - src/core/lib/transport/timeout_encoding.h - src/core/lib/transport/transport.h @@ -340,6 +341,7 @@ filegroups: - src/core/lib/transport/mdstr_hash_table.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/static_metadata.c - src/core/lib/transport/timeout_encoding.c - src/core/lib/transport/transport.c @@ -2554,6 +2556,16 @@ targets: - grpc - gpr_test_util - gpr +- name: transport_pid_controller_test + build: test + language: c + src: + - test/core/transport/pid_controller_test.c + deps: + - grpc_test_util + - grpc + - gpr_test_util + - gpr - name: transport_security_test build: test language: c diff --git a/config.m4 b/config.m4 index d8716753b6..1c6dc4aa24 100644 --- a/config.m4 +++ b/config.m4 @@ -173,6 +173,7 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/transport/mdstr_hash_table.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/static_metadata.c \ src/core/lib/transport/timeout_encoding.c \ src/core/lib/transport/transport.c \ diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index bb1bbc5f0e..17618bc175 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -329,6 +329,7 @@ Pod::Spec.new do |s| 'src/core/lib/transport/mdstr_hash_table.h', 'src/core/lib/transport/metadata.h', 'src/core/lib/transport/metadata_batch.h', + 'src/core/lib/transport/pid_controller.h', 'src/core/lib/transport/static_metadata.h', 'src/core/lib/transport/timeout_encoding.h', 'src/core/lib/transport/transport.h', @@ -505,6 +506,7 @@ Pod::Spec.new do |s| 'src/core/lib/transport/mdstr_hash_table.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/static_metadata.c', 'src/core/lib/transport/timeout_encoding.c', 'src/core/lib/transport/transport.c', @@ -706,6 +708,7 @@ Pod::Spec.new do |s| 'src/core/lib/transport/mdstr_hash_table.h', 'src/core/lib/transport/metadata.h', 'src/core/lib/transport/metadata_batch.h', + 'src/core/lib/transport/pid_controller.h', 'src/core/lib/transport/static_metadata.h', 'src/core/lib/transport/timeout_encoding.h', 'src/core/lib/transport/transport.h', diff --git a/grpc.gemspec b/grpc.gemspec index 85172922cc..c114157062 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -249,6 +249,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/transport/mdstr_hash_table.h ) s.files += %w( src/core/lib/transport/metadata.h ) s.files += %w( src/core/lib/transport/metadata_batch.h ) + s.files += %w( src/core/lib/transport/pid_controller.h ) s.files += %w( src/core/lib/transport/static_metadata.h ) s.files += %w( src/core/lib/transport/timeout_encoding.h ) s.files += %w( src/core/lib/transport/transport.h ) @@ -425,6 +426,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/transport/mdstr_hash_table.c ) s.files += %w( src/core/lib/transport/metadata.c ) s.files += %w( src/core/lib/transport/metadata_batch.c ) + s.files += %w( src/core/lib/transport/pid_controller.c ) s.files += %w( src/core/lib/transport/static_metadata.c ) s.files += %w( src/core/lib/transport/timeout_encoding.c ) s.files += %w( src/core/lib/transport/transport.c ) diff --git a/package.xml b/package.xml index 31a2822a75..23a6f06fec 100644 --- a/package.xml +++ b/package.xml @@ -256,6 +256,7 @@ + @@ -432,6 +433,7 @@ + diff --git a/src/core/lib/transport/pid_controller.c b/src/core/lib/transport/pid_controller.c index a661116916..3cef225d4b 100644 --- a/src/core/lib/transport/pid_controller.c +++ b/src/core/lib/transport/pid_controller.c @@ -51,7 +51,7 @@ double grpc_pid_controller_update(grpc_pid_controller *pid_controller, pid_controller->error_integral += error * dt; double diff_error = (error - pid_controller->last_error) / dt; pid_controller->last_error = error; - return pid_controller->gain_p * error + - pid_controller->gain_i * pid_controller->error_integral + - pid_controller->gain_d * diff_error; + return dt * (pid_controller->gain_p * error + + pid_controller->gain_i * pid_controller->error_integral + + pid_controller->gain_d * diff_error); } diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index a40edfb090..015f774326 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -167,6 +167,7 @@ CORE_SOURCE_FILES = [ 'src/core/lib/transport/mdstr_hash_table.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/static_metadata.c', 'src/core/lib/transport/timeout_encoding.c', 'src/core/lib/transport/transport.c', diff --git a/test/core/transport/pid_controller_test.c b/test/core/transport/pid_controller_test.c new file mode 100644 index 0000000000..9614983b00 --- /dev/null +++ b/test/core/transport/pid_controller_test.c @@ -0,0 +1,77 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include "src/core/lib/transport/pid_controller.h" + +#include + +#include +#include +#include +#include +#include "src/core/lib/support/string.h" +#include "test/core/util/test_config.h" + +static void test_noop(void) { + gpr_log(GPR_INFO, "test_noop"); + grpc_pid_controller pid; + grpc_pid_controller_init(&pid, 1, 1, 1); +} + +static void test_simple_convergence(double gain_p, double gain_i, double gain_d, + double dt, double set_point, double start) { + gpr_log(GPR_INFO, + "test_simple_convergence(p=%lf, i=%lf, d=%lf); dt=%lf set_point=%lf " + "start=%lf", + gain_p, gain_i, gain_d, dt, set_point, start); + grpc_pid_controller pid; + grpc_pid_controller_init(&pid, 0.2, 0.1, 0.1); + + double current = start; + + for (int i = 0; i < 1000; i++) { + current += grpc_pid_controller_update(&pid, set_point - current, 1); + } + + GPR_ASSERT(fabs(set_point - current) < 0.1); + GPR_ASSERT(fabs(pid.error_integral) < 0.1); +} + +int main(int argc, char **argv) { + grpc_test_init(argc, argv); + test_noop(); + test_simple_convergence(0.2, 0, 0, 1, 100, 0); + test_simple_convergence(0.2, 0.1, 0, 1, 100, 0); + test_simple_convergence(0.2, 0.1, 0.1, 1, 100, 0); + return 0; +} diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index e5c91cbb13..2cc0468802 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -866,6 +866,7 @@ src/core/lib/transport/connectivity_state.h \ src/core/lib/transport/mdstr_hash_table.h \ src/core/lib/transport/metadata.h \ src/core/lib/transport/metadata_batch.h \ +src/core/lib/transport/pid_controller.h \ src/core/lib/transport/static_metadata.h \ src/core/lib/transport/timeout_encoding.h \ src/core/lib/transport/transport.h \ @@ -1042,6 +1043,7 @@ src/core/lib/transport/connectivity_state.c \ src/core/lib/transport/mdstr_hash_table.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/static_metadata.c \ src/core/lib/transport/timeout_encoding.c \ src/core/lib/transport/transport.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 7cfb1d4c17..df000be0e0 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -2011,6 +2011,23 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "is_filegroup": false, + "language": "c", + "name": "transport_pid_controller_test", + "src": [ + "test/core/transport/pid_controller_test.c" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "gpr", @@ -6519,6 +6536,7 @@ "src/core/lib/transport/mdstr_hash_table.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/pid_controller.h", "src/core/lib/transport/static_metadata.h", "src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/transport.h", @@ -6704,6 +6722,8 @@ "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/static_metadata.c", "src/core/lib/transport/static_metadata.h", "src/core/lib/transport/timeout_encoding.c", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index d831d6df0c..ec07eceec7 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -2002,6 +2002,27 @@ "windows" ] }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "gtest": false, + "language": "c", + "name": "transport_pid_controller_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "args": [], "ci_platforms": [ diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index 339b42f9d7..265179d7e7 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -1507,6 +1507,17 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "transport_metadata_test", " {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "transport_pid_controller_test", "vcxproj\test\transport_pid_controller_test\transport_pid_controller_test.vcxproj", "{B8790A2E-1106-2510-9D95-32C1D68E72EE}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unknown_frame_bad_client_test", "vcxproj\test\unknown_frame_bad_client_test\unknown_frame_bad_client_test.vcxproj", "{9E0A2239-20D5-DB2D-CA0D-69F24E3416E7}" ProjectSection(myProperties) = preProject lib = "False" @@ -3810,6 +3821,22 @@ Global {89A119C5-0F62-33B8-5D08-1FAA29DA7DEB}.Release-DLL|Win32.Build.0 = Release|Win32 {89A119C5-0F62-33B8-5D08-1FAA29DA7DEB}.Release-DLL|x64.ActiveCfg = Release|x64 {89A119C5-0F62-33B8-5D08-1FAA29DA7DEB}.Release-DLL|x64.Build.0 = Release|x64 + {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Debug|Win32.ActiveCfg = Debug|Win32 + {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Debug|x64.ActiveCfg = Debug|x64 + {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Release|Win32.ActiveCfg = Release|Win32 + {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Release|x64.ActiveCfg = Release|x64 + {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Debug|Win32.Build.0 = Debug|Win32 + {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Debug|x64.Build.0 = Debug|x64 + {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Release|Win32.Build.0 = Release|Win32 + {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Release|x64.Build.0 = Release|x64 + {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Debug-DLL|x64.Build.0 = Debug|x64 + {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Release-DLL|Win32.Build.0 = Release|Win32 + {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Release-DLL|x64.ActiveCfg = Release|x64 + {B8790A2E-1106-2510-9D95-32C1D68E72EE}.Release-DLL|x64.Build.0 = Release|x64 {9E0A2239-20D5-DB2D-CA0D-69F24E3416E7}.Debug|Win32.ActiveCfg = Debug|Win32 {9E0A2239-20D5-DB2D-CA0D-69F24E3416E7}.Debug|x64.ActiveCfg = Debug|x64 {9E0A2239-20D5-DB2D-CA0D-69F24E3416E7}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index b8c0049db5..4ce0487981 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -375,6 +375,7 @@ + @@ -643,6 +644,8 @@ + + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index fb1f904811..d00d223638 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -271,6 +271,9 @@ src\core\lib\transport + + src\core\lib\transport + src\core\lib\transport @@ -914,6 +917,9 @@ src\core\lib\transport + + src\core\lib\transport + src\core\lib\transport diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index eb3a94df64..eab3b72155 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -268,6 +268,7 @@ + @@ -490,6 +491,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index fcc8e34db3..4da9b087fa 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -325,6 +325,9 @@ src\core\lib\transport + + src\core\lib\transport + src\core\lib\transport @@ -698,6 +701,9 @@ src\core\lib\transport + + src\core\lib\transport + src\core\lib\transport diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 519d7317ba..5cf6e2c8c3 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -365,6 +365,7 @@ + @@ -611,6 +612,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index d30df5c03d..414dedb9ff 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -274,6 +274,9 @@ src\core\lib\transport + + src\core\lib\transport + src\core\lib\transport @@ -824,6 +827,9 @@ src\core\lib\transport + + src\core\lib\transport + src\core\lib\transport diff --git a/vsprojects/vcxproj/test/transport_pid_controller_test/transport_pid_controller_test.vcxproj b/vsprojects/vcxproj/test/transport_pid_controller_test/transport_pid_controller_test.vcxproj new file mode 100644 index 0000000000..b37310d7b0 --- /dev/null +++ b/vsprojects/vcxproj/test/transport_pid_controller_test/transport_pid_controller_test.vcxproj @@ -0,0 +1,199 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {B8790A2E-1106-2510-9D95-32C1D68E72EE} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + transport_pid_controller_test + static + Debug + static + Debug + + + transport_pid_controller_test + static + Release + static + Release + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + + + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/transport_pid_controller_test/transport_pid_controller_test.vcxproj.filters b/vsprojects/vcxproj/test/transport_pid_controller_test/transport_pid_controller_test.vcxproj.filters new file mode 100644 index 0000000000..bfc3b8baf1 --- /dev/null +++ b/vsprojects/vcxproj/test/transport_pid_controller_test/transport_pid_controller_test.vcxproj.filters @@ -0,0 +1,21 @@ + + + + + test\core\transport + + + + + + {dd5fb527-8567-108a-e6d2-51380df8a82f} + + + {18437a81-c8a9-fd37-ad74-63e9ebf0eb7a} + + + {6325372c-19b9-37ab-e8ff-16554de3bb3b} + + + + -- cgit v1.2.3 From 6a30178ef2c936a8929d03a3163647882110052e Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 20 Oct 2016 15:53:53 -0700 Subject: Clang format --- src/core/lib/iomgr/workqueue_uv.c | 4 ++-- test/core/iomgr/wakeup_fd_cv_test.c | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/workqueue_uv.c b/src/core/lib/iomgr/workqueue_uv.c index 914143c081..e58ca476cc 100644 --- a/src/core/lib/iomgr/workqueue_uv.c +++ b/src/core/lib/iomgr/workqueue_uv.c @@ -45,8 +45,8 @@ void grpc_workqueue_flush(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue) {} #ifdef GRPC_WORKQUEUE_REFCOUNT_DEBUG -grpc_workqueue *grpc_workqueue_ref(grpc_workqueue *workqueue, const char *file, int line, - const char *reason) { +grpc_workqueue *grpc_workqueue_ref(grpc_workqueue *workqueue, const char *file, + int line, const char *reason) { return workqueue; } void grpc_workqueue_unref(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, diff --git a/test/core/iomgr/wakeup_fd_cv_test.c b/test/core/iomgr/wakeup_fd_cv_test.c index 96e4a31741..82452d2157 100644 --- a/test/core/iomgr/wakeup_fd_cv_test.c +++ b/test/core/iomgr/wakeup_fd_cv_test.c @@ -245,8 +245,6 @@ int main(int argc, char **argv) { #else /* GRPC_POSIX_SOCKET */ -int main(int argc, char **argv) { - return 1; -} +int main(int argc, char **argv) { return 1; } #endif /* GRPC_POSIX_SOCKET */ -- cgit v1.2.3 From 6d4340dda88f6f8771dde54e21620dc32dc4e65a Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 21 Oct 2016 08:15:51 -0700 Subject: Add documentation --- src/core/lib/transport/pid_controller.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/core/lib') diff --git a/src/core/lib/transport/pid_controller.h b/src/core/lib/transport/pid_controller.h index aa3d0a77f7..ecb9deedaa 100644 --- a/src/core/lib/transport/pid_controller.h +++ b/src/core/lib/transport/pid_controller.h @@ -34,6 +34,13 @@ #ifndef GRPC_CORE_LIB_TRANSPORT_PID_CONTROLLER_H #define GRPC_CORE_LIB_TRANSPORT_PID_CONTROLLER_H +/* \file Simple PID controller. + Implements a proportial-integral-derivative controller. + Used when we want to iteratively control a variable to converge some other + observed value to a 'set-point'. + Gains can be set to adjust sensitivity to current error (p), the integral + of error (i), and the derivative of error (d). */ + typedef struct { double gain_p; double gain_i; @@ -42,11 +49,15 @@ typedef struct { double error_integral; } grpc_pid_controller; +/** Initialize the controller */ void grpc_pid_controller_init(grpc_pid_controller *pid_controller, double gain_p, double gain_i, double gain_d); +/** Reset the controller: useful when things have changed significantly */ void grpc_pid_controller_reset(grpc_pid_controller *pid_controller); +/** Update the controller: given a current error estimate, and the time since + the last update, returns a delta to the control value */ double grpc_pid_controller_update(grpc_pid_controller *pid_controller, double error, double dt); -- cgit v1.2.3 From 153eaa7abac3a2e056f7a351dd03faf7f13b60f2 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 21 Oct 2016 13:52:36 -0700 Subject: s/BUFFER_POOL/RESOURCE_QUOTA/g --- include/grpc/impl/codegen/grpc_types.h | 2 +- src/core/lib/http/httpcli.c | 2 +- src/core/lib/iomgr/resource_quota.c | 4 ++-- src/core/lib/iomgr/tcp_client_posix.c | 3 ++- src/core/lib/iomgr/tcp_server_posix.c | 4 ++-- src/cpp/common/channel_arguments.cc | 3 ++- src/cpp/server/server_builder.cc | 2 +- test/core/end2end/tests/buffer_pool_server.c | 2 +- test/core/end2end/tests/resource_quota_server.c | 2 +- 9 files changed, 13 insertions(+), 11 deletions(-) (limited to 'src/core/lib') diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index c04c2cfa59..d2dce0d511 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -203,7 +203,7 @@ typedef struct { #define GRPC_ARG_ALLOW_REUSEPORT "grpc.so_reuseport" /** If non-zero, a pointer to a buffer pool (use grpc_resource_quota_arg_vtable to fetch an appropriate pointer arg vtable */ -#define GRPC_ARG_BUFFER_POOL "grpc.resource_quota" +#define GRPC_ARG_RESOURCE_QUOTA "grpc.resource_quota" /** Service config data, to be passed to subchannels. Not intended for external use. */ #define GRPC_ARG_SERVICE_CONFIG "grpc.service_config" diff --git a/src/core/lib/http/httpcli.c b/src/core/lib/http/httpcli.c index bdc18ac4bf..26baae1eab 100644 --- a/src/core/lib/http/httpcli.c +++ b/src/core/lib/http/httpcli.c @@ -227,7 +227,7 @@ static void next_address(grpc_exec_ctx *exec_ctx, internal_request *req, addr = &req->addresses->addrs[req->next_address++]; grpc_closure_init(&req->connected, on_connected, req); grpc_arg arg; - arg.key = GRPC_ARG_BUFFER_POOL; + arg.key = GRPC_ARG_RESOURCE_QUOTA; arg.type = GRPC_ARG_POINTER; arg.value.pointer.p = req->resource_quota; arg.value.pointer.vtable = grpc_resource_quota_arg_vtable(); diff --git a/src/core/lib/iomgr/resource_quota.c b/src/core/lib/iomgr/resource_quota.c index 89c795c0ec..6be9bb4856 100644 --- a/src/core/lib/iomgr/resource_quota.c +++ b/src/core/lib/iomgr/resource_quota.c @@ -497,12 +497,12 @@ void grpc_resource_quota_resize(grpc_resource_quota *resource_quota, grpc_resource_quota *grpc_resource_quota_from_channel_args( const grpc_channel_args *channel_args) { for (size_t i = 0; i < channel_args->num_args; i++) { - if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_BUFFER_POOL)) { + if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_RESOURCE_QUOTA)) { if (channel_args->args[i].type == GRPC_ARG_POINTER) { return grpc_resource_quota_internal_ref( channel_args->args[i].value.pointer.p); } else { - gpr_log(GPR_DEBUG, GRPC_ARG_BUFFER_POOL " should be a pointer"); + gpr_log(GPR_DEBUG, GRPC_ARG_RESOURCE_QUOTA " should be a pointer"); } } } diff --git a/src/core/lib/iomgr/tcp_client_posix.c b/src/core/lib/iomgr/tcp_client_posix.c index e74a696c2f..500c988146 100644 --- a/src/core/lib/iomgr/tcp_client_posix.c +++ b/src/core/lib/iomgr/tcp_client_posix.c @@ -134,7 +134,8 @@ grpc_endpoint *grpc_tcp_client_create_from_fd( 8 * 1024 * 1024}; tcp_read_chunk_size = (size_t)grpc_channel_arg_get_integer( &channel_args->args[i], options); - } else if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_BUFFER_POOL)) { + } else if (0 == + strcmp(channel_args->args[i].key, GRPC_ARG_RESOURCE_QUOTA)) { grpc_resource_quota_internal_unref(exec_ctx, resource_quota); resource_quota = grpc_resource_quota_internal_ref( channel_args->args[i].value.pointer.p); diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index b2eb89f429..648736caa9 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -175,7 +175,7 @@ grpc_error *grpc_tcp_server_create(grpc_exec_ctx *exec_ctx, return GRPC_ERROR_CREATE(GRPC_ARG_ALLOW_REUSEPORT " must be an integer"); } - } else if (0 == strcmp(GRPC_ARG_BUFFER_POOL, args->args[i].key)) { + } else if (0 == strcmp(GRPC_ARG_RESOURCE_QUOTA, args->args[i].key)) { if (args->args[i].type == GRPC_ARG_POINTER) { grpc_resource_quota_internal_unref(exec_ctx, s->resource_quota); s->resource_quota = @@ -183,7 +183,7 @@ grpc_error *grpc_tcp_server_create(grpc_exec_ctx *exec_ctx, } else { grpc_resource_quota_internal_unref(exec_ctx, s->resource_quota); gpr_free(s); - return GRPC_ERROR_CREATE(GRPC_ARG_BUFFER_POOL + return GRPC_ERROR_CREATE(GRPC_ARG_RESOURCE_QUOTA " must be a pointer to a buffer pool"); } } diff --git a/src/cpp/common/channel_arguments.cc b/src/cpp/common/channel_arguments.cc index 5462e0d72a..d136d49c89 100644 --- a/src/cpp/common/channel_arguments.cc +++ b/src/cpp/common/channel_arguments.cc @@ -116,7 +116,8 @@ void ChannelArguments::SetUserAgentPrefix( void ChannelArguments::SetResourceQuota( const grpc::ResourceQuota& resource_quota) { - SetPointerWithVtable(GRPC_ARG_BUFFER_POOL, resource_quota.c_resource_quota(), + SetPointerWithVtable(GRPC_ARG_RESOURCE_QUOTA, + resource_quota.c_resource_quota(), grpc_resource_quota_arg_vtable()); } diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index 68df1d11e1..953a4337ec 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -197,7 +197,7 @@ std::unique_ptr ServerBuilder::BuildAndStart() { maybe_default_compression_algorithm_.algorithm); } if (resource_quota_ != nullptr) { - args.SetPointerWithVtable(GRPC_ARG_BUFFER_POOL, resource_quota_, + args.SetPointerWithVtable(GRPC_ARG_RESOURCE_QUOTA, resource_quota_, grpc_resource_quota_arg_vtable()); } std::unique_ptr server(new Server(thread_pool.release(), true, diff --git a/test/core/end2end/tests/buffer_pool_server.c b/test/core/end2end/tests/buffer_pool_server.c index 81850aea58..beda4f7487 100644 --- a/test/core/end2end/tests/buffer_pool_server.c +++ b/test/core/end2end/tests/buffer_pool_server.c @@ -119,7 +119,7 @@ void resource_quota_server(grpc_end2end_test_config config) { #define SERVER_END_BASE_TAG 4000 grpc_arg arg; - arg.key = GRPC_ARG_BUFFER_POOL; + arg.key = GRPC_ARG_RESOURCE_QUOTA; arg.type = GRPC_ARG_POINTER; arg.value.pointer.p = resource_quota; arg.value.pointer.vtable = grpc_resource_quota_arg_vtable(); diff --git a/test/core/end2end/tests/resource_quota_server.c b/test/core/end2end/tests/resource_quota_server.c index 02fef94f67..a2431eed7e 100644 --- a/test/core/end2end/tests/resource_quota_server.c +++ b/test/core/end2end/tests/resource_quota_server.c @@ -119,7 +119,7 @@ void resource_quota_server(grpc_end2end_test_config config) { #define SERVER_END_BASE_TAG 4000 grpc_arg arg; - arg.key = GRPC_ARG_BUFFER_POOL; + arg.key = GRPC_ARG_RESOURCE_QUOTA; arg.type = GRPC_ARG_POINTER; arg.value.pointer.p = resource_quota; arg.value.pointer.vtable = grpc_resource_quota_arg_vtable(); -- cgit v1.2.3 From 5bd7be0c55d4149cc6e2d5ee90f33fe5f7f6a7de Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 21 Oct 2016 14:19:50 -0700 Subject: Change LB policies to get their input from channel args. --- src/core/ext/client_config/client_channel.c | 10 +++- src/core/ext/lb_policy/grpclb/grpclb.c | 61 +++++++++++++++++++----- src/core/ext/lb_policy/pick_first/pick_first.c | 31 ++++++++---- src/core/ext/lb_policy/round_robin/round_robin.c | 30 ++++++++---- src/core/lib/channel/channel_args.c | 55 +++++++++++++++++---- src/core/lib/channel/channel_args.h | 11 +++++ 6 files changed, 155 insertions(+), 43 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/client_config/client_channel.c b/src/core/ext/client_config/client_channel.c index d02dd5aacf..f23da5f35d 100644 --- a/src/core/ext/client_config/client_channel.c +++ b/src/core/ext/client_config/client_channel.c @@ -192,11 +192,17 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, grpc_resolver_result_get_channel_args(chand->resolver_result); lb_policy_args.client_channel_factory = chand->client_channel_factory; + // Find LB policy name. + const char *lb_policy_name = NULL; + const grpc_arg *lb_policy_name_arg = + grpc_channel_args_find(lb_policy_args.args, GRPC_ARG_LB_POLICY_NAME); + if (lb_policy_name_arg != NULL) { + GPR_ASSERT(lb_policy_name_arg->type == GRPC_ARG_STRING); + lb_policy_name = lb_policy_name_arg->value.string; + } // Special case: If all of the addresses are balancer addresses, // assume that we should use the grpclb policy, regardless of what the // resolver actually specified. - const char *lb_policy_name = - grpc_resolver_result_get_lb_policy_name(chand->resolver_result); bool found_backend_address = false; for (size_t i = 0; i < lb_policy_args.addresses->num_addresses; ++i) { if (!lb_policy_args.addresses->addresses[i].is_balancer) { diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index 1467508d6d..fdc0bec996 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -470,9 +470,17 @@ static grpc_lb_policy *create_rr_locked( args.server_name = glb_policy->server_name; args.client_channel_factory = glb_policy->cc_factory; args.addresses = process_serverlist(serverlist); - args.args = glb_policy->args; + + // Replace the LB addresses in the channel args that we pass down to + // the subchannel. + static const char* keys_to_remove[] = {GRPC_ARG_LB_ADDRESSES}; + const grpc_arg arg = grpc_lb_addresses_create_channel_arg(args.addresses); + args.args = grpc_channel_args_copy_and_add_and_remove( + glb_policy->args, keys_to_remove, GPR_ARRAY_SIZE(keys_to_remove), &arg, + 1); grpc_lb_policy *rr = grpc_lb_policy_create(exec_ctx, "round_robin", &args); + grpc_channel_args_destroy(args.args); if (glb_policy->addresses != NULL) { /* dispose of the previous version */ @@ -574,6 +582,13 @@ static void glb_rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx, grpc_lb_policy_factory *factory, grpc_lb_policy_args *args) { + /* Get server name. */ + const grpc_arg* arg = + grpc_channel_args_find(args->args, GRPC_ARG_SERVER_NAME); + const char* server_name = + arg != NULL && arg->type == GRPC_ARG_STRING + ? arg->value.string : NULL; + /* Count the number of gRPC-LB addresses. There must be at least one. * TODO(roth): For now, we ignore non-balancer addresses, but in the * future, we may change the behavior such that we fall back to using @@ -581,22 +596,25 @@ static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx, * time, this should be changed to allow a list with no balancer addresses, * since the resolver might fail to return a balancer address even when * this is the right LB policy to use. */ + arg = grpc_channel_args_find(args->args, GRPC_ARG_LB_ADDRESSES); + GPR_ASSERT(arg != NULL && arg->type == GRPC_ARG_POINTER); + grpc_lb_addresses* addresses = arg->value.pointer.p; size_t num_grpclb_addrs = 0; - for (size_t i = 0; i < args->addresses->num_addresses; ++i) { - if (args->addresses->addresses[i].is_balancer) ++num_grpclb_addrs; + for (size_t i = 0; i < addresses->num_addresses; ++i) { + if (addresses->addresses[i].is_balancer) ++num_grpclb_addrs; } if (num_grpclb_addrs == 0) return NULL; glb_lb_policy *glb_policy = gpr_malloc(sizeof(*glb_policy)); memset(glb_policy, 0, sizeof(*glb_policy)); - /* All input addresses in args->addresses come from a resolver that claims + /* All input addresses in addresses come from a resolver that claims * they are LB services. It's the resolver's responsibility to make sure * this * policy is only instantiated and used in that case. * * Create a client channel over them to communicate with a LB service */ - glb_policy->server_name = gpr_strdup(args->server_name); + glb_policy->server_name = gpr_strdup(server_name); glb_policy->cc_factory = args->client_channel_factory; glb_policy->args = grpc_channel_args_copy(args->args); GPR_ASSERT(glb_policy->cc_factory != NULL); @@ -606,20 +624,20 @@ static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx, * TODO(dgq): support mixed ip version */ char **addr_strs = gpr_malloc(sizeof(char *) * num_grpclb_addrs); size_t addr_index = 0; - for (size_t i = 0; i < args->addresses->num_addresses; i++) { - if (args->addresses->addresses[i].user_data != NULL) { + for (size_t i = 0; i < addresses->num_addresses; i++) { + if (addresses->addresses[i].user_data != NULL) { gpr_log(GPR_ERROR, "This LB policy doesn't support user data. It will be ignored"); } - if (args->addresses->addresses[i].is_balancer) { + if (addresses->addresses[i].is_balancer) { if (addr_index == 0) { addr_strs[addr_index++] = grpc_sockaddr_to_uri( - (const struct sockaddr *)&args->addresses->addresses[i] + (const struct sockaddr *)&addresses->addresses[i] .address.addr); } else { GPR_ASSERT(grpc_sockaddr_to_string( &addr_strs[addr_index++], - (const struct sockaddr *)&args->addresses->addresses[i] + (const struct sockaddr *)&addresses->addresses[i] .address.addr, true) > 0); } @@ -629,10 +647,29 @@ static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx, char *target_uri_str = gpr_strjoin_sep((const char **)addr_strs, num_grpclb_addrs, ",", &uri_path_len); - /* will pick using pick_first */ + /* Create a channel to talk to the LBs. + * + * We strip out the channel arg for the LB policy name, since we want + * to use the default (pick_first) in this case. + * + * We also strip out the channel arg for the resolved addresses, since + * that will be generated by the name resolver used in the LB channel. + * Note that the LB channel will use the sockaddr resolver, so this + * won't actually generate a query to DNS (or some other name service). + * However, the addresses returned by the sockaddr resolver will have + * is_balancer=false, whereas our own addresses have is_balancer=true. + * We need the LB channel to return addresses with is_balancer=false + * so that it does not wind up recursively using the grpclb LB policy, + * as per the special case logic in client_channel.c. + */ + static const char* keys_to_remove[] = { + GRPC_ARG_LB_POLICY_NAME, GRPC_ARG_LB_ADDRESSES}; + grpc_channel_args *new_args = grpc_channel_args_copy_and_remove( + args->args, keys_to_remove, GPR_ARRAY_SIZE(keys_to_remove)); glb_policy->lb_channel = grpc_client_channel_factory_create_channel( exec_ctx, glb_policy->cc_factory, target_uri_str, - GRPC_CLIENT_CHANNEL_TYPE_LOAD_BALANCING, args->args); + GRPC_CLIENT_CHANNEL_TYPE_LOAD_BALANCING, new_args); + grpc_channel_args_destroy(new_args); gpr_free(target_uri_str); for (size_t i = 0; i < num_grpclb_addrs; i++) { diff --git a/src/core/ext/lb_policy/pick_first/pick_first.c b/src/core/ext/lb_policy/pick_first/pick_first.c index 3683079cf4..d95f0310b6 100644 --- a/src/core/ext/lb_policy/pick_first/pick_first.c +++ b/src/core/ext/lb_policy/pick_first/pick_first.c @@ -34,7 +34,9 @@ #include #include + #include "src/core/ext/client_config/lb_policy_registry.h" +#include "src/core/lib/channel/channel_args.h" #include "src/core/lib/transport/connectivity_state.h" typedef struct pending_pick { @@ -432,14 +434,23 @@ static void pick_first_factory_unref(grpc_lb_policy_factory *factory) {} static grpc_lb_policy *create_pick_first(grpc_exec_ctx *exec_ctx, grpc_lb_policy_factory *factory, grpc_lb_policy_args *args) { - GPR_ASSERT(args->addresses != NULL); GPR_ASSERT(args->client_channel_factory != NULL); + /* Get server name. */ + const grpc_arg* arg = + grpc_channel_args_find(args->args, GRPC_ARG_SERVER_NAME); + const char* server_name = + arg != NULL && arg->type == GRPC_ARG_STRING + ? arg->value.string : NULL; + /* Find the number of backend addresses. We ignore balancer * addresses, since we don't know how to handle them. */ + arg = grpc_channel_args_find(args->args, GRPC_ARG_LB_ADDRESSES); + GPR_ASSERT(arg != NULL && arg->type == GRPC_ARG_POINTER); + grpc_lb_addresses* addresses = arg->value.pointer.p; size_t num_addrs = 0; - for (size_t i = 0; i < args->addresses->num_addresses; i++) { - if (!args->addresses->addresses[i].is_balancer) ++num_addrs; + for (size_t i = 0; i < addresses->num_addresses; i++) { + if (!addresses->addresses[i].is_balancer) ++num_addrs; } if (num_addrs == 0) return NULL; @@ -450,22 +461,22 @@ static grpc_lb_policy *create_pick_first(grpc_exec_ctx *exec_ctx, memset(p->subchannels, 0, sizeof(*p->subchannels) * num_addrs); grpc_subchannel_args sc_args; size_t subchannel_idx = 0; - for (size_t i = 0; i < args->addresses->num_addresses; i++) { + for (size_t i = 0; i < addresses->num_addresses; i++) { /* Skip balancer addresses, since we only know how to handle backends. */ - if (args->addresses->addresses[i].is_balancer) continue; + if (addresses->addresses[i].is_balancer) continue; - if (args->addresses->addresses[i].user_data != NULL) { + if (addresses->addresses[i].user_data != NULL) { gpr_log(GPR_ERROR, "This LB policy doesn't support user data. It will be ignored"); } memset(&sc_args, 0, sizeof(grpc_subchannel_args)); /* server_name will be copied as part of the subchannel creation. This makes - * the copying of args->server_name (a borrowed pointer) OK. */ - sc_args.server_name = args->server_name; + * the copying of server_name (a borrowed pointer) OK. */ + sc_args.server_name = server_name; sc_args.addr = - (struct sockaddr *)(&args->addresses->addresses[i].address.addr); - sc_args.addr_len = args->addresses->addresses[i].address.len; + (struct sockaddr *)(&addresses->addresses[i].address.addr); + sc_args.addr_len = addresses->addresses[i].address.len; sc_args.args = args->args; grpc_subchannel *subchannel = grpc_client_channel_factory_create_subchannel( diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c index 00a18974df..2deb0af99c 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -64,6 +64,7 @@ #include #include "src/core/ext/client_config/lb_policy_registry.h" +#include "src/core/lib/channel/channel_args.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/transport/connectivity_state.h" #include "src/core/lib/transport/static_metadata.h" @@ -598,14 +599,23 @@ static void round_robin_factory_unref(grpc_lb_policy_factory *factory) {} static grpc_lb_policy *round_robin_create(grpc_exec_ctx *exec_ctx, grpc_lb_policy_factory *factory, grpc_lb_policy_args *args) { - GPR_ASSERT(args->addresses != NULL); GPR_ASSERT(args->client_channel_factory != NULL); + /* Get server name. */ + const grpc_arg* arg = + grpc_channel_args_find(args->args, GRPC_ARG_SERVER_NAME); + const char* server_name = + arg != NULL && arg->type == GRPC_ARG_STRING + ? arg->value.string : NULL; + /* Find the number of backend addresses. We ignore balancer * addresses, since we don't know how to handle them. */ + arg = grpc_channel_args_find(args->args, GRPC_ARG_LB_ADDRESSES); + GPR_ASSERT(arg != NULL && arg->type == GRPC_ARG_POINTER); + grpc_lb_addresses* addresses = arg->value.pointer.p; size_t num_addrs = 0; - for (size_t i = 0; i < args->addresses->num_addresses; i++) { - if (!args->addresses->addresses[i].is_balancer) ++num_addrs; + for (size_t i = 0; i < addresses->num_addresses; i++) { + if (!addresses->addresses[i].is_balancer) ++num_addrs; } if (num_addrs == 0) return NULL; @@ -618,17 +628,17 @@ static grpc_lb_policy *round_robin_create(grpc_exec_ctx *exec_ctx, grpc_subchannel_args sc_args; size_t subchannel_idx = 0; - for (size_t i = 0; i < args->addresses->num_addresses; i++) { + for (size_t i = 0; i < addresses->num_addresses; i++) { /* Skip balancer addresses, since we only know how to handle backends. */ - if (args->addresses->addresses[i].is_balancer) continue; + if (addresses->addresses[i].is_balancer) continue; memset(&sc_args, 0, sizeof(grpc_subchannel_args)); /* server_name will be copied as part of the subchannel creation. This makes - * the copying of args->server_name (a borrowed pointer) OK. */ - sc_args.server_name = args->server_name; + * the copying of server_name (a borrowed pointer) OK. */ + sc_args.server_name = server_name; sc_args.addr = - (struct sockaddr *)(&args->addresses->addresses[i].address.addr); - sc_args.addr_len = args->addresses->addresses[i].address.len; + (struct sockaddr *)(&addresses->addresses[i].address.addr); + sc_args.addr_len = addresses->addresses[i].address.len; sc_args.args = args->args; grpc_subchannel *subchannel = grpc_client_channel_factory_create_subchannel( @@ -641,7 +651,7 @@ static grpc_lb_policy *round_robin_create(grpc_exec_ctx *exec_ctx, sd->policy = p; sd->index = subchannel_idx; sd->subchannel = subchannel; - sd->user_data = args->addresses->addresses[i].user_data; + sd->user_data = addresses->addresses[i].user_data; ++subchannel_idx; grpc_closure_init(&sd->connectivity_changed_closure, rr_connectivity_changed, sd); diff --git a/src/core/lib/channel/channel_args.c b/src/core/lib/channel/channel_args.c index 2957d2c818..0270d6f224 100644 --- a/src/core/lib/channel/channel_args.c +++ b/src/core/lib/channel/channel_args.c @@ -66,22 +66,59 @@ static grpc_arg copy_arg(const grpc_arg *src) { grpc_channel_args *grpc_channel_args_copy_and_add(const grpc_channel_args *src, const grpc_arg *to_add, size_t num_to_add) { + return grpc_channel_args_copy_and_add_and_remove(src, NULL, 0, to_add, + num_to_add); +} + +grpc_channel_args *grpc_channel_args_copy_and_remove( + const grpc_channel_args *src, const char** to_remove, + size_t num_to_remove) { + return grpc_channel_args_copy_and_add_and_remove(src, to_remove, + num_to_remove, NULL, 0); +} + +static bool should_remove_arg(const grpc_arg* arg, const char** to_remove, + size_t num_to_remove) { + for (size_t i = 0; i < num_to_remove; ++i) { + if (strcmp(arg->key, to_remove[i]) == 0) return true; + } + return false; +} + +grpc_channel_args *grpc_channel_args_copy_and_add_and_remove( + const grpc_channel_args *src, const char** to_remove, size_t num_to_remove, + const grpc_arg *to_add, size_t num_to_add) { + // Figure out how many args we'll be copying. + size_t num_args_to_copy = 0; + if (src != NULL) { + for (size_t i = 0; i < src->num_args; ++i) { + if (!should_remove_arg(&src->args[i], to_remove, num_to_remove)) { + ++num_args_to_copy; + } + } + } + // Create result. grpc_channel_args *dst = gpr_malloc(sizeof(grpc_channel_args)); - size_t i; - size_t src_num_args = (src == NULL) ? 0 : src->num_args; - if (!src && !to_add) { - dst->num_args = 0; + dst->num_args = num_args_to_copy + num_to_add; + if (dst->num_args == 0) { dst->args = NULL; return dst; } - dst->num_args = src_num_args + num_to_add; dst->args = gpr_malloc(sizeof(grpc_arg) * dst->num_args); - for (i = 0; i < src_num_args; i++) { - dst->args[i] = copy_arg(&src->args[i]); + // Copy args from src that are not being removed. + size_t dst_idx = 0; + if (src != NULL) { + for (size_t i = 0; i < src->num_args; ++i) { + if (!should_remove_arg(&src->args[i], to_remove, num_to_remove)) { + dst->args[dst_idx++] = copy_arg(&src->args[i]); + } + } } - for (i = 0; i < num_to_add; i++) { - dst->args[i + src_num_args] = copy_arg(&to_add[i]); + // Add args from to_add. + for (size_t i = 0; i < num_to_add; ++i) { + dst->args[dst_idx++] = copy_arg(&to_add[i]); } + GPR_ASSERT(dst_idx == dst->num_args); return dst; } diff --git a/src/core/lib/channel/channel_args.h b/src/core/lib/channel/channel_args.h index a80340c0fa..1508d23748 100644 --- a/src/core/lib/channel/channel_args.h +++ b/src/core/lib/channel/channel_args.h @@ -51,6 +51,17 @@ grpc_channel_args *grpc_channel_args_copy_and_add(const grpc_channel_args *src, const grpc_arg *to_add, size_t num_to_add); +/** Copies the arguments in \a src except for those whose keys are in + \a to_remove. */ +grpc_channel_args *grpc_channel_args_copy_and_remove( + const grpc_channel_args *src, const char** to_remove, size_t num_to_remove); + +/** Copies the arguments from \a src except for those whose keys are in + \a to_remove and appends the arguments in \a to_add. */ +grpc_channel_args *grpc_channel_args_copy_and_add_and_remove( + const grpc_channel_args *src, const char** to_remove, size_t num_to_remove, + const grpc_arg *to_add, size_t num_to_add); + /** Concatenate args from \a a and \a b into a new instance */ grpc_channel_args *grpc_channel_args_merge(const grpc_channel_args *a, const grpc_channel_args *b); -- cgit v1.2.3 From 3798e607cc7a947ee64124ba147ab404692b851b Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 21 Oct 2016 14:39:27 -0700 Subject: Address review comments --- .../transport/chttp2/transport/chttp2_transport.c | 6 +- src/core/lib/iomgr/resource_quota.c | 266 +++++++++++---------- src/core/lib/iomgr/resource_quota.h | 100 +++++++- src/core/lib/iomgr/tcp_client.h | 2 + test/core/end2end/gen_build_yaml.py | 2 +- test/core/iomgr/resource_quota_test.c | 2 +- 6 files changed, 233 insertions(+), 145 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index b2fdf88a87..a2668474be 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -2160,13 +2160,13 @@ static void benign_reclaimer_locked(grpc_exec_ctx *exec_ctx, void *arg, gpr_slice_from_static_string("Buffers full")); } else if (error == GRPC_ERROR_NONE && grpc_resource_quota_trace) { gpr_log(GPR_DEBUG, - "HTTP2: %s - skip benign reclaimation, there are still %" PRIdPTR + "HTTP2: %s - skip benign reclamation, there are still %" PRIdPTR " streams", t->peer_string, grpc_chttp2_stream_map_size(&t->stream_map)); } t->benign_reclaimer_registered = false; if (error != GRPC_ERROR_CANCELLED) { - grpc_resource_user_finish_reclaimation( + grpc_resource_user_finish_reclamation( exec_ctx, grpc_endpoint_get_resource_user(t->ep)); } GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "benign_reclaimer"); @@ -2192,7 +2192,7 @@ static void destructive_reclaimer_locked(grpc_exec_ctx *exec_ctx, void *arg, } } if (error != GRPC_ERROR_CANCELLED) { - grpc_resource_user_finish_reclaimation( + grpc_resource_user_finish_reclamation( exec_ctx, grpc_endpoint_get_resource_user(t->ep)); } GRPC_CHTTP2_UNREF_TRANSPORT(exec_ctx, t, "destructive_reclaimer"); diff --git a/src/core/lib/iomgr/resource_quota.c b/src/core/lib/iomgr/resource_quota.c index 6be9bb4856..5466973408 100644 --- a/src/core/lib/iomgr/resource_quota.c +++ b/src/core/lib/iomgr/resource_quota.c @@ -44,27 +44,29 @@ int grpc_resource_quota_trace = 0; -typedef bool (*bpstate_func)(grpc_exec_ctx *exec_ctx, - grpc_resource_quota *resource_quota); - -typedef struct { - grpc_resource_user *head; - grpc_resource_user *tail; -} grpc_resource_user_list; - struct grpc_resource_quota { + /* refcount */ gpr_refcount refs; + /* Master combiner lock: all activity on a quota executes under this combiner + */ grpc_combiner *combiner; + /* Size of the resource quota */ int64_t size; + /* Amount of free memory in the resource quota */ int64_t free_pool; + /* Has rq_step been scheduled to occur? */ bool step_scheduled; + /* Are we currently reclaiming memory */ bool reclaiming; - grpc_closure bpstep_closure; - grpc_closure bpreclaimation_done_closure; + /* Closure around rq_step */ + grpc_closure rq_step_closure; + /* Closure around rq_reclamation_done */ + grpc_closure rq_reclamation_done_closure; - grpc_resource_user *roots[GRPC_BULIST_COUNT]; + /* Roots of all resource user lists */ + grpc_resource_user *roots[GRPC_RULIST_COUNT]; char *name; }; @@ -73,8 +75,8 @@ struct grpc_resource_quota { * list management */ -static void bulist_add_tail(grpc_resource_user *resource_user, - grpc_bulist list) { +static void rulist_add_tail(grpc_resource_user *resource_user, + grpc_rulist list) { grpc_resource_quota *resource_quota = resource_user->resource_quota; grpc_resource_user **root = &resource_quota->roots[list]; if (*root == NULL) { @@ -89,8 +91,8 @@ static void bulist_add_tail(grpc_resource_user *resource_user, } } -static void bulist_add_head(grpc_resource_user *resource_user, - grpc_bulist list) { +static void rulist_add_head(grpc_resource_user *resource_user, + grpc_rulist list) { grpc_resource_quota *resource_quota = resource_user->resource_quota; grpc_resource_user **root = &resource_quota->roots[list]; if (*root == NULL) { @@ -106,13 +108,13 @@ static void bulist_add_head(grpc_resource_user *resource_user, } } -static bool bulist_empty(grpc_resource_quota *resource_quota, - grpc_bulist list) { +static bool rulist_empty(grpc_resource_quota *resource_quota, + grpc_rulist list) { return resource_quota->roots[list] == NULL; } -static grpc_resource_user *bulist_pop(grpc_resource_quota *resource_quota, - grpc_bulist list) { +static grpc_resource_user *rulist_pop(grpc_resource_quota *resource_quota, + grpc_rulist list) { grpc_resource_user **root = &resource_quota->roots[list]; grpc_resource_user *resource_user = *root; if (resource_user == NULL) { @@ -131,7 +133,7 @@ static grpc_resource_user *bulist_pop(grpc_resource_quota *resource_quota, return resource_user; } -static void bulist_remove(grpc_resource_user *resource_user, grpc_bulist list) { +static void rulist_remove(grpc_resource_user *resource_user, grpc_rulist list) { if (resource_user->links[list].next == NULL) return; grpc_resource_quota *resource_quota = resource_user->resource_quota; if (resource_quota->roots[list] == resource_user) { @@ -150,41 +152,41 @@ static void bulist_remove(grpc_resource_user *resource_user, grpc_bulist list) { * buffer pool state machine */ -static bool bpalloc(grpc_exec_ctx *exec_ctx, - grpc_resource_quota *resource_quota); -static bool bpscavenge(grpc_exec_ctx *exec_ctx, - grpc_resource_quota *resource_quota); -static bool bpreclaim(grpc_exec_ctx *exec_ctx, - grpc_resource_quota *resource_quota, bool destructive); +static bool rq_alloc(grpc_exec_ctx *exec_ctx, + grpc_resource_quota *resource_quota); +static bool rq_scavenge(grpc_exec_ctx *exec_ctx, + grpc_resource_quota *resource_quota); +static bool rq_reclaim(grpc_exec_ctx *exec_ctx, + grpc_resource_quota *resource_quota, bool destructive); -static void bpstep(grpc_exec_ctx *exec_ctx, void *bp, grpc_error *error) { +static void rq_step(grpc_exec_ctx *exec_ctx, void *bp, grpc_error *error) { grpc_resource_quota *resource_quota = bp; resource_quota->step_scheduled = false; do { - if (bpalloc(exec_ctx, resource_quota)) goto done; - } while (bpscavenge(exec_ctx, resource_quota)); - bpreclaim(exec_ctx, resource_quota, false) || - bpreclaim(exec_ctx, resource_quota, true); + if (rq_alloc(exec_ctx, resource_quota)) goto done; + } while (rq_scavenge(exec_ctx, resource_quota)); + rq_reclaim(exec_ctx, resource_quota, false) || + rq_reclaim(exec_ctx, resource_quota, true); done: grpc_resource_quota_internal_unref(exec_ctx, resource_quota); } -static void bpstep_sched(grpc_exec_ctx *exec_ctx, - grpc_resource_quota *resource_quota) { +static void rq_step_sched(grpc_exec_ctx *exec_ctx, + grpc_resource_quota *resource_quota) { if (resource_quota->step_scheduled) return; resource_quota->step_scheduled = true; grpc_resource_quota_internal_ref(resource_quota); grpc_combiner_execute_finally(exec_ctx, resource_quota->combiner, - &resource_quota->bpstep_closure, + &resource_quota->rq_step_closure, GRPC_ERROR_NONE, false); } /* returns true if all allocations are completed */ -static bool bpalloc(grpc_exec_ctx *exec_ctx, - grpc_resource_quota *resource_quota) { +static bool rq_alloc(grpc_exec_ctx *exec_ctx, + grpc_resource_quota *resource_quota) { grpc_resource_user *resource_user; while ((resource_user = - bulist_pop(resource_quota, GRPC_BULIST_AWAITING_ALLOCATION))) { + rulist_pop(resource_quota, GRPC_RULIST_AWAITING_ALLOCATION))) { gpr_mu_lock(&resource_user->mu); if (resource_user->free_pool < 0 && -resource_user->free_pool <= resource_quota->free_pool) { @@ -193,7 +195,7 @@ static bool bpalloc(grpc_exec_ctx *exec_ctx, resource_quota->free_pool -= amt; if (grpc_resource_quota_trace) { gpr_log(GPR_DEBUG, "BP %s %s: grant alloc %" PRId64 - " bytes; bp_free_pool -> %" PRId64, + " bytes; rq_free_pool -> %" PRId64, resource_quota->name, resource_user->name, amt, resource_quota->free_pool); } @@ -206,7 +208,7 @@ static bool bpalloc(grpc_exec_ctx *exec_ctx, grpc_exec_ctx_enqueue_list(exec_ctx, &resource_user->on_allocated, NULL); gpr_mu_unlock(&resource_user->mu); } else { - bulist_add_head(resource_user, GRPC_BULIST_AWAITING_ALLOCATION); + rulist_add_head(resource_user, GRPC_RULIST_AWAITING_ALLOCATION); gpr_mu_unlock(&resource_user->mu); return false; } @@ -215,11 +217,11 @@ static bool bpalloc(grpc_exec_ctx *exec_ctx, } /* returns true if any memory could be reclaimed from buffers */ -static bool bpscavenge(grpc_exec_ctx *exec_ctx, - grpc_resource_quota *resource_quota) { +static bool rq_scavenge(grpc_exec_ctx *exec_ctx, + grpc_resource_quota *resource_quota) { grpc_resource_user *resource_user; while ((resource_user = - bulist_pop(resource_quota, GRPC_BULIST_NON_EMPTY_FREE_POOL))) { + rulist_pop(resource_quota, GRPC_RULIST_NON_EMPTY_FREE_POOL))) { gpr_mu_lock(&resource_user->mu); if (resource_user->free_pool > 0) { int64_t amt = resource_user->free_pool; @@ -227,7 +229,7 @@ static bool bpscavenge(grpc_exec_ctx *exec_ctx, resource_quota->free_pool += amt; if (grpc_resource_quota_trace) { gpr_log(GPR_DEBUG, "BP %s %s: scavenge %" PRId64 - " bytes; bp_free_pool -> %" PRId64, + " bytes; rq_free_pool -> %" PRId64, resource_quota->name, resource_user->name, amt, resource_quota->free_pool); } @@ -240,16 +242,16 @@ static bool bpscavenge(grpc_exec_ctx *exec_ctx, return false; } -/* returns true if reclaimation is proceeding */ -static bool bpreclaim(grpc_exec_ctx *exec_ctx, - grpc_resource_quota *resource_quota, bool destructive) { +/* returns true if reclamation is proceeding */ +static bool rq_reclaim(grpc_exec_ctx *exec_ctx, + grpc_resource_quota *resource_quota, bool destructive) { if (resource_quota->reclaiming) return true; - grpc_bulist list = destructive ? GRPC_BULIST_RECLAIMER_DESTRUCTIVE - : GRPC_BULIST_RECLAIMER_BENIGN; - grpc_resource_user *resource_user = bulist_pop(resource_quota, list); + grpc_rulist list = destructive ? GRPC_RULIST_RECLAIMER_DESTRUCTIVE + : GRPC_RULIST_RECLAIMER_BENIGN; + grpc_resource_user *resource_user = rulist_pop(resource_quota, list); if (resource_user == NULL) return false; if (grpc_resource_quota_trace) { - gpr_log(GPR_DEBUG, "BP %s %s: initiate %s reclaimation", + gpr_log(GPR_DEBUG, "BP %s %s: initiate %s reclamation", resource_quota->name, resource_user->name, destructive ? "destructive" : "benign"); } @@ -262,7 +264,7 @@ static bool bpreclaim(grpc_exec_ctx *exec_ctx, } /******************************************************************************* - * bu_slice: a slice implementation that is backed by a grpc_resource_user + * ru_slice: a slice implementation that is backed by a grpc_resource_user */ typedef struct { @@ -270,22 +272,24 @@ typedef struct { gpr_refcount refs; grpc_resource_user *resource_user; size_t size; -} bu_slice_refcount; +} ru_slice_refcount; -static void bu_slice_ref(void *p) { - bu_slice_refcount *rc = p; +static void ru_slice_ref(void *p) { + ru_slice_refcount *rc = p; gpr_ref(&rc->refs); } -static void bu_slice_unref(void *p) { - bu_slice_refcount *rc = p; +static void ru_slice_unref(void *p) { + ru_slice_refcount *rc = p; if (gpr_unref(&rc->refs)) { /* TODO(ctiller): this is dangerous, but I think safe for now: we have no guarantee here that we're at a safe point for creating an execution context, but we have no way of writing this code otherwise. In the future: consider lifting gpr_slice to grpc, and offering an - internal_{ref,unref} pair that is execution context aware. Alternatively, - make exec_ctx be thread local and 'do the right thing' (whatever that is) + internal_{ref,unref} pair that is execution context aware. + Alternatively, + make exec_ctx be thread local and 'do the right thing' (whatever that + is) if NULL */ grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_resource_user_free(&exec_ctx, rc->resource_user, rc->size); @@ -294,11 +298,11 @@ static void bu_slice_unref(void *p) { } } -static gpr_slice bu_slice_create(grpc_resource_user *resource_user, +static gpr_slice ru_slice_create(grpc_resource_user *resource_user, size_t size) { - bu_slice_refcount *rc = gpr_malloc(sizeof(bu_slice_refcount) + size); - rc->base.ref = bu_slice_ref; - rc->base.unref = bu_slice_unref; + ru_slice_refcount *rc = gpr_malloc(sizeof(ru_slice_refcount) + size); + rc->base.ref = ru_slice_ref; + rc->base.unref = ru_slice_unref; gpr_ref_init(&rc->refs, 1); rc->resource_user = resource_user; rc->size = size; @@ -313,62 +317,62 @@ static gpr_slice bu_slice_create(grpc_resource_user *resource_user, * grpc_resource_quota internal implementation */ -static void bu_allocate(grpc_exec_ctx *exec_ctx, void *bu, grpc_error *error) { +static void ru_allocate(grpc_exec_ctx *exec_ctx, void *bu, grpc_error *error) { grpc_resource_user *resource_user = bu; - if (bulist_empty(resource_user->resource_quota, - GRPC_BULIST_AWAITING_ALLOCATION)) { - bpstep_sched(exec_ctx, resource_user->resource_quota); + if (rulist_empty(resource_user->resource_quota, + GRPC_RULIST_AWAITING_ALLOCATION)) { + rq_step_sched(exec_ctx, resource_user->resource_quota); } - bulist_add_tail(resource_user, GRPC_BULIST_AWAITING_ALLOCATION); + rulist_add_tail(resource_user, GRPC_RULIST_AWAITING_ALLOCATION); } -static void bu_add_to_free_pool(grpc_exec_ctx *exec_ctx, void *bu, +static void ru_add_to_free_pool(grpc_exec_ctx *exec_ctx, void *bu, grpc_error *error) { grpc_resource_user *resource_user = bu; - if (!bulist_empty(resource_user->resource_quota, - GRPC_BULIST_AWAITING_ALLOCATION) && - bulist_empty(resource_user->resource_quota, - GRPC_BULIST_NON_EMPTY_FREE_POOL)) { - bpstep_sched(exec_ctx, resource_user->resource_quota); + if (!rulist_empty(resource_user->resource_quota, + GRPC_RULIST_AWAITING_ALLOCATION) && + rulist_empty(resource_user->resource_quota, + GRPC_RULIST_NON_EMPTY_FREE_POOL)) { + rq_step_sched(exec_ctx, resource_user->resource_quota); } - bulist_add_tail(resource_user, GRPC_BULIST_NON_EMPTY_FREE_POOL); + rulist_add_tail(resource_user, GRPC_RULIST_NON_EMPTY_FREE_POOL); } -static void bu_post_benign_reclaimer(grpc_exec_ctx *exec_ctx, void *bu, +static void ru_post_benign_reclaimer(grpc_exec_ctx *exec_ctx, void *bu, grpc_error *error) { grpc_resource_user *resource_user = bu; - if (!bulist_empty(resource_user->resource_quota, - GRPC_BULIST_AWAITING_ALLOCATION) && - bulist_empty(resource_user->resource_quota, - GRPC_BULIST_NON_EMPTY_FREE_POOL) && - bulist_empty(resource_user->resource_quota, - GRPC_BULIST_RECLAIMER_BENIGN)) { - bpstep_sched(exec_ctx, resource_user->resource_quota); + if (!rulist_empty(resource_user->resource_quota, + GRPC_RULIST_AWAITING_ALLOCATION) && + rulist_empty(resource_user->resource_quota, + GRPC_RULIST_NON_EMPTY_FREE_POOL) && + rulist_empty(resource_user->resource_quota, + GRPC_RULIST_RECLAIMER_BENIGN)) { + rq_step_sched(exec_ctx, resource_user->resource_quota); } - bulist_add_tail(resource_user, GRPC_BULIST_RECLAIMER_BENIGN); + rulist_add_tail(resource_user, GRPC_RULIST_RECLAIMER_BENIGN); } -static void bu_post_destructive_reclaimer(grpc_exec_ctx *exec_ctx, void *bu, +static void ru_post_destructive_reclaimer(grpc_exec_ctx *exec_ctx, void *bu, grpc_error *error) { grpc_resource_user *resource_user = bu; - if (!bulist_empty(resource_user->resource_quota, - GRPC_BULIST_AWAITING_ALLOCATION) && - bulist_empty(resource_user->resource_quota, - GRPC_BULIST_NON_EMPTY_FREE_POOL) && - bulist_empty(resource_user->resource_quota, - GRPC_BULIST_RECLAIMER_BENIGN) && - bulist_empty(resource_user->resource_quota, - GRPC_BULIST_RECLAIMER_DESTRUCTIVE)) { - bpstep_sched(exec_ctx, resource_user->resource_quota); + if (!rulist_empty(resource_user->resource_quota, + GRPC_RULIST_AWAITING_ALLOCATION) && + rulist_empty(resource_user->resource_quota, + GRPC_RULIST_NON_EMPTY_FREE_POOL) && + rulist_empty(resource_user->resource_quota, + GRPC_RULIST_RECLAIMER_BENIGN) && + rulist_empty(resource_user->resource_quota, + GRPC_RULIST_RECLAIMER_DESTRUCTIVE)) { + rq_step_sched(exec_ctx, resource_user->resource_quota); } - bulist_add_tail(resource_user, GRPC_BULIST_RECLAIMER_DESTRUCTIVE); + rulist_add_tail(resource_user, GRPC_RULIST_RECLAIMER_DESTRUCTIVE); } -static void bu_destroy(grpc_exec_ctx *exec_ctx, void *bu, grpc_error *error) { +static void ru_destroy(grpc_exec_ctx *exec_ctx, void *bu, grpc_error *error) { grpc_resource_user *resource_user = bu; GPR_ASSERT(resource_user->allocated == 0); - for (int i = 0; i < GRPC_BULIST_COUNT; i++) { - bulist_remove(resource_user, (grpc_bulist)i); + for (int i = 0; i < GRPC_RULIST_COUNT; i++) { + rulist_remove(resource_user, (grpc_rulist)i); } grpc_exec_ctx_sched(exec_ctx, resource_user->reclaimers[0], GRPC_ERROR_CANCELLED, NULL); @@ -379,17 +383,17 @@ static void bu_destroy(grpc_exec_ctx *exec_ctx, void *bu, grpc_error *error) { GRPC_ERROR_NONE, NULL); if (resource_user->free_pool != 0) { resource_user->resource_quota->free_pool += resource_user->free_pool; - bpstep_sched(exec_ctx, resource_user->resource_quota); + rq_step_sched(exec_ctx, resource_user->resource_quota); } } -static void bu_allocated_slices(grpc_exec_ctx *exec_ctx, void *ts, +static void ru_allocated_slices(grpc_exec_ctx *exec_ctx, void *ts, grpc_error *error) { grpc_resource_user_slice_allocator *slice_allocator = ts; if (error == GRPC_ERROR_NONE) { for (size_t i = 0; i < slice_allocator->count; i++) { gpr_slice_buffer_add_indexed( - slice_allocator->dest, bu_slice_create(slice_allocator->resource_user, + slice_allocator->dest, ru_slice_create(slice_allocator->resource_user, slice_allocator->length)); } } @@ -400,29 +404,29 @@ typedef struct { int64_t size; grpc_resource_quota *resource_quota; grpc_closure closure; -} bp_resize_args; +} rq_resize_args; -static void bp_resize(grpc_exec_ctx *exec_ctx, void *args, grpc_error *error) { - bp_resize_args *a = args; +static void rq_resize(grpc_exec_ctx *exec_ctx, void *args, grpc_error *error) { + rq_resize_args *a = args; int64_t delta = a->size - a->resource_quota->size; a->resource_quota->size += delta; a->resource_quota->free_pool += delta; if (delta < 0 && a->resource_quota->free_pool < 0) { - bpstep_sched(exec_ctx, a->resource_quota); + rq_step_sched(exec_ctx, a->resource_quota); } else if (delta > 0 && - !bulist_empty(a->resource_quota, - GRPC_BULIST_AWAITING_ALLOCATION)) { - bpstep_sched(exec_ctx, a->resource_quota); + !rulist_empty(a->resource_quota, + GRPC_RULIST_AWAITING_ALLOCATION)) { + rq_step_sched(exec_ctx, a->resource_quota); } grpc_resource_quota_internal_unref(exec_ctx, a->resource_quota); gpr_free(a); } -static void bp_reclaimation_done(grpc_exec_ctx *exec_ctx, void *bp, - grpc_error *error) { +static void rq_reclamation_done(grpc_exec_ctx *exec_ctx, void *bp, + grpc_error *error) { grpc_resource_quota *resource_quota = bp; resource_quota->reclaiming = false; - bpstep_sched(exec_ctx, resource_quota); + rq_step_sched(exec_ctx, resource_quota); grpc_resource_quota_internal_unref(exec_ctx, resource_quota); } @@ -444,10 +448,10 @@ grpc_resource_quota *grpc_resource_quota_create(const char *name) { gpr_asprintf(&resource_quota->name, "anonymous_pool_%" PRIxPTR, (intptr_t)resource_quota); } - grpc_closure_init(&resource_quota->bpstep_closure, bpstep, resource_quota); - grpc_closure_init(&resource_quota->bpreclaimation_done_closure, - bp_reclaimation_done, resource_quota); - for (int i = 0; i < GRPC_BULIST_COUNT; i++) { + grpc_closure_init(&resource_quota->rq_step_closure, rq_step, resource_quota); + grpc_closure_init(&resource_quota->rq_reclamation_done_closure, + rq_reclamation_done, resource_quota); + for (int i = 0; i < GRPC_RULIST_COUNT; i++) { resource_quota->roots[i] = NULL; } return resource_quota; @@ -481,10 +485,10 @@ void grpc_resource_quota_ref(grpc_resource_quota *resource_quota) { void grpc_resource_quota_resize(grpc_resource_quota *resource_quota, size_t size) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - bp_resize_args *a = gpr_malloc(sizeof(*a)); + rq_resize_args *a = gpr_malloc(sizeof(*a)); a->resource_quota = grpc_resource_quota_internal_ref(resource_quota); a->size = (int64_t)size; - grpc_closure_init(&a->closure, bp_resize, a); + grpc_closure_init(&a->closure, rq_resize, a); grpc_combiner_execute(&exec_ctx, resource_quota->combiner, &a->closure, GRPC_ERROR_NONE, false); grpc_exec_ctx_finish(&exec_ctx); @@ -509,17 +513,17 @@ grpc_resource_quota *grpc_resource_quota_from_channel_args( return grpc_resource_quota_create(NULL); } -static void *bp_copy(void *bp) { +static void *rq_copy(void *bp) { grpc_resource_quota_ref(bp); return bp; } -static void bp_destroy(void *bp) { grpc_resource_quota_unref(bp); } +static void rq_destroy(void *bp) { grpc_resource_quota_unref(bp); } -static int bp_cmp(void *a, void *b) { return GPR_ICMP(a, b); } +static int rq_cmp(void *a, void *b) { return GPR_ICMP(a, b); } const grpc_arg_pointer_vtable *grpc_resource_quota_arg_vtable(void) { - static const grpc_arg_pointer_vtable vtable = {bp_copy, bp_destroy, bp_cmp}; + static const grpc_arg_pointer_vtable vtable = {rq_copy, rq_destroy, rq_cmp}; return &vtable; } @@ -532,15 +536,15 @@ void grpc_resource_user_init(grpc_resource_user *resource_user, const char *name) { resource_user->resource_quota = grpc_resource_quota_internal_ref(resource_quota); - grpc_closure_init(&resource_user->allocate_closure, &bu_allocate, + grpc_closure_init(&resource_user->allocate_closure, &ru_allocate, resource_user); grpc_closure_init(&resource_user->add_to_free_pool_closure, - &bu_add_to_free_pool, resource_user); + &ru_add_to_free_pool, resource_user); grpc_closure_init(&resource_user->post_reclaimer_closure[0], - &bu_post_benign_reclaimer, resource_user); + &ru_post_benign_reclaimer, resource_user); grpc_closure_init(&resource_user->post_reclaimer_closure[1], - &bu_post_destructive_reclaimer, resource_user); - grpc_closure_init(&resource_user->destroy_closure, &bu_destroy, + &ru_post_destructive_reclaimer, resource_user); + grpc_closure_init(&resource_user->destroy_closure, &ru_destroy, resource_user); gpr_mu_init(&resource_user->mu); resource_user->allocated = 0; @@ -551,7 +555,7 @@ void grpc_resource_user_init(grpc_resource_user *resource_user, gpr_atm_no_barrier_store(&resource_user->on_done_destroy_closure, 0); resource_user->reclaimers[0] = NULL; resource_user->reclaimers[1] = NULL; - for (int i = 0; i < GRPC_BULIST_COUNT; i++) { + for (int i = 0; i < GRPC_RULIST_COUNT; i++) { resource_user->links[i].next = resource_user->links[i].prev = NULL; } #ifndef NDEBUG @@ -678,22 +682,22 @@ void grpc_resource_user_post_reclaimer(grpc_exec_ctx *exec_ctx, } } -void grpc_resource_user_finish_reclaimation(grpc_exec_ctx *exec_ctx, - grpc_resource_user *resource_user) { +void grpc_resource_user_finish_reclamation(grpc_exec_ctx *exec_ctx, + grpc_resource_user *resource_user) { if (grpc_resource_quota_trace) { - gpr_log(GPR_DEBUG, "BP %s %s: reclaimation complete", + gpr_log(GPR_DEBUG, "BP %s %s: reclamation complete", resource_user->resource_quota->name, resource_user->name); } grpc_combiner_execute( exec_ctx, resource_user->resource_quota->combiner, - &resource_user->resource_quota->bpreclaimation_done_closure, + &resource_user->resource_quota->rq_reclamation_done_closure, GRPC_ERROR_NONE, false); } void grpc_resource_user_slice_allocator_init( grpc_resource_user_slice_allocator *slice_allocator, grpc_resource_user *resource_user, grpc_iomgr_cb_func cb, void *p) { - grpc_closure_init(&slice_allocator->on_allocated, bu_allocated_slices, + grpc_closure_init(&slice_allocator->on_allocated, ru_allocated_slices, slice_allocator); grpc_closure_init(&slice_allocator->on_done, cb, p); slice_allocator->resource_user = resource_user; diff --git a/src/core/lib/iomgr/resource_quota.h b/src/core/lib/iomgr/resource_quota.h index c4015b42cc..af94a19911 100644 --- a/src/core/lib/iomgr/resource_quota.h +++ b/src/core/lib/iomgr/resource_quota.h @@ -38,6 +38,37 @@ #include "src/core/lib/iomgr/exec_ctx.h" +/** \file Tracks resource usage against a pool. + + The current implementation tracks only memory usage, but in the future + this may be extended to (for example) threads and file descriptors. + + A grpc_resource_quota represents the pooled resources, and + grpc_resource_user instances attach to the quota and consume those + resources. They also offer a vector for reclamation: if we become + resource constrained, grpc_resource_user instances are asked (in turn) to + free up whatever they can so that the system as a whole can make progress. + + There are three kinds of reclamation that take place: + - an internal reclamation, where cached resource at the resource user level + is returned to the quota + - a benign reclamation phase, whereby resources that are in use but are not + helping anything make progress are reclaimed + - a destructive reclamation, whereby resources that are helping something + make progress may be enacted so that at least one part of the system can + complete. + + These reclamations are tried in priority order, and only one reclamation + is outstanding for a quota at any given time (meaning that if a destructive + reclamation makes progress, we may follow up with a benign reclamation). + + Future work will be to expose the current resource pressure so that back + pressure can be applied to avoid reclamation phases starting. + + Resource users own references to resource quotas, and resource quotas + maintain lists of users (which users arrange to leave before they are + destroyed) */ + extern int grpc_resource_quota_trace; grpc_resource_quota *grpc_resource_quota_internal_ref( @@ -47,46 +78,83 @@ void grpc_resource_quota_internal_unref(grpc_exec_ctx *exec_ctx, grpc_resource_quota *grpc_resource_quota_from_channel_args( const grpc_channel_args *channel_args); +/* Resource users are kept in (potentially) several intrusive linked lists + at once. These are the list names. */ typedef enum { - GRPC_BULIST_AWAITING_ALLOCATION, - GRPC_BULIST_NON_EMPTY_FREE_POOL, - GRPC_BULIST_RECLAIMER_BENIGN, - GRPC_BULIST_RECLAIMER_DESTRUCTIVE, - GRPC_BULIST_COUNT -} grpc_bulist; + /* Resource users that are waiting for an allocation */ + GRPC_RULIST_AWAITING_ALLOCATION, + /* Resource users that have free memory available for internal reclamation */ + GRPC_RULIST_NON_EMPTY_FREE_POOL, + /* Resource users that have published a benign reclamation is available */ + GRPC_RULIST_RECLAIMER_BENIGN, + /* Resource users that have published a destructive reclamation is + available */ + GRPC_RULIST_RECLAIMER_DESTRUCTIVE, + /* Number of lists: must be last */ + GRPC_RULIST_COUNT +} grpc_rulist; typedef struct grpc_resource_user grpc_resource_user; +/* Internal linked list pointers for a resource user */ typedef struct { grpc_resource_user *next; grpc_resource_user *prev; } grpc_resource_user_link; struct grpc_resource_user { + /* The quota this resource user consumes from */ grpc_resource_quota *resource_quota; + /* Closure to schedule an allocation onder the resource quota combiner lock */ grpc_closure allocate_closure; + /* Closure to publish a non empty free pool under the resource quota combiner + lock */ grpc_closure add_to_free_pool_closure; #ifndef NDEBUG + /* Canary object to detect leaked resource users with ASAN */ void *asan_canary; #endif gpr_mu mu; + /* Total allocated memory outstanding by this resource user; + always positive */ int64_t allocated; + /* The amount of memory this user has cached for its own use: to avoid quota + contention, each resource user can keep some memory aside from the quota, + and the quota can pull it back under memory pressure. + This value can become negative if more memory has been requested than + existed in the free pool, at which point the quota is consulted to bring + this value non-negative (asynchronously). */ int64_t free_pool; + /* A list of closures to call once free_pool becomes non-negative - ie when + all outstanding allocations have been granted. */ grpc_closure_list on_allocated; + /* True if we are currently trying to allocate from the quota, false if not */ bool allocating; + /* True if we are currently trying to add ourselves to the non-free quota + list, false otherwise */ bool added_to_free_pool; + /* Reclaimers: index 0 is the benign reclaimer, 1 is the destructive reclaimer + */ grpc_closure *reclaimers[2]; + /* Trampoline closures to finish reclamation and re-enter the quota combiner + lock */ grpc_closure post_reclaimer_closure[2]; + /* Closure to execute under the quota combiner to de-register and shutdown the + resource user */ grpc_closure destroy_closure; + /* User supplied closure to call once the user has finished shutting down AND + all outstanding allocations have been freed */ gpr_atm on_done_destroy_closure; - grpc_resource_user_link links[GRPC_BULIST_COUNT]; + /* Links in the various grpc_rulist lists */ + grpc_resource_user_link links[GRPC_RULIST_COUNT]; + /* The name of this resource user, for debugging/tracing */ char *name; }; @@ -99,17 +167,29 @@ void grpc_resource_user_shutdown(grpc_exec_ctx *exec_ctx, void grpc_resource_user_destroy(grpc_exec_ctx *exec_ctx, grpc_resource_user *resource_user); +/* Allocate from the resource user (and it's quota). + If optional_on_done is NULL, then allocate immediately. This may push the + quota over-limit, at which point reclamation will kick in. + If optional_on_done is non-NULL, it will be scheduled when the allocation has + been granted by the quota. */ void grpc_resource_user_alloc(grpc_exec_ctx *exec_ctx, grpc_resource_user *resource_user, size_t size, grpc_closure *optional_on_done); +/* Release memory back to the quota */ void grpc_resource_user_free(grpc_exec_ctx *exec_ctx, grpc_resource_user *resource_user, size_t size); +/* Post a memory reclaimer to the resource user. Only one benign and one + destructive reclaimer can be posted at once. When executed, the reclaimer + MUST call grpc_resource_user_finish_reclamation before it completes, to + return control to the resource quota. */ void grpc_resource_user_post_reclaimer(grpc_exec_ctx *exec_ctx, grpc_resource_user *resource_user, bool destructive, grpc_closure *closure); -void grpc_resource_user_finish_reclaimation(grpc_exec_ctx *exec_ctx, - grpc_resource_user *resource_user); +/* Finish a reclamation step */ +void grpc_resource_user_finish_reclamation(grpc_exec_ctx *exec_ctx, + grpc_resource_user *resource_user); +/* Helper to allocate slices from a resource user */ typedef struct grpc_resource_user_slice_allocator { grpc_closure on_allocated; grpc_closure on_done; @@ -119,10 +199,12 @@ typedef struct grpc_resource_user_slice_allocator { grpc_resource_user *resource_user; } grpc_resource_user_slice_allocator; +/* Initialize a slice allocator */ void grpc_resource_user_slice_allocator_init( grpc_resource_user_slice_allocator *slice_allocator, grpc_resource_user *resource_user, grpc_iomgr_cb_func cb, void *p); +/* Allocate \a count slices of length \a length into \a dest. */ void grpc_resource_user_alloc_slices( grpc_exec_ctx *exec_ctx, grpc_resource_user_slice_allocator *slice_allocator, size_t length, diff --git a/src/core/lib/iomgr/tcp_client.h b/src/core/lib/iomgr/tcp_client.h index b854e5aadc..d1b0e9cd19 100644 --- a/src/core/lib/iomgr/tcp_client.h +++ b/src/core/lib/iomgr/tcp_client.h @@ -39,6 +39,8 @@ #include "src/core/lib/iomgr/pollset_set.h" #include "src/core/lib/iomgr/sockaddr.h" +/* Channel arg (integer) setting how large a slice to try and read from the wire + each time recvmsg (or equivalent) is called */ #define GRPC_ARG_TCP_READ_CHUNK_SIZE "grpc.experimental.tcp_read_chunk_size" /* Asynchronously connect to an address (specified as (addr, len)), and call diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py index cc04b14577..b9acdc1d4a 100755 --- a/test/core/end2end/gen_build_yaml.py +++ b/test/core/end2end/gen_build_yaml.py @@ -90,7 +90,7 @@ END2END_TESTS = { 'bad_hostname': default_test_options, 'binary_metadata': default_test_options, 'resource_quota_server': default_test_options._replace(large_writes=True, - proxyable=False), + proxyable=False), 'call_creds': default_test_options._replace(secure=True), 'cancel_after_accept': default_test_options._replace(cpu_cost=LOWCPU), 'cancel_after_client_done': default_test_options, diff --git a/test/core/iomgr/resource_quota_test.c b/test/core/iomgr/resource_quota_test.c index 5963ed089b..0fb94a495d 100644 --- a/test/core/iomgr/resource_quota_test.c +++ b/test/core/iomgr/resource_quota_test.c @@ -57,7 +57,7 @@ static void reclaimer_cb(grpc_exec_ctx *exec_ctx, void *args, GPR_ASSERT(error == GRPC_ERROR_NONE); reclaimer_args *a = args; grpc_resource_user_free(exec_ctx, a->resource_user, a->size); - grpc_resource_user_finish_reclaimation(exec_ctx, a->resource_user); + grpc_resource_user_finish_reclamation(exec_ctx, a->resource_user); grpc_closure_run(exec_ctx, a->then, GRPC_ERROR_NONE); gpr_free(a); } -- cgit v1.2.3 From 085f9afaf0bf96a42ba57f5ea739898ec26831ac Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 24 Oct 2016 09:55:44 -0700 Subject: Added import order comments, resolved other minor issues --- src/core/ext/lb_policy/grpclb/grpclb.c | 4 ++++ src/core/lib/iomgr/tcp_server_posix.c | 7 ------- test/core/client_channel/set_initial_connect_string_test.c | 5 +++++ test/core/end2end/bad_server_response_test.c | 5 +++++ test/core/iomgr/sockaddr_utils_test.c | 4 ++++ test/core/surface/concurrent_connectivity_test.c | 4 ++++ 6 files changed, 22 insertions(+), 7 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index 3a37001dfb..36f0a90bb8 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -96,6 +96,10 @@ * - Implement LB service forwarding (point 2c. in the doc's diagram). */ +/* With the addition of a libuv endpoint, sockaddr.h now includes uv.h when + using that endpoint. Because of various transitive includes in uv.h, + including windows.h on Windows, uv.h must be included before other system + headers. Therefore, sockaddr.h must always be included first */ #include "src/core/lib/iomgr/sockaddr.h" #include diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index 35c072090c..127f8595d1 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -81,13 +81,6 @@ struct grpc_tcp_listener { grpc_fd *emfd; grpc_tcp_server *server; grpc_resolved_address addr; - /* - union { - uint8_t untyped[GRPC_MAX_SOCKADDR_SIZE]; - struct sockaddr sockaddr; - } addr; - size_t addr_len; - */ int port; unsigned port_index; unsigned fd_index; diff --git a/test/core/client_channel/set_initial_connect_string_test.c b/test/core/client_channel/set_initial_connect_string_test.c index 875acea96b..379f30fb9f 100644 --- a/test/core/client_channel/set_initial_connect_string_test.c +++ b/test/core/client_channel/set_initial_connect_string_test.c @@ -30,6 +30,11 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ + +/* With the addition of a libuv endpoint, sockaddr.h now includes uv.h when + using that endpoint. Because of various transitive includes in uv.h, + including windows.h on Windows, uv.h must be included before other system + headers. Therefore, sockaddr.h must always be included first */ #include "src/core/lib/iomgr/sockaddr.h" #include diff --git a/test/core/end2end/bad_server_response_test.c b/test/core/end2end/bad_server_response_test.c index 2fe3963b40..9a3e1301f9 100644 --- a/test/core/end2end/bad_server_response_test.c +++ b/test/core/end2end/bad_server_response_test.c @@ -30,6 +30,11 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ + +/* With the addition of a libuv endpoint, sockaddr.h now includes uv.h when + using that endpoint. Because of various transitive includes in uv.h, + including windows.h on Windows, uv.h must be included before other system + headers. Therefore, sockaddr.h must always be included first */ #include "src/core/lib/iomgr/sockaddr.h" #include diff --git a/test/core/iomgr/sockaddr_utils_test.c b/test/core/iomgr/sockaddr_utils_test.c index bb81ebe575..8569c697fe 100644 --- a/test/core/iomgr/sockaddr_utils_test.c +++ b/test/core/iomgr/sockaddr_utils_test.c @@ -31,6 +31,10 @@ * */ +/* With the addition of a libuv endpoint, sockaddr.h now includes uv.h when + using that endpoint. Because of various transitive includes in uv.h, + including windows.h on Windows, uv.h must be included before other system + headers. Therefore, sockaddr.h must always be included first */ #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/sockaddr_utils.h" diff --git a/test/core/surface/concurrent_connectivity_test.c b/test/core/surface/concurrent_connectivity_test.c index a2470a5a57..f9f723baaa 100644 --- a/test/core/surface/concurrent_connectivity_test.c +++ b/test/core/surface/concurrent_connectivity_test.c @@ -31,6 +31,10 @@ * */ +/* With the addition of a libuv endpoint, sockaddr.h now includes uv.h when + using that endpoint. Because of various transitive includes in uv.h, + including windows.h on Windows, uv.h must be included before other system + headers. Therefore, sockaddr.h must always be included first */ #include "src/core/lib/iomgr/sockaddr.h" #include -- cgit v1.2.3 From 557c990c36dd281812016ad81fa79309078e807d Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 24 Oct 2016 11:12:05 -0700 Subject: clang-format --- src/core/ext/client_channel/client_channel.c | 2 +- src/core/ext/client_channel/lb_policy_factory.c | 19 ++++++------- src/core/ext/client_channel/lb_policy_factory.h | 8 +++--- src/core/ext/client_channel/resolver.c | 3 +- src/core/ext/client_channel/resolver.h | 3 +- src/core/ext/client_channel/resolver_registry.h | 2 +- src/core/ext/lb_policy/grpclb/grpclb.c | 32 ++++++++++------------ src/core/ext/lb_policy/pick_first/pick_first.c | 14 ++++------ src/core/ext/lb_policy/round_robin/round_robin.c | 12 ++++---- src/core/ext/resolver/dns/native/dns_resolver.c | 2 +- src/core/ext/resolver/sockaddr/sockaddr_resolver.c | 4 +-- .../chttp2/client/insecure/channel_create.c | 6 ++-- .../chttp2/client/secure/secure_channel_create.c | 4 +-- src/core/lib/channel/channel_args.c | 6 ++-- src/core/lib/channel/channel_args.h | 4 +-- test/core/end2end/fake_resolver.c | 4 +-- 16 files changed, 58 insertions(+), 67 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/client_channel/client_channel.c b/src/core/ext/client_channel/client_channel.c index 48459de44d..acebabe8b0 100644 --- a/src/core/ext/client_channel/client_channel.c +++ b/src/core/ext/client_channel/client_channel.c @@ -202,7 +202,7 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, grpc_channel_args_find(lb_policy_args.args, GRPC_ARG_LB_ADDRESSES); if (channel_arg != NULL) { GPR_ASSERT(channel_arg->type == GRPC_ARG_POINTER); - grpc_lb_addresses* addresses = channel_arg->value.pointer.p; + grpc_lb_addresses *addresses = channel_arg->value.pointer.p; bool found_backend_address = false; for (size_t i = 0; i < addresses->num_addresses; ++i) { if (!addresses->addresses[i].is_balancer) { diff --git a/src/core/ext/client_channel/lb_policy_factory.c b/src/core/ext/client_channel/lb_policy_factory.c index 67ff71fdae..8a474c8818 100644 --- a/src/core/ext/client_channel/lb_policy_factory.c +++ b/src/core/ext/client_channel/lb_policy_factory.c @@ -60,9 +60,8 @@ grpc_lb_addresses* grpc_lb_addresses_copy(const grpc_lb_addresses* addresses) { gpr_strdup(new_addresses->addresses[i].balancer_name); } if (new_addresses->addresses[i].user_data != NULL) { - new_addresses->addresses[i].user_data = - addresses->user_data_vtable->copy( - new_addresses->addresses[i].user_data); + new_addresses->addresses[i].user_data = addresses->user_data_vtable->copy( + new_addresses->addresses[i].user_data); } } return new_addresses; @@ -93,15 +92,15 @@ int grpc_lb_addresses_cmp(const grpc_lb_addresses* addresses1, const grpc_lb_address* target2 = &addresses2->addresses[i]; if (target1->address.len > target2->address.len) return 1; if (target1->address.len < target2->address.len) return -1; - int retval = memcmp( - target1->address.addr, target2->address.addr, target1->address.len); + int retval = memcmp(target1->address.addr, target2->address.addr, + target1->address.len); if (retval != 0) return retval; if (target1->is_balancer > target2->is_balancer) return 1; if (target1->is_balancer < target2->is_balancer) return -1; - const char* balancer_name1 = target1->balancer_name != NULL - ? target1->balancer_name : ""; - const char* balancer_name2 = target2->balancer_name != NULL - ? target2->balancer_name : ""; + const char* balancer_name1 = + target1->balancer_name != NULL ? target1->balancer_name : ""; + const char* balancer_name2 = + target2->balancer_name != NULL ? target2->balancer_name : ""; retval = strcmp(balancer_name1, balancer_name2); if (retval != 0) return retval; if (addresses1->user_data_vtable != NULL) { @@ -137,7 +136,7 @@ static const grpc_arg_pointer_vtable lb_addresses_arg_vtable = { lb_addresses_copy, lb_addresses_destroy, lb_addresses_cmp}; grpc_arg grpc_lb_addresses_create_channel_arg( - const grpc_lb_addresses *addresses) { + const grpc_lb_addresses* addresses) { grpc_arg arg; arg.type = GRPC_ARG_POINTER; arg.key = GRPC_ARG_LB_ADDRESSES; diff --git a/src/core/ext/client_channel/lb_policy_factory.h b/src/core/ext/client_channel/lb_policy_factory.h index 27b0a4de01..c19126d04f 100644 --- a/src/core/ext/client_channel/lb_policy_factory.h +++ b/src/core/ext/client_channel/lb_policy_factory.h @@ -60,9 +60,9 @@ typedef struct grpc_lb_address { } grpc_lb_address; typedef struct grpc_lb_user_data_vtable { - void* (*copy)(void*); - void (*destroy)(void*); - int (*cmp)(void*, void*); + void *(*copy)(void *); + void (*destroy)(void *); + int (*cmp)(void *, void *); } grpc_lb_user_data_vtable; typedef struct grpc_lb_addresses { @@ -75,7 +75,7 @@ typedef struct grpc_lb_addresses { \a num_addresses addresses. The \a user_data_vtable argument may be NULL if no user data will be added. */ grpc_lb_addresses *grpc_lb_addresses_create( - size_t num_addresses, const grpc_lb_user_data_vtable* user_data_vtable); + size_t num_addresses, const grpc_lb_user_data_vtable *user_data_vtable); /** Creates a copy of \a addresses. If \a user_data_copy is not NULL, * it will be invoked to copy the \a user_data field of each address. */ diff --git a/src/core/ext/client_channel/resolver.c b/src/core/ext/client_channel/resolver.c index 3b9b6d5641..2ae4fe862e 100644 --- a/src/core/ext/client_channel/resolver.c +++ b/src/core/ext/client_channel/resolver.c @@ -76,7 +76,6 @@ void grpc_resolver_channel_saw_error(grpc_exec_ctx *exec_ctx, } void grpc_resolver_next(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver, - grpc_channel_args **result, - grpc_closure *on_complete) { + grpc_channel_args **result, grpc_closure *on_complete) { resolver->vtable->next(exec_ctx, resolver, result, on_complete); } diff --git a/src/core/ext/client_channel/resolver.h b/src/core/ext/client_channel/resolver.h index a7097935d2..0bebcf00b3 100644 --- a/src/core/ext/client_channel/resolver.h +++ b/src/core/ext/client_channel/resolver.h @@ -85,7 +85,6 @@ void grpc_resolver_channel_saw_error(grpc_exec_ctx *exec_ctx, If resolution is fatally broken, set *result to NULL and schedule on_complete. */ void grpc_resolver_next(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver, - grpc_channel_args **result, - grpc_closure *on_complete); + grpc_channel_args **result, grpc_closure *on_complete); #endif /* GRPC_CORE_EXT_CLIENT_CHANNEL_RESOLVER_H */ diff --git a/src/core/ext/client_channel/resolver_registry.h b/src/core/ext/client_channel/resolver_registry.h index 60e6d003fb..ca57bef6fb 100644 --- a/src/core/ext/client_channel/resolver_registry.h +++ b/src/core/ext/client_channel/resolver_registry.h @@ -59,7 +59,7 @@ void grpc_register_resolver_type(grpc_resolver_factory *factory); return it. If a resolver factory was not found, return NULL. */ grpc_resolver *grpc_resolver_create(const char *target, - const grpc_channel_args* args); + const grpc_channel_args *args); /** Find a resolver factory given a name and return an (owned-by-the-caller) * reference to it */ diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index 4594793518..b0ec5633a7 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -339,13 +339,13 @@ static bool is_server_valid(const grpc_grpclb_server *server, size_t idx, } /* vtable for LB tokens in grpc_lb_addresses. */ -static void* lb_token_copy(void *token) { +static void *lb_token_copy(void *token) { return token == NULL ? NULL : GRPC_MDELEM_REF(token); } static void lb_token_destroy(void *token) { if (token != NULL) GRPC_MDELEM_UNREF(token); } -static int lb_token_cmp(void* token1, void* token2) { +static int lb_token_cmp(void *token1, void *token2) { if (token1 > token2) return 1; if (token1 < token2) return -1; return 0; @@ -477,7 +477,7 @@ static grpc_lb_policy *create_rr_locked( // Replace the LB addresses in the channel args that we pass down to // the subchannel. - static const char* keys_to_remove[] = {GRPC_ARG_LB_ADDRESSES}; + static const char *keys_to_remove[] = {GRPC_ARG_LB_ADDRESSES}; const grpc_arg arg = grpc_lb_addresses_create_channel_arg(glb_policy->addresses); args.args = grpc_channel_args_copy_and_add_and_remove( @@ -582,11 +582,10 @@ static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx, grpc_lb_policy_factory *factory, grpc_lb_policy_args *args) { /* Get server name. */ - const grpc_arg* arg = + const grpc_arg *arg = grpc_channel_args_find(args->args, GRPC_ARG_SERVER_NAME); - const char* server_name = - arg != NULL && arg->type == GRPC_ARG_STRING - ? arg->value.string : NULL; + const char *server_name = + arg != NULL && arg->type == GRPC_ARG_STRING ? arg->value.string : NULL; /* Count the number of gRPC-LB addresses. There must be at least one. * TODO(roth): For now, we ignore non-balancer addresses, but in the @@ -597,7 +596,7 @@ static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx, * this is the right LB policy to use. */ arg = grpc_channel_args_find(args->args, GRPC_ARG_LB_ADDRESSES); GPR_ASSERT(arg != NULL && arg->type == GRPC_ARG_POINTER); - grpc_lb_addresses* addresses = arg->value.pointer.p; + grpc_lb_addresses *addresses = arg->value.pointer.p; size_t num_grpclb_addrs = 0; for (size_t i = 0; i < addresses->num_addresses; ++i) { if (addresses->addresses[i].is_balancer) ++num_grpclb_addrs; @@ -631,14 +630,13 @@ static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx, if (addresses->addresses[i].is_balancer) { if (addr_index == 0) { addr_strs[addr_index++] = grpc_sockaddr_to_uri( - (const struct sockaddr *)&addresses->addresses[i] - .address.addr); + (const struct sockaddr *)&addresses->addresses[i].address.addr); } else { - GPR_ASSERT(grpc_sockaddr_to_string( - &addr_strs[addr_index++], - (const struct sockaddr *)&addresses->addresses[i] - .address.addr, - true) > 0); + GPR_ASSERT( + grpc_sockaddr_to_string( + &addr_strs[addr_index++], + (const struct sockaddr *)&addresses->addresses[i].address.addr, + true) > 0); } } } @@ -661,8 +659,8 @@ static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx, * so that it does not wind up recursively using the grpclb LB policy, * as per the special case logic in client_channel.c. */ - static const char* keys_to_remove[] = { - GRPC_ARG_LB_POLICY_NAME, GRPC_ARG_LB_ADDRESSES}; + static const char *keys_to_remove[] = {GRPC_ARG_LB_POLICY_NAME, + GRPC_ARG_LB_ADDRESSES}; grpc_channel_args *new_args = grpc_channel_args_copy_and_remove( args->args, keys_to_remove, GPR_ARRAY_SIZE(keys_to_remove)); glb_policy->lb_channel = grpc_client_channel_factory_create_channel( diff --git a/src/core/ext/lb_policy/pick_first/pick_first.c b/src/core/ext/lb_policy/pick_first/pick_first.c index d3166f3416..da4341d30d 100644 --- a/src/core/ext/lb_policy/pick_first/pick_first.c +++ b/src/core/ext/lb_policy/pick_first/pick_first.c @@ -35,8 +35,8 @@ #include -#include "src/core/lib/channel/channel_args.h" #include "src/core/ext/client_channel/lb_policy_registry.h" +#include "src/core/lib/channel/channel_args.h" #include "src/core/lib/transport/connectivity_state.h" typedef struct pending_pick { @@ -437,17 +437,16 @@ static grpc_lb_policy *create_pick_first(grpc_exec_ctx *exec_ctx, GPR_ASSERT(args->client_channel_factory != NULL); /* Get server name. */ - const grpc_arg* arg = + const grpc_arg *arg = grpc_channel_args_find(args->args, GRPC_ARG_SERVER_NAME); - const char* server_name = - arg != NULL && arg->type == GRPC_ARG_STRING - ? arg->value.string : NULL; + const char *server_name = + arg != NULL && arg->type == GRPC_ARG_STRING ? arg->value.string : NULL; /* Find the number of backend addresses. We ignore balancer * addresses, since we don't know how to handle them. */ arg = grpc_channel_args_find(args->args, GRPC_ARG_LB_ADDRESSES); GPR_ASSERT(arg != NULL && arg->type == GRPC_ARG_POINTER); - grpc_lb_addresses* addresses = arg->value.pointer.p; + grpc_lb_addresses *addresses = arg->value.pointer.p; size_t num_addrs = 0; for (size_t i = 0; i < addresses->num_addresses; i++) { if (!addresses->addresses[i].is_balancer) ++num_addrs; @@ -474,8 +473,7 @@ static grpc_lb_policy *create_pick_first(grpc_exec_ctx *exec_ctx, /* server_name will be copied as part of the subchannel creation. This makes * the copying of server_name (a borrowed pointer) OK. */ sc_args.server_name = server_name; - sc_args.addr = - (struct sockaddr *)(&addresses->addresses[i].address.addr); + sc_args.addr = (struct sockaddr *)(&addresses->addresses[i].address.addr); sc_args.addr_len = addresses->addresses[i].address.len; sc_args.args = args->args; diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c index 9f35ebf8be..b2676a7c86 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -602,17 +602,16 @@ static grpc_lb_policy *round_robin_create(grpc_exec_ctx *exec_ctx, GPR_ASSERT(args->client_channel_factory != NULL); /* Get server name. */ - const grpc_arg* arg = + const grpc_arg *arg = grpc_channel_args_find(args->args, GRPC_ARG_SERVER_NAME); - const char* server_name = - arg != NULL && arg->type == GRPC_ARG_STRING - ? arg->value.string : NULL; + const char *server_name = + arg != NULL && arg->type == GRPC_ARG_STRING ? arg->value.string : NULL; /* Find the number of backend addresses. We ignore balancer * addresses, since we don't know how to handle them. */ arg = grpc_channel_args_find(args->args, GRPC_ARG_LB_ADDRESSES); GPR_ASSERT(arg != NULL && arg->type == GRPC_ARG_POINTER); - grpc_lb_addresses* addresses = arg->value.pointer.p; + grpc_lb_addresses *addresses = arg->value.pointer.p; size_t num_addrs = 0; for (size_t i = 0; i < addresses->num_addresses; i++) { if (!addresses->addresses[i].is_balancer) ++num_addrs; @@ -636,8 +635,7 @@ static grpc_lb_policy *round_robin_create(grpc_exec_ctx *exec_ctx, /* server_name will be copied as part of the subchannel creation. This makes * the copying of server_name (a borrowed pointer) OK. */ sc_args.server_name = server_name; - sc_args.addr = - (struct sockaddr *)(&addresses->addresses[i].address.addr); + sc_args.addr = (struct sockaddr *)(&addresses->addresses[i].address.addr); sc_args.addr_len = addresses->addresses[i].address.len; sc_args.args = args->args; diff --git a/src/core/ext/resolver/dns/native/dns_resolver.c b/src/core/ext/resolver/dns/native/dns_resolver.c index fa6a254c59..4ca8a29b3a 100644 --- a/src/core/ext/resolver/dns/native/dns_resolver.c +++ b/src/core/ext/resolver/dns/native/dns_resolver.c @@ -264,7 +264,7 @@ static grpc_resolver *dns_create(grpc_resolver_args *args, grpc_arg server_name_arg; server_name_arg.type = GRPC_ARG_STRING; server_name_arg.key = GRPC_ARG_SERVER_NAME; - server_name_arg.value.string = (char*)path; + server_name_arg.value.string = (char *)path; r->channel_args = grpc_channel_args_copy_and_add(args->args, &server_name_arg, 1); gpr_backoff_init(&r->backoff_state, BACKOFF_MULTIPLIER, BACKOFF_JITTER, diff --git a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c index b81b44099e..921e8f8f15 100644 --- a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c +++ b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c @@ -175,8 +175,8 @@ static grpc_resolver *sockaddr_create(grpc_resolver_args *args, gpr_slice_buffer path_parts; gpr_slice_buffer_init(&path_parts); gpr_slice_split(path_slice, ",", &path_parts); - grpc_lb_addresses *addresses = grpc_lb_addresses_create( - path_parts.count, NULL /* user_data_vtable */); + grpc_lb_addresses *addresses = + grpc_lb_addresses_create(path_parts.count, NULL /* user_data_vtable */); bool errors_found = false; for (size_t i = 0; i < addresses->num_addresses; i++) { grpc_uri ith_uri = *args->uri; diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index cf017d0ea5..b3e1a71987 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -195,8 +195,8 @@ static grpc_channel *client_channel_factory_create_channel( grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory, const char *target, grpc_client_channel_type type, grpc_channel_args *args) { - grpc_channel *channel = grpc_channel_create(exec_ctx, target, args, - GRPC_CLIENT_CHANNEL, NULL); + grpc_channel *channel = + grpc_channel_create(exec_ctx, target, args, GRPC_CLIENT_CHANNEL, NULL); grpc_resolver *resolver = grpc_resolver_create(target, args); if (!resolver) { GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, channel, @@ -233,7 +233,7 @@ grpc_channel *grpc_insecure_channel_create(const char *target, GPR_ASSERT(!reserved); grpc_client_channel_factory *factory = - (grpc_client_channel_factory*)&client_channel_factory; + (grpc_client_channel_factory *)&client_channel_factory; grpc_channel *channel = client_channel_factory_create_channel( &exec_ctx, factory, target, GRPC_CLIENT_CHANNEL_TYPE_REGULAR, NULL); diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index 99929eb123..37e7b0bcf9 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -274,8 +274,8 @@ static grpc_channel *client_channel_factory_create_channel( const char *target, grpc_client_channel_type type, grpc_channel_args *args) { client_channel_factory *f = (client_channel_factory *)cc_factory; - grpc_channel *channel = grpc_channel_create(exec_ctx, target, args, - GRPC_CLIENT_CHANNEL, NULL); + grpc_channel *channel = + grpc_channel_create(exec_ctx, target, args, GRPC_CLIENT_CHANNEL, NULL); grpc_resolver *resolver = grpc_resolver_create(target, args); if (resolver != NULL) { grpc_client_channel_finish_initialization( diff --git a/src/core/lib/channel/channel_args.c b/src/core/lib/channel/channel_args.c index 0270d6f224..cfc072c0b5 100644 --- a/src/core/lib/channel/channel_args.c +++ b/src/core/lib/channel/channel_args.c @@ -71,13 +71,13 @@ grpc_channel_args *grpc_channel_args_copy_and_add(const grpc_channel_args *src, } grpc_channel_args *grpc_channel_args_copy_and_remove( - const grpc_channel_args *src, const char** to_remove, + const grpc_channel_args *src, const char **to_remove, size_t num_to_remove) { return grpc_channel_args_copy_and_add_and_remove(src, to_remove, num_to_remove, NULL, 0); } -static bool should_remove_arg(const grpc_arg* arg, const char** to_remove, +static bool should_remove_arg(const grpc_arg *arg, const char **to_remove, size_t num_to_remove) { for (size_t i = 0; i < num_to_remove; ++i) { if (strcmp(arg->key, to_remove[i]) == 0) return true; @@ -86,7 +86,7 @@ static bool should_remove_arg(const grpc_arg* arg, const char** to_remove, } grpc_channel_args *grpc_channel_args_copy_and_add_and_remove( - const grpc_channel_args *src, const char** to_remove, size_t num_to_remove, + const grpc_channel_args *src, const char **to_remove, size_t num_to_remove, const grpc_arg *to_add, size_t num_to_add) { // Figure out how many args we'll be copying. size_t num_args_to_copy = 0; diff --git a/src/core/lib/channel/channel_args.h b/src/core/lib/channel/channel_args.h index 1508d23748..1e05303471 100644 --- a/src/core/lib/channel/channel_args.h +++ b/src/core/lib/channel/channel_args.h @@ -54,12 +54,12 @@ grpc_channel_args *grpc_channel_args_copy_and_add(const grpc_channel_args *src, /** Copies the arguments in \a src except for those whose keys are in \a to_remove. */ grpc_channel_args *grpc_channel_args_copy_and_remove( - const grpc_channel_args *src, const char** to_remove, size_t num_to_remove); + const grpc_channel_args *src, const char **to_remove, size_t num_to_remove); /** Copies the arguments from \a src except for those whose keys are in \a to_remove and appends the arguments in \a to_add. */ grpc_channel_args *grpc_channel_args_copy_and_add_and_remove( - const grpc_channel_args *src, const char** to_remove, size_t num_to_remove, + const grpc_channel_args *src, const char **to_remove, size_t num_to_remove, const grpc_arg *to_add, size_t num_to_add); /** Concatenate args from \a a and \a b into a new instance */ diff --git a/test/core/end2end/fake_resolver.c b/test/core/end2end/fake_resolver.c index 0dcfdcf43b..c5a916ef8b 100644 --- a/test/core/end2end/fake_resolver.c +++ b/test/core/end2end/fake_resolver.c @@ -174,8 +174,8 @@ static grpc_resolver* fake_resolver_create(grpc_resolver_factory* factory, gpr_slice_buffer path_parts; gpr_slice_buffer_init(&path_parts); gpr_slice_split(path_slice, ",", &path_parts); - grpc_lb_addresses* addresses = grpc_lb_addresses_create( - path_parts.count, NULL /* user_data_vtable */); + grpc_lb_addresses* addresses = + grpc_lb_addresses_create(path_parts.count, NULL /* user_data_vtable */); bool errors_found = false; for (size_t i = 0; i < addresses->num_addresses; i++) { grpc_uri ith_uri = *args->uri; -- cgit v1.2.3 From 6f940822c8aa0096c9dab5d9a88f0f2a178013f8 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 24 Oct 2016 14:24:16 -0700 Subject: clang-format --- src/core/lib/transport/mdstr_hash_table.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/transport/mdstr_hash_table.c b/src/core/lib/transport/mdstr_hash_table.c index 30968e91ff..8e914c420b 100644 --- a/src/core/lib/transport/mdstr_hash_table.c +++ b/src/core/lib/transport/mdstr_hash_table.c @@ -53,8 +53,7 @@ static size_t grpc_mdstr_hash_table_find_index( bool find_empty) { for (size_t i = 0; i < table->size; ++i) { const size_t idx = (key->hash + i * i) % table->size; - if (table->entries[idx].key == NULL) - return find_empty ? idx : table->size; + if (table->entries[idx].key == NULL) return find_empty ? idx : table->size; if (table->entries[idx].key == key) return idx; } return table->size; // Not found. @@ -82,8 +81,7 @@ grpc_mdstr_hash_table* grpc_mdstr_hash_table_create( // Quadratic probing gets best performance when the table is no more // than half full. table->size = num_entries * 2; - const size_t entry_size = - sizeof(grpc_mdstr_hash_table_entry) * table->size; + const size_t entry_size = sizeof(grpc_mdstr_hash_table_entry) * table->size; table->entries = gpr_malloc(entry_size); memset(table->entries, 0, entry_size); for (size_t i = 0; i < num_entries; ++i) { -- cgit v1.2.3 From 99058575be6f6a0146ea9ebd2cd1a698756bd8d5 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 25 Oct 2016 10:51:20 -0700 Subject: Remove unnecessary #ifdef in credentials code --- .../lib/security/credentials/google_default/credentials_generic.c | 4 ---- .../security/credentials/google_default/google_default_credentials.h | 2 -- 2 files changed, 6 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/security/credentials/google_default/credentials_generic.c b/src/core/lib/security/credentials/google_default/credentials_generic.c index 013e3b5451..d13d8c5200 100644 --- a/src/core/lib/security/credentials/google_default/credentials_generic.c +++ b/src/core/lib/security/credentials/google_default/credentials_generic.c @@ -33,8 +33,6 @@ #include "src/core/lib/security/credentials/google_default/google_default_credentials.h" -#ifdef GRPC_GOOGLE_CREDENTIALS_GENERIC - #include #include #include @@ -54,5 +52,3 @@ char *grpc_get_well_known_google_credentials_file_path_impl(void) { gpr_free(base); return result; } - -#endif /* GRPC_GOOGLE_CREDENTIALS_GENERIC */ diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.h b/src/core/lib/security/credentials/google_default/google_default_credentials.h index 0a5a6605e5..b55546ded0 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.h +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.h @@ -47,13 +47,11 @@ #define GRPC_GOOGLE_CREDENTIALS_PATH_SUFFIX \ GRPC_GOOGLE_CLOUD_SDK_CONFIG_DIRECTORY \ "/" GRPC_GOOGLE_WELL_KNOWN_CREDENTIALS_FILE -#define GRPC_GOOGLE_CREDENTIALS_GENERIC 1 #else #define GRPC_GOOGLE_CREDENTIALS_PATH_ENV_VAR "HOME" #define GRPC_GOOGLE_CREDENTIALS_PATH_SUFFIX \ ".config/" GRPC_GOOGLE_CLOUD_SDK_CONFIG_DIRECTORY \ "/" GRPC_GOOGLE_WELL_KNOWN_CREDENTIALS_FILE -#define GRPC_GOOGLE_CREDENTIALS_GENERIC 1 #endif void grpc_flush_cached_google_default_credentials(void); -- cgit v1.2.3 From e1e3c8bafe95d1827bcd50613e86ac111cbf0ac8 Mon Sep 17 00:00:00 2001 From: Perumaal S Date: Tue, 25 Oct 2016 11:27:18 -0700 Subject: Fix incorrect header in thd.c --- src/core/lib/support/thd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/lib') diff --git a/src/core/lib/support/thd.c b/src/core/lib/support/thd.c index 41daeb5d0e..40f53a18e5 100644 --- a/src/core/lib/support/thd.c +++ b/src/core/lib/support/thd.c @@ -33,7 +33,7 @@ /* Posix implementation for gpr threads. */ -#include +#include #include -- cgit v1.2.3 From 7d897feea994e72913ab63eb824369461930ddb1 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 25 Oct 2016 12:54:55 -0700 Subject: Fix merge issue in udp_server.c --- src/core/lib/iomgr/udp_server.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/udp_server.c b/src/core/lib/iomgr/udp_server.c index a465c2815a..fd0c7a0f9d 100644 --- a/src/core/lib/iomgr/udp_server.c +++ b/src/core/lib/iomgr/udp_server.c @@ -168,7 +168,7 @@ static void deactivated_all_ports(grpc_exec_ctx *exec_ctx, grpc_udp_server *s) { if (s->head) { grpc_udp_listener *sp; for (sp = s->head; sp; sp = sp->next) { - grpc_unlink_if_unix_domain_socket(&sp->addr.sockaddr); + grpc_unlink_if_unix_domain_socket(&sp->addr); sp->destroyed_closure.cb = destroyed_port; sp->destroyed_closure.cb_arg = s; @@ -363,8 +363,7 @@ int grpc_udp_server_add_port(grpc_udp_server *s, if (grpc_sockaddr_get_port(addr) == 0) { for (sp = s->head; sp; sp = sp->next) { sockname_temp.len = sizeof(struct sockaddr_storage); - if (0 == getsockname(sp->fd, - (struct sockaddr *)sockname_temp.addr, + if (0 == getsockname(sp->fd, (struct sockaddr *)sockname_temp.addr, (socklen_t *)&sockname_temp.len)) { port = grpc_sockaddr_get_port(&sockname_temp); if (port > 0) { -- cgit v1.2.3 From 6b5d682c981f365d1f3c1bf771f113bd727d5ee0 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 25 Oct 2016 16:13:26 -0700 Subject: Review feedback --- .../transport/chttp2/transport/chttp2_transport.c | 8 +- src/core/lib/iomgr/resource_quota.c | 117 +++---- src/core/lib/iomgr/resource_quota.h | 28 +- test/core/end2end/tests/buffer_pool_server.c | 353 --------------------- test/core/end2end/tests/resource_quota_server.c | 6 + test/core/iomgr/resource_quota_test.c | 162 +++++----- 6 files changed, 175 insertions(+), 499 deletions(-) delete mode 100644 test/core/end2end/tests/buffer_pool_server.c (limited to 'src/core/lib') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index a2668474be..562f498d88 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -2108,7 +2108,7 @@ grpc_chttp2_incoming_byte_stream *grpc_chttp2_incoming_byte_stream_create( } /******************************************************************************* - * BUFFER POOLS + * RESOURCE QUOTAS */ static void post_benign_reclaimer(grpc_exec_ctx *exec_ctx, @@ -2152,6 +2152,8 @@ static void benign_reclaimer_locked(grpc_exec_ctx *exec_ctx, void *arg, grpc_chttp2_transport *t = arg; if (error == GRPC_ERROR_NONE && grpc_chttp2_stream_map_size(&t->stream_map) == 0) { + /* Channel with no active streams: send a goaway to try and make it + * disconnect cleanly */ if (grpc_resource_quota_trace) { gpr_log(GPR_DEBUG, "HTTP2: %s - send goaway to free memory", t->peer_string); @@ -2188,6 +2190,10 @@ static void destructive_reclaimer_locked(grpc_exec_ctx *exec_ctx, void *arg, GRPC_ERROR_INT_HTTP2_ERROR, GRPC_CHTTP2_ENHANCE_YOUR_CALM)); if (n > 1) { + /* Since we cancel one stream per destructive reclaimation, if + there are more streams left, we can immediately post a new + reclaimer in case the resource quota needs to free more + memory */ post_destructive_reclaimer(exec_ctx, t); } } diff --git a/src/core/lib/iomgr/resource_quota.c b/src/core/lib/iomgr/resource_quota.c index 5466973408..4f0d16ca7e 100644 --- a/src/core/lib/iomgr/resource_quota.c +++ b/src/core/lib/iomgr/resource_quota.c @@ -49,6 +49,7 @@ struct grpc_resource_quota { gpr_refcount refs; /* Master combiner lock: all activity on a quota executes under this combiner + * (so no mutex is needed for this data structure) */ grpc_combiner *combiner; /* Size of the resource quota */ @@ -75,7 +76,7 @@ struct grpc_resource_quota { * list management */ -static void rulist_add_tail(grpc_resource_user *resource_user, +static void rulist_add_head(grpc_resource_user *resource_user, grpc_rulist list) { grpc_resource_quota *resource_quota = resource_user->resource_quota; grpc_resource_user **root = &resource_quota->roots[list]; @@ -91,7 +92,7 @@ static void rulist_add_tail(grpc_resource_user *resource_user, } } -static void rulist_add_head(grpc_resource_user *resource_user, +static void rulist_add_tail(grpc_resource_user *resource_user, grpc_rulist list) { grpc_resource_quota *resource_quota = resource_user->resource_quota; grpc_resource_user **root = &resource_quota->roots[list]; @@ -113,8 +114,8 @@ static bool rulist_empty(grpc_resource_quota *resource_quota, return resource_quota->roots[list] == NULL; } -static grpc_resource_user *rulist_pop(grpc_resource_quota *resource_quota, - grpc_rulist list) { +static grpc_resource_user *rulist_pop_tail(grpc_resource_quota *resource_quota, + grpc_rulist list) { grpc_resource_user **root = &resource_quota->roots[list]; grpc_resource_user *resource_user = *root; if (resource_user == NULL) { @@ -149,22 +150,22 @@ static void rulist_remove(grpc_resource_user *resource_user, grpc_rulist list) { } /******************************************************************************* - * buffer pool state machine + * resource quota state machine */ static bool rq_alloc(grpc_exec_ctx *exec_ctx, grpc_resource_quota *resource_quota); -static bool rq_scavenge(grpc_exec_ctx *exec_ctx, - grpc_resource_quota *resource_quota); +static bool rq_reclaim_from_per_user_free_pool( + grpc_exec_ctx *exec_ctx, grpc_resource_quota *resource_quota); static bool rq_reclaim(grpc_exec_ctx *exec_ctx, grpc_resource_quota *resource_quota, bool destructive); -static void rq_step(grpc_exec_ctx *exec_ctx, void *bp, grpc_error *error) { - grpc_resource_quota *resource_quota = bp; +static void rq_step(grpc_exec_ctx *exec_ctx, void *rq, grpc_error *error) { + grpc_resource_quota *resource_quota = rq; resource_quota->step_scheduled = false; do { if (rq_alloc(exec_ctx, resource_quota)) goto done; - } while (rq_scavenge(exec_ctx, resource_quota)); + } while (rq_reclaim_from_per_user_free_pool(exec_ctx, resource_quota)); rq_reclaim(exec_ctx, resource_quota, false) || rq_reclaim(exec_ctx, resource_quota, true); done: @@ -185,8 +186,8 @@ static void rq_step_sched(grpc_exec_ctx *exec_ctx, static bool rq_alloc(grpc_exec_ctx *exec_ctx, grpc_resource_quota *resource_quota) { grpc_resource_user *resource_user; - while ((resource_user = - rulist_pop(resource_quota, GRPC_RULIST_AWAITING_ALLOCATION))) { + while ((resource_user = rulist_pop_tail(resource_quota, + GRPC_RULIST_AWAITING_ALLOCATION))) { gpr_mu_lock(&resource_user->mu); if (resource_user->free_pool < 0 && -resource_user->free_pool <= resource_quota->free_pool) { @@ -194,13 +195,13 @@ static bool rq_alloc(grpc_exec_ctx *exec_ctx, resource_user->free_pool = 0; resource_quota->free_pool -= amt; if (grpc_resource_quota_trace) { - gpr_log(GPR_DEBUG, "BP %s %s: grant alloc %" PRId64 + gpr_log(GPR_DEBUG, "RQ %s %s: grant alloc %" PRId64 " bytes; rq_free_pool -> %" PRId64, resource_quota->name, resource_user->name, amt, resource_quota->free_pool); } } else if (grpc_resource_quota_trace && resource_user->free_pool >= 0) { - gpr_log(GPR_DEBUG, "BP %s %s: discard already satisfied alloc request", + gpr_log(GPR_DEBUG, "RQ %s %s: discard already satisfied alloc request", resource_quota->name, resource_user->name); } if (resource_user->free_pool >= 0) { @@ -208,7 +209,7 @@ static bool rq_alloc(grpc_exec_ctx *exec_ctx, grpc_exec_ctx_enqueue_list(exec_ctx, &resource_user->on_allocated, NULL); gpr_mu_unlock(&resource_user->mu); } else { - rulist_add_head(resource_user, GRPC_RULIST_AWAITING_ALLOCATION); + rulist_add_tail(resource_user, GRPC_RULIST_AWAITING_ALLOCATION); gpr_mu_unlock(&resource_user->mu); return false; } @@ -217,18 +218,18 @@ static bool rq_alloc(grpc_exec_ctx *exec_ctx, } /* returns true if any memory could be reclaimed from buffers */ -static bool rq_scavenge(grpc_exec_ctx *exec_ctx, - grpc_resource_quota *resource_quota) { +static bool rq_reclaim_from_per_user_free_pool( + grpc_exec_ctx *exec_ctx, grpc_resource_quota *resource_quota) { grpc_resource_user *resource_user; - while ((resource_user = - rulist_pop(resource_quota, GRPC_RULIST_NON_EMPTY_FREE_POOL))) { + while ((resource_user = rulist_pop_tail(resource_quota, + GRPC_RULIST_NON_EMPTY_FREE_POOL))) { gpr_mu_lock(&resource_user->mu); if (resource_user->free_pool > 0) { int64_t amt = resource_user->free_pool; resource_user->free_pool = 0; resource_quota->free_pool += amt; if (grpc_resource_quota_trace) { - gpr_log(GPR_DEBUG, "BP %s %s: scavenge %" PRId64 + gpr_log(GPR_DEBUG, "RQ %s %s: reclaim_from_per_user_free_pool %" PRId64 " bytes; rq_free_pool -> %" PRId64, resource_quota->name, resource_user->name, amt, resource_quota->free_pool); @@ -248,10 +249,10 @@ static bool rq_reclaim(grpc_exec_ctx *exec_ctx, if (resource_quota->reclaiming) return true; grpc_rulist list = destructive ? GRPC_RULIST_RECLAIMER_DESTRUCTIVE : GRPC_RULIST_RECLAIMER_BENIGN; - grpc_resource_user *resource_user = rulist_pop(resource_quota, list); + grpc_resource_user *resource_user = rulist_pop_tail(resource_quota, list); if (resource_user == NULL) return false; if (grpc_resource_quota_trace) { - gpr_log(GPR_DEBUG, "BP %s %s: initiate %s reclamation", + gpr_log(GPR_DEBUG, "RQ %s %s: initiate %s reclamation", resource_quota->name, resource_user->name, destructive ? "destructive" : "benign"); } @@ -314,33 +315,34 @@ static gpr_slice ru_slice_create(grpc_resource_user *resource_user, } /******************************************************************************* - * grpc_resource_quota internal implementation + * grpc_resource_quota internal implementation: resource user manipulation under + * the combiner */ -static void ru_allocate(grpc_exec_ctx *exec_ctx, void *bu, grpc_error *error) { - grpc_resource_user *resource_user = bu; +static void ru_allocate(grpc_exec_ctx *exec_ctx, void *ru, grpc_error *error) { + grpc_resource_user *resource_user = ru; if (rulist_empty(resource_user->resource_quota, GRPC_RULIST_AWAITING_ALLOCATION)) { rq_step_sched(exec_ctx, resource_user->resource_quota); } - rulist_add_tail(resource_user, GRPC_RULIST_AWAITING_ALLOCATION); + rulist_add_head(resource_user, GRPC_RULIST_AWAITING_ALLOCATION); } -static void ru_add_to_free_pool(grpc_exec_ctx *exec_ctx, void *bu, +static void ru_add_to_free_pool(grpc_exec_ctx *exec_ctx, void *ru, grpc_error *error) { - grpc_resource_user *resource_user = bu; + grpc_resource_user *resource_user = ru; if (!rulist_empty(resource_user->resource_quota, GRPC_RULIST_AWAITING_ALLOCATION) && rulist_empty(resource_user->resource_quota, GRPC_RULIST_NON_EMPTY_FREE_POOL)) { rq_step_sched(exec_ctx, resource_user->resource_quota); } - rulist_add_tail(resource_user, GRPC_RULIST_NON_EMPTY_FREE_POOL); + rulist_add_head(resource_user, GRPC_RULIST_NON_EMPTY_FREE_POOL); } -static void ru_post_benign_reclaimer(grpc_exec_ctx *exec_ctx, void *bu, +static void ru_post_benign_reclaimer(grpc_exec_ctx *exec_ctx, void *ru, grpc_error *error) { - grpc_resource_user *resource_user = bu; + grpc_resource_user *resource_user = ru; if (!rulist_empty(resource_user->resource_quota, GRPC_RULIST_AWAITING_ALLOCATION) && rulist_empty(resource_user->resource_quota, @@ -349,12 +351,12 @@ static void ru_post_benign_reclaimer(grpc_exec_ctx *exec_ctx, void *bu, GRPC_RULIST_RECLAIMER_BENIGN)) { rq_step_sched(exec_ctx, resource_user->resource_quota); } - rulist_add_tail(resource_user, GRPC_RULIST_RECLAIMER_BENIGN); + rulist_add_head(resource_user, GRPC_RULIST_RECLAIMER_BENIGN); } -static void ru_post_destructive_reclaimer(grpc_exec_ctx *exec_ctx, void *bu, +static void ru_post_destructive_reclaimer(grpc_exec_ctx *exec_ctx, void *ru, grpc_error *error) { - grpc_resource_user *resource_user = bu; + grpc_resource_user *resource_user = ru; if (!rulist_empty(resource_user->resource_quota, GRPC_RULIST_AWAITING_ALLOCATION) && rulist_empty(resource_user->resource_quota, @@ -365,11 +367,11 @@ static void ru_post_destructive_reclaimer(grpc_exec_ctx *exec_ctx, void *bu, GRPC_RULIST_RECLAIMER_DESTRUCTIVE)) { rq_step_sched(exec_ctx, resource_user->resource_quota); } - rulist_add_tail(resource_user, GRPC_RULIST_RECLAIMER_DESTRUCTIVE); + rulist_add_head(resource_user, GRPC_RULIST_RECLAIMER_DESTRUCTIVE); } -static void ru_destroy(grpc_exec_ctx *exec_ctx, void *bu, grpc_error *error) { - grpc_resource_user *resource_user = bu; +static void ru_destroy(grpc_exec_ctx *exec_ctx, void *ru, grpc_error *error) { + grpc_resource_user *resource_user = ru; GPR_ASSERT(resource_user->allocated == 0); for (int i = 0; i < GRPC_RULIST_COUNT; i++) { rulist_remove(resource_user, (grpc_rulist)i); @@ -387,9 +389,9 @@ static void ru_destroy(grpc_exec_ctx *exec_ctx, void *bu, grpc_error *error) { } } -static void ru_allocated_slices(grpc_exec_ctx *exec_ctx, void *ts, +static void ru_allocated_slices(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { - grpc_resource_user_slice_allocator *slice_allocator = ts; + grpc_resource_user_slice_allocator *slice_allocator = arg; if (error == GRPC_ERROR_NONE) { for (size_t i = 0; i < slice_allocator->count; i++) { gpr_slice_buffer_add_indexed( @@ -400,6 +402,11 @@ static void ru_allocated_slices(grpc_exec_ctx *exec_ctx, void *ts, grpc_closure_run(exec_ctx, &slice_allocator->on_done, GRPC_ERROR_REF(error)); } +/******************************************************************************* + * grpc_resource_quota internal implementation: quota manipulation under the + * combiner + */ + typedef struct { int64_t size; grpc_resource_quota *resource_quota; @@ -411,20 +418,14 @@ static void rq_resize(grpc_exec_ctx *exec_ctx, void *args, grpc_error *error) { int64_t delta = a->size - a->resource_quota->size; a->resource_quota->size += delta; a->resource_quota->free_pool += delta; - if (delta < 0 && a->resource_quota->free_pool < 0) { - rq_step_sched(exec_ctx, a->resource_quota); - } else if (delta > 0 && - !rulist_empty(a->resource_quota, - GRPC_RULIST_AWAITING_ALLOCATION)) { - rq_step_sched(exec_ctx, a->resource_quota); - } + rq_step_sched(exec_ctx, a->resource_quota); grpc_resource_quota_internal_unref(exec_ctx, a->resource_quota); gpr_free(a); } -static void rq_reclamation_done(grpc_exec_ctx *exec_ctx, void *bp, +static void rq_reclamation_done(grpc_exec_ctx *exec_ctx, void *rq, grpc_error *error) { - grpc_resource_quota *resource_quota = bp; + grpc_resource_quota *resource_quota = rq; resource_quota->reclaiming = false; rq_step_sched(exec_ctx, resource_quota); grpc_resource_quota_internal_unref(exec_ctx, resource_quota); @@ -434,6 +435,7 @@ static void rq_reclamation_done(grpc_exec_ctx *exec_ctx, void *bp, * grpc_resource_quota api */ +/* Public API */ grpc_resource_quota *grpc_resource_quota_create(const char *name) { grpc_resource_quota *resource_quota = gpr_malloc(sizeof(*resource_quota)); gpr_ref_init(&resource_quota->refs, 1); @@ -466,6 +468,7 @@ void grpc_resource_quota_internal_unref(grpc_exec_ctx *exec_ctx, } } +/* Public API */ void grpc_resource_quota_unref(grpc_resource_quota *resource_quota) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_resource_quota_internal_unref(&exec_ctx, resource_quota); @@ -478,10 +481,12 @@ grpc_resource_quota *grpc_resource_quota_internal_ref( return resource_quota; } +/* Public API */ void grpc_resource_quota_ref(grpc_resource_quota *resource_quota) { grpc_resource_quota_internal_ref(resource_quota); } +/* Public API */ void grpc_resource_quota_resize(grpc_resource_quota *resource_quota, size_t size) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -513,12 +518,12 @@ grpc_resource_quota *grpc_resource_quota_from_channel_args( return grpc_resource_quota_create(NULL); } -static void *rq_copy(void *bp) { - grpc_resource_quota_ref(bp); - return bp; +static void *rq_copy(void *rq) { + grpc_resource_quota_ref(rq); + return rq; } -static void rq_destroy(void *bp) { grpc_resource_quota_unref(bp); } +static void rq_destroy(void *rq) { grpc_resource_quota_unref(rq); } static int rq_cmp(void *a, void *b) { return GPR_ICMP(a, b); } @@ -604,7 +609,7 @@ void grpc_resource_user_alloc(grpc_exec_ctx *exec_ctx, if (on_done_destroy != NULL) { /* already shutdown */ if (grpc_resource_quota_trace) { - gpr_log(GPR_DEBUG, "BP %s %s: alloc %" PRIdPTR " after shutdown", + gpr_log(GPR_DEBUG, "RQ %s %s: alloc %" PRIdPTR " after shutdown", resource_user->resource_quota->name, resource_user->name, size); } grpc_exec_ctx_sched( @@ -616,7 +621,7 @@ void grpc_resource_user_alloc(grpc_exec_ctx *exec_ctx, resource_user->allocated += (int64_t)size; resource_user->free_pool -= (int64_t)size; if (grpc_resource_quota_trace) { - gpr_log(GPR_DEBUG, "BP %s %s: alloc %" PRIdPTR "; allocated -> %" PRId64 + gpr_log(GPR_DEBUG, "RQ %s %s: alloc %" PRIdPTR "; allocated -> %" PRId64 ", free_pool -> %" PRId64, resource_user->resource_quota->name, resource_user->name, size, resource_user->allocated, resource_user->free_pool); @@ -644,7 +649,7 @@ void grpc_resource_user_free(grpc_exec_ctx *exec_ctx, resource_user->free_pool += (int64_t)size; resource_user->allocated -= (int64_t)size; if (grpc_resource_quota_trace) { - gpr_log(GPR_DEBUG, "BP %s %s: free %" PRIdPTR "; allocated -> %" PRId64 + gpr_log(GPR_DEBUG, "RQ %s %s: free %" PRIdPTR "; allocated -> %" PRId64 ", free_pool -> %" PRId64, resource_user->resource_quota->name, resource_user->name, size, resource_user->allocated, resource_user->free_pool); @@ -685,7 +690,7 @@ void grpc_resource_user_post_reclaimer(grpc_exec_ctx *exec_ctx, void grpc_resource_user_finish_reclamation(grpc_exec_ctx *exec_ctx, grpc_resource_user *resource_user) { if (grpc_resource_quota_trace) { - gpr_log(GPR_DEBUG, "BP %s %s: reclamation complete", + gpr_log(GPR_DEBUG, "RQ %s %s: reclamation complete", resource_user->resource_quota->name, resource_user->name); } grpc_combiner_execute( diff --git a/src/core/lib/iomgr/resource_quota.h b/src/core/lib/iomgr/resource_quota.h index af94a19911..c15cb68310 100644 --- a/src/core/lib/iomgr/resource_quota.h +++ b/src/core/lib/iomgr/resource_quota.h @@ -106,7 +106,7 @@ struct grpc_resource_user { /* The quota this resource user consumes from */ grpc_resource_quota *resource_quota; - /* Closure to schedule an allocation onder the resource quota combiner lock */ + /* Closure to schedule an allocation under the resource quota combiner lock */ grpc_closure allocate_closure; /* Closure to publish a non empty free pool under the resource quota combiner lock */ @@ -118,12 +118,13 @@ struct grpc_resource_user { #endif gpr_mu mu; - /* Total allocated memory outstanding by this resource user; + /* Total allocated memory outstanding by this resource user in bytes; always positive */ int64_t allocated; - /* The amount of memory this user has cached for its own use: to avoid quota - contention, each resource user can keep some memory aside from the quota, - and the quota can pull it back under memory pressure. + /* The amount of memory (in bytes) this user has cached for its own use: to + avoid quota contention, each resource user can keep some memory in + addition to what it is immediately using (e.g., for caching), and the quota + can pull it back under memory pressure. This value can become negative if more memory has been requested than existed in the free pool, at which point the quota is consulted to bring this value non-negative (asynchronously). */ @@ -148,7 +149,8 @@ struct grpc_resource_user { resource user */ grpc_closure destroy_closure; /* User supplied closure to call once the user has finished shutting down AND - all outstanding allocations have been freed */ + all outstanding allocations have been freed. Real type is grpc_closure*, + but it's stored as an atomic to avoid a mutex on some fast paths. */ gpr_atm on_done_destroy_closure; /* Links in the various grpc_rulist lists */ @@ -167,7 +169,7 @@ void grpc_resource_user_shutdown(grpc_exec_ctx *exec_ctx, void grpc_resource_user_destroy(grpc_exec_ctx *exec_ctx, grpc_resource_user *resource_user); -/* Allocate from the resource user (and it's quota). +/* Allocate from the resource user (and its quota). If optional_on_done is NULL, then allocate immediately. This may push the quota over-limit, at which point reclamation will kick in. If optional_on_done is non-NULL, it will be scheduled when the allocation has @@ -191,20 +193,28 @@ void grpc_resource_user_finish_reclamation(grpc_exec_ctx *exec_ctx, /* Helper to allocate slices from a resource user */ typedef struct grpc_resource_user_slice_allocator { + /* Closure for when a resource user allocation completes */ grpc_closure on_allocated; + /* Closure to call when slices have been allocated */ grpc_closure on_done; + /* Length of slices to allocate on the current request */ size_t length; + /* Number of slices to allocate on the current request */ size_t count; + /* Destination for slices to allocate on the current request */ gpr_slice_buffer *dest; + /* Parent resource user */ grpc_resource_user *resource_user; } grpc_resource_user_slice_allocator; -/* Initialize a slice allocator */ +/* Initialize a slice allocator. + When an allocation is completed, calls \a cb with arg \p. */ void grpc_resource_user_slice_allocator_init( grpc_resource_user_slice_allocator *slice_allocator, grpc_resource_user *resource_user, grpc_iomgr_cb_func cb, void *p); -/* Allocate \a count slices of length \a length into \a dest. */ +/* Allocate \a count slices of length \a length into \a dest. Only one request + can be outstanding at a time. */ void grpc_resource_user_alloc_slices( grpc_exec_ctx *exec_ctx, grpc_resource_user_slice_allocator *slice_allocator, size_t length, diff --git a/test/core/end2end/tests/buffer_pool_server.c b/test/core/end2end/tests/buffer_pool_server.c deleted file mode 100644 index beda4f7487..0000000000 --- a/test/core/end2end/tests/buffer_pool_server.c +++ /dev/null @@ -1,353 +0,0 @@ -/* - * - * Copyright 2016, 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. - * - */ - -#include "test/core/end2end/end2end_tests.h" - -#include -#include - -#include -#include -#include -#include -#include -#include "test/core/end2end/cq_verifier.h" - -static void *tag(intptr_t t) { return (void *)t; } - -static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, - const char *test_name, - grpc_channel_args *client_args, - grpc_channel_args *server_args) { - grpc_end2end_test_fixture f; - gpr_log(GPR_INFO, "%s/%s", test_name, config.name); - f = config.create_fixture(client_args, server_args); - config.init_server(&f, server_args); - config.init_client(&f, client_args); - return f; -} - -static gpr_timespec n_seconds_time(int n) { - return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(n); -} - -static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); } - -static void drain_cq(grpc_completion_queue *cq) { - grpc_event ev; - do { - ev = grpc_completion_queue_next(cq, five_seconds_time(), NULL); - } while (ev.type != GRPC_QUEUE_SHUTDOWN); -} - -static void shutdown_server(grpc_end2end_test_fixture *f) { - if (!f->server) return; - grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); - GPR_ASSERT(grpc_completion_queue_pluck( - f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) - .type == GRPC_OP_COMPLETE); - grpc_server_destroy(f->server); - f->server = NULL; -} - -static void shutdown_client(grpc_end2end_test_fixture *f) { - if (!f->client) return; - grpc_channel_destroy(f->client); - f->client = NULL; -} - -static void end_test(grpc_end2end_test_fixture *f) { - shutdown_server(f); - shutdown_client(f); - - grpc_completion_queue_shutdown(f->cq); - drain_cq(f->cq); - grpc_completion_queue_destroy(f->cq); -} - -/* Creates and returns a gpr_slice containing random alphanumeric characters. */ -static gpr_slice generate_random_slice() { - size_t i; - static const char chars[] = "abcdefghijklmnopqrstuvwxyz1234567890"; - char output[1024 * 1024]; - for (i = 0; i < GPR_ARRAY_SIZE(output) - 1; ++i) { - output[i] = chars[rand() % (int)(sizeof(chars) - 1)]; - } - output[GPR_ARRAY_SIZE(output) - 1] = '\0'; - return gpr_slice_from_copied_string(output); -} - -void resource_quota_server(grpc_end2end_test_config config) { - grpc_resource_quota *resource_quota = - grpc_resource_quota_create("test_server"); - grpc_resource_quota_resize(resource_quota, 5 * 1024 * 1024); - -#define NUM_CALLS 100 -#define CLIENT_BASE_TAG 1000 -#define SERVER_START_BASE_TAG 2000 -#define SERVER_RECV_BASE_TAG 3000 -#define SERVER_END_BASE_TAG 4000 - - grpc_arg arg; - arg.key = GRPC_ARG_RESOURCE_QUOTA; - arg.type = GRPC_ARG_POINTER; - arg.value.pointer.p = resource_quota; - arg.value.pointer.vtable = grpc_resource_quota_arg_vtable(); - grpc_channel_args args = {1, &arg}; - - grpc_end2end_test_fixture f = - begin_test(config, "resource_quota_server", NULL, &args); - - /* Create large request and response bodies. These are big enough to require - * multiple round trips to deliver to the peer, and their exact contents of - * will be verified on completion. */ - gpr_slice request_payload_slice = generate_random_slice(); - - grpc_call *client_calls[NUM_CALLS]; - grpc_call *server_calls[NUM_CALLS]; - grpc_metadata_array initial_metadata_recv[NUM_CALLS]; - grpc_metadata_array trailing_metadata_recv[NUM_CALLS]; - grpc_metadata_array request_metadata_recv[NUM_CALLS]; - grpc_call_details call_details[NUM_CALLS]; - grpc_status_code status[NUM_CALLS]; - char *details[NUM_CALLS]; - size_t details_capacity[NUM_CALLS]; - grpc_byte_buffer *request_payload_recv[NUM_CALLS]; - int was_cancelled[NUM_CALLS]; - grpc_call_error error; - int pending_client_calls = 0; - int pending_server_start_calls = 0; - int pending_server_recv_calls = 0; - int pending_server_end_calls = 0; - int cancelled_calls_on_client = 0; - int cancelled_calls_on_server = 0; - - grpc_byte_buffer *request_payload = - grpc_raw_byte_buffer_create(&request_payload_slice, 1); - - grpc_op ops[6]; - grpc_op *op; - - for (int i = 0; i < NUM_CALLS; i++) { - grpc_metadata_array_init(&initial_metadata_recv[i]); - grpc_metadata_array_init(&trailing_metadata_recv[i]); - grpc_metadata_array_init(&request_metadata_recv[i]); - grpc_call_details_init(&call_details[i]); - details[i] = NULL; - details_capacity[i] = 0; - request_payload_recv[i] = NULL; - was_cancelled[i] = 0; - } - - for (int i = 0; i < NUM_CALLS; i++) { - error = grpc_server_request_call( - f.server, &server_calls[i], &call_details[i], &request_metadata_recv[i], - f.cq, f.cq, tag(SERVER_START_BASE_TAG + i)); - GPR_ASSERT(GRPC_CALL_OK == error); - - pending_server_start_calls++; - } - - for (int i = 0; i < NUM_CALLS; i++) { - client_calls[i] = grpc_channel_create_call( - f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo", - "foo.test.google.fr", n_seconds_time(60), NULL); - - memset(ops, 0, sizeof(ops)); - op = ops; - op->op = GRPC_OP_SEND_INITIAL_METADATA; - op->data.send_initial_metadata.count = 0; - op->flags = 0; - op->reserved = NULL; - op++; - op->op = GRPC_OP_SEND_MESSAGE; - op->data.send_message = request_payload; - op->flags = 0; - op->reserved = NULL; - op++; - op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; - op->flags = 0; - op->reserved = NULL; - op++; - op->op = GRPC_OP_RECV_INITIAL_METADATA; - op->data.recv_initial_metadata = &initial_metadata_recv[i]; - op->flags = 0; - op->reserved = NULL; - op++; - op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; - op->data.recv_status_on_client.trailing_metadata = - &trailing_metadata_recv[i]; - op->data.recv_status_on_client.status = &status[i]; - op->data.recv_status_on_client.status_details = &details[i]; - op->data.recv_status_on_client.status_details_capacity = - &details_capacity[i]; - op->flags = 0; - op->reserved = NULL; - op++; - error = grpc_call_start_batch(client_calls[i], ops, (size_t)(op - ops), - tag(CLIENT_BASE_TAG + i), NULL); - GPR_ASSERT(GRPC_CALL_OK == error); - - pending_client_calls++; - } - - while (pending_client_calls + pending_server_recv_calls + - pending_server_end_calls > - 0) { - grpc_event ev = grpc_completion_queue_next(f.cq, n_seconds_time(10), NULL); - GPR_ASSERT(ev.type == GRPC_OP_COMPLETE); - - int ev_tag = (int)(intptr_t)ev.tag; - if (ev_tag < CLIENT_BASE_TAG) { - abort(); /* illegal tag */ - } else if (ev_tag < SERVER_START_BASE_TAG) { - /* client call finished */ - int call_id = ev_tag - CLIENT_BASE_TAG; - GPR_ASSERT(call_id >= 0); - GPR_ASSERT(call_id < NUM_CALLS); - switch (status[call_id]) { - case GRPC_STATUS_RESOURCE_EXHAUSTED: - cancelled_calls_on_client++; - break; - case GRPC_STATUS_OK: - break; - default: - gpr_log(GPR_ERROR, "Unexpected status code: %d", status[call_id]); - abort(); - } - GPR_ASSERT(pending_client_calls > 0); - - grpc_metadata_array_destroy(&initial_metadata_recv[call_id]); - grpc_metadata_array_destroy(&trailing_metadata_recv[call_id]); - grpc_call_destroy(client_calls[call_id]); - gpr_free(details[call_id]); - - pending_client_calls--; - } else if (ev_tag < SERVER_RECV_BASE_TAG) { - /* new incoming call to the server */ - int call_id = ev_tag - SERVER_START_BASE_TAG; - GPR_ASSERT(call_id >= 0); - GPR_ASSERT(call_id < NUM_CALLS); - - memset(ops, 0, sizeof(ops)); - op = ops; - op->op = GRPC_OP_SEND_INITIAL_METADATA; - op->data.send_initial_metadata.count = 0; - op->flags = 0; - op->reserved = NULL; - op++; - op->op = GRPC_OP_RECV_MESSAGE; - op->data.recv_message = &request_payload_recv[call_id]; - op->flags = 0; - op->reserved = NULL; - op++; - error = - grpc_call_start_batch(server_calls[call_id], ops, (size_t)(op - ops), - tag(SERVER_RECV_BASE_TAG + call_id), NULL); - GPR_ASSERT(GRPC_CALL_OK == error); - - GPR_ASSERT(pending_server_start_calls > 0); - pending_server_start_calls--; - pending_server_recv_calls++; - - grpc_call_details_destroy(&call_details[call_id]); - grpc_metadata_array_destroy(&request_metadata_recv[call_id]); - } else if (ev_tag < SERVER_END_BASE_TAG) { - /* finished read on the server */ - int call_id = ev_tag - SERVER_RECV_BASE_TAG; - GPR_ASSERT(call_id >= 0); - GPR_ASSERT(call_id < NUM_CALLS); - - if (ev.success) { - if (request_payload_recv[call_id] != NULL) { - grpc_byte_buffer_destroy(request_payload_recv[call_id]); - request_payload_recv[call_id] = NULL; - } - } else { - GPR_ASSERT(request_payload_recv[call_id] == NULL); - } - - memset(ops, 0, sizeof(ops)); - op = ops; - op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; - op->data.recv_close_on_server.cancelled = &was_cancelled[call_id]; - op->flags = 0; - op->reserved = NULL; - op++; - op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; - op->data.send_status_from_server.trailing_metadata_count = 0; - op->data.send_status_from_server.status = GRPC_STATUS_OK; - op->data.send_status_from_server.status_details = "xyz"; - op->flags = 0; - op->reserved = NULL; - op++; - error = - grpc_call_start_batch(server_calls[call_id], ops, (size_t)(op - ops), - tag(SERVER_END_BASE_TAG + call_id), NULL); - GPR_ASSERT(GRPC_CALL_OK == error); - - GPR_ASSERT(pending_server_recv_calls > 0); - pending_server_recv_calls--; - pending_server_end_calls++; - } else { - int call_id = ev_tag - SERVER_END_BASE_TAG; - GPR_ASSERT(call_id >= 0); - GPR_ASSERT(call_id < NUM_CALLS); - - if (was_cancelled[call_id]) { - cancelled_calls_on_server++; - } - GPR_ASSERT(pending_server_end_calls > 0); - pending_server_end_calls--; - - grpc_call_destroy(server_calls[call_id]); - } - } - - gpr_log( - GPR_INFO, - "Done. %d total calls: %d cancelled at server, %d cancelled at client.", - NUM_CALLS, cancelled_calls_on_server, cancelled_calls_on_client); - - GPR_ASSERT(cancelled_calls_on_client >= cancelled_calls_on_server); - GPR_ASSERT(cancelled_calls_on_server >= 0.9 * cancelled_calls_on_client); - - grpc_byte_buffer_destroy(request_payload); - gpr_slice_unref(request_payload_slice); - grpc_resource_quota_unref(resource_quota); - - end_test(&f); - config.tear_down_data(&f); -} - -void resource_quota_server_pre_init(void) {} diff --git a/test/core/end2end/tests/resource_quota_server.c b/test/core/end2end/tests/resource_quota_server.c index a2431eed7e..6170444373 100644 --- a/test/core/end2end/tests/resource_quota_server.c +++ b/test/core/end2end/tests/resource_quota_server.c @@ -339,7 +339,13 @@ void resource_quota_server(grpc_end2end_test_config config) { "Done. %d total calls: %d cancelled at server, %d cancelled at client.", NUM_CALLS, cancelled_calls_on_server, cancelled_calls_on_client); + /* The server call may be cancelled after it's received it's status, but + * before the client does: this means that we should see strictly more + * failures on the client than on the server */ GPR_ASSERT(cancelled_calls_on_client >= cancelled_calls_on_server); + /* However, we shouldn't see radically more... 0.9 is a guessed bound on what + * we'd want that ratio to be... to at least trigger some investigation should + * that ratio become much higher. */ GPR_ASSERT(cancelled_calls_on_server >= 0.9 * cancelled_calls_on_client); grpc_byte_buffer_destroy(request_payload); diff --git a/test/core/iomgr/resource_quota_test.c b/test/core/iomgr/resource_quota_test.c index 0fb94a495d..5e2f9f8359 100644 --- a/test/core/iomgr/resource_quota_test.c +++ b/test/core/iomgr/resource_quota_test.c @@ -96,29 +96,29 @@ static void test_no_op(void) { static void test_resize_then_destroy(void) { gpr_log(GPR_INFO, "** test_resize_then_destroy **"); - grpc_resource_quota *p = + grpc_resource_quota *q = grpc_resource_quota_create("test_resize_then_destroy"); - grpc_resource_quota_resize(p, 1024 * 1024); - grpc_resource_quota_unref(p); + grpc_resource_quota_resize(q, 1024 * 1024); + grpc_resource_quota_unref(q); } static void test_resource_user_no_op(void) { gpr_log(GPR_INFO, "** test_resource_user_no_op **"); - grpc_resource_quota *p = + grpc_resource_quota *q = grpc_resource_quota_create("test_resource_user_no_op"); grpc_resource_user usr; - grpc_resource_user_init(&usr, p, "usr"); - grpc_resource_quota_unref(p); + grpc_resource_user_init(&usr, q, "usr"); + grpc_resource_quota_unref(q); destroy_user(&usr); } static void test_instant_alloc_then_free(void) { gpr_log(GPR_INFO, "** test_instant_alloc_then_free **"); - grpc_resource_quota *p = + grpc_resource_quota *q = grpc_resource_quota_create("test_instant_alloc_then_free"); - grpc_resource_quota_resize(p, 1024 * 1024); + grpc_resource_quota_resize(q, 1024 * 1024); grpc_resource_user usr; - grpc_resource_user_init(&usr, p, "usr"); + grpc_resource_user_init(&usr, q, "usr"); { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_resource_user_alloc(&exec_ctx, &usr, 1024, NULL); @@ -129,34 +129,34 @@ static void test_instant_alloc_then_free(void) { grpc_resource_user_free(&exec_ctx, &usr, 1024); grpc_exec_ctx_finish(&exec_ctx); } - grpc_resource_quota_unref(p); + grpc_resource_quota_unref(q); destroy_user(&usr); } static void test_instant_alloc_free_pair(void) { gpr_log(GPR_INFO, "** test_instant_alloc_free_pair **"); - grpc_resource_quota *p = + grpc_resource_quota *q = grpc_resource_quota_create("test_instant_alloc_free_pair"); - grpc_resource_quota_resize(p, 1024 * 1024); + grpc_resource_quota_resize(q, 1024 * 1024); grpc_resource_user usr; - grpc_resource_user_init(&usr, p, "usr"); + grpc_resource_user_init(&usr, q, "usr"); { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_resource_user_alloc(&exec_ctx, &usr, 1024, NULL); grpc_resource_user_free(&exec_ctx, &usr, 1024); grpc_exec_ctx_finish(&exec_ctx); } - grpc_resource_quota_unref(p); + grpc_resource_quota_unref(q); destroy_user(&usr); } static void test_simple_async_alloc(void) { gpr_log(GPR_INFO, "** test_simple_async_alloc **"); - grpc_resource_quota *p = + grpc_resource_quota *q = grpc_resource_quota_create("test_simple_async_alloc"); - grpc_resource_quota_resize(p, 1024 * 1024); + grpc_resource_quota_resize(q, 1024 * 1024); grpc_resource_user usr; - grpc_resource_user_init(&usr, p, "usr"); + grpc_resource_user_init(&usr, q, "usr"); { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -169,17 +169,17 @@ static void test_simple_async_alloc(void) { grpc_resource_user_free(&exec_ctx, &usr, 1024); grpc_exec_ctx_finish(&exec_ctx); } - grpc_resource_quota_unref(p); + grpc_resource_quota_unref(q); destroy_user(&usr); } static void test_async_alloc_blocked_by_size(void) { gpr_log(GPR_INFO, "** test_async_alloc_blocked_by_size **"); - grpc_resource_quota *p = + grpc_resource_quota *q = grpc_resource_quota_create("test_async_alloc_blocked_by_size"); - grpc_resource_quota_resize(p, 1); + grpc_resource_quota_resize(q, 1); grpc_resource_user usr; - grpc_resource_user_init(&usr, p, "usr"); + grpc_resource_user_init(&usr, q, "usr"); bool done = false; { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -187,25 +187,25 @@ static void test_async_alloc_blocked_by_size(void) { grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(!done); } - grpc_resource_quota_resize(p, 1024); + grpc_resource_quota_resize(q, 1024); GPR_ASSERT(done); { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_resource_user_free(&exec_ctx, &usr, 1024); grpc_exec_ctx_finish(&exec_ctx); } - grpc_resource_quota_unref(p); + grpc_resource_quota_unref(q); destroy_user(&usr); } static void test_scavenge(void) { gpr_log(GPR_INFO, "** test_scavenge **"); - grpc_resource_quota *p = grpc_resource_quota_create("test_scavenge"); - grpc_resource_quota_resize(p, 1024); + grpc_resource_quota *q = grpc_resource_quota_create("test_scavenge"); + grpc_resource_quota_resize(q, 1024); grpc_resource_user usr1; grpc_resource_user usr2; - grpc_resource_user_init(&usr1, p, "usr1"); - grpc_resource_user_init(&usr2, p, "usr2"); + grpc_resource_user_init(&usr1, q, "usr1"); + grpc_resource_user_init(&usr2, q, "usr2"); { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -230,19 +230,19 @@ static void test_scavenge(void) { grpc_resource_user_free(&exec_ctx, &usr2, 1024); grpc_exec_ctx_finish(&exec_ctx); } - grpc_resource_quota_unref(p); + grpc_resource_quota_unref(q); destroy_user(&usr1); destroy_user(&usr2); } static void test_scavenge_blocked(void) { gpr_log(GPR_INFO, "** test_scavenge_blocked **"); - grpc_resource_quota *p = grpc_resource_quota_create("test_scavenge_blocked"); - grpc_resource_quota_resize(p, 1024); + grpc_resource_quota *q = grpc_resource_quota_create("test_scavenge_blocked"); + grpc_resource_quota_resize(q, 1024); grpc_resource_user usr1; grpc_resource_user usr2; - grpc_resource_user_init(&usr1, p, "usr1"); - grpc_resource_user_init(&usr2, p, "usr2"); + grpc_resource_user_init(&usr1, q, "usr1"); + grpc_resource_user_init(&usr2, q, "usr2"); bool done; { done = false; @@ -269,18 +269,18 @@ static void test_scavenge_blocked(void) { grpc_resource_user_free(&exec_ctx, &usr2, 1024); grpc_exec_ctx_finish(&exec_ctx); } - grpc_resource_quota_unref(p); + grpc_resource_quota_unref(q); destroy_user(&usr1); destroy_user(&usr2); } static void test_blocked_until_scheduled_reclaim(void) { gpr_log(GPR_INFO, "** test_blocked_until_scheduled_reclaim **"); - grpc_resource_quota *p = + grpc_resource_quota *q = grpc_resource_quota_create("test_blocked_until_scheduled_reclaim"); - grpc_resource_quota_resize(p, 1024); + grpc_resource_quota_resize(q, 1024); grpc_resource_user usr; - grpc_resource_user_init(&usr, p, "usr"); + grpc_resource_user_init(&usr, q, "usr"); { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -309,19 +309,19 @@ static void test_blocked_until_scheduled_reclaim(void) { grpc_resource_user_free(&exec_ctx, &usr, 1024); grpc_exec_ctx_finish(&exec_ctx); } - grpc_resource_quota_unref(p); + grpc_resource_quota_unref(q); destroy_user(&usr); } static void test_blocked_until_scheduled_reclaim_and_scavenge(void) { gpr_log(GPR_INFO, "** test_blocked_until_scheduled_reclaim_and_scavenge **"); - grpc_resource_quota *p = grpc_resource_quota_create( + grpc_resource_quota *q = grpc_resource_quota_create( "test_blocked_until_scheduled_reclaim_and_scavenge"); - grpc_resource_quota_resize(p, 1024); + grpc_resource_quota_resize(q, 1024); grpc_resource_user usr1; grpc_resource_user usr2; - grpc_resource_user_init(&usr1, p, "usr1"); - grpc_resource_user_init(&usr2, p, "usr2"); + grpc_resource_user_init(&usr1, q, "usr1"); + grpc_resource_user_init(&usr2, q, "usr2"); { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -350,18 +350,18 @@ static void test_blocked_until_scheduled_reclaim_and_scavenge(void) { grpc_resource_user_free(&exec_ctx, &usr2, 1024); grpc_exec_ctx_finish(&exec_ctx); } - grpc_resource_quota_unref(p); + grpc_resource_quota_unref(q); destroy_user(&usr1); destroy_user(&usr2); } static void test_blocked_until_scheduled_destructive_reclaim(void) { gpr_log(GPR_INFO, "** test_blocked_until_scheduled_destructive_reclaim **"); - grpc_resource_quota *p = grpc_resource_quota_create( + grpc_resource_quota *q = grpc_resource_quota_create( "test_blocked_until_scheduled_destructive_reclaim"); - grpc_resource_quota_resize(p, 1024); + grpc_resource_quota_resize(q, 1024); grpc_resource_user usr; - grpc_resource_user_init(&usr, p, "usr"); + grpc_resource_user_init(&usr, q, "usr"); { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -390,17 +390,17 @@ static void test_blocked_until_scheduled_destructive_reclaim(void) { grpc_resource_user_free(&exec_ctx, &usr, 1024); grpc_exec_ctx_finish(&exec_ctx); } - grpc_resource_quota_unref(p); + grpc_resource_quota_unref(q); destroy_user(&usr); } static void test_unused_reclaim_is_cancelled(void) { gpr_log(GPR_INFO, "** test_unused_reclaim_is_cancelled **"); - grpc_resource_quota *p = + grpc_resource_quota *q = grpc_resource_quota_create("test_unused_reclaim_is_cancelled"); - grpc_resource_quota_resize(p, 1024); + grpc_resource_quota_resize(q, 1024); grpc_resource_user usr; - grpc_resource_user_init(&usr, p, "usr"); + grpc_resource_user_init(&usr, q, "usr"); bool benign_done = false; bool destructive_done = false; { @@ -414,7 +414,7 @@ static void test_unused_reclaim_is_cancelled(void) { GPR_ASSERT(!benign_done); GPR_ASSERT(!destructive_done); } - grpc_resource_quota_unref(p); + grpc_resource_quota_unref(q); destroy_user(&usr); GPR_ASSERT(benign_done); GPR_ASSERT(destructive_done); @@ -422,11 +422,11 @@ static void test_unused_reclaim_is_cancelled(void) { static void test_benign_reclaim_is_preferred(void) { gpr_log(GPR_INFO, "** test_benign_reclaim_is_preferred **"); - grpc_resource_quota *p = + grpc_resource_quota *q = grpc_resource_quota_create("test_benign_reclaim_is_preferred"); - grpc_resource_quota_resize(p, 1024); + grpc_resource_quota_resize(q, 1024); grpc_resource_user usr; - grpc_resource_user_init(&usr, p, "usr"); + grpc_resource_user_init(&usr, q, "usr"); bool benign_done = false; bool destructive_done = false; { @@ -462,7 +462,7 @@ static void test_benign_reclaim_is_preferred(void) { grpc_resource_user_free(&exec_ctx, &usr, 1024); grpc_exec_ctx_finish(&exec_ctx); } - grpc_resource_quota_unref(p); + grpc_resource_quota_unref(q); destroy_user(&usr); GPR_ASSERT(benign_done); GPR_ASSERT(destructive_done); @@ -470,11 +470,11 @@ static void test_benign_reclaim_is_preferred(void) { static void test_multiple_reclaims_can_be_triggered(void) { gpr_log(GPR_INFO, "** test_multiple_reclaims_can_be_triggered **"); - grpc_resource_quota *p = + grpc_resource_quota *q = grpc_resource_quota_create("test_multiple_reclaims_can_be_triggered"); - grpc_resource_quota_resize(p, 1024); + grpc_resource_quota_resize(q, 1024); grpc_resource_user usr; - grpc_resource_user_init(&usr, p, "usr"); + grpc_resource_user_init(&usr, q, "usr"); bool benign_done = false; bool destructive_done = false; { @@ -510,7 +510,7 @@ static void test_multiple_reclaims_can_be_triggered(void) { grpc_resource_user_free(&exec_ctx, &usr, 1024); grpc_exec_ctx_finish(&exec_ctx); } - grpc_resource_quota_unref(p); + grpc_resource_quota_unref(q); destroy_user(&usr); GPR_ASSERT(benign_done); GPR_ASSERT(destructive_done); @@ -519,11 +519,11 @@ static void test_multiple_reclaims_can_be_triggered(void) { static void test_resource_user_stays_allocated_until_memory_released(void) { gpr_log(GPR_INFO, "** test_resource_user_stays_allocated_until_memory_released **"); - grpc_resource_quota *p = grpc_resource_quota_create( + grpc_resource_quota *q = grpc_resource_quota_create( "test_resource_user_stays_allocated_until_memory_released"); - grpc_resource_quota_resize(p, 1024 * 1024); + grpc_resource_quota_resize(q, 1024 * 1024); grpc_resource_user usr; - grpc_resource_user_init(&usr, p, "usr"); + grpc_resource_user_init(&usr, q, "usr"); bool done = false; { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -532,7 +532,7 @@ static void test_resource_user_stays_allocated_until_memory_released(void) { } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_quota_unref(p); + grpc_resource_quota_unref(q); grpc_resource_user_shutdown(&exec_ctx, &usr, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(!done); @@ -550,14 +550,16 @@ static void test_resource_user_stays_allocated_until_memory_released(void) { } } -static void test_pools_merged_on_resource_user_deletion(void) { +static void +test_resource_user_stays_allocated_and_reclaimers_unrun_until_memory_released( + void) { gpr_log(GPR_INFO, "** test_pools_merged_on_resource_user_deletion **"); - grpc_resource_quota *p = + grpc_resource_quota *q = grpc_resource_quota_create("test_pools_merged_on_resource_user_deletion"); - grpc_resource_quota_resize(p, 1024); + grpc_resource_quota_resize(q, 1024); for (int i = 0; i < 10; i++) { grpc_resource_user usr; - grpc_resource_user_init(&usr, p, "usr"); + grpc_resource_user_init(&usr, q, "usr"); bool done = false; bool reclaimer_cancelled = false; { @@ -596,16 +598,16 @@ static void test_pools_merged_on_resource_user_deletion(void) { grpc_exec_ctx_finish(&exec_ctx); } } - grpc_resource_quota_unref(p); + grpc_resource_quota_unref(q); } static void test_reclaimers_can_be_posted_repeatedly(void) { gpr_log(GPR_INFO, "** test_reclaimers_can_be_posted_repeatedly **"); - grpc_resource_quota *p = + grpc_resource_quota *q = grpc_resource_quota_create("test_reclaimers_can_be_posted_repeatedly"); - grpc_resource_quota_resize(p, 1024); + grpc_resource_quota_resize(q, 1024); grpc_resource_user usr; - grpc_resource_user_init(&usr, p, "usr"); + grpc_resource_user_init(&usr, q, "usr"); { bool allocated = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -638,17 +640,17 @@ static void test_reclaimers_can_be_posted_repeatedly(void) { grpc_exec_ctx_finish(&exec_ctx); } destroy_user(&usr); - grpc_resource_quota_unref(p); + grpc_resource_quota_unref(q); } static void test_one_slice(void) { gpr_log(GPR_INFO, "** test_one_slice **"); - grpc_resource_quota *p = grpc_resource_quota_create("test_one_slice"); - grpc_resource_quota_resize(p, 1024); + grpc_resource_quota *q = grpc_resource_quota_create("test_one_slice"); + grpc_resource_quota_resize(q, 1024); grpc_resource_user usr; - grpc_resource_user_init(&usr, p, "usr"); + grpc_resource_user_init(&usr, q, "usr"); grpc_resource_user_slice_allocator alloc; int num_allocs = 0; @@ -668,18 +670,18 @@ static void test_one_slice(void) { gpr_slice_buffer_destroy(&buffer); destroy_user(&usr); - grpc_resource_quota_unref(p); + grpc_resource_quota_unref(q); } static void test_one_slice_deleted_late(void) { gpr_log(GPR_INFO, "** test_one_slice_deleted_late **"); - grpc_resource_quota *p = + grpc_resource_quota *q = grpc_resource_quota_create("test_one_slice_deleted_late"); - grpc_resource_quota_resize(p, 1024); + grpc_resource_quota_resize(q, 1024); grpc_resource_user usr; - grpc_resource_user_init(&usr, p, "usr"); + grpc_resource_user_init(&usr, q, "usr"); grpc_resource_user_slice_allocator alloc; int num_allocs = 0; @@ -705,7 +707,7 @@ static void test_one_slice_deleted_late(void) { GPR_ASSERT(!done); } - grpc_resource_quota_unref(p); + grpc_resource_quota_unref(q); gpr_slice_buffer_destroy(&buffer); GPR_ASSERT(done); { @@ -734,7 +736,7 @@ int main(int argc, char **argv) { test_benign_reclaim_is_preferred(); test_multiple_reclaims_can_be_triggered(); test_resource_user_stays_allocated_until_memory_released(); - test_pools_merged_on_resource_user_deletion(); + test_resource_user_stays_allocated_and_reclaimers_unrun_until_memory_released(); test_reclaimers_can_be_posted_repeatedly(); test_one_slice(); test_one_slice_deleted_late(); -- cgit v1.2.3 From bfe56801ad916248f43c2dcfaa96bd7442a65ae2 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 26 Oct 2016 12:45:20 -0700 Subject: Move method_config module from ext/client_channel to lib/transport. --- BUILD | 16 +- CMakeLists.txt | 6 +- Makefile | 7 +- binding.gyp | 2 +- build.yaml | 4 +- config.m4 | 2 +- gRPC-Core.podspec | 6 +- grpc.gemspec | 4 +- package.xml | 4 +- src/core/ext/client_channel/client_channel.c | 2 +- src/core/ext/client_channel/method_config.c | 340 --------------------- src/core/ext/client_channel/method_config.h | 136 --------- src/core/lib/channel/message_size_filter.c | 2 +- src/core/lib/transport/method_config.c | 340 +++++++++++++++++++++ src/core/lib/transport/method_config.h | 136 +++++++++ src/python/grpcio/grpc_core_dependencies.py | 2 +- test/core/end2end/fake_resolver.c | 2 +- tools/doxygen/Doxyfile.core.internal | 4 +- tools/run_tests/sources_and_headers.json | 6 +- tools/run_tests/tests.json | 2 + vsprojects/vcxproj/grpc/grpc.vcxproj | 6 +- vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 12 +- .../vcxproj/grpc_test_util/grpc_test_util.vcxproj | 3 + .../grpc_test_util/grpc_test_util.vcxproj.filters | 6 + .../vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 6 +- .../grpc_unsecure/grpc_unsecure.vcxproj.filters | 12 +- 26 files changed, 540 insertions(+), 528 deletions(-) delete mode 100644 src/core/ext/client_channel/method_config.c delete mode 100644 src/core/ext/client_channel/method_config.h create mode 100644 src/core/lib/transport/method_config.c create mode 100644 src/core/lib/transport/method_config.h (limited to 'src/core/lib') diff --git a/BUILD b/BUILD index e4ee8e93f7..241215e0d6 100644 --- a/BUILD +++ b/BUILD @@ -249,6 +249,7 @@ cc_library( "src/core/lib/transport/mdstr_hash_table.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/method_config.h", "src/core/lib/transport/static_metadata.h", "src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/transport.h", @@ -306,7 +307,6 @@ cc_library( "src/core/ext/client_channel/lb_policy.h", "src/core/ext/client_channel/lb_policy_factory.h", "src/core/ext/client_channel/lb_policy_registry.h", - "src/core/ext/client_channel/method_config.h", "src/core/ext/client_channel/parse_address.h", "src/core/ext/client_channel/resolver.h", "src/core/ext/client_channel/resolver_factory.h", @@ -433,6 +433,7 @@ cc_library( "src/core/lib/transport/mdstr_hash_table.c", "src/core/lib/transport/metadata.c", "src/core/lib/transport/metadata_batch.c", + "src/core/lib/transport/method_config.c", "src/core/lib/transport/static_metadata.c", "src/core/lib/transport/timeout_encoding.c", "src/core/lib/transport/transport.c", @@ -499,7 +500,6 @@ cc_library( "src/core/ext/client_channel/lb_policy.c", "src/core/ext/client_channel/lb_policy_factory.c", "src/core/ext/client_channel/lb_policy_registry.c", - "src/core/ext/client_channel/method_config.c", "src/core/ext/client_channel/parse_address.c", "src/core/ext/client_channel/resolver.c", "src/core/ext/client_channel/resolver_factory.c", @@ -672,6 +672,7 @@ cc_library( "src/core/lib/transport/mdstr_hash_table.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/method_config.h", "src/core/lib/transport/static_metadata.h", "src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/transport.h", @@ -706,7 +707,6 @@ cc_library( "src/core/ext/client_channel/lb_policy.h", "src/core/ext/client_channel/lb_policy_factory.h", "src/core/ext/client_channel/lb_policy_registry.h", - "src/core/ext/client_channel/method_config.h", "src/core/ext/client_channel/parse_address.h", "src/core/ext/client_channel/resolver.h", "src/core/ext/client_channel/resolver_factory.h", @@ -841,6 +841,7 @@ cc_library( "src/core/lib/transport/mdstr_hash_table.c", "src/core/lib/transport/metadata.c", "src/core/lib/transport/metadata_batch.c", + "src/core/lib/transport/method_config.c", "src/core/lib/transport/static_metadata.c", "src/core/lib/transport/timeout_encoding.c", "src/core/lib/transport/transport.c", @@ -882,7 +883,6 @@ cc_library( "src/core/ext/client_channel/lb_policy.c", "src/core/ext/client_channel/lb_policy_factory.c", "src/core/ext/client_channel/lb_policy_registry.c", - "src/core/ext/client_channel/method_config.c", "src/core/ext/client_channel/parse_address.c", "src/core/ext/client_channel/resolver.c", "src/core/ext/client_channel/resolver_factory.c", @@ -1050,6 +1050,7 @@ cc_library( "src/core/lib/transport/mdstr_hash_table.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/method_config.h", "src/core/lib/transport/static_metadata.h", "src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/transport.h", @@ -1083,7 +1084,6 @@ cc_library( "src/core/ext/client_channel/lb_policy.h", "src/core/ext/client_channel/lb_policy_factory.h", "src/core/ext/client_channel/lb_policy_registry.h", - "src/core/ext/client_channel/method_config.h", "src/core/ext/client_channel/parse_address.h", "src/core/ext/client_channel/resolver.h", "src/core/ext/client_channel/resolver_factory.h", @@ -1211,6 +1211,7 @@ cc_library( "src/core/lib/transport/mdstr_hash_table.c", "src/core/lib/transport/metadata.c", "src/core/lib/transport/metadata_batch.c", + "src/core/lib/transport/method_config.c", "src/core/lib/transport/static_metadata.c", "src/core/lib/transport/timeout_encoding.c", "src/core/lib/transport/transport.c", @@ -1252,7 +1253,6 @@ cc_library( "src/core/ext/client_channel/lb_policy.c", "src/core/ext/client_channel/lb_policy_factory.c", "src/core/ext/client_channel/lb_policy_registry.c", - "src/core/ext/client_channel/method_config.c", "src/core/ext/client_channel/parse_address.c", "src/core/ext/client_channel/resolver.c", "src/core/ext/client_channel/resolver_factory.c", @@ -2136,6 +2136,7 @@ objc_library( "src/core/lib/transport/mdstr_hash_table.c", "src/core/lib/transport/metadata.c", "src/core/lib/transport/metadata_batch.c", + "src/core/lib/transport/method_config.c", "src/core/lib/transport/static_metadata.c", "src/core/lib/transport/timeout_encoding.c", "src/core/lib/transport/transport.c", @@ -2202,7 +2203,6 @@ objc_library( "src/core/ext/client_channel/lb_policy.c", "src/core/ext/client_channel/lb_policy_factory.c", "src/core/ext/client_channel/lb_policy_registry.c", - "src/core/ext/client_channel/method_config.c", "src/core/ext/client_channel/parse_address.c", "src/core/ext/client_channel/resolver.c", "src/core/ext/client_channel/resolver_factory.c", @@ -2354,6 +2354,7 @@ objc_library( "src/core/lib/transport/mdstr_hash_table.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/method_config.h", "src/core/lib/transport/static_metadata.h", "src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/transport.h", @@ -2411,7 +2412,6 @@ objc_library( "src/core/ext/client_channel/lb_policy.h", "src/core/ext/client_channel/lb_policy_factory.h", "src/core/ext/client_channel/lb_policy_registry.h", - "src/core/ext/client_channel/method_config.h", "src/core/ext/client_channel/parse_address.h", "src/core/ext/client_channel/resolver.h", "src/core/ext/client_channel/resolver_factory.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f301f54b9..707efd7811 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -391,6 +391,7 @@ add_library(grpc src/core/lib/transport/mdstr_hash_table.c src/core/lib/transport/metadata.c src/core/lib/transport/metadata_batch.c + src/core/lib/transport/method_config.c src/core/lib/transport/static_metadata.c src/core/lib/transport/timeout_encoding.c src/core/lib/transport/transport.c @@ -457,7 +458,6 @@ add_library(grpc src/core/ext/client_channel/lb_policy.c src/core/ext/client_channel/lb_policy_factory.c src/core/ext/client_channel/lb_policy_registry.c - src/core/ext/client_channel/method_config.c src/core/ext/client_channel/parse_address.c src/core/ext/client_channel/resolver.c src/core/ext/client_channel/resolver_factory.c @@ -663,6 +663,7 @@ add_library(grpc_cronet src/core/lib/transport/mdstr_hash_table.c src/core/lib/transport/metadata.c src/core/lib/transport/metadata_batch.c + src/core/lib/transport/method_config.c src/core/lib/transport/static_metadata.c src/core/lib/transport/timeout_encoding.c src/core/lib/transport/transport.c @@ -704,7 +705,6 @@ add_library(grpc_cronet src/core/ext/client_channel/lb_policy.c src/core/ext/client_channel/lb_policy_factory.c src/core/ext/client_channel/lb_policy_registry.c - src/core/ext/client_channel/method_config.c src/core/ext/client_channel/parse_address.c src/core/ext/client_channel/resolver.c src/core/ext/client_channel/resolver_factory.c @@ -907,6 +907,7 @@ add_library(grpc_unsecure src/core/lib/transport/mdstr_hash_table.c src/core/lib/transport/metadata.c src/core/lib/transport/metadata_batch.c + src/core/lib/transport/method_config.c src/core/lib/transport/static_metadata.c src/core/lib/transport/timeout_encoding.c src/core/lib/transport/transport.c @@ -948,7 +949,6 @@ add_library(grpc_unsecure src/core/ext/client_channel/lb_policy.c src/core/ext/client_channel/lb_policy_factory.c src/core/ext/client_channel/lb_policy_registry.c - src/core/ext/client_channel/method_config.c src/core/ext/client_channel/parse_address.c src/core/ext/client_channel/resolver.c src/core/ext/client_channel/resolver_factory.c diff --git a/Makefile b/Makefile index f0dec1a4a3..d5c9207724 100644 --- a/Makefile +++ b/Makefile @@ -2676,6 +2676,7 @@ LIBGRPC_SRC = \ src/core/lib/transport/mdstr_hash_table.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ + src/core/lib/transport/method_config.c \ src/core/lib/transport/static_metadata.c \ src/core/lib/transport/timeout_encoding.c \ src/core/lib/transport/transport.c \ @@ -2742,7 +2743,6 @@ LIBGRPC_SRC = \ src/core/ext/client_channel/lb_policy.c \ src/core/ext/client_channel/lb_policy_factory.c \ src/core/ext/client_channel/lb_policy_registry.c \ - src/core/ext/client_channel/method_config.c \ src/core/ext/client_channel/parse_address.c \ src/core/ext/client_channel/resolver.c \ src/core/ext/client_channel/resolver_factory.c \ @@ -2966,6 +2966,7 @@ LIBGRPC_CRONET_SRC = \ src/core/lib/transport/mdstr_hash_table.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ + src/core/lib/transport/method_config.c \ src/core/lib/transport/static_metadata.c \ src/core/lib/transport/timeout_encoding.c \ src/core/lib/transport/transport.c \ @@ -3007,7 +3008,6 @@ LIBGRPC_CRONET_SRC = \ src/core/ext/client_channel/lb_policy.c \ src/core/ext/client_channel/lb_policy_factory.c \ src/core/ext/client_channel/lb_policy_registry.c \ - src/core/ext/client_channel/method_config.c \ src/core/ext/client_channel/parse_address.c \ src/core/ext/client_channel/resolver.c \ src/core/ext/client_channel/resolver_factory.c \ @@ -3247,6 +3247,7 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/lib/transport/mdstr_hash_table.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ + src/core/lib/transport/method_config.c \ src/core/lib/transport/static_metadata.c \ src/core/lib/transport/timeout_encoding.c \ src/core/lib/transport/transport.c \ @@ -3455,6 +3456,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/transport/mdstr_hash_table.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ + src/core/lib/transport/method_config.c \ src/core/lib/transport/static_metadata.c \ src/core/lib/transport/timeout_encoding.c \ src/core/lib/transport/transport.c \ @@ -3496,7 +3498,6 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/client_channel/lb_policy.c \ src/core/ext/client_channel/lb_policy_factory.c \ src/core/ext/client_channel/lb_policy_registry.c \ - src/core/ext/client_channel/method_config.c \ src/core/ext/client_channel/parse_address.c \ src/core/ext/client_channel/resolver.c \ src/core/ext/client_channel/resolver_factory.c \ diff --git a/binding.gyp b/binding.gyp index 390cc52c8f..a752d4c6b3 100644 --- a/binding.gyp +++ b/binding.gyp @@ -669,6 +669,7 @@ 'src/core/lib/transport/mdstr_hash_table.c', 'src/core/lib/transport/metadata.c', 'src/core/lib/transport/metadata_batch.c', + 'src/core/lib/transport/method_config.c', 'src/core/lib/transport/static_metadata.c', 'src/core/lib/transport/timeout_encoding.c', 'src/core/lib/transport/transport.c', @@ -735,7 +736,6 @@ 'src/core/ext/client_channel/lb_policy.c', 'src/core/ext/client_channel/lb_policy_factory.c', 'src/core/ext/client_channel/lb_policy_registry.c', - 'src/core/ext/client_channel/method_config.c', 'src/core/ext/client_channel/parse_address.c', 'src/core/ext/client_channel/resolver.c', 'src/core/ext/client_channel/resolver_factory.c', diff --git a/build.yaml b/build.yaml index 17828ae8eb..149514f9c1 100644 --- a/build.yaml +++ b/build.yaml @@ -253,6 +253,7 @@ filegroups: - src/core/lib/transport/mdstr_hash_table.h - src/core/lib/transport/metadata.h - src/core/lib/transport/metadata_batch.h + - src/core/lib/transport/method_config.h - src/core/lib/transport/static_metadata.h - src/core/lib/transport/timeout_encoding.h - src/core/lib/transport/transport.h @@ -359,6 +360,7 @@ filegroups: - src/core/lib/transport/mdstr_hash_table.c - src/core/lib/transport/metadata.c - src/core/lib/transport/metadata_batch.c + - src/core/lib/transport/method_config.c - src/core/lib/transport/static_metadata.c - src/core/lib/transport/timeout_encoding.c - src/core/lib/transport/transport.c @@ -377,7 +379,6 @@ filegroups: - src/core/ext/client_channel/lb_policy.h - src/core/ext/client_channel/lb_policy_factory.h - src/core/ext/client_channel/lb_policy_registry.h - - src/core/ext/client_channel/method_config.h - src/core/ext/client_channel/parse_address.h - src/core/ext/client_channel/resolver.h - src/core/ext/client_channel/resolver_factory.h @@ -398,7 +399,6 @@ filegroups: - src/core/ext/client_channel/lb_policy.c - src/core/ext/client_channel/lb_policy_factory.c - src/core/ext/client_channel/lb_policy_registry.c - - src/core/ext/client_channel/method_config.c - src/core/ext/client_channel/parse_address.c - src/core/ext/client_channel/resolver.c - src/core/ext/client_channel/resolver_factory.c diff --git a/config.m4 b/config.m4 index 298708a839..854ec569c8 100644 --- a/config.m4 +++ b/config.m4 @@ -185,6 +185,7 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/transport/mdstr_hash_table.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ + src/core/lib/transport/method_config.c \ src/core/lib/transport/static_metadata.c \ src/core/lib/transport/timeout_encoding.c \ src/core/lib/transport/transport.c \ @@ -251,7 +252,6 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/client_channel/lb_policy.c \ src/core/ext/client_channel/lb_policy_factory.c \ src/core/ext/client_channel/lb_policy_registry.c \ - src/core/ext/client_channel/method_config.c \ src/core/ext/client_channel/parse_address.c \ src/core/ext/client_channel/resolver.c \ src/core/ext/client_channel/resolver_factory.c \ diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 6fc65f6c69..8735a35031 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -336,6 +336,7 @@ Pod::Spec.new do |s| 'src/core/lib/transport/mdstr_hash_table.h', 'src/core/lib/transport/metadata.h', 'src/core/lib/transport/metadata_batch.h', + 'src/core/lib/transport/method_config.h', 'src/core/lib/transport/static_metadata.h', 'src/core/lib/transport/timeout_encoding.h', 'src/core/lib/transport/transport.h', @@ -393,7 +394,6 @@ Pod::Spec.new do |s| 'src/core/ext/client_channel/lb_policy.h', 'src/core/ext/client_channel/lb_policy_factory.h', 'src/core/ext/client_channel/lb_policy_registry.h', - 'src/core/ext/client_channel/method_config.h', 'src/core/ext/client_channel/parse_address.h', 'src/core/ext/client_channel/resolver.h', 'src/core/ext/client_channel/resolver_factory.h', @@ -524,6 +524,7 @@ Pod::Spec.new do |s| 'src/core/lib/transport/mdstr_hash_table.c', 'src/core/lib/transport/metadata.c', 'src/core/lib/transport/metadata_batch.c', + 'src/core/lib/transport/method_config.c', 'src/core/lib/transport/static_metadata.c', 'src/core/lib/transport/timeout_encoding.c', 'src/core/lib/transport/transport.c', @@ -590,7 +591,6 @@ Pod::Spec.new do |s| 'src/core/ext/client_channel/lb_policy.c', 'src/core/ext/client_channel/lb_policy_factory.c', 'src/core/ext/client_channel/lb_policy_registry.c', - 'src/core/ext/client_channel/method_config.c', 'src/core/ext/client_channel/parse_address.c', 'src/core/ext/client_channel/resolver.c', 'src/core/ext/client_channel/resolver_factory.c', @@ -731,6 +731,7 @@ Pod::Spec.new do |s| 'src/core/lib/transport/mdstr_hash_table.h', 'src/core/lib/transport/metadata.h', 'src/core/lib/transport/metadata_batch.h', + 'src/core/lib/transport/method_config.h', 'src/core/lib/transport/static_metadata.h', 'src/core/lib/transport/timeout_encoding.h', 'src/core/lib/transport/transport.h', @@ -788,7 +789,6 @@ Pod::Spec.new do |s| 'src/core/ext/client_channel/lb_policy.h', 'src/core/ext/client_channel/lb_policy_factory.h', 'src/core/ext/client_channel/lb_policy_registry.h', - 'src/core/ext/client_channel/method_config.h', 'src/core/ext/client_channel/parse_address.h', 'src/core/ext/client_channel/resolver.h', 'src/core/ext/client_channel/resolver_factory.h', diff --git a/grpc.gemspec b/grpc.gemspec index d991d561f4..f70ffb7fda 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -256,6 +256,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/transport/mdstr_hash_table.h ) s.files += %w( src/core/lib/transport/metadata.h ) s.files += %w( src/core/lib/transport/metadata_batch.h ) + s.files += %w( src/core/lib/transport/method_config.h ) s.files += %w( src/core/lib/transport/static_metadata.h ) s.files += %w( src/core/lib/transport/timeout_encoding.h ) s.files += %w( src/core/lib/transport/transport.h ) @@ -313,7 +314,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/client_channel/lb_policy.h ) s.files += %w( src/core/ext/client_channel/lb_policy_factory.h ) s.files += %w( src/core/ext/client_channel/lb_policy_registry.h ) - s.files += %w( src/core/ext/client_channel/method_config.h ) s.files += %w( src/core/ext/client_channel/parse_address.h ) s.files += %w( src/core/ext/client_channel/resolver.h ) s.files += %w( src/core/ext/client_channel/resolver_factory.h ) @@ -444,6 +444,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/transport/mdstr_hash_table.c ) s.files += %w( src/core/lib/transport/metadata.c ) s.files += %w( src/core/lib/transport/metadata_batch.c ) + s.files += %w( src/core/lib/transport/method_config.c ) s.files += %w( src/core/lib/transport/static_metadata.c ) s.files += %w( src/core/lib/transport/timeout_encoding.c ) s.files += %w( src/core/lib/transport/transport.c ) @@ -510,7 +511,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/client_channel/lb_policy.c ) s.files += %w( src/core/ext/client_channel/lb_policy_factory.c ) s.files += %w( src/core/ext/client_channel/lb_policy_registry.c ) - s.files += %w( src/core/ext/client_channel/method_config.c ) s.files += %w( src/core/ext/client_channel/parse_address.c ) s.files += %w( src/core/ext/client_channel/resolver.c ) s.files += %w( src/core/ext/client_channel/resolver_factory.c ) diff --git a/package.xml b/package.xml index 5f637f816e..27ec0ceffc 100644 --- a/package.xml +++ b/package.xml @@ -263,6 +263,7 @@ + @@ -320,7 +321,6 @@ - @@ -451,6 +451,7 @@ + @@ -517,7 +518,6 @@ - diff --git a/src/core/ext/client_channel/client_channel.c b/src/core/ext/client_channel/client_channel.c index 55bb877576..7c1212f8fa 100644 --- a/src/core/ext/client_channel/client_channel.c +++ b/src/core/ext/client_channel/client_channel.c @@ -43,7 +43,6 @@ #include #include "src/core/ext/client_channel/lb_policy_registry.h" -#include "src/core/ext/client_channel/method_config.h" #include "src/core/ext/client_channel/subchannel.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/connected_channel.h" @@ -56,6 +55,7 @@ #include "src/core/lib/transport/connectivity_state.h" #include "src/core/lib/transport/metadata.h" #include "src/core/lib/transport/metadata_batch.h" +#include "src/core/lib/transport/method_config.h" #include "src/core/lib/transport/static_metadata.h" /* Client channel implementation */ diff --git a/src/core/ext/client_channel/method_config.c b/src/core/ext/client_channel/method_config.c deleted file mode 100644 index 4313ad5e0e..0000000000 --- a/src/core/ext/client_channel/method_config.c +++ /dev/null @@ -1,340 +0,0 @@ -// -// 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. -// - -#include "src/core/ext/client_channel/method_config.h" - -#include - -#include -#include -#include -#include -#include - -#include "src/core/lib/transport/mdstr_hash_table.h" -#include "src/core/lib/transport/metadata.h" - -// -// grpc_method_config -// - -// bool vtable - -static void* bool_copy(void* valuep) { - bool value = *(bool*)valuep; - bool* new_value = gpr_malloc(sizeof(bool)); - *new_value = value; - return new_value; -} - -static int bool_cmp(void* v1, void* v2) { - bool b1 = *(bool*)v1; - bool b2 = *(bool*)v2; - if (!b1 && b2) return -1; - if (b1 && !b2) return 1; - return 0; -} - -static grpc_mdstr_hash_table_vtable bool_vtable = {gpr_free, bool_copy, - bool_cmp}; - -// timespec vtable - -static void* timespec_copy(void* valuep) { - gpr_timespec value = *(gpr_timespec*)valuep; - gpr_timespec* new_value = gpr_malloc(sizeof(gpr_timespec)); - *new_value = value; - return new_value; -} - -static int timespec_cmp(void* v1, void* v2) { - return gpr_time_cmp(*(gpr_timespec*)v1, *(gpr_timespec*)v2); -} - -static grpc_mdstr_hash_table_vtable timespec_vtable = {gpr_free, timespec_copy, - timespec_cmp}; - -// int32 vtable - -static void* int32_copy(void* valuep) { - int32_t value = *(int32_t*)valuep; - int32_t* new_value = gpr_malloc(sizeof(int32_t)); - *new_value = value; - return new_value; -} - -static int int32_cmp(void* v1, void* v2) { - int32_t i1 = *(int32_t*)v1; - int32_t i2 = *(int32_t*)v2; - if (i1 < i2) return -1; - if (i1 > i2) return 1; - return 0; -} - -static grpc_mdstr_hash_table_vtable int32_vtable = {gpr_free, int32_copy, - int32_cmp}; - -// Hash table keys. -#define GRPC_METHOD_CONFIG_WAIT_FOR_READY "grpc.wait_for_ready" // bool -#define GRPC_METHOD_CONFIG_TIMEOUT "grpc.timeout" // gpr_timespec -#define GRPC_METHOD_CONFIG_MAX_REQUEST_MESSAGE_BYTES \ - "grpc.max_request_message_bytes" // int32 -#define GRPC_METHOD_CONFIG_MAX_RESPONSE_MESSAGE_BYTES \ - "grpc.max_response_message_bytes" // int32 - -struct grpc_method_config { - grpc_mdstr_hash_table* table; - grpc_mdstr* wait_for_ready_key; - grpc_mdstr* timeout_key; - grpc_mdstr* max_request_message_bytes_key; - grpc_mdstr* max_response_message_bytes_key; -}; - -grpc_method_config* grpc_method_config_create( - bool* wait_for_ready, gpr_timespec* timeout, - int32_t* max_request_message_bytes, int32_t* max_response_message_bytes) { - grpc_method_config* method_config = gpr_malloc(sizeof(grpc_method_config)); - memset(method_config, 0, sizeof(grpc_method_config)); - method_config->wait_for_ready_key = - grpc_mdstr_from_string(GRPC_METHOD_CONFIG_WAIT_FOR_READY); - method_config->timeout_key = - grpc_mdstr_from_string(GRPC_METHOD_CONFIG_TIMEOUT); - method_config->max_request_message_bytes_key = - grpc_mdstr_from_string(GRPC_METHOD_CONFIG_MAX_REQUEST_MESSAGE_BYTES); - method_config->max_response_message_bytes_key = - grpc_mdstr_from_string(GRPC_METHOD_CONFIG_MAX_RESPONSE_MESSAGE_BYTES); - grpc_mdstr_hash_table_entry entries[4]; - size_t num_entries = 0; - if (wait_for_ready != NULL) { - entries[num_entries].key = method_config->wait_for_ready_key; - entries[num_entries].value = wait_for_ready; - entries[num_entries].vtable = &bool_vtable; - ++num_entries; - } - if (timeout != NULL) { - entries[num_entries].key = method_config->timeout_key; - entries[num_entries].value = timeout; - entries[num_entries].vtable = ×pec_vtable; - ++num_entries; - } - if (max_request_message_bytes != NULL) { - entries[num_entries].key = method_config->max_request_message_bytes_key; - entries[num_entries].value = max_request_message_bytes; - entries[num_entries].vtable = &int32_vtable; - ++num_entries; - } - if (max_response_message_bytes != NULL) { - entries[num_entries].key = method_config->max_response_message_bytes_key; - entries[num_entries].value = max_response_message_bytes; - entries[num_entries].vtable = &int32_vtable; - ++num_entries; - } - method_config->table = grpc_mdstr_hash_table_create(num_entries, entries); - return method_config; -} - -grpc_method_config* grpc_method_config_ref(grpc_method_config* method_config) { - grpc_mdstr_hash_table_ref(method_config->table); - return method_config; -} - -void grpc_method_config_unref(grpc_method_config* method_config) { - if (grpc_mdstr_hash_table_unref(method_config->table)) { - GRPC_MDSTR_UNREF(method_config->wait_for_ready_key); - GRPC_MDSTR_UNREF(method_config->timeout_key); - GRPC_MDSTR_UNREF(method_config->max_request_message_bytes_key); - GRPC_MDSTR_UNREF(method_config->max_response_message_bytes_key); - gpr_free(method_config); - } -} - -int grpc_method_config_cmp(const grpc_method_config* method_config1, - const grpc_method_config* method_config2) { - return grpc_mdstr_hash_table_cmp(method_config1->table, - method_config2->table); -} - -const bool* grpc_method_config_get_wait_for_ready( - const grpc_method_config* method_config) { - return grpc_mdstr_hash_table_get(method_config->table, - method_config->wait_for_ready_key); -} - -const gpr_timespec* grpc_method_config_get_timeout( - const grpc_method_config* method_config) { - return grpc_mdstr_hash_table_get(method_config->table, - method_config->timeout_key); -} - -const int32_t* grpc_method_config_get_max_request_message_bytes( - const grpc_method_config* method_config) { - return grpc_mdstr_hash_table_get( - method_config->table, method_config->max_request_message_bytes_key); -} - -const int32_t* grpc_method_config_get_max_response_message_bytes( - const grpc_method_config* method_config) { - return grpc_mdstr_hash_table_get( - method_config->table, method_config->max_response_message_bytes_key); -} - -// -// grpc_method_config_table -// - -static void method_config_unref(void* valuep) { - grpc_method_config_unref(valuep); -} - -static void* method_config_ref(void* valuep) { - return grpc_method_config_ref(valuep); -} - -static int method_config_cmp(void* valuep1, void* valuep2) { - return grpc_method_config_cmp(valuep1, valuep2); -} - -static const grpc_mdstr_hash_table_vtable method_config_table_vtable = { - method_config_unref, method_config_ref, method_config_cmp}; - -grpc_method_config_table* grpc_method_config_table_create( - size_t num_entries, grpc_method_config_table_entry* entries) { - grpc_mdstr_hash_table_entry* hash_table_entries = - gpr_malloc(sizeof(grpc_mdstr_hash_table_entry) * num_entries); - for (size_t i = 0; i < num_entries; ++i) { - hash_table_entries[i].key = entries[i].method_name; - hash_table_entries[i].value = entries[i].method_config; - hash_table_entries[i].vtable = &method_config_table_vtable; - } - grpc_method_config_table* method_config_table = - grpc_mdstr_hash_table_create(num_entries, hash_table_entries); - gpr_free(hash_table_entries); - return method_config_table; -} - -grpc_method_config_table* grpc_method_config_table_ref( - grpc_method_config_table* table) { - return grpc_mdstr_hash_table_ref(table); -} - -void grpc_method_config_table_unref(grpc_method_config_table* table) { - grpc_mdstr_hash_table_unref(table); -} - -int grpc_method_config_table_cmp(const grpc_method_config_table* table1, - const grpc_method_config_table* table2) { - return grpc_mdstr_hash_table_cmp(table1, table2); -} - -void* grpc_method_config_table_get(const grpc_mdstr_hash_table* table, - const grpc_mdstr* path) { - void* value = grpc_mdstr_hash_table_get(table, path); - // If we didn't find a match for the path, try looking for a wildcard - // entry (i.e., change "/service/method" to "/service/*"). - if (value == NULL) { - const char* path_str = grpc_mdstr_as_c_string(path); - const char* sep = strrchr(path_str, '/') + 1; - const size_t len = (size_t)(sep - path_str); - char* buf = gpr_malloc(len + 2); // '*' and NUL - memcpy(buf, path_str, len); - buf[len] = '*'; - buf[len + 1] = '\0'; - grpc_mdstr* wildcard_path = grpc_mdstr_from_string(buf); - gpr_free(buf); - value = grpc_mdstr_hash_table_get(table, wildcard_path); - GRPC_MDSTR_UNREF(wildcard_path); - } - return value; -} - -static void* copy_arg(void* p) { return grpc_method_config_table_ref(p); } - -static void destroy_arg(void* p) { grpc_method_config_table_unref(p); } - -static int cmp_arg(void* p1, void* p2) { - return grpc_method_config_table_cmp(p1, p2); -} - -static grpc_arg_pointer_vtable arg_vtable = {copy_arg, destroy_arg, cmp_arg}; - -grpc_arg grpc_method_config_table_create_channel_arg( - grpc_method_config_table* table) { - grpc_arg arg; - arg.type = GRPC_ARG_POINTER; - arg.key = GRPC_ARG_SERVICE_CONFIG; - arg.value.pointer.p = table; - arg.value.pointer.vtable = &arg_vtable; - return arg; -} - -// State used by convert_entry() below. -typedef struct conversion_state { - void* (*convert_value)(const grpc_method_config* method_config); - const grpc_mdstr_hash_table_vtable* vtable; - size_t num_entries; - grpc_mdstr_hash_table_entry* entries; -} conversion_state; - -// A function to be passed to grpc_mdstr_hash_table_iterate() to create -// a copy of the entries. -static void convert_entry(const grpc_mdstr_hash_table_entry* entry, - void* user_data) { - conversion_state* state = user_data; - state->entries[state->num_entries].key = GRPC_MDSTR_REF(entry->key); - state->entries[state->num_entries].value = state->convert_value(entry->value); - state->entries[state->num_entries].vtable = state->vtable; - ++state->num_entries; -} - -grpc_mdstr_hash_table* grpc_method_config_table_convert( - const grpc_method_config_table* table, - void* (*convert_value)(const grpc_method_config* method_config), - const grpc_mdstr_hash_table_vtable* vtable) { - // Create an array of the entries in the table with converted values. - conversion_state state; - state.convert_value = convert_value; - state.vtable = vtable; - state.num_entries = 0; - state.entries = gpr_malloc(sizeof(grpc_mdstr_hash_table_entry) * - grpc_mdstr_hash_table_num_entries(table)); - grpc_mdstr_hash_table_iterate(table, convert_entry, &state); - // Create a new table based on the array we just constructed. - grpc_mdstr_hash_table* new_table = - grpc_mdstr_hash_table_create(state.num_entries, state.entries); - // Clean up the array. - for (size_t i = 0; i < state.num_entries; ++i) { - GRPC_MDSTR_UNREF(state.entries[i].key); - vtable->destroy_value(state.entries[i].value); - } - gpr_free(state.entries); - // Return the new table. - return new_table; -} diff --git a/src/core/ext/client_channel/method_config.h b/src/core/ext/client_channel/method_config.h deleted file mode 100644 index 4cbeee5625..0000000000 --- a/src/core/ext/client_channel/method_config.h +++ /dev/null @@ -1,136 +0,0 @@ -// -// Copyright 2016, 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. -// - -#ifndef GRPC_CORE_EXT_CLIENT_CHANNEL_METHOD_CONFIG_H -#define GRPC_CORE_EXT_CLIENT_CHANNEL_METHOD_CONFIG_H - -#include - -#include -#include - -#include "src/core/lib/transport/mdstr_hash_table.h" -#include "src/core/lib/transport/metadata.h" - -/// Per-method configuration. -typedef struct grpc_method_config grpc_method_config; - -/// Creates a grpc_method_config with the specified parameters. -/// Any parameter may be NULL to indicate that the value is unset. -/// -/// \a wait_for_ready indicates whether the client should wait until the -/// request deadline for the channel to become ready, even if there is a -/// temporary failure before the deadline while attempting to connect. -/// -/// \a timeout indicates the timeout for calls. -/// -/// \a max_request_message_bytes and \a max_response_message_bytes -/// indicate the maximum sizes of the request (checked when sending) and -/// response (checked when receiving) messages. -grpc_method_config* grpc_method_config_create( - bool* wait_for_ready, gpr_timespec* timeout, - int32_t* max_request_message_bytes, int32_t* max_response_message_bytes); - -grpc_method_config* grpc_method_config_ref(grpc_method_config* method_config); -void grpc_method_config_unref(grpc_method_config* method_config); - -/// Compares two grpc_method_configs. -/// The sort order is stable but undefined. -int grpc_method_config_cmp(const grpc_method_config* method_config1, - const grpc_method_config* method_config2); - -/// These methods return NULL if the requested field is unset. -/// The caller does NOT take ownership of the result. -const bool* grpc_method_config_get_wait_for_ready( - const grpc_method_config* method_config); -const gpr_timespec* grpc_method_config_get_timeout( - const grpc_method_config* method_config); -const int32_t* grpc_method_config_get_max_request_message_bytes( - const grpc_method_config* method_config); -const int32_t* grpc_method_config_get_max_response_message_bytes( - const grpc_method_config* method_config); - -/// A table of method configs. -typedef grpc_mdstr_hash_table grpc_method_config_table; - -typedef struct grpc_method_config_table_entry { - /// The name is of one of the following forms: - /// service/method -- specifies exact service and method name - /// service/* -- matches all methods for the specified service - grpc_mdstr* method_name; - grpc_method_config* method_config; -} grpc_method_config_table_entry; - -/// Takes new references to all keys and values in \a entries. -grpc_method_config_table* grpc_method_config_table_create( - size_t num_entries, grpc_method_config_table_entry* entries); - -grpc_method_config_table* grpc_method_config_table_ref( - grpc_method_config_table* table); -void grpc_method_config_table_unref(grpc_method_config_table* table); - -/// Compares two grpc_method_config_tables. -/// The sort order is stable but undefined. -int grpc_method_config_table_cmp(const grpc_method_config_table* table1, - const grpc_method_config_table* table2); - -/// Gets the method config for the specified \a path, which should be of -/// the form "/service/method". -/// Returns NULL if the method has no config. -/// Caller does NOT own a reference to the result. -/// -/// Note: This returns a void* instead of a grpc_method_config* so that -/// it can also be used for tables constructed via -/// grpc_method_config_table_convert(). -void* grpc_method_config_table_get(const grpc_mdstr_hash_table* table, - const grpc_mdstr* path); - -/// Returns a channel arg containing \a table. -grpc_arg grpc_method_config_table_create_channel_arg( - grpc_method_config_table* table); - -/// Generates a new table from \a table whose values are converted to a -/// new form via the \a convert_value function. The new table will use -/// \a vtable for its values. -/// -/// This is generally used to convert the table's value type from -/// grpc_method_config to a simple struct containing only the parameters -/// relevant to a particular filter, thus avoiding the need for a hash -/// table lookup on the fast path. In that scenario, \a convert_value -/// will return a new instance of the struct containing the values from -/// the grpc_method_config, and \a vtable provides the methods for -/// operating on the struct type. -grpc_mdstr_hash_table* grpc_method_config_table_convert( - const grpc_method_config_table* table, - void* (*convert_value)(const grpc_method_config* method_config), - const grpc_mdstr_hash_table_vtable* vtable); - -#endif /* GRPC_CORE_EXT_CLIENT_CHANNEL_METHOD_CONFIG_H */ diff --git a/src/core/lib/channel/message_size_filter.c b/src/core/lib/channel/message_size_filter.c index b8b2546035..7dc5ae0df1 100644 --- a/src/core/lib/channel/message_size_filter.c +++ b/src/core/lib/channel/message_size_filter.c @@ -38,8 +38,8 @@ #include #include -#include "src/core/ext/client_channel/method_config.h" #include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/transport/method_config.h" #define DEFAULT_MAX_SEND_MESSAGE_LENGTH -1 // Unlimited. // The protobuf library will (by default) start warning at 100 megs. diff --git a/src/core/lib/transport/method_config.c b/src/core/lib/transport/method_config.c new file mode 100644 index 0000000000..57d97700bf --- /dev/null +++ b/src/core/lib/transport/method_config.c @@ -0,0 +1,340 @@ +// +// 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. +// + +#include "src/core/lib/transport/method_config.h" + +#include + +#include +#include +#include +#include +#include + +#include "src/core/lib/transport/mdstr_hash_table.h" +#include "src/core/lib/transport/metadata.h" + +// +// grpc_method_config +// + +// bool vtable + +static void* bool_copy(void* valuep) { + bool value = *(bool*)valuep; + bool* new_value = gpr_malloc(sizeof(bool)); + *new_value = value; + return new_value; +} + +static int bool_cmp(void* v1, void* v2) { + bool b1 = *(bool*)v1; + bool b2 = *(bool*)v2; + if (!b1 && b2) return -1; + if (b1 && !b2) return 1; + return 0; +} + +static grpc_mdstr_hash_table_vtable bool_vtable = {gpr_free, bool_copy, + bool_cmp}; + +// timespec vtable + +static void* timespec_copy(void* valuep) { + gpr_timespec value = *(gpr_timespec*)valuep; + gpr_timespec* new_value = gpr_malloc(sizeof(gpr_timespec)); + *new_value = value; + return new_value; +} + +static int timespec_cmp(void* v1, void* v2) { + return gpr_time_cmp(*(gpr_timespec*)v1, *(gpr_timespec*)v2); +} + +static grpc_mdstr_hash_table_vtable timespec_vtable = {gpr_free, timespec_copy, + timespec_cmp}; + +// int32 vtable + +static void* int32_copy(void* valuep) { + int32_t value = *(int32_t*)valuep; + int32_t* new_value = gpr_malloc(sizeof(int32_t)); + *new_value = value; + return new_value; +} + +static int int32_cmp(void* v1, void* v2) { + int32_t i1 = *(int32_t*)v1; + int32_t i2 = *(int32_t*)v2; + if (i1 < i2) return -1; + if (i1 > i2) return 1; + return 0; +} + +static grpc_mdstr_hash_table_vtable int32_vtable = {gpr_free, int32_copy, + int32_cmp}; + +// Hash table keys. +#define GRPC_METHOD_CONFIG_WAIT_FOR_READY "grpc.wait_for_ready" // bool +#define GRPC_METHOD_CONFIG_TIMEOUT "grpc.timeout" // gpr_timespec +#define GRPC_METHOD_CONFIG_MAX_REQUEST_MESSAGE_BYTES \ + "grpc.max_request_message_bytes" // int32 +#define GRPC_METHOD_CONFIG_MAX_RESPONSE_MESSAGE_BYTES \ + "grpc.max_response_message_bytes" // int32 + +struct grpc_method_config { + grpc_mdstr_hash_table* table; + grpc_mdstr* wait_for_ready_key; + grpc_mdstr* timeout_key; + grpc_mdstr* max_request_message_bytes_key; + grpc_mdstr* max_response_message_bytes_key; +}; + +grpc_method_config* grpc_method_config_create( + bool* wait_for_ready, gpr_timespec* timeout, + int32_t* max_request_message_bytes, int32_t* max_response_message_bytes) { + grpc_method_config* method_config = gpr_malloc(sizeof(grpc_method_config)); + memset(method_config, 0, sizeof(grpc_method_config)); + method_config->wait_for_ready_key = + grpc_mdstr_from_string(GRPC_METHOD_CONFIG_WAIT_FOR_READY); + method_config->timeout_key = + grpc_mdstr_from_string(GRPC_METHOD_CONFIG_TIMEOUT); + method_config->max_request_message_bytes_key = + grpc_mdstr_from_string(GRPC_METHOD_CONFIG_MAX_REQUEST_MESSAGE_BYTES); + method_config->max_response_message_bytes_key = + grpc_mdstr_from_string(GRPC_METHOD_CONFIG_MAX_RESPONSE_MESSAGE_BYTES); + grpc_mdstr_hash_table_entry entries[4]; + size_t num_entries = 0; + if (wait_for_ready != NULL) { + entries[num_entries].key = method_config->wait_for_ready_key; + entries[num_entries].value = wait_for_ready; + entries[num_entries].vtable = &bool_vtable; + ++num_entries; + } + if (timeout != NULL) { + entries[num_entries].key = method_config->timeout_key; + entries[num_entries].value = timeout; + entries[num_entries].vtable = ×pec_vtable; + ++num_entries; + } + if (max_request_message_bytes != NULL) { + entries[num_entries].key = method_config->max_request_message_bytes_key; + entries[num_entries].value = max_request_message_bytes; + entries[num_entries].vtable = &int32_vtable; + ++num_entries; + } + if (max_response_message_bytes != NULL) { + entries[num_entries].key = method_config->max_response_message_bytes_key; + entries[num_entries].value = max_response_message_bytes; + entries[num_entries].vtable = &int32_vtable; + ++num_entries; + } + method_config->table = grpc_mdstr_hash_table_create(num_entries, entries); + return method_config; +} + +grpc_method_config* grpc_method_config_ref(grpc_method_config* method_config) { + grpc_mdstr_hash_table_ref(method_config->table); + return method_config; +} + +void grpc_method_config_unref(grpc_method_config* method_config) { + if (grpc_mdstr_hash_table_unref(method_config->table)) { + GRPC_MDSTR_UNREF(method_config->wait_for_ready_key); + GRPC_MDSTR_UNREF(method_config->timeout_key); + GRPC_MDSTR_UNREF(method_config->max_request_message_bytes_key); + GRPC_MDSTR_UNREF(method_config->max_response_message_bytes_key); + gpr_free(method_config); + } +} + +int grpc_method_config_cmp(const grpc_method_config* method_config1, + const grpc_method_config* method_config2) { + return grpc_mdstr_hash_table_cmp(method_config1->table, + method_config2->table); +} + +const bool* grpc_method_config_get_wait_for_ready( + const grpc_method_config* method_config) { + return grpc_mdstr_hash_table_get(method_config->table, + method_config->wait_for_ready_key); +} + +const gpr_timespec* grpc_method_config_get_timeout( + const grpc_method_config* method_config) { + return grpc_mdstr_hash_table_get(method_config->table, + method_config->timeout_key); +} + +const int32_t* grpc_method_config_get_max_request_message_bytes( + const grpc_method_config* method_config) { + return grpc_mdstr_hash_table_get( + method_config->table, method_config->max_request_message_bytes_key); +} + +const int32_t* grpc_method_config_get_max_response_message_bytes( + const grpc_method_config* method_config) { + return grpc_mdstr_hash_table_get( + method_config->table, method_config->max_response_message_bytes_key); +} + +// +// grpc_method_config_table +// + +static void method_config_unref(void* valuep) { + grpc_method_config_unref(valuep); +} + +static void* method_config_ref(void* valuep) { + return grpc_method_config_ref(valuep); +} + +static int method_config_cmp(void* valuep1, void* valuep2) { + return grpc_method_config_cmp(valuep1, valuep2); +} + +static const grpc_mdstr_hash_table_vtable method_config_table_vtable = { + method_config_unref, method_config_ref, method_config_cmp}; + +grpc_method_config_table* grpc_method_config_table_create( + size_t num_entries, grpc_method_config_table_entry* entries) { + grpc_mdstr_hash_table_entry* hash_table_entries = + gpr_malloc(sizeof(grpc_mdstr_hash_table_entry) * num_entries); + for (size_t i = 0; i < num_entries; ++i) { + hash_table_entries[i].key = entries[i].method_name; + hash_table_entries[i].value = entries[i].method_config; + hash_table_entries[i].vtable = &method_config_table_vtable; + } + grpc_method_config_table* method_config_table = + grpc_mdstr_hash_table_create(num_entries, hash_table_entries); + gpr_free(hash_table_entries); + return method_config_table; +} + +grpc_method_config_table* grpc_method_config_table_ref( + grpc_method_config_table* table) { + return grpc_mdstr_hash_table_ref(table); +} + +void grpc_method_config_table_unref(grpc_method_config_table* table) { + grpc_mdstr_hash_table_unref(table); +} + +int grpc_method_config_table_cmp(const grpc_method_config_table* table1, + const grpc_method_config_table* table2) { + return grpc_mdstr_hash_table_cmp(table1, table2); +} + +void* grpc_method_config_table_get(const grpc_mdstr_hash_table* table, + const grpc_mdstr* path) { + void* value = grpc_mdstr_hash_table_get(table, path); + // If we didn't find a match for the path, try looking for a wildcard + // entry (i.e., change "/service/method" to "/service/*"). + if (value == NULL) { + const char* path_str = grpc_mdstr_as_c_string(path); + const char* sep = strrchr(path_str, '/') + 1; + const size_t len = (size_t)(sep - path_str); + char* buf = gpr_malloc(len + 2); // '*' and NUL + memcpy(buf, path_str, len); + buf[len] = '*'; + buf[len + 1] = '\0'; + grpc_mdstr* wildcard_path = grpc_mdstr_from_string(buf); + gpr_free(buf); + value = grpc_mdstr_hash_table_get(table, wildcard_path); + GRPC_MDSTR_UNREF(wildcard_path); + } + return value; +} + +static void* copy_arg(void* p) { return grpc_method_config_table_ref(p); } + +static void destroy_arg(void* p) { grpc_method_config_table_unref(p); } + +static int cmp_arg(void* p1, void* p2) { + return grpc_method_config_table_cmp(p1, p2); +} + +static grpc_arg_pointer_vtable arg_vtable = {copy_arg, destroy_arg, cmp_arg}; + +grpc_arg grpc_method_config_table_create_channel_arg( + grpc_method_config_table* table) { + grpc_arg arg; + arg.type = GRPC_ARG_POINTER; + arg.key = GRPC_ARG_SERVICE_CONFIG; + arg.value.pointer.p = table; + arg.value.pointer.vtable = &arg_vtable; + return arg; +} + +// State used by convert_entry() below. +typedef struct conversion_state { + void* (*convert_value)(const grpc_method_config* method_config); + const grpc_mdstr_hash_table_vtable* vtable; + size_t num_entries; + grpc_mdstr_hash_table_entry* entries; +} conversion_state; + +// A function to be passed to grpc_mdstr_hash_table_iterate() to create +// a copy of the entries. +static void convert_entry(const grpc_mdstr_hash_table_entry* entry, + void* user_data) { + conversion_state* state = user_data; + state->entries[state->num_entries].key = GRPC_MDSTR_REF(entry->key); + state->entries[state->num_entries].value = state->convert_value(entry->value); + state->entries[state->num_entries].vtable = state->vtable; + ++state->num_entries; +} + +grpc_mdstr_hash_table* grpc_method_config_table_convert( + const grpc_method_config_table* table, + void* (*convert_value)(const grpc_method_config* method_config), + const grpc_mdstr_hash_table_vtable* vtable) { + // Create an array of the entries in the table with converted values. + conversion_state state; + state.convert_value = convert_value; + state.vtable = vtable; + state.num_entries = 0; + state.entries = gpr_malloc(sizeof(grpc_mdstr_hash_table_entry) * + grpc_mdstr_hash_table_num_entries(table)); + grpc_mdstr_hash_table_iterate(table, convert_entry, &state); + // Create a new table based on the array we just constructed. + grpc_mdstr_hash_table* new_table = + grpc_mdstr_hash_table_create(state.num_entries, state.entries); + // Clean up the array. + for (size_t i = 0; i < state.num_entries; ++i) { + GRPC_MDSTR_UNREF(state.entries[i].key); + vtable->destroy_value(state.entries[i].value); + } + gpr_free(state.entries); + // Return the new table. + return new_table; +} diff --git a/src/core/lib/transport/method_config.h b/src/core/lib/transport/method_config.h new file mode 100644 index 0000000000..58fedd9436 --- /dev/null +++ b/src/core/lib/transport/method_config.h @@ -0,0 +1,136 @@ +// +// Copyright 2016, 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. +// + +#ifndef GRPC_CORE_LIB_TRANSPORT_METHOD_CONFIG_H +#define GRPC_CORE_LIB_TRANSPORT_METHOD_CONFIG_H + +#include + +#include +#include + +#include "src/core/lib/transport/mdstr_hash_table.h" +#include "src/core/lib/transport/metadata.h" + +/// Per-method configuration. +typedef struct grpc_method_config grpc_method_config; + +/// Creates a grpc_method_config with the specified parameters. +/// Any parameter may be NULL to indicate that the value is unset. +/// +/// \a wait_for_ready indicates whether the client should wait until the +/// request deadline for the channel to become ready, even if there is a +/// temporary failure before the deadline while attempting to connect. +/// +/// \a timeout indicates the timeout for calls. +/// +/// \a max_request_message_bytes and \a max_response_message_bytes +/// indicate the maximum sizes of the request (checked when sending) and +/// response (checked when receiving) messages. +grpc_method_config* grpc_method_config_create( + bool* wait_for_ready, gpr_timespec* timeout, + int32_t* max_request_message_bytes, int32_t* max_response_message_bytes); + +grpc_method_config* grpc_method_config_ref(grpc_method_config* method_config); +void grpc_method_config_unref(grpc_method_config* method_config); + +/// Compares two grpc_method_configs. +/// The sort order is stable but undefined. +int grpc_method_config_cmp(const grpc_method_config* method_config1, + const grpc_method_config* method_config2); + +/// These methods return NULL if the requested field is unset. +/// The caller does NOT take ownership of the result. +const bool* grpc_method_config_get_wait_for_ready( + const grpc_method_config* method_config); +const gpr_timespec* grpc_method_config_get_timeout( + const grpc_method_config* method_config); +const int32_t* grpc_method_config_get_max_request_message_bytes( + const grpc_method_config* method_config); +const int32_t* grpc_method_config_get_max_response_message_bytes( + const grpc_method_config* method_config); + +/// A table of method configs. +typedef grpc_mdstr_hash_table grpc_method_config_table; + +typedef struct grpc_method_config_table_entry { + /// The name is of one of the following forms: + /// service/method -- specifies exact service and method name + /// service/* -- matches all methods for the specified service + grpc_mdstr* method_name; + grpc_method_config* method_config; +} grpc_method_config_table_entry; + +/// Takes new references to all keys and values in \a entries. +grpc_method_config_table* grpc_method_config_table_create( + size_t num_entries, grpc_method_config_table_entry* entries); + +grpc_method_config_table* grpc_method_config_table_ref( + grpc_method_config_table* table); +void grpc_method_config_table_unref(grpc_method_config_table* table); + +/// Compares two grpc_method_config_tables. +/// The sort order is stable but undefined. +int grpc_method_config_table_cmp(const grpc_method_config_table* table1, + const grpc_method_config_table* table2); + +/// Gets the method config for the specified \a path, which should be of +/// the form "/service/method". +/// Returns NULL if the method has no config. +/// Caller does NOT own a reference to the result. +/// +/// Note: This returns a void* instead of a grpc_method_config* so that +/// it can also be used for tables constructed via +/// grpc_method_config_table_convert(). +void* grpc_method_config_table_get(const grpc_mdstr_hash_table* table, + const grpc_mdstr* path); + +/// Returns a channel arg containing \a table. +grpc_arg grpc_method_config_table_create_channel_arg( + grpc_method_config_table* table); + +/// Generates a new table from \a table whose values are converted to a +/// new form via the \a convert_value function. The new table will use +/// \a vtable for its values. +/// +/// This is generally used to convert the table's value type from +/// grpc_method_config to a simple struct containing only the parameters +/// relevant to a particular filter, thus avoiding the need for a hash +/// table lookup on the fast path. In that scenario, \a convert_value +/// will return a new instance of the struct containing the values from +/// the grpc_method_config, and \a vtable provides the methods for +/// operating on the struct type. +grpc_mdstr_hash_table* grpc_method_config_table_convert( + const grpc_method_config_table* table, + void* (*convert_value)(const grpc_method_config* method_config), + const grpc_mdstr_hash_table_vtable* vtable); + +#endif /* GRPC_CORE_LIB_TRANSPORT_METHOD_CONFIG_H */ diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 0ffb0e351c..484e34a1f4 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -179,6 +179,7 @@ CORE_SOURCE_FILES = [ 'src/core/lib/transport/mdstr_hash_table.c', 'src/core/lib/transport/metadata.c', 'src/core/lib/transport/metadata_batch.c', + 'src/core/lib/transport/method_config.c', 'src/core/lib/transport/static_metadata.c', 'src/core/lib/transport/timeout_encoding.c', 'src/core/lib/transport/transport.c', @@ -245,7 +246,6 @@ CORE_SOURCE_FILES = [ 'src/core/ext/client_channel/lb_policy.c', 'src/core/ext/client_channel/lb_policy_factory.c', 'src/core/ext/client_channel/lb_policy_registry.c', - 'src/core/ext/client_channel/method_config.c', 'src/core/ext/client_channel/parse_address.c', 'src/core/ext/client_channel/resolver.c', 'src/core/ext/client_channel/resolver_factory.c', diff --git a/test/core/end2end/fake_resolver.c b/test/core/end2end/fake_resolver.c index ed97217750..e89e66674d 100644 --- a/test/core/end2end/fake_resolver.c +++ b/test/core/end2end/fake_resolver.c @@ -42,13 +42,13 @@ #include #include -#include "src/core/ext/client_channel/method_config.h" #include "src/core/ext/client_channel/parse_address.h" #include "src/core/ext/client_channel/resolver_registry.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/unix_sockets_posix.h" #include "src/core/lib/support/string.h" +#include "src/core/lib/transport/method_config.h" // // fake_resolver diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 827159ab3e..6e8de9848e 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -873,6 +873,7 @@ src/core/lib/transport/connectivity_state.h \ src/core/lib/transport/mdstr_hash_table.h \ src/core/lib/transport/metadata.h \ src/core/lib/transport/metadata_batch.h \ +src/core/lib/transport/method_config.h \ src/core/lib/transport/static_metadata.h \ src/core/lib/transport/timeout_encoding.h \ src/core/lib/transport/transport.h \ @@ -930,7 +931,6 @@ src/core/ext/client_channel/initial_connect_string.h \ src/core/ext/client_channel/lb_policy.h \ src/core/ext/client_channel/lb_policy_factory.h \ src/core/ext/client_channel/lb_policy_registry.h \ -src/core/ext/client_channel/method_config.h \ src/core/ext/client_channel/parse_address.h \ src/core/ext/client_channel/resolver.h \ src/core/ext/client_channel/resolver_factory.h \ @@ -1061,6 +1061,7 @@ src/core/lib/transport/connectivity_state.c \ src/core/lib/transport/mdstr_hash_table.c \ src/core/lib/transport/metadata.c \ src/core/lib/transport/metadata_batch.c \ +src/core/lib/transport/method_config.c \ src/core/lib/transport/static_metadata.c \ src/core/lib/transport/timeout_encoding.c \ src/core/lib/transport/transport.c \ @@ -1127,7 +1128,6 @@ src/core/ext/client_channel/initial_connect_string.c \ src/core/ext/client_channel/lb_policy.c \ src/core/ext/client_channel/lb_policy_factory.c \ src/core/ext/client_channel/lb_policy_registry.c \ -src/core/ext/client_channel/method_config.c \ src/core/ext/client_channel/parse_address.c \ src/core/ext/client_channel/resolver.c \ src/core/ext/client_channel/resolver_factory.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 60138a49a2..b77f4560fd 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -6583,6 +6583,7 @@ "src/core/lib/transport/mdstr_hash_table.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/method_config.h", "src/core/lib/transport/static_metadata.h", "src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/transport.h", @@ -6787,6 +6788,8 @@ "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.c", "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/method_config.c", + "src/core/lib/transport/method_config.h", "src/core/lib/transport/static_metadata.c", "src/core/lib/transport/static_metadata.h", "src/core/lib/transport/timeout_encoding.c", @@ -6813,7 +6816,6 @@ "src/core/ext/client_channel/lb_policy.h", "src/core/ext/client_channel/lb_policy_factory.h", "src/core/ext/client_channel/lb_policy_registry.h", - "src/core/ext/client_channel/method_config.h", "src/core/ext/client_channel/parse_address.h", "src/core/ext/client_channel/resolver.h", "src/core/ext/client_channel/resolver_factory.h", @@ -6846,8 +6848,6 @@ "src/core/ext/client_channel/lb_policy_factory.h", "src/core/ext/client_channel/lb_policy_registry.c", "src/core/ext/client_channel/lb_policy_registry.h", - "src/core/ext/client_channel/method_config.c", - "src/core/ext/client_channel/method_config.h", "src/core/ext/client_channel/parse_address.c", "src/core/ext/client_channel/parse_address.h", "src/core/ext/client_channel/resolver.c", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index c86b14f63e..5cb50cc999 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -1306,6 +1306,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", @@ -1321,6 +1322,7 @@ ], "cpu_cost": 1.0, "exclude_configs": [], + "exclude_iomgrs": [], "flaky": false, "gtest": false, "language": "c", diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 7870234aec..7118a95273 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -382,6 +382,7 @@ + @@ -439,7 +440,6 @@ - @@ -674,6 +674,8 @@ + + @@ -806,8 +808,6 @@ - - diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 760ac313bb..d5056aa5ec 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -307,6 +307,9 @@ src\core\lib\transport + + src\core\lib\transport + src\core\lib\transport @@ -505,9 +508,6 @@ src\core\ext\client_channel - - src\core\ext\client_channel - src\core\ext\client_channel @@ -968,6 +968,9 @@ src\core\lib\transport + + src\core\lib\transport + src\core\lib\transport @@ -1139,9 +1142,6 @@ src\core\ext\client_channel - - src\core\ext\client_channel - src\core\ext\client_channel diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index 8eb4292e86..35ace6eabb 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -275,6 +275,7 @@ + @@ -523,6 +524,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index 90ea7bde6d..4b104aeb9b 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -364,6 +364,9 @@ src\core\lib\transport + + src\core\lib\transport + src\core\lib\transport @@ -758,6 +761,9 @@ src\core\lib\transport + + src\core\lib\transport + src\core\lib\transport diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 577264d326..c8532d6c5b 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -372,6 +372,7 @@ + @@ -405,7 +406,6 @@ - @@ -642,6 +642,8 @@ + + @@ -724,8 +726,6 @@ - - diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index 9b3c694363..032d2726bc 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -310,6 +310,9 @@ src\core\lib\transport + + src\core\lib\transport + src\core\lib\transport @@ -433,9 +436,6 @@ src\core\ext\client_channel - - src\core\ext\client_channel - src\core\ext\client_channel @@ -881,6 +881,9 @@ src\core\lib\transport + + src\core\lib\transport + src\core\lib\transport @@ -980,9 +983,6 @@ src\core\ext\client_channel - - src\core\ext\client_channel - src\core\ext\client_channel -- cgit v1.2.3 From e3df5a0285fa9bf87dbeac6b1ad2c1d4427102f0 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 27 Oct 2016 00:41:13 +0200 Subject: Reverting TSI's ntop change, to avoid dependency between TSI and gRPC. --- src/core/lib/tsi/ssl_transport_security.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/tsi/ssl_transport_security.c b/src/core/lib/tsi/ssl_transport_security.c index 749b46e19f..366dca9507 100644 --- a/src/core/lib/tsi/ssl_transport_security.c +++ b/src/core/lib/tsi/ssl_transport_security.c @@ -31,9 +31,6 @@ * */ -#include "src/core/lib/iomgr/sockaddr.h" - -#include "src/core/lib/iomgr/socket_utils.h" #include "src/core/lib/tsi/ssl_transport_security.h" #include @@ -41,6 +38,15 @@ #include #include +/* TODO(jboeuf): refactor inet_ntop into a portability header. */ +/* Note: for whomever reads this and tries to refactor this, this + can't be in grpc, it has to be in gpr. */ +#ifdef GPR_WINDOWS +#include +#else +#include +#endif + #include #include #include @@ -349,8 +355,8 @@ static tsi_result add_subject_alt_names_properties_to_peer( result = TSI_INTERNAL_ERROR; break; } - const char *name = grpc_inet_ntop(af, subject_alt_name->d.iPAddress->data, - ntop_buf, INET6_ADDRSTRLEN); + const char *name = inet_ntop(af, subject_alt_name->d.iPAddress->data, + ntop_buf, INET6_ADDRSTRLEN); if (name == NULL) { gpr_log(GPR_ERROR, "Could not get IP string from asn1 octet."); result = TSI_INTERNAL_ERROR; -- cgit v1.2.3 From d41a4a720f76c6555b80f82ee771071e09d55e03 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 26 Oct 2016 16:16:06 -0700 Subject: s/gpr_slice/grpc_slice, and move around tests, impls --- Makefile | 32 +- build.yaml | 30 +- grpc.def | 56 ++-- include/grpc++/impl/codegen/core_codegen.h | 16 +- .../grpc++/impl/codegen/core_codegen_interface.h | 14 +- include/grpc++/impl/codegen/proto_utils.h | 26 +- include/grpc++/impl/codegen/thrift_serializer.h | 8 +- include/grpc++/support/slice.h | 12 +- include/grpc/byte_buffer.h | 10 +- include/grpc/impl/codegen/gpr_types.h | 65 ---- include/grpc/impl/codegen/grpc_types.h | 3 +- include/grpc/impl/codegen/slice.h | 66 ++++ include/grpc/slice.h | 128 ++++++++ include/grpc/slice_buffer.h | 87 +++++ include/grpc/support/slice.h | 128 -------- include/grpc/support/slice_buffer.h | 87 ----- src/core/ext/client_channel/connector.h | 2 +- .../default_initial_connect_string.c | 2 +- .../ext/client_channel/http_connect_handshaker.c | 30 +- .../ext/client_channel/initial_connect_string.c | 4 +- .../ext/client_channel/initial_connect_string.h | 4 +- src/core/ext/client_channel/subchannel.c | 4 +- src/core/ext/client_channel/uri_parser.c | 24 +- src/core/ext/lb_policy/grpclb/grpclb.c | 10 +- src/core/ext/lb_policy/grpclb/load_balancer_api.c | 10 +- src/core/ext/lb_policy/grpclb/load_balancer_api.h | 6 +- src/core/ext/resolver/sockaddr/sockaddr_resolver.c | 14 +- .../chttp2/client/insecure/channel_create.c | 8 +- .../chttp2/client/secure/secure_channel_create.c | 8 +- .../chttp2/server/insecure/server_chttp2.c | 2 +- .../chttp2/server/secure/server_secure_chttp2.c | 2 +- .../ext/transport/chttp2/transport/bin_decoder.c | 18 +- .../ext/transport/chttp2/transport/bin_decoder.h | 4 +- .../ext/transport/chttp2/transport/bin_encoder.c | 14 +- .../ext/transport/chttp2/transport/bin_encoder.h | 12 +- .../transport/chttp2/transport/chttp2_transport.c | 88 +++--- .../transport/chttp2/transport/chttp2_transport.h | 2 +- .../ext/transport/chttp2/transport/frame_data.c | 22 +- .../ext/transport/chttp2/transport/frame_data.h | 6 +- .../ext/transport/chttp2/transport/frame_goaway.c | 14 +- .../ext/transport/chttp2/transport/frame_goaway.h | 6 +- .../ext/transport/chttp2/transport/frame_ping.c | 8 +- .../ext/transport/chttp2/transport/frame_ping.h | 4 +- .../transport/chttp2/transport/frame_rst_stream.c | 8 +- .../transport/chttp2/transport/frame_rst_stream.h | 4 +- .../transport/chttp2/transport/frame_settings.c | 16 +- .../transport/chttp2/transport/frame_settings.h | 6 +- .../chttp2/transport/frame_window_update.c | 6 +- .../chttp2/transport/frame_window_update.h | 4 +- .../ext/transport/chttp2/transport/hpack_encoder.c | 36 +-- .../ext/transport/chttp2/transport/hpack_encoder.h | 2 +- .../ext/transport/chttp2/transport/hpack_parser.c | 2 +- .../ext/transport/chttp2/transport/hpack_parser.h | 2 +- src/core/ext/transport/chttp2/transport/internal.h | 28 +- src/core/ext/transport/chttp2/transport/parsing.c | 18 +- src/core/ext/transport/chttp2/transport/writing.c | 14 +- .../transport/cronet/transport/cronet_transport.c | 24 +- src/core/lib/channel/channel_stack.c | 4 +- src/core/lib/channel/channel_stack.h | 4 +- src/core/lib/channel/compress_filter.c | 22 +- src/core/lib/channel/deadline_filter.c | 4 +- src/core/lib/channel/handshaker.c | 8 +- src/core/lib/channel/handshaker.h | 6 +- src/core/lib/channel/http_client_filter.c | 16 +- src/core/lib/channel/http_server_filter.c | 8 +- src/core/lib/channel/message_size_filter.c | 2 +- src/core/lib/compression/message_compress.c | 32 +- src/core/lib/compression/message_compress.h | 4 +- src/core/lib/http/format_request.c | 12 +- src/core/lib/http/format_request.h | 6 +- src/core/lib/http/httpcli.c | 22 +- src/core/lib/http/httpcli_security_connector.c | 2 +- src/core/lib/http/parser.c | 2 +- src/core/lib/http/parser.h | 2 +- src/core/lib/iomgr/endpoint.c | 4 +- src/core/lib/iomgr/endpoint.h | 8 +- src/core/lib/iomgr/load_file.c | 6 +- src/core/lib/iomgr/load_file.h | 2 +- src/core/lib/iomgr/resource_quota.c | 12 +- src/core/lib/iomgr/resource_quota.h | 4 +- src/core/lib/iomgr/tcp_posix.c | 36 +-- src/core/lib/iomgr/tcp_windows.c | 24 +- src/core/lib/security/credentials/credentials.h | 6 +- .../security/credentials/credentials_metadata.c | 14 +- .../google_default/google_default_credentials.c | 4 +- .../lib/security/credentials/jwt/jwt_verifier.c | 40 +-- .../lib/security/credentials/jwt/jwt_verifier.h | 2 +- .../credentials/plugin/plugin_credentials.c | 8 +- .../lib/security/transport/client_auth_filter.c | 6 +- src/core/lib/security/transport/handshake.c | 38 +-- src/core/lib/security/transport/handshake.h | 2 +- src/core/lib/security/transport/secure_endpoint.c | 76 ++--- src/core/lib/security/transport/secure_endpoint.h | 2 +- .../lib/security/transport/security_connector.c | 22 +- .../lib/security/transport/security_connector.h | 10 +- .../lib/security/transport/server_auth_filter.c | 4 +- src/core/lib/security/util/b64.c | 8 +- src/core/lib/security/util/b64.h | 4 +- src/core/lib/slice/percent_encoding.c | 180 +++++++++++ src/core/lib/slice/percent_encoding.h | 78 +++++ src/core/lib/slice/slice.c | 350 +++++++++++++++++++++ src/core/lib/slice/slice_buffer.c | 282 +++++++++++++++++ src/core/lib/slice/slice_string_helpers.c | 81 +++++ src/core/lib/slice/slice_string_helpers.h | 58 ++++ src/core/lib/support/percent_encoding.c | 180 ----------- src/core/lib/support/percent_encoding.h | 78 ----- src/core/lib/support/slice.c | 350 --------------------- src/core/lib/support/slice_buffer.c | 282 ----------------- src/core/lib/support/string.c | 49 --- src/core/lib/support/string.h | 7 - src/core/lib/surface/byte_buffer.c | 18 +- src/core/lib/surface/byte_buffer_reader.c | 20 +- src/core/lib/surface/call.c | 20 +- src/core/lib/surface/server.c | 8 +- src/core/lib/transport/byte_stream.c | 8 +- src/core/lib/transport/byte_stream.h | 8 +- src/core/lib/transport/metadata.c | 22 +- src/core/lib/transport/metadata.h | 12 +- src/core/lib/transport/transport.c | 12 +- src/core/lib/transport/transport.h | 8 +- src/cpp/common/core_codegen.cc | 22 +- src/cpp/util/byte_buffer_cc.cc | 14 +- src/cpp/util/slice_cc.cc | 8 +- src/csharp/ext/grpc_csharp_ext.c | 8 +- src/node/ext/byte_buffer.cc | 8 +- src/objective-c/GRPCClient/private/NSData+GRPC.m | 12 +- src/php/ext/grpc/byte_buffer.c | 8 +- src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi | 26 +- .../grpcio/grpc/_cython/_cygrpc/records.pyx.pxi | 14 +- src/ruby/ext/grpc/rb_byte_buffer.c | 8 +- src/ruby/ext/grpc/rb_grpc_imports.generated.c | 112 +++---- src/ruby/ext/grpc/rb_grpc_imports.generated.h | 178 +++++------ test/core/bad_client/bad_client.c | 18 +- test/core/bad_client/bad_client.h | 2 +- test/core/bad_client/tests/large_metadata.c | 16 +- test/core/bad_ssl/servers/cert.c | 6 +- .../set_initial_connect_string_test.c | 24 +- test/core/compression/message_compress_test.c | 144 ++++----- test/core/end2end/bad_server_response_test.c | 18 +- test/core/end2end/cq_verifier.c | 18 +- test/core/end2end/cq_verifier.h | 2 +- test/core/end2end/dualstack_socket_test.c | 14 +- test/core/end2end/fake_resolver.c | 14 +- test/core/end2end/fixtures/http_proxy.c | 62 ++-- test/core/end2end/fuzzers/api_fuzzer.c | 4 +- test/core/end2end/fuzzers/client_fuzzer.c | 4 +- test/core/end2end/fuzzers/server_fuzzer.c | 4 +- test/core/end2end/invalid_call_argument_test.c | 2 +- test/core/end2end/tests/binary_metadata.c | 4 +- test/core/end2end/tests/call_creds.c | 6 +- test/core/end2end/tests/cancel_after_accept.c | 4 +- test/core/end2end/tests/cancel_after_client_done.c | 4 +- test/core/end2end/tests/cancel_after_invoke.c | 2 +- test/core/end2end/tests/cancel_before_invoke.c | 2 +- test/core/end2end/tests/compressed_payload.c | 16 +- test/core/end2end/tests/filter_call_init_fails.c | 2 +- test/core/end2end/tests/filter_causes_close.c | 6 +- test/core/end2end/tests/invoke_large_request.c | 12 +- test/core/end2end/tests/large_metadata.c | 2 +- test/core/end2end/tests/load_reporting_hook.c | 4 +- test/core/end2end/tests/max_message_length.c | 6 +- test/core/end2end/tests/network_status_change.c | 2 +- test/core/end2end/tests/payload.c | 10 +- test/core/end2end/tests/ping_pong_streaming.c | 8 +- test/core/end2end/tests/request_with_flags.c | 2 +- test/core/end2end/tests/request_with_payload.c | 2 +- test/core/end2end/tests/resource_quota_server.c | 10 +- test/core/end2end/tests/simple_cacheable_request.c | 4 +- test/core/end2end/tests/simple_metadata.c | 4 +- test/core/end2end/tests/streaming_error_response.c | 4 +- test/core/end2end/tests/trailing_metadata.c | 4 +- test/core/fling/client.c | 4 +- test/core/http/format_request_test.c | 24 +- test/core/http/parser_test.c | 32 +- test/core/http/request_fuzzer.c | 4 +- test/core/http/response_fuzzer.c | 4 +- test/core/internal_api_canaries/transport.c | 2 +- test/core/iomgr/endpoint_tests.c | 34 +- test/core/iomgr/load_file_test.c | 24 +- test/core/iomgr/resource_quota_test.c | 12 +- test/core/iomgr/tcp_posix_test.c | 32 +- test/core/nanopb/fuzzer_response.c | 4 +- test/core/nanopb/fuzzer_serverlist.c | 4 +- test/core/security/b64_test.c | 40 +-- test/core/security/create_jwt.c | 4 +- test/core/security/credentials_test.c | 40 +-- test/core/security/fetch_oauth2.c | 2 +- test/core/security/json_token_test.c | 8 +- test/core/security/jwt_verifier_test.c | 12 +- test/core/security/oauth2_utils.c | 2 +- test/core/security/secure_endpoint_test.c | 30 +- test/core/security/security_connector_test.c | 8 +- .../04cb8ccc553f9b2f5e52c421aff6d1c954d3dae6 | 1 + .../0dd8f3a63745b3a2d39791559b5c1b311447b537 | 1 + .../17eeaca784409adbe43365c32ac87915d736bba3 | 2 + .../2040c1ff65f52a7ae668c2c8f324de5dacc9d695 | 1 + .../26b0d1da23027ae54db96e125e4a9e98842d77fb | 1 + .../2a089c0db45acdb4c6ed8e7ff81ca7235792c0b9 | 1 + .../35b7b3bc3a740d5c3abca0d75b53f0e1e1ee998a | 1 + .../36367ba1adba47a1cbc3a88707fde8cc7abdc248 | 1 + .../39c2ba51548a0beaf0d6d1164531f1447dc311b5 | 1 + .../56d08fea787c041395c6697ce26cfbc0decbe688 | 1 + .../678d981fdabb9f0d6640235cf1719dd1e1e66ae9 | 1 + .../68751961609ec010565de0aa87521dcbf0722c5d | 1 + .../7875c06c6f03c9aa2f8e9c59f8d8957c8a32e759 | 2 + .../7b302090e090a5829b6d1dd7be30bd4e36a7e60f | 1 + .../875e1022169c9e4c541a9ad894e69e989df22ba1 | 1 + .../8c1051ce066f5a26de9a9d133180621d0da957b4 | 1 + .../8e084e628ab83a18ac7ca7cb3506525263655c63 | 1 + .../9d316c4675f40ddccaf8f1cc7aea94170b1e4223 | 1 + .../ad1c7c11d18a7d116e2c2ef4d4c5afb1270836ae | 1 + .../b471f94aa4facf502e622e4a248f1ba4063ae681 | 1 + .../bf52ece030f16136d46e0dc97f58d60a0d8a1f0b | 2 + .../d5b2a7177339ba2b7ce2f60e5f4459bef1e72758 | 2 + .../de867b64c54a7ed773dc611fc5cd2f17c5433113 | 2 + .../e3948dbe004950591630dd5c52f4e0fcbd5e388a | 1 + .../e7064f0b80f61dbc65915311032d27baa569ae2a | 1 + test/core/slice/percent_decode_corpus/xyz | 1 + test/core/slice/percent_decode_fuzzer.c | 66 ++++ .../0d3ee7fa54e6c66103965fd4409b044ba7db6c3f | 3 + .../2e7ccf75e27b9501e3b28cf1c50ed0c45ab7c226 | 1 + .../55bb859f3942c462b03b7cbcf22ab4a0ac9705cf | 1 + .../56070cecd54c845b6d4334953b17b712eb000d93 | 1 + .../61f50e891bf7ff5eb7a7af206f1e25d77f8756e7 | 3 + .../6e0c60cefc704c7940e475a87dd9ae423061cb5a | 3 + .../7271ebcc6d22a0f186f7bc3c1973a7ed1bec8d8e | 4 + .../74c83ece3e2920a67593a9be9c82468f16cbb969 | 1 + .../98e004fd2a9f141a7a019720820080e12d637c06 | 3 + .../ba2c1e98227aa21ea3bb2ca4d0e504119717da8b | 3 + .../c16b9fd45370d4afb5d3ebd307a6e263c25ffd45 | 2 + .../d58c3cd4eab9b6d2343abfa1c25c90a383fe0ec3 | 1 + .../e2619218ede30d2b7b8ecd601a9f0ae754b728b4 | 4 + .../f93b3653e453f0e3eea3198001be6ce46e64bd21 | 5 + .../fd41d029c7682ad3d1c40a9fd017a4c85b673a54 | 3 + test/core/slice/percent_encode_corpus/xyz | 1 + test/core/slice/percent_encode_fuzzer.c | 73 +++++ test/core/slice/percent_encoding_test.c | 157 +++++++++ test/core/slice/slice_buffer_test.c | 129 ++++++++ test/core/slice/slice_string_helpers_test.c | 148 +++++++++ test/core/slice/slice_test.c | 265 ++++++++++++++++ .../04cb8ccc553f9b2f5e52c421aff6d1c954d3dae6 | 1 - .../0dd8f3a63745b3a2d39791559b5c1b311447b537 | 1 - .../17eeaca784409adbe43365c32ac87915d736bba3 | 2 - .../2040c1ff65f52a7ae668c2c8f324de5dacc9d695 | 1 - .../26b0d1da23027ae54db96e125e4a9e98842d77fb | 1 - .../2a089c0db45acdb4c6ed8e7ff81ca7235792c0b9 | 1 - .../35b7b3bc3a740d5c3abca0d75b53f0e1e1ee998a | 1 - .../36367ba1adba47a1cbc3a88707fde8cc7abdc248 | 1 - .../39c2ba51548a0beaf0d6d1164531f1447dc311b5 | 1 - .../56d08fea787c041395c6697ce26cfbc0decbe688 | 1 - .../678d981fdabb9f0d6640235cf1719dd1e1e66ae9 | 1 - .../68751961609ec010565de0aa87521dcbf0722c5d | 1 - .../7875c06c6f03c9aa2f8e9c59f8d8957c8a32e759 | 2 - .../7b302090e090a5829b6d1dd7be30bd4e36a7e60f | 1 - .../875e1022169c9e4c541a9ad894e69e989df22ba1 | 1 - .../8c1051ce066f5a26de9a9d133180621d0da957b4 | 1 - .../8e084e628ab83a18ac7ca7cb3506525263655c63 | 1 - .../9d316c4675f40ddccaf8f1cc7aea94170b1e4223 | 1 - .../ad1c7c11d18a7d116e2c2ef4d4c5afb1270836ae | 1 - .../b471f94aa4facf502e622e4a248f1ba4063ae681 | 1 - .../bf52ece030f16136d46e0dc97f58d60a0d8a1f0b | 2 - .../d5b2a7177339ba2b7ce2f60e5f4459bef1e72758 | 2 - .../de867b64c54a7ed773dc611fc5cd2f17c5433113 | 2 - .../e3948dbe004950591630dd5c52f4e0fcbd5e388a | 1 - .../e7064f0b80f61dbc65915311032d27baa569ae2a | 1 - test/core/support/percent_decode_corpus/xyz | 1 - test/core/support/percent_decode_fuzzer.c | 66 ---- .../0d3ee7fa54e6c66103965fd4409b044ba7db6c3f | 3 - .../2e7ccf75e27b9501e3b28cf1c50ed0c45ab7c226 | 1 - .../55bb859f3942c462b03b7cbcf22ab4a0ac9705cf | 1 - .../56070cecd54c845b6d4334953b17b712eb000d93 | 1 - .../61f50e891bf7ff5eb7a7af206f1e25d77f8756e7 | 3 - .../6e0c60cefc704c7940e475a87dd9ae423061cb5a | 3 - .../7271ebcc6d22a0f186f7bc3c1973a7ed1bec8d8e | 4 - .../74c83ece3e2920a67593a9be9c82468f16cbb969 | 1 - .../98e004fd2a9f141a7a019720820080e12d637c06 | 3 - .../ba2c1e98227aa21ea3bb2ca4d0e504119717da8b | 3 - .../c16b9fd45370d4afb5d3ebd307a6e263c25ffd45 | 2 - .../d58c3cd4eab9b6d2343abfa1c25c90a383fe0ec3 | 1 - .../e2619218ede30d2b7b8ecd601a9f0ae754b728b4 | 4 - .../f93b3653e453f0e3eea3198001be6ce46e64bd21 | 5 - .../fd41d029c7682ad3d1c40a9fd017a4c85b673a54 | 3 - test/core/support/percent_encode_corpus/xyz | 1 - test/core/support/percent_encode_fuzzer.c | 73 ----- test/core/support/percent_encoding_test.c | 157 --------- test/core/support/slice_buffer_test.c | 129 -------- test/core/support/slice_test.c | 265 ---------------- test/core/support/string_test.c | 94 ------ test/core/surface/byte_buffer_reader_test.c | 92 +++--- test/core/transport/chttp2/bin_decoder_test.c | 34 +- test/core/transport/chttp2/bin_encoder_test.c | 44 +-- test/core/transport/chttp2/hpack_encoder_test.c | 22 +- test/core/transport/chttp2/hpack_parser_test.c | 12 +- test/core/transport/chttp2/hpack_table_test.c | 2 +- test/core/transport/chttp2/varint_test.c | 12 +- test/core/transport/metadata_test.c | 38 +-- test/core/util/mock_endpoint.c | 24 +- test/core/util/mock_endpoint.h | 4 +- test/core/util/one_corpus_entry_fuzzer.c | 4 +- test/core/util/parse_hexstring.c | 6 +- test/core/util/parse_hexstring.h | 2 +- test/core/util/passthru_endpoint.c | 20 +- test/core/util/slice_splitter.c | 32 +- test/core/util/slice_splitter.h | 14 +- test/cpp/grpclb/grpclb_api_test.cc | 14 +- test/cpp/grpclb/grpclb_test.cc | 20 +- test/cpp/qps/client.h | 2 +- test/cpp/qps/server_async.cc | 2 +- test/cpp/util/byte_buffer_proto_helper.cc | 2 +- test/cpp/util/byte_buffer_test.cc | 22 +- test/cpp/util/cli_call.cc | 2 +- test/cpp/util/slice_test.cc | 12 +- tools/run_tests/sources_and_headers.json | 4 +- tools/run_tests/tests.json | 4 +- vsprojects/buildtests_c.sln | 4 +- .../gpr_slice_buffer_test.vcxproj | 4 +- .../test/gpr_slice_test/gpr_slice_test.vcxproj | 4 +- 317 files changed, 3726 insertions(+), 3585 deletions(-) create mode 100644 include/grpc/slice.h create mode 100644 include/grpc/slice_buffer.h delete mode 100644 include/grpc/support/slice.h delete mode 100644 include/grpc/support/slice_buffer.h create mode 100644 src/core/lib/slice/percent_encoding.c create mode 100644 src/core/lib/slice/percent_encoding.h create mode 100644 src/core/lib/slice/slice.c create mode 100644 src/core/lib/slice/slice_buffer.c create mode 100644 src/core/lib/slice/slice_string_helpers.c create mode 100644 src/core/lib/slice/slice_string_helpers.h delete mode 100644 src/core/lib/support/percent_encoding.c delete mode 100644 src/core/lib/support/percent_encoding.h delete mode 100644 src/core/lib/support/slice.c delete mode 100644 src/core/lib/support/slice_buffer.c create mode 100644 test/core/slice/percent_decode_corpus/04cb8ccc553f9b2f5e52c421aff6d1c954d3dae6 create mode 100644 test/core/slice/percent_decode_corpus/0dd8f3a63745b3a2d39791559b5c1b311447b537 create mode 100644 test/core/slice/percent_decode_corpus/17eeaca784409adbe43365c32ac87915d736bba3 create mode 100644 test/core/slice/percent_decode_corpus/2040c1ff65f52a7ae668c2c8f324de5dacc9d695 create mode 100644 test/core/slice/percent_decode_corpus/26b0d1da23027ae54db96e125e4a9e98842d77fb create mode 100644 test/core/slice/percent_decode_corpus/2a089c0db45acdb4c6ed8e7ff81ca7235792c0b9 create mode 100644 test/core/slice/percent_decode_corpus/35b7b3bc3a740d5c3abca0d75b53f0e1e1ee998a create mode 100644 test/core/slice/percent_decode_corpus/36367ba1adba47a1cbc3a88707fde8cc7abdc248 create mode 100644 test/core/slice/percent_decode_corpus/39c2ba51548a0beaf0d6d1164531f1447dc311b5 create mode 100644 test/core/slice/percent_decode_corpus/56d08fea787c041395c6697ce26cfbc0decbe688 create mode 100644 test/core/slice/percent_decode_corpus/678d981fdabb9f0d6640235cf1719dd1e1e66ae9 create mode 100644 test/core/slice/percent_decode_corpus/68751961609ec010565de0aa87521dcbf0722c5d create mode 100644 test/core/slice/percent_decode_corpus/7875c06c6f03c9aa2f8e9c59f8d8957c8a32e759 create mode 100644 test/core/slice/percent_decode_corpus/7b302090e090a5829b6d1dd7be30bd4e36a7e60f create mode 100644 test/core/slice/percent_decode_corpus/875e1022169c9e4c541a9ad894e69e989df22ba1 create mode 100644 test/core/slice/percent_decode_corpus/8c1051ce066f5a26de9a9d133180621d0da957b4 create mode 100644 test/core/slice/percent_decode_corpus/8e084e628ab83a18ac7ca7cb3506525263655c63 create mode 100644 test/core/slice/percent_decode_corpus/9d316c4675f40ddccaf8f1cc7aea94170b1e4223 create mode 100644 test/core/slice/percent_decode_corpus/ad1c7c11d18a7d116e2c2ef4d4c5afb1270836ae create mode 100644 test/core/slice/percent_decode_corpus/b471f94aa4facf502e622e4a248f1ba4063ae681 create mode 100644 test/core/slice/percent_decode_corpus/bf52ece030f16136d46e0dc97f58d60a0d8a1f0b create mode 100644 test/core/slice/percent_decode_corpus/d5b2a7177339ba2b7ce2f60e5f4459bef1e72758 create mode 100644 test/core/slice/percent_decode_corpus/de867b64c54a7ed773dc611fc5cd2f17c5433113 create mode 100644 test/core/slice/percent_decode_corpus/e3948dbe004950591630dd5c52f4e0fcbd5e388a create mode 100644 test/core/slice/percent_decode_corpus/e7064f0b80f61dbc65915311032d27baa569ae2a create mode 100644 test/core/slice/percent_decode_corpus/xyz create mode 100644 test/core/slice/percent_decode_fuzzer.c create mode 100644 test/core/slice/percent_encode_corpus/0d3ee7fa54e6c66103965fd4409b044ba7db6c3f create mode 100644 test/core/slice/percent_encode_corpus/2e7ccf75e27b9501e3b28cf1c50ed0c45ab7c226 create mode 100644 test/core/slice/percent_encode_corpus/55bb859f3942c462b03b7cbcf22ab4a0ac9705cf create mode 100644 test/core/slice/percent_encode_corpus/56070cecd54c845b6d4334953b17b712eb000d93 create mode 100644 test/core/slice/percent_encode_corpus/61f50e891bf7ff5eb7a7af206f1e25d77f8756e7 create mode 100644 test/core/slice/percent_encode_corpus/6e0c60cefc704c7940e475a87dd9ae423061cb5a create mode 100644 test/core/slice/percent_encode_corpus/7271ebcc6d22a0f186f7bc3c1973a7ed1bec8d8e create mode 100644 test/core/slice/percent_encode_corpus/74c83ece3e2920a67593a9be9c82468f16cbb969 create mode 100644 test/core/slice/percent_encode_corpus/98e004fd2a9f141a7a019720820080e12d637c06 create mode 100644 test/core/slice/percent_encode_corpus/ba2c1e98227aa21ea3bb2ca4d0e504119717da8b create mode 100644 test/core/slice/percent_encode_corpus/c16b9fd45370d4afb5d3ebd307a6e263c25ffd45 create mode 100644 test/core/slice/percent_encode_corpus/d58c3cd4eab9b6d2343abfa1c25c90a383fe0ec3 create mode 100644 test/core/slice/percent_encode_corpus/e2619218ede30d2b7b8ecd601a9f0ae754b728b4 create mode 100644 test/core/slice/percent_encode_corpus/f93b3653e453f0e3eea3198001be6ce46e64bd21 create mode 100644 test/core/slice/percent_encode_corpus/fd41d029c7682ad3d1c40a9fd017a4c85b673a54 create mode 100644 test/core/slice/percent_encode_corpus/xyz create mode 100644 test/core/slice/percent_encode_fuzzer.c create mode 100644 test/core/slice/percent_encoding_test.c create mode 100644 test/core/slice/slice_buffer_test.c create mode 100644 test/core/slice/slice_string_helpers_test.c create mode 100644 test/core/slice/slice_test.c delete mode 100644 test/core/support/percent_decode_corpus/04cb8ccc553f9b2f5e52c421aff6d1c954d3dae6 delete mode 100644 test/core/support/percent_decode_corpus/0dd8f3a63745b3a2d39791559b5c1b311447b537 delete mode 100644 test/core/support/percent_decode_corpus/17eeaca784409adbe43365c32ac87915d736bba3 delete mode 100644 test/core/support/percent_decode_corpus/2040c1ff65f52a7ae668c2c8f324de5dacc9d695 delete mode 100644 test/core/support/percent_decode_corpus/26b0d1da23027ae54db96e125e4a9e98842d77fb delete mode 100644 test/core/support/percent_decode_corpus/2a089c0db45acdb4c6ed8e7ff81ca7235792c0b9 delete mode 100644 test/core/support/percent_decode_corpus/35b7b3bc3a740d5c3abca0d75b53f0e1e1ee998a delete mode 100644 test/core/support/percent_decode_corpus/36367ba1adba47a1cbc3a88707fde8cc7abdc248 delete mode 100644 test/core/support/percent_decode_corpus/39c2ba51548a0beaf0d6d1164531f1447dc311b5 delete mode 100644 test/core/support/percent_decode_corpus/56d08fea787c041395c6697ce26cfbc0decbe688 delete mode 100644 test/core/support/percent_decode_corpus/678d981fdabb9f0d6640235cf1719dd1e1e66ae9 delete mode 100644 test/core/support/percent_decode_corpus/68751961609ec010565de0aa87521dcbf0722c5d delete mode 100644 test/core/support/percent_decode_corpus/7875c06c6f03c9aa2f8e9c59f8d8957c8a32e759 delete mode 100644 test/core/support/percent_decode_corpus/7b302090e090a5829b6d1dd7be30bd4e36a7e60f delete mode 100644 test/core/support/percent_decode_corpus/875e1022169c9e4c541a9ad894e69e989df22ba1 delete mode 100644 test/core/support/percent_decode_corpus/8c1051ce066f5a26de9a9d133180621d0da957b4 delete mode 100644 test/core/support/percent_decode_corpus/8e084e628ab83a18ac7ca7cb3506525263655c63 delete mode 100644 test/core/support/percent_decode_corpus/9d316c4675f40ddccaf8f1cc7aea94170b1e4223 delete mode 100644 test/core/support/percent_decode_corpus/ad1c7c11d18a7d116e2c2ef4d4c5afb1270836ae delete mode 100644 test/core/support/percent_decode_corpus/b471f94aa4facf502e622e4a248f1ba4063ae681 delete mode 100644 test/core/support/percent_decode_corpus/bf52ece030f16136d46e0dc97f58d60a0d8a1f0b delete mode 100644 test/core/support/percent_decode_corpus/d5b2a7177339ba2b7ce2f60e5f4459bef1e72758 delete mode 100644 test/core/support/percent_decode_corpus/de867b64c54a7ed773dc611fc5cd2f17c5433113 delete mode 100644 test/core/support/percent_decode_corpus/e3948dbe004950591630dd5c52f4e0fcbd5e388a delete mode 100644 test/core/support/percent_decode_corpus/e7064f0b80f61dbc65915311032d27baa569ae2a delete mode 100644 test/core/support/percent_decode_corpus/xyz delete mode 100644 test/core/support/percent_decode_fuzzer.c delete mode 100644 test/core/support/percent_encode_corpus/0d3ee7fa54e6c66103965fd4409b044ba7db6c3f delete mode 100644 test/core/support/percent_encode_corpus/2e7ccf75e27b9501e3b28cf1c50ed0c45ab7c226 delete mode 100644 test/core/support/percent_encode_corpus/55bb859f3942c462b03b7cbcf22ab4a0ac9705cf delete mode 100644 test/core/support/percent_encode_corpus/56070cecd54c845b6d4334953b17b712eb000d93 delete mode 100644 test/core/support/percent_encode_corpus/61f50e891bf7ff5eb7a7af206f1e25d77f8756e7 delete mode 100644 test/core/support/percent_encode_corpus/6e0c60cefc704c7940e475a87dd9ae423061cb5a delete mode 100644 test/core/support/percent_encode_corpus/7271ebcc6d22a0f186f7bc3c1973a7ed1bec8d8e delete mode 100644 test/core/support/percent_encode_corpus/74c83ece3e2920a67593a9be9c82468f16cbb969 delete mode 100644 test/core/support/percent_encode_corpus/98e004fd2a9f141a7a019720820080e12d637c06 delete mode 100644 test/core/support/percent_encode_corpus/ba2c1e98227aa21ea3bb2ca4d0e504119717da8b delete mode 100644 test/core/support/percent_encode_corpus/c16b9fd45370d4afb5d3ebd307a6e263c25ffd45 delete mode 100644 test/core/support/percent_encode_corpus/d58c3cd4eab9b6d2343abfa1c25c90a383fe0ec3 delete mode 100644 test/core/support/percent_encode_corpus/e2619218ede30d2b7b8ecd601a9f0ae754b728b4 delete mode 100644 test/core/support/percent_encode_corpus/f93b3653e453f0e3eea3198001be6ce46e64bd21 delete mode 100644 test/core/support/percent_encode_corpus/fd41d029c7682ad3d1c40a9fd017a4c85b673a54 delete mode 100644 test/core/support/percent_encode_corpus/xyz delete mode 100644 test/core/support/percent_encode_fuzzer.c delete mode 100644 test/core/support/percent_encoding_test.c delete mode 100644 test/core/support/slice_buffer_test.c delete mode 100644 test/core/support/slice_test.c (limited to 'src/core/lib') diff --git a/Makefile b/Makefile index 19032419a6..c208c0b471 100644 --- a/Makefile +++ b/Makefile @@ -945,8 +945,8 @@ gpr_host_port_test: $(BINDIR)/$(CONFIG)/gpr_host_port_test gpr_log_test: $(BINDIR)/$(CONFIG)/gpr_log_test gpr_mpscq_test: $(BINDIR)/$(CONFIG)/gpr_mpscq_test gpr_percent_encoding_test: $(BINDIR)/$(CONFIG)/gpr_percent_encoding_test -gpr_slice_buffer_test: $(BINDIR)/$(CONFIG)/gpr_slice_buffer_test -gpr_slice_test: $(BINDIR)/$(CONFIG)/gpr_slice_test +grpc_slice_buffer_test: $(BINDIR)/$(CONFIG)/grpc_slice_buffer_test +grpc_slice_test: $(BINDIR)/$(CONFIG)/grpc_slice_test gpr_stack_lockfree_test: $(BINDIR)/$(CONFIG)/gpr_stack_lockfree_test gpr_string_test: $(BINDIR)/$(CONFIG)/gpr_string_test gpr_sync_test: $(BINDIR)/$(CONFIG)/gpr_sync_test @@ -1279,8 +1279,8 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/gpr_log_test \ $(BINDIR)/$(CONFIG)/gpr_mpscq_test \ $(BINDIR)/$(CONFIG)/gpr_percent_encoding_test \ - $(BINDIR)/$(CONFIG)/gpr_slice_buffer_test \ - $(BINDIR)/$(CONFIG)/gpr_slice_test \ + $(BINDIR)/$(CONFIG)/grpc_slice_buffer_test \ + $(BINDIR)/$(CONFIG)/grpc_slice_test \ $(BINDIR)/$(CONFIG)/gpr_stack_lockfree_test \ $(BINDIR)/$(CONFIG)/gpr_string_test \ $(BINDIR)/$(CONFIG)/gpr_sync_test \ @@ -1631,10 +1631,10 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/gpr_mpscq_test || ( echo test gpr_mpscq_test failed ; exit 1 ) $(E) "[RUN] Testing gpr_percent_encoding_test" $(Q) $(BINDIR)/$(CONFIG)/gpr_percent_encoding_test || ( echo test gpr_percent_encoding_test failed ; exit 1 ) - $(E) "[RUN] Testing gpr_slice_buffer_test" - $(Q) $(BINDIR)/$(CONFIG)/gpr_slice_buffer_test || ( echo test gpr_slice_buffer_test failed ; exit 1 ) - $(E) "[RUN] Testing gpr_slice_test" - $(Q) $(BINDIR)/$(CONFIG)/gpr_slice_test || ( echo test gpr_slice_test failed ; exit 1 ) + $(E) "[RUN] Testing grpc_slice_buffer_test" + $(Q) $(BINDIR)/$(CONFIG)/grpc_slice_buffer_test || ( echo test grpc_slice_buffer_test failed ; exit 1 ) + $(E) "[RUN] Testing grpc_slice_test" + $(Q) $(BINDIR)/$(CONFIG)/grpc_slice_test || ( echo test grpc_slice_test failed ; exit 1 ) $(E) "[RUN] Testing gpr_stack_lockfree_test" $(Q) $(BINDIR)/$(CONFIG)/gpr_stack_lockfree_test || ( echo test gpr_stack_lockfree_test failed ; exit 1 ) $(E) "[RUN] Testing gpr_string_test" @@ -8288,22 +8288,22 @@ ifeq ($(NO_SECURE),true) # You can't build secure targets if you don't have OpenSSL. -$(BINDIR)/$(CONFIG)/gpr_slice_buffer_test: openssl_dep_error +$(BINDIR)/$(CONFIG)/grpc_slice_buffer_test: openssl_dep_error else -$(BINDIR)/$(CONFIG)/gpr_slice_buffer_test: $(GPR_SLICE_BUFFER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/grpc_slice_buffer_test: $(GPR_SLICE_BUFFER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GPR_SLICE_BUFFER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_slice_buffer_test + $(Q) $(LD) $(LDFLAGS) $(GPR_SLICE_BUFFER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_slice_buffer_test endif $(OBJDIR)/$(CONFIG)/test/core/support/slice_buffer_test.o: $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a -deps_gpr_slice_buffer_test: $(GPR_SLICE_BUFFER_TEST_OBJS:.o=.dep) +deps_grpc_slice_buffer_test: $(GPR_SLICE_BUFFER_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) @@ -8320,22 +8320,22 @@ ifeq ($(NO_SECURE),true) # You can't build secure targets if you don't have OpenSSL. -$(BINDIR)/$(CONFIG)/gpr_slice_test: openssl_dep_error +$(BINDIR)/$(CONFIG)/grpc_slice_test: openssl_dep_error else -$(BINDIR)/$(CONFIG)/gpr_slice_test: $(GPR_SLICE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/grpc_slice_test: $(GPR_SLICE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GPR_SLICE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/gpr_slice_test + $(Q) $(LD) $(LDFLAGS) $(GPR_SLICE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_slice_test endif $(OBJDIR)/$(CONFIG)/test/core/support/slice_test.o: $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a -deps_gpr_slice_test: $(GPR_SLICE_TEST_OBJS:.o=.dep) +deps_grpc_slice_test: $(GPR_SLICE_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) diff --git a/build.yaml b/build.yaml index c12595205d..d7cd82b9d9 100644 --- a/build.yaml +++ b/build.yaml @@ -64,8 +64,6 @@ filegroups: - include/grpc/support/log.h - include/grpc/support/log_windows.h - include/grpc/support/port_platform.h - - include/grpc/support/slice.h - - include/grpc/support/slice_buffer.h - include/grpc/support/string_util.h - include/grpc/support/subprocess.h - include/grpc/support/sync.h @@ -86,7 +84,6 @@ filegroups: - src/core/lib/support/env.h - src/core/lib/support/mpscq.h - src/core/lib/support/murmur_hash.h - - src/core/lib/support/percent_encoding.h - src/core/lib/support/stack_lockfree.h - src/core/lib/support/string.h - src/core/lib/support/string_windows.h @@ -116,9 +113,6 @@ filegroups: - src/core/lib/support/log_windows.c - src/core/lib/support/mpscq.c - src/core/lib/support/murmur_hash.c - - src/core/lib/support/percent_encoding.c - - src/core/lib/support/slice.c - - src/core/lib/support/slice_buffer.c - src/core/lib/support/stack_lockfree.c - src/core/lib/support/string.c - src/core/lib/support/string_posix.c @@ -165,6 +159,8 @@ filegroups: - include/grpc/grpc_posix.h - include/grpc/grpc_security_constants.h - include/grpc/status.h + - include/grpc/slice.h + - include/grpc/slice_buffer.h headers: - src/core/lib/channel/channel_args.h - src/core/lib/channel/channel_stack.h @@ -191,6 +187,7 @@ filegroups: - src/core/lib/iomgr/ev_epoll_linux.h - src/core/lib/iomgr/ev_poll_and_epoll_posix.h - src/core/lib/iomgr/ev_poll_posix.h + - src/core/lib/slice/percent_encoding.h - src/core/lib/iomgr/ev_posix.h - src/core/lib/iomgr/exec_ctx.h - src/core/lib/iomgr/executor.h @@ -204,6 +201,7 @@ filegroups: - src/core/lib/iomgr/pollset.h - src/core/lib/iomgr/pollset_set.h - src/core/lib/iomgr/pollset_set_windows.h + - src/core/lib/slice/slice_string_helpers.h - src/core/lib/iomgr/pollset_windows.h - src/core/lib/iomgr/resolve_address.h - src/core/lib/iomgr/resource_quota.h @@ -257,6 +255,10 @@ filegroups: - src/core/lib/channel/channel_stack.c - src/core/lib/channel/channel_stack_builder.c - src/core/lib/channel/compress_filter.c + - src/core/lib/slice/slice.c + - src/core/lib/slice/percent_encoding.c + - src/core/lib/slice/slice_buffer.c + - src/core/lib/slice/slice_string_helpers.c - src/core/lib/channel/connected_channel.c - src/core/lib/channel/deadline_filter.c - src/core/lib/channel/handshaker.c @@ -1748,19 +1750,19 @@ targets: deps: - gpr_test_util - gpr -- name: gpr_slice_buffer_test +- name: slice_buffer_test build: test language: c src: - - test/core/support/slice_buffer_test.c + - test/core/slice/slice_buffer_test.c deps: - gpr_test_util - gpr -- name: gpr_slice_test +- name: slice_test build: test language: c src: - - test/core/support/slice_test.c + - test/core/slice/slice_test.c deps: - gpr_test_util - gpr @@ -2313,27 +2315,27 @@ targets: build: fuzzer language: c src: - - test/core/support/percent_decode_fuzzer.c + - test/core/slice/percent_decode_fuzzer.c deps: - grpc_test_util - grpc - gpr_test_util - gpr corpus_dirs: - - test/core/support/percent_decode_corpus + - test/core/slice/percent_decode_corpus maxlen: 32 - name: percent_encode_fuzzer build: fuzzer language: c src: - - test/core/support/percent_encode_fuzzer.c + - test/core/slice/percent_encode_fuzzer.c deps: - grpc_test_util - grpc - gpr_test_util - gpr corpus_dirs: - - test/core/support/percent_encode_corpus + - test/core/slice/percent_encode_corpus maxlen: 32 - name: resolve_address_test build: test diff --git a/grpc.def b/grpc.def index 0b6db801d8..e2d6ce9b43 100644 --- a/grpc.def +++ b/grpc.def @@ -183,35 +183,35 @@ EXPORTS gpr_log_verbosity_init gpr_set_log_function gpr_format_message - gpr_slice_ref - gpr_slice_unref - gpr_slice_new - gpr_slice_new_with_user_data - gpr_slice_new_with_len - gpr_slice_malloc - gpr_slice_from_copied_string - gpr_slice_from_copied_buffer - gpr_slice_from_static_string - gpr_slice_sub - gpr_slice_sub_no_ref - gpr_slice_split_tail - gpr_slice_split_head + grpc_slice_ref + grpc_slice_unref + grpc_slice_new + grpc_slice_new_with_user_data + grpc_slice_new_with_len + grpc_slice_malloc + grpc_slice_from_copied_string + grpc_slice_from_copied_buffer + grpc_slice_from_static_string + grpc_slice_sub + grpc_slice_sub_no_ref + grpc_slice_split_tail + grpc_slice_split_head gpr_empty_slice - gpr_slice_cmp - gpr_slice_str_cmp - gpr_slice_buffer_init - gpr_slice_buffer_destroy - gpr_slice_buffer_add - gpr_slice_buffer_add_indexed - gpr_slice_buffer_addn - gpr_slice_buffer_tiny_add - gpr_slice_buffer_pop - gpr_slice_buffer_reset_and_unref - gpr_slice_buffer_swap - gpr_slice_buffer_move_into - gpr_slice_buffer_trim_end - gpr_slice_buffer_move_first - gpr_slice_buffer_take_first + grpc_slice_cmp + grpc_slice_str_cmp + grpc_slice_buffer_init + grpc_slice_buffer_destroy + grpc_slice_buffer_add + grpc_slice_buffer_add_indexed + grpc_slice_buffer_addn + grpc_slice_buffer_tiny_add + grpc_slice_buffer_pop + grpc_slice_buffer_reset_and_unref + grpc_slice_buffer_swap + grpc_slice_buffer_move_into + grpc_slice_buffer_trim_end + grpc_slice_buffer_move_first + grpc_slice_buffer_take_first gpr_strdup gpr_asprintf gpr_subprocess_binary_extension diff --git a/include/grpc++/impl/codegen/core_codegen.h b/include/grpc++/impl/codegen/core_codegen.h index 0ce009e69d..c2127a771a 100644 --- a/include/grpc++/impl/codegen/core_codegen.h +++ b/include/grpc++/impl/codegen/core_codegen.h @@ -73,17 +73,17 @@ class CoreCodegen : public CoreCodegenInterface { void grpc_byte_buffer_reader_destroy(grpc_byte_buffer_reader* reader) GRPC_OVERRIDE; int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader* reader, - gpr_slice* slice) GRPC_OVERRIDE; + grpc_slice* slice) GRPC_OVERRIDE; - grpc_byte_buffer* grpc_raw_byte_buffer_create(gpr_slice* slice, + grpc_byte_buffer* grpc_raw_byte_buffer_create(grpc_slice* slice, size_t nslices) GRPC_OVERRIDE; - gpr_slice gpr_slice_malloc(size_t length) GRPC_OVERRIDE; - void gpr_slice_unref(gpr_slice slice) GRPC_OVERRIDE; - gpr_slice gpr_slice_split_tail(gpr_slice* s, size_t split) GRPC_OVERRIDE; - void gpr_slice_buffer_add(gpr_slice_buffer* sb, - gpr_slice slice) GRPC_OVERRIDE; - void gpr_slice_buffer_pop(gpr_slice_buffer* sb) GRPC_OVERRIDE; + grpc_slice grpc_slice_malloc(size_t length) GRPC_OVERRIDE; + void grpc_slice_unref(grpc_slice slice) GRPC_OVERRIDE; + grpc_slice grpc_slice_split_tail(grpc_slice* s, size_t split) GRPC_OVERRIDE; + void grpc_slice_buffer_add(grpc_slice_buffer* sb, + grpc_slice slice) GRPC_OVERRIDE; + void grpc_slice_buffer_pop(grpc_slice_buffer* sb) GRPC_OVERRIDE; void grpc_metadata_array_init(grpc_metadata_array* array) GRPC_OVERRIDE; void grpc_metadata_array_destroy(grpc_metadata_array* array) GRPC_OVERRIDE; diff --git a/include/grpc++/impl/codegen/core_codegen_interface.h b/include/grpc++/impl/codegen/core_codegen_interface.h index 68851f15c6..743f528373 100644 --- a/include/grpc++/impl/codegen/core_codegen_interface.h +++ b/include/grpc++/impl/codegen/core_codegen_interface.h @@ -88,16 +88,16 @@ class CoreCodegenInterface { virtual void grpc_byte_buffer_reader_destroy( grpc_byte_buffer_reader* reader) = 0; virtual int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader* reader, - gpr_slice* slice) = 0; + grpc_slice* slice) = 0; - virtual grpc_byte_buffer* grpc_raw_byte_buffer_create(gpr_slice* slice, + virtual grpc_byte_buffer* grpc_raw_byte_buffer_create(grpc_slice* slice, size_t nslices) = 0; - virtual gpr_slice gpr_slice_malloc(size_t length) = 0; - virtual void gpr_slice_unref(gpr_slice slice) = 0; - virtual gpr_slice gpr_slice_split_tail(gpr_slice* s, size_t split) = 0; - virtual void gpr_slice_buffer_add(gpr_slice_buffer* sb, gpr_slice slice) = 0; - virtual void gpr_slice_buffer_pop(gpr_slice_buffer* sb) = 0; + virtual grpc_slice grpc_slice_malloc(size_t length) = 0; + virtual void grpc_slice_unref(grpc_slice slice) = 0; + virtual grpc_slice grpc_slice_split_tail(grpc_slice* s, size_t split) = 0; + virtual void grpc_slice_buffer_add(grpc_slice_buffer* sb, grpc_slice slice) = 0; + virtual void grpc_slice_buffer_pop(grpc_slice_buffer* sb) = 0; virtual void grpc_metadata_array_init(grpc_metadata_array* array) = 0; virtual void grpc_metadata_array_destroy(grpc_metadata_array* array) = 0; diff --git a/include/grpc++/impl/codegen/proto_utils.h b/include/grpc++/impl/codegen/proto_utils.h index 6f4786b87b..4885ea0ee7 100644 --- a/include/grpc++/impl/codegen/proto_utils.h +++ b/include/grpc++/impl/codegen/proto_utils.h @@ -63,7 +63,7 @@ class GrpcBufferWriter GRPC_FINAL ~GrpcBufferWriter() GRPC_OVERRIDE { if (have_backup_) { - g_core_codegen_interface->gpr_slice_unref(backup_slice_); + g_core_codegen_interface->grpc_slice_unref(backup_slice_); } } @@ -72,24 +72,24 @@ class GrpcBufferWriter GRPC_FINAL slice_ = backup_slice_; have_backup_ = false; } else { - slice_ = g_core_codegen_interface->gpr_slice_malloc(block_size_); + slice_ = g_core_codegen_interface->grpc_slice_malloc(block_size_); } *data = GPR_SLICE_START_PTR(slice_); // On win x64, int is only 32bit GPR_CODEGEN_ASSERT(GPR_SLICE_LENGTH(slice_) <= INT_MAX); byte_count_ += * size = (int)GPR_SLICE_LENGTH(slice_); - g_core_codegen_interface->gpr_slice_buffer_add(slice_buffer_, slice_); + g_core_codegen_interface->grpc_slice_buffer_add(slice_buffer_, slice_); return true; } void BackUp(int count) GRPC_OVERRIDE { - g_core_codegen_interface->gpr_slice_buffer_pop(slice_buffer_); + g_core_codegen_interface->grpc_slice_buffer_pop(slice_buffer_); if (count == block_size_) { backup_slice_ = slice_; } else { - backup_slice_ = g_core_codegen_interface->gpr_slice_split_tail( + backup_slice_ = g_core_codegen_interface->grpc_slice_split_tail( &slice_, GPR_SLICE_LENGTH(slice_) - count); - g_core_codegen_interface->gpr_slice_buffer_add(slice_buffer_, slice_); + g_core_codegen_interface->grpc_slice_buffer_add(slice_buffer_, slice_); } have_backup_ = true; byte_count_ -= count; @@ -100,10 +100,10 @@ class GrpcBufferWriter GRPC_FINAL private: const int block_size_; int64_t byte_count_; - gpr_slice_buffer* slice_buffer_; + grpc_slice_buffer* slice_buffer_; bool have_backup_; - gpr_slice backup_slice_; - gpr_slice slice_; + grpc_slice backup_slice_; + grpc_slice slice_; }; class GrpcBufferReader GRPC_FINAL @@ -137,7 +137,7 @@ class GrpcBufferReader GRPC_FINAL &slice_)) { return false; } - g_core_codegen_interface->gpr_slice_unref(slice_); + g_core_codegen_interface->grpc_slice_unref(slice_); *data = GPR_SLICE_START_PTR(slice_); // On win x64, int is only 32bit GPR_CODEGEN_ASSERT(GPR_SLICE_LENGTH(slice_) <= INT_MAX); @@ -172,7 +172,7 @@ class GrpcBufferReader GRPC_FINAL int64_t byte_count_; int64_t backup_count_; grpc_byte_buffer_reader reader_; - gpr_slice slice_; + grpc_slice slice_; Status status_; }; } // namespace internal @@ -186,12 +186,12 @@ class SerializationTraitsgpr_slice_malloc(byte_size); + grpc_slice slice = g_core_codegen_interface->grpc_slice_malloc(byte_size); GPR_CODEGEN_ASSERT( GPR_SLICE_END_PTR(slice) == msg.SerializeWithCachedSizesToArray(GPR_SLICE_START_PTR(slice))); *bp = g_core_codegen_interface->grpc_raw_byte_buffer_create(&slice, 1); - g_core_codegen_interface->gpr_slice_unref(slice); + g_core_codegen_interface->grpc_slice_unref(slice); return g_core_codegen_interface->ok(); } else { internal::GrpcBufferWriter writer( diff --git a/include/grpc++/impl/codegen/thrift_serializer.h b/include/grpc++/impl/codegen/thrift_serializer.h index fd324a994f..691ce1af48 100644 --- a/include/grpc++/impl/codegen/thrift_serializer.h +++ b/include/grpc++/impl/codegen/thrift_serializer.h @@ -109,12 +109,12 @@ class ThriftSerializer { Serialize(fields, &byte_buffer, &byte_buffer_size); - gpr_slice slice = gpr_slice_from_copied_buffer( + grpc_slice slice = grpc_slice_from_copied_buffer( reinterpret_cast(byte_buffer), byte_buffer_size); *bp = grpc_raw_byte_buffer_create(&slice, 1); - gpr_slice_unref(slice); + grpc_slice_unref(slice); } // Deserialize the passed char array into the passed type, returns the number @@ -156,12 +156,12 @@ class ThriftSerializer { grpc_byte_buffer_reader reader; grpc_byte_buffer_reader_init(&reader, buffer); - gpr_slice slice = grpc_byte_buffer_reader_readall(&reader); + grpc_slice slice = grpc_byte_buffer_reader_readall(&reader); uint32_t len = Deserialize(GPR_SLICE_START_PTR(slice), GPR_SLICE_LENGTH(slice), msg); - gpr_slice_unref(slice); + grpc_slice_unref(slice); grpc_byte_buffer_reader_destroy(&reader); diff --git a/include/grpc++/support/slice.h b/include/grpc++/support/slice.h index 5874b4f5ae..b06b1b69e5 100644 --- a/include/grpc++/support/slice.h +++ b/include/grpc++/support/slice.h @@ -39,7 +39,7 @@ namespace grpc { -/// A wrapper around \a gpr_slice. +/// A wrapper around \a grpc_slice. /// /// A slice represents a contiguous reference counted array of bytes. /// It is cheap to take references to a slice, and it is cheap to create a @@ -53,11 +53,11 @@ class Slice GRPC_FINAL { enum AddRef { ADD_REF }; /// Construct a slice from \a slice, adding a reference. - Slice(gpr_slice slice, AddRef); + Slice(grpc_slice slice, AddRef); enum StealRef { STEAL_REF }; /// Construct a slice from \a slice, stealing a reference. - Slice(gpr_slice slice, StealRef); + Slice(grpc_slice slice, StealRef); /// Copy constructor, adds a reference. Slice(const Slice& other); @@ -77,13 +77,13 @@ class Slice GRPC_FINAL { /// Raw pointer to the end (one byte \em past the last element) of the slice. const uint8_t* end() const { return GPR_SLICE_END_PTR(slice_); } - /// Raw C slice. Caller needs to call gpr_slice_unref when done. - gpr_slice c_slice() const { return gpr_slice_ref(slice_); } + /// Raw C slice. Caller needs to call grpc_slice_unref when done. + grpc_slice c_slice() const { return grpc_slice_ref(slice_); } private: friend class ByteBuffer; - gpr_slice slice_; + grpc_slice slice_; }; } // namespace grpc diff --git a/include/grpc/byte_buffer.h b/include/grpc/byte_buffer.h index f25c1d51d6..3cf31df0df 100644 --- a/include/grpc/byte_buffer.h +++ b/include/grpc/byte_buffer.h @@ -45,7 +45,7 @@ extern "C" { * * Increases the reference count for all \a slices processed. The user is * responsible for invoking grpc_byte_buffer_destroy on the returned instance.*/ -GRPCAPI grpc_byte_buffer *grpc_raw_byte_buffer_create(gpr_slice *slices, +GRPCAPI grpc_byte_buffer *grpc_raw_byte_buffer_create(grpc_slice *slices, size_t nslices); /** Returns a *compressed* RAW byte buffer instance over the given slices (up to @@ -55,7 +55,7 @@ GRPCAPI grpc_byte_buffer *grpc_raw_byte_buffer_create(gpr_slice *slices, * Increases the reference count for all \a slices processed. The user is * responsible for invoking grpc_byte_buffer_destroy on the returned instance.*/ GRPCAPI grpc_byte_buffer *grpc_raw_compressed_byte_buffer_create( - gpr_slice *slices, size_t nslices, grpc_compression_algorithm compression); + grpc_slice *slices, size_t nslices, grpc_compression_algorithm compression); /** Copies input byte buffer \a bb. * @@ -83,12 +83,12 @@ GRPCAPI void grpc_byte_buffer_reader_destroy(grpc_byte_buffer_reader *reader); /** Updates \a slice with the next piece of data from from \a reader and returns * 1. Returns 0 at the end of the stream. Caller is responsible for calling - * gpr_slice_unref on the result. */ + * grpc_slice_unref on the result. */ GRPCAPI int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader *reader, - gpr_slice *slice); + grpc_slice *slice); /** Merge all data from \a reader into single slice */ -GRPCAPI gpr_slice +GRPCAPI grpc_slice grpc_byte_buffer_reader_readall(grpc_byte_buffer_reader *reader); /** Returns a RAW byte buffer instance from the output of \a reader. */ diff --git a/include/grpc/impl/codegen/gpr_types.h b/include/grpc/impl/codegen/gpr_types.h index c8f0815f0b..ed9976f429 100644 --- a/include/grpc/impl/codegen/gpr_types.h +++ b/include/grpc/impl/codegen/gpr_types.h @@ -68,71 +68,6 @@ typedef struct gpr_timespec { gpr_clock_type clock_type; } gpr_timespec; -/* Slice API - - A slice represents a contiguous reference counted array of bytes. - It is cheap to take references to a slice, and it is cheap to create a - slice pointing to a subset of another slice. - - The data-structure for slices is exposed here to allow non-gpr code to - build slices from whatever data they have available. - - When defining interfaces that handle slices, care should be taken to define - reference ownership semantics (who should call unref?) and mutability - constraints (is the callee allowed to modify the slice?) */ - -/* Reference count container for gpr_slice. Contains function pointers to - increment and decrement reference counts. Implementations should cleanup - when the reference count drops to zero. - Typically client code should not touch this, and use gpr_slice_malloc, - gpr_slice_new, or gpr_slice_new_with_len instead. */ -typedef struct gpr_slice_refcount { - void (*ref)(void *); - void (*unref)(void *); -} gpr_slice_refcount; - -#define GPR_SLICE_INLINED_SIZE (sizeof(size_t) + sizeof(uint8_t *) - 1) - -/* A gpr_slice s, if initialized, represents the byte range - s.bytes[0..s.length-1]. - - It can have an associated ref count which has a destruction routine to be run - when the ref count reaches zero (see gpr_slice_new() and grp_slice_unref()). - Multiple gpr_slice values may share a ref count. - - If the slice does not have a refcount, it represents an inlined small piece - of data that is copied by value. */ -typedef struct gpr_slice { - struct gpr_slice_refcount *refcount; - union { - struct { - uint8_t *bytes; - size_t length; - } refcounted; - struct { - uint8_t length; - uint8_t bytes[GPR_SLICE_INLINED_SIZE]; - } inlined; - } data; -} gpr_slice; - -#define GRPC_SLICE_BUFFER_INLINE_ELEMENTS 8 - -/* Represents an expandable array of slices, to be interpreted as a - single item. */ -typedef struct { - /* slices in the array */ - gpr_slice *slices; - /* the number of slices in the array */ - size_t count; - /* the number of slices allocated in the array */ - size_t capacity; - /* the combined length of all slices in the array */ - size_t length; - /* inlined elements to avoid allocations */ - gpr_slice inlined[GRPC_SLICE_BUFFER_INLINE_ELEMENTS]; -} gpr_slice_buffer; - #ifdef __cplusplus } #endif diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index d2dce0d511..cbd484ba33 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -35,6 +35,7 @@ #define GRPC_IMPL_CODEGEN_GRPC_TYPES_H #include +#include #include #include @@ -60,7 +61,7 @@ typedef struct grpc_byte_buffer { } reserved; struct { grpc_compression_algorithm compression; - gpr_slice_buffer slice_buffer; + grpc_slice_buffer slice_buffer; } raw; } data; } grpc_byte_buffer; diff --git a/include/grpc/impl/codegen/slice.h b/include/grpc/impl/codegen/slice.h index a2637eea62..79297ce23d 100644 --- a/include/grpc/impl/codegen/slice.h +++ b/include/grpc/impl/codegen/slice.h @@ -35,6 +35,72 @@ #define GRPC_IMPL_CODEGEN_SLICE_H #include +#include + +/* Slice API + + A slice represents a contiguous reference counted array of bytes. + It is cheap to take references to a slice, and it is cheap to create a + slice pointing to a subset of another slice. + + The data-structure for slices is exposed here to allow non-gpr code to + build slices from whatever data they have available. + + When defining interfaces that handle slices, care should be taken to define + reference ownership semantics (who should call unref?) and mutability + constraints (is the callee allowed to modify the slice?) */ + +/* Reference count container for grpc_slice. Contains function pointers to + increment and decrement reference counts. Implementations should cleanup + when the reference count drops to zero. + Typically client code should not touch this, and use grpc_slice_malloc, + grpc_slice_new, or grpc_slice_new_with_len instead. */ +typedef struct grpc_slice_refcount { + void (*ref)(void *); + void (*unref)(void *); +} grpc_slice_refcount; + +#define GPR_SLICE_INLINED_SIZE (sizeof(size_t) + sizeof(uint8_t *) - 1) + +/* A grpc_slice s, if initialized, represents the byte range + s.bytes[0..s.length-1]. + + It can have an associated ref count which has a destruction routine to be run + when the ref count reaches zero (see grpc_slice_new() and grp_slice_unref()). + Multiple grpc_slice values may share a ref count. + + If the slice does not have a refcount, it represents an inlined small piece + of data that is copied by value. */ +typedef struct grpc_slice { + struct grpc_slice_refcount *refcount; + union { + struct { + uint8_t *bytes; + size_t length; + } refcounted; + struct { + uint8_t length; + uint8_t bytes[GPR_SLICE_INLINED_SIZE]; + } inlined; + } data; +} grpc_slice; + +#define GRPC_SLICE_BUFFER_INLINE_ELEMENTS 8 + +/* Represents an expandable array of slices, to be interpreted as a + single item. */ +typedef struct { + /* slices in the array */ + grpc_slice *slices; + /* the number of slices in the array */ + size_t count; + /* the number of slices allocated in the array */ + size_t capacity; + /* the combined length of all slices in the array */ + size_t length; + /* inlined elements to avoid allocations */ + grpc_slice inlined[GRPC_SLICE_BUFFER_INLINE_ELEMENTS]; +} grpc_slice_buffer; #define GPR_SLICE_START_PTR(slice) \ ((slice).refcount ? (slice).data.refcounted.bytes \ diff --git a/include/grpc/slice.h b/include/grpc/slice.h new file mode 100644 index 0000000000..5953e0ccb7 --- /dev/null +++ b/include/grpc/slice.h @@ -0,0 +1,128 @@ +/* + * + * 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. + * + */ + +#ifndef GRPC_SUPPORT_SLICE_H +#define GRPC_SUPPORT_SLICE_H + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Increment the refcount of s. Requires slice is initialized. + Returns s. */ +GPRAPI grpc_slice grpc_slice_ref(grpc_slice s); + +/* Decrement the ref count of s. If the ref count of s reaches zero, all + slices sharing the ref count are destroyed, and considered no longer + initialized. If s is ultimately derived from a call to grpc_slice_new(start, + len, dest) where dest!=NULL , then (*dest)(start) is called, else if s is + ultimately derived from a call to grpc_slice_new_with_len(start, len, dest) + where dest!=NULL , then (*dest)(start, len). Requires s initialized. */ +GPRAPI void grpc_slice_unref(grpc_slice s); + +/* Create a slice pointing at some data. Calls malloc to allocate a refcount + for the object, and arranges that destroy will be called with the pointer + passed in at destruction. */ +GPRAPI grpc_slice grpc_slice_new(void *p, size_t len, void (*destroy)(void *)); + +/* Equivalent to grpc_slice_new, but with a separate pointer that is + passed to the destroy function. This function can be useful when + the data is part of a larger structure that must be destroyed when + the data is no longer needed. */ +GPRAPI grpc_slice grpc_slice_new_with_user_data(void *p, size_t len, + void (*destroy)(void *), + void *user_data); + +/* Equivalent to grpc_slice_new, but with a two argument destroy function that + also takes the slice length. */ +GPRAPI grpc_slice grpc_slice_new_with_len(void *p, size_t len, + void (*destroy)(void *, size_t)); + +/* Equivalent to grpc_slice_new(malloc(len), len, free), but saves one malloc() + call. + Aborts if malloc() fails. */ +GPRAPI grpc_slice grpc_slice_malloc(size_t length); + +/* Create a slice by copying a string. + Does not preserve null terminators. + Equivalent to: + size_t len = strlen(source); + grpc_slice slice = grpc_slice_malloc(len); + memcpy(slice->data, source, len); */ +GPRAPI grpc_slice grpc_slice_from_copied_string(const char *source); + +/* Create a slice by copying a buffer. + Equivalent to: + grpc_slice slice = grpc_slice_malloc(len); + memcpy(slice->data, source, len); */ +GPRAPI grpc_slice grpc_slice_from_copied_buffer(const char *source, size_t len); + +/* Create a slice pointing to constant memory */ +GPRAPI grpc_slice grpc_slice_from_static_string(const char *source); + +/* Return a result slice derived from s, which shares a ref count with s, where + result.data==s.data+begin, and result.length==end-begin. + The ref count of s is increased by one. + Requires s initialized, begin <= end, begin <= s.length, and + end <= source->length. */ +GPRAPI grpc_slice grpc_slice_sub(grpc_slice s, size_t begin, size_t end); + +/* The same as grpc_slice_sub, but without altering the ref count */ +GPRAPI grpc_slice grpc_slice_sub_no_ref(grpc_slice s, size_t begin, size_t end); + +/* Splits s into two: modifies s to be s[0:split], and returns a new slice, + sharing a refcount with s, that contains s[split:s.length]. + Requires s intialized, split <= s.length */ +GPRAPI grpc_slice grpc_slice_split_tail(grpc_slice *s, size_t split); + +/* Splits s into two: modifies s to be s[split:s.length], and returns a new + slice, sharing a refcount with s, that contains s[0:split]. + Requires s intialized, split <= s.length */ +GPRAPI grpc_slice grpc_slice_split_head(grpc_slice *s, size_t split); + +GPRAPI grpc_slice gpr_empty_slice(void); + +/* Returns <0 if a < b, ==0 if a == b, >0 if a > b + The order is arbitrary, and is not guaranteed to be stable across different + versions of the API. */ +GPRAPI int grpc_slice_cmp(grpc_slice a, grpc_slice b); +GPRAPI int grpc_slice_str_cmp(grpc_slice a, const char *b); + +#ifdef __cplusplus +} +#endif + +#endif /* GRPC_SUPPORT_SLICE_H */ diff --git a/include/grpc/slice_buffer.h b/include/grpc/slice_buffer.h new file mode 100644 index 0000000000..bff0d76914 --- /dev/null +++ b/include/grpc/slice_buffer.h @@ -0,0 +1,87 @@ +/* + * + * 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. + * + */ + +#ifndef GRPC_SUPPORT_SLICE_BUFFER_H +#define GRPC_SUPPORT_SLICE_BUFFER_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* initialize a slice buffer */ +GPRAPI void grpc_slice_buffer_init(grpc_slice_buffer *sb); +/* destroy a slice buffer - unrefs any held elements */ +GPRAPI void grpc_slice_buffer_destroy(grpc_slice_buffer *sb); +/* Add an element to a slice buffer - takes ownership of the slice. + This function is allowed to concatenate the passed in slice to the end of + some other slice if desired by the slice buffer. */ +GPRAPI void grpc_slice_buffer_add(grpc_slice_buffer *sb, grpc_slice slice); +/* add an element to a slice buffer - takes ownership of the slice and returns + the index of the slice. + Guarantees that the slice will not be concatenated at the end of another + slice (i.e. the data for this slice will begin at the first byte of the + slice at the returned index in sb->slices) + The implementation MAY decide to concatenate data at the end of a small + slice added in this fashion. */ +GPRAPI size_t grpc_slice_buffer_add_indexed(grpc_slice_buffer *sb, + grpc_slice slice); +GPRAPI void grpc_slice_buffer_addn(grpc_slice_buffer *sb, grpc_slice *slices, + size_t n); +/* add a very small (less than 8 bytes) amount of data to the end of a slice + buffer: returns a pointer into which to add the data */ +GPRAPI uint8_t *grpc_slice_buffer_tiny_add(grpc_slice_buffer *sb, size_t len); +/* pop the last buffer, but don't unref it */ +GPRAPI void grpc_slice_buffer_pop(grpc_slice_buffer *sb); +/* clear a slice buffer, unref all elements */ +GPRAPI void grpc_slice_buffer_reset_and_unref(grpc_slice_buffer *sb); +/* swap the contents of two slice buffers */ +GPRAPI void grpc_slice_buffer_swap(grpc_slice_buffer *a, grpc_slice_buffer *b); +/* move all of the elements of src into dst */ +GPRAPI void grpc_slice_buffer_move_into(grpc_slice_buffer *src, + grpc_slice_buffer *dst); +/* remove n bytes from the end of a slice buffer */ +GPRAPI void grpc_slice_buffer_trim_end(grpc_slice_buffer *src, size_t n, + grpc_slice_buffer *garbage); +/* move the first n bytes of src into dst */ +GPRAPI void grpc_slice_buffer_move_first(grpc_slice_buffer *src, size_t n, + grpc_slice_buffer *dst); +/* take the first slice in the slice buffer */ +GPRAPI grpc_slice grpc_slice_buffer_take_first(grpc_slice_buffer *src); + +#ifdef __cplusplus +} +#endif + +#endif /* GRPC_SUPPORT_SLICE_BUFFER_H */ diff --git a/include/grpc/support/slice.h b/include/grpc/support/slice.h deleted file mode 100644 index b31fe6c0c5..0000000000 --- a/include/grpc/support/slice.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - * - * 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. - * - */ - -#ifndef GRPC_SUPPORT_SLICE_H -#define GRPC_SUPPORT_SLICE_H - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* Increment the refcount of s. Requires slice is initialized. - Returns s. */ -GPRAPI gpr_slice gpr_slice_ref(gpr_slice s); - -/* Decrement the ref count of s. If the ref count of s reaches zero, all - slices sharing the ref count are destroyed, and considered no longer - initialized. If s is ultimately derived from a call to gpr_slice_new(start, - len, dest) where dest!=NULL , then (*dest)(start) is called, else if s is - ultimately derived from a call to gpr_slice_new_with_len(start, len, dest) - where dest!=NULL , then (*dest)(start, len). Requires s initialized. */ -GPRAPI void gpr_slice_unref(gpr_slice s); - -/* Create a slice pointing at some data. Calls malloc to allocate a refcount - for the object, and arranges that destroy will be called with the pointer - passed in at destruction. */ -GPRAPI gpr_slice gpr_slice_new(void *p, size_t len, void (*destroy)(void *)); - -/* Equivalent to gpr_slice_new, but with a separate pointer that is - passed to the destroy function. This function can be useful when - the data is part of a larger structure that must be destroyed when - the data is no longer needed. */ -GPRAPI gpr_slice gpr_slice_new_with_user_data(void *p, size_t len, - void (*destroy)(void *), - void *user_data); - -/* Equivalent to gpr_slice_new, but with a two argument destroy function that - also takes the slice length. */ -GPRAPI gpr_slice gpr_slice_new_with_len(void *p, size_t len, - void (*destroy)(void *, size_t)); - -/* Equivalent to gpr_slice_new(malloc(len), len, free), but saves one malloc() - call. - Aborts if malloc() fails. */ -GPRAPI gpr_slice gpr_slice_malloc(size_t length); - -/* Create a slice by copying a string. - Does not preserve null terminators. - Equivalent to: - size_t len = strlen(source); - gpr_slice slice = gpr_slice_malloc(len); - memcpy(slice->data, source, len); */ -GPRAPI gpr_slice gpr_slice_from_copied_string(const char *source); - -/* Create a slice by copying a buffer. - Equivalent to: - gpr_slice slice = gpr_slice_malloc(len); - memcpy(slice->data, source, len); */ -GPRAPI gpr_slice gpr_slice_from_copied_buffer(const char *source, size_t len); - -/* Create a slice pointing to constant memory */ -GPRAPI gpr_slice gpr_slice_from_static_string(const char *source); - -/* Return a result slice derived from s, which shares a ref count with s, where - result.data==s.data+begin, and result.length==end-begin. - The ref count of s is increased by one. - Requires s initialized, begin <= end, begin <= s.length, and - end <= source->length. */ -GPRAPI gpr_slice gpr_slice_sub(gpr_slice s, size_t begin, size_t end); - -/* The same as gpr_slice_sub, but without altering the ref count */ -GPRAPI gpr_slice gpr_slice_sub_no_ref(gpr_slice s, size_t begin, size_t end); - -/* Splits s into two: modifies s to be s[0:split], and returns a new slice, - sharing a refcount with s, that contains s[split:s.length]. - Requires s intialized, split <= s.length */ -GPRAPI gpr_slice gpr_slice_split_tail(gpr_slice *s, size_t split); - -/* Splits s into two: modifies s to be s[split:s.length], and returns a new - slice, sharing a refcount with s, that contains s[0:split]. - Requires s intialized, split <= s.length */ -GPRAPI gpr_slice gpr_slice_split_head(gpr_slice *s, size_t split); - -GPRAPI gpr_slice gpr_empty_slice(void); - -/* Returns <0 if a < b, ==0 if a == b, >0 if a > b - The order is arbitrary, and is not guaranteed to be stable across different - versions of the API. */ -GPRAPI int gpr_slice_cmp(gpr_slice a, gpr_slice b); -GPRAPI int gpr_slice_str_cmp(gpr_slice a, const char *b); - -#ifdef __cplusplus -} -#endif - -#endif /* GRPC_SUPPORT_SLICE_H */ diff --git a/include/grpc/support/slice_buffer.h b/include/grpc/support/slice_buffer.h deleted file mode 100644 index 3920432b02..0000000000 --- a/include/grpc/support/slice_buffer.h +++ /dev/null @@ -1,87 +0,0 @@ -/* - * - * 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. - * - */ - -#ifndef GRPC_SUPPORT_SLICE_BUFFER_H -#define GRPC_SUPPORT_SLICE_BUFFER_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* initialize a slice buffer */ -GPRAPI void gpr_slice_buffer_init(gpr_slice_buffer *sb); -/* destroy a slice buffer - unrefs any held elements */ -GPRAPI void gpr_slice_buffer_destroy(gpr_slice_buffer *sb); -/* Add an element to a slice buffer - takes ownership of the slice. - This function is allowed to concatenate the passed in slice to the end of - some other slice if desired by the slice buffer. */ -GPRAPI void gpr_slice_buffer_add(gpr_slice_buffer *sb, gpr_slice slice); -/* add an element to a slice buffer - takes ownership of the slice and returns - the index of the slice. - Guarantees that the slice will not be concatenated at the end of another - slice (i.e. the data for this slice will begin at the first byte of the - slice at the returned index in sb->slices) - The implementation MAY decide to concatenate data at the end of a small - slice added in this fashion. */ -GPRAPI size_t gpr_slice_buffer_add_indexed(gpr_slice_buffer *sb, - gpr_slice slice); -GPRAPI void gpr_slice_buffer_addn(gpr_slice_buffer *sb, gpr_slice *slices, - size_t n); -/* add a very small (less than 8 bytes) amount of data to the end of a slice - buffer: returns a pointer into which to add the data */ -GPRAPI uint8_t *gpr_slice_buffer_tiny_add(gpr_slice_buffer *sb, size_t len); -/* pop the last buffer, but don't unref it */ -GPRAPI void gpr_slice_buffer_pop(gpr_slice_buffer *sb); -/* clear a slice buffer, unref all elements */ -GPRAPI void gpr_slice_buffer_reset_and_unref(gpr_slice_buffer *sb); -/* swap the contents of two slice buffers */ -GPRAPI void gpr_slice_buffer_swap(gpr_slice_buffer *a, gpr_slice_buffer *b); -/* move all of the elements of src into dst */ -GPRAPI void gpr_slice_buffer_move_into(gpr_slice_buffer *src, - gpr_slice_buffer *dst); -/* remove n bytes from the end of a slice buffer */ -GPRAPI void gpr_slice_buffer_trim_end(gpr_slice_buffer *src, size_t n, - gpr_slice_buffer *garbage); -/* move the first n bytes of src into dst */ -GPRAPI void gpr_slice_buffer_move_first(gpr_slice_buffer *src, size_t n, - gpr_slice_buffer *dst); -/* take the first slice in the slice buffer */ -GPRAPI gpr_slice gpr_slice_buffer_take_first(gpr_slice_buffer *src); - -#ifdef __cplusplus -} -#endif - -#endif /* GRPC_SUPPORT_SLICE_BUFFER_H */ diff --git a/src/core/ext/client_channel/connector.h b/src/core/ext/client_channel/connector.h index e08244b2c0..3c2cf7877f 100644 --- a/src/core/ext/client_channel/connector.h +++ b/src/core/ext/client_channel/connector.h @@ -52,7 +52,7 @@ typedef struct { const struct sockaddr *addr; size_t addr_len; /** initial connect string to send */ - gpr_slice initial_connect_string; + grpc_slice initial_connect_string; /** deadline for connection */ gpr_timespec deadline; /** channel arguments (to be passed to transport) */ diff --git a/src/core/ext/client_channel/default_initial_connect_string.c b/src/core/ext/client_channel/default_initial_connect_string.c index a70da4a84a..784173f0e2 100644 --- a/src/core/ext/client_channel/default_initial_connect_string.c +++ b/src/core/ext/client_channel/default_initial_connect_string.c @@ -36,4 +36,4 @@ void grpc_set_default_initial_connect_string(struct sockaddr **addr, size_t *addr_len, - gpr_slice *initial_str) {} + grpc_slice *initial_str) {} diff --git a/src/core/ext/client_channel/http_connect_handshaker.c b/src/core/ext/client_channel/http_connect_handshaker.c index ea2cbbdd97..9c175af09a 100644 --- a/src/core/ext/client_channel/http_connect_handshaker.c +++ b/src/core/ext/client_channel/http_connect_handshaker.c @@ -60,8 +60,8 @@ typedef struct http_connect_handshaker { void* user_data; // Objects for processing the HTTP CONNECT request and response. - gpr_slice_buffer write_buffer; - gpr_slice_buffer* read_buffer; // Ownership passes through this object. + grpc_slice_buffer write_buffer; + grpc_slice_buffer* read_buffer; // Ownership passes through this object. grpc_closure request_done_closure; grpc_closure response_read_closure; grpc_http_parser http_parser; @@ -76,7 +76,7 @@ static void http_connect_handshaker_unref(http_connect_handshaker* handshaker) { if (gpr_unref(&handshaker->refcount)) { gpr_free(handshaker->proxy_server); gpr_free(handshaker->server_name); - gpr_slice_buffer_destroy(&handshaker->write_buffer); + grpc_slice_buffer_destroy(&handshaker->write_buffer); grpc_http_parser_destroy(&handshaker->http_parser); grpc_http_response_destroy(&handshaker->http_response); gpr_free(handshaker); @@ -129,20 +129,20 @@ static void on_read_done(grpc_exec_ctx* exec_ctx, void* arg, grpc_timer_cancel(exec_ctx, &handshaker->timeout_timer); // Remove the data we've already read from the read buffer, // leaving only the leftover bytes (if any). - gpr_slice_buffer tmp_buffer; - gpr_slice_buffer_init(&tmp_buffer); + grpc_slice_buffer tmp_buffer; + grpc_slice_buffer_init(&tmp_buffer); if (body_start_offset < GPR_SLICE_LENGTH(handshaker->read_buffer->slices[i])) { - gpr_slice_buffer_add( + grpc_slice_buffer_add( &tmp_buffer, - gpr_slice_split_tail(&handshaker->read_buffer->slices[i], + grpc_slice_split_tail(&handshaker->read_buffer->slices[i], body_start_offset)); } - gpr_slice_buffer_addn(&tmp_buffer, + grpc_slice_buffer_addn(&tmp_buffer, &handshaker->read_buffer->slices[i + 1], handshaker->read_buffer->count - i - 1); - gpr_slice_buffer_swap(handshaker->read_buffer, &tmp_buffer); - gpr_slice_buffer_destroy(&tmp_buffer); + grpc_slice_buffer_swap(handshaker->read_buffer, &tmp_buffer); + grpc_slice_buffer_destroy(&tmp_buffer); break; } } @@ -159,7 +159,7 @@ static void on_read_done(grpc_exec_ctx* exec_ctx, void* arg, // complete (e.g., handling chunked transfer encoding or looking // at the Content-Length: header). if (handshaker->http_parser.state != GRPC_HTTP_BODY) { - gpr_slice_buffer_reset_and_unref(handshaker->read_buffer); + grpc_slice_buffer_reset_and_unref(handshaker->read_buffer); grpc_endpoint_read(exec_ctx, handshaker->endpoint, handshaker->read_buffer, &handshaker->response_read_closure); return; @@ -195,7 +195,7 @@ static void http_connect_handshaker_shutdown(grpc_exec_ctx* exec_ctx, static void http_connect_handshaker_do_handshake( grpc_exec_ctx* exec_ctx, grpc_handshaker* handshaker_in, grpc_endpoint* endpoint, grpc_channel_args* args, - gpr_slice_buffer* read_buffer, gpr_timespec deadline, + grpc_slice_buffer* read_buffer, gpr_timespec deadline, grpc_tcp_server_acceptor* acceptor, grpc_handshaker_done_cb cb, void* user_data) { http_connect_handshaker* handshaker = (http_connect_handshaker*)handshaker_in; @@ -214,8 +214,8 @@ static void http_connect_handshaker_do_handshake( request.http.method = "CONNECT"; request.http.path = handshaker->server_name; request.handshaker = &grpc_httpcli_plaintext; - gpr_slice request_slice = grpc_httpcli_format_connect_request(&request); - gpr_slice_buffer_add(&handshaker->write_buffer, request_slice); + grpc_slice request_slice = grpc_httpcli_format_connect_request(&request); + grpc_slice_buffer_add(&handshaker->write_buffer, request_slice); grpc_endpoint_write(exec_ctx, endpoint, &handshaker->write_buffer, &handshaker->request_done_closure); // Set timeout timer. The timer gets a reference to the handshaker. @@ -239,7 +239,7 @@ grpc_handshaker* grpc_http_connect_handshaker_create(const char* proxy_server, grpc_handshaker_init(&http_connect_handshaker_vtable, &handshaker->base); handshaker->proxy_server = gpr_strdup(proxy_server); handshaker->server_name = gpr_strdup(server_name); - gpr_slice_buffer_init(&handshaker->write_buffer); + grpc_slice_buffer_init(&handshaker->write_buffer); grpc_closure_init(&handshaker->request_done_closure, on_write_done, handshaker); grpc_closure_init(&handshaker->response_read_closure, on_read_done, diff --git a/src/core/ext/client_channel/initial_connect_string.c b/src/core/ext/client_channel/initial_connect_string.c index fd8ddb83a8..8737b330a8 100644 --- a/src/core/ext/client_channel/initial_connect_string.c +++ b/src/core/ext/client_channel/initial_connect_string.c @@ -37,7 +37,7 @@ extern void grpc_set_default_initial_connect_string(struct sockaddr **addr, size_t *addr_len, - gpr_slice *initial_str); + grpc_slice *initial_str); static grpc_set_initial_connect_string_func g_set_initial_connect_string_func = grpc_set_default_initial_connect_string; @@ -48,6 +48,6 @@ void grpc_test_set_initial_connect_string_function( } void grpc_set_initial_connect_string(struct sockaddr **addr, size_t *addr_len, - gpr_slice *initial_str) { + grpc_slice *initial_str) { g_set_initial_connect_string_func(addr, addr_len, initial_str); } diff --git a/src/core/ext/client_channel/initial_connect_string.h b/src/core/ext/client_channel/initial_connect_string.h index 39f6465fc9..4cfe8b5fe7 100644 --- a/src/core/ext/client_channel/initial_connect_string.h +++ b/src/core/ext/client_channel/initial_connect_string.h @@ -39,12 +39,12 @@ typedef void (*grpc_set_initial_connect_string_func)(struct sockaddr **addr, size_t *addr_len, - gpr_slice *initial_str); + grpc_slice *initial_str); void grpc_test_set_initial_connect_string_function( grpc_set_initial_connect_string_func func); /** Set a string to be sent once connected. Optionally reset addr. */ void grpc_set_initial_connect_string(struct sockaddr **addr, size_t *addr_len, - gpr_slice *connect_string); + grpc_slice *connect_string); #endif /* GRPC_CORE_EXT_CLIENT_CHANNEL_INITIAL_CONNECT_STRING_H */ diff --git a/src/core/ext/client_channel/subchannel.c b/src/core/ext/client_channel/subchannel.c index 672e5c3a91..8d4a457e60 100644 --- a/src/core/ext/client_channel/subchannel.c +++ b/src/core/ext/client_channel/subchannel.c @@ -101,7 +101,7 @@ struct grpc_subchannel { grpc_subchannel_key *key; /** initial string to send to peer */ - gpr_slice initial_connect_string; + grpc_slice initial_connect_string; /** set during connection */ grpc_connect_out_args connecting_result; @@ -206,7 +206,7 @@ static void subchannel_destroy(grpc_exec_ctx *exec_ctx, void *arg, gpr_free((void *)c->filters); grpc_channel_args_destroy(c->args); gpr_free(c->addr); - gpr_slice_unref(c->initial_connect_string); + grpc_slice_unref(c->initial_connect_string); grpc_connectivity_state_destroy(exec_ctx, &c->state_tracker); grpc_connector_unref(exec_ctx, c->connector); grpc_pollset_set_destroy(c->pollset_set); diff --git a/src/core/ext/client_channel/uri_parser.c b/src/core/ext/client_channel/uri_parser.c index bcb6a1dee4..7bdc5373d9 100644 --- a/src/core/ext/client_channel/uri_parser.c +++ b/src/core/ext/client_channel/uri_parser.c @@ -148,20 +148,20 @@ static void parse_query_parts(grpc_uri *uri) { uri->num_query_parts = 0; return; } - gpr_slice query_slice = - gpr_slice_new(uri->query, strlen(uri->query), do_nothing); - gpr_slice_buffer query_parts; /* the &-separated elements of the query */ - gpr_slice_buffer query_param_parts; /* the =-separated subelements */ + grpc_slice query_slice = + grpc_slice_new(uri->query, strlen(uri->query), do_nothing); + grpc_slice_buffer query_parts; /* the &-separated elements of the query */ + grpc_slice_buffer query_param_parts; /* the =-separated subelements */ - gpr_slice_buffer_init(&query_parts); - gpr_slice_buffer_init(&query_param_parts); + grpc_slice_buffer_init(&query_parts); + grpc_slice_buffer_init(&query_param_parts); - gpr_slice_split(query_slice, QUERY_PARTS_SEPARATOR, &query_parts); + grpc_slice_split(query_slice, QUERY_PARTS_SEPARATOR, &query_parts); uri->query_parts = gpr_malloc(query_parts.count * sizeof(char *)); uri->query_parts_values = gpr_malloc(query_parts.count * sizeof(char *)); uri->num_query_parts = query_parts.count; for (size_t i = 0; i < query_parts.count; i++) { - gpr_slice_split(query_parts.slices[i], QUERY_PARTS_VALUE_SEPARATOR, + grpc_slice_split(query_parts.slices[i], QUERY_PARTS_VALUE_SEPARATOR, &query_param_parts); GPR_ASSERT(query_param_parts.count > 0); uri->query_parts[i] = @@ -175,11 +175,11 @@ static void parse_query_parts(grpc_uri *uri) { } else { uri->query_parts_values[i] = NULL; } - gpr_slice_buffer_reset_and_unref(&query_param_parts); + grpc_slice_buffer_reset_and_unref(&query_param_parts); } - gpr_slice_buffer_destroy(&query_parts); - gpr_slice_buffer_destroy(&query_param_parts); - gpr_slice_unref(query_slice); + grpc_slice_buffer_destroy(&query_parts); + grpc_slice_buffer_destroy(&query_param_parts); + grpc_slice_unref(query_slice); } grpc_uri *grpc_uri_parse(const char *uri_text, int suppress_errors) { diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index 412090158a..3c2b87f2cb 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -952,10 +952,10 @@ static lb_client_data *lb_client_data_create(glb_lb_policy *glb_policy) { grpc_grpclb_request *request = grpc_grpclb_request_create(glb_policy->server_name); - gpr_slice request_payload_slice = grpc_grpclb_request_encode(request); + grpc_slice request_payload_slice = grpc_grpclb_request_encode(request); lb_client->request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); - gpr_slice_unref(request_payload_slice); + grpc_slice_unref(request_payload_slice); grpc_grpclb_request_destroy(request); lb_client->status_details = NULL; @@ -1072,12 +1072,12 @@ static void res_recv_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { * lb_client->response_payload, for a serverlist. */ grpc_byte_buffer_reader bbr; grpc_byte_buffer_reader_init(&bbr, lb_client->response_payload); - gpr_slice response_slice = grpc_byte_buffer_reader_readall(&bbr); + grpc_slice response_slice = grpc_byte_buffer_reader_readall(&bbr); grpc_byte_buffer_destroy(lb_client->response_payload); grpc_grpclb_serverlist *serverlist = grpc_grpclb_response_parse_serverlist(response_slice); if (serverlist != NULL) { - gpr_slice_unref(response_slice); + grpc_slice_unref(response_slice); if (grpc_lb_glb_trace) { gpr_log(GPR_INFO, "Serverlist with %lu servers received", (unsigned long)serverlist->num_servers); @@ -1136,7 +1136,7 @@ static void res_recv_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { GPR_ASSERT(serverlist == NULL); gpr_log(GPR_ERROR, "Invalid LB response received: '%s'", gpr_dump_slice(response_slice, GPR_DUMP_ASCII)); - gpr_slice_unref(response_slice); + grpc_slice_unref(response_slice); /* Disconnect from server returning invalid response. */ op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; diff --git a/src/core/ext/lb_policy/grpclb/load_balancer_api.c b/src/core/ext/lb_policy/grpclb/load_balancer_api.c index a8881004a0..f3860d119d 100644 --- a/src/core/ext/lb_policy/grpclb/load_balancer_api.c +++ b/src/core/ext/lb_policy/grpclb/load_balancer_api.c @@ -90,16 +90,16 @@ grpc_grpclb_request *grpc_grpclb_request_create(const char *lb_service_name) { return req; } -gpr_slice grpc_grpclb_request_encode(const grpc_grpclb_request *request) { +grpc_slice grpc_grpclb_request_encode(const grpc_grpclb_request *request) { size_t encoded_length; pb_ostream_t sizestream; pb_ostream_t outputstream; - gpr_slice slice; + grpc_slice slice; memset(&sizestream, 0, sizeof(pb_ostream_t)); pb_encode(&sizestream, grpc_lb_v1_LoadBalanceRequest_fields, request); encoded_length = sizestream.bytes_written; - slice = gpr_slice_malloc(encoded_length); + slice = grpc_slice_malloc(encoded_length); outputstream = pb_ostream_from_buffer(GPR_SLICE_START_PTR(slice), encoded_length); GPR_ASSERT(pb_encode(&outputstream, grpc_lb_v1_LoadBalanceRequest_fields, @@ -113,7 +113,7 @@ void grpc_grpclb_request_destroy(grpc_grpclb_request *request) { typedef grpc_lb_v1_LoadBalanceResponse grpc_grpclb_response; grpc_grpclb_initial_response *grpc_grpclb_initial_response_parse( - gpr_slice encoded_grpc_grpclb_response) { + grpc_slice encoded_grpc_grpclb_response) { pb_istream_t stream = pb_istream_from_buffer(GPR_SLICE_START_PTR(encoded_grpc_grpclb_response), GPR_SLICE_LENGTH(encoded_grpc_grpclb_response)); @@ -132,7 +132,7 @@ grpc_grpclb_initial_response *grpc_grpclb_initial_response_parse( } grpc_grpclb_serverlist *grpc_grpclb_response_parse_serverlist( - gpr_slice encoded_grpc_grpclb_response) { + grpc_slice encoded_grpc_grpclb_response) { bool status; decode_serverlist_arg arg; pb_istream_t stream = diff --git a/src/core/ext/lb_policy/grpclb/load_balancer_api.h b/src/core/ext/lb_policy/grpclb/load_balancer_api.h index 079a64a3f3..235ccf6cb4 100644 --- a/src/core/ext/lb_policy/grpclb/load_balancer_api.h +++ b/src/core/ext/lb_policy/grpclb/load_balancer_api.h @@ -60,7 +60,7 @@ typedef struct grpc_grpclb_serverlist { grpc_grpclb_request *grpc_grpclb_request_create(const char *lb_service_name); /** Protocol Buffers v3-encode \a request */ -gpr_slice grpc_grpclb_request_encode(const grpc_grpclb_request *request); +grpc_slice grpc_grpclb_request_encode(const grpc_grpclb_request *request); /** Destroy \a request */ void grpc_grpclb_request_destroy(grpc_grpclb_request *request); @@ -68,11 +68,11 @@ void grpc_grpclb_request_destroy(grpc_grpclb_request *request); /** Parse (ie, decode) the bytes in \a encoded_grpc_grpclb_response as a \a * grpc_grpclb_initial_response */ grpc_grpclb_initial_response *grpc_grpclb_initial_response_parse( - gpr_slice encoded_grpc_grpclb_response); + grpc_slice encoded_grpc_grpclb_response); /** Parse the list of servers from an encoded \a grpc_grpclb_response */ grpc_grpclb_serverlist *grpc_grpclb_response_parse_serverlist( - gpr_slice encoded_grpc_grpclb_response); + grpc_slice encoded_grpc_grpclb_response); /** Return a copy of \a sl. The caller is responsible for calling \a * grpc_grpclb_destroy_serverlist on the returned copy. */ diff --git a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c index 9924fc6fec..cd0c45e407 100644 --- a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c +++ b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c @@ -169,11 +169,11 @@ static grpc_resolver *sockaddr_create(grpc_resolver_args *args, return NULL; } /* Construct addresses. */ - gpr_slice path_slice = - gpr_slice_new(args->uri->path, strlen(args->uri->path), do_nothing); - gpr_slice_buffer path_parts; - gpr_slice_buffer_init(&path_parts); - gpr_slice_split(path_slice, ",", &path_parts); + grpc_slice path_slice = + grpc_slice_new(args->uri->path, strlen(args->uri->path), do_nothing); + grpc_slice_buffer path_parts; + grpc_slice_buffer_init(&path_parts); + grpc_slice_split(path_slice, ",", &path_parts); grpc_lb_addresses *addresses = grpc_lb_addresses_create(path_parts.count); bool errors_found = false; for (size_t i = 0; i < addresses->num_addresses; i++) { @@ -189,8 +189,8 @@ static grpc_resolver *sockaddr_create(grpc_resolver_args *args, gpr_free(part_str); if (errors_found) break; } - gpr_slice_buffer_destroy(&path_parts); - gpr_slice_unref(path_slice); + grpc_slice_buffer_destroy(&path_parts); + grpc_slice_unref(path_slice); if (errors_found) { grpc_lb_addresses_destroy(addresses, NULL /* user_data_destroy */); return NULL; diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index 41432b54a9..eee38a0b90 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -60,7 +60,7 @@ typedef struct { grpc_connect_in_args args; grpc_connect_out_args *result; grpc_closure initial_string_sent; - gpr_slice_buffer initial_string_buffer; + grpc_slice_buffer initial_string_buffer; grpc_endpoint *tcp; @@ -90,7 +90,7 @@ static void on_initial_connect_string_sent(grpc_exec_ctx *exec_ctx, void *arg, static void on_handshake_done(grpc_exec_ctx *exec_ctx, grpc_endpoint *endpoint, grpc_channel_args *args, - gpr_slice_buffer *read_buffer, void *user_data, + grpc_slice_buffer *read_buffer, void *user_data, grpc_error *error) { connector *c = user_data; if (error != GRPC_ERROR_NONE) { @@ -116,8 +116,8 @@ static void connected(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { if (!GPR_SLICE_IS_EMPTY(c->args.initial_connect_string)) { grpc_closure_init(&c->initial_string_sent, on_initial_connect_string_sent, c); - gpr_slice_buffer_init(&c->initial_string_buffer); - gpr_slice_buffer_add(&c->initial_string_buffer, + grpc_slice_buffer_init(&c->initial_string_buffer); + grpc_slice_buffer_add(&c->initial_string_buffer, c->args.initial_connect_string); connector_ref(arg); grpc_endpoint_write(exec_ctx, tcp, &c->initial_string_buffer, diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index 2e6b3f2fc8..d396a1bc36 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -64,7 +64,7 @@ typedef struct { grpc_connect_in_args args; grpc_connect_out_args *result; grpc_closure initial_string_sent; - gpr_slice_buffer initial_string_buffer; + grpc_slice_buffer initial_string_buffer; gpr_mu mu; grpc_endpoint *connecting_endpoint; @@ -127,7 +127,7 @@ static void on_secure_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, static void on_handshake_done(grpc_exec_ctx *exec_ctx, grpc_endpoint *endpoint, grpc_channel_args *args, - gpr_slice_buffer *read_buffer, void *user_data, + grpc_slice_buffer *read_buffer, void *user_data, grpc_error *error) { connector *c = user_data; c->tmp_args = args; @@ -165,8 +165,8 @@ static void connected(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { if (!GPR_SLICE_IS_EMPTY(c->args.initial_connect_string)) { grpc_closure_init(&c->initial_string_sent, on_initial_connect_string_sent, c); - gpr_slice_buffer_init(&c->initial_string_buffer); - gpr_slice_buffer_add(&c->initial_string_buffer, + grpc_slice_buffer_init(&c->initial_string_buffer); + grpc_slice_buffer_add(&c->initial_string_buffer, c->args.initial_connect_string); grpc_endpoint_write(exec_ctx, tcp, &c->initial_string_buffer, &c->initial_string_sent); diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c index 2c64878c0c..e5b4025c5f 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c @@ -56,7 +56,7 @@ typedef struct server_connect_state { static void on_handshake_done(grpc_exec_ctx *exec_ctx, grpc_endpoint *endpoint, grpc_channel_args *args, - gpr_slice_buffer *read_buffer, void *user_data, + grpc_slice_buffer *read_buffer, void *user_data, grpc_error *error) { server_connect_state *state = user_data; if (error != GRPC_ERROR_NONE) { diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index 88afcb6dea..a998dddd37 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -117,7 +117,7 @@ static void on_secure_handshake_done(grpc_exec_ctx *exec_ctx, void *statep, static void on_handshake_done(grpc_exec_ctx *exec_ctx, grpc_endpoint *endpoint, grpc_channel_args *args, - gpr_slice_buffer *read_buffer, void *user_data, + grpc_slice_buffer *read_buffer, void *user_data, grpc_error *error) { server_secure_connect *connection_state = user_data; if (error != GRPC_ERROR_NONE) { diff --git a/src/core/ext/transport/chttp2/transport/bin_decoder.c b/src/core/ext/transport/chttp2/transport/bin_decoder.c index 2d90b01cd8..d8948bdfdb 100644 --- a/src/core/ext/transport/chttp2/transport/bin_decoder.c +++ b/src/core/ext/transport/chttp2/transport/bin_decoder.c @@ -142,11 +142,11 @@ bool grpc_base64_decode_partial(struct grpc_base64_decode_context *ctx) { return true; } -gpr_slice grpc_chttp2_base64_decode(gpr_slice input) { +grpc_slice grpc_chttp2_base64_decode(grpc_slice input) { size_t input_length = GPR_SLICE_LENGTH(input); size_t output_length = input_length / 4 * 3; struct grpc_base64_decode_context ctx; - gpr_slice output; + grpc_slice output; if (input_length % 4 != 0) { gpr_log(GPR_ERROR, @@ -166,7 +166,7 @@ gpr_slice grpc_chttp2_base64_decode(gpr_slice input) { } } } - output = gpr_slice_malloc(output_length); + output = grpc_slice_malloc(output_length); ctx.input_cur = GPR_SLICE_START_PTR(input); ctx.input_end = GPR_SLICE_END_PTR(input); @@ -178,7 +178,7 @@ gpr_slice grpc_chttp2_base64_decode(gpr_slice input) { char *s = gpr_dump_slice(input, GPR_DUMP_ASCII); gpr_log(GPR_ERROR, "Base64 decoding failed, input string:\n%s\n", s); gpr_free(s); - gpr_slice_unref(output); + grpc_slice_unref(output); return gpr_empty_slice(); } GPR_ASSERT(ctx.output_cur == GPR_SLICE_END_PTR(output)); @@ -186,10 +186,10 @@ gpr_slice grpc_chttp2_base64_decode(gpr_slice input) { return output; } -gpr_slice grpc_chttp2_base64_decode_with_length(gpr_slice input, +grpc_slice grpc_chttp2_base64_decode_with_length(grpc_slice input, size_t output_length) { size_t input_length = GPR_SLICE_LENGTH(input); - gpr_slice output = gpr_slice_malloc(output_length); + grpc_slice output = grpc_slice_malloc(output_length); struct grpc_base64_decode_context ctx; // The length of a base64 string cannot be 4 * n + 1 @@ -199,7 +199,7 @@ gpr_slice grpc_chttp2_base64_decode_with_length(gpr_slice input, "grpc_chttp2_base64_decode_with_length has a length of %d, which " "has a tail of 1 byte.\n", (int)input_length); - gpr_slice_unref(output); + grpc_slice_unref(output); return gpr_empty_slice(); } @@ -209,7 +209,7 @@ gpr_slice grpc_chttp2_base64_decode_with_length(gpr_slice input, "than the max possible output length %d.\n", (int)output_length, (int)(input_length / 4 * 3 + tail_xtra[input_length % 4])); - gpr_slice_unref(output); + grpc_slice_unref(output); return gpr_empty_slice(); } @@ -223,7 +223,7 @@ gpr_slice grpc_chttp2_base64_decode_with_length(gpr_slice input, char *s = gpr_dump_slice(input, GPR_DUMP_ASCII); gpr_log(GPR_ERROR, "Base64 decoding failed, input string:\n%s\n", s); gpr_free(s); - gpr_slice_unref(output); + grpc_slice_unref(output); return gpr_empty_slice(); } GPR_ASSERT(ctx.output_cur == GPR_SLICE_END_PTR(output)); diff --git a/src/core/ext/transport/chttp2/transport/bin_decoder.h b/src/core/ext/transport/chttp2/transport/bin_decoder.h index b9d40c9b74..c416608a0b 100644 --- a/src/core/ext/transport/chttp2/transport/bin_decoder.h +++ b/src/core/ext/transport/chttp2/transport/bin_decoder.h @@ -55,12 +55,12 @@ bool grpc_base64_decode_partial(struct grpc_base64_decode_context *ctx); /* base64 decode a slice with pad chars. Returns a new slice, does not take ownership of the input. Returns an empty slice if decoding is failed. */ -gpr_slice grpc_chttp2_base64_decode(gpr_slice input); +grpc_slice grpc_chttp2_base64_decode(grpc_slice input); /* base64 decode a slice without pad chars, data length is needed. Returns a new slice, does not take ownership of the input. Returns an empty slice if decoding is failed. */ -gpr_slice grpc_chttp2_base64_decode_with_length(gpr_slice input, +grpc_slice grpc_chttp2_base64_decode_with_length(grpc_slice input, size_t output_length); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_DECODER_H */ diff --git a/src/core/ext/transport/chttp2/transport/bin_encoder.c b/src/core/ext/transport/chttp2/transport/bin_encoder.c index 1b43c28be1..09b961533a 100644 --- a/src/core/ext/transport/chttp2/transport/bin_encoder.c +++ b/src/core/ext/transport/chttp2/transport/bin_encoder.c @@ -61,12 +61,12 @@ static const b64_huff_sym huff_alphabet[64] = { static const uint8_t tail_xtra[3] = {0, 2, 3}; -gpr_slice grpc_chttp2_base64_encode(gpr_slice input) { +grpc_slice grpc_chttp2_base64_encode(grpc_slice input) { size_t input_length = GPR_SLICE_LENGTH(input); size_t input_triplets = input_length / 3; size_t tail_case = input_length % 3; size_t output_length = input_triplets * 4 + tail_xtra[tail_case]; - gpr_slice output = gpr_slice_malloc(output_length); + grpc_slice output = grpc_slice_malloc(output_length); uint8_t *in = GPR_SLICE_START_PTR(input); char *out = (char *)GPR_SLICE_START_PTR(output); size_t i; @@ -105,11 +105,11 @@ gpr_slice grpc_chttp2_base64_encode(gpr_slice input) { return output; } -gpr_slice grpc_chttp2_huffman_compress(gpr_slice input) { +grpc_slice grpc_chttp2_huffman_compress(grpc_slice input) { size_t nbits; uint8_t *in; uint8_t *out; - gpr_slice output; + grpc_slice output; uint32_t temp = 0; uint32_t temp_length = 0; @@ -118,7 +118,7 @@ gpr_slice grpc_chttp2_huffman_compress(gpr_slice input) { nbits += grpc_chttp2_huffsyms[*in].length; } - output = gpr_slice_malloc(nbits / 8 + (nbits % 8 != 0)); + output = grpc_slice_malloc(nbits / 8 + (nbits % 8 != 0)); out = GPR_SLICE_START_PTR(output); for (in = GPR_SLICE_START_PTR(input); in != GPR_SLICE_END_PTR(input); ++in) { int sym = *in; @@ -175,14 +175,14 @@ static void enc_add1(huff_out *out, uint8_t a) { enc_flush_some(out); } -gpr_slice grpc_chttp2_base64_encode_and_huffman_compress_impl(gpr_slice input) { +grpc_slice grpc_chttp2_base64_encode_and_huffman_compress_impl(grpc_slice input) { size_t input_length = GPR_SLICE_LENGTH(input); size_t input_triplets = input_length / 3; size_t tail_case = input_length % 3; size_t output_syms = input_triplets * 4 + tail_xtra[tail_case]; size_t max_output_bits = 11 * output_syms; size_t max_output_length = max_output_bits / 8 + (max_output_bits % 8 != 0); - gpr_slice output = gpr_slice_malloc(max_output_length); + grpc_slice output = grpc_slice_malloc(max_output_length); uint8_t *in = GPR_SLICE_START_PTR(input); uint8_t *start_out = GPR_SLICE_START_PTR(output); huff_out out; diff --git a/src/core/ext/transport/chttp2/transport/bin_encoder.h b/src/core/ext/transport/chttp2/transport/bin_encoder.h index 61ebbafa9a..878390cde6 100644 --- a/src/core/ext/transport/chttp2/transport/bin_encoder.h +++ b/src/core/ext/transport/chttp2/transport/bin_encoder.h @@ -38,17 +38,17 @@ /* base64 encode a slice. Returns a new slice, does not take ownership of the input */ -gpr_slice grpc_chttp2_base64_encode(gpr_slice input); +grpc_slice grpc_chttp2_base64_encode(grpc_slice input); /* Compress a slice with the static huffman encoder detailed in the hpack standard. Returns a new slice, does not take ownership of the input */ -gpr_slice grpc_chttp2_huffman_compress(gpr_slice input); +grpc_slice grpc_chttp2_huffman_compress(grpc_slice input); /* equivalent to: - gpr_slice x = grpc_chttp2_base64_encode(input); - gpr_slice y = grpc_chttp2_huffman_compress(x); - gpr_slice_unref(x); + grpc_slice x = grpc_chttp2_base64_encode(input); + grpc_slice y = grpc_chttp2_huffman_compress(x); + grpc_slice_unref(x); return y; */ -gpr_slice grpc_chttp2_base64_encode_and_huffman_compress_impl(gpr_slice input); +grpc_slice grpc_chttp2_base64_encode_and_huffman_compress_impl(grpc_slice input); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_ENCODER_H */ diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 562f498d88..3a551d449b 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -143,12 +143,12 @@ static void destruct_transport(grpc_exec_ctx *exec_ctx, grpc_endpoint_destroy(exec_ctx, t->ep); - gpr_slice_buffer_destroy(&t->qbuf); + grpc_slice_buffer_destroy(&t->qbuf); - gpr_slice_buffer_destroy(&t->outbuf); + grpc_slice_buffer_destroy(&t->outbuf); grpc_chttp2_hpack_compressor_destroy(&t->hpack_compressor); - gpr_slice_buffer_destroy(&t->read_buffer); + grpc_slice_buffer_destroy(&t->read_buffer); grpc_chttp2_hpack_parser_destroy(&t->hpack_parser); grpc_chttp2_goaway_parser_destroy(&t->goaway_parser); @@ -243,9 +243,9 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, &t->channel_callback.state_tracker, GRPC_CHANNEL_READY, is_client ? "client_transport" : "server_transport"); - gpr_slice_buffer_init(&t->qbuf); + grpc_slice_buffer_init(&t->qbuf); - gpr_slice_buffer_init(&t->outbuf); + grpc_slice_buffer_init(&t->outbuf); grpc_chttp2_hpack_compressor_init(&t->hpack_compressor); grpc_closure_init(&t->write_action_begin_locked, write_action_begin_locked, @@ -264,7 +264,7 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_goaway_parser_init(&t->goaway_parser); grpc_chttp2_hpack_parser_init(&t->hpack_parser); - gpr_slice_buffer_init(&t->read_buffer); + grpc_slice_buffer_init(&t->read_buffer); /* 8 is a random stab in the dark as to a good initial size: it's small enough that it shouldn't waste memory for infrequently used connections, yet @@ -286,7 +286,7 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, t->sent_local_settings = 0; if (is_client) { - gpr_slice_buffer_add(&t->outbuf, gpr_slice_from_copied_string( + grpc_slice_buffer_add(&t->outbuf, grpc_slice_from_copied_string( GRPC_CHTTP2_CLIENT_CONNECT_STRING)); grpc_chttp2_initiate_write(exec_ctx, t, false, "initial_write"); } @@ -471,7 +471,7 @@ static int init_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, grpc_chttp2_incoming_metadata_buffer_init(&s->metadata_buffer[0]); grpc_chttp2_incoming_metadata_buffer_init(&s->metadata_buffer[1]); grpc_chttp2_data_parser_init(&s->data_parser); - gpr_slice_buffer_init(&s->flow_controlled_buffer); + grpc_slice_buffer_init(&s->flow_controlled_buffer); s->deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC); grpc_closure_init(&s->complete_fetch, complete_fetch, s); grpc_closure_init(&s->complete_fetch_locked, complete_fetch_locked, s); @@ -531,7 +531,7 @@ static void destroy_stream_locked(grpc_exec_ctx *exec_ctx, void *sp, grpc_chttp2_data_parser_destroy(exec_ctx, &s->data_parser); grpc_chttp2_incoming_metadata_buffer_destroy(&s->metadata_buffer[0]); grpc_chttp2_incoming_metadata_buffer_destroy(&s->metadata_buffer[1]); - gpr_slice_buffer_destroy(&s->flow_controlled_buffer); + grpc_slice_buffer_destroy(&s->flow_controlled_buffer); GRPC_ERROR_UNREF(s->read_closed_error); GRPC_ERROR_UNREF(s->write_closed_error); @@ -756,11 +756,11 @@ static void push_setting(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, void grpc_chttp2_add_incoming_goaway(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, uint32_t goaway_error, - gpr_slice goaway_text) { + grpc_slice goaway_text) { char *msg = gpr_dump_slice(goaway_text, GPR_DUMP_HEX | GPR_DUMP_ASCII); GRPC_CHTTP2_IF_TRACING( gpr_log(GPR_DEBUG, "got goaway [%d]: %s", goaway_error, msg)); - gpr_slice_unref(goaway_text); + grpc_slice_unref(goaway_text); t->seen_goaway = 1; /* lie: use transient failure from the transport to indicate goaway has been * received */ @@ -924,7 +924,7 @@ static void add_fetched_slice_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_stream *s) { s->fetched_send_message_length += (uint32_t)GPR_SLICE_LENGTH(s->fetching_slice); - gpr_slice_buffer_add(&s->flow_controlled_buffer, s->fetching_slice); + grpc_slice_buffer_add(&s->flow_controlled_buffer, s->fetching_slice); if (s->id != 0) { grpc_chttp2_become_writable(exec_ctx, t, s, true, "op.send_message"); } @@ -1052,7 +1052,7 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, void *stream_op, } else { GPR_ASSERT(s->fetching_send_message == NULL); uint8_t *frame_hdr = - gpr_slice_buffer_tiny_add(&s->flow_controlled_buffer, 5); + grpc_slice_buffer_tiny_add(&s->flow_controlled_buffer, 5); uint32_t flags = op->send_message->flags; frame_hdr[0] = (flags & GRPC_WRITE_INTERNAL_COMPRESS) != 0; size_t len = op->send_message->length; @@ -1192,7 +1192,7 @@ static void send_ping_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, p->id[7] = (uint8_t)(t->ping_counter & 0xff); t->ping_counter++; p->on_recv = on_recv; - gpr_slice_buffer_add(&t->qbuf, grpc_chttp2_ping_create(0, p->id)); + grpc_slice_buffer_add(&t->qbuf, grpc_chttp2_ping_create(0, p->id)); grpc_chttp2_initiate_write(exec_ctx, t, true, "send_ping"); } @@ -1216,7 +1216,7 @@ void grpc_chttp2_ack_ping(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, } static void send_goaway(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, - grpc_chttp2_error_code error, gpr_slice data) { + grpc_chttp2_error_code error, grpc_slice data) { t->sent_goaway_state = GRPC_CHTTP2_GOAWAY_SEND_SCHEDULED; grpc_chttp2_goaway_append(t->last_new_stream_id, (uint32_t)error, data, &t->qbuf); @@ -1239,7 +1239,7 @@ static void perform_transport_op_locked(grpc_exec_ctx *exec_ctx, if (op->send_goaway) { send_goaway(exec_ctx, t, grpc_chttp2_grpc_status_to_http2_error(op->goaway_status), - gpr_slice_ref(*op->goaway_message)); + grpc_slice_ref(*op->goaway_message)); } if (op->set_accept_stream) { @@ -1428,7 +1428,7 @@ void grpc_chttp2_cancel_stream(grpc_exec_ctx *exec_ctx, &grpc_status); if (s->id != 0) { - gpr_slice_buffer_add( + grpc_slice_buffer_add( &t->qbuf, grpc_chttp2_rst_stream_create(s->id, (uint32_t)http_error, &s->stats.outgoing)); grpc_chttp2_initiate_write(exec_ctx, t, false, "rst_stream"); @@ -1441,7 +1441,7 @@ void grpc_chttp2_cancel_stream(grpc_exec_ctx *exec_ctx, free_msg = true; msg = grpc_error_string(due_to_error); } - gpr_slice msg_slice = gpr_slice_from_copied_string(msg); + grpc_slice msg_slice = grpc_slice_from_copied_string(msg); grpc_chttp2_fake_status(exec_ctx, t, s, grpc_status, &msg_slice); if (free_msg) grpc_error_free_string(msg); } @@ -1454,7 +1454,7 @@ void grpc_chttp2_cancel_stream(grpc_exec_ctx *exec_ctx, void grpc_chttp2_fake_status(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_status_code status, - gpr_slice *slice) { + grpc_slice *slice) { if (status != GRPC_STATUS_OK) { s->seen_error = true; } @@ -1477,13 +1477,13 @@ void grpc_chttp2_fake_status(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, &s->metadata_buffer[1], grpc_mdelem_from_metadata_strings( GRPC_MDSTR_GRPC_MESSAGE, - grpc_mdstr_from_slice(gpr_slice_ref(*slice)))); + grpc_mdstr_from_slice(grpc_slice_ref(*slice)))); } s->published_metadata[1] = GRPC_METADATA_SYNTHESIZED_FROM_FAKE; grpc_chttp2_maybe_complete_recv_trailing_metadata(exec_ctx, t, s); } if (slice) { - gpr_slice_unref(*slice); + grpc_slice_unref(*slice); } } @@ -1580,9 +1580,9 @@ void grpc_chttp2_mark_stream_closed(grpc_exec_ctx *exec_ctx, static void close_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_error *error) { - gpr_slice hdr; - gpr_slice status_hdr; - gpr_slice message_pfx; + grpc_slice hdr; + grpc_slice status_hdr; + grpc_slice message_pfx; uint8_t *p; uint32_t len = 0; grpc_status_code grpc_status; @@ -1601,7 +1601,7 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, time we got around to sending this, so instead we ignore HPACK compression and just write the uncompressed bytes onto the wire. */ - status_hdr = gpr_slice_malloc(15 + (grpc_status >= 10)); + status_hdr = grpc_slice_malloc(15 + (grpc_status >= 10)); p = GPR_SLICE_START_PTR(status_hdr); *p++ = 0x40; /* literal header */ *p++ = 11; /* len(grpc-status) */ @@ -1633,7 +1633,7 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, if (optional_message != NULL) { size_t msg_len = strlen(optional_message); GPR_ASSERT(msg_len < 127); - message_pfx = gpr_slice_malloc(15); + message_pfx = grpc_slice_malloc(15); p = GPR_SLICE_START_PTR(message_pfx); *p++ = 0x40; *p++ = 12; /* len(grpc-message) */ @@ -1655,7 +1655,7 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, len += (uint32_t)msg_len; } - hdr = gpr_slice_malloc(9); + hdr = grpc_slice_malloc(9); p = GPR_SLICE_START_PTR(hdr); *p++ = (uint8_t)(len >> 16); *p++ = (uint8_t)(len >> 8); @@ -1668,14 +1668,14 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, *p++ = (uint8_t)(s->id); GPR_ASSERT(p == GPR_SLICE_END_PTR(hdr)); - gpr_slice_buffer_add(&t->qbuf, hdr); - gpr_slice_buffer_add(&t->qbuf, status_hdr); + grpc_slice_buffer_add(&t->qbuf, hdr); + grpc_slice_buffer_add(&t->qbuf, status_hdr); if (optional_message) { - gpr_slice_buffer_add(&t->qbuf, message_pfx); - gpr_slice_buffer_add(&t->qbuf, - gpr_slice_from_copied_string(optional_message)); + grpc_slice_buffer_add(&t->qbuf, message_pfx); + grpc_slice_buffer_add(&t->qbuf, + grpc_slice_from_copied_string(optional_message)); } - gpr_slice_buffer_add( + grpc_slice_buffer_add( &t->qbuf, grpc_chttp2_rst_stream_create(s->id, GRPC_CHTTP2_NO_ERROR, &s->stats.outgoing)); } @@ -1686,7 +1686,7 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, free_msg = true; msg = grpc_error_string(error); } - gpr_slice msg_slice = gpr_slice_from_copied_string(msg); + grpc_slice msg_slice = grpc_slice_from_copied_string(msg); grpc_chttp2_fake_status(exec_ctx, t, s, grpc_status, &msg_slice); if (free_msg) grpc_error_free_string(msg); @@ -1857,7 +1857,7 @@ static void read_action_locked(grpc_exec_ctx *exec_ctx, void *tp, keep_reading = true; GRPC_CHTTP2_REF_TRANSPORT(t, "keep_reading"); } - gpr_slice_buffer_reset_and_unref(&t->read_buffer); + grpc_slice_buffer_reset_and_unref(&t->read_buffer); if (keep_reading) { grpc_endpoint_read(exec_ctx, t->ep, &t->read_buffer, &t->read_action_begin); @@ -1911,7 +1911,7 @@ static void incoming_byte_stream_unref(grpc_exec_ctx *exec_ctx, grpc_chttp2_incoming_byte_stream *bs) { if (gpr_unref(&bs->refs)) { GRPC_ERROR_UNREF(bs->error); - gpr_slice_buffer_destroy(&bs->slices); + grpc_slice_buffer_destroy(&bs->slices); gpr_mu_destroy(&bs->slice_mu); gpr_free(bs); } @@ -1973,7 +1973,7 @@ static void incoming_byte_stream_next_locked(grpc_exec_ctx *exec_ctx, } gpr_mu_lock(&bs->slice_mu); if (bs->slices.count > 0) { - *bs->next_action.slice = gpr_slice_buffer_take_first(&bs->slices); + *bs->next_action.slice = grpc_slice_buffer_take_first(&bs->slices); grpc_closure_run(exec_ctx, bs->next_action.on_complete, GRPC_ERROR_NONE); } else if (bs->error != GRPC_ERROR_NONE) { grpc_closure_run(exec_ctx, bs->next_action.on_complete, @@ -1988,7 +1988,7 @@ static void incoming_byte_stream_next_locked(grpc_exec_ctx *exec_ctx, static int incoming_byte_stream_next(grpc_exec_ctx *exec_ctx, grpc_byte_stream *byte_stream, - gpr_slice *slice, size_t max_size_hint, + grpc_slice *slice, size_t max_size_hint, grpc_closure *on_complete) { GPR_TIMER_BEGIN("incoming_byte_stream_next", 0); grpc_chttp2_incoming_byte_stream *bs = @@ -2041,7 +2041,7 @@ static void incoming_byte_stream_publish_error( void grpc_chttp2_incoming_byte_stream_push(grpc_exec_ctx *exec_ctx, grpc_chttp2_incoming_byte_stream *bs, - gpr_slice slice) { + grpc_slice slice) { gpr_mu_lock(&bs->slice_mu); if (bs->remaining_bytes < GPR_SLICE_LENGTH(slice)) { incoming_byte_stream_publish_error( @@ -2053,7 +2053,7 @@ void grpc_chttp2_incoming_byte_stream_push(grpc_exec_ctx *exec_ctx, grpc_exec_ctx_sched(exec_ctx, bs->on_next, GRPC_ERROR_NONE, NULL); bs->on_next = NULL; } else { - gpr_slice_buffer_add(&bs->slices, slice); + grpc_slice_buffer_add(&bs->slices, slice); } } gpr_mu_unlock(&bs->slice_mu); @@ -2091,7 +2091,7 @@ grpc_chttp2_incoming_byte_stream *grpc_chttp2_incoming_byte_stream_create( incoming_byte_stream->transport = t; incoming_byte_stream->stream = s; gpr_ref(&incoming_byte_stream->stream->active_streams); - gpr_slice_buffer_init(&incoming_byte_stream->slices); + grpc_slice_buffer_init(&incoming_byte_stream->slices); incoming_byte_stream->on_next = NULL; incoming_byte_stream->is_tail = 1; incoming_byte_stream->error = GRPC_ERROR_NONE; @@ -2159,7 +2159,7 @@ static void benign_reclaimer_locked(grpc_exec_ctx *exec_ctx, void *arg, t->peer_string); } send_goaway(exec_ctx, t, GRPC_CHTTP2_ENHANCE_YOUR_CALM, - gpr_slice_from_static_string("Buffers full")); + grpc_slice_from_static_string("Buffers full")); } else if (error == GRPC_ERROR_NONE && grpc_resource_quota_trace) { gpr_log(GPR_DEBUG, "HTTP2: %s - skip benign reclamation, there are still %" PRIdPTR @@ -2310,12 +2310,12 @@ grpc_transport *grpc_create_chttp2_transport( void grpc_chttp2_transport_start_reading(grpc_exec_ctx *exec_ctx, grpc_transport *transport, - gpr_slice_buffer *read_buffer) { + grpc_slice_buffer *read_buffer) { grpc_chttp2_transport *t = (grpc_chttp2_transport *)transport; GRPC_CHTTP2_REF_TRANSPORT( t, "reading_action"); /* matches unref inside reading_action */ if (read_buffer != NULL) { - gpr_slice_buffer_move_into(read_buffer, &t->read_buffer); + grpc_slice_buffer_move_into(read_buffer, &t->read_buffer); gpr_free(read_buffer); } read_action_begin(exec_ctx, t, GRPC_ERROR_NONE); diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.h b/src/core/ext/transport/chttp2/transport/chttp2_transport.h index 4e2d0954bf..c372174f2d 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.h +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.h @@ -48,6 +48,6 @@ grpc_transport *grpc_create_chttp2_transport( /// leftover bytes previously read from the endpoint (e.g., by handshakers). void grpc_chttp2_transport_start_reading(grpc_exec_ctx *exec_ctx, grpc_transport *transport, - gpr_slice_buffer *read_buffer); + grpc_slice_buffer *read_buffer); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_CHTTP2_TRANSPORT_H */ diff --git a/src/core/ext/transport/chttp2/transport/frame_data.c b/src/core/ext/transport/chttp2/transport/frame_data.c index 8668816930..3081a03929 100644 --- a/src/core/ext/transport/chttp2/transport/frame_data.c +++ b/src/core/ext/transport/chttp2/transport/frame_data.c @@ -112,15 +112,15 @@ grpc_byte_stream *grpc_chttp2_incoming_frame_queue_pop( return out; } -void grpc_chttp2_encode_data(uint32_t id, gpr_slice_buffer *inbuf, +void grpc_chttp2_encode_data(uint32_t id, grpc_slice_buffer *inbuf, uint32_t write_bytes, int is_eof, grpc_transport_one_way_stats *stats, - gpr_slice_buffer *outbuf) { - gpr_slice hdr; + grpc_slice_buffer *outbuf) { + grpc_slice hdr; uint8_t *p; static const size_t header_size = 9; - hdr = gpr_slice_malloc(header_size); + hdr = grpc_slice_malloc(header_size); p = GPR_SLICE_START_PTR(hdr); GPR_ASSERT(write_bytes < (1 << 24)); *p++ = (uint8_t)(write_bytes >> 16); @@ -132,9 +132,9 @@ void grpc_chttp2_encode_data(uint32_t id, gpr_slice_buffer *inbuf, *p++ = (uint8_t)(id >> 16); *p++ = (uint8_t)(id >> 8); *p++ = (uint8_t)(id); - gpr_slice_buffer_add(outbuf, hdr); + grpc_slice_buffer_add(outbuf, hdr); - gpr_slice_buffer_move_first(inbuf, write_bytes, outbuf); + grpc_slice_buffer_move_first(inbuf, write_bytes, outbuf); stats->framing_bytes += header_size; stats->data_bytes += write_bytes; @@ -143,7 +143,7 @@ void grpc_chttp2_encode_data(uint32_t id, gpr_slice_buffer *inbuf, static grpc_error *parse_inner(grpc_exec_ctx *exec_ctx, grpc_chttp2_data_parser *p, grpc_chttp2_transport *t, grpc_chttp2_stream *s, - gpr_slice slice) { + grpc_slice slice) { uint8_t *const beg = GPR_SLICE_START_PTR(slice); uint8_t *const end = GPR_SLICE_END_PTR(slice); uint8_t *cur = beg; @@ -236,7 +236,7 @@ static grpc_error *parse_inner(grpc_exec_ctx *exec_ctx, s->stats.incoming.data_bytes += p->frame_size; grpc_chttp2_incoming_byte_stream_push( exec_ctx, p->parsing_frame, - gpr_slice_sub(slice, (size_t)(cur - beg), (size_t)(end - beg))); + grpc_slice_sub(slice, (size_t)(cur - beg), (size_t)(end - beg))); grpc_chttp2_incoming_byte_stream_finished(exec_ctx, p->parsing_frame, GRPC_ERROR_NONE); p->parsing_frame = NULL; @@ -246,7 +246,7 @@ static grpc_error *parse_inner(grpc_exec_ctx *exec_ctx, s->stats.incoming.data_bytes += p->frame_size; grpc_chttp2_incoming_byte_stream_push( exec_ctx, p->parsing_frame, - gpr_slice_sub(slice, (size_t)(cur - beg), + grpc_slice_sub(slice, (size_t)(cur - beg), (size_t)(cur + p->frame_size - beg))); grpc_chttp2_incoming_byte_stream_finished(exec_ctx, p->parsing_frame, GRPC_ERROR_NONE); @@ -257,7 +257,7 @@ static grpc_error *parse_inner(grpc_exec_ctx *exec_ctx, GPR_ASSERT(remaining <= p->frame_size); grpc_chttp2_incoming_byte_stream_push( exec_ctx, p->parsing_frame, - gpr_slice_sub(slice, (size_t)(cur - beg), (size_t)(end - beg))); + grpc_slice_sub(slice, (size_t)(cur - beg), (size_t)(end - beg))); p->frame_size -= remaining; s->stats.incoming.data_bytes += remaining; return GRPC_ERROR_NONE; @@ -270,7 +270,7 @@ static grpc_error *parse_inner(grpc_exec_ctx *exec_ctx, grpc_error *grpc_chttp2_data_parser_parse(grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport *t, grpc_chttp2_stream *s, - gpr_slice slice, int is_last) { + grpc_slice slice, int is_last) { grpc_chttp2_data_parser *p = parser; grpc_error *error = parse_inner(exec_ctx, p, t, s, slice); diff --git a/src/core/ext/transport/chttp2/transport/frame_data.h b/src/core/ext/transport/chttp2/transport/frame_data.h index eb2d97d898..471f615c67 100644 --- a/src/core/ext/transport/chttp2/transport/frame_data.h +++ b/src/core/ext/transport/chttp2/transport/frame_data.h @@ -94,11 +94,11 @@ grpc_error *grpc_chttp2_data_parser_begin_frame(grpc_chttp2_data_parser *parser, grpc_error *grpc_chttp2_data_parser_parse(grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport *t, grpc_chttp2_stream *s, - gpr_slice slice, int is_last); + grpc_slice slice, int is_last); -void grpc_chttp2_encode_data(uint32_t id, gpr_slice_buffer *inbuf, +void grpc_chttp2_encode_data(uint32_t id, grpc_slice_buffer *inbuf, uint32_t write_bytes, int is_eof, grpc_transport_one_way_stats *stats, - gpr_slice_buffer *outbuf); + grpc_slice_buffer *outbuf); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_DATA_H */ diff --git a/src/core/ext/transport/chttp2/transport/frame_goaway.c b/src/core/ext/transport/chttp2/transport/frame_goaway.c index 33d2269169..16c6819aca 100644 --- a/src/core/ext/transport/chttp2/transport/frame_goaway.c +++ b/src/core/ext/transport/chttp2/transport/frame_goaway.c @@ -71,7 +71,7 @@ grpc_error *grpc_chttp2_goaway_parser_parse(grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport *t, grpc_chttp2_stream *s, - gpr_slice slice, int is_last) { + grpc_slice slice, int is_last) { uint8_t *const beg = GPR_SLICE_START_PTR(slice); uint8_t *const end = GPR_SLICE_END_PTR(slice); uint8_t *cur = beg; @@ -151,7 +151,7 @@ grpc_error *grpc_chttp2_goaway_parser_parse(grpc_exec_ctx *exec_ctx, if (is_last) { grpc_chttp2_add_incoming_goaway( exec_ctx, t, (uint32_t)p->error_code, - gpr_slice_new(p->debug_data, p->debug_length, gpr_free)); + grpc_slice_new(p->debug_data, p->debug_length, gpr_free)); p->debug_data = NULL; } return GRPC_ERROR_NONE; @@ -160,9 +160,9 @@ grpc_error *grpc_chttp2_goaway_parser_parse(grpc_exec_ctx *exec_ctx, } void grpc_chttp2_goaway_append(uint32_t last_stream_id, uint32_t error_code, - gpr_slice debug_data, - gpr_slice_buffer *slice_buffer) { - gpr_slice header = gpr_slice_malloc(9 + 4 + 4); + grpc_slice debug_data, + grpc_slice_buffer *slice_buffer) { + grpc_slice header = grpc_slice_malloc(9 + 4 + 4); uint8_t *p = GPR_SLICE_START_PTR(header); uint32_t frame_length; GPR_ASSERT(GPR_SLICE_LENGTH(debug_data) < UINT32_MAX - 4 - 4); @@ -192,6 +192,6 @@ void grpc_chttp2_goaway_append(uint32_t last_stream_id, uint32_t error_code, *p++ = (uint8_t)(error_code >> 8); *p++ = (uint8_t)(error_code); GPR_ASSERT(p == GPR_SLICE_END_PTR(header)); - gpr_slice_buffer_add(slice_buffer, header); - gpr_slice_buffer_add(slice_buffer, debug_data); + grpc_slice_buffer_add(slice_buffer, header); + grpc_slice_buffer_add(slice_buffer, debug_data); } diff --git a/src/core/ext/transport/chttp2/transport/frame_goaway.h b/src/core/ext/transport/chttp2/transport/frame_goaway.h index 355104a5a7..c2b82d85b3 100644 --- a/src/core/ext/transport/chttp2/transport/frame_goaway.h +++ b/src/core/ext/transport/chttp2/transport/frame_goaway.h @@ -69,10 +69,10 @@ grpc_error *grpc_chttp2_goaway_parser_parse(grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport *t, grpc_chttp2_stream *s, - gpr_slice slice, int is_last); + grpc_slice slice, int is_last); void grpc_chttp2_goaway_append(uint32_t last_stream_id, uint32_t error_code, - gpr_slice debug_data, - gpr_slice_buffer *slice_buffer); + grpc_slice debug_data, + grpc_slice_buffer *slice_buffer); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_GOAWAY_H */ diff --git a/src/core/ext/transport/chttp2/transport/frame_ping.c b/src/core/ext/transport/chttp2/transport/frame_ping.c index 624f42649d..f8d73539ae 100644 --- a/src/core/ext/transport/chttp2/transport/frame_ping.c +++ b/src/core/ext/transport/chttp2/transport/frame_ping.c @@ -40,8 +40,8 @@ #include #include -gpr_slice grpc_chttp2_ping_create(uint8_t ack, uint8_t *opaque_8bytes) { - gpr_slice slice = gpr_slice_malloc(9 + 8); +grpc_slice grpc_chttp2_ping_create(uint8_t ack, uint8_t *opaque_8bytes) { + grpc_slice slice = grpc_slice_malloc(9 + 8); uint8_t *p = GPR_SLICE_START_PTR(slice); *p++ = 0; @@ -76,7 +76,7 @@ grpc_error *grpc_chttp2_ping_parser_begin_frame(grpc_chttp2_ping_parser *parser, grpc_error *grpc_chttp2_ping_parser_parse(grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport *t, grpc_chttp2_stream *s, - gpr_slice slice, int is_last) { + grpc_slice slice, int is_last) { uint8_t *const beg = GPR_SLICE_START_PTR(slice); uint8_t *const end = GPR_SLICE_END_PTR(slice); uint8_t *cur = beg; @@ -93,7 +93,7 @@ grpc_error *grpc_chttp2_ping_parser_parse(grpc_exec_ctx *exec_ctx, void *parser, if (p->is_ack) { grpc_chttp2_ack_ping(exec_ctx, t, p->opaque_8bytes); } else { - gpr_slice_buffer_add(&t->qbuf, + grpc_slice_buffer_add(&t->qbuf, grpc_chttp2_ping_create(1, p->opaque_8bytes)); grpc_chttp2_initiate_write(exec_ctx, t, false, "ping response"); } diff --git a/src/core/ext/transport/chttp2/transport/frame_ping.h b/src/core/ext/transport/chttp2/transport/frame_ping.h index 2071f647fb..dcc95db4ca 100644 --- a/src/core/ext/transport/chttp2/transport/frame_ping.h +++ b/src/core/ext/transport/chttp2/transport/frame_ping.h @@ -44,13 +44,13 @@ typedef struct { uint8_t opaque_8bytes[8]; } grpc_chttp2_ping_parser; -gpr_slice grpc_chttp2_ping_create(uint8_t ack, uint8_t *opaque_8bytes); +grpc_slice grpc_chttp2_ping_create(uint8_t ack, uint8_t *opaque_8bytes); grpc_error *grpc_chttp2_ping_parser_begin_frame(grpc_chttp2_ping_parser *parser, uint32_t length, uint8_t flags); grpc_error *grpc_chttp2_ping_parser_parse(grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport *t, grpc_chttp2_stream *s, - gpr_slice slice, int is_last); + grpc_slice slice, int is_last); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_PING_H */ diff --git a/src/core/ext/transport/chttp2/transport/frame_rst_stream.c b/src/core/ext/transport/chttp2/transport/frame_rst_stream.c index 9eac050797..7def454915 100644 --- a/src/core/ext/transport/chttp2/transport/frame_rst_stream.c +++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.c @@ -42,10 +42,10 @@ #include "src/core/ext/transport/chttp2/transport/http2_errors.h" #include "src/core/ext/transport/chttp2/transport/status_conversion.h" -gpr_slice grpc_chttp2_rst_stream_create(uint32_t id, uint32_t code, +grpc_slice grpc_chttp2_rst_stream_create(uint32_t id, uint32_t code, grpc_transport_one_way_stats *stats) { static const size_t frame_size = 13; - gpr_slice slice = gpr_slice_malloc(frame_size); + grpc_slice slice = grpc_slice_malloc(frame_size); stats->framing_bytes += frame_size; uint8_t *p = GPR_SLICE_START_PTR(slice); @@ -89,7 +89,7 @@ grpc_error *grpc_chttp2_rst_stream_parser_parse(grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport *t, grpc_chttp2_stream *s, - gpr_slice slice, int is_last) { + grpc_slice slice, int is_last) { uint8_t *const beg = GPR_SLICE_START_PTR(slice); uint8_t *const end = GPR_SLICE_END_PTR(slice); uint8_t *cur = beg; @@ -117,7 +117,7 @@ grpc_error *grpc_chttp2_rst_stream_parser_parse(grpc_exec_ctx *exec_ctx, char *status_details; gpr_asprintf(&status_details, "Received RST_STREAM with error code %d", reason); - gpr_slice slice_details = gpr_slice_from_copied_string(status_details); + grpc_slice slice_details = grpc_slice_from_copied_string(status_details); gpr_free(status_details); grpc_chttp2_fake_status(exec_ctx, t, s, status_code, &slice_details); } diff --git a/src/core/ext/transport/chttp2/transport/frame_rst_stream.h b/src/core/ext/transport/chttp2/transport/frame_rst_stream.h index 5a1f578a29..d837e95da4 100644 --- a/src/core/ext/transport/chttp2/transport/frame_rst_stream.h +++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.h @@ -44,7 +44,7 @@ typedef struct { uint8_t reason_bytes[4]; } grpc_chttp2_rst_stream_parser; -gpr_slice grpc_chttp2_rst_stream_create(uint32_t stream_id, uint32_t code, +grpc_slice grpc_chttp2_rst_stream_create(uint32_t stream_id, uint32_t code, grpc_transport_one_way_stats *stats); grpc_error *grpc_chttp2_rst_stream_parser_begin_frame( @@ -53,6 +53,6 @@ grpc_error *grpc_chttp2_rst_stream_parser_parse(grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport *t, grpc_chttp2_stream *s, - gpr_slice slice, int is_last); + grpc_slice slice, int is_last); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_RST_STREAM_H */ diff --git a/src/core/ext/transport/chttp2/transport/frame_settings.c b/src/core/ext/transport/chttp2/transport/frame_settings.c index 92022f90c9..d9ea1f91a7 100644 --- a/src/core/ext/transport/chttp2/transport/frame_settings.c +++ b/src/core/ext/transport/chttp2/transport/frame_settings.c @@ -82,18 +82,18 @@ static uint8_t *fill_header(uint8_t *out, uint32_t length, uint8_t flags) { return out; } -gpr_slice grpc_chttp2_settings_create(uint32_t *old, const uint32_t *new, +grpc_slice grpc_chttp2_settings_create(uint32_t *old, const uint32_t *new, uint32_t force_mask, size_t count) { size_t i; uint32_t n = 0; - gpr_slice output; + grpc_slice output; uint8_t *p; for (i = 0; i < count; i++) { n += (new[i] != old[i] || (force_mask & (1u << i)) != 0); } - output = gpr_slice_malloc(9 + 6 * n); + output = grpc_slice_malloc(9 + 6 * n); p = fill_header(GPR_SLICE_START_PTR(output), 6 * n, 0); for (i = 0; i < count; i++) { @@ -114,8 +114,8 @@ gpr_slice grpc_chttp2_settings_create(uint32_t *old, const uint32_t *new, return output; } -gpr_slice grpc_chttp2_settings_ack_create(void) { - gpr_slice output = gpr_slice_malloc(9); +grpc_slice grpc_chttp2_settings_ack_create(void) { + grpc_slice output = grpc_slice_malloc(9); fill_header(GPR_SLICE_START_PTR(output), 0, GRPC_CHTTP2_FLAG_ACK); return output; } @@ -146,7 +146,7 @@ grpc_error *grpc_chttp2_settings_parser_begin_frame( grpc_error *grpc_chttp2_settings_parser_parse(grpc_exec_ctx *exec_ctx, void *p, grpc_chttp2_transport *t, grpc_chttp2_stream *s, - gpr_slice slice, int is_last) { + grpc_slice slice, int is_last) { grpc_chttp2_settings_parser *parser = p; const uint8_t *cur = GPR_SLICE_START_PTR(slice); const uint8_t *end = GPR_SLICE_END_PTR(slice); @@ -164,7 +164,7 @@ grpc_error *grpc_chttp2_settings_parser_parse(grpc_exec_ctx *exec_ctx, void *p, if (is_last) { memcpy(parser->target_settings, parser->incoming_settings, GRPC_CHTTP2_NUM_SETTINGS * sizeof(uint32_t)); - gpr_slice_buffer_add(&t->qbuf, grpc_chttp2_settings_ack_create()); + grpc_slice_buffer_add(&t->qbuf, grpc_chttp2_settings_ack_create()); } return GRPC_ERROR_NONE; } @@ -225,7 +225,7 @@ grpc_error *grpc_chttp2_settings_parser_parse(grpc_exec_ctx *exec_ctx, void *p, case GRPC_CHTTP2_DISCONNECT_ON_INVALID_VALUE: grpc_chttp2_goaway_append( t->last_new_stream_id, sp->error_value, - gpr_slice_from_static_string("HTTP2 settings error"), + grpc_slice_from_static_string("HTTP2 settings error"), &t->qbuf); gpr_asprintf(&msg, "invalid value %u passed for %s", parser->value, sp->name); diff --git a/src/core/ext/transport/chttp2/transport/frame_settings.h b/src/core/ext/transport/chttp2/transport/frame_settings.h index 4bfa944cf1..cb2c8de0a0 100644 --- a/src/core/ext/transport/chttp2/transport/frame_settings.h +++ b/src/core/ext/transport/chttp2/transport/frame_settings.h @@ -87,10 +87,10 @@ extern const grpc_chttp2_setting_parameters grpc_chttp2_settings_parameters[GRPC_CHTTP2_NUM_SETTINGS]; /* Create a settings frame by diffing old & new, and updating old to be new */ -gpr_slice grpc_chttp2_settings_create(uint32_t *old, const uint32_t *new, +grpc_slice grpc_chttp2_settings_create(uint32_t *old, const uint32_t *new, uint32_t force_mask, size_t count); /* Create an ack settings frame */ -gpr_slice grpc_chttp2_settings_ack_create(void); +grpc_slice grpc_chttp2_settings_ack_create(void); grpc_error *grpc_chttp2_settings_parser_begin_frame( grpc_chttp2_settings_parser *parser, uint32_t length, uint8_t flags, @@ -99,6 +99,6 @@ grpc_error *grpc_chttp2_settings_parser_parse(grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport *t, grpc_chttp2_stream *s, - gpr_slice slice, int is_last); + grpc_slice slice, int is_last); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_SETTINGS_H */ diff --git a/src/core/ext/transport/chttp2/transport/frame_window_update.c b/src/core/ext/transport/chttp2/transport/frame_window_update.c index 418166a6df..b32f1403e1 100644 --- a/src/core/ext/transport/chttp2/transport/frame_window_update.c +++ b/src/core/ext/transport/chttp2/transport/frame_window_update.c @@ -38,10 +38,10 @@ #include #include -gpr_slice grpc_chttp2_window_update_create( +grpc_slice grpc_chttp2_window_update_create( uint32_t id, uint32_t window_update, grpc_transport_one_way_stats *stats) { static const size_t frame_size = 13; - gpr_slice slice = gpr_slice_malloc(frame_size); + grpc_slice slice = grpc_slice_malloc(frame_size); stats->header_bytes += frame_size; uint8_t *p = GPR_SLICE_START_PTR(slice); @@ -81,7 +81,7 @@ grpc_error *grpc_chttp2_window_update_parser_begin_frame( grpc_error *grpc_chttp2_window_update_parser_parse( grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport *t, - grpc_chttp2_stream *s, gpr_slice slice, int is_last) { + grpc_chttp2_stream *s, grpc_slice slice, int is_last) { uint8_t *const beg = GPR_SLICE_START_PTR(slice); uint8_t *const end = GPR_SLICE_END_PTR(slice); uint8_t *cur = beg; diff --git a/src/core/ext/transport/chttp2/transport/frame_window_update.h b/src/core/ext/transport/chttp2/transport/frame_window_update.h index 6e62f31872..b0f6a0a9d0 100644 --- a/src/core/ext/transport/chttp2/transport/frame_window_update.h +++ b/src/core/ext/transport/chttp2/transport/frame_window_update.h @@ -45,13 +45,13 @@ typedef struct { uint32_t amount; } grpc_chttp2_window_update_parser; -gpr_slice grpc_chttp2_window_update_create(uint32_t id, uint32_t window_delta, +grpc_slice grpc_chttp2_window_update_create(uint32_t id, uint32_t window_delta, grpc_transport_one_way_stats *stats); grpc_error *grpc_chttp2_window_update_parser_begin_frame( grpc_chttp2_window_update_parser *parser, uint32_t length, uint8_t flags); grpc_error *grpc_chttp2_window_update_parser_parse( grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport *t, - grpc_chttp2_stream *s, gpr_slice slice, int is_last); + grpc_chttp2_stream *s, grpc_slice slice, int is_last); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_WINDOW_UPDATE_H */ diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.c b/src/core/ext/transport/chttp2/transport/hpack_encoder.c index 581471ba02..d8de7d0719 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_encoder.c +++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.c @@ -76,7 +76,7 @@ typedef struct { uint8_t seen_regular_header; /* output stream id */ uint32_t stream_id; - gpr_slice_buffer *output; + grpc_slice_buffer *output; grpc_transport_one_way_stats *stats; /* maximum size of a frame */ size_t max_frame_size; @@ -116,7 +116,7 @@ static void finish_frame(framer_state *st, int is_header_boundary, output before beginning */ static void begin_frame(framer_state *st) { st->header_idx = - gpr_slice_buffer_add_indexed(st->output, gpr_slice_malloc(9)); + grpc_slice_buffer_add_indexed(st->output, grpc_slice_malloc(9)); st->output_length_at_start_of_frame = st->output->length; } @@ -147,7 +147,7 @@ static void inc_filter(uint8_t idx, uint32_t *sum, uint8_t *elems) { } } -static void add_header_data(framer_state *st, gpr_slice slice) { +static void add_header_data(framer_state *st, grpc_slice slice) { size_t len = GPR_SLICE_LENGTH(slice); size_t remaining; if (len == 0) return; @@ -155,10 +155,10 @@ static void add_header_data(framer_state *st, gpr_slice slice) { st->output->length; if (len <= remaining) { st->stats->header_bytes += len; - gpr_slice_buffer_add(st->output, slice); + grpc_slice_buffer_add(st->output, slice); } else { st->stats->header_bytes += remaining; - gpr_slice_buffer_add(st->output, gpr_slice_split_head(&slice, remaining)); + grpc_slice_buffer_add(st->output, grpc_slice_split_head(&slice, remaining)); finish_frame(st, 0, 0); begin_frame(st); add_header_data(st, slice); @@ -167,7 +167,7 @@ static void add_header_data(framer_state *st, gpr_slice slice) { static uint8_t *add_tiny_header_data(framer_state *st, size_t len) { ensure_space(st, len); - return gpr_slice_buffer_tiny_add(st->output, len); + return grpc_slice_buffer_tiny_add(st->output, len); } static void evict_entry(grpc_chttp2_hpack_compressor *c) { @@ -268,7 +268,7 @@ static void emit_indexed(grpc_chttp2_hpack_compressor *c, uint32_t elem_index, len); } -static gpr_slice get_wire_value(grpc_mdelem *elem, uint8_t *huffman_prefix) { +static grpc_slice get_wire_value(grpc_mdelem *elem, uint8_t *huffman_prefix) { if (grpc_is_binary_header((const char *)GPR_SLICE_START_PTR(elem->key->slice), GPR_SLICE_LENGTH(elem->key->slice))) { *huffman_prefix = 0x80; @@ -284,7 +284,7 @@ static void emit_lithdr_incidx(grpc_chttp2_hpack_compressor *c, framer_state *st) { uint32_t len_pfx = GRPC_CHTTP2_VARINT_LENGTH(key_index, 2); uint8_t huffman_prefix; - gpr_slice value_slice = get_wire_value(elem, &huffman_prefix); + grpc_slice value_slice = get_wire_value(elem, &huffman_prefix); size_t len_val = GPR_SLICE_LENGTH(value_slice); uint32_t len_val_len; GPR_ASSERT(len_val <= UINT32_MAX); @@ -293,7 +293,7 @@ static void emit_lithdr_incidx(grpc_chttp2_hpack_compressor *c, add_tiny_header_data(st, len_pfx), len_pfx); GRPC_CHTTP2_WRITE_VARINT((uint32_t)len_val, 1, huffman_prefix, add_tiny_header_data(st, len_val_len), len_val_len); - add_header_data(st, gpr_slice_ref(value_slice)); + add_header_data(st, grpc_slice_ref(value_slice)); } static void emit_lithdr_noidx(grpc_chttp2_hpack_compressor *c, @@ -301,7 +301,7 @@ static void emit_lithdr_noidx(grpc_chttp2_hpack_compressor *c, framer_state *st) { uint32_t len_pfx = GRPC_CHTTP2_VARINT_LENGTH(key_index, 4); uint8_t huffman_prefix; - gpr_slice value_slice = get_wire_value(elem, &huffman_prefix); + grpc_slice value_slice = get_wire_value(elem, &huffman_prefix); size_t len_val = GPR_SLICE_LENGTH(value_slice); uint32_t len_val_len; GPR_ASSERT(len_val <= UINT32_MAX); @@ -310,14 +310,14 @@ static void emit_lithdr_noidx(grpc_chttp2_hpack_compressor *c, add_tiny_header_data(st, len_pfx), len_pfx); GRPC_CHTTP2_WRITE_VARINT((uint32_t)len_val, 1, huffman_prefix, add_tiny_header_data(st, len_val_len), len_val_len); - add_header_data(st, gpr_slice_ref(value_slice)); + add_header_data(st, grpc_slice_ref(value_slice)); } static void emit_lithdr_incidx_v(grpc_chttp2_hpack_compressor *c, grpc_mdelem *elem, framer_state *st) { uint32_t len_key = (uint32_t)GPR_SLICE_LENGTH(elem->key->slice); uint8_t huffman_prefix; - gpr_slice value_slice = get_wire_value(elem, &huffman_prefix); + grpc_slice value_slice = get_wire_value(elem, &huffman_prefix); uint32_t len_val = (uint32_t)GPR_SLICE_LENGTH(value_slice); uint32_t len_key_len = GRPC_CHTTP2_VARINT_LENGTH(len_key, 1); uint32_t len_val_len = GRPC_CHTTP2_VARINT_LENGTH(len_val, 1); @@ -326,17 +326,17 @@ static void emit_lithdr_incidx_v(grpc_chttp2_hpack_compressor *c, *add_tiny_header_data(st, 1) = 0x40; GRPC_CHTTP2_WRITE_VARINT(len_key, 1, 0x00, add_tiny_header_data(st, len_key_len), len_key_len); - add_header_data(st, gpr_slice_ref(elem->key->slice)); + add_header_data(st, grpc_slice_ref(elem->key->slice)); GRPC_CHTTP2_WRITE_VARINT(len_val, 1, huffman_prefix, add_tiny_header_data(st, len_val_len), len_val_len); - add_header_data(st, gpr_slice_ref(value_slice)); + add_header_data(st, grpc_slice_ref(value_slice)); } static void emit_lithdr_noidx_v(grpc_chttp2_hpack_compressor *c, grpc_mdelem *elem, framer_state *st) { uint32_t len_key = (uint32_t)GPR_SLICE_LENGTH(elem->key->slice); uint8_t huffman_prefix; - gpr_slice value_slice = get_wire_value(elem, &huffman_prefix); + grpc_slice value_slice = get_wire_value(elem, &huffman_prefix); uint32_t len_val = (uint32_t)GPR_SLICE_LENGTH(value_slice); uint32_t len_key_len = GRPC_CHTTP2_VARINT_LENGTH(len_key, 1); uint32_t len_val_len = GRPC_CHTTP2_VARINT_LENGTH(len_val, 1); @@ -345,10 +345,10 @@ static void emit_lithdr_noidx_v(grpc_chttp2_hpack_compressor *c, *add_tiny_header_data(st, 1) = 0x00; GRPC_CHTTP2_WRITE_VARINT(len_key, 1, 0x00, add_tiny_header_data(st, len_key_len), len_key_len); - add_header_data(st, gpr_slice_ref(elem->key->slice)); + add_header_data(st, grpc_slice_ref(elem->key->slice)); GRPC_CHTTP2_WRITE_VARINT(len_val, 1, huffman_prefix, add_tiny_header_data(st, len_val_len), len_val_len); - add_header_data(st, gpr_slice_ref(value_slice)); + add_header_data(st, grpc_slice_ref(value_slice)); } static void emit_advertise_table_size_change(grpc_chttp2_hpack_compressor *c, @@ -546,7 +546,7 @@ void grpc_chttp2_encode_header(grpc_chttp2_hpack_compressor *c, grpc_metadata_batch *metadata, int is_eof, size_t max_frame_size, grpc_transport_one_way_stats *stats, - gpr_slice_buffer *outbuf) { + grpc_slice_buffer *outbuf) { framer_state st; grpc_linked_mdelem *l; gpr_timespec deadline; diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.h b/src/core/ext/transport/chttp2/transport/hpack_encoder.h index 4c3a931549..abbd514fc2 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_encoder.h +++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.h @@ -93,6 +93,6 @@ void grpc_chttp2_encode_header(grpc_chttp2_hpack_compressor *c, uint32_t id, grpc_metadata_batch *metadata, int is_eof, size_t max_frame_size, grpc_transport_one_way_stats *stats, - gpr_slice_buffer *outbuf); + grpc_slice_buffer *outbuf); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_ENCODER_H */ diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.c b/src/core/ext/transport/chttp2/transport/hpack_parser.c index 8180f78fc0..0e721b181a 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parser.c +++ b/src/core/ext/transport/chttp2/transport/hpack_parser.c @@ -1582,7 +1582,7 @@ grpc_error *grpc_chttp2_header_parser_parse(grpc_exec_ctx *exec_ctx, void *hpack_parser, grpc_chttp2_transport *t, grpc_chttp2_stream *s, - gpr_slice slice, int is_last) { + grpc_slice slice, int is_last) { grpc_chttp2_hpack_parser *parser = hpack_parser; GPR_TIMER_BEGIN("grpc_chttp2_hpack_parser_parse", 0); if (s != NULL) { diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.h b/src/core/ext/transport/chttp2/transport/hpack_parser.h index 0290c78d5a..a39bf466cd 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parser.h +++ b/src/core/ext/transport/chttp2/transport/hpack_parser.h @@ -116,6 +116,6 @@ grpc_error *grpc_chttp2_header_parser_parse(grpc_exec_ctx *exec_ctx, void *hpack_parser, grpc_chttp2_transport *t, grpc_chttp2_stream *s, - gpr_slice slice, int is_last); + grpc_slice slice, int is_last); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_PARSER_H */ diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index e0c4a1e925..18fa2b4890 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -170,14 +170,14 @@ struct grpc_chttp2_incoming_byte_stream { bool is_tail; gpr_mu slice_mu; // protects slices, on_next - gpr_slice_buffer slices; + grpc_slice_buffer slices; grpc_closure *on_next; - gpr_slice *next; + grpc_slice *next; uint32_t remaining_bytes; struct { grpc_closure closure; - gpr_slice *slice; + grpc_slice *slice; size_t max_size_hint; grpc_closure *on_complete; } next_action; @@ -219,7 +219,7 @@ struct grpc_chttp2_transport { grpc_closure read_action_locked; /** incoming read bytes */ - gpr_slice_buffer read_buffer; + grpc_slice_buffer read_buffer; /** address to place a newly accepted stream - set and unset by grpc_chttp2_parsing_accept_stream; used by init_stream to @@ -237,7 +237,7 @@ struct grpc_chttp2_transport { } channel_callback; /** data to write now */ - gpr_slice_buffer outbuf; + grpc_slice_buffer outbuf; /** hpack encoding */ grpc_chttp2_hpack_compressor hpack_compressor; int64_t outgoing_window; @@ -245,7 +245,7 @@ struct grpc_chttp2_transport { uint8_t is_client; /** data to write next write */ - gpr_slice_buffer qbuf; + grpc_slice_buffer qbuf; /** window available to announce to peer */ int64_t announce_incoming_window; @@ -314,12 +314,12 @@ struct grpc_chttp2_transport { grpc_chttp2_stream *incoming_stream; grpc_error *(*parser)(grpc_exec_ctx *exec_ctx, void *parser_user_data, grpc_chttp2_transport *t, grpc_chttp2_stream *s, - gpr_slice slice, int is_last); + grpc_slice slice, int is_last); /* goaway data */ grpc_status_code goaway_error; uint32_t goaway_last_stream_index; - gpr_slice goaway_text; + grpc_slice goaway_text; grpc_chttp2_write_cb *write_cb_pool; @@ -374,7 +374,7 @@ struct grpc_chttp2_stream { grpc_byte_stream *fetching_send_message; uint32_t fetched_send_message_length; - gpr_slice fetching_slice; + grpc_slice fetching_slice; int64_t next_message_end_offset; int64_t flow_controlled_bytes_written; bool complete_fetch_covered_by_poller; @@ -434,7 +434,7 @@ struct grpc_chttp2_stream { bool sent_trailing_metadata; /** how much window should we announce? */ uint32_t announce_window; - gpr_slice_buffer flow_controlled_buffer; + grpc_slice_buffer flow_controlled_buffer; grpc_chttp2_write_cb *on_write_finished_cbs; grpc_chttp2_write_cb *finish_after_write; @@ -466,7 +466,7 @@ void grpc_chttp2_end_write(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, /** Process one slice of incoming data; return 1 if the connection is still viable after reading, or 0 if the connection should be torn down */ grpc_error *grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, - grpc_chttp2_transport *t, gpr_slice slice); + grpc_chttp2_transport *t, grpc_slice slice); bool grpc_chttp2_list_add_writable_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s); @@ -509,7 +509,7 @@ grpc_chttp2_stream *grpc_chttp2_parsing_accept_stream(grpc_exec_ctx *exec_ctx, void grpc_chttp2_add_incoming_goaway(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, uint32_t goaway_error, - gpr_slice goaway_text); + grpc_slice goaway_text); void grpc_chttp2_parsing_become_skip_parser(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t); @@ -611,7 +611,7 @@ void grpc_chttp2_flowctl_trace(const char *file, int line, const char *phase, void grpc_chttp2_fake_status(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *stream, - grpc_status_code status, gpr_slice *details); + grpc_status_code status, grpc_slice *details); void grpc_chttp2_mark_stream_closed(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s, int close_reads, @@ -659,7 +659,7 @@ grpc_chttp2_incoming_byte_stream *grpc_chttp2_incoming_byte_stream_create( uint32_t frame_size, uint32_t flags); void grpc_chttp2_incoming_byte_stream_push(grpc_exec_ctx *exec_ctx, grpc_chttp2_incoming_byte_stream *bs, - gpr_slice slice); + grpc_slice slice); void grpc_chttp2_incoming_byte_stream_finished( grpc_exec_ctx *exec_ctx, grpc_chttp2_incoming_byte_stream *bs, grpc_error *error); diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index 8005350ae7..6941a1e397 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -67,12 +67,12 @@ static grpc_error *init_skip_frame_parser(grpc_exec_ctx *exec_ctx, int is_header); static grpc_error *parse_frame_slice(grpc_exec_ctx *exec_ctx, - grpc_chttp2_transport *t, gpr_slice slice, + grpc_chttp2_transport *t, grpc_slice slice, int is_last); grpc_error *grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, - gpr_slice slice) { + grpc_slice slice) { uint8_t *beg = GPR_SLICE_START_PTR(slice); uint8_t *end = GPR_SLICE_END_PTR(slice); uint8_t *cur = beg; @@ -230,7 +230,7 @@ grpc_error *grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, GPR_ASSERT(cur < end); if ((uint32_t)(end - cur) == t->incoming_frame_size) { err = parse_frame_slice(exec_ctx, t, - gpr_slice_sub_no_ref(slice, (size_t)(cur - beg), + grpc_slice_sub_no_ref(slice, (size_t)(cur - beg), (size_t)(end - beg)), 1); if (err != GRPC_ERROR_NONE) { @@ -243,7 +243,7 @@ grpc_error *grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, size_t cur_offset = (size_t)(cur - beg); err = parse_frame_slice( exec_ctx, t, - gpr_slice_sub_no_ref(slice, cur_offset, + grpc_slice_sub_no_ref(slice, cur_offset, cur_offset + t->incoming_frame_size), 1); if (err != GRPC_ERROR_NONE) { @@ -254,7 +254,7 @@ grpc_error *grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, goto dts_fh_0; /* loop */ } else { err = parse_frame_slice(exec_ctx, t, - gpr_slice_sub_no_ref(slice, (size_t)(cur - beg), + grpc_slice_sub_no_ref(slice, (size_t)(cur - beg), (size_t)(end - beg)), 0); if (err != GRPC_ERROR_NONE) { @@ -331,7 +331,7 @@ static grpc_error *init_frame_parser(grpc_exec_ctx *exec_ctx, static grpc_error *skip_parser(grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport *t, grpc_chttp2_stream *s, - gpr_slice slice, int is_last) { + grpc_slice slice, int is_last) { return GRPC_ERROR_NONE; } @@ -430,7 +430,7 @@ error_handler: if (s != NULL) { grpc_chttp2_mark_stream_closed(exec_ctx, t, s, true, false, err); } - gpr_slice_buffer_add( + grpc_slice_buffer_add( &t->qbuf, grpc_chttp2_rst_stream_create(t->incoming_stream_id, GRPC_CHTTP2_PROTOCOL_ERROR, &s->stats.outgoing)); @@ -722,7 +722,7 @@ static grpc_error *init_settings_frame_parser(grpc_exec_ctx *exec_ctx, } static grpc_error *parse_frame_slice(grpc_exec_ctx *exec_ctx, - grpc_chttp2_transport *t, gpr_slice slice, + grpc_chttp2_transport *t, grpc_slice slice, int is_last) { grpc_chttp2_stream *s = t->incoming_stream; grpc_error *err = t->parser(exec_ctx, t->parser_data, t, s, slice, is_last); @@ -737,7 +737,7 @@ static grpc_error *parse_frame_slice(grpc_exec_ctx *exec_ctx, grpc_chttp2_parsing_become_skip_parser(exec_ctx, t); if (s) { s->forced_close_error = err; - gpr_slice_buffer_add( + grpc_slice_buffer_add( &t->qbuf, grpc_chttp2_rst_stream_create(t->incoming_stream_id, GRPC_CHTTP2_PROTOCOL_ERROR, &s->stats.outgoing)); diff --git a/src/core/ext/transport/chttp2/transport/writing.c b/src/core/ext/transport/chttp2/transport/writing.c index b39695a1a5..1486a7edb4 100644 --- a/src/core/ext/transport/chttp2/transport/writing.c +++ b/src/core/ext/transport/chttp2/transport/writing.c @@ -80,7 +80,7 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx, GPR_TIMER_BEGIN("grpc_chttp2_begin_write", 0); if (t->dirtied_local_settings && !t->sent_local_settings) { - gpr_slice_buffer_add( + grpc_slice_buffer_add( &t->outbuf, grpc_chttp2_settings_create( t->settings[GRPC_SENT_SETTINGS], t->settings[GRPC_LOCAL_SETTINGS], @@ -91,7 +91,7 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx, } /* simple writes are queued to qbuf, and flushed here */ - gpr_slice_buffer_move_into(&t->qbuf, &t->outbuf); + grpc_slice_buffer_move_into(&t->qbuf, &t->outbuf); GPR_ASSERT(t->qbuf.count == 0); grpc_chttp2_hpack_compressor_set_max_table_size( @@ -130,7 +130,7 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx, /* send any window updates */ if (s->announce_window > 0) { uint32_t announce = s->announce_window; - gpr_slice_buffer_add(&t->outbuf, + grpc_slice_buffer_add(&t->outbuf, grpc_chttp2_window_update_create( s->id, s->announce_window, &s->stats.outgoing)); GRPC_CHTTP2_FLOW_DEBIT_STREAM("write", t, s, announce_window, announce); @@ -162,7 +162,7 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx, s->send_trailing_metadata = NULL; s->sent_trailing_metadata = true; if (!t->is_client && !s->read_closed) { - gpr_slice_buffer_add(&t->outbuf, grpc_chttp2_rst_stream_create( + grpc_slice_buffer_add(&t->outbuf, grpc_chttp2_rst_stream_create( s->id, GRPC_CHTTP2_NO_ERROR, &s->stats.outgoing)); } @@ -194,7 +194,7 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx, s->send_trailing_metadata = NULL; s->sent_trailing_metadata = true; if (!t->is_client && !s->read_closed) { - gpr_slice_buffer_add( + grpc_slice_buffer_add( &t->outbuf, grpc_chttp2_rst_stream_create( s->id, GRPC_CHTTP2_NO_ERROR, &s->stats.outgoing)); } @@ -220,7 +220,7 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx, GRPC_CHTTP2_FLOW_DEBIT_TRANSPORT("write", t, announce_incoming_window, announced); grpc_transport_one_way_stats throwaway_stats; - gpr_slice_buffer_add(&t->outbuf, grpc_chttp2_window_update_create( + grpc_slice_buffer_add(&t->outbuf, grpc_chttp2_window_update_create( 0, announced, &throwaway_stats)); } @@ -254,7 +254,7 @@ void grpc_chttp2_end_write(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, } GRPC_CHTTP2_STREAM_UNREF(exec_ctx, s, "chttp2_writing:end"); } - gpr_slice_buffer_reset_and_unref(&t->outbuf); + grpc_slice_buffer_reset_and_unref(&t->outbuf); GRPC_ERROR_UNREF(error); GPR_TIMER_END("grpc_chttp2_end_write", 0); } diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 25ad40b935..87b2c0880f 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -130,7 +130,7 @@ struct read_state { /* vars for holding data destined for the application */ struct grpc_slice_buffer_stream sbs; - gpr_slice_buffer read_slice_buffer; + grpc_slice_buffer read_slice_buffer; /* vars for trailing metadata */ grpc_chttp2_incoming_metadata_buffer trailing_metadata; @@ -517,10 +517,10 @@ static void on_response_trailers_received( Utility function that takes the data from s->write_slice_buffer and assembles into a contiguous byte stream with 5 byte gRPC header prepended. */ -static void create_grpc_frame(gpr_slice_buffer *write_slice_buffer, +static void create_grpc_frame(grpc_slice_buffer *write_slice_buffer, char **pp_write_buffer, size_t *p_write_buffer_size) { - gpr_slice slice = gpr_slice_buffer_take_first(write_slice_buffer); + grpc_slice slice = grpc_slice_buffer_take_first(write_slice_buffer); size_t length = GPR_SLICE_LENGTH(slice); *p_write_buffer_size = length + GRPC_HEADER_SIZE_IN_BYTES; /* This is freed in the on_write_completed callback */ @@ -817,9 +817,9 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx, result = NO_ACTION_POSSIBLE; CRONET_LOG(GPR_DEBUG, "Stream is either cancelled or failed."); } else { - gpr_slice_buffer write_slice_buffer; - gpr_slice slice; - gpr_slice_buffer_init(&write_slice_buffer); + grpc_slice_buffer write_slice_buffer; + grpc_slice slice; + grpc_slice_buffer_init(&write_slice_buffer); grpc_byte_stream_next(NULL, stream_op->send_message, &slice, stream_op->send_message->length, NULL); /* Check that compression flag is OFF. We don't support compression yet. @@ -828,7 +828,7 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx, gpr_log(GPR_ERROR, "Compression is not supported"); GPR_ASSERT(stream_op->send_message->flags == 0); } - gpr_slice_buffer_add(&write_slice_buffer, slice); + grpc_slice_buffer_add(&write_slice_buffer, slice); if (write_slice_buffer.count != 1) { /* Empty request not handled yet */ gpr_log(GPR_ERROR, "Empty request is not supported"); @@ -891,7 +891,7 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx, } else { stream_state->rs.remaining_bytes = 0; CRONET_LOG(GPR_DEBUG, "read operation complete. Empty response."); - gpr_slice_buffer_init(&stream_state->rs.read_slice_buffer); + grpc_slice_buffer_init(&stream_state->rs.read_slice_buffer); grpc_slice_buffer_stream_init(&stream_state->rs.sbs, &stream_state->rs.read_slice_buffer, 0); *((grpc_byte_buffer **)stream_op->recv_message) = @@ -918,14 +918,14 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx, } } else if (stream_state->rs.remaining_bytes == 0) { CRONET_LOG(GPR_DEBUG, "read operation complete"); - gpr_slice read_data_slice = - gpr_slice_malloc((uint32_t)stream_state->rs.length_field); + grpc_slice read_data_slice = + grpc_slice_malloc((uint32_t)stream_state->rs.length_field); uint8_t *dst_p = GPR_SLICE_START_PTR(read_data_slice); memcpy(dst_p, stream_state->rs.read_buffer, (size_t)stream_state->rs.length_field); free_read_buffer(s); - gpr_slice_buffer_init(&stream_state->rs.read_slice_buffer); - gpr_slice_buffer_add(&stream_state->rs.read_slice_buffer, + grpc_slice_buffer_init(&stream_state->rs.read_slice_buffer); + grpc_slice_buffer_add(&stream_state->rs.read_slice_buffer, read_data_slice); grpc_slice_buffer_stream_init(&stream_state->rs.sbs, &stream_state->rs.read_slice_buffer, 0); diff --git a/src/core/lib/channel/channel_stack.c b/src/core/lib/channel/channel_stack.c index 2c5367901d..9da81959e7 100644 --- a/src/core/lib/channel/channel_stack.c +++ b/src/core/lib/channel/channel_stack.c @@ -288,7 +288,7 @@ void grpc_call_element_send_cancel(grpc_exec_ctx *exec_ctx, void grpc_call_element_send_cancel_with_message(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_status_code status, - gpr_slice *optional_message) { + grpc_slice *optional_message) { grpc_transport_stream_op *op = gpr_malloc(sizeof(*op)); memset(op, 0, sizeof(*op)); op->on_complete = grpc_closure_create(destroy_op, op); @@ -300,7 +300,7 @@ void grpc_call_element_send_cancel_with_message(grpc_exec_ctx *exec_ctx, void grpc_call_element_send_close_with_message(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_status_code status, - gpr_slice *optional_message) { + grpc_slice *optional_message) { grpc_transport_stream_op *op = gpr_malloc(sizeof(*op)); memset(op, 0, sizeof(*op)); op->on_complete = grpc_closure_create(destroy_op, op); diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h index 27f3be7b29..0d58994726 100644 --- a/src/core/lib/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -289,12 +289,12 @@ void grpc_call_element_send_cancel(grpc_exec_ctx *exec_ctx, void grpc_call_element_send_cancel_with_message(grpc_exec_ctx *exec_ctx, grpc_call_element *cur_elem, grpc_status_code status, - gpr_slice *optional_message); + grpc_slice *optional_message); void grpc_call_element_send_close_with_message(grpc_exec_ctx *exec_ctx, grpc_call_element *cur_elem, grpc_status_code status, - gpr_slice *optional_message); + grpc_slice *optional_message); extern int grpc_trace_channel; diff --git a/src/core/lib/channel/compress_filter.c b/src/core/lib/channel/compress_filter.c index 0981d59f63..f797d82eb9 100644 --- a/src/core/lib/channel/compress_filter.c +++ b/src/core/lib/channel/compress_filter.c @@ -50,7 +50,7 @@ int grpc_compression_trace = 0; typedef struct call_data { - gpr_slice_buffer slices; /**< Buffers up input slices to be compressed */ + grpc_slice_buffer slices; /**< Buffers up input slices to be compressed */ grpc_linked_mdelem compression_algorithm_storage; grpc_linked_mdelem accept_encoding_storage; uint32_t remaining_slice_bytes; @@ -63,7 +63,7 @@ typedef struct call_data { grpc_transport_stream_op *send_op; uint32_t send_length; uint32_t send_flags; - gpr_slice incoming_slice; + grpc_slice incoming_slice; grpc_slice_buffer_stream replacement_stream; grpc_closure *post_send; grpc_closure send_done; @@ -157,7 +157,7 @@ static void continue_send_message(grpc_exec_ctx *exec_ctx, static void send_done(grpc_exec_ctx *exec_ctx, void *elemp, grpc_error *error) { grpc_call_element *elem = elemp; call_data *calld = elem->call_data; - gpr_slice_buffer_reset_and_unref(&calld->slices); + grpc_slice_buffer_reset_and_unref(&calld->slices); calld->post_send->cb(exec_ctx, calld->post_send->cb_arg, error); } @@ -165,8 +165,8 @@ static void finish_send_message(grpc_exec_ctx *exec_ctx, grpc_call_element *elem) { call_data *calld = elem->call_data; int did_compress; - gpr_slice_buffer tmp; - gpr_slice_buffer_init(&tmp); + grpc_slice_buffer tmp; + grpc_slice_buffer_init(&tmp); did_compress = grpc_msg_compress(calld->compression_algorithm, &calld->slices, &tmp); if (did_compress) { @@ -181,7 +181,7 @@ static void finish_send_message(grpc_exec_ctx *exec_ctx, " bytes (%.2f%% savings)", algo_name, before_size, after_size, 100 * savings_ratio); } - gpr_slice_buffer_swap(&calld->slices, &tmp); + grpc_slice_buffer_swap(&calld->slices, &tmp); calld->send_flags |= GRPC_WRITE_INTERNAL_COMPRESS; } else { if (grpc_compression_trace) { @@ -195,7 +195,7 @@ static void finish_send_message(grpc_exec_ctx *exec_ctx, } } - gpr_slice_buffer_destroy(&tmp); + grpc_slice_buffer_destroy(&tmp); grpc_slice_buffer_stream_init(&calld->replacement_stream, &calld->slices, calld->send_flags); @@ -209,7 +209,7 @@ static void finish_send_message(grpc_exec_ctx *exec_ctx, static void got_slice(grpc_exec_ctx *exec_ctx, void *elemp, grpc_error *error) { grpc_call_element *elem = elemp; call_data *calld = elem->call_data; - gpr_slice_buffer_add(&calld->slices, calld->incoming_slice); + grpc_slice_buffer_add(&calld->slices, calld->incoming_slice); if (calld->send_length == calld->slices.length) { finish_send_message(exec_ctx, elem); } else { @@ -223,7 +223,7 @@ static void continue_send_message(grpc_exec_ctx *exec_ctx, while (grpc_byte_stream_next(exec_ctx, calld->send_op->send_message, &calld->incoming_slice, ~(size_t)0, &calld->got_slice)) { - gpr_slice_buffer_add(&calld->slices, calld->incoming_slice); + grpc_slice_buffer_add(&calld->slices, calld->incoming_slice); if (calld->send_length == calld->slices.length) { finish_send_message(exec_ctx, elem); break; @@ -263,7 +263,7 @@ static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx, call_data *calld = elem->call_data; /* initialize members */ - gpr_slice_buffer_init(&calld->slices); + grpc_slice_buffer_init(&calld->slices); calld->has_compression_algorithm = 0; grpc_closure_init(&calld->got_slice, got_slice, elem); grpc_closure_init(&calld->send_done, send_done, elem); @@ -277,7 +277,7 @@ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, void *ignored) { /* grab pointers to our data from the call element */ call_data *calld = elem->call_data; - gpr_slice_buffer_destroy(&calld->slices); + grpc_slice_buffer_destroy(&calld->slices); } /* Constructor for channel_data */ diff --git a/src/core/lib/channel/deadline_filter.c b/src/core/lib/channel/deadline_filter.c index d2ea5250f6..449eb7b8d6 100644 --- a/src/core/lib/channel/deadline_filter.c +++ b/src/core/lib/channel/deadline_filter.c @@ -55,10 +55,10 @@ static void timer_callback(grpc_exec_ctx* exec_ctx, void* arg, deadline_state->timer_pending = false; gpr_mu_unlock(&deadline_state->timer_mu); if (error != GRPC_ERROR_CANCELLED) { - gpr_slice msg = gpr_slice_from_static_string("Deadline Exceeded"); + grpc_slice msg = grpc_slice_from_static_string("Deadline Exceeded"); grpc_call_element_send_cancel_with_message( exec_ctx, elem, GRPC_STATUS_DEADLINE_EXCEEDED, &msg); - gpr_slice_unref(msg); + grpc_slice_unref(msg); } GRPC_CALL_STACK_UNREF(exec_ctx, deadline_state->call_stack, "deadline_timer"); } diff --git a/src/core/lib/channel/handshaker.c b/src/core/lib/channel/handshaker.c index 0d759887bc..00d39764d7 100644 --- a/src/core/lib/channel/handshaker.c +++ b/src/core/lib/channel/handshaker.c @@ -62,7 +62,7 @@ void grpc_handshaker_do_handshake(grpc_exec_ctx* exec_ctx, grpc_handshaker* handshaker, grpc_endpoint* endpoint, grpc_channel_args* args, - gpr_slice_buffer* read_buffer, + grpc_slice_buffer* read_buffer, gpr_timespec deadline, grpc_tcp_server_acceptor* acceptor, grpc_handshaker_done_cb cb, void* user_data) { @@ -146,7 +146,7 @@ void grpc_handshake_manager_shutdown(grpc_exec_ctx* exec_ctx, static void call_next_handshaker(grpc_exec_ctx* exec_ctx, grpc_endpoint* endpoint, grpc_channel_args* args, - gpr_slice_buffer* read_buffer, void* user_data, + grpc_slice_buffer* read_buffer, void* user_data, grpc_error* error) { grpc_handshake_manager* mgr = user_data; GPR_ASSERT(mgr->state != NULL); @@ -183,8 +183,8 @@ void grpc_handshake_manager_do_handshake( gpr_timespec deadline, grpc_tcp_server_acceptor* acceptor, grpc_handshaker_done_cb cb, void* user_data) { grpc_channel_args* args_copy = grpc_channel_args_copy(args); - gpr_slice_buffer* read_buffer = gpr_malloc(sizeof(*read_buffer)); - gpr_slice_buffer_init(read_buffer); + grpc_slice_buffer* read_buffer = gpr_malloc(sizeof(*read_buffer)); + grpc_slice_buffer_init(read_buffer); if (mgr->count == 0) { // No handshakers registered, so we just immediately call the done // callback with the passed-in endpoint. diff --git a/src/core/lib/channel/handshaker.h b/src/core/lib/channel/handshaker.h index d574b46242..f8a36c6473 100644 --- a/src/core/lib/channel/handshaker.h +++ b/src/core/lib/channel/handshaker.h @@ -59,7 +59,7 @@ typedef struct grpc_handshaker grpc_handshaker; typedef void (*grpc_handshaker_done_cb)(grpc_exec_ctx* exec_ctx, grpc_endpoint* endpoint, grpc_channel_args* args, - gpr_slice_buffer* read_buffer, + grpc_slice_buffer* read_buffer, void* user_data, grpc_error* error); struct grpc_handshaker_vtable { @@ -77,7 +77,7 @@ struct grpc_handshaker_vtable { /// \a acceptor will be NULL for client-side handshakers. void (*do_handshake)(grpc_exec_ctx* exec_ctx, grpc_handshaker* handshaker, grpc_endpoint* endpoint, grpc_channel_args* args, - gpr_slice_buffer* read_buffer, gpr_timespec deadline, + grpc_slice_buffer* read_buffer, gpr_timespec deadline, grpc_tcp_server_acceptor* acceptor, grpc_handshaker_done_cb cb, void* user_data); }; @@ -103,7 +103,7 @@ void grpc_handshaker_do_handshake(grpc_exec_ctx* exec_ctx, grpc_handshaker* handshaker, grpc_endpoint* endpoint, grpc_channel_args* args, - gpr_slice_buffer* read_buffer, + grpc_slice_buffer* read_buffer, gpr_timespec deadline, grpc_tcp_server_acceptor* acceptor, grpc_handshaker_done_cb cb, void* user_data); diff --git a/src/core/lib/channel/http_client_filter.c b/src/core/lib/channel/http_client_filter.c index 1dc05fb20d..110c1cb546 100644 --- a/src/core/lib/channel/http_client_filter.c +++ b/src/core/lib/channel/http_client_filter.c @@ -62,9 +62,9 @@ typedef struct call_data { grpc_transport_stream_op send_op; uint32_t send_length; uint32_t send_flags; - gpr_slice incoming_slice; + grpc_slice incoming_slice; grpc_slice_buffer_stream replacement_stream; - gpr_slice_buffer slices; + grpc_slice_buffer slices; /* flag that indicates that all slices of send_messages aren't availble */ bool send_message_blocked; @@ -101,7 +101,7 @@ static grpc_mdelem *client_recv_filter(void *user_data, grpc_mdelem *md) { char *message_string; gpr_asprintf(&message_string, "Received http2 header with status: %s", grpc_mdstr_as_c_string(md->value)); - gpr_slice message = gpr_slice_from_copied_string(message_string); + grpc_slice message = grpc_slice_from_copied_string(message_string); gpr_free(message_string); grpc_call_element_send_close_with_message(a->exec_ctx, a->elem, GRPC_STATUS_CANCELLED, &message); @@ -155,7 +155,7 @@ static void hc_on_complete(grpc_exec_ctx *exec_ctx, void *user_data, static void send_done(grpc_exec_ctx *exec_ctx, void *elemp, grpc_error *error) { grpc_call_element *elem = elemp; call_data *calld = elem->call_data; - gpr_slice_buffer_reset_and_unref(&calld->slices); + grpc_slice_buffer_reset_and_unref(&calld->slices); calld->post_send->cb(exec_ctx, calld->post_send->cb_arg, error); } @@ -179,7 +179,7 @@ static void continue_send_message(grpc_exec_ctx *exec_ctx, memcpy(wrptr, GPR_SLICE_START_PTR(calld->incoming_slice), GPR_SLICE_LENGTH(calld->incoming_slice)); wrptr += GPR_SLICE_LENGTH(calld->incoming_slice); - gpr_slice_buffer_add(&calld->slices, calld->incoming_slice); + grpc_slice_buffer_add(&calld->slices, calld->incoming_slice); if (calld->send_length == calld->slices.length) { calld->send_message_blocked = false; break; @@ -191,7 +191,7 @@ static void got_slice(grpc_exec_ctx *exec_ctx, void *elemp, grpc_error *error) { grpc_call_element *elem = elemp; call_data *calld = elem->call_data; calld->send_message_blocked = false; - gpr_slice_buffer_add(&calld->slices, calld->incoming_slice); + grpc_slice_buffer_add(&calld->slices, calld->incoming_slice); if (calld->send_length == calld->slices.length) { /* Pass down the original send_message op that was blocked.*/ grpc_slice_buffer_stream_init(&calld->replacement_stream, &calld->slices, @@ -311,7 +311,7 @@ static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx, calld->on_done_recv = NULL; calld->on_complete = NULL; calld->payload_bytes = NULL; - gpr_slice_buffer_init(&calld->slices); + grpc_slice_buffer_init(&calld->slices); grpc_closure_init(&calld->hc_on_recv, hc_on_recv, elem); grpc_closure_init(&calld->hc_on_complete, hc_on_complete, elem); grpc_closure_init(&calld->got_slice, got_slice, elem); @@ -324,7 +324,7 @@ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, const grpc_call_final_info *final_info, void *ignored) { call_data *calld = elem->call_data; - gpr_slice_buffer_destroy(&calld->slices); + grpc_slice_buffer_destroy(&calld->slices); } static grpc_mdelem *scheme_from_args(const grpc_channel_args *args) { diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c index f2221fb0fb..1a73a07b81 100644 --- a/src/core/lib/channel/http_server_filter.c +++ b/src/core/lib/channel/http_server_filter.c @@ -68,7 +68,7 @@ typedef struct call_data { grpc_closure *recv_message_ready; grpc_closure *on_complete; grpc_byte_stream **pp_recv_message; - gpr_slice_buffer read_slice_buffer; + grpc_slice_buffer read_slice_buffer; grpc_slice_buffer_stream read_stream; /** Receive closures are chained: we inject this closure as the on_done_recv @@ -162,9 +162,9 @@ static grpc_mdelem *server_filter(void *user_data, grpc_mdelem *md) { /* Retrieve the payload from the value of the 'grpc-internal-payload-bin' header field */ calld->seen_payload_bin = 1; - gpr_slice_buffer_init(&calld->read_slice_buffer); - gpr_slice_buffer_add(&calld->read_slice_buffer, - gpr_slice_ref(md->value->slice)); + grpc_slice_buffer_init(&calld->read_slice_buffer); + grpc_slice_buffer_add(&calld->read_slice_buffer, + grpc_slice_ref(md->value->slice)); grpc_slice_buffer_stream_init(&calld->read_stream, &calld->read_slice_buffer, 0); return NULL; diff --git a/src/core/lib/channel/message_size_filter.c b/src/core/lib/channel/message_size_filter.c index b8b2546035..e25ca17646 100644 --- a/src/core/lib/channel/message_size_filter.c +++ b/src/core/lib/channel/message_size_filter.c @@ -141,7 +141,7 @@ static void start_transport_stream_op(grpc_exec_ctx* exec_ctx, char* message_string; gpr_asprintf(&message_string, "Sent message larger than max (%u vs. %d)", op->send_message->length, calld->max_send_size); - gpr_slice message = gpr_slice_from_copied_string(message_string); + grpc_slice message = grpc_slice_from_copied_string(message_string); gpr_free(message_string); grpc_call_element_send_close_with_message( exec_ctx, elem, GRPC_STATUS_INVALID_ARGUMENT, &message); diff --git a/src/core/lib/compression/message_compress.c b/src/core/lib/compression/message_compress.c index cbe0b5a285..501cb8be69 100644 --- a/src/core/lib/compression/message_compress.c +++ b/src/core/lib/compression/message_compress.c @@ -42,13 +42,13 @@ #define OUTPUT_BLOCK_SIZE 1024 -static int zlib_body(z_stream* zs, gpr_slice_buffer* input, - gpr_slice_buffer* output, +static int zlib_body(z_stream* zs, grpc_slice_buffer* input, + grpc_slice_buffer* output, int (*flate)(z_stream* zs, int flush)) { int r; int flush; size_t i; - gpr_slice outbuf = gpr_slice_malloc(OUTPUT_BLOCK_SIZE); + grpc_slice outbuf = grpc_slice_malloc(OUTPUT_BLOCK_SIZE); const uInt uint_max = ~(uInt)0; GPR_ASSERT(GPR_SLICE_LENGTH(outbuf) <= uint_max); @@ -62,8 +62,8 @@ static int zlib_body(z_stream* zs, gpr_slice_buffer* input, zs->next_in = GPR_SLICE_START_PTR(input->slices[i]); do { if (zs->avail_out == 0) { - gpr_slice_buffer_add_indexed(output, outbuf); - outbuf = gpr_slice_malloc(OUTPUT_BLOCK_SIZE); + grpc_slice_buffer_add_indexed(output, outbuf); + outbuf = grpc_slice_malloc(OUTPUT_BLOCK_SIZE); GPR_ASSERT(GPR_SLICE_LENGTH(outbuf) <= uint_max); zs->avail_out = (uInt)GPR_SLICE_LENGTH(outbuf); zs->next_out = GPR_SLICE_START_PTR(outbuf); @@ -82,12 +82,12 @@ static int zlib_body(z_stream* zs, gpr_slice_buffer* input, GPR_ASSERT(outbuf.refcount); outbuf.data.refcounted.length -= zs->avail_out; - gpr_slice_buffer_add_indexed(output, outbuf); + grpc_slice_buffer_add_indexed(output, outbuf); return 1; error: - gpr_slice_unref(outbuf); + grpc_slice_unref(outbuf); return 0; } @@ -97,7 +97,7 @@ static void* zalloc_gpr(void* opaque, unsigned int items, unsigned int size) { static void zfree_gpr(void* opaque, void* address) { gpr_free(address); } -static int zlib_compress(gpr_slice_buffer* input, gpr_slice_buffer* output, +static int zlib_compress(grpc_slice_buffer* input, grpc_slice_buffer* output, int gzip) { z_stream zs; int r; @@ -113,7 +113,7 @@ static int zlib_compress(gpr_slice_buffer* input, gpr_slice_buffer* output, r = zlib_body(&zs, input, output, deflate) && output->length < input->length; if (!r) { for (i = count_before; i < output->count; i++) { - gpr_slice_unref(output->slices[i]); + grpc_slice_unref(output->slices[i]); } output->count = count_before; output->length = length_before; @@ -122,7 +122,7 @@ static int zlib_compress(gpr_slice_buffer* input, gpr_slice_buffer* output, return r; } -static int zlib_decompress(gpr_slice_buffer* input, gpr_slice_buffer* output, +static int zlib_decompress(grpc_slice_buffer* input, grpc_slice_buffer* output, int gzip) { z_stream zs; int r; @@ -137,7 +137,7 @@ static int zlib_decompress(gpr_slice_buffer* input, gpr_slice_buffer* output, r = zlib_body(&zs, input, output, inflate); if (!r) { for (i = count_before; i < output->count; i++) { - gpr_slice_unref(output->slices[i]); + grpc_slice_unref(output->slices[i]); } output->count = count_before; output->length = length_before; @@ -146,16 +146,16 @@ static int zlib_decompress(gpr_slice_buffer* input, gpr_slice_buffer* output, return r; } -static int copy(gpr_slice_buffer* input, gpr_slice_buffer* output) { +static int copy(grpc_slice_buffer* input, grpc_slice_buffer* output) { size_t i; for (i = 0; i < input->count; i++) { - gpr_slice_buffer_add(output, gpr_slice_ref(input->slices[i])); + grpc_slice_buffer_add(output, grpc_slice_ref(input->slices[i])); } return 1; } static int compress_inner(grpc_compression_algorithm algorithm, - gpr_slice_buffer* input, gpr_slice_buffer* output) { + grpc_slice_buffer* input, grpc_slice_buffer* output) { switch (algorithm) { case GRPC_COMPRESS_NONE: /* the fallback path always needs to be send uncompressed: we simply @@ -173,7 +173,7 @@ static int compress_inner(grpc_compression_algorithm algorithm, } int grpc_msg_compress(grpc_compression_algorithm algorithm, - gpr_slice_buffer* input, gpr_slice_buffer* output) { + grpc_slice_buffer* input, grpc_slice_buffer* output) { if (!compress_inner(algorithm, input, output)) { copy(input, output); return 0; @@ -182,7 +182,7 @@ int grpc_msg_compress(grpc_compression_algorithm algorithm, } int grpc_msg_decompress(grpc_compression_algorithm algorithm, - gpr_slice_buffer* input, gpr_slice_buffer* output) { + grpc_slice_buffer* input, grpc_slice_buffer* output) { switch (algorithm) { case GRPC_COMPRESS_NONE: return copy(input, output); diff --git a/src/core/lib/compression/message_compress.h b/src/core/lib/compression/message_compress.h index c69eaaf006..d28b5a36b3 100644 --- a/src/core/lib/compression/message_compress.h +++ b/src/core/lib/compression/message_compress.h @@ -41,12 +41,12 @@ On success, appends compressed slices to output and returns 1. On failure, appends uncompressed slices to output and returns 0. */ int grpc_msg_compress(grpc_compression_algorithm algorithm, - gpr_slice_buffer* input, gpr_slice_buffer* output); + grpc_slice_buffer* input, grpc_slice_buffer* output); /* decompress 'input' to 'output' using 'algorithm'. On success, appends slices to output and returns 1. On failure, output is unchanged, and returns 0. */ int grpc_msg_decompress(grpc_compression_algorithm algorithm, - gpr_slice_buffer* input, gpr_slice_buffer* output); + grpc_slice_buffer* input, grpc_slice_buffer* output); #endif /* GRPC_CORE_LIB_COMPRESSION_MESSAGE_COMPRESS_H */ diff --git a/src/core/lib/http/format_request.c b/src/core/lib/http/format_request.c index e818b70113..03f705ee97 100644 --- a/src/core/lib/http/format_request.c +++ b/src/core/lib/http/format_request.c @@ -65,7 +65,7 @@ static void fill_common_header(const grpc_httpcli_request *request, } } -gpr_slice grpc_httpcli_format_get_request(const grpc_httpcli_request *request) { +grpc_slice grpc_httpcli_format_get_request(const grpc_httpcli_request *request) { gpr_strvec out; char *flat; size_t flat_len; @@ -78,10 +78,10 @@ gpr_slice grpc_httpcli_format_get_request(const grpc_httpcli_request *request) { flat = gpr_strvec_flatten(&out, &flat_len); gpr_strvec_destroy(&out); - return gpr_slice_new(flat, flat_len, gpr_free); + return grpc_slice_new(flat, flat_len, gpr_free); } -gpr_slice grpc_httpcli_format_post_request(const grpc_httpcli_request *request, +grpc_slice grpc_httpcli_format_post_request(const grpc_httpcli_request *request, const char *body_bytes, size_t body_size) { gpr_strvec out; @@ -117,10 +117,10 @@ gpr_slice grpc_httpcli_format_post_request(const grpc_httpcli_request *request, out_len += body_size; } - return gpr_slice_new(tmp, out_len, gpr_free); + return grpc_slice_new(tmp, out_len, gpr_free); } -gpr_slice grpc_httpcli_format_connect_request( +grpc_slice grpc_httpcli_format_connect_request( const grpc_httpcli_request *request) { gpr_strvec out; gpr_strvec_init(&out); @@ -130,5 +130,5 @@ gpr_slice grpc_httpcli_format_connect_request( size_t flat_len; char *flat = gpr_strvec_flatten(&out, &flat_len); gpr_strvec_destroy(&out); - return gpr_slice_new(flat, flat_len, gpr_free); + return grpc_slice_new(flat, flat_len, gpr_free); } diff --git a/src/core/lib/http/format_request.h b/src/core/lib/http/format_request.h index 7abd55f2f7..939401be48 100644 --- a/src/core/lib/http/format_request.h +++ b/src/core/lib/http/format_request.h @@ -37,11 +37,11 @@ #include #include "src/core/lib/http/httpcli.h" -gpr_slice grpc_httpcli_format_get_request(const grpc_httpcli_request *request); -gpr_slice grpc_httpcli_format_post_request(const grpc_httpcli_request *request, +grpc_slice grpc_httpcli_format_get_request(const grpc_httpcli_request *request); +grpc_slice grpc_httpcli_format_post_request(const grpc_httpcli_request *request, const char *body_bytes, size_t body_size); -gpr_slice grpc_httpcli_format_connect_request( +grpc_slice grpc_httpcli_format_connect_request( const grpc_httpcli_request *request); #endif /* GRPC_CORE_LIB_HTTP_FORMAT_REQUEST_H */ diff --git a/src/core/lib/http/httpcli.c b/src/core/lib/http/httpcli.c index 26baae1eab..d52c140405 100644 --- a/src/core/lib/http/httpcli.c +++ b/src/core/lib/http/httpcli.c @@ -51,7 +51,7 @@ #include "src/core/lib/support/string.h" typedef struct { - gpr_slice request_text; + grpc_slice request_text; grpc_http_parser parser; grpc_resolved_addresses *addresses; size_t next_address; @@ -65,8 +65,8 @@ typedef struct { grpc_httpcli_context *context; grpc_polling_entity *pollent; grpc_iomgr_object iomgr_obj; - gpr_slice_buffer incoming; - gpr_slice_buffer outgoing; + grpc_slice_buffer incoming; + grpc_slice_buffer outgoing; grpc_closure on_read; grpc_closure done_write; grpc_closure connected; @@ -112,12 +112,12 @@ static void finish(grpc_exec_ctx *exec_ctx, internal_request *req, if (req->ep != NULL) { grpc_endpoint_destroy(exec_ctx, req->ep); } - gpr_slice_unref(req->request_text); + grpc_slice_unref(req->request_text); gpr_free(req->host); gpr_free(req->ssl_host_override); grpc_iomgr_unregister_object(&req->iomgr_obj); - gpr_slice_buffer_destroy(&req->incoming); - gpr_slice_buffer_destroy(&req->outgoing); + grpc_slice_buffer_destroy(&req->incoming); + grpc_slice_buffer_destroy(&req->outgoing); GRPC_ERROR_UNREF(req->overall_error); grpc_resource_quota_internal_unref(exec_ctx, req->resource_quota); gpr_free(req); @@ -179,8 +179,8 @@ static void done_write(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { } static void start_write(grpc_exec_ctx *exec_ctx, internal_request *req) { - gpr_slice_ref(req->request_text); - gpr_slice_buffer_add(&req->outgoing, req->request_text); + grpc_slice_ref(req->request_text); + grpc_slice_buffer_add(&req->outgoing, req->request_text); grpc_endpoint_write(exec_ctx, req->ep, &req->outgoing, &req->done_write); } @@ -254,7 +254,7 @@ static void internal_request_begin(grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request, gpr_timespec deadline, grpc_closure *on_done, grpc_httpcli_response *response, - const char *name, gpr_slice request_text) { + const char *name, grpc_slice request_text) { internal_request *req = gpr_malloc(sizeof(internal_request)); memset(req, 0, sizeof(*req)); req->request_text = request_text; @@ -269,8 +269,8 @@ static void internal_request_begin(grpc_exec_ctx *exec_ctx, req->resource_quota = grpc_resource_quota_internal_ref(resource_quota); grpc_closure_init(&req->on_read, on_read, req); grpc_closure_init(&req->done_write, done_write, req); - gpr_slice_buffer_init(&req->incoming); - gpr_slice_buffer_init(&req->outgoing); + grpc_slice_buffer_init(&req->incoming); + grpc_slice_buffer_init(&req->outgoing); grpc_iomgr_register_object(&req->iomgr_obj, name); req->host = gpr_strdup(request->host); req->ssl_host_override = gpr_strdup(request->ssl_host_override); diff --git a/src/core/lib/http/httpcli_security_connector.c b/src/core/lib/http/httpcli_security_connector.c index 0006e809a6..24d264c32a 100644 --- a/src/core/lib/http/httpcli_security_connector.c +++ b/src/core/lib/http/httpcli_security_connector.c @@ -61,7 +61,7 @@ static void httpcli_ssl_destroy(grpc_security_connector *sc) { static void httpcli_ssl_do_handshake(grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, grpc_endpoint *nonsecure_endpoint, - gpr_slice_buffer *read_buffer, + grpc_slice_buffer *read_buffer, gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data) { diff --git a/src/core/lib/http/parser.c b/src/core/lib/http/parser.c index be9e9b6b63..14abb1da69 100644 --- a/src/core/lib/http/parser.c +++ b/src/core/lib/http/parser.c @@ -333,7 +333,7 @@ void grpc_http_response_destroy(grpc_http_response *response) { gpr_free(response->hdrs); } -grpc_error *grpc_http_parser_parse(grpc_http_parser *parser, gpr_slice slice, +grpc_error *grpc_http_parser_parse(grpc_http_parser *parser, grpc_slice slice, size_t *start_of_body) { for (size_t i = 0; i < GPR_SLICE_LENGTH(slice); i++) { bool found_body_start = false; diff --git a/src/core/lib/http/parser.h b/src/core/lib/http/parser.h index fab42979cd..102ffba05d 100644 --- a/src/core/lib/http/parser.h +++ b/src/core/lib/http/parser.h @@ -114,7 +114,7 @@ void grpc_http_parser_init(grpc_http_parser *parser, grpc_http_type type, void grpc_http_parser_destroy(grpc_http_parser *parser); /* Sets \a start_of_body to the offset in \a slice of the start of the body. */ -grpc_error *grpc_http_parser_parse(grpc_http_parser *parser, gpr_slice slice, +grpc_error *grpc_http_parser_parse(grpc_http_parser *parser, grpc_slice slice, size_t *start_of_body); grpc_error *grpc_http_parser_eof(grpc_http_parser *parser); diff --git a/src/core/lib/iomgr/endpoint.c b/src/core/lib/iomgr/endpoint.c index 74fa9c45df..a4b6668276 100644 --- a/src/core/lib/iomgr/endpoint.c +++ b/src/core/lib/iomgr/endpoint.c @@ -34,12 +34,12 @@ #include "src/core/lib/iomgr/endpoint.h" void grpc_endpoint_read(grpc_exec_ctx* exec_ctx, grpc_endpoint* ep, - gpr_slice_buffer* slices, grpc_closure* cb) { + grpc_slice_buffer* slices, grpc_closure* cb) { ep->vtable->read(exec_ctx, ep, slices, cb); } void grpc_endpoint_write(grpc_exec_ctx* exec_ctx, grpc_endpoint* ep, - gpr_slice_buffer* slices, grpc_closure* cb) { + grpc_slice_buffer* slices, grpc_closure* cb) { ep->vtable->write(exec_ctx, ep, slices, cb); } diff --git a/src/core/lib/iomgr/endpoint.h b/src/core/lib/iomgr/endpoint.h index 0ac5486ff5..d05998ec85 100644 --- a/src/core/lib/iomgr/endpoint.h +++ b/src/core/lib/iomgr/endpoint.h @@ -49,9 +49,9 @@ typedef struct grpc_endpoint_vtable grpc_endpoint_vtable; struct grpc_endpoint_vtable { void (*read)(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, - gpr_slice_buffer *slices, grpc_closure *cb); + grpc_slice_buffer *slices, grpc_closure *cb); void (*write)(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, - gpr_slice_buffer *slices, grpc_closure *cb); + grpc_slice_buffer *slices, grpc_closure *cb); grpc_workqueue *(*get_workqueue)(grpc_endpoint *ep); void (*add_to_pollset)(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, grpc_pollset *pollset); @@ -69,7 +69,7 @@ struct grpc_endpoint_vtable { Valid slices may be placed into \a slices even when the callback is invoked with error != GRPC_ERROR_NONE. */ void grpc_endpoint_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, - gpr_slice_buffer *slices, grpc_closure *cb); + grpc_slice_buffer *slices, grpc_closure *cb); char *grpc_endpoint_get_peer(grpc_endpoint *ep); @@ -87,7 +87,7 @@ grpc_workqueue *grpc_endpoint_get_workqueue(grpc_endpoint *ep); it is a valid slice buffer. */ void grpc_endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, - gpr_slice_buffer *slices, grpc_closure *cb); + grpc_slice_buffer *slices, grpc_closure *cb); /* Causes any pending and future read/write callbacks to run immediately with success==0 */ diff --git a/src/core/lib/iomgr/load_file.c b/src/core/lib/iomgr/load_file.c index b62ecbc534..217bc5da59 100644 --- a/src/core/lib/iomgr/load_file.c +++ b/src/core/lib/iomgr/load_file.c @@ -44,10 +44,10 @@ #include "src/core/lib/support/string.h" grpc_error *grpc_load_file(const char *filename, int add_null_terminator, - gpr_slice *output) { + grpc_slice *output) { unsigned char *contents = NULL; size_t contents_size = 0; - gpr_slice result = gpr_empty_slice(); + grpc_slice result = gpr_empty_slice(); FILE *file; size_t bytes_read = 0; grpc_error *error = GRPC_ERROR_NONE; @@ -72,7 +72,7 @@ grpc_error *grpc_load_file(const char *filename, int add_null_terminator, if (add_null_terminator) { contents[contents_size++] = 0; } - result = gpr_slice_new(contents, contents_size, gpr_free); + result = grpc_slice_new(contents, contents_size, gpr_free); end: *output = result; diff --git a/src/core/lib/iomgr/load_file.h b/src/core/lib/iomgr/load_file.h index 9aac2225d1..31cec92cb1 100644 --- a/src/core/lib/iomgr/load_file.h +++ b/src/core/lib/iomgr/load_file.h @@ -47,7 +47,7 @@ extern "C" { /* Loads the content of a file into a slice. add_null_terminator will add a NULL terminator if non-zero. */ grpc_error *grpc_load_file(const char *filename, int add_null_terminator, - gpr_slice *slice); + grpc_slice *slice); #ifdef __cplusplus } diff --git a/src/core/lib/iomgr/resource_quota.c b/src/core/lib/iomgr/resource_quota.c index 4f0d16ca7e..f047f45b43 100644 --- a/src/core/lib/iomgr/resource_quota.c +++ b/src/core/lib/iomgr/resource_quota.c @@ -269,7 +269,7 @@ static bool rq_reclaim(grpc_exec_ctx *exec_ctx, */ typedef struct { - gpr_slice_refcount base; + grpc_slice_refcount base; gpr_refcount refs; grpc_resource_user *resource_user; size_t size; @@ -286,7 +286,7 @@ static void ru_slice_unref(void *p) { /* TODO(ctiller): this is dangerous, but I think safe for now: we have no guarantee here that we're at a safe point for creating an execution context, but we have no way of writing this code otherwise. - In the future: consider lifting gpr_slice to grpc, and offering an + In the future: consider lifting grpc_slice to grpc, and offering an internal_{ref,unref} pair that is execution context aware. Alternatively, make exec_ctx be thread local and 'do the right thing' (whatever that @@ -299,7 +299,7 @@ static void ru_slice_unref(void *p) { } } -static gpr_slice ru_slice_create(grpc_resource_user *resource_user, +static grpc_slice ru_slice_create(grpc_resource_user *resource_user, size_t size) { ru_slice_refcount *rc = gpr_malloc(sizeof(ru_slice_refcount) + size); rc->base.ref = ru_slice_ref; @@ -307,7 +307,7 @@ static gpr_slice ru_slice_create(grpc_resource_user *resource_user, gpr_ref_init(&rc->refs, 1); rc->resource_user = resource_user; rc->size = size; - gpr_slice slice; + grpc_slice slice; slice.refcount = &rc->base; slice.data.refcounted.bytes = (uint8_t *)(rc + 1); slice.data.refcounted.length = size; @@ -394,7 +394,7 @@ static void ru_allocated_slices(grpc_exec_ctx *exec_ctx, void *arg, grpc_resource_user_slice_allocator *slice_allocator = arg; if (error == GRPC_ERROR_NONE) { for (size_t i = 0; i < slice_allocator->count; i++) { - gpr_slice_buffer_add_indexed( + grpc_slice_buffer_add_indexed( slice_allocator->dest, ru_slice_create(slice_allocator->resource_user, slice_allocator->length)); } @@ -711,7 +711,7 @@ void grpc_resource_user_slice_allocator_init( void grpc_resource_user_alloc_slices( grpc_exec_ctx *exec_ctx, grpc_resource_user_slice_allocator *slice_allocator, size_t length, - size_t count, gpr_slice_buffer *dest) { + size_t count, grpc_slice_buffer *dest) { slice_allocator->length = length; slice_allocator->count = count; slice_allocator->dest = dest; diff --git a/src/core/lib/iomgr/resource_quota.h b/src/core/lib/iomgr/resource_quota.h index c15cb68310..f644e5bf4d 100644 --- a/src/core/lib/iomgr/resource_quota.h +++ b/src/core/lib/iomgr/resource_quota.h @@ -202,7 +202,7 @@ typedef struct grpc_resource_user_slice_allocator { /* Number of slices to allocate on the current request */ size_t count; /* Destination for slices to allocate on the current request */ - gpr_slice_buffer *dest; + grpc_slice_buffer *dest; /* Parent resource user */ grpc_resource_user *resource_user; } grpc_resource_user_slice_allocator; @@ -218,6 +218,6 @@ void grpc_resource_user_slice_allocator_init( void grpc_resource_user_alloc_slices( grpc_exec_ctx *exec_ctx, grpc_resource_user_slice_allocator *slice_allocator, size_t length, - size_t count, gpr_slice_buffer *dest); + size_t count, grpc_slice_buffer *dest); #endif /* GRPC_CORE_LIB_IOMGR_RESOURCE_QUOTA_H */ diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 27b6677545..909237d84d 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -83,10 +83,10 @@ typedef struct { gpr_atm shutdown_count; /* garbage after the last read */ - gpr_slice_buffer last_read_buffer; + grpc_slice_buffer last_read_buffer; - gpr_slice_buffer *incoming_buffer; - gpr_slice_buffer *outgoing_buffer; + grpc_slice_buffer *incoming_buffer; + grpc_slice_buffer *outgoing_buffer; /** slice within outgoing_buffer to write next */ size_t outgoing_slice_idx; /** byte within outgoing_buffer->slices[outgoing_slice_idx] to write next */ @@ -130,7 +130,7 @@ static void tcp_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { static void tcp_free(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { grpc_fd_orphan(exec_ctx, tcp->em_fd, tcp->release_fd_cb, tcp->release_fd, "tcp_unref_orphan"); - gpr_slice_buffer_destroy(&tcp->last_read_buffer); + grpc_slice_buffer_destroy(&tcp->last_read_buffer); grpc_resource_user_destroy(exec_ctx, &tcp->resource_user); gpr_free(tcp->peer_string); gpr_free(tcp); @@ -177,7 +177,7 @@ static void tcp_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_network_status_unregister_endpoint(ep); grpc_tcp *tcp = (grpc_tcp *)ep; tcp_maybe_shutdown_resource_user(exec_ctx, tcp); - gpr_slice_buffer_reset_and_unref(&tcp->last_read_buffer); + grpc_slice_buffer_reset_and_unref(&tcp->last_read_buffer); TCP_UNREF(exec_ctx, tcp, "destroy"); } @@ -244,19 +244,19 @@ static void tcp_do_read(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { /* We've consumed the edge, request a new one */ grpc_fd_notify_on_read(exec_ctx, tcp->em_fd, &tcp->read_closure); } else { - gpr_slice_buffer_reset_and_unref(tcp->incoming_buffer); + grpc_slice_buffer_reset_and_unref(tcp->incoming_buffer); call_read_cb(exec_ctx, tcp, GRPC_OS_ERROR(errno, "recvmsg")); TCP_UNREF(exec_ctx, tcp, "read"); } } else if (read_bytes == 0) { /* 0 read size ==> end of stream */ - gpr_slice_buffer_reset_and_unref(tcp->incoming_buffer); + grpc_slice_buffer_reset_and_unref(tcp->incoming_buffer); call_read_cb(exec_ctx, tcp, GRPC_ERROR_CREATE("Socket closed")); TCP_UNREF(exec_ctx, tcp, "read"); } else { GPR_ASSERT((size_t)read_bytes <= tcp->incoming_buffer->length); if ((size_t)read_bytes < tcp->incoming_buffer->length) { - gpr_slice_buffer_trim_end( + grpc_slice_buffer_trim_end( tcp->incoming_buffer, tcp->incoming_buffer->length - (size_t)read_bytes, &tcp->last_read_buffer); @@ -275,8 +275,8 @@ static void tcp_read_allocation_done(grpc_exec_ctx *exec_ctx, void *tcpp, grpc_error *error) { grpc_tcp *tcp = tcpp; if (error != GRPC_ERROR_NONE) { - gpr_slice_buffer_reset_and_unref(tcp->incoming_buffer); - gpr_slice_buffer_reset_and_unref(&tcp->last_read_buffer); + grpc_slice_buffer_reset_and_unref(tcp->incoming_buffer); + grpc_slice_buffer_reset_and_unref(&tcp->last_read_buffer); call_read_cb(exec_ctx, tcp, GRPC_ERROR_REF(error)); TCP_UNREF(exec_ctx, tcp, "read"); } else { @@ -301,8 +301,8 @@ static void tcp_handle_read(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, GPR_ASSERT(!tcp->finished_edge); if (error != GRPC_ERROR_NONE) { - gpr_slice_buffer_reset_and_unref(tcp->incoming_buffer); - gpr_slice_buffer_reset_and_unref(&tcp->last_read_buffer); + grpc_slice_buffer_reset_and_unref(tcp->incoming_buffer); + grpc_slice_buffer_reset_and_unref(&tcp->last_read_buffer); call_read_cb(exec_ctx, tcp, GRPC_ERROR_REF(error)); TCP_UNREF(exec_ctx, tcp, "read"); } else { @@ -311,13 +311,13 @@ static void tcp_handle_read(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, } static void tcp_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, - gpr_slice_buffer *incoming_buffer, grpc_closure *cb) { + grpc_slice_buffer *incoming_buffer, grpc_closure *cb) { grpc_tcp *tcp = (grpc_tcp *)ep; GPR_ASSERT(tcp->read_cb == NULL); tcp->read_cb = cb; tcp->incoming_buffer = incoming_buffer; - gpr_slice_buffer_reset_and_unref(incoming_buffer); - gpr_slice_buffer_swap(incoming_buffer, &tcp->last_read_buffer); + grpc_slice_buffer_reset_and_unref(incoming_buffer); + grpc_slice_buffer_swap(incoming_buffer, &tcp->last_read_buffer); TCP_REF(tcp, "read"); if (tcp->finished_edge) { tcp->finished_edge = false; @@ -442,7 +442,7 @@ static void tcp_handle_write(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, } static void tcp_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, - gpr_slice_buffer *buf, grpc_closure *cb) { + grpc_slice_buffer *buf, grpc_closure *cb) { grpc_tcp *tcp = (grpc_tcp *)ep; grpc_error *error = GRPC_ERROR_NONE; @@ -552,7 +552,7 @@ grpc_endpoint *grpc_tcp_create(grpc_fd *em_fd, tcp->read_closure.cb_arg = tcp; tcp->write_closure.cb = tcp_handle_write; tcp->write_closure.cb_arg = tcp; - gpr_slice_buffer_init(&tcp->last_read_buffer); + grpc_slice_buffer_init(&tcp->last_read_buffer); grpc_resource_user_init(&tcp->resource_user, resource_quota, peer_string); grpc_resource_user_slice_allocator_init(&tcp->slice_allocator, &tcp->resource_user, @@ -577,7 +577,7 @@ void grpc_tcp_destroy_and_release_fd(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, tcp->release_fd = fd; tcp->release_fd_cb = done; tcp_maybe_shutdown_resource_user(exec_ctx, tcp); - gpr_slice_buffer_reset_and_unref(&tcp->last_read_buffer); + grpc_slice_buffer_reset_and_unref(&tcp->last_read_buffer); TCP_UNREF(exec_ctx, tcp, "destroy"); } diff --git a/src/core/lib/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.c index 448a72671c..6f63f80021 100644 --- a/src/core/lib/iomgr/tcp_windows.c +++ b/src/core/lib/iomgr/tcp_windows.c @@ -105,9 +105,9 @@ typedef struct grpc_tcp { grpc_closure *read_cb; grpc_closure *write_cb; - gpr_slice read_slice; - gpr_slice_buffer *write_slices; - gpr_slice_buffer *read_slices; + grpc_slice read_slice; + grpc_slice_buffer *write_slices; + grpc_slice_buffer *read_slices; /* The IO Completion Port runs from another thread. We need some mechanism to protect ourselves when requesting a shutdown. */ @@ -160,7 +160,7 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *tcpp, grpc_error *error) { grpc_tcp *tcp = tcpp; grpc_closure *cb = tcp->read_cb; grpc_winsocket *socket = tcp->socket; - gpr_slice sub; + grpc_slice sub; grpc_winsocket_callback_info *info = &socket->read_info; GRPC_ERROR_REF(error); @@ -170,13 +170,13 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *tcpp, grpc_error *error) { char *utf8_message = gpr_format_message(info->wsa_error); error = GRPC_ERROR_CREATE(utf8_message); gpr_free(utf8_message); - gpr_slice_unref(tcp->read_slice); + grpc_slice_unref(tcp->read_slice); } else { if (info->bytes_transfered != 0 && !tcp->shutting_down) { - sub = gpr_slice_sub_no_ref(tcp->read_slice, 0, info->bytes_transfered); - gpr_slice_buffer_add(tcp->read_slices, sub); + sub = grpc_slice_sub_no_ref(tcp->read_slice, 0, info->bytes_transfered); + grpc_slice_buffer_add(tcp->read_slices, sub); } else { - gpr_slice_unref(tcp->read_slice); + grpc_slice_unref(tcp->read_slice); error = GRPC_ERROR_CREATE("End of TCP stream"); } } @@ -188,7 +188,7 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *tcpp, grpc_error *error) { } static void win_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, - gpr_slice_buffer *read_slices, grpc_closure *cb) { + grpc_slice_buffer *read_slices, grpc_closure *cb) { grpc_tcp *tcp = (grpc_tcp *)ep; grpc_winsocket *handle = tcp->socket; grpc_winsocket_callback_info *info = &handle->read_info; @@ -205,9 +205,9 @@ static void win_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, tcp->read_cb = cb; tcp->read_slices = read_slices; - gpr_slice_buffer_reset_and_unref(read_slices); + grpc_slice_buffer_reset_and_unref(read_slices); - tcp->read_slice = gpr_slice_malloc(8192); + tcp->read_slice = grpc_slice_malloc(8192); buffer.len = (ULONG)GPR_SLICE_LENGTH( tcp->read_slice); // we know slice size fits in 32bit. @@ -273,7 +273,7 @@ static void on_write(grpc_exec_ctx *exec_ctx, void *tcpp, grpc_error *error) { /* Initiates a write. */ static void win_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, - gpr_slice_buffer *slices, grpc_closure *cb) { + grpc_slice_buffer *slices, grpc_closure *cb) { grpc_tcp *tcp = (grpc_tcp *)ep; grpc_winsocket *socket = tcp->socket; grpc_winsocket_callback_info *info = &socket->write_info; diff --git a/src/core/lib/security/credentials/credentials.h b/src/core/lib/security/credentials/credentials.h index 6fb5b5b15a..85b3bc5350 100644 --- a/src/core/lib/security/credentials/credentials.h +++ b/src/core/lib/security/credentials/credentials.h @@ -141,8 +141,8 @@ grpc_channel_credentials_duplicate_without_call_credentials( /* --- grpc_credentials_md. --- */ typedef struct { - gpr_slice key; - gpr_slice value; + grpc_slice key; + grpc_slice value; } grpc_credentials_md; typedef struct { @@ -157,7 +157,7 @@ grpc_credentials_md_store *grpc_credentials_md_store_create( /* Will ref key and value. */ void grpc_credentials_md_store_add(grpc_credentials_md_store *store, - gpr_slice key, gpr_slice value); + grpc_slice key, grpc_slice value); void grpc_credentials_md_store_add_cstrings(grpc_credentials_md_store *store, const char *key, const char *value); grpc_credentials_md_store *grpc_credentials_md_store_ref( diff --git a/src/core/lib/security/credentials/credentials_metadata.c b/src/core/lib/security/credentials/credentials_metadata.c index 6a352aab3a..e6cb567734 100644 --- a/src/core/lib/security/credentials/credentials_metadata.c +++ b/src/core/lib/security/credentials/credentials_metadata.c @@ -59,11 +59,11 @@ grpc_credentials_md_store *grpc_credentials_md_store_create( } void grpc_credentials_md_store_add(grpc_credentials_md_store *store, - gpr_slice key, gpr_slice value) { + grpc_slice key, grpc_slice value) { if (store == NULL) return; store_ensure_capacity(store); - store->entries[store->num_entries].key = gpr_slice_ref(key); - store->entries[store->num_entries].value = gpr_slice_ref(value); + store->entries[store->num_entries].key = grpc_slice_ref(key); + store->entries[store->num_entries].value = grpc_slice_ref(value); store->num_entries++; } @@ -72,9 +72,9 @@ void grpc_credentials_md_store_add_cstrings(grpc_credentials_md_store *store, const char *value) { if (store == NULL) return; store_ensure_capacity(store); - store->entries[store->num_entries].key = gpr_slice_from_copied_string(key); + store->entries[store->num_entries].key = grpc_slice_from_copied_string(key); store->entries[store->num_entries].value = - gpr_slice_from_copied_string(value); + grpc_slice_from_copied_string(value); store->num_entries++; } @@ -91,8 +91,8 @@ void grpc_credentials_md_store_unref(grpc_credentials_md_store *store) { if (store->entries != NULL) { size_t i; for (i = 0; i < store->num_entries; i++) { - gpr_slice_unref(store->entries[i].key); - gpr_slice_unref(store->entries[i].value); + grpc_slice_unref(store->entries[i].key); + grpc_slice_unref(store->entries[i].value); } gpr_free(store->entries); } diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.c b/src/core/lib/security/credentials/google_default/google_default_credentials.c index cb5ba554b0..b92f29a0d8 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.c +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.c @@ -174,7 +174,7 @@ static grpc_error *create_default_creds_from_path( grpc_auth_json_key key; grpc_auth_refresh_token token; grpc_call_credentials *result = NULL; - gpr_slice creds_data = gpr_empty_slice(); + grpc_slice creds_data = gpr_empty_slice(); grpc_error *error = GRPC_ERROR_NONE; if (creds_path == NULL) { error = GRPC_ERROR_CREATE("creds_path unset"); @@ -224,7 +224,7 @@ static grpc_error *create_default_creds_from_path( end: GPR_ASSERT((result == NULL) + (error == GRPC_ERROR_NONE) == 1); if (creds_path != NULL) gpr_free(creds_path); - gpr_slice_unref(creds_data); + grpc_slice_unref(creds_data); if (json != NULL) grpc_json_destroy(json); *creds = result; return error; diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.c b/src/core/lib/security/credentials/jwt/jwt_verifier.c index 43eb642515..9cb8cd64f6 100644 --- a/src/core/lib/security/credentials/jwt/jwt_verifier.c +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.c @@ -85,7 +85,7 @@ static const EVP_MD *evp_md_from_alg(const char *alg) { } static grpc_json *parse_json_part_from_jwt(const char *str, size_t len, - gpr_slice *buffer) { + grpc_slice *buffer) { grpc_json *json; *buffer = grpc_base64_decode_with_len(str, len, 1); @@ -96,7 +96,7 @@ static grpc_json *parse_json_part_from_jwt(const char *str, size_t len, json = grpc_json_parse_string_with_len((char *)GPR_SLICE_START_PTR(*buffer), GPR_SLICE_LENGTH(*buffer)); if (json == NULL) { - gpr_slice_unref(*buffer); + grpc_slice_unref(*buffer); gpr_log(GPR_ERROR, "JSON parsing error."); } return json; @@ -129,16 +129,16 @@ typedef struct { const char *kid; const char *typ; /* TODO(jboeuf): Add others as needed (jku, jwk, x5u, x5c and so on...). */ - gpr_slice buffer; + grpc_slice buffer; } jose_header; static void jose_header_destroy(jose_header *h) { - gpr_slice_unref(h->buffer); + grpc_slice_unref(h->buffer); gpr_free(h); } /* Takes ownership of json and buffer. */ -static jose_header *jose_header_from_json(grpc_json *json, gpr_slice buffer) { +static jose_header *jose_header_from_json(grpc_json *json, grpc_slice buffer) { grpc_json *cur; jose_header *h = gpr_malloc(sizeof(jose_header)); memset(h, 0, sizeof(jose_header)); @@ -190,12 +190,12 @@ struct grpc_jwt_claims { gpr_timespec nbf; grpc_json *json; - gpr_slice buffer; + grpc_slice buffer; }; void grpc_jwt_claims_destroy(grpc_jwt_claims *claims) { grpc_json_destroy(claims->json); - gpr_slice_unref(claims->buffer); + grpc_slice_unref(claims->buffer); gpr_free(claims); } @@ -240,7 +240,7 @@ gpr_timespec grpc_jwt_claims_not_before(const grpc_jwt_claims *claims) { } /* Takes ownership of json and buffer even in case of failure. */ -grpc_jwt_claims *grpc_jwt_claims_from_json(grpc_json *json, gpr_slice buffer) { +grpc_jwt_claims *grpc_jwt_claims_from_json(grpc_json *json, grpc_slice buffer) { grpc_json *cur; grpc_jwt_claims *claims = gpr_malloc(sizeof(grpc_jwt_claims)); memset(claims, 0, sizeof(grpc_jwt_claims)); @@ -333,8 +333,8 @@ typedef struct { jose_header *header; grpc_jwt_claims *claims; char *audience; - gpr_slice signature; - gpr_slice signed_data; + grpc_slice signature; + grpc_slice signed_data; void *user_data; grpc_jwt_verification_done_cb user_cb; grpc_http_response responses[HTTP_RESPONSE_COUNT]; @@ -343,7 +343,7 @@ typedef struct { /* Takes ownership of the header, claims and signature. */ static verifier_cb_ctx *verifier_cb_ctx_create( grpc_jwt_verifier *verifier, grpc_pollset *pollset, jose_header *header, - grpc_jwt_claims *claims, const char *audience, gpr_slice signature, + grpc_jwt_claims *claims, const char *audience, grpc_slice signature, const char *signed_jwt, size_t signed_jwt_len, void *user_data, grpc_jwt_verification_done_cb cb) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -355,7 +355,7 @@ static verifier_cb_ctx *verifier_cb_ctx_create( ctx->audience = gpr_strdup(audience); ctx->claims = claims; ctx->signature = signature; - ctx->signed_data = gpr_slice_from_copied_buffer(signed_jwt, signed_jwt_len); + ctx->signed_data = grpc_slice_from_copied_buffer(signed_jwt, signed_jwt_len); ctx->user_data = user_data; ctx->user_cb = cb; grpc_exec_ctx_finish(&exec_ctx); @@ -365,8 +365,8 @@ static verifier_cb_ctx *verifier_cb_ctx_create( void verifier_cb_ctx_destroy(verifier_cb_ctx *ctx) { if (ctx->audience != NULL) gpr_free(ctx->audience); if (ctx->claims != NULL) grpc_jwt_claims_destroy(ctx->claims); - gpr_slice_unref(ctx->signature); - gpr_slice_unref(ctx->signed_data); + grpc_slice_unref(ctx->signature); + grpc_slice_unref(ctx->signed_data); jose_header_destroy(ctx->header); for (size_t i = 0; i < HTTP_RESPONSE_COUNT; i++) { grpc_http_response_destroy(&ctx->responses[i]); @@ -449,7 +449,7 @@ end: static BIGNUM *bignum_from_base64(const char *b64) { BIGNUM *result = NULL; - gpr_slice bin; + grpc_slice bin; if (b64 == NULL) return NULL; bin = grpc_base64_decode(b64, 1); @@ -459,7 +459,7 @@ static BIGNUM *bignum_from_base64(const char *b64) { } result = BN_bin2bn(GPR_SLICE_START_PTR(bin), TSI_SIZE_AS_SIZE(GPR_SLICE_LENGTH(bin)), NULL); - gpr_slice_unref(bin); + grpc_slice_unref(bin); return result; } @@ -553,7 +553,7 @@ static EVP_PKEY *find_verification_key(const grpc_json *json, } static int verify_jwt_signature(EVP_PKEY *key, const char *alg, - gpr_slice signature, gpr_slice signed_data) { + grpc_slice signature, grpc_slice signed_data) { EVP_MD_CTX *md_ctx = EVP_MD_CTX_create(); const EVP_MD *md = evp_md_from_alg(alg); int result = 0; @@ -799,9 +799,9 @@ void grpc_jwt_verifier_verify(grpc_exec_ctx *exec_ctx, grpc_json *json; jose_header *header = NULL; grpc_jwt_claims *claims = NULL; - gpr_slice header_buffer; - gpr_slice claims_buffer; - gpr_slice signature; + grpc_slice header_buffer; + grpc_slice claims_buffer; + grpc_slice signature; size_t signed_jwt_len; const char *cur = jwt; diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.h b/src/core/lib/security/credentials/jwt/jwt_verifier.h index b0f6d1c240..e05a9f1824 100644 --- a/src/core/lib/security/credentials/jwt/jwt_verifier.h +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.h @@ -129,7 +129,7 @@ void grpc_jwt_verifier_verify(grpc_exec_ctx *exec_ctx, /* --- TESTING ONLY exposed functions. --- */ -grpc_jwt_claims *grpc_jwt_claims_from_json(grpc_json *json, gpr_slice buffer); +grpc_jwt_claims *grpc_jwt_claims_from_json(grpc_json *json, grpc_slice buffer); grpc_jwt_verifier_status grpc_jwt_claims_check(const grpc_jwt_claims *claims, const char *audience); diff --git a/src/core/lib/security/credentials/plugin/plugin_credentials.c b/src/core/lib/security/credentials/plugin/plugin_credentials.c index 905de3723e..61c10862da 100644 --- a/src/core/lib/security/credentials/plugin/plugin_credentials.c +++ b/src/core/lib/security/credentials/plugin/plugin_credentials.c @@ -93,15 +93,15 @@ static void plugin_md_request_metadata_ready(void *request, } else if (num_md > 0) { md_array = gpr_malloc(num_md * sizeof(grpc_credentials_md)); for (i = 0; i < num_md; i++) { - md_array[i].key = gpr_slice_from_copied_string(md[i].key); + md_array[i].key = grpc_slice_from_copied_string(md[i].key); md_array[i].value = - gpr_slice_from_copied_buffer(md[i].value, md[i].value_length); + grpc_slice_from_copied_buffer(md[i].value, md[i].value_length); } r->cb(&exec_ctx, r->user_data, md_array, num_md, GRPC_CREDENTIALS_OK, NULL); for (i = 0; i < num_md; i++) { - gpr_slice_unref(md_array[i].key); - gpr_slice_unref(md_array[i].value); + grpc_slice_unref(md_array[i].key); + grpc_slice_unref(md_array[i].value); } gpr_free(md_array); } diff --git a/src/core/lib/security/transport/client_auth_filter.c b/src/core/lib/security/transport/client_auth_filter.c index b366d1410f..cd4769ea10 100644 --- a/src/core/lib/security/transport/client_auth_filter.c +++ b/src/core/lib/security/transport/client_auth_filter.c @@ -92,7 +92,7 @@ static void bubble_up_error(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_status_code status, const char *error_msg) { call_data *calld = elem->call_data; gpr_log(GPR_ERROR, "Client side authentication failure: %s", error_msg); - gpr_slice error_slice = gpr_slice_from_copied_string(error_msg); + grpc_slice error_slice = grpc_slice_from_copied_string(error_msg); grpc_transport_stream_op_add_close(&calld->op, status, &error_slice); grpc_call_next_op(exec_ctx, elem, &calld->op); } @@ -121,8 +121,8 @@ static void on_credentials_metadata(grpc_exec_ctx *exec_ctx, void *user_data, for (i = 0; i < num_md; i++) { grpc_metadata_batch_add_tail( mdb, &calld->md_links[i], - grpc_mdelem_from_slices(gpr_slice_ref(md_elems[i].key), - gpr_slice_ref(md_elems[i].value))); + grpc_mdelem_from_slices(grpc_slice_ref(md_elems[i].key), + grpc_slice_ref(md_elems[i].value))); } grpc_call_next_op(exec_ctx, elem, op); } diff --git a/src/core/lib/security/transport/handshake.c b/src/core/lib/security/transport/handshake.c index fbeec312b6..2d33521d94 100644 --- a/src/core/lib/security/transport/handshake.c +++ b/src/core/lib/security/transport/handshake.c @@ -54,9 +54,9 @@ typedef struct { size_t handshake_buffer_size; grpc_endpoint *wrapped_endpoint; grpc_endpoint *secure_endpoint; - gpr_slice_buffer left_overs; - gpr_slice_buffer incoming; - gpr_slice_buffer outgoing; + grpc_slice_buffer left_overs; + grpc_slice_buffer incoming; + grpc_slice_buffer outgoing; grpc_security_handshake_done_cb cb; void *user_data; grpc_closure on_handshake_data_sent_to_peer; @@ -104,9 +104,9 @@ static void unref_handshake(grpc_security_handshake *h) { if (gpr_unref(&h->refs)) { if (h->handshaker != NULL) tsi_handshaker_destroy(h->handshaker); if (h->handshake_buffer != NULL) gpr_free(h->handshake_buffer); - gpr_slice_buffer_destroy(&h->left_overs); - gpr_slice_buffer_destroy(&h->outgoing); - gpr_slice_buffer_destroy(&h->incoming); + grpc_slice_buffer_destroy(&h->left_overs); + grpc_slice_buffer_destroy(&h->outgoing); + grpc_slice_buffer_destroy(&h->incoming); GRPC_AUTH_CONTEXT_UNREF(h->auth_context, "handshake"); GRPC_SECURITY_CONNECTOR_UNREF(h->connector, "handshake"); gpr_free(h); @@ -190,7 +190,7 @@ static void send_handshake_bytes_to_peer(grpc_exec_ctx *exec_ctx, grpc_security_handshake *h) { size_t offset = 0; tsi_result result = TSI_OK; - gpr_slice to_send; + grpc_slice to_send; do { size_t to_send_size = h->handshake_buffer_size - offset; @@ -212,9 +212,9 @@ static void send_handshake_bytes_to_peer(grpc_exec_ctx *exec_ctx, } to_send = - gpr_slice_from_copied_buffer((const char *)h->handshake_buffer, offset); - gpr_slice_buffer_reset_and_unref(&h->outgoing); - gpr_slice_buffer_add(&h->outgoing, to_send); + grpc_slice_from_copied_buffer((const char *)h->handshake_buffer, offset); + grpc_slice_buffer_reset_and_unref(&h->outgoing); + grpc_slice_buffer_add(&h->outgoing, to_send); /* TODO(klempner,jboeuf): This should probably use the client setup deadline */ grpc_endpoint_write(exec_ctx, h->wrapped_endpoint, &h->outgoing, @@ -277,13 +277,13 @@ static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, /* Put the leftovers in our buffer (ownership transfered). */ if (has_left_overs_in_current_slice) { - gpr_slice_buffer_add( + grpc_slice_buffer_add( &h->left_overs, - gpr_slice_split_tail(&h->incoming.slices[i], consumed_slice_size)); - gpr_slice_unref( + grpc_slice_split_tail(&h->incoming.slices[i], consumed_slice_size)); + grpc_slice_unref( h->incoming.slices[i]); /* split_tail above increments refcount. */ } - gpr_slice_buffer_addn( + grpc_slice_buffer_addn( &h->left_overs, &h->incoming.slices[i + 1], num_left_overs - (size_t)has_left_overs_in_current_slice); check_peer(exec_ctx, h); @@ -325,7 +325,7 @@ static void on_timeout(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { void grpc_do_security_handshake( grpc_exec_ctx *exec_ctx, tsi_handshaker *handshaker, grpc_security_connector *connector, bool is_client_side, - grpc_endpoint *nonsecure_endpoint, gpr_slice_buffer *read_buffer, + grpc_endpoint *nonsecure_endpoint, grpc_slice_buffer *read_buffer, gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data) { grpc_security_connector_handshake_list *handshake_node; @@ -344,11 +344,11 @@ void grpc_do_security_handshake( on_handshake_data_sent_to_peer, h); grpc_closure_init(&h->on_handshake_data_received_from_peer, on_handshake_data_received_from_peer, h); - gpr_slice_buffer_init(&h->left_overs); - gpr_slice_buffer_init(&h->outgoing); - gpr_slice_buffer_init(&h->incoming); + grpc_slice_buffer_init(&h->left_overs); + grpc_slice_buffer_init(&h->outgoing); + grpc_slice_buffer_init(&h->incoming); if (read_buffer != NULL) { - gpr_slice_buffer_move_into(read_buffer, &h->incoming); + grpc_slice_buffer_move_into(read_buffer, &h->incoming); gpr_free(read_buffer); } if (!is_client_side) { diff --git a/src/core/lib/security/transport/handshake.h b/src/core/lib/security/transport/handshake.h index 53092f5421..f894540515 100644 --- a/src/core/lib/security/transport/handshake.h +++ b/src/core/lib/security/transport/handshake.h @@ -42,7 +42,7 @@ void grpc_do_security_handshake( grpc_exec_ctx *exec_ctx, tsi_handshaker *handshaker, grpc_security_connector *connector, bool is_client_side, - grpc_endpoint *nonsecure_endpoint, gpr_slice_buffer *read_buffer, + grpc_endpoint *nonsecure_endpoint, grpc_slice_buffer *read_buffer, gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data); void grpc_security_handshake_shutdown(grpc_exec_ctx *exec_ctx, void *handshake); diff --git a/src/core/lib/security/transport/secure_endpoint.c b/src/core/lib/security/transport/secure_endpoint.c index 3924997d31..865a0ec4cf 100644 --- a/src/core/lib/security/transport/secure_endpoint.c +++ b/src/core/lib/security/transport/secure_endpoint.c @@ -54,15 +54,15 @@ typedef struct { grpc_closure *read_cb; grpc_closure *write_cb; grpc_closure on_read; - gpr_slice_buffer *read_buffer; - gpr_slice_buffer source_buffer; + grpc_slice_buffer *read_buffer; + grpc_slice_buffer source_buffer; /* saved handshaker leftover data to unprotect. */ - gpr_slice_buffer leftover_bytes; + grpc_slice_buffer leftover_bytes; /* buffers for read and write */ - gpr_slice read_staging_buffer; + grpc_slice read_staging_buffer; - gpr_slice write_staging_buffer; - gpr_slice_buffer output_buffer; + grpc_slice write_staging_buffer; + grpc_slice_buffer output_buffer; gpr_refcount ref; } secure_endpoint; @@ -73,11 +73,11 @@ static void destroy(grpc_exec_ctx *exec_ctx, secure_endpoint *secure_ep) { secure_endpoint *ep = secure_ep; grpc_endpoint_destroy(exec_ctx, ep->wrapped_ep); tsi_frame_protector_destroy(ep->protector); - gpr_slice_buffer_destroy(&ep->leftover_bytes); - gpr_slice_unref(ep->read_staging_buffer); - gpr_slice_unref(ep->write_staging_buffer); - gpr_slice_buffer_destroy(&ep->output_buffer); - gpr_slice_buffer_destroy(&ep->source_buffer); + grpc_slice_buffer_destroy(&ep->leftover_bytes); + grpc_slice_unref(ep->read_staging_buffer); + grpc_slice_unref(ep->write_staging_buffer); + grpc_slice_buffer_destroy(&ep->output_buffer); + grpc_slice_buffer_destroy(&ep->source_buffer); gpr_mu_destroy(&ep->protector_mu); gpr_free(ep); } @@ -121,8 +121,8 @@ static void secure_endpoint_ref(secure_endpoint *ep) { gpr_ref(&ep->ref); } static void flush_read_staging_buffer(secure_endpoint *ep, uint8_t **cur, uint8_t **end) { - gpr_slice_buffer_add(ep->read_buffer, ep->read_staging_buffer); - ep->read_staging_buffer = gpr_slice_malloc(STAGING_BUFFER_SIZE); + grpc_slice_buffer_add(ep->read_buffer, ep->read_staging_buffer); + ep->read_staging_buffer = grpc_slice_malloc(STAGING_BUFFER_SIZE); *cur = GPR_SLICE_START_PTR(ep->read_staging_buffer); *end = GPR_SLICE_END_PTR(ep->read_staging_buffer); } @@ -153,7 +153,7 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, uint8_t *end = GPR_SLICE_END_PTR(ep->read_staging_buffer); if (error != GRPC_ERROR_NONE) { - gpr_slice_buffer_reset_and_unref(ep->read_buffer); + grpc_slice_buffer_reset_and_unref(ep->read_buffer); call_read_cb(exec_ctx, ep, GRPC_ERROR_CREATE_REFERENCING( "Secure read failed", &error, 1)); return; @@ -161,7 +161,7 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, /* TODO(yangg) check error, maybe bail out early */ for (i = 0; i < ep->source_buffer.count; i++) { - gpr_slice encrypted = ep->source_buffer.slices[i]; + grpc_slice encrypted = ep->source_buffer.slices[i]; uint8_t *message_bytes = GPR_SLICE_START_PTR(encrypted); size_t message_size = GPR_SLICE_LENGTH(encrypted); @@ -199,19 +199,19 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, } if (cur != GPR_SLICE_START_PTR(ep->read_staging_buffer)) { - gpr_slice_buffer_add( + grpc_slice_buffer_add( ep->read_buffer, - gpr_slice_split_head( + grpc_slice_split_head( &ep->read_staging_buffer, (size_t)(cur - GPR_SLICE_START_PTR(ep->read_staging_buffer)))); } /* TODO(yangg) experiment with moving this block after read_cb to see if it helps latency */ - gpr_slice_buffer_reset_and_unref(&ep->source_buffer); + grpc_slice_buffer_reset_and_unref(&ep->source_buffer); if (result != TSI_OK) { - gpr_slice_buffer_reset_and_unref(ep->read_buffer); + grpc_slice_buffer_reset_and_unref(ep->read_buffer); call_read_cb(exec_ctx, ep, grpc_set_tsi_error_result( GRPC_ERROR_CREATE("Unwrap failed"), result)); return; @@ -221,15 +221,15 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, } static void endpoint_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, - gpr_slice_buffer *slices, grpc_closure *cb) { + grpc_slice_buffer *slices, grpc_closure *cb) { secure_endpoint *ep = (secure_endpoint *)secure_ep; ep->read_cb = cb; ep->read_buffer = slices; - gpr_slice_buffer_reset_and_unref(ep->read_buffer); + grpc_slice_buffer_reset_and_unref(ep->read_buffer); SECURE_ENDPOINT_REF(ep, "read"); if (ep->leftover_bytes.count) { - gpr_slice_buffer_swap(&ep->leftover_bytes, &ep->source_buffer); + grpc_slice_buffer_swap(&ep->leftover_bytes, &ep->source_buffer); GPR_ASSERT(ep->leftover_bytes.count == 0); on_read(exec_ctx, ep, GRPC_ERROR_NONE); return; @@ -241,14 +241,14 @@ static void endpoint_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, static void flush_write_staging_buffer(secure_endpoint *ep, uint8_t **cur, uint8_t **end) { - gpr_slice_buffer_add(&ep->output_buffer, ep->write_staging_buffer); - ep->write_staging_buffer = gpr_slice_malloc(STAGING_BUFFER_SIZE); + grpc_slice_buffer_add(&ep->output_buffer, ep->write_staging_buffer); + ep->write_staging_buffer = grpc_slice_malloc(STAGING_BUFFER_SIZE); *cur = GPR_SLICE_START_PTR(ep->write_staging_buffer); *end = GPR_SLICE_END_PTR(ep->write_staging_buffer); } static void endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, - gpr_slice_buffer *slices, grpc_closure *cb) { + grpc_slice_buffer *slices, grpc_closure *cb) { GPR_TIMER_BEGIN("secure_endpoint.endpoint_write", 0); unsigned i; @@ -257,7 +257,7 @@ static void endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, uint8_t *cur = GPR_SLICE_START_PTR(ep->write_staging_buffer); uint8_t *end = GPR_SLICE_END_PTR(ep->write_staging_buffer); - gpr_slice_buffer_reset_and_unref(&ep->output_buffer); + grpc_slice_buffer_reset_and_unref(&ep->output_buffer); if (grpc_trace_secure_endpoint) { for (i = 0; i < slices->count; i++) { @@ -269,7 +269,7 @@ static void endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, } for (i = 0; i < slices->count; i++) { - gpr_slice plain = slices->slices[i]; + grpc_slice plain = slices->slices[i]; uint8_t *message_bytes = GPR_SLICE_START_PTR(plain); size_t message_size = GPR_SLICE_LENGTH(plain); while (message_size > 0) { @@ -311,9 +311,9 @@ static void endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, } } while (still_pending_size > 0); if (cur != GPR_SLICE_START_PTR(ep->write_staging_buffer)) { - gpr_slice_buffer_add( + grpc_slice_buffer_add( &ep->output_buffer, - gpr_slice_split_head( + grpc_slice_split_head( &ep->write_staging_buffer, (size_t)(cur - GPR_SLICE_START_PTR(ep->write_staging_buffer)))); } @@ -321,7 +321,7 @@ static void endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, if (result != TSI_OK) { /* TODO(yangg) do different things according to the error type? */ - gpr_slice_buffer_reset_and_unref(&ep->output_buffer); + grpc_slice_buffer_reset_and_unref(&ep->output_buffer); grpc_exec_ctx_sched( exec_ctx, cb, grpc_set_tsi_error_result(GRPC_ERROR_CREATE("Wrap failed"), result), @@ -388,21 +388,21 @@ static const grpc_endpoint_vtable vtable = {endpoint_read, grpc_endpoint *grpc_secure_endpoint_create( struct tsi_frame_protector *protector, grpc_endpoint *transport, - gpr_slice *leftover_slices, size_t leftover_nslices) { + grpc_slice *leftover_slices, size_t leftover_nslices) { size_t i; secure_endpoint *ep = (secure_endpoint *)gpr_malloc(sizeof(secure_endpoint)); ep->base.vtable = &vtable; ep->wrapped_ep = transport; ep->protector = protector; - gpr_slice_buffer_init(&ep->leftover_bytes); + grpc_slice_buffer_init(&ep->leftover_bytes); for (i = 0; i < leftover_nslices; i++) { - gpr_slice_buffer_add(&ep->leftover_bytes, - gpr_slice_ref(leftover_slices[i])); + grpc_slice_buffer_add(&ep->leftover_bytes, + grpc_slice_ref(leftover_slices[i])); } - ep->write_staging_buffer = gpr_slice_malloc(STAGING_BUFFER_SIZE); - ep->read_staging_buffer = gpr_slice_malloc(STAGING_BUFFER_SIZE); - gpr_slice_buffer_init(&ep->output_buffer); - gpr_slice_buffer_init(&ep->source_buffer); + ep->write_staging_buffer = grpc_slice_malloc(STAGING_BUFFER_SIZE); + ep->read_staging_buffer = grpc_slice_malloc(STAGING_BUFFER_SIZE); + grpc_slice_buffer_init(&ep->output_buffer); + grpc_slice_buffer_init(&ep->source_buffer); ep->read_buffer = NULL; grpc_closure_init(&ep->on_read, on_read, ep); gpr_mu_init(&ep->protector_mu); diff --git a/src/core/lib/security/transport/secure_endpoint.h b/src/core/lib/security/transport/secure_endpoint.h index d00075b769..986e5e9f2e 100644 --- a/src/core/lib/security/transport/secure_endpoint.h +++ b/src/core/lib/security/transport/secure_endpoint.h @@ -44,6 +44,6 @@ extern int grpc_trace_secure_endpoint; /* Takes ownership of protector and to_wrap, and refs leftover_slices. */ grpc_endpoint *grpc_secure_endpoint_create( struct tsi_frame_protector *protector, grpc_endpoint *to_wrap, - gpr_slice *leftover_slices, size_t leftover_nslices); + grpc_slice *leftover_slices, size_t leftover_nslices); #endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURE_ENDPOINT_H */ diff --git a/src/core/lib/security/transport/security_connector.c b/src/core/lib/security/transport/security_connector.c index 0eca46eb52..9de69f2288 100644 --- a/src/core/lib/security/transport/security_connector.c +++ b/src/core/lib/security/transport/security_connector.c @@ -127,7 +127,7 @@ void grpc_server_security_connector_shutdown( void grpc_channel_security_connector_do_handshake( grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, - grpc_endpoint *nonsecure_endpoint, gpr_slice_buffer *read_buffer, + grpc_endpoint *nonsecure_endpoint, grpc_slice_buffer *read_buffer, gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data) { if (sc == NULL || nonsecure_endpoint == NULL) { @@ -142,7 +142,7 @@ void grpc_channel_security_connector_do_handshake( void grpc_server_security_connector_do_handshake( grpc_exec_ctx *exec_ctx, grpc_server_security_connector *sc, grpc_tcp_server_acceptor *acceptor, grpc_endpoint *nonsecure_endpoint, - gpr_slice_buffer *read_buffer, gpr_timespec deadline, + grpc_slice_buffer *read_buffer, gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data) { if (sc == NULL || nonsecure_endpoint == NULL) { gpr_free(read_buffer); @@ -316,7 +316,7 @@ static void fake_channel_check_call_host(grpc_exec_ctx *exec_ctx, static void fake_channel_do_handshake(grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, grpc_endpoint *nonsecure_endpoint, - gpr_slice_buffer *read_buffer, + grpc_slice_buffer *read_buffer, gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data) { @@ -328,7 +328,7 @@ static void fake_channel_do_handshake(grpc_exec_ctx *exec_ctx, static void fake_server_do_handshake( grpc_exec_ctx *exec_ctx, grpc_server_security_connector *sc, grpc_tcp_server_acceptor *acceptor, grpc_endpoint *nonsecure_endpoint, - gpr_slice_buffer *read_buffer, gpr_timespec deadline, + grpc_slice_buffer *read_buffer, gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data) { grpc_do_security_handshake(exec_ctx, tsi_create_fake_handshaker(0), &sc->base, false, nonsecure_endpoint, read_buffer, deadline, @@ -422,7 +422,7 @@ static grpc_security_status ssl_create_handshaker( static void ssl_channel_do_handshake(grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, grpc_endpoint *nonsecure_endpoint, - gpr_slice_buffer *read_buffer, + grpc_slice_buffer *read_buffer, gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data) { @@ -447,7 +447,7 @@ static void ssl_channel_do_handshake(grpc_exec_ctx *exec_ctx, static void ssl_server_do_handshake( grpc_exec_ctx *exec_ctx, grpc_server_security_connector *sc, grpc_tcp_server_acceptor *acceptor, grpc_endpoint *nonsecure_endpoint, - gpr_slice_buffer *read_buffer, gpr_timespec deadline, + grpc_slice_buffer *read_buffer, gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data) { grpc_ssl_server_security_connector *c = (grpc_ssl_server_security_connector *)sc; @@ -642,8 +642,8 @@ static grpc_security_connector_vtable ssl_channel_vtable = { static grpc_security_connector_vtable ssl_server_vtable = { ssl_server_destroy, ssl_server_check_peer}; -static gpr_slice compute_default_pem_root_certs_once(void) { - gpr_slice result = gpr_empty_slice(); +static grpc_slice compute_default_pem_root_certs_once(void) { + grpc_slice result = gpr_empty_slice(); /* First try to load the roots from the environment. */ char *default_root_certs_path = @@ -661,7 +661,7 @@ static gpr_slice compute_default_pem_root_certs_once(void) { ovrd_res = ssl_roots_override_cb(&pem_root_certs); if (ovrd_res == GRPC_SSL_ROOTS_OVERRIDE_OK) { GPR_ASSERT(pem_root_certs != NULL); - result = gpr_slice_new(pem_root_certs, strlen(pem_root_certs), gpr_free); + result = grpc_slice_new(pem_root_certs, strlen(pem_root_certs), gpr_free); } } @@ -674,13 +674,13 @@ static gpr_slice compute_default_pem_root_certs_once(void) { return result; } -static gpr_slice default_pem_root_certs; +static grpc_slice default_pem_root_certs; static void init_default_pem_root_certs(void) { default_pem_root_certs = compute_default_pem_root_certs_once(); } -gpr_slice grpc_get_default_ssl_roots_for_testing(void) { +grpc_slice grpc_get_default_ssl_roots_for_testing(void) { return compute_default_pem_root_certs_once(); } diff --git a/src/core/lib/security/transport/security_connector.h b/src/core/lib/security/transport/security_connector.h index 0b5b44bf1a..dc02692b01 100644 --- a/src/core/lib/security/transport/security_connector.h +++ b/src/core/lib/security/transport/security_connector.h @@ -144,7 +144,7 @@ struct grpc_channel_security_connector { void (*do_handshake)(grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, grpc_endpoint *nonsecure_endpoint, - gpr_slice_buffer *read_buffer, gpr_timespec deadline, + grpc_slice_buffer *read_buffer, gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data); }; @@ -157,7 +157,7 @@ void grpc_channel_security_connector_check_call_host( /* Handshake. */ void grpc_channel_security_connector_do_handshake( grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *connector, - grpc_endpoint *nonsecure_endpoint, gpr_slice_buffer *read_buffer, + grpc_endpoint *nonsecure_endpoint, grpc_slice_buffer *read_buffer, gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data); /* --- server_security_connector object. --- @@ -176,14 +176,14 @@ struct grpc_server_security_connector { grpc_server_security_connector *sc, grpc_tcp_server_acceptor *acceptor, grpc_endpoint *nonsecure_endpoint, - gpr_slice_buffer *read_buffer, gpr_timespec deadline, + grpc_slice_buffer *read_buffer, gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data); }; void grpc_server_security_connector_do_handshake( grpc_exec_ctx *exec_ctx, grpc_server_security_connector *sc, grpc_tcp_server_acceptor *acceptor, grpc_endpoint *nonsecure_endpoint, - gpr_slice_buffer *read_buffer, gpr_timespec deadline, + grpc_slice_buffer *read_buffer, gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data); void grpc_server_security_connector_shutdown( @@ -233,7 +233,7 @@ grpc_security_status grpc_ssl_channel_security_connector_create( size_t grpc_get_default_ssl_roots(const unsigned char **pem_root_certs); /* Exposed for TESTING ONLY!. */ -gpr_slice grpc_get_default_ssl_roots_for_testing(void); +grpc_slice grpc_get_default_ssl_roots_for_testing(void); /* Config for ssl servers. */ typedef struct { diff --git a/src/core/lib/security/transport/server_auth_filter.c b/src/core/lib/security/transport/server_auth_filter.c index b2c6815af8..39973ab036 100644 --- a/src/core/lib/security/transport/server_auth_filter.c +++ b/src/core/lib/security/transport/server_auth_filter.c @@ -134,14 +134,14 @@ static void on_md_processing_done( grpc_metadata_array_destroy(&calld->md); grpc_exec_ctx_sched(&exec_ctx, calld->on_done_recv, GRPC_ERROR_NONE, NULL); } else { - gpr_slice message; + grpc_slice message; grpc_transport_stream_op *close_op = gpr_malloc(sizeof(*close_op)); memset(close_op, 0, sizeof(*close_op)); grpc_metadata_array_destroy(&calld->md); error_details = error_details != NULL ? error_details : "Authentication metadata processing failed."; - message = gpr_slice_from_copied_string(error_details); + message = grpc_slice_from_copied_string(error_details); calld->transport_op->send_initial_metadata = NULL; if (calld->transport_op->send_message != NULL) { grpc_byte_stream_destroy(&exec_ctx, calld->transport_op->send_message); diff --git a/src/core/lib/security/util/b64.c b/src/core/lib/security/util/b64.c index 9da42e4e73..f4f0092c3d 100644 --- a/src/core/lib/security/util/b64.c +++ b/src/core/lib/security/util/b64.c @@ -120,7 +120,7 @@ char *grpc_base64_encode(const void *vdata, size_t data_size, int url_safe, return result; } -gpr_slice grpc_base64_decode(const char *b64, int url_safe) { +grpc_slice grpc_base64_decode(const char *b64, int url_safe) { return grpc_base64_decode_with_len(b64, strlen(b64), url_safe); } @@ -182,9 +182,9 @@ static int decode_group(const unsigned char *codes, size_t num_codes, return 1; } -gpr_slice grpc_base64_decode_with_len(const char *b64, size_t b64_len, +grpc_slice grpc_base64_decode_with_len(const char *b64, size_t b64_len, int url_safe) { - gpr_slice result = gpr_slice_malloc(b64_len); + grpc_slice result = grpc_slice_malloc(b64_len); unsigned char *current = GPR_SLICE_START_PTR(result); size_t result_size = 0; unsigned char codes[4]; @@ -228,6 +228,6 @@ gpr_slice grpc_base64_decode_with_len(const char *b64, size_t b64_len, return result; fail: - gpr_slice_unref(result); + grpc_slice_unref(result); return gpr_empty_slice(); } diff --git a/src/core/lib/security/util/b64.h b/src/core/lib/security/util/b64.h index 6908095287..f1b9bb2f2e 100644 --- a/src/core/lib/security/util/b64.h +++ b/src/core/lib/security/util/b64.h @@ -43,10 +43,10 @@ char *grpc_base64_encode(const void *data, size_t data_size, int url_safe, /* Decodes data according to the base64 specification. Returns an empty slice in case of failure. */ -gpr_slice grpc_base64_decode(const char *b64, int url_safe); +grpc_slice grpc_base64_decode(const char *b64, int url_safe); /* Same as above except that the length is provided by the caller. */ -gpr_slice grpc_base64_decode_with_len(const char *b64, size_t b64_len, +grpc_slice grpc_base64_decode_with_len(const char *b64, size_t b64_len, int url_safe); #endif /* GRPC_CORE_LIB_SECURITY_UTIL_B64_H */ diff --git a/src/core/lib/slice/percent_encoding.c b/src/core/lib/slice/percent_encoding.c new file mode 100644 index 0000000000..ae11e225e7 --- /dev/null +++ b/src/core/lib/slice/percent_encoding.c @@ -0,0 +1,180 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include "src/core/lib/support/percent_encoding.h" + +#include + +const uint8_t gpr_url_percent_encoding_unreserved_bytes[256 / 8] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xff, 0x03, 0xfe, 0xff, 0xff, + 0x87, 0xfe, 0xff, 0xff, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; +const uint8_t gpr_compatible_percent_encoding_unreserved_bytes[256 / 8] = { + 0x00, 0x00, 0x00, 0x00, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + +static bool is_unreserved_character(uint8_t c, + const uint8_t *unreserved_bytes) { + return ((unreserved_bytes[c / 8] >> (c % 8)) & 1) != 0; +} + +grpc_slice gpr_percent_encode_slice(grpc_slice slice, + const uint8_t *unreserved_bytes) { + static const uint8_t hex[] = "0123456789ABCDEF"; + + // first pass: count the number of bytes needed to output this string + size_t output_length = 0; + const uint8_t *slice_start = GPR_SLICE_START_PTR(slice); + const uint8_t *slice_end = GPR_SLICE_END_PTR(slice); + const uint8_t *p; + bool any_reserved_bytes = false; + for (p = slice_start; p < slice_end; p++) { + bool unres = is_unreserved_character(*p, unreserved_bytes); + output_length += unres ? 1 : 3; + any_reserved_bytes |= !unres; + } + // no unreserved bytes: return the string unmodified + if (!any_reserved_bytes) { + return grpc_slice_ref(slice); + } + // second pass: actually encode + grpc_slice out = grpc_slice_malloc(output_length); + uint8_t *q = GPR_SLICE_START_PTR(out); + for (p = slice_start; p < slice_end; p++) { + if (is_unreserved_character(*p, unreserved_bytes)) { + *q++ = *p; + } else { + *q++ = '%'; + *q++ = hex[*p >> 4]; + *q++ = hex[*p & 15]; + } + } + GPR_ASSERT(q == GPR_SLICE_END_PTR(out)); + return out; +} + +static bool valid_hex(const uint8_t *p, const uint8_t *end) { + if (p >= end) return false; + return (*p >= '0' && *p <= '9') || (*p >= 'a' && *p <= 'f') || + (*p >= 'A' && *p <= 'F'); +} + +static uint8_t dehex(uint8_t c) { + if (c >= '0' && c <= '9') return (uint8_t)(c - '0'); + if (c >= 'A' && c <= 'F') return (uint8_t)(c - 'A' + 10); + if (c >= 'a' && c <= 'f') return (uint8_t)(c - 'a' + 10); + GPR_UNREACHABLE_CODE(return 255); +} + +bool gpr_strict_percent_decode_slice(grpc_slice slice_in, + const uint8_t *unreserved_bytes, + grpc_slice *slice_out) { + const uint8_t *p = GPR_SLICE_START_PTR(slice_in); + const uint8_t *in_end = GPR_SLICE_END_PTR(slice_in); + size_t out_length = 0; + bool any_percent_encoded_stuff = false; + while (p != in_end) { + if (*p == '%') { + if (!valid_hex(++p, in_end)) return false; + if (!valid_hex(++p, in_end)) return false; + p++; + out_length++; + any_percent_encoded_stuff = true; + } else if (is_unreserved_character(*p, unreserved_bytes)) { + p++; + out_length++; + } else { + return false; + } + } + if (!any_percent_encoded_stuff) { + *slice_out = grpc_slice_ref(slice_in); + return true; + } + p = GPR_SLICE_START_PTR(slice_in); + *slice_out = grpc_slice_malloc(out_length); + uint8_t *q = GPR_SLICE_START_PTR(*slice_out); + while (p != in_end) { + if (*p == '%') { + *q++ = (uint8_t)(dehex(p[1]) << 4) | (dehex(p[2])); + p += 3; + } else { + *q++ = *p++; + } + } + GPR_ASSERT(q == GPR_SLICE_END_PTR(*slice_out)); + return true; +} + +grpc_slice gpr_permissive_percent_decode_slice(grpc_slice slice_in) { + const uint8_t *p = GPR_SLICE_START_PTR(slice_in); + const uint8_t *in_end = GPR_SLICE_END_PTR(slice_in); + size_t out_length = 0; + bool any_percent_encoded_stuff = false; + while (p != in_end) { + if (*p == '%') { + if (!valid_hex(p + 1, in_end) || !valid_hex(p + 2, in_end)) { + p++; + out_length++; + } else { + p += 3; + out_length++; + any_percent_encoded_stuff = true; + } + } else { + p++; + out_length++; + } + } + if (!any_percent_encoded_stuff) { + return grpc_slice_ref(slice_in); + } + p = GPR_SLICE_START_PTR(slice_in); + grpc_slice out = grpc_slice_malloc(out_length); + uint8_t *q = GPR_SLICE_START_PTR(out); + while (p != in_end) { + if (*p == '%') { + if (!valid_hex(p + 1, in_end) || !valid_hex(p + 2, in_end)) { + *q++ = *p++; + } else { + *q++ = (uint8_t)(dehex(p[1]) << 4) | (dehex(p[2])); + p += 3; + } + } else { + *q++ = *p++; + } + } + GPR_ASSERT(q == GPR_SLICE_END_PTR(out)); + return out; +} diff --git a/src/core/lib/slice/percent_encoding.h b/src/core/lib/slice/percent_encoding.h new file mode 100644 index 0000000000..a560d74a79 --- /dev/null +++ b/src/core/lib/slice/percent_encoding.h @@ -0,0 +1,78 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#ifndef GRPC_CORE_LIB_SUPPORT_PERCENT_ENCODING_H +#define GRPC_CORE_LIB_SUPPORT_PERCENT_ENCODING_H + +/* Percent encoding and decoding of slices. + Transforms arbitrary strings into safe-for-transmission strings by using + variants of percent encoding (RFC 3986). + Two major variants are supplied: one that strictly matches URL encoding, + and another which applies percent encoding only to non-http2 header + bytes (the 'compatible' variant) */ + +#include + +#include + +/* URL percent encoding spec bitfield (usabel as 'unreserved_bytes' in + gpr_percent_encode_slice, gpr_strict_percent_decode_slice). + Flags [A-Za-z0-9-_.~] as unreserved bytes for the percent encoding routines + */ +extern const uint8_t gpr_url_percent_encoding_unreserved_bytes[256 / 8]; +/* URL percent encoding spec bitfield (usabel as 'unreserved_bytes' in + gpr_percent_encode_slice, gpr_strict_percent_decode_slice). + Flags ascii7 non-control characters excluding '%' as unreserved bytes for the + percent encoding routines */ +extern const uint8_t gpr_compatible_percent_encoding_unreserved_bytes[256 / 8]; + +/* Percent-encode a slice, returning the new slice (this cannot fail): + unreserved_bytes is a bitfield indicating which bytes are considered + unreserved and thus do not need percent encoding */ +grpc_slice gpr_percent_encode_slice(grpc_slice slice, + const uint8_t *unreserved_bytes); +/* Percent-decode a slice, strictly. + If the input is legal (contains no unreserved bytes, and legal % encodings), + returns true and sets *slice_out to the decoded slice. + If the input is not legal, returns false and leaves *slice_out untouched. + unreserved_bytes is a bitfield indicating which bytes are considered + unreserved and thus do not need percent encoding */ +bool gpr_strict_percent_decode_slice(grpc_slice slice_in, + const uint8_t *unreserved_bytes, + grpc_slice *slice_out); +/* Percent-decode a slice, permissively. + If a % triplet can not be decoded, pass it through verbatim. + This cannot fail. */ +grpc_slice gpr_permissive_percent_decode_slice(grpc_slice slice_in); + +#endif /* GRPC_CORE_LIB_SUPPORT_PERCENT_ENCODING_H */ diff --git a/src/core/lib/slice/slice.c b/src/core/lib/slice/slice.c new file mode 100644 index 0000000000..602dd86eca --- /dev/null +++ b/src/core/lib/slice/slice.c @@ -0,0 +1,350 @@ +/* + * + * 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. + * + */ + +#include +#include +#include + +#include + +grpc_slice gpr_empty_slice(void) { + grpc_slice out; + out.refcount = 0; + out.data.inlined.length = 0; + return out; +} + +grpc_slice grpc_slice_ref(grpc_slice slice) { + if (slice.refcount) { + slice.refcount->ref(slice.refcount); + } + return slice; +} + +void grpc_slice_unref(grpc_slice slice) { + if (slice.refcount) { + slice.refcount->unref(slice.refcount); + } +} + +/* grpc_slice_from_static_string support structure - a refcount that does + nothing */ +static void noop_ref_or_unref(void *unused) {} + +static grpc_slice_refcount noop_refcount = {noop_ref_or_unref, + noop_ref_or_unref}; + +grpc_slice grpc_slice_from_static_string(const char *s) { + grpc_slice slice; + slice.refcount = &noop_refcount; + slice.data.refcounted.bytes = (uint8_t *)s; + slice.data.refcounted.length = strlen(s); + return slice; +} + +/* grpc_slice_new support structures - we create a refcount object extended + with the user provided data pointer & destroy function */ +typedef struct new_slice_refcount { + grpc_slice_refcount rc; + gpr_refcount refs; + void (*user_destroy)(void *); + void *user_data; +} new_slice_refcount; + +static void new_slice_ref(void *p) { + new_slice_refcount *r = p; + gpr_ref(&r->refs); +} + +static void new_slice_unref(void *p) { + new_slice_refcount *r = p; + if (gpr_unref(&r->refs)) { + r->user_destroy(r->user_data); + gpr_free(r); + } +} + +grpc_slice grpc_slice_new_with_user_data(void *p, size_t len, + void (*destroy)(void *), + void *user_data) { + grpc_slice slice; + new_slice_refcount *rc = gpr_malloc(sizeof(new_slice_refcount)); + gpr_ref_init(&rc->refs, 1); + rc->rc.ref = new_slice_ref; + rc->rc.unref = new_slice_unref; + rc->user_destroy = destroy; + rc->user_data = user_data; + + slice.refcount = &rc->rc; + slice.data.refcounted.bytes = p; + slice.data.refcounted.length = len; + return slice; +} + +grpc_slice grpc_slice_new(void *p, size_t len, void (*destroy)(void *)) { + /* Pass "p" to *destroy when the slice is no longer needed. */ + return grpc_slice_new_with_user_data(p, len, destroy, p); +} + +/* grpc_slice_new_with_len support structures - we create a refcount object + extended with the user provided data pointer & destroy function */ +typedef struct new_with_len_slice_refcount { + grpc_slice_refcount rc; + gpr_refcount refs; + void *user_data; + size_t user_length; + void (*user_destroy)(void *, size_t); +} new_with_len_slice_refcount; + +static void new_with_len_ref(void *p) { + new_with_len_slice_refcount *r = p; + gpr_ref(&r->refs); +} + +static void new_with_len_unref(void *p) { + new_with_len_slice_refcount *r = p; + if (gpr_unref(&r->refs)) { + r->user_destroy(r->user_data, r->user_length); + gpr_free(r); + } +} + +grpc_slice grpc_slice_new_with_len(void *p, size_t len, + void (*destroy)(void *, size_t)) { + grpc_slice slice; + new_with_len_slice_refcount *rc = + gpr_malloc(sizeof(new_with_len_slice_refcount)); + gpr_ref_init(&rc->refs, 1); + rc->rc.ref = new_with_len_ref; + rc->rc.unref = new_with_len_unref; + rc->user_destroy = destroy; + rc->user_data = p; + rc->user_length = len; + + slice.refcount = &rc->rc; + slice.data.refcounted.bytes = p; + slice.data.refcounted.length = len; + return slice; +} + +grpc_slice grpc_slice_from_copied_buffer(const char *source, size_t length) { + grpc_slice slice = grpc_slice_malloc(length); + memcpy(GPR_SLICE_START_PTR(slice), source, length); + return slice; +} + +grpc_slice grpc_slice_from_copied_string(const char *source) { + return grpc_slice_from_copied_buffer(source, strlen(source)); +} + +typedef struct { + grpc_slice_refcount base; + gpr_refcount refs; +} malloc_refcount; + +static void malloc_ref(void *p) { + malloc_refcount *r = p; + gpr_ref(&r->refs); +} + +static void malloc_unref(void *p) { + malloc_refcount *r = p; + if (gpr_unref(&r->refs)) { + gpr_free(r); + } +} + +grpc_slice grpc_slice_malloc(size_t length) { + grpc_slice slice; + + if (length > sizeof(slice.data.inlined.bytes)) { + /* Memory layout used by the slice created here: + + +-----------+----------------------------------------------------------+ + | refcount | bytes | + +-----------+----------------------------------------------------------+ + + refcount is a malloc_refcount + bytes is an array of bytes of the requested length + Both parts are placed in the same allocation returned from gpr_malloc */ + malloc_refcount *rc = gpr_malloc(sizeof(malloc_refcount) + length); + + /* Initial refcount on rc is 1 - and it's up to the caller to release + this reference. */ + gpr_ref_init(&rc->refs, 1); + + rc->base.ref = malloc_ref; + rc->base.unref = malloc_unref; + + /* Build up the slice to be returned. */ + /* The slices refcount points back to the allocated block. */ + slice.refcount = &rc->base; + /* The data bytes are placed immediately after the refcount struct */ + slice.data.refcounted.bytes = (uint8_t *)(rc + 1); + /* And the length of the block is set to the requested length */ + slice.data.refcounted.length = length; + } else { + /* small slice: just inline the data */ + slice.refcount = NULL; + slice.data.inlined.length = (uint8_t)length; + } + return slice; +} + +grpc_slice grpc_slice_sub_no_ref(grpc_slice source, size_t begin, size_t end) { + grpc_slice subset; + + GPR_ASSERT(end >= begin); + + if (source.refcount) { + /* Enforce preconditions */ + GPR_ASSERT(source.data.refcounted.length >= end); + + /* Build the result */ + subset.refcount = source.refcount; + /* Point into the source array */ + subset.data.refcounted.bytes = source.data.refcounted.bytes + begin; + subset.data.refcounted.length = end - begin; + } else { + /* Enforce preconditions */ + GPR_ASSERT(source.data.inlined.length >= end); + subset.refcount = NULL; + subset.data.inlined.length = (uint8_t)(end - begin); + memcpy(subset.data.inlined.bytes, source.data.inlined.bytes + begin, + end - begin); + } + return subset; +} + +grpc_slice grpc_slice_sub(grpc_slice source, size_t begin, size_t end) { + grpc_slice subset; + + if (end - begin <= sizeof(subset.data.inlined.bytes)) { + subset.refcount = NULL; + subset.data.inlined.length = (uint8_t)(end - begin); + memcpy(subset.data.inlined.bytes, GPR_SLICE_START_PTR(source) + begin, + end - begin); + } else { + subset = grpc_slice_sub_no_ref(source, begin, end); + /* Bump the refcount */ + subset.refcount->ref(subset.refcount); + } + return subset; +} + +grpc_slice grpc_slice_split_tail(grpc_slice *source, size_t split) { + grpc_slice tail; + + if (source->refcount == NULL) { + /* inlined data, copy it out */ + GPR_ASSERT(source->data.inlined.length >= split); + tail.refcount = NULL; + tail.data.inlined.length = (uint8_t)(source->data.inlined.length - split); + memcpy(tail.data.inlined.bytes, source->data.inlined.bytes + split, + tail.data.inlined.length); + source->data.inlined.length = (uint8_t)split; + } else { + size_t tail_length = source->data.refcounted.length - split; + GPR_ASSERT(source->data.refcounted.length >= split); + if (tail_length < sizeof(tail.data.inlined.bytes)) { + /* Copy out the bytes - it'll be cheaper than refcounting */ + tail.refcount = NULL; + tail.data.inlined.length = (uint8_t)tail_length; + memcpy(tail.data.inlined.bytes, source->data.refcounted.bytes + split, + tail_length); + } else { + /* Build the result */ + tail.refcount = source->refcount; + /* Bump the refcount */ + tail.refcount->ref(tail.refcount); + /* Point into the source array */ + tail.data.refcounted.bytes = source->data.refcounted.bytes + split; + tail.data.refcounted.length = tail_length; + } + source->data.refcounted.length = split; + } + + return tail; +} + +grpc_slice grpc_slice_split_head(grpc_slice *source, size_t split) { + grpc_slice head; + + if (source->refcount == NULL) { + GPR_ASSERT(source->data.inlined.length >= split); + + head.refcount = NULL; + head.data.inlined.length = (uint8_t)split; + memcpy(head.data.inlined.bytes, source->data.inlined.bytes, split); + source->data.inlined.length = + (uint8_t)(source->data.inlined.length - split); + memmove(source->data.inlined.bytes, source->data.inlined.bytes + split, + source->data.inlined.length); + } else if (split < sizeof(head.data.inlined.bytes)) { + GPR_ASSERT(source->data.refcounted.length >= split); + + head.refcount = NULL; + head.data.inlined.length = (uint8_t)split; + memcpy(head.data.inlined.bytes, source->data.refcounted.bytes, split); + source->data.refcounted.bytes += split; + source->data.refcounted.length -= split; + } else { + GPR_ASSERT(source->data.refcounted.length >= split); + + /* Build the result */ + head.refcount = source->refcount; + /* Bump the refcount */ + head.refcount->ref(head.refcount); + /* Point into the source array */ + head.data.refcounted.bytes = source->data.refcounted.bytes; + head.data.refcounted.length = split; + source->data.refcounted.bytes += split; + source->data.refcounted.length -= split; + } + + return head; +} + +int grpc_slice_cmp(grpc_slice a, grpc_slice b) { + int d = (int)(GPR_SLICE_LENGTH(a) - GPR_SLICE_LENGTH(b)); + if (d != 0) return d; + return memcmp(GPR_SLICE_START_PTR(a), GPR_SLICE_START_PTR(b), + GPR_SLICE_LENGTH(a)); +} + +int grpc_slice_str_cmp(grpc_slice a, const char *b) { + size_t b_length = strlen(b); + int d = (int)(GPR_SLICE_LENGTH(a) - b_length); + if (d != 0) return d; + return memcmp(GPR_SLICE_START_PTR(a), b, b_length); +} diff --git a/src/core/lib/slice/slice_buffer.c b/src/core/lib/slice/slice_buffer.c new file mode 100644 index 0000000000..c92797233d --- /dev/null +++ b/src/core/lib/slice/slice_buffer.c @@ -0,0 +1,282 @@ +/* + * + * 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. + * + */ + +#include +#include + +#include + +#include +#include +#include + +/* grow a buffer; requires GRPC_SLICE_BUFFER_INLINE_ELEMENTS > 1 */ +#define GROW(x) (3 * (x) / 2) + +static void maybe_embiggen(grpc_slice_buffer *sb) { + if (sb->count == sb->capacity) { + sb->capacity = GROW(sb->capacity); + GPR_ASSERT(sb->capacity > sb->count); + if (sb->slices == sb->inlined) { + sb->slices = gpr_malloc(sb->capacity * sizeof(grpc_slice)); + memcpy(sb->slices, sb->inlined, sb->count * sizeof(grpc_slice)); + } else { + sb->slices = gpr_realloc(sb->slices, sb->capacity * sizeof(grpc_slice)); + } + } +} + +void grpc_slice_buffer_init(grpc_slice_buffer *sb) { + sb->count = 0; + sb->length = 0; + sb->capacity = GRPC_SLICE_BUFFER_INLINE_ELEMENTS; + sb->slices = sb->inlined; +} + +void grpc_slice_buffer_destroy(grpc_slice_buffer *sb) { + grpc_slice_buffer_reset_and_unref(sb); + if (sb->slices != sb->inlined) { + gpr_free(sb->slices); + } +} + +uint8_t *grpc_slice_buffer_tiny_add(grpc_slice_buffer *sb, size_t n) { + grpc_slice *back; + uint8_t *out; + + sb->length += n; + + if (sb->count == 0) goto add_new; + back = &sb->slices[sb->count - 1]; + if (back->refcount) goto add_new; + if ((back->data.inlined.length + n) > sizeof(back->data.inlined.bytes)) + goto add_new; + out = back->data.inlined.bytes + back->data.inlined.length; + back->data.inlined.length = (uint8_t)(back->data.inlined.length + n); + return out; + +add_new: + maybe_embiggen(sb); + back = &sb->slices[sb->count]; + sb->count++; + back->refcount = NULL; + back->data.inlined.length = (uint8_t)n; + return back->data.inlined.bytes; +} + +size_t grpc_slice_buffer_add_indexed(grpc_slice_buffer *sb, grpc_slice s) { + size_t out = sb->count; + maybe_embiggen(sb); + sb->slices[out] = s; + sb->length += GPR_SLICE_LENGTH(s); + sb->count = out + 1; + return out; +} + +void grpc_slice_buffer_add(grpc_slice_buffer *sb, grpc_slice s) { + size_t n = sb->count; + /* if both the last slice in the slice buffer and the slice being added + are inlined (that is, that they carry their data inside the slice data + structure), and the back slice is not full, then concatenate directly + into the back slice, preventing many small slices being passed into + writes */ + if (!s.refcount && n) { + grpc_slice *back = &sb->slices[n - 1]; + if (!back->refcount && back->data.inlined.length < GPR_SLICE_INLINED_SIZE) { + if (s.data.inlined.length + back->data.inlined.length <= + GPR_SLICE_INLINED_SIZE) { + memcpy(back->data.inlined.bytes + back->data.inlined.length, + s.data.inlined.bytes, s.data.inlined.length); + back->data.inlined.length = + (uint8_t)(back->data.inlined.length + s.data.inlined.length); + } else { + size_t cp1 = GPR_SLICE_INLINED_SIZE - back->data.inlined.length; + memcpy(back->data.inlined.bytes + back->data.inlined.length, + s.data.inlined.bytes, cp1); + back->data.inlined.length = GPR_SLICE_INLINED_SIZE; + maybe_embiggen(sb); + back = &sb->slices[n]; + sb->count = n + 1; + back->refcount = NULL; + back->data.inlined.length = (uint8_t)(s.data.inlined.length - cp1); + memcpy(back->data.inlined.bytes, s.data.inlined.bytes + cp1, + s.data.inlined.length - cp1); + } + sb->length += s.data.inlined.length; + return; /* early out */ + } + } + grpc_slice_buffer_add_indexed(sb, s); +} + +void grpc_slice_buffer_addn(grpc_slice_buffer *sb, grpc_slice *s, size_t n) { + size_t i; + for (i = 0; i < n; i++) { + grpc_slice_buffer_add(sb, s[i]); + } +} + +void grpc_slice_buffer_pop(grpc_slice_buffer *sb) { + if (sb->count != 0) { + size_t count = --sb->count; + sb->length -= GPR_SLICE_LENGTH(sb->slices[count]); + } +} + +void grpc_slice_buffer_reset_and_unref(grpc_slice_buffer *sb) { + size_t i; + + for (i = 0; i < sb->count; i++) { + grpc_slice_unref(sb->slices[i]); + } + + sb->count = 0; + sb->length = 0; +} + +void grpc_slice_buffer_swap(grpc_slice_buffer *a, grpc_slice_buffer *b) { + GPR_SWAP(size_t, a->count, b->count); + GPR_SWAP(size_t, a->capacity, b->capacity); + GPR_SWAP(size_t, a->length, b->length); + + if (a->slices == a->inlined) { + if (b->slices == b->inlined) { + /* swap contents of inlined buffer */ + grpc_slice temp[GRPC_SLICE_BUFFER_INLINE_ELEMENTS]; + memcpy(temp, a->slices, b->count * sizeof(grpc_slice)); + memcpy(a->slices, b->slices, a->count * sizeof(grpc_slice)); + memcpy(b->slices, temp, b->count * sizeof(grpc_slice)); + } else { + /* a is inlined, b is not - copy a inlined into b, fix pointers */ + a->slices = b->slices; + b->slices = b->inlined; + memcpy(b->slices, a->inlined, b->count * sizeof(grpc_slice)); + } + } else if (b->slices == b->inlined) { + /* b is inlined, a is not - copy b inlined int a, fix pointers */ + b->slices = a->slices; + a->slices = a->inlined; + memcpy(a->slices, b->inlined, a->count * sizeof(grpc_slice)); + } else { + /* no inlining: easy swap */ + GPR_SWAP(grpc_slice *, a->slices, b->slices); + } +} + +void grpc_slice_buffer_move_into(grpc_slice_buffer *src, grpc_slice_buffer *dst) { + /* anything to move? */ + if (src->count == 0) { + return; + } + /* anything in dst? */ + if (dst->count == 0) { + grpc_slice_buffer_swap(src, dst); + return; + } + /* both buffers have data - copy, and reset src */ + grpc_slice_buffer_addn(dst, src->slices, src->count); + src->count = 0; + src->length = 0; +} + +void grpc_slice_buffer_move_first(grpc_slice_buffer *src, size_t n, + grpc_slice_buffer *dst) { + size_t src_idx; + size_t output_len = dst->length + n; + size_t new_input_len = src->length - n; + GPR_ASSERT(src->length >= n); + if (src->length == n) { + grpc_slice_buffer_move_into(src, dst); + return; + } + src_idx = 0; + while (src_idx < src->capacity) { + grpc_slice slice = src->slices[src_idx]; + size_t slice_len = GPR_SLICE_LENGTH(slice); + if (n > slice_len) { + grpc_slice_buffer_add(dst, slice); + n -= slice_len; + src_idx++; + } else if (n == slice_len) { + grpc_slice_buffer_add(dst, slice); + src_idx++; + break; + } else { /* n < slice_len */ + src->slices[src_idx] = grpc_slice_split_tail(&slice, n); + GPR_ASSERT(GPR_SLICE_LENGTH(slice) == n); + GPR_ASSERT(GPR_SLICE_LENGTH(src->slices[src_idx]) == slice_len - n); + grpc_slice_buffer_add(dst, slice); + break; + } + } + GPR_ASSERT(dst->length == output_len); + memmove(src->slices, src->slices + src_idx, + sizeof(grpc_slice) * (src->count - src_idx)); + src->count -= src_idx; + src->length = new_input_len; + GPR_ASSERT(src->count > 0); +} + +void grpc_slice_buffer_trim_end(grpc_slice_buffer *sb, size_t n, + grpc_slice_buffer *garbage) { + GPR_ASSERT(n <= sb->length); + sb->length -= n; + for (;;) { + size_t idx = sb->count - 1; + grpc_slice slice = sb->slices[idx]; + size_t slice_len = GPR_SLICE_LENGTH(slice); + if (slice_len > n) { + sb->slices[idx] = grpc_slice_split_head(&slice, slice_len - n); + grpc_slice_buffer_add_indexed(garbage, slice); + return; + } else if (slice_len == n) { + grpc_slice_buffer_add_indexed(garbage, slice); + sb->count = idx; + return; + } else { + grpc_slice_buffer_add_indexed(garbage, slice); + n -= slice_len; + sb->count = idx; + } + } +} + +grpc_slice grpc_slice_buffer_take_first(grpc_slice_buffer *sb) { + grpc_slice slice; + GPR_ASSERT(sb->count > 0); + slice = sb->slices[0]; + memmove(&sb->slices[0], &sb->slices[1], (sb->count - 1) * sizeof(grpc_slice)); + sb->count--; + sb->length -= GPR_SLICE_LENGTH(slice); + return slice; +} diff --git a/src/core/lib/slice/slice_string_helpers.c b/src/core/lib/slice/slice_string_helpers.c new file mode 100644 index 0000000000..cc8b80d3b8 --- /dev/null +++ b/src/core/lib/slice/slice_string_helpers.c @@ -0,0 +1,81 @@ +/* + * + * 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. + * + */ + +char *gpr_dump_slice(grpc_slice s, uint32_t flags) { + return gpr_dump((const char *)GPR_SLICE_START_PTR(s), GPR_SLICE_LENGTH(s), + flags); +} + +/** Finds the initial (\a begin) and final (\a end) offsets of the next + * substring from \a str + \a read_offset until the next \a sep or the end of \a + * str. + * + * Returns 1 and updates \a begin and \a end. Returns 0 otherwise. */ +static int slice_find_separator_offset(const grpc_slice str, const char *sep, + const size_t read_offset, size_t *begin, + size_t *end) { + size_t i; + const uint8_t *str_ptr = GPR_SLICE_START_PTR(str) + read_offset; + const size_t str_len = GPR_SLICE_LENGTH(str) - read_offset; + const size_t sep_len = strlen(sep); + if (str_len < sep_len) { + return 0; + } + + for (i = 0; i <= str_len - sep_len; i++) { + if (memcmp(str_ptr + i, sep, sep_len) == 0) { + *begin = read_offset; + *end = read_offset + i; + return 1; + } + } + return 0; +} + +void grpc_slice_split(grpc_slice str, const char *sep, grpc_slice_buffer *dst) { + const size_t sep_len = strlen(sep); + size_t begin, end; + + GPR_ASSERT(sep_len > 0); + + if (slice_find_separator_offset(str, sep, 0, &begin, &end) != 0) { + do { + grpc_slice_buffer_add_indexed(dst, grpc_slice_sub(str, begin, end)); + } while (slice_find_separator_offset(str, sep, end + sep_len, &begin, + &end) != 0); + grpc_slice_buffer_add_indexed( + dst, grpc_slice_sub(str, end + sep_len, GPR_SLICE_LENGTH(str))); + } else { /* no sep found, add whole input */ + grpc_slice_buffer_add_indexed(dst, grpc_slice_ref(str)); + } +} diff --git a/src/core/lib/slice/slice_string_helpers.h b/src/core/lib/slice/slice_string_helpers.h new file mode 100644 index 0000000000..d144a70889 --- /dev/null +++ b/src/core/lib/slice/slice_string_helpers.h @@ -0,0 +1,58 @@ +/* + * + * 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. + * + */ + +#ifndef GRPC_CORE_LIB_SUPPORT_SLICE_STRING_H +#define GRPC_CORE_LIB_SUPPORT_SLICE_STRING_H + +#include + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Calls gpr_dump on a slice. */ +char *gpr_dump_slice(grpc_slice slice, uint32_t flags); + +/** Split \a str by the separator \a sep. Results are stored in \a dst, which + * should be a properly initialized instance. */ +void grpc_slice_split(grpc_slice str, const char *sep, grpc_slice_buffer *dst); + +#ifdef __cplusplus +} +#endif + +#endif /* GRPC_CORE_LIB_SUPPORT_STRING_H */ diff --git a/src/core/lib/support/percent_encoding.c b/src/core/lib/support/percent_encoding.c deleted file mode 100644 index 3c19f264f9..0000000000 --- a/src/core/lib/support/percent_encoding.c +++ /dev/null @@ -1,180 +0,0 @@ -/* - * - * Copyright 2016, 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. - * - */ - -#include "src/core/lib/support/percent_encoding.h" - -#include - -const uint8_t gpr_url_percent_encoding_unreserved_bytes[256 / 8] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xff, 0x03, 0xfe, 0xff, 0xff, - 0x87, 0xfe, 0xff, 0xff, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; -const uint8_t gpr_compatible_percent_encoding_unreserved_bytes[256 / 8] = { - 0x00, 0x00, 0x00, 0x00, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - -static bool is_unreserved_character(uint8_t c, - const uint8_t *unreserved_bytes) { - return ((unreserved_bytes[c / 8] >> (c % 8)) & 1) != 0; -} - -gpr_slice gpr_percent_encode_slice(gpr_slice slice, - const uint8_t *unreserved_bytes) { - static const uint8_t hex[] = "0123456789ABCDEF"; - - // first pass: count the number of bytes needed to output this string - size_t output_length = 0; - const uint8_t *slice_start = GPR_SLICE_START_PTR(slice); - const uint8_t *slice_end = GPR_SLICE_END_PTR(slice); - const uint8_t *p; - bool any_reserved_bytes = false; - for (p = slice_start; p < slice_end; p++) { - bool unres = is_unreserved_character(*p, unreserved_bytes); - output_length += unres ? 1 : 3; - any_reserved_bytes |= !unres; - } - // no unreserved bytes: return the string unmodified - if (!any_reserved_bytes) { - return gpr_slice_ref(slice); - } - // second pass: actually encode - gpr_slice out = gpr_slice_malloc(output_length); - uint8_t *q = GPR_SLICE_START_PTR(out); - for (p = slice_start; p < slice_end; p++) { - if (is_unreserved_character(*p, unreserved_bytes)) { - *q++ = *p; - } else { - *q++ = '%'; - *q++ = hex[*p >> 4]; - *q++ = hex[*p & 15]; - } - } - GPR_ASSERT(q == GPR_SLICE_END_PTR(out)); - return out; -} - -static bool valid_hex(const uint8_t *p, const uint8_t *end) { - if (p >= end) return false; - return (*p >= '0' && *p <= '9') || (*p >= 'a' && *p <= 'f') || - (*p >= 'A' && *p <= 'F'); -} - -static uint8_t dehex(uint8_t c) { - if (c >= '0' && c <= '9') return (uint8_t)(c - '0'); - if (c >= 'A' && c <= 'F') return (uint8_t)(c - 'A' + 10); - if (c >= 'a' && c <= 'f') return (uint8_t)(c - 'a' + 10); - GPR_UNREACHABLE_CODE(return 255); -} - -bool gpr_strict_percent_decode_slice(gpr_slice slice_in, - const uint8_t *unreserved_bytes, - gpr_slice *slice_out) { - const uint8_t *p = GPR_SLICE_START_PTR(slice_in); - const uint8_t *in_end = GPR_SLICE_END_PTR(slice_in); - size_t out_length = 0; - bool any_percent_encoded_stuff = false; - while (p != in_end) { - if (*p == '%') { - if (!valid_hex(++p, in_end)) return false; - if (!valid_hex(++p, in_end)) return false; - p++; - out_length++; - any_percent_encoded_stuff = true; - } else if (is_unreserved_character(*p, unreserved_bytes)) { - p++; - out_length++; - } else { - return false; - } - } - if (!any_percent_encoded_stuff) { - *slice_out = gpr_slice_ref(slice_in); - return true; - } - p = GPR_SLICE_START_PTR(slice_in); - *slice_out = gpr_slice_malloc(out_length); - uint8_t *q = GPR_SLICE_START_PTR(*slice_out); - while (p != in_end) { - if (*p == '%') { - *q++ = (uint8_t)(dehex(p[1]) << 4) | (dehex(p[2])); - p += 3; - } else { - *q++ = *p++; - } - } - GPR_ASSERT(q == GPR_SLICE_END_PTR(*slice_out)); - return true; -} - -gpr_slice gpr_permissive_percent_decode_slice(gpr_slice slice_in) { - const uint8_t *p = GPR_SLICE_START_PTR(slice_in); - const uint8_t *in_end = GPR_SLICE_END_PTR(slice_in); - size_t out_length = 0; - bool any_percent_encoded_stuff = false; - while (p != in_end) { - if (*p == '%') { - if (!valid_hex(p + 1, in_end) || !valid_hex(p + 2, in_end)) { - p++; - out_length++; - } else { - p += 3; - out_length++; - any_percent_encoded_stuff = true; - } - } else { - p++; - out_length++; - } - } - if (!any_percent_encoded_stuff) { - return gpr_slice_ref(slice_in); - } - p = GPR_SLICE_START_PTR(slice_in); - gpr_slice out = gpr_slice_malloc(out_length); - uint8_t *q = GPR_SLICE_START_PTR(out); - while (p != in_end) { - if (*p == '%') { - if (!valid_hex(p + 1, in_end) || !valid_hex(p + 2, in_end)) { - *q++ = *p++; - } else { - *q++ = (uint8_t)(dehex(p[1]) << 4) | (dehex(p[2])); - p += 3; - } - } else { - *q++ = *p++; - } - } - GPR_ASSERT(q == GPR_SLICE_END_PTR(out)); - return out; -} diff --git a/src/core/lib/support/percent_encoding.h b/src/core/lib/support/percent_encoding.h deleted file mode 100644 index 000bf14ede..0000000000 --- a/src/core/lib/support/percent_encoding.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * - * Copyright 2016, 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. - * - */ - -#ifndef GRPC_CORE_LIB_SUPPORT_PERCENT_ENCODING_H -#define GRPC_CORE_LIB_SUPPORT_PERCENT_ENCODING_H - -/* Percent encoding and decoding of slices. - Transforms arbitrary strings into safe-for-transmission strings by using - variants of percent encoding (RFC 3986). - Two major variants are supplied: one that strictly matches URL encoding, - and another which applies percent encoding only to non-http2 header - bytes (the 'compatible' variant) */ - -#include - -#include - -/* URL percent encoding spec bitfield (usabel as 'unreserved_bytes' in - gpr_percent_encode_slice, gpr_strict_percent_decode_slice). - Flags [A-Za-z0-9-_.~] as unreserved bytes for the percent encoding routines - */ -extern const uint8_t gpr_url_percent_encoding_unreserved_bytes[256 / 8]; -/* URL percent encoding spec bitfield (usabel as 'unreserved_bytes' in - gpr_percent_encode_slice, gpr_strict_percent_decode_slice). - Flags ascii7 non-control characters excluding '%' as unreserved bytes for the - percent encoding routines */ -extern const uint8_t gpr_compatible_percent_encoding_unreserved_bytes[256 / 8]; - -/* Percent-encode a slice, returning the new slice (this cannot fail): - unreserved_bytes is a bitfield indicating which bytes are considered - unreserved and thus do not need percent encoding */ -gpr_slice gpr_percent_encode_slice(gpr_slice slice, - const uint8_t *unreserved_bytes); -/* Percent-decode a slice, strictly. - If the input is legal (contains no unreserved bytes, and legal % encodings), - returns true and sets *slice_out to the decoded slice. - If the input is not legal, returns false and leaves *slice_out untouched. - unreserved_bytes is a bitfield indicating which bytes are considered - unreserved and thus do not need percent encoding */ -bool gpr_strict_percent_decode_slice(gpr_slice slice_in, - const uint8_t *unreserved_bytes, - gpr_slice *slice_out); -/* Percent-decode a slice, permissively. - If a % triplet can not be decoded, pass it through verbatim. - This cannot fail. */ -gpr_slice gpr_permissive_percent_decode_slice(gpr_slice slice_in); - -#endif /* GRPC_CORE_LIB_SUPPORT_PERCENT_ENCODING_H */ diff --git a/src/core/lib/support/slice.c b/src/core/lib/support/slice.c deleted file mode 100644 index 8a2c0a9086..0000000000 --- a/src/core/lib/support/slice.c +++ /dev/null @@ -1,350 +0,0 @@ -/* - * - * 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. - * - */ - -#include -#include -#include - -#include - -gpr_slice gpr_empty_slice(void) { - gpr_slice out; - out.refcount = 0; - out.data.inlined.length = 0; - return out; -} - -gpr_slice gpr_slice_ref(gpr_slice slice) { - if (slice.refcount) { - slice.refcount->ref(slice.refcount); - } - return slice; -} - -void gpr_slice_unref(gpr_slice slice) { - if (slice.refcount) { - slice.refcount->unref(slice.refcount); - } -} - -/* gpr_slice_from_static_string support structure - a refcount that does - nothing */ -static void noop_ref_or_unref(void *unused) {} - -static gpr_slice_refcount noop_refcount = {noop_ref_or_unref, - noop_ref_or_unref}; - -gpr_slice gpr_slice_from_static_string(const char *s) { - gpr_slice slice; - slice.refcount = &noop_refcount; - slice.data.refcounted.bytes = (uint8_t *)s; - slice.data.refcounted.length = strlen(s); - return slice; -} - -/* gpr_slice_new support structures - we create a refcount object extended - with the user provided data pointer & destroy function */ -typedef struct new_slice_refcount { - gpr_slice_refcount rc; - gpr_refcount refs; - void (*user_destroy)(void *); - void *user_data; -} new_slice_refcount; - -static void new_slice_ref(void *p) { - new_slice_refcount *r = p; - gpr_ref(&r->refs); -} - -static void new_slice_unref(void *p) { - new_slice_refcount *r = p; - if (gpr_unref(&r->refs)) { - r->user_destroy(r->user_data); - gpr_free(r); - } -} - -gpr_slice gpr_slice_new_with_user_data(void *p, size_t len, - void (*destroy)(void *), - void *user_data) { - gpr_slice slice; - new_slice_refcount *rc = gpr_malloc(sizeof(new_slice_refcount)); - gpr_ref_init(&rc->refs, 1); - rc->rc.ref = new_slice_ref; - rc->rc.unref = new_slice_unref; - rc->user_destroy = destroy; - rc->user_data = user_data; - - slice.refcount = &rc->rc; - slice.data.refcounted.bytes = p; - slice.data.refcounted.length = len; - return slice; -} - -gpr_slice gpr_slice_new(void *p, size_t len, void (*destroy)(void *)) { - /* Pass "p" to *destroy when the slice is no longer needed. */ - return gpr_slice_new_with_user_data(p, len, destroy, p); -} - -/* gpr_slice_new_with_len support structures - we create a refcount object - extended with the user provided data pointer & destroy function */ -typedef struct new_with_len_slice_refcount { - gpr_slice_refcount rc; - gpr_refcount refs; - void *user_data; - size_t user_length; - void (*user_destroy)(void *, size_t); -} new_with_len_slice_refcount; - -static void new_with_len_ref(void *p) { - new_with_len_slice_refcount *r = p; - gpr_ref(&r->refs); -} - -static void new_with_len_unref(void *p) { - new_with_len_slice_refcount *r = p; - if (gpr_unref(&r->refs)) { - r->user_destroy(r->user_data, r->user_length); - gpr_free(r); - } -} - -gpr_slice gpr_slice_new_with_len(void *p, size_t len, - void (*destroy)(void *, size_t)) { - gpr_slice slice; - new_with_len_slice_refcount *rc = - gpr_malloc(sizeof(new_with_len_slice_refcount)); - gpr_ref_init(&rc->refs, 1); - rc->rc.ref = new_with_len_ref; - rc->rc.unref = new_with_len_unref; - rc->user_destroy = destroy; - rc->user_data = p; - rc->user_length = len; - - slice.refcount = &rc->rc; - slice.data.refcounted.bytes = p; - slice.data.refcounted.length = len; - return slice; -} - -gpr_slice gpr_slice_from_copied_buffer(const char *source, size_t length) { - gpr_slice slice = gpr_slice_malloc(length); - memcpy(GPR_SLICE_START_PTR(slice), source, length); - return slice; -} - -gpr_slice gpr_slice_from_copied_string(const char *source) { - return gpr_slice_from_copied_buffer(source, strlen(source)); -} - -typedef struct { - gpr_slice_refcount base; - gpr_refcount refs; -} malloc_refcount; - -static void malloc_ref(void *p) { - malloc_refcount *r = p; - gpr_ref(&r->refs); -} - -static void malloc_unref(void *p) { - malloc_refcount *r = p; - if (gpr_unref(&r->refs)) { - gpr_free(r); - } -} - -gpr_slice gpr_slice_malloc(size_t length) { - gpr_slice slice; - - if (length > sizeof(slice.data.inlined.bytes)) { - /* Memory layout used by the slice created here: - - +-----------+----------------------------------------------------------+ - | refcount | bytes | - +-----------+----------------------------------------------------------+ - - refcount is a malloc_refcount - bytes is an array of bytes of the requested length - Both parts are placed in the same allocation returned from gpr_malloc */ - malloc_refcount *rc = gpr_malloc(sizeof(malloc_refcount) + length); - - /* Initial refcount on rc is 1 - and it's up to the caller to release - this reference. */ - gpr_ref_init(&rc->refs, 1); - - rc->base.ref = malloc_ref; - rc->base.unref = malloc_unref; - - /* Build up the slice to be returned. */ - /* The slices refcount points back to the allocated block. */ - slice.refcount = &rc->base; - /* The data bytes are placed immediately after the refcount struct */ - slice.data.refcounted.bytes = (uint8_t *)(rc + 1); - /* And the length of the block is set to the requested length */ - slice.data.refcounted.length = length; - } else { - /* small slice: just inline the data */ - slice.refcount = NULL; - slice.data.inlined.length = (uint8_t)length; - } - return slice; -} - -gpr_slice gpr_slice_sub_no_ref(gpr_slice source, size_t begin, size_t end) { - gpr_slice subset; - - GPR_ASSERT(end >= begin); - - if (source.refcount) { - /* Enforce preconditions */ - GPR_ASSERT(source.data.refcounted.length >= end); - - /* Build the result */ - subset.refcount = source.refcount; - /* Point into the source array */ - subset.data.refcounted.bytes = source.data.refcounted.bytes + begin; - subset.data.refcounted.length = end - begin; - } else { - /* Enforce preconditions */ - GPR_ASSERT(source.data.inlined.length >= end); - subset.refcount = NULL; - subset.data.inlined.length = (uint8_t)(end - begin); - memcpy(subset.data.inlined.bytes, source.data.inlined.bytes + begin, - end - begin); - } - return subset; -} - -gpr_slice gpr_slice_sub(gpr_slice source, size_t begin, size_t end) { - gpr_slice subset; - - if (end - begin <= sizeof(subset.data.inlined.bytes)) { - subset.refcount = NULL; - subset.data.inlined.length = (uint8_t)(end - begin); - memcpy(subset.data.inlined.bytes, GPR_SLICE_START_PTR(source) + begin, - end - begin); - } else { - subset = gpr_slice_sub_no_ref(source, begin, end); - /* Bump the refcount */ - subset.refcount->ref(subset.refcount); - } - return subset; -} - -gpr_slice gpr_slice_split_tail(gpr_slice *source, size_t split) { - gpr_slice tail; - - if (source->refcount == NULL) { - /* inlined data, copy it out */ - GPR_ASSERT(source->data.inlined.length >= split); - tail.refcount = NULL; - tail.data.inlined.length = (uint8_t)(source->data.inlined.length - split); - memcpy(tail.data.inlined.bytes, source->data.inlined.bytes + split, - tail.data.inlined.length); - source->data.inlined.length = (uint8_t)split; - } else { - size_t tail_length = source->data.refcounted.length - split; - GPR_ASSERT(source->data.refcounted.length >= split); - if (tail_length < sizeof(tail.data.inlined.bytes)) { - /* Copy out the bytes - it'll be cheaper than refcounting */ - tail.refcount = NULL; - tail.data.inlined.length = (uint8_t)tail_length; - memcpy(tail.data.inlined.bytes, source->data.refcounted.bytes + split, - tail_length); - } else { - /* Build the result */ - tail.refcount = source->refcount; - /* Bump the refcount */ - tail.refcount->ref(tail.refcount); - /* Point into the source array */ - tail.data.refcounted.bytes = source->data.refcounted.bytes + split; - tail.data.refcounted.length = tail_length; - } - source->data.refcounted.length = split; - } - - return tail; -} - -gpr_slice gpr_slice_split_head(gpr_slice *source, size_t split) { - gpr_slice head; - - if (source->refcount == NULL) { - GPR_ASSERT(source->data.inlined.length >= split); - - head.refcount = NULL; - head.data.inlined.length = (uint8_t)split; - memcpy(head.data.inlined.bytes, source->data.inlined.bytes, split); - source->data.inlined.length = - (uint8_t)(source->data.inlined.length - split); - memmove(source->data.inlined.bytes, source->data.inlined.bytes + split, - source->data.inlined.length); - } else if (split < sizeof(head.data.inlined.bytes)) { - GPR_ASSERT(source->data.refcounted.length >= split); - - head.refcount = NULL; - head.data.inlined.length = (uint8_t)split; - memcpy(head.data.inlined.bytes, source->data.refcounted.bytes, split); - source->data.refcounted.bytes += split; - source->data.refcounted.length -= split; - } else { - GPR_ASSERT(source->data.refcounted.length >= split); - - /* Build the result */ - head.refcount = source->refcount; - /* Bump the refcount */ - head.refcount->ref(head.refcount); - /* Point into the source array */ - head.data.refcounted.bytes = source->data.refcounted.bytes; - head.data.refcounted.length = split; - source->data.refcounted.bytes += split; - source->data.refcounted.length -= split; - } - - return head; -} - -int gpr_slice_cmp(gpr_slice a, gpr_slice b) { - int d = (int)(GPR_SLICE_LENGTH(a) - GPR_SLICE_LENGTH(b)); - if (d != 0) return d; - return memcmp(GPR_SLICE_START_PTR(a), GPR_SLICE_START_PTR(b), - GPR_SLICE_LENGTH(a)); -} - -int gpr_slice_str_cmp(gpr_slice a, const char *b) { - size_t b_length = strlen(b); - int d = (int)(GPR_SLICE_LENGTH(a) - b_length); - if (d != 0) return d; - return memcmp(GPR_SLICE_START_PTR(a), b, b_length); -} diff --git a/src/core/lib/support/slice_buffer.c b/src/core/lib/support/slice_buffer.c deleted file mode 100644 index 66f111d767..0000000000 --- a/src/core/lib/support/slice_buffer.c +++ /dev/null @@ -1,282 +0,0 @@ -/* - * - * 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. - * - */ - -#include -#include - -#include - -#include -#include -#include - -/* grow a buffer; requires GRPC_SLICE_BUFFER_INLINE_ELEMENTS > 1 */ -#define GROW(x) (3 * (x) / 2) - -static void maybe_embiggen(gpr_slice_buffer *sb) { - if (sb->count == sb->capacity) { - sb->capacity = GROW(sb->capacity); - GPR_ASSERT(sb->capacity > sb->count); - if (sb->slices == sb->inlined) { - sb->slices = gpr_malloc(sb->capacity * sizeof(gpr_slice)); - memcpy(sb->slices, sb->inlined, sb->count * sizeof(gpr_slice)); - } else { - sb->slices = gpr_realloc(sb->slices, sb->capacity * sizeof(gpr_slice)); - } - } -} - -void gpr_slice_buffer_init(gpr_slice_buffer *sb) { - sb->count = 0; - sb->length = 0; - sb->capacity = GRPC_SLICE_BUFFER_INLINE_ELEMENTS; - sb->slices = sb->inlined; -} - -void gpr_slice_buffer_destroy(gpr_slice_buffer *sb) { - gpr_slice_buffer_reset_and_unref(sb); - if (sb->slices != sb->inlined) { - gpr_free(sb->slices); - } -} - -uint8_t *gpr_slice_buffer_tiny_add(gpr_slice_buffer *sb, size_t n) { - gpr_slice *back; - uint8_t *out; - - sb->length += n; - - if (sb->count == 0) goto add_new; - back = &sb->slices[sb->count - 1]; - if (back->refcount) goto add_new; - if ((back->data.inlined.length + n) > sizeof(back->data.inlined.bytes)) - goto add_new; - out = back->data.inlined.bytes + back->data.inlined.length; - back->data.inlined.length = (uint8_t)(back->data.inlined.length + n); - return out; - -add_new: - maybe_embiggen(sb); - back = &sb->slices[sb->count]; - sb->count++; - back->refcount = NULL; - back->data.inlined.length = (uint8_t)n; - return back->data.inlined.bytes; -} - -size_t gpr_slice_buffer_add_indexed(gpr_slice_buffer *sb, gpr_slice s) { - size_t out = sb->count; - maybe_embiggen(sb); - sb->slices[out] = s; - sb->length += GPR_SLICE_LENGTH(s); - sb->count = out + 1; - return out; -} - -void gpr_slice_buffer_add(gpr_slice_buffer *sb, gpr_slice s) { - size_t n = sb->count; - /* if both the last slice in the slice buffer and the slice being added - are inlined (that is, that they carry their data inside the slice data - structure), and the back slice is not full, then concatenate directly - into the back slice, preventing many small slices being passed into - writes */ - if (!s.refcount && n) { - gpr_slice *back = &sb->slices[n - 1]; - if (!back->refcount && back->data.inlined.length < GPR_SLICE_INLINED_SIZE) { - if (s.data.inlined.length + back->data.inlined.length <= - GPR_SLICE_INLINED_SIZE) { - memcpy(back->data.inlined.bytes + back->data.inlined.length, - s.data.inlined.bytes, s.data.inlined.length); - back->data.inlined.length = - (uint8_t)(back->data.inlined.length + s.data.inlined.length); - } else { - size_t cp1 = GPR_SLICE_INLINED_SIZE - back->data.inlined.length; - memcpy(back->data.inlined.bytes + back->data.inlined.length, - s.data.inlined.bytes, cp1); - back->data.inlined.length = GPR_SLICE_INLINED_SIZE; - maybe_embiggen(sb); - back = &sb->slices[n]; - sb->count = n + 1; - back->refcount = NULL; - back->data.inlined.length = (uint8_t)(s.data.inlined.length - cp1); - memcpy(back->data.inlined.bytes, s.data.inlined.bytes + cp1, - s.data.inlined.length - cp1); - } - sb->length += s.data.inlined.length; - return; /* early out */ - } - } - gpr_slice_buffer_add_indexed(sb, s); -} - -void gpr_slice_buffer_addn(gpr_slice_buffer *sb, gpr_slice *s, size_t n) { - size_t i; - for (i = 0; i < n; i++) { - gpr_slice_buffer_add(sb, s[i]); - } -} - -void gpr_slice_buffer_pop(gpr_slice_buffer *sb) { - if (sb->count != 0) { - size_t count = --sb->count; - sb->length -= GPR_SLICE_LENGTH(sb->slices[count]); - } -} - -void gpr_slice_buffer_reset_and_unref(gpr_slice_buffer *sb) { - size_t i; - - for (i = 0; i < sb->count; i++) { - gpr_slice_unref(sb->slices[i]); - } - - sb->count = 0; - sb->length = 0; -} - -void gpr_slice_buffer_swap(gpr_slice_buffer *a, gpr_slice_buffer *b) { - GPR_SWAP(size_t, a->count, b->count); - GPR_SWAP(size_t, a->capacity, b->capacity); - GPR_SWAP(size_t, a->length, b->length); - - if (a->slices == a->inlined) { - if (b->slices == b->inlined) { - /* swap contents of inlined buffer */ - gpr_slice temp[GRPC_SLICE_BUFFER_INLINE_ELEMENTS]; - memcpy(temp, a->slices, b->count * sizeof(gpr_slice)); - memcpy(a->slices, b->slices, a->count * sizeof(gpr_slice)); - memcpy(b->slices, temp, b->count * sizeof(gpr_slice)); - } else { - /* a is inlined, b is not - copy a inlined into b, fix pointers */ - a->slices = b->slices; - b->slices = b->inlined; - memcpy(b->slices, a->inlined, b->count * sizeof(gpr_slice)); - } - } else if (b->slices == b->inlined) { - /* b is inlined, a is not - copy b inlined int a, fix pointers */ - b->slices = a->slices; - a->slices = a->inlined; - memcpy(a->slices, b->inlined, a->count * sizeof(gpr_slice)); - } else { - /* no inlining: easy swap */ - GPR_SWAP(gpr_slice *, a->slices, b->slices); - } -} - -void gpr_slice_buffer_move_into(gpr_slice_buffer *src, gpr_slice_buffer *dst) { - /* anything to move? */ - if (src->count == 0) { - return; - } - /* anything in dst? */ - if (dst->count == 0) { - gpr_slice_buffer_swap(src, dst); - return; - } - /* both buffers have data - copy, and reset src */ - gpr_slice_buffer_addn(dst, src->slices, src->count); - src->count = 0; - src->length = 0; -} - -void gpr_slice_buffer_move_first(gpr_slice_buffer *src, size_t n, - gpr_slice_buffer *dst) { - size_t src_idx; - size_t output_len = dst->length + n; - size_t new_input_len = src->length - n; - GPR_ASSERT(src->length >= n); - if (src->length == n) { - gpr_slice_buffer_move_into(src, dst); - return; - } - src_idx = 0; - while (src_idx < src->capacity) { - gpr_slice slice = src->slices[src_idx]; - size_t slice_len = GPR_SLICE_LENGTH(slice); - if (n > slice_len) { - gpr_slice_buffer_add(dst, slice); - n -= slice_len; - src_idx++; - } else if (n == slice_len) { - gpr_slice_buffer_add(dst, slice); - src_idx++; - break; - } else { /* n < slice_len */ - src->slices[src_idx] = gpr_slice_split_tail(&slice, n); - GPR_ASSERT(GPR_SLICE_LENGTH(slice) == n); - GPR_ASSERT(GPR_SLICE_LENGTH(src->slices[src_idx]) == slice_len - n); - gpr_slice_buffer_add(dst, slice); - break; - } - } - GPR_ASSERT(dst->length == output_len); - memmove(src->slices, src->slices + src_idx, - sizeof(gpr_slice) * (src->count - src_idx)); - src->count -= src_idx; - src->length = new_input_len; - GPR_ASSERT(src->count > 0); -} - -void gpr_slice_buffer_trim_end(gpr_slice_buffer *sb, size_t n, - gpr_slice_buffer *garbage) { - GPR_ASSERT(n <= sb->length); - sb->length -= n; - for (;;) { - size_t idx = sb->count - 1; - gpr_slice slice = sb->slices[idx]; - size_t slice_len = GPR_SLICE_LENGTH(slice); - if (slice_len > n) { - sb->slices[idx] = gpr_slice_split_head(&slice, slice_len - n); - gpr_slice_buffer_add_indexed(garbage, slice); - return; - } else if (slice_len == n) { - gpr_slice_buffer_add_indexed(garbage, slice); - sb->count = idx; - return; - } else { - gpr_slice_buffer_add_indexed(garbage, slice); - n -= slice_len; - sb->count = idx; - } - } -} - -gpr_slice gpr_slice_buffer_take_first(gpr_slice_buffer *sb) { - gpr_slice slice; - GPR_ASSERT(sb->count > 0); - slice = sb->slices[0]; - memmove(&sb->slices[0], &sb->slices[1], (sb->count - 1) * sizeof(gpr_slice)); - sb->count--; - sb->length -= GPR_SLICE_LENGTH(slice); - return slice; -} diff --git a/src/core/lib/support/string.c b/src/core/lib/support/string.c index d17fb9da4b..dc243bf0bf 100644 --- a/src/core/lib/support/string.c +++ b/src/core/lib/support/string.c @@ -120,11 +120,6 @@ char *gpr_dump(const char *buf, size_t len, uint32_t flags) { return out.data; } -char *gpr_dump_slice(gpr_slice s, uint32_t flags) { - return gpr_dump((const char *)GPR_SLICE_START_PTR(s), GPR_SLICE_LENGTH(s), - flags); -} - int gpr_parse_bytes_to_uint32(const char *buf, size_t len, uint32_t *result) { uint32_t out = 0; uint32_t new; @@ -239,50 +234,6 @@ char *gpr_strjoin_sep(const char **strs, size_t nstrs, const char *sep, return out; } -/** Finds the initial (\a begin) and final (\a end) offsets of the next - * substring from \a str + \a read_offset until the next \a sep or the end of \a - * str. - * - * Returns 1 and updates \a begin and \a end. Returns 0 otherwise. */ -static int slice_find_separator_offset(const gpr_slice str, const char *sep, - const size_t read_offset, size_t *begin, - size_t *end) { - size_t i; - const uint8_t *str_ptr = GPR_SLICE_START_PTR(str) + read_offset; - const size_t str_len = GPR_SLICE_LENGTH(str) - read_offset; - const size_t sep_len = strlen(sep); - if (str_len < sep_len) { - return 0; - } - - for (i = 0; i <= str_len - sep_len; i++) { - if (memcmp(str_ptr + i, sep, sep_len) == 0) { - *begin = read_offset; - *end = read_offset + i; - return 1; - } - } - return 0; -} - -void gpr_slice_split(gpr_slice str, const char *sep, gpr_slice_buffer *dst) { - const size_t sep_len = strlen(sep); - size_t begin, end; - - GPR_ASSERT(sep_len > 0); - - if (slice_find_separator_offset(str, sep, 0, &begin, &end) != 0) { - do { - gpr_slice_buffer_add_indexed(dst, gpr_slice_sub(str, begin, end)); - } while (slice_find_separator_offset(str, sep, end + sep_len, &begin, - &end) != 0); - gpr_slice_buffer_add_indexed( - dst, gpr_slice_sub(str, end + sep_len, GPR_SLICE_LENGTH(str))); - } else { /* no sep found, add whole input */ - gpr_slice_buffer_add_indexed(dst, gpr_slice_ref(str)); - } -} - void gpr_strvec_init(gpr_strvec *sv) { memset(sv, 0, sizeof(*sv)); } void gpr_strvec_destroy(gpr_strvec *sv) { diff --git a/src/core/lib/support/string.h b/src/core/lib/support/string.h index 9a94e9471c..2cd908aad6 100644 --- a/src/core/lib/support/string.h +++ b/src/core/lib/support/string.h @@ -54,9 +54,6 @@ extern "C" { Result should be freed with gpr_free() */ char *gpr_dump(const char *buf, size_t len, uint32_t flags); -/* Calls gpr_dump on a slice. */ -char *gpr_dump_slice(gpr_slice slice, uint32_t flags); - /* Parses an array of bytes into an integer (base 10). Returns 1 on success, 0 on failure. */ int gpr_parse_bytes_to_uint32(const char *data, size_t length, @@ -98,10 +95,6 @@ char *gpr_strjoin(const char **strs, size_t nstrs, size_t *total_length); char *gpr_strjoin_sep(const char **strs, size_t nstrs, const char *sep, size_t *total_length); -/** Split \a str by the separator \a sep. Results are stored in \a dst, which - * should be a properly initialized instance. */ -void gpr_slice_split(gpr_slice str, const char *sep, gpr_slice_buffer *dst); - /* A vector of strings... for building up a final string one piece at a time */ typedef struct { char **strs; diff --git a/src/core/lib/surface/byte_buffer.c b/src/core/lib/surface/byte_buffer.c index 054a6e6c58..5ae7e3264b 100644 --- a/src/core/lib/surface/byte_buffer.c +++ b/src/core/lib/surface/byte_buffer.c @@ -35,22 +35,22 @@ #include #include -grpc_byte_buffer *grpc_raw_byte_buffer_create(gpr_slice *slices, +grpc_byte_buffer *grpc_raw_byte_buffer_create(grpc_slice *slices, size_t nslices) { return grpc_raw_compressed_byte_buffer_create(slices, nslices, GRPC_COMPRESS_NONE); } grpc_byte_buffer *grpc_raw_compressed_byte_buffer_create( - gpr_slice *slices, size_t nslices, grpc_compression_algorithm compression) { + grpc_slice *slices, size_t nslices, grpc_compression_algorithm compression) { size_t i; grpc_byte_buffer *bb = gpr_malloc(sizeof(grpc_byte_buffer)); bb->type = GRPC_BB_RAW; bb->data.raw.compression = compression; - gpr_slice_buffer_init(&bb->data.raw.slice_buffer); + grpc_slice_buffer_init(&bb->data.raw.slice_buffer); for (i = 0; i < nslices; i++) { - gpr_slice_ref(slices[i]); - gpr_slice_buffer_add(&bb->data.raw.slice_buffer, slices[i]); + grpc_slice_ref(slices[i]); + grpc_slice_buffer_add(&bb->data.raw.slice_buffer, slices[i]); } return bb; } @@ -58,13 +58,13 @@ grpc_byte_buffer *grpc_raw_compressed_byte_buffer_create( grpc_byte_buffer *grpc_raw_byte_buffer_from_reader( grpc_byte_buffer_reader *reader) { grpc_byte_buffer *bb = gpr_malloc(sizeof(grpc_byte_buffer)); - gpr_slice slice; + grpc_slice slice; bb->type = GRPC_BB_RAW; bb->data.raw.compression = GRPC_COMPRESS_NONE; - gpr_slice_buffer_init(&bb->data.raw.slice_buffer); + grpc_slice_buffer_init(&bb->data.raw.slice_buffer); while (grpc_byte_buffer_reader_next(reader, &slice)) { - gpr_slice_buffer_add(&bb->data.raw.slice_buffer, slice); + grpc_slice_buffer_add(&bb->data.raw.slice_buffer, slice); } return bb; } @@ -83,7 +83,7 @@ void grpc_byte_buffer_destroy(grpc_byte_buffer *bb) { if (!bb) return; switch (bb->type) { case GRPC_BB_RAW: - gpr_slice_buffer_destroy(&bb->data.raw.slice_buffer); + grpc_slice_buffer_destroy(&bb->data.raw.slice_buffer); break; } gpr_free(bb); diff --git a/src/core/lib/surface/byte_buffer_reader.c b/src/core/lib/surface/byte_buffer_reader.c index 310bacb2c9..9455709b4b 100644 --- a/src/core/lib/surface/byte_buffer_reader.c +++ b/src/core/lib/surface/byte_buffer_reader.c @@ -56,11 +56,11 @@ static int is_compressed(grpc_byte_buffer *buffer) { int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader, grpc_byte_buffer *buffer) { - gpr_slice_buffer decompressed_slices_buffer; + grpc_slice_buffer decompressed_slices_buffer; reader->buffer_in = buffer; switch (reader->buffer_in->type) { case GRPC_BB_RAW: - gpr_slice_buffer_init(&decompressed_slices_buffer); + grpc_slice_buffer_init(&decompressed_slices_buffer); if (is_compressed(reader->buffer_in)) { if (grpc_msg_decompress(reader->buffer_in->data.raw.compression, &reader->buffer_in->data.raw.slice_buffer, @@ -76,7 +76,7 @@ int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader, grpc_raw_byte_buffer_create(decompressed_slices_buffer.slices, decompressed_slices_buffer.count); } - gpr_slice_buffer_destroy(&decompressed_slices_buffer); + grpc_slice_buffer_destroy(&decompressed_slices_buffer); } else { /* not compressed, use the input buffer as output */ reader->buffer_out = reader->buffer_in; } @@ -98,13 +98,13 @@ void grpc_byte_buffer_reader_destroy(grpc_byte_buffer_reader *reader) { } int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader *reader, - gpr_slice *slice) { + grpc_slice *slice) { switch (reader->buffer_in->type) { case GRPC_BB_RAW: { - gpr_slice_buffer *slice_buffer; + grpc_slice_buffer *slice_buffer; slice_buffer = &reader->buffer_out->data.raw.slice_buffer; if (reader->current.index < slice_buffer->count) { - *slice = gpr_slice_ref(slice_buffer->slices[reader->current.index]); + *slice = grpc_slice_ref(slice_buffer->slices[reader->current.index]); reader->current.index += 1; return 1; } @@ -114,18 +114,18 @@ int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader *reader, return 0; } -gpr_slice grpc_byte_buffer_reader_readall(grpc_byte_buffer_reader *reader) { - gpr_slice in_slice; +grpc_slice grpc_byte_buffer_reader_readall(grpc_byte_buffer_reader *reader) { + grpc_slice in_slice; size_t bytes_read = 0; const size_t input_size = grpc_byte_buffer_length(reader->buffer_out); - gpr_slice out_slice = gpr_slice_malloc(input_size); + grpc_slice out_slice = grpc_slice_malloc(input_size); uint8_t *const outbuf = GPR_SLICE_START_PTR(out_slice); /* just an alias */ while (grpc_byte_buffer_reader_next(reader, &in_slice) != 0) { const size_t slice_length = GPR_SLICE_LENGTH(in_slice); memcpy(&(outbuf[bytes_read]), GPR_SLICE_START_PTR(in_slice), slice_length); bytes_read += slice_length; - gpr_slice_unref(in_slice); + grpc_slice_unref(in_slice); GPR_ASSERT(bytes_read <= input_size); } return out_slice; diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index ee94f274f8..06dc5f5942 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -183,7 +183,7 @@ struct grpc_call { grpc_slice_buffer_stream sending_stream; grpc_byte_stream *receiving_stream; grpc_byte_buffer **receiving_buffer; - gpr_slice receiving_slice; + grpc_slice receiving_slice; grpc_closure receiving_slice_ready; grpc_closure receiving_stream_ready; grpc_closure receiving_initial_metadata_ready; @@ -492,8 +492,8 @@ static void destroy_encodings_accepted_by_peer(void *p) { return; } static void set_encodings_accepted_by_peer(grpc_call *call, grpc_mdelem *mdel) { size_t i; grpc_compression_algorithm algorithm; - gpr_slice_buffer accept_encoding_parts; - gpr_slice accept_encoding_slice; + grpc_slice_buffer accept_encoding_parts; + grpc_slice accept_encoding_slice; void *accepted_user_data; accepted_user_data = @@ -505,15 +505,15 @@ static void set_encodings_accepted_by_peer(grpc_call *call, grpc_mdelem *mdel) { } accept_encoding_slice = mdel->value->slice; - gpr_slice_buffer_init(&accept_encoding_parts); - gpr_slice_split(accept_encoding_slice, ",", &accept_encoding_parts); + grpc_slice_buffer_init(&accept_encoding_parts); + grpc_slice_split(accept_encoding_slice, ",", &accept_encoding_parts); /* No need to zero call->encodings_accepted_by_peer: grpc_call_create already * zeroes the whole grpc_call */ /* Always support no compression */ GPR_BITSET(&call->encodings_accepted_by_peer, GRPC_COMPRESS_NONE); for (i = 0; i < accept_encoding_parts.count; i++) { - const gpr_slice *accept_encoding_entry_slice = + const grpc_slice *accept_encoding_entry_slice = &accept_encoding_parts.slices[i]; if (grpc_compression_algorithm_parse( (const char *)GPR_SLICE_START_PTR(*accept_encoding_entry_slice), @@ -529,7 +529,7 @@ static void set_encodings_accepted_by_peer(grpc_call *call, grpc_mdelem *mdel) { } } - gpr_slice_buffer_destroy(&accept_encoding_parts); + grpc_slice_buffer_destroy(&accept_encoding_parts); grpc_mdelem_set_user_data( mdel, destroy_encodings_accepted_by_peer, @@ -550,7 +550,7 @@ static void get_final_details(grpc_call *call, char **out_details, for (i = 0; i < STATUS_SOURCE_COUNT; i++) { if (call->status[i].is_set) { if (call->status[i].details) { - gpr_slice details = call->status[i].details->slice; + grpc_slice details = call->status[i].details->slice; size_t len = GPR_SLICE_LENGTH(details); if (len + 1 > *out_details_capacity) { *out_details_capacity = @@ -1084,7 +1084,7 @@ static void continue_receiving_slices(grpc_exec_ctx *exec_ctx, if (grpc_byte_stream_next(exec_ctx, call->receiving_stream, &call->receiving_slice, remaining, &call->receiving_slice_ready)) { - gpr_slice_buffer_add(&(*call->receiving_buffer)->data.raw.slice_buffer, + grpc_slice_buffer_add(&(*call->receiving_buffer)->data.raw.slice_buffer, call->receiving_slice); } else { return; @@ -1098,7 +1098,7 @@ static void receiving_slice_ready(grpc_exec_ctx *exec_ctx, void *bctlp, grpc_call *call = bctl->call; if (error == GRPC_ERROR_NONE) { - gpr_slice_buffer_add(&(*call->receiving_buffer)->data.raw.slice_buffer, + grpc_slice_buffer_add(&(*call->receiving_buffer)->data.raw.slice_buffer, call->receiving_slice); continue_receiving_slices(exec_ctx, bctl); } else { diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index be16162e7f..2045e59e53 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -264,13 +264,13 @@ static void channel_broadcaster_init(grpc_server *s, channel_broadcaster *cb) { struct shutdown_cleanup_args { grpc_closure closure; - gpr_slice slice; + grpc_slice slice; }; static void shutdown_cleanup(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { struct shutdown_cleanup_args *a = arg; - gpr_slice_unref(a->slice); + grpc_slice_unref(a->slice); gpr_free(a); } @@ -283,7 +283,7 @@ static void send_shutdown(grpc_exec_ctx *exec_ctx, grpc_channel *channel, op->send_goaway = send_goaway; op->set_accept_stream = true; - sc->slice = gpr_slice_from_copied_string("Server shutdown"); + sc->slice = grpc_slice_from_copied_string("Server shutdown"); op->goaway_message = &sc->slice; op->goaway_status = GRPC_STATUS_OK; op->disconnect_with_error = send_disconnect; @@ -459,7 +459,7 @@ static void destroy_channel(grpc_exec_ctx *exec_ctx, channel_data *chand, } static void cpstr(char **dest, size_t *capacity, grpc_mdstr *value) { - gpr_slice slice = value->slice; + grpc_slice slice = value->slice; size_t len = GPR_SLICE_LENGTH(slice); if (len + 1 > *capacity) { diff --git a/src/core/lib/transport/byte_stream.c b/src/core/lib/transport/byte_stream.c index 2f6c75cb6a..2f1d7b7c60 100644 --- a/src/core/lib/transport/byte_stream.c +++ b/src/core/lib/transport/byte_stream.c @@ -38,7 +38,7 @@ #include int grpc_byte_stream_next(grpc_exec_ctx *exec_ctx, - grpc_byte_stream *byte_stream, gpr_slice *slice, + grpc_byte_stream *byte_stream, grpc_slice *slice, size_t max_size_hint, grpc_closure *on_complete) { return byte_stream->next(exec_ctx, byte_stream, slice, max_size_hint, on_complete); @@ -53,11 +53,11 @@ void grpc_byte_stream_destroy(grpc_exec_ctx *exec_ctx, static int slice_buffer_stream_next(grpc_exec_ctx *exec_ctx, grpc_byte_stream *byte_stream, - gpr_slice *slice, size_t max_size_hint, + grpc_slice *slice, size_t max_size_hint, grpc_closure *on_complete) { grpc_slice_buffer_stream *stream = (grpc_slice_buffer_stream *)byte_stream; GPR_ASSERT(stream->cursor < stream->backing_buffer->count); - *slice = gpr_slice_ref(stream->backing_buffer->slices[stream->cursor]); + *slice = grpc_slice_ref(stream->backing_buffer->slices[stream->cursor]); stream->cursor++; return 1; } @@ -66,7 +66,7 @@ static void slice_buffer_stream_destroy(grpc_exec_ctx *exec_ctx, grpc_byte_stream *byte_stream) {} void grpc_slice_buffer_stream_init(grpc_slice_buffer_stream *stream, - gpr_slice_buffer *slice_buffer, + grpc_slice_buffer *slice_buffer, uint32_t flags) { GPR_ASSERT(slice_buffer->length <= UINT32_MAX); stream->base.length = (uint32_t)slice_buffer->length; diff --git a/src/core/lib/transport/byte_stream.h b/src/core/lib/transport/byte_stream.h index e64dce6283..8139782701 100644 --- a/src/core/lib/transport/byte_stream.h +++ b/src/core/lib/transport/byte_stream.h @@ -50,7 +50,7 @@ struct grpc_byte_stream { uint32_t length; uint32_t flags; int (*next)(grpc_exec_ctx *exec_ctx, grpc_byte_stream *byte_stream, - gpr_slice *slice, size_t max_size_hint, + grpc_slice *slice, size_t max_size_hint, grpc_closure *on_complete); void (*destroy)(grpc_exec_ctx *exec_ctx, grpc_byte_stream *byte_stream); }; @@ -65,7 +65,7 @@ struct grpc_byte_stream { * once a slice is returned into *slice, it is owned by the caller. */ int grpc_byte_stream_next(grpc_exec_ctx *exec_ctx, - grpc_byte_stream *byte_stream, gpr_slice *slice, + grpc_byte_stream *byte_stream, grpc_slice *slice, size_t max_size_hint, grpc_closure *on_complete); void grpc_byte_stream_destroy(grpc_exec_ctx *exec_ctx, @@ -74,12 +74,12 @@ void grpc_byte_stream_destroy(grpc_exec_ctx *exec_ctx, /* grpc_byte_stream that wraps a slice buffer */ typedef struct grpc_slice_buffer_stream { grpc_byte_stream base; - gpr_slice_buffer *backing_buffer; + grpc_slice_buffer *backing_buffer; size_t cursor; } grpc_slice_buffer_stream; void grpc_slice_buffer_stream_init(grpc_slice_buffer_stream *stream, - gpr_slice_buffer *slice_buffer, + grpc_slice_buffer *slice_buffer, uint32_t flags); #endif /* GRPC_CORE_LIB_TRANSPORT_BYTE_STREAM_H */ diff --git a/src/core/lib/transport/metadata.c b/src/core/lib/transport/metadata.c index 4b40c275ad..b8364c4cb7 100644 --- a/src/core/lib/transport/metadata.c +++ b/src/core/lib/transport/metadata.c @@ -51,7 +51,7 @@ #include "src/core/lib/support/string.h" #include "src/core/lib/transport/static_metadata.h" -gpr_slice (*grpc_chttp2_base64_encode_and_huffman_compress)(gpr_slice input); +grpc_slice (*grpc_chttp2_base64_encode_and_huffman_compress)(grpc_slice input); /* There are two kinds of mdelem and mdstr instances. * Static instances are declared in static_metadata.{h,c} and @@ -85,16 +85,16 @@ typedef void (*destroy_user_data_func)(void *user_data); /* Shadow structure for grpc_mdstr for non-static values */ typedef struct internal_string { /* must be byte compatible with grpc_mdstr */ - gpr_slice slice; + grpc_slice slice; uint32_t hash; /* private only data */ gpr_atm refcnt; uint8_t has_base64_and_huffman_encoded; - gpr_slice_refcount refcount; + grpc_slice_refcount refcount; - gpr_slice base64_and_huffman; + grpc_slice base64_and_huffman; gpr_atm size_in_decoder_table; @@ -174,7 +174,7 @@ void grpc_mdctx_global_init(void) { grpc_mdstr *elem = &grpc_static_mdstr_table[i]; const char *str = grpc_static_metadata_strings[i]; uint32_t hash = gpr_murmur_hash3(str, strlen(str), g_hash_seed); - *(gpr_slice *)&elem->slice = gpr_slice_from_static_string(str); + *(grpc_slice *)&elem->slice = grpc_slice_from_static_string(str); *(uint32_t *)&elem->hash = hash; for (j = 0;; j++) { size_t idx = (hash + j) % GPR_ARRAY_SIZE(g_static_strtab); @@ -321,7 +321,7 @@ static void internal_destroy_string(strtab_shard *shard, internal_string *is) { internal_string *cur; GPR_TIMER_BEGIN("internal_destroy_string", 0); if (is->has_base64_and_huffman_encoded) { - gpr_slice_unref(is->base64_and_huffman); + grpc_slice_unref(is->base64_and_huffman); } for (prev_next = &shard->strs[TABLE_IDX(is->hash, LOG2_STRTAB_SHARD_COUNT, shard->capacity)], @@ -350,10 +350,10 @@ grpc_mdstr *grpc_mdstr_from_string(const char *str) { return grpc_mdstr_from_buffer((const uint8_t *)str, strlen(str)); } -grpc_mdstr *grpc_mdstr_from_slice(gpr_slice slice) { +grpc_mdstr *grpc_mdstr_from_slice(grpc_slice slice) { grpc_mdstr *result = grpc_mdstr_from_buffer(GPR_SLICE_START_PTR(slice), GPR_SLICE_LENGTH(slice)); - gpr_slice_unref(slice); + grpc_slice_unref(slice); return result; } @@ -589,7 +589,7 @@ grpc_mdelem *grpc_mdelem_from_strings(const char *key, const char *value) { grpc_mdstr_from_string(value)); } -grpc_mdelem *grpc_mdelem_from_slices(gpr_slice key, gpr_slice value) { +grpc_mdelem *grpc_mdelem_from_slices(grpc_slice key, grpc_slice value) { return grpc_mdelem_from_metadata_strings(grpc_mdstr_from_slice(key), grpc_mdstr_from_slice(value)); } @@ -737,9 +737,9 @@ void grpc_mdelem_set_user_data(grpc_mdelem *md, void (*destroy_func)(void *), gpr_mu_unlock(&im->mu_user_data); } -gpr_slice grpc_mdstr_as_base64_encoded_and_huffman_compressed(grpc_mdstr *gs) { +grpc_slice grpc_mdstr_as_base64_encoded_and_huffman_compressed(grpc_mdstr *gs) { internal_string *s = (internal_string *)gs; - gpr_slice slice; + grpc_slice slice; strtab_shard *shard = &g_strtab_shard[SHARD_IDX(s->hash, LOG2_STRTAB_SHARD_COUNT)]; gpr_mu_lock(&shard->mu); diff --git a/src/core/lib/transport/metadata.h b/src/core/lib/transport/metadata.h index 71eff0acf2..5875ffb323 100644 --- a/src/core/lib/transport/metadata.h +++ b/src/core/lib/transport/metadata.h @@ -77,7 +77,7 @@ typedef struct grpc_mdelem grpc_mdelem; /* if changing this, make identical changes in internal_string in metadata.c */ struct grpc_mdstr { - const gpr_slice slice; + const grpc_slice slice; const uint32_t hash; /* there is a private part to this in metadata.c */ }; @@ -96,12 +96,12 @@ void grpc_test_only_set_metadata_hash_seed(uint32_t seed); clients may have handy */ grpc_mdstr *grpc_mdstr_from_string(const char *str); /* Unrefs the slice. */ -grpc_mdstr *grpc_mdstr_from_slice(gpr_slice slice); +grpc_mdstr *grpc_mdstr_from_slice(grpc_slice slice); grpc_mdstr *grpc_mdstr_from_buffer(const uint8_t *str, size_t length); /* Returns a borrowed slice from the mdstr with its contents base64 encoded and huffman compressed */ -gpr_slice grpc_mdstr_as_base64_encoded_and_huffman_compressed(grpc_mdstr *str); +grpc_slice grpc_mdstr_as_base64_encoded_and_huffman_compressed(grpc_mdstr *str); /* Constructors for grpc_mdelem instances; take a variety of data types that clients may have handy */ @@ -109,7 +109,7 @@ grpc_mdelem *grpc_mdelem_from_metadata_strings(grpc_mdstr *key, grpc_mdstr *value); grpc_mdelem *grpc_mdelem_from_strings(const char *key, const char *value); /* Unrefs the slices. */ -grpc_mdelem *grpc_mdelem_from_slices(gpr_slice key, gpr_slice value); +grpc_mdelem *grpc_mdelem_from_slices(grpc_slice key, grpc_slice value); grpc_mdelem *grpc_mdelem_from_string_and_buffer(const char *key, const uint8_t *value, size_t value_length); @@ -165,8 +165,8 @@ void grpc_mdctx_global_init(void); void grpc_mdctx_global_shutdown(void); /* Implementation provided by chttp2_transport */ -extern gpr_slice (*grpc_chttp2_base64_encode_and_huffman_compress)( - gpr_slice input); +extern grpc_slice (*grpc_chttp2_base64_encode_and_huffman_compress)( + grpc_slice input); #ifdef __cplusplus } diff --git a/src/core/lib/transport/transport.c b/src/core/lib/transport/transport.c index 75aec7a5b4..3ca85b12e9 100644 --- a/src/core/lib/transport/transport.c +++ b/src/core/lib/transport/transport.c @@ -207,11 +207,11 @@ void grpc_transport_stream_op_add_cancellation(grpc_transport_stream_op *op, void grpc_transport_stream_op_add_cancellation_with_message( grpc_transport_stream_op *op, grpc_status_code status, - gpr_slice *optional_message) { + grpc_slice *optional_message) { GPR_ASSERT(status != GRPC_STATUS_OK); if (op->cancel_error != GRPC_ERROR_NONE) { if (optional_message) { - gpr_slice_unref(*optional_message); + grpc_slice_unref(*optional_message); } return; } @@ -221,7 +221,7 @@ void grpc_transport_stream_op_add_cancellation_with_message( error = grpc_error_set_str(GRPC_ERROR_CREATE(msg), GRPC_ERROR_STR_GRPC_MESSAGE, msg); gpr_free(msg); - gpr_slice_unref(*optional_message); + grpc_slice_unref(*optional_message); } else { error = GRPC_ERROR_CREATE("Call cancelled"); } @@ -231,12 +231,12 @@ void grpc_transport_stream_op_add_cancellation_with_message( void grpc_transport_stream_op_add_close(grpc_transport_stream_op *op, grpc_status_code status, - gpr_slice *optional_message) { + grpc_slice *optional_message) { GPR_ASSERT(status != GRPC_STATUS_OK); if (op->cancel_error != GRPC_ERROR_NONE || op->close_error != GRPC_ERROR_NONE) { if (optional_message) { - gpr_slice_unref(*optional_message); + grpc_slice_unref(*optional_message); } return; } @@ -246,7 +246,7 @@ void grpc_transport_stream_op_add_close(grpc_transport_stream_op *op, error = grpc_error_set_str(GRPC_ERROR_CREATE(msg), GRPC_ERROR_STR_GRPC_MESSAGE, msg); gpr_free(msg); - gpr_slice_unref(*optional_message); + grpc_slice_unref(*optional_message); } else { error = GRPC_ERROR_CREATE("Call force closed"); } diff --git a/src/core/lib/transport/transport.h b/src/core/lib/transport/transport.h index 50253ebad1..8916b28b72 100644 --- a/src/core/lib/transport/transport.h +++ b/src/core/lib/transport/transport.h @@ -181,7 +181,7 @@ typedef struct grpc_transport_op { bool send_goaway; /** what should the goaway contain? */ grpc_status_code goaway_status; - gpr_slice *goaway_message; + grpc_slice *goaway_message; /** set the callback for accepting new streams; this is a permanent callback, unlike the other one-shot closures. If true, the callback is set to set_accept_stream_fn, with its @@ -249,11 +249,11 @@ void grpc_transport_stream_op_add_cancellation(grpc_transport_stream_op *op, void grpc_transport_stream_op_add_cancellation_with_message( grpc_transport_stream_op *op, grpc_status_code status, - gpr_slice *optional_message); + grpc_slice *optional_message); void grpc_transport_stream_op_add_close(grpc_transport_stream_op *op, grpc_status_code status, - gpr_slice *optional_message); + grpc_slice *optional_message); char *grpc_transport_stream_op_string(grpc_transport_stream_op *op); char *grpc_transport_op_string(grpc_transport_op *op); @@ -283,7 +283,7 @@ void grpc_transport_ping(grpc_transport *transport, grpc_closure *cb); /* Advise peer of pending connection termination. */ void grpc_transport_goaway(grpc_transport *transport, grpc_status_code status, - gpr_slice debug_data); + grpc_slice debug_data); /* Close a transport. Aborts all open streams. */ void grpc_transport_close(grpc_transport *transport); diff --git a/src/cpp/common/core_codegen.cc b/src/cpp/common/core_codegen.cc index ce02202976..ad874bb369 100644 --- a/src/cpp/common/core_codegen.cc +++ b/src/cpp/common/core_codegen.cc @@ -102,31 +102,31 @@ void CoreCodegen::grpc_byte_buffer_reader_destroy( } int CoreCodegen::grpc_byte_buffer_reader_next(grpc_byte_buffer_reader* reader, - gpr_slice* slice) { + grpc_slice* slice) { return ::grpc_byte_buffer_reader_next(reader, slice); } -grpc_byte_buffer* CoreCodegen::grpc_raw_byte_buffer_create(gpr_slice* slice, +grpc_byte_buffer* CoreCodegen::grpc_raw_byte_buffer_create(grpc_slice* slice, size_t nslices) { return ::grpc_raw_byte_buffer_create(slice, nslices); } -gpr_slice CoreCodegen::gpr_slice_malloc(size_t length) { - return ::gpr_slice_malloc(length); +grpc_slice CoreCodegen::grpc_slice_malloc(size_t length) { + return ::grpc_slice_malloc(length); } -void CoreCodegen::gpr_slice_unref(gpr_slice slice) { ::gpr_slice_unref(slice); } +void CoreCodegen::grpc_slice_unref(grpc_slice slice) { ::grpc_slice_unref(slice); } -gpr_slice CoreCodegen::gpr_slice_split_tail(gpr_slice* s, size_t split) { - return ::gpr_slice_split_tail(s, split); +grpc_slice CoreCodegen::grpc_slice_split_tail(grpc_slice* s, size_t split) { + return ::grpc_slice_split_tail(s, split); } -void CoreCodegen::gpr_slice_buffer_add(gpr_slice_buffer* sb, gpr_slice slice) { - ::gpr_slice_buffer_add(sb, slice); +void CoreCodegen::grpc_slice_buffer_add(grpc_slice_buffer* sb, grpc_slice slice) { + ::grpc_slice_buffer_add(sb, slice); } -void CoreCodegen::gpr_slice_buffer_pop(gpr_slice_buffer* sb) { - ::gpr_slice_buffer_pop(sb); +void CoreCodegen::grpc_slice_buffer_pop(grpc_slice_buffer* sb) { + ::grpc_slice_buffer_pop(sb); } void CoreCodegen::grpc_metadata_array_init(grpc_metadata_array* array) { diff --git a/src/cpp/util/byte_buffer_cc.cc b/src/cpp/util/byte_buffer_cc.cc index 91ed66b766..cbe0aad26c 100644 --- a/src/cpp/util/byte_buffer_cc.cc +++ b/src/cpp/util/byte_buffer_cc.cc @@ -38,18 +38,18 @@ namespace grpc { ByteBuffer::ByteBuffer(const Slice* slices, size_t nslices) { // The following assertions check that the representation of a grpc::Slice is - // identical to that of a gpr_slice: it has a gpr_slice field, and nothing + // identical to that of a grpc_slice: it has a grpc_slice field, and nothing // else. - static_assert(std::is_same::value, - "Slice must have same representation as gpr_slice"); - static_assert(sizeof(Slice) == sizeof(gpr_slice), - "Slice must have same representation as gpr_slice"); + static_assert(std::is_same::value, + "Slice must have same representation as grpc_slice"); + static_assert(sizeof(Slice) == sizeof(grpc_slice), + "Slice must have same representation as grpc_slice"); // The const_cast is legal if grpc_raw_byte_buffer_create() does no more // than its advertised side effect of increasing the reference count of the // slices it processes, and such an increase does not affect the semantics // seen by the caller of this constructor. buffer_ = grpc_raw_byte_buffer_create( - reinterpret_cast(const_cast(slices)), nslices); + reinterpret_cast(const_cast(slices)), nslices); } ByteBuffer::~ByteBuffer() { @@ -75,7 +75,7 @@ Status ByteBuffer::Dump(std::vector* slices) const { return Status(StatusCode::INTERNAL, "Couldn't initialize byte buffer reader"); } - gpr_slice s; + grpc_slice s; while (grpc_byte_buffer_reader_next(&reader, &s)) { slices->push_back(Slice(s, Slice::STEAL_REF)); } diff --git a/src/cpp/util/slice_cc.cc b/src/cpp/util/slice_cc.cc index 7e88423b6c..c05f1cf124 100644 --- a/src/cpp/util/slice_cc.cc +++ b/src/cpp/util/slice_cc.cc @@ -37,12 +37,12 @@ namespace grpc { Slice::Slice() : slice_(gpr_empty_slice()) {} -Slice::~Slice() { gpr_slice_unref(slice_); } +Slice::~Slice() { grpc_slice_unref(slice_); } -Slice::Slice(gpr_slice slice, AddRef) : slice_(gpr_slice_ref(slice)) {} +Slice::Slice(grpc_slice slice, AddRef) : slice_(grpc_slice_ref(slice)) {} -Slice::Slice(gpr_slice slice, StealRef) : slice_(slice) {} +Slice::Slice(grpc_slice slice, StealRef) : slice_(slice) {} -Slice::Slice(const Slice& other) : slice_(gpr_slice_ref(other.slice_)) {} +Slice::Slice(const Slice& other) : slice_(grpc_slice_ref(other.slice_)) {} } // namespace grpc diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c index 9a5d7869d3..0f725f5e23 100644 --- a/src/csharp/ext/grpc_csharp_ext.c +++ b/src/csharp/ext/grpc_csharp_ext.c @@ -59,9 +59,9 @@ #endif grpc_byte_buffer *string_to_byte_buffer(const char *buffer, size_t len) { - gpr_slice slice = gpr_slice_from_copied_buffer(buffer, len); + grpc_slice slice = grpc_slice_from_copied_buffer(buffer, len); grpc_byte_buffer *bb = grpc_raw_byte_buffer_create(&slice, 1); - gpr_slice_unref(slice); + grpc_slice_unref(slice); return bb; } @@ -282,7 +282,7 @@ GPR_EXPORT intptr_t GPR_CALLTYPE grpcsharp_batch_context_recv_message_length( GPR_EXPORT void GPR_CALLTYPE grpcsharp_batch_context_recv_message_to_buffer( const grpcsharp_batch_context *ctx, char *buffer, size_t buffer_len) { grpc_byte_buffer_reader reader; - gpr_slice slice; + grpc_slice slice; size_t offset = 0; GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, ctx->recv_message)); @@ -293,7 +293,7 @@ GPR_EXPORT void GPR_CALLTYPE grpcsharp_batch_context_recv_message_to_buffer( memcpy(buffer + offset, GPR_SLICE_START_PTR(slice), GPR_SLICE_LENGTH(slice)); offset += len; - gpr_slice_unref(slice); + grpc_slice_unref(slice); } grpc_byte_buffer_reader_destroy(&reader); diff --git a/src/node/ext/byte_buffer.cc b/src/node/ext/byte_buffer.cc index a3f678f32c..76aa611a5d 100644 --- a/src/node/ext/byte_buffer.cc +++ b/src/node/ext/byte_buffer.cc @@ -56,10 +56,10 @@ grpc_byte_buffer *BufferToByteBuffer(Local buffer) { Nan::HandleScope scope; int length = ::node::Buffer::Length(buffer); char *data = ::node::Buffer::Data(buffer); - gpr_slice slice = gpr_slice_malloc(length); + grpc_slice slice = grpc_slice_malloc(length); memcpy(GPR_SLICE_START_PTR(slice), data, length); grpc_byte_buffer *byte_buffer(grpc_raw_byte_buffer_create(&slice, 1)); - gpr_slice_unref(slice); + grpc_slice_unref(slice); return byte_buffer; } @@ -77,11 +77,11 @@ Local ByteBufferToBuffer(grpc_byte_buffer *buffer) { Nan::ThrowError("Error initializing byte buffer reader."); return scope.Escape(Nan::Undefined()); } - gpr_slice slice = grpc_byte_buffer_reader_readall(&reader); + grpc_slice slice = grpc_byte_buffer_reader_readall(&reader); size_t length = GPR_SLICE_LENGTH(slice); char *result = new char[length]; memcpy(result, GPR_SLICE_START_PTR(slice), length); - gpr_slice_unref(slice); + grpc_slice_unref(slice); return scope.Escape(MakeFastBuffer( Nan::NewBuffer(result, length, delete_buffer, NULL).ToLocalChecked())); } diff --git a/src/objective-c/GRPCClient/private/NSData+GRPC.m b/src/objective-c/GRPCClient/private/NSData+GRPC.m index 98337799e9..45d23d8651 100644 --- a/src/objective-c/GRPCClient/private/NSData+GRPC.m +++ b/src/objective-c/GRPCClient/private/NSData+GRPC.m @@ -53,22 +53,22 @@ static void MallocAndCopyByteBufferToCharArray(grpc_byte_buffer *buffer, } // The slice contains uncompressed data even if compressed data was received // because the reader takes care of automatically decompressing it - gpr_slice slice = grpc_byte_buffer_reader_readall(&reader); + grpc_slice slice = grpc_byte_buffer_reader_readall(&reader); size_t uncompressed_length = GPR_SLICE_LENGTH(slice); char *result = malloc(uncompressed_length); if (result) { memcpy(result, GPR_SLICE_START_PTR(slice), uncompressed_length); } - gpr_slice_unref(slice); + grpc_slice_unref(slice); *array = result; *length = uncompressed_length; } static grpc_byte_buffer *CopyCharArrayToNewByteBuffer(const char *array, size_t length) { - gpr_slice slice = gpr_slice_from_copied_buffer(array, length); + grpc_slice slice = grpc_slice_from_copied_buffer(array, length); grpc_byte_buffer *buffer = grpc_raw_byte_buffer_create(&slice, 1); - gpr_slice_unref(slice); + grpc_slice_unref(slice); return buffer; } @@ -97,9 +97,9 @@ static grpc_byte_buffer *CopyCharArrayToNewByteBuffer(const char *array, // appending of byte arrays by not using internally a single contiguous memory // block for representation. // The following implementation is thus not optimal, sometimes requiring two - // copies (one by self.bytes and another by gpr_slice_from_copied_buffer). + // copies (one by self.bytes and another by grpc_slice_from_copied_buffer). // If it turns out to be an issue, we can use enumerateByteRangesUsingblock: - // to create an array of gpr_slice objects to pass to + // to create an array of grpc_slice objects to pass to // grpc_raw_byte_buffer_create. // That would make it do exactly one copy, always. return CopyCharArrayToNewByteBuffer((const char *)self.bytes, diff --git a/src/php/ext/grpc/byte_buffer.c b/src/php/ext/grpc/byte_buffer.c index 3be1429f13..56fd11d09b 100644 --- a/src/php/ext/grpc/byte_buffer.c +++ b/src/php/ext/grpc/byte_buffer.c @@ -50,9 +50,9 @@ #include grpc_byte_buffer *string_to_byte_buffer(char *string, size_t length) { - gpr_slice slice = gpr_slice_from_copied_buffer(string, length); + grpc_slice slice = grpc_slice_from_copied_buffer(string, length); grpc_byte_buffer *buffer = grpc_raw_byte_buffer_create(&slice, 1); - gpr_slice_unref(slice); + grpc_slice_unref(slice); return buffer; } @@ -66,11 +66,11 @@ void byte_buffer_to_string(grpc_byte_buffer *buffer, char **out_string, return; } - gpr_slice slice = grpc_byte_buffer_reader_readall(&reader); + grpc_slice slice = grpc_byte_buffer_reader_readall(&reader); size_t length = GPR_SLICE_LENGTH(slice); char *string = ecalloc(length + 1, sizeof(char)); memcpy(string, GPR_SLICE_START_PTR(slice), length); - gpr_slice_unref(slice); + grpc_slice_unref(slice); *out_string = string; *out_length = length; diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi index 9560fad137..ba26284b2c 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi @@ -53,23 +53,23 @@ cdef extern from "grpc/byte_buffer_reader.h": cdef extern from "grpc/grpc.h": - ctypedef struct gpr_slice: - # don't worry about writing out the members of gpr_slice; we never access + ctypedef struct grpc_slice: + # don't worry about writing out the members of grpc_slice; we never access # them directly. pass - gpr_slice gpr_slice_ref(gpr_slice s) nogil - void gpr_slice_unref(gpr_slice s) nogil - gpr_slice gpr_slice_new(void *p, size_t len, void (*destroy)(void *)) nogil - gpr_slice gpr_slice_new_with_len( + grpc_slice grpc_slice_ref(grpc_slice s) nogil + void grpc_slice_unref(grpc_slice s) nogil + grpc_slice grpc_slice_new(void *p, size_t len, void (*destroy)(void *)) nogil + grpc_slice grpc_slice_new_with_len( void *p, size_t len, void (*destroy)(void *, size_t)) nogil - gpr_slice gpr_slice_malloc(size_t length) nogil - gpr_slice gpr_slice_from_copied_string(const char *source) nogil - gpr_slice gpr_slice_from_copied_buffer(const char *source, size_t len) nogil + grpc_slice grpc_slice_malloc(size_t length) nogil + grpc_slice grpc_slice_from_copied_string(const char *source) nogil + grpc_slice grpc_slice_from_copied_buffer(const char *source, size_t len) nogil # Declare functions for function-like macros (because Cython)... - void *gpr_slice_start_ptr "GPR_SLICE_START_PTR" (gpr_slice s) nogil - size_t gpr_slice_length "GPR_SLICE_LENGTH" (gpr_slice s) nogil + void *grpc_slice_start_ptr "GPR_SLICE_START_PTR" (grpc_slice s) nogil + size_t grpc_slice_length "GPR_SLICE_LENGTH" (grpc_slice s) nogil ctypedef enum gpr_clock_type: GPR_CLOCK_MONOTONIC @@ -101,7 +101,7 @@ cdef extern from "grpc/grpc.h": # We don't care about the internals. pass - grpc_byte_buffer *grpc_raw_byte_buffer_create(gpr_slice *slices, + grpc_byte_buffer *grpc_raw_byte_buffer_create(grpc_slice *slices, size_t nslices) nogil size_t grpc_byte_buffer_length(grpc_byte_buffer *bb) nogil void grpc_byte_buffer_destroy(grpc_byte_buffer *byte_buffer) nogil @@ -109,7 +109,7 @@ cdef extern from "grpc/grpc.h": int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader, grpc_byte_buffer *buffer) nogil int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader *reader, - gpr_slice *slice) nogil + grpc_slice *slice) nogil void grpc_byte_buffer_reader_destroy(grpc_byte_buffer_reader *reader) nogil ctypedef enum grpc_status_code: diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi index 8a4eef4d2e..cadfce6ee6 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi @@ -242,19 +242,19 @@ cdef class ByteBuffer: return cdef char *c_data = data - cdef gpr_slice data_slice + cdef grpc_slice data_slice cdef size_t data_length = len(data) with nogil: - data_slice = gpr_slice_from_copied_buffer(c_data, data_length) + data_slice = grpc_slice_from_copied_buffer(c_data, data_length) with nogil: self.c_byte_buffer = grpc_raw_byte_buffer_create( &data_slice, 1) with nogil: - gpr_slice_unref(data_slice) + grpc_slice_unref(data_slice) def bytes(self): cdef grpc_byte_buffer_reader reader - cdef gpr_slice data_slice + cdef grpc_slice data_slice cdef size_t data_slice_length cdef void *data_slice_pointer cdef bint reader_status @@ -267,11 +267,11 @@ cdef class ByteBuffer: result = bytearray() with nogil: while grpc_byte_buffer_reader_next(&reader, &data_slice): - data_slice_pointer = gpr_slice_start_ptr(data_slice) - data_slice_length = gpr_slice_length(data_slice) + data_slice_pointer = grpc_slice_start_ptr(data_slice) + data_slice_length = grpc_slice_length(data_slice) with gil: result += (data_slice_pointer)[:data_slice_length] - gpr_slice_unref(data_slice) + grpc_slice_unref(data_slice) with nogil: grpc_byte_buffer_reader_destroy(&reader) return bytes(result) diff --git a/src/ruby/ext/grpc/rb_byte_buffer.c b/src/ruby/ext/grpc/rb_byte_buffer.c index 61b7c30315..511abe3fbe 100644 --- a/src/ruby/ext/grpc/rb_byte_buffer.c +++ b/src/ruby/ext/grpc/rb_byte_buffer.c @@ -42,16 +42,16 @@ #include "rb_grpc.h" grpc_byte_buffer* grpc_rb_s_to_byte_buffer(char *string, size_t length) { - gpr_slice slice = gpr_slice_from_copied_buffer(string, length); + grpc_slice slice = grpc_slice_from_copied_buffer(string, length); grpc_byte_buffer *buffer = grpc_raw_byte_buffer_create(&slice, 1); - gpr_slice_unref(slice); + grpc_slice_unref(slice); return buffer; } VALUE grpc_rb_byte_buffer_to_s(grpc_byte_buffer *buffer) { VALUE rb_string; grpc_byte_buffer_reader reader; - gpr_slice next; + grpc_slice next; if (buffer == NULL) { return Qnil; } @@ -63,7 +63,7 @@ VALUE grpc_rb_byte_buffer_to_s(grpc_byte_buffer *buffer) { while (grpc_byte_buffer_reader_next(&reader, &next) != 0) { rb_str_cat(rb_string, (const char *) GPR_SLICE_START_PTR(next), GPR_SLICE_LENGTH(next)); - gpr_slice_unref(next); + grpc_slice_unref(next); } return rb_string; } diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c index fd73cc7970..dd156f0867 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c @@ -221,35 +221,35 @@ gpr_set_log_verbosity_type gpr_set_log_verbosity_import; gpr_log_verbosity_init_type gpr_log_verbosity_init_import; gpr_set_log_function_type gpr_set_log_function_import; gpr_format_message_type gpr_format_message_import; -gpr_slice_ref_type gpr_slice_ref_import; -gpr_slice_unref_type gpr_slice_unref_import; -gpr_slice_new_type gpr_slice_new_import; -gpr_slice_new_with_user_data_type gpr_slice_new_with_user_data_import; -gpr_slice_new_with_len_type gpr_slice_new_with_len_import; -gpr_slice_malloc_type gpr_slice_malloc_import; -gpr_slice_from_copied_string_type gpr_slice_from_copied_string_import; -gpr_slice_from_copied_buffer_type gpr_slice_from_copied_buffer_import; -gpr_slice_from_static_string_type gpr_slice_from_static_string_import; -gpr_slice_sub_type gpr_slice_sub_import; -gpr_slice_sub_no_ref_type gpr_slice_sub_no_ref_import; -gpr_slice_split_tail_type gpr_slice_split_tail_import; -gpr_slice_split_head_type gpr_slice_split_head_import; +grpc_slice_ref_type grpc_slice_ref_import; +grpc_slice_unref_type grpc_slice_unref_import; +grpc_slice_new_type grpc_slice_new_import; +grpc_slice_new_with_user_data_type grpc_slice_new_with_user_data_import; +grpc_slice_new_with_len_type grpc_slice_new_with_len_import; +grpc_slice_malloc_type grpc_slice_malloc_import; +grpc_slice_from_copied_string_type grpc_slice_from_copied_string_import; +grpc_slice_from_copied_buffer_type grpc_slice_from_copied_buffer_import; +grpc_slice_from_static_string_type grpc_slice_from_static_string_import; +grpc_slice_sub_type grpc_slice_sub_import; +grpc_slice_sub_no_ref_type grpc_slice_sub_no_ref_import; +grpc_slice_split_tail_type grpc_slice_split_tail_import; +grpc_slice_split_head_type grpc_slice_split_head_import; gpr_empty_slice_type gpr_empty_slice_import; -gpr_slice_cmp_type gpr_slice_cmp_import; -gpr_slice_str_cmp_type gpr_slice_str_cmp_import; -gpr_slice_buffer_init_type gpr_slice_buffer_init_import; -gpr_slice_buffer_destroy_type gpr_slice_buffer_destroy_import; -gpr_slice_buffer_add_type gpr_slice_buffer_add_import; -gpr_slice_buffer_add_indexed_type gpr_slice_buffer_add_indexed_import; -gpr_slice_buffer_addn_type gpr_slice_buffer_addn_import; -gpr_slice_buffer_tiny_add_type gpr_slice_buffer_tiny_add_import; -gpr_slice_buffer_pop_type gpr_slice_buffer_pop_import; -gpr_slice_buffer_reset_and_unref_type gpr_slice_buffer_reset_and_unref_import; -gpr_slice_buffer_swap_type gpr_slice_buffer_swap_import; -gpr_slice_buffer_move_into_type gpr_slice_buffer_move_into_import; -gpr_slice_buffer_trim_end_type gpr_slice_buffer_trim_end_import; -gpr_slice_buffer_move_first_type gpr_slice_buffer_move_first_import; -gpr_slice_buffer_take_first_type gpr_slice_buffer_take_first_import; +grpc_slice_cmp_type grpc_slice_cmp_import; +grpc_slice_str_cmp_type grpc_slice_str_cmp_import; +grpc_slice_buffer_init_type grpc_slice_buffer_init_import; +grpc_slice_buffer_destroy_type grpc_slice_buffer_destroy_import; +grpc_slice_buffer_add_type grpc_slice_buffer_add_import; +grpc_slice_buffer_add_indexed_type grpc_slice_buffer_add_indexed_import; +grpc_slice_buffer_addn_type grpc_slice_buffer_addn_import; +grpc_slice_buffer_tiny_add_type grpc_slice_buffer_tiny_add_import; +grpc_slice_buffer_pop_type grpc_slice_buffer_pop_import; +grpc_slice_buffer_reset_and_unref_type grpc_slice_buffer_reset_and_unref_import; +grpc_slice_buffer_swap_type grpc_slice_buffer_swap_import; +grpc_slice_buffer_move_into_type grpc_slice_buffer_move_into_import; +grpc_slice_buffer_trim_end_type grpc_slice_buffer_trim_end_import; +grpc_slice_buffer_move_first_type grpc_slice_buffer_move_first_import; +grpc_slice_buffer_take_first_type grpc_slice_buffer_take_first_import; gpr_strdup_type gpr_strdup_import; gpr_asprintf_type gpr_asprintf_import; gpr_subprocess_binary_extension_type gpr_subprocess_binary_extension_import; @@ -495,35 +495,35 @@ void grpc_rb_load_imports(HMODULE library) { gpr_log_verbosity_init_import = (gpr_log_verbosity_init_type) GetProcAddress(library, "gpr_log_verbosity_init"); gpr_set_log_function_import = (gpr_set_log_function_type) GetProcAddress(library, "gpr_set_log_function"); gpr_format_message_import = (gpr_format_message_type) GetProcAddress(library, "gpr_format_message"); - gpr_slice_ref_import = (gpr_slice_ref_type) GetProcAddress(library, "gpr_slice_ref"); - gpr_slice_unref_import = (gpr_slice_unref_type) GetProcAddress(library, "gpr_slice_unref"); - gpr_slice_new_import = (gpr_slice_new_type) GetProcAddress(library, "gpr_slice_new"); - gpr_slice_new_with_user_data_import = (gpr_slice_new_with_user_data_type) GetProcAddress(library, "gpr_slice_new_with_user_data"); - gpr_slice_new_with_len_import = (gpr_slice_new_with_len_type) GetProcAddress(library, "gpr_slice_new_with_len"); - gpr_slice_malloc_import = (gpr_slice_malloc_type) GetProcAddress(library, "gpr_slice_malloc"); - gpr_slice_from_copied_string_import = (gpr_slice_from_copied_string_type) GetProcAddress(library, "gpr_slice_from_copied_string"); - gpr_slice_from_copied_buffer_import = (gpr_slice_from_copied_buffer_type) GetProcAddress(library, "gpr_slice_from_copied_buffer"); - gpr_slice_from_static_string_import = (gpr_slice_from_static_string_type) GetProcAddress(library, "gpr_slice_from_static_string"); - gpr_slice_sub_import = (gpr_slice_sub_type) GetProcAddress(library, "gpr_slice_sub"); - gpr_slice_sub_no_ref_import = (gpr_slice_sub_no_ref_type) GetProcAddress(library, "gpr_slice_sub_no_ref"); - gpr_slice_split_tail_import = (gpr_slice_split_tail_type) GetProcAddress(library, "gpr_slice_split_tail"); - gpr_slice_split_head_import = (gpr_slice_split_head_type) GetProcAddress(library, "gpr_slice_split_head"); + grpc_slice_ref_import = (grpc_slice_ref_type) GetProcAddress(library, "grpc_slice_ref"); + grpc_slice_unref_import = (grpc_slice_unref_type) GetProcAddress(library, "grpc_slice_unref"); + grpc_slice_new_import = (grpc_slice_new_type) GetProcAddress(library, "grpc_slice_new"); + grpc_slice_new_with_user_data_import = (grpc_slice_new_with_user_data_type) GetProcAddress(library, "grpc_slice_new_with_user_data"); + grpc_slice_new_with_len_import = (grpc_slice_new_with_len_type) GetProcAddress(library, "grpc_slice_new_with_len"); + grpc_slice_malloc_import = (grpc_slice_malloc_type) GetProcAddress(library, "grpc_slice_malloc"); + grpc_slice_from_copied_string_import = (grpc_slice_from_copied_string_type) GetProcAddress(library, "grpc_slice_from_copied_string"); + grpc_slice_from_copied_buffer_import = (grpc_slice_from_copied_buffer_type) GetProcAddress(library, "grpc_slice_from_copied_buffer"); + grpc_slice_from_static_string_import = (grpc_slice_from_static_string_type) GetProcAddress(library, "grpc_slice_from_static_string"); + grpc_slice_sub_import = (grpc_slice_sub_type) GetProcAddress(library, "grpc_slice_sub"); + grpc_slice_sub_no_ref_import = (grpc_slice_sub_no_ref_type) GetProcAddress(library, "grpc_slice_sub_no_ref"); + grpc_slice_split_tail_import = (grpc_slice_split_tail_type) GetProcAddress(library, "grpc_slice_split_tail"); + grpc_slice_split_head_import = (grpc_slice_split_head_type) GetProcAddress(library, "grpc_slice_split_head"); gpr_empty_slice_import = (gpr_empty_slice_type) GetProcAddress(library, "gpr_empty_slice"); - gpr_slice_cmp_import = (gpr_slice_cmp_type) GetProcAddress(library, "gpr_slice_cmp"); - gpr_slice_str_cmp_import = (gpr_slice_str_cmp_type) GetProcAddress(library, "gpr_slice_str_cmp"); - gpr_slice_buffer_init_import = (gpr_slice_buffer_init_type) GetProcAddress(library, "gpr_slice_buffer_init"); - gpr_slice_buffer_destroy_import = (gpr_slice_buffer_destroy_type) GetProcAddress(library, "gpr_slice_buffer_destroy"); - gpr_slice_buffer_add_import = (gpr_slice_buffer_add_type) GetProcAddress(library, "gpr_slice_buffer_add"); - gpr_slice_buffer_add_indexed_import = (gpr_slice_buffer_add_indexed_type) GetProcAddress(library, "gpr_slice_buffer_add_indexed"); - gpr_slice_buffer_addn_import = (gpr_slice_buffer_addn_type) GetProcAddress(library, "gpr_slice_buffer_addn"); - gpr_slice_buffer_tiny_add_import = (gpr_slice_buffer_tiny_add_type) GetProcAddress(library, "gpr_slice_buffer_tiny_add"); - gpr_slice_buffer_pop_import = (gpr_slice_buffer_pop_type) GetProcAddress(library, "gpr_slice_buffer_pop"); - gpr_slice_buffer_reset_and_unref_import = (gpr_slice_buffer_reset_and_unref_type) GetProcAddress(library, "gpr_slice_buffer_reset_and_unref"); - gpr_slice_buffer_swap_import = (gpr_slice_buffer_swap_type) GetProcAddress(library, "gpr_slice_buffer_swap"); - gpr_slice_buffer_move_into_import = (gpr_slice_buffer_move_into_type) GetProcAddress(library, "gpr_slice_buffer_move_into"); - gpr_slice_buffer_trim_end_import = (gpr_slice_buffer_trim_end_type) GetProcAddress(library, "gpr_slice_buffer_trim_end"); - gpr_slice_buffer_move_first_import = (gpr_slice_buffer_move_first_type) GetProcAddress(library, "gpr_slice_buffer_move_first"); - gpr_slice_buffer_take_first_import = (gpr_slice_buffer_take_first_type) GetProcAddress(library, "gpr_slice_buffer_take_first"); + grpc_slice_cmp_import = (grpc_slice_cmp_type) GetProcAddress(library, "grpc_slice_cmp"); + grpc_slice_str_cmp_import = (grpc_slice_str_cmp_type) GetProcAddress(library, "grpc_slice_str_cmp"); + grpc_slice_buffer_init_import = (grpc_slice_buffer_init_type) GetProcAddress(library, "grpc_slice_buffer_init"); + grpc_slice_buffer_destroy_import = (grpc_slice_buffer_destroy_type) GetProcAddress(library, "grpc_slice_buffer_destroy"); + grpc_slice_buffer_add_import = (grpc_slice_buffer_add_type) GetProcAddress(library, "grpc_slice_buffer_add"); + grpc_slice_buffer_add_indexed_import = (grpc_slice_buffer_add_indexed_type) GetProcAddress(library, "grpc_slice_buffer_add_indexed"); + grpc_slice_buffer_addn_import = (grpc_slice_buffer_addn_type) GetProcAddress(library, "grpc_slice_buffer_addn"); + grpc_slice_buffer_tiny_add_import = (grpc_slice_buffer_tiny_add_type) GetProcAddress(library, "grpc_slice_buffer_tiny_add"); + grpc_slice_buffer_pop_import = (grpc_slice_buffer_pop_type) GetProcAddress(library, "grpc_slice_buffer_pop"); + grpc_slice_buffer_reset_and_unref_import = (grpc_slice_buffer_reset_and_unref_type) GetProcAddress(library, "grpc_slice_buffer_reset_and_unref"); + grpc_slice_buffer_swap_import = (grpc_slice_buffer_swap_type) GetProcAddress(library, "grpc_slice_buffer_swap"); + grpc_slice_buffer_move_into_import = (grpc_slice_buffer_move_into_type) GetProcAddress(library, "grpc_slice_buffer_move_into"); + grpc_slice_buffer_trim_end_import = (grpc_slice_buffer_trim_end_type) GetProcAddress(library, "grpc_slice_buffer_trim_end"); + grpc_slice_buffer_move_first_import = (grpc_slice_buffer_move_first_type) GetProcAddress(library, "grpc_slice_buffer_move_first"); + grpc_slice_buffer_take_first_import = (grpc_slice_buffer_take_first_type) GetProcAddress(library, "grpc_slice_buffer_take_first"); gpr_strdup_import = (gpr_strdup_type) GetProcAddress(library, "gpr_strdup"); gpr_asprintf_import = (gpr_asprintf_type) GetProcAddress(library, "gpr_asprintf"); gpr_subprocess_binary_extension_import = (gpr_subprocess_binary_extension_type) GetProcAddress(library, "gpr_subprocess_binary_extension"); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index c2244150f2..30962a1c79 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -62,10 +62,10 @@ #include #include -typedef grpc_byte_buffer *(*grpc_raw_byte_buffer_create_type)(gpr_slice *slices, size_t nslices); +typedef grpc_byte_buffer *(*grpc_raw_byte_buffer_create_type)(grpc_slice *slices, size_t nslices); extern grpc_raw_byte_buffer_create_type grpc_raw_byte_buffer_create_import; #define grpc_raw_byte_buffer_create grpc_raw_byte_buffer_create_import -typedef grpc_byte_buffer *(*grpc_raw_compressed_byte_buffer_create_type)(gpr_slice *slices, size_t nslices, grpc_compression_algorithm compression); +typedef grpc_byte_buffer *(*grpc_raw_compressed_byte_buffer_create_type)(grpc_slice *slices, size_t nslices, grpc_compression_algorithm compression); extern grpc_raw_compressed_byte_buffer_create_type grpc_raw_compressed_byte_buffer_create_import; #define grpc_raw_compressed_byte_buffer_create grpc_raw_compressed_byte_buffer_create_import typedef grpc_byte_buffer *(*grpc_byte_buffer_copy_type)(grpc_byte_buffer *bb); @@ -83,10 +83,10 @@ extern grpc_byte_buffer_reader_init_type grpc_byte_buffer_reader_init_import; typedef void(*grpc_byte_buffer_reader_destroy_type)(grpc_byte_buffer_reader *reader); extern grpc_byte_buffer_reader_destroy_type grpc_byte_buffer_reader_destroy_import; #define grpc_byte_buffer_reader_destroy grpc_byte_buffer_reader_destroy_import -typedef int(*grpc_byte_buffer_reader_next_type)(grpc_byte_buffer_reader *reader, gpr_slice *slice); +typedef int(*grpc_byte_buffer_reader_next_type)(grpc_byte_buffer_reader *reader, grpc_slice *slice); extern grpc_byte_buffer_reader_next_type grpc_byte_buffer_reader_next_import; #define grpc_byte_buffer_reader_next grpc_byte_buffer_reader_next_import -typedef gpr_slice(*grpc_byte_buffer_reader_readall_type)(grpc_byte_buffer_reader *reader); +typedef grpc_slice(*grpc_byte_buffer_reader_readall_type)(grpc_byte_buffer_reader *reader); extern grpc_byte_buffer_reader_readall_type grpc_byte_buffer_reader_readall_import; #define grpc_byte_buffer_reader_readall grpc_byte_buffer_reader_readall_import typedef grpc_byte_buffer *(*grpc_raw_byte_buffer_from_reader_type)(grpc_byte_buffer_reader *reader); @@ -614,93 +614,93 @@ extern gpr_set_log_function_type gpr_set_log_function_import; typedef char *(*gpr_format_message_type)(int messageid); extern gpr_format_message_type gpr_format_message_import; #define gpr_format_message gpr_format_message_import -typedef gpr_slice(*gpr_slice_ref_type)(gpr_slice s); -extern gpr_slice_ref_type gpr_slice_ref_import; -#define gpr_slice_ref gpr_slice_ref_import -typedef void(*gpr_slice_unref_type)(gpr_slice s); -extern gpr_slice_unref_type gpr_slice_unref_import; -#define gpr_slice_unref gpr_slice_unref_import -typedef gpr_slice(*gpr_slice_new_type)(void *p, size_t len, void (*destroy)(void *)); -extern gpr_slice_new_type gpr_slice_new_import; -#define gpr_slice_new gpr_slice_new_import -typedef gpr_slice(*gpr_slice_new_with_user_data_type)(void *p, size_t len, void (*destroy)(void *), void *user_data); -extern gpr_slice_new_with_user_data_type gpr_slice_new_with_user_data_import; -#define gpr_slice_new_with_user_data gpr_slice_new_with_user_data_import -typedef gpr_slice(*gpr_slice_new_with_len_type)(void *p, size_t len, void (*destroy)(void *, size_t)); -extern gpr_slice_new_with_len_type gpr_slice_new_with_len_import; -#define gpr_slice_new_with_len gpr_slice_new_with_len_import -typedef gpr_slice(*gpr_slice_malloc_type)(size_t length); -extern gpr_slice_malloc_type gpr_slice_malloc_import; -#define gpr_slice_malloc gpr_slice_malloc_import -typedef gpr_slice(*gpr_slice_from_copied_string_type)(const char *source); -extern gpr_slice_from_copied_string_type gpr_slice_from_copied_string_import; -#define gpr_slice_from_copied_string gpr_slice_from_copied_string_import -typedef gpr_slice(*gpr_slice_from_copied_buffer_type)(const char *source, size_t len); -extern gpr_slice_from_copied_buffer_type gpr_slice_from_copied_buffer_import; -#define gpr_slice_from_copied_buffer gpr_slice_from_copied_buffer_import -typedef gpr_slice(*gpr_slice_from_static_string_type)(const char *source); -extern gpr_slice_from_static_string_type gpr_slice_from_static_string_import; -#define gpr_slice_from_static_string gpr_slice_from_static_string_import -typedef gpr_slice(*gpr_slice_sub_type)(gpr_slice s, size_t begin, size_t end); -extern gpr_slice_sub_type gpr_slice_sub_import; -#define gpr_slice_sub gpr_slice_sub_import -typedef gpr_slice(*gpr_slice_sub_no_ref_type)(gpr_slice s, size_t begin, size_t end); -extern gpr_slice_sub_no_ref_type gpr_slice_sub_no_ref_import; -#define gpr_slice_sub_no_ref gpr_slice_sub_no_ref_import -typedef gpr_slice(*gpr_slice_split_tail_type)(gpr_slice *s, size_t split); -extern gpr_slice_split_tail_type gpr_slice_split_tail_import; -#define gpr_slice_split_tail gpr_slice_split_tail_import -typedef gpr_slice(*gpr_slice_split_head_type)(gpr_slice *s, size_t split); -extern gpr_slice_split_head_type gpr_slice_split_head_import; -#define gpr_slice_split_head gpr_slice_split_head_import -typedef gpr_slice(*gpr_empty_slice_type)(void); +typedef grpc_slice(*grpc_slice_ref_type)(grpc_slice s); +extern grpc_slice_ref_type grpc_slice_ref_import; +#define grpc_slice_ref grpc_slice_ref_import +typedef void(*grpc_slice_unref_type)(grpc_slice s); +extern grpc_slice_unref_type grpc_slice_unref_import; +#define grpc_slice_unref grpc_slice_unref_import +typedef grpc_slice(*grpc_slice_new_type)(void *p, size_t len, void (*destroy)(void *)); +extern grpc_slice_new_type grpc_slice_new_import; +#define grpc_slice_new grpc_slice_new_import +typedef grpc_slice(*grpc_slice_new_with_user_data_type)(void *p, size_t len, void (*destroy)(void *), void *user_data); +extern grpc_slice_new_with_user_data_type grpc_slice_new_with_user_data_import; +#define grpc_slice_new_with_user_data grpc_slice_new_with_user_data_import +typedef grpc_slice(*grpc_slice_new_with_len_type)(void *p, size_t len, void (*destroy)(void *, size_t)); +extern grpc_slice_new_with_len_type grpc_slice_new_with_len_import; +#define grpc_slice_new_with_len grpc_slice_new_with_len_import +typedef grpc_slice(*grpc_slice_malloc_type)(size_t length); +extern grpc_slice_malloc_type grpc_slice_malloc_import; +#define grpc_slice_malloc grpc_slice_malloc_import +typedef grpc_slice(*grpc_slice_from_copied_string_type)(const char *source); +extern grpc_slice_from_copied_string_type grpc_slice_from_copied_string_import; +#define grpc_slice_from_copied_string grpc_slice_from_copied_string_import +typedef grpc_slice(*grpc_slice_from_copied_buffer_type)(const char *source, size_t len); +extern grpc_slice_from_copied_buffer_type grpc_slice_from_copied_buffer_import; +#define grpc_slice_from_copied_buffer grpc_slice_from_copied_buffer_import +typedef grpc_slice(*grpc_slice_from_static_string_type)(const char *source); +extern grpc_slice_from_static_string_type grpc_slice_from_static_string_import; +#define grpc_slice_from_static_string grpc_slice_from_static_string_import +typedef grpc_slice(*grpc_slice_sub_type)(grpc_slice s, size_t begin, size_t end); +extern grpc_slice_sub_type grpc_slice_sub_import; +#define grpc_slice_sub grpc_slice_sub_import +typedef grpc_slice(*grpc_slice_sub_no_ref_type)(grpc_slice s, size_t begin, size_t end); +extern grpc_slice_sub_no_ref_type grpc_slice_sub_no_ref_import; +#define grpc_slice_sub_no_ref grpc_slice_sub_no_ref_import +typedef grpc_slice(*grpc_slice_split_tail_type)(grpc_slice *s, size_t split); +extern grpc_slice_split_tail_type grpc_slice_split_tail_import; +#define grpc_slice_split_tail grpc_slice_split_tail_import +typedef grpc_slice(*grpc_slice_split_head_type)(grpc_slice *s, size_t split); +extern grpc_slice_split_head_type grpc_slice_split_head_import; +#define grpc_slice_split_head grpc_slice_split_head_import +typedef grpc_slice(*gpr_empty_slice_type)(void); extern gpr_empty_slice_type gpr_empty_slice_import; #define gpr_empty_slice gpr_empty_slice_import -typedef int(*gpr_slice_cmp_type)(gpr_slice a, gpr_slice b); -extern gpr_slice_cmp_type gpr_slice_cmp_import; -#define gpr_slice_cmp gpr_slice_cmp_import -typedef int(*gpr_slice_str_cmp_type)(gpr_slice a, const char *b); -extern gpr_slice_str_cmp_type gpr_slice_str_cmp_import; -#define gpr_slice_str_cmp gpr_slice_str_cmp_import -typedef void(*gpr_slice_buffer_init_type)(gpr_slice_buffer *sb); -extern gpr_slice_buffer_init_type gpr_slice_buffer_init_import; -#define gpr_slice_buffer_init gpr_slice_buffer_init_import -typedef void(*gpr_slice_buffer_destroy_type)(gpr_slice_buffer *sb); -extern gpr_slice_buffer_destroy_type gpr_slice_buffer_destroy_import; -#define gpr_slice_buffer_destroy gpr_slice_buffer_destroy_import -typedef void(*gpr_slice_buffer_add_type)(gpr_slice_buffer *sb, gpr_slice slice); -extern gpr_slice_buffer_add_type gpr_slice_buffer_add_import; -#define gpr_slice_buffer_add gpr_slice_buffer_add_import -typedef size_t(*gpr_slice_buffer_add_indexed_type)(gpr_slice_buffer *sb, gpr_slice slice); -extern gpr_slice_buffer_add_indexed_type gpr_slice_buffer_add_indexed_import; -#define gpr_slice_buffer_add_indexed gpr_slice_buffer_add_indexed_import -typedef void(*gpr_slice_buffer_addn_type)(gpr_slice_buffer *sb, gpr_slice *slices, size_t n); -extern gpr_slice_buffer_addn_type gpr_slice_buffer_addn_import; -#define gpr_slice_buffer_addn gpr_slice_buffer_addn_import -typedef uint8_t *(*gpr_slice_buffer_tiny_add_type)(gpr_slice_buffer *sb, size_t len); -extern gpr_slice_buffer_tiny_add_type gpr_slice_buffer_tiny_add_import; -#define gpr_slice_buffer_tiny_add gpr_slice_buffer_tiny_add_import -typedef void(*gpr_slice_buffer_pop_type)(gpr_slice_buffer *sb); -extern gpr_slice_buffer_pop_type gpr_slice_buffer_pop_import; -#define gpr_slice_buffer_pop gpr_slice_buffer_pop_import -typedef void(*gpr_slice_buffer_reset_and_unref_type)(gpr_slice_buffer *sb); -extern gpr_slice_buffer_reset_and_unref_type gpr_slice_buffer_reset_and_unref_import; -#define gpr_slice_buffer_reset_and_unref gpr_slice_buffer_reset_and_unref_import -typedef void(*gpr_slice_buffer_swap_type)(gpr_slice_buffer *a, gpr_slice_buffer *b); -extern gpr_slice_buffer_swap_type gpr_slice_buffer_swap_import; -#define gpr_slice_buffer_swap gpr_slice_buffer_swap_import -typedef void(*gpr_slice_buffer_move_into_type)(gpr_slice_buffer *src, gpr_slice_buffer *dst); -extern gpr_slice_buffer_move_into_type gpr_slice_buffer_move_into_import; -#define gpr_slice_buffer_move_into gpr_slice_buffer_move_into_import -typedef void(*gpr_slice_buffer_trim_end_type)(gpr_slice_buffer *src, size_t n, gpr_slice_buffer *garbage); -extern gpr_slice_buffer_trim_end_type gpr_slice_buffer_trim_end_import; -#define gpr_slice_buffer_trim_end gpr_slice_buffer_trim_end_import -typedef void(*gpr_slice_buffer_move_first_type)(gpr_slice_buffer *src, size_t n, gpr_slice_buffer *dst); -extern gpr_slice_buffer_move_first_type gpr_slice_buffer_move_first_import; -#define gpr_slice_buffer_move_first gpr_slice_buffer_move_first_import -typedef gpr_slice(*gpr_slice_buffer_take_first_type)(gpr_slice_buffer *src); -extern gpr_slice_buffer_take_first_type gpr_slice_buffer_take_first_import; -#define gpr_slice_buffer_take_first gpr_slice_buffer_take_first_import +typedef int(*grpc_slice_cmp_type)(grpc_slice a, grpc_slice b); +extern grpc_slice_cmp_type grpc_slice_cmp_import; +#define grpc_slice_cmp grpc_slice_cmp_import +typedef int(*grpc_slice_str_cmp_type)(grpc_slice a, const char *b); +extern grpc_slice_str_cmp_type grpc_slice_str_cmp_import; +#define grpc_slice_str_cmp grpc_slice_str_cmp_import +typedef void(*grpc_slice_buffer_init_type)(grpc_slice_buffer *sb); +extern grpc_slice_buffer_init_type grpc_slice_buffer_init_import; +#define grpc_slice_buffer_init grpc_slice_buffer_init_import +typedef void(*grpc_slice_buffer_destroy_type)(grpc_slice_buffer *sb); +extern grpc_slice_buffer_destroy_type grpc_slice_buffer_destroy_import; +#define grpc_slice_buffer_destroy grpc_slice_buffer_destroy_import +typedef void(*grpc_slice_buffer_add_type)(grpc_slice_buffer *sb, grpc_slice slice); +extern grpc_slice_buffer_add_type grpc_slice_buffer_add_import; +#define grpc_slice_buffer_add grpc_slice_buffer_add_import +typedef size_t(*grpc_slice_buffer_add_indexed_type)(grpc_slice_buffer *sb, grpc_slice slice); +extern grpc_slice_buffer_add_indexed_type grpc_slice_buffer_add_indexed_import; +#define grpc_slice_buffer_add_indexed grpc_slice_buffer_add_indexed_import +typedef void(*grpc_slice_buffer_addn_type)(grpc_slice_buffer *sb, grpc_slice *slices, size_t n); +extern grpc_slice_buffer_addn_type grpc_slice_buffer_addn_import; +#define grpc_slice_buffer_addn grpc_slice_buffer_addn_import +typedef uint8_t *(*grpc_slice_buffer_tiny_add_type)(grpc_slice_buffer *sb, size_t len); +extern grpc_slice_buffer_tiny_add_type grpc_slice_buffer_tiny_add_import; +#define grpc_slice_buffer_tiny_add grpc_slice_buffer_tiny_add_import +typedef void(*grpc_slice_buffer_pop_type)(grpc_slice_buffer *sb); +extern grpc_slice_buffer_pop_type grpc_slice_buffer_pop_import; +#define grpc_slice_buffer_pop grpc_slice_buffer_pop_import +typedef void(*grpc_slice_buffer_reset_and_unref_type)(grpc_slice_buffer *sb); +extern grpc_slice_buffer_reset_and_unref_type grpc_slice_buffer_reset_and_unref_import; +#define grpc_slice_buffer_reset_and_unref grpc_slice_buffer_reset_and_unref_import +typedef void(*grpc_slice_buffer_swap_type)(grpc_slice_buffer *a, grpc_slice_buffer *b); +extern grpc_slice_buffer_swap_type grpc_slice_buffer_swap_import; +#define grpc_slice_buffer_swap grpc_slice_buffer_swap_import +typedef void(*grpc_slice_buffer_move_into_type)(grpc_slice_buffer *src, grpc_slice_buffer *dst); +extern grpc_slice_buffer_move_into_type grpc_slice_buffer_move_into_import; +#define grpc_slice_buffer_move_into grpc_slice_buffer_move_into_import +typedef void(*grpc_slice_buffer_trim_end_type)(grpc_slice_buffer *src, size_t n, grpc_slice_buffer *garbage); +extern grpc_slice_buffer_trim_end_type grpc_slice_buffer_trim_end_import; +#define grpc_slice_buffer_trim_end grpc_slice_buffer_trim_end_import +typedef void(*grpc_slice_buffer_move_first_type)(grpc_slice_buffer *src, size_t n, grpc_slice_buffer *dst); +extern grpc_slice_buffer_move_first_type grpc_slice_buffer_move_first_import; +#define grpc_slice_buffer_move_first grpc_slice_buffer_move_first_import +typedef grpc_slice(*grpc_slice_buffer_take_first_type)(grpc_slice_buffer *src); +extern grpc_slice_buffer_take_first_type grpc_slice_buffer_take_first_import; +#define grpc_slice_buffer_take_first grpc_slice_buffer_take_first_import typedef char *(*gpr_strdup_type)(const char *src); extern gpr_strdup_type gpr_strdup_import; #define gpr_strdup gpr_strdup_import diff --git a/test/core/bad_client/bad_client.c b/test/core/bad_client/bad_client.c index a9638500b7..07fcd995d7 100644 --- a/test/core/bad_client/bad_client.c +++ b/test/core/bad_client/bad_client.c @@ -77,7 +77,7 @@ static void server_setup_transport(void *ts, grpc_transport *transport) { typedef struct { grpc_bad_client_client_stream_validator validator; - gpr_slice_buffer incoming; + grpc_slice_buffer incoming; gpr_event read_done; } read_args; @@ -96,9 +96,9 @@ void grpc_run_bad_client_test( gpr_thd_id id; char *hex; grpc_transport *transport; - gpr_slice slice = - gpr_slice_from_copied_buffer(client_payload, client_payload_length); - gpr_slice_buffer outgoing; + grpc_slice slice = + grpc_slice_from_copied_buffer(client_payload, client_payload_length); + grpc_slice_buffer outgoing; grpc_closure done_write_closure; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -146,8 +146,8 @@ void grpc_run_bad_client_test( /* Start validator */ gpr_thd_new(&id, thd_func, &a, NULL); - gpr_slice_buffer_init(&outgoing); - gpr_slice_buffer_add(&outgoing, slice); + grpc_slice_buffer_init(&outgoing); + grpc_slice_buffer_add(&outgoing, slice); grpc_closure_init(&done_write_closure, done_write, &a); /* Write data */ @@ -172,7 +172,7 @@ void grpc_run_bad_client_test( if (client_validator != NULL) { read_args args; args.validator = client_validator; - gpr_slice_buffer_init(&args.incoming); + grpc_slice_buffer_init(&args.incoming); gpr_event_init(&args.read_done); grpc_closure read_done_closure; grpc_closure_init(&read_done_closure, read_done, &args); @@ -181,7 +181,7 @@ void grpc_run_bad_client_test( grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT( gpr_event_wait(&args.read_done, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5))); - gpr_slice_buffer_destroy(&args.incoming); + grpc_slice_buffer_destroy(&args.incoming); } // Shutdown. grpc_endpoint_shutdown(&exec_ctx, sfd.client); @@ -194,7 +194,7 @@ void grpc_run_bad_client_test( .type == GRPC_OP_COMPLETE); grpc_server_destroy(a.server); grpc_completion_queue_destroy(a.cq); - gpr_slice_buffer_destroy(&outgoing); + grpc_slice_buffer_destroy(&outgoing); grpc_exec_ctx_finish(&exec_ctx); grpc_shutdown(); diff --git a/test/core/bad_client/bad_client.h b/test/core/bad_client/bad_client.h index c8b2a4122f..bbca418ef3 100644 --- a/test/core/bad_client/bad_client.h +++ b/test/core/bad_client/bad_client.h @@ -45,7 +45,7 @@ typedef void (*grpc_bad_client_server_side_validator)(grpc_server *server, void *registered_method); typedef void (*grpc_bad_client_client_stream_validator)( - gpr_slice_buffer *incoming); + grpc_slice_buffer *incoming); #define GRPC_BAD_CLIENT_DISCONNECT 1 diff --git a/test/core/bad_client/tests/large_metadata.c b/test/core/bad_client/tests/large_metadata.c index b9c8093ef9..124035c070 100644 --- a/test/core/bad_client/tests/large_metadata.c +++ b/test/core/bad_client/tests/large_metadata.c @@ -183,15 +183,15 @@ static void server_verifier_sends_too_much_metadata(grpc_server *server, cq_verifier_destroy(cqv); } -static void client_validator(gpr_slice_buffer *incoming) { +static void client_validator(grpc_slice_buffer *incoming) { // Get last frame from incoming slice buffer. - gpr_slice_buffer last_frame_buffer; - gpr_slice_buffer_init(&last_frame_buffer); - gpr_slice_buffer_trim_end(incoming, 13, &last_frame_buffer); + grpc_slice_buffer last_frame_buffer; + grpc_slice_buffer_init(&last_frame_buffer); + grpc_slice_buffer_trim_end(incoming, 13, &last_frame_buffer); GPR_ASSERT(last_frame_buffer.count == 1); - gpr_slice last_frame = last_frame_buffer.slices[0]; + grpc_slice last_frame = last_frame_buffer.slices[0]; // Construct expected frame. - gpr_slice expected = gpr_slice_malloc(13); + grpc_slice expected = grpc_slice_malloc(13); uint8_t *p = GPR_SLICE_START_PTR(expected); // Length. *p++ = 0; @@ -212,8 +212,8 @@ static void client_validator(gpr_slice_buffer *incoming) { *p++ = 0; *p++ = 11; // Compare actual and expected. - GPR_ASSERT(gpr_slice_cmp(last_frame, expected) == 0); - gpr_slice_buffer_destroy(&last_frame_buffer); + GPR_ASSERT(grpc_slice_cmp(last_frame, expected) == 0); + grpc_slice_buffer_destroy(&last_frame_buffer); } int main(int argc, char **argv) { diff --git a/test/core/bad_ssl/servers/cert.c b/test/core/bad_ssl/servers/cert.c index 91dd9de81b..52922f5d6b 100644 --- a/test/core/bad_ssl/servers/cert.c +++ b/test/core/bad_ssl/servers/cert.c @@ -51,7 +51,7 @@ int main(int argc, char **argv) { grpc_ssl_pem_key_cert_pair pem_key_cert_pair; grpc_server_credentials *ssl_creds; grpc_server *server; - gpr_slice cert_slice, key_slice; + grpc_slice cert_slice, key_slice; grpc_init(); @@ -70,8 +70,8 @@ int main(int argc, char **argv) { GPR_ASSERT(grpc_server_add_secure_http2_port(server, addr, ssl_creds)); grpc_server_credentials_release(ssl_creds); - gpr_slice_unref(cert_slice); - gpr_slice_unref(key_slice); + grpc_slice_unref(cert_slice); + grpc_slice_unref(key_slice); bad_ssl_run(server); grpc_shutdown(); diff --git a/test/core/client_channel/set_initial_connect_string_test.c b/test/core/client_channel/set_initial_connect_string_test.c index b7bd67567c..350f2884d7 100644 --- a/test/core/client_channel/set_initial_connect_string_test.c +++ b/test/core/client_channel/set_initial_connect_string_test.c @@ -54,8 +54,8 @@ struct rpc_state { grpc_channel *channel; grpc_call *call; grpc_op op; - gpr_slice_buffer incoming_buffer; - gpr_slice_buffer temp_incoming_buffer; + grpc_slice_buffer incoming_buffer; + grpc_slice_buffer temp_incoming_buffer; grpc_endpoint *tcp; gpr_atm done_atm; }; @@ -67,7 +67,7 @@ static grpc_closure on_read; static void handle_read(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { GPR_ASSERT(error == GRPC_ERROR_NONE); - gpr_slice_buffer_move_into(&state.temp_incoming_buffer, + grpc_slice_buffer_move_into(&state.temp_incoming_buffer, &state.incoming_buffer); gpr_log(GPR_DEBUG, "got %" PRIuPTR " bytes, magic is %" PRIuPTR " bytes", state.incoming_buffer.length, strlen(magic_connect_string)); @@ -86,25 +86,25 @@ static void on_connect(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp, grpc_tcp_server_acceptor *acceptor) { test_tcp_server *server = arg; grpc_closure_init(&on_read, handle_read, NULL); - gpr_slice_buffer_init(&state.incoming_buffer); - gpr_slice_buffer_init(&state.temp_incoming_buffer); + grpc_slice_buffer_init(&state.incoming_buffer); + grpc_slice_buffer_init(&state.temp_incoming_buffer); state.tcp = tcp; grpc_endpoint_add_to_pollset(exec_ctx, tcp, server->pollset); grpc_endpoint_read(exec_ctx, tcp, &state.temp_incoming_buffer, &on_read); } static void set_magic_initial_string(struct sockaddr **addr, size_t *addr_len, - gpr_slice *connect_string) { + grpc_slice *connect_string) { GPR_ASSERT(addr); GPR_ASSERT(addr_len); - *connect_string = gpr_slice_from_copied_string(magic_connect_string); + *connect_string = grpc_slice_from_copied_string(magic_connect_string); } static void reset_addr_and_set_magic_string(struct sockaddr **addr, size_t *addr_len, - gpr_slice *connect_string) { + grpc_slice *connect_string) { struct sockaddr_in target; - *connect_string = gpr_slice_from_copied_string(magic_connect_string); + *connect_string = grpc_slice_from_copied_string(magic_connect_string); gpr_free(*addr); target.sin_family = AF_INET; target.sin_addr.s_addr = htonl(INADDR_LOOPBACK); @@ -148,8 +148,8 @@ static void start_rpc(int use_creds, int target_port) { static void cleanup_rpc(void) { grpc_event ev; - gpr_slice_buffer_destroy(&state.incoming_buffer); - gpr_slice_buffer_destroy(&state.temp_incoming_buffer); + grpc_slice_buffer_destroy(&state.incoming_buffer); + grpc_slice_buffer_destroy(&state.temp_incoming_buffer); grpc_channel_credentials_unref(state.creds); grpc_call_destroy(state.call); grpc_completion_queue_shutdown(state.cq); @@ -194,7 +194,7 @@ static void poll_server_until_read_done(test_tcp_server *server, gpr_thd_new(&id, actually_poll_server, pa, NULL); } -static void match_initial_magic_string(gpr_slice_buffer *buffer) { +static void match_initial_magic_string(grpc_slice_buffer *buffer) { size_t i, j, cmp_length; size_t magic_length = strlen(magic_connect_string); GPR_ASSERT(buffer->length >= magic_length); diff --git a/test/core/compression/message_compress_test.c b/test/core/compression/message_compress_test.c index 47ecf72e08..c6963df85d 100644 --- a/test/core/compression/message_compress_test.c +++ b/test/core/compression/message_compress_test.c @@ -52,16 +52,16 @@ typedef enum { MAYBE_COMPRESSES } compressability; -static void assert_passthrough(gpr_slice value, +static void assert_passthrough(grpc_slice value, grpc_compression_algorithm algorithm, grpc_slice_split_mode uncompressed_split_mode, grpc_slice_split_mode compressed_split_mode, compressability compress_result_check) { - gpr_slice_buffer input; - gpr_slice_buffer compressed_raw; - gpr_slice_buffer compressed; - gpr_slice_buffer output; - gpr_slice final; + grpc_slice_buffer input; + grpc_slice_buffer compressed_raw; + grpc_slice_buffer compressed; + grpc_slice_buffer output; + grpc_slice final; int was_compressed; char *algorithm_name; @@ -75,10 +75,10 @@ static void assert_passthrough(gpr_slice value, algorithm_name, grpc_slice_split_mode_name(uncompressed_split_mode), grpc_slice_split_mode_name(compressed_split_mode)); - gpr_slice_buffer_init(&input); - gpr_slice_buffer_init(&compressed_raw); - gpr_slice_buffer_init(&compressed); - gpr_slice_buffer_init(&output); + grpc_slice_buffer_init(&input); + grpc_slice_buffer_init(&compressed_raw); + grpc_slice_buffer_init(&compressed); + grpc_slice_buffer_init(&output); grpc_split_slices_to_buffer(uncompressed_split_mode, &value, 1, &input); @@ -103,17 +103,17 @@ static void assert_passthrough(gpr_slice value, was_compressed ? algorithm : GRPC_COMPRESS_NONE, &compressed, &output)); final = grpc_slice_merge(output.slices, output.count); - GPR_ASSERT(0 == gpr_slice_cmp(value, final)); + GPR_ASSERT(0 == grpc_slice_cmp(value, final)); - gpr_slice_buffer_destroy(&input); - gpr_slice_buffer_destroy(&compressed); - gpr_slice_buffer_destroy(&compressed_raw); - gpr_slice_buffer_destroy(&output); - gpr_slice_unref(final); + grpc_slice_buffer_destroy(&input); + grpc_slice_buffer_destroy(&compressed); + grpc_slice_buffer_destroy(&compressed_raw); + grpc_slice_buffer_destroy(&output); + grpc_slice_unref(final); } -static gpr_slice repeated(char c, size_t length) { - gpr_slice out = gpr_slice_malloc(length); +static grpc_slice repeated(char c, size_t length) { + grpc_slice out = grpc_slice_malloc(length); memset(GPR_SLICE_START_PTR(out), c, length); return out; } @@ -134,10 +134,10 @@ static compressability get_compressability( return MAYBE_COMPRESSES; } -static gpr_slice create_test_value(test_value id) { +static grpc_slice create_test_value(test_value id) { switch (id) { case ONE_A: - return gpr_slice_from_copied_string("a"); + return grpc_slice_from_copied_string("a"); case ONE_KB_A: return repeated('a', 1024); case ONE_MB_A: @@ -146,17 +146,17 @@ static gpr_slice create_test_value(test_value id) { abort(); break; } - return gpr_slice_from_copied_string("bad value"); + return grpc_slice_from_copied_string("bad value"); } static void test_tiny_data_compress(void) { - gpr_slice_buffer input; - gpr_slice_buffer output; + grpc_slice_buffer input; + grpc_slice_buffer output; grpc_compression_algorithm i; - gpr_slice_buffer_init(&input); - gpr_slice_buffer_init(&output); - gpr_slice_buffer_add(&input, create_test_value(ONE_A)); + grpc_slice_buffer_init(&input); + grpc_slice_buffer_init(&output); + grpc_slice_buffer_add(&input, create_test_value(ONE_A)); for (i = 0; i < GRPC_COMPRESS_ALGORITHMS_COUNT; i++) { if (i == GRPC_COMPRESS_NONE) continue; @@ -164,21 +164,21 @@ static void test_tiny_data_compress(void) { GPR_ASSERT(1 == output.count); } - gpr_slice_buffer_destroy(&input); - gpr_slice_buffer_destroy(&output); + grpc_slice_buffer_destroy(&input); + grpc_slice_buffer_destroy(&output); } static void test_bad_decompression_data_crc(void) { - gpr_slice_buffer input; - gpr_slice_buffer corrupted; - gpr_slice_buffer output; + grpc_slice_buffer input; + grpc_slice_buffer corrupted; + grpc_slice_buffer output; size_t idx; const uint32_t bad = 0xdeadbeef; - gpr_slice_buffer_init(&input); - gpr_slice_buffer_init(&corrupted); - gpr_slice_buffer_init(&output); - gpr_slice_buffer_add(&input, create_test_value(ONE_MB_A)); + grpc_slice_buffer_init(&input); + grpc_slice_buffer_init(&corrupted); + grpc_slice_buffer_init(&output); + grpc_slice_buffer_add(&input, create_test_value(ONE_MB_A)); /* compress it */ grpc_msg_compress(GRPC_COMPRESS_GZIP, &input, &corrupted); @@ -191,54 +191,54 @@ static void test_bad_decompression_data_crc(void) { /* try (and fail) to decompress the corrupted compresed buffer */ GPR_ASSERT(0 == grpc_msg_decompress(GRPC_COMPRESS_GZIP, &corrupted, &output)); - gpr_slice_buffer_destroy(&input); - gpr_slice_buffer_destroy(&corrupted); - gpr_slice_buffer_destroy(&output); + grpc_slice_buffer_destroy(&input); + grpc_slice_buffer_destroy(&corrupted); + grpc_slice_buffer_destroy(&output); } static void test_bad_decompression_data_trailing_garbage(void) { - gpr_slice_buffer input; - gpr_slice_buffer output; + grpc_slice_buffer input; + grpc_slice_buffer output; - gpr_slice_buffer_init(&input); - gpr_slice_buffer_init(&output); + grpc_slice_buffer_init(&input); + grpc_slice_buffer_init(&output); /* append 0x99 to the end of an otherwise valid stream */ - gpr_slice_buffer_add( - &input, gpr_slice_from_copied_buffer( + grpc_slice_buffer_add( + &input, grpc_slice_from_copied_buffer( "\x78\xda\x63\x60\x60\x60\x00\x00\x00\x04\x00\x01\x99", 13)); /* try (and fail) to decompress the invalid compresed buffer */ GPR_ASSERT(0 == grpc_msg_decompress(GRPC_COMPRESS_DEFLATE, &input, &output)); - gpr_slice_buffer_destroy(&input); - gpr_slice_buffer_destroy(&output); + grpc_slice_buffer_destroy(&input); + grpc_slice_buffer_destroy(&output); } static void test_bad_decompression_data_stream(void) { - gpr_slice_buffer input; - gpr_slice_buffer output; + grpc_slice_buffer input; + grpc_slice_buffer output; - gpr_slice_buffer_init(&input); - gpr_slice_buffer_init(&output); - gpr_slice_buffer_add(&input, - gpr_slice_from_copied_buffer("\x78\xda\xff\xff", 4)); + grpc_slice_buffer_init(&input); + grpc_slice_buffer_init(&output); + grpc_slice_buffer_add(&input, + grpc_slice_from_copied_buffer("\x78\xda\xff\xff", 4)); /* try (and fail) to decompress the invalid compresed buffer */ GPR_ASSERT(0 == grpc_msg_decompress(GRPC_COMPRESS_DEFLATE, &input, &output)); - gpr_slice_buffer_destroy(&input); - gpr_slice_buffer_destroy(&output); + grpc_slice_buffer_destroy(&input); + grpc_slice_buffer_destroy(&output); } static void test_bad_compression_algorithm(void) { - gpr_slice_buffer input; - gpr_slice_buffer output; + grpc_slice_buffer input; + grpc_slice_buffer output; int was_compressed; - gpr_slice_buffer_init(&input); - gpr_slice_buffer_init(&output); - gpr_slice_buffer_add(&input, - gpr_slice_from_copied_string("Never gonna give you up")); + grpc_slice_buffer_init(&input); + grpc_slice_buffer_init(&output); + grpc_slice_buffer_add(&input, + grpc_slice_from_copied_string("Never gonna give you up")); was_compressed = grpc_msg_compress(GRPC_COMPRESS_ALGORITHMS_COUNT, &input, &output); GPR_ASSERT(0 == was_compressed); @@ -247,19 +247,19 @@ static void test_bad_compression_algorithm(void) { grpc_msg_compress(GRPC_COMPRESS_ALGORITHMS_COUNT + 123, &input, &output); GPR_ASSERT(0 == was_compressed); - gpr_slice_buffer_destroy(&input); - gpr_slice_buffer_destroy(&output); + grpc_slice_buffer_destroy(&input); + grpc_slice_buffer_destroy(&output); } static void test_bad_decompression_algorithm(void) { - gpr_slice_buffer input; - gpr_slice_buffer output; + grpc_slice_buffer input; + grpc_slice_buffer output; int was_decompressed; - gpr_slice_buffer_init(&input); - gpr_slice_buffer_init(&output); - gpr_slice_buffer_add(&input, - gpr_slice_from_copied_string( + grpc_slice_buffer_init(&input); + grpc_slice_buffer_init(&output); + grpc_slice_buffer_add(&input, + grpc_slice_from_copied_string( "I'm not really compressed but it doesn't matter")); was_decompressed = grpc_msg_decompress(GRPC_COMPRESS_ALGORITHMS_COUNT, &input, &output); @@ -269,8 +269,8 @@ static void test_bad_decompression_algorithm(void) { &input, &output); GPR_ASSERT(0 == was_decompressed); - gpr_slice_buffer_destroy(&input); - gpr_slice_buffer_destroy(&output); + grpc_slice_buffer_destroy(&input); + grpc_slice_buffer_destroy(&output); } int main(int argc, char **argv) { @@ -288,9 +288,9 @@ int main(int argc, char **argv) { for (j = 0; j < GPR_ARRAY_SIZE(uncompressed_split_modes); j++) { for (k = 0; k < GPR_ARRAY_SIZE(compressed_split_modes); k++) { for (m = 0; m < TEST_VALUE_COUNT; m++) { - gpr_slice slice = create_test_value(m); + grpc_slice slice = create_test_value(m); assert_passthrough(slice, i, j, k, get_compressability(m, i)); - gpr_slice_unref(slice); + grpc_slice_unref(slice); } } } diff --git a/test/core/end2end/bad_server_response_test.c b/test/core/end2end/bad_server_response_test.c index 5ed0eb64d2..cb2030a7d7 100644 --- a/test/core/end2end/bad_server_response_test.c +++ b/test/core/end2end/bad_server_response_test.c @@ -82,8 +82,8 @@ struct rpc_state { grpc_channel *channel; grpc_call *call; size_t incoming_data_length; - gpr_slice_buffer temp_incoming_buffer; - gpr_slice_buffer outgoing_buffer; + grpc_slice_buffer temp_incoming_buffer; + grpc_slice_buffer outgoing_buffer; grpc_endpoint *tcp; gpr_atm done_atm; bool write_done; @@ -105,11 +105,11 @@ static void done_write(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { } static void handle_write(grpc_exec_ctx *exec_ctx) { - gpr_slice slice = gpr_slice_from_copied_buffer(state.response_payload, + grpc_slice slice = grpc_slice_from_copied_buffer(state.response_payload, state.response_payload_length); - gpr_slice_buffer_reset_and_unref(&state.outgoing_buffer); - gpr_slice_buffer_add(&state.outgoing_buffer, slice); + grpc_slice_buffer_reset_and_unref(&state.outgoing_buffer); + grpc_slice_buffer_add(&state.outgoing_buffer, slice); grpc_endpoint_write(exec_ctx, state.tcp, &state.outgoing_buffer, &on_write); } @@ -141,8 +141,8 @@ static void on_connect(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp, test_tcp_server *server = arg; grpc_closure_init(&on_read, handle_read, NULL); grpc_closure_init(&on_write, done_write, NULL); - gpr_slice_buffer_init(&state.temp_incoming_buffer); - gpr_slice_buffer_init(&state.outgoing_buffer); + grpc_slice_buffer_init(&state.temp_incoming_buffer); + grpc_slice_buffer_init(&state.outgoing_buffer); state.tcp = tcp; state.incoming_data_length = 0; grpc_endpoint_add_to_pollset(exec_ctx, tcp, server->pollset); @@ -221,8 +221,8 @@ static void start_rpc(int target_port, grpc_status_code expected_status, static void cleanup_rpc(void) { grpc_event ev; - gpr_slice_buffer_destroy(&state.temp_incoming_buffer); - gpr_slice_buffer_destroy(&state.outgoing_buffer); + grpc_slice_buffer_destroy(&state.temp_incoming_buffer); + grpc_slice_buffer_destroy(&state.outgoing_buffer); grpc_call_destroy(state.call); grpc_completion_queue_shutdown(state.cq); do { diff --git a/test/core/end2end/cq_verifier.c b/test/core/end2end/cq_verifier.c index 3e7e3f22a2..3b9aa24368 100644 --- a/test/core/end2end/cq_verifier.c +++ b/test/core/end2end/cq_verifier.c @@ -105,17 +105,17 @@ int contains_metadata(grpc_metadata_array *array, const char *key, return has_metadata(array->metadata, array->count, key, value); } -static gpr_slice merge_slices(gpr_slice *slices, size_t nslices) { +static grpc_slice merge_slices(grpc_slice *slices, size_t nslices) { size_t i; size_t len = 0; uint8_t *cursor; - gpr_slice out; + grpc_slice out; for (i = 0; i < nslices; i++) { len += GPR_SLICE_LENGTH(slices[i]); } - out = gpr_slice_malloc(len); + out = grpc_slice_malloc(len); cursor = GPR_SLICE_START_PTR(out); for (i = 0; i < nslices; i++) { @@ -126,8 +126,8 @@ static gpr_slice merge_slices(gpr_slice *slices, size_t nslices) { return out; } -int raw_byte_buffer_eq_slice(grpc_byte_buffer *rbb, gpr_slice b) { - gpr_slice a; +int raw_byte_buffer_eq_slice(grpc_byte_buffer *rbb, grpc_slice b) { + grpc_slice a; int ok; if (!rbb) return 0; @@ -137,12 +137,12 @@ int raw_byte_buffer_eq_slice(grpc_byte_buffer *rbb, gpr_slice b) { ok = GPR_SLICE_LENGTH(a) == GPR_SLICE_LENGTH(b) && 0 == memcmp(GPR_SLICE_START_PTR(a), GPR_SLICE_START_PTR(b), GPR_SLICE_LENGTH(a)); - gpr_slice_unref(a); - gpr_slice_unref(b); + grpc_slice_unref(a); + grpc_slice_unref(b); return ok; } -int byte_buffer_eq_slice(grpc_byte_buffer *bb, gpr_slice b) { +int byte_buffer_eq_slice(grpc_byte_buffer *bb, grpc_slice b) { grpc_byte_buffer_reader reader; grpc_byte_buffer *rbb; int res; @@ -165,7 +165,7 @@ int byte_buffer_eq_string(grpc_byte_buffer *bb, const char *str) { GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, bb) && "Couldn't init byte buffer reader"); rbb = grpc_raw_byte_buffer_from_reader(&reader); - res = raw_byte_buffer_eq_slice(rbb, gpr_slice_from_copied_string(str)); + res = raw_byte_buffer_eq_slice(rbb, grpc_slice_from_copied_string(str)); grpc_byte_buffer_reader_destroy(&reader); grpc_byte_buffer_destroy(rbb); diff --git a/test/core/end2end/cq_verifier.h b/test/core/end2end/cq_verifier.h index 47464fa319..b754de9bbe 100644 --- a/test/core/end2end/cq_verifier.h +++ b/test/core/end2end/cq_verifier.h @@ -67,7 +67,7 @@ void cq_expect_completion(cq_verifier *v, const char *file, int line, void *tag, #define CQ_EXPECT_COMPLETION(v, tag, success) \ cq_expect_completion(v, __FILE__, __LINE__, tag, success) -int byte_buffer_eq_slice(grpc_byte_buffer *bb, gpr_slice b); +int byte_buffer_eq_slice(grpc_byte_buffer *bb, grpc_slice b); int byte_buffer_eq_string(grpc_byte_buffer *byte_buffer, const char *string); int contains_metadata(grpc_metadata_array *array, const char *key, const char *value); diff --git a/test/core/end2end/dualstack_socket_test.c b/test/core/end2end/dualstack_socket_test.c index cb07ca535b..5860257607 100644 --- a/test/core/end2end/dualstack_socket_test.c +++ b/test/core/end2end/dualstack_socket_test.c @@ -120,14 +120,14 @@ void test_connect(const char *server_host, const char *client_host, int port, if (client_host[0] == 'i') { /* for ipv4:/ipv6: addresses, concatenate the port to each of the parts */ size_t i; - gpr_slice uri_slice; - gpr_slice_buffer uri_parts; + grpc_slice uri_slice; + grpc_slice_buffer uri_parts; char **hosts_with_port; uri_slice = - gpr_slice_new((char *)client_host, strlen(client_host), do_nothing); - gpr_slice_buffer_init(&uri_parts); - gpr_slice_split(uri_slice, ",", &uri_parts); + grpc_slice_new((char *)client_host, strlen(client_host), do_nothing); + grpc_slice_buffer_init(&uri_parts); + grpc_slice_split(uri_slice, ",", &uri_parts); hosts_with_port = gpr_malloc(sizeof(char *) * uri_parts.count); for (i = 0; i < uri_parts.count; i++) { char *uri_part_str = gpr_dump_slice(uri_parts.slices[i], GPR_DUMP_ASCII); @@ -140,8 +140,8 @@ void test_connect(const char *server_host, const char *client_host, int port, gpr_free(hosts_with_port[i]); } gpr_free(hosts_with_port); - gpr_slice_buffer_destroy(&uri_parts); - gpr_slice_unref(uri_slice); + grpc_slice_buffer_destroy(&uri_parts); + grpc_slice_unref(uri_slice); } else { gpr_join_host_port(&client_hostport, client_host, port); } diff --git a/test/core/end2end/fake_resolver.c b/test/core/end2end/fake_resolver.c index 5669ce51e8..4687e52313 100644 --- a/test/core/end2end/fake_resolver.c +++ b/test/core/end2end/fake_resolver.c @@ -163,11 +163,11 @@ static grpc_resolver* fake_resolver_create(grpc_resolver_factory* factory, const bool lb_enabled = lb_enabled_qpart != NULL && strcmp("0", lb_enabled_qpart) != 0; // Construct addresses. - gpr_slice path_slice = - gpr_slice_new(args->uri->path, strlen(args->uri->path), do_nothing); - gpr_slice_buffer path_parts; - gpr_slice_buffer_init(&path_parts); - gpr_slice_split(path_slice, ",", &path_parts); + grpc_slice path_slice = + grpc_slice_new(args->uri->path, strlen(args->uri->path), do_nothing); + grpc_slice_buffer path_parts; + grpc_slice_buffer_init(&path_parts); + grpc_slice_split(path_slice, ",", &path_parts); grpc_lb_addresses* addresses = grpc_lb_addresses_create(path_parts.count); bool errors_found = false; for (size_t i = 0; i < addresses->num_addresses; i++) { @@ -184,8 +184,8 @@ static grpc_resolver* fake_resolver_create(grpc_resolver_factory* factory, addresses->addresses[i].is_balancer = lb_enabled; if (errors_found) break; } - gpr_slice_buffer_destroy(&path_parts); - gpr_slice_unref(path_slice); + grpc_slice_buffer_destroy(&path_parts); + grpc_slice_unref(path_slice); if (errors_found) { grpc_lb_addresses_destroy(addresses, NULL /* user_data_destroy */); return NULL; diff --git a/test/core/end2end/fixtures/http_proxy.c b/test/core/end2end/fixtures/http_proxy.c index bc24cb33cf..88c77a5168 100644 --- a/test/core/end2end/fixtures/http_proxy.c +++ b/test/core/end2end/fixtures/http_proxy.c @@ -89,12 +89,12 @@ typedef struct proxy_connection { grpc_closure on_server_read_done; grpc_closure on_server_write_done; - gpr_slice_buffer client_read_buffer; - gpr_slice_buffer client_deferred_write_buffer; - gpr_slice_buffer client_write_buffer; - gpr_slice_buffer server_read_buffer; - gpr_slice_buffer server_deferred_write_buffer; - gpr_slice_buffer server_write_buffer; + grpc_slice_buffer client_read_buffer; + grpc_slice_buffer client_deferred_write_buffer; + grpc_slice_buffer client_write_buffer; + grpc_slice_buffer server_read_buffer; + grpc_slice_buffer server_deferred_write_buffer; + grpc_slice_buffer server_write_buffer; grpc_http_parser http_parser; grpc_http_request http_request; @@ -108,12 +108,12 @@ static void proxy_connection_unref(grpc_exec_ctx* exec_ctx, if (conn->server_endpoint != NULL) grpc_endpoint_destroy(exec_ctx, conn->server_endpoint); grpc_pollset_set_destroy(conn->pollset_set); - gpr_slice_buffer_destroy(&conn->client_read_buffer); - gpr_slice_buffer_destroy(&conn->client_deferred_write_buffer); - gpr_slice_buffer_destroy(&conn->client_write_buffer); - gpr_slice_buffer_destroy(&conn->server_read_buffer); - gpr_slice_buffer_destroy(&conn->server_deferred_write_buffer); - gpr_slice_buffer_destroy(&conn->server_write_buffer); + grpc_slice_buffer_destroy(&conn->client_read_buffer); + grpc_slice_buffer_destroy(&conn->client_deferred_write_buffer); + grpc_slice_buffer_destroy(&conn->client_write_buffer); + grpc_slice_buffer_destroy(&conn->server_read_buffer); + grpc_slice_buffer_destroy(&conn->server_deferred_write_buffer); + grpc_slice_buffer_destroy(&conn->server_write_buffer); grpc_http_parser_destroy(&conn->http_parser); grpc_http_request_destroy(&conn->http_request); gpr_free(conn); @@ -144,11 +144,11 @@ static void on_client_write_done(grpc_exec_ctx* exec_ctx, void* arg, return; } // Clear write buffer (the data we just wrote). - gpr_slice_buffer_reset_and_unref(&conn->client_write_buffer); + grpc_slice_buffer_reset_and_unref(&conn->client_write_buffer); // If more data was read from the server since we started this write, // write that data now. if (conn->client_deferred_write_buffer.length > 0) { - gpr_slice_buffer_move_into(&conn->client_deferred_write_buffer, + grpc_slice_buffer_move_into(&conn->client_deferred_write_buffer, &conn->client_write_buffer); grpc_endpoint_write(exec_ctx, conn->client_endpoint, &conn->client_write_buffer, @@ -169,11 +169,11 @@ static void on_server_write_done(grpc_exec_ctx* exec_ctx, void* arg, return; } // Clear write buffer (the data we just wrote). - gpr_slice_buffer_reset_and_unref(&conn->server_write_buffer); + grpc_slice_buffer_reset_and_unref(&conn->server_write_buffer); // If more data was read from the client since we started this write, // write that data now. if (conn->server_deferred_write_buffer.length > 0) { - gpr_slice_buffer_move_into(&conn->server_deferred_write_buffer, + grpc_slice_buffer_move_into(&conn->server_deferred_write_buffer, &conn->server_write_buffer); grpc_endpoint_write(exec_ctx, conn->server_endpoint, &conn->server_write_buffer, @@ -201,10 +201,10 @@ static void on_client_read_done(grpc_exec_ctx* exec_ctx, void* arg, // // Otherwise, move the read data into the write buffer and write it. if (conn->server_write_buffer.length > 0) { - gpr_slice_buffer_move_into(&conn->client_read_buffer, + grpc_slice_buffer_move_into(&conn->client_read_buffer, &conn->server_deferred_write_buffer); } else { - gpr_slice_buffer_move_into(&conn->client_read_buffer, + grpc_slice_buffer_move_into(&conn->client_read_buffer, &conn->server_write_buffer); gpr_ref(&conn->refcount); grpc_endpoint_write(exec_ctx, conn->server_endpoint, @@ -233,10 +233,10 @@ static void on_server_read_done(grpc_exec_ctx* exec_ctx, void* arg, // // Otherwise, move the read data into the write buffer and write it. if (conn->client_write_buffer.length > 0) { - gpr_slice_buffer_move_into(&conn->server_read_buffer, + grpc_slice_buffer_move_into(&conn->server_read_buffer, &conn->client_deferred_write_buffer); } else { - gpr_slice_buffer_move_into(&conn->server_read_buffer, + grpc_slice_buffer_move_into(&conn->server_read_buffer, &conn->client_write_buffer); gpr_ref(&conn->refcount); grpc_endpoint_write(exec_ctx, conn->client_endpoint, @@ -258,7 +258,7 @@ static void on_write_response_done(grpc_exec_ctx* exec_ctx, void* arg, return; } // Clear write buffer. - gpr_slice_buffer_reset_and_unref(&conn->client_write_buffer); + grpc_slice_buffer_reset_and_unref(&conn->client_write_buffer); // Start reading from both client and server. One of the read // requests inherits our ref to conn, but we need to take a new ref // for the other one. @@ -287,9 +287,9 @@ static void on_server_connect_done(grpc_exec_ctx* exec_ctx, void* arg, // We've established a connection, so send back a 200 response code to // the client. // The write callback inherits our reference to conn. - gpr_slice slice = - gpr_slice_from_copied_string("HTTP/1.0 200 connected\r\n\r\n"); - gpr_slice_buffer_add(&conn->client_write_buffer, slice); + grpc_slice slice = + grpc_slice_from_copied_string("HTTP/1.0 200 connected\r\n\r\n"); + grpc_slice_buffer_add(&conn->client_write_buffer, slice); grpc_endpoint_write(exec_ctx, conn->client_endpoint, &conn->client_write_buffer, &conn->on_write_response_done); @@ -322,7 +322,7 @@ static void on_read_request_done(grpc_exec_ctx* exec_ctx, void* arg, } } } - gpr_slice_buffer_reset_and_unref(&conn->client_read_buffer); + grpc_slice_buffer_reset_and_unref(&conn->client_read_buffer); // If we're not done reading the request, read more data. if (conn->http_parser.state != GRPC_HTTP_BODY) { grpc_endpoint_read(exec_ctx, conn->client_endpoint, @@ -383,12 +383,12 @@ static void on_accept(grpc_exec_ctx* exec_ctx, void* arg, grpc_closure_init(&conn->on_client_write_done, on_client_write_done, conn); grpc_closure_init(&conn->on_server_read_done, on_server_read_done, conn); grpc_closure_init(&conn->on_server_write_done, on_server_write_done, conn); - gpr_slice_buffer_init(&conn->client_read_buffer); - gpr_slice_buffer_init(&conn->client_deferred_write_buffer); - gpr_slice_buffer_init(&conn->client_write_buffer); - gpr_slice_buffer_init(&conn->server_read_buffer); - gpr_slice_buffer_init(&conn->server_deferred_write_buffer); - gpr_slice_buffer_init(&conn->server_write_buffer); + grpc_slice_buffer_init(&conn->client_read_buffer); + grpc_slice_buffer_init(&conn->client_deferred_write_buffer); + grpc_slice_buffer_init(&conn->client_write_buffer); + grpc_slice_buffer_init(&conn->server_read_buffer); + grpc_slice_buffer_init(&conn->server_deferred_write_buffer); + grpc_slice_buffer_init(&conn->server_write_buffer); grpc_http_parser_init(&conn->http_parser, GRPC_HTTP_REQUEST, &conn->http_request); grpc_endpoint_read(exec_ctx, conn->client_endpoint, &conn->client_read_buffer, diff --git a/test/core/end2end/fuzzers/api_fuzzer.c b/test/core/end2end/fuzzers/api_fuzzer.c index 945cc960e9..210a863f48 100644 --- a/test/core/end2end/fuzzers/api_fuzzer.c +++ b/test/core/end2end/fuzzers/api_fuzzer.c @@ -137,10 +137,10 @@ static uint32_t read_uint32(input_stream *inp) { } static grpc_byte_buffer *read_message(input_stream *inp) { - gpr_slice slice = gpr_slice_malloc(read_uint22(inp)); + grpc_slice slice = grpc_slice_malloc(read_uint22(inp)); memset(GPR_SLICE_START_PTR(slice), 0, GPR_SLICE_LENGTH(slice)); grpc_byte_buffer *out = grpc_raw_byte_buffer_create(&slice, 1); - gpr_slice_unref(slice); + grpc_slice_unref(slice); return out; } diff --git a/test/core/end2end/fuzzers/client_fuzzer.c b/test/core/end2end/fuzzers/client_fuzzer.c index d104fe55e5..c5260cd287 100644 --- a/test/core/end2end/fuzzers/client_fuzzer.c +++ b/test/core/end2end/fuzzers/client_fuzzer.c @@ -44,7 +44,7 @@ bool squelch = true; bool leak_check = true; -static void discard_write(gpr_slice slice) {} +static void discard_write(grpc_slice slice) {} static void *tag(int n) { return (void *)(uintptr_t)n; } @@ -121,7 +121,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_mock_endpoint_put_read( &exec_ctx, mock_endpoint, - gpr_slice_from_copied_buffer((const char *)data, size)); + grpc_slice_from_copied_buffer((const char *)data, size)); grpc_event ev; while (1) { diff --git a/test/core/end2end/fuzzers/server_fuzzer.c b/test/core/end2end/fuzzers/server_fuzzer.c index ae4c8e658d..164022ec79 100644 --- a/test/core/end2end/fuzzers/server_fuzzer.c +++ b/test/core/end2end/fuzzers/server_fuzzer.c @@ -41,7 +41,7 @@ bool squelch = true; bool leak_check = true; -static void discard_write(gpr_slice slice) {} +static void discard_write(grpc_slice slice) {} static void *tag(int n) { return (void *)(uintptr_t)n; } static int detag(void *p) { return (int)(uintptr_t)p; } @@ -63,7 +63,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_resource_quota_internal_unref(&exec_ctx, resource_quota); grpc_mock_endpoint_put_read( &exec_ctx, mock_endpoint, - gpr_slice_from_copied_buffer((const char *)data, size)); + grpc_slice_from_copied_buffer((const char *)data, size)); grpc_server *server = grpc_server_create(NULL, NULL); grpc_completion_queue *cq = grpc_completion_queue_create(NULL); diff --git a/test/core/end2end/invalid_call_argument_test.c b/test/core/end2end/invalid_call_argument_test.c index 2b9904a244..6cc7d28489 100644 --- a/test/core/end2end/invalid_call_argument_test.c +++ b/test/core/end2end/invalid_call_argument_test.c @@ -251,7 +251,7 @@ static void test_send_messages_at_the_same_time() { gpr_log(GPR_INFO, "test_send_messages_at_the_same_time"); grpc_op *op; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); prepare_test(1); diff --git a/test/core/end2end/tests/binary_metadata.c b/test/core/end2end/tests/binary_metadata.c index 73b0f17c24..317ca3110b 100644 --- a/test/core/end2end/tests/binary_metadata.c +++ b/test/core/end2end/tests/binary_metadata.c @@ -100,8 +100,8 @@ static void test_request_response_with_metadata_and_payload( grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); - gpr_slice response_payload_slice = gpr_slice_from_copied_string("hello you"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_byte_buffer *response_payload = diff --git a/test/core/end2end/tests/call_creds.c b/test/core/end2end/tests/call_creds.c index 99c5d94e39..8f8b7d5119 100644 --- a/test/core/end2end/tests/call_creds.c +++ b/test/core/end2end/tests/call_creds.c @@ -135,8 +135,8 @@ static void request_response_with_payload_and_call_creds( override_mode mode) { grpc_call *c; grpc_call *s; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); - gpr_slice response_payload_slice = gpr_slice_from_copied_string("hello you"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_byte_buffer *response_payload = @@ -389,7 +389,7 @@ static void test_request_with_server_rejecting_client_creds( char *details = NULL; size_t details_capacity = 0; grpc_byte_buffer *response_payload_recv = NULL; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_call_credentials *creds; diff --git a/test/core/end2end/tests/cancel_after_accept.c b/test/core/end2end/tests/cancel_after_accept.c index 9f49815527..4bf55c8725 100644 --- a/test/core/end2end/tests/cancel_after_accept.c +++ b/test/core/end2end/tests/cancel_after_accept.c @@ -118,8 +118,8 @@ static void test_cancel_after_accept(grpc_end2end_test_config config, size_t details_capacity = 0; grpc_byte_buffer *request_payload_recv = NULL; grpc_byte_buffer *response_payload_recv = NULL; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); - gpr_slice response_payload_slice = gpr_slice_from_copied_string("hello you"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_byte_buffer *response_payload = diff --git a/test/core/end2end/tests/cancel_after_client_done.c b/test/core/end2end/tests/cancel_after_client_done.c index f61a404b2d..afb17b0719 100644 --- a/test/core/end2end/tests/cancel_after_client_done.c +++ b/test/core/end2end/tests/cancel_after_client_done.c @@ -117,8 +117,8 @@ static void test_cancel_after_accept_and_writes_closed( size_t details_capacity = 0; grpc_byte_buffer *request_payload_recv = NULL; grpc_byte_buffer *response_payload_recv = NULL; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); - gpr_slice response_payload_slice = gpr_slice_from_copied_string("hello you"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_byte_buffer *response_payload = diff --git a/test/core/end2end/tests/cancel_after_invoke.c b/test/core/end2end/tests/cancel_after_invoke.c index c31582bf2e..fe0e0d689c 100644 --- a/test/core/end2end/tests/cancel_after_invoke.c +++ b/test/core/end2end/tests/cancel_after_invoke.c @@ -116,7 +116,7 @@ static void test_cancel_after_invoke(grpc_end2end_test_config config, char *details = NULL; size_t details_capacity = 0; grpc_byte_buffer *response_payload_recv = NULL; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); diff --git a/test/core/end2end/tests/cancel_before_invoke.c b/test/core/end2end/tests/cancel_before_invoke.c index 5dcd44e7b4..3a0b83c4d2 100644 --- a/test/core/end2end/tests/cancel_before_invoke.c +++ b/test/core/end2end/tests/cancel_before_invoke.c @@ -114,7 +114,7 @@ static void test_cancel_before_invoke(grpc_end2end_test_config config, char *details = NULL; size_t details_capacity = 0; grpc_byte_buffer *response_payload_recv = NULL; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); diff --git a/test/core/end2end/tests/compressed_payload.c b/test/core/end2end/tests/compressed_payload.c index f598a3812b..92788dd8fa 100644 --- a/test/core/end2end/tests/compressed_payload.c +++ b/test/core/end2end/tests/compressed_payload.c @@ -110,7 +110,7 @@ static void request_for_disabled_algorithm( grpc_status_code expected_error, grpc_metadata *client_metadata) { grpc_call *c; grpc_call *s; - gpr_slice request_payload_slice; + grpc_slice request_payload_slice; grpc_byte_buffer *request_payload; gpr_timespec deadline = five_seconds_time(); grpc_channel_args *client_args; @@ -133,7 +133,7 @@ static void request_for_disabled_algorithm( memset(str, 'x', 1023); str[1023] = '\0'; - request_payload_slice = gpr_slice_from_copied_string(str); + request_payload_slice = grpc_slice_from_copied_string(str); request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); client_args = grpc_channel_args_set_compression_algorithm( @@ -255,7 +255,7 @@ static void request_for_disabled_algorithm( cq_verifier_destroy(cqv); - gpr_slice_unref(request_payload_slice); + grpc_slice_unref(request_payload_slice); grpc_byte_buffer_destroy(request_payload); grpc_byte_buffer_destroy(request_payload_recv); @@ -277,7 +277,7 @@ static void request_with_payload_template( grpc_compression_level server_compression_level) { grpc_call *c; grpc_call *s; - gpr_slice request_payload_slice; + grpc_slice request_payload_slice; grpc_byte_buffer *request_payload; gpr_timespec deadline = five_seconds_time(); grpc_channel_args *client_args; @@ -307,8 +307,8 @@ static void request_with_payload_template( memset(response_str, 'y', 1023); response_str[1023] = '\0'; - request_payload_slice = gpr_slice_from_copied_string(request_str); - gpr_slice response_payload_slice = gpr_slice_from_copied_string(response_str); + request_payload_slice = grpc_slice_from_copied_string(request_str); + grpc_slice response_payload_slice = grpc_slice_from_copied_string(response_str); client_args = grpc_channel_args_set_compression_algorithm( NULL, default_client_channel_compression_algorithm); @@ -458,8 +458,8 @@ static void request_with_payload_template( grpc_byte_buffer_destroy(response_payload_recv); } - gpr_slice_unref(request_payload_slice); - gpr_slice_unref(response_payload_slice); + grpc_slice_unref(request_payload_slice); + grpc_slice_unref(response_payload_slice); memset(ops, 0, sizeof(ops)); op = ops; diff --git a/test/core/end2end/tests/filter_call_init_fails.c b/test/core/end2end/tests/filter_call_init_fails.c index 0e5692f4c9..36f98694b6 100644 --- a/test/core/end2end/tests/filter_call_init_fails.c +++ b/test/core/end2end/tests/filter_call_init_fails.c @@ -108,7 +108,7 @@ static void end_test(grpc_end2end_test_fixture *f) { static void test_request(grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); gpr_timespec deadline = five_seconds_time(); diff --git a/test/core/end2end/tests/filter_causes_close.c b/test/core/end2end/tests/filter_causes_close.c index d5eddc7330..66449558c7 100644 --- a/test/core/end2end/tests/filter_causes_close.c +++ b/test/core/end2end/tests/filter_causes_close.c @@ -104,7 +104,7 @@ static void end_test(grpc_end2end_test_fixture *f) { static void test_request(grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); gpr_timespec deadline = five_seconds_time(); @@ -207,8 +207,8 @@ static void recv_im_ready(grpc_exec_ctx *exec_ctx, void *arg, call_data *calld = elem->call_data; if (error == GRPC_ERROR_NONE) { // close the stream with an error. - gpr_slice message = - gpr_slice_from_copied_string("Failure that's not preventable."); + grpc_slice message = + grpc_slice_from_copied_string("Failure that's not preventable."); grpc_transport_stream_op *op = grpc_make_transport_stream_op(NULL); grpc_transport_stream_op_add_close(op, GRPC_STATUS_PERMISSION_DENIED, &message); diff --git a/test/core/end2end/tests/invoke_large_request.c b/test/core/end2end/tests/invoke_large_request.c index 3820504e11..0a4d87c2fb 100644 --- a/test/core/end2end/tests/invoke_large_request.c +++ b/test/core/end2end/tests/invoke_large_request.c @@ -94,8 +94,8 @@ static void end_test(grpc_end2end_test_fixture *f) { grpc_completion_queue_destroy(f->cq); } -static gpr_slice large_slice(void) { - gpr_slice slice = gpr_slice_malloc(1000000); +static grpc_slice large_slice(void) { + grpc_slice slice = grpc_slice_malloc(1000000); memset(GPR_SLICE_START_PTR(slice), 'x', GPR_SLICE_LENGTH(slice)); return slice; } @@ -120,8 +120,8 @@ static void test_invoke_large_request(grpc_end2end_test_config config, begin_test(config, name, &channel_args, &channel_args); gpr_free(name); - gpr_slice request_payload_slice = large_slice(); - gpr_slice response_payload_slice = large_slice(); + grpc_slice request_payload_slice = large_slice(); + grpc_slice response_payload_slice = large_slice(); grpc_call *c; grpc_call *s; grpc_byte_buffer *request_payload = @@ -262,8 +262,8 @@ static void test_invoke_large_request(grpc_end2end_test_config config, grpc_byte_buffer_destroy(response_payload); grpc_byte_buffer_destroy(request_payload_recv); grpc_byte_buffer_destroy(response_payload_recv); - gpr_slice_unref(request_payload_slice); - gpr_slice_unref(response_payload_slice); + grpc_slice_unref(request_payload_slice); + grpc_slice_unref(response_payload_slice); end_test(&f); config.tear_down_data(&f); diff --git a/test/core/end2end/tests/large_metadata.c b/test/core/end2end/tests/large_metadata.c index 6107836b12..29dcafb985 100644 --- a/test/core/end2end/tests/large_metadata.c +++ b/test/core/end2end/tests/large_metadata.c @@ -99,7 +99,7 @@ static void end_test(grpc_end2end_test_fixture *f) { static void test_request_with_large_metadata(grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); gpr_timespec deadline = five_seconds_time(); diff --git a/test/core/end2end/tests/load_reporting_hook.c b/test/core/end2end/tests/load_reporting_hook.c index 0915730a02..1dba200c02 100644 --- a/test/core/end2end/tests/load_reporting_hook.c +++ b/test/core/end2end/tests/load_reporting_hook.c @@ -127,8 +127,8 @@ static void request_response_with_payload(grpc_end2end_test_fixture f, const char *response_msg, grpc_metadata *initial_lr_metadata, grpc_metadata *trailing_lr_metadata) { - gpr_slice request_payload_slice = gpr_slice_from_static_string(request_msg); - gpr_slice response_payload_slice = gpr_slice_from_static_string(response_msg); + grpc_slice request_payload_slice = grpc_slice_from_static_string(request_msg); + grpc_slice response_payload_slice = grpc_slice_from_static_string(response_msg); grpc_call *c; grpc_call *s; grpc_byte_buffer *request_payload = diff --git a/test/core/end2end/tests/max_message_length.c b/test/core/end2end/tests/max_message_length.c index 449a581d23..cdf52f9838 100644 --- a/test/core/end2end/tests/max_message_length.c +++ b/test/core/end2end/tests/max_message_length.c @@ -116,7 +116,7 @@ static void test_max_message_length_on_request(grpc_end2end_test_config config, cq_verifier *cqv; grpc_op ops[6]; grpc_op *op; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_byte_buffer *recv_payload = NULL; @@ -277,8 +277,8 @@ static void test_max_message_length_on_response(grpc_end2end_test_config config, cq_verifier *cqv; grpc_op ops[6]; grpc_op *op; - gpr_slice response_payload_slice = - gpr_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = + grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *response_payload = grpc_raw_byte_buffer_create(&response_payload_slice, 1); grpc_byte_buffer *recv_payload = NULL; diff --git a/test/core/end2end/tests/network_status_change.c b/test/core/end2end/tests/network_status_change.c index fa711bb0b6..e9528ff105 100644 --- a/test/core/end2end/tests/network_status_change.c +++ b/test/core/end2end/tests/network_status_change.c @@ -102,7 +102,7 @@ static void end_test(grpc_end2end_test_fixture *f) { static void test_invoke_network_status_change(grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); gpr_timespec deadline = five_seconds_time(); diff --git a/test/core/end2end/tests/payload.c b/test/core/end2end/tests/payload.c index 8353ea32fd..5a19950726 100644 --- a/test/core/end2end/tests/payload.c +++ b/test/core/end2end/tests/payload.c @@ -95,8 +95,8 @@ static void end_test(grpc_end2end_test_fixture *f) { grpc_completion_queue_destroy(f->cq); } -/* Creates and returns a gpr_slice containing random alphanumeric characters. */ -static gpr_slice generate_random_slice() { +/* Creates and returns a grpc_slice containing random alphanumeric characters. */ +static grpc_slice generate_random_slice() { size_t i; static const char chars[] = "abcdefghijklmnopqrstuvwxyz1234567890"; char *output; @@ -106,7 +106,7 @@ static gpr_slice generate_random_slice() { output[i] = chars[rand() % (int)(sizeof(chars) - 1)]; } output[output_size - 1] = '\0'; - gpr_slice out = gpr_slice_from_copied_string(output); + grpc_slice out = grpc_slice_from_copied_string(output); gpr_free(output); return out; } @@ -115,8 +115,8 @@ static void request_response_with_payload(grpc_end2end_test_fixture f) { /* Create large request and response bodies. These are big enough to require * multiple round trips to deliver to the peer, and their exact contents of * will be verified on completion. */ - gpr_slice request_payload_slice = generate_random_slice(); - gpr_slice response_payload_slice = generate_random_slice(); + grpc_slice request_payload_slice = generate_random_slice(); + grpc_slice response_payload_slice = generate_random_slice(); grpc_call *c; grpc_call *s; diff --git a/test/core/end2end/tests/ping_pong_streaming.c b/test/core/end2end/tests/ping_pong_streaming.c index 30ea80043b..3398a9cff7 100644 --- a/test/core/end2end/tests/ping_pong_streaming.c +++ b/test/core/end2end/tests/ping_pong_streaming.c @@ -120,8 +120,8 @@ static void test_pingpong_streaming(grpc_end2end_test_config config, grpc_byte_buffer *response_payload; grpc_byte_buffer *response_payload_recv; int i; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); - gpr_slice response_payload_slice = gpr_slice_from_copied_string("hello you"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you"); c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo", "foo.test.google.fr:1234", deadline, @@ -228,8 +228,8 @@ static void test_pingpong_streaming(grpc_end2end_test_config config, grpc_byte_buffer_destroy(response_payload_recv); } - gpr_slice_unref(request_payload_slice); - gpr_slice_unref(response_payload_slice); + grpc_slice_unref(request_payload_slice); + grpc_slice_unref(response_payload_slice); memset(ops, 0, sizeof(ops)); op = ops; diff --git a/test/core/end2end/tests/request_with_flags.c b/test/core/end2end/tests/request_with_flags.c index 69ad69af66..a37fc645b4 100644 --- a/test/core/end2end/tests/request_with_flags.c +++ b/test/core/end2end/tests/request_with_flags.c @@ -100,7 +100,7 @@ static void test_invoke_request_with_flags( grpc_end2end_test_config config, uint32_t *flags_for_op, grpc_call_error call_start_batch_expected_result) { grpc_call *c; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); gpr_timespec deadline = five_seconds_time(); diff --git a/test/core/end2end/tests/request_with_payload.c b/test/core/end2end/tests/request_with_payload.c index 56ff83cdb4..3e2bbb3b0e 100644 --- a/test/core/end2end/tests/request_with_payload.c +++ b/test/core/end2end/tests/request_with_payload.c @@ -99,7 +99,7 @@ static void end_test(grpc_end2end_test_fixture *f) { static void test_invoke_request_with_payload(grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); gpr_timespec deadline = five_seconds_time(); diff --git a/test/core/end2end/tests/resource_quota_server.c b/test/core/end2end/tests/resource_quota_server.c index 6170444373..280bad5749 100644 --- a/test/core/end2end/tests/resource_quota_server.c +++ b/test/core/end2end/tests/resource_quota_server.c @@ -95,8 +95,8 @@ static void end_test(grpc_end2end_test_fixture *f) { grpc_completion_queue_destroy(f->cq); } -/* Creates and returns a gpr_slice containing random alphanumeric characters. */ -static gpr_slice generate_random_slice() { +/* Creates and returns a grpc_slice containing random alphanumeric characters. */ +static grpc_slice generate_random_slice() { size_t i; static const char chars[] = "abcdefghijklmnopqrstuvwxyz1234567890"; char output[1024 * 1024]; @@ -104,7 +104,7 @@ static gpr_slice generate_random_slice() { output[i] = chars[rand() % (int)(sizeof(chars) - 1)]; } output[GPR_ARRAY_SIZE(output) - 1] = '\0'; - return gpr_slice_from_copied_string(output); + return grpc_slice_from_copied_string(output); } void resource_quota_server(grpc_end2end_test_config config) { @@ -131,7 +131,7 @@ void resource_quota_server(grpc_end2end_test_config config) { /* Create large request and response bodies. These are big enough to require * multiple round trips to deliver to the peer, and their exact contents of * will be verified on completion. */ - gpr_slice request_payload_slice = generate_random_slice(); + grpc_slice request_payload_slice = generate_random_slice(); grpc_call *client_calls[NUM_CALLS]; grpc_call *server_calls[NUM_CALLS]; @@ -349,7 +349,7 @@ void resource_quota_server(grpc_end2end_test_config config) { GPR_ASSERT(cancelled_calls_on_server >= 0.9 * cancelled_calls_on_client); grpc_byte_buffer_destroy(request_payload); - gpr_slice_unref(request_payload_slice); + grpc_slice_unref(request_payload_slice); grpc_resource_quota_unref(resource_quota); end_test(&f); diff --git a/test/core/end2end/tests/simple_cacheable_request.c b/test/core/end2end/tests/simple_cacheable_request.c index 29ba41bd8b..40dd3983e1 100644 --- a/test/core/end2end/tests/simple_cacheable_request.c +++ b/test/core/end2end/tests/simple_cacheable_request.c @@ -102,8 +102,8 @@ static void test_cacheable_request_response_with_metadata_and_payload( grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); - gpr_slice response_payload_slice = gpr_slice_from_copied_string("hello you"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_byte_buffer *response_payload = diff --git a/test/core/end2end/tests/simple_metadata.c b/test/core/end2end/tests/simple_metadata.c index 304af9c3fa..1ac9dc8210 100644 --- a/test/core/end2end/tests/simple_metadata.c +++ b/test/core/end2end/tests/simple_metadata.c @@ -100,8 +100,8 @@ static void test_request_response_with_metadata_and_payload( grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); - gpr_slice response_payload_slice = gpr_slice_from_copied_string("hello you"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_byte_buffer *response_payload = diff --git a/test/core/end2end/tests/streaming_error_response.c b/test/core/end2end/tests/streaming_error_response.c index fe63c6f7bb..efd41c508c 100644 --- a/test/core/end2end/tests/streaming_error_response.c +++ b/test/core/end2end/tests/streaming_error_response.c @@ -101,10 +101,10 @@ static void end_test(grpc_end2end_test_fixture *f) { static void test(grpc_end2end_test_config config, bool request_status_early) { grpc_call *c; grpc_call *s; - gpr_slice response_payload1_slice = gpr_slice_from_copied_string("hello"); + grpc_slice response_payload1_slice = grpc_slice_from_copied_string("hello"); grpc_byte_buffer *response_payload1 = grpc_raw_byte_buffer_create(&response_payload1_slice, 1); - gpr_slice response_payload2_slice = gpr_slice_from_copied_string("world"); + grpc_slice response_payload2_slice = grpc_slice_from_copied_string("world"); grpc_byte_buffer *response_payload2 = grpc_raw_byte_buffer_create(&response_payload2_slice, 1); gpr_timespec deadline = five_seconds_time(); diff --git a/test/core/end2end/tests/trailing_metadata.c b/test/core/end2end/tests/trailing_metadata.c index e6bfc7c9f1..0bbf0879cc 100644 --- a/test/core/end2end/tests/trailing_metadata.c +++ b/test/core/end2end/tests/trailing_metadata.c @@ -100,8 +100,8 @@ static void test_request_response_with_metadata_and_payload( grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); - gpr_slice response_payload_slice = gpr_slice_from_copied_string("hello you"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_byte_buffer *response_payload = diff --git a/test/core/fling/client.c b/test/core/fling/client.c index bcc195a92f..e717b7f7fe 100644 --- a/test/core/fling/client.c +++ b/test/core/fling/client.c @@ -155,7 +155,7 @@ static const scenario scenarios[] = { }; int main(int argc, char **argv) { - gpr_slice slice = gpr_slice_from_copied_string("x"); + grpc_slice slice = grpc_slice_from_copied_string("x"); double start, stop; unsigned i; @@ -241,7 +241,7 @@ int main(int argc, char **argv) { } while (event.type != GRPC_QUEUE_SHUTDOWN); grpc_completion_queue_destroy(cq); grpc_byte_buffer_destroy(the_buffer); - gpr_slice_unref(slice); + grpc_slice_unref(slice); gpr_log(GPR_INFO, "latency (50/95/99/99.9): %f/%f/%f/%f", gpr_histogram_percentile(histogram, 50), diff --git a/test/core/http/format_request_test.c b/test/core/http/format_request_test.c index 0d21e1200b..bd31e5e8ab 100644 --- a/test/core/http/format_request_test.c +++ b/test/core/http/format_request_test.c @@ -41,7 +41,7 @@ static void test_format_get_request(void) { grpc_http_header hdr = {"x-yz", "abc"}; grpc_httpcli_request req; - gpr_slice slice; + grpc_slice slice; memset(&req, 0, sizeof(req)); req.host = "example.com"; @@ -51,7 +51,7 @@ static void test_format_get_request(void) { slice = grpc_httpcli_format_get_request(&req); - GPR_ASSERT(0 == gpr_slice_str_cmp(slice, + GPR_ASSERT(0 == grpc_slice_str_cmp(slice, "GET /index.html HTTP/1.0\r\n" "Host: example.com\r\n" "Connection: close\r\n" @@ -60,13 +60,13 @@ static void test_format_get_request(void) { "x-yz: abc\r\n" "\r\n")); - gpr_slice_unref(slice); + grpc_slice_unref(slice); } static void test_format_post_request(void) { grpc_http_header hdr = {"x-yz", "abc"}; grpc_httpcli_request req; - gpr_slice slice; + grpc_slice slice; char body_bytes[] = "fake body"; size_t body_len = 9; @@ -78,7 +78,7 @@ static void test_format_post_request(void) { slice = grpc_httpcli_format_post_request(&req, body_bytes, body_len); - GPR_ASSERT(0 == gpr_slice_str_cmp(slice, + GPR_ASSERT(0 == grpc_slice_str_cmp(slice, "POST /index.html HTTP/1.0\r\n" "Host: example.com\r\n" "Connection: close\r\n" @@ -90,13 +90,13 @@ static void test_format_post_request(void) { "\r\n" "fake body")); - gpr_slice_unref(slice); + grpc_slice_unref(slice); } static void test_format_post_request_no_body(void) { grpc_http_header hdr = {"x-yz", "abc"}; grpc_httpcli_request req; - gpr_slice slice; + grpc_slice slice; memset(&req, 0, sizeof(req)); req.host = "example.com"; @@ -106,7 +106,7 @@ static void test_format_post_request_no_body(void) { slice = grpc_httpcli_format_post_request(&req, NULL, 0); - GPR_ASSERT(0 == gpr_slice_str_cmp(slice, + GPR_ASSERT(0 == grpc_slice_str_cmp(slice, "POST /index.html HTTP/1.0\r\n" "Host: example.com\r\n" "Connection: close\r\n" @@ -115,13 +115,13 @@ static void test_format_post_request_no_body(void) { "x-yz: abc\r\n" "\r\n")); - gpr_slice_unref(slice); + grpc_slice_unref(slice); } static void test_format_post_request_content_type_override(void) { grpc_http_header hdrs[2]; grpc_httpcli_request req; - gpr_slice slice; + grpc_slice slice; char body_bytes[] = "fake%20body"; size_t body_len = 11; @@ -137,7 +137,7 @@ static void test_format_post_request_content_type_override(void) { slice = grpc_httpcli_format_post_request(&req, body_bytes, body_len); - GPR_ASSERT(0 == gpr_slice_str_cmp( + GPR_ASSERT(0 == grpc_slice_str_cmp( slice, "POST /index.html HTTP/1.0\r\n" "Host: example.com\r\n" @@ -149,7 +149,7 @@ static void test_format_post_request_content_type_override(void) { "\r\n" "fake%20body")); - gpr_slice_unref(slice); + grpc_slice_unref(slice); } int main(int argc, char **argv) { diff --git a/test/core/http/parser_test.c b/test/core/http/parser_test.c index 2fc354d9ee..4f1445d3f1 100644 --- a/test/core/http/parser_test.c +++ b/test/core/http/parser_test.c @@ -48,23 +48,23 @@ static void test_request_succeeds(grpc_slice_split_mode split_mode, grpc_http_version expect_version, char *expect_path, char *expect_body, ...) { grpc_http_parser parser; - gpr_slice input_slice = gpr_slice_from_copied_string(request_text); + grpc_slice input_slice = grpc_slice_from_copied_string(request_text); size_t num_slices; size_t i; - gpr_slice *slices; + grpc_slice *slices; va_list args; grpc_http_request request; memset(&request, 0, sizeof(request)); grpc_split_slices(split_mode, &input_slice, 1, &slices, &num_slices); - gpr_slice_unref(input_slice); + grpc_slice_unref(input_slice); grpc_http_parser_init(&parser, GRPC_HTTP_REQUEST, &request); for (i = 0; i < num_slices; i++) { GPR_ASSERT(grpc_http_parser_parse(&parser, slices[i], NULL) == GRPC_ERROR_NONE); - gpr_slice_unref(slices[i]); + grpc_slice_unref(slices[i]); } GPR_ASSERT(grpc_http_parser_eof(&parser) == GRPC_ERROR_NONE); @@ -105,23 +105,23 @@ static void test_request_succeeds(grpc_slice_split_mode split_mode, static void test_succeeds(grpc_slice_split_mode split_mode, char *response_text, int expect_status, char *expect_body, ...) { grpc_http_parser parser; - gpr_slice input_slice = gpr_slice_from_copied_string(response_text); + grpc_slice input_slice = grpc_slice_from_copied_string(response_text); size_t num_slices; size_t i; - gpr_slice *slices; + grpc_slice *slices; va_list args; grpc_http_response response; memset(&response, 0, sizeof(response)); grpc_split_slices(split_mode, &input_slice, 1, &slices, &num_slices); - gpr_slice_unref(input_slice); + grpc_slice_unref(input_slice); grpc_http_parser_init(&parser, GRPC_HTTP_RESPONSE, &response); for (i = 0; i < num_slices; i++) { GPR_ASSERT(grpc_http_parser_parse(&parser, slices[i], NULL) == GRPC_ERROR_NONE); - gpr_slice_unref(slices[i]); + grpc_slice_unref(slices[i]); } GPR_ASSERT(grpc_http_parser_eof(&parser) == GRPC_ERROR_NONE); @@ -158,16 +158,16 @@ static void test_succeeds(grpc_slice_split_mode split_mode, char *response_text, static void test_fails(grpc_slice_split_mode split_mode, char *response_text) { grpc_http_parser parser; - gpr_slice input_slice = gpr_slice_from_copied_string(response_text); + grpc_slice input_slice = grpc_slice_from_copied_string(response_text); size_t num_slices; size_t i; - gpr_slice *slices; + grpc_slice *slices; grpc_error *error = GRPC_ERROR_NONE; grpc_http_response response; memset(&response, 0, sizeof(response)); grpc_split_slices(split_mode, &input_slice, 1, &slices, &num_slices); - gpr_slice_unref(input_slice); + grpc_slice_unref(input_slice); grpc_http_parser_init(&parser, GRPC_HTTP_RESPONSE, &response); @@ -175,7 +175,7 @@ static void test_fails(grpc_slice_split_mode split_mode, char *response_text) { if (GRPC_ERROR_NONE == error) { error = grpc_http_parser_parse(&parser, slices[i], NULL); } - gpr_slice_unref(slices[i]); + grpc_slice_unref(slices[i]); } if (GRPC_ERROR_NONE == error) { error = grpc_http_parser_eof(&parser); @@ -191,16 +191,16 @@ static void test_fails(grpc_slice_split_mode split_mode, char *response_text) { static void test_request_fails(grpc_slice_split_mode split_mode, char *request_text) { grpc_http_parser parser; - gpr_slice input_slice = gpr_slice_from_copied_string(request_text); + grpc_slice input_slice = grpc_slice_from_copied_string(request_text); size_t num_slices; size_t i; - gpr_slice *slices; + grpc_slice *slices; grpc_error *error = GRPC_ERROR_NONE; grpc_http_request request; memset(&request, 0, sizeof(request)); grpc_split_slices(split_mode, &input_slice, 1, &slices, &num_slices); - gpr_slice_unref(input_slice); + grpc_slice_unref(input_slice); grpc_http_parser_init(&parser, GRPC_HTTP_REQUEST, &request); @@ -208,7 +208,7 @@ static void test_request_fails(grpc_slice_split_mode split_mode, if (error == GRPC_ERROR_NONE) { error = grpc_http_parser_parse(&parser, slices[i], NULL); } - gpr_slice_unref(slices[i]); + grpc_slice_unref(slices[i]); } if (error == GRPC_ERROR_NONE) { error = grpc_http_parser_eof(&parser); diff --git a/test/core/http/request_fuzzer.c b/test/core/http/request_fuzzer.c index bb6cb92c0c..98e2c9680d 100644 --- a/test/core/http/request_fuzzer.c +++ b/test/core/http/request_fuzzer.c @@ -47,10 +47,10 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_http_request request; memset(&request, 0, sizeof(request)); grpc_http_parser_init(&parser, GRPC_HTTP_REQUEST, &request); - gpr_slice slice = gpr_slice_from_copied_buffer((const char *)data, size); + grpc_slice slice = grpc_slice_from_copied_buffer((const char *)data, size); GRPC_ERROR_UNREF(grpc_http_parser_parse(&parser, slice, NULL)); GRPC_ERROR_UNREF(grpc_http_parser_eof(&parser)); - gpr_slice_unref(slice); + grpc_slice_unref(slice); grpc_http_parser_destroy(&parser); grpc_http_request_destroy(&request); return 0; diff --git a/test/core/http/response_fuzzer.c b/test/core/http/response_fuzzer.c index 4393840484..fff04117b2 100644 --- a/test/core/http/response_fuzzer.c +++ b/test/core/http/response_fuzzer.c @@ -46,10 +46,10 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_http_response response; memset(&response, 0, sizeof(response)); grpc_http_parser_init(&parser, GRPC_HTTP_RESPONSE, &response); - gpr_slice slice = gpr_slice_from_copied_buffer((const char *)data, size); + grpc_slice slice = grpc_slice_from_copied_buffer((const char *)data, size); GRPC_ERROR_UNREF(grpc_http_parser_parse(&parser, slice, NULL)); GRPC_ERROR_UNREF(grpc_http_parser_eof(&parser)); - gpr_slice_unref(slice); + grpc_slice_unref(slice); grpc_http_parser_destroy(&parser); grpc_http_response_destroy(&response); return 0; diff --git a/test/core/internal_api_canaries/transport.c b/test/core/internal_api_canaries/transport.c index 0617865412..2989f59535 100644 --- a/test/core/internal_api_canaries/transport.c +++ b/test/core/internal_api_canaries/transport.c @@ -69,7 +69,7 @@ static void test_code(void) { grpc_transport_perform_op(&transport, NULL, NULL); grpc_transport_ping(&transport, NULL); grpc_transport_goaway(&transport, GRPC_STATUS_UNAVAILABLE, - gpr_slice_malloc(0)); + grpc_slice_malloc(0)); grpc_transport_close(&transport); grpc_transport_destroy(&transport, NULL); GPR_ASSERT("xyz" == grpc_transport_get_peer(&transport, NULL)); diff --git a/test/core/iomgr/endpoint_tests.c b/test/core/iomgr/endpoint_tests.c index b79c22e42a..775c0a3e6b 100644 --- a/test/core/iomgr/endpoint_tests.c +++ b/test/core/iomgr/endpoint_tests.c @@ -62,7 +62,7 @@ static gpr_mu *g_mu; static grpc_pollset *g_pollset; -size_t count_slices(gpr_slice *slices, size_t nslices, int *current_data) { +size_t count_slices(grpc_slice *slices, size_t nslices, int *current_data) { size_t num_bytes = 0; size_t i; size_t j; @@ -87,10 +87,10 @@ static grpc_endpoint_test_fixture begin_test(grpc_endpoint_test_config config, static void end_test(grpc_endpoint_test_config config) { config.clean_up(); } -static gpr_slice *allocate_blocks(size_t num_bytes, size_t slice_size, +static grpc_slice *allocate_blocks(size_t num_bytes, size_t slice_size, size_t *num_blocks, uint8_t *current_data) { size_t nslices = num_bytes / slice_size + (num_bytes % slice_size ? 1 : 0); - gpr_slice *slices = gpr_malloc(sizeof(gpr_slice) * nslices); + grpc_slice *slices = gpr_malloc(sizeof(grpc_slice) * nslices); size_t num_bytes_left = num_bytes; size_t i; size_t j; @@ -98,7 +98,7 @@ static gpr_slice *allocate_blocks(size_t num_bytes, size_t slice_size, *num_blocks = nslices; for (i = 0; i < nslices; ++i) { - slices[i] = gpr_slice_malloc(slice_size > num_bytes_left ? num_bytes_left + slices[i] = grpc_slice_malloc(slice_size > num_bytes_left ? num_bytes_left : slice_size); num_bytes_left -= GPR_SLICE_LENGTH(slices[i]); buf = GPR_SLICE_START_PTR(slices[i]); @@ -122,8 +122,8 @@ struct read_and_write_test_state { uint8_t current_write_data; int read_done; int write_done; - gpr_slice_buffer incoming; - gpr_slice_buffer outgoing; + grpc_slice_buffer incoming; + grpc_slice_buffer outgoing; grpc_closure done_read; grpc_closure done_write; }; @@ -149,7 +149,7 @@ static void read_and_write_test_read_handler(grpc_exec_ctx *exec_ctx, static void read_and_write_test_write_handler(grpc_exec_ctx *exec_ctx, void *data, grpc_error *error) { struct read_and_write_test_state *state = data; - gpr_slice *slices = NULL; + grpc_slice *slices = NULL; size_t nslices; if (error == GRPC_ERROR_NONE) { @@ -161,8 +161,8 @@ static void read_and_write_test_write_handler(grpc_exec_ctx *exec_ctx, if (state->current_write_size != 0) { slices = allocate_blocks(state->current_write_size, 8192, &nslices, &state->current_write_data); - gpr_slice_buffer_reset_and_unref(&state->outgoing); - gpr_slice_buffer_addn(&state->outgoing, slices, nslices); + grpc_slice_buffer_reset_and_unref(&state->outgoing); + grpc_slice_buffer_addn(&state->outgoing, slices, nslices); grpc_endpoint_write(exec_ctx, state->write_ep, &state->outgoing, &state->done_write); gpr_free(slices); @@ -214,8 +214,8 @@ static void read_and_write_test(grpc_endpoint_test_config config, grpc_closure_init(&state.done_read, read_and_write_test_read_handler, &state); grpc_closure_init(&state.done_write, read_and_write_test_write_handler, &state); - gpr_slice_buffer_init(&state.outgoing); - gpr_slice_buffer_init(&state.incoming); + grpc_slice_buffer_init(&state.outgoing); + grpc_slice_buffer_init(&state.incoming); /* Get started by pretending an initial write completed */ /* NOTE: Sets up initial conditions so we can have the same write handler @@ -249,8 +249,8 @@ static void read_and_write_test(grpc_endpoint_test_config config, grpc_exec_ctx_flush(&exec_ctx); end_test(config); - gpr_slice_buffer_destroy(&state.outgoing); - gpr_slice_buffer_destroy(&state.incoming); + grpc_slice_buffer_destroy(&state.outgoing); + grpc_slice_buffer_destroy(&state.incoming); grpc_endpoint_destroy(&exec_ctx, state.read_ep); grpc_endpoint_destroy(&exec_ctx, state.write_ep); grpc_exec_ctx_finish(&exec_ctx); @@ -284,8 +284,8 @@ static void multiple_shutdown_test(grpc_endpoint_test_config config) { begin_test(config, "multiple_shutdown_test", 128); int fail_count = 0; - gpr_slice_buffer slice_buffer; - gpr_slice_buffer_init(&slice_buffer); + grpc_slice_buffer slice_buffer; + grpc_slice_buffer_init(&slice_buffer); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_endpoint_add_to_pollset(&exec_ctx, f.client_ep, g_pollset); @@ -297,14 +297,14 @@ static void multiple_shutdown_test(grpc_endpoint_test_config config) { grpc_endpoint_read(&exec_ctx, f.client_ep, &slice_buffer, grpc_closure_create(inc_on_failure, &fail_count)); wait_for_fail_count(&exec_ctx, &fail_count, 2); - gpr_slice_buffer_add(&slice_buffer, gpr_slice_from_copied_string("a")); + grpc_slice_buffer_add(&slice_buffer, grpc_slice_from_copied_string("a")); grpc_endpoint_write(&exec_ctx, f.client_ep, &slice_buffer, grpc_closure_create(inc_on_failure, &fail_count)); wait_for_fail_count(&exec_ctx, &fail_count, 3); grpc_endpoint_shutdown(&exec_ctx, f.client_ep); wait_for_fail_count(&exec_ctx, &fail_count, 3); - gpr_slice_buffer_destroy(&slice_buffer); + grpc_slice_buffer_destroy(&slice_buffer); grpc_endpoint_destroy(&exec_ctx, f.client_ep); grpc_endpoint_destroy(&exec_ctx, f.server_ep); diff --git a/test/core/iomgr/load_file_test.c b/test/core/iomgr/load_file_test.c index f70295a81c..c7387fe7a4 100644 --- a/test/core/iomgr/load_file_test.c +++ b/test/core/iomgr/load_file_test.c @@ -49,8 +49,8 @@ static const char prefix[] = "file_test"; static void test_load_empty_file(void) { FILE *tmp = NULL; - gpr_slice slice; - gpr_slice slice_with_null_term; + grpc_slice slice; + grpc_slice slice_with_null_term; grpc_error *error; char *tmp_name; @@ -72,13 +72,13 @@ static void test_load_empty_file(void) { remove(tmp_name); gpr_free(tmp_name); - gpr_slice_unref(slice); - gpr_slice_unref(slice_with_null_term); + grpc_slice_unref(slice); + grpc_slice_unref(slice_with_null_term); } static void test_load_failure(void) { FILE *tmp = NULL; - gpr_slice slice; + grpc_slice slice; grpc_error *error; char *tmp_name; @@ -95,13 +95,13 @@ static void test_load_failure(void) { GRPC_ERROR_UNREF(error); GPR_ASSERT(GPR_SLICE_LENGTH(slice) == 0); gpr_free(tmp_name); - gpr_slice_unref(slice); + grpc_slice_unref(slice); } static void test_load_small_file(void) { FILE *tmp = NULL; - gpr_slice slice; - gpr_slice slice_with_null_term; + grpc_slice slice; + grpc_slice slice_with_null_term; grpc_error *error; char *tmp_name; const char *blah = "blah"; @@ -127,13 +127,13 @@ static void test_load_small_file(void) { remove(tmp_name); gpr_free(tmp_name); - gpr_slice_unref(slice); - gpr_slice_unref(slice_with_null_term); + grpc_slice_unref(slice); + grpc_slice_unref(slice_with_null_term); } static void test_load_big_file(void) { FILE *tmp = NULL; - gpr_slice slice; + grpc_slice slice; grpc_error *error; char *tmp_name; static const size_t buffer_size = 124631; @@ -161,7 +161,7 @@ static void test_load_big_file(void) { remove(tmp_name); gpr_free(tmp_name); - gpr_slice_unref(slice); + grpc_slice_unref(slice); gpr_free(buffer); } diff --git a/test/core/iomgr/resource_quota_test.c b/test/core/iomgr/resource_quota_test.c index 5e2f9f8359..85c6ce6e70 100644 --- a/test/core/iomgr/resource_quota_test.c +++ b/test/core/iomgr/resource_quota_test.c @@ -657,8 +657,8 @@ static void test_one_slice(void) { grpc_resource_user_slice_allocator_init(&alloc, &usr, inc_int_cb, &num_allocs); - gpr_slice_buffer buffer; - gpr_slice_buffer_init(&buffer); + grpc_slice_buffer buffer; + grpc_slice_buffer_init(&buffer); { const int start_allocs = num_allocs; @@ -668,7 +668,7 @@ static void test_one_slice(void) { GPR_ASSERT(num_allocs == start_allocs + 1); } - gpr_slice_buffer_destroy(&buffer); + grpc_slice_buffer_destroy(&buffer); destroy_user(&usr); grpc_resource_quota_unref(q); } @@ -688,8 +688,8 @@ static void test_one_slice_deleted_late(void) { grpc_resource_user_slice_allocator_init(&alloc, &usr, inc_int_cb, &num_allocs); - gpr_slice_buffer buffer; - gpr_slice_buffer_init(&buffer); + grpc_slice_buffer buffer; + grpc_slice_buffer_init(&buffer); { const int start_allocs = num_allocs; @@ -708,7 +708,7 @@ static void test_one_slice_deleted_late(void) { } grpc_resource_quota_unref(q); - gpr_slice_buffer_destroy(&buffer); + grpc_slice_buffer_destroy(&buffer); GPR_ASSERT(done); { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; diff --git a/test/core/iomgr/tcp_posix_test.c b/test/core/iomgr/tcp_posix_test.c index 3f2e19ffd8..a259390d5e 100644 --- a/test/core/iomgr/tcp_posix_test.c +++ b/test/core/iomgr/tcp_posix_test.c @@ -119,11 +119,11 @@ struct read_socket_state { grpc_endpoint *ep; size_t read_bytes; size_t target_read_bytes; - gpr_slice_buffer incoming; + grpc_slice_buffer incoming; grpc_closure read_cb; }; -static size_t count_slices(gpr_slice *slices, size_t nslices, +static size_t count_slices(grpc_slice *slices, size_t nslices, int *current_data) { size_t num_bytes = 0; unsigned i, j; @@ -188,7 +188,7 @@ static void read_test(size_t num_bytes, size_t slice_size) { state.ep = ep; state.read_bytes = 0; state.target_read_bytes = written_bytes; - gpr_slice_buffer_init(&state.incoming); + grpc_slice_buffer_init(&state.incoming); grpc_closure_init(&state.read_cb, read_cb, &state); grpc_endpoint_read(&exec_ctx, ep, &state.incoming, &state.read_cb); @@ -207,7 +207,7 @@ static void read_test(size_t num_bytes, size_t slice_size) { GPR_ASSERT(state.read_bytes == state.target_read_bytes); gpr_mu_unlock(g_mu); - gpr_slice_buffer_destroy(&state.incoming); + grpc_slice_buffer_destroy(&state.incoming); grpc_endpoint_destroy(&exec_ctx, ep); grpc_exec_ctx_finish(&exec_ctx); } @@ -239,7 +239,7 @@ static void large_read_test(size_t slice_size) { state.ep = ep; state.read_bytes = 0; state.target_read_bytes = (size_t)written_bytes; - gpr_slice_buffer_init(&state.incoming); + grpc_slice_buffer_init(&state.incoming); grpc_closure_init(&state.read_cb, read_cb, &state); grpc_endpoint_read(&exec_ctx, ep, &state.incoming, &state.read_cb); @@ -258,7 +258,7 @@ static void large_read_test(size_t slice_size) { GPR_ASSERT(state.read_bytes == state.target_read_bytes); gpr_mu_unlock(g_mu); - gpr_slice_buffer_destroy(&state.incoming); + grpc_slice_buffer_destroy(&state.incoming); grpc_endpoint_destroy(&exec_ctx, ep); grpc_exec_ctx_finish(&exec_ctx); } @@ -268,17 +268,17 @@ struct write_socket_state { int write_done; }; -static gpr_slice *allocate_blocks(size_t num_bytes, size_t slice_size, +static grpc_slice *allocate_blocks(size_t num_bytes, size_t slice_size, size_t *num_blocks, uint8_t *current_data) { size_t nslices = num_bytes / slice_size + (num_bytes % slice_size ? 1u : 0u); - gpr_slice *slices = gpr_malloc(sizeof(gpr_slice) * nslices); + grpc_slice *slices = gpr_malloc(sizeof(grpc_slice) * nslices); size_t num_bytes_left = num_bytes; unsigned i, j; unsigned char *buf; *num_blocks = nslices; for (i = 0; i < nslices; ++i) { - slices[i] = gpr_slice_malloc(slice_size > num_bytes_left ? num_bytes_left + slices[i] = grpc_slice_malloc(slice_size > num_bytes_left ? num_bytes_left : slice_size); num_bytes_left -= GPR_SLICE_LENGTH(slices[i]); buf = GPR_SLICE_START_PTR(slices[i]); @@ -352,9 +352,9 @@ static void write_test(size_t num_bytes, size_t slice_size) { grpc_endpoint *ep; struct write_socket_state state; size_t num_blocks; - gpr_slice *slices; + grpc_slice *slices; uint8_t current_data = 0; - gpr_slice_buffer outgoing; + grpc_slice_buffer outgoing; grpc_closure write_done_closure; gpr_timespec deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(20); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -377,8 +377,8 @@ static void write_test(size_t num_bytes, size_t slice_size) { slices = allocate_blocks(num_bytes, slice_size, &num_blocks, ¤t_data); - gpr_slice_buffer_init(&outgoing); - gpr_slice_buffer_addn(&outgoing, slices, num_blocks); + grpc_slice_buffer_init(&outgoing); + grpc_slice_buffer_addn(&outgoing, slices, num_blocks); grpc_closure_init(&write_done_closure, write_done, &state); grpc_endpoint_write(&exec_ctx, ep, &outgoing, &write_done_closure); @@ -399,7 +399,7 @@ static void write_test(size_t num_bytes, size_t slice_size) { } gpr_mu_unlock(g_mu); - gpr_slice_buffer_destroy(&outgoing); + grpc_slice_buffer_destroy(&outgoing); grpc_endpoint_destroy(&exec_ctx, ep); gpr_free(slices); grpc_exec_ctx_finish(&exec_ctx); @@ -446,7 +446,7 @@ static void release_fd_test(size_t num_bytes, size_t slice_size) { state.ep = ep; state.read_bytes = 0; state.target_read_bytes = written_bytes; - gpr_slice_buffer_init(&state.incoming); + grpc_slice_buffer_init(&state.incoming); grpc_closure_init(&state.read_cb, read_cb, &state); grpc_endpoint_read(&exec_ctx, ep, &state.incoming, &state.read_cb); @@ -467,7 +467,7 @@ static void release_fd_test(size_t num_bytes, size_t slice_size) { GPR_ASSERT(state.read_bytes == state.target_read_bytes); gpr_mu_unlock(g_mu); - gpr_slice_buffer_destroy(&state.incoming); + grpc_slice_buffer_destroy(&state.incoming); grpc_tcp_destroy_and_release_fd(&exec_ctx, ep, &fd, &fd_released_cb); grpc_exec_ctx_flush(&exec_ctx); gpr_mu_lock(g_mu); diff --git a/test/core/nanopb/fuzzer_response.c b/test/core/nanopb/fuzzer_response.c index a82f20df83..202c120c67 100644 --- a/test/core/nanopb/fuzzer_response.c +++ b/test/core/nanopb/fuzzer_response.c @@ -45,11 +45,11 @@ static void dont_log(gpr_log_func_args *args) {} int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { if (squelch) gpr_set_log_function(dont_log); - gpr_slice slice = gpr_slice_from_copied_buffer((const char *)data, size); + grpc_slice slice = grpc_slice_from_copied_buffer((const char *)data, size); grpc_grpclb_initial_response *response; if ((response = grpc_grpclb_initial_response_parse(slice))) { grpc_grpclb_initial_response_destroy(response); } - gpr_slice_unref(slice); + grpc_slice_unref(slice); return 0; } diff --git a/test/core/nanopb/fuzzer_serverlist.c b/test/core/nanopb/fuzzer_serverlist.c index 9700bf1cda..b225ae0d51 100644 --- a/test/core/nanopb/fuzzer_serverlist.c +++ b/test/core/nanopb/fuzzer_serverlist.c @@ -45,11 +45,11 @@ static void dont_log(gpr_log_func_args *args) {} int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { if (squelch) gpr_set_log_function(dont_log); - gpr_slice slice = gpr_slice_from_copied_buffer((const char *)data, size); + grpc_slice slice = grpc_slice_from_copied_buffer((const char *)data, size); grpc_grpclb_serverlist *serverlist; if ((serverlist = grpc_grpclb_response_parse_serverlist(slice))) { grpc_grpclb_destroy_serverlist(serverlist); } - gpr_slice_unref(slice); + grpc_slice_unref(slice); return 0; } diff --git a/test/core/security/b64_test.c b/test/core/security/b64_test.c index b26bd026fd..f88be392a2 100644 --- a/test/core/security/b64_test.c +++ b/test/core/security/b64_test.c @@ -57,12 +57,12 @@ static void test_simple_encode_decode_b64(int url_safe, int multiline) { const char *hello = "hello"; char *hello_b64 = grpc_base64_encode(hello, strlen(hello), url_safe, multiline); - gpr_slice hello_slice = grpc_base64_decode(hello_b64, url_safe); + grpc_slice hello_slice = grpc_base64_decode(hello_b64, url_safe); GPR_ASSERT(GPR_SLICE_LENGTH(hello_slice) == strlen(hello)); GPR_ASSERT(strncmp((const char *)GPR_SLICE_START_PTR(hello_slice), hello, GPR_SLICE_LENGTH(hello_slice)) == 0); - gpr_slice_unref(hello_slice); + grpc_slice_unref(hello_slice); gpr_free(hello_b64); } @@ -70,7 +70,7 @@ static void test_full_range_encode_decode_b64(int url_safe, int multiline) { unsigned char orig[256]; size_t i; char *b64; - gpr_slice orig_decoded; + grpc_slice orig_decoded; for (i = 0; i < sizeof(orig); i++) orig[i] = (uint8_t)i; /* Try all the different paddings. */ @@ -80,7 +80,7 @@ static void test_full_range_encode_decode_b64(int url_safe, int multiline) { GPR_ASSERT(GPR_SLICE_LENGTH(orig_decoded) == (sizeof(orig) - i)); GPR_ASSERT(buffers_are_equal(orig, GPR_SLICE_START_PTR(orig_decoded), sizeof(orig) - i)); - gpr_slice_unref(orig_decoded); + grpc_slice_unref(orig_decoded); gpr_free(b64); } } @@ -121,7 +121,7 @@ static void test_url_safe_unsafe_mismtach_failure(void) { unsigned char orig[256]; size_t i; char *b64; - gpr_slice orig_decoded; + grpc_slice orig_decoded; int url_safe = 1; for (i = 0; i < sizeof(orig); i++) orig[i] = (uint8_t)i; @@ -129,13 +129,13 @@ static void test_url_safe_unsafe_mismtach_failure(void) { orig_decoded = grpc_base64_decode(b64, !url_safe); GPR_ASSERT(GPR_SLICE_IS_EMPTY(orig_decoded)); gpr_free(b64); - gpr_slice_unref(orig_decoded); + grpc_slice_unref(orig_decoded); b64 = grpc_base64_encode(orig, sizeof(orig), !url_safe, 0); orig_decoded = grpc_base64_decode(b64, url_safe); GPR_ASSERT(GPR_SLICE_IS_EMPTY(orig_decoded)); gpr_free(b64); - gpr_slice_unref(orig_decoded); + grpc_slice_unref(orig_decoded); } static void test_rfc4648_test_vectors(void) { @@ -171,37 +171,37 @@ static void test_rfc4648_test_vectors(void) { } static void test_unpadded_decode(void) { - gpr_slice decoded; + grpc_slice decoded; decoded = grpc_base64_decode("Zm9vYmFy", 0); GPR_ASSERT(!GPR_SLICE_IS_EMPTY(decoded)); - GPR_ASSERT(gpr_slice_str_cmp(decoded, "foobar") == 0); - gpr_slice_unref(decoded); + GPR_ASSERT(grpc_slice_str_cmp(decoded, "foobar") == 0); + grpc_slice_unref(decoded); decoded = grpc_base64_decode("Zm9vYmE", 0); GPR_ASSERT(!GPR_SLICE_IS_EMPTY(decoded)); - GPR_ASSERT(gpr_slice_str_cmp(decoded, "fooba") == 0); - gpr_slice_unref(decoded); + GPR_ASSERT(grpc_slice_str_cmp(decoded, "fooba") == 0); + grpc_slice_unref(decoded); decoded = grpc_base64_decode("Zm9vYg", 0); GPR_ASSERT(!GPR_SLICE_IS_EMPTY(decoded)); - GPR_ASSERT(gpr_slice_str_cmp(decoded, "foob") == 0); - gpr_slice_unref(decoded); + GPR_ASSERT(grpc_slice_str_cmp(decoded, "foob") == 0); + grpc_slice_unref(decoded); decoded = grpc_base64_decode("Zm9v", 0); GPR_ASSERT(!GPR_SLICE_IS_EMPTY(decoded)); - GPR_ASSERT(gpr_slice_str_cmp(decoded, "foo") == 0); - gpr_slice_unref(decoded); + GPR_ASSERT(grpc_slice_str_cmp(decoded, "foo") == 0); + grpc_slice_unref(decoded); decoded = grpc_base64_decode("Zm8", 0); GPR_ASSERT(!GPR_SLICE_IS_EMPTY(decoded)); - GPR_ASSERT(gpr_slice_str_cmp(decoded, "fo") == 0); - gpr_slice_unref(decoded); + GPR_ASSERT(grpc_slice_str_cmp(decoded, "fo") == 0); + grpc_slice_unref(decoded); decoded = grpc_base64_decode("Zg", 0); GPR_ASSERT(!GPR_SLICE_IS_EMPTY(decoded)); - GPR_ASSERT(gpr_slice_str_cmp(decoded, "f") == 0); - gpr_slice_unref(decoded); + GPR_ASSERT(grpc_slice_str_cmp(decoded, "f") == 0); + grpc_slice_unref(decoded); decoded = grpc_base64_decode("", 0); GPR_ASSERT(GPR_SLICE_IS_EMPTY(decoded)); diff --git a/test/core/security/create_jwt.c b/test/core/security/create_jwt.c index 1bd135f175..8b78dc5da5 100644 --- a/test/core/security/create_jwt.c +++ b/test/core/security/create_jwt.c @@ -46,12 +46,12 @@ void create_jwt(const char *json_key_file_path, const char *service_url, const char *scope) { grpc_auth_json_key key; char *jwt; - gpr_slice json_key_data; + grpc_slice json_key_data; GPR_ASSERT(GRPC_LOG_IF_ERROR( "load_file", grpc_load_file(json_key_file_path, 1, &json_key_data))); key = grpc_auth_json_key_create_from_string( (const char *)GPR_SLICE_START_PTR(json_key_data)); - gpr_slice_unref(json_key_data); + grpc_slice_unref(json_key_data); if (!grpc_auth_json_key_is_valid(&key)) { fprintf(stderr, "Could not parse json key.\n"); exit(1); diff --git a/test/core/security/credentials_test.c b/test/core/security/credentials_test.c index 2f8ffe4da6..d8bde4f2c2 100644 --- a/test/core/security/credentials_test.c +++ b/test/core/security/credentials_test.c @@ -187,14 +187,14 @@ static void test_add_to_empty_md_store(void) { grpc_credentials_md_store *store = grpc_credentials_md_store_create(0); const char *key_str = "hello"; const char *value_str = "there blah blah blah blah blah blah blah"; - gpr_slice key = gpr_slice_from_copied_string(key_str); - gpr_slice value = gpr_slice_from_copied_string(value_str); + grpc_slice key = grpc_slice_from_copied_string(key_str); + grpc_slice value = grpc_slice_from_copied_string(value_str); grpc_credentials_md_store_add(store, key, value); GPR_ASSERT(store->num_entries == 1); - GPR_ASSERT(gpr_slice_cmp(key, store->entries[0].key) == 0); - GPR_ASSERT(gpr_slice_cmp(value, store->entries[0].value) == 0); - gpr_slice_unref(key); - gpr_slice_unref(value); + GPR_ASSERT(grpc_slice_cmp(key, store->entries[0].key) == 0); + GPR_ASSERT(grpc_slice_cmp(value, store->entries[0].value) == 0); + grpc_slice_unref(key); + grpc_slice_unref(value); grpc_credentials_md_store_unref(store); } @@ -204,8 +204,8 @@ static void test_add_cstrings_to_empty_md_store(void) { const char *value_str = "there blah blah blah blah blah blah blah"; grpc_credentials_md_store_add_cstrings(store, key_str, value_str); GPR_ASSERT(store->num_entries == 1); - GPR_ASSERT(gpr_slice_str_cmp(store->entries[0].key, key_str) == 0); - GPR_ASSERT(gpr_slice_str_cmp(store->entries[0].value, value_str) == 0); + GPR_ASSERT(grpc_slice_str_cmp(store->entries[0].key, key_str) == 0); + GPR_ASSERT(grpc_slice_str_cmp(store->entries[0].value, value_str) == 0); grpc_credentials_md_store_unref(store); } @@ -227,8 +227,8 @@ static void test_add_abunch_to_md_store(void) { grpc_credentials_md_store_add_cstrings(store, key_str, value_str); } for (i = 0; i < num_entries; i++) { - GPR_ASSERT(gpr_slice_str_cmp(store->entries[i].key, key_str) == 0); - GPR_ASSERT(gpr_slice_str_cmp(store->entries[i].value, value_str) == 0); + GPR_ASSERT(grpc_slice_str_cmp(store->entries[i].key, key_str) == 0); + GPR_ASSERT(grpc_slice_str_cmp(store->entries[i].value, value_str) == 0); } grpc_credentials_md_store_unref(store); } @@ -243,8 +243,8 @@ static void test_oauth2_token_fetcher_creds_parsing_ok(void) { GPR_ASSERT(token_lifetime.tv_sec == 3599); GPR_ASSERT(token_lifetime.tv_nsec == 0); GPR_ASSERT(token_md->num_entries == 1); - GPR_ASSERT(gpr_slice_str_cmp(token_md->entries[0].key, "authorization") == 0); - GPR_ASSERT(gpr_slice_str_cmp(token_md->entries[0].value, + GPR_ASSERT(grpc_slice_str_cmp(token_md->entries[0].key, "authorization") == 0); + GPR_ASSERT(grpc_slice_str_cmp(token_md->entries[0].value, "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_") == 0); grpc_credentials_md_store_unref(token_md); @@ -333,8 +333,8 @@ static void check_metadata(expected_md *expected, grpc_credentials_md *md_elems, for (i = 0; i < num_md; i++) { size_t j; for (j = 0; j < num_md; j++) { - if (0 == gpr_slice_str_cmp(md_elems[j].key, expected[i].key)) { - GPR_ASSERT(gpr_slice_str_cmp(md_elems[j].value, expected[i].value) == + if (0 == grpc_slice_str_cmp(md_elems[j].key, expected[i].key)) { + GPR_ASSERT(grpc_slice_str_cmp(md_elems[j].value, expected[i].value) == 0); break; } @@ -528,8 +528,8 @@ static void on_oauth2_creds_get_metadata_success( GPR_ASSERT(status == GRPC_CREDENTIALS_OK); GPR_ASSERT(error_details == NULL); GPR_ASSERT(num_md == 1); - GPR_ASSERT(gpr_slice_str_cmp(md_elems[0].key, "authorization") == 0); - GPR_ASSERT(gpr_slice_str_cmp(md_elems[0].value, + GPR_ASSERT(grpc_slice_str_cmp(md_elems[0].key, "authorization") == 0); + GPR_ASSERT(grpc_slice_str_cmp(md_elems[0].value, "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_") == 0); GPR_ASSERT(user_data != NULL); @@ -781,8 +781,8 @@ static void on_jwt_creds_get_metadata_success( GPR_ASSERT(status == GRPC_CREDENTIALS_OK); GPR_ASSERT(error_details == NULL); GPR_ASSERT(num_md == 1); - GPR_ASSERT(gpr_slice_str_cmp(md_elems[0].key, "authorization") == 0); - GPR_ASSERT(gpr_slice_str_cmp(md_elems[0].value, expected_md_value) == 0); + GPR_ASSERT(grpc_slice_str_cmp(md_elems[0].key, "authorization") == 0); + GPR_ASSERT(grpc_slice_str_cmp(md_elems[0].value, expected_md_value) == 0); GPR_ASSERT(user_data != NULL); GPR_ASSERT(strcmp((const char *)user_data, test_user_data) == 0); gpr_free(expected_md_value); @@ -1057,8 +1057,8 @@ static void on_plugin_metadata_received_success( GPR_ASSERT(md_elems != NULL); GPR_ASSERT(num_md == GPR_ARRAY_SIZE(plugin_md)); for (i = 0; i < num_md; i++) { - GPR_ASSERT(gpr_slice_str_cmp(md_elems[i].key, plugin_md[i].key) == 0); - GPR_ASSERT(gpr_slice_str_cmp(md_elems[i].value, plugin_md[i].value) == 0); + GPR_ASSERT(grpc_slice_str_cmp(md_elems[i].key, plugin_md[i].key) == 0); + GPR_ASSERT(grpc_slice_str_cmp(md_elems[i].value, plugin_md[i].value) == 0); } } diff --git a/test/core/security/fetch_oauth2.c b/test/core/security/fetch_oauth2.c index 292f59a7c1..aa3db9f398 100644 --- a/test/core/security/fetch_oauth2.c +++ b/test/core/security/fetch_oauth2.c @@ -48,7 +48,7 @@ static grpc_call_credentials *create_refresh_token_creds( const char *json_refresh_token_file_path) { - gpr_slice refresh_token; + grpc_slice refresh_token; GPR_ASSERT(GRPC_LOG_IF_ERROR( "load_file", grpc_load_file(json_refresh_token_file_path, 1, &refresh_token))); diff --git a/test/core/security/json_token_test.c b/test/core/security/json_token_test.c index 405fe56c46..162997662e 100644 --- a/test/core/security/json_token_test.c +++ b/test/core/security/json_token_test.c @@ -223,7 +223,7 @@ static grpc_json *parse_json_part_from_jwt(const char *str, size_t len, char *b64; char *decoded; grpc_json *json; - gpr_slice slice; + grpc_slice slice; b64 = gpr_malloc(len + 1); strncpy(b64, str, len); b64[len] = '\0'; @@ -236,7 +236,7 @@ static grpc_json *parse_json_part_from_jwt(const char *str, size_t len, json = grpc_json_parse_string(decoded); gpr_free(b64); *scratchpad = decoded; - gpr_slice_unref(slice); + grpc_slice_unref(slice); return json; } @@ -341,7 +341,7 @@ static void check_jwt_signature(const char *b64_signature, RSA *rsa_key, EVP_MD_CTX *md_ctx = EVP_MD_CTX_create(); EVP_PKEY *key = EVP_PKEY_new(); - gpr_slice sig = grpc_base64_decode(b64_signature, 1); + grpc_slice sig = grpc_base64_decode(b64_signature, 1); GPR_ASSERT(!GPR_SLICE_IS_EMPTY(sig)); GPR_ASSERT(GPR_SLICE_LENGTH(sig) == 128); @@ -355,7 +355,7 @@ static void check_jwt_signature(const char *b64_signature, RSA *rsa_key, GPR_ASSERT(EVP_DigestVerifyFinal(md_ctx, GPR_SLICE_START_PTR(sig), GPR_SLICE_LENGTH(sig)) == 1); - gpr_slice_unref(sig); + grpc_slice_unref(sig); if (key != NULL) EVP_PKEY_free(key); if (md_ctx != NULL) EVP_MD_CTX_destroy(md_ctx); } diff --git a/test/core/security/jwt_verifier_test.c b/test/core/security/jwt_verifier_test.c index 36b331a777..ce2ee04c99 100644 --- a/test/core/security/jwt_verifier_test.c +++ b/test/core/security/jwt_verifier_test.c @@ -181,7 +181,7 @@ typedef struct { static void test_claims_success(void) { grpc_jwt_claims *claims; - gpr_slice s = gpr_slice_from_copied_string(claims_without_time_constraint); + grpc_slice s = grpc_slice_from_copied_string(claims_without_time_constraint); grpc_json *json = grpc_json_parse_string_with_len( (char *)GPR_SLICE_START_PTR(s), GPR_SLICE_LENGTH(s)); GPR_ASSERT(json != NULL); @@ -199,7 +199,7 @@ static void test_claims_success(void) { static void test_expired_claims_failure(void) { grpc_jwt_claims *claims; - gpr_slice s = gpr_slice_from_copied_string(expired_claims); + grpc_slice s = grpc_slice_from_copied_string(expired_claims); grpc_json *json = grpc_json_parse_string_with_len( (char *)GPR_SLICE_START_PTR(s), GPR_SLICE_LENGTH(s)); gpr_timespec exp_iat = {100, 0, GPR_CLOCK_REALTIME}; @@ -223,7 +223,7 @@ static void test_expired_claims_failure(void) { } static void test_invalid_claims_failure(void) { - gpr_slice s = gpr_slice_from_copied_string(invalid_claims); + grpc_slice s = grpc_slice_from_copied_string(invalid_claims); grpc_json *json = grpc_json_parse_string_with_len( (char *)GPR_SLICE_START_PTR(s), GPR_SLICE_LENGTH(s)); GPR_ASSERT(grpc_jwt_claims_from_json(json, s) == NULL); @@ -231,7 +231,7 @@ static void test_invalid_claims_failure(void) { static void test_bad_audience_claims_failure(void) { grpc_jwt_claims *claims; - gpr_slice s = gpr_slice_from_copied_string(claims_without_time_constraint); + grpc_slice s = grpc_slice_from_copied_string(claims_without_time_constraint); grpc_json *json = grpc_json_parse_string_with_len( (char *)GPR_SLICE_START_PTR(s), GPR_SLICE_LENGTH(s)); GPR_ASSERT(json != NULL); @@ -478,7 +478,7 @@ static void test_jwt_verifier_bad_json_key(void) { } static void corrupt_jwt_sig(char *jwt) { - gpr_slice sig; + grpc_slice sig; char *bad_b64_sig; uint8_t *sig_bytes; char *last_dot = strrchr(jwt, '.'); @@ -491,7 +491,7 @@ static void corrupt_jwt_sig(char *jwt) { grpc_base64_encode(GPR_SLICE_START_PTR(sig), GPR_SLICE_LENGTH(sig), 1, 0); memcpy(last_dot + 1, bad_b64_sig, strlen(bad_b64_sig)); gpr_free(bad_b64_sig); - gpr_slice_unref(sig); + grpc_slice_unref(sig); } static void on_verification_bad_signature(void *user_data, diff --git a/test/core/security/oauth2_utils.c b/test/core/security/oauth2_utils.c index 9b97c38fcb..3b774fecb6 100644 --- a/test/core/security/oauth2_utils.c +++ b/test/core/security/oauth2_utils.c @@ -57,7 +57,7 @@ static void on_oauth2_response(grpc_exec_ctx *exec_ctx, void *user_data, const char *error_details) { oauth2_request *request = user_data; char *token = NULL; - gpr_slice token_slice; + grpc_slice token_slice; if (status == GRPC_CREDENTIALS_ERROR) { gpr_log(GPR_ERROR, "Fetching token failed."); } else { diff --git a/test/core/security/secure_endpoint_test.c b/test/core/security/secure_endpoint_test.c index 2262fde98d..e12ca48c2f 100644 --- a/test/core/security/secure_endpoint_test.c +++ b/test/core/security/secure_endpoint_test.c @@ -49,7 +49,7 @@ static gpr_mu *g_mu; static grpc_pollset *g_pollset; static grpc_endpoint_test_fixture secure_endpoint_create_fixture_tcp_socketpair( - size_t slice_size, gpr_slice *leftover_slices, size_t leftover_nslices) { + size_t slice_size, grpc_slice *leftover_slices, size_t leftover_nslices) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; tsi_frame_protector *fake_read_protector = tsi_create_fake_protector(NULL); tsi_frame_protector *fake_write_protector = tsi_create_fake_protector(NULL); @@ -74,9 +74,9 @@ static grpc_endpoint_test_fixture secure_endpoint_create_fixture_tcp_socketpair( size_t buffer_size = total_buffer_size; uint8_t *encrypted_buffer = gpr_malloc(buffer_size); uint8_t *cur = encrypted_buffer; - gpr_slice encrypted_leftover; + grpc_slice encrypted_leftover; for (i = 0; i < leftover_nslices; i++) { - gpr_slice plain = leftover_slices[i]; + grpc_slice plain = leftover_slices[i]; uint8_t *message_bytes = GPR_SLICE_START_PTR(plain); size_t message_size = GPR_SLICE_LENGTH(plain); while (message_size > 0) { @@ -92,7 +92,7 @@ static grpc_endpoint_test_fixture secure_endpoint_create_fixture_tcp_socketpair( GPR_ASSERT(buffer_size >= protected_buffer_size_to_send); buffer_size -= protected_buffer_size_to_send; } - gpr_slice_unref(plain); + grpc_slice_unref(plain); } do { size_t protected_buffer_size_to_send = buffer_size; @@ -104,11 +104,11 @@ static grpc_endpoint_test_fixture secure_endpoint_create_fixture_tcp_socketpair( GPR_ASSERT(buffer_size >= protected_buffer_size_to_send); buffer_size -= protected_buffer_size_to_send; } while (still_pending_size > 0); - encrypted_leftover = gpr_slice_from_copied_buffer( + encrypted_leftover = grpc_slice_from_copied_buffer( (const char *)encrypted_buffer, total_buffer_size - buffer_size); f.client_ep = grpc_secure_endpoint_create(fake_read_protector, tcp.client, &encrypted_leftover, 1); - gpr_slice_unref(encrypted_leftover); + grpc_slice_unref(encrypted_leftover); gpr_free(encrypted_buffer); } @@ -125,8 +125,8 @@ secure_endpoint_create_fixture_tcp_socketpair_noleftover(size_t slice_size) { static grpc_endpoint_test_fixture secure_endpoint_create_fixture_tcp_socketpair_leftover(size_t slice_size) { - gpr_slice s = - gpr_slice_from_copied_string("hello world 12345678900987654321"); + grpc_slice s = + grpc_slice_from_copied_string("hello world 12345678900987654321"); grpc_endpoint_test_fixture f; f = secure_endpoint_create_fixture_tcp_socketpair(slice_size, &s, 1); @@ -149,29 +149,29 @@ static void inc_call_ctr(grpc_exec_ctx *exec_ctx, void *arg, static void test_leftover(grpc_endpoint_test_config config, size_t slice_size) { grpc_endpoint_test_fixture f = config.create_fixture(slice_size); - gpr_slice_buffer incoming; - gpr_slice s = - gpr_slice_from_copied_string("hello world 12345678900987654321"); + grpc_slice_buffer incoming; + grpc_slice s = + grpc_slice_from_copied_string("hello world 12345678900987654321"); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; int n = 0; grpc_closure done_closure; gpr_log(GPR_INFO, "Start test left over"); - gpr_slice_buffer_init(&incoming); + grpc_slice_buffer_init(&incoming); grpc_closure_init(&done_closure, inc_call_ctr, &n); grpc_endpoint_read(&exec_ctx, f.client_ep, &incoming, &done_closure); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(n == 1); GPR_ASSERT(incoming.count == 1); - GPR_ASSERT(0 == gpr_slice_cmp(s, incoming.slices[0])); + GPR_ASSERT(0 == grpc_slice_cmp(s, incoming.slices[0])); grpc_endpoint_shutdown(&exec_ctx, f.client_ep); grpc_endpoint_shutdown(&exec_ctx, f.server_ep); grpc_endpoint_destroy(&exec_ctx, f.client_ep); grpc_endpoint_destroy(&exec_ctx, f.server_ep); grpc_exec_ctx_finish(&exec_ctx); - gpr_slice_unref(s); - gpr_slice_buffer_destroy(&incoming); + grpc_slice_unref(s); + grpc_slice_buffer_destroy(&incoming); clean_up(); } diff --git a/test/core/security/security_connector_test.c b/test/core/security/security_connector_test.c index 6106bec9d3..4692db1853 100644 --- a/test/core/security/security_connector_test.c +++ b/test/core/security/security_connector_test.c @@ -368,9 +368,9 @@ static void test_default_ssl_roots(void) { value. */ gpr_setenv(GRPC_DEFAULT_SSL_ROOTS_FILE_PATH_ENV_VAR, ""); grpc_set_ssl_roots_override_callback(override_roots_success); - gpr_slice roots = grpc_get_default_ssl_roots_for_testing(); + grpc_slice roots = grpc_get_default_ssl_roots_for_testing(); char *roots_contents = gpr_dump_slice(roots, GPR_DUMP_ASCII); - gpr_slice_unref(roots); + grpc_slice_unref(roots); GPR_ASSERT(strcmp(roots_contents, roots_for_override_api) == 0); gpr_free(roots_contents); @@ -379,7 +379,7 @@ static void test_default_ssl_roots(void) { gpr_setenv(GRPC_DEFAULT_SSL_ROOTS_FILE_PATH_ENV_VAR, roots_env_var_file_path); roots = grpc_get_default_ssl_roots_for_testing(); roots_contents = gpr_dump_slice(roots, GPR_DUMP_ASCII); - gpr_slice_unref(roots); + grpc_slice_unref(roots); GPR_ASSERT(strcmp(roots_contents, roots_for_env_var) == 0); gpr_free(roots_contents); @@ -388,7 +388,7 @@ static void test_default_ssl_roots(void) { gpr_setenv(GRPC_DEFAULT_SSL_ROOTS_FILE_PATH_ENV_VAR, ""); roots = grpc_get_default_ssl_roots_for_testing(); roots_contents = gpr_dump_slice(roots, GPR_DUMP_ASCII); - gpr_slice_unref(roots); + grpc_slice_unref(roots); GPR_ASSERT(strcmp(roots_contents, roots_for_override_api) == 0); gpr_free(roots_contents); diff --git a/test/core/slice/percent_decode_corpus/04cb8ccc553f9b2f5e52c421aff6d1c954d3dae6 b/test/core/slice/percent_decode_corpus/04cb8ccc553f9b2f5e52c421aff6d1c954d3dae6 new file mode 100644 index 0000000000..a0c7605580 --- /dev/null +++ b/test/core/slice/percent_decode_corpus/04cb8ccc553f9b2f5e52c421aff6d1c954d3dae6 @@ -0,0 +1 @@ +:Ê%cE'yzŠ \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/0dd8f3a63745b3a2d39791559b5c1b311447b537 b/test/core/slice/percent_decode_corpus/0dd8f3a63745b3a2d39791559b5c1b311447b537 new file mode 100644 index 0000000000..8b36124b3f --- /dev/null +++ b/test/core/slice/percent_decode_corpus/0dd8f3a63745b3a2d39791559b5c1b311447b537 @@ -0,0 +1 @@ +x;x_%C88 \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/17eeaca784409adbe43365c32ac87915d736bba3 b/test/core/slice/percent_decode_corpus/17eeaca784409adbe43365c32ac87915d736bba3 new file mode 100644 index 0000000000..ea02afac49 --- /dev/null +++ b/test/core/slice/percent_decode_corpus/17eeaca784409adbe43365c32ac87915d736bba3 @@ -0,0 +1,2 @@ +xxyyz%øyzŠ[zxy'z + diff --git a/test/core/slice/percent_decode_corpus/2040c1ff65f52a7ae668c2c8f324de5dacc9d695 b/test/core/slice/percent_decode_corpus/2040c1ff65f52a7ae668c2c8f324de5dacc9d695 new file mode 100644 index 0000000000..9e9b466b2f --- /dev/null +++ b/test/core/slice/percent_decode_corpus/2040c1ff65f52a7ae668c2c8f324de5dacc9d695 @@ -0,0 +1 @@ +xx;x_%;:Ê%C)x_%C88c8E'yzŠ8 \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/26b0d1da23027ae54db96e125e4a9e98842d77fb b/test/core/slice/percent_decode_corpus/26b0d1da23027ae54db96e125e4a9e98842d77fb new file mode 100644 index 0000000000..88c739ecaa --- /dev/null +++ b/test/core/slice/percent_decode_corpus/26b0d1da23027ae54db96e125e4a9e98842d77fb @@ -0,0 +1 @@ +))'x;x_%C88xy(Pyz) \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/2a089c0db45acdb4c6ed8e7ff81ca7235792c0b9 b/test/core/slice/percent_decode_corpus/2a089c0db45acdb4c6ed8e7ff81ca7235792c0b9 new file mode 100644 index 0000000000..5e6f546ff5 --- /dev/null +++ b/test/core/slice/percent_decode_corpus/2a089c0db45acdb4c6ed8e7ff81ca7235792c0b9 @@ -0,0 +1 @@ +_x;x)x;x_x;x_%88%8888: \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/35b7b3bc3a740d5c3abca0d75b53f0e1e1ee998a b/test/core/slice/percent_decode_corpus/35b7b3bc3a740d5c3abca0d75b53f0e1e1ee998a new file mode 100644 index 0000000000..71d688b694 --- /dev/null +++ b/test/core/slice/percent_decode_corpus/35b7b3bc3a740d5c3abca0d75b53f0e1e1ee998a @@ -0,0 +1 @@ +x8 \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/36367ba1adba47a1cbc3a88707fde8cc7abdc248 b/test/core/slice/percent_decode_corpus/36367ba1adba47a1cbc3a88707fde8cc7abdc248 new file mode 100644 index 0000000000..5a89a07ba7 --- /dev/null +++ b/test/core/slice/percent_decode_corpus/36367ba1adba47a1cbc3a88707fde8cc7abdc248 @@ -0,0 +1 @@ +x);x(_%88x;x_%88 \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/39c2ba51548a0beaf0d6d1164531f1447dc311b5 b/test/core/slice/percent_decode_corpus/39c2ba51548a0beaf0d6d1164531f1447dc311b5 new file mode 100644 index 0000000000..cfa2be994f --- /dev/null +++ b/test/core/slice/percent_decode_corpus/39c2ba51548a0beaf0d6d1164531f1447dc311b5 @@ -0,0 +1 @@ +)x;x_x;x_%88%88: \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/56d08fea787c041395c6697ce26cfbc0decbe688 b/test/core/slice/percent_decode_corpus/56d08fea787c041395c6697ce26cfbc0decbe688 new file mode 100644 index 0000000000..c1ddf65acd --- /dev/null +++ b/test/core/slice/percent_decode_corpus/56d08fea787c041395c6697ce26cfbc0decbe688 @@ -0,0 +1 @@ +%cyzŠ \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/678d981fdabb9f0d6640235cf1719dd1e1e66ae9 b/test/core/slice/percent_decode_corpus/678d981fdabb9f0d6640235cf1719dd1e1e66ae9 new file mode 100644 index 0000000000..dc427d1e12 --- /dev/null +++ b/test/core/slice/percent_decode_corpus/678d981fdabb9f0d6640235cf1719dd1e1e66ae9 @@ -0,0 +1 @@ +%øyzŠ \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/68751961609ec010565de0aa87521dcbf0722c5d b/test/core/slice/percent_decode_corpus/68751961609ec010565de0aa87521dcbf0722c5d new file mode 100644 index 0000000000..154449d0ef --- /dev/null +++ b/test/core/slice/percent_decode_corpus/68751961609ec010565de0aa87521dcbf0722c5d @@ -0,0 +1 @@ +Ê:%Ec \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/7875c06c6f03c9aa2f8e9c59f8d8957c8a32e759 b/test/core/slice/percent_decode_corpus/7875c06c6f03c9aa2f8e9c59f8d8957c8a32e759 new file mode 100644 index 0000000000..841ced83c3 --- /dev/null +++ b/test/core/slice/percent_decode_corpus/7875c06c6f03c9aa2f8e9c59f8d8957c8a32e759 @@ -0,0 +1,2 @@ +xxyyz!úyzŠ[zxy'zyz +Š diff --git a/test/core/slice/percent_decode_corpus/7b302090e090a5829b6d1dd7be30bd4e36a7e60f b/test/core/slice/percent_decode_corpus/7b302090e090a5829b6d1dd7be30bd4e36a7e60f new file mode 100644 index 0000000000..6790bc2798 --- /dev/null +++ b/test/core/slice/percent_decode_corpus/7b302090e090a5829b6d1dd7be30bd4e36a7e60f @@ -0,0 +1 @@ +x;:Ê%)x_%C8cE'yzŠ8 \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/875e1022169c9e4c541a9ad894e69e989df22ba1 b/test/core/slice/percent_decode_corpus/875e1022169c9e4c541a9ad894e69e989df22ba1 new file mode 100644 index 0000000000..1625d0a1ae --- /dev/null +++ b/test/core/slice/percent_decode_corpus/875e1022169c9e4c541a9ad894e69e989df22ba1 @@ -0,0 +1 @@ +x;x_%88 \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/8c1051ce066f5a26de9a9d133180621d0da957b4 b/test/core/slice/percent_decode_corpus/8c1051ce066f5a26de9a9d133180621d0da957b4 new file mode 100644 index 0000000000..125c330b3e --- /dev/null +++ b/test/core/slice/percent_decode_corpus/8c1051ce066f5a26de9a9d133180621d0da957b4 @@ -0,0 +1 @@ +)))'x;x_%C88)'x;x_%C89xyyzxyyz) \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/8e084e628ab83a18ac7ca7cb3506525263655c63 b/test/core/slice/percent_decode_corpus/8e084e628ab83a18ac7ca7cb3506525263655c63 new file mode 100644 index 0000000000..6e6f08cb07 --- /dev/null +++ b/test/core/slice/percent_decode_corpus/8e084e628ab83a18ac7ca7cb3506525263655c63 @@ -0,0 +1 @@ +))'x;x_%C88xyyz) \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/9d316c4675f40ddccaf8f1cc7aea94170b1e4223 b/test/core/slice/percent_decode_corpus/9d316c4675f40ddccaf8f1cc7aea94170b1e4223 new file mode 100644 index 0000000000..ab4a1c7657 --- /dev/null +++ b/test/core/slice/percent_decode_corpus/9d316c4675f40ddccaf8f1cc7aea94170b1e4223 @@ -0,0 +1 @@ +x%8 \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/ad1c7c11d18a7d116e2c2ef4d4c5afb1270836ae b/test/core/slice/percent_decode_corpus/ad1c7c11d18a7d116e2c2ef4d4c5afb1270836ae new file mode 100644 index 0000000000..4ac1945a84 --- /dev/null +++ b/test/core/slice/percent_decode_corpus/ad1c7c11d18a7d116e2c2ef4d4c5afb1270836ae @@ -0,0 +1 @@ +x);x(_%88x;x_xxyyz \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/b471f94aa4facf502e622e4a248f1ba4063ae681 b/test/core/slice/percent_decode_corpus/b471f94aa4facf502e622e4a248f1ba4063ae681 new file mode 100644 index 0000000000..5c673ae28a --- /dev/null +++ b/test/core/slice/percent_decode_corpus/b471f94aa4facf502e622e4a248f1ba4063ae681 @@ -0,0 +1 @@ +Ê%ccyzyzŠ \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/bf52ece030f16136d46e0dc97f58d60a0d8a1f0b b/test/core/slice/percent_decode_corpus/bf52ece030f16136d46e0dc97f58d60a0d8a1f0b new file mode 100644 index 0000000000..e478275ed4 --- /dev/null +++ b/test/core/slice/percent_decode_corpus/bf52ece030f16136d46e0dc97f58d60a0d8a1f0b @@ -0,0 +1,2 @@ +)'xyyz!úyzŠ[zxÊ%ccyzyzy'z*zŠ +Š diff --git a/test/core/slice/percent_decode_corpus/d5b2a7177339ba2b7ce2f60e5f4459bef1e72758 b/test/core/slice/percent_decode_corpus/d5b2a7177339ba2b7ce2f60e5f4459bef1e72758 new file mode 100644 index 0000000000..c73cbfe8af --- /dev/null +++ b/test/core/slice/percent_decode_corpus/d5b2a7177339ba2b7ce2f60e5f4459bef1e72758 @@ -0,0 +1,2 @@ +)'xyyz)úyzŠ[zxÊ%cCyzyzy'z*zŠ +Š diff --git a/test/core/slice/percent_decode_corpus/de867b64c54a7ed773dc611fc5cd2f17c5433113 b/test/core/slice/percent_decode_corpus/de867b64c54a7ed773dc611fc5cd2f17c5433113 new file mode 100644 index 0000000000..f9f7246e9c --- /dev/null +++ b/test/core/slice/percent_decode_corpus/de867b64c54a7ed773dc611fc5cd2f17c5433113 @@ -0,0 +1,2 @@ +xxyyz%%øyzŠ[zxy'zyz +Š diff --git a/test/core/slice/percent_decode_corpus/e3948dbe004950591630dd5c52f4e0fcbd5e388a b/test/core/slice/percent_decode_corpus/e3948dbe004950591630dd5c52f4e0fcbd5e388a new file mode 100644 index 0000000000..83ac46d833 --- /dev/null +++ b/test/core/slice/percent_decode_corpus/e3948dbe004950591630dd5c52f4e0fcbd5e388a @@ -0,0 +1 @@ +Ê:%Dx;:Ê%)x_%C8cc \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/e7064f0b80f61dbc65915311032d27baa569ae2a b/test/core/slice/percent_decode_corpus/e7064f0b80f61dbc65915311032d27baa569ae2a new file mode 100644 index 0000000000..e8a0f87653 --- /dev/null +++ b/test/core/slice/percent_decode_corpus/e7064f0b80f61dbc65915311032d27baa569ae2a @@ -0,0 +1 @@ +) \ No newline at end of file diff --git a/test/core/slice/percent_decode_corpus/xyz b/test/core/slice/percent_decode_corpus/xyz new file mode 100644 index 0000000000..cd470e6190 --- /dev/null +++ b/test/core/slice/percent_decode_corpus/xyz @@ -0,0 +1 @@ +xyz diff --git a/test/core/slice/percent_decode_fuzzer.c b/test/core/slice/percent_decode_fuzzer.c new file mode 100644 index 0000000000..69d74816a7 --- /dev/null +++ b/test/core/slice/percent_decode_fuzzer.c @@ -0,0 +1,66 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include +#include +#include + +#include +#include + +#include "src/core/lib/support/percent_encoding.h" +#include "test/core/util/memory_counters.h" + +bool squelch = true; +bool leak_check = true; + +int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { + struct grpc_memory_counters counters; + grpc_memory_counters_init(); + grpc_slice input = grpc_slice_from_copied_buffer((const char *)data, size); + grpc_slice output; + if (gpr_strict_percent_decode_slice( + input, gpr_url_percent_encoding_unreserved_bytes, &output)) { + grpc_slice_unref(output); + } + if (gpr_strict_percent_decode_slice( + input, gpr_compatible_percent_encoding_unreserved_bytes, &output)) { + grpc_slice_unref(output); + } + grpc_slice_unref(gpr_permissive_percent_decode_slice(input)); + grpc_slice_unref(input); + counters = grpc_memory_counters_snapshot(); + grpc_memory_counters_destroy(); + GPR_ASSERT(counters.total_size_relative == 0); + return 0; +} diff --git a/test/core/slice/percent_encode_corpus/0d3ee7fa54e6c66103965fd4409b044ba7db6c3f b/test/core/slice/percent_encode_corpus/0d3ee7fa54e6c66103965fd4409b044ba7db6c3f new file mode 100644 index 0000000000..d09c4a039c --- /dev/null +++ b/test/core/slice/percent_encode_corpus/0d3ee7fa54e6c66103965fd4409b044ba7db6c3f @@ -0,0 +1,3 @@ +_x;7y +xyz')S)xy-zý +Æ* \ No newline at end of file diff --git a/test/core/slice/percent_encode_corpus/2e7ccf75e27b9501e3b28cf1c50ed0c45ab7c226 b/test/core/slice/percent_encode_corpus/2e7ccf75e27b9501e3b28cf1c50ed0c45ab7c226 new file mode 100644 index 0000000000..4d0c38d0e2 --- /dev/null +++ b/test/core/slice/percent_encode_corpus/2e7ccf75e27b9501e3b28cf1c50ed0c45ab7c226 @@ -0,0 +1 @@ +xyx \ No newline at end of file diff --git a/test/core/slice/percent_encode_corpus/55bb859f3942c462b03b7cbcf22ab4a0ac9705cf b/test/core/slice/percent_encode_corpus/55bb859f3942c462b03b7cbcf22ab4a0ac9705cf new file mode 100644 index 0000000000..fc6e93342a --- /dev/null +++ b/test/core/slice/percent_encode_corpus/55bb859f3942c462b03b7cbcf22ab4a0ac9705cf @@ -0,0 +1 @@ +.yx.yxxxyzxyyzxy \ No newline at end of file diff --git a/test/core/slice/percent_encode_corpus/56070cecd54c845b6d4334953b17b712eb000d93 b/test/core/slice/percent_encode_corpus/56070cecd54c845b6d4334953b17b712eb000d93 new file mode 100644 index 0000000000..6823c73f76 --- /dev/null +++ b/test/core/slice/percent_encode_corpus/56070cecd54c845b6d4334953b17b712eb000d93 @@ -0,0 +1 @@ +xyrxyxyzxxyzxyzxyxyy \ No newline at end of file diff --git a/test/core/slice/percent_encode_corpus/61f50e891bf7ff5eb7a7af206f1e25d77f8756e7 b/test/core/slice/percent_encode_corpus/61f50e891bf7ff5eb7a7af206f1e25d77f8756e7 new file mode 100644 index 0000000000..a65cbb4d5b --- /dev/null +++ b/test/core/slice/percent_encode_corpus/61f50e891bf7ff5eb7a7af206f1e25d77f8756e7 @@ -0,0 +1,3 @@ +xy +xyz +)S-Æþ \ No newline at end of file diff --git a/test/core/slice/percent_encode_corpus/6e0c60cefc704c7940e475a87dd9ae423061cb5a b/test/core/slice/percent_encode_corpus/6e0c60cefc704c7940e475a87dd9ae423061cb5a new file mode 100644 index 0000000000..8d031d7e2d --- /dev/null +++ b/test/core/slice/percent_encode_corpus/6e0c60cefc704c7940e475a87dd9ae423061cb5a @@ -0,0 +1,3 @@ +xy +xyz +)S)Æ* \ No newline at end of file diff --git a/test/core/slice/percent_encode_corpus/7271ebcc6d22a0f186f7bc3c1973a7ed1bec8d8e b/test/core/slice/percent_encode_corpus/7271ebcc6d22a0f186f7bc3c1973a7ed1bec8d8e new file mode 100644 index 0000000000..4d82ca3953 --- /dev/null +++ b/test/core/slice/percent_encode_corpus/7271ebcc6d22a0f186f7bc3c1973a7ed1bec8d8e @@ -0,0 +1,4 @@ +x;7y +xyz +)S)xyz +Æ* \ No newline at end of file diff --git a/test/core/slice/percent_encode_corpus/74c83ece3e2920a67593a9be9c82468f16cbb969 b/test/core/slice/percent_encode_corpus/74c83ece3e2920a67593a9be9c82468f16cbb969 new file mode 100644 index 0000000000..bb7f4ae07e --- /dev/null +++ b/test/core/slice/percent_encode_corpus/74c83ece3e2920a67593a9be9c82468f16cbb969 @@ -0,0 +1 @@ +xyzxy \ No newline at end of file diff --git a/test/core/slice/percent_encode_corpus/98e004fd2a9f141a7a019720820080e12d637c06 b/test/core/slice/percent_encode_corpus/98e004fd2a9f141a7a019720820080e12d637c06 new file mode 100644 index 0000000000..50879d0f37 --- /dev/null +++ b/test/core/slice/percent_encode_corpus/98e004fd2a9f141a7a019720820080e12d637c06 @@ -0,0 +1,3 @@ +xy +xz +)Sxy-Æzx_yþ \ No newline at end of file diff --git a/test/core/slice/percent_encode_corpus/ba2c1e98227aa21ea3bb2ca4d0e504119717da8b b/test/core/slice/percent_encode_corpus/ba2c1e98227aa21ea3bb2ca4d0e504119717da8b new file mode 100644 index 0000000000..dc1ab9bfc2 --- /dev/null +++ b/test/core/slice/percent_encode_corpus/ba2c1e98227aa21ea3bb2ca4d0e504119717da8b @@ -0,0 +1,3 @@ +_x;7y +xyz')S)xyz +Æ* \ No newline at end of file diff --git a/test/core/slice/percent_encode_corpus/c16b9fd45370d4afb5d3ebd307a6e263c25ffd45 b/test/core/slice/percent_encode_corpus/c16b9fd45370d4afb5d3ebd307a6e263c25ffd45 new file mode 100644 index 0000000000..3476e0b70b --- /dev/null +++ b/test/core/slice/percent_encode_corpus/c16b9fd45370d4afb5d3ebd307a6e263c25ffd45 @@ -0,0 +1,2 @@ +xyz +)S \ No newline at end of file diff --git a/test/core/slice/percent_encode_corpus/d58c3cd4eab9b6d2343abfa1c25c90a383fe0ec3 b/test/core/slice/percent_encode_corpus/d58c3cd4eab9b6d2343abfa1c25c90a383fe0ec3 new file mode 100644 index 0000000000..822d50abf8 --- /dev/null +++ b/test/core/slice/percent_encode_corpus/d58c3cd4eab9b6d2343abfa1c25c90a383fe0ec3 @@ -0,0 +1 @@ +.yx \ No newline at end of file diff --git a/test/core/slice/percent_encode_corpus/e2619218ede30d2b7b8ecd601a9f0ae754b728b4 b/test/core/slice/percent_encode_corpus/e2619218ede30d2b7b8ecd601a9f0ae754b728b4 new file mode 100644 index 0000000000..101639c93d --- /dev/null +++ b/test/core/slice/percent_encode_corpus/e2619218ede30d2b7b8ecd601a9f0ae754b728b4 @@ -0,0 +1,4 @@ +x;y +xyz +)S)xyz +Æ* \ No newline at end of file diff --git a/test/core/slice/percent_encode_corpus/f93b3653e453f0e3eea3198001be6ce46e64bd21 b/test/core/slice/percent_encode_corpus/f93b3653e453f0e3eea3198001be6ce46e64bd21 new file mode 100644 index 0000000000..6e07ab342f --- /dev/null +++ b/test/core/slice/percent_encode_corpus/f93b3653e453f0e3eea3198001be6ce46e64bd21 @@ -0,0 +1,5 @@ +x;y +xøyz +)S)xyz +Æ.y~ +)S \ No newline at end of file diff --git a/test/core/slice/percent_encode_corpus/fd41d029c7682ad3d1c40a9fd017a4c85b673a54 b/test/core/slice/percent_encode_corpus/fd41d029c7682ad3d1c40a9fd017a4c85b673a54 new file mode 100644 index 0000000000..13d7fab596 --- /dev/null +++ b/test/core/slice/percent_encode_corpus/fd41d029c7682ad3d1c40a9fd017a4c85b673a54 @@ -0,0 +1,3 @@ +xy +xyz +)S)S \ No newline at end of file diff --git a/test/core/slice/percent_encode_corpus/xyz b/test/core/slice/percent_encode_corpus/xyz new file mode 100644 index 0000000000..cd470e6190 --- /dev/null +++ b/test/core/slice/percent_encode_corpus/xyz @@ -0,0 +1 @@ +xyz diff --git a/test/core/slice/percent_encode_fuzzer.c b/test/core/slice/percent_encode_fuzzer.c new file mode 100644 index 0000000000..99599bf16e --- /dev/null +++ b/test/core/slice/percent_encode_fuzzer.c @@ -0,0 +1,73 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include +#include +#include + +#include +#include + +#include "src/core/lib/support/percent_encoding.h" +#include "test/core/util/memory_counters.h" + +bool squelch = true; +bool leak_check = true; + +static void test(const uint8_t *data, size_t size, const uint8_t *dict) { + struct grpc_memory_counters counters; + grpc_memory_counters_init(); + grpc_slice input = grpc_slice_from_copied_buffer((const char *)data, size); + grpc_slice output = gpr_percent_encode_slice(input, dict); + grpc_slice decoded_output; + // encoder must always produce decodable output + GPR_ASSERT(gpr_strict_percent_decode_slice(output, dict, &decoded_output)); + grpc_slice permissive_decoded_output = + gpr_permissive_percent_decode_slice(output); + // and decoded output must always match the input + GPR_ASSERT(grpc_slice_cmp(input, decoded_output) == 0); + GPR_ASSERT(grpc_slice_cmp(input, permissive_decoded_output) == 0); + grpc_slice_unref(input); + grpc_slice_unref(output); + grpc_slice_unref(decoded_output); + grpc_slice_unref(permissive_decoded_output); + counters = grpc_memory_counters_snapshot(); + grpc_memory_counters_destroy(); + GPR_ASSERT(counters.total_size_relative == 0); +} + +int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { + test(data, size, gpr_url_percent_encoding_unreserved_bytes); + test(data, size, gpr_compatible_percent_encoding_unreserved_bytes); + return 0; +} diff --git a/test/core/slice/percent_encoding_test.c b/test/core/slice/percent_encoding_test.c new file mode 100644 index 0000000000..e9ba8f5ec4 --- /dev/null +++ b/test/core/slice/percent_encoding_test.c @@ -0,0 +1,157 @@ +/* + * + * Copyright 2016, 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. + * + */ + +#include "src/core/lib/support/percent_encoding.h" + +#include +#include + +#include "src/core/lib/support/string.h" +#include "test/core/util/test_config.h" + +#define TEST_VECTOR(raw, encoded, dict) \ + test_vector(raw, sizeof(raw) - 1, encoded, sizeof(encoded) - 1, dict) + +#define TEST_NONCONFORMANT_VECTOR(encoded, permissive_unencoded, dict) \ + test_nonconformant_vector(encoded, sizeof(encoded) - 1, \ + permissive_unencoded, \ + sizeof(permissive_unencoded) - 1, dict) + +static void test_vector(const char *raw, size_t raw_length, const char *encoded, + size_t encoded_length, const uint8_t *dict) { + char *raw_msg = gpr_dump(raw, raw_length, GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *encoded_msg = + gpr_dump(encoded, encoded_length, GPR_DUMP_HEX | GPR_DUMP_ASCII); + gpr_log(GPR_DEBUG, "Trial:\nraw = %s\nencoded = %s", raw_msg, encoded_msg); + gpr_free(raw_msg); + gpr_free(encoded_msg); + + grpc_slice raw_slice = grpc_slice_from_copied_buffer(raw, raw_length); + grpc_slice encoded_slice = + grpc_slice_from_copied_buffer(encoded, encoded_length); + grpc_slice raw2encoded_slice = gpr_percent_encode_slice(raw_slice, dict); + grpc_slice encoded2raw_slice; + GPR_ASSERT( + gpr_strict_percent_decode_slice(encoded_slice, dict, &encoded2raw_slice)); + grpc_slice encoded2raw_permissive_slice = + gpr_permissive_percent_decode_slice(encoded_slice); + + char *raw2encoded_msg = + gpr_dump_slice(raw2encoded_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *encoded2raw_msg = + gpr_dump_slice(encoded2raw_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *encoded2raw_permissive_msg = gpr_dump_slice( + encoded2raw_permissive_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); + gpr_log(GPR_DEBUG, + "Result:\nraw2encoded = %s\nencoded2raw = %s\nencoded2raw_permissive " + "= %s", + raw2encoded_msg, encoded2raw_msg, encoded2raw_permissive_msg); + gpr_free(raw2encoded_msg); + gpr_free(encoded2raw_msg); + gpr_free(encoded2raw_permissive_msg); + + GPR_ASSERT(0 == grpc_slice_cmp(raw_slice, encoded2raw_slice)); + GPR_ASSERT(0 == grpc_slice_cmp(raw_slice, encoded2raw_permissive_slice)); + GPR_ASSERT(0 == grpc_slice_cmp(encoded_slice, raw2encoded_slice)); + + grpc_slice_unref(encoded2raw_slice); + grpc_slice_unref(encoded2raw_permissive_slice); + grpc_slice_unref(raw2encoded_slice); + grpc_slice_unref(raw_slice); + grpc_slice_unref(encoded_slice); +} + +static void test_nonconformant_vector(const char *encoded, + size_t encoded_length, + const char *permissive_unencoded, + size_t permissive_unencoded_length, + const uint8_t *dict) { + char *permissive_unencoded_msg = + gpr_dump(permissive_unencoded, permissive_unencoded_length, + GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *encoded_msg = + gpr_dump(encoded, encoded_length, GPR_DUMP_HEX | GPR_DUMP_ASCII); + gpr_log(GPR_DEBUG, "Trial:\nraw = %s\nencoded = %s", permissive_unencoded_msg, + encoded_msg); + gpr_free(permissive_unencoded_msg); + gpr_free(encoded_msg); + + grpc_slice permissive_unencoded_slice = grpc_slice_from_copied_buffer( + permissive_unencoded, permissive_unencoded_length); + grpc_slice encoded_slice = + grpc_slice_from_copied_buffer(encoded, encoded_length); + grpc_slice encoded2raw_slice; + GPR_ASSERT(!gpr_strict_percent_decode_slice(encoded_slice, dict, + &encoded2raw_slice)); + grpc_slice encoded2raw_permissive_slice = + gpr_permissive_percent_decode_slice(encoded_slice); + + char *encoded2raw_permissive_msg = gpr_dump_slice( + encoded2raw_permissive_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); + gpr_log(GPR_DEBUG, "Result:\nencoded2raw_permissive = %s", + encoded2raw_permissive_msg); + gpr_free(encoded2raw_permissive_msg); + + GPR_ASSERT(0 == grpc_slice_cmp(permissive_unencoded_slice, + encoded2raw_permissive_slice)); + + grpc_slice_unref(permissive_unencoded_slice); + grpc_slice_unref(encoded2raw_permissive_slice); + grpc_slice_unref(encoded_slice); +} + +int main(int argc, char **argv) { + grpc_test_init(argc, argv); + TEST_VECTOR( + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~", + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~", + gpr_url_percent_encoding_unreserved_bytes); + TEST_VECTOR("\x00", "%00", gpr_url_percent_encoding_unreserved_bytes); + TEST_VECTOR("\x01", "%01", gpr_url_percent_encoding_unreserved_bytes); + TEST_VECTOR("a b", "a%20b", gpr_url_percent_encoding_unreserved_bytes); + TEST_VECTOR(" b", "%20b", gpr_url_percent_encoding_unreserved_bytes); + TEST_VECTOR("a b", "a b", gpr_compatible_percent_encoding_unreserved_bytes); + TEST_VECTOR(" b", " b", gpr_compatible_percent_encoding_unreserved_bytes); + TEST_VECTOR("\x0f", "%0F", gpr_url_percent_encoding_unreserved_bytes); + TEST_VECTOR("\xff", "%FF", gpr_url_percent_encoding_unreserved_bytes); + TEST_VECTOR("\xee", "%EE", gpr_url_percent_encoding_unreserved_bytes); + TEST_NONCONFORMANT_VECTOR("%", "%", + gpr_url_percent_encoding_unreserved_bytes); + TEST_NONCONFORMANT_VECTOR("%A", "%A", + gpr_url_percent_encoding_unreserved_bytes); + TEST_NONCONFORMANT_VECTOR("%AG", "%AG", + gpr_url_percent_encoding_unreserved_bytes); + TEST_NONCONFORMANT_VECTOR("\0", "\0", + gpr_url_percent_encoding_unreserved_bytes); + return 0; +} diff --git a/test/core/slice/slice_buffer_test.c b/test/core/slice/slice_buffer_test.c new file mode 100644 index 0000000000..9c55a5c473 --- /dev/null +++ b/test/core/slice/slice_buffer_test.c @@ -0,0 +1,129 @@ +/* + * + * 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. + * + */ + +#include +#include +#include "test/core/util/test_config.h" + +void test_slice_buffer_add() { + grpc_slice_buffer buf; + grpc_slice aaa = grpc_slice_from_copied_string("aaa"); + grpc_slice bb = grpc_slice_from_copied_string("bb"); + size_t i; + + grpc_slice_buffer_init(&buf); + for (i = 0; i < 10; i++) { + grpc_slice_ref(aaa); + grpc_slice_ref(bb); + grpc_slice_buffer_add(&buf, aaa); + grpc_slice_buffer_add(&buf, bb); + } + GPR_ASSERT(buf.count > 0); + GPR_ASSERT(buf.length == 50); + grpc_slice_buffer_reset_and_unref(&buf); + GPR_ASSERT(buf.count == 0); + GPR_ASSERT(buf.length == 0); + for (i = 0; i < 10; i++) { + grpc_slice_ref(aaa); + grpc_slice_ref(bb); + grpc_slice_buffer_add(&buf, aaa); + grpc_slice_buffer_add(&buf, bb); + } + GPR_ASSERT(buf.count > 0); + GPR_ASSERT(buf.length == 50); + for (i = 0; i < 10; i++) { + grpc_slice_buffer_pop(&buf); + grpc_slice_unref(aaa); + grpc_slice_unref(bb); + } + GPR_ASSERT(buf.count == 0); + GPR_ASSERT(buf.length == 0); + grpc_slice_buffer_destroy(&buf); +} + +void test_slice_buffer_move_first() { + grpc_slice slices[3]; + grpc_slice_buffer src; + grpc_slice_buffer dst; + int idx = 0; + size_t src_len = 0; + size_t dst_len = 0; + + slices[0] = grpc_slice_from_copied_string("aaa"); + slices[1] = grpc_slice_from_copied_string("bbbb"); + slices[2] = grpc_slice_from_copied_string("ccc"); + + grpc_slice_buffer_init(&src); + grpc_slice_buffer_init(&dst); + for (idx = 0; idx < 3; idx++) { + grpc_slice_ref(slices[idx]); + /* For this test, it is important that we add each slice at a new + slice index */ + grpc_slice_buffer_add_indexed(&src, slices[idx]); + grpc_slice_buffer_add_indexed(&dst, slices[idx]); + } + + /* Case 1: Move more than the first slice's length from src to dst */ + src_len = src.length; + dst_len = dst.length; + grpc_slice_buffer_move_first(&src, 4, &dst); + src_len -= 4; + dst_len += 4; + GPR_ASSERT(src.length == src_len); + GPR_ASSERT(dst.length == dst_len); + + /* src now has two slices ["bbb"] and ["ccc"] */ + /* Case 2: Move the first slice from src to dst */ + grpc_slice_buffer_move_first(&src, 3, &dst); + src_len -= 3; + dst_len += 3; + GPR_ASSERT(src.length == src_len); + GPR_ASSERT(dst.length == dst_len); + + /* src now has one slice ["ccc"] */ + /* Case 3: Move less than the first slice's length from src to dst*/ + grpc_slice_buffer_move_first(&src, 2, &dst); + src_len -= 2; + dst_len += 2; + GPR_ASSERT(src.length == src.length); + GPR_ASSERT(dst.length == dst.length); +} + +int main(int argc, char **argv) { + grpc_test_init(argc, argv); + + test_slice_buffer_add(); + test_slice_buffer_move_first(); + + return 0; +} diff --git a/test/core/slice/slice_string_helpers_test.c b/test/core/slice/slice_string_helpers_test.c new file mode 100644 index 0000000000..d3dbb1e7f9 --- /dev/null +++ b/test/core/slice/slice_string_helpers_test.c @@ -0,0 +1,148 @@ +/* + * + * 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. + * + */ + +#include "src/core/lib/support/string.h" + +#include +#include +#include +#include + +#include +#include +#include +#include +#include "test/core/util/test_config.h" + +#define LOG_TEST_NAME(x) gpr_log(GPR_INFO, "%s", x) + +static void expect_slice_dump(grpc_slice slice, uint32_t flags, + const char *result) { + char *got = gpr_dump_slice(slice, flags); + GPR_ASSERT(0 == strcmp(got, result)); + gpr_free(got); + grpc_slice_unref(slice); +} + +static void test_dump_slice(void) { + static const char *text = "HELLO WORLD!"; + static const char *long_text = + "It was a bright cold day in April, and the clocks were striking " + "thirteen. Winston Smith, his chin nuzzled into his breast in an effort " + "to escape the vile wind, slipped quickly through the glass doors of " + "Victory Mansions, though not quickly enough to prevent a swirl of " + "gritty dust from entering along with him."; + + LOG_TEST_NAME("test_dump_slice"); + + expect_slice_dump(grpc_slice_from_copied_string(text), GPR_DUMP_ASCII, text); + expect_slice_dump(grpc_slice_from_copied_string(long_text), GPR_DUMP_ASCII, + long_text); + expect_slice_dump(grpc_slice_from_copied_buffer("\x01", 1), GPR_DUMP_HEX, + "01"); + expect_slice_dump(grpc_slice_from_copied_buffer("\x01", 1), + GPR_DUMP_HEX | GPR_DUMP_ASCII, "01 '.'"); +} + +static void test_strsplit(void) { + grpc_slice_buffer *parts; + grpc_slice str; + + LOG_TEST_NAME("test_strsplit"); + + parts = gpr_malloc(sizeof(grpc_slice_buffer)); + grpc_slice_buffer_init(parts); + + str = grpc_slice_from_copied_string("one, two, three, four"); + grpc_slice_split(str, ", ", parts); + GPR_ASSERT(4 == parts->count); + GPR_ASSERT(0 == grpc_slice_str_cmp(parts->slices[0], "one")); + GPR_ASSERT(0 == grpc_slice_str_cmp(parts->slices[1], "two")); + GPR_ASSERT(0 == grpc_slice_str_cmp(parts->slices[2], "three")); + GPR_ASSERT(0 == grpc_slice_str_cmp(parts->slices[3], "four")); + grpc_slice_buffer_reset_and_unref(parts); + grpc_slice_unref(str); + + /* separator not present in string */ + str = grpc_slice_from_copied_string("one two three four"); + grpc_slice_split(str, ", ", parts); + GPR_ASSERT(1 == parts->count); + GPR_ASSERT(0 == grpc_slice_str_cmp(parts->slices[0], "one two three four")); + grpc_slice_buffer_reset_and_unref(parts); + grpc_slice_unref(str); + + /* separator at the end */ + str = grpc_slice_from_copied_string("foo,"); + grpc_slice_split(str, ",", parts); + GPR_ASSERT(2 == parts->count); + GPR_ASSERT(0 == grpc_slice_str_cmp(parts->slices[0], "foo")); + GPR_ASSERT(0 == grpc_slice_str_cmp(parts->slices[1], "")); + grpc_slice_buffer_reset_and_unref(parts); + grpc_slice_unref(str); + + /* separator at the beginning */ + str = grpc_slice_from_copied_string(",foo"); + grpc_slice_split(str, ",", parts); + GPR_ASSERT(2 == parts->count); + GPR_ASSERT(0 == grpc_slice_str_cmp(parts->slices[0], "")); + GPR_ASSERT(0 == grpc_slice_str_cmp(parts->slices[1], "foo")); + grpc_slice_buffer_reset_and_unref(parts); + grpc_slice_unref(str); + + /* standalone separator */ + str = grpc_slice_from_copied_string(","); + grpc_slice_split(str, ",", parts); + GPR_ASSERT(2 == parts->count); + GPR_ASSERT(0 == grpc_slice_str_cmp(parts->slices[0], "")); + GPR_ASSERT(0 == grpc_slice_str_cmp(parts->slices[1], "")); + grpc_slice_buffer_reset_and_unref(parts); + grpc_slice_unref(str); + + /* empty input */ + str = grpc_slice_from_copied_string(""); + grpc_slice_split(str, ", ", parts); + GPR_ASSERT(1 == parts->count); + GPR_ASSERT(0 == grpc_slice_str_cmp(parts->slices[0], "")); + grpc_slice_buffer_reset_and_unref(parts); + grpc_slice_unref(str); + + grpc_slice_buffer_destroy(parts); + gpr_free(parts); +} + +int main(int argc, char **argv) { + grpc_test_init(argc, argv); + test_dump_slice(); + test_strsplit(); + return 0; +} diff --git a/test/core/slice/slice_test.c b/test/core/slice/slice_test.c new file mode 100644 index 0000000000..c263fe27d6 --- /dev/null +++ b/test/core/slice/slice_test.c @@ -0,0 +1,265 @@ +/* + * + * 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. + * + */ + +#include + +#include + +#include +#include +#include "test/core/util/test_config.h" + +#define LOG_TEST_NAME(x) gpr_log(GPR_INFO, "%s", x); + +static void test_slice_malloc_returns_something_sensible(void) { + /* Calls grpc_slice_create for various lengths and verifies the internals for + consistency. */ + size_t length; + size_t i; + grpc_slice slice; + + LOG_TEST_NAME("test_slice_malloc_returns_something_sensible"); + + for (length = 0; length <= 1024; length++) { + slice = grpc_slice_malloc(length); + /* If there is a length, slice.data must be non-NULL. If length is zero + we don't care. */ + if (length) { + GPR_ASSERT(GPR_SLICE_START_PTR(slice)); + } + /* Returned slice length must be what was requested. */ + GPR_ASSERT(GPR_SLICE_LENGTH(slice) == length); + /* If the slice has a refcount, it must be destroyable. */ + if (slice.refcount) { + GPR_ASSERT(slice.refcount->ref != NULL); + GPR_ASSERT(slice.refcount->unref != NULL); + } + /* We must be able to write to every byte of the data */ + for (i = 0; i < length; i++) { + GPR_SLICE_START_PTR(slice)[i] = (uint8_t)i; + } + /* And finally we must succeed in destroying the slice */ + grpc_slice_unref(slice); + } +} + +static void do_nothing(void *ignored) {} + +static void test_slice_new_returns_something_sensible(void) { + uint8_t x; + + grpc_slice slice = grpc_slice_new(&x, 1, do_nothing); + GPR_ASSERT(slice.refcount); + GPR_ASSERT(slice.data.refcounted.bytes == &x); + GPR_ASSERT(slice.data.refcounted.length == 1); + grpc_slice_unref(slice); +} + +/* destroy function that sets a mark to indicate it was called. */ +static void set_mark(void *p) { *((int *)p) = 1; } + +static void test_slice_new_with_user_data(void) { + int marker = 0; + uint8_t buf[2]; + grpc_slice slice; + + buf[0] = 0; + buf[1] = 1; + slice = grpc_slice_new_with_user_data(buf, 2, set_mark, &marker); + GPR_ASSERT(marker == 0); + GPR_ASSERT(GPR_SLICE_LENGTH(slice) == 2); + GPR_ASSERT(GPR_SLICE_START_PTR(slice)[0] == 0); + GPR_ASSERT(GPR_SLICE_START_PTR(slice)[1] == 1); + + /* unref should cause destroy function to run. */ + grpc_slice_unref(slice); + GPR_ASSERT(marker == 1); +} + +static int do_nothing_with_len_1_calls = 0; + +static void do_nothing_with_len_1(void *ignored, size_t len) { + GPR_ASSERT(len == 1); + do_nothing_with_len_1_calls++; +} + +static void test_slice_new_with_len_returns_something_sensible(void) { + uint8_t x; + int num_refs = 5; /* To test adding/removing an arbitrary number of refs */ + int i; + + grpc_slice slice = grpc_slice_new_with_len(&x, 1, do_nothing_with_len_1); + GPR_ASSERT(slice.refcount); /* ref count is initialized to 1 at this point */ + GPR_ASSERT(slice.data.refcounted.bytes == &x); + GPR_ASSERT(slice.data.refcounted.length == 1); + GPR_ASSERT(do_nothing_with_len_1_calls == 0); + + /* Add an arbitrary number of refs to the slice and remoe the refs. This is to + make sure that that the destroy callback (i.e do_nothing_with_len_1()) is + not called until the last unref operation */ + for (i = 0; i < num_refs; i++) { + grpc_slice_ref(slice); + } + for (i = 0; i < num_refs; i++) { + grpc_slice_unref(slice); + } + GPR_ASSERT(do_nothing_with_len_1_calls == 0); /* Shouldn't be called yet */ + + /* last unref */ + grpc_slice_unref(slice); + GPR_ASSERT(do_nothing_with_len_1_calls == 1); +} + +static void test_slice_sub_works(unsigned length) { + grpc_slice slice; + grpc_slice sub; + unsigned i, j, k; + + LOG_TEST_NAME("test_slice_sub_works"); + gpr_log(GPR_INFO, "length=%d", length); + + /* Create a slice in which each byte is equal to the distance from it to the + beginning of the slice. */ + slice = grpc_slice_malloc(length); + for (i = 0; i < length; i++) { + GPR_SLICE_START_PTR(slice)[i] = (uint8_t)i; + } + + /* Ensure that for all subsets length is correct and that we start on the + correct byte. Additionally check that no copies were made. */ + for (i = 0; i < length; i++) { + for (j = i; j < length; j++) { + sub = grpc_slice_sub(slice, i, j); + GPR_ASSERT(GPR_SLICE_LENGTH(sub) == j - i); + for (k = 0; k < j - i; k++) { + GPR_ASSERT(GPR_SLICE_START_PTR(sub)[k] == (uint8_t)(i + k)); + } + grpc_slice_unref(sub); + } + } + grpc_slice_unref(slice); +} + +static void check_head_tail(grpc_slice slice, grpc_slice head, grpc_slice tail) { + GPR_ASSERT(GPR_SLICE_LENGTH(slice) == + GPR_SLICE_LENGTH(head) + GPR_SLICE_LENGTH(tail)); + GPR_ASSERT(0 == memcmp(GPR_SLICE_START_PTR(slice), GPR_SLICE_START_PTR(head), + GPR_SLICE_LENGTH(head))); + GPR_ASSERT(0 == memcmp(GPR_SLICE_START_PTR(slice) + GPR_SLICE_LENGTH(head), + GPR_SLICE_START_PTR(tail), GPR_SLICE_LENGTH(tail))); +} + +static void test_slice_split_head_works(size_t length) { + grpc_slice slice; + grpc_slice head, tail; + size_t i; + + LOG_TEST_NAME("test_slice_split_head_works"); + gpr_log(GPR_INFO, "length=%" PRIuPTR, length); + + /* Create a slice in which each byte is equal to the distance from it to the + beginning of the slice. */ + slice = grpc_slice_malloc(length); + for (i = 0; i < length; i++) { + GPR_SLICE_START_PTR(slice)[i] = (uint8_t)i; + } + + /* Ensure that for all subsets length is correct and that we start on the + correct byte. Additionally check that no copies were made. */ + for (i = 0; i < length; i++) { + tail = grpc_slice_ref(slice); + head = grpc_slice_split_head(&tail, i); + check_head_tail(slice, head, tail); + grpc_slice_unref(tail); + grpc_slice_unref(head); + } + + grpc_slice_unref(slice); +} + +static void test_slice_split_tail_works(size_t length) { + grpc_slice slice; + grpc_slice head, tail; + size_t i; + + LOG_TEST_NAME("test_slice_split_tail_works"); + gpr_log(GPR_INFO, "length=%" PRIuPTR, length); + + /* Create a slice in which each byte is equal to the distance from it to the + beginning of the slice. */ + slice = grpc_slice_malloc(length); + for (i = 0; i < length; i++) { + GPR_SLICE_START_PTR(slice)[i] = (uint8_t)i; + } + + /* Ensure that for all subsets length is correct and that we start on the + correct byte. Additionally check that no copies were made. */ + for (i = 0; i < length; i++) { + head = grpc_slice_ref(slice); + tail = grpc_slice_split_tail(&head, i); + check_head_tail(slice, head, tail); + grpc_slice_unref(tail); + grpc_slice_unref(head); + } + + grpc_slice_unref(slice); +} + +static void test_slice_from_copied_string_works(void) { + static const char *text = "HELLO WORLD!"; + grpc_slice slice; + + LOG_TEST_NAME("test_slice_from_copied_string_works"); + + slice = grpc_slice_from_copied_string(text); + GPR_ASSERT(strlen(text) == GPR_SLICE_LENGTH(slice)); + GPR_ASSERT(0 == + memcmp(text, GPR_SLICE_START_PTR(slice), GPR_SLICE_LENGTH(slice))); + grpc_slice_unref(slice); +} + +int main(int argc, char **argv) { + unsigned length; + grpc_test_init(argc, argv); + test_slice_malloc_returns_something_sensible(); + test_slice_new_returns_something_sensible(); + test_slice_new_with_user_data(); + test_slice_new_with_len_returns_something_sensible(); + for (length = 0; length < 128; length++) { + test_slice_sub_works(length); + test_slice_split_head_works(length); + test_slice_split_tail_works(length); + } + test_slice_from_copied_string_works(); + return 0; +} diff --git a/test/core/support/percent_decode_corpus/04cb8ccc553f9b2f5e52c421aff6d1c954d3dae6 b/test/core/support/percent_decode_corpus/04cb8ccc553f9b2f5e52c421aff6d1c954d3dae6 deleted file mode 100644 index a0c7605580..0000000000 --- a/test/core/support/percent_decode_corpus/04cb8ccc553f9b2f5e52c421aff6d1c954d3dae6 +++ /dev/null @@ -1 +0,0 @@ -:Ê%cE'yzŠ \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/0dd8f3a63745b3a2d39791559b5c1b311447b537 b/test/core/support/percent_decode_corpus/0dd8f3a63745b3a2d39791559b5c1b311447b537 deleted file mode 100644 index 8b36124b3f..0000000000 --- a/test/core/support/percent_decode_corpus/0dd8f3a63745b3a2d39791559b5c1b311447b537 +++ /dev/null @@ -1 +0,0 @@ -x;x_%C88 \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/17eeaca784409adbe43365c32ac87915d736bba3 b/test/core/support/percent_decode_corpus/17eeaca784409adbe43365c32ac87915d736bba3 deleted file mode 100644 index ea02afac49..0000000000 --- a/test/core/support/percent_decode_corpus/17eeaca784409adbe43365c32ac87915d736bba3 +++ /dev/null @@ -1,2 +0,0 @@ -xxyyz%øyzŠ[zxy'z - diff --git a/test/core/support/percent_decode_corpus/2040c1ff65f52a7ae668c2c8f324de5dacc9d695 b/test/core/support/percent_decode_corpus/2040c1ff65f52a7ae668c2c8f324de5dacc9d695 deleted file mode 100644 index 9e9b466b2f..0000000000 --- a/test/core/support/percent_decode_corpus/2040c1ff65f52a7ae668c2c8f324de5dacc9d695 +++ /dev/null @@ -1 +0,0 @@ -xx;x_%;:Ê%C)x_%C88c8E'yzŠ8 \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/26b0d1da23027ae54db96e125e4a9e98842d77fb b/test/core/support/percent_decode_corpus/26b0d1da23027ae54db96e125e4a9e98842d77fb deleted file mode 100644 index 88c739ecaa..0000000000 --- a/test/core/support/percent_decode_corpus/26b0d1da23027ae54db96e125e4a9e98842d77fb +++ /dev/null @@ -1 +0,0 @@ -))'x;x_%C88xy(Pyz) \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/2a089c0db45acdb4c6ed8e7ff81ca7235792c0b9 b/test/core/support/percent_decode_corpus/2a089c0db45acdb4c6ed8e7ff81ca7235792c0b9 deleted file mode 100644 index 5e6f546ff5..0000000000 --- a/test/core/support/percent_decode_corpus/2a089c0db45acdb4c6ed8e7ff81ca7235792c0b9 +++ /dev/null @@ -1 +0,0 @@ -_x;x)x;x_x;x_%88%8888: \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/35b7b3bc3a740d5c3abca0d75b53f0e1e1ee998a b/test/core/support/percent_decode_corpus/35b7b3bc3a740d5c3abca0d75b53f0e1e1ee998a deleted file mode 100644 index 71d688b694..0000000000 --- a/test/core/support/percent_decode_corpus/35b7b3bc3a740d5c3abca0d75b53f0e1e1ee998a +++ /dev/null @@ -1 +0,0 @@ -x8 \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/36367ba1adba47a1cbc3a88707fde8cc7abdc248 b/test/core/support/percent_decode_corpus/36367ba1adba47a1cbc3a88707fde8cc7abdc248 deleted file mode 100644 index 5a89a07ba7..0000000000 --- a/test/core/support/percent_decode_corpus/36367ba1adba47a1cbc3a88707fde8cc7abdc248 +++ /dev/null @@ -1 +0,0 @@ -x);x(_%88x;x_%88 \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/39c2ba51548a0beaf0d6d1164531f1447dc311b5 b/test/core/support/percent_decode_corpus/39c2ba51548a0beaf0d6d1164531f1447dc311b5 deleted file mode 100644 index cfa2be994f..0000000000 --- a/test/core/support/percent_decode_corpus/39c2ba51548a0beaf0d6d1164531f1447dc311b5 +++ /dev/null @@ -1 +0,0 @@ -)x;x_x;x_%88%88: \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/56d08fea787c041395c6697ce26cfbc0decbe688 b/test/core/support/percent_decode_corpus/56d08fea787c041395c6697ce26cfbc0decbe688 deleted file mode 100644 index c1ddf65acd..0000000000 --- a/test/core/support/percent_decode_corpus/56d08fea787c041395c6697ce26cfbc0decbe688 +++ /dev/null @@ -1 +0,0 @@ -%cyzŠ \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/678d981fdabb9f0d6640235cf1719dd1e1e66ae9 b/test/core/support/percent_decode_corpus/678d981fdabb9f0d6640235cf1719dd1e1e66ae9 deleted file mode 100644 index dc427d1e12..0000000000 --- a/test/core/support/percent_decode_corpus/678d981fdabb9f0d6640235cf1719dd1e1e66ae9 +++ /dev/null @@ -1 +0,0 @@ -%øyzŠ \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/68751961609ec010565de0aa87521dcbf0722c5d b/test/core/support/percent_decode_corpus/68751961609ec010565de0aa87521dcbf0722c5d deleted file mode 100644 index 154449d0ef..0000000000 --- a/test/core/support/percent_decode_corpus/68751961609ec010565de0aa87521dcbf0722c5d +++ /dev/null @@ -1 +0,0 @@ -Ê:%Ec \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/7875c06c6f03c9aa2f8e9c59f8d8957c8a32e759 b/test/core/support/percent_decode_corpus/7875c06c6f03c9aa2f8e9c59f8d8957c8a32e759 deleted file mode 100644 index 841ced83c3..0000000000 --- a/test/core/support/percent_decode_corpus/7875c06c6f03c9aa2f8e9c59f8d8957c8a32e759 +++ /dev/null @@ -1,2 +0,0 @@ -xxyyz!úyzŠ[zxy'zyz -Š diff --git a/test/core/support/percent_decode_corpus/7b302090e090a5829b6d1dd7be30bd4e36a7e60f b/test/core/support/percent_decode_corpus/7b302090e090a5829b6d1dd7be30bd4e36a7e60f deleted file mode 100644 index 6790bc2798..0000000000 --- a/test/core/support/percent_decode_corpus/7b302090e090a5829b6d1dd7be30bd4e36a7e60f +++ /dev/null @@ -1 +0,0 @@ -x;:Ê%)x_%C8cE'yzŠ8 \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/875e1022169c9e4c541a9ad894e69e989df22ba1 b/test/core/support/percent_decode_corpus/875e1022169c9e4c541a9ad894e69e989df22ba1 deleted file mode 100644 index 1625d0a1ae..0000000000 --- a/test/core/support/percent_decode_corpus/875e1022169c9e4c541a9ad894e69e989df22ba1 +++ /dev/null @@ -1 +0,0 @@ -x;x_%88 \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/8c1051ce066f5a26de9a9d133180621d0da957b4 b/test/core/support/percent_decode_corpus/8c1051ce066f5a26de9a9d133180621d0da957b4 deleted file mode 100644 index 125c330b3e..0000000000 --- a/test/core/support/percent_decode_corpus/8c1051ce066f5a26de9a9d133180621d0da957b4 +++ /dev/null @@ -1 +0,0 @@ -)))'x;x_%C88)'x;x_%C89xyyzxyyz) \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/8e084e628ab83a18ac7ca7cb3506525263655c63 b/test/core/support/percent_decode_corpus/8e084e628ab83a18ac7ca7cb3506525263655c63 deleted file mode 100644 index 6e6f08cb07..0000000000 --- a/test/core/support/percent_decode_corpus/8e084e628ab83a18ac7ca7cb3506525263655c63 +++ /dev/null @@ -1 +0,0 @@ -))'x;x_%C88xyyz) \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/9d316c4675f40ddccaf8f1cc7aea94170b1e4223 b/test/core/support/percent_decode_corpus/9d316c4675f40ddccaf8f1cc7aea94170b1e4223 deleted file mode 100644 index ab4a1c7657..0000000000 --- a/test/core/support/percent_decode_corpus/9d316c4675f40ddccaf8f1cc7aea94170b1e4223 +++ /dev/null @@ -1 +0,0 @@ -x%8 \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/ad1c7c11d18a7d116e2c2ef4d4c5afb1270836ae b/test/core/support/percent_decode_corpus/ad1c7c11d18a7d116e2c2ef4d4c5afb1270836ae deleted file mode 100644 index 4ac1945a84..0000000000 --- a/test/core/support/percent_decode_corpus/ad1c7c11d18a7d116e2c2ef4d4c5afb1270836ae +++ /dev/null @@ -1 +0,0 @@ -x);x(_%88x;x_xxyyz \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/b471f94aa4facf502e622e4a248f1ba4063ae681 b/test/core/support/percent_decode_corpus/b471f94aa4facf502e622e4a248f1ba4063ae681 deleted file mode 100644 index 5c673ae28a..0000000000 --- a/test/core/support/percent_decode_corpus/b471f94aa4facf502e622e4a248f1ba4063ae681 +++ /dev/null @@ -1 +0,0 @@ -Ê%ccyzyzŠ \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/bf52ece030f16136d46e0dc97f58d60a0d8a1f0b b/test/core/support/percent_decode_corpus/bf52ece030f16136d46e0dc97f58d60a0d8a1f0b deleted file mode 100644 index e478275ed4..0000000000 --- a/test/core/support/percent_decode_corpus/bf52ece030f16136d46e0dc97f58d60a0d8a1f0b +++ /dev/null @@ -1,2 +0,0 @@ -)'xyyz!úyzŠ[zxÊ%ccyzyzy'z*zŠ -Š diff --git a/test/core/support/percent_decode_corpus/d5b2a7177339ba2b7ce2f60e5f4459bef1e72758 b/test/core/support/percent_decode_corpus/d5b2a7177339ba2b7ce2f60e5f4459bef1e72758 deleted file mode 100644 index c73cbfe8af..0000000000 --- a/test/core/support/percent_decode_corpus/d5b2a7177339ba2b7ce2f60e5f4459bef1e72758 +++ /dev/null @@ -1,2 +0,0 @@ -)'xyyz)úyzŠ[zxÊ%cCyzyzy'z*zŠ -Š diff --git a/test/core/support/percent_decode_corpus/de867b64c54a7ed773dc611fc5cd2f17c5433113 b/test/core/support/percent_decode_corpus/de867b64c54a7ed773dc611fc5cd2f17c5433113 deleted file mode 100644 index f9f7246e9c..0000000000 --- a/test/core/support/percent_decode_corpus/de867b64c54a7ed773dc611fc5cd2f17c5433113 +++ /dev/null @@ -1,2 +0,0 @@ -xxyyz%%øyzŠ[zxy'zyz -Š diff --git a/test/core/support/percent_decode_corpus/e3948dbe004950591630dd5c52f4e0fcbd5e388a b/test/core/support/percent_decode_corpus/e3948dbe004950591630dd5c52f4e0fcbd5e388a deleted file mode 100644 index 83ac46d833..0000000000 --- a/test/core/support/percent_decode_corpus/e3948dbe004950591630dd5c52f4e0fcbd5e388a +++ /dev/null @@ -1 +0,0 @@ -Ê:%Dx;:Ê%)x_%C8cc \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/e7064f0b80f61dbc65915311032d27baa569ae2a b/test/core/support/percent_decode_corpus/e7064f0b80f61dbc65915311032d27baa569ae2a deleted file mode 100644 index e8a0f87653..0000000000 --- a/test/core/support/percent_decode_corpus/e7064f0b80f61dbc65915311032d27baa569ae2a +++ /dev/null @@ -1 +0,0 @@ -) \ No newline at end of file diff --git a/test/core/support/percent_decode_corpus/xyz b/test/core/support/percent_decode_corpus/xyz deleted file mode 100644 index cd470e6190..0000000000 --- a/test/core/support/percent_decode_corpus/xyz +++ /dev/null @@ -1 +0,0 @@ -xyz diff --git a/test/core/support/percent_decode_fuzzer.c b/test/core/support/percent_decode_fuzzer.c deleted file mode 100644 index 3e02980e05..0000000000 --- a/test/core/support/percent_decode_fuzzer.c +++ /dev/null @@ -1,66 +0,0 @@ -/* - * - * Copyright 2016, 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. - * - */ - -#include -#include -#include - -#include -#include - -#include "src/core/lib/support/percent_encoding.h" -#include "test/core/util/memory_counters.h" - -bool squelch = true; -bool leak_check = true; - -int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { - struct grpc_memory_counters counters; - grpc_memory_counters_init(); - gpr_slice input = gpr_slice_from_copied_buffer((const char *)data, size); - gpr_slice output; - if (gpr_strict_percent_decode_slice( - input, gpr_url_percent_encoding_unreserved_bytes, &output)) { - gpr_slice_unref(output); - } - if (gpr_strict_percent_decode_slice( - input, gpr_compatible_percent_encoding_unreserved_bytes, &output)) { - gpr_slice_unref(output); - } - gpr_slice_unref(gpr_permissive_percent_decode_slice(input)); - gpr_slice_unref(input); - counters = grpc_memory_counters_snapshot(); - grpc_memory_counters_destroy(); - GPR_ASSERT(counters.total_size_relative == 0); - return 0; -} diff --git a/test/core/support/percent_encode_corpus/0d3ee7fa54e6c66103965fd4409b044ba7db6c3f b/test/core/support/percent_encode_corpus/0d3ee7fa54e6c66103965fd4409b044ba7db6c3f deleted file mode 100644 index d09c4a039c..0000000000 --- a/test/core/support/percent_encode_corpus/0d3ee7fa54e6c66103965fd4409b044ba7db6c3f +++ /dev/null @@ -1,3 +0,0 @@ -_x;7y -xyz')S)xy-zý -Æ* \ No newline at end of file diff --git a/test/core/support/percent_encode_corpus/2e7ccf75e27b9501e3b28cf1c50ed0c45ab7c226 b/test/core/support/percent_encode_corpus/2e7ccf75e27b9501e3b28cf1c50ed0c45ab7c226 deleted file mode 100644 index 4d0c38d0e2..0000000000 --- a/test/core/support/percent_encode_corpus/2e7ccf75e27b9501e3b28cf1c50ed0c45ab7c226 +++ /dev/null @@ -1 +0,0 @@ -xyx \ No newline at end of file diff --git a/test/core/support/percent_encode_corpus/55bb859f3942c462b03b7cbcf22ab4a0ac9705cf b/test/core/support/percent_encode_corpus/55bb859f3942c462b03b7cbcf22ab4a0ac9705cf deleted file mode 100644 index fc6e93342a..0000000000 --- a/test/core/support/percent_encode_corpus/55bb859f3942c462b03b7cbcf22ab4a0ac9705cf +++ /dev/null @@ -1 +0,0 @@ -.yx.yxxxyzxyyzxy \ No newline at end of file diff --git a/test/core/support/percent_encode_corpus/56070cecd54c845b6d4334953b17b712eb000d93 b/test/core/support/percent_encode_corpus/56070cecd54c845b6d4334953b17b712eb000d93 deleted file mode 100644 index 6823c73f76..0000000000 --- a/test/core/support/percent_encode_corpus/56070cecd54c845b6d4334953b17b712eb000d93 +++ /dev/null @@ -1 +0,0 @@ -xyrxyxyzxxyzxyzxyxyy \ No newline at end of file diff --git a/test/core/support/percent_encode_corpus/61f50e891bf7ff5eb7a7af206f1e25d77f8756e7 b/test/core/support/percent_encode_corpus/61f50e891bf7ff5eb7a7af206f1e25d77f8756e7 deleted file mode 100644 index a65cbb4d5b..0000000000 --- a/test/core/support/percent_encode_corpus/61f50e891bf7ff5eb7a7af206f1e25d77f8756e7 +++ /dev/null @@ -1,3 +0,0 @@ -xy -xyz -)S-Æþ \ No newline at end of file diff --git a/test/core/support/percent_encode_corpus/6e0c60cefc704c7940e475a87dd9ae423061cb5a b/test/core/support/percent_encode_corpus/6e0c60cefc704c7940e475a87dd9ae423061cb5a deleted file mode 100644 index 8d031d7e2d..0000000000 --- a/test/core/support/percent_encode_corpus/6e0c60cefc704c7940e475a87dd9ae423061cb5a +++ /dev/null @@ -1,3 +0,0 @@ -xy -xyz -)S)Æ* \ No newline at end of file diff --git a/test/core/support/percent_encode_corpus/7271ebcc6d22a0f186f7bc3c1973a7ed1bec8d8e b/test/core/support/percent_encode_corpus/7271ebcc6d22a0f186f7bc3c1973a7ed1bec8d8e deleted file mode 100644 index 4d82ca3953..0000000000 --- a/test/core/support/percent_encode_corpus/7271ebcc6d22a0f186f7bc3c1973a7ed1bec8d8e +++ /dev/null @@ -1,4 +0,0 @@ -x;7y -xyz -)S)xyz -Æ* \ No newline at end of file diff --git a/test/core/support/percent_encode_corpus/74c83ece3e2920a67593a9be9c82468f16cbb969 b/test/core/support/percent_encode_corpus/74c83ece3e2920a67593a9be9c82468f16cbb969 deleted file mode 100644 index bb7f4ae07e..0000000000 --- a/test/core/support/percent_encode_corpus/74c83ece3e2920a67593a9be9c82468f16cbb969 +++ /dev/null @@ -1 +0,0 @@ -xyzxy \ No newline at end of file diff --git a/test/core/support/percent_encode_corpus/98e004fd2a9f141a7a019720820080e12d637c06 b/test/core/support/percent_encode_corpus/98e004fd2a9f141a7a019720820080e12d637c06 deleted file mode 100644 index 50879d0f37..0000000000 --- a/test/core/support/percent_encode_corpus/98e004fd2a9f141a7a019720820080e12d637c06 +++ /dev/null @@ -1,3 +0,0 @@ -xy -xz -)Sxy-Æzx_yþ \ No newline at end of file diff --git a/test/core/support/percent_encode_corpus/ba2c1e98227aa21ea3bb2ca4d0e504119717da8b b/test/core/support/percent_encode_corpus/ba2c1e98227aa21ea3bb2ca4d0e504119717da8b deleted file mode 100644 index dc1ab9bfc2..0000000000 --- a/test/core/support/percent_encode_corpus/ba2c1e98227aa21ea3bb2ca4d0e504119717da8b +++ /dev/null @@ -1,3 +0,0 @@ -_x;7y -xyz')S)xyz -Æ* \ No newline at end of file diff --git a/test/core/support/percent_encode_corpus/c16b9fd45370d4afb5d3ebd307a6e263c25ffd45 b/test/core/support/percent_encode_corpus/c16b9fd45370d4afb5d3ebd307a6e263c25ffd45 deleted file mode 100644 index 3476e0b70b..0000000000 --- a/test/core/support/percent_encode_corpus/c16b9fd45370d4afb5d3ebd307a6e263c25ffd45 +++ /dev/null @@ -1,2 +0,0 @@ -xyz -)S \ No newline at end of file diff --git a/test/core/support/percent_encode_corpus/d58c3cd4eab9b6d2343abfa1c25c90a383fe0ec3 b/test/core/support/percent_encode_corpus/d58c3cd4eab9b6d2343abfa1c25c90a383fe0ec3 deleted file mode 100644 index 822d50abf8..0000000000 --- a/test/core/support/percent_encode_corpus/d58c3cd4eab9b6d2343abfa1c25c90a383fe0ec3 +++ /dev/null @@ -1 +0,0 @@ -.yx \ No newline at end of file diff --git a/test/core/support/percent_encode_corpus/e2619218ede30d2b7b8ecd601a9f0ae754b728b4 b/test/core/support/percent_encode_corpus/e2619218ede30d2b7b8ecd601a9f0ae754b728b4 deleted file mode 100644 index 101639c93d..0000000000 --- a/test/core/support/percent_encode_corpus/e2619218ede30d2b7b8ecd601a9f0ae754b728b4 +++ /dev/null @@ -1,4 +0,0 @@ -x;y -xyz -)S)xyz -Æ* \ No newline at end of file diff --git a/test/core/support/percent_encode_corpus/f93b3653e453f0e3eea3198001be6ce46e64bd21 b/test/core/support/percent_encode_corpus/f93b3653e453f0e3eea3198001be6ce46e64bd21 deleted file mode 100644 index 6e07ab342f..0000000000 --- a/test/core/support/percent_encode_corpus/f93b3653e453f0e3eea3198001be6ce46e64bd21 +++ /dev/null @@ -1,5 +0,0 @@ -x;y -xøyz -)S)xyz -Æ.y~ -)S \ No newline at end of file diff --git a/test/core/support/percent_encode_corpus/fd41d029c7682ad3d1c40a9fd017a4c85b673a54 b/test/core/support/percent_encode_corpus/fd41d029c7682ad3d1c40a9fd017a4c85b673a54 deleted file mode 100644 index 13d7fab596..0000000000 --- a/test/core/support/percent_encode_corpus/fd41d029c7682ad3d1c40a9fd017a4c85b673a54 +++ /dev/null @@ -1,3 +0,0 @@ -xy -xyz -)S)S \ No newline at end of file diff --git a/test/core/support/percent_encode_corpus/xyz b/test/core/support/percent_encode_corpus/xyz deleted file mode 100644 index cd470e6190..0000000000 --- a/test/core/support/percent_encode_corpus/xyz +++ /dev/null @@ -1 +0,0 @@ -xyz diff --git a/test/core/support/percent_encode_fuzzer.c b/test/core/support/percent_encode_fuzzer.c deleted file mode 100644 index c9548232b5..0000000000 --- a/test/core/support/percent_encode_fuzzer.c +++ /dev/null @@ -1,73 +0,0 @@ -/* - * - * Copyright 2016, 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. - * - */ - -#include -#include -#include - -#include -#include - -#include "src/core/lib/support/percent_encoding.h" -#include "test/core/util/memory_counters.h" - -bool squelch = true; -bool leak_check = true; - -static void test(const uint8_t *data, size_t size, const uint8_t *dict) { - struct grpc_memory_counters counters; - grpc_memory_counters_init(); - gpr_slice input = gpr_slice_from_copied_buffer((const char *)data, size); - gpr_slice output = gpr_percent_encode_slice(input, dict); - gpr_slice decoded_output; - // encoder must always produce decodable output - GPR_ASSERT(gpr_strict_percent_decode_slice(output, dict, &decoded_output)); - gpr_slice permissive_decoded_output = - gpr_permissive_percent_decode_slice(output); - // and decoded output must always match the input - GPR_ASSERT(gpr_slice_cmp(input, decoded_output) == 0); - GPR_ASSERT(gpr_slice_cmp(input, permissive_decoded_output) == 0); - gpr_slice_unref(input); - gpr_slice_unref(output); - gpr_slice_unref(decoded_output); - gpr_slice_unref(permissive_decoded_output); - counters = grpc_memory_counters_snapshot(); - grpc_memory_counters_destroy(); - GPR_ASSERT(counters.total_size_relative == 0); -} - -int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { - test(data, size, gpr_url_percent_encoding_unreserved_bytes); - test(data, size, gpr_compatible_percent_encoding_unreserved_bytes); - return 0; -} diff --git a/test/core/support/percent_encoding_test.c b/test/core/support/percent_encoding_test.c deleted file mode 100644 index ab5f3f2d14..0000000000 --- a/test/core/support/percent_encoding_test.c +++ /dev/null @@ -1,157 +0,0 @@ -/* - * - * Copyright 2016, 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. - * - */ - -#include "src/core/lib/support/percent_encoding.h" - -#include -#include - -#include "src/core/lib/support/string.h" -#include "test/core/util/test_config.h" - -#define TEST_VECTOR(raw, encoded, dict) \ - test_vector(raw, sizeof(raw) - 1, encoded, sizeof(encoded) - 1, dict) - -#define TEST_NONCONFORMANT_VECTOR(encoded, permissive_unencoded, dict) \ - test_nonconformant_vector(encoded, sizeof(encoded) - 1, \ - permissive_unencoded, \ - sizeof(permissive_unencoded) - 1, dict) - -static void test_vector(const char *raw, size_t raw_length, const char *encoded, - size_t encoded_length, const uint8_t *dict) { - char *raw_msg = gpr_dump(raw, raw_length, GPR_DUMP_HEX | GPR_DUMP_ASCII); - char *encoded_msg = - gpr_dump(encoded, encoded_length, GPR_DUMP_HEX | GPR_DUMP_ASCII); - gpr_log(GPR_DEBUG, "Trial:\nraw = %s\nencoded = %s", raw_msg, encoded_msg); - gpr_free(raw_msg); - gpr_free(encoded_msg); - - gpr_slice raw_slice = gpr_slice_from_copied_buffer(raw, raw_length); - gpr_slice encoded_slice = - gpr_slice_from_copied_buffer(encoded, encoded_length); - gpr_slice raw2encoded_slice = gpr_percent_encode_slice(raw_slice, dict); - gpr_slice encoded2raw_slice; - GPR_ASSERT( - gpr_strict_percent_decode_slice(encoded_slice, dict, &encoded2raw_slice)); - gpr_slice encoded2raw_permissive_slice = - gpr_permissive_percent_decode_slice(encoded_slice); - - char *raw2encoded_msg = - gpr_dump_slice(raw2encoded_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); - char *encoded2raw_msg = - gpr_dump_slice(encoded2raw_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); - char *encoded2raw_permissive_msg = gpr_dump_slice( - encoded2raw_permissive_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); - gpr_log(GPR_DEBUG, - "Result:\nraw2encoded = %s\nencoded2raw = %s\nencoded2raw_permissive " - "= %s", - raw2encoded_msg, encoded2raw_msg, encoded2raw_permissive_msg); - gpr_free(raw2encoded_msg); - gpr_free(encoded2raw_msg); - gpr_free(encoded2raw_permissive_msg); - - GPR_ASSERT(0 == gpr_slice_cmp(raw_slice, encoded2raw_slice)); - GPR_ASSERT(0 == gpr_slice_cmp(raw_slice, encoded2raw_permissive_slice)); - GPR_ASSERT(0 == gpr_slice_cmp(encoded_slice, raw2encoded_slice)); - - gpr_slice_unref(encoded2raw_slice); - gpr_slice_unref(encoded2raw_permissive_slice); - gpr_slice_unref(raw2encoded_slice); - gpr_slice_unref(raw_slice); - gpr_slice_unref(encoded_slice); -} - -static void test_nonconformant_vector(const char *encoded, - size_t encoded_length, - const char *permissive_unencoded, - size_t permissive_unencoded_length, - const uint8_t *dict) { - char *permissive_unencoded_msg = - gpr_dump(permissive_unencoded, permissive_unencoded_length, - GPR_DUMP_HEX | GPR_DUMP_ASCII); - char *encoded_msg = - gpr_dump(encoded, encoded_length, GPR_DUMP_HEX | GPR_DUMP_ASCII); - gpr_log(GPR_DEBUG, "Trial:\nraw = %s\nencoded = %s", permissive_unencoded_msg, - encoded_msg); - gpr_free(permissive_unencoded_msg); - gpr_free(encoded_msg); - - gpr_slice permissive_unencoded_slice = gpr_slice_from_copied_buffer( - permissive_unencoded, permissive_unencoded_length); - gpr_slice encoded_slice = - gpr_slice_from_copied_buffer(encoded, encoded_length); - gpr_slice encoded2raw_slice; - GPR_ASSERT(!gpr_strict_percent_decode_slice(encoded_slice, dict, - &encoded2raw_slice)); - gpr_slice encoded2raw_permissive_slice = - gpr_permissive_percent_decode_slice(encoded_slice); - - char *encoded2raw_permissive_msg = gpr_dump_slice( - encoded2raw_permissive_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); - gpr_log(GPR_DEBUG, "Result:\nencoded2raw_permissive = %s", - encoded2raw_permissive_msg); - gpr_free(encoded2raw_permissive_msg); - - GPR_ASSERT(0 == gpr_slice_cmp(permissive_unencoded_slice, - encoded2raw_permissive_slice)); - - gpr_slice_unref(permissive_unencoded_slice); - gpr_slice_unref(encoded2raw_permissive_slice); - gpr_slice_unref(encoded_slice); -} - -int main(int argc, char **argv) { - grpc_test_init(argc, argv); - TEST_VECTOR( - "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~", - "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~", - gpr_url_percent_encoding_unreserved_bytes); - TEST_VECTOR("\x00", "%00", gpr_url_percent_encoding_unreserved_bytes); - TEST_VECTOR("\x01", "%01", gpr_url_percent_encoding_unreserved_bytes); - TEST_VECTOR("a b", "a%20b", gpr_url_percent_encoding_unreserved_bytes); - TEST_VECTOR(" b", "%20b", gpr_url_percent_encoding_unreserved_bytes); - TEST_VECTOR("a b", "a b", gpr_compatible_percent_encoding_unreserved_bytes); - TEST_VECTOR(" b", " b", gpr_compatible_percent_encoding_unreserved_bytes); - TEST_VECTOR("\x0f", "%0F", gpr_url_percent_encoding_unreserved_bytes); - TEST_VECTOR("\xff", "%FF", gpr_url_percent_encoding_unreserved_bytes); - TEST_VECTOR("\xee", "%EE", gpr_url_percent_encoding_unreserved_bytes); - TEST_NONCONFORMANT_VECTOR("%", "%", - gpr_url_percent_encoding_unreserved_bytes); - TEST_NONCONFORMANT_VECTOR("%A", "%A", - gpr_url_percent_encoding_unreserved_bytes); - TEST_NONCONFORMANT_VECTOR("%AG", "%AG", - gpr_url_percent_encoding_unreserved_bytes); - TEST_NONCONFORMANT_VECTOR("\0", "\0", - gpr_url_percent_encoding_unreserved_bytes); - return 0; -} diff --git a/test/core/support/slice_buffer_test.c b/test/core/support/slice_buffer_test.c deleted file mode 100644 index cf2da84c2b..0000000000 --- a/test/core/support/slice_buffer_test.c +++ /dev/null @@ -1,129 +0,0 @@ -/* - * - * 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. - * - */ - -#include -#include -#include "test/core/util/test_config.h" - -void test_slice_buffer_add() { - gpr_slice_buffer buf; - gpr_slice aaa = gpr_slice_from_copied_string("aaa"); - gpr_slice bb = gpr_slice_from_copied_string("bb"); - size_t i; - - gpr_slice_buffer_init(&buf); - for (i = 0; i < 10; i++) { - gpr_slice_ref(aaa); - gpr_slice_ref(bb); - gpr_slice_buffer_add(&buf, aaa); - gpr_slice_buffer_add(&buf, bb); - } - GPR_ASSERT(buf.count > 0); - GPR_ASSERT(buf.length == 50); - gpr_slice_buffer_reset_and_unref(&buf); - GPR_ASSERT(buf.count == 0); - GPR_ASSERT(buf.length == 0); - for (i = 0; i < 10; i++) { - gpr_slice_ref(aaa); - gpr_slice_ref(bb); - gpr_slice_buffer_add(&buf, aaa); - gpr_slice_buffer_add(&buf, bb); - } - GPR_ASSERT(buf.count > 0); - GPR_ASSERT(buf.length == 50); - for (i = 0; i < 10; i++) { - gpr_slice_buffer_pop(&buf); - gpr_slice_unref(aaa); - gpr_slice_unref(bb); - } - GPR_ASSERT(buf.count == 0); - GPR_ASSERT(buf.length == 0); - gpr_slice_buffer_destroy(&buf); -} - -void test_slice_buffer_move_first() { - gpr_slice slices[3]; - gpr_slice_buffer src; - gpr_slice_buffer dst; - int idx = 0; - size_t src_len = 0; - size_t dst_len = 0; - - slices[0] = gpr_slice_from_copied_string("aaa"); - slices[1] = gpr_slice_from_copied_string("bbbb"); - slices[2] = gpr_slice_from_copied_string("ccc"); - - gpr_slice_buffer_init(&src); - gpr_slice_buffer_init(&dst); - for (idx = 0; idx < 3; idx++) { - gpr_slice_ref(slices[idx]); - /* For this test, it is important that we add each slice at a new - slice index */ - gpr_slice_buffer_add_indexed(&src, slices[idx]); - gpr_slice_buffer_add_indexed(&dst, slices[idx]); - } - - /* Case 1: Move more than the first slice's length from src to dst */ - src_len = src.length; - dst_len = dst.length; - gpr_slice_buffer_move_first(&src, 4, &dst); - src_len -= 4; - dst_len += 4; - GPR_ASSERT(src.length == src_len); - GPR_ASSERT(dst.length == dst_len); - - /* src now has two slices ["bbb"] and ["ccc"] */ - /* Case 2: Move the first slice from src to dst */ - gpr_slice_buffer_move_first(&src, 3, &dst); - src_len -= 3; - dst_len += 3; - GPR_ASSERT(src.length == src_len); - GPR_ASSERT(dst.length == dst_len); - - /* src now has one slice ["ccc"] */ - /* Case 3: Move less than the first slice's length from src to dst*/ - gpr_slice_buffer_move_first(&src, 2, &dst); - src_len -= 2; - dst_len += 2; - GPR_ASSERT(src.length == src.length); - GPR_ASSERT(dst.length == dst.length); -} - -int main(int argc, char **argv) { - grpc_test_init(argc, argv); - - test_slice_buffer_add(); - test_slice_buffer_move_first(); - - return 0; -} diff --git a/test/core/support/slice_test.c b/test/core/support/slice_test.c deleted file mode 100644 index 06c364b368..0000000000 --- a/test/core/support/slice_test.c +++ /dev/null @@ -1,265 +0,0 @@ -/* - * - * 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. - * - */ - -#include - -#include - -#include -#include -#include "test/core/util/test_config.h" - -#define LOG_TEST_NAME(x) gpr_log(GPR_INFO, "%s", x); - -static void test_slice_malloc_returns_something_sensible(void) { - /* Calls gpr_slice_create for various lengths and verifies the internals for - consistency. */ - size_t length; - size_t i; - gpr_slice slice; - - LOG_TEST_NAME("test_slice_malloc_returns_something_sensible"); - - for (length = 0; length <= 1024; length++) { - slice = gpr_slice_malloc(length); - /* If there is a length, slice.data must be non-NULL. If length is zero - we don't care. */ - if (length) { - GPR_ASSERT(GPR_SLICE_START_PTR(slice)); - } - /* Returned slice length must be what was requested. */ - GPR_ASSERT(GPR_SLICE_LENGTH(slice) == length); - /* If the slice has a refcount, it must be destroyable. */ - if (slice.refcount) { - GPR_ASSERT(slice.refcount->ref != NULL); - GPR_ASSERT(slice.refcount->unref != NULL); - } - /* We must be able to write to every byte of the data */ - for (i = 0; i < length; i++) { - GPR_SLICE_START_PTR(slice)[i] = (uint8_t)i; - } - /* And finally we must succeed in destroying the slice */ - gpr_slice_unref(slice); - } -} - -static void do_nothing(void *ignored) {} - -static void test_slice_new_returns_something_sensible(void) { - uint8_t x; - - gpr_slice slice = gpr_slice_new(&x, 1, do_nothing); - GPR_ASSERT(slice.refcount); - GPR_ASSERT(slice.data.refcounted.bytes == &x); - GPR_ASSERT(slice.data.refcounted.length == 1); - gpr_slice_unref(slice); -} - -/* destroy function that sets a mark to indicate it was called. */ -static void set_mark(void *p) { *((int *)p) = 1; } - -static void test_slice_new_with_user_data(void) { - int marker = 0; - uint8_t buf[2]; - gpr_slice slice; - - buf[0] = 0; - buf[1] = 1; - slice = gpr_slice_new_with_user_data(buf, 2, set_mark, &marker); - GPR_ASSERT(marker == 0); - GPR_ASSERT(GPR_SLICE_LENGTH(slice) == 2); - GPR_ASSERT(GPR_SLICE_START_PTR(slice)[0] == 0); - GPR_ASSERT(GPR_SLICE_START_PTR(slice)[1] == 1); - - /* unref should cause destroy function to run. */ - gpr_slice_unref(slice); - GPR_ASSERT(marker == 1); -} - -static int do_nothing_with_len_1_calls = 0; - -static void do_nothing_with_len_1(void *ignored, size_t len) { - GPR_ASSERT(len == 1); - do_nothing_with_len_1_calls++; -} - -static void test_slice_new_with_len_returns_something_sensible(void) { - uint8_t x; - int num_refs = 5; /* To test adding/removing an arbitrary number of refs */ - int i; - - gpr_slice slice = gpr_slice_new_with_len(&x, 1, do_nothing_with_len_1); - GPR_ASSERT(slice.refcount); /* ref count is initialized to 1 at this point */ - GPR_ASSERT(slice.data.refcounted.bytes == &x); - GPR_ASSERT(slice.data.refcounted.length == 1); - GPR_ASSERT(do_nothing_with_len_1_calls == 0); - - /* Add an arbitrary number of refs to the slice and remoe the refs. This is to - make sure that that the destroy callback (i.e do_nothing_with_len_1()) is - not called until the last unref operation */ - for (i = 0; i < num_refs; i++) { - gpr_slice_ref(slice); - } - for (i = 0; i < num_refs; i++) { - gpr_slice_unref(slice); - } - GPR_ASSERT(do_nothing_with_len_1_calls == 0); /* Shouldn't be called yet */ - - /* last unref */ - gpr_slice_unref(slice); - GPR_ASSERT(do_nothing_with_len_1_calls == 1); -} - -static void test_slice_sub_works(unsigned length) { - gpr_slice slice; - gpr_slice sub; - unsigned i, j, k; - - LOG_TEST_NAME("test_slice_sub_works"); - gpr_log(GPR_INFO, "length=%d", length); - - /* Create a slice in which each byte is equal to the distance from it to the - beginning of the slice. */ - slice = gpr_slice_malloc(length); - for (i = 0; i < length; i++) { - GPR_SLICE_START_PTR(slice)[i] = (uint8_t)i; - } - - /* Ensure that for all subsets length is correct and that we start on the - correct byte. Additionally check that no copies were made. */ - for (i = 0; i < length; i++) { - for (j = i; j < length; j++) { - sub = gpr_slice_sub(slice, i, j); - GPR_ASSERT(GPR_SLICE_LENGTH(sub) == j - i); - for (k = 0; k < j - i; k++) { - GPR_ASSERT(GPR_SLICE_START_PTR(sub)[k] == (uint8_t)(i + k)); - } - gpr_slice_unref(sub); - } - } - gpr_slice_unref(slice); -} - -static void check_head_tail(gpr_slice slice, gpr_slice head, gpr_slice tail) { - GPR_ASSERT(GPR_SLICE_LENGTH(slice) == - GPR_SLICE_LENGTH(head) + GPR_SLICE_LENGTH(tail)); - GPR_ASSERT(0 == memcmp(GPR_SLICE_START_PTR(slice), GPR_SLICE_START_PTR(head), - GPR_SLICE_LENGTH(head))); - GPR_ASSERT(0 == memcmp(GPR_SLICE_START_PTR(slice) + GPR_SLICE_LENGTH(head), - GPR_SLICE_START_PTR(tail), GPR_SLICE_LENGTH(tail))); -} - -static void test_slice_split_head_works(size_t length) { - gpr_slice slice; - gpr_slice head, tail; - size_t i; - - LOG_TEST_NAME("test_slice_split_head_works"); - gpr_log(GPR_INFO, "length=%" PRIuPTR, length); - - /* Create a slice in which each byte is equal to the distance from it to the - beginning of the slice. */ - slice = gpr_slice_malloc(length); - for (i = 0; i < length; i++) { - GPR_SLICE_START_PTR(slice)[i] = (uint8_t)i; - } - - /* Ensure that for all subsets length is correct and that we start on the - correct byte. Additionally check that no copies were made. */ - for (i = 0; i < length; i++) { - tail = gpr_slice_ref(slice); - head = gpr_slice_split_head(&tail, i); - check_head_tail(slice, head, tail); - gpr_slice_unref(tail); - gpr_slice_unref(head); - } - - gpr_slice_unref(slice); -} - -static void test_slice_split_tail_works(size_t length) { - gpr_slice slice; - gpr_slice head, tail; - size_t i; - - LOG_TEST_NAME("test_slice_split_tail_works"); - gpr_log(GPR_INFO, "length=%" PRIuPTR, length); - - /* Create a slice in which each byte is equal to the distance from it to the - beginning of the slice. */ - slice = gpr_slice_malloc(length); - for (i = 0; i < length; i++) { - GPR_SLICE_START_PTR(slice)[i] = (uint8_t)i; - } - - /* Ensure that for all subsets length is correct and that we start on the - correct byte. Additionally check that no copies were made. */ - for (i = 0; i < length; i++) { - head = gpr_slice_ref(slice); - tail = gpr_slice_split_tail(&head, i); - check_head_tail(slice, head, tail); - gpr_slice_unref(tail); - gpr_slice_unref(head); - } - - gpr_slice_unref(slice); -} - -static void test_slice_from_copied_string_works(void) { - static const char *text = "HELLO WORLD!"; - gpr_slice slice; - - LOG_TEST_NAME("test_slice_from_copied_string_works"); - - slice = gpr_slice_from_copied_string(text); - GPR_ASSERT(strlen(text) == GPR_SLICE_LENGTH(slice)); - GPR_ASSERT(0 == - memcmp(text, GPR_SLICE_START_PTR(slice), GPR_SLICE_LENGTH(slice))); - gpr_slice_unref(slice); -} - -int main(int argc, char **argv) { - unsigned length; - grpc_test_init(argc, argv); - test_slice_malloc_returns_something_sensible(); - test_slice_new_returns_something_sensible(); - test_slice_new_with_user_data(); - test_slice_new_with_len_returns_something_sensible(); - for (length = 0; length < 128; length++) { - test_slice_sub_works(length); - test_slice_split_head_works(length); - test_slice_split_tail_works(length); - } - test_slice_from_copied_string_works(); - return 0; -} diff --git a/test/core/support/string_test.c b/test/core/support/string_test.c index 378e45a942..53709ed6f7 100644 --- a/test/core/support/string_test.c +++ b/test/core/support/string_test.c @@ -76,34 +76,6 @@ static void test_dump(void) { expect_dump("ab", 2, GPR_DUMP_HEX | GPR_DUMP_ASCII, "61 62 'ab'"); } -static void expect_slice_dump(gpr_slice slice, uint32_t flags, - const char *result) { - char *got = gpr_dump_slice(slice, flags); - GPR_ASSERT(0 == strcmp(got, result)); - gpr_free(got); - gpr_slice_unref(slice); -} - -static void test_dump_slice(void) { - static const char *text = "HELLO WORLD!"; - static const char *long_text = - "It was a bright cold day in April, and the clocks were striking " - "thirteen. Winston Smith, his chin nuzzled into his breast in an effort " - "to escape the vile wind, slipped quickly through the glass doors of " - "Victory Mansions, though not quickly enough to prevent a swirl of " - "gritty dust from entering along with him."; - - LOG_TEST_NAME("test_dump_slice"); - - expect_slice_dump(gpr_slice_from_copied_string(text), GPR_DUMP_ASCII, text); - expect_slice_dump(gpr_slice_from_copied_string(long_text), GPR_DUMP_ASCII, - long_text); - expect_slice_dump(gpr_slice_from_copied_buffer("\x01", 1), GPR_DUMP_HEX, - "01"); - expect_slice_dump(gpr_slice_from_copied_buffer("\x01", 1), - GPR_DUMP_HEX | GPR_DUMP_ASCII, "01 '.'"); -} - static void test_pu32_fail(const char *s) { uint32_t out; GPR_ASSERT(!gpr_parse_bytes_to_uint32(s, strlen(s), &out)); @@ -221,72 +193,6 @@ static void test_strjoin_sep(void) { gpr_free(joined); } -static void test_strsplit(void) { - gpr_slice_buffer *parts; - gpr_slice str; - - LOG_TEST_NAME("test_strsplit"); - - parts = gpr_malloc(sizeof(gpr_slice_buffer)); - gpr_slice_buffer_init(parts); - - str = gpr_slice_from_copied_string("one, two, three, four"); - gpr_slice_split(str, ", ", parts); - GPR_ASSERT(4 == parts->count); - GPR_ASSERT(0 == gpr_slice_str_cmp(parts->slices[0], "one")); - GPR_ASSERT(0 == gpr_slice_str_cmp(parts->slices[1], "two")); - GPR_ASSERT(0 == gpr_slice_str_cmp(parts->slices[2], "three")); - GPR_ASSERT(0 == gpr_slice_str_cmp(parts->slices[3], "four")); - gpr_slice_buffer_reset_and_unref(parts); - gpr_slice_unref(str); - - /* separator not present in string */ - str = gpr_slice_from_copied_string("one two three four"); - gpr_slice_split(str, ", ", parts); - GPR_ASSERT(1 == parts->count); - GPR_ASSERT(0 == gpr_slice_str_cmp(parts->slices[0], "one two three four")); - gpr_slice_buffer_reset_and_unref(parts); - gpr_slice_unref(str); - - /* separator at the end */ - str = gpr_slice_from_copied_string("foo,"); - gpr_slice_split(str, ",", parts); - GPR_ASSERT(2 == parts->count); - GPR_ASSERT(0 == gpr_slice_str_cmp(parts->slices[0], "foo")); - GPR_ASSERT(0 == gpr_slice_str_cmp(parts->slices[1], "")); - gpr_slice_buffer_reset_and_unref(parts); - gpr_slice_unref(str); - - /* separator at the beginning */ - str = gpr_slice_from_copied_string(",foo"); - gpr_slice_split(str, ",", parts); - GPR_ASSERT(2 == parts->count); - GPR_ASSERT(0 == gpr_slice_str_cmp(parts->slices[0], "")); - GPR_ASSERT(0 == gpr_slice_str_cmp(parts->slices[1], "foo")); - gpr_slice_buffer_reset_and_unref(parts); - gpr_slice_unref(str); - - /* standalone separator */ - str = gpr_slice_from_copied_string(","); - gpr_slice_split(str, ",", parts); - GPR_ASSERT(2 == parts->count); - GPR_ASSERT(0 == gpr_slice_str_cmp(parts->slices[0], "")); - GPR_ASSERT(0 == gpr_slice_str_cmp(parts->slices[1], "")); - gpr_slice_buffer_reset_and_unref(parts); - gpr_slice_unref(str); - - /* empty input */ - str = gpr_slice_from_copied_string(""); - gpr_slice_split(str, ", ", parts); - GPR_ASSERT(1 == parts->count); - GPR_ASSERT(0 == gpr_slice_str_cmp(parts->slices[0], "")); - gpr_slice_buffer_reset_and_unref(parts); - gpr_slice_unref(str); - - gpr_slice_buffer_destroy(parts); - gpr_free(parts); -} - static void test_ltoa() { char *str; char buf[GPR_LTOA_MIN_BUFSIZE]; diff --git a/test/core/surface/byte_buffer_reader_test.c b/test/core/surface/byte_buffer_reader_test.c index 1ab1a06211..eafeb04b11 100644 --- a/test/core/surface/byte_buffer_reader_test.c +++ b/test/core/surface/byte_buffer_reader_test.c @@ -49,102 +49,102 @@ #define LOG_TEST(x) gpr_log(GPR_INFO, "%s", x) static void test_read_one_slice(void) { - gpr_slice slice; + grpc_slice slice; grpc_byte_buffer *buffer; grpc_byte_buffer_reader reader; - gpr_slice first_slice, second_slice; + grpc_slice first_slice, second_slice; int first_code, second_code; LOG_TEST("test_read_one_slice"); - slice = gpr_slice_from_copied_string("test"); + slice = grpc_slice_from_copied_string("test"); buffer = grpc_raw_byte_buffer_create(&slice, 1); - gpr_slice_unref(slice); + grpc_slice_unref(slice); GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, buffer) && "Couldn't init byte buffer reader"); first_code = grpc_byte_buffer_reader_next(&reader, &first_slice); GPR_ASSERT(first_code != 0); GPR_ASSERT(memcmp(GPR_SLICE_START_PTR(first_slice), "test", 4) == 0); - gpr_slice_unref(first_slice); + grpc_slice_unref(first_slice); second_code = grpc_byte_buffer_reader_next(&reader, &second_slice); GPR_ASSERT(second_code == 0); grpc_byte_buffer_destroy(buffer); } static void test_read_one_slice_malloc(void) { - gpr_slice slice; + grpc_slice slice; grpc_byte_buffer *buffer; grpc_byte_buffer_reader reader; - gpr_slice first_slice, second_slice; + grpc_slice first_slice, second_slice; int first_code, second_code; LOG_TEST("test_read_one_slice_malloc"); - slice = gpr_slice_malloc(4); + slice = grpc_slice_malloc(4); memcpy(GPR_SLICE_START_PTR(slice), "test", 4); buffer = grpc_raw_byte_buffer_create(&slice, 1); - gpr_slice_unref(slice); + grpc_slice_unref(slice); GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, buffer) && "Couldn't init byte buffer reader"); first_code = grpc_byte_buffer_reader_next(&reader, &first_slice); GPR_ASSERT(first_code != 0); GPR_ASSERT(memcmp(GPR_SLICE_START_PTR(first_slice), "test", 4) == 0); - gpr_slice_unref(first_slice); + grpc_slice_unref(first_slice); second_code = grpc_byte_buffer_reader_next(&reader, &second_slice); GPR_ASSERT(second_code == 0); grpc_byte_buffer_destroy(buffer); } static void test_read_none_compressed_slice(void) { - gpr_slice slice; + grpc_slice slice; grpc_byte_buffer *buffer; grpc_byte_buffer_reader reader; - gpr_slice first_slice, second_slice; + grpc_slice first_slice, second_slice; int first_code, second_code; LOG_TEST("test_read_none_compressed_slice"); - slice = gpr_slice_from_copied_string("test"); + slice = grpc_slice_from_copied_string("test"); buffer = grpc_raw_byte_buffer_create(&slice, 1); - gpr_slice_unref(slice); + grpc_slice_unref(slice); GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, buffer) && "Couldn't init byte buffer reader"); first_code = grpc_byte_buffer_reader_next(&reader, &first_slice); GPR_ASSERT(first_code != 0); GPR_ASSERT(memcmp(GPR_SLICE_START_PTR(first_slice), "test", 4) == 0); - gpr_slice_unref(first_slice); + grpc_slice_unref(first_slice); second_code = grpc_byte_buffer_reader_next(&reader, &second_slice); GPR_ASSERT(second_code == 0); grpc_byte_buffer_destroy(buffer); } static void test_read_corrupted_slice(void) { - gpr_slice slice; + grpc_slice slice; grpc_byte_buffer *buffer; grpc_byte_buffer_reader reader; LOG_TEST("test_read_corrupted_slice"); - slice = gpr_slice_from_copied_string("test"); + slice = grpc_slice_from_copied_string("test"); buffer = grpc_raw_byte_buffer_create(&slice, 1); buffer->data.raw.compression = GRPC_COMPRESS_GZIP; /* lies! */ - gpr_slice_unref(slice); + grpc_slice_unref(slice); GPR_ASSERT(!grpc_byte_buffer_reader_init(&reader, buffer)); grpc_byte_buffer_destroy(buffer); } static void read_compressed_slice(grpc_compression_algorithm algorithm, size_t input_size) { - gpr_slice input_slice; - gpr_slice_buffer sliceb_in; - gpr_slice_buffer sliceb_out; + grpc_slice input_slice; + grpc_slice_buffer sliceb_in; + grpc_slice_buffer sliceb_out; grpc_byte_buffer *buffer; grpc_byte_buffer_reader reader; - gpr_slice read_slice; + grpc_slice read_slice; size_t read_count = 0; - gpr_slice_buffer_init(&sliceb_in); - gpr_slice_buffer_init(&sliceb_out); + grpc_slice_buffer_init(&sliceb_in); + grpc_slice_buffer_init(&sliceb_out); - input_slice = gpr_slice_malloc(input_size); + input_slice = grpc_slice_malloc(input_size); memset(GPR_SLICE_START_PTR(input_slice), 'a', input_size); - gpr_slice_buffer_add(&sliceb_in, input_slice); /* takes ownership */ + grpc_slice_buffer_add(&sliceb_in, input_slice); /* takes ownership */ GPR_ASSERT(grpc_msg_compress(algorithm, &sliceb_in, &sliceb_out)); buffer = grpc_raw_compressed_byte_buffer_create(sliceb_out.slices, @@ -157,13 +157,13 @@ static void read_compressed_slice(grpc_compression_algorithm algorithm, GPR_SLICE_START_PTR(input_slice) + read_count, GPR_SLICE_LENGTH(read_slice)) == 0); read_count += GPR_SLICE_LENGTH(read_slice); - gpr_slice_unref(read_slice); + grpc_slice_unref(read_slice); } GPR_ASSERT(read_count == input_size); grpc_byte_buffer_reader_destroy(&reader); grpc_byte_buffer_destroy(buffer); - gpr_slice_buffer_destroy(&sliceb_out); - gpr_slice_buffer_destroy(&sliceb_in); + grpc_slice_buffer_destroy(&sliceb_out); + grpc_slice_buffer_destroy(&sliceb_in); } static void test_read_gzip_compressed_slice(void) { @@ -179,15 +179,15 @@ static void test_read_deflate_compressed_slice(void) { } static void test_byte_buffer_from_reader(void) { - gpr_slice slice; + grpc_slice slice; grpc_byte_buffer *buffer, *buffer_from_reader; grpc_byte_buffer_reader reader; LOG_TEST("test_byte_buffer_from_reader"); - slice = gpr_slice_malloc(4); + slice = grpc_slice_malloc(4); memcpy(GPR_SLICE_START_PTR(slice), "test", 4); buffer = grpc_raw_byte_buffer_create(&slice, 1); - gpr_slice_unref(slice); + grpc_slice_unref(slice); GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, buffer) && "Couldn't init byte buffer reader"); @@ -206,24 +206,24 @@ static void test_byte_buffer_from_reader(void) { static void test_readall(void) { char *lotsa_as[512]; char *lotsa_bs[1024]; - gpr_slice slices[2]; + grpc_slice slices[2]; grpc_byte_buffer *buffer; grpc_byte_buffer_reader reader; - gpr_slice slice_out; + grpc_slice slice_out; LOG_TEST("test_readall"); memset(lotsa_as, 'a', 512); memset(lotsa_bs, 'b', 1024); /* use slices large enough to overflow inlining */ - slices[0] = gpr_slice_malloc(512); + slices[0] = grpc_slice_malloc(512); memcpy(GPR_SLICE_START_PTR(slices[0]), lotsa_as, 512); - slices[1] = gpr_slice_malloc(1024); + slices[1] = grpc_slice_malloc(1024); memcpy(GPR_SLICE_START_PTR(slices[1]), lotsa_bs, 1024); buffer = grpc_raw_byte_buffer_create(slices, 2); - gpr_slice_unref(slices[0]); - gpr_slice_unref(slices[1]); + grpc_slice_unref(slices[0]); + grpc_slice_unref(slices[1]); GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, buffer) && "Couldn't init byte buffer reader"); @@ -233,32 +233,32 @@ static void test_readall(void) { GPR_ASSERT(memcmp(GPR_SLICE_START_PTR(slice_out), lotsa_as, 512) == 0); GPR_ASSERT(memcmp(&(GPR_SLICE_START_PTR(slice_out)[512]), lotsa_bs, 1024) == 0); - gpr_slice_unref(slice_out); + grpc_slice_unref(slice_out); grpc_byte_buffer_destroy(buffer); } static void test_byte_buffer_copy(void) { char *lotsa_as[512]; char *lotsa_bs[1024]; - gpr_slice slices[2]; + grpc_slice slices[2]; grpc_byte_buffer *buffer; grpc_byte_buffer *copied_buffer; grpc_byte_buffer_reader reader; - gpr_slice slice_out; + grpc_slice slice_out; LOG_TEST("test_byte_buffer_copy"); memset(lotsa_as, 'a', 512); memset(lotsa_bs, 'b', 1024); /* use slices large enough to overflow inlining */ - slices[0] = gpr_slice_malloc(512); + slices[0] = grpc_slice_malloc(512); memcpy(GPR_SLICE_START_PTR(slices[0]), lotsa_as, 512); - slices[1] = gpr_slice_malloc(1024); + slices[1] = grpc_slice_malloc(1024); memcpy(GPR_SLICE_START_PTR(slices[1]), lotsa_bs, 1024); buffer = grpc_raw_byte_buffer_create(slices, 2); - gpr_slice_unref(slices[0]); - gpr_slice_unref(slices[1]); + grpc_slice_unref(slices[0]); + grpc_slice_unref(slices[1]); copied_buffer = grpc_byte_buffer_copy(buffer); GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, buffer) && @@ -269,7 +269,7 @@ static void test_byte_buffer_copy(void) { GPR_ASSERT(memcmp(GPR_SLICE_START_PTR(slice_out), lotsa_as, 512) == 0); GPR_ASSERT(memcmp(&(GPR_SLICE_START_PTR(slice_out)[512]), lotsa_bs, 1024) == 0); - gpr_slice_unref(slice_out); + grpc_slice_unref(slice_out); grpc_byte_buffer_destroy(buffer); grpc_byte_buffer_destroy(copied_buffer); } diff --git a/test/core/transport/chttp2/bin_decoder_test.c b/test/core/transport/chttp2/bin_decoder_test.c index c4e6cd332f..3b111934ad 100644 --- a/test/core/transport/chttp2/bin_decoder_test.c +++ b/test/core/transport/chttp2/bin_decoder_test.c @@ -42,9 +42,9 @@ static int all_ok = 1; -static void expect_slice_eq(gpr_slice expected, gpr_slice slice, char *debug, +static void expect_slice_eq(grpc_slice expected, grpc_slice slice, char *debug, int line) { - if (0 != gpr_slice_cmp(slice, expected)) { + if (0 != grpc_slice_cmp(slice, expected)) { char *hs = gpr_dump_slice(slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); char *he = gpr_dump_slice(expected, GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_ERROR, "FAILED:%d: %s\ngot: %s\nwant: %s", line, debug, hs, @@ -53,35 +53,35 @@ static void expect_slice_eq(gpr_slice expected, gpr_slice slice, char *debug, gpr_free(he); all_ok = 0; } - gpr_slice_unref(expected); - gpr_slice_unref(slice); + grpc_slice_unref(expected); + grpc_slice_unref(slice); } -static gpr_slice base64_encode(const char *s) { - gpr_slice ss = gpr_slice_from_copied_string(s); - gpr_slice out = grpc_chttp2_base64_encode(ss); - gpr_slice_unref(ss); +static grpc_slice base64_encode(const char *s) { + grpc_slice ss = grpc_slice_from_copied_string(s); + grpc_slice out = grpc_chttp2_base64_encode(ss); + grpc_slice_unref(ss); return out; } -static gpr_slice base64_decode(const char *s) { - gpr_slice ss = gpr_slice_from_copied_string(s); - gpr_slice out = grpc_chttp2_base64_decode(ss); - gpr_slice_unref(ss); +static grpc_slice base64_decode(const char *s) { + grpc_slice ss = grpc_slice_from_copied_string(s); + grpc_slice out = grpc_chttp2_base64_decode(ss); + grpc_slice_unref(ss); return out; } -static gpr_slice base64_decode_with_length(const char *s, +static grpc_slice base64_decode_with_length(const char *s, size_t output_length) { - gpr_slice ss = gpr_slice_from_copied_string(s); - gpr_slice out = grpc_chttp2_base64_decode_with_length(ss, output_length); - gpr_slice_unref(ss); + grpc_slice ss = grpc_slice_from_copied_string(s); + grpc_slice out = grpc_chttp2_base64_decode_with_length(ss, output_length); + grpc_slice_unref(ss); return out; } #define EXPECT_SLICE_EQ(expected, slice) \ expect_slice_eq( \ - gpr_slice_from_copied_buffer(expected, sizeof(expected) - 1), slice, \ + grpc_slice_from_copied_buffer(expected, sizeof(expected) - 1), slice, \ #slice, __LINE__); #define ENCODE_AND_DECODE(s) \ diff --git a/test/core/transport/chttp2/bin_encoder_test.c b/test/core/transport/chttp2/bin_encoder_test.c index 08d10735a5..f7df4452ce 100644 --- a/test/core/transport/chttp2/bin_encoder_test.c +++ b/test/core/transport/chttp2/bin_encoder_test.c @@ -45,9 +45,9 @@ static int all_ok = 1; -static void expect_slice_eq(gpr_slice expected, gpr_slice slice, char *debug, +static void expect_slice_eq(grpc_slice expected, grpc_slice slice, char *debug, int line) { - if (0 != gpr_slice_cmp(slice, expected)) { + if (0 != grpc_slice_cmp(slice, expected)) { char *hs = gpr_dump_slice(slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); char *he = gpr_dump_slice(expected, GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_ERROR, "FAILED:%d: %s\ngot: %s\nwant: %s", line, debug, hs, @@ -56,35 +56,35 @@ static void expect_slice_eq(gpr_slice expected, gpr_slice slice, char *debug, gpr_free(he); all_ok = 0; } - gpr_slice_unref(expected); - gpr_slice_unref(slice); + grpc_slice_unref(expected); + grpc_slice_unref(slice); } -static gpr_slice B64(const char *s) { - gpr_slice ss = gpr_slice_from_copied_string(s); - gpr_slice out = grpc_chttp2_base64_encode(ss); - gpr_slice_unref(ss); +static grpc_slice B64(const char *s) { + grpc_slice ss = grpc_slice_from_copied_string(s); + grpc_slice out = grpc_chttp2_base64_encode(ss); + grpc_slice_unref(ss); return out; } -static gpr_slice HUFF(const char *s) { - gpr_slice ss = gpr_slice_from_copied_string(s); - gpr_slice out = grpc_chttp2_huffman_compress(ss); - gpr_slice_unref(ss); +static grpc_slice HUFF(const char *s) { + grpc_slice ss = grpc_slice_from_copied_string(s); + grpc_slice out = grpc_chttp2_huffman_compress(ss); + grpc_slice_unref(ss); return out; } #define EXPECT_SLICE_EQ(expected, slice) \ expect_slice_eq( \ - gpr_slice_from_copied_buffer(expected, sizeof(expected) - 1), slice, \ + grpc_slice_from_copied_buffer(expected, sizeof(expected) - 1), slice, \ #slice, __LINE__); static void expect_combined_equiv(const char *s, size_t len, int line) { - gpr_slice input = gpr_slice_from_copied_buffer(s, len); - gpr_slice base64 = grpc_chttp2_base64_encode(input); - gpr_slice expect = grpc_chttp2_huffman_compress(base64); - gpr_slice got = grpc_chttp2_base64_encode_and_huffman_compress_impl(input); - if (0 != gpr_slice_cmp(expect, got)) { + grpc_slice input = grpc_slice_from_copied_buffer(s, len); + grpc_slice base64 = grpc_chttp2_base64_encode(input); + grpc_slice expect = grpc_chttp2_huffman_compress(base64); + grpc_slice got = grpc_chttp2_base64_encode_and_huffman_compress_impl(input); + if (0 != grpc_slice_cmp(expect, got)) { char *t = gpr_dump_slice(input, GPR_DUMP_HEX | GPR_DUMP_ASCII); char *e = gpr_dump_slice(expect, GPR_DUMP_HEX | GPR_DUMP_ASCII); char *g = gpr_dump_slice(got, GPR_DUMP_HEX | GPR_DUMP_ASCII); @@ -95,10 +95,10 @@ static void expect_combined_equiv(const char *s, size_t len, int line) { gpr_free(g); all_ok = 0; } - gpr_slice_unref(input); - gpr_slice_unref(base64); - gpr_slice_unref(expect); - gpr_slice_unref(got); + grpc_slice_unref(input); + grpc_slice_unref(base64); + grpc_slice_unref(expect); + grpc_slice_unref(got); } #define EXPECT_COMBINED_EQUIV(x) \ diff --git a/test/core/transport/chttp2/hpack_encoder_test.c b/test/core/transport/chttp2/hpack_encoder_test.c index 1c1c74879b..2b4279673a 100644 --- a/test/core/transport/chttp2/hpack_encoder_test.c +++ b/test/core/transport/chttp2/hpack_encoder_test.c @@ -60,9 +60,9 @@ size_t cap_to_delete = 0; hexstring passed in */ static void verify(size_t window_available, int eof, size_t expect_window_used, const char *expected, size_t nheaders, ...) { - gpr_slice_buffer output; - gpr_slice merged; - gpr_slice expect = parse_hexstring(expected); + grpc_slice_buffer output; + grpc_slice merged; + grpc_slice expect = parse_hexstring(expected); size_t i; va_list l; grpc_linked_mdelem *e = gpr_malloc(sizeof(*e) * nheaders); @@ -93,17 +93,17 @@ static void verify(size_t window_available, int eof, size_t expect_window_used, } to_delete[num_to_delete++] = e; - gpr_slice_buffer_init(&output); + grpc_slice_buffer_init(&output); grpc_transport_one_way_stats stats; memset(&stats, 0, sizeof(stats)); grpc_chttp2_encode_header(&g_compressor, 0xdeadbeef, &b, eof, 16384, &stats, &output); merged = grpc_slice_merge(output.slices, output.count); - gpr_slice_buffer_destroy(&output); + grpc_slice_buffer_destroy(&output); grpc_metadata_batch_destroy(&b); - if (0 != gpr_slice_cmp(merged, expect)) { + if (0 != grpc_slice_cmp(merged, expect)) { char *expect_str = gpr_dump_slice(expect, GPR_DUMP_HEX | GPR_DUMP_ASCII); char *got_str = gpr_dump_slice(merged, GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_ERROR, "mismatched output for %s", expected); @@ -114,8 +114,8 @@ static void verify(size_t window_available, int eof, size_t expect_window_used, g_failure = 1; } - gpr_slice_unref(merged); - gpr_slice_unref(expect); + grpc_slice_unref(merged); + grpc_slice_unref(expect); } static void test_basic_headers(void) { @@ -186,7 +186,7 @@ static void test_decode_table_overflow(void) { static void verify_table_size_change_match_elem_size(const char *key, const char *value) { - gpr_slice_buffer output; + grpc_slice_buffer output; grpc_mdelem *elem = grpc_mdelem_from_strings(key, value); size_t elem_size = grpc_mdelem_get_size_in_hpack_table(elem); size_t initial_table_size = g_compressor.table_size; @@ -198,13 +198,13 @@ static void verify_table_size_change_match_elem_size(const char *key, e[0].next = NULL; b.list.head = &e[0]; b.list.tail = &e[0]; - gpr_slice_buffer_init(&output); + grpc_slice_buffer_init(&output); grpc_transport_one_way_stats stats; memset(&stats, 0, sizeof(stats)); grpc_chttp2_encode_header(&g_compressor, 0xdeadbeef, &b, 0, 16384, &stats, &output); - gpr_slice_buffer_destroy(&output); + grpc_slice_buffer_destroy(&output); grpc_metadata_batch_destroy(&b); GPR_ASSERT(g_compressor.table_size == elem_size + initial_table_size); diff --git a/test/core/transport/chttp2/hpack_parser_test.c b/test/core/transport/chttp2/hpack_parser_test.c index 55b64f5d99..ffea0e19e2 100644 --- a/test/core/transport/chttp2/hpack_parser_test.c +++ b/test/core/transport/chttp2/hpack_parser_test.c @@ -52,16 +52,16 @@ static void onhdr(grpc_exec_ctx *exec_ctx, void *ud, grpc_mdelem *md) { GPR_ASSERT(ekey); evalue = va_arg(chk->args, char *); GPR_ASSERT(evalue); - GPR_ASSERT(gpr_slice_str_cmp(md->key->slice, ekey) == 0); - GPR_ASSERT(gpr_slice_str_cmp(md->value->slice, evalue) == 0); + GPR_ASSERT(grpc_slice_str_cmp(md->key->slice, ekey) == 0); + GPR_ASSERT(grpc_slice_str_cmp(md->value->slice, evalue) == 0); GRPC_MDELEM_UNREF(md); } static void test_vector(grpc_chttp2_hpack_parser *parser, grpc_slice_split_mode mode, const char *hexstring, ... /* char *key, char *value */) { - gpr_slice input = parse_hexstring(hexstring); - gpr_slice *slices; + grpc_slice input = parse_hexstring(hexstring); + grpc_slice *slices; size_t nslices; size_t i; test_checker chk; @@ -72,7 +72,7 @@ static void test_vector(grpc_chttp2_hpack_parser *parser, parser->on_header_user_data = &chk; grpc_split_slices(mode, &input, 1, &slices, &nslices); - gpr_slice_unref(input); + grpc_slice_unref(input); for (i = 0; i < nslices; i++) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -83,7 +83,7 @@ static void test_vector(grpc_chttp2_hpack_parser *parser, } for (i = 0; i < nslices; i++) { - gpr_slice_unref(slices[i]); + grpc_slice_unref(slices[i]); } gpr_free(slices); diff --git a/test/core/transport/chttp2/hpack_table_test.c b/test/core/transport/chttp2/hpack_table_test.c index 75b0ef4629..1a7e2442ca 100644 --- a/test/core/transport/chttp2/hpack_table_test.c +++ b/test/core/transport/chttp2/hpack_table_test.c @@ -48,7 +48,7 @@ static void assert_str(const grpc_chttp2_hptbl *tbl, grpc_mdstr *mdstr, const char *str) { - GPR_ASSERT(gpr_slice_str_cmp(mdstr->slice, str) == 0); + GPR_ASSERT(grpc_slice_str_cmp(mdstr->slice, str) == 0); } static void assert_index(const grpc_chttp2_hptbl *tbl, uint32_t idx, diff --git a/test/core/transport/chttp2/varint_test.c b/test/core/transport/chttp2/varint_test.c index 3552bf0c59..28cb404ce2 100644 --- a/test/core/transport/chttp2/varint_test.c +++ b/test/core/transport/chttp2/varint_test.c @@ -41,16 +41,16 @@ static void test_varint(uint32_t value, uint32_t prefix_bits, uint8_t prefix_or, const char *expect_bytes, size_t expect_length) { uint32_t nbytes = GRPC_CHTTP2_VARINT_LENGTH(value, prefix_bits); - gpr_slice expect = gpr_slice_from_copied_buffer(expect_bytes, expect_length); - gpr_slice slice; + grpc_slice expect = grpc_slice_from_copied_buffer(expect_bytes, expect_length); + grpc_slice slice; gpr_log(GPR_DEBUG, "Test: 0x%08x", value); GPR_ASSERT(nbytes == expect_length); - slice = gpr_slice_malloc(nbytes); + slice = grpc_slice_malloc(nbytes); GRPC_CHTTP2_WRITE_VARINT(value, prefix_bits, prefix_or, GPR_SLICE_START_PTR(slice), nbytes); - GPR_ASSERT(gpr_slice_cmp(expect, slice) == 0); - gpr_slice_unref(expect); - gpr_slice_unref(slice); + GPR_ASSERT(grpc_slice_cmp(expect, slice) == 0); + grpc_slice_unref(expect); + grpc_slice_unref(slice); } #define TEST_VARINT(value, prefix_bits, prefix_or, expect) \ diff --git a/test/core/transport/metadata_test.c b/test/core/transport/metadata_test.c index 007892930c..e47777ee72 100644 --- a/test/core/transport/metadata_test.c +++ b/test/core/transport/metadata_test.c @@ -68,8 +68,8 @@ static void test_create_string(void) { s3 = grpc_mdstr_from_string("very much not hello"); GPR_ASSERT(s1 == s2); GPR_ASSERT(s3 != s1); - GPR_ASSERT(gpr_slice_str_cmp(s1->slice, "hello") == 0); - GPR_ASSERT(gpr_slice_str_cmp(s3->slice, "very much not hello") == 0); + GPR_ASSERT(grpc_slice_str_cmp(s1->slice, "hello") == 0); + GPR_ASSERT(grpc_slice_str_cmp(s3->slice, "very much not hello") == 0); GRPC_MDSTR_UNREF(s1); GRPC_MDSTR_UNREF(s2); GRPC_MDSTR_UNREF(s3); @@ -89,9 +89,9 @@ static void test_create_metadata(void) { GPR_ASSERT(m3 != m1); GPR_ASSERT(m3->key == m1->key); GPR_ASSERT(m3->value != m1->value); - GPR_ASSERT(gpr_slice_str_cmp(m1->key->slice, "a") == 0); - GPR_ASSERT(gpr_slice_str_cmp(m1->value->slice, "b") == 0); - GPR_ASSERT(gpr_slice_str_cmp(m3->value->slice, "c") == 0); + GPR_ASSERT(grpc_slice_str_cmp(m1->key->slice, "a") == 0); + GPR_ASSERT(grpc_slice_str_cmp(m1->value->slice, "b") == 0); + GPR_ASSERT(grpc_slice_str_cmp(m3->value->slice, "c") == 0); GRPC_MDELEM_UNREF(m1); GRPC_MDELEM_UNREF(m2); GRPC_MDELEM_UNREF(m3); @@ -205,7 +205,7 @@ static void test_things_stick_around(void) { static void test_slices_work(void) { /* ensure no memory leaks when switching representation from mdstr to slice */ grpc_mdstr *str; - gpr_slice slice; + grpc_slice slice; LOG_TEST("test_slices_work"); @@ -213,14 +213,14 @@ static void test_slices_work(void) { str = grpc_mdstr_from_string( "123456789012345678901234567890123456789012345678901234567890"); - slice = gpr_slice_ref(str->slice); + slice = grpc_slice_ref(str->slice); GRPC_MDSTR_UNREF(str); - gpr_slice_unref(slice); + grpc_slice_unref(slice); str = grpc_mdstr_from_string( "123456789012345678901234567890123456789012345678901234567890"); - slice = gpr_slice_ref(str->slice); - gpr_slice_unref(slice); + slice = grpc_slice_ref(str->slice); + grpc_slice_unref(slice); GRPC_MDSTR_UNREF(str); grpc_shutdown(); @@ -228,8 +228,8 @@ static void test_slices_work(void) { static void test_base64_and_huffman_works(void) { grpc_mdstr *str; - gpr_slice slice1; - gpr_slice slice2; + grpc_slice slice1; + grpc_slice slice2; LOG_TEST("test_base64_and_huffman_works"); @@ -237,9 +237,9 @@ static void test_base64_and_huffman_works(void) { str = grpc_mdstr_from_string("abcdefg"); slice1 = grpc_mdstr_as_base64_encoded_and_huffman_compressed(str); slice2 = grpc_chttp2_base64_encode_and_huffman_compress(str->slice); - GPR_ASSERT(0 == gpr_slice_cmp(slice1, slice2)); + GPR_ASSERT(0 == grpc_slice_cmp(slice1, slice2)); - gpr_slice_unref(slice2); + grpc_slice_unref(slice2); GRPC_MDSTR_UNREF(str); grpc_shutdown(); } @@ -276,13 +276,13 @@ static void verify_binary_header_size(const char *key, const uint8_t *value, grpc_mdelem *elem = grpc_mdelem_from_string_and_buffer(key, value, value_len); GPR_ASSERT(grpc_is_binary_header(key, strlen(key))); size_t elem_size = grpc_mdelem_get_size_in_hpack_table(elem); - gpr_slice value_slice = - gpr_slice_from_copied_buffer((const char *)value, value_len); - gpr_slice base64_encoded = grpc_chttp2_base64_encode(value_slice); + grpc_slice value_slice = + grpc_slice_from_copied_buffer((const char *)value, value_len); + grpc_slice base64_encoded = grpc_chttp2_base64_encode(value_slice); size_t expected_size = 32 + strlen(key) + GPR_SLICE_LENGTH(base64_encoded); GPR_ASSERT(expected_size == elem_size); - gpr_slice_unref(value_slice); - gpr_slice_unref(base64_encoded); + grpc_slice_unref(value_slice); + grpc_slice_unref(base64_encoded); GRPC_MDELEM_UNREF(elem); } diff --git a/test/core/util/mock_endpoint.c b/test/core/util/mock_endpoint.c index 2b041a4484..6e09427c2b 100644 --- a/test/core/util/mock_endpoint.c +++ b/test/core/util/mock_endpoint.c @@ -42,19 +42,19 @@ typedef struct grpc_mock_endpoint { grpc_endpoint base; gpr_mu mu; int refs; - void (*on_write)(gpr_slice slice); - gpr_slice_buffer read_buffer; - gpr_slice_buffer *on_read_out; + void (*on_write)(grpc_slice slice); + grpc_slice_buffer read_buffer; + grpc_slice_buffer *on_read_out; grpc_closure *on_read; grpc_resource_user resource_user; } grpc_mock_endpoint; static void me_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, - gpr_slice_buffer *slices, grpc_closure *cb) { + grpc_slice_buffer *slices, grpc_closure *cb) { grpc_mock_endpoint *m = (grpc_mock_endpoint *)ep; gpr_mu_lock(&m->mu); if (m->read_buffer.count > 0) { - gpr_slice_buffer_swap(&m->read_buffer, slices); + grpc_slice_buffer_swap(&m->read_buffer, slices); grpc_exec_ctx_sched(exec_ctx, cb, GRPC_ERROR_NONE, NULL); } else { m->on_read = cb; @@ -64,7 +64,7 @@ static void me_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, } static void me_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, - gpr_slice_buffer *slices, grpc_closure *cb) { + grpc_slice_buffer *slices, grpc_closure *cb) { grpc_mock_endpoint *m = (grpc_mock_endpoint *)ep; for (size_t i = 0; i < slices->count; i++) { m->on_write(slices->slices[i]); @@ -82,7 +82,7 @@ static void unref(grpc_exec_ctx *exec_ctx, grpc_mock_endpoint *m) { gpr_mu_lock(&m->mu); if (0 == --m->refs) { gpr_mu_unlock(&m->mu); - gpr_slice_buffer_destroy(&m->read_buffer); + grpc_slice_buffer_destroy(&m->read_buffer); grpc_resource_user_destroy(exec_ctx, &m->resource_user); gpr_free(m); } else { @@ -137,7 +137,7 @@ static const grpc_endpoint_vtable vtable = { me_get_peer, }; -grpc_endpoint *grpc_mock_endpoint_create(void (*on_write)(gpr_slice slice), +grpc_endpoint *grpc_mock_endpoint_create(void (*on_write)(grpc_slice slice), grpc_resource_quota *resource_quota) { grpc_mock_endpoint *m = gpr_malloc(sizeof(*m)); m->base.vtable = &vtable; @@ -146,7 +146,7 @@ grpc_endpoint *grpc_mock_endpoint_create(void (*on_write)(gpr_slice slice), gpr_asprintf(&name, "mock_endpoint_%" PRIxPTR, (intptr_t)m); grpc_resource_user_init(&m->resource_user, resource_quota, name); gpr_free(name); - gpr_slice_buffer_init(&m->read_buffer); + grpc_slice_buffer_init(&m->read_buffer); gpr_mu_init(&m->mu); m->on_write = on_write; m->on_read = NULL; @@ -154,15 +154,15 @@ grpc_endpoint *grpc_mock_endpoint_create(void (*on_write)(gpr_slice slice), } void grpc_mock_endpoint_put_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, - gpr_slice slice) { + grpc_slice slice) { grpc_mock_endpoint *m = (grpc_mock_endpoint *)ep; gpr_mu_lock(&m->mu); if (m->on_read != NULL) { - gpr_slice_buffer_add(m->on_read_out, slice); + grpc_slice_buffer_add(m->on_read_out, slice); grpc_exec_ctx_sched(exec_ctx, m->on_read, GRPC_ERROR_NONE, NULL); m->on_read = NULL; } else { - gpr_slice_buffer_add(&m->read_buffer, slice); + grpc_slice_buffer_add(&m->read_buffer, slice); } gpr_mu_unlock(&m->mu); } diff --git a/test/core/util/mock_endpoint.h b/test/core/util/mock_endpoint.h index b3a464ca01..8f8d2a412d 100644 --- a/test/core/util/mock_endpoint.h +++ b/test/core/util/mock_endpoint.h @@ -36,9 +36,9 @@ #include "src/core/lib/iomgr/endpoint.h" -grpc_endpoint *grpc_mock_endpoint_create(void (*on_write)(gpr_slice slice), +grpc_endpoint *grpc_mock_endpoint_create(void (*on_write)(grpc_slice slice), grpc_resource_quota *resource_quota); void grpc_mock_endpoint_put_read(grpc_exec_ctx *exec_ctx, - grpc_endpoint *mock_endpoint, gpr_slice slice); + grpc_endpoint *mock_endpoint, grpc_slice slice); #endif diff --git a/test/core/util/one_corpus_entry_fuzzer.c b/test/core/util/one_corpus_entry_fuzzer.c index 95ae4cf706..a07e83b775 100644 --- a/test/core/util/one_corpus_entry_fuzzer.c +++ b/test/core/util/one_corpus_entry_fuzzer.c @@ -42,12 +42,12 @@ extern bool squelch; extern bool leak_check; int main(int argc, char **argv) { - gpr_slice buffer; + grpc_slice buffer; squelch = false; leak_check = false; GPR_ASSERT( GRPC_LOG_IF_ERROR("load_file", grpc_load_file(argv[1], 0, &buffer))); LLVMFuzzerTestOneInput(GPR_SLICE_START_PTR(buffer), GPR_SLICE_LENGTH(buffer)); - gpr_slice_unref(buffer); + grpc_slice_unref(buffer); return 0; } diff --git a/test/core/util/parse_hexstring.c b/test/core/util/parse_hexstring.c index 3ad7ce5828..91149a691a 100644 --- a/test/core/util/parse_hexstring.c +++ b/test/core/util/parse_hexstring.c @@ -34,12 +34,12 @@ #include "test/core/util/parse_hexstring.h" #include -gpr_slice parse_hexstring(const char *hexstring) { +grpc_slice parse_hexstring(const char *hexstring) { size_t nibbles = 0; const char *p = 0; uint8_t *out; uint8_t temp; - gpr_slice slice; + grpc_slice slice; for (p = hexstring; *p; p++) { nibbles += (*p >= '0' && *p <= '9') || (*p >= 'a' && *p <= 'f'); @@ -47,7 +47,7 @@ gpr_slice parse_hexstring(const char *hexstring) { GPR_ASSERT((nibbles & 1) == 0); - slice = gpr_slice_malloc(nibbles / 2); + slice = grpc_slice_malloc(nibbles / 2); out = GPR_SLICE_START_PTR(slice); nibbles = 0; diff --git a/test/core/util/parse_hexstring.h b/test/core/util/parse_hexstring.h index ddbfe541c6..bfdc23299a 100644 --- a/test/core/util/parse_hexstring.h +++ b/test/core/util/parse_hexstring.h @@ -36,6 +36,6 @@ #include -gpr_slice parse_hexstring(const char *hexstring); +grpc_slice parse_hexstring(const char *hexstring); #endif /* GRPC_TEST_CORE_UTIL_PARSE_HEXSTRING_H */ diff --git a/test/core/util/passthru_endpoint.c b/test/core/util/passthru_endpoint.c index ee6ef7da60..a5bac8aaa8 100644 --- a/test/core/util/passthru_endpoint.c +++ b/test/core/util/passthru_endpoint.c @@ -43,8 +43,8 @@ typedef struct passthru_endpoint passthru_endpoint; typedef struct { grpc_endpoint base; passthru_endpoint *parent; - gpr_slice_buffer read_buffer; - gpr_slice_buffer *on_read_out; + grpc_slice_buffer read_buffer; + grpc_slice_buffer *on_read_out; grpc_closure *on_read; grpc_resource_user resource_user; } half; @@ -58,14 +58,14 @@ struct passthru_endpoint { }; static void me_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, - gpr_slice_buffer *slices, grpc_closure *cb) { + grpc_slice_buffer *slices, grpc_closure *cb) { half *m = (half *)ep; gpr_mu_lock(&m->parent->mu); if (m->parent->shutdown) { grpc_exec_ctx_sched(exec_ctx, cb, GRPC_ERROR_CREATE("Already shutdown"), NULL); } else if (m->read_buffer.count > 0) { - gpr_slice_buffer_swap(&m->read_buffer, slices); + grpc_slice_buffer_swap(&m->read_buffer, slices); grpc_exec_ctx_sched(exec_ctx, cb, GRPC_ERROR_NONE, NULL); } else { m->on_read = cb; @@ -80,7 +80,7 @@ static half *other_half(half *h) { } static void me_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, - gpr_slice_buffer *slices, grpc_closure *cb) { + grpc_slice_buffer *slices, grpc_closure *cb) { half *m = other_half((half *)ep); gpr_mu_lock(&m->parent->mu); grpc_error *error = GRPC_ERROR_NONE; @@ -88,13 +88,13 @@ static void me_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, error = GRPC_ERROR_CREATE("Endpoint already shutdown"); } else if (m->on_read != NULL) { for (size_t i = 0; i < slices->count; i++) { - gpr_slice_buffer_add(m->on_read_out, gpr_slice_ref(slices->slices[i])); + grpc_slice_buffer_add(m->on_read_out, grpc_slice_ref(slices->slices[i])); } grpc_exec_ctx_sched(exec_ctx, m->on_read, GRPC_ERROR_NONE, NULL); m->on_read = NULL; } else { for (size_t i = 0; i < slices->count; i++) { - gpr_slice_buffer_add(&m->read_buffer, gpr_slice_ref(slices->slices[i])); + grpc_slice_buffer_add(&m->read_buffer, grpc_slice_ref(slices->slices[i])); } } gpr_mu_unlock(&m->parent->mu); @@ -132,8 +132,8 @@ static void me_really_destroy(grpc_exec_ctx *exec_ctx, void *ep, if (0 == --p->halves) { gpr_mu_unlock(&p->mu); gpr_mu_destroy(&p->mu); - gpr_slice_buffer_destroy(&p->client.read_buffer); - gpr_slice_buffer_destroy(&p->server.read_buffer); + grpc_slice_buffer_destroy(&p->client.read_buffer); + grpc_slice_buffer_destroy(&p->server.read_buffer); gpr_free(p); } else { gpr_mu_unlock(&p->mu); @@ -174,7 +174,7 @@ static void half_init(half *m, passthru_endpoint *parent, const char *half_name) { m->base.vtable = &vtable; m->parent = parent; - gpr_slice_buffer_init(&m->read_buffer); + grpc_slice_buffer_init(&m->read_buffer); m->on_read = NULL; char *name; gpr_asprintf(&name, "passthru_endpoint_%s_%" PRIxPTR, half_name, diff --git a/test/core/util/slice_splitter.c b/test/core/util/slice_splitter.c index 95b55a6505..6647b8fbb3 100644 --- a/test/core/util/slice_splitter.c +++ b/test/core/util/slice_splitter.c @@ -50,8 +50,8 @@ const char *grpc_slice_split_mode_name(grpc_slice_split_mode mode) { return "error"; } -void grpc_split_slices(grpc_slice_split_mode mode, gpr_slice *src_slices, - size_t src_slice_count, gpr_slice **dst_slices, +void grpc_split_slices(grpc_slice_split_mode mode, grpc_slice *src_slices, + size_t src_slice_count, grpc_slice **dst_slices, size_t *dst_slice_count) { size_t i, j; size_t length; @@ -59,10 +59,10 @@ void grpc_split_slices(grpc_slice_split_mode mode, gpr_slice *src_slices, switch (mode) { case GRPC_SLICE_SPLIT_IDENTITY: *dst_slice_count = src_slice_count; - *dst_slices = gpr_malloc(sizeof(gpr_slice) * src_slice_count); + *dst_slices = gpr_malloc(sizeof(grpc_slice) * src_slice_count); for (i = 0; i < src_slice_count; i++) { (*dst_slices)[i] = src_slices[i]; - gpr_slice_ref((*dst_slices)[i]); + grpc_slice_ref((*dst_slices)[i]); } break; case GRPC_SLICE_SPLIT_MERGE_ALL: @@ -71,8 +71,8 @@ void grpc_split_slices(grpc_slice_split_mode mode, gpr_slice *src_slices, for (i = 0; i < src_slice_count; i++) { length += GPR_SLICE_LENGTH(src_slices[i]); } - *dst_slices = gpr_malloc(sizeof(gpr_slice)); - **dst_slices = gpr_slice_malloc(length); + *dst_slices = gpr_malloc(sizeof(grpc_slice)); + **dst_slices = grpc_slice_malloc(length); length = 0; for (i = 0; i < src_slice_count; i++) { memcpy(GPR_SLICE_START_PTR(**dst_slices) + length, @@ -87,11 +87,11 @@ void grpc_split_slices(grpc_slice_split_mode mode, gpr_slice *src_slices, length += GPR_SLICE_LENGTH(src_slices[i]); } *dst_slice_count = length; - *dst_slices = gpr_malloc(sizeof(gpr_slice) * length); + *dst_slices = gpr_malloc(sizeof(grpc_slice) * length); length = 0; for (i = 0; i < src_slice_count; i++) { for (j = 0; j < GPR_SLICE_LENGTH(src_slices[i]); j++) { - (*dst_slices)[length] = gpr_slice_sub(src_slices[i], j, j + 1); + (*dst_slices)[length] = grpc_slice_sub(src_slices[i], j, j + 1); length++; } } @@ -100,25 +100,25 @@ void grpc_split_slices(grpc_slice_split_mode mode, gpr_slice *src_slices, } void grpc_split_slices_to_buffer(grpc_slice_split_mode mode, - gpr_slice *src_slices, size_t src_slice_count, - gpr_slice_buffer *dst) { - gpr_slice *slices; + grpc_slice *src_slices, size_t src_slice_count, + grpc_slice_buffer *dst) { + grpc_slice *slices; size_t nslices; size_t i; grpc_split_slices(mode, src_slices, src_slice_count, &slices, &nslices); for (i = 0; i < nslices; i++) { /* add indexed to avoid re-merging split slices */ - gpr_slice_buffer_add_indexed(dst, slices[i]); + grpc_slice_buffer_add_indexed(dst, slices[i]); } gpr_free(slices); } -void grpc_split_slice_buffer(grpc_slice_split_mode mode, gpr_slice_buffer *src, - gpr_slice_buffer *dst) { +void grpc_split_slice_buffer(grpc_slice_split_mode mode, grpc_slice_buffer *src, + grpc_slice_buffer *dst) { grpc_split_slices_to_buffer(mode, src->slices, src->count, dst); } -gpr_slice grpc_slice_merge(gpr_slice *slices, size_t nslices) { +grpc_slice grpc_slice_merge(grpc_slice *slices, size_t nslices) { uint8_t *out = NULL; size_t length = 0; size_t capacity = 0; @@ -134,5 +134,5 @@ gpr_slice grpc_slice_merge(gpr_slice *slices, size_t nslices) { length += GPR_SLICE_LENGTH(slices[i]); } - return gpr_slice_new(out, length, gpr_free); + return grpc_slice_new(out, length, gpr_free); } diff --git a/test/core/util/slice_splitter.h b/test/core/util/slice_splitter.h index d030c2cb55..9e62dfa0f3 100644 --- a/test/core/util/slice_splitter.h +++ b/test/core/util/slice_splitter.h @@ -51,17 +51,17 @@ typedef enum { /* allocates *dst_slices; caller must unref all slices in dst_slices then free it */ -void grpc_split_slices(grpc_slice_split_mode mode, gpr_slice *src_slices, - size_t src_slice_count, gpr_slice **dst_slices, +void grpc_split_slices(grpc_slice_split_mode mode, grpc_slice *src_slices, + size_t src_slice_count, grpc_slice **dst_slices, size_t *dst_slice_count); void grpc_split_slices_to_buffer(grpc_slice_split_mode mode, - gpr_slice *src_slices, size_t src_slice_count, - gpr_slice_buffer *dst); -void grpc_split_slice_buffer(grpc_slice_split_mode mode, gpr_slice_buffer *src, - gpr_slice_buffer *dst); + grpc_slice *src_slices, size_t src_slice_count, + grpc_slice_buffer *dst); +void grpc_split_slice_buffer(grpc_slice_split_mode mode, grpc_slice_buffer *src, + grpc_slice_buffer *dst); -gpr_slice grpc_slice_merge(gpr_slice *slices, size_t nslices); +grpc_slice grpc_slice_merge(grpc_slice *slices, size_t nslices); const char *grpc_slice_split_mode_name(grpc_slice_split_mode mode); diff --git a/test/cpp/grpclb/grpclb_api_test.cc b/test/cpp/grpclb/grpclb_api_test.cc index e67189c69e..fed5a2cce1 100644 --- a/test/cpp/grpclb/grpclb_api_test.cc +++ b/test/cpp/grpclb/grpclb_api_test.cc @@ -71,12 +71,12 @@ TEST_F(GrpclbTest, CreateRequest) { const grpc::string service_name = "AServiceName"; LoadBalanceRequest request; grpc_grpclb_request* c_req = grpc_grpclb_request_create(service_name.c_str()); - gpr_slice slice = grpc_grpclb_request_encode(c_req); + grpc_slice slice = grpc_grpclb_request_encode(c_req); const int num_bytes_written = GPR_SLICE_LENGTH(slice); EXPECT_GT(num_bytes_written, 0); request.ParseFromArray(GPR_SLICE_START_PTR(slice), num_bytes_written); EXPECT_EQ(request.initial_request().name(), service_name); - gpr_slice_unref(slice); + grpc_slice_unref(slice); grpc_grpclb_request_destroy(c_req); } @@ -88,15 +88,15 @@ TEST_F(GrpclbTest, ParseInitialResponse) { client_stats_report_interval->set_seconds(123); client_stats_report_interval->set_nanos(456); const grpc::string encoded_response = response.SerializeAsString(); - gpr_slice encoded_slice = - gpr_slice_from_copied_string(encoded_response.c_str()); + grpc_slice encoded_slice = + grpc_slice_from_copied_string(encoded_response.c_str()); grpc_grpclb_initial_response* c_initial_response = grpc_grpclb_initial_response_parse(encoded_slice); EXPECT_FALSE(c_initial_response->has_load_balancer_delegate); EXPECT_EQ(c_initial_response->client_stats_report_interval.seconds, 123); EXPECT_EQ(c_initial_response->client_stats_report_interval.nanos, 456); - gpr_slice_unref(encoded_slice); + grpc_slice_unref(encoded_slice); grpc_grpclb_initial_response_destroy(c_initial_response); } @@ -116,7 +116,7 @@ TEST_F(GrpclbTest, ParseResponseServerList) { expiration_interval->set_nanos(999); const grpc::string encoded_response = response.SerializeAsString(); - const gpr_slice encoded_slice = gpr_slice_from_copied_buffer( + const grpc_slice encoded_slice = grpc_slice_from_copied_buffer( encoded_response.data(), encoded_response.size()); grpc_grpclb_serverlist* c_serverlist = grpc_grpclb_response_parse_serverlist(encoded_slice); @@ -137,7 +137,7 @@ TEST_F(GrpclbTest, ParseResponseServerList) { EXPECT_TRUE(c_serverlist->expiration_interval.has_nanos); EXPECT_EQ(c_serverlist->expiration_interval.nanos, 999); - gpr_slice_unref(encoded_slice); + grpc_slice_unref(encoded_slice); grpc_grpclb_destroy_serverlist(c_serverlist); } diff --git a/test/cpp/grpclb/grpclb_test.cc b/test/cpp/grpclb/grpclb_test.cc index b6056f9ae4..a65e425625 100644 --- a/test/cpp/grpclb/grpclb_test.cc +++ b/test/cpp/grpclb/grpclb_test.cc @@ -109,7 +109,7 @@ typedef struct test_fixture { static void *tag(intptr_t t) { return (void *)t; } -static gpr_slice build_response_payload_slice( +static grpc_slice build_response_payload_slice( const char *host, int *ports, size_t nports, int64_t expiration_interval_secs, int32_t expiration_interval_nanos) { // server_list { @@ -148,7 +148,7 @@ static gpr_slice build_response_payload_slice( server->set_load_balance_token(token_data); } const grpc::string &enc_resp = response.SerializeAsString(); - return gpr_slice_from_copied_buffer(enc_resp.data(), enc_resp.size()); + return grpc_slice_from_copied_buffer(enc_resp.data(), enc_resp.size()); } static void drain_cq(grpc_completion_queue *cq) { @@ -210,17 +210,17 @@ static void start_lb_server(server_fixture *sf, int *ports, size_t nports, // validate initial request. grpc_byte_buffer_reader bbr; grpc_byte_buffer_reader_init(&bbr, request_payload_recv); - gpr_slice request_payload_slice = grpc_byte_buffer_reader_readall(&bbr); + grpc_slice request_payload_slice = grpc_byte_buffer_reader_readall(&bbr); grpc::lb::v1::LoadBalanceRequest request; request.ParseFromArray(GPR_SLICE_START_PTR(request_payload_slice), GPR_SLICE_LENGTH(request_payload_slice)); GPR_ASSERT(request.has_initial_request()); GPR_ASSERT(request.initial_request().name() == sf->servers_hostport); - gpr_slice_unref(request_payload_slice); + grpc_slice_unref(request_payload_slice); grpc_byte_buffer_reader_destroy(&bbr); grpc_byte_buffer_destroy(request_payload_recv); - gpr_slice response_payload_slice; + grpc_slice response_payload_slice; op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -264,7 +264,7 @@ static void start_lb_server(server_fixture *sf, int *ports, size_t nports, sf->servers_hostport, i); grpc_byte_buffer_destroy(response_payload); - gpr_slice_unref(response_payload_slice); + grpc_slice_unref(response_payload_slice); } gpr_log(GPR_INFO, "LB Server[%s] shutting down", sf->servers_hostport); @@ -355,7 +355,7 @@ static void start_backend_server(server_fixture *sf) { gpr_log(GPR_INFO, "Server[%s] after tag 101", sf->servers_hostport); bool exit = false; - gpr_slice response_payload_slice = gpr_slice_from_copied_string(PAYLOAD); + grpc_slice response_payload_slice = grpc_slice_from_copied_string(PAYLOAD); while (!exit) { op = ops; op->op = GRPC_OP_RECV_MESSAGE; @@ -414,7 +414,7 @@ static void start_backend_server(server_fixture *sf) { ++sf->num_calls_serviced; gpr_log(GPR_INFO, "Server[%s] OUT OF THE LOOP", sf->servers_hostport); - gpr_slice_unref(response_payload_slice); + grpc_slice_unref(response_payload_slice); op = ops; op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; @@ -456,7 +456,7 @@ static void perform_request(client_fixture *cf) { int i; memset(ops, 0, sizeof(ops)); - gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); c = grpc_channel_create_call(cf->client, NULL, GRPC_PROPAGATE_DEFAULTS, cf->cq, "/foo", "foo.test.google.fr:1234", @@ -515,7 +515,7 @@ static void perform_request(client_fixture *cf) { grpc_byte_buffer_destroy(response_payload_recv); } - gpr_slice_unref(request_payload_slice); + grpc_slice_unref(request_payload_slice); op = ops; op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index 9983c8a7b0..d63346a582 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -103,7 +103,7 @@ class ClientRequestCreator { if (payload_config.has_bytebuf_params()) { std::unique_ptr buf( new char[payload_config.bytebuf_params().req_size()]); - gpr_slice s = gpr_slice_from_copied_buffer( + grpc_slice s = grpc_slice_from_copied_buffer( buf.get(), payload_config.bytebuf_params().req_size()); Slice slice(s, Slice::STEAL_REF); *req = ByteBuffer(&slice, 1); diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc index bc4c896d83..4fcdb4f083 100644 --- a/test/cpp/qps/server_async.cc +++ b/test/cpp/qps/server_async.cc @@ -380,7 +380,7 @@ static Status ProcessGenericRPC(const PayloadConfig &payload_config, ByteBuffer *response) { int resp_size = payload_config.bytebuf_params().resp_size(); std::unique_ptr buf(new char[resp_size]); - gpr_slice s = gpr_slice_from_copied_buffer(buf.get(), resp_size); + grpc_slice s = grpc_slice_from_copied_buffer(buf.get(), resp_size); Slice slice(s, Slice::STEAL_REF); *response = ByteBuffer(&slice, 1); return Status::OK; diff --git a/test/cpp/util/byte_buffer_proto_helper.cc b/test/cpp/util/byte_buffer_proto_helper.cc index d625d6f3f4..ab5ca261e6 100644 --- a/test/cpp/util/byte_buffer_proto_helper.cc +++ b/test/cpp/util/byte_buffer_proto_helper.cc @@ -51,7 +51,7 @@ std::unique_ptr SerializeToByteBuffer( grpc::protobuf::Message* message) { grpc::string buf; message->SerializeToString(&buf); - gpr_slice s = gpr_slice_from_copied_string(buf.c_str()); + grpc_slice s = grpc_slice_from_copied_string(buf.c_str()); Slice slice(s, Slice::STEAL_REF); return std::unique_ptr(new ByteBuffer(&slice, 1)); } diff --git a/test/cpp/util/byte_buffer_test.cc b/test/cpp/util/byte_buffer_test.cc index 2089a62011..f66f471d7e 100644 --- a/test/cpp/util/byte_buffer_test.cc +++ b/test/cpp/util/byte_buffer_test.cc @@ -49,14 +49,14 @@ const char* kContent2 = "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy world"; class ByteBufferTest : public ::testing::Test {}; TEST_F(ByteBufferTest, CreateFromSingleSlice) { - gpr_slice hello = gpr_slice_from_copied_string(kContent1); + grpc_slice hello = grpc_slice_from_copied_string(kContent1); Slice s(hello, Slice::STEAL_REF); ByteBuffer buffer(&s, 1); } TEST_F(ByteBufferTest, CreateFromVector) { - gpr_slice hello = gpr_slice_from_copied_string(kContent1); - gpr_slice world = gpr_slice_from_copied_string(kContent2); + grpc_slice hello = grpc_slice_from_copied_string(kContent1); + grpc_slice world = grpc_slice_from_copied_string(kContent2); std::vector slices; slices.push_back(Slice(hello, Slice::STEAL_REF)); slices.push_back(Slice(world, Slice::STEAL_REF)); @@ -64,15 +64,15 @@ TEST_F(ByteBufferTest, CreateFromVector) { } TEST_F(ByteBufferTest, Clear) { - gpr_slice hello = gpr_slice_from_copied_string(kContent1); + grpc_slice hello = grpc_slice_from_copied_string(kContent1); Slice s(hello, Slice::STEAL_REF); ByteBuffer buffer(&s, 1); buffer.Clear(); } TEST_F(ByteBufferTest, Length) { - gpr_slice hello = gpr_slice_from_copied_string(kContent1); - gpr_slice world = gpr_slice_from_copied_string(kContent2); + grpc_slice hello = grpc_slice_from_copied_string(kContent1); + grpc_slice world = grpc_slice_from_copied_string(kContent2); std::vector slices; slices.push_back(Slice(hello, Slice::STEAL_REF)); slices.push_back(Slice(world, Slice::STEAL_REF)); @@ -80,7 +80,7 @@ TEST_F(ByteBufferTest, Length) { EXPECT_EQ(strlen(kContent1) + strlen(kContent2), buffer.Length()); } -bool SliceEqual(const Slice& a, gpr_slice b) { +bool SliceEqual(const Slice& a, grpc_slice b) { if (a.size() != GPR_SLICE_LENGTH(b)) { return false; } @@ -93,8 +93,8 @@ bool SliceEqual(const Slice& a, gpr_slice b) { } TEST_F(ByteBufferTest, Dump) { - gpr_slice hello = gpr_slice_from_copied_string(kContent1); - gpr_slice world = gpr_slice_from_copied_string(kContent2); + grpc_slice hello = grpc_slice_from_copied_string(kContent1); + grpc_slice world = grpc_slice_from_copied_string(kContent2); std::vector slices; slices.push_back(Slice(hello, Slice::STEAL_REF)); slices.push_back(Slice(world, Slice::STEAL_REF)); @@ -106,8 +106,8 @@ TEST_F(ByteBufferTest, Dump) { } TEST_F(ByteBufferTest, SerializationMakesCopy) { - gpr_slice hello = gpr_slice_from_copied_string(kContent1); - gpr_slice world = gpr_slice_from_copied_string(kContent2); + grpc_slice hello = grpc_slice_from_copied_string(kContent1); + grpc_slice world = grpc_slice_from_copied_string(kContent2); std::vector slices; slices.push_back(Slice(hello, Slice::STEAL_REF)); slices.push_back(Slice(world, Slice::STEAL_REF)); diff --git a/test/cpp/util/cli_call.cc b/test/cpp/util/cli_call.cc index 1edffbe08e..e36475bc9e 100644 --- a/test/cpp/util/cli_call.cc +++ b/test/cpp/util/cli_call.cc @@ -72,7 +72,7 @@ Status CliCall::Call(std::shared_ptr channel, cq.Next(&got_tag, &ok); GPR_ASSERT(ok); - gpr_slice s = gpr_slice_from_copied_string(request.c_str()); + grpc_slice s = grpc_slice_from_copied_string(request.c_str()); grpc::Slice req_slice(s, grpc::Slice::STEAL_REF); grpc::ByteBuffer send_buffer(&req_slice, 1); call->Write(send_buffer, tag(2)); diff --git a/test/cpp/util/slice_test.cc b/test/cpp/util/slice_test.cc index 45799ae157..3e50700303 100644 --- a/test/cpp/util/slice_test.cc +++ b/test/cpp/util/slice_test.cc @@ -51,15 +51,15 @@ class SliceTest : public ::testing::Test { }; TEST_F(SliceTest, Steal) { - gpr_slice s = gpr_slice_from_copied_string(kContent); + grpc_slice s = grpc_slice_from_copied_string(kContent); Slice spp(s, Slice::STEAL_REF); CheckSlice(spp, kContent); } TEST_F(SliceTest, Add) { - gpr_slice s = gpr_slice_from_copied_string(kContent); + grpc_slice s = grpc_slice_from_copied_string(kContent); Slice spp(s, Slice::ADD_REF); - gpr_slice_unref(s); + grpc_slice_unref(s); CheckSlice(spp, kContent); } @@ -69,13 +69,13 @@ TEST_F(SliceTest, Empty) { } TEST_F(SliceTest, Cslice) { - gpr_slice s = gpr_slice_from_copied_string(kContent); + grpc_slice s = grpc_slice_from_copied_string(kContent); Slice spp(s, Slice::STEAL_REF); CheckSlice(spp, kContent); - gpr_slice c_slice = spp.c_slice(); + grpc_slice c_slice = spp.c_slice(); EXPECT_EQ(GPR_SLICE_START_PTR(s), GPR_SLICE_START_PTR(c_slice)); EXPECT_EQ(GPR_SLICE_END_PTR(s), GPR_SLICE_END_PTR(c_slice)); - gpr_slice_unref(c_slice); + grpc_slice_unref(c_slice); } } // namespace diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 9a49c61480..9ae5627a77 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -754,7 +754,7 @@ "headers": [], "is_filegroup": false, "language": "c", - "name": "gpr_slice_buffer_test", + "name": "grpc_slice_buffer_test", "src": [ "test/core/support/slice_buffer_test.c" ], @@ -769,7 +769,7 @@ "headers": [], "is_filegroup": false, "language": "c", - "name": "gpr_slice_test", + "name": "grpc_slice_test", "src": [ "test/core/support/slice_test.c" ], diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index a1d59c0053..8713578f4a 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -815,7 +815,7 @@ "flaky": false, "gtest": false, "language": "c", - "name": "gpr_slice_buffer_test", + "name": "grpc_slice_buffer_test", "platforms": [ "linux", "mac", @@ -836,7 +836,7 @@ "flaky": false, "gtest": false, "language": "c", - "name": "gpr_slice_test", + "name": "grpc_slice_test", "platforms": [ "linux", "mac", diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index b1918809bf..08feb72861 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -433,7 +433,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpr_percent_encoding_test", {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpr_slice_buffer_test", "vcxproj\test\gpr_slice_buffer_test\gpr_slice_buffer_test.vcxproj", "{E679773D-DE89-AEBB-9787-59019989B825}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_slice_buffer_test", "vcxproj\test\grpc_slice_buffer_test\grpc_slice_buffer_test.vcxproj", "{E679773D-DE89-AEBB-9787-59019989B825}" ProjectSection(myProperties) = preProject lib = "False" EndProjectSection @@ -442,7 +442,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpr_slice_buffer_test", "vc {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpr_slice_test", "vcxproj\test\gpr_slice_test\gpr_slice_test.vcxproj", "{7F2D1623-AF04-DD98-BCE6-61ADB9A52366}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_slice_test", "vcxproj\test\grpc_slice_test\grpc_slice_test.vcxproj", "{7F2D1623-AF04-DD98-BCE6-61ADB9A52366}" ProjectSection(myProperties) = preProject lib = "False" EndProjectSection diff --git a/vsprojects/vcxproj/test/gpr_slice_buffer_test/gpr_slice_buffer_test.vcxproj b/vsprojects/vcxproj/test/gpr_slice_buffer_test/gpr_slice_buffer_test.vcxproj index 33926ff116..6343575915 100644 --- a/vsprojects/vcxproj/test/gpr_slice_buffer_test/gpr_slice_buffer_test.vcxproj +++ b/vsprojects/vcxproj/test/gpr_slice_buffer_test/gpr_slice_buffer_test.vcxproj @@ -60,14 +60,14 @@ - gpr_slice_buffer_test + grpc_slice_buffer_test static Debug static Debug - gpr_slice_buffer_test + grpc_slice_buffer_test static Release static diff --git a/vsprojects/vcxproj/test/gpr_slice_test/gpr_slice_test.vcxproj b/vsprojects/vcxproj/test/gpr_slice_test/gpr_slice_test.vcxproj index bb2badc35c..bfd3468ff9 100644 --- a/vsprojects/vcxproj/test/gpr_slice_test/gpr_slice_test.vcxproj +++ b/vsprojects/vcxproj/test/gpr_slice_test/gpr_slice_test.vcxproj @@ -60,14 +60,14 @@ - gpr_slice_test + grpc_slice_test static Debug static Debug - gpr_slice_test + grpc_slice_test static Release static -- cgit v1.2.3 From b37d53ebc0414777e3999bcad820b174a24291a9 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 26 Oct 2016 16:16:35 -0700 Subject: Bulk update #includes --- include/grpc++/support/slice.h | 2 +- include/grpc/byte_buffer.h | 2 +- include/grpc/grpc.h | 2 +- include/grpc/slice_buffer.h | 2 +- src/core/ext/census/grpc_filter.c | 2 +- src/core/ext/client_channel/default_initial_connect_string.c | 2 +- src/core/ext/client_channel/http_connect_handshaker.c | 2 +- src/core/ext/client_channel/initial_connect_string.h | 2 +- src/core/ext/client_channel/uri_parser.c | 4 ++-- src/core/ext/lb_policy/grpclb/load_balancer_api.h | 2 +- src/core/ext/transport/chttp2/client/insecure/channel_create.c | 4 ++-- src/core/ext/transport/chttp2/client/secure/secure_channel_create.c | 4 ++-- src/core/ext/transport/chttp2/transport/bin_decoder.h | 2 +- src/core/ext/transport/chttp2/transport/bin_encoder.h | 2 +- src/core/ext/transport/chttp2/transport/chttp2_transport.c | 2 +- src/core/ext/transport/chttp2/transport/frame.h | 2 +- src/core/ext/transport/chttp2/transport/frame_data.h | 4 ++-- src/core/ext/transport/chttp2/transport/frame_goaway.h | 4 ++-- src/core/ext/transport/chttp2/transport/frame_ping.h | 2 +- src/core/ext/transport/chttp2/transport/frame_rst_stream.h | 2 +- src/core/ext/transport/chttp2/transport/frame_settings.h | 2 +- src/core/ext/transport/chttp2/transport/frame_window_update.h | 2 +- src/core/ext/transport/chttp2/transport/hpack_encoder.h | 4 ++-- src/core/ext/transport/chttp2/transport/hpack_table.h | 2 +- src/core/ext/transport/cronet/transport/cronet_transport.c | 2 +- src/core/lib/channel/compress_filter.c | 2 +- src/core/lib/channel/connected_channel.c | 2 +- src/core/lib/compression/message_compress.h | 2 +- src/core/lib/http/format_request.c | 2 +- src/core/lib/http/format_request.h | 2 +- src/core/lib/http/parser.h | 2 +- src/core/lib/iomgr/endpoint.h | 4 ++-- src/core/lib/iomgr/load_file.h | 2 +- src/core/lib/iomgr/tcp_client_windows.c | 2 +- src/core/lib/iomgr/tcp_posix.c | 2 +- src/core/lib/iomgr/tcp_windows.c | 2 +- src/core/lib/security/credentials/jwt/json_token.h | 2 +- src/core/lib/security/credentials/jwt/jwt_verifier.h | 2 +- src/core/lib/security/transport/handshake.c | 2 +- src/core/lib/security/transport/secure_endpoint.c | 4 ++-- src/core/lib/security/transport/secure_endpoint.h | 2 +- src/core/lib/security/transport/security_connector.c | 2 +- src/core/lib/security/util/b64.h | 2 +- src/core/lib/slice/percent_encoding.h | 2 +- src/core/lib/slice/slice.c | 2 +- src/core/lib/slice/slice_buffer.c | 2 +- src/core/lib/slice/slice_string_helpers.h | 4 ++-- src/core/lib/support/env.h | 2 +- src/core/lib/support/string.h | 4 ++-- src/core/lib/support/tmpfile.h | 2 +- src/core/lib/surface/byte_buffer_reader.c | 2 +- src/core/lib/surface/call.c | 2 +- src/core/lib/transport/byte_stream.h | 2 +- src/core/lib/transport/metadata.h | 2 +- src/core/lib/transport/metadata_batch.h | 2 +- src/cpp/client/channel_cc.cc | 2 +- src/cpp/common/core_codegen.cc | 4 ++-- src/csharp/ext/grpc_csharp_ext.c | 2 +- src/php/ext/grpc/byte_buffer.c | 2 +- src/ruby/ext/grpc/rb_byte_buffer.c | 2 +- src/ruby/ext/grpc/rb_grpc_imports.generated.h | 4 ++-- test/core/client_channel/set_initial_connect_string_test.c | 2 +- test/core/end2end/bad_server_response_test.c | 2 +- test/core/end2end/fixtures/http_proxy.c | 2 +- test/core/iomgr/endpoint_tests.c | 2 +- test/core/iomgr/load_file_test.c | 2 +- test/core/security/b64_test.c | 2 +- test/core/security/create_jwt.c | 2 +- test/core/security/fetch_oauth2.c | 2 +- test/core/security/json_token_test.c | 2 +- test/core/security/jwt_verifier_test.c | 2 +- test/core/security/oauth2_utils.c | 2 +- test/core/security/print_google_default_creds_token.c | 2 +- test/core/security/verify_jwt.c | 2 +- test/core/slice/slice_buffer_test.c | 2 +- test/core/slice/slice_test.c | 2 +- test/core/surface/byte_buffer_reader_test.c | 2 +- test/core/surface/public_headers_must_be_c89.c | 4 ++-- test/core/transport/chttp2/hpack_parser_test.c | 2 +- test/core/transport/chttp2/varint_test.c | 2 +- test/core/util/parse_hexstring.h | 2 +- test/core/util/slice_splitter.h | 4 ++-- test/cpp/util/byte_buffer_test.cc | 2 +- test/cpp/util/cli_call.cc | 2 +- test/cpp/util/slice_test.cc | 2 +- 85 files changed, 99 insertions(+), 99 deletions(-) (limited to 'src/core/lib') diff --git a/include/grpc++/support/slice.h b/include/grpc++/support/slice.h index b06b1b69e5..699148ccda 100644 --- a/include/grpc++/support/slice.h +++ b/include/grpc++/support/slice.h @@ -35,7 +35,7 @@ #define GRPCXX_SUPPORT_SLICE_H #include -#include +#include namespace grpc { diff --git a/include/grpc/byte_buffer.h b/include/grpc/byte_buffer.h index 3cf31df0df..395ebef744 100644 --- a/include/grpc/byte_buffer.h +++ b/include/grpc/byte_buffer.h @@ -35,7 +35,7 @@ #define GRPC_BYTE_BUFFER_H #include -#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index f8e442274e..23d15fdc0b 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include diff --git a/include/grpc/slice_buffer.h b/include/grpc/slice_buffer.h index bff0d76914..f7a2f58f8e 100644 --- a/include/grpc/slice_buffer.h +++ b/include/grpc/slice_buffer.h @@ -34,7 +34,7 @@ #ifndef GRPC_SUPPORT_SLICE_BUFFER_H #define GRPC_SUPPORT_SLICE_BUFFER_H -#include +#include #ifdef __cplusplus extern "C" { diff --git a/src/core/ext/census/grpc_filter.c b/src/core/ext/census/grpc_filter.c index a4cf6f37bd..d84d715031 100644 --- a/src/core/ext/census/grpc_filter.c +++ b/src/core/ext/census/grpc_filter.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include "src/core/ext/census/census_interface.h" diff --git a/src/core/ext/client_channel/default_initial_connect_string.c b/src/core/ext/client_channel/default_initial_connect_string.c index 784173f0e2..da90677db2 100644 --- a/src/core/ext/client_channel/default_initial_connect_string.c +++ b/src/core/ext/client_channel/default_initial_connect_string.c @@ -31,7 +31,7 @@ * */ -#include +#include #include "src/core/lib/iomgr/sockaddr.h" void grpc_set_default_initial_connect_string(struct sockaddr **addr, diff --git a/src/core/ext/client_channel/http_connect_handshaker.c b/src/core/ext/client_channel/http_connect_handshaker.c index 9c175af09a..d80f710b72 100644 --- a/src/core/ext/client_channel/http_connect_handshaker.c +++ b/src/core/ext/client_channel/http_connect_handshaker.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include "src/core/ext/client_channel/uri_parser.h" diff --git a/src/core/ext/client_channel/initial_connect_string.h b/src/core/ext/client_channel/initial_connect_string.h index 4cfe8b5fe7..3c221d3d97 100644 --- a/src/core/ext/client_channel/initial_connect_string.h +++ b/src/core/ext/client_channel/initial_connect_string.h @@ -34,7 +34,7 @@ #ifndef GRPC_CORE_EXT_CLIENT_CHANNEL_INITIAL_CONNECT_STRING_H #define GRPC_CORE_EXT_CLIENT_CHANNEL_INITIAL_CONNECT_STRING_H -#include +#include #include "src/core/lib/iomgr/sockaddr.h" typedef void (*grpc_set_initial_connect_string_func)(struct sockaddr **addr, diff --git a/src/core/ext/client_channel/uri_parser.c b/src/core/ext/client_channel/uri_parser.c index 7bdc5373d9..01c348f2df 100644 --- a/src/core/ext/client_channel/uri_parser.c +++ b/src/core/ext/client_channel/uri_parser.c @@ -38,8 +38,8 @@ #include #include #include -#include -#include +#include +#include #include #include "src/core/lib/support/string.h" diff --git a/src/core/ext/lb_policy/grpclb/load_balancer_api.h b/src/core/ext/lb_policy/grpclb/load_balancer_api.h index 235ccf6cb4..b4c967e426 100644 --- a/src/core/ext/lb_policy/grpclb/load_balancer_api.h +++ b/src/core/ext/lb_policy/grpclb/load_balancer_api.h @@ -34,7 +34,7 @@ #ifndef GRPC_CORE_EXT_LB_POLICY_GRPCLB_LOAD_BALANCER_API_H #define GRPC_CORE_EXT_LB_POLICY_GRPCLB_LOAD_BALANCER_API_H -#include +#include #include "src/core/ext/client_channel/lb_policy_factory.h" #include "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h" diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index eee38a0b90..0c4dbee8d9 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -37,8 +37,8 @@ #include #include -#include -#include +#include +#include #include "src/core/ext/client_channel/client_channel.h" #include "src/core/ext/client_channel/http_connect_handshaker.h" diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index d396a1bc36..c135f69820 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -37,8 +37,8 @@ #include #include -#include -#include +#include +#include #include "src/core/ext/client_channel/client_channel.h" #include "src/core/ext/client_channel/http_connect_handshaker.h" diff --git a/src/core/ext/transport/chttp2/transport/bin_decoder.h b/src/core/ext/transport/chttp2/transport/bin_decoder.h index c416608a0b..5e00fd8143 100644 --- a/src/core/ext/transport/chttp2/transport/bin_decoder.h +++ b/src/core/ext/transport/chttp2/transport/bin_decoder.h @@ -34,7 +34,7 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_DECODER_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_DECODER_H -#include +#include #include struct grpc_base64_decode_context { diff --git a/src/core/ext/transport/chttp2/transport/bin_encoder.h b/src/core/ext/transport/chttp2/transport/bin_encoder.h index 878390cde6..3d86a41a11 100644 --- a/src/core/ext/transport/chttp2/transport/bin_encoder.h +++ b/src/core/ext/transport/chttp2/transport/bin_encoder.h @@ -34,7 +34,7 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_ENCODER_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_ENCODER_H -#include +#include /* base64 encode a slice. Returns a new slice, does not take ownership of the input */ diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 3a551d449b..93c14217cc 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include diff --git a/src/core/ext/transport/chttp2/transport/frame.h b/src/core/ext/transport/chttp2/transport/frame.h index 1e444a91fd..0b3842b4a1 100644 --- a/src/core/ext/transport/chttp2/transport/frame.h +++ b/src/core/ext/transport/chttp2/transport/frame.h @@ -35,7 +35,7 @@ #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_H #include -#include +#include #include "src/core/lib/iomgr/error.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_data.h b/src/core/ext/transport/chttp2/transport/frame_data.h index 471f615c67..264ad14608 100644 --- a/src/core/ext/transport/chttp2/transport/frame_data.h +++ b/src/core/ext/transport/chttp2/transport/frame_data.h @@ -36,8 +36,8 @@ /* Parser for GRPC streams embedded in DATA frames */ -#include -#include +#include +#include #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/transport/byte_stream.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_goaway.h b/src/core/ext/transport/chttp2/transport/frame_goaway.h index c2b82d85b3..927b7fbd48 100644 --- a/src/core/ext/transport/chttp2/transport/frame_goaway.h +++ b/src/core/ext/transport/chttp2/transport/frame_goaway.h @@ -35,8 +35,8 @@ #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_GOAWAY_H #include -#include -#include +#include +#include #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_ping.h b/src/core/ext/transport/chttp2/transport/frame_ping.h index dcc95db4ca..b9889e2d11 100644 --- a/src/core/ext/transport/chttp2/transport/frame_ping.h +++ b/src/core/ext/transport/chttp2/transport/frame_ping.h @@ -34,7 +34,7 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_PING_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_PING_H -#include +#include #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_rst_stream.h b/src/core/ext/transport/chttp2/transport/frame_rst_stream.h index d837e95da4..f39002a3e9 100644 --- a/src/core/ext/transport/chttp2/transport/frame_rst_stream.h +++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.h @@ -34,7 +34,7 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_RST_STREAM_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_RST_STREAM_H -#include +#include #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/transport/transport.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_settings.h b/src/core/ext/transport/chttp2/transport/frame_settings.h index cb2c8de0a0..bbbecec518 100644 --- a/src/core/ext/transport/chttp2/transport/frame_settings.h +++ b/src/core/ext/transport/chttp2/transport/frame_settings.h @@ -35,7 +35,7 @@ #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_SETTINGS_H #include -#include +#include #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_window_update.h b/src/core/ext/transport/chttp2/transport/frame_window_update.h index b0f6a0a9d0..b5f40335a4 100644 --- a/src/core/ext/transport/chttp2/transport/frame_window_update.h +++ b/src/core/ext/transport/chttp2/transport/frame_window_update.h @@ -34,7 +34,7 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_WINDOW_UPDATE_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_WINDOW_UPDATE_H -#include +#include #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/transport/transport.h" diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.h b/src/core/ext/transport/chttp2/transport/hpack_encoder.h index abbd514fc2..9188d9c6c5 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_encoder.h +++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.h @@ -35,8 +35,8 @@ #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_ENCODER_H #include -#include -#include +#include +#include #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/transport/metadata.h" #include "src/core/lib/transport/metadata_batch.h" diff --git a/src/core/ext/transport/chttp2/transport/hpack_table.h b/src/core/ext/transport/chttp2/transport/hpack_table.h index 45bd9255bf..bc5a2d2463 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_table.h +++ b/src/core/ext/transport/chttp2/transport/hpack_table.h @@ -35,7 +35,7 @@ #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_TABLE_H #include -#include +#include #include "src/core/lib/iomgr/error.h" #include "src/core/lib/transport/metadata.h" diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 87b2c0880f..6f55b69c84 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/core/lib/channel/compress_filter.c b/src/core/lib/channel/compress_filter.c index f797d82eb9..c42a81b3b5 100644 --- a/src/core/lib/channel/compress_filter.c +++ b/src/core/lib/channel/compress_filter.c @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/compress_filter.h" diff --git a/src/core/lib/channel/connected_channel.c b/src/core/lib/channel/connected_channel.c index 918379c845..2ae86f5507 100644 --- a/src/core/lib/channel/connected_channel.c +++ b/src/core/lib/channel/connected_channel.c @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include "src/core/lib/profiling/timers.h" #include "src/core/lib/support/string.h" #include "src/core/lib/transport/transport.h" diff --git a/src/core/lib/compression/message_compress.h b/src/core/lib/compression/message_compress.h index d28b5a36b3..448d36a863 100644 --- a/src/core/lib/compression/message_compress.h +++ b/src/core/lib/compression/message_compress.h @@ -35,7 +35,7 @@ #define GRPC_CORE_LIB_COMPRESSION_MESSAGE_COMPRESS_H #include -#include +#include /* compress 'input' to 'output' using 'algorithm'. On success, appends compressed slices to output and returns 1. diff --git a/src/core/lib/http/format_request.c b/src/core/lib/http/format_request.c index 03f705ee97..59ff28f67f 100644 --- a/src/core/lib/http/format_request.c +++ b/src/core/lib/http/format_request.c @@ -38,7 +38,7 @@ #include #include -#include +#include #include #include #include "src/core/lib/support/string.h" diff --git a/src/core/lib/http/format_request.h b/src/core/lib/http/format_request.h index 939401be48..ad51701bbb 100644 --- a/src/core/lib/http/format_request.h +++ b/src/core/lib/http/format_request.h @@ -34,7 +34,7 @@ #ifndef GRPC_CORE_LIB_HTTP_FORMAT_REQUEST_H #define GRPC_CORE_LIB_HTTP_FORMAT_REQUEST_H -#include +#include #include "src/core/lib/http/httpcli.h" grpc_slice grpc_httpcli_format_get_request(const grpc_httpcli_request *request); diff --git a/src/core/lib/http/parser.h b/src/core/lib/http/parser.h index 102ffba05d..6d003cd68c 100644 --- a/src/core/lib/http/parser.h +++ b/src/core/lib/http/parser.h @@ -35,7 +35,7 @@ #define GRPC_CORE_LIB_HTTP_PARSER_H #include -#include +#include #include "src/core/lib/iomgr/error.h" /* Maximum length of a header string of the form 'Key: Value\r\n' */ diff --git a/src/core/lib/iomgr/endpoint.h b/src/core/lib/iomgr/endpoint.h index d05998ec85..bf211ca16a 100644 --- a/src/core/lib/iomgr/endpoint.h +++ b/src/core/lib/iomgr/endpoint.h @@ -34,8 +34,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_ENDPOINT_H #define GRPC_CORE_LIB_IOMGR_ENDPOINT_H -#include -#include +#include +#include #include #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/pollset_set.h" diff --git a/src/core/lib/iomgr/load_file.h b/src/core/lib/iomgr/load_file.h index 31cec92cb1..73ee8c3abf 100644 --- a/src/core/lib/iomgr/load_file.h +++ b/src/core/lib/iomgr/load_file.h @@ -36,7 +36,7 @@ #include -#include +#include #include "src/core/lib/iomgr/error.h" diff --git a/src/core/lib/iomgr/tcp_client_windows.c b/src/core/lib/iomgr/tcp_client_windows.c index 562cb9c6bf..c8a531f40a 100644 --- a/src/core/lib/iomgr/tcp_client_windows.c +++ b/src/core/lib/iomgr/tcp_client_windows.c @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include "src/core/lib/iomgr/iocp_windows.h" diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 909237d84d..419d23de00 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -48,7 +48,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/core/lib/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.c index 6f63f80021..1ff6cdc5bc 100644 --- a/src/core/lib/iomgr/tcp_windows.c +++ b/src/core/lib/iomgr/tcp_windows.c @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/core/lib/security/credentials/jwt/json_token.h b/src/core/lib/security/credentials/jwt/json_token.h index 07fc5bf0e0..c13eb55803 100644 --- a/src/core/lib/security/credentials/jwt/json_token.h +++ b/src/core/lib/security/credentials/jwt/json_token.h @@ -34,7 +34,7 @@ #ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JSON_TOKEN_H #define GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JSON_TOKEN_H -#include +#include #include #include "src/core/lib/json/json.h" diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.h b/src/core/lib/security/credentials/jwt/jwt_verifier.h index e05a9f1824..f09f9d5d47 100644 --- a/src/core/lib/security/credentials/jwt/jwt_verifier.h +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.h @@ -37,7 +37,7 @@ #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/json/json.h" -#include +#include #include /* --- Constants. --- */ diff --git a/src/core/lib/security/transport/handshake.c b/src/core/lib/security/transport/handshake.c index 2d33521d94..58d896b32e 100644 --- a/src/core/lib/security/transport/handshake.c +++ b/src/core/lib/security/transport/handshake.c @@ -38,7 +38,7 @@ #include #include -#include +#include #include "src/core/lib/iomgr/timer.h" #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/security/transport/secure_endpoint.h" diff --git a/src/core/lib/security/transport/secure_endpoint.c b/src/core/lib/security/transport/secure_endpoint.c index 865a0ec4cf..5497dea640 100644 --- a/src/core/lib/security/transport/secure_endpoint.c +++ b/src/core/lib/security/transport/secure_endpoint.c @@ -34,8 +34,8 @@ #include "src/core/lib/security/transport/secure_endpoint.h" #include #include -#include -#include +#include +#include #include #include "src/core/lib/debug/trace.h" #include "src/core/lib/profiling/timers.h" diff --git a/src/core/lib/security/transport/secure_endpoint.h b/src/core/lib/security/transport/secure_endpoint.h index 986e5e9f2e..a61f40a4fa 100644 --- a/src/core/lib/security/transport/secure_endpoint.h +++ b/src/core/lib/security/transport/secure_endpoint.h @@ -34,7 +34,7 @@ #ifndef GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURE_ENDPOINT_H #define GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURE_ENDPOINT_H -#include +#include #include "src/core/lib/iomgr/endpoint.h" struct tsi_frame_protector; diff --git a/src/core/lib/security/transport/security_connector.c b/src/core/lib/security/transport/security_connector.c index 9de69f2288..cea94bfbba 100644 --- a/src/core/lib/security/transport/security_connector.c +++ b/src/core/lib/security/transport/security_connector.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include "src/core/ext/transport/chttp2/alpn/alpn.h" diff --git a/src/core/lib/security/util/b64.h b/src/core/lib/security/util/b64.h index f1b9bb2f2e..f3218b9c4f 100644 --- a/src/core/lib/security/util/b64.h +++ b/src/core/lib/security/util/b64.h @@ -34,7 +34,7 @@ #ifndef GRPC_CORE_LIB_SECURITY_UTIL_B64_H #define GRPC_CORE_LIB_SECURITY_UTIL_B64_H -#include +#include /* Encodes data using base64. It is the caller's responsability to free the returned char * using gpr_free. Returns NULL on NULL input. */ diff --git a/src/core/lib/slice/percent_encoding.h b/src/core/lib/slice/percent_encoding.h index a560d74a79..3cb4a61423 100644 --- a/src/core/lib/slice/percent_encoding.h +++ b/src/core/lib/slice/percent_encoding.h @@ -43,7 +43,7 @@ #include -#include +#include /* URL percent encoding spec bitfield (usabel as 'unreserved_bytes' in gpr_percent_encode_slice, gpr_strict_percent_decode_slice). diff --git a/src/core/lib/slice/slice.c b/src/core/lib/slice/slice.c index 602dd86eca..1db1211938 100644 --- a/src/core/lib/slice/slice.c +++ b/src/core/lib/slice/slice.c @@ -33,7 +33,7 @@ #include #include -#include +#include #include diff --git a/src/core/lib/slice/slice_buffer.c b/src/core/lib/slice/slice_buffer.c index c92797233d..a18309f3c4 100644 --- a/src/core/lib/slice/slice_buffer.c +++ b/src/core/lib/slice/slice_buffer.c @@ -32,7 +32,7 @@ */ #include -#include +#include #include diff --git a/src/core/lib/slice/slice_string_helpers.h b/src/core/lib/slice/slice_string_helpers.h index d144a70889..dea9a19025 100644 --- a/src/core/lib/slice/slice_string_helpers.h +++ b/src/core/lib/slice/slice_string_helpers.h @@ -36,9 +36,9 @@ #include +#include +#include #include -#include -#include #ifdef __cplusplus extern "C" { diff --git a/src/core/lib/support/env.h b/src/core/lib/support/env.h index ec3959bc6e..1a24216656 100644 --- a/src/core/lib/support/env.h +++ b/src/core/lib/support/env.h @@ -36,7 +36,7 @@ #include -#include +#include #ifdef __cplusplus extern "C" { diff --git a/src/core/lib/support/string.h b/src/core/lib/support/string.h index 2cd908aad6..13891d0b9e 100644 --- a/src/core/lib/support/string.h +++ b/src/core/lib/support/string.h @@ -36,9 +36,9 @@ #include +#include +#include #include -#include -#include #ifdef __cplusplus extern "C" { diff --git a/src/core/lib/support/tmpfile.h b/src/core/lib/support/tmpfile.h index 059142ab0f..8952e5ec3d 100644 --- a/src/core/lib/support/tmpfile.h +++ b/src/core/lib/support/tmpfile.h @@ -36,7 +36,7 @@ #include -#include +#include #ifdef __cplusplus extern "C" { diff --git a/src/core/lib/surface/byte_buffer_reader.c b/src/core/lib/surface/byte_buffer_reader.c index 9455709b4b..6bf3c01e65 100644 --- a/src/core/lib/surface/byte_buffer_reader.c +++ b/src/core/lib/surface/byte_buffer_reader.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include "src/core/lib/compression/message_compress.h" diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 06dc5f5942..653de714ae 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/core/lib/transport/byte_stream.h b/src/core/lib/transport/byte_stream.h index 8139782701..1fdd5b4d77 100644 --- a/src/core/lib/transport/byte_stream.h +++ b/src/core/lib/transport/byte_stream.h @@ -34,7 +34,7 @@ #ifndef GRPC_CORE_LIB_TRANSPORT_BYTE_STREAM_H #define GRPC_CORE_LIB_TRANSPORT_BYTE_STREAM_H -#include +#include #include "src/core/lib/iomgr/exec_ctx.h" /** Internal bit flag for grpc_begin_message's \a flags signaling the use of diff --git a/src/core/lib/transport/metadata.h b/src/core/lib/transport/metadata.h index 5875ffb323..c63bce8310 100644 --- a/src/core/lib/transport/metadata.h +++ b/src/core/lib/transport/metadata.h @@ -34,7 +34,7 @@ #ifndef GRPC_CORE_LIB_TRANSPORT_METADATA_H #define GRPC_CORE_LIB_TRANSPORT_METADATA_H -#include +#include #include #ifdef __cplusplus diff --git a/src/core/lib/transport/metadata_batch.h b/src/core/lib/transport/metadata_batch.h index 0424b4db98..1b5525e631 100644 --- a/src/core/lib/transport/metadata_batch.h +++ b/src/core/lib/transport/metadata_batch.h @@ -38,7 +38,7 @@ #include #include -#include +#include #include #include "src/core/lib/transport/metadata.h" diff --git a/src/cpp/client/channel_cc.cc b/src/cpp/client/channel_cc.cc index 43b3875cb3..e18f9f527c 100644 --- a/src/cpp/client/channel_cc.cc +++ b/src/cpp/client/channel_cc.cc @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include "src/core/lib/profiling/timers.h" namespace grpc { diff --git a/src/cpp/common/core_codegen.cc b/src/cpp/common/core_codegen.cc index ad874bb369..fef8cc3d22 100644 --- a/src/cpp/common/core_codegen.cc +++ b/src/cpp/common/core_codegen.cc @@ -42,8 +42,8 @@ #include #include #include -#include -#include +#include +#include #include #include "src/core/lib/profiling/timers.h" diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c index 0f725f5e23..a178776d73 100644 --- a/src/csharp/ext/grpc_csharp_ext.c +++ b/src/csharp/ext/grpc_csharp_ext.c @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/php/ext/grpc/byte_buffer.c b/src/php/ext/grpc/byte_buffer.c index 56fd11d09b..2d48841dfa 100644 --- a/src/php/ext/grpc/byte_buffer.c +++ b/src/php/ext/grpc/byte_buffer.c @@ -47,7 +47,7 @@ #include #include -#include +#include grpc_byte_buffer *string_to_byte_buffer(char *string, size_t length) { grpc_slice slice = grpc_slice_from_copied_buffer(string, length); diff --git a/src/ruby/ext/grpc/rb_byte_buffer.c b/src/ruby/ext/grpc/rb_byte_buffer.c index 511abe3fbe..f0bacc3d7c 100644 --- a/src/ruby/ext/grpc/rb_byte_buffer.c +++ b/src/ruby/ext/grpc/rb_byte_buffer.c @@ -38,7 +38,7 @@ #include #include -#include +#include #include "rb_grpc.h" grpc_byte_buffer* grpc_rb_s_to_byte_buffer(char *string, size_t length) { diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index 30962a1c79..3f1821bfe0 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -54,8 +54,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/test/core/client_channel/set_initial_connect_string_test.c b/test/core/client_channel/set_initial_connect_string_test.c index 350f2884d7..1f7dce3d87 100644 --- a/test/core/client_channel/set_initial_connect_string_test.c +++ b/test/core/client_channel/set_initial_connect_string_test.c @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include "src/core/ext/client_channel/initial_connect_string.h" diff --git a/test/core/end2end/bad_server_response_test.c b/test/core/end2end/bad_server_response_test.c index cb2030a7d7..04095807c4 100644 --- a/test/core/end2end/bad_server_response_test.c +++ b/test/core/end2end/bad_server_response_test.c @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include // #include "src/core/ext/transport/chttp2/transport/internal.h" diff --git a/test/core/end2end/fixtures/http_proxy.c b/test/core/end2end/fixtures/http_proxy.c index 88c77a5168..3616fa2723 100644 --- a/test/core/end2end/fixtures/http_proxy.c +++ b/test/core/end2end/fixtures/http_proxy.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/core/iomgr/endpoint_tests.c b/test/core/iomgr/endpoint_tests.c index 775c0a3e6b..86afdfba72 100644 --- a/test/core/iomgr/endpoint_tests.c +++ b/test/core/iomgr/endpoint_tests.c @@ -38,7 +38,7 @@ #include #include -#include +#include #include #include #include "test/core/util/test_config.h" diff --git a/test/core/iomgr/load_file_test.c b/test/core/iomgr/load_file_test.c index c7387fe7a4..b4e1b52d05 100644 --- a/test/core/iomgr/load_file_test.c +++ b/test/core/iomgr/load_file_test.c @@ -36,7 +36,7 @@ #include #include -#include +#include #include "src/core/lib/iomgr/load_file.h" #include "src/core/lib/support/string.h" diff --git a/test/core/security/b64_test.c b/test/core/security/b64_test.c index f88be392a2..b5c123b4b8 100644 --- a/test/core/security/b64_test.c +++ b/test/core/security/b64_test.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include "test/core/util/test_config.h" static int buffers_are_equal(const unsigned char *buf1, diff --git a/test/core/security/create_jwt.c b/test/core/security/create_jwt.c index 8b78dc5da5..157e78092d 100644 --- a/test/core/security/create_jwt.c +++ b/test/core/security/create_jwt.c @@ -40,7 +40,7 @@ #include #include #include -#include +#include void create_jwt(const char *json_key_file_path, const char *service_url, const char *scope) { diff --git a/test/core/security/fetch_oauth2.c b/test/core/security/fetch_oauth2.c index aa3db9f398..95706a5b81 100644 --- a/test/core/security/fetch_oauth2.c +++ b/test/core/security/fetch_oauth2.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include "src/core/lib/iomgr/load_file.h" diff --git a/test/core/security/json_token_test.c b/test/core/security/json_token_test.c index 162997662e..c5b0ae9425 100644 --- a/test/core/security/json_token_test.c +++ b/test/core/security/json_token_test.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include "src/core/lib/json/json.h" #include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h" diff --git a/test/core/security/jwt_verifier_test.c b/test/core/security/jwt_verifier_test.c index ce2ee04c99..5c716235cd 100644 --- a/test/core/security/jwt_verifier_test.c +++ b/test/core/security/jwt_verifier_test.c @@ -39,7 +39,7 @@ #include #include -#include +#include #include #include "src/core/lib/http/httpcli.h" diff --git a/test/core/security/oauth2_utils.c b/test/core/security/oauth2_utils.c index 3b774fecb6..92059bf270 100644 --- a/test/core/security/oauth2_utils.c +++ b/test/core/security/oauth2_utils.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include "src/core/lib/security/credentials/credentials.h" diff --git a/test/core/security/print_google_default_creds_token.c b/test/core/security/print_google_default_creds_token.c index a391c0876b..d239712426 100644 --- a/test/core/security/print_google_default_creds_token.c +++ b/test/core/security/print_google_default_creds_token.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include "src/core/lib/security/credentials/composite/composite_credentials.h" diff --git a/test/core/security/verify_jwt.c b/test/core/security/verify_jwt.c index 728d2d637a..4d0ff242ea 100644 --- a/test/core/security/verify_jwt.c +++ b/test/core/security/verify_jwt.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include "src/core/lib/security/credentials/jwt/jwt_verifier.h" diff --git a/test/core/slice/slice_buffer_test.c b/test/core/slice/slice_buffer_test.c index 9c55a5c473..4c26113d05 100644 --- a/test/core/slice/slice_buffer_test.c +++ b/test/core/slice/slice_buffer_test.c @@ -32,7 +32,7 @@ */ #include -#include +#include #include "test/core/util/test_config.h" void test_slice_buffer_add() { diff --git a/test/core/slice/slice_test.c b/test/core/slice/slice_test.c index c263fe27d6..19c4657cde 100644 --- a/test/core/slice/slice_test.c +++ b/test/core/slice/slice_test.c @@ -31,7 +31,7 @@ * */ -#include +#include #include diff --git a/test/core/surface/byte_buffer_reader_test.c b/test/core/surface/byte_buffer_reader_test.c index eafeb04b11..fe70f22c2b 100644 --- a/test/core/surface/byte_buffer_reader_test.c +++ b/test/core/surface/byte_buffer_reader_test.c @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include diff --git a/test/core/surface/public_headers_must_be_c89.c b/test/core/surface/public_headers_must_be_c89.c index 53bdf612fc..636a44f32a 100644 --- a/test/core/surface/public_headers_must_be_c89.c +++ b/test/core/surface/public_headers_must_be_c89.c @@ -60,8 +60,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/test/core/transport/chttp2/hpack_parser_test.c b/test/core/transport/chttp2/hpack_parser_test.c index ffea0e19e2..a051dc8cf3 100644 --- a/test/core/transport/chttp2/hpack_parser_test.c +++ b/test/core/transport/chttp2/hpack_parser_test.c @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include "test/core/util/parse_hexstring.h" #include "test/core/util/slice_splitter.h" #include "test/core/util/test_config.h" diff --git a/test/core/transport/chttp2/varint_test.c b/test/core/transport/chttp2/varint_test.c index 28cb404ce2..0d9460afc1 100644 --- a/test/core/transport/chttp2/varint_test.c +++ b/test/core/transport/chttp2/varint_test.c @@ -34,7 +34,7 @@ #include "src/core/ext/transport/chttp2/transport/varint.h" #include -#include +#include #include "test/core/util/test_config.h" diff --git a/test/core/util/parse_hexstring.h b/test/core/util/parse_hexstring.h index bfdc23299a..32a4426812 100644 --- a/test/core/util/parse_hexstring.h +++ b/test/core/util/parse_hexstring.h @@ -34,7 +34,7 @@ #ifndef GRPC_TEST_CORE_UTIL_PARSE_HEXSTRING_H #define GRPC_TEST_CORE_UTIL_PARSE_HEXSTRING_H -#include +#include grpc_slice parse_hexstring(const char *hexstring); diff --git a/test/core/util/slice_splitter.h b/test/core/util/slice_splitter.h index 9e62dfa0f3..61628092b3 100644 --- a/test/core/util/slice_splitter.h +++ b/test/core/util/slice_splitter.h @@ -37,8 +37,8 @@ /* utility function to split/merge slices together to help create test cases */ -#include -#include +#include +#include typedef enum { /* merge all input slices into a single slice */ diff --git a/test/cpp/util/byte_buffer_test.cc b/test/cpp/util/byte_buffer_test.cc index f66f471d7e..2630c76e87 100644 --- a/test/cpp/util/byte_buffer_test.cc +++ b/test/cpp/util/byte_buffer_test.cc @@ -37,7 +37,7 @@ #include #include -#include +#include #include namespace grpc { diff --git a/test/cpp/util/cli_call.cc b/test/cpp/util/cli_call.cc index e36475bc9e..0517610f10 100644 --- a/test/cpp/util/cli_call.cc +++ b/test/cpp/util/cli_call.cc @@ -42,7 +42,7 @@ #include #include #include -#include +#include namespace grpc { namespace testing { diff --git a/test/cpp/util/slice_test.cc b/test/cpp/util/slice_test.cc index 3e50700303..df8179586a 100644 --- a/test/cpp/util/slice_test.cc +++ b/test/cpp/util/slice_test.cc @@ -33,7 +33,7 @@ #include -#include +#include #include namespace grpc { -- cgit v1.2.3 From 0f310807ffa59b3c8f0459c757372478d31c3c66 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 26 Oct 2016 16:25:56 -0700 Subject: Update includes, s/gpr_dump_slice/grpc_dump_slice/g --- build.yaml | 4 ++-- src/core/ext/client_channel/uri_parser.c | 11 ++++++----- src/core/ext/lb_policy/grpclb/grpclb.c | 3 ++- src/core/ext/resolver/sockaddr/sockaddr_resolver.c | 3 ++- src/core/ext/transport/chttp2/transport/bin_decoder.c | 7 ++++--- src/core/ext/transport/chttp2/transport/chttp2_transport.c | 9 +++++---- src/core/ext/transport/chttp2/transport/frame_data.c | 5 +++-- src/core/lib/iomgr/tcp_posix.c | 9 +++++---- .../credentials/google_default/google_default_credentials.c | 3 ++- src/core/lib/security/transport/secure_endpoint.c | 13 +++++++------ src/core/lib/slice/percent_encoding.c | 4 ++-- src/core/lib/slice/slice_string_helpers.c | 10 +++++++++- src/core/lib/slice/slice_string_helpers.h | 2 +- src/core/lib/surface/call.c | 9 +++++---- src/core/lib/transport/transport.c | 5 +++-- src/core/lib/transport/transport_op_string.c | 11 ++++++----- test/core/client_channel/set_initial_connect_string_test.c | 2 +- test/core/end2end/bad_server_response_test.c | 2 +- test/core/end2end/dualstack_socket_test.c | 2 +- test/core/end2end/fake_resolver.c | 3 ++- test/core/security/print_google_default_creds_token.c | 2 +- test/core/security/security_connector_test.c | 6 +++--- test/core/slice/percent_encoding_test.c | 8 ++++---- test/core/slice/slice_string_helpers_test.c | 2 +- test/core/support/string_test.c | 2 -- test/core/transport/chttp2/bin_decoder_test.c | 11 ++++++----- test/core/transport/chttp2/bin_encoder_test.c | 10 +++++----- test/core/transport/chttp2/hpack_encoder_test.c | 4 ++-- 28 files changed, 91 insertions(+), 71 deletions(-) (limited to 'src/core/lib') diff --git a/build.yaml b/build.yaml index 799cd85c05..4513522237 100644 --- a/build.yaml +++ b/build.yaml @@ -1742,11 +1742,11 @@ targets: deps: - gpr_test_util - gpr -- name: gpr_percent_encoding_test +- name: percent_encoding_test build: test language: c src: - - test/core/support/percent_encoding_test.c + - test/core/slice/percent_encoding_test.c deps: - gpr_test_util - gpr diff --git a/src/core/ext/client_channel/uri_parser.c b/src/core/ext/client_channel/uri_parser.c index 01c348f2df..0fbc542ef8 100644 --- a/src/core/ext/client_channel/uri_parser.c +++ b/src/core/ext/client_channel/uri_parser.c @@ -35,13 +35,14 @@ #include +#include +#include #include #include #include -#include -#include #include +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" /** a size_t default value... maps to all 1's */ @@ -162,16 +163,16 @@ static void parse_query_parts(grpc_uri *uri) { uri->num_query_parts = query_parts.count; for (size_t i = 0; i < query_parts.count; i++) { grpc_slice_split(query_parts.slices[i], QUERY_PARTS_VALUE_SEPARATOR, - &query_param_parts); + &query_param_parts); GPR_ASSERT(query_param_parts.count > 0); uri->query_parts[i] = - gpr_dump_slice(query_param_parts.slices[0], GPR_DUMP_ASCII); + grpc_dump_slice(query_param_parts.slices[0], GPR_DUMP_ASCII); if (query_param_parts.count > 1) { /* TODO(dgq): only the first value after the separator is considered. * Perhaps all chars after the first separator for the query part should * be included, even if they include the separator. */ uri->query_parts_values[i] = - gpr_dump_slice(query_param_parts.slices[1], GPR_DUMP_ASCII); + grpc_dump_slice(query_param_parts.slices[1], GPR_DUMP_ASCII); } else { uri->query_parts_values[i] = NULL; } diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index 3c2b87f2cb..3514d20655 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -116,6 +116,7 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/sockaddr_utils.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" #include "src/core/lib/surface/call.h" #include "src/core/lib/surface/channel.h" @@ -1135,7 +1136,7 @@ static void res_recv_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { GPR_ASSERT(serverlist == NULL); gpr_log(GPR_ERROR, "Invalid LB response received: '%s'", - gpr_dump_slice(response_slice, GPR_DUMP_ASCII)); + grpc_dump_slice(response_slice, GPR_DUMP_ASCII)); grpc_slice_unref(response_slice); /* Disconnect from server returning invalid response. */ diff --git a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c index cd0c45e407..6f49c41700 100644 --- a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c +++ b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c @@ -45,6 +45,7 @@ #include "src/core/ext/client_channel/resolver_registry.h" #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/unix_sockets_posix.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" typedef struct { @@ -178,7 +179,7 @@ static grpc_resolver *sockaddr_create(grpc_resolver_args *args, bool errors_found = false; for (size_t i = 0; i < addresses->num_addresses; i++) { grpc_uri ith_uri = *args->uri; - char *part_str = gpr_dump_slice(path_parts.slices[i], GPR_DUMP_ASCII); + char *part_str = grpc_dump_slice(path_parts.slices[i], GPR_DUMP_ASCII); ith_uri.path = part_str; if (!parse( &ith_uri, diff --git a/src/core/ext/transport/chttp2/transport/bin_decoder.c b/src/core/ext/transport/chttp2/transport/bin_decoder.c index d8948bdfdb..f8db92dff5 100644 --- a/src/core/ext/transport/chttp2/transport/bin_decoder.c +++ b/src/core/ext/transport/chttp2/transport/bin_decoder.c @@ -34,6 +34,7 @@ #include "src/core/ext/transport/chttp2/transport/bin_decoder.h" #include #include +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" static uint8_t decode_table[] = { @@ -175,7 +176,7 @@ grpc_slice grpc_chttp2_base64_decode(grpc_slice input) { ctx.contains_tail = false; if (!grpc_base64_decode_partial(&ctx)) { - char *s = gpr_dump_slice(input, GPR_DUMP_ASCII); + char *s = grpc_dump_slice(input, GPR_DUMP_ASCII); gpr_log(GPR_ERROR, "Base64 decoding failed, input string:\n%s\n", s); gpr_free(s); grpc_slice_unref(output); @@ -187,7 +188,7 @@ grpc_slice grpc_chttp2_base64_decode(grpc_slice input) { } grpc_slice grpc_chttp2_base64_decode_with_length(grpc_slice input, - size_t output_length) { + size_t output_length) { size_t input_length = GPR_SLICE_LENGTH(input); grpc_slice output = grpc_slice_malloc(output_length); struct grpc_base64_decode_context ctx; @@ -220,7 +221,7 @@ grpc_slice grpc_chttp2_base64_decode_with_length(grpc_slice input, ctx.contains_tail = true; if (!grpc_base64_decode_partial(&ctx)) { - char *s = gpr_dump_slice(input, GPR_DUMP_ASCII); + char *s = grpc_dump_slice(input, GPR_DUMP_ASCII); gpr_log(GPR_ERROR, "Base64 decoding failed, input string:\n%s\n", s); gpr_free(s); grpc_slice_unref(output); diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 93c14217cc..98190f7fb9 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -38,9 +38,9 @@ #include #include +#include #include #include -#include #include #include @@ -51,6 +51,7 @@ #include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/workqueue.h" #include "src/core/lib/profiling/timers.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" #include "src/core/lib/transport/static_metadata.h" #include "src/core/lib/transport/timeout_encoding.h" @@ -287,7 +288,7 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, if (is_client) { grpc_slice_buffer_add(&t->outbuf, grpc_slice_from_copied_string( - GRPC_CHTTP2_CLIENT_CONNECT_STRING)); + GRPC_CHTTP2_CLIENT_CONNECT_STRING)); grpc_chttp2_initiate_write(exec_ctx, t, false, "initial_write"); } @@ -757,7 +758,7 @@ void grpc_chttp2_add_incoming_goaway(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, uint32_t goaway_error, grpc_slice goaway_text) { - char *msg = gpr_dump_slice(goaway_text, GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *msg = grpc_dump_slice(goaway_text, GPR_DUMP_HEX | GPR_DUMP_ASCII); GRPC_CHTTP2_IF_TRACING( gpr_log(GPR_DEBUG, "got goaway [%d]: %s", goaway_error, msg)); grpc_slice_unref(goaway_text); @@ -1673,7 +1674,7 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, if (optional_message) { grpc_slice_buffer_add(&t->qbuf, message_pfx); grpc_slice_buffer_add(&t->qbuf, - grpc_slice_from_copied_string(optional_message)); + grpc_slice_from_copied_string(optional_message)); } grpc_slice_buffer_add( &t->qbuf, grpc_chttp2_rst_stream_create(s->id, GRPC_CHTTP2_NO_ERROR, diff --git a/src/core/ext/transport/chttp2/transport/frame_data.c b/src/core/ext/transport/chttp2/transport/frame_data.c index 3081a03929..5700a01a9a 100644 --- a/src/core/ext/transport/chttp2/transport/frame_data.c +++ b/src/core/ext/transport/chttp2/transport/frame_data.c @@ -40,6 +40,7 @@ #include #include #include "src/core/ext/transport/chttp2/transport/internal.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" #include "src/core/lib/transport/transport.h" @@ -176,7 +177,7 @@ static grpc_error *parse_inner(grpc_exec_ctx *exec_ctx, p->error = grpc_error_set_int(p->error, GRPC_ERROR_INT_STREAM_ID, (intptr_t)s->id); gpr_free(msg); - msg = gpr_dump_slice(slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); + msg = grpc_dump_slice(slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); p->error = grpc_error_set_str(p->error, GRPC_ERROR_STR_RAW_BYTES, msg); gpr_free(msg); @@ -247,7 +248,7 @@ static grpc_error *parse_inner(grpc_exec_ctx *exec_ctx, grpc_chttp2_incoming_byte_stream_push( exec_ctx, p->parsing_frame, grpc_slice_sub(slice, (size_t)(cur - beg), - (size_t)(cur + p->frame_size - beg))); + (size_t)(cur + p->frame_size - beg))); grpc_chttp2_incoming_byte_stream_finished(exec_ctx, p->parsing_frame, GRPC_ERROR_NONE); p->parsing_frame = NULL; diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 419d23de00..a2a56d6972 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -46,9 +46,9 @@ #include #include +#include #include #include -#include #include #include #include @@ -56,6 +56,7 @@ #include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/profiling/timers.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" #ifdef GPR_HAVE_MSG_NOSIGNAL @@ -191,8 +192,8 @@ static void call_read_cb(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp, gpr_log(GPR_DEBUG, "read: error=%s", str); grpc_error_free_string(str); for (i = 0; i < tcp->incoming_buffer->count; i++) { - char *dump = gpr_dump_slice(tcp->incoming_buffer->slices[i], - GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *dump = grpc_dump_slice(tcp->incoming_buffer->slices[i], + GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_DEBUG, "READ %p (peer=%s): %s", tcp, tcp->peer_string, dump); gpr_free(dump); } @@ -451,7 +452,7 @@ static void tcp_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, for (i = 0; i < buf->count; i++) { char *data = - gpr_dump_slice(buf->slices[i], GPR_DUMP_HEX | GPR_DUMP_ASCII); + grpc_dump_slice(buf->slices[i], GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_DEBUG, "WRITE %p (peer=%s): %s", tcp, tcp->peer_string, data); gpr_free(data); } diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.c b/src/core/lib/security/credentials/google_default/google_default_credentials.c index b92f29a0d8..aaa82976fb 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.c +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.c @@ -45,6 +45,7 @@ #include "src/core/lib/iomgr/polling_entity.h" #include "src/core/lib/security/credentials/jwt/jwt_credentials.h" #include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/env.h" #include "src/core/lib/support/string.h" #include "src/core/lib/surface/api_trace.h" @@ -187,7 +188,7 @@ static grpc_error *create_default_creds_from_path( json = grpc_json_parse_string_with_len( (char *)GPR_SLICE_START_PTR(creds_data), GPR_SLICE_LENGTH(creds_data)); if (json == NULL) { - char *dump = gpr_dump_slice(creds_data, GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *dump = grpc_dump_slice(creds_data, GPR_DUMP_HEX | GPR_DUMP_ASCII); error = grpc_error_set_str(GRPC_ERROR_CREATE("Failed to parse JSON"), GRPC_ERROR_STR_RAW_BYTES, dump); gpr_free(dump); diff --git a/src/core/lib/security/transport/secure_endpoint.c b/src/core/lib/security/transport/secure_endpoint.c index 5497dea640..9acfd421a7 100644 --- a/src/core/lib/security/transport/secure_endpoint.c +++ b/src/core/lib/security/transport/secure_endpoint.c @@ -32,14 +32,15 @@ */ #include "src/core/lib/security/transport/secure_endpoint.h" -#include -#include #include #include +#include +#include #include #include "src/core/lib/debug/trace.h" #include "src/core/lib/profiling/timers.h" #include "src/core/lib/security/transport/tsi_error.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" #include "src/core/lib/tsi/transport_security_interface.h" @@ -132,8 +133,8 @@ static void call_read_cb(grpc_exec_ctx *exec_ctx, secure_endpoint *ep, if (grpc_trace_secure_endpoint) { size_t i; for (i = 0; i < ep->read_buffer->count; i++) { - char *data = gpr_dump_slice(ep->read_buffer->slices[i], - GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *data = grpc_dump_slice(ep->read_buffer->slices[i], + GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_DEBUG, "READ %p: %s", ep, data); gpr_free(data); } @@ -262,7 +263,7 @@ static void endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, if (grpc_trace_secure_endpoint) { for (i = 0; i < slices->count; i++) { char *data = - gpr_dump_slice(slices->slices[i], GPR_DUMP_HEX | GPR_DUMP_ASCII); + grpc_dump_slice(slices->slices[i], GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_DEBUG, "WRITE %p: %s", ep, data); gpr_free(data); } @@ -397,7 +398,7 @@ grpc_endpoint *grpc_secure_endpoint_create( grpc_slice_buffer_init(&ep->leftover_bytes); for (i = 0; i < leftover_nslices; i++) { grpc_slice_buffer_add(&ep->leftover_bytes, - grpc_slice_ref(leftover_slices[i])); + grpc_slice_ref(leftover_slices[i])); } ep->write_staging_buffer = grpc_slice_malloc(STAGING_BUFFER_SIZE); ep->read_staging_buffer = grpc_slice_malloc(STAGING_BUFFER_SIZE); diff --git a/src/core/lib/slice/percent_encoding.c b/src/core/lib/slice/percent_encoding.c index ae11e225e7..27a8f50a48 100644 --- a/src/core/lib/slice/percent_encoding.c +++ b/src/core/lib/slice/percent_encoding.c @@ -31,7 +31,7 @@ * */ -#include "src/core/lib/support/percent_encoding.h" +#include "src/core/lib/slice/percent_encoding.h" #include @@ -50,7 +50,7 @@ static bool is_unreserved_character(uint8_t c, } grpc_slice gpr_percent_encode_slice(grpc_slice slice, - const uint8_t *unreserved_bytes) { + const uint8_t *unreserved_bytes) { static const uint8_t hex[] = "0123456789ABCDEF"; // first pass: count the number of bytes needed to output this string diff --git a/src/core/lib/slice/slice_string_helpers.c b/src/core/lib/slice/slice_string_helpers.c index cc8b80d3b8..eaffb63686 100644 --- a/src/core/lib/slice/slice_string_helpers.c +++ b/src/core/lib/slice/slice_string_helpers.c @@ -31,7 +31,15 @@ * */ -char *gpr_dump_slice(grpc_slice s, uint32_t flags) { +#include "src/core/lib/slice/slice_string_helpers.h" + +#include + +#include + +#include "src/core/lib/support/string.h" + +char *grpc_dump_slice(grpc_slice s, uint32_t flags) { return gpr_dump((const char *)GPR_SLICE_START_PTR(s), GPR_SLICE_LENGTH(s), flags); } diff --git a/src/core/lib/slice/slice_string_helpers.h b/src/core/lib/slice/slice_string_helpers.h index dea9a19025..19625c66af 100644 --- a/src/core/lib/slice/slice_string_helpers.h +++ b/src/core/lib/slice/slice_string_helpers.h @@ -45,7 +45,7 @@ extern "C" { #endif /* Calls gpr_dump on a slice. */ -char *gpr_dump_slice(grpc_slice slice, uint32_t flags); +char *grpc_dump_slice(grpc_slice slice, uint32_t flags); /** Split \a str by the separator \a sep. Results are stored in \a dst, which * should be a properly initialized instance. */ diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 653de714ae..47f24ef58a 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -38,9 +38,9 @@ #include #include +#include #include #include -#include #include #include @@ -48,6 +48,7 @@ #include "src/core/lib/compression/algorithm_metadata.h" #include "src/core/lib/iomgr/timer.h" #include "src/core/lib/profiling/timers.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/call.h" @@ -521,7 +522,7 @@ static void set_encodings_accepted_by_peer(grpc_call *call, grpc_mdelem *mdel) { GPR_BITSET(&call->encodings_accepted_by_peer, algorithm); } else { char *accept_encoding_entry_str = - gpr_dump_slice(*accept_encoding_entry_slice, GPR_DUMP_ASCII); + grpc_dump_slice(*accept_encoding_entry_slice, GPR_DUMP_ASCII); gpr_log(GPR_ERROR, "Invalid entry in accept encoding metadata: '%s'. Ignoring.", accept_encoding_entry_str); @@ -1085,7 +1086,7 @@ static void continue_receiving_slices(grpc_exec_ctx *exec_ctx, &call->receiving_slice, remaining, &call->receiving_slice_ready)) { grpc_slice_buffer_add(&(*call->receiving_buffer)->data.raw.slice_buffer, - call->receiving_slice); + call->receiving_slice); } else { return; } @@ -1099,7 +1100,7 @@ static void receiving_slice_ready(grpc_exec_ctx *exec_ctx, void *bctlp, if (error == GRPC_ERROR_NONE) { grpc_slice_buffer_add(&(*call->receiving_buffer)->data.raw.slice_buffer, - call->receiving_slice); + call->receiving_slice); continue_receiving_slices(exec_ctx, bctl); } else { if (grpc_trace_operation_failures) { diff --git a/src/core/lib/transport/transport.c b/src/core/lib/transport/transport.c index 3ca85b12e9..866cd9ea87 100644 --- a/src/core/lib/transport/transport.c +++ b/src/core/lib/transport/transport.c @@ -40,6 +40,7 @@ #include #include +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" #include "src/core/lib/transport/transport_impl.h" @@ -217,7 +218,7 @@ void grpc_transport_stream_op_add_cancellation_with_message( } grpc_error *error; if (optional_message != NULL) { - char *msg = gpr_dump_slice(*optional_message, GPR_DUMP_ASCII); + char *msg = grpc_dump_slice(*optional_message, GPR_DUMP_ASCII); error = grpc_error_set_str(GRPC_ERROR_CREATE(msg), GRPC_ERROR_STR_GRPC_MESSAGE, msg); gpr_free(msg); @@ -242,7 +243,7 @@ void grpc_transport_stream_op_add_close(grpc_transport_stream_op *op, } grpc_error *error; if (optional_message != NULL) { - char *msg = gpr_dump_slice(*optional_message, GPR_DUMP_ASCII); + char *msg = grpc_dump_slice(*optional_message, GPR_DUMP_ASCII); error = grpc_error_set_str(GRPC_ERROR_CREATE(msg), GRPC_ERROR_STR_GRPC_MESSAGE, msg); gpr_free(msg); diff --git a/src/core/lib/transport/transport_op_string.c b/src/core/lib/transport/transport_op_string.c index 533ec52077..58d6ad508e 100644 --- a/src/core/lib/transport/transport_op_string.c +++ b/src/core/lib/transport/transport_op_string.c @@ -40,6 +40,7 @@ #include #include #include +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" #include "src/core/lib/transport/connectivity_state.h" @@ -48,12 +49,12 @@ static void put_metadata(gpr_strvec *b, grpc_mdelem *md) { gpr_strvec_add(b, gpr_strdup("key=")); - gpr_strvec_add(b, - gpr_dump_slice(md->key->slice, GPR_DUMP_HEX | GPR_DUMP_ASCII)); + gpr_strvec_add( + b, grpc_dump_slice(md->key->slice, GPR_DUMP_HEX | GPR_DUMP_ASCII)); gpr_strvec_add(b, gpr_strdup(" value=")); gpr_strvec_add( - b, gpr_dump_slice(md->value->slice, GPR_DUMP_HEX | GPR_DUMP_ASCII)); + b, grpc_dump_slice(md->value->slice, GPR_DUMP_HEX | GPR_DUMP_ASCII)); } static void put_metadata_list(gpr_strvec *b, grpc_metadata_batch md) { @@ -175,8 +176,8 @@ char *grpc_transport_op_string(grpc_transport_op *op) { first = false; char *msg = op->goaway_message == NULL ? "null" - : gpr_dump_slice(*op->goaway_message, - GPR_DUMP_ASCII | GPR_DUMP_HEX); + : grpc_dump_slice(*op->goaway_message, + GPR_DUMP_ASCII | GPR_DUMP_HEX); gpr_asprintf(&tmp, "SEND_GOAWAY:status=%d:msg=%s", op->goaway_status, msg); if (op->goaway_message != NULL) gpr_free(msg); gpr_strvec_add(&b, tmp); diff --git a/test/core/client_channel/set_initial_connect_string_test.c b/test/core/client_channel/set_initial_connect_string_test.c index 1f7dce3d87..35f8abf728 100644 --- a/test/core/client_channel/set_initial_connect_string_test.c +++ b/test/core/client_channel/set_initial_connect_string_test.c @@ -200,7 +200,7 @@ static void match_initial_magic_string(grpc_slice_buffer *buffer) { GPR_ASSERT(buffer->length >= magic_length); for (i = 0, j = 0; i < state.incoming_buffer.count && j < magic_length; i++) { char *dump = - gpr_dump_slice(state.incoming_buffer.slices[i], GPR_DUMP_ASCII); + grpc_dump_slice(state.incoming_buffer.slices[i], GPR_DUMP_ASCII); cmp_length = GPR_MIN(strlen(dump), magic_length - j); GPR_ASSERT(strncmp(dump, magic_connect_string + j, cmp_length) == 0); j += cmp_length; diff --git a/test/core/end2end/bad_server_response_test.c b/test/core/end2end/bad_server_response_test.c index 04095807c4..5ad13ae7ec 100644 --- a/test/core/end2end/bad_server_response_test.c +++ b/test/core/end2end/bad_server_response_test.c @@ -119,7 +119,7 @@ static void handle_read(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { size_t i; for (i = 0; i < state.temp_incoming_buffer.count; i++) { - char *dump = gpr_dump_slice(state.temp_incoming_buffer.slices[i], + char *dump = grpc_dump_slice(state.temp_incoming_buffer.slices[i], GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_DEBUG, "Server received: %s", dump); gpr_free(dump); diff --git a/test/core/end2end/dualstack_socket_test.c b/test/core/end2end/dualstack_socket_test.c index 5860257607..10b5e61b89 100644 --- a/test/core/end2end/dualstack_socket_test.c +++ b/test/core/end2end/dualstack_socket_test.c @@ -130,7 +130,7 @@ void test_connect(const char *server_host, const char *client_host, int port, grpc_slice_split(uri_slice, ",", &uri_parts); hosts_with_port = gpr_malloc(sizeof(char *) * uri_parts.count); for (i = 0; i < uri_parts.count; i++) { - char *uri_part_str = gpr_dump_slice(uri_parts.slices[i], GPR_DUMP_ASCII); + char *uri_part_str = grpc_dump_slice(uri_parts.slices[i], GPR_DUMP_ASCII); gpr_asprintf(&hosts_with_port[i], "%s:%d", uri_part_str, port); gpr_free(uri_part_str); } diff --git a/test/core/end2end/fake_resolver.c b/test/core/end2end/fake_resolver.c index 4687e52313..7c06462264 100644 --- a/test/core/end2end/fake_resolver.c +++ b/test/core/end2end/fake_resolver.c @@ -48,6 +48,7 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/unix_sockets_posix.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" // @@ -172,7 +173,7 @@ static grpc_resolver* fake_resolver_create(grpc_resolver_factory* factory, bool errors_found = false; for (size_t i = 0; i < addresses->num_addresses; i++) { grpc_uri ith_uri = *args->uri; - char* part_str = gpr_dump_slice(path_parts.slices[i], GPR_DUMP_ASCII); + char* part_str = grpc_dump_slice(path_parts.slices[i], GPR_DUMP_ASCII); ith_uri.path = part_str; if (!parse_ipv4( &ith_uri, diff --git a/test/core/security/print_google_default_creds_token.c b/test/core/security/print_google_default_creds_token.c index d239712426..3a04c6e3eb 100644 --- a/test/core/security/print_google_default_creds_token.c +++ b/test/core/security/print_google_default_creds_token.c @@ -62,7 +62,7 @@ static void on_metadata_response(grpc_exec_ctx *exec_ctx, void *user_data, } else { char *token; GPR_ASSERT(num_md == 1); - token = gpr_dump_slice(md_elems[0].value, GPR_DUMP_ASCII); + token = grpc_dump_slice(md_elems[0].value, GPR_DUMP_ASCII); printf("\nGot token: %s\n\n", token); gpr_free(token); } diff --git a/test/core/security/security_connector_test.c b/test/core/security/security_connector_test.c index 4692db1853..7ef182b317 100644 --- a/test/core/security/security_connector_test.c +++ b/test/core/security/security_connector_test.c @@ -369,7 +369,7 @@ static void test_default_ssl_roots(void) { gpr_setenv(GRPC_DEFAULT_SSL_ROOTS_FILE_PATH_ENV_VAR, ""); grpc_set_ssl_roots_override_callback(override_roots_success); grpc_slice roots = grpc_get_default_ssl_roots_for_testing(); - char *roots_contents = gpr_dump_slice(roots, GPR_DUMP_ASCII); + char *roots_contents = grpc_dump_slice(roots, GPR_DUMP_ASCII); grpc_slice_unref(roots); GPR_ASSERT(strcmp(roots_contents, roots_for_override_api) == 0); gpr_free(roots_contents); @@ -378,7 +378,7 @@ static void test_default_ssl_roots(void) { instead. */ gpr_setenv(GRPC_DEFAULT_SSL_ROOTS_FILE_PATH_ENV_VAR, roots_env_var_file_path); roots = grpc_get_default_ssl_roots_for_testing(); - roots_contents = gpr_dump_slice(roots, GPR_DUMP_ASCII); + roots_contents = grpc_dump_slice(roots, GPR_DUMP_ASCII); grpc_slice_unref(roots); GPR_ASSERT(strcmp(roots_contents, roots_for_env_var) == 0); gpr_free(roots_contents); @@ -387,7 +387,7 @@ static void test_default_ssl_roots(void) { the api. */ gpr_setenv(GRPC_DEFAULT_SSL_ROOTS_FILE_PATH_ENV_VAR, ""); roots = grpc_get_default_ssl_roots_for_testing(); - roots_contents = gpr_dump_slice(roots, GPR_DUMP_ASCII); + roots_contents = grpc_dump_slice(roots, GPR_DUMP_ASCII); grpc_slice_unref(roots); GPR_ASSERT(strcmp(roots_contents, roots_for_override_api) == 0); gpr_free(roots_contents); diff --git a/test/core/slice/percent_encoding_test.c b/test/core/slice/percent_encoding_test.c index e9ba8f5ec4..fc8d131cc0 100644 --- a/test/core/slice/percent_encoding_test.c +++ b/test/core/slice/percent_encoding_test.c @@ -67,10 +67,10 @@ static void test_vector(const char *raw, size_t raw_length, const char *encoded, gpr_permissive_percent_decode_slice(encoded_slice); char *raw2encoded_msg = - gpr_dump_slice(raw2encoded_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); + grpc_dump_slice(raw2encoded_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); char *encoded2raw_msg = - gpr_dump_slice(encoded2raw_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); - char *encoded2raw_permissive_msg = gpr_dump_slice( + grpc_dump_slice(encoded2raw_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *encoded2raw_permissive_msg = grpc_dump_slice( encoded2raw_permissive_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_DEBUG, "Result:\nraw2encoded = %s\nencoded2raw = %s\nencoded2raw_permissive " @@ -116,7 +116,7 @@ static void test_nonconformant_vector(const char *encoded, grpc_slice encoded2raw_permissive_slice = gpr_permissive_percent_decode_slice(encoded_slice); - char *encoded2raw_permissive_msg = gpr_dump_slice( + char *encoded2raw_permissive_msg = grpc_dump_slice( encoded2raw_permissive_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_DEBUG, "Result:\nencoded2raw_permissive = %s", encoded2raw_permissive_msg); diff --git a/test/core/slice/slice_string_helpers_test.c b/test/core/slice/slice_string_helpers_test.c index d3dbb1e7f9..caa87ed755 100644 --- a/test/core/slice/slice_string_helpers_test.c +++ b/test/core/slice/slice_string_helpers_test.c @@ -48,7 +48,7 @@ static void expect_slice_dump(grpc_slice slice, uint32_t flags, const char *result) { - char *got = gpr_dump_slice(slice, flags); + char *got = grpc_dump_slice(slice, flags); GPR_ASSERT(0 == strcmp(got, result)); gpr_free(got); grpc_slice_unref(slice); diff --git a/test/core/support/string_test.c b/test/core/support/string_test.c index 53709ed6f7..78b77fad8e 100644 --- a/test/core/support/string_test.c +++ b/test/core/support/string_test.c @@ -283,12 +283,10 @@ int main(int argc, char **argv) { grpc_test_init(argc, argv); test_strdup(); test_dump(); - test_dump_slice(); test_parse_uint32(); test_asprintf(); test_strjoin(); test_strjoin_sep(); - test_strsplit(); test_ltoa(); test_int64toa(); test_leftpad(); diff --git a/test/core/transport/chttp2/bin_decoder_test.c b/test/core/transport/chttp2/bin_decoder_test.c index 3b111934ad..7ddc30291a 100644 --- a/test/core/transport/chttp2/bin_decoder_test.c +++ b/test/core/transport/chttp2/bin_decoder_test.c @@ -38,6 +38,7 @@ #include #include #include "src/core/ext/transport/chttp2/transport/bin_encoder.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" static int all_ok = 1; @@ -45,8 +46,8 @@ static int all_ok = 1; static void expect_slice_eq(grpc_slice expected, grpc_slice slice, char *debug, int line) { if (0 != grpc_slice_cmp(slice, expected)) { - char *hs = gpr_dump_slice(slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); - char *he = gpr_dump_slice(expected, GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *hs = grpc_dump_slice(slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *he = grpc_dump_slice(expected, GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_ERROR, "FAILED:%d: %s\ngot: %s\nwant: %s", line, debug, hs, he); gpr_free(hs); @@ -72,15 +73,15 @@ static grpc_slice base64_decode(const char *s) { } static grpc_slice base64_decode_with_length(const char *s, - size_t output_length) { + size_t output_length) { grpc_slice ss = grpc_slice_from_copied_string(s); grpc_slice out = grpc_chttp2_base64_decode_with_length(ss, output_length); grpc_slice_unref(ss); return out; } -#define EXPECT_SLICE_EQ(expected, slice) \ - expect_slice_eq( \ +#define EXPECT_SLICE_EQ(expected, slice) \ + expect_slice_eq( \ grpc_slice_from_copied_buffer(expected, sizeof(expected) - 1), slice, \ #slice, __LINE__); diff --git a/test/core/transport/chttp2/bin_encoder_test.c b/test/core/transport/chttp2/bin_encoder_test.c index f7df4452ce..706eef0c9c 100644 --- a/test/core/transport/chttp2/bin_encoder_test.c +++ b/test/core/transport/chttp2/bin_encoder_test.c @@ -48,8 +48,8 @@ static int all_ok = 1; static void expect_slice_eq(grpc_slice expected, grpc_slice slice, char *debug, int line) { if (0 != grpc_slice_cmp(slice, expected)) { - char *hs = gpr_dump_slice(slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); - char *he = gpr_dump_slice(expected, GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *hs = grpc_dump_slice(slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *he = grpc_dump_slice(expected, GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_ERROR, "FAILED:%d: %s\ngot: %s\nwant: %s", line, debug, hs, he); gpr_free(hs); @@ -85,9 +85,9 @@ static void expect_combined_equiv(const char *s, size_t len, int line) { grpc_slice expect = grpc_chttp2_huffman_compress(base64); grpc_slice got = grpc_chttp2_base64_encode_and_huffman_compress_impl(input); if (0 != grpc_slice_cmp(expect, got)) { - char *t = gpr_dump_slice(input, GPR_DUMP_HEX | GPR_DUMP_ASCII); - char *e = gpr_dump_slice(expect, GPR_DUMP_HEX | GPR_DUMP_ASCII); - char *g = gpr_dump_slice(got, GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *t = grpc_dump_slice(input, GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *e = grpc_dump_slice(expect, GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *g = grpc_dump_slice(got, GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_ERROR, "FAILED:%d:\ntest: %s\ngot: %s\nwant: %s", line, t, g, e); gpr_free(t); diff --git a/test/core/transport/chttp2/hpack_encoder_test.c b/test/core/transport/chttp2/hpack_encoder_test.c index 2b4279673a..2445d91530 100644 --- a/test/core/transport/chttp2/hpack_encoder_test.c +++ b/test/core/transport/chttp2/hpack_encoder_test.c @@ -104,8 +104,8 @@ static void verify(size_t window_available, int eof, size_t expect_window_used, grpc_metadata_batch_destroy(&b); if (0 != grpc_slice_cmp(merged, expect)) { - char *expect_str = gpr_dump_slice(expect, GPR_DUMP_HEX | GPR_DUMP_ASCII); - char *got_str = gpr_dump_slice(merged, GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *expect_str = grpc_dump_slice(expect, GPR_DUMP_HEX | GPR_DUMP_ASCII); + char *got_str = grpc_dump_slice(merged, GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_ERROR, "mismatched output for %s", expected); gpr_log(GPR_ERROR, "EXPECT: %s", expect_str); gpr_log(GPR_ERROR, "GOT: %s", got_str); -- cgit v1.2.3 From a129adf13af4169b77e4917f08a595ee7d77a70b Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Wed, 26 Oct 2016 16:44:44 -0700 Subject: Remove fd from polling island before deleting it --- src/core/lib/iomgr/ev_epoll_linux.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 8381f4a63a..4358020f9b 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -1711,6 +1711,12 @@ retry: "pollset_add_fd: Raced creating new polling island. pi_new: %p " "(fd: %d, pollset: %p)", (void *)pi_new, fd->fd, (void *)pollset); + + /* No need to lock 'pi_new' here since this is a new polling island and + no one has a reference to it yet */ + polling_island_remove_all_fds_locked(pi_new, true, &error); + + /* Ref and unref so that the polling island gets deleted during unref */ PI_ADD_REF(pi_new, "dance_of_destruction"); PI_UNREF(exec_ctx, pi_new, "dance_of_destruction"); goto retry; -- cgit v1.2.3 From 485a902264dc96bad9e257611662e429adc8cb75 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Wed, 26 Oct 2016 16:46:55 -0700 Subject: minor formatting fix --- src/core/lib/iomgr/ev_epoll_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 4358020f9b..db51ec4939 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -1713,7 +1713,7 @@ retry: (void *)pi_new, fd->fd, (void *)pollset); /* No need to lock 'pi_new' here since this is a new polling island and - no one has a reference to it yet */ + * no one has a reference to it yet */ polling_island_remove_all_fds_locked(pi_new, true, &error); /* Ref and unref so that the polling island gets deleted during unref */ -- cgit v1.2.3 From e4222b4cbdc8ff1d128d35a55c2309f3e029483a Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 26 Oct 2016 17:15:30 -0700 Subject: Add incldues, fix function names --- src/core/lib/slice/percent_encoding.c | 16 ++++----- src/core/lib/slice/percent_encoding.h | 20 +++++------ test/core/end2end/bad_server_response_test.c | 9 ++--- test/core/end2end/dualstack_socket_test.c | 2 +- test/core/security/security_connector_test.c | 1 + test/core/slice/percent_decode_fuzzer.c | 10 +++--- test/core/slice/percent_encode_fuzzer.c | 10 +++--- test/core/slice/percent_encoding_test.c | 42 ++++++++++++------------ test/core/transport/chttp2/bin_encoder_test.c | 5 +-- test/core/transport/chttp2/hpack_encoder_test.c | 1 + tools/codegen/core/gen_percent_encoding_tables.c | 4 +-- 11 files changed, 62 insertions(+), 58 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/slice/percent_encoding.c b/src/core/lib/slice/percent_encoding.c index 27a8f50a48..19f5f96cc3 100644 --- a/src/core/lib/slice/percent_encoding.c +++ b/src/core/lib/slice/percent_encoding.c @@ -35,11 +35,11 @@ #include -const uint8_t gpr_url_percent_encoding_unreserved_bytes[256 / 8] = { +const uint8_t grpc_url_percent_encoding_unreserved_bytes[256 / 8] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xff, 0x03, 0xfe, 0xff, 0xff, 0x87, 0xfe, 0xff, 0xff, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; -const uint8_t gpr_compatible_percent_encoding_unreserved_bytes[256 / 8] = { +const uint8_t grpc_compatible_percent_encoding_unreserved_bytes[256 / 8] = { 0x00, 0x00, 0x00, 0x00, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; @@ -49,8 +49,8 @@ static bool is_unreserved_character(uint8_t c, return ((unreserved_bytes[c / 8] >> (c % 8)) & 1) != 0; } -grpc_slice gpr_percent_encode_slice(grpc_slice slice, - const uint8_t *unreserved_bytes) { +grpc_slice grpc_percent_encode_slice(grpc_slice slice, + const uint8_t *unreserved_bytes) { static const uint8_t hex[] = "0123456789ABCDEF"; // first pass: count the number of bytes needed to output this string @@ -97,9 +97,9 @@ static uint8_t dehex(uint8_t c) { GPR_UNREACHABLE_CODE(return 255); } -bool gpr_strict_percent_decode_slice(grpc_slice slice_in, - const uint8_t *unreserved_bytes, - grpc_slice *slice_out) { +bool grpc_strict_percent_decode_slice(grpc_slice slice_in, + const uint8_t *unreserved_bytes, + grpc_slice *slice_out) { const uint8_t *p = GPR_SLICE_START_PTR(slice_in); const uint8_t *in_end = GPR_SLICE_END_PTR(slice_in); size_t out_length = 0; @@ -137,7 +137,7 @@ bool gpr_strict_percent_decode_slice(grpc_slice slice_in, return true; } -grpc_slice gpr_permissive_percent_decode_slice(grpc_slice slice_in) { +grpc_slice grpc_permissive_percent_decode_slice(grpc_slice slice_in) { const uint8_t *p = GPR_SLICE_START_PTR(slice_in); const uint8_t *in_end = GPR_SLICE_END_PTR(slice_in); size_t out_length = 0; diff --git a/src/core/lib/slice/percent_encoding.h b/src/core/lib/slice/percent_encoding.h index 3cb4a61423..bb5b1b75bc 100644 --- a/src/core/lib/slice/percent_encoding.h +++ b/src/core/lib/slice/percent_encoding.h @@ -46,33 +46,33 @@ #include /* URL percent encoding spec bitfield (usabel as 'unreserved_bytes' in - gpr_percent_encode_slice, gpr_strict_percent_decode_slice). + grpc_percent_encode_slice, grpc_strict_percent_decode_slice). Flags [A-Za-z0-9-_.~] as unreserved bytes for the percent encoding routines */ -extern const uint8_t gpr_url_percent_encoding_unreserved_bytes[256 / 8]; +extern const uint8_t grpc_url_percent_encoding_unreserved_bytes[256 / 8]; /* URL percent encoding spec bitfield (usabel as 'unreserved_bytes' in - gpr_percent_encode_slice, gpr_strict_percent_decode_slice). + grpc_percent_encode_slice, grpc_strict_percent_decode_slice). Flags ascii7 non-control characters excluding '%' as unreserved bytes for the percent encoding routines */ -extern const uint8_t gpr_compatible_percent_encoding_unreserved_bytes[256 / 8]; +extern const uint8_t grpc_compatible_percent_encoding_unreserved_bytes[256 / 8]; /* Percent-encode a slice, returning the new slice (this cannot fail): unreserved_bytes is a bitfield indicating which bytes are considered unreserved and thus do not need percent encoding */ -grpc_slice gpr_percent_encode_slice(grpc_slice slice, - const uint8_t *unreserved_bytes); +grpc_slice grpc_percent_encode_slice(grpc_slice slice, + const uint8_t *unreserved_bytes); /* Percent-decode a slice, strictly. If the input is legal (contains no unreserved bytes, and legal % encodings), returns true and sets *slice_out to the decoded slice. If the input is not legal, returns false and leaves *slice_out untouched. unreserved_bytes is a bitfield indicating which bytes are considered unreserved and thus do not need percent encoding */ -bool gpr_strict_percent_decode_slice(grpc_slice slice_in, - const uint8_t *unreserved_bytes, - grpc_slice *slice_out); +bool grpc_strict_percent_decode_slice(grpc_slice slice_in, + const uint8_t *unreserved_bytes, + grpc_slice *slice_out); /* Percent-decode a slice, permissively. If a % triplet can not be decoded, pass it through verbatim. This cannot fail. */ -grpc_slice gpr_permissive_percent_decode_slice(grpc_slice slice_in); +grpc_slice grpc_permissive_percent_decode_slice(grpc_slice slice_in); #endif /* GRPC_CORE_LIB_SUPPORT_PERCENT_ENCODING_H */ diff --git a/test/core/end2end/bad_server_response_test.c b/test/core/end2end/bad_server_response_test.c index 5ad13ae7ec..262c4263d4 100644 --- a/test/core/end2end/bad_server_response_test.c +++ b/test/core/end2end/bad_server_response_test.c @@ -33,14 +33,15 @@ #include #include +#include #include #include #include -#include #include // #include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/lib/iomgr/sockaddr.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" #include "test/core/end2end/cq_verifier.h" #include "test/core/util/port.h" @@ -105,8 +106,8 @@ static void done_write(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { } static void handle_write(grpc_exec_ctx *exec_ctx) { - grpc_slice slice = grpc_slice_from_copied_buffer(state.response_payload, - state.response_payload_length); + grpc_slice slice = grpc_slice_from_copied_buffer( + state.response_payload, state.response_payload_length); grpc_slice_buffer_reset_and_unref(&state.outgoing_buffer); grpc_slice_buffer_add(&state.outgoing_buffer, slice); @@ -120,7 +121,7 @@ static void handle_read(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { size_t i; for (i = 0; i < state.temp_incoming_buffer.count; i++) { char *dump = grpc_dump_slice(state.temp_incoming_buffer.slices[i], - GPR_DUMP_HEX | GPR_DUMP_ASCII); + GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_DEBUG, "Server received: %s", dump); gpr_free(dump); } diff --git a/test/core/end2end/dualstack_socket_test.c b/test/core/end2end/dualstack_socket_test.c index 10b5e61b89..b8a8058b82 100644 --- a/test/core/end2end/dualstack_socket_test.c +++ b/test/core/end2end/dualstack_socket_test.c @@ -41,8 +41,8 @@ #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/socket_utils_posix.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" - #include "test/core/end2end/cq_verifier.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" diff --git a/test/core/security/security_connector_test.c b/test/core/security/security_connector_test.c index 7ef182b317..898aeb6f42 100644 --- a/test/core/security/security_connector_test.c +++ b/test/core/security/security_connector_test.c @@ -42,6 +42,7 @@ #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/security/transport/security_connector.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/env.h" #include "src/core/lib/support/string.h" #include "src/core/lib/support/tmpfile.h" diff --git a/test/core/slice/percent_decode_fuzzer.c b/test/core/slice/percent_decode_fuzzer.c index 69d74816a7..0a05b33584 100644 --- a/test/core/slice/percent_decode_fuzzer.c +++ b/test/core/slice/percent_decode_fuzzer.c @@ -49,15 +49,15 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_memory_counters_init(); grpc_slice input = grpc_slice_from_copied_buffer((const char *)data, size); grpc_slice output; - if (gpr_strict_percent_decode_slice( - input, gpr_url_percent_encoding_unreserved_bytes, &output)) { + if (grpc_strict_percent_decode_slice( + input, grpc_url_percent_encoding_unreserved_bytes, &output)) { grpc_slice_unref(output); } - if (gpr_strict_percent_decode_slice( - input, gpr_compatible_percent_encoding_unreserved_bytes, &output)) { + if (grpc_strict_percent_decode_slice( + input, grpc_compatible_percent_encoding_unreserved_bytes, &output)) { grpc_slice_unref(output); } - grpc_slice_unref(gpr_permissive_percent_decode_slice(input)); + grpc_slice_unref(grpc_permissive_percent_decode_slice(input)); grpc_slice_unref(input); counters = grpc_memory_counters_snapshot(); grpc_memory_counters_destroy(); diff --git a/test/core/slice/percent_encode_fuzzer.c b/test/core/slice/percent_encode_fuzzer.c index 99599bf16e..3aa12c2b1e 100644 --- a/test/core/slice/percent_encode_fuzzer.c +++ b/test/core/slice/percent_encode_fuzzer.c @@ -48,12 +48,12 @@ static void test(const uint8_t *data, size_t size, const uint8_t *dict) { struct grpc_memory_counters counters; grpc_memory_counters_init(); grpc_slice input = grpc_slice_from_copied_buffer((const char *)data, size); - grpc_slice output = gpr_percent_encode_slice(input, dict); + grpc_slice output = grpc_percent_encode_slice(input, dict); grpc_slice decoded_output; // encoder must always produce decodable output - GPR_ASSERT(gpr_strict_percent_decode_slice(output, dict, &decoded_output)); + GPR_ASSERT(grpc_strict_percent_decode_slice(output, dict, &decoded_output)); grpc_slice permissive_decoded_output = - gpr_permissive_percent_decode_slice(output); + grpc_permissive_percent_decode_slice(output); // and decoded output must always match the input GPR_ASSERT(grpc_slice_cmp(input, decoded_output) == 0); GPR_ASSERT(grpc_slice_cmp(input, permissive_decoded_output) == 0); @@ -67,7 +67,7 @@ static void test(const uint8_t *data, size_t size, const uint8_t *dict) { } int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { - test(data, size, gpr_url_percent_encoding_unreserved_bytes); - test(data, size, gpr_compatible_percent_encoding_unreserved_bytes); + test(data, size, grpc_url_percent_encoding_unreserved_bytes); + test(data, size, grpc_compatible_percent_encoding_unreserved_bytes); return 0; } diff --git a/test/core/slice/percent_encoding_test.c b/test/core/slice/percent_encoding_test.c index 4f5cd2a65c..d71c99f54c 100644 --- a/test/core/slice/percent_encoding_test.c +++ b/test/core/slice/percent_encoding_test.c @@ -60,12 +60,12 @@ static void test_vector(const char *raw, size_t raw_length, const char *encoded, grpc_slice raw_slice = grpc_slice_from_copied_buffer(raw, raw_length); grpc_slice encoded_slice = grpc_slice_from_copied_buffer(encoded, encoded_length); - grpc_slice raw2encoded_slice = gpr_percent_encode_slice(raw_slice, dict); + grpc_slice raw2encoded_slice = grpc_percent_encode_slice(raw_slice, dict); grpc_slice encoded2raw_slice; - GPR_ASSERT( - gpr_strict_percent_decode_slice(encoded_slice, dict, &encoded2raw_slice)); + GPR_ASSERT(grpc_strict_percent_decode_slice(encoded_slice, dict, + &encoded2raw_slice)); grpc_slice encoded2raw_permissive_slice = - gpr_permissive_percent_decode_slice(encoded_slice); + grpc_permissive_percent_decode_slice(encoded_slice); char *raw2encoded_msg = grpc_dump_slice(raw2encoded_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); @@ -112,10 +112,10 @@ static void test_nonconformant_vector(const char *encoded, grpc_slice encoded_slice = grpc_slice_from_copied_buffer(encoded, encoded_length); grpc_slice encoded2raw_slice; - GPR_ASSERT(!gpr_strict_percent_decode_slice(encoded_slice, dict, - &encoded2raw_slice)); + GPR_ASSERT(!grpc_strict_percent_decode_slice(encoded_slice, dict, + &encoded2raw_slice)); grpc_slice encoded2raw_permissive_slice = - gpr_permissive_percent_decode_slice(encoded_slice); + grpc_permissive_percent_decode_slice(encoded_slice); char *encoded2raw_permissive_msg = grpc_dump_slice( encoded2raw_permissive_slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); @@ -136,23 +136,23 @@ int main(int argc, char **argv) { TEST_VECTOR( "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~", "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.~", - gpr_url_percent_encoding_unreserved_bytes); - TEST_VECTOR("\x00", "%00", gpr_url_percent_encoding_unreserved_bytes); - TEST_VECTOR("\x01", "%01", gpr_url_percent_encoding_unreserved_bytes); - TEST_VECTOR("a b", "a%20b", gpr_url_percent_encoding_unreserved_bytes); - TEST_VECTOR(" b", "%20b", gpr_url_percent_encoding_unreserved_bytes); - TEST_VECTOR("a b", "a b", gpr_compatible_percent_encoding_unreserved_bytes); - TEST_VECTOR(" b", " b", gpr_compatible_percent_encoding_unreserved_bytes); - TEST_VECTOR("\x0f", "%0F", gpr_url_percent_encoding_unreserved_bytes); - TEST_VECTOR("\xff", "%FF", gpr_url_percent_encoding_unreserved_bytes); - TEST_VECTOR("\xee", "%EE", gpr_url_percent_encoding_unreserved_bytes); + grpc_url_percent_encoding_unreserved_bytes); + TEST_VECTOR("\x00", "%00", grpc_url_percent_encoding_unreserved_bytes); + TEST_VECTOR("\x01", "%01", grpc_url_percent_encoding_unreserved_bytes); + TEST_VECTOR("a b", "a%20b", grpc_url_percent_encoding_unreserved_bytes); + TEST_VECTOR(" b", "%20b", grpc_url_percent_encoding_unreserved_bytes); + TEST_VECTOR("a b", "a b", grpc_compatible_percent_encoding_unreserved_bytes); + TEST_VECTOR(" b", " b", grpc_compatible_percent_encoding_unreserved_bytes); + TEST_VECTOR("\x0f", "%0F", grpc_url_percent_encoding_unreserved_bytes); + TEST_VECTOR("\xff", "%FF", grpc_url_percent_encoding_unreserved_bytes); + TEST_VECTOR("\xee", "%EE", grpc_url_percent_encoding_unreserved_bytes); TEST_NONCONFORMANT_VECTOR("%", "%", - gpr_url_percent_encoding_unreserved_bytes); + grpc_url_percent_encoding_unreserved_bytes); TEST_NONCONFORMANT_VECTOR("%A", "%A", - gpr_url_percent_encoding_unreserved_bytes); + grpc_url_percent_encoding_unreserved_bytes); TEST_NONCONFORMANT_VECTOR("%AG", "%AG", - gpr_url_percent_encoding_unreserved_bytes); + grpc_url_percent_encoding_unreserved_bytes); TEST_NONCONFORMANT_VECTOR("\0", "\0", - gpr_url_percent_encoding_unreserved_bytes); + grpc_url_percent_encoding_unreserved_bytes); return 0; } diff --git a/test/core/transport/chttp2/bin_encoder_test.c b/test/core/transport/chttp2/bin_encoder_test.c index 706eef0c9c..53b55a301e 100644 --- a/test/core/transport/chttp2/bin_encoder_test.c +++ b/test/core/transport/chttp2/bin_encoder_test.c @@ -41,6 +41,7 @@ #include #include #include +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" static int all_ok = 1; @@ -74,8 +75,8 @@ static grpc_slice HUFF(const char *s) { return out; } -#define EXPECT_SLICE_EQ(expected, slice) \ - expect_slice_eq( \ +#define EXPECT_SLICE_EQ(expected, slice) \ + expect_slice_eq( \ grpc_slice_from_copied_buffer(expected, sizeof(expected) - 1), slice, \ #slice, __LINE__); diff --git a/test/core/transport/chttp2/hpack_encoder_test.c b/test/core/transport/chttp2/hpack_encoder_test.c index 2445d91530..91421e18f4 100644 --- a/test/core/transport/chttp2/hpack_encoder_test.c +++ b/test/core/transport/chttp2/hpack_encoder_test.c @@ -41,6 +41,7 @@ #include #include "src/core/ext/transport/chttp2/transport/hpack_parser.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/support/string.h" #include "src/core/lib/transport/metadata.h" #include "test/core/util/parse_hexstring.h" diff --git a/tools/codegen/core/gen_percent_encoding_tables.c b/tools/codegen/core/gen_percent_encoding_tables.c index 93f30deeb3..347c210330 100644 --- a/tools/codegen/core/gen_percent_encoding_tables.c +++ b/tools/codegen/core/gen_percent_encoding_tables.c @@ -71,14 +71,14 @@ int main(void) { legal('_'); legal('.'); legal('~'); - dump("gpr_url_percent_encoding_unreserved_bytes"); + dump("grpc_url_percent_encoding_unreserved_bytes"); clear(); for (i = 32; i <= 126; i++) { if (i == '%') continue; legal(i); } - dump("gpr_compatible_percent_encoding_unreserved_bytes"); + dump("grpc_compatible_percent_encoding_unreserved_bytes"); return 0; } -- cgit v1.2.3 From 618e67d655d8a0a345463d6e3e690e258dadd763 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 26 Oct 2016 21:08:10 -0700 Subject: s/GPR_SLICE/GRPC_SLICE/g --- include/grpc++/impl/codegen/proto_utils.h | 20 +++++------ include/grpc++/impl/codegen/thrift_serializer.h | 2 +- include/grpc++/support/slice.h | 6 ++-- include/grpc/impl/codegen/slice.h | 16 ++++----- src/core/ext/census/grpc_filter.c | 2 +- .../ext/client_channel/http_connect_handshaker.c | 4 +-- src/core/ext/lb_policy/grpclb/load_balancer_api.c | 10 +++--- .../chttp2/client/insecure/channel_create.c | 6 ++-- .../chttp2/client/secure/secure_channel_create.c | 6 ++-- .../ext/transport/chttp2/transport/bin_decoder.c | 30 ++++++++-------- .../ext/transport/chttp2/transport/bin_encoder.c | 30 ++++++++-------- .../transport/chttp2/transport/chttp2_transport.c | 22 ++++++------ .../ext/transport/chttp2/transport/frame_data.c | 6 ++-- .../ext/transport/chttp2/transport/frame_goaway.c | 12 +++---- .../ext/transport/chttp2/transport/frame_ping.c | 6 ++-- .../transport/chttp2/transport/frame_rst_stream.c | 6 ++-- .../transport/chttp2/transport/frame_settings.c | 10 +++--- .../chttp2/transport/frame_window_update.c | 6 ++-- .../ext/transport/chttp2/transport/hpack_encoder.c | 28 +++++++-------- .../ext/transport/chttp2/transport/hpack_parser.c | 8 ++--- .../ext/transport/chttp2/transport/hpack_table.c | 8 ++--- src/core/ext/transport/chttp2/transport/parsing.c | 4 +-- .../transport/cronet/transport/cronet_transport.c | 6 ++-- src/core/lib/channel/http_client_filter.c | 6 ++-- src/core/lib/compression/message_compress.c | 18 +++++----- src/core/lib/http/httpcli.c | 2 +- src/core/lib/http/parser.c | 4 +-- src/core/lib/iomgr/tcp_posix.c | 10 +++--- src/core/lib/iomgr/tcp_uv.c | 30 ++++++++-------- src/core/lib/iomgr/tcp_windows.c | 8 ++--- .../google_default/google_default_credentials.c | 2 +- .../lib/security/credentials/jwt/jwt_verifier.c | 22 ++++++------ src/core/lib/security/transport/handshake.c | 6 ++-- src/core/lib/security/transport/secure_endpoint.c | 32 ++++++++--------- .../lib/security/transport/security_connector.c | 8 ++--- .../lib/security/transport/server_auth_filter.c | 14 ++++---- src/core/lib/security/util/b64.c | 4 +-- src/core/lib/slice/percent_encoding.c | 28 +++++++-------- src/core/lib/slice/slice.c | 14 ++++---- src/core/lib/slice/slice_buffer.c | 22 ++++++------ src/core/lib/slice/slice_string_helpers.c | 8 ++--- src/core/lib/surface/byte_buffer_reader.c | 6 ++-- src/core/lib/surface/call.c | 12 +++---- src/core/lib/surface/server.c | 2 +- src/core/lib/transport/metadata.c | 28 +++++++-------- src/core/lib/transport/metadata.h | 2 +- src/csharp/ext/grpc_csharp_ext.c | 6 ++-- src/node/ext/byte_buffer.cc | 6 ++-- src/objective-c/GRPCClient/private/NSData+GRPC.m | 4 +-- src/php/ext/grpc/byte_buffer.c | 4 +-- src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi | 4 +-- src/ruby/ext/grpc/rb_byte_buffer.c | 4 +-- test/core/bad_client/tests/large_metadata.c | 2 +- test/core/bad_ssl/servers/cert.c | 4 +-- test/core/compression/message_compress_test.c | 12 +++---- test/core/end2end/cq_verifier.c | 14 ++++---- test/core/end2end/fixtures/http_proxy.c | 16 ++++----- test/core/end2end/fuzzers/api_fuzzer.c | 2 +- test/core/end2end/tests/invoke_large_request.c | 2 +- test/core/handshake/client_ssl.c | 6 ++-- test/core/handshake/server_ssl.c | 6 ++-- test/core/iomgr/endpoint_tests.c | 12 +++---- test/core/iomgr/load_file_test.c | 20 +++++------ test/core/iomgr/tcp_posix_test.c | 12 +++---- test/core/security/b64_test.c | 28 +++++++-------- test/core/security/create_jwt.c | 2 +- test/core/security/fetch_oauth2.c | 2 +- test/core/security/json_token_test.c | 18 +++++----- test/core/security/jwt_verifier_test.c | 14 ++++---- test/core/security/oauth2_utils.c | 8 ++--- test/core/security/secure_endpoint_test.c | 4 +-- test/core/security/security_connector_test.c | 2 +- test/core/slice/slice_test.c | 38 ++++++++++---------- test/core/surface/byte_buffer_reader_test.c | 42 +++++++++++----------- test/core/transport/chttp2/hpack_parser_test.c | 4 +-- test/core/transport/chttp2/varint_test.c | 2 +- test/core/transport/metadata_test.c | 2 +- test/core/util/one_corpus_entry_fuzzer.c | 2 +- test/core/util/parse_hexstring.c | 2 +- test/core/util/slice_splitter.c | 24 ++++++------- test/cpp/grpclb/grpclb_api_test.cc | 4 +-- test/cpp/grpclb/grpclb_test.cc | 4 +-- test/cpp/util/byte_buffer_test.cc | 4 +-- test/cpp/util/slice_test.cc | 4 +-- 84 files changed, 444 insertions(+), 444 deletions(-) (limited to 'src/core/lib') diff --git a/include/grpc++/impl/codegen/proto_utils.h b/include/grpc++/impl/codegen/proto_utils.h index 4885ea0ee7..d3be48984e 100644 --- a/include/grpc++/impl/codegen/proto_utils.h +++ b/include/grpc++/impl/codegen/proto_utils.h @@ -74,10 +74,10 @@ class GrpcBufferWriter GRPC_FINAL } else { slice_ = g_core_codegen_interface->grpc_slice_malloc(block_size_); } - *data = GPR_SLICE_START_PTR(slice_); + *data = GRPC_SLICE_START_PTR(slice_); // On win x64, int is only 32bit - GPR_CODEGEN_ASSERT(GPR_SLICE_LENGTH(slice_) <= INT_MAX); - byte_count_ += * size = (int)GPR_SLICE_LENGTH(slice_); + GPR_CODEGEN_ASSERT(GRPC_SLICE_LENGTH(slice_) <= INT_MAX); + byte_count_ += * size = (int)GRPC_SLICE_LENGTH(slice_); g_core_codegen_interface->grpc_slice_buffer_add(slice_buffer_, slice_); return true; } @@ -88,7 +88,7 @@ class GrpcBufferWriter GRPC_FINAL backup_slice_ = slice_; } else { backup_slice_ = g_core_codegen_interface->grpc_slice_split_tail( - &slice_, GPR_SLICE_LENGTH(slice_) - count); + &slice_, GRPC_SLICE_LENGTH(slice_) - count); g_core_codegen_interface->grpc_slice_buffer_add(slice_buffer_, slice_); } have_backup_ = true; @@ -126,7 +126,7 @@ class GrpcBufferReader GRPC_FINAL return false; } if (backup_count_ > 0) { - *data = GPR_SLICE_START_PTR(slice_) + GPR_SLICE_LENGTH(slice_) - + *data = GRPC_SLICE_START_PTR(slice_) + GRPC_SLICE_LENGTH(slice_) - backup_count_; GPR_CODEGEN_ASSERT(backup_count_ <= INT_MAX); *size = (int)backup_count_; @@ -138,10 +138,10 @@ class GrpcBufferReader GRPC_FINAL return false; } g_core_codegen_interface->grpc_slice_unref(slice_); - *data = GPR_SLICE_START_PTR(slice_); + *data = GRPC_SLICE_START_PTR(slice_); // On win x64, int is only 32bit - GPR_CODEGEN_ASSERT(GPR_SLICE_LENGTH(slice_) <= INT_MAX); - byte_count_ += * size = (int)GPR_SLICE_LENGTH(slice_); + GPR_CODEGEN_ASSERT(GRPC_SLICE_LENGTH(slice_) <= INT_MAX); + byte_count_ += * size = (int)GRPC_SLICE_LENGTH(slice_); return true; } @@ -188,8 +188,8 @@ class SerializationTraitsgrpc_slice_malloc(byte_size); GPR_CODEGEN_ASSERT( - GPR_SLICE_END_PTR(slice) == - msg.SerializeWithCachedSizesToArray(GPR_SLICE_START_PTR(slice))); + GRPC_SLICE_END_PTR(slice) == + msg.SerializeWithCachedSizesToArray(GRPC_SLICE_START_PTR(slice))); *bp = g_core_codegen_interface->grpc_raw_byte_buffer_create(&slice, 1); g_core_codegen_interface->grpc_slice_unref(slice); return g_core_codegen_interface->ok(); diff --git a/include/grpc++/impl/codegen/thrift_serializer.h b/include/grpc++/impl/codegen/thrift_serializer.h index 691ce1af48..4d3af91b02 100644 --- a/include/grpc++/impl/codegen/thrift_serializer.h +++ b/include/grpc++/impl/codegen/thrift_serializer.h @@ -159,7 +159,7 @@ class ThriftSerializer { grpc_slice slice = grpc_byte_buffer_reader_readall(&reader); uint32_t len = - Deserialize(GPR_SLICE_START_PTR(slice), GPR_SLICE_LENGTH(slice), msg); + Deserialize(GRPC_SLICE_START_PTR(slice), GRPC_SLICE_LENGTH(slice), msg); grpc_slice_unref(slice); diff --git a/include/grpc++/support/slice.h b/include/grpc++/support/slice.h index 699148ccda..6ee582275d 100644 --- a/include/grpc++/support/slice.h +++ b/include/grpc++/support/slice.h @@ -69,13 +69,13 @@ class Slice GRPC_FINAL { } /// Byte size. - size_t size() const { return GPR_SLICE_LENGTH(slice_); } + size_t size() const { return GRPC_SLICE_LENGTH(slice_); } /// Raw pointer to the beginning (first element) of the slice. - const uint8_t* begin() const { return GPR_SLICE_START_PTR(slice_); } + const uint8_t* begin() const { return GRPC_SLICE_START_PTR(slice_); } /// Raw pointer to the end (one byte \em past the last element) of the slice. - const uint8_t* end() const { return GPR_SLICE_END_PTR(slice_); } + const uint8_t* end() const { return GRPC_SLICE_END_PTR(slice_); } /// Raw C slice. Caller needs to call grpc_slice_unref when done. grpc_slice c_slice() const { return grpc_slice_ref(slice_); } diff --git a/include/grpc/impl/codegen/slice.h b/include/grpc/impl/codegen/slice.h index 79297ce23d..774ba0e95d 100644 --- a/include/grpc/impl/codegen/slice.h +++ b/include/grpc/impl/codegen/slice.h @@ -60,7 +60,7 @@ typedef struct grpc_slice_refcount { void (*unref)(void *); } grpc_slice_refcount; -#define GPR_SLICE_INLINED_SIZE (sizeof(size_t) + sizeof(uint8_t *) - 1) +#define GRPC_SLICE_INLINED_SIZE (sizeof(size_t) + sizeof(uint8_t *) - 1) /* A grpc_slice s, if initialized, represents the byte range s.bytes[0..s.length-1]. @@ -80,7 +80,7 @@ typedef struct grpc_slice { } refcounted; struct { uint8_t length; - uint8_t bytes[GPR_SLICE_INLINED_SIZE]; + uint8_t bytes[GRPC_SLICE_INLINED_SIZE]; } inlined; } data; } grpc_slice; @@ -102,17 +102,17 @@ typedef struct { grpc_slice inlined[GRPC_SLICE_BUFFER_INLINE_ELEMENTS]; } grpc_slice_buffer; -#define GPR_SLICE_START_PTR(slice) \ +#define GRPC_SLICE_START_PTR(slice) \ ((slice).refcount ? (slice).data.refcounted.bytes \ : (slice).data.inlined.bytes) -#define GPR_SLICE_LENGTH(slice) \ +#define GRPC_SLICE_LENGTH(slice) \ ((slice).refcount ? (slice).data.refcounted.length \ : (slice).data.inlined.length) -#define GPR_SLICE_SET_LENGTH(slice, newlen) \ +#define GRPC_SLICE_SET_LENGTH(slice, newlen) \ ((slice).refcount ? ((slice).data.refcounted.length = (size_t)(newlen)) \ : ((slice).data.inlined.length = (uint8_t)(newlen))) -#define GPR_SLICE_END_PTR(slice) \ - GPR_SLICE_START_PTR(slice) + GPR_SLICE_LENGTH(slice) -#define GPR_SLICE_IS_EMPTY(slice) (GPR_SLICE_LENGTH(slice) == 0) +#define GRPC_SLICE_END_PTR(slice) \ + GRPC_SLICE_START_PTR(slice) + GRPC_SLICE_LENGTH(slice) +#define GRPC_SLICE_IS_EMPTY(slice) (GRPC_SLICE_LENGTH(slice) == 0) #endif /* GRPC_IMPL_CODEGEN_SLICE_H */ diff --git a/src/core/ext/census/grpc_filter.c b/src/core/ext/census/grpc_filter.c index d84d715031..aa6d24e076 100644 --- a/src/core/ext/census/grpc_filter.c +++ b/src/core/ext/census/grpc_filter.c @@ -69,7 +69,7 @@ static void extract_and_annotate_method_tag(grpc_metadata_batch *md, for (m = md->list.head; m != NULL; m = m->next) { if (m->md->key == GRPC_MDSTR_PATH) { gpr_log(GPR_DEBUG, "%s", - (const char *)GPR_SLICE_START_PTR(m->md->value->slice)); + (const char *)GRPC_SLICE_START_PTR(m->md->value->slice)); /* Add method tag here */ } } diff --git a/src/core/ext/client_channel/http_connect_handshaker.c b/src/core/ext/client_channel/http_connect_handshaker.c index d80f710b72..6f1956add9 100644 --- a/src/core/ext/client_channel/http_connect_handshaker.c +++ b/src/core/ext/client_channel/http_connect_handshaker.c @@ -118,7 +118,7 @@ static void on_read_done(grpc_exec_ctx* exec_ctx, void* arg, } // Add buffer to parser. for (size_t i = 0; i < handshaker->read_buffer->count; ++i) { - if (GPR_SLICE_LENGTH(handshaker->read_buffer->slices[i]) > 0) { + if (GRPC_SLICE_LENGTH(handshaker->read_buffer->slices[i]) > 0) { size_t body_start_offset = 0; error = grpc_http_parser_parse(&handshaker->http_parser, handshaker->read_buffer->slices[i], @@ -132,7 +132,7 @@ static void on_read_done(grpc_exec_ctx* exec_ctx, void* arg, grpc_slice_buffer tmp_buffer; grpc_slice_buffer_init(&tmp_buffer); if (body_start_offset < - GPR_SLICE_LENGTH(handshaker->read_buffer->slices[i])) { + GRPC_SLICE_LENGTH(handshaker->read_buffer->slices[i])) { grpc_slice_buffer_add( &tmp_buffer, grpc_slice_split_tail(&handshaker->read_buffer->slices[i], diff --git a/src/core/ext/lb_policy/grpclb/load_balancer_api.c b/src/core/ext/lb_policy/grpclb/load_balancer_api.c index f3860d119d..837e9c1113 100644 --- a/src/core/ext/lb_policy/grpclb/load_balancer_api.c +++ b/src/core/ext/lb_policy/grpclb/load_balancer_api.c @@ -101,7 +101,7 @@ grpc_slice grpc_grpclb_request_encode(const grpc_grpclb_request *request) { slice = grpc_slice_malloc(encoded_length); outputstream = - pb_ostream_from_buffer(GPR_SLICE_START_PTR(slice), encoded_length); + pb_ostream_from_buffer(GRPC_SLICE_START_PTR(slice), encoded_length); GPR_ASSERT(pb_encode(&outputstream, grpc_lb_v1_LoadBalanceRequest_fields, request) != 0); return slice; @@ -115,8 +115,8 @@ typedef grpc_lb_v1_LoadBalanceResponse grpc_grpclb_response; grpc_grpclb_initial_response *grpc_grpclb_initial_response_parse( grpc_slice encoded_grpc_grpclb_response) { pb_istream_t stream = - pb_istream_from_buffer(GPR_SLICE_START_PTR(encoded_grpc_grpclb_response), - GPR_SLICE_LENGTH(encoded_grpc_grpclb_response)); + pb_istream_from_buffer(GRPC_SLICE_START_PTR(encoded_grpc_grpclb_response), + GRPC_SLICE_LENGTH(encoded_grpc_grpclb_response)); grpc_grpclb_response res; memset(&res, 0, sizeof(grpc_grpclb_response)); if (!pb_decode(&stream, grpc_lb_v1_LoadBalanceResponse_fields, &res)) { @@ -136,8 +136,8 @@ grpc_grpclb_serverlist *grpc_grpclb_response_parse_serverlist( bool status; decode_serverlist_arg arg; pb_istream_t stream = - pb_istream_from_buffer(GPR_SLICE_START_PTR(encoded_grpc_grpclb_response), - GPR_SLICE_LENGTH(encoded_grpc_grpclb_response)); + pb_istream_from_buffer(GRPC_SLICE_START_PTR(encoded_grpc_grpclb_response), + GRPC_SLICE_LENGTH(encoded_grpc_grpclb_response)); pb_istream_t stream_at_start = stream; grpc_grpclb_response res; memset(&res, 0, sizeof(grpc_grpclb_response)); diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index 03dc955b27..8e03fd82c1 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -36,9 +36,9 @@ #include #include -#include #include #include +#include #include "src/core/ext/client_channel/client_channel.h" #include "src/core/ext/client_channel/http_connect_handshaker.h" @@ -117,12 +117,12 @@ static void connected(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { connector *c = arg; grpc_endpoint *tcp = c->tcp; if (tcp != NULL) { - if (!GPR_SLICE_IS_EMPTY(c->args.initial_connect_string)) { + if (!GRPC_SLICE_IS_EMPTY(c->args.initial_connect_string)) { grpc_closure_init(&c->initial_string_sent, on_initial_connect_string_sent, c); grpc_slice_buffer_init(&c->initial_string_buffer); grpc_slice_buffer_add(&c->initial_string_buffer, - c->args.initial_connect_string); + c->args.initial_connect_string); connector_ref(arg); grpc_endpoint_write(exec_ctx, tcp, &c->initial_string_buffer, &c->initial_string_sent); diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index 7f9c365799..22d7ab0d14 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -36,9 +36,9 @@ #include #include -#include #include #include +#include #include "src/core/ext/client_channel/client_channel.h" #include "src/core/ext/client_channel/http_connect_handshaker.h" @@ -166,12 +166,12 @@ static void connected(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { GPR_ASSERT(c->connecting_endpoint == NULL); c->connecting_endpoint = tcp; gpr_mu_unlock(&c->mu); - if (!GPR_SLICE_IS_EMPTY(c->args.initial_connect_string)) { + if (!GRPC_SLICE_IS_EMPTY(c->args.initial_connect_string)) { grpc_closure_init(&c->initial_string_sent, on_initial_connect_string_sent, c); grpc_slice_buffer_init(&c->initial_string_buffer); grpc_slice_buffer_add(&c->initial_string_buffer, - c->args.initial_connect_string); + c->args.initial_connect_string); grpc_endpoint_write(exec_ctx, tcp, &c->initial_string_buffer, &c->initial_string_sent); } else { diff --git a/src/core/ext/transport/chttp2/transport/bin_decoder.c b/src/core/ext/transport/chttp2/transport/bin_decoder.c index f8db92dff5..3eef80b557 100644 --- a/src/core/ext/transport/chttp2/transport/bin_decoder.c +++ b/src/core/ext/transport/chttp2/transport/bin_decoder.c @@ -144,7 +144,7 @@ bool grpc_base64_decode_partial(struct grpc_base64_decode_context *ctx) { } grpc_slice grpc_chttp2_base64_decode(grpc_slice input) { - size_t input_length = GPR_SLICE_LENGTH(input); + size_t input_length = GRPC_SLICE_LENGTH(input); size_t output_length = input_length / 4 * 3; struct grpc_base64_decode_context ctx; grpc_slice output; @@ -159,7 +159,7 @@ grpc_slice grpc_chttp2_base64_decode(grpc_slice input) { } if (input_length > 0) { - uint8_t *input_end = GPR_SLICE_END_PTR(input); + uint8_t *input_end = GRPC_SLICE_END_PTR(input); if (*(--input_end) == '=') { output_length--; if (*(--input_end) == '=') { @@ -169,10 +169,10 @@ grpc_slice grpc_chttp2_base64_decode(grpc_slice input) { } output = grpc_slice_malloc(output_length); - ctx.input_cur = GPR_SLICE_START_PTR(input); - ctx.input_end = GPR_SLICE_END_PTR(input); - ctx.output_cur = GPR_SLICE_START_PTR(output); - ctx.output_end = GPR_SLICE_END_PTR(output); + ctx.input_cur = GRPC_SLICE_START_PTR(input); + ctx.input_end = GRPC_SLICE_END_PTR(input); + ctx.output_cur = GRPC_SLICE_START_PTR(output); + ctx.output_end = GRPC_SLICE_END_PTR(output); ctx.contains_tail = false; if (!grpc_base64_decode_partial(&ctx)) { @@ -182,14 +182,14 @@ grpc_slice grpc_chttp2_base64_decode(grpc_slice input) { grpc_slice_unref(output); return gpr_empty_slice(); } - GPR_ASSERT(ctx.output_cur == GPR_SLICE_END_PTR(output)); - GPR_ASSERT(ctx.input_cur == GPR_SLICE_END_PTR(input)); + GPR_ASSERT(ctx.output_cur == GRPC_SLICE_END_PTR(output)); + GPR_ASSERT(ctx.input_cur == GRPC_SLICE_END_PTR(input)); return output; } grpc_slice grpc_chttp2_base64_decode_with_length(grpc_slice input, size_t output_length) { - size_t input_length = GPR_SLICE_LENGTH(input); + size_t input_length = GRPC_SLICE_LENGTH(input); grpc_slice output = grpc_slice_malloc(output_length); struct grpc_base64_decode_context ctx; @@ -214,10 +214,10 @@ grpc_slice grpc_chttp2_base64_decode_with_length(grpc_slice input, return gpr_empty_slice(); } - ctx.input_cur = GPR_SLICE_START_PTR(input); - ctx.input_end = GPR_SLICE_END_PTR(input); - ctx.output_cur = GPR_SLICE_START_PTR(output); - ctx.output_end = GPR_SLICE_END_PTR(output); + ctx.input_cur = GRPC_SLICE_START_PTR(input); + ctx.input_end = GRPC_SLICE_END_PTR(input); + ctx.output_cur = GRPC_SLICE_START_PTR(output); + ctx.output_end = GRPC_SLICE_END_PTR(output); ctx.contains_tail = true; if (!grpc_base64_decode_partial(&ctx)) { @@ -227,7 +227,7 @@ grpc_slice grpc_chttp2_base64_decode_with_length(grpc_slice input, grpc_slice_unref(output); return gpr_empty_slice(); } - GPR_ASSERT(ctx.output_cur == GPR_SLICE_END_PTR(output)); - GPR_ASSERT(ctx.input_cur <= GPR_SLICE_END_PTR(input)); + GPR_ASSERT(ctx.output_cur == GRPC_SLICE_END_PTR(output)); + GPR_ASSERT(ctx.input_cur <= GRPC_SLICE_END_PTR(input)); return output; } diff --git a/src/core/ext/transport/chttp2/transport/bin_encoder.c b/src/core/ext/transport/chttp2/transport/bin_encoder.c index 09b961533a..2baa1dc97b 100644 --- a/src/core/ext/transport/chttp2/transport/bin_encoder.c +++ b/src/core/ext/transport/chttp2/transport/bin_encoder.c @@ -62,13 +62,13 @@ static const b64_huff_sym huff_alphabet[64] = { static const uint8_t tail_xtra[3] = {0, 2, 3}; grpc_slice grpc_chttp2_base64_encode(grpc_slice input) { - size_t input_length = GPR_SLICE_LENGTH(input); + size_t input_length = GRPC_SLICE_LENGTH(input); size_t input_triplets = input_length / 3; size_t tail_case = input_length % 3; size_t output_length = input_triplets * 4 + tail_xtra[tail_case]; grpc_slice output = grpc_slice_malloc(output_length); - uint8_t *in = GPR_SLICE_START_PTR(input); - char *out = (char *)GPR_SLICE_START_PTR(output); + uint8_t *in = GRPC_SLICE_START_PTR(input); + char *out = (char *)GRPC_SLICE_START_PTR(output); size_t i; /* encode full triplets */ @@ -100,8 +100,8 @@ grpc_slice grpc_chttp2_base64_encode(grpc_slice input) { break; } - GPR_ASSERT(out == (char *)GPR_SLICE_END_PTR(output)); - GPR_ASSERT(in == GPR_SLICE_END_PTR(input)); + GPR_ASSERT(out == (char *)GRPC_SLICE_END_PTR(output)); + GPR_ASSERT(in == GRPC_SLICE_END_PTR(input)); return output; } @@ -114,13 +114,13 @@ grpc_slice grpc_chttp2_huffman_compress(grpc_slice input) { uint32_t temp_length = 0; nbits = 0; - for (in = GPR_SLICE_START_PTR(input); in != GPR_SLICE_END_PTR(input); ++in) { + for (in = GRPC_SLICE_START_PTR(input); in != GRPC_SLICE_END_PTR(input); ++in) { nbits += grpc_chttp2_huffsyms[*in].length; } output = grpc_slice_malloc(nbits / 8 + (nbits % 8 != 0)); - out = GPR_SLICE_START_PTR(output); - for (in = GPR_SLICE_START_PTR(input); in != GPR_SLICE_END_PTR(input); ++in) { + out = GRPC_SLICE_START_PTR(output); + for (in = GRPC_SLICE_START_PTR(input); in != GRPC_SLICE_END_PTR(input); ++in) { int sym = *in; temp <<= grpc_chttp2_huffsyms[sym].length; temp |= grpc_chttp2_huffsyms[sym].bits; @@ -141,7 +141,7 @@ grpc_slice grpc_chttp2_huffman_compress(grpc_slice input) { (uint8_t)(0xffu >> temp_length)); } - GPR_ASSERT(out == GPR_SLICE_END_PTR(output)); + GPR_ASSERT(out == GRPC_SLICE_END_PTR(output)); return output; } @@ -176,15 +176,15 @@ static void enc_add1(huff_out *out, uint8_t a) { } grpc_slice grpc_chttp2_base64_encode_and_huffman_compress_impl(grpc_slice input) { - size_t input_length = GPR_SLICE_LENGTH(input); + size_t input_length = GRPC_SLICE_LENGTH(input); size_t input_triplets = input_length / 3; size_t tail_case = input_length % 3; size_t output_syms = input_triplets * 4 + tail_xtra[tail_case]; size_t max_output_bits = 11 * output_syms; size_t max_output_length = max_output_bits / 8 + (max_output_bits % 8 != 0); grpc_slice output = grpc_slice_malloc(max_output_length); - uint8_t *in = GPR_SLICE_START_PTR(input); - uint8_t *start_out = GPR_SLICE_START_PTR(output); + uint8_t *in = GRPC_SLICE_START_PTR(input); + uint8_t *start_out = GRPC_SLICE_START_PTR(output); huff_out out; size_t i; @@ -231,9 +231,9 @@ grpc_slice grpc_chttp2_base64_encode_and_huffman_compress_impl(grpc_slice input) (uint8_t)(0xffu >> out.temp_length)); } - GPR_ASSERT(out.out <= GPR_SLICE_END_PTR(output)); - GPR_SLICE_SET_LENGTH(output, out.out - start_out); + GPR_ASSERT(out.out <= GRPC_SLICE_END_PTR(output)); + GRPC_SLICE_SET_LENGTH(output, out.out - start_out); - GPR_ASSERT(in == GPR_SLICE_END_PTR(input)); + GPR_ASSERT(in == GRPC_SLICE_END_PTR(input)); return output; } diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 07639c1223..3df64faa1f 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -885,7 +885,7 @@ static void add_fetched_slice_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s) { s->fetched_send_message_length += - (uint32_t)GPR_SLICE_LENGTH(s->fetching_slice); + (uint32_t)GRPC_SLICE_LENGTH(s->fetching_slice); grpc_slice_buffer_add(&s->flow_controlled_buffer, s->fetching_slice); if (s->id != 0) { grpc_chttp2_become_writable(exec_ctx, t, s, true, "op.send_message"); @@ -1602,7 +1602,7 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, compression and just write the uncompressed bytes onto the wire. */ status_hdr = grpc_slice_malloc(15 + (grpc_status >= 10)); - p = GPR_SLICE_START_PTR(status_hdr); + p = GRPC_SLICE_START_PTR(status_hdr); *p++ = 0x40; /* literal header */ *p++ = 11; /* len(grpc-status) */ *p++ = 'g'; @@ -1624,8 +1624,8 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, *p++ = (uint8_t)('0' + (grpc_status / 10)); *p++ = (uint8_t)('0' + (grpc_status % 10)); } - GPR_ASSERT(p == GPR_SLICE_END_PTR(status_hdr)); - len += (uint32_t)GPR_SLICE_LENGTH(status_hdr); + GPR_ASSERT(p == GRPC_SLICE_END_PTR(status_hdr)); + len += (uint32_t)GRPC_SLICE_LENGTH(status_hdr); const char *optional_message = grpc_error_get_str(error, GRPC_ERROR_STR_GRPC_MESSAGE); @@ -1634,7 +1634,7 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, size_t msg_len = strlen(optional_message); GPR_ASSERT(msg_len < 127); message_pfx = grpc_slice_malloc(15); - p = GPR_SLICE_START_PTR(message_pfx); + p = GRPC_SLICE_START_PTR(message_pfx); *p++ = 0x40; *p++ = 12; /* len(grpc-message) */ *p++ = 'g'; @@ -1650,13 +1650,13 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, *p++ = 'g'; *p++ = 'e'; *p++ = (uint8_t)msg_len; - GPR_ASSERT(p == GPR_SLICE_END_PTR(message_pfx)); - len += (uint32_t)GPR_SLICE_LENGTH(message_pfx); + GPR_ASSERT(p == GRPC_SLICE_END_PTR(message_pfx)); + len += (uint32_t)GRPC_SLICE_LENGTH(message_pfx); len += (uint32_t)msg_len; } hdr = grpc_slice_malloc(9); - p = GPR_SLICE_START_PTR(hdr); + p = GRPC_SLICE_START_PTR(hdr); *p++ = (uint8_t)(len >> 16); *p++ = (uint8_t)(len >> 8); *p++ = (uint8_t)(len); @@ -1666,7 +1666,7 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, *p++ = (uint8_t)(s->id >> 16); *p++ = (uint8_t)(s->id >> 8); *p++ = (uint8_t)(s->id); - GPR_ASSERT(p == GPR_SLICE_END_PTR(hdr)); + GPR_ASSERT(p == GRPC_SLICE_END_PTR(hdr)); grpc_slice_buffer_add(&t->qbuf, hdr); grpc_slice_buffer_add(&t->qbuf, status_hdr); @@ -2043,11 +2043,11 @@ void grpc_chttp2_incoming_byte_stream_push(grpc_exec_ctx *exec_ctx, grpc_chttp2_incoming_byte_stream *bs, grpc_slice slice) { gpr_mu_lock(&bs->slice_mu); - if (bs->remaining_bytes < GPR_SLICE_LENGTH(slice)) { + if (bs->remaining_bytes < GRPC_SLICE_LENGTH(slice)) { incoming_byte_stream_publish_error( exec_ctx, bs, GRPC_ERROR_CREATE("Too many bytes in stream")); } else { - bs->remaining_bytes -= (uint32_t)GPR_SLICE_LENGTH(slice); + bs->remaining_bytes -= (uint32_t)GRPC_SLICE_LENGTH(slice); if (bs->on_next != NULL) { *bs->next = slice; grpc_exec_ctx_sched(exec_ctx, bs->on_next, GRPC_ERROR_NONE, NULL); diff --git a/src/core/ext/transport/chttp2/transport/frame_data.c b/src/core/ext/transport/chttp2/transport/frame_data.c index 5700a01a9a..f9b9e1b309 100644 --- a/src/core/ext/transport/chttp2/transport/frame_data.c +++ b/src/core/ext/transport/chttp2/transport/frame_data.c @@ -122,7 +122,7 @@ void grpc_chttp2_encode_data(uint32_t id, grpc_slice_buffer *inbuf, static const size_t header_size = 9; hdr = grpc_slice_malloc(header_size); - p = GPR_SLICE_START_PTR(hdr); + p = GRPC_SLICE_START_PTR(hdr); GPR_ASSERT(write_bytes < (1 << 24)); *p++ = (uint8_t)(write_bytes >> 16); *p++ = (uint8_t)(write_bytes >> 8); @@ -145,8 +145,8 @@ static grpc_error *parse_inner(grpc_exec_ctx *exec_ctx, grpc_chttp2_data_parser *p, grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_slice slice) { - uint8_t *const beg = GPR_SLICE_START_PTR(slice); - uint8_t *const end = GPR_SLICE_END_PTR(slice); + uint8_t *const beg = GRPC_SLICE_START_PTR(slice); + uint8_t *const end = GRPC_SLICE_END_PTR(slice); uint8_t *cur = beg; uint32_t message_flags; grpc_chttp2_incoming_byte_stream *incoming_byte_stream; diff --git a/src/core/ext/transport/chttp2/transport/frame_goaway.c b/src/core/ext/transport/chttp2/transport/frame_goaway.c index 16c6819aca..d99d486c1b 100644 --- a/src/core/ext/transport/chttp2/transport/frame_goaway.c +++ b/src/core/ext/transport/chttp2/transport/frame_goaway.c @@ -72,8 +72,8 @@ grpc_error *grpc_chttp2_goaway_parser_parse(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_slice slice, int is_last) { - uint8_t *const beg = GPR_SLICE_START_PTR(slice); - uint8_t *const end = GPR_SLICE_END_PTR(slice); + uint8_t *const beg = GRPC_SLICE_START_PTR(slice); + uint8_t *const end = GRPC_SLICE_END_PTR(slice); uint8_t *cur = beg; grpc_chttp2_goaway_parser *p = parser; @@ -163,10 +163,10 @@ void grpc_chttp2_goaway_append(uint32_t last_stream_id, uint32_t error_code, grpc_slice debug_data, grpc_slice_buffer *slice_buffer) { grpc_slice header = grpc_slice_malloc(9 + 4 + 4); - uint8_t *p = GPR_SLICE_START_PTR(header); + uint8_t *p = GRPC_SLICE_START_PTR(header); uint32_t frame_length; - GPR_ASSERT(GPR_SLICE_LENGTH(debug_data) < UINT32_MAX - 4 - 4); - frame_length = 4 + 4 + (uint32_t)GPR_SLICE_LENGTH(debug_data); + GPR_ASSERT(GRPC_SLICE_LENGTH(debug_data) < UINT32_MAX - 4 - 4); + frame_length = 4 + 4 + (uint32_t)GRPC_SLICE_LENGTH(debug_data); /* frame header: length */ *p++ = (uint8_t)(frame_length >> 16); @@ -191,7 +191,7 @@ void grpc_chttp2_goaway_append(uint32_t last_stream_id, uint32_t error_code, *p++ = (uint8_t)(error_code >> 16); *p++ = (uint8_t)(error_code >> 8); *p++ = (uint8_t)(error_code); - GPR_ASSERT(p == GPR_SLICE_END_PTR(header)); + GPR_ASSERT(p == GRPC_SLICE_END_PTR(header)); grpc_slice_buffer_add(slice_buffer, header); grpc_slice_buffer_add(slice_buffer, debug_data); } diff --git a/src/core/ext/transport/chttp2/transport/frame_ping.c b/src/core/ext/transport/chttp2/transport/frame_ping.c index f8d73539ae..18ecb4d1e9 100644 --- a/src/core/ext/transport/chttp2/transport/frame_ping.c +++ b/src/core/ext/transport/chttp2/transport/frame_ping.c @@ -42,7 +42,7 @@ grpc_slice grpc_chttp2_ping_create(uint8_t ack, uint8_t *opaque_8bytes) { grpc_slice slice = grpc_slice_malloc(9 + 8); - uint8_t *p = GPR_SLICE_START_PTR(slice); + uint8_t *p = GRPC_SLICE_START_PTR(slice); *p++ = 0; *p++ = 0; @@ -77,8 +77,8 @@ grpc_error *grpc_chttp2_ping_parser_parse(grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_slice slice, int is_last) { - uint8_t *const beg = GPR_SLICE_START_PTR(slice); - uint8_t *const end = GPR_SLICE_END_PTR(slice); + uint8_t *const beg = GRPC_SLICE_START_PTR(slice); + uint8_t *const end = GRPC_SLICE_END_PTR(slice); uint8_t *cur = beg; grpc_chttp2_ping_parser *p = parser; diff --git a/src/core/ext/transport/chttp2/transport/frame_rst_stream.c b/src/core/ext/transport/chttp2/transport/frame_rst_stream.c index 7def454915..75e4101035 100644 --- a/src/core/ext/transport/chttp2/transport/frame_rst_stream.c +++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.c @@ -47,7 +47,7 @@ grpc_slice grpc_chttp2_rst_stream_create(uint32_t id, uint32_t code, static const size_t frame_size = 13; grpc_slice slice = grpc_slice_malloc(frame_size); stats->framing_bytes += frame_size; - uint8_t *p = GPR_SLICE_START_PTR(slice); + uint8_t *p = GRPC_SLICE_START_PTR(slice); // Frame size. *p++ = 0; @@ -90,8 +90,8 @@ grpc_error *grpc_chttp2_rst_stream_parser_parse(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_slice slice, int is_last) { - uint8_t *const beg = GPR_SLICE_START_PTR(slice); - uint8_t *const end = GPR_SLICE_END_PTR(slice); + uint8_t *const beg = GRPC_SLICE_START_PTR(slice); + uint8_t *const end = GRPC_SLICE_END_PTR(slice); uint8_t *cur = beg; grpc_chttp2_rst_stream_parser *p = parser; diff --git a/src/core/ext/transport/chttp2/transport/frame_settings.c b/src/core/ext/transport/chttp2/transport/frame_settings.c index d9ea1f91a7..d3b235183b 100644 --- a/src/core/ext/transport/chttp2/transport/frame_settings.c +++ b/src/core/ext/transport/chttp2/transport/frame_settings.c @@ -94,7 +94,7 @@ grpc_slice grpc_chttp2_settings_create(uint32_t *old, const uint32_t *new, } output = grpc_slice_malloc(9 + 6 * n); - p = fill_header(GPR_SLICE_START_PTR(output), 6 * n, 0); + p = fill_header(GRPC_SLICE_START_PTR(output), 6 * n, 0); for (i = 0; i < count; i++) { if (new[i] != old[i] || (force_mask & (1u << i)) != 0) { @@ -109,14 +109,14 @@ grpc_slice grpc_chttp2_settings_create(uint32_t *old, const uint32_t *new, } } - GPR_ASSERT(p == GPR_SLICE_END_PTR(output)); + GPR_ASSERT(p == GRPC_SLICE_END_PTR(output)); return output; } grpc_slice grpc_chttp2_settings_ack_create(void) { grpc_slice output = grpc_slice_malloc(9); - fill_header(GPR_SLICE_START_PTR(output), 0, GRPC_CHTTP2_FLAG_ACK); + fill_header(GRPC_SLICE_START_PTR(output), 0, GRPC_CHTTP2_FLAG_ACK); return output; } @@ -148,8 +148,8 @@ grpc_error *grpc_chttp2_settings_parser_parse(grpc_exec_ctx *exec_ctx, void *p, grpc_chttp2_stream *s, grpc_slice slice, int is_last) { grpc_chttp2_settings_parser *parser = p; - const uint8_t *cur = GPR_SLICE_START_PTR(slice); - const uint8_t *end = GPR_SLICE_END_PTR(slice); + const uint8_t *cur = GRPC_SLICE_START_PTR(slice); + const uint8_t *end = GRPC_SLICE_END_PTR(slice); char *msg; if (parser->is_ack) { diff --git a/src/core/ext/transport/chttp2/transport/frame_window_update.c b/src/core/ext/transport/chttp2/transport/frame_window_update.c index b32f1403e1..31a31c2871 100644 --- a/src/core/ext/transport/chttp2/transport/frame_window_update.c +++ b/src/core/ext/transport/chttp2/transport/frame_window_update.c @@ -43,7 +43,7 @@ grpc_slice grpc_chttp2_window_update_create( static const size_t frame_size = 13; grpc_slice slice = grpc_slice_malloc(frame_size); stats->header_bytes += frame_size; - uint8_t *p = GPR_SLICE_START_PTR(slice); + uint8_t *p = GRPC_SLICE_START_PTR(slice); GPR_ASSERT(window_update); @@ -82,8 +82,8 @@ grpc_error *grpc_chttp2_window_update_parser_begin_frame( grpc_error *grpc_chttp2_window_update_parser_parse( grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_slice slice, int is_last) { - uint8_t *const beg = GPR_SLICE_START_PTR(slice); - uint8_t *const end = GPR_SLICE_END_PTR(slice); + uint8_t *const beg = GRPC_SLICE_START_PTR(slice); + uint8_t *const end = GRPC_SLICE_END_PTR(slice); uint8_t *cur = beg; grpc_chttp2_window_update_parser *p = parser; diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.c b/src/core/ext/transport/chttp2/transport/hpack_encoder.c index d8de7d0719..3c5bcd3412 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_encoder.c +++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.c @@ -104,7 +104,7 @@ static void finish_frame(framer_state *st, int is_header_boundary, type = st->is_first_frame ? GRPC_CHTTP2_FRAME_HEADER : GRPC_CHTTP2_FRAME_CONTINUATION; fill_header( - GPR_SLICE_START_PTR(st->output->slices[st->header_idx]), type, + GRPC_SLICE_START_PTR(st->output->slices[st->header_idx]), type, st->stream_id, st->output->length - st->output_length_at_start_of_frame, (uint8_t)((is_last_in_stream ? GRPC_CHTTP2_DATA_FLAG_END_STREAM : 0) | (is_header_boundary ? GRPC_CHTTP2_DATA_FLAG_END_HEADERS : 0))); @@ -148,7 +148,7 @@ static void inc_filter(uint8_t idx, uint32_t *sum, uint8_t *elems) { } static void add_header_data(framer_state *st, grpc_slice slice) { - size_t len = GPR_SLICE_LENGTH(slice); + size_t len = GRPC_SLICE_LENGTH(slice); size_t remaining; if (len == 0) return; remaining = st->max_frame_size + st->output_length_at_start_of_frame - @@ -269,8 +269,8 @@ static void emit_indexed(grpc_chttp2_hpack_compressor *c, uint32_t elem_index, } static grpc_slice get_wire_value(grpc_mdelem *elem, uint8_t *huffman_prefix) { - if (grpc_is_binary_header((const char *)GPR_SLICE_START_PTR(elem->key->slice), - GPR_SLICE_LENGTH(elem->key->slice))) { + if (grpc_is_binary_header((const char *)GRPC_SLICE_START_PTR(elem->key->slice), + GRPC_SLICE_LENGTH(elem->key->slice))) { *huffman_prefix = 0x80; return grpc_mdstr_as_base64_encoded_and_huffman_compressed(elem->value); } @@ -285,7 +285,7 @@ static void emit_lithdr_incidx(grpc_chttp2_hpack_compressor *c, uint32_t len_pfx = GRPC_CHTTP2_VARINT_LENGTH(key_index, 2); uint8_t huffman_prefix; grpc_slice value_slice = get_wire_value(elem, &huffman_prefix); - size_t len_val = GPR_SLICE_LENGTH(value_slice); + size_t len_val = GRPC_SLICE_LENGTH(value_slice); uint32_t len_val_len; GPR_ASSERT(len_val <= UINT32_MAX); len_val_len = GRPC_CHTTP2_VARINT_LENGTH((uint32_t)len_val, 1); @@ -302,7 +302,7 @@ static void emit_lithdr_noidx(grpc_chttp2_hpack_compressor *c, uint32_t len_pfx = GRPC_CHTTP2_VARINT_LENGTH(key_index, 4); uint8_t huffman_prefix; grpc_slice value_slice = get_wire_value(elem, &huffman_prefix); - size_t len_val = GPR_SLICE_LENGTH(value_slice); + size_t len_val = GRPC_SLICE_LENGTH(value_slice); uint32_t len_val_len; GPR_ASSERT(len_val <= UINT32_MAX); len_val_len = GRPC_CHTTP2_VARINT_LENGTH((uint32_t)len_val, 1); @@ -315,14 +315,14 @@ static void emit_lithdr_noidx(grpc_chttp2_hpack_compressor *c, static void emit_lithdr_incidx_v(grpc_chttp2_hpack_compressor *c, grpc_mdelem *elem, framer_state *st) { - uint32_t len_key = (uint32_t)GPR_SLICE_LENGTH(elem->key->slice); + uint32_t len_key = (uint32_t)GRPC_SLICE_LENGTH(elem->key->slice); uint8_t huffman_prefix; grpc_slice value_slice = get_wire_value(elem, &huffman_prefix); - uint32_t len_val = (uint32_t)GPR_SLICE_LENGTH(value_slice); + uint32_t len_val = (uint32_t)GRPC_SLICE_LENGTH(value_slice); uint32_t len_key_len = GRPC_CHTTP2_VARINT_LENGTH(len_key, 1); uint32_t len_val_len = GRPC_CHTTP2_VARINT_LENGTH(len_val, 1); GPR_ASSERT(len_key <= UINT32_MAX); - GPR_ASSERT(GPR_SLICE_LENGTH(value_slice) <= UINT32_MAX); + GPR_ASSERT(GRPC_SLICE_LENGTH(value_slice) <= UINT32_MAX); *add_tiny_header_data(st, 1) = 0x40; GRPC_CHTTP2_WRITE_VARINT(len_key, 1, 0x00, add_tiny_header_data(st, len_key_len), len_key_len); @@ -334,14 +334,14 @@ static void emit_lithdr_incidx_v(grpc_chttp2_hpack_compressor *c, static void emit_lithdr_noidx_v(grpc_chttp2_hpack_compressor *c, grpc_mdelem *elem, framer_state *st) { - uint32_t len_key = (uint32_t)GPR_SLICE_LENGTH(elem->key->slice); + uint32_t len_key = (uint32_t)GRPC_SLICE_LENGTH(elem->key->slice); uint8_t huffman_prefix; grpc_slice value_slice = get_wire_value(elem, &huffman_prefix); - uint32_t len_val = (uint32_t)GPR_SLICE_LENGTH(value_slice); + uint32_t len_val = (uint32_t)GRPC_SLICE_LENGTH(value_slice); uint32_t len_key_len = GRPC_CHTTP2_VARINT_LENGTH(len_key, 1); uint32_t len_val_len = GRPC_CHTTP2_VARINT_LENGTH(len_val, 1); GPR_ASSERT(len_key <= UINT32_MAX); - GPR_ASSERT(GPR_SLICE_LENGTH(value_slice) <= UINT32_MAX); + GPR_ASSERT(GRPC_SLICE_LENGTH(value_slice) <= UINT32_MAX); *add_tiny_header_data(st, 1) = 0x00; GRPC_CHTTP2_WRITE_VARINT(len_key, 1, 0x00, add_tiny_header_data(st, len_key_len), len_key_len); @@ -373,8 +373,8 @@ static void hpack_enc(grpc_chttp2_hpack_compressor *c, grpc_mdelem *elem, uint32_t indices_key; int should_add_elem; - GPR_ASSERT(GPR_SLICE_LENGTH(elem->key->slice) > 0); - if (GPR_SLICE_START_PTR(elem->key->slice)[0] != ':') { /* regular header */ + GPR_ASSERT(GRPC_SLICE_LENGTH(elem->key->slice) > 0); + if (GRPC_SLICE_START_PTR(elem->key->slice)[0] != ':') { /* regular header */ st->seen_regular_header = 1; } else { GPR_ASSERT( diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.c b/src/core/ext/transport/chttp2/transport/hpack_parser.c index 0e721b181a..3c1c6ba5a6 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parser.c +++ b/src/core/ext/transport/chttp2/transport/hpack_parser.c @@ -1502,8 +1502,8 @@ static grpc_error *is_binary_indexed_header(grpc_chttp2_hpack_parser *p, GRPC_ERROR_INT_SIZE, (intptr_t)p->table.num_ents); } *is = - grpc_is_binary_header((const char *)GPR_SLICE_START_PTR(elem->key->slice), - GPR_SLICE_LENGTH(elem->key->slice)); + grpc_is_binary_header((const char *)GRPC_SLICE_START_PTR(elem->key->slice), + GRPC_SLICE_LENGTH(elem->key->slice)); return GRPC_ERROR_NONE; } @@ -1586,10 +1586,10 @@ grpc_error *grpc_chttp2_header_parser_parse(grpc_exec_ctx *exec_ctx, grpc_chttp2_hpack_parser *parser = hpack_parser; GPR_TIMER_BEGIN("grpc_chttp2_hpack_parser_parse", 0); if (s != NULL) { - s->stats.incoming.header_bytes += GPR_SLICE_LENGTH(slice); + s->stats.incoming.header_bytes += GRPC_SLICE_LENGTH(slice); } grpc_error *error = grpc_chttp2_hpack_parser_parse( - exec_ctx, parser, GPR_SLICE_START_PTR(slice), GPR_SLICE_END_PTR(slice)); + exec_ctx, parser, GRPC_SLICE_START_PTR(slice), GRPC_SLICE_END_PTR(slice)); if (error != GRPC_ERROR_NONE) { GPR_TIMER_END("grpc_chttp2_hpack_parser_parse", 0); return error; diff --git a/src/core/ext/transport/chttp2/transport/hpack_table.c b/src/core/ext/transport/chttp2/transport/hpack_table.c index 2b73ec969e..2dc793d304 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_table.c +++ b/src/core/ext/transport/chttp2/transport/hpack_table.c @@ -226,8 +226,8 @@ grpc_mdelem *grpc_chttp2_hptbl_lookup(const grpc_chttp2_hptbl *tbl, /* Evict one element from the table */ static void evict1(grpc_chttp2_hptbl *tbl) { grpc_mdelem *first_ent = tbl->ents[tbl->first_ent]; - size_t elem_bytes = GPR_SLICE_LENGTH(first_ent->key->slice) + - GPR_SLICE_LENGTH(first_ent->value->slice) + + size_t elem_bytes = GRPC_SLICE_LENGTH(first_ent->key->slice) + + GRPC_SLICE_LENGTH(first_ent->value->slice) + GRPC_CHTTP2_HPACK_ENTRY_OVERHEAD; GPR_ASSERT(elem_bytes <= tbl->mem_used); tbl->mem_used -= (uint32_t)elem_bytes; @@ -298,8 +298,8 @@ grpc_error *grpc_chttp2_hptbl_set_current_table_size(grpc_chttp2_hptbl *tbl, grpc_error *grpc_chttp2_hptbl_add(grpc_chttp2_hptbl *tbl, grpc_mdelem *md) { /* determine how many bytes of buffer this entry represents */ - size_t elem_bytes = GPR_SLICE_LENGTH(md->key->slice) + - GPR_SLICE_LENGTH(md->value->slice) + + size_t elem_bytes = GRPC_SLICE_LENGTH(md->key->slice) + + GRPC_SLICE_LENGTH(md->value->slice) + GRPC_CHTTP2_HPACK_ENTRY_OVERHEAD; if (tbl->current_table_bytes > tbl->max_bytes) { diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index 6941a1e397..cb88fd5baf 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -73,8 +73,8 @@ static grpc_error *parse_frame_slice(grpc_exec_ctx *exec_ctx, grpc_error *grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_slice slice) { - uint8_t *beg = GPR_SLICE_START_PTR(slice); - uint8_t *end = GPR_SLICE_END_PTR(slice); + uint8_t *beg = GRPC_SLICE_START_PTR(slice); + uint8_t *end = GRPC_SLICE_END_PTR(slice); uint8_t *cur = beg; grpc_error *err; diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 6f55b69c84..73fda07ee1 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -521,7 +521,7 @@ static void create_grpc_frame(grpc_slice_buffer *write_slice_buffer, char **pp_write_buffer, size_t *p_write_buffer_size) { grpc_slice slice = grpc_slice_buffer_take_first(write_slice_buffer); - size_t length = GPR_SLICE_LENGTH(slice); + size_t length = GRPC_SLICE_LENGTH(slice); *p_write_buffer_size = length + GRPC_HEADER_SIZE_IN_BYTES; /* This is freed in the on_write_completed callback */ char *write_buffer = gpr_malloc(length + GRPC_HEADER_SIZE_IN_BYTES); @@ -534,7 +534,7 @@ static void create_grpc_frame(grpc_slice_buffer *write_slice_buffer, *p++ = (uint8_t)(length >> 8); *p++ = (uint8_t)(length); /* append actual data */ - memcpy(p, GPR_SLICE_START_PTR(slice), length); + memcpy(p, GRPC_SLICE_START_PTR(slice), length); } /* @@ -920,7 +920,7 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx, CRONET_LOG(GPR_DEBUG, "read operation complete"); grpc_slice read_data_slice = grpc_slice_malloc((uint32_t)stream_state->rs.length_field); - uint8_t *dst_p = GPR_SLICE_START_PTR(read_data_slice); + uint8_t *dst_p = GRPC_SLICE_START_PTR(read_data_slice); memcpy(dst_p, stream_state->rs.read_buffer, (size_t)stream_state->rs.length_field); free_read_buffer(s); diff --git a/src/core/lib/channel/http_client_filter.c b/src/core/lib/channel/http_client_filter.c index 110c1cb546..0714f31bdd 100644 --- a/src/core/lib/channel/http_client_filter.c +++ b/src/core/lib/channel/http_client_filter.c @@ -176,9 +176,9 @@ static void continue_send_message(grpc_exec_ctx *exec_ctx, while (grpc_byte_stream_next(exec_ctx, calld->send_op.send_message, &calld->incoming_slice, ~(size_t)0, &calld->got_slice)) { - memcpy(wrptr, GPR_SLICE_START_PTR(calld->incoming_slice), - GPR_SLICE_LENGTH(calld->incoming_slice)); - wrptr += GPR_SLICE_LENGTH(calld->incoming_slice); + memcpy(wrptr, GRPC_SLICE_START_PTR(calld->incoming_slice), + GRPC_SLICE_LENGTH(calld->incoming_slice)); + wrptr += GRPC_SLICE_LENGTH(calld->incoming_slice); grpc_slice_buffer_add(&calld->slices, calld->incoming_slice); if (calld->send_length == calld->slices.length) { calld->send_message_blocked = false; diff --git a/src/core/lib/compression/message_compress.c b/src/core/lib/compression/message_compress.c index 501cb8be69..6c245acf61 100644 --- a/src/core/lib/compression/message_compress.c +++ b/src/core/lib/compression/message_compress.c @@ -51,22 +51,22 @@ static int zlib_body(z_stream* zs, grpc_slice_buffer* input, grpc_slice outbuf = grpc_slice_malloc(OUTPUT_BLOCK_SIZE); const uInt uint_max = ~(uInt)0; - GPR_ASSERT(GPR_SLICE_LENGTH(outbuf) <= uint_max); - zs->avail_out = (uInt)GPR_SLICE_LENGTH(outbuf); - zs->next_out = GPR_SLICE_START_PTR(outbuf); + GPR_ASSERT(GRPC_SLICE_LENGTH(outbuf) <= uint_max); + zs->avail_out = (uInt)GRPC_SLICE_LENGTH(outbuf); + zs->next_out = GRPC_SLICE_START_PTR(outbuf); flush = Z_NO_FLUSH; for (i = 0; i < input->count; i++) { if (i == input->count - 1) flush = Z_FINISH; - GPR_ASSERT(GPR_SLICE_LENGTH(input->slices[i]) <= uint_max); - zs->avail_in = (uInt)GPR_SLICE_LENGTH(input->slices[i]); - zs->next_in = GPR_SLICE_START_PTR(input->slices[i]); + GPR_ASSERT(GRPC_SLICE_LENGTH(input->slices[i]) <= uint_max); + zs->avail_in = (uInt)GRPC_SLICE_LENGTH(input->slices[i]); + zs->next_in = GRPC_SLICE_START_PTR(input->slices[i]); do { if (zs->avail_out == 0) { grpc_slice_buffer_add_indexed(output, outbuf); outbuf = grpc_slice_malloc(OUTPUT_BLOCK_SIZE); - GPR_ASSERT(GPR_SLICE_LENGTH(outbuf) <= uint_max); - zs->avail_out = (uInt)GPR_SLICE_LENGTH(outbuf); - zs->next_out = GPR_SLICE_START_PTR(outbuf); + GPR_ASSERT(GRPC_SLICE_LENGTH(outbuf) <= uint_max); + zs->avail_out = (uInt)GRPC_SLICE_LENGTH(outbuf); + zs->next_out = GRPC_SLICE_START_PTR(outbuf); } r = flate(zs, flush); if (r < 0 && r != Z_BUF_ERROR /* not fatal */) { diff --git a/src/core/lib/http/httpcli.c b/src/core/lib/http/httpcli.c index 31294efcc6..fdb8abaa2d 100644 --- a/src/core/lib/http/httpcli.c +++ b/src/core/lib/http/httpcli.c @@ -144,7 +144,7 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, size_t i; for (i = 0; i < req->incoming.count; i++) { - if (GPR_SLICE_LENGTH(req->incoming.slices[i])) { + if (GRPC_SLICE_LENGTH(req->incoming.slices[i])) { req->have_read_byte = 1; grpc_error *err = grpc_http_parser_parse(&req->parser, req->incoming.slices[i], NULL); diff --git a/src/core/lib/http/parser.c b/src/core/lib/http/parser.c index 14abb1da69..2f84adc187 100644 --- a/src/core/lib/http/parser.c +++ b/src/core/lib/http/parser.c @@ -335,10 +335,10 @@ void grpc_http_response_destroy(grpc_http_response *response) { grpc_error *grpc_http_parser_parse(grpc_http_parser *parser, grpc_slice slice, size_t *start_of_body) { - for (size_t i = 0; i < GPR_SLICE_LENGTH(slice); i++) { + for (size_t i = 0; i < GRPC_SLICE_LENGTH(slice); i++) { bool found_body_start = false; grpc_error *err = - addbyte(parser, GPR_SLICE_START_PTR(slice)[i], &found_body_start); + addbyte(parser, GRPC_SLICE_START_PTR(slice)[i], &found_body_start); if (err != GRPC_ERROR_NONE) return err; if (found_body_start && start_of_body != NULL) *start_of_body = i + 1; } diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 0d8bd04af9..584fc2fe2e 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -217,8 +217,8 @@ static void tcp_do_read(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { GPR_TIMER_BEGIN("tcp_continue_read", 0); for (i = 0; i < tcp->incoming_buffer->count; i++) { - iov[i].iov_base = GPR_SLICE_START_PTR(tcp->incoming_buffer->slices[i]); - iov[i].iov_len = GPR_SLICE_LENGTH(tcp->incoming_buffer->slices[i]); + iov[i].iov_base = GRPC_SLICE_START_PTR(tcp->incoming_buffer->slices[i]); + iov[i].iov_len = GRPC_SLICE_LENGTH(tcp->incoming_buffer->slices[i]); } msg.msg_name = NULL; @@ -348,11 +348,11 @@ static bool tcp_flush(grpc_tcp *tcp, grpc_error **error) { iov_size != MAX_WRITE_IOVEC; iov_size++) { iov[iov_size].iov_base = - GPR_SLICE_START_PTR( + GRPC_SLICE_START_PTR( tcp->outgoing_buffer->slices[tcp->outgoing_slice_idx]) + tcp->outgoing_byte_idx; iov[iov_size].iov_len = - GPR_SLICE_LENGTH( + GRPC_SLICE_LENGTH( tcp->outgoing_buffer->slices[tcp->outgoing_slice_idx]) - tcp->outgoing_byte_idx; sending_length += iov[iov_size].iov_len; @@ -393,7 +393,7 @@ static bool tcp_flush(grpc_tcp *tcp, grpc_error **error) { size_t slice_length; tcp->outgoing_slice_idx--; - slice_length = GPR_SLICE_LENGTH( + slice_length = GRPC_SLICE_LENGTH( tcp->outgoing_buffer->slices[tcp->outgoing_slice_idx]); if (slice_length > trailing) { tcp->outgoing_byte_idx = slice_length - trailing; diff --git a/src/core/lib/iomgr/tcp_uv.c b/src/core/lib/iomgr/tcp_uv.c index 05d6eeb240..f44829959d 100644 --- a/src/core/lib/iomgr/tcp_uv.c +++ b/src/core/lib/iomgr/tcp_uv.c @@ -59,9 +59,9 @@ typedef struct { grpc_closure *read_cb; grpc_closure *write_cb; - gpr_slice read_slice; - gpr_slice_buffer *read_slices; - gpr_slice_buffer *write_slices; + GRPC_SLICE read_slice; + GRPC_SLICE_buffer *read_slices; + GRPC_SLICE_buffer *write_slices; uv_buf_t *write_buffers; bool shutting_down; @@ -108,14 +108,14 @@ static void alloc_uv_buf(uv_handle_t *handle, size_t suggested_size, uv_buf_t *buf) { grpc_tcp *tcp = handle->data; (void)suggested_size; - tcp->read_slice = gpr_slice_malloc(GRPC_TCP_DEFAULT_READ_SLICE_SIZE); - buf->base = (char *)GPR_SLICE_START_PTR(tcp->read_slice); - buf->len = GPR_SLICE_LENGTH(tcp->read_slice); + tcp->read_slice = GRPC_SLICE_malloc(GRPC_TCP_DEFAULT_READ_SLICE_SIZE); + buf->base = (char *)GRPC_SLICE_START_PTR(tcp->read_slice); + buf->len = GRPC_SLICE_LENGTH(tcp->read_slice); } static void read_callback(uv_stream_t *stream, ssize_t nread, const uv_buf_t *buf) { - gpr_slice sub; + GRPC_SLICE sub; grpc_error *error; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_tcp *tcp = stream->data; @@ -132,8 +132,8 @@ static void read_callback(uv_stream_t *stream, ssize_t nread, error = GRPC_ERROR_CREATE("EOF"); } else if (nread > 0) { // Successful read - sub = gpr_slice_sub_no_ref(tcp->read_slice, 0, (size_t)nread); - gpr_slice_buffer_add(tcp->read_slices, sub); + sub = GRPC_SLICE_sub_no_ref(tcp->read_slice, 0, (size_t)nread); + GRPC_SLICE_buffer_add(tcp->read_slices, sub); error = GRPC_ERROR_NONE; if (grpc_tcp_trace) { size_t i; @@ -157,14 +157,14 @@ static void read_callback(uv_stream_t *stream, ssize_t nread, } static void uv_endpoint_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, - gpr_slice_buffer *read_slices, grpc_closure *cb) { + GRPC_SLICE_buffer *read_slices, grpc_closure *cb) { grpc_tcp *tcp = (grpc_tcp *)ep; int status; grpc_error *error = GRPC_ERROR_NONE; GPR_ASSERT(tcp->read_cb == NULL); tcp->read_cb = cb; tcp->read_slices = read_slices; - gpr_slice_buffer_reset_and_unref(read_slices); + GRPC_SLICE_buffer_reset_and_unref(read_slices); TCP_REF(tcp, "read"); // TODO(murgatroid99): figure out what the return value here means status = @@ -204,13 +204,13 @@ static void write_callback(uv_write_t *req, int status) { } static void uv_endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, - gpr_slice_buffer *write_slices, + GRPC_SLICE_buffer *write_slices, grpc_closure *cb) { grpc_tcp *tcp = (grpc_tcp *)ep; uv_buf_t *buffers; unsigned int buffer_count; unsigned int i; - gpr_slice *slice; + GRPC_SLICE *slice; uv_write_t *write_req; if (grpc_tcp_trace) { @@ -245,8 +245,8 @@ static void uv_endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, buffers = gpr_malloc(sizeof(uv_buf_t) * buffer_count); for (i = 0; i < buffer_count; i++) { slice = &tcp->write_slices->slices[i]; - buffers[i].base = (char *)GPR_SLICE_START_PTR(*slice); - buffers[i].len = GPR_SLICE_LENGTH(*slice); + buffers[i].base = (char *)GRPC_SLICE_START_PTR(*slice); + buffers[i].len = GRPC_SLICE_LENGTH(*slice); } write_req = gpr_malloc(sizeof(uv_write_t)); write_req->data = tcp; diff --git a/src/core/lib/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.c index fda26f52a9..9fe7662e96 100644 --- a/src/core/lib/iomgr/tcp_windows.c +++ b/src/core/lib/iomgr/tcp_windows.c @@ -209,9 +209,9 @@ static void win_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, tcp->read_slice = grpc_slice_malloc(8192); - buffer.len = (ULONG)GPR_SLICE_LENGTH( + buffer.len = (ULONG)GRPC_SLICE_LENGTH( tcp->read_slice); // we know slice size fits in 32bit. - buffer.buf = (char *)GPR_SLICE_START_PTR(tcp->read_slice); + buffer.buf = (char *)GRPC_SLICE_START_PTR(tcp->read_slice); TCP_REF(tcp, "read"); @@ -300,10 +300,10 @@ static void win_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, } for (i = 0; i < tcp->write_slices->count; i++) { - len = GPR_SLICE_LENGTH(tcp->write_slices->slices[i]); + len = GRPC_SLICE_LENGTH(tcp->write_slices->slices[i]); GPR_ASSERT(len <= ULONG_MAX); buffers[i].len = (ULONG)len; - buffers[i].buf = (char *)GPR_SLICE_START_PTR(tcp->write_slices->slices[i]); + buffers[i].buf = (char *)GRPC_SLICE_START_PTR(tcp->write_slices->slices[i]); } /* First, let's try a synchronous, non-blocking write. */ diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.c b/src/core/lib/security/credentials/google_default/google_default_credentials.c index aaa82976fb..afe0e3d357 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.c +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.c @@ -186,7 +186,7 @@ static grpc_error *create_default_creds_from_path( goto end; } json = grpc_json_parse_string_with_len( - (char *)GPR_SLICE_START_PTR(creds_data), GPR_SLICE_LENGTH(creds_data)); + (char *)GRPC_SLICE_START_PTR(creds_data), GRPC_SLICE_LENGTH(creds_data)); if (json == NULL) { char *dump = grpc_dump_slice(creds_data, GPR_DUMP_HEX | GPR_DUMP_ASCII); error = grpc_error_set_str(GRPC_ERROR_CREATE("Failed to parse JSON"), diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.c b/src/core/lib/security/credentials/jwt/jwt_verifier.c index 9cb8cd64f6..42bd89dd0a 100644 --- a/src/core/lib/security/credentials/jwt/jwt_verifier.c +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.c @@ -89,12 +89,12 @@ static grpc_json *parse_json_part_from_jwt(const char *str, size_t len, grpc_json *json; *buffer = grpc_base64_decode_with_len(str, len, 1); - if (GPR_SLICE_IS_EMPTY(*buffer)) { + if (GRPC_SLICE_IS_EMPTY(*buffer)) { gpr_log(GPR_ERROR, "Invalid base64."); return NULL; } - json = grpc_json_parse_string_with_len((char *)GPR_SLICE_START_PTR(*buffer), - GPR_SLICE_LENGTH(*buffer)); + json = grpc_json_parse_string_with_len((char *)GRPC_SLICE_START_PTR(*buffer), + GRPC_SLICE_LENGTH(*buffer)); if (json == NULL) { grpc_slice_unref(*buffer); gpr_log(GPR_ERROR, "JSON parsing error."); @@ -453,12 +453,12 @@ static BIGNUM *bignum_from_base64(const char *b64) { if (b64 == NULL) return NULL; bin = grpc_base64_decode(b64, 1); - if (GPR_SLICE_IS_EMPTY(bin)) { + if (GRPC_SLICE_IS_EMPTY(bin)) { gpr_log(GPR_ERROR, "Invalid base64 for big num."); return NULL; } - result = BN_bin2bn(GPR_SLICE_START_PTR(bin), - TSI_SIZE_AS_SIZE(GPR_SLICE_LENGTH(bin)), NULL); + result = BN_bin2bn(GRPC_SLICE_START_PTR(bin), + TSI_SIZE_AS_SIZE(GRPC_SLICE_LENGTH(bin)), NULL); grpc_slice_unref(bin); return result; } @@ -567,13 +567,13 @@ static int verify_jwt_signature(EVP_PKEY *key, const char *alg, gpr_log(GPR_ERROR, "EVP_DigestVerifyInit failed."); goto end; } - if (EVP_DigestVerifyUpdate(md_ctx, GPR_SLICE_START_PTR(signed_data), - GPR_SLICE_LENGTH(signed_data)) != 1) { + if (EVP_DigestVerifyUpdate(md_ctx, GRPC_SLICE_START_PTR(signed_data), + GRPC_SLICE_LENGTH(signed_data)) != 1) { gpr_log(GPR_ERROR, "EVP_DigestVerifyUpdate failed."); goto end; } - if (EVP_DigestVerifyFinal(md_ctx, GPR_SLICE_START_PTR(signature), - GPR_SLICE_LENGTH(signature)) != 1) { + if (EVP_DigestVerifyFinal(md_ctx, GRPC_SLICE_START_PTR(signature), + GRPC_SLICE_LENGTH(signature)) != 1) { gpr_log(GPR_ERROR, "JWT signature verification failed."); goto end; } @@ -824,7 +824,7 @@ void grpc_jwt_verifier_verify(grpc_exec_ctx *exec_ctx, signed_jwt_len = (size_t)(dot - jwt); cur = dot + 1; signature = grpc_base64_decode(cur, 1); - if (GPR_SLICE_IS_EMPTY(signature)) goto error; + if (GRPC_SLICE_IS_EMPTY(signature)) goto error; retrieve_key_and_verify( exec_ctx, verifier_cb_ctx_create(verifier, pollset, header, claims, audience, diff --git a/src/core/lib/security/transport/handshake.c b/src/core/lib/security/transport/handshake.c index 58d896b32e..07f16df51f 100644 --- a/src/core/lib/security/transport/handshake.c +++ b/src/core/lib/security/transport/handshake.c @@ -239,9 +239,9 @@ static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, } for (i = 0; i < h->incoming.count; i++) { - consumed_slice_size = GPR_SLICE_LENGTH(h->incoming.slices[i]); + consumed_slice_size = GRPC_SLICE_LENGTH(h->incoming.slices[i]); result = tsi_handshaker_process_bytes_from_peer( - h->handshaker, GPR_SLICE_START_PTR(h->incoming.slices[i]), + h->handshaker, GRPC_SLICE_START_PTR(h->incoming.slices[i]), &consumed_slice_size); if (!tsi_handshaker_is_in_progress(h->handshaker)) break; } @@ -267,7 +267,7 @@ static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, /* Handshake is done and successful this point. */ has_left_overs_in_current_slice = - (consumed_slice_size < GPR_SLICE_LENGTH(h->incoming.slices[i])); + (consumed_slice_size < GRPC_SLICE_LENGTH(h->incoming.slices[i])); num_left_overs = (has_left_overs_in_current_slice ? 1 : 0) + h->incoming.count - i - 1; if (num_left_overs == 0) { diff --git a/src/core/lib/security/transport/secure_endpoint.c b/src/core/lib/security/transport/secure_endpoint.c index 9acfd421a7..fba3314812 100644 --- a/src/core/lib/security/transport/secure_endpoint.c +++ b/src/core/lib/security/transport/secure_endpoint.c @@ -124,8 +124,8 @@ static void flush_read_staging_buffer(secure_endpoint *ep, uint8_t **cur, uint8_t **end) { grpc_slice_buffer_add(ep->read_buffer, ep->read_staging_buffer); ep->read_staging_buffer = grpc_slice_malloc(STAGING_BUFFER_SIZE); - *cur = GPR_SLICE_START_PTR(ep->read_staging_buffer); - *end = GPR_SLICE_END_PTR(ep->read_staging_buffer); + *cur = GRPC_SLICE_START_PTR(ep->read_staging_buffer); + *end = GRPC_SLICE_END_PTR(ep->read_staging_buffer); } static void call_read_cb(grpc_exec_ctx *exec_ctx, secure_endpoint *ep, @@ -150,8 +150,8 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, uint8_t keep_looping = 0; tsi_result result = TSI_OK; secure_endpoint *ep = (secure_endpoint *)user_data; - uint8_t *cur = GPR_SLICE_START_PTR(ep->read_staging_buffer); - uint8_t *end = GPR_SLICE_END_PTR(ep->read_staging_buffer); + uint8_t *cur = GRPC_SLICE_START_PTR(ep->read_staging_buffer); + uint8_t *end = GRPC_SLICE_END_PTR(ep->read_staging_buffer); if (error != GRPC_ERROR_NONE) { grpc_slice_buffer_reset_and_unref(ep->read_buffer); @@ -163,8 +163,8 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, /* TODO(yangg) check error, maybe bail out early */ for (i = 0; i < ep->source_buffer.count; i++) { grpc_slice encrypted = ep->source_buffer.slices[i]; - uint8_t *message_bytes = GPR_SLICE_START_PTR(encrypted); - size_t message_size = GPR_SLICE_LENGTH(encrypted); + uint8_t *message_bytes = GRPC_SLICE_START_PTR(encrypted); + size_t message_size = GRPC_SLICE_LENGTH(encrypted); while (message_size > 0 || keep_looping) { size_t unprotected_buffer_size_written = (size_t)(end - cur); @@ -199,12 +199,12 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, if (result != TSI_OK) break; } - if (cur != GPR_SLICE_START_PTR(ep->read_staging_buffer)) { + if (cur != GRPC_SLICE_START_PTR(ep->read_staging_buffer)) { grpc_slice_buffer_add( ep->read_buffer, grpc_slice_split_head( &ep->read_staging_buffer, - (size_t)(cur - GPR_SLICE_START_PTR(ep->read_staging_buffer)))); + (size_t)(cur - GRPC_SLICE_START_PTR(ep->read_staging_buffer)))); } /* TODO(yangg) experiment with moving this block after read_cb to see if it @@ -244,8 +244,8 @@ static void flush_write_staging_buffer(secure_endpoint *ep, uint8_t **cur, uint8_t **end) { grpc_slice_buffer_add(&ep->output_buffer, ep->write_staging_buffer); ep->write_staging_buffer = grpc_slice_malloc(STAGING_BUFFER_SIZE); - *cur = GPR_SLICE_START_PTR(ep->write_staging_buffer); - *end = GPR_SLICE_END_PTR(ep->write_staging_buffer); + *cur = GRPC_SLICE_START_PTR(ep->write_staging_buffer); + *end = GRPC_SLICE_END_PTR(ep->write_staging_buffer); } static void endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, @@ -255,8 +255,8 @@ static void endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, unsigned i; tsi_result result = TSI_OK; secure_endpoint *ep = (secure_endpoint *)secure_ep; - uint8_t *cur = GPR_SLICE_START_PTR(ep->write_staging_buffer); - uint8_t *end = GPR_SLICE_END_PTR(ep->write_staging_buffer); + uint8_t *cur = GRPC_SLICE_START_PTR(ep->write_staging_buffer); + uint8_t *end = GRPC_SLICE_END_PTR(ep->write_staging_buffer); grpc_slice_buffer_reset_and_unref(&ep->output_buffer); @@ -271,8 +271,8 @@ static void endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, for (i = 0; i < slices->count; i++) { grpc_slice plain = slices->slices[i]; - uint8_t *message_bytes = GPR_SLICE_START_PTR(plain); - size_t message_size = GPR_SLICE_LENGTH(plain); + uint8_t *message_bytes = GRPC_SLICE_START_PTR(plain); + size_t message_size = GRPC_SLICE_LENGTH(plain); while (message_size > 0) { size_t protected_buffer_size_to_send = (size_t)(end - cur); size_t processed_message_size = message_size; @@ -311,12 +311,12 @@ static void endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, flush_write_staging_buffer(ep, &cur, &end); } } while (still_pending_size > 0); - if (cur != GPR_SLICE_START_PTR(ep->write_staging_buffer)) { + if (cur != GRPC_SLICE_START_PTR(ep->write_staging_buffer)) { grpc_slice_buffer_add( &ep->output_buffer, grpc_slice_split_head( &ep->write_staging_buffer, - (size_t)(cur - GPR_SLICE_START_PTR(ep->write_staging_buffer)))); + (size_t)(cur - GRPC_SLICE_START_PTR(ep->write_staging_buffer)))); } } diff --git a/src/core/lib/security/transport/security_connector.c b/src/core/lib/security/transport/security_connector.c index cea94bfbba..3d39cf5dda 100644 --- a/src/core/lib/security/transport/security_connector.c +++ b/src/core/lib/security/transport/security_connector.c @@ -656,7 +656,7 @@ static grpc_slice compute_default_pem_root_certs_once(void) { /* Try overridden roots if needed. */ grpc_ssl_roots_override_result ovrd_res = GRPC_SSL_ROOTS_OVERRIDE_FAIL; - if (GPR_SLICE_IS_EMPTY(result) && ssl_roots_override_cb != NULL) { + if (GRPC_SLICE_IS_EMPTY(result) && ssl_roots_override_cb != NULL) { char *pem_root_certs = NULL; ovrd_res = ssl_roots_override_cb(&pem_root_certs); if (ovrd_res == GRPC_SSL_ROOTS_OVERRIDE_OK) { @@ -666,7 +666,7 @@ static grpc_slice compute_default_pem_root_certs_once(void) { } /* Fall back to installed certs if needed. */ - if (GPR_SLICE_IS_EMPTY(result) && + if (GRPC_SLICE_IS_EMPTY(result) && ovrd_res != GRPC_SSL_ROOTS_OVERRIDE_FAIL_PERMANENTLY) { GRPC_LOG_IF_ERROR("load_file", grpc_load_file(installed_roots_path, 0, &result)); @@ -714,8 +714,8 @@ size_t grpc_get_default_ssl_roots(const unsigned char **pem_root_certs) { loading all the roots once for the lifetime of the process. */ static gpr_once once = GPR_ONCE_INIT; gpr_once_init(&once, init_default_pem_root_certs); - *pem_root_certs = GPR_SLICE_START_PTR(default_pem_root_certs); - return GPR_SLICE_LENGTH(default_pem_root_certs); + *pem_root_certs = GRPC_SLICE_START_PTR(default_pem_root_certs); + return GRPC_SLICE_LENGTH(default_pem_root_certs); } grpc_security_status grpc_ssl_channel_security_connector_create( diff --git a/src/core/lib/security/transport/server_auth_filter.c b/src/core/lib/security/transport/server_auth_filter.c index 39973ab036..dd465be6f5 100644 --- a/src/core/lib/security/transport/server_auth_filter.c +++ b/src/core/lib/security/transport/server_auth_filter.c @@ -78,7 +78,7 @@ static grpc_metadata_array metadata_batch_to_md_array( usr_md = &result.metadata[result.count++]; usr_md->key = grpc_mdstr_as_c_string(key); usr_md->value = grpc_mdstr_as_c_string(value); - usr_md->value_length = GPR_SLICE_LENGTH(value->slice); + usr_md->value_length = GRPC_SLICE_LENGTH(value->slice); } return result; } @@ -92,14 +92,14 @@ static grpc_mdelem *remove_consumed_md(void *user_data, grpc_mdelem *md) { /* Maybe we could do a pointer comparison but we do not have any guarantee that the metadata processor used the same pointers for consumed_md in the callback. */ - if (GPR_SLICE_LENGTH(md->key->slice) != strlen(consumed_md->key) || - GPR_SLICE_LENGTH(md->value->slice) != consumed_md->value_length) { + if (GRPC_SLICE_LENGTH(md->key->slice) != strlen(consumed_md->key) || + GRPC_SLICE_LENGTH(md->value->slice) != consumed_md->value_length) { continue; } - if (memcmp(GPR_SLICE_START_PTR(md->key->slice), consumed_md->key, - GPR_SLICE_LENGTH(md->key->slice)) == 0 && - memcmp(GPR_SLICE_START_PTR(md->value->slice), consumed_md->value, - GPR_SLICE_LENGTH(md->value->slice)) == 0) { + if (memcmp(GRPC_SLICE_START_PTR(md->key->slice), consumed_md->key, + GRPC_SLICE_LENGTH(md->key->slice)) == 0 && + memcmp(GRPC_SLICE_START_PTR(md->value->slice), consumed_md->value, + GRPC_SLICE_LENGTH(md->value->slice)) == 0) { return NULL; /* Delete. */ } } diff --git a/src/core/lib/security/util/b64.c b/src/core/lib/security/util/b64.c index f4f0092c3d..6270277914 100644 --- a/src/core/lib/security/util/b64.c +++ b/src/core/lib/security/util/b64.c @@ -185,7 +185,7 @@ static int decode_group(const unsigned char *codes, size_t num_codes, grpc_slice grpc_base64_decode_with_len(const char *b64, size_t b64_len, int url_safe) { grpc_slice result = grpc_slice_malloc(b64_len); - unsigned char *current = GPR_SLICE_START_PTR(result); + unsigned char *current = GRPC_SLICE_START_PTR(result); size_t result_size = 0; unsigned char codes[4]; size_t num_codes = 0; @@ -224,7 +224,7 @@ grpc_slice grpc_base64_decode_with_len(const char *b64, size_t b64_len, !decode_group(codes, num_codes, current, &result_size)) { goto fail; } - GPR_SLICE_SET_LENGTH(result, result_size); + GRPC_SLICE_SET_LENGTH(result, result_size); return result; fail: diff --git a/src/core/lib/slice/percent_encoding.c b/src/core/lib/slice/percent_encoding.c index 19f5f96cc3..b9e35f1c71 100644 --- a/src/core/lib/slice/percent_encoding.c +++ b/src/core/lib/slice/percent_encoding.c @@ -55,8 +55,8 @@ grpc_slice grpc_percent_encode_slice(grpc_slice slice, // first pass: count the number of bytes needed to output this string size_t output_length = 0; - const uint8_t *slice_start = GPR_SLICE_START_PTR(slice); - const uint8_t *slice_end = GPR_SLICE_END_PTR(slice); + const uint8_t *slice_start = GRPC_SLICE_START_PTR(slice); + const uint8_t *slice_end = GRPC_SLICE_END_PTR(slice); const uint8_t *p; bool any_reserved_bytes = false; for (p = slice_start; p < slice_end; p++) { @@ -70,7 +70,7 @@ grpc_slice grpc_percent_encode_slice(grpc_slice slice, } // second pass: actually encode grpc_slice out = grpc_slice_malloc(output_length); - uint8_t *q = GPR_SLICE_START_PTR(out); + uint8_t *q = GRPC_SLICE_START_PTR(out); for (p = slice_start; p < slice_end; p++) { if (is_unreserved_character(*p, unreserved_bytes)) { *q++ = *p; @@ -80,7 +80,7 @@ grpc_slice grpc_percent_encode_slice(grpc_slice slice, *q++ = hex[*p & 15]; } } - GPR_ASSERT(q == GPR_SLICE_END_PTR(out)); + GPR_ASSERT(q == GRPC_SLICE_END_PTR(out)); return out; } @@ -100,8 +100,8 @@ static uint8_t dehex(uint8_t c) { bool grpc_strict_percent_decode_slice(grpc_slice slice_in, const uint8_t *unreserved_bytes, grpc_slice *slice_out) { - const uint8_t *p = GPR_SLICE_START_PTR(slice_in); - const uint8_t *in_end = GPR_SLICE_END_PTR(slice_in); + const uint8_t *p = GRPC_SLICE_START_PTR(slice_in); + const uint8_t *in_end = GRPC_SLICE_END_PTR(slice_in); size_t out_length = 0; bool any_percent_encoded_stuff = false; while (p != in_end) { @@ -122,9 +122,9 @@ bool grpc_strict_percent_decode_slice(grpc_slice slice_in, *slice_out = grpc_slice_ref(slice_in); return true; } - p = GPR_SLICE_START_PTR(slice_in); + p = GRPC_SLICE_START_PTR(slice_in); *slice_out = grpc_slice_malloc(out_length); - uint8_t *q = GPR_SLICE_START_PTR(*slice_out); + uint8_t *q = GRPC_SLICE_START_PTR(*slice_out); while (p != in_end) { if (*p == '%') { *q++ = (uint8_t)(dehex(p[1]) << 4) | (dehex(p[2])); @@ -133,13 +133,13 @@ bool grpc_strict_percent_decode_slice(grpc_slice slice_in, *q++ = *p++; } } - GPR_ASSERT(q == GPR_SLICE_END_PTR(*slice_out)); + GPR_ASSERT(q == GRPC_SLICE_END_PTR(*slice_out)); return true; } grpc_slice grpc_permissive_percent_decode_slice(grpc_slice slice_in) { - const uint8_t *p = GPR_SLICE_START_PTR(slice_in); - const uint8_t *in_end = GPR_SLICE_END_PTR(slice_in); + const uint8_t *p = GRPC_SLICE_START_PTR(slice_in); + const uint8_t *in_end = GRPC_SLICE_END_PTR(slice_in); size_t out_length = 0; bool any_percent_encoded_stuff = false; while (p != in_end) { @@ -160,9 +160,9 @@ grpc_slice grpc_permissive_percent_decode_slice(grpc_slice slice_in) { if (!any_percent_encoded_stuff) { return grpc_slice_ref(slice_in); } - p = GPR_SLICE_START_PTR(slice_in); + p = GRPC_SLICE_START_PTR(slice_in); grpc_slice out = grpc_slice_malloc(out_length); - uint8_t *q = GPR_SLICE_START_PTR(out); + uint8_t *q = GRPC_SLICE_START_PTR(out); while (p != in_end) { if (*p == '%') { if (!valid_hex(p + 1, in_end) || !valid_hex(p + 2, in_end)) { @@ -175,6 +175,6 @@ grpc_slice grpc_permissive_percent_decode_slice(grpc_slice slice_in) { *q++ = *p++; } } - GPR_ASSERT(q == GPR_SLICE_END_PTR(out)); + GPR_ASSERT(q == GRPC_SLICE_END_PTR(out)); return out; } diff --git a/src/core/lib/slice/slice.c b/src/core/lib/slice/slice.c index 1db1211938..54ff6f6baa 100644 --- a/src/core/lib/slice/slice.c +++ b/src/core/lib/slice/slice.c @@ -159,7 +159,7 @@ grpc_slice grpc_slice_new_with_len(void *p, size_t len, grpc_slice grpc_slice_from_copied_buffer(const char *source, size_t length) { grpc_slice slice = grpc_slice_malloc(length); - memcpy(GPR_SLICE_START_PTR(slice), source, length); + memcpy(GRPC_SLICE_START_PTR(slice), source, length); return slice; } @@ -252,7 +252,7 @@ grpc_slice grpc_slice_sub(grpc_slice source, size_t begin, size_t end) { if (end - begin <= sizeof(subset.data.inlined.bytes)) { subset.refcount = NULL; subset.data.inlined.length = (uint8_t)(end - begin); - memcpy(subset.data.inlined.bytes, GPR_SLICE_START_PTR(source) + begin, + memcpy(subset.data.inlined.bytes, GRPC_SLICE_START_PTR(source) + begin, end - begin); } else { subset = grpc_slice_sub_no_ref(source, begin, end); @@ -336,15 +336,15 @@ grpc_slice grpc_slice_split_head(grpc_slice *source, size_t split) { } int grpc_slice_cmp(grpc_slice a, grpc_slice b) { - int d = (int)(GPR_SLICE_LENGTH(a) - GPR_SLICE_LENGTH(b)); + int d = (int)(GRPC_SLICE_LENGTH(a) - GRPC_SLICE_LENGTH(b)); if (d != 0) return d; - return memcmp(GPR_SLICE_START_PTR(a), GPR_SLICE_START_PTR(b), - GPR_SLICE_LENGTH(a)); + return memcmp(GRPC_SLICE_START_PTR(a), GRPC_SLICE_START_PTR(b), + GRPC_SLICE_LENGTH(a)); } int grpc_slice_str_cmp(grpc_slice a, const char *b) { size_t b_length = strlen(b); - int d = (int)(GPR_SLICE_LENGTH(a) - b_length); + int d = (int)(GRPC_SLICE_LENGTH(a) - b_length); if (d != 0) return d; - return memcmp(GPR_SLICE_START_PTR(a), b, b_length); + return memcmp(GRPC_SLICE_START_PTR(a), b, b_length); } diff --git a/src/core/lib/slice/slice_buffer.c b/src/core/lib/slice/slice_buffer.c index a18309f3c4..8416237631 100644 --- a/src/core/lib/slice/slice_buffer.c +++ b/src/core/lib/slice/slice_buffer.c @@ -98,7 +98,7 @@ size_t grpc_slice_buffer_add_indexed(grpc_slice_buffer *sb, grpc_slice s) { size_t out = sb->count; maybe_embiggen(sb); sb->slices[out] = s; - sb->length += GPR_SLICE_LENGTH(s); + sb->length += GRPC_SLICE_LENGTH(s); sb->count = out + 1; return out; } @@ -112,18 +112,18 @@ void grpc_slice_buffer_add(grpc_slice_buffer *sb, grpc_slice s) { writes */ if (!s.refcount && n) { grpc_slice *back = &sb->slices[n - 1]; - if (!back->refcount && back->data.inlined.length < GPR_SLICE_INLINED_SIZE) { + if (!back->refcount && back->data.inlined.length < GRPC_SLICE_INLINED_SIZE) { if (s.data.inlined.length + back->data.inlined.length <= - GPR_SLICE_INLINED_SIZE) { + GRPC_SLICE_INLINED_SIZE) { memcpy(back->data.inlined.bytes + back->data.inlined.length, s.data.inlined.bytes, s.data.inlined.length); back->data.inlined.length = (uint8_t)(back->data.inlined.length + s.data.inlined.length); } else { - size_t cp1 = GPR_SLICE_INLINED_SIZE - back->data.inlined.length; + size_t cp1 = GRPC_SLICE_INLINED_SIZE - back->data.inlined.length; memcpy(back->data.inlined.bytes + back->data.inlined.length, s.data.inlined.bytes, cp1); - back->data.inlined.length = GPR_SLICE_INLINED_SIZE; + back->data.inlined.length = GRPC_SLICE_INLINED_SIZE; maybe_embiggen(sb); back = &sb->slices[n]; sb->count = n + 1; @@ -149,7 +149,7 @@ void grpc_slice_buffer_addn(grpc_slice_buffer *sb, grpc_slice *s, size_t n) { void grpc_slice_buffer_pop(grpc_slice_buffer *sb) { if (sb->count != 0) { size_t count = --sb->count; - sb->length -= GPR_SLICE_LENGTH(sb->slices[count]); + sb->length -= GRPC_SLICE_LENGTH(sb->slices[count]); } } @@ -222,7 +222,7 @@ void grpc_slice_buffer_move_first(grpc_slice_buffer *src, size_t n, src_idx = 0; while (src_idx < src->capacity) { grpc_slice slice = src->slices[src_idx]; - size_t slice_len = GPR_SLICE_LENGTH(slice); + size_t slice_len = GRPC_SLICE_LENGTH(slice); if (n > slice_len) { grpc_slice_buffer_add(dst, slice); n -= slice_len; @@ -233,8 +233,8 @@ void grpc_slice_buffer_move_first(grpc_slice_buffer *src, size_t n, break; } else { /* n < slice_len */ src->slices[src_idx] = grpc_slice_split_tail(&slice, n); - GPR_ASSERT(GPR_SLICE_LENGTH(slice) == n); - GPR_ASSERT(GPR_SLICE_LENGTH(src->slices[src_idx]) == slice_len - n); + GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == n); + GPR_ASSERT(GRPC_SLICE_LENGTH(src->slices[src_idx]) == slice_len - n); grpc_slice_buffer_add(dst, slice); break; } @@ -254,7 +254,7 @@ void grpc_slice_buffer_trim_end(grpc_slice_buffer *sb, size_t n, for (;;) { size_t idx = sb->count - 1; grpc_slice slice = sb->slices[idx]; - size_t slice_len = GPR_SLICE_LENGTH(slice); + size_t slice_len = GRPC_SLICE_LENGTH(slice); if (slice_len > n) { sb->slices[idx] = grpc_slice_split_head(&slice, slice_len - n); grpc_slice_buffer_add_indexed(garbage, slice); @@ -277,6 +277,6 @@ grpc_slice grpc_slice_buffer_take_first(grpc_slice_buffer *sb) { slice = sb->slices[0]; memmove(&sb->slices[0], &sb->slices[1], (sb->count - 1) * sizeof(grpc_slice)); sb->count--; - sb->length -= GPR_SLICE_LENGTH(slice); + sb->length -= GRPC_SLICE_LENGTH(slice); return slice; } diff --git a/src/core/lib/slice/slice_string_helpers.c b/src/core/lib/slice/slice_string_helpers.c index eaffb63686..4731762ece 100644 --- a/src/core/lib/slice/slice_string_helpers.c +++ b/src/core/lib/slice/slice_string_helpers.c @@ -40,7 +40,7 @@ #include "src/core/lib/support/string.h" char *grpc_dump_slice(grpc_slice s, uint32_t flags) { - return gpr_dump((const char *)GPR_SLICE_START_PTR(s), GPR_SLICE_LENGTH(s), + return gpr_dump((const char *)GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s), flags); } @@ -53,8 +53,8 @@ static int slice_find_separator_offset(const grpc_slice str, const char *sep, const size_t read_offset, size_t *begin, size_t *end) { size_t i; - const uint8_t *str_ptr = GPR_SLICE_START_PTR(str) + read_offset; - const size_t str_len = GPR_SLICE_LENGTH(str) - read_offset; + const uint8_t *str_ptr = GRPC_SLICE_START_PTR(str) + read_offset; + const size_t str_len = GRPC_SLICE_LENGTH(str) - read_offset; const size_t sep_len = strlen(sep); if (str_len < sep_len) { return 0; @@ -82,7 +82,7 @@ void grpc_slice_split(grpc_slice str, const char *sep, grpc_slice_buffer *dst) { } while (slice_find_separator_offset(str, sep, end + sep_len, &begin, &end) != 0); grpc_slice_buffer_add_indexed( - dst, grpc_slice_sub(str, end + sep_len, GPR_SLICE_LENGTH(str))); + dst, grpc_slice_sub(str, end + sep_len, GRPC_SLICE_LENGTH(str))); } else { /* no sep found, add whole input */ grpc_slice_buffer_add_indexed(dst, grpc_slice_ref(str)); } diff --git a/src/core/lib/surface/byte_buffer_reader.c b/src/core/lib/surface/byte_buffer_reader.c index 6bf3c01e65..6a1ef2ba2d 100644 --- a/src/core/lib/surface/byte_buffer_reader.c +++ b/src/core/lib/surface/byte_buffer_reader.c @@ -119,11 +119,11 @@ grpc_slice grpc_byte_buffer_reader_readall(grpc_byte_buffer_reader *reader) { size_t bytes_read = 0; const size_t input_size = grpc_byte_buffer_length(reader->buffer_out); grpc_slice out_slice = grpc_slice_malloc(input_size); - uint8_t *const outbuf = GPR_SLICE_START_PTR(out_slice); /* just an alias */ + uint8_t *const outbuf = GRPC_SLICE_START_PTR(out_slice); /* just an alias */ while (grpc_byte_buffer_reader_next(reader, &in_slice) != 0) { - const size_t slice_length = GPR_SLICE_LENGTH(in_slice); - memcpy(&(outbuf[bytes_read]), GPR_SLICE_START_PTR(in_slice), slice_length); + const size_t slice_length = GRPC_SLICE_LENGTH(in_slice); + memcpy(&(outbuf[bytes_read]), GRPC_SLICE_START_PTR(in_slice), slice_length); bytes_read += slice_length; grpc_slice_unref(in_slice); GPR_ASSERT(bytes_read <= input_size); diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 278f04a7f5..62c0ec83a1 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -518,8 +518,8 @@ static void set_encodings_accepted_by_peer(grpc_call *call, grpc_mdelem *mdel) { const grpc_slice *accept_encoding_entry_slice = &accept_encoding_parts.slices[i]; if (grpc_compression_algorithm_parse( - (const char *)GPR_SLICE_START_PTR(*accept_encoding_entry_slice), - GPR_SLICE_LENGTH(*accept_encoding_entry_slice), &algorithm)) { + (const char *)GRPC_SLICE_START_PTR(*accept_encoding_entry_slice), + GRPC_SLICE_LENGTH(*accept_encoding_entry_slice), &algorithm)) { GPR_BITSET(&call->encodings_accepted_by_peer, algorithm); } else { char *accept_encoding_entry_str = @@ -553,13 +553,13 @@ static void get_final_details(grpc_call *call, char **out_details, if (call->status[i].is_set) { if (call->status[i].details) { grpc_slice details = call->status[i].details->slice; - size_t len = GPR_SLICE_LENGTH(details); + size_t len = GRPC_SLICE_LENGTH(details); if (len + 1 > *out_details_capacity) { *out_details_capacity = GPR_MAX(len + 1, *out_details_capacity * 3 / 2); *out_details = gpr_realloc(*out_details, *out_details_capacity); } - memcpy(*out_details, GPR_SLICE_START_PTR(details), len); + memcpy(*out_details, GRPC_SLICE_START_PTR(details), len); (*out_details)[len] = 0; } else { goto no_details; @@ -901,7 +901,7 @@ static uint32_t decode_status(grpc_mdelem *md) { status = ((uint32_t)(intptr_t)user_data) - STATUS_OFFSET; } else { if (!gpr_parse_bytes_to_uint32(grpc_mdstr_as_c_string(md->value), - GPR_SLICE_LENGTH(md->value->slice), + GRPC_SLICE_LENGTH(md->value->slice), &status)) { status = GRPC_STATUS_UNKNOWN; /* could not parse status code */ } @@ -954,7 +954,7 @@ static grpc_mdelem *publish_app_metadata(grpc_call *call, grpc_mdelem *elem, mdusr = &dest->metadata[dest->count++]; mdusr->key = grpc_mdstr_as_c_string(elem->key); mdusr->value = grpc_mdstr_as_c_string(elem->value); - mdusr->value_length = GPR_SLICE_LENGTH(elem->value->slice); + mdusr->value_length = GRPC_SLICE_LENGTH(elem->value->slice); GPR_TIMER_END("publish_app_metadata", 0); return elem; } diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index 2045e59e53..5d763b3875 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -460,7 +460,7 @@ static void destroy_channel(grpc_exec_ctx *exec_ctx, channel_data *chand, static void cpstr(char **dest, size_t *capacity, grpc_mdstr *value) { grpc_slice slice = value->slice; - size_t len = GPR_SLICE_LENGTH(slice); + size_t len = GRPC_SLICE_LENGTH(slice); if (len + 1 > *capacity) { *capacity = GPR_MAX(len + 1, *capacity * 2); diff --git a/src/core/lib/transport/metadata.c b/src/core/lib/transport/metadata.c index b8364c4cb7..a1748c033b 100644 --- a/src/core/lib/transport/metadata.c +++ b/src/core/lib/transport/metadata.c @@ -351,8 +351,8 @@ grpc_mdstr *grpc_mdstr_from_string(const char *str) { } grpc_mdstr *grpc_mdstr_from_slice(grpc_slice slice) { - grpc_mdstr *result = grpc_mdstr_from_buffer(GPR_SLICE_START_PTR(slice), - GPR_SLICE_LENGTH(slice)); + grpc_mdstr *result = grpc_mdstr_from_buffer(GRPC_SLICE_START_PTR(slice), + GRPC_SLICE_LENGTH(slice)); grpc_slice_unref(slice); return result; } @@ -373,9 +373,9 @@ grpc_mdstr *grpc_mdstr_from_buffer(const uint8_t *buf, size_t length) { idx = (hash + i) % GPR_ARRAY_SIZE(g_static_strtab); ss = g_static_strtab[idx]; if (ss == NULL) break; - if (ss->hash == hash && GPR_SLICE_LENGTH(ss->slice) == length && + if (ss->hash == hash && GRPC_SLICE_LENGTH(ss->slice) == length && (length == 0 || - 0 == memcmp(buf, GPR_SLICE_START_PTR(ss->slice), length))) { + 0 == memcmp(buf, GRPC_SLICE_START_PTR(ss->slice), length))) { GPR_TIMER_END("grpc_mdstr_from_buffer", 0); return ss; } @@ -386,8 +386,8 @@ grpc_mdstr *grpc_mdstr_from_buffer(const uint8_t *buf, size_t length) { /* search for an existing string */ idx = TABLE_IDX(hash, LOG2_STRTAB_SHARD_COUNT, shard->capacity); for (s = shard->strs[idx]; s; s = s->bucket_next) { - if (s->hash == hash && GPR_SLICE_LENGTH(s->slice) == length && - 0 == memcmp(buf, GPR_SLICE_START_PTR(s->slice), length)) { + if (s->hash == hash && GRPC_SLICE_LENGTH(s->slice) == length && + 0 == memcmp(buf, GRPC_SLICE_START_PTR(s->slice), length)) { if (gpr_atm_full_fetch_add(&s->refcnt, 1) == 0) { /* If we get here, we've added a ref to something that was about to * die - drop it immediately. @@ -404,7 +404,7 @@ grpc_mdstr *grpc_mdstr_from_buffer(const uint8_t *buf, size_t length) { } /* not found: create a new string */ - if (length + 1 < GPR_SLICE_INLINED_SIZE) { + if (length + 1 < GRPC_SLICE_INLINED_SIZE) { /* string data goes directly into the slice */ s = gpr_malloc(sizeof(internal_string)); gpr_atm_rel_store(&s->refcnt, 1); @@ -607,12 +607,12 @@ static size_t get_base64_encoded_size(size_t raw_length) { } size_t grpc_mdelem_get_size_in_hpack_table(grpc_mdelem *elem) { - size_t overhead_and_key = 32 + GPR_SLICE_LENGTH(elem->key->slice); - size_t value_len = GPR_SLICE_LENGTH(elem->value->slice); + size_t overhead_and_key = 32 + GRPC_SLICE_LENGTH(elem->key->slice); + size_t value_len = GRPC_SLICE_LENGTH(elem->value->slice); if (is_mdstr_static(elem->value)) { if (grpc_is_binary_header( - (const char *)GPR_SLICE_START_PTR(elem->key->slice), - GPR_SLICE_LENGTH(elem->key->slice))) { + (const char *)GRPC_SLICE_START_PTR(elem->key->slice), + GRPC_SLICE_LENGTH(elem->key->slice))) { return overhead_and_key + get_base64_encoded_size(value_len); } else { return overhead_and_key + value_len; @@ -622,8 +622,8 @@ size_t grpc_mdelem_get_size_in_hpack_table(grpc_mdelem *elem) { gpr_atm current_size = gpr_atm_acq_load(&is->size_in_decoder_table); if (current_size == SIZE_IN_DECODER_TABLE_NOT_SET) { if (grpc_is_binary_header( - (const char *)GPR_SLICE_START_PTR(elem->key->slice), - GPR_SLICE_LENGTH(elem->key->slice))) { + (const char *)GRPC_SLICE_START_PTR(elem->key->slice), + GRPC_SLICE_LENGTH(elem->key->slice))) { current_size = (gpr_atm)get_base64_encoded_size(value_len); } else { current_size = (gpr_atm)value_len; @@ -679,7 +679,7 @@ void grpc_mdelem_unref(grpc_mdelem *gmd DEBUG_ARGS) { } const char *grpc_mdstr_as_c_string(const grpc_mdstr *s) { - return (const char *)GPR_SLICE_START_PTR(s->slice); + return (const char *)GRPC_SLICE_START_PTR(s->slice); } size_t grpc_mdstr_length(const grpc_mdstr *s) { return GRPC_MDSTR_LENGTH(s); } diff --git a/src/core/lib/transport/metadata.h b/src/core/lib/transport/metadata.h index c63bce8310..8dcfbb98bb 100644 --- a/src/core/lib/transport/metadata.h +++ b/src/core/lib/transport/metadata.h @@ -149,7 +149,7 @@ void grpc_mdelem_unref(grpc_mdelem *md); Does not promise that the returned string has no embedded nulls however. */ const char *grpc_mdstr_as_c_string(const grpc_mdstr *s); -#define GRPC_MDSTR_LENGTH(s) (GPR_SLICE_LENGTH(s->slice)) +#define GRPC_MDSTR_LENGTH(s) (GRPC_SLICE_LENGTH(s->slice)) /* We add 32 bytes of padding as per RFC-7540 section 6.5.2. */ #define GRPC_MDELEM_LENGTH(e) \ diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c index a178776d73..0bf5b0acf3 100644 --- a/src/csharp/ext/grpc_csharp_ext.c +++ b/src/csharp/ext/grpc_csharp_ext.c @@ -288,10 +288,10 @@ GPR_EXPORT void GPR_CALLTYPE grpcsharp_batch_context_recv_message_to_buffer( GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, ctx->recv_message)); while (grpc_byte_buffer_reader_next(&reader, &slice)) { - size_t len = GPR_SLICE_LENGTH(slice); + size_t len = GRPC_SLICE_LENGTH(slice); GPR_ASSERT(offset + len <= buffer_len); - memcpy(buffer + offset, GPR_SLICE_START_PTR(slice), - GPR_SLICE_LENGTH(slice)); + memcpy(buffer + offset, GRPC_SLICE_START_PTR(slice), + GRPC_SLICE_LENGTH(slice)); offset += len; grpc_slice_unref(slice); } diff --git a/src/node/ext/byte_buffer.cc b/src/node/ext/byte_buffer.cc index 76aa611a5d..399cdcd814 100644 --- a/src/node/ext/byte_buffer.cc +++ b/src/node/ext/byte_buffer.cc @@ -57,7 +57,7 @@ grpc_byte_buffer *BufferToByteBuffer(Local buffer) { int length = ::node::Buffer::Length(buffer); char *data = ::node::Buffer::Data(buffer); grpc_slice slice = grpc_slice_malloc(length); - memcpy(GPR_SLICE_START_PTR(slice), data, length); + memcpy(GRPC_SLICE_START_PTR(slice), data, length); grpc_byte_buffer *byte_buffer(grpc_raw_byte_buffer_create(&slice, 1)); grpc_slice_unref(slice); return byte_buffer; @@ -78,9 +78,9 @@ Local ByteBufferToBuffer(grpc_byte_buffer *buffer) { return scope.Escape(Nan::Undefined()); } grpc_slice slice = grpc_byte_buffer_reader_readall(&reader); - size_t length = GPR_SLICE_LENGTH(slice); + size_t length = GRPC_SLICE_LENGTH(slice); char *result = new char[length]; - memcpy(result, GPR_SLICE_START_PTR(slice), length); + memcpy(result, GRPC_SLICE_START_PTR(slice), length); grpc_slice_unref(slice); return scope.Escape(MakeFastBuffer( Nan::NewBuffer(result, length, delete_buffer, NULL).ToLocalChecked())); diff --git a/src/objective-c/GRPCClient/private/NSData+GRPC.m b/src/objective-c/GRPCClient/private/NSData+GRPC.m index 45d23d8651..6d2ad0a3bd 100644 --- a/src/objective-c/GRPCClient/private/NSData+GRPC.m +++ b/src/objective-c/GRPCClient/private/NSData+GRPC.m @@ -54,10 +54,10 @@ static void MallocAndCopyByteBufferToCharArray(grpc_byte_buffer *buffer, // The slice contains uncompressed data even if compressed data was received // because the reader takes care of automatically decompressing it grpc_slice slice = grpc_byte_buffer_reader_readall(&reader); - size_t uncompressed_length = GPR_SLICE_LENGTH(slice); + size_t uncompressed_length = GRPC_SLICE_LENGTH(slice); char *result = malloc(uncompressed_length); if (result) { - memcpy(result, GPR_SLICE_START_PTR(slice), uncompressed_length); + memcpy(result, GRPC_SLICE_START_PTR(slice), uncompressed_length); } grpc_slice_unref(slice); *array = result; diff --git a/src/php/ext/grpc/byte_buffer.c b/src/php/ext/grpc/byte_buffer.c index 2d48841dfa..b0269854e8 100644 --- a/src/php/ext/grpc/byte_buffer.c +++ b/src/php/ext/grpc/byte_buffer.c @@ -67,9 +67,9 @@ void byte_buffer_to_string(grpc_byte_buffer *buffer, char **out_string, } grpc_slice slice = grpc_byte_buffer_reader_readall(&reader); - size_t length = GPR_SLICE_LENGTH(slice); + size_t length = GRPC_SLICE_LENGTH(slice); char *string = ecalloc(length + 1, sizeof(char)); - memcpy(string, GPR_SLICE_START_PTR(slice), length); + memcpy(string, GRPC_SLICE_START_PTR(slice), length); grpc_slice_unref(slice); *out_string = string; diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi index ba26284b2c..ad766186bd 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi @@ -68,8 +68,8 @@ cdef extern from "grpc/grpc.h": grpc_slice grpc_slice_from_copied_buffer(const char *source, size_t len) nogil # Declare functions for function-like macros (because Cython)... - void *grpc_slice_start_ptr "GPR_SLICE_START_PTR" (grpc_slice s) nogil - size_t grpc_slice_length "GPR_SLICE_LENGTH" (grpc_slice s) nogil + void *grpc_slice_start_ptr "GRPC_SLICE_START_PTR" (grpc_slice s) nogil + size_t grpc_slice_length "GRPC_SLICE_LENGTH" (grpc_slice s) nogil ctypedef enum gpr_clock_type: GPR_CLOCK_MONOTONIC diff --git a/src/ruby/ext/grpc/rb_byte_buffer.c b/src/ruby/ext/grpc/rb_byte_buffer.c index f0bacc3d7c..f97890e4a2 100644 --- a/src/ruby/ext/grpc/rb_byte_buffer.c +++ b/src/ruby/ext/grpc/rb_byte_buffer.c @@ -61,8 +61,8 @@ VALUE grpc_rb_byte_buffer_to_s(grpc_byte_buffer *buffer) { return Qnil; } while (grpc_byte_buffer_reader_next(&reader, &next) != 0) { - rb_str_cat(rb_string, (const char *) GPR_SLICE_START_PTR(next), - GPR_SLICE_LENGTH(next)); + rb_str_cat(rb_string, (const char *) GRPC_SLICE_START_PTR(next), + GRPC_SLICE_LENGTH(next)); grpc_slice_unref(next); } return rb_string; diff --git a/test/core/bad_client/tests/large_metadata.c b/test/core/bad_client/tests/large_metadata.c index 124035c070..9c804e78c1 100644 --- a/test/core/bad_client/tests/large_metadata.c +++ b/test/core/bad_client/tests/large_metadata.c @@ -192,7 +192,7 @@ static void client_validator(grpc_slice_buffer *incoming) { grpc_slice last_frame = last_frame_buffer.slices[0]; // Construct expected frame. grpc_slice expected = grpc_slice_malloc(13); - uint8_t *p = GPR_SLICE_START_PTR(expected); + uint8_t *p = GRPC_SLICE_START_PTR(expected); // Length. *p++ = 0; *p++ = 0; diff --git a/test/core/bad_ssl/servers/cert.c b/test/core/bad_ssl/servers/cert.c index 52922f5d6b..9aadf452e2 100644 --- a/test/core/bad_ssl/servers/cert.c +++ b/test/core/bad_ssl/servers/cert.c @@ -61,8 +61,8 @@ int main(int argc, char **argv) { GPR_ASSERT(GRPC_LOG_IF_ERROR( "load_file", grpc_load_file("src/core/lib/tsi/test_creds/badserver.key", 1, &key_slice))); - pem_key_cert_pair.private_key = (const char *)GPR_SLICE_START_PTR(key_slice); - pem_key_cert_pair.cert_chain = (const char *)GPR_SLICE_START_PTR(cert_slice); + pem_key_cert_pair.private_key = (const char *)GRPC_SLICE_START_PTR(key_slice); + pem_key_cert_pair.cert_chain = (const char *)GRPC_SLICE_START_PTR(cert_slice); ssl_creds = grpc_ssl_server_credentials_create(NULL, &pem_key_cert_pair, 1, 0, NULL); diff --git a/test/core/compression/message_compress_test.c b/test/core/compression/message_compress_test.c index c6963df85d..680850af33 100644 --- a/test/core/compression/message_compress_test.c +++ b/test/core/compression/message_compress_test.c @@ -70,8 +70,8 @@ static void assert_passthrough(grpc_slice value, GPR_INFO, "assert_passthrough: value_length=%" PRIuPTR " value_hash=0x%08x " "algorithm='%s' uncompressed_split='%s' compressed_split='%s'", - GPR_SLICE_LENGTH(value), - gpr_murmur_hash3(GPR_SLICE_START_PTR(value), GPR_SLICE_LENGTH(value), 0), + GRPC_SLICE_LENGTH(value), + gpr_murmur_hash3(GRPC_SLICE_START_PTR(value), GRPC_SLICE_LENGTH(value), 0), algorithm_name, grpc_slice_split_mode_name(uncompressed_split_mode), grpc_slice_split_mode_name(compressed_split_mode)); @@ -114,7 +114,7 @@ static void assert_passthrough(grpc_slice value, static grpc_slice repeated(char c, size_t length) { grpc_slice out = grpc_slice_malloc(length); - memset(GPR_SLICE_START_PTR(out), c, length); + memset(GRPC_SLICE_START_PTR(out), c, length); return out; } @@ -184,9 +184,9 @@ static void test_bad_decompression_data_crc(void) { grpc_msg_compress(GRPC_COMPRESS_GZIP, &input, &corrupted); /* corrupt the output by smashing the CRC */ GPR_ASSERT(corrupted.count > 1); - GPR_ASSERT(GPR_SLICE_LENGTH(corrupted.slices[1]) > 8); - idx = GPR_SLICE_LENGTH(corrupted.slices[1]) - 8; - memcpy(GPR_SLICE_START_PTR(corrupted.slices[1]) + idx, &bad, 4); + GPR_ASSERT(GRPC_SLICE_LENGTH(corrupted.slices[1]) > 8); + idx = GRPC_SLICE_LENGTH(corrupted.slices[1]) - 8; + memcpy(GRPC_SLICE_START_PTR(corrupted.slices[1]) + idx, &bad, 4); /* try (and fail) to decompress the corrupted compresed buffer */ GPR_ASSERT(0 == grpc_msg_decompress(GRPC_COMPRESS_GZIP, &corrupted, &output)); diff --git a/test/core/end2end/cq_verifier.c b/test/core/end2end/cq_verifier.c index 3b9aa24368..4fb89eb96e 100644 --- a/test/core/end2end/cq_verifier.c +++ b/test/core/end2end/cq_verifier.c @@ -112,15 +112,15 @@ static grpc_slice merge_slices(grpc_slice *slices, size_t nslices) { grpc_slice out; for (i = 0; i < nslices; i++) { - len += GPR_SLICE_LENGTH(slices[i]); + len += GRPC_SLICE_LENGTH(slices[i]); } out = grpc_slice_malloc(len); - cursor = GPR_SLICE_START_PTR(out); + cursor = GRPC_SLICE_START_PTR(out); for (i = 0; i < nslices; i++) { - memcpy(cursor, GPR_SLICE_START_PTR(slices[i]), GPR_SLICE_LENGTH(slices[i])); - cursor += GPR_SLICE_LENGTH(slices[i]); + memcpy(cursor, GRPC_SLICE_START_PTR(slices[i]), GRPC_SLICE_LENGTH(slices[i])); + cursor += GRPC_SLICE_LENGTH(slices[i]); } return out; @@ -134,9 +134,9 @@ int raw_byte_buffer_eq_slice(grpc_byte_buffer *rbb, grpc_slice b) { a = merge_slices(rbb->data.raw.slice_buffer.slices, rbb->data.raw.slice_buffer.count); - ok = GPR_SLICE_LENGTH(a) == GPR_SLICE_LENGTH(b) && - 0 == memcmp(GPR_SLICE_START_PTR(a), GPR_SLICE_START_PTR(b), - GPR_SLICE_LENGTH(a)); + ok = GRPC_SLICE_LENGTH(a) == GRPC_SLICE_LENGTH(b) && + 0 == memcmp(GRPC_SLICE_START_PTR(a), GRPC_SLICE_START_PTR(b), + GRPC_SLICE_LENGTH(a)); grpc_slice_unref(a); grpc_slice_unref(b); return ok; diff --git a/test/core/end2end/fixtures/http_proxy.c b/test/core/end2end/fixtures/http_proxy.c index 80b9677577..57fc4a38f8 100644 --- a/test/core/end2end/fixtures/http_proxy.c +++ b/test/core/end2end/fixtures/http_proxy.c @@ -37,11 +37,11 @@ #include +#include #include #include #include #include -#include #include #include #include @@ -151,7 +151,7 @@ static void on_client_write_done(grpc_exec_ctx* exec_ctx, void* arg, // write that data now. if (conn->client_deferred_write_buffer.length > 0) { grpc_slice_buffer_move_into(&conn->client_deferred_write_buffer, - &conn->client_write_buffer); + &conn->client_write_buffer); grpc_endpoint_write(exec_ctx, conn->client_endpoint, &conn->client_write_buffer, &conn->on_client_write_done); @@ -176,7 +176,7 @@ static void on_server_write_done(grpc_exec_ctx* exec_ctx, void* arg, // write that data now. if (conn->server_deferred_write_buffer.length > 0) { grpc_slice_buffer_move_into(&conn->server_deferred_write_buffer, - &conn->server_write_buffer); + &conn->server_write_buffer); grpc_endpoint_write(exec_ctx, conn->server_endpoint, &conn->server_write_buffer, &conn->on_server_write_done); @@ -204,10 +204,10 @@ static void on_client_read_done(grpc_exec_ctx* exec_ctx, void* arg, // Otherwise, move the read data into the write buffer and write it. if (conn->server_write_buffer.length > 0) { grpc_slice_buffer_move_into(&conn->client_read_buffer, - &conn->server_deferred_write_buffer); + &conn->server_deferred_write_buffer); } else { grpc_slice_buffer_move_into(&conn->client_read_buffer, - &conn->server_write_buffer); + &conn->server_write_buffer); gpr_ref(&conn->refcount); grpc_endpoint_write(exec_ctx, conn->server_endpoint, &conn->server_write_buffer, @@ -236,10 +236,10 @@ static void on_server_read_done(grpc_exec_ctx* exec_ctx, void* arg, // Otherwise, move the read data into the write buffer and write it. if (conn->client_write_buffer.length > 0) { grpc_slice_buffer_move_into(&conn->server_read_buffer, - &conn->client_deferred_write_buffer); + &conn->client_deferred_write_buffer); } else { grpc_slice_buffer_move_into(&conn->server_read_buffer, - &conn->client_write_buffer); + &conn->client_write_buffer); gpr_ref(&conn->refcount); grpc_endpoint_write(exec_ctx, conn->client_endpoint, &conn->client_write_buffer, @@ -313,7 +313,7 @@ static void on_read_request_done(grpc_exec_ctx* exec_ctx, void* arg, } // Read request and feed it to the parser. for (size_t i = 0; i < conn->client_read_buffer.count; ++i) { - if (GPR_SLICE_LENGTH(conn->client_read_buffer.slices[i]) > 0) { + if (GRPC_SLICE_LENGTH(conn->client_read_buffer.slices[i]) > 0) { error = grpc_http_parser_parse(&conn->http_parser, conn->client_read_buffer.slices[i], NULL); if (error != GRPC_ERROR_NONE) { diff --git a/test/core/end2end/fuzzers/api_fuzzer.c b/test/core/end2end/fuzzers/api_fuzzer.c index 6834922299..4c8aafd8b3 100644 --- a/test/core/end2end/fuzzers/api_fuzzer.c +++ b/test/core/end2end/fuzzers/api_fuzzer.c @@ -138,7 +138,7 @@ static uint32_t read_uint32(input_stream *inp) { static grpc_byte_buffer *read_message(input_stream *inp) { grpc_slice slice = grpc_slice_malloc(read_uint22(inp)); - memset(GPR_SLICE_START_PTR(slice), 0, GPR_SLICE_LENGTH(slice)); + memset(GRPC_SLICE_START_PTR(slice), 0, GRPC_SLICE_LENGTH(slice)); grpc_byte_buffer *out = grpc_raw_byte_buffer_create(&slice, 1); grpc_slice_unref(slice); return out; diff --git a/test/core/end2end/tests/invoke_large_request.c b/test/core/end2end/tests/invoke_large_request.c index 0a4d87c2fb..41d5627b59 100644 --- a/test/core/end2end/tests/invoke_large_request.c +++ b/test/core/end2end/tests/invoke_large_request.c @@ -96,7 +96,7 @@ static void end_test(grpc_end2end_test_fixture *f) { static grpc_slice large_slice(void) { grpc_slice slice = grpc_slice_malloc(1000000); - memset(GPR_SLICE_START_PTR(slice), 'x', GPR_SLICE_LENGTH(slice)); + memset(GRPC_SLICE_START_PTR(slice), 'x', GRPC_SLICE_LENGTH(slice)); return slice; } diff --git a/test/core/handshake/client_ssl.c b/test/core/handshake/client_ssl.c index fdece99720..44efe4dbac 100644 --- a/test/core/handshake/client_ssl.c +++ b/test/core/handshake/client_ssl.c @@ -238,9 +238,9 @@ static bool client_ssl_test(char *server_alpn_preferred) { grpc_load_file(SSL_CERT_PATH, 1, &cert_slice))); GPR_ASSERT(GRPC_LOG_IF_ERROR("load_file", grpc_load_file(SSL_KEY_PATH, 1, &key_slice))); - const char *ca_cert = (const char *)GPR_SLICE_START_PTR(ca_slice); - pem_key_cert_pair.private_key = (const char *)GPR_SLICE_START_PTR(key_slice); - pem_key_cert_pair.cert_chain = (const char *)GPR_SLICE_START_PTR(cert_slice); + const char *ca_cert = (const char *)GRPC_SLICE_START_PTR(ca_slice); + pem_key_cert_pair.private_key = (const char *)GRPC_SLICE_START_PTR(key_slice); + pem_key_cert_pair.cert_chain = (const char *)GRPC_SLICE_START_PTR(cert_slice); grpc_channel_credentials *ssl_creds = grpc_ssl_credentials_create(ca_cert, &pem_key_cert_pair, NULL); diff --git a/test/core/handshake/server_ssl.c b/test/core/handshake/server_ssl.c index f49f98ad9a..f39b0040a6 100644 --- a/test/core/handshake/server_ssl.c +++ b/test/core/handshake/server_ssl.c @@ -91,9 +91,9 @@ static void server_thread(void *arg) { grpc_load_file(SSL_CERT_PATH, 1, &cert_slice))); GPR_ASSERT(GRPC_LOG_IF_ERROR("load_file", grpc_load_file(SSL_KEY_PATH, 1, &key_slice))); - const char *ca_cert = (const char *)GPR_SLICE_START_PTR(ca_slice); - pem_key_cert_pair.private_key = (const char *)GPR_SLICE_START_PTR(key_slice); - pem_key_cert_pair.cert_chain = (const char *)GPR_SLICE_START_PTR(cert_slice); + const char *ca_cert = (const char *)GRPC_SLICE_START_PTR(ca_slice); + pem_key_cert_pair.private_key = (const char *)GRPC_SLICE_START_PTR(key_slice); + pem_key_cert_pair.cert_chain = (const char *)GRPC_SLICE_START_PTR(cert_slice); grpc_server_credentials *ssl_creds = grpc_ssl_server_credentials_create( ca_cert, &pem_key_cert_pair, 1, 0, NULL); diff --git a/test/core/iomgr/endpoint_tests.c b/test/core/iomgr/endpoint_tests.c index 86afdfba72..8a1699608e 100644 --- a/test/core/iomgr/endpoint_tests.c +++ b/test/core/iomgr/endpoint_tests.c @@ -68,12 +68,12 @@ size_t count_slices(grpc_slice *slices, size_t nslices, int *current_data) { size_t j; unsigned char *buf; for (i = 0; i < nslices; ++i) { - buf = GPR_SLICE_START_PTR(slices[i]); - for (j = 0; j < GPR_SLICE_LENGTH(slices[i]); ++j) { + buf = GRPC_SLICE_START_PTR(slices[i]); + for (j = 0; j < GRPC_SLICE_LENGTH(slices[i]); ++j) { GPR_ASSERT(buf[j] == *current_data); *current_data = (*current_data + 1) % 256; } - num_bytes += GPR_SLICE_LENGTH(slices[i]); + num_bytes += GRPC_SLICE_LENGTH(slices[i]); } return num_bytes; } @@ -100,9 +100,9 @@ static grpc_slice *allocate_blocks(size_t num_bytes, size_t slice_size, for (i = 0; i < nslices; ++i) { slices[i] = grpc_slice_malloc(slice_size > num_bytes_left ? num_bytes_left : slice_size); - num_bytes_left -= GPR_SLICE_LENGTH(slices[i]); - buf = GPR_SLICE_START_PTR(slices[i]); - for (j = 0; j < GPR_SLICE_LENGTH(slices[i]); ++j) { + num_bytes_left -= GRPC_SLICE_LENGTH(slices[i]); + buf = GRPC_SLICE_START_PTR(slices[i]); + for (j = 0; j < GRPC_SLICE_LENGTH(slices[i]); ++j) { buf[j] = *current_data; (*current_data)++; } diff --git a/test/core/iomgr/load_file_test.c b/test/core/iomgr/load_file_test.c index b4e1b52d05..af822466d7 100644 --- a/test/core/iomgr/load_file_test.c +++ b/test/core/iomgr/load_file_test.c @@ -63,12 +63,12 @@ static void test_load_empty_file(void) { error = grpc_load_file(tmp_name, 0, &slice); GPR_ASSERT(error == GRPC_ERROR_NONE); - GPR_ASSERT(GPR_SLICE_LENGTH(slice) == 0); + GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == 0); error = grpc_load_file(tmp_name, 1, &slice_with_null_term); GPR_ASSERT(error == GRPC_ERROR_NONE); - GPR_ASSERT(GPR_SLICE_LENGTH(slice_with_null_term) == 1); - GPR_ASSERT(GPR_SLICE_START_PTR(slice_with_null_term)[0] == 0); + GPR_ASSERT(GRPC_SLICE_LENGTH(slice_with_null_term) == 1); + GPR_ASSERT(GRPC_SLICE_START_PTR(slice_with_null_term)[0] == 0); remove(tmp_name); gpr_free(tmp_name); @@ -93,7 +93,7 @@ static void test_load_failure(void) { error = grpc_load_file(tmp_name, 0, &slice); GPR_ASSERT(error != GRPC_ERROR_NONE); GRPC_ERROR_UNREF(error); - GPR_ASSERT(GPR_SLICE_LENGTH(slice) == 0); + GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == 0); gpr_free(tmp_name); grpc_slice_unref(slice); } @@ -116,13 +116,13 @@ static void test_load_small_file(void) { error = grpc_load_file(tmp_name, 0, &slice); GPR_ASSERT(error == GRPC_ERROR_NONE); - GPR_ASSERT(GPR_SLICE_LENGTH(slice) == strlen(blah)); - GPR_ASSERT(!memcmp(GPR_SLICE_START_PTR(slice), blah, strlen(blah))); + GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == strlen(blah)); + GPR_ASSERT(!memcmp(GRPC_SLICE_START_PTR(slice), blah, strlen(blah))); error = grpc_load_file(tmp_name, 1, &slice_with_null_term); GPR_ASSERT(error == GRPC_ERROR_NONE); - GPR_ASSERT(GPR_SLICE_LENGTH(slice_with_null_term) == (strlen(blah) + 1)); - GPR_ASSERT(strcmp((const char *)GPR_SLICE_START_PTR(slice_with_null_term), + GPR_ASSERT(GRPC_SLICE_LENGTH(slice_with_null_term) == (strlen(blah) + 1)); + GPR_ASSERT(strcmp((const char *)GRPC_SLICE_START_PTR(slice_with_null_term), blah) == 0); remove(tmp_name); @@ -153,8 +153,8 @@ static void test_load_big_file(void) { error = grpc_load_file(tmp_name, 0, &slice); GPR_ASSERT(error == GRPC_ERROR_NONE); - GPR_ASSERT(GPR_SLICE_LENGTH(slice) == buffer_size); - current = GPR_SLICE_START_PTR(slice); + GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == buffer_size); + current = GRPC_SLICE_START_PTR(slice); for (i = 0; i < buffer_size; i++) { GPR_ASSERT(current[i] == 42); } diff --git a/test/core/iomgr/tcp_posix_test.c b/test/core/iomgr/tcp_posix_test.c index f23e23f03e..bba1900987 100644 --- a/test/core/iomgr/tcp_posix_test.c +++ b/test/core/iomgr/tcp_posix_test.c @@ -134,12 +134,12 @@ static size_t count_slices(grpc_slice *slices, size_t nslices, unsigned i, j; unsigned char *buf; for (i = 0; i < nslices; ++i) { - buf = GPR_SLICE_START_PTR(slices[i]); - for (j = 0; j < GPR_SLICE_LENGTH(slices[i]); ++j) { + buf = GRPC_SLICE_START_PTR(slices[i]); + for (j = 0; j < GRPC_SLICE_LENGTH(slices[i]); ++j) { GPR_ASSERT(buf[j] == *current_data); *current_data = (*current_data + 1) % 256; } - num_bytes += GPR_SLICE_LENGTH(slices[i]); + num_bytes += GRPC_SLICE_LENGTH(slices[i]); } return num_bytes; } @@ -285,9 +285,9 @@ static grpc_slice *allocate_blocks(size_t num_bytes, size_t slice_size, for (i = 0; i < nslices; ++i) { slices[i] = grpc_slice_malloc(slice_size > num_bytes_left ? num_bytes_left : slice_size); - num_bytes_left -= GPR_SLICE_LENGTH(slices[i]); - buf = GPR_SLICE_START_PTR(slices[i]); - for (j = 0; j < GPR_SLICE_LENGTH(slices[i]); ++j) { + num_bytes_left -= GRPC_SLICE_LENGTH(slices[i]); + buf = GRPC_SLICE_START_PTR(slices[i]); + for (j = 0; j < GRPC_SLICE_LENGTH(slices[i]); ++j) { buf[j] = *current_data; (*current_data)++; } diff --git a/test/core/security/b64_test.c b/test/core/security/b64_test.c index b5c123b4b8..dea0f56266 100644 --- a/test/core/security/b64_test.c +++ b/test/core/security/b64_test.c @@ -58,9 +58,9 @@ static void test_simple_encode_decode_b64(int url_safe, int multiline) { char *hello_b64 = grpc_base64_encode(hello, strlen(hello), url_safe, multiline); grpc_slice hello_slice = grpc_base64_decode(hello_b64, url_safe); - GPR_ASSERT(GPR_SLICE_LENGTH(hello_slice) == strlen(hello)); - GPR_ASSERT(strncmp((const char *)GPR_SLICE_START_PTR(hello_slice), hello, - GPR_SLICE_LENGTH(hello_slice)) == 0); + GPR_ASSERT(GRPC_SLICE_LENGTH(hello_slice) == strlen(hello)); + GPR_ASSERT(strncmp((const char *)GRPC_SLICE_START_PTR(hello_slice), hello, + GRPC_SLICE_LENGTH(hello_slice)) == 0); grpc_slice_unref(hello_slice); gpr_free(hello_b64); @@ -77,8 +77,8 @@ static void test_full_range_encode_decode_b64(int url_safe, int multiline) { for (i = 0; i < 3; i++) { b64 = grpc_base64_encode(orig, sizeof(orig) - i, url_safe, multiline); orig_decoded = grpc_base64_decode(b64, url_safe); - GPR_ASSERT(GPR_SLICE_LENGTH(orig_decoded) == (sizeof(orig) - i)); - GPR_ASSERT(buffers_are_equal(orig, GPR_SLICE_START_PTR(orig_decoded), + GPR_ASSERT(GRPC_SLICE_LENGTH(orig_decoded) == (sizeof(orig) - i)); + GPR_ASSERT(buffers_are_equal(orig, GRPC_SLICE_START_PTR(orig_decoded), sizeof(orig) - i)); grpc_slice_unref(orig_decoded); gpr_free(b64); @@ -127,13 +127,13 @@ static void test_url_safe_unsafe_mismtach_failure(void) { b64 = grpc_base64_encode(orig, sizeof(orig), url_safe, 0); orig_decoded = grpc_base64_decode(b64, !url_safe); - GPR_ASSERT(GPR_SLICE_IS_EMPTY(orig_decoded)); + GPR_ASSERT(GRPC_SLICE_IS_EMPTY(orig_decoded)); gpr_free(b64); grpc_slice_unref(orig_decoded); b64 = grpc_base64_encode(orig, sizeof(orig), !url_safe, 0); orig_decoded = grpc_base64_decode(b64, url_safe); - GPR_ASSERT(GPR_SLICE_IS_EMPTY(orig_decoded)); + GPR_ASSERT(GRPC_SLICE_IS_EMPTY(orig_decoded)); gpr_free(b64); grpc_slice_unref(orig_decoded); } @@ -174,37 +174,37 @@ static void test_unpadded_decode(void) { grpc_slice decoded; decoded = grpc_base64_decode("Zm9vYmFy", 0); - GPR_ASSERT(!GPR_SLICE_IS_EMPTY(decoded)); + GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(decoded)); GPR_ASSERT(grpc_slice_str_cmp(decoded, "foobar") == 0); grpc_slice_unref(decoded); decoded = grpc_base64_decode("Zm9vYmE", 0); - GPR_ASSERT(!GPR_SLICE_IS_EMPTY(decoded)); + GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(decoded)); GPR_ASSERT(grpc_slice_str_cmp(decoded, "fooba") == 0); grpc_slice_unref(decoded); decoded = grpc_base64_decode("Zm9vYg", 0); - GPR_ASSERT(!GPR_SLICE_IS_EMPTY(decoded)); + GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(decoded)); GPR_ASSERT(grpc_slice_str_cmp(decoded, "foob") == 0); grpc_slice_unref(decoded); decoded = grpc_base64_decode("Zm9v", 0); - GPR_ASSERT(!GPR_SLICE_IS_EMPTY(decoded)); + GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(decoded)); GPR_ASSERT(grpc_slice_str_cmp(decoded, "foo") == 0); grpc_slice_unref(decoded); decoded = grpc_base64_decode("Zm8", 0); - GPR_ASSERT(!GPR_SLICE_IS_EMPTY(decoded)); + GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(decoded)); GPR_ASSERT(grpc_slice_str_cmp(decoded, "fo") == 0); grpc_slice_unref(decoded); decoded = grpc_base64_decode("Zg", 0); - GPR_ASSERT(!GPR_SLICE_IS_EMPTY(decoded)); + GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(decoded)); GPR_ASSERT(grpc_slice_str_cmp(decoded, "f") == 0); grpc_slice_unref(decoded); decoded = grpc_base64_decode("", 0); - GPR_ASSERT(GPR_SLICE_IS_EMPTY(decoded)); + GPR_ASSERT(GRPC_SLICE_IS_EMPTY(decoded)); } int main(int argc, char **argv) { diff --git a/test/core/security/create_jwt.c b/test/core/security/create_jwt.c index 157e78092d..0303b791ae 100644 --- a/test/core/security/create_jwt.c +++ b/test/core/security/create_jwt.c @@ -50,7 +50,7 @@ void create_jwt(const char *json_key_file_path, const char *service_url, GPR_ASSERT(GRPC_LOG_IF_ERROR( "load_file", grpc_load_file(json_key_file_path, 1, &json_key_data))); key = grpc_auth_json_key_create_from_string( - (const char *)GPR_SLICE_START_PTR(json_key_data)); + (const char *)GRPC_SLICE_START_PTR(json_key_data)); grpc_slice_unref(json_key_data); if (!grpc_auth_json_key_is_valid(&key)) { fprintf(stderr, "Could not parse json key.\n"); diff --git a/test/core/security/fetch_oauth2.c b/test/core/security/fetch_oauth2.c index 95706a5b81..ca093095c3 100644 --- a/test/core/security/fetch_oauth2.c +++ b/test/core/security/fetch_oauth2.c @@ -53,7 +53,7 @@ static grpc_call_credentials *create_refresh_token_creds( "load_file", grpc_load_file(json_refresh_token_file_path, 1, &refresh_token))); return grpc_google_refresh_token_credentials_create( - (const char *)GPR_SLICE_START_PTR(refresh_token), NULL); + (const char *)GRPC_SLICE_START_PTR(refresh_token), NULL); } int main(int argc, char **argv) { diff --git a/test/core/security/json_token_test.c b/test/core/security/json_token_test.c index c5b0ae9425..593b79855f 100644 --- a/test/core/security/json_token_test.c +++ b/test/core/security/json_token_test.c @@ -228,11 +228,11 @@ static grpc_json *parse_json_part_from_jwt(const char *str, size_t len, strncpy(b64, str, len); b64[len] = '\0'; slice = grpc_base64_decode(b64, 1); - GPR_ASSERT(!GPR_SLICE_IS_EMPTY(slice)); - decoded = gpr_malloc(GPR_SLICE_LENGTH(slice) + 1); - strncpy(decoded, (const char *)GPR_SLICE_START_PTR(slice), - GPR_SLICE_LENGTH(slice)); - decoded[GPR_SLICE_LENGTH(slice)] = '\0'; + GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(slice)); + decoded = gpr_malloc(GRPC_SLICE_LENGTH(slice) + 1); + strncpy(decoded, (const char *)GRPC_SLICE_START_PTR(slice), + GRPC_SLICE_LENGTH(slice)); + decoded[GRPC_SLICE_LENGTH(slice)] = '\0'; json = grpc_json_parse_string(decoded); gpr_free(b64); *scratchpad = decoded; @@ -342,8 +342,8 @@ static void check_jwt_signature(const char *b64_signature, RSA *rsa_key, EVP_PKEY *key = EVP_PKEY_new(); grpc_slice sig = grpc_base64_decode(b64_signature, 1); - GPR_ASSERT(!GPR_SLICE_IS_EMPTY(sig)); - GPR_ASSERT(GPR_SLICE_LENGTH(sig) == 128); + GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(sig)); + GPR_ASSERT(GRPC_SLICE_LENGTH(sig) == 128); GPR_ASSERT(md_ctx != NULL); GPR_ASSERT(key != NULL); @@ -352,8 +352,8 @@ static void check_jwt_signature(const char *b64_signature, RSA *rsa_key, GPR_ASSERT(EVP_DigestVerifyInit(md_ctx, NULL, EVP_sha256(), NULL, key) == 1); GPR_ASSERT(EVP_DigestVerifyUpdate(md_ctx, signed_data, signed_data_size) == 1); - GPR_ASSERT(EVP_DigestVerifyFinal(md_ctx, GPR_SLICE_START_PTR(sig), - GPR_SLICE_LENGTH(sig)) == 1); + GPR_ASSERT(EVP_DigestVerifyFinal(md_ctx, GRPC_SLICE_START_PTR(sig), + GRPC_SLICE_LENGTH(sig)) == 1); grpc_slice_unref(sig); if (key != NULL) EVP_PKEY_free(key); diff --git a/test/core/security/jwt_verifier_test.c b/test/core/security/jwt_verifier_test.c index 5c716235cd..01fe436f27 100644 --- a/test/core/security/jwt_verifier_test.c +++ b/test/core/security/jwt_verifier_test.c @@ -183,7 +183,7 @@ static void test_claims_success(void) { grpc_jwt_claims *claims; grpc_slice s = grpc_slice_from_copied_string(claims_without_time_constraint); grpc_json *json = grpc_json_parse_string_with_len( - (char *)GPR_SLICE_START_PTR(s), GPR_SLICE_LENGTH(s)); + (char *)GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s)); GPR_ASSERT(json != NULL); claims = grpc_jwt_claims_from_json(json, s); GPR_ASSERT(claims != NULL); @@ -201,7 +201,7 @@ static void test_expired_claims_failure(void) { grpc_jwt_claims *claims; grpc_slice s = grpc_slice_from_copied_string(expired_claims); grpc_json *json = grpc_json_parse_string_with_len( - (char *)GPR_SLICE_START_PTR(s), GPR_SLICE_LENGTH(s)); + (char *)GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s)); gpr_timespec exp_iat = {100, 0, GPR_CLOCK_REALTIME}; gpr_timespec exp_exp = {120, 0, GPR_CLOCK_REALTIME}; gpr_timespec exp_nbf = {60, 0, GPR_CLOCK_REALTIME}; @@ -225,7 +225,7 @@ static void test_expired_claims_failure(void) { static void test_invalid_claims_failure(void) { grpc_slice s = grpc_slice_from_copied_string(invalid_claims); grpc_json *json = grpc_json_parse_string_with_len( - (char *)GPR_SLICE_START_PTR(s), GPR_SLICE_LENGTH(s)); + (char *)GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s)); GPR_ASSERT(grpc_jwt_claims_from_json(json, s) == NULL); } @@ -233,7 +233,7 @@ static void test_bad_audience_claims_failure(void) { grpc_jwt_claims *claims; grpc_slice s = grpc_slice_from_copied_string(claims_without_time_constraint); grpc_json *json = grpc_json_parse_string_with_len( - (char *)GPR_SLICE_START_PTR(s), GPR_SLICE_LENGTH(s)); + (char *)GRPC_SLICE_START_PTR(s), GRPC_SLICE_LENGTH(s)); GPR_ASSERT(json != NULL); claims = grpc_jwt_claims_from_json(json, s); GPR_ASSERT(claims != NULL); @@ -484,11 +484,11 @@ static void corrupt_jwt_sig(char *jwt) { char *last_dot = strrchr(jwt, '.'); GPR_ASSERT(last_dot != NULL); sig = grpc_base64_decode(last_dot + 1, 1); - GPR_ASSERT(!GPR_SLICE_IS_EMPTY(sig)); - sig_bytes = GPR_SLICE_START_PTR(sig); + GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(sig)); + sig_bytes = GRPC_SLICE_START_PTR(sig); (*sig_bytes)++; /* Corrupt first byte. */ bad_b64_sig = - grpc_base64_encode(GPR_SLICE_START_PTR(sig), GPR_SLICE_LENGTH(sig), 1, 0); + grpc_base64_encode(GRPC_SLICE_START_PTR(sig), GRPC_SLICE_LENGTH(sig), 1, 0); memcpy(last_dot + 1, bad_b64_sig, strlen(bad_b64_sig)); gpr_free(bad_b64_sig); grpc_slice_unref(sig); diff --git a/test/core/security/oauth2_utils.c b/test/core/security/oauth2_utils.c index 92059bf270..22dbf0428d 100644 --- a/test/core/security/oauth2_utils.c +++ b/test/core/security/oauth2_utils.c @@ -63,10 +63,10 @@ static void on_oauth2_response(grpc_exec_ctx *exec_ctx, void *user_data, } else { GPR_ASSERT(num_md == 1); token_slice = md_elems[0].value; - token = gpr_malloc(GPR_SLICE_LENGTH(token_slice) + 1); - memcpy(token, GPR_SLICE_START_PTR(token_slice), - GPR_SLICE_LENGTH(token_slice)); - token[GPR_SLICE_LENGTH(token_slice)] = '\0'; + token = gpr_malloc(GRPC_SLICE_LENGTH(token_slice) + 1); + memcpy(token, GRPC_SLICE_START_PTR(token_slice), + GRPC_SLICE_LENGTH(token_slice)); + token[GRPC_SLICE_LENGTH(token_slice)] = '\0'; } gpr_mu_lock(request->mu); request->is_done = 1; diff --git a/test/core/security/secure_endpoint_test.c b/test/core/security/secure_endpoint_test.c index e12ca48c2f..b5d95004fe 100644 --- a/test/core/security/secure_endpoint_test.c +++ b/test/core/security/secure_endpoint_test.c @@ -77,8 +77,8 @@ static grpc_endpoint_test_fixture secure_endpoint_create_fixture_tcp_socketpair( grpc_slice encrypted_leftover; for (i = 0; i < leftover_nslices; i++) { grpc_slice plain = leftover_slices[i]; - uint8_t *message_bytes = GPR_SLICE_START_PTR(plain); - size_t message_size = GPR_SLICE_LENGTH(plain); + uint8_t *message_bytes = GRPC_SLICE_START_PTR(plain); + size_t message_size = GRPC_SLICE_LENGTH(plain); while (message_size > 0) { size_t protected_buffer_size_to_send = buffer_size; size_t processed_message_size = message_size; diff --git a/test/core/security/security_connector_test.c b/test/core/security/security_connector_test.c index 898aeb6f42..8872cbe278 100644 --- a/test/core/security/security_connector_test.c +++ b/test/core/security/security_connector_test.c @@ -397,7 +397,7 @@ static void test_default_ssl_roots(void) { an empty slice. */ grpc_set_ssl_roots_override_callback(override_roots_permanent_failure); roots = grpc_get_default_ssl_roots_for_testing(); - GPR_ASSERT(GPR_SLICE_IS_EMPTY(roots)); + GPR_ASSERT(GRPC_SLICE_IS_EMPTY(roots)); /* Cleanup. */ remove(roots_env_var_file_path); diff --git a/test/core/slice/slice_test.c b/test/core/slice/slice_test.c index 19c4657cde..e6d29e7459 100644 --- a/test/core/slice/slice_test.c +++ b/test/core/slice/slice_test.c @@ -55,10 +55,10 @@ static void test_slice_malloc_returns_something_sensible(void) { /* If there is a length, slice.data must be non-NULL. If length is zero we don't care. */ if (length) { - GPR_ASSERT(GPR_SLICE_START_PTR(slice)); + GPR_ASSERT(GRPC_SLICE_START_PTR(slice)); } /* Returned slice length must be what was requested. */ - GPR_ASSERT(GPR_SLICE_LENGTH(slice) == length); + GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == length); /* If the slice has a refcount, it must be destroyable. */ if (slice.refcount) { GPR_ASSERT(slice.refcount->ref != NULL); @@ -66,7 +66,7 @@ static void test_slice_malloc_returns_something_sensible(void) { } /* We must be able to write to every byte of the data */ for (i = 0; i < length; i++) { - GPR_SLICE_START_PTR(slice)[i] = (uint8_t)i; + GRPC_SLICE_START_PTR(slice)[i] = (uint8_t)i; } /* And finally we must succeed in destroying the slice */ grpc_slice_unref(slice); @@ -97,9 +97,9 @@ static void test_slice_new_with_user_data(void) { buf[1] = 1; slice = grpc_slice_new_with_user_data(buf, 2, set_mark, &marker); GPR_ASSERT(marker == 0); - GPR_ASSERT(GPR_SLICE_LENGTH(slice) == 2); - GPR_ASSERT(GPR_SLICE_START_PTR(slice)[0] == 0); - GPR_ASSERT(GPR_SLICE_START_PTR(slice)[1] == 1); + GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == 2); + GPR_ASSERT(GRPC_SLICE_START_PTR(slice)[0] == 0); + GPR_ASSERT(GRPC_SLICE_START_PTR(slice)[1] == 1); /* unref should cause destroy function to run. */ grpc_slice_unref(slice); @@ -152,7 +152,7 @@ static void test_slice_sub_works(unsigned length) { beginning of the slice. */ slice = grpc_slice_malloc(length); for (i = 0; i < length; i++) { - GPR_SLICE_START_PTR(slice)[i] = (uint8_t)i; + GRPC_SLICE_START_PTR(slice)[i] = (uint8_t)i; } /* Ensure that for all subsets length is correct and that we start on the @@ -160,9 +160,9 @@ static void test_slice_sub_works(unsigned length) { for (i = 0; i < length; i++) { for (j = i; j < length; j++) { sub = grpc_slice_sub(slice, i, j); - GPR_ASSERT(GPR_SLICE_LENGTH(sub) == j - i); + GPR_ASSERT(GRPC_SLICE_LENGTH(sub) == j - i); for (k = 0; k < j - i; k++) { - GPR_ASSERT(GPR_SLICE_START_PTR(sub)[k] == (uint8_t)(i + k)); + GPR_ASSERT(GRPC_SLICE_START_PTR(sub)[k] == (uint8_t)(i + k)); } grpc_slice_unref(sub); } @@ -171,12 +171,12 @@ static void test_slice_sub_works(unsigned length) { } static void check_head_tail(grpc_slice slice, grpc_slice head, grpc_slice tail) { - GPR_ASSERT(GPR_SLICE_LENGTH(slice) == - GPR_SLICE_LENGTH(head) + GPR_SLICE_LENGTH(tail)); - GPR_ASSERT(0 == memcmp(GPR_SLICE_START_PTR(slice), GPR_SLICE_START_PTR(head), - GPR_SLICE_LENGTH(head))); - GPR_ASSERT(0 == memcmp(GPR_SLICE_START_PTR(slice) + GPR_SLICE_LENGTH(head), - GPR_SLICE_START_PTR(tail), GPR_SLICE_LENGTH(tail))); + GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == + GRPC_SLICE_LENGTH(head) + GRPC_SLICE_LENGTH(tail)); + GPR_ASSERT(0 == memcmp(GRPC_SLICE_START_PTR(slice), GRPC_SLICE_START_PTR(head), + GRPC_SLICE_LENGTH(head))); + GPR_ASSERT(0 == memcmp(GRPC_SLICE_START_PTR(slice) + GRPC_SLICE_LENGTH(head), + GRPC_SLICE_START_PTR(tail), GRPC_SLICE_LENGTH(tail))); } static void test_slice_split_head_works(size_t length) { @@ -191,7 +191,7 @@ static void test_slice_split_head_works(size_t length) { beginning of the slice. */ slice = grpc_slice_malloc(length); for (i = 0; i < length; i++) { - GPR_SLICE_START_PTR(slice)[i] = (uint8_t)i; + GRPC_SLICE_START_PTR(slice)[i] = (uint8_t)i; } /* Ensure that for all subsets length is correct and that we start on the @@ -219,7 +219,7 @@ static void test_slice_split_tail_works(size_t length) { beginning of the slice. */ slice = grpc_slice_malloc(length); for (i = 0; i < length; i++) { - GPR_SLICE_START_PTR(slice)[i] = (uint8_t)i; + GRPC_SLICE_START_PTR(slice)[i] = (uint8_t)i; } /* Ensure that for all subsets length is correct and that we start on the @@ -242,9 +242,9 @@ static void test_slice_from_copied_string_works(void) { LOG_TEST_NAME("test_slice_from_copied_string_works"); slice = grpc_slice_from_copied_string(text); - GPR_ASSERT(strlen(text) == GPR_SLICE_LENGTH(slice)); + GPR_ASSERT(strlen(text) == GRPC_SLICE_LENGTH(slice)); GPR_ASSERT(0 == - memcmp(text, GPR_SLICE_START_PTR(slice), GPR_SLICE_LENGTH(slice))); + memcmp(text, GRPC_SLICE_START_PTR(slice), GRPC_SLICE_LENGTH(slice))); grpc_slice_unref(slice); } diff --git a/test/core/surface/byte_buffer_reader_test.c b/test/core/surface/byte_buffer_reader_test.c index fe70f22c2b..d8d7a52d15 100644 --- a/test/core/surface/byte_buffer_reader_test.c +++ b/test/core/surface/byte_buffer_reader_test.c @@ -63,7 +63,7 @@ static void test_read_one_slice(void) { "Couldn't init byte buffer reader"); first_code = grpc_byte_buffer_reader_next(&reader, &first_slice); GPR_ASSERT(first_code != 0); - GPR_ASSERT(memcmp(GPR_SLICE_START_PTR(first_slice), "test", 4) == 0); + GPR_ASSERT(memcmp(GRPC_SLICE_START_PTR(first_slice), "test", 4) == 0); grpc_slice_unref(first_slice); second_code = grpc_byte_buffer_reader_next(&reader, &second_slice); GPR_ASSERT(second_code == 0); @@ -79,14 +79,14 @@ static void test_read_one_slice_malloc(void) { LOG_TEST("test_read_one_slice_malloc"); slice = grpc_slice_malloc(4); - memcpy(GPR_SLICE_START_PTR(slice), "test", 4); + memcpy(GRPC_SLICE_START_PTR(slice), "test", 4); buffer = grpc_raw_byte_buffer_create(&slice, 1); grpc_slice_unref(slice); GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, buffer) && "Couldn't init byte buffer reader"); first_code = grpc_byte_buffer_reader_next(&reader, &first_slice); GPR_ASSERT(first_code != 0); - GPR_ASSERT(memcmp(GPR_SLICE_START_PTR(first_slice), "test", 4) == 0); + GPR_ASSERT(memcmp(GRPC_SLICE_START_PTR(first_slice), "test", 4) == 0); grpc_slice_unref(first_slice); second_code = grpc_byte_buffer_reader_next(&reader, &second_slice); GPR_ASSERT(second_code == 0); @@ -108,7 +108,7 @@ static void test_read_none_compressed_slice(void) { "Couldn't init byte buffer reader"); first_code = grpc_byte_buffer_reader_next(&reader, &first_slice); GPR_ASSERT(first_code != 0); - GPR_ASSERT(memcmp(GPR_SLICE_START_PTR(first_slice), "test", 4) == 0); + GPR_ASSERT(memcmp(GRPC_SLICE_START_PTR(first_slice), "test", 4) == 0); grpc_slice_unref(first_slice); second_code = grpc_byte_buffer_reader_next(&reader, &second_slice); GPR_ASSERT(second_code == 0); @@ -143,7 +143,7 @@ static void read_compressed_slice(grpc_compression_algorithm algorithm, grpc_slice_buffer_init(&sliceb_out); input_slice = grpc_slice_malloc(input_size); - memset(GPR_SLICE_START_PTR(input_slice), 'a', input_size); + memset(GRPC_SLICE_START_PTR(input_slice), 'a', input_size); grpc_slice_buffer_add(&sliceb_in, input_slice); /* takes ownership */ GPR_ASSERT(grpc_msg_compress(algorithm, &sliceb_in, &sliceb_out)); @@ -153,10 +153,10 @@ static void read_compressed_slice(grpc_compression_algorithm algorithm, "Couldn't init byte buffer reader"); while (grpc_byte_buffer_reader_next(&reader, &read_slice)) { - GPR_ASSERT(memcmp(GPR_SLICE_START_PTR(read_slice), - GPR_SLICE_START_PTR(input_slice) + read_count, - GPR_SLICE_LENGTH(read_slice)) == 0); - read_count += GPR_SLICE_LENGTH(read_slice); + GPR_ASSERT(memcmp(GRPC_SLICE_START_PTR(read_slice), + GRPC_SLICE_START_PTR(input_slice) + read_count, + GRPC_SLICE_LENGTH(read_slice)) == 0); + read_count += GRPC_SLICE_LENGTH(read_slice); grpc_slice_unref(read_slice); } GPR_ASSERT(read_count == input_size); @@ -185,7 +185,7 @@ static void test_byte_buffer_from_reader(void) { LOG_TEST("test_byte_buffer_from_reader"); slice = grpc_slice_malloc(4); - memcpy(GPR_SLICE_START_PTR(slice), "test", 4); + memcpy(GRPC_SLICE_START_PTR(slice), "test", 4); buffer = grpc_raw_byte_buffer_create(&slice, 1); grpc_slice_unref(slice); GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, buffer) && @@ -195,7 +195,7 @@ static void test_byte_buffer_from_reader(void) { GPR_ASSERT(buffer->type == buffer_from_reader->type); GPR_ASSERT(buffer_from_reader->data.raw.compression == GRPC_COMPRESS_NONE); GPR_ASSERT(buffer_from_reader->data.raw.slice_buffer.count == 1); - GPR_ASSERT(memcmp(GPR_SLICE_START_PTR( + GPR_ASSERT(memcmp(GRPC_SLICE_START_PTR( buffer_from_reader->data.raw.slice_buffer.slices[0]), "test", 4) == 0); @@ -217,9 +217,9 @@ static void test_readall(void) { memset(lotsa_bs, 'b', 1024); /* use slices large enough to overflow inlining */ slices[0] = grpc_slice_malloc(512); - memcpy(GPR_SLICE_START_PTR(slices[0]), lotsa_as, 512); + memcpy(GRPC_SLICE_START_PTR(slices[0]), lotsa_as, 512); slices[1] = grpc_slice_malloc(1024); - memcpy(GPR_SLICE_START_PTR(slices[1]), lotsa_bs, 1024); + memcpy(GRPC_SLICE_START_PTR(slices[1]), lotsa_bs, 1024); buffer = grpc_raw_byte_buffer_create(slices, 2); grpc_slice_unref(slices[0]); @@ -229,9 +229,9 @@ static void test_readall(void) { "Couldn't init byte buffer reader"); slice_out = grpc_byte_buffer_reader_readall(&reader); - GPR_ASSERT(GPR_SLICE_LENGTH(slice_out) == 512 + 1024); - GPR_ASSERT(memcmp(GPR_SLICE_START_PTR(slice_out), lotsa_as, 512) == 0); - GPR_ASSERT(memcmp(&(GPR_SLICE_START_PTR(slice_out)[512]), lotsa_bs, 1024) == + GPR_ASSERT(GRPC_SLICE_LENGTH(slice_out) == 512 + 1024); + GPR_ASSERT(memcmp(GRPC_SLICE_START_PTR(slice_out), lotsa_as, 512) == 0); + GPR_ASSERT(memcmp(&(GRPC_SLICE_START_PTR(slice_out)[512]), lotsa_bs, 1024) == 0); grpc_slice_unref(slice_out); grpc_byte_buffer_destroy(buffer); @@ -252,9 +252,9 @@ static void test_byte_buffer_copy(void) { memset(lotsa_bs, 'b', 1024); /* use slices large enough to overflow inlining */ slices[0] = grpc_slice_malloc(512); - memcpy(GPR_SLICE_START_PTR(slices[0]), lotsa_as, 512); + memcpy(GRPC_SLICE_START_PTR(slices[0]), lotsa_as, 512); slices[1] = grpc_slice_malloc(1024); - memcpy(GPR_SLICE_START_PTR(slices[1]), lotsa_bs, 1024); + memcpy(GRPC_SLICE_START_PTR(slices[1]), lotsa_bs, 1024); buffer = grpc_raw_byte_buffer_create(slices, 2); grpc_slice_unref(slices[0]); @@ -265,9 +265,9 @@ static void test_byte_buffer_copy(void) { "Couldn't init byte buffer reader"); slice_out = grpc_byte_buffer_reader_readall(&reader); - GPR_ASSERT(GPR_SLICE_LENGTH(slice_out) == 512 + 1024); - GPR_ASSERT(memcmp(GPR_SLICE_START_PTR(slice_out), lotsa_as, 512) == 0); - GPR_ASSERT(memcmp(&(GPR_SLICE_START_PTR(slice_out)[512]), lotsa_bs, 1024) == + GPR_ASSERT(GRPC_SLICE_LENGTH(slice_out) == 512 + 1024); + GPR_ASSERT(memcmp(GRPC_SLICE_START_PTR(slice_out), lotsa_as, 512) == 0); + GPR_ASSERT(memcmp(&(GRPC_SLICE_START_PTR(slice_out)[512]), lotsa_bs, 1024) == 0); grpc_slice_unref(slice_out); grpc_byte_buffer_destroy(buffer); diff --git a/test/core/transport/chttp2/hpack_parser_test.c b/test/core/transport/chttp2/hpack_parser_test.c index a051dc8cf3..c7e8f3a050 100644 --- a/test/core/transport/chttp2/hpack_parser_test.c +++ b/test/core/transport/chttp2/hpack_parser_test.c @@ -77,8 +77,8 @@ static void test_vector(grpc_chttp2_hpack_parser *parser, for (i = 0; i < nslices; i++) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; GPR_ASSERT(grpc_chttp2_hpack_parser_parse( - &exec_ctx, parser, GPR_SLICE_START_PTR(slices[i]), - GPR_SLICE_END_PTR(slices[i])) == GRPC_ERROR_NONE); + &exec_ctx, parser, GRPC_SLICE_START_PTR(slices[i]), + GRPC_SLICE_END_PTR(slices[i])) == GRPC_ERROR_NONE); grpc_exec_ctx_finish(&exec_ctx); } diff --git a/test/core/transport/chttp2/varint_test.c b/test/core/transport/chttp2/varint_test.c index 0d9460afc1..5b831c71b2 100644 --- a/test/core/transport/chttp2/varint_test.c +++ b/test/core/transport/chttp2/varint_test.c @@ -47,7 +47,7 @@ static void test_varint(uint32_t value, uint32_t prefix_bits, uint8_t prefix_or, GPR_ASSERT(nbytes == expect_length); slice = grpc_slice_malloc(nbytes); GRPC_CHTTP2_WRITE_VARINT(value, prefix_bits, prefix_or, - GPR_SLICE_START_PTR(slice), nbytes); + GRPC_SLICE_START_PTR(slice), nbytes); GPR_ASSERT(grpc_slice_cmp(expect, slice) == 0); grpc_slice_unref(expect); grpc_slice_unref(slice); diff --git a/test/core/transport/metadata_test.c b/test/core/transport/metadata_test.c index e47777ee72..5c89d8530a 100644 --- a/test/core/transport/metadata_test.c +++ b/test/core/transport/metadata_test.c @@ -279,7 +279,7 @@ static void verify_binary_header_size(const char *key, const uint8_t *value, grpc_slice value_slice = grpc_slice_from_copied_buffer((const char *)value, value_len); grpc_slice base64_encoded = grpc_chttp2_base64_encode(value_slice); - size_t expected_size = 32 + strlen(key) + GPR_SLICE_LENGTH(base64_encoded); + size_t expected_size = 32 + strlen(key) + GRPC_SLICE_LENGTH(base64_encoded); GPR_ASSERT(expected_size == elem_size); grpc_slice_unref(value_slice); grpc_slice_unref(base64_encoded); diff --git a/test/core/util/one_corpus_entry_fuzzer.c b/test/core/util/one_corpus_entry_fuzzer.c index a07e83b775..6b572bb3c3 100644 --- a/test/core/util/one_corpus_entry_fuzzer.c +++ b/test/core/util/one_corpus_entry_fuzzer.c @@ -47,7 +47,7 @@ int main(int argc, char **argv) { leak_check = false; GPR_ASSERT( GRPC_LOG_IF_ERROR("load_file", grpc_load_file(argv[1], 0, &buffer))); - LLVMFuzzerTestOneInput(GPR_SLICE_START_PTR(buffer), GPR_SLICE_LENGTH(buffer)); + LLVMFuzzerTestOneInput(GRPC_SLICE_START_PTR(buffer), GRPC_SLICE_LENGTH(buffer)); grpc_slice_unref(buffer); return 0; } diff --git a/test/core/util/parse_hexstring.c b/test/core/util/parse_hexstring.c index 91149a691a..60ab1bb0c4 100644 --- a/test/core/util/parse_hexstring.c +++ b/test/core/util/parse_hexstring.c @@ -48,7 +48,7 @@ grpc_slice parse_hexstring(const char *hexstring) { GPR_ASSERT((nibbles & 1) == 0); slice = grpc_slice_malloc(nibbles / 2); - out = GPR_SLICE_START_PTR(slice); + out = GRPC_SLICE_START_PTR(slice); nibbles = 0; temp = 0; diff --git a/test/core/util/slice_splitter.c b/test/core/util/slice_splitter.c index 6647b8fbb3..177c9892a5 100644 --- a/test/core/util/slice_splitter.c +++ b/test/core/util/slice_splitter.c @@ -69,28 +69,28 @@ void grpc_split_slices(grpc_slice_split_mode mode, grpc_slice *src_slices, *dst_slice_count = 1; length = 0; for (i = 0; i < src_slice_count; i++) { - length += GPR_SLICE_LENGTH(src_slices[i]); + length += GRPC_SLICE_LENGTH(src_slices[i]); } *dst_slices = gpr_malloc(sizeof(grpc_slice)); **dst_slices = grpc_slice_malloc(length); length = 0; for (i = 0; i < src_slice_count; i++) { - memcpy(GPR_SLICE_START_PTR(**dst_slices) + length, - GPR_SLICE_START_PTR(src_slices[i]), - GPR_SLICE_LENGTH(src_slices[i])); - length += GPR_SLICE_LENGTH(src_slices[i]); + memcpy(GRPC_SLICE_START_PTR(**dst_slices) + length, + GRPC_SLICE_START_PTR(src_slices[i]), + GRPC_SLICE_LENGTH(src_slices[i])); + length += GRPC_SLICE_LENGTH(src_slices[i]); } break; case GRPC_SLICE_SPLIT_ONE_BYTE: length = 0; for (i = 0; i < src_slice_count; i++) { - length += GPR_SLICE_LENGTH(src_slices[i]); + length += GRPC_SLICE_LENGTH(src_slices[i]); } *dst_slice_count = length; *dst_slices = gpr_malloc(sizeof(grpc_slice) * length); length = 0; for (i = 0; i < src_slice_count; i++) { - for (j = 0; j < GPR_SLICE_LENGTH(src_slices[i]); j++) { + for (j = 0; j < GRPC_SLICE_LENGTH(src_slices[i]); j++) { (*dst_slices)[length] = grpc_slice_sub(src_slices[i], j, j + 1); length++; } @@ -125,13 +125,13 @@ grpc_slice grpc_slice_merge(grpc_slice *slices, size_t nslices) { size_t i; for (i = 0; i < nslices; i++) { - if (GPR_SLICE_LENGTH(slices[i]) + length > capacity) { - capacity = GPR_MAX(capacity * 2, GPR_SLICE_LENGTH(slices[i]) + length); + if (GRPC_SLICE_LENGTH(slices[i]) + length > capacity) { + capacity = GPR_MAX(capacity * 2, GRPC_SLICE_LENGTH(slices[i]) + length); out = gpr_realloc(out, capacity); } - memcpy(out + length, GPR_SLICE_START_PTR(slices[i]), - GPR_SLICE_LENGTH(slices[i])); - length += GPR_SLICE_LENGTH(slices[i]); + memcpy(out + length, GRPC_SLICE_START_PTR(slices[i]), + GRPC_SLICE_LENGTH(slices[i])); + length += GRPC_SLICE_LENGTH(slices[i]); } return grpc_slice_new(out, length, gpr_free); diff --git a/test/cpp/grpclb/grpclb_api_test.cc b/test/cpp/grpclb/grpclb_api_test.cc index fed5a2cce1..191d729a9e 100644 --- a/test/cpp/grpclb/grpclb_api_test.cc +++ b/test/cpp/grpclb/grpclb_api_test.cc @@ -72,9 +72,9 @@ TEST_F(GrpclbTest, CreateRequest) { LoadBalanceRequest request; grpc_grpclb_request* c_req = grpc_grpclb_request_create(service_name.c_str()); grpc_slice slice = grpc_grpclb_request_encode(c_req); - const int num_bytes_written = GPR_SLICE_LENGTH(slice); + const int num_bytes_written = GRPC_SLICE_LENGTH(slice); EXPECT_GT(num_bytes_written, 0); - request.ParseFromArray(GPR_SLICE_START_PTR(slice), num_bytes_written); + request.ParseFromArray(GRPC_SLICE_START_PTR(slice), num_bytes_written); EXPECT_EQ(request.initial_request().name(), service_name); grpc_slice_unref(slice); grpc_grpclb_request_destroy(c_req); diff --git a/test/cpp/grpclb/grpclb_test.cc b/test/cpp/grpclb/grpclb_test.cc index a65e425625..a56667585f 100644 --- a/test/cpp/grpclb/grpclb_test.cc +++ b/test/cpp/grpclb/grpclb_test.cc @@ -212,8 +212,8 @@ static void start_lb_server(server_fixture *sf, int *ports, size_t nports, grpc_byte_buffer_reader_init(&bbr, request_payload_recv); grpc_slice request_payload_slice = grpc_byte_buffer_reader_readall(&bbr); grpc::lb::v1::LoadBalanceRequest request; - request.ParseFromArray(GPR_SLICE_START_PTR(request_payload_slice), - GPR_SLICE_LENGTH(request_payload_slice)); + request.ParseFromArray(GRPC_SLICE_START_PTR(request_payload_slice), + GRPC_SLICE_LENGTH(request_payload_slice)); GPR_ASSERT(request.has_initial_request()); GPR_ASSERT(request.initial_request().name() == sf->servers_hostport); grpc_slice_unref(request_payload_slice); diff --git a/test/cpp/util/byte_buffer_test.cc b/test/cpp/util/byte_buffer_test.cc index 2630c76e87..470ce0cbf4 100644 --- a/test/cpp/util/byte_buffer_test.cc +++ b/test/cpp/util/byte_buffer_test.cc @@ -81,11 +81,11 @@ TEST_F(ByteBufferTest, Length) { } bool SliceEqual(const Slice& a, grpc_slice b) { - if (a.size() != GPR_SLICE_LENGTH(b)) { + if (a.size() != GRPC_SLICE_LENGTH(b)) { return false; } for (size_t i = 0; i < a.size(); i++) { - if (a.begin()[i] != GPR_SLICE_START_PTR(b)[i]) { + if (a.begin()[i] != GRPC_SLICE_START_PTR(b)[i]) { return false; } } diff --git a/test/cpp/util/slice_test.cc b/test/cpp/util/slice_test.cc index df8179586a..8926fb7d5a 100644 --- a/test/cpp/util/slice_test.cc +++ b/test/cpp/util/slice_test.cc @@ -73,8 +73,8 @@ TEST_F(SliceTest, Cslice) { Slice spp(s, Slice::STEAL_REF); CheckSlice(spp, kContent); grpc_slice c_slice = spp.c_slice(); - EXPECT_EQ(GPR_SLICE_START_PTR(s), GPR_SLICE_START_PTR(c_slice)); - EXPECT_EQ(GPR_SLICE_END_PTR(s), GPR_SLICE_END_PTR(c_slice)); + EXPECT_EQ(GRPC_SLICE_START_PTR(s), GRPC_SLICE_START_PTR(c_slice)); + EXPECT_EQ(GRPC_SLICE_END_PTR(s), GRPC_SLICE_END_PTR(c_slice)); grpc_slice_unref(c_slice); } -- cgit v1.2.3 From 5b676a6b1ae667ab82f56d5485bf0da229091101 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 26 Oct 2016 21:09:29 -0700 Subject: Fix include guards --- include/grpc++/impl/codegen/thrift_serializer.h | 2 +- include/grpc/slice.h | 6 +++--- include/grpc/slice_buffer.h | 6 +++--- src/core/ext/census/trace_context.h | 2 +- src/core/lib/slice/percent_encoding.h | 6 +++--- src/core/lib/slice/slice_string_helpers.h | 6 +++--- 6 files changed, 14 insertions(+), 14 deletions(-) (limited to 'src/core/lib') diff --git a/include/grpc++/impl/codegen/thrift_serializer.h b/include/grpc++/impl/codegen/thrift_serializer.h index 4d3af91b02..86bc7105c0 100644 --- a/include/grpc++/impl/codegen/thrift_serializer.h +++ b/include/grpc++/impl/codegen/thrift_serializer.h @@ -214,4 +214,4 @@ typedef ThriftSerializer> } // namespace thrift } // namespace apache -#endif +#endif // GRPCXX_IMPL_CODEGEN_THRIFT_SERIALIZER_H diff --git a/include/grpc/slice.h b/include/grpc/slice.h index 5953e0ccb7..ee0bb4928e 100644 --- a/include/grpc/slice.h +++ b/include/grpc/slice.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_SUPPORT_SLICE_H -#define GRPC_SUPPORT_SLICE_H +#ifndef GRPC_SLICE_H +#define GRPC_SLICE_H #include #include @@ -125,4 +125,4 @@ GPRAPI int grpc_slice_str_cmp(grpc_slice a, const char *b); } #endif -#endif /* GRPC_SUPPORT_SLICE_H */ +#endif /* GRPC_SLICE_H */ diff --git a/include/grpc/slice_buffer.h b/include/grpc/slice_buffer.h index f7a2f58f8e..44876f5a30 100644 --- a/include/grpc/slice_buffer.h +++ b/include/grpc/slice_buffer.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_SUPPORT_SLICE_BUFFER_H -#define GRPC_SUPPORT_SLICE_BUFFER_H +#ifndef GRPC_SLICE_BUFFER_H +#define GRPC_SLICE_BUFFER_H #include @@ -84,4 +84,4 @@ GPRAPI grpc_slice grpc_slice_buffer_take_first(grpc_slice_buffer *src); } #endif -#endif /* GRPC_SUPPORT_SLICE_BUFFER_H */ +#endif /* GRPC_SLICE_BUFFER_H */ diff --git a/src/core/ext/census/trace_context.h b/src/core/ext/census/trace_context.h index ee71fef460..1cb5e26ea7 100644 --- a/src/core/ext/census/trace_context.h +++ b/src/core/ext/census/trace_context.h @@ -65,4 +65,4 @@ of these do not exist. On success, returns true and false otherwise. */ bool decode_trace_context(google_trace_TraceContext *ctxt, uint8_t *buffer, const size_t nbytes); -#endif +#endif /* GRPC_CORE_EXT_CENSUS_TRACE_CONTEXT_H */ diff --git a/src/core/lib/slice/percent_encoding.h b/src/core/lib/slice/percent_encoding.h index bb5b1b75bc..189bdbe312 100644 --- a/src/core/lib/slice/percent_encoding.h +++ b/src/core/lib/slice/percent_encoding.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_LIB_SUPPORT_PERCENT_ENCODING_H -#define GRPC_CORE_LIB_SUPPORT_PERCENT_ENCODING_H +#ifndef GRPC_CORE_LIB_SLICE_PERCENT_ENCODING_H +#define GRPC_CORE_LIB_SLICE_PERCENT_ENCODING_H /* Percent encoding and decoding of slices. Transforms arbitrary strings into safe-for-transmission strings by using @@ -75,4 +75,4 @@ bool grpc_strict_percent_decode_slice(grpc_slice slice_in, This cannot fail. */ grpc_slice grpc_permissive_percent_decode_slice(grpc_slice slice_in); -#endif /* GRPC_CORE_LIB_SUPPORT_PERCENT_ENCODING_H */ +#endif /* GRPC_CORE_LIB_SLICE_PERCENT_ENCODING_H */ diff --git a/src/core/lib/slice/slice_string_helpers.h b/src/core/lib/slice/slice_string_helpers.h index 19625c66af..151c720777 100644 --- a/src/core/lib/slice/slice_string_helpers.h +++ b/src/core/lib/slice/slice_string_helpers.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_LIB_SUPPORT_SLICE_STRING_H -#define GRPC_CORE_LIB_SUPPORT_SLICE_STRING_H +#ifndef GRPC_CORE_LIB_SLICE_SLICE_STRING_HELPERS_H +#define GRPC_CORE_LIB_SLICE_SLICE_STRING_HELPERS_H #include @@ -55,4 +55,4 @@ void grpc_slice_split(grpc_slice str, const char *sep, grpc_slice_buffer *dst); } #endif -#endif /* GRPC_CORE_LIB_SUPPORT_STRING_H */ +#endif /* GRPC_CORE_LIB_SLICE_SLICE_STRING_HELPERS_H */ -- cgit v1.2.3 From 28b72428a84ae7d23c106fb282478fa94951c9c0 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 26 Oct 2016 21:15:29 -0700 Subject: clang-format --- include/grpc++/impl/codegen/core_codegen.h | 2 +- .../grpc++/impl/codegen/core_codegen_interface.h | 3 +- include/grpc/slice_buffer.h | 10 ++--- src/core/ext/census/grpc_filter.c | 2 +- .../ext/client_channel/http_connect_handshaker.c | 8 ++-- .../ext/transport/chttp2/transport/bin_decoder.h | 2 +- .../ext/transport/chttp2/transport/bin_encoder.c | 9 ++-- .../ext/transport/chttp2/transport/bin_encoder.h | 3 +- src/core/ext/transport/chttp2/transport/frame.h | 2 +- .../ext/transport/chttp2/transport/frame_goaway.h | 2 +- .../ext/transport/chttp2/transport/frame_ping.c | 2 +- .../transport/chttp2/transport/frame_rst_stream.c | 2 +- .../transport/chttp2/transport/frame_rst_stream.h | 2 +- .../transport/chttp2/transport/frame_settings.c | 2 +- .../transport/chttp2/transport/frame_settings.h | 4 +- .../chttp2/transport/frame_window_update.h | 4 +- .../ext/transport/chttp2/transport/hpack_encoder.c | 5 ++- .../ext/transport/chttp2/transport/hpack_encoder.h | 2 +- .../ext/transport/chttp2/transport/hpack_parser.c | 6 +-- .../ext/transport/chttp2/transport/hpack_table.h | 2 +- src/core/ext/transport/chttp2/transport/internal.h | 3 +- src/core/ext/transport/chttp2/transport/parsing.c | 18 ++++---- src/core/ext/transport/chttp2/transport/writing.c | 10 ++--- .../transport/cronet/transport/cronet_transport.c | 4 +- src/core/lib/channel/compress_filter.c | 2 +- src/core/lib/channel/connected_channel.c | 2 +- src/core/lib/channel/handshaker.c | 4 +- src/core/lib/channel/http_server_filter.c | 2 +- src/core/lib/http/format_request.c | 9 ++-- src/core/lib/http/format_request.h | 4 +- src/core/lib/http/parser.h | 2 +- src/core/lib/iomgr/resource_quota.c | 2 +- src/core/lib/iomgr/tcp_client_windows.c | 2 +- src/core/lib/iomgr/tcp_windows.c | 2 +- src/core/lib/security/transport/handshake.c | 2 +- .../lib/security/transport/security_connector.c | 2 +- src/core/lib/security/util/b64.c | 2 +- src/core/lib/security/util/b64.h | 2 +- src/core/lib/slice/slice.c | 10 ++--- src/core/lib/slice/slice_buffer.c | 12 +++--- src/core/lib/surface/byte_buffer.c | 3 +- src/core/lib/surface/byte_buffer_reader.c | 2 +- src/core/lib/transport/metadata_batch.h | 2 +- src/cpp/client/channel_cc.cc | 2 +- src/cpp/common/core_codegen.cc | 11 +++-- test/core/compression/message_compress_test.c | 14 +++---- test/core/end2end/cq_verifier.c | 3 +- test/core/end2end/invalid_call_argument_test.c | 3 +- test/core/end2end/tests/binary_metadata.c | 6 ++- test/core/end2end/tests/call_creds.c | 9 ++-- test/core/end2end/tests/cancel_after_accept.c | 6 ++- test/core/end2end/tests/cancel_after_client_done.c | 6 ++- test/core/end2end/tests/cancel_after_invoke.c | 3 +- test/core/end2end/tests/cancel_before_invoke.c | 3 +- test/core/end2end/tests/compressed_payload.c | 3 +- test/core/end2end/tests/filter_call_init_fails.c | 3 +- test/core/end2end/tests/filter_causes_close.c | 3 +- test/core/end2end/tests/large_metadata.c | 3 +- test/core/end2end/tests/load_reporting_hook.c | 3 +- test/core/end2end/tests/max_message_length.c | 3 +- test/core/end2end/tests/network_status_change.c | 3 +- test/core/end2end/tests/payload.c | 3 +- test/core/end2end/tests/ping_pong_streaming.c | 6 ++- test/core/end2end/tests/request_with_flags.c | 3 +- test/core/end2end/tests/request_with_payload.c | 3 +- test/core/end2end/tests/resource_quota_server.c | 3 +- test/core/end2end/tests/simple_cacheable_request.c | 6 ++- test/core/end2end/tests/simple_metadata.c | 6 ++- test/core/end2end/tests/trailing_metadata.c | 6 ++- test/core/http/format_request_test.c | 48 +++++++++++----------- test/core/iomgr/endpoint_tests.c | 6 +-- test/core/iomgr/load_file_test.c | 2 +- test/core/iomgr/tcp_posix_test.c | 4 +- test/core/security/b64_test.c | 2 +- test/core/security/create_jwt.c | 2 +- test/core/security/credentials_test.c | 7 ++-- test/core/security/fetch_oauth2.c | 2 +- test/core/security/json_token_test.c | 2 +- test/core/security/jwt_verifier_test.c | 6 +-- test/core/security/oauth2_utils.c | 2 +- .../security/print_google_default_creds_token.c | 2 +- test/core/security/verify_jwt.c | 2 +- test/core/slice/slice_buffer_test.c | 2 +- test/core/slice/slice_test.c | 11 ++--- test/core/transport/chttp2/hpack_parser_test.c | 2 +- test/core/transport/chttp2/varint_test.c | 5 ++- test/core/util/mock_endpoint.h | 3 +- test/core/util/one_corpus_entry_fuzzer.c | 3 +- test/cpp/grpclb/grpclb_test.cc | 3 +- test/cpp/util/cli_call.cc | 2 +- 90 files changed, 235 insertions(+), 183 deletions(-) (limited to 'src/core/lib') diff --git a/include/grpc++/impl/codegen/core_codegen.h b/include/grpc++/impl/codegen/core_codegen.h index c2127a771a..6ab0e17db9 100644 --- a/include/grpc++/impl/codegen/core_codegen.h +++ b/include/grpc++/impl/codegen/core_codegen.h @@ -82,7 +82,7 @@ class CoreCodegen : public CoreCodegenInterface { void grpc_slice_unref(grpc_slice slice) GRPC_OVERRIDE; grpc_slice grpc_slice_split_tail(grpc_slice* s, size_t split) GRPC_OVERRIDE; void grpc_slice_buffer_add(grpc_slice_buffer* sb, - grpc_slice slice) GRPC_OVERRIDE; + grpc_slice slice) GRPC_OVERRIDE; void grpc_slice_buffer_pop(grpc_slice_buffer* sb) GRPC_OVERRIDE; void grpc_metadata_array_init(grpc_metadata_array* array) GRPC_OVERRIDE; diff --git a/include/grpc++/impl/codegen/core_codegen_interface.h b/include/grpc++/impl/codegen/core_codegen_interface.h index 743f528373..4783a43454 100644 --- a/include/grpc++/impl/codegen/core_codegen_interface.h +++ b/include/grpc++/impl/codegen/core_codegen_interface.h @@ -96,7 +96,8 @@ class CoreCodegenInterface { virtual grpc_slice grpc_slice_malloc(size_t length) = 0; virtual void grpc_slice_unref(grpc_slice slice) = 0; virtual grpc_slice grpc_slice_split_tail(grpc_slice* s, size_t split) = 0; - virtual void grpc_slice_buffer_add(grpc_slice_buffer* sb, grpc_slice slice) = 0; + virtual void grpc_slice_buffer_add(grpc_slice_buffer* sb, + grpc_slice slice) = 0; virtual void grpc_slice_buffer_pop(grpc_slice_buffer* sb) = 0; virtual void grpc_metadata_array_init(grpc_metadata_array* array) = 0; diff --git a/include/grpc/slice_buffer.h b/include/grpc/slice_buffer.h index 44876f5a30..f1de653af4 100644 --- a/include/grpc/slice_buffer.h +++ b/include/grpc/slice_buffer.h @@ -56,9 +56,9 @@ GPRAPI void grpc_slice_buffer_add(grpc_slice_buffer *sb, grpc_slice slice); The implementation MAY decide to concatenate data at the end of a small slice added in this fashion. */ GPRAPI size_t grpc_slice_buffer_add_indexed(grpc_slice_buffer *sb, - grpc_slice slice); + grpc_slice slice); GPRAPI void grpc_slice_buffer_addn(grpc_slice_buffer *sb, grpc_slice *slices, - size_t n); + size_t n); /* add a very small (less than 8 bytes) amount of data to the end of a slice buffer: returns a pointer into which to add the data */ GPRAPI uint8_t *grpc_slice_buffer_tiny_add(grpc_slice_buffer *sb, size_t len); @@ -70,13 +70,13 @@ GPRAPI void grpc_slice_buffer_reset_and_unref(grpc_slice_buffer *sb); GPRAPI void grpc_slice_buffer_swap(grpc_slice_buffer *a, grpc_slice_buffer *b); /* move all of the elements of src into dst */ GPRAPI void grpc_slice_buffer_move_into(grpc_slice_buffer *src, - grpc_slice_buffer *dst); + grpc_slice_buffer *dst); /* remove n bytes from the end of a slice buffer */ GPRAPI void grpc_slice_buffer_trim_end(grpc_slice_buffer *src, size_t n, - grpc_slice_buffer *garbage); + grpc_slice_buffer *garbage); /* move the first n bytes of src into dst */ GPRAPI void grpc_slice_buffer_move_first(grpc_slice_buffer *src, size_t n, - grpc_slice_buffer *dst); + grpc_slice_buffer *dst); /* take the first slice in the slice buffer */ GPRAPI grpc_slice grpc_slice_buffer_take_first(grpc_slice_buffer *src); diff --git a/src/core/ext/census/grpc_filter.c b/src/core/ext/census/grpc_filter.c index aa6d24e076..5a283de468 100644 --- a/src/core/ext/census/grpc_filter.c +++ b/src/core/ext/census/grpc_filter.c @@ -37,9 +37,9 @@ #include #include +#include #include #include -#include #include #include "src/core/ext/census/census_interface.h" diff --git a/src/core/ext/client_channel/http_connect_handshaker.c b/src/core/ext/client_channel/http_connect_handshaker.c index 6f1956add9..82042897b2 100644 --- a/src/core/ext/client_channel/http_connect_handshaker.c +++ b/src/core/ext/client_channel/http_connect_handshaker.c @@ -35,9 +35,9 @@ #include +#include #include #include -#include #include #include "src/core/ext/client_channel/uri_parser.h" @@ -136,11 +136,11 @@ static void on_read_done(grpc_exec_ctx* exec_ctx, void* arg, grpc_slice_buffer_add( &tmp_buffer, grpc_slice_split_tail(&handshaker->read_buffer->slices[i], - body_start_offset)); + body_start_offset)); } grpc_slice_buffer_addn(&tmp_buffer, - &handshaker->read_buffer->slices[i + 1], - handshaker->read_buffer->count - i - 1); + &handshaker->read_buffer->slices[i + 1], + handshaker->read_buffer->count - i - 1); grpc_slice_buffer_swap(handshaker->read_buffer, &tmp_buffer); grpc_slice_buffer_destroy(&tmp_buffer); break; diff --git a/src/core/ext/transport/chttp2/transport/bin_decoder.h b/src/core/ext/transport/chttp2/transport/bin_decoder.h index 5e00fd8143..83a90be519 100644 --- a/src/core/ext/transport/chttp2/transport/bin_decoder.h +++ b/src/core/ext/transport/chttp2/transport/bin_decoder.h @@ -61,6 +61,6 @@ grpc_slice grpc_chttp2_base64_decode(grpc_slice input); slice, does not take ownership of the input. Returns an empty slice if decoding is failed. */ grpc_slice grpc_chttp2_base64_decode_with_length(grpc_slice input, - size_t output_length); + size_t output_length); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_DECODER_H */ diff --git a/src/core/ext/transport/chttp2/transport/bin_encoder.c b/src/core/ext/transport/chttp2/transport/bin_encoder.c index 2baa1dc97b..af25a4352a 100644 --- a/src/core/ext/transport/chttp2/transport/bin_encoder.c +++ b/src/core/ext/transport/chttp2/transport/bin_encoder.c @@ -114,13 +114,15 @@ grpc_slice grpc_chttp2_huffman_compress(grpc_slice input) { uint32_t temp_length = 0; nbits = 0; - for (in = GRPC_SLICE_START_PTR(input); in != GRPC_SLICE_END_PTR(input); ++in) { + for (in = GRPC_SLICE_START_PTR(input); in != GRPC_SLICE_END_PTR(input); + ++in) { nbits += grpc_chttp2_huffsyms[*in].length; } output = grpc_slice_malloc(nbits / 8 + (nbits % 8 != 0)); out = GRPC_SLICE_START_PTR(output); - for (in = GRPC_SLICE_START_PTR(input); in != GRPC_SLICE_END_PTR(input); ++in) { + for (in = GRPC_SLICE_START_PTR(input); in != GRPC_SLICE_END_PTR(input); + ++in) { int sym = *in; temp <<= grpc_chttp2_huffsyms[sym].length; temp |= grpc_chttp2_huffsyms[sym].bits; @@ -175,7 +177,8 @@ static void enc_add1(huff_out *out, uint8_t a) { enc_flush_some(out); } -grpc_slice grpc_chttp2_base64_encode_and_huffman_compress_impl(grpc_slice input) { +grpc_slice grpc_chttp2_base64_encode_and_huffman_compress_impl( + grpc_slice input) { size_t input_length = GRPC_SLICE_LENGTH(input); size_t input_triplets = input_length / 3; size_t tail_case = input_length % 3; diff --git a/src/core/ext/transport/chttp2/transport/bin_encoder.h b/src/core/ext/transport/chttp2/transport/bin_encoder.h index 3d86a41a11..9e143b46e2 100644 --- a/src/core/ext/transport/chttp2/transport/bin_encoder.h +++ b/src/core/ext/transport/chttp2/transport/bin_encoder.h @@ -49,6 +49,7 @@ grpc_slice grpc_chttp2_huffman_compress(grpc_slice input); grpc_slice y = grpc_chttp2_huffman_compress(x); grpc_slice_unref(x); return y; */ -grpc_slice grpc_chttp2_base64_encode_and_huffman_compress_impl(grpc_slice input); +grpc_slice grpc_chttp2_base64_encode_and_huffman_compress_impl( + grpc_slice input); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_ENCODER_H */ diff --git a/src/core/ext/transport/chttp2/transport/frame.h b/src/core/ext/transport/chttp2/transport/frame.h index 0b3842b4a1..ffd4d9669b 100644 --- a/src/core/ext/transport/chttp2/transport/frame.h +++ b/src/core/ext/transport/chttp2/transport/frame.h @@ -34,8 +34,8 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_H -#include #include +#include #include "src/core/lib/iomgr/error.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_goaway.h b/src/core/ext/transport/chttp2/transport/frame_goaway.h index 927b7fbd48..21fe819488 100644 --- a/src/core/ext/transport/chttp2/transport/frame_goaway.h +++ b/src/core/ext/transport/chttp2/transport/frame_goaway.h @@ -34,9 +34,9 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_GOAWAY_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_GOAWAY_H -#include #include #include +#include #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/iomgr/exec_ctx.h" diff --git a/src/core/ext/transport/chttp2/transport/frame_ping.c b/src/core/ext/transport/chttp2/transport/frame_ping.c index 18ecb4d1e9..7de5f6362d 100644 --- a/src/core/ext/transport/chttp2/transport/frame_ping.c +++ b/src/core/ext/transport/chttp2/transport/frame_ping.c @@ -94,7 +94,7 @@ grpc_error *grpc_chttp2_ping_parser_parse(grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_ack_ping(exec_ctx, t, p->opaque_8bytes); } else { grpc_slice_buffer_add(&t->qbuf, - grpc_chttp2_ping_create(1, p->opaque_8bytes)); + grpc_chttp2_ping_create(1, p->opaque_8bytes)); grpc_chttp2_initiate_write(exec_ctx, t, false, "ping response"); } } diff --git a/src/core/ext/transport/chttp2/transport/frame_rst_stream.c b/src/core/ext/transport/chttp2/transport/frame_rst_stream.c index 75e4101035..b4c5ed769b 100644 --- a/src/core/ext/transport/chttp2/transport/frame_rst_stream.c +++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.c @@ -43,7 +43,7 @@ #include "src/core/ext/transport/chttp2/transport/status_conversion.h" grpc_slice grpc_chttp2_rst_stream_create(uint32_t id, uint32_t code, - grpc_transport_one_way_stats *stats) { + grpc_transport_one_way_stats *stats) { static const size_t frame_size = 13; grpc_slice slice = grpc_slice_malloc(frame_size); stats->framing_bytes += frame_size; diff --git a/src/core/ext/transport/chttp2/transport/frame_rst_stream.h b/src/core/ext/transport/chttp2/transport/frame_rst_stream.h index f39002a3e9..779507a617 100644 --- a/src/core/ext/transport/chttp2/transport/frame_rst_stream.h +++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.h @@ -45,7 +45,7 @@ typedef struct { } grpc_chttp2_rst_stream_parser; grpc_slice grpc_chttp2_rst_stream_create(uint32_t stream_id, uint32_t code, - grpc_transport_one_way_stats *stats); + grpc_transport_one_way_stats *stats); grpc_error *grpc_chttp2_rst_stream_parser_begin_frame( grpc_chttp2_rst_stream_parser *parser, uint32_t length, uint8_t flags); diff --git a/src/core/ext/transport/chttp2/transport/frame_settings.c b/src/core/ext/transport/chttp2/transport/frame_settings.c index d3b235183b..98facae87f 100644 --- a/src/core/ext/transport/chttp2/transport/frame_settings.c +++ b/src/core/ext/transport/chttp2/transport/frame_settings.c @@ -83,7 +83,7 @@ static uint8_t *fill_header(uint8_t *out, uint32_t length, uint8_t flags) { } grpc_slice grpc_chttp2_settings_create(uint32_t *old, const uint32_t *new, - uint32_t force_mask, size_t count) { + uint32_t force_mask, size_t count) { size_t i; uint32_t n = 0; grpc_slice output; diff --git a/src/core/ext/transport/chttp2/transport/frame_settings.h b/src/core/ext/transport/chttp2/transport/frame_settings.h index bbbecec518..a29dc82106 100644 --- a/src/core/ext/transport/chttp2/transport/frame_settings.h +++ b/src/core/ext/transport/chttp2/transport/frame_settings.h @@ -34,8 +34,8 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_SETTINGS_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_SETTINGS_H -#include #include +#include #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -88,7 +88,7 @@ extern const grpc_chttp2_setting_parameters /* Create a settings frame by diffing old & new, and updating old to be new */ grpc_slice grpc_chttp2_settings_create(uint32_t *old, const uint32_t *new, - uint32_t force_mask, size_t count); + uint32_t force_mask, size_t count); /* Create an ack settings frame */ grpc_slice grpc_chttp2_settings_ack_create(void); diff --git a/src/core/ext/transport/chttp2/transport/frame_window_update.h b/src/core/ext/transport/chttp2/transport/frame_window_update.h index b5f40335a4..f75dfb3d87 100644 --- a/src/core/ext/transport/chttp2/transport/frame_window_update.h +++ b/src/core/ext/transport/chttp2/transport/frame_window_update.h @@ -45,8 +45,8 @@ typedef struct { uint32_t amount; } grpc_chttp2_window_update_parser; -grpc_slice grpc_chttp2_window_update_create(uint32_t id, uint32_t window_delta, - grpc_transport_one_way_stats *stats); +grpc_slice grpc_chttp2_window_update_create( + uint32_t id, uint32_t window_delta, grpc_transport_one_way_stats *stats); grpc_error *grpc_chttp2_window_update_parser_begin_frame( grpc_chttp2_window_update_parser *parser, uint32_t length, uint8_t flags); diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.c b/src/core/ext/transport/chttp2/transport/hpack_encoder.c index 3c5bcd3412..eb68fe3138 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_encoder.c +++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.c @@ -269,8 +269,9 @@ static void emit_indexed(grpc_chttp2_hpack_compressor *c, uint32_t elem_index, } static grpc_slice get_wire_value(grpc_mdelem *elem, uint8_t *huffman_prefix) { - if (grpc_is_binary_header((const char *)GRPC_SLICE_START_PTR(elem->key->slice), - GRPC_SLICE_LENGTH(elem->key->slice))) { + if (grpc_is_binary_header( + (const char *)GRPC_SLICE_START_PTR(elem->key->slice), + GRPC_SLICE_LENGTH(elem->key->slice))) { *huffman_prefix = 0x80; return grpc_mdstr_as_base64_encoded_and_huffman_compressed(elem->value); } diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.h b/src/core/ext/transport/chttp2/transport/hpack_encoder.h index 9188d9c6c5..bcbd675ca2 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_encoder.h +++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.h @@ -34,9 +34,9 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_ENCODER_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_ENCODER_H -#include #include #include +#include #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/transport/metadata.h" #include "src/core/lib/transport/metadata_batch.h" diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.c b/src/core/ext/transport/chttp2/transport/hpack_parser.c index 3c1c6ba5a6..1046c31dda 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parser.c +++ b/src/core/ext/transport/chttp2/transport/hpack_parser.c @@ -1501,9 +1501,9 @@ static grpc_error *is_binary_indexed_header(grpc_chttp2_hpack_parser *p, GRPC_ERROR_INT_INDEX, (intptr_t)p->index), GRPC_ERROR_INT_SIZE, (intptr_t)p->table.num_ents); } - *is = - grpc_is_binary_header((const char *)GRPC_SLICE_START_PTR(elem->key->slice), - GRPC_SLICE_LENGTH(elem->key->slice)); + *is = grpc_is_binary_header( + (const char *)GRPC_SLICE_START_PTR(elem->key->slice), + GRPC_SLICE_LENGTH(elem->key->slice)); return GRPC_ERROR_NONE; } diff --git a/src/core/ext/transport/chttp2/transport/hpack_table.h b/src/core/ext/transport/chttp2/transport/hpack_table.h index bc5a2d2463..2ca130e64b 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_table.h +++ b/src/core/ext/transport/chttp2/transport/hpack_table.h @@ -34,8 +34,8 @@ #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_TABLE_H #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_TABLE_H -#include #include +#include #include "src/core/lib/iomgr/error.h" #include "src/core/lib/transport/metadata.h" diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 18fa2b4890..b74233d992 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -466,7 +466,8 @@ void grpc_chttp2_end_write(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, /** Process one slice of incoming data; return 1 if the connection is still viable after reading, or 0 if the connection should be torn down */ grpc_error *grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, - grpc_chttp2_transport *t, grpc_slice slice); + grpc_chttp2_transport *t, + grpc_slice slice); bool grpc_chttp2_list_add_writable_stream(grpc_chttp2_transport *t, grpc_chttp2_stream *s); diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index cb88fd5baf..b9c405158f 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -229,10 +229,10 @@ grpc_error *grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, case GRPC_DTS_FRAME: GPR_ASSERT(cur < end); if ((uint32_t)(end - cur) == t->incoming_frame_size) { - err = parse_frame_slice(exec_ctx, t, - grpc_slice_sub_no_ref(slice, (size_t)(cur - beg), - (size_t)(end - beg)), - 1); + err = parse_frame_slice( + exec_ctx, t, grpc_slice_sub_no_ref(slice, (size_t)(cur - beg), + (size_t)(end - beg)), + 1); if (err != GRPC_ERROR_NONE) { return err; } @@ -244,7 +244,7 @@ grpc_error *grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, err = parse_frame_slice( exec_ctx, t, grpc_slice_sub_no_ref(slice, cur_offset, - cur_offset + t->incoming_frame_size), + cur_offset + t->incoming_frame_size), 1); if (err != GRPC_ERROR_NONE) { return err; @@ -253,10 +253,10 @@ grpc_error *grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, t->incoming_stream = NULL; goto dts_fh_0; /* loop */ } else { - err = parse_frame_slice(exec_ctx, t, - grpc_slice_sub_no_ref(slice, (size_t)(cur - beg), - (size_t)(end - beg)), - 0); + err = parse_frame_slice( + exec_ctx, t, grpc_slice_sub_no_ref(slice, (size_t)(cur - beg), + (size_t)(end - beg)), + 0); if (err != GRPC_ERROR_NONE) { return err; } diff --git a/src/core/ext/transport/chttp2/transport/writing.c b/src/core/ext/transport/chttp2/transport/writing.c index 1486a7edb4..139e7387c4 100644 --- a/src/core/ext/transport/chttp2/transport/writing.c +++ b/src/core/ext/transport/chttp2/transport/writing.c @@ -131,8 +131,8 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx, if (s->announce_window > 0) { uint32_t announce = s->announce_window; grpc_slice_buffer_add(&t->outbuf, - grpc_chttp2_window_update_create( - s->id, s->announce_window, &s->stats.outgoing)); + grpc_chttp2_window_update_create( + s->id, s->announce_window, &s->stats.outgoing)); GRPC_CHTTP2_FLOW_DEBIT_STREAM("write", t, s, announce_window, announce); } if (sent_initial_metadata) { @@ -163,8 +163,8 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx, s->sent_trailing_metadata = true; if (!t->is_client && !s->read_closed) { grpc_slice_buffer_add(&t->outbuf, grpc_chttp2_rst_stream_create( - s->id, GRPC_CHTTP2_NO_ERROR, - &s->stats.outgoing)); + s->id, GRPC_CHTTP2_NO_ERROR, + &s->stats.outgoing)); } } s->sending_bytes += send_bytes; @@ -221,7 +221,7 @@ bool grpc_chttp2_begin_write(grpc_exec_ctx *exec_ctx, announced); grpc_transport_one_way_stats throwaway_stats; grpc_slice_buffer_add(&t->outbuf, grpc_chttp2_window_update_create( - 0, announced, &throwaway_stats)); + 0, announced, &throwaway_stats)); } GPR_TIMER_END("grpc_chttp2_begin_write", 0); diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 73fda07ee1..1e5377c2b4 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -34,10 +34,10 @@ #include #include +#include #include #include #include -#include #include #include @@ -926,7 +926,7 @@ static enum e_op_result execute_stream_op(grpc_exec_ctx *exec_ctx, free_read_buffer(s); grpc_slice_buffer_init(&stream_state->rs.read_slice_buffer); grpc_slice_buffer_add(&stream_state->rs.read_slice_buffer, - read_data_slice); + read_data_slice); grpc_slice_buffer_stream_init(&stream_state->rs.sbs, &stream_state->rs.read_slice_buffer, 0); *((grpc_byte_buffer **)stream_op->recv_message) = diff --git a/src/core/lib/channel/compress_filter.c b/src/core/lib/channel/compress_filter.c index c42a81b3b5..de71bcc22b 100644 --- a/src/core/lib/channel/compress_filter.c +++ b/src/core/lib/channel/compress_filter.c @@ -35,9 +35,9 @@ #include #include +#include #include #include -#include #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/compress_filter.h" diff --git a/src/core/lib/channel/connected_channel.c b/src/core/lib/channel/connected_channel.c index 2ae86f5507..0e62d58475 100644 --- a/src/core/lib/channel/connected_channel.c +++ b/src/core/lib/channel/connected_channel.c @@ -38,9 +38,9 @@ #include #include +#include #include #include -#include #include "src/core/lib/profiling/timers.h" #include "src/core/lib/support/string.h" #include "src/core/lib/transport/transport.h" diff --git a/src/core/lib/channel/handshaker.c b/src/core/lib/channel/handshaker.c index 00d39764d7..a45a39981c 100644 --- a/src/core/lib/channel/handshaker.c +++ b/src/core/lib/channel/handshaker.c @@ -146,8 +146,8 @@ void grpc_handshake_manager_shutdown(grpc_exec_ctx* exec_ctx, static void call_next_handshaker(grpc_exec_ctx* exec_ctx, grpc_endpoint* endpoint, grpc_channel_args* args, - grpc_slice_buffer* read_buffer, void* user_data, - grpc_error* error) { + grpc_slice_buffer* read_buffer, + void* user_data, grpc_error* error) { grpc_handshake_manager* mgr = user_data; GPR_ASSERT(mgr->state != NULL); GPR_ASSERT(mgr->state->index < mgr->count); diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c index 1a73a07b81..10631850cd 100644 --- a/src/core/lib/channel/http_server_filter.c +++ b/src/core/lib/channel/http_server_filter.c @@ -164,7 +164,7 @@ static grpc_mdelem *server_filter(void *user_data, grpc_mdelem *md) { calld->seen_payload_bin = 1; grpc_slice_buffer_init(&calld->read_slice_buffer); grpc_slice_buffer_add(&calld->read_slice_buffer, - grpc_slice_ref(md->value->slice)); + grpc_slice_ref(md->value->slice)); grpc_slice_buffer_stream_init(&calld->read_stream, &calld->read_slice_buffer, 0); return NULL; diff --git a/src/core/lib/http/format_request.c b/src/core/lib/http/format_request.c index 59ff28f67f..024664b6ee 100644 --- a/src/core/lib/http/format_request.c +++ b/src/core/lib/http/format_request.c @@ -37,8 +37,8 @@ #include #include -#include #include +#include #include #include #include "src/core/lib/support/string.h" @@ -65,7 +65,8 @@ static void fill_common_header(const grpc_httpcli_request *request, } } -grpc_slice grpc_httpcli_format_get_request(const grpc_httpcli_request *request) { +grpc_slice grpc_httpcli_format_get_request( + const grpc_httpcli_request *request) { gpr_strvec out; char *flat; size_t flat_len; @@ -82,8 +83,8 @@ grpc_slice grpc_httpcli_format_get_request(const grpc_httpcli_request *request) } grpc_slice grpc_httpcli_format_post_request(const grpc_httpcli_request *request, - const char *body_bytes, - size_t body_size) { + const char *body_bytes, + size_t body_size) { gpr_strvec out; char *tmp; size_t out_len; diff --git a/src/core/lib/http/format_request.h b/src/core/lib/http/format_request.h index ad51701bbb..1c8e3f68c5 100644 --- a/src/core/lib/http/format_request.h +++ b/src/core/lib/http/format_request.h @@ -39,8 +39,8 @@ grpc_slice grpc_httpcli_format_get_request(const grpc_httpcli_request *request); grpc_slice grpc_httpcli_format_post_request(const grpc_httpcli_request *request, - const char *body_bytes, - size_t body_size); + const char *body_bytes, + size_t body_size); grpc_slice grpc_httpcli_format_connect_request( const grpc_httpcli_request *request); diff --git a/src/core/lib/http/parser.h b/src/core/lib/http/parser.h index 6d003cd68c..a68011dd43 100644 --- a/src/core/lib/http/parser.h +++ b/src/core/lib/http/parser.h @@ -34,8 +34,8 @@ #ifndef GRPC_CORE_LIB_HTTP_PARSER_H #define GRPC_CORE_LIB_HTTP_PARSER_H -#include #include +#include #include "src/core/lib/iomgr/error.h" /* Maximum length of a header string of the form 'Key: Value\r\n' */ diff --git a/src/core/lib/iomgr/resource_quota.c b/src/core/lib/iomgr/resource_quota.c index f047f45b43..6d7e549bb7 100644 --- a/src/core/lib/iomgr/resource_quota.c +++ b/src/core/lib/iomgr/resource_quota.c @@ -300,7 +300,7 @@ static void ru_slice_unref(void *p) { } static grpc_slice ru_slice_create(grpc_resource_user *resource_user, - size_t size) { + size_t size) { ru_slice_refcount *rc = gpr_malloc(sizeof(ru_slice_refcount) + size); rc->base.ref = ru_slice_ref; rc->base.unref = ru_slice_unref; diff --git a/src/core/lib/iomgr/tcp_client_windows.c b/src/core/lib/iomgr/tcp_client_windows.c index 9f28c056d9..598c012589 100644 --- a/src/core/lib/iomgr/tcp_client_windows.c +++ b/src/core/lib/iomgr/tcp_client_windows.c @@ -37,10 +37,10 @@ #include "src/core/lib/iomgr/sockaddr_windows.h" +#include #include #include #include -#include #include #include "src/core/lib/iomgr/iocp_windows.h" diff --git a/src/core/lib/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.c index 9fe7662e96..bc1b91e109 100644 --- a/src/core/lib/iomgr/tcp_windows.c +++ b/src/core/lib/iomgr/tcp_windows.c @@ -40,10 +40,10 @@ #include "src/core/lib/iomgr/network_status_tracker.h" #include "src/core/lib/iomgr/sockaddr_windows.h" +#include #include #include #include -#include #include #include diff --git a/src/core/lib/security/transport/handshake.c b/src/core/lib/security/transport/handshake.c index 07f16df51f..01e7fab773 100644 --- a/src/core/lib/security/transport/handshake.c +++ b/src/core/lib/security/transport/handshake.c @@ -36,9 +36,9 @@ #include #include +#include #include #include -#include #include "src/core/lib/iomgr/timer.h" #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/security/transport/secure_endpoint.h" diff --git a/src/core/lib/security/transport/security_connector.c b/src/core/lib/security/transport/security_connector.c index 3d39cf5dda..f7e3264bda 100644 --- a/src/core/lib/security/transport/security_connector.c +++ b/src/core/lib/security/transport/security_connector.c @@ -36,10 +36,10 @@ #include #include +#include #include #include #include -#include #include #include "src/core/ext/transport/chttp2/alpn/alpn.h" diff --git a/src/core/lib/security/util/b64.c b/src/core/lib/security/util/b64.c index 6270277914..4892e8e621 100644 --- a/src/core/lib/security/util/b64.c +++ b/src/core/lib/security/util/b64.c @@ -183,7 +183,7 @@ static int decode_group(const unsigned char *codes, size_t num_codes, } grpc_slice grpc_base64_decode_with_len(const char *b64, size_t b64_len, - int url_safe) { + int url_safe) { grpc_slice result = grpc_slice_malloc(b64_len); unsigned char *current = GRPC_SLICE_START_PTR(result); size_t result_size = 0; diff --git a/src/core/lib/security/util/b64.h b/src/core/lib/security/util/b64.h index f3218b9c4f..6ea0b5365b 100644 --- a/src/core/lib/security/util/b64.h +++ b/src/core/lib/security/util/b64.h @@ -47,6 +47,6 @@ grpc_slice grpc_base64_decode(const char *b64, int url_safe); /* Same as above except that the length is provided by the caller. */ grpc_slice grpc_base64_decode_with_len(const char *b64, size_t b64_len, - int url_safe); + int url_safe); #endif /* GRPC_CORE_LIB_SECURITY_UTIL_B64_H */ diff --git a/src/core/lib/slice/slice.c b/src/core/lib/slice/slice.c index 54ff6f6baa..3dac18df61 100644 --- a/src/core/lib/slice/slice.c +++ b/src/core/lib/slice/slice.c @@ -31,9 +31,9 @@ * */ +#include #include #include -#include #include @@ -62,7 +62,7 @@ void grpc_slice_unref(grpc_slice slice) { static void noop_ref_or_unref(void *unused) {} static grpc_slice_refcount noop_refcount = {noop_ref_or_unref, - noop_ref_or_unref}; + noop_ref_or_unref}; grpc_slice grpc_slice_from_static_string(const char *s) { grpc_slice slice; @@ -95,8 +95,8 @@ static void new_slice_unref(void *p) { } grpc_slice grpc_slice_new_with_user_data(void *p, size_t len, - void (*destroy)(void *), - void *user_data) { + void (*destroy)(void *), + void *user_data) { grpc_slice slice; new_slice_refcount *rc = gpr_malloc(sizeof(new_slice_refcount)); gpr_ref_init(&rc->refs, 1); @@ -140,7 +140,7 @@ static void new_with_len_unref(void *p) { } grpc_slice grpc_slice_new_with_len(void *p, size_t len, - void (*destroy)(void *, size_t)) { + void (*destroy)(void *, size_t)) { grpc_slice slice; new_with_len_slice_refcount *rc = gpr_malloc(sizeof(new_with_len_slice_refcount)); diff --git a/src/core/lib/slice/slice_buffer.c b/src/core/lib/slice/slice_buffer.c index 8416237631..990ef128bd 100644 --- a/src/core/lib/slice/slice_buffer.c +++ b/src/core/lib/slice/slice_buffer.c @@ -31,8 +31,8 @@ * */ -#include #include +#include #include @@ -112,7 +112,8 @@ void grpc_slice_buffer_add(grpc_slice_buffer *sb, grpc_slice s) { writes */ if (!s.refcount && n) { grpc_slice *back = &sb->slices[n - 1]; - if (!back->refcount && back->data.inlined.length < GRPC_SLICE_INLINED_SIZE) { + if (!back->refcount && + back->data.inlined.length < GRPC_SLICE_INLINED_SIZE) { if (s.data.inlined.length + back->data.inlined.length <= GRPC_SLICE_INLINED_SIZE) { memcpy(back->data.inlined.bytes + back->data.inlined.length, @@ -193,7 +194,8 @@ void grpc_slice_buffer_swap(grpc_slice_buffer *a, grpc_slice_buffer *b) { } } -void grpc_slice_buffer_move_into(grpc_slice_buffer *src, grpc_slice_buffer *dst) { +void grpc_slice_buffer_move_into(grpc_slice_buffer *src, + grpc_slice_buffer *dst) { /* anything to move? */ if (src->count == 0) { return; @@ -210,7 +212,7 @@ void grpc_slice_buffer_move_into(grpc_slice_buffer *src, grpc_slice_buffer *dst) } void grpc_slice_buffer_move_first(grpc_slice_buffer *src, size_t n, - grpc_slice_buffer *dst) { + grpc_slice_buffer *dst) { size_t src_idx; size_t output_len = dst->length + n; size_t new_input_len = src->length - n; @@ -248,7 +250,7 @@ void grpc_slice_buffer_move_first(grpc_slice_buffer *src, size_t n, } void grpc_slice_buffer_trim_end(grpc_slice_buffer *sb, size_t n, - grpc_slice_buffer *garbage) { + grpc_slice_buffer *garbage) { GPR_ASSERT(n <= sb->length); sb->length -= n; for (;;) { diff --git a/src/core/lib/surface/byte_buffer.c b/src/core/lib/surface/byte_buffer.c index 5ae7e3264b..d646591a65 100644 --- a/src/core/lib/surface/byte_buffer.c +++ b/src/core/lib/surface/byte_buffer.c @@ -42,7 +42,8 @@ grpc_byte_buffer *grpc_raw_byte_buffer_create(grpc_slice *slices, } grpc_byte_buffer *grpc_raw_compressed_byte_buffer_create( - grpc_slice *slices, size_t nslices, grpc_compression_algorithm compression) { + grpc_slice *slices, size_t nslices, + grpc_compression_algorithm compression) { size_t i; grpc_byte_buffer *bb = gpr_malloc(sizeof(grpc_byte_buffer)); bb->type = GRPC_BB_RAW; diff --git a/src/core/lib/surface/byte_buffer_reader.c b/src/core/lib/surface/byte_buffer_reader.c index 6a1ef2ba2d..0089959fbb 100644 --- a/src/core/lib/surface/byte_buffer_reader.c +++ b/src/core/lib/surface/byte_buffer_reader.c @@ -37,9 +37,9 @@ #include #include #include +#include #include #include -#include #include "src/core/lib/compression/message_compress.h" diff --git a/src/core/lib/transport/metadata_batch.h b/src/core/lib/transport/metadata_batch.h index 1b5525e631..7a9ccb4bc8 100644 --- a/src/core/lib/transport/metadata_batch.h +++ b/src/core/lib/transport/metadata_batch.h @@ -37,8 +37,8 @@ #include #include -#include #include +#include #include #include "src/core/lib/transport/metadata.h" diff --git a/src/cpp/client/channel_cc.cc b/src/cpp/client/channel_cc.cc index e18f9f527c..d4afb1f00e 100644 --- a/src/cpp/client/channel_cc.cc +++ b/src/cpp/client/channel_cc.cc @@ -47,8 +47,8 @@ #include #include #include -#include #include +#include #include "src/core/lib/profiling/timers.h" namespace grpc { diff --git a/src/cpp/common/core_codegen.cc b/src/cpp/common/core_codegen.cc index fef8cc3d22..a07ad54376 100644 --- a/src/cpp/common/core_codegen.cc +++ b/src/cpp/common/core_codegen.cc @@ -39,11 +39,11 @@ #include #include #include +#include +#include #include #include #include -#include -#include #include #include "src/core/lib/profiling/timers.h" @@ -115,13 +115,16 @@ grpc_slice CoreCodegen::grpc_slice_malloc(size_t length) { return ::grpc_slice_malloc(length); } -void CoreCodegen::grpc_slice_unref(grpc_slice slice) { ::grpc_slice_unref(slice); } +void CoreCodegen::grpc_slice_unref(grpc_slice slice) { + ::grpc_slice_unref(slice); +} grpc_slice CoreCodegen::grpc_slice_split_tail(grpc_slice* s, size_t split) { return ::grpc_slice_split_tail(s, split); } -void CoreCodegen::grpc_slice_buffer_add(grpc_slice_buffer* sb, grpc_slice slice) { +void CoreCodegen::grpc_slice_buffer_add(grpc_slice_buffer* sb, + grpc_slice slice) { ::grpc_slice_buffer_add(sb, slice); } diff --git a/test/core/compression/message_compress_test.c b/test/core/compression/message_compress_test.c index 680850af33..fc53cd9d36 100644 --- a/test/core/compression/message_compress_test.c +++ b/test/core/compression/message_compress_test.c @@ -70,8 +70,8 @@ static void assert_passthrough(grpc_slice value, GPR_INFO, "assert_passthrough: value_length=%" PRIuPTR " value_hash=0x%08x " "algorithm='%s' uncompressed_split='%s' compressed_split='%s'", - GRPC_SLICE_LENGTH(value), - gpr_murmur_hash3(GRPC_SLICE_START_PTR(value), GRPC_SLICE_LENGTH(value), 0), + GRPC_SLICE_LENGTH(value), gpr_murmur_hash3(GRPC_SLICE_START_PTR(value), + GRPC_SLICE_LENGTH(value), 0), algorithm_name, grpc_slice_split_mode_name(uncompressed_split_mode), grpc_slice_split_mode_name(compressed_split_mode)); @@ -221,7 +221,7 @@ static void test_bad_decompression_data_stream(void) { grpc_slice_buffer_init(&input); grpc_slice_buffer_init(&output); grpc_slice_buffer_add(&input, - grpc_slice_from_copied_buffer("\x78\xda\xff\xff", 4)); + grpc_slice_from_copied_buffer("\x78\xda\xff\xff", 4)); /* try (and fail) to decompress the invalid compresed buffer */ GPR_ASSERT(0 == grpc_msg_decompress(GRPC_COMPRESS_DEFLATE, &input, &output)); @@ -237,8 +237,8 @@ static void test_bad_compression_algorithm(void) { grpc_slice_buffer_init(&input); grpc_slice_buffer_init(&output); - grpc_slice_buffer_add(&input, - grpc_slice_from_copied_string("Never gonna give you up")); + grpc_slice_buffer_add( + &input, grpc_slice_from_copied_string("Never gonna give you up")); was_compressed = grpc_msg_compress(GRPC_COMPRESS_ALGORITHMS_COUNT, &input, &output); GPR_ASSERT(0 == was_compressed); @@ -259,8 +259,8 @@ static void test_bad_decompression_algorithm(void) { grpc_slice_buffer_init(&input); grpc_slice_buffer_init(&output); grpc_slice_buffer_add(&input, - grpc_slice_from_copied_string( - "I'm not really compressed but it doesn't matter")); + grpc_slice_from_copied_string( + "I'm not really compressed but it doesn't matter")); was_decompressed = grpc_msg_decompress(GRPC_COMPRESS_ALGORITHMS_COUNT, &input, &output); GPR_ASSERT(0 == was_decompressed); diff --git a/test/core/end2end/cq_verifier.c b/test/core/end2end/cq_verifier.c index 4fb89eb96e..57373970c4 100644 --- a/test/core/end2end/cq_verifier.c +++ b/test/core/end2end/cq_verifier.c @@ -119,7 +119,8 @@ static grpc_slice merge_slices(grpc_slice *slices, size_t nslices) { cursor = GRPC_SLICE_START_PTR(out); for (i = 0; i < nslices; i++) { - memcpy(cursor, GRPC_SLICE_START_PTR(slices[i]), GRPC_SLICE_LENGTH(slices[i])); + memcpy(cursor, GRPC_SLICE_START_PTR(slices[i]), + GRPC_SLICE_LENGTH(slices[i])); cursor += GRPC_SLICE_LENGTH(slices[i]); } diff --git a/test/core/end2end/invalid_call_argument_test.c b/test/core/end2end/invalid_call_argument_test.c index 6cc7d28489..765b6ad1be 100644 --- a/test/core/end2end/invalid_call_argument_test.c +++ b/test/core/end2end/invalid_call_argument_test.c @@ -251,7 +251,8 @@ static void test_send_messages_at_the_same_time() { gpr_log(GPR_INFO, "test_send_messages_at_the_same_time"); grpc_op *op; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); prepare_test(1); diff --git a/test/core/end2end/tests/binary_metadata.c b/test/core/end2end/tests/binary_metadata.c index 317ca3110b..b0d18191e0 100644 --- a/test/core/end2end/tests/binary_metadata.c +++ b/test/core/end2end/tests/binary_metadata.c @@ -100,8 +100,10 @@ static void test_request_response_with_metadata_and_payload( grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); - grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = + grpc_slice_from_copied_string("hello you"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_byte_buffer *response_payload = diff --git a/test/core/end2end/tests/call_creds.c b/test/core/end2end/tests/call_creds.c index 8f8b7d5119..05a379cf1b 100644 --- a/test/core/end2end/tests/call_creds.c +++ b/test/core/end2end/tests/call_creds.c @@ -135,8 +135,10 @@ static void request_response_with_payload_and_call_creds( override_mode mode) { grpc_call *c; grpc_call *s; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); - grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = + grpc_slice_from_copied_string("hello you"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_byte_buffer *response_payload = @@ -389,7 +391,8 @@ static void test_request_with_server_rejecting_client_creds( char *details = NULL; size_t details_capacity = 0; grpc_byte_buffer *response_payload_recv = NULL; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_call_credentials *creds; diff --git a/test/core/end2end/tests/cancel_after_accept.c b/test/core/end2end/tests/cancel_after_accept.c index 4bf55c8725..f67da2d90d 100644 --- a/test/core/end2end/tests/cancel_after_accept.c +++ b/test/core/end2end/tests/cancel_after_accept.c @@ -118,8 +118,10 @@ static void test_cancel_after_accept(grpc_end2end_test_config config, size_t details_capacity = 0; grpc_byte_buffer *request_payload_recv = NULL; grpc_byte_buffer *response_payload_recv = NULL; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); - grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = + grpc_slice_from_copied_string("hello you"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_byte_buffer *response_payload = diff --git a/test/core/end2end/tests/cancel_after_client_done.c b/test/core/end2end/tests/cancel_after_client_done.c index afb17b0719..44be85435d 100644 --- a/test/core/end2end/tests/cancel_after_client_done.c +++ b/test/core/end2end/tests/cancel_after_client_done.c @@ -117,8 +117,10 @@ static void test_cancel_after_accept_and_writes_closed( size_t details_capacity = 0; grpc_byte_buffer *request_payload_recv = NULL; grpc_byte_buffer *response_payload_recv = NULL; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); - grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = + grpc_slice_from_copied_string("hello you"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_byte_buffer *response_payload = diff --git a/test/core/end2end/tests/cancel_after_invoke.c b/test/core/end2end/tests/cancel_after_invoke.c index fe0e0d689c..c276f5e2fa 100644 --- a/test/core/end2end/tests/cancel_after_invoke.c +++ b/test/core/end2end/tests/cancel_after_invoke.c @@ -116,7 +116,8 @@ static void test_cancel_after_invoke(grpc_end2end_test_config config, char *details = NULL; size_t details_capacity = 0; grpc_byte_buffer *response_payload_recv = NULL; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); diff --git a/test/core/end2end/tests/cancel_before_invoke.c b/test/core/end2end/tests/cancel_before_invoke.c index 3a0b83c4d2..e33b120a5b 100644 --- a/test/core/end2end/tests/cancel_before_invoke.c +++ b/test/core/end2end/tests/cancel_before_invoke.c @@ -114,7 +114,8 @@ static void test_cancel_before_invoke(grpc_end2end_test_config config, char *details = NULL; size_t details_capacity = 0; grpc_byte_buffer *response_payload_recv = NULL; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); diff --git a/test/core/end2end/tests/compressed_payload.c b/test/core/end2end/tests/compressed_payload.c index 92788dd8fa..4ed24baf67 100644 --- a/test/core/end2end/tests/compressed_payload.c +++ b/test/core/end2end/tests/compressed_payload.c @@ -308,7 +308,8 @@ static void request_with_payload_template( response_str[1023] = '\0'; request_payload_slice = grpc_slice_from_copied_string(request_str); - grpc_slice response_payload_slice = grpc_slice_from_copied_string(response_str); + grpc_slice response_payload_slice = + grpc_slice_from_copied_string(response_str); client_args = grpc_channel_args_set_compression_algorithm( NULL, default_client_channel_compression_algorithm); diff --git a/test/core/end2end/tests/filter_call_init_fails.c b/test/core/end2end/tests/filter_call_init_fails.c index 36f98694b6..b180957d4f 100644 --- a/test/core/end2end/tests/filter_call_init_fails.c +++ b/test/core/end2end/tests/filter_call_init_fails.c @@ -108,7 +108,8 @@ static void end_test(grpc_end2end_test_fixture *f) { static void test_request(grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); gpr_timespec deadline = five_seconds_time(); diff --git a/test/core/end2end/tests/filter_causes_close.c b/test/core/end2end/tests/filter_causes_close.c index 66449558c7..943a3df90d 100644 --- a/test/core/end2end/tests/filter_causes_close.c +++ b/test/core/end2end/tests/filter_causes_close.c @@ -104,7 +104,8 @@ static void end_test(grpc_end2end_test_fixture *f) { static void test_request(grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); gpr_timespec deadline = five_seconds_time(); diff --git a/test/core/end2end/tests/large_metadata.c b/test/core/end2end/tests/large_metadata.c index 29dcafb985..26a4eef7d9 100644 --- a/test/core/end2end/tests/large_metadata.c +++ b/test/core/end2end/tests/large_metadata.c @@ -99,7 +99,8 @@ static void end_test(grpc_end2end_test_fixture *f) { static void test_request_with_large_metadata(grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); gpr_timespec deadline = five_seconds_time(); diff --git a/test/core/end2end/tests/load_reporting_hook.c b/test/core/end2end/tests/load_reporting_hook.c index 1dba200c02..046e0c321b 100644 --- a/test/core/end2end/tests/load_reporting_hook.c +++ b/test/core/end2end/tests/load_reporting_hook.c @@ -128,7 +128,8 @@ static void request_response_with_payload(grpc_end2end_test_fixture f, grpc_metadata *initial_lr_metadata, grpc_metadata *trailing_lr_metadata) { grpc_slice request_payload_slice = grpc_slice_from_static_string(request_msg); - grpc_slice response_payload_slice = grpc_slice_from_static_string(response_msg); + grpc_slice response_payload_slice = + grpc_slice_from_static_string(response_msg); grpc_call *c; grpc_call *s; grpc_byte_buffer *request_payload = diff --git a/test/core/end2end/tests/max_message_length.c b/test/core/end2end/tests/max_message_length.c index cdf52f9838..559b00d828 100644 --- a/test/core/end2end/tests/max_message_length.c +++ b/test/core/end2end/tests/max_message_length.c @@ -116,7 +116,8 @@ static void test_max_message_length_on_request(grpc_end2end_test_config config, cq_verifier *cqv; grpc_op ops[6]; grpc_op *op; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_byte_buffer *recv_payload = NULL; diff --git a/test/core/end2end/tests/network_status_change.c b/test/core/end2end/tests/network_status_change.c index e9528ff105..84447e6a2f 100644 --- a/test/core/end2end/tests/network_status_change.c +++ b/test/core/end2end/tests/network_status_change.c @@ -102,7 +102,8 @@ static void end_test(grpc_end2end_test_fixture *f) { static void test_invoke_network_status_change(grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); gpr_timespec deadline = five_seconds_time(); diff --git a/test/core/end2end/tests/payload.c b/test/core/end2end/tests/payload.c index 5a19950726..01ba964ef0 100644 --- a/test/core/end2end/tests/payload.c +++ b/test/core/end2end/tests/payload.c @@ -95,7 +95,8 @@ static void end_test(grpc_end2end_test_fixture *f) { grpc_completion_queue_destroy(f->cq); } -/* Creates and returns a grpc_slice containing random alphanumeric characters. */ +/* Creates and returns a grpc_slice containing random alphanumeric characters. + */ static grpc_slice generate_random_slice() { size_t i; static const char chars[] = "abcdefghijklmnopqrstuvwxyz1234567890"; diff --git a/test/core/end2end/tests/ping_pong_streaming.c b/test/core/end2end/tests/ping_pong_streaming.c index 3398a9cff7..317788f7fa 100644 --- a/test/core/end2end/tests/ping_pong_streaming.c +++ b/test/core/end2end/tests/ping_pong_streaming.c @@ -120,8 +120,10 @@ static void test_pingpong_streaming(grpc_end2end_test_config config, grpc_byte_buffer *response_payload; grpc_byte_buffer *response_payload_recv; int i; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); - grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = + grpc_slice_from_copied_string("hello you"); c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo", "foo.test.google.fr:1234", deadline, diff --git a/test/core/end2end/tests/request_with_flags.c b/test/core/end2end/tests/request_with_flags.c index a37fc645b4..8649c1563f 100644 --- a/test/core/end2end/tests/request_with_flags.c +++ b/test/core/end2end/tests/request_with_flags.c @@ -100,7 +100,8 @@ static void test_invoke_request_with_flags( grpc_end2end_test_config config, uint32_t *flags_for_op, grpc_call_error call_start_batch_expected_result) { grpc_call *c; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); gpr_timespec deadline = five_seconds_time(); diff --git a/test/core/end2end/tests/request_with_payload.c b/test/core/end2end/tests/request_with_payload.c index 3e2bbb3b0e..144cd58ec0 100644 --- a/test/core/end2end/tests/request_with_payload.c +++ b/test/core/end2end/tests/request_with_payload.c @@ -99,7 +99,8 @@ static void end_test(grpc_end2end_test_fixture *f) { static void test_invoke_request_with_payload(grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); gpr_timespec deadline = five_seconds_time(); diff --git a/test/core/end2end/tests/resource_quota_server.c b/test/core/end2end/tests/resource_quota_server.c index 280bad5749..cf81b06692 100644 --- a/test/core/end2end/tests/resource_quota_server.c +++ b/test/core/end2end/tests/resource_quota_server.c @@ -95,7 +95,8 @@ static void end_test(grpc_end2end_test_fixture *f) { grpc_completion_queue_destroy(f->cq); } -/* Creates and returns a grpc_slice containing random alphanumeric characters. */ +/* Creates and returns a grpc_slice containing random alphanumeric characters. + */ static grpc_slice generate_random_slice() { size_t i; static const char chars[] = "abcdefghijklmnopqrstuvwxyz1234567890"; diff --git a/test/core/end2end/tests/simple_cacheable_request.c b/test/core/end2end/tests/simple_cacheable_request.c index 40dd3983e1..4284175214 100644 --- a/test/core/end2end/tests/simple_cacheable_request.c +++ b/test/core/end2end/tests/simple_cacheable_request.c @@ -102,8 +102,10 @@ static void test_cacheable_request_response_with_metadata_and_payload( grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); - grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = + grpc_slice_from_copied_string("hello you"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_byte_buffer *response_payload = diff --git a/test/core/end2end/tests/simple_metadata.c b/test/core/end2end/tests/simple_metadata.c index 1ac9dc8210..e11981f92b 100644 --- a/test/core/end2end/tests/simple_metadata.c +++ b/test/core/end2end/tests/simple_metadata.c @@ -100,8 +100,10 @@ static void test_request_response_with_metadata_and_payload( grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); - grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = + grpc_slice_from_copied_string("hello you"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_byte_buffer *response_payload = diff --git a/test/core/end2end/tests/trailing_metadata.c b/test/core/end2end/tests/trailing_metadata.c index 0bbf0879cc..f88d5edeae 100644 --- a/test/core/end2end/tests/trailing_metadata.c +++ b/test/core/end2end/tests/trailing_metadata.c @@ -100,8 +100,10 @@ static void test_request_response_with_metadata_and_payload( grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); - grpc_slice response_payload_slice = grpc_slice_from_copied_string("hello you"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); + grpc_slice response_payload_slice = + grpc_slice_from_copied_string("hello you"); grpc_byte_buffer *request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_byte_buffer *response_payload = diff --git a/test/core/http/format_request_test.c b/test/core/http/format_request_test.c index bd31e5e8ab..290990c906 100644 --- a/test/core/http/format_request_test.c +++ b/test/core/http/format_request_test.c @@ -52,13 +52,13 @@ static void test_format_get_request(void) { slice = grpc_httpcli_format_get_request(&req); GPR_ASSERT(0 == grpc_slice_str_cmp(slice, - "GET /index.html HTTP/1.0\r\n" - "Host: example.com\r\n" - "Connection: close\r\n" - "User-Agent: " GRPC_HTTPCLI_USER_AGENT - "\r\n" - "x-yz: abc\r\n" - "\r\n")); + "GET /index.html HTTP/1.0\r\n" + "Host: example.com\r\n" + "Connection: close\r\n" + "User-Agent: " GRPC_HTTPCLI_USER_AGENT + "\r\n" + "x-yz: abc\r\n" + "\r\n")); grpc_slice_unref(slice); } @@ -79,16 +79,16 @@ static void test_format_post_request(void) { slice = grpc_httpcli_format_post_request(&req, body_bytes, body_len); GPR_ASSERT(0 == grpc_slice_str_cmp(slice, - "POST /index.html HTTP/1.0\r\n" - "Host: example.com\r\n" - "Connection: close\r\n" - "User-Agent: " GRPC_HTTPCLI_USER_AGENT - "\r\n" - "x-yz: abc\r\n" - "Content-Type: text/plain\r\n" - "Content-Length: 9\r\n" - "\r\n" - "fake body")); + "POST /index.html HTTP/1.0\r\n" + "Host: example.com\r\n" + "Connection: close\r\n" + "User-Agent: " GRPC_HTTPCLI_USER_AGENT + "\r\n" + "x-yz: abc\r\n" + "Content-Type: text/plain\r\n" + "Content-Length: 9\r\n" + "\r\n" + "fake body")); grpc_slice_unref(slice); } @@ -107,13 +107,13 @@ static void test_format_post_request_no_body(void) { slice = grpc_httpcli_format_post_request(&req, NULL, 0); GPR_ASSERT(0 == grpc_slice_str_cmp(slice, - "POST /index.html HTTP/1.0\r\n" - "Host: example.com\r\n" - "Connection: close\r\n" - "User-Agent: " GRPC_HTTPCLI_USER_AGENT - "\r\n" - "x-yz: abc\r\n" - "\r\n")); + "POST /index.html HTTP/1.0\r\n" + "Host: example.com\r\n" + "Connection: close\r\n" + "User-Agent: " GRPC_HTTPCLI_USER_AGENT + "\r\n" + "x-yz: abc\r\n" + "\r\n")); grpc_slice_unref(slice); } diff --git a/test/core/iomgr/endpoint_tests.c b/test/core/iomgr/endpoint_tests.c index 8a1699608e..8186ea7e85 100644 --- a/test/core/iomgr/endpoint_tests.c +++ b/test/core/iomgr/endpoint_tests.c @@ -36,9 +36,9 @@ #include #include +#include #include #include -#include #include #include #include "test/core/util/test_config.h" @@ -88,7 +88,7 @@ static grpc_endpoint_test_fixture begin_test(grpc_endpoint_test_config config, static void end_test(grpc_endpoint_test_config config) { config.clean_up(); } static grpc_slice *allocate_blocks(size_t num_bytes, size_t slice_size, - size_t *num_blocks, uint8_t *current_data) { + size_t *num_blocks, uint8_t *current_data) { size_t nslices = num_bytes / slice_size + (num_bytes % slice_size ? 1 : 0); grpc_slice *slices = gpr_malloc(sizeof(grpc_slice) * nslices); size_t num_bytes_left = num_bytes; @@ -99,7 +99,7 @@ static grpc_slice *allocate_blocks(size_t num_bytes, size_t slice_size, for (i = 0; i < nslices; ++i) { slices[i] = grpc_slice_malloc(slice_size > num_bytes_left ? num_bytes_left - : slice_size); + : slice_size); num_bytes_left -= GRPC_SLICE_LENGTH(slices[i]); buf = GRPC_SLICE_START_PTR(slices[i]); for (j = 0; j < GRPC_SLICE_LENGTH(slices[i]); ++j) { diff --git a/test/core/iomgr/load_file_test.c b/test/core/iomgr/load_file_test.c index af822466d7..8714e1f368 100644 --- a/test/core/iomgr/load_file_test.c +++ b/test/core/iomgr/load_file_test.c @@ -34,9 +34,9 @@ #include #include +#include #include #include -#include #include "src/core/lib/iomgr/load_file.h" #include "src/core/lib/support/string.h" diff --git a/test/core/iomgr/tcp_posix_test.c b/test/core/iomgr/tcp_posix_test.c index bba1900987..5eafa570bb 100644 --- a/test/core/iomgr/tcp_posix_test.c +++ b/test/core/iomgr/tcp_posix_test.c @@ -274,7 +274,7 @@ struct write_socket_state { }; static grpc_slice *allocate_blocks(size_t num_bytes, size_t slice_size, - size_t *num_blocks, uint8_t *current_data) { + size_t *num_blocks, uint8_t *current_data) { size_t nslices = num_bytes / slice_size + (num_bytes % slice_size ? 1u : 0u); grpc_slice *slices = gpr_malloc(sizeof(grpc_slice) * nslices); size_t num_bytes_left = num_bytes; @@ -284,7 +284,7 @@ static grpc_slice *allocate_blocks(size_t num_bytes, size_t slice_size, for (i = 0; i < nslices; ++i) { slices[i] = grpc_slice_malloc(slice_size > num_bytes_left ? num_bytes_left - : slice_size); + : slice_size); num_bytes_left -= GRPC_SLICE_LENGTH(slices[i]); buf = GRPC_SLICE_START_PTR(slices[i]); for (j = 0; j < GRPC_SLICE_LENGTH(slices[i]); ++j) { diff --git a/test/core/security/b64_test.c b/test/core/security/b64_test.c index dea0f56266..af883f51e9 100644 --- a/test/core/security/b64_test.c +++ b/test/core/security/b64_test.c @@ -35,9 +35,9 @@ #include +#include #include #include -#include #include "test/core/util/test_config.h" static int buffers_are_equal(const unsigned char *buf1, diff --git a/test/core/security/create_jwt.c b/test/core/security/create_jwt.c index 0303b791ae..741ace9bdd 100644 --- a/test/core/security/create_jwt.c +++ b/test/core/security/create_jwt.c @@ -37,10 +37,10 @@ #include "src/core/lib/iomgr/load_file.h" #include "src/core/lib/security/credentials/jwt/jwt_credentials.h" +#include #include #include #include -#include void create_jwt(const char *json_key_file_path, const char *service_url, const char *scope) { diff --git a/test/core/security/credentials_test.c b/test/core/security/credentials_test.c index 0637215915..d4c755088d 100644 --- a/test/core/security/credentials_test.c +++ b/test/core/security/credentials_test.c @@ -243,9 +243,10 @@ static void test_oauth2_token_fetcher_creds_parsing_ok(void) { GPR_ASSERT(token_lifetime.tv_sec == 3599); GPR_ASSERT(token_lifetime.tv_nsec == 0); GPR_ASSERT(token_md->num_entries == 1); - GPR_ASSERT(grpc_slice_str_cmp(token_md->entries[0].key, "authorization") == 0); + GPR_ASSERT(grpc_slice_str_cmp(token_md->entries[0].key, "authorization") == + 0); GPR_ASSERT(grpc_slice_str_cmp(token_md->entries[0].value, - "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_") == + "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_") == 0); grpc_credentials_md_store_unref(token_md); grpc_http_response_destroy(&response); @@ -530,7 +531,7 @@ static void on_oauth2_creds_get_metadata_success( GPR_ASSERT(num_md == 1); GPR_ASSERT(grpc_slice_str_cmp(md_elems[0].key, "authorization") == 0); GPR_ASSERT(grpc_slice_str_cmp(md_elems[0].value, - "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_") == + "Bearer ya29.AHES6ZRN3-HlhAPya30GnW_bHSb_") == 0); GPR_ASSERT(user_data != NULL); GPR_ASSERT(strcmp((const char *)user_data, test_user_data) == 0); diff --git a/test/core/security/fetch_oauth2.c b/test/core/security/fetch_oauth2.c index ca093095c3..e9e211206c 100644 --- a/test/core/security/fetch_oauth2.c +++ b/test/core/security/fetch_oauth2.c @@ -36,10 +36,10 @@ #include #include +#include #include #include #include -#include #include #include "src/core/lib/iomgr/load_file.h" diff --git a/test/core/security/json_token_test.c b/test/core/security/json_token_test.c index 593b79855f..201655881f 100644 --- a/test/core/security/json_token_test.c +++ b/test/core/security/json_token_test.c @@ -37,9 +37,9 @@ #include #include +#include #include #include -#include #include "src/core/lib/json/json.h" #include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h" diff --git a/test/core/security/jwt_verifier_test.c b/test/core/security/jwt_verifier_test.c index 01fe436f27..f8afba8d6d 100644 --- a/test/core/security/jwt_verifier_test.c +++ b/test/core/security/jwt_verifier_test.c @@ -37,9 +37,9 @@ #include +#include #include #include -#include #include #include "src/core/lib/http/httpcli.h" @@ -487,8 +487,8 @@ static void corrupt_jwt_sig(char *jwt) { GPR_ASSERT(!GRPC_SLICE_IS_EMPTY(sig)); sig_bytes = GRPC_SLICE_START_PTR(sig); (*sig_bytes)++; /* Corrupt first byte. */ - bad_b64_sig = - grpc_base64_encode(GRPC_SLICE_START_PTR(sig), GRPC_SLICE_LENGTH(sig), 1, 0); + bad_b64_sig = grpc_base64_encode(GRPC_SLICE_START_PTR(sig), + GRPC_SLICE_LENGTH(sig), 1, 0); memcpy(last_dot + 1, bad_b64_sig, strlen(bad_b64_sig)); gpr_free(bad_b64_sig); grpc_slice_unref(sig); diff --git a/test/core/security/oauth2_utils.c b/test/core/security/oauth2_utils.c index 22dbf0428d..44a209258d 100644 --- a/test/core/security/oauth2_utils.c +++ b/test/core/security/oauth2_utils.c @@ -37,9 +37,9 @@ #include #include +#include #include #include -#include #include #include "src/core/lib/security/credentials/credentials.h" diff --git a/test/core/security/print_google_default_creds_token.c b/test/core/security/print_google_default_creds_token.c index 3a04c6e3eb..157b7bf5ff 100644 --- a/test/core/security/print_google_default_creds_token.c +++ b/test/core/security/print_google_default_creds_token.c @@ -36,10 +36,10 @@ #include #include +#include #include #include #include -#include #include #include "src/core/lib/security/credentials/composite/composite_credentials.h" diff --git a/test/core/security/verify_jwt.c b/test/core/security/verify_jwt.c index 4d0ff242ea..043d29e6bb 100644 --- a/test/core/security/verify_jwt.c +++ b/test/core/security/verify_jwt.c @@ -36,10 +36,10 @@ #include #include +#include #include #include #include -#include #include #include "src/core/lib/security/credentials/jwt/jwt_verifier.h" diff --git a/test/core/slice/slice_buffer_test.c b/test/core/slice/slice_buffer_test.c index 4c26113d05..bf9ae197d2 100644 --- a/test/core/slice/slice_buffer_test.c +++ b/test/core/slice/slice_buffer_test.c @@ -31,8 +31,8 @@ * */ -#include #include +#include #include "test/core/util/test_config.h" void test_slice_buffer_add() { diff --git a/test/core/slice/slice_test.c b/test/core/slice/slice_test.c index e6d29e7459..ca44becfd0 100644 --- a/test/core/slice/slice_test.c +++ b/test/core/slice/slice_test.c @@ -170,11 +170,12 @@ static void test_slice_sub_works(unsigned length) { grpc_slice_unref(slice); } -static void check_head_tail(grpc_slice slice, grpc_slice head, grpc_slice tail) { +static void check_head_tail(grpc_slice slice, grpc_slice head, + grpc_slice tail) { GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == GRPC_SLICE_LENGTH(head) + GRPC_SLICE_LENGTH(tail)); - GPR_ASSERT(0 == memcmp(GRPC_SLICE_START_PTR(slice), GRPC_SLICE_START_PTR(head), - GRPC_SLICE_LENGTH(head))); + GPR_ASSERT(0 == memcmp(GRPC_SLICE_START_PTR(slice), + GRPC_SLICE_START_PTR(head), GRPC_SLICE_LENGTH(head))); GPR_ASSERT(0 == memcmp(GRPC_SLICE_START_PTR(slice) + GRPC_SLICE_LENGTH(head), GRPC_SLICE_START_PTR(tail), GRPC_SLICE_LENGTH(tail))); } @@ -243,8 +244,8 @@ static void test_slice_from_copied_string_works(void) { slice = grpc_slice_from_copied_string(text); GPR_ASSERT(strlen(text) == GRPC_SLICE_LENGTH(slice)); - GPR_ASSERT(0 == - memcmp(text, GRPC_SLICE_START_PTR(slice), GRPC_SLICE_LENGTH(slice))); + GPR_ASSERT( + 0 == memcmp(text, GRPC_SLICE_START_PTR(slice), GRPC_SLICE_LENGTH(slice))); grpc_slice_unref(slice); } diff --git a/test/core/transport/chttp2/hpack_parser_test.c b/test/core/transport/chttp2/hpack_parser_test.c index c7e8f3a050..e2813df70c 100644 --- a/test/core/transport/chttp2/hpack_parser_test.c +++ b/test/core/transport/chttp2/hpack_parser_test.c @@ -36,9 +36,9 @@ #include #include +#include #include #include -#include #include "test/core/util/parse_hexstring.h" #include "test/core/util/slice_splitter.h" #include "test/core/util/test_config.h" diff --git a/test/core/transport/chttp2/varint_test.c b/test/core/transport/chttp2/varint_test.c index 5b831c71b2..e29be4b056 100644 --- a/test/core/transport/chttp2/varint_test.c +++ b/test/core/transport/chttp2/varint_test.c @@ -33,15 +33,16 @@ #include "src/core/ext/transport/chttp2/transport/varint.h" -#include #include +#include #include "test/core/util/test_config.h" static void test_varint(uint32_t value, uint32_t prefix_bits, uint8_t prefix_or, const char *expect_bytes, size_t expect_length) { uint32_t nbytes = GRPC_CHTTP2_VARINT_LENGTH(value, prefix_bits); - grpc_slice expect = grpc_slice_from_copied_buffer(expect_bytes, expect_length); + grpc_slice expect = + grpc_slice_from_copied_buffer(expect_bytes, expect_length); grpc_slice slice; gpr_log(GPR_DEBUG, "Test: 0x%08x", value); GPR_ASSERT(nbytes == expect_length); diff --git a/test/core/util/mock_endpoint.h b/test/core/util/mock_endpoint.h index 8f8d2a412d..ec7f0fcfcd 100644 --- a/test/core/util/mock_endpoint.h +++ b/test/core/util/mock_endpoint.h @@ -39,6 +39,7 @@ grpc_endpoint *grpc_mock_endpoint_create(void (*on_write)(grpc_slice slice), grpc_resource_quota *resource_quota); void grpc_mock_endpoint_put_read(grpc_exec_ctx *exec_ctx, - grpc_endpoint *mock_endpoint, grpc_slice slice); + grpc_endpoint *mock_endpoint, + grpc_slice slice); #endif diff --git a/test/core/util/one_corpus_entry_fuzzer.c b/test/core/util/one_corpus_entry_fuzzer.c index 6b572bb3c3..c016ebb536 100644 --- a/test/core/util/one_corpus_entry_fuzzer.c +++ b/test/core/util/one_corpus_entry_fuzzer.c @@ -47,7 +47,8 @@ int main(int argc, char **argv) { leak_check = false; GPR_ASSERT( GRPC_LOG_IF_ERROR("load_file", grpc_load_file(argv[1], 0, &buffer))); - LLVMFuzzerTestOneInput(GRPC_SLICE_START_PTR(buffer), GRPC_SLICE_LENGTH(buffer)); + LLVMFuzzerTestOneInput(GRPC_SLICE_START_PTR(buffer), + GRPC_SLICE_LENGTH(buffer)); grpc_slice_unref(buffer); return 0; } diff --git a/test/cpp/grpclb/grpclb_test.cc b/test/cpp/grpclb/grpclb_test.cc index a56667585f..f3cfe53bda 100644 --- a/test/cpp/grpclb/grpclb_test.cc +++ b/test/cpp/grpclb/grpclb_test.cc @@ -456,7 +456,8 @@ static void perform_request(client_fixture *cf) { int i; memset(ops, 0, sizeof(ops)); - grpc_slice request_payload_slice = grpc_slice_from_copied_string("hello world"); + grpc_slice request_payload_slice = + grpc_slice_from_copied_string("hello world"); c = grpc_channel_create_call(cf->client, NULL, GRPC_PROPAGATE_DEFAULTS, cf->cq, "/foo", "foo.test.google.fr:1234", diff --git a/test/cpp/util/cli_call.cc b/test/cpp/util/cli_call.cc index 0517610f10..a02a8b2ee2 100644 --- a/test/cpp/util/cli_call.cc +++ b/test/cpp/util/cli_call.cc @@ -41,8 +41,8 @@ #include #include #include -#include #include +#include namespace grpc { namespace testing { -- cgit v1.2.3 From 8abc796ed796d1dc3489446bba66ec4a7c360809 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 26 Oct 2016 21:31:29 -0700 Subject: Review feedback --- .../transport/chttp2/transport/chttp2_transport.c | 2 +- src/core/lib/iomgr/resource_quota.c | 26 +++++++++------------- src/core/lib/iomgr/resource_quota.h | 19 ++++++++-------- test/core/end2end/tests/resource_quota_server.c | 5 ++--- test/core/iomgr/resource_quota_test.c | 10 ++++++--- 5 files changed, 30 insertions(+), 32 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 56dd87c1cd..57da5c5c1e 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -2189,7 +2189,7 @@ static void destructive_reclaimer_locked(grpc_exec_ctx *exec_ctx, void *arg, GRPC_ERROR_INT_HTTP2_ERROR, GRPC_CHTTP2_ENHANCE_YOUR_CALM)); if (n > 1) { - /* Since we cancel one stream per destructive reclaimation, if + /* Since we cancel one stream per destructive reclamation, if there are more streams left, we can immediately post a new reclaimer in case the resource quota needs to free more memory */ diff --git a/src/core/lib/iomgr/resource_quota.c b/src/core/lib/iomgr/resource_quota.c index 4f0d16ca7e..bfc905845d 100644 --- a/src/core/lib/iomgr/resource_quota.c +++ b/src/core/lib/iomgr/resource_quota.c @@ -89,6 +89,7 @@ static void rulist_add_head(grpc_resource_user *resource_user, resource_user->links[list].prev = (*root)->links[list].prev; resource_user->links[list].next->links[list].prev = resource_user->links[list].prev->links[list].next = resource_user; + *root = resource_user; } } @@ -105,7 +106,6 @@ static void rulist_add_tail(grpc_resource_user *resource_user, resource_user->links[list].prev = *root; resource_user->links[list].next->links[list].prev = resource_user->links[list].prev->links[list].next = resource_user; - *root = resource_user; } } @@ -114,7 +114,7 @@ static bool rulist_empty(grpc_resource_quota *resource_quota, return resource_quota->roots[list] == NULL; } -static grpc_resource_user *rulist_pop_tail(grpc_resource_quota *resource_quota, +static grpc_resource_user *rulist_pop_head(grpc_resource_quota *resource_quota, grpc_rulist list) { grpc_resource_user **root = &resource_quota->roots[list]; grpc_resource_user *resource_user = *root; @@ -186,7 +186,7 @@ static void rq_step_sched(grpc_exec_ctx *exec_ctx, static bool rq_alloc(grpc_exec_ctx *exec_ctx, grpc_resource_quota *resource_quota) { grpc_resource_user *resource_user; - while ((resource_user = rulist_pop_tail(resource_quota, + while ((resource_user = rulist_pop_head(resource_quota, GRPC_RULIST_AWAITING_ALLOCATION))) { gpr_mu_lock(&resource_user->mu); if (resource_user->free_pool < 0 && @@ -209,7 +209,7 @@ static bool rq_alloc(grpc_exec_ctx *exec_ctx, grpc_exec_ctx_enqueue_list(exec_ctx, &resource_user->on_allocated, NULL); gpr_mu_unlock(&resource_user->mu); } else { - rulist_add_tail(resource_user, GRPC_RULIST_AWAITING_ALLOCATION); + rulist_add_head(resource_user, GRPC_RULIST_AWAITING_ALLOCATION); gpr_mu_unlock(&resource_user->mu); return false; } @@ -221,7 +221,7 @@ static bool rq_alloc(grpc_exec_ctx *exec_ctx, static bool rq_reclaim_from_per_user_free_pool( grpc_exec_ctx *exec_ctx, grpc_resource_quota *resource_quota) { grpc_resource_user *resource_user; - while ((resource_user = rulist_pop_tail(resource_quota, + while ((resource_user = rulist_pop_head(resource_quota, GRPC_RULIST_NON_EMPTY_FREE_POOL))) { gpr_mu_lock(&resource_user->mu); if (resource_user->free_pool > 0) { @@ -249,7 +249,7 @@ static bool rq_reclaim(grpc_exec_ctx *exec_ctx, if (resource_quota->reclaiming) return true; grpc_rulist list = destructive ? GRPC_RULIST_RECLAIMER_DESTRUCTIVE : GRPC_RULIST_RECLAIMER_BENIGN; - grpc_resource_user *resource_user = rulist_pop_tail(resource_quota, list); + grpc_resource_user *resource_user = rulist_pop_head(resource_quota, list); if (resource_user == NULL) return false; if (grpc_resource_quota_trace) { gpr_log(GPR_DEBUG, "RQ %s %s: initiate %s reclamation", @@ -325,7 +325,7 @@ static void ru_allocate(grpc_exec_ctx *exec_ctx, void *ru, grpc_error *error) { GRPC_RULIST_AWAITING_ALLOCATION)) { rq_step_sched(exec_ctx, resource_user->resource_quota); } - rulist_add_head(resource_user, GRPC_RULIST_AWAITING_ALLOCATION); + rulist_add_tail(resource_user, GRPC_RULIST_AWAITING_ALLOCATION); } static void ru_add_to_free_pool(grpc_exec_ctx *exec_ctx, void *ru, @@ -337,7 +337,7 @@ static void ru_add_to_free_pool(grpc_exec_ctx *exec_ctx, void *ru, GRPC_RULIST_NON_EMPTY_FREE_POOL)) { rq_step_sched(exec_ctx, resource_user->resource_quota); } - rulist_add_head(resource_user, GRPC_RULIST_NON_EMPTY_FREE_POOL); + rulist_add_tail(resource_user, GRPC_RULIST_NON_EMPTY_FREE_POOL); } static void ru_post_benign_reclaimer(grpc_exec_ctx *exec_ctx, void *ru, @@ -351,7 +351,7 @@ static void ru_post_benign_reclaimer(grpc_exec_ctx *exec_ctx, void *ru, GRPC_RULIST_RECLAIMER_BENIGN)) { rq_step_sched(exec_ctx, resource_user->resource_quota); } - rulist_add_head(resource_user, GRPC_RULIST_RECLAIMER_BENIGN); + rulist_add_tail(resource_user, GRPC_RULIST_RECLAIMER_BENIGN); } static void ru_post_destructive_reclaimer(grpc_exec_ctx *exec_ctx, void *ru, @@ -367,7 +367,7 @@ static void ru_post_destructive_reclaimer(grpc_exec_ctx *exec_ctx, void *ru, GRPC_RULIST_RECLAIMER_DESTRUCTIVE)) { rq_step_sched(exec_ctx, resource_user->resource_quota); } - rulist_add_head(resource_user, GRPC_RULIST_RECLAIMER_DESTRUCTIVE); + rulist_add_tail(resource_user, GRPC_RULIST_RECLAIMER_DESTRUCTIVE); } static void ru_destroy(grpc_exec_ctx *exec_ctx, void *ru, grpc_error *error) { @@ -563,9 +563,6 @@ void grpc_resource_user_init(grpc_resource_user *resource_user, for (int i = 0; i < GRPC_RULIST_COUNT; i++) { resource_user->links[i].next = resource_user->links[i].prev = NULL; } -#ifndef NDEBUG - resource_user->asan_canary = gpr_malloc(1); -#endif if (name != NULL) { resource_user->name = gpr_strdup(name); } else { @@ -592,9 +589,6 @@ void grpc_resource_user_shutdown(grpc_exec_ctx *exec_ctx, void grpc_resource_user_destroy(grpc_exec_ctx *exec_ctx, grpc_resource_user *resource_user) { -#ifndef NDEBUG - gpr_free(resource_user->asan_canary); -#endif grpc_resource_quota_internal_unref(exec_ctx, resource_user->resource_quota); gpr_mu_destroy(&resource_user->mu); gpr_free(resource_user->name); diff --git a/src/core/lib/iomgr/resource_quota.h b/src/core/lib/iomgr/resource_quota.h index c15cb68310..6dfac55f88 100644 --- a/src/core/lib/iomgr/resource_quota.h +++ b/src/core/lib/iomgr/resource_quota.h @@ -49,7 +49,8 @@ resource constrained, grpc_resource_user instances are asked (in turn) to free up whatever they can so that the system as a whole can make progress. - There are three kinds of reclamation that take place: + There are three kinds of reclamation that take place, in order of increasing + invasiveness: - an internal reclamation, where cached resource at the resource user level is returned to the quota - a benign reclamation phase, whereby resources that are in use but are not @@ -58,9 +59,14 @@ make progress may be enacted so that at least one part of the system can complete. - These reclamations are tried in priority order, and only one reclamation - is outstanding for a quota at any given time (meaning that if a destructive - reclamation makes progress, we may follow up with a benign reclamation). + Only one reclamation will be outstanding for a given quota at a given time. + On each reclamation attempt, the kinds of reclamation are tried in order of + increasing invasiveness, stopping at the first one that succeeds. Thus, on a + given reclamation attempt, if internal and benign reclamation both fail, it + will wind up doing a destructive reclamation. However, the next reclamation + attempt may then be able to get what it needs via internal or benign + reclamation, due to resources that may have been freed up by the destructive + reclamation in the previous attempt. Future work will be to expose the current resource pressure so that back pressure can be applied to avoid reclamation phases starting. @@ -112,11 +118,6 @@ struct grpc_resource_user { lock */ grpc_closure add_to_free_pool_closure; -#ifndef NDEBUG - /* Canary object to detect leaked resource users with ASAN */ - void *asan_canary; -#endif - gpr_mu mu; /* Total allocated memory outstanding by this resource user in bytes; always positive */ diff --git a/test/core/end2end/tests/resource_quota_server.c b/test/core/end2end/tests/resource_quota_server.c index 6170444373..f594db3fbb 100644 --- a/test/core/end2end/tests/resource_quota_server.c +++ b/test/core/end2end/tests/resource_quota_server.c @@ -339,9 +339,8 @@ void resource_quota_server(grpc_end2end_test_config config) { "Done. %d total calls: %d cancelled at server, %d cancelled at client.", NUM_CALLS, cancelled_calls_on_server, cancelled_calls_on_client); - /* The server call may be cancelled after it's received it's status, but - * before the client does: this means that we should see strictly more - * failures on the client than on the server */ + /* The call may be cancelled after the server has sent its status but before + * the client has received it. */ GPR_ASSERT(cancelled_calls_on_client >= cancelled_calls_on_server); /* However, we shouldn't see radically more... 0.9 is a guessed bound on what * we'd want that ratio to be... to at least trigger some investigation should diff --git a/test/core/iomgr/resource_quota_test.c b/test/core/iomgr/resource_quota_test.c index 5e2f9f8359..34dee1aee1 100644 --- a/test/core/iomgr/resource_quota_test.c +++ b/test/core/iomgr/resource_quota_test.c @@ -553,9 +553,13 @@ static void test_resource_user_stays_allocated_until_memory_released(void) { static void test_resource_user_stays_allocated_and_reclaimers_unrun_until_memory_released( void) { - gpr_log(GPR_INFO, "** test_pools_merged_on_resource_user_deletion **"); - grpc_resource_quota *q = - grpc_resource_quota_create("test_pools_merged_on_resource_user_deletion"); + gpr_log(GPR_INFO, + "** " + "test_resource_user_stays_allocated_and_reclaimers_unrun_until_" + "memory_released **"); + grpc_resource_quota *q = grpc_resource_quota_create( + "test_resource_user_stays_allocated_and_reclaimers_unrun_until_memory_" + "released"); grpc_resource_quota_resize(q, 1024); for (int i = 0; i < 10; i++) { grpc_resource_user usr; -- cgit v1.2.3 From 24392f375f202a7001063488bdead6fdb5c86381 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Thu, 27 Oct 2016 11:29:33 -0700 Subject: MAC and FreeBSD do not have IP_PKTINFO as a meaningful setsockopt --- src/core/lib/iomgr/port.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/port.h b/src/core/lib/iomgr/port.h index c0bb3b5a23..f1897bb91f 100644 --- a/src/core/lib/iomgr/port.h +++ b/src/core/lib/iomgr/port.h @@ -90,7 +90,6 @@ #define GRPC_POSIX_SOCKETUTILS #endif #elif defined(GPR_APPLE) -#define GRPC_HAVE_IP_PKTINFO 1 #define GRPC_HAVE_SO_NOSIGPIPE 1 #define GRPC_HAVE_UNIX_SOCKET 1 #define GRPC_MSG_IOVLEN_TYPE int @@ -102,7 +101,6 @@ #define GRPC_TIMER_USE_GENERIC 1 #elif defined(GPR_FREEBSD) #define GRPC_HAVE_IPV6_RECVPKTINFO 1 -#define GRPC_HAVE_IP_PKTINFO 1 #define GRPC_HAVE_SO_NOSIGPIPE 1 #define GRPC_HAVE_UNIX_SOCKET 1 #define GRPC_POSIX_NO_SPECIAL_WAKEUP_FD 1 -- cgit v1.2.3 From 12e5775bd00b4b55f9a93d73de0f8b53f57eda54 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 27 Oct 2016 14:30:41 -0700 Subject: Disable Nagle's algorithm in libuv endpoints --- src/core/lib/iomgr/tcp_uv.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/tcp_uv.c b/src/core/lib/iomgr/tcp_uv.c index 05d6eeb240..0dd4beaae1 100644 --- a/src/core/lib/iomgr/tcp_uv.c +++ b/src/core/lib/iomgr/tcp_uv.c @@ -315,6 +315,8 @@ grpc_endpoint *grpc_tcp_create(uv_tcp_t *handle, char *peer_string) { gpr_log(GPR_DEBUG, "Creating TCP endpoint %p", tcp); } + uv_tcp_nodelay(handle, 1); + memset(tcp, 0, sizeof(grpc_tcp)); tcp->base.vtable = &vtable; tcp->handle = handle; -- cgit v1.2.3 From 04d2829fe60adbcead1efe1ff8b5da70898329d0 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 27 Oct 2016 14:36:57 -0700 Subject: Add comment --- src/core/lib/iomgr/tcp_uv.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/tcp_uv.c b/src/core/lib/iomgr/tcp_uv.c index 0dd4beaae1..3860fe3e9b 100644 --- a/src/core/lib/iomgr/tcp_uv.c +++ b/src/core/lib/iomgr/tcp_uv.c @@ -315,6 +315,7 @@ grpc_endpoint *grpc_tcp_create(uv_tcp_t *handle, char *peer_string) { gpr_log(GPR_DEBUG, "Creating TCP endpoint %p", tcp); } + /* Disable Nagle's Algorithm */ uv_tcp_nodelay(handle, 1); memset(tcp, 0, sizeof(grpc_tcp)); -- cgit v1.2.3 From b2d24886196c5000cc15bb5953659ff50b09ad87 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 27 Oct 2016 15:44:07 -0700 Subject: Add grpc_channel_get_info() to C-core API. --- include/grpc/grpc.h | 4 +++ include/grpc/impl/codegen/grpc_types.h | 7 ++++++ src/core/ext/census/grpc_filter.c | 2 ++ src/core/ext/client_channel/client_channel.c | 29 +++++++++++++++++++--- .../ext/load_reporting/load_reporting_filter.c | 1 + src/core/lib/channel/channel_stack.c | 7 ++++++ src/core/lib/channel/channel_stack.h | 8 ++++++ src/core/lib/channel/compress_filter.c | 1 + src/core/lib/channel/connected_channel.c | 6 +++++ src/core/lib/channel/deadline_filter.c | 2 ++ src/core/lib/channel/http_client_filter.c | 1 + src/core/lib/channel/http_server_filter.c | 1 + src/core/lib/channel/message_size_filter.c | 1 + .../lib/security/transport/client_auth_filter.c | 1 + .../lib/security/transport/server_auth_filter.c | 1 + src/core/lib/surface/channel.c | 9 +++++++ src/core/lib/surface/lame_client.c | 5 ++++ src/core/lib/surface/server.c | 1 + test/core/client_channel/lb_policies_test.c | 16 ++++++++++++ test/core/end2end/tests/filter_call_init_fails.c | 1 + test/core/end2end/tests/filter_causes_close.c | 1 + 21 files changed, 101 insertions(+), 4 deletions(-) (limited to 'src/core/lib') diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index 587d86c98f..dbd125e57a 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -237,6 +237,10 @@ GRPCAPI struct census_context *grpc_census_call_get_context(grpc_call *call); created for. */ GRPCAPI char *grpc_channel_get_target(grpc_channel *channel); +/** Request info about the channel. */ +GRPCAPI void grpc_channel_get_info(grpc_channel *channel, + grpc_channel_info *channel_info); + /** Create a client channel to 'target'. Additional channel level configuration MAY be provided by grpc_channel_args, though the expectation is that most clients will want to simply pass NULL. See grpc_channel_args definition for diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index 0be7ab2ad2..0fc86b57cc 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -467,6 +467,13 @@ typedef struct grpc_op { } data; } grpc_op; +/** Information requested from the channel. */ +typedef struct { + /* If non-NULL, will be set to point to a string indicating the LB + * policy name. Caller takes ownership. */ + char **lb_policy_name; +} grpc_channel_info; + #ifdef __cplusplus } #endif diff --git a/src/core/ext/census/grpc_filter.c b/src/core/ext/census/grpc_filter.c index a4cf6f37bd..7ace2f671e 100644 --- a/src/core/ext/census/grpc_filter.c +++ b/src/core/ext/census/grpc_filter.c @@ -191,6 +191,7 @@ const grpc_channel_filter grpc_client_census_filter = { init_channel_elem, destroy_channel_elem, grpc_call_next_get_peer, + grpc_channel_next_get_info, "census-client"}; const grpc_channel_filter grpc_server_census_filter = { @@ -204,4 +205,5 @@ const grpc_channel_filter grpc_server_census_filter = { init_channel_elem, destroy_channel_elem, grpc_call_next_get_peer, + grpc_channel_next_get_info, "census-server"}; diff --git a/src/core/ext/client_channel/client_channel.c b/src/core/ext/client_channel/client_channel.c index 80b4f048c2..d15af0b438 100644 --- a/src/core/ext/client_channel/client_channel.c +++ b/src/core/ext/client_channel/client_channel.c @@ -39,6 +39,7 @@ #include #include +#include #include #include @@ -123,6 +124,7 @@ typedef struct client_channel_channel_data { /** mutex protecting all variables below in this data structure */ gpr_mu mu; /** currently active load balancer */ + char* lb_policy_name; grpc_lb_policy *lb_policy; /** maps method names to method_parameters structs */ grpc_mdstr_hash_table *method_params_table; @@ -223,6 +225,7 @@ static void watch_lb_policy(grpc_exec_ctx *exec_ctx, channel_data *chand, static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { channel_data *chand = arg; + char *lb_policy_name = NULL; grpc_lb_policy *lb_policy = NULL; grpc_lb_policy *old_lb_policy; grpc_mdstr_hash_table *method_params_table = NULL; @@ -236,12 +239,11 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, lb_policy_args.client_channel_factory = chand->client_channel_factory; // Find LB policy name. - const char *lb_policy_name = NULL; const grpc_arg *channel_arg = grpc_channel_args_find(lb_policy_args.args, GRPC_ARG_LB_POLICY_NAME); if (channel_arg != NULL) { GPR_ASSERT(channel_arg->type == GRPC_ARG_STRING); - lb_policy_name = channel_arg->value.string; + lb_policy_name = gpr_strdup(channel_arg->value.string); } // Special case: If all of the addresses are balancer addresses, // assume that we should use the grpclb policy, regardless of what the @@ -265,13 +267,14 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, "addresses, no backend addresses -- forcing use of grpclb LB " "policy", lb_policy_name); + gpr_free(lb_policy_name); } - lb_policy_name = "grpclb"; + lb_policy_name = gpr_strdup("grpclb"); } } // Use pick_first if nothing was specified and we didn't select grpclb // above. - if (lb_policy_name == NULL) lb_policy_name = "pick_first"; + if (lb_policy_name == NULL) lb_policy_name = gpr_strdup("pick_first"); lb_policy = grpc_lb_policy_create(exec_ctx, lb_policy_name, &lb_policy_args); @@ -299,6 +302,10 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, } gpr_mu_lock(&chand->mu); + if (lb_policy_name != NULL) { + gpr_free(chand->lb_policy_name); + chand->lb_policy_name = lb_policy_name; + } old_lb_policy = chand->lb_policy; chand->lb_policy = lb_policy; if (chand->method_params_table != NULL) { @@ -426,6 +433,18 @@ static void cc_start_transport_op(grpc_exec_ctx *exec_ctx, gpr_mu_unlock(&chand->mu); } +static void cc_get_channel_info(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem, + grpc_channel_info *info) { + channel_data *chand = elem->channel_data; + gpr_mu_lock(&chand->mu); + if (info->lb_policy_name != NULL) { + *info->lb_policy_name = chand->lb_policy_name == NULL + ? NULL : gpr_strdup(chand->lb_policy_name); + } + gpr_mu_unlock(&chand->mu); +} + /* Constructor for channel_data */ static void cc_init_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, @@ -465,6 +484,7 @@ static void cc_destroy_channel_elem(grpc_exec_ctx *exec_ctx, chand->interested_parties); GRPC_LB_POLICY_UNREF(exec_ctx, chand->lb_policy, "channel"); } + gpr_free(chand->lb_policy_name); if (chand->method_params_table != NULL) { grpc_mdstr_hash_table_unref(chand->method_params_table); } @@ -1048,6 +1068,7 @@ const grpc_channel_filter grpc_client_channel_filter = { cc_init_channel_elem, cc_destroy_channel_elem, cc_get_peer, + cc_get_channel_info, "client-channel", }; diff --git a/src/core/ext/load_reporting/load_reporting_filter.c b/src/core/ext/load_reporting/load_reporting_filter.c index eeae2400fb..b810e20bb9 100644 --- a/src/core/ext/load_reporting/load_reporting_filter.c +++ b/src/core/ext/load_reporting/load_reporting_filter.c @@ -232,4 +232,5 @@ const grpc_channel_filter grpc_load_reporting_filter = { init_channel_elem, destroy_channel_elem, grpc_call_next_get_peer, + grpc_channel_next_get_info, "load_reporting"}; diff --git a/src/core/lib/channel/channel_stack.c b/src/core/lib/channel/channel_stack.c index 2c5367901d..3370f0ef45 100644 --- a/src/core/lib/channel/channel_stack.c +++ b/src/core/lib/channel/channel_stack.c @@ -255,6 +255,13 @@ char *grpc_call_next_get_peer(grpc_exec_ctx *exec_ctx, return next_elem->filter->get_peer(exec_ctx, next_elem); } +void grpc_channel_next_get_info(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem, + grpc_channel_info *channel_info) { + grpc_channel_element *next_elem = elem + 1; + return next_elem->filter->get_channel_info(exec_ctx, next_elem, channel_info); +} + void grpc_channel_next_op(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, grpc_transport_op *op) { grpc_channel_element *next_elem = elem + 1; diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h index 27f3be7b29..6fbcd87064 100644 --- a/src/core/lib/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -156,6 +156,10 @@ typedef struct { /* Implement grpc_call_get_peer() */ char *(*get_peer)(grpc_exec_ctx *exec_ctx, grpc_call_element *elem); + /* Implement grpc_channel_get_info() */ + void (*get_channel_info)(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, + grpc_channel_info *channel_info); + /* The name of this filter */ const char *name; } grpc_channel_filter; @@ -273,6 +277,10 @@ void grpc_channel_next_op(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, grpc_transport_op *op); /* Pass through a request to get_peer to the next child element */ char *grpc_call_next_get_peer(grpc_exec_ctx *exec_ctx, grpc_call_element *elem); +/* Pass through a request to get_channel_info() to the next child element */ +void grpc_channel_next_get_info(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem, + grpc_channel_info *channel_info); /* Given the top element of a channel stack, get the channel stack itself */ grpc_channel_stack *grpc_channel_stack_from_top_element( diff --git a/src/core/lib/channel/compress_filter.c b/src/core/lib/channel/compress_filter.c index 0981d59f63..7968cf7e26 100644 --- a/src/core/lib/channel/compress_filter.c +++ b/src/core/lib/channel/compress_filter.c @@ -328,4 +328,5 @@ const grpc_channel_filter grpc_compress_filter = { init_channel_elem, destroy_channel_elem, grpc_call_next_get_peer, + grpc_channel_next_get_info, "compress"}; diff --git a/src/core/lib/channel/connected_channel.c b/src/core/lib/channel/connected_channel.c index 918379c845..6ae2b3b6b7 100644 --- a/src/core/lib/channel/connected_channel.c +++ b/src/core/lib/channel/connected_channel.c @@ -134,6 +134,11 @@ static char *con_get_peer(grpc_exec_ctx *exec_ctx, grpc_call_element *elem) { return grpc_transport_get_peer(exec_ctx, chand->transport); } +/* No-op. */ +static void con_get_channel_info(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem, + grpc_channel_info *channel_info) {} + static const grpc_channel_filter connected_channel_filter = { con_start_transport_stream_op, con_start_transport_op, @@ -145,6 +150,7 @@ static const grpc_channel_filter connected_channel_filter = { init_channel_elem, destroy_channel_elem, con_get_peer, + con_get_channel_info, "connected", }; diff --git a/src/core/lib/channel/deadline_filter.c b/src/core/lib/channel/deadline_filter.c index d2ea5250f6..224c823a4f 100644 --- a/src/core/lib/channel/deadline_filter.c +++ b/src/core/lib/channel/deadline_filter.c @@ -316,6 +316,7 @@ const grpc_channel_filter grpc_client_deadline_filter = { init_channel_elem, destroy_channel_elem, grpc_call_next_get_peer, + grpc_channel_next_get_info, "deadline", }; @@ -330,5 +331,6 @@ const grpc_channel_filter grpc_server_deadline_filter = { init_channel_elem, destroy_channel_elem, grpc_call_next_get_peer, + grpc_channel_next_get_info, "deadline", }; diff --git a/src/core/lib/channel/http_client_filter.c b/src/core/lib/channel/http_client_filter.c index 1dc05fb20d..b5ab4dd5ca 100644 --- a/src/core/lib/channel/http_client_filter.c +++ b/src/core/lib/channel/http_client_filter.c @@ -448,4 +448,5 @@ const grpc_channel_filter grpc_http_client_filter = { init_channel_elem, destroy_channel_elem, grpc_call_next_get_peer, + grpc_channel_next_get_info, "http-client"}; diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c index f2221fb0fb..d02a765d0d 100644 --- a/src/core/lib/channel/http_server_filter.c +++ b/src/core/lib/channel/http_server_filter.c @@ -344,4 +344,5 @@ const grpc_channel_filter grpc_http_server_filter = { init_channel_elem, destroy_channel_elem, grpc_call_next_get_peer, + grpc_channel_next_get_info, "http-server"}; diff --git a/src/core/lib/channel/message_size_filter.c b/src/core/lib/channel/message_size_filter.c index 7dc5ae0df1..bbcd2a2145 100644 --- a/src/core/lib/channel/message_size_filter.c +++ b/src/core/lib/channel/message_size_filter.c @@ -248,4 +248,5 @@ const grpc_channel_filter grpc_message_size_filter = { init_channel_elem, destroy_channel_elem, grpc_call_next_get_peer, + grpc_channel_next_get_info, "message_size"}; diff --git a/src/core/lib/security/transport/client_auth_filter.c b/src/core/lib/security/transport/client_auth_filter.c index b366d1410f..3a96af2c69 100644 --- a/src/core/lib/security/transport/client_auth_filter.c +++ b/src/core/lib/security/transport/client_auth_filter.c @@ -351,4 +351,5 @@ const grpc_channel_filter grpc_client_auth_filter = {auth_start_transport_op, init_channel_elem, destroy_channel_elem, grpc_call_next_get_peer, + grpc_channel_next_get_info, "client-auth"}; diff --git a/src/core/lib/security/transport/server_auth_filter.c b/src/core/lib/security/transport/server_auth_filter.c index b2c6815af8..8ecc5fd088 100644 --- a/src/core/lib/security/transport/server_auth_filter.c +++ b/src/core/lib/security/transport/server_auth_filter.c @@ -278,4 +278,5 @@ const grpc_channel_filter grpc_server_auth_filter = { init_channel_elem, destroy_channel_elem, grpc_call_next_get_peer, + grpc_channel_next_get_info, "server-auth"}; diff --git a/src/core/lib/surface/channel.c b/src/core/lib/surface/channel.c index 92d783b78d..22bf85b126 100644 --- a/src/core/lib/surface/channel.c +++ b/src/core/lib/surface/channel.c @@ -175,6 +175,15 @@ char *grpc_channel_get_target(grpc_channel *channel) { return gpr_strdup(channel->target); } +void grpc_channel_get_info(grpc_channel *channel, + grpc_channel_info *channel_info) { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_channel_element *elem = + grpc_channel_stack_element(CHANNEL_STACK_FROM_CHANNEL(channel), 0); + elem->filter->get_channel_info(&exec_ctx, elem, channel_info); + grpc_exec_ctx_finish(&exec_ctx); +} + static grpc_call *grpc_channel_create_call_internal( grpc_channel *channel, grpc_call *parent_call, uint32_t propagation_mask, grpc_completion_queue *cq, grpc_pollset_set *pollset_set_alternative, diff --git a/src/core/lib/surface/lame_client.c b/src/core/lib/surface/lame_client.c index d32c884e8e..6fd1dd921c 100644 --- a/src/core/lib/surface/lame_client.c +++ b/src/core/lib/surface/lame_client.c @@ -88,6 +88,10 @@ static char *lame_get_peer(grpc_exec_ctx *exec_ctx, grpc_call_element *elem) { return NULL; } +static void lame_get_channel_info(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem, + grpc_channel_info *channel_info) {} + static void lame_start_transport_op(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, grpc_transport_op *op) { @@ -140,6 +144,7 @@ const grpc_channel_filter grpc_lame_filter = { init_channel_elem, destroy_channel_elem, lame_get_peer, + lame_get_channel_info, "lame-client", }; diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index 3a90308058..914b62e176 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -965,6 +965,7 @@ const grpc_channel_filter grpc_server_top_filter = { init_channel_elem, destroy_channel_elem, grpc_call_next_get_peer, + grpc_channel_next_get_info, "server", }; diff --git a/test/core/client_channel/lb_policies_test.c b/test/core/client_channel/lb_policies_test.c index 844db5e6cb..857ba6bd52 100644 --- a/test/core/client_channel/lb_policies_test.c +++ b/test/core/client_channel/lb_policies_test.c @@ -638,6 +638,21 @@ static void test_pending_calls(size_t concurrent_calls) { test_spec_destroy(spec); } +static void test_get_channel_info() { + grpc_channel *channel = grpc_insecure_channel_create( + "test:127.0.0.1:1234?lb_policy=round_robin", NULL, NULL); + // Ensures that resolver returns. + grpc_channel_check_connectivity_state(channel, true /* try_to_connect */); + char *lb_policy_name = NULL; + grpc_channel_info channel_info; + channel_info.lb_policy_name = &lb_policy_name; + grpc_channel_get_info(channel, &channel_info); + GPR_ASSERT(lb_policy_name != NULL); + GPR_ASSERT(strcmp(lb_policy_name, "round_robin") == 0); + gpr_free(lb_policy_name); + grpc_channel_destroy(channel); +} + static void print_failed_expectations(const int *expected_connection_sequence, const int *actual_connection_sequence, const size_t expected_seq_length, @@ -933,6 +948,7 @@ int main(int argc, char **argv) { test_pending_calls(4); test_ping(); + test_get_channel_info(); grpc_exec_ctx_finish(&exec_ctx); grpc_shutdown(); diff --git a/test/core/end2end/tests/filter_call_init_fails.c b/test/core/end2end/tests/filter_call_init_fails.c index 0e5692f4c9..2f8a2a4d04 100644 --- a/test/core/end2end/tests/filter_call_init_fails.c +++ b/test/core/end2end/tests/filter_call_init_fails.c @@ -231,6 +231,7 @@ static const grpc_channel_filter test_filter = { init_channel_elem, destroy_channel_elem, grpc_call_next_get_peer, + grpc_channel_next_get_info, "filter_call_init_fails"}; /******************************************************************************* diff --git a/test/core/end2end/tests/filter_causes_close.c b/test/core/end2end/tests/filter_causes_close.c index d5eddc7330..da554142e8 100644 --- a/test/core/end2end/tests/filter_causes_close.c +++ b/test/core/end2end/tests/filter_causes_close.c @@ -258,6 +258,7 @@ static const grpc_channel_filter test_filter = { init_channel_elem, destroy_channel_elem, grpc_call_next_get_peer, + grpc_channel_next_get_info, "filter_causes_close"}; /******************************************************************************* -- cgit v1.2.3 From 7a4089769db7af2d75a6e09708896746a3cc08bd Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 27 Oct 2016 16:50:57 -0700 Subject: Fix memory leak --- src/core/lib/surface/server.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core/lib') diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index be16162e7f..3a90308058 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -842,6 +842,7 @@ static void accept_stream(grpc_exec_ctx *exec_ctx, void *cd, grpc_call_stack_element(grpc_call_get_call_stack(call), 0); if (error != GRPC_ERROR_NONE) { got_initial_metadata(exec_ctx, elem, error); + GRPC_ERROR_UNREF(error); return; } call_data *calld = elem->call_data; -- cgit v1.2.3 From 290e9a726d8764eb3c2deb239c4d689f4b3c4cf8 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 28 Oct 2016 08:17:00 -0700 Subject: Fix resource quotas on Windows --- src/core/lib/iomgr/endpoint_pair_windows.c | 6 +++--- src/core/lib/iomgr/tcp_client_windows.c | 26 +++++++++++++++++++---- src/core/lib/iomgr/tcp_server_windows.c | 22 ++++++++++++++++++-- src/core/lib/iomgr/tcp_windows.c | 33 ++++++++++++++++++++++++++++-- src/core/lib/iomgr/tcp_windows.h | 2 +- 5 files changed, 77 insertions(+), 12 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/endpoint_pair_windows.c b/src/core/lib/iomgr/endpoint_pair_windows.c index 5c78c95492..cb23e314cc 100644 --- a/src/core/lib/iomgr/endpoint_pair_windows.c +++ b/src/core/lib/iomgr/endpoint_pair_windows.c @@ -82,14 +82,14 @@ static void create_sockets(SOCKET sv[2]) { sv[0] = svr_sock; } -grpc_endpoint_pair grpc_iomgr_create_endpoint_pair(const char *name, +grpc_endpoint_pair grpc_iomgr_create_endpoint_pair(const char *name, grpc_resource_quota *resource_quota, size_t read_slice_size) { SOCKET sv[2]; grpc_endpoint_pair p; create_sockets(sv); - p.client = grpc_tcp_create(grpc_winsocket_create(sv[1], "endpoint:client"), + p.client = grpc_tcp_create(grpc_winsocket_create(sv[1], "endpoint:client"),resource_quota, "endpoint:server"); - p.server = grpc_tcp_create(grpc_winsocket_create(sv[0], "endpoint:server"), + p.server = grpc_tcp_create(grpc_winsocket_create(sv[0], "endpoint:server"), resource_quota, "endpoint:client"); return p; } diff --git a/src/core/lib/iomgr/tcp_client_windows.c b/src/core/lib/iomgr/tcp_client_windows.c index fdd8c1a1f8..ef9e5d6f94 100644 --- a/src/core/lib/iomgr/tcp_client_windows.c +++ b/src/core/lib/iomgr/tcp_client_windows.c @@ -50,6 +50,7 @@ #include "src/core/lib/iomgr/tcp_client.h" #include "src/core/lib/iomgr/tcp_windows.h" #include "src/core/lib/iomgr/timer.h" +#include "src/core/lib/channel/channel_args.h" typedef struct { grpc_closure *on_done; @@ -61,13 +62,15 @@ typedef struct { int refs; grpc_closure on_connect; grpc_endpoint **endpoint; + grpc_resource_quota *resource_quota; } async_connect; -static void async_connect_unlock_and_cleanup(async_connect *ac, +static void async_connect_unlock_and_cleanup(grpc_exec_ctx *exec_ctx, async_connect *ac, grpc_winsocket *socket) { int done = (--ac->refs == 0); gpr_mu_unlock(&ac->mu); if (done) { + grpc_resource_quota_internal_unref(exec_ctx, ac->resource_quota); gpr_mu_destroy(&ac->mu); gpr_free(ac->addr_name); gpr_free(ac); @@ -83,7 +86,7 @@ static void on_alarm(grpc_exec_ctx *exec_ctx, void *acp, grpc_error *error) { if (socket != NULL) { grpc_winsocket_shutdown(socket); } - async_connect_unlock_and_cleanup(ac, socket); + async_connect_unlock_and_cleanup(exec_ctx, ac, socket); } static void on_connect(grpc_exec_ctx *exec_ctx, void *acp, grpc_error *error) { @@ -113,12 +116,12 @@ static void on_connect(grpc_exec_ctx *exec_ctx, void *acp, grpc_error *error) { if (!wsa_success) { error = GRPC_WSA_ERROR(WSAGetLastError(), "ConnectEx"); } else { - *ep = grpc_tcp_create(socket, ac->addr_name); + *ep = grpc_tcp_create(socket, ac->resource_quota, ac->addr_name); socket = NULL; } } - async_connect_unlock_and_cleanup(ac, socket); + async_connect_unlock_and_cleanup(exec_ctx, ac, socket); /* If the connection was aborted, the callback was already called when the deadline was met. */ grpc_exec_ctx_sched(exec_ctx, on_done, error, NULL); @@ -129,6 +132,7 @@ static void on_connect(grpc_exec_ctx *exec_ctx, void *acp, grpc_error *error) { void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_done, grpc_endpoint **endpoint, grpc_pollset_set *interested_parties, + const grpc_channel_args *channel_args, const grpc_resolved_address *addr, gpr_timespec deadline) { SOCKET sock = INVALID_SOCKET; @@ -144,6 +148,18 @@ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_done, grpc_winsocket_callback_info *info; grpc_error *error = GRPC_ERROR_NONE; + grpc_resource_quota *resource_quota = grpc_resource_quota_create(NULL); + if (channel_args != NULL) { + for (size_t i = 0; i < channel_args->num_args; i++) { + if (0 == + strcmp(channel_args->args[i].key, GRPC_ARG_RESOURCE_QUOTA)) { + grpc_resource_quota_internal_unref(exec_ctx, resource_quota); + resource_quota = grpc_resource_quota_internal_ref( + channel_args->args[i].value.pointer.p); + } + } + } + *endpoint = NULL; /* Use dualstack sockets where available. */ @@ -206,6 +222,7 @@ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_done, ac->refs = 2; ac->addr_name = grpc_sockaddr_to_uri(addr); ac->endpoint = endpoint; + ac->resource_quota = resource_quota; grpc_closure_init(&ac->on_connect, on_connect, ac); grpc_timer_init(exec_ctx, &ac->alarm, deadline, on_alarm, ac, @@ -225,6 +242,7 @@ failure: } else if (sock != INVALID_SOCKET) { closesocket(sock); } + grpc_resource_quota_internal_unref(exec_ctx, resource_quota); grpc_exec_ctx_sched(exec_ctx, on_done, final_error, NULL); } diff --git a/src/core/lib/iomgr/tcp_server_windows.c b/src/core/lib/iomgr/tcp_server_windows.c index ad6769a6ba..eb965c8ccf 100644 --- a/src/core/lib/iomgr/tcp_server_windows.c +++ b/src/core/lib/iomgr/tcp_server_windows.c @@ -100,14 +100,31 @@ struct grpc_tcp_server { /* shutdown callback */ grpc_closure *shutdown_complete; + + grpc_resource_quota *resource_quota; }; /* Public function. Allocates the proper data structures to hold a grpc_tcp_server. */ -grpc_error *grpc_tcp_server_create(grpc_closure *shutdown_complete, +grpc_error *grpc_tcp_server_create(grpc_exec_ctx *exec_ctx, grpc_closure *shutdown_complete, const grpc_channel_args *args, grpc_tcp_server **server) { grpc_tcp_server *s = gpr_malloc(sizeof(grpc_tcp_server)); + s->resource_quota = grpc_resource_quota_create(NULL); + for (size_t i = 0; i < (args == NULL ? 0 : args->num_args); i++) { + if (0 == strcmp(GRPC_ARG_RESOURCE_QUOTA, args->args[i].key)) { + if (args->args[i].type == GRPC_ARG_POINTER) { + grpc_resource_quota_internal_unref(exec_ctx, s->resource_quota); + s->resource_quota = + grpc_resource_quota_internal_ref(args->args[i].value.pointer.p); + } else { + grpc_resource_quota_internal_unref(exec_ctx, s->resource_quota); + gpr_free(s); + return GRPC_ERROR_CREATE(GRPC_ARG_RESOURCE_QUOTA + " must be a pointer to a buffer pool"); + } + } + } gpr_ref_init(&s->refs, 1); gpr_mu_init(&s->mu); s->active_ports = 0; @@ -137,6 +154,7 @@ static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { grpc_winsocket_destroy(sp->socket); gpr_free(sp); } + grpc_resource_quota_internal_unref(exec_ctx, s->resource_quota); gpr_free(s); } @@ -367,7 +385,7 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { gpr_free(utf8_message); } gpr_asprintf(&fd_name, "tcp_server:%s", peer_name_string); - ep = grpc_tcp_create(grpc_winsocket_create(sock, fd_name), + ep = grpc_tcp_create(grpc_winsocket_create(sock, fd_name), sp->server->resource_quota, peer_name_string); gpr_free(fd_name); gpr_free(peer_name_string); diff --git a/src/core/lib/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.c index a5f508a2c3..5782fe9bc3 100644 --- a/src/core/lib/iomgr/tcp_windows.c +++ b/src/core/lib/iomgr/tcp_windows.c @@ -109,14 +109,29 @@ typedef struct grpc_tcp { gpr_slice_buffer *write_slices; gpr_slice_buffer *read_slices; + grpc_resource_user resource_user; + /* The IO Completion Port runs from another thread. We need some mechanism to protect ourselves when requesting a shutdown. */ gpr_mu mu; int shutting_down; + gpr_atm resource_user_shutdown_count; + char *peer_string; } grpc_tcp; +static void win_unref_closure(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, + grpc_error *error); + +static void win_maybe_shutdown_resource_user(grpc_exec_ctx *exec_ctx, + grpc_tcp *tcp) { + if (gpr_atm_full_fetch_add(&tcp->resource_user_shutdown_count, 1) == 0) { + grpc_resource_user_shutdown(exec_ctx, &tcp->resource_user, + grpc_closure_create(win_unref_closure, tcp)); + } +} + static void tcp_free(grpc_tcp *tcp) { grpc_winsocket_destroy(tcp->socket); gpr_mu_destroy(&tcp->mu); @@ -155,6 +170,11 @@ static void tcp_unref(grpc_tcp *tcp) { static void tcp_ref(grpc_tcp *tcp) { gpr_ref(&tcp->refcount); } #endif +static void win_unref_closure(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { + TCP_UNREF(arg, "resource_user"); +} + /* Asynchronous callback from the IOCP, or the background thread. */ static void on_read(grpc_exec_ctx *exec_ctx, void *tcpp, grpc_error *error) { grpc_tcp *tcp = tcpp; @@ -376,12 +396,14 @@ static void win_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { callback. See the comments in on_read and on_write. */ tcp->shutting_down = 1; grpc_winsocket_shutdown(tcp->socket); + win_maybe_shutdown_resource_user(exec_ctx, tcp); gpr_mu_unlock(&tcp->mu); } static void win_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_network_status_unregister_endpoint(ep); grpc_tcp *tcp = (grpc_tcp *)ep; + win_maybe_shutdown_resource_user(exec_ctx, tcp); TCP_UNREF(tcp, "destroy"); } @@ -392,6 +414,11 @@ static char *win_get_peer(grpc_endpoint *ep) { static grpc_workqueue *win_get_workqueue(grpc_endpoint *ep) { return NULL; } +static grpc_resource_user *win_get_resource_user(grpc_endpoint *ep) { + grpc_tcp *tcp = (grpc_tcp *)ep; + return &tcp->resource_user; +} + static grpc_endpoint_vtable vtable = {win_read, win_write, win_get_workqueue, @@ -399,18 +426,20 @@ static grpc_endpoint_vtable vtable = {win_read, win_add_to_pollset_set, win_shutdown, win_destroy, + win_get_resource_user, win_get_peer}; -grpc_endpoint *grpc_tcp_create(grpc_winsocket *socket, char *peer_string) { +grpc_endpoint *grpc_tcp_create(grpc_winsocket *socket, grpc_resource_quota *resource_quota, char *peer_string) { grpc_tcp *tcp = (grpc_tcp *)gpr_malloc(sizeof(grpc_tcp)); memset(tcp, 0, sizeof(grpc_tcp)); tcp->base.vtable = &vtable; tcp->socket = socket; gpr_mu_init(&tcp->mu); - gpr_ref_init(&tcp->refcount, 1); + gpr_ref_init(&tcp->refcount, 2); grpc_closure_init(&tcp->on_read, on_read, tcp); grpc_closure_init(&tcp->on_write, on_write, tcp); tcp->peer_string = gpr_strdup(peer_string); + grpc_resource_user_init(&tcp->resource_user, resource_quota, peer_string); /* Tell network status tracking code about the new endpoint */ grpc_network_status_register_endpoint(&tcp->base); diff --git a/src/core/lib/iomgr/tcp_windows.h b/src/core/lib/iomgr/tcp_windows.h index 86d777235e..40dca72936 100644 --- a/src/core/lib/iomgr/tcp_windows.h +++ b/src/core/lib/iomgr/tcp_windows.h @@ -50,7 +50,7 @@ /* Create a tcp endpoint given a winsock handle. * Takes ownership of the handle. */ -grpc_endpoint *grpc_tcp_create(grpc_winsocket *socket, char *peer_string); +grpc_endpoint *grpc_tcp_create(grpc_winsocket *socket, grpc_resource_quota *resource_quota, char *peer_string); grpc_error *grpc_tcp_prepare_socket(SOCKET sock); -- cgit v1.2.3 From a5ea56b68f0159f03da8442469ac4341e284b275 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 28 Oct 2016 08:19:02 -0700 Subject: clang-format code --- src/core/lib/iomgr/endpoint_pair_windows.c | 13 +++++++------ src/core/lib/iomgr/tcp_client_windows.c | 10 +++++----- src/core/lib/iomgr/tcp_server_windows.c | 9 +++++---- src/core/lib/iomgr/tcp_windows.c | 4 +++- src/core/lib/iomgr/tcp_windows.h | 4 +++- 5 files changed, 23 insertions(+), 17 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/endpoint_pair_windows.c b/src/core/lib/iomgr/endpoint_pair_windows.c index cb23e314cc..93f71b745c 100644 --- a/src/core/lib/iomgr/endpoint_pair_windows.c +++ b/src/core/lib/iomgr/endpoint_pair_windows.c @@ -82,15 +82,16 @@ static void create_sockets(SOCKET sv[2]) { sv[0] = svr_sock; } -grpc_endpoint_pair grpc_iomgr_create_endpoint_pair(const char *name, grpc_resource_quota *resource_quota, - size_t read_slice_size) { +grpc_endpoint_pair grpc_iomgr_create_endpoint_pair( + const char *name, grpc_resource_quota *resource_quota, + size_t read_slice_size) { SOCKET sv[2]; grpc_endpoint_pair p; create_sockets(sv); - p.client = grpc_tcp_create(grpc_winsocket_create(sv[1], "endpoint:client"),resource_quota, - "endpoint:server"); - p.server = grpc_tcp_create(grpc_winsocket_create(sv[0], "endpoint:server"), resource_quota, - "endpoint:client"); + p.client = grpc_tcp_create(grpc_winsocket_create(sv[1], "endpoint:client"), + resource_quota, "endpoint:server"); + p.server = grpc_tcp_create(grpc_winsocket_create(sv[0], "endpoint:server"), + resource_quota, "endpoint:client"); return p; } diff --git a/src/core/lib/iomgr/tcp_client_windows.c b/src/core/lib/iomgr/tcp_client_windows.c index ef9e5d6f94..620b38c825 100644 --- a/src/core/lib/iomgr/tcp_client_windows.c +++ b/src/core/lib/iomgr/tcp_client_windows.c @@ -43,6 +43,7 @@ #include #include +#include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/iocp_windows.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/sockaddr_utils.h" @@ -50,7 +51,6 @@ #include "src/core/lib/iomgr/tcp_client.h" #include "src/core/lib/iomgr/tcp_windows.h" #include "src/core/lib/iomgr/timer.h" -#include "src/core/lib/channel/channel_args.h" typedef struct { grpc_closure *on_done; @@ -65,7 +65,8 @@ typedef struct { grpc_resource_quota *resource_quota; } async_connect; -static void async_connect_unlock_and_cleanup(grpc_exec_ctx *exec_ctx, async_connect *ac, +static void async_connect_unlock_and_cleanup(grpc_exec_ctx *exec_ctx, + async_connect *ac, grpc_winsocket *socket) { int done = (--ac->refs == 0); gpr_mu_unlock(&ac->mu); @@ -151,11 +152,10 @@ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_done, grpc_resource_quota *resource_quota = grpc_resource_quota_create(NULL); if (channel_args != NULL) { for (size_t i = 0; i < channel_args->num_args; i++) { - if (0 == - strcmp(channel_args->args[i].key, GRPC_ARG_RESOURCE_QUOTA)) { + if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_RESOURCE_QUOTA)) { grpc_resource_quota_internal_unref(exec_ctx, resource_quota); resource_quota = grpc_resource_quota_internal_ref( - channel_args->args[i].value.pointer.p); + channel_args->args[i].value.pointer.p); } } } diff --git a/src/core/lib/iomgr/tcp_server_windows.c b/src/core/lib/iomgr/tcp_server_windows.c index eb965c8ccf..21d4f8bd71 100644 --- a/src/core/lib/iomgr/tcp_server_windows.c +++ b/src/core/lib/iomgr/tcp_server_windows.c @@ -106,7 +106,8 @@ struct grpc_tcp_server { /* Public function. Allocates the proper data structures to hold a grpc_tcp_server. */ -grpc_error *grpc_tcp_server_create(grpc_exec_ctx *exec_ctx, grpc_closure *shutdown_complete, +grpc_error *grpc_tcp_server_create(grpc_exec_ctx *exec_ctx, + grpc_closure *shutdown_complete, const grpc_channel_args *args, grpc_tcp_server **server) { grpc_tcp_server *s = gpr_malloc(sizeof(grpc_tcp_server)); @@ -116,7 +117,7 @@ grpc_error *grpc_tcp_server_create(grpc_exec_ctx *exec_ctx, grpc_closure *shutdo if (args->args[i].type == GRPC_ARG_POINTER) { grpc_resource_quota_internal_unref(exec_ctx, s->resource_quota); s->resource_quota = - grpc_resource_quota_internal_ref(args->args[i].value.pointer.p); + grpc_resource_quota_internal_ref(args->args[i].value.pointer.p); } else { grpc_resource_quota_internal_unref(exec_ctx, s->resource_quota); gpr_free(s); @@ -385,8 +386,8 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { gpr_free(utf8_message); } gpr_asprintf(&fd_name, "tcp_server:%s", peer_name_string); - ep = grpc_tcp_create(grpc_winsocket_create(sock, fd_name), sp->server->resource_quota, - peer_name_string); + ep = grpc_tcp_create(grpc_winsocket_create(sock, fd_name), + sp->server->resource_quota, peer_name_string); gpr_free(fd_name); gpr_free(peer_name_string); } else { diff --git a/src/core/lib/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.c index 5782fe9bc3..46f0491d10 100644 --- a/src/core/lib/iomgr/tcp_windows.c +++ b/src/core/lib/iomgr/tcp_windows.c @@ -429,7 +429,9 @@ static grpc_endpoint_vtable vtable = {win_read, win_get_resource_user, win_get_peer}; -grpc_endpoint *grpc_tcp_create(grpc_winsocket *socket, grpc_resource_quota *resource_quota, char *peer_string) { +grpc_endpoint *grpc_tcp_create(grpc_winsocket *socket, + grpc_resource_quota *resource_quota, + char *peer_string) { grpc_tcp *tcp = (grpc_tcp *)gpr_malloc(sizeof(grpc_tcp)); memset(tcp, 0, sizeof(grpc_tcp)); tcp->base.vtable = &vtable; diff --git a/src/core/lib/iomgr/tcp_windows.h b/src/core/lib/iomgr/tcp_windows.h index 40dca72936..4402de1c38 100644 --- a/src/core/lib/iomgr/tcp_windows.h +++ b/src/core/lib/iomgr/tcp_windows.h @@ -50,7 +50,9 @@ /* Create a tcp endpoint given a winsock handle. * Takes ownership of the handle. */ -grpc_endpoint *grpc_tcp_create(grpc_winsocket *socket, grpc_resource_quota *resource_quota, char *peer_string); +grpc_endpoint *grpc_tcp_create(grpc_winsocket *socket, + grpc_resource_quota *resource_quota, + char *peer_string); grpc_error *grpc_tcp_prepare_socket(SOCKET sock); -- cgit v1.2.3 From 85fe038342d307ea69dfee5bc2f1a0ff778cd409 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 28 Oct 2016 08:43:01 -0700 Subject: Fix some other Windows bugs while we're here --- src/core/lib/iomgr/tcp_client_windows.c | 2 +- src/core/lib/iomgr/tcp_server_windows.c | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/tcp_client_windows.c b/src/core/lib/iomgr/tcp_client_windows.c index 620b38c825..f5145abdc5 100644 --- a/src/core/lib/iomgr/tcp_client_windows.c +++ b/src/core/lib/iomgr/tcp_client_windows.c @@ -194,7 +194,7 @@ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_done, grpc_sockaddr_make_wildcard6(0, &local_address); status = - bind(sock, (struct sockaddr *)&local_address.addr, local_address.len); + bind(sock, (struct sockaddr *)&local_address.addr, (int)local_address.len); if (status != 0) { error = GRPC_WSA_ERROR(WSAGetLastError(), "bind"); goto failure; diff --git a/src/core/lib/iomgr/tcp_server_windows.c b/src/core/lib/iomgr/tcp_server_windows.c index 21d4f8bd71..4f04ecc03d 100644 --- a/src/core/lib/iomgr/tcp_server_windows.c +++ b/src/core/lib/iomgr/tcp_server_windows.c @@ -226,12 +226,13 @@ static grpc_error *prepare_socket(SOCKET sock, goto failure; } - sockname_temp.len = sizeof(struct sockaddr_storage); + int sockname_temp_len = sizeof(struct sockaddr_storage); if (getsockname(sock, (struct sockaddr *)sockname_temp.addr, - &sockname_temp.len) == SOCKET_ERROR) { + &sockname_temp_len) == SOCKET_ERROR) { error = GRPC_WSA_ERROR(WSAGetLastError(), "getsockname"); goto failure; } + sockname_temp.len = sockname_temp_len; *port = grpc_sockaddr_get_port(&sockname_temp); return GRPC_ERROR_NONE; @@ -376,8 +377,10 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { gpr_log(GPR_ERROR, "setsockopt error: %s", utf8_message); gpr_free(utf8_message); } + int peer_name_len = (int) peer_name.len; err = - getpeername(sock, (struct sockaddr *)peer_name.addr, &peer_name.len); + getpeername(sock, (struct sockaddr *)peer_name.addr, &peer_name_len); + peer_name.len = peer_name_len; if (!err) { peer_name_string = grpc_sockaddr_to_uri(&peer_name); } else { @@ -485,10 +488,11 @@ grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s, as some previously created listener. */ if (grpc_sockaddr_get_port(addr) == 0) { for (sp = s->head; sp; sp = sp->next) { - sockname_temp.len = sizeof(struct sockaddr_storage); + int sockname_temp_len = sizeof(struct sockaddr_storage); if (0 == getsockname(sp->socket->socket, (struct sockaddr *)sockname_temp.addr, - &sockname_temp.len)) { + &sockname_temp_len)) { + sockname_temp.len = sockname_temp_len; *port = grpc_sockaddr_get_port(&sockname_temp); if (*port > 0) { allocated_addr = gpr_malloc(sizeof(grpc_resolved_address)); -- cgit v1.2.3 From 6108d1fee3880ebce9c0f1234f51216ece036659 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 28 Oct 2016 08:43:21 -0700 Subject: clang-format code --- src/core/lib/iomgr/tcp_client_windows.c | 4 ++-- src/core/lib/iomgr/tcp_server_windows.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/tcp_client_windows.c b/src/core/lib/iomgr/tcp_client_windows.c index f5145abdc5..30f7c66f15 100644 --- a/src/core/lib/iomgr/tcp_client_windows.c +++ b/src/core/lib/iomgr/tcp_client_windows.c @@ -193,8 +193,8 @@ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_done, grpc_sockaddr_make_wildcard6(0, &local_address); - status = - bind(sock, (struct sockaddr *)&local_address.addr, (int)local_address.len); + status = bind(sock, (struct sockaddr *)&local_address.addr, + (int)local_address.len); if (status != 0) { error = GRPC_WSA_ERROR(WSAGetLastError(), "bind"); goto failure; diff --git a/src/core/lib/iomgr/tcp_server_windows.c b/src/core/lib/iomgr/tcp_server_windows.c index 4f04ecc03d..ae54c70d2d 100644 --- a/src/core/lib/iomgr/tcp_server_windows.c +++ b/src/core/lib/iomgr/tcp_server_windows.c @@ -377,7 +377,7 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { gpr_log(GPR_ERROR, "setsockopt error: %s", utf8_message); gpr_free(utf8_message); } - int peer_name_len = (int) peer_name.len; + int peer_name_len = (int)peer_name.len; err = getpeername(sock, (struct sockaddr *)peer_name.addr, &peer_name_len); peer_name.len = peer_name_len; -- cgit v1.2.3 From 61f0973e55c40146e11492ff7b6de39426f7e3ca Mon Sep 17 00:00:00 2001 From: Lizan Zhou Date: Wed, 26 Oct 2016 14:09:52 -0700 Subject: Skip compress filter if byte_buffer is compressed --- src/core/lib/channel/compress_filter.c | 10 +++++++--- src/core/lib/surface/call.c | 6 ++++++ 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/channel/compress_filter.c b/src/core/lib/channel/compress_filter.c index 0981d59f63..23b7dfb8fd 100644 --- a/src/core/lib/channel/compress_filter.c +++ b/src/core/lib/channel/compress_filter.c @@ -111,9 +111,13 @@ static grpc_mdelem *compression_md_filter(void *user_data, grpc_mdelem *md) { return md; } -static int skip_compression(grpc_call_element *elem) { +static int skip_compression(grpc_call_element *elem, uint32_t flags) { call_data *calld = elem->call_data; channel_data *channeld = elem->channel_data; + + if (flags & (GRPC_WRITE_NO_COMPRESS | GRPC_WRITE_INTERNAL_COMPRESS)) { + return 1; + } if (calld->has_compression_algorithm) { if (calld->compression_algorithm == GRPC_COMPRESS_NONE) { return 1; @@ -241,8 +245,8 @@ static void compress_start_transport_stream_op(grpc_exec_ctx *exec_ctx, if (op->send_initial_metadata) { process_send_initial_metadata(elem, op->send_initial_metadata); } - if (op->send_message != NULL && !skip_compression(elem) && - 0 == (op->send_message->flags & GRPC_WRITE_NO_COMPRESS)) { + if (op->send_message != NULL && + !skip_compression(elem, op->send_message->flags)) { calld->send_op = op; calld->send_length = op->send_message->length; calld->send_flags = op->send_message->flags; diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 02a5de0857..255876134f 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -1461,6 +1461,12 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx, grpc_slice_buffer_stream_init( &call->sending_stream, &op->data.send_message->data.raw.slice_buffer, op->flags); + /* If the outgoing buffer is already compressed, mark it as so in the + flags. These will be picked up by the compression filter and further + (wasteful) attempts at compression skipped. */ + if (op->data.send_message->data.raw.compression > GRPC_COMPRESS_NONE) { + call->sending_stream.base.flags |= GRPC_WRITE_INTERNAL_COMPRESS; + } stream_op->send_message = &call->sending_stream.base; break; case GRPC_OP_SEND_CLOSE_FROM_CLIENT: -- cgit v1.2.3 From a0d2468b57b39de0855832db336130000a08cced Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Fri, 28 Oct 2016 18:18:07 -0700 Subject: Fix compilation bug when GRPC_UV is defined --- src/core/lib/iomgr/endpoint_pair_uv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/endpoint_pair_uv.c b/src/core/lib/iomgr/endpoint_pair_uv.c index 7941e20388..ff24894c6d 100644 --- a/src/core/lib/iomgr/endpoint_pair_uv.c +++ b/src/core/lib/iomgr/endpoint_pair_uv.c @@ -41,8 +41,9 @@ #include "src/core/lib/iomgr/endpoint_pair.h" -grpc_endpoint_pair grpc_iomgr_create_endpoint_pair(const char *name, - size_t read_slice_size) { +grpc_endpoint_pair grpc_iomgr_create_endpoint_pair( + const char *name, grpc_resource_quota *resource_quota, + size_t read_slice_size) { grpc_endpoint_pair endpoint_pair; // TODO(mlumish): implement this properly under libuv GPR_ASSERT(false && -- cgit v1.2.3 From 894db55ab97aac8ea97602af0c06ba0031c3af97 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Fri, 28 Oct 2016 18:25:24 -0700 Subject: Fix compiler errors in gcc4.4 and 4.6 --- src/core/lib/iomgr/resource_quota.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/resource_quota.c b/src/core/lib/iomgr/resource_quota.c index bfc905845d..e39cf28e35 100644 --- a/src/core/lib/iomgr/resource_quota.c +++ b/src/core/lib/iomgr/resource_quota.c @@ -166,8 +166,11 @@ static void rq_step(grpc_exec_ctx *exec_ctx, void *rq, grpc_error *error) { do { if (rq_alloc(exec_ctx, resource_quota)) goto done; } while (rq_reclaim_from_per_user_free_pool(exec_ctx, resource_quota)); - rq_reclaim(exec_ctx, resource_quota, false) || - rq_reclaim(exec_ctx, resource_quota, true); + + if (!rq_reclaim(exec_ctx, resource_quota, false)) { + rq_reclaim(exec_ctx, resource_quota, true); + } + done: grpc_resource_quota_internal_unref(exec_ctx, resource_quota); } -- cgit v1.2.3 From 98da61ba109405f173fbe8e11d169ab41fc407fb Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Sat, 29 Oct 2016 08:46:31 +0200 Subject: gRPC LB fixes from end two end testing --- src/core/ext/lb_policy/grpclb/grpclb.c | 632 +++++++++++---------- src/core/ext/lb_policy/round_robin/round_robin.c | 39 +- .../chttp2/client/secure/secure_channel_create.c | 2 +- .../lib/security/transport/security_connector.c | 4 +- 4 files changed, 364 insertions(+), 313 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index 6da4febf26..d2af27e7bf 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -43,30 +43,26 @@ * policy to select from this list of LB server backends. * * The first time the policy gets a request for a pick, a ping, or to exit the - * idle state, \a query_for_backends() is called. It creates an instance of \a - * lb_client_data, an internal struct meant to contain the data associated with - * the internal communication with the LB server. This instance is created via - * \a lb_client_data_create(). There, the call over lb_channel to pick-first - * from {a1..an} is created, the \a LoadBalancingRequest message is assembled - * and all necessary callbacks for the progress of the internal call configured. + * idle state, \a query_for_backends_locked() is called. This function sets up + * and initiates the internal communication with the LB server. In particular, + * it's responsible for instantiating the internal *streaming* call to the LB + * server (whichever address from {a1..an} pick-first chose). This call is + * serviced by two callbacks, \a srv_status_rcvd and \a res_rcvd. The former + * will be called when the call to the LB server completes. This can happen if + * the LB server closes the connection or if this policy itself cancels the call + * (for example because it's shutting down). If the call fails with + * UNIMPLEMENTED, the original picks/pings will fail. This signals that there's + * a misconfiguration somewhere: at least one of {a1..an} isn't an LB server, + * which contradicts the LB bit being set. If the internal call times out, the + * usual behavior of pick-first applies, continuing to pick from the list + * {a1..an}. * - * Back in \a query_for_backends(), the internal *streaming* call to the LB - * server (whichever address from {a1..an} pick-first chose) is kicked off. - * It'll progress over the callbacks configured in \a lb_client_data_create() - * (see the field docstrings of \a lb_client_data for more details). - * - * If the call fails with UNIMPLEMENTED, the original call will also fail. - * There's a misconfiguration somewhere: at least one of {a1..an} isn't a LB - * server, which contradicts the LB bit being set. If the internal call times - * out, the usual behavior of pick-first applies, continuing to pick from the - * list {a1..an}. - * - * Upon sucesss, a \a LoadBalancingResponse is expected in \a res_recv_cb. An - * invalid one results in the termination of the streaming call. A new streaming - * call should be created if possible, failing the original call otherwise. - * For a valid \a LoadBalancingResponse, the server list of actual backends is - * extracted. A Round Robin policy will be created from this list. There are two - * possible scenarios: + * Upon sucesss, the incoming \a LoadBalancingResponse is processed by \a + * res_recv. An invalid one results in the termination of the streaming call. A + * new streaming call should be created if possible, failing the original call + * otherwise. For a valid \a LoadBalancingResponse, the server list of actual + * backends is extracted. A Round Robin policy will be created from this list. + * There are two possible scenarios: * * 1. This is the first server list received. There was no previous instance of * the Round Robin policy. \a rr_handover_locked() will instantiate the RR @@ -120,12 +116,20 @@ #include "src/core/ext/lb_policy/grpclb/grpclb.h" #include "src/core/ext/lb_policy/grpclb/load_balancer_api.h" #include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/sockaddr_utils.h" +#include "src/core/lib/iomgr/timer.h" +#include "src/core/lib/support/backoff.h" #include "src/core/lib/support/string.h" #include "src/core/lib/surface/call.h" #include "src/core/lib/surface/channel.h" #include "src/core/lib/transport/static_metadata.h" +#define BACKOFF_MULTIPLIER 1.6 +#define BACKOFF_JITTER 0.2 +#define BACKOFF_MIN_SECONDS 10 +#define BACKOFF_MAX_SECONDS 60 + int grpc_lb_glb_trace = 0; /* add lb_token of selected subchannel (address) to the call's initial @@ -174,13 +178,12 @@ typedef struct wrapped_rr_closure_arg { static void wrapped_rr_closure(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { wrapped_rr_closure_arg *wc_arg = arg; - if (wc_arg->rr_policy != NULL) { - if (grpc_lb_glb_trace) { - gpr_log(GPR_INFO, "Unreffing RR (0x%" PRIxPTR ")", - (intptr_t)wc_arg->rr_policy); - } - GRPC_LB_POLICY_UNREF(exec_ctx, wc_arg->rr_policy, "wrapped_rr_closure"); + GPR_ASSERT(wc_arg->wrapped_closure != NULL); + grpc_exec_ctx_sched(exec_ctx, wc_arg->wrapped_closure, GRPC_ERROR_REF(error), + NULL); + + if (wc_arg->rr_policy != NULL) { /* if target is NULL, no pick has been made by the RR policy (eg, all * addresses failed to connect). There won't be any user_data/token * available */ @@ -189,10 +192,12 @@ static void wrapped_rr_closure(grpc_exec_ctx *exec_ctx, void *arg, wc_arg->lb_token_mdelem_storage, GRPC_MDELEM_REF(wc_arg->lb_token)); } + if (grpc_lb_glb_trace) { + gpr_log(GPR_INFO, "Unreffing RR (0x%" PRIxPTR ")", + (intptr_t)wc_arg->rr_policy); + } + GRPC_LB_POLICY_UNREF(exec_ctx, wc_arg->rr_policy, "wrapped_rr_closure"); } - GPR_ASSERT(wc_arg->wrapped_closure != NULL); - grpc_exec_ctx_sched(exec_ctx, wc_arg->wrapped_closure, GRPC_ERROR_REF(error), - NULL); GPR_ASSERT(wc_arg->free_when_done != NULL); gpr_free(wc_arg->free_when_done); } @@ -264,7 +269,6 @@ static void add_pending_ping(pending_ping **root, grpc_closure *notify) { * glb_lb_policy */ typedef struct rr_connectivity_data rr_connectivity_data; -struct lb_client_data; static const grpc_lb_policy_vtable glb_lb_policy_vtable; typedef struct glb_lb_policy { /** base policy: must be first */ @@ -296,20 +300,53 @@ typedef struct glb_lb_policy { * response has arrived. */ grpc_grpclb_serverlist *serverlist; - /** addresses from \a serverlist */ - grpc_lb_addresses *addresses; - /** list of picks that are waiting on RR's policy connectivity */ pending_pick *pending_picks; /** list of pings that are waiting on RR's policy connectivity */ pending_ping *pending_pings; - /** client data associated with the LB server communication */ - struct lb_client_data *lb_client; + bool shutting_down; + + /************************************************************/ + /* client data associated with the LB server communication */ + /************************************************************/ + /* called once initial metadata's been sent */ + grpc_closure md_sent; + + /* called once the LoadBalanceRequest has been sent to the LB server. See + * src/proto/grpc/.../load_balancer.proto */ + grpc_closure req_sent; + + /* A response from the LB server has been received (or error). Process it */ + grpc_closure res_rcvd; + + /* ... and the status from the LB server has been received */ + grpc_closure srv_status_rcvd; + + grpc_call *lb_call; /* streaming call to the LB server, */ + + grpc_metadata_array initial_metadata_recv; /* initial MD from LB server */ + grpc_metadata_array trailing_metadata_recv; /* trailing MD from LB server */ + + /* what's being sent to the LB server. Note that its value may vary if the LB + * server indicates a redirect. */ + grpc_byte_buffer *request_payload; + + /* response from the LB server, if any. Processed in res_recv_cb() */ + grpc_byte_buffer *response_payload; + + /* the call's status and status detailset in srv_status_rcvd_cb() */ + grpc_status_code lb_call_status; + char *lb_call_status_details; + size_t lb_call_status_details_capacity; + + /** LB call retry backoff state */ + gpr_backoff lb_call_backoff_state; + + /** LB call retry timer */ + grpc_timer lb_call_retry_timer; - /** for tracking of the RR connectivity */ - rr_connectivity_data *rr_connectivity; } glb_lb_policy; /* Keeps track and reacts to changes in connectivity of the RR instance */ @@ -427,7 +464,6 @@ static grpc_lb_addresses *process_serverlist( ++addr_idx; } GPR_ASSERT(addr_idx == num_valid); - return lb_addresses; } @@ -448,7 +484,7 @@ static bool pick_from_internal_rr_locked( gpr_log(GPR_INFO, "Unreffing RR (0x%" PRIxPTR ")", (intptr_t)wc_arg->rr_policy); } - GRPC_LB_POLICY_UNREF(exec_ctx, wc_arg->rr_policy, "glb_pick"); + GRPC_LB_POLICY_UNREF(exec_ctx, wc_arg->rr_policy, "glb_pick_sync"); /* add the load reporting initial metadata */ initial_metadata_add_lb_token(pick_args->initial_metadata, @@ -461,7 +497,6 @@ static bool pick_from_internal_rr_locked( * pending pick list inside the RR policy (glb_policy->rr_policy). * Eventually, wrapped_on_complete will be called, which will -among other * things- add the LB token to the call's initial metadata */ - return pick_done; } @@ -470,54 +505,69 @@ static grpc_lb_policy *create_rr_locked( glb_lb_policy *glb_policy) { GPR_ASSERT(serverlist != NULL && serverlist->num_servers > 0); - if (glb_policy->addresses != NULL) { - /* dispose of the previous version */ - grpc_lb_addresses_destroy(glb_policy->addresses); - } - glb_policy->addresses = process_serverlist(serverlist); - grpc_lb_policy_args args; memset(&args, 0, sizeof(args)); args.client_channel_factory = glb_policy->cc_factory; + grpc_lb_addresses *addresses = process_serverlist(serverlist); // Replace the LB addresses in the channel args that we pass down to // the subchannel. static const char *keys_to_remove[] = {GRPC_ARG_LB_ADDRESSES}; - const grpc_arg arg = - grpc_lb_addresses_create_channel_arg(glb_policy->addresses); + const grpc_arg arg = grpc_lb_addresses_create_channel_arg(addresses); args.args = grpc_channel_args_copy_and_add_and_remove( glb_policy->args, keys_to_remove, GPR_ARRAY_SIZE(keys_to_remove), &arg, 1); grpc_lb_policy *rr = grpc_lb_policy_create(exec_ctx, "round_robin", &args); + GPR_ASSERT(rr != NULL); + grpc_lb_addresses_destroy(addresses); grpc_channel_args_destroy(args.args); - return rr; } +static void glb_rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error); +/* glb_policy->rr_policy may be NULL (initial handover) */ static void rr_handover_locked(grpc_exec_ctx *exec_ctx, glb_lb_policy *glb_policy, grpc_error *error) { GPR_ASSERT(glb_policy->serverlist != NULL && glb_policy->serverlist->num_servers > 0); + + if (grpc_lb_glb_trace) { + gpr_log(GPR_INFO, "RR handover. Old RR: %p", (void *)glb_policy->rr_policy); + } + if (glb_policy->rr_policy != NULL) { + /* if we are phasing out an existing RR instance, unref it. */ + GRPC_LB_POLICY_UNREF(exec_ctx, glb_policy->rr_policy, "rr_handover_locked"); + } + glb_policy->rr_policy = create_rr_locked(exec_ctx, glb_policy->serverlist, glb_policy); - if (grpc_lb_glb_trace) { - gpr_log(GPR_INFO, "Created RR policy (0x%" PRIxPTR ")", - (intptr_t)glb_policy->rr_policy); + gpr_log(GPR_INFO, "Created RR policy (%p)", (void *)glb_policy->rr_policy); } + GPR_ASSERT(glb_policy->rr_policy != NULL); grpc_pollset_set_add_pollset_set(exec_ctx, glb_policy->rr_policy->interested_parties, glb_policy->base.interested_parties); - glb_policy->rr_connectivity->state = grpc_lb_policy_check_connectivity( + + rr_connectivity_data *rr_connectivity = + gpr_malloc(sizeof(rr_connectivity_data)); + memset(rr_connectivity, 0, sizeof(rr_connectivity_data)); + grpc_closure_init(&rr_connectivity->on_change, glb_rr_connectivity_changed, + rr_connectivity); + rr_connectivity->glb_policy = glb_policy; + rr_connectivity->state = grpc_lb_policy_check_connectivity( exec_ctx, glb_policy->rr_policy, &error); - grpc_lb_policy_notify_on_state_change( - exec_ctx, glb_policy->rr_policy, &glb_policy->rr_connectivity->state, - &glb_policy->rr_connectivity->on_change); + grpc_connectivity_state_set(exec_ctx, &glb_policy->state_tracker, - glb_policy->rr_connectivity->state, - GRPC_ERROR_REF(error), "rr_handover"); + rr_connectivity->state, GRPC_ERROR_REF(error), + "rr_handover"); + /* subscribe */ + grpc_lb_policy_notify_on_state_change(exec_ctx, glb_policy->rr_policy, + &rr_connectivity->state, + &rr_connectivity->on_change); grpc_lb_policy_exit_idle(exec_ctx, glb_policy->rr_policy); /* flush pending ops */ @@ -551,35 +601,24 @@ static void rr_handover_locked(grpc_exec_ctx *exec_ctx, static void glb_rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { + /* If shutdown or error free the arg. Rely on the rest of the code to set the + * right grpclb status. */ rr_connectivity_data *rr_conn_data = arg; glb_lb_policy *glb_policy = rr_conn_data->glb_policy; - if (rr_conn_data->state == GRPC_CHANNEL_SHUTDOWN) { - if (glb_policy->serverlist != NULL) { - /* a RR policy is shutting down but there's a serverlist available -> - * perform a handover */ - gpr_mu_lock(&glb_policy->mu); - rr_handover_locked(exec_ctx, glb_policy, error); - gpr_mu_unlock(&glb_policy->mu); - } else { - /* shutting down and no new serverlist available. Bail out. */ - gpr_free(rr_conn_data); - } + if (rr_conn_data->state != GRPC_CHANNEL_SHUTDOWN) { + gpr_mu_lock(&glb_policy->mu); + /* RR not shutting down. Mimic the RR's policy state */ + grpc_connectivity_state_set(exec_ctx, &glb_policy->state_tracker, + rr_conn_data->state, GRPC_ERROR_REF(error), + "glb_rr_connectivity_changed"); + /* resubscribe */ + grpc_lb_policy_notify_on_state_change(exec_ctx, glb_policy->rr_policy, + &rr_conn_data->state, + &rr_conn_data->on_change); + gpr_mu_unlock(&glb_policy->mu); } else { - if (error == GRPC_ERROR_NONE) { - gpr_mu_lock(&glb_policy->mu); - /* RR not shutting down. Mimic the RR's policy state */ - grpc_connectivity_state_set(exec_ctx, &glb_policy->state_tracker, - rr_conn_data->state, GRPC_ERROR_REF(error), - "glb_rr_connectivity_changed"); - /* resubscribe */ - grpc_lb_policy_notify_on_state_change(exec_ctx, glb_policy->rr_policy, - &rr_conn_data->state, - &rr_conn_data->on_change); - gpr_mu_unlock(&glb_policy->mu); - } else { /* error */ - gpr_free(rr_conn_data); - } + gpr_free(rr_conn_data); } } @@ -682,18 +721,11 @@ static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx, return NULL; } - rr_connectivity_data *rr_connectivity = - gpr_malloc(sizeof(rr_connectivity_data)); - memset(rr_connectivity, 0, sizeof(rr_connectivity_data)); - grpc_closure_init(&rr_connectivity->on_change, glb_rr_connectivity_changed, - rr_connectivity); - rr_connectivity->glb_policy = glb_policy; - glb_policy->rr_connectivity = rr_connectivity; - grpc_lb_policy_init(&glb_policy->base, &glb_lb_policy_vtable); gpr_mu_init(&glb_policy->mu); grpc_connectivity_state_init(&glb_policy->state_tracker, GRPC_CHANNEL_IDLE, "grpclb"); + return &glb_policy->base; } @@ -710,14 +742,13 @@ static void glb_destroy(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { grpc_grpclb_destroy_serverlist(glb_policy->serverlist); } gpr_mu_destroy(&glb_policy->mu); - grpc_lb_addresses_destroy(glb_policy->addresses); gpr_free(glb_policy); } -static void lb_client_data_destroy(struct lb_client_data *lb_client); static void glb_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { glb_lb_policy *glb_policy = (glb_lb_policy *)pol; gpr_mu_lock(&glb_policy->mu); + glb_policy->shutting_down = true; pending_pick *pp = glb_policy->pending_picks; glb_policy->pending_picks = NULL; @@ -741,15 +772,15 @@ static void glb_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { } if (glb_policy->rr_policy) { - /* unsubscribe */ - grpc_lb_policy_notify_on_state_change( - exec_ctx, glb_policy->rr_policy, NULL, - &glb_policy->rr_connectivity->on_change); GRPC_LB_POLICY_UNREF(exec_ctx, glb_policy->rr_policy, "glb_shutdown"); } - lb_client_data_destroy(glb_policy->lb_client); - glb_policy->lb_client = NULL; + if (glb_policy->started_picking) { + if (glb_policy->lb_call != NULL) { + grpc_call_cancel(glb_policy->lb_call, NULL); + /* srv_status_rcvd_cb will pick up the cancellation and clean up */ + } + } grpc_connectivity_state_set( exec_ctx, &glb_policy->state_tracker, GRPC_CHANNEL_SHUTDOWN, @@ -780,17 +811,12 @@ static void glb_cancel_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, GRPC_ERROR_UNREF(error); } -static grpc_call *lb_client_data_get_call(struct lb_client_data *lb_client); static void glb_cancel_picks(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, uint32_t initial_metadata_flags_mask, uint32_t initial_metadata_flags_eq, grpc_error *error) { glb_lb_policy *glb_policy = (glb_lb_policy *)pol; gpr_mu_lock(&glb_policy->mu); - if (glb_policy->lb_client != NULL) { - /* cancel the call to the load balancer service, if any */ - grpc_call_cancel(lb_client_data_get_call(glb_policy->lb_client), NULL); - } pending_pick *pp = glb_policy->pending_picks; glb_policy->pending_picks = NULL; while (pp != NULL) { @@ -810,18 +836,20 @@ static void glb_cancel_picks(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, GRPC_ERROR_UNREF(error); } -static void query_for_backends(grpc_exec_ctx *exec_ctx, - glb_lb_policy *glb_policy); -static void start_picking(grpc_exec_ctx *exec_ctx, glb_lb_policy *glb_policy) { +static void query_for_backends_locked(grpc_exec_ctx *exec_ctx, + glb_lb_policy *glb_policy); +static void start_picking_locked(grpc_exec_ctx *exec_ctx, + glb_lb_policy *glb_policy) { glb_policy->started_picking = true; - query_for_backends(exec_ctx, glb_policy); + gpr_backoff_reset(&glb_policy->lb_call_backoff_state); + query_for_backends_locked(exec_ctx, glb_policy); } static void glb_exit_idle(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { glb_lb_policy *glb_policy = (glb_lb_policy *)pol; gpr_mu_lock(&glb_policy->mu); if (!glb_policy->started_picking) { - start_picking(exec_ctx, glb_policy); + start_picking_locked(exec_ctx, glb_policy); } gpr_mu_unlock(&glb_policy->mu); } @@ -847,8 +875,8 @@ static int glb_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, if (glb_policy->rr_policy != NULL) { if (grpc_lb_glb_trace) { - gpr_log(GPR_INFO, "about to PICK from 0x%" PRIxPTR "", - (intptr_t)glb_policy->rr_policy); + gpr_log(GPR_INFO, "grpclb %p about to PICK from RR %p", + (void *)glb_policy, (void *)glb_policy->rr_policy); } GRPC_LB_POLICY_REF(glb_policy->rr_policy, "glb_pick"); @@ -865,11 +893,17 @@ static int glb_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, pick_done = pick_from_internal_rr_locked(exec_ctx, glb_policy->rr_policy, pick_args, target, wc_arg); } else { + if (grpc_lb_glb_trace) { + gpr_log(GPR_DEBUG, + "No RR policy in grpclb instance %p. Adding to grpclb's pending " + "picks", + (void *)(glb_policy)); + } add_pending_pick(&glb_policy->pending_picks, pick_args, target, on_complete); if (!glb_policy->started_picking) { - start_picking(exec_ctx, glb_policy); + start_picking_locked(exec_ctx, glb_policy); } pick_done = false; } @@ -898,7 +932,7 @@ static void glb_ping_one(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, } else { add_pending_ping(&glb_policy->pending_pings, closure); if (!glb_policy->started_picking) { - start_picking(exec_ctx, glb_policy); + start_picking_locked(exec_ctx, glb_policy); } } gpr_mu_unlock(&glb_policy->mu); @@ -916,250 +950,181 @@ static void glb_notify_on_state_change(grpc_exec_ctx *exec_ctx, gpr_mu_unlock(&glb_policy->mu); } -/* - * lb_client_data - * - * Used internally for the client call to the LB */ -typedef struct lb_client_data { - gpr_mu mu; - - /* called once initial metadata's been sent */ - grpc_closure md_sent; - - /* called once the LoadBalanceRequest has been sent to the LB server. See - * src/proto/grpc/.../load_balancer.proto */ - grpc_closure req_sent; - - /* A response from the LB server has been received (or error). Process it */ - grpc_closure res_rcvd; - - /* After the client has sent a close to the LB server */ - grpc_closure close_sent; - - /* ... and the status from the LB server has been received */ - grpc_closure srv_status_rcvd; - - grpc_call *lb_call; /* streaming call to the LB server, */ - gpr_timespec deadline; /* for the streaming call to the LB server */ - - grpc_metadata_array initial_metadata_recv; /* initial MD from LB server */ - grpc_metadata_array trailing_metadata_recv; /* trailing MD from LB server */ - - /* what's being sent to the LB server. Note that its value may vary if the LB - * server indicates a redirect. */ - grpc_byte_buffer *request_payload; - - /* response from the LB server, if any. Processed in res_recv_cb() */ - grpc_byte_buffer *response_payload; - - /* the call's status and status detailset in srv_status_rcvd_cb() */ - grpc_status_code status; - char *status_details; - size_t status_details_capacity; - - /* pointer back to the enclosing policy */ - glb_lb_policy *glb_policy; -} lb_client_data; - -static void md_sent_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error); -static void req_sent_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error); -static void res_recv_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error); -static void close_sent_cb(grpc_exec_ctx *exec_ctx, void *arg, - grpc_error *error); static void srv_status_rcvd_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error); - -static lb_client_data *lb_client_data_create(glb_lb_policy *glb_policy) { +static void res_recv_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error); +static void lb_client_init(glb_lb_policy *glb_policy) { GPR_ASSERT(glb_policy->server_name != NULL); GPR_ASSERT(glb_policy->server_name[0] != '\0'); - lb_client_data *lb_client = gpr_malloc(sizeof(lb_client_data)); - memset(lb_client, 0, sizeof(lb_client_data)); - - gpr_mu_init(&lb_client->mu); - grpc_closure_init(&lb_client->md_sent, md_sent_cb, lb_client); - - grpc_closure_init(&lb_client->req_sent, req_sent_cb, lb_client); - grpc_closure_init(&lb_client->res_rcvd, res_recv_cb, lb_client); - grpc_closure_init(&lb_client->close_sent, close_sent_cb, lb_client); - grpc_closure_init(&lb_client->srv_status_rcvd, srv_status_rcvd_cb, lb_client); - - lb_client->deadline = glb_policy->deadline; - /* Note the following LB call progresses every time there's activity in \a * glb_policy->base.interested_parties, which is comprised of the polling * entities from \a client_channel. */ - lb_client->lb_call = grpc_channel_create_pollset_set_call( + glb_policy->lb_call = grpc_channel_create_pollset_set_call( glb_policy->lb_channel, NULL, GRPC_PROPAGATE_DEFAULTS, glb_policy->base.interested_parties, "/grpc.lb.v1.LoadBalancer/BalanceLoad", glb_policy->server_name, - lb_client->deadline, NULL); + glb_policy->deadline, NULL); - grpc_metadata_array_init(&lb_client->initial_metadata_recv); - grpc_metadata_array_init(&lb_client->trailing_metadata_recv); + grpc_metadata_array_init(&glb_policy->initial_metadata_recv); + grpc_metadata_array_init(&glb_policy->trailing_metadata_recv); grpc_grpclb_request *request = grpc_grpclb_request_create(glb_policy->server_name); gpr_slice request_payload_slice = grpc_grpclb_request_encode(request); - lb_client->request_payload = + glb_policy->request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); gpr_slice_unref(request_payload_slice); grpc_grpclb_request_destroy(request); - lb_client->status_details = NULL; - lb_client->status_details_capacity = 0; - lb_client->glb_policy = glb_policy; - return lb_client; + glb_policy->lb_call_status_details = NULL; + glb_policy->lb_call_status_details_capacity = 0; + + grpc_closure_init(&glb_policy->srv_status_rcvd, srv_status_rcvd_cb, + glb_policy); + grpc_closure_init(&glb_policy->res_rcvd, res_recv_cb, glb_policy); + + gpr_backoff_init(&glb_policy->lb_call_backoff_state, BACKOFF_MULTIPLIER, + BACKOFF_JITTER, BACKOFF_MIN_SECONDS * 1000, + BACKOFF_MAX_SECONDS * 1000); } -static void lb_client_data_destroy(lb_client_data *lb_client) { - grpc_call_destroy(lb_client->lb_call); - grpc_metadata_array_destroy(&lb_client->initial_metadata_recv); - grpc_metadata_array_destroy(&lb_client->trailing_metadata_recv); +static void lb_client_destroy(glb_lb_policy *glb_policy) { + GPR_ASSERT(glb_policy->lb_call != NULL); + grpc_call_destroy(glb_policy->lb_call); + glb_policy->lb_call = NULL; - grpc_byte_buffer_destroy(lb_client->request_payload); + grpc_metadata_array_destroy(&glb_policy->initial_metadata_recv); + grpc_metadata_array_destroy(&glb_policy->trailing_metadata_recv); - gpr_free(lb_client->status_details); - gpr_mu_destroy(&lb_client->mu); - gpr_free(lb_client); -} -static grpc_call *lb_client_data_get_call(lb_client_data *lb_client) { - return lb_client->lb_call; + grpc_byte_buffer_destroy(glb_policy->request_payload); + gpr_free(glb_policy->lb_call_status_details); } /* * Auxiliary functions and LB client callbacks. */ -static void query_for_backends(grpc_exec_ctx *exec_ctx, - glb_lb_policy *glb_policy) { +static void query_for_backends_locked(grpc_exec_ctx *exec_ctx, + glb_lb_policy *glb_policy) { GPR_ASSERT(glb_policy->lb_channel != NULL); + GRPC_LB_POLICY_WEAK_REF(&glb_policy->base, "query_for_backends_locked"); + lb_client_init(glb_policy); + + if (grpc_lb_glb_trace) { + gpr_log(GPR_INFO, "Query for backends (grpclb: %p, lb_call: %p)", + (void *)glb_policy, (void *)glb_policy->lb_call); + } + GPR_ASSERT(glb_policy->lb_call != NULL); - glb_policy->lb_client = lb_client_data_create(glb_policy); grpc_call_error call_error; - grpc_op ops[1]; + grpc_op ops[4]; memset(ops, 0, sizeof(ops)); + grpc_op *op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; op->flags = 0; op->reserved = NULL; op++; - call_error = grpc_call_start_batch_and_execute( - exec_ctx, glb_policy->lb_client->lb_call, ops, (size_t)(op - ops), - &glb_policy->lb_client->md_sent); - GPR_ASSERT(GRPC_CALL_OK == call_error); - op = ops; - op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; - op->data.recv_status_on_client.trailing_metadata = - &glb_policy->lb_client->trailing_metadata_recv; - op->data.recv_status_on_client.status = &glb_policy->lb_client->status; - op->data.recv_status_on_client.status_details = - &glb_policy->lb_client->status_details; - op->data.recv_status_on_client.status_details_capacity = - &glb_policy->lb_client->status_details_capacity; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata = &glb_policy->initial_metadata_recv; op->flags = 0; op->reserved = NULL; op++; - call_error = grpc_call_start_batch_and_execute( - exec_ctx, glb_policy->lb_client->lb_call, ops, (size_t)(op - ops), - &glb_policy->lb_client->srv_status_rcvd); - GPR_ASSERT(GRPC_CALL_OK == call_error); -} - -static void md_sent_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { - lb_client_data *lb_client = arg; - GPR_ASSERT(lb_client->lb_call); - grpc_op ops[1]; - memset(ops, 0, sizeof(ops)); - grpc_op *op = ops; + GPR_ASSERT(glb_policy->request_payload != NULL); op->op = GRPC_OP_SEND_MESSAGE; - op->data.send_message = lb_client->request_payload; + op->data.send_message = glb_policy->request_payload; op->flags = 0; op->reserved = NULL; op++; - grpc_call_error call_error = grpc_call_start_batch_and_execute( - exec_ctx, lb_client->lb_call, ops, (size_t)(op - ops), - &lb_client->req_sent); - GPR_ASSERT(GRPC_CALL_OK == call_error); -} -static void req_sent_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { - lb_client_data *lb_client = arg; - GPR_ASSERT(lb_client->lb_call); - - grpc_op ops[2]; - memset(ops, 0, sizeof(ops)); - grpc_op *op = ops; - - op->op = GRPC_OP_RECV_INITIAL_METADATA; - op->data.recv_initial_metadata = &lb_client->initial_metadata_recv; + op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; + op->data.recv_status_on_client.trailing_metadata = + &glb_policy->trailing_metadata_recv; + op->data.recv_status_on_client.status = &glb_policy->lb_call_status; + op->data.recv_status_on_client.status_details = + &glb_policy->lb_call_status_details; + op->data.recv_status_on_client.status_details_capacity = + &glb_policy->lb_call_status_details_capacity; op->flags = 0; op->reserved = NULL; op++; + call_error = grpc_call_start_batch_and_execute(exec_ctx, glb_policy->lb_call, + ops, (size_t)(op - ops), + &glb_policy->srv_status_rcvd); + GPR_ASSERT(GRPC_CALL_OK == call_error); + op = ops; op->op = GRPC_OP_RECV_MESSAGE; - op->data.recv_message = &lb_client->response_payload; + op->data.recv_message = &glb_policy->response_payload; op->flags = 0; op->reserved = NULL; op++; - grpc_call_error call_error = grpc_call_start_batch_and_execute( - exec_ctx, lb_client->lb_call, ops, (size_t)(op - ops), - &lb_client->res_rcvd); + call_error = grpc_call_start_batch_and_execute(exec_ctx, glb_policy->lb_call, + ops, (size_t)(op - ops), + &glb_policy->res_rcvd); GPR_ASSERT(GRPC_CALL_OK == call_error); } static void res_recv_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { - lb_client_data *lb_client = arg; + glb_lb_policy *glb_policy = arg; + grpc_op ops[2]; memset(ops, 0, sizeof(ops)); grpc_op *op = ops; - if (lb_client->response_payload != NULL) { + if (glb_policy->response_payload != NULL) { + gpr_backoff_reset(&glb_policy->lb_call_backoff_state); /* Received data from the LB server. Look inside - * lb_client->response_payload, for a serverlist. */ + * glb_policy->response_payload, for a serverlist. */ grpc_byte_buffer_reader bbr; - grpc_byte_buffer_reader_init(&bbr, lb_client->response_payload); + grpc_byte_buffer_reader_init(&bbr, glb_policy->response_payload); gpr_slice response_slice = grpc_byte_buffer_reader_readall(&bbr); - grpc_byte_buffer_destroy(lb_client->response_payload); + grpc_byte_buffer_destroy(glb_policy->response_payload); grpc_grpclb_serverlist *serverlist = grpc_grpclb_response_parse_serverlist(response_slice); if (serverlist != NULL) { + GPR_ASSERT(glb_policy->lb_call != NULL); gpr_slice_unref(response_slice); if (grpc_lb_glb_trace) { gpr_log(GPR_INFO, "Serverlist with %lu servers received", (unsigned long)serverlist->num_servers); + /* TODO(dgq): this needs to work with ipv6. */ + for (size_t i = 0; i < serverlist->num_servers; ++i) { + grpc_resolved_address addr; + struct sockaddr_in *sa = (struct sockaddr_in *)&addr.addr; + addr.len = sizeof(struct sockaddr_in); + sa->sin_family = AF_INET; + sa->sin_port = htons((uint16_t)serverlist->servers[i]->port); + memcpy(&sa->sin_addr, serverlist->servers[i]->ip_address.bytes, + serverlist->servers[i]->ip_address.size); + char *ipport; + grpc_sockaddr_to_string(&ipport, &addr, false); + gpr_log(GPR_INFO, "Serverlist[%lu]: %s", (unsigned long)i, ipport); + gpr_free(ipport); + } } /* update serverlist */ if (serverlist->num_servers > 0) { - gpr_mu_lock(&lb_client->glb_policy->mu); - if (grpc_grpclb_serverlist_equals(lb_client->glb_policy->serverlist, - serverlist)) { + gpr_mu_lock(&glb_policy->mu); + if (grpc_grpclb_serverlist_equals(glb_policy->serverlist, serverlist)) { if (grpc_lb_glb_trace) { gpr_log(GPR_INFO, "Incoming server list identical to current, ignoring."); } } else { /* new serverlist */ - if (lb_client->glb_policy->serverlist != NULL) { + if (glb_policy->serverlist != NULL) { /* dispose of the old serverlist */ - grpc_grpclb_destroy_serverlist(lb_client->glb_policy->serverlist); + grpc_grpclb_destroy_serverlist(glb_policy->serverlist); } /* and update the copy in the glb_lb_policy instance */ - lb_client->glb_policy->serverlist = serverlist; - } - if (lb_client->glb_policy->rr_policy == NULL) { - /* initial "handover", in this case from a null RR policy, meaning - * it'll just create the first RR policy instance */ - rr_handover_locked(exec_ctx, lb_client->glb_policy, error); - } else { - /* unref the RR policy, eventually leading to its substitution with a - * new one constructed from the received serverlist (see - * glb_rr_connectivity_changed) */ - GRPC_LB_POLICY_UNREF(exec_ctx, lb_client->glb_policy->rr_policy, - "serverlist_received"); + glb_policy->serverlist = serverlist; + + rr_handover_locked(exec_ctx, glb_policy, error); } - gpr_mu_unlock(&lb_client->glb_policy->mu); + gpr_mu_unlock(&glb_policy->mu); } else { if (grpc_lb_glb_trace) { gpr_log(GPR_INFO, @@ -1170,13 +1135,13 @@ static void res_recv_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { /* keep listening for serverlist updates */ op->op = GRPC_OP_RECV_MESSAGE; - op->data.recv_message = &lb_client->response_payload; + op->data.recv_message = &glb_policy->response_payload; op->flags = 0; op->reserved = NULL; op++; const grpc_call_error call_error = grpc_call_start_batch_and_execute( - exec_ctx, lb_client->lb_call, ops, (size_t)(op - ops), - &lb_client->res_rcvd); /* loop */ + exec_ctx, glb_policy->lb_call, ops, (size_t)(op - ops), + &glb_policy->res_rcvd); /* loop */ GPR_ASSERT(GRPC_CALL_OK == call_error); return; } @@ -1185,42 +1150,105 @@ static void res_recv_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { gpr_log(GPR_ERROR, "Invalid LB response received: '%s'", gpr_dump_slice(response_slice, GPR_DUMP_ASCII)); gpr_slice_unref(response_slice); - - /* Disconnect from server returning invalid response. */ - op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; - op->flags = 0; - op->reserved = NULL; - op++; - grpc_call_error call_error = grpc_call_start_batch_and_execute( - exec_ctx, lb_client->lb_call, ops, (size_t)(op - ops), - &lb_client->close_sent); - GPR_ASSERT(GRPC_CALL_OK == call_error); + grpc_call_cancel(glb_policy->lb_call, NULL); + /* srv_status_rcvd_cb will pick up the cancellation and clean up */ } - /* empty payload: call cancelled by server. Cleanups happening in - * srv_status_rcvd_cb */ + /* else, empty payload: call cancelled by server. */ + grpc_metadata_array_destroy(&glb_policy->initial_metadata_recv); } -static void close_sent_cb(grpc_exec_ctx *exec_ctx, void *arg, - grpc_error *error) { - if (grpc_lb_glb_trace) { - gpr_log(GPR_INFO, - "Close from LB client sent. Waiting from server status now"); +static void lb_call_on_retry_timer(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { + glb_lb_policy *glb_policy = arg; + gpr_mu_lock(&glb_policy->mu); + + if (!glb_policy->shutting_down) { + if (grpc_lb_glb_trace) { + gpr_log(GPR_INFO, "Restaring call to LB server (grpclb %p)", + (void *)glb_policy); + } + GPR_ASSERT(glb_policy->lb_call == NULL); + query_for_backends_locked(exec_ctx, glb_policy); } + gpr_mu_unlock(&glb_policy->mu); + + GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base, + "grpclb_on_retry_timer"); } static void srv_status_rcvd_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { - lb_client_data *lb_client = arg; + glb_lb_policy *glb_policy = arg; + gpr_mu_lock(&glb_policy->mu); + + GPR_ASSERT(glb_policy->lb_call != NULL); + if (grpc_lb_glb_trace) { - gpr_log(GPR_INFO, - "status from lb server received. Status = %d, Details = '%s', " - "Capacity " - "= %lu", - lb_client->status, lb_client->status_details, - (unsigned long)lb_client->status_details_capacity); + gpr_log(GPR_DEBUG, + "Status from LB server received. Status = %d, Details = '%s', " + "(call: %p)", + glb_policy->lb_call_status, glb_policy->lb_call_status_details, + (void *)glb_policy->lb_call); + } + + if (glb_policy->lb_call_status == GRPC_STATUS_UNIMPLEMENTED) { + char *failing_server = grpc_call_get_peer(glb_policy->lb_call); + char *error_desc; + gpr_asprintf(&error_desc, "Invalid LB server '%s'", failing_server); + gpr_free(failing_server); + /* flush pending ops */ + pending_pick *pp; + while ((pp = glb_policy->pending_picks)) { + glb_policy->pending_picks = pp->next; + if (grpc_lb_glb_trace) { + gpr_log(GPR_INFO, "Cancelling pending pick: %s", error_desc); + } + grpc_exec_ctx_sched(exec_ctx, + &pp->wrapped_on_complete_arg.wrapper_closure, + GRPC_ERROR_CREATE(error_desc), NULL); + } + + pending_ping *pping; + while ((pping = glb_policy->pending_pings)) { + glb_policy->pending_pings = pping->next; + if (grpc_lb_glb_trace) { + gpr_log(GPR_INFO, "Cancelling pending ping: %s", error_desc); + } + grpc_exec_ctx_sched(exec_ctx, &pping->wrapped_notify_arg.wrapper_closure, + GRPC_ERROR_CREATE(error_desc), NULL); + } + gpr_free(error_desc); + } + + const bool was_cancelled = + (glb_policy->lb_call_status == GRPC_STATUS_CANCELLED); + + /* We need to performe cleanups no matter what. */ + lb_client_destroy(glb_policy); + + if (!glb_policy->shutting_down) { + GPR_ASSERT(!was_cancelled); + /* if we aren't shutting down, restart the LB client call after some time */ + gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC); + gpr_timespec next_try = + gpr_backoff_step(&glb_policy->lb_call_backoff_state, now); + if (grpc_lb_glb_trace) { + gpr_log(GPR_DEBUG, "Connection to LB server lost (grpclb: %p)...", + (void *)glb_policy); + gpr_timespec timeout = gpr_time_sub(next_try, now); + if (gpr_time_cmp(timeout, gpr_time_0(timeout.clock_type)) > 0) { + gpr_log(GPR_DEBUG, "... retrying in %" PRId64 ".%09d seconds.", + timeout.tv_sec, timeout.tv_nsec); + } else { + gpr_log(GPR_DEBUG, "... retrying immediately."); + } + } + GRPC_LB_POLICY_WEAK_REF(&glb_policy->base, "grpclb_retry_timer"); + grpc_timer_init(exec_ctx, &glb_policy->lb_call_retry_timer, next_try, + lb_call_on_retry_timer, glb_policy, now); } - /* TODO(dgq): deal with stream termination properly (fire up another one? - * fail the original call?) */ + gpr_mu_unlock(&glb_policy->mu); + GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &glb_policy->base, "srv_status_rcvd_cb"); } /* Code wiring the policy with the rest of the core */ diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c index 37a9b18b97..5f530d54fe 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -120,6 +120,8 @@ typedef struct { grpc_connectivity_state connectivity_state; /** the subchannel's target user data */ void *user_data; + /** vtable to operate over \a user_data */ + grpc_lb_user_data_vtable user_data_vtable; } subchannel_data; struct round_robin_lb_policy { @@ -186,9 +188,13 @@ static void advance_last_picked_locked(round_robin_lb_policy *p) { } if (grpc_lb_round_robin_trace) { - gpr_log(GPR_DEBUG, "[READYLIST] ADVANCED LAST PICK. NOW AT NODE %p (SC %p)", - (void *)p->ready_list_last_pick, - (void *)p->ready_list_last_pick->subchannel); + 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)); } } @@ -255,9 +261,15 @@ static void remove_disconnected_sc_locked(round_robin_lb_policy *p, 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_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, "round_robin"); + GRPC_SUBCHANNEL_UNREF(exec_ctx, sd->subchannel, "round_robin_destroy"); + sd->user_data_vtable.destroy(sd->user_data); gpr_free(sd); } @@ -285,6 +297,9 @@ static void rr_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { size_t i; gpr_mu_lock(&p->mu); + if (grpc_lb_round_robin_trace) { + gpr_log(GPR_DEBUG, "Shutting down Round Robin policy at %p", pol); + } p->shutdown = 1; while ((pp = p->pending_picks)) { @@ -296,7 +311,7 @@ static void rr_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { } grpc_connectivity_state_set( exec_ctx, &p->state_tracker, GRPC_CHANNEL_SHUTDOWN, - GRPC_ERROR_CREATE("Channel Shutdown"), "shutdown"); + GRPC_ERROR_CREATE("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, @@ -395,6 +410,11 @@ static int rr_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, pending_pick *pp; ready_list *selected; gpr_mu_lock(&p->mu); + + if (grpc_lb_round_robin_trace) { + gpr_log(GPR_INFO, "Round Robin %p trying to pick", pol); + } + if ((selected = peek_next_connected_locked(p))) { /* readily available, report right away */ *target = GRPC_CONNECTED_SUBCHANNEL_REF( @@ -435,7 +455,6 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, subchannel_data *sd = arg; round_robin_lb_policy *p = sd->policy; pending_pick *pp; - ready_list *selected; int unref = 0; @@ -456,12 +475,14 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, /* 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. */ - selected = peek_next_connected_locked(p); + ready_list *selected = peek_next_connected_locked(p); + GPR_ASSERT(selected != NULL); 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); } + while ((pp = p->pending_picks)) { p->pending_picks = pp->next; @@ -653,7 +674,9 @@ static grpc_lb_policy *round_robin_create(grpc_exec_ctx *exec_ctx, sd->policy = p; sd->index = subchannel_idx; sd->subchannel = subchannel; - sd->user_data = addresses->addresses[i].user_data; + sd->user_data_vtable = *addresses->user_data_vtable; + 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, sd); diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index 57e1a8ec01..d0ac72a011 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -347,7 +347,7 @@ grpc_channel *grpc_secure_channel_create(grpc_channel_credentials *creds, &exec_ctx, &f->base, target, GRPC_CLIENT_CHANNEL_TYPE_REGULAR, new_args); // Clean up. GRPC_SECURITY_CONNECTOR_UNREF(&f->security_connector->base, - "client_channel_factory_create_channel"); + "secure_client_channel_factory_create_channel"); grpc_channel_args_destroy(new_args); grpc_client_channel_factory_unref(&exec_ctx, &f->base); grpc_exec_ctx_finish(&exec_ctx); diff --git a/src/core/lib/security/transport/security_connector.c b/src/core/lib/security/transport/security_connector.c index 0eca46eb52..ebf72a3abb 100644 --- a/src/core/lib/security/transport/security_connector.c +++ b/src/core/lib/security/transport/security_connector.c @@ -210,11 +210,11 @@ void grpc_security_connector_unref(grpc_security_connector *sc) { } static void connector_pointer_arg_destroy(void *p) { - GRPC_SECURITY_CONNECTOR_UNREF(p, "connector_pointer_arg"); + GRPC_SECURITY_CONNECTOR_UNREF(p, "connector_pointer_arg_destroy"); } static void *connector_pointer_arg_copy(void *p) { - return GRPC_SECURITY_CONNECTOR_REF(p, "connector_pointer_arg"); + return GRPC_SECURITY_CONNECTOR_REF(p, "connector_pointer_arg_copy"); } static int connector_pointer_cmp(void *a, void *b) { return GPR_ICMP(a, b); } -- cgit v1.2.3 From 378856babe572d6e616940eb9cda5bc8fe4c2d29 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 31 Oct 2016 07:47:08 -0700 Subject: Fix memory leak --- src/core/lib/channel/http_server_filter.c | 6 +++++- src/core/lib/transport/metadata.c | 10 ++++++++++ src/core/lib/transport/metadata.h | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c index f2221fb0fb..8340b5cd0f 100644 --- a/src/core/lib/channel/http_server_filter.c +++ b/src/core/lib/channel/http_server_filter.c @@ -314,13 +314,17 @@ static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx, grpc_closure_init(&calld->hs_on_recv, hs_on_recv, elem); grpc_closure_init(&calld->hs_on_complete, hs_on_complete, elem); grpc_closure_init(&calld->hs_recv_message_ready, hs_recv_message_ready, elem); + gpr_slice_buffer_init(&calld->read_slice_buffer); return GRPC_ERROR_NONE; } /* Destructor for call_data */ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, const grpc_call_final_info *final_info, - void *ignored) {} + void *ignored) { + call_data *calld = elem->call_data; + gpr_slice_buffer_destroy(&calld->read_slice_buffer); +} /* Constructor for channel_data */ static void init_channel_elem(grpc_exec_ctx *exec_ctx, diff --git a/src/core/lib/transport/metadata.c b/src/core/lib/transport/metadata.c index 4b40c275ad..f3c5321fe9 100644 --- a/src/core/lib/transport/metadata.c +++ b/src/core/lib/transport/metadata.c @@ -687,6 +687,11 @@ size_t grpc_mdstr_length(const grpc_mdstr *s) { return GRPC_MDSTR_LENGTH(s); } grpc_mdstr *grpc_mdstr_ref(grpc_mdstr *gs DEBUG_ARGS) { internal_string *s = (internal_string *)gs; if (is_mdstr_static(gs)) return gs; +#ifdef GRPC_METADATA_REFCOUNT_DEBUG + gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "STR REF:%p:%zu->%zu: '%s'", + (void *)s, gpr_atm_no_barrier_load(&s->refcnt), + gpr_atm_no_barrier_load(&s->refcnt) + 1, grpc_mdstr_as_c_string(gs)); +#endif GPR_ASSERT(gpr_atm_full_fetch_add(&s->refcnt, 1) > 0); return gs; } @@ -694,6 +699,11 @@ grpc_mdstr *grpc_mdstr_ref(grpc_mdstr *gs DEBUG_ARGS) { void grpc_mdstr_unref(grpc_mdstr *gs DEBUG_ARGS) { internal_string *s = (internal_string *)gs; if (is_mdstr_static(gs)) return; +#ifdef GRPC_METADATA_REFCOUNT_DEBUG + gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "STR UNREF:%p:%zu->%zu: '%s'", + (void *)s, gpr_atm_no_barrier_load(&s->refcnt), + gpr_atm_no_barrier_load(&s->refcnt) - 1, grpc_mdstr_as_c_string(gs)); +#endif if (1 == gpr_atm_full_fetch_add(&s->refcnt, -1)) { strtab_shard *shard = &g_strtab_shard[SHARD_IDX(s->hash, LOG2_STRTAB_SHARD_COUNT)]; diff --git a/src/core/lib/transport/metadata.h b/src/core/lib/transport/metadata.h index 71eff0acf2..36b277cac4 100644 --- a/src/core/lib/transport/metadata.h +++ b/src/core/lib/transport/metadata.h @@ -124,7 +124,7 @@ void grpc_mdelem_set_user_data(grpc_mdelem *md, void (*destroy_func)(void *), void *user_data); /* Reference counting */ -//#define GRPC_METADATA_REFCOUNT_DEBUG +#define GRPC_METADATA_REFCOUNT_DEBUG #ifdef GRPC_METADATA_REFCOUNT_DEBUG #define GRPC_MDSTR_REF(s) grpc_mdstr_ref((s), __FILE__, __LINE__) #define GRPC_MDSTR_UNREF(s) grpc_mdstr_unref((s), __FILE__, __LINE__) -- cgit v1.2.3 From 99c4136900ca02172406852a91adbfc9f3e50374 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 31 Oct 2016 07:52:53 -0700 Subject: Revert errant change --- src/core/lib/transport/metadata.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/lib') diff --git a/src/core/lib/transport/metadata.h b/src/core/lib/transport/metadata.h index 36b277cac4..71eff0acf2 100644 --- a/src/core/lib/transport/metadata.h +++ b/src/core/lib/transport/metadata.h @@ -124,7 +124,7 @@ void grpc_mdelem_set_user_data(grpc_mdelem *md, void (*destroy_func)(void *), void *user_data); /* Reference counting */ -#define GRPC_METADATA_REFCOUNT_DEBUG +//#define GRPC_METADATA_REFCOUNT_DEBUG #ifdef GRPC_METADATA_REFCOUNT_DEBUG #define GRPC_MDSTR_REF(s) grpc_mdstr_ref((s), __FILE__, __LINE__) #define GRPC_MDSTR_UNREF(s) grpc_mdstr_unref((s), __FILE__, __LINE__) -- cgit v1.2.3 From 69259d425111696dd2df5a243e8b714db3dc3dac Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 31 Oct 2016 14:34:10 -0700 Subject: Add resource quota support to uv TCP code --- src/core/lib/iomgr/endpoint_pair_uv.c | 5 +- src/core/lib/iomgr/resource_quota.c | 7 ++ src/core/lib/iomgr/resource_quota.h | 5 ++ src/core/lib/iomgr/tcp_client_uv.c | 36 +++++++-- src/core/lib/iomgr/tcp_server_uv.c | 24 +++++- src/core/lib/iomgr/tcp_uv.c | 133 ++++++++++++++++++++++------------ src/core/lib/iomgr/tcp_uv.h | 4 +- 7 files changed, 154 insertions(+), 60 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/endpoint_pair_uv.c b/src/core/lib/iomgr/endpoint_pair_uv.c index 7941e20388..ff24894c6d 100644 --- a/src/core/lib/iomgr/endpoint_pair_uv.c +++ b/src/core/lib/iomgr/endpoint_pair_uv.c @@ -41,8 +41,9 @@ #include "src/core/lib/iomgr/endpoint_pair.h" -grpc_endpoint_pair grpc_iomgr_create_endpoint_pair(const char *name, - size_t read_slice_size) { +grpc_endpoint_pair grpc_iomgr_create_endpoint_pair( + const char *name, grpc_resource_quota *resource_quota, + size_t read_slice_size) { grpc_endpoint_pair endpoint_pair; // TODO(mlumish): implement this properly under libuv GPR_ASSERT(false && diff --git a/src/core/lib/iomgr/resource_quota.c b/src/core/lib/iomgr/resource_quota.c index bfc905845d..40c847a1b3 100644 --- a/src/core/lib/iomgr/resource_quota.c +++ b/src/core/lib/iomgr/resource_quota.c @@ -712,3 +712,10 @@ void grpc_resource_user_alloc_slices( grpc_resource_user_alloc(exec_ctx, slice_allocator->resource_user, count * length, &slice_allocator->on_allocated); } + +gpr_slice grpc_resource_user_slice_malloc(grpc_exec_ctx *exec_ctx, + grpc_resource_user *resource_user, + size_t size) { + grpc_resource_user_alloc(exec_ctx, resource_user, size, NULL); + return ru_slice_create(resource_user, size); +} diff --git a/src/core/lib/iomgr/resource_quota.h b/src/core/lib/iomgr/resource_quota.h index 6dfac55f88..da68f21a2c 100644 --- a/src/core/lib/iomgr/resource_quota.h +++ b/src/core/lib/iomgr/resource_quota.h @@ -221,4 +221,9 @@ void grpc_resource_user_alloc_slices( grpc_resource_user_slice_allocator *slice_allocator, size_t length, size_t count, gpr_slice_buffer *dest); +/* Allocate one slice of length \a size synchronously. */ +gpr_slice grpc_resource_user_slice_malloc(grpc_exec_ctx *exec_ctx, + grpc_resource_user *resource_user, + size_t size); + #endif /* GRPC_CORE_LIB_IOMGR_RESOURCE_QUOTA_H */ diff --git a/src/core/lib/iomgr/tcp_client_uv.c b/src/core/lib/iomgr/tcp_client_uv.c index 6274667042..b07f9ceffa 100644 --- a/src/core/lib/iomgr/tcp_client_uv.c +++ b/src/core/lib/iomgr/tcp_client_uv.c @@ -54,9 +54,12 @@ typedef struct grpc_uv_tcp_connect { grpc_endpoint **endpoint; int refs; char *addr_name; + grpc_resource_quota *resource_quota; } grpc_uv_tcp_connect; -static void uv_tcp_connect_cleanup(grpc_uv_tcp_connect *connect) { +static void uv_tcp_connect_cleanup(grpc_exec_ctx *exec_ctx, + grpc_uv_tcp_connect *connect) { + grpc_resource_quota_internal_unref(exec_ctx, connect->resource_quota); gpr_free(connect); } @@ -74,7 +77,7 @@ static void uv_tc_on_alarm(grpc_exec_ctx *exec_ctx, void *acp, } done = (--connect->refs == 0); if (done) { - uv_tcp_connect_cleanup(connect); + uv_tcp_connect_cleanup(exec_ctx, connect); } } @@ -86,8 +89,8 @@ static void uv_tc_on_connect(uv_connect_t *req, int status) { grpc_closure *closure = connect->closure; grpc_timer_cancel(&exec_ctx, &connect->alarm); if (status == 0) { - *connect->endpoint = - grpc_tcp_create(connect->tcp_handle, connect->addr_name); + *connect->endpoint = grpc_tcp_create( + connect->tcp_handle, connect->resource_quota, connect->addr_name); } else { error = GRPC_ERROR_CREATE("Failed to connect to remote host"); error = grpc_error_set_int(error, GRPC_ERROR_INT_ERRNO, -status); @@ -105,7 +108,7 @@ static void uv_tc_on_connect(uv_connect_t *req, int status) { } done = (--connect->refs == 0); if (done) { - uv_tcp_connect_cleanup(connect); + uv_tcp_connect_cleanup(&exec_ctx, connect); } grpc_exec_ctx_sched(&exec_ctx, closure, error, NULL); grpc_exec_ctx_finish(&exec_ctx); @@ -114,16 +117,31 @@ static void uv_tc_on_connect(uv_connect_t *req, int status) { static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, grpc_pollset_set *interested_parties, + const grpc_channel_args *channel_args, const grpc_resolved_address *resolved_addr, gpr_timespec deadline) { grpc_uv_tcp_connect *connect; + grpc_resource_quota *resource_quota = grpc_resource_quota_create(NULL); + (void)channel_args; (void)interested_parties; + + if (channel_args != NULL) { + for (size_t i = 0; i < channel_args->num_args; i++) { + if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_RESOURCE_QUOTA)) { + grpc_resource_quota_internal_unref(exec_ctx, resource_quota); + resource_quota = grpc_resource_quota_internal_ref( + channel_args->args[i].value.pointer.p); + } + } + } + connect = gpr_malloc(sizeof(grpc_uv_tcp_connect)); memset(connect, 0, sizeof(grpc_uv_tcp_connect)); connect->closure = closure; connect->endpoint = ep; connect->tcp_handle = gpr_malloc(sizeof(uv_tcp_t)); connect->addr_name = grpc_sockaddr_to_uri(resolved_addr); + connect->resource_quota = resource_quota; uv_tcp_init(uv_default_loop(), connect->tcp_handle); connect->connect_req.data = connect; // TODO(murgatroid99): figure out what the return value here means @@ -138,16 +156,18 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, // overridden by api_fuzzer.c void (*grpc_tcp_client_connect_impl)( grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, - grpc_pollset_set *interested_parties, const grpc_resolved_address *addr, + grpc_pollset_set *interested_parties, const grpc_channel_args *channel_args, + const grpc_resolved_address *addr, gpr_timespec deadline) = tcp_client_connect_impl; void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, grpc_pollset_set *interested_parties, + const grpc_channel_args *channel_args, const grpc_resolved_address *addr, gpr_timespec deadline) { - grpc_tcp_client_connect_impl(exec_ctx, closure, ep, interested_parties, addr, - deadline); + grpc_tcp_client_connect_impl(exec_ctx, closure, ep, interested_parties, + channel_args, addr, deadline); } #endif /* GRPC_UV */ diff --git a/src/core/lib/iomgr/tcp_server_uv.c b/src/core/lib/iomgr/tcp_server_uv.c index 73e4db3d65..b5b9b92a20 100644 --- a/src/core/lib/iomgr/tcp_server_uv.c +++ b/src/core/lib/iomgr/tcp_server_uv.c @@ -76,13 +76,30 @@ struct grpc_tcp_server { /* shutdown callback */ grpc_closure *shutdown_complete; + + grpc_resource_quota *resource_quota; }; -grpc_error *grpc_tcp_server_create(grpc_closure *shutdown_complete, +grpc_error *grpc_tcp_server_create(grpc_exec_ctx *exec_ctx, + grpc_closure *shutdown_complete, const grpc_channel_args *args, grpc_tcp_server **server) { grpc_tcp_server *s = gpr_malloc(sizeof(grpc_tcp_server)); - (void)args; + s->resource_quota = grpc_resource_quota_create(NULL); + for (size_t i = 0; i < (args == NULL ? 0 : args->num_args); i++) { + if (0 == strcmp(GRPC_ARG_RESOURCE_QUOTA, args->args[i].key)) { + if (args->args[i].type == GRPC_ARG_POINTER) { + grpc_resource_quota_internal_unref(exec_ctx, s->resource_quota); + s->resource_quota = + grpc_resource_quota_internal_ref(args->args[i].value.pointer.p); + } else { + grpc_resource_quota_internal_unref(exec_ctx, s->resource_quota); + gpr_free(s); + return GRPC_ERROR_CREATE(GRPC_ARG_RESOURCE_QUOTA + " must be a pointer to a buffer pool"); + } + } + } gpr_ref_init(&s->refs, 1); s->on_accept_cb = NULL; s->on_accept_cb_arg = NULL; @@ -119,6 +136,7 @@ static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { gpr_free(sp->handle); gpr_free(sp); } + grpc_resource_quota_internal_unref(exec_ctx, s->resource_quota); gpr_free(s); } @@ -201,7 +219,7 @@ static void on_connect(uv_stream_t *server, int status) { } else { gpr_log(GPR_INFO, "uv_tcp_getpeername error: %s", uv_strerror(status)); } - ep = grpc_tcp_create(client, peer_name_string); + ep = grpc_tcp_create(client, sp->server->resource_quota, peer_name_string); sp->server->on_accept_cb(&exec_ctx, sp->server->on_accept_cb_arg, ep, NULL, &acceptor); grpc_exec_ctx_finish(&exec_ctx); diff --git a/src/core/lib/iomgr/tcp_uv.c b/src/core/lib/iomgr/tcp_uv.c index 3860fe3e9b..b90e0c8008 100644 --- a/src/core/lib/iomgr/tcp_uv.c +++ b/src/core/lib/iomgr/tcp_uv.c @@ -1,35 +1,35 @@ /* - * - * Copyright 2016, 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. - * - */ +* +* Copyright 2016, 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. +* +*/ #include "src/core/lib/iomgr/port.h" @@ -54,6 +54,9 @@ typedef struct { grpc_endpoint base; gpr_refcount refcount; + uv_write_t write_req; + uv_shutdown_t shutdown_req; + uv_tcp_t *handle; grpc_closure *read_cb; @@ -64,14 +67,23 @@ typedef struct { gpr_slice_buffer *write_slices; uv_buf_t *write_buffers; + grpc_resource_user resource_user; + bool shutting_down; + bool resource_user_shutting_down; + char *peer_string; grpc_pollset *pollset; } grpc_tcp; static void uv_close_callback(uv_handle_t *handle) { gpr_free(handle); } -static void tcp_free(grpc_tcp *tcp) { gpr_free(tcp); } +static void tcp_free(grpc_tcp *tcp) { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_resource_user_destroy(&exec_ctx, &tcp->resource_user); + gpr_free(tcp); + grpc_exec_ctx_finish(&exec_ctx); +} /*#define GRPC_TCP_REFCOUNT_DEBUG*/ #ifdef GRPC_TCP_REFCOUNT_DEBUG @@ -106,11 +118,14 @@ static void tcp_ref(grpc_tcp *tcp) { gpr_ref(&tcp->refcount); } static void alloc_uv_buf(uv_handle_t *handle, size_t suggested_size, uv_buf_t *buf) { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_tcp *tcp = handle->data; (void)suggested_size; - tcp->read_slice = gpr_slice_malloc(GRPC_TCP_DEFAULT_READ_SLICE_SIZE); + tcp->read_slice = grpc_resource_user_slice_malloc( + &exec_ctx, &tcp->resource_user, GRPC_TCP_DEFAULT_READ_SLICE_SIZE); buf->base = (char *)GPR_SLICE_START_PTR(tcp->read_slice); buf->len = GPR_SLICE_LENGTH(tcp->read_slice); + grpc_exec_ctx_finish(&exec_ctx); } static void read_callback(uv_stream_t *stream, ssize_t nread, @@ -198,7 +213,8 @@ static void write_callback(uv_write_t *req, int status) { gpr_log(GPR_DEBUG, "write complete on %p: error=%s", tcp, str); } gpr_free(tcp->write_buffers); - gpr_free(req); + grpc_resource_user_free(&exec_ctx, &tcp->resource_user, + sizeof(uv_buf_t) * tcp->write_slices->count); grpc_exec_ctx_sched(&exec_ctx, cb, error, NULL); grpc_exec_ctx_finish(&exec_ctx); } @@ -243,12 +259,15 @@ static void uv_endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, tcp->write_cb = cb; buffer_count = (unsigned int)tcp->write_slices->count; buffers = gpr_malloc(sizeof(uv_buf_t) * buffer_count); + grpc_resource_user_alloc(exec_ctx, &tcp->resource_user, + sizeof(uv_buf_t) * buffer_count, NULL); for (i = 0; i < buffer_count; i++) { slice = &tcp->write_slices->slices[i]; buffers[i].base = (char *)GPR_SLICE_START_PTR(*slice); buffers[i].len = GPR_SLICE_LENGTH(*slice); } - write_req = gpr_malloc(sizeof(uv_write_t)); + tcp->write_buffers = buffers; + write_req = &tcp->write_req; write_req->data = tcp; TCP_REF(tcp, "write"); // TODO(murgatroid99): figure out what the return value here means @@ -274,13 +293,29 @@ static void uv_add_to_pollset_set(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, (void)pollset; } -static void shutdown_callback(uv_shutdown_t *req, int status) { gpr_free(req); } +static void shutdown_callback(uv_shutdown_t *req, int status) {} + +static void resource_user_shutdown_done(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { + TCP_UNREF(arg, "resource_user"); +} + +static void uv_resource_user_maybe_shutdown(grpc_exec_ctx *exec_ctx, + grpc_tcp *tcp) { + if (!tcp->resource_user_shutting_down) { + tcp->resource_user_shutting_down = true; + TCP_REF(tcp, "resource_user"); + grpc_resource_user_shutdown( + exec_ctx, &tcp->resource_user, + grpc_closure_create(resource_user_shutdown_done, tcp)); + } +} static void uv_endpoint_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_tcp *tcp = (grpc_tcp *)ep; if (!tcp->shutting_down) { tcp->shutting_down = true; - uv_shutdown_t *req = gpr_malloc(sizeof(uv_shutdown_t)); + uv_shutdown_t *req = &tcp->shutdown_req; uv_shutdown(req, (uv_stream_t *)tcp->handle, shutdown_callback); } } @@ -289,6 +324,7 @@ static void uv_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_network_status_unregister_endpoint(ep); grpc_tcp *tcp = (grpc_tcp *)ep; uv_close((uv_handle_t *)tcp->handle, uv_close_callback); + uv_resource_user_maybe_shutdown(exec_ctx, tcp); TCP_UNREF(tcp, "destroy"); } @@ -297,18 +333,21 @@ static char *uv_get_peer(grpc_endpoint *ep) { return gpr_strdup(tcp->peer_string); } +static grpc_resource_user *uv_get_resource_user(grpc_endpoint *ep) { + grpc_tcp *tcp = (grpc_tcp *)ep; + return &tcp->resource_user; +} + static grpc_workqueue *uv_get_workqueue(grpc_endpoint *ep) { return NULL; } -static grpc_endpoint_vtable vtable = {uv_endpoint_read, - uv_endpoint_write, - uv_get_workqueue, - uv_add_to_pollset, - uv_add_to_pollset_set, - uv_endpoint_shutdown, - uv_destroy, - uv_get_peer}; +static grpc_endpoint_vtable vtable = { + uv_endpoint_read, uv_endpoint_write, uv_get_workqueue, + uv_add_to_pollset, uv_add_to_pollset_set, uv_endpoint_shutdown, + uv_destroy, uv_get_resource_user, uv_get_peer}; -grpc_endpoint *grpc_tcp_create(uv_tcp_t *handle, char *peer_string) { +grpc_endpoint *grpc_tcp_create(uv_tcp_t *handle, + grpc_resource_quota *resource_quota, + char *peer_string) { grpc_tcp *tcp = (grpc_tcp *)gpr_malloc(sizeof(grpc_tcp)); if (grpc_tcp_trace) { @@ -325,6 +364,8 @@ grpc_endpoint *grpc_tcp_create(uv_tcp_t *handle, char *peer_string) { gpr_ref_init(&tcp->refcount, 1); tcp->peer_string = gpr_strdup(peer_string); tcp->shutting_down = false; + tcp->resource_user_shutting_down = false; + grpc_resource_user_init(&tcp->resource_user, resource_quota, peer_string); /* Tell network status tracking code about the new endpoint */ grpc_network_status_register_endpoint(&tcp->base); diff --git a/src/core/lib/iomgr/tcp_uv.h b/src/core/lib/iomgr/tcp_uv.h index eed41151ea..970fcafe4a 100644 --- a/src/core/lib/iomgr/tcp_uv.h +++ b/src/core/lib/iomgr/tcp_uv.h @@ -52,6 +52,8 @@ extern int grpc_tcp_trace; #define GRPC_TCP_DEFAULT_READ_SLICE_SIZE 8192 -grpc_endpoint *grpc_tcp_create(uv_tcp_t *handle, char *peer_string); +grpc_endpoint *grpc_tcp_create(uv_tcp_t *handle, + grpc_resource_quota *resource_quota, + char *peer_string); #endif /* GRPC_CORE_LIB_IOMGR_TCP_UV_H */ -- cgit v1.2.3 From da050b643e302db24d840f02c475655c01182333 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 1 Nov 2016 17:17:28 -0700 Subject: Fixed weird whitespace change --- src/core/lib/iomgr/tcp_uv.c | 62 ++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 31 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/tcp_uv.c b/src/core/lib/iomgr/tcp_uv.c index b90e0c8008..8e74c9e863 100644 --- a/src/core/lib/iomgr/tcp_uv.c +++ b/src/core/lib/iomgr/tcp_uv.c @@ -1,35 +1,35 @@ /* -* -* Copyright 2016, 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. -* -*/ + * + * Copyright 2016, 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. + * + */ #include "src/core/lib/iomgr/port.h" -- cgit v1.2.3 From 4253c1e9ecffb218a4c79b08c497c57a0ad3e998 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Thu, 3 Nov 2016 15:20:45 -0700 Subject: Say what we mean --- src/core/lib/iomgr/network_status_tracker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/network_status_tracker.c b/src/core/lib/iomgr/network_status_tracker.c index b4bb7e3cf7..a5ca9ed2c3 100644 --- a/src/core/lib/iomgr/network_status_tracker.c +++ b/src/core/lib/iomgr/network_status_tracker.c @@ -46,7 +46,7 @@ static gpr_mu g_endpoint_mutex; void grpc_network_status_shutdown(void) { if (head != NULL) { gpr_log(GPR_ERROR, - "Memory leaked as all network endpoints were not shut down"); + "Memory leaked as not all network endpoints were shut down"); } gpr_mu_destroy(&g_endpoint_mutex); } -- cgit v1.2.3 From 31c5ee230369b758978c5e4e87911d759a7f9184 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 4 Nov 2016 08:05:59 -0700 Subject: Remove errant init --- src/core/lib/channel/http_server_filter.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/core/lib') diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c index 8340b5cd0f..04670ff233 100644 --- a/src/core/lib/channel/http_server_filter.c +++ b/src/core/lib/channel/http_server_filter.c @@ -162,7 +162,6 @@ static grpc_mdelem *server_filter(void *user_data, grpc_mdelem *md) { /* Retrieve the payload from the value of the 'grpc-internal-payload-bin' header field */ calld->seen_payload_bin = 1; - gpr_slice_buffer_init(&calld->read_slice_buffer); gpr_slice_buffer_add(&calld->read_slice_buffer, gpr_slice_ref(md->value->slice)); grpc_slice_buffer_stream_init(&calld->read_stream, -- cgit v1.2.3 From f79ce7d2016ecdd8e7b063de4a8fa9914e7148e6 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 4 Nov 2016 08:43:36 -0700 Subject: Code review changes. --- include/grpc/grpc.h | 7 +++++-- src/core/ext/client_channel/client_channel.c | 13 ++++++++----- src/core/lib/channel/channel_stack.c | 2 +- src/core/lib/channel/channel_stack.h | 4 ++-- src/core/lib/channel/connected_channel.c | 2 +- src/core/lib/surface/channel.c | 2 +- src/core/lib/surface/lame_client.c | 2 +- test/core/client_channel/lb_policies_test.c | 5 +++++ 8 files changed, 24 insertions(+), 13 deletions(-) (limited to 'src/core/lib') diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index 9dfcca9766..a228683d41 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -237,9 +237,12 @@ GRPCAPI struct census_context *grpc_census_call_get_context(grpc_call *call); created for. */ GRPCAPI char *grpc_channel_get_target(grpc_channel *channel); -/** Request info about the channel. */ +/** Request info about the channel. + \a channel_info indicates what information is being requested and + how that information will be returned. + \a channel_info is owned by the caller. */ GRPCAPI void grpc_channel_get_info(grpc_channel *channel, - grpc_channel_info *channel_info); + const grpc_channel_info *channel_info); /** Create a client channel to 'target'. Additional channel level configuration MAY be provided by grpc_channel_args, though the expectation is that most diff --git a/src/core/ext/client_channel/client_channel.c b/src/core/ext/client_channel/client_channel.c index 3b89f938c2..1bed965ed1 100644 --- a/src/core/ext/client_channel/client_channel.c +++ b/src/core/ext/client_channel/client_channel.c @@ -243,7 +243,7 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, grpc_channel_args_find(lb_policy_args.args, GRPC_ARG_LB_POLICY_NAME); if (channel_arg != NULL) { GPR_ASSERT(channel_arg->type == GRPC_ARG_STRING); - lb_policy_name = gpr_strdup(channel_arg->value.string); + lb_policy_name = channel_arg->value.string; } // Special case: If all of the addresses are balancer addresses, // assume that we should use the grpclb policy, regardless of what the @@ -267,14 +267,13 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, "addresses, no backend addresses -- forcing use of grpclb LB " "policy", lb_policy_name); - gpr_free(lb_policy_name); } - lb_policy_name = gpr_strdup("grpclb"); + lb_policy_name = "grpclb"; } } // Use pick_first if nothing was specified and we didn't select grpclb // above. - if (lb_policy_name == NULL) lb_policy_name = gpr_strdup("pick_first"); + if (lb_policy_name == NULL) lb_policy_name = "pick_first"; lb_policy = grpc_lb_policy_create(exec_ctx, lb_policy_name, &lb_policy_args); @@ -292,6 +291,10 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg, (grpc_method_config_table *)channel_arg->value.pointer.p, method_config_convert_value, &method_parameters_vtable); } + // Before we clean up, save a copy of lb_policy_name, since it might + // be pointing to data inside chand->resolver_result. + // The copy will be saved in chand->lb_policy_name below. + lb_policy_name = gpr_strdup(lb_policy_name); grpc_channel_args_destroy(chand->resolver_result); chand->resolver_result = NULL; } @@ -435,7 +438,7 @@ static void cc_start_transport_op(grpc_exec_ctx *exec_ctx, static void cc_get_channel_info(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, - grpc_channel_info *info) { + const grpc_channel_info *info) { channel_data *chand = elem->channel_data; gpr_mu_lock(&chand->mu); if (info->lb_policy_name != NULL) { diff --git a/src/core/lib/channel/channel_stack.c b/src/core/lib/channel/channel_stack.c index 3370f0ef45..c6c90d8c16 100644 --- a/src/core/lib/channel/channel_stack.c +++ b/src/core/lib/channel/channel_stack.c @@ -257,7 +257,7 @@ char *grpc_call_next_get_peer(grpc_exec_ctx *exec_ctx, void grpc_channel_next_get_info(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, - grpc_channel_info *channel_info) { + const grpc_channel_info *channel_info) { grpc_channel_element *next_elem = elem + 1; return next_elem->filter->get_channel_info(exec_ctx, next_elem, channel_info); } diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h index 6fbcd87064..9b9ded0aee 100644 --- a/src/core/lib/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -158,7 +158,7 @@ typedef struct { /* Implement grpc_channel_get_info() */ void (*get_channel_info)(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, - grpc_channel_info *channel_info); + const grpc_channel_info *channel_info); /* The name of this filter */ const char *name; @@ -280,7 +280,7 @@ char *grpc_call_next_get_peer(grpc_exec_ctx *exec_ctx, grpc_call_element *elem); /* Pass through a request to get_channel_info() to the next child element */ void grpc_channel_next_get_info(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, - grpc_channel_info *channel_info); + const grpc_channel_info *channel_info); /* Given the top element of a channel stack, get the channel stack itself */ grpc_channel_stack *grpc_channel_stack_from_top_element( diff --git a/src/core/lib/channel/connected_channel.c b/src/core/lib/channel/connected_channel.c index 6ae2b3b6b7..bb6986438e 100644 --- a/src/core/lib/channel/connected_channel.c +++ b/src/core/lib/channel/connected_channel.c @@ -137,7 +137,7 @@ static char *con_get_peer(grpc_exec_ctx *exec_ctx, grpc_call_element *elem) { /* No-op. */ static void con_get_channel_info(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, - grpc_channel_info *channel_info) {} + const grpc_channel_info *channel_info) {} static const grpc_channel_filter connected_channel_filter = { con_start_transport_stream_op, diff --git a/src/core/lib/surface/channel.c b/src/core/lib/surface/channel.c index 22bf85b126..1389df6886 100644 --- a/src/core/lib/surface/channel.c +++ b/src/core/lib/surface/channel.c @@ -176,7 +176,7 @@ char *grpc_channel_get_target(grpc_channel *channel) { } void grpc_channel_get_info(grpc_channel *channel, - grpc_channel_info *channel_info) { + const grpc_channel_info *channel_info) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_channel_element *elem = grpc_channel_stack_element(CHANNEL_STACK_FROM_CHANNEL(channel), 0); diff --git a/src/core/lib/surface/lame_client.c b/src/core/lib/surface/lame_client.c index 6fd1dd921c..d0df8e7e17 100644 --- a/src/core/lib/surface/lame_client.c +++ b/src/core/lib/surface/lame_client.c @@ -90,7 +90,7 @@ static char *lame_get_peer(grpc_exec_ctx *exec_ctx, grpc_call_element *elem) { static void lame_get_channel_info(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, - grpc_channel_info *channel_info) {} + const grpc_channel_info *channel_info) {} static void lame_start_transport_op(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, diff --git a/test/core/client_channel/lb_policies_test.c b/test/core/client_channel/lb_policies_test.c index 857ba6bd52..7c639cbeb9 100644 --- a/test/core/client_channel/lb_policies_test.c +++ b/test/core/client_channel/lb_policies_test.c @@ -643,6 +643,7 @@ static void test_get_channel_info() { "test:127.0.0.1:1234?lb_policy=round_robin", NULL, NULL); // Ensures that resolver returns. grpc_channel_check_connectivity_state(channel, true /* try_to_connect */); + // Use grpc_channel_get_info() to get LB policy name. char *lb_policy_name = NULL; grpc_channel_info channel_info; channel_info.lb_policy_name = &lb_policy_name; @@ -650,6 +651,10 @@ static void test_get_channel_info() { GPR_ASSERT(lb_policy_name != NULL); GPR_ASSERT(strcmp(lb_policy_name, "round_robin") == 0); gpr_free(lb_policy_name); + // Try again without requesting anything. This is a no-op. + channel_info.lb_policy_name = NULL; + grpc_channel_get_info(channel, &channel_info); + // Clean up. grpc_channel_destroy(channel); } -- cgit v1.2.3 From 78afd778009a2af0fcc6c05b5739e5bc457c9d6f Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 4 Nov 2016 12:49:49 -0700 Subject: clang-format --- src/core/ext/client_channel/client_channel.c | 5 +++-- src/core/lib/security/transport/client_auth_filter.c | 17 +++++------------ 2 files changed, 8 insertions(+), 14 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/ext/client_channel/client_channel.c b/src/core/ext/client_channel/client_channel.c index 1bed965ed1..1cce3bc329 100644 --- a/src/core/ext/client_channel/client_channel.c +++ b/src/core/ext/client_channel/client_channel.c @@ -124,7 +124,7 @@ typedef struct client_channel_channel_data { /** mutex protecting all variables below in this data structure */ gpr_mu mu; /** currently active load balancer */ - char* lb_policy_name; + char *lb_policy_name; grpc_lb_policy *lb_policy; /** maps method names to method_parameters structs */ grpc_mdstr_hash_table *method_params_table; @@ -443,7 +443,8 @@ static void cc_get_channel_info(grpc_exec_ctx *exec_ctx, gpr_mu_lock(&chand->mu); if (info->lb_policy_name != NULL) { *info->lb_policy_name = chand->lb_policy_name == NULL - ? NULL : gpr_strdup(chand->lb_policy_name); + ? NULL + : gpr_strdup(chand->lb_policy_name); } gpr_mu_unlock(&chand->mu); } diff --git a/src/core/lib/security/transport/client_auth_filter.c b/src/core/lib/security/transport/client_auth_filter.c index 3a96af2c69..d075ed037b 100644 --- a/src/core/lib/security/transport/client_auth_filter.c +++ b/src/core/lib/security/transport/client_auth_filter.c @@ -341,15 +341,8 @@ static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, GRPC_AUTH_CONTEXT_UNREF(chand->auth_context, "client_auth_filter"); } -const grpc_channel_filter grpc_client_auth_filter = {auth_start_transport_op, - grpc_channel_next_op, - sizeof(call_data), - init_call_elem, - set_pollset_or_pollset_set, - destroy_call_elem, - sizeof(channel_data), - init_channel_elem, - destroy_channel_elem, - grpc_call_next_get_peer, - grpc_channel_next_get_info, - "client-auth"}; +const grpc_channel_filter grpc_client_auth_filter = { + auth_start_transport_op, grpc_channel_next_op, sizeof(call_data), + init_call_elem, set_pollset_or_pollset_set, destroy_call_elem, + sizeof(channel_data), init_channel_elem, destroy_channel_elem, + grpc_call_next_get_peer, grpc_channel_next_get_info, "client-auth"}; -- cgit v1.2.3 From 57b7760facc595d0bfe073b8765d5e0520433d8f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 4 Nov 2016 13:48:49 -0700 Subject: Fix spelling --- src/core/lib/transport/pid_controller.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/lib') diff --git a/src/core/lib/transport/pid_controller.h b/src/core/lib/transport/pid_controller.h index ecb9deedaa..059b5b0834 100644 --- a/src/core/lib/transport/pid_controller.h +++ b/src/core/lib/transport/pid_controller.h @@ -35,7 +35,7 @@ #define GRPC_CORE_LIB_TRANSPORT_PID_CONTROLLER_H /* \file Simple PID controller. - Implements a proportial-integral-derivative controller. + Implements a proportional-integral-derivative controller. Used when we want to iteratively control a variable to converge some other observed value to a 'set-point'. Gains can be set to adjust sensitivity to current error (p), the integral -- cgit v1.2.3 From a947f1c32ed756dcd4f0460130ad8450e216e0aa Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 4 Nov 2016 13:53:17 -0700 Subject: Make resource_quota a real object --- src/core/lib/iomgr/resource_quota.c | 197 ++++++++++++++++++-------- src/core/lib/iomgr/resource_quota.h | 88 +----------- src/core/lib/iomgr/tcp_posix.c | 37 ++--- test/core/iomgr/resource_quota_test.c | 253 ++++++++++++++-------------------- test/core/util/mock_endpoint.c | 33 +---- test/core/util/passthru_endpoint.c | 18 +-- 6 files changed, 266 insertions(+), 360 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/resource_quota.c b/src/core/lib/iomgr/resource_quota.c index 8a06443d58..1770d72268 100644 --- a/src/core/lib/iomgr/resource_quota.c +++ b/src/core/lib/iomgr/resource_quota.c @@ -44,6 +44,81 @@ int grpc_resource_quota_trace = 0; +/* Internal linked list pointers for a resource user */ +typedef struct { + grpc_resource_user *next; + grpc_resource_user *prev; +} grpc_resource_user_link; + +/* Resource users are kept in (potentially) several intrusive linked lists + at once. These are the list names. */ +typedef enum { + /* Resource users that are waiting for an allocation */ + GRPC_RULIST_AWAITING_ALLOCATION, + /* Resource users that have free memory available for internal reclamation */ + GRPC_RULIST_NON_EMPTY_FREE_POOL, + /* Resource users that have published a benign reclamation is available */ + GRPC_RULIST_RECLAIMER_BENIGN, + /* Resource users that have published a destructive reclamation is + available */ + GRPC_RULIST_RECLAIMER_DESTRUCTIVE, + /* Number of lists: must be last */ + GRPC_RULIST_COUNT +} grpc_rulist; + +struct grpc_resource_user { + /* The quota this resource user consumes from */ + grpc_resource_quota *resource_quota; + + /* Closure to schedule an allocation under the resource quota combiner lock */ + grpc_closure allocate_closure; + /* Closure to publish a non empty free pool under the resource quota combiner + lock */ + grpc_closure add_to_free_pool_closure; + + /* one ref for each ref call (released by grpc_resource_user_unref), and one + ref for each byte allocated (released by grpc_resource_user_free) */ + gpr_atm refs; + /* is this resource user unlocked? starts at 0, increases for each shutdown + call */ + gpr_atm shutdown; + + gpr_mu mu; + /* The amount of memory (in bytes) this user has cached for its own use: to + avoid quota contention, each resource user can keep some memory in + addition to what it is immediately using (e.g., for caching), and the quota + can pull it back under memory pressure. + This value can become negative if more memory has been requested than + existed in the free pool, at which point the quota is consulted to bring + this value non-negative (asynchronously). */ + int64_t free_pool; + /* A list of closures to call once free_pool becomes non-negative - ie when + all outstanding allocations have been granted. */ + grpc_closure_list on_allocated; + /* True if we are currently trying to allocate from the quota, false if not */ + bool allocating; + /* True if we are currently trying to add ourselves to the non-free quota + list, false otherwise */ + bool added_to_free_pool; + + /* Reclaimers: index 0 is the benign reclaimer, 1 is the destructive reclaimer + */ + grpc_closure *reclaimers[2]; + /* Trampoline closures to finish reclamation and re-enter the quota combiner + lock */ + grpc_closure post_reclaimer_closure[2]; + + /* Closure to execute under the quota combiner to de-register and shutdown the + resource user */ + grpc_closure destroy_closure; + + /* Links in the various grpc_rulist lists */ + grpc_resource_user_link links[GRPC_RULIST_COUNT]; + + /* The name of this resource user, for debugging/tracing */ + char *name; +}; + struct grpc_resource_quota { /* refcount */ gpr_refcount refs; @@ -373,9 +448,19 @@ static void ru_post_destructive_reclaimer(grpc_exec_ctx *exec_ctx, void *ru, rulist_add_tail(resource_user, GRPC_RULIST_RECLAIMER_DESTRUCTIVE); } +static void ru_shutdown(grpc_exec_ctx *exec_ctx, void *ru, grpc_error *error) { + grpc_resource_user *resource_user = ru; + grpc_exec_ctx_sched(exec_ctx, resource_user->reclaimers[0], + GRPC_ERROR_CANCELLED, NULL); + grpc_exec_ctx_sched(exec_ctx, resource_user->reclaimers[1], + GRPC_ERROR_CANCELLED, NULL); + resource_user->reclaimers[0] = NULL; + resource_user->reclaimers[1] = NULL; +} + static void ru_destroy(grpc_exec_ctx *exec_ctx, void *ru, grpc_error *error) { grpc_resource_user *resource_user = ru; - GPR_ASSERT(resource_user->allocated == 0); + GPR_ASSERT(gpr_atm_no_barrier_load(&resource_user->refs) == 0); for (int i = 0; i < GRPC_RULIST_COUNT; i++) { rulist_remove(resource_user, (grpc_rulist)i); } @@ -383,13 +468,14 @@ static void ru_destroy(grpc_exec_ctx *exec_ctx, void *ru, grpc_error *error) { GRPC_ERROR_CANCELLED, NULL); grpc_exec_ctx_sched(exec_ctx, resource_user->reclaimers[1], GRPC_ERROR_CANCELLED, NULL); - grpc_exec_ctx_sched(exec_ctx, (grpc_closure *)gpr_atm_no_barrier_load( - &resource_user->on_done_destroy_closure), - GRPC_ERROR_NONE, NULL); if (resource_user->free_pool != 0) { resource_user->resource_quota->free_pool += resource_user->free_pool; rq_step_sched(exec_ctx, resource_user->resource_quota); } + grpc_resource_quota_internal_unref(exec_ctx, resource_user->resource_quota); + gpr_mu_destroy(&resource_user->mu); + gpr_free(resource_user->name); + gpr_free(resource_user); } static void ru_allocated_slices(grpc_exec_ctx *exec_ctx, void *arg, @@ -539,9 +625,9 @@ const grpc_arg_pointer_vtable *grpc_resource_quota_arg_vtable(void) { * grpc_resource_user api */ -void grpc_resource_user_init(grpc_resource_user *resource_user, - grpc_resource_quota *resource_quota, - const char *name) { +grpc_resource_user *grpc_resource_user_create( + grpc_resource_quota *resource_quota, const char *name) { + grpc_resource_user *resource_user = gpr_malloc(sizeof(*resource_user)); resource_user->resource_quota = grpc_resource_quota_internal_ref(resource_quota); grpc_closure_init(&resource_user->allocate_closure, &ru_allocate, @@ -555,12 +641,12 @@ void grpc_resource_user_init(grpc_resource_user *resource_user, grpc_closure_init(&resource_user->destroy_closure, &ru_destroy, resource_user); gpr_mu_init(&resource_user->mu); - resource_user->allocated = 0; + gpr_atm_rel_store(&resource_user->refs, 1); + gpr_atm_rel_store(&resource_user->shutdown, 0); resource_user->free_pool = 0; grpc_closure_list_init(&resource_user->on_allocated); resource_user->allocating = false; resource_user->added_to_free_pool = false; - gpr_atm_no_barrier_store(&resource_user->on_done_destroy_closure, 0); resource_user->reclaimers[0] = NULL; resource_user->reclaimers[1] = NULL; for (int i = 0; i < GRPC_RULIST_COUNT; i++) { @@ -572,56 +658,54 @@ void grpc_resource_user_init(grpc_resource_user *resource_user, gpr_asprintf(&resource_user->name, "anonymous_resource_user_%" PRIxPTR, (intptr_t)resource_user); } + return resource_user; } -void grpc_resource_user_shutdown(grpc_exec_ctx *exec_ctx, - grpc_resource_user *resource_user, - grpc_closure *on_done) { - gpr_mu_lock(&resource_user->mu); - GPR_ASSERT(gpr_atm_no_barrier_load(&resource_user->on_done_destroy_closure) == - 0); - gpr_atm_no_barrier_store(&resource_user->on_done_destroy_closure, - (gpr_atm)on_done); - if (resource_user->allocated == 0) { +static void ru_ref_by(grpc_resource_user *resource_user, gpr_atm amount) { + GPR_ASSERT(amount > 0); + GPR_ASSERT(gpr_atm_no_barrier_fetch_add(&resource_user->refs, amount) != 0); +} + +static void ru_unref_by(grpc_exec_ctx *exec_ctx, + grpc_resource_user *resource_user, gpr_atm amount) { + GPR_ASSERT(amount > 0); + gpr_atm old = gpr_atm_full_fetch_add(&resource_user->refs, -amount); + GPR_ASSERT(old >= amount); + if (old == amount) { grpc_combiner_execute(exec_ctx, resource_user->resource_quota->combiner, &resource_user->destroy_closure, GRPC_ERROR_NONE, false); } - gpr_mu_unlock(&resource_user->mu); } -void grpc_resource_user_destroy(grpc_exec_ctx *exec_ctx, - grpc_resource_user *resource_user) { - grpc_resource_quota_internal_unref(exec_ctx, resource_user->resource_quota); - gpr_mu_destroy(&resource_user->mu); - gpr_free(resource_user->name); +void grpc_resource_user_ref(grpc_resource_user *resource_user) { + ru_ref_by(resource_user, 1); +} + +void grpc_resource_user_unref(grpc_exec_ctx *exec_ctx, + grpc_resource_user *resource_user) { + ru_unref_by(exec_ctx, resource_user, 1); +} + +void grpc_resource_user_shutdown(grpc_exec_ctx *exec_ctx, + grpc_resource_user *resource_user) { + if (gpr_atm_full_fetch_add(&resource_user->shutdown, 1) == 0) { + grpc_combiner_execute(exec_ctx, resource_user->resource_quota->combiner, + grpc_closure_create(ru_shutdown, resource_user), + GRPC_ERROR_NONE, false); + } } void grpc_resource_user_alloc(grpc_exec_ctx *exec_ctx, grpc_resource_user *resource_user, size_t size, grpc_closure *optional_on_done) { gpr_mu_lock(&resource_user->mu); - grpc_closure *on_done_destroy = (grpc_closure *)gpr_atm_no_barrier_load( - &resource_user->on_done_destroy_closure); - if (on_done_destroy != NULL) { - /* already shutdown */ - if (grpc_resource_quota_trace) { - gpr_log(GPR_DEBUG, "RQ %s %s: alloc %" PRIdPTR " after shutdown", - resource_user->resource_quota->name, resource_user->name, size); - } - grpc_exec_ctx_sched( - exec_ctx, optional_on_done, - GRPC_ERROR_CREATE("Buffer pool user is already shutdown"), NULL); - gpr_mu_unlock(&resource_user->mu); - return; - } - resource_user->allocated += (int64_t)size; + ru_ref_by(resource_user, (gpr_atm)size); resource_user->free_pool -= (int64_t)size; if (grpc_resource_quota_trace) { - gpr_log(GPR_DEBUG, "RQ %s %s: alloc %" PRIdPTR "; allocated -> %" PRId64 - ", free_pool -> %" PRId64, + gpr_log(GPR_DEBUG, "RQ %s %s: alloc %" PRIdPTR "; free_pool -> %" PRId64, resource_user->resource_quota->name, resource_user->name, size, - resource_user->allocated, resource_user->free_pool); + resource_user->free_pool); } if (resource_user->free_pool < 0) { grpc_closure_list_append(&resource_user->on_allocated, optional_on_done, @@ -641,15 +725,12 @@ void grpc_resource_user_alloc(grpc_exec_ctx *exec_ctx, void grpc_resource_user_free(grpc_exec_ctx *exec_ctx, grpc_resource_user *resource_user, size_t size) { gpr_mu_lock(&resource_user->mu); - GPR_ASSERT(resource_user->allocated >= (int64_t)size); bool was_zero_or_negative = resource_user->free_pool <= 0; resource_user->free_pool += (int64_t)size; - resource_user->allocated -= (int64_t)size; if (grpc_resource_quota_trace) { - gpr_log(GPR_DEBUG, "RQ %s %s: free %" PRIdPTR "; allocated -> %" PRId64 - ", free_pool -> %" PRId64, + gpr_log(GPR_DEBUG, "RQ %s %s: free %" PRIdPTR "; free_pool -> %" PRId64, resource_user->resource_quota->name, resource_user->name, size, - resource_user->allocated, resource_user->free_pool); + resource_user->free_pool); } bool is_bigger_than_zero = resource_user->free_pool > 0; if (is_bigger_than_zero && was_zero_or_negative && @@ -659,29 +740,23 @@ void grpc_resource_user_free(grpc_exec_ctx *exec_ctx, &resource_user->add_to_free_pool_closure, GRPC_ERROR_NONE, false); } - grpc_closure *on_done_destroy = (grpc_closure *)gpr_atm_no_barrier_load( - &resource_user->on_done_destroy_closure); - if (on_done_destroy != NULL && resource_user->allocated == 0) { - grpc_combiner_execute(exec_ctx, resource_user->resource_quota->combiner, - &resource_user->destroy_closure, GRPC_ERROR_NONE, - false); - } gpr_mu_unlock(&resource_user->mu); + ru_unref_by(exec_ctx, resource_user, (gpr_atm)size); } void grpc_resource_user_post_reclaimer(grpc_exec_ctx *exec_ctx, grpc_resource_user *resource_user, bool destructive, grpc_closure *closure) { - if (gpr_atm_acq_load(&resource_user->on_done_destroy_closure) == 0) { - GPR_ASSERT(resource_user->reclaimers[destructive] == NULL); - resource_user->reclaimers[destructive] = closure; - grpc_combiner_execute(exec_ctx, resource_user->resource_quota->combiner, - &resource_user->post_reclaimer_closure[destructive], - GRPC_ERROR_NONE, false); - } else { + GPR_ASSERT(resource_user->reclaimers[destructive] == NULL); + if (gpr_atm_acq_load(&resource_user->shutdown) > 0) { grpc_exec_ctx_sched(exec_ctx, closure, GRPC_ERROR_CANCELLED, NULL); + return; } + resource_user->reclaimers[destructive] = closure; + grpc_combiner_execute(exec_ctx, resource_user->resource_quota->combiner, + &resource_user->post_reclaimer_closure[destructive], + GRPC_ERROR_NONE, false); } void grpc_resource_user_finish_reclamation(grpc_exec_ctx *exec_ctx, diff --git a/src/core/lib/iomgr/resource_quota.h b/src/core/lib/iomgr/resource_quota.h index da68f21a2c..bbe0af1a14 100644 --- a/src/core/lib/iomgr/resource_quota.h +++ b/src/core/lib/iomgr/resource_quota.h @@ -84,91 +84,15 @@ void grpc_resource_quota_internal_unref(grpc_exec_ctx *exec_ctx, grpc_resource_quota *grpc_resource_quota_from_channel_args( const grpc_channel_args *channel_args); -/* Resource users are kept in (potentially) several intrusive linked lists - at once. These are the list names. */ -typedef enum { - /* Resource users that are waiting for an allocation */ - GRPC_RULIST_AWAITING_ALLOCATION, - /* Resource users that have free memory available for internal reclamation */ - GRPC_RULIST_NON_EMPTY_FREE_POOL, - /* Resource users that have published a benign reclamation is available */ - GRPC_RULIST_RECLAIMER_BENIGN, - /* Resource users that have published a destructive reclamation is - available */ - GRPC_RULIST_RECLAIMER_DESTRUCTIVE, - /* Number of lists: must be last */ - GRPC_RULIST_COUNT -} grpc_rulist; - typedef struct grpc_resource_user grpc_resource_user; -/* Internal linked list pointers for a resource user */ -typedef struct { - grpc_resource_user *next; - grpc_resource_user *prev; -} grpc_resource_user_link; - -struct grpc_resource_user { - /* The quota this resource user consumes from */ - grpc_resource_quota *resource_quota; - - /* Closure to schedule an allocation under the resource quota combiner lock */ - grpc_closure allocate_closure; - /* Closure to publish a non empty free pool under the resource quota combiner - lock */ - grpc_closure add_to_free_pool_closure; - - gpr_mu mu; - /* Total allocated memory outstanding by this resource user in bytes; - always positive */ - int64_t allocated; - /* The amount of memory (in bytes) this user has cached for its own use: to - avoid quota contention, each resource user can keep some memory in - addition to what it is immediately using (e.g., for caching), and the quota - can pull it back under memory pressure. - This value can become negative if more memory has been requested than - existed in the free pool, at which point the quota is consulted to bring - this value non-negative (asynchronously). */ - int64_t free_pool; - /* A list of closures to call once free_pool becomes non-negative - ie when - all outstanding allocations have been granted. */ - grpc_closure_list on_allocated; - /* True if we are currently trying to allocate from the quota, false if not */ - bool allocating; - /* True if we are currently trying to add ourselves to the non-free quota - list, false otherwise */ - bool added_to_free_pool; - - /* Reclaimers: index 0 is the benign reclaimer, 1 is the destructive reclaimer - */ - grpc_closure *reclaimers[2]; - /* Trampoline closures to finish reclamation and re-enter the quota combiner - lock */ - grpc_closure post_reclaimer_closure[2]; - - /* Closure to execute under the quota combiner to de-register and shutdown the - resource user */ - grpc_closure destroy_closure; - /* User supplied closure to call once the user has finished shutting down AND - all outstanding allocations have been freed. Real type is grpc_closure*, - but it's stored as an atomic to avoid a mutex on some fast paths. */ - gpr_atm on_done_destroy_closure; - - /* Links in the various grpc_rulist lists */ - grpc_resource_user_link links[GRPC_RULIST_COUNT]; - - /* The name of this resource user, for debugging/tracing */ - char *name; -}; - -void grpc_resource_user_init(grpc_resource_user *resource_user, - grpc_resource_quota *resource_quota, - const char *name); +grpc_resource_user *grpc_resource_user_create( + grpc_resource_quota *resource_quota, const char *name); +void grpc_resource_user_ref(grpc_resource_user *resource_user); +void grpc_resource_user_unref(grpc_exec_ctx *exec_ctx, + grpc_resource_user *resource_user); void grpc_resource_user_shutdown(grpc_exec_ctx *exec_ctx, - grpc_resource_user *resource_user, - grpc_closure *on_done); -void grpc_resource_user_destroy(grpc_exec_ctx *exec_ctx, - grpc_resource_user *resource_user); + grpc_resource_user *resource_user); /* Allocate from the resource user (and its quota). If optional_on_done is NULL, then allocate immediately. This may push the diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 880af93ee1..70416c6eef 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -102,7 +102,7 @@ typedef struct { char *peer_string; - grpc_resource_user resource_user; + grpc_resource_user *resource_user; grpc_resource_user_slice_allocator slice_allocator; } grpc_tcp; @@ -110,28 +110,18 @@ static void tcp_handle_read(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, grpc_error *error); static void tcp_handle_write(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, grpc_error *error); -static void tcp_unref_closure(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, - grpc_error *error); - -static void tcp_maybe_shutdown_resource_user(grpc_exec_ctx *exec_ctx, - grpc_tcp *tcp) { - if (gpr_atm_full_fetch_add(&tcp->shutdown_count, 1) == 0) { - grpc_resource_user_shutdown(exec_ctx, &tcp->resource_user, - grpc_closure_create(tcp_unref_closure, tcp)); - } -} static void tcp_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_tcp *tcp = (grpc_tcp *)ep; - tcp_maybe_shutdown_resource_user(exec_ctx, tcp); grpc_fd_shutdown(exec_ctx, tcp->em_fd); + grpc_resource_user_shutdown(exec_ctx, tcp->resource_user); } static void tcp_free(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { grpc_fd_orphan(exec_ctx, tcp->em_fd, tcp->release_fd_cb, tcp->release_fd, "tcp_unref_orphan"); gpr_slice_buffer_destroy(&tcp->last_read_buffer); - grpc_resource_user_destroy(exec_ctx, &tcp->resource_user); + grpc_resource_user_unref(exec_ctx, tcp->resource_user); gpr_free(tcp->peer_string); gpr_free(tcp); } @@ -168,15 +158,9 @@ static void tcp_unref(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { static void tcp_ref(grpc_tcp *tcp) { gpr_ref(&tcp->refcount); } #endif -static void tcp_unref_closure(grpc_exec_ctx *exec_ctx, void *arg, - grpc_error *error) { - TCP_UNREF(exec_ctx, arg, "resource_user"); -} - static void tcp_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_network_status_unregister_endpoint(ep); grpc_tcp *tcp = (grpc_tcp *)ep; - tcp_maybe_shutdown_resource_user(exec_ctx, tcp); gpr_slice_buffer_reset_and_unref(&tcp->last_read_buffer); TCP_UNREF(exec_ctx, tcp, "destroy"); } @@ -515,7 +499,7 @@ static grpc_workqueue *tcp_get_workqueue(grpc_endpoint *ep) { static grpc_resource_user *tcp_get_resource_user(grpc_endpoint *ep) { grpc_tcp *tcp = (grpc_tcp *)ep; - return &tcp->resource_user; + return tcp->resource_user; } static const grpc_endpoint_vtable vtable = {tcp_read, @@ -543,9 +527,8 @@ grpc_endpoint *grpc_tcp_create(grpc_fd *em_fd, tcp->slice_size = slice_size; tcp->iov_size = 1; tcp->finished_edge = true; - /* paired with unref in grpc_tcp_destroy, and with the shutdown for our - * resource_user */ - gpr_ref_init(&tcp->refcount, 2); + /* paired with unref in grpc_tcp_destroy */ + gpr_ref_init(&tcp->refcount, 1); gpr_atm_no_barrier_store(&tcp->shutdown_count, 0); tcp->em_fd = em_fd; tcp->read_closure.cb = tcp_handle_read; @@ -553,10 +536,9 @@ grpc_endpoint *grpc_tcp_create(grpc_fd *em_fd, tcp->write_closure.cb = tcp_handle_write; tcp->write_closure.cb_arg = tcp; gpr_slice_buffer_init(&tcp->last_read_buffer); - grpc_resource_user_init(&tcp->resource_user, resource_quota, peer_string); - grpc_resource_user_slice_allocator_init(&tcp->slice_allocator, - &tcp->resource_user, - tcp_read_allocation_done, tcp); + tcp->resource_user = grpc_resource_user_create(resource_quota, peer_string); + grpc_resource_user_slice_allocator_init( + &tcp->slice_allocator, tcp->resource_user, tcp_read_allocation_done, tcp); /* Tell network status tracker about new endpoint */ grpc_network_status_register_endpoint(&tcp->base); @@ -576,7 +558,6 @@ void grpc_tcp_destroy_and_release_fd(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, GPR_ASSERT(ep->vtable == &vtable); tcp->release_fd = fd; tcp->release_fd_cb = done; - tcp_maybe_shutdown_resource_user(exec_ctx, tcp); gpr_slice_buffer_reset_and_unref(&tcp->last_read_buffer); TCP_UNREF(exec_ctx, tcp, "destroy"); } diff --git a/test/core/iomgr/resource_quota_test.c b/test/core/iomgr/resource_quota_test.c index 34dee1aee1..22c4e4e989 100644 --- a/test/core/iomgr/resource_quota_test.c +++ b/test/core/iomgr/resource_quota_test.c @@ -81,11 +81,7 @@ grpc_closure *make_unused_reclaimer(grpc_closure *then) { static void destroy_user(grpc_resource_user *usr) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - bool done = false; - grpc_resource_user_shutdown(&exec_ctx, usr, set_bool(&done)); - grpc_exec_ctx_flush(&exec_ctx); - GPR_ASSERT(done); - grpc_resource_user_destroy(&exec_ctx, usr); + grpc_resource_user_unref(&exec_ctx, usr); grpc_exec_ctx_finish(&exec_ctx); } @@ -106,10 +102,9 @@ static void test_resource_user_no_op(void) { gpr_log(GPR_INFO, "** test_resource_user_no_op **"); grpc_resource_quota *q = grpc_resource_quota_create("test_resource_user_no_op"); - grpc_resource_user usr; - grpc_resource_user_init(&usr, q, "usr"); + grpc_resource_user *usr = grpc_resource_user_create(q, "usr"); grpc_resource_quota_unref(q); - destroy_user(&usr); + destroy_user(usr); } static void test_instant_alloc_then_free(void) { @@ -117,20 +112,19 @@ static void test_instant_alloc_then_free(void) { grpc_resource_quota *q = grpc_resource_quota_create("test_instant_alloc_then_free"); grpc_resource_quota_resize(q, 1024 * 1024); - grpc_resource_user usr; - grpc_resource_user_init(&usr, q, "usr"); + grpc_resource_user *usr = grpc_resource_user_create(q, "usr"); { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr, 1024, NULL); + grpc_resource_user_alloc(&exec_ctx, usr, 1024, NULL); grpc_exec_ctx_finish(&exec_ctx); } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_free(&exec_ctx, &usr, 1024); + grpc_resource_user_free(&exec_ctx, usr, 1024); grpc_exec_ctx_finish(&exec_ctx); } grpc_resource_quota_unref(q); - destroy_user(&usr); + destroy_user(usr); } static void test_instant_alloc_free_pair(void) { @@ -138,16 +132,15 @@ static void test_instant_alloc_free_pair(void) { grpc_resource_quota *q = grpc_resource_quota_create("test_instant_alloc_free_pair"); grpc_resource_quota_resize(q, 1024 * 1024); - grpc_resource_user usr; - grpc_resource_user_init(&usr, q, "usr"); + grpc_resource_user *usr = grpc_resource_user_create(q, "usr"); { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr, 1024, NULL); - grpc_resource_user_free(&exec_ctx, &usr, 1024); + grpc_resource_user_alloc(&exec_ctx, usr, 1024, NULL); + grpc_resource_user_free(&exec_ctx, usr, 1024); grpc_exec_ctx_finish(&exec_ctx); } grpc_resource_quota_unref(q); - destroy_user(&usr); + destroy_user(usr); } static void test_simple_async_alloc(void) { @@ -155,22 +148,21 @@ static void test_simple_async_alloc(void) { grpc_resource_quota *q = grpc_resource_quota_create("test_simple_async_alloc"); grpc_resource_quota_resize(q, 1024 * 1024); - grpc_resource_user usr; - grpc_resource_user_init(&usr, q, "usr"); + grpc_resource_user *usr = grpc_resource_user_create(q, "usr"); { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(done); } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_free(&exec_ctx, &usr, 1024); + grpc_resource_user_free(&exec_ctx, usr, 1024); grpc_exec_ctx_finish(&exec_ctx); } grpc_resource_quota_unref(q); - destroy_user(&usr); + destroy_user(usr); } static void test_async_alloc_blocked_by_size(void) { @@ -178,12 +170,11 @@ static void test_async_alloc_blocked_by_size(void) { grpc_resource_quota *q = grpc_resource_quota_create("test_async_alloc_blocked_by_size"); grpc_resource_quota_resize(q, 1); - grpc_resource_user usr; - grpc_resource_user_init(&usr, q, "usr"); + grpc_resource_user *usr = grpc_resource_user_create(q, "usr"); bool done = false; { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(!done); } @@ -191,87 +182,83 @@ static void test_async_alloc_blocked_by_size(void) { GPR_ASSERT(done); { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_free(&exec_ctx, &usr, 1024); + grpc_resource_user_free(&exec_ctx, usr, 1024); grpc_exec_ctx_finish(&exec_ctx); } grpc_resource_quota_unref(q); - destroy_user(&usr); + destroy_user(usr); } static void test_scavenge(void) { gpr_log(GPR_INFO, "** test_scavenge **"); grpc_resource_quota *q = grpc_resource_quota_create("test_scavenge"); grpc_resource_quota_resize(q, 1024); - grpc_resource_user usr1; - grpc_resource_user usr2; - grpc_resource_user_init(&usr1, q, "usr1"); - grpc_resource_user_init(&usr2, q, "usr2"); + grpc_resource_user *usr1 = grpc_resource_user_create(q, "usr1"); + grpc_resource_user *usr2 = grpc_resource_user_create(q, "usr2"); { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr1, 1024, set_bool(&done)); + grpc_resource_user_alloc(&exec_ctx, usr1, 1024, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(done); } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_free(&exec_ctx, &usr1, 1024); + grpc_resource_user_free(&exec_ctx, usr1, 1024); grpc_exec_ctx_finish(&exec_ctx); } { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr2, 1024, set_bool(&done)); + grpc_resource_user_alloc(&exec_ctx, usr2, 1024, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(done); } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_free(&exec_ctx, &usr2, 1024); + grpc_resource_user_free(&exec_ctx, usr2, 1024); grpc_exec_ctx_finish(&exec_ctx); } grpc_resource_quota_unref(q); - destroy_user(&usr1); - destroy_user(&usr2); + destroy_user(usr1); + destroy_user(usr2); } static void test_scavenge_blocked(void) { gpr_log(GPR_INFO, "** test_scavenge_blocked **"); grpc_resource_quota *q = grpc_resource_quota_create("test_scavenge_blocked"); grpc_resource_quota_resize(q, 1024); - grpc_resource_user usr1; - grpc_resource_user usr2; - grpc_resource_user_init(&usr1, q, "usr1"); - grpc_resource_user_init(&usr2, q, "usr2"); + grpc_resource_user *usr1 = grpc_resource_user_create(q, "usr1"); + grpc_resource_user *usr2 = grpc_resource_user_create(q, "usr2"); bool done; { done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr1, 1024, set_bool(&done)); + grpc_resource_user_alloc(&exec_ctx, usr1, 1024, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(done); } { done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr2, 1024, set_bool(&done)); + grpc_resource_user_alloc(&exec_ctx, usr2, 1024, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(!done); } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_free(&exec_ctx, &usr1, 1024); + grpc_resource_user_free(&exec_ctx, usr1, 1024); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(done); } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_free(&exec_ctx, &usr2, 1024); + grpc_resource_user_free(&exec_ctx, usr2, 1024); grpc_exec_ctx_finish(&exec_ctx); } grpc_resource_quota_unref(q); - destroy_user(&usr1); - destroy_user(&usr2); + destroy_user(usr1); + destroy_user(usr2); } static void test_blocked_until_scheduled_reclaim(void) { @@ -279,12 +266,11 @@ static void test_blocked_until_scheduled_reclaim(void) { grpc_resource_quota *q = grpc_resource_quota_create("test_blocked_until_scheduled_reclaim"); grpc_resource_quota_resize(q, 1024); - grpc_resource_user usr; - grpc_resource_user_init(&usr, q, "usr"); + grpc_resource_user *usr = grpc_resource_user_create(q, "usr"); { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(done); } @@ -292,25 +278,25 @@ static void test_blocked_until_scheduled_reclaim(void) { { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_resource_user_post_reclaimer( - &exec_ctx, &usr, false, - make_reclaimer(&usr, 1024, set_bool(&reclaim_done))); + &exec_ctx, usr, false, + make_reclaimer(usr, 1024, set_bool(&reclaim_done))); grpc_exec_ctx_finish(&exec_ctx); } { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(reclaim_done); GPR_ASSERT(done); } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_free(&exec_ctx, &usr, 1024); + grpc_resource_user_free(&exec_ctx, usr, 1024); grpc_exec_ctx_finish(&exec_ctx); } grpc_resource_quota_unref(q); - destroy_user(&usr); + destroy_user(usr); } static void test_blocked_until_scheduled_reclaim_and_scavenge(void) { @@ -318,14 +304,12 @@ static void test_blocked_until_scheduled_reclaim_and_scavenge(void) { grpc_resource_quota *q = grpc_resource_quota_create( "test_blocked_until_scheduled_reclaim_and_scavenge"); grpc_resource_quota_resize(q, 1024); - grpc_resource_user usr1; - grpc_resource_user usr2; - grpc_resource_user_init(&usr1, q, "usr1"); - grpc_resource_user_init(&usr2, q, "usr2"); + grpc_resource_user *usr1 = grpc_resource_user_create(q, "usr1"); + grpc_resource_user *usr2 = grpc_resource_user_create(q, "usr2"); { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr1, 1024, set_bool(&done)); + grpc_resource_user_alloc(&exec_ctx, usr1, 1024, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(done); } @@ -333,26 +317,26 @@ static void test_blocked_until_scheduled_reclaim_and_scavenge(void) { { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_resource_user_post_reclaimer( - &exec_ctx, &usr1, false, - make_reclaimer(&usr1, 1024, set_bool(&reclaim_done))); + &exec_ctx, usr1, false, + make_reclaimer(usr1, 1024, set_bool(&reclaim_done))); grpc_exec_ctx_finish(&exec_ctx); } { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr2, 1024, set_bool(&done)); + grpc_resource_user_alloc(&exec_ctx, usr2, 1024, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(reclaim_done); GPR_ASSERT(done); } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_free(&exec_ctx, &usr2, 1024); + grpc_resource_user_free(&exec_ctx, usr2, 1024); grpc_exec_ctx_finish(&exec_ctx); } grpc_resource_quota_unref(q); - destroy_user(&usr1); - destroy_user(&usr2); + destroy_user(usr1); + destroy_user(usr2); } static void test_blocked_until_scheduled_destructive_reclaim(void) { @@ -360,12 +344,11 @@ static void test_blocked_until_scheduled_destructive_reclaim(void) { grpc_resource_quota *q = grpc_resource_quota_create( "test_blocked_until_scheduled_destructive_reclaim"); grpc_resource_quota_resize(q, 1024); - grpc_resource_user usr; - grpc_resource_user_init(&usr, q, "usr"); + grpc_resource_user *usr = grpc_resource_user_create(q, "usr"); { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(done); } @@ -373,25 +356,25 @@ static void test_blocked_until_scheduled_destructive_reclaim(void) { { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_resource_user_post_reclaimer( - &exec_ctx, &usr, true, - make_reclaimer(&usr, 1024, set_bool(&reclaim_done))); + &exec_ctx, usr, true, + make_reclaimer(usr, 1024, set_bool(&reclaim_done))); grpc_exec_ctx_finish(&exec_ctx); } { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(reclaim_done); GPR_ASSERT(done); } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_free(&exec_ctx, &usr, 1024); + grpc_resource_user_free(&exec_ctx, usr, 1024); grpc_exec_ctx_finish(&exec_ctx); } grpc_resource_quota_unref(q); - destroy_user(&usr); + destroy_user(usr); } static void test_unused_reclaim_is_cancelled(void) { @@ -399,23 +382,22 @@ static void test_unused_reclaim_is_cancelled(void) { grpc_resource_quota *q = grpc_resource_quota_create("test_unused_reclaim_is_cancelled"); grpc_resource_quota_resize(q, 1024); - grpc_resource_user usr; - grpc_resource_user_init(&usr, q, "usr"); + grpc_resource_user *usr = grpc_resource_user_create(q, "usr"); bool benign_done = false; bool destructive_done = false; { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_resource_user_post_reclaimer( - &exec_ctx, &usr, false, make_unused_reclaimer(set_bool(&benign_done))); + &exec_ctx, usr, false, make_unused_reclaimer(set_bool(&benign_done))); grpc_resource_user_post_reclaimer( - &exec_ctx, &usr, true, + &exec_ctx, usr, true, make_unused_reclaimer(set_bool(&destructive_done))); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(!benign_done); GPR_ASSERT(!destructive_done); } grpc_resource_quota_unref(q); - destroy_user(&usr); + destroy_user(usr); GPR_ASSERT(benign_done); GPR_ASSERT(destructive_done); } @@ -425,24 +407,23 @@ static void test_benign_reclaim_is_preferred(void) { grpc_resource_quota *q = grpc_resource_quota_create("test_benign_reclaim_is_preferred"); grpc_resource_quota_resize(q, 1024); - grpc_resource_user usr; - grpc_resource_user_init(&usr, q, "usr"); + grpc_resource_user *usr = grpc_resource_user_create(q, "usr"); bool benign_done = false; bool destructive_done = false; { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(done); } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_resource_user_post_reclaimer( - &exec_ctx, &usr, false, - make_reclaimer(&usr, 1024, set_bool(&benign_done))); + &exec_ctx, usr, false, + make_reclaimer(usr, 1024, set_bool(&benign_done))); grpc_resource_user_post_reclaimer( - &exec_ctx, &usr, true, + &exec_ctx, usr, true, make_unused_reclaimer(set_bool(&destructive_done))); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(!benign_done); @@ -451,7 +432,7 @@ static void test_benign_reclaim_is_preferred(void) { { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(benign_done); GPR_ASSERT(!destructive_done); @@ -459,11 +440,11 @@ static void test_benign_reclaim_is_preferred(void) { } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_free(&exec_ctx, &usr, 1024); + grpc_resource_user_free(&exec_ctx, usr, 1024); grpc_exec_ctx_finish(&exec_ctx); } grpc_resource_quota_unref(q); - destroy_user(&usr); + destroy_user(usr); GPR_ASSERT(benign_done); GPR_ASSERT(destructive_done); } @@ -473,25 +454,24 @@ static void test_multiple_reclaims_can_be_triggered(void) { grpc_resource_quota *q = grpc_resource_quota_create("test_multiple_reclaims_can_be_triggered"); grpc_resource_quota_resize(q, 1024); - grpc_resource_user usr; - grpc_resource_user_init(&usr, q, "usr"); + grpc_resource_user *usr = grpc_resource_user_create(q, "usr"); bool benign_done = false; bool destructive_done = false; { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(done); } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_resource_user_post_reclaimer( - &exec_ctx, &usr, false, - make_reclaimer(&usr, 512, set_bool(&benign_done))); + &exec_ctx, usr, false, + make_reclaimer(usr, 512, set_bool(&benign_done))); grpc_resource_user_post_reclaimer( - &exec_ctx, &usr, true, - make_reclaimer(&usr, 512, set_bool(&destructive_done))); + &exec_ctx, usr, true, + make_reclaimer(usr, 512, set_bool(&destructive_done))); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(!benign_done); GPR_ASSERT(!destructive_done); @@ -499,7 +479,7 @@ static void test_multiple_reclaims_can_be_triggered(void) { { bool done = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&done)); + grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&done)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(benign_done); GPR_ASSERT(destructive_done); @@ -507,11 +487,11 @@ static void test_multiple_reclaims_can_be_triggered(void) { } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_free(&exec_ctx, &usr, 1024); + grpc_resource_user_free(&exec_ctx, usr, 1024); grpc_exec_ctx_finish(&exec_ctx); } grpc_resource_quota_unref(q); - destroy_user(&usr); + destroy_user(usr); GPR_ASSERT(benign_done); GPR_ASSERT(destructive_done); } @@ -522,30 +502,21 @@ static void test_resource_user_stays_allocated_until_memory_released(void) { grpc_resource_quota *q = grpc_resource_quota_create( "test_resource_user_stays_allocated_until_memory_released"); grpc_resource_quota_resize(q, 1024 * 1024); - grpc_resource_user usr; - grpc_resource_user_init(&usr, q, "usr"); - bool done = false; + grpc_resource_user *usr = grpc_resource_user_create(q, "usr"); { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr, 1024, NULL); + grpc_resource_user_alloc(&exec_ctx, usr, 1024, NULL); grpc_exec_ctx_finish(&exec_ctx); } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_resource_quota_unref(q); - grpc_resource_user_shutdown(&exec_ctx, &usr, set_bool(&done)); + grpc_resource_user_unref(&exec_ctx, usr); grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(!done); } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_free(&exec_ctx, &usr, 1024); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(done); - } - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_destroy(&exec_ctx, &usr); + grpc_resource_user_free(&exec_ctx, usr, 1024); grpc_exec_ctx_finish(&exec_ctx); } } @@ -562,14 +533,12 @@ test_resource_user_stays_allocated_and_reclaimers_unrun_until_memory_released( "released"); grpc_resource_quota_resize(q, 1024); for (int i = 0; i < 10; i++) { - grpc_resource_user usr; - grpc_resource_user_init(&usr, q, "usr"); - bool done = false; + grpc_resource_user *usr = grpc_resource_user_create(q, "usr"); bool reclaimer_cancelled = false; { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_resource_user_post_reclaimer( - &exec_ctx, &usr, false, + &exec_ctx, usr, false, make_unused_reclaimer(set_bool(&reclaimer_cancelled))); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(!reclaimer_cancelled); @@ -577,30 +546,23 @@ test_resource_user_stays_allocated_and_reclaimers_unrun_until_memory_released( { bool allocated = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&allocated)); + grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&allocated)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(allocated); GPR_ASSERT(!reclaimer_cancelled); } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_shutdown(&exec_ctx, &usr, set_bool(&done)); + grpc_resource_user_unref(&exec_ctx, usr); grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(!done); GPR_ASSERT(!reclaimer_cancelled); } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_free(&exec_ctx, &usr, 1024); + grpc_resource_user_free(&exec_ctx, usr, 1024); grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(done); GPR_ASSERT(reclaimer_cancelled); } - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_destroy(&exec_ctx, &usr); - grpc_exec_ctx_finish(&exec_ctx); - } } grpc_resource_quota_unref(q); } @@ -610,12 +572,11 @@ static void test_reclaimers_can_be_posted_repeatedly(void) { grpc_resource_quota *q = grpc_resource_quota_create("test_reclaimers_can_be_posted_repeatedly"); grpc_resource_quota_resize(q, 1024); - grpc_resource_user usr; - grpc_resource_user_init(&usr, q, "usr"); + grpc_resource_user *usr = grpc_resource_user_create(q, "usr"); { bool allocated = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&allocated)); + grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&allocated)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(allocated); } @@ -624,15 +585,15 @@ static void test_reclaimers_can_be_posted_repeatedly(void) { { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_resource_user_post_reclaimer( - &exec_ctx, &usr, false, - make_reclaimer(&usr, 1024, set_bool(&reclaimer_done))); + &exec_ctx, usr, false, + make_reclaimer(usr, 1024, set_bool(&reclaimer_done))); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(!reclaimer_done); } { bool allocated = false; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_alloc(&exec_ctx, &usr, 1024, set_bool(&allocated)); + grpc_resource_user_alloc(&exec_ctx, usr, 1024, set_bool(&allocated)); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(allocated); GPR_ASSERT(reclaimer_done); @@ -640,10 +601,10 @@ static void test_reclaimers_can_be_posted_repeatedly(void) { } { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_free(&exec_ctx, &usr, 1024); + grpc_resource_user_free(&exec_ctx, usr, 1024); grpc_exec_ctx_finish(&exec_ctx); } - destroy_user(&usr); + destroy_user(usr); grpc_resource_quota_unref(q); } @@ -653,13 +614,11 @@ static void test_one_slice(void) { grpc_resource_quota *q = grpc_resource_quota_create("test_one_slice"); grpc_resource_quota_resize(q, 1024); - grpc_resource_user usr; - grpc_resource_user_init(&usr, q, "usr"); + grpc_resource_user *usr = grpc_resource_user_create(q, "usr"); grpc_resource_user_slice_allocator alloc; int num_allocs = 0; - grpc_resource_user_slice_allocator_init(&alloc, &usr, inc_int_cb, - &num_allocs); + grpc_resource_user_slice_allocator_init(&alloc, usr, inc_int_cb, &num_allocs); gpr_slice_buffer buffer; gpr_slice_buffer_init(&buffer); @@ -673,7 +632,7 @@ static void test_one_slice(void) { } gpr_slice_buffer_destroy(&buffer); - destroy_user(&usr); + destroy_user(usr); grpc_resource_quota_unref(q); } @@ -684,13 +643,11 @@ static void test_one_slice_deleted_late(void) { grpc_resource_quota_create("test_one_slice_deleted_late"); grpc_resource_quota_resize(q, 1024); - grpc_resource_user usr; - grpc_resource_user_init(&usr, q, "usr"); + grpc_resource_user *usr = grpc_resource_user_create(q, "usr"); grpc_resource_user_slice_allocator alloc; int num_allocs = 0; - grpc_resource_user_slice_allocator_init(&alloc, &usr, inc_int_cb, - &num_allocs); + grpc_resource_user_slice_allocator_init(&alloc, usr, inc_int_cb, &num_allocs); gpr_slice_buffer buffer; gpr_slice_buffer_init(&buffer); @@ -703,22 +660,14 @@ static void test_one_slice_deleted_late(void) { GPR_ASSERT(num_allocs == start_allocs + 1); } - bool done = false; { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_shutdown(&exec_ctx, &usr, set_bool(&done)); + grpc_resource_user_unref(&exec_ctx, usr); grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(!done); } grpc_resource_quota_unref(q); gpr_slice_buffer_destroy(&buffer); - GPR_ASSERT(done); - { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resource_user_destroy(&exec_ctx, &usr); - grpc_exec_ctx_finish(&exec_ctx); - } } int main(int argc, char **argv) { diff --git a/test/core/util/mock_endpoint.c b/test/core/util/mock_endpoint.c index 2b041a4484..2dac877a65 100644 --- a/test/core/util/mock_endpoint.c +++ b/test/core/util/mock_endpoint.c @@ -41,12 +41,11 @@ typedef struct grpc_mock_endpoint { grpc_endpoint base; gpr_mu mu; - int refs; void (*on_write)(gpr_slice slice); gpr_slice_buffer read_buffer; gpr_slice_buffer *on_read_out; grpc_closure *on_read; - grpc_resource_user resource_user; + grpc_resource_user *resource_user; } grpc_mock_endpoint; static void me_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, @@ -78,24 +77,6 @@ static void me_add_to_pollset(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, static void me_add_to_pollset_set(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, grpc_pollset_set *pollset) {} -static void unref(grpc_exec_ctx *exec_ctx, grpc_mock_endpoint *m) { - gpr_mu_lock(&m->mu); - if (0 == --m->refs) { - gpr_mu_unlock(&m->mu); - gpr_slice_buffer_destroy(&m->read_buffer); - grpc_resource_user_destroy(exec_ctx, &m->resource_user); - gpr_free(m); - } else { - gpr_mu_unlock(&m->mu); - } -} - -static void me_finish_shutdown(grpc_exec_ctx *exec_ctx, void *me, - grpc_error *error) { - grpc_mock_endpoint *m = me; - unref(exec_ctx, m); -} - static void me_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_mock_endpoint *m = (grpc_mock_endpoint *)ep; gpr_mu_lock(&m->mu); @@ -104,14 +85,15 @@ static void me_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { GRPC_ERROR_CREATE("Endpoint Shutdown"), NULL); m->on_read = NULL; } - grpc_resource_user_shutdown(exec_ctx, &m->resource_user, - grpc_closure_create(me_finish_shutdown, m)); gpr_mu_unlock(&m->mu); + grpc_resource_user_shutdown(exec_ctx, m->resource_user); } static void me_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_mock_endpoint *m = (grpc_mock_endpoint *)ep; - unref(exec_ctx, m); + gpr_slice_buffer_destroy(&m->read_buffer); + grpc_resource_user_unref(exec_ctx, m->resource_user); + gpr_free(m); } static char *me_get_peer(grpc_endpoint *ep) { @@ -120,7 +102,7 @@ static char *me_get_peer(grpc_endpoint *ep) { static grpc_resource_user *me_get_resource_user(grpc_endpoint *ep) { grpc_mock_endpoint *m = (grpc_mock_endpoint *)ep; - return &m->resource_user; + return m->resource_user; } static grpc_workqueue *me_get_workqueue(grpc_endpoint *ep) { return NULL; } @@ -141,10 +123,9 @@ grpc_endpoint *grpc_mock_endpoint_create(void (*on_write)(gpr_slice slice), grpc_resource_quota *resource_quota) { grpc_mock_endpoint *m = gpr_malloc(sizeof(*m)); m->base.vtable = &vtable; - m->refs = 2; char *name; gpr_asprintf(&name, "mock_endpoint_%" PRIxPTR, (intptr_t)m); - grpc_resource_user_init(&m->resource_user, resource_quota, name); + m->resource_user = grpc_resource_user_create(resource_quota, name); gpr_free(name); gpr_slice_buffer_init(&m->read_buffer); gpr_mu_init(&m->mu); diff --git a/test/core/util/passthru_endpoint.c b/test/core/util/passthru_endpoint.c index ee6ef7da60..a920a15aa5 100644 --- a/test/core/util/passthru_endpoint.c +++ b/test/core/util/passthru_endpoint.c @@ -46,7 +46,7 @@ typedef struct { gpr_slice_buffer read_buffer; gpr_slice_buffer *on_read_out; grpc_closure *on_read; - grpc_resource_user resource_user; + grpc_resource_user *resource_user; } half; struct passthru_endpoint { @@ -123,10 +123,10 @@ static void me_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { m->on_read = NULL; } gpr_mu_unlock(&m->parent->mu); + grpc_resource_user_shutdown(exec_ctx, m->resource_user); } -static void me_really_destroy(grpc_exec_ctx *exec_ctx, void *ep, - grpc_error *error) { +static void me_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { passthru_endpoint *p = ((half *)ep)->parent; gpr_mu_lock(&p->mu); if (0 == --p->halves) { @@ -134,18 +134,14 @@ static void me_really_destroy(grpc_exec_ctx *exec_ctx, void *ep, gpr_mu_destroy(&p->mu); gpr_slice_buffer_destroy(&p->client.read_buffer); gpr_slice_buffer_destroy(&p->server.read_buffer); + grpc_resource_user_unref(exec_ctx, p->client.resource_user); + grpc_resource_user_unref(exec_ctx, p->server.resource_user); gpr_free(p); } else { gpr_mu_unlock(&p->mu); } } -static void me_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { - half *m = (half *)ep; - grpc_resource_user_shutdown(exec_ctx, &m->resource_user, - grpc_closure_create(me_really_destroy, m)); -} - static char *me_get_peer(grpc_endpoint *ep) { return gpr_strdup("fake:mock_endpoint"); } @@ -154,7 +150,7 @@ static grpc_workqueue *me_get_workqueue(grpc_endpoint *ep) { return NULL; } static grpc_resource_user *me_get_resource_user(grpc_endpoint *ep) { half *m = (half *)ep; - return &m->resource_user; + return m->resource_user; } static const grpc_endpoint_vtable vtable = { @@ -179,7 +175,7 @@ static void half_init(half *m, passthru_endpoint *parent, char *name; gpr_asprintf(&name, "passthru_endpoint_%s_%" PRIxPTR, half_name, (intptr_t)parent); - grpc_resource_user_init(&m->resource_user, resource_quota, name); + m->resource_user = grpc_resource_user_create(resource_quota, name); gpr_free(name); } -- cgit v1.2.3 From c037fc1808a0c85f747a895e2448b17fbacf11ee Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 4 Nov 2016 14:04:54 -0700 Subject: Fix windows for new RU api --- src/core/lib/iomgr/tcp_windows.c | 50 +++++++++++++--------------------------- 1 file changed, 16 insertions(+), 34 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.c index 46f0491d10..5fcdf560df 100644 --- a/src/core/lib/iomgr/tcp_windows.c +++ b/src/core/lib/iomgr/tcp_windows.c @@ -109,46 +109,34 @@ typedef struct grpc_tcp { gpr_slice_buffer *write_slices; gpr_slice_buffer *read_slices; - grpc_resource_user resource_user; + grpc_resource_user *resource_user; /* The IO Completion Port runs from another thread. We need some mechanism to protect ourselves when requesting a shutdown. */ gpr_mu mu; int shutting_down; - gpr_atm resource_user_shutdown_count; - char *peer_string; } grpc_tcp; -static void win_unref_closure(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, - grpc_error *error); - -static void win_maybe_shutdown_resource_user(grpc_exec_ctx *exec_ctx, - grpc_tcp *tcp) { - if (gpr_atm_full_fetch_add(&tcp->resource_user_shutdown_count, 1) == 0) { - grpc_resource_user_shutdown(exec_ctx, &tcp->resource_user, - grpc_closure_create(win_unref_closure, tcp)); - } -} - -static void tcp_free(grpc_tcp *tcp) { +static void tcp_free(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { grpc_winsocket_destroy(tcp->socket); gpr_mu_destroy(&tcp->mu); gpr_free(tcp->peer_string); + grpc_resource_user_unref(exec_ctx, tcp->resource_user); gpr_free(tcp); } /*#define GRPC_TCP_REFCOUNT_DEBUG*/ #ifdef GRPC_TCP_REFCOUNT_DEBUG -#define TCP_UNREF(tcp, reason) tcp_unref((tcp), (reason), __FILE__, __LINE__) +#define TCP_UNREF(exec_ctx, tcp, reason) tcp_unref((exec_ctx), (tcp), (reason), __FILE__, __LINE__) #define TCP_REF(tcp, reason) tcp_ref((tcp), (reason), __FILE__, __LINE__) -static void tcp_unref(grpc_tcp *tcp, const char *reason, const char *file, +static void tcp_unref(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp, const char *reason, const char *file, int line) { gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "TCP unref %p : %s %d -> %d", tcp, reason, tcp->refcount.count, tcp->refcount.count - 1); if (gpr_unref(&tcp->refcount)) { - tcp_free(tcp); + tcp_free(exec_ctx, tcp); } } @@ -159,22 +147,17 @@ static void tcp_ref(grpc_tcp *tcp, const char *reason, const char *file, gpr_ref(&tcp->refcount); } #else -#define TCP_UNREF(tcp, reason) tcp_unref((tcp)) +#define TCP_UNREF(exec_ctx, tcp, reason) tcp_unref((exec_ctx), (tcp)) #define TCP_REF(tcp, reason) tcp_ref((tcp)) -static void tcp_unref(grpc_tcp *tcp) { +static void tcp_unref(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { if (gpr_unref(&tcp->refcount)) { - tcp_free(tcp); + tcp_free(exec_ctx, tcp); } } static void tcp_ref(grpc_tcp *tcp) { gpr_ref(&tcp->refcount); } #endif -static void win_unref_closure(grpc_exec_ctx *exec_ctx, void *arg, - grpc_error *error) { - TCP_UNREF(arg, "resource_user"); -} - /* Asynchronous callback from the IOCP, or the background thread. */ static void on_read(grpc_exec_ctx *exec_ctx, void *tcpp, grpc_error *error) { grpc_tcp *tcp = tcpp; @@ -203,7 +186,7 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *tcpp, grpc_error *error) { } tcp->read_cb = NULL; - TCP_UNREF(tcp, "read"); + TCP_UNREF(exec_ctx, tcp, "read"); grpc_exec_ctx_sched(exec_ctx, cb, error, NULL); } @@ -287,7 +270,7 @@ static void on_write(grpc_exec_ctx *exec_ctx, void *tcpp, grpc_error *error) { } } - TCP_UNREF(tcp, "write"); + TCP_UNREF(exec_ctx, tcp, "write"); grpc_exec_ctx_sched(exec_ctx, cb, error, NULL); } @@ -355,7 +338,7 @@ static void win_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, if (status != 0) { int wsa_error = WSAGetLastError(); if (wsa_error != WSA_IO_PENDING) { - TCP_UNREF(tcp, "write"); + TCP_UNREF(exec_ctx, tcp, "write"); grpc_exec_ctx_sched(exec_ctx, cb, GRPC_WSA_ERROR(wsa_error, "WSASend"), NULL); return; @@ -396,15 +379,14 @@ static void win_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { callback. See the comments in on_read and on_write. */ tcp->shutting_down = 1; grpc_winsocket_shutdown(tcp->socket); - win_maybe_shutdown_resource_user(exec_ctx, tcp); gpr_mu_unlock(&tcp->mu); + grpc_resource_user_shutdown(exec_ctx, tcp->resource_user); } static void win_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_network_status_unregister_endpoint(ep); grpc_tcp *tcp = (grpc_tcp *)ep; - win_maybe_shutdown_resource_user(exec_ctx, tcp); - TCP_UNREF(tcp, "destroy"); + TCP_UNREF(exec_ctx, tcp, "destroy"); } static char *win_get_peer(grpc_endpoint *ep) { @@ -416,7 +398,7 @@ static grpc_workqueue *win_get_workqueue(grpc_endpoint *ep) { return NULL; } static grpc_resource_user *win_get_resource_user(grpc_endpoint *ep) { grpc_tcp *tcp = (grpc_tcp *)ep; - return &tcp->resource_user; + return tcp->resource_user; } static grpc_endpoint_vtable vtable = {win_read, @@ -441,7 +423,7 @@ grpc_endpoint *grpc_tcp_create(grpc_winsocket *socket, grpc_closure_init(&tcp->on_read, on_read, tcp); grpc_closure_init(&tcp->on_write, on_write, tcp); tcp->peer_string = gpr_strdup(peer_string); - grpc_resource_user_init(&tcp->resource_user, resource_quota, peer_string); + tcp->resource_user = grpc_resource_user_create(resource_quota, peer_string); /* Tell network status tracking code about the new endpoint */ grpc_network_status_register_endpoint(&tcp->base); -- cgit v1.2.3 From fe6350d3b0fa66ec114d45fba9f104f2f228ea16 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 4 Nov 2016 14:05:45 -0700 Subject: clang-format code --- src/core/lib/iomgr/tcp_windows.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.c index 5fcdf560df..e7abf2971f 100644 --- a/src/core/lib/iomgr/tcp_windows.c +++ b/src/core/lib/iomgr/tcp_windows.c @@ -129,10 +129,11 @@ static void tcp_free(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { /*#define GRPC_TCP_REFCOUNT_DEBUG*/ #ifdef GRPC_TCP_REFCOUNT_DEBUG -#define TCP_UNREF(exec_ctx, tcp, reason) tcp_unref((exec_ctx), (tcp), (reason), __FILE__, __LINE__) +#define TCP_UNREF(exec_ctx, tcp, reason) \ + tcp_unref((exec_ctx), (tcp), (reason), __FILE__, __LINE__) #define TCP_REF(tcp, reason) tcp_ref((tcp), (reason), __FILE__, __LINE__) -static void tcp_unref(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp, const char *reason, const char *file, - int line) { +static void tcp_unref(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp, + const char *reason, const char *file, int line) { gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "TCP unref %p : %s %d -> %d", tcp, reason, tcp->refcount.count, tcp->refcount.count - 1); if (gpr_unref(&tcp->refcount)) { -- cgit v1.2.3 From c00688da74f3f37c7bb8f9a831940fa58e23f460 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 7 Nov 2016 11:27:35 -0800 Subject: Fix build problem. --- src/core/lib/channel/channel_stack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/lib') diff --git a/src/core/lib/channel/channel_stack.c b/src/core/lib/channel/channel_stack.c index c6c90d8c16..15a272b2c3 100644 --- a/src/core/lib/channel/channel_stack.c +++ b/src/core/lib/channel/channel_stack.c @@ -259,7 +259,7 @@ void grpc_channel_next_get_info(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, const grpc_channel_info *channel_info) { grpc_channel_element *next_elem = elem + 1; - return next_elem->filter->get_channel_info(exec_ctx, next_elem, channel_info); + next_elem->filter->get_channel_info(exec_ctx, next_elem, channel_info); } void grpc_channel_next_op(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, -- cgit v1.2.3 From 944d39d4f5ed34a87e5aac5ad236c120cfa89e84 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 8 Nov 2016 07:31:21 -0800 Subject: Remove errant header --- src/core/lib/support/env.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/core/lib') diff --git a/src/core/lib/support/env.h b/src/core/lib/support/env.h index 1a24216656..6ada5d9390 100644 --- a/src/core/lib/support/env.h +++ b/src/core/lib/support/env.h @@ -36,8 +36,6 @@ #include -#include - #ifdef __cplusplus extern "C" { #endif -- cgit v1.2.3