aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/debug
diff options
context:
space:
mode:
authorGravatar ncteisen <ncteisen@gmail.com>2017-11-10 12:23:12 -0800
committerGravatar ncteisen <ncteisen@gmail.com>2017-11-10 12:23:12 -0800
commit72afb76f5e64a2dc43a40e544821be3119d7702d (patch)
treee59632295d408ec8a3b56c9b0f363cd11b34d5e8 /src/core/lib/debug
parentdfd16dd154e2f8ae42f002db396574002eb257f8 (diff)
parent67520b0ffd78f4bf1c73b360204382b0f4197852 (diff)
Merge branch 'master' of https://github.com/grpc/grpc into tracing++
Lot's of manual work to make this merge work
Diffstat (limited to 'src/core/lib/debug')
-rw-r--r--src/core/lib/debug/stats.cc36
-rw-r--r--src/core/lib/debug/stats.h18
-rw-r--r--src/core/lib/debug/stats_data.cc47
-rw-r--r--src/core/lib/debug/stats_data.h38
-rw-r--r--src/core/lib/debug/trace.h2
5 files changed, 73 insertions, 68 deletions
diff --git a/src/core/lib/debug/stats.cc b/src/core/lib/debug/stats.cc
index 4096384dd9..b32cf19028 100644
--- a/src/core/lib/debug/stats.cc
+++ b/src/core/lib/debug/stats.cc
@@ -27,18 +27,18 @@
#include "src/core/lib/support/string.h"
-grpc_stats_data *grpc_stats_per_cpu_storage = NULL;
+grpc_stats_data* grpc_stats_per_cpu_storage = NULL;
static size_t g_num_cores;
void grpc_stats_init(void) {
g_num_cores = GPR_MAX(1, gpr_cpu_num_cores());
grpc_stats_per_cpu_storage =
- (grpc_stats_data *)gpr_zalloc(sizeof(grpc_stats_data) * g_num_cores);
+ (grpc_stats_data*)gpr_zalloc(sizeof(grpc_stats_data) * g_num_cores);
}
void grpc_stats_shutdown(void) { gpr_free(grpc_stats_per_cpu_storage); }
-void grpc_stats_collect(grpc_stats_data *output) {
+void grpc_stats_collect(grpc_stats_data* output) {
memset(output, 0, sizeof(*output));
for (size_t core = 0; core < g_num_cores; core++) {
for (size_t i = 0; i < GRPC_STATS_COUNTER_COUNT; i++) {
@@ -52,8 +52,8 @@ void grpc_stats_collect(grpc_stats_data *output) {
}
}
-void grpc_stats_diff(const grpc_stats_data *b, const grpc_stats_data *a,
- grpc_stats_data *c) {
+void grpc_stats_diff(const grpc_stats_data* b, const grpc_stats_data* a,
+ grpc_stats_data* c) {
for (size_t i = 0; i < GRPC_STATS_COUNTER_COUNT; i++) {
c->counters[i] = b->counters[i] - a->counters[i];
}
@@ -62,13 +62,13 @@ void grpc_stats_diff(const grpc_stats_data *b, const grpc_stats_data *a,
}
}
-int grpc_stats_histo_find_bucket_slow(grpc_exec_ctx *exec_ctx, int value,
- const int *table, int table_size) {
+int grpc_stats_histo_find_bucket_slow(grpc_exec_ctx* exec_ctx, int value,
+ const int* table, int table_size) {
GRPC_STATS_INC_HISTOGRAM_SLOW_LOOKUPS(exec_ctx);
- const int *const start = table;
+ const int* const start = table;
while (table_size > 0) {
int step = table_size / 2;
- const int *it = table + step;
+ const int* it = table + step;
if (value >= *it) {
table = it + 1;
table_size -= step + 1;
@@ -79,7 +79,7 @@ int grpc_stats_histo_find_bucket_slow(grpc_exec_ctx *exec_ctx, int value,
return (int)(table - start) - 1;
}
-size_t grpc_stats_histo_count(const grpc_stats_data *stats,
+size_t grpc_stats_histo_count(const grpc_stats_data* stats,
grpc_stats_histograms histogram) {
size_t sum = 0;
for (int i = 0; i < grpc_stats_histo_buckets[histogram]; i++) {
@@ -88,8 +88,8 @@ size_t grpc_stats_histo_count(const grpc_stats_data *stats,
return sum;
}
-static double threshold_for_count_below(const gpr_atm *bucket_counts,
- const int *bucket_boundaries,
+static double threshold_for_count_below(const gpr_atm* bucket_counts,
+ const int* bucket_boundaries,
int num_buckets, double count_below) {
double count_so_far;
double lower_bound;
@@ -119,13 +119,13 @@ static double threshold_for_count_below(const gpr_atm *bucket_counts,
should lie */
lower_bound = bucket_boundaries[lower_idx];
upper_bound = bucket_boundaries[lower_idx + 1];
- return upper_bound -
- (upper_bound - lower_bound) * (count_so_far - count_below) /
- (double)bucket_counts[lower_idx];
+ return upper_bound - (upper_bound - lower_bound) *
+ (count_so_far - count_below) /
+ (double)bucket_counts[lower_idx];
}
}
-double grpc_stats_histo_percentile(const grpc_stats_data *stats,
+double grpc_stats_histo_percentile(const grpc_stats_data* stats,
grpc_stats_histograms histogram,
double percentile) {
size_t count = grpc_stats_histo_count(stats, histogram);
@@ -136,9 +136,9 @@ double grpc_stats_histo_percentile(const grpc_stats_data *stats,
grpc_stats_histo_buckets[histogram], (double)count * percentile / 100.0);
}
-char *grpc_stats_data_as_json(const grpc_stats_data *data) {
+char* grpc_stats_data_as_json(const grpc_stats_data* data) {
gpr_strvec v;
- char *tmp;
+ char* tmp;
bool is_first = true;
gpr_strvec_init(&v);
gpr_strvec_add(&v, gpr_strdup("{"));
diff --git a/src/core/lib/debug/stats.h b/src/core/lib/debug/stats.h
index fec1d651e6..1c19e72345 100644
--- a/src/core/lib/debug/stats.h
+++ b/src/core/lib/debug/stats.h
@@ -32,7 +32,7 @@ typedef struct grpc_stats_data {
gpr_atm histograms[GRPC_STATS_HISTOGRAM_BUCKETS];
} grpc_stats_data;
-extern grpc_stats_data *grpc_stats_per_cpu_storage;
+extern grpc_stats_data* grpc_stats_per_cpu_storage;
#define GRPC_THREAD_STATS_DATA(exec_ctx) \
(&grpc_stats_per_cpu_storage[(exec_ctx)->starting_cpu])
@@ -49,17 +49,17 @@ extern grpc_stats_data *grpc_stats_per_cpu_storage;
void grpc_stats_init(void);
void grpc_stats_shutdown(void);
-void grpc_stats_collect(grpc_stats_data *output);
+void grpc_stats_collect(grpc_stats_data* output);
// c = b-a
-void grpc_stats_diff(const grpc_stats_data *b, const grpc_stats_data *a,
- grpc_stats_data *c);
-char *grpc_stats_data_as_json(const grpc_stats_data *data);
-int grpc_stats_histo_find_bucket_slow(grpc_exec_ctx *exec_ctx, int value,
- const int *table, int table_size);
-double grpc_stats_histo_percentile(const grpc_stats_data *data,
+void grpc_stats_diff(const grpc_stats_data* b, const grpc_stats_data* a,
+ grpc_stats_data* c);
+char* grpc_stats_data_as_json(const grpc_stats_data* data);
+int grpc_stats_histo_find_bucket_slow(grpc_exec_ctx* exec_ctx, int value,
+ const int* table, int table_size);
+double grpc_stats_histo_percentile(const grpc_stats_data* data,
grpc_stats_histograms histogram,
double percentile);
-size_t grpc_stats_histo_count(const grpc_stats_data *data,
+size_t grpc_stats_histo_count(const grpc_stats_data* data,
grpc_stats_histograms histogram);
#ifdef __cplusplus
diff --git a/src/core/lib/debug/stats_data.cc b/src/core/lib/debug/stats_data.cc
index 5d737c56cb..17e15f4cfb 100644
--- a/src/core/lib/debug/stats_data.cc
+++ b/src/core/lib/debug/stats_data.cc
@@ -22,7 +22,7 @@
#include <grpc/support/useful.h>
#include "src/core/lib/debug/stats.h"
#include "src/core/lib/iomgr/exec_ctx.h"
-const char *grpc_stats_counter_name[GRPC_STATS_COUNTER_COUNT] = {
+const char* grpc_stats_counter_name[GRPC_STATS_COUNTER_COUNT] = {
"client_calls_created",
"server_calls_created",
"cqs_created",
@@ -120,11 +120,13 @@ const char *grpc_stats_counter_name[GRPC_STATS_COUNTER_COUNT] = {
"cq_ev_queue_trylock_successes",
"cq_ev_queue_transient_pop_failures",
};
-const char *grpc_stats_counter_doc[GRPC_STATS_COUNTER_COUNT] = {
+const char* grpc_stats_counter_doc[GRPC_STATS_COUNTER_COUNT] = {
"Number of client side calls created by this process",
"Number of server side calls created by this process",
- "Number of completion queues created", "Number of client channels created",
- "Number of client subchannels created", "Number of server channels created",
+ "Number of completion queues created",
+ "Number of client channels created",
+ "Number of client subchannels created",
+ "Number of server channels created",
"Number of polling syscalls (epoll_wait, poll, etc) made by this process",
"Number of sleeping syscalls made by this process",
"How many polling wakeups were performed by the process (only valid for "
@@ -154,7 +156,8 @@ const char *grpc_stats_counter_doc[GRPC_STATS_COUNTER_COUNT] = {
"Number of batches containing receive initial metadata",
"Number of batches containing receive message",
"Number of batches containing receive trailing metadata",
- "Number of settings frames sent", "Number of HTTP2 pings sent by process",
+ "Number of settings frames sent",
+ "Number of HTTP2 pings sent by process",
"Number of HTTP2 writes initiated",
"Number of HTTP2 writes offloaded to the executor from application threads",
"Number of HTTP2 writes that finished seeing more data needed to be "
@@ -241,7 +244,7 @@ const char *grpc_stats_counter_doc[GRPC_STATS_COUNTER_COUNT] = {
"Number of times NULL was popped out of completion queue's event queue "
"even though the event queue was not empty",
};
-const char *grpc_stats_histogram_name[GRPC_STATS_HISTOGRAM_COUNT] = {
+const char* grpc_stats_histogram_name[GRPC_STATS_HISTOGRAM_COUNT] = {
"call_initial_size",
"poll_events_returned",
"tcp_write_size",
@@ -256,7 +259,7 @@ const char *grpc_stats_histogram_name[GRPC_STATS_HISTOGRAM_COUNT] = {
"http2_send_flowctl_per_write",
"server_cqs_checked",
};
-const char *grpc_stats_histogram_doc[GRPC_STATS_HISTOGRAM_COUNT] = {
+const char* grpc_stats_histogram_doc[GRPC_STATS_HISTOGRAM_COUNT] = {
"Initial size of the grpc_call arena created at call start",
"How many events are called for each syscall_poll",
"Number of bytes offered to each syscall_write",
@@ -339,7 +342,7 @@ const uint8_t grpc_stats_table_7[102] = {
42, 42, 43, 44, 44, 45, 46, 46, 47, 48, 48, 49, 49, 50, 50, 51, 51};
const int grpc_stats_table_8[9] = {0, 1, 2, 4, 7, 13, 23, 39, 64};
const uint8_t grpc_stats_table_9[9] = {0, 0, 1, 2, 2, 3, 4, 4, 5};
-void grpc_stats_inc_call_initial_size(grpc_exec_ctx *exec_ctx, int value) {
+void grpc_stats_inc_call_initial_size(grpc_exec_ctx* exec_ctx, int value) {
value = GPR_CLAMP(value, 0, 262144);
if (value < 6) {
GRPC_STATS_INC_HISTOGRAM((exec_ctx), GRPC_STATS_HISTOGRAM_CALL_INITIAL_SIZE,
@@ -364,7 +367,7 @@ void grpc_stats_inc_call_initial_size(grpc_exec_ctx *exec_ctx, int value) {
grpc_stats_histo_find_bucket_slow(
(exec_ctx), value, grpc_stats_table_0, 64));
}
-void grpc_stats_inc_poll_events_returned(grpc_exec_ctx *exec_ctx, int value) {
+void grpc_stats_inc_poll_events_returned(grpc_exec_ctx* exec_ctx, int value) {
value = GPR_CLAMP(value, 0, 1024);
if (value < 29) {
GRPC_STATS_INC_HISTOGRAM((exec_ctx),
@@ -390,7 +393,7 @@ void grpc_stats_inc_poll_events_returned(grpc_exec_ctx *exec_ctx, int value) {
grpc_stats_histo_find_bucket_slow(
(exec_ctx), value, grpc_stats_table_2, 128));
}
-void grpc_stats_inc_tcp_write_size(grpc_exec_ctx *exec_ctx, int value) {
+void grpc_stats_inc_tcp_write_size(grpc_exec_ctx* exec_ctx, int value) {
value = GPR_CLAMP(value, 0, 16777216);
if (value < 5) {
GRPC_STATS_INC_HISTOGRAM((exec_ctx), GRPC_STATS_HISTOGRAM_TCP_WRITE_SIZE,
@@ -415,7 +418,7 @@ void grpc_stats_inc_tcp_write_size(grpc_exec_ctx *exec_ctx, int value) {
grpc_stats_histo_find_bucket_slow(
(exec_ctx), value, grpc_stats_table_4, 64));
}
-void grpc_stats_inc_tcp_write_iov_size(grpc_exec_ctx *exec_ctx, int value) {
+void grpc_stats_inc_tcp_write_iov_size(grpc_exec_ctx* exec_ctx, int value) {
value = GPR_CLAMP(value, 0, 1024);
if (value < 13) {
GRPC_STATS_INC_HISTOGRAM((exec_ctx),
@@ -440,7 +443,7 @@ void grpc_stats_inc_tcp_write_iov_size(grpc_exec_ctx *exec_ctx, int value) {
grpc_stats_histo_find_bucket_slow(
(exec_ctx), value, grpc_stats_table_6, 64));
}
-void grpc_stats_inc_tcp_read_size(grpc_exec_ctx *exec_ctx, int value) {
+void grpc_stats_inc_tcp_read_size(grpc_exec_ctx* exec_ctx, int value) {
value = GPR_CLAMP(value, 0, 16777216);
if (value < 5) {
GRPC_STATS_INC_HISTOGRAM((exec_ctx), GRPC_STATS_HISTOGRAM_TCP_READ_SIZE,
@@ -465,7 +468,7 @@ void grpc_stats_inc_tcp_read_size(grpc_exec_ctx *exec_ctx, int value) {
grpc_stats_histo_find_bucket_slow(
(exec_ctx), value, grpc_stats_table_4, 64));
}
-void grpc_stats_inc_tcp_read_offer(grpc_exec_ctx *exec_ctx, int value) {
+void grpc_stats_inc_tcp_read_offer(grpc_exec_ctx* exec_ctx, int value) {
value = GPR_CLAMP(value, 0, 16777216);
if (value < 5) {
GRPC_STATS_INC_HISTOGRAM((exec_ctx), GRPC_STATS_HISTOGRAM_TCP_READ_OFFER,
@@ -490,7 +493,7 @@ void grpc_stats_inc_tcp_read_offer(grpc_exec_ctx *exec_ctx, int value) {
grpc_stats_histo_find_bucket_slow(
(exec_ctx), value, grpc_stats_table_4, 64));
}
-void grpc_stats_inc_tcp_read_offer_iov_size(grpc_exec_ctx *exec_ctx,
+void grpc_stats_inc_tcp_read_offer_iov_size(grpc_exec_ctx* exec_ctx,
int value) {
value = GPR_CLAMP(value, 0, 1024);
if (value < 13) {
@@ -517,7 +520,7 @@ void grpc_stats_inc_tcp_read_offer_iov_size(grpc_exec_ctx *exec_ctx,
grpc_stats_histo_find_bucket_slow(
(exec_ctx), value, grpc_stats_table_6, 64));
}
-void grpc_stats_inc_http2_send_message_size(grpc_exec_ctx *exec_ctx,
+void grpc_stats_inc_http2_send_message_size(grpc_exec_ctx* exec_ctx,
int value) {
value = GPR_CLAMP(value, 0, 16777216);
if (value < 5) {
@@ -545,7 +548,7 @@ void grpc_stats_inc_http2_send_message_size(grpc_exec_ctx *exec_ctx,
(exec_ctx), value, grpc_stats_table_4, 64));
}
void grpc_stats_inc_http2_send_initial_metadata_per_write(
- grpc_exec_ctx *exec_ctx, int value) {
+ grpc_exec_ctx* exec_ctx, int value) {
value = GPR_CLAMP(value, 0, 1024);
if (value < 13) {
GRPC_STATS_INC_HISTOGRAM(
@@ -573,7 +576,7 @@ void grpc_stats_inc_http2_send_initial_metadata_per_write(
grpc_stats_histo_find_bucket_slow((exec_ctx), value, grpc_stats_table_6,
64));
}
-void grpc_stats_inc_http2_send_message_per_write(grpc_exec_ctx *exec_ctx,
+void grpc_stats_inc_http2_send_message_per_write(grpc_exec_ctx* exec_ctx,
int value) {
value = GPR_CLAMP(value, 0, 1024);
if (value < 13) {
@@ -601,7 +604,7 @@ void grpc_stats_inc_http2_send_message_per_write(grpc_exec_ctx *exec_ctx,
(exec_ctx), value, grpc_stats_table_6, 64));
}
void grpc_stats_inc_http2_send_trailing_metadata_per_write(
- grpc_exec_ctx *exec_ctx, int value) {
+ grpc_exec_ctx* exec_ctx, int value) {
value = GPR_CLAMP(value, 0, 1024);
if (value < 13) {
GRPC_STATS_INC_HISTOGRAM(
@@ -629,7 +632,7 @@ void grpc_stats_inc_http2_send_trailing_metadata_per_write(
grpc_stats_histo_find_bucket_slow((exec_ctx), value, grpc_stats_table_6,
64));
}
-void grpc_stats_inc_http2_send_flowctl_per_write(grpc_exec_ctx *exec_ctx,
+void grpc_stats_inc_http2_send_flowctl_per_write(grpc_exec_ctx* exec_ctx,
int value) {
value = GPR_CLAMP(value, 0, 1024);
if (value < 13) {
@@ -656,7 +659,7 @@ void grpc_stats_inc_http2_send_flowctl_per_write(grpc_exec_ctx *exec_ctx,
grpc_stats_histo_find_bucket_slow(
(exec_ctx), value, grpc_stats_table_6, 64));
}
-void grpc_stats_inc_server_cqs_checked(grpc_exec_ctx *exec_ctx, int value) {
+void grpc_stats_inc_server_cqs_checked(grpc_exec_ctx* exec_ctx, int value) {
value = GPR_CLAMP(value, 0, 64);
if (value < 3) {
GRPC_STATS_INC_HISTOGRAM((exec_ctx),
@@ -685,13 +688,13 @@ const int grpc_stats_histo_buckets[13] = {64, 128, 64, 64, 64, 64, 64,
64, 64, 64, 64, 64, 8};
const int grpc_stats_histo_start[13] = {0, 64, 192, 256, 320, 384, 448,
512, 576, 640, 704, 768, 832};
-const int *const grpc_stats_histo_bucket_boundaries[13] = {
+const int* const grpc_stats_histo_bucket_boundaries[13] = {
grpc_stats_table_0, grpc_stats_table_2, grpc_stats_table_4,
grpc_stats_table_6, grpc_stats_table_4, grpc_stats_table_4,
grpc_stats_table_6, grpc_stats_table_4, grpc_stats_table_6,
grpc_stats_table_6, grpc_stats_table_6, grpc_stats_table_6,
grpc_stats_table_8};
-void (*const grpc_stats_inc_histogram[13])(grpc_exec_ctx *exec_ctx, int x) = {
+void (*const grpc_stats_inc_histogram[13])(grpc_exec_ctx* exec_ctx, int x) = {
grpc_stats_inc_call_initial_size,
grpc_stats_inc_poll_events_returned,
grpc_stats_inc_tcp_write_size,
diff --git a/src/core/lib/debug/stats_data.h b/src/core/lib/debug/stats_data.h
index 031942df5c..fbfcce83ba 100644
--- a/src/core/lib/debug/stats_data.h
+++ b/src/core/lib/debug/stats_data.h
@@ -127,8 +127,8 @@ typedef enum {
GRPC_STATS_COUNTER_CQ_EV_QUEUE_TRANSIENT_POP_FAILURES,
GRPC_STATS_COUNTER_COUNT
} grpc_stats_counters;
-extern const char *grpc_stats_counter_name[GRPC_STATS_COUNTER_COUNT];
-extern const char *grpc_stats_counter_doc[GRPC_STATS_COUNTER_COUNT];
+extern const char* grpc_stats_counter_name[GRPC_STATS_COUNTER_COUNT];
+extern const char* grpc_stats_counter_doc[GRPC_STATS_COUNTER_COUNT];
typedef enum {
GRPC_STATS_HISTOGRAM_CALL_INITIAL_SIZE,
GRPC_STATS_HISTOGRAM_POLL_EVENTS_RETURNED,
@@ -145,8 +145,8 @@ typedef enum {
GRPC_STATS_HISTOGRAM_SERVER_CQS_CHECKED,
GRPC_STATS_HISTOGRAM_COUNT
} grpc_stats_histograms;
-extern const char *grpc_stats_histogram_name[GRPC_STATS_HISTOGRAM_COUNT];
-extern const char *grpc_stats_histogram_doc[GRPC_STATS_HISTOGRAM_COUNT];
+extern const char* grpc_stats_histogram_name[GRPC_STATS_HISTOGRAM_COUNT];
+extern const char* grpc_stats_histogram_doc[GRPC_STATS_HISTOGRAM_COUNT];
typedef enum {
GRPC_STATS_HISTOGRAM_CALL_INITIAL_SIZE_FIRST_SLOT = 0,
GRPC_STATS_HISTOGRAM_CALL_INITIAL_SIZE_BUCKETS = 64,
@@ -454,52 +454,52 @@ typedef enum {
(exec_ctx), GRPC_STATS_COUNTER_CQ_EV_QUEUE_TRANSIENT_POP_FAILURES)
#define GRPC_STATS_INC_CALL_INITIAL_SIZE(exec_ctx, value) \
grpc_stats_inc_call_initial_size((exec_ctx), (int)(value))
-void grpc_stats_inc_call_initial_size(grpc_exec_ctx *exec_ctx, int x);
+void grpc_stats_inc_call_initial_size(grpc_exec_ctx* exec_ctx, int x);
#define GRPC_STATS_INC_POLL_EVENTS_RETURNED(exec_ctx, value) \
grpc_stats_inc_poll_events_returned((exec_ctx), (int)(value))
-void grpc_stats_inc_poll_events_returned(grpc_exec_ctx *exec_ctx, int x);
+void grpc_stats_inc_poll_events_returned(grpc_exec_ctx* exec_ctx, int x);
#define GRPC_STATS_INC_TCP_WRITE_SIZE(exec_ctx, value) \
grpc_stats_inc_tcp_write_size((exec_ctx), (int)(value))
-void grpc_stats_inc_tcp_write_size(grpc_exec_ctx *exec_ctx, int x);
+void grpc_stats_inc_tcp_write_size(grpc_exec_ctx* exec_ctx, int x);
#define GRPC_STATS_INC_TCP_WRITE_IOV_SIZE(exec_ctx, value) \
grpc_stats_inc_tcp_write_iov_size((exec_ctx), (int)(value))
-void grpc_stats_inc_tcp_write_iov_size(grpc_exec_ctx *exec_ctx, int x);
+void grpc_stats_inc_tcp_write_iov_size(grpc_exec_ctx* exec_ctx, int x);
#define GRPC_STATS_INC_TCP_READ_SIZE(exec_ctx, value) \
grpc_stats_inc_tcp_read_size((exec_ctx), (int)(value))
-void grpc_stats_inc_tcp_read_size(grpc_exec_ctx *exec_ctx, int x);
+void grpc_stats_inc_tcp_read_size(grpc_exec_ctx* exec_ctx, int x);
#define GRPC_STATS_INC_TCP_READ_OFFER(exec_ctx, value) \
grpc_stats_inc_tcp_read_offer((exec_ctx), (int)(value))
-void grpc_stats_inc_tcp_read_offer(grpc_exec_ctx *exec_ctx, int x);
+void grpc_stats_inc_tcp_read_offer(grpc_exec_ctx* exec_ctx, int x);
#define GRPC_STATS_INC_TCP_READ_OFFER_IOV_SIZE(exec_ctx, value) \
grpc_stats_inc_tcp_read_offer_iov_size((exec_ctx), (int)(value))
-void grpc_stats_inc_tcp_read_offer_iov_size(grpc_exec_ctx *exec_ctx, int x);
+void grpc_stats_inc_tcp_read_offer_iov_size(grpc_exec_ctx* exec_ctx, int x);
#define GRPC_STATS_INC_HTTP2_SEND_MESSAGE_SIZE(exec_ctx, value) \
grpc_stats_inc_http2_send_message_size((exec_ctx), (int)(value))
-void grpc_stats_inc_http2_send_message_size(grpc_exec_ctx *exec_ctx, int x);
+void grpc_stats_inc_http2_send_message_size(grpc_exec_ctx* exec_ctx, int x);
#define GRPC_STATS_INC_HTTP2_SEND_INITIAL_METADATA_PER_WRITE(exec_ctx, value) \
grpc_stats_inc_http2_send_initial_metadata_per_write((exec_ctx), (int)(value))
void grpc_stats_inc_http2_send_initial_metadata_per_write(
- grpc_exec_ctx *exec_ctx, int x);
+ grpc_exec_ctx* exec_ctx, int x);
#define GRPC_STATS_INC_HTTP2_SEND_MESSAGE_PER_WRITE(exec_ctx, value) \
grpc_stats_inc_http2_send_message_per_write((exec_ctx), (int)(value))
-void grpc_stats_inc_http2_send_message_per_write(grpc_exec_ctx *exec_ctx,
+void grpc_stats_inc_http2_send_message_per_write(grpc_exec_ctx* exec_ctx,
int x);
#define GRPC_STATS_INC_HTTP2_SEND_TRAILING_METADATA_PER_WRITE(exec_ctx, value) \
grpc_stats_inc_http2_send_trailing_metadata_per_write((exec_ctx), \
(int)(value))
void grpc_stats_inc_http2_send_trailing_metadata_per_write(
- grpc_exec_ctx *exec_ctx, int x);
+ grpc_exec_ctx* exec_ctx, int x);
#define GRPC_STATS_INC_HTTP2_SEND_FLOWCTL_PER_WRITE(exec_ctx, value) \
grpc_stats_inc_http2_send_flowctl_per_write((exec_ctx), (int)(value))
-void grpc_stats_inc_http2_send_flowctl_per_write(grpc_exec_ctx *exec_ctx,
+void grpc_stats_inc_http2_send_flowctl_per_write(grpc_exec_ctx* exec_ctx,
int x);
#define GRPC_STATS_INC_SERVER_CQS_CHECKED(exec_ctx, value) \
grpc_stats_inc_server_cqs_checked((exec_ctx), (int)(value))
-void grpc_stats_inc_server_cqs_checked(grpc_exec_ctx *exec_ctx, int x);
+void grpc_stats_inc_server_cqs_checked(grpc_exec_ctx* exec_ctx, int x);
extern const int grpc_stats_histo_buckets[13];
extern const int grpc_stats_histo_start[13];
-extern const int *const grpc_stats_histo_bucket_boundaries[13];
-extern void (*const grpc_stats_inc_histogram[13])(grpc_exec_ctx *exec_ctx,
+extern const int* const grpc_stats_histo_bucket_boundaries[13];
+extern void (*const grpc_stats_inc_histogram[13])(grpc_exec_ctx* exec_ctx,
int x);
#ifdef __cplusplus
diff --git a/src/core/lib/debug/trace.h b/src/core/lib/debug/trace.h
index f7a6005825..fe4c875ebb 100644
--- a/src/core/lib/debug/trace.h
+++ b/src/core/lib/debug/trace.h
@@ -51,6 +51,8 @@ class TraceFlag {
static bool Set(const char *tracer, bool enabled);
+ const char* name() const { return name_; }
+
bool enabled() {
#ifdef GRPC_THREADSAFE_TRACER
gpr_atm_no_barrier_load(&value_) != 0