clang format

pull/11727/head
ncteisen 8 years ago
parent 2e85f6891a
commit 7712c7c4d5
  1. 3
      src/core/ext/filters/client_channel/client_channel.c
  2. 3
      src/core/ext/filters/client_channel/lb_policy.c
  3. 3
      src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.c
  4. 3
      src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c
  5. 3
      src/core/ext/filters/client_channel/resolver.c
  6. 3
      src/core/ext/transport/chttp2/transport/chttp2_transport.c
  7. 2
      src/core/lib/debug/trace.h
  8. 3
      src/core/lib/iomgr/combiner.c
  9. 3
      src/core/lib/iomgr/error.c
  10. 3
      src/core/lib/iomgr/ev_posix.c
  11. 3
      src/core/lib/iomgr/pollset_uv.c
  12. 3
      src/core/lib/iomgr/pollset_windows.c
  13. 3
      src/core/lib/iomgr/resource_quota.c
  14. 3
      src/core/lib/iomgr/timer_generic.c
  15. 3
      src/core/lib/iomgr/timer_uv.c
  16. 3
      src/core/lib/security/transport/secure_endpoint.c
  17. 6
      src/core/lib/surface/call.c
  18. 15
      src/core/lib/surface/completion_queue.c
  19. 6
      src/core/lib/surface/init.c
  20. 6
      src/core/lib/surface/init_secure.c
  21. 3
      src/core/lib/surface/server.c
  22. 3
      src/core/lib/transport/bdp_estimator.c
  23. 3
      src/core/lib/transport/connectivity_state.c
  24. 3
      src/core/lib/transport/metadata.c
  25. 3
      src/core/lib/transport/transport.c

