From c515eba30be9f69c1a4e999c40504fe25536bf25 Mon Sep 17 00:00:00 2001 From: Vignesh Babu Date: Thu, 20 Apr 2023 09:32:27 -0700 Subject: [PATCH] [Transport] Update Chttp2 context list to include relative offset of traced RPCs within outgoing buffer (#32825) The PR also creates a separate BUILD target for: - chttp2 context list - iomgr buffer_list - iomgr internal errqueue This would allow the context list to be included as standalone dependencies for EventEngine implementations. --- BUILD | 57 +++++- CMakeLists.txt | 52 ----- Makefile | 2 - bazel/grpc_build_system.bzl | 2 + build_autogenerated.yaml | 41 +--- config.m4 | 1 - config.w32 | 1 - gRPC-C++.podspec | 4 +- gRPC-Core.podspec | 5 +- grpc.gemspec | 3 +- grpc.gyp | 2 - package.xml | 3 +- .../chttp2/transport/chttp2_transport.cc | 57 +++++- .../chttp2/transport/chttp2_transport.h | 21 ++ .../chttp2/transport/context_list.cc | 71 ------- .../transport/chttp2/transport/context_list.h | 54 ------ .../chttp2/transport/context_list_entry.h | 70 +++++++ .../ext/transport/chttp2/transport/internal.h | 5 +- .../ext/transport/chttp2/transport/writing.cc | 17 +- src/core/lib/iomgr/buffer_list.h | 1 - src/python/grpcio/grpc_core_dependencies.py | 1 - test/core/transport/chttp2/BUILD | 17 -- .../transport/chttp2/context_list_test.cc | 181 ------------------ tools/doxygen/Doxyfile.c++.internal | 3 +- tools/doxygen/Doxyfile.core.internal | 3 +- tools/run_tests/generated/tests.json | 24 --- 26 files changed, 223 insertions(+), 475 deletions(-) delete mode 100644 src/core/ext/transport/chttp2/transport/context_list.cc delete mode 100644 src/core/ext/transport/chttp2/transport/context_list.h create mode 100644 src/core/ext/transport/chttp2/transport/context_list_entry.h delete mode 100644 test/core/transport/chttp2/context_list_test.cc diff --git a/BUILD b/BUILD index da2de3c321b..956c30a4a3e 100644 --- a/BUILD +++ b/BUILD @@ -1233,7 +1233,6 @@ grpc_cc_library( "//src/core:lib/compression/compression.cc", "//src/core:lib/compression/compression_internal.cc", "//src/core:lib/compression/message_compress.cc", - "//src/core:lib/iomgr/buffer_list.cc", "//src/core:lib/iomgr/call_combiner.cc", "//src/core:lib/iomgr/cfstream_handle.cc", "//src/core:lib/iomgr/dualstack_socket_posix.cc", @@ -1252,7 +1251,6 @@ grpc_cc_library( "//src/core:lib/iomgr/gethostname_fallback.cc", "//src/core:lib/iomgr/gethostname_host_name_max.cc", "//src/core:lib/iomgr/gethostname_sysconf.cc", - "//src/core:lib/iomgr/internal_errqueue.cc", "//src/core:lib/iomgr/iocp_windows.cc", "//src/core:lib/iomgr/iomgr.cc", "//src/core:lib/iomgr/iomgr_posix.cc", @@ -1344,7 +1342,6 @@ grpc_cc_library( "//src/core:lib/compression/compression_internal.h", "//src/core:lib/compression/message_compress.h", "//src/core:lib/iomgr/block_annotate.h", - "//src/core:lib/iomgr/buffer_list.h", "//src/core:lib/iomgr/call_combiner.h", "//src/core:lib/iomgr/cfstream_handle.h", "//src/core:lib/iomgr/dynamic_annotations.h", @@ -1357,7 +1354,6 @@ grpc_cc_library( "//src/core:lib/iomgr/ev_poll_posix.h", "//src/core:lib/iomgr/ev_posix.h", "//src/core:lib/iomgr/gethostname.h", - "//src/core:lib/iomgr/internal_errqueue.h", "//src/core:lib/iomgr/iocp_windows.h", "//src/core:lib/iomgr/iomgr.h", "//src/core:lib/iomgr/load_file.h", @@ -1462,6 +1458,8 @@ grpc_cc_library( "gpr", "grpc_public_hdrs", "grpc_trace", + "iomgr_buffer_list", + "iomgr_internal_errqueue", "iomgr_timer", "orphanable", "parse_address", @@ -2607,6 +2605,45 @@ grpc_cc_library( ], ) +grpc_cc_library( + name = "iomgr_internal_errqueue", + srcs = [ + "//src/core:lib/iomgr/internal_errqueue.cc", + ], + hdrs = [ + "//src/core:lib/iomgr/internal_errqueue.h", + ], + tags = ["nofixdeps"], + visibility = ["@grpc:iomgr_internal_errqueue"], + deps = [ + "gpr", + "//src/core:iomgr_port", + "//src/core:strerror", + ], +) + +grpc_cc_library( + name = "iomgr_buffer_list", + srcs = [ + "//src/core:lib/iomgr/buffer_list.cc", + ], + hdrs = [ + "//src/core:lib/iomgr/buffer_list.h", + ], + external_deps = [ + "absl/strings", + "absl/strings:str_format", + ], + tags = ["nofixdeps"], + visibility = ["@grpc:iomgr_buffer_list"], + deps = [ + "gpr", + "iomgr_internal_errqueue", + "//src/core:error", + "//src/core:iomgr_port", + ], +) + grpc_cc_library( name = "uri_parser", srcs = [ @@ -3708,12 +3745,19 @@ grpc_cc_library( deps = ["gpr"], ) +grpc_cc_library( + name = "chttp2_context_list_entry", + hdrs = [ + "//src/core:ext/transport/chttp2/transport/context_list_entry.h", + ], + deps = ["gpr"], +) + grpc_cc_library( name = "grpc_transport_chttp2", srcs = [ "//src/core:ext/transport/chttp2/transport/bin_decoder.cc", "//src/core:ext/transport/chttp2/transport/chttp2_transport.cc", - "//src/core:ext/transport/chttp2/transport/context_list.cc", "//src/core:ext/transport/chttp2/transport/frame_data.cc", "//src/core:ext/transport/chttp2/transport/frame_goaway.cc", "//src/core:ext/transport/chttp2/transport/frame_ping.cc", @@ -3728,7 +3772,6 @@ grpc_cc_library( hdrs = [ "//src/core:ext/transport/chttp2/transport/bin_decoder.h", "//src/core:ext/transport/chttp2/transport/chttp2_transport.h", - "//src/core:ext/transport/chttp2/transport/context_list.h", "//src/core:ext/transport/chttp2/transport/frame_data.h", "//src/core:ext/transport/chttp2/transport/frame_goaway.h", "//src/core:ext/transport/chttp2/transport/frame_ping.h", @@ -3749,6 +3792,7 @@ grpc_cc_library( language = "c++", visibility = ["@grpc:grpclb"], deps = [ + "chttp2_context_list_entry", "chttp2_frame", "chttp2_varint", "debug_location", @@ -3762,6 +3806,7 @@ grpc_cc_library( "hpack_parser_table", "http_trace", "httpcli", + "iomgr_buffer_list", "ref_counted_ptr", "stats", "//src/core:arena", diff --git a/CMakeLists.txt b/CMakeLists.txt index c635def43e2..a6c56385ab3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -910,7 +910,6 @@ if(gRPC_BUILD_TESTS) add_dependencies(buildtests_cxx connection_refused_test) add_dependencies(buildtests_cxx connectivity_state_test) add_dependencies(buildtests_cxx context_allocator_end2end_test) - add_dependencies(buildtests_cxx context_list_test) add_dependencies(buildtests_cxx context_test) add_dependencies(buildtests_cxx core_configuration_test) add_dependencies(buildtests_cxx core_end2end_tests) @@ -1660,7 +1659,6 @@ add_library(grpc src/core/ext/transport/chttp2/transport/bin_decoder.cc src/core/ext/transport/chttp2/transport/bin_encoder.cc src/core/ext/transport/chttp2/transport/chttp2_transport.cc - src/core/ext/transport/chttp2/transport/context_list.cc src/core/ext/transport/chttp2/transport/decode_huff.cc src/core/ext/transport/chttp2/transport/flow_control.cc src/core/ext/transport/chttp2/transport/frame_data.cc @@ -2669,7 +2667,6 @@ add_library(grpc_unsecure src/core/ext/transport/chttp2/transport/bin_decoder.cc src/core/ext/transport/chttp2/transport/bin_encoder.cc src/core/ext/transport/chttp2/transport/chttp2_transport.cc - src/core/ext/transport/chttp2/transport/context_list.cc src/core/ext/transport/chttp2/transport/decode_huff.cc src/core/ext/transport/chttp2/transport/flow_control.cc src/core/ext/transport/chttp2/transport/frame_data.cc @@ -9137,55 +9134,6 @@ target_link_libraries(context_allocator_end2end_test ) -endif() -if(gRPC_BUILD_TESTS) - -add_executable(context_list_test - test/core/transport/chttp2/context_list_test.cc - test/core/util/cmdline.cc - test/core/util/fuzzer_util.cc - test/core/util/grpc_profiler.cc - test/core/util/histogram.cc - test/core/util/mock_endpoint.cc - test/core/util/parse_hexstring.cc - test/core/util/passthru_endpoint.cc - test/core/util/resolve_localhost_ip46.cc - test/core/util/slice_splitter.cc - test/core/util/subprocess_posix.cc - test/core/util/subprocess_windows.cc - test/core/util/tracer_util.cc - third_party/googletest/googletest/src/gtest-all.cc - third_party/googletest/googlemock/src/gmock-all.cc -) -target_compile_features(context_list_test PUBLIC cxx_std_14) -target_include_directories(context_list_test - PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/include - ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} - ${_gRPC_RE2_INCLUDE_DIR} - ${_gRPC_SSL_INCLUDE_DIR} - ${_gRPC_UPB_GENERATED_DIR} - ${_gRPC_UPB_GRPC_GENERATED_DIR} - ${_gRPC_UPB_INCLUDE_DIR} - ${_gRPC_XXHASH_INCLUDE_DIR} - ${_gRPC_ZLIB_INCLUDE_DIR} - third_party/googletest/googletest/include - third_party/googletest/googletest - third_party/googletest/googlemock/include - third_party/googletest/googlemock - ${_gRPC_PROTO_GENS_DIR} -) - -target_link_libraries(context_list_test - ${_gRPC_BASELIB_LIBRARIES} - ${_gRPC_PROTOBUF_LIBRARIES} - ${_gRPC_ZLIB_LIBRARIES} - ${_gRPC_ALLTARGETS_LIBRARIES} - grpc_test_util -) - - endif() if(gRPC_BUILD_TESTS) diff --git a/Makefile b/Makefile index 1238773f9b1..43755ead466 100644 --- a/Makefile +++ b/Makefile @@ -1047,7 +1047,6 @@ LIBGRPC_SRC = \ src/core/ext/transport/chttp2/transport/bin_decoder.cc \ src/core/ext/transport/chttp2/transport/bin_encoder.cc \ src/core/ext/transport/chttp2/transport/chttp2_transport.cc \ - src/core/ext/transport/chttp2/transport/context_list.cc \ src/core/ext/transport/chttp2/transport/decode_huff.cc \ src/core/ext/transport/chttp2/transport/flow_control.cc \ src/core/ext/transport/chttp2/transport/frame_data.cc \ @@ -1910,7 +1909,6 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/transport/chttp2/transport/bin_decoder.cc \ src/core/ext/transport/chttp2/transport/bin_encoder.cc \ src/core/ext/transport/chttp2/transport/chttp2_transport.cc \ - src/core/ext/transport/chttp2/transport/context_list.cc \ src/core/ext/transport/chttp2/transport/decode_huff.cc \ src/core/ext/transport/chttp2/transport/flow_control.cc \ src/core/ext/transport/chttp2/transport/frame_data.cc \ diff --git a/bazel/grpc_build_system.bzl b/bazel/grpc_build_system.bzl index 80a05d40983..0e93e182277 100644 --- a/bazel/grpc_build_system.bzl +++ b/bazel/grpc_build_system.bzl @@ -103,6 +103,8 @@ def _update_visibility(visibility): "http": PRIVATE, "httpcli": PRIVATE, "iomgr_timer": PRIVATE, + "iomgr_internal_errqueue": PRIVATE, + "iomgr_buffer_list": PRIVATE, "json_reader_legacy": PRIVATE, "public": PUBLIC, "ref_counted_ptr": PRIVATE, diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index ec095cc851c..5812eee2c06 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -281,7 +281,7 @@ libs: - src/core/ext/transport/chttp2/transport/bin_decoder.h - src/core/ext/transport/chttp2/transport/bin_encoder.h - src/core/ext/transport/chttp2/transport/chttp2_transport.h - - src/core/ext/transport/chttp2/transport/context_list.h + - src/core/ext/transport/chttp2/transport/context_list_entry.h - src/core/ext/transport/chttp2/transport/decode_huff.h - src/core/ext/transport/chttp2/transport/flow_control.h - src/core/ext/transport/chttp2/transport/frame.h @@ -1081,7 +1081,6 @@ libs: - src/core/ext/transport/chttp2/transport/bin_decoder.cc - src/core/ext/transport/chttp2/transport/bin_encoder.cc - src/core/ext/transport/chttp2/transport/chttp2_transport.cc - - src/core/ext/transport/chttp2/transport/context_list.cc - src/core/ext/transport/chttp2/transport/decode_huff.cc - src/core/ext/transport/chttp2/transport/flow_control.cc - src/core/ext/transport/chttp2/transport/frame_data.cc @@ -1959,7 +1958,7 @@ libs: - src/core/ext/transport/chttp2/transport/bin_decoder.h - src/core/ext/transport/chttp2/transport/bin_encoder.h - src/core/ext/transport/chttp2/transport/chttp2_transport.h - - src/core/ext/transport/chttp2/transport/context_list.h + - src/core/ext/transport/chttp2/transport/context_list_entry.h - src/core/ext/transport/chttp2/transport/decode_huff.h - src/core/ext/transport/chttp2/transport/flow_control.h - src/core/ext/transport/chttp2/transport/frame.h @@ -2369,7 +2368,6 @@ libs: - src/core/ext/transport/chttp2/transport/bin_decoder.cc - src/core/ext/transport/chttp2/transport/bin_encoder.cc - src/core/ext/transport/chttp2/transport/chttp2_transport.cc - - src/core/ext/transport/chttp2/transport/context_list.cc - src/core/ext/transport/chttp2/transport/decode_huff.cc - src/core/ext/transport/chttp2/transport/flow_control.cc - src/core/ext/transport/chttp2/transport/frame_data.cc @@ -6116,41 +6114,6 @@ targets: - test/cpp/end2end/test_service_impl.cc deps: - grpc++_test_util -- name: context_list_test - gtest: true - build: test - language: c++ - headers: - - test/core/util/cmdline.h - - test/core/util/evaluate_args_test_util.h - - test/core/util/fuzzer_util.h - - test/core/util/grpc_profiler.h - - test/core/util/histogram.h - - test/core/util/mock_authorization_endpoint.h - - test/core/util/mock_endpoint.h - - test/core/util/parse_hexstring.h - - test/core/util/passthru_endpoint.h - - test/core/util/resolve_localhost_ip46.h - - test/core/util/slice_splitter.h - - test/core/util/subprocess.h - - test/core/util/tracer_util.h - src: - - test/core/transport/chttp2/context_list_test.cc - - test/core/util/cmdline.cc - - test/core/util/fuzzer_util.cc - - test/core/util/grpc_profiler.cc - - test/core/util/histogram.cc - - test/core/util/mock_endpoint.cc - - test/core/util/parse_hexstring.cc - - test/core/util/passthru_endpoint.cc - - test/core/util/resolve_localhost_ip46.cc - - test/core/util/slice_splitter.cc - - test/core/util/subprocess_posix.cc - - test/core/util/subprocess_windows.cc - - test/core/util/tracer_util.cc - deps: - - grpc_test_util - uses_polling: false - name: context_test gtest: true build: test diff --git a/config.m4 b/config.m4 index f58007efd46..eb7e2b7152a 100644 --- a/config.m4 +++ b/config.m4 @@ -127,7 +127,6 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/transport/chttp2/transport/bin_decoder.cc \ src/core/ext/transport/chttp2/transport/bin_encoder.cc \ src/core/ext/transport/chttp2/transport/chttp2_transport.cc \ - src/core/ext/transport/chttp2/transport/context_list.cc \ src/core/ext/transport/chttp2/transport/decode_huff.cc \ src/core/ext/transport/chttp2/transport/flow_control.cc \ src/core/ext/transport/chttp2/transport/frame_data.cc \ diff --git a/config.w32 b/config.w32 index ec4e43aba22..8cb17ce8e4a 100644 --- a/config.w32 +++ b/config.w32 @@ -92,7 +92,6 @@ if (PHP_GRPC != "no") { "src\\core\\ext\\transport\\chttp2\\transport\\bin_decoder.cc " + "src\\core\\ext\\transport\\chttp2\\transport\\bin_encoder.cc " + "src\\core\\ext\\transport\\chttp2\\transport\\chttp2_transport.cc " + - "src\\core\\ext\\transport\\chttp2\\transport\\context_list.cc " + "src\\core\\ext\\transport\\chttp2\\transport\\decode_huff.cc " + "src\\core\\ext\\transport\\chttp2\\transport\\flow_control.cc " + "src\\core\\ext\\transport\\chttp2\\transport\\frame_data.cc " + diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index 8bd8f893c09..222309fadd1 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -352,7 +352,7 @@ Pod::Spec.new do |s| 'src/core/ext/transport/chttp2/transport/bin_decoder.h', 'src/core/ext/transport/chttp2/transport/bin_encoder.h', 'src/core/ext/transport/chttp2/transport/chttp2_transport.h', - 'src/core/ext/transport/chttp2/transport/context_list.h', + 'src/core/ext/transport/chttp2/transport/context_list_entry.h', 'src/core/ext/transport/chttp2/transport/decode_huff.h', 'src/core/ext/transport/chttp2/transport/flow_control.h', 'src/core/ext/transport/chttp2/transport/frame.h', @@ -1375,7 +1375,7 @@ Pod::Spec.new do |s| 'src/core/ext/transport/chttp2/transport/bin_decoder.h', 'src/core/ext/transport/chttp2/transport/bin_encoder.h', 'src/core/ext/transport/chttp2/transport/chttp2_transport.h', - 'src/core/ext/transport/chttp2/transport/context_list.h', + 'src/core/ext/transport/chttp2/transport/context_list_entry.h', 'src/core/ext/transport/chttp2/transport/decode_huff.h', 'src/core/ext/transport/chttp2/transport/flow_control.h', 'src/core/ext/transport/chttp2/transport/frame.h', diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 06f70780baf..b048ef8eba2 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -368,8 +368,7 @@ Pod::Spec.new do |s| 'src/core/ext/transport/chttp2/transport/bin_encoder.h', 'src/core/ext/transport/chttp2/transport/chttp2_transport.cc', 'src/core/ext/transport/chttp2/transport/chttp2_transport.h', - 'src/core/ext/transport/chttp2/transport/context_list.cc', - 'src/core/ext/transport/chttp2/transport/context_list.h', + 'src/core/ext/transport/chttp2/transport/context_list_entry.h', 'src/core/ext/transport/chttp2/transport/decode_huff.cc', 'src/core/ext/transport/chttp2/transport/decode_huff.h', 'src/core/ext/transport/chttp2/transport/flow_control.cc', @@ -2093,7 +2092,7 @@ Pod::Spec.new do |s| 'src/core/ext/transport/chttp2/transport/bin_decoder.h', 'src/core/ext/transport/chttp2/transport/bin_encoder.h', 'src/core/ext/transport/chttp2/transport/chttp2_transport.h', - 'src/core/ext/transport/chttp2/transport/context_list.h', + 'src/core/ext/transport/chttp2/transport/context_list_entry.h', 'src/core/ext/transport/chttp2/transport/decode_huff.h', 'src/core/ext/transport/chttp2/transport/flow_control.h', 'src/core/ext/transport/chttp2/transport/frame.h', diff --git a/grpc.gemspec b/grpc.gemspec index 96bbf8cf97a..056cae94c8b 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -274,8 +274,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/transport/chttp2/transport/bin_encoder.h ) s.files += %w( src/core/ext/transport/chttp2/transport/chttp2_transport.cc ) s.files += %w( src/core/ext/transport/chttp2/transport/chttp2_transport.h ) - s.files += %w( src/core/ext/transport/chttp2/transport/context_list.cc ) - s.files += %w( src/core/ext/transport/chttp2/transport/context_list.h ) + s.files += %w( src/core/ext/transport/chttp2/transport/context_list_entry.h ) s.files += %w( src/core/ext/transport/chttp2/transport/decode_huff.cc ) s.files += %w( src/core/ext/transport/chttp2/transport/decode_huff.h ) s.files += %w( src/core/ext/transport/chttp2/transport/flow_control.cc ) diff --git a/grpc.gyp b/grpc.gyp index d140393ad6b..e551b576c6c 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -351,7 +351,6 @@ 'src/core/ext/transport/chttp2/transport/bin_decoder.cc', 'src/core/ext/transport/chttp2/transport/bin_encoder.cc', 'src/core/ext/transport/chttp2/transport/chttp2_transport.cc', - 'src/core/ext/transport/chttp2/transport/context_list.cc', 'src/core/ext/transport/chttp2/transport/decode_huff.cc', 'src/core/ext/transport/chttp2/transport/flow_control.cc', 'src/core/ext/transport/chttp2/transport/frame_data.cc', @@ -1155,7 +1154,6 @@ 'src/core/ext/transport/chttp2/transport/bin_decoder.cc', 'src/core/ext/transport/chttp2/transport/bin_encoder.cc', 'src/core/ext/transport/chttp2/transport/chttp2_transport.cc', - 'src/core/ext/transport/chttp2/transport/context_list.cc', 'src/core/ext/transport/chttp2/transport/decode_huff.cc', 'src/core/ext/transport/chttp2/transport/flow_control.cc', 'src/core/ext/transport/chttp2/transport/frame_data.cc', diff --git a/package.xml b/package.xml index 9aba1739886..f9b6c18398e 100644 --- a/package.xml +++ b/package.xml @@ -256,8 +256,7 @@ - - + diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc index 93abc3a8fee..abca0c60c2b 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc @@ -29,6 +29,7 @@ #include #include #include +#include #include "absl/base/attributes.h" #include "absl/status/status.h" @@ -47,7 +48,7 @@ #include #include -#include "src/core/ext/transport/chttp2/transport/context_list.h" +#include "src/core/ext/transport/chttp2/transport/context_list_entry.h" #include "src/core/ext/transport/chttp2/transport/flow_control.h" #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/ext/transport/chttp2/transport/frame_data.h" @@ -214,6 +215,9 @@ grpc_core::CallTracerInterface* CallTracerIfEnabled(grpc_chttp2_stream* s) { s->context)[GRPC_CONTEXT_CALL_TRACER_ANNOTATION_INTERFACE] .value); } + +grpc_core::WriteTimestampsCallback g_write_timestamps_callback = nullptr; +grpc_core::CopyContextFn g_get_copied_context_fn = nullptr; } // namespace namespace grpc_core { @@ -240,6 +244,40 @@ void TestOnlyGlobalHttp2TransportDisableTransientFailureStateNotification( test_only_disable_transient_failure_state_notification = disable; } +void GrpcHttp2SetWriteTimestampsCallback(WriteTimestampsCallback fn) { + g_write_timestamps_callback = fn; +} + +void GrpcHttp2SetCopyContextFn(CopyContextFn fn) { + g_get_copied_context_fn = fn; +} + +WriteTimestampsCallback GrpcHttp2GetWriteTimestampsCallback() { + return g_write_timestamps_callback; +} + +CopyContextFn GrpcHttp2GetCopyContextFn() { return g_get_copied_context_fn; } + +// For each entry in the passed ContextList, it executes the function set using +// GrpcHttp2SetWriteTimestampsCallback method with each context in the list +// and \a ts. It also deletes/frees up the passed ContextList after this +// operation. +void ForEachContextListEntryExecute(void* arg, Timestamps* ts, + grpc_error_handle error) { + ContextList* context_list = reinterpret_cast(arg); + if (!context_list) { + return; + } + for (auto it = context_list->begin(); it != context_list->end(); it++) { + ContextListEntry& entry = (*it); + if (ts) { + ts->byte_offset = static_cast(entry.ByteOffsetInStream()); + } + g_write_timestamps_callback(entry.TraceContext(), ts, error); + } + delete context_list; +} + } // namespace grpc_core // @@ -264,7 +302,9 @@ grpc_chttp2_transport::~grpc_chttp2_transport() { grpc_error_handle error = GRPC_ERROR_CREATE("Transport destroyed"); // ContextList::Execute follows semantics of a callback function and does not // take a ref on error - grpc_core::ContextList::Execute(cl, nullptr, error); + if (cl != nullptr) { + grpc_core::ForEachContextListEntryExecute(cl, nullptr, error); + } cl = nullptr; grpc_slice_buffer_destroy(&read_buffer); @@ -554,6 +594,7 @@ grpc_chttp2_transport::grpc_chttp2_transport( event_engine( channel_args .GetObjectRef()) { + cl = new grpc_core::ContextList(); GPR_ASSERT(strlen(GRPC_CHTTP2_CLIENT_CONNECT_STRING) == GRPC_CHTTP2_CLIENT_CONNECT_STRLEN); base.vtable = get_vtable(); @@ -985,7 +1026,17 @@ static void write_action_begin_locked(void* gt, static void write_action(void* gt, grpc_error_handle /*error*/) { grpc_chttp2_transport* t = static_cast(gt); void* cl = t->cl; - t->cl = nullptr; + if (!t->cl->empty()) { + // Transfer the ownership of the context list to the endpoint and create and + // associate a new context list with the transport. + // The old context list is stored in the cl local variable which is passed + // to the endpoint. Its upto the endpoint to manage its lifetime. + t->cl = new grpc_core::ContextList(); + } else { + // t->cl is Empty. There is nothing to trace in this endpoint_write. set cl + // to nullptr. + cl = nullptr; + } // Choose max_frame_size as the prefered rx crypto frame size indicated by the // peer. int max_frame_size = diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.h b/src/core/ext/transport/chttp2/transport/chttp2_transport.h index 6ba78f4407f..656806d8ada 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.h +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.h @@ -27,8 +27,10 @@ #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/iomgr/buffer_list.h" #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/endpoint.h" +#include "src/core/lib/iomgr/error.h" #include "src/core/lib/transport/transport_fwd.h" extern grpc_core::TraceFlag grpc_keepalive_trace; @@ -71,6 +73,25 @@ void TestOnlySetGlobalHttp2TransportDestructCallback( // same time that a GOAWAY is received. void TestOnlyGlobalHttp2TransportDisableTransientFailureStateNotification( bool disable); + +typedef void (*WriteTimestampsCallback)(void*, Timestamps*, + grpc_error_handle error); +typedef void* (*CopyContextFn)(void*); + +void GrpcHttp2SetWriteTimestampsCallback(WriteTimestampsCallback fn); +void GrpcHttp2SetCopyContextFn(CopyContextFn fn); + +WriteTimestampsCallback GrpcHttp2GetWriteTimestampsCallback(); +CopyContextFn GrpcHttp2GetCopyContextFn(); + +// Interprets the passed arg as a ContextList type and for each entry in the +// passed ContextList, it executes the function set using +// GrpcHttp2SetWriteTimestampsCallback method with each context in the list +// and \a ts. It also deletes/frees up the passed ContextList after this +// operation. +void ForEachContextListEntryExecute(void* arg, Timestamps* ts, + grpc_error_handle error); + } // namespace grpc_core #endif // GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_CHTTP2_TRANSPORT_H diff --git a/src/core/ext/transport/chttp2/transport/context_list.cc b/src/core/ext/transport/chttp2/transport/context_list.cc deleted file mode 100644 index 1f729b56954..00000000000 --- a/src/core/ext/transport/chttp2/transport/context_list.cc +++ /dev/null @@ -1,71 +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 - -#include "src/core/ext/transport/chttp2/transport/context_list.h" - -#include - -#include "src/core/ext/transport/chttp2/transport/internal.h" - -namespace { -void (*write_timestamps_callback_g)(void*, grpc_core::Timestamps*, - grpc_error_handle error) = nullptr; -void* (*get_copied_context_fn_g)(void*) = nullptr; -} // namespace - -namespace grpc_core { -void ContextList::Append(ContextList** head, grpc_chttp2_stream* s) { - if (get_copied_context_fn_g == nullptr || - write_timestamps_callback_g == nullptr) { - return; - } - // Create a new element in the list and add it at the front - ContextList* elem = new ContextList(); - elem->trace_context_ = get_copied_context_fn_g(s->context); - elem->byte_offset_ = s->byte_counter; - elem->next_ = *head; - *head = elem; -} - -void ContextList::Execute(void* arg, Timestamps* ts, grpc_error_handle error) { - ContextList* head = static_cast(arg); - ContextList* to_be_freed; - while (head != nullptr) { - if (write_timestamps_callback_g) { - if (ts) { - ts->byte_offset = static_cast(head->byte_offset_); - } - write_timestamps_callback_g(head->trace_context_, ts, error); - } - to_be_freed = head; - head = head->next_; - delete to_be_freed; - } -} - -void grpc_http2_set_write_timestamps_callback( - void (*fn)(void*, Timestamps*, grpc_error_handle error)) { - write_timestamps_callback_g = fn; -} - -void grpc_http2_set_fn_get_copied_context(void* (*fn)(void*)) { - get_copied_context_fn_g = fn; -} -} // namespace grpc_core diff --git a/src/core/ext/transport/chttp2/transport/context_list.h b/src/core/ext/transport/chttp2/transport/context_list.h deleted file mode 100644 index e4ecfc6adcc..00000000000 --- a/src/core/ext/transport/chttp2/transport/context_list.h +++ /dev/null @@ -1,54 +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_EXT_TRANSPORT_CHTTP2_TRANSPORT_CONTEXT_LIST_H -#define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_CONTEXT_LIST_H - -#include - -#include - -#include "src/core/ext/transport/chttp2/transport/frame.h" -#include "src/core/lib/iomgr/buffer_list.h" -#include "src/core/lib/iomgr/error.h" - -namespace grpc_core { -/// A list of RPC Contexts -class ContextList { - public: - // Creates a new element with \a context as the value and appends it to the - // list. - static void Append(ContextList** head, grpc_chttp2_stream* s); - - // Executes a function \a fn with each context in the list and \a ts. It also - // frees up the entire list after this operation. It is intended as a callback - // and hence does not take a ref on \a error - static void Execute(void* arg, Timestamps* ts, grpc_error_handle error); - - private: - void* trace_context_ = nullptr; - ContextList* next_ = nullptr; - size_t byte_offset_ = 0; -}; - -void grpc_http2_set_write_timestamps_callback( - void (*fn)(void*, Timestamps*, grpc_error_handle error)); -void grpc_http2_set_fn_get_copied_context(void* (*fn)(void*)); -} // namespace grpc_core - -#endif // GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_CONTEXT_LIST_H diff --git a/src/core/ext/transport/chttp2/transport/context_list_entry.h b/src/core/ext/transport/chttp2/transport/context_list_entry.h new file mode 100644 index 00000000000..aa6a9caeb8c --- /dev/null +++ b/src/core/ext/transport/chttp2/transport/context_list_entry.h @@ -0,0 +1,70 @@ +// +// +// 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_EXT_TRANSPORT_CHTTP2_TRANSPORT_CONTEXT_LIST_ENTRY_H +#define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_CONTEXT_LIST_ENTRY_H + +#include + +#include +#include + +#include + +namespace grpc_core { + +/// An RPC trace context and associated information. Each RPC/stream is +/// associated with a unique \a context. A new ContextList entry is created when +/// a chunk of data stored in an outgoing buffer is going to be +// sent over the wire. A data chunk being written over the wire is multiplexed +// with bytes from multiple RPCs. If one such RPC is traced, we store the +// following information about the traced RPC: +// - byte_offset_in_stream: Number of bytes belonging to that traced RPC which +// have been sent so far from the start of the RPC stream. +// - relative_start_pos_in_chunk: Starting offset of the traced RPC within +// the current chunk that is being sent. +// - num_traced_bytes_in_chunk: Number of bytes belonging to the traced RPC +// within the current chunk. +class ContextListEntry { + public: + ContextListEntry(void* context, int64_t relative_start_pos, + int64_t num_traced_bytes, size_t byte_offset) + : trace_context_(context), + relative_start_pos_in_chunk_(relative_start_pos), + num_traced_bytes_in_chunk_(num_traced_bytes), + byte_offset_in_stream_(byte_offset) {} + + ContextListEntry() = delete; + + void* TraceContext() { return trace_context_; } + int64_t RelativeStartPosInChunk() { return relative_start_pos_in_chunk_; } + int64_t NumTracedBytesInChunk() { return num_traced_bytes_in_chunk_; } + size_t ByteOffsetInStream() { return byte_offset_in_stream_; } + + private: + void* trace_context_; + int64_t relative_start_pos_in_chunk_; + int64_t num_traced_bytes_in_chunk_; + size_t byte_offset_in_stream_; +}; + +/// A list of RPC Contexts +typedef std::vector ContextList; +} // namespace grpc_core + +#endif // GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_CONTEXT_LIST_ENTRY_H diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 921296198d0..d93776005ab 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -35,6 +35,7 @@ #include #include +#include "src/core/ext/transport/chttp2/transport/context_list_entry.h" #include "src/core/ext/transport/chttp2/transport/flow_control.h" #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/ext/transport/chttp2/transport/frame_goaway.h" @@ -77,10 +78,6 @@ // bits being used for flags defined above) #define CLOSURE_BARRIER_FIRST_REF_BIT (1 << 16) -namespace grpc_core { -class ContextList; -} - // streams are kept in various linked lists depending on what things need to // happen to them... this enum labels each list typedef enum { diff --git a/src/core/ext/transport/chttp2/transport/writing.cc b/src/core/ext/transport/chttp2/transport/writing.cc index 9fb3ae7dc92..0e2eda93521 100644 --- a/src/core/ext/transport/chttp2/transport/writing.cc +++ b/src/core/ext/transport/chttp2/transport/writing.cc @@ -39,7 +39,7 @@ // IWYU pragma: no_include "src/core/lib/gprpp/orphanable.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" -#include "src/core/ext/transport/chttp2/transport/context_list.h" +#include "src/core/ext/transport/chttp2/transport/context_list_entry.h" #include "src/core/ext/transport/chttp2/transport/flow_control.h" #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/ext/transport/chttp2/transport/frame_data.h" @@ -627,6 +627,7 @@ class StreamWriteContext { grpc_chttp2_begin_write_result grpc_chttp2_begin_write( grpc_chttp2_transport* t) { + int64_t outbuf_relative_start_pos = 0; WriteContext ctx(t); ctx.FlushSettings(); ctx.FlushPingAcks(); @@ -642,16 +643,26 @@ grpc_chttp2_begin_write_result grpc_chttp2_begin_write( while (grpc_chttp2_stream* s = ctx.NextStream()) { StreamWriteContext stream_ctx(&ctx, s); size_t orig_len = t->outbuf.length; + int64_t num_stream_bytes = 0; stream_ctx.FlushInitialMetadata(); stream_ctx.FlushWindowUpdates(); stream_ctx.FlushData(); stream_ctx.FlushTrailingMetadata(); if (t->outbuf.length > orig_len) { // Add this stream to the list of the contexts to be traced at TCP - s->byte_counter += t->outbuf.length - orig_len; + num_stream_bytes = t->outbuf.length - orig_len; + s->byte_counter += static_cast(num_stream_bytes); if (s->traced && grpc_endpoint_can_track_err(t->ep)) { - grpc_core::ContextList::Append(&t->cl, s); + grpc_core::CopyContextFn copy_context_fn = + grpc_core::GrpcHttp2GetCopyContextFn(); + if (copy_context_fn != nullptr && + grpc_core::GrpcHttp2GetWriteTimestampsCallback() != nullptr) { + t->cl->emplace_back(copy_context_fn(s->context), + outbuf_relative_start_pos, num_stream_bytes, + s->byte_counter); + } } + outbuf_relative_start_pos += num_stream_bytes; } if (stream_ctx.stream_became_writable()) { if (!grpc_chttp2_list_add_writing_stream(t, s)) { diff --git a/src/core/lib/iomgr/buffer_list.h b/src/core/lib/iomgr/buffer_list.h index 1109e3d079c..f32008d4780 100644 --- a/src/core/lib/iomgr/buffer_list.h +++ b/src/core/lib/iomgr/buffer_list.h @@ -23,7 +23,6 @@ #include "absl/types/optional.h" -#include #include #include "src/core/lib/gprpp/sync.h" diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index c9246ed5338..baf0eb8c1d7 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -101,7 +101,6 @@ CORE_SOURCE_FILES = [ 'src/core/ext/transport/chttp2/transport/bin_decoder.cc', 'src/core/ext/transport/chttp2/transport/bin_encoder.cc', 'src/core/ext/transport/chttp2/transport/chttp2_transport.cc', - 'src/core/ext/transport/chttp2/transport/context_list.cc', 'src/core/ext/transport/chttp2/transport/decode_huff.cc', 'src/core/ext/transport/chttp2/transport/flow_control.cc', 'src/core/ext/transport/chttp2/transport/frame_data.cc', diff --git a/test/core/transport/chttp2/BUILD b/test/core/transport/chttp2/BUILD index fb5d49a3482..4a6500fe9bb 100644 --- a/test/core/transport/chttp2/BUILD +++ b/test/core/transport/chttp2/BUILD @@ -122,23 +122,6 @@ grpc_cc_test( ], ) -grpc_cc_test( - name = "context_list_test", - srcs = ["context_list_test.cc"], - external_deps = [ - "gtest", - ], - language = "C++", - uses_event_engine = False, - uses_polling = False, - deps = [ - "//:gpr", - "//:grpc", - "//test/core/util:grpc_test_util", - "//test/core/util:grpc_test_util_base", - ], -) - grpc_cc_test( name = "flow_control_test", srcs = ["flow_control_test.cc"], diff --git a/test/core/transport/chttp2/context_list_test.cc b/test/core/transport/chttp2/context_list_test.cc deleted file mode 100644 index cc28f968c43..00000000000 --- a/test/core/transport/chttp2/context_list_test.cc +++ /dev/null @@ -1,181 +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 "src/core/ext/transport/chttp2/transport/context_list.h" - -#include - -#include -#include - -#include "absl/status/status.h" -#include "gtest/gtest.h" - -#include -#include -#include -#include - -#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" -#include "src/core/ext/transport/chttp2/transport/internal.h" -#include "src/core/lib/channel/channel_args_preconditioning.h" -#include "src/core/lib/config/core_configuration.h" -#include "src/core/lib/iomgr/endpoint.h" -#include "src/core/lib/iomgr/exec_ctx.h" -#include "src/core/lib/transport/transport.h" -#include "src/core/lib/transport/transport_fwd.h" -#include "test/core/util/mock_endpoint.h" -#include "test/core/util/test_config.h" - -namespace grpc_core { -namespace testing { -namespace { - -const uint32_t kByteOffset = 123; - -void* PhonyArgsCopier(void* arg) { return arg; } - -void TestExecuteFlushesListVerifier(void* arg, Timestamps* ts, - grpc_error_handle error) { - ASSERT_NE(arg, nullptr); - EXPECT_EQ(error, absl::OkStatus()); - if (ts) { - EXPECT_EQ(ts->byte_offset, kByteOffset); - } - gpr_atm* done = reinterpret_cast(arg); - gpr_atm_rel_store(done, gpr_atm{1}); -} - -void discard_write(grpc_slice /*slice*/) {} - -class ContextListTest : public ::testing::Test { - protected: - void SetUp() override { - grpc_http2_set_write_timestamps_callback(TestExecuteFlushesListVerifier); - grpc_http2_set_fn_get_copied_context(PhonyArgsCopier); - } -}; - -/// Tests that all ContextList elements in the list are flushed out on -/// execute. -/// Also tests that arg and byte_counter are passed correctly. -/// -TEST_F(ContextListTest, ExecuteFlushesList) { - ContextList* list = nullptr; - const int kNumElems = 5; - ExecCtx exec_ctx; - grpc_stream_refcount ref; - GRPC_STREAM_REF_INIT(&ref, 1, nullptr, nullptr, "phony ref"); - grpc_endpoint* mock_endpoint = grpc_mock_endpoint_create(discard_write); - auto args = CoreConfiguration::Get() - .channel_args_preconditioning() - .PreconditionChannelArgs(nullptr); - grpc_transport* t = grpc_create_chttp2_transport(args, mock_endpoint, true); - std::vector s; - s.reserve(kNumElems); - gpr_atm verifier_called[kNumElems]; - for (auto i = 0; i < kNumElems; i++) { - s.push_back(static_cast( - gpr_malloc(grpc_transport_stream_size(t)))); - grpc_transport_init_stream(reinterpret_cast(t), - reinterpret_cast(s[i]), &ref, - nullptr, nullptr); - s[i]->context = &verifier_called[i]; - s[i]->byte_counter = kByteOffset; - gpr_atm_rel_store(&verifier_called[i], gpr_atm{0}); - ContextList::Append(&list, s[i]); - } - Timestamps ts; - ContextList::Execute(list, &ts, absl::OkStatus()); - for (auto i = 0; i < kNumElems; i++) { - EXPECT_EQ(gpr_atm_acq_load(&verifier_called[i]), 1); - grpc_transport_destroy_stream(reinterpret_cast(t), - reinterpret_cast(s[i]), - nullptr); - exec_ctx.Flush(); - gpr_free(s[i]); - } - grpc_transport_destroy(t); - exec_ctx.Flush(); -} - -TEST_F(ContextListTest, EmptyList) { - ContextList* list = nullptr; - ExecCtx exec_ctx; - Timestamps ts; - ContextList::Execute(list, &ts, absl::OkStatus()); - exec_ctx.Flush(); -} - -TEST_F(ContextListTest, EmptyListEmptyTimestamp) { - ContextList* list = nullptr; - ExecCtx exec_ctx; - ContextList::Execute(list, nullptr, absl::OkStatus()); - exec_ctx.Flush(); -} - -TEST_F(ContextListTest, NonEmptyListEmptyTimestamp) { - ContextList* list = nullptr; - const int kNumElems = 5; - ExecCtx exec_ctx; - grpc_stream_refcount ref; - GRPC_STREAM_REF_INIT(&ref, 1, nullptr, nullptr, "phony ref"); - grpc_endpoint* mock_endpoint = grpc_mock_endpoint_create(discard_write); - auto args = CoreConfiguration::Get() - .channel_args_preconditioning() - .PreconditionChannelArgs(nullptr); - grpc_transport* t = grpc_create_chttp2_transport(args, mock_endpoint, true); - std::vector s; - s.reserve(kNumElems); - gpr_atm verifier_called[kNumElems]; - for (auto i = 0; i < kNumElems; i++) { - s.push_back(static_cast( - gpr_malloc(grpc_transport_stream_size(t)))); - grpc_transport_init_stream(reinterpret_cast(t), - reinterpret_cast(s[i]), &ref, - nullptr, nullptr); - s[i]->context = &verifier_called[i]; - s[i]->byte_counter = kByteOffset; - gpr_atm_rel_store(&verifier_called[i], gpr_atm{0}); - ContextList::Append(&list, s[i]); - } - ContextList::Execute(list, nullptr, absl::OkStatus()); - for (auto i = 0; i < kNumElems; i++) { - EXPECT_EQ(gpr_atm_acq_load(&verifier_called[i]), 1); - grpc_transport_destroy_stream(reinterpret_cast(t), - reinterpret_cast(s[i]), - nullptr); - exec_ctx.Flush(); - gpr_free(s[i]); - } - grpc_transport_destroy(t); - exec_ctx.Flush(); -} - -} // namespace -} // namespace testing -} // namespace grpc_core - -int main(int argc, char** argv) { - ::testing::InitGoogleTest(&argc, argv); - grpc::testing::TestEnvironment env(&argc, argv); - grpc_init(); - int ret = RUN_ALL_TESTS(); - grpc_shutdown(); - return ret; -} diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 167b262149a..af36bb32694 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -1269,8 +1269,7 @@ src/core/ext/transport/chttp2/transport/bin_encoder.cc \ src/core/ext/transport/chttp2/transport/bin_encoder.h \ src/core/ext/transport/chttp2/transport/chttp2_transport.cc \ src/core/ext/transport/chttp2/transport/chttp2_transport.h \ -src/core/ext/transport/chttp2/transport/context_list.cc \ -src/core/ext/transport/chttp2/transport/context_list.h \ +src/core/ext/transport/chttp2/transport/context_list_entry.h \ src/core/ext/transport/chttp2/transport/decode_huff.cc \ src/core/ext/transport/chttp2/transport/decode_huff.h \ src/core/ext/transport/chttp2/transport/flow_control.cc \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index a3b3d112374..5323d4ac66d 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -1046,8 +1046,7 @@ src/core/ext/transport/chttp2/transport/bin_encoder.cc \ src/core/ext/transport/chttp2/transport/bin_encoder.h \ src/core/ext/transport/chttp2/transport/chttp2_transport.cc \ src/core/ext/transport/chttp2/transport/chttp2_transport.h \ -src/core/ext/transport/chttp2/transport/context_list.cc \ -src/core/ext/transport/chttp2/transport/context_list.h \ +src/core/ext/transport/chttp2/transport/context_list_entry.h \ src/core/ext/transport/chttp2/transport/decode_huff.cc \ src/core/ext/transport/chttp2/transport/decode_huff.h \ src/core/ext/transport/chttp2/transport/flow_control.cc \ diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json index 9f3edaa9348..08a26ee67fe 100644 --- a/tools/run_tests/generated/tests.json +++ b/tools/run_tests/generated/tests.json @@ -2133,30 +2133,6 @@ ], "uses_polling": true }, - { - "args": [], - "benchmark": false, - "ci_platforms": [ - "linux", - "mac", - "posix", - "windows" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "gtest": true, - "language": "c++", - "name": "context_list_test", - "platforms": [ - "linux", - "mac", - "posix", - "windows" - ], - "uses_polling": false - }, { "args": [], "benchmark": false,