aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar ncteisen <ncteisen@gmail.com>2017-06-09 10:35:35 -0700
committerGravatar ncteisen <ncteisen@gmail.com>2017-06-09 10:35:35 -0700
commit3bc255818b297b8ba3c7652351de496faff66b6d (patch)
treeed4a31ade9a55ce0116b97c89dc20bf86d48c435 /src
parentf463eb23db155440593d6c64bfe50a798d3354b8 (diff)
clang fmt
Diffstat (limited to 'src')
-rw-r--r--src/core/ext/filters/client_channel/lb_policy.c1
-rw-r--r--src/core/ext/filters/client_channel/resolver.c20
-rw-r--r--src/core/lib/iomgr/combiner.c12
-rw-r--r--src/core/lib/iomgr/error.c6
-rw-r--r--src/core/lib/iomgr/ev_posix.c1
-rw-r--r--src/core/lib/iomgr/exec_ctx.c2
-rw-r--r--src/core/lib/security/context/security_context.c3
-rw-r--r--src/core/lib/security/transport/security_connector.c3
-rw-r--r--src/core/lib/surface/completion_queue.c14
-rw-r--r--src/core/lib/surface/init.c11
-rw-r--r--src/core/lib/transport/transport.c1
11 files changed, 40 insertions, 34 deletions
diff --git a/src/core/ext/filters/client_channel/lb_policy.c b/src/core/ext/filters/client_channel/lb_policy.c
index 6fc9b4bc15..dd2fefb412 100644
--- a/src/core/ext/filters/client_channel/lb_policy.c
+++ b/src/core/ext/filters/client_channel/lb_policy.c
@@ -25,7 +25,6 @@
grpc_tracer_flag grpc_trace_lb_policy_refcount = GRPC_TRACER_INITIALIZER(false);
#endif
-
void grpc_lb_policy_init(grpc_lb_policy *policy,
const grpc_lb_policy_vtable *vtable,
grpc_combiner *combiner) {
diff --git a/src/core/ext/filters/client_channel/resolver.c b/src/core/ext/filters/client_channel/resolver.c
index 6a3e82eff6..7d35c05b19 100644
--- a/src/core/ext/filters/client_channel/resolver.c
+++ b/src/core/ext/filters/client_channel/resolver.c
@@ -32,13 +32,13 @@ void grpc_resolver_init(grpc_resolver *resolver,
}
#ifndef NDEBUG
-void grpc_resolver_ref(grpc_resolver *resolver,
- const char *file, int line, const char *reason) {
+void grpc_resolver_ref(grpc_resolver *resolver, const char *file, int line,
+ const char *reason) {
if (GRPC_TRACER_ON(grpc_trace_resolver_refcount)) {
long old_refs = gpr_atm_no_barrier_load(&resolver->refs.count);
- gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "RESOLVER:%p ref %" PRIdPTR " -> %" PRIdPTR " %s",
- resolver, old_refs, old_refs + 1,
- reason);
+ gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG,
+ "RESOLVER:%p ref %" PRIdPTR " -> %" PRIdPTR " %s", resolver,
+ old_refs, old_refs + 1, reason);
}
#else
void grpc_resolver_ref(grpc_resolver *resolver) {
@@ -47,13 +47,13 @@ void grpc_resolver_ref(grpc_resolver *resolver) {
}
#ifndef NDEBUG
-void grpc_resolver_unref(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver, const char *file,
- int line, const char *reason) {
+void grpc_resolver_unref(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver,
+ const char *file, int line, const char *reason) {
if (GRPC_TRACER_ON(grpc_trace_resolver_refcount)) {
long old_refs = gpr_atm_no_barrier_load(&resolver->refs.count);
- gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "RESOLVER:%p unref %" PRIdPTR " -> %" PRIdPTR " %s",
- resolver, old_refs, old_refs - 1,
- reason);
+ gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG,
+ "RESOLVER:%p unref %" PRIdPTR " -> %" PRIdPTR " %s", resolver,
+ old_refs, old_refs - 1, reason);
}
#else
void grpc_resolver_unref(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver) {
diff --git a/src/core/lib/iomgr/combiner.c b/src/core/lib/iomgr/combiner.c
index ca2e1623ba..5e88aeed10 100644
--- a/src/core/lib/iomgr/combiner.c
+++ b/src/core/lib/iomgr/combiner.c
@@ -103,11 +103,13 @@ static void start_destroy(grpc_exec_ctx *exec_ctx, grpc_combiner *lock) {
}
#ifndef NDEBUG
-#define GRPC_COMBINER_DEBUG_SPAM(op, delta) \
- if (GRPC_TRACER_ON(grpc_combiner_trace)) { gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, \
- "C:%p %s %" PRIdPTR " --> %" PRIdPTR " %s", lock, (op), \
- gpr_atm_no_barrier_load(&lock->refs.count), \
- gpr_atm_no_barrier_load(&lock->refs.count) + (delta), reason); }
+#define GRPC_COMBINER_DEBUG_SPAM(op, delta) \
+ if (GRPC_TRACER_ON(grpc_combiner_trace)) { \
+ gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, \
+ "C:%p %s %" PRIdPTR " --> %" PRIdPTR " %s", lock, (op), \
+ gpr_atm_no_barrier_load(&lock->refs.count), \
+ gpr_atm_no_barrier_load(&lock->refs.count) + (delta), reason); \
+ }
#else
#define GRPC_COMBINER_DEBUG_SPAM(op, delta)
#endif
diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c
index d8fd92f89a..b0cc61a43f 100644
--- a/src/core/lib/iomgr/error.c
+++ b/src/core/lib/iomgr/error.c
@@ -127,9 +127,9 @@ bool grpc_error_is_special(grpc_error *err) {
grpc_error *grpc_error_ref(grpc_error *err, const char *file, int line) {
if (grpc_error_is_special(err)) return err;
if (GRPC_TRACER_ON(grpc_trace_error_refcount)) {
- gpr_log(GPR_DEBUG, "%p: %" PRIdPTR " -> %" PRIdPTR " [%s:%d]", err,
- gpr_atm_no_barrier_load(&err->atomics.refs.count),
- gpr_atm_no_barrier_load(&err->atomics.refs.count) + 1, file, line);
+ gpr_log(GPR_DEBUG, "%p: %" PRIdPTR " -> %" PRIdPTR " [%s:%d]", err,
+ gpr_atm_no_barrier_load(&err->atomics.refs.count),
+ gpr_atm_no_barrier_load(&err->atomics.refs.count) + 1, file, line);
}
gpr_ref(&err->atomics.refs);
return err;
diff --git a/src/core/lib/iomgr/ev_posix.c b/src/core/lib/iomgr/ev_posix.c
index a43763e92a..54960d1ecc 100644
--- a/src/core/lib/iomgr/ev_posix.c
+++ b/src/core/lib/iomgr/ev_posix.c
@@ -38,7 +38,6 @@
#include "src/core/lib/iomgr/ev_poll_posix.h"
#include "src/core/lib/support/env.h"
-
grpc_tracer_flag grpc_polling_trace =
GRPC_TRACER_INITIALIZER(false); /* Disabled by default */
diff --git a/src/core/lib/iomgr/exec_ctx.c b/src/core/lib/iomgr/exec_ctx.c
index ad856295e7..a2bd71ea9b 100644
--- a/src/core/lib/iomgr/exec_ctx.c
+++ b/src/core/lib/iomgr/exec_ctx.c
@@ -88,7 +88,7 @@ static void exec_ctx_run(grpc_exec_ctx *exec_ctx, grpc_closure *closure,
#ifdef GRPC_CLOSURE_RICH_DEBUG
closure->scheduled = false;
if (GRPC_TRACER_ON(grpc_trace_closure)) {
- gpr_log(GPR_DEBUG, "running closure %p: created [%s:%d]: %s [%s:%d]",
+ gpr_log(GPR_DEBUG, "running closure %p: created [%s:%d]: %s [%s:%d]",
closure, closure->file_created, closure->line_created,
closure->run ? "run" : "scheduled", closure->file_initiated,
closure->line_initiated);
diff --git a/src/core/lib/security/context/security_context.c b/src/core/lib/security/context/security_context.c
index 9d95d48057..e7c3dd45c8 100644
--- a/src/core/lib/security/context/security_context.c
+++ b/src/core/lib/security/context/security_context.c
@@ -29,7 +29,8 @@
#include <grpc/support/string_util.h>
#ifndef NDEBUG
-grpc_tracer_flag grpc_trace_auth_context_refcount = GRPC_TRACER_INITIALIZER(false);
+grpc_tracer_flag grpc_trace_auth_context_refcount =
+ GRPC_TRACER_INITIALIZER(false);
#endif
/* --- grpc_call --- */
diff --git a/src/core/lib/security/transport/security_connector.c b/src/core/lib/security/transport/security_connector.c
index 662b6449ba..5d879e9935 100644
--- a/src/core/lib/security/transport/security_connector.c
+++ b/src/core/lib/security/transport/security_connector.c
@@ -44,7 +44,8 @@
#include "src/core/tsi/transport_security_adapter.h"
#ifndef NDEBUG
-grpc_tracer_flag grpc_trace_security_connector_refcount = GRPC_TRACER_INITIALIZER(false);
+grpc_tracer_flag grpc_trace_security_connector_refcount =
+ GRPC_TRACER_INITIALIZER(false);
#endif
/* -- Constants. -- */
diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c
index f008d7b83c..b04aee6c73 100644
--- a/src/core/lib/surface/completion_queue.c
+++ b/src/core/lib/surface/completion_queue.c
@@ -444,8 +444,9 @@ void grpc_cq_internal_ref(grpc_completion_queue *cc, const char *reason,
cq_data *cqd = &cc->data;
if (GRPC_TRACER_ON(grpc_trace_cq_refcount)) {
gpr_atm val = gpr_atm_no_barrier_load(&cqd->owning_refs.count);
- gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "CQ:%p ref %" PRIdPTR " -> %" PRIdPTR " %s", cc,
- val, val + 1, reason);
+ gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG,
+ "CQ:%p ref %" PRIdPTR " -> %" PRIdPTR " %s", cc, val, val + 1,
+ reason);
}
#else
void grpc_cq_internal_ref(grpc_completion_queue *cc) {
@@ -461,13 +462,14 @@ static void on_pollset_shutdown_done(grpc_exec_ctx *exec_ctx, void *arg,
}
#ifndef NDEBUG
-void grpc_cq_internal_unref(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cc, const char *reason,
- const char *file, int line) {
+void grpc_cq_internal_unref(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cc,
+ const char *reason, const char *file, int line) {
cq_data *cqd = &cc->data;
if (GRPC_TRACER_ON(grpc_trace_cq_refcount)) {
gpr_atm val = gpr_atm_no_barrier_load(&cqd->owning_refs.count);
- gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "CQ:%p unref %" PRIdPTR " -> %" PRIdPTR " %s", cc,
- val, val - 1, reason);
+ gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG,
+ "CQ:%p unref %" PRIdPTR " -> %" PRIdPTR " %s", cc, val, val - 1,
+ reason);
}
#else
void grpc_cq_internal_unref(grpc_exec_ctx *exec_ctx,
diff --git a/src/core/lib/surface/init.c b/src/core/lib/surface/init.c
index 1ec54dd2cd..731aa4aba9 100644
--- a/src/core/lib/surface/init.c
+++ b/src/core/lib/surface/init.c
@@ -132,11 +132,12 @@ void grpc_init(void) {
grpc_register_tracer("channel_stack_builder",
&grpc_trace_channel_stack_builder);
grpc_register_tracer("http1", &grpc_http1_trace);
- grpc_register_tracer("queue_pluck", &grpc_cq_pluck_trace); // default on
+ grpc_register_tracer("queue_pluck", &grpc_cq_pluck_trace); // default on
grpc_register_tracer("combiner", &grpc_combiner_trace);
grpc_register_tracer("server_channel", &grpc_server_channel_trace);
grpc_register_tracer("bdp_estimator", &grpc_bdp_estimator_trace);
- grpc_register_tracer("queue_timeout", &grpc_cq_event_timeout_trace); // default on
+ grpc_register_tracer("queue_timeout",
+ &grpc_cq_event_timeout_trace); // default on
grpc_register_tracer("op_failure", &grpc_trace_operation_failures);
grpc_register_tracer("resource_quota", &grpc_resource_quota_trace);
grpc_register_tracer("call_error", &grpc_call_error_trace);
@@ -147,8 +148,10 @@ void grpc_init(void) {
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("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
diff --git a/src/core/lib/transport/transport.c b/src/core/lib/transport/transport.c
index 4d7b942da9..52725846e6 100644
--- a/src/core/lib/transport/transport.c
+++ b/src/core/lib/transport/transport.c
@@ -31,7 +31,6 @@
#include "src/core/lib/support/string.h"
#include "src/core/lib/transport/transport_impl.h"
-
#ifndef NDEBUG
grpc_tracer_flag grpc_trace_stream_refcount = GRPC_TRACER_INITIALIZER(false);
#endif