diff options
author | 2017-04-10 16:19:18 -0700 | |
---|---|---|
committer | 2017-04-10 16:19:18 -0700 | |
commit | cd0354b851390a4db72a02f389d8dfcd7cc7e3fd (patch) | |
tree | 4d1e00cf37dd5e2d4aff4fe562acc83bdbbea296 /src/core/lib/iomgr/ev_posix.c | |
parent | 1814374c6958ca4a0a97f7a85e9cdcb7d5d30e82 (diff) |
Add tracer
Diffstat (limited to 'src/core/lib/iomgr/ev_posix.c')
-rw-r--r-- | src/core/lib/iomgr/ev_posix.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/lib/iomgr/ev_posix.c b/src/core/lib/iomgr/ev_posix.c index 2663152aec..a8252b0162 100644 --- a/src/core/lib/iomgr/ev_posix.c +++ b/src/core/lib/iomgr/ev_posix.c @@ -44,11 +44,14 @@ #include <grpc/support/string_util.h> #include <grpc/support/useful.h> +#include "src/core/lib/debug/trace.h" #include "src/core/lib/iomgr/ev_epoll_linux.h" #include "src/core/lib/iomgr/ev_epollex_linux.h" #include "src/core/lib/iomgr/ev_poll_posix.h" #include "src/core/lib/support/env.h" +int grpc_polling_trace = 0; /* Disabled by default */ + /** Default poll() function - a pointer so that it can be overridden by some * tests */ grpc_poll_function_type grpc_poll_function = poll; @@ -117,6 +120,8 @@ static void try_engine(const char *engine) { const char *grpc_get_poll_strategy_name() { return g_poll_strategy_name; } void grpc_event_engine_init(void) { + grpc_register_tracer("polling", &grpc_polling_trace); + char *s = gpr_getenv("GRPC_POLL_STRATEGY"); if (s == NULL) { s = gpr_strdup("all"); |