Merge branch 'master' into MetadataExchangeInTrailers

pull/36413/head
Yash Tibrewal 11 months ago
commit 4fc350e622
  1. 21
      BUILD
  2. 608
      CMakeLists.txt
  3. 9
      Makefile
  4. 22
      Package.swift
  5. 3
      bazel/grpc_build_system.bzl
  6. 924
      build_autogenerated.yaml
  7. 10
      config.m4
  8. 10
      config.w32
  9. 25
      gRPC-C++.podspec
  10. 33
      gRPC-Core.podspec
  11. 18
      grpc.gemspec
  12. 4
      include/grpcpp/client_context.h
  13. 8
      include/grpcpp/completion_queue.h
  14. 12
      include/grpcpp/impl/call_op_set.h
  15. 111
      include/grpcpp/impl/interceptor_common.h
  16. 6
      include/grpcpp/impl/proto_utils.h
  17. 4
      include/grpcpp/impl/rpc_service_method.h
  18. 18
      include/grpcpp/impl/server_callback_handlers.h
  19. 39
      include/grpcpp/impl/service_type.h
  20. 3
      include/grpcpp/impl/sync.h
  21. 6
      include/grpcpp/server_interface.h
  22. 90
      include/grpcpp/support/async_stream.h
  23. 20
      include/grpcpp/support/async_unary_call.h
  24. 16
      include/grpcpp/support/callback_common.h
  25. 34
      include/grpcpp/support/client_callback.h
  26. 4
      include/grpcpp/support/client_interceptor.h
  27. 4
      include/grpcpp/support/method_handler.h
  28. 9
      include/grpcpp/support/proto_buffer_reader.h
  29. 9
      include/grpcpp/support/proto_buffer_writer.h
  30. 4
      include/grpcpp/support/server_interceptor.h
  31. 22
      include/grpcpp/support/sync_stream.h
  32. 18
      package.xml
  33. 60
      src/core/BUILD
  34. 115
      src/core/channelz/channel_trace.cc
  35. 37
      src/core/channelz/channel_trace.h
  36. 66
      src/core/channelz/channelz.cc
  37. 48
      src/core/channelz/channelz.h
  38. 4
      src/core/channelz/channelz_registry.cc
  39. 8
      src/core/channelz/channelz_registry.h
  40. 93
      src/core/client_channel/client_channel_channelz.cc
  41. 85
      src/core/client_channel/client_channel_channelz.h
  42. 3
      src/core/client_channel/client_channel_filter.cc
  43. 2
      src/core/client_channel/client_channel_filter.h
  44. 2
      src/core/client_channel/connector.h
  45. 4
      src/core/client_channel/subchannel.cc
  46. 1
      src/core/client_channel/subchannel.h
  47. 3
      src/core/ext/transport/binder/.clang-format
  48. 3
      src/core/ext/transport/binder/client/binder_connector.h
  49. 3
      src/core/ext/transport/binder/client/channel_create.cc
  50. 4
      src/core/ext/transport/binder/client/channel_create_impl.cc
  51. 1
      src/core/ext/transport/binder/client/channel_create_impl.h
  52. 4
      src/core/ext/transport/binder/client/connection_id_generator.cc
  53. 4
      src/core/ext/transport/binder/client/connection_id_generator.h
  54. 4
      src/core/ext/transport/binder/client/endpoint_binder_pool.cc
  55. 4
      src/core/ext/transport/binder/client/endpoint_binder_pool.h
  56. 4
      src/core/ext/transport/binder/client/jni_utils.cc
  57. 4
      src/core/ext/transport/binder/client/jni_utils.h
  58. 3
      src/core/ext/transport/binder/client/security_policy_setting.h
  59. 4
      src/core/ext/transport/binder/server/binder_server.cc
  60. 3
      src/core/ext/transport/binder/server/binder_server.h
  61. 4
      src/core/ext/transport/binder/transport/binder_transport.cc
  62. 6
      src/core/ext/transport/binder/transport/binder_transport.h
  63. 4
      src/core/ext/transport/binder/utils/ndk_binder.cc
  64. 4
      src/core/ext/transport/binder/utils/transport_stream_receiver.h
  65. 4
      src/core/ext/transport/binder/utils/transport_stream_receiver_impl.cc
  66. 4
      src/core/ext/transport/binder/utils/transport_stream_receiver_impl.h
  67. 4
      src/core/ext/transport/binder/wire_format/binder.h
  68. 4
      src/core/ext/transport/binder/wire_format/binder_constants.h
  69. 3
      src/core/ext/transport/binder/wire_format/transaction.h
  70. 4
      src/core/ext/transport/binder/wire_format/wire_reader.h
  71. 4
      src/core/ext/transport/binder/wire_format/wire_reader_impl.cc
  72. 3
      src/core/ext/transport/binder/wire_format/wire_reader_impl.h
  73. 4
      src/core/ext/transport/binder/wire_format/wire_writer.cc
  74. 4
      src/core/ext/transport/binder/wire_format/wire_writer.h
  75. 3
      src/core/ext/transport/chaotic_good/client_transport.h
  76. 2
      src/core/ext/transport/chaotic_good/server/chaotic_good_server.h
  77. 3
      src/core/ext/transport/chaotic_good/server_transport.h
  78. 2
      src/core/ext/transport/chttp2/client/chttp2_connector.cc
  79. 2
      src/core/ext/transport/chttp2/server/chttp2_server.cc
  80. 3
      src/core/ext/transport/chttp2/transport/.clang-format
  81. 3
      src/core/ext/transport/chttp2/transport/bin_decoder.cc
  82. 3
      src/core/ext/transport/chttp2/transport/bin_decoder.h
  83. 3
      src/core/ext/transport/chttp2/transport/bin_encoder.cc
  84. 3
      src/core/ext/transport/chttp2/transport/bin_encoder.h
  85. 3
      src/core/ext/transport/chttp2/transport/chttp2_transport.cc
  86. 5
      src/core/ext/transport/chttp2/transport/chttp2_transport.h
  87. 4
      src/core/ext/transport/chttp2/transport/context_list_entry.h
  88. 4
      src/core/ext/transport/chttp2/transport/decode_huff.cc
  89. 4
      src/core/ext/transport/chttp2/transport/decode_huff.h
  90. 3
      src/core/ext/transport/chttp2/transport/flow_control.cc
  91. 3
      src/core/ext/transport/chttp2/transport/flow_control.h
  92. 3
      src/core/ext/transport/chttp2/transport/frame.cc
  93. 4
      src/core/ext/transport/chttp2/transport/frame.h
  94. 3
      src/core/ext/transport/chttp2/transport/frame_data.cc
  95. 3
      src/core/ext/transport/chttp2/transport/frame_data.h
  96. 3
      src/core/ext/transport/chttp2/transport/frame_goaway.cc
  97. 3
      src/core/ext/transport/chttp2/transport/frame_goaway.h
  98. 3
      src/core/ext/transport/chttp2/transport/frame_ping.cc
  99. 3
      src/core/ext/transport/chttp2/transport/frame_ping.h
  100. 3
      src/core/ext/transport/chttp2/transport/frame_rst_stream.cc
  101. Some files were not shown because too many files have changed in this diff Show More

21
BUILD

