Document only epoll1 for these stats, add missing spot

pull/12370/head
Craig Tiller 7 years ago
parent ebacb2f20d
commit cf34fa58f4
  1. 14
      src/core/lib/debug/stats_data.c
  2. 6
      src/core/lib/debug/stats_data.yaml
  3. 8
      src/core/lib/iomgr/ev_epoll1_linux.c

@ -70,16 +70,18 @@ const char *grpc_stats_counter_doc[GRPC_STATS_COUNTER_COUNT] = {
"Number of server side calls created by this process", "Number of server side calls created by this process",
"Number of polling syscalls (epoll_wait, poll, etc) made by this process", "Number of polling syscalls (epoll_wait, poll, etc) made by this process",
"Number of sleeping syscalls made by this process", "Number of sleeping syscalls made by this process",
"How many polling wakeups were performed by the process", "How many polling wakeups were performed by the process (only valid for "
"How many times was a polling wakeup requested without an active poller", "epoll1 right now)",
"How many times was a polling wakeup requested without an active poller "
"(only valid for epoll1 right now)",
"How many times was the same polling worker awoken repeatedly before " "How many times was the same polling worker awoken repeatedly before "
"waking up", "waking up (only valid for epoll1 right now)",
"How many times was an eventfd used as the wakeup vector for a polling " "How many times was an eventfd used as the wakeup vector for a polling "
"wakeup", "wakeup (only valid for epoll1 right now)",
"How many times was a condition variable used as the wakeup vector for a " "How many times was a condition variable used as the wakeup vector for a "
"polling wakeup", "polling wakeup (only valid for epoll1 right now)",
"How many times could a polling wakeup be satisfied by keeping the waking " "How many times could a polling wakeup be satisfied by keeping the waking "
"thread awake?", "thread awake? (only valid for epoll1 right now)",
"Number of times histogram increments went through the slow (binary " "Number of times histogram increments went through the slow (binary "
"search) path", "search) path",
"Number of write syscalls (or equivalent - eg sendmsg) made by this " "Number of write syscalls (or equivalent - eg sendmsg) made by this "

@ -35,20 +35,26 @@
doc: How many events are called for each syscall_poll doc: How many events are called for each syscall_poll
- counter: pollset_kick - counter: pollset_kick
doc: How many polling wakeups were performed by the process doc: How many polling wakeups were performed by the process
(only valid for epoll1 right now)
- counter: pollset_kicked_without_poller - counter: pollset_kicked_without_poller
doc: How many times was a polling wakeup requested without an active poller doc: How many times was a polling wakeup requested without an active poller
(only valid for epoll1 right now)
- counter: pollset_kicked_again - counter: pollset_kicked_again
doc: How many times was the same polling worker awoken repeatedly before doc: How many times was the same polling worker awoken repeatedly before
waking up waking up
(only valid for epoll1 right now)
- counter: pollset_kick_wakeup_fd - counter: pollset_kick_wakeup_fd
doc: How many times was an eventfd used as the wakeup vector for a polling doc: How many times was an eventfd used as the wakeup vector for a polling
wakeup wakeup
(only valid for epoll1 right now)
- counter: pollset_kick_wakeup_cv - counter: pollset_kick_wakeup_cv
doc: How many times was a condition variable used as the wakeup vector for a doc: How many times was a condition variable used as the wakeup vector for a
polling wakeup polling wakeup
(only valid for epoll1 right now)
- counter: pollset_kick_own_thread - counter: pollset_kick_own_thread
doc: How many times could a polling wakeup be satisfied by keeping the waking doc: How many times could a polling wakeup be satisfied by keeping the waking
thread awake? thread awake?
(only valid for epoll1 right now)
# stats system # stats system
- counter: histogram_slow_lookups - counter: histogram_slow_lookups
doc: Number of times histogram increments went through the slow doc: Number of times histogram increments went through the slow

@ -789,7 +789,7 @@ static bool begin_worker(grpc_pollset *pollset, grpc_pollset_worker *worker,
} }
static bool check_neighbourhood_for_available_poller( static bool check_neighbourhood_for_available_poller(
pollset_neighbourhood *neighbourhood) { grpc_exec_ctx *exec_ctx, pollset_neighbourhood *neighbourhood) {
GPR_TIMER_BEGIN("check_neighbourhood_for_available_poller", 0); GPR_TIMER_BEGIN("check_neighbourhood_for_available_poller", 0);
bool found_worker = false; bool found_worker = false;
do { do {
@ -813,6 +813,7 @@ static bool check_neighbourhood_for_available_poller(
SET_KICK_STATE(inspect_worker, DESIGNATED_POLLER); SET_KICK_STATE(inspect_worker, DESIGNATED_POLLER);
if (inspect_worker->initialized_cv) { if (inspect_worker->initialized_cv) {
GPR_TIMER_MARK("signal worker", 0); GPR_TIMER_MARK("signal worker", 0);
GRPC_STATS_INC_POLLSET_KICK_WAKEUP_CV(exec_ctx);
gpr_cv_signal(&inspect_worker->cv); gpr_cv_signal(&inspect_worker->cv);
} }
} else { } else {
@ -891,7 +892,7 @@ static void end_worker(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
g_num_neighbourhoods]; g_num_neighbourhoods];
if (gpr_mu_trylock(&neighbourhood->mu)) { if (gpr_mu_trylock(&neighbourhood->mu)) {
found_worker = found_worker =
check_neighbourhood_for_available_poller(neighbourhood); check_neighbourhood_for_available_poller(exec_ctx, neighbourhood);
gpr_mu_unlock(&neighbourhood->mu); gpr_mu_unlock(&neighbourhood->mu);
scan_state[i] = true; scan_state[i] = true;
} else { } else {
@ -904,7 +905,8 @@ static void end_worker(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset,
&g_neighbourhoods[(poller_neighbourhood_idx + i) % &g_neighbourhoods[(poller_neighbourhood_idx + i) %
g_num_neighbourhoods]; g_num_neighbourhoods];
gpr_mu_lock(&neighbourhood->mu); gpr_mu_lock(&neighbourhood->mu);
found_worker = check_neighbourhood_for_available_poller(neighbourhood); found_worker =
check_neighbourhood_for_available_poller(exec_ctx, neighbourhood);
gpr_mu_unlock(&neighbourhood->mu); gpr_mu_unlock(&neighbourhood->mu);
} }
grpc_exec_ctx_flush(exec_ctx); grpc_exec_ctx_flush(exec_ctx);

Loading…
Cancel
Save