Merge remote-tracking branch 'upstream/master' into qps_driver to resolve conflicts.

pull/11787/head
Guantao Liu 7 years ago
commit e72b5d6ab8
  1. 37
      .github/CODEOWNERS
  2. 294
      BUILD
  3. 2
      CMakeLists.txt
  4. 12
      Makefile
  5. 7
      OWNERS
  6. 5
      bazel/OWNERS
  7. 5
      bazel/cc_grpc_library.bzl
  8. 8
      bazel/generate_cc.bzl
  9. 14
      bazel/grpc_build_system.bzl
  10. 2
      build.yaml
  11. 2
      cmake/OWNERS
  12. 2
      doc/OWNERS
  13. 7
      doc/environment_variables.md
  14. 2
      etc/OWNERS
  15. 2
      examples/BUILD
  16. 1
      examples/node/OWNERS
  17. 4
      include/OWNERS
  18. 2
      include/grpc++/impl/codegen/config_protobuf.h
  19. 110
      include/grpc++/impl/codegen/proto_utils.h
  20. 5
      include/grpc++/impl/codegen/status.h
  21. 4
      src/core/OWNERS
  22. 12
      src/core/ext/filters/client_channel/client_channel.c
  23. 4
      src/core/ext/filters/client_channel/client_channel_plugin.c
  24. 3
      src/core/ext/filters/client_channel/lb_policy.c
  25. 6
      src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c
  26. 5
      src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.c
  27. 5
      src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c
  28. 3
      src/core/ext/filters/client_channel/resolver.c
  29. 2
      src/core/ext/filters/http/http_filters_plugin.c
  30. 6
      src/core/ext/transport/chttp2/transport/chttp2_plugin.c
  31. 7
      src/core/ext/transport/chttp2/transport/chttp2_transport.c
  32. 2
      src/core/lib/channel/channel_stack.c
  33. 2
      src/core/lib/channel/channel_stack_builder.c
  34. 22
      src/core/lib/debug/trace.c
  35. 11
      src/core/lib/debug/trace.h
  36. 2
      src/core/lib/http/parser.c
  37. 1
      src/core/lib/iomgr/OWNERS
  38. 2
      src/core/lib/iomgr/closure.c
  39. 3
      src/core/lib/iomgr/combiner.c
  40. 3
      src/core/lib/iomgr/error.c
  41. 7
      src/core/lib/iomgr/ev_posix.c
  42. 2
      src/core/lib/iomgr/ev_windows.c
  43. 2
      src/core/lib/iomgr/iomgr_posix.c
  44. 2
      src/core/lib/iomgr/iomgr_uv.c
  45. 3
      src/core/lib/iomgr/pollset_uv.c
  46. 3
      src/core/lib/iomgr/pollset_windows.c
  47. 3
      src/core/lib/iomgr/resource_quota.c
  48. 2
      src/core/lib/iomgr/tcp_posix.c
  49. 2
      src/core/lib/iomgr/tcp_uv.c
  50. 2
      src/core/lib/iomgr/tcp_windows.c
  51. 9
      src/core/lib/iomgr/timer_generic.c
  52. 14
      src/core/lib/iomgr/timer_manager.c
  53. 5
      src/core/lib/iomgr/timer_uv.c
  54. 2
      src/core/lib/security/context/security_context.c
  55. 3
      src/core/lib/security/transport/secure_endpoint.c
  56. 2
      src/core/lib/security/transport/security_connector.c
  57. 2
      src/core/lib/surface/api_trace.c
  58. 6
      src/core/lib/surface/call.c
  59. 15
      src/core/lib/surface/completion_queue.c
  60. 42
      src/core/lib/surface/init.c
  61. 10
      src/core/lib/surface/init_secure.c
  62. 3
      src/core/lib/surface/server.c
  63. 3
      src/core/lib/transport/bdp_estimator.c
  64. 3
      src/core/lib/transport/connectivity_state.c
  65. 3
      src/core/lib/transport/metadata.c
  66. 3
      src/core/lib/transport/transport.c
  67. 2
      src/core/tsi/transport_security.c
  68. 4
      src/cpp/OWNERS
  69. 3
      src/csharp/OWNERS
  70. 2
      src/node/OWNERS
  71. 3
      src/objective-c/OWNERS
  72. 3
      src/php/OWNERS
  73. 8
      src/proto/grpc/health/v1/BUILD
  74. 8
      src/proto/grpc/lb/v1/BUILD
  75. 8
      src/proto/grpc/reflection/v1alpha/BUILD
  76. 10
      src/proto/grpc/status/BUILD
  77. 8
      src/proto/grpc/testing/BUILD
  78. 8
      src/proto/grpc/testing/duplicate/BUILD
  79. 3
      src/python/OWNERS
  80. 6
      src/python/grpcio/grpc/_cython/_cygrpc/security.pyx.pxi
  81. 3
      src/ruby/OWNERS
  82. 2
      src/ruby/lib/grpc/generic/active_call.rb
  83. 4
      test/build/OWNERS
  84. 4
      test/core/OWNERS
  85. 7
      test/core/bad_client/BUILD
  86. 7
      test/core/bad_ssl/BUILD
  87. 7
      test/core/census/BUILD
  88. 7
      test/core/channel/BUILD
  89. 7
      test/core/client_channel/BUILD
  90. 7
      test/core/client_channel/resolvers/BUILD
  91. 7
      test/core/compression/BUILD
  92. 7
      test/core/end2end/BUILD
  93. 7
      test/core/end2end/fuzzers/BUILD
  94. 7
      test/core/fling/BUILD
  95. 7
      test/core/handshake/BUILD
  96. 7
      test/core/http/BUILD
  97. 8
      test/core/iomgr/BUILD
  98. 7
      test/core/json/BUILD
  99. 7
      test/core/nanopb/BUILD
  100. 7
      test/core/network_benchmarks/BUILD
  101. Some files were not shown because too many files have changed in this diff Show More