@ -823,6 +823,7 @@ grpc_cc_library(
"avoid_dep",
"nofixdeps",
],
visibility = ["@grpc:gpr_public_hdrs"],
)
grpc_cc_library(
@ -885,6 +886,7 @@ grpc_cc_library(
"avoid_dep",
"nofixdeps",
],
visibility = ["@grpc:grpc_public_hdrs"],
deps = [
"channel_arg_names",
"gpr_public_hdrs",
@ -895,6 +897,7 @@ grpc_cc_library(
name = "grpc++_public_hdrs",
hdrs = GRPCXX_PUBLIC_HDRS,
external_deps = [
"absl/log:check",
"absl/strings:cord",
"absl/synchronization",
"protobuf_headers",
@ -904,7 +907,7 @@ grpc_cc_library(
"avoid_dep",
"nofixdeps",
],
visibility = ["@grpc:public"],
visibility = ["@grpc:grpc++_public_hdrs"],
deps = [
"grpc_public_hdrs",
"//src/core:gpr_atm",
@ -1348,14 +1351,14 @@ grpc_cc_library(
grpc_cc_library(
name = "channelz",
srcs = [
"//src/core:lib/channel/channel_trace.cc",
"//src/core:lib/channel/channelz.cc",
"//src/core:lib/channel/channelz_registry.cc",
"//src/core:channelz/channel_trace.cc",
"//src/core:channelz/channelz.cc",
"//src/core:channelz/channelz_registry.cc",
],
hdrs = [
"//src/core:lib/channel/channel_trace.h",
"//src/core:lib/channel/channelz.h",
"//src/core:lib/channel/channelz_registry.h",
"//src/core:channelz/channel_trace.h",
"//src/core:channelz/channelz.h",
"//src/core:channelz/channelz_registry.h",
],
external_deps = [
"absl/base:core_headers",
@ -1796,7 +1799,7 @@ grpc_cc_library(
"ref_counted_ptr",
"stats",
"//src/core:arena",
"//src/core:call_size_estimator",
"//src/core:call_arena_allocator",
"//src/core:channel_args",
"//src/core:channel_fwd",
"//src/core:channel_init",
@ -3532,7 +3535,6 @@ grpc_cc_library(
"xds_orca_service_upb",
"xds_orca_upb",
"//src/core:backend_metric_parser",
"//src/core:client_channel_channelz",
"//src/core:closure",
"//src/core:error",
"//src/core:grpc_backend_metric_data",
@ -3666,7 +3668,6 @@ grpc_cc_library(
"//src/core:channel_init",
"//src/core:channel_stack_type",
"//src/core:client_channel_backup_poller",
"//src/core:client_channel_channelz",
"//src/core:client_channel_internal_header",
"//src/core:client_channel_service_config",
"//src/core:closure",

608
CMakeLists.txt generated

File diff suppressed because it is too large Load Diff

9
Makefile generated

@ -666,8 +666,10 @@ clean:
# deps: ['cares', 'libssl', 'z']
# transitive_deps: ['cares', 'libssl', 'z']
LIBGRPC_SRC = \
src/core/channelz/channel_trace.cc \
src/core/channelz/channelz.cc \
src/core/channelz/channelz_registry.cc \
src/core/client_channel/backup_poller.cc \
src/core/client_channel/client_channel_channelz.cc \
src/core/client_channel/client_channel_factory.cc \
src/core/client_channel/client_channel_filter.cc \
src/core/client_channel/client_channel_plugin.cc \
@ -1092,9 +1094,6 @@ LIBGRPC_SRC = \
src/core/lib/channel/channel_stack_builder.cc \
src/core/lib/channel/channel_stack_builder_impl.cc \
src/core/lib/channel/channel_stack_trace.cc \
src/core/lib/channel/channel_trace.cc \
src/core/lib/channel/channelz.cc \
src/core/lib/channel/channelz_registry.cc \
src/core/lib/channel/connected_channel.cc \
src/core/lib/channel/metrics.cc \
src/core/lib/channel/promise_based_filter.cc \
@ -1407,9 +1406,9 @@ LIBGRPC_SRC = \
src/core/lib/surface/wait_for_cq_end_op.cc \
src/core/lib/transport/batch_builder.cc \
src/core/lib/transport/bdp_estimator.cc \
src/core/lib/transport/call_arena_allocator.cc \
src/core/lib/transport/call_filters.cc \
src/core/lib/transport/call_final_info.cc \
src/core/lib/transport/call_size_estimator.cc \
src/core/lib/transport/call_spine.cc \
src/core/lib/transport/connectivity_state.cc \
src/core/lib/transport/endpoint_info_handshaker.cc \

22
Package.swift generated

@ -23,8 +23,8 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/firebase/abseil-cpp-SwiftPM.git", "0.20230802.0"..<"0.20230803.0"),
.package(url: "https://github.com/firebase/boringssl-SwiftPM.git", "0.9.0"..<"0.10.0"),
.package(url: "https://github.com/firebase/abseil-cpp-SwiftPM.git", "0.20240116.1"..<"0.20240117.0"),
.package(url: "https://github.com/firebase/boringssl-SwiftPM.git", "0.32.0"..<"0.33.0"),
],
targets: [
@ -117,10 +117,14 @@ let package = Package(
"include/grpc/support/thd_id.h",
"include/grpc/support/time.h",
"include/grpc/support/workaround_list.h",
"src/core/channelz/channel_trace.cc",
"src/core/channelz/channel_trace.h",
"src/core/channelz/channelz.cc",
"src/core/channelz/channelz.h",
"src/core/channelz/channelz_registry.cc",
"src/core/channelz/channelz_registry.h",
"src/core/client_channel/backup_poller.cc",
"src/core/client_channel/backup_poller.h",
"src/core/client_channel/client_channel_channelz.cc",
"src/core/client_channel/client_channel_channelz.h",
"src/core/client_channel/client_channel_factory.cc",
"src/core/client_channel/client_channel_factory.h",
"src/core/client_channel/client_channel_filter.cc",
@ -1144,12 +1148,6 @@ let package = Package(
"src/core/lib/channel/channel_stack_builder_impl.h",
"src/core/lib/channel/channel_stack_trace.cc",
"src/core/lib/channel/channel_stack_trace.h",
"src/core/lib/channel/channel_trace.cc",
"src/core/lib/channel/channel_trace.h",
"src/core/lib/channel/channelz.cc",
"src/core/lib/channel/channelz.h",
"src/core/lib/channel/channelz_registry.cc",
"src/core/lib/channel/channelz_registry.h",
"src/core/lib/channel/connected_channel.cc",
"src/core/lib/channel/connected_channel.h",
"src/core/lib/channel/context.h",
@ -1805,12 +1803,12 @@ let package = Package(
"src/core/lib/transport/batch_builder.h",
"src/core/lib/transport/bdp_estimator.cc",
"src/core/lib/transport/bdp_estimator.h",
"src/core/lib/transport/call_arena_allocator.cc",
"src/core/lib/transport/call_arena_allocator.h",
"src/core/lib/transport/call_filters.cc",
"src/core/lib/transport/call_filters.h",
"src/core/lib/transport/call_final_info.cc",
"src/core/lib/transport/call_final_info.h",
"src/core/lib/transport/call_size_estimator.cc",
"src/core/lib/transport/call_size_estimator.h",
"src/core/lib/transport/call_spine.cc",
"src/core/lib/transport/call_spine.h",
"src/core/lib/transport/connectivity_state.cc",

@ -106,11 +106,14 @@ def _update_visibility(visibility):
"debug_location": PRIVATE,
"endpoint_tests": PRIVATE,
"exec_ctx": PRIVATE,
"gpr_public_hdrs": PRIVATE,
"grpclb": PRIVATE,
"grpc_experiments": PRIVATE,
"grpc_opencensus_plugin": PUBLIC,
"grpc_public_hdrs": PRIVATE,
"grpcpp_gcp_observability": PUBLIC,
"grpc_resolver_fake": PRIVATE,
"grpc++_public_hdrs": PUBLIC,
"grpc++_test": PRIVATE,
"http": PRIVATE,
"httpcli": PRIVATE,

File diff suppressed because it is too large Load Diff

10
config.m4 generated

@ -41,8 +41,10 @@ if test "$PHP_GRPC" != "no"; then
PHP_SUBST(GRPC_SHARED_LIBADD)
PHP_NEW_EXTENSION(grpc,
src/core/channelz/channel_trace.cc \
src/core/channelz/channelz.cc \
src/core/channelz/channelz_registry.cc \
src/core/client_channel/backup_poller.cc \
src/core/client_channel/client_channel_channelz.cc \
src/core/client_channel/client_channel_factory.cc \
src/core/client_channel/client_channel_filter.cc \
src/core/client_channel/client_channel_plugin.cc \
@ -467,9 +469,6 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/channel/channel_stack_builder.cc \
src/core/lib/channel/channel_stack_builder_impl.cc \
src/core/lib/channel/channel_stack_trace.cc \
src/core/lib/channel/channel_trace.cc \
src/core/lib/channel/channelz.cc \
src/core/lib/channel/channelz_registry.cc \
src/core/lib/channel/connected_channel.cc \
src/core/lib/channel/metrics.cc \
src/core/lib/channel/promise_based_filter.cc \
@ -782,9 +781,9 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/surface/wait_for_cq_end_op.cc \
src/core/lib/transport/batch_builder.cc \
src/core/lib/transport/bdp_estimator.cc \
src/core/lib/transport/call_arena_allocator.cc \
src/core/lib/transport/call_filters.cc \
src/core/lib/transport/call_final_info.cc \
src/core/lib/transport/call_size_estimator.cc \
src/core/lib/transport/call_spine.cc \
src/core/lib/transport/connectivity_state.cc \
src/core/lib/transport/endpoint_info_handshaker.cc \
@ -1383,6 +1382,7 @@ if test "$PHP_GRPC" != "no"; then
-DGRPC_XDS_USER_AGENT_NAME_SUFFIX='"\"PHP\""' \
-DGRPC_XDS_USER_AGENT_VERSION_SUFFIX='"\"1.64.0dev\""')
PHP_ADD_BUILD_DIR($ext_builddir/src/core/channelz)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/client_channel)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/backend_metrics)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/filters/census)

10
config.w32 generated

@ -6,8 +6,10 @@ ARG_WITH("grpc", "grpc support", "no");
if (PHP_GRPC != "no") {
EXTENSION("grpc",
"src\\core\\channelz\\channel_trace.cc " +
"src\\core\\channelz\\channelz.cc " +
"src\\core\\channelz\\channelz_registry.cc " +
"src\\core\\client_channel\\backup_poller.cc " +
"src\\core\\client_channel\\client_channel_channelz.cc " +
"src\\core\\client_channel\\client_channel_factory.cc " +
"src\\core\\client_channel\\client_channel_filter.cc " +
"src\\core\\client_channel\\client_channel_plugin.cc " +
@ -432,9 +434,6 @@ if (PHP_GRPC != "no") {
"src\\core\\lib\\channel\\channel_stack_builder.cc " +
"src\\core\\lib\\channel\\channel_stack_builder_impl.cc " +
"src\\core\\lib\\channel\\channel_stack_trace.cc " +
"src\\core\\lib\\channel\\channel_trace.cc " +
"src\\core\\lib\\channel\\channelz.cc " +
"src\\core\\lib\\channel\\channelz_registry.cc " +
"src\\core\\lib\\channel\\connected_channel.cc " +
"src\\core\\lib\\channel\\metrics.cc " +
"src\\core\\lib\\channel\\promise_based_filter.cc " +
@ -747,9 +746,9 @@ if (PHP_GRPC != "no") {
"src\\core\\lib\\surface\\wait_for_cq_end_op.cc " +
"src\\core\\lib\\transport\\batch_builder.cc " +
"src\\core\\lib\\transport\\bdp_estimator.cc " +
"src\\core\\lib\\transport\\call_arena_allocator.cc " +
"src\\core\\lib\\transport\\call_filters.cc " +
"src\\core\\lib\\transport\\call_final_info.cc " +
"src\\core\\lib\\transport\\call_size_estimator.cc " +
"src\\core\\lib\\transport\\call_spine.cc " +
"src\\core\\lib\\transport\\connectivity_state.cc " +
"src\\core\\lib\\transport\\endpoint_info_handshaker.cc " +
@ -1375,6 +1374,7 @@ if (PHP_GRPC != "no") {
FSO.CreateFolder(base_dir+"\\ext\\grpc");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\channelz");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\client_channel");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters");

25
gRPC-C++.podspec generated

@ -225,7 +225,7 @@ Pod::Spec.new do |s|
ss.dependency "#{s.name}/Privacy", version
ss.dependency "#{s.name}/Interface", version
ss.dependency 'gRPC-Core', version
abseil_version = '1.20240116.1'
abseil_version = '~> 1.20240116.2'
ss.dependency 'abseil/algorithm/container', abseil_version
ss.dependency 'abseil/base/base', abseil_version
ss.dependency 'abseil/base/config', abseil_version
@ -242,6 +242,7 @@ Pod::Spec.new do |s|
ss.dependency 'abseil/functional/bind_front', abseil_version
ss.dependency 'abseil/functional/function_ref', abseil_version
ss.dependency 'abseil/hash/hash', abseil_version
ss.dependency 'abseil/log/check', abseil_version
ss.dependency 'abseil/log/log', abseil_version
ss.dependency 'abseil/memory/memory', abseil_version
ss.dependency 'abseil/meta/type_traits', abseil_version
@ -260,8 +261,10 @@ Pod::Spec.new do |s|
ss.dependency 'abseil/types/variant', abseil_version
ss.dependency 'abseil/utility/utility', abseil_version
ss.source_files = 'src/core/client_channel/backup_poller.h',
'src/core/client_channel/client_channel_channelz.h',
ss.source_files = 'src/core/channelz/channel_trace.h',
'src/core/channelz/channelz.h',
'src/core/channelz/channelz_registry.h',
'src/core/client_channel/backup_poller.h',
'src/core/client_channel/client_channel_factory.h',
'src/core/client_channel/client_channel_filter.h',
'src/core/client_channel/client_channel_internal.h',
@ -900,9 +903,6 @@ Pod::Spec.new do |s|
'src/core/lib/channel/channel_stack_builder.h',
'src/core/lib/channel/channel_stack_builder_impl.h',
'src/core/lib/channel/channel_stack_trace.h',
'src/core/lib/channel/channel_trace.h',
'src/core/lib/channel/channelz.h',
'src/core/lib/channel/channelz_registry.h',
'src/core/lib/channel/connected_channel.h',
'src/core/lib/channel/context.h',
'src/core/lib/channel/metrics.h',
@ -1242,9 +1242,9 @@ Pod::Spec.new do |s|
'src/core/lib/surface/wait_for_cq_end_op.h',
'src/core/lib/transport/batch_builder.h',
'src/core/lib/transport/bdp_estimator.h',
'src/core/lib/transport/call_arena_allocator.h',
'src/core/lib/transport/call_filters.h',
'src/core/lib/transport/call_final_info.h',
'src/core/lib/transport/call_size_estimator.h',
'src/core/lib/transport/call_spine.h',
'src/core/lib/transport/connectivity_state.h',
'src/core/lib/transport/custom_metadata.h',
@ -1550,8 +1550,10 @@ Pod::Spec.new do |s|
'third_party/zlib/zlib.h',
'third_party/zlib/zutil.h'
ss.private_header_files = 'src/core/client_channel/backup_poller.h',
'src/core/client_channel/client_channel_channelz.h',
ss.private_header_files = 'src/core/channelz/channel_trace.h',
'src/core/channelz/channelz.h',
'src/core/channelz/channelz_registry.h',
'src/core/client_channel/backup_poller.h',
'src/core/client_channel/client_channel_factory.h',
'src/core/client_channel/client_channel_filter.h',
'src/core/client_channel/client_channel_internal.h',
@ -2172,9 +2174,6 @@ Pod::Spec.new do |s|
'src/core/lib/channel/channel_stack_builder.h',
'src/core/lib/channel/channel_stack_builder_impl.h',
'src/core/lib/channel/channel_stack_trace.h',
'src/core/lib/channel/channel_trace.h',
'src/core/lib/channel/channelz.h',
'src/core/lib/channel/channelz_registry.h',
'src/core/lib/channel/connected_channel.h',
'src/core/lib/channel/context.h',
'src/core/lib/channel/metrics.h',
@ -2514,9 +2513,9 @@ Pod::Spec.new do |s|
'src/core/lib/surface/wait_for_cq_end_op.h',
'src/core/lib/transport/batch_builder.h',
'src/core/lib/transport/bdp_estimator.h',
'src/core/lib/transport/call_arena_allocator.h',
'src/core/lib/transport/call_filters.h',
'src/core/lib/transport/call_final_info.h',
'src/core/lib/transport/call_size_estimator.h',
'src/core/lib/transport/call_spine.h',
'src/core/lib/transport/connectivity_state.h',
'src/core/lib/transport/custom_metadata.h',

33
gRPC-Core.podspec generated

@ -46,7 +46,7 @@ Pod::Spec.new do |s|
s.requires_arc = false
name = 'grpc'
abseil_version = '1.20240116.1'
abseil_version = '~> 1.20240116.2'
# When creating a dynamic framework, name it grpc.framework instead of gRPC-Core.framework.
# This lets users write their includes like `#include <grpc/grpc.h>` as opposed to `#include
@ -233,10 +233,14 @@ Pod::Spec.new do |s|
ss.dependency 'abseil/utility/utility', abseil_version
ss.compiler_flags = '-DBORINGSSL_PREFIX=GRPC -Wno-unreachable-code -Wno-shorten-64-to-32'
ss.source_files = 'src/core/client_channel/backup_poller.cc',
ss.source_files = 'src/core/channelz/channel_trace.cc',
'src/core/channelz/channel_trace.h',
'src/core/channelz/channelz.cc',
'src/core/channelz/channelz.h',
'src/core/channelz/channelz_registry.cc',
'src/core/channelz/channelz_registry.h',
'src/core/client_channel/backup_poller.cc',
'src/core/client_channel/backup_poller.h',
'src/core/client_channel/client_channel_channelz.cc',
'src/core/client_channel/client_channel_channelz.h',
'src/core/client_channel/client_channel_factory.cc',
'src/core/client_channel/client_channel_factory.h',
'src/core/client_channel/client_channel_filter.cc',
@ -1260,12 +1264,6 @@ Pod::Spec.new do |s|
'src/core/lib/channel/channel_stack_builder_impl.h',
'src/core/lib/channel/channel_stack_trace.cc',
'src/core/lib/channel/channel_stack_trace.h',
'src/core/lib/channel/channel_trace.cc',
'src/core/lib/channel/channel_trace.h',
'src/core/lib/channel/channelz.cc',
'src/core/lib/channel/channelz.h',
'src/core/lib/channel/channelz_registry.cc',
'src/core/lib/channel/channelz_registry.h',
'src/core/lib/channel/connected_channel.cc',
'src/core/lib/channel/connected_channel.h',
'src/core/lib/channel/context.h',
@ -1917,12 +1915,12 @@ Pod::Spec.new do |s|
'src/core/lib/transport/batch_builder.h',
'src/core/lib/transport/bdp_estimator.cc',
'src/core/lib/transport/bdp_estimator.h',
'src/core/lib/transport/call_arena_allocator.cc',
'src/core/lib/transport/call_arena_allocator.h',
'src/core/lib/transport/call_filters.cc',
'src/core/lib/transport/call_filters.h',
'src/core/lib/transport/call_final_info.cc',
'src/core/lib/transport/call_final_info.h',
'src/core/lib/transport/call_size_estimator.cc',
'src/core/lib/transport/call_size_estimator.h',
'src/core/lib/transport/call_spine.cc',
'src/core/lib/transport/call_spine.h',
'src/core/lib/transport/connectivity_state.cc',
@ -2351,8 +2349,10 @@ Pod::Spec.new do |s|
'third_party/zlib/zlib.h',
'third_party/zlib/zutil.c',
'third_party/zlib/zutil.h'
ss.private_header_files = 'src/core/client_channel/backup_poller.h',
'src/core/client_channel/client_channel_channelz.h',
ss.private_header_files = 'src/core/channelz/channel_trace.h',
'src/core/channelz/channelz.h',
'src/core/channelz/channelz_registry.h',
'src/core/client_channel/backup_poller.h',
'src/core/client_channel/client_channel_factory.h',
'src/core/client_channel/client_channel_filter.h',
'src/core/client_channel/client_channel_internal.h',
@ -2952,9 +2952,6 @@ Pod::Spec.new do |s|
'src/core/lib/channel/channel_stack_builder.h',
'src/core/lib/channel/channel_stack_builder_impl.h',
'src/core/lib/channel/channel_stack_trace.h',
'src/core/lib/channel/channel_trace.h',
'src/core/lib/channel/channelz.h',
'src/core/lib/channel/channelz_registry.h',
'src/core/lib/channel/connected_channel.h',
'src/core/lib/channel/context.h',
'src/core/lib/channel/metrics.h',
@ -3294,9 +3291,9 @@ Pod::Spec.new do |s|
'src/core/lib/surface/wait_for_cq_end_op.h',
'src/core/lib/transport/batch_builder.h',
'src/core/lib/transport/bdp_estimator.h',
'src/core/lib/transport/call_arena_allocator.h',
'src/core/lib/transport/call_filters.h',
'src/core/lib/transport/call_final_info.h',
'src/core/lib/transport/call_size_estimator.h',
'src/core/lib/transport/call_spine.h',
'src/core/lib/transport/connectivity_state.h',
'src/core/lib/transport/custom_metadata.h',

18
grpc.gemspec generated

@ -123,10 +123,14 @@ Gem::Specification.new do |s|
s.files += %w( include/grpc/support/thd_id.h )
s.files += %w( include/grpc/support/time.h )
s.files += %w( include/grpc/support/workaround_list.h )
s.files += %w( src/core/channelz/channel_trace.cc )
s.files += %w( src/core/channelz/channel_trace.h )
s.files += %w( src/core/channelz/channelz.cc )
s.files += %w( src/core/channelz/channelz.h )
s.files += %w( src/core/channelz/channelz_registry.cc )
s.files += %w( src/core/channelz/channelz_registry.h )
s.files += %w( src/core/client_channel/backup_poller.cc )
s.files += %w( src/core/client_channel/backup_poller.h )
s.files += %w( src/core/client_channel/client_channel_channelz.cc )
s.files += %w( src/core/client_channel/client_channel_channelz.h )
s.files += %w( src/core/client_channel/client_channel_factory.cc )
s.files += %w( src/core/client_channel/client_channel_factory.h )
s.files += %w( src/core/client_channel/client_channel_filter.cc )
@ -1150,12 +1154,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/channel/channel_stack_builder_impl.h )
s.files += %w( src/core/lib/channel/channel_stack_trace.cc )
s.files += %w( src/core/lib/channel/channel_stack_trace.h )
s.files += %w( src/core/lib/channel/channel_trace.cc )
s.files += %w( src/core/lib/channel/channel_trace.h )
s.files += %w( src/core/lib/channel/channelz.cc )
s.files += %w( src/core/lib/channel/channelz.h )
s.files += %w( src/core/lib/channel/channelz_registry.cc )
s.files += %w( src/core/lib/channel/channelz_registry.h )
s.files += %w( src/core/lib/channel/connected_channel.cc )
s.files += %w( src/core/lib/channel/connected_channel.h )
s.files += %w( src/core/lib/channel/context.h )
@ -1807,12 +1805,12 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/transport/batch_builder.h )
s.files += %w( src/core/lib/transport/bdp_estimator.cc )
s.files += %w( src/core/lib/transport/bdp_estimator.h )
s.files += %w( src/core/lib/transport/call_arena_allocator.cc )
s.files += %w( src/core/lib/transport/call_arena_allocator.h )
s.files += %w( src/core/lib/transport/call_filters.cc )
s.files += %w( src/core/lib/transport/call_filters.h )
s.files += %w( src/core/lib/transport/call_final_info.cc )
s.files += %w( src/core/lib/transport/call_final_info.h )
s.files += %w( src/core/lib/transport/call_size_estimator.cc )
s.files += %w( src/core/lib/transport/call_size_estimator.h )
s.files += %w( src/core/lib/transport/call_spine.cc )
s.files += %w( src/core/lib/transport/call_spine.h )
s.files += %w( src/core/lib/transport/connectivity_state.cc )

@ -38,6 +38,8 @@
#include <memory>
#include <string>
#include "absl/log/check.h"
#include <grpc/impl/compression_types.h>
#include <grpc/impl/propagation_bits.h>
#include <grpc/support/log.h>
@ -246,7 +248,7 @@ class ClientContext {
/// \return A multimap of initial metadata key-value pairs from the server.
const std::multimap<grpc::string_ref, grpc::string_ref>&
GetServerInitialMetadata() const {
GPR_ASSERT(initial_metadata_received_);
CHECK(initial_metadata_received_);
return *recv_initial_metadata_.map();
}

@ -34,6 +34,8 @@
#include <list>
#include "absl/log/check.h"
#include <grpc/grpc.h>
#include <grpc/support/atm.h>
#include <grpc/support/log.h>
@ -323,7 +325,7 @@ class CompletionQueue : private grpc::internal::GrpcLibrary {
bool ok = ev.success != 0;
void* ignored = tag;
if (tag->FinalizeResult(&ignored, &ok)) {
GPR_ASSERT(ignored == tag);
CHECK(ignored == tag);
return ok;
}
}
@ -344,7 +346,7 @@ class CompletionQueue : private grpc::internal::GrpcLibrary {
bool ok = ev.success != 0;
void* ignored = tag;
// the tag must be swallowed if using TryPluck
GPR_ASSERT(!tag->FinalizeResult(&ignored, &ok));
CHECK(!tag->FinalizeResult(&ignored, &ok));
}
/// Performs a single polling pluck on \a tag. Calls tag->FinalizeResult if
@ -361,7 +363,7 @@ class CompletionQueue : private grpc::internal::GrpcLibrary {
bool ok = ev.success != 0;
void* ignored = tag;
GPR_ASSERT(!tag->FinalizeResult(&ignored, &ok));
CHECK(!tag->FinalizeResult(&ignored, &ok));
}
/// Manage state of avalanching operations : completion queue tags that

@ -23,6 +23,8 @@
#include <map>
#include <memory>
#include "absl/log/check.h"
#include <grpc/grpc.h>
#include <grpc/impl/compression_types.h>
#include <grpc/impl/grpc_types.h>
@ -316,7 +318,7 @@ class CallOpSendMessage {
return;
}
if (msg_ != nullptr) {
GPR_ASSERT(serializer_(msg_).ok());
CHECK(serializer_(msg_).ok());
}
serializer_ = nullptr;
grpc_op* op = &ops[(*nops)++];
@ -795,7 +797,7 @@ class CallOpClientRecvStatus {
if (recv_status_ == nullptr || hijacked_) return;
if (static_cast<StatusCode>(status_code_) == StatusCode::OK) {
*recv_status_ = Status();
GPR_DEBUG_ASSERT(debug_error_string_ == nullptr);
DCHECK_EQ(debug_error_string_, nullptr);
} else {
*recv_status_ =
Status(static_cast<StatusCode>(status_code_),
@ -974,7 +976,7 @@ class CallOpSet : public CallOpSetInterface,
// WritesDone multiple times
gpr_log(GPR_ERROR, "API misuse of type %s observed",
grpc_call_error_to_string(err));
GPR_ASSERT(false);
CHECK(false);
}
}
@ -984,8 +986,8 @@ class CallOpSet : public CallOpSetInterface,
done_intercepting_ = true;
// The following call_start_batch is internally-generated so no need for an
// explanatory log on failure.
GPR_ASSERT(grpc_call_start_batch(call_.call(), nullptr, 0, core_cq_tag(),
nullptr) == GRPC_CALL_OK);
CHECK(grpc_call_start_batch(call_.call(), nullptr, 0, core_cq_tag(),
nullptr) == GRPC_CALL_OK);
}
private:

@ -22,6 +22,8 @@
#include <array>
#include <functional>
#include "absl/log/check.h"
#include <grpc/impl/grpc_types.h>
#include <grpc/support/log.h>
#include <grpcpp/impl/call.h>
@ -56,16 +58,15 @@ class InterceptorBatchMethodsImpl
if (call_->client_rpc_info() != nullptr) {
return ProceedClient();
}
GPR_ASSERT(call_->server_rpc_info() != nullptr);
CHECK_NE(call_->server_rpc_info(), nullptr);
ProceedServer();
}
void Hijack() override {
// Only the client can hijack when sending down initial metadata
GPR_ASSERT(!reverse_ && ops_ != nullptr &&
call_->client_rpc_info() != nullptr);
CHECK(!reverse_ && ops_ != nullptr && call_->client_rpc_info() != nullptr);
// It is illegal to call Hijack twice
GPR_ASSERT(!ran_hijacking_interceptor_);
CHECK(!ran_hijacking_interceptor_);
auto* rpc_info = call_->client_rpc_info();
rpc_info->hijacked_ = true;
rpc_info->hijacked_interceptor_ = current_interceptor_index_;
@ -80,21 +81,21 @@ class InterceptorBatchMethodsImpl
}
ByteBuffer* GetSerializedSendMessage() override {
GPR_ASSERT(orig_send_message_ != nullptr);
CHECK_NE(orig_send_message_, nullptr);
if (*orig_send_message_ != nullptr) {
GPR_ASSERT(serializer_(*orig_send_message_).ok());
CHECK(serializer_(*orig_send_message_).ok());
*orig_send_message_ = nullptr;
}
return send_message_;
}
const void* GetSendMessage() override {
GPR_ASSERT(orig_send_message_ != nullptr);
CHECK_NE(orig_send_message_, nullptr);
return *orig_send_message_;
}
void ModifySendMessage(const void* message) override {
GPR_ASSERT(orig_send_message_ != nullptr);
CHECK_NE(orig_send_message_, nullptr);
*orig_send_message_ = message;
}
@ -129,7 +130,7 @@ class InterceptorBatchMethodsImpl
Status* GetRecvStatus() override { return recv_status_; }
void FailHijackedSendMessage() override {
GPR_ASSERT(hooks_[static_cast<size_t>(
CHECK(hooks_[static_cast<size_t>(
experimental::InterceptionHookPoints::PRE_SEND_MESSAGE)]);
*fail_send_message_ = true;
}
@ -192,7 +193,7 @@ class InterceptorBatchMethodsImpl
}
void FailHijackedRecvMessage() override {
GPR_ASSERT(hooks_[static_cast<size_t>(
CHECK(hooks_[static_cast<size_t>(
experimental::InterceptionHookPoints::PRE_RECV_MESSAGE)]);
*hijacked_recv_message_failed_ = true;
}
@ -236,7 +237,7 @@ class InterceptorBatchMethodsImpl
// ContinueFinalizeOpsAfterInterception will be called. Note that neither of
// them is invoked if there were no interceptors registered.
bool RunInterceptors() {
GPR_ASSERT(ops_);
CHECK(ops_);
auto* client_rpc_info = call_->client_rpc_info();
if (client_rpc_info != nullptr) {
if (client_rpc_info->interceptors_.empty()) {
@ -261,8 +262,8 @@ class InterceptorBatchMethodsImpl
// SyncRequest.
bool RunInterceptors(std::function<void(void)> f) {
// This is used only by the server for initial call request
GPR_ASSERT(reverse_ == true);
GPR_ASSERT(call_->client_rpc_info() == nullptr);
CHECK_EQ(reverse_, true);
CHECK_EQ(call_->client_rpc_info(), nullptr);
auto* server_rpc_info = call_->server_rpc_info();
if (server_rpc_info == nullptr || server_rpc_info->interceptors_.empty()) {
return true;
@ -356,7 +357,7 @@ class InterceptorBatchMethodsImpl
return ops_->ContinueFinalizeResultAfterInterception();
}
}
GPR_ASSERT(callback_);
CHECK(callback_);
callback_();
}
@ -422,112 +423,98 @@ class CancelInterceptorBatchMethods
void Hijack() override {
// Only the client can hijack when sending down initial metadata
GPR_ASSERT(false &&
"It is illegal to call Hijack on a method which has a "
"Cancel notification");
CHECK(false) << "It is illegal to call Hijack on a method which has a "
"Cancel notification";
}
ByteBuffer* GetSerializedSendMessage() override {
GPR_ASSERT(false &&
"It is illegal to call GetSendMessage on a method which "
"has a Cancel notification");
CHECK(false) << "It is illegal to call GetSendMessage on a method which "
"has a Cancel notification";
return nullptr;
}
bool GetSendMessageStatus() override {
GPR_ASSERT(false &&
"It is illegal to call GetSendMessageStatus on a method which "
"has a Cancel notification");
CHECK(false)
<< "It is illegal to call GetSendMessageStatus on a method which "
"has a Cancel notification";
return false;
}
const void* GetSendMessage() override {
GPR_ASSERT(false &&
"It is illegal to call GetOriginalSendMessage on a method which "
"has a Cancel notification");
CHECK(false)
<< "It is illegal to call GetOriginalSendMessage on a method which "
"has a Cancel notification";
return nullptr;
}
void ModifySendMessage(const void* /*message*/) override {
GPR_ASSERT(false &&
"It is illegal to call ModifySendMessage on a method which "
"has a Cancel notification");
CHECK(false) << "It is illegal to call ModifySendMessage on a method which "
"has a Cancel notification";
}
std::multimap<std::string, std::string>* GetSendInitialMetadata() override {
GPR_ASSERT(false &&
"It is illegal to call GetSendInitialMetadata on a "
"method which has a Cancel notification");
CHECK(false) << "It is illegal to call GetSendInitialMetadata on a "
"method which has a Cancel notification";
return nullptr;
}
Status GetSendStatus() override {
GPR_ASSERT(false &&
"It is illegal to call GetSendStatus on a method which "
"has a Cancel notification");
CHECK(false) << "It is illegal to call GetSendStatus on a method which "
"has a Cancel notification";
return Status();
}
void ModifySendStatus(const Status& /*status*/) override {
GPR_ASSERT(false &&
"It is illegal to call ModifySendStatus on a method "
"which has a Cancel notification");
CHECK(false) << "It is illegal to call ModifySendStatus on a method "
"which has a Cancel notification";
}
std::multimap<std::string, std::string>* GetSendTrailingMetadata() override {
GPR_ASSERT(false &&
"It is illegal to call GetSendTrailingMetadata on a "
"method which has a Cancel notification");
CHECK(false) << "It is illegal to call GetSendTrailingMetadata on a "
"method which has a Cancel notification";
return nullptr;
}
void* GetRecvMessage() override {
GPR_ASSERT(false &&
"It is illegal to call GetRecvMessage on a method which "
"has a Cancel notification");
CHECK(false) << "It is illegal to call GetRecvMessage on a method which "
"has a Cancel notification";
return nullptr;
}
std::multimap<grpc::string_ref, grpc::string_ref>* GetRecvInitialMetadata()
override {
GPR_ASSERT(false &&
"It is illegal to call GetRecvInitialMetadata on a "
"method which has a Cancel notification");
CHECK(false) << "It is illegal to call GetRecvInitialMetadata on a "
"method which has a Cancel notification";
return nullptr;
}
Status* GetRecvStatus() override {
GPR_ASSERT(false &&
"It is illegal to call GetRecvStatus on a method which "
"has a Cancel notification");
CHECK(false) << "It is illegal to call GetRecvStatus on a method which "
"has a Cancel notification";
return nullptr;
}
std::multimap<grpc::string_ref, grpc::string_ref>* GetRecvTrailingMetadata()
override {
GPR_ASSERT(false &&
"It is illegal to call GetRecvTrailingMetadata on a "
"method which has a Cancel notification");
CHECK(false) << "It is illegal to call GetRecvTrailingMetadata on a "
"method which has a Cancel notification";
return nullptr;
}
std::unique_ptr<ChannelInterface> GetInterceptedChannel() override {
GPR_ASSERT(false &&
"It is illegal to call GetInterceptedChannel on a "
"method which has a Cancel notification");
CHECK(false) << "It is illegal to call GetInterceptedChannel on a "
"method which has a Cancel notification";
return std::unique_ptr<ChannelInterface>(nullptr);
}
void FailHijackedRecvMessage() override {
GPR_ASSERT(false &&
"It is illegal to call FailHijackedRecvMessage on a "
"method which has a Cancel notification");
CHECK(false) << "It is illegal to call FailHijackedRecvMessage on a "
"method which has a Cancel notification";
}
void FailHijackedSendMessage() override {
GPR_ASSERT(false &&
"It is illegal to call FailHijackedSendMessage on a "
"method which has a Cancel notification");
CHECK(false) << "It is illegal to call FailHijackedSendMessage on a "
"method which has a Cancel notification";
}
};
} // namespace internal

@ -21,6 +21,8 @@
#include <type_traits>
#include "absl/log/check.h"
#include <grpc/byte_buffer_reader.h>
#include <grpc/impl/grpc_types.h>
#include <grpc/slice.h>
@ -51,8 +53,8 @@ Status GenericSerialize(const grpc::protobuf::MessageLite& msg, ByteBuffer* bb,
if (static_cast<size_t>(byte_size) <= GRPC_SLICE_INLINED_SIZE) {
Slice slice(byte_size);
// We serialize directly into the allocated slices memory
GPR_ASSERT(slice.end() == msg.SerializeWithCachedSizesToArray(
const_cast<uint8_t*>(slice.begin())));
CHECK(slice.end() == msg.SerializeWithCachedSizesToArray(
const_cast<uint8_t*>(slice.begin())));
ByteBuffer tmp(&slice, 1);
bb->Swap(&tmp);

@ -25,6 +25,8 @@
#include <memory>
#include <vector>
#include "absl/log/check.h"
#include <grpc/support/log.h>
#include <grpcpp/impl/rpc_method.h>
#include <grpcpp/support/byte_buffer.h>
@ -75,7 +77,7 @@ class MethodHandler {
// retained by the handler. Returns nullptr if deserialization failed.
virtual void* Deserialize(grpc_call* /*call*/, grpc_byte_buffer* req,
Status* /*status*/, void** /*handler_data*/) {
GPR_ASSERT(req == nullptr);
CHECK_EQ(req, nullptr);
return nullptr;
}
};

@ -18,6 +18,8 @@
#ifndef GRPCPP_IMPL_SERVER_CALLBACK_HANDLERS_H
#define GRPCPP_IMPL_SERVER_CALLBACK_HANDLERS_H
#include "absl/log/check.h"
#include <grpc/grpc.h>
#include <grpc/impl/call.h>
#include <grpc/support/log.h>
@ -147,7 +149,7 @@ class CallbackUnaryHandler : public grpc::internal::MethodHandler {
}
void SendInitialMetadata() override {
GPR_ASSERT(!ctx_->sent_initial_metadata_);
CHECK(!ctx_->sent_initial_metadata_);
this->Ref();
// The callback for this function should not be marked inline because it
// is directly invoking a user-controlled reaction
@ -335,7 +337,7 @@ class CallbackClientStreamingHandler : public grpc::internal::MethodHandler {
}
void SendInitialMetadata() override {
GPR_ASSERT(!ctx_->sent_initial_metadata_);
CHECK(!ctx_->sent_initial_metadata_);
this->Ref();
// The callback for this function should not be inlined because it invokes
// a user-controlled reaction, but any resulting OnDone can be inlined in
@ -539,7 +541,7 @@ class CallbackServerStreamingHandler : public grpc::internal::MethodHandler {
}
void SendInitialMetadata() override {
GPR_ASSERT(!ctx_->sent_initial_metadata_);
CHECK(!ctx_->sent_initial_metadata_);
this->Ref();
// The callback for this function should not be inlined because it invokes
// a user-controlled reaction, but any resulting OnDone can be inlined in
@ -577,7 +579,7 @@ class CallbackServerStreamingHandler : public grpc::internal::MethodHandler {
ctx_->sent_initial_metadata_ = true;
}
// TODO(vjpai): don't assert
GPR_ASSERT(write_ops_.SendMessagePtr(resp, options).ok());
CHECK(write_ops_.SendMessagePtr(resp, options).ok());
call_.PerformOps(&write_ops_);
}
@ -585,7 +587,7 @@ class CallbackServerStreamingHandler : public grpc::internal::MethodHandler {
grpc::Status s) override {
// This combines the write into the finish callback
// TODO(vjpai): don't assert
GPR_ASSERT(finish_ops_.SendMessagePtr(resp, options).ok());
CHECK(finish_ops_.SendMessagePtr(resp, options).ok());
Finish(std::move(s));
}
@ -751,7 +753,7 @@ class CallbackBidiHandler : public grpc::internal::MethodHandler {
}
void SendInitialMetadata() override {
GPR_ASSERT(!ctx_->sent_initial_metadata_);
CHECK(!ctx_->sent_initial_metadata_);
this->Ref();
// The callback for this function should not be inlined because it invokes
// a user-controlled reaction, but any resulting OnDone can be inlined in
@ -789,14 +791,14 @@ class CallbackBidiHandler : public grpc::internal::MethodHandler {
ctx_->sent_initial_metadata_ = true;
}
// TODO(vjpai): don't assert
GPR_ASSERT(write_ops_.SendMessagePtr(resp, options).ok());
CHECK(write_ops_.SendMessagePtr(resp, options).ok());
call_.PerformOps(&write_ops_);
}
void WriteAndFinish(const ResponseType* resp, grpc::WriteOptions options,
grpc::Status s) override {
// TODO(vjpai): don't assert
GPR_ASSERT(finish_ops_.SendMessagePtr(resp, options).ok());
CHECK(finish_ops_.SendMessagePtr(resp, options).ok());
Finish(std::move(s));
}

@ -19,6 +19,8 @@
#ifndef GRPCPP_IMPL_SERVICE_TYPE_H
#define GRPCPP_IMPL_SERVICE_TYPE_H
#include "absl/log/check.h"
#include <grpc/support/log.h>
#include <grpcpp/impl/rpc_service_method.h>
#include <grpcpp/impl/serialization_traits.h>
@ -150,9 +152,9 @@ class Service {
// This does not have to be a hard error, however no one has approached us
// with a use case yet. Please file an issue if you believe you have one.
size_t idx = static_cast<size_t>(index);
GPR_ASSERT(methods_[idx].get() != nullptr &&
"Cannot mark the method as 'async' because it has already been "
"marked as 'generic'.");
CHECK_NE(methods_[idx].get(), nullptr)
<< "Cannot mark the method as 'async' because it has already been "
"marked as 'generic'.";
methods_[idx]->SetServerApiType(internal::RpcServiceMethod::ApiType::ASYNC);
}
@ -160,9 +162,9 @@ class Service {
// This does not have to be a hard error, however no one has approached us
// with a use case yet. Please file an issue if you believe you have one.
size_t idx = static_cast<size_t>(index);
GPR_ASSERT(methods_[idx].get() != nullptr &&
"Cannot mark the method as 'raw' because it has already "
"been marked as 'generic'.");
CHECK_NE(methods_[idx].get(), nullptr)
<< "Cannot mark the method as 'raw' because it has already "
"been marked as 'generic'.";
methods_[idx]->SetServerApiType(internal::RpcServiceMethod::ApiType::RAW);
}
@ -170,10 +172,9 @@ class Service {
// This does not have to be a hard error, however no one has approached us
// with a use case yet. Please file an issue if you believe you have one.
size_t idx = static_cast<size_t>(index);
GPR_ASSERT(
methods_[idx]->handler() != nullptr &&
"Cannot mark the method as 'generic' because it has already been "
"marked as 'async' or 'raw'.");
CHECK_NE(methods_[idx]->handler(), nullptr)
<< "Cannot mark the method as 'generic' because it has already been "
"marked as 'async' or 'raw'.";
methods_[idx].reset();
}
@ -181,8 +182,8 @@ class Service {
// This does not have to be a hard error, however no one has approached us
// with a use case yet. Please file an issue if you believe you have one.
size_t idx = static_cast<size_t>(index);
GPR_ASSERT(methods_[idx] && methods_[idx]->handler() &&
"Cannot mark an async or generic method Streamed");
CHECK(methods_[idx] && methods_[idx]->handler())
<< "Cannot mark an async or generic method Streamed";
methods_[idx]->SetHandler(streamed_method);
// From the server's point of view, streamed unary is a special
@ -196,10 +197,9 @@ class Service {
// This does not have to be a hard error, however no one has approached us
// with a use case yet. Please file an issue if you believe you have one.
size_t idx = static_cast<size_t>(index);
GPR_ASSERT(
methods_[idx].get() != nullptr &&
"Cannot mark the method as 'callback' because it has already been "
"marked as 'generic'.");
CHECK_NE(methods_[idx].get(), nullptr)
<< "Cannot mark the method as 'callback' because it has already been "
"marked as 'generic'.";
methods_[idx]->SetHandler(handler);
methods_[idx]->SetServerApiType(
internal::RpcServiceMethod::ApiType::CALL_BACK);
@ -209,10 +209,9 @@ class Service {
// This does not have to be a hard error, however no one has approached us
// with a use case yet. Please file an issue if you believe you have one.
size_t idx = static_cast<size_t>(index);
GPR_ASSERT(
methods_[idx].get() != nullptr &&
"Cannot mark the method as 'raw callback' because it has already "
"been marked as 'generic'.");
CHECK_NE(methods_[idx].get(), nullptr)
<< "Cannot mark the method as 'raw callback' because it has already "
"been marked as 'generic'.";
methods_[idx]->SetHandler(handler);
methods_[idx]->SetServerApiType(
internal::RpcServiceMethod::ApiType::RAW_CALL_BACK);

@ -27,6 +27,7 @@
#include <mutex>
#include "absl/log/check.h"
#include "absl/synchronization/mutex.h"
#include <grpc/support/log.h>
@ -105,7 +106,7 @@ class ABSL_SCOPED_LOCKABLE ReleasableMutexLock {
ReleasableMutexLock& operator=(const ReleasableMutexLock&) = delete;
void Release() ABSL_UNLOCK_FUNCTION() {
GPR_DEBUG_ASSERT(!released_);
DCHECK(!released_);
released_ = true;
mu_->Unlock();
}

@ -19,6 +19,8 @@
#ifndef GRPCPP_SERVER_INTERFACE_H
#define GRPCPP_SERVER_INTERFACE_H
#include "absl/log/check.h"
#include <grpc/grpc.h>
#include <grpc/impl/grpc_types.h>
#include <grpc/support/log.h>
@ -318,7 +320,7 @@ class ServerInterface : public internal::CallHook {
grpc::CompletionQueue* call_cq,
grpc::ServerCompletionQueue* notification_cq, void* tag,
Message* message) {
GPR_ASSERT(method);
CHECK(method);
new PayloadAsyncRequest<Message>(method, this, context, stream, call_cq,
notification_cq, tag, message);
}
@ -329,7 +331,7 @@ class ServerInterface : public internal::CallHook {
grpc::CompletionQueue* call_cq,
grpc::ServerCompletionQueue* notification_cq,
void* tag) {
GPR_ASSERT(method);
CHECK(method);
new NoPayloadAsyncRequest(method, this, context, stream, call_cq,
notification_cq, tag);
}

@ -19,6 +19,8 @@
#ifndef GRPCPP_SUPPORT_ASYNC_STREAM_H
#define GRPCPP_SUPPORT_ASYNC_STREAM_H
#include "absl/log/check.h"
#include <grpc/grpc.h>
#include <grpc/support/log.h>
#include <grpcpp/impl/call.h>
@ -200,7 +202,7 @@ class ClientAsyncReader final : public ClientAsyncReaderInterface<R> {
public:
// always allocated against a call arena, no memory free required
static void operator delete(void* /*ptr*/, std::size_t size) {
GPR_ASSERT(size == sizeof(ClientAsyncReader));
CHECK_EQ(size, sizeof(ClientAsyncReader));
}
// This operator should never be called as the memory should be freed as part
@ -208,10 +210,10 @@ class ClientAsyncReader final : public ClientAsyncReaderInterface<R> {
// delete to the operator new so that some compilers will not complain (see
// https://github.com/grpc/grpc/issues/11301) Note at the time of adding this
// there are no tests catching the compiler warning.
static void operator delete(void*, void*) { GPR_ASSERT(false); }
static void operator delete(void*, void*) { CHECK(false); }
void StartCall(void* tag) override {
GPR_ASSERT(!started_);
CHECK(!started_);
started_ = true;
StartCallInternal(tag);
}
@ -225,8 +227,8 @@ class ClientAsyncReader final : public ClientAsyncReaderInterface<R> {
/// calling code can access the received metadata through the
/// \a ClientContext.
void ReadInitialMetadata(void* tag) override {
GPR_ASSERT(started_);
GPR_ASSERT(!context_->initial_metadata_received_);
CHECK(started_);
CHECK(!context_->initial_metadata_received_);
meta_ops_.set_output_tag(tag);
meta_ops_.RecvInitialMetadata(context_);
@ -234,7 +236,7 @@ class ClientAsyncReader final : public ClientAsyncReaderInterface<R> {
}
void Read(R* msg, void* tag) override {
GPR_ASSERT(started_);
CHECK(started_);
read_ops_.set_output_tag(tag);
if (!context_->initial_metadata_received_) {
read_ops_.RecvInitialMetadata(context_);
@ -249,7 +251,7 @@ class ClientAsyncReader final : public ClientAsyncReaderInterface<R> {
/// - the \a ClientContext associated with this call is updated with
/// possible initial and trailing metadata received from the server.
void Finish(grpc::Status* status, void* tag) override {
GPR_ASSERT(started_);
CHECK(started_);
finish_ops_.set_output_tag(tag);
if (!context_->initial_metadata_received_) {
finish_ops_.RecvInitialMetadata(context_);
@ -265,12 +267,12 @@ class ClientAsyncReader final : public ClientAsyncReaderInterface<R> {
const W& request, bool start, void* tag)
: context_(context), call_(call), started_(start) {
// TODO(ctiller): don't assert
GPR_ASSERT(init_ops_.SendMessage(request).ok());
CHECK(init_ops_.SendMessage(request).ok());
init_ops_.ClientSendClose();
if (start) {
StartCallInternal(tag);
} else {
GPR_ASSERT(tag == nullptr);
CHECK(tag == nullptr);
}
}
@ -348,7 +350,7 @@ class ClientAsyncWriter final : public ClientAsyncWriterInterface<W> {
public:
// always allocated against a call arena, no memory free required
static void operator delete(void* /*ptr*/, std::size_t size) {
GPR_ASSERT(size == sizeof(ClientAsyncWriter));
CHECK_EQ(size, sizeof(ClientAsyncWriter));
}
// This operator should never be called as the memory should be freed as part
@ -356,10 +358,10 @@ class ClientAsyncWriter final : public ClientAsyncWriterInterface<W> {
// delete to the operator new so that some compilers will not complain (see
// https://github.com/grpc/grpc/issues/11301) Note at the time of adding this
// there are no tests catching the compiler warning.
static void operator delete(void*, void*) { GPR_ASSERT(false); }
static void operator delete(void*, void*) { CHECK(false); }
void StartCall(void* tag) override {
GPR_ASSERT(!started_);
CHECK(!started_);
started_ = true;
StartCallInternal(tag);
}
@ -372,8 +374,8 @@ class ClientAsyncWriter final : public ClientAsyncWriterInterface<W> {
/// associated with this call is updated, and the calling code can access
/// the received metadata through the \a ClientContext.
void ReadInitialMetadata(void* tag) override {
GPR_ASSERT(started_);
GPR_ASSERT(!context_->initial_metadata_received_);
CHECK(started_);
CHECK(!context_->initial_metadata_received_);
meta_ops_.set_output_tag(tag);
meta_ops_.RecvInitialMetadata(context_);
@ -381,27 +383,27 @@ class ClientAsyncWriter final : public ClientAsyncWriterInterface<W> {
}
void Write(const W& msg, void* tag) override {
GPR_ASSERT(started_);
CHECK(started_);
write_ops_.set_output_tag(tag);
// TODO(ctiller): don't assert
GPR_ASSERT(write_ops_.SendMessage(msg).ok());
CHECK(write_ops_.SendMessage(msg).ok());
call_.PerformOps(&write_ops_);
}
void Write(const W& msg, grpc::WriteOptions options, void* tag) override {
GPR_ASSERT(started_);
CHECK(started_);
write_ops_.set_output_tag(tag);
if (options.is_last_message()) {
options.set_buffer_hint();
write_ops_.ClientSendClose();
}
// TODO(ctiller): don't assert
GPR_ASSERT(write_ops_.SendMessage(msg, options).ok());
CHECK(write_ops_.SendMessage(msg, options).ok());
call_.PerformOps(&write_ops_);
}
void WritesDone(void* tag) override {
GPR_ASSERT(started_);
CHECK(started_);
write_ops_.set_output_tag(tag);
write_ops_.ClientSendClose();
call_.PerformOps(&write_ops_);
@ -415,7 +417,7 @@ class ClientAsyncWriter final : public ClientAsyncWriterInterface<W> {
/// - attempts to fill in the \a response parameter passed to this class's
/// constructor with the server's response message.
void Finish(grpc::Status* status, void* tag) override {
GPR_ASSERT(started_);
CHECK(started_);
finish_ops_.set_output_tag(tag);
if (!context_->initial_metadata_received_) {
finish_ops_.RecvInitialMetadata(context_);
@ -435,7 +437,7 @@ class ClientAsyncWriter final : public ClientAsyncWriterInterface<W> {
if (start) {
StartCallInternal(tag);
} else {
GPR_ASSERT(tag == nullptr);
CHECK(tag == nullptr);
}
}
@ -515,7 +517,7 @@ class ClientAsyncReaderWriter final
public:
// always allocated against a call arena, no memory free required
static void operator delete(void* /*ptr*/, std::size_t size) {
GPR_ASSERT(size == sizeof(ClientAsyncReaderWriter));
CHECK_EQ(size, sizeof(ClientAsyncReaderWriter));
}
// This operator should never be called as the memory should be freed as part
@ -523,10 +525,10 @@ class ClientAsyncReaderWriter final
// delete to the operator new so that some compilers will not complain (see
// https://github.com/grpc/grpc/issues/11301) Note at the time of adding this
// there are no tests catching the compiler warning.
static void operator delete(void*, void*) { GPR_ASSERT(false); }
static void operator delete(void*, void*) { CHECK(false); }
void StartCall(void* tag) override {
GPR_ASSERT(!started_);
CHECK(!started_);
started_ = true;
StartCallInternal(tag);
}
@ -539,8 +541,8 @@ class ClientAsyncReaderWriter final
/// is updated with it, and then the receiving initial metadata can
/// be accessed through this \a ClientContext.
void ReadInitialMetadata(void* tag) override {
GPR_ASSERT(started_);
GPR_ASSERT(!context_->initial_metadata_received_);
CHECK(started_);
CHECK(!context_->initial_metadata_received_);
meta_ops_.set_output_tag(tag);
meta_ops_.RecvInitialMetadata(context_);
@ -548,7 +550,7 @@ class ClientAsyncReaderWriter final
}
void Read(R* msg, void* tag) override {
GPR_ASSERT(started_);
CHECK(started_);
read_ops_.set_output_tag(tag);
if (!context_->initial_metadata_received_) {
read_ops_.RecvInitialMetadata(context_);
@ -558,27 +560,27 @@ class ClientAsyncReaderWriter final
}
void Write(const W& msg, void* tag) override {
GPR_ASSERT(started_);
CHECK(started_);
write_ops_.set_output_tag(tag);
// TODO(ctiller): don't assert
GPR_ASSERT(write_ops_.SendMessage(msg).ok());
CHECK(write_ops_.SendMessage(msg).ok());
call_.PerformOps(&write_ops_);
}
void Write(const W& msg, grpc::WriteOptions options, void* tag) override {
GPR_ASSERT(started_);
CHECK(started_);
write_ops_.set_output_tag(tag);
if (options.is_last_message()) {
options.set_buffer_hint();
write_ops_.ClientSendClose();
}
// TODO(ctiller): don't assert
GPR_ASSERT(write_ops_.SendMessage(msg, options).ok());
CHECK(write_ops_.SendMessage(msg, options).ok());
call_.PerformOps(&write_ops_);
}
void WritesDone(void* tag) override {
GPR_ASSERT(started_);
CHECK(started_);
write_ops_.set_output_tag(tag);
write_ops_.ClientSendClose();
call_.PerformOps(&write_ops_);
@ -589,7 +591,7 @@ class ClientAsyncReaderWriter final
/// - the \a ClientContext associated with this call is updated with
/// possible initial and trailing metadata sent from the server.
void Finish(grpc::Status* status, void* tag) override {
GPR_ASSERT(started_);
CHECK(started_);
finish_ops_.set_output_tag(tag);
if (!context_->initial_metadata_received_) {
finish_ops_.RecvInitialMetadata(context_);
@ -606,7 +608,7 @@ class ClientAsyncReaderWriter final
if (start) {
StartCallInternal(tag);
} else {
GPR_ASSERT(tag == nullptr);
CHECK(tag == nullptr);
}
}
@ -706,7 +708,7 @@ class ServerAsyncReader final : public ServerAsyncReaderInterface<W, R> {
/// - The initial metadata that will be sent to the client from this op will
/// be taken from the \a ServerContext associated with the call.
void SendInitialMetadata(void* tag) override {
GPR_ASSERT(!ctx_->sent_initial_metadata_);
CHECK(!ctx_->sent_initial_metadata_);
meta_ops_.set_output_tag(tag);
meta_ops_.SendInitialMetadata(&ctx_->initial_metadata_,
@ -765,7 +767,7 @@ class ServerAsyncReader final : public ServerAsyncReaderInterface<W, R> {
/// gRPC doesn't take ownership or a reference to \a status, so it is safe to
/// to deallocate once FinishWithError returns.
void FinishWithError(const grpc::Status& status, void* tag) override {
GPR_ASSERT(!status.ok());
CHECK(!status.ok());
finish_ops_.set_output_tag(tag);
if (!ctx_->sent_initial_metadata_) {
finish_ops_.SendInitialMetadata(&ctx_->initial_metadata_,
@ -855,7 +857,7 @@ class ServerAsyncWriter final : public ServerAsyncWriterInterface<W> {
///
/// \param[in] tag Tag identifying this request.
void SendInitialMetadata(void* tag) override {
GPR_ASSERT(!ctx_->sent_initial_metadata_);
CHECK(!ctx_->sent_initial_metadata_);
meta_ops_.set_output_tag(tag);
meta_ops_.SendInitialMetadata(&ctx_->initial_metadata_,
@ -871,7 +873,7 @@ class ServerAsyncWriter final : public ServerAsyncWriterInterface<W> {
write_ops_.set_output_tag(tag);
EnsureInitialMetadataSent(&write_ops_);
// TODO(ctiller): don't assert
GPR_ASSERT(write_ops_.SendMessage(msg).ok());
CHECK(write_ops_.SendMessage(msg).ok());
call_.PerformOps(&write_ops_);
}
@ -883,7 +885,7 @@ class ServerAsyncWriter final : public ServerAsyncWriterInterface<W> {
EnsureInitialMetadataSent(&write_ops_);
// TODO(ctiller): don't assert
GPR_ASSERT(write_ops_.SendMessage(msg, options).ok());
CHECK(write_ops_.SendMessage(msg, options).ok());
call_.PerformOps(&write_ops_);
}
@ -902,7 +904,7 @@ class ServerAsyncWriter final : public ServerAsyncWriterInterface<W> {
write_ops_.set_output_tag(tag);
EnsureInitialMetadataSent(&write_ops_);
options.set_buffer_hint();
GPR_ASSERT(write_ops_.SendMessage(msg, options).ok());
CHECK(write_ops_.SendMessage(msg, options).ok());
write_ops_.ServerSendStatus(&ctx_->trailing_metadata_, status);
call_.PerformOps(&write_ops_);
}
@ -1021,7 +1023,7 @@ class ServerAsyncReaderWriter final
///
/// \param[in] tag Tag identifying this request.
void SendInitialMetadata(void* tag) override {
GPR_ASSERT(!ctx_->sent_initial_metadata_);
CHECK(!ctx_->sent_initial_metadata_);
meta_ops_.set_output_tag(tag);
meta_ops_.SendInitialMetadata(&ctx_->initial_metadata_,
@ -1043,7 +1045,7 @@ class ServerAsyncReaderWriter final
write_ops_.set_output_tag(tag);
EnsureInitialMetadataSent(&write_ops_);
// TODO(ctiller): don't assert
GPR_ASSERT(write_ops_.SendMessage(msg).ok());
CHECK(write_ops_.SendMessage(msg).ok());
call_.PerformOps(&write_ops_);
}
@ -1053,7 +1055,7 @@ class ServerAsyncReaderWriter final
options.set_buffer_hint();
}
EnsureInitialMetadataSent(&write_ops_);
GPR_ASSERT(write_ops_.SendMessage(msg, options).ok());
CHECK(write_ops_.SendMessage(msg, options).ok());
call_.PerformOps(&write_ops_);
}
@ -1073,7 +1075,7 @@ class ServerAsyncReaderWriter final
write_ops_.set_output_tag(tag);
EnsureInitialMetadataSent(&write_ops_);
options.set_buffer_hint();
GPR_ASSERT(write_ops_.SendMessage(msg, options).ok());
CHECK(write_ops_.SendMessage(msg, options).ok());
write_ops_.ServerSendStatus(&ctx_->trailing_metadata_, status);
call_.PerformOps(&write_ops_);
}

@ -19,6 +19,8 @@
#ifndef GRPCPP_SUPPORT_ASYNC_UNARY_CALL_H
#define GRPCPP_SUPPORT_ASYNC_UNARY_CALL_H
#include "absl/log/check.h"
#include <grpc/grpc.h>
#include <grpc/support/log.h>
#include <grpcpp/client_context.h>
@ -130,7 +132,7 @@ class ClientAsyncResponseReaderHelper {
new (grpc_call_arena_alloc(call, sizeof(SingleBufType))) SingleBufType;
*single_buf_ptr = single_buf;
// TODO(ctiller): don't assert
GPR_ASSERT(single_buf->SendMessage(request).ok());
CHECK(single_buf->SendMessage(request).ok());
single_buf->ClientSendClose();
// The purpose of the following functions is to type-erase the actual
@ -220,7 +222,7 @@ class ClientAsyncResponseReader final
public:
// always allocated against a call arena, no memory free required
static void operator delete(void* /*ptr*/, std::size_t size) {
GPR_ASSERT(size == sizeof(ClientAsyncResponseReader));
CHECK_EQ(size, sizeof(ClientAsyncResponseReader));
}
// This operator should never be called as the memory should be freed as part
@ -228,10 +230,10 @@ class ClientAsyncResponseReader final
// delete to the operator new so that some compilers will not complain (see
// https://github.com/grpc/grpc/issues/11301) Note at the time of adding this
// there are no tests catching the compiler warning.
static void operator delete(void*, void*) { GPR_ASSERT(false); }
static void operator delete(void*, void*) { CHECK(false); }
void StartCall() override {
GPR_DEBUG_ASSERT(!started_);
DCHECK(!started_);
started_ = true;
internal::ClientAsyncResponseReaderHelper::StartCall(context_, single_buf_);
}
@ -243,8 +245,8 @@ class ClientAsyncResponseReader final
/// - the \a ClientContext associated with this call is updated with
/// possible initial and trailing metadata sent from the server.
void ReadInitialMetadata(void* tag) override {
GPR_DEBUG_ASSERT(started_);
GPR_DEBUG_ASSERT(!context_->initial_metadata_received_);
DCHECK(started_);
DCHECK(!context_->initial_metadata_received_);
read_initial_metadata_(context_, &call_, single_buf_, tag);
initial_metadata_read_ = true;
}
@ -255,7 +257,7 @@ class ClientAsyncResponseReader final
/// - the \a ClientContext associated with this call is updated with
/// possible initial and trailing metadata sent from the server.
void Finish(R* msg, grpc::Status* status, void* tag) override {
GPR_DEBUG_ASSERT(started_);
DCHECK(started_);
finish_(context_, &call_, initial_metadata_read_, single_buf_, &finish_buf_,
static_cast<void*>(msg), status, tag);
}
@ -304,7 +306,7 @@ class ServerAsyncResponseWriter final
///
/// \param[in] tag Tag identifying this request.
void SendInitialMetadata(void* tag) override {
GPR_ASSERT(!ctx_->sent_initial_metadata_);
CHECK(!ctx_->sent_initial_metadata_);
meta_buf_.set_output_tag(tag);
meta_buf_.SendInitialMetadata(&ctx_->initial_metadata_,
@ -373,7 +375,7 @@ class ServerAsyncResponseWriter final
/// deallocate them once the Finish operation is complete (i.e. a result
/// arrives in the completion queue).
void FinishWithError(const grpc::Status& status, void* tag) {
GPR_ASSERT(!status.ok());
CHECK(!status.ok());
finish_buf_.set_output_tag(tag);
if (!ctx_->sent_initial_metadata_) {
finish_buf_.SendInitialMetadata(&ctx_->initial_metadata_,

@ -21,6 +21,8 @@
#include <functional>
#include "absl/log/check.h"
#include <grpc/grpc.h>
#include <grpc/impl/grpc_types.h>
#include <grpc/support/log.h>
@ -71,7 +73,7 @@ class CallbackWithStatusTag : public grpc_completion_queue_functor {
public:
// always allocated against a call arena, no memory free required
static void operator delete(void* /*ptr*/, std::size_t size) {
GPR_ASSERT(size == sizeof(CallbackWithStatusTag));
CHECK_EQ(size, sizeof(CallbackWithStatusTag));
}
// This operator should never be called as the memory should be freed as part
@ -79,7 +81,7 @@ class CallbackWithStatusTag : public grpc_completion_queue_functor {
// delete to the operator new so that some compilers will not complain (see
// https://github.com/grpc/grpc/issues/11301) Note at the time of adding this
// there are no tests catching the compiler warning.
static void operator delete(void*, void*) { GPR_ASSERT(false); }
static void operator delete(void*, void*) { CHECK(false); }
CallbackWithStatusTag(grpc_call* call, std::function<void(Status)> f,
CompletionQueueTag* ops)
@ -118,7 +120,7 @@ class CallbackWithStatusTag : public grpc_completion_queue_functor {
// The tag was swallowed
return;
}
GPR_ASSERT(ignored == ops_);
CHECK(ignored == ops_);
// Last use of func_ or status_, so ok to move them out
auto func = std::move(func_);
@ -137,7 +139,7 @@ class CallbackWithSuccessTag : public grpc_completion_queue_functor {
public:
// always allocated against a call arena, no memory free required
static void operator delete(void* /*ptr*/, std::size_t size) {
GPR_ASSERT(size == sizeof(CallbackWithSuccessTag));
CHECK_EQ(size, sizeof(CallbackWithSuccessTag));
}
// This operator should never be called as the memory should be freed as part
@ -145,7 +147,7 @@ class CallbackWithSuccessTag : public grpc_completion_queue_functor {
// delete to the operator new so that some compilers will not complain (see
// https://github.com/grpc/grpc/issues/11301) Note at the time of adding this
// there are no tests catching the compiler warning.
static void operator delete(void*, void*) { GPR_ASSERT(false); }
static void operator delete(void*, void*) { CHECK(false); }
CallbackWithSuccessTag() : call_(nullptr) {}
@ -162,7 +164,7 @@ class CallbackWithSuccessTag : public grpc_completion_queue_functor {
// callbacks.
void Set(grpc_call* call, std::function<void(bool)> f,
CompletionQueueTag* ops, bool can_inline) {
GPR_ASSERT(call_ == nullptr);
CHECK_EQ(call_, nullptr);
grpc_call_ref(call);
call_ = call;
func_ = std::move(f);
@ -208,7 +210,7 @@ class CallbackWithSuccessTag : public grpc_completion_queue_functor {
#endif
bool do_callback = ops_->FinalizeResult(&ignored, &ok);
#ifndef NDEBUG
GPR_DEBUG_ASSERT(ignored == ops);
DCHECK(ignored == ops);
#endif
if (do_callback) {

@ -22,6 +22,8 @@
#include <atomic>
#include <functional>
#include "absl/log/check.h"
#include <grpc/grpc.h>
#include <grpc/impl/call.h>
#include <grpc/support/log.h>
@ -70,7 +72,7 @@ class CallbackUnaryCallImpl {
const InputMessage* request, OutputMessage* result,
std::function<void(grpc::Status)> on_completion) {
grpc::CompletionQueue* cq = channel->CallbackCQ();
GPR_ASSERT(cq != nullptr);
CHECK_NE(cq, nullptr);
grpc::internal::Call call(channel->CreateCall(method, context, cq));
using FullCallOpSet = grpc::internal::CallOpSet<
@ -304,7 +306,7 @@ class ClientBidiReactor : public internal::ClientReactor {
/// The argument to AddMultipleHolds must be positive.
void AddHold() { AddMultipleHolds(1); }
void AddMultipleHolds(int holds) {
GPR_DEBUG_ASSERT(holds > 0);
DCHECK_GT(holds, 0);
stream_->AddHold(holds);
}
void RemoveHold() { stream_->RemoveHold(); }
@ -368,7 +370,7 @@ class ClientReadReactor : public internal::ClientReactor {
void AddHold() { AddMultipleHolds(1); }
void AddMultipleHolds(int holds) {
GPR_DEBUG_ASSERT(holds > 0);
DCHECK_GT(holds, 0);
reader_->AddHold(holds);
}
void RemoveHold() { reader_->RemoveHold(); }
@ -400,7 +402,7 @@ class ClientWriteReactor : public internal::ClientReactor {
void AddHold() { AddMultipleHolds(1); }
void AddMultipleHolds(int holds) {
GPR_DEBUG_ASSERT(holds > 0);
DCHECK_GT(holds, 0);
writer_->AddHold(holds);
}
void RemoveHold() { writer_->RemoveHold(); }
@ -461,7 +463,7 @@ class ClientCallbackReaderWriterImpl
public:
// always allocated against a call arena, no memory free required
static void operator delete(void* /*ptr*/, std::size_t size) {
GPR_ASSERT(size == sizeof(ClientCallbackReaderWriterImpl));
CHECK_EQ(size, sizeof(ClientCallbackReaderWriterImpl));
}
// This operator should never be called as the memory should be freed as part
@ -469,7 +471,7 @@ class ClientCallbackReaderWriterImpl
// delete to the operator new so that some compilers will not complain (see
// https://github.com/grpc/grpc/issues/11301) Note at the time of adding this
// there are no tests catching the compiler warning.
static void operator delete(void*, void*) { GPR_ASSERT(false); }
static void operator delete(void*, void*) { CHECK(false); }
void StartCall() ABSL_LOCKS_EXCLUDED(start_mu_) override {
// This call initiates two batches, plus any backlog, each with a callback
@ -527,7 +529,7 @@ class ClientCallbackReaderWriterImpl
write_ops_.ClientSendClose();
}
// TODO(vjpai): don't assert
GPR_ASSERT(write_ops_.SendMessagePtr(msg, options).ok());
CHECK(write_ops_.SendMessagePtr(msg, options).ok());
callbacks_outstanding_.fetch_add(1, std::memory_order_relaxed);
if (GPR_UNLIKELY(corked_write_needed_)) {
write_ops_.SendInitialMetadata(&context_->send_initial_metadata_,
@ -719,7 +721,7 @@ class ClientCallbackReaderImpl : public ClientCallbackReader<Response> {
public:
// always allocated against a call arena, no memory free required
static void operator delete(void* /*ptr*/, std::size_t size) {
GPR_ASSERT(size == sizeof(ClientCallbackReaderImpl));
CHECK_EQ(size, sizeof(ClientCallbackReaderImpl));
}
// This operator should never be called as the memory should be freed as part
@ -727,7 +729,7 @@ class ClientCallbackReaderImpl : public ClientCallbackReader<Response> {
// delete to the operator new so that some compilers will not complain (see
// https://github.com/grpc/grpc/issues/11301) Note at the time of adding this
// there are no tests catching the compiler warning.
static void operator delete(void*, void*) { GPR_ASSERT(false); }
static void operator delete(void*, void*) { CHECK(false); }
void StartCall() override {
// This call initiates two batches, plus any backlog, each with a callback
@ -804,7 +806,7 @@ class ClientCallbackReaderImpl : public ClientCallbackReader<Response> {
: context_(context), call_(call), reactor_(reactor) {
this->BindReactor(reactor);
// TODO(vjpai): don't assert
GPR_ASSERT(start_ops_.SendMessagePtr(request).ok());
CHECK(start_ops_.SendMessagePtr(request).ok());
start_ops_.ClientSendClose();
}
@ -880,7 +882,7 @@ class ClientCallbackWriterImpl : public ClientCallbackWriter<Request> {
public:
// always allocated against a call arena, no memory free required
static void operator delete(void* /*ptr*/, std::size_t size) {
GPR_ASSERT(size == sizeof(ClientCallbackWriterImpl));
CHECK_EQ(size, sizeof(ClientCallbackWriterImpl));
}
// This operator should never be called as the memory should be freed as part
@ -888,7 +890,7 @@ class ClientCallbackWriterImpl : public ClientCallbackWriter<Request> {
// delete to the operator new so that some compilers will not complain (see
// https://github.com/grpc/grpc/issues/11301) Note at the time of adding this
// there are no tests catching the compiler warning.
static void operator delete(void*, void*) { GPR_ASSERT(false); }
static void operator delete(void*, void*) { CHECK(false); }
void StartCall() ABSL_LOCKS_EXCLUDED(start_mu_) override {
// This call initiates two batches, plus any backlog, each with a callback
@ -929,7 +931,7 @@ class ClientCallbackWriterImpl : public ClientCallbackWriter<Request> {
write_ops_.ClientSendClose();
}
// TODO(vjpai): don't assert
GPR_ASSERT(write_ops_.SendMessagePtr(msg, options).ok());
CHECK(write_ops_.SendMessagePtr(msg, options).ok());
callbacks_outstanding_.fetch_add(1, std::memory_order_relaxed);
if (GPR_UNLIKELY(corked_write_needed_)) {
@ -1110,7 +1112,7 @@ class ClientCallbackUnaryImpl final : public ClientCallbackUnary {
public:
// always allocated against a call arena, no memory free required
static void operator delete(void* /*ptr*/, std::size_t size) {
GPR_ASSERT(size == sizeof(ClientCallbackUnaryImpl));
CHECK_EQ(size, sizeof(ClientCallbackUnaryImpl));
}
// This operator should never be called as the memory should be freed as part
@ -1118,7 +1120,7 @@ class ClientCallbackUnaryImpl final : public ClientCallbackUnary {
// delete to the operator new so that some compilers will not complain (see
// https://github.com/grpc/grpc/issues/11301) Note at the time of adding this
// there are no tests catching the compiler warning.
static void operator delete(void*, void*) { GPR_ASSERT(false); }
static void operator delete(void*, void*) { CHECK(false); }
void StartCall() override {
// This call initiates two batches, each with a callback
@ -1157,7 +1159,7 @@ class ClientCallbackUnaryImpl final : public ClientCallbackUnary {
: context_(context), call_(call), reactor_(reactor) {
this->BindReactor(reactor);
// TODO(vjpai): don't assert
GPR_ASSERT(start_ops_.SendMessagePtr(request).ok());
CHECK(start_ops_.SendMessagePtr(request).ok());
start_ops_.ClientSendClose();
finish_ops_.RecvMessage(response);
finish_ops_.AllowNoMessage();

@ -22,6 +22,8 @@
#include <memory>
#include <vector>
#include "absl/log/check.h"
#include <grpc/support/log.h>
#include <grpcpp/impl/rpc_method.h>
#include <grpcpp/support/interceptor.h>
@ -139,7 +141,7 @@ class ClientRpcInfo {
// Runs interceptor at pos \a pos.
void RunInterceptor(
experimental::InterceptorBatchMethods* interceptor_methods, size_t pos) {
GPR_ASSERT(pos < interceptors_.size());
CHECK_LT(pos, interceptors_.size());
interceptors_[pos]->Intercept(interceptor_methods);
}

@ -19,6 +19,8 @@
#ifndef GRPCPP_SUPPORT_METHOD_HANDLER_H
#define GRPCPP_SUPPORT_METHOD_HANDLER_H
#include "absl/log/check.h"
#include <grpc/byte_buffer.h>
#include <grpc/support/log.h>
#include <grpcpp/impl/rpc_service_method.h>
@ -57,7 +59,7 @@ template <class Callable>
template <class ResponseType>
void UnaryRunHandlerHelper(const MethodHandler::HandlerParameter& param,
ResponseType* rsp, grpc::Status& status) {
GPR_ASSERT(!param.server_context->sent_initial_metadata_);
CHECK(!param.server_context->sent_initial_metadata_);
grpc::internal::CallOpSet<grpc::internal::CallOpSendInitialMetadata,
grpc::internal::CallOpSendMessage,
grpc::internal::CallOpServerSendStatus>

@ -21,6 +21,7 @@
#include <type_traits>
#include "absl/log/check.h"
#include "absl/strings/cord.h"
#include <grpc/byte_buffer.h>
@ -75,7 +76,7 @@ class ProtoBufferReader : public grpc::protobuf::io::ZeroCopyInputStream {
if (backup_count_ > 0) {
*data = GRPC_SLICE_START_PTR(*slice_) + GRPC_SLICE_LENGTH(*slice_) -
backup_count_;
GPR_ASSERT(backup_count_ <= INT_MAX);
CHECK_LE(backup_count_, INT_MAX);
*size = static_cast<int>(backup_count_);
backup_count_ = 0;
return true;
@ -86,7 +87,7 @@ class ProtoBufferReader : public grpc::protobuf::io::ZeroCopyInputStream {
}
*data = GRPC_SLICE_START_PTR(*slice_);
// On win x64, int is only 32bit
GPR_ASSERT(GRPC_SLICE_LENGTH(*slice_) <= INT_MAX);
CHECK_LE(GRPC_SLICE_LENGTH(*slice_), static_cast<size_t>(INT_MAX));
byte_count_ += * size = static_cast<int>(GRPC_SLICE_LENGTH(*slice_));
return true;
}
@ -98,7 +99,7 @@ class ProtoBufferReader : public grpc::protobuf::io::ZeroCopyInputStream {
/// bytes that have already been returned by the last call of Next.
/// So do the backup and have that ready for a later Next.
void BackUp(int count) override {
GPR_ASSERT(count <= static_cast<int>(GRPC_SLICE_LENGTH(*slice_)));
CHECK_LE(count, static_cast<int>(GRPC_SLICE_LENGTH(*slice_)));
backup_count_ = count;
}
@ -174,7 +175,7 @@ class ProtoBufferReader : public grpc::protobuf::io::ZeroCopyInputStream {
return true;
}
}
GPR_ASSERT(count == 0);
CHECK_EQ(count, 0);
return true;
}
#endif // GRPC_PROTOBUF_CORD_SUPPORT_ENABLED

@ -21,6 +21,7 @@
#include <type_traits>
#include "absl/log/check.h"
#include "absl/strings/cord.h"
#include <grpc/byte_buffer.h>
@ -64,7 +65,7 @@ class ProtoBufferWriter : public grpc::protobuf::io::ZeroCopyOutputStream {
total_size_(total_size),
byte_count_(0),
have_backup_(false) {
GPR_ASSERT(!byte_buffer->Valid());
CHECK(!byte_buffer->Valid());
/// Create an empty raw byte buffer and look at its underlying slice buffer
grpc_byte_buffer* bp = grpc_raw_byte_buffer_create(nullptr, 0);
byte_buffer->set_buffer(bp);
@ -81,7 +82,7 @@ class ProtoBufferWriter : public grpc::protobuf::io::ZeroCopyOutputStream {
/// safe for the caller to write from data[0, size - 1].
bool Next(void** data, int* size) override {
// Protobuf should not ask for more memory than total_size_.
GPR_ASSERT(byte_count_ < total_size_);
CHECK_LT(byte_count_, total_size_);
// 1. Use the remaining backup slice if we have one
// 2. Otherwise allocate a slice, up to the remaining length needed
// or our maximum allocation size
@ -106,7 +107,7 @@ class ProtoBufferWriter : public grpc::protobuf::io::ZeroCopyOutputStream {
}
*data = GRPC_SLICE_START_PTR(slice_);
// On win x64, int is only 32bit
GPR_ASSERT(GRPC_SLICE_LENGTH(slice_) <= INT_MAX);
CHECK(GRPC_SLICE_LENGTH(slice_) <= static_cast<size_t>(INT_MAX));
byte_count_ += * size = static_cast<int>(GRPC_SLICE_LENGTH(slice_));
// Using grpc_slice_buffer_add could modify slice_ and merge it with the
// previous slice. Therefore, use grpc_slice_buffer_add_indexed method to
@ -131,7 +132,7 @@ class ProtoBufferWriter : public grpc::protobuf::io::ZeroCopyOutputStream {
/// 2. Split it into the needed (if any) and unneeded part
/// 3. Add the needed part back to the slice buffer
/// 4. Mark that we still have the remaining part (for later use/unref)
GPR_ASSERT(count <= static_cast<int>(GRPC_SLICE_LENGTH(slice_)));
CHECK_LE(count, static_cast<int>(GRPC_SLICE_LENGTH(slice_)));
grpc_slice_buffer_pop(slice_buffer_);
if (static_cast<size_t>(count) == GRPC_SLICE_LENGTH(slice_)) {
backup_slice_ = slice_;

@ -22,6 +22,8 @@
#include <atomic>
#include <vector>
#include "absl/log/check.h"
#include <grpc/support/log.h>
#include <grpcpp/impl/rpc_method.h>
#include <grpcpp/support/interceptor.h>
@ -100,7 +102,7 @@ class ServerRpcInfo {
// Runs interceptor at pos \a pos.
void RunInterceptor(
experimental::InterceptorBatchMethods* interceptor_methods, size_t pos) {
GPR_ASSERT(pos < interceptors_.size());
CHECK_LT(pos, interceptors_.size());
interceptors_[pos]->Intercept(interceptor_methods);
}

@ -19,6 +19,8 @@
#ifndef GRPCPP_SUPPORT_SYNC_STREAM_H
#define GRPCPP_SUPPORT_SYNC_STREAM_H
#include "absl/log/check.h"
#include <grpc/support/log.h>
#include <grpcpp/client_context.h>
#include <grpcpp/completion_queue.h>
@ -184,7 +186,7 @@ class ClientReader final : public ClientReaderInterface<R> {
/// the server will be accessible through the \a ClientContext used to
/// construct this object.
void WaitForInitialMetadata() override {
GPR_ASSERT(!context_->initial_metadata_received_);
CHECK(!context_->initial_metadata_received_);
grpc::internal::CallOpSet<grpc::internal::CallOpRecvInitialMetadata> ops;
ops.RecvInitialMetadata(context_);
@ -230,7 +232,7 @@ class ClientReader final : public ClientReaderInterface<R> {
grpc::Status status;
ops.ClientRecvStatus(context_, &status);
call_.PerformOps(&ops);
GPR_ASSERT(cq_.Pluck(&ops));
CHECK(cq_.Pluck(&ops));
return status;
}
@ -259,7 +261,7 @@ class ClientReader final : public ClientReaderInterface<R> {
ops.SendInitialMetadata(&context->send_initial_metadata_,
context->initial_metadata_flags());
// TODO(ctiller): don't assert
GPR_ASSERT(ops.SendMessagePtr(&request).ok());
CHECK(ops.SendMessagePtr(&request).ok());
ops.ClientSendClose();
call_.PerformOps(&ops);
cq_.Pluck(&ops);
@ -306,7 +308,7 @@ class ClientWriter : public ClientWriterInterface<W> {
/// Once complete, the initial metadata read from the server will be
/// accessible through the \a ClientContext used to construct this object.
void WaitForInitialMetadata() {
GPR_ASSERT(!context_->initial_metadata_received_);
CHECK(!context_->initial_metadata_received_);
grpc::internal::CallOpSet<grpc::internal::CallOpRecvInitialMetadata> ops;
ops.RecvInitialMetadata(context_);
@ -364,7 +366,7 @@ class ClientWriter : public ClientWriterInterface<W> {
}
finish_ops_.ClientRecvStatus(context_, &status);
call_.PerformOps(&finish_ops_);
GPR_ASSERT(cq_.Pluck(&finish_ops_));
CHECK(cq_.Pluck(&finish_ops_));
return status;
}
@ -455,7 +457,7 @@ class ClientReaderWriter final : public ClientReaderWriterInterface<W, R> {
/// Once complete, the initial metadata read from the server will be
/// accessible through the \a ClientContext used to construct this object.
void WaitForInitialMetadata() override {
GPR_ASSERT(!context_->initial_metadata_received_);
CHECK(!context_->initial_metadata_received_);
grpc::internal::CallOpSet<grpc::internal::CallOpRecvInitialMetadata> ops;
ops.RecvInitialMetadata(context_);
@ -536,7 +538,7 @@ class ClientReaderWriter final : public ClientReaderWriterInterface<W, R> {
grpc::Status status;
ops.ClientRecvStatus(context_, &status);
call_.PerformOps(&ops);
GPR_ASSERT(cq_.Pluck(&ops));
CHECK(cq_.Pluck(&ops));
return status;
}
@ -583,7 +585,7 @@ class ServerReader final : public ServerReaderInterface<R> {
/// for semantics. Note that initial metadata will be affected by the
/// \a ServerContext associated with this call.
void SendInitialMetadata() override {
GPR_ASSERT(!ctx_->sent_initial_metadata_);
CHECK(!ctx_->sent_initial_metadata_);
grpc::internal::CallOpSet<grpc::internal::CallOpSendInitialMetadata> ops;
ops.SendInitialMetadata(&ctx_->initial_metadata_,
@ -640,7 +642,7 @@ class ServerWriter final : public ServerWriterInterface<W> {
/// Note that initial metadata will be affected by the
/// \a ServerContext associated with this call.
void SendInitialMetadata() override {
GPR_ASSERT(!ctx_->sent_initial_metadata_);
CHECK(!ctx_->sent_initial_metadata_);
grpc::internal::CallOpSet<grpc::internal::CallOpSendInitialMetadata> ops;
ops.SendInitialMetadata(&ctx_->initial_metadata_,
@ -713,7 +715,7 @@ class ServerReaderWriterBody final {
: call_(call), ctx_(ctx) {}
void SendInitialMetadata() {
GPR_ASSERT(!ctx_->sent_initial_metadata_);
CHECK(!ctx_->sent_initial_metadata_);
grpc::internal::CallOpSet<grpc::internal::CallOpSendInitialMetadata> ops;
ops.SendInitialMetadata(&ctx_->initial_metadata_,

18
package.xml generated

@ -105,10 +105,14 @@
<file baseinstalldir="/" name="include/grpc/support/thd_id.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/time.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/workaround_list.h" role="src" />
<file baseinstalldir="/" name="src/core/channelz/channel_trace.cc" role="src" />
<file baseinstalldir="/" name="src/core/channelz/channel_trace.h" role="src" />
<file baseinstalldir="/" name="src/core/channelz/channelz.cc" role="src" />
<file baseinstalldir="/" name="src/core/channelz/channelz.h" role="src" />
<file baseinstalldir="/" name="src/core/channelz/channelz_registry.cc" role="src" />
<file baseinstalldir="/" name="src/core/channelz/channelz_registry.h" role="src" />
<file baseinstalldir="/" name="src/core/client_channel/backup_poller.cc" role="src" />
<file baseinstalldir="/" name="src/core/client_channel/backup_poller.h" role="src" />
<file baseinstalldir="/" name="src/core/client_channel/client_channel_channelz.cc" role="src" />
<file baseinstalldir="/" name="src/core/client_channel/client_channel_channelz.h" role="src" />
<file baseinstalldir="/" name="src/core/client_channel/client_channel_factory.cc" role="src" />
<file baseinstalldir="/" name="src/core/client_channel/client_channel_factory.h" role="src" />
<file baseinstalldir="/" name="src/core/client_channel/client_channel_filter.cc" role="src" />
@ -1132,12 +1136,6 @@
<file baseinstalldir="/" name="src/core/lib/channel/channel_stack_builder_impl.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/channel_stack_trace.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/channel_stack_trace.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/channel_trace.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/channel_trace.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/channelz.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/channelz.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/channelz_registry.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/channelz_registry.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/connected_channel.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/connected_channel.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/context.h" role="src" />
@ -1789,12 +1787,12 @@
<file baseinstalldir="/" name="src/core/lib/transport/batch_builder.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/transport/bdp_estimator.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/transport/bdp_estimator.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/transport/call_arena_allocator.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/transport/call_arena_allocator.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/transport/call_filters.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/transport/call_filters.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/transport/call_final_info.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/transport/call_final_info.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/transport/call_size_estimator.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/transport/call_size_estimator.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/transport/call_spine.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/transport/call_spine.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/transport/connectivity_state.cc" role="src" />

@ -3309,29 +3309,6 @@ grpc_cc_library(
],
)
grpc_cc_library(
name = "client_channel_channelz",
srcs = [
"client_channel/client_channel_channelz.cc",
],
hdrs = [
"client_channel/client_channel_channelz.h",
],
external_deps = [
"absl/base:core_headers",
"absl/strings",
],
language = "c++",
deps = [
"connectivity_state",
"json",
"//:channelz",
"//:gpr",
"//:grpc_public_hdrs",
"//:ref_counted_ptr",
],
)
grpc_cc_library(
name = "service_config_channel_arg_filter",
srcs = [
@ -5511,7 +5488,6 @@ grpc_cc_library(
language = "c++",
deps = [
"channel_args",
"client_channel_channelz",
"client_channel_internal_header",
"closure",
"connectivity_state",
@ -7279,6 +7255,25 @@ grpc_cc_library(
],
)
grpc_cc_library(
name = "interception_chain",
srcs = [
"lib/transport/interception_chain.cc",
],
hdrs = [
"lib/transport/interception_chain.h",
],
deps = [
"call_destination",
"call_filters",
"call_spine",
"match",
"metadata",
"ref_counted",
"//:gpr_platform",
],
)
grpc_cc_library(
name = "call_destination",
hdrs = [
@ -7355,17 +7350,19 @@ grpc_cc_library(
],
deps = [
"1999",
"call_arena_allocator",
"call_filters",
"for_each",
"if",
"latch",
"message",
"metadata",
"pipe",
"prioritized_race",
"promise_status",
"status_flag",
"try_seq",
"//:gpr",
"//:legacy_context",
"//:promise",
],
)
@ -7429,14 +7426,19 @@ grpc_cc_library(
)
grpc_cc_library(
name = "call_size_estimator",
name = "call_arena_allocator",
srcs = [
"lib/transport/call_size_estimator.cc",
"lib/transport/call_arena_allocator.cc",
],
hdrs = [
"lib/transport/call_size_estimator.h",
"lib/transport/call_arena_allocator.h",
],
deps = [
"arena",
"memory_quota",
"ref_counted",
"//:gpr_platform",
],
deps = ["//:gpr_platform"],
)
grpc_cc_library(

@ -16,7 +16,7 @@
//
//
#include "src/core/lib/channel/channel_trace.h"
#include "src/core/channelz/channel_trace.h"
#include <memory>
#include <utility>
@ -27,7 +27,7 @@
#include <grpc/support/json.h>
#include <grpc/support/port_platform.h>
#include "src/core/lib/channel/channelz.h"
#include "src/core/channelz/channelz.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/slice/slice.h"
@ -36,37 +36,68 @@
namespace grpc_core {
namespace channelz {
//
// ChannelTrace::TraceEvent
//
ChannelTrace::TraceEvent::TraceEvent(Severity severity, const grpc_slice& data,
RefCountedPtr<BaseNode> referenced_entity)
: severity_(severity),
: timestamp_(Timestamp::Now().as_timespec(GPR_CLOCK_REALTIME)),
severity_(severity),
data_(data),
timestamp_(Timestamp::Now().as_timespec(GPR_CLOCK_REALTIME)),
next_(nullptr),
referenced_entity_(std::move(referenced_entity)),
memory_usage_(sizeof(TraceEvent) + grpc_slice_memory_usage(data)) {}
memory_usage_(sizeof(TraceEvent) + grpc_slice_memory_usage(data)),
referenced_entity_(std::move(referenced_entity)) {}
ChannelTrace::TraceEvent::TraceEvent(Severity severity, const grpc_slice& data)
: severity_(severity),
data_(data),
timestamp_(Timestamp::Now().as_timespec(GPR_CLOCK_REALTIME)),
next_(nullptr),
memory_usage_(sizeof(TraceEvent) + grpc_slice_memory_usage(data)) {}
: TraceEvent(severity, data, nullptr) {}
ChannelTrace::TraceEvent::~TraceEvent() { CSliceUnref(data_); }
ChannelTrace::ChannelTrace(size_t max_event_memory)
: num_events_logged_(0),
event_list_memory_usage_(0),
max_event_memory_(max_event_memory),
head_trace_(nullptr),
tail_trace_(nullptr) {
if (max_event_memory_ == 0) {
return; // tracing is disabled if max_event_memory_ == 0
namespace {
const char* SeverityString(ChannelTrace::Severity severity) {
switch (severity) {
case ChannelTrace::Severity::Info:
return "CT_INFO";
case ChannelTrace::Severity::Warning:
return "CT_WARNING";
case ChannelTrace::Severity::Error:
return "CT_ERROR";
default:
GPR_UNREACHABLE_CODE(return "CT_UNKNOWN");
}
}
} // anonymous namespace
Json ChannelTrace::TraceEvent::RenderTraceEvent() const {
char* description = grpc_slice_to_c_string(data_);
Json::Object object = {
{"description", Json::FromString(description)},
{"severity", Json::FromString(SeverityString(severity_))},
{"timestamp", Json::FromString(gpr_format_timespec(timestamp_))},
};
gpr_free(description);
if (referenced_entity_ != nullptr) {
const bool is_channel =
(referenced_entity_->type() == BaseNode::EntityType::kTopLevelChannel ||
referenced_entity_->type() == BaseNode::EntityType::kInternalChannel);
object[is_channel ? "channelRef" : "subchannelRef"] = Json::FromObject({
{(is_channel ? "channelId" : "subchannelId"),
Json::FromString(absl::StrCat(referenced_entity_->uuid()))},
});
}
gpr_mu_init(&tracer_mu_);
time_created_ = Timestamp::Now().as_timespec(GPR_CLOCK_REALTIME);
return Json::FromObject(std::move(object));
}
//
// ChannelTrace
//
ChannelTrace::ChannelTrace(size_t max_event_memory)
: max_event_memory_(max_event_memory),
time_created_(Timestamp::Now().as_timespec(GPR_CLOCK_REALTIME)) {}
ChannelTrace::~ChannelTrace() {
if (max_event_memory_ == 0) {
return; // tracing is disabled if max_event_memory_ == 0
@ -77,10 +108,10 @@ ChannelTrace::~ChannelTrace() {
it = it->next();
delete to_free;
}
gpr_mu_destroy(&tracer_mu_);
}
void ChannelTrace::AddTraceEventHelper(TraceEvent* new_trace_event) {
MutexLock lock(&mu_);
++num_events_logged_;
// first event case
if (head_trace_ == nullptr) {
@ -121,43 +152,6 @@ void ChannelTrace::AddTraceEventWithReference(
new TraceEvent(severity, data, std::move(referenced_entity)));
}
namespace {
const char* severity_string(ChannelTrace::Severity severity) {
switch (severity) {
case ChannelTrace::Severity::Info:
return "CT_INFO";
case ChannelTrace::Severity::Warning:
return "CT_WARNING";
case ChannelTrace::Severity::Error:
return "CT_ERROR";
default:
GPR_UNREACHABLE_CODE(return "CT_UNKNOWN");
}
}
} // anonymous namespace
Json ChannelTrace::TraceEvent::RenderTraceEvent() const {
char* description = grpc_slice_to_c_string(data_);
Json::Object object = {
{"description", Json::FromString(description)},
{"severity", Json::FromString(severity_string(severity_))},
{"timestamp", Json::FromString(gpr_format_timespec(timestamp_))},
};
gpr_free(description);
if (referenced_entity_ != nullptr) {
const bool is_channel =
(referenced_entity_->type() == BaseNode::EntityType::kTopLevelChannel ||
referenced_entity_->type() == BaseNode::EntityType::kInternalChannel);
object[is_channel ? "channelRef" : "subchannelRef"] = Json::FromObject({
{(is_channel ? "channelId" : "subchannelId"),
Json::FromString(absl::StrCat(referenced_entity_->uuid()))},
});
}
return Json::FromObject(std::move(object));
}
Json ChannelTrace::RenderJson() const {
// Tracing is disabled if max_event_memory_ == 0.
if (max_event_memory_ == 0) {
@ -167,6 +161,7 @@ Json ChannelTrace::RenderJson() const {
{"creationTimestamp",
Json::FromString(gpr_format_timespec(time_created_))},
};
MutexLock lock(&mu_);
if (num_events_logged_ > 0) {
object["numEventsLogged"] =
Json::FromString(absl::StrCat(num_events_logged_));

@ -16,18 +16,20 @@
//
//
#ifndef GRPC_SRC_CORE_LIB_CHANNEL_CHANNEL_TRACE_H
#define GRPC_SRC_CORE_LIB_CHANNEL_CHANNEL_TRACE_H
#ifndef GRPC_SRC_CORE_CHANNELZ_CHANNEL_TRACE_H
#define GRPC_SRC_CORE_CHANNELZ_CHANNEL_TRACE_H
#include <stddef.h>
#include <stdint.h>
#include "absl/base/thread_annotations.h"
#include <grpc/slice.h>
#include <grpc/support/port_platform.h>
#include <grpc/support/sync.h>
#include <grpc/support/time.h>
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/sync.h"
#include "src/core/lib/json/json.h"
namespace grpc_core {
@ -110,28 +112,29 @@ class ChannelTrace {
size_t memory_usage() const { return memory_usage_; }
private:
Severity severity_;
grpc_slice data_;
gpr_timespec timestamp_;
TraceEvent* next_;
const gpr_timespec timestamp_;
const Severity severity_;
const grpc_slice data_;
const size_t memory_usage_;
// the tracer object for the (sub)channel that this trace event refers to.
RefCountedPtr<BaseNode> referenced_entity_;
size_t memory_usage_;
const RefCountedPtr<BaseNode> referenced_entity_;
TraceEvent* next_ = nullptr;
}; // TraceEvent
// Internal helper to add and link in a trace event
void AddTraceEventHelper(TraceEvent* new_trace_event);
gpr_mu tracer_mu_;
uint64_t num_events_logged_;
size_t event_list_memory_usage_;
size_t max_event_memory_;
TraceEvent* head_trace_;
TraceEvent* tail_trace_;
gpr_timespec time_created_;
const size_t max_event_memory_;
const gpr_timespec time_created_;
mutable Mutex mu_;
uint64_t num_events_logged_ ABSL_GUARDED_BY(mu_) = 0;
size_t event_list_memory_usage_ ABSL_GUARDED_BY(mu_) = 0;
TraceEvent* head_trace_ ABSL_GUARDED_BY(mu_) = nullptr;
TraceEvent* tail_trace_ ABSL_GUARDED_BY(mu_) = nullptr;
};
} // namespace channelz
} // namespace grpc_core
#endif // GRPC_SRC_CORE_LIB_CHANNEL_CHANNEL_TRACE_H
#endif // GRPC_SRC_CORE_CHANNELZ_CHANNEL_TRACE_H

@ -16,7 +16,7 @@
//
//
#include "src/core/lib/channel/channelz.h"
#include "src/core/channelz/channelz.h"
#include <algorithm>
#include <atomic>
@ -32,10 +32,10 @@
#include <grpc/support/port_platform.h>
#include <grpc/support/time.h>
#include "src/core/channelz/channelz_registry.h"
#include "src/core/lib/address_utils/parse_address.h"
#include "src/core/lib/address_utils/sockaddr_utils.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channelz_registry.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gpr/useful.h"
#include "src/core/lib/iomgr/resolved_address.h"
@ -262,6 +262,68 @@ void ChannelNode::RemoveChildSubchannel(intptr_t child_uuid) {
child_subchannels_.erase(child_uuid);
}
//
// SubchannelNode
//
SubchannelNode::SubchannelNode(std::string target_address,
size_t channel_tracer_max_nodes)
: BaseNode(EntityType::kSubchannel, target_address),
target_(std::move(target_address)),
trace_(channel_tracer_max_nodes) {}
SubchannelNode::~SubchannelNode() {}
void SubchannelNode::UpdateConnectivityState(grpc_connectivity_state state) {
connectivity_state_.store(state, std::memory_order_relaxed);
}
void SubchannelNode::SetChildSocket(RefCountedPtr<SocketNode> socket) {
MutexLock lock(&socket_mu_);
child_socket_ = std::move(socket);
}
Json SubchannelNode::RenderJson() {
// Create and fill the data child.
grpc_connectivity_state state =
connectivity_state_.load(std::memory_order_relaxed);
Json::Object data = {
{"state", Json::FromObject({
{"state", Json::FromString(ConnectivityStateName(state))},
})},
{"target", Json::FromString(target_)},
};
// Fill in the channel trace if applicable
Json trace_json = trace_.RenderJson();
if (trace_json.type() != Json::Type::kNull) {
data["trace"] = std::move(trace_json);
}
// Ask CallCountingHelper to populate call count data.
call_counter_.PopulateCallCounts(&data);
// Construct top-level object.
Json::Object object{
{"ref", Json::FromObject({
{"subchannelId", Json::FromString(absl::StrCat(uuid()))},
})},
{"data", Json::FromObject(std::move(data))},
};
// Populate the child socket.
RefCountedPtr<SocketNode> child_socket;
{
MutexLock lock(&socket_mu_);
child_socket = child_socket_;
}
if (child_socket != nullptr && child_socket->uuid() != 0) {
object["socketRef"] = Json::FromArray({
Json::FromObject({
{"socketId", Json::FromString(absl::StrCat(child_socket->uuid()))},
{"name", Json::FromString(child_socket->name())},
}),
});
}
return Json::FromObject(object);
}
//
// ServerNode
//

@ -16,8 +16,8 @@
//
//
#ifndef GRPC_SRC_CORE_LIB_CHANNEL_CHANNELZ_H
#define GRPC_SRC_CORE_LIB_CHANNEL_CHANNELZ_H
#ifndef GRPC_SRC_CORE_CHANNELZ_CHANNELZ_H
#define GRPC_SRC_CORE_CHANNELZ_CHANNELZ_H
#include <stddef.h>
@ -28,6 +28,7 @@
#include <string>
#include <utility>
#include "absl/base/thread_annotations.h"
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
@ -36,7 +37,7 @@
#include <grpc/slice.h>
#include <grpc/support/port_platform.h>
#include "src/core/lib/channel/channel_trace.h"
#include "src/core/channelz/channel_trace.h"
#include "src/core/lib/gpr/time_precise.h"
#include "src/core/lib/gpr/useful.h"
#include "src/core/lib/gprpp/per_cpu.h"
@ -245,6 +246,45 @@ class ChannelNode final : public BaseNode {
std::set<intptr_t> child_subchannels_;
};
// Handles channelz bookkeeping for subchannels
class SubchannelNode final : public BaseNode {
public:
SubchannelNode(std::string target_address, size_t channel_tracer_max_nodes);
~SubchannelNode() override;
// Sets the subchannel's connectivity state without health checking.
void UpdateConnectivityState(grpc_connectivity_state state);
// Used when the subchannel's child socket changes. This should be set when
// the subchannel's transport is created and set to nullptr when the
// subchannel unrefs the transport.
void SetChildSocket(RefCountedPtr<SocketNode> socket);
Json RenderJson() override;
// proxy methods to composed classes.
void AddTraceEvent(ChannelTrace::Severity severity, const grpc_slice& data) {
trace_.AddTraceEvent(severity, data);
}
void AddTraceEventWithReference(ChannelTrace::Severity severity,
const grpc_slice& data,
RefCountedPtr<BaseNode> referenced_channel) {
trace_.AddTraceEventWithReference(severity, data,
std::move(referenced_channel));
}
void RecordCallStarted() { call_counter_.RecordCallStarted(); }
void RecordCallFailed() { call_counter_.RecordCallFailed(); }
void RecordCallSucceeded() { call_counter_.RecordCallSucceeded(); }
private:
std::atomic<grpc_connectivity_state> connectivity_state_{GRPC_CHANNEL_IDLE};
Mutex socket_mu_;
RefCountedPtr<SocketNode> child_socket_ ABSL_GUARDED_BY(socket_mu_);
std::string target_;
CallCountingHelper call_counter_;
ChannelTrace trace_;
};
// Handles channelz bookkeeping for servers
class ServerNode final : public BaseNode {
public:
@ -380,4 +420,4 @@ class ListenSocketNode final : public BaseNode {
} // namespace channelz
} // namespace grpc_core
#endif // GRPC_SRC_CORE_LIB_CHANNEL_CHANNELZ_H
#endif // GRPC_SRC_CORE_CHANNELZ_CHANNELZ_H

@ -16,7 +16,7 @@
//
//
#include "src/core/lib/channel/channelz_registry.h"
#include "src/core/channelz/channelz_registry.h"
#include <algorithm>
#include <cstdint>
@ -30,7 +30,7 @@
#include <grpc/support/port_platform.h>
#include <grpc/support/string_util.h>
#include "src/core/lib/channel/channelz.h"
#include "src/core/channelz/channelz.h"
#include "src/core/lib/gprpp/sync.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/json/json.h"

@ -16,8 +16,8 @@
//
//
#ifndef GRPC_SRC_CORE_LIB_CHANNEL_CHANNELZ_REGISTRY_H
#define GRPC_SRC_CORE_LIB_CHANNEL_CHANNELZ_REGISTRY_H
#ifndef GRPC_SRC_CORE_CHANNELZ_CHANNELZ_REGISTRY_H
#define GRPC_SRC_CORE_CHANNELZ_CHANNELZ_REGISTRY_H
#include <cstdint>
#include <map>
@ -27,7 +27,7 @@
#include <grpc/support/port_platform.h>
#include "src/core/lib/channel/channelz.h"
#include "src/core/channelz/channelz.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/sync.h"
@ -99,4 +99,4 @@ class ChannelzRegistry final {
} // namespace channelz
} // namespace grpc_core
#endif // GRPC_SRC_CORE_LIB_CHANNEL_CHANNELZ_REGISTRY_H
#endif // GRPC_SRC_CORE_CHANNELZ_CHANNELZ_REGISTRY_H

@ -1,93 +0,0 @@
//
//
// Copyright 2018 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
//
#include <grpc/support/port_platform.h>
#include "src/core/client_channel/client_channel_channelz.h"
#include "absl/strings/str_cat.h"
#include <grpc/support/json.h>
#include "src/core/lib/transport/connectivity_state.h"
// IWYU pragma: no_include <type_traits>
namespace grpc_core {
namespace channelz {
SubchannelNode::SubchannelNode(std::string target_address,
size_t channel_tracer_max_nodes)
: BaseNode(EntityType::kSubchannel, target_address),
target_(std::move(target_address)),
trace_(channel_tracer_max_nodes) {}
SubchannelNode::~SubchannelNode() {}
void SubchannelNode::UpdateConnectivityState(grpc_connectivity_state state) {
connectivity_state_.store(state, std::memory_order_relaxed);
}
void SubchannelNode::SetChildSocket(RefCountedPtr<SocketNode> socket) {
MutexLock lock(&socket_mu_);
child_socket_ = std::move(socket);
}
Json SubchannelNode::RenderJson() {
// Create and fill the data child.
grpc_connectivity_state state =
connectivity_state_.load(std::memory_order_relaxed);
Json::Object data = {
{"state", Json::FromObject({
{"state", Json::FromString(ConnectivityStateName(state))},
})},
{"target", Json::FromString(target_)},
};
// Fill in the channel trace if applicable
Json trace_json = trace_.RenderJson();
if (trace_json.type() != Json::Type::kNull) {
data["trace"] = std::move(trace_json);
}
// Ask CallCountingHelper to populate call count data.
call_counter_.PopulateCallCounts(&data);
// Construct top-level object.
Json::Object object{
{"ref", Json::FromObject({
{"subchannelId", Json::FromString(absl::StrCat(uuid()))},
})},
{"data", Json::FromObject(std::move(data))},
};
// Populate the child socket.
RefCountedPtr<SocketNode> child_socket;
{
MutexLock lock(&socket_mu_);
child_socket = child_socket_;
}
if (child_socket != nullptr && child_socket->uuid() != 0) {
object["socketRef"] = Json::FromArray({
Json::FromObject({
{"socketId", Json::FromString(absl::StrCat(child_socket->uuid()))},
{"name", Json::FromString(child_socket->name())},
}),
});
}
return Json::FromObject(object);
}
} // namespace channelz
} // namespace grpc_core

@ -1,85 +0,0 @@
//
//
// Copyright 2018 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
//
#ifndef GRPC_SRC_CORE_CLIENT_CHANNEL_CLIENT_CHANNEL_CHANNELZ_H
#define GRPC_SRC_CORE_CLIENT_CHANNEL_CLIENT_CHANNEL_CHANNELZ_H
#include <grpc/support/port_platform.h>
#include <stddef.h>
#include <atomic>
#include <string>
#include <utility>
#include "absl/base/thread_annotations.h"
#include <grpc/impl/connectivity_state.h>
#include <grpc/slice.h>
#include "src/core/lib/channel/channel_trace.h"
#include "src/core/lib/channel/channelz.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/sync.h"
#include "src/core/lib/json/json.h"
namespace grpc_core {
namespace channelz {
class SubchannelNode final : public BaseNode {
public:
SubchannelNode(std::string target_address, size_t channel_tracer_max_nodes);
~SubchannelNode() override;
// Sets the subchannel's connectivity state without health checking.
void UpdateConnectivityState(grpc_connectivity_state state);
// Used when the subchannel's child socket changes. This should be set when
// the subchannel's transport is created and set to nullptr when the
// subchannel unrefs the transport.
void SetChildSocket(RefCountedPtr<SocketNode> socket);
Json RenderJson() override;
// proxy methods to composed classes.
void AddTraceEvent(ChannelTrace::Severity severity, const grpc_slice& data) {
trace_.AddTraceEvent(severity, data);
}
void AddTraceEventWithReference(ChannelTrace::Severity severity,
const grpc_slice& data,
RefCountedPtr<BaseNode> referenced_channel) {
trace_.AddTraceEventWithReference(severity, data,
std::move(referenced_channel));
}
void RecordCallStarted() { call_counter_.RecordCallStarted(); }
void RecordCallFailed() { call_counter_.RecordCallFailed(); }
void RecordCallSucceeded() { call_counter_.RecordCallSucceeded(); }
private:
std::atomic<grpc_connectivity_state> connectivity_state_{GRPC_CHANNEL_IDLE};
Mutex socket_mu_;
RefCountedPtr<SocketNode> child_socket_ ABSL_GUARDED_BY(socket_mu_);
std::string target_;
CallCountingHelper call_counter_;
ChannelTrace trace_;
};
} // namespace channelz
} // namespace grpc_core
#endif // GRPC_SRC_CORE_CLIENT_CHANNEL_CLIENT_CHANNEL_CHANNELZ_H

@ -49,8 +49,8 @@
#include <grpc/support/string_util.h>
#include <grpc/support/time.h>
#include "src/core/channelz/channel_trace.h"
#include "src/core/client_channel/backup_poller.h"
#include "src/core/client_channel/client_channel_channelz.h"
#include "src/core/client_channel/client_channel_internal.h"
#include "src/core/client_channel/client_channel_service_config.h"
#include "src/core/client_channel/config_selector.h"
@ -63,7 +63,6 @@
#include "src/core/ext/filters/deadline/deadline_filter.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channel_stack.h"
#include "src/core/lib/channel/channel_trace.h"
#include "src/core/lib/channel/status_util.h"
#include "src/core/lib/config/core_configuration.h"
#include "src/core/lib/debug/trace.h"

@ -37,6 +37,7 @@
#include <grpc/grpc.h>
#include <grpc/impl/connectivity_state.h>
#include "src/core/channelz/channelz.h"
#include "src/core/client_channel/client_channel_factory.h"
#include "src/core/client_channel/config_selector.h"
#include "src/core/client_channel/dynamic_filters.h"
@ -46,7 +47,6 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channel_fwd.h"
#include "src/core/lib/channel/channel_stack.h"
#include "src/core/lib/channel/channelz.h"
#include "src/core/lib/channel/context.h"
#include "src/core/lib/gpr/time_precise.h"
#include "src/core/lib/gprpp/orphanable.h"

@ -19,8 +19,8 @@
#include <grpc/support/port_platform.h>
#include "src/core/channelz/channelz.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channelz.h"
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/time.h"

@ -37,14 +37,14 @@
#include <grpc/status.h>
#include <grpc/support/log.h>
#include "src/core/channelz/channel_trace.h"
#include "src/core/channelz/channelz.h"
#include "src/core/client_channel/subchannel_pool_interface.h"
#include "src/core/lib/address_utils/sockaddr_utils.h"
#include "src/core/lib/backoff/backoff.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channel_stack.h"
#include "src/core/lib/channel/channel_stack_builder_impl.h"
#include "src/core/lib/channel/channel_trace.h"
#include "src/core/lib/channel/channelz.h"
#include "src/core/lib/config/core_configuration.h"
#include "src/core/lib/debug/stats.h"
#include "src/core/lib/debug/stats_data.h"

@ -31,7 +31,6 @@
#include <grpc/event_engine/event_engine.h>
#include <grpc/impl/connectivity_state.h>
#include "src/core/client_channel/client_channel_channelz.h"
#include "src/core/client_channel/connector.h"
#include "src/core/client_channel/subchannel_pool_interface.h"
#include "src/core/lib/backoff/backoff.h"

@ -5,9 +5,6 @@ DerivePointerAlignment: false
PointerAlignment: Left
IncludeBlocks: Regroup
IncludeCategories:
# port_platform.h is before almost everything
- Regex: '^<grpc/(support|impl/codegen)/port_platform.h>'
Priority: -100
# ruby.h is even more first if it's included
- Regex: '^<ruby/ruby.h>'
Priority: -200

@ -15,8 +15,6 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_CLIENT_BINDER_CONNECTOR_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_CLIENT_BINDER_CONNECTOR_H
#include <grpc/support/port_platform.h>
#include <memory>
#include <utility>
@ -24,6 +22,7 @@
#include "absl/strings/strip.h"
#include <grpc/impl/grpc_types.h>
#include <grpc/support/port_platform.h>
#include <grpcpp/channel.h>
#include <grpcpp/support/channel_arguments.h>

@ -34,13 +34,12 @@
#ifdef GPR_SUPPORT_BINDER_TRANSPORT
#include <grpc/support/port_platform.h>
#include "absl/memory/memory.h"
#include "absl/strings/substitute.h"
#include "absl/time/clock.h"
#include "absl/time/time.h"
#include <grpc/support/port_platform.h>
#include <grpcpp/impl/grpc_library.h>
#include "src/core/client_channel/client_channel_filter.h"

@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/client/channel_create_impl.h"
#include <grpc/support/port_platform.h>
#ifndef GRPC_NO_BINDER
#include <memory>

@ -16,7 +16,6 @@
#define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_CLIENT_CHANNEL_CREATE_IMPL_H
#include <grpc/support/port_platform.h>
#include <grpcpp/security/binder_security_policy.h>
#include "src/core/ext/transport/binder/wire_format/binder.h"

@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/client/connection_id_generator.h"
#include <grpc/support/port_platform.h>
#ifndef GRPC_NO_BINDER
#include "absl/strings/str_cat.h"

@ -15,12 +15,12 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_CLIENT_CONNECTION_ID_GENERATOR_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_CLIENT_CONNECTION_ID_GENERATOR_H
#include <grpc/support/port_platform.h>
#include <map>
#include "absl/strings/string_view.h"
#include <grpc/support/port_platform.h>
#include "src/core/lib/gprpp/sync.h"
namespace grpc_binder {

@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/client/endpoint_binder_pool.h"
#include <grpc/support/port_platform.h>
#ifndef GRPC_NO_BINDER
#include "src/core/ext/transport/binder/client/jni_utils.h"

@ -15,13 +15,13 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_CLIENT_ENDPOINT_BINDER_POOL_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_CLIENT_ENDPOINT_BINDER_POOL_H
#include <grpc/support/port_platform.h>
#include <functional>
#include <string>
#include "absl/container/flat_hash_map.h"
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/wire_format/binder.h"
#include "src/core/lib/gprpp/sync.h"

@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/client/jni_utils.h"
#include <grpc/support/port_platform.h>
#ifndef GRPC_NO_BINDER
#include <grpc/support/log.h>

@ -17,8 +17,6 @@
#if defined(ANDROID) || defined(__ANDROID__)
#include <grpc/support/port_platform.h>
#include <jni.h>
#include <functional>
@ -26,6 +24,8 @@
#include "absl/strings/string_view.h"
#include <grpc/support/port_platform.h>
namespace grpc_binder {
// Finds NativeConnectionHelper Java class and caches it. This is useful because

@ -15,11 +15,10 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_CLIENT_SECURITY_POLICY_SETTING_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_CLIENT_SECURITY_POLICY_SETTING_H
#include <grpc/support/port_platform.h>
#include "absl/container/flat_hash_map.h"
#include "absl/strings/string_view.h"
#include <grpc/support/port_platform.h>
#include <grpcpp/security/binder_security_policy.h>
#include "src/core/lib/gprpp/sync.h"

@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/server/binder_server.h"
#include <grpc/support/port_platform.h>
#ifndef GRPC_NO_BINDER
#include <memory>

@ -15,13 +15,12 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_SERVER_BINDER_SERVER_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_SERVER_BINDER_SERVER_H
#include <grpc/support/port_platform.h>
#include <string>
#include "absl/container/flat_hash_map.h"
#include "absl/status/status.h"
#include <grpc/support/port_platform.h>
#include <grpcpp/security/binder_security_policy.h>
#include "src/core/ext/transport/binder/transport/binder_transport.h"

@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/transport/binder_transport.h"
#include <grpc/support/port_platform.h>
#ifndef GRPC_NO_BINDER
#include <cstdint>

@ -15,8 +15,6 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_TRANSPORT_BINDER_TRANSPORT_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_TRANSPORT_BINDER_TRANSPORT_H
#include <grpc/support/port_platform.h>
#include <atomic>
#include <memory>
#include <string>
@ -26,6 +24,7 @@
#include "absl/container/flat_hash_map.h"
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
#include <grpcpp/security/binder_security_policy.h>
#include "src/core/ext/transport/binder/utils/transport_stream_receiver.h"
@ -42,8 +41,7 @@ struct grpc_binder_stream;
// depends on what style we want to follow)
// TODO(mingcl): Decide casing for this class name. Should we use C-style class
// name here or just go with C++ style?
struct grpc_binder_transport final : public grpc_core::Transport,
public grpc_core::FilterStackTransport {
struct grpc_binder_transport final : public grpc_core::FilterStackTransport {
explicit grpc_binder_transport(
std::unique_ptr<grpc_binder::Binder> binder, bool is_client,
std::shared_ptr<grpc::experimental::binder::SecurityPolicy>

@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/utils/ndk_binder.h"
#include <grpc/support/port_platform.h>
#ifndef GRPC_NO_BINDER
#ifdef GPR_SUPPORT_BINDER_TRANSPORT

@ -15,14 +15,14 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_UTILS_TRANSPORT_STREAM_RECEIVER_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_UTILS_TRANSPORT_STREAM_RECEIVER_H
#include <grpc/support/port_platform.h>
#include <functional>
#include <string>
#include <vector>
#include "absl/status/statusor.h"
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/wire_format/transaction.h"
namespace grpc_binder {

@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/utils/transport_stream_receiver_impl.h"
#include <grpc/support/port_platform.h>
#ifndef GRPC_NO_BINDER
#include <functional>

@ -15,8 +15,6 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_UTILS_TRANSPORT_STREAM_RECEIVER_IMPL_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_UTILS_TRANSPORT_STREAM_RECEIVER_IMPL_H
#include <grpc/support/port_platform.h>
#include <functional>
#include <map>
#include <queue>
@ -24,6 +22,8 @@
#include <string>
#include <vector>
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/utils/transport_stream_receiver.h"
#include "src/core/lib/gprpp/sync.h"

@ -15,8 +15,6 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_BINDER_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_BINDER_H
#include <grpc/support/port_platform.h>
#include <cstdint>
#include <functional>
#include <memory>
@ -25,6 +23,8 @@
#include "absl/status/status.h"
#include "absl/strings/string_view.h"
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/wire_format/binder_constants.h"
#include "src/core/lib/gprpp/orphanable.h"

@ -15,12 +15,12 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_BINDER_CONSTANTS_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_BINDER_CONSTANTS_H
#include <grpc/support/port_platform.h>
#include <cstdint>
#include "absl/base/attributes.h"
#include <grpc/support/port_platform.h>
using transaction_code_t = uint32_t;
ABSL_CONST_INIT extern const int FIRST_CALL_TRANSACTION;

@ -15,14 +15,13 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_TRANSACTION_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_TRANSACTION_H
#include <grpc/support/port_platform.h>
#include <string>
#include <vector>
#include "absl/strings/string_view.h"
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
#include "src/core/lib/gprpp/crash.h"

@ -15,11 +15,11 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_WIRE_READER_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_WIRE_READER_H
#include <grpc/support/port_platform.h>
#include <memory>
#include <utility>
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/wire_format/binder.h"
#include "src/core/ext/transport/binder/wire_format/wire_writer.h"
#include "src/core/lib/gprpp/orphanable.h"

@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/wire_format/wire_reader_impl.h"
#include <grpc/support/port_platform.h>
#ifndef GRPC_NO_BINDER
#include <functional>

@ -15,8 +15,6 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_WIRE_READER_IMPL_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_WIRE_READER_IMPL_H
#include <grpc/support/port_platform.h>
#include <memory>
#include <queue>
#include <utility>
@ -24,6 +22,7 @@
#include "absl/container/flat_hash_map.h"
#include "absl/functional/any_invocable.h"
#include <grpc/support/port_platform.h>
#include <grpcpp/security/binder_security_policy.h>
#include "src/core/ext/transport/binder/utils/transport_stream_receiver.h"

@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/wire_format/wire_writer.h"
#include <grpc/support/port_platform.h>
#ifndef GRPC_NO_BINDER
#include <utility>

@ -15,14 +15,14 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_WIRE_WRITER_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_BINDER_WIRE_FORMAT_WIRE_WRITER_H
#include <grpc/support/port_platform.h>
#include <queue>
#include <string>
#include <vector>
#include "absl/container/flat_hash_map.h"
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/binder/wire_format/binder.h"
#include "src/core/ext/transport/binder/wire_format/transaction.h"
#include "src/core/lib/gprpp/sync.h"

@ -65,8 +65,7 @@
namespace grpc_core {
namespace chaotic_good {
class ChaoticGoodClientTransport final : public Transport,
public ClientTransport {
class ChaoticGoodClientTransport final : public ClientTransport {
public:
ChaoticGoodClientTransport(
PromiseEndpoint control_endpoint, PromiseEndpoint data_endpoint,

@ -29,10 +29,10 @@
#include <grpc/event_engine/event_engine.h>
#include <grpc/support/port_platform.h>
#include "src/core/channelz/channelz.h"
#include "src/core/ext/transport/chttp2/transport/hpack_encoder.h"
#include "src/core/ext/transport/chttp2/transport/hpack_parser.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channelz.h"
#include "src/core/lib/gprpp/sync.h"
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/iomgr/closure.h"

@ -78,8 +78,7 @@
namespace grpc_core {
namespace chaotic_good {
class ChaoticGoodServerTransport final : public Transport,
public ServerTransport {
class ChaoticGoodServerTransport final : public ServerTransport {
public:
ChaoticGoodServerTransport(
const ChannelArgs& args, PromiseEndpoint control_endpoint,

@ -38,6 +38,7 @@
#include <grpc/support/port_platform.h>
#include <grpc/support/sync.h>
#include "src/core/channelz/channelz.h"
#include "src/core/client_channel/client_channel_factory.h"
#include "src/core/client_channel/client_channel_filter.h"
#include "src/core/client_channel/connector.h"
@ -46,7 +47,6 @@
#include "src/core/lib/address_utils/sockaddr_utils.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channel_args_preconditioning.h"
#include "src/core/lib/channel/channelz.h"
#include "src/core/lib/config/core_configuration.h"
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/event_engine/channel_args_endpoint_config.h"

@ -46,12 +46,12 @@
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
#include "src/core/channelz/channelz.h"
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include "src/core/ext/transport/chttp2/transport/internal.h"
#include "src/core/ext/transport/chttp2/transport/legacy_frame.h"
#include "src/core/lib/address_utils/sockaddr_utils.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channelz.h"
#include "src/core/lib/config/core_configuration.h"
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/event_engine/channel_args_endpoint_config.h"

@ -5,9 +5,6 @@ DerivePointerAlignment: false
PointerAlignment: Left
IncludeBlocks: Regroup
IncludeCategories:
# port_platform.h is before almost everything
- Regex: '^<grpc/(support|impl/codegen)/port_platform.h>'
Priority: -100
# ruby.h is even more first if it's included
- Regex: '^<ruby/ruby.h>'
Priority: -200

@ -16,14 +16,13 @@
//
//
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/chttp2/transport/bin_decoder.h"
#include "absl/base/attributes.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
#include "src/core/lib/slice/slice.h"

@ -19,12 +19,11 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_DECODER_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_DECODER_H
#include <grpc/support/port_platform.h>
#include <stddef.h>
#include <stdint.h>
#include <grpc/slice.h>
#include <grpc/support/port_platform.h>
struct grpc_base64_decode_context {
// input/output:

@ -16,14 +16,13 @@
//
//
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/chttp2/transport/bin_encoder.h"
#include <stdint.h>
#include <string.h>
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/chttp2/transport/huffsyms.h"

@ -19,11 +19,10 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_ENCODER_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_ENCODER_H
#include <grpc/support/port_platform.h>
#include <stdint.h>
#include <grpc/slice.h>
#include <grpc/support/port_platform.h>
// base64 encode a slice. Returns a new slice, does not take ownership of the
// input

@ -14,8 +14,6 @@
// limitations under the License.
//
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h"
#include <inttypes.h>
@ -54,6 +52,7 @@
#include <grpc/status.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
#include <grpc/support/time.h>
#include "src/core/ext/transport/chttp2/transport/context_list_entry.h"

@ -19,19 +19,18 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_CHTTP2_TRANSPORT_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_CHTTP2_TRANSPORT_H
#include <grpc/support/port_platform.h>
#include <cstdint>
#include <string>
#include "absl/types/optional.h"
#include <grpc/slice.h>
#include <grpc/support/port_platform.h>
#include "src/core/channelz/channelz.h"
#include "src/core/ext/transport/chttp2/transport/flow_control.h"
#include "src/core/lib/channel/call_tracer.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channelz.h"
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/time.h"

@ -19,8 +19,6 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_CONTEXT_LIST_ENTRY_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_CONTEXT_LIST_ENTRY_H
#include <grpc/support/port_platform.h>
#include <stddef.h>
#include <stdint.h>
@ -28,6 +26,8 @@
#include <utility>
#include <vector>
#include <grpc/support/port_platform.h>
#include "src/core/lib/channel/tcp_tracer.h"
namespace grpc_core {

@ -15,9 +15,9 @@
// This file is autogenerated: see
// tools/codegen/core/gen_huffman_decompressor.cc
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/chttp2/transport/decode_huff.h"
#include <grpc/support/port_platform.h>
namespace grpc_core {
const uint8_t HuffDecoderCommon::table2_0_emit_[10] = {
0x30, 0x31, 0x32, 0x61, 0x63, 0x65, 0x69, 0x6f, 0x73, 0x74};

@ -17,10 +17,10 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_DECODE_HUFF_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_DECODE_HUFF_H
#include <grpc/support/port_platform.h>
#include <cstddef>
#include <cstdint>
#include <grpc/support/port_platform.h>
namespace grpc_core {
class HuffDecoderCommon {
protected:

@ -16,8 +16,6 @@
//
//
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/chttp2/transport/flow_control.h"
#include <inttypes.h>
@ -34,6 +32,7 @@
#include "absl/strings/str_join.h"
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/chttp2/transport/http2_settings.h"
#include "src/core/lib/experiments/experiments.h"

@ -19,8 +19,6 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FLOW_CONTROL_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FLOW_CONTROL_H
#include <grpc/support/port_platform.h>
#include <limits.h>
#include <stdint.h>
@ -34,6 +32,7 @@
#include "absl/types/optional.h"
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/chttp2/transport/http2_settings.h"
#include "src/core/lib/debug/trace.h"

@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/chttp2/transport/frame.h"
#include <stddef.h>
@ -25,6 +23,7 @@
#include "absl/strings/str_cat.h"
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
#include "src/core/lib/gprpp/crash.h"

@ -15,8 +15,6 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_H
#include <grpc/support/port_platform.h>
#include <cstdint>
#include <string>
#include <vector>
@ -26,6 +24,8 @@
#include "absl/types/span.h"
#include "absl/types/variant.h"
#include <grpc/support/port_platform.h>
#include "src/core/lib/slice/slice.h"
#include "src/core/lib/slice/slice_buffer.h"

@ -16,8 +16,6 @@
//
//
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/chttp2/transport/frame_data.h"
#include <stdlib.h>
@ -27,6 +25,7 @@
#include <grpc/slice_buffer.h>
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/chttp2/transport/internal.h"
#include "src/core/lib/experiments/experiments.h"

@ -21,13 +21,12 @@
// Parser for GRPC streams embedded in DATA frames
#include <grpc/support/port_platform.h>
#include <stdint.h>
#include "absl/status/status.h"
#include <grpc/slice.h>
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/chttp2/transport/legacy_frame.h"
#include "src/core/lib/iomgr/error.h"

@ -16,8 +16,6 @@
//
//
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/chttp2/transport/frame_goaway.h"
#include <string.h>
@ -30,6 +28,7 @@
#include <grpc/slice_buffer.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/chttp2/transport/internal.h"

@ -19,11 +19,10 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_GOAWAY_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_GOAWAY_H
#include <grpc/support/port_platform.h>
#include <stdint.h>
#include <grpc/slice.h>
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/chttp2/transport/legacy_frame.h"
#include "src/core/lib/iomgr/error.h"

@ -16,8 +16,6 @@
//
//
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/chttp2/transport/frame_ping.h"
#include <inttypes.h>
@ -31,6 +29,7 @@
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/chttp2/transport/internal.h"
#include "src/core/ext/transport/chttp2/transport/ping_abuse_policy.h"

@ -19,11 +19,10 @@
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_PING_H
#define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_PING_H
#include <grpc/support/port_platform.h>
#include <stdint.h>
#include <grpc/slice.h>
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/chttp2/transport/legacy_frame.h"
#include "src/core/lib/iomgr/error.h"

@ -16,8 +16,6 @@
//
//
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/chttp2/transport/frame_rst_stream.h"
#include <stddef.h>
@ -29,6 +27,7 @@
#include <grpc/slice_buffer.h>
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/chttp2/transport/http_trace.h"
#include "src/core/ext/transport/chttp2/transport/internal.h"

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

Loading…
Cancel
Save