aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-10-16 13:51:45 -0700
committerGravatar Craig Tiller <ctiller@google.com>2017-10-16 13:51:45 -0700
commitcdaf6d8e0660f83b708e4e73e90a4deaeab7ea2b (patch)
tree25a849ba310eb6a540e8e500a4305122520383c7
parent6014e8a945fa81fad7d0311a8a7cded0c2aaa827 (diff)
clang-format
-rw-r--r--src/core/ext/filters/client_channel/client_channel.cc3
-rw-r--r--src/core/ext/filters/client_channel/client_channel_plugin.cc4
-rw-r--r--src/core/ext/filters/client_channel/lb_policy.cc3
-rw-r--r--src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc4
-rw-r--r--src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc4
-rw-r--r--src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc4
-rw-r--r--src/core/ext/filters/client_channel/resolver.cc3
-rw-r--r--src/core/ext/filters/http/http_filters_plugin.cc1
-rw-r--r--src/core/ext/transport/chttp2/transport/chttp2_plugin.cc5
-rw-r--r--src/core/ext/transport/chttp2/transport/chttp2_transport.cc6
-rw-r--r--src/core/ext/transport/chttp2/transport/frame_settings.cc3
-rw-r--r--src/core/ext/transport/chttp2/transport/internal.h16
-rw-r--r--src/core/ext/transport/chttp2/transport/stream_lists.cc3
-rw-r--r--src/core/ext/transport/chttp2/transport/writing.cc12
-rw-r--r--src/core/ext/transport/inproc/inproc_transport.cc4
-rw-r--r--src/core/lib/channel/channel_stack_builder.cc4
-rw-r--r--src/core/lib/iomgr/call_combiner.cc3
-rw-r--r--src/core/lib/iomgr/combiner.cc13
-rw-r--r--src/core/lib/iomgr/error.cc3
-rw-r--r--src/core/lib/iomgr/ev_epollsig_linux.cc4
-rw-r--r--src/core/lib/iomgr/ev_posix.cc9
-rw-r--r--src/core/lib/iomgr/ev_windows.cc4
-rw-r--r--src/core/lib/iomgr/executor.cc4
-rw-r--r--src/core/lib/iomgr/iomgr_posix.cc1
-rw-r--r--src/core/lib/iomgr/iomgr_uv.cc2
-rw-r--r--src/core/lib/iomgr/pollset_uv.cc3
-rw-r--r--src/core/lib/iomgr/pollset_windows.cc3
-rw-r--r--src/core/lib/iomgr/resource_quota.cc3
-rw-r--r--src/core/lib/iomgr/timer_generic.cc5
-rw-r--r--src/core/lib/iomgr/timer_uv.cc3
-rw-r--r--src/core/lib/security/context/security_context.cc4
-rw-r--r--src/core/lib/security/credentials/plugin/plugin_credentials.cc3
-rw-r--r--src/core/lib/security/transport/secure_endpoint.cc3
-rw-r--r--src/core/lib/security/transport/security_connector.cc4
-rw-r--r--src/core/lib/surface/alarm.cc3
-rw-r--r--src/core/lib/surface/api_trace.h2
-rw-r--r--src/core/lib/surface/call.cc6
-rw-r--r--src/core/lib/surface/call.h3
-rw-r--r--src/core/lib/surface/completion_queue.cc42
-rw-r--r--src/core/lib/surface/init.cc24
-rw-r--r--src/core/lib/surface/init_secure.cc10
-rw-r--r--src/core/lib/surface/server.cc3
-rw-r--r--src/core/lib/transport/bdp_estimator.cc3
-rw-r--r--src/core/lib/transport/connectivity_state.cc3
-rw-r--r--src/core/lib/transport/metadata.cc3
-rw-r--r--src/core/lib/transport/transport.cc3
46 files changed, 88 insertions, 170 deletions
diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc
index 21ad3d9a26..8a8e76ff12 100644
--- a/src/core/ext/filters/client_channel/client_channel.cc
+++ b/src/core/ext/filters/client_channel/client_channel.cc
@@ -55,8 +55,7 @@
/* Client channel implementation */
-grpc_core::Tracer grpc_client_channel_trace
- (false, "client_channel");
+grpc_core::Tracer grpc_client_channel_trace(false, "client_channel");
/*************************************************************************
* METHOD-CONFIG TABLE
diff --git a/src/core/ext/filters/client_channel/client_channel_plugin.cc b/src/core/ext/filters/client_channel/client_channel_plugin.cc
index d67e11e976..407b8349d8 100644
--- a/src/core/ext/filters/client_channel/client_channel_plugin.cc
+++ b/src/core/ext/filters/client_channel/client_channel_plugin.cc
@@ -78,9 +78,9 @@ extern "C" void grpc_client_channel_init(void) {
GRPC_CLIENT_CHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY, append_filter,
(void *)&grpc_client_channel_filter);
grpc_http_connect_register_handshaker_factory();
-
+
#ifndef NDEBUG
-
+
#endif
}
diff --git a/src/core/ext/filters/client_channel/lb_policy.cc b/src/core/ext/filters/client_channel/lb_policy.cc
index 6ce49b17e9..738486adbb 100644
--- a/src/core/ext/filters/client_channel/lb_policy.cc
+++ b/src/core/ext/filters/client_channel/lb_policy.cc
@@ -22,8 +22,7 @@
#define WEAK_REF_BITS 16
#ifndef NDEBUG
-grpc_core::Tracer grpc_trace_lb_policy_refcount
- (false, "lb_policy_refcount");
+grpc_core::Tracer grpc_trace_lb_policy_refcount(false, "lb_policy_refcount");
#endif
void grpc_lb_policy_init(grpc_lb_policy *policy,
diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
index 1b9e72bd24..9ad54fabf5 100644
--- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
+++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
@@ -1962,9 +1962,9 @@ static bool maybe_add_client_load_reporting_filter(
extern "C" void grpc_lb_policy_grpclb_init() {
grpc_register_lb_policy(grpc_glb_lb_factory_create());
-
+
#ifndef NDEBUG
-
+
#endif
grpc_channel_init_register_stage(GRPC_CLIENT_SUBCHANNEL,
GRPC_CHANNEL_INIT_BUILTIN_PRIORITY,
diff --git a/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc b/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc
index 8c5065cd9e..3454ff0cbd 100644
--- a/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc
+++ b/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc
@@ -28,8 +28,7 @@
#include "src/core/lib/iomgr/sockaddr_utils.h"
#include "src/core/lib/transport/connectivity_state.h"
-grpc_core::Tracer grpc_lb_pick_first_trace
- (false, "pick_first");
+grpc_core::Tracer grpc_lb_pick_first_trace(false, "pick_first");
typedef struct pending_pick {
struct pending_pick *next;
@@ -708,7 +707,6 @@ static grpc_lb_policy_factory *pick_first_lb_factory_create() {
extern "C" void grpc_lb_policy_pick_first_init() {
grpc_register_lb_policy(pick_first_lb_factory_create());
-
}
extern "C" void grpc_lb_policy_pick_first_shutdown() {}
diff --git a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc b/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc
index f8c6830792..e7cf8ce6f7 100644
--- a/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc
+++ b/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc
@@ -38,8 +38,7 @@
#include "src/core/lib/transport/connectivity_state.h"
#include "src/core/lib/transport/static_metadata.h"
-grpc_core::Tracer grpc_lb_round_robin_trace
- (false, "round_robin");
+grpc_core::Tracer grpc_lb_round_robin_trace(false, "round_robin");
/** List of entities waiting for a pick.
*
@@ -918,7 +917,6 @@ static grpc_lb_policy_factory *round_robin_lb_factory_create() {
extern "C" void grpc_lb_policy_round_robin_init() {
grpc_register_lb_policy(round_robin_lb_factory_create());
-
}
extern "C" void grpc_lb_policy_round_robin_shutdown() {}
diff --git a/src/core/ext/filters/client_channel/resolver.cc b/src/core/ext/filters/client_channel/resolver.cc
index 1863a94162..9ce4f80e63 100644
--- a/src/core/ext/filters/client_channel/resolver.cc
+++ b/src/core/ext/filters/client_channel/resolver.cc
@@ -20,8 +20,7 @@
#include "src/core/lib/iomgr/combiner.h"
#ifndef NDEBUG
-grpc_core::Tracer grpc_trace_resolver_refcount
- (false, "resolver_refcount");
+grpc_core::Tracer grpc_trace_resolver_refcount(false, "resolver_refcount");
#endif
void grpc_resolver_init(grpc_resolver *resolver,
diff --git a/src/core/ext/filters/http/http_filters_plugin.cc b/src/core/ext/filters/http/http_filters_plugin.cc
index 24d46a60ae..cbcbca1efc 100644
--- a/src/core/ext/filters/http/http_filters_plugin.cc
+++ b/src/core/ext/filters/http/http_filters_plugin.cc
@@ -65,7 +65,6 @@ static bool maybe_add_required_filter(grpc_exec_ctx *exec_ctx,
}
extern "C" void grpc_http_filters_init(void) {
-
grpc_channel_init_register_stage(GRPC_CLIENT_SUBCHANNEL,
GRPC_CHANNEL_INIT_BUILTIN_PRIORITY,
maybe_add_optional_filter, &compress_filter);
diff --git a/src/core/ext/transport/chttp2/transport/chttp2_plugin.cc b/src/core/ext/transport/chttp2/transport/chttp2_plugin.cc
index 06059cb92a..13c3966762 100644
--- a/src/core/ext/transport/chttp2/transport/chttp2_plugin.cc
+++ b/src/core/ext/transport/chttp2/transport/chttp2_plugin.cc
@@ -21,11 +21,8 @@
#include "src/core/lib/transport/metadata.h"
extern "C" void grpc_chttp2_plugin_init(void) {
-
-
-
#ifndef NDEBUG
-
+
#endif
}
diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
index 664fb72e57..a103038893 100644
--- a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
+++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
@@ -95,8 +95,7 @@ grpc_core::Tracer grpc_http_trace(false, "http");
grpc_core::Tracer grpc_flowctl_trace(false, "flowctl");
#ifndef NDEBUG
-grpc_core::Tracer grpc_trace_chttp2_refcount
- (false, "chttp2_refcount");
+grpc_core::Tracer grpc_trace_chttp2_refcount(false, "chttp2_refcount");
#endif
/* forward declarations of various callbacks that we'll build closures around */
@@ -3062,8 +3061,7 @@ static void benign_reclaimer_locked(grpc_exec_ctx *exec_ctx, void *arg,
grpc_error_set_int(
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Buffers full"),
GRPC_ERROR_INT_HTTP2_ERROR, GRPC_HTTP2_ENHANCE_YOUR_CALM));
- } else if (error == GRPC_ERROR_NONE &&
- grpc_resource_quota_trace.enabled()) {
+ } else if (error == GRPC_ERROR_NONE && grpc_resource_quota_trace.enabled()) {
gpr_log(GPR_DEBUG,
"HTTP2: %s - skip benign reclamation, there are still %" PRIdPTR
" streams",
diff --git a/src/core/ext/transport/chttp2/transport/frame_settings.cc b/src/core/ext/transport/chttp2/transport/frame_settings.cc
index b3fc08041f..8ee12aeceb 100644
--- a/src/core/ext/transport/chttp2/transport/frame_settings.cc
+++ b/src/core/ext/transport/chttp2/transport/frame_settings.cc
@@ -204,8 +204,7 @@ grpc_error *grpc_chttp2_settings_parser_parse(grpc_exec_ctx *exec_ctx, void *p,
parser->incoming_settings[id] != parser->value) {
t->flow_control.initial_window_update +=
(int64_t)parser->value - parser->incoming_settings[id];
- if (grpc_http_trace.enabled() ||
- grpc_flowctl_trace.enabled()) {
+ if (grpc_http_trace.enabled() || grpc_flowctl_trace.enabled()) {
gpr_log(GPR_DEBUG, "%p[%s] adding %d for initial_window change",
t, t->is_client ? "cli" : "svr",
(int)t->flow_control.initial_window_update);
diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h
index 07dc381e0a..55cb55de56 100644
--- a/src/core/ext/transport/chttp2/transport/internal.h
+++ b/src/core/ext/transport/chttp2/transport/internal.h
@@ -797,19 +797,19 @@ extern grpc_core::Tracer grpc_http_trace;
extern grpc_core::Tracer grpc_flowctl_trace;
#ifndef NDEBUG
-#define GRPC_FLOW_CONTROL_IF_TRACING(stmt) \
- if (!(grpc_flowctl_trace.enabled())) \
- ; \
- else \
+#define GRPC_FLOW_CONTROL_IF_TRACING(stmt) \
+ if (!(grpc_flowctl_trace.enabled())) \
+ ; \
+ else \
stmt
#else
#define GRPC_FLOW_CONTROL_IF_TRACING(stmt)
#endif
-#define GRPC_CHTTP2_IF_TRACING(stmt) \
- if (!(grpc_http_trace.enabled())) \
- ; \
- else \
+#define GRPC_CHTTP2_IF_TRACING(stmt) \
+ if (!(grpc_http_trace.enabled())) \
+ ; \
+ else \
stmt
void grpc_chttp2_fake_status(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t,
diff --git a/src/core/ext/transport/chttp2/transport/stream_lists.cc b/src/core/ext/transport/chttp2/transport/stream_lists.cc
index 3595d09a8f..76538976b6 100644
--- a/src/core/ext/transport/chttp2/transport/stream_lists.cc
+++ b/src/core/ext/transport/chttp2/transport/stream_lists.cc
@@ -39,8 +39,7 @@ static const char *stream_list_id_string(grpc_chttp2_stream_list_id id) {
GPR_UNREACHABLE_CODE(return "unknown");
}
-grpc_core::Tracer grpc_trace_http2_stream_state
- (false, "http2_stream_state");
+grpc_core::Tracer grpc_trace_http2_stream_state(false, "http2_stream_state");
/* core list management */
diff --git a/src/core/ext/transport/chttp2/transport/writing.cc b/src/core/ext/transport/chttp2/transport/writing.cc
index e3ee506e87..34c9bc334a 100644
--- a/src/core/ext/transport/chttp2/transport/writing.cc
+++ b/src/core/ext/transport/chttp2/transport/writing.cc
@@ -51,8 +51,7 @@ static void maybe_initiate_ping(grpc_exec_ctx *exec_ctx,
}
if (!grpc_closure_list_empty(pq->lists[GRPC_CHTTP2_PCL_INFLIGHT])) {
/* ping already in-flight: wait */
- if (grpc_http_trace.enabled() ||
- grpc_bdp_estimator_trace.enabled()) {
+ if (grpc_http_trace.enabled() || grpc_bdp_estimator_trace.enabled()) {
gpr_log(GPR_DEBUG, "%s: Ping delayed [%p]: already pinging",
t->is_client ? "CLIENT" : "SERVER", t->peer_string);
}
@@ -61,8 +60,7 @@ static void maybe_initiate_ping(grpc_exec_ctx *exec_ctx,
if (t->ping_state.pings_before_data_required == 0 &&
t->ping_policy.max_pings_without_data != 0) {
/* need to receive something of substance before sending a ping again */
- if (grpc_http_trace.enabled() ||
- grpc_bdp_estimator_trace.enabled()) {
+ if (grpc_http_trace.enabled() || grpc_bdp_estimator_trace.enabled()) {
gpr_log(GPR_DEBUG, "%s: Ping delayed [%p]: too many recent pings: %d/%d",
t->is_client ? "CLIENT" : "SERVER", t->peer_string,
t->ping_state.pings_before_data_required,
@@ -81,8 +79,7 @@ static void maybe_initiate_ping(grpc_exec_ctx *exec_ctx,
}
if (next_allowed_ping > now) {
/* not enough elapsed time between successive pings */
- if (grpc_http_trace.enabled() ||
- grpc_bdp_estimator_trace.enabled()) {
+ if (grpc_http_trace.enabled() || grpc_bdp_estimator_trace.enabled()) {
gpr_log(GPR_DEBUG,
"%s: Ping delayed [%p]: not enough time elapsed since last ping",
t->is_client ? "CLIENT" : "SERVER", t->peer_string);
@@ -103,8 +100,7 @@ static void maybe_initiate_ping(grpc_exec_ctx *exec_ctx,
grpc_chttp2_ping_create(false, pq->inflight_id));
GRPC_STATS_INC_HTTP2_PINGS_SENT(exec_ctx);
t->ping_state.last_ping_sent_time = now;
- if (grpc_http_trace.enabled() ||
- grpc_bdp_estimator_trace.enabled()) {
+ if (grpc_http_trace.enabled() || grpc_bdp_estimator_trace.enabled()) {
gpr_log(GPR_DEBUG, "%s: Ping sent [%p]: %d/%d",
t->is_client ? "CLIENT" : "SERVER", t->peer_string,
t->ping_state.pings_before_data_required,
diff --git a/src/core/ext/transport/inproc/inproc_transport.cc b/src/core/ext/transport/inproc/inproc_transport.cc
index 047a24c145..c2af5fb9cd 100644
--- a/src/core/ext/transport/inproc/inproc_transport.cc
+++ b/src/core/ext/transport/inproc/inproc_transport.cc
@@ -32,8 +32,8 @@
#include "src/core/lib/transport/error_utils.h"
#include "src/core/lib/transport/transport_impl.h"
-#define INPROC_LOG(...) \
- do { \
+#define INPROC_LOG(...) \
+ do { \
if (grpc_inproc_trace.enabled()) gpr_log(__VA_ARGS__); \
} while (0)
diff --git a/src/core/lib/channel/channel_stack_builder.cc b/src/core/lib/channel/channel_stack_builder.cc
index 83f8113a35..3ee70a85be 100644
--- a/src/core/lib/channel/channel_stack_builder.cc
+++ b/src/core/lib/channel/channel_stack_builder.cc
@@ -23,8 +23,8 @@
#include <grpc/support/alloc.h>
#include <grpc/support/string_util.h>
-grpc_core::Tracer grpc_trace_channel_stack_builder
- (false, "channel_stack_builder");
+grpc_core::Tracer grpc_trace_channel_stack_builder(false,
+ "channel_stack_builder");
typedef struct filter_node {
struct filter_node *next;
diff --git a/src/core/lib/iomgr/call_combiner.cc b/src/core/lib/iomgr/call_combiner.cc
index d36e2c5bef..48122d6b55 100644
--- a/src/core/lib/iomgr/call_combiner.cc
+++ b/src/core/lib/iomgr/call_combiner.cc
@@ -24,8 +24,7 @@
#include "src/core/lib/debug/stats.h"
#include "src/core/lib/profiling/timers.h"
-grpc_core::Tracer grpc_call_combiner_trace
- (false, "call_combiner");
+grpc_core::Tracer grpc_call_combiner_trace(false, "call_combiner");
static grpc_error* decode_cancel_state_error(gpr_atm cancel_state) {
if (cancel_state & 1) {
diff --git a/src/core/lib/iomgr/combiner.cc b/src/core/lib/iomgr/combiner.cc
index 2d1c652041..b77ddbffa1 100644
--- a/src/core/lib/iomgr/combiner.cc
+++ b/src/core/lib/iomgr/combiner.cc
@@ -29,14 +29,13 @@
#include "src/core/lib/iomgr/executor.h"
#include "src/core/lib/profiling/timers.h"
-grpc_core::Tracer grpc_combiner_trace
- (false, "combiner");
+grpc_core::Tracer grpc_combiner_trace(false, "combiner");
-#define GRPC_COMBINER_TRACE(fn) \
- do { \
+#define GRPC_COMBINER_TRACE(fn) \
+ do { \
if (grpc_combiner_trace.enabled()) { \
- fn; \
- } \
+ fn; \
+ } \
} while (0)
#define STATE_UNORPHANED 1
@@ -106,7 +105,7 @@ static void start_destroy(grpc_exec_ctx *exec_ctx, grpc_combiner *lock) {
#ifndef NDEBUG
#define GRPC_COMBINER_DEBUG_SPAM(op, delta) \
- if (grpc_combiner_trace.enabled()) { \
+ if (grpc_combiner_trace.enabled()) { \
gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, \
"C:%p %s %" PRIdPTR " --> %" PRIdPTR " %s", lock, (op), \
gpr_atm_no_barrier_load(&lock->refs.count), \
diff --git a/src/core/lib/iomgr/error.cc b/src/core/lib/iomgr/error.cc
index cbb27f442e..578d35764f 100644
--- a/src/core/lib/iomgr/error.cc
+++ b/src/core/lib/iomgr/error.cc
@@ -38,8 +38,7 @@
#include "src/core/lib/slice/slice_internal.h"
#ifndef NDEBUG
-grpc_core::Tracer grpc_trace_error_refcount
- (false, "error_refcount");
+grpc_core::Tracer grpc_trace_error_refcount(false, "error_refcount");
#endif
static const char *error_int_name(grpc_error_ints key) {
diff --git a/src/core/lib/iomgr/ev_epollsig_linux.cc b/src/core/lib/iomgr/ev_epollsig_linux.cc
index 648de4f7e1..ad7b27b279 100644
--- a/src/core/lib/iomgr/ev_epollsig_linux.cc
+++ b/src/core/lib/iomgr/ev_epollsig_linux.cc
@@ -53,9 +53,9 @@
#define GRPC_POLLSET_KICK_BROADCAST ((grpc_pollset_worker *)1)
-#define GRPC_POLLING_TRACE(...) \
+#define GRPC_POLLING_TRACE(...) \
if (grpc_polling_trace.enabled()) { \
- gpr_log(GPR_INFO, __VA_ARGS__); \
+ gpr_log(GPR_INFO, __VA_ARGS__); \
}
static int grpc_wakeup_signal = -1;
diff --git a/src/core/lib/iomgr/ev_posix.cc b/src/core/lib/iomgr/ev_posix.cc
index 166801e229..45403c3037 100644
--- a/src/core/lib/iomgr/ev_posix.cc
+++ b/src/core/lib/iomgr/ev_posix.cc
@@ -36,12 +36,11 @@
#include "src/core/lib/iomgr/ev_poll_posix.h"
#include "src/core/lib/support/env.h"
-grpc_core::Tracer grpc_polling_trace
- (false, "polling"); /* Disabled by default */
+grpc_core::Tracer grpc_polling_trace(false,
+ "polling"); /* Disabled by default */
#ifndef NDEBUG
-grpc_core::Tracer grpc_trace_fd_refcount
- (false, "fd_refcount");
+grpc_core::Tracer grpc_trace_fd_refcount(false, "fd_refcount");
#endif
/** Default poll() function - a pointer so that it can be overridden by some
@@ -156,8 +155,6 @@ const grpc_event_engine_vtable *grpc_get_event_engine_test_only() {
const char *grpc_get_poll_strategy_name() { return g_poll_strategy_name; }
void grpc_event_engine_init(void) {
-
-
char *s = gpr_getenv("GRPC_POLL_STRATEGY");
if (s == NULL) {
s = gpr_strdup("all");
diff --git a/src/core/lib/iomgr/ev_windows.cc b/src/core/lib/iomgr/ev_windows.cc
index c9d83c0949..c2e5d55df8 100644
--- a/src/core/lib/iomgr/ev_windows.cc
+++ b/src/core/lib/iomgr/ev_windows.cc
@@ -22,7 +22,7 @@
#include "src/core/lib/debug/trace.h"
-grpc_core::Tracer grpc_polling_trace
- (false, "polling"); /* Disabled by default */
+grpc_core::Tracer grpc_polling_trace(false,
+ "polling"); /* Disabled by default */
#endif // GRPC_WINSOCK_SOCKET
diff --git a/src/core/lib/iomgr/executor.cc b/src/core/lib/iomgr/executor.cc
index bf233087d5..085c2127a1 100644
--- a/src/core/lib/iomgr/executor.cc
+++ b/src/core/lib/iomgr/executor.cc
@@ -51,8 +51,7 @@ static gpr_spinlock g_adding_thread_lock = GPR_SPINLOCK_STATIC_INITIALIZER;
GPR_TLS_DECL(g_this_thread_state);
-static grpc_core::Tracer executor_trace
- (false, "executor");
+static grpc_core::Tracer executor_trace(false, "executor");
static void executor_thread(void *arg);
@@ -134,7 +133,6 @@ void grpc_executor_set_threading(grpc_exec_ctx *exec_ctx, bool threading) {
}
void grpc_executor_init(grpc_exec_ctx *exec_ctx) {
-
gpr_atm_no_barrier_store(&g_cur_threads, 0);
grpc_executor_set_threading(exec_ctx, true);
}
diff --git a/src/core/lib/iomgr/iomgr_posix.cc b/src/core/lib/iomgr/iomgr_posix.cc
index 3135b1d563..f8f6fe2353 100644
--- a/src/core/lib/iomgr/iomgr_posix.cc
+++ b/src/core/lib/iomgr/iomgr_posix.cc
@@ -28,7 +28,6 @@
void grpc_iomgr_platform_init(void) {
grpc_wakeup_fd_global_init();
grpc_event_engine_init();
-
}
void grpc_iomgr_platform_flush(void) {}
diff --git a/src/core/lib/iomgr/iomgr_uv.cc b/src/core/lib/iomgr/iomgr_uv.cc
index d63829b8b1..b8a10f2ae8 100644
--- a/src/core/lib/iomgr/iomgr_uv.cc
+++ b/src/core/lib/iomgr/iomgr_uv.cc
@@ -31,7 +31,7 @@ gpr_thd_id g_init_thread;
void grpc_iomgr_platform_init(void) {
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_pollset_global_init();
-
+
grpc_executor_set_threading(&exec_ctx, false);
g_init_thread = gpr_thd_currentid();
grpc_exec_ctx_finish(&exec_ctx);
diff --git a/src/core/lib/iomgr/pollset_uv.cc b/src/core/lib/iomgr/pollset_uv.cc
index 336379b457..cf3566d08f 100644
--- a/src/core/lib/iomgr/pollset_uv.cc
+++ b/src/core/lib/iomgr/pollset_uv.cc
@@ -35,8 +35,7 @@
#include "src/core/lib/debug/trace.h"
#ifndef NDEBUG
-grpc_core::Tracer grpc_trace_fd_refcount
- (false, "fd_refcount");
+grpc_core::Tracer grpc_trace_fd_refcount(false, "fd_refcount");
#endif
struct grpc_pollset {
diff --git a/src/core/lib/iomgr/pollset_windows.cc b/src/core/lib/iomgr/pollset_windows.cc
index a7df9f27bf..d0d299b6b7 100644
--- a/src/core/lib/iomgr/pollset_windows.cc
+++ b/src/core/lib/iomgr/pollset_windows.cc
@@ -31,8 +31,7 @@
#define GRPC_POLLSET_KICK_BROADCAST ((grpc_pollset_worker *)1)
#ifndef NDEBUG
-grpc_core::Tracer grpc_trace_fd_refcount
- (false, "fd_refcount");
+grpc_core::Tracer grpc_trace_fd_refcount(false, "fd_refcount");
#endif
gpr_mu grpc_polling_mu;
diff --git a/src/core/lib/iomgr/resource_quota.cc b/src/core/lib/iomgr/resource_quota.cc
index 966b05fd5b..d3ed87a1c0 100644
--- a/src/core/lib/iomgr/resource_quota.cc
+++ b/src/core/lib/iomgr/resource_quota.cc
@@ -31,8 +31,7 @@
#include "src/core/lib/iomgr/combiner.h"
-grpc_core::Tracer grpc_resource_quota_trace
- (false, "resource_quota");
+grpc_core::Tracer grpc_resource_quota_trace(false, "resource_quota");
#define MEMORY_USAGE_ESTIMATION_MAX 65536
diff --git a/src/core/lib/iomgr/timer_generic.cc b/src/core/lib/iomgr/timer_generic.cc
index 05984c4f90..98b4ca22ab 100644
--- a/src/core/lib/iomgr/timer_generic.cc
+++ b/src/core/lib/iomgr/timer_generic.cc
@@ -45,8 +45,7 @@
extern "C" {
grpc_core::Tracer grpc_timer_trace(false, "timer");
-grpc_core::Tracer grpc_timer_check_trace
- (false, "timer_check");
+grpc_core::Tracer grpc_timer_check_trace(false, "timer_check");
}
/* A "timer shard". Contains a 'heap' and a 'list' of timers. All timers with
@@ -247,8 +246,6 @@ void grpc_timer_list_init(grpc_exec_ctx *exec_ctx) {
g_shared_mutables.min_timer = grpc_exec_ctx_now(exec_ctx);
gpr_tls_init(&g_last_seen_min_timer);
gpr_tls_set(&g_last_seen_min_timer, 0);
-
-
for (i = 0; i < NUM_SHARDS; i++) {
timer_shard *shard = &g_shards[i];
diff --git a/src/core/lib/iomgr/timer_uv.cc b/src/core/lib/iomgr/timer_uv.cc
index 7ddfafd002..a64269585c 100644
--- a/src/core/lib/iomgr/timer_uv.cc
+++ b/src/core/lib/iomgr/timer_uv.cc
@@ -31,8 +31,7 @@
extern "C" {
grpc_core::Tracer grpc_timer_trace(false, "timer");
-grpc_core::Tracer grpc_timer_check_trace
- (false, "timer_check");
+grpc_core::Tracer grpc_timer_check_trace(false, "timer_check");
}
static void timer_close_callback(uv_handle_t *handle) { gpr_free(handle); }
diff --git a/src/core/lib/security/context/security_context.cc b/src/core/lib/security/context/security_context.cc
index 96bec5a4c7..39f92fe595 100644
--- a/src/core/lib/security/context/security_context.cc
+++ b/src/core/lib/security/context/security_context.cc
@@ -30,8 +30,8 @@
#include <grpc/support/string_util.h>
#ifndef NDEBUG
-grpc_core::Tracer grpc_trace_auth_context_refcount
- (false, "auth_context_refcount");
+grpc_core::Tracer grpc_trace_auth_context_refcount(false,
+ "auth_context_refcount");
#endif
/* --- grpc_call --- */
diff --git a/src/core/lib/security/credentials/plugin/plugin_credentials.cc b/src/core/lib/security/credentials/plugin/plugin_credentials.cc
index acff5ae7d2..cf03241016 100644
--- a/src/core/lib/security/credentials/plugin/plugin_credentials.cc
+++ b/src/core/lib/security/credentials/plugin/plugin_credentials.cc
@@ -31,8 +31,7 @@
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/surface/validate_metadata.h"
-grpc_core::Tracer grpc_plugin_credentials_trace
- (false, "plugin_credentials");
+grpc_core::Tracer grpc_plugin_credentials_trace(false, "plugin_credentials");
static void plugin_destruct(grpc_exec_ctx *exec_ctx,
grpc_call_credentials *creds) {
diff --git a/src/core/lib/security/transport/secure_endpoint.cc b/src/core/lib/security/transport/secure_endpoint.cc
index 901675f7a0..e2772980cd 100644
--- a/src/core/lib/security/transport/secure_endpoint.cc
+++ b/src/core/lib/security/transport/secure_endpoint.cc
@@ -61,8 +61,7 @@ typedef struct {
gpr_refcount ref;
} secure_endpoint;
-grpc_core::Tracer grpc_trace_secure_endpoint
- (false, "secure_endpoint");
+grpc_core::Tracer grpc_trace_secure_endpoint(false, "secure_endpoint");
static void destroy(grpc_exec_ctx *exec_ctx, secure_endpoint *secure_ep) {
secure_endpoint *ep = secure_ep;
diff --git a/src/core/lib/security/transport/security_connector.cc b/src/core/lib/security/transport/security_connector.cc
index 3d205ddefe..3c19d5e60a 100644
--- a/src/core/lib/security/transport/security_connector.cc
+++ b/src/core/lib/security/transport/security_connector.cc
@@ -44,8 +44,8 @@
#include "src/core/tsi/transport_security_adapter.h"
#ifndef NDEBUG
-grpc_core::Tracer grpc_trace_security_connector_refcount
- (false, "security_connector_refcount");
+grpc_core::Tracer grpc_trace_security_connector_refcount(
+ false, "security_connector_refcount");
#endif
/* -- Constants. -- */
diff --git a/src/core/lib/surface/alarm.cc b/src/core/lib/surface/alarm.cc
index 721c2fcd1e..6bab0be849 100644
--- a/src/core/lib/surface/alarm.cc
+++ b/src/core/lib/surface/alarm.cc
@@ -28,8 +28,7 @@
#include "src/core/lib/surface/completion_queue.h"
#ifndef NDEBUG
-grpc_core::Tracer grpc_trace_alarm_refcount
- (false, "alarm_refcount");
+grpc_core::Tracer grpc_trace_alarm_refcount(false, "alarm_refcount");
#endif
struct grpc_alarm {
diff --git a/src/core/lib/surface/api_trace.h b/src/core/lib/surface/api_trace.h
index 8433175f9b..044ed9b6ec 100644
--- a/src/core/lib/surface/api_trace.h
+++ b/src/core/lib/surface/api_trace.h
@@ -47,7 +47,7 @@ extern grpc_core::Tracer grpc_api_trace;
/* Due to the limitations of C89's preprocessor, the arity of the var-arg list
'nargs' must be specified. */
#define GRPC_API_TRACE(fmt, nargs, args) \
- if (grpc_api_trace.enabled()) { \
+ if (grpc_api_trace.enabled()) { \
gpr_log(GPR_INFO, fmt GRPC_API_TRACE_UNWRAP##nargs args); \
}
diff --git a/src/core/lib/surface/call.cc b/src/core/lib/surface/call.cc
index e2cf832c7f..21a0285e1c 100644
--- a/src/core/lib/surface/call.cc
+++ b/src/core/lib/surface/call.cc
@@ -259,10 +259,8 @@ struct grpc_call {
gpr_atm recv_state;
};
-grpc_core::Tracer grpc_call_error_trace
- (false, "call_error");
-grpc_core::Tracer grpc_compression_trace
- (false, "compression");
+grpc_core::Tracer grpc_call_error_trace(false, "call_error");
+grpc_core::Tracer grpc_compression_trace(false, "compression");
#define CALL_STACK_FROM_CALL(call) ((grpc_call_stack *)((call) + 1))
#define CALL_FROM_CALL_STACK(call_stack) (((grpc_call *)(call_stack)) - 1)
diff --git a/src/core/lib/surface/call.h b/src/core/lib/surface/call.h
index ee7dc5cc16..f00cf0503b 100644
--- a/src/core/lib/surface/call.h
+++ b/src/core/lib/surface/call.h
@@ -102,8 +102,7 @@ void grpc_call_context_set(grpc_call *call, grpc_context_index elem,
void *grpc_call_context_get(grpc_call *call, grpc_context_index elem);
#define GRPC_CALL_LOG_BATCH(sev, call, ops, nops, tag) \
- if (grpc_api_trace.enabled()) \
- grpc_call_log_batch(sev, call, ops, nops, tag)
+ if (grpc_api_trace.enabled()) grpc_call_log_batch(sev, call, ops, nops, tag)
uint8_t grpc_call_is_client(grpc_call *call);
diff --git a/src/core/lib/surface/completion_queue.cc b/src/core/lib/surface/completion_queue.cc
index 33378516ff..c0ef8a8a1c 100644
--- a/src/core/lib/surface/completion_queue.cc
+++ b/src/core/lib/surface/completion_queue.cc
@@ -39,13 +39,10 @@
#include "src/core/lib/surface/call.h"
#include "src/core/lib/surface/event_string.h"
-grpc_core::Tracer grpc_trace_operation_failures
- (false, "op_failure");
+grpc_core::Tracer grpc_trace_operation_failures(false, "op_failure");
#ifndef NDEBUG
-grpc_core::Tracer grpc_trace_pending_tags
- (false, "pending_tags");
-grpc_core::Tracer grpc_trace_cq_refcount
- (false, "cq_refcount");
+grpc_core::Tracer grpc_trace_pending_tags(false, "pending_tags");
+grpc_core::Tracer grpc_trace_cq_refcount(false, "cq_refcount");
#endif
typedef struct {
@@ -328,18 +325,15 @@ static const cq_vtable g_cq_vtable[] = {
#define POLLSET_FROM_CQ(cq) \
((grpc_pollset *)(cq->vtable->data_size + (char *)DATA_FROM_CQ(cq)))
-grpc_core::Tracer grpc_cq_pluck_trace
- (true, "queue_pluck");
-grpc_core::Tracer grpc_cq_event_timeout_trace
- (true, "queue_timeout");
-
-#define GRPC_SURFACE_TRACE_RETURNED_EVENT(cq, event) \
- if (grpc_api_trace.enabled() && \
- (grpc_cq_pluck_trace.enabled() || \
- (event)->type != GRPC_QUEUE_TIMEOUT)) { \
- char *_ev = grpc_event_string(event); \
- gpr_log(GPR_INFO, "RETURN_EVENT[%p]: %s", cq, _ev); \
- gpr_free(_ev); \
+grpc_core::Tracer grpc_cq_pluck_trace(true, "queue_pluck");
+grpc_core::Tracer grpc_cq_event_timeout_trace(true, "queue_timeout");
+
+#define GRPC_SURFACE_TRACE_RETURNED_EVENT(cq, event) \
+ if (grpc_api_trace.enabled() && (grpc_cq_pluck_trace.enabled() || \
+ (event)->type != GRPC_QUEUE_TIMEOUT)) { \
+ char *_ev = grpc_event_string(event); \
+ gpr_log(GPR_INFO, "RETURN_EVENT[%p]: %s", cq, _ev); \
+ gpr_free(_ev); \
}
static void on_pollset_shutdown_done(grpc_exec_ctx *exec_ctx, void *cq,
@@ -605,15 +599,13 @@ static void cq_end_op_for_next(grpc_exec_ctx *exec_ctx,
GPR_TIMER_BEGIN("cq_end_op_for_next", 0);
if (grpc_api_trace.enabled() ||
- (grpc_trace_operation_failures.enabled() &&
- error != GRPC_ERROR_NONE)) {
+ (grpc_trace_operation_failures.enabled() && error != GRPC_ERROR_NONE)) {
const char *errmsg = grpc_error_string(error);
GRPC_API_TRACE(
"cq_end_op_for_next(exec_ctx=%p, cq=%p, tag=%p, error=%s, "
"done=%p, done_arg=%p, storage=%p)",
7, (exec_ctx, cq, tag, errmsg, done, done_arg, storage));
- if (grpc_trace_operation_failures.enabled() &&
- error != GRPC_ERROR_NONE) {
+ if (grpc_trace_operation_failures.enabled() && error != GRPC_ERROR_NONE) {
gpr_log(GPR_ERROR, "Operation failed: tag=%p, error=%s", tag, errmsg);
}
}
@@ -689,15 +681,13 @@ static void cq_end_op_for_pluck(grpc_exec_ctx *exec_ctx,
GPR_TIMER_BEGIN("cq_end_op_for_pluck", 0);
if (grpc_api_trace.enabled() ||
- (grpc_trace_operation_failures.enabled() &&
- error != GRPC_ERROR_NONE)) {
+ (grpc_trace_operation_failures.enabled() && error != GRPC_ERROR_NONE)) {
const char *errmsg = grpc_error_string(error);
GRPC_API_TRACE(
"cq_end_op_for_pluck(exec_ctx=%p, cq=%p, tag=%p, error=%s, "
"done=%p, done_arg=%p, storage=%p)",
7, (exec_ctx, cq, tag, errmsg, done, done_arg, storage));
- if (grpc_trace_operation_failures.enabled() &&
- error != GRPC_ERROR_NONE) {
+ if (grpc_trace_operation_failures.enabled() && error != GRPC_ERROR_NONE) {
gpr_log(GPR_ERROR, "Operation failed: tag=%p, error=%s", tag, errmsg);
}
}
diff --git a/src/core/lib/surface/init.cc b/src/core/lib/surface/init.cc
index 9ad8214a18..2db761b4dc 100644
--- a/src/core/lib/surface/init.cc
+++ b/src/core/lib/surface/init.cc
@@ -125,29 +125,9 @@ void grpc_init(void) {
grpc_slice_intern_init();
grpc_mdctx_global_init();
grpc_channel_init_init();
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
#ifndef NDEBUG
-
-
-
-
-
-
-
-
+
#endif
grpc_security_pre_init();
grpc_iomgr_init(&exec_ctx);
diff --git a/src/core/lib/surface/init_secure.cc b/src/core/lib/surface/init_secure.cc
index 97adc9fdda..80b1fe022f 100644
--- a/src/core/lib/surface/init_secure.cc
+++ b/src/core/lib/surface/init_secure.cc
@@ -38,11 +38,8 @@
#endif
void grpc_security_pre_init(void) {
-
-
#ifndef NDEBUG
-
-
+
#endif
}
@@ -85,7 +82,4 @@ void grpc_register_security_filters(void) {
maybe_prepend_server_auth_filter, NULL);
}
-void grpc_security_init() {
- grpc_security_register_handshaker_factories();
-
-}
+void grpc_security_init() { grpc_security_register_handshaker_factories(); }
diff --git a/src/core/lib/surface/server.cc b/src/core/lib/surface/server.cc
index b2a35f9848..081fa54f16 100644
--- a/src/core/lib/surface/server.cc
+++ b/src/core/lib/surface/server.cc
@@ -59,8 +59,7 @@ typedef struct registered_method registered_method;
typedef enum { BATCH_CALL, REGISTERED_CALL } requested_call_type;
-grpc_core::Tracer grpc_server_channel_trace
- (false, "server_channel");
+grpc_core::Tracer grpc_server_channel_trace(false, "server_channel");
typedef struct requested_call {
requested_call_type type;
diff --git a/src/core/lib/transport/bdp_estimator.cc b/src/core/lib/transport/bdp_estimator.cc
index 82fcb9e562..6eb2f54864 100644
--- a/src/core/lib/transport/bdp_estimator.cc
+++ b/src/core/lib/transport/bdp_estimator.cc
@@ -23,8 +23,7 @@
#include <grpc/support/useful.h>
-grpc_core::Tracer grpc_bdp_estimator_trace
- (false, "bdp_estimator");
+grpc_core::Tracer grpc_bdp_estimator_trace(false, "bdp_estimator");
namespace grpc_core {
diff --git a/src/core/lib/transport/connectivity_state.cc b/src/core/lib/transport/connectivity_state.cc
index cf95a3c469..f9e8185555 100644
--- a/src/core/lib/transport/connectivity_state.cc
+++ b/src/core/lib/transport/connectivity_state.cc
@@ -24,8 +24,7 @@
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
-grpc_core::Tracer grpc_connectivity_state_trace
- (false, "connectivity_state");
+grpc_core::Tracer grpc_connectivity_state_trace(false, "connectivity_state");
const char *grpc_connectivity_state_name(grpc_connectivity_state state) {
switch (state) {
diff --git a/src/core/lib/transport/metadata.cc b/src/core/lib/transport/metadata.cc
index a138d59f9d..99eccba34e 100644
--- a/src/core/lib/transport/metadata.cc
+++ b/src/core/lib/transport/metadata.cc
@@ -49,8 +49,7 @@
*/
#ifndef NDEBUG
-grpc_core::Tracer grpc_trace_metadata
- (false, "metadata");
+grpc_core::Tracer grpc_trace_metadata(false, "metadata");
#define DEBUG_ARGS , const char *file, int line
#define FWD_DEBUG_ARGS , file, line
#define REF_MD_LOCKED(shard, s) ref_md_locked((shard), (s), __FILE__, __LINE__)
diff --git a/src/core/lib/transport/transport.cc b/src/core/lib/transport/transport.cc
index e75524d07d..4055e9c881 100644
--- a/src/core/lib/transport/transport.cc
+++ b/src/core/lib/transport/transport.cc
@@ -32,8 +32,7 @@
#include "src/core/lib/transport/transport_impl.h"
#ifndef NDEBUG
-grpc_core::Tracer grpc_trace_stream_refcount
- (false, "stream_refcount");
+grpc_core::Tracer grpc_trace_stream_refcount(false, "stream_refcount");
#endif
#ifndef NDEBUG