@ -0,0 +1,37 @@
# Auto-generated by the tools/mkowners/mkowners.py tool
# Uses OWNERS files in different modules throughout the
# repository as the source of truth for module ownership.
/** @a11r @nicolasnoble @ctiller
/binding.gyp @murgatroid99
/Gemfile @murgatroid99
/grpc.gemspec @murgatroid99
/package.json @murgatroid99
/Rakefile @murgatroid99
/bazel/** @nicolasnoble @dgquintas @ctiller
/cmake/** @jtattermusch @a11r @nicolasnoble @ctiller
/doc/PROTOCOL-HTTP2.md @ejona86 @a11r @nicolasnoble @ctiller
/doc/interop-test-descriptions.md @ejona86 @a11r @nicolasnoble @ctiller
/etc/** @jboeuf @nicolasnoble @a11r @ctiller
/examples/node/** @murgatroid99 @a11r @nicolasnoble @ctiller
/include/** @ctiller @markdroth @dgquintas @a11r @nicolasnoble
/src/core/** @ctiller @markdroth @dgquintas @a11r @nicolasnoble
/src/core/lib/iomgr/*_uv.c @murgatroid99 @ctiller @markdroth @dgquintas @a11r @nicolasnoble
/src/core/lib/iomgr/*_uv.h @murgatroid99 @ctiller @markdroth @dgquintas @a11r @nicolasnoble
/src/cpp/** @ctiller @markdroth @dgquintas @a11r @nicolasnoble
/src/csharp/** @jtattermusch @apolcyn @a11r @nicolasnoble @ctiller
/src/node/** @murgatroid99 @a11r @nicolasnoble @ctiller
/src/objective-c/** @muxi @makdharma @a11r @nicolasnoble @ctiller
/src/php/** @stanley-cheung @murgatroid99 @a11r @nicolasnoble @ctiller
/src/python/** @nathanielmanistaatgoogle @kpayson64 @a11r @nicolasnoble @ctiller
/src/ruby/** @apolcyn @murgatroid99 @a11r @nicolasnoble @ctiller
/test/build/** @ctiller @markdroth @dgquintas @a11r @nicolasnoble
/test/core/** @ctiller @markdroth @dgquintas @a11r @nicolasnoble
/test/cpp/** @ctiller @markdroth @dgquintas @a11r @nicolasnoble
/test/cpp/qps/** @vjpai @ctiller @markdroth @dgquintas @a11r @nicolasnoble
/test/distrib/node/** @murgatroid99 @a11r @nicolasnoble @ctiller
/tools/** @matt-kwong @jtattermusch @nicolasnoble @a11r @ctiller
/tools/codegen/core/** @ctiller @dgquintas @markdroth
/tools/dockerfile/** @matt-kwong @jtattermusch @nicolasnoble @a11r @ctiller
/tools/run_tests/** @matt-kwong @jtattermusch @nicolasnoble @a11r @ctiller
/tools/run_tests/artifacts/*_node* @murgatroid99 @matt-kwong @jtattermusch @nicolasnoble @a11r @ctiller
/tools/run_tests/helper_scripts/*_node* @murgatroid99 @matt-kwong @jtattermusch @nicolasnoble @a11r @ctiller

294
BUILD

@ -40,9 +40,154 @@ core_version = "4.0.0-dev"
version = "1.5.0-dev"
GPR_PUBLIC_HDRS = [
"include/grpc/support/alloc.h",
"include/grpc/support/atm.h",
"include/grpc/support/atm_gcc_atomic.h",
"include/grpc/support/atm_gcc_sync.h",
"include/grpc/support/atm_windows.h",
"include/grpc/support/avl.h",
"include/grpc/support/cmdline.h",
"include/grpc/support/cpu.h",
"include/grpc/support/histogram.h",
"include/grpc/support/host_port.h",
"include/grpc/support/log.h",
"include/grpc/support/log_windows.h",
"include/grpc/support/port_platform.h",
"include/grpc/support/string_util.h",
"include/grpc/support/subprocess.h",
"include/grpc/support/sync.h",
"include/grpc/support/sync_generic.h",
"include/grpc/support/sync_posix.h",
"include/grpc/support/sync_windows.h",
"include/grpc/support/thd.h",
"include/grpc/support/time.h",
"include/grpc/support/tls.h",
"include/grpc/support/tls_gcc.h",
"include/grpc/support/tls_msvc.h",
"include/grpc/support/tls_pthread.h",
"include/grpc/support/useful.h",
]
GRPC_PUBLIC_HDRS = [
"include/grpc/byte_buffer.h",
"include/grpc/byte_buffer_reader.h",
"include/grpc/compression.h",
"include/grpc/load_reporting.h",
"include/grpc/grpc.h",
"include/grpc/grpc_posix.h",
"include/grpc/grpc_security_constants.h",
"include/grpc/slice.h",
"include/grpc/slice_buffer.h",
"include/grpc/status.h",
"include/grpc/support/workaround_list.h",
]
GRPC_SECURE_PUBLIC_HDRS = [
"include/grpc/grpc_security.h",
]
# TODO(ctiller): layer grpc atop grpc_unsecure, layer grpc++ atop grpc++_unsecure
GRPCXX_SRCS = [
"src/cpp/client/channel_cc.cc",
"src/cpp/client/client_context.cc",
"src/cpp/client/create_channel.cc",
"src/cpp/client/create_channel_internal.cc",
"src/cpp/client/create_channel_posix.cc",
"src/cpp/client/credentials_cc.cc",
"src/cpp/client/generic_stub.cc",
"src/cpp/common/channel_arguments.cc",
"src/cpp/common/channel_filter.cc",
"src/cpp/common/completion_queue_cc.cc",
"src/cpp/common/core_codegen.cc",
"src/cpp/common/resource_quota_cc.cc",
"src/cpp/common/rpc_method.cc",
"src/cpp/common/version_cc.cc",
"src/cpp/server/async_generic_service.cc",
"src/cpp/server/channel_argument_option.cc",
"src/cpp/server/create_default_thread_pool.cc",
"src/cpp/server/dynamic_thread_pool.cc",
"src/cpp/server/health/default_health_check_service.cc",
"src/cpp/server/health/health.pb.c",
"src/cpp/server/health/health_check_service.cc",
"src/cpp/server/health/health_check_service_server_builder_option.cc",
"src/cpp/server/server_builder.cc",
"src/cpp/server/server_cc.cc",
"src/cpp/server/server_context.cc",
"src/cpp/server/server_credentials.cc",
"src/cpp/server/server_posix.cc",
"src/cpp/thread_manager/thread_manager.cc",
"src/cpp/util/byte_buffer_cc.cc",
"src/cpp/util/slice_cc.cc",
"src/cpp/util/status.cc",
"src/cpp/util/string_ref.cc",
"src/cpp/util/time_cc.cc",
]
GRPCXX_HDRS = [
"src/cpp/client/create_channel_internal.h",
"src/cpp/common/channel_filter.h",
"src/cpp/server/dynamic_thread_pool.h",
"src/cpp/server/health/default_health_check_service.h",
"src/cpp/server/health/health.pb.h",
"src/cpp/server/thread_pool_interface.h",
"src/cpp/thread_manager/thread_manager.h",
]
GRPCXX_PUBLIC_HDRS = [
"include/grpc++/alarm.h",
"include/grpc++/channel.h",
"include/grpc++/client_context.h",
"include/grpc++/completion_queue.h",
"include/grpc++/create_channel.h",
"include/grpc++/create_channel_posix.h",
"include/grpc++/ext/health_check_service_server_builder_option.h",
"include/grpc++/generic/async_generic_service.h",
"include/grpc++/generic/generic_stub.h",
"include/grpc++/grpc++.h",
"include/grpc++/health_check_service_interface.h",
"include/grpc++/impl/call.h",
"include/grpc++/impl/channel_argument_option.h",
"include/grpc++/impl/client_unary_call.h",
"include/grpc++/impl/codegen/core_codegen.h",
"include/grpc++/impl/grpc_library.h",
"include/grpc++/impl/method_handler_impl.h",
"include/grpc++/impl/rpc_method.h",
"include/grpc++/impl/rpc_service_method.h",
"include/grpc++/impl/serialization_traits.h",
"include/grpc++/impl/server_builder_option.h",
"include/grpc++/impl/server_builder_plugin.h",
"include/grpc++/impl/server_initializer.h",
"include/grpc++/impl/service_type.h",
"include/grpc++/impl/sync_cxx11.h",
"include/grpc++/impl/sync_no_cxx11.h",
"include/grpc++/resource_quota.h",
"include/grpc++/security/auth_context.h",
"include/grpc++/security/auth_metadata_processor.h",
"include/grpc++/security/credentials.h",
"include/grpc++/security/server_credentials.h",
"include/grpc++/server.h",
"include/grpc++/server_builder.h",
"include/grpc++/server_context.h",
"include/grpc++/server_posix.h",
"include/grpc++/support/async_stream.h",
"include/grpc++/support/async_unary_call.h",
"include/grpc++/support/byte_buffer.h",
"include/grpc++/support/channel_arguments.h",
"include/grpc++/support/config.h",
"include/grpc++/support/slice.h",
"include/grpc++/support/status.h",
"include/grpc++/support/status_code_enum.h",
"include/grpc++/support/string_ref.h",
"include/grpc++/support/stub_options.h",
"include/grpc++/support/sync_stream.h",
"include/grpc++/support/time.h",
]
grpc_cc_library(
name = "gpr",
language = "c",
public_hdrs = GPR_PUBLIC_HDRS,
standalone = True,
deps = [
"gpr_base",
@ -57,6 +202,7 @@ grpc_cc_library(
"src/core/plugin_registry/grpc_unsecure_plugin_registry.c",
],
language = "c",
public_hdrs = GRPC_PUBLIC_HDRS,
standalone = True,
deps = [
"grpc_common",
@ -70,6 +216,7 @@ grpc_cc_library(
"src/core/plugin_registry/grpc_plugin_registry.c",
],
language = "c",
public_hdrs = GRPC_PUBLIC_HDRS + GRPC_SECURE_PUBLIC_HDRS,
standalone = True,
deps = [
"grpc_common",
@ -114,6 +261,7 @@ grpc_cc_library(
"src/cpp/server/secure_server_credentials.h",
],
language = "c++",
public_hdrs = GRPCXX_PUBLIC_HDRS,
standalone = True,
deps = [
"gpr",
@ -379,34 +527,7 @@ grpc_cc_library(
"src/core/lib/support/tmpfile.h",
],
language = "c",
public_hdrs = [
"include/grpc/support/alloc.h",
"include/grpc/support/atm.h",
"include/grpc/support/atm_gcc_atomic.h",
"include/grpc/support/atm_gcc_sync.h",
"include/grpc/support/atm_windows.h",
"include/grpc/support/avl.h",
"include/grpc/support/cmdline.h",
"include/grpc/support/cpu.h",
"include/grpc/support/histogram.h",
"include/grpc/support/host_port.h",
"include/grpc/support/log.h",
"include/grpc/support/log_windows.h",
"include/grpc/support/port_platform.h",
"include/grpc/support/string_util.h",
"include/grpc/support/subprocess.h",
"include/grpc/support/sync.h",
"include/grpc/support/sync_generic.h",
"include/grpc/support/sync_posix.h",
"include/grpc/support/sync_windows.h",
"include/grpc/support/thd.h",
"include/grpc/support/time.h",
"include/grpc/support/tls.h",
"include/grpc/support/tls_gcc.h",
"include/grpc/support/tls_msvc.h",
"include/grpc/support/tls_pthread.h",
"include/grpc/support/useful.h",
],
public_hdrs = GPR_PUBLIC_HDRS,
deps = [
"gpr_codegen",
],
@ -434,6 +555,7 @@ grpc_cc_library(
name = "grpc_trace",
srcs = ["src/core/lib/debug/trace.c"],
hdrs = ["src/core/lib/debug/trace.h"],
language = "c",
deps = [":gpr"],
)
@ -679,19 +801,7 @@ grpc_cc_library(
"zlib",
],
language = "c",
public_hdrs = [
"include/grpc/byte_buffer.h",
"include/grpc/byte_buffer_reader.h",
"include/grpc/compression.h",
"include/grpc/load_reporting.h",
"include/grpc/grpc.h",
"include/grpc/grpc_posix.h",
"include/grpc/grpc_security_constants.h",
"include/grpc/slice.h",
"include/grpc/slice_buffer.h",
"include/grpc/status.h",
"include/grpc/support/workaround_list.h",
],
public_hdrs = GRPC_PUBLIC_HDRS,
deps = [
"gpr_base",
"grpc_codegen",
@ -712,6 +822,7 @@ grpc_cc_library(
grpc_cc_library(
name = "grpc_common",
language = "c",
deps = [
"grpc_base",
# standard plugins
@ -1083,9 +1194,7 @@ grpc_cc_library(
"src/core/lib/security/util/json_util.h",
],
language = "c",
public_hdrs = [
"include/grpc/grpc_security.h",
],
public_hdrs = GRPC_SECURE_PUBLIC_HDRS,
deps = [
"grpc_base",
"grpc_transport_chttp2_alpn",
@ -1299,103 +1408,6 @@ grpc_cc_library(
],
)
# TODO(ctiller): layer grpc atop grpc_unsecure, layer grpc++ atop grpc++_unsecure
GRPCXX_SRCS = [
"src/cpp/client/channel_cc.cc",
"src/cpp/client/client_context.cc",
"src/cpp/client/create_channel.cc",
"src/cpp/client/create_channel_internal.cc",
"src/cpp/client/create_channel_posix.cc",
"src/cpp/client/credentials_cc.cc",
"src/cpp/client/generic_stub.cc",
"src/cpp/common/channel_arguments.cc",
"src/cpp/common/channel_filter.cc",
"src/cpp/common/completion_queue_cc.cc",
"src/cpp/common/core_codegen.cc",
"src/cpp/common/resource_quota_cc.cc",
"src/cpp/common/rpc_method.cc",
"src/cpp/common/version_cc.cc",
"src/cpp/server/async_generic_service.cc",
"src/cpp/server/channel_argument_option.cc",
"src/cpp/server/create_default_thread_pool.cc",
"src/cpp/server/dynamic_thread_pool.cc",
"src/cpp/server/health/default_health_check_service.cc",
"src/cpp/server/health/health.pb.c",
"src/cpp/server/health/health_check_service.cc",
"src/cpp/server/health/health_check_service_server_builder_option.cc",
"src/cpp/server/server_builder.cc",
"src/cpp/server/server_cc.cc",
"src/cpp/server/server_context.cc",
"src/cpp/server/server_credentials.cc",
"src/cpp/server/server_posix.cc",
"src/cpp/thread_manager/thread_manager.cc",
"src/cpp/util/byte_buffer_cc.cc",
"src/cpp/util/slice_cc.cc",
"src/cpp/util/status.cc",
"src/cpp/util/string_ref.cc",
"src/cpp/util/time_cc.cc",
]
GRPCXX_HDRS = [
"src/cpp/client/create_channel_internal.h",
"src/cpp/common/channel_filter.h",
"src/cpp/server/dynamic_thread_pool.h",
"src/cpp/server/health/default_health_check_service.h",
"src/cpp/server/health/health.pb.h",
"src/cpp/server/thread_pool_interface.h",
"src/cpp/thread_manager/thread_manager.h",
]
GRPCXX_PUBLIC_HDRS = [
"include/grpc++/alarm.h",
"include/grpc++/channel.h",
"include/grpc++/client_context.h",
"include/grpc++/completion_queue.h",
"include/grpc++/create_channel.h",
"include/grpc++/create_channel_posix.h",
"include/grpc++/ext/health_check_service_server_builder_option.h",
"include/grpc++/generic/async_generic_service.h",
"include/grpc++/generic/generic_stub.h",
"include/grpc++/grpc++.h",
"include/grpc++/health_check_service_interface.h",
"include/grpc++/impl/call.h",
"include/grpc++/impl/channel_argument_option.h",
"include/grpc++/impl/client_unary_call.h",
"include/grpc++/impl/codegen/core_codegen.h",
"include/grpc++/impl/grpc_library.h",
"include/grpc++/impl/method_handler_impl.h",
"include/grpc++/impl/rpc_method.h",
"include/grpc++/impl/rpc_service_method.h",
"include/grpc++/impl/serialization_traits.h",
"include/grpc++/impl/server_builder_option.h",
"include/grpc++/impl/server_builder_plugin.h",
"include/grpc++/impl/server_initializer.h",
"include/grpc++/impl/service_type.h",
"include/grpc++/impl/sync_cxx11.h",
"include/grpc++/impl/sync_no_cxx11.h",
"include/grpc++/resource_quota.h",
"include/grpc++/security/auth_context.h",
"include/grpc++/security/auth_metadata_processor.h",
"include/grpc++/security/credentials.h",
"include/grpc++/security/server_credentials.h",
"include/grpc++/server.h",
"include/grpc++/server_builder.h",
"include/grpc++/server_context.h",
"include/grpc++/server_posix.h",
"include/grpc++/support/async_stream.h",
"include/grpc++/support/async_unary_call.h",
"include/grpc++/support/byte_buffer.h",
"include/grpc++/support/channel_arguments.h",
"include/grpc++/support/config.h",
"include/grpc++/support/slice.h",
"include/grpc++/support/status.h",
"include/grpc++/support/status_code_enum.h",
"include/grpc++/support/string_ref.h",
"include/grpc++/support/stub_options.h",
"include/grpc++/support/sync_stream.h",
"include/grpc++/support/time.h",
]
grpc_cc_library(
name = "grpc++_base",
srcs = GRPCXX_SRCS,

@ -11405,6 +11405,7 @@ target_link_libraries(qps_interarrival_test
grpc
gpr_test_util
gpr
grpc++_test_config
${_gRPC_GFLAGS_LIBRARIES}
)
@ -11756,6 +11757,7 @@ target_link_libraries(secure_sync_unary_ping_pong_test
grpc
gpr_test_util
gpr
grpc++_test_config
${_gRPC_GFLAGS_LIBRARIES}
)

@ -15398,16 +15398,16 @@ $(BINDIR)/$(CONFIG)/qps_interarrival_test: protobuf_dep_error
else
$(BINDIR)/$(CONFIG)/qps_interarrival_test: $(PROTOBUF_DEP) $(QPS_INTERARRIVAL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(BINDIR)/$(CONFIG)/qps_interarrival_test: $(PROTOBUF_DEP) $(QPS_INTERARRIVAL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
$(Q) $(LDXX) $(LDFLAGS) $(QPS_INTERARRIVAL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/qps_interarrival_test
$(Q) $(LDXX) $(LDFLAGS) $(QPS_INTERARRIVAL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/qps_interarrival_test
endif
endif
$(OBJDIR)/$(CONFIG)/test/cpp/qps/qps_interarrival_test.o: $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(OBJDIR)/$(CONFIG)/test/cpp/qps/qps_interarrival_test.o: $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a
deps_qps_interarrival_test: $(QPS_INTERARRIVAL_TEST_OBJS:.o=.dep)
@ -15719,16 +15719,16 @@ $(BINDIR)/$(CONFIG)/secure_sync_unary_ping_pong_test: protobuf_dep_error
else
$(BINDIR)/$(CONFIG)/secure_sync_unary_ping_pong_test: $(PROTOBUF_DEP) $(SECURE_SYNC_UNARY_PING_PONG_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(BINDIR)/$(CONFIG)/secure_sync_unary_ping_pong_test: $(PROTOBUF_DEP) $(SECURE_SYNC_UNARY_PING_PONG_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
$(Q) $(LDXX) $(LDFLAGS) $(SECURE_SYNC_UNARY_PING_PONG_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/secure_sync_unary_ping_pong_test
$(Q) $(LDXX) $(LDFLAGS) $(SECURE_SYNC_UNARY_PING_PONG_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/secure_sync_unary_ping_pong_test
endif
endif
$(OBJDIR)/$(CONFIG)/test/cpp/qps/secure_sync_unary_ping_pong_test.o: $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a
$(OBJDIR)/$(CONFIG)/test/cpp/qps/secure_sync_unary_ping_pong_test.o: $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a
deps_secure_sync_unary_ping_pong_test: $(SECURE_SYNC_UNARY_PING_PONG_TEST_OBJS:.o=.dep)

@ -0,0 +1,7 @@
# Top level ownership
@a11r
@nicolasnoble
@ctiller
@murgatroid99 binding.gyp Gemfile grpc.gemspec package.json Rakefile

@ -0,0 +1,5 @@
set noparent
@nicolasnoble
@dgquintas
@ctiller

@ -12,9 +12,8 @@ def cc_grpc_library(name, srcs, deps, proto_only, well_known_protos, generate_mo
srcs: a single proto_library, which wraps the .proto files with services.
deps: a list of C++ proto_library (or cc_proto_library) which provides
the compiled code of any message that the services depend on.
well_known_protos: The target from protobuf library that exports well
known protos. Currently it will only work if the value is
"@com_google_protobuf//:well_known_protos"
well_known_protos: Should this library additionally depend on well known
protos
use_external: When True the grpc deps are prefixed with //external. This
allows grpc to be used as a dependency in other bazel projects.
generate_mock: When true GMOCk code for client stub is generated.

@ -57,7 +57,7 @@ def generate_cc_impl(ctx):
return struct(files=set(out_files))
generate_cc = rule(
_generate_cc = rule(
attrs = {
"srcs": attr.label_list(
mandatory = True,
@ -90,3 +90,9 @@ generate_cc = rule(
output_to_genfiles = True,
implementation = generate_cc_impl,
)
def generate_cc(well_known_protos, **kwargs):
if well_known_protos:
_generate_cc(well_known_protos="@com_google_protobuf//:well_known_protos", **kwargs)
else:
_generate_cc(**kwargs)

@ -52,7 +52,7 @@ def grpc_proto_plugin(name, srcs = [], deps = []):
load("//:bazel/cc_grpc_library.bzl", "cc_grpc_library")
def grpc_proto_library(name, srcs = [], deps = [], well_known_protos = None,
def grpc_proto_library(name, srcs = [], deps = [], well_known_protos = False,
has_services = True, use_external = False, generate_mock = False):
cc_grpc_library(
name = name,
@ -95,11 +95,11 @@ def grpc_cc_binary(name, srcs = [], deps = [], external_deps = [], args = [], da
)
def grpc_generate_one_off_targets():
pass
pass
def grpc_sh_test(name, srcs, args = [], data = []):
native.sh_test(
name = name,
srcs = srcs,
args = args,
data = data)
native.sh_test(
name = name,
srcs = srcs,
args = args,
data = data)

@ -4162,6 +4162,7 @@ targets:
- grpc
- gpr_test_util
- gpr
- grpc++_test_config
platforms:
- mac
- linux
@ -4280,6 +4281,7 @@ targets:
- grpc
- gpr_test_util
- gpr
- grpc++_test_config
platforms:
- mac
- linux

@ -0,0 +1,2 @@
@jtattermusch

@ -0,0 +1,2 @@
@ejona86 PROTOCOL-HTTP2.md interop-test-descriptions.md

@ -54,12 +54,14 @@ some configuration as environment variables that can be set.
- op_failure - traces error information when failure is pushed onto a
completion queue
- round_robin - traces the round_robin load balancing policy
- resource_quota - trace resource quota objects internals
- glb - traces the grpclb load balancer
- queue_pluck
- queue_timeout
- server_channel - lightweight trace of significant server channel events
- secure_endpoint - traces bytes flowing through encrypted channels
- timer - timers (alarms) in the grpc internals
- timer_check - more detailed trace of timer logic in grpc internals
- transport_security - traces metadata about secure channel establishment
- tcp - traces bytes in and out of a channel
@ -83,6 +85,11 @@ some configuration as environment variables that can be set.
'all' can additionally be used to turn all traces on.
Individual traces can be disabled by prefixing them with '-'.
'refcount' will turn on all of the tracers for refcount debugging.
if 'list_tracers' is present, then all of the available tracers will be
printed when the program starts up.
Example:
export GRPC_TRACE=all,-pending_tags

@ -0,0 +1,2 @@
@jboeuf
@nicolasnoble

@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
licenses(["notice"]) # 3-clause BSD
package(default_visibility = ["//visibility:public"])
load("//bazel:grpc_build_system.bzl", "grpc_proto_library")

@ -0,0 +1 @@
@murgatroid99

@ -0,0 +1,4 @@
@ctiller
@markdroth
@dgquintas

@ -19,8 +19,6 @@
#ifndef GRPCXX_IMPL_CODEGEN_CONFIG_PROTOBUF_H
#define GRPCXX_IMPL_CODEGEN_CONFIG_PROTOBUF_H
#define GRPC_OPEN_SOURCE_PROTO
#ifndef GRPC_CUSTOM_PROTOBUF_INT64
#include <google/protobuf/stubs/common.h>
#define GRPC_CUSTOM_PROTOBUF_INT64 ::google::protobuf::int64

@ -39,7 +39,8 @@ class GrpcBufferWriterPeer;
const int kGrpcBufferWriterMaxBufferLength = 1024 * 1024;
class GrpcBufferWriter : public ::grpc::protobuf::io::ZeroCopyOutputStream {
class GrpcBufferWriter final
: public ::grpc::protobuf::io::ZeroCopyOutputStream {
public:
explicit GrpcBufferWriter(grpc_byte_buffer** bp, int block_size)
: block_size_(block_size), byte_count_(0), have_backup_(false) {
@ -87,8 +88,6 @@ class GrpcBufferWriter : public ::grpc::protobuf::io::ZeroCopyOutputStream {
grpc::protobuf::int64 ByteCount() const override { return byte_count_; }
grpc_slice_buffer* SliceBuffer() { return slice_buffer_; }
private:
friend class GrpcBufferWriterPeer;
const int block_size_;
@ -99,7 +98,8 @@ class GrpcBufferWriter : public ::grpc::protobuf::io::ZeroCopyOutputStream {
grpc_slice slice_;
};
class GrpcBufferReader : public ::grpc::protobuf::io::ZeroCopyInputStream {
class GrpcBufferReader final
: public ::grpc::protobuf::io::ZeroCopyInputStream {
public:
explicit GrpcBufferReader(grpc_byte_buffer* buffer)
: byte_count_(0), backup_count_(0), status_() {
@ -160,7 +160,7 @@ class GrpcBufferReader : public ::grpc::protobuf::io::ZeroCopyInputStream {
return byte_count_ - backup_count_;
}
protected:
private:
int64_t byte_count_;
int64_t backup_count_;
grpc_byte_buffer_reader reader_;
@ -168,83 +168,57 @@ class GrpcBufferReader : public ::grpc::protobuf::io::ZeroCopyInputStream {
Status status_;
};
template <class BufferWriter, class T>
Status GenericSerialize(const grpc::protobuf::Message& msg,
grpc_byte_buffer** bp, bool* own_buffer) {
static_assert(
std::is_base_of<protobuf::io::ZeroCopyOutputStream, BufferWriter>::value,
"BufferWriter must be a subclass of io::ZeroCopyOutputStream");
*own_buffer = true;
int byte_size = msg.ByteSize();
if (byte_size <= internal::kGrpcBufferWriterMaxBufferLength) {
grpc_slice slice = g_core_codegen_interface->grpc_slice_malloc(byte_size);
GPR_CODEGEN_ASSERT(
GRPC_SLICE_END_PTR(slice) ==
msg.SerializeWithCachedSizesToArray(GRPC_SLICE_START_PTR(slice)));
*bp = g_core_codegen_interface->grpc_raw_byte_buffer_create(&slice, 1);
g_core_codegen_interface->grpc_slice_unref(slice);
return g_core_codegen_interface->ok();
} else {
BufferWriter writer(bp, internal::kGrpcBufferWriterMaxBufferLength);
return msg.SerializeToZeroCopyStream(&writer)
? g_core_codegen_interface->ok()
: Status(StatusCode::INTERNAL, "Failed to serialize message");
}
}
template <class BufferReader, class T>
Status GenericDeserialize(grpc_byte_buffer* buffer,
grpc::protobuf::Message* msg) {
static_assert(
std::is_base_of<protobuf::io::ZeroCopyInputStream, BufferReader>::value,
"BufferReader must be a subclass of io::ZeroCopyInputStream");
if (buffer == nullptr) {
return Status(StatusCode::INTERNAL, "No payload");
}
Status result = g_core_codegen_interface->ok();
{
BufferReader reader(buffer);
if (!reader.status().ok()) {
return reader.status();
}
::grpc::protobuf::io::CodedInputStream decoder(&reader);
decoder.SetTotalBytesLimit(INT_MAX, INT_MAX);
if (!msg->ParseFromCodedStream(&decoder)) {
result = Status(StatusCode::INTERNAL, msg->InitializationErrorString());
}
if (!decoder.ConsumedEntireMessage()) {
result = Status(StatusCode::INTERNAL, "Did not read entire message");
}
}
g_core_codegen_interface->grpc_byte_buffer_destroy(buffer);
return result;
}
} // namespace internal
// this is needed so the following class does not conflict with protobuf
// serializers that utilize internal-only tools.
#ifdef GRPC_OPEN_SOURCE_PROTO
// This class provides a protobuf serializer. It translates between protobuf
// objects and grpc_byte_buffers. More information about SerializationTraits can
// be found in include/grpc++/impl/codegen/serialization_traits.h.
template <class T>
class SerializationTraits<T, typename std::enable_if<std::is_base_of<
grpc::protobuf::Message, T>::value>::type> {
public:
static Status Serialize(const grpc::protobuf::Message& msg,
grpc_byte_buffer** bp, bool* own_buffer) {
return internal::GenericSerialize<internal::GrpcBufferWriter, T>(
msg, bp, own_buffer);
*own_buffer = true;
int byte_size = msg.ByteSize();
if (byte_size <= internal::kGrpcBufferWriterMaxBufferLength) {
grpc_slice slice = g_core_codegen_interface->grpc_slice_malloc(byte_size);
GPR_CODEGEN_ASSERT(
GRPC_SLICE_END_PTR(slice) ==
msg.SerializeWithCachedSizesToArray(GRPC_SLICE_START_PTR(slice)));
*bp = g_core_codegen_interface->grpc_raw_byte_buffer_create(&slice, 1);
g_core_codegen_interface->grpc_slice_unref(slice);
return g_core_codegen_interface->ok();
} else {
internal::GrpcBufferWriter writer(
bp, internal::kGrpcBufferWriterMaxBufferLength);
return msg.SerializeToZeroCopyStream(&writer)
? g_core_codegen_interface->ok()
: Status(StatusCode::INTERNAL, "Failed to serialize message");
}
}
static Status Deserialize(grpc_byte_buffer* buffer,
grpc::protobuf::Message* msg) {
return internal::GenericDeserialize<internal::GrpcBufferReader, T>(buffer,
msg);
if (buffer == nullptr) {
return Status(StatusCode::INTERNAL, "No payload");
}
Status result = g_core_codegen_interface->ok();
{
internal::GrpcBufferReader reader(buffer);
if (!reader.status().ok()) {
return reader.status();
}
::grpc::protobuf::io::CodedInputStream decoder(&reader);
decoder.SetTotalBytesLimit(INT_MAX, INT_MAX);
if (!msg->ParseFromCodedStream(&decoder)) {
result = Status(StatusCode::INTERNAL, msg->InitializationErrorString());
}
if (!decoder.ConsumedEntireMessage()) {
result = Status(StatusCode::INTERNAL, "Did not read entire message");
}
}
g_core_codegen_interface->grpc_byte_buffer_destroy(buffer);
return result;
}
};
#endif
} // namespace grpc

@ -63,6 +63,11 @@ class Status {
/// Is the status OK?
bool ok() const { return code_ == StatusCode::OK; }
// Ignores any errors. This method does nothing except potentially suppress
// complaints from any tools that are checking that errors are not dropped on
// the floor.
void IgnoreError() const {}
private:
StatusCode code_;
grpc::string error_message_;

@ -0,0 +1,4 @@
@ctiller
@markdroth
@dgquintas

@ -52,7 +52,8 @@
/* Client channel implementation */
grpc_tracer_flag grpc_client_channel_trace = GRPC_TRACER_INITIALIZER(false);
grpc_tracer_flag grpc_client_channel_trace =
GRPC_TRACER_INITIALIZER(false, "client_channel");
/*************************************************************************
* METHOD-CONFIG TABLE
@ -370,6 +371,7 @@ static void on_resolver_result_changed_locked(grpc_exec_ctx *exec_ctx,
grpc_error_string(error));
}
// Extract the following fields from the resolver result, if non-NULL.
bool lb_policy_updated = false;
char *lb_policy_name = NULL;
bool lb_policy_name_changed = false;
grpc_lb_policy *new_lb_policy = NULL;
@ -424,6 +426,7 @@ static void on_resolver_result_changed_locked(grpc_exec_ctx *exec_ctx,
strcmp(chand->info_lb_policy_name, lb_policy_name) != 0;
if (chand->lb_policy != NULL && !lb_policy_name_changed) {
// Continue using the same LB policy. Update with new addresses.
lb_policy_updated = true;
grpc_lb_policy_update_locked(exec_ctx, chand->lb_policy, &lb_policy_args);
} else {
// Instantiate new LB policy.
@ -569,8 +572,11 @@ static void on_resolver_result_changed_locked(grpc_exec_ctx *exec_ctx,
}
watch_lb_policy_locked(exec_ctx, chand, new_lb_policy, state);
}
set_channel_connectivity_state_locked(
exec_ctx, chand, state, GRPC_ERROR_REF(state_error), "new_lb+resolver");
if (!lb_policy_updated) {
set_channel_connectivity_state_locked(exec_ctx, chand, state,
GRPC_ERROR_REF(state_error),
"new_lb+resolver");
}
grpc_resolver_next_locked(exec_ctx, chand->resolver,
&chand->resolver_result,
&chand->on_resolver_result_changed);

@ -78,9 +78,9 @@ void grpc_client_channel_init(void) {
GRPC_CLIENT_CHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY, append_filter,
(void *)&grpc_client_channel_filter);
grpc_http_connect_register_handshaker_factory();
grpc_register_tracer("client_channel", &grpc_client_channel_trace);
grpc_register_tracer(&grpc_client_channel_trace);
#ifndef NDEBUG
grpc_register_tracer("resolver_refcount", &grpc_trace_resolver_refcount);
grpc_register_tracer(&grpc_trace_resolver_refcount);
#endif
}

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

@ -123,7 +123,7 @@
#define GRPC_GRPCLB_RECONNECT_MAX_BACKOFF_SECONDS 120
#define GRPC_GRPCLB_RECONNECT_JITTER 0.2
grpc_tracer_flag grpc_lb_glb_trace = GRPC_TRACER_INITIALIZER(false);
grpc_tracer_flag grpc_lb_glb_trace = GRPC_TRACER_INITIALIZER(false, "glb");
/* add lb_token of selected subchannel (address) to the call's initial
* metadata */
@ -1879,9 +1879,9 @@ static bool maybe_add_client_load_reporting_filter(
void grpc_lb_policy_grpclb_init() {
grpc_register_lb_policy(grpc_glb_lb_factory_create());
grpc_register_tracer("glb", &grpc_lb_glb_trace);
grpc_register_tracer(&grpc_lb_glb_trace);
#ifndef NDEBUG
grpc_register_tracer("lb_policy_refcount", &grpc_trace_lb_policy_refcount);
grpc_register_tracer(&grpc_trace_lb_policy_refcount);
#endif
grpc_channel_init_register_stage(GRPC_CLIENT_SUBCHANNEL,
GRPC_CHANNEL_INIT_BUILTIN_PRIORITY,

@ -28,7 +28,8 @@
#include "src/core/lib/iomgr/sockaddr_utils.h"
#include "src/core/lib/transport/connectivity_state.h"
grpc_tracer_flag grpc_lb_pick_first_trace = GRPC_TRACER_INITIALIZER(false);
grpc_tracer_flag grpc_lb_pick_first_trace =
GRPC_TRACER_INITIALIZER(false, "pick_first");
typedef struct pending_pick {
struct pending_pick *next;
@ -707,7 +708,7 @@ static grpc_lb_policy_factory *pick_first_lb_factory_create() {
void grpc_lb_policy_pick_first_init() {
grpc_register_lb_policy(pick_first_lb_factory_create());
grpc_register_tracer("pick_first", &grpc_lb_pick_first_trace);
grpc_register_tracer(&grpc_lb_pick_first_trace);
}
void grpc_lb_policy_pick_first_shutdown() {}

@ -37,7 +37,8 @@
#include "src/core/lib/transport/connectivity_state.h"
#include "src/core/lib/transport/static_metadata.h"
grpc_tracer_flag grpc_lb_round_robin_trace = GRPC_TRACER_INITIALIZER(false);
grpc_tracer_flag grpc_lb_round_robin_trace =
GRPC_TRACER_INITIALIZER(false, "round_robin");
/** List of entities waiting for a pick.
*
@ -868,7 +869,7 @@ static grpc_lb_policy_factory *round_robin_lb_factory_create() {
void grpc_lb_policy_round_robin_init() {
grpc_register_lb_policy(round_robin_lb_factory_create());
grpc_register_tracer("round_robin", &grpc_lb_round_robin_trace);
grpc_register_tracer(&grpc_lb_round_robin_trace);
}
void grpc_lb_policy_round_robin_shutdown() {}

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

@ -65,7 +65,7 @@ static bool maybe_add_required_filter(grpc_exec_ctx *exec_ctx,
}
void grpc_http_filters_init(void) {
grpc_register_tracer("compression", &grpc_compression_trace);
grpc_register_tracer(&grpc_compression_trace);
grpc_channel_init_register_stage(GRPC_CLIENT_SUBCHANNEL,
GRPC_CHANNEL_INIT_BUILTIN_PRIORITY,
maybe_add_optional_filter, &compress_filter);

@ -21,10 +21,10 @@
#include "src/core/lib/transport/metadata.h"
void grpc_chttp2_plugin_init(void) {
grpc_register_tracer("http", &grpc_http_trace);
grpc_register_tracer("flowctl", &grpc_flowctl_trace);
grpc_register_tracer(&grpc_http_trace);
grpc_register_tracer(&grpc_flowctl_trace);
#ifndef NDEBUG
grpc_register_tracer("chttp2_refcount", &grpc_trace_chttp2_refcount);
grpc_register_tracer(&grpc_trace_chttp2_refcount);
#endif
}

@ -74,11 +74,12 @@ static bool g_default_keepalive_permit_without_calls =
DEFAULT_KEEPALIVE_PERMIT_WITHOUT_CALLS;
#define MAX_CLIENT_STREAM_ID 0x7fffffffu
grpc_tracer_flag grpc_http_trace = GRPC_TRACER_INITIALIZER(false);
grpc_tracer_flag grpc_flowctl_trace = GRPC_TRACER_INITIALIZER(false);
grpc_tracer_flag grpc_http_trace = GRPC_TRACER_INITIALIZER(false, "http");
grpc_tracer_flag grpc_flowctl_trace = GRPC_TRACER_INITIALIZER(false, "flowctl");
#ifndef NDEBUG
grpc_tracer_flag grpc_trace_chttp2_refcount = GRPC_TRACER_INITIALIZER(false);
grpc_tracer_flag grpc_trace_chttp2_refcount =
GRPC_TRACER_INITIALIZER(false, "chttp2_refcount");
#endif
static const grpc_transport_vtable vtable;

@ -23,7 +23,7 @@
#include <stdlib.h>
#include <string.h>
grpc_tracer_flag grpc_trace_channel = GRPC_TRACER_INITIALIZER(false);
grpc_tracer_flag grpc_trace_channel = GRPC_TRACER_INITIALIZER(false, "channel");
/* Memory layouts.

@ -24,7 +24,7 @@
#include <grpc/support/string_util.h>
grpc_tracer_flag grpc_trace_channel_stack_builder =
GRPC_TRACER_INITIALIZER(false);
GRPC_TRACER_INITIALIZER(false, "channel_stack_builder");
typedef struct filter_node {
struct filter_node *next;

@ -27,7 +27,6 @@
int grpc_tracer_set_enabled(const char *name, int enabled);
typedef struct tracer {
const char *name;
grpc_tracer_flag *flag;
struct tracer *next;
} tracer;
@ -39,9 +38,8 @@ static tracer *tracers;
#define TRACER_SET(flag, on) (flag).value = (on)
#endif
void grpc_register_tracer(const char *name, grpc_tracer_flag *flag) {
void grpc_register_tracer(grpc_tracer_flag *flag) {
tracer *t = gpr_malloc(sizeof(*t));
t->name = name;
t->flag = flag;
t->next = tracers;
TRACER_SET(*flag, false);
@ -93,6 +91,14 @@ static void parse(const char *s) {
gpr_free(strings);
}
static void list_tracers() {
gpr_log(GPR_DEBUG, "available tracers:");
tracer *t;
for (t = tracers; t; t = t->next) {
gpr_log(GPR_DEBUG, "\t%s", t->flag->name);
}
}
void grpc_tracer_init(const char *env_var) {
char *e = gpr_getenv(env_var);
if (e != NULL) {
@ -115,10 +121,18 @@ int grpc_tracer_set_enabled(const char *name, int enabled) {
for (t = tracers; t; t = t->next) {
TRACER_SET(*t->flag, enabled);
}
} else if (0 == strcmp(name, "list_tracers")) {
list_tracers();
} else if (0 == strcmp(name, "refcount")) {
for (t = tracers; t; t = t->next) {
if (strstr(t->flag->name, "refcount") != NULL) {
TRACER_SET(*t->flag, enabled);
}
}
} else {
int found = 0;
for (t = tracers; t; t = t->next) {
if (0 == strcmp(name, t->name)) {
if (0 == strcmp(name, t->flag->name)) {
TRACER_SET(*t->flag, enabled);
found = 1;
}

@ -35,19 +35,20 @@ typedef struct {
#else
bool value;
#endif
char *name;
} grpc_tracer_flag;
#ifdef GRPC_THREADSAFE_TRACER
#define GRPC_TRACER_ON(flag) (gpr_atm_no_barrier_load(&(flag).value) != 0)
#define GRPC_TRACER_INITIALIZER(on) \
{ (gpr_atm)(on) }
#define GRPC_TRACER_INITIALIZER(on, name) \
{ (gpr_atm)(on), (name) }
#else
#define GRPC_TRACER_ON(flag) ((flag).value)
#define GRPC_TRACER_INITIALIZER(on) \
{ (on) }
#define GRPC_TRACER_INITIALIZER(on, name) \
{ (on), (name) }
#endif
void grpc_register_tracer(const char *name, grpc_tracer_flag *flag);
void grpc_register_tracer(grpc_tracer_flag *flag);
void grpc_tracer_init(const char *env_var_name);
void grpc_tracer_shutdown(void);

@ -25,7 +25,7 @@
#include <grpc/support/log.h>
#include <grpc/support/useful.h>
grpc_tracer_flag grpc_http1_trace = GRPC_TRACER_INITIALIZER(false);
grpc_tracer_flag grpc_http1_trace = GRPC_TRACER_INITIALIZER(false, "http1");
static char *buf2str(void *buffer, size_t length) {
char *out = gpr_malloc(length + 1);

@ -0,0 +1 @@
@murgatroid99 *_uv.c *_uv.h

@ -25,7 +25,7 @@
#include "src/core/lib/profiling/timers.h"
#ifndef NDEBUG
grpc_tracer_flag grpc_trace_closure = GRPC_TRACER_INITIALIZER(false);
grpc_tracer_flag grpc_trace_closure = GRPC_TRACER_INITIALIZER(false, "closure");
#endif
#ifndef NDEBUG

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

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

@ -39,10 +39,11 @@
#include "src/core/lib/support/env.h"
grpc_tracer_flag grpc_polling_trace =
GRPC_TRACER_INITIALIZER(false); /* Disabled by default */
GRPC_TRACER_INITIALIZER(false, "polling"); /* Disabled by default */
#ifndef NDEBUG
grpc_tracer_flag grpc_trace_fd_refcount = GRPC_TRACER_INITIALIZER(false);
grpc_tracer_flag grpc_trace_fd_refcount =
GRPC_TRACER_INITIALIZER(false, "fd_refcount");
#endif
/** Default poll() function - a pointer so that it can be overridden by some
@ -124,7 +125,7 @@ void grpc_set_event_engine_test_only(
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);
grpc_register_tracer(&grpc_polling_trace);
char *s = gpr_getenv("GRPC_POLL_STRATEGY");
if (s == NULL) {

@ -23,6 +23,6 @@
#include "src/core/lib/debug/trace.h"
grpc_tracer_flag grpc_polling_trace =
GRPC_TRACER_INITIALIZER(false); /* Disabled by default */
GRPC_TRACER_INITIALIZER(false, "polling"); /* Disabled by default */
#endif // GRPC_WINSOCK_SOCKET

@ -28,7 +28,7 @@
void grpc_iomgr_platform_init(void) {
grpc_wakeup_fd_global_init();
grpc_event_engine_init();
grpc_register_tracer("tcp", &grpc_tcp_trace);
grpc_register_tracer(&grpc_tcp_trace);
}
void grpc_iomgr_platform_flush(void) {}

@ -26,7 +26,7 @@
void grpc_iomgr_platform_init(void) {
grpc_pollset_global_init();
grpc_register_tracer("tcp", &grpc_tcp_trace);
grpc_register_tracer(&grpc_tcp_trace);
}
void grpc_iomgr_platform_flush(void) {}
void grpc_iomgr_platform_shutdown(void) { grpc_pollset_global_shutdown(); }

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

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

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

@ -59,7 +59,7 @@ typedef GRPC_MSG_IOVLEN_TYPE msg_iovlen_type;
typedef size_t msg_iovlen_type;
#endif
grpc_tracer_flag grpc_tcp_trace = GRPC_TRACER_INITIALIZER(false);
grpc_tracer_flag grpc_tcp_trace = GRPC_TRACER_INITIALIZER(false, "tcp");
typedef struct {
grpc_endpoint base;

@ -37,7 +37,7 @@
#include "src/core/lib/slice/slice_string_helpers.h"
#include "src/core/lib/support/string.h"
grpc_tracer_flag grpc_tcp_trace = GRPC_TRACER_INITIALIZER(false);
grpc_tracer_flag grpc_tcp_trace = GRPC_TRACER_INITIALIZER(false, "tcp");
typedef struct {
grpc_endpoint base;

@ -48,7 +48,7 @@
#define GRPC_FIONBIO FIONBIO
#endif
grpc_tracer_flag grpc_tcp_trace = GRPC_TRACER_INITIALIZER(false);
grpc_tracer_flag grpc_tcp_trace = GRPC_TRACER_INITIALIZER(false, "tcp");
static grpc_error *set_non_block(SOCKET sock) {
int status;

@ -41,8 +41,9 @@
#define MIN_QUEUE_WINDOW_DURATION 0.01
#define MAX_QUEUE_WINDOW_DURATION 1
grpc_tracer_flag grpc_timer_trace = GRPC_TRACER_INITIALIZER(false);
grpc_tracer_flag grpc_timer_check_trace = GRPC_TRACER_INITIALIZER(false);
grpc_tracer_flag grpc_timer_trace = GRPC_TRACER_INITIALIZER(false, "timer");
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
* deadlines earlier than 'queue_deadline" cap are maintained in the heap and
@ -160,8 +161,8 @@ void grpc_timer_list_init(gpr_timespec now) {
g_shared_mutables.min_timer = timespec_to_atm_round_down(now);
gpr_tls_init(&g_last_seen_min_timer);
gpr_tls_set(&g_last_seen_min_timer, 0);
grpc_register_tracer("timer", &grpc_timer_trace);
grpc_register_tracer("timer_check", &grpc_timer_check_trace);
grpc_register_tracer(&grpc_timer_trace);
grpc_register_tracer(&grpc_timer_check_trace);
for (i = 0; i < NUM_SHARDS; i++) {
timer_shard *shard = &g_shards[i];

@ -56,7 +56,7 @@ static gpr_timespec g_timed_waiter_deadline;
// generation counter to track which thread is waiting for the next timer
static uint64_t g_timed_waiter_generation;
static void timer_thread(void *unused);
static void timer_thread(void *completed_thread_ptr);
static void gc_completed_threads(void) {
if (g_completed_threads != NULL) {
@ -81,10 +81,10 @@ static void start_timer_thread_and_unlock(void) {
if (GRPC_TRACER_ON(grpc_timer_check_trace)) {
gpr_log(GPR_DEBUG, "Spawn timer thread");
}
gpr_thd_id thd;
gpr_thd_options opt = gpr_thd_options_default();
gpr_thd_options_set_joinable(&opt);
gpr_thd_new(&thd, timer_thread, NULL, &opt);
completed_thread *ct = gpr_malloc(sizeof(*ct));
gpr_thd_new(&ct->t, timer_thread, ct, &opt);
}
void grpc_timer_manager_tick() {
@ -245,7 +245,7 @@ static void timer_main_loop(grpc_exec_ctx *exec_ctx) {
}
}
static void timer_thread_cleanup(void) {
static void timer_thread_cleanup(completed_thread *ct) {
gpr_mu_lock(&g_mu);
// terminate the thread: drop the waiter count, thread count, and let whomever
// stopped the threading stuff know that we're done
@ -254,8 +254,6 @@ static void timer_thread_cleanup(void) {
if (0 == g_thread_count) {
gpr_cv_signal(&g_cv_shutdown);
}
completed_thread *ct = gpr_malloc(sizeof(*ct));
ct->t = gpr_thd_currentid();
ct->next = g_completed_threads;
g_completed_threads = ct;
gpr_mu_unlock(&g_mu);
@ -264,14 +262,14 @@ static void timer_thread_cleanup(void) {
}
}
static void timer_thread(void *unused) {
static void timer_thread(void *completed_thread_ptr) {
// this threads exec_ctx: we try to run things through to completion here
// since it's easy to spin up new threads
grpc_exec_ctx exec_ctx =
GRPC_EXEC_CTX_INITIALIZER(0, grpc_never_ready_to_finish, NULL);
timer_main_loop(&exec_ctx);
grpc_exec_ctx_finish(&exec_ctx);
timer_thread_cleanup();
timer_thread_cleanup(completed_thread_ptr);
}
static void start_threads(void) {

@ -28,8 +28,9 @@
#include <uv.h>
grpc_tracer_flag grpc_timer_trace = GRPC_TRACER_INITIALIZER(false);
grpc_tracer_flag grpc_timer_check_trace = GRPC_TRACER_INITIALIZER(false);
grpc_tracer_flag grpc_timer_trace = GRPC_TRACER_INITIALIZER(false, "timer");
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); }

@ -31,7 +31,7 @@
#ifndef NDEBUG
grpc_tracer_flag grpc_trace_auth_context_refcount =
GRPC_TRACER_INITIALIZER(false);
GRPC_TRACER_INITIALIZER(false, "auth_context_refcount");
#endif
/* --- grpc_call --- */

@ -60,7 +60,8 @@ typedef struct {
gpr_refcount ref;
} secure_endpoint;
grpc_tracer_flag grpc_trace_secure_endpoint = GRPC_TRACER_INITIALIZER(false);
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) {
secure_endpoint *ep = secure_ep;

@ -45,7 +45,7 @@
#ifndef NDEBUG
grpc_tracer_flag grpc_trace_security_connector_refcount =
GRPC_TRACER_INITIALIZER(false);
GRPC_TRACER_INITIALIZER(false, "security_connector_refcount");
#endif
/* -- Constants. -- */

@ -19,4 +19,4 @@
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/debug/trace.h"
grpc_tracer_flag grpc_api_trace = GRPC_TRACER_INITIALIZER(false);
grpc_tracer_flag grpc_api_trace = GRPC_TRACER_INITIALIZER(false, "api");

@ -229,8 +229,10 @@ struct grpc_call {
void *saved_receiving_stream_ready_bctlp;
};
grpc_tracer_flag grpc_call_error_trace = GRPC_TRACER_INITIALIZER(false);
grpc_tracer_flag grpc_compression_trace = GRPC_TRACER_INITIALIZER(false);
grpc_tracer_flag grpc_call_error_trace =
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_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/event_string.h"
grpc_tracer_flag grpc_trace_operation_failures = GRPC_TRACER_INITIALIZER(false);
grpc_tracer_flag grpc_trace_operation_failures =
GRPC_TRACER_INITIALIZER(false, "op_failure");
#ifndef NDEBUG
grpc_tracer_flag grpc_trace_pending_tags = GRPC_TRACER_INITIALIZER(false);
grpc_tracer_flag grpc_trace_cq_refcount = GRPC_TRACER_INITIALIZER(false);
grpc_tracer_flag grpc_trace_pending_tags =
GRPC_TRACER_INITIALIZER(false, "pending_tags");
grpc_tracer_flag grpc_trace_cq_refcount =
GRPC_TRACER_INITIALIZER(false, "cq_refcount");
#endif
typedef struct {
@ -343,8 +346,10 @@ static const cq_vtable g_cq_vtable[] = {
#define POLLSET_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);
grpc_tracer_flag grpc_cq_event_timeout_trace = GRPC_TRACER_INITIALIZER(true);
grpc_tracer_flag grpc_cq_pluck_trace =
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) \
if (GRPC_TRACER_ON(grpc_api_trace) && \

@ -120,29 +120,27 @@ void grpc_init(void) {
grpc_slice_intern_init();
grpc_mdctx_global_init();
grpc_channel_init_init();
grpc_register_tracer("api", &grpc_api_trace);
grpc_register_tracer("channel", &grpc_trace_channel);
grpc_register_tracer("connectivity_state", &grpc_connectivity_state_trace);
grpc_register_tracer("channel_stack_builder",
&grpc_trace_channel_stack_builder);
grpc_register_tracer("http1", &grpc_http1_trace);
grpc_register_tracer("queue_pluck", &grpc_cq_pluck_trace); // default on
grpc_register_tracer("combiner", &grpc_combiner_trace);
grpc_register_tracer("server_channel", &grpc_server_channel_trace);
grpc_register_tracer("bdp_estimator", &grpc_bdp_estimator_trace);
grpc_register_tracer("queue_timeout",
&grpc_cq_event_timeout_trace); // default on
grpc_register_tracer("op_failure", &grpc_trace_operation_failures);
grpc_register_tracer("resource_quota", &grpc_resource_quota_trace);
grpc_register_tracer("call_error", &grpc_call_error_trace);
grpc_register_tracer(&grpc_api_trace);
grpc_register_tracer(&grpc_trace_channel);
grpc_register_tracer(&grpc_connectivity_state_trace);
grpc_register_tracer(&grpc_trace_channel_stack_builder);
grpc_register_tracer(&grpc_http1_trace);
grpc_register_tracer(&grpc_cq_pluck_trace); // default on
grpc_register_tracer(&grpc_combiner_trace);
grpc_register_tracer(&grpc_server_channel_trace);
grpc_register_tracer(&grpc_bdp_estimator_trace);
grpc_register_tracer(&grpc_cq_event_timeout_trace); // default on
grpc_register_tracer(&grpc_trace_operation_failures);
grpc_register_tracer(&grpc_resource_quota_trace);
grpc_register_tracer(&grpc_call_error_trace);
#ifndef NDEBUG
grpc_register_tracer("pending_tags", &grpc_trace_pending_tags);
grpc_register_tracer("queue_refcount", &grpc_trace_cq_refcount);
grpc_register_tracer("closure", &grpc_trace_closure);
grpc_register_tracer("error_refcount", &grpc_trace_error_refcount);
grpc_register_tracer("stream_refcount", &grpc_trace_stream_refcount);
grpc_register_tracer("fd_refcount", &grpc_trace_fd_refcount);
grpc_register_tracer("metadata", &grpc_trace_metadata);
grpc_register_tracer(&grpc_trace_pending_tags);
grpc_register_tracer(&grpc_trace_cq_refcount);
grpc_register_tracer(&grpc_trace_closure);
grpc_register_tracer(&grpc_trace_error_refcount);
grpc_register_tracer(&grpc_trace_stream_refcount);
grpc_register_tracer(&grpc_trace_fd_refcount);
grpc_register_tracer(&grpc_trace_metadata);
#endif
grpc_security_pre_init();
grpc_iomgr_init(&exec_ctx);

@ -37,13 +37,11 @@
#endif
void grpc_security_pre_init(void) {
grpc_register_tracer("secure_endpoint", &grpc_trace_secure_endpoint);
grpc_register_tracer("transport_security", &tsi_tracing_enabled);
grpc_register_tracer(&grpc_trace_secure_endpoint);
grpc_register_tracer(&tsi_tracing_enabled);
#ifndef NDEBUG
grpc_register_tracer("auth_context_refcount",
&grpc_trace_auth_context_refcount);
grpc_register_tracer("security_connector_refcount",
&grpc_trace_security_connector_refcount);
grpc_register_tracer(&grpc_trace_auth_context_refcount);
grpc_register_tracer(&grpc_trace_security_connector_refcount);
#endif
}

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

@ -23,7 +23,8 @@
#include <grpc/support/log.h>
#include <grpc/support/useful.h>
grpc_tracer_flag grpc_bdp_estimator_trace = GRPC_TRACER_INITIALIZER(false);
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) {
estimator->estimate = 65536;

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

@ -48,7 +48,8 @@
*/
#ifndef NDEBUG
grpc_tracer_flag grpc_trace_metadata = GRPC_TRACER_INITIALIZER(false);
grpc_tracer_flag grpc_trace_metadata =
GRPC_TRACER_INITIALIZER(false, "metadata");
#define DEBUG_ARGS , const char *file, int line
#define FWD_DEBUG_ARGS , 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"
#ifndef NDEBUG
grpc_tracer_flag grpc_trace_stream_refcount = GRPC_TRACER_INITIALIZER(false);
grpc_tracer_flag grpc_trace_stream_refcount =
GRPC_TRACER_INITIALIZER(false, "stream_refcount");
#endif
#ifndef NDEBUG

@ -26,7 +26,7 @@
/* --- Tracing. --- */
grpc_tracer_flag tsi_tracing_enabled = GRPC_TRACER_INITIALIZER(false);
grpc_tracer_flag tsi_tracing_enabled = GRPC_TRACER_INITIALIZER(false, "tsi");
/* --- tsi_result common implementation. --- */

@ -0,0 +1,4 @@
@ctiller
@markdroth
@dgquintas

@ -0,0 +1,3 @@
@jtattermusch
@apolcyn

@ -0,0 +1,2 @@
@murgatroid99

@ -0,0 +1,3 @@
@muxi
@makdharma

@ -0,0 +1,3 @@
@stanley-cheung
@murgatroid99

@ -14,7 +14,13 @@
licenses(["notice"]) # Apache v2
package(default_visibility = ["//visibility:public"])
package(
default_visibility = ["//visibility:public"],
features = [
"-layering_check",
"-parse_headers",
],
)
load("//bazel:grpc_build_system.bzl", "grpc_proto_library")

@ -14,7 +14,13 @@
licenses(["notice"]) # Apache v2
package(default_visibility = ["//visibility:public"])
package(
default_visibility = ["//visibility:public"],
features = [
"-layering_check",
"-parse_headers",
],
)
load("//bazel:grpc_build_system.bzl", "grpc_proto_library")

@ -14,7 +14,13 @@
licenses(["notice"]) # Apache v2
package(default_visibility = ["//visibility:public"])
package(
default_visibility = ["//visibility:public"],
features = [
"-layering_check",
"-parse_headers",
],
)
load("//bazel:grpc_build_system.bzl", "grpc_proto_library")

@ -14,7 +14,13 @@
licenses(["notice"]) # Apache v2
package(default_visibility = ["//visibility:public"])
package(
default_visibility = ["//visibility:public"],
features = [
"-layering_check",
"-parse_headers",
],
)
load("//bazel:grpc_build_system.bzl", "grpc_proto_library")
@ -22,5 +28,5 @@ grpc_proto_library(
name = "status_proto",
srcs = ["status.proto"],
has_services = False,
well_known_protos = "@com_google_protobuf//:well_known_protos",
well_known_protos = True,
)

@ -14,7 +14,13 @@
licenses(["notice"]) # Apache v2
package(default_visibility = ["//visibility:public"])
package(
default_visibility = ["//visibility:public"],
features = [
"-layering_check",
"-parse_headers",
],
)
load("//bazel:grpc_build_system.bzl", "grpc_proto_library")

@ -14,7 +14,13 @@
licenses(["notice"]) # Apache v2
package(default_visibility = ["//visibility:public"])
package(
default_visibility = ["//visibility:public"],
features = [
"-layering_check",
"-parse_headers",
],
)
load("//bazel:grpc_build_system.bzl", "grpc_proto_library")

@ -0,0 +1,3 @@
@nathanielmanistaatgoogle
@kpayson64

@ -34,7 +34,7 @@ cdef grpc_ssl_roots_override_result ssl_roots_override_callback(
def peer_identities(Call call):
cdef grpc_auth_context* auth_context
cdef grpc_auth_property_iterator properties
cdef grpc_auth_property* property
cdef const grpc_auth_property* property
auth_context = grpc_call_auth_context(call.c_call)
if auth_context == NULL:
@ -52,7 +52,7 @@ def peer_identities(Call call):
def peer_identity_key(Call call):
cdef grpc_auth_context* auth_context
cdef char* c_key
cdef const char* c_key
auth_context = grpc_call_auth_context(call.c_call)
if auth_context == NULL:
return None
@ -67,7 +67,7 @@ def peer_identity_key(Call call):
def auth_context(Call call):
cdef grpc_auth_context* auth_context
cdef grpc_auth_property_iterator properties
cdef grpc_auth_property* property
cdef const grpc_auth_property* property
auth_context = grpc_call_auth_context(call.c_call)
if auth_context == NULL:

@ -0,0 +1,3 @@
@apolcyn
@murgatroid99

@ -516,7 +516,7 @@ module GRPC
# MultiReqView limits access to an ActiveCall's methods for use in
# server client_streamer handlers.
MultiReqView = view_class(:cancelled?, :deadline, :each_queued_msg,
MultiReqView = view_class(:cancelled?, :deadline,
:each_remote_read, :metadata, :output_metadata,
:send_initial_metadata,
:metadata_to_send,

@ -0,0 +1,4 @@
@ctiller
@markdroth
@dgquintas

@ -0,0 +1,4 @@
@ctiller
@markdroth
@dgquintas

@ -14,6 +14,13 @@
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary")
package(
features = [
"-layering_check",
"-parse_headers",
],
)
licenses(["notice"]) # Apache v2
load(":generate_tests.bzl", "grpc_bad_client_tests")

@ -14,6 +14,13 @@
load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary")
package(
features = [
"-layering_check",
"-parse_headers",
],
)
licenses(["notice"]) # Apache v2
load(":generate_tests.bzl", "grpc_bad_ssl_tests")

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
grpc_cc_test(
name = "context_test",
srcs = ["context_test.c"],

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
grpc_cc_test(
name = "channel_args_test",
srcs = ["channel_args_test.c"],

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer")
grpc_fuzzer(

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
grpc_cc_test(
name = "dns_resolver_connectivity_test",
srcs = ["dns_resolver_connectivity_test.c"],

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
grpc_cc_test(
name = "algorithm_test",
srcs = ["algorithm_test.c"],

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
load(":generate_tests.bzl", "grpc_end2end_tests")
grpc_cc_library(

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer")
grpc_fuzzer(

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer")
grpc_cc_binary(

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
grpc_cc_test(
name = "client_ssl",
srcs = ["client_ssl.c"],

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer")
grpc_fuzzer(

@ -18,7 +18,13 @@ licenses(["notice"]) # Apache v2
load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer")
package(default_visibility = ["//visibility:public"]) # Useful for third party devs to test their io manager implementation.
package(
default_visibility = ["//visibility:public"], # Useful for third party devs to test their io manager implementation.
features = [
"-layering_check",
"-parse_headers",
],
)
grpc_cc_library(
name = "endpoint_tests",

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer")
grpc_fuzzer(

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer")
grpc_fuzzer(

@ -16,6 +16,13 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_c
licenses(["notice"]) # Apache v2
package(
features = [
"-layering_check",
"-parse_headers",
],
)
grpc_cc_binary(
name = "low_level_ping_pong",
srcs = ["low_level_ping_pong.c"],

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save