@ -52,7 +52,8 @@
/* Client channel implementation */ /* Client channel implementation */
grpc_tracer_flag grpc_client_channel_trace = GRPC_TRACER_INITIALIZER(false, "client_channel"); grpc_tracer_flag grpc_client_channel_trace =
GRPC_TRACER_INITIALIZER(false, "client_channel");
/************************************************************************* /*************************************************************************
* METHOD-CONFIG TABLE * METHOD-CONFIG TABLE

@ -22,7 +22,8 @@
#define WEAK_REF_BITS 16 #define WEAK_REF_BITS 16
#ifndef NDEBUG #ifndef NDEBUG
grpc_tracer_flag grpc_trace_lb_policy_refcount = GRPC_TRACER_INITIALIZER(false, "lb_policy_refcount"); grpc_tracer_flag grpc_trace_lb_policy_refcount =
GRPC_TRACER_INITIALIZER(false, "lb_policy_refcount");
#endif #endif
void grpc_lb_policy_init(grpc_lb_policy *policy, void grpc_lb_policy_init(grpc_lb_policy *policy,

@ -28,7 +28,8 @@
#include "src/core/lib/iomgr/sockaddr_utils.h" #include "src/core/lib/iomgr/sockaddr_utils.h"
#include "src/core/lib/transport/connectivity_state.h" #include "src/core/lib/transport/connectivity_state.h"
grpc_tracer_flag grpc_lb_pick_first_trace = GRPC_TRACER_INITIALIZER(false, "pick_first"); grpc_tracer_flag grpc_lb_pick_first_trace =
GRPC_TRACER_INITIALIZER(false, "pick_first");
typedef struct pending_pick { typedef struct pending_pick {
struct pending_pick *next; struct pending_pick *next;

@ -37,7 +37,8 @@
#include "src/core/lib/transport/connectivity_state.h" #include "src/core/lib/transport/connectivity_state.h"
#include "src/core/lib/transport/static_metadata.h" #include "src/core/lib/transport/static_metadata.h"
grpc_tracer_flag grpc_lb_round_robin_trace = GRPC_TRACER_INITIALIZER(false, "round_robin"); grpc_tracer_flag grpc_lb_round_robin_trace =
GRPC_TRACER_INITIALIZER(false, "round_robin");
/** List of entities waiting for a pick. /** List of entities waiting for a pick.
* *

@ -20,7 +20,8 @@
#include "src/core/lib/iomgr/combiner.h" #include "src/core/lib/iomgr/combiner.h"
#ifndef NDEBUG #ifndef NDEBUG
grpc_tracer_flag grpc_trace_resolver_refcount = GRPC_TRACER_INITIALIZER(false, "resolver_refcount"); grpc_tracer_flag grpc_trace_resolver_refcount =
GRPC_TRACER_INITIALIZER(false, "resolver_refcount");
#endif #endif
void grpc_resolver_init(grpc_resolver *resolver, void grpc_resolver_init(grpc_resolver *resolver,

@ -78,7 +78,8 @@ grpc_tracer_flag grpc_http_trace = GRPC_TRACER_INITIALIZER(false, "http");
grpc_tracer_flag grpc_flowctl_trace = GRPC_TRACER_INITIALIZER(false, "flowctl"); grpc_tracer_flag grpc_flowctl_trace = GRPC_TRACER_INITIALIZER(false, "flowctl");
#ifndef NDEBUG #ifndef NDEBUG
grpc_tracer_flag grpc_trace_chttp2_refcount = GRPC_TRACER_INITIALIZER(false, "chttp2_refcount"); grpc_tracer_flag grpc_trace_chttp2_refcount =
GRPC_TRACER_INITIALIZER(false, "chttp2_refcount");
#endif #endif
static const grpc_transport_vtable vtable; static const grpc_transport_vtable vtable;

@ -35,7 +35,7 @@ typedef struct {
#else #else
bool value; bool value;
#endif #endif
char* name; char *name;
} grpc_tracer_flag; } grpc_tracer_flag;
#ifdef GRPC_THREADSAFE_TRACER #ifdef GRPC_THREADSAFE_TRACER

@ -27,7 +27,8 @@
#include "src/core/lib/iomgr/executor.h" #include "src/core/lib/iomgr/executor.h"
#include "src/core/lib/profiling/timers.h" #include "src/core/lib/profiling/timers.h"
grpc_tracer_flag grpc_combiner_trace = GRPC_TRACER_INITIALIZER(false, "combiner"); grpc_tracer_flag grpc_combiner_trace =
GRPC_TRACER_INITIALIZER(false, "combiner");
#define GRPC_COMBINER_TRACE(fn) \ #define GRPC_COMBINER_TRACE(fn) \
do { \ do { \

@ -36,7 +36,8 @@
#include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/slice/slice_internal.h"
#ifndef NDEBUG #ifndef NDEBUG
grpc_tracer_flag grpc_trace_error_refcount = GRPC_TRACER_INITIALIZER(false, "error_refcount"); grpc_tracer_flag grpc_trace_error_refcount =
GRPC_TRACER_INITIALIZER(false, "error_refcount");
#endif #endif
static const char *error_int_name(grpc_error_ints key) { static const char *error_int_name(grpc_error_ints key) {

@ -42,7 +42,8 @@ grpc_tracer_flag grpc_polling_trace =
GRPC_TRACER_INITIALIZER(false, "polling"); /* Disabled by default */ GRPC_TRACER_INITIALIZER(false, "polling"); /* Disabled by default */
#ifndef NDEBUG #ifndef NDEBUG
grpc_tracer_flag grpc_trace_fd_refcount = GRPC_TRACER_INITIALIZER(false, "fd_refcount"); grpc_tracer_flag grpc_trace_fd_refcount =
GRPC_TRACER_INITIALIZER(false, "fd_refcount");
#endif #endif
/** Default poll() function - a pointer so that it can be overridden by some /** Default poll() function - a pointer so that it can be overridden by some

@ -34,7 +34,8 @@
#include "src/core/lib/debug/trace.h" #include "src/core/lib/debug/trace.h"
#ifndef NDEBUG #ifndef NDEBUG
grpc_tracer_flag grpc_trace_fd_refcount = GRPC_TRACER_INITIALIZER(false, "fd_refcount"); grpc_tracer_flag grpc_trace_fd_refcount =
GRPC_TRACER_INITIALIZER(false, "fd_refcount");
#endif #endif
struct grpc_pollset { struct grpc_pollset {

@ -31,7 +31,8 @@
#define GRPC_POLLSET_KICK_BROADCAST ((grpc_pollset_worker *)1) #define GRPC_POLLSET_KICK_BROADCAST ((grpc_pollset_worker *)1)
#ifndef NDEBUG #ifndef NDEBUG
grpc_tracer_flag grpc_trace_fd_refcount = GRPC_TRACER_INITIALIZER(false, "fd_refcount"); grpc_tracer_flag grpc_trace_fd_refcount =
GRPC_TRACER_INITIALIZER(false, "fd_refcount");
#endif #endif
gpr_mu grpc_polling_mu; gpr_mu grpc_polling_mu;

@ -29,7 +29,8 @@
#include "src/core/lib/iomgr/combiner.h" #include "src/core/lib/iomgr/combiner.h"
grpc_tracer_flag grpc_resource_quota_trace = GRPC_TRACER_INITIALIZER(false, "resource_quota"); grpc_tracer_flag grpc_resource_quota_trace =
GRPC_TRACER_INITIALIZER(false, "resource_quota");
#define MEMORY_USAGE_ESTIMATION_MAX 65536 #define MEMORY_USAGE_ESTIMATION_MAX 65536

@ -42,7 +42,8 @@
#define MAX_QUEUE_WINDOW_DURATION 1 #define MAX_QUEUE_WINDOW_DURATION 1
grpc_tracer_flag grpc_timer_trace = GRPC_TRACER_INITIALIZER(false, "timer"); grpc_tracer_flag grpc_timer_trace = GRPC_TRACER_INITIALIZER(false, "timer");
grpc_tracer_flag grpc_timer_check_trace = GRPC_TRACER_INITIALIZER(false, "timer_check"); grpc_tracer_flag grpc_timer_check_trace =
GRPC_TRACER_INITIALIZER(false, "timer_check");
/* A "timer shard". Contains a 'heap' and a 'list' of timers. All timers with /* A "timer shard". Contains a 'heap' and a 'list' of timers. All timers with
* deadlines earlier than 'queue_deadline" cap are maintained in the heap and * deadlines earlier than 'queue_deadline" cap are maintained in the heap and

@ -29,7 +29,8 @@
#include <uv.h> #include <uv.h>
grpc_tracer_flag grpc_timer_trace = GRPC_TRACER_INITIALIZER(false, "timer"); grpc_tracer_flag grpc_timer_trace = GRPC_TRACER_INITIALIZER(false, "timer");
grpc_tracer_flag grpc_timer_check_trace = GRPC_TRACER_INITIALIZER(false, "timer_check"); grpc_tracer_flag grpc_timer_check_trace =
GRPC_TRACER_INITIALIZER(false, "timer_check");
static void timer_close_callback(uv_handle_t *handle) { gpr_free(handle); } static void timer_close_callback(uv_handle_t *handle) { gpr_free(handle); }

@ -60,7 +60,8 @@ typedef struct {
gpr_refcount ref; gpr_refcount ref;
} secure_endpoint; } secure_endpoint;
grpc_tracer_flag grpc_trace_secure_endpoint = GRPC_TRACER_INITIALIZER(false, "secure_endpoint"); grpc_tracer_flag grpc_trace_secure_endpoint =
GRPC_TRACER_INITIALIZER(false, "secure_endpoint");
static void destroy(grpc_exec_ctx *exec_ctx, secure_endpoint *secure_ep) { static void destroy(grpc_exec_ctx *exec_ctx, secure_endpoint *secure_ep) {
secure_endpoint *ep = secure_ep; secure_endpoint *ep = secure_ep;

@ -229,8 +229,10 @@ struct grpc_call {
void *saved_receiving_stream_ready_bctlp; void *saved_receiving_stream_ready_bctlp;
}; };
grpc_tracer_flag grpc_call_error_trace = GRPC_TRACER_INITIALIZER(false, "call_error"); grpc_tracer_flag grpc_call_error_trace =
grpc_tracer_flag grpc_compression_trace = GRPC_TRACER_INITIALIZER(false, "compression"); GRPC_TRACER_INITIALIZER(false, "call_error");
grpc_tracer_flag grpc_compression_trace =
GRPC_TRACER_INITIALIZER(false, "compression");
#define CALL_STACK_FROM_CALL(call) ((grpc_call_stack *)((call) + 1)) #define CALL_STACK_FROM_CALL(call) ((grpc_call_stack *)((call) + 1))
#define CALL_FROM_CALL_STACK(call_stack) (((grpc_call *)(call_stack)) - 1) #define CALL_FROM_CALL_STACK(call_stack) (((grpc_call *)(call_stack)) - 1)

@ -35,10 +35,13 @@
#include "src/core/lib/surface/call.h" #include "src/core/lib/surface/call.h"
#include "src/core/lib/surface/event_string.h" #include "src/core/lib/surface/event_string.h"
grpc_tracer_flag grpc_trace_operation_failures = GRPC_TRACER_INITIALIZER(false, "op_failure"); grpc_tracer_flag grpc_trace_operation_failures =
GRPC_TRACER_INITIALIZER(false, "op_failure");
#ifndef NDEBUG #ifndef NDEBUG
grpc_tracer_flag grpc_trace_pending_tags = GRPC_TRACER_INITIALIZER(false, "pending_tags"); grpc_tracer_flag grpc_trace_pending_tags =
grpc_tracer_flag grpc_trace_cq_refcount = GRPC_TRACER_INITIALIZER(false, "cq_refcount"); GRPC_TRACER_INITIALIZER(false, "pending_tags");
grpc_tracer_flag grpc_trace_cq_refcount =
GRPC_TRACER_INITIALIZER(false, "cq_refcount");
#endif #endif
typedef struct { typedef struct {
@ -343,8 +346,10 @@ static const cq_vtable g_cq_vtable[] = {
#define POLLSET_FROM_CQ(cq) \ #define POLLSET_FROM_CQ(cq) \
((grpc_pollset *)(cq->vtable->data_size + (char *)DATA_FROM_CQ(cq))) ((grpc_pollset *)(cq->vtable->data_size + (char *)DATA_FROM_CQ(cq)))
grpc_tracer_flag grpc_cq_pluck_trace = GRPC_TRACER_INITIALIZER(true, "queue_pluck"); grpc_tracer_flag grpc_cq_pluck_trace =
grpc_tracer_flag grpc_cq_event_timeout_trace = GRPC_TRACER_INITIALIZER(true, "queue_timeout"); GRPC_TRACER_INITIALIZER(true, "queue_pluck");
grpc_tracer_flag grpc_cq_event_timeout_trace =
GRPC_TRACER_INITIALIZER(true, "queue_timeout");
#define GRPC_SURFACE_TRACE_RETURNED_EVENT(cq, event) \ #define GRPC_SURFACE_TRACE_RETURNED_EVENT(cq, event) \
if (GRPC_TRACER_ON(grpc_api_trace) && \ if (GRPC_TRACER_ON(grpc_api_trace) && \

@ -123,15 +123,13 @@ void grpc_init(void) {
grpc_register_tracer(&grpc_api_trace); grpc_register_tracer(&grpc_api_trace);
grpc_register_tracer(&grpc_trace_channel); grpc_register_tracer(&grpc_trace_channel);
grpc_register_tracer(&grpc_connectivity_state_trace); grpc_register_tracer(&grpc_connectivity_state_trace);
grpc_register_tracer( grpc_register_tracer(&grpc_trace_channel_stack_builder);
&grpc_trace_channel_stack_builder);
grpc_register_tracer(&grpc_http1_trace); grpc_register_tracer(&grpc_http1_trace);
grpc_register_tracer(&grpc_cq_pluck_trace); // default on grpc_register_tracer(&grpc_cq_pluck_trace); // default on
grpc_register_tracer(&grpc_combiner_trace); grpc_register_tracer(&grpc_combiner_trace);
grpc_register_tracer(&grpc_server_channel_trace); grpc_register_tracer(&grpc_server_channel_trace);
grpc_register_tracer(&grpc_bdp_estimator_trace); grpc_register_tracer(&grpc_bdp_estimator_trace);
grpc_register_tracer( grpc_register_tracer(&grpc_cq_event_timeout_trace); // default on
&grpc_cq_event_timeout_trace); // default on
grpc_register_tracer(&grpc_trace_operation_failures); grpc_register_tracer(&grpc_trace_operation_failures);
grpc_register_tracer(&grpc_resource_quota_trace); grpc_register_tracer(&grpc_resource_quota_trace);
grpc_register_tracer(&grpc_call_error_trace); grpc_register_tracer(&grpc_call_error_trace);

@ -40,10 +40,8 @@ void grpc_security_pre_init(void) {
grpc_register_tracer(&grpc_trace_secure_endpoint); grpc_register_tracer(&grpc_trace_secure_endpoint);
grpc_register_tracer(&tsi_tracing_enabled); grpc_register_tracer(&tsi_tracing_enabled);
#ifndef NDEBUG #ifndef NDEBUG
grpc_register_tracer( grpc_register_tracer(&grpc_trace_auth_context_refcount);
&grpc_trace_auth_context_refcount); grpc_register_tracer(&grpc_trace_security_connector_refcount);
grpc_register_tracer(
&grpc_trace_security_connector_refcount);
#endif #endif
} }

@ -58,7 +58,8 @@ typedef struct registered_method registered_method;
typedef enum { BATCH_CALL, REGISTERED_CALL } requested_call_type; typedef enum { BATCH_CALL, REGISTERED_CALL } requested_call_type;
grpc_tracer_flag grpc_server_channel_trace = GRPC_TRACER_INITIALIZER(false, "server_channel"); grpc_tracer_flag grpc_server_channel_trace =
GRPC_TRACER_INITIALIZER(false, "server_channel");
typedef struct requested_call { typedef struct requested_call {
requested_call_type type; requested_call_type type;

@ -23,7 +23,8 @@
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include <grpc/support/useful.h> #include <grpc/support/useful.h>
grpc_tracer_flag grpc_bdp_estimator_trace = GRPC_TRACER_INITIALIZER(false, "bdp_estimator"); grpc_tracer_flag grpc_bdp_estimator_trace =
GRPC_TRACER_INITIALIZER(false, "bdp_estimator");
void grpc_bdp_estimator_init(grpc_bdp_estimator *estimator, const char *name) { void grpc_bdp_estimator_init(grpc_bdp_estimator *estimator, const char *name) {
estimator->estimate = 65536; estimator->estimate = 65536;

@ -24,7 +24,8 @@
#include <grpc/support/log.h> #include <grpc/support/log.h>
#include <grpc/support/string_util.h> #include <grpc/support/string_util.h>
grpc_tracer_flag grpc_connectivity_state_trace = GRPC_TRACER_INITIALIZER(false, "connectivity_state"); grpc_tracer_flag grpc_connectivity_state_trace =
GRPC_TRACER_INITIALIZER(false, "connectivity_state");
const char *grpc_connectivity_state_name(grpc_connectivity_state state) { const char *grpc_connectivity_state_name(grpc_connectivity_state state) {
switch (state) { switch (state) {

@ -48,7 +48,8 @@
*/ */
#ifndef NDEBUG #ifndef NDEBUG
grpc_tracer_flag grpc_trace_metadata = GRPC_TRACER_INITIALIZER(false, "metadata"); grpc_tracer_flag grpc_trace_metadata =
GRPC_TRACER_INITIALIZER(false, "metadata");
#define DEBUG_ARGS , const char *file, int line #define DEBUG_ARGS , const char *file, int line
#define FWD_DEBUG_ARGS , file, line #define FWD_DEBUG_ARGS , file, line
#define REF_MD_LOCKED(shard, s) ref_md_locked((shard), (s), __FILE__, __LINE__) #define REF_MD_LOCKED(shard, s) ref_md_locked((shard), (s), __FILE__, __LINE__)

@ -32,7 +32,8 @@
#include "src/core/lib/transport/transport_impl.h" #include "src/core/lib/transport/transport_impl.h"
#ifndef NDEBUG #ifndef NDEBUG
grpc_tracer_flag grpc_trace_stream_refcount = GRPC_TRACER_INITIALIZER(false, "stream_refcount"); grpc_tracer_flag grpc_trace_stream_refcount =
GRPC_TRACER_INITIALIZER(false, "stream_refcount");
#endif #endif
#ifndef NDEBUG #ifndef NDEBUG

Loading…
Cancel
Save