Merge branch 'master' into gpr_review_tls

pull/14196/head
Vijay Pai 7 years ago
commit 25b61fd60e
  1. 5
      .github/CODEOWNERS
  2. 15
      BUILD
  3. 199
      CMakeLists.txt
  4. 2960
      Makefile
  5. 2
      bazel/grpc_build_system.bzl
  6. 8
      bazel/grpc_deps.bzl
  7. 61
      build.yaml
  8. 2
      build_config.rb
  9. 4
      cmake/OWNERS
  10. 8
      cmake/ssl.cmake
  11. 7
      cmake/zlib.cmake
  12. 209
      config.m4
  13. 209
      config.w32
  14. 156
      doc/command_line_tool.md
  15. 2
      doc/compression.md
  16. 1
      doc/environment_variables.md
  17. 4
      examples/python/interceptors/headers/generic_client_interceptor.py
  18. 7
      gRPC-C++.podspec
  19. 16
      gRPC-Core.podspec
  20. 8
      grpc.def
  21. 224
      grpc.gemspec
  22. 388
      grpc.gyp
  23. 49
      include/grpc++/alarm.h
  24. 19
      include/grpc++/generic/generic_stub.h
  25. 4
      include/grpc++/impl/codegen/call.h
  26. 13
      include/grpc++/impl/codegen/client_context.h
  27. 115
      include/grpc++/impl/codegen/completion_queue.h
  28. 14
      include/grpc++/impl/codegen/proto_utils.h
  29. 9
      include/grpc++/impl/codegen/server_context.h
  30. 48
      include/grpc/compression_ruby.h
  31. 19
      include/grpc/grpc.h
  32. 4
      include/grpc/impl/codegen/compression_types.h
  33. 3
      include/grpc/impl/codegen/grpc_types.h
  34. 2
      include/grpc/module.modulemap
  35. 224
      package.xml
  36. 2
      requirements.txt
  37. 3
      setup.py
  38. 2887
      src/boringssl/crypto_test_data.cc
  39. 1046
      src/boringssl/err_data.c
  40. 15
      src/boringssl/gen_build_yaml.py
  41. 36
      src/compiler/cpp_generator.cc
  42. 2
      src/compiler/cpp_generator.h
  43. 3
      src/compiler/cpp_plugin.cc
  44. 13
      src/core/ext/filters/client_channel/client_channel.cc
  45. 2
      src/core/ext/filters/client_channel/http_proxy.cc
  46. 3
      src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc
  47. 2
      src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
  48. 82
      src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc
  49. 16
      src/core/ext/filters/client_channel/lb_policy/subchannel_list.cc
  50. 2
      src/core/ext/filters/client_channel/lb_policy/subchannel_list.h
  51. 3
      src/core/ext/filters/client_channel/parse_address.cc
  52. 91
      src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
  53. 4
      src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
  54. 96
      src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc
  55. 71
      src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc
  56. 15
      src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h
  57. 2
      src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc
  58. 14
      src/core/ext/filters/client_channel/subchannel.cc
  59. 4
      src/core/ext/filters/client_channel/subchannel.h
  60. 3
      src/core/ext/filters/http/client/http_client_filter.cc
  61. 10
      src/core/ext/filters/http/message_compress/message_compress_filter.cc
  62. 3
      src/core/ext/filters/http/server/http_server_filter.cc
  63. 4
      src/core/ext/filters/load_reporting/server_load_reporting_filter.cc
  64. 180
      src/core/ext/filters/max_age/max_age_filter.cc
  65. 53
      src/core/ext/transport/chttp2/transport/chttp2_transport.cc
  66. 6
      src/core/ext/transport/chttp2/transport/hpack_parser.cc
  67. 14
      src/core/ext/transport/chttp2/transport/parsing.cc
  68. 7
      src/core/ext/transport/chttp2/transport/writing.cc
  69. 2
      src/core/ext/transport/cronet/transport/cronet_transport.cc
  70. 37
      src/core/lib/compression/compression.cc
  71. 8
      src/core/lib/compression/compression_internal.cc
  72. 66
      src/core/lib/compression/compression_ruby.cc
  73. 12
      src/core/lib/gpr/alloc.cc
  74. 2
      src/core/lib/gpr/env.h
  75. 3
      src/core/lib/gpr/host_port.cc
  76. 18
      src/core/lib/gpr/host_port.h
  77. 12
      src/core/lib/gpr/sync_posix.cc
  78. 41
      src/core/lib/gprpp/orphanable.h
  79. 40
      src/core/lib/gprpp/ref_counted.h
  80. 18
      src/core/lib/gprpp/ref_counted_ptr.h
  81. 6
      src/core/lib/iomgr/call_combiner.cc
  82. 6
      src/core/lib/iomgr/closure.h
  83. 22
      src/core/lib/iomgr/combiner.cc
  84. 25
      src/core/lib/iomgr/error.cc
  85. 31
      src/core/lib/iomgr/ev_epoll1_linux.cc
  86. 43
      src/core/lib/iomgr/ev_epollex_linux.cc
  87. 21
      src/core/lib/iomgr/ev_epollsig_linux.cc
  88. 25
      src/core/lib/iomgr/ev_poll_posix.cc
  89. 45
      src/core/lib/iomgr/ev_posix.cc
  90. 3
      src/core/lib/iomgr/exec_ctx.cc
  91. 3
      src/core/lib/iomgr/resolve_address_posix.cc
  92. 2
      src/core/lib/iomgr/resolve_address_uv.cc
  93. 3
      src/core/lib/iomgr/resolve_address_windows.cc
  94. 2
      src/core/lib/iomgr/sockaddr_utils.cc
  95. 3
      src/core/lib/iomgr/socket_utils_common_posix.cc
  96. 17
      src/core/lib/iomgr/tcp_posix.cc
  97. 3
      src/core/lib/iomgr/wakeup_fd_eventfd.cc
  98. 23
      src/core/lib/profiling/timers.h
  99. 9
      src/core/lib/security/transport/client_auth_filter.cc
  100. 4
      src/core/lib/security/transport/secure_endpoint.cc
  101. Some files were not shown because too many files have changed in this diff Show More

@ -3,5 +3,8 @@
# repository as the source of truth for module ownership.
/**/OWNERS @markdroth @nicolasnoble @a11r
/bazel/** @nicolasnoble @dgquintas @a11r @vjpai
/cmake/** @jtattermusch @nicolasnoble @matt-kwong
/src/core/ext/filters/client_channel/** @markdroth @dgquintas @a11r
/tools/run_tests/performance/** @ncteisen @matt-kwong @ctiller
/test/cpp/end2end/** @vjpai @yang-g @y-zeng
/tools/dockerfile/** @jtattermusch @matt-kwong @nicolasnoble
/tools/run_tests/performance/** @ncteisen @matt-kwong @jtattermusch

15
BUILD

@ -56,7 +56,7 @@ config_setting(
# This should be updated along with build.yaml
g_stands_for = "glamorous"
core_version = "5.0.0-dev"
core_version = "6.0.0-dev"
version = "1.10.0-dev"
@ -69,7 +69,6 @@ GPR_PUBLIC_HDRS = [
"include/grpc/support/avl.h",
"include/grpc/support/cmdline.h",
"include/grpc/support/cpu.h",
"include/grpc/support/host_port.h",
"include/grpc/support/log.h",
"include/grpc/support/log_windows.h",
"include/grpc/support/port_platform.h",
@ -89,7 +88,6 @@ GRPC_PUBLIC_HDRS = [
"include/grpc/byte_buffer.h",
"include/grpc/byte_buffer_reader.h",
"include/grpc/compression.h",
"include/grpc/compression_ruby.h",
"include/grpc/fork.h",
"include/grpc/grpc.h",
"include/grpc/grpc_posix.h",
@ -114,6 +112,7 @@ GRPCXX_SRCS = [
"src/cpp/client/create_channel_posix.cc",
"src/cpp/client/credentials_cc.cc",
"src/cpp/client/generic_stub.cc",
"src/cpp/common/alarm.cc",
"src/cpp/common/channel_arguments.cc",
"src/cpp/common/channel_filter.cc",
"src/cpp/common/completion_queue_cc.cc",
@ -498,6 +497,7 @@ grpc_cc_library(
"src/core/lib/gpr/arena.h",
"src/core/lib/gpr/env.h",
"src/core/lib/gpr/fork.h",
"src/core/lib/gpr/host_port.h",
"src/core/lib/gpr/mpscq.h",
"src/core/lib/gpr/murmur_hash.h",
"src/core/lib/gpr/spinlock.h",
@ -598,6 +598,7 @@ grpc_cc_library(
public_hdrs = ["src/core/lib/gprpp/orphanable.h"],
deps = [
"debug_location",
"ref_counted_ptr",
"gpr++_base",
"grpc_trace",
],
@ -609,6 +610,7 @@ grpc_cc_library(
public_hdrs = ["src/core/lib/gprpp/ref_counted.h"],
deps = [
"debug_location",
"ref_counted_ptr",
"gpr++_base",
"grpc_trace",
],
@ -636,7 +638,6 @@ grpc_cc_library(
"src/core/lib/channel/handshaker_registry.cc",
"src/core/lib/compression/compression.cc",
"src/core/lib/compression/compression_internal.cc",
"src/core/lib/compression/compression_ruby.cc",
"src/core/lib/compression/message_compress.cc",
"src/core/lib/compression/stream_compression.cc",
"src/core/lib/compression/stream_compression_gzip.cc",
@ -729,7 +730,6 @@ grpc_cc_library(
"src/core/lib/slice/slice_hash_table.cc",
"src/core/lib/slice/slice_intern.cc",
"src/core/lib/slice/slice_string_helpers.cc",
"src/core/lib/surface/alarm.cc",
"src/core/lib/surface/api_trace.cc",
"src/core/lib/surface/byte_buffer.cc",
"src/core/lib/surface/byte_buffer_reader.cc",
@ -854,7 +854,6 @@ grpc_cc_library(
"src/core/lib/slice/slice_hash_table.h",
"src/core/lib/slice/slice_internal.h",
"src/core/lib/slice/slice_string_helpers.h",
"src/core/lib/surface/alarm_internal.h",
"src/core/lib/surface/api_trace.h",
"src/core/lib/surface/call.h",
"src/core/lib/surface/call_test_only.h",
@ -1533,14 +1532,14 @@ grpc_cc_library(
grpc_cc_library(
name = "tsi",
srcs = [
"src/core/tsi/alts_transport_security.cc",
"src/core/tsi/fake_transport_security.cc",
"src/core/tsi/gts_transport_security.cc",
"src/core/tsi/ssl_transport_security.cc",
"src/core/tsi/transport_security_grpc.cc",
],
hdrs = [
"src/core/tsi/alts_transport_security.h",
"src/core/tsi/fake_transport_security.h",
"src/core/tsi/gts_transport_security.h",
"src/core/tsi/ssl_transport_security.h",
"src/core/tsi/ssl_types.h",
"src/core/tsi/transport_security_grpc.h",

@ -30,10 +30,10 @@ set(PACKAGE_TARNAME "${PACKAGE_NAME}-${PACKAGE_VERSION}")
set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/")
project(${PACKAGE_NAME} C CXX)
set(gRPC_INSTALL_BINDIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables")
set(gRPC_INSTALL_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries")
set(gRPC_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Installation directory for headers")
set(gRPC_INSTALL_CMAKEDIR "${CMAKE_INSTALL_PREFIX}/lib/cmake/${PACKAGE_NAME}" CACHE PATH "Installation directory for cmake config files")
set(gRPC_INSTALL_BINDIR "bin" CACHE STRING "Installation directory for executables")
set(gRPC_INSTALL_LIBDIR "lib" CACHE STRING "Installation directory for libraries")
set(gRPC_INSTALL_INCLUDEDIR "include" CACHE STRING "Installation directory for headers")
set(gRPC_INSTALL_CMAKEDIR "lib/cmake/${PACKAGE_NAME}" CACHE STRING "Installation directory for cmake config files")
# Options
option(gRPC_BUILD_TESTS "Build tests" OFF)
@ -209,7 +209,6 @@ add_custom_target(tools
if (gRPC_BUILD_TESTS)
add_custom_target(buildtests_c)
add_dependencies(buildtests_c alarm_test)
add_dependencies(buildtests_c algorithm_test)
add_dependencies(buildtests_c alloc_test)
add_dependencies(buildtests_c alpn_test)
@ -227,6 +226,7 @@ add_dependencies(buildtests_c compression_test)
add_dependencies(buildtests_c concurrent_connectivity_test)
add_dependencies(buildtests_c connection_refused_test)
add_dependencies(buildtests_c dns_resolver_connectivity_test)
add_dependencies(buildtests_c dns_resolver_cooldown_test)
add_dependencies(buildtests_c dns_resolver_test)
if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
add_dependencies(buildtests_c dualstack_socket_test)
@ -316,7 +316,6 @@ add_dependencies(buildtests_c json_rewrite_test)
add_dependencies(buildtests_c json_stream_error_test)
add_dependencies(buildtests_c json_test)
add_dependencies(buildtests_c lame_client_test)
add_dependencies(buildtests_c lb_policies_test)
add_dependencies(buildtests_c load_file_test)
add_dependencies(buildtests_c memory_profile_client)
add_dependencies(buildtests_c memory_profile_server)
@ -389,9 +388,11 @@ endif()
add_dependencies(buildtests_c public_headers_must_be_c89)
add_dependencies(buildtests_c badreq_bad_client_test)
add_dependencies(buildtests_c connection_prefix_bad_client_test)
add_dependencies(buildtests_c duplicate_header_bad_client_test)
add_dependencies(buildtests_c head_of_line_blocking_bad_client_test)
add_dependencies(buildtests_c headers_bad_client_test)
add_dependencies(buildtests_c initial_settings_frame_bad_client_test)
add_dependencies(buildtests_c large_metadata_bad_client_test)
add_dependencies(buildtests_c server_registered_method_bad_client_test)
add_dependencies(buildtests_c simple_request_bad_client_test)
add_dependencies(buildtests_c unknown_frame_bad_client_test)
@ -463,7 +464,7 @@ add_dependencies(buildtests_c ssl_server_fuzzer_one_entry)
add_dependencies(buildtests_c uri_fuzzer_test_one_entry)
add_custom_target(buildtests_cxx)
add_dependencies(buildtests_cxx alarm_cpp_test)
add_dependencies(buildtests_cxx alarm_test)
add_dependencies(buildtests_cxx async_end2end_test)
add_dependencies(buildtests_cxx auth_property_iterator_test)
add_dependencies(buildtests_cxx backoff_test)
@ -706,7 +707,6 @@ foreach(_hdr
include/grpc/support/avl.h
include/grpc/support/cmdline.h
include/grpc/support/cpu.h
include/grpc/support/host_port.h
include/grpc/support/log.h
include/grpc/support/log_windows.h
include/grpc/support/port_platform.h
@ -799,7 +799,6 @@ add_library(grpc
src/core/lib/channel/handshaker_registry.cc
src/core/lib/compression/compression.cc
src/core/lib/compression/compression_internal.cc
src/core/lib/compression/compression_ruby.cc
src/core/lib/compression/message_compress.cc
src/core/lib/compression/stream_compression.cc
src/core/lib/compression/stream_compression_gzip.cc
@ -892,7 +891,6 @@ add_library(grpc
src/core/lib/slice/slice_hash_table.cc
src/core/lib/slice/slice_intern.cc
src/core/lib/slice/slice_string_helpers.cc
src/core/lib/surface/alarm.cc
src/core/lib/surface/api_trace.cc
src/core/lib/surface/byte_buffer.cc
src/core/lib/surface/byte_buffer_reader.cc
@ -977,8 +975,8 @@ add_library(grpc
src/core/lib/security/transport/tsi_error.cc
src/core/lib/security/util/json_util.cc
src/core/lib/surface/init_secure.cc
src/core/tsi/alts_transport_security.cc
src/core/tsi/fake_transport_security.cc
src/core/tsi/gts_transport_security.cc
src/core/tsi/ssl_transport_security.cc
src/core/tsi/transport_security_grpc.cc
src/core/tsi/transport_security.cc
@ -1101,7 +1099,6 @@ foreach(_hdr
include/grpc/byte_buffer.h
include/grpc/byte_buffer_reader.h
include/grpc/compression.h
include/grpc/compression_ruby.h
include/grpc/fork.h
include/grpc/grpc.h
include/grpc/grpc_posix.h
@ -1142,7 +1139,6 @@ add_library(grpc_cronet
src/core/lib/channel/handshaker_registry.cc
src/core/lib/compression/compression.cc
src/core/lib/compression/compression_internal.cc
src/core/lib/compression/compression_ruby.cc
src/core/lib/compression/message_compress.cc
src/core/lib/compression/stream_compression.cc
src/core/lib/compression/stream_compression_gzip.cc
@ -1235,7 +1231,6 @@ add_library(grpc_cronet
src/core/lib/slice/slice_hash_table.cc
src/core/lib/slice/slice_intern.cc
src/core/lib/slice/slice_string_helpers.cc
src/core/lib/surface/alarm.cc
src/core/lib/surface/api_trace.cc
src/core/lib/surface/byte_buffer.cc
src/core/lib/surface/byte_buffer_reader.cc
@ -1345,8 +1340,8 @@ add_library(grpc_cronet
src/core/lib/security/transport/tsi_error.cc
src/core/lib/security/util/json_util.cc
src/core/lib/surface/init_secure.cc
src/core/tsi/alts_transport_security.cc
src/core/tsi/fake_transport_security.cc
src/core/tsi/gts_transport_security.cc
src/core/tsi/ssl_transport_security.cc
src/core/tsi/transport_security_grpc.cc
src/core/tsi/transport_security.cc
@ -1467,7 +1462,6 @@ add_library(grpc_test_util
src/core/lib/channel/handshaker_registry.cc
src/core/lib/compression/compression.cc
src/core/lib/compression/compression_internal.cc
src/core/lib/compression/compression_ruby.cc
src/core/lib/compression/message_compress.cc
src/core/lib/compression/stream_compression.cc
src/core/lib/compression/stream_compression_gzip.cc
@ -1560,7 +1554,6 @@ add_library(grpc_test_util
src/core/lib/slice/slice_hash_table.cc
src/core/lib/slice/slice_intern.cc
src/core/lib/slice/slice_string_helpers.cc
src/core/lib/surface/alarm.cc
src/core/lib/surface/api_trace.cc
src/core/lib/surface/byte_buffer.cc
src/core/lib/surface/byte_buffer_reader.cc
@ -1736,7 +1729,6 @@ add_library(grpc_test_util_unsecure
src/core/lib/channel/handshaker_registry.cc
src/core/lib/compression/compression.cc
src/core/lib/compression/compression_internal.cc
src/core/lib/compression/compression_ruby.cc
src/core/lib/compression/message_compress.cc
src/core/lib/compression/stream_compression.cc
src/core/lib/compression/stream_compression_gzip.cc
@ -1829,7 +1821,6 @@ add_library(grpc_test_util_unsecure
src/core/lib/slice/slice_hash_table.cc
src/core/lib/slice/slice_intern.cc
src/core/lib/slice/slice_string_helpers.cc
src/core/lib/surface/alarm.cc
src/core/lib/surface/api_trace.cc
src/core/lib/surface/byte_buffer.cc
src/core/lib/surface/byte_buffer_reader.cc
@ -1988,7 +1979,6 @@ add_library(grpc_unsecure
src/core/lib/channel/handshaker_registry.cc
src/core/lib/compression/compression.cc
src/core/lib/compression/compression_internal.cc
src/core/lib/compression/compression_ruby.cc
src/core/lib/compression/message_compress.cc
src/core/lib/compression/stream_compression.cc
src/core/lib/compression/stream_compression_gzip.cc
@ -2081,7 +2071,6 @@ add_library(grpc_unsecure
src/core/lib/slice/slice_hash_table.cc
src/core/lib/slice/slice_intern.cc
src/core/lib/slice/slice_string_helpers.cc
src/core/lib/surface/alarm.cc
src/core/lib/surface/api_trace.cc
src/core/lib/surface/byte_buffer.cc
src/core/lib/surface/byte_buffer_reader.cc
@ -2256,7 +2245,6 @@ foreach(_hdr
include/grpc/byte_buffer.h
include/grpc/byte_buffer_reader.h
include/grpc/compression.h
include/grpc/compression_ruby.h
include/grpc/fork.h
include/grpc/grpc.h
include/grpc/grpc_posix.h
@ -2380,6 +2368,7 @@ add_library(grpc++
src/cpp/client/create_channel_posix.cc
src/cpp/client/credentials_cc.cc
src/cpp/client/generic_stub.cc
src/cpp/common/alarm.cc
src/cpp/common/channel_arguments.cc
src/cpp/common/channel_filter.cc
src/cpp/common/completion_queue_cc.cc
@ -2496,7 +2485,6 @@ foreach(_hdr
include/grpc/support/avl.h
include/grpc/support/cmdline.h
include/grpc/support/cpu.h
include/grpc/support/host_port.h
include/grpc/support/log.h
include/grpc/support/log_windows.h
include/grpc/support/port_platform.h
@ -2526,7 +2514,6 @@ foreach(_hdr
include/grpc/byte_buffer.h
include/grpc/byte_buffer_reader.h
include/grpc/compression.h
include/grpc/compression_ruby.h
include/grpc/fork.h
include/grpc/grpc.h
include/grpc/grpc_posix.h
@ -2640,15 +2627,6 @@ target_link_libraries(grpc++_core_stats
grpc++
)
foreach(_hdr
src/cpp/util/core_stats.h
)
string(REPLACE "include/" "" _path ${_hdr})
get_filename_component(_path ${_path} PATH)
install(FILES ${_hdr}
DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}"
)
endforeach()
endif (gRPC_BUILD_TESTS)
@ -2664,6 +2642,7 @@ add_library(grpc++_cronet
src/cpp/client/create_channel_posix.cc
src/cpp/client/credentials_cc.cc
src/cpp/client/generic_stub.cc
src/cpp/common/alarm.cc
src/cpp/common/channel_arguments.cc
src/cpp/common/channel_filter.cc
src/cpp/common/completion_queue_cc.cc
@ -2726,7 +2705,6 @@ add_library(grpc++_cronet
src/core/lib/channel/handshaker_registry.cc
src/core/lib/compression/compression.cc
src/core/lib/compression/compression_internal.cc
src/core/lib/compression/compression_ruby.cc
src/core/lib/compression/message_compress.cc
src/core/lib/compression/stream_compression.cc
src/core/lib/compression/stream_compression_gzip.cc
@ -2819,7 +2797,6 @@ add_library(grpc++_cronet
src/core/lib/slice/slice_hash_table.cc
src/core/lib/slice/slice_intern.cc
src/core/lib/slice/slice_string_helpers.cc
src/core/lib/surface/alarm.cc
src/core/lib/surface/api_trace.cc
src/core/lib/surface/byte_buffer.cc
src/core/lib/surface/byte_buffer_reader.cc
@ -2976,7 +2953,6 @@ foreach(_hdr
include/grpc/support/avl.h
include/grpc/support/cmdline.h
include/grpc/support/cpu.h
include/grpc/support/host_port.h
include/grpc/support/log.h
include/grpc/support/log_windows.h
include/grpc/support/port_platform.h
@ -3006,7 +2982,6 @@ foreach(_hdr
include/grpc/byte_buffer.h
include/grpc/byte_buffer_reader.h
include/grpc/compression.h
include/grpc/compression_ruby.h
include/grpc/fork.h
include/grpc/grpc.h
include/grpc/grpc_posix.h
@ -3587,6 +3562,7 @@ add_library(grpc++_unsecure
src/cpp/client/create_channel_posix.cc
src/cpp/client/credentials_cc.cc
src/cpp/client/generic_stub.cc
src/cpp/common/alarm.cc
src/cpp/common/channel_arguments.cc
src/cpp/common/channel_filter.cc
src/cpp/common/completion_queue_cc.cc
@ -3702,7 +3678,6 @@ foreach(_hdr
include/grpc/support/avl.h
include/grpc/support/cmdline.h
include/grpc/support/cpu.h
include/grpc/support/host_port.h
include/grpc/support/log.h
include/grpc/support/log_windows.h
include/grpc/support/port_platform.h
@ -3732,7 +3707,6 @@ foreach(_hdr
include/grpc/byte_buffer.h
include/grpc/byte_buffer_reader.h
include/grpc/compression.h
include/grpc/compression_ruby.h
include/grpc/fork.h
include/grpc/grpc.h
include/grpc/grpc_posix.h
@ -4731,33 +4705,6 @@ endif (gRPC_BUILD_TESTS)
if (gRPC_BUILD_TESTS)
add_executable(alarm_test
test/core/surface/alarm_test.cc
)
target_include_directories(alarm_test
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR}
PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR}
)
target_link_libraries(alarm_test
${_gRPC_ALLTARGETS_LIBRARIES}
grpc_test_util
grpc
gpr_test_util
gpr
)
endif (gRPC_BUILD_TESTS)
if (gRPC_BUILD_TESTS)
add_executable(algorithm_test
test/core/compression/algorithm_test.cc
)
@ -5242,6 +5189,33 @@ target_link_libraries(dns_resolver_connectivity_test
endif (gRPC_BUILD_TESTS)
if (gRPC_BUILD_TESTS)
add_executable(dns_resolver_cooldown_test
test/core/client_channel/resolvers/dns_resolver_cooldown_test.cc
)
target_include_directories(dns_resolver_cooldown_test
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR}
PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR}
)
target_link_libraries(dns_resolver_cooldown_test
${_gRPC_ALLTARGETS_LIBRARIES}
grpc_test_util
grpc
gpr_test_util
gpr
)
endif (gRPC_BUILD_TESTS)
if (gRPC_BUILD_TESTS)
add_executable(dns_resolver_test
test/core/client_channel/resolvers/dns_resolver_test.cc
)
@ -6985,33 +6959,6 @@ target_link_libraries(lame_client_test
endif (gRPC_BUILD_TESTS)
if (gRPC_BUILD_TESTS)
add_executable(lb_policies_test
test/core/client_channel/lb_policies_test.cc
)
target_include_directories(lb_policies_test
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR}
PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR}
)
target_link_libraries(lb_policies_test
${_gRPC_ALLTARGETS_LIBRARIES}
grpc_test_util
grpc
gpr_test_util
gpr
)
endif (gRPC_BUILD_TESTS)
if (gRPC_BUILD_TESTS)
add_executable(load_file_test
test/core/iomgr/load_file_test.cc
)
@ -8301,14 +8248,14 @@ endif()
endif (gRPC_BUILD_TESTS)
if (gRPC_BUILD_TESTS)
add_executable(alarm_cpp_test
test/cpp/common/alarm_cpp_test.cc
add_executable(alarm_test
test/cpp/common/alarm_test.cc
third_party/googletest/googletest/src/gtest-all.cc
third_party/googletest/googlemock/src/gmock-all.cc
)
target_include_directories(alarm_cpp_test
target_include_directories(alarm_test
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
@ -8324,7 +8271,7 @@ target_include_directories(alarm_cpp_test
PRIVATE ${_gRPC_PROTO_GENS_DIR}
)
target_link_libraries(alarm_cpp_test
target_link_libraries(alarm_test
${_gRPC_PROTOBUF_LIBRARIES}
${_gRPC_ALLTARGETS_LIBRARIES}
grpc++_test_util_unsecure
@ -12352,6 +12299,35 @@ target_link_libraries(connection_prefix_bad_client_test
endif (gRPC_BUILD_TESTS)
if (gRPC_BUILD_TESTS)
add_executable(duplicate_header_bad_client_test
test/core/bad_client/tests/duplicate_header.cc
)
target_include_directories(duplicate_header_bad_client_test
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR}
PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR}
)
target_link_libraries(duplicate_header_bad_client_test
${_gRPC_SSL_LIBRARIES}
${_gRPC_ALLTARGETS_LIBRARIES}
bad_client_test
grpc_test_util_unsecure
grpc_unsecure
gpr_test_util
gpr
)
endif (gRPC_BUILD_TESTS)
if (gRPC_BUILD_TESTS)
add_executable(head_of_line_blocking_bad_client_test
test/core/bad_client/tests/head_of_line_blocking.cc
)
@ -12439,6 +12415,35 @@ target_link_libraries(initial_settings_frame_bad_client_test
endif (gRPC_BUILD_TESTS)
if (gRPC_BUILD_TESTS)
add_executable(large_metadata_bad_client_test
test/core/bad_client/tests/large_metadata.cc
)
target_include_directories(large_metadata_bad_client_test
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR}
PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR}
)
target_link_libraries(large_metadata_bad_client_test
${_gRPC_SSL_LIBRARIES}
${_gRPC_ALLTARGETS_LIBRARIES}
bad_client_test
grpc_test_util_unsecure
grpc_unsecure
gpr_test_util
gpr
)
endif (gRPC_BUILD_TESTS)
if (gRPC_BUILD_TESTS)
add_executable(server_registered_method_bad_client_test
test/core/bad_client/tests/server_registered_method.cc
)

2960
Makefile

File diff suppressed because it is too large Load Diff

@ -158,7 +158,7 @@ def grpc_sh_test(name, srcs, args = [], data = []):
data = data)
def grpc_sh_binary(name, srcs, data = []):
native.sh_test(
native.sh_binary(
name = name,
srcs = srcs,
data = data)

@ -120,10 +120,10 @@ def grpc_deps():
if "com_github_bazelbuild_bazeltoolchains" not in native.existing_rules():
native.http_archive(
name = "com_github_bazelbuild_bazeltoolchains",
strip_prefix = "bazel-toolchains-af4681c3d19f063f090222ec3d04108c4e0ca255",
strip_prefix = "bazel-toolchains-f3b09700fae5d7b6e659d7cefe0dcc6e8498504c",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/af4681c3d19f063f090222ec3d04108c4e0ca255.tar.gz",
"https://github.com/bazelbuild/bazel-toolchains/archive/af4681c3d19f063f090222ec3d04108c4e0ca255.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/f3b09700fae5d7b6e659d7cefe0dcc6e8498504c.tar.gz",
"https://github.com/bazelbuild/bazel-toolchains/archive/f3b09700fae5d7b6e659d7cefe0dcc6e8498504c.tar.gz",
],
sha256 = "d58bb2d6c8603f600d522b6104d6192a65339aa26cbba9f11ff5c4b36dedb928",
sha256 = "ed829b5eea8af1f405f4cc3d6ecfc3b1365bb7843171036030a31b5127002311",
)

@ -12,7 +12,7 @@ settings:
'#08': Use "-preN" suffixes to identify pre-release versions
'#09': Per-language overrides are possible with (eg) ruby_version tag here
'#10': See the expand_version.py for all the quirks here
core_version: 5.0.0-dev
core_version: 6.0.0-dev
g_stands_for: glamorous
version: 1.10.0-dev
filegroups:
@ -82,7 +82,6 @@ filegroups:
- include/grpc/support/avl.h
- include/grpc/support/cmdline.h
- include/grpc/support/cpu.h
- include/grpc/support/host_port.h
- include/grpc/support/log.h
- include/grpc/support/log_windows.h
- include/grpc/support/port_platform.h
@ -100,6 +99,7 @@ filegroups:
- src/core/lib/gpr/arena.h
- src/core/lib/gpr/env.h
- src/core/lib/gpr/fork.h
- src/core/lib/gpr/host_port.h
- src/core/lib/gpr/mpscq.h
- src/core/lib/gpr/murmur_hash.h
- src/core/lib/gpr/spinlock.h
@ -160,7 +160,6 @@ filegroups:
- src/core/lib/channel/handshaker_registry.cc
- src/core/lib/compression/compression.cc
- src/core/lib/compression/compression_internal.cc
- src/core/lib/compression/compression_ruby.cc
- src/core/lib/compression/message_compress.cc
- src/core/lib/compression/stream_compression.cc
- src/core/lib/compression/stream_compression_gzip.cc
@ -253,7 +252,6 @@ filegroups:
- src/core/lib/slice/slice_hash_table.cc
- src/core/lib/slice/slice_intern.cc
- src/core/lib/slice/slice_string_helpers.cc
- src/core/lib/surface/alarm.cc
- src/core/lib/surface/api_trace.cc
- src/core/lib/surface/byte_buffer.cc
- src/core/lib/surface/byte_buffer_reader.cc
@ -297,7 +295,6 @@ filegroups:
- include/grpc/byte_buffer.h
- include/grpc/byte_buffer_reader.h
- include/grpc/compression.h
- include/grpc/compression_ruby.h
- include/grpc/fork.h
- include/grpc/grpc.h
- include/grpc/grpc_posix.h
@ -405,7 +402,6 @@ filegroups:
- src/core/lib/slice/slice_hash_table.h
- src/core/lib/slice/slice_internal.h
- src/core/lib/slice/slice_string_helpers.h
- src/core/lib/surface/alarm_internal.h
- src/core/lib/surface/api_trace.h
- src/core/lib/surface/call.h
- src/core/lib/surface/call_test_only.h
@ -935,19 +931,19 @@ filegroups:
- grpc
- name: tsi
headers:
- src/core/tsi/alts_transport_security.h
- src/core/tsi/fake_transport_security.h
- src/core/tsi/gts_transport_security.h
- src/core/tsi/ssl_transport_security.h
- src/core/tsi/ssl_types.h
- src/core/tsi/transport_security_grpc.h
src:
- src/core/tsi/alts_transport_security.cc
- src/core/tsi/fake_transport_security.cc
- src/core/tsi/gts_transport_security.cc
- src/core/tsi/ssl_transport_security.cc
- src/core/tsi/transport_security_grpc.cc
deps:
- gpr
plugin: grpc_tsi_gts
plugin: grpc_tsi_alts
secure: true
uses:
- tsi_interface
@ -1078,6 +1074,7 @@ filegroups:
- src/cpp/client/create_channel_posix.cc
- src/cpp/client/credentials_cc.cc
- src/cpp/client/generic_stub.cc
- src/cpp/common/alarm.cc
- src/cpp/common/channel_arguments.cc
- src/cpp/common/channel_filter.cc
- src/cpp/common/completion_queue_cc.cc
@ -1336,7 +1333,7 @@ libs:
- name: grpc++_core_stats
build: private
language: c++
public_headers:
headers:
- src/cpp/util/core_stats.h
src:
- src/proto/grpc/core/stats.proto
@ -1710,17 +1707,6 @@ libs:
- winsock
- global
targets:
- name: alarm_test
cpu_cost: 0.1
build: test
language: c
src:
- test/core/surface/alarm_test.cc
deps:
- grpc_test_util
- grpc
- gpr_test_util
- gpr
- name: algorithm_test
build: test
language: c
@ -1940,6 +1926,16 @@ targets:
- gpr
exclude_iomgrs:
- uv
- name: dns_resolver_cooldown_test
build: test
language: c
src:
- test/core/client_channel/resolvers/dns_resolver_cooldown_test.cc
deps:
- grpc_test_util
- grpc
- gpr_test_util
- gpr
- name: dns_resolver_test
build: test
language: c
@ -2725,19 +2721,6 @@ targets:
- grpc
- gpr_test_util
- gpr
- name: lb_policies_test
cpu_cost: 0.1
build: test
run: false
language: c
src:
- test/core/client_channel/lb_policies_test.cc
deps:
- grpc_test_util
- grpc
- gpr_test_util
- gpr
uses_polling: false
- name: load_file_test
build: test
language: c
@ -3411,12 +3394,12 @@ targets:
- mac
- linux
- posix
- name: alarm_cpp_test
- name: alarm_test
gtest: true
build: test
language: c++
src:
- test/cpp/common/alarm_cpp_test.cc
- test/cpp/common/alarm_test.cc
deps:
- grpc++_test_util_unsecure
- grpc_test_util_unsecure
@ -5059,9 +5042,11 @@ defaults:
CPPFLAGS: -Ithird_party/benchmark/include -DHAVE_POSIX_REGEX
boringssl:
CFLAGS: -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas
-Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI)
-Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare -Wno-implicit-fallthrough
$(NO_W_EXTRA_SEMI)
CPPFLAGS: -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM
-D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX
CXXFLAGS: -fno-rtti -fno-exceptions
global:
COREFLAGS: -fno-rtti -fno-exceptions
CPPFLAGS: -g -Wall -Wextra -Werror -Wno-long-long -Wno-unused-parameter -DOSATOMIC_USE_INLINED=1
@ -5069,7 +5054,7 @@ defaults:
LDFLAGS: -g
zlib:
CFLAGS: -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-implicit-function-declaration
$(W_NO_SHIFT_NEGATIVE_VALUE) -fvisibility=hidden
-Wno-implicit-fallthrough $(W_NO_SHIFT_NEGATIVE_VALUE) -fvisibility=hidden
openssl_fallback:
base_uri: https://openssl.org/source/old/1.0.2/
extraction_dir: openssl-1.0.2f

@ -13,5 +13,5 @@
# limitations under the License.
module GrpcBuildConfig
CORE_WINDOWS_DLL = '/tmp/libs/opt/grpc-5.dll'
CORE_WINDOWS_DLL = '/tmp/libs/opt/grpc-6.dll'
end

@ -0,0 +1,4 @@
set noparent
@jtattermusch
@nicolasnoble
@matt-kwong

@ -32,7 +32,13 @@ if("${gRPC_SSL_PROVIDER}" STREQUAL "module")
endif()
elseif("${gRPC_SSL_PROVIDER}" STREQUAL "package")
find_package(OpenSSL REQUIRED)
set(_gRPC_SSL_LIBRARIES ${OPENSSL_LIBRARIES})
if(TARGET OpenSSL::SSL)
set(_gRPC_SSL_LIBRARIES OpenSSL::SSL OpenSSL::Crypto)
else()
set(_gRPC_SSL_LIBRARIES ${OPENSSL_LIBRARIES})
endif()
set(_gRPC_SSL_INCLUDE_DIR ${OPENSSL_INCLUDE_DIR})
set(_gRPC_FIND_SSL "if(NOT OPENSSL_FOUND)\n find_package(OpenSSL)\nendif()")
endif()

@ -34,7 +34,12 @@ if("${gRPC_ZLIB_PROVIDER}" STREQUAL "module")
endif()
elseif("${gRPC_ZLIB_PROVIDER}" STREQUAL "package")
find_package(ZLIB REQUIRED)
set(_gRPC_ZLIB_LIBRARIES ${ZLIB_LIBRARIES})
if(TARGET ZLIB::ZLIB)
set(_gRPC_ZLIB_LIBRARIES ZLIB::ZLIB)
else()
set(_gRPC_ZLIB_LIBRARIES ${ZLIB_LIBRARIES})
endif()
set(_gRPC_ZLIB_INCLUDE_DIR ${ZLIB_INCLUDE_DIRS})
set(_gRPC_FIND_ZLIB "if(NOT ZLIB_FOUND)\n find_package(ZLIB)\nendif()")
endif()

@ -94,7 +94,6 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/channel/handshaker_registry.cc \
src/core/lib/compression/compression.cc \
src/core/lib/compression/compression_internal.cc \
src/core/lib/compression/compression_ruby.cc \
src/core/lib/compression/message_compress.cc \
src/core/lib/compression/stream_compression.cc \
src/core/lib/compression/stream_compression_gzip.cc \
@ -187,7 +186,6 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/slice/slice_hash_table.cc \
src/core/lib/slice/slice_intern.cc \
src/core/lib/slice/slice_string_helpers.cc \
src/core/lib/surface/alarm.cc \
src/core/lib/surface/api_trace.cc \
src/core/lib/surface/byte_buffer.cc \
src/core/lib/surface/byte_buffer_reader.cc \
@ -272,8 +270,8 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/security/transport/tsi_error.cc \
src/core/lib/security/util/json_util.cc \
src/core/lib/surface/init_secure.cc \
src/core/tsi/alts_transport_security.cc \
src/core/tsi/fake_transport_security.cc \
src/core/tsi/gts_transport_security.cc \
src/core/tsi/ssl_transport_security.cc \
src/core/tsi/transport_security_grpc.cc \
src/core/tsi/transport_security.cc \
@ -337,9 +335,6 @@ if test "$PHP_GRPC" != "no"; then
src/core/ext/filters/workarounds/workaround_utils.cc \
src/core/plugin_registry/grpc_plugin_registry.cc \
src/boringssl/err_data.c \
third_party/boringssl/crypto/aes/aes.c \
third_party/boringssl/crypto/aes/key_wrap.c \
third_party/boringssl/crypto/aes/mode_wrappers.c \
third_party/boringssl/crypto/asn1/a_bitstr.c \
third_party/boringssl/crypto/asn1/a_bool.c \
third_party/boringssl/crypto/asn1/a_d2i_fp.c \
@ -363,7 +358,6 @@ if test "$PHP_GRPC" != "no"; then
third_party/boringssl/crypto/asn1/f_enum.c \
third_party/boringssl/crypto/asn1/f_int.c \
third_party/boringssl/crypto/asn1/f_string.c \
third_party/boringssl/crypto/asn1/t_bitst.c \
third_party/boringssl/crypto/asn1/tasn_dec.c \
third_party/boringssl/crypto/asn1/tasn_enc.c \
third_party/boringssl/crypto/asn1/tasn_fre.c \
@ -371,8 +365,6 @@ if test "$PHP_GRPC" != "no"; then
third_party/boringssl/crypto/asn1/tasn_typ.c \
third_party/boringssl/crypto/asn1/tasn_utl.c \
third_party/boringssl/crypto/asn1/time_support.c \
third_party/boringssl/crypto/asn1/x_bignum.c \
third_party/boringssl/crypto/asn1/x_long.c \
third_party/boringssl/crypto/base64/base64.c \
third_party/boringssl/crypto/bio/bio.c \
third_party/boringssl/crypto/bio/bio_mem.c \
@ -384,44 +376,25 @@ if test "$PHP_GRPC" != "no"; then
third_party/boringssl/crypto/bio/printf.c \
third_party/boringssl/crypto/bio/socket.c \
third_party/boringssl/crypto/bio/socket_helper.c \
third_party/boringssl/crypto/bn/add.c \
third_party/boringssl/crypto/bn/asm/x86_64-gcc.c \
third_party/boringssl/crypto/bn/bn.c \
third_party/boringssl/crypto/bn/bn_asn1.c \
third_party/boringssl/crypto/bn/cmp.c \
third_party/boringssl/crypto/bn/convert.c \
third_party/boringssl/crypto/bn/ctx.c \
third_party/boringssl/crypto/bn/div.c \
third_party/boringssl/crypto/bn/exponentiation.c \
third_party/boringssl/crypto/bn/gcd.c \
third_party/boringssl/crypto/bn/generic.c \
third_party/boringssl/crypto/bn/kronecker.c \
third_party/boringssl/crypto/bn/montgomery.c \
third_party/boringssl/crypto/bn/montgomery_inv.c \
third_party/boringssl/crypto/bn/mul.c \
third_party/boringssl/crypto/bn/prime.c \
third_party/boringssl/crypto/bn/random.c \
third_party/boringssl/crypto/bn/rsaz_exp.c \
third_party/boringssl/crypto/bn/shift.c \
third_party/boringssl/crypto/bn/sqrt.c \
third_party/boringssl/crypto/bn_extra/bn_asn1.c \
third_party/boringssl/crypto/bn_extra/convert.c \
third_party/boringssl/crypto/buf/buf.c \
third_party/boringssl/crypto/bytestring/asn1_compat.c \
third_party/boringssl/crypto/bytestring/ber.c \
third_party/boringssl/crypto/bytestring/cbb.c \
third_party/boringssl/crypto/bytestring/cbs.c \
third_party/boringssl/crypto/chacha/chacha.c \
third_party/boringssl/crypto/cipher/aead.c \
third_party/boringssl/crypto/cipher/cipher.c \
third_party/boringssl/crypto/cipher/derive_key.c \
third_party/boringssl/crypto/cipher/e_aes.c \
third_party/boringssl/crypto/cipher/e_chacha20poly1305.c \
third_party/boringssl/crypto/cipher/e_des.c \
third_party/boringssl/crypto/cipher/e_null.c \
third_party/boringssl/crypto/cipher/e_rc2.c \
third_party/boringssl/crypto/cipher/e_rc4.c \
third_party/boringssl/crypto/cipher/e_ssl3.c \
third_party/boringssl/crypto/cipher/e_tls.c \
third_party/boringssl/crypto/cipher/tls_cbc.c \
third_party/boringssl/crypto/cipher_extra/cipher_extra.c \
third_party/boringssl/crypto/cipher_extra/derive_key.c \
third_party/boringssl/crypto/cipher_extra/e_aesctrhmac.c \
third_party/boringssl/crypto/cipher_extra/e_aesgcmsiv.c \
third_party/boringssl/crypto/cipher_extra/e_chacha20poly1305.c \
third_party/boringssl/crypto/cipher_extra/e_null.c \
third_party/boringssl/crypto/cipher_extra/e_rc2.c \
third_party/boringssl/crypto/cipher_extra/e_rc4.c \
third_party/boringssl/crypto/cipher_extra/e_ssl3.c \
third_party/boringssl/crypto/cipher_extra/e_tls.c \
third_party/boringssl/crypto/cipher_extra/tls_cbc.c \
third_party/boringssl/crypto/cmac/cmac.c \
third_party/boringssl/crypto/conf/conf.c \
third_party/boringssl/crypto/cpu-aarch64-linux.c \
@ -433,29 +406,16 @@ if test "$PHP_GRPC" != "no"; then
third_party/boringssl/crypto/curve25519/curve25519.c \
third_party/boringssl/crypto/curve25519/spake25519.c \
third_party/boringssl/crypto/curve25519/x25519-x86_64.c \
third_party/boringssl/crypto/des/des.c \
third_party/boringssl/crypto/dh/check.c \
third_party/boringssl/crypto/dh/dh.c \
third_party/boringssl/crypto/dh/dh_asn1.c \
third_party/boringssl/crypto/dh/params.c \
third_party/boringssl/crypto/digest/digest.c \
third_party/boringssl/crypto/digest/digests.c \
third_party/boringssl/crypto/digest_extra/digest_extra.c \
third_party/boringssl/crypto/dsa/dsa.c \
third_party/boringssl/crypto/dsa/dsa_asn1.c \
third_party/boringssl/crypto/ec/ec.c \
third_party/boringssl/crypto/ec/ec_asn1.c \
third_party/boringssl/crypto/ec/ec_key.c \
third_party/boringssl/crypto/ec/ec_montgomery.c \
third_party/boringssl/crypto/ec/oct.c \
third_party/boringssl/crypto/ec/p224-64.c \
third_party/boringssl/crypto/ec/p256-64.c \
third_party/boringssl/crypto/ec/p256-x86_64.c \
third_party/boringssl/crypto/ec/simple.c \
third_party/boringssl/crypto/ec/util-64.c \
third_party/boringssl/crypto/ec/wnaf.c \
third_party/boringssl/crypto/ec_extra/ec_asn1.c \
third_party/boringssl/crypto/ecdh/ecdh.c \
third_party/boringssl/crypto/ecdsa/ecdsa.c \
third_party/boringssl/crypto/ecdsa/ecdsa_asn1.c \
third_party/boringssl/crypto/ecdsa_extra/ecdsa_asn1.c \
third_party/boringssl/crypto/engine/engine.c \
third_party/boringssl/crypto/err/err.c \
third_party/boringssl/crypto/evp/digestsign.c \
@ -465,24 +425,20 @@ if test "$PHP_GRPC" != "no"; then
third_party/boringssl/crypto/evp/p_dsa_asn1.c \
third_party/boringssl/crypto/evp/p_ec.c \
third_party/boringssl/crypto/evp/p_ec_asn1.c \
third_party/boringssl/crypto/evp/p_ed25519.c \
third_party/boringssl/crypto/evp/p_ed25519_asn1.c \
third_party/boringssl/crypto/evp/p_rsa.c \
third_party/boringssl/crypto/evp/p_rsa_asn1.c \
third_party/boringssl/crypto/evp/pbkdf.c \
third_party/boringssl/crypto/evp/print.c \
third_party/boringssl/crypto/evp/scrypt.c \
third_party/boringssl/crypto/evp/sign.c \
third_party/boringssl/crypto/ex_data.c \
third_party/boringssl/crypto/fipsmodule/bcm.c \
third_party/boringssl/crypto/fipsmodule/is_fips.c \
third_party/boringssl/crypto/hkdf/hkdf.c \
third_party/boringssl/crypto/hmac/hmac.c \
third_party/boringssl/crypto/lhash/lhash.c \
third_party/boringssl/crypto/md4/md4.c \
third_party/boringssl/crypto/md5/md5.c \
third_party/boringssl/crypto/mem.c \
third_party/boringssl/crypto/modes/cbc.c \
third_party/boringssl/crypto/modes/cfb.c \
third_party/boringssl/crypto/modes/ctr.c \
third_party/boringssl/crypto/modes/gcm.c \
third_party/boringssl/crypto/modes/ofb.c \
third_party/boringssl/crypto/modes/polyval.c \
third_party/boringssl/crypto/obj/obj.c \
third_party/boringssl/crypto/obj/obj_xref.c \
third_party/boringssl/crypto/pem/pem_all.c \
@ -493,30 +449,24 @@ if test "$PHP_GRPC" != "no"; then
third_party/boringssl/crypto/pem/pem_pkey.c \
third_party/boringssl/crypto/pem/pem_x509.c \
third_party/boringssl/crypto/pem/pem_xaux.c \
third_party/boringssl/crypto/pkcs7/pkcs7.c \
third_party/boringssl/crypto/pkcs7/pkcs7_x509.c \
third_party/boringssl/crypto/pkcs8/p5_pbev2.c \
third_party/boringssl/crypto/pkcs8/p8_pkey.c \
third_party/boringssl/crypto/pkcs8/pkcs8.c \
third_party/boringssl/crypto/pkcs8/pkcs8_x509.c \
third_party/boringssl/crypto/poly1305/poly1305.c \
third_party/boringssl/crypto/poly1305/poly1305_arm.c \
third_party/boringssl/crypto/poly1305/poly1305_vec.c \
third_party/boringssl/crypto/pool/pool.c \
third_party/boringssl/crypto/rand/deterministic.c \
third_party/boringssl/crypto/rand/fuchsia.c \
third_party/boringssl/crypto/rand/rand.c \
third_party/boringssl/crypto/rand/urandom.c \
third_party/boringssl/crypto/rand/windows.c \
third_party/boringssl/crypto/rand_extra/deterministic.c \
third_party/boringssl/crypto/rand_extra/forkunsafe.c \
third_party/boringssl/crypto/rand_extra/fuchsia.c \
third_party/boringssl/crypto/rand_extra/rand_extra.c \
third_party/boringssl/crypto/rand_extra/windows.c \
third_party/boringssl/crypto/rc4/rc4.c \
third_party/boringssl/crypto/refcount_c11.c \
third_party/boringssl/crypto/refcount_lock.c \
third_party/boringssl/crypto/rsa/blinding.c \
third_party/boringssl/crypto/rsa/padding.c \
third_party/boringssl/crypto/rsa/rsa.c \
third_party/boringssl/crypto/rsa/rsa_asn1.c \
third_party/boringssl/crypto/rsa/rsa_impl.c \
third_party/boringssl/crypto/sha/sha1-altivec.c \
third_party/boringssl/crypto/sha/sha1.c \
third_party/boringssl/crypto/sha/sha256.c \
third_party/boringssl/crypto/sha/sha512.c \
third_party/boringssl/crypto/rsa_extra/rsa_asn1.c \
third_party/boringssl/crypto/stack/stack.c \
third_party/boringssl/crypto/thread.c \
third_party/boringssl/crypto/thread_none.c \
@ -531,7 +481,6 @@ if test "$PHP_GRPC" != "no"; then
third_party/boringssl/crypto/x509/by_dir.c \
third_party/boringssl/crypto/x509/by_file.c \
third_party/boringssl/crypto/x509/i2d_pr.c \
third_party/boringssl/crypto/x509/pkcs7.c \
third_party/boringssl/crypto/x509/rsa_pss.c \
third_party/boringssl/crypto/x509/t_crl.c \
third_party/boringssl/crypto/x509/t_req.c \
@ -557,7 +506,6 @@ if test "$PHP_GRPC" != "no"; then
third_party/boringssl/crypto/x509/x509name.c \
third_party/boringssl/crypto/x509/x509rset.c \
third_party/boringssl/crypto/x509/x509spki.c \
third_party/boringssl/crypto/x509/x509type.c \
third_party/boringssl/crypto/x509/x_algor.c \
third_party/boringssl/crypto/x509/x_all.c \
third_party/boringssl/crypto/x509/x_attrib.c \
@ -605,41 +553,42 @@ if test "$PHP_GRPC" != "no"; then
third_party/boringssl/crypto/x509v3/v3_skey.c \
third_party/boringssl/crypto/x509v3/v3_sxnet.c \
third_party/boringssl/crypto/x509v3/v3_utl.c \
third_party/boringssl/ssl/bio_ssl.c \
third_party/boringssl/ssl/custom_extensions.c \
third_party/boringssl/ssl/d1_both.c \
third_party/boringssl/ssl/d1_lib.c \
third_party/boringssl/ssl/d1_pkt.c \
third_party/boringssl/ssl/d1_srtp.c \
third_party/boringssl/ssl/dtls_method.c \
third_party/boringssl/ssl/dtls_record.c \
third_party/boringssl/ssl/handshake_client.c \
third_party/boringssl/ssl/handshake_server.c \
third_party/boringssl/ssl/s3_both.c \
third_party/boringssl/ssl/s3_lib.c \
third_party/boringssl/ssl/s3_pkt.c \
third_party/boringssl/ssl/ssl_aead_ctx.c \
third_party/boringssl/ssl/ssl_asn1.c \
third_party/boringssl/ssl/ssl_buffer.c \
third_party/boringssl/ssl/ssl_cert.c \
third_party/boringssl/ssl/ssl_cipher.c \
third_party/boringssl/ssl/ssl_ecdh.c \
third_party/boringssl/ssl/ssl_file.c \
third_party/boringssl/ssl/ssl_lib.c \
third_party/boringssl/ssl/ssl_privkey.c \
third_party/boringssl/ssl/ssl_privkey_cc.cc \
third_party/boringssl/ssl/ssl_session.c \
third_party/boringssl/ssl/ssl_stat.c \
third_party/boringssl/ssl/ssl_transcript.c \
third_party/boringssl/ssl/ssl_x509.c \
third_party/boringssl/ssl/t1_enc.c \
third_party/boringssl/ssl/t1_lib.c \
third_party/boringssl/ssl/tls13_both.c \
third_party/boringssl/ssl/tls13_client.c \
third_party/boringssl/ssl/tls13_enc.c \
third_party/boringssl/ssl/tls13_server.c \
third_party/boringssl/ssl/tls_method.c \
third_party/boringssl/ssl/tls_record.c \
third_party/boringssl/ssl/bio_ssl.cc \
third_party/boringssl/ssl/custom_extensions.cc \
third_party/boringssl/ssl/d1_both.cc \
third_party/boringssl/ssl/d1_lib.cc \
third_party/boringssl/ssl/d1_pkt.cc \
third_party/boringssl/ssl/d1_srtp.cc \
third_party/boringssl/ssl/dtls_method.cc \
third_party/boringssl/ssl/dtls_record.cc \
third_party/boringssl/ssl/handshake.cc \
third_party/boringssl/ssl/handshake_client.cc \
third_party/boringssl/ssl/handshake_server.cc \
third_party/boringssl/ssl/s3_both.cc \
third_party/boringssl/ssl/s3_lib.cc \
third_party/boringssl/ssl/s3_pkt.cc \
third_party/boringssl/ssl/ssl_aead_ctx.cc \
third_party/boringssl/ssl/ssl_asn1.cc \
third_party/boringssl/ssl/ssl_buffer.cc \
third_party/boringssl/ssl/ssl_cert.cc \
third_party/boringssl/ssl/ssl_cipher.cc \
third_party/boringssl/ssl/ssl_file.cc \
third_party/boringssl/ssl/ssl_key_share.cc \
third_party/boringssl/ssl/ssl_lib.cc \
third_party/boringssl/ssl/ssl_privkey.cc \
third_party/boringssl/ssl/ssl_session.cc \
third_party/boringssl/ssl/ssl_stat.cc \
third_party/boringssl/ssl/ssl_transcript.cc \
third_party/boringssl/ssl/ssl_versions.cc \
third_party/boringssl/ssl/ssl_x509.cc \
third_party/boringssl/ssl/t1_enc.cc \
third_party/boringssl/ssl/t1_lib.cc \
third_party/boringssl/ssl/tls13_both.cc \
third_party/boringssl/ssl/tls13_client.cc \
third_party/boringssl/ssl/tls13_enc.cc \
third_party/boringssl/ssl/tls13_server.cc \
third_party/boringssl/ssl/tls_method.cc \
third_party/boringssl/ssl/tls_record.cc \
, $ext_shared, , -fvisibility=hidden \
-DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN \
-D_HAS_EXCEPTIONS=0 -DNOMINMAX -DGRPC_ARES=0)
@ -703,44 +652,38 @@ if test "$PHP_GRPC" != "no"; then
PHP_ADD_BUILD_DIR($ext_builddir/src/core/plugin_registry)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/tsi)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/aes)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/asn1)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/base64)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/bio)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/bn)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/bn/asm)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/bn_extra)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/buf)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/bytestring)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/chacha)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/cipher)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/cipher_extra)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/cmac)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/conf)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/curve25519)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/des)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/dh)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/digest)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/digest_extra)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/dsa)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/ec)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/ec_extra)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/ecdh)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/ecdsa)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/ecdsa_extra)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/engine)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/err)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/evp)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/fipsmodule)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/hkdf)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/hmac)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/lhash)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/md4)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/md5)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/modes)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/obj)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/pem)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/pkcs7)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/pkcs8)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/poly1305)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/pool)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/rand)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/rand_extra)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/rc4)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/rsa)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/sha)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/rsa_extra)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/stack)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/x509)
PHP_ADD_BUILD_DIR($ext_builddir/third_party/boringssl/crypto/x509v3)

@ -71,7 +71,6 @@ if (PHP_GRPC != "no") {
"src\\core\\lib\\channel\\handshaker_registry.cc " +
"src\\core\\lib\\compression\\compression.cc " +
"src\\core\\lib\\compression\\compression_internal.cc " +
"src\\core\\lib\\compression\\compression_ruby.cc " +
"src\\core\\lib\\compression\\message_compress.cc " +
"src\\core\\lib\\compression\\stream_compression.cc " +
"src\\core\\lib\\compression\\stream_compression_gzip.cc " +
@ -164,7 +163,6 @@ if (PHP_GRPC != "no") {
"src\\core\\lib\\slice\\slice_hash_table.cc " +
"src\\core\\lib\\slice\\slice_intern.cc " +
"src\\core\\lib\\slice\\slice_string_helpers.cc " +
"src\\core\\lib\\surface\\alarm.cc " +
"src\\core\\lib\\surface\\api_trace.cc " +
"src\\core\\lib\\surface\\byte_buffer.cc " +
"src\\core\\lib\\surface\\byte_buffer_reader.cc " +
@ -249,8 +247,8 @@ if (PHP_GRPC != "no") {
"src\\core\\lib\\security\\transport\\tsi_error.cc " +
"src\\core\\lib\\security\\util\\json_util.cc " +
"src\\core\\lib\\surface\\init_secure.cc " +
"src\\core\\tsi\\alts_transport_security.cc " +
"src\\core\\tsi\\fake_transport_security.cc " +
"src\\core\\tsi\\gts_transport_security.cc " +
"src\\core\\tsi\\ssl_transport_security.cc " +
"src\\core\\tsi\\transport_security_grpc.cc " +
"src\\core\\tsi\\transport_security.cc " +
@ -314,9 +312,6 @@ if (PHP_GRPC != "no") {
"src\\core\\ext\\filters\\workarounds\\workaround_utils.cc " +
"src\\core\\plugin_registry\\grpc_plugin_registry.cc " +
"src\\boringssl\\err_data.c " +
"third_party\\boringssl\\crypto\\aes\\aes.c " +
"third_party\\boringssl\\crypto\\aes\\key_wrap.c " +
"third_party\\boringssl\\crypto\\aes\\mode_wrappers.c " +
"third_party\\boringssl\\crypto\\asn1\\a_bitstr.c " +
"third_party\\boringssl\\crypto\\asn1\\a_bool.c " +
"third_party\\boringssl\\crypto\\asn1\\a_d2i_fp.c " +
@ -340,7 +335,6 @@ if (PHP_GRPC != "no") {
"third_party\\boringssl\\crypto\\asn1\\f_enum.c " +
"third_party\\boringssl\\crypto\\asn1\\f_int.c " +
"third_party\\boringssl\\crypto\\asn1\\f_string.c " +
"third_party\\boringssl\\crypto\\asn1\\t_bitst.c " +
"third_party\\boringssl\\crypto\\asn1\\tasn_dec.c " +
"third_party\\boringssl\\crypto\\asn1\\tasn_enc.c " +
"third_party\\boringssl\\crypto\\asn1\\tasn_fre.c " +
@ -348,8 +342,6 @@ if (PHP_GRPC != "no") {
"third_party\\boringssl\\crypto\\asn1\\tasn_typ.c " +
"third_party\\boringssl\\crypto\\asn1\\tasn_utl.c " +
"third_party\\boringssl\\crypto\\asn1\\time_support.c " +
"third_party\\boringssl\\crypto\\asn1\\x_bignum.c " +
"third_party\\boringssl\\crypto\\asn1\\x_long.c " +
"third_party\\boringssl\\crypto\\base64\\base64.c " +
"third_party\\boringssl\\crypto\\bio\\bio.c " +
"third_party\\boringssl\\crypto\\bio\\bio_mem.c " +
@ -361,44 +353,25 @@ if (PHP_GRPC != "no") {
"third_party\\boringssl\\crypto\\bio\\printf.c " +
"third_party\\boringssl\\crypto\\bio\\socket.c " +
"third_party\\boringssl\\crypto\\bio\\socket_helper.c " +
"third_party\\boringssl\\crypto\\bn\\add.c " +
"third_party\\boringssl\\crypto\\bn\\asm\\x86_64-gcc.c " +
"third_party\\boringssl\\crypto\\bn\\bn.c " +
"third_party\\boringssl\\crypto\\bn\\bn_asn1.c " +
"third_party\\boringssl\\crypto\\bn\\cmp.c " +
"third_party\\boringssl\\crypto\\bn\\convert.c " +
"third_party\\boringssl\\crypto\\bn\\ctx.c " +
"third_party\\boringssl\\crypto\\bn\\div.c " +
"third_party\\boringssl\\crypto\\bn\\exponentiation.c " +
"third_party\\boringssl\\crypto\\bn\\gcd.c " +
"third_party\\boringssl\\crypto\\bn\\generic.c " +
"third_party\\boringssl\\crypto\\bn\\kronecker.c " +
"third_party\\boringssl\\crypto\\bn\\montgomery.c " +
"third_party\\boringssl\\crypto\\bn\\montgomery_inv.c " +
"third_party\\boringssl\\crypto\\bn\\mul.c " +
"third_party\\boringssl\\crypto\\bn\\prime.c " +
"third_party\\boringssl\\crypto\\bn\\random.c " +
"third_party\\boringssl\\crypto\\bn\\rsaz_exp.c " +
"third_party\\boringssl\\crypto\\bn\\shift.c " +
"third_party\\boringssl\\crypto\\bn\\sqrt.c " +
"third_party\\boringssl\\crypto\\bn_extra\\bn_asn1.c " +
"third_party\\boringssl\\crypto\\bn_extra\\convert.c " +
"third_party\\boringssl\\crypto\\buf\\buf.c " +
"third_party\\boringssl\\crypto\\bytestring\\asn1_compat.c " +
"third_party\\boringssl\\crypto\\bytestring\\ber.c " +
"third_party\\boringssl\\crypto\\bytestring\\cbb.c " +
"third_party\\boringssl\\crypto\\bytestring\\cbs.c " +
"third_party\\boringssl\\crypto\\chacha\\chacha.c " +
"third_party\\boringssl\\crypto\\cipher\\aead.c " +
"third_party\\boringssl\\crypto\\cipher\\cipher.c " +
"third_party\\boringssl\\crypto\\cipher\\derive_key.c " +
"third_party\\boringssl\\crypto\\cipher\\e_aes.c " +
"third_party\\boringssl\\crypto\\cipher\\e_chacha20poly1305.c " +
"third_party\\boringssl\\crypto\\cipher\\e_des.c " +
"third_party\\boringssl\\crypto\\cipher\\e_null.c " +
"third_party\\boringssl\\crypto\\cipher\\e_rc2.c " +
"third_party\\boringssl\\crypto\\cipher\\e_rc4.c " +
"third_party\\boringssl\\crypto\\cipher\\e_ssl3.c " +
"third_party\\boringssl\\crypto\\cipher\\e_tls.c " +
"third_party\\boringssl\\crypto\\cipher\\tls_cbc.c " +
"third_party\\boringssl\\crypto\\cipher_extra\\cipher_extra.c " +
"third_party\\boringssl\\crypto\\cipher_extra\\derive_key.c " +
"third_party\\boringssl\\crypto\\cipher_extra\\e_aesctrhmac.c " +
"third_party\\boringssl\\crypto\\cipher_extra\\e_aesgcmsiv.c " +
"third_party\\boringssl\\crypto\\cipher_extra\\e_chacha20poly1305.c " +
"third_party\\boringssl\\crypto\\cipher_extra\\e_null.c " +
"third_party\\boringssl\\crypto\\cipher_extra\\e_rc2.c " +
"third_party\\boringssl\\crypto\\cipher_extra\\e_rc4.c " +
"third_party\\boringssl\\crypto\\cipher_extra\\e_ssl3.c " +
"third_party\\boringssl\\crypto\\cipher_extra\\e_tls.c " +
"third_party\\boringssl\\crypto\\cipher_extra\\tls_cbc.c " +
"third_party\\boringssl\\crypto\\cmac\\cmac.c " +
"third_party\\boringssl\\crypto\\conf\\conf.c " +
"third_party\\boringssl\\crypto\\cpu-aarch64-linux.c " +
@ -410,29 +383,16 @@ if (PHP_GRPC != "no") {
"third_party\\boringssl\\crypto\\curve25519\\curve25519.c " +
"third_party\\boringssl\\crypto\\curve25519\\spake25519.c " +
"third_party\\boringssl\\crypto\\curve25519\\x25519-x86_64.c " +
"third_party\\boringssl\\crypto\\des\\des.c " +
"third_party\\boringssl\\crypto\\dh\\check.c " +
"third_party\\boringssl\\crypto\\dh\\dh.c " +
"third_party\\boringssl\\crypto\\dh\\dh_asn1.c " +
"third_party\\boringssl\\crypto\\dh\\params.c " +
"third_party\\boringssl\\crypto\\digest\\digest.c " +
"third_party\\boringssl\\crypto\\digest\\digests.c " +
"third_party\\boringssl\\crypto\\digest_extra\\digest_extra.c " +
"third_party\\boringssl\\crypto\\dsa\\dsa.c " +
"third_party\\boringssl\\crypto\\dsa\\dsa_asn1.c " +
"third_party\\boringssl\\crypto\\ec\\ec.c " +
"third_party\\boringssl\\crypto\\ec\\ec_asn1.c " +
"third_party\\boringssl\\crypto\\ec\\ec_key.c " +
"third_party\\boringssl\\crypto\\ec\\ec_montgomery.c " +
"third_party\\boringssl\\crypto\\ec\\oct.c " +
"third_party\\boringssl\\crypto\\ec\\p224-64.c " +
"third_party\\boringssl\\crypto\\ec\\p256-64.c " +
"third_party\\boringssl\\crypto\\ec\\p256-x86_64.c " +
"third_party\\boringssl\\crypto\\ec\\simple.c " +
"third_party\\boringssl\\crypto\\ec\\util-64.c " +
"third_party\\boringssl\\crypto\\ec\\wnaf.c " +
"third_party\\boringssl\\crypto\\ec_extra\\ec_asn1.c " +
"third_party\\boringssl\\crypto\\ecdh\\ecdh.c " +
"third_party\\boringssl\\crypto\\ecdsa\\ecdsa.c " +
"third_party\\boringssl\\crypto\\ecdsa\\ecdsa_asn1.c " +
"third_party\\boringssl\\crypto\\ecdsa_extra\\ecdsa_asn1.c " +
"third_party\\boringssl\\crypto\\engine\\engine.c " +
"third_party\\boringssl\\crypto\\err\\err.c " +
"third_party\\boringssl\\crypto\\evp\\digestsign.c " +
@ -442,24 +402,20 @@ if (PHP_GRPC != "no") {
"third_party\\boringssl\\crypto\\evp\\p_dsa_asn1.c " +
"third_party\\boringssl\\crypto\\evp\\p_ec.c " +
"third_party\\boringssl\\crypto\\evp\\p_ec_asn1.c " +
"third_party\\boringssl\\crypto\\evp\\p_ed25519.c " +
"third_party\\boringssl\\crypto\\evp\\p_ed25519_asn1.c " +
"third_party\\boringssl\\crypto\\evp\\p_rsa.c " +
"third_party\\boringssl\\crypto\\evp\\p_rsa_asn1.c " +
"third_party\\boringssl\\crypto\\evp\\pbkdf.c " +
"third_party\\boringssl\\crypto\\evp\\print.c " +
"third_party\\boringssl\\crypto\\evp\\scrypt.c " +
"third_party\\boringssl\\crypto\\evp\\sign.c " +
"third_party\\boringssl\\crypto\\ex_data.c " +
"third_party\\boringssl\\crypto\\fipsmodule\\bcm.c " +
"third_party\\boringssl\\crypto\\fipsmodule\\is_fips.c " +
"third_party\\boringssl\\crypto\\hkdf\\hkdf.c " +
"third_party\\boringssl\\crypto\\hmac\\hmac.c " +
"third_party\\boringssl\\crypto\\lhash\\lhash.c " +
"third_party\\boringssl\\crypto\\md4\\md4.c " +
"third_party\\boringssl\\crypto\\md5\\md5.c " +
"third_party\\boringssl\\crypto\\mem.c " +
"third_party\\boringssl\\crypto\\modes\\cbc.c " +
"third_party\\boringssl\\crypto\\modes\\cfb.c " +
"third_party\\boringssl\\crypto\\modes\\ctr.c " +
"third_party\\boringssl\\crypto\\modes\\gcm.c " +
"third_party\\boringssl\\crypto\\modes\\ofb.c " +
"third_party\\boringssl\\crypto\\modes\\polyval.c " +
"third_party\\boringssl\\crypto\\obj\\obj.c " +
"third_party\\boringssl\\crypto\\obj\\obj_xref.c " +
"third_party\\boringssl\\crypto\\pem\\pem_all.c " +
@ -470,30 +426,24 @@ if (PHP_GRPC != "no") {
"third_party\\boringssl\\crypto\\pem\\pem_pkey.c " +
"third_party\\boringssl\\crypto\\pem\\pem_x509.c " +
"third_party\\boringssl\\crypto\\pem\\pem_xaux.c " +
"third_party\\boringssl\\crypto\\pkcs7\\pkcs7.c " +
"third_party\\boringssl\\crypto\\pkcs7\\pkcs7_x509.c " +
"third_party\\boringssl\\crypto\\pkcs8\\p5_pbev2.c " +
"third_party\\boringssl\\crypto\\pkcs8\\p8_pkey.c " +
"third_party\\boringssl\\crypto\\pkcs8\\pkcs8.c " +
"third_party\\boringssl\\crypto\\pkcs8\\pkcs8_x509.c " +
"third_party\\boringssl\\crypto\\poly1305\\poly1305.c " +
"third_party\\boringssl\\crypto\\poly1305\\poly1305_arm.c " +
"third_party\\boringssl\\crypto\\poly1305\\poly1305_vec.c " +
"third_party\\boringssl\\crypto\\pool\\pool.c " +
"third_party\\boringssl\\crypto\\rand\\deterministic.c " +
"third_party\\boringssl\\crypto\\rand\\fuchsia.c " +
"third_party\\boringssl\\crypto\\rand\\rand.c " +
"third_party\\boringssl\\crypto\\rand\\urandom.c " +
"third_party\\boringssl\\crypto\\rand\\windows.c " +
"third_party\\boringssl\\crypto\\rand_extra\\deterministic.c " +
"third_party\\boringssl\\crypto\\rand_extra\\forkunsafe.c " +
"third_party\\boringssl\\crypto\\rand_extra\\fuchsia.c " +
"third_party\\boringssl\\crypto\\rand_extra\\rand_extra.c " +
"third_party\\boringssl\\crypto\\rand_extra\\windows.c " +
"third_party\\boringssl\\crypto\\rc4\\rc4.c " +
"third_party\\boringssl\\crypto\\refcount_c11.c " +
"third_party\\boringssl\\crypto\\refcount_lock.c " +
"third_party\\boringssl\\crypto\\rsa\\blinding.c " +
"third_party\\boringssl\\crypto\\rsa\\padding.c " +
"third_party\\boringssl\\crypto\\rsa\\rsa.c " +
"third_party\\boringssl\\crypto\\rsa\\rsa_asn1.c " +
"third_party\\boringssl\\crypto\\rsa\\rsa_impl.c " +
"third_party\\boringssl\\crypto\\sha\\sha1-altivec.c " +
"third_party\\boringssl\\crypto\\sha\\sha1.c " +
"third_party\\boringssl\\crypto\\sha\\sha256.c " +
"third_party\\boringssl\\crypto\\sha\\sha512.c " +
"third_party\\boringssl\\crypto\\rsa_extra\\rsa_asn1.c " +
"third_party\\boringssl\\crypto\\stack\\stack.c " +
"third_party\\boringssl\\crypto\\thread.c " +
"third_party\\boringssl\\crypto\\thread_none.c " +
@ -508,7 +458,6 @@ if (PHP_GRPC != "no") {
"third_party\\boringssl\\crypto\\x509\\by_dir.c " +
"third_party\\boringssl\\crypto\\x509\\by_file.c " +
"third_party\\boringssl\\crypto\\x509\\i2d_pr.c " +
"third_party\\boringssl\\crypto\\x509\\pkcs7.c " +
"third_party\\boringssl\\crypto\\x509\\rsa_pss.c " +
"third_party\\boringssl\\crypto\\x509\\t_crl.c " +
"third_party\\boringssl\\crypto\\x509\\t_req.c " +
@ -534,7 +483,6 @@ if (PHP_GRPC != "no") {
"third_party\\boringssl\\crypto\\x509\\x509name.c " +
"third_party\\boringssl\\crypto\\x509\\x509rset.c " +
"third_party\\boringssl\\crypto\\x509\\x509spki.c " +
"third_party\\boringssl\\crypto\\x509\\x509type.c " +
"third_party\\boringssl\\crypto\\x509\\x_algor.c " +
"third_party\\boringssl\\crypto\\x509\\x_all.c " +
"third_party\\boringssl\\crypto\\x509\\x_attrib.c " +
@ -582,41 +530,42 @@ if (PHP_GRPC != "no") {
"third_party\\boringssl\\crypto\\x509v3\\v3_skey.c " +
"third_party\\boringssl\\crypto\\x509v3\\v3_sxnet.c " +
"third_party\\boringssl\\crypto\\x509v3\\v3_utl.c " +
"third_party\\boringssl\\ssl\\bio_ssl.c " +
"third_party\\boringssl\\ssl\\custom_extensions.c " +
"third_party\\boringssl\\ssl\\d1_both.c " +
"third_party\\boringssl\\ssl\\d1_lib.c " +
"third_party\\boringssl\\ssl\\d1_pkt.c " +
"third_party\\boringssl\\ssl\\d1_srtp.c " +
"third_party\\boringssl\\ssl\\dtls_method.c " +
"third_party\\boringssl\\ssl\\dtls_record.c " +
"third_party\\boringssl\\ssl\\handshake_client.c " +
"third_party\\boringssl\\ssl\\handshake_server.c " +
"third_party\\boringssl\\ssl\\s3_both.c " +
"third_party\\boringssl\\ssl\\s3_lib.c " +
"third_party\\boringssl\\ssl\\s3_pkt.c " +
"third_party\\boringssl\\ssl\\ssl_aead_ctx.c " +
"third_party\\boringssl\\ssl\\ssl_asn1.c " +
"third_party\\boringssl\\ssl\\ssl_buffer.c " +
"third_party\\boringssl\\ssl\\ssl_cert.c " +
"third_party\\boringssl\\ssl\\ssl_cipher.c " +
"third_party\\boringssl\\ssl\\ssl_ecdh.c " +
"third_party\\boringssl\\ssl\\ssl_file.c " +
"third_party\\boringssl\\ssl\\ssl_lib.c " +
"third_party\\boringssl\\ssl\\ssl_privkey.c " +
"third_party\\boringssl\\ssl\\ssl_privkey_cc.cc " +
"third_party\\boringssl\\ssl\\ssl_session.c " +
"third_party\\boringssl\\ssl\\ssl_stat.c " +
"third_party\\boringssl\\ssl\\ssl_transcript.c " +
"third_party\\boringssl\\ssl\\ssl_x509.c " +
"third_party\\boringssl\\ssl\\t1_enc.c " +
"third_party\\boringssl\\ssl\\t1_lib.c " +
"third_party\\boringssl\\ssl\\tls13_both.c " +
"third_party\\boringssl\\ssl\\tls13_client.c " +
"third_party\\boringssl\\ssl\\tls13_enc.c " +
"third_party\\boringssl\\ssl\\tls13_server.c " +
"third_party\\boringssl\\ssl\\tls_method.c " +
"third_party\\boringssl\\ssl\\tls_record.c " +
"third_party\\boringssl\\ssl\\bio_ssl.cc " +
"third_party\\boringssl\\ssl\\custom_extensions.cc " +
"third_party\\boringssl\\ssl\\d1_both.cc " +
"third_party\\boringssl\\ssl\\d1_lib.cc " +
"third_party\\boringssl\\ssl\\d1_pkt.cc " +
"third_party\\boringssl\\ssl\\d1_srtp.cc " +
"third_party\\boringssl\\ssl\\dtls_method.cc " +
"third_party\\boringssl\\ssl\\dtls_record.cc " +
"third_party\\boringssl\\ssl\\handshake.cc " +
"third_party\\boringssl\\ssl\\handshake_client.cc " +
"third_party\\boringssl\\ssl\\handshake_server.cc " +
"third_party\\boringssl\\ssl\\s3_both.cc " +
"third_party\\boringssl\\ssl\\s3_lib.cc " +
"third_party\\boringssl\\ssl\\s3_pkt.cc " +
"third_party\\boringssl\\ssl\\ssl_aead_ctx.cc " +
"third_party\\boringssl\\ssl\\ssl_asn1.cc " +
"third_party\\boringssl\\ssl\\ssl_buffer.cc " +
"third_party\\boringssl\\ssl\\ssl_cert.cc " +
"third_party\\boringssl\\ssl\\ssl_cipher.cc " +
"third_party\\boringssl\\ssl\\ssl_file.cc " +
"third_party\\boringssl\\ssl\\ssl_key_share.cc " +
"third_party\\boringssl\\ssl\\ssl_lib.cc " +
"third_party\\boringssl\\ssl\\ssl_privkey.cc " +
"third_party\\boringssl\\ssl\\ssl_session.cc " +
"third_party\\boringssl\\ssl\\ssl_stat.cc " +
"third_party\\boringssl\\ssl\\ssl_transcript.cc " +
"third_party\\boringssl\\ssl\\ssl_versions.cc " +
"third_party\\boringssl\\ssl\\ssl_x509.cc " +
"third_party\\boringssl\\ssl\\t1_enc.cc " +
"third_party\\boringssl\\ssl\\t1_lib.cc " +
"third_party\\boringssl\\ssl\\tls13_both.cc " +
"third_party\\boringssl\\ssl\\tls13_client.cc " +
"third_party\\boringssl\\ssl\\tls13_enc.cc " +
"third_party\\boringssl\\ssl\\tls13_server.cc " +
"third_party\\boringssl\\ssl\\tls_method.cc " +
"third_party\\boringssl\\ssl\\tls_record.cc " +
"third_party\\zlib\\adler32.c " +
"third_party\\zlib\\compress.c " +
"third_party\\zlib\\crc32.c " +
@ -721,44 +670,38 @@ if (PHP_GRPC != "no") {
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\aes");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\asn1");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\base64");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\bio");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\bn");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\bn\\asm");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\bn_extra");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\buf");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\bytestring");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\chacha");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\cipher");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\cipher_extra");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\cmac");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\conf");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\curve25519");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\des");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\dh");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\digest");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\digest_extra");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\dsa");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\ec");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\ec_extra");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\ecdh");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\ecdsa");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\ecdsa_extra");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\engine");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\err");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\evp");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\fipsmodule");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\hkdf");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\hmac");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\lhash");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\md4");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\md5");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\modes");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\obj");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\pem");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\pkcs7");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\pkcs8");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\poly1305");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\pool");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\rand");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\rand_extra");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\rc4");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\rsa");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\sha");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\rsa_extra");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\stack");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\x509");
FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\x509v3");

@ -58,50 +58,140 @@ $ make grpc_cli
The main file can be found at
https://github.com/grpc/grpc/blob/master/test/cpp/util/grpc_cli.cc
## Prerequisites
Most `grpc_cli` commands need the server to support server reflection. See
guides for
[Java](https://github.com/grpc/grpc-java/blob/master/documentation/server-reflection-tutorial.md#enable-server-reflection)
, [C++](https://github.com/grpc/grpc/blob/master/doc/server_reflection_tutorial.md)
and [Go](https://github.com/grpc/grpc-go/blob/master/Documentation/server-reflection-tutorial.md)
## Usage
### Basic usage
### List services
Send a rpc to a helloworld server at `localhost:50051`:
`grpc_cli ls` command lists services and methods exposed at a given port
```
$ bins/opt/grpc_cli call localhost:50051 SayHello "name: 'world'" \
--enable_ssl=false
```
- List all the services exposed at a given port
On success, the tool will print out
```sh
$ grpc_cli ls localhost:50051
```
```
Rpc succeeded with OK status
Response:
message: "Hello world"
```
output:
The `localhost:50051` part indicates the server you are connecting to. `SayHello` is (part of) the
gRPC method string. Then `"name: 'world'"` is the text format of the request proto message. We are
not using ssl here by `--enable_ssl=false`. For information on more flags, look at the comments of `grpc_cli.cc`.
```none
helloworld.Greeter
grpc.reflection.v1alpha.ServerReflection
```
### Use local proto files
The `localhost:50051` part indicates the server you are connecting to.
If the server does not have the server reflection service, you will need to provide local proto
files containing the service definition. The tool will try to find request/response types from
them.
- List one service with details
```
$ bins/opt/grpc_cli call localhost:50051 SayHello "name: 'world'" \
--protofiles=examples/protos/helloworld.proto --enable_ssl=false
```
`grpc_cli ls` command inspects a service given its full name (in the format
of \<package\>.\<service\>). It can print information with a long listing
format when `-l` flag is set. This flag can be used to get more details
about a service.
If the proto files is not under current directory, you can use `--proto_path` to specify a new
search root.
```sh
$ grpc_cli ls localhost:50051 helloworld.Greeter -l
```
### Send non-proto rpc
`helloworld.Greeter` is full name of the service.
For using gRPC with protocols other than probobuf, you will need the exact method name string
and a file containing the raw bytes to be sent on the wire
output:
```
$ bins/opt/grpc_cli call localhost:50051 /helloworld.Greeter/SayHello --input_binary_file=input.bin \
--output_binary_file=output.bin
```
On success, you will need to read or decode the response from the `output.bin` file.
```proto
filename: helloworld.proto
package: helloworld;
service Greeter {
rpc SayHello(helloworld.HelloRequest) returns (helloworld.HelloReply) {}
}
```
### List methods
- List one method with details
`grpc_cli ls` command also inspects a method given its full name (in the
format of \<package\>.\<service\>.\<method\>).
```sh
$ grpc_cli ls localhost:50051 helloworld.Greeter.SayHello -l
```
`helloworld.Greeter.SayHello` is full name of the method.
output:
```proto
rpc SayHello(helloworld.HelloRequest) returns (helloworld.HelloReply) {}
```
### Inspect message types
We can use `grpc_cli type` command to inspect request/response types given the
full name of the type (in the format of \<package\>.\<type\>).
- Get information about the request type
```sh
$ grpc_cli type localhost:50051 helloworld.HelloRequest
```
`helloworld.HelloRequest` is the full name of the request type.
output:
```proto
message HelloRequest {
optional string name = 1;
}
```
### Call a remote method
We can send RPCs to a server and get responses using `grpc_cli call` command.
- Call a unary method Send a rpc to a helloworld server at `localhost:50051`:
```sh
$ grpc_cli call localhost:50051 SayHello "name: 'gRPC CLI'"
```
output: `sh message: "Hello gRPC CLI"`
`SayHello` is (part of) the gRPC method string. Then `"name: 'world'"` is
the text format of the request proto message. For information on more flags,
look at the comments of `grpc_cli.cc`.
- Use local proto files
If the server does not have the server reflection service, you will need to
provide local proto files containing the service definition. The tool will
try to find request/response types from them.
```sh
$ grpc_cli call localhost:50051 SayHello "name: 'world'" \
--protofiles=examples/protos/helloworld.proto
```
If the proto file is not under the current directory, you can use
`--proto_path` to specify a new search root.
- Send non-proto rpc
For using gRPC with protocols other than protobuf, you will need the exact
method name string and a file containing the raw bytes to be sent on the
wire.
```bash
$ grpc_cli call localhost:50051 /helloworld.Greeter/SayHello \
--input_binary_file=input.bin \
--output_binary_file=output.bin
```
On success, you will need to read or decode the response from the
`output.bin` file.

@ -63,7 +63,7 @@ header received from the client), it SHALL send the message uncompressed.
If the user (through the previously described mechanisms) requests to disable
compression the next message MUST be sent uncompressed. This is instrumental in
preventing BEAST/CRIME attacks. This applies to both the the unary and streaming
preventing BEAST/CRIME attacks. This applies to both the unary and streaming
cases.
### Compression Levels and Algorithms

@ -80,6 +80,7 @@ some configuration as environment variables that can be set.
- closure - tracks closure creation, scheduling, and completion
- pending_tags - traces still-in-progress tags on completion queues
- polling - traces the selected polling engine
- polling_api - traces the api calls to polling engine
- queue_refcount
- error_refcount
- stream_refcount

@ -33,14 +33,14 @@ class _GenericClientInterceptor(
request):
new_details, new_request_iterator, postprocess = self._fn(
client_call_details, iter((request,)), False, True)
response_it = continuation(new_details, new_request_iterator)
response_it = continuation(new_details, next(new_request_iterator))
return postprocess(response_it) if postprocess else response_it
def intercept_stream_unary(self, continuation, client_call_details,
request_iterator):
new_details, new_request_iterator, postprocess = self._fn(
client_call_details, request_iterator, True, False)
response = continuation(new_details, next(new_request_iterator))
response = continuation(new_details, new_request_iterator)
return postprocess(response) if postprocess else response
def intercept_stream_stream(self, continuation, client_call_details,

@ -175,6 +175,7 @@ Pod::Spec.new do |s|
'src/cpp/client/create_channel_posix.cc',
'src/cpp/client/credentials_cc.cc',
'src/cpp/client/generic_stub.cc',
'src/cpp/common/alarm.cc',
'src/cpp/common/channel_arguments.cc',
'src/cpp/common/channel_filter.cc',
'src/cpp/common/completion_queue_cc.cc',
@ -205,6 +206,7 @@ Pod::Spec.new do |s|
'src/core/lib/gpr/arena.h',
'src/core/lib/gpr/env.h',
'src/core/lib/gpr/fork.h',
'src/core/lib/gpr/host_port.h',
'src/core/lib/gpr/mpscq.h',
'src/core/lib/gpr/murmur_hash.h',
'src/core/lib/gpr/spinlock.h',
@ -267,8 +269,8 @@ Pod::Spec.new do |s|
'src/core/lib/security/transport/security_handshaker.h',
'src/core/lib/security/transport/tsi_error.h',
'src/core/lib/security/util/json_util.h',
'src/core/tsi/alts_transport_security.h',
'src/core/tsi/fake_transport_security.h',
'src/core/tsi/gts_transport_security.h',
'src/core/tsi/ssl_transport_security.h',
'src/core/tsi/ssl_types.h',
'src/core/tsi/transport_security_grpc.h',
@ -395,7 +397,6 @@ Pod::Spec.new do |s|
'src/core/lib/slice/slice_hash_table.h',
'src/core/lib/slice/slice_internal.h',
'src/core/lib/slice/slice_string_helpers.h',
'src/core/lib/surface/alarm_internal.h',
'src/core/lib/surface/api_trace.h',
'src/core/lib/surface/call.h',
'src/core/lib/surface/call_test_only.h',
@ -455,6 +456,7 @@ Pod::Spec.new do |s|
'src/core/lib/gpr/arena.h',
'src/core/lib/gpr/env.h',
'src/core/lib/gpr/fork.h',
'src/core/lib/gpr/host_port.h',
'src/core/lib/gpr/mpscq.h',
'src/core/lib/gpr/murmur_hash.h',
'src/core/lib/gpr/spinlock.h',
@ -571,7 +573,6 @@ Pod::Spec.new do |s|
'src/core/lib/slice/slice_hash_table.h',
'src/core/lib/slice/slice_internal.h',
'src/core/lib/slice/slice_string_helpers.h',
'src/core/lib/surface/alarm_internal.h',
'src/core/lib/surface/api_trace.h',
'src/core/lib/surface/call.h',
'src/core/lib/surface/call_test_only.h',

@ -117,7 +117,6 @@ Pod::Spec.new do |s|
'include/grpc/support/avl.h',
'include/grpc/support/cmdline.h',
'include/grpc/support/cpu.h',
'include/grpc/support/host_port.h',
'include/grpc/support/log.h',
'include/grpc/support/log_windows.h',
'include/grpc/support/port_platform.h',
@ -169,7 +168,6 @@ Pod::Spec.new do |s|
'include/grpc/byte_buffer.h',
'include/grpc/byte_buffer_reader.h',
'include/grpc/compression.h',
'include/grpc/compression_ruby.h',
'include/grpc/fork.h',
'include/grpc/grpc.h',
'include/grpc/grpc_posix.h',
@ -185,13 +183,14 @@ Pod::Spec.new do |s|
ss.header_mappings_dir = '.'
ss.libraries = 'z'
ss.dependency "#{s.name}/Interface", version
ss.dependency 'BoringSSL', '~> 9.0'
ss.dependency 'BoringSSL', '~> 10.0'
ss.dependency 'nanopb', '~> 0.3'
# To save you from scrolling, this is the last part of the podspec.
ss.source_files = 'src/core/lib/gpr/arena.h',
'src/core/lib/gpr/env.h',
'src/core/lib/gpr/fork.h',
'src/core/lib/gpr/host_port.h',
'src/core/lib/gpr/mpscq.h',
'src/core/lib/gpr/murmur_hash.h',
'src/core/lib/gpr/spinlock.h',
@ -298,8 +297,8 @@ Pod::Spec.new do |s|
'src/core/lib/security/transport/security_handshaker.h',
'src/core/lib/security/transport/tsi_error.h',
'src/core/lib/security/util/json_util.h',
'src/core/tsi/alts_transport_security.h',
'src/core/tsi/fake_transport_security.h',
'src/core/tsi/gts_transport_security.h',
'src/core/tsi/ssl_transport_security.h',
'src/core/tsi/ssl_types.h',
'src/core/tsi/transport_security_grpc.h',
@ -426,7 +425,6 @@ Pod::Spec.new do |s|
'src/core/lib/slice/slice_hash_table.h',
'src/core/lib/slice/slice_internal.h',
'src/core/lib/slice/slice_string_helpers.h',
'src/core/lib/surface/alarm_internal.h',
'src/core/lib/surface/api_trace.h',
'src/core/lib/surface/call.h',
'src/core/lib/surface/call_test_only.h',
@ -482,7 +480,6 @@ Pod::Spec.new do |s|
'src/core/lib/channel/handshaker_registry.cc',
'src/core/lib/compression/compression.cc',
'src/core/lib/compression/compression_internal.cc',
'src/core/lib/compression/compression_ruby.cc',
'src/core/lib/compression/message_compress.cc',
'src/core/lib/compression/stream_compression.cc',
'src/core/lib/compression/stream_compression_gzip.cc',
@ -575,7 +572,6 @@ Pod::Spec.new do |s|
'src/core/lib/slice/slice_hash_table.cc',
'src/core/lib/slice/slice_intern.cc',
'src/core/lib/slice/slice_string_helpers.cc',
'src/core/lib/surface/alarm.cc',
'src/core/lib/surface/api_trace.cc',
'src/core/lib/surface/byte_buffer.cc',
'src/core/lib/surface/byte_buffer_reader.cc',
@ -660,8 +656,8 @@ Pod::Spec.new do |s|
'src/core/lib/security/transport/tsi_error.cc',
'src/core/lib/security/util/json_util.cc',
'src/core/lib/surface/init_secure.cc',
'src/core/tsi/alts_transport_security.cc',
'src/core/tsi/fake_transport_security.cc',
'src/core/tsi/gts_transport_security.cc',
'src/core/tsi/ssl_transport_security.cc',
'src/core/tsi/transport_security_grpc.cc',
'src/core/tsi/transport_security.cc',
@ -725,6 +721,7 @@ Pod::Spec.new do |s|
ss.private_header_files = 'src/core/lib/gpr/arena.h',
'src/core/lib/gpr/env.h',
'src/core/lib/gpr/fork.h',
'src/core/lib/gpr/host_port.h',
'src/core/lib/gpr/mpscq.h',
'src/core/lib/gpr/murmur_hash.h',
'src/core/lib/gpr/spinlock.h',
@ -787,8 +784,8 @@ Pod::Spec.new do |s|
'src/core/lib/security/transport/security_handshaker.h',
'src/core/lib/security/transport/tsi_error.h',
'src/core/lib/security/util/json_util.h',
'src/core/tsi/alts_transport_security.h',
'src/core/tsi/fake_transport_security.h',
'src/core/tsi/gts_transport_security.h',
'src/core/tsi/ssl_transport_security.h',
'src/core/tsi/ssl_types.h',
'src/core/tsi/transport_security_grpc.h',
@ -915,7 +912,6 @@ Pod::Spec.new do |s|
'src/core/lib/slice/slice_hash_table.h',
'src/core/lib/slice/slice_internal.h',
'src/core/lib/slice/slice_string_helpers.h',
'src/core/lib/surface/alarm_internal.h',
'src/core/lib/surface/api_trace.h',
'src/core/lib/surface/call.h',
'src/core/lib/surface/call_test_only.h',

@ -8,8 +8,6 @@ EXPORTS
grpc_compression_options_enable_algorithm
grpc_compression_options_disable_algorithm
grpc_compression_options_is_algorithm_enabled
grpc_compression_algorithm_parse_ruby
grpc_compression_algorithm_name_ruby
grpc_metadata_array_init
grpc_metadata_array_destroy
grpc_call_details_init
@ -29,10 +27,6 @@ EXPORTS
grpc_completion_queue_destroy
grpc_completion_queue_thread_local_cache_init
grpc_completion_queue_thread_local_cache_flush
grpc_alarm_create
grpc_alarm_set
grpc_alarm_cancel
grpc_alarm_destroy
grpc_channel_check_connectivity_state
grpc_channel_num_external_connectivity_watchers
grpc_channel_watch_connectivity_state
@ -201,8 +195,6 @@ EXPORTS
gpr_cmdline_usage_string
gpr_cpu_num_cores
gpr_cpu_current_cpu
gpr_join_host_port
gpr_split_host_port
gpr_log_severity_string
gpr_log
gpr_log_message

@ -52,7 +52,6 @@ Gem::Specification.new do |s|
s.files += %w( include/grpc/support/avl.h )
s.files += %w( include/grpc/support/cmdline.h )
s.files += %w( include/grpc/support/cpu.h )
s.files += %w( include/grpc/support/host_port.h )
s.files += %w( include/grpc/support/log.h )
s.files += %w( include/grpc/support/log_windows.h )
s.files += %w( include/grpc/support/port_platform.h )
@ -82,6 +81,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/gpr/arena.h )
s.files += %w( src/core/lib/gpr/env.h )
s.files += %w( src/core/lib/gpr/fork.h )
s.files += %w( src/core/lib/gpr/host_port.h )
s.files += %w( src/core/lib/gpr/mpscq.h )
s.files += %w( src/core/lib/gpr/murmur_hash.h )
s.files += %w( src/core/lib/gpr/spinlock.h )
@ -170,7 +170,6 @@ Gem::Specification.new do |s|
s.files += %w( include/grpc/byte_buffer.h )
s.files += %w( include/grpc/byte_buffer_reader.h )
s.files += %w( include/grpc/compression.h )
s.files += %w( include/grpc/compression_ruby.h )
s.files += %w( include/grpc/fork.h )
s.files += %w( include/grpc/grpc.h )
s.files += %w( include/grpc/grpc_posix.h )
@ -224,8 +223,8 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/security/transport/security_handshaker.h )
s.files += %w( src/core/lib/security/transport/tsi_error.h )
s.files += %w( src/core/lib/security/util/json_util.h )
s.files += %w( src/core/tsi/alts_transport_security.h )
s.files += %w( src/core/tsi/fake_transport_security.h )
s.files += %w( src/core/tsi/gts_transport_security.h )
s.files += %w( src/core/tsi/ssl_transport_security.h )
s.files += %w( src/core/tsi/ssl_types.h )
s.files += %w( src/core/tsi/transport_security_grpc.h )
@ -352,7 +351,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/slice/slice_hash_table.h )
s.files += %w( src/core/lib/slice/slice_internal.h )
s.files += %w( src/core/lib/slice/slice_string_helpers.h )
s.files += %w( src/core/lib/surface/alarm_internal.h )
s.files += %w( src/core/lib/surface/api_trace.h )
s.files += %w( src/core/lib/surface/call.h )
s.files += %w( src/core/lib/surface/call_test_only.h )
@ -412,7 +410,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/channel/handshaker_registry.cc )
s.files += %w( src/core/lib/compression/compression.cc )
s.files += %w( src/core/lib/compression/compression_internal.cc )
s.files += %w( src/core/lib/compression/compression_ruby.cc )
s.files += %w( src/core/lib/compression/message_compress.cc )
s.files += %w( src/core/lib/compression/stream_compression.cc )
s.files += %w( src/core/lib/compression/stream_compression_gzip.cc )
@ -505,7 +502,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/slice/slice_hash_table.cc )
s.files += %w( src/core/lib/slice/slice_intern.cc )
s.files += %w( src/core/lib/slice/slice_string_helpers.cc )
s.files += %w( src/core/lib/surface/alarm.cc )
s.files += %w( src/core/lib/surface/api_trace.cc )
s.files += %w( src/core/lib/surface/byte_buffer.cc )
s.files += %w( src/core/lib/surface/byte_buffer_reader.cc )
@ -590,8 +586,8 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/security/transport/tsi_error.cc )
s.files += %w( src/core/lib/security/util/json_util.cc )
s.files += %w( src/core/lib/surface/init_secure.cc )
s.files += %w( src/core/tsi/alts_transport_security.cc )
s.files += %w( src/core/tsi/fake_transport_security.cc )
s.files += %w( src/core/tsi/gts_transport_security.cc )
s.files += %w( src/core/tsi/ssl_transport_security.cc )
s.files += %w( src/core/tsi/transport_security_grpc.cc )
s.files += %w( src/core/tsi/transport_security.cc )
@ -654,31 +650,35 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc )
s.files += %w( src/core/ext/filters/workarounds/workaround_utils.cc )
s.files += %w( src/core/plugin_registry/grpc_plugin_registry.cc )
s.files += %w( third_party/boringssl/crypto/aes/internal.h )
s.files += %w( third_party/boringssl/crypto/asn1/asn1_locl.h )
s.files += %w( third_party/boringssl/crypto/bio/internal.h )
s.files += %w( third_party/boringssl/crypto/bn/internal.h )
s.files += %w( third_party/boringssl/crypto/bn/rsaz_exp.h )
s.files += %w( third_party/boringssl/crypto/bytestring/internal.h )
s.files += %w( third_party/boringssl/crypto/cipher/internal.h )
s.files += %w( third_party/boringssl/crypto/cipher_extra/internal.h )
s.files += %w( third_party/boringssl/crypto/conf/conf_def.h )
s.files += %w( third_party/boringssl/crypto/conf/internal.h )
s.files += %w( third_party/boringssl/crypto/curve25519/internal.h )
s.files += %w( third_party/boringssl/crypto/des/internal.h )
s.files += %w( third_party/boringssl/crypto/digest/internal.h )
s.files += %w( third_party/boringssl/crypto/digest/md32_common.h )
s.files += %w( third_party/boringssl/crypto/ec/internal.h )
s.files += %w( third_party/boringssl/crypto/ec/p256-x86_64-table.h )
s.files += %w( third_party/boringssl/crypto/ec/p256-x86_64.h )
s.files += %w( third_party/boringssl/crypto/err/internal.h )
s.files += %w( third_party/boringssl/crypto/evp/internal.h )
s.files += %w( third_party/boringssl/crypto/fipsmodule/aes/internal.h )
s.files += %w( third_party/boringssl/crypto/fipsmodule/bn/internal.h )
s.files += %w( third_party/boringssl/crypto/fipsmodule/bn/rsaz_exp.h )
s.files += %w( third_party/boringssl/crypto/fipsmodule/cipher/internal.h )
s.files += %w( third_party/boringssl/crypto/fipsmodule/delocate.h )
s.files += %w( third_party/boringssl/crypto/fipsmodule/des/internal.h )
s.files += %w( third_party/boringssl/crypto/fipsmodule/digest/internal.h )
s.files += %w( third_party/boringssl/crypto/fipsmodule/digest/md32_common.h )
s.files += %w( third_party/boringssl/crypto/fipsmodule/ec/internal.h )
s.files += %w( third_party/boringssl/crypto/fipsmodule/ec/p256-x86_64-table.h )
s.files += %w( third_party/boringssl/crypto/fipsmodule/ec/p256-x86_64.h )
s.files += %w( third_party/boringssl/crypto/fipsmodule/modes/internal.h )
s.files += %w( third_party/boringssl/crypto/fipsmodule/rand/internal.h )
s.files += %w( third_party/boringssl/crypto/fipsmodule/rsa/internal.h )
s.files += %w( third_party/boringssl/crypto/internal.h )
s.files += %w( third_party/boringssl/crypto/modes/internal.h )
s.files += %w( third_party/boringssl/crypto/obj/obj_dat.h )
s.files += %w( third_party/boringssl/crypto/pkcs7/internal.h )
s.files += %w( third_party/boringssl/crypto/pkcs8/internal.h )
s.files += %w( third_party/boringssl/crypto/poly1305/internal.h )
s.files += %w( third_party/boringssl/crypto/pool/internal.h )
s.files += %w( third_party/boringssl/crypto/rand/internal.h )
s.files += %w( third_party/boringssl/crypto/rsa/internal.h )
s.files += %w( third_party/boringssl/crypto/x509/charmap.h )
s.files += %w( third_party/boringssl/crypto/x509/internal.h )
s.files += %w( third_party/boringssl/crypto/x509/vpm_int.h )
@ -721,6 +721,7 @@ Gem::Specification.new do |s|
s.files += %w( third_party/boringssl/include/openssl/ex_data.h )
s.files += %w( third_party/boringssl/include/openssl/hkdf.h )
s.files += %w( third_party/boringssl/include/openssl/hmac.h )
s.files += %w( third_party/boringssl/include/openssl/is_boringssl.h )
s.files += %w( third_party/boringssl/include/openssl/lhash.h )
s.files += %w( third_party/boringssl/include/openssl/lhash_macros.h )
s.files += %w( third_party/boringssl/include/openssl/md4.h )
@ -745,11 +746,11 @@ Gem::Specification.new do |s|
s.files += %w( third_party/boringssl/include/openssl/rsa.h )
s.files += %w( third_party/boringssl/include/openssl/safestack.h )
s.files += %w( third_party/boringssl/include/openssl/sha.h )
s.files += %w( third_party/boringssl/include/openssl/span.h )
s.files += %w( third_party/boringssl/include/openssl/srtp.h )
s.files += %w( third_party/boringssl/include/openssl/ssl.h )
s.files += %w( third_party/boringssl/include/openssl/ssl3.h )
s.files += %w( third_party/boringssl/include/openssl/stack.h )
s.files += %w( third_party/boringssl/include/openssl/stack_macros.h )
s.files += %w( third_party/boringssl/include/openssl/thread.h )
s.files += %w( third_party/boringssl/include/openssl/tls1.h )
s.files += %w( third_party/boringssl/include/openssl/type_check.h )
@ -758,9 +759,6 @@ Gem::Specification.new do |s|
s.files += %w( third_party/boringssl/include/openssl/x509v3.h )
s.files += %w( third_party/boringssl/ssl/internal.h )
s.files += %w( src/boringssl/err_data.c )
s.files += %w( third_party/boringssl/crypto/aes/aes.c )
s.files += %w( third_party/boringssl/crypto/aes/key_wrap.c )
s.files += %w( third_party/boringssl/crypto/aes/mode_wrappers.c )
s.files += %w( third_party/boringssl/crypto/asn1/a_bitstr.c )
s.files += %w( third_party/boringssl/crypto/asn1/a_bool.c )
s.files += %w( third_party/boringssl/crypto/asn1/a_d2i_fp.c )
@ -784,7 +782,6 @@ Gem::Specification.new do |s|
s.files += %w( third_party/boringssl/crypto/asn1/f_enum.c )
s.files += %w( third_party/boringssl/crypto/asn1/f_int.c )
s.files += %w( third_party/boringssl/crypto/asn1/f_string.c )
s.files += %w( third_party/boringssl/crypto/asn1/t_bitst.c )
s.files += %w( third_party/boringssl/crypto/asn1/tasn_dec.c )
s.files += %w( third_party/boringssl/crypto/asn1/tasn_enc.c )
s.files += %w( third_party/boringssl/crypto/asn1/tasn_fre.c )
@ -792,8 +789,6 @@ Gem::Specification.new do |s|
s.files += %w( third_party/boringssl/crypto/asn1/tasn_typ.c )
s.files += %w( third_party/boringssl/crypto/asn1/tasn_utl.c )
s.files += %w( third_party/boringssl/crypto/asn1/time_support.c )
s.files += %w( third_party/boringssl/crypto/asn1/x_bignum.c )
s.files += %w( third_party/boringssl/crypto/asn1/x_long.c )
s.files += %w( third_party/boringssl/crypto/base64/base64.c )
s.files += %w( third_party/boringssl/crypto/bio/bio.c )
s.files += %w( third_party/boringssl/crypto/bio/bio_mem.c )
@ -805,44 +800,25 @@ Gem::Specification.new do |s|
s.files += %w( third_party/boringssl/crypto/bio/printf.c )
s.files += %w( third_party/boringssl/crypto/bio/socket.c )
s.files += %w( third_party/boringssl/crypto/bio/socket_helper.c )
s.files += %w( third_party/boringssl/crypto/bn/add.c )
s.files += %w( third_party/boringssl/crypto/bn/asm/x86_64-gcc.c )
s.files += %w( third_party/boringssl/crypto/bn/bn.c )
s.files += %w( third_party/boringssl/crypto/bn/bn_asn1.c )
s.files += %w( third_party/boringssl/crypto/bn/cmp.c )
s.files += %w( third_party/boringssl/crypto/bn/convert.c )
s.files += %w( third_party/boringssl/crypto/bn/ctx.c )
s.files += %w( third_party/boringssl/crypto/bn/div.c )
s.files += %w( third_party/boringssl/crypto/bn/exponentiation.c )
s.files += %w( third_party/boringssl/crypto/bn/gcd.c )
s.files += %w( third_party/boringssl/crypto/bn/generic.c )
s.files += %w( third_party/boringssl/crypto/bn/kronecker.c )
s.files += %w( third_party/boringssl/crypto/bn/montgomery.c )
s.files += %w( third_party/boringssl/crypto/bn/montgomery_inv.c )
s.files += %w( third_party/boringssl/crypto/bn/mul.c )
s.files += %w( third_party/boringssl/crypto/bn/prime.c )
s.files += %w( third_party/boringssl/crypto/bn/random.c )
s.files += %w( third_party/boringssl/crypto/bn/rsaz_exp.c )
s.files += %w( third_party/boringssl/crypto/bn/shift.c )
s.files += %w( third_party/boringssl/crypto/bn/sqrt.c )
s.files += %w( third_party/boringssl/crypto/bn_extra/bn_asn1.c )
s.files += %w( third_party/boringssl/crypto/bn_extra/convert.c )
s.files += %w( third_party/boringssl/crypto/buf/buf.c )
s.files += %w( third_party/boringssl/crypto/bytestring/asn1_compat.c )
s.files += %w( third_party/boringssl/crypto/bytestring/ber.c )
s.files += %w( third_party/boringssl/crypto/bytestring/cbb.c )
s.files += %w( third_party/boringssl/crypto/bytestring/cbs.c )
s.files += %w( third_party/boringssl/crypto/chacha/chacha.c )
s.files += %w( third_party/boringssl/crypto/cipher/aead.c )
s.files += %w( third_party/boringssl/crypto/cipher/cipher.c )
s.files += %w( third_party/boringssl/crypto/cipher/derive_key.c )
s.files += %w( third_party/boringssl/crypto/cipher/e_aes.c )
s.files += %w( third_party/boringssl/crypto/cipher/e_chacha20poly1305.c )
s.files += %w( third_party/boringssl/crypto/cipher/e_des.c )
s.files += %w( third_party/boringssl/crypto/cipher/e_null.c )
s.files += %w( third_party/boringssl/crypto/cipher/e_rc2.c )
s.files += %w( third_party/boringssl/crypto/cipher/e_rc4.c )
s.files += %w( third_party/boringssl/crypto/cipher/e_ssl3.c )
s.files += %w( third_party/boringssl/crypto/cipher/e_tls.c )
s.files += %w( third_party/boringssl/crypto/cipher/tls_cbc.c )
s.files += %w( third_party/boringssl/crypto/cipher_extra/cipher_extra.c )
s.files += %w( third_party/boringssl/crypto/cipher_extra/derive_key.c )
s.files += %w( third_party/boringssl/crypto/cipher_extra/e_aesctrhmac.c )
s.files += %w( third_party/boringssl/crypto/cipher_extra/e_aesgcmsiv.c )
s.files += %w( third_party/boringssl/crypto/cipher_extra/e_chacha20poly1305.c )
s.files += %w( third_party/boringssl/crypto/cipher_extra/e_null.c )
s.files += %w( third_party/boringssl/crypto/cipher_extra/e_rc2.c )
s.files += %w( third_party/boringssl/crypto/cipher_extra/e_rc4.c )
s.files += %w( third_party/boringssl/crypto/cipher_extra/e_ssl3.c )
s.files += %w( third_party/boringssl/crypto/cipher_extra/e_tls.c )
s.files += %w( third_party/boringssl/crypto/cipher_extra/tls_cbc.c )
s.files += %w( third_party/boringssl/crypto/cmac/cmac.c )
s.files += %w( third_party/boringssl/crypto/conf/conf.c )
s.files += %w( third_party/boringssl/crypto/cpu-aarch64-linux.c )
@ -854,29 +830,16 @@ Gem::Specification.new do |s|
s.files += %w( third_party/boringssl/crypto/curve25519/curve25519.c )
s.files += %w( third_party/boringssl/crypto/curve25519/spake25519.c )
s.files += %w( third_party/boringssl/crypto/curve25519/x25519-x86_64.c )
s.files += %w( third_party/boringssl/crypto/des/des.c )
s.files += %w( third_party/boringssl/crypto/dh/check.c )
s.files += %w( third_party/boringssl/crypto/dh/dh.c )
s.files += %w( third_party/boringssl/crypto/dh/dh_asn1.c )
s.files += %w( third_party/boringssl/crypto/dh/params.c )
s.files += %w( third_party/boringssl/crypto/digest/digest.c )
s.files += %w( third_party/boringssl/crypto/digest/digests.c )
s.files += %w( third_party/boringssl/crypto/digest_extra/digest_extra.c )
s.files += %w( third_party/boringssl/crypto/dsa/dsa.c )
s.files += %w( third_party/boringssl/crypto/dsa/dsa_asn1.c )
s.files += %w( third_party/boringssl/crypto/ec/ec.c )
s.files += %w( third_party/boringssl/crypto/ec/ec_asn1.c )
s.files += %w( third_party/boringssl/crypto/ec/ec_key.c )
s.files += %w( third_party/boringssl/crypto/ec/ec_montgomery.c )
s.files += %w( third_party/boringssl/crypto/ec/oct.c )
s.files += %w( third_party/boringssl/crypto/ec/p224-64.c )
s.files += %w( third_party/boringssl/crypto/ec/p256-64.c )
s.files += %w( third_party/boringssl/crypto/ec/p256-x86_64.c )
s.files += %w( third_party/boringssl/crypto/ec/simple.c )
s.files += %w( third_party/boringssl/crypto/ec/util-64.c )
s.files += %w( third_party/boringssl/crypto/ec/wnaf.c )
s.files += %w( third_party/boringssl/crypto/ec_extra/ec_asn1.c )
s.files += %w( third_party/boringssl/crypto/ecdh/ecdh.c )
s.files += %w( third_party/boringssl/crypto/ecdsa/ecdsa.c )
s.files += %w( third_party/boringssl/crypto/ecdsa/ecdsa_asn1.c )
s.files += %w( third_party/boringssl/crypto/ecdsa_extra/ecdsa_asn1.c )
s.files += %w( third_party/boringssl/crypto/engine/engine.c )
s.files += %w( third_party/boringssl/crypto/err/err.c )
s.files += %w( third_party/boringssl/crypto/evp/digestsign.c )
@ -886,24 +849,20 @@ Gem::Specification.new do |s|
s.files += %w( third_party/boringssl/crypto/evp/p_dsa_asn1.c )
s.files += %w( third_party/boringssl/crypto/evp/p_ec.c )
s.files += %w( third_party/boringssl/crypto/evp/p_ec_asn1.c )
s.files += %w( third_party/boringssl/crypto/evp/p_ed25519.c )
s.files += %w( third_party/boringssl/crypto/evp/p_ed25519_asn1.c )
s.files += %w( third_party/boringssl/crypto/evp/p_rsa.c )
s.files += %w( third_party/boringssl/crypto/evp/p_rsa_asn1.c )
s.files += %w( third_party/boringssl/crypto/evp/pbkdf.c )
s.files += %w( third_party/boringssl/crypto/evp/print.c )
s.files += %w( third_party/boringssl/crypto/evp/scrypt.c )
s.files += %w( third_party/boringssl/crypto/evp/sign.c )
s.files += %w( third_party/boringssl/crypto/ex_data.c )
s.files += %w( third_party/boringssl/crypto/fipsmodule/bcm.c )
s.files += %w( third_party/boringssl/crypto/fipsmodule/is_fips.c )
s.files += %w( third_party/boringssl/crypto/hkdf/hkdf.c )
s.files += %w( third_party/boringssl/crypto/hmac/hmac.c )
s.files += %w( third_party/boringssl/crypto/lhash/lhash.c )
s.files += %w( third_party/boringssl/crypto/md4/md4.c )
s.files += %w( third_party/boringssl/crypto/md5/md5.c )
s.files += %w( third_party/boringssl/crypto/mem.c )
s.files += %w( third_party/boringssl/crypto/modes/cbc.c )
s.files += %w( third_party/boringssl/crypto/modes/cfb.c )
s.files += %w( third_party/boringssl/crypto/modes/ctr.c )
s.files += %w( third_party/boringssl/crypto/modes/gcm.c )
s.files += %w( third_party/boringssl/crypto/modes/ofb.c )
s.files += %w( third_party/boringssl/crypto/modes/polyval.c )
s.files += %w( third_party/boringssl/crypto/obj/obj.c )
s.files += %w( third_party/boringssl/crypto/obj/obj_xref.c )
s.files += %w( third_party/boringssl/crypto/pem/pem_all.c )
@ -914,30 +873,24 @@ Gem::Specification.new do |s|
s.files += %w( third_party/boringssl/crypto/pem/pem_pkey.c )
s.files += %w( third_party/boringssl/crypto/pem/pem_x509.c )
s.files += %w( third_party/boringssl/crypto/pem/pem_xaux.c )
s.files += %w( third_party/boringssl/crypto/pkcs7/pkcs7.c )
s.files += %w( third_party/boringssl/crypto/pkcs7/pkcs7_x509.c )
s.files += %w( third_party/boringssl/crypto/pkcs8/p5_pbev2.c )
s.files += %w( third_party/boringssl/crypto/pkcs8/p8_pkey.c )
s.files += %w( third_party/boringssl/crypto/pkcs8/pkcs8.c )
s.files += %w( third_party/boringssl/crypto/pkcs8/pkcs8_x509.c )
s.files += %w( third_party/boringssl/crypto/poly1305/poly1305.c )
s.files += %w( third_party/boringssl/crypto/poly1305/poly1305_arm.c )
s.files += %w( third_party/boringssl/crypto/poly1305/poly1305_vec.c )
s.files += %w( third_party/boringssl/crypto/pool/pool.c )
s.files += %w( third_party/boringssl/crypto/rand/deterministic.c )
s.files += %w( third_party/boringssl/crypto/rand/fuchsia.c )
s.files += %w( third_party/boringssl/crypto/rand/rand.c )
s.files += %w( third_party/boringssl/crypto/rand/urandom.c )
s.files += %w( third_party/boringssl/crypto/rand/windows.c )
s.files += %w( third_party/boringssl/crypto/rand_extra/deterministic.c )
s.files += %w( third_party/boringssl/crypto/rand_extra/forkunsafe.c )
s.files += %w( third_party/boringssl/crypto/rand_extra/fuchsia.c )
s.files += %w( third_party/boringssl/crypto/rand_extra/rand_extra.c )
s.files += %w( third_party/boringssl/crypto/rand_extra/windows.c )
s.files += %w( third_party/boringssl/crypto/rc4/rc4.c )
s.files += %w( third_party/boringssl/crypto/refcount_c11.c )
s.files += %w( third_party/boringssl/crypto/refcount_lock.c )
s.files += %w( third_party/boringssl/crypto/rsa/blinding.c )
s.files += %w( third_party/boringssl/crypto/rsa/padding.c )
s.files += %w( third_party/boringssl/crypto/rsa/rsa.c )
s.files += %w( third_party/boringssl/crypto/rsa/rsa_asn1.c )
s.files += %w( third_party/boringssl/crypto/rsa/rsa_impl.c )
s.files += %w( third_party/boringssl/crypto/sha/sha1-altivec.c )
s.files += %w( third_party/boringssl/crypto/sha/sha1.c )
s.files += %w( third_party/boringssl/crypto/sha/sha256.c )
s.files += %w( third_party/boringssl/crypto/sha/sha512.c )
s.files += %w( third_party/boringssl/crypto/rsa_extra/rsa_asn1.c )
s.files += %w( third_party/boringssl/crypto/stack/stack.c )
s.files += %w( third_party/boringssl/crypto/thread.c )
s.files += %w( third_party/boringssl/crypto/thread_none.c )
@ -952,7 +905,6 @@ Gem::Specification.new do |s|
s.files += %w( third_party/boringssl/crypto/x509/by_dir.c )
s.files += %w( third_party/boringssl/crypto/x509/by_file.c )
s.files += %w( third_party/boringssl/crypto/x509/i2d_pr.c )
s.files += %w( third_party/boringssl/crypto/x509/pkcs7.c )
s.files += %w( third_party/boringssl/crypto/x509/rsa_pss.c )
s.files += %w( third_party/boringssl/crypto/x509/t_crl.c )
s.files += %w( third_party/boringssl/crypto/x509/t_req.c )
@ -978,7 +930,6 @@ Gem::Specification.new do |s|
s.files += %w( third_party/boringssl/crypto/x509/x509name.c )
s.files += %w( third_party/boringssl/crypto/x509/x509rset.c )
s.files += %w( third_party/boringssl/crypto/x509/x509spki.c )
s.files += %w( third_party/boringssl/crypto/x509/x509type.c )
s.files += %w( third_party/boringssl/crypto/x509/x_algor.c )
s.files += %w( third_party/boringssl/crypto/x509/x_all.c )
s.files += %w( third_party/boringssl/crypto/x509/x_attrib.c )
@ -1026,41 +977,42 @@ Gem::Specification.new do |s|
s.files += %w( third_party/boringssl/crypto/x509v3/v3_skey.c )
s.files += %w( third_party/boringssl/crypto/x509v3/v3_sxnet.c )
s.files += %w( third_party/boringssl/crypto/x509v3/v3_utl.c )
s.files += %w( third_party/boringssl/ssl/bio_ssl.c )
s.files += %w( third_party/boringssl/ssl/custom_extensions.c )
s.files += %w( third_party/boringssl/ssl/d1_both.c )
s.files += %w( third_party/boringssl/ssl/d1_lib.c )
s.files += %w( third_party/boringssl/ssl/d1_pkt.c )
s.files += %w( third_party/boringssl/ssl/d1_srtp.c )
s.files += %w( third_party/boringssl/ssl/dtls_method.c )
s.files += %w( third_party/boringssl/ssl/dtls_record.c )
s.files += %w( third_party/boringssl/ssl/handshake_client.c )
s.files += %w( third_party/boringssl/ssl/handshake_server.c )
s.files += %w( third_party/boringssl/ssl/s3_both.c )
s.files += %w( third_party/boringssl/ssl/s3_lib.c )
s.files += %w( third_party/boringssl/ssl/s3_pkt.c )
s.files += %w( third_party/boringssl/ssl/ssl_aead_ctx.c )
s.files += %w( third_party/boringssl/ssl/ssl_asn1.c )
s.files += %w( third_party/boringssl/ssl/ssl_buffer.c )
s.files += %w( third_party/boringssl/ssl/ssl_cert.c )
s.files += %w( third_party/boringssl/ssl/ssl_cipher.c )
s.files += %w( third_party/boringssl/ssl/ssl_ecdh.c )
s.files += %w( third_party/boringssl/ssl/ssl_file.c )
s.files += %w( third_party/boringssl/ssl/ssl_lib.c )
s.files += %w( third_party/boringssl/ssl/ssl_privkey.c )
s.files += %w( third_party/boringssl/ssl/ssl_privkey_cc.cc )
s.files += %w( third_party/boringssl/ssl/ssl_session.c )
s.files += %w( third_party/boringssl/ssl/ssl_stat.c )
s.files += %w( third_party/boringssl/ssl/ssl_transcript.c )
s.files += %w( third_party/boringssl/ssl/ssl_x509.c )
s.files += %w( third_party/boringssl/ssl/t1_enc.c )
s.files += %w( third_party/boringssl/ssl/t1_lib.c )
s.files += %w( third_party/boringssl/ssl/tls13_both.c )
s.files += %w( third_party/boringssl/ssl/tls13_client.c )
s.files += %w( third_party/boringssl/ssl/tls13_enc.c )
s.files += %w( third_party/boringssl/ssl/tls13_server.c )
s.files += %w( third_party/boringssl/ssl/tls_method.c )
s.files += %w( third_party/boringssl/ssl/tls_record.c )
s.files += %w( third_party/boringssl/ssl/bio_ssl.cc )
s.files += %w( third_party/boringssl/ssl/custom_extensions.cc )
s.files += %w( third_party/boringssl/ssl/d1_both.cc )
s.files += %w( third_party/boringssl/ssl/d1_lib.cc )
s.files += %w( third_party/boringssl/ssl/d1_pkt.cc )
s.files += %w( third_party/boringssl/ssl/d1_srtp.cc )
s.files += %w( third_party/boringssl/ssl/dtls_method.cc )
s.files += %w( third_party/boringssl/ssl/dtls_record.cc )
s.files += %w( third_party/boringssl/ssl/handshake.cc )
s.files += %w( third_party/boringssl/ssl/handshake_client.cc )
s.files += %w( third_party/boringssl/ssl/handshake_server.cc )
s.files += %w( third_party/boringssl/ssl/s3_both.cc )
s.files += %w( third_party/boringssl/ssl/s3_lib.cc )
s.files += %w( third_party/boringssl/ssl/s3_pkt.cc )
s.files += %w( third_party/boringssl/ssl/ssl_aead_ctx.cc )
s.files += %w( third_party/boringssl/ssl/ssl_asn1.cc )
s.files += %w( third_party/boringssl/ssl/ssl_buffer.cc )
s.files += %w( third_party/boringssl/ssl/ssl_cert.cc )
s.files += %w( third_party/boringssl/ssl/ssl_cipher.cc )
s.files += %w( third_party/boringssl/ssl/ssl_file.cc )
s.files += %w( third_party/boringssl/ssl/ssl_key_share.cc )
s.files += %w( third_party/boringssl/ssl/ssl_lib.cc )
s.files += %w( third_party/boringssl/ssl/ssl_privkey.cc )
s.files += %w( third_party/boringssl/ssl/ssl_session.cc )
s.files += %w( third_party/boringssl/ssl/ssl_stat.cc )
s.files += %w( third_party/boringssl/ssl/ssl_transcript.cc )
s.files += %w( third_party/boringssl/ssl/ssl_versions.cc )
s.files += %w( third_party/boringssl/ssl/ssl_x509.cc )
s.files += %w( third_party/boringssl/ssl/t1_enc.cc )
s.files += %w( third_party/boringssl/ssl/t1_lib.cc )
s.files += %w( third_party/boringssl/ssl/tls13_both.cc )
s.files += %w( third_party/boringssl/ssl/tls13_client.cc )
s.files += %w( third_party/boringssl/ssl/tls13_enc.cc )
s.files += %w( third_party/boringssl/ssl/tls13_server.cc )
s.files += %w( third_party/boringssl/ssl/tls_method.cc )
s.files += %w( third_party/boringssl/ssl/tls_record.cc )
s.files += %w( third_party/zlib/crc32.h )
s.files += %w( third_party/zlib/deflate.h )
s.files += %w( third_party/zlib/gzguts.h )

@ -235,7 +235,6 @@
'src/core/lib/channel/handshaker_registry.cc',
'src/core/lib/compression/compression.cc',
'src/core/lib/compression/compression_internal.cc',
'src/core/lib/compression/compression_ruby.cc',
'src/core/lib/compression/message_compress.cc',
'src/core/lib/compression/stream_compression.cc',
'src/core/lib/compression/stream_compression_gzip.cc',
@ -328,7 +327,6 @@
'src/core/lib/slice/slice_hash_table.cc',
'src/core/lib/slice/slice_intern.cc',
'src/core/lib/slice/slice_string_helpers.cc',
'src/core/lib/surface/alarm.cc',
'src/core/lib/surface/api_trace.cc',
'src/core/lib/surface/byte_buffer.cc',
'src/core/lib/surface/byte_buffer_reader.cc',
@ -413,8 +411,8 @@
'src/core/lib/security/transport/tsi_error.cc',
'src/core/lib/security/util/json_util.cc',
'src/core/lib/surface/init_secure.cc',
'src/core/tsi/alts_transport_security.cc',
'src/core/tsi/fake_transport_security.cc',
'src/core/tsi/gts_transport_security.cc',
'src/core/tsi/ssl_transport_security.cc',
'src/core/tsi/transport_security_grpc.cc',
'src/core/tsi/transport_security.cc',
@ -531,7 +529,6 @@
'src/core/lib/channel/handshaker_registry.cc',
'src/core/lib/compression/compression.cc',
'src/core/lib/compression/compression_internal.cc',
'src/core/lib/compression/compression_ruby.cc',
'src/core/lib/compression/message_compress.cc',
'src/core/lib/compression/stream_compression.cc',
'src/core/lib/compression/stream_compression_gzip.cc',
@ -624,7 +621,6 @@
'src/core/lib/slice/slice_hash_table.cc',
'src/core/lib/slice/slice_intern.cc',
'src/core/lib/slice/slice_string_helpers.cc',
'src/core/lib/surface/alarm.cc',
'src/core/lib/surface/api_trace.cc',
'src/core/lib/surface/byte_buffer.cc',
'src/core/lib/surface/byte_buffer_reader.cc',
@ -745,7 +741,6 @@
'src/core/lib/channel/handshaker_registry.cc',
'src/core/lib/compression/compression.cc',
'src/core/lib/compression/compression_internal.cc',
'src/core/lib/compression/compression_ruby.cc',
'src/core/lib/compression/message_compress.cc',
'src/core/lib/compression/stream_compression.cc',
'src/core/lib/compression/stream_compression_gzip.cc',
@ -838,7 +833,6 @@
'src/core/lib/slice/slice_hash_table.cc',
'src/core/lib/slice/slice_intern.cc',
'src/core/lib/slice/slice_string_helpers.cc',
'src/core/lib/surface/alarm.cc',
'src/core/lib/surface/api_trace.cc',
'src/core/lib/surface/byte_buffer.cc',
'src/core/lib/surface/byte_buffer_reader.cc',
@ -941,7 +935,6 @@
'src/core/lib/channel/handshaker_registry.cc',
'src/core/lib/compression/compression.cc',
'src/core/lib/compression/compression_internal.cc',
'src/core/lib/compression/compression_ruby.cc',
'src/core/lib/compression/message_compress.cc',
'src/core/lib/compression/stream_compression.cc',
'src/core/lib/compression/stream_compression_gzip.cc',
@ -1034,7 +1027,6 @@
'src/core/lib/slice/slice_hash_table.cc',
'src/core/lib/slice/slice_intern.cc',
'src/core/lib/slice/slice_string_helpers.cc',
'src/core/lib/surface/alarm.cc',
'src/core/lib/surface/api_trace.cc',
'src/core/lib/surface/byte_buffer.cc',
'src/core/lib/surface/byte_buffer_reader.cc',
@ -1203,6 +1195,7 @@
'src/cpp/client/create_channel_posix.cc',
'src/cpp/client/credentials_cc.cc',
'src/cpp/client/generic_stub.cc',
'src/cpp/common/alarm.cc',
'src/cpp/common/channel_arguments.cc',
'src/cpp/common/channel_filter.cc',
'src/cpp/common/completion_queue_cc.cc',
@ -1348,6 +1341,7 @@
'src/cpp/client/create_channel_posix.cc',
'src/cpp/client/credentials_cc.cc',
'src/cpp/client/generic_stub.cc',
'src/cpp/common/alarm.cc',
'src/cpp/common/channel_arguments.cc',
'src/cpp/common/channel_filter.cc',
'src/cpp/common/completion_queue_cc.cc',
@ -1565,9 +1559,6 @@
],
'sources': [
'src/boringssl/err_data.c',
'third_party/boringssl/crypto/aes/aes.c',
'third_party/boringssl/crypto/aes/key_wrap.c',
'third_party/boringssl/crypto/aes/mode_wrappers.c',
'third_party/boringssl/crypto/asn1/a_bitstr.c',
'third_party/boringssl/crypto/asn1/a_bool.c',
'third_party/boringssl/crypto/asn1/a_d2i_fp.c',
@ -1591,7 +1582,6 @@
'third_party/boringssl/crypto/asn1/f_enum.c',
'third_party/boringssl/crypto/asn1/f_int.c',
'third_party/boringssl/crypto/asn1/f_string.c',
'third_party/boringssl/crypto/asn1/t_bitst.c',
'third_party/boringssl/crypto/asn1/tasn_dec.c',
'third_party/boringssl/crypto/asn1/tasn_enc.c',
'third_party/boringssl/crypto/asn1/tasn_fre.c',
@ -1599,8 +1589,6 @@
'third_party/boringssl/crypto/asn1/tasn_typ.c',
'third_party/boringssl/crypto/asn1/tasn_utl.c',
'third_party/boringssl/crypto/asn1/time_support.c',
'third_party/boringssl/crypto/asn1/x_bignum.c',
'third_party/boringssl/crypto/asn1/x_long.c',
'third_party/boringssl/crypto/base64/base64.c',
'third_party/boringssl/crypto/bio/bio.c',
'third_party/boringssl/crypto/bio/bio_mem.c',
@ -1612,44 +1600,25 @@
'third_party/boringssl/crypto/bio/printf.c',
'third_party/boringssl/crypto/bio/socket.c',
'third_party/boringssl/crypto/bio/socket_helper.c',
'third_party/boringssl/crypto/bn/add.c',
'third_party/boringssl/crypto/bn/asm/x86_64-gcc.c',
'third_party/boringssl/crypto/bn/bn.c',
'third_party/boringssl/crypto/bn/bn_asn1.c',
'third_party/boringssl/crypto/bn/cmp.c',
'third_party/boringssl/crypto/bn/convert.c',
'third_party/boringssl/crypto/bn/ctx.c',
'third_party/boringssl/crypto/bn/div.c',
'third_party/boringssl/crypto/bn/exponentiation.c',
'third_party/boringssl/crypto/bn/gcd.c',
'third_party/boringssl/crypto/bn/generic.c',
'third_party/boringssl/crypto/bn/kronecker.c',
'third_party/boringssl/crypto/bn/montgomery.c',
'third_party/boringssl/crypto/bn/montgomery_inv.c',
'third_party/boringssl/crypto/bn/mul.c',
'third_party/boringssl/crypto/bn/prime.c',
'third_party/boringssl/crypto/bn/random.c',
'third_party/boringssl/crypto/bn/rsaz_exp.c',
'third_party/boringssl/crypto/bn/shift.c',
'third_party/boringssl/crypto/bn/sqrt.c',
'third_party/boringssl/crypto/bn_extra/bn_asn1.c',
'third_party/boringssl/crypto/bn_extra/convert.c',
'third_party/boringssl/crypto/buf/buf.c',
'third_party/boringssl/crypto/bytestring/asn1_compat.c',
'third_party/boringssl/crypto/bytestring/ber.c',
'third_party/boringssl/crypto/bytestring/cbb.c',
'third_party/boringssl/crypto/bytestring/cbs.c',
'third_party/boringssl/crypto/chacha/chacha.c',
'third_party/boringssl/crypto/cipher/aead.c',
'third_party/boringssl/crypto/cipher/cipher.c',
'third_party/boringssl/crypto/cipher/derive_key.c',
'third_party/boringssl/crypto/cipher/e_aes.c',
'third_party/boringssl/crypto/cipher/e_chacha20poly1305.c',
'third_party/boringssl/crypto/cipher/e_des.c',
'third_party/boringssl/crypto/cipher/e_null.c',
'third_party/boringssl/crypto/cipher/e_rc2.c',
'third_party/boringssl/crypto/cipher/e_rc4.c',
'third_party/boringssl/crypto/cipher/e_ssl3.c',
'third_party/boringssl/crypto/cipher/e_tls.c',
'third_party/boringssl/crypto/cipher/tls_cbc.c',
'third_party/boringssl/crypto/cipher_extra/cipher_extra.c',
'third_party/boringssl/crypto/cipher_extra/derive_key.c',
'third_party/boringssl/crypto/cipher_extra/e_aesctrhmac.c',
'third_party/boringssl/crypto/cipher_extra/e_aesgcmsiv.c',
'third_party/boringssl/crypto/cipher_extra/e_chacha20poly1305.c',
'third_party/boringssl/crypto/cipher_extra/e_null.c',
'third_party/boringssl/crypto/cipher_extra/e_rc2.c',
'third_party/boringssl/crypto/cipher_extra/e_rc4.c',
'third_party/boringssl/crypto/cipher_extra/e_ssl3.c',
'third_party/boringssl/crypto/cipher_extra/e_tls.c',
'third_party/boringssl/crypto/cipher_extra/tls_cbc.c',
'third_party/boringssl/crypto/cmac/cmac.c',
'third_party/boringssl/crypto/conf/conf.c',
'third_party/boringssl/crypto/cpu-aarch64-linux.c',
@ -1661,29 +1630,16 @@
'third_party/boringssl/crypto/curve25519/curve25519.c',
'third_party/boringssl/crypto/curve25519/spake25519.c',
'third_party/boringssl/crypto/curve25519/x25519-x86_64.c',
'third_party/boringssl/crypto/des/des.c',
'third_party/boringssl/crypto/dh/check.c',
'third_party/boringssl/crypto/dh/dh.c',
'third_party/boringssl/crypto/dh/dh_asn1.c',
'third_party/boringssl/crypto/dh/params.c',
'third_party/boringssl/crypto/digest/digest.c',
'third_party/boringssl/crypto/digest/digests.c',
'third_party/boringssl/crypto/digest_extra/digest_extra.c',
'third_party/boringssl/crypto/dsa/dsa.c',
'third_party/boringssl/crypto/dsa/dsa_asn1.c',
'third_party/boringssl/crypto/ec/ec.c',
'third_party/boringssl/crypto/ec/ec_asn1.c',
'third_party/boringssl/crypto/ec/ec_key.c',
'third_party/boringssl/crypto/ec/ec_montgomery.c',
'third_party/boringssl/crypto/ec/oct.c',
'third_party/boringssl/crypto/ec/p224-64.c',
'third_party/boringssl/crypto/ec/p256-64.c',
'third_party/boringssl/crypto/ec/p256-x86_64.c',
'third_party/boringssl/crypto/ec/simple.c',
'third_party/boringssl/crypto/ec/util-64.c',
'third_party/boringssl/crypto/ec/wnaf.c',
'third_party/boringssl/crypto/ec_extra/ec_asn1.c',
'third_party/boringssl/crypto/ecdh/ecdh.c',
'third_party/boringssl/crypto/ecdsa/ecdsa.c',
'third_party/boringssl/crypto/ecdsa/ecdsa_asn1.c',
'third_party/boringssl/crypto/ecdsa_extra/ecdsa_asn1.c',
'third_party/boringssl/crypto/engine/engine.c',
'third_party/boringssl/crypto/err/err.c',
'third_party/boringssl/crypto/evp/digestsign.c',
@ -1693,24 +1649,20 @@
'third_party/boringssl/crypto/evp/p_dsa_asn1.c',
'third_party/boringssl/crypto/evp/p_ec.c',
'third_party/boringssl/crypto/evp/p_ec_asn1.c',
'third_party/boringssl/crypto/evp/p_ed25519.c',
'third_party/boringssl/crypto/evp/p_ed25519_asn1.c',
'third_party/boringssl/crypto/evp/p_rsa.c',
'third_party/boringssl/crypto/evp/p_rsa_asn1.c',
'third_party/boringssl/crypto/evp/pbkdf.c',
'third_party/boringssl/crypto/evp/print.c',
'third_party/boringssl/crypto/evp/scrypt.c',
'third_party/boringssl/crypto/evp/sign.c',
'third_party/boringssl/crypto/ex_data.c',
'third_party/boringssl/crypto/fipsmodule/bcm.c',
'third_party/boringssl/crypto/fipsmodule/is_fips.c',
'third_party/boringssl/crypto/hkdf/hkdf.c',
'third_party/boringssl/crypto/hmac/hmac.c',
'third_party/boringssl/crypto/lhash/lhash.c',
'third_party/boringssl/crypto/md4/md4.c',
'third_party/boringssl/crypto/md5/md5.c',
'third_party/boringssl/crypto/mem.c',
'third_party/boringssl/crypto/modes/cbc.c',
'third_party/boringssl/crypto/modes/cfb.c',
'third_party/boringssl/crypto/modes/ctr.c',
'third_party/boringssl/crypto/modes/gcm.c',
'third_party/boringssl/crypto/modes/ofb.c',
'third_party/boringssl/crypto/modes/polyval.c',
'third_party/boringssl/crypto/obj/obj.c',
'third_party/boringssl/crypto/obj/obj_xref.c',
'third_party/boringssl/crypto/pem/pem_all.c',
@ -1721,30 +1673,24 @@
'third_party/boringssl/crypto/pem/pem_pkey.c',
'third_party/boringssl/crypto/pem/pem_x509.c',
'third_party/boringssl/crypto/pem/pem_xaux.c',
'third_party/boringssl/crypto/pkcs7/pkcs7.c',
'third_party/boringssl/crypto/pkcs7/pkcs7_x509.c',
'third_party/boringssl/crypto/pkcs8/p5_pbev2.c',
'third_party/boringssl/crypto/pkcs8/p8_pkey.c',
'third_party/boringssl/crypto/pkcs8/pkcs8.c',
'third_party/boringssl/crypto/pkcs8/pkcs8_x509.c',
'third_party/boringssl/crypto/poly1305/poly1305.c',
'third_party/boringssl/crypto/poly1305/poly1305_arm.c',
'third_party/boringssl/crypto/poly1305/poly1305_vec.c',
'third_party/boringssl/crypto/pool/pool.c',
'third_party/boringssl/crypto/rand/deterministic.c',
'third_party/boringssl/crypto/rand/fuchsia.c',
'third_party/boringssl/crypto/rand/rand.c',
'third_party/boringssl/crypto/rand/urandom.c',
'third_party/boringssl/crypto/rand/windows.c',
'third_party/boringssl/crypto/rand_extra/deterministic.c',
'third_party/boringssl/crypto/rand_extra/forkunsafe.c',
'third_party/boringssl/crypto/rand_extra/fuchsia.c',
'third_party/boringssl/crypto/rand_extra/rand_extra.c',
'third_party/boringssl/crypto/rand_extra/windows.c',
'third_party/boringssl/crypto/rc4/rc4.c',
'third_party/boringssl/crypto/refcount_c11.c',
'third_party/boringssl/crypto/refcount_lock.c',
'third_party/boringssl/crypto/rsa/blinding.c',
'third_party/boringssl/crypto/rsa/padding.c',
'third_party/boringssl/crypto/rsa/rsa.c',
'third_party/boringssl/crypto/rsa/rsa_asn1.c',
'third_party/boringssl/crypto/rsa/rsa_impl.c',
'third_party/boringssl/crypto/sha/sha1-altivec.c',
'third_party/boringssl/crypto/sha/sha1.c',
'third_party/boringssl/crypto/sha/sha256.c',
'third_party/boringssl/crypto/sha/sha512.c',
'third_party/boringssl/crypto/rsa_extra/rsa_asn1.c',
'third_party/boringssl/crypto/stack/stack.c',
'third_party/boringssl/crypto/thread.c',
'third_party/boringssl/crypto/thread_none.c',
@ -1759,7 +1705,6 @@
'third_party/boringssl/crypto/x509/by_dir.c',
'third_party/boringssl/crypto/x509/by_file.c',
'third_party/boringssl/crypto/x509/i2d_pr.c',
'third_party/boringssl/crypto/x509/pkcs7.c',
'third_party/boringssl/crypto/x509/rsa_pss.c',
'third_party/boringssl/crypto/x509/t_crl.c',
'third_party/boringssl/crypto/x509/t_req.c',
@ -1785,7 +1730,6 @@
'third_party/boringssl/crypto/x509/x509name.c',
'third_party/boringssl/crypto/x509/x509rset.c',
'third_party/boringssl/crypto/x509/x509spki.c',
'third_party/boringssl/crypto/x509/x509type.c',
'third_party/boringssl/crypto/x509/x_algor.c',
'third_party/boringssl/crypto/x509/x_all.c',
'third_party/boringssl/crypto/x509/x_attrib.c',
@ -1833,41 +1777,42 @@
'third_party/boringssl/crypto/x509v3/v3_skey.c',
'third_party/boringssl/crypto/x509v3/v3_sxnet.c',
'third_party/boringssl/crypto/x509v3/v3_utl.c',
'third_party/boringssl/ssl/bio_ssl.c',
'third_party/boringssl/ssl/custom_extensions.c',
'third_party/boringssl/ssl/d1_both.c',
'third_party/boringssl/ssl/d1_lib.c',
'third_party/boringssl/ssl/d1_pkt.c',
'third_party/boringssl/ssl/d1_srtp.c',
'third_party/boringssl/ssl/dtls_method.c',
'third_party/boringssl/ssl/dtls_record.c',
'third_party/boringssl/ssl/handshake_client.c',
'third_party/boringssl/ssl/handshake_server.c',
'third_party/boringssl/ssl/s3_both.c',
'third_party/boringssl/ssl/s3_lib.c',
'third_party/boringssl/ssl/s3_pkt.c',
'third_party/boringssl/ssl/ssl_aead_ctx.c',
'third_party/boringssl/ssl/ssl_asn1.c',
'third_party/boringssl/ssl/ssl_buffer.c',
'third_party/boringssl/ssl/ssl_cert.c',
'third_party/boringssl/ssl/ssl_cipher.c',
'third_party/boringssl/ssl/ssl_ecdh.c',
'third_party/boringssl/ssl/ssl_file.c',
'third_party/boringssl/ssl/ssl_lib.c',
'third_party/boringssl/ssl/ssl_privkey.c',
'third_party/boringssl/ssl/ssl_privkey_cc.cc',
'third_party/boringssl/ssl/ssl_session.c',
'third_party/boringssl/ssl/ssl_stat.c',
'third_party/boringssl/ssl/ssl_transcript.c',
'third_party/boringssl/ssl/ssl_x509.c',
'third_party/boringssl/ssl/t1_enc.c',
'third_party/boringssl/ssl/t1_lib.c',
'third_party/boringssl/ssl/tls13_both.c',
'third_party/boringssl/ssl/tls13_client.c',
'third_party/boringssl/ssl/tls13_enc.c',
'third_party/boringssl/ssl/tls13_server.c',
'third_party/boringssl/ssl/tls_method.c',
'third_party/boringssl/ssl/tls_record.c',
'third_party/boringssl/ssl/bio_ssl.cc',
'third_party/boringssl/ssl/custom_extensions.cc',
'third_party/boringssl/ssl/d1_both.cc',
'third_party/boringssl/ssl/d1_lib.cc',
'third_party/boringssl/ssl/d1_pkt.cc',
'third_party/boringssl/ssl/d1_srtp.cc',
'third_party/boringssl/ssl/dtls_method.cc',
'third_party/boringssl/ssl/dtls_record.cc',
'third_party/boringssl/ssl/handshake.cc',
'third_party/boringssl/ssl/handshake_client.cc',
'third_party/boringssl/ssl/handshake_server.cc',
'third_party/boringssl/ssl/s3_both.cc',
'third_party/boringssl/ssl/s3_lib.cc',
'third_party/boringssl/ssl/s3_pkt.cc',
'third_party/boringssl/ssl/ssl_aead_ctx.cc',
'third_party/boringssl/ssl/ssl_asn1.cc',
'third_party/boringssl/ssl/ssl_buffer.cc',
'third_party/boringssl/ssl/ssl_cert.cc',
'third_party/boringssl/ssl/ssl_cipher.cc',
'third_party/boringssl/ssl/ssl_file.cc',
'third_party/boringssl/ssl/ssl_key_share.cc',
'third_party/boringssl/ssl/ssl_lib.cc',
'third_party/boringssl/ssl/ssl_privkey.cc',
'third_party/boringssl/ssl/ssl_session.cc',
'third_party/boringssl/ssl/ssl_stat.cc',
'third_party/boringssl/ssl/ssl_transcript.cc',
'third_party/boringssl/ssl/ssl_versions.cc',
'third_party/boringssl/ssl/ssl_x509.cc',
'third_party/boringssl/ssl/t1_enc.cc',
'third_party/boringssl/ssl/t1_lib.cc',
'third_party/boringssl/ssl/tls13_both.cc',
'third_party/boringssl/ssl/tls13_client.cc',
'third_party/boringssl/ssl/tls13_enc.cc',
'third_party/boringssl/ssl/tls13_server.cc',
'third_party/boringssl/ssl/tls_method.cc',
'third_party/boringssl/ssl/tls_record.cc',
],
},
{
@ -1882,14 +1827,14 @@
],
},
{
'target_name': 'boringssl_aes_test_lib',
'target_name': 'boringssl_crypto_test_data_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/aes/aes_test.cc',
'src/boringssl/crypto_test_data.cc',
],
},
{
@ -1926,25 +1871,25 @@
],
},
{
'target_name': 'boringssl_bn_test_lib',
'target_name': 'boringssl_bytestring_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/bn/bn_test.cc',
'third_party/boringssl/crypto/bytestring/bytestring_test.cc',
],
},
{
'target_name': 'boringssl_bytestring_test_lib',
'target_name': 'boringssl_chacha_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/bytestring/bytestring_test.cc',
'third_party/boringssl/crypto/chacha/chacha_test.cc',
],
},
{
@ -1955,7 +1900,7 @@
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/cipher/aead_test.cc',
'third_party/boringssl/crypto/cipher_extra/aead_test.cc',
],
},
{
@ -1966,7 +1911,7 @@
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/cipher/cipher_test.cc',
'third_party/boringssl/crypto/cipher_extra/cipher_test.cc',
],
},
{
@ -1980,6 +1925,17 @@
'third_party/boringssl/crypto/cmac/cmac_test.cc',
],
},
{
'target_name': 'boringssl_compiler_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/compiler_test.cc',
],
},
{
'target_name': 'boringssl_constant_time_test_lib',
'type': 'static_library',
@ -2025,36 +1981,36 @@
],
},
{
'target_name': 'boringssl_digest_test_lib',
'target_name': 'boringssl_dh_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/digest/digest_test.cc',
'third_party/boringssl/crypto/dh/dh_test.cc',
],
},
{
'target_name': 'boringssl_example_mul_lib',
'target_name': 'boringssl_digest_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/ec/example_mul.c',
'third_party/boringssl/crypto/digest_extra/digest_test.cc',
],
},
{
'target_name': 'boringssl_p256-x86_64_test_lib',
'target_name': 'boringssl_dsa_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/ec/p256-x86_64_test.cc',
'third_party/boringssl/crypto/dsa/dsa_test.cc',
],
},
{
@ -2069,69 +2025,135 @@
],
},
{
'target_name': 'boringssl_ecdsa_sign_test_lib',
'target_name': 'boringssl_err_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/ecdsa/ecdsa_sign_test.cc',
'third_party/boringssl/crypto/err/err_test.cc',
],
},
{
'target_name': 'boringssl_ecdsa_test_lib',
'target_name': 'boringssl_evp_extra_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/ecdsa/ecdsa_test.cc',
'third_party/boringssl/crypto/evp/evp_extra_test.cc',
],
},
{
'target_name': 'boringssl_ecdsa_verify_test_lib',
'target_name': 'boringssl_evp_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/ecdsa/ecdsa_verify_test.cc',
'third_party/boringssl/crypto/evp/evp_test.cc',
],
},
{
'target_name': 'boringssl_evp_extra_test_lib',
'target_name': 'boringssl_pbkdf_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/evp/evp_extra_test.cc',
'third_party/boringssl/crypto/evp/pbkdf_test.cc',
],
},
{
'target_name': 'boringssl_evp_test_lib',
'target_name': 'boringssl_scrypt_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/evp/evp_test.cc',
'third_party/boringssl/crypto/evp/scrypt_test.cc',
],
},
{
'target_name': 'boringssl_pbkdf_test_lib',
'target_name': 'boringssl_aes_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/evp/pbkdf_test.cc',
'third_party/boringssl/crypto/fipsmodule/aes/aes_test.cc',
],
},
{
'target_name': 'boringssl_bn_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/fipsmodule/bn/bn_test.cc',
],
},
{
'target_name': 'boringssl_ec_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/fipsmodule/ec/ec_test.cc',
],
},
{
'target_name': 'boringssl_p256-x86_64_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/fipsmodule/ec/p256-x86_64_test.cc',
],
},
{
'target_name': 'boringssl_ecdsa_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/fipsmodule/ecdsa/ecdsa_test.cc',
],
},
{
'target_name': 'boringssl_gcm_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/fipsmodule/modes/gcm_test.cc',
],
},
{
'target_name': 'boringssl_ctrdrbg_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/fipsmodule/rand/ctrdrbg_test.cc',
],
},
{
@ -2153,7 +2175,7 @@
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/hmac/hmac_test.cc',
'third_party/boringssl/crypto/hmac_extra/hmac_test.cc',
],
},
{
@ -2168,25 +2190,25 @@
],
},
{
'target_name': 'boringssl_gcm_test_lib',
'target_name': 'boringssl_obj_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/modes/gcm_test.cc',
'third_party/boringssl/crypto/obj/obj_test.cc',
],
},
{
'target_name': 'boringssl_obj_test_lib',
'target_name': 'boringssl_pkcs7_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/obj/obj_test.cc',
'third_party/boringssl/crypto/pkcs7/pkcs7_test.cc',
],
},
{
@ -2245,25 +2267,47 @@
],
},
{
'target_name': 'boringssl_thread_test_lib',
'target_name': 'boringssl_rsa_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/thread_test.c',
'third_party/boringssl/crypto/rsa_extra/rsa_test.cc',
],
},
{
'target_name': 'boringssl_pkcs7_test_lib',
'target_name': 'boringssl_file_test_gtest_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/x509/pkcs7_test.c',
'third_party/boringssl/crypto/test/file_test_gtest.cc',
],
},
{
'target_name': 'boringssl_gtest_main_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/test/gtest_main.cc',
],
},
{
'target_name': 'boringssl_thread_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/thread_test.cc',
],
},
{
@ -2285,7 +2329,7 @@
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/x509v3/tab_test.c',
'third_party/boringssl/crypto/x509v3/tab_test.cc',
],
},
{
@ -2296,7 +2340,29 @@
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/x509v3/v3name_test.c',
'third_party/boringssl/crypto/x509v3/v3name_test.cc',
],
},
{
'target_name': 'boringssl_span_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/ssl/span_test.cc',
],
},
{
'target_name': 'boringssl_ssl_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/ssl/ssl_test.cc',
],
},
{

@ -28,17 +28,16 @@
#include <grpc++/impl/grpc_library.h>
#include <grpc/grpc.h>
struct grpc_alarm;
namespace grpc {
class CompletionQueue;
/// A thin wrapper around \a grpc_alarm (see / \a / src/core/surface/alarm.h).
class Alarm : private GrpcLibraryCodegen {
public:
/// Create an unset completion queue alarm
Alarm() : tag_(nullptr), alarm_(grpc_alarm_create(nullptr)) {}
Alarm();
/// Destroy the given completion queue alarm, cancelling it in the process.
~Alarm();
/// DEPRECATED: Create and set a completion queue alarm instance associated to
/// \a cq.
@ -48,10 +47,8 @@ class Alarm : private GrpcLibraryCodegen {
/// internal::GrpcLibraryInitializer instance would need to be introduced
/// here. \endinternal.
template <typename T>
Alarm(CompletionQueue* cq, const T& deadline, void* tag)
: tag_(tag), alarm_(grpc_alarm_create(nullptr)) {
grpc_alarm_set(alarm_, cq->cq(), TimePoint<T>(deadline).raw_time(),
static_cast<void*>(&tag_), nullptr);
Alarm(CompletionQueue* cq, const T& deadline, void* tag) : Alarm() {
SetInternal(cq, TimePoint<T>(deadline).raw_time(), tag);
}
/// Trigger an alarm instance on completion queue \a cq at the specified time.
@ -60,9 +57,7 @@ class Alarm : private GrpcLibraryCodegen {
/// event's success bit will be true, false otherwise (ie, upon cancellation).
template <typename T>
void Set(CompletionQueue* cq, const T& deadline, void* tag) {
tag_.Set(tag);
grpc_alarm_set(alarm_, cq->cq(), TimePoint<T>(deadline).raw_time(),
static_cast<void*>(&tag_), nullptr);
SetInternal(cq, TimePoint<T>(deadline).raw_time(), tag);
}
/// Alarms aren't copyable.
@ -70,43 +65,21 @@ class Alarm : private GrpcLibraryCodegen {
Alarm& operator=(const Alarm&) = delete;
/// Alarms are movable.
Alarm(Alarm&& rhs) : tag_(rhs.tag_), alarm_(rhs.alarm_) {
rhs.alarm_ = nullptr;
}
Alarm(Alarm&& rhs) : alarm_(rhs.alarm_) { rhs.alarm_ = nullptr; }
Alarm& operator=(Alarm&& rhs) {
tag_ = rhs.tag_;
alarm_ = rhs.alarm_;
rhs.alarm_ = nullptr;
return *this;
}
/// Destroy the given completion queue alarm, cancelling it in the process.
~Alarm() {
if (alarm_ != nullptr) grpc_alarm_destroy(alarm_, nullptr);
}
/// Cancel a completion queue alarm. Calling this function over an alarm that
/// has already fired has no effect.
void Cancel() {
if (alarm_ != nullptr) grpc_alarm_cancel(alarm_, nullptr);
}
void Cancel();
private:
class AlarmEntry : public internal::CompletionQueueTag {
public:
AlarmEntry(void* tag) : tag_(tag) {}
void Set(void* tag) { tag_ = tag; }
bool FinalizeResult(void** tag, bool* status) override {
*tag = tag_;
return true;
}
private:
void* tag_;
};
void SetInternal(CompletionQueue* cq, gpr_timespec deadline, void* tag);
AlarmEntry tag_;
grpc_alarm* alarm_; // owned
internal::CompletionQueueTag* alarm_;
};
} // namespace grpc

@ -37,15 +37,6 @@ class GenericStub final {
explicit GenericStub(std::shared_ptr<ChannelInterface> channel)
: channel_(channel) {}
/// Begin a call to a named method \a method using \a context.
/// A tag \a tag will be delivered to \a cq when the call has been started
/// (i.e, initial metadata has been sent).
/// The return value only indicates whether or not registration of the call
/// succeeded (i.e. the call won't proceed if the return value is nullptr).
std::unique_ptr<GenericClientAsyncReaderWriter> Call(
ClientContext* context, const grpc::string& method, CompletionQueue* cq,
void* tag);
/// Setup a call to a named method \a method using \a context, but don't
/// start it. Let it be started explicitly with StartCall and a tag.
/// The return value only indicates whether or not registration of the call
@ -61,6 +52,16 @@ class GenericStub final {
ClientContext* context, const grpc::string& method,
const ByteBuffer& request, CompletionQueue* cq);
/// DEPRECATED for multi-threaded use
/// Begin a call to a named method \a method using \a context.
/// A tag \a tag will be delivered to \a cq when the call has been started
/// (i.e, initial metadata has been sent).
/// The return value only indicates whether or not registration of the call
/// succeeded (i.e. the call won't proceed if the return value is nullptr).
std::unique_ptr<GenericClientAsyncReaderWriter> Call(
ClientContext* context, const grpc::string& method, CompletionQueue* cq,
void* tag);
private:
std::shared_ptr<ChannelInterface> channel_;
};

@ -607,7 +607,7 @@ class CallOpSetInterface : public CompletionQueueTag {
virtual void FillOps(grpc_call* call, grpc_op* ops, size_t* nops) = 0;
};
/// Primary implementaiton of CallOpSetInterface.
/// Primary implementation of CallOpSetInterface.
/// Since we cannot use variadic templates, we declare slots up to
/// the maximum count of ops we'll need in a set. We leverage the
/// empty base class optimization to slim this class (especially
@ -624,7 +624,7 @@ class CallOpSet : public CallOpSetInterface,
public Op5,
public Op6 {
public:
CallOpSet() : return_tag_(this) {}
CallOpSet() : return_tag_(this), call_(nullptr) {}
void FillOps(grpc_call* call, grpc_op* ops, size_t* nops) override {
this->Op1::AddOp(ops, nops);
this->Op2::AddOp(ops, nops);

@ -289,7 +289,9 @@ class ClientContext {
creds_ = creds;
}
/// Return the compression algorithm to be used by the client call.
/// Return the compression algorithm the client call will request be used.
/// Note that the gRPC runtime may decide to ignore this request, for example,
/// due to resource constraints.
grpc_compression_algorithm compression_algorithm() const {
return compression_algorithm_;
}
@ -302,7 +304,10 @@ class ClientContext {
/// Flag whether the initial metadata should be \a corked
///
/// If \a corked is true, then the initial metadata will be coalesced with the
/// write of first message in the stream.
/// write of first message in the stream. As a result, any tag set for the
/// initial metadata operation (starting a client-streaming or bidi-streaming
/// RPC) will not actually be sent to the completion queue or delivered
/// via Next.
///
/// \param corked The flag indicating whether the initial metadata is to be
/// corked or not.
@ -330,6 +335,10 @@ class ClientContext {
/// already finished, it may still return success.
///
/// There is no guarantee the call will be cancelled.
///
/// Note that TryCancel() does not change any of the tags that are pending
/// on the completion queue. All pending tags will still be delivered
/// (though their ok result may reflect the effect of cancellation).
void TryCancel();
/// Global Callbacks

@ -111,12 +111,83 @@ class CompletionQueue : private GrpcLibraryCodegen {
/// Tri-state return for AsyncNext: SHUTDOWN, GOT_EVENT, TIMEOUT.
enum NextStatus {
SHUTDOWN, ///< The completion queue has been shutdown.
SHUTDOWN, ///< The completion queue has been shutdown and fully-drained
GOT_EVENT, ///< Got a new event; \a tag will be filled in with its
///< associated value; \a ok indicating its success.
TIMEOUT ///< deadline was reached.
};
/// Read from the queue, blocking until an event is available or the queue is
/// shutting down.
///
/// \param tag[out] Updated to point to the read event's tag.
/// \param ok[out] true if read a successful event, false otherwise.
///
/// Note that each tag sent to the completion queue (through RPC operations
/// or alarms) will be delivered out of the completion queue by a call to
/// Next (or a related method), regardless of whether the operation succeeded
/// or not. Success here means that this operation completed in the normal
/// valid manner.
///
/// Server-side RPC request: \a ok indicates that the RPC has indeed
/// been started. If it is false, the server has been Shutdown
/// before this particular call got matched to an incoming RPC.
///
/// Client-side StartCall/RPC invocation: \a ok indicates that the RPC is
/// going to go to the wire. If it is false, it not going to the wire. This
/// would happen if the channel is either permanently broken or
/// transiently broken but with the fail-fast option. (Note that async unary
/// RPCs don't post a CQ tag at this point, nor do client-streaming
/// or bidi-streaming RPCs that have the initial metadata corked option set.)
///
/// Client-side Write, Client-side WritesDone, Server-side Write,
/// Server-side Finish, Server-side SendInitialMetadata (which is
/// typically included in Write or Finish when not done explicitly):
/// \a ok means that the data/metadata/status/etc is going to go to the
/// wire. If it is false, it not going to the wire because the call
/// is already dead (i.e., canceled, deadline expired, other side
/// dropped the channel, etc).
///
/// Client-side Read, Server-side Read, Client-side
/// RecvInitialMetadata (which is typically included in Read if not
/// done explicitly): \a ok indicates whether there is a valid message
/// that got read. If not, you know that there are certainly no more
/// messages that can ever be read from this stream. For the client-side
/// operations, this only happens because the call is dead. For the
/// server-sider operation, though, this could happen because the client
/// has done a WritesDone already.
///
/// Client-side Finish: \a ok should always be true
///
/// Server-side AsyncNotifyWhenDone: \a ok should always be true
///
/// Alarm: \a ok is true if it expired, false if it was canceled
///
/// \return true if got an event, false if the queue is fully drained and
/// shut down.
bool Next(void** tag, bool* ok) {
return (AsyncNextInternal(tag, ok,
g_core_codegen_interface->gpr_inf_future(
GPR_CLOCK_REALTIME)) != SHUTDOWN);
}
/// Read from the queue, blocking up to \a deadline (or the queue's shutdown).
/// Both \a tag and \a ok are updated upon success (if an event is available
/// within the \a deadline). A \a tag points to an arbitrary location usually
/// employed to uniquely identify an event.
///
/// \param tag[out] Upon sucess, updated to point to the event's tag.
/// \param ok[out] Upon sucess, true if a successful event, false otherwise
/// See documentation for CompletionQueue::Next for explanation of ok
/// \param deadline[in] How long to block in wait for an event.
///
/// \return The type of event read.
template <typename T>
NextStatus AsyncNext(void** tag, bool* ok, const T& deadline) {
TimePoint<T> deadline_tp(deadline);
return AsyncNextInternal(tag, ok, deadline_tp.raw_time());
}
/// EXPERIMENTAL
/// First executes \a F, then reads from the queue, blocking up to
/// \a deadline (or the queue's shutdown).
@ -141,44 +212,16 @@ class CompletionQueue : private GrpcLibraryCodegen {
}
}
/// Read from the queue, blocking up to \a deadline (or the queue's shutdown).
/// Both \a tag and \a ok are updated upon success (if an event is available
/// within the \a deadline). A \a tag points to an arbitrary location usually
/// employed to uniquely identify an event.
///
/// \param tag[out] Upon sucess, updated to point to the event's tag.
/// \param ok[out] Upon sucess, true if read a regular event, false otherwise.
/// \param deadline[in] How long to block in wait for an event.
///
/// \return The type of event read.
template <typename T>
NextStatus AsyncNext(void** tag, bool* ok, const T& deadline) {
TimePoint<T> deadline_tp(deadline);
return AsyncNextInternal(tag, ok, deadline_tp.raw_time());
}
/// Read from the queue, blocking until an event is available or the queue is
/// shutting down.
///
/// \param tag[out] Updated to point to the read event's tag.
/// \param ok[out] true if read a regular event, false otherwise.
///
/// \return true if read a regular event, false if the queue is shutting down.
bool Next(void** tag, bool* ok) {
return (AsyncNextInternal(tag, ok,
g_core_codegen_interface->gpr_inf_future(
GPR_CLOCK_REALTIME)) != SHUTDOWN);
}
/// Request the shutdown of the queue.
///
/// \warning This method must be called at some point if this completion queue
/// is accessed with Next or AsyncNext. Once invoked, \a Next
/// will start to return false and \a AsyncNext will return \a
/// NextStatus::SHUTDOWN. Only once either one of these methods does that
/// (that is, once the queue has been \em drained) can an instance of this
/// class be destroyed. Also note that applications must ensure that
/// no work is enqueued on this completion queue after this method is called.
/// is accessed with Next or AsyncNext. \a Next will not return false
/// until this method has been called and all pending tags have been drained.
/// (Likewise for \a AsyncNext returning \a NextStatus::SHUTDOWN .)
/// Only once either one of these methods does that (that is, once the queue
/// has been \em drained) can an instance of this class be destroyed.
/// Also note that applications must ensure that no work is enqueued on this
/// completion queue after this method is called.
void Shutdown();
/// Returns a \em raw pointer to the underlying \a grpc_completion_queue

@ -59,18 +59,22 @@ class GrpcBufferWriter : public ::grpc::protobuf::io::ZeroCopyOutputStream {
bool Next(void** data, int* size) override {
// Protobuf should not ask for more memory than total_size_.
GPR_CODEGEN_ASSERT(byte_count_ < total_size_);
size_t remain = total_size_ - byte_count_;
if (have_backup_) {
slice_ = backup_slice_;
have_backup_ = false;
if (GRPC_SLICE_LENGTH(slice_) > remain) {
GRPC_SLICE_SET_LENGTH(slice_, remain);
}
} else {
// When less than a whole block is needed, only allocate that much.
// But make sure the allocated slice is not inlined.
size_t remain = total_size_ - byte_count_ > block_size_
? block_size_
: total_size_ - byte_count_;
size_t allocate_length =
remain > static_cast<size_t>(block_size_) ? block_size_ : remain;
slice_ = g_core_codegen_interface->grpc_slice_malloc(
remain > GRPC_SLICE_INLINED_SIZE ? remain
: GRPC_SLICE_INLINED_SIZE + 1);
allocate_length > GRPC_SLICE_INLINED_SIZE
? allocate_length
: GRPC_SLICE_INLINED_SIZE + 1);
}
*data = GRPC_SLICE_START_PTR(slice_);
// On win x64, int is only 32bit

@ -151,6 +151,10 @@ class ServerContext {
/// The only exception is that if the serverhandler is already returning an
/// error status code, it is ok to not return Status::CANCELLED even if
/// TryCancel() was called.
///
/// Note that TryCancel() does not change any of the tags that are pending
/// on the completion queue. All pending tags will still be delivered
/// (though their ok result may reflect the effect of cancellation).
void TryCancel() const;
/// Return a collection of initial metadata key-value pairs sent from the
@ -185,7 +189,10 @@ class ServerContext {
/// \a set_compression_level.
bool compression_level_set() const { return compression_level_set_; }
/// Return the compression algorithm to be used by the server call.
/// Return the compression algorithm the server call will request be used.
/// Note that the gRPC runtime may decide to ignore this request, for example,
/// due to resource constraints, or if the server is aware the client doesn't
/// support the requested algorithm.
grpc_compression_algorithm compression_algorithm() const {
return compression_algorithm_;
}

@ -1,48 +0,0 @@
/*
*
* Copyright 2017 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_COMPRESSION_RUBY_H
#define GRPC_COMPRESSION_RUBY_H
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/impl/codegen/compression_types.h>
#include <grpc/slice.h>
#ifdef __cplusplus
extern "C" {
#endif
/** Parses the \a slice as a grpc_compression_algorithm instance and updating \a
* algorithm following algorithm names compatible with Ruby. Returns 1 upon
* success, 0 otherwise. */
GRPCAPI int grpc_compression_algorithm_parse_ruby(
grpc_slice value, grpc_compression_algorithm* algorithm);
/** Updates \a name with the encoding name corresponding to a valid \a
* algorithm. The \a name follows names compatible with Ruby. Note that \a name
* is statically allocated and must *not* be freed. Returns 1 upon success, 0
* otherwise. */
GRPCAPI int grpc_compression_algorithm_name_ruby(
grpc_compression_algorithm algorithm, const char** name);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_COMPRESSION_RUBY_H */

@ -160,25 +160,6 @@ GRPCAPI void grpc_completion_queue_thread_local_cache_init(
GRPCAPI int grpc_completion_queue_thread_local_cache_flush(
grpc_completion_queue* cq, void** tag, int* ok);
/** Create a completion queue alarm instance */
GRPCAPI grpc_alarm* grpc_alarm_create(void* reserved);
/** Set a completion queue alarm instance associated to \a cq.
*
* Once the alarm expires (at \a deadline) or it's cancelled (see \a
* grpc_alarm_cancel), an event with tag \a tag will be added to \a cq. If the
* alarm expired, the event's success bit will be true, false otherwise (ie,
* upon cancellation). */
GRPCAPI void grpc_alarm_set(grpc_alarm* alarm, grpc_completion_queue* cq,
gpr_timespec deadline, void* tag, void* reserved);
/** Cancel a completion queue alarm. Calling this function over an alarm that
* has already fired has no effect. */
GRPCAPI void grpc_alarm_cancel(grpc_alarm* alarm, void* reserved);
/** Destroy the given completion queue alarm, cancelling it in the process. */
GRPCAPI void grpc_alarm_destroy(grpc_alarm* alarm, void* reserved);
/** Check the connectivity state of a channel. */
GRPCAPI grpc_connectivity_state grpc_channel_check_connectivity_state(
grpc_channel* channel, int try_to_connect);

@ -55,8 +55,8 @@ extern "C" {
/** The various compression algorithms supported by gRPC */
typedef enum {
GRPC_COMPRESS_NONE = 0,
GRPC_COMPRESS_MESSAGE_DEFLATE,
GRPC_COMPRESS_MESSAGE_GZIP,
GRPC_COMPRESS_DEFLATE,
GRPC_COMPRESS_GZIP,
GRPC_COMPRESS_STREAM_GZIP,
/* TODO(ctiller): snappy */
GRPC_COMPRESS_ALGORITHMS_COUNT

@ -239,6 +239,9 @@ typedef struct {
/** The time between the first and second connection attempts, in ms */
#define GRPC_ARG_INITIAL_RECONNECT_BACKOFF_MS \
"grpc.initial_reconnect_backoff_ms"
/** Minimum amount of time between DNS resolutions, in ms */
#define GRPC_ARG_DNS_MIN_TIME_BETWEEN_RESOLUTIONS_MS \
"grpc.dns_min_time_between_resolutions_ms"
/** The timeout used on servers for finishing handshaking on an incoming
connection. Defaults to 120 seconds. */
#define GRPC_ARG_SERVER_HANDSHAKE_TIMEOUT_MS "grpc.server_handshake_timeout_ms"

@ -7,7 +7,6 @@ framework module grpc {
header "support/avl.h"
header "support/cmdline.h"
header "support/cpu.h"
header "support/host_port.h"
header "support/log.h"
header "support/log_windows.h"
header "support/port_platform.h"
@ -44,7 +43,6 @@ framework module grpc {
header "byte_buffer.h"
header "byte_buffer_reader.h"
header "compression.h"
header "compression_ruby.h"
header "fork.h"
header "grpc.h"
header "grpc_posix.h"

@ -59,7 +59,6 @@
<file baseinstalldir="/" name="include/grpc/support/avl.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/cmdline.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/cpu.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/host_port.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/log.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/log_windows.h" role="src" />
<file baseinstalldir="/" name="include/grpc/support/port_platform.h" role="src" />
@ -89,6 +88,7 @@
<file baseinstalldir="/" name="src/core/lib/gpr/arena.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gpr/env.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gpr/fork.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gpr/host_port.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gpr/mpscq.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gpr/murmur_hash.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gpr/spinlock.h" role="src" />
@ -177,7 +177,6 @@
<file baseinstalldir="/" name="include/grpc/byte_buffer.h" role="src" />
<file baseinstalldir="/" name="include/grpc/byte_buffer_reader.h" role="src" />
<file baseinstalldir="/" name="include/grpc/compression.h" role="src" />
<file baseinstalldir="/" name="include/grpc/compression_ruby.h" role="src" />
<file baseinstalldir="/" name="include/grpc/fork.h" role="src" />
<file baseinstalldir="/" name="include/grpc/grpc.h" role="src" />
<file baseinstalldir="/" name="include/grpc/grpc_posix.h" role="src" />
@ -231,8 +230,8 @@
<file baseinstalldir="/" name="src/core/lib/security/transport/security_handshaker.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/security/transport/tsi_error.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/security/util/json_util.h" role="src" />
<file baseinstalldir="/" name="src/core/tsi/alts_transport_security.h" role="src" />
<file baseinstalldir="/" name="src/core/tsi/fake_transport_security.h" role="src" />
<file baseinstalldir="/" name="src/core/tsi/gts_transport_security.h" role="src" />
<file baseinstalldir="/" name="src/core/tsi/ssl_transport_security.h" role="src" />
<file baseinstalldir="/" name="src/core/tsi/ssl_types.h" role="src" />
<file baseinstalldir="/" name="src/core/tsi/transport_security_grpc.h" role="src" />
@ -359,7 +358,6 @@
<file baseinstalldir="/" name="src/core/lib/slice/slice_hash_table.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/slice/slice_internal.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/slice/slice_string_helpers.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/alarm_internal.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/api_trace.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/call.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/call_test_only.h" role="src" />
@ -419,7 +417,6 @@
<file baseinstalldir="/" name="src/core/lib/channel/handshaker_registry.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/compression/compression.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/compression/compression_internal.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/compression/compression_ruby.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/compression/message_compress.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/compression/stream_compression.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/compression/stream_compression_gzip.cc" role="src" />
@ -512,7 +509,6 @@
<file baseinstalldir="/" name="src/core/lib/slice/slice_hash_table.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/slice/slice_intern.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/slice/slice_string_helpers.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/alarm.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/api_trace.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/byte_buffer.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/byte_buffer_reader.cc" role="src" />
@ -597,8 +593,8 @@
<file baseinstalldir="/" name="src/core/lib/security/transport/tsi_error.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/security/util/json_util.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/surface/init_secure.cc" role="src" />
<file baseinstalldir="/" name="src/core/tsi/alts_transport_security.cc" role="src" />
<file baseinstalldir="/" name="src/core/tsi/fake_transport_security.cc" role="src" />
<file baseinstalldir="/" name="src/core/tsi/gts_transport_security.cc" role="src" />
<file baseinstalldir="/" name="src/core/tsi/ssl_transport_security.cc" role="src" />
<file baseinstalldir="/" name="src/core/tsi/transport_security_grpc.cc" role="src" />
<file baseinstalldir="/" name="src/core/tsi/transport_security.cc" role="src" />
@ -661,31 +657,35 @@
<file baseinstalldir="/" name="src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc" role="src" />
<file baseinstalldir="/" name="src/core/ext/filters/workarounds/workaround_utils.cc" role="src" />
<file baseinstalldir="/" name="src/core/plugin_registry/grpc_plugin_registry.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/aes/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/asn1_locl.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bio/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/rsaz_exp.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bytestring/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher_extra/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/conf/conf_def.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/conf/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/curve25519/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/des/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/digest/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/digest/md32_common.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ec/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ec/p256-x86_64-table.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ec/p256-x86_64.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/err/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/evp/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/fipsmodule/aes/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/fipsmodule/bn/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/fipsmodule/bn/rsaz_exp.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/fipsmodule/cipher/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/fipsmodule/delocate.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/fipsmodule/des/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/fipsmodule/digest/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/fipsmodule/digest/md32_common.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/fipsmodule/ec/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/fipsmodule/ec/p256-x86_64-table.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/fipsmodule/ec/p256-x86_64.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/fipsmodule/modes/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/fipsmodule/rand/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/fipsmodule/rsa/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/modes/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/obj/obj_dat.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/pkcs7/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/pkcs8/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/poly1305/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/pool/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/rand/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/rsa/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/charmap.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/internal.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/vpm_int.h" role="src" />
@ -728,6 +728,7 @@
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/ex_data.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/hkdf.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/hmac.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/is_boringssl.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/lhash.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/lhash_macros.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/md4.h" role="src" />
@ -752,11 +753,11 @@
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/rsa.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/safestack.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/sha.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/span.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/srtp.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/ssl.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/ssl3.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/stack.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/stack_macros.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/thread.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/tls1.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/type_check.h" role="src" />
@ -765,9 +766,6 @@
<file baseinstalldir="/" name="third_party/boringssl/include/openssl/x509v3.h" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/internal.h" role="src" />
<file baseinstalldir="/" name="src/boringssl/err_data.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/aes/aes.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/aes/key_wrap.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/aes/mode_wrappers.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/a_bitstr.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/a_bool.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/a_d2i_fp.c" role="src" />
@ -791,7 +789,6 @@
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/f_enum.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/f_int.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/f_string.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/t_bitst.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/tasn_dec.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/tasn_enc.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/tasn_fre.c" role="src" />
@ -799,8 +796,6 @@
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/tasn_typ.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/tasn_utl.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/time_support.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/x_bignum.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/asn1/x_long.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/base64/base64.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bio/bio.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bio/bio_mem.c" role="src" />
@ -812,44 +807,25 @@
<file baseinstalldir="/" name="third_party/boringssl/crypto/bio/printf.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bio/socket.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bio/socket_helper.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/add.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/asm/x86_64-gcc.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/bn.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/bn_asn1.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/cmp.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/convert.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/ctx.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/div.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/exponentiation.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/gcd.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/generic.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/kronecker.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/montgomery.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/montgomery_inv.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/mul.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/prime.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/random.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/rsaz_exp.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/shift.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn/sqrt.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn_extra/bn_asn1.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bn_extra/convert.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/buf/buf.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bytestring/asn1_compat.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bytestring/ber.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bytestring/cbb.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/bytestring/cbs.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/chacha/chacha.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher/aead.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher/cipher.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher/derive_key.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher/e_aes.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher/e_chacha20poly1305.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher/e_des.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher/e_null.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher/e_rc2.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher/e_rc4.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher/e_ssl3.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher/e_tls.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher/tls_cbc.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher_extra/cipher_extra.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher_extra/derive_key.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher_extra/e_aesctrhmac.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher_extra/e_aesgcmsiv.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher_extra/e_chacha20poly1305.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher_extra/e_null.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher_extra/e_rc2.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher_extra/e_rc4.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher_extra/e_ssl3.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher_extra/e_tls.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cipher_extra/tls_cbc.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cmac/cmac.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/conf/conf.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/cpu-aarch64-linux.c" role="src" />
@ -861,29 +837,16 @@
<file baseinstalldir="/" name="third_party/boringssl/crypto/curve25519/curve25519.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/curve25519/spake25519.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/curve25519/x25519-x86_64.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/des/des.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/dh/check.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/dh/dh.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/dh/dh_asn1.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/dh/params.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/digest/digest.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/digest/digests.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/digest_extra/digest_extra.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/dsa/dsa.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/dsa/dsa_asn1.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ec/ec.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ec/ec_asn1.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ec/ec_key.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ec/ec_montgomery.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ec/oct.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ec/p224-64.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ec/p256-64.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ec/p256-x86_64.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ec/simple.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ec/util-64.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ec/wnaf.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ec_extra/ec_asn1.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ecdh/ecdh.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ecdsa/ecdsa.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ecdsa/ecdsa_asn1.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ecdsa_extra/ecdsa_asn1.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/engine/engine.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/err/err.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/evp/digestsign.c" role="src" />
@ -893,24 +856,20 @@
<file baseinstalldir="/" name="third_party/boringssl/crypto/evp/p_dsa_asn1.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/evp/p_ec.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/evp/p_ec_asn1.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/evp/p_ed25519.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/evp/p_ed25519_asn1.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/evp/p_rsa.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/evp/p_rsa_asn1.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/evp/pbkdf.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/evp/print.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/evp/scrypt.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/evp/sign.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/ex_data.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/fipsmodule/bcm.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/fipsmodule/is_fips.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/hkdf/hkdf.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/hmac/hmac.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/lhash/lhash.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/md4/md4.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/md5/md5.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/mem.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/modes/cbc.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/modes/cfb.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/modes/ctr.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/modes/gcm.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/modes/ofb.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/modes/polyval.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/obj/obj.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/obj/obj_xref.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/pem/pem_all.c" role="src" />
@ -921,30 +880,24 @@
<file baseinstalldir="/" name="third_party/boringssl/crypto/pem/pem_pkey.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/pem/pem_x509.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/pem/pem_xaux.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/pkcs7/pkcs7.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/pkcs7/pkcs7_x509.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/pkcs8/p5_pbev2.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/pkcs8/p8_pkey.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/pkcs8/pkcs8.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/pkcs8/pkcs8_x509.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/poly1305/poly1305.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/poly1305/poly1305_arm.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/poly1305/poly1305_vec.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/pool/pool.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/rand/deterministic.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/rand/fuchsia.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/rand/rand.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/rand/urandom.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/rand/windows.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/rand_extra/deterministic.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/rand_extra/forkunsafe.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/rand_extra/fuchsia.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/rand_extra/rand_extra.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/rand_extra/windows.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/rc4/rc4.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/refcount_c11.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/refcount_lock.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/rsa/blinding.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/rsa/padding.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/rsa/rsa.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/rsa/rsa_asn1.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/rsa/rsa_impl.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/sha/sha1-altivec.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/sha/sha1.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/sha/sha256.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/sha/sha512.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/rsa_extra/rsa_asn1.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/stack/stack.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/thread.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/thread_none.c" role="src" />
@ -959,7 +912,6 @@
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/by_dir.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/by_file.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/i2d_pr.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/pkcs7.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/rsa_pss.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/t_crl.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/t_req.c" role="src" />
@ -985,7 +937,6 @@
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x509name.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x509rset.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x509spki.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x509type.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x_algor.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x_all.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509/x_attrib.c" role="src" />
@ -1033,41 +984,42 @@
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/v3_skey.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/v3_sxnet.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/crypto/x509v3/v3_utl.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/bio_ssl.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/custom_extensions.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/d1_both.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/d1_lib.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/d1_pkt.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/d1_srtp.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/dtls_method.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/dtls_record.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/handshake_client.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/handshake_server.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/s3_both.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/s3_lib.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/s3_pkt.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_aead_ctx.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_asn1.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_buffer.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_cert.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_cipher.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_ecdh.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_file.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_lib.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_privkey.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_privkey_cc.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_session.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_stat.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_transcript.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_x509.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/t1_enc.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/t1_lib.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/tls13_both.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/tls13_client.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/tls13_enc.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/tls13_server.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/tls_method.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/tls_record.c" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/bio_ssl.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/custom_extensions.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/d1_both.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/d1_lib.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/d1_pkt.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/d1_srtp.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/dtls_method.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/dtls_record.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/handshake.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/handshake_client.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/handshake_server.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/s3_both.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/s3_lib.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/s3_pkt.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_aead_ctx.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_asn1.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_buffer.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_cert.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_cipher.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_file.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_key_share.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_lib.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_privkey.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_session.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_stat.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_transcript.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_versions.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/ssl_x509.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/t1_enc.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/t1_lib.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/tls13_both.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/tls13_client.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/tls13_enc.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/tls13_server.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/tls_method.cc" role="src" />
<file baseinstalldir="/" name="third_party/boringssl/ssl/tls_record.cc" role="src" />
<file baseinstalldir="/" name="third_party/zlib/crc32.h" role="src" />
<file baseinstalldir="/" name="third_party/zlib/deflate.h" role="src" />
<file baseinstalldir="/" name="third_party/zlib/gzguts.h" role="src" />

@ -1,6 +1,6 @@
# GRPC Python setup requirements
coverage>=4.0
cython>=0.23
cython>=0.27
enum34>=1.0.4
futures>=2.2.0
protobuf>=3.5.0.post1

@ -165,7 +165,8 @@ if "win32" in sys.platform:
# TODO(zyc): Re-enble c-ares on x64 and x86 windows after fixing the
# ares_library_init compilation issue
DEFINE_MACROS += (('WIN32_LEAN_AND_MEAN', 1), ('CARES_STATICLIB', 1),
('GRPC_ARES', 0), ('NTDDI_VERSION', 0x06000000),)
('GRPC_ARES', 0), ('NTDDI_VERSION', 0x06000000),
('NOMINMAX', 1),)
if '64bit' in platform.architecture()[0]:
DEFINE_MACROS += (('MS_WIN64', 1),)
elif sys.version_info >= (3, 5):

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

@ -48,6 +48,7 @@ class Grpc(object):
yaml = None
def WriteFiles(self, files, asm_outputs):
self.yaml = {
'#': 'generated with tools/buildgen/gen_boring_ssl_build_yaml.py',
'raw_boringssl_build_output_for_debugging': {
@ -98,7 +99,7 @@ class Grpc(object):
'boringssl',
]
}
for test in sorted(files['test'])
for test in list(sorted(set(files['ssl_test'] + files['crypto_test'])))
],
'targets': [
{
@ -107,7 +108,7 @@ class Grpc(object):
'run': False,
'secure': 'no',
'language': 'c++',
'src': [],
'src': ["third_party/boringssl/crypto/test/gtest_main.cc"],
'vs_proj_dir': 'test/boringssl',
'boringssl': True,
'defaults': 'boringssl',
@ -117,23 +118,25 @@ class Grpc(object):
'boringssl',
]
}
for test in sorted(files['test'])
for test in list(sorted(set(files['ssl_test'] + files['crypto_test'])))
],
'tests': [
{
'name': 'boringssl_%s' % os.path.basename(test[0]),
'args': [map_testarg(arg) for arg in test[1:]],
'name': 'boringssl_%s' % os.path.splitext(os.path.basename(test))[0],
'args': [],
'exclude_configs': ['asan', 'ubsan'],
'ci_platforms': ['linux', 'mac', 'posix', 'windows'],
'platforms': ['linux', 'mac', 'posix', 'windows'],
'flaky': False,
'gtest': True,
'language': 'c++',
'boringssl': True,
'defaults': 'boringssl',
'cpu_cost': 1.0
}
for test in files['tests']
for test in list(sorted(set(files['ssl_test'] + files['crypto_test'])))
]
}

@ -64,16 +64,15 @@ T* array_end(T (&array)[N]) {
void PrintIncludes(grpc_generator::Printer* printer,
const std::vector<grpc::string>& headers,
const Parameters& params) {
bool use_system_headers, const grpc::string& search_path) {
std::map<grpc::string, grpc::string> vars;
vars["l"] = params.use_system_headers ? '<' : '"';
vars["r"] = params.use_system_headers ? '>' : '"';
vars["l"] = use_system_headers ? '<' : '"';
vars["r"] = use_system_headers ? '>' : '"';
auto& s = params.grpc_search_path;
if (!s.empty()) {
vars["l"] += s;
if (s[s.size() - 1] != '/') {
if (!search_path.empty()) {
vars["l"] += search_path;
if (search_path[search_path.size() - 1] != '/') {
vars["l"] += '/';
}
}
@ -124,6 +123,10 @@ grpc::string GetHeaderIncludes(grpc_generator::File* file,
auto printer = file->CreatePrinter(&output);
std::map<grpc::string, grpc::string> vars;
if (!params.additional_header_includes.empty()) {
PrintIncludes(printer.get(), params.additional_header_includes, false,
"");
}
static const char* headers_strs[] = {
"grpc++/impl/codegen/async_stream.h",
"grpc++/impl/codegen/async_unary_call.h",
@ -135,7 +138,8 @@ grpc::string GetHeaderIncludes(grpc_generator::File* file,
"grpc++/impl/codegen/stub_options.h",
"grpc++/impl/codegen/sync_stream.h"};
std::vector<grpc::string> headers(headers_strs, array_end(headers_strs));
PrintIncludes(printer.get(), headers, params);
PrintIncludes(printer.get(), headers, params.use_system_headers,
params.grpc_search_path);
printer->Print(vars, "\n");
printer->Print(vars, "namespace grpc {\n");
printer->Print(vars, "class CompletionQueue;\n");
@ -1153,7 +1157,8 @@ grpc::string GetSourceIncludes(grpc_generator::File* file,
"grpc++/impl/codegen/service_type.h",
"grpc++/impl/codegen/sync_stream.h"};
std::vector<grpc::string> headers(headers_strs, array_end(headers_strs));
PrintIncludes(printer.get(), headers, params);
PrintIncludes(printer.get(), headers, params.use_system_headers,
params.grpc_search_path);
if (!file->package().empty()) {
std::vector<grpc::string> parts = file->package_parts();
@ -1570,20 +1575,19 @@ grpc::string GetMockIncludes(grpc_generator::File* file,
"grpc++/impl/codegen/sync_stream.h",
};
std::vector<grpc::string> headers(headers_strs, array_end(headers_strs));
PrintIncludes(printer.get(), headers, params);
PrintIncludes(printer.get(), headers, params.use_system_headers,
params.grpc_search_path);
std::vector<grpc::string> gmock_header;
if (params.gmock_search_path.empty()) {
gmock_header.push_back("gmock/gmock.h");
PrintIncludes(printer.get(), gmock_header, params);
PrintIncludes(printer.get(), gmock_header, params.use_system_headers,
params.grpc_search_path);
} else {
gmock_header.push_back("gmock.h");
// Copy a params to generate gmock header.
Parameters gmock_params(params);
// We use local includes when a gmock_search_path is given
gmock_params.use_system_headers = false;
gmock_params.grpc_search_path = params.gmock_search_path;
PrintIncludes(printer.get(), gmock_header, gmock_params);
PrintIncludes(printer.get(), gmock_header, false,
params.gmock_search_path);
}
if (!file->package().empty()) {

@ -54,6 +54,8 @@ struct Parameters {
bool generate_mock_code;
// Google Mock search path, when non-empty, local includes will be used.
grpc::string gmock_search_path;
// *EXPERIMENTAL* Additional include files in grpc.pb.h
std::vector<grpc::string> additional_header_includes;
};
// Return the prologue of the generated header file.

@ -80,6 +80,9 @@ class CppGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
}
} else if (param[0] == "gmock_search_path") {
generator_parameters.gmock_search_path = param[1];
} else if (param[0] == "additional_header_includes") {
generator_parameters.additional_header_includes =
grpc_generator::tokenize(param[1], ":");
} else {
*error = grpc::string("Unknown parameter: ") + *parameter_string;
return false;

@ -1095,6 +1095,7 @@ static void pick_callback_done_locked(void* arg, grpc_error* error) {
chand, calld);
}
async_pick_done_locked(elem, GRPC_ERROR_REF(error));
GRPC_CALL_STACK_UNREF(calld->owning_call, "pick_callback");
}
// Takes a ref to chand->lb_policy and calls grpc_lb_policy_pick_locked().
@ -1134,6 +1135,7 @@ static bool pick_callback_start_locked(grpc_call_element* elem) {
GRPC_CLOSURE_INIT(&calld->lb_pick_closure, pick_callback_done_locked, elem,
grpc_combiner_scheduler(chand->combiner));
calld->pick.on_complete = &calld->lb_pick_closure;
GRPC_CALL_STACK_REF(calld->owning_call, "pick_callback");
const bool pick_done =
grpc_lb_policy_pick_locked(chand->lb_policy, &calld->pick);
if (pick_done) {
@ -1142,6 +1144,7 @@ static bool pick_callback_start_locked(grpc_call_element* elem) {
gpr_log(GPR_DEBUG, "chand=%p calld=%p: pick completed synchronously",
chand, calld);
}
GRPC_CALL_STACK_UNREF(calld->owning_call, "pick_callback");
} else {
GRPC_CALL_STACK_REF(calld->owning_call, "pick_callback_cancel");
grpc_call_combiner_set_notify_on_cancel(
@ -1333,12 +1336,12 @@ static void on_complete(void* arg, grpc_error* error) {
static void cc_start_transport_stream_op_batch(
grpc_call_element* elem, grpc_transport_stream_op_batch* batch) {
GPR_TIMER_SCOPE("cc_start_transport_stream_op_batch", 0);
call_data* calld = (call_data*)elem->call_data;
channel_data* chand = (channel_data*)elem->channel_data;
if (chand->deadline_checking_enabled) {
grpc_deadline_state_client_start_transport_stream_op_batch(elem, batch);
}
GPR_TIMER_BEGIN("cc_start_transport_stream_op_batch", 0);
// If we've previously been cancelled, immediately fail any new batches.
if (calld->error != GRPC_ERROR_NONE) {
if (grpc_client_channel_trace.enabled()) {
@ -1347,7 +1350,7 @@ static void cc_start_transport_stream_op_batch(
}
grpc_transport_stream_op_batch_finish_with_failure(
batch, GRPC_ERROR_REF(calld->error), calld->call_combiner);
goto done;
return;
}
if (batch->cancel_stream) {
// Stash a copy of cancel_error in our call data, so that we can use
@ -1369,7 +1372,7 @@ static void cc_start_transport_stream_op_batch(
waiting_for_pick_batches_add(calld, batch);
waiting_for_pick_batches_fail(elem, GRPC_ERROR_REF(calld->error));
}
goto done;
return;
}
// Intercept on_complete for recv_trailing_metadata so that we can
// check retry throttle status.
@ -1391,7 +1394,7 @@ static void cc_start_transport_stream_op_batch(
calld, calld->subchannel_call);
}
grpc_subchannel_call_process_op(calld->subchannel_call, batch);
goto done;
return;
}
// We do not yet have a subchannel call.
// Add the batch to the waiting-for-pick list.
@ -1417,8 +1420,6 @@ static void cc_start_transport_stream_op_batch(
GRPC_CALL_COMBINER_STOP(calld->call_combiner,
"batch does not include send_initial_metadata");
}
done:
GPR_TIMER_END("cc_start_transport_stream_op_batch", 0);
}
/* Constructor for call_data */

@ -22,7 +22,6 @@
#include <string.h>
#include <grpc/support/alloc.h>
#include <grpc/support/host_port.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
@ -31,6 +30,7 @@
#include "src/core/ext/filters/client_channel/uri_parser.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gpr/env.h"
#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/slice/b64.h"

@ -98,7 +98,7 @@ static void destroy_call_elem(grpc_call_element* elem,
static void start_transport_stream_op_batch(
grpc_call_element* elem, grpc_transport_stream_op_batch* batch) {
call_data* calld = (call_data*)elem->call_data;
GPR_TIMER_BEGIN("clr_start_transport_stream_op_batch", 0);
GPR_TIMER_SCOPE("clr_start_transport_stream_op_batch", 0);
if (calld->client_stats != nullptr) {
// Intercept send_initial_metadata.
if (batch->send_initial_metadata) {
@ -120,7 +120,6 @@ static void start_transport_stream_op_batch(
}
// Chain to next filter.
grpc_call_next_op(elem, batch);
GPR_TIMER_END("clr_start_transport_stream_op_batch", 0);
}
const grpc_channel_filter grpc_client_load_reporting_filter = {

@ -87,7 +87,6 @@
#include <grpc/byte_buffer_reader.h>
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include <grpc/support/host_port.h>
#include <grpc/support/string_util.h>
#include <grpc/support/time.h>
@ -106,6 +105,7 @@
#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/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gprpp/manual_constructor.h"
#include "src/core/lib/iomgr/combiner.h"

@ -328,18 +328,11 @@ static void update_lb_connectivity_status_locked(grpc_lb_subchannel_data* sd,
* 2) RULE: ANY subchannel is CONNECTING => policy is CONNECTING.
* CHECK: sd->curr_connectivity_state == CONNECTING.
*
* 3) RULE: ALL subchannels are SHUTDOWN => policy is IDLE (and requests
* re-resolution).
* CHECK: subchannel_list->num_shutdown ==
* subchannel_list->num_subchannels.
*
* 4) RULE: ALL subchannels are SHUTDOWN or TRANSIENT_FAILURE => policy is
* TRANSIENT_FAILURE.
* CHECK: subchannel_list->num_shutdown +
* subchannel_list->num_transient_failures ==
* 3) RULE: ALL subchannels are TRANSIENT_FAILURE => policy is
* TRANSIENT_FAILURE.
* CHECK: subchannel_list->num_transient_failures ==
* subchannel_list->num_subchannels.
*/
// TODO(juanlishen): For rule 4, we may want to re-resolve instead.
grpc_lb_subchannel_list* subchannel_list = sd->subchannel_list;
round_robin_lb_policy* p = (round_robin_lb_policy*)subchannel_list->policy;
GPR_ASSERT(sd->curr_connectivity_state != GRPC_CHANNEL_IDLE);
@ -351,22 +344,12 @@ static void update_lb_connectivity_status_locked(grpc_lb_subchannel_data* sd,
/* 2) CONNECTING */
grpc_connectivity_state_set(&p->state_tracker, GRPC_CHANNEL_CONNECTING,
GRPC_ERROR_NONE, "rr_connecting");
} else if (subchannel_list->num_shutdown ==
} else if (subchannel_list->num_transient_failures ==
subchannel_list->num_subchannels) {
/* 3) IDLE and re-resolve */
grpc_connectivity_state_set(&p->state_tracker, GRPC_CHANNEL_IDLE,
GRPC_ERROR_NONE,
"rr_exhausted_subchannels+reresolve");
p->started_picking = false;
grpc_lb_policy_try_reresolve(&p->base, &grpc_lb_round_robin_trace,
GRPC_ERROR_NONE);
} else if (subchannel_list->num_shutdown +
subchannel_list->num_transient_failures ==
subchannel_list->num_subchannels) {
/* 4) TRANSIENT_FAILURE */
grpc_connectivity_state_set(&p->state_tracker,
GRPC_CHANNEL_TRANSIENT_FAILURE,
GRPC_ERROR_REF(error), "rr_transient_failure");
/* 3) TRANSIENT_FAILURE */
grpc_connectivity_state_set(
&p->state_tracker, GRPC_CHANNEL_TRANSIENT_FAILURE,
GRPC_ERROR_REF(error), "rr_exhausted_subchannels");
}
GRPC_ERROR_UNREF(error);
}
@ -387,6 +370,7 @@ static void rr_connectivity_changed_locked(void* arg, grpc_error* error) {
p->shutdown, sd->subchannel_list->shutting_down,
grpc_error_string(error));
}
GPR_ASSERT(sd->subchannel != nullptr);
// If the policy is shutting down, unref and return.
if (p->shutdown) {
grpc_lb_subchannel_data_stop_connectivity_watch(sd);
@ -412,14 +396,19 @@ static void rr_connectivity_changed_locked(void* arg, grpc_error* error) {
// state (which was set by the connectivity state watcher) to
// curr_connectivity_state, which is what we use inside of the combiner.
sd->curr_connectivity_state = sd->pending_connectivity_state_unsafe;
// Update state counters and new overall state.
update_state_counters_locked(sd);
update_lb_connectivity_status_locked(sd, GRPC_ERROR_REF(error));
// If the sd's new state is TRANSIENT_FAILURE, unref the *connected*
// subchannel, if any.
switch (sd->curr_connectivity_state) {
case GRPC_CHANNEL_TRANSIENT_FAILURE: {
sd->connected_subchannel.reset();
if (grpc_lb_round_robin_trace.enabled()) {
gpr_log(GPR_DEBUG,
"[RR %p] Subchannel %p has gone into TRANSIENT_FAILURE. "
"Requesting re-resolution",
p, sd->subchannel);
}
grpc_lb_policy_try_reresolve(&p->base, &grpc_lb_round_robin_trace,
GRPC_ERROR_NONE);
break;
}
case GRPC_CHANNEL_READY: {
@ -442,8 +431,8 @@ static void rr_connectivity_changed_locked(void* arg, grpc_error* error) {
gpr_log(GPR_DEBUG,
"[RR %p] phasing out subchannel list %p (size %lu) in favor "
"of %p (size %lu)",
(void*)p, (void*)p->subchannel_list, num_subchannels,
(void*)sd->subchannel_list, num_subchannels);
p, p->subchannel_list, num_subchannels, sd->subchannel_list,
num_subchannels);
}
if (p->subchannel_list != nullptr) {
// dispose of the current subchannel_list
@ -455,7 +444,8 @@ static void rr_connectivity_changed_locked(void* arg, grpc_error* error) {
}
/* at this point we know there's at least one suitable subchannel. Go
* ahead and pick one and notify the pending suitors in
* p->pending_picks. This preemptively replicates rr_pick()'s actions. */
* p->pending_picks. This preemptively replicates rr_pick()'s actions.
*/
const size_t next_ready_index = get_next_ready_subchannel_index_locked(p);
GPR_ASSERT(next_ready_index < p->subchannel_list->num_subchannels);
grpc_lb_subchannel_data* selected =
@ -488,6 +478,12 @@ static void rr_connectivity_changed_locked(void* arg, grpc_error* error) {
case GRPC_CHANNEL_CONNECTING:
case GRPC_CHANNEL_IDLE:; // fallthrough
}
// Update state counters and new overall state.
update_state_counters_locked(sd);
// Only update connectivity based on the selected subchannel list.
if (sd->subchannel_list == p->subchannel_list) {
update_lb_connectivity_status_locked(sd, GRPC_ERROR_REF(error));
}
// Renew notification.
grpc_lb_subchannel_data_start_connectivity_watch(sd);
}
@ -562,6 +558,30 @@ static void rr_update_locked(grpc_lb_policy* policy,
return;
}
if (p->started_picking) {
for (size_t i = 0; i < subchannel_list->num_subchannels; ++i) {
const grpc_connectivity_state subchannel_state =
grpc_subchannel_check_connectivity(
subchannel_list->subchannels[i].subchannel, nullptr);
// Override the default setting of IDLE for connectivity notification
// purposes if the subchannel is already in transient failure. Otherwise
// we'd be immediately notified of the IDLE-TRANSIENT_FAILURE
// discrepancy, attempt to re-resolve and end up here again.
// TODO(roth): As part of C++-ifying the subchannel_list API, design a
// better API for notifying the LB policy of subchannel states, which can
// be used both for the subchannel's initial state and for subsequent
// state changes. This will allow us to handle this more generally instead
// of special-casing TRANSIENT_FAILURE (e.g., we can also distribute any
// pending picks across all READY subchannels rather than sending them all
// to the first one).
if (subchannel_state == GRPC_CHANNEL_TRANSIENT_FAILURE) {
subchannel_list->subchannels[i].pending_connectivity_state_unsafe =
subchannel_list->subchannels[i].curr_connectivity_state =
subchannel_list->subchannels[i].prev_connectivity_state =
subchannel_state;
--subchannel_list->num_idle;
++subchannel_list->num_transient_failures;
}
}
if (p->latest_pending_subchannel_list != nullptr) {
if (grpc_lb_round_robin_trace.enabled()) {
gpr_log(GPR_DEBUG,

@ -54,13 +54,15 @@ void grpc_lb_subchannel_data_unref_subchannel(grpc_lb_subchannel_data* sd,
void grpc_lb_subchannel_data_start_connectivity_watch(
grpc_lb_subchannel_data* sd) {
if (sd->subchannel_list->tracer->enabled()) {
gpr_log(GPR_DEBUG,
"[%s %p] subchannel list %p index %" PRIuPTR " of %" PRIuPTR
" (subchannel %p): requesting connectivity change notification",
sd->subchannel_list->tracer->name(), sd->subchannel_list->policy,
sd->subchannel_list,
(size_t)(sd - sd->subchannel_list->subchannels),
sd->subchannel_list->num_subchannels, sd->subchannel);
gpr_log(
GPR_DEBUG,
"[%s %p] subchannel list %p index %" PRIuPTR " of %" PRIuPTR
" (subchannel %p): requesting connectivity change "
"notification (from %s)",
sd->subchannel_list->tracer->name(), sd->subchannel_list->policy,
sd->subchannel_list, (size_t)(sd - sd->subchannel_list->subchannels),
sd->subchannel_list->num_subchannels, sd->subchannel,
grpc_connectivity_state_name(sd->pending_connectivity_state_unsafe));
}
sd->connectivity_notification_pending = true;
grpc_subchannel_notify_on_state_change(

@ -101,8 +101,6 @@ struct grpc_lb_subchannel_list {
size_t num_ready;
/** how many subchannels are in state TRANSIENT_FAILURE */
size_t num_transient_failures;
/** how many subchannels are in state SHUTDOWN */
size_t num_shutdown;
/** how many subchannels are in state IDLE */
size_t num_idle;

@ -26,9 +26,10 @@
#endif
#include <grpc/support/alloc.h>
#include <grpc/support/host_port.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#ifdef GRPC_HAVE_UNIX_SOCKET

@ -25,7 +25,6 @@
#include <unistd.h>
#include <grpc/support/alloc.h>
#include <grpc/support/host_port.h>
#include <grpc/support/string_util.h>
#include "src/core/ext/filters/client_channel/http_connect_handshaker.h"
@ -35,6 +34,7 @@
#include "src/core/lib/backoff/backoff.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gpr/env.h"
#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gprpp/manual_constructor.h"
#include "src/core/lib/iomgr/combiner.h"
@ -66,8 +66,8 @@ typedef struct {
grpc_pollset_set* interested_parties;
/** Closures used by the combiner */
grpc_closure dns_ares_on_retry_timer_locked;
grpc_closure dns_ares_on_resolved_locked;
grpc_closure dns_ares_on_next_resolution_timer_closure;
grpc_closure dns_ares_on_resolved_closure;
/** Combiner guarding the rest of the state */
grpc_combiner* combiner;
@ -85,12 +85,15 @@ typedef struct {
grpc_channel_args** target_result;
/** current (fully resolved) result */
grpc_channel_args* resolved_result;
/** retry timer */
bool have_retry_timer;
grpc_timer retry_timer;
/** next resolution timer */
bool have_next_resolution_timer;
grpc_timer next_resolution_timer;
/** retry backoff state */
grpc_core::ManualConstructor<grpc_core::BackOff> backoff;
/** min resolution period. Max one resolution will happen per period */
grpc_millis min_time_between_resolutions;
/** when was the last resolution? -1 if no resolution has happened yet */
grpc_millis last_resolution_timestamp;
/** currently resolving addresses */
grpc_lb_addresses* lb_addresses;
/** currently resolving service config */
@ -100,6 +103,7 @@ typedef struct {
static void dns_ares_destroy(grpc_resolver* r);
static void dns_ares_start_resolving_locked(ares_dns_resolver* r);
static void dns_ares_maybe_start_resolving_locked(ares_dns_resolver* r);
static void dns_ares_maybe_finish_next_locked(ares_dns_resolver* r);
static void dns_ares_shutdown_locked(grpc_resolver* r);
@ -114,8 +118,8 @@ static const grpc_resolver_vtable dns_ares_resolver_vtable = {
static void dns_ares_shutdown_locked(grpc_resolver* resolver) {
ares_dns_resolver* r = (ares_dns_resolver*)resolver;
if (r->have_retry_timer) {
grpc_timer_cancel(&r->retry_timer);
if (r->have_next_resolution_timer) {
grpc_timer_cancel(&r->next_resolution_timer);
}
if (r->pending_request != nullptr) {
grpc_cancel_ares_request(r->pending_request);
@ -131,20 +135,20 @@ static void dns_ares_shutdown_locked(grpc_resolver* resolver) {
static void dns_ares_channel_saw_error_locked(grpc_resolver* resolver) {
ares_dns_resolver* r = (ares_dns_resolver*)resolver;
if (!r->resolving) {
r->backoff->Reset();
dns_ares_start_resolving_locked(r);
dns_ares_maybe_start_resolving_locked(r);
}
}
static void dns_ares_on_retry_timer_locked(void* arg, grpc_error* error) {
static void dns_ares_on_next_resolution_timer_locked(void* arg,
grpc_error* error) {
ares_dns_resolver* r = (ares_dns_resolver*)arg;
r->have_retry_timer = false;
r->have_next_resolution_timer = false;
if (error == GRPC_ERROR_NONE) {
if (!r->resolving) {
dns_ares_start_resolving_locked(r);
}
}
GRPC_RESOLVER_UNREF(&r->base, "retry-timer");
GRPC_RESOLVER_UNREF(&r->base, "next_resolution_timer");
}
static bool value_in_json_array(grpc_json* array, const char* value) {
@ -261,6 +265,9 @@ static void dns_ares_on_resolved_locked(void* arg, grpc_error* error) {
if (service_config != nullptr) grpc_service_config_destroy(service_config);
gpr_free(service_config_string);
grpc_lb_addresses_destroy(r->lb_addresses);
// Reset backoff state so that we start from the beginning when the
// next request gets triggered.
r->backoff->Reset();
} else {
const char* msg = grpc_error_string(error);
gpr_log(GPR_DEBUG, "dns resolution failed: %s", msg);
@ -268,21 +275,22 @@ static void dns_ares_on_resolved_locked(void* arg, grpc_error* error) {
grpc_millis timeout = next_try - grpc_core::ExecCtx::Get()->Now();
gpr_log(GPR_INFO, "dns resolution failed (will retry): %s",
grpc_error_string(error));
GPR_ASSERT(!r->have_retry_timer);
r->have_retry_timer = true;
GRPC_RESOLVER_REF(&r->base, "retry-timer");
GPR_ASSERT(!r->have_next_resolution_timer);
r->have_next_resolution_timer = true;
GRPC_RESOLVER_REF(&r->base, "next_resolution_timer");
if (timeout > 0) {
gpr_log(GPR_DEBUG, "retrying in %" PRIdPTR " milliseconds", timeout);
} else {
gpr_log(GPR_DEBUG, "retrying immediately");
}
grpc_timer_init(&r->retry_timer, next_try,
&r->dns_ares_on_retry_timer_locked);
grpc_timer_init(&r->next_resolution_timer, next_try,
&r->dns_ares_on_next_resolution_timer_closure);
}
if (r->resolved_result != nullptr) {
grpc_channel_args_destroy(r->resolved_result);
}
r->resolved_result = result;
r->last_resolution_timestamp = grpc_core::ExecCtx::Get()->Now();
r->resolved_version++;
dns_ares_maybe_finish_next_locked(r);
GRPC_RESOLVER_UNREF(&r->base, "dns-resolving");
@ -297,8 +305,7 @@ static void dns_ares_next_locked(grpc_resolver* resolver,
r->next_completion = on_complete;
r->target_result = target_result;
if (r->resolved_version == 0 && !r->resolving) {
r->backoff->Reset();
dns_ares_start_resolving_locked(r);
dns_ares_maybe_start_resolving_locked(r);
} else {
dns_ares_maybe_finish_next_locked(r);
}
@ -312,7 +319,7 @@ static void dns_ares_start_resolving_locked(ares_dns_resolver* r) {
r->service_config_json = nullptr;
r->pending_request = grpc_dns_lookup_ares(
r->dns_server, r->name_to_resolve, r->default_port, r->interested_parties,
&r->dns_ares_on_resolved_locked, &r->lb_addresses,
&r->dns_ares_on_resolved_closure, &r->lb_addresses,
true /* check_grpclb */,
r->request_service_config ? &r->service_config_json : nullptr);
}
@ -330,6 +337,35 @@ static void dns_ares_maybe_finish_next_locked(ares_dns_resolver* r) {
}
}
static void dns_ares_maybe_start_resolving_locked(ares_dns_resolver* r) {
if (r->last_resolution_timestamp >= 0) {
const grpc_millis earliest_next_resolution =
r->last_resolution_timestamp + r->min_time_between_resolutions;
const grpc_millis ms_until_next_resolution =
earliest_next_resolution - grpc_core::ExecCtx::Get()->Now();
if (ms_until_next_resolution > 0) {
const grpc_millis last_resolution_ago =
grpc_core::ExecCtx::Get()->Now() - r->last_resolution_timestamp;
gpr_log(GPR_DEBUG,
"In cooldown from last resolution (from %" PRIdPTR
" ms ago). Will resolve again in %" PRIdPTR " ms",
last_resolution_ago, ms_until_next_resolution);
if (!r->have_next_resolution_timer) {
r->have_next_resolution_timer = true;
GRPC_RESOLVER_REF(&r->base, "next_resolution_timer_cooldown");
grpc_timer_init(&r->next_resolution_timer, ms_until_next_resolution,
&r->dns_ares_on_next_resolution_timer_closure);
}
// TODO(dgq): remove the following two lines once Pick First stops
// discarding subchannels after selecting.
++r->resolved_version;
dns_ares_maybe_finish_next_locked(r);
return;
}
}
dns_ares_start_resolving_locked(r);
}
static void dns_ares_destroy(grpc_resolver* gr) {
gpr_log(GPR_DEBUG, "dns_ares_destroy");
ares_dns_resolver* r = (ares_dns_resolver*)gr;
@ -374,12 +410,17 @@ static grpc_resolver* dns_ares_create(grpc_resolver_args* args,
.set_jitter(GRPC_DNS_RECONNECT_JITTER)
.set_max_backoff(GRPC_DNS_RECONNECT_MAX_BACKOFF_SECONDS * 1000);
r->backoff.Init(grpc_core::BackOff(backoff_options));
GRPC_CLOSURE_INIT(&r->dns_ares_on_retry_timer_locked,
dns_ares_on_retry_timer_locked, r,
GRPC_CLOSURE_INIT(&r->dns_ares_on_next_resolution_timer_closure,
dns_ares_on_next_resolution_timer_locked, r,
grpc_combiner_scheduler(r->base.combiner));
GRPC_CLOSURE_INIT(&r->dns_ares_on_resolved_locked,
GRPC_CLOSURE_INIT(&r->dns_ares_on_resolved_closure,
dns_ares_on_resolved_locked, r,
grpc_combiner_scheduler(r->base.combiner));
const grpc_arg* period_arg = grpc_channel_args_find(
args->args, GRPC_ARG_DNS_MIN_TIME_BETWEEN_RESOLUTIONS_MS);
r->min_time_between_resolutions =
grpc_channel_arg_get_integer(period_arg, {1000, 0, INT_MAX});
r->last_resolution_timestamp = -1;
return &r->base;
}

@ -28,7 +28,6 @@
#include <ares.h>
#include <grpc/support/alloc.h>
#include <grpc/support/host_port.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/time.h>
@ -36,6 +35,7 @@
#include "src/core/ext/filters/client_channel/parse_address.h"
#include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h"
#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/executor.h"
@ -505,7 +505,7 @@ static void on_dns_lookup_done_cb(void* arg, grpc_error* error) {
}
}
GRPC_CLOSURE_SCHED(r->on_resolve_address_done, GRPC_ERROR_REF(error));
grpc_lb_addresses_destroy(r->lb_addrs);
if (r->lb_addrs != nullptr) grpc_lb_addresses_destroy(r->lb_addrs);
gpr_free(r);
}

@ -19,17 +19,19 @@
#include <grpc/support/port_platform.h>
#include <inttypes.h>
#include <string.h>
#include <climits>
#include <cstring>
#include <grpc/support/alloc.h>
#include <grpc/support/host_port.h>
#include <grpc/support/string_util.h>
#include <grpc/support/time.h>
#include "src/core/ext/filters/client_channel/lb_policy_registry.h"
#include "src/core/ext/filters/client_channel/resolver_registry.h"
#include "src/core/lib/backoff/backoff.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gpr/env.h"
#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gprpp/manual_constructor.h"
#include "src/core/lib/iomgr/combiner.h"
@ -65,13 +67,16 @@ typedef struct {
grpc_channel_args** target_result;
/** current (fully resolved) result */
grpc_channel_args* resolved_result;
/** retry timer */
bool have_retry_timer;
grpc_timer retry_timer;
grpc_closure on_retry;
/** next resolution timer */
bool have_next_resolution_timer;
grpc_timer next_resolution_timer;
grpc_closure next_resolution_closure;
/** retry backoff state */
grpc_core::ManualConstructor<grpc_core::BackOff> backoff;
/** min resolution period. Max one resolution will happen per period */
grpc_millis min_time_between_resolutions;
/** when was the last resolution? -1 if no resolution has happened yet */
grpc_millis last_resolution_timestamp;
/** currently resolving addresses */
grpc_resolved_addresses* addresses;
} dns_resolver;
@ -79,6 +84,7 @@ typedef struct {
static void dns_destroy(grpc_resolver* r);
static void dns_start_resolving_locked(dns_resolver* r);
static void maybe_start_resolving_locked(dns_resolver* r);
static void dns_maybe_finish_next_locked(dns_resolver* r);
static void dns_shutdown_locked(grpc_resolver* r);
@ -92,8 +98,8 @@ static const grpc_resolver_vtable dns_resolver_vtable = {
static void dns_shutdown_locked(grpc_resolver* resolver) {
dns_resolver* r = (dns_resolver*)resolver;
if (r->have_retry_timer) {
grpc_timer_cancel(&r->retry_timer);
if (r->have_next_resolution_timer) {
grpc_timer_cancel(&r->next_resolution_timer);
}
if (r->next_completion != nullptr) {
*r->target_result = nullptr;
@ -106,8 +112,7 @@ static void dns_shutdown_locked(grpc_resolver* resolver) {
static void dns_channel_saw_error_locked(grpc_resolver* resolver) {
dns_resolver* r = (dns_resolver*)resolver;
if (!r->resolving) {
r->backoff->Reset();
dns_start_resolving_locked(r);
maybe_start_resolving_locked(r);
}
}
@ -119,24 +124,19 @@ static void dns_next_locked(grpc_resolver* resolver,
r->next_completion = on_complete;
r->target_result = target_result;
if (r->resolved_version == 0 && !r->resolving) {
r->backoff->Reset();
dns_start_resolving_locked(r);
maybe_start_resolving_locked(r);
} else {
dns_maybe_finish_next_locked(r);
}
}
static void dns_on_retry_timer_locked(void* arg, grpc_error* error) {
static void dns_on_next_resolution_timer_locked(void* arg, grpc_error* error) {
dns_resolver* r = (dns_resolver*)arg;
r->have_retry_timer = false;
if (error == GRPC_ERROR_NONE) {
if (!r->resolving) {
dns_start_resolving_locked(r);
}
r->have_next_resolution_timer = false;
if (error == GRPC_ERROR_NONE && !r->resolving) {
dns_start_resolving_locked(r);
}
GRPC_RESOLVER_UNREF(&r->base, "retry-timer");
GRPC_RESOLVER_UNREF(&r->base, "next_resolution_timer");
}
static void dns_on_resolved_locked(void* arg, grpc_error* error) {
@ -160,22 +160,24 @@ static void dns_on_resolved_locked(void* arg, grpc_error* error) {
result = grpc_channel_args_copy_and_add(r->channel_args, &new_arg, 1);
grpc_resolved_addresses_destroy(r->addresses);
grpc_lb_addresses_destroy(addresses);
// Reset backoff state so that we start from the beginning when the
// next request gets triggered.
r->backoff->Reset();
} else {
grpc_millis next_try = r->backoff->NextAttemptTime();
grpc_millis timeout = next_try - grpc_core::ExecCtx::Get()->Now();
gpr_log(GPR_INFO, "dns resolution failed (will retry): %s",
grpc_error_string(error));
GPR_ASSERT(!r->have_retry_timer);
r->have_retry_timer = true;
GRPC_RESOLVER_REF(&r->base, "retry-timer");
GPR_ASSERT(!r->have_next_resolution_timer);
r->have_next_resolution_timer = true;
GRPC_RESOLVER_REF(&r->base, "next_resolution_timer");
if (timeout > 0) {
gpr_log(GPR_DEBUG, "retrying in %" PRIdPTR " milliseconds", timeout);
} else {
gpr_log(GPR_DEBUG, "retrying immediately");
}
GRPC_CLOSURE_INIT(&r->on_retry, dns_on_retry_timer_locked, r,
grpc_combiner_scheduler(r->base.combiner));
grpc_timer_init(&r->retry_timer, next_try, &r->on_retry);
grpc_timer_init(&r->next_resolution_timer, next_try,
&r->next_resolution_closure);
}
if (r->resolved_result != nullptr) {
grpc_channel_args_destroy(r->resolved_result);
@ -188,6 +190,35 @@ static void dns_on_resolved_locked(void* arg, grpc_error* error) {
GRPC_RESOLVER_UNREF(&r->base, "dns-resolving");
}
static void maybe_start_resolving_locked(dns_resolver* r) {
if (r->last_resolution_timestamp >= 0) {
const grpc_millis earliest_next_resolution =
r->last_resolution_timestamp + r->min_time_between_resolutions;
const grpc_millis ms_until_next_resolution =
earliest_next_resolution - grpc_core::ExecCtx::Get()->Now();
if (ms_until_next_resolution > 0) {
const grpc_millis last_resolution_ago =
grpc_core::ExecCtx::Get()->Now() - r->last_resolution_timestamp;
gpr_log(GPR_DEBUG,
"In cooldown from last resolution (from %" PRIdPTR
" ms ago). Will resolve again in %" PRIdPTR " ms",
last_resolution_ago, ms_until_next_resolution);
if (!r->have_next_resolution_timer) {
r->have_next_resolution_timer = true;
GRPC_RESOLVER_REF(&r->base, "next_resolution_timer_cooldown");
grpc_timer_init(&r->next_resolution_timer, ms_until_next_resolution,
&r->next_resolution_closure);
}
// TODO(dgq): remove the following two lines once Pick First stops
// discarding subchannels after selecting.
++r->resolved_version;
dns_maybe_finish_next_locked(r);
return;
}
}
dns_start_resolving_locked(r);
}
static void dns_start_resolving_locked(dns_resolver* r) {
GRPC_RESOLVER_REF(&r->base, "dns-resolving");
GPR_ASSERT(!r->resolving);
@ -198,6 +229,7 @@ static void dns_start_resolving_locked(dns_resolver* r) {
GRPC_CLOSURE_CREATE(dns_on_resolved_locked, r,
grpc_combiner_scheduler(r->base.combiner)),
&r->addresses);
r->last_resolution_timestamp = grpc_core::ExecCtx::Get()->Now();
}
static void dns_maybe_finish_next_locked(dns_resolver* r) {
@ -250,6 +282,14 @@ static grpc_resolver* dns_create(grpc_resolver_args* args,
.set_jitter(GRPC_DNS_RECONNECT_JITTER)
.set_max_backoff(GRPC_DNS_RECONNECT_MAX_BACKOFF_SECONDS * 1000);
r->backoff.Init(grpc_core::BackOff(backoff_options));
const grpc_arg* period_arg = grpc_channel_args_find(
args->args, GRPC_ARG_DNS_MIN_TIME_BETWEEN_RESOLUTIONS_MS);
r->min_time_between_resolutions =
grpc_channel_arg_get_integer(period_arg, {1000, 0, INT_MAX});
r->last_resolution_timestamp = -1;
GRPC_CLOSURE_INIT(&r->next_resolution_closure,
dns_on_next_resolution_timer_locked, r,
grpc_combiner_scheduler(r->base.combiner));
return &r->base;
}

@ -24,7 +24,6 @@
#include <string.h>
#include <grpc/support/alloc.h>
#include <grpc/support/host_port.h>
#include <grpc/support/port_platform.h>
#include <grpc/support/string_util.h>
@ -32,6 +31,7 @@
#include "src/core/ext/filters/client_channel/parse_address.h"
#include "src/core/ext/filters/client_channel/resolver_registry.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/combiner.h"
@ -47,10 +47,10 @@
//
typedef struct {
// base class -- must be first
// Base class -- must be first
grpc_resolver base;
// passed-in parameters
// Passed-in parameters
grpc_channel_args* channel_args;
// If not NULL, the next set of resolution results to be returned to
@ -61,9 +61,16 @@ typedef struct {
// fake_resolver_channel_saw_error_locked().
grpc_channel_args* results_upon_error;
// pending next completion, or NULL
// TODO(juanlishen): This can go away once pick_first is changed to not throw
// away its subchannels, since that will eliminate its dependence on
// channel_saw_error_locked() causing an immediate resolver return.
// A copy of the most-recently used resolution results.
grpc_channel_args* last_used_results;
// Pending next completion, or NULL
grpc_closure* next_completion;
// target result address for next completion
// Target result address for next completion
grpc_channel_args** target_result;
} fake_resolver;
@ -71,6 +78,7 @@ static void fake_resolver_destroy(grpc_resolver* gr) {
fake_resolver* r = (fake_resolver*)gr;
grpc_channel_args_destroy(r->next_results);
grpc_channel_args_destroy(r->results_upon_error);
grpc_channel_args_destroy(r->last_used_results);
grpc_channel_args_destroy(r->channel_args);
gpr_free(r);
}
@ -98,9 +106,15 @@ static void fake_resolver_maybe_finish_next_locked(fake_resolver* r) {
static void fake_resolver_channel_saw_error_locked(grpc_resolver* resolver) {
fake_resolver* r = (fake_resolver*)resolver;
if (r->next_results == nullptr && r->results_upon_error != nullptr) {
// Pretend we re-resolved.
// A resolution must have been returned before an error is seen.
GPR_ASSERT(r->last_used_results != nullptr);
grpc_channel_args_destroy(r->next_results);
if (r->results_upon_error != nullptr) {
r->next_results = grpc_channel_args_copy(r->results_upon_error);
} else {
// If results_upon_error is unavailable, re-resolve with the most-recently
// used results to avoid a no-op re-resolution.
r->next_results = grpc_channel_args_copy(r->last_used_results);
}
fake_resolver_maybe_finish_next_locked(r);
}
@ -149,35 +163,56 @@ void grpc_fake_resolver_response_generator_unref(
typedef struct set_response_closure_arg {
grpc_closure set_response_closure;
grpc_fake_resolver_response_generator* generator;
grpc_channel_args* next_response;
grpc_channel_args* response;
bool upon_error;
} set_response_closure_arg;
static void set_response_closure_fn(void* arg, grpc_error* error) {
static void set_response_closure_locked(void* arg, grpc_error* error) {
set_response_closure_arg* closure_arg = (set_response_closure_arg*)arg;
grpc_fake_resolver_response_generator* generator = closure_arg->generator;
fake_resolver* r = generator->resolver;
if (r->next_results != nullptr) {
if (!closure_arg->upon_error) {
grpc_channel_args_destroy(r->next_results);
}
r->next_results = closure_arg->next_response;
if (r->results_upon_error != nullptr) {
r->next_results = closure_arg->response;
grpc_channel_args_destroy(r->last_used_results);
r->last_used_results = grpc_channel_args_copy(closure_arg->response);
fake_resolver_maybe_finish_next_locked(r);
} else {
grpc_channel_args_destroy(r->results_upon_error);
r->results_upon_error = closure_arg->response;
}
r->results_upon_error = grpc_channel_args_copy(closure_arg->next_response);
gpr_free(closure_arg);
fake_resolver_maybe_finish_next_locked(r);
}
void grpc_fake_resolver_response_generator_set_response(
grpc_fake_resolver_response_generator* generator,
grpc_channel_args* next_response) {
grpc_channel_args* response) {
GPR_ASSERT(generator->resolver != nullptr);
GPR_ASSERT(response != nullptr);
set_response_closure_arg* closure_arg =
(set_response_closure_arg*)gpr_zalloc(sizeof(*closure_arg));
closure_arg->generator = generator;
closure_arg->response = grpc_channel_args_copy(response);
closure_arg->upon_error = false;
GRPC_CLOSURE_SCHED(GRPC_CLOSURE_INIT(&closure_arg->set_response_closure,
set_response_closure_locked, closure_arg,
grpc_combiner_scheduler(
generator->resolver->base.combiner)),
GRPC_ERROR_NONE);
}
void grpc_fake_resolver_response_generator_set_response_upon_error(
grpc_fake_resolver_response_generator* generator,
grpc_channel_args* response) {
GPR_ASSERT(generator->resolver != nullptr);
set_response_closure_arg* closure_arg =
(set_response_closure_arg*)gpr_zalloc(sizeof(*closure_arg));
closure_arg->generator = generator;
closure_arg->next_response = grpc_channel_args_copy(next_response);
closure_arg->response =
response != nullptr ? grpc_channel_args_copy(response) : nullptr;
closure_arg->upon_error = true;
GRPC_CLOSURE_SCHED(GRPC_CLOSURE_INIT(&closure_arg->set_response_closure,
set_response_closure_fn, closure_arg,
set_response_closure_locked, closure_arg,
grpc_combiner_scheduler(
generator->resolver->base.combiner)),
GRPC_ERROR_NONE);

@ -36,11 +36,20 @@ typedef struct grpc_fake_resolver_response_generator
grpc_fake_resolver_response_generator*
grpc_fake_resolver_response_generator_create();
// Instruct the fake resolver associated with the \a response_generator instance
// to trigger a new resolution for \a uri and \a args.
// Set next response of the fake resolver associated with the \a
// response_generator instance and trigger a new resolution.
void grpc_fake_resolver_response_generator_set_response(
grpc_fake_resolver_response_generator* generator,
grpc_channel_args* next_response);
grpc_channel_args* response);
// Set results_upon_error of the fake resolver associated with the \a
// response_generator instance. When fake_resolver_channel_saw_error_locked() is
// called, results_upon_error will be returned as long as it's non-NULL,
// otherwise the last value set by
// grpc_fake_resolver_response_generator_set_response() will be returned.
void grpc_fake_resolver_response_generator_set_response_upon_error(
grpc_fake_resolver_response_generator* generator,
grpc_channel_args* response);
// Return a \a grpc_arg for a \a grpc_fake_resolver_response_generator instance.
grpc_arg grpc_fake_resolver_response_generator_arg(

@ -22,7 +22,6 @@
#include <string.h>
#include <grpc/support/alloc.h>
#include <grpc/support/host_port.h>
#include <grpc/support/port_platform.h>
#include <grpc/support/string_util.h>
@ -30,6 +29,7 @@
#include "src/core/ext/filters/client_channel/parse_address.h"
#include "src/core/ext/filters/client_channel/resolver_registry.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/iomgr/combiner.h"
#include "src/core/lib/iomgr/resolve_address.h"

@ -653,14 +653,13 @@ static void on_subchannel_connected(void* arg, grpc_error* error) {
*/
static void subchannel_call_destroy(void* call, grpc_error* error) {
GPR_TIMER_SCOPE("grpc_subchannel_call_unref.destroy", 0);
grpc_subchannel_call* c = (grpc_subchannel_call*)call;
GPR_ASSERT(c->schedule_closure_after_destroy != nullptr);
GPR_TIMER_BEGIN("grpc_subchannel_call_unref.destroy", 0);
grpc_core::ConnectedSubchannel* connection = c->connection;
grpc_call_stack_destroy(SUBCHANNEL_CALL_TO_CALL_STACK(c), nullptr,
c->schedule_closure_after_destroy);
connection->Unref(DEBUG_LOCATION, "subchannel_call");
GPR_TIMER_END("grpc_subchannel_call_unref.destroy", 0);
}
void grpc_subchannel_call_set_cleanup_closure(grpc_subchannel_call* call,
@ -682,12 +681,11 @@ void grpc_subchannel_call_unref(
void grpc_subchannel_call_process_op(grpc_subchannel_call* call,
grpc_transport_stream_op_batch* batch) {
GPR_TIMER_BEGIN("grpc_subchannel_call_process_op", 0);
GPR_TIMER_SCOPE("grpc_subchannel_call_process_op", 0);
grpc_call_stack* call_stack = SUBCHANNEL_CALL_TO_CALL_STACK(call);
grpc_call_element* top_elem = grpc_call_stack_element(call_stack, 0);
GRPC_CALL_LOG_OP(GPR_INFO, top_elem, batch);
top_elem->filter->start_transport_stream_op_batch(top_elem, batch);
GPR_TIMER_END("grpc_subchannel_call_process_op", 0);
}
grpc_core::RefCountedPtr<grpc_core::ConnectedSubchannel>
@ -740,8 +738,9 @@ grpc_arg grpc_create_subchannel_address_arg(const grpc_resolved_address* addr) {
}
namespace grpc_core {
ConnectedSubchannel::ConnectedSubchannel(grpc_channel_stack* channel_stack)
: grpc_core::RefCountedWithTracing(&grpc_trace_stream_refcount),
: RefCountedWithTracing<ConnectedSubchannel>(&grpc_trace_stream_refcount),
channel_stack_(channel_stack) {}
ConnectedSubchannel::~ConnectedSubchannel() {
@ -776,7 +775,9 @@ grpc_error* ConnectedSubchannel::CreateCall(const CallArgs& args,
args.arena,
sizeof(grpc_subchannel_call) + channel_stack_->call_stack_size);
grpc_call_stack* callstk = SUBCHANNEL_CALL_TO_CALL_STACK(*call);
Ref(DEBUG_LOCATION, "subchannel_call");
RefCountedPtr<ConnectedSubchannel> connection =
Ref(DEBUG_LOCATION, "subchannel_call");
connection.release(); // Ref is passed to the grpc_subchannel_call object.
(*call)->connection = this;
const grpc_call_element_args call_args = {
callstk, /* call_stack */
@ -798,4 +799,5 @@ grpc_error* ConnectedSubchannel::CreateCall(const CallArgs& args,
grpc_call_stack_set_pollset_or_pollset_set(callstk, args.pollent);
return GRPC_ERROR_NONE;
}
} // namespace grpc_core

@ -68,7 +68,8 @@ typedef struct grpc_subchannel_key grpc_subchannel_key;
#endif
namespace grpc_core {
class ConnectedSubchannel : public grpc_core::RefCountedWithTracing {
class ConnectedSubchannel : public RefCountedWithTracing<ConnectedSubchannel> {
public:
struct CallArgs {
grpc_polling_entity* pollent;
@ -93,6 +94,7 @@ class ConnectedSubchannel : public grpc_core::RefCountedWithTracing {
private:
grpc_channel_stack* channel_stack_;
};
} // namespace grpc_core
grpc_subchannel* grpc_subchannel_ref(

@ -289,7 +289,7 @@ static void hc_start_transport_stream_op_batch(
grpc_call_element* elem, grpc_transport_stream_op_batch* batch) {
call_data* calld = (call_data*)elem->call_data;
channel_data* channeld = (channel_data*)elem->channel_data;
GPR_TIMER_BEGIN("hc_start_transport_stream_op_batch", 0);
GPR_TIMER_SCOPE("hc_start_transport_stream_op_batch", 0);
if (batch->recv_initial_metadata) {
/* substitute our callback for the higher callback */
@ -404,7 +404,6 @@ done:
} else if (!batch_will_be_handled_asynchronously) {
grpc_call_next_op(elem, batch);
}
GPR_TIMER_END("hc_start_transport_stream_op_batch", 0);
}
/* Constructor for call_data */

@ -347,8 +347,8 @@ static void start_send_message_batch(void* arg, grpc_error* unused) {
static void compress_start_transport_stream_op_batch(
grpc_call_element* elem, grpc_transport_stream_op_batch* batch) {
GPR_TIMER_SCOPE("compress_start_transport_stream_op_batch", 0);
call_data* calld = (call_data*)elem->call_data;
GPR_TIMER_BEGIN("compress_start_transport_stream_op_batch", 0);
// Handle cancel_stream.
if (batch->cancel_stream) {
GRPC_ERROR_UNREF(calld->cancel_error);
@ -371,7 +371,7 @@ static void compress_start_transport_stream_op_batch(
} else if (calld->cancel_error != GRPC_ERROR_NONE) {
grpc_transport_stream_op_batch_finish_with_failure(
batch, GRPC_ERROR_REF(calld->cancel_error), calld->call_combiner);
goto done;
return;
}
// Handle send_initial_metadata.
if (batch->send_initial_metadata) {
@ -383,7 +383,7 @@ static void compress_start_transport_stream_op_batch(
if (error != GRPC_ERROR_NONE) {
grpc_transport_stream_op_batch_finish_with_failure(batch, error,
calld->call_combiner);
goto done;
return;
}
calld->send_initial_metadata_state = has_compression_algorithm
? HAS_COMPRESSION_ALGORITHM
@ -412,15 +412,13 @@ static void compress_start_transport_stream_op_batch(
GRPC_CALL_COMBINER_STOP(
calld->call_combiner,
"send_message batch pending send_initial_metadata");
goto done;
return;
}
start_send_message_batch(elem, GRPC_ERROR_NONE);
} else {
// Pass control down the stack.
grpc_call_next_op(elem, batch);
}
done:
GPR_TIMER_END("compress_start_transport_stream_op_batch", 0);
}
/* Constructor for call_data */

@ -367,8 +367,8 @@ static grpc_error* hs_mutate_op(grpc_call_element* elem,
static void hs_start_transport_stream_op_batch(
grpc_call_element* elem, grpc_transport_stream_op_batch* op) {
GPR_TIMER_SCOPE("hs_start_transport_stream_op_batch", 0);
call_data* calld = (call_data*)elem->call_data;
GPR_TIMER_BEGIN("hs_start_transport_stream_op_batch", 0);
grpc_error* error = hs_mutate_op(elem, op);
if (error != GRPC_ERROR_NONE) {
grpc_transport_stream_op_batch_finish_with_failure(op, error,
@ -376,7 +376,6 @@ static void hs_start_transport_stream_op_batch(
} else {
grpc_call_next_op(elem, op);
}
GPR_TIMER_END("hs_start_transport_stream_op_batch", 0);
}
/* Constructor for call_data */

@ -184,7 +184,7 @@ static grpc_filtered_mdelem lr_trailing_md_filter(void* user_data,
static void lr_start_transport_stream_op_batch(
grpc_call_element* elem, grpc_transport_stream_op_batch* op) {
GPR_TIMER_BEGIN("lr_start_transport_stream_op_batch", 0);
GPR_TIMER_SCOPE("lr_start_transport_stream_op_batch", 0);
call_data* calld = (call_data*)elem->call_data;
if (op->recv_initial_metadata) {
@ -204,8 +204,6 @@ static void lr_start_transport_stream_op_batch(
"LR trailing metadata filtering error"));
}
grpc_call_next_op(elem, op);
GPR_TIMER_END("lr_start_transport_stream_op_batch", 0);
}
const grpc_channel_filter grpc_server_load_reporting_filter = {

@ -37,6 +37,12 @@
#define MAX_CONNECTION_IDLE_INTEGER_OPTIONS \
{ DEFAULT_MAX_CONNECTION_IDLE_MS, 1, INT_MAX }
/* States for idle_state in channel_data */
#define MAX_IDLE_STATE_INIT ((gpr_atm)0)
#define MAX_IDLE_STATE_SEEN_EXIT_IDLE ((gpr_atm)1)
#define MAX_IDLE_STATE_SEEN_ENTER_IDLE ((gpr_atm)2)
#define MAX_IDLE_STATE_TIMER_SET ((gpr_atm)3)
namespace {
struct channel_data {
/* We take a reference to the channel stack for the timer callback */
@ -64,7 +70,7 @@ struct channel_data {
grpc_millis max_connection_age_grace;
/* Closure to run when the channel's idle duration reaches max_connection_idle
and should be closed gracefully */
grpc_closure close_max_idle_channel;
grpc_closure max_idle_timer_cb;
/* Closure to run when the channel reaches its max age and should be closed
gracefully */
grpc_closure close_max_age_channel;
@ -85,26 +91,117 @@ struct channel_data {
grpc_connectivity_state connectivity_state;
/* Number of active calls */
gpr_atm call_count;
/* TODO(zyc): C++lize this state machine */
/* 'idle_state' holds the states of max_idle_timer and channel idleness.
It can contain one of the following values:
+--------------------------------+----------------+---------+
| idle_state | max_idle_timer | channel |
+--------------------------------+----------------+---------+
| MAX_IDLE_STATE_INIT | unset | busy |
| MAX_IDLE_STATE_TIMER_SET | set, valid | idle |
| MAX_IDLE_STATE_SEEN_EXIT_IDLE | set, invalid | busy |
| MAX_IDLE_STATE_SEEN_ENTER_IDLE | set, invalid | idle |
+--------------------------------+----------------+---------+
MAX_IDLE_STATE_INIT: The initial and final state of 'idle_state'. The
channel has 1 or 1+ active calls, and the the timer is not set. Note that
we may put a virtual call to hold this state at channel initialization or
shutdown, so that the channel won't enter other states.
MAX_IDLE_STATE_TIMER_SET: The state after the timer is set and no calls
have arrived after the timer is set. The channel must have 0 active call in
this state. If the timer is fired in this state, we will close the channel
due to idleness.
MAX_IDLE_STATE_SEEN_EXIT_IDLE: The state after the timer is set and at
least one call has arrived after the timer is set. The channel must have 1
or 1+ active calls in this state. If the timer is fired in this state, we
won't reschudle it.
MAX_IDLE_STATE_SEEN_ENTER_IDLE: The state after the timer is set and the at
least one call has arrived after the timer is set, BUT the channel
currently has 1 or 1+ active calls. If the timer is fired in this state, we
will reschudle it.
max_idle_timer will not be cancelled (unless the channel is shutting down).
If the timer callback is called when the max_idle_timer is valid (i.e.
idle_state is MAX_IDLE_STATE_TIMER_SET), the channel will be closed due to
idleness, otherwise the channel won't be changed.
State transitions:
MAX_IDLE_STATE_INIT <-------3------ MAX_IDLE_STATE_SEEN_EXIT_IDLE
^ | ^ ^ |
| | | | |
1 2 +-----------4------------+ 6 7
| | | | |
| v | | v
MAX_IDLE_STATE_TIMER_SET <----5------ MAX_IDLE_STATE_SEEN_ENTER_IDLE
For 1, 3, 5 : See max_idle_timer_cb() function
For 2, 7 : See decrease_call_count() function
For 4, 6 : See increase_call_count() function */
gpr_atm idle_state;
/* Time when the channel finished its last outstanding call, in grpc_millis */
gpr_atm last_enter_idle_time_millis;
};
} // namespace
/* Increase the nubmer of active calls. Before the increasement, if there are no
calls, the max_idle_timer should be cancelled. */
static void increase_call_count(channel_data* chand) {
/* Exit idle */
if (gpr_atm_full_fetch_add(&chand->call_count, 1) == 0) {
grpc_timer_cancel(&chand->max_idle_timer);
while (true) {
gpr_atm idle_state = gpr_atm_acq_load(&chand->idle_state);
switch (idle_state) {
case MAX_IDLE_STATE_TIMER_SET:
/* max_idle_timer_cb may have already set idle_state to
MAX_IDLE_STATE_INIT, in this case, we don't need to set it to
MAX_IDLE_STATE_SEEN_EXIT_IDLE */
gpr_atm_rel_cas(&chand->idle_state, MAX_IDLE_STATE_TIMER_SET,
MAX_IDLE_STATE_SEEN_EXIT_IDLE);
return;
case MAX_IDLE_STATE_SEEN_ENTER_IDLE:
gpr_atm_rel_store(&chand->idle_state, MAX_IDLE_STATE_SEEN_EXIT_IDLE);
return;
default:
/* try again */
break;
}
}
}
}
/* Decrease the nubmer of active calls. After the decrement, if there are no
calls, the max_idle_timer should be started. */
static void decrease_call_count(channel_data* chand) {
/* Enter idle */
if (gpr_atm_full_fetch_add(&chand->call_count, -1) == 1) {
GRPC_CHANNEL_STACK_REF(chand->channel_stack, "max_age max_idle_timer");
grpc_timer_init(
&chand->max_idle_timer,
grpc_core::ExecCtx::Get()->Now() + chand->max_connection_idle,
&chand->close_max_idle_channel);
gpr_atm_no_barrier_store(&chand->last_enter_idle_time_millis,
(gpr_atm)grpc_core::ExecCtx::Get()->Now());
while (true) {
gpr_atm idle_state = gpr_atm_acq_load(&chand->idle_state);
switch (idle_state) {
case MAX_IDLE_STATE_INIT:
GRPC_CHANNEL_STACK_REF(chand->channel_stack,
"max_age max_idle_timer");
grpc_timer_init(
&chand->max_idle_timer,
grpc_core::ExecCtx::Get()->Now() + chand->max_connection_idle,
&chand->max_idle_timer_cb);
gpr_atm_rel_store(&chand->idle_state, MAX_IDLE_STATE_TIMER_SET);
return;
case MAX_IDLE_STATE_SEEN_EXIT_IDLE:
if (gpr_atm_rel_cas(&chand->idle_state, MAX_IDLE_STATE_SEEN_EXIT_IDLE,
MAX_IDLE_STATE_SEEN_ENTER_IDLE)) {
return;
}
break;
default:
/* try again */
break;
}
}
}
}
@ -152,20 +249,58 @@ static void start_max_age_grace_timer_after_goaway_op(void* arg,
"max_age start_max_age_grace_timer_after_goaway_op");
}
static void close_max_idle_channel(void* arg, grpc_error* error) {
static void close_max_idle_channel(channel_data* chand) {
/* Prevent the max idle timer from being set again */
gpr_atm_no_barrier_fetch_add(&chand->call_count, 1);
grpc_transport_op* op = grpc_make_transport_op(nullptr);
op->goaway_error =
grpc_error_set_int(GRPC_ERROR_CREATE_FROM_STATIC_STRING("max_idle"),
GRPC_ERROR_INT_HTTP2_ERROR, GRPC_HTTP2_NO_ERROR);
grpc_channel_element* elem =
grpc_channel_stack_element(chand->channel_stack, 0);
elem->filter->start_transport_op(elem, op);
}
static void max_idle_timer_cb(void* arg, grpc_error* error) {
channel_data* chand = (channel_data*)arg;
if (error == GRPC_ERROR_NONE) {
/* Prevent the max idle timer from being set again */
gpr_atm_no_barrier_fetch_add(&chand->call_count, 1);
grpc_transport_op* op = grpc_make_transport_op(nullptr);
op->goaway_error =
grpc_error_set_int(GRPC_ERROR_CREATE_FROM_STATIC_STRING("max_idle"),
GRPC_ERROR_INT_HTTP2_ERROR, GRPC_HTTP2_NO_ERROR);
grpc_channel_element* elem =
grpc_channel_stack_element(chand->channel_stack, 0);
elem->filter->start_transport_op(elem, op);
} else if (error != GRPC_ERROR_CANCELLED) {
GRPC_LOG_IF_ERROR("close_max_idle_channel", error);
bool try_again = true;
while (try_again) {
gpr_atm idle_state = gpr_atm_acq_load(&chand->idle_state);
switch (idle_state) {
case MAX_IDLE_STATE_TIMER_SET:
close_max_idle_channel(chand);
/* This MAX_IDLE_STATE_INIT is a final state, we don't have to check
* if idle_state has been changed */
gpr_atm_rel_store(&chand->idle_state, MAX_IDLE_STATE_INIT);
try_again = false;
break;
case MAX_IDLE_STATE_SEEN_EXIT_IDLE:
if (gpr_atm_rel_cas(&chand->idle_state, MAX_IDLE_STATE_SEEN_EXIT_IDLE,
MAX_IDLE_STATE_INIT)) {
try_again = false;
}
break;
case MAX_IDLE_STATE_SEEN_ENTER_IDLE:
GRPC_CHANNEL_STACK_REF(chand->channel_stack,
"max_age max_idle_timer");
grpc_timer_init(&chand->max_idle_timer,
(grpc_millis)gpr_atm_no_barrier_load(
&chand->last_enter_idle_time_millis) +
chand->max_connection_idle,
&chand->max_idle_timer_cb);
/* idle_state may have already been set to
MAX_IDLE_STATE_SEEN_EXIT_IDLE by increase_call_count(), in this
case, we don't need to set it to MAX_IDLE_STATE_TIMER_SET */
gpr_atm_rel_cas(&chand->idle_state, MAX_IDLE_STATE_SEEN_ENTER_IDLE,
MAX_IDLE_STATE_TIMER_SET);
try_again = false;
break;
default:
/* try again */
break;
}
}
}
GRPC_CHANNEL_STACK_UNREF(chand->channel_stack, "max_age max_idle_timer");
}
@ -288,6 +423,9 @@ static grpc_error* init_channel_elem(grpc_channel_element* elem,
chand->max_connection_idle = DEFAULT_MAX_CONNECTION_IDLE_MS == INT_MAX
? GRPC_MILLIS_INF_FUTURE
: DEFAULT_MAX_CONNECTION_IDLE_MS;
chand->idle_state = MAX_IDLE_STATE_INIT;
gpr_atm_no_barrier_store(&chand->last_enter_idle_time_millis,
GRPC_MILLIS_INF_PAST);
for (size_t i = 0; i < args->channel_args->num_args; ++i) {
if (0 == strcmp(args->channel_args->args[i].key,
GRPC_ARG_MAX_CONNECTION_AGE_MS)) {
@ -311,8 +449,8 @@ static grpc_error* init_channel_elem(grpc_channel_element* elem,
value == INT_MAX ? GRPC_MILLIS_INF_FUTURE : value;
}
}
GRPC_CLOSURE_INIT(&chand->close_max_idle_channel, close_max_idle_channel,
chand, grpc_schedule_on_exec_ctx);
GRPC_CLOSURE_INIT(&chand->max_idle_timer_cb, max_idle_timer_cb, chand,
grpc_schedule_on_exec_ctx);
GRPC_CLOSURE_INIT(&chand->close_max_age_channel, close_max_age_channel, chand,
grpc_schedule_on_exec_ctx);
GRPC_CLOSURE_INIT(&chand->force_close_max_age_channel,

@ -656,7 +656,7 @@ void grpc_chttp2_stream_unref(grpc_chttp2_stream* s) {
static int init_stream(grpc_transport* gt, grpc_stream* gs,
grpc_stream_refcount* refcount, const void* server_data,
gpr_arena* arena) {
GPR_TIMER_BEGIN("init_stream", 0);
GPR_TIMER_SCOPE("init_stream", 0);
grpc_chttp2_transport* t = (grpc_chttp2_transport*)gt;
grpc_chttp2_stream* s = (grpc_chttp2_stream*)gs;
@ -700,17 +700,15 @@ static int init_stream(grpc_transport* gt, grpc_stream* gs,
} else {
s->flow_control.Init<grpc_core::chttp2::StreamFlowControlDisabled>();
}
GPR_TIMER_END("init_stream", 0);
return 0;
}
static void destroy_stream_locked(void* sp, grpc_error* error) {
GPR_TIMER_SCOPE("destroy_stream", 0);
grpc_chttp2_stream* s = (grpc_chttp2_stream*)sp;
grpc_chttp2_transport* t = s->t;
GPR_TIMER_BEGIN("destroy_stream", 0);
GPR_ASSERT((s->write_closed && s->read_closed) || s->id == 0);
if (s->id != 0) {
GPR_ASSERT(grpc_chttp2_stream_map_find(&t->stream_map, s->id) == nullptr);
@ -750,14 +748,12 @@ static void destroy_stream_locked(void* sp, grpc_error* error) {
GRPC_CHTTP2_UNREF_TRANSPORT(t, "stream");
GPR_TIMER_END("destroy_stream", 0);
GRPC_CLOSURE_SCHED(s->destroy_stream_arg, GRPC_ERROR_NONE);
}
static void destroy_stream(grpc_transport* gt, grpc_stream* gs,
grpc_closure* then_schedule_closure) {
GPR_TIMER_BEGIN("destroy_stream", 0);
GPR_TIMER_SCOPE("destroy_stream", 0);
grpc_chttp2_transport* t = (grpc_chttp2_transport*)gt;
grpc_chttp2_stream* s = (grpc_chttp2_stream*)gs;
@ -775,7 +771,6 @@ static void destroy_stream(grpc_transport* gt, grpc_stream* gs,
GRPC_CLOSURE_INIT(&s->destroy_stream, destroy_stream_locked, s,
grpc_combiner_scheduler(t->combiner)),
GRPC_ERROR_NONE);
GPR_TIMER_END("destroy_stream", 0);
}
grpc_chttp2_stream* grpc_chttp2_parsing_lookup_stream(grpc_chttp2_transport* t,
@ -898,7 +893,7 @@ static void inc_initiate_write_reason(
void grpc_chttp2_initiate_write(grpc_chttp2_transport* t,
grpc_chttp2_initiate_write_reason reason) {
GPR_TIMER_BEGIN("grpc_chttp2_initiate_write", 0);
GPR_TIMER_SCOPE("grpc_chttp2_initiate_write", 0);
switch (t->write_state) {
case GRPC_CHTTP2_WRITE_STATE_IDLE:
@ -920,7 +915,6 @@ void grpc_chttp2_initiate_write(grpc_chttp2_transport* t,
case GRPC_CHTTP2_WRITE_STATE_WRITING_WITH_MORE:
break;
}
GPR_TIMER_END("grpc_chttp2_initiate_write", 0);
}
void grpc_chttp2_mark_stream_writable(grpc_chttp2_transport* t,
@ -974,7 +968,7 @@ static const char* begin_writing_desc(bool partial, bool inlined) {
}
static void write_action_begin_locked(void* gt, grpc_error* error_ignored) {
GPR_TIMER_BEGIN("write_action_begin_locked", 0);
GPR_TIMER_SCOPE("write_action_begin_locked", 0);
grpc_chttp2_transport* t = (grpc_chttp2_transport*)gt;
GPR_ASSERT(t->write_state != GRPC_CHTTP2_WRITE_STATE_IDLE);
grpc_chttp2_begin_write_result r;
@ -1008,21 +1002,19 @@ static void write_action_begin_locked(void* gt, grpc_error* error_ignored) {
set_write_state(t, GRPC_CHTTP2_WRITE_STATE_IDLE, "begin writing nothing");
GRPC_CHTTP2_UNREF_TRANSPORT(t, "writing");
}
GPR_TIMER_END("write_action_begin_locked", 0);
}
static void write_action(void* gt, grpc_error* error) {
GPR_TIMER_SCOPE("write_action", 0);
grpc_chttp2_transport* t = (grpc_chttp2_transport*)gt;
GPR_TIMER_BEGIN("write_action", 0);
grpc_endpoint_write(
t->ep, &t->outbuf,
GRPC_CLOSURE_INIT(&t->write_action_end_locked, write_action_end_locked, t,
grpc_combiner_scheduler(t->combiner)));
GPR_TIMER_END("write_action", 0);
}
static void write_action_end_locked(void* tp, grpc_error* error) {
GPR_TIMER_BEGIN("terminate_writing_with_lock", 0);
GPR_TIMER_SCOPE("terminate_writing_with_lock", 0);
grpc_chttp2_transport* t = (grpc_chttp2_transport*)tp;
if (error != GRPC_ERROR_NONE) {
@ -1060,7 +1052,6 @@ static void write_action_end_locked(void* tp, grpc_error* error) {
grpc_chttp2_end_write(t, GRPC_ERROR_REF(error));
GRPC_CHTTP2_UNREF_TRANSPORT(t, "writing");
GPR_TIMER_END("terminate_writing_with_lock", 0);
}
// Dirties an HTTP2 setting to be sent out next time a writing path occurs.
@ -1335,7 +1326,7 @@ static void log_metadata(const grpc_metadata_batch* md_batch, uint32_t id,
static void perform_stream_op_locked(void* stream_op,
grpc_error* error_ignored) {
GPR_TIMER_BEGIN("perform_stream_op_locked", 0);
GPR_TIMER_SCOPE("perform_stream_op_locked", 0);
grpc_transport_stream_op_batch* op =
(grpc_transport_stream_op_batch*)stream_op;
@ -1609,13 +1600,12 @@ static void perform_stream_op_locked(void* stream_op,
grpc_chttp2_complete_closure_step(t, s, &on_complete, GRPC_ERROR_NONE,
"op->on_complete");
GPR_TIMER_END("perform_stream_op_locked", 0);
GRPC_CHTTP2_STREAM_UNREF(s, "perform_stream_op");
}
static void perform_stream_op(grpc_transport* gt, grpc_stream* gs,
grpc_transport_stream_op_batch* op) {
GPR_TIMER_BEGIN("perform_stream_op", 0);
GPR_TIMER_SCOPE("perform_stream_op", 0);
grpc_chttp2_transport* t = (grpc_chttp2_transport*)gt;
grpc_chttp2_stream* s = (grpc_chttp2_stream*)gs;
@ -1644,7 +1634,6 @@ static void perform_stream_op(grpc_transport* gt, grpc_stream* gs,
GRPC_CLOSURE_INIT(&op->handler_private.closure, perform_stream_op_locked,
op, grpc_combiner_scheduler(t->combiner)),
GRPC_ERROR_NONE);
GPR_TIMER_END("perform_stream_op", 0);
}
static void cancel_pings(grpc_chttp2_transport* t, grpc_error* error) {
@ -2398,7 +2387,7 @@ static grpc_error* try_http_parsing(grpc_chttp2_transport* t) {
}
static void read_action_locked(void* tp, grpc_error* error) {
GPR_TIMER_BEGIN("reading_action_locked", 0);
GPR_TIMER_SCOPE("reading_action_locked", 0);
grpc_chttp2_transport* t = (grpc_chttp2_transport*)tp;
@ -2414,7 +2403,7 @@ static void read_action_locked(void* tp, grpc_error* error) {
GPR_SWAP(grpc_error*, err, error);
GRPC_ERROR_UNREF(err);
if (t->closed_with_error == GRPC_ERROR_NONE) {
GPR_TIMER_BEGIN("reading_action.parse", 0);
GPR_TIMER_SCOPE("reading_action.parse", 0);
size_t i = 0;
grpc_error* errors[3] = {GRPC_ERROR_REF(error), GRPC_ERROR_NONE,
GRPC_ERROR_NONE};
@ -2435,9 +2424,8 @@ static void read_action_locked(void* tp, grpc_error* error) {
for (i = 0; i < GPR_ARRAY_SIZE(errors); i++) {
GRPC_ERROR_UNREF(errors[i]);
}
GPR_TIMER_END("reading_action.parse", 0);
GPR_TIMER_BEGIN("post_parse_locked", 0);
GPR_TIMER_SCOPE("post_parse_locked", 0);
if (t->initial_window_update != 0) {
if (t->initial_window_update > 0) {
grpc_chttp2_stream* s;
@ -2449,10 +2437,9 @@ static void read_action_locked(void* tp, grpc_error* error) {
}
t->initial_window_update = 0;
}
GPR_TIMER_END("post_parse_locked", 0);
}
GPR_TIMER_BEGIN("post_reading_action_locked", 0);
GPR_TIMER_SCOPE("post_reading_action_locked", 0);
bool keep_reading = false;
if (error == GRPC_ERROR_NONE && t->closed_with_error != GRPC_ERROR_NONE) {
error = GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
@ -2482,11 +2469,7 @@ static void read_action_locked(void* tp, grpc_error* error) {
GRPC_CHTTP2_UNREF_TRANSPORT(t, "reading_action");
}
GPR_TIMER_END("post_reading_action_locked", 0);
GRPC_ERROR_UNREF(error);
GPR_TIMER_END("reading_action_locked", 0);
}
// t is reffed prior to calling the first time, and once the callback chain
@ -2786,12 +2769,11 @@ static void incoming_byte_stream_next_locked(void* argp,
static bool incoming_byte_stream_next(grpc_byte_stream* byte_stream,
size_t max_size_hint,
grpc_closure* on_complete) {
GPR_TIMER_BEGIN("incoming_byte_stream_next", 0);
GPR_TIMER_SCOPE("incoming_byte_stream_next", 0);
grpc_chttp2_incoming_byte_stream* bs =
(grpc_chttp2_incoming_byte_stream*)byte_stream;
grpc_chttp2_stream* s = bs->stream;
if (s->unprocessed_incoming_frames_buffer.length > 0) {
GPR_TIMER_END("incoming_byte_stream_next", 0);
return true;
} else {
gpr_ref(&bs->refs);
@ -2802,14 +2784,13 @@ static bool incoming_byte_stream_next(grpc_byte_stream* byte_stream,
incoming_byte_stream_next_locked, bs,
grpc_combiner_scheduler(bs->transport->combiner)),
GRPC_ERROR_NONE);
GPR_TIMER_END("incoming_byte_stream_next", 0);
return false;
}
}
static grpc_error* incoming_byte_stream_pull(grpc_byte_stream* byte_stream,
grpc_slice* slice) {
GPR_TIMER_BEGIN("incoming_byte_stream_pull", 0);
GPR_TIMER_SCOPE("incoming_byte_stream_pull", 0);
grpc_chttp2_incoming_byte_stream* bs =
(grpc_chttp2_incoming_byte_stream*)byte_stream;
grpc_chttp2_stream* s = bs->stream;
@ -2853,7 +2834,6 @@ static grpc_error* incoming_byte_stream_pull(grpc_byte_stream* byte_stream,
GRPC_CLOSURE_SCHED(&s->reset_byte_stream, GRPC_ERROR_REF(error));
return error;
}
GPR_TIMER_END("incoming_byte_stream_pull", 0);
return GRPC_ERROR_NONE;
}
@ -2861,7 +2841,7 @@ static void incoming_byte_stream_destroy_locked(void* byte_stream,
grpc_error* error_ignored);
static void incoming_byte_stream_destroy(grpc_byte_stream* byte_stream) {
GPR_TIMER_BEGIN("incoming_byte_stream_destroy", 0);
GPR_TIMER_SCOPE("incoming_byte_stream_destroy", 0);
grpc_chttp2_incoming_byte_stream* bs =
(grpc_chttp2_incoming_byte_stream*)byte_stream;
GRPC_CLOSURE_SCHED(
@ -2869,7 +2849,6 @@ static void incoming_byte_stream_destroy(grpc_byte_stream* byte_stream) {
incoming_byte_stream_destroy_locked, bs,
grpc_combiner_scheduler(bs->transport->combiner)),
GRPC_ERROR_NONE);
GPR_TIMER_END("incoming_byte_stream_destroy", 0);
}
static void incoming_byte_stream_publish_error(

@ -1618,19 +1618,17 @@ grpc_error* grpc_chttp2_header_parser_parse(void* hpack_parser,
grpc_chttp2_transport* t,
grpc_chttp2_stream* s,
grpc_slice slice, int is_last) {
GPR_TIMER_SCOPE("grpc_chttp2_hpack_parser_parse", 0);
grpc_chttp2_hpack_parser* parser = (grpc_chttp2_hpack_parser*)hpack_parser;
GPR_TIMER_BEGIN("grpc_chttp2_hpack_parser_parse", 0);
if (s != nullptr) {
s->stats.incoming.header_bytes += GRPC_SLICE_LENGTH(slice);
}
grpc_error* error = grpc_chttp2_hpack_parser_parse(parser, slice);
if (error != GRPC_ERROR_NONE) {
GPR_TIMER_END("grpc_chttp2_hpack_parser_parse", 0);
return error;
}
if (is_last) {
if (parser->is_boundary && parser->state != parse_begin) {
GPR_TIMER_END("grpc_chttp2_hpack_parser_parse", 0);
return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"end of header frame not aligned with a hpack record boundary");
}
@ -1639,7 +1637,6 @@ grpc_error* grpc_chttp2_header_parser_parse(void* hpack_parser,
if (s != nullptr) {
if (parser->is_boundary) {
if (s->header_frames_received == GPR_ARRAY_SIZE(s->metadata_buffer)) {
GPR_TIMER_END("grpc_chttp2_hpack_parser_parse", 0);
return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"Too many trailer frames");
}
@ -1674,6 +1671,5 @@ grpc_error* grpc_chttp2_header_parser_parse(void* hpack_parser,
parser->is_eof = 0xde;
parser->dynamic_table_update_allowed = 2;
}
GPR_TIMER_END("grpc_chttp2_hpack_parser_parse", 0);
return GRPC_ERROR_NONE;
}

@ -392,11 +392,10 @@ error_handler:
static void free_timeout(void* p) { gpr_free(p); }
static void on_initial_header(void* tp, grpc_mdelem md) {
GPR_TIMER_SCOPE("on_initial_header", 0);
grpc_chttp2_transport* t = (grpc_chttp2_transport*)tp;
grpc_chttp2_stream* s = t->incoming_stream;
GPR_TIMER_BEGIN("on_initial_header", 0);
GPR_ASSERT(s != nullptr);
if (grpc_http_trace.enabled()) {
@ -470,16 +469,13 @@ static void on_initial_header(void* tp, grpc_mdelem md) {
}
}
}
GPR_TIMER_END("on_initial_header", 0);
}
static void on_trailing_header(void* tp, grpc_mdelem md) {
GPR_TIMER_SCOPE("on_trailing_header", 0);
grpc_chttp2_transport* t = (grpc_chttp2_transport*)tp;
grpc_chttp2_stream* s = t->incoming_stream;
GPR_TIMER_BEGIN("on_trailing_header", 0);
GPR_ASSERT(s != nullptr);
if (grpc_http_trace.enabled()) {
@ -526,8 +522,6 @@ static void on_trailing_header(void* tp, grpc_mdelem md) {
GRPC_MDELEM_UNREF(md);
}
}
GPR_TIMER_END("on_trailing_header", 0);
}
static grpc_error* init_header_frame_parser(grpc_chttp2_transport* t,

@ -180,7 +180,7 @@ class WriteContext {
public:
WriteContext(grpc_chttp2_transport* t) : t_(t) {
GRPC_STATS_INC_HTTP2_WRITES_BEGUN();
GPR_TIMER_BEGIN("grpc_chttp2_begin_write", 0);
GPR_TIMER_SCOPE("grpc_chttp2_begin_write", 0);
}
// TODO(ctiller): make this the destructor
@ -614,13 +614,11 @@ grpc_chttp2_begin_write_result grpc_chttp2_begin_write(
maybe_initiate_ping(t);
GPR_TIMER_END("grpc_chttp2_begin_write", 0);
return ctx.Result();
}
void grpc_chttp2_end_write(grpc_chttp2_transport* t, grpc_error* error) {
GPR_TIMER_BEGIN("grpc_chttp2_end_write", 0);
GPR_TIMER_SCOPE("grpc_chttp2_end_write", 0);
grpc_chttp2_stream* s;
while (grpc_chttp2_list_pop_writing_stream(t, &s)) {
@ -633,5 +631,4 @@ void grpc_chttp2_end_write(grpc_chttp2_transport* t, grpc_error* error) {
}
grpc_slice_buffer_reset_and_unref_internal(&t->outbuf);
GRPC_ERROR_UNREF(error);
GPR_TIMER_END("grpc_chttp2_end_write", 0);
}

@ -21,13 +21,13 @@
#include <grpc/impl/codegen/port_platform.h>
#include <grpc/slice_buffer.h>
#include <grpc/support/alloc.h>
#include <grpc/support/host_port.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/useful.h>
#include "src/core/ext/transport/chttp2/transport/incoming_metadata.h"
#include "src/core/ext/transport/cronet/transport/cronet_transport.h"
#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/iomgr/endpoint.h"
#include "src/core/lib/iomgr/exec_ctx.h"

@ -29,8 +29,7 @@
int grpc_compression_algorithm_is_message(
grpc_compression_algorithm algorithm) {
return (algorithm >= GRPC_COMPRESS_MESSAGE_DEFLATE &&
algorithm <= GRPC_COMPRESS_MESSAGE_GZIP)
return (algorithm >= GRPC_COMPRESS_DEFLATE && algorithm <= GRPC_COMPRESS_GZIP)
? 1
: 0;
}
@ -44,11 +43,11 @@ int grpc_compression_algorithm_parse(grpc_slice name,
if (grpc_slice_eq(name, GRPC_MDSTR_IDENTITY)) {
*algorithm = GRPC_COMPRESS_NONE;
return 1;
} else if (grpc_slice_eq(name, GRPC_MDSTR_MESSAGE_SLASH_DEFLATE)) {
*algorithm = GRPC_COMPRESS_MESSAGE_DEFLATE;
} else if (grpc_slice_eq(name, GRPC_MDSTR_DEFLATE)) {
*algorithm = GRPC_COMPRESS_DEFLATE;
return 1;
} else if (grpc_slice_eq(name, GRPC_MDSTR_MESSAGE_SLASH_GZIP)) {
*algorithm = GRPC_COMPRESS_MESSAGE_GZIP;
} else if (grpc_slice_eq(name, GRPC_MDSTR_GZIP)) {
*algorithm = GRPC_COMPRESS_GZIP;
return 1;
} else if (grpc_slice_eq(name, GRPC_MDSTR_STREAM_SLASH_GZIP)) {
*algorithm = GRPC_COMPRESS_STREAM_GZIP;
@ -67,11 +66,11 @@ int grpc_compression_algorithm_name(grpc_compression_algorithm algorithm,
case GRPC_COMPRESS_NONE:
*name = "identity";
return 1;
case GRPC_COMPRESS_MESSAGE_DEFLATE:
*name = "message/deflate";
case GRPC_COMPRESS_DEFLATE:
*name = "deflate";
return 1;
case GRPC_COMPRESS_MESSAGE_GZIP:
*name = "message/gzip";
case GRPC_COMPRESS_GZIP:
*name = "gzip";
return 1;
case GRPC_COMPRESS_STREAM_GZIP:
*name = "stream/gzip";
@ -133,10 +132,10 @@ grpc_slice grpc_compression_algorithm_slice(
switch (algorithm) {
case GRPC_COMPRESS_NONE:
return GRPC_MDSTR_IDENTITY;
case GRPC_COMPRESS_MESSAGE_DEFLATE:
return GRPC_MDSTR_MESSAGE_SLASH_DEFLATE;
case GRPC_COMPRESS_MESSAGE_GZIP:
return GRPC_MDSTR_MESSAGE_SLASH_GZIP;
case GRPC_COMPRESS_DEFLATE:
return GRPC_MDSTR_DEFLATE;
case GRPC_COMPRESS_GZIP:
return GRPC_MDSTR_GZIP;
case GRPC_COMPRESS_STREAM_GZIP:
return GRPC_MDSTR_STREAM_SLASH_GZIP;
case GRPC_COMPRESS_ALGORITHMS_COUNT:
@ -148,10 +147,8 @@ grpc_slice grpc_compression_algorithm_slice(
grpc_compression_algorithm grpc_compression_algorithm_from_slice(
grpc_slice str) {
if (grpc_slice_eq(str, GRPC_MDSTR_IDENTITY)) return GRPC_COMPRESS_NONE;
if (grpc_slice_eq(str, GRPC_MDSTR_MESSAGE_SLASH_DEFLATE))
return GRPC_COMPRESS_MESSAGE_DEFLATE;
if (grpc_slice_eq(str, GRPC_MDSTR_MESSAGE_SLASH_GZIP))
return GRPC_COMPRESS_MESSAGE_GZIP;
if (grpc_slice_eq(str, GRPC_MDSTR_DEFLATE)) return GRPC_COMPRESS_DEFLATE;
if (grpc_slice_eq(str, GRPC_MDSTR_GZIP)) return GRPC_COMPRESS_GZIP;
if (grpc_slice_eq(str, GRPC_MDSTR_STREAM_SLASH_GZIP))
return GRPC_COMPRESS_STREAM_GZIP;
return GRPC_COMPRESS_ALGORITHMS_COUNT;
@ -162,9 +159,9 @@ grpc_mdelem grpc_compression_encoding_mdelem(
switch (algorithm) {
case GRPC_COMPRESS_NONE:
return GRPC_MDELEM_GRPC_ENCODING_IDENTITY;
case GRPC_COMPRESS_MESSAGE_DEFLATE:
case GRPC_COMPRESS_DEFLATE:
return GRPC_MDELEM_GRPC_ENCODING_DEFLATE;
case GRPC_COMPRESS_MESSAGE_GZIP:
case GRPC_COMPRESS_GZIP:
return GRPC_MDELEM_GRPC_ENCODING_GZIP;
case GRPC_COMPRESS_STREAM_GZIP:
return GRPC_MDELEM_GRPC_ENCODING_GZIP;

@ -80,9 +80,9 @@ grpc_message_compression_algorithm
grpc_compression_algorithm_to_message_compression_algorithm(
grpc_compression_algorithm algo) {
switch (algo) {
case GRPC_COMPRESS_MESSAGE_DEFLATE:
case GRPC_COMPRESS_DEFLATE:
return GRPC_MESSAGE_COMPRESS_DEFLATE;
case GRPC_COMPRESS_MESSAGE_GZIP:
case GRPC_COMPRESS_GZIP:
return GRPC_MESSAGE_COMPRESS_GZIP;
default:
return GRPC_MESSAGE_COMPRESS_NONE;
@ -147,10 +147,10 @@ int grpc_compression_algorithm_from_message_stream_compression_algorithm(
*algorithm = GRPC_COMPRESS_NONE;
return 1;
case GRPC_MESSAGE_COMPRESS_DEFLATE:
*algorithm = GRPC_COMPRESS_MESSAGE_DEFLATE;
*algorithm = GRPC_COMPRESS_DEFLATE;
return 1;
case GRPC_MESSAGE_COMPRESS_GZIP:
*algorithm = GRPC_COMPRESS_MESSAGE_GZIP;
*algorithm = GRPC_COMPRESS_GZIP;
return 1;
default:
*algorithm = GRPC_COMPRESS_NONE;

@ -1,66 +0,0 @@
/*
*
* Copyright 2017 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/compression_ruby.h>
#include <grpc/support/useful.h>
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/transport/static_metadata.h"
int grpc_compression_algorithm_parse_ruby(
grpc_slice name, grpc_compression_algorithm* algorithm) {
if (grpc_slice_eq(name, GRPC_MDSTR_IDENTITY)) {
*algorithm = GRPC_COMPRESS_NONE;
return 1;
} else if (grpc_slice_eq(name, GRPC_MDSTR_DEFLATE)) {
*algorithm = GRPC_COMPRESS_MESSAGE_DEFLATE;
return 1;
} else if (grpc_slice_eq(name, GRPC_MDSTR_GZIP)) {
*algorithm = GRPC_COMPRESS_MESSAGE_GZIP;
return 1;
} else if (grpc_slice_eq(name, GRPC_MDSTR_STREAM_SLASH_GZIP)) {
*algorithm = GRPC_COMPRESS_STREAM_GZIP;
return 1;
} else {
return 0;
}
return 0;
}
int grpc_compression_algorithm_name_ruby(grpc_compression_algorithm algorithm,
const char** name) {
GRPC_API_TRACE("grpc_compression_algorithm_parse(algorithm=%d, name=%p)", 2,
((int)algorithm, name));
switch (algorithm) {
case GRPC_COMPRESS_NONE:
*name = "identity";
return 1;
case GRPC_COMPRESS_MESSAGE_DEFLATE:
*name = "deflate";
return 1;
case GRPC_COMPRESS_MESSAGE_GZIP:
*name = "gzip";
return 1;
case GRPC_COMPRESS_STREAM_GZIP:
*name = "stream/gzip";
return 1;
case GRPC_COMPRESS_ALGORITHMS_COUNT:
return 0;
}
return 0;
}

@ -50,43 +50,39 @@ void gpr_set_allocation_functions(gpr_allocation_functions functions) {
}
void* gpr_malloc(size_t size) {
GPR_TIMER_SCOPE("gpr_malloc", 0);
void* p;
if (size == 0) return nullptr;
GPR_TIMER_BEGIN("gpr_malloc", 0);
p = g_alloc_functions.malloc_fn(size);
if (!p) {
abort();
}
GPR_TIMER_END("gpr_malloc", 0);
return p;
}
void* gpr_zalloc(size_t size) {
GPR_TIMER_SCOPE("gpr_zalloc", 0);
void* p;
if (size == 0) return nullptr;
GPR_TIMER_BEGIN("gpr_zalloc", 0);
p = g_alloc_functions.zalloc_fn(size);
if (!p) {
abort();
}
GPR_TIMER_END("gpr_zalloc", 0);
return p;
}
void gpr_free(void* p) {
GPR_TIMER_BEGIN("gpr_free", 0);
GPR_TIMER_SCOPE("gpr_free", 0);
g_alloc_functions.free_fn(p);
GPR_TIMER_END("gpr_free", 0);
}
void* gpr_realloc(void* p, size_t size) {
GPR_TIMER_SCOPE("gpr_realloc", 0);
if ((size == 0) && (p == nullptr)) return nullptr;
GPR_TIMER_BEGIN("gpr_realloc", 0);
p = g_alloc_functions.realloc_fn(p, size);
if (!p) {
abort();
}
GPR_TIMER_END("gpr_realloc", 0);
return p;
}

@ -29,7 +29,7 @@
variable exists). */
char* gpr_getenv(const char* name);
/* Sets the the environment with the specified name to the specified value. */
/* Sets the environment with the specified name to the specified value. */
void gpr_setenv(const char* name, const char* value);
/* This is a version of gpr_getenv that does not produce any output if it has to

@ -16,13 +16,14 @@
*
*/
#include <grpc/support/host_port.h>
#include "src/core/lib/gpr/host_port.h"
#include <string.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include "src/core/lib/gpr/string.h"
int gpr_join_host_port(char** out, const char* host, int port) {

@ -16,15 +16,11 @@
*
*/
#ifndef GRPC_SUPPORT_HOST_PORT_H
#define GRPC_SUPPORT_HOST_PORT_H
#ifndef GRPC_CORE_LIB_GPR_HOST_PORT_H
#define GRPC_CORE_LIB_GPR_HOST_PORT_H
#include <grpc/support/port_platform.h>
#ifdef __cplusplus
extern "C" {
#endif
/** Given a host and port, creates a newly-allocated string of the form
"host:port" or "[ho:st]:port", depending on whether the host contains colons
like an IPv6 literal. If the host is already bracketed, then additional
@ -35,17 +31,13 @@ extern "C" {
destroyed using gpr_free().
In the unlikely event of an error, returns -1 and sets *out to NULL. */
GPRAPI int gpr_join_host_port(char** out, const char* host, int port);
int gpr_join_host_port(char** out, const char* host, int port);
/** Given a name in the form "host:port" or "[ho:st]:port", split into hostname
and port number, into newly allocated strings, which must later be
destroyed using gpr_free().
Return 1 on success, 0 on failure. Guarantees *host and *port == NULL on
failure. */
GPRAPI int gpr_split_host_port(const char* name, char** host, char** port);
#ifdef __cplusplus
}
#endif
int gpr_split_host_port(const char* name, char** host, char** port);
#endif /* GRPC_SUPPORT_HOST_PORT_H */
#endif /* GRPC_CORE_LIB_GPR_HOST_PORT_H */

@ -43,23 +43,19 @@ void gpr_mu_lock(gpr_mu* mu) {
#ifdef GPR_LOW_LEVEL_COUNTERS
GPR_ATM_INC_COUNTER(gpr_mu_locks);
#endif
GPR_TIMER_BEGIN("gpr_mu_lock", 0);
GPR_TIMER_SCOPE("gpr_mu_lock", 0);
GPR_ASSERT(pthread_mutex_lock(mu) == 0);
GPR_TIMER_END("gpr_mu_lock", 0);
}
void gpr_mu_unlock(gpr_mu* mu) {
GPR_TIMER_BEGIN("gpr_mu_unlock", 0);
GPR_TIMER_SCOPE("gpr_mu_unlock", 0);
GPR_ASSERT(pthread_mutex_unlock(mu) == 0);
GPR_TIMER_END("gpr_mu_unlock", 0);
}
int gpr_mu_trylock(gpr_mu* mu) {
int err;
GPR_TIMER_BEGIN("gpr_mu_trylock", 0);
err = pthread_mutex_trylock(mu);
GPR_TIMER_SCOPE("gpr_mu_trylock", 0);
int err = pthread_mutex_trylock(mu);
GPR_ASSERT(err == 0 || err == EBUSY);
GPR_TIMER_END("gpr_mu_trylock", 0);
return err == 0;
}

@ -28,6 +28,7 @@
#include "src/core/lib/gprpp/abstract.h"
#include "src/core/lib/gprpp/debug_location.h"
#include "src/core/lib/gprpp/memory.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
namespace grpc_core {
@ -69,6 +70,7 @@ inline OrphanablePtr<T> MakeOrphanable(Args&&... args) {
}
// A type of Orphanable with internal ref-counting.
template <typename Child>
class InternallyRefCounted : public Orphanable {
public:
// Not copyable nor movable.
@ -78,10 +80,20 @@ class InternallyRefCounted : public Orphanable {
GRPC_ABSTRACT_BASE_CLASS
protected:
// Allow Delete() to access destructor.
template <typename T>
friend void Delete(T*);
// Allow RefCountedPtr<> to access Unref() and IncrementRefCount().
friend class RefCountedPtr<Child>;
InternallyRefCounted() { gpr_ref_init(&refs_, 1); }
virtual ~InternallyRefCounted() {}
void Ref() { gpr_ref(&refs_); }
RefCountedPtr<Child> Ref() GRPC_MUST_USE_RESULT {
IncrementRefCount();
return RefCountedPtr<Child>(static_cast<Child*>(this));
}
void Unref() {
if (gpr_unref(&refs_)) {
@ -89,11 +101,9 @@ class InternallyRefCounted : public Orphanable {
}
}
// Allow Delete() to access destructor.
template <typename T>
friend void Delete(T*);
private:
void IncrementRefCount() { gpr_ref(&refs_); }
gpr_refcount refs_;
};
@ -103,6 +113,7 @@ class InternallyRefCounted : public Orphanable {
// pointers and legacy code that is manually calling Ref() and Unref().
// Once all of our code is converted to idiomatic C++, we may be able to
// eliminate this class.
template <typename Child>
class InternallyRefCountedWithTracing : public Orphanable {
public:
// Not copyable nor movable.
@ -118,6 +129,9 @@ class InternallyRefCountedWithTracing : public Orphanable {
template <typename T>
friend void Delete(T*);
// Allow RefCountedPtr<> to access Unref() and IncrementRefCount().
friend class RefCountedPtr<Child>;
InternallyRefCountedWithTracing()
: InternallyRefCountedWithTracing(static_cast<TraceFlag*>(nullptr)) {}
@ -133,18 +147,27 @@ class InternallyRefCountedWithTracing : public Orphanable {
virtual ~InternallyRefCountedWithTracing() {}
void Ref() { gpr_ref(&refs_); }
RefCountedPtr<Child> Ref() GRPC_MUST_USE_RESULT {
IncrementRefCount();
return RefCountedPtr<Child>(static_cast<Child*>(this));
}
void Ref(const DebugLocation& location, const char* reason) {
RefCountedPtr<Child> Ref(const DebugLocation& location,
const char* reason) GRPC_MUST_USE_RESULT {
if (location.Log() && trace_flag_ != nullptr && trace_flag_->enabled()) {
gpr_atm old_refs = gpr_atm_no_barrier_load(&refs_.count);
gpr_log(GPR_DEBUG, "%s:%p %s:%d ref %" PRIdPTR " -> %" PRIdPTR " %s",
trace_flag_->name(), this, location.file(), location.line(),
old_refs, old_refs + 1, reason);
}
Ref();
return Ref();
}
// TODO(roth): Once all of our code is converted to C++ and can use
// RefCountedPtr<> instead of manual ref-counting, make the Unref() methods
// private, since they will only be used by RefCountedPtr<>, which is a
// friend of this class.
void Unref() {
if (gpr_unref(&refs_)) {
Delete(this);
@ -162,6 +185,8 @@ class InternallyRefCountedWithTracing : public Orphanable {
}
private:
void IncrementRefCount() { gpr_ref(&refs_); }
TraceFlag* trace_flag_ = nullptr;
gpr_refcount refs_;
};

@ -26,16 +26,28 @@
#include "src/core/lib/gprpp/abstract.h"
#include "src/core/lib/gprpp/debug_location.h"
#include "src/core/lib/gprpp/memory.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
namespace grpc_core {
// A base class for reference-counted objects.
// New objects should be created via New() and start with a refcount of 1.
// When the refcount reaches 0, the object will be deleted via Delete().
//
// This will commonly be used by CRTP (curiously-recurring template pattern)
// e.g., class MyClass : public RefCounted<MyClass>
template <typename Child>
class RefCounted {
public:
void Ref() { gpr_ref(&refs_); }
RefCountedPtr<Child> Ref() GRPC_MUST_USE_RESULT {
IncrementRefCount();
return RefCountedPtr<Child>(static_cast<Child*>(this));
}
// TODO(roth): Once all of our code is converted to C++ and can use
// RefCountedPtr<> instead of manual ref-counting, make this method
// private, since it will only be used by RefCountedPtr<>, which is a
// friend of this class.
void Unref() {
if (gpr_unref(&refs_)) {
Delete(this);
@ -58,6 +70,11 @@ class RefCounted {
virtual ~RefCounted() {}
private:
// Allow RefCountedPtr<> to access IncrementRefCount().
friend class RefCountedPtr<Child>;
void IncrementRefCount() { gpr_ref(&refs_); }
gpr_refcount refs_;
};
@ -67,20 +84,30 @@ class RefCounted {
// pointers and legacy code that is manually calling Ref() and Unref().
// Once all of our code is converted to idiomatic C++, we may be able to
// eliminate this class.
template <typename Child>
class RefCountedWithTracing {
public:
void Ref() { gpr_ref(&refs_); }
RefCountedPtr<Child> Ref() GRPC_MUST_USE_RESULT {
IncrementRefCount();
return RefCountedPtr<Child>(static_cast<Child*>(this));
}
void Ref(const DebugLocation& location, const char* reason) {
RefCountedPtr<Child> Ref(const DebugLocation& location,
const char* reason) GRPC_MUST_USE_RESULT {
if (location.Log() && trace_flag_ != nullptr && trace_flag_->enabled()) {
gpr_atm old_refs = gpr_atm_no_barrier_load(&refs_.count);
gpr_log(GPR_DEBUG, "%s:%p %s:%d ref %" PRIdPTR " -> %" PRIdPTR " %s",
trace_flag_->name(), this, location.file(), location.line(),
old_refs, old_refs + 1, reason);
}
Ref();
return Ref();
}
// TODO(roth): Once all of our code is converted to C++ and can use
// RefCountedPtr<> instead of manual ref-counting, make the Unref() methods
// private, since they will only be used by RefCountedPtr<>, which is a
// friend of this class.
void Unref() {
if (gpr_unref(&refs_)) {
Delete(this);
@ -124,6 +151,11 @@ class RefCountedWithTracing {
virtual ~RefCountedWithTracing() {}
private:
// Allow RefCountedPtr<> to access IncrementRefCount().
friend class RefCountedPtr<Child>;
void IncrementRefCount() { gpr_ref(&refs_); }
TraceFlag* trace_flag_ = nullptr;
gpr_refcount refs_;
};

@ -25,8 +25,8 @@
namespace grpc_core {
// A smart pointer class for objects that provide Ref() and Unref() methods,
// such as those provided by the RefCounted base class.
// A smart pointer class for objects that provide IncrementRefCount() and
// Unref() methods, such as those provided by the RefCounted base class.
template <typename T>
class RefCountedPtr {
public:
@ -49,13 +49,13 @@ class RefCountedPtr {
// Copy support.
RefCountedPtr(const RefCountedPtr& other) {
if (other.value_ != nullptr) other.value_->Ref();
if (other.value_ != nullptr) other.value_->IncrementRefCount();
value_ = other.value_;
}
RefCountedPtr& operator=(const RefCountedPtr& other) {
// Note: Order of reffing and unreffing is important here in case value_
// and other.value_ are the same object.
if (other.value_ != nullptr) other.value_->Ref();
if (other.value_ != nullptr) other.value_->IncrementRefCount();
if (value_ != nullptr) value_->Unref();
value_ = other.value_;
return *this;
@ -71,6 +71,16 @@ class RefCountedPtr {
value_ = value;
}
// TODO(roth): This method exists solely as a transition mechanism to allow
// us to pass a ref to idiomatic C code that does not use RefCountedPtr<>.
// Once all of our code has been converted to idiomatic C++, this
// method should go away.
T* release() {
T* value = value_;
value_ = nullptr;
return value;
}
T* get() const { return value_; }
T& operator*() const { return *value_; }

@ -60,7 +60,7 @@ void grpc_call_combiner_start(grpc_call_combiner* call_combiner,
grpc_closure* closure,
grpc_error* error DEBUG_ARGS,
const char* reason) {
GPR_TIMER_BEGIN("call_combiner_start", 0);
GPR_TIMER_SCOPE("call_combiner_start", 0);
if (grpc_call_combiner_trace.enabled()) {
gpr_log(GPR_DEBUG,
"==> grpc_call_combiner_start() [%p] closure=%p [" DEBUG_FMT_STR
@ -92,12 +92,11 @@ void grpc_call_combiner_start(grpc_call_combiner* call_combiner,
closure->error_data.error = error;
gpr_mpscq_push(&call_combiner->queue, (gpr_mpscq_node*)closure);
}
GPR_TIMER_END("call_combiner_start", 0);
}
void grpc_call_combiner_stop(grpc_call_combiner* call_combiner DEBUG_ARGS,
const char* reason) {
GPR_TIMER_BEGIN("call_combiner_stop", 0);
GPR_TIMER_SCOPE("call_combiner_stop", 0);
if (grpc_call_combiner_trace.enabled()) {
gpr_log(GPR_DEBUG,
"==> grpc_call_combiner_stop() [%p] [" DEBUG_FMT_STR "%s]",
@ -136,7 +135,6 @@ void grpc_call_combiner_stop(grpc_call_combiner* call_combiner DEBUG_ARGS,
} else if (grpc_call_combiner_trace.enabled()) {
gpr_log(GPR_DEBUG, " queue empty");
}
GPR_TIMER_END("call_combiner_stop", 0);
}
void grpc_call_combiner_set_notify_on_cancel(grpc_call_combiner* call_combiner,

@ -247,7 +247,7 @@ inline void grpc_closure_run(const char* file, int line, grpc_closure* c,
#else
inline void grpc_closure_run(grpc_closure* c, grpc_error* error) {
#endif
GPR_TIMER_BEGIN("grpc_closure_run", 0);
GPR_TIMER_SCOPE("grpc_closure_run", 0);
if (c != nullptr) {
#ifndef NDEBUG
c->file_initiated = file;
@ -259,7 +259,6 @@ inline void grpc_closure_run(grpc_closure* c, grpc_error* error) {
} else {
GRPC_ERROR_UNREF(error);
}
GPR_TIMER_END("grpc_closure_run", 0);
}
/** Run a closure directly. Caller ensures that no locks are being held above.
@ -278,7 +277,7 @@ inline void grpc_closure_sched(const char* file, int line, grpc_closure* c,
#else
inline void grpc_closure_sched(grpc_closure* c, grpc_error* error) {
#endif
GPR_TIMER_BEGIN("grpc_closure_sched", 0);
GPR_TIMER_SCOPE("grpc_closure_sched", 0);
if (c != nullptr) {
#ifndef NDEBUG
if (c->scheduled) {
@ -299,7 +298,6 @@ inline void grpc_closure_sched(grpc_closure* c, grpc_error* error) {
} else {
GRPC_ERROR_UNREF(error);
}
GPR_TIMER_END("grpc_closure_sched", 0);
}
/** Schedule a closure to be run. Does not need to be run from a safe point. */

@ -153,8 +153,8 @@ static void push_first_on_exec_ctx(grpc_combiner* lock) {
offsetof(grpc_combiner, scheduler_name)))
static void combiner_exec(grpc_closure* cl, grpc_error* error) {
GPR_TIMER_SCOPE("combiner.execute", 0);
GRPC_STATS_INC_COMBINER_LOCKS_SCHEDULED_ITEMS();
GPR_TIMER_BEGIN("combiner.execute", 0);
grpc_combiner* lock = COMBINER_FROM_CLOSURE_SCHEDULER(cl, scheduler);
gpr_atm last = gpr_atm_full_fetch_add(&lock->state, STATE_ELEM_COUNT_LOW_BIT);
GRPC_COMBINER_TRACE(gpr_log(GPR_DEBUG,
@ -181,7 +181,6 @@ static void combiner_exec(grpc_closure* cl, grpc_error* error) {
assert(cl->cb);
cl->error_data.error = error;
gpr_mpscq_push(&lock->queue, &cl->next_data.atm_next);
GPR_TIMER_END("combiner.execute", 0);
}
static void move_next() {
@ -207,11 +206,10 @@ static void queue_offload(grpc_combiner* lock) {
}
bool grpc_combiner_continue_exec_ctx() {
GPR_TIMER_BEGIN("combiner.continue_exec_ctx", 0);
GPR_TIMER_SCOPE("combiner.continue_exec_ctx", 0);
grpc_combiner* lock =
grpc_core::ExecCtx::Get()->combiner_data()->active_combiner;
if (lock == nullptr) {
GPR_TIMER_END("combiner.continue_exec_ctx", 0);
return false;
}
@ -233,7 +231,6 @@ bool grpc_combiner_continue_exec_ctx() {
// this execution context wants to move on: schedule remaining work to be
// picked up on the executor
queue_offload(lock);
GPR_TIMER_END("combiner.continue_exec_ctx", 0);
return true;
}
@ -249,10 +246,9 @@ bool grpc_combiner_continue_exec_ctx() {
// go off and do something else for a while (and come back later)
GPR_TIMER_MARK("delay_busy", 0);
queue_offload(lock);
GPR_TIMER_END("combiner.continue_exec_ctx", 0);
return true;
}
GPR_TIMER_BEGIN("combiner.exec1", 0);
GPR_TIMER_SCOPE("combiner.exec1", 0);
grpc_closure* cl = (grpc_closure*)n;
grpc_error* cl_err = cl->error_data.error;
#ifndef NDEBUG
@ -260,14 +256,13 @@ bool grpc_combiner_continue_exec_ctx() {
#endif
cl->cb(cl->cb_arg, cl_err);
GRPC_ERROR_UNREF(cl_err);
GPR_TIMER_END("combiner.exec1", 0);
} else {
grpc_closure* c = lock->final_list.head;
GPR_ASSERT(c != nullptr);
grpc_closure_list_init(&lock->final_list);
int loops = 0;
while (c != nullptr) {
GPR_TIMER_BEGIN("combiner.exec_1final", 0);
GPR_TIMER_SCOPE("combiner.exec_1final", 0);
GRPC_COMBINER_TRACE(
gpr_log(GPR_DEBUG, "C:%p execute_final[%d] c=%p", lock, loops, c));
grpc_closure* next = c->next_data.next;
@ -278,7 +273,6 @@ bool grpc_combiner_continue_exec_ctx() {
c->cb(c->cb_arg, error);
GRPC_ERROR_UNREF(error);
c = next;
GPR_TIMER_END("combiner.exec_1final", 0);
}
}
@ -308,41 +302,36 @@ bool grpc_combiner_continue_exec_ctx() {
break;
case OLD_STATE_WAS(false, 1):
// had one count, one unorphaned --> unlocked unorphaned
GPR_TIMER_END("combiner.continue_exec_ctx", 0);
return true;
case OLD_STATE_WAS(true, 1):
// and one count, one orphaned --> unlocked and orphaned
really_destroy(lock);
GPR_TIMER_END("combiner.continue_exec_ctx", 0);
return true;
case OLD_STATE_WAS(false, 0):
case OLD_STATE_WAS(true, 0):
// these values are illegal - representing an already unlocked or
// deleted lock
GPR_TIMER_END("combiner.continue_exec_ctx", 0);
GPR_UNREACHABLE_CODE(return true);
}
push_first_on_exec_ctx(lock);
GPR_TIMER_END("combiner.continue_exec_ctx", 0);
return true;
}
static void enqueue_finally(void* closure, grpc_error* error);
static void combiner_finally_exec(grpc_closure* closure, grpc_error* error) {
GPR_TIMER_SCOPE("combiner.execute_finally", 0);
GRPC_STATS_INC_COMBINER_LOCKS_SCHEDULED_FINAL_ITEMS();
grpc_combiner* lock =
COMBINER_FROM_CLOSURE_SCHEDULER(closure, finally_scheduler);
GRPC_COMBINER_TRACE(gpr_log(
GPR_DEBUG, "C:%p grpc_combiner_execute_finally c=%p; ac=%p", lock,
closure, grpc_core::ExecCtx::Get()->combiner_data()->active_combiner));
GPR_TIMER_BEGIN("combiner.execute_finally", 0);
if (grpc_core::ExecCtx::Get()->combiner_data()->active_combiner != lock) {
GPR_TIMER_MARK("slowpath", 0);
GRPC_CLOSURE_SCHED(GRPC_CLOSURE_CREATE(enqueue_finally, closure,
grpc_combiner_scheduler(lock)),
error);
GPR_TIMER_END("combiner.execute_finally", 0);
return;
}
@ -350,7 +339,6 @@ static void combiner_finally_exec(grpc_closure* closure, grpc_error* error) {
gpr_atm_full_fetch_add(&lock->state, STATE_ELEM_COUNT_LOW_BIT);
}
grpc_closure_list_append(&lock->final_list, closure, error);
GPR_TIMER_END("combiner.execute_finally", 0);
}
static void enqueue_finally(void* closure, grpc_error* error) {

@ -314,7 +314,7 @@ static void internal_add_error(grpc_error** err, grpc_error* new_err) {
grpc_error* grpc_error_create(const char* file, int line, grpc_slice desc,
grpc_error** referencing,
size_t num_referencing) {
GPR_TIMER_BEGIN("grpc_error_create", 0);
GPR_TIMER_SCOPE("grpc_error_create", 0);
uint8_t initial_arena_capacity = (uint8_t)(
DEFAULT_ERROR_CAPACITY +
(uint8_t)(num_referencing * SLOTS_PER_LINKED_ERROR) + SURPLUS_CAPACITY);
@ -355,7 +355,6 @@ grpc_error* grpc_error_create(const char* file, int line, grpc_slice desc,
gpr_atm_no_barrier_store(&err->atomics.error_string, 0);
gpr_ref_init(&err->atomics.refs, 1);
GPR_TIMER_END("grpc_error_create", 0);
return err;
}
@ -378,7 +377,7 @@ static void ref_errs(grpc_error* err) {
}
static grpc_error* copy_error_and_unref(grpc_error* in) {
GPR_TIMER_BEGIN("copy_error_and_unref", 0);
GPR_TIMER_SCOPE("copy_error_and_unref", 0);
grpc_error* out;
if (grpc_error_is_special(in)) {
out = GRPC_ERROR_CREATE_FROM_STATIC_STRING("unknown");
@ -422,16 +421,14 @@ static grpc_error* copy_error_and_unref(grpc_error* in) {
ref_errs(out);
GRPC_ERROR_UNREF(in);
}
GPR_TIMER_END("copy_error_and_unref", 0);
return out;
}
grpc_error* grpc_error_set_int(grpc_error* src, grpc_error_ints which,
intptr_t value) {
GPR_TIMER_BEGIN("grpc_error_set_int", 0);
GPR_TIMER_SCOPE("grpc_error_set_int", 0);
grpc_error* new_err = copy_error_and_unref(src);
internal_set_int(&new_err, which, value);
GPR_TIMER_END("grpc_error_set_int", 0);
return new_err;
}
@ -447,36 +444,31 @@ static special_error_status_map error_status_map[] = {
};
bool grpc_error_get_int(grpc_error* err, grpc_error_ints which, intptr_t* p) {
GPR_TIMER_BEGIN("grpc_error_get_int", 0);
GPR_TIMER_SCOPE("grpc_error_get_int", 0);
if (grpc_error_is_special(err)) {
if (which == GRPC_ERROR_INT_GRPC_STATUS) {
for (size_t i = 0; i < GPR_ARRAY_SIZE(error_status_map); i++) {
if (error_status_map[i].error == err) {
if (p != nullptr) *p = error_status_map[i].code;
GPR_TIMER_END("grpc_error_get_int", 0);
return true;
}
}
}
GPR_TIMER_END("grpc_error_get_int", 0);
return false;
}
uint8_t slot = err->ints[which];
if (slot != UINT8_MAX) {
if (p != nullptr) *p = err->arena[slot];
GPR_TIMER_END("grpc_error_get_int", 0);
return true;
}
GPR_TIMER_END("grpc_error_get_int", 0);
return false;
}
grpc_error* grpc_error_set_str(grpc_error* src, grpc_error_strs which,
grpc_slice str) {
GPR_TIMER_BEGIN("grpc_error_set_str", 0);
GPR_TIMER_SCOPE("grpc_error_set_str", 0);
grpc_error* new_err = copy_error_and_unref(src);
internal_set_str(&new_err, which, str);
GPR_TIMER_END("grpc_error_set_str", 0);
return new_err;
}
@ -503,10 +495,9 @@ bool grpc_error_get_str(grpc_error* err, grpc_error_strs which,
}
grpc_error* grpc_error_add_child(grpc_error* src, grpc_error* child) {
GPR_TIMER_BEGIN("grpc_error_add_child", 0);
GPR_TIMER_SCOPE("grpc_error_add_child", 0);
grpc_error* new_err = copy_error_and_unref(src);
internal_add_error(&new_err, child);
GPR_TIMER_END("grpc_error_add_child", 0);
return new_err;
}
@ -722,14 +713,13 @@ static char* finish_kvs(kv_pairs* kvs) {
}
const char* grpc_error_string(grpc_error* err) {
GPR_TIMER_BEGIN("grpc_error_string", 0);
GPR_TIMER_SCOPE("grpc_error_string", 0);
if (err == GRPC_ERROR_NONE) return no_error_string;
if (err == GRPC_ERROR_OOM) return oom_error_string;
if (err == GRPC_ERROR_CANCELLED) return cancelled_error_string;
void* p = (void*)gpr_atm_acq_load(&err->atomics.error_string);
if (p != nullptr) {
GPR_TIMER_END("grpc_error_string", 0);
return (const char*)p;
}
@ -752,7 +742,6 @@ const char* grpc_error_string(grpc_error* err) {
out = (char*)gpr_atm_acq_load(&err->atomics.error_string);
}
GPR_TIMER_END("grpc_error_string", 0);
return out;
}

@ -519,7 +519,7 @@ static void pollset_destroy(grpc_pollset* pollset) {
}
static grpc_error* pollset_kick_all(grpc_pollset* pollset) {
GPR_TIMER_BEGIN("pollset_kick_all", 0);
GPR_TIMER_SCOPE("pollset_kick_all", 0);
grpc_error* error = GRPC_ERROR_NONE;
if (pollset->root_worker != nullptr) {
grpc_pollset_worker* worker = pollset->root_worker;
@ -549,7 +549,6 @@ static grpc_error* pollset_kick_all(grpc_pollset* pollset) {
}
// TODO: sreek. Check if we need to set 'kicked_without_poller' to true here
// in the else case
GPR_TIMER_END("pollset_kick_all", 0);
return error;
}
@ -563,14 +562,13 @@ static void pollset_maybe_finish_shutdown(grpc_pollset* pollset) {
}
static void pollset_shutdown(grpc_pollset* pollset, grpc_closure* closure) {
GPR_TIMER_BEGIN("pollset_shutdown", 0);
GPR_TIMER_SCOPE("pollset_shutdown", 0);
GPR_ASSERT(pollset->shutdown_closure == nullptr);
GPR_ASSERT(!pollset->shutting_down);
pollset->shutdown_closure = closure;
pollset->shutting_down = true;
GRPC_LOG_IF_ERROR("pollset_shutdown", pollset_kick_all(pollset));
pollset_maybe_finish_shutdown(pollset);
GPR_TIMER_END("pollset_shutdown", 0);
}
static int poll_deadline_to_millis_timeout(grpc_millis millis) {
@ -594,10 +592,10 @@ static int poll_deadline_to_millis_timeout(grpc_millis millis) {
called by g_active_poller thread. So there is no need for synchronization
when accessing fields in g_epoll_set */
static grpc_error* process_epoll_events(grpc_pollset* pollset) {
GPR_TIMER_SCOPE("process_epoll_events", 0);
static const char* err_desc = "process_events";
grpc_error* error = GRPC_ERROR_NONE;
GPR_TIMER_BEGIN("process_epoll_events", 0);
long num_events = gpr_atm_acq_load(&g_epoll_set.num_events);
long cursor = gpr_atm_acq_load(&g_epoll_set.cursor);
for (int idx = 0;
@ -626,7 +624,6 @@ static grpc_error* process_epoll_events(grpc_pollset* pollset) {
}
}
gpr_atm_rel_store(&g_epoll_set.cursor, cursor);
GPR_TIMER_END("process_epoll_events", 0);
return error;
}
@ -638,7 +635,7 @@ static grpc_error* process_epoll_events(grpc_pollset* pollset) {
(i.e the designated poller thread) will be calling this function. So there is
no need for any synchronization when accesing fields in g_epoll_set */
static grpc_error* do_epoll_wait(grpc_pollset* ps, grpc_millis deadline) {
GPR_TIMER_BEGIN("do_epoll_wait", 0);
GPR_TIMER_SCOPE("do_epoll_wait", 0);
int r;
int timeout = poll_deadline_to_millis_timeout(deadline);
@ -665,14 +662,13 @@ static grpc_error* do_epoll_wait(grpc_pollset* ps, grpc_millis deadline) {
gpr_atm_rel_store(&g_epoll_set.num_events, r);
gpr_atm_rel_store(&g_epoll_set.cursor, 0);
GPR_TIMER_END("do_epoll_wait", 0);
return GRPC_ERROR_NONE;
}
static bool begin_worker(grpc_pollset* pollset, grpc_pollset_worker* worker,
grpc_pollset_worker** worker_hdl,
grpc_millis deadline) {
GPR_TIMER_BEGIN("begin_worker", 0);
GPR_TIMER_SCOPE("begin_worker", 0);
if (worker_hdl != nullptr) *worker_hdl = worker;
worker->initialized_cv = false;
SET_KICK_STATE(worker, UNKICKED);
@ -786,17 +782,15 @@ static bool begin_worker(grpc_pollset* pollset, grpc_pollset_worker* worker,
if (pollset->kicked_without_poller) {
pollset->kicked_without_poller = false;
GPR_TIMER_END("begin_worker", 0);
return false;
}
GPR_TIMER_END("begin_worker", 0);
return worker->state == DESIGNATED_POLLER && !pollset->shutting_down;
}
static bool check_neighborhood_for_available_poller(
pollset_neighborhood* neighborhood) {
GPR_TIMER_BEGIN("check_neighborhood_for_available_poller", 0);
GPR_TIMER_SCOPE("check_neighborhood_for_available_poller", 0);
bool found_worker = false;
do {
grpc_pollset* inspect = neighborhood->active_root;
@ -855,13 +849,12 @@ static bool check_neighborhood_for_available_poller(
}
gpr_mu_unlock(&inspect->mu);
} while (!found_worker);
GPR_TIMER_END("check_neighborhood_for_available_poller", 0);
return found_worker;
}
static void end_worker(grpc_pollset* pollset, grpc_pollset_worker* worker,
grpc_pollset_worker** worker_hdl) {
GPR_TIMER_BEGIN("end_worker", 0);
GPR_TIMER_SCOPE("end_worker", 0);
if (grpc_polling_trace.enabled()) {
gpr_log(GPR_DEBUG, "PS:%p END_WORKER:%p", pollset, worker);
}
@ -931,7 +924,6 @@ static void end_worker(grpc_pollset* pollset, grpc_pollset_worker* worker,
pollset_maybe_finish_shutdown(pollset);
}
GPR_ASSERT(gpr_atm_no_barrier_load(&g_active_poller) != (gpr_atm)worker);
GPR_TIMER_END("end_worker", 0);
}
/* pollset->po.mu lock must be held by the caller before calling this.
@ -941,13 +933,12 @@ static void end_worker(grpc_pollset* pollset, grpc_pollset_worker* worker,
static grpc_error* pollset_work(grpc_pollset* ps,
grpc_pollset_worker** worker_hdl,
grpc_millis deadline) {
GPR_TIMER_SCOPE("pollset_work", 0);
grpc_pollset_worker worker;
grpc_error* error = GRPC_ERROR_NONE;
static const char* err_desc = "pollset_work";
GPR_TIMER_BEGIN("pollset_work", 0);
if (ps->kicked_without_poller) {
ps->kicked_without_poller = false;
GPR_TIMER_END("pollset_work", 0);
return GRPC_ERROR_NONE;
}
@ -987,13 +978,12 @@ static grpc_error* pollset_work(grpc_pollset* ps,
end_worker(ps, &worker, worker_hdl);
gpr_tls_set(&g_current_thread_pollset, 0);
GPR_TIMER_END("pollset_work", 0);
return error;
}
static grpc_error* pollset_kick(grpc_pollset* pollset,
grpc_pollset_worker* specific_worker) {
GPR_TIMER_BEGIN("pollset_kick", 0);
GPR_TIMER_SCOPE("pollset_kick", 0);
GRPC_STATS_INC_POLLSET_KICK();
grpc_error* ret_err = GRPC_ERROR_NONE;
if (grpc_polling_trace.enabled()) {
@ -1150,7 +1140,6 @@ static grpc_error* pollset_kick(grpc_pollset* pollset,
goto done;
}
done:
GPR_TIMER_END("pollset_kick", 0);
return ret_err;
}

@ -57,7 +57,7 @@
//#define GRPC_EPOLLEX_CREATE_WORKERS_ON_HEAP 1
#define MAX_EPOLL_EVENTS 100
#define MAX_EPOLL_EVENTS_HANDLED_EACH_POLL_CALL 5
#define MAX_EPOLL_EVENTS_HANDLED_EACH_POLL_CALL 1
grpc_core::DebugOnlyTraceFlag grpc_trace_pollable_refcount(false,
"pollable_refcount");
@ -199,6 +199,7 @@ struct grpc_pollset {
pollable* active_pollable;
bool kicked_without_poller;
grpc_closure* shutdown_closure;
bool already_shutdown;
grpc_pollset_worker* root_worker;
int containing_pollset_set_count;
};
@ -560,8 +561,10 @@ static void pollset_maybe_finish_shutdown(grpc_pollset* pollset) {
}
if (pollset->shutdown_closure != nullptr && pollset->root_worker == nullptr &&
pollset->containing_pollset_set_count == 0) {
GPR_TIMER_MARK("pollset_finish_shutdown", 0);
GRPC_CLOSURE_SCHED(pollset->shutdown_closure, GRPC_ERROR_NONE);
pollset->shutdown_closure = nullptr;
pollset->already_shutdown = true;
}
}
@ -569,6 +572,7 @@ static void pollset_maybe_finish_shutdown(grpc_pollset* pollset) {
* pollset->active_pollable->mu & specific_worker->pollable_obj->mu must not be
* held */
static grpc_error* kick_one_worker(grpc_pollset_worker* specific_worker) {
GPR_TIMER_SCOPE("kick_one_worker", 0);
pollable* p = specific_worker->pollable_obj;
grpc_core::mu_guard lock(&p->mu);
GPR_ASSERT(specific_worker != nullptr);
@ -612,6 +616,7 @@ static grpc_error* kick_one_worker(grpc_pollset_worker* specific_worker) {
static grpc_error* pollset_kick(grpc_pollset* pollset,
grpc_pollset_worker* specific_worker) {
GPR_TIMER_SCOPE("pollset_kick", 0);
GRPC_STATS_INC_POLLSET_KICK();
if (grpc_polling_trace.enabled()) {
gpr_log(GPR_DEBUG,
@ -661,6 +666,7 @@ static grpc_error* pollset_kick(grpc_pollset* pollset,
}
static grpc_error* pollset_kick_all(grpc_pollset* pollset) {
GPR_TIMER_SCOPE("pollset_kick_all", 0);
grpc_error* error = GRPC_ERROR_NONE;
const char* err_desc = "pollset_kick_all";
grpc_pollset_worker* w = pollset->root_worker;
@ -677,6 +683,11 @@ static grpc_error* pollset_kick_all(grpc_pollset* pollset) {
static void pollset_init(grpc_pollset* pollset, gpr_mu** mu) {
gpr_mu_init(&pollset->mu);
pollset->active_pollable = POLLABLE_REF(g_empty_pollable, "pollset");
pollset->kicked_without_poller = false;
pollset->shutdown_closure = nullptr;
pollset->already_shutdown = false;
pollset->root_worker = nullptr;
pollset->containing_pollset_set_count = 0;
*mu = &pollset->mu;
}
@ -733,6 +744,7 @@ static grpc_error* fd_get_or_become_pollable(grpc_fd* fd, pollable** p) {
/* pollset->po.mu lock must be held by the caller before calling this */
static void pollset_shutdown(grpc_pollset* pollset, grpc_closure* closure) {
GPR_TIMER_SCOPE("pollset_shutdown", 0);
GPR_ASSERT(pollset->shutdown_closure == nullptr);
pollset->shutdown_closure = closure;
GRPC_LOG_IF_ERROR("pollset_shutdown", pollset_kick_all(pollset));
@ -741,6 +753,7 @@ static void pollset_shutdown(grpc_pollset* pollset, grpc_closure* closure) {
static grpc_error* pollable_process_events(grpc_pollset* pollset,
pollable* pollable_obj, bool drain) {
GPR_TIMER_SCOPE("pollable_process_events", 0);
static const char* err_desc = "pollset_process_events";
grpc_error* error = GRPC_ERROR_NONE;
for (int i = 0; (drain || i < MAX_EPOLL_EVENTS_HANDLED_EACH_POLL_CALL) &&
@ -787,6 +800,7 @@ static void pollset_destroy(grpc_pollset* pollset) {
}
static grpc_error* pollable_epoll(pollable* p, grpc_millis deadline) {
GPR_TIMER_SCOPE("pollable_epoll", 0);
int timeout = poll_deadline_to_millis_timeout(deadline);
if (grpc_polling_trace.enabled()) {
@ -862,7 +876,9 @@ static worker_remove_result worker_remove(grpc_pollset_worker** root_worker,
static bool begin_worker(grpc_pollset* pollset, grpc_pollset_worker* worker,
grpc_pollset_worker** worker_hdl,
grpc_millis deadline) {
bool do_poll = (pollset->shutdown_closure == nullptr);
GPR_TIMER_SCOPE("begin_worker", 0);
bool do_poll =
(pollset->shutdown_closure == nullptr && !pollset->already_shutdown);
if (worker_hdl != nullptr) *worker_hdl = worker;
worker->initialized_cv = false;
worker->kicked = false;
@ -913,6 +929,7 @@ static bool begin_worker(grpc_pollset* pollset, grpc_pollset_worker* worker,
static void end_worker(grpc_pollset* pollset, grpc_pollset_worker* worker,
grpc_pollset_worker** worker_hdl) {
GPR_TIMER_SCOPE("end_worker", 0);
gpr_mu_lock(&pollset->mu);
gpr_mu_lock(&worker->pollable_obj->mu);
switch (worker_remove(&worker->pollable_obj->root_worker, worker,
@ -955,6 +972,7 @@ static long gettid(void) { return syscall(__NR_gettid); }
static grpc_error* pollset_work(grpc_pollset* pollset,
grpc_pollset_worker** worker_hdl,
grpc_millis deadline) {
GPR_TIMER_SCOPE("pollset_work", 0);
#ifdef GRPC_EPOLLEX_CREATE_WORKERS_ON_HEAP
grpc_pollset_worker* worker =
(grpc_pollset_worker*)gpr_malloc(sizeof(*worker));
@ -1092,6 +1110,16 @@ static grpc_error* pollset_as_multipollable_locked(grpc_pollset* pollset,
case PO_EMPTY:
POLLABLE_UNREF(pollset->active_pollable, "pollset");
error = pollable_create(PO_MULTI, &pollset->active_pollable);
/* Any workers currently polling on this pollset must now be woked up so
* that they can pick up the new active_pollable */
if (grpc_polling_trace.enabled()) {
gpr_log(GPR_DEBUG,
"PS:%p active pollable transition from empty to multi",
pollset);
}
static const char* err_desc =
"pollset_as_multipollable_locked: empty -> multi";
append_error(&error, pollset_kick_all(pollset), err_desc);
break;
case PO_FD:
gpr_mu_lock(&po_at_start->owner_fd->orphan_mu);
@ -1120,6 +1148,7 @@ static grpc_error* pollset_as_multipollable_locked(grpc_pollset* pollset,
}
static void pollset_add_fd(grpc_pollset* pollset, grpc_fd* fd) {
GPR_TIMER_SCOPE("pollset_add_fd", 0);
gpr_mu_lock(&pollset->mu);
grpc_error* error = pollset_add_fd_locked(pollset, fd);
gpr_mu_unlock(&pollset->mu);
@ -1168,6 +1197,7 @@ static void pollset_set_unref(grpc_pollset_set* pss) {
}
static void pollset_set_add_fd(grpc_pollset_set* pss, grpc_fd* fd) {
GPR_TIMER_SCOPE("pollset_set_add_fd", 0);
if (grpc_polling_trace.enabled()) {
gpr_log(GPR_DEBUG, "PSS:%p: add fd %p (%d)", pss, fd, fd->fd);
}
@ -1191,6 +1221,7 @@ static void pollset_set_add_fd(grpc_pollset_set* pss, grpc_fd* fd) {
}
static void pollset_set_del_fd(grpc_pollset_set* pss, grpc_fd* fd) {
GPR_TIMER_SCOPE("pollset_set_del_fd", 0);
if (grpc_polling_trace.enabled()) {
gpr_log(GPR_DEBUG, "PSS:%p: del fd %p", pss, fd);
}
@ -1211,6 +1242,7 @@ static void pollset_set_del_fd(grpc_pollset_set* pss, grpc_fd* fd) {
}
static void pollset_set_del_pollset(grpc_pollset_set* pss, grpc_pollset* ps) {
GPR_TIMER_SCOPE("pollset_set_del_pollset", 0);
if (grpc_polling_trace.enabled()) {
gpr_log(GPR_DEBUG, "PSS:%p: del pollset %p", pss, ps);
}
@ -1241,6 +1273,7 @@ static grpc_error* add_fds_to_pollsets(grpc_fd** fds, size_t fd_count,
size_t pollset_count,
const char* err_desc, grpc_fd** out_fds,
size_t* out_fd_count) {
GPR_TIMER_SCOPE("add_fds_to_pollsets", 0);
grpc_error* error = GRPC_ERROR_NONE;
for (size_t i = 0; i < fd_count; i++) {
gpr_mu_lock(&fds[i]->orphan_mu);
@ -1261,6 +1294,7 @@ static grpc_error* add_fds_to_pollsets(grpc_fd** fds, size_t fd_count,
}
static void pollset_set_add_pollset(grpc_pollset_set* pss, grpc_pollset* ps) {
GPR_TIMER_SCOPE("pollset_set_add_pollset", 0);
if (grpc_polling_trace.enabled()) {
gpr_log(GPR_DEBUG, "PSS:%p: add pollset %p", pss, ps);
}
@ -1297,6 +1331,7 @@ static void pollset_set_add_pollset(grpc_pollset_set* pss, grpc_pollset* ps) {
static void pollset_set_add_pollset_set(grpc_pollset_set* a,
grpc_pollset_set* b) {
GPR_TIMER_SCOPE("pollset_set_add_pollset_set", 0);
if (grpc_polling_trace.enabled()) {
gpr_log(GPR_DEBUG, "PSS: merge (%p, %p)", a, b);
}
@ -1417,10 +1452,6 @@ static const grpc_event_engine_vtable vtable = {
const grpc_event_engine_vtable* grpc_init_epollex_linux(
bool explicitly_requested) {
if (!explicitly_requested) {
return nullptr;
}
if (!grpc_has_wakeup_fd()) {
gpr_log(GPR_ERROR, "Skipping epollex because of no wakeup fd.");
return nullptr;

@ -1024,7 +1024,7 @@ static void push_front_worker(grpc_pollset* p, grpc_pollset_worker* worker) {
/* p->mu must be held before calling this function */
static grpc_error* pollset_kick(grpc_pollset* p,
grpc_pollset_worker* specific_worker) {
GPR_TIMER_BEGIN("pollset_kick", 0);
GPR_TIMER_SCOPE("pollset_kick", 0);
grpc_error* error = GRPC_ERROR_NONE;
GRPC_STATS_INC_POLLSET_KICK();
const char* err_desc = "Kick Failure";
@ -1032,14 +1032,13 @@ static grpc_error* pollset_kick(grpc_pollset* p,
if (worker != nullptr) {
if (worker == GRPC_POLLSET_KICK_BROADCAST) {
if (pollset_has_workers(p)) {
GPR_TIMER_BEGIN("pollset_kick.broadcast", 0);
GPR_TIMER_SCOPE("pollset_kick.broadcast", 0);
for (worker = p->root_worker.next; worker != &p->root_worker;
worker = worker->next) {
if (gpr_tls_get(&g_current_thread_worker) != (intptr_t)worker) {
append_error(&error, pollset_worker_kick(worker), err_desc);
}
}
GPR_TIMER_END("pollset_kick.broadcast", 0);
} else {
p->kicked_without_pollers = true;
}
@ -1069,7 +1068,6 @@ static grpc_error* pollset_kick(grpc_pollset* p,
}
}
GPR_TIMER_END("pollset_kick", 0);
GRPC_LOG_IF_ERROR("pollset_kick", GRPC_ERROR_REF(error));
return error;
}
@ -1136,7 +1134,7 @@ static void finish_shutdown_locked(grpc_pollset* pollset) {
/* pollset->po.mu lock must be held by the caller before calling this */
static void pollset_shutdown(grpc_pollset* pollset, grpc_closure* closure) {
GPR_TIMER_BEGIN("pollset_shutdown", 0);
GPR_TIMER_SCOPE("pollset_shutdown", 0);
GPR_ASSERT(!pollset->shutting_down);
pollset->shutting_down = true;
pollset->shutdown_done = closure;
@ -1150,7 +1148,6 @@ static void pollset_shutdown(grpc_pollset* pollset, grpc_closure* closure) {
GPR_TIMER_MARK("pollset_shutdown.finish_shutdown_locked", 0);
finish_shutdown_locked(pollset);
}
GPR_TIMER_END("pollset_shutdown", 0);
}
/* pollset_shutdown is guaranteed to be called before pollset_destroy. So other
@ -1166,13 +1163,13 @@ static void pollset_destroy(grpc_pollset* pollset) {
static void pollset_work_and_unlock(grpc_pollset* pollset,
grpc_pollset_worker* worker, int timeout_ms,
sigset_t* sig_mask, grpc_error** error) {
GPR_TIMER_SCOPE("pollset_work_and_unlock", 0);
struct epoll_event ep_ev[GRPC_EPOLL_MAX_EVENTS];
int epoll_fd = -1;
int ep_rv;
polling_island* pi = nullptr;
char* err_msg;
const char* err_desc = "pollset_work_and_unlock";
GPR_TIMER_BEGIN("pollset_work_and_unlock", 0);
/* We need to get the epoll_fd to wait on. The epoll_fd is in inside the
latest polling island pointed by pollset->po.pi
@ -1187,7 +1184,6 @@ static void pollset_work_and_unlock(grpc_pollset* pollset,
if (pollset->po.pi == nullptr) {
pollset->po.pi = polling_island_create(nullptr, error);
if (pollset->po.pi == nullptr) {
GPR_TIMER_END("pollset_work_and_unlock", 0);
return; /* Fatal error. We cannot continue */
}
@ -1279,8 +1275,6 @@ static void pollset_work_and_unlock(grpc_pollset* pollset,
pollset->po.pi pointer might get udpated in other parts of the
code when there is an island merge while we are doing epoll_wait() above */
PI_UNREF(pi, "ps_work");
GPR_TIMER_END("pollset_work_and_unlock", 0);
}
/* pollset->po.mu lock must be held by the caller before calling this.
@ -1290,7 +1284,7 @@ static void pollset_work_and_unlock(grpc_pollset* pollset,
static grpc_error* pollset_work(grpc_pollset* pollset,
grpc_pollset_worker** worker_hdl,
grpc_millis deadline) {
GPR_TIMER_BEGIN("pollset_work", 0);
GPR_TIMER_SCOPE("pollset_work", 0);
grpc_error* error = GRPC_ERROR_NONE;
int timeout_ms = poll_deadline_to_millis_timeout(deadline);
@ -1384,15 +1378,13 @@ static grpc_error* pollset_work(grpc_pollset* pollset,
gpr_tls_set(&g_current_thread_pollset, (intptr_t)0);
gpr_tls_set(&g_current_thread_worker, (intptr_t)0);
GPR_TIMER_END("pollset_work", 0);
GRPC_LOG_IF_ERROR("pollset_work", GRPC_ERROR_REF(error));
return error;
}
static void add_poll_object(poll_obj* bag, poll_obj_type bag_type,
poll_obj* item, poll_obj_type item_type) {
GPR_TIMER_BEGIN("add_poll_object", 0);
GPR_TIMER_SCOPE("add_poll_object", 0);
#ifndef NDEBUG
GPR_ASSERT(item->obj_type == item_type);
@ -1535,7 +1527,6 @@ retry:
gpr_mu_unlock(&bag->mu);
GRPC_LOG_IF_ERROR("add_poll_object", error);
GPR_TIMER_END("add_poll_object", 0);
}
static void pollset_add_fd(grpc_pollset* pollset, grpc_fd* fd) {

@ -457,16 +457,20 @@ static grpc_error* fd_shutdown_error(grpc_fd* fd) {
if (!fd->shutdown) {
return GRPC_ERROR_NONE;
} else {
return GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
"FD shutdown", &fd->shutdown_error, 1);
return grpc_error_set_int(GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
"FD shutdown", &fd->shutdown_error, 1),
GRPC_ERROR_INT_GRPC_STATUS,
GRPC_STATUS_UNAVAILABLE);
}
}
static void notify_on_locked(grpc_fd* fd, grpc_closure** st,
grpc_closure* closure) {
if (fd->shutdown || gpr_atm_no_barrier_load(&fd->pollhup)) {
GRPC_CLOSURE_SCHED(closure,
GRPC_ERROR_CREATE_FROM_STATIC_STRING("FD shutdown"));
GRPC_CLOSURE_SCHED(
closure, grpc_error_set_int(
GRPC_ERROR_CREATE_FROM_STATIC_STRING("FD shutdown"),
GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_UNAVAILABLE));
} else if (*st == CLOSURE_NOT_READY) {
/* not ready ==> switch to a waiting state by setting the closure */
*st = closure;
@ -706,14 +710,14 @@ static void kick_append_error(grpc_error** composite, grpc_error* error) {
static grpc_error* pollset_kick_ext(grpc_pollset* p,
grpc_pollset_worker* specific_worker,
uint32_t flags) {
GPR_TIMER_BEGIN("pollset_kick_ext", 0);
GPR_TIMER_SCOPE("pollset_kick_ext", 0);
grpc_error* error = GRPC_ERROR_NONE;
GRPC_STATS_INC_POLLSET_KICK();
/* pollset->mu already held */
if (specific_worker != nullptr) {
if (specific_worker == GRPC_POLLSET_KICK_BROADCAST) {
GPR_TIMER_BEGIN("pollset_kick_ext.broadcast", 0);
GPR_TIMER_SCOPE("pollset_kick_ext.broadcast", 0);
GPR_ASSERT((flags & GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP) == 0);
for (specific_worker = p->root_worker.next;
specific_worker != &p->root_worker;
@ -722,7 +726,6 @@ static grpc_error* pollset_kick_ext(grpc_pollset* p,
&error, grpc_wakeup_fd_wakeup(&specific_worker->wakeup_fd->fd));
}
p->kicked_without_pollers = true;
GPR_TIMER_END("pollset_kick_ext.broadcast", 0);
} else if (gpr_tls_get(&g_current_thread_worker) !=
(intptr_t)specific_worker) {
GPR_TIMER_MARK("different_thread_worker", 0);
@ -769,7 +772,6 @@ static grpc_error* pollset_kick_ext(grpc_pollset* p,
}
}
GPR_TIMER_END("pollset_kick_ext", 0);
GRPC_LOG_IF_ERROR("pollset_kick_ext", GRPC_ERROR_REF(error));
return error;
}
@ -864,6 +866,8 @@ static void work_combine_error(grpc_error** composite, grpc_error* error) {
static grpc_error* pollset_work(grpc_pollset* pollset,
grpc_pollset_worker** worker_hdl,
grpc_millis deadline) {
GPR_TIMER_SCOPE("pollset_work", 0);
grpc_pollset_worker worker;
if (worker_hdl) *worker_hdl = &worker;
grpc_error* error = GRPC_ERROR_NONE;
@ -878,7 +882,6 @@ static grpc_error* pollset_work(grpc_pollset* pollset,
int locked = 1;
int queued_work = 0;
int keep_polling = 0;
GPR_TIMER_BEGIN("pollset_work", 0);
/* this must happen before we (potentially) drop pollset->mu */
worker.next = worker.prev = nullptr;
worker.reevaluate_polling_on_wakeup = 0;
@ -921,7 +924,7 @@ static grpc_error* pollset_work(grpc_pollset* pollset,
added_worker = 1;
gpr_tls_set(&g_current_thread_worker, (intptr_t)&worker);
}
GPR_TIMER_BEGIN("maybe_work_and_unlock", 0);
GPR_TIMER_SCOPE("maybe_work_and_unlock", 0);
#define POLLOUT_CHECK (POLLOUT | POLLHUP | POLLERR)
#define POLLIN_CHECK (POLLIN | POLLHUP | POLLERR)
@ -1037,7 +1040,6 @@ static grpc_error* pollset_work(grpc_pollset* pollset,
gpr_free(pfds);
}
GPR_TIMER_END("maybe_work_and_unlock", 0);
locked = 0;
} else {
GPR_TIMER_MARK("pollset_work.kicked_without_pollers", 0);
@ -1097,7 +1099,6 @@ static grpc_error* pollset_work(grpc_pollset* pollset,
}
}
if (worker_hdl) *worker_hdl = nullptr;
GPR_TIMER_END("pollset_work", 0);
GRPC_LOG_IF_ERROR("pollset_work", GRPC_ERROR_REF(error));
return error;
}

@ -39,6 +39,18 @@
grpc_core::TraceFlag grpc_polling_trace(false,
"polling"); /* Disabled by default */
grpc_core::DebugOnlyTraceFlag grpc_trace_fd_refcount(false, "fd_refcount");
grpc_core::DebugOnlyTraceFlag grpc_polling_api_trace(false, "polling_api");
#ifndef NDEBUG
// Polling API trace only enabled in debug builds
#define GRPC_POLLING_API_TRACE(format, ...) \
if (grpc_polling_api_trace.enabled()) { \
gpr_log(GPR_DEBUG, "(polling-api) " format, __VA_ARGS__); \
}
#else
#define GRPC_POLLING_API_TRACE(...)
#endif
/** Default poll() function - a pointer so that it can be overridden by some
* tests */
@ -177,6 +189,7 @@ void grpc_event_engine_shutdown(void) {
}
grpc_fd* grpc_fd_create(int fd, const char* name) {
GRPC_POLLING_API_TRACE("fd_create(%d, %s)", fd, name);
return g_event_engine->fd_create(fd, name);
}
@ -186,10 +199,14 @@ int grpc_fd_wrapped_fd(grpc_fd* fd) {
void grpc_fd_orphan(grpc_fd* fd, grpc_closure* on_done, int* release_fd,
bool already_closed, const char* reason) {
GRPC_POLLING_API_TRACE("fd_orphan(%d, %p, %p, %d, %s)",
grpc_fd_wrapped_fd(fd), on_done, release_fd,
already_closed, reason);
g_event_engine->fd_orphan(fd, on_done, release_fd, already_closed, reason);
}
void grpc_fd_shutdown(grpc_fd* fd, grpc_error* why) {
GRPC_POLLING_API_TRACE("fd_shutdown(%d)", grpc_fd_wrapped_fd(fd));
g_event_engine->fd_shutdown(fd, why);
}
@ -208,65 +225,89 @@ void grpc_fd_notify_on_write(grpc_fd* fd, grpc_closure* closure) {
size_t grpc_pollset_size(void) { return g_event_engine->pollset_size; }
void grpc_pollset_init(grpc_pollset* pollset, gpr_mu** mu) {
GRPC_POLLING_API_TRACE("pollset_init(%p)", pollset);
g_event_engine->pollset_init(pollset, mu);
}
void grpc_pollset_shutdown(grpc_pollset* pollset, grpc_closure* closure) {
GRPC_POLLING_API_TRACE("pollset_shutdown(%p)", pollset);
g_event_engine->pollset_shutdown(pollset, closure);
}
void grpc_pollset_destroy(grpc_pollset* pollset) {
GRPC_POLLING_API_TRACE("pollset_destroy(%p)", pollset);
g_event_engine->pollset_destroy(pollset);
}
grpc_error* grpc_pollset_work(grpc_pollset* pollset,
grpc_pollset_worker** worker,
grpc_millis deadline) {
return g_event_engine->pollset_work(pollset, worker, deadline);
GRPC_POLLING_API_TRACE("pollset_work(%p, %" PRIdPTR ") begin", pollset,
deadline);
grpc_error* err = g_event_engine->pollset_work(pollset, worker, deadline);
GRPC_POLLING_API_TRACE("pollset_work(%p, %" PRIdPTR ") end", pollset,
deadline);
return err;
}
grpc_error* grpc_pollset_kick(grpc_pollset* pollset,
grpc_pollset_worker* specific_worker) {
GRPC_POLLING_API_TRACE("pollset_kick(%p, %p)", pollset, specific_worker);
return g_event_engine->pollset_kick(pollset, specific_worker);
}
void grpc_pollset_add_fd(grpc_pollset* pollset, struct grpc_fd* fd) {
GRPC_POLLING_API_TRACE("pollset_add_fd(%p, %d)", pollset,
grpc_fd_wrapped_fd(fd));
g_event_engine->pollset_add_fd(pollset, fd);
}
grpc_pollset_set* grpc_pollset_set_create(void) {
return g_event_engine->pollset_set_create();
grpc_pollset_set* pss = g_event_engine->pollset_set_create();
GRPC_POLLING_API_TRACE("pollset_set_create(%p)", pss);
return pss;
}
void grpc_pollset_set_destroy(grpc_pollset_set* pollset_set) {
GRPC_POLLING_API_TRACE("pollset_set_destroy(%p)", pollset_set);
g_event_engine->pollset_set_destroy(pollset_set);
}
void grpc_pollset_set_add_pollset(grpc_pollset_set* pollset_set,
grpc_pollset* pollset) {
GRPC_POLLING_API_TRACE("pollset_set_add_pollset(%p, %p)", pollset_set,
pollset);
g_event_engine->pollset_set_add_pollset(pollset_set, pollset);
}
void grpc_pollset_set_del_pollset(grpc_pollset_set* pollset_set,
grpc_pollset* pollset) {
GRPC_POLLING_API_TRACE("pollset_set_del_pollset(%p, %p)", pollset_set,
pollset);
g_event_engine->pollset_set_del_pollset(pollset_set, pollset);
}
void grpc_pollset_set_add_pollset_set(grpc_pollset_set* bag,
grpc_pollset_set* item) {
GRPC_POLLING_API_TRACE("pollset_set_add_pollset_set(%p, %p)", bag, item);
g_event_engine->pollset_set_add_pollset_set(bag, item);
}
void grpc_pollset_set_del_pollset_set(grpc_pollset_set* bag,
grpc_pollset_set* item) {
GRPC_POLLING_API_TRACE("pollset_set_del_pollset_set(%p, %p)", bag, item);
g_event_engine->pollset_set_del_pollset_set(bag, item);
}
void grpc_pollset_set_add_fd(grpc_pollset_set* pollset_set, grpc_fd* fd) {
GRPC_POLLING_API_TRACE("pollset_set_add_fd(%p, %d)", pollset_set,
grpc_fd_wrapped_fd(fd));
g_event_engine->pollset_set_add_fd(pollset_set, fd);
}
void grpc_pollset_set_del_fd(grpc_pollset_set* pollset_set, grpc_fd* fd) {
GRPC_POLLING_API_TRACE("pollset_set_del_fd(%p, %d)", pollset_set,
grpc_fd_wrapped_fd(fd));
g_event_engine->pollset_set_del_fd(pollset_set, fd);
}

@ -113,7 +113,7 @@ void ExecCtx::GlobalInit(void) {
bool ExecCtx::Flush() {
bool did_something = 0;
GPR_TIMER_BEGIN("grpc_exec_ctx_flush", 0);
GPR_TIMER_SCOPE("grpc_exec_ctx_flush", 0);
for (;;) {
if (!grpc_closure_list_empty(closure_list_)) {
grpc_closure* c = closure_list_.head;
@ -130,7 +130,6 @@ bool ExecCtx::Flush() {
}
}
GPR_ASSERT(combiner_data_.active_combiner == nullptr);
GPR_TIMER_END("grpc_exec_ctx_flush", 0);
return did_something;
}

@ -27,12 +27,13 @@
#include <sys/types.h>
#include <grpc/support/alloc.h>
#include <grpc/support/host_port.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/thd.h>
#include <grpc/support/time.h>
#include <grpc/support/useful.h>
#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/iomgr/block_annotate.h"
#include "src/core/lib/iomgr/executor.h"

@ -22,11 +22,11 @@
#include <uv.h>
#include <grpc/support/alloc.h>
#include <grpc/support/host_port.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/useful.h>
#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/exec_ctx.h"

@ -28,12 +28,13 @@
#include <sys/types.h>
#include <grpc/support/alloc.h>
#include <grpc/support/host_port.h>
#include <grpc/support/log.h>
#include <grpc/support/log_windows.h>
#include <grpc/support/string_util.h>
#include <grpc/support/thd.h>
#include <grpc/support/time.h>
#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/iomgr/block_annotate.h"
#include "src/core/lib/iomgr/executor.h"

@ -23,11 +23,11 @@
#include <string.h>
#include <grpc/support/alloc.h>
#include <grpc/support/host_port.h>
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
#include <grpc/support/string_util.h>
#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/iomgr/sockaddr.h"
#include "src/core/lib/iomgr/socket_utils.h"

@ -36,10 +36,11 @@
#include <unistd.h>
#include <grpc/support/alloc.h>
#include <grpc/support/host_port.h>
#include <grpc/support/log.h>
#include <grpc/support/port_platform.h>
#include <grpc/support/sync.h>
#include "src/core/lib/gpr/host_port.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/iomgr/sockaddr_utils.h"

@ -130,7 +130,7 @@ static void run_poller(void* bp, grpc_error* error_ignored) {
gpr_log(GPR_DEBUG, "BACKUP_POLLER:%p run", p);
}
gpr_mu_lock(p->pollset_mu);
grpc_millis deadline = grpc_core::ExecCtx::Get()->Now() + 13 * GPR_MS_PER_SEC;
grpc_millis deadline = grpc_core::ExecCtx::Get()->Now() + 10 * GPR_MS_PER_SEC;
GRPC_STATS_INC_TCP_BACKUP_POLLER_POLLS();
GRPC_LOG_IF_ERROR(
"backup_poller:pollset_work",
@ -368,6 +368,7 @@ static void call_read_cb(grpc_tcp* tcp, grpc_error* error) {
#define MAX_READ_IOVEC 4
static void tcp_do_read(grpc_tcp* tcp) {
GPR_TIMER_SCOPE("tcp_continue_read", 0);
struct msghdr msg;
struct iovec iov[MAX_READ_IOVEC];
ssize_t read_bytes;
@ -375,7 +376,6 @@ static void tcp_do_read(grpc_tcp* tcp) {
GPR_ASSERT(!tcp->finished_edge);
GPR_ASSERT(tcp->incoming_buffer->count <= MAX_READ_IOVEC);
GPR_TIMER_BEGIN("tcp_continue_read", 0);
for (i = 0; i < tcp->incoming_buffer->count; i++) {
iov[i].iov_base = GRPC_SLICE_START_PTR(tcp->incoming_buffer->slices[i]);
@ -393,12 +393,11 @@ static void tcp_do_read(grpc_tcp* tcp) {
GRPC_STATS_INC_TCP_READ_OFFER(tcp->incoming_buffer->length);
GRPC_STATS_INC_TCP_READ_OFFER_IOV_SIZE(tcp->incoming_buffer->count);
GPR_TIMER_BEGIN("recvmsg", 0);
do {
GPR_TIMER_SCOPE("recvmsg", 0);
GRPC_STATS_INC_SYSCALL_READ();
read_bytes = recvmsg(tcp->fd, &msg, 0);
} while (read_bytes < 0 && errno == EINTR);
GPR_TIMER_END("recvmsg", read_bytes >= 0);
if (read_bytes < 0) {
/* NB: After calling call_read_cb a parallel call of the read handler may
@ -434,8 +433,6 @@ static void tcp_do_read(grpc_tcp* tcp) {
call_read_cb(tcp, GRPC_ERROR_NONE);
TCP_UNREF(tcp, "read");
}
GPR_TIMER_END("tcp_continue_read", 0);
}
static void tcp_read_allocation_done(void* tcpp, grpc_error* error) {
@ -552,13 +549,12 @@ static bool tcp_flush(grpc_tcp* tcp, grpc_error** error) {
GRPC_STATS_INC_TCP_WRITE_SIZE(sending_length);
GRPC_STATS_INC_TCP_WRITE_IOV_SIZE(iov_size);
GPR_TIMER_BEGIN("sendmsg", 1);
GPR_TIMER_SCOPE("sendmsg", 1);
do {
/* TODO(klempner): Cork if this is a partial write */
GRPC_STATS_INC_SYSCALL_WRITE();
sent_length = sendmsg(tcp->fd, &msg, SENDMSG_FLAGS);
} while (sent_length < 0 && errno == EINTR);
GPR_TIMER_END("sendmsg", 0);
if (sent_length < 0) {
if (errno == EAGAIN) {
@ -637,6 +633,7 @@ static void tcp_handle_write(void* arg /* grpc_tcp */, grpc_error* error) {
static void tcp_write(grpc_endpoint* ep, grpc_slice_buffer* buf,
grpc_closure* cb) {
GPR_TIMER_SCOPE("tcp_write", 0);
grpc_tcp* tcp = (grpc_tcp*)ep;
grpc_error* error = GRPC_ERROR_NONE;
@ -651,11 +648,9 @@ static void tcp_write(grpc_endpoint* ep, grpc_slice_buffer* buf,
}
}
GPR_TIMER_BEGIN("tcp_write", 0);
GPR_ASSERT(tcp->write_cb == nullptr);
if (buf->length == 0) {
GPR_TIMER_END("tcp_write", 0);
GRPC_CLOSURE_SCHED(
cb, grpc_fd_is_shutdown(tcp->em_fd)
? tcp_annotate_error(
@ -680,8 +675,6 @@ static void tcp_write(grpc_endpoint* ep, grpc_slice_buffer* buf,
}
GRPC_CLOSURE_SCHED(cb, error);
}
GPR_TIMER_END("tcp_write", 0);
}
static void tcp_add_to_pollset(grpc_endpoint* ep, grpc_pollset* pollset) {

@ -52,15 +52,14 @@ static grpc_error* eventfd_consume(grpc_wakeup_fd* fd_info) {
}
static grpc_error* eventfd_wakeup(grpc_wakeup_fd* fd_info) {
GPR_TIMER_SCOPE("eventfd_wakeup", 0);
int err;
GPR_TIMER_BEGIN("eventfd_wakeup", 0);
do {
err = eventfd_write(fd_info->read_fd, 1);
} while (err < 0 && errno == EINTR);
if (err < 0) {
return GRPC_OS_ERROR(errno, "eventfd_write");
}
GPR_TIMER_END("eventfd_wakeup", 0);
return GRPC_ERROR_NONE;
}

@ -40,14 +40,10 @@ void gpr_timer_set_enabled(int enabled);
do { \
} while (0)
#define GPR_TIMER_BEGIN(tag, important) \
#define GPR_TIMER_SCOPE(tag, important) \
do { \
} while (0)
#define GPR_TIMER_END(tag, important) \
do { \
} while (0)
#else /* at least one profiler requested... */
/* ... hopefully only one. */
#if defined(GRPC_STAP_PROFILER) && defined(GRPC_BASIC_PROFILER)
@ -64,12 +60,6 @@ void gpr_timer_set_enabled(int enabled);
#define GPR_TIMER_MARK(tag, important) \
gpr_timer_add_mark(tag, important, __FILE__, __LINE__);
#define GPR_TIMER_BEGIN(tag, important) \
gpr_timer_begin(tag, important, __FILE__, __LINE__);
#define GPR_TIMER_END(tag, important) \
gpr_timer_end(tag, important, __FILE__, __LINE__);
#ifdef GRPC_STAP_PROFILER
/* Empty placeholder for now. */
#endif /* GRPC_STAP_PROFILER */
@ -78,10 +68,6 @@ void gpr_timer_set_enabled(int enabled);
/* Empty placeholder for now. */
#endif /* GRPC_BASIC_PROFILER */
#endif /* at least one profiler requested. */
#if (defined(GRPC_STAP_PROFILER) + defined(GRPC_BASIC_PROFILER) + \
defined(GRPC_CUSTOM_PROFILER))
namespace grpc {
class ProfileScope {
public:
@ -99,10 +85,7 @@ class ProfileScope {
#define GPR_TIMER_SCOPE(tag, important) \
::grpc::ProfileScope _profile_scope_##__LINE__((tag), (important), __FILE__, \
__LINE__)
#else
#define GPR_TIMER_SCOPE(tag, important) \
do { \
} while (false)
#endif
#endif /* at least one profiler requested. */
#endif /* GRPC_CORE_LIB_PROFILING_TIMERS_H */

@ -118,6 +118,7 @@ static void on_credentials_metadata(void* arg, grpc_error* input_error) {
grpc_transport_stream_op_batch_finish_with_failure(batch, error,
calld->call_combiner);
}
GRPC_CALL_STACK_UNREF(calld->owning_call, "get_request_metadata");
}
void grpc_auth_metadata_context_build(
@ -208,7 +209,7 @@ static void send_security_metadata(grpc_call_element* elem,
chand->auth_context, &calld->auth_md_context);
GPR_ASSERT(calld->pollent != nullptr);
GRPC_CALL_STACK_REF(calld->owning_call, "get_request_metadata");
GRPC_CLOSURE_INIT(&calld->async_result_closure, on_credentials_metadata,
batch, grpc_schedule_on_exec_ctx);
grpc_error* error = GRPC_ERROR_NONE;
@ -250,6 +251,7 @@ static void on_host_checked(void* arg, grpc_error* error) {
calld->call_combiner);
gpr_free(error_msg);
}
GRPC_CALL_STACK_UNREF(calld->owning_call, "check_call_host");
}
static void cancel_check_call_host(void* arg, grpc_error* error) {
@ -266,7 +268,7 @@ static void cancel_check_call_host(void* arg, grpc_error* error) {
static void auth_start_transport_stream_op_batch(
grpc_call_element* elem, grpc_transport_stream_op_batch* batch) {
GPR_TIMER_BEGIN("auth_start_transport_stream_op_batch", 0);
GPR_TIMER_SCOPE("auth_start_transport_stream_op_batch", 0);
/* grab pointers to our data from the call element */
call_data* calld = (call_data*)elem->call_data;
@ -312,6 +314,7 @@ static void auth_start_transport_stream_op_batch(
}
if (calld->have_host) {
batch->handler_private.extra_arg = elem;
GRPC_CALL_STACK_REF(calld->owning_call, "check_call_host");
GRPC_CLOSURE_INIT(&calld->async_result_closure, on_host_checked, batch,
grpc_schedule_on_exec_ctx);
char* call_host = grpc_slice_to_c_string(calld->host);
@ -332,14 +335,12 @@ static void auth_start_transport_stream_op_batch(
grpc_schedule_on_exec_ctx));
}
gpr_free(call_host);
GPR_TIMER_END("auth_start_transport_stream_op_batch", 0);
return; /* early exit */
}
}
/* pass control down the stack */
grpc_call_next_op(elem, batch);
GPR_TIMER_END("auth_start_transport_stream_op_batch", 0);
}
/* Constructor for call_data */

@ -252,7 +252,7 @@ static void flush_write_staging_buffer(secure_endpoint* ep, uint8_t** cur,
static void endpoint_write(grpc_endpoint* secure_ep, grpc_slice_buffer* slices,
grpc_closure* cb) {
GPR_TIMER_BEGIN("secure_endpoint.endpoint_write", 0);
GPR_TIMER_SCOPE("secure_endpoint.endpoint_write", 0);
unsigned i;
tsi_result result = TSI_OK;
@ -336,12 +336,10 @@ static void endpoint_write(grpc_endpoint* secure_ep, grpc_slice_buffer* slices,
GRPC_CLOSURE_SCHED(
cb, grpc_set_tsi_error_result(
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Wrap failed"), result));
GPR_TIMER_END("secure_endpoint.endpoint_write", 0);
return;
}
grpc_endpoint_write(ep->wrapped_ep, &ep->output_buffer, cb);
GPR_TIMER_END("secure_endpoint.endpoint_write", 0);
}
static void endpoint_shutdown(grpc_endpoint* secure_ep, grpc_error* why) {

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

Loading…
Cancel
Save