Fix compile. WIP probably

pull/10833/head
ncteisen 8 years ago
parent 3bc255818b
commit f8061e88ea
  1. 4
      src/core/lib/iomgr/combiner.c
  2. 7
      src/core/lib/iomgr/ev_epollsig_linux.c
  3. 4
      src/core/lib/iomgr/ev_poll_posix.c
  4. 4
      src/core/lib/iomgr/ev_posix.c
  5. 4
      src/core/lib/iomgr/ev_posix.h
  6. 4
      src/core/lib/iomgr/exec_ctx.c
  7. 2
      src/core/lib/iomgr/executor.c
  8. 4
      src/core/lib/iomgr/pollset.h
  9. 4
      src/core/lib/iomgr/pollset_uv.c
  10. 4
      src/core/lib/iomgr/pollset_windows.c
  11. 2
      src/core/lib/iomgr/tcp_windows.c
  12. 11
      src/core/lib/surface/init.c

@ -249,7 +249,7 @@ 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 *cl_err = cl->error_data.error;
#ifdef GRPC_CLOSURE_RICH_DEBUG
#ifndef NDEBUG
cl->scheduled = false;
#endif
cl->cb(exec_ctx, cl->cb_arg, cl_err);
@ -266,7 +266,7 @@ bool grpc_combiner_continue_exec_ctx(grpc_exec_ctx *exec_ctx) {
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;
#ifdef GRPC_CLOSURE_RICH_DEBUG
#ifndef NDEBUG
c->scheduled = false;
#endif
c->cb(exec_ctx, c->cb_arg, error);

@ -49,9 +49,6 @@
#define GRPC_POLLSET_KICK_BROADCAST ((grpc_pollset_worker *)1)
#ifndef NDEBUG
grpc_tracer_flag grpc_trace_fd_refcount = GRPC_TRACER_INITIALIZER(false);
#endif
#define GRPC_POLLING_TRACE(...) \
if (GRPC_TRACER_ON(grpc_polling_trace)) { \
@ -292,7 +289,7 @@ static void pi_unref(grpc_exec_ctx *exec_ctx, polling_island *pi);
#ifndef NDEBUG
static void pi_add_ref_dbg(polling_island *pi, const char *reason,
const char *file, int line) {
if (GRPC_TRACER_ON(grpc_trace_workqueue_refcount)) {
if (GRPC_TRACER_ON(grpc_polling_trace)) {
long old_cnt = gpr_atm_acq_load(&pi->ref_count);
gpr_log(GPR_DEBUG, "Add ref pi: %p, old: %ld -> new:%ld (%s) - (%s, %d)",
(void *)pi, old_cnt, old_cnt + 1, reason, file, line);
@ -302,7 +299,7 @@ static void pi_add_ref_dbg(polling_island *pi, const char *reason,
static void pi_unref_dbg(grpc_exec_ctx *exec_ctx, polling_island *pi,
const char *reason, const char *file, int line) {
if (GRPC_TRACER_ON(grpc_trace_workqueue_refcount)) {
if (GRPC_TRACER_ON(grpc_polling_trace)) {
long old_cnt = gpr_atm_acq_load(&pi->ref_count);
gpr_log(GPR_DEBUG, "Unref pi: %p, old:%ld -> new:%ld (%s) - (%s, %d)",
(void *)pi, old_cnt, (old_cnt - 1), reason, file, line);

@ -45,10 +45,6 @@
#define GRPC_POLLSET_KICK_BROADCAST ((grpc_pollset_worker *)1)
#ifndef NDEBUG
grpc_tracer_flag grpc_trace_fd_refcount = GRPC_TRACER_INITIALIZER(false);
#endif
/*******************************************************************************
* FD declarations
*/

@ -41,6 +41,10 @@
grpc_tracer_flag grpc_polling_trace =
GRPC_TRACER_INITIALIZER(false); /* Disabled by default */
#ifndef NDEBUG
grpc_tracer_flag grpc_trace_fd_refcount = GRPC_TRACER_INITIALIZER(false);
#endif
/** Default poll() function - a pointer so that it can be overridden by some
* tests */
grpc_poll_function_type grpc_poll_function = poll;

@ -29,10 +29,6 @@
extern grpc_tracer_flag grpc_polling_trace; /* Disabled by default */
#ifndef NDEBUG
extern grpc_tracer_flag grpc_trace_fd_refcount;
#endif
typedef struct grpc_fd grpc_fd;
typedef struct grpc_event_engine_vtable {

@ -62,7 +62,7 @@ bool grpc_exec_ctx_flush(grpc_exec_ctx *exec_ctx) {
grpc_closure *next = c->next_data.next;
grpc_error *error = c->error_data.error;
did_something = true;
#ifdef GRPC_CLOSURE_RICH_DEBUG
#ifndef NDEBUG
c->scheduled = false;
#endif
c->cb(exec_ctx, c->cb_arg, error);
@ -85,7 +85,7 @@ void grpc_exec_ctx_finish(grpc_exec_ctx *exec_ctx) {
static void exec_ctx_run(grpc_exec_ctx *exec_ctx, grpc_closure *closure,
grpc_error *error) {
#ifdef GRPC_CLOSURE_RICH_DEBUG
#ifndef NDEBUG
closure->scheduled = false;
if (GRPC_TRACER_ON(grpc_trace_closure)) {
gpr_log(GPR_DEBUG, "running closure %p: created [%s:%d]: %s [%s:%d]",

@ -58,7 +58,7 @@ static size_t run_closures(grpc_exec_ctx *exec_ctx, grpc_closure_list list) {
while (c != NULL) {
grpc_closure *next = c->next_data.next;
grpc_error *error = c->error_data.error;
#ifdef GRPC_CLOSURE_RICH_DEBUG
#ifndef NDEBUG
c->scheduled = false;
#endif
c->cb(exec_ctx, c->cb_arg, error);

@ -25,6 +25,10 @@
#include "src/core/lib/iomgr/exec_ctx.h"
#ifndef NDEBUG
extern grpc_tracer_flag grpc_trace_fd_refcount;
#endif
/* A grpc_pollset is a set of file descriptors that a higher level item is
interested in. For example:
- a server will typically keep a pollset containing all connected channels,

@ -20,6 +20,10 @@
#ifdef GRPC_UV
#ifndef NDEBUG
grpc_tracer_flag grpc_trace_fd_refcount = GRPC_TRACER_INITIALIZER(false);
#endif
#include <uv.h>
#include <string.h>

@ -30,6 +30,10 @@
#define GRPC_POLLSET_KICK_BROADCAST ((grpc_pollset_worker *)1)
#ifndef NDEBUG
grpc_tracer_flag grpc_trace_fd_refcount = GRPC_TRACER_INITIALIZER(false);
#endif
gpr_mu grpc_polling_mu;
static grpc_pollset_worker *g_active_poller;
static grpc_pollset_worker g_global_root_worker;

@ -48,7 +48,7 @@
#define GRPC_FIONBIO FIONBIO
#endif
int grpc_tcp_trace = 0;
grpc_tracer_flag grpc_tcp_trace = GRPC_TRACER_INITIALIZER(false);
static grpc_error *set_non_block(SOCKET sock) {
int status;

@ -47,12 +47,6 @@
#include "src/core/lib/transport/connectivity_state.h"
#include "src/core/lib/transport/transport_impl.h"
#ifndef NDEBUG
#include "src/core/lib/iomgr/ev_posix.h"
#include "src/core/lib/security/context/security_context.h"
#include "src/core/lib/security/transport/security_connector.h"
#endif
/* (generated) built in registry of plugins */
extern void grpc_register_built_in_plugins(void);
@ -147,11 +141,6 @@ void grpc_init(void) {
grpc_register_tracer("closure", &grpc_trace_closure);
grpc_register_tracer("error_refcount", &grpc_trace_error_refcount);
grpc_register_tracer("stream_refcount", &grpc_trace_stream_refcount);
// TODO(ncteisen): fix this after rebase
// grpc_register_tracer("auth_context_refcount",
// &grpc_trace_auth_context_refcount);
// grpc_register_tracer("security_connector_refcount",
// &grpc_trace_security_connector_refcount);
grpc_register_tracer("fd_refcount", &grpc_trace_fd_refcount);
grpc_register_tracer("metadata", &grpc_trace_metadata);
#endif

Loading…
Cancel
Save