Merge pull request #19315 from soheilhy/trace-flags

Convert TraceFlags in the hot path to DebugTraceFlags.
pull/18091/head
Soheil Hassas Yeganeh 6 years ago committed by GitHub
commit 79a2e1e2fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      doc/environment_variables.md
  2. 2
      src/core/lib/iomgr/call_combiner.cc
  3. 2
      src/core/lib/iomgr/call_combiner.h
  4. 6
      src/core/lib/iomgr/ev_posix.cc
  5. 5
      src/core/lib/iomgr/ev_posix.h
  6. 4
      src/core/lib/iomgr/ev_windows.cc
  7. 2
      src/core/lib/iomgr/lockfree_event.cc

@ -39,7 +39,6 @@ some configuration as environment variables that can be set.
gRPC C core is processing requests via debug logs. Available tracers include:
- api - traces api calls to the C core
- bdp_estimator - traces behavior of bdp estimation logic
- call_combiner - traces call combiner state
- call_error - traces the possible errors contributing to final call status
- cares_resolver - traces operations of the c-ares based DNS resolver
- cares_address_sorting - traces operations of the c-ares based DNS
@ -52,9 +51,6 @@ some configuration as environment variables that can be set.
- connectivity_state - traces connectivity state changes to channels
- cronet - traces state in the cronet transport engine
- executor - traces grpc's internal thread pool ('the executor')
- fd_trace - traces fd create(), shutdown() and close() calls for channel fds.
Also traces epoll fd create()/close() calls in epollex polling engine
traces epoll-fd creation/close calls for epollex polling engine
- glb - traces the grpclb load balancer
- handshaker - traces handshaking state
- health_check_client - traces health checking client code
@ -86,7 +82,11 @@ some configuration as environment variables that can be set.
- alarm_refcount - refcounting traces for grpc_alarm structure
- metadata - tracks creation and mutation of metadata
- combiner - traces combiner lock state
- call_combiner - traces call combiner state
- closure - tracks closure creation, scheduling, and completion
- fd_trace - traces fd create(), shutdown() and close() calls for channel fds.
Also traces epoll fd create()/close() calls in epollex polling engine
traces epoll-fd creation/close calls for epollex polling engine
- pending_tags - traces still-in-progress tags on completion queues
- polling - traces the selected polling engine
- polling_api - traces the api calls to polling engine

@ -28,7 +28,7 @@
namespace grpc_core {
TraceFlag grpc_call_combiner_trace(false, "call_combiner");
DebugOnlyTraceFlag grpc_call_combiner_trace(false, "call_combiner");
namespace {

@ -43,7 +43,7 @@
namespace grpc_core {
extern TraceFlag grpc_call_combiner_trace;
extern DebugOnlyTraceFlag grpc_call_combiner_trace;
class CallCombiner {
public:

@ -44,11 +44,11 @@ GPR_GLOBAL_CONFIG_DEFINE_STRING(
"This is a comma-separated list of engines, which are tried in priority "
"order first -> last.")
grpc_core::TraceFlag grpc_polling_trace(false,
"polling"); /* Disabled by default */
grpc_core::DebugOnlyTraceFlag grpc_polling_trace(
false, "polling"); /* Disabled by default */
/* Traces fd create/close operations */
grpc_core::TraceFlag grpc_fd_trace(false, "fd_trace");
grpc_core::DebugOnlyTraceFlag grpc_fd_trace(false, "fd_trace");
grpc_core::DebugOnlyTraceFlag grpc_trace_fd_refcount(false, "fd_refcount");
grpc_core::DebugOnlyTraceFlag grpc_polling_api_trace(false, "polling_api");

@ -32,8 +32,9 @@
GPR_GLOBAL_CONFIG_DECLARE_STRING(grpc_poll_strategy);
extern grpc_core::TraceFlag grpc_fd_trace; /* Disabled by default */
extern grpc_core::TraceFlag grpc_polling_trace; /* Disabled by default */
extern grpc_core::DebugOnlyTraceFlag grpc_fd_trace; /* Disabled by default */
extern grpc_core::DebugOnlyTraceFlag
grpc_polling_trace; /* Disabled by default */
#define GRPC_FD_TRACE(format, ...) \
if (GRPC_TRACE_FLAG_ENABLED(grpc_fd_trace)) { \

@ -24,7 +24,7 @@
#include "src/core/lib/debug/trace.h"
grpc_core::TraceFlag grpc_polling_trace(false,
"polling"); /* Disabled by default */
grpc_core::DebugOnlyTraceFlag grpc_polling_trace(
false, "polling"); /* Disabled by default */
#endif // GRPC_WINSOCK_SOCKET

@ -24,7 +24,7 @@
#include "src/core/lib/debug/trace.h"
extern grpc_core::TraceFlag grpc_polling_trace;
extern grpc_core::DebugOnlyTraceFlag grpc_polling_trace;
/* 'state' holds the to call when the fd is readable or writable respectively.
It can contain one of the following values:

Loading…
Cancel
